@commonsku/styles 1.16.9 → 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) {
@@ -1149,6 +1153,13 @@ function DownloadIcon(_a) {
1149
1153
  React__default.createElement("path", { d: "M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2Zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5Z", fill: color }));
1150
1154
  }
1151
1155
 
1156
+ function UploadIcon(_a) {
1157
+ var _b = _a.color, color = _b === void 0 ? teal.main : _b, _c = _a.size, size = _c === void 0 ? "medium" : _c, _d = _a.altText, altText = _d === void 0 ? "Upload" : _d, props = __rest(_a, ["color", "size", "altText"]);
1158
+ return React__default.createElement(SVG, __assign({ size: size, "aria-labelledby": "UploadIcon" }, props),
1159
+ React__default.createElement("title", { id: "UploadIcon" }, altText),
1160
+ React__default.createElement("path", { d: "M18 15V18H6V15H4V18C4 19.1 4.9 20 6 20H18C19.1 20 20 19.1 20 18V15H18ZM7 9L8.41 10.41L11 7.83V16H13V7.83L15.59 10.41L17 9L12 4L7 9Z", fill: color }));
1161
+ }
1162
+
1152
1163
  function MarketingStatusIcon(_a) {
1153
1164
  var _b = _a.color, color = _b === void 0 ? teal.main : _b, _c = _a.size, size = _c === void 0 ? "medium" : _c, _d = _a.approved, approved = _d === void 0 ? false : _d, _e = _a.altText, altText = _e === void 0 ? "Marketing not allowed" : _e, props = __rest(_a, ["color", "size", "approved", "altText"]);
1154
1165
  approved ? altText = "Marketing allowed" : altText = "Marketing not allowed";
@@ -2597,6 +2608,49 @@ function DoubleArrowIcon(_a) {
2597
2608
  React__default.createElement("path", { d: directionPaths[1], fill: color })));
2598
2609
  }
2599
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
+
2600
2654
  var avatarSizes = {
2601
2655
  tiny: {
2602
2656
  size: '24px',
@@ -2802,6 +2856,20 @@ function DropzonedPreviews(_a) {
2802
2856
  ? React__default.createElement(ThumbsContainer, null, thumbs)
2803
2857
  : React__default.createElement(PlaceHolder, null, placeholder))));
2804
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
+ }
2805
2873
  var templateObject_1$c, templateObject_2$7, templateObject_3$3, templateObject_4$2, templateObject_5$2, templateObject_6$1;
2806
2874
 
2807
2875
  /*
@@ -6608,7 +6676,8 @@ var parseCskuStyles = function (p) {
6608
6676
  });
6609
6677
  return __spreadArray([stylesObj, sizeStylesObj], stylesArr, true);
6610
6678
  };
6611
- 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;
6612
6681
 
6613
6682
  var Grid = styled__default.div(function (p) {
6614
6683
  var params = {
@@ -6772,8 +6841,56 @@ var ConfirmPopup = function (props) {
6772
6841
  }, disabled: disableDelete }, "Delete"))));
6773
6842
  };
6774
6843
 
6775
- 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 " : ''; });
6776
- 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;
6777
6894
 
6778
6895
  var CalendarDayBody = function (_a) {
6779
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"]);
@@ -6788,8 +6905,8 @@ var CalendarDayBody = function (_a) {
6788
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)));
6789
6906
  };
6790
6907
 
6791
- 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"])));
6792
- 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;
6793
6910
 
6794
6911
  var CalendarDaysBody = function (_a) {
6795
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"]);
@@ -6801,12 +6918,12 @@ var CalendarDaysBody = function (_a) {
6801
6918
  }))));
6802
6919
  };
6803
6920
 
6804
- 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"])));
6805
- var templateObject_1$Q;
6806
-
6807
- 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"])));
6808
6922
  var templateObject_1$R;
6809
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
+
6810
6927
  var CalendarDaysHeader = function (_a) {
6811
6928
  var currentMonth = _a.currentMonth, selectedDate = _a.selectedDate, weekend = _a.weekend;
6812
6929
  var startDate = dateFns.startOfWeek(currentMonth, { weekStartsOn: 1 });
@@ -6820,12 +6937,12 @@ var CalendarDaysHeader = function (_a) {
6820
6937
  })));
6821
6938
  };
6822
6939
 
6823
- 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"])));
6824
- var templateObject_1$S;
6825
-
6826
- 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"])));
6827
6941
  var templateObject_1$T;
6828
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
+
6829
6946
  var DefaultCalendarFooter = function (_a) {
6830
6947
  var currentWeek = _a.currentWeek;
6831
6948
  return (React__default.createElement(HeaderWrapper, { middle: true },
@@ -6857,7 +6974,7 @@ var TasksCalendarDayBody = function (_a) {
6857
6974
  React__default.createElement(CalendarTask, __assign({}, t, { date: undefined })))); })));
6858
6975
  };
6859
6976
 
6860
- 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"])));
6861
6978
  var CalendarIconDatePicker = React__default.forwardRef(function (_a, ref) {
6862
6979
  var value = _a.value, onClick = _a.onClick;
6863
6980
  return (React__default.createElement("span", { ref: ref, onClick: onClick },
@@ -6930,7 +7047,7 @@ var TasksCalendarHeader = function (_a) {
6930
7047
  } }, "+ Add Task")
6931
7048
  : null)));
6932
7049
  };
6933
- var templateObject_1$U;
7050
+ var templateObject_1$V;
6934
7051
 
6935
7052
  var TasksCalendarFooter = function (_a) {
6936
7053
  var currentWeek = _a.currentWeek, _b = _a.tasks, tasks = _b === void 0 ? [] : _b;
@@ -7282,7 +7399,7 @@ var scrollbarWidth = function () {
7282
7399
  return scrollbarWidth;
7283
7400
  };
7284
7401
 
7285
- 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 ?
7286
7403
  "border: ".concat(typeof p.bordered === 'string'
7287
7404
  ? p.bordered
7288
7405
  : "1px solid ".concat(getThemeColor(p, 'tableBorder', '#edf2f5')), ";")
@@ -7372,7 +7489,64 @@ function SimpleWindowedTable(_a) {
7372
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)),
7373
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));
7374
7491
  }
7375
- 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;
7376
7550
 
7377
7551
  Object.defineProperty(exports, 'components', {
7378
7552
  enumerable: true,
@@ -7447,6 +7621,7 @@ exports.ColumnSelectIcon = ColumnSelectIcon;
7447
7621
  exports.CommentIcon = CommentIcon;
7448
7622
  exports.CommunityIcon = CommunityIcon;
7449
7623
  exports.CompletedCheckmarkIcon = CompletedCheckmarkIcon;
7624
+ exports.ConfirmAlertPopup = ConfirmAlertPopup;
7450
7625
  exports.ConfirmPopup = ConfirmPopup;
7451
7626
  exports.ConnectedIcon = ConnectedIcon;
7452
7627
  exports.ConnectedPlusIcon = ConnectedPlusIcon;
@@ -7474,6 +7649,7 @@ exports.Dropdown = Dropdown;
7474
7649
  exports.DropdownItem = DropdownItem;
7475
7650
  exports.Dropzoned = Dropzoned;
7476
7651
  exports.DropzonedPreviews = DropzonedPreviews;
7652
+ exports.DropzonedSimple = DropzonedSimple;
7477
7653
  exports.EPOIcon = EPOIcon;
7478
7654
  exports.EditIcon = EditIcon;
7479
7655
  exports.EllipsisIcon = EllipsisIcon;
@@ -7508,6 +7684,7 @@ exports.HelpIcon = HelpIcon;
7508
7684
  exports.HistoryIcon = HistoryIcon;
7509
7685
  exports.IconButton = IconButton;
7510
7686
  exports.IconDoc = IconDoc;
7687
+ exports.ImageIcon = ImageIcon;
7511
7688
  exports.Img = Img;
7512
7689
  exports.InfoIcon = InfoIcon;
7513
7690
  exports.Input = Input;
@@ -7633,7 +7810,10 @@ exports.Thermometer = Thermometer;
7633
7810
  exports.TilesIcon = TilesIcon;
7634
7811
  exports.Toggle = Toggle;
7635
7812
  exports.ToggleLink = ToggleLink;
7813
+ exports.ToggleSwitch = ToggleSwitch;
7814
+ exports.ToggleSwitchStyled = ToggleSwitchStyled;
7636
7815
  exports.TrashIcon = TrashIcon;
7816
+ exports.UploadIcon = UploadIcon;
7637
7817
  exports.UserIcon = UserIcon;
7638
7818
  exports.UsersIcon = UsersIcon;
7639
7819
  exports.VirtualTable = VirtualTable;