@commonsku/styles 1.16.10 → 1.16.12-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/dist/index.js CHANGED
@@ -369,10 +369,14 @@ var getUnit = function (measurement) {
369
369
  var matchedMeasurement = measurement.match(/^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/);
370
370
  return matchedMeasurement ? matchedMeasurement[2] : "px";
371
371
  };
372
+ var isCalOrPercent = function (measurement) { return (measurement.endsWith('%') || measurement.includes('calc')); };
372
373
  var stripUnit = function (measurement) {
373
374
  return (typeof measurement === "number") ? measurement : parseFloat(measurement);
374
375
  };
375
- var parseMeasurement = function (measurement) { return stripUnit(measurement) + getUnit(measurement); };
376
+ var parseMeasurement = function (measurement) {
377
+ return typeof measurement === 'string' && isCalOrPercent(measurement)
378
+ ? measurement : stripUnit(measurement) + getUnit(measurement);
379
+ };
376
380
  var wait = function (time) {
377
381
  var timeoutId;
378
382
  var promise = new Promise(function (resolve) {
@@ -2604,6 +2608,49 @@ function DoubleArrowIcon(_a) {
2604
2608
  React__default.createElement("path", { d: directionPaths[1], fill: color })));
2605
2609
  }
2606
2610
 
2611
+ var iconSizes$5 = {
2612
+ tiny: {
2613
+ width: 16,
2614
+ height: 16,
2615
+ viewBox: "0 0 32 32",
2616
+ },
2617
+ small: {
2618
+ width: 24,
2619
+ height: 24,
2620
+ viewBox: "0 0 32 32",
2621
+ },
2622
+ medium: {
2623
+ width: 32,
2624
+ height: 32,
2625
+ viewBox: "0 0 32 32",
2626
+ },
2627
+ large: {
2628
+ width: 40,
2629
+ height: 40,
2630
+ viewBox: "0 0 32 32",
2631
+ },
2632
+ huge: {
2633
+ width: 48,
2634
+ height: 48,
2635
+ viewBox: "0 0 32 32",
2636
+ },
2637
+ default: {
2638
+ width: 32,
2639
+ height: 32,
2640
+ viewBox: "0 0 32 32",
2641
+ },
2642
+ };
2643
+ function ImageIcon(props) {
2644
+ var _a = props.color, color = _a === void 0 ? teal.main : _a, _b = props.size, size = _b === void 0 ? "medium" : _b, _c = props.altText, altText = _c === void 0 ? "ImageIcon" : _c, rest = __rest(props, ["color", "size", "altText"]);
2645
+ var id = _.uniqueId('clip0_1244_70960');
2646
+ return (React__default.createElement(SVG, __assign({ size: size, iconSizes: iconSizes$5, "aria-labelledby": altText, fill: "none" }, rest),
2647
+ React__default.createElement("g", { clipPath: "url(#".concat(id, ")") },
2648
+ React__default.createElement("path", { d: "M25.3333 6.66667V25.3333H6.66667V6.66667H25.3333ZM25.3333 4H6.66667C5.2 4 4 5.2 4 6.66667V25.3333C4 26.8 5.2 28 6.66667 28H25.3333C26.8 28 28 26.8 28 25.3333V6.66667C28 5.2 26.8 4 25.3333 4ZM18.8533 15.8133L14.8533 20.9733L12 17.52L8 22.6667H24L18.8533 15.8133Z", fill: color })),
2649
+ React__default.createElement("defs", null,
2650
+ React__default.createElement("clipPath", { id: id },
2651
+ React__default.createElement("rect", { width: "32", height: "32", fill: "white" })))));
2652
+ }
2653
+
2607
2654
  var avatarSizes = {
2608
2655
  tiny: {
2609
2656
  size: '24px',
@@ -2809,6 +2856,20 @@ function DropzonedPreviews(_a) {
2809
2856
  ? React__default.createElement(ThumbsContainer, null, thumbs)
2810
2857
  : React__default.createElement(PlaceHolder, null, placeholder))));
2811
2858
  }
2859
+ function DropzonedSimple(_a) {
2860
+ var accept = _a.accept, children = _a.children, props = __rest(_a, ["accept", "children"]);
2861
+ var _b = reactDropzone.useDropzone(__assign({ accept: accept }, props)), acceptedFiles = _b.acceptedFiles, getRootProps = _b.getRootProps, getInputProps = _b.getInputProps, isDragActive = _b.isDragActive, isDragAccept = _b.isDragAccept, isDragReject = _b.isDragReject;
2862
+ var Child = React__default.Children.only(children);
2863
+ if (!Child) {
2864
+ return null;
2865
+ }
2866
+ var ChildElem = React__default.cloneElement(Child, {
2867
+ acceptedFiles: acceptedFiles,
2868
+ inputProps: getInputProps(),
2869
+ rootProps: getRootProps({ isDragActive: isDragActive, isDragAccept: isDragAccept, isDragReject: isDragReject }),
2870
+ });
2871
+ return ChildElem;
2872
+ }
2812
2873
  var templateObject_1$c, templateObject_2$7, templateObject_3$3, templateObject_4$2, templateObject_5$2, templateObject_6$1;
2813
2874
 
2814
2875
  /*
@@ -6615,7 +6676,8 @@ var parseCskuStyles = function (p) {
6615
6676
  });
6616
6677
  return __spreadArray([stylesObj, sizeStylesObj], stylesArr, true);
6617
6678
  };
6618
- var Csku = styled__default.div(parseCskuStyles);
6679
+ var Csku = styled__default.div(templateObject_1$O || (templateObject_1$O = __makeTemplateObject(["\n", "\n ", "\n", "\n"], ["\n", "\n ", "\n", "\n"])), function (p) { return p.forceStyles ? '&&& {' : ''; }, parseCskuStyles, function (p) { return p.forceStyles ? '}' : ''; });
6680
+ var templateObject_1$O;
6619
6681
 
6620
6682
  var Grid = styled__default.div(function (p) {
6621
6683
  var params = {
@@ -6779,8 +6841,56 @@ var ConfirmPopup = function (props) {
6779
6841
  }, disabled: disableDelete }, "Delete"))));
6780
6842
  };
6781
6843
 
6782
- var StyledDayBody = styled__default(Col)(templateObject_1$O || (templateObject_1$O = __makeTemplateObject(["\n position: relative;\n height: auto;\n border-right: 1px solid #eee;\n overflow: hidden;\n cursor: pointer;\n background: #fff;\n transition: 0.25s ease-out;\n font-size: 1em;\n overflow-y: auto;\n\n &:last-child {\n border-right: none;\n }\n\n &:hover {\n background: #f9f9f9;\n transition: 0.5s ease-out;\n }\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"], ["\n position: relative;\n height: auto;\n border-right: 1px solid #eee;\n overflow: hidden;\n cursor: pointer;\n background: #fff;\n transition: 0.25s ease-out;\n font-size: 1em;\n overflow-y: auto;\n\n &:last-child {\n border-right: none;\n }\n\n &:hover {\n background: #f9f9f9;\n transition: 0.5s ease-out;\n }\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), function (p) { return p.selected ? "\n background: #f9f9f9;\n " : ''; }, function (p) { return p.today ? "\n background: #f9f9f9;\n " : ''; }, function (p) { return p.row ? "\n border-bottom: 1px solid #eee;\n " : ''; }, function (p) { return p.disabled ? "\n color: #ccc;\n pointer-events: none;\n " : ''; });
6783
- var templateObject_1$O;
6844
+ var ConfirmAlertPopup = function (props) {
6845
+ var _a = props.padding, padding = _a === void 0 ? '16px' : _a, _b = props.maxWidth, maxWidth = _b === void 0 ? 555 : _b, _c = props.title, title = _c === void 0 ? '' : _c, _d = props.children, children = _d === void 0 ? 'Are you sure you want to perform this action?' : _d, _e = props.cancelButtonContent, cancelButtonContent = _e === void 0 ? 'Cancel' : _e, _f = props.actionButtonContent, actionButtonContent = _f === void 0 ? 'Delete' : _f, _g = props.disableActionButton, disableActionButton = _g === void 0 ? false : _g, onAction = props.onAction, onClose = props.onClose;
6846
+ return (React__default.createElement(Popup, { width: 'auto', height: 'auto', padding: padding, style: { borderRadius: 10, maxWidth: maxWidth, }, noHeader: true, noCloseButton: true },
6847
+ title ? React__default.createElement(PopupTitle, null, title) : null,
6848
+ React__default.createElement(PopupContent, null, children),
6849
+ React__default.createElement(Row, { style: { justifyContent: 'center', marginTop: 16, } },
6850
+ React__default.createElement(Col, { xs: true, md: 5.75, mdStyle: { marginRight: 16 } },
6851
+ React__default.createElement(Button, { size: "medium", variant: 'secondary', onClick: function () {
6852
+ onClose && onClose();
6853
+ }, style: { width: '100%' } }, cancelButtonContent)),
6854
+ React__default.createElement(Col, { xs: true, md: 5.75, xsStyle: { marginTop: 16 }, mdStyle: { marginTop: 0 } },
6855
+ React__default.createElement(Button, { size: "medium", variant: disableActionButton ? 'disabled' : 'error', onClick: function () {
6856
+ onAction && onAction();
6857
+ }, disabled: disableActionButton, style: { width: '100%' } }, actionButtonContent)))));
6858
+ };
6859
+ var PopupTitle = function (_a) {
6860
+ var children = _a.children;
6861
+ return (React__default.createElement("h2", { style: {
6862
+ fontFamily: 'var(--font-family-bold)',
6863
+ fontSize: fontStyles.h2.fontSize,
6864
+ lineHeight: fontStyles.h2.lineHeight,
6865
+ color: 'var(--color-neutrals-90)',
6866
+ paddingBottom: 16,
6867
+ margin: 0,
6868
+ } }, children));
6869
+ };
6870
+ var PopupContent = function (_a) {
6871
+ var children = _a.children;
6872
+ return (React__default.createElement("div", { style: {
6873
+ background: colors.errors[10],
6874
+ color: colors.errors.main,
6875
+ padding: 16,
6876
+ } },
6877
+ React__default.createElement("div", { style: { display: 'flex', flexDirection: 'row', justifyContent: 'center' } },
6878
+ React__default.createElement("div", { style: {
6879
+ paddingRight: 16,
6880
+ verticalAlign: 'middle',
6881
+ alignSelf: 'center',
6882
+ } },
6883
+ React__default.createElement(AlertIcon, { size: 'medium', color: colors.errors[70] })),
6884
+ React__default.createElement("div", { style: {
6885
+ fontFamily: 'var(--font-family-regular)',
6886
+ fontSize: fontStyles.p.large.fontSize,
6887
+ lineHeight: fontStyles.p.medium.lineHeight,
6888
+ color: colors.errors.main,
6889
+ } }, children))));
6890
+ };
6891
+
6892
+ var StyledDayBody = styled__default(Col)(templateObject_1$P || (templateObject_1$P = __makeTemplateObject(["\n position: relative;\n height: auto;\n border-right: 1px solid #eee;\n overflow: hidden;\n cursor: pointer;\n background: #fff;\n transition: 0.25s ease-out;\n font-size: 1em;\n overflow-y: auto;\n\n &:last-child {\n border-right: none;\n }\n\n &:hover {\n background: #f9f9f9;\n transition: 0.5s ease-out;\n }\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"], ["\n position: relative;\n height: auto;\n border-right: 1px solid #eee;\n overflow: hidden;\n cursor: pointer;\n background: #fff;\n transition: 0.25s ease-out;\n font-size: 1em;\n overflow-y: auto;\n\n &:last-child {\n border-right: none;\n }\n\n &:hover {\n background: #f9f9f9;\n transition: 0.5s ease-out;\n }\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), function (p) { return p.selected ? "\n background: #f9f9f9;\n " : ''; }, function (p) { return p.today ? "\n background: #f9f9f9;\n " : ''; }, function (p) { return p.row ? "\n border-bottom: 1px solid #eee;\n " : ''; }, function (p) { return p.disabled ? "\n color: #ccc;\n pointer-events: none;\n " : ''; });
6893
+ var templateObject_1$P;
6784
6894
 
6785
6895
  var CalendarDayBody = function (_a) {
6786
6896
  var day = _a.day, selectedDate = _a.selectedDate, onClick = _a.onClick, children = _a.children, weekend = _a.weekend, props = __rest(_a, ["day", "selectedDate", "onClick", "children", "weekend"]);
@@ -6795,8 +6905,8 @@ var CalendarDayBody = function (_a) {
6795
6905
  return (React__default.createElement(StyledDayBody, __assign({ padded: true, totalCols: weekend ? 7 : 5, xs: 1, selected: isSelected, today: isToday, onClick: onClick, className: classNames }, props), children || React__default.createElement("span", { style: { padding: 10, } }, formattedDay)));
6796
6906
  };
6797
6907
 
6798
- var DaysBodyWrapper = styled__default.div(templateObject_1$P || (templateObject_1$P = __makeTemplateObject(["\n font-size: 1em;\n font-weight: 300;\n line-height: 1;\n color: #777;\n background: #f9f9f9;\n position: relative;\n border-bottom: 1px solid #eee;\n"], ["\n font-size: 1em;\n font-weight: 300;\n line-height: 1;\n color: #777;\n background: #f9f9f9;\n position: relative;\n border-bottom: 1px solid #eee;\n"])));
6799
- var templateObject_1$P;
6908
+ var DaysBodyWrapper = styled__default.div(templateObject_1$Q || (templateObject_1$Q = __makeTemplateObject(["\n font-size: 1em;\n font-weight: 300;\n line-height: 1;\n color: #777;\n background: #f9f9f9;\n position: relative;\n border-bottom: 1px solid #eee;\n"], ["\n font-size: 1em;\n font-weight: 300;\n line-height: 1;\n color: #777;\n background: #f9f9f9;\n position: relative;\n border-bottom: 1px solid #eee;\n"])));
6909
+ var templateObject_1$Q;
6800
6910
 
6801
6911
  var CalendarDaysBody = function (_a) {
6802
6912
  var _b = _a.days, days = _b === void 0 ? [] : _b, currentMonth = _a.currentMonth, selectedDate = _a.selectedDate, onClickDay = _a.onClickDay, components = _a.components, _c = _a.dayBodyProps, dayBodyProps = _c === void 0 ? {} : _c, _d = _a.weekend, weekend = _d === void 0 ? true : _d, props = __rest(_a, ["days", "currentMonth", "selectedDate", "onClickDay", "components", "dayBodyProps", "weekend"]);
@@ -6808,12 +6918,12 @@ var CalendarDaysBody = function (_a) {
6808
6918
  }))));
6809
6919
  };
6810
6920
 
6811
- var DaysHeaderWrapper = styled__default(Row)(templateObject_1$Q || (templateObject_1$Q = __makeTemplateObject(["\n text-transform: uppercase;\n font-weight: 400;\n color: #ccc;\n font-size: 70%;\n padding: 0.75em 0 !important;\n border-bottom: 1px solid #eee;\n"], ["\n text-transform: uppercase;\n font-weight: 400;\n color: #ccc;\n font-size: 70%;\n padding: 0.75em 0 !important;\n border-bottom: 1px solid #eee;\n"])));
6812
- var templateObject_1$Q;
6813
-
6814
- var StyledDayText = styled__default(Text)(templateObject_1$R || (templateObject_1$R = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) { return props.selected ? "\n border-radius: 15px;\n background: ".concat(colors.cta, ";\n color: white;\n font-weight: bold;\n padding: 0 5px;\n ") : ''; });
6921
+ var DaysHeaderWrapper = styled__default(Row)(templateObject_1$R || (templateObject_1$R = __makeTemplateObject(["\n text-transform: uppercase;\n font-weight: 400;\n color: #ccc;\n font-size: 70%;\n padding: 0.75em 0 !important;\n border-bottom: 1px solid #eee;\n"], ["\n text-transform: uppercase;\n font-weight: 400;\n color: #ccc;\n font-size: 70%;\n padding: 0.75em 0 !important;\n border-bottom: 1px solid #eee;\n"])));
6815
6922
  var templateObject_1$R;
6816
6923
 
6924
+ var StyledDayText = styled__default(Text)(templateObject_1$S || (templateObject_1$S = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) { return props.selected ? "\n border-radius: 15px;\n background: ".concat(colors.cta, ";\n color: white;\n font-weight: bold;\n padding: 0 5px;\n ") : ''; });
6925
+ var templateObject_1$S;
6926
+
6817
6927
  var CalendarDaysHeader = function (_a) {
6818
6928
  var currentMonth = _a.currentMonth, selectedDate = _a.selectedDate, weekend = _a.weekend;
6819
6929
  var startDate = dateFns.startOfWeek(currentMonth, { weekStartsOn: 1 });
@@ -6827,12 +6937,12 @@ var CalendarDaysHeader = function (_a) {
6827
6937
  })));
6828
6938
  };
6829
6939
 
6830
- var CalendarWrapper = styled__default.div(templateObject_1$S || (templateObject_1$S = __makeTemplateObject(["\n display: block;\n position: relative;\n width: 100%;\n background: #fff;\n .calendar-scroll {\n overflow-x: scroll;\n }\n .days-body-wrapper, .days-header-wrapper {\n min-width: 900px;\n }\n"], ["\n display: block;\n position: relative;\n width: 100%;\n background: #fff;\n .calendar-scroll {\n overflow-x: scroll;\n }\n .days-body-wrapper, .days-header-wrapper {\n min-width: 900px;\n }\n"])));
6831
- var templateObject_1$S;
6832
-
6833
- var HeaderWrapper = styled__default(Row)(templateObject_1$T || (templateObject_1$T = __makeTemplateObject(["\n width: 100%;\n padding: 1.75em 0 !important;\n border-bottom: 1px solid #eee;\n background: #fff;\n font-weight: 700;\n font-size: 100%;\n"], ["\n width: 100%;\n padding: 1.75em 0 !important;\n border-bottom: 1px solid #eee;\n background: #fff;\n font-weight: 700;\n font-size: 100%;\n"])));
6940
+ var CalendarWrapper = styled__default.div(templateObject_1$T || (templateObject_1$T = __makeTemplateObject(["\n display: block;\n position: relative;\n width: 100%;\n background: #fff;\n .calendar-scroll {\n overflow-x: scroll;\n }\n .days-body-wrapper, .days-header-wrapper {\n min-width: 900px;\n }\n"], ["\n display: block;\n position: relative;\n width: 100%;\n background: #fff;\n .calendar-scroll {\n overflow-x: scroll;\n }\n .days-body-wrapper, .days-header-wrapper {\n min-width: 900px;\n }\n"])));
6834
6941
  var templateObject_1$T;
6835
6942
 
6943
+ var HeaderWrapper = styled__default(Row)(templateObject_1$U || (templateObject_1$U = __makeTemplateObject(["\n width: 100%;\n padding: 1.75em 0 !important;\n border-bottom: 1px solid #eee;\n background: #fff;\n font-weight: 700;\n font-size: 100%;\n"], ["\n width: 100%;\n padding: 1.75em 0 !important;\n border-bottom: 1px solid #eee;\n background: #fff;\n font-weight: 700;\n font-size: 100%;\n"])));
6944
+ var templateObject_1$U;
6945
+
6836
6946
  var DefaultCalendarFooter = function (_a) {
6837
6947
  var currentWeek = _a.currentWeek;
6838
6948
  return (React__default.createElement(HeaderWrapper, { middle: true },
@@ -6864,7 +6974,7 @@ var TasksCalendarDayBody = function (_a) {
6864
6974
  React__default.createElement(CalendarTask, __assign({}, t, { date: undefined })))); })));
6865
6975
  };
6866
6976
 
6867
- var WeekNav = styled__default(Text)(templateObject_1$U || (templateObject_1$U = __makeTemplateObject(["\n display: inline-block;\n padding: 0;\n"], ["\n display: inline-block;\n padding: 0;\n"])));
6977
+ var WeekNav = styled__default(Text)(templateObject_1$V || (templateObject_1$V = __makeTemplateObject(["\n display: inline-block;\n padding: 0;\n"], ["\n display: inline-block;\n padding: 0;\n"])));
6868
6978
  var CalendarIconDatePicker = React__default.forwardRef(function (_a, ref) {
6869
6979
  var value = _a.value, onClick = _a.onClick;
6870
6980
  return (React__default.createElement("span", { ref: ref, onClick: onClick },
@@ -6937,7 +7047,7 @@ var TasksCalendarHeader = function (_a) {
6937
7047
  } }, "+ Add Task")
6938
7048
  : null)));
6939
7049
  };
6940
- var templateObject_1$U;
7050
+ var templateObject_1$V;
6941
7051
 
6942
7052
  var TasksCalendarFooter = function (_a) {
6943
7053
  var currentWeek = _a.currentWeek, _b = _a.tasks, tasks = _b === void 0 ? [] : _b;
@@ -7289,7 +7399,7 @@ var scrollbarWidth = function () {
7289
7399
  return scrollbarWidth;
7290
7400
  };
7291
7401
 
7292
- var SimpleWindowedTableStyles = styled__default.div(templateObject_1$V || (templateObject_1$V = __makeTemplateObject(["\npadding: 1rem;\n\n.table-list-rows {\n width: 100% !important;\n\n ", "\n}\n\n.table {\n display: inline-block;\n border-spacing: 0;\n width: 100%;\n min-width: 100% !important;\n\n ", "\n\n .header.tr, .table-footer.tr {\n width: 100% !important;\n min-width: 100% !important;\n overflow-x: hidden;\n }\n\n .tr {\n :last-child {\n .td {\n border-bottom: 0;\n }\n }\n }\n\n .th {\n border-bottom: 2px solid ", ";\n\n div {\n display: inline-block;\n }\n }\n\n .td {\n border-bottom: 1px solid ", ";\n }\n\n /* set hover styles */\n ", "\n\n /* row selected => if selectedRowStyle === true then set background color else set given styles */\n ", "\n\n .th,\n .td {\n margin: 0;\n padding: 0.5rem;\n }\n}\n"], ["\npadding: 1rem;\n\n.table-list-rows {\n width: 100% !important;\n\n ", "\n}\n\n.table {\n display: inline-block;\n border-spacing: 0;\n width: 100%;\n min-width: 100% !important;\n\n ", "\n\n .header.tr, .table-footer.tr {\n width: 100% !important;\n min-width: 100% !important;\n overflow-x: hidden;\n }\n\n .tr {\n :last-child {\n .td {\n border-bottom: 0;\n }\n }\n }\n\n .th {\n border-bottom: 2px solid ", ";\n\n div {\n display: inline-block;\n }\n }\n\n .td {\n border-bottom: 1px solid ", ";\n }\n\n /* set hover styles */\n ", "\n\n /* row selected => if selectedRowStyle === true then set background color else set given styles */\n ", "\n\n .th,\n .td {\n margin: 0;\n padding: 0.5rem;\n }\n}\n"])), function (p) { return p.rowClickable ? "\n .tr {\n cursor: pointer;\n }\n " : ''; }, function (p) { return p.bordered ?
7402
+ var SimpleWindowedTableStyles = styled__default.div(templateObject_1$W || (templateObject_1$W = __makeTemplateObject(["\npadding: 1rem;\n\n.table-list-rows {\n width: 100% !important;\n\n ", "\n}\n\n.table {\n display: inline-block;\n border-spacing: 0;\n width: 100%;\n min-width: 100% !important;\n\n ", "\n\n .header.tr, .table-footer.tr {\n width: 100% !important;\n min-width: 100% !important;\n overflow-x: hidden;\n }\n\n .tr {\n :last-child {\n .td {\n border-bottom: 0;\n }\n }\n }\n\n .th {\n border-bottom: 2px solid ", ";\n\n div {\n display: inline-block;\n }\n }\n\n .td {\n border-bottom: 1px solid ", ";\n }\n\n /* set hover styles */\n ", "\n\n /* row selected => if selectedRowStyle === true then set background color else set given styles */\n ", "\n\n .th,\n .td {\n margin: 0;\n padding: 0.5rem;\n }\n}\n"], ["\npadding: 1rem;\n\n.table-list-rows {\n width: 100% !important;\n\n ", "\n}\n\n.table {\n display: inline-block;\n border-spacing: 0;\n width: 100%;\n min-width: 100% !important;\n\n ", "\n\n .header.tr, .table-footer.tr {\n width: 100% !important;\n min-width: 100% !important;\n overflow-x: hidden;\n }\n\n .tr {\n :last-child {\n .td {\n border-bottom: 0;\n }\n }\n }\n\n .th {\n border-bottom: 2px solid ", ";\n\n div {\n display: inline-block;\n }\n }\n\n .td {\n border-bottom: 1px solid ", ";\n }\n\n /* set hover styles */\n ", "\n\n /* row selected => if selectedRowStyle === true then set background color else set given styles */\n ", "\n\n .th,\n .td {\n margin: 0;\n padding: 0.5rem;\n }\n}\n"])), function (p) { return p.rowClickable ? "\n .tr {\n cursor: pointer;\n }\n " : ''; }, function (p) { return p.bordered ?
7293
7403
  "border: ".concat(typeof p.bordered === 'string'
7294
7404
  ? p.bordered
7295
7405
  : "1px solid ".concat(getThemeColor(p, 'tableBorder', '#edf2f5')), ";")
@@ -7379,7 +7489,64 @@ function SimpleWindowedTable(_a) {
7379
7489
  React__default.createElement("div", __assign({}, getTableBodyProps()), rows.length === 0 && NoRowsFound ? React__default.createElement(NoRowsFound, null) : React__default.createElement(reactWindow.FixedSizeList, { height: height, itemCount: rows.length, itemSize: itemSize, width: totalColumnsWidth + scrollBarSize, className: "table-list-rows", outerRef: rowsRef, onScroll: onScroll, useIsScrolling: true }, RenderRow)),
7380
7490
  !hideFooter ? React__default.createElement("div", __assign({}, tableFooterProps, { className: "table-footer-wrapper ".concat(tableFooterProps.className || '') }), footerGroups.map(function (footerGroup) { return (React__default.createElement("div", __assign({}, getHeaderGroupProps(footerGroup, true), { className: "table-footer tr", ref: footerRef }), footerGroup.headers.map(function (column) { return (React__default.createElement("div", __assign({}, getHeaderProps(column, true)), column.render("Footer"))); }))); })) : null));
7381
7491
  }
7382
- var templateObject_1$V;
7492
+ var templateObject_1$W;
7493
+
7494
+ var toggleSizes$1 = {
7495
+ small: {
7496
+ 'font-family': fontStyles.button.small.fontFamily,
7497
+ 'font-size': fontStyles.button.small.fontSize,
7498
+ 'line-height': fontStyles.button.small.lineHeight,
7499
+ padding: '8px 12px',
7500
+ borderRadius: '4px',
7501
+ height: '15px',
7502
+ },
7503
+ medium: {
7504
+ 'font-family': fontStyles.button.medium.fontFamily,
7505
+ 'font-size': fontStyles.button.medium.fontSize,
7506
+ 'line-height': fontStyles.button.medium.lineHeight,
7507
+ padding: '8px 16px',
7508
+ borderRadius: '4px',
7509
+ height: '20px',
7510
+ },
7511
+ large: {
7512
+ 'font-family': fontStyles.button.large.fontFamily,
7513
+ 'font-size': fontStyles.button.large.fontSize,
7514
+ 'line-height': fontStyles.button.large.lineHeight,
7515
+ padding: '12px 24px',
7516
+ borderRadius: '4px',
7517
+ height: '35px',
7518
+ }
7519
+ };
7520
+ var createAnimationLeftStyle = function (p) {
7521
+ if (p.stretch) {
7522
+ return "calc(100% * 1.5px)";
7523
+ }
7524
+ return "".concat(stripUnit(toggleSizes$1[p.size || 'medium'].height) * 1.5, "px");
7525
+ };
7526
+ var ContainerStyled = styled__default(Csku)(templateObject_1$X || (templateObject_1$X = __makeTemplateObject(["\n &&& {\n position: relative;\n background: ", ";\n width: ", ";\n padding: 0.35rem;\n border-radius: 1.8rem;\n cursor: pointer;\n transition: background .3s;\n\n @keyframes switch-slide-to-right {\n from { left: 0; }\n to {\n left: ", ";\n }\n }\n \n @keyframes switch-slide-to-left {\n from {\n left: ", ";\n }\n to { left: 0; }\n }\n }"], ["\n &&& {\n position: relative;\n background: ", ";\n width: ", ";\n padding: 0.35rem;\n border-radius: 1.8rem;\n cursor: pointer;\n transition: background .3s;\n\n @keyframes switch-slide-to-right {\n from { left: 0; }\n to {\n left: ", ";\n }\n }\n \n @keyframes switch-slide-to-left {\n from {\n left: ", ";\n }\n to { left: 0; }\n }\n }"])), function (p) { return p.selected
7527
+ ? getThemeColor(p, 'teal.main', 'var(--color-primary1-main)')
7528
+ : getThemeColor(p, 'teal.20', colors.teal['20']); }, function (p) { return p.stretch
7529
+ ? '100%'
7530
+ : "".concat(stripUnit(toggleSizes$1[p.size || 'medium'].height) * 2.5, "px"); }, createAnimationLeftStyle, createAnimationLeftStyle);
7531
+ var ToggleSwitchDotStyled = styled__default(Csku)(templateObject_2$z || (templateObject_2$z = __makeTemplateObject(["\n &&& {\n position: relative;\n background: #FFFFFF;\n width: ", ";\n height: ", ";\n border-radius: 50%;\n\n animation: ", ";\n }\n"], ["\n &&& {\n position: relative;\n background: #FFFFFF;\n width: ", ";\n height: ", ";\n border-radius: 50%;\n\n animation: ", ";\n }\n"])), function (p) { return toggleSizes$1[p.size || 'medium'].height; }, function (p) { return toggleSizes$1[p.size || 'medium'].height; }, function (p) { return p.selected
7532
+ ? 'switch-slide-to-right .3s forwards 1'
7533
+ : 'switch-slide-to-left .3s forwards 1'; });
7534
+ var ToggleSwitchStyled = function (_a) {
7535
+ var onClick = _a.onClick, _b = _a.size, size = _b === void 0 ? 'medium' : _b, _c = _a.selected, selected = _c === void 0 ? false : _c, _d = _a.stretch, stretch = _d === void 0 ? false : _d, _e = _a.style, style = _e === void 0 ? {} : _e, props = __rest(_a, ["onClick", "size", "selected", "stretch", "style"]);
7536
+ return (React__default.createElement(ContainerStyled, __assign({ selected: selected, stretch: stretch, size: size, onClick: onClick, style: style }, props),
7537
+ React__default.createElement(ToggleSwitchDotStyled, { selected: selected, stretch: stretch, size: size })));
7538
+ };
7539
+ var ToggleSwitch = function (_a) {
7540
+ var _b = _a.size, size = _b === void 0 ? 'medium' : _b, _c = _a.initialSelected, initialSelected = _c === void 0 ? false : _c, _d = _a.stretch, stretch = _d === void 0 ? false : _d, onClick = _a.onClick, props = __rest(_a, ["size", "initialSelected", "stretch", "onClick"]);
7541
+ var _e = React.useState(initialSelected), state = _e[0], setState = _e[1];
7542
+ var handleToggle = function () {
7543
+ var value = !state;
7544
+ setState(value);
7545
+ onClick && onClick(value);
7546
+ };
7547
+ return (React__default.createElement(ToggleSwitchStyled, __assign({}, props, { selected: state, stretch: stretch, size: size, onClick: handleToggle })));
7548
+ };
7549
+ var templateObject_1$X, templateObject_2$z;
7383
7550
 
7384
7551
  Object.defineProperty(exports, 'components', {
7385
7552
  enumerable: true,
@@ -7454,6 +7621,7 @@ exports.ColumnSelectIcon = ColumnSelectIcon;
7454
7621
  exports.CommentIcon = CommentIcon;
7455
7622
  exports.CommunityIcon = CommunityIcon;
7456
7623
  exports.CompletedCheckmarkIcon = CompletedCheckmarkIcon;
7624
+ exports.ConfirmAlertPopup = ConfirmAlertPopup;
7457
7625
  exports.ConfirmPopup = ConfirmPopup;
7458
7626
  exports.ConnectedIcon = ConnectedIcon;
7459
7627
  exports.ConnectedPlusIcon = ConnectedPlusIcon;
@@ -7481,6 +7649,7 @@ exports.Dropdown = Dropdown;
7481
7649
  exports.DropdownItem = DropdownItem;
7482
7650
  exports.Dropzoned = Dropzoned;
7483
7651
  exports.DropzonedPreviews = DropzonedPreviews;
7652
+ exports.DropzonedSimple = DropzonedSimple;
7484
7653
  exports.EPOIcon = EPOIcon;
7485
7654
  exports.EditIcon = EditIcon;
7486
7655
  exports.EllipsisIcon = EllipsisIcon;
@@ -7515,6 +7684,7 @@ exports.HelpIcon = HelpIcon;
7515
7684
  exports.HistoryIcon = HistoryIcon;
7516
7685
  exports.IconButton = IconButton;
7517
7686
  exports.IconDoc = IconDoc;
7687
+ exports.ImageIcon = ImageIcon;
7518
7688
  exports.Img = Img;
7519
7689
  exports.InfoIcon = InfoIcon;
7520
7690
  exports.Input = Input;
@@ -7640,6 +7810,8 @@ exports.Thermometer = Thermometer;
7640
7810
  exports.TilesIcon = TilesIcon;
7641
7811
  exports.Toggle = Toggle;
7642
7812
  exports.ToggleLink = ToggleLink;
7813
+ exports.ToggleSwitch = ToggleSwitch;
7814
+ exports.ToggleSwitchStyled = ToggleSwitchStyled;
7643
7815
  exports.TrashIcon = TrashIcon;
7644
7816
  exports.UploadIcon = UploadIcon;
7645
7817
  exports.UserIcon = UserIcon;