@commonsku/styles 1.13.2 → 1.13.6

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.
Files changed (45) hide show
  1. package/dist/index.es.js +409 -89
  2. package/dist/index.es.js.map +1 -1
  3. package/dist/index.js +417 -89
  4. package/dist/index.js.map +1 -1
  5. package/dist/styles/Button.d.ts +3 -2
  6. package/dist/styles/Button.d.ts.map +1 -1
  7. package/dist/styles/Dropdown.d.ts +16 -13
  8. package/dist/styles/Dropdown.d.ts.map +1 -1
  9. package/dist/styles/MultiProgress.d.ts +2 -0
  10. package/dist/styles/MultiProgress.d.ts.map +1 -1
  11. package/dist/styles/Task.d.ts.map +1 -1
  12. package/dist/styles/Text.d.ts +1 -1
  13. package/dist/styles/Theme.d.ts +474 -0
  14. package/dist/styles/Theme.d.ts.map +1 -1
  15. package/dist/styles/calendar/DraggableTasksCalendar.d.ts.map +1 -1
  16. package/dist/styles/calendar/DroppableFooter.d.ts.map +1 -1
  17. package/dist/styles/calendar/StyledDayText.d.ts +1 -1
  18. package/dist/styles/calendar/TasksCalendar.d.ts.map +1 -1
  19. package/dist/styles/calendar/TasksCalendarHeader.d.ts +2 -1
  20. package/dist/styles/calendar/TasksCalendarHeader.d.ts.map +1 -1
  21. package/dist/styles/colors.d.ts +363 -0
  22. package/dist/styles/colors.d.ts.map +1 -0
  23. package/dist/styles/hooks/useCalendar.d.ts +1 -0
  24. package/dist/styles/hooks/useCalendar.d.ts.map +1 -1
  25. package/dist/styles/icons/BulletIcon.d.ts +8 -0
  26. package/dist/styles/icons/BulletIcon.d.ts.map +1 -0
  27. package/dist/styles/icons/CheckmarkIcon.d.ts +8 -0
  28. package/dist/styles/icons/CheckmarkIcon.d.ts.map +1 -0
  29. package/dist/styles/icons/ErrorIcon.d.ts +8 -0
  30. package/dist/styles/icons/ErrorIcon.d.ts.map +1 -0
  31. package/dist/styles/icons/LeftArrowIcon.d.ts +8 -0
  32. package/dist/styles/icons/LeftArrowIcon.d.ts.map +1 -0
  33. package/dist/styles/icons/RightArrowIcon.d.ts +8 -0
  34. package/dist/styles/icons/RightArrowIcon.d.ts.map +1 -0
  35. package/dist/styles/icons/SalesDownArrowIcon.d.ts +8 -0
  36. package/dist/styles/icons/SalesDownArrowIcon.d.ts.map +1 -0
  37. package/dist/styles/icons/SalesUpArrowIcon.d.ts +8 -0
  38. package/dist/styles/icons/SalesUpArrowIcon.d.ts.map +1 -0
  39. package/dist/styles/icons/index.d.ts +7 -0
  40. package/dist/styles/icons/index.d.ts.map +1 -1
  41. package/dist/styles/tables/SimpleWindowedTable.d.ts +22 -3
  42. package/dist/styles/tables/SimpleWindowedTable.d.ts.map +1 -1
  43. package/dist/styles/tables/types.d.ts +6 -1
  44. package/dist/styles/tables/types.d.ts.map +1 -1
  45. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -410,34 +410,235 @@ var templateObject_1$3, templateObject_2$3, templateObject_3;
410
410
  var GlobalStyle = styled.createGlobalStyle(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["\n body {\n font-family: ", ";\n }\n"], ["\n body {\n font-family: ", ";\n }\n"])), function (props) { return ___default.get(props, ['theme', 'fontFamily'], '"museo-sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif'); });
411
411
  var templateObject_1$4;
412
412
 
413
- var colors = {
414
- white: '#fff',
415
- black: '#000',
416
- primary: '#02c0da',
417
- cta: '#fa237c',
418
- primary0: '#DAE9EE',
419
- primary10: '#C9E8F2',
420
- primary100: '#00889B',
421
- disabledButton: '#DAE9EE',
422
- disabledButtonBorder: '#C9E8F2',
423
- texttitle: '#123952',
424
- textlabel: '#123952',
425
- textbody: '#52585C',
426
- textplaceholder: '#A4ABAE',
427
- bggray: '#EDF2F4',
428
- bgblue: '#ECF4F7',
429
- inputBorder: '#ABC7D1',
430
- special1: '#ffd302',
431
- special2: '#00d374',
432
- special3: '#ff297c',
433
- primaryBg: '#EAF2F6',
434
- special2Bg: '#E7FFE9',
435
- transparent: 'transparent',
436
- error: '#B21154',
437
- primary2: '#00A0B6',
438
- primary20: '#00788A',
439
- primary200: '#004D59',
413
+ var primary1 = {
414
+ '10': '#F6FEFF',
415
+ '20': '#E1F7FA',
416
+ '30': '#A6F4FF',
417
+ '40': '#5FE6FA',
418
+ '50': '#28D5EE',
419
+ '60': '#02C0DA',
420
+ '65': '#00B1C8',
421
+ '70': '#00A0B6',
422
+ '75': '#008EA0',
423
+ '80': '#00788A',
424
+ '85': '#006672',
425
+ '90': '#004D59',
426
+ 'main': '',
427
+ 'main-hover': '',
428
+ 'light': '',
429
+ 'lightest': '',
430
+ 'dark': '',
431
+ 'dark-hover': '',
432
+ 'darkest': '',
433
+ };
434
+ primary1['main'] = primary1['70'];
435
+ primary1['main-hover'] = primary1['75'];
436
+ primary1['lightest'] = primary1['10'];
437
+ primary1['light'] = primary1['30'];
438
+ primary1['dark'] = primary1['80'];
439
+ primary1['dark-hover'] = primary1['85'];
440
+ primary1['darkest'] = primary1['90'];
441
+ var primary2 = {
442
+ main: '#FFFFFF',
443
+ border: {
444
+ main: '#0C5A88',
445
+ },
446
+ };
447
+ var secondary1 = {
448
+ '10': '#FFEDF4',
449
+ '20': '#FDC5DB',
450
+ '30': '#FC9DC2',
451
+ '40': '#F55393',
452
+ '50': '#EB1D6E',
453
+ '60': '#DB0057',
454
+ '70': '#C4004E',
455
+ '80': '#A70043',
456
+ '90': '#870036',
457
+ 'main': '',
458
+ 'lightest': '',
459
+ 'light': '',
460
+ 'dark': '',
461
+ 'darkest': '',
462
+ };
463
+ secondary1['main'] = secondary1['60'];
464
+ primary1['lightest'] = primary1['10'];
465
+ primary1['light'] = primary1['30'];
466
+ primary1['dark'] = primary1['80'];
467
+ primary1['darkest'] = primary1['90'];
468
+ var secondary2 = {
469
+ '10': '#FFFDF5',
470
+ '20': '#FFF9C5',
471
+ '30': '#FFF597',
472
+ '40': '#FFE544',
473
+ '50': '#FFD302',
474
+ '60': '#E6BA00',
475
+ '70': '#C69B00',
476
+ '80': '#9E7800',
477
+ '90': '#735400',
478
+ 'main': '',
479
+ 'lightest': '',
480
+ 'light': '',
481
+ 'dark': '',
482
+ 'darkest': '',
483
+ };
484
+ secondary2['main'] = secondary2['50'];
485
+ primary1['lightest'] = primary1['10'];
486
+ primary1['light'] = primary1['30'];
487
+ primary1['dark'] = primary1['70'];
488
+ primary1['darkest'] = primary1['90'];
489
+ var secondary3 = {
490
+ '10': '#F2FFF9',
491
+ '20': '#C9FDE5',
492
+ '30': '#A1FBD2',
493
+ '40': '#59F3AE',
494
+ '50': '#23E68E',
495
+ '60': '#00D374',
496
+ '70': '#00B966',
497
+ '80': '#009853',
498
+ '90': '#00733F',
499
+ 'main': '',
500
+ 'lightest': '',
501
+ 'light': '',
502
+ 'dark': '',
503
+ 'darkest': '',
504
+ };
505
+ secondary3['main'] = secondary3['60'];
506
+ primary1['lightest'] = primary1['10'];
507
+ primary1['light'] = primary1['30'];
508
+ primary1['dark'] = primary1['80'];
509
+ primary1['darkest'] = primary1['90'];
510
+ var secondary4 = {
511
+ '10': '#EDF4F7',
512
+ '20': '#C6E8F7',
513
+ '30': '#A1DAF4',
514
+ '40': '#5BBDEC',
515
+ '50': '#249AD4',
516
+ '60': '#0F6EA6',
517
+ '70': '#0C5A88',
518
+ '80': '#05476E',
519
+ '90': '#003C5E',
520
+ 'main': '',
521
+ 'lightest': '',
522
+ 'light': '',
523
+ 'dark': '',
524
+ 'darkest': '',
440
525
  };
526
+ secondary4['main'] = secondary4['70'];
527
+ primary1['lightest'] = primary1['10'];
528
+ primary1['light'] = primary1['30'];
529
+ primary1['dark'] = primary1['80'];
530
+ primary1['darkest'] = primary1['90'];
531
+ var neutrals = {
532
+ '10': '#FFFFFF',
533
+ '20': '#EDF4F7',
534
+ '30': '#E6EFF2',
535
+ '40': '#DAE9EE',
536
+ '50': '#D0D7DC',
537
+ '60': '#B8C4CB',
538
+ '70': '#899CA9',
539
+ '80': '#597486',
540
+ '90': '#2A4D63',
541
+ '100': '#123952',
542
+ 'main': '',
543
+ 'darkest': '',
544
+ 'bodyText': '',
545
+ 'bg1': '',
546
+ 'white': '',
547
+ };
548
+ neutrals['main'] = neutrals['100'];
549
+ neutrals['white'] = neutrals['10'];
550
+ neutrals['bg1'] = neutrals['20'];
551
+ neutrals['bodyText'] = neutrals['90'];
552
+ neutrals['darkest'] = neutrals['100'];
553
+ var errors = {
554
+ '10': '#FFF2F3',
555
+ '20': '#FDCACD',
556
+ '30': '#FBA3A9',
557
+ '40': '#F35C66',
558
+ '50': '#E52633',
559
+ '60': '#D10411',
560
+ '70': '#B4000C',
561
+ '80': '#8F000A',
562
+ '90': '#660007',
563
+ 'main': '',
564
+ 'lightest': '',
565
+ 'light': '',
566
+ 'dark': '',
567
+ 'darkest': '',
568
+ };
569
+ errors['main'] = errors['60'];
570
+ errors['lightest'] = errors['10'];
571
+ errors['light'] = errors['30'];
572
+ errors['dark'] = errors['80'];
573
+ errors['darkest'] = errors['90'];
574
+ var colors = {
575
+ primary1: primary1,
576
+ secondary1: secondary1,
577
+ secondary2: secondary2,
578
+ secondary3: secondary3,
579
+ secondary4: secondary4,
580
+ pink: secondary1,
581
+ yellow: secondary2,
582
+ green: secondary3,
583
+ navy: secondary4,
584
+ neutrals: neutrals,
585
+ errors: errors,
586
+ orders: {
587
+ 'OPPORTUNITY': {
588
+ main: primary1['80'],
589
+ },
590
+ 'PRESENTATION': {
591
+ main: primary1['70'],
592
+ },
593
+ 'ESTIMATE': {
594
+ main: primary1['50'],
595
+ },
596
+ 'PRE-SALES': {
597
+ main: primary1['60'],
598
+ },
599
+ 'SALES ORDER': {
600
+ main: secondary2['50'],
601
+ },
602
+ 'INVOICE': {
603
+ main: secondary3['60'],
604
+ },
605
+ 'TARGET': {
606
+ main: secondary1['50'],
607
+ },
608
+ },
609
+ notes: {
610
+ main: secondary1['50'],
611
+ },
612
+ calls: {
613
+ main: secondary4['40'],
614
+ },
615
+ meetings: {
616
+ main: secondary4['80'],
617
+ },
618
+ left_nav: {
619
+ main: primary1['70'],
620
+ sub_menu: {
621
+ bg: primary1['80'],
622
+ link: {
623
+ bg: primary1['90'],
624
+ text: primary2.main,
625
+ },
626
+ },
627
+ link: {
628
+ text: primary2.main,
629
+ },
630
+ },
631
+ text: {
632
+ main: neutrals['90'],
633
+ bold: neutrals['100'],
634
+ body: neutrals['90'],
635
+ title: neutrals['100'],
636
+ label: neutrals['100'],
637
+ placeholder: '#A4ABAE',
638
+ },
639
+ };
640
+
641
+ var colors$1 = __assign({ white: '#fff', black: '#000', primary: '#02c0da', cta: '#fa237c', primary0: '#DAE9EE', primary10: '#C9E8F2', primary100: '#00889B', disabledButton: '#DAE9EE', disabledButtonBorder: '#C9E8F2', texttitle: '#123952', textlabel: '#123952', textbody: '#52585C', textplaceholder: '#A4ABAE', bggray: '#EDF2F4', bgblue: '#ECF4F7', inputBorder: '#ABC7D1', special1: '#ffd302', special2: '#00d374', special3: '#ff297c', primaryBg: '#EAF2F6', special2Bg: '#E7FFE9', transparent: 'transparent', error: '#B21154', primary2: '#00A0B6', primary20: '#00788A', primary200: '#004D59', tableHeaderBg: '#F6FEFF', tableBorder: '#edf2f5' }, colors);
441
642
  var fonts = ["'skufont-demibold'", 'sans-serif', 'Roboto'];
442
643
  var fontSizes = {
443
644
  tiny: '.8em',
@@ -446,7 +647,7 @@ var fontSizes = {
446
647
  large: '3em'
447
648
  };
448
649
  var themeOptions = {
449
- colors: colors,
650
+ colors: colors$1,
450
651
  fonts: fonts,
451
652
  fontFamily: "" + fonts.join(","),
452
653
  fontSizes: fontSizes,
@@ -466,7 +667,7 @@ var themeOptions = {
466
667
  };
467
668
  function getColor(color, def) {
468
669
  // @ts-ignore
469
- return color && colors[color] ? colors[color] : colors[def];
670
+ return color && colors$1[color] ? colors$1[color] : colors$1[def];
470
671
  }
471
672
  function getFontSize(value, def) {
472
673
  // @ts-ignore
@@ -728,7 +929,7 @@ function Page(props) {
728
929
  }
729
930
  var templateObject_1$d;
730
931
 
731
- var Text = styled__default.span(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\n font-family: ", ";\n\n color: ", ";\n background-color: ", ";\n border-radius: ", ";\n padding: ", ";\n ", "\n"], ["\n font-family: ", ";\n\n color: ", ";\n background-color: ", ";\n border-radius: ", ";\n padding: ", ";\n ", "\n"])), fonts.join(', '), function (props) { var _a; return colors[(_a = props.color) !== null && _a !== void 0 ? _a : 'textbody']; }, function (props) { return props.bg ? _.get(colors, props.color + "Bg", 'transparent') : 'transparent'; }, function (props) { return props.bg ? '5px' : '0px'; }, function (props) { return props.bg ? '5px' : '0px'; }, SharedStyles);
932
+ var Text = styled__default.span(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\n font-family: ", ";\n\n color: ", ";\n background-color: ", ";\n border-radius: ", ";\n padding: ", ";\n ", "\n"], ["\n font-family: ", ";\n\n color: ", ";\n background-color: ", ";\n border-radius: ", ";\n padding: ", ";\n ", "\n"])), fonts.join(', '), function (props) { var _a; return colors$1[(_a = props.color) !== null && _a !== void 0 ? _a : 'textbody']; }, function (props) { return props.bg ? _.get(colors$1, props.color + "Bg", 'transparent') : 'transparent'; }, function (props) { return props.bg ? '5px' : '0px'; }, function (props) { return props.bg ? '5px' : '0px'; }, SharedStyles);
732
933
  var _Link = function (_a) {
733
934
  var highlight = _a.highlight, props = __rest(_a, ["highlight"]);
734
935
  return React__default.createElement(Text, __assign({ color: highlight ? 'special2' : 'primary' }, props));
@@ -792,7 +993,7 @@ function skuSelectStyles(props) {
792
993
  }
793
994
  };
794
995
  }
795
- var skuSelectTheme = function (theme) { return (__assign(__assign({}, theme), { borderRadius: 5, colors: __assign(__assign({}, theme.colors), { primary25: colors.primary0, primary75: colors.primary0, primary50: colors.primary10, primary: colors.primary, neutral20: colors.inputBorder, neutral30: colors.inputBorder, neutral80: colors.textbody, neutral90: colors.textbody }) })); };
996
+ var skuSelectTheme = function (theme) { return (__assign(__assign({}, theme), { borderRadius: 5, colors: __assign(__assign({}, theme.colors), { primary25: colors$1.primary0, primary75: colors$1.primary0, primary50: colors$1.primary10, primary: colors$1.primary, neutral20: colors$1.inputBorder, neutral30: colors$1.inputBorder, neutral80: colors$1.textbody, neutral90: colors$1.textbody }) })); };
796
997
  // duplicate styles to overide .resku global styles
797
998
  var SKUSelect = styled__default(React__default.forwardRef(function (_a, ref) {
798
999
  var noMargin = _a.noMargin, menuRelative = _a.menuRelative, inPopup = _a.inPopup, error = _a.error, props = __rest(_a, ["noMargin", "menuRelative", "inPopup", "error"]);
@@ -1230,13 +1431,13 @@ function WarningIcon(_a) {
1230
1431
  }
1231
1432
 
1232
1433
  var CircleProgressIcon = function (_a) {
1233
- var _b = _a.sqSize, sqSize = _b === void 0 ? 50 : _b, _c = _a.strokeWidth, strokeWidth = _c === void 0 ? 5 : _c, _d = _a.percentage, percentage = _d === void 0 ? 0 : _d, _e = _a.strokeColor, strokeColor = _e === void 0 ? colors.primary : _e, _f = _a.textColor, textColor = _f === void 0 ? colors.primary : _f, _g = _a.text, text = _g === void 0 ? '' : _g, _h = _a.textStyle, textStyle = _h === void 0 ? {} : _h, props = __rest(_a, ["sqSize", "strokeWidth", "percentage", "strokeColor", "textColor", "text", "textStyle"]);
1434
+ var _b = _a.sqSize, sqSize = _b === void 0 ? 50 : _b, _c = _a.strokeWidth, strokeWidth = _c === void 0 ? 5 : _c, _d = _a.percentage, percentage = _d === void 0 ? 0 : _d, _e = _a.strokeColor, strokeColor = _e === void 0 ? colors$1.primary : _e, _f = _a.textColor, textColor = _f === void 0 ? colors$1.primary : _f, _g = _a.text, text = _g === void 0 ? '' : _g, _h = _a.textStyle, textStyle = _h === void 0 ? {} : _h, props = __rest(_a, ["sqSize", "strokeWidth", "percentage", "strokeColor", "textColor", "text", "textStyle"]);
1234
1435
  var radius = (sqSize - strokeWidth) / 2;
1235
1436
  var viewBox = "0 0 " + sqSize + " " + sqSize;
1236
1437
  var dashArray = radius * Math.PI * 2;
1237
1438
  var dashOffset = dashArray - dashArray * percentage / 100;
1238
1439
  return (React__default.createElement("svg", __assign({ width: sqSize, height: sqSize, viewBox: viewBox }, props),
1239
- React__default.createElement("circle", { className: "circle-background", cx: sqSize / 2, cy: sqSize / 2, r: radius, strokeWidth: strokeWidth + "px", style: { fill: 'none', stroke: colors.disabledButtonBorder, } }),
1440
+ React__default.createElement("circle", { className: "circle-background", cx: sqSize / 2, cy: sqSize / 2, r: radius, strokeWidth: strokeWidth + "px", style: { fill: 'none', stroke: colors$1.disabledButtonBorder, } }),
1240
1441
  React__default.createElement("circle", { className: "circle-progress", cx: sqSize / 2, cy: sqSize / 2, r: radius, strokeWidth: strokeWidth + "px", transform: "rotate(-90 " + sqSize / 2 + " " + sqSize / 2 + ")", style: {
1241
1442
  strokeDasharray: dashArray,
1242
1443
  strokeDashoffset: dashOffset,
@@ -1254,8 +1455,8 @@ var templateObject_1$j;
1254
1455
  function Loading(_a) {
1255
1456
  var _b = _a.height, height = _b === void 0 ? 50 : _b, width = _a.width, _c = _a.animationDuration, animationDuration = _c === void 0 ? 1000 : _c, _d = _a.barWidth, barWidth = _d === void 0 ? 14 : _d, _e = _a.barRadius, barRadius = _e === void 0 ? 2 : _e, _f = _a.colorful, colorful = _f === void 0 ? false : _f, _g = _a.bars, bars = _g === void 0 ? 4 : _g, _h = _a.viewBox, viewBox = _h === void 0 ? "10 0 51 50" : _h, _j = _a.rotate, startColor = _a.startColor, endColor = _a.endColor, props = __rest(_a, ["height", "width", "animationDuration", "barWidth", "barRadius", "colorful", "bars", "viewBox", "rotate", "startColor", "endColor"]);
1256
1457
  var colorGradient = colorful
1257
- ? generateColor(startColor || colors.special1, endColor || colors.primary, bars)
1258
- : generateColor(startColor || colors.primary, endColor || colors.primary0, bars);
1458
+ ? generateColor(startColor || colors$1.special1, endColor || colors$1.primary, bars)
1459
+ : generateColor(startColor || colors$1.primary, endColor || colors$1.primary0, bars);
1259
1460
  var generateBar = function (v) {
1260
1461
  return (React__default.createElement("rect", { key: "bar_" + v, x: 19 * v, y: "0", width: barWidth || 14, height: height, fill: "#" + colorGradient[v], rx: barRadius },
1261
1462
  React__default.createElement("animate", { attributeName: "height", values: "50;10;50", begin: v * 0.2 + "s", dur: animationDuration / 1000 + "s", repeatCount: "indefinite" })));
@@ -1270,6 +1471,49 @@ function Loading(_a) {
1270
1471
  return (React__default.createElement(SVG, __assign({ width: width ? width + "px" : "100%", height: height ? height + "px" : "100%", viewBox: viewBox, transform: "scale(1, -1) translate(0, -1)" }, props), generateBars()));
1271
1472
  }
1272
1473
 
1474
+ function Icon(_a) {
1475
+ var _b = _a.width, width = _b === void 0 ? 19 : _b, _c = _a.height, height = _c === void 0 ? 16 : _c, _d = _a.fill, fill = _d === void 0 ? themeOptions.colors.secondary3['60'] : _d, _e = _a.style, style = _e === void 0 ? {} : _e, props = __rest(_a, ["width", "height", "fill", "style"]);
1476
+ return (React__default.createElement("svg", __assign({ width: width, height: height, fill: "none", xmlns: "http://www.w3.org/2000/svg", style: style }, props),
1477
+ React__default.createElement("path", { d: "m9.5.5 8.66 15H.84L9.5.5Z", fill: fill })));
1478
+ }
1479
+
1480
+ function Icon$1(_a) {
1481
+ var _b = _a.width, width = _b === void 0 ? 19 : _b, _c = _a.height, height = _c === void 0 ? 16 : _c, _d = _a.fill, fill = _d === void 0 ? themeOptions.colors.errors.main : _d, _e = _a.style, style = _e === void 0 ? {} : _e, props = __rest(_a, ["width", "height", "fill", "style"]);
1482
+ return (React__default.createElement("svg", __assign({ width: width, height: height, fill: "none", xmlns: "http://www.w3.org/2000/svg", style: style }, props),
1483
+ React__default.createElement("path", { d: "M9 15.5.34.5h17.32L9 15.5Z", fill: fill })));
1484
+ }
1485
+
1486
+ function Icon$2(_a) {
1487
+ var _b = _a.fill, fill = _b === void 0 ? "#E52633" : _b, _c = _a.style, style = _c === void 0 ? {} : _c, props = __rest(_a, ["fill", "style"]);
1488
+ return (React__default.createElement("svg", __assign({ width: 25, height: 24, fill: "none", xmlns: "http://www.w3.org/2000/svg", style: style }, props),
1489
+ React__default.createElement("rect", { x: 0.979, y: 0.791, width: 23.042, height: 22.419, rx: 3, fill: fill }),
1490
+ React__default.createElement("path", { d: "M11.137 13.03h2.72l.56-7.44h-3.84l.56 7.44Zm-.4 2.32c0 .88.72 1.6 1.76 1.6s1.76-.72 1.76-1.6c0-.88-.72-1.6-1.76-1.6s-1.76.72-1.76 1.6Z", fill: "#fff" })));
1491
+ }
1492
+
1493
+ function Icon$3(_a) {
1494
+ var _b = _a.width, width = _b === void 0 ? 35 : _b, _c = _a.height, height = _c === void 0 ? 34 : _c, _d = _a.fill, fill = _d === void 0 ? '#01D374' : _d, _e = _a.style, style = _e === void 0 ? {} : _e, props = __rest(_a, ["width", "height", "fill", "style"]);
1495
+ return (React__default.createElement("svg", __assign({ width: width, height: height, fill: "none", xmlns: "http://www.w3.org/2000/svg", style: style }, props),
1496
+ React__default.createElement("path", { d: "M17.5.333C8.3.333.833 7.8.833 17c0 9.2 7.467 16.667 16.667 16.667 9.2 0 16.667-7.467 16.667-16.667C34.167 7.8 26.7.333 17.5.333Zm0 30C10.15 30.333 4.167 24.35 4.167 17c0-7.35 5.983-13.333 13.333-13.333 7.35 0 13.333 5.983 13.333 13.333 0 7.35-5.983 13.333-13.333 13.333Zm7.65-20.7L14.167 20.617l-4.317-4.3-2.35 2.35 6.667 6.666L27.5 12l-2.35-2.367Z", fill: fill })));
1497
+ }
1498
+
1499
+ function Icon$4(_a) {
1500
+ var _b = _a.width, width = _b === void 0 ? 24 : _b, _c = _a.height, height = _c === void 0 ? 24 : _c, _d = _a.fill, fill = _d === void 0 ? themeOptions.colors.primary1.main : _d, _e = _a.style, style = _e === void 0 ? {} : _e, props = __rest(_a, ["width", "height", "fill", "style"]);
1501
+ return (React__default.createElement("svg", __assign({ width: width, height: height, fill: "none", xmlns: "http://www.w3.org/2000/svg", style: style }, props),
1502
+ React__default.createElement("path", { d: "m17.835 3.87-1.78-1.77-9.89 9.9 9.9 9.9 1.77-1.77L9.705 12l8.13-8.13Z", fill: fill })));
1503
+ }
1504
+
1505
+ function Icon$5(_a) {
1506
+ var _b = _a.width, width = _b === void 0 ? 24 : _b, _c = _a.height, height = _c === void 0 ? 24 : _c, _d = _a.fill, fill = _d === void 0 ? themeOptions.colors.primary1.main : _d, _e = _a.style, style = _e === void 0 ? {} : _e, props = __rest(_a, ["width", "height", "fill", "style"]);
1507
+ return (React__default.createElement("svg", __assign({ width: width, height: height, fill: "none", xmlns: "http://www.w3.org/2000/svg", style: style }, props),
1508
+ React__default.createElement("path", { d: "M6.115 20.23 7.885 22l10-10-10-10-1.77 1.77 8.23 8.23-8.23 8.23Z", fill: fill })));
1509
+ }
1510
+
1511
+ function Icon$6(_a) {
1512
+ var _b = _a.width, width = _b === void 0 ? 13 : _b, _c = _a.height, height = _c === void 0 ? 14 : _c, _d = _a.fill, fill = _d === void 0 ? themeOptions.colors.primary1.main : _d, _e = _a.style, style = _e === void 0 ? {} : _e, props = __rest(_a, ["width", "height", "fill", "style"]);
1513
+ return (React__default.createElement("svg", __assign({ width: width, height: height, fill: "none", xmlns: "http://www.w3.org/2000/svg", style: style }, props),
1514
+ React__default.createElement("circle", { cx: 6.5, cy: 7, r: 6.5, fill: fill })));
1515
+ }
1516
+
1273
1517
  var sharedStyle = styled.css(templateObject_1$k || (templateObject_1$k = __makeTemplateObject(["\n line-height: 1.125rem;\n box-sizing: border-box;\n"], ["\n line-height: 1.125rem;\n box-sizing: border-box;\n"])));
1274
1518
  var optionalPadding = styled.css(templateObject_2$b || (templateObject_2$b = __makeTemplateObject(["\n &:first-child {\n padding-left: ", ";\n }\n\n &:last-child {\n padding-right: ", ";\n }\n"], ["\n &:first-child {\n padding-left: ", ";\n }\n\n &:last-child {\n padding-right: ", ";\n }\n"])), function (props) { return props.padded ? "20px" : "inherit"; }, function (props) { return props.padded ? "20px" : "inherit"; });
1275
1519
  var Table = styled__default.table.attrs(function () { return ({ cellPadding: 0, cellSpacing: 0 }); })(templateObject_3$5 || (templateObject_3$5 = __makeTemplateObject(["\n &&& {\n background-color: white;\n border: none;\n border-spacing: 0;\n width: 100%;\n table-layout: auto;\n display: table;\n font-family: 'skufont-regular', sans-serif;\n ", "\n ", "\n ", "\n }\n"], ["\n &&& {\n background-color: white;\n border: none;\n border-spacing: 0;\n width: 100%;\n table-layout: auto;\n display: table;\n font-family: 'skufont-regular', sans-serif;\n ", "\n ", "\n ", "\n }\n"])), sharedStyle, SizerCss, SharedStyles);
@@ -1298,10 +1542,10 @@ var THSorted = function (_a) {
1298
1542
  var templateObject_1$k, templateObject_2$b, templateObject_3$5, templateObject_4$4, templateObject_5$4, templateObject_6$4, templateObject_7$2, templateObject_8, templateObject_9;
1299
1543
 
1300
1544
  var tabSizes = {
1301
- small: styled.css(templateObject_1$l || (templateObject_1$l = __makeTemplateObject(["\n font-size: 0.9rem;\n padding: 0.5rem 5px;\n maring: 0;\n "], ["\n font-size: 0.9rem;\n padding: 0.5rem 5px;\n maring: 0;\n "]))),
1302
- medium: styled.css(templateObject_2$c || (templateObject_2$c = __makeTemplateObject(["\n font-size: inherit;\n padding: 1rem 12px;\n maring: 0 15px 0 0;\n "], ["\n font-size: inherit;\n padding: 1rem 12px;\n maring: 0 15px 0 0;\n "]))),
1545
+ small: styled.css(templateObject_1$l || (templateObject_1$l = __makeTemplateObject(["\n font-size: 0.9rem;\n padding: 0.5rem 5px;\n margin: 0;\n "], ["\n font-size: 0.9rem;\n padding: 0.5rem 5px;\n margin: 0;\n "]))),
1546
+ medium: styled.css(templateObject_2$c || (templateObject_2$c = __makeTemplateObject(["\n font-size: inherit;\n padding: 1rem 12px;\n margin: 0 15px 0 0;\n "], ["\n font-size: inherit;\n padding: 1rem 12px;\n margin: 0 15px 0 0;\n "]))),
1303
1547
  };
1304
- var TabBar = styled__default.ul(templateObject_3$6 || (templateObject_3$6 = __makeTemplateObject(["\n &&& {\n display: block;\n font-size: 1.125rem;\n font-family: 'skufont-demibold', sans-serif;\n margin: 0;\n margin-bottom: ", ";\n padding: 0;\n ", "\n }\n"], ["\n &&& {\n display: block;\n font-size: 1.125rem;\n font-family: 'skufont-demibold', sans-serif;\n margin: 0;\n margin-bottom: ", ";\n padding: 0;\n ", "\n }\n"])), function (props) { return props.padded ? "20px" : 0; }, SharedStyles);
1548
+ var TabBar = styled__default.ul(templateObject_3$6 || (templateObject_3$6 = __makeTemplateObject(["\n &&& {\n display: block;\n font-size: 16px;\n font-family: 'skufont-demibold', sans-serif;\n margin: 0;\n margin-bottom: ", ";\n padding: 0;\n ", "\n }\n"], ["\n &&& {\n display: block;\n font-size: 16px;\n font-family: 'skufont-demibold', sans-serif;\n margin: 0;\n margin-bottom: ", ";\n padding: 0;\n ", "\n }\n"])), function (props) { return props.padded ? "20px" : 0; }, SharedStyles);
1305
1549
  var Tab = styled__default.li(templateObject_4$5 || (templateObject_4$5 = __makeTemplateObject(["\n &&& {\n cursor: pointer;\n display: inline-block;\n border-bottom: ", ";\n color: #222222;\n opacity: ", ";\n list-style: none;\n margin-bottom: 0 !important;\n position: relative;\n padding: 1rem 12px;\n margin-right: 15px;\n ", "\n\n ", "\n }\n"], ["\n &&& {\n cursor: pointer;\n display: inline-block;\n border-bottom: ", ";\n color: #222222;\n opacity: ", ";\n list-style: none;\n margin-bottom: 0 !important;\n position: relative;\n padding: 1rem 12px;\n margin-right: 15px;\n ", "\n\n ", "\n }\n"
1306
1550
  /*
1307
1551
 
@@ -4766,13 +5010,13 @@ var Task = function (_a) {
4766
5010
  var StyledCalendarTaskBody = styled__default.span(templateObject_5$6 || (templateObject_5$6 = __makeTemplateObject(["\n font-size: 13px;\n font-family: 'skufont-regular',sans-serif,Roboto;\n"], ["\n font-size: 13px;\n font-family: 'skufont-regular',sans-serif,Roboto;\n"])));
4767
5011
  var StyledCalendarTaskWrapper = styled__default(StyledTask)(templateObject_6$6 || (templateObject_6$6 = __makeTemplateObject(["\nborder-radius: 5px;\n", "\npadding: 5px;\nmargin: 0;\nheight: 100%;\nmargin-bottom: 7px;\n"], ["\nborder-radius: 5px;\n", "\npadding: 5px;\nmargin: 0;\nheight: 100%;\nmargin-bottom: 7px;\n"])), function (p) { return p.backgroundColor ? "background-color: " + p.backgroundColor + ";" : ''; });
4768
5012
  var CalendarTask = React__default.forwardRef(function (_a, ref) {
4769
- var title = _a.title, description = _a.description, date = _a.date, _b = _a.completed, completed = _b === void 0 ? false : _b, assignee = _a.assignee, onClickCheckbox = _a.onClickCheckbox, _c = _a.colorType, colorType = _c === void 0 ? 'light-green' : _c, _d = _a.isDescriptionHtml, isDescriptionHtml = _d === void 0 ? false : _d, props = __rest(_a, ["title", "description", "date", "completed", "assignee", "onClickCheckbox", "colorType", "isDescriptionHtml"]);
4770
- var _e = React.useState(completed), checked = _e[0], setChecked = _e[1];
5013
+ var title = _a.title, description = _a.description, date = _a.date, _b = _a.completed, completed = _b === void 0 ? false : _b, assignee = _a.assignee, onClickCheckbox = _a.onClickCheckbox, _c = _a.colorType, colorType = _c === void 0 ? 'light-green' : _c, _d = _a.isDescriptionHtml, isDescriptionHtml = _d === void 0 ? false : _d, _e = _a.hideCheckbox, hideCheckbox = _e === void 0 ? false : _e, props = __rest(_a, ["title", "description", "date", "completed", "assignee", "onClickCheckbox", "colorType", "isDescriptionHtml", "hideCheckbox"]);
5014
+ var _f = React.useState(completed), checked = _f[0], setChecked = _f[1];
4771
5015
  React.useEffect(function () {
4772
5016
  setChecked(completed);
4773
5017
  }, [completed, title, date]);
4774
5018
  return (React__default.createElement(StyledCalendarTaskWrapper, __assign({ backgroundColor: colorType === 'light-red' ? '#ffebf2' : '#01d37417' }, props),
4775
- React__default.createElement(LabeledCheckbox, { ref: ref, stopPropagation: true, checked: checked, checkboxPosition: "top-right", checkboxStyle: {
5019
+ !hideCheckbox ? React__default.createElement(LabeledCheckbox, { ref: ref, stopPropagation: true, checked: checked, checkboxPosition: "top-right", checkboxStyle: {
4776
5020
  borderColor: checked
4777
5021
  ? undefined : (colorType === 'light-red' ? 'rgba(209, 69, 121, 0.24)' : '#BEF1DA'),
4778
5022
  }, hoverByLabel: false, labelStyle: { width: '100%', paddingLeft: 0, paddingRight: 0, marginRight: 0, marginLeft: 0, margin: 0, }, label: React__default.createElement(TaskLabel, { onClick: function (e) { e.preventDefault(); }, style: { fontWeight: 'bold' } },
@@ -4787,7 +5031,10 @@ var CalendarTask = React__default.forwardRef(function (_a, ref) {
4787
5031
  onClickCheckbox && onClickCheckbox(!s);
4788
5032
  return !s;
4789
5033
  });
4790
- } }),
5034
+ } }) : React__default.createElement(React__default.Fragment, null,
5035
+ React__default.createElement(TaskLabel, { onClick: function (e) { e.preventDefault(); }, style: { fontWeight: 'bold' } },
5036
+ React__default.createElement(TaskName, null, title),
5037
+ date ? React__default.createElement("div", null, ___default.isDate(date) ? format(date, 'yyyy-mm-dd') : date) : null)),
4791
5038
  React__default.createElement(StyledCalendarTaskBody, __assign({}, (isDescriptionHtml && typeof description === 'string'
4792
5039
  ? { dangerouslySetInnerHTML: { __html: description } }
4793
5040
  : { children: description }))),
@@ -4881,9 +5128,9 @@ var DropDownContent = styled__default.div(templateObject_3$e || (templateObject_
4881
5128
  "\n font-weight: bold;\n :last-child {\n border-bottom: none;\n }\n\n &:hover {\n background-color: ", ";\n color: ", ";\n border-radius: 5px;\n cursor: pointer;\n }\n }\n*/\n"])), function (p) { return getColor(p.primary ? 'white' : 'white'); }, function (p) { return getColor(p.primary ? 'primary' : 'cta'); }, function (p) { return p.underlined &&
4882
5129
  "border-bottom: 1px solid " + getColor(p.primary ? 'primary' : 'white') + ";"; }, function (p) { return getColor(p.primary ? 'primary0' : 'cta'); }, function (p) { return getColor(p.primary ? 'texttitle' : 'white'); });
4883
5130
  var Dropdown = function (_a) {
4884
- var items = _a.items, children = _a.children, underlined = _a.underlined, primary = _a.primary, text = _a.text, icon = _a.icon, _b = _a.openMenu, openMenu = _b === void 0 ? false : _b, mouseLeaveCallback = _a.mouseLeaveCallback, props = __rest(_a, ["items", "children", "underlined", "primary", "text", "icon", "openMenu", "mouseLeaveCallback"]);
5131
+ var items = _a.items, _b = _a.children, children = _b === void 0 ? undefined : _b, underlined = _a.underlined, primary = _a.primary, text = _a.text, icon = _a.icon, _c = _a.openMenu, openMenu = _c === void 0 ? false : _c, mouseLeaveCallback = _a.mouseLeaveCallback, size = _a.size, props = __rest(_a, ["items", "children", "underlined", "primary", "text", "icon", "openMenu", "mouseLeaveCallback", "size"]);
4885
5132
  var node = React.useRef();
4886
- var _c = React.useState(openMenu), showMenu = _c[0], setShowMenu = _c[1];
5133
+ var _d = React.useState(openMenu), showMenu = _d[0], setShowMenu = _d[1];
4887
5134
  var iconProps = {
4888
5135
  width: '10px',
4889
5136
  fill: getColor(primary ? 'primary100' : 'white'),
@@ -4917,7 +5164,7 @@ var Dropdown = function (_a) {
4917
5164
  icon ?
4918
5165
  React__default.createElement("span", { onClick: function () { return setShowMenu(!showMenu); } }, icon)
4919
5166
  :
4920
- React__default.createElement(Button, { cta: Boolean(!primary), onClick: function () { return setShowMenu(!showMenu); } },
5167
+ React__default.createElement(Button, { size: size, cta: Boolean(!primary), onClick: function () { return setShowMenu(!showMenu); } },
4921
5168
  text ? text : "Actions",
4922
5169
  " ",
4923
5170
  React__default.createElement(UpArrowIcon, __assign({}, iconProps))),
@@ -4932,7 +5179,7 @@ var Dropdown = function (_a) {
4932
5179
  };
4933
5180
  var templateObject_1$w, templateObject_2$l, templateObject_3$e;
4934
5181
 
4935
- var Badge = styled__default.span(templateObject_1$x || (templateObject_1$x = __makeTemplateObject(["\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: 12px;\n font-weight: 700;\n line-height: 1;\n color: #fff;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n background-color: ", ";\n color: ", ";\n border-radius: 10px;\n ", "\n"], ["\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: 12px;\n font-weight: 700;\n line-height: 1;\n color: #fff;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n background-color: ", ";\n color: ", ";\n border-radius: 10px;\n ", "\n"])), function (p) { return p.color === 'cta' ? colors.cta : p.color === 'grey' ? colors.primary0 : colors.primary; }, function (p) { return p.color === 'grey' ? colors.primary100 : colors.white; }, SharedStyles);
5182
+ var Badge = styled__default.span(templateObject_1$x || (templateObject_1$x = __makeTemplateObject(["\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: 12px;\n font-weight: 700;\n line-height: 1;\n color: #fff;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n background-color: ", ";\n color: ", ";\n border-radius: 10px;\n ", "\n"], ["\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: 12px;\n font-weight: 700;\n line-height: 1;\n color: #fff;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n background-color: ", ";\n color: ", ";\n border-radius: 10px;\n ", "\n"])), function (p) { return p.color === 'cta' ? colors$1.cta : p.color === 'grey' ? colors$1.primary0 : colors$1.primary; }, function (p) { return p.color === 'grey' ? colors$1.primary100 : colors$1.white; }, SharedStyles);
4936
5183
  var templateObject_1$x;
4937
5184
 
4938
5185
  var verticalScrollbarWidth = function verticalScrollbarWidth() {
@@ -5379,6 +5626,9 @@ var useCalendar = function (_a) {
5379
5626
  else if (action === "next") {
5380
5627
  dt = addMonths(currentMonth, 1);
5381
5628
  }
5629
+ else if (action === "reset") {
5630
+ dt = today;
5631
+ }
5382
5632
  setCurrentMonth(dt);
5383
5633
  onChangeMonth && onChangeMonth({
5384
5634
  action: action,
@@ -5395,6 +5645,9 @@ var useCalendar = function (_a) {
5395
5645
  else if (action === "next") {
5396
5646
  dt = addWeeks(currentMonth, 1);
5397
5647
  }
5648
+ else if (action === "reset") {
5649
+ dt = today;
5650
+ }
5398
5651
  setCurrentMonth(dt);
5399
5652
  var week = getWeek(dt);
5400
5653
  setCurrentWeek(week);
@@ -5414,6 +5667,11 @@ var useCalendar = function (_a) {
5414
5667
  setSelectedDate(day);
5415
5668
  }
5416
5669
  };
5670
+ // reset to today's date
5671
+ var resetToToday = function () {
5672
+ setSelectedDate(today);
5673
+ changeWeek('reset');
5674
+ };
5417
5675
  var onNextWeek = function () { return changeWeek("next"); };
5418
5676
  var onPrevWeek = function () { return changeWeek("prev"); };
5419
5677
  var onNextMonth = function () { return changeMonth("next"); };
@@ -5431,6 +5689,7 @@ var useCalendar = function (_a) {
5431
5689
  onNextMonth: onNextMonth,
5432
5690
  onPrevMonth: onPrevMonth,
5433
5691
  getDatesBetween: getDatesBetween,
5692
+ onReset: resetToToday,
5434
5693
  };
5435
5694
  };
5436
5695
 
@@ -6312,8 +6571,8 @@ Transition.ENTERED = 3;
6312
6571
  Transition.EXITING = 4;
6313
6572
 
6314
6573
  var CollapseStyled = styled__default.div(templateObject_1$C || (templateObject_1$C = __makeTemplateObject(["\n&&& {\n .collapsed:not(.show) {\n display: none;\n }\n\n .collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n transition: height ", "s ease;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .collapsing {\n transition: none;\n }\n }\n}\n"], ["\n&&& {\n .collapsed:not(.show) {\n display: none;\n }\n\n .collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n transition: height ", "s ease;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .collapsing {\n transition: none;\n }\n }\n}\n"])), function (p) { return p.duration ? p.duration / 1000 : '0.35'; });
6315
- var CollapseWrapper = styled__default.div(templateObject_2$q || (templateObject_2$q = __makeTemplateObject(["\n&&& {\n border: 1px solid ", ";\n border-radius: 5px;\n}\n"], ["\n&&& {\n border: 1px solid ", ";\n border-radius: 5px;\n}\n"])), colors.primary0);
6316
- var CollapsiblePanelTitle = styled__default.div(templateObject_3$j || (templateObject_3$j = __makeTemplateObject(["\n&&& {\n background: #f3f6f7;\n border-bottom: 1px solid ", ";\n color: ", ";\n padding: 20px;\n cursor: pointer;\n}\n"], ["\n&&& {\n background: #f3f6f7;\n border-bottom: 1px solid ", ";\n color: ", ";\n padding: 20px;\n cursor: pointer;\n}\n"])), colors.primary0, colors.primary);
6574
+ var CollapseWrapper = styled__default.div(templateObject_2$q || (templateObject_2$q = __makeTemplateObject(["\n&&& {\n border: 1px solid ", ";\n border-radius: 5px;\n}\n"], ["\n&&& {\n border: 1px solid ", ";\n border-radius: 5px;\n}\n"])), colors$1.primary0);
6575
+ var CollapsiblePanelTitle = styled__default.div(templateObject_3$j || (templateObject_3$j = __makeTemplateObject(["\n&&& {\n background: #f3f6f7;\n border-bottom: 1px solid ", ";\n color: ", ";\n padding: 20px;\n cursor: pointer;\n}\n"], ["\n&&& {\n background: #f3f6f7;\n border-bottom: 1px solid ", ";\n color: ", ";\n padding: 20px;\n cursor: pointer;\n}\n"])), colors$1.primary0, colors$1.primary);
6317
6576
  var transitionStatusToClass = {
6318
6577
  entering: 'collapsing',
6319
6578
  entered: 'collapsed show',
@@ -6409,14 +6668,15 @@ function CollapsiblePanels(_a) {
6409
6668
  var templateObject_1$C, templateObject_2$q, templateObject_3$j;
6410
6669
 
6411
6670
  var ProgressWrapper$1 = styled__default.div(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n max-width: 100%;\n width: 100%;\n height: 48px;\n background: linear-gradient(180deg, rgba(1, 211, 116, 0.051) 0%, rgba(1, 211, 116, 0.1) 100%);\n box-shadow: 0px 4px 5px rgba(72, 78, 86, 0.1);\n border-radius: 50px;\n \n ", "\n"], ["\n max-width: 100%;\n width: 100%;\n height: 48px;\n background: linear-gradient(180deg, rgba(1, 211, 116, 0.051) 0%, rgba(1, 211, 116, 0.1) 100%);\n box-shadow: 0px 4px 5px rgba(72, 78, 86, 0.1);\n border-radius: 50px;\n \n ", "\n"])), SharedStyles);
6412
- var ProgressBar$1 = styled__default.div(templateObject_2$r || (templateObject_2$r = __makeTemplateObject(["\n max-width: 100%;\n width: ", "%;\n height: 48px;\n background: ", ";\n border-radius: 50px;\n display: inline-block;\n position: absolute;\n"], ["\n max-width: 100%;\n width: ", "%;\n height: 48px;\n background: ",
6413
- ";\n border-radius: 50px;\n display: inline-block;\n position: absolute;\n"])), function (props) { return 100 * props.value / props.max; }, function (props) { return props.error ? "#B21154" : (props.color || "#00d374"); });
6671
+ var ProgressBar$1 = styled__default.div(templateObject_2$r || (templateObject_2$r = __makeTemplateObject(["\n max-width: 100%;\n width: ", ";\n height: 48px;\n background: ", ";\n border-radius: 50px;\n display: inline-block;\n position: absolute;\n"], ["\n max-width: 100%;\n width: ", ";\n height: 48px;\n background: ",
6672
+ ";\n border-radius: 50px;\n display: inline-block;\n position: absolute;\n"])), function (p) { return "calc(" + 100 * (!p.max ? 1 : (p.value / p.max)) + "% - (" + (p.left || 0) + "px + 17px))"; }, function (props) { return props.error ? "#B21154" : (props.color || "#00d374"); });
6414
6673
  var StyledProgressTitle = styled__default(Text)(templateObject_3$k || (templateObject_3$k = __makeTemplateObject(["\n display: inline-block;\n position: absolute;\n z-index: 9;\n vertical-align: middle;\n padding: 12px;\n color: #FFFFFF;\n font-size: 18px;\n text-shadow: 0px 1px 2px #40B07E;\n"], ["\n display: inline-block;\n position: absolute;\n z-index: 9;\n vertical-align: middle;\n padding: 12px;\n color: #FFFFFF;\n font-size: 18px;\n text-shadow: 0px 1px 2px #40B07E;\n"])));
6415
6674
  var LabeledBar = function (props) {
6416
6675
  var width = useWindowSize()[0];
6417
- var _a = React.useState({ left: 0, width: 0 }), size = _a[0], setSize = _a[1];
6676
+ var _a = React.useState({ height: 0, width: 0, x: 0, y: 0, }), size = _a[0], setSize = _a[1];
6418
6677
  var measureRef = React.useCallback(function (node) {
6419
- setSize(node === null || node === void 0 ? void 0 : node.getBoundingClientRect());
6678
+ var rect = node === null || node === void 0 ? void 0 : node.getBoundingClientRect();
6679
+ setSize(function (s) { return (rect ? __assign(__assign({}, s), { height: rect.height, x: rect.x, y: rect.y, width: (rect.width > width ? width : rect.width) - rect.x }) : __assign(__assign({}, s), { height: 0, width: 0, x: 0, y: 0 })); });
6420
6680
  }, [width, props.text, props.value]);
6421
6681
  var text = (props.text || '') + '';
6422
6682
  return (React__default.createElement(React__default.Fragment, null,
@@ -6427,9 +6687,8 @@ var LabeledBar = function (props) {
6427
6687
  zIndex: 9,
6428
6688
  marginTop: -25,
6429
6689
  color: '#00d374',
6430
- width: size.width - 10,
6431
6690
  } }, text),
6432
- React__default.createElement(ProgressBar$1, __assign({ ref: measureRef }, props))));
6691
+ React__default.createElement(ProgressBar$1, __assign({ ref: measureRef }, props, { left: size.x }))));
6433
6692
  };
6434
6693
  var MultiProgress = function (_a) {
6435
6694
  var labeled = _a.labeled, error = _a.error, title = _a.title, values = _a.values, maxVal = _a.max, props = __rest(_a, ["labeled", "error", "title", "values", "max"]);
@@ -6439,22 +6698,21 @@ var MultiProgress = function (_a) {
6439
6698
  return React__default.createElement(ProgressWrapper$1, __assign({}, props),
6440
6699
  title ? React__default.createElement(StyledProgressTitle, null, title) : null,
6441
6700
  values.map(function (v, i) {
6442
- var color = i % 2 === 0 ? 'rgba(1, 211, 116, 0.2)' : '#00d374';
6701
+ var color = v.color || (i % 2 === 0 ? 'rgba(1, 211, 116, 0.2)' : '#00d374');
6443
6702
  var val = typeof v.value === 'number' ? v.value : !isNaN(v.value) ? parseInt(v.value) : 0;
6444
- return (labeled ? React__default.createElement(LabeledBar, { value: val < max ? val : max, max: max, error: error, color: color, text: v.text ? v.text(val) : val, key: "multiprogress-bar-" + val + "-" + i }) : React__default.createElement(ProgressBar$1, { value: val < max ? val : max, max: max, error: error, color: color, key: "multiprogress-bar-" + val + "-" + i }));
6703
+ return (labeled ? React__default.createElement(LabeledBar, { value: val < max ? val : max, max: max, error: error, color: color, text: v.text ? v.text(val) : val, key: "multiprogress-bar-" + val + "-" + i, textColor: v.textColor }) : React__default.createElement(ProgressBar$1, { value: val < max ? val : max, max: max, error: error, color: color, key: "multiprogress-bar-" + val + "-" + i }));
6445
6704
  }),
6446
6705
  error ? React__default.createElement(Text, { color: "error", bold: true }, error) : null);
6447
6706
  };
6448
6707
  var LabeledMultiProgress = function (props) {
6449
6708
  return React__default.createElement("div", null,
6709
+ React__default.createElement(MultiProgress, __assign({}, props, { labeled: true })),
6450
6710
  React__default.createElement("span", { style: {
6451
6711
  float: 'right',
6452
6712
  paddingRight: 8,
6453
6713
  } },
6454
6714
  "Target $",
6455
- React__default.createElement(Number$1, { commas: true, decimalPoints: 0, num: props.max })),
6456
- React__default.createElement("br", null),
6457
- React__default.createElement(MultiProgress, { values: props.values, max: props.max, error: props.error, title: props.title, labeled: true }));
6715
+ React__default.createElement(Number$1, { commas: true, decimalPoints: 0, num: props.max })));
6458
6716
  };
6459
6717
  var templateObject_1$D, templateObject_2$r, templateObject_3$k;
6460
6718
 
@@ -6494,7 +6752,7 @@ var DaysHeaderWrapper = styled__default(Row)(templateObject_1$G || (templateObje
6494
6752
  var templateObject_1$G;
6495
6753
 
6496
6754
  var StyledDayText = styled__default(Text)(templateObject_1$H || (templateObject_1$H = __makeTemplateObject(["\n ", "\n"], ["\n ",
6497
- "\n"])), function (props) { return props.selected ? "\n border-radius: 15px;\n background: " + colors.cta + ";\n color: white;\n font-weight: bold;\n padding: 0 5px;\n " : ''; });
6755
+ "\n"])), function (props) { return props.selected ? "\n border-radius: 15px;\n background: " + colors$1.cta + ";\n color: white;\n font-weight: bold;\n padding: 0 5px;\n " : ''; });
6498
6756
  var templateObject_1$H;
6499
6757
 
6500
6758
  var CalendarDaysHeader = function (_a) {
@@ -6532,11 +6790,11 @@ var DefaultCalendarHeader = function (_a) {
6532
6790
  React__default.createElement(Row, null,
6533
6791
  React__default.createElement(LabeledCheckbox, { label: "Weekends", checked: true })))),
6534
6792
  React__default.createElement(Col, { padded: true },
6535
- React__default.createElement("div", { style: { cursor: 'pointer', color: colors.primary, }, onClick: onPrevWeek }, "< Prev Week")),
6793
+ React__default.createElement("div", { style: { cursor: 'pointer', color: colors$1.primary, }, onClick: onPrevWeek }, "< Prev Week")),
6536
6794
  React__default.createElement(Col, { center: true, padded: true },
6537
- React__default.createElement("span", { style: { color: colors.disabledButton } }, format(currentMonth, "MMM yyyy"))),
6795
+ React__default.createElement("span", { style: { color: colors$1.disabledButton } }, format(currentMonth, "MMM yyyy"))),
6538
6796
  React__default.createElement(Col, { end: true, padded: true },
6539
- React__default.createElement("div", { style: { cursor: 'pointer', color: colors.primary, }, onClick: onNextWeek }, "Next Week >"))));
6797
+ React__default.createElement("div", { style: { cursor: 'pointer', color: colors$1.primary, }, onClick: onNextWeek }, "Next Week >"))));
6540
6798
  };
6541
6799
 
6542
6800
  var TasksCalendarDayBody = function (_a) {
@@ -6549,18 +6807,29 @@ var TasksCalendarDayBody = function (_a) {
6549
6807
 
6550
6808
  var WeekNav = styled__default(Text)(templateObject_1$K || (templateObject_1$K = __makeTemplateObject(["\n display: inline-block;\n padding: .9rem .5rem;\n"], ["\n display: inline-block;\n padding: .9rem .5rem;\n"])));
6551
6809
  var TasksCalendarHeader = function (_a) {
6552
- var onPrevWeek = _a.onPrevWeek, onNextWeek = _a.onNextWeek, currentMonth = _a.currentMonth, _b = _a.tabs, tabs = _b === void 0 ? [] : _b, weekendsCheckbox = _a.weekendsCheckbox, _c = _a.showAddTaskBtn, showAddTaskBtn = _c === void 0 ? true : _c, onClickAddTask = _a.onClickAddTask;
6810
+ var onPrevWeek = _a.onPrevWeek, onNextWeek = _a.onNextWeek, currentMonth = _a.currentMonth, currentWeek = _a.currentWeek, onResetDate = _a.onResetDate, selectedDate = _a.selectedDate, _b = _a.tabs, tabs = _b === void 0 ? [] : _b, weekendsCheckbox = _a.weekendsCheckbox, _c = _a.showAddTaskBtn, showAddTaskBtn = _c === void 0 ? true : _c, onClickAddTask = _a.onClickAddTask;
6811
+ var isCurrentWeek = currentWeek === getWeek(selectedDate);
6553
6812
  return (React__default.createElement(HeaderWrapper, { style: { padding: "0.5rem" } },
6554
6813
  React__default.createElement(Col, { start: true, xs: true, md: 7, padded: true },
6555
- React__default.createElement(Tabs, { size: "small", tabs: tabs })),
6814
+ React__default.createElement(Tabs, { size: "medium", tabs: tabs })),
6556
6815
  React__default.createElement(Col, { end: true, xs: true, md: 5, style: { fontSize: '0.8em' } },
6557
6816
  showAddTaskBtn ? React__default.createElement(Button, { onClick: onClickAddTask, style: { marginRight: 10, verticalAlign: 'bottom', } }, "+ Add Task") : null,
6558
6817
  React__default.createElement(Dropdown, { icon: React__default.createElement(GearIcon, { width: "25", color: "#02C0DA" }) },
6559
6818
  React__default.createElement(Row, null, weekendsCheckbox)),
6560
- React__default.createElement(WeekNav, { style: { cursor: 'pointer', color: colors.primary, }, onClick: onPrevWeek },
6819
+ React__default.createElement(WeekNav, { style: { cursor: 'pointer', color: colors$1.primary, }, onClick: onPrevWeek },
6561
6820
  React__default.createElement(NextPrevIcon, { color: "#02C0DA", width: ".8rem" })),
6562
- React__default.createElement(WeekNav, { style: { color: colors.disabledButton, verticalAlign: "middle" } }, currentMonth ? format(currentMonth, "MMM yyyy") : ''),
6563
- React__default.createElement(WeekNav, { style: { cursor: 'pointer', color: colors.primary, }, onClick: onNextWeek },
6821
+ React__default.createElement(WeekNav, { style: { color: colors$1.disabledButton, verticalAlign: "middle" } },
6822
+ currentMonth ? format(currentMonth, "MMM yyyy") : '',
6823
+ !isCurrentWeek ? React__default.createElement("span", { style: {
6824
+ display: 'block',
6825
+ textAlign: 'center',
6826
+ borderRadius: 5,
6827
+ background: '#02c0da',
6828
+ color: '#fff',
6829
+ padding: 4,
6830
+ cursor: 'pointer',
6831
+ }, onClick: function () { return onResetDate(); } }, "Today") : null),
6832
+ React__default.createElement(WeekNav, { style: { cursor: 'pointer', color: colors$1.primary, }, onClick: onNextWeek },
6564
6833
  React__default.createElement(NextPrevIcon, { color: "#02C0DA", width: ".8rem", next: true })))));
6565
6834
  };
6566
6835
  var templateObject_1$K;
@@ -6627,7 +6896,7 @@ function convertTasksToDays(_a) {
6627
6896
  }
6628
6897
  var TasksCalendar = function (_a) {
6629
6898
  var tasks = _a.tasks, _b = _a.headerTabs, headerTabs = _b === void 0 ? [] : _b, _c = _a.footerTasks, footerTasks = _c === void 0 ? [] : _c, _d = _a.components, props = __rest(_a, ["tasks", "headerTabs", "footerTasks", "components"]);
6630
- var _e = useCalendar({}), currentMonth = _e.currentMonth, currentWeek = _e.currentWeek, selectedDate = _e.selectedDate, onNextWeek = _e.onNextWeek, onPrevWeek = _e.onPrevWeek, onNextMonth = _e.onNextMonth, onPrevMonth = _e.onPrevMonth, onClickDay = _e.onClickDay;
6899
+ var _e = useCalendar({}), currentMonth = _e.currentMonth, currentWeek = _e.currentWeek, selectedDate = _e.selectedDate, onNextWeek = _e.onNextWeek, onPrevWeek = _e.onPrevWeek, onNextMonth = _e.onNextMonth, onPrevMonth = _e.onPrevMonth, onClickDay = _e.onClickDay, onReset = _e.onReset;
6631
6900
  var _f = React.useState(convertTasksToDays({ currentMonth: currentMonth, currentWeek: currentWeek, tasks: tasks, })), days = _f[0], setDays = _f[1];
6632
6901
  var headerProps = {
6633
6902
  onNextWeek: onNextWeek,
@@ -6639,7 +6908,7 @@ var TasksCalendar = function (_a) {
6639
6908
  selectedDate: selectedDate,
6640
6909
  };
6641
6910
  return (React__default.createElement(CalendarWrapper, null,
6642
- React__default.createElement(TasksCalendarHeader, __assign({}, headerProps, { tabs: headerTabs, weekendsCheckbox: React__default.createElement("div", null) })),
6911
+ React__default.createElement(TasksCalendarHeader, __assign({}, headerProps, { onResetDate: onReset, tabs: headerTabs, weekendsCheckbox: React__default.createElement("div", null) })),
6643
6912
  React__default.createElement(CalendarDaysHeader, { currentMonth: currentMonth, selectedDate: selectedDate, weekendsCheckbox: React__default.createElement("div", null), weekend: true }),
6644
6913
  React__default.createElement(CalendarDaysBody, { currentMonth: currentMonth, selectedDate: selectedDate, onClickDay: onClickDay, dayBodyProps: { tasks: tasks }, components: { DayBody: TasksCalendarDayBody, }, days: days }),
6645
6914
  React__default.createElement(TasksCalendarFooter, __assign({}, headerProps, { tasks: footerTasks }))));
@@ -6684,7 +6953,9 @@ var DraggableCalendarFooterTasks = function (_a) {
6684
6953
 
6685
6954
  var DroppableFooter = function (_a) {
6686
6955
  var tasks = _a.tasks, props = __rest(_a, ["tasks"]);
6687
- return (React__default.createElement(reactBeautifulDnd.Droppable, { droppableId: 'footer-droppable', key: 'footer-droppable', isDropDisabled: true }, function (provided, snapshot) { return (React__default.createElement("div", __assign({}, droppableChildWrapperProps(provided, snapshot, { style: !tasks.length ? { minHeight: 0 } : { minHeight: 0 } })),
6956
+ return (React__default.createElement(reactBeautifulDnd.Droppable, { droppableId: 'footer-droppable', key: 'footer-droppable', isDropDisabled: true }, function (provided, snapshot) { return (React__default.createElement("div", __assign({}, droppableChildWrapperProps(provided, snapshot, {
6957
+ style: { minHeight: 0, maxHeight: 300, overflow: 'auto' }
6958
+ })),
6688
6959
  provided.placeholder,
6689
6960
  React__default.createElement(DraggableCalendarFooterTasks, __assign({}, props, { tasks: tasks })))); }));
6690
6961
  };
@@ -6726,13 +6997,16 @@ var DroppableDays = function (_a) {
6726
6997
 
6727
6998
  var DraggableTasksCalendar = function (_a) {
6728
6999
  var _b = _a.tasks, tasks = _b === void 0 ? [] : _b, onUpdateTask = _a.onUpdateTask, onClickTask = _a.onClickTask, _c = _a.headerTabs, headerTabs = _c === void 0 ? [] : _c, _d = _a.footerTasks, footerTasks = _d === void 0 ? [] : _d, _e = _a.components, _f = _a.weekend, weekend = _f === void 0 ? false : _f, onChangeWeek = _a.onChangeWeek, onChangeMonth = _a.onChangeMonth, onToggleWeekend = _a.onToggleWeekend, _g = _a.showAddTaskBtn, showAddTaskBtn = _g === void 0 ? true : _g, onClickAddTask = _a.onClickAddTask, _h = _a.loading, loading = _h === void 0 ? false : _h, props = __rest(_a, ["tasks", "onUpdateTask", "onClickTask", "headerTabs", "footerTasks", "components", "weekend", "onChangeWeek", "onChangeMonth", "onToggleWeekend", "showAddTaskBtn", "onClickAddTask", "loading"]);
6729
- var _j = useCalendar({ onChangeWeek: onChangeWeek, onChangeMonth: onChangeMonth }), currentMonth = _j.currentMonth, currentWeek = _j.currentWeek, selectedDate = _j.selectedDate, onNextWeek = _j.onNextWeek, onPrevWeek = _j.onPrevWeek, onNextMonth = _j.onNextMonth, onPrevMonth = _j.onPrevMonth, onClickDay = _j.onClickDay;
7000
+ var _j = useCalendar({ onChangeWeek: onChangeWeek, onChangeMonth: onChangeMonth }), currentMonth = _j.currentMonth, currentWeek = _j.currentWeek, selectedDate = _j.selectedDate, onNextWeek = _j.onNextWeek, onPrevWeek = _j.onPrevWeek, onNextMonth = _j.onNextMonth, onPrevMonth = _j.onPrevMonth, onClickDay = _j.onClickDay, onReset = _j.onReset;
6730
7001
  var _k = React.useState({
6731
7002
  days: convertTasksToDays({ currentMonth: currentMonth, currentWeek: currentWeek, tasks: tasks, }).reduce(function (acc, v) {
6732
7003
  var _a;
6733
7004
  return (__assign(__assign({}, acc), (_a = {}, _a[v.__id__] = v, _a)));
6734
7005
  }, {}),
6735
- footerTasks: footerTasks.filter(function (t) { return t.date ? getWeek(t.date) < currentWeek : false; }),
7006
+ footerTasks: footerTasks.filter(function (t) { return t.date
7007
+ ? (getWeek(t.date) < currentWeek && getYear(t.date) === getYear(currentMonth))
7008
+ || getYear(t.date) < getYear(currentMonth)
7009
+ : false; }),
6736
7010
  }), state = _k[0], setState = _k[1];
6737
7011
  var _l = React.useState(weekend), showWeekend = _l[0], setShowWeekend = _l[1];
6738
7012
  React.useEffect(function () {
@@ -6746,8 +7020,11 @@ var DraggableTasksCalendar = function (_a) {
6746
7020
  }, {}) })); });
6747
7021
  }, [currentMonth, currentWeek, tasks]);
6748
7022
  React.useEffect(function () {
6749
- setState(function (s) { return (__assign(__assign({}, s), { footerTasks: footerTasks.filter(function (t) { return t.date ? getWeek(t.date) < currentWeek : false; }) })); });
6750
- }, [footerTasks, currentWeek]);
7023
+ setState(function (s) { return (__assign(__assign({}, s), { footerTasks: footerTasks.filter(function (t) { return t.date
7024
+ ? (getWeek(t.date) < currentWeek && getYear(t.date) === getYear(currentMonth))
7025
+ || getYear(t.date) < getYear(currentMonth)
7026
+ : false; }) })); });
7027
+ }, [footerTasks, currentWeek, currentMonth]);
6751
7028
  var headerProps = {
6752
7029
  onNextWeek: onNextWeek,
6753
7030
  onPrevWeek: onPrevWeek,
@@ -6835,7 +7112,7 @@ var DraggableTasksCalendar = function (_a) {
6835
7112
  }); } });
6836
7113
  return (React__default.createElement(reactBeautifulDnd.DragDropContext, { onDragEnd: function (result) { return onDragEnd(result); } },
6837
7114
  React__default.createElement(CalendarWrapper, null,
6838
- React__default.createElement(TasksCalendarHeader, __assign({}, headerProps, { tabs: headerTabs, weekendsCheckbox: weekendsCheckbox })),
7115
+ React__default.createElement(TasksCalendarHeader, __assign({}, headerProps, { onResetDate: onReset, tabs: headerTabs, weekendsCheckbox: weekendsCheckbox })),
6839
7116
  React__default.createElement("div", { className: "calendar-scroll" },
6840
7117
  React__default.createElement(CalendarDaysHeader, { currentMonth: currentMonth, selectedDate: selectedDate, weekendsCheckbox: weekendsCheckbox, weekend: showWeekend }),
6841
7118
  loading ? React__default.createElement("div", { style: { height: 400, paddingTop: 30, } },
@@ -6883,25 +7160,43 @@ var scrollbarWidth = function () {
6883
7160
  return scrollbarWidth;
6884
7161
  };
6885
7162
 
6886
- var SimpleWindowedTableStyles = styled__default.div(templateObject_1$L || (templateObject_1$L = __makeTemplateObject(["\npadding: 1rem;\n\n.project-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 .header.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 .th,\n .td {\n margin: 0;\n padding: 0.5rem;\n }\n}\n"], ["\npadding: 1rem;\n\n.project-table-list-rows {\n width: 100% !important;\n\n ",
6887
- "\n}\n\n.table {\n display: inline-block;\n border-spacing: 0;\n width: 100%;\n min-width: 100% !important;\n\n .header.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 .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 " : ''; }, colors.disabledButtonBorder, colors.disabledButtonBorder);
7163
+ var SimpleWindowedTableStyles = styled__default.div(templateObject_1$L || (templateObject_1$L = __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 ",
7164
+ "\n}\n\n.table {\n display: inline-block;\n border-spacing: 0;\n width: 100%;\n min-width: 100% !important;\n\n ",
7165
+ "\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 ",
7166
+ "\n\n /* row selected => if selectedRowStyle === true then set background color else set given styles */\n ",
7167
+ "\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 ?
7168
+ "border: " + (typeof p.bordered === 'string'
7169
+ ? p.bordered
7170
+ : "1px solid " + getThemeColor(p, 'tableBorder', '#edf2f5')) + ";"
7171
+ : ''; }, colors$1.disabledButtonBorder, colors$1.disabledButtonBorder, function (p) { return p.hoverRowBg ?
7172
+ ".tr:not(.header.tr, .table-footer.tr):hover {\n background: " + (typeof p.hoverRowBg === 'string'
7173
+ ? p.hoverRowBg
7174
+ : getThemeColor(p, 'tableHeaderBg', '#F6FEFF')) + ";\n }" : ''; }, function (p) { return p.selectedRowIndex && p.selectedRowStyle ?
7175
+ ".tr:nth-child(" + p.selectedRowIndex + ") {\n " + (typeof p.selectedRowStyle === 'boolean'
7176
+ ? "background: " + getThemeColor(p, 'tableHeaderBg', '#F6FEFF') + ";"
7177
+ : styled.css(p.selectedRowStyle)) + "\n }" : ''; });
6888
7178
  function SimpleWindowedTable(_a) {
6889
- var columns = _a.columns, data = _a.data, _b = _a.itemSize, itemSize = _b === void 0 ? 80 : _b, _c = _a.height, height = _c === void 0 ? 500 : _c, _d = _a.minWidth, minWidth = _d === void 0 ? 140 : _d, _e = _a.maxWidth, maxWidth = _e === void 0 ? 500 : _e, defaultSort = _a.defaultSort, onClickRow = _a.onClickRow, onScroll = _a.onScroll, onUpdateData = _a.onUpdateData, _f = _a.useTableProps, useTableProps = _f === void 0 ? {} : _f;
7179
+ var columns = _a.columns, data = _a.data, _b = _a.itemSize, itemSize = _b === void 0 ? 80 : _b, _c = _a.height, height = _c === void 0 ? 500 : _c, _d = _a.minWidth, minWidth = _d === void 0 ? 140 : _d, _e = _a.maxWidth, maxWidth = _e === void 0 ? 500 : _e, defaultSort = _a.defaultSort, onClickRow = _a.onClickRow, onScroll = _a.onScroll, onUpdateData = _a.onUpdateData, _f = _a.useTableProps, useTableProps = _f === void 0 ? {} : _f, _g = _a.tableHeaderProps, tableHeaderProps = _g === void 0 ? {} : _g, _h = _a.tableFooterProps, tableFooterProps = _h === void 0 ? {} : _h, _j = _a.hideFooter, hideFooter = _j === void 0 ? true : _j, _k = _a.className, className = _k === void 0 ? '' : _k, NoRowsFound = _a.NoRowsFound;
6890
7180
  var defaultColumn = React__default.useMemo(function () { return ({
6891
7181
  minWidth: minWidth,
6892
7182
  maxWidth: maxWidth,
6893
7183
  }); }, [minWidth, maxWidth]);
6894
7184
  var scrollBarSize = React__default.useMemo(function () { return scrollbarWidth(); }, []);
6895
- var _g = reactTable.useTable(__assign({ columns: columns,
7185
+ var _l = reactTable.useTable(__assign({ columns: columns,
6896
7186
  data: data,
6897
- defaultColumn: defaultColumn, initialState: __assign({}, (defaultSort ? { sortBy: [defaultSort] } : {})), onUpdateData: onUpdateData }, useTableProps), reactTable.useSortBy, reactTable.useFlexLayout), getTableProps = _g.getTableProps, getTableBodyProps = _g.getTableBodyProps, headerGroups = _g.headerGroups, rows = _g.rows, totalColumnsWidth = _g.totalColumnsWidth, prepareRow = _g.prepareRow;
7187
+ defaultColumn: defaultColumn, initialState: __assign({}, (defaultSort ? { sortBy: [defaultSort] } : {})), onUpdateData: onUpdateData }, useTableProps), reactTable.useSortBy, reactTable.useFlexLayout), getTableProps = _l.getTableProps, getTableBodyProps = _l.getTableBodyProps, headerGroups = _l.headerGroups, footerGroups = _l.footerGroups, rows = _l.rows, totalColumnsWidth = _l.totalColumnsWidth, prepareRow = _l.prepareRow;
6898
7188
  var headerRef = React.useRef(null);
7189
+ var footerRef = React.useRef(null);
6899
7190
  var rowsRef = React.useRef();
6900
7191
  var onListScroll = function (e) {
6901
7192
  if (headerRef.current && e && e.target) {
6902
7193
  var target = e.target;
6903
7194
  headerRef.current.scrollLeft = target.scrollLeft;
6904
7195
  }
7196
+ if (footerRef.current && e && e.target) {
7197
+ var target = e.target;
7198
+ footerRef.current.scrollLeft = target.scrollLeft;
7199
+ }
6905
7200
  };
6906
7201
  React.useLayoutEffect(function () {
6907
7202
  rowsRef.current && rowsRef.current.addEventListener('scroll', onListScroll);
@@ -6910,21 +7205,46 @@ function SimpleWindowedTable(_a) {
6910
7205
  };
6911
7206
  }, [rowsRef]);
6912
7207
  var RenderRow = React__default.useCallback(function (_a) {
6913
- var index = _a.index, style = _a.style;
7208
+ var index = _a.index, isScrolling = _a.isScrolling, style = _a.style;
6914
7209
  var row = rows[index];
6915
7210
  prepareRow(row);
6916
7211
  return (React__default.createElement("div", __assign({}, row.getRowProps({
6917
7212
  style: style
6918
7213
  }), { className: "tr" }), row.cells.map(function (cell) {
6919
- return (React__default.createElement("div", __assign({ onClick: function () { return onClickRow ? onClickRow(cell.row.original) : null; } }, cell.getCellProps(), { className: "td" }), cell.render("Cell")));
7214
+ var cellProps = cell.getCellProps();
7215
+ return (React__default.createElement("div", __assign({}, cellProps, { onClick: function () { return onClickRow ? onClickRow(cell.row.original, index) : null; }, className: "td " + (cellProps.className || '') }), cell.render("Cell", { isScrolling: isScrolling })));
6920
7216
  })));
6921
7217
  }, [prepareRow, rows, onClickRow]);
6922
- return (React__default.createElement("div", __assign({}, getTableProps(), { className: "table" }),
6923
- React__default.createElement("div", { className: "header-wrapper" }, headerGroups.map(function (headerGroup) { return (React__default.createElement("div", __assign({}, headerGroup.getHeaderGroupProps(), { className: "header tr", ref: headerRef }), headerGroup.headers.map(function (column) { return (React__default.createElement("div", __assign({}, column.getHeaderProps(column.getSortByToggleProps()), { className: "th" }),
7218
+ var getHeaderProps = function (column, isFooter) {
7219
+ if (isFooter === void 0) { isFooter = false; }
7220
+ var headerProps = column.getHeaderProps(__assign(__assign({}, column.getSortByToggleProps()), (column.containerProps || {})));
7221
+ if (isFooter) {
7222
+ headerProps = column.getFooterProps(__assign(__assign({}, column.getSortByToggleProps()), (column.containerProps || {})));
7223
+ }
7224
+ var headerStyles = __assign(__assign({}, (headerProps.style || {})), (column.style || {}));
7225
+ var headerClassNames = __spreadArrays([
7226
+ 'th'
7227
+ ], (headerProps.className || "").split(' '), (column.className || "").split(' ')).filter(function (v) { return v; }).join(' ');
7228
+ return __assign(__assign({}, headerProps), { style: headerStyles, className: headerClassNames });
7229
+ };
7230
+ var getHeaderGroupProps = function (headerGroup, isFooter) {
7231
+ if (isFooter === void 0) { isFooter = false; }
7232
+ var headerGroupProps = headerGroup.getHeaderGroupProps(__assign({}, (headerGroup.containerProps || {})));
7233
+ if (isFooter) {
7234
+ headerGroupProps = headerGroup.getFooterGroupProps(__assign({}, (headerGroup.containerProps || {})));
7235
+ }
7236
+ var headerStyles = __assign(__assign({}, (headerGroupProps.style || {})), (headerGroup.style || {}));
7237
+ var headerClassNames = __spreadArrays([
7238
+ isFooter ? 'footer tr' : 'header tr'
7239
+ ], (headerGroupProps.className || "").split(' '), (headerGroup.className || "").split(' ')).filter(function (v) { return v; }).join(' ');
7240
+ return __assign(__assign({}, headerGroupProps), { style: headerStyles, className: headerClassNames });
7241
+ };
7242
+ return (React__default.createElement("div", __assign({}, getTableProps(), { className: "table " + (className || '') }),
7243
+ React__default.createElement("div", __assign({}, tableHeaderProps, { className: "header-wrapper " + (tableHeaderProps.className || '') }), headerGroups.map(function (headerGroup) { return (React__default.createElement("div", __assign({}, getHeaderGroupProps(headerGroup, false), { className: "header tr", ref: headerRef }), headerGroup.headers.map(function (column) { return (React__default.createElement("div", __assign({}, getHeaderProps(column, false)),
6924
7244
  column.render("Header"),
6925
- React__default.createElement("span", { style: { display: 'inline-block', paddingLeft: 5, verticalAlign: 'text-top' } }, column.isSorted ? (column.isSortedDesc ? React__default.createElement(DownArrowIcon, { width: "15px" }) : React__default.createElement(UpArrowIcon, { width: "15px" })) : React__default.createElement(UpDownArrowsIcon, { width: "15px" })))); }))); })),
6926
- React__default.createElement("div", __assign({}, getTableBodyProps()),
6927
- React__default.createElement(reactWindow.FixedSizeList, { height: height, itemCount: rows.length, itemSize: itemSize, width: totalColumnsWidth + scrollBarSize, className: "project-table-list-rows", outerRef: rowsRef, onScroll: onScroll }, RenderRow))));
7245
+ column.canSort ? React__default.createElement("span", { style: { display: 'inline-block', paddingLeft: 5, verticalAlign: 'text-top' } }, column.isSorted ? (column.isSortedDesc ? React__default.createElement(DownArrowIcon, { width: "15px" }) : React__default.createElement(UpArrowIcon, { width: "15px" })) : React__default.createElement(UpDownArrowsIcon, { width: "15px" })) : null)); }))); })),
7246
+ 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)),
7247
+ !hideFooter ? React__default.createElement("div", __assign({}, tableFooterProps, { className: "table-footer-wrapper " + (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));
6928
7248
  }
6929
7249
  var templateObject_1$L;
6930
7250
 
@@ -6960,6 +7280,7 @@ exports.Backdrop = Backdrop;
6960
7280
  exports.Background = Background;
6961
7281
  exports.Badge = Badge;
6962
7282
  exports.Box = Box;
7283
+ exports.BulletIcon = Icon$6;
6963
7284
  exports.Button = Button;
6964
7285
  exports.ButtonsGroup = ButtonsGroup;
6965
7286
  exports.Calendar = Calendar;
@@ -6972,6 +7293,7 @@ exports.CalendarWrapper = CalendarWrapper;
6972
7293
  exports.ChangeRequestedIcon = ChangeRequestedIcon;
6973
7294
  exports.ChatIcon = ChatIcon;
6974
7295
  exports.CheckMark = CheckMark;
7296
+ exports.CheckmarkIcon = Icon$3;
6975
7297
  exports.CircleProgressIcon = CircleProgressIcon;
6976
7298
  exports.ClientApprovedIcon = ClientApprovedIcon;
6977
7299
  exports.Col = Col;
@@ -7001,6 +7323,7 @@ exports.DropdownItem = DropdownItem;
7001
7323
  exports.Dropzoned = Dropzoned;
7002
7324
  exports.DropzonedPreviews = DropzonedPreviews;
7003
7325
  exports.ErrorBoundary = ErrorBoundary;
7326
+ exports.ErrorIcon = Icon$2;
7004
7327
  exports.FeedPost = FeedPost;
7005
7328
  exports.GearIcon = GearIcon;
7006
7329
  exports.GlobalStyle = GlobalStyle;
@@ -7029,6 +7352,7 @@ exports.LabeledRadio = LabeledRadio;
7029
7352
  exports.LabeledRadioGroup = LabeledRadioGroup;
7030
7353
  exports.LabeledSelect = LabeledSelect;
7031
7354
  exports.LabeledTextarea = LabeledTextarea;
7355
+ exports.LeftArrowIcon = Icon$4;
7032
7356
  exports.Link = Link;
7033
7357
  exports.Loading = Loading;
7034
7358
  exports.LockIcon = LockIcon;
@@ -7061,8 +7385,11 @@ exports.Publisher = Publisher;
7061
7385
  exports.Radio = Radio;
7062
7386
  exports.RadioLabel = RadioLabel;
7063
7387
  exports.ResponsiveTable = ResponsiveTable;
7388
+ exports.RightArrowIcon = Icon$5;
7064
7389
  exports.Row = Row;
7065
7390
  exports.SHARED_STYLE_MAPS = SHARED_STYLE_MAPS;
7391
+ exports.SalesDownArrowIcon = Icon$1;
7392
+ exports.SalesUpArrowIcon = Icon;
7066
7393
  exports.Select = SKUSelect;
7067
7394
  exports.SharedStyles = SharedStyles;
7068
7395
  exports.ShowPopup = ShowPopup;
@@ -7114,7 +7441,7 @@ exports.UpDownArrowsIcon = UpDownArrowsIcon;
7114
7441
  exports.WarningIcon = WarningIcon;
7115
7442
  exports.Wrapper = Wrapper;
7116
7443
  exports.YesMarketingIcon = YesMarketingIcon;
7117
- exports.colors = colors;
7444
+ exports.colors = colors$1;
7118
7445
  exports.fontSizes = fontSizes;
7119
7446
  exports.fonts = fonts;
7120
7447
  exports.getColor = getColor;
@@ -7123,5 +7450,6 @@ exports.getThemeColor = getThemeColor;
7123
7450
  exports.getThemeFontFamily = getThemeFontFamily;
7124
7451
  exports.getThemeFontSize = getThemeFontSize;
7125
7452
  exports.getThemeProperty = getThemeProperty;
7453
+ exports.sizes = sizes$1;
7126
7454
  exports.themeOptions = themeOptions;
7127
7455
  //# sourceMappingURL=index.js.map