@innovaccer/design-system 2.43.0 → 2.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,8 +1,8 @@
1
1
 
2
2
  /**
3
- * Generated on: 1726042613851
3
+ * Generated on: 1727787113166
4
4
  * Package: @innovaccer/design-system
5
- * Version: v2.43.0
5
+ * Version: v2.44.0
6
6
  * License: MIT
7
7
  * Docs: https://mds.innovaccer.com
8
8
  */
@@ -803,7 +803,8 @@ var AvatarContext = /*#__PURE__*/React.createContext({
803
803
  size: 'regular',
804
804
  appearance: 'secondary',
805
805
  firstName: '',
806
- lastName: ''
806
+ lastName: '',
807
+ darkAppearance: []
807
808
  });
808
809
  var AvatarProvider = AvatarContext.Provider;
809
810
 
@@ -821,12 +822,16 @@ var appearanceMapper = {
821
822
  var AvatarIcon = function AvatarIcon(props) {
822
823
  var contextProp = React.useContext(AvatarContext);
823
824
  var size = contextProp.size,
824
- appearance = contextProp.appearance;
825
+ appearance = contextProp.appearance,
826
+ _contextProp$darkAppe = contextProp.darkAppearance,
827
+ darkAppearance = _contextProp$darkAppe === void 0 ? [] : _contextProp$darkAppe;
825
828
  var iconSize = size === 'regular' ? 20 : 16;
826
829
  var iconAppearance = appearance && appearanceMapper[appearance] || 'inverse';
830
+ var IconClassNames = classnames(_defineProperty$1({}, 'Avatar-content', appearance && darkAppearance.includes(appearance)));
827
831
  return /*#__PURE__*/React.createElement(Icon, _extends$2({}, props, {
828
832
  size: iconSize,
829
- appearance: iconAppearance
833
+ appearance: iconAppearance,
834
+ className: IconClassNames
830
835
  }));
831
836
  };
832
837
 
@@ -849,12 +854,13 @@ var AvatarImage = function AvatarImage(props) {
849
854
  var size = contextProp.size,
850
855
  appearance = contextProp.appearance,
851
856
  firstName = contextProp.firstName,
852
- lastName = contextProp.lastName;
857
+ lastName = contextProp.lastName,
858
+ darkAppearance = contextProp.darkAppearance;
853
859
  var baseProps = extractBaseProps(props);
854
860
  var initials = "".concat(firstName ? firstName.trim()[0] : '').concat(lastName ? lastName.trim()[0] : '');
855
861
  var imgSize = size && sizeMapper[size];
856
- var TextClassNames = classnames((_classNames = {}, _defineProperty$1(_classNames, "Avatar-content--".concat(size), size), _defineProperty$1(_classNames, "Avatar-content--".concat(appearance), appearance), _classNames));
857
- var IconClassNames = classnames(_defineProperty$1({}, "Avatar-content--".concat(appearance), appearance));
862
+ var TextClassNames = classnames((_classNames = {}, _defineProperty$1(_classNames, "Avatar-content--".concat(size), size), _defineProperty$1(_classNames, 'Avatar-content', appearance && darkAppearance.includes(appearance)), _classNames));
863
+ var IconClassNames = classnames(_defineProperty$1({}, 'Avatar-content', appearance && darkAppearance.includes(appearance)));
858
864
 
859
865
  var onError = function onError() {
860
866
  setError(true);
@@ -925,17 +931,19 @@ var Avatar = function Avatar(props) {
925
931
  };
926
932
 
927
933
  var AvatarAppearance = appearance || colors[(initials.charCodeAt(0) + (initials.charCodeAt(1) || 0)) % 8] || DefaultAppearance;
934
+ var darkAppearance = ['secondary', 'success', 'warning', 'accent1', 'accent4'];
928
935
  var AvatarClassNames = classnames((_classNames = {
929
936
  Avatar: true
930
937
  }, _defineProperty$1(_classNames, 'Avatar--square', shape === 'square'), _defineProperty$1(_classNames, "Avatar--".concat(size), shape !== 'square'), _defineProperty$1(_classNames, "Avatar--".concat(AvatarAppearance), AvatarAppearance), _defineProperty$1(_classNames, 'Avatar--noInitials', !initials || !withTooltip), _defineProperty$1(_classNames, 'Avatar--disabled', disabled), _defineProperty$1(_classNames, 'Avatar--default', !disabled), _classNames), className);
931
938
  var AvatarWrapperClassNames = classnames((_classNames2 = {}, _defineProperty$1(_classNames2, 'Avatar-wrapper--square', shape === 'square'), _defineProperty$1(_classNames2, "Avatar--".concat(size), shape === 'square'), _classNames2));
932
- var TextClassNames = classnames((_classNames3 = {}, _defineProperty$1(_classNames3, "Avatar-content--".concat(size), size), _defineProperty$1(_classNames3, "Avatar-content--".concat(AvatarAppearance), AvatarAppearance), _classNames3));
933
- var IconClassNames = classnames(_defineProperty$1({}, "Avatar-content--".concat(AvatarAppearance), AvatarAppearance));
939
+ var TextClassNames = classnames((_classNames3 = {}, _defineProperty$1(_classNames3, "Avatar-content--".concat(size), size), _defineProperty$1(_classNames3, 'Avatar-content', darkAppearance.includes(AvatarAppearance)), _classNames3));
940
+ var IconClassNames = classnames(_defineProperty$1({}, 'Avatar-content', darkAppearance.includes(AvatarAppearance)));
934
941
  var sharedProp = {
935
942
  size: size,
936
943
  firstName: firstName,
937
944
  lastName: lastName,
938
- appearance: AvatarAppearance
945
+ appearance: AvatarAppearance,
946
+ darkAppearance: darkAppearance
939
947
  };
940
948
 
941
949
  var renderAvatar = function renderAvatar() {
@@ -1007,7 +1015,7 @@ var AvatarCount = function AvatarCount(props) {
1007
1015
  avatarStyle = props.avatarStyle,
1008
1016
  size = props.size,
1009
1017
  on = props.on;
1010
- var ContentClass = classnames((_classNames = {}, _defineProperty$1(_classNames, "Avatar-content--secondary", true), _defineProperty$1(_classNames, "Avatar-content--tiny", size === 'tiny'), _classNames));
1018
+ var ContentClass = classnames((_classNames = {}, _defineProperty$1(_classNames, 'Avatar-content', true), _defineProperty$1(_classNames, 'Avatar-content--tiny', size === 'tiny'), _classNames));
1011
1019
  var AvatarVariantsClass = classnames((_classNames2 = {
1012
1020
  Avatar: true
1013
1021
  }, _defineProperty$1(_classNames2, "Avatar--regular", size === 'regular'), _defineProperty$1(_classNames2, "Avatar--tiny", size === 'tiny'), _defineProperty$1(_classNames2, "Avatar--secondary", true), _defineProperty$1(_classNames2, 'cursor-default', true), _defineProperty$1(_classNames2, 'cursor-pointer', on === 'click'), _classNames2));
@@ -1021,7 +1029,6 @@ var AvatarCount = function AvatarCount(props) {
1021
1029
  "data-test": "DesignSystem-AvatarGroup--TriggerAvatarVariants",
1022
1030
  className: AvatarVariantsClass
1023
1031
  }, /*#__PURE__*/React.createElement(Text, {
1024
- appearance: 'white',
1025
1032
  className: ContentClass
1026
1033
  }, "+".concat(hiddenAvatarCount))));
1027
1034
  };
@@ -1065,34 +1072,54 @@ var AvatarPopperBody = function AvatarPopperBody(props) {
1065
1072
  var hiddenAvatarList = props.hiddenAvatarList,
1066
1073
  popperRenderer = props.popperRenderer,
1067
1074
  maxHeight = props.maxHeight,
1068
- dark = props.dark;
1075
+ minHeight = props.minHeight,
1076
+ width = props.width,
1077
+ popperClassName = props.popperClassName;
1069
1078
 
1070
1079
  if (popperRenderer) {
1071
1080
  return popperRenderer(hiddenAvatarList);
1072
1081
  }
1073
1082
 
1083
+ var popperClass = classnames(_defineProperty$1({}, 'AvatarGroup-Popper py-3', true), popperClassName);
1074
1084
  return /*#__PURE__*/React.createElement("div", {
1075
- className: "px-4 py-3"
1076
- }, /*#__PURE__*/React.createElement("div", {
1077
- className: "AvatarGroup-TextWrapper",
1078
1085
  style: {
1086
+ width: width,
1087
+ minHeight: minHeight,
1079
1088
  maxHeight: maxHeight
1080
- }
1081
- }, hiddenAvatarList.map(function (item, ind) {
1089
+ },
1090
+ className: popperClass,
1091
+ "data-test": "DesignSystem-AvatarGroup--Popover"
1092
+ }, /*#__PURE__*/React.createElement(Listbox, {
1093
+ showDivider: false,
1094
+ type: "description",
1095
+ size: "compressed",
1096
+ tagName: "ul",
1097
+ "data-test": "DesignSystem-AvatarGroup--List"
1098
+ }, hiddenAvatarList.map(function (item, index) {
1082
1099
  var _item$firstName = item.firstName,
1083
1100
  firstName = _item$firstName === void 0 ? '' : _item$firstName,
1084
1101
  _item$lastName = item.lastName,
1085
1102
  lastName = _item$lastName === void 0 ? '' : _item$lastName,
1086
1103
  _item$tooltipSuffix = item.tooltipSuffix,
1087
- tooltipSuffix = _item$tooltipSuffix === void 0 ? '' : _item$tooltipSuffix;
1104
+ tooltipSuffix = _item$tooltipSuffix === void 0 ? '' : _item$tooltipSuffix,
1105
+ disabled = item.disabled;
1088
1106
  var name = "".concat(firstName, " ").concat(lastName, " ").concat(tooltipSuffix);
1089
- var AvatarTextClass = classnames(_defineProperty$1({}, "mb-4", ind < hiddenAvatarList.length - 1));
1090
- return /*#__PURE__*/React.createElement(Text, {
1091
- key: ind,
1092
- appearance: dark ? 'white' : 'default',
1093
- className: AvatarTextClass,
1094
- "data-test": "DesignSystem-AvatarGroup--Text"
1095
- }, name);
1107
+ var elementRef = React.useRef(null);
1108
+ return /*#__PURE__*/React.createElement(Tooltip, {
1109
+ key: index,
1110
+ showOnTruncation: true,
1111
+ tooltip: name,
1112
+ elementRef: elementRef
1113
+ }, /*#__PURE__*/React.createElement(Listbox.Item, {
1114
+ disabled: disabled,
1115
+ className: "cursor-default",
1116
+ tagName: "li",
1117
+ "data-test": "DesignSystem-AvatarGroup--Item"
1118
+ }, /*#__PURE__*/React.createElement(Text, {
1119
+ ref: elementRef,
1120
+ "data-test": "DesignSystem-AvatarGroup--Text",
1121
+ className: "ellipsis--noWrap"
1122
+ }, name)));
1096
1123
  })));
1097
1124
  };
1098
1125
 
@@ -1106,13 +1133,14 @@ var AvatarGroup = function AvatarGroup(props) {
1106
1133
  size = props.size;
1107
1134
  var popperRenderer = popoverOptions.popperRenderer,
1108
1135
  _popoverOptions$maxHe = popoverOptions.maxHeight,
1109
- maxHeight = _popoverOptions$maxHe === void 0 ? 150 : _popoverOptions$maxHe,
1136
+ maxHeight = _popoverOptions$maxHe === void 0 ? 256 : _popoverOptions$maxHe,
1137
+ _popoverOptions$width = popoverOptions.width,
1138
+ width = _popoverOptions$width === void 0 ? 176 : _popoverOptions$width,
1139
+ minHeight = popoverOptions.minHeight,
1110
1140
  _popoverOptions$posit = popoverOptions.position,
1111
1141
  position = _popoverOptions$posit === void 0 ? 'bottom' : _popoverOptions$posit,
1112
1142
  _popoverOptions$on = popoverOptions.on,
1113
1143
  on = _popoverOptions$on === void 0 ? 'hover' : _popoverOptions$on,
1114
- _popoverOptions$dark = popoverOptions.dark,
1115
- dark = _popoverOptions$dark === void 0 ? true : _popoverOptions$dark,
1116
1144
  _popoverOptions$appen = popoverOptions.appendToBody,
1117
1145
  appendToBody = _popoverOptions$appen === void 0 ? true : _popoverOptions$appen,
1118
1146
  _popoverOptions$poppe = popoverOptions.popperClassName,
@@ -1129,7 +1157,6 @@ var AvatarGroup = function AvatarGroup(props) {
1129
1157
  var avatarStyle = size === 'tiny' ? _objectSpread2(_objectSpread2({}, style), tinyAvatarStyle) : style;
1130
1158
  var avatarList = list.length === 3 ? list : list.slice(0, max);
1131
1159
  var AvatarGroupClass = classnames(_defineProperty$1({}, 'AvatarGroup', true), className);
1132
- var popperClass = classnames(_defineProperty$1({}, 'AvatarGroup-Popper', true), popperClassName);
1133
1160
  return /*#__PURE__*/React.createElement("div", _extends$2({
1134
1161
  "data-test": "DesignSystem-AvatarGroup"
1135
1162
  }, baseProps, {
@@ -1141,7 +1168,6 @@ var AvatarGroup = function AvatarGroup(props) {
1141
1168
  tooltipPosition: tooltipPosition
1142
1169
  }), list.length - max > 0 && list.length !== 3 && /*#__PURE__*/React.createElement(Popover, {
1143
1170
  on: on,
1144
- dark: dark,
1145
1171
  trigger: /*#__PURE__*/React.createElement(AvatarCount, {
1146
1172
  on: on,
1147
1173
  size: size,
@@ -1150,13 +1176,14 @@ var AvatarGroup = function AvatarGroup(props) {
1150
1176
  }),
1151
1177
  position: position,
1152
1178
  appendToBody: appendToBody,
1153
- className: popperClass,
1154
1179
  offset: "medium"
1155
1180
  }, /*#__PURE__*/React.createElement(AvatarPopperBody, {
1156
1181
  hiddenAvatarList: list.slice(max, list.length),
1157
1182
  popperRenderer: popperRenderer,
1158
1183
  maxHeight: maxHeight,
1159
- dark: dark
1184
+ minHeight: minHeight,
1185
+ width: width,
1186
+ popperClassName: popperClassName
1160
1187
  })));
1161
1188
  };
1162
1189
  AvatarGroup.displayName = 'AvatarGroup';
@@ -3753,18 +3780,17 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
3753
3780
  var dateDisabledBefore = convertToDate(disabledBefore, inputFormat, validators);
3754
3781
  var dateDisabledAfter = convertToDate(disabledAfter, inputFormat, validators);
3755
3782
 
3783
+ var isSameDay = function isSameDay(date1, date2) {
3784
+ return date1.getFullYear() === date2.getFullYear() && date1.getMonth() === date2.getMonth() && date1.getDate() === date2.getDate();
3785
+ };
3786
+
3756
3787
  var isTodayDisabled = function isTodayDisabled() {
3757
- var isTodayDateDisabled = true;
3758
-
3759
- if (currDate && dateDisabledBefore && dateDisabledAfter) {
3760
- isTodayDateDisabled = currDate > dateDisabledBefore && currDate < dateDisabledAfter;
3761
- } else if (currDate && dateDisabledBefore) {
3762
- isTodayDateDisabled = currDate > dateDisabledBefore;
3763
- } else if (currDate && dateDisabledAfter) {
3764
- isTodayDateDisabled = currDate < dateDisabledAfter;
3788
+ if (dateDisabledBefore && isSameDay(todayDate, dateDisabledBefore) || dateDisabledAfter && isSameDay(todayDate, dateDisabledAfter)) {
3789
+ return false;
3765
3790
  }
3766
3791
 
3767
- return !isTodayDateDisabled;
3792
+ var isTodayDateDisabled = dateDisabledBefore && todayDate < dateDisabledBefore || dateDisabledAfter && todayDate > dateDisabledAfter;
3793
+ return isTodayDateDisabled;
3768
3794
  };
3769
3795
 
3770
3796
  var todayChipClass = classnames({
@@ -13851,6 +13877,18 @@ var PopperWrapper = /*#__PURE__*/function (_React$Component) {
13851
13877
  return newStyle;
13852
13878
  });
13853
13879
 
13880
+ _defineProperty$1(_assertThisInitialized$1(_this), "onClickHandler", function () {
13881
+ var openDelay = _this.props.openDelay; // to add delay only while opening
13882
+
13883
+ if (openDelay && !_this.state.isOpen) {
13884
+ window.setTimeout(function () {
13885
+ _this.togglePopper('onClick');
13886
+ }, openDelay);
13887
+ } else {
13888
+ _this.togglePopper('onClick');
13889
+ }
13890
+ });
13891
+
13854
13892
  _this.state = {
13855
13893
  animationKeyframe: '',
13856
13894
  isOpen: _this.props.open && !_this.props.disabled || false,
@@ -13960,17 +13998,34 @@ var PopperWrapper = /*#__PURE__*/function (_React$Component) {
13960
13998
  }, {
13961
13999
  key: "handleMouseEnter",
13962
14000
  value: function handleMouseEnter() {
13963
- var on = this.props.on;
14001
+ var _this3 = this;
14002
+
14003
+ var _this$props3 = this.props,
14004
+ on = _this$props3.on,
14005
+ openDelay = _this$props3.openDelay,
14006
+ onToggle = _this$props3.onToggle;
13964
14007
 
13965
14008
  if (on === 'hover') {
13966
14009
  if (this._timer) clearTimeout(this._timer);
13967
- var onToggle = this.props.onToggle;
13968
- onToggle(true, 'mouseEnter');
13969
- this.setState(function () {
13970
- return {
13971
- isOpen: true
13972
- };
13973
- });
14010
+
14011
+ if (openDelay) {
14012
+ this._timer = window.setTimeout(function () {
14013
+ _this3.setState(function () {
14014
+ return {
14015
+ isOpen: true
14016
+ };
14017
+ });
14018
+
14019
+ _this3.togglePopper('mouseEnter', true);
14020
+ }, openDelay);
14021
+ } else {
14022
+ onToggle(true, 'mouseEnter');
14023
+ this.setState(function () {
14024
+ return {
14025
+ isOpen: true
14026
+ };
14027
+ });
14028
+ }
13974
14029
  }
13975
14030
  }
13976
14031
  }, {
@@ -13979,9 +14034,9 @@ var PopperWrapper = /*#__PURE__*/function (_React$Component) {
13979
14034
  var on = this.props.on;
13980
14035
 
13981
14036
  if (on === 'hover') {
13982
- var _this$props3 = this.props,
13983
- hoverable = _this$props3.hoverable,
13984
- onToggle = _this$props3.onToggle;
14037
+ var _this$props4 = this.props,
14038
+ hoverable = _this$props4.hoverable,
14039
+ onToggle = _this$props4.onToggle;
13985
14040
 
13986
14041
  if (hoverable) {
13987
14042
  this.mouseMoveHandler();
@@ -14007,13 +14062,13 @@ var PopperWrapper = /*#__PURE__*/function (_React$Component) {
14007
14062
  }, {
14008
14063
  key: "getTriggerElement",
14009
14064
  value: function getTriggerElement(ref) {
14010
- var _this3 = this;
14065
+ var _this4 = this;
14011
14066
 
14012
- var _this$props4 = this.props,
14013
- trigger = _this$props4.trigger,
14014
- on = _this$props4.on,
14015
- triggerClass = _this$props4.triggerClass,
14016
- disabled = _this$props4.disabled;
14067
+ var _this$props5 = this.props,
14068
+ trigger = _this$props5.trigger,
14069
+ on = _this$props5.on,
14070
+ triggerClass = _this$props5.triggerClass,
14071
+ disabled = _this$props5.disabled;
14017
14072
  var options = on === 'hover' && !disabled ? {
14018
14073
  ref: ref,
14019
14074
  onMouseEnter: this.handleMouseEnter,
@@ -14024,13 +14079,13 @@ var PopperWrapper = /*#__PURE__*/function (_React$Component) {
14024
14079
  ref: ref,
14025
14080
  onClick: function onClick(ev) {
14026
14081
  ev.stopPropagation();
14027
- !disabled && _this3.togglePopper('onClick');
14082
+ !disabled && _this4.onClickHandler();
14028
14083
  }
14029
14084
  };
14030
14085
  var classes = classnames('PopperWrapper-trigger', triggerClass);
14031
14086
 
14032
14087
  var shouldPopoverClose = function shouldPopoverClose(clicked) {
14033
- var popover = _this3.popupRef.current;
14088
+ var popover = _this4.popupRef.current;
14034
14089
  var container = document.body;
14035
14090
  var popoverIndex = popover && parseInt(window.getComputedStyle(popover).zIndex);
14036
14091
  var clickInsideLayer = false;
@@ -14056,13 +14111,13 @@ var PopperWrapper = /*#__PURE__*/function (_React$Component) {
14056
14111
  };
14057
14112
 
14058
14113
  var onOutsideClickHandler = function onOutsideClickHandler(event) {
14059
- var _this3$props = _this3.props,
14060
- open = _this3$props.open,
14061
- closeOnBackdropClick = _this3$props.closeOnBackdropClick;
14114
+ var _this4$props = _this4.props,
14115
+ open = _this4$props.open,
14116
+ closeOnBackdropClick = _this4$props.closeOnBackdropClick;
14062
14117
 
14063
14118
  if (open && shouldPopoverClose(event.target) && closeOnBackdropClick) {
14064
- if (!_this3.doesEventContainsElement(event, _this3.popupRef)) {
14065
- _this3.togglePopper('outsideClick');
14119
+ if (!_this4.doesEventContainsElement(event, _this4.popupRef)) {
14120
+ _this4.togglePopper('outsideClick');
14066
14121
  }
14067
14122
  }
14068
14123
  };
@@ -14075,17 +14130,17 @@ var PopperWrapper = /*#__PURE__*/function (_React$Component) {
14075
14130
  }, {
14076
14131
  key: "getPopperChildren",
14077
14132
  value: function getPopperChildren(_ref) {
14078
- var _this4 = this;
14133
+ var _this5 = this;
14079
14134
 
14080
14135
  var ref = _ref.ref,
14081
14136
  style = _ref.style,
14082
14137
  placement = _ref.placement,
14083
14138
  outOfBoundaries = _ref.outOfBoundaries;
14084
- var _this$props5 = this.props,
14085
- offset = _this$props5.offset,
14086
- children = _this$props5.children,
14087
- open = _this$props5.open,
14088
- animationClass = _this$props5.animationClass;
14139
+ var _this$props6 = this.props,
14140
+ offset = _this$props6.offset,
14141
+ children = _this$props6.children,
14142
+ open = _this$props6.open,
14143
+ animationClass = _this$props6.animationClass;
14089
14144
  var _this$state = this.state,
14090
14145
  zIndex = _this$state.zIndex,
14091
14146
  animationKeyframe = _this$state.animationKeyframe,
@@ -14139,7 +14194,7 @@ var PopperWrapper = /*#__PURE__*/function (_React$Component) {
14139
14194
  onAnimationEnd: function onAnimationEnd() {
14140
14195
  if (!open) {
14141
14196
  flushSync(function () {
14142
- _this4.setState({
14197
+ _this5.setState({
14143
14198
  isOpen: false
14144
14199
  });
14145
14200
  });
@@ -14154,15 +14209,15 @@ var PopperWrapper = /*#__PURE__*/function (_React$Component) {
14154
14209
  }, {
14155
14210
  key: "render",
14156
14211
  value: function render() {
14157
- var _this5 = this;
14212
+ var _this6 = this;
14158
14213
 
14159
- var _this$props6 = this.props,
14160
- placement = _this$props6.placement,
14161
- appendToBody = _this$props6.appendToBody,
14162
- hide = _this$props6.hide,
14163
- boundaryElement = _this$props6.boundaryElement,
14164
- triggerCoordinates = _this$props6.triggerCoordinates,
14165
- computeStyles = _this$props6.computeStyles;
14214
+ var _this$props7 = this.props,
14215
+ placement = _this$props7.placement,
14216
+ appendToBody = _this$props7.appendToBody,
14217
+ hide = _this$props7.hide,
14218
+ boundaryElement = _this$props7.boundaryElement,
14219
+ triggerCoordinates = _this$props7.triggerCoordinates,
14220
+ computeStyles = _this$props7.computeStyles;
14166
14221
  var _this$state2 = this.state,
14167
14222
  animationKeyframe = _this$state2.animationKeyframe,
14168
14223
  isOpen = _this$state2.isOpen;
@@ -14187,7 +14242,7 @@ var PopperWrapper = /*#__PURE__*/function (_React$Component) {
14187
14242
  innerRef: this.triggerRef
14188
14243
  }, function (_ref2) {
14189
14244
  var ref = _ref2.ref;
14190
- return _this5.getTriggerElement(ref);
14245
+ return _this6.getTriggerElement(ref);
14191
14246
  }), isOpen && appendToBody && !triggerCoordinates && /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement(Popper, {
14192
14247
  placement: placement,
14193
14248
  innerRef: this.popupRef,
@@ -24603,7 +24658,7 @@ var AvatarSelectionCount = function AvatarSelectionCount(props) {
24603
24658
  appearance: "secondary",
24604
24659
  className: "SelectionAvatarCount cursor-pointer"
24605
24660
  }, /*#__PURE__*/React.createElement(Text, {
24606
- className: "overflow-hidden"
24661
+ className: "overflow-hidden Avatar-content"
24607
24662
  }, "+".concat(hiddenAvatarCount))));
24608
24663
  };
24609
24664
 
@@ -25331,7 +25386,7 @@ var keyCodes = {
25331
25386
  DELETE: 'Delete',
25332
25387
  ENTER: 'Enter'
25333
25388
  };
25334
- var MultiSelectTrigger = function MultiSelectTrigger(props) {
25389
+ var MultiSelectTrigger = /*#__PURE__*/React.forwardRef(function (props, forwardedInputRef) {
25335
25390
  var _classNames, _classNames2;
25336
25391
 
25337
25392
  var chipOptions = props.chipOptions,
@@ -25352,7 +25407,9 @@ var MultiSelectTrigger = function MultiSelectTrigger(props) {
25352
25407
  role = props.role,
25353
25408
  rest = _objectWithoutProperties(props, _excluded$k);
25354
25409
 
25355
- var inputRef = /*#__PURE__*/React.createRef();
25410
+ var localInputRef = React.useRef();
25411
+ var customRef = React.useRef();
25412
+ var inputElementRef = forwardedInputRef || localInputRef;
25356
25413
 
25357
25414
  var _React$useState = React.useState(value || defaultValue),
25358
25415
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -25371,6 +25428,12 @@ var MultiSelectTrigger = function MultiSelectTrigger(props) {
25371
25428
  setInputValue('');
25372
25429
  }
25373
25430
  }, [value]);
25431
+ React.useEffect(function () {
25432
+ if (inputValue === '' && inputElementRef.current) {
25433
+ inputElementRef.current.style.flexBasis = '0';
25434
+ customRef.current.charCount = null;
25435
+ }
25436
+ }, [inputValue]);
25374
25437
  var ChipInputBorderClass = classnames((_classNames = {}, _defineProperty$1(_classNames, 'ChipInput-border', true), _defineProperty$1(_classNames, 'ChipInput-border--error', error), _classNames));
25375
25438
  var ChipInputClass = classnames((_classNames2 = {
25376
25439
  ChipInput: true
@@ -25450,14 +25513,34 @@ var MultiSelectTrigger = function MultiSelectTrigger(props) {
25450
25513
  };
25451
25514
 
25452
25515
  var onInputChangeHandler = function onInputChangeHandler(event) {
25516
+ var inputElement = inputElementRef.current;
25517
+
25518
+ if (inputElement) {
25519
+ var _customRef$current;
25520
+
25521
+ var charLen = event.target.value.length;
25522
+ var elementScrollWidth = inputElement.scrollWidth;
25523
+ var elementClientWidth = inputElement.clientWidth;
25524
+
25525
+ if (elementScrollWidth > elementClientWidth && inputValue.length <= charLen) {
25526
+ inputElement.style.flexBasis = 'auto';
25527
+
25528
+ if (customRef.current) {
25529
+ customRef.current.charCount = charLen;
25530
+ }
25531
+ } else if (elementScrollWidth <= elementClientWidth && inputValue.length > charLen && charLen <= (((_customRef$current = customRef.current) === null || _customRef$current === void 0 ? void 0 : _customRef$current.charCount) || 0) - 1) {
25532
+ inputElement.style.flexBasis = '0';
25533
+ }
25534
+ }
25535
+
25453
25536
  setInputValue(event.target.value);
25454
25537
  onInputChange && onInputChange(event);
25455
25538
  };
25456
25539
 
25457
25540
  var onClickHandler = function onClickHandler() {
25458
- var _inputRef$current;
25541
+ var _inputElementRef$curr;
25459
25542
 
25460
- (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
25543
+ (_inputElementRef$curr = inputElementRef.current) === null || _inputElementRef$curr === void 0 ? void 0 : _inputElementRef$curr.focus();
25461
25544
  };
25462
25545
 
25463
25546
  var chipComponents = chips.map(function (chip, index) {
@@ -25499,10 +25582,11 @@ var MultiSelectTrigger = function MultiSelectTrigger(props) {
25499
25582
  onClick: onClickHandler,
25500
25583
  tabIndex: disabled ? -1 : tabIndex || 0
25501
25584
  }), /*#__PURE__*/React.createElement("div", {
25502
- className: "ChipInput-wrapper"
25585
+ className: "ChipInput-wrapper",
25586
+ ref: customRef
25503
25587
  }, chips && chips.length > 0 && chipComponents, /*#__PURE__*/React.createElement("input", _extends$2({}, rest, {
25504
25588
  "data-test": "DesignSystem-MultiSelectTrigger--Input",
25505
- ref: props.forwardedRef || inputRef,
25589
+ ref: inputElementRef,
25506
25590
  className: "ChipInput-input",
25507
25591
  autoFocus: autoFocus,
25508
25592
  placeholder: chips && chips.length > 0 ? '' : placeholder,
@@ -25522,7 +25606,7 @@ var MultiSelectTrigger = function MultiSelectTrigger(props) {
25522
25606
  tabIndex: disabled ? -1 : 0
25523
25607
  })))
25524
25608
  );
25525
- };
25609
+ });
25526
25610
  MultiSelectTrigger.displayName = 'MultiSelectTrigger';
25527
25611
  MultiSelectTrigger.defaultProps = {
25528
25612
  chipOptions: {},
@@ -25578,12 +25662,12 @@ var ChipInputBox = function ChipInputBox(props) {
25578
25662
  };
25579
25663
 
25580
25664
  return /*#__PURE__*/React__default.createElement(MultiSelectTrigger, _extends$2({}, props, {
25665
+ ref: inputTriggerRef,
25581
25666
  value: chipInputValue,
25582
25667
  onChange: onChangeHandler,
25583
25668
  onInputChange: onUpdateHandler,
25584
25669
  onKeyDown: onKeyDownHandler,
25585
25670
  tabIndex: -1,
25586
- forwardedRef: inputTriggerRef,
25587
25671
  role: "combobox",
25588
25672
  "aria-haspopup": "listbox",
25589
25673
  "aria-controls": popoverId,
@@ -31506,6 +31590,6 @@ AIResponse.Button = ChatButton;
31506
31590
  AIResponse.ActionBar = ChatActionBar;
31507
31591
  AIResponse.Body = ChatBody;
31508
31592
 
31509
- var version = "2.43.0";
31593
+ var version = "2.44.0";
31510
31594
 
31511
31595
  export { AIButton, AIChip, AIIconButton, AIResponse, ActionCard, Avatar, AvatarGroup, AvatarSelection, Backdrop, Badge, Breadcrumbs, Button, Calendar, Caption, Card, CardBody, CardFooter, CardHeader, CardSubdued, ChatMessage, Checkbox, Chip, ChipGroup, ChipInput, ChoiceList, Collapsible, Column, Combobox, 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, KeyValuePair, Label, Legend, Link, LinkButton, List, Listbox, Menu, Message, MetaList, MetricInput, Modal, ModalBody, ModalDescription, ModalFooter, ModalHeader, MultiSlider, Navigation, OutsideClick, PageHeader, Pagination, Paragraph, Pills, Placeholder, PlaceholderImage, PlaceholderParagraph, Popover, ProgressBar, ProgressRing, Radio, RangeSlider, Row, Sara, SaraSparkle, Select, SelectionCard, Sidesheet, Slider, Spinner, StatusHint, Stepper, Subheading, Switch, Tab, Table, Tabs, TabsWrapper, Text, TextField, Textarea, TimePicker, Toast, Tooltip, index as Utils, VerificationCodeInput, VerticalNav, version };