@innovaccer/design-system 2.28.1 → 2.28.2

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.
@@ -21,10 +21,9 @@
21
21
  }
22
22
 
23
23
  .AvatarGroup-TextWrapper {
24
- padding-right: var(--spacing);
25
24
  display: flex;
26
25
  flex-direction: column;
27
- align-items: flex-end;
26
+ align-items: flex-start;
28
27
  overflow-y: auto;
29
28
  }
30
29
 
@@ -297,7 +297,7 @@
297
297
  "affectsGlobalScope": false
298
298
  },
299
299
  "../../core/components/atoms/avatarGroup/AvatarCount.tsx": {
300
- "version": "9988e292990f14ff0f0dca6ecaa213a5186e646630aec7a668f0c15b1c62beb4",
300
+ "version": "da401f3f5ca599afa1766898c4ee7d47eef9f89461338d3d403a9d1831e839bd",
301
301
  "signature": "28638b5b5c48afd430b5756033eefbe33a8098c1c0f56ee71b8c98c127808d1c",
302
302
  "affectsGlobalScope": false
303
303
  },
@@ -307,12 +307,12 @@
307
307
  "affectsGlobalScope": false
308
308
  },
309
309
  "../../core/components/atoms/avatarGroup/AvatarPopperBody.tsx": {
310
- "version": "d5dd0d781b118bf6c8ebc82796ecb89d79cfd89836f10d19c62df023d1a2c8ff",
310
+ "version": "251491faf78c210aefe885e44f04f3006356976eadfa6609855286693393665b",
311
311
  "signature": "940659bdfd49091e44834ef4d58906fc661666cc467c523aa96a2155126a54f8",
312
312
  "affectsGlobalScope": false
313
313
  },
314
314
  "../../core/components/atoms/avatarGroup/AvatarGroup.tsx": {
315
- "version": "00e07a879d4488cb0321aa4e666afc18293c05275c2f3002ba5679fd9b0106b6",
315
+ "version": "cbacea8958a3fa5cbbe3e6f5ee2f2d1729beb33c7ef37ff78ce41433a22e11a6",
316
316
  "signature": "ce3f3fd390bd9db8bae71aa4bd609a13cc1c13ff45b2a72f8de33ff7677e4cd6",
317
317
  "affectsGlobalScope": false
318
318
  },
@@ -397,7 +397,7 @@
397
397
  "affectsGlobalScope": false
398
398
  },
399
399
  "../../core/components/organisms/calendar/Calendar.tsx": {
400
- "version": "165e8ac85f507625b0876165cd074d67f4e5eec9b0c02be6fd081b17db8040d9",
400
+ "version": "c8d32fe11e264047b15f879838072bbfca4ce87760c9dfa61ac8ca05a39f3821",
401
401
  "signature": "bd837ccd1ca55becef710a181dd2030665fc6a9d889f420e743d9bca9358e48e",
402
402
  "affectsGlobalScope": false
403
403
  },
@@ -532,8 +532,8 @@
532
532
  "affectsGlobalScope": false
533
533
  },
534
534
  "../../core/components/organisms/datePicker/DatePicker.tsx": {
535
- "version": "eaffa8f30bc98a3b0229ae1dfc399bc47b20c882043f026d6f7e52b589126488",
536
- "signature": "60130413fd988c89f00840e237722c22c1cb6827bc0da4d672949b9d941e2f9b",
535
+ "version": "644e587e02b97e870601ee783a5141c8c5c07c8e6c7932c4f6c61298024149d3",
536
+ "signature": "f99b8b90d961894ca71854163d356dfe66f9e96d3792223aee18970f4ba43eb5",
537
537
  "affectsGlobalScope": false
538
538
  },
539
539
  "../../core/components/organisms/datePicker/index.tsx": {
@@ -1202,7 +1202,7 @@
1202
1202
  "affectsGlobalScope": false
1203
1203
  },
1204
1204
  "../../core/components/atoms/popperWrapper/PopperWrapper.tsx": {
1205
- "version": "a9b0f82d2ae14e36df05c70e60ad62c2200abe32e03ac56f4e86bacf43304be4",
1205
+ "version": "e3c046534f85b470978f22f70ddfa4e33b7f0050ca153938cc5b166591f086c7",
1206
1206
  "signature": "d3a1dcb83226bbb67f2a55e75d8024e63960ec04dbff72fef6e01a684ef16b0b",
1207
1207
  "affectsGlobalScope": false
1208
1208
  },
@@ -1247,7 +1247,7 @@
1247
1247
  "affectsGlobalScope": false
1248
1248
  },
1249
1249
  "../../core/components/organisms/dateRangePicker/Trigger.tsx": {
1250
- "version": "fba568d72c7d10f03e95d4fd134e437afd8c8bf14ff9fef0042e7c357671c240",
1250
+ "version": "626a03934d0e0d9c25ccd3d5632d6fe734542542adbc6605609fb195cd45b27a",
1251
1251
  "signature": "8fb63e48afc23facf041aca8ebad538ec833649c1cb291890b8a7edb55a9b10c",
1252
1252
  "affectsGlobalScope": false
1253
1253
  },
@@ -16,6 +16,8 @@ export declare type DatePickerProps = SharedProps & {
16
16
  closeOnSelect: boolean;
17
17
  showTodayDate?: boolean;
18
18
  children?: React.ReactNode;
19
+ onError?: (date: Date | undefined, dateVal?: string) => void;
20
+ popoverOptions?: PopoverOptions;
19
21
  };
20
22
  export interface DatePickerState {
21
23
  init: boolean;
@@ -23,6 +25,11 @@ export interface DatePickerState {
23
25
  error: boolean;
24
26
  open: boolean;
25
27
  }
28
+ interface PopoverOptions {
29
+ appendToBody?: PopoverProps['appendToBody'];
30
+ hideOnReferenceEscape?: PopoverProps['hideOnReferenceEscape'];
31
+ boundaryElement?: PopoverProps['boundaryElement'];
32
+ }
26
33
  export declare class DatePicker extends React.Component<DatePickerProps, DatePickerState> {
27
34
  static defaultProps: {
28
35
  position: string;
package/dist/index.esm.js CHANGED
@@ -1,8 +1,8 @@
1
1
 
2
2
  /**
3
- * Generated on: 1708350879254
3
+ * Generated on: 1709017853977
4
4
  * Package: @innovaccer/design-system
5
- * Version: v2.28.1
5
+ * Version: v2.28.2
6
6
  * License: MIT
7
7
  * Docs: https://innovaccer.github.io/design-system
8
8
  */
@@ -986,16 +986,18 @@ var AvatarCount = function AvatarCount(props) {
986
986
 
987
987
  var hiddenAvatarCount = props.hiddenAvatarCount,
988
988
  avatarStyle = props.avatarStyle,
989
- size = props.size;
989
+ size = props.size,
990
+ on = props.on;
990
991
  var ContentClass = classnames((_classNames = {}, _defineProperty$1(_classNames, "Avatar-content--secondary", true), _defineProperty$1(_classNames, "Avatar-content--tiny", size === 'tiny'), _classNames));
991
992
  var AvatarVariantsClass = classnames((_classNames2 = {
992
993
  Avatar: true
993
- }, _defineProperty$1(_classNames2, "Avatar--regular", size === 'regular'), _defineProperty$1(_classNames2, "Avatar--tiny", size === 'tiny'), _defineProperty$1(_classNames2, "Avatar--secondary", true), _defineProperty$1(_classNames2, 'Avatar--disabled', true), _classNames2));
994
+ }, _defineProperty$1(_classNames2, "Avatar--regular", size === 'regular'), _defineProperty$1(_classNames2, "Avatar--tiny", size === 'tiny'), _defineProperty$1(_classNames2, "Avatar--secondary", true), _defineProperty$1(_classNames2, 'Avatar--disabled', true), _defineProperty$1(_classNames2, 'cursor-pointer', on === 'click'), _classNames2));
994
995
  return /*#__PURE__*/React.createElement("div", {
995
996
  "data-test": "DesignSystem-AvatarGroup--TriggerAvatar",
996
997
  className: "AvatarCount-wrapper",
997
998
  style: avatarStyle
998
999
  }, /*#__PURE__*/React.createElement("span", {
1000
+ "data-test": "DesignSystem-AvatarGroup--TriggerAvatarVariants",
999
1001
  className: AvatarVariantsClass
1000
1002
  }, /*#__PURE__*/React.createElement(Text, {
1001
1003
  appearance: 'white',
@@ -1045,7 +1047,7 @@ var AvatarPopperBody = function AvatarPopperBody(props) {
1045
1047
  }
1046
1048
 
1047
1049
  return /*#__PURE__*/React.createElement("div", {
1048
- className: "py-6 pr-4 pl-6"
1050
+ className: "px-4 py-3"
1049
1051
  }, /*#__PURE__*/React.createElement("div", {
1050
1052
  className: "AvatarGroup-TextWrapper",
1051
1053
  style: {
@@ -1057,7 +1059,7 @@ var AvatarPopperBody = function AvatarPopperBody(props) {
1057
1059
  _item$lastName = item.lastName,
1058
1060
  lastName = _item$lastName === void 0 ? '' : _item$lastName;
1059
1061
  var name = "".concat(firstName, " ").concat(lastName);
1060
- var AvatarTextClass = classnames(_defineProperty$1({}, "mb-5", ind < hiddenAvatarList.length - 1));
1062
+ var AvatarTextClass = classnames(_defineProperty$1({}, "mb-4", ind < hiddenAvatarList.length - 1));
1061
1063
  return /*#__PURE__*/React.createElement(Text, {
1062
1064
  key: ind,
1063
1065
  appearance: dark ? 'white' : 'default',
@@ -1098,6 +1100,7 @@ var AvatarGroup = function AvatarGroup(props) {
1098
1100
  boxShadow: "0 0 0 var(--spacing-s) ".concat(borderColor)
1099
1101
  };
1100
1102
  var avatarStyle = size === 'tiny' ? _objectSpread2(_objectSpread2({}, style), tinyAvatarStyle) : style;
1103
+ var avatarList = list.length === 3 ? list : list.slice(0, max);
1101
1104
  var AvatarGroupClass = classnames(_defineProperty$1({}, 'AvatarGroup', true), className);
1102
1105
  var popperClass = classnames(_defineProperty$1({}, 'AvatarGroup-Popper', true), popperClassName);
1103
1106
  return /*#__PURE__*/React.createElement("div", _extends$2({
@@ -1106,13 +1109,14 @@ var AvatarGroup = function AvatarGroup(props) {
1106
1109
  className: "".concat(AvatarGroupClass, " d-inline-flex")
1107
1110
  }), /*#__PURE__*/React.createElement(Avatars, {
1108
1111
  size: size,
1109
- avatarList: list.slice(0, max),
1112
+ avatarList: avatarList,
1110
1113
  avatarStyle: avatarStyle,
1111
1114
  tooltipPosition: tooltipPosition
1112
- }), list.length - max > 0 && /*#__PURE__*/React.createElement(Popover, {
1115
+ }), list.length - max > 0 && list.length !== 3 && /*#__PURE__*/React.createElement(Popover, {
1113
1116
  on: on,
1114
1117
  dark: dark,
1115
1118
  trigger: /*#__PURE__*/React.createElement(AvatarCount, {
1119
+ on: on,
1116
1120
  size: size,
1117
1121
  hiddenAvatarCount: hiddenAvatarCount,
1118
1122
  avatarStyle: avatarStyle
@@ -2487,7 +2491,7 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
2487
2491
  _createClass(Calendar, [{
2488
2492
  key: "componentDidUpdate",
2489
2493
  value: function componentDidUpdate(prevProps, prevState) {
2490
- var _prevState$startDate, _this$state$startDate, _prevState$endDate, _this$state$endDate;
2494
+ var _prevState$startDate, _this$state$startDate, _this$state$endDate, _prevState$endDate, _this$state$endDate2;
2491
2495
 
2492
2496
  var monthsInView = this.props.monthsInView;
2493
2497
 
@@ -2504,7 +2508,7 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
2504
2508
  });
2505
2509
  }
2506
2510
 
2507
- if (prevProps.startDate !== this.props.startDate) {
2511
+ if (this.props.startDate && !isNaN(this.props.startDate.getTime()) && prevProps.startDate !== this.props.startDate) {
2508
2512
  var _d = convertToDate(this.props.startDate);
2509
2513
 
2510
2514
  this.setState({
@@ -2512,7 +2516,7 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
2512
2516
  });
2513
2517
  }
2514
2518
 
2515
- if (prevProps.endDate !== this.props.endDate) {
2519
+ if (this.props.endDate && !isNaN(this.props.endDate.getTime()) && prevProps.endDate !== this.props.endDate) {
2516
2520
  var _d2 = convertToDate(this.props.endDate);
2517
2521
 
2518
2522
  this.setState({
@@ -2611,7 +2615,7 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
2611
2615
  }
2612
2616
  }
2613
2617
 
2614
- if (((_prevState$startDate = prevState.startDate) === null || _prevState$startDate === void 0 ? void 0 : _prevState$startDate.getTime()) !== ((_this$state$startDate = this.state.startDate) === null || _this$state$startDate === void 0 ? void 0 : _this$state$startDate.getTime()) || ((_prevState$endDate = prevState.endDate) === null || _prevState$endDate === void 0 ? void 0 : _prevState$endDate.getTime()) !== ((_this$state$endDate = this.state.endDate) === null || _this$state$endDate === void 0 ? void 0 : _this$state$endDate.getTime())) {
2618
+ if (this.state.startDate && !isNaN(this.state.startDate.getTime()) && ((_prevState$startDate = prevState.startDate) === null || _prevState$startDate === void 0 ? void 0 : _prevState$startDate.getTime()) !== ((_this$state$startDate = this.state.startDate) === null || _this$state$startDate === void 0 ? void 0 : _this$state$startDate.getTime()) || this.state.endDate && !isNaN((_this$state$endDate = this.state.endDate) === null || _this$state$endDate === void 0 ? void 0 : _this$state$endDate.getTime()) && ((_prevState$endDate = prevState.endDate) === null || _prevState$endDate === void 0 ? void 0 : _prevState$endDate.getTime()) !== ((_this$state$endDate2 = this.state.endDate) === null || _this$state$endDate2 === void 0 ? void 0 : _this$state$endDate2.getTime())) {
2615
2619
  var onRangeChange = this.props.onRangeChange;
2616
2620
  var _this$state10 = this.state,
2617
2621
  _startDate4 = _this$state10.startDate,
@@ -3480,7 +3484,10 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
3480
3484
  _defineProperty$1(_assertThisInitialized$1(_this), "getError", function (date) {
3481
3485
  var _this$props = _this.props,
3482
3486
  disabledBefore = _this$props.disabledBefore,
3483
- disabledAfter = _this$props.disabledAfter;
3487
+ disabledAfter = _this$props.disabledAfter,
3488
+ outputFormat = _this$props.outputFormat,
3489
+ onError = _this$props.onError;
3490
+ if (!date) return false;
3484
3491
 
3485
3492
  var _getDateInfo = getDateInfo(disabledBefore),
3486
3493
  dbYear = _getDateInfo.year,
@@ -3492,7 +3499,16 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
3492
3499
  daMonth = _getDateInfo2.month,
3493
3500
  daDate = _getDateInfo2.date;
3494
3501
 
3495
- return !date ? false : compareDate(date, 'less', dbYear, dbMonth, dbDate) || compareDate(date, 'more', daYear, daMonth, daDate);
3502
+ if (compareDate(date, 'less', dbYear, dbMonth, dbDate) || compareDate(date, 'more', daYear, daMonth, daDate)) {
3503
+ if (onError) {
3504
+ var dVal = translateToString(outputFormat, date);
3505
+ onError(date, dVal);
3506
+ }
3507
+
3508
+ return true;
3509
+ }
3510
+
3511
+ return false;
3496
3512
  });
3497
3513
 
3498
3514
  _defineProperty$1(_assertThisInitialized$1(_this), "onDateChangeHandler", function (d) {
@@ -3667,24 +3683,26 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
3667
3683
  withInput = _this$props5.withInput,
3668
3684
  inputFormat = _this$props5.inputFormat,
3669
3685
  inputOptions = _this$props5.inputOptions,
3670
- validators = _this$props5.validators;
3686
+ validators = _this$props5.validators,
3687
+ popoverOptions = _this$props5.popoverOptions;
3671
3688
  var open = this.state.open;
3672
3689
 
3673
3690
  if (withInput) {
3674
- return /*#__PURE__*/React.createElement(Popover, {
3691
+ return /*#__PURE__*/React.createElement(Popover, _extends$2({
3675
3692
  trigger: /*#__PURE__*/React.createElement(Trigger$1, {
3676
3693
  inputFormat: inputFormat,
3677
3694
  inputOptions: inputOptions,
3678
3695
  validators: validators,
3679
3696
  state: this.state,
3680
3697
  setState: this.setState.bind(this)
3681
- }),
3698
+ })
3699
+ }, popoverOptions, {
3682
3700
  triggerClass: "w-100",
3683
3701
  position: position,
3684
3702
  appendToBody: true,
3685
3703
  open: open,
3686
3704
  onToggle: this.onToggleHandler
3687
- }, this.renderCalendar());
3705
+ }), this.renderCalendar());
3688
3706
  }
3689
3707
 
3690
3708
  return this.renderCalendar();
@@ -13760,14 +13778,14 @@ var PopperWrapper = /*#__PURE__*/function (_React$Component) {
13760
13778
  }, {
13761
13779
  key: "addBoundaryScrollHandler",
13762
13780
  value: function addBoundaryScrollHandler() {
13763
- if (this.props.boundaryElement) {
13781
+ if (this.props.boundaryElement && this.props.boundaryElement.addEventListener) {
13764
13782
  this.props.boundaryElement.addEventListener('scroll', this.boundaryScrollHandler);
13765
13783
  }
13766
13784
  }
13767
13785
  }, {
13768
13786
  key: "removeBoundaryScrollHandler",
13769
13787
  value: function removeBoundaryScrollHandler() {
13770
- if (this.props.boundaryElement) {
13788
+ if (this.props.boundaryElement && this.props.boundaryElement.removeEventListener) {
13771
13789
  this.props.boundaryElement.removeEventListener('scroll', this.boundaryScrollHandler);
13772
13790
  }
13773
13791
  }
@@ -16808,7 +16826,7 @@ var Trigger = function Trigger(props) {
16808
16826
  if (val && !val.includes(placeholderChar)) {
16809
16827
  var d = translateToDate(inputFormat, val, validators);
16810
16828
 
16811
- if (d) {
16829
+ if (d && !isNaN(d.getTime())) {
16812
16830
  setState({
16813
16831
  startDate: d
16814
16832
  });
@@ -16835,7 +16853,7 @@ var Trigger = function Trigger(props) {
16835
16853
  if (val && !val.includes(_placeholderChar2)) {
16836
16854
  var _d2 = translateToDate(inputFormat, val, validators);
16837
16855
 
16838
- if (_d2) setState({
16856
+ if (_d2 && !isNaN(_d2.getTime())) setState({
16839
16857
  endDate: _d2
16840
16858
  });
16841
16859
  }
@@ -23591,6 +23609,6 @@ var TextField = function TextField(props) {
23591
23609
  };
23592
23610
  TextField.displayName = 'TextField';
23593
23611
 
23594
- var version = "2.28.1";
23612
+ var version = "2.28.2";
23595
23613
 
23596
23614
  export { ActionCard, Avatar, AvatarGroup, Backdrop, Badge, Breadcrumbs, Button, Calendar, Caption, Card, CardBody, CardFooter, CardHeader, CardSubdued, ChatMessage, Checkbox, Chip, ChipGroup, ChipInput, ChoiceList, Collapsible, Column, DatePicker, DateRangePicker, Dialog, Divider, Dropdown, Dropzone, EditableChipInput, EditableDropdown, EditableInput, EmptyState, FileList, FileUploader, FileUploaderList, FullscreenModal, Grid, GridCell, Heading, HelpText, HorizontalNav, Icon, InlineMessage, Input, X as InputMask, Label, Legend, Link, LinkButton, List, Listbox, Message, MetaList, MetricInput, Modal, ModalBody, ModalDescription, ModalFooter, ModalHeader, MultiSlider, Navigation, OutsideClick, PageHeader, Pagination, Paragraph, Pills, Placeholder, PlaceholderImage, PlaceholderParagraph, Popover, ProgressBar, ProgressRing, Radio, RangeSlider, Row, SelectionCard, Sidesheet, Slider, Spinner, StatusHint, Stepper, Subheading, Switch, Tab, Table, Tabs, TabsWrapper, Text, TextField, Textarea, TimePicker, Toast, Tooltip, index as Utils, VerificationCodeInput, VerticalNav, version };
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
 
2
2
  /**
3
- * Generated on: 1708350879498
3
+ * Generated on: 1709017854213
4
4
  * Package: @innovaccer/design-system
5
- * Version: v2.28.1
5
+ * Version: v2.28.2
6
6
  * License: MIT
7
7
  * Docs: https://innovaccer.github.io/design-system
8
8
  */
@@ -628,16 +628,18 @@
628
628
 
629
629
  var hiddenAvatarCount = props.hiddenAvatarCount,
630
630
  avatarStyle = props.avatarStyle,
631
- size = props.size;
631
+ size = props.size,
632
+ on = props.on;
632
633
  var ContentClass = classNames__default["default"]((_a = {}, _a["Avatar-content--secondary"] = true, _a["Avatar-content--tiny"] = size === 'tiny', _a));
633
634
  var AvatarVariantsClass = classNames__default["default"]((_b = {
634
635
  Avatar: true
635
- }, _b["Avatar--regular"] = size === 'regular', _b["Avatar--tiny"] = size === 'tiny', _b["Avatar--secondary"] = true, _b['Avatar--disabled'] = true, _b));
636
+ }, _b["Avatar--regular"] = size === 'regular', _b["Avatar--tiny"] = size === 'tiny', _b["Avatar--secondary"] = true, _b['Avatar--disabled'] = true, _b['cursor-pointer'] = on === 'click', _b));
636
637
  return /*#__PURE__*/React__namespace.createElement("div", {
637
638
  "data-test": "DesignSystem-AvatarGroup--TriggerAvatar",
638
639
  className: "AvatarCount-wrapper",
639
640
  style: avatarStyle
640
641
  }, /*#__PURE__*/React__namespace.createElement("span", {
642
+ "data-test": "DesignSystem-AvatarGroup--TriggerAvatarVariants",
641
643
  className: AvatarVariantsClass
642
644
  }, /*#__PURE__*/React__namespace.createElement(Text, {
643
645
  appearance: 'white',
@@ -687,7 +689,7 @@
687
689
  }
688
690
 
689
691
  return /*#__PURE__*/React__namespace.createElement("div", {
690
- className: "py-6 pr-4 pl-6"
692
+ className: "px-4 py-3"
691
693
  }, /*#__PURE__*/React__namespace.createElement("div", {
692
694
  className: "AvatarGroup-TextWrapper",
693
695
  style: {
@@ -701,7 +703,7 @@
701
703
  _c = item.lastName,
702
704
  lastName = _c === void 0 ? '' : _c;
703
705
  var name = firstName + " " + lastName;
704
- var AvatarTextClass = classNames__default["default"]((_a = {}, _a["mb-5"] = ind < hiddenAvatarList.length - 1, _a));
706
+ var AvatarTextClass = classNames__default["default"]((_a = {}, _a["mb-4"] = ind < hiddenAvatarList.length - 1, _a));
705
707
  return /*#__PURE__*/React__namespace.createElement(Text, {
706
708
  key: ind,
707
709
  appearance: dark ? 'white' : 'default',
@@ -744,6 +746,7 @@
744
746
  boxShadow: "0 0 0 var(--spacing-s) " + borderColor
745
747
  };
746
748
  var avatarStyle = size === 'tiny' ? __assign(__assign({}, style), tinyAvatarStyle) : style;
749
+ var avatarList = list.length === 3 ? list : list.slice(0, max);
747
750
  var AvatarGroupClass = classNames__default["default"]((_a = {}, _a['AvatarGroup'] = true, _a), className);
748
751
  var popperClass = classNames__default["default"]((_b = {}, _b['AvatarGroup-Popper'] = true, _b), popperClassName);
749
752
  return /*#__PURE__*/React__namespace.createElement("div", __assign({
@@ -752,13 +755,14 @@
752
755
  className: AvatarGroupClass + " d-inline-flex"
753
756
  }), /*#__PURE__*/React__namespace.createElement(Avatars, {
754
757
  size: size,
755
- avatarList: list.slice(0, max),
758
+ avatarList: avatarList,
756
759
  avatarStyle: avatarStyle,
757
760
  tooltipPosition: tooltipPosition
758
- }), list.length - max > 0 && /*#__PURE__*/React__namespace.createElement(Popover, {
761
+ }), list.length - max > 0 && list.length !== 3 && /*#__PURE__*/React__namespace.createElement(Popover, {
759
762
  on: on,
760
763
  dark: dark,
761
764
  trigger: /*#__PURE__*/React__namespace.createElement(AvatarCount, {
765
+ on: on,
762
766
  size: size,
763
767
  hiddenAvatarCount: hiddenAvatarCount,
764
768
  avatarStyle: avatarStyle
@@ -2117,15 +2121,15 @@
2117
2121
  }
2118
2122
 
2119
2123
  Calendar.prototype.componentDidUpdate = function (prevProps, prevState) {
2120
- var _a, _b, _c, _d;
2124
+ var _a, _b, _c, _d, _e;
2121
2125
 
2122
2126
  var monthsInView = this.props.monthsInView;
2123
2127
 
2124
2128
  if (prevProps.date !== this.props.date) {
2125
- var _e = getDateInfo(this.props.date),
2126
- year = _e.year,
2127
- month = _e.month,
2128
- date = _e.date;
2129
+ var _f = getDateInfo(this.props.date),
2130
+ year = _f.year,
2131
+ month = _f.month,
2132
+ date = _f.date;
2129
2133
 
2130
2134
  this.updateState(year, month, date);
2131
2135
  var d = convertToDate(this.props.date);
@@ -2134,14 +2138,14 @@
2134
2138
  });
2135
2139
  }
2136
2140
 
2137
- if (prevProps.startDate !== this.props.startDate) {
2141
+ if (this.props.startDate && !isNaN(this.props.startDate.getTime()) && prevProps.startDate !== this.props.startDate) {
2138
2142
  var d = convertToDate(this.props.startDate);
2139
2143
  this.setState({
2140
2144
  startDate: d
2141
2145
  });
2142
2146
  }
2143
2147
 
2144
- if (prevProps.endDate !== this.props.endDate) {
2148
+ if (this.props.endDate && !isNaN(this.props.endDate.getTime()) && prevProps.endDate !== this.props.endDate) {
2145
2149
  var d = convertToDate(this.props.endDate);
2146
2150
  this.setState({
2147
2151
  endDate: d
@@ -2178,13 +2182,13 @@
2178
2182
  }
2179
2183
 
2180
2184
  if (prevState.currDate !== this.state.currDate) {
2181
- var _f = this.props,
2182
- rangePicker = _f.rangePicker,
2183
- onDateChange = _f.onDateChange;
2184
- var _g = this.state,
2185
- currDate = _g.currDate,
2186
- startDate = _g.startDate,
2187
- endDate = _g.endDate;
2185
+ var _g = this.props,
2186
+ rangePicker = _g.rangePicker,
2187
+ onDateChange = _g.onDateChange;
2188
+ var _h = this.state,
2189
+ currDate = _h.currDate,
2190
+ startDate = _h.startDate,
2191
+ endDate = _h.endDate;
2188
2192
 
2189
2193
  if (currDate) {
2190
2194
  if (onDateChange) onDateChange(currDate);
@@ -2200,10 +2204,10 @@
2200
2204
  endDate: undefined
2201
2205
  });
2202
2206
  } else {
2203
- var _h = getDateInfo(currDate),
2204
- year = _h.year,
2205
- month = _h.month,
2206
- date = _h.date;
2207
+ var _j = getDateInfo(currDate),
2208
+ year = _j.year,
2209
+ month = _j.month,
2210
+ date = _j.date;
2207
2211
 
2208
2212
  if (startDate) {
2209
2213
  if (compareDate(startDate, 'more', year, month, date)) {
@@ -2239,11 +2243,11 @@
2239
2243
  }
2240
2244
  }
2241
2245
 
2242
- if (((_a = prevState.startDate) === null || _a === void 0 ? void 0 : _a.getTime()) !== ((_b = this.state.startDate) === null || _b === void 0 ? void 0 : _b.getTime()) || ((_c = prevState.endDate) === null || _c === void 0 ? void 0 : _c.getTime()) !== ((_d = this.state.endDate) === null || _d === void 0 ? void 0 : _d.getTime())) {
2246
+ if (this.state.startDate && !isNaN(this.state.startDate.getTime()) && ((_a = prevState.startDate) === null || _a === void 0 ? void 0 : _a.getTime()) !== ((_b = this.state.startDate) === null || _b === void 0 ? void 0 : _b.getTime()) || this.state.endDate && !isNaN((_c = this.state.endDate) === null || _c === void 0 ? void 0 : _c.getTime()) && ((_d = prevState.endDate) === null || _d === void 0 ? void 0 : _d.getTime()) !== ((_e = this.state.endDate) === null || _e === void 0 ? void 0 : _e.getTime())) {
2243
2247
  var onRangeChange = this.props.onRangeChange;
2244
- var _j = this.state,
2245
- startDate = _j.startDate,
2246
- endDate = _j.endDate;
2248
+ var _k = this.state,
2249
+ startDate = _k.startDate,
2250
+ endDate = _k.endDate;
2247
2251
  if (onRangeChange) onRangeChange(startDate, endDate);
2248
2252
  }
2249
2253
 
@@ -3078,7 +3082,10 @@
3078
3082
  _this.getError = function (date) {
3079
3083
  var _a = _this.props,
3080
3084
  disabledBefore = _a.disabledBefore,
3081
- disabledAfter = _a.disabledAfter;
3085
+ disabledAfter = _a.disabledAfter,
3086
+ outputFormat = _a.outputFormat,
3087
+ onError = _a.onError;
3088
+ if (!date) return false;
3082
3089
 
3083
3090
  var _b = getDateInfo(disabledBefore),
3084
3091
  dbYear = _b.year,
@@ -3090,7 +3097,16 @@
3090
3097
  daMonth = _c.month,
3091
3098
  daDate = _c.date;
3092
3099
 
3093
- return !date ? false : compareDate(date, 'less', dbYear, dbMonth, dbDate) || compareDate(date, 'more', daYear, daMonth, daDate);
3100
+ if (compareDate(date, 'less', dbYear, dbMonth, dbDate) || compareDate(date, 'more', daYear, daMonth, daDate)) {
3101
+ if (onError) {
3102
+ var dVal = translateToString(outputFormat, date);
3103
+ onError(date, dVal);
3104
+ }
3105
+
3106
+ return true;
3107
+ }
3108
+
3109
+ return false;
3094
3110
  };
3095
3111
 
3096
3112
  _this.onDateChangeHandler = function (d) {
@@ -3260,24 +3276,26 @@
3260
3276
  withInput = _a.withInput,
3261
3277
  inputFormat = _a.inputFormat,
3262
3278
  inputOptions = _a.inputOptions,
3263
- validators = _a.validators;
3279
+ validators = _a.validators,
3280
+ popoverOptions = _a.popoverOptions;
3264
3281
  var open = this.state.open;
3265
3282
 
3266
3283
  if (withInput) {
3267
- return /*#__PURE__*/React__namespace.createElement(Popover, {
3284
+ return /*#__PURE__*/React__namespace.createElement(Popover, __assign({
3268
3285
  trigger: /*#__PURE__*/React__namespace.createElement(Trigger$1, {
3269
3286
  inputFormat: inputFormat,
3270
3287
  inputOptions: inputOptions,
3271
3288
  validators: validators,
3272
3289
  state: this.state,
3273
3290
  setState: this.setState.bind(this)
3274
- }),
3291
+ })
3292
+ }, popoverOptions, {
3275
3293
  triggerClass: "w-100",
3276
3294
  position: position,
3277
3295
  appendToBody: true,
3278
3296
  open: open,
3279
3297
  onToggle: this.onToggleHandler
3280
- }, this.renderCalendar());
3298
+ }), this.renderCalendar());
3281
3299
  }
3282
3300
 
3283
3301
  return this.renderCalendar();
@@ -8449,13 +8467,13 @@
8449
8467
  };
8450
8468
 
8451
8469
  PopperWrapper.prototype.addBoundaryScrollHandler = function () {
8452
- if (this.props.boundaryElement) {
8470
+ if (this.props.boundaryElement && this.props.boundaryElement.addEventListener) {
8453
8471
  this.props.boundaryElement.addEventListener('scroll', this.boundaryScrollHandler);
8454
8472
  }
8455
8473
  };
8456
8474
 
8457
8475
  PopperWrapper.prototype.removeBoundaryScrollHandler = function () {
8458
- if (this.props.boundaryElement) {
8476
+ if (this.props.boundaryElement && this.props.boundaryElement.removeEventListener) {
8459
8477
  this.props.boundaryElement.removeEventListener('scroll', this.boundaryScrollHandler);
8460
8478
  }
8461
8479
  };
@@ -11334,7 +11352,7 @@
11334
11352
  if (val && !val.includes(placeholderChar)) {
11335
11353
  var d = translateToDate(inputFormat, val, validators);
11336
11354
 
11337
- if (d) {
11355
+ if (d && !isNaN(d.getTime())) {
11338
11356
  setState({
11339
11357
  startDate: d
11340
11358
  });
@@ -11360,7 +11378,7 @@
11360
11378
 
11361
11379
  if (val && !val.includes(placeholderChar)) {
11362
11380
  var d = translateToDate(inputFormat, val, validators);
11363
- if (d) setState({
11381
+ if (d && !isNaN(d.getTime())) setState({
11364
11382
  endDate: d
11365
11383
  });
11366
11384
  }
@@ -17824,7 +17842,7 @@
17824
17842
  };
17825
17843
  TextField.displayName = 'TextField';
17826
17844
 
17827
- var version = "2.28.1";
17845
+ var version = "2.28.2";
17828
17846
 
17829
17847
  exports.ActionCard = ActionCard;
17830
17848
  exports.Avatar = Avatar;