@janiscommerce/ui-web 0.16.0 → 0.18.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 +12 -0
- package/dist/index.umd.js +292 -215
- package/dist/index.umd.js.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -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$g, global.require$$1));
|
|
5
|
+
})(this, (function (exports, React, styled$g, 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$g);
|
|
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$g.css(["", "{", "}"], devices.mobile, styled$g.css.apply(void 0, arguments));
|
|
434
434
|
},
|
|
435
435
|
tablet: function tablet() {
|
|
436
|
-
return styled$
|
|
436
|
+
return styled$g.css(["", "{", "}"], devices.tablet, styled$g.css.apply(void 0, arguments));
|
|
437
437
|
},
|
|
438
438
|
tabletLg: function tabletLg() {
|
|
439
|
-
return styled$
|
|
439
|
+
return styled$g.css(["", "{", "}"], devices.tabletLg, styled$g.css.apply(void 0, arguments));
|
|
440
440
|
},
|
|
441
441
|
onlyDesktop: function onlyDesktop() {
|
|
442
|
-
return styled$
|
|
442
|
+
return styled$g.css(["", "{", "}"], devices.onlyDesktop, styled$g.css.apply(void 0, arguments));
|
|
443
443
|
},
|
|
444
444
|
desktopSm: function desktopSm() {
|
|
445
|
-
return styled$
|
|
445
|
+
return styled$g.css(["", "{", "}"], devices.desktopSm, styled$g.css.apply(void 0, arguments));
|
|
446
446
|
},
|
|
447
447
|
desktopLg: function desktopLg() {
|
|
448
|
-
return styled$
|
|
448
|
+
return styled$g.css(["", "{", "}"], devices.desktopLg, styled$g.css.apply(void 0, arguments));
|
|
449
449
|
},
|
|
450
450
|
onlyPrint: function onlyPrint() {
|
|
451
|
-
return styled$
|
|
451
|
+
return styled$g.css(["@media print{", "}"], styled$g.css.apply(void 0, arguments));
|
|
452
452
|
}
|
|
453
453
|
};
|
|
454
454
|
|
|
@@ -555,6 +555,7 @@
|
|
|
555
555
|
blueDisabled: '#93BBFF',
|
|
556
556
|
blueHover: '#5393FF',
|
|
557
557
|
bluePressed: '#1759FF',
|
|
558
|
+
blueAvailable: '#E4ECFA',
|
|
558
559
|
darkGrey: '#939598',
|
|
559
560
|
darkGreyHover: '#A8AAAC',
|
|
560
561
|
darkGreyPressed: '#747679',
|
|
@@ -566,6 +567,7 @@
|
|
|
566
567
|
greenPressed: '#54B039',
|
|
567
568
|
grey: '#D5D7DB',
|
|
568
569
|
greyHover: '#DDDFE2',
|
|
570
|
+
greyHoverLight: '#EAEBED',
|
|
569
571
|
greyPressed: '#C4C6CC',
|
|
570
572
|
lightBlue: '#08C4C4',
|
|
571
573
|
lightBlueHover: '#39CFCF',
|
|
@@ -573,12 +575,15 @@
|
|
|
573
575
|
lightGrey: '#E8EAF6',
|
|
574
576
|
lightGreyHover: '#F4F5FB',
|
|
575
577
|
lightGreyPressed: '#D0D3E3',
|
|
578
|
+
lightGreySelected: '#E4ECFA',
|
|
576
579
|
orange: '#FF8D10',
|
|
577
580
|
orangeHover: '#FFA33F',
|
|
581
|
+
orangeLight: '#ffead3',
|
|
578
582
|
orangePressed: '#FF6E08',
|
|
579
583
|
red: '#F13B70',
|
|
580
584
|
redHover: '#F3628C',
|
|
581
585
|
redPressed: '#EB2450',
|
|
586
|
+
redUnavailable: '#FFD9D9',
|
|
582
587
|
skyBlue: '#02BFFB',
|
|
583
588
|
skyBluePressed: '#00A6FA',
|
|
584
589
|
statusRed: '#FF4343',
|
|
@@ -634,7 +639,7 @@
|
|
|
634
639
|
return imageSizes[size] || imageSizes.small;
|
|
635
640
|
};
|
|
636
641
|
|
|
637
|
-
var styled$
|
|
642
|
+
var styled$f = {
|
|
638
643
|
SkeletonContainer: styled__default["default"].div.withConfig({
|
|
639
644
|
displayName: "styles__SkeletonContainer",
|
|
640
645
|
componentId: "sc-1xnupv9-0"
|
|
@@ -664,7 +669,7 @@
|
|
|
664
669
|
var skeletons = Array.from({
|
|
665
670
|
length: count
|
|
666
671
|
}, function (_, index) {
|
|
667
|
-
return /*#__PURE__*/React__default["default"].createElement(styled$
|
|
672
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$f.SkeletonContainer, {
|
|
668
673
|
key: index,
|
|
669
674
|
width: currentWidth,
|
|
670
675
|
height: currentHeight,
|
|
@@ -681,7 +686,7 @@
|
|
|
681
686
|
width: '100%'
|
|
682
687
|
};
|
|
683
688
|
|
|
684
|
-
var styled$
|
|
689
|
+
var styled$e = {
|
|
685
690
|
Image: styled__default["default"].img.withConfig({
|
|
686
691
|
displayName: "styles__Image",
|
|
687
692
|
componentId: "sc-uljfj3-0"
|
|
@@ -706,9 +711,9 @@
|
|
|
706
711
|
accelerate: 'cubic-bezier(0.4, 0.0, 1, 1)'
|
|
707
712
|
};
|
|
708
713
|
var mixins = {
|
|
709
|
-
flexCenter: styled$
|
|
714
|
+
flexCenter: styled$g.css(["display:flex;align-items:center;justify-content:center;"]),
|
|
710
715
|
placeholder: function placeholder(styles) {
|
|
711
|
-
return styled$
|
|
716
|
+
return styled$g.css(["&::-moz-placeholder{", "}&::-webkit-input-placeholder{", "}&:-moz-placeholder{", "}&:-ms-input-placeholder{", "}&::placeholder{", "}"], styles, styles, styles, styles, styles);
|
|
712
717
|
},
|
|
713
718
|
transition: function transition() {
|
|
714
719
|
var property = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'all';
|
|
@@ -716,14 +721,14 @@
|
|
|
716
721
|
var transitionProperty;
|
|
717
722
|
if (property.includes(',')) transitionProperty = "transition-property: ".concat(property);
|
|
718
723
|
var transition = "".concat(property.split(',')[0], " ").concat(time, " ").concat(timingFunctions.standard);
|
|
719
|
-
return styled$
|
|
724
|
+
return styled$g.css(["transition:", ";", ";"], transition, transitionProperty);
|
|
720
725
|
},
|
|
721
726
|
scrollbar: function scrollbar(thumbColor, shadowColor) {
|
|
722
|
-
return styled$
|
|
727
|
+
return styled$g.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 || viewsPalette.white, thumbColor);
|
|
723
728
|
}
|
|
724
729
|
};
|
|
725
730
|
|
|
726
|
-
var styled$
|
|
731
|
+
var styled$d = {
|
|
727
732
|
Initials: styled__default["default"].div.withConfig({
|
|
728
733
|
displayName: "styles__Initials",
|
|
729
734
|
componentId: "sc-qlu7od-0"
|
|
@@ -747,7 +752,7 @@
|
|
|
747
752
|
mainColor = _ref.mainColor,
|
|
748
753
|
imageSize = _ref.imageSize,
|
|
749
754
|
rounded = _ref.rounded;
|
|
750
|
-
return /*#__PURE__*/React__default["default"].createElement(styled$
|
|
755
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$d.Initials, {
|
|
751
756
|
color: mainColor,
|
|
752
757
|
size: imageSize,
|
|
753
758
|
rounded: rounded
|
|
@@ -834,7 +839,7 @@
|
|
|
834
839
|
imageSize: imageSize,
|
|
835
840
|
rounded: rounded
|
|
836
841
|
});
|
|
837
|
-
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(styled$
|
|
842
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(styled$e.Image, {
|
|
838
843
|
ref: imageRef,
|
|
839
844
|
src: url,
|
|
840
845
|
alt: "".concat(firstname, " ").concat(lastname),
|
|
@@ -861,6 +866,38 @@
|
|
|
861
866
|
mainColor: viewsPalette.grey
|
|
862
867
|
};
|
|
863
868
|
|
|
869
|
+
var _templateObject$4;
|
|
870
|
+
var styles = {
|
|
871
|
+
Svg: styled__default["default"].svg.withConfig({
|
|
872
|
+
displayName: "styles__Svg",
|
|
873
|
+
componentId: "sc-jf3e5i-0"
|
|
874
|
+
})(["fill:", ";", " ", ";"], function (props) {
|
|
875
|
+
return getColor(props.color);
|
|
876
|
+
}, mediaBreaks.onlyPrint(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n\t\t\tfill: ", ";\n\t\t"])), viewsPalette.darkGrey), function (props) {
|
|
877
|
+
return props.styles;
|
|
878
|
+
}),
|
|
879
|
+
Path: styled__default["default"].path.withConfig({
|
|
880
|
+
displayName: "styles__Path",
|
|
881
|
+
componentId: "sc-jf3e5i-1"
|
|
882
|
+
})(["fill:inherit;", ";"], function (props) {
|
|
883
|
+
return props.styles;
|
|
884
|
+
})
|
|
885
|
+
};
|
|
886
|
+
({
|
|
887
|
+
Grid: styled__default["default"].div.withConfig({
|
|
888
|
+
displayName: "styles__Grid",
|
|
889
|
+
componentId: "sc-jf3e5i-2"
|
|
890
|
+
})(["display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));grid-gap:15px;"]),
|
|
891
|
+
Item: styled__default["default"].div.withConfig({
|
|
892
|
+
displayName: "styles__Item",
|
|
893
|
+
componentId: "sc-jf3e5i-3"
|
|
894
|
+
})(["padding:5px;border:1px dashed #ccc;cursor:default;display:grid;justify-items:center;justify-content:center;grid-row-gap:5px;", ";& ", "{", ";}&:hover{color:", ";}&:hover ", "{fill:", ";}"], mixins.transition('color'), styles.Svg, mixins.transition('fill'), viewsPalette.blue, styles.Svg, viewsPalette.blue),
|
|
895
|
+
SearchInput: styled__default["default"].input.withConfig({
|
|
896
|
+
displayName: "styles__SearchInput",
|
|
897
|
+
componentId: "sc-jf3e5i-4"
|
|
898
|
+
})(["margin-bottom:10px;padding:5px;"])
|
|
899
|
+
});
|
|
900
|
+
|
|
864
901
|
var API_key = {
|
|
865
902
|
path: "M408.747 682.667h-85.333l-17.92 51.627h-41.387l85.333-222.72h34.56l85.333 222.72h-42.667zM333.227 651.093h64.427l-32.427-92.16z M531.2 651.947v82.773h-38.827v-222.72h85.333c1.405-0.083 3.049-0.13 4.704-0.13 20.832 0 39.92 7.465 54.736 19.865l-0.134-0.109c13.282 13.021 21.514 31.149 21.514 51.2s-8.233 38.179-21.503 51.189l-0.012 0.011c-15.119 11.289-34.176 18.075-54.817 18.075-1.88 0-3.746-0.056-5.598-0.167l0.255 0.012zM531.2 620.8h46.507c1.015 0.079 2.199 0.124 3.393 0.124 10.644 0 20.453-3.576 28.291-9.592l-0.11 0.081c6.632-6.639 10.734-15.807 10.734-25.933 0-0.783-0.025-1.561-0.073-2.332l0.005 0.106c0.017-0.437 0.027-0.95 0.027-1.466 0-10.706-4.24-20.421-11.132-27.559l0.011 0.012c-7.552-6.897-17.648-11.122-28.729-11.122-0.55 0-1.098 0.010-1.642 0.031l0.079-0.002h-47.36z M733.44 734.72h-38.4v-222.72h38.4z M873.813 113.493h-725.333c-34.83 0.478-62.91 28.708-63.147 63.551l-0 0.023v669.44c0 35.346 28.654 64 64 64v0h725.333c35.346 0 64-28.654 64-64v0-669.44c-0.239-35.165-28.8-63.579-63.999-63.579-0.301 0-0.601 0.002-0.9 0.006l0.045-0zM148.48 156.16h725.333c0.001-0 0.003-0 0.004-0 11.632 0 21.090 9.31 21.329 20.884l0 0.022v149.333h-767.147v-149.333c0.23-11.605 9.691-20.924 21.329-20.924 0.301 0 0.602 0.006 0.9 0.019l-0.043-0.001zM873.813 867.84h-725.333c-11.782 0-21.333-9.551-21.333-21.333v0-478.293h768.853v478.293c0 0.005 0 0.011 0 0.017 0 11.782-9.551 21.333-21.333 21.333-0.3 0-0.599-0.006-0.896-0.018l0.043 0.001z M200.96 277.333c0.127 0.002 0.277 0.003 0.427 0.003 16.966 0 30.72-13.754 30.72-30.72s-13.754-30.72-30.72-30.72c-16.965 0-30.718 13.752-30.72 30.717l-0 0c-0 0.001-0 0.002-0 0.003 0 16.816 13.512 30.477 30.271 30.717l0.023 0z M294.827 277.333c16.966 0 30.72-13.754 30.72-30.72s-13.754-30.72-30.72-30.72c-16.966 0-30.72 13.754-30.72 30.72v0c0 16.966 13.754 30.72 30.72 30.72h-0z M388.267 277.333c16.966 0 30.72-13.754 30.72-30.72s-13.754-30.72-30.72-30.72c-16.966 0-30.72 13.754-30.72 30.72h0c0.237 16.87 13.85 30.483 30.698 30.72l0.022 0z",
|
|
866
903
|
size: 24
|
|
@@ -2199,63 +2236,6 @@
|
|
|
2199
2236
|
zip_file: zip_file
|
|
2200
2237
|
};
|
|
2201
2238
|
|
|
2202
|
-
PropTypes.oneOfType([PropTypes.oneOf(Object.keys(icons)), PropTypes.bool]);
|
|
2203
|
-
PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.func]))]);
|
|
2204
|
-
var itemsCheckListPropTypes = PropTypes.arrayOf(PropTypes.shape({
|
|
2205
|
-
name: PropTypes.string.isRequired,
|
|
2206
|
-
label: PropTypes.string,
|
|
2207
|
-
translateLabel: PropTypes.bool,
|
|
2208
|
-
value: PropTypes.number
|
|
2209
|
-
}));
|
|
2210
|
-
var groupsCheckListPropTypes = PropTypes.arrayOf(PropTypes.shape({
|
|
2211
|
-
name: PropTypes.string.isRequired,
|
|
2212
|
-
label: PropTypes.string,
|
|
2213
|
-
translateLabel: PropTypes.bool,
|
|
2214
|
-
items: itemsCheckListPropTypes
|
|
2215
|
-
}));
|
|
2216
|
-
PropTypes.arrayOf(PropTypes.shape({
|
|
2217
|
-
name: PropTypes.string.isRequired,
|
|
2218
|
-
label: PropTypes.string,
|
|
2219
|
-
translateLabel: PropTypes.bool,
|
|
2220
|
-
groups: groupsCheckListPropTypes
|
|
2221
|
-
}));
|
|
2222
|
-
PropTypes.shape({
|
|
2223
|
-
status: PropTypes.number
|
|
2224
|
-
});
|
|
2225
|
-
PropTypes.oneOfType([PropTypes.array, PropTypes.string, PropTypes.shape({})]);
|
|
2226
|
-
|
|
2227
|
-
var _templateObject$4;
|
|
2228
|
-
var styles = {
|
|
2229
|
-
Svg: styled__default["default"].svg.withConfig({
|
|
2230
|
-
displayName: "styles__Svg",
|
|
2231
|
-
componentId: "sc-jf3e5i-0"
|
|
2232
|
-
})(["fill:", ";", " ", ";"], function (props) {
|
|
2233
|
-
return getColor(props.color);
|
|
2234
|
-
}, mediaBreaks.onlyPrint(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n\t\t\tfill: ", ";\n\t\t"])), viewsPalette.darkGrey), function (props) {
|
|
2235
|
-
return props.styles;
|
|
2236
|
-
}),
|
|
2237
|
-
Path: styled__default["default"].path.withConfig({
|
|
2238
|
-
displayName: "styles__Path",
|
|
2239
|
-
componentId: "sc-jf3e5i-1"
|
|
2240
|
-
})(["fill:inherit;", ";"], function (props) {
|
|
2241
|
-
return props.styles;
|
|
2242
|
-
})
|
|
2243
|
-
};
|
|
2244
|
-
({
|
|
2245
|
-
Grid: styled__default["default"].div.withConfig({
|
|
2246
|
-
displayName: "styles__Grid",
|
|
2247
|
-
componentId: "sc-jf3e5i-2"
|
|
2248
|
-
})(["display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));grid-gap:15px;"]),
|
|
2249
|
-
Item: styled__default["default"].div.withConfig({
|
|
2250
|
-
displayName: "styles__Item",
|
|
2251
|
-
componentId: "sc-jf3e5i-3"
|
|
2252
|
-
})(["padding:5px;border:1px dashed #ccc;cursor:default;display:grid;justify-items:center;justify-content:center;grid-row-gap:5px;", ";& ", "{", ";}&:hover{color:", ";}&:hover ", "{fill:", ";}"], mixins.transition('color'), styles.Svg, mixins.transition('fill'), viewsPalette.blue, styles.Svg, viewsPalette.blue),
|
|
2253
|
-
SearchInput: styled__default["default"].input.withConfig({
|
|
2254
|
-
displayName: "styles__SearchInput",
|
|
2255
|
-
componentId: "sc-jf3e5i-4"
|
|
2256
|
-
})(["margin-bottom:10px;padding:5px;"])
|
|
2257
|
-
});
|
|
2258
|
-
|
|
2259
2239
|
var _excluded$8 = ["color", "name", "size", "styles", "pathStyles", "width", "height", "viewBox"];
|
|
2260
2240
|
|
|
2261
2241
|
var Icon = function Icon(_ref) {
|
|
@@ -2293,6 +2273,216 @@
|
|
|
2293
2273
|
viewBox: '0 0 1024 1024'
|
|
2294
2274
|
};
|
|
2295
2275
|
|
|
2276
|
+
var _templateObject$3;
|
|
2277
|
+
var styled$c = {
|
|
2278
|
+
Chip: styled__default["default"].button.withConfig({
|
|
2279
|
+
displayName: "styles__Chip",
|
|
2280
|
+
componentId: "sc-1vnh4co-0"
|
|
2281
|
+
})(["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) {
|
|
2282
|
+
return !props.onlyIcon ? '0 12px' : '0';
|
|
2283
|
+
}, function (props) {
|
|
2284
|
+
return props.clickable ? 'pointer' : 'default';
|
|
2285
|
+
}, viewsPalette.black, function (props) {
|
|
2286
|
+
return !props.onlyIcon ? '32px' : '36px';
|
|
2287
|
+
}, function (props) {
|
|
2288
|
+
return props.onlyIcon && '36px';
|
|
2289
|
+
}, function (props) {
|
|
2290
|
+
return !props.onlyIcon ? '50px' : '50%';
|
|
2291
|
+
}, function (props) {
|
|
2292
|
+
return props.clickable || props.hasLink ? 'auto' : 'none';
|
|
2293
|
+
}, function (props) {
|
|
2294
|
+
return !props.onlyIcon && 'margin-right: 8px';
|
|
2295
|
+
}, function (props) {
|
|
2296
|
+
switch (props.variant) {
|
|
2297
|
+
case 'outlined':
|
|
2298
|
+
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 ? viewsPalette.blue : '#EAEBED', props.selected ? viewsPalette.blue : viewsPalette.black, viewsPalette.lightGreyHover, props.selected ? viewsPalette.blue : viewsPalette.black, viewsPalette.blue, viewsPalette.blue, viewsPalette.blue);
|
|
2299
|
+
|
|
2300
|
+
case 'contained':
|
|
2301
|
+
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 ? viewsPalette.blue : viewsPalette.lightGreyHover, props.selected ? viewsPalette.white : viewsPalette.black, props.selected ? viewsPalette.white : viewsPalette.black, props.selected ? viewsPalette.white : viewsPalette.darkGrey, props.selected ? viewsPalette.blueHover : viewsPalette.lightGrey, props.selected ? viewsPalette.white : viewsPalette.black, viewsPalette.blue, viewsPalette.white, viewsPalette.white, viewsPalette.grey, viewsPalette.grey);
|
|
2302
|
+
|
|
2303
|
+
case 'status':
|
|
2304
|
+
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'));
|
|
2305
|
+
|
|
2306
|
+
default:
|
|
2307
|
+
return '';
|
|
2308
|
+
}
|
|
2309
|
+
}, function (props) {
|
|
2310
|
+
return props.styles;
|
|
2311
|
+
}, function (props) {
|
|
2312
|
+
return props.borderColor && "border: solid 1px ".concat(getColor(props.borderColor), ";");
|
|
2313
|
+
}, function (props) {
|
|
2314
|
+
return props.backgroundColor && "background-color: ".concat(getColor(props.backgroundColor), ";");
|
|
2315
|
+
}, function (props) {
|
|
2316
|
+
return props.textColor && "color: ".concat(getColor(props.textColor), ";");
|
|
2317
|
+
}, mediaBreaks.onlyPrint(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteral(["\n\t\t\tborder: 1px solid ", ";\n\t\t"])), viewsPalette.darkGrey)),
|
|
2318
|
+
iconPathStyles: styled$g.css(["", ";"], mixins.transition('fill')),
|
|
2319
|
+
DeleteButton: styled__default["default"].button.withConfig({
|
|
2320
|
+
displayName: "styles__DeleteButton",
|
|
2321
|
+
componentId: "sc-1vnh4co-1"
|
|
2322
|
+
})(["width:16px;height:16px;margin-left:12px;"]),
|
|
2323
|
+
deleteButtonPathStyles: styled$g.css(["", ";"], mixins.transition('fill')),
|
|
2324
|
+
Children: styled__default["default"].div.withConfig({
|
|
2325
|
+
displayName: "styles__Children",
|
|
2326
|
+
componentId: "sc-1vnh4co-2"
|
|
2327
|
+
})(["text-overflow:ellipsis;overflow:hidden;"])
|
|
2328
|
+
};
|
|
2329
|
+
|
|
2330
|
+
var _excluded$7 = ["backgroundColor", "borderColor", "children", "disabled", "icon", "iconColor", "onClick", "onDelete", "selected", "textColor", "variant", "hasLink"];
|
|
2331
|
+
|
|
2332
|
+
var Chip = function Chip(_ref) {
|
|
2333
|
+
var backgroundColor = _ref.backgroundColor,
|
|
2334
|
+
borderColor = _ref.borderColor,
|
|
2335
|
+
children = _ref.children,
|
|
2336
|
+
disabled = _ref.disabled,
|
|
2337
|
+
icon = _ref.icon,
|
|
2338
|
+
iconColor = _ref.iconColor,
|
|
2339
|
+
onClick = _ref.onClick,
|
|
2340
|
+
onDelete = _ref.onDelete,
|
|
2341
|
+
selected = _ref.selected,
|
|
2342
|
+
textColor = _ref.textColor,
|
|
2343
|
+
variant = _ref.variant,
|
|
2344
|
+
hasLink = _ref.hasLink,
|
|
2345
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
2346
|
+
|
|
2347
|
+
if (!children && !icon) return null;
|
|
2348
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$c.Chip, _extends$1({
|
|
2349
|
+
as: props.onClick ? 'button' : 'div',
|
|
2350
|
+
backgroundColor: backgroundColor,
|
|
2351
|
+
borderColor: borderColor,
|
|
2352
|
+
hasIcon: !!icon,
|
|
2353
|
+
disabled: disabled,
|
|
2354
|
+
clickable: (onClick || onDelete) && !disabled,
|
|
2355
|
+
onClick: disabled ? undefined : onClick,
|
|
2356
|
+
selected: selected,
|
|
2357
|
+
textColor: textColor,
|
|
2358
|
+
variant: variant,
|
|
2359
|
+
iconColor: iconColor,
|
|
2360
|
+
hasLink: hasLink,
|
|
2361
|
+
onlyIcon: !children && icon
|
|
2362
|
+
}, props), icon && /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
2363
|
+
className: "chip-icon",
|
|
2364
|
+
name: icon,
|
|
2365
|
+
color: iconColor,
|
|
2366
|
+
pathStyles: styled$c.iconPathStyles
|
|
2367
|
+
}), children && /*#__PURE__*/React__default["default"].createElement(styled$c.Children, null, children), onDelete && /*#__PURE__*/React__default["default"].createElement(styled$c.DeleteButton, {
|
|
2368
|
+
type: "button",
|
|
2369
|
+
onClick: onDelete
|
|
2370
|
+
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
2371
|
+
color: "black",
|
|
2372
|
+
pathStyles: styled$c.deleteButtonPathStyles,
|
|
2373
|
+
className: "delete-button",
|
|
2374
|
+
name: "cross_circle_flat",
|
|
2375
|
+
size: 16
|
|
2376
|
+
})));
|
|
2377
|
+
};
|
|
2378
|
+
|
|
2379
|
+
Chip.defaultProps = {
|
|
2380
|
+
backgroundColor: '',
|
|
2381
|
+
borderColor: '',
|
|
2382
|
+
disabled: false,
|
|
2383
|
+
iconColor: 'grey',
|
|
2384
|
+
selected: false,
|
|
2385
|
+
textColor: '',
|
|
2386
|
+
variant: 'outlined',
|
|
2387
|
+
hasLink: false
|
|
2388
|
+
};
|
|
2389
|
+
|
|
2390
|
+
var styled$b = {
|
|
2391
|
+
AvatarGroup: styled__default["default"](Chip).withConfig({
|
|
2392
|
+
displayName: "styles__AvatarGroup",
|
|
2393
|
+
componentId: "sc-1jnt2lr-0"
|
|
2394
|
+
})(["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) {
|
|
2395
|
+
var showFull = _ref.showFull,
|
|
2396
|
+
backgroundColor = _ref.backgroundColor;
|
|
2397
|
+
return showFull ? styled$g.css(["height:45px;padding-left:9px;padding-right:9px;max-width:inherit;&:hover,&:active{background:", ";}"], backgroundColor || viewsPalette.white) : styled$g.css(["height:33px;padding-left:5px;padding-right:5px;cursor:pointer;"]);
|
|
2398
|
+
}, function (_ref2) {
|
|
2399
|
+
var backgroundColor = _ref2.backgroundColor;
|
|
2400
|
+
return backgroundColor || viewsPalette.white;
|
|
2401
|
+
}, function (_ref3) {
|
|
2402
|
+
var inactive = _ref3.inactive;
|
|
2403
|
+
return inactive && "\n &:hover {\n background: ".concat(viewsPalette.white, ";\n }\n &:active {\n border-color: #EAEBED;\n }\n ");
|
|
2404
|
+
})
|
|
2405
|
+
};
|
|
2406
|
+
|
|
2407
|
+
var AvatarList = function AvatarList(_ref) {
|
|
2408
|
+
var userList = _ref.userList,
|
|
2409
|
+
hasExtraCount = _ref.hasExtraCount,
|
|
2410
|
+
extraCount = _ref.extraCount,
|
|
2411
|
+
showFull = _ref.showFull;
|
|
2412
|
+
return userList.map(function (_ref2, index) {
|
|
2413
|
+
var firstname = _ref2.firstname,
|
|
2414
|
+
lastname = _ref2.lastname,
|
|
2415
|
+
url = _ref2.url,
|
|
2416
|
+
id = _ref2.id,
|
|
2417
|
+
mainColor = _ref2.mainColor;
|
|
2418
|
+
if (hasExtraCount && index < extraCount) return null;
|
|
2419
|
+
return /*#__PURE__*/React__default["default"].createElement(Avatar, {
|
|
2420
|
+
key: id,
|
|
2421
|
+
firstname: firstname,
|
|
2422
|
+
lastname: lastname,
|
|
2423
|
+
url: url,
|
|
2424
|
+
size: showFull ? 'large' : 'small',
|
|
2425
|
+
mainColor: mainColor
|
|
2426
|
+
});
|
|
2427
|
+
});
|
|
2428
|
+
};
|
|
2429
|
+
|
|
2430
|
+
var AvatarGroup = function AvatarGroup(_ref) {
|
|
2431
|
+
var users = _ref.users,
|
|
2432
|
+
usersToDisplay = _ref.usersToDisplay,
|
|
2433
|
+
showFull = _ref.showFull,
|
|
2434
|
+
badgeColor = _ref.badgeColor;
|
|
2435
|
+
var extraCount = users.length > usersToDisplay ? users.length - usersToDisplay : 0;
|
|
2436
|
+
var hasExtraCount = extraCount > 0;
|
|
2437
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$b.AvatarGroup, {
|
|
2438
|
+
disabled: true,
|
|
2439
|
+
showFull: showFull
|
|
2440
|
+
}, /*#__PURE__*/React__default["default"].createElement(AvatarList, {
|
|
2441
|
+
userList: users,
|
|
2442
|
+
hasExtraCount: hasExtraCount,
|
|
2443
|
+
extraCount: extraCount,
|
|
2444
|
+
showFull: showFull
|
|
2445
|
+
}), hasExtraCount && /*#__PURE__*/React__default["default"].createElement(Avatar, {
|
|
2446
|
+
firstname: "+",
|
|
2447
|
+
lastname: "".concat(extraCount),
|
|
2448
|
+
mainColor: badgeColor,
|
|
2449
|
+
size: showFull ? 'large' : 'small'
|
|
2450
|
+
}));
|
|
2451
|
+
};
|
|
2452
|
+
|
|
2453
|
+
AvatarGroup.defaultProps = {
|
|
2454
|
+
badgeColor: viewsPalette.blue,
|
|
2455
|
+
users: [],
|
|
2456
|
+
usersToDisplay: 5,
|
|
2457
|
+
showFull: false
|
|
2458
|
+
};
|
|
2459
|
+
var AvatarGroup$1 = /*#__PURE__*/React__default["default"].memo(AvatarGroup);
|
|
2460
|
+
|
|
2461
|
+
PropTypes.oneOfType([PropTypes.oneOf(Object.keys(icons)), PropTypes.bool]);
|
|
2462
|
+
PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.func]))]);
|
|
2463
|
+
var itemsCheckListPropTypes = PropTypes.arrayOf(PropTypes.shape({
|
|
2464
|
+
name: PropTypes.string.isRequired,
|
|
2465
|
+
label: PropTypes.string,
|
|
2466
|
+
translateLabel: PropTypes.bool,
|
|
2467
|
+
value: PropTypes.number
|
|
2468
|
+
}));
|
|
2469
|
+
var groupsCheckListPropTypes = PropTypes.arrayOf(PropTypes.shape({
|
|
2470
|
+
name: PropTypes.string.isRequired,
|
|
2471
|
+
label: PropTypes.string,
|
|
2472
|
+
translateLabel: PropTypes.bool,
|
|
2473
|
+
items: itemsCheckListPropTypes
|
|
2474
|
+
}));
|
|
2475
|
+
PropTypes.arrayOf(PropTypes.shape({
|
|
2476
|
+
name: PropTypes.string.isRequired,
|
|
2477
|
+
label: PropTypes.string,
|
|
2478
|
+
translateLabel: PropTypes.bool,
|
|
2479
|
+
groups: groupsCheckListPropTypes
|
|
2480
|
+
}));
|
|
2481
|
+
PropTypes.shape({
|
|
2482
|
+
status: PropTypes.number
|
|
2483
|
+
});
|
|
2484
|
+
PropTypes.oneOfType([PropTypes.array, PropTypes.string, PropTypes.shape({})]);
|
|
2485
|
+
|
|
2296
2486
|
var validColors = ['black', 'blue', 'darkGrey', 'fizzGreen', 'green', 'grey', 'lightBlue', 'lightGrey', 'orange', 'red', 'statusRed', 'white', 'yellow'];
|
|
2297
2487
|
var white = viewsPalette.white,
|
|
2298
2488
|
grey = viewsPalette.grey,
|
|
@@ -2313,7 +2503,7 @@
|
|
|
2313
2503
|
};
|
|
2314
2504
|
|
|
2315
2505
|
var commonStyles = function commonStyles(iconColor, fontColor, color) {
|
|
2316
|
-
return styled$
|
|
2506
|
+
return styled$g.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);
|
|
2317
2507
|
};
|
|
2318
2508
|
|
|
2319
2509
|
var getButtonStyles = function getButtonStyles(_ref) {
|
|
@@ -2323,10 +2513,10 @@
|
|
|
2323
2513
|
iconColor = _ref.iconColor;
|
|
2324
2514
|
var variantStyles = {
|
|
2325
2515
|
contained: function contained() {
|
|
2326
|
-
return styled$
|
|
2516
|
+
return styled$g.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);
|
|
2327
2517
|
},
|
|
2328
2518
|
outlined: function outlined() {
|
|
2329
|
-
return styled$
|
|
2519
|
+
return styled$g.css(["", ";border:1px solid ", ";"], commonStyles(iconColor, fontColor, color), getColor(grey));
|
|
2330
2520
|
},
|
|
2331
2521
|
cleaned: function cleaned() {
|
|
2332
2522
|
return commonStyles(iconColor, fontColor, color);
|
|
@@ -2335,7 +2525,7 @@
|
|
|
2335
2525
|
return variantStyles[variant] || '';
|
|
2336
2526
|
};
|
|
2337
2527
|
|
|
2338
|
-
var styled$
|
|
2528
|
+
var styled$a = {
|
|
2339
2529
|
Button: styled__default["default"].button.withConfig({
|
|
2340
2530
|
displayName: "styles__Button",
|
|
2341
2531
|
componentId: "sc-buf2do-0"
|
|
@@ -2368,7 +2558,7 @@
|
|
|
2368
2558
|
})
|
|
2369
2559
|
};
|
|
2370
2560
|
|
|
2371
|
-
var _excluded$
|
|
2561
|
+
var _excluded$6 = ["children", "color", "hideLabel", "icon", "iconColor", "iconSize", "fontColor", "rounded", "styles", "variant", "disabled"];
|
|
2372
2562
|
|
|
2373
2563
|
var Button = function Button(_ref) {
|
|
2374
2564
|
var children = _ref.children,
|
|
@@ -2382,9 +2572,9 @@
|
|
|
2382
2572
|
styles = _ref.styles,
|
|
2383
2573
|
variant = _ref.variant,
|
|
2384
2574
|
disabled = _ref.disabled,
|
|
2385
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2575
|
+
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
2386
2576
|
|
|
2387
|
-
return /*#__PURE__*/React__default["default"].createElement(styled$
|
|
2577
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$a.Button, _extends$1({
|
|
2388
2578
|
color: color,
|
|
2389
2579
|
iconColor: iconColor || fontColor,
|
|
2390
2580
|
fontColor: fontColor,
|
|
@@ -2409,7 +2599,7 @@
|
|
|
2409
2599
|
disabled: false
|
|
2410
2600
|
};
|
|
2411
2601
|
|
|
2412
|
-
var styled$
|
|
2602
|
+
var styled$9 = {
|
|
2413
2603
|
Container: styled__default["default"].label.withConfig({
|
|
2414
2604
|
displayName: "styles__Container",
|
|
2415
2605
|
componentId: "sc-18bfcwf-0"
|
|
@@ -2426,12 +2616,12 @@
|
|
|
2426
2616
|
displayName: "styles__Input",
|
|
2427
2617
|
componentId: "sc-18bfcwf-1"
|
|
2428
2618
|
})(["opacity:0;position:absolute;cursor:pointer;"]),
|
|
2429
|
-
iconCheckStyles: styled$
|
|
2619
|
+
iconCheckStyles: styled$g.css(["transform:translateY(-5%);fill:", ";", ""], getColor('white'), function (props) {
|
|
2430
2620
|
return !!props.rounded && "\n\t\t\tflex-shrink: 0;\n\t\t\tpadding-right: 1px;\n\t\t";
|
|
2431
2621
|
})
|
|
2432
2622
|
};
|
|
2433
2623
|
|
|
2434
|
-
var _excluded$
|
|
2624
|
+
var _excluded$5 = ["autoComplete", "disabled", "defaultChecked", "onChange", "rounded", "styles", "value"];
|
|
2435
2625
|
|
|
2436
2626
|
var Checkbox = function Checkbox(_ref) {
|
|
2437
2627
|
var autoComplete = _ref.autoComplete,
|
|
@@ -2441,7 +2631,7 @@
|
|
|
2441
2631
|
rounded = _ref.rounded,
|
|
2442
2632
|
styles = _ref.styles,
|
|
2443
2633
|
value = _ref.value,
|
|
2444
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2634
|
+
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
2445
2635
|
|
|
2446
2636
|
var _useState = React.useState(!!value || defaultChecked),
|
|
2447
2637
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -2456,18 +2646,18 @@
|
|
|
2456
2646
|
|
|
2457
2647
|
var _props$checked = props.checked,
|
|
2458
2648
|
conntroledChecked = _props$checked === void 0 ? checked : _props$checked;
|
|
2459
|
-
return /*#__PURE__*/React__default["default"].createElement(styled$
|
|
2649
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$9.Container, {
|
|
2460
2650
|
checked: conntroledChecked,
|
|
2461
2651
|
rounded: rounded,
|
|
2462
2652
|
styles: styles
|
|
2463
|
-
}, /*#__PURE__*/React__default["default"].createElement(styled$
|
|
2653
|
+
}, /*#__PURE__*/React__default["default"].createElement(styled$9.Input, _extends$1({}, props, {
|
|
2464
2654
|
type: "checkbox",
|
|
2465
2655
|
disabled: disabled,
|
|
2466
2656
|
autoComplete: autoComplete ? 'on' : 'off',
|
|
2467
2657
|
onChange: handleChange
|
|
2468
2658
|
})), /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
2469
2659
|
name: "check_bold",
|
|
2470
|
-
styles: styled$
|
|
2660
|
+
styles: styled$9.iconCheckStyles,
|
|
2471
2661
|
rounded: rounded
|
|
2472
2662
|
}));
|
|
2473
2663
|
};
|
|
@@ -2479,120 +2669,6 @@
|
|
|
2479
2669
|
}
|
|
2480
2670
|
};
|
|
2481
2671
|
|
|
2482
|
-
var _templateObject$3;
|
|
2483
|
-
var styled$9 = {
|
|
2484
|
-
Chip: styled__default["default"].button.withConfig({
|
|
2485
|
-
displayName: "styles__Chip",
|
|
2486
|
-
componentId: "sc-1vnh4co-0"
|
|
2487
|
-
})(["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) {
|
|
2488
|
-
return !props.onlyIcon ? '0 12px' : '0';
|
|
2489
|
-
}, function (props) {
|
|
2490
|
-
return props.clickable ? 'pointer' : 'default';
|
|
2491
|
-
}, viewsPalette.black, function (props) {
|
|
2492
|
-
return !props.onlyIcon ? '32px' : '36px';
|
|
2493
|
-
}, function (props) {
|
|
2494
|
-
return props.onlyIcon && '36px';
|
|
2495
|
-
}, function (props) {
|
|
2496
|
-
return !props.onlyIcon ? '50px' : '50%';
|
|
2497
|
-
}, function (props) {
|
|
2498
|
-
return props.clickable || props.hasLink ? 'auto' : 'none';
|
|
2499
|
-
}, function (props) {
|
|
2500
|
-
return !props.onlyIcon && 'margin-right: 8px';
|
|
2501
|
-
}, function (props) {
|
|
2502
|
-
switch (props.variant) {
|
|
2503
|
-
case 'outlined':
|
|
2504
|
-
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:", ";}"], props.selected ? viewsPalette.blue : '#EAEBED', props.selected ? viewsPalette.blue : viewsPalette.black, viewsPalette.lightGreyHover, props.selected ? viewsPalette.blue : viewsPalette.black, viewsPalette.blue, viewsPalette.blue, viewsPalette.blue);
|
|
2505
|
-
|
|
2506
|
-
case 'contained':
|
|
2507
|
-
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:", ";}"], props.selected ? viewsPalette.blue : viewsPalette.lightGreyHover, props.selected ? viewsPalette.white : viewsPalette.black, props.selected ? viewsPalette.white : viewsPalette.black, props.selected ? viewsPalette.white : viewsPalette.darkGrey, props.selected ? viewsPalette.blueHover : viewsPalette.lightGrey, props.selected ? viewsPalette.white : viewsPalette.black, viewsPalette.blue, viewsPalette.white, viewsPalette.white, viewsPalette.grey, viewsPalette.grey);
|
|
2508
|
-
|
|
2509
|
-
case 'status':
|
|
2510
|
-
return styled$f.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'));
|
|
2511
|
-
|
|
2512
|
-
default:
|
|
2513
|
-
return '';
|
|
2514
|
-
}
|
|
2515
|
-
}, function (props) {
|
|
2516
|
-
return props.styles;
|
|
2517
|
-
}, function (props) {
|
|
2518
|
-
return props.borderColor && "border: solid 1px ".concat(getColor(props.borderColor), ";");
|
|
2519
|
-
}, function (props) {
|
|
2520
|
-
return props.backgroundColor && "background-color: ".concat(getColor(props.backgroundColor), ";");
|
|
2521
|
-
}, function (props) {
|
|
2522
|
-
return props.textColor && "color: ".concat(getColor(props.textColor), ";");
|
|
2523
|
-
}, mediaBreaks.onlyPrint(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteral(["\n\t\t\tborder: 1px solid ", ";\n\t\t"])), viewsPalette.darkGrey)),
|
|
2524
|
-
iconPathStyles: styled$f.css(["", ";"], mixins.transition('fill')),
|
|
2525
|
-
DeleteButton: styled__default["default"].button.withConfig({
|
|
2526
|
-
displayName: "styles__DeleteButton",
|
|
2527
|
-
componentId: "sc-1vnh4co-1"
|
|
2528
|
-
})(["width:16px;height:16px;margin-left:12px;"]),
|
|
2529
|
-
deleteButtonPathStyles: styled$f.css(["", ";"], mixins.transition('fill')),
|
|
2530
|
-
Children: styled__default["default"].div.withConfig({
|
|
2531
|
-
displayName: "styles__Children",
|
|
2532
|
-
componentId: "sc-1vnh4co-2"
|
|
2533
|
-
})(["text-overflow:ellipsis;overflow:hidden;"])
|
|
2534
|
-
};
|
|
2535
|
-
|
|
2536
|
-
var _excluded$5 = ["backgroundColor", "borderColor", "children", "disabled", "icon", "iconColor", "onClick", "onDelete", "selected", "textColor", "variant", "hasLink"];
|
|
2537
|
-
|
|
2538
|
-
var Chip = function Chip(_ref) {
|
|
2539
|
-
var backgroundColor = _ref.backgroundColor,
|
|
2540
|
-
borderColor = _ref.borderColor,
|
|
2541
|
-
children = _ref.children,
|
|
2542
|
-
disabled = _ref.disabled,
|
|
2543
|
-
icon = _ref.icon,
|
|
2544
|
-
iconColor = _ref.iconColor,
|
|
2545
|
-
onClick = _ref.onClick,
|
|
2546
|
-
onDelete = _ref.onDelete,
|
|
2547
|
-
selected = _ref.selected,
|
|
2548
|
-
textColor = _ref.textColor,
|
|
2549
|
-
variant = _ref.variant,
|
|
2550
|
-
hasLink = _ref.hasLink,
|
|
2551
|
-
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
2552
|
-
|
|
2553
|
-
if (!children && !icon) return null;
|
|
2554
|
-
return /*#__PURE__*/React__default["default"].createElement(styled$9.Chip, _extends$1({
|
|
2555
|
-
as: props.onClick ? 'button' : 'div',
|
|
2556
|
-
backgroundColor: backgroundColor,
|
|
2557
|
-
borderColor: borderColor,
|
|
2558
|
-
hasIcon: !!icon,
|
|
2559
|
-
disabled: disabled,
|
|
2560
|
-
clickable: (onClick || onDelete) && !disabled,
|
|
2561
|
-
onClick: disabled ? undefined : onClick,
|
|
2562
|
-
selected: selected,
|
|
2563
|
-
textColor: textColor,
|
|
2564
|
-
variant: variant,
|
|
2565
|
-
iconColor: iconColor,
|
|
2566
|
-
hasLink: hasLink,
|
|
2567
|
-
onlyIcon: !children && icon
|
|
2568
|
-
}, props), icon && /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
2569
|
-
className: "chip-icon",
|
|
2570
|
-
name: icon,
|
|
2571
|
-
color: iconColor,
|
|
2572
|
-
pathStyles: styled$9.iconPathStyles
|
|
2573
|
-
}), children && /*#__PURE__*/React__default["default"].createElement(styled$9.Children, null, children), onDelete && /*#__PURE__*/React__default["default"].createElement(styled$9.DeleteButton, {
|
|
2574
|
-
type: "button",
|
|
2575
|
-
onClick: onDelete
|
|
2576
|
-
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
2577
|
-
color: "black",
|
|
2578
|
-
pathStyles: styled$9.deleteButtonPathStyles,
|
|
2579
|
-
className: "delete-button",
|
|
2580
|
-
name: "cross_circle_flat",
|
|
2581
|
-
size: 16
|
|
2582
|
-
})));
|
|
2583
|
-
};
|
|
2584
|
-
|
|
2585
|
-
Chip.defaultProps = {
|
|
2586
|
-
backgroundColor: '',
|
|
2587
|
-
borderColor: '',
|
|
2588
|
-
disabled: false,
|
|
2589
|
-
iconColor: 'grey',
|
|
2590
|
-
selected: false,
|
|
2591
|
-
textColor: '',
|
|
2592
|
-
variant: 'outlined',
|
|
2593
|
-
hasLink: false
|
|
2594
|
-
};
|
|
2595
|
-
|
|
2596
2672
|
var styled$8 = {
|
|
2597
2673
|
Wrapper: styled__default["default"].div.withConfig({
|
|
2598
2674
|
displayName: "styles__Wrapper",
|
|
@@ -2651,7 +2727,7 @@
|
|
|
2651
2727
|
})(["width:16px;height:16px;border-radius:50%;position:absolute;top:4px;left:4px;background-color:", ";transition:all ", " 0.2s;", ""], viewsPalette.white, timingFunctions$1.standard, function (props) {
|
|
2652
2728
|
return props.checked && "\n\t\t\tleft: 100%;\n\t\t\tmargin-left: -20px;\n\t\t";
|
|
2653
2729
|
});
|
|
2654
|
-
var iconCheckStyles = styled$
|
|
2730
|
+
var iconCheckStyles = styled$g.css(["position:absolute;fill:", ";", ""], function (props) {
|
|
2655
2731
|
return statusColor(props);
|
|
2656
2732
|
}, onlyPrint(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n\t\tfill: ", " !important;\n\t"])), function (props) {
|
|
2657
2733
|
return props.checked ? viewsPalette.black : viewsPalette.darkGrey;
|
|
@@ -2835,7 +2911,7 @@
|
|
|
2835
2911
|
}, function (_ref4) {
|
|
2836
2912
|
var hasIcon = _ref4.hasIcon;
|
|
2837
2913
|
return hasIcon && "padding-left: 32px;";
|
|
2838
|
-
}, mixins.placeholder(styled$
|
|
2914
|
+
}, mixins.placeholder(styled$g.css(["font-weight:400;color:", ";"], function (_ref5) {
|
|
2839
2915
|
var error = _ref5.error;
|
|
2840
2916
|
return error ? viewsPalette.statusRed : viewsPalette.darkGreyPressed;
|
|
2841
2917
|
})), function (props) {
|
|
@@ -3054,7 +3130,7 @@
|
|
|
3054
3130
|
componentId: "sc-wtau65-1"
|
|
3055
3131
|
})(["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;}", " ", ""], viewsPalette.grey, fontSize, viewsPalette.black, mixins.transition('color,border-color', '0.2s'), function (props) {
|
|
3056
3132
|
return props.fullWidth ? '100%' : 'auto';
|
|
3057
|
-
}, mixins.placeholder(styled$
|
|
3133
|
+
}, mixins.placeholder(styled$g.css(["opacity:1;color:", ";"], function (props) {
|
|
3058
3134
|
return placeholderColor(props);
|
|
3059
3135
|
})), mixins.scrollbar(viewsPalette.grey, viewsPalette.base), viewsPalette.black, viewsPalette.blue, viewsPalette.blue, viewsPalette.white, viewsPalette.grey, viewsPalette.grey, function (props) {
|
|
3060
3136
|
return props.error && "\n\t\t\t&, &:hover, &:focus {\n\t\t\t\tborder-color: ".concat(viewsPalette.statusRed, "\n\t\t\t}\n\t\t");
|
|
@@ -4725,14 +4801,14 @@
|
|
|
4725
4801
|
};
|
|
4726
4802
|
|
|
4727
4803
|
var verticalCommonStyles = function verticalCommonStyles(open) {
|
|
4728
|
-
return styled$
|
|
4804
|
+
return styled$g.css(["width:100%;", ";max-height:", ";left:0;right:0;"], function (_ref) {
|
|
4729
4805
|
var fullScreen = _ref.fullScreen;
|
|
4730
4806
|
return fullScreen && 'height: 100%';
|
|
4731
4807
|
}, open ? '100%' : 0);
|
|
4732
4808
|
};
|
|
4733
4809
|
|
|
4734
4810
|
var horizontalCommonStyles = function horizontalCommonStyles(open) {
|
|
4735
|
-
return styled$
|
|
4811
|
+
return styled$g.css(["height:100%;", ";max-width:", ";top:0;"], function (_ref2) {
|
|
4736
4812
|
var fullScreen = _ref2.fullScreen;
|
|
4737
4813
|
return fullScreen && 'width: 100%';
|
|
4738
4814
|
}, open ? '100%' : 0);
|
|
@@ -4741,16 +4817,16 @@
|
|
|
4741
4817
|
var setPosition = function setPosition(position, open) {
|
|
4742
4818
|
var positions = {
|
|
4743
4819
|
top: function top() {
|
|
4744
|
-
return styled$
|
|
4820
|
+
return styled$g.css(["", ";top:0;"], verticalCommonStyles(open));
|
|
4745
4821
|
},
|
|
4746
4822
|
bottom: function bottom() {
|
|
4747
|
-
return styled$
|
|
4823
|
+
return styled$g.css(["", ";bottom:0;"], verticalCommonStyles(open));
|
|
4748
4824
|
},
|
|
4749
4825
|
left: function left() {
|
|
4750
|
-
return styled$
|
|
4826
|
+
return styled$g.css(["", ";left:0;"], horizontalCommonStyles(open));
|
|
4751
4827
|
},
|
|
4752
4828
|
right: function right() {
|
|
4753
|
-
return styled$
|
|
4829
|
+
return styled$g.css(["", ";right:0;"], horizontalCommonStyles(open));
|
|
4754
4830
|
}
|
|
4755
4831
|
};
|
|
4756
4832
|
return positions[position];
|
|
@@ -4764,7 +4840,7 @@
|
|
|
4764
4840
|
open = _ref3.open,
|
|
4765
4841
|
transitionDuration = _ref3.transitionDuration;
|
|
4766
4842
|
var transitionTime = transitionDuration / 1000;
|
|
4767
|
-
return styled$
|
|
4843
|
+
return styled$g.css(["", ";", ";"], position && setPosition(position, open), transitionDuration && "transition: ".concat(getPropertyForTransition(position), " ").concat(transitionTime, "s ease"));
|
|
4768
4844
|
});
|
|
4769
4845
|
var Content = styled__default["default"].div.withConfig({
|
|
4770
4846
|
displayName: "styles__Content",
|
|
@@ -4841,6 +4917,7 @@
|
|
|
4841
4917
|
};
|
|
4842
4918
|
|
|
4843
4919
|
exports.Avatar = Avatar;
|
|
4920
|
+
exports.AvatarGroup = AvatarGroup$1;
|
|
4844
4921
|
exports.Button = Button;
|
|
4845
4922
|
exports.Checkbox = Checkbox;
|
|
4846
4923
|
exports.Chip = Chip;
|