@janiscommerce/ui-web 0.23.0 → 0.25.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 +17 -0
- package/dist/index.esm.js +4869 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.umd.js +116 -161
- package/dist/index.umd.js.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +6 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('styled-components'), require('react-dom')) :
|
|
3
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$
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.main = {}, global.React, global.styled$f, global.require$$1));
|
|
5
|
+
})(this, (function (exports, React, styled$f, require$$1) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
9
9
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
10
|
-
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled$
|
|
10
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled$f);
|
|
11
11
|
var require$$1__default = /*#__PURE__*/_interopDefaultLegacy(require$$1);
|
|
12
12
|
|
|
13
13
|
function _classCallCheck$2(instance, Constructor) {
|
|
@@ -430,25 +430,25 @@
|
|
|
430
430
|
};
|
|
431
431
|
var mediaBreaks = {
|
|
432
432
|
mobile: function mobile() {
|
|
433
|
-
return styled$
|
|
433
|
+
return styled$f.css(["", "{", "}"], devices.mobile, styled$f.css.apply(void 0, arguments));
|
|
434
434
|
},
|
|
435
435
|
tablet: function tablet() {
|
|
436
|
-
return styled$
|
|
436
|
+
return styled$f.css(["", "{", "}"], devices.tablet, styled$f.css.apply(void 0, arguments));
|
|
437
437
|
},
|
|
438
438
|
tabletLg: function tabletLg() {
|
|
439
|
-
return styled$
|
|
439
|
+
return styled$f.css(["", "{", "}"], devices.tabletLg, styled$f.css.apply(void 0, arguments));
|
|
440
440
|
},
|
|
441
441
|
onlyDesktop: function onlyDesktop() {
|
|
442
|
-
return styled$
|
|
442
|
+
return styled$f.css(["", "{", "}"], devices.onlyDesktop, styled$f.css.apply(void 0, arguments));
|
|
443
443
|
},
|
|
444
444
|
desktopSm: function desktopSm() {
|
|
445
|
-
return styled$
|
|
445
|
+
return styled$f.css(["", "{", "}"], devices.desktopSm, styled$f.css.apply(void 0, arguments));
|
|
446
446
|
},
|
|
447
447
|
desktopLg: function desktopLg() {
|
|
448
|
-
return styled$
|
|
448
|
+
return styled$f.css(["", "{", "}"], devices.desktopLg, styled$f.css.apply(void 0, arguments));
|
|
449
449
|
},
|
|
450
450
|
onlyPrint: function onlyPrint() {
|
|
451
|
-
return styled$
|
|
451
|
+
return styled$f.css(["@media print{", "}"], styled$f.css.apply(void 0, arguments));
|
|
452
452
|
}
|
|
453
453
|
};
|
|
454
454
|
|
|
@@ -641,24 +641,22 @@
|
|
|
641
641
|
return imageSizes[size] || imageSizes.small;
|
|
642
642
|
};
|
|
643
643
|
|
|
644
|
-
var
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
})
|
|
661
|
-
};
|
|
644
|
+
var SkeletonContainer = styled__default["default"].div.withConfig({
|
|
645
|
+
displayName: "styles__SkeletonContainer",
|
|
646
|
+
componentId: "sc-1xnupv9-0"
|
|
647
|
+
})(["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) {
|
|
648
|
+
var circle = _ref.circle;
|
|
649
|
+
return circle ? ' 50%' : '3px';
|
|
650
|
+
}, function (_ref2) {
|
|
651
|
+
var height = _ref2.height;
|
|
652
|
+
return height;
|
|
653
|
+
}, function (_ref3) {
|
|
654
|
+
var width = _ref3.width;
|
|
655
|
+
return width;
|
|
656
|
+
}, function (_ref4) {
|
|
657
|
+
var backgroundColor = _ref4.backgroundColor;
|
|
658
|
+
return backgroundColor || palette.lightGrey;
|
|
659
|
+
});
|
|
662
660
|
|
|
663
661
|
var Skeleton = function Skeleton(_ref) {
|
|
664
662
|
var circle = _ref.circle,
|
|
@@ -671,7 +669,7 @@
|
|
|
671
669
|
var skeletons = Array.from({
|
|
672
670
|
length: count
|
|
673
671
|
}, function (_, index) {
|
|
674
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
672
|
+
return /*#__PURE__*/React__default["default"].createElement(SkeletonContainer, {
|
|
675
673
|
key: index,
|
|
676
674
|
width: currentWidth,
|
|
677
675
|
height: currentHeight,
|
|
@@ -713,9 +711,9 @@
|
|
|
713
711
|
accelerate: 'cubic-bezier(0.4, 0.0, 1, 1)'
|
|
714
712
|
};
|
|
715
713
|
var mixins = {
|
|
716
|
-
flexCenter: styled$
|
|
714
|
+
flexCenter: styled$f.css(["display:flex;align-items:center;justify-content:center;"]),
|
|
717
715
|
placeholder: function placeholder(styles) {
|
|
718
|
-
return styled$
|
|
716
|
+
return styled$f.css(["&::-moz-placeholder{", "}&::-webkit-input-placeholder{", "}&:-moz-placeholder{", "}&:-ms-input-placeholder{", "}&::placeholder{", "}"], styles, styles, styles, styles, styles);
|
|
719
717
|
},
|
|
720
718
|
transition: function transition() {
|
|
721
719
|
var property = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'all';
|
|
@@ -723,10 +721,10 @@
|
|
|
723
721
|
var transitionProperty;
|
|
724
722
|
if (property.includes(',')) transitionProperty = "transition-property: ".concat(property);
|
|
725
723
|
var transition = "".concat(property.split(',')[0], " ").concat(time, " ").concat(timingFunctions.standard);
|
|
726
|
-
return styled$
|
|
724
|
+
return styled$f.css(["transition:", ";", ";"], transition, transitionProperty);
|
|
727
725
|
},
|
|
728
726
|
scrollbar: function scrollbar(thumbColor, shadowColor) {
|
|
729
|
-
return styled$
|
|
727
|
+
return styled$f.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);
|
|
730
728
|
}
|
|
731
729
|
};
|
|
732
730
|
|
|
@@ -2276,11 +2274,31 @@
|
|
|
2276
2274
|
};
|
|
2277
2275
|
|
|
2278
2276
|
var _templateObject$3;
|
|
2277
|
+
|
|
2278
|
+
var getChipVariant = function getChipVariant(props) {
|
|
2279
|
+
var selected = props.selected,
|
|
2280
|
+
color = props.color,
|
|
2281
|
+
sizeColor = props.sizeColor,
|
|
2282
|
+
variant = props.variant;
|
|
2283
|
+
var variantStyles = {
|
|
2284
|
+
outlined: function outlined() {
|
|
2285
|
+
return styled$f.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);
|
|
2286
|
+
},
|
|
2287
|
+
contained: function contained() {
|
|
2288
|
+
return styled$f.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);
|
|
2289
|
+
},
|
|
2290
|
+
status: function status() {
|
|
2291
|
+
return styled$f.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'));
|
|
2292
|
+
}
|
|
2293
|
+
};
|
|
2294
|
+
return variantStyles[variant] || '';
|
|
2295
|
+
};
|
|
2296
|
+
|
|
2279
2297
|
var styled$c = {
|
|
2280
2298
|
Chip: styled__default["default"].button.withConfig({
|
|
2281
2299
|
displayName: "styles__Chip",
|
|
2282
2300
|
componentId: "sc-1vnh4co-0"
|
|
2283
|
-
})(["padding:", ";cursor:", ";font-size:13px;color:", ";height:", ";width:", ";min-width:36px;max-width:150px;border-radius:", ";display:inline-flex;justify-content:center;align-items:center;pointer-events:", ";white-space:nowrap;.chip-icon{", ";}", "
|
|
2301
|
+
})(["padding:", ";cursor:", ";font-size:13px;color:", ";height:", ";width:", ";min-width:36px;max-width:150px;border-radius:", ";display:inline-flex;justify-content:center;align-items:center;pointer-events:", ";white-space:nowrap;.chip-icon{", ";}", ";", ";", " ", " ", " ", ""], function (props) {
|
|
2284
2302
|
return !props.onlyIcon ? '0 12px' : '0';
|
|
2285
2303
|
}, function (props) {
|
|
2286
2304
|
return props.clickable ? 'pointer' : 'default';
|
|
@@ -2295,19 +2313,7 @@
|
|
|
2295
2313
|
}, function (props) {
|
|
2296
2314
|
return !props.onlyIcon && 'margin-right: 8px';
|
|
2297
2315
|
}, function (props) {
|
|
2298
|
-
|
|
2299
|
-
case 'outlined':
|
|
2300
|
-
return styled$g.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:", ";}"], props.selected ? palette.blue : '#EAEBED', props.selected ? palette.blue : palette.black, palette.lightGreyHover, props.selected ? palette.blue : palette.black, palette.blue, palette.blue, palette.blue);
|
|
2301
|
-
|
|
2302
|
-
case 'contained':
|
|
2303
|
-
return styled$g.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:", ";}"], props.selected ? palette.blue : palette.lightGreyHover, props.selected ? palette.white : palette.black, props.selected ? palette.white : palette.black, props.selected ? palette.white : palette.darkGrey, props.selected ? palette.blueHover : palette.lightGrey, props.selected ? palette.white : palette.black, palette.blue, palette.white, palette.white, palette.grey, palette.grey);
|
|
2304
|
-
|
|
2305
|
-
case 'status':
|
|
2306
|
-
return styled$g.css(["background-color:", ";color:", ";font-weight:700;border:none;height:24px;padding:0 17px;line-height:28px;max-width:170px;"], getColor(props.color || 'grey'), getColor(props.sizeColor || 'white'));
|
|
2307
|
-
|
|
2308
|
-
default:
|
|
2309
|
-
return '';
|
|
2310
|
-
}
|
|
2316
|
+
return getChipVariant(props);
|
|
2311
2317
|
}, function (props) {
|
|
2312
2318
|
return props.styles;
|
|
2313
2319
|
}, function (props) {
|
|
@@ -2317,12 +2323,12 @@
|
|
|
2317
2323
|
}, function (props) {
|
|
2318
2324
|
return props.textColor && "color: ".concat(getColor(props.textColor), ";");
|
|
2319
2325
|
}, mediaBreaks.onlyPrint(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteral(["\n\t\t\tborder: 1px solid ", ";\n\t\t"])), palette.darkGrey)),
|
|
2320
|
-
iconPathStyles: styled$
|
|
2326
|
+
iconPathStyles: styled$f.css(["", ";"], mixins.transition('fill')),
|
|
2321
2327
|
DeleteButton: styled__default["default"].button.withConfig({
|
|
2322
2328
|
displayName: "styles__DeleteButton",
|
|
2323
2329
|
componentId: "sc-1vnh4co-1"
|
|
2324
2330
|
})(["width:16px;height:16px;margin-left:12px;"]),
|
|
2325
|
-
deleteButtonPathStyles: styled$
|
|
2331
|
+
deleteButtonPathStyles: styled$f.css(["", ";"], mixins.transition('fill')),
|
|
2326
2332
|
Children: styled__default["default"].div.withConfig({
|
|
2327
2333
|
displayName: "styles__Children",
|
|
2328
2334
|
componentId: "sc-1vnh4co-2"
|
|
@@ -2396,7 +2402,7 @@
|
|
|
2396
2402
|
})(["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) {
|
|
2397
2403
|
var showFull = _ref.showFull,
|
|
2398
2404
|
backgroundColor = _ref.backgroundColor;
|
|
2399
|
-
return showFull ? styled$
|
|
2405
|
+
return showFull ? styled$f.css(["height:45px;padding-left:9px;padding-right:9px;max-width:inherit;&:hover,&:active{background:", ";}"], backgroundColor || palette.white) : styled$f.css(["height:33px;padding-left:5px;padding-right:5px;cursor:pointer;"]);
|
|
2400
2406
|
}, function (_ref2) {
|
|
2401
2407
|
var backgroundColor = _ref2.backgroundColor;
|
|
2402
2408
|
return backgroundColor || palette.white;
|
|
@@ -2486,6 +2492,10 @@
|
|
|
2486
2492
|
PropTypes.oneOfType([PropTypes.array, PropTypes.string, PropTypes.shape({})]);
|
|
2487
2493
|
|
|
2488
2494
|
var validColors = ['black', 'blue', 'darkGrey', 'fizzGreen', 'green', 'grey', 'lightBlue', 'lightGrey', 'orange', 'red', 'statusRed', 'white', 'yellow'];
|
|
2495
|
+
var isValidColor = function isValidColor(color) {
|
|
2496
|
+
return validColors.includes(color);
|
|
2497
|
+
};
|
|
2498
|
+
|
|
2489
2499
|
var white = palette.white,
|
|
2490
2500
|
grey = palette.grey,
|
|
2491
2501
|
lightGreyHover = palette.lightGreyHover,
|
|
@@ -2493,10 +2503,6 @@
|
|
|
2493
2503
|
blue = palette.blue,
|
|
2494
2504
|
blueHover = palette.blueHover,
|
|
2495
2505
|
bluePressed = palette.bluePressed;
|
|
2496
|
-
|
|
2497
|
-
var isValidColor = function isValidColor(color) {
|
|
2498
|
-
return validColors.includes(color);
|
|
2499
|
-
};
|
|
2500
2506
|
var getHoverColor = function getHoverColor(color) {
|
|
2501
2507
|
return isValidColor(color) ? palette["".concat(color, "Hover")] : blueHover;
|
|
2502
2508
|
};
|
|
@@ -2505,7 +2511,7 @@
|
|
|
2505
2511
|
};
|
|
2506
2512
|
|
|
2507
2513
|
var commonStyles = function commonStyles(iconColor, fontColor, color) {
|
|
2508
|
-
return styled$
|
|
2514
|
+
return styled$f.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);
|
|
2509
2515
|
};
|
|
2510
2516
|
|
|
2511
2517
|
var getButtonStyles = function getButtonStyles(_ref) {
|
|
@@ -2515,10 +2521,10 @@
|
|
|
2515
2521
|
iconColor = _ref.iconColor;
|
|
2516
2522
|
var variantStyles = {
|
|
2517
2523
|
contained: function contained() {
|
|
2518
|
-
return styled$
|
|
2524
|
+
return styled$f.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);
|
|
2519
2525
|
},
|
|
2520
2526
|
outlined: function outlined() {
|
|
2521
|
-
return styled$
|
|
2527
|
+
return styled$f.css(["", ";border:1px solid ", ";"], commonStyles(iconColor, fontColor, color), getColor(grey));
|
|
2522
2528
|
},
|
|
2523
2529
|
cleaned: function cleaned() {
|
|
2524
2530
|
return commonStyles(iconColor, fontColor, color);
|
|
@@ -2531,31 +2537,31 @@
|
|
|
2531
2537
|
Button: styled__default["default"].button.withConfig({
|
|
2532
2538
|
displayName: "styles__Button",
|
|
2533
2539
|
componentId: "sc-buf2do-0"
|
|
2534
|
-
})(["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 (
|
|
2535
|
-
var rounded = _ref.rounded;
|
|
2536
|
-
return rounded && '36px';
|
|
2537
|
-
}, function (_ref2) {
|
|
2540
|
+
})(["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) {
|
|
2538
2541
|
var rounded = _ref2.rounded;
|
|
2539
|
-
return rounded
|
|
2542
|
+
return rounded && '36px';
|
|
2540
2543
|
}, function (_ref3) {
|
|
2541
2544
|
var rounded = _ref3.rounded;
|
|
2542
|
-
return rounded ? '
|
|
2545
|
+
return rounded ? '0' : 'initial';
|
|
2543
2546
|
}, function (_ref4) {
|
|
2544
|
-
var rounded = _ref4.rounded
|
|
2545
|
-
|
|
2546
|
-
hasIcon = _ref4.hasIcon;
|
|
2547
|
-
return !rounded && (hasText && hasIcon ? '0 12px' : '0 16px');
|
|
2547
|
+
var rounded = _ref4.rounded;
|
|
2548
|
+
return rounded ? '50%' : '50px';
|
|
2548
2549
|
}, function (_ref5) {
|
|
2549
|
-
var
|
|
2550
|
+
var rounded = _ref5.rounded,
|
|
2551
|
+
hasText = _ref5.hasText,
|
|
2552
|
+
hasIcon = _ref5.hasIcon;
|
|
2553
|
+
return !rounded && (hasText && hasIcon ? '0 12px' : '0 16px');
|
|
2554
|
+
}, function (_ref6) {
|
|
2555
|
+
var disabled = _ref6.disabled;
|
|
2550
2556
|
return disabled ? 'default' : 'pointer';
|
|
2551
|
-
}, mixins.transition('background-color', '250ms'), timingFunctions$1.standard, palette.transparentWhite, function (
|
|
2552
|
-
var hasText =
|
|
2557
|
+
}, mixins.transition('background-color', '250ms'), timingFunctions$1.standard, palette.transparentWhite, function (_ref7) {
|
|
2558
|
+
var hasText = _ref7.hasText;
|
|
2553
2559
|
return hasText && '8px';
|
|
2554
|
-
}, palette.white, mixins.transition('fill', '250ms'), getButtonStyles, function (
|
|
2555
|
-
var iconColor =
|
|
2560
|
+
}, palette.white, mixins.transition('fill', '250ms'), getButtonStyles, function (_ref8) {
|
|
2561
|
+
var iconColor = _ref8.iconColor;
|
|
2556
2562
|
return getColor(iconColor);
|
|
2557
|
-
}, function (
|
|
2558
|
-
var styles =
|
|
2563
|
+
}, function (_ref9) {
|
|
2564
|
+
var styles = _ref9.styles;
|
|
2559
2565
|
return styles;
|
|
2560
2566
|
})
|
|
2561
2567
|
};
|
|
@@ -2618,7 +2624,7 @@
|
|
|
2618
2624
|
displayName: "styles__Input",
|
|
2619
2625
|
componentId: "sc-18bfcwf-1"
|
|
2620
2626
|
})(["opacity:0;position:absolute;cursor:pointer;"]),
|
|
2621
|
-
iconCheckStyles: styled$
|
|
2627
|
+
iconCheckStyles: styled$f.css(["transform:translateY(-5%);fill:", ";", ""], getColor('white'), function (props) {
|
|
2622
2628
|
return !!props.rounded && "\n\t\t\tflex-shrink: 0;\n\t\t\tpadding-right: 1px;\n\t\t";
|
|
2623
2629
|
})
|
|
2624
2630
|
};
|
|
@@ -2708,20 +2714,10 @@
|
|
|
2708
2714
|
var statusColor = function statusColor(props) {
|
|
2709
2715
|
var checked = props.checked,
|
|
2710
2716
|
disabled = props.disabled;
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
case disabled:
|
|
2717
|
-
return palette.grey;
|
|
2718
|
-
|
|
2719
|
-
case checked:
|
|
2720
|
-
return palette.blue;
|
|
2721
|
-
|
|
2722
|
-
default:
|
|
2723
|
-
return palette.darkGrey;
|
|
2724
|
-
}
|
|
2717
|
+
if (disabled && checked) return palette.blueDisabled;
|
|
2718
|
+
if (disabled) return palette.grey;
|
|
2719
|
+
if (checked) return palette.blue;
|
|
2720
|
+
return palette.darkGrey;
|
|
2725
2721
|
};
|
|
2726
2722
|
var Ball = styled__default["default"].div.withConfig({
|
|
2727
2723
|
displayName: "styles__Ball",
|
|
@@ -2729,7 +2725,7 @@
|
|
|
2729
2725
|
})(["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) {
|
|
2730
2726
|
return props.checked && "\n\t\t\tleft: 100%;\n\t\t\tmargin-left: -20px;\n\t\t";
|
|
2731
2727
|
});
|
|
2732
|
-
var iconCheckStyles = styled$
|
|
2728
|
+
var iconCheckStyles = styled$f.css(["position:absolute;fill:", ";", ""], function (props) {
|
|
2733
2729
|
return statusColor(props);
|
|
2734
2730
|
}, onlyPrint(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n\t\tfill: ", " !important;\n\t"])), function (props) {
|
|
2735
2731
|
return props.checked ? palette.black : palette.darkGrey;
|
|
@@ -2841,43 +2837,21 @@
|
|
|
2841
2837
|
isFloating = props.isFloating,
|
|
2842
2838
|
disabled = props.disabled,
|
|
2843
2839
|
error = props.error;
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
case error:
|
|
2850
|
-
return palette.statusRed;
|
|
2851
|
-
|
|
2852
|
-
case isFocused:
|
|
2853
|
-
return palette.blue;
|
|
2854
|
-
|
|
2855
|
-
case isFloating:
|
|
2856
|
-
return palette.darkGrey;
|
|
2857
|
-
|
|
2858
|
-
default:
|
|
2859
|
-
return palette.darkGreyPressed;
|
|
2860
|
-
}
|
|
2840
|
+
if (disabled) return palette.grey;
|
|
2841
|
+
if (error) return palette.statusRed;
|
|
2842
|
+
if (isFocused) return palette.blue;
|
|
2843
|
+
if (isFloating) return palette.darkGrey;
|
|
2844
|
+
return palette.darkGreyPressed;
|
|
2861
2845
|
};
|
|
2862
2846
|
|
|
2863
2847
|
var hoverAndFocusColor = function hoverAndFocusColor(props) {
|
|
2864
2848
|
var isFocused = props.isFocused,
|
|
2865
2849
|
disabled = props.disabled,
|
|
2866
2850
|
error = props.error;
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
case error:
|
|
2873
|
-
return palette.statusRed;
|
|
2874
|
-
|
|
2875
|
-
case isFocused:
|
|
2876
|
-
return palette.blue;
|
|
2877
|
-
|
|
2878
|
-
default:
|
|
2879
|
-
return palette.black;
|
|
2880
|
-
}
|
|
2851
|
+
if (disabled) return palette.grey;
|
|
2852
|
+
if (error) return palette.statusRed;
|
|
2853
|
+
if (isFocused) return palette.blue;
|
|
2854
|
+
return palette.black;
|
|
2881
2855
|
};
|
|
2882
2856
|
|
|
2883
2857
|
var styled$6 = {
|
|
@@ -2913,7 +2887,7 @@
|
|
|
2913
2887
|
}, function (_ref4) {
|
|
2914
2888
|
var hasIcon = _ref4.hasIcon;
|
|
2915
2889
|
return hasIcon && "padding-left: 32px;";
|
|
2916
|
-
}, mixins.placeholder(styled$
|
|
2890
|
+
}, mixins.placeholder(styled$f.css(["font-weight:400;color:", ";"], function (_ref5) {
|
|
2917
2891
|
var error = _ref5.error;
|
|
2918
2892
|
return error ? palette.statusRed : palette.darkGreyPressed;
|
|
2919
2893
|
})), function (props) {
|
|
@@ -3101,23 +3075,11 @@
|
|
|
3101
3075
|
isFloating = props.isFloating,
|
|
3102
3076
|
disabled = props.disabled,
|
|
3103
3077
|
error = props.error;
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
case error:
|
|
3110
|
-
return palette.statusRed;
|
|
3111
|
-
|
|
3112
|
-
case isFocused:
|
|
3113
|
-
return palette.blue;
|
|
3114
|
-
|
|
3115
|
-
case isFloating:
|
|
3116
|
-
return palette.darkGrey;
|
|
3117
|
-
|
|
3118
|
-
default:
|
|
3119
|
-
return palette.darkGreyPressed;
|
|
3120
|
-
}
|
|
3078
|
+
if (disabled) return palette.grey;
|
|
3079
|
+
if (error) return palette.statusRed;
|
|
3080
|
+
if (isFocused) return palette.blue;
|
|
3081
|
+
if (isFloating) return palette.darkGrey;
|
|
3082
|
+
return palette.darkGreyPressed;
|
|
3121
3083
|
};
|
|
3122
3084
|
|
|
3123
3085
|
var styled$5 = {
|
|
@@ -3132,7 +3094,7 @@
|
|
|
3132
3094
|
componentId: "sc-wtau65-1"
|
|
3133
3095
|
})(["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) {
|
|
3134
3096
|
return props.fullWidth ? '100%' : 'auto';
|
|
3135
|
-
}, mixins.placeholder(styled$
|
|
3097
|
+
}, mixins.placeholder(styled$f.css(["opacity:1;color:", ";"], function (props) {
|
|
3136
3098
|
return placeholderColor(props);
|
|
3137
3099
|
})), mixins.scrollbar(palette.grey, palette.base), palette.black, palette.blue, palette.blue, palette.white, palette.grey, palette.grey, function (props) {
|
|
3138
3100
|
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");
|
|
@@ -4686,20 +4648,13 @@
|
|
|
4686
4648
|
* @param {string | number} value
|
|
4687
4649
|
*/
|
|
4688
4650
|
var getHeight = function getHeight(value) {
|
|
4689
|
-
var
|
|
4690
|
-
if (!value) return
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
case 'full':
|
|
4698
|
-
measure = window.innerHeight - 250;
|
|
4699
|
-
break;
|
|
4700
|
-
}
|
|
4701
|
-
|
|
4702
|
-
return typeof value === 'number' ? value : measure;
|
|
4651
|
+
var defaultMeasure = 400;
|
|
4652
|
+
if (!value) return defaultMeasure;
|
|
4653
|
+
var heightValue = {
|
|
4654
|
+
large: 600,
|
|
4655
|
+
full: window.innerHeight - 250
|
|
4656
|
+
};
|
|
4657
|
+
return typeof value === 'number' ? value : heightValue[value] || defaultMeasure;
|
|
4703
4658
|
};
|
|
4704
4659
|
|
|
4705
4660
|
var HTML = function HTML(_ref) {
|
|
@@ -4803,14 +4758,14 @@
|
|
|
4803
4758
|
};
|
|
4804
4759
|
|
|
4805
4760
|
var verticalCommonStyles = function verticalCommonStyles(open) {
|
|
4806
|
-
return styled$
|
|
4761
|
+
return styled$f.css(["width:100%;", ";max-height:", ";left:0;right:0;"], function (_ref) {
|
|
4807
4762
|
var fullScreen = _ref.fullScreen;
|
|
4808
4763
|
return fullScreen && 'height: 100%';
|
|
4809
4764
|
}, open ? '100%' : 0);
|
|
4810
4765
|
};
|
|
4811
4766
|
|
|
4812
4767
|
var horizontalCommonStyles = function horizontalCommonStyles(open) {
|
|
4813
|
-
return styled$
|
|
4768
|
+
return styled$f.css(["height:100%;", ";max-width:", ";top:0;"], function (_ref2) {
|
|
4814
4769
|
var fullScreen = _ref2.fullScreen;
|
|
4815
4770
|
return fullScreen && 'width: 100%';
|
|
4816
4771
|
}, open ? '100%' : 0);
|
|
@@ -4819,16 +4774,16 @@
|
|
|
4819
4774
|
var setPosition = function setPosition(position, open) {
|
|
4820
4775
|
var positions = {
|
|
4821
4776
|
top: function top() {
|
|
4822
|
-
return styled$
|
|
4777
|
+
return styled$f.css(["", ";top:0;"], verticalCommonStyles(open));
|
|
4823
4778
|
},
|
|
4824
4779
|
bottom: function bottom() {
|
|
4825
|
-
return styled$
|
|
4780
|
+
return styled$f.css(["", ";bottom:0;"], verticalCommonStyles(open));
|
|
4826
4781
|
},
|
|
4827
4782
|
left: function left() {
|
|
4828
|
-
return styled$
|
|
4783
|
+
return styled$f.css(["", ";left:0;"], horizontalCommonStyles(open));
|
|
4829
4784
|
},
|
|
4830
4785
|
right: function right() {
|
|
4831
|
-
return styled$
|
|
4786
|
+
return styled$f.css(["", ";right:0;"], horizontalCommonStyles(open));
|
|
4832
4787
|
}
|
|
4833
4788
|
};
|
|
4834
4789
|
return positions[position];
|
|
@@ -4842,7 +4797,7 @@
|
|
|
4842
4797
|
open = _ref3.open,
|
|
4843
4798
|
transitionDuration = _ref3.transitionDuration;
|
|
4844
4799
|
var transitionTime = transitionDuration / 1000;
|
|
4845
|
-
return styled$
|
|
4800
|
+
return styled$f.css(["", ";", ";"], position && setPosition(position, open), transitionDuration && "transition: ".concat(getPropertyForTransition(position), " ").concat(transitionTime, "s ease"));
|
|
4846
4801
|
});
|
|
4847
4802
|
var Content = styled__default["default"].div.withConfig({
|
|
4848
4803
|
displayName: "styles__Content",
|