@innovaccer/design-system 2.29.0 → 2.30.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/css/dist/index.css +42 -0
  3. package/css/dist/index.css.map +1 -1
  4. package/css/src/components/calendar.css +4 -0
  5. package/css/src/components/grid.css +6 -0
  6. package/css/src/components/listbox.css +4 -0
  7. package/css/src/components/menu.css +27 -0
  8. package/dist/.lib/tsconfig.type.tsbuildinfo +203 -26
  9. package/dist/core/components/atoms/_text/index.d.ts +2 -4
  10. package/dist/core/components/atoms/popperWrapper/PopperWrapper.d.ts +4 -0
  11. package/dist/core/components/atoms/text/Text.d.ts +3 -10
  12. package/dist/core/components/molecules/popover/Popover.d.ts +5 -0
  13. package/dist/core/components/molecules/tooltip/Tooltip.d.ts +8 -0
  14. package/dist/core/components/organisms/calendar/Calendar.d.ts +1 -0
  15. package/dist/core/components/organisms/list/List.d.ts +1 -0
  16. package/dist/core/components/organisms/listbox/listboxItem/ListBody.d.ts +4 -1
  17. package/dist/core/components/organisms/listbox/listboxItem/ListboxItem.d.ts +3 -3
  18. package/dist/core/components/organisms/menu/Menu.d.ts +49 -0
  19. package/dist/core/components/organisms/menu/MenuContext.d.ts +13 -0
  20. package/dist/core/components/organisms/menu/MenuGroup.d.ts +14 -0
  21. package/dist/core/components/organisms/menu/MenuItem.d.ts +17 -0
  22. package/dist/core/components/organisms/menu/MenuList.d.ts +19 -0
  23. package/dist/core/components/organisms/menu/SubMenu.d.ts +6 -0
  24. package/dist/core/components/organisms/menu/SubMenuContext.d.ts +10 -0
  25. package/dist/core/components/organisms/menu/index.d.ts +2 -0
  26. package/dist/core/components/organisms/menu/trigger/MenuTrigger.d.ts +6 -0
  27. package/dist/core/components/organisms/menu/trigger/utils.d.ts +3 -0
  28. package/dist/core/components/organisms/menu/utils.d.ts +2 -0
  29. package/dist/core/components/organisms/table/Header.d.ts +2 -0
  30. package/dist/core/components/organisms/table/Table.d.ts +3 -0
  31. package/dist/core/index.d.ts +1 -0
  32. package/dist/core/index.type.d.ts +1 -0
  33. package/dist/index.esm.js +779 -191
  34. package/dist/index.js +654 -73
  35. package/dist/index.js.map +1 -1
  36. package/dist/index.umd.js +1 -1
  37. package/dist/index.umd.js.br +0 -0
  38. package/dist/index.umd.js.gz +0 -0
  39. package/package.json +1 -1
package/dist/index.esm.js CHANGED
@@ -1,8 +1,8 @@
1
1
 
2
2
  /**
3
- * Generated on: 1710344054629
3
+ * Generated on: 1711981289386
4
4
  * Package: @innovaccer/design-system
5
- * Version: v2.29.0
5
+ * Version: v2.30.0
6
6
  * License: MIT
7
7
  * Docs: https://innovaccer.github.io/design-system
8
8
  */
@@ -1358,7 +1358,7 @@ var Breadcrumbs = function Breadcrumbs(props) {
1358
1358
  })));
1359
1359
  };
1360
1360
 
1361
- var _excluded$R = ["size", "appearance", "iconAlign", "tabIndex", "largeIcon", "type", "children", "icon", "expanded", "selected", "loading", "disabled", "className", "tooltip", "iconType"];
1361
+ var _excluded$V = ["size", "appearance", "iconAlign", "tabIndex", "largeIcon", "type", "children", "icon", "expanded", "selected", "loading", "disabled", "className", "tooltip", "iconType"];
1362
1362
  var sizeMapping$3 = {
1363
1363
  tiny: 12,
1364
1364
  regular: 16,
@@ -1387,7 +1387,7 @@ var ButtonElement = /*#__PURE__*/React.forwardRef(function (props, ref) {
1387
1387
  className = props.className;
1388
1388
  props.tooltip;
1389
1389
  var iconType = props.iconType,
1390
- rest = _objectWithoutProperties(props, _excluded$R);
1390
+ rest = _objectWithoutProperties(props, _excluded$V);
1391
1391
 
1392
1392
  var buttonClass = classnames((_classNames = {}, _defineProperty$1(_classNames, 'Button', true), _defineProperty$1(_classNames, 'Button--expanded', expanded), _defineProperty$1(_classNames, "Button--".concat(size), size), _defineProperty$1(_classNames, "Button--".concat(size, "Square"), !children), _defineProperty$1(_classNames, "Button--".concat(appearance), appearance), _defineProperty$1(_classNames, 'Button--selected', selected && (appearance === 'basic' || appearance === 'transparent')), _defineProperty$1(_classNames, "Button--iconAlign-".concat(iconAlign), children && iconAlign), _defineProperty$1(_classNames, "".concat(className), className), _classNames));
1393
1393
  var iconClass = classnames((_classNames2 = {}, _defineProperty$1(_classNames2, 'Button-icon', true), _defineProperty$1(_classNames2, "Button-icon--".concat(iconAlign), children && iconAlign), _classNames2));
@@ -2366,7 +2366,7 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
2366
2366
  } else if (startDate) {
2367
2367
  inRange = !disabled && (dateComparison(hoverDate, 'more', dateInString, monthInString, yearInString) || inRangeLast) && dateComparison(startDate, 'less', dateInString, monthInString, yearInString);
2368
2368
  } else if (endDate) {
2369
- inRange = !disabled && (compareDate(hoverDate, 'less', yearNavVal, monthNavVal, date) || inRangeLast) && compareDate(endDate, 'more', yearNavVal, monthNavVal, date);
2369
+ inRange = !disabled && (dateComparison(hoverDate, 'less', dateInString, monthInString, yearInString) || inRangeLast) && dateComparison(endDate, 'more', dateInString, monthInString, yearInString);
2370
2370
  }
2371
2371
  }
2372
2372
 
@@ -2374,7 +2374,8 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
2374
2374
  var isStartActive = startDate && dateComparison(startDate, 'equal', dateInString, monthInString, yearInString);
2375
2375
  var isEndActive = endDate && dateComparison(endDate, 'equal', dateInString, monthInString, yearInString);
2376
2376
  var activeDate = startDate && endDate && (isStartActive || isEndActive);
2377
- var isHoverLast = dateComparison(hoverDate, 'equal', dateInString, monthInString, yearInString) && hoverDate && startDate && hoverDate >= startDate;
2377
+ var isHoverBackwardLast = _this.props.allowReverseSelection && dateComparison(hoverDate, 'equal', dateInString, monthInString, yearInString) && hoverDate && (startDate && hoverDate < startDate || endDate && hoverDate < endDate);
2378
+ var isHoverForwardLast = dateComparison(hoverDate, 'equal', dateInString, monthInString, yearInString) && hoverDate && startDate && hoverDate >= startDate;
2378
2379
  var isEdgeElement = col === 0 || col === 6;
2379
2380
  var isValueRange = inRange || rangePicker && (active || activeDate);
2380
2381
  var wrapperClass = classnames({
@@ -2388,7 +2389,8 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
2388
2389
  'Calendar-valueWrapper--startError': isStart && isRangeError || rangePicker && isRangeError && isStartActive,
2389
2390
  'Calendar-valueWrapper--endError': isEnd && isRangeError || rangePicker && isRangeError && isEndActive,
2390
2391
  'Calendar-valueWrapper--dummy': dummy,
2391
- 'Calendar-valueWrapper--hoverDate': rangePicker && isHoverLast,
2392
+ 'Calendar-valueWrapper--hoverDate': rangePicker && isHoverForwardLast,
2393
+ 'Calendar-valueWrapper--hoverEndDate': rangePicker && isHoverBackwardLast,
2392
2394
  'Calendar-valueWrapper--inStartRange': isValueRange && col === 0 && !active && !activeDate,
2393
2395
  'Calendar-valueWrapper--inEndRange': isValueRange && col === 6 && !active && !activeDate
2394
2396
  });
@@ -2629,24 +2631,57 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
2629
2631
  if (onRangeChange) onRangeChange(_startDate4, _endDate4);
2630
2632
  }
2631
2633
 
2634
+ if (this.props.allowReverseSelection && prevState.hoverDate !== this.state.hoverDate) {
2635
+ var _this$state11 = this.state,
2636
+ hoverDate = _this$state11.hoverDate,
2637
+ _startDate5 = _this$state11.startDate,
2638
+ _endDate5 = _this$state11.endDate;
2639
+
2640
+ if (_startDate5 && !_endDate5) {
2641
+ var _getDateInfo9 = getDateInfo(_startDate5),
2642
+ _year3 = _getDateInfo9.year,
2643
+ _month3 = _getDateInfo9.month,
2644
+ _date4 = _getDateInfo9.date;
2645
+
2646
+ if (compareDate(hoverDate, 'less', _year3, _month3, _date4)) {
2647
+ this.setState({
2648
+ startDate: undefined,
2649
+ endDate: _startDate5
2650
+ });
2651
+ }
2652
+ } else if (_endDate5 && !_startDate5) {
2653
+ var _getDateInfo10 = getDateInfo(_endDate5),
2654
+ _year4 = _getDateInfo10.year,
2655
+ _month4 = _getDateInfo10.month,
2656
+ _date5 = _getDateInfo10.date;
2657
+
2658
+ if (compareDate(hoverDate, 'more', _year4, _month4, _date5)) {
2659
+ this.setState({
2660
+ startDate: _endDate5,
2661
+ endDate: undefined
2662
+ });
2663
+ }
2664
+ }
2665
+ }
2666
+
2632
2667
  if (prevState.year !== this.state.year) {
2633
- var _year3 = this.state.year;
2668
+ var _year5 = this.state.year;
2634
2669
 
2635
- if (_year3 !== undefined && monthsInView === 1) {
2670
+ if (_year5 !== undefined && monthsInView === 1) {
2636
2671
  this.setState({
2637
- year: _year3,
2638
- yearBlockNav: getYearBlock(_year3),
2639
- yearNav: _year3
2672
+ year: _year5,
2673
+ yearBlockNav: getYearBlock(_year5),
2674
+ yearNav: _year5
2640
2675
  });
2641
2676
  }
2642
2677
  }
2643
2678
 
2644
2679
  if (prevState.month !== this.state.month) {
2645
- var _month3 = this.state.month;
2680
+ var _month5 = this.state.month;
2646
2681
 
2647
- if (_month3 !== undefined && monthsInView === 1) {
2682
+ if (_month5 !== undefined && monthsInView === 1) {
2648
2683
  this.setState({
2649
- monthNav: _month3
2684
+ monthNav: _month5
2650
2685
  });
2651
2686
  }
2652
2687
  }
@@ -2698,7 +2733,7 @@ _defineProperty$1(Calendar, "defaultProps", {
2698
2733
  jumpView: true
2699
2734
  });
2700
2735
 
2701
- var _excluded$Q = ["shadow", "children", "className"];
2736
+ var _excluded$U = ["shadow", "children", "className"];
2702
2737
  var Card = /*#__PURE__*/React.forwardRef(function (props, ref) {
2703
2738
  var _classNames;
2704
2739
 
@@ -2706,7 +2741,7 @@ var Card = /*#__PURE__*/React.forwardRef(function (props, ref) {
2706
2741
  shadow = _props$shadow === void 0 ? 'shadow10' : _props$shadow,
2707
2742
  children = props.children,
2708
2743
  className = props.className,
2709
- rest = _objectWithoutProperties(props, _excluded$Q);
2744
+ rest = _objectWithoutProperties(props, _excluded$U);
2710
2745
 
2711
2746
  var classes = classnames((_classNames = {
2712
2747
  Card: true
@@ -2723,12 +2758,12 @@ Card.defaultProps = {
2723
2758
  shadow: 'shadow10'
2724
2759
  };
2725
2760
 
2726
- var _excluded$P = ["border", "children", "className"];
2761
+ var _excluded$T = ["border", "children", "className"];
2727
2762
  var CardSubdued = /*#__PURE__*/React.forwardRef(function (props, ref) {
2728
2763
  var border = props.border,
2729
2764
  children = props.children,
2730
2765
  className = props.className,
2731
- rest = _objectWithoutProperties(props, _excluded$P);
2766
+ rest = _objectWithoutProperties(props, _excluded$T);
2732
2767
 
2733
2768
  var classes = classnames(_defineProperty$1({
2734
2769
  CardSubdued: true
@@ -2795,7 +2830,7 @@ var isSpaceKey = function isSpaceKey(e) {
2795
2830
  return e.key === 'Space';
2796
2831
  };
2797
2832
 
2798
- var _excluded$O = ["onClick", "onKeyDown", "role", "tabIndex"];
2833
+ var _excluded$S = ["onClick", "onKeyDown", "role", "tabIndex"];
2799
2834
  var allowed = {
2800
2835
  button: new Set(['Enter', 'Space', 'Spacebar', ' ']),
2801
2836
  link: new Set(['Enter']),
@@ -2819,7 +2854,7 @@ var useAccessibilityProps = function useAccessibilityProps(_ref) {
2819
2854
  _ref$role = _ref.role,
2820
2855
  role = _ref$role === void 0 ? 'button' : _ref$role,
2821
2856
  tabIndex = _ref.tabIndex,
2822
- rest = _objectWithoutProperties(_ref, _excluded$O);
2857
+ rest = _objectWithoutProperties(_ref, _excluded$S);
2823
2858
 
2824
2859
  return _objectSpread2({}, onClick ? {
2825
2860
  onClick: onClick,
@@ -2937,43 +2972,49 @@ Icon.defaultProps = {
2937
2972
  size: 16
2938
2973
  };
2939
2974
 
2940
- var _excluded$N = ["children", "componentType", "className"];
2975
+ var _excluded$R = ["children", "componentType", "className"];
2941
2976
 
2942
- var GenericText = function GenericText(_ref) {
2977
+ var GenericText = function GenericText(_ref, ref) {
2943
2978
  var children = _ref.children,
2944
2979
  _ref$componentType = _ref.componentType,
2945
2980
  componentType = _ref$componentType === void 0 ? 'span' : _ref$componentType,
2946
2981
  className = _ref.className,
2947
- props = _objectWithoutProperties(_ref, _excluded$N);
2982
+ rest = _objectWithoutProperties(_ref, _excluded$R);
2948
2983
 
2949
- return /*#__PURE__*/React.createElement(componentType, _objectSpread2(_objectSpread2({}, props), {}, {
2950
- className: className
2984
+ return /*#__PURE__*/React.createElement(componentType, _objectSpread2(_objectSpread2({}, rest), {}, {
2985
+ className: className,
2986
+ ref: ref
2951
2987
  }), children);
2952
2988
  };
2953
2989
 
2954
- var _excluded$M = ["appearance", "size", "children", "weight", "small", "className", "color"];
2955
- var Text = function Text(props) {
2990
+ var Link$1 = /*#__PURE__*/React.forwardRef(GenericText);
2991
+
2992
+ var _excluded$Q = ["appearance", "size", "children", "weight", "small", "className", "color"];
2993
+ var Text = /*#__PURE__*/React.forwardRef(function (props, ref) {
2956
2994
  var _classNames;
2957
2995
 
2958
- var appearance = props.appearance,
2959
- size = props.size,
2996
+ var _props$appearance = props.appearance,
2997
+ appearance = _props$appearance === void 0 ? 'default' : _props$appearance,
2998
+ _props$size = props.size,
2999
+ size = _props$size === void 0 ? 'regular' : _props$size,
2960
3000
  children = props.children,
2961
3001
  weight = props.weight,
2962
3002
  small = props.small,
2963
3003
  className = props.className,
2964
3004
  color = props.color,
2965
- rest = _objectWithoutProperties(props, _excluded$M);
3005
+ rest = _objectWithoutProperties(props, _excluded$Q);
2966
3006
 
2967
3007
  var classes = classnames((_classNames = {
2968
3008
  Text: true
2969
3009
  }, _defineProperty$1(_classNames, "Text--".concat(appearance), !color && appearance), _defineProperty$1(_classNames, "Text--".concat(weight), weight), _defineProperty$1(_classNames, "Text--".concat(size), size), _defineProperty$1(_classNames, "color-".concat(color), color), _defineProperty$1(_classNames, 'Text--small', size === 'small' || small), _classNames), className);
2970
- return /*#__PURE__*/React.createElement(GenericText, _extends$2({
3010
+ return /*#__PURE__*/React.createElement(Link$1, _extends$2({
3011
+ ref: ref,
2971
3012
  "data-test": "DesignSystem-Text"
2972
3013
  }, rest, {
2973
3014
  className: classes,
2974
3015
  componentType: "span"
2975
3016
  }), children);
2976
- };
3017
+ });
2977
3018
  Text.displayName = 'Text';
2978
3019
  Text.defaultProps = {
2979
3020
  appearance: 'default',
@@ -3249,7 +3290,7 @@ var CheckboxIcon = function CheckboxIcon(props) {
3249
3290
  }
3250
3291
  };
3251
3292
 
3252
- var _excluded$L = ["size", "tabIndex", "defaultChecked", "indeterminate", "label", "error", "disabled", "onChange", "name", "value", "className", "checked", "helpText", "id"];
3293
+ var _excluded$P = ["size", "tabIndex", "defaultChecked", "indeterminate", "label", "error", "disabled", "onChange", "name", "value", "className", "checked", "helpText", "id"];
3253
3294
  var Checkbox = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {
3254
3295
  var _classNames, _classNames2, _classNames3, _classNames4, _classNames5, _classNames6;
3255
3296
 
@@ -3270,7 +3311,7 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {
3270
3311
  helpText = props.helpText,
3271
3312
  _props$id = props.id,
3272
3313
  id = _props$id === void 0 ? "".concat(name, "-").concat(label, "-").concat(uidGenerator()) : _props$id,
3273
- rest = _objectWithoutProperties(props, _excluded$L);
3314
+ rest = _objectWithoutProperties(props, _excluded$P);
3274
3315
 
3275
3316
  var ref = React.useRef(null);
3276
3317
  React.useImperativeHandle(forwardedRef, function () {
@@ -3351,7 +3392,7 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {
3351
3392
  });
3352
3393
  Checkbox.displayName = 'Checkbox';
3353
3394
 
3354
- var _excluded$K = ["size", "sizeXS", "sizeS", "sizeM", "sizeL", "sizeXL", "className", "children"];
3395
+ var _excluded$O = ["size", "sizeXS", "sizeS", "sizeM", "sizeL", "sizeXL", "className", "children"];
3355
3396
  var Column = /*#__PURE__*/React.forwardRef(function (props, ref) {
3356
3397
  var _classNames;
3357
3398
 
@@ -3363,7 +3404,7 @@ var Column = /*#__PURE__*/React.forwardRef(function (props, ref) {
3363
3404
  sizeXL = props.sizeXL,
3364
3405
  className = props.className,
3365
3406
  children = props.children,
3366
- rest = _objectWithoutProperties(props, _excluded$K);
3407
+ rest = _objectWithoutProperties(props, _excluded$O);
3367
3408
 
3368
3409
  var classes = classnames((_classNames = {}, _defineProperty$1(_classNames, 'Col', true), _defineProperty$1(_classNames, "Col--".concat(size), size), _defineProperty$1(_classNames, "Col--xs-".concat(sizeXS), sizeXS), _defineProperty$1(_classNames, "Col--s-".concat(sizeS), sizeS), _defineProperty$1(_classNames, "Col--m-".concat(sizeM), sizeM), _defineProperty$1(_classNames, "Col--l-".concat(sizeL), sizeL), _defineProperty$1(_classNames, "Col--xl-".concat(sizeXL), sizeXL), _defineProperty$1(_classNames, "".concat(className), className), _classNames));
3369
3410
  return /*#__PURE__*/React.createElement("div", _extends$2({
@@ -3474,7 +3515,7 @@ var Trigger$1 = function Trigger(props) {
3474
3515
  }));
3475
3516
  };
3476
3517
 
3477
- var _excluded$J = ["date", "open", "position", "inputFormat", "outputFormat", "inputOptions", "validators", "withInput", "disabledBefore", "disabledAfter", "onDateChange", "closeOnSelect", "size", "showTodayDate", "children", "view"];
3518
+ var _excluded$N = ["date", "open", "position", "inputFormat", "outputFormat", "inputOptions", "validators", "withInput", "disabledBefore", "disabledAfter", "onDateChange", "closeOnSelect", "size", "showTodayDate", "children", "view"];
3478
3519
  var DatePicker = /*#__PURE__*/function (_React$Component) {
3479
3520
  _inherits(DatePicker, _React$Component);
3480
3521
 
@@ -3629,7 +3670,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
3629
3670
  _this$props4$children = _this$props4.children,
3630
3671
  children = _this$props4$children === void 0 ? /*#__PURE__*/React.createElement(React.Fragment, null) : _this$props4$children,
3631
3672
  view = _this$props4.view,
3632
- rest = _objectWithoutProperties(_this$props4, _excluded$J);
3673
+ rest = _objectWithoutProperties(_this$props4, _excluded$N);
3633
3674
 
3634
3675
  var date = this.state.date;
3635
3676
  var months = config.months;
@@ -4695,7 +4736,7 @@ function debounce$1 (delay, atBegin, callback) {
4695
4736
  return callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);
4696
4737
  }
4697
4738
 
4698
- var _excluded$I = ["triggerSize", "placeholder", "menu", "children", "icon", "disabled", "open", "inlineLabel", "error", "iconType"];
4739
+ var _excluded$M = ["triggerSize", "placeholder", "menu", "children", "icon", "disabled", "open", "inlineLabel", "error", "iconType"];
4699
4740
  var DropdownButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
4700
4741
  var _classNames, _classNames2;
4701
4742
 
@@ -4712,7 +4753,7 @@ var DropdownButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
4712
4753
  inlineLabel = props.inlineLabel,
4713
4754
  error = props.error,
4714
4755
  iconType = props.iconType,
4715
- rest = _objectWithoutProperties(props, _excluded$I);
4756
+ rest = _objectWithoutProperties(props, _excluded$M);
4716
4757
 
4717
4758
  var buttonDisabled = disabled ? 'disabled' : 'default';
4718
4759
  var trimmedPlaceholder = placeholder.trim();
@@ -5785,7 +5826,7 @@ var DropdownList = function DropdownList(props) {
5785
5826
 
5786
5827
  DropdownList.displayName = 'DropdownList';
5787
5828
 
5788
- var _excluded$H = ["triggerOptions", "selected", "tabIndex"];
5829
+ var _excluded$L = ["triggerOptions", "selected", "tabIndex"];
5789
5830
  var inputRef = /*#__PURE__*/React.createRef();
5790
5831
 
5791
5832
  /**
@@ -6477,7 +6518,7 @@ var Dropdown = /*#__PURE__*/function (_React$Component) {
6477
6518
  triggerOptions = _this$props14$trigger === void 0 ? {} : _this$props14$trigger;
6478
6519
  _this$props14.selected;
6479
6520
  var tabIndex = _this$props14.tabIndex,
6480
- rest = _objectWithoutProperties(_this$props14, _excluded$H);
6521
+ rest = _objectWithoutProperties(_this$props14, _excluded$L);
6481
6522
 
6482
6523
  var remainingOptionsLen = searchedOptionsLength - options.length;
6483
6524
  var firstEnabledOption = tabIndex ? tabIndex : _isSelectAllPresent(searchTerm, remainingOptionsLen, withSelectAll, withCheckbox) ? 0 : options.findIndex(function (option) {
@@ -6525,7 +6566,7 @@ _defineProperty$1(Dropdown, "defaultProps", {
6525
6566
  searchDebounceDuration: 300
6526
6567
  });
6527
6568
 
6528
- var _excluded$G = ["appearance", "size", "children", "className", "color"];
6569
+ var _excluded$K = ["appearance", "size", "children", "className", "color"];
6529
6570
  var sizeMap = {
6530
6571
  s: 'h5',
6531
6572
  m: 'h4',
@@ -6541,12 +6582,12 @@ var Heading = function Heading(props) {
6541
6582
  children = props.children,
6542
6583
  className = props.className,
6543
6584
  color = props.color,
6544
- rest = _objectWithoutProperties(props, _excluded$G);
6585
+ rest = _objectWithoutProperties(props, _excluded$K);
6545
6586
 
6546
6587
  var classes = classnames((_classNames = {
6547
6588
  Heading: true
6548
6589
  }, _defineProperty$1(_classNames, "Heading--".concat(size), size), _defineProperty$1(_classNames, "Heading--".concat(appearance), !color && appearance), _defineProperty$1(_classNames, "color-".concat(color), color), _classNames), className);
6549
- return /*#__PURE__*/React.createElement(GenericText, _extends$2({
6590
+ return /*#__PURE__*/React.createElement(Link$1, _extends$2({
6550
6591
  "data-test": "DesignSystem-Heading"
6551
6592
  }, rest, {
6552
6593
  className: classes,
@@ -6559,13 +6600,13 @@ Heading.defaultProps = {
6559
6600
  size: 'm'
6560
6601
  };
6561
6602
 
6562
- var _excluded$F = ["className", "iconType"];
6603
+ var _excluded$J = ["className", "iconType"];
6563
6604
  var ActionButton$1 = function ActionButton(props) {
6564
6605
  var _classNames;
6565
6606
 
6566
6607
  var className = props.className,
6567
6608
  iconType = props.iconType,
6568
- rest = _objectWithoutProperties(props, _excluded$F);
6609
+ rest = _objectWithoutProperties(props, _excluded$J);
6569
6610
 
6570
6611
  var iconClass = classnames((_classNames = {}, _defineProperty$1(_classNames, 'ActionButton', true), _defineProperty$1(_classNames, "".concat(className), className), _classNames));
6571
6612
  return /*#__PURE__*/React.createElement(Icon, _extends$2({
@@ -6580,7 +6621,7 @@ ActionButton$1.defaultProps = {
6580
6621
  type: 'rounded'
6581
6622
  };
6582
6623
 
6583
- var _excluded$E = ["size", "type", "minWidth", "defaultValue", "name", "placeholder", "value", "icon", "inlineLabel", "required", "error", "info", "onChange", "onClick", "onClear", "onBlur", "onFocus", "onPaste", "actionIcon", "className", "autoFocus", "disabled", "readOnly", "iconType"];
6624
+ var _excluded$I = ["size", "type", "minWidth", "defaultValue", "name", "placeholder", "value", "icon", "inlineLabel", "required", "error", "info", "onChange", "onClick", "onClear", "onBlur", "onFocus", "onPaste", "actionIcon", "className", "autoFocus", "disabled", "readOnly", "iconType"];
6584
6625
  var sizeMapping$2 = {
6585
6626
  tiny: 12,
6586
6627
  regular: 16,
@@ -6622,7 +6663,7 @@ var Input = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {
6622
6663
  disabled = props.disabled,
6623
6664
  readOnly = props.readOnly,
6624
6665
  iconType = props.iconType,
6625
- rest = _objectWithoutProperties(props, _excluded$E);
6666
+ rest = _objectWithoutProperties(props, _excluded$I);
6626
6667
 
6627
6668
  var ref = React.useRef(null);
6628
6669
 
@@ -6731,7 +6772,7 @@ Object.assign(Input, {
6731
6772
  ActionButton: ActionButton$1
6732
6773
  });
6733
6774
 
6734
- var _excluded$D = ["size", "defaultValue", "name", "placeholder", "icon", "prefix", "suffix", "error", "min", "max", "onChange", "onClick", "onBlur", "onFocus", "className", "autoFocus", "disabled", "readOnly", "value", "showActionButton", "onKeyDown", "iconType"];
6775
+ var _excluded$H = ["size", "defaultValue", "name", "placeholder", "icon", "prefix", "suffix", "error", "min", "max", "onChange", "onClick", "onBlur", "onFocus", "className", "autoFocus", "disabled", "readOnly", "value", "showActionButton", "onKeyDown", "iconType"];
6735
6776
  var sizeMapping$1 = {
6736
6777
  regular: 16,
6737
6778
  large: 20
@@ -6782,7 +6823,7 @@ var MetricInput = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {
6782
6823
  showActionButton = _props$showActionButt === void 0 ? true : _props$showActionButt,
6783
6824
  onKeyDown = props.onKeyDown,
6784
6825
  iconType = props.iconType,
6785
- rest = _objectWithoutProperties(props, _excluded$D);
6826
+ rest = _objectWithoutProperties(props, _excluded$H);
6786
6827
 
6787
6828
  var ref = React.useRef(null);
6788
6829
  var isUncontrolled = valueProp === undefined;
@@ -6948,7 +6989,7 @@ var getDefaultValue = function getDefaultValue(mask, placeholderChar) {
6948
6989
  return val;
6949
6990
  };
6950
6991
 
6951
- var _excluded$C = ["mask", "value", "placeholderChar", "validators", "clearOnEmptyBlur", "defaultValue", "mask", "error", "caption", "required", "onChange", "onPaste", "onBlur", "onFocus", "onClear", "className", "id", "helpText"];
6992
+ var _excluded$G = ["mask", "value", "placeholderChar", "validators", "clearOnEmptyBlur", "defaultValue", "mask", "error", "caption", "required", "onChange", "onPaste", "onBlur", "onFocus", "onClear", "className", "id", "helpText"];
6952
6993
 
6953
6994
  /**
6954
6995
  * It works as Uncontrolled Input
@@ -6977,7 +7018,7 @@ var InputMask = /*#__PURE__*/React.forwardRef(function (props, forwardRef) {
6977
7018
  className = props.className,
6978
7019
  id = props.id,
6979
7020
  helpText = props.helpText,
6980
- rest = _objectWithoutProperties(props, _excluded$C);
7021
+ rest = _objectWithoutProperties(props, _excluded$G);
6981
7022
 
6982
7023
  var isEditable = React.useCallback(function (pos) {
6983
7024
  return _typeof(mask[pos]) === 'object';
@@ -7281,7 +7322,7 @@ InputMask.utils = {
7281
7322
  };
7282
7323
  var X = InputMask;
7283
7324
 
7284
- var _excluded$B = ["required", "optional", "withInput", "disabled", "children", "className", "info"];
7325
+ var _excluded$F = ["required", "optional", "withInput", "disabled", "children", "className", "info"];
7285
7326
 
7286
7327
  /**
7287
7328
  * *NOTE: Extends props with HTMLProps<HTMLLabelElement>*
@@ -7296,7 +7337,7 @@ var Label = function Label(props) {
7296
7337
  children = props.children,
7297
7338
  className = props.className,
7298
7339
  info = props.info,
7299
- rest = _objectWithoutProperties(props, _excluded$B);
7340
+ rest = _objectWithoutProperties(props, _excluded$F);
7300
7341
 
7301
7342
  var baseProps = extractBaseProps(props);
7302
7343
  var LabelClass = classnames((_classNames = {
@@ -7345,7 +7386,7 @@ var Label = function Label(props) {
7345
7386
  "data-test": "DesignSystem-Label"
7346
7387
  }, baseProps, {
7347
7388
  className: LabelClass
7348
- }), /*#__PURE__*/React.createElement(GenericText, _extends$2({
7389
+ }), /*#__PURE__*/React.createElement(Link$1, _extends$2({
7349
7390
  "data-test": "DesignSystem-Label--Text",
7350
7391
  className: classes,
7351
7392
  componentType: "label"
@@ -7454,7 +7495,7 @@ var Editable = function Editable(props) {
7454
7495
  };
7455
7496
  Editable.displayName = 'Editable';
7456
7497
 
7457
- var _excluded$A = ["onChange", "onClose"];
7498
+ var _excluded$E = ["onChange", "onClose"];
7458
7499
  var EditableDropdown = function EditableDropdown(props) {
7459
7500
  var _classNames2;
7460
7501
 
@@ -7465,7 +7506,7 @@ var EditableDropdown = function EditableDropdown(props) {
7465
7506
 
7466
7507
  var onDropdownChange = dropdownOptions.onChange,
7467
7508
  onDropdownClose = dropdownOptions.onClose,
7468
- rest = _objectWithoutProperties(dropdownOptions, _excluded$A);
7509
+ rest = _objectWithoutProperties(dropdownOptions, _excluded$E);
7469
7510
 
7470
7511
  var _React$useState = React.useState(placeholder),
7471
7512
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -7546,7 +7587,7 @@ EditableDropdown.defaultProps = {
7546
7587
  dropdownOptions: {}
7547
7588
  };
7548
7589
 
7549
- var _excluded$z = ["children", "className", "appearance", "size", "disabled"];
7590
+ var _excluded$D = ["children", "className", "appearance", "size", "disabled"];
7550
7591
  var Link = function Link(props) {
7551
7592
  var _classNames;
7552
7593
 
@@ -7555,12 +7596,12 @@ var Link = function Link(props) {
7555
7596
  appearance = props.appearance,
7556
7597
  size = props.size,
7557
7598
  disabled = props.disabled,
7558
- rest = _objectWithoutProperties(props, _excluded$z);
7599
+ rest = _objectWithoutProperties(props, _excluded$D);
7559
7600
 
7560
7601
  var classes = classnames((_classNames = {
7561
7602
  Link: true
7562
7603
  }, _defineProperty$1(_classNames, "Link--".concat(size), size), _defineProperty$1(_classNames, "Link--".concat(appearance), appearance), _defineProperty$1(_classNames, "Link--".concat(appearance, "-disabled"), disabled), _classNames), className);
7563
- return /*#__PURE__*/React.createElement(GenericText, _extends$2({
7604
+ return /*#__PURE__*/React.createElement(Link$1, _extends$2({
7564
7605
  "data-test": "DesignSystem-Link",
7565
7606
  className: classes,
7566
7607
  componentType: "a",
@@ -8451,12 +8492,12 @@ _defineProperty$1(MultiSlider, "defaultProps", {
8451
8492
 
8452
8493
  _defineProperty$1(MultiSlider, "Handle", MultiSliderHandle);
8453
8494
 
8454
- var _excluded$y = ["children", "className", "onOutsideClick"];
8495
+ var _excluded$C = ["children", "className", "onOutsideClick"];
8455
8496
  var OutsideClick = /*#__PURE__*/React.forwardRef(function (props, ref) {
8456
8497
  var children = props.children,
8457
8498
  className = props.className,
8458
8499
  onOutsideClick = props.onOutsideClick,
8459
- rest = _objectWithoutProperties(props, _excluded$y);
8500
+ rest = _objectWithoutProperties(props, _excluded$C);
8460
8501
 
8461
8502
  var innerRef = React.useRef(null);
8462
8503
  React.useImperativeHandle(ref, function () {
@@ -8488,7 +8529,7 @@ var OutsideClick = /*#__PURE__*/React.forwardRef(function (props, ref) {
8488
8529
  });
8489
8530
  OutsideClick.displayName = 'OutsideClick';
8490
8531
 
8491
- var _excluded$x = ["appearance", "children", "className", "color"];
8532
+ var _excluded$B = ["appearance", "children", "className", "color"];
8492
8533
  var Paragraph = function Paragraph(props) {
8493
8534
  var _classNames;
8494
8535
 
@@ -8496,12 +8537,12 @@ var Paragraph = function Paragraph(props) {
8496
8537
  children = props.children,
8497
8538
  className = props.className,
8498
8539
  color = props.color,
8499
- rest = _objectWithoutProperties(props, _excluded$x);
8540
+ rest = _objectWithoutProperties(props, _excluded$B);
8500
8541
 
8501
8542
  var classes = classnames((_classNames = {
8502
8543
  Text: true
8503
8544
  }, _defineProperty$1(_classNames, "Text--".concat(appearance), !color && appearance), _defineProperty$1(_classNames, "color-".concat(color), color), _classNames), className);
8504
- return /*#__PURE__*/React.createElement(GenericText, _extends$2({
8545
+ return /*#__PURE__*/React.createElement(Link$1, _extends$2({
8505
8546
  "data-test": "DesignSystem-Paragraph"
8506
8547
  }, rest, {
8507
8548
  className: classes,
@@ -8544,7 +8585,7 @@ ProgressBar.defaultProps = {
8544
8585
  size: 'regular'
8545
8586
  };
8546
8587
 
8547
- var _excluded$w = ["size", "label", "disabled", "onChange", "name", "value", "checked", "defaultChecked", "className", "helpText", "error"];
8588
+ var _excluded$A = ["size", "label", "disabled", "onChange", "name", "value", "checked", "defaultChecked", "className", "helpText", "error"];
8548
8589
  var Radio = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {
8549
8590
  var _classNames, _classNames2, _classNames3;
8550
8591
 
@@ -8560,7 +8601,7 @@ var Radio = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {
8560
8601
  className = props.className,
8561
8602
  helpText = props.helpText,
8562
8603
  error = props.error,
8563
- rest = _objectWithoutProperties(props, _excluded$w);
8604
+ rest = _objectWithoutProperties(props, _excluded$A);
8564
8605
 
8565
8606
  var ref = React.useRef(null);
8566
8607
  React.useImperativeHandle(forwardedRef, function () {
@@ -8611,11 +8652,11 @@ var Radio = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {
8611
8652
  });
8612
8653
  Radio.displayName = 'Radio';
8613
8654
 
8614
- var _excluded$v = ["className", "children"];
8655
+ var _excluded$z = ["className", "children"];
8615
8656
  var Row = /*#__PURE__*/React.forwardRef(function (props, ref) {
8616
8657
  var className = props.className,
8617
8658
  children = props.children,
8618
- rest = _objectWithoutProperties(props, _excluded$v);
8659
+ rest = _objectWithoutProperties(props, _excluded$z);
8619
8660
 
8620
8661
  var classes = classnames(_defineProperty$1({
8621
8662
  Row: true
@@ -8732,13 +8773,13 @@ Spinner.defaultProps = {
8732
8773
  size: 'medium'
8733
8774
  };
8734
8775
 
8735
- var _excluded$u = ["value", "defaultValue", "onRelease", "onChange"];
8776
+ var _excluded$y = ["value", "defaultValue", "onRelease", "onChange"];
8736
8777
  var Slider = function Slider(props) {
8737
8778
  var valueProp = props.value,
8738
8779
  defaultValue = props.defaultValue,
8739
8780
  onRelease = props.onRelease,
8740
8781
  onChange = props.onChange,
8741
- rest = _objectWithoutProperties(props, _excluded$u);
8782
+ rest = _objectWithoutProperties(props, _excluded$y);
8742
8783
 
8743
8784
  var _React$useState = React.useState(valueProp === undefined ? defaultValue : valueProp),
8744
8785
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -8771,7 +8812,7 @@ Slider.defaultProps = _objectSpread2(_objectSpread2({}, MultiSlider.defaultProps
8771
8812
  defaultValue: 0
8772
8813
  });
8773
8814
 
8774
- var _excluded$t = ["value", "defaultValue", "onChange", "onRelease"];
8815
+ var _excluded$x = ["value", "defaultValue", "onChange", "onRelease"];
8775
8816
  var RangeIndex;
8776
8817
 
8777
8818
  (function (RangeIndex) {
@@ -8784,7 +8825,7 @@ var RangeSlider = function RangeSlider(props) {
8784
8825
  defaultValue = props.defaultValue,
8785
8826
  onChange = props.onChange,
8786
8827
  onRelease = props.onRelease,
8787
- rest = _objectWithoutProperties(props, _excluded$t);
8828
+ rest = _objectWithoutProperties(props, _excluded$x);
8788
8829
 
8789
8830
  var _React$useState = React.useState(valueProp === undefined ? defaultValue : valueProp),
8790
8831
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -8820,7 +8861,7 @@ RangeSlider.defaultProps = _objectSpread2(_objectSpread2({}, MultiSlider.default
8820
8861
  defaultValue: [0, 10]
8821
8862
  });
8822
8863
 
8823
- var _excluded$s = ["appearance", "children", "className", "color"];
8864
+ var _excluded$w = ["appearance", "children", "className", "color"];
8824
8865
  var Subheading = function Subheading(props) {
8825
8866
  var _classNames;
8826
8867
 
@@ -8828,12 +8869,12 @@ var Subheading = function Subheading(props) {
8828
8869
  children = props.children,
8829
8870
  className = props.className,
8830
8871
  color = props.color,
8831
- rest = _objectWithoutProperties(props, _excluded$s);
8872
+ rest = _objectWithoutProperties(props, _excluded$w);
8832
8873
 
8833
8874
  var classes = classnames((_classNames = {
8834
8875
  Subheading: true
8835
8876
  }, _defineProperty$1(_classNames, "Subheading--".concat(appearance), !color && appearance), _defineProperty$1(_classNames, "color-".concat(color), color), _classNames), className);
8836
- return /*#__PURE__*/React.createElement(GenericText, _extends$2({
8877
+ return /*#__PURE__*/React.createElement(Link$1, _extends$2({
8837
8878
  "data-test": "DesignSystem-Subheading"
8838
8879
  }, rest, {
8839
8880
  className: classes,
@@ -8845,7 +8886,7 @@ Subheading.defaultProps = {
8845
8886
  appearance: 'default'
8846
8887
  };
8847
8888
 
8848
- var _excluded$r = ["size", "defaultChecked", "disabled", "onChange", "name", "value", "className", "appearance", "checked"];
8889
+ var _excluded$v = ["size", "defaultChecked", "disabled", "onChange", "name", "value", "className", "appearance", "checked"];
8849
8890
 
8850
8891
  /**
8851
8892
  * ######Switch has two types:
@@ -8865,7 +8906,7 @@ var Switch = /*#__PURE__*/React.forwardRef(function (props, ref) {
8865
8906
  className = props.className;
8866
8907
  props.appearance;
8867
8908
  var checkedProp = props.checked,
8868
- rest = _objectWithoutProperties(props, _excluded$r);
8909
+ rest = _objectWithoutProperties(props, _excluded$v);
8869
8910
 
8870
8911
  var _React$useState = React.useState(checkedProp === undefined ? defaultChecked : checkedProp),
8871
8912
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -8904,7 +8945,7 @@ var Switch = /*#__PURE__*/React.forwardRef(function (props, ref) {
8904
8945
  });
8905
8946
  Switch.displayName = 'Switch';
8906
8947
 
8907
- var _excluded$q = ["rows", "resize", "disabled", "name", "placeholder", "value", "defaultValue", "required", "error", "onChange", "onClick", "onBlur", "onFocus", "className"];
8948
+ var _excluded$u = ["rows", "resize", "disabled", "name", "placeholder", "value", "defaultValue", "required", "error", "onChange", "onClick", "onBlur", "onFocus", "className"];
8908
8949
  var Textarea = /*#__PURE__*/React.forwardRef(function (props, ref) {
8909
8950
  var _classNames;
8910
8951
 
@@ -8924,7 +8965,7 @@ var Textarea = /*#__PURE__*/React.forwardRef(function (props, ref) {
8924
8965
  onBlur = props.onBlur,
8925
8966
  onFocus = props.onFocus,
8926
8967
  className = props.className,
8927
- rest = _objectWithoutProperties(props, _excluded$q);
8968
+ rest = _objectWithoutProperties(props, _excluded$u);
8928
8969
 
8929
8970
  var classes = classnames((_classNames = {}, _defineProperty$1(_classNames, 'Textarea', true), _defineProperty$1(_classNames, 'Textarea--resize', resize), _defineProperty$1(_classNames, 'Textarea--error', error), _classNames), className);
8930
8971
  return /*#__PURE__*/React.createElement("textarea", _extends$2({
@@ -13700,6 +13741,11 @@ var PopperWrapper = /*#__PURE__*/function (_React$Component) {
13700
13741
  break;
13701
13742
  }
13702
13743
 
13744
+ if (_this.props.triggerCoordinates) {
13745
+ newStyle.position = 'absolute';
13746
+ newStyle.transform = "translate(".concat(_this.props.triggerCoordinates.x, "px, ").concat(_this.props.triggerCoordinates.y, "px)");
13747
+ }
13748
+
13703
13749
  return newStyle;
13704
13750
  });
13705
13751
 
@@ -14014,16 +14060,33 @@ var PopperWrapper = /*#__PURE__*/function (_React$Component) {
14014
14060
  placement = _this$props6.placement,
14015
14061
  appendToBody = _this$props6.appendToBody,
14016
14062
  hide = _this$props6.hide,
14017
- boundaryElement = _this$props6.boundaryElement;
14063
+ boundaryElement = _this$props6.boundaryElement,
14064
+ triggerCoordinates = _this$props6.triggerCoordinates;
14018
14065
  var _this$state2 = this.state,
14019
14066
  animationKeyframe = _this$state2.animationKeyframe,
14020
14067
  isOpen = _this$state2.isOpen;
14068
+ var coordinatesPopper = /*#__PURE__*/React.createElement(Popper, {
14069
+ placement: placement,
14070
+ innerRef: this.popupRef,
14071
+ modifiers: _objectSpread2({
14072
+ preventOverflow: {
14073
+ boundariesElement: boundaryElement || document.body
14074
+ },
14075
+ hide: {
14076
+ enabled: hide
14077
+ }
14078
+ }, triggerCoordinates && {
14079
+ offset: {
14080
+ offset: "".concat(triggerCoordinates.x, "px, ").concat(triggerCoordinates.y, "px")
14081
+ }
14082
+ })
14083
+ }, this.getPopperChildren);
14021
14084
  return /*#__PURE__*/React.createElement(Manager, null, /*#__PURE__*/React.createElement("style", null, animationKeyframe), /*#__PURE__*/React.createElement(Reference, {
14022
14085
  innerRef: this.triggerRef
14023
14086
  }, function (_ref2) {
14024
14087
  var ref = _ref2.ref;
14025
14088
  return _this6.getTriggerElement(ref);
14026
- }), isOpen && appendToBody && /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement(Popper, {
14089
+ }), isOpen && appendToBody && !triggerCoordinates && /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement(Popper, {
14027
14090
  placement: placement,
14028
14091
  innerRef: this.popupRef,
14029
14092
  modifiers: {
@@ -14034,7 +14097,7 @@ var PopperWrapper = /*#__PURE__*/function (_React$Component) {
14034
14097
  enabled: hide
14035
14098
  }
14036
14099
  }
14037
- }, this.getPopperChildren), document.body), isOpen && !appendToBody && /*#__PURE__*/React.createElement(Popper, {
14100
+ }, this.getPopperChildren), document.body), isOpen && appendToBody && triggerCoordinates && /*#__PURE__*/ReactDOM.createPortal(coordinatesPopper, document.body), isOpen && !appendToBody && !triggerCoordinates && /*#__PURE__*/React.createElement(Popper, {
14038
14101
  placement: placement,
14039
14102
  innerRef: this.popupRef
14040
14103
  }, this.getPopperChildren));
@@ -14053,7 +14116,7 @@ _defineProperty$1(PopperWrapper, "defaultProps", {
14053
14116
  style: {}
14054
14117
  });
14055
14118
 
14056
- var _excluded$p = ["position", "customStyle", "dark", "children", "onToggle", "className", "hideOnReferenceEscape", "boundaryElement"];
14119
+ var _excluded$t = ["position", "customStyle", "dark", "children", "onToggle", "className", "hideOnReferenceEscape", "boundaryElement", "name"];
14057
14120
  var propsList = ['appendToBody', 'trigger', 'hoverable', 'on', 'open', 'closeOnBackdropClick', 'offset', 'closeOnScroll'];
14058
14121
  var Popover = function Popover(props) {
14059
14122
  var position = props.position,
@@ -14065,7 +14128,8 @@ var Popover = function Popover(props) {
14065
14128
  hideOnReferenceEscape = props.hideOnReferenceEscape,
14066
14129
  _props$boundaryElemen = props.boundaryElement,
14067
14130
  boundaryElement = _props$boundaryElemen === void 0 ? document.body : _props$boundaryElemen,
14068
- rest = _objectWithoutProperties(props, _excluded$p);
14131
+ name = props.name,
14132
+ rest = _objectWithoutProperties(props, _excluded$t);
14069
14133
 
14070
14134
  var _React$useState = React.useState(!!props.open),
14071
14135
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -14097,7 +14161,8 @@ var Popover = function Popover(props) {
14097
14161
  "data-test": "DesignSystem-Popover",
14098
14162
  className: classes,
14099
14163
  "data-layer": true,
14100
- "data-opened": open
14164
+ "data-opened": open,
14165
+ "data-name": name
14101
14166
  }, children);
14102
14167
  return /*#__PURE__*/React.createElement(PopperWrapper, _extends$2({}, rest, {
14103
14168
  init: init,
@@ -14117,7 +14182,7 @@ Popover.defaultProps = Object.assign({}, filterProps(PopperWrapper.defaultProps,
14117
14182
  customStyle: {}
14118
14183
  });
14119
14184
 
14120
- var _excluded$o = ["type", "onClick"];
14185
+ var _excluded$s = ["type", "onClick"];
14121
14186
  var keyCodes$1 = {
14122
14187
  BACKSPACE: 'Backspace',
14123
14188
  DELETE: 'Delete',
@@ -14236,7 +14301,7 @@ var ChipInput = function ChipInput(props) {
14236
14301
  var _chipOptions$type = chipOptions.type,
14237
14302
  type = _chipOptions$type === void 0 ? 'input' : _chipOptions$type,
14238
14303
  _onClick = chipOptions.onClick,
14239
- rest = _objectWithoutProperties(chipOptions, _excluded$o);
14304
+ rest = _objectWithoutProperties(chipOptions, _excluded$s);
14240
14305
 
14241
14306
  return /*#__PURE__*/React.createElement(Chip, _extends$2({
14242
14307
  "data-test": "DesignSystem-ChipInput--Chip",
@@ -14407,7 +14472,7 @@ var _MenuPills = function MenuPills(props) {
14407
14472
  }, count);
14408
14473
  };
14409
14474
 
14410
- var MenuItem = function MenuItem(props) {
14475
+ var MenuItem$1 = function MenuItem(props) {
14411
14476
  var _classNames2;
14412
14477
 
14413
14478
  var menu = props.menu,
@@ -14480,7 +14545,7 @@ var MenuItem = function MenuItem(props) {
14480
14545
  /*#__PURE__*/
14481
14546
  // TODO(a11y)
14482
14547
  // eslint-disable-next-line
14483
- React.createElement(GenericText, _extends$2({
14548
+ React.createElement(Link$1, _extends$2({
14484
14549
  componentType: "a",
14485
14550
  className: ItemClass
14486
14551
  }, baseProps), /*#__PURE__*/React.createElement("div", {
@@ -14495,7 +14560,7 @@ var MenuItem = function MenuItem(props) {
14495
14560
  labelColor: itemColor
14496
14561
  })), expanded && renderSubMenu());
14497
14562
  };
14498
- MenuItem.defaultProps = {
14563
+ MenuItem$1.defaultProps = {
14499
14564
  isActive: false
14500
14565
  };
14501
14566
 
@@ -14598,7 +14663,7 @@ var VerticalNav = function VerticalNav(props) {
14598
14663
  }, menu.group)), showTooltip ? /*#__PURE__*/React.createElement(Tooltip, {
14599
14664
  tooltip: menu.label,
14600
14665
  position: "right"
14601
- }, /*#__PURE__*/React.createElement(MenuItem, {
14666
+ }, /*#__PURE__*/React.createElement(MenuItem$1, {
14602
14667
  "data-test": "DesignSystem-VerticalNav--Item",
14603
14668
  menu: menu,
14604
14669
  expanded: expanded,
@@ -14609,7 +14674,7 @@ var VerticalNav = function VerticalNav(props) {
14609
14674
  isChildrenVisible: isChildrenVisible,
14610
14675
  onClick: onClickHandler,
14611
14676
  customItemRenderer: customItemRenderer
14612
- })) : /*#__PURE__*/React.createElement(MenuItem, {
14677
+ })) : /*#__PURE__*/React.createElement(MenuItem$1, {
14613
14678
  "data-test": "DesignSystem-VerticalNav--Item",
14614
14679
  menu: menu,
14615
14680
  expanded: expanded,
@@ -14624,7 +14689,7 @@ var VerticalNav = function VerticalNav(props) {
14624
14689
  return showTooltip ? /*#__PURE__*/React.createElement(Tooltip, {
14625
14690
  tooltip: subMenu.label,
14626
14691
  position: "right"
14627
- }, /*#__PURE__*/React.createElement(MenuItem, {
14692
+ }, /*#__PURE__*/React.createElement(MenuItem$1, {
14628
14693
  key: id,
14629
14694
  menu: subMenu,
14630
14695
  expanded: expanded,
@@ -14634,7 +14699,7 @@ var VerticalNav = function VerticalNav(props) {
14634
14699
  onClick: onClickHandler,
14635
14700
  isActive: isMenuActive(menus, subMenu, active),
14636
14701
  customItemRenderer: customItemRenderer
14637
- })) : /*#__PURE__*/React.createElement(MenuItem, {
14702
+ })) : /*#__PURE__*/React.createElement(MenuItem$1, {
14638
14703
  key: id,
14639
14704
  menu: subMenu,
14640
14705
  expanded: expanded,
@@ -14749,7 +14814,7 @@ var HorizontalNav = function HorizontalNav(props) {
14749
14814
  }), list);
14750
14815
  };
14751
14816
 
14752
- var _excluded$n = ["children", "tooltip", "showTooltip"];
14817
+ var _excluded$r = ["children", "tooltip", "showTooltip", "showOnTruncation", "elementRef"];
14753
14818
  var tooltipPropsList = ['trigger', 'on', 'open', 'offset', 'onToggle', 'dark', 'customStyle', 'closeOnBackdropClick', 'hideOnReferenceEscape', 'closeOnScroll'];
14754
14819
  var positionValue = {
14755
14820
  bottom: 'bottom',
@@ -14761,11 +14826,33 @@ var positionValue = {
14761
14826
  left: 'left',
14762
14827
  right: 'right'
14763
14828
  };
14829
+ var detectTruncation = function detectTruncation(boundaryRef) {
14830
+ var element = boundaryRef === null || boundaryRef === void 0 ? void 0 : boundaryRef.current;
14831
+ var isTruncated = element ? element.scrollWidth > element.clientWidth : false;
14832
+ return isTruncated;
14833
+ };
14764
14834
  var Tooltip = function Tooltip(props) {
14765
14835
  var children = props.children,
14766
14836
  tooltip = props.tooltip,
14767
14837
  showTooltip = props.showTooltip,
14768
- rest = _objectWithoutProperties(props, _excluded$n);
14838
+ showOnTruncation = props.showOnTruncation,
14839
+ elementRef = props.elementRef,
14840
+ rest = _objectWithoutProperties(props, _excluded$r);
14841
+
14842
+ var childrenRef = React.useRef(null);
14843
+
14844
+ var _React$useState = React.useState(false),
14845
+ _React$useState2 = _slicedToArray(_React$useState, 2),
14846
+ isTruncated = _React$useState2[0],
14847
+ setIsTruncated = _React$useState2[1];
14848
+
14849
+ React.useEffect(function () {
14850
+ var element = elementRef ? elementRef : childrenRef;
14851
+ setIsTruncated(detectTruncation(element));
14852
+ }, [childrenRef, elementRef]);
14853
+ var renderChildern = elementRef || ! /*#__PURE__*/React.isValidElement(children) ? children : /*#__PURE__*/React.cloneElement(children, {
14854
+ ref: childrenRef
14855
+ });
14769
14856
 
14770
14857
  if (!showTooltip) {
14771
14858
  // If showTooltip is false skip the Popover and return the children directly
@@ -14778,6 +14865,21 @@ var Tooltip = function Tooltip(props) {
14778
14865
  className: "Tooltip-text",
14779
14866
  appearance: "white"
14780
14867
  }, tooltip));
14868
+
14869
+ if (showOnTruncation) {
14870
+ return isTruncated ? /*#__PURE__*/React.createElement(Popover, _extends$2({
14871
+ trigger: renderChildern,
14872
+ on: 'hover',
14873
+ offset: 'medium'
14874
+ }, rest, {
14875
+ animationClass: {
14876
+ open: "Tooltip-animation-open-".concat(positionValue[props.position]),
14877
+ close: "Tooltip-animation-close-".concat(positionValue[props.position])
14878
+ },
14879
+ className: "Tooltip-container"
14880
+ }), tooltipWrapper) : renderChildern;
14881
+ }
14882
+
14781
14883
  return /*#__PURE__*/React.createElement(Popover, _extends$2({
14782
14884
  trigger: children,
14783
14885
  on: 'hover',
@@ -14789,14 +14891,18 @@ var Tooltip = function Tooltip(props) {
14789
14891
  },
14790
14892
  className: "Tooltip-container"
14791
14893
  }), tooltipWrapper);
14792
- }; // Tooltip.defaultProps = filterProps({
14793
- // ...Popover.defaultProps,
14794
- // hoverable: false
14795
- // }, propsList);
14894
+ };
14895
+
14896
+ Tooltip.useAutoTooltip = function () {
14897
+ return {
14898
+ detectTruncation: detectTruncation
14899
+ };
14900
+ };
14796
14901
 
14797
14902
  Tooltip.defaultProps = Object.assign({}, filterProps(Popover.defaultProps, tooltipPropsList), {
14798
14903
  hoverable: false,
14799
- showTooltip: true
14904
+ showTooltip: true,
14905
+ showOnTruncation: false
14800
14906
  });
14801
14907
 
14802
14908
  var Dialog = function Dialog(props) {
@@ -14847,7 +14953,7 @@ Dialog.defaultProps = {
14847
14953
  secondaryButtonAppearance: 'basic'
14848
14954
  };
14849
14955
 
14850
- var _excluded$m = ["label"];
14956
+ var _excluded$q = ["label"];
14851
14957
  var OverlayFooter = function OverlayFooter(props) {
14852
14958
  var open = props.open,
14853
14959
  className = props.className,
@@ -14884,7 +14990,7 @@ var OverlayFooter = function OverlayFooter(props) {
14884
14990
  className: classes
14885
14991
  }), actions.map(function (_ref, index) {
14886
14992
  _ref.label;
14887
- var options = _objectWithoutProperties(_ref, _excluded$m);
14993
+ var options = _objectWithoutProperties(_ref, _excluded$q);
14888
14994
 
14889
14995
  return /*#__PURE__*/React.createElement(Button, _extends$2({
14890
14996
  type: "button"
@@ -16245,7 +16351,7 @@ Pagination.defaultProps = {
16245
16351
  pageJumpDebounceDuration: 750
16246
16352
  };
16247
16353
 
16248
- var _excluded$l = ["onChange"];
16354
+ var _excluded$p = ["onChange"];
16249
16355
  var EditableInput = function EditableInput(props) {
16250
16356
  var _classNames2, _classNames4;
16251
16357
 
@@ -16259,7 +16365,7 @@ var EditableInput = function EditableInput(props) {
16259
16365
  className = props.className;
16260
16366
 
16261
16367
  var onInputChange = inputOptions.onChange,
16262
- rest = _objectWithoutProperties(inputOptions, _excluded$l);
16368
+ rest = _objectWithoutProperties(inputOptions, _excluded$p);
16263
16369
 
16264
16370
  var _React$useState = React.useState(props.value),
16265
16371
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -16422,7 +16528,7 @@ EditableInput.defaultProps = {
16422
16528
  inputOptions: {}
16423
16529
  };
16424
16530
 
16425
- var _excluded$k = ["onChange", "chipOptions"],
16531
+ var _excluded$o = ["onChange", "chipOptions"],
16426
16532
  _excluded2$2 = ["onClick"];
16427
16533
  var EditableChipInput = function EditableChipInput(props) {
16428
16534
  var _classNames3;
@@ -16436,7 +16542,7 @@ var EditableChipInput = function EditableChipInput(props) {
16436
16542
  var onChipInputChange = chipInputOptions.onChange,
16437
16543
  _chipInputOptions$chi = chipInputOptions.chipOptions,
16438
16544
  chipOptions = _chipInputOptions$chi === void 0 ? {} : _chipInputOptions$chi,
16439
- rest = _objectWithoutProperties(chipInputOptions, _excluded$k);
16545
+ rest = _objectWithoutProperties(chipInputOptions, _excluded$o);
16440
16546
 
16441
16547
  var _onClick = chipOptions.onClick,
16442
16548
  chipObject = _objectWithoutProperties(chipOptions, _excluded2$2);
@@ -17252,7 +17358,7 @@ var getCustomDates = function getCustomDates() {
17252
17358
  };
17253
17359
  };
17254
17360
 
17255
- var _excluded$j = ["startDate", "endDate", "yearNav", "monthNav", "open", "inputFormat", "outputFormat", "startInputOptions", "endInputOptions", "validators", "withInput", "position", "disabledBefore", "disabledAfter", "onRangeChange", "rangeLimit"];
17361
+ var _excluded$n = ["startDate", "endDate", "yearNav", "monthNav", "open", "inputFormat", "outputFormat", "startInputOptions", "endInputOptions", "validators", "withInput", "position", "disabledBefore", "disabledAfter", "onRangeChange", "rangeLimit"];
17256
17362
  var DateRangePicker = /*#__PURE__*/function (_React$Component) {
17257
17363
  _inherits(DateRangePicker, _React$Component);
17258
17364
 
@@ -17293,7 +17399,7 @@ var DateRangePicker = /*#__PURE__*/function (_React$Component) {
17293
17399
  daMonth = _getDateInfo2.month,
17294
17400
  daDate = _getDateInfo2.date;
17295
17401
 
17296
- return !date ? true : compareDate(date, 'less', dbYear, dbMonth, dbDate) || compareDate(date, 'more', daYear, daMonth, daDate);
17402
+ return !date ? false : compareDate(date, 'less', dbYear, dbMonth, dbDate) || compareDate(date, 'more', daYear, daMonth, daDate);
17297
17403
  };
17298
17404
 
17299
17405
  var startError = isError(startDate);
@@ -17489,8 +17595,14 @@ var DateRangePicker = /*#__PURE__*/function (_React$Component) {
17489
17595
  var eValue = translateToString(outputFormat, _endDate3);
17490
17596
 
17491
17597
  if (!inRangeError && !startError && !endError) {
17492
- onRangeChange(_startDate3, _endDate3, sValue, eValue);
17493
- } else {
17598
+ if (this.props.allowReverseSelection) {
17599
+ if (_startDate3 && _endDate3) {
17600
+ onRangeChange(_startDate3, _endDate3, sValue, eValue);
17601
+ }
17602
+ } else {
17603
+ onRangeChange(_startDate3, _endDate3, sValue, eValue);
17604
+ }
17605
+ } else if (!this.props.allowReverseSelection) {
17494
17606
  if (!startError) onRangeChange(_startDate3, undefined, sValue, eValue);else if (!endError) onRangeChange(undefined, _endDate3, sValue, eValue);else onRangeChange(undefined, undefined, sValue, eValue);
17495
17607
  }
17496
17608
  }
@@ -17522,7 +17634,7 @@ var DateRangePicker = /*#__PURE__*/function (_React$Component) {
17522
17634
  disabledAfter = _this$props6.disabledAfter;
17523
17635
  _this$props6.onRangeChange;
17524
17636
  var rangeLimit = _this$props6.rangeLimit,
17525
- rest = _objectWithoutProperties(_this$props6, _excluded$j);
17637
+ rest = _objectWithoutProperties(_this$props6, _excluded$n);
17526
17638
 
17527
17639
  var _this$state3 = this.state,
17528
17640
  startDate = _this$state3.startDate,
@@ -18426,7 +18538,7 @@ function _fromFileEntry() {
18426
18538
  return _fromFileEntry.apply(this, arguments);
18427
18539
  }
18428
18540
 
18429
- var _excluded$i = ["refKey", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnterCallback", "onDragOverCallback", "onDragLeaveCallback", "onDropCallback"],
18541
+ var _excluded$m = ["refKey", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnterCallback", "onDragOverCallback", "onDragLeaveCallback", "onDropCallback"],
18430
18542
  _excluded2$1 = ["refKey", "onChange", "onClick"];
18431
18543
  var initialState = {
18432
18544
  isFocused: false,
@@ -18704,7 +18816,7 @@ var DropzoneBase = function DropzoneBase(props) {
18704
18816
  onDragOverCallback = _ref.onDragOverCallback,
18705
18817
  onDragLeaveCallback = _ref.onDragLeaveCallback,
18706
18818
  onDropCallback = _ref.onDropCallback,
18707
- rest = _objectWithoutProperties(_ref, _excluded$i);
18819
+ rest = _objectWithoutProperties(_ref, _excluded$m);
18708
18820
 
18709
18821
  return _objectSpread2(_defineProperty$1({
18710
18822
  onDragEnter: composeDragHandler(composeEventHandlers(onDragEnterCallback, onDragEnterCb)),
@@ -20719,6 +20831,7 @@ var Header = function Header(props) {
20719
20831
  var loading = props.loading,
20720
20832
  error = props.error,
20721
20833
  data = props.data,
20834
+ displayData = props.displayData,
20722
20835
  schema = props.schema,
20723
20836
  withSearch = props.withSearch,
20724
20837
  showHead = props.showHead,
@@ -20738,6 +20851,7 @@ var Header = function Header(props) {
20738
20851
  selectAll = props.selectAll,
20739
20852
  searchTerm = props.searchTerm,
20740
20853
  updateSearchTerm = props.updateSearchTerm,
20854
+ globalActionRenderer = props.globalActionRenderer,
20741
20855
  dynamicColumn = props.dynamicColumn,
20742
20856
  allowSelectAll = props.allowSelectAll,
20743
20857
  showFilters = props.showFilters,
@@ -20818,6 +20932,8 @@ var Header = function Header(props) {
20818
20932
  className: "Header"
20819
20933
  }, /*#__PURE__*/React.createElement("div", {
20820
20934
  className: "Header-content Header-content--top"
20935
+ }, /*#__PURE__*/React.createElement("div", {
20936
+ className: "d-flex"
20821
20937
  }, withSearch && /*#__PURE__*/React.createElement("div", {
20822
20938
  className: "Header-search"
20823
20939
  }, /*#__PURE__*/React.createElement(Input, {
@@ -20860,7 +20976,9 @@ var Header = function Header(props) {
20860
20976
  });
20861
20977
  }))), children && /*#__PURE__*/React.createElement("div", {
20862
20978
  className: "Header-actions"
20863
- }, children)), /*#__PURE__*/React.createElement("div", {
20979
+ }, children)), globalActionRenderer && /*#__PURE__*/React.createElement("div", {
20980
+ className: "Header-global-actions"
20981
+ }, globalActionRenderer(displayData))), /*#__PURE__*/React.createElement("div", {
20864
20982
  className: "Header-content Header-content--bottom"
20865
20983
  }, /*#__PURE__*/React.createElement("div", {
20866
20984
  className: "Header-label"
@@ -20902,7 +21020,7 @@ Header.defaultProps = {
20902
21020
  showFilters: true
20903
21021
  };
20904
21022
 
20905
- var _excluded$h = ["children"];
21023
+ var _excluded$l = ["children"];
20906
21024
 
20907
21025
  var defaultErrorTemplate = function defaultErrorTemplate(props) {
20908
21026
  var _props$errorType = props.errorType,
@@ -20928,6 +21046,7 @@ var defaultProps = {
20928
21046
  pageSize: 15,
20929
21047
  draggable: true,
20930
21048
  data: [],
21049
+ displayData: [],
20931
21050
  schema: [],
20932
21051
  loading: false,
20933
21052
  error: false,
@@ -21032,6 +21151,7 @@ var Table = /*#__PURE__*/function (_React$Component) {
21032
21151
 
21033
21152
  _this.setState({
21034
21153
  data: _data2,
21154
+ displayData: _data2,
21035
21155
  schema: schema,
21036
21156
  selectAll: getSelectAll(_data2, _this.props.selectDisabledRow),
21037
21157
  totalRecords: res.count,
@@ -21068,6 +21188,7 @@ var Table = /*#__PURE__*/function (_React$Component) {
21068
21188
  errorType: 'NO_RECORDS_FOUND',
21069
21189
  selectAll: getSelectAll(renderedData, _this.props.selectDisabledRow),
21070
21190
  schema: renderedSchema,
21191
+ displayData: sortedData,
21071
21192
  data: renderedData
21072
21193
  });
21073
21194
  }
@@ -21171,6 +21292,7 @@ var Table = /*#__PURE__*/function (_React$Component) {
21171
21292
  _this.state = {
21172
21293
  async: _async,
21173
21294
  data: !_async ? _data : [],
21295
+ displayData: !_async ? _data : [],
21174
21296
  schema: !_async ? _schema : [],
21175
21297
  page: props.page,
21176
21298
  sortingList: props.sortingList,
@@ -21206,6 +21328,7 @@ var Table = /*#__PURE__*/function (_React$Component) {
21206
21328
 
21207
21329
  this.setState({
21208
21330
  data: _data3,
21331
+ displayData: _data3,
21209
21332
  schema: schema,
21210
21333
  error: this.props.error || false,
21211
21334
  errorType: this.props.errorType,
@@ -21224,6 +21347,7 @@ var Table = /*#__PURE__*/function (_React$Component) {
21224
21347
 
21225
21348
  this.setState({
21226
21349
  data: _data4,
21350
+ displayData: _data4,
21227
21351
  schema: _schema2,
21228
21352
  loading: this.props.loading || false,
21229
21353
  error: this.props.error || false,
@@ -21287,7 +21411,7 @@ var Table = /*#__PURE__*/function (_React$Component) {
21287
21411
 
21288
21412
  var _ref = headerOptions,
21289
21413
  headerChildren = _ref.children,
21290
- headerAttr = _objectWithoutProperties(_ref, _excluded$h);
21414
+ headerAttr = _objectWithoutProperties(_ref, _excluded$l);
21291
21415
 
21292
21416
  var classes = className ? " ".concat(className) : '';
21293
21417
  var totalRecords = this.state.totalRecords;
@@ -21851,7 +21975,7 @@ FileList.defaultProps = {
21851
21975
  };
21852
21976
  FileList.displayName = 'FileList';
21853
21977
 
21854
- var _excluded$g = ["type", "fields", "placeholder", "autoFocus", "onComplete", "onFocus", "onBlur", "className", "value"];
21978
+ var _excluded$k = ["type", "fields", "placeholder", "autoFocus", "onComplete", "onFocus", "onBlur", "className", "value"];
21855
21979
  var KEY_CODE = {
21856
21980
  backspace: 'Backspace',
21857
21981
  left: 'ArrowLeft',
@@ -21876,7 +22000,7 @@ var VerificationCodeInput = function VerificationCodeInput(props) {
21876
22000
  onBlur = props.onBlur,
21877
22001
  className = props.className;
21878
22002
  props.value;
21879
- var rest = _objectWithoutProperties(props, _excluded$g);
22003
+ var rest = _objectWithoutProperties(props, _excluded$k);
21880
22004
 
21881
22005
  var initialValues = useMemo(function () {
21882
22006
  if (props.value && props.value.length) {
@@ -22287,7 +22411,7 @@ var HelpText = function HelpText(props) {
22287
22411
  };
22288
22412
  HelpText.displayName = 'HelpText';
22289
22413
 
22290
- var _excluded$f = ["children", "type", "className", "disabled", "tabIndex", "icon", "subtle", "size", "iconAlign", "iconType"];
22414
+ var _excluded$j = ["children", "type", "className", "disabled", "tabIndex", "icon", "subtle", "size", "iconAlign", "iconType"];
22291
22415
  var sizeMapping = {
22292
22416
  tiny: 12,
22293
22417
  regular: 16
@@ -22305,7 +22429,7 @@ var LinkButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
22305
22429
  size = props.size,
22306
22430
  iconAlign = props.iconAlign,
22307
22431
  iconType = props.iconType,
22308
- rest = _objectWithoutProperties(props, _excluded$f);
22432
+ rest = _objectWithoutProperties(props, _excluded$j);
22309
22433
 
22310
22434
  var buttonClass = classnames((_classNames = {}, _defineProperty$1(_classNames, 'LinkButton', true), _defineProperty$1(_classNames, "LinkButton--".concat(size), size), _defineProperty$1(_classNames, 'LinkButton--default', !subtle), _defineProperty$1(_classNames, 'LinkButton--subtle', subtle), _defineProperty$1(_classNames, "LinkButton--iconAlign-".concat(iconAlign), children && iconAlign), _defineProperty$1(_classNames, "".concat(className), className), _classNames));
22311
22435
  var iconClass = classnames((_classNames2 = {}, _defineProperty$1(_classNames2, 'LinkButton-icon', true), _defineProperty$1(_classNames2, "LinkButton-icon--".concat(iconAlign), children && iconAlign), _classNames2));
@@ -22332,7 +22456,7 @@ LinkButton.defaultProps = {
22332
22456
  iconAlign: 'left'
22333
22457
  };
22334
22458
 
22335
- var _excluded$e = ["children", "disabled", "className", "zIndex", "onClick"];
22459
+ var _excluded$i = ["children", "disabled", "className", "zIndex", "onClick"];
22336
22460
  var ActionCard = function ActionCard(props) {
22337
22461
  var _classNames;
22338
22462
 
@@ -22341,7 +22465,7 @@ var ActionCard = function ActionCard(props) {
22341
22465
  className = props.className,
22342
22466
  zIndex = props.zIndex,
22343
22467
  onClick = props.onClick,
22344
- rest = _objectWithoutProperties(props, _excluded$e);
22468
+ rest = _objectWithoutProperties(props, _excluded$i);
22345
22469
 
22346
22470
  var classes = classnames((_classNames = {}, _defineProperty$1(_classNames, 'ActionCard', true), _defineProperty$1(_classNames, 'ActionCard--disabled', disabled), _classNames), className);
22347
22471
 
@@ -22443,7 +22567,7 @@ function useSingleSelect() {
22443
22567
  };
22444
22568
  }
22445
22569
 
22446
- var _excluded$d = ["children", "onClick", "disabled", "id", "cardValue", "overlayZIndex", "selected", "className"];
22570
+ var _excluded$h = ["children", "onClick", "disabled", "id", "cardValue", "overlayZIndex", "selected", "className"];
22447
22571
  var SelectionCard = function SelectionCard(props) {
22448
22572
  var _classNames;
22449
22573
 
@@ -22455,7 +22579,7 @@ var SelectionCard = function SelectionCard(props) {
22455
22579
  overlayZIndex = props.overlayZIndex,
22456
22580
  selected = props.selected,
22457
22581
  className = props.className,
22458
- rest = _objectWithoutProperties(props, _excluded$d);
22582
+ rest = _objectWithoutProperties(props, _excluded$h);
22459
22583
 
22460
22584
  var classes = classnames((_classNames = {}, _defineProperty$1(_classNames, 'Selection-card', true), _defineProperty$1(_classNames, 'Selection-card--selected', selected), _defineProperty$1(_classNames, 'Selection-card--disabled', disabled && !selected), _defineProperty$1(_classNames, 'Selection-card--selected-disabled', disabled && selected), _classNames), className);
22461
22585
 
@@ -23287,6 +23411,7 @@ var ListBody = function ListBody(props) {
23287
23411
  "data-test": "DesignSystem-Listbox-DragIcon"
23288
23412
  }), children);
23289
23413
  };
23414
+ ListBody.displayName = 'ListBody';
23290
23415
 
23291
23416
  var getAnimationClass = function getAnimationClass(uniqueKey, expanded) {
23292
23417
  if (expanded) return "nestedList-open-".concat(uniqueKey, " 240ms cubic-bezier(0, 0, 0.38, 0.9)");else if (!expanded) return "nestedList-close-".concat(uniqueKey, " 160ms cubic-bezier(0.2, 0, 1, 0.9)");
@@ -23367,15 +23492,16 @@ var NestedList = function NestedList(props) {
23367
23492
  }, nestedBody));
23368
23493
  };
23369
23494
 
23370
- var _excluded$c = ["nestedBody", "expanded", "id", "onClick", "value", "tagName"];
23495
+ var _excluded$g = ["nestedBody", "expanded", "id", "onClick", "value", "tagName"];
23371
23496
  var ListboxItem = function ListboxItem(props) {
23372
23497
  var nestedBody = props.nestedBody,
23373
23498
  expanded = props.expanded,
23374
23499
  id = props.id,
23375
23500
  onClick = props.onClick,
23376
23501
  value = props.value,
23377
- Tag = props.tagName,
23378
- rest = _objectWithoutProperties(props, _excluded$c);
23502
+ _props$tagName = props.tagName,
23503
+ Tag = _props$tagName === void 0 ? 'li' : _props$tagName,
23504
+ rest = _objectWithoutProperties(props, _excluded$g);
23379
23505
 
23380
23506
  var contextProp = React.useContext(ListboxContext);
23381
23507
  var showDivider = contextProp.showDivider,
@@ -23388,25 +23514,24 @@ var ListboxItem = function ListboxItem(props) {
23388
23514
  var tagClass = classnames(_defineProperty$1({}, 'Listbox-item-wrapper', !draggable));
23389
23515
  return /*#__PURE__*/React.createElement(Tag, _extends$2({
23390
23516
  id: id,
23391
- key: id,
23392
23517
  "data-test": "DesignSystem-Listbox-Item"
23393
23518
  }, rest, {
23394
23519
  onClick: onClickHandler,
23395
23520
  "data-value": value,
23396
23521
  className: tagClass
23397
- }, rest), /*#__PURE__*/React.createElement(ListBody, props), nestedBody && /*#__PURE__*/React.createElement(NestedList, {
23522
+ }), /*#__PURE__*/React.createElement(ListBody, props), nestedBody && /*#__PURE__*/React.createElement(NestedList, {
23398
23523
  expanded: expanded,
23399
23524
  nestedBody: nestedBody
23400
23525
  }), showDivider && /*#__PURE__*/React.createElement(Divider, {
23401
23526
  className: "Listbox-divider"
23402
23527
  }));
23403
23528
  };
23404
- ListboxItem.displayName = 'ListboxItem';
23529
+ ListboxItem.displayName = 'Listbox.Item';
23405
23530
  ListboxItem.defaultProps = {
23406
23531
  tagName: 'li'
23407
23532
  };
23408
23533
 
23409
- var _excluded$b = ["children", "className", "draggable", "size", "type", "showDivider", "tagName"];
23534
+ var _excluded$f = ["children", "className", "draggable", "size", "type", "showDivider", "tagName"];
23410
23535
  var ListboxContext = /*#__PURE__*/React.createContext({
23411
23536
  size: 'standard',
23412
23537
  type: 'resource',
@@ -23422,7 +23547,7 @@ var Listbox = function Listbox(props) {
23422
23547
  type = props.type,
23423
23548
  showDivider = props.showDivider,
23424
23549
  Tag = props.tagName,
23425
- rest = _objectWithoutProperties(props, _excluded$b);
23550
+ rest = _objectWithoutProperties(props, _excluded$f);
23426
23551
 
23427
23552
  var baseProps = extractBaseProps(props);
23428
23553
  var classes = classnames({
@@ -23616,11 +23741,11 @@ var TextField = function TextField(props) {
23616
23741
  };
23617
23742
  TextField.displayName = 'TextField';
23618
23743
 
23619
- var _excluded$a = ["icon", "image"];
23744
+ var _excluded$e = ["icon", "image"];
23620
23745
  var SelectionAvatar = function SelectionAvatar(props) {
23621
23746
  var icon = props.icon,
23622
23747
  image = props.image,
23623
- rest = _objectWithoutProperties(props, _excluded$a);
23748
+ rest = _objectWithoutProperties(props, _excluded$e);
23624
23749
 
23625
23750
  return /*#__PURE__*/React.createElement(Avatar, _extends$2({
23626
23751
  role: "checkbox"
@@ -23711,7 +23836,7 @@ var SelectionAvatarsWrapper = function SelectionAvatarsWrapper(props) {
23711
23836
  }));
23712
23837
  };
23713
23838
 
23714
- var handleKeyDown$4 = function handleKeyDown(event, setOpenPopover, setHighlightFirstItem, setHighlightLastItem) {
23839
+ var handleKeyDown$6 = function handleKeyDown(event, setOpenPopover, setHighlightFirstItem, setHighlightLastItem) {
23715
23840
  switch (event.key) {
23716
23841
  case 'Enter':
23717
23842
  setOpenPopover === null || setOpenPopover === void 0 ? void 0 : setOpenPopover(true);
@@ -23729,7 +23854,7 @@ var handleKeyDown$4 = function handleKeyDown(event, setOpenPopover, setHighlight
23729
23854
  break;
23730
23855
  }
23731
23856
  };
23732
- var focusListItem$2 = function focusListItem(position, setFocusedOption, listRef, withSearch) {
23857
+ var focusListItem$3 = function focusListItem(position, setFocusedOption, listRef, withSearch) {
23733
23858
  var _listRef$current2, _targetOption, _targetOption2, _targetOption2$scroll;
23734
23859
 
23735
23860
  if (withSearch && position === 'down') {
@@ -23791,7 +23916,7 @@ var AvatarSelectionCount = function AvatarSelectionCount(props) {
23791
23916
  "data-test": "DesignSystem-AvatarSelection--TriggerAvatar",
23792
23917
  className: wrapperClassName,
23793
23918
  onKeyDown: function onKeyDown(event) {
23794
- return handleKeyDown$4(event, setOpenPopover, setHighlightFirstItem, setHighlightLastItem);
23919
+ return handleKeyDown$6(event, setOpenPopover, setHighlightFirstItem, setHighlightLastItem);
23795
23920
  },
23796
23921
  style: avatarStyle,
23797
23922
  tabIndex: 0,
@@ -23809,16 +23934,16 @@ var AvatarSelectionCount = function AvatarSelectionCount(props) {
23809
23934
  }, "+".concat(hiddenAvatarCount))));
23810
23935
  };
23811
23936
 
23812
- var handleKeyDown$3 = function handleKeyDown(event, focusedOption, setFocusedOption, setHighlightFirstItem, setHighlightLastItem, listRef, withSearch, setOpenPopover, triggerRef) {
23937
+ var handleKeyDown$5 = function handleKeyDown(event, focusedOption, setFocusedOption, setHighlightFirstItem, setHighlightLastItem, listRef, withSearch, setOpenPopover, triggerRef) {
23813
23938
  switch (event.key) {
23814
23939
  case 'ArrowUp':
23815
23940
  event.preventDefault();
23816
- navigateOptions$2('up', focusedOption, setFocusedOption, listRef, withSearch);
23941
+ navigateOptions$3('up', focusedOption, setFocusedOption, listRef, withSearch);
23817
23942
  break;
23818
23943
 
23819
23944
  case 'ArrowDown':
23820
23945
  event.preventDefault();
23821
- navigateOptions$2('down', focusedOption, setFocusedOption, listRef, withSearch);
23946
+ navigateOptions$3('down', focusedOption, setFocusedOption, listRef, withSearch);
23822
23947
  break;
23823
23948
 
23824
23949
  case 'Enter':
@@ -23839,7 +23964,7 @@ var handleEnterKey$2 = function handleEnterKey(focusedOption) {
23839
23964
  focusedOption === null || focusedOption === void 0 ? void 0 : focusedOption.click();
23840
23965
  };
23841
23966
 
23842
- var navigateOptions$2 = function navigateOptions(direction, focusedOption, setFocusedOption, listRef, withSearch) {
23967
+ var navigateOptions$3 = function navigateOptions(direction, focusedOption, setFocusedOption, listRef, withSearch) {
23843
23968
  var listItems = listRef === null || listRef === void 0 ? void 0 : listRef.current.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');
23844
23969
  var index = Array.from(listItems).findIndex(function (item) {
23845
23970
  return item == focusedOption;
@@ -23921,11 +24046,11 @@ AvatarSelectionList.defaultProps = {
23921
24046
  tagName: 'ul'
23922
24047
  };
23923
24048
 
23924
- var _excluded$9 = ["children", "value"];
24049
+ var _excluded$d = ["children", "value"];
23925
24050
  var AvatarSelectionOption = function AvatarSelectionOption(props) {
23926
24051
  var children = props.children,
23927
24052
  value = props.value,
23928
- rest = _objectWithoutProperties(props, _excluded$9);
24053
+ rest = _objectWithoutProperties(props, _excluded$d);
23929
24054
 
23930
24055
  var contextProp = React.useContext(AvatarSelectionContext);
23931
24056
  var setSelectedItems = contextProp.setSelectedItems,
@@ -23958,7 +24083,7 @@ var AvatarSelectionOption = function AvatarSelectionOption(props) {
23958
24083
  };
23959
24084
 
23960
24085
  var onKeyDownHandler = function onKeyDownHandler(event) {
23961
- handleKeyDown$3(event, focusedOption, setFocusedOption, setHighlightFirstItem, setHighlightLastItem, listRef, withSearch, setOpenPopover, triggerRef);
24086
+ handleKeyDown$5(event, focusedOption, setFocusedOption, setHighlightFirstItem, setHighlightLastItem, listRef, withSearch, setOpenPopover, triggerRef);
23962
24087
  };
23963
24088
 
23964
24089
  return /*#__PURE__*/React.createElement(Listbox.Item, _extends$2({
@@ -24156,14 +24281,14 @@ var AvatarSelection = function AvatarSelection(props) {
24156
24281
  React.useEffect(function () {
24157
24282
  if (highlightFirstItem && openPopover) {
24158
24283
  requestAnimationFrame(function () {
24159
- return focusListItem$2('down', setFocusedOption, listRef, withSearch);
24284
+ return focusListItem$3('down', setFocusedOption, listRef, withSearch);
24160
24285
  });
24161
24286
  }
24162
24287
  }, [highlightFirstItem]);
24163
24288
  React.useEffect(function () {
24164
24289
  if (highlightLastItem && openPopover) {
24165
24290
  requestAnimationFrame(function () {
24166
- return focusListItem$2('up', setFocusedOption, listRef, withSearch);
24291
+ return focusListItem$3('up', setFocusedOption, listRef, withSearch);
24167
24292
  });
24168
24293
  }
24169
24294
  }, [highlightLastItem]);
@@ -24266,16 +24391,16 @@ ComboboxList.defaultProps = {
24266
24391
 
24267
24392
  var ComboboxContext = /*#__PURE__*/React.createContext({});
24268
24393
 
24269
- var handleKeyDown$2 = function handleKeyDown(event, focusedOption, setFocusedOption, setOpenPopover, inputTriggerRef, setHighlightFirstItem, setHighlightLastItem, multiSelect, listRef) {
24394
+ var handleKeyDown$4 = function handleKeyDown(event, focusedOption, setFocusedOption, setOpenPopover, inputTriggerRef, setHighlightFirstItem, setHighlightLastItem, multiSelect, listRef) {
24270
24395
  switch (event.key) {
24271
24396
  case 'ArrowUp':
24272
24397
  event.preventDefault();
24273
- navigateOptions$1('up', focusedOption, setFocusedOption, listRef);
24398
+ navigateOptions$2('up', focusedOption, setFocusedOption, listRef);
24274
24399
  break;
24275
24400
 
24276
24401
  case 'ArrowDown':
24277
24402
  event.preventDefault();
24278
- navigateOptions$1('down', focusedOption, setFocusedOption, listRef);
24403
+ navigateOptions$2('down', focusedOption, setFocusedOption, listRef);
24279
24404
  break;
24280
24405
 
24281
24406
  case 'Enter':
@@ -24315,7 +24440,7 @@ var handleEnterKey$1 = function handleEnterKey(focusedOption, multiSelect, input
24315
24440
  }
24316
24441
  };
24317
24442
 
24318
- var navigateOptions$1 = function navigateOptions(direction, focusedOption, setFocusedOption, listRef) {
24443
+ var navigateOptions$2 = function navigateOptions(direction, focusedOption, setFocusedOption, listRef) {
24319
24444
  var _targetOption$scrollI;
24320
24445
 
24321
24446
  var listItems = listRef.current.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');
@@ -24337,12 +24462,12 @@ var navigateOptions$1 = function navigateOptions(direction, focusedOption, setFo
24337
24462
  });
24338
24463
  };
24339
24464
 
24340
- var _excluded$8 = ["children", "option", "onClick"];
24465
+ var _excluded$c = ["children", "option", "onClick"];
24341
24466
  var ComboboxOption = function ComboboxOption(props) {
24342
24467
  var children = props.children,
24343
24468
  option = props.option,
24344
24469
  onClick = props.onClick,
24345
- rest = _objectWithoutProperties(props, _excluded$8);
24470
+ rest = _objectWithoutProperties(props, _excluded$c);
24346
24471
 
24347
24472
  var contextProp = React.useContext(ComboboxContext);
24348
24473
  var onOptionClick = contextProp.onOptionClick,
@@ -24367,7 +24492,7 @@ var ComboboxOption = function ComboboxOption(props) {
24367
24492
  };
24368
24493
 
24369
24494
  var onKeyDownHandler = function onKeyDownHandler(event) {
24370
- handleKeyDown$2(event, focusedOption, setFocusedOption, setOpenPopover, inputTriggerRef, setHighlightFirstItem, setHighlightLastItem, multiSelect, listRef);
24495
+ handleKeyDown$4(event, focusedOption, setFocusedOption, setOpenPopover, inputTriggerRef, setHighlightFirstItem, setHighlightLastItem, multiSelect, listRef);
24371
24496
  };
24372
24497
 
24373
24498
  return /*#__PURE__*/React.createElement(Listbox.Item, _extends$2({
@@ -24383,7 +24508,7 @@ ComboboxOption.defaultProps = {
24383
24508
  tagName: 'li'
24384
24509
  };
24385
24510
 
24386
- var handleKeyDown$1 = function handleKeyDown(event, setOpenPopover, setHighlightFirstItem, setHighlightLastItem) {
24511
+ var handleKeyDown$3 = function handleKeyDown(event, setOpenPopover, setHighlightFirstItem, setHighlightLastItem) {
24387
24512
  switch (event.key) {
24388
24513
  case 'ArrowUp':
24389
24514
  setOpenPopover === null || setOpenPopover === void 0 ? void 0 : setOpenPopover(true);
@@ -24401,7 +24526,7 @@ var handleKeyDown$1 = function handleKeyDown(event, setOpenPopover, setHighlight
24401
24526
  break;
24402
24527
  }
24403
24528
  };
24404
- var focusListItem$1 = function focusListItem(position, setFocusedOption, listRef) {
24529
+ var focusListItem$2 = function focusListItem(position, setFocusedOption, listRef) {
24405
24530
  var _listRef$current, _targetOption;
24406
24531
 
24407
24532
  var listItems = (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');
@@ -24469,7 +24594,7 @@ var InputBox = function InputBox(props) {
24469
24594
  };
24470
24595
 
24471
24596
  var onKeyDownHandler = function onKeyDownHandler(event) {
24472
- handleKeyDown$1(event, setOpenPopover, setHighlightFirstItem, setHighlightLastItem);
24597
+ handleKeyDown$3(event, setOpenPopover, setHighlightFirstItem, setHighlightLastItem);
24473
24598
  };
24474
24599
 
24475
24600
  return /*#__PURE__*/React.createElement(Input, _extends$2({}, props, {
@@ -24487,7 +24612,7 @@ var InputBox = function InputBox(props) {
24487
24612
  }));
24488
24613
  };
24489
24614
 
24490
- var _excluded$7 = ["chipOptions", "allowDuplicates", "disabled", "error", "placeholder", "defaultValue", "value", "className", "autoFocus", "onChange", "onBlur", "onFocus", "onKeyDown", "onInputChange", "tabIndex", "role"],
24615
+ var _excluded$b = ["chipOptions", "allowDuplicates", "disabled", "error", "placeholder", "defaultValue", "value", "className", "autoFocus", "onChange", "onBlur", "onFocus", "onKeyDown", "onInputChange", "tabIndex", "role"],
24491
24616
  _excluded2 = ["type", "onClick"];
24492
24617
  var keyCodes = {
24493
24618
  BACKSPACE: 'Backspace',
@@ -24513,7 +24638,7 @@ var MultiSelectTrigger = function MultiSelectTrigger(props) {
24513
24638
  onInputChange = props.onInputChange,
24514
24639
  tabIndex = props.tabIndex,
24515
24640
  role = props.role,
24516
- rest = _objectWithoutProperties(props, _excluded$7);
24641
+ rest = _objectWithoutProperties(props, _excluded$b);
24517
24642
 
24518
24643
  var inputRef = /*#__PURE__*/React.createRef();
24519
24644
 
@@ -24736,7 +24861,7 @@ var ChipInputBox = function ChipInputBox(props) {
24736
24861
  };
24737
24862
 
24738
24863
  var onKeyDownHandler = function onKeyDownHandler(event) {
24739
- handleKeyDown$1(event, setOpenPopover, setHighlightFirstItem, setHighlightLastItem);
24864
+ handleKeyDown$3(event, setOpenPopover, setHighlightFirstItem, setHighlightLastItem);
24740
24865
  };
24741
24866
 
24742
24867
  return /*#__PURE__*/React__default.createElement(MultiSelectTrigger, _extends$2({}, props, {
@@ -24755,12 +24880,12 @@ var ChipInputBox = function ChipInputBox(props) {
24755
24880
  }));
24756
24881
  };
24757
24882
 
24758
- var _excluded$6 = ["multiSelect", "chipValue", "value"];
24883
+ var _excluded$a = ["multiSelect", "chipValue", "value"];
24759
24884
  var ComboboxTrigger = function ComboboxTrigger(props) {
24760
24885
  var multiSelect = props.multiSelect,
24761
24886
  chipValue = props.chipValue,
24762
24887
  value = props.value,
24763
- rest = _objectWithoutProperties(props, _excluded$6);
24888
+ rest = _objectWithoutProperties(props, _excluded$a);
24764
24889
 
24765
24890
  if (multiSelect) {
24766
24891
  var icon = props.icon,
@@ -24890,14 +25015,14 @@ var Combobox = function Combobox(props) {
24890
25015
  React.useEffect(function () {
24891
25016
  if (highlightFirstItem && openPopover) {
24892
25017
  requestAnimationFrame(function () {
24893
- return focusListItem$1('down', setFocusedOption, listRef);
25018
+ return focusListItem$2('down', setFocusedOption, listRef);
24894
25019
  });
24895
25020
  }
24896
25021
  }, [highlightFirstItem]);
24897
25022
  React.useEffect(function () {
24898
25023
  if (highlightLastItem && openPopover) {
24899
25024
  requestAnimationFrame(function () {
24900
- return focusListItem$1('up', setFocusedOption, listRef);
25025
+ return focusListItem$2('up', setFocusedOption, listRef);
24901
25026
  });
24902
25027
  }
24903
25028
  }, [highlightLastItem]);
@@ -24993,7 +25118,7 @@ Combobox.Option = ComboboxOption;
24993
25118
 
24994
25119
  var SelectContext = /*#__PURE__*/React.createContext({});
24995
25120
 
24996
- var _excluded$5 = ["children"];
25121
+ var _excluded$9 = ["children"];
24997
25122
  var SelectList = function SelectList(props) {
24998
25123
  var contextProp = React.useContext(SelectContext);
24999
25124
  var withSearch = contextProp.withSearch,
@@ -25002,7 +25127,7 @@ var SelectList = function SelectList(props) {
25002
25127
  multiSelect = contextProp.multiSelect;
25003
25128
 
25004
25129
  var children = props.children,
25005
- rest = _objectWithoutProperties(props, _excluded$5);
25130
+ rest = _objectWithoutProperties(props, _excluded$9);
25006
25131
 
25007
25132
  var searchInputHeight = 33;
25008
25133
  var wrapperStyle = {
@@ -25095,7 +25220,7 @@ var handleKeyDownTrigger = function handleKeyDownTrigger(event, setOpenPopover,
25095
25220
  break;
25096
25221
  }
25097
25222
  };
25098
- var focusListItem = function focusListItem(position, setFocusedOption, listRef) {
25223
+ var focusListItem$1 = function focusListItem(position, setFocusedOption, listRef) {
25099
25224
  var _listRef$current, _listRef$current2, _targetOption, _targetOption2;
25100
25225
 
25101
25226
  var searchInput = (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.querySelectorAll('[data-test="DesignSystem-Select--Input"]');
@@ -25114,16 +25239,16 @@ var focusListItem = function focusListItem(position, setFocusedOption, listRef)
25114
25239
  });
25115
25240
  setFocusedOption && setFocusedOption(targetOption);
25116
25241
  };
25117
- var handleKeyDown = function handleKeyDown(event, focusedOption, setFocusedOption, setHighlightFirstItem, setHighlightLastItem, listRef, withSearch, setOpenPopover, triggerRef) {
25242
+ var handleKeyDown$2 = function handleKeyDown(event, focusedOption, setFocusedOption, setHighlightFirstItem, setHighlightLastItem, listRef, withSearch, setOpenPopover, triggerRef) {
25118
25243
  switch (event.key) {
25119
25244
  case 'ArrowUp':
25120
25245
  event.preventDefault();
25121
- navigateOptions('up', focusedOption, setFocusedOption, listRef, withSearch);
25246
+ navigateOptions$1('up', focusedOption, setFocusedOption, listRef, withSearch);
25122
25247
  break;
25123
25248
 
25124
25249
  case 'ArrowDown':
25125
25250
  event.preventDefault();
25126
- navigateOptions('down', focusedOption, setFocusedOption, listRef, withSearch);
25251
+ navigateOptions$1('down', focusedOption, setFocusedOption, listRef, withSearch);
25127
25252
  break;
25128
25253
 
25129
25254
  case 'Enter':
@@ -25147,7 +25272,7 @@ var handleKeyDown = function handleKeyDown(event, focusedOption, setFocusedOptio
25147
25272
  var handleEnterKey = function handleEnterKey(focusedOption) {
25148
25273
  focusedOption === null || focusedOption === void 0 ? void 0 : focusedOption.click();
25149
25274
  };
25150
- var navigateOptions = function navigateOptions(direction, focusedOption, setFocusedOption, listRef, withSearch) {
25275
+ var navigateOptions$1 = function navigateOptions(direction, focusedOption, setFocusedOption, listRef, withSearch) {
25151
25276
  var listItems = listRef.current.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');
25152
25277
  var index = Array.from(listItems).findIndex(function (item) {
25153
25278
  return item == focusedOption;
@@ -25200,7 +25325,7 @@ var handleInputKeyDown = function handleInputKeyDown(event, listRef, setFocusedO
25200
25325
  setFocusedOption && setFocusedOption(targetOption);
25201
25326
  };
25202
25327
 
25203
- var _excluded$4 = ["children", "option", "checkedState", "onClick", "withCheckbox", "disabled"];
25328
+ var _excluded$8 = ["children", "option", "checkedState", "onClick", "withCheckbox", "disabled"];
25204
25329
  var SelectOption = function SelectOption(props) {
25205
25330
  var children = props.children,
25206
25331
  option = props.option,
@@ -25209,7 +25334,7 @@ var SelectOption = function SelectOption(props) {
25209
25334
  _props$withCheckbox = props.withCheckbox,
25210
25335
  withCheckbox = _props$withCheckbox === void 0 ? true : _props$withCheckbox,
25211
25336
  disabled = props.disabled,
25212
- rest = _objectWithoutProperties(props, _excluded$4);
25337
+ rest = _objectWithoutProperties(props, _excluded$8);
25213
25338
 
25214
25339
  var contextProp = React.useContext(SelectContext);
25215
25340
  var onOptionClick = contextProp.onOptionClick,
@@ -25244,7 +25369,7 @@ var SelectOption = function SelectOption(props) {
25244
25369
  var indeterminate = checkedState === 'indeterminate';
25245
25370
 
25246
25371
  var onKeyDownHandler = function onKeyDownHandler(event) {
25247
- handleKeyDown(event, focusedOption, setFocusedOption, setHighlightFirstItem, setHighlightLastItem, listRef, withSearch, setOpenPopover, triggerRef);
25372
+ handleKeyDown$2(event, focusedOption, setFocusedOption, setHighlightFirstItem, setHighlightLastItem, listRef, withSearch, setOpenPopover, triggerRef);
25248
25373
  };
25249
25374
 
25250
25375
  return /*#__PURE__*/React.createElement(Listbox.Item, _extends$2({
@@ -25274,7 +25399,7 @@ SelectOption.defaultProps = {
25274
25399
  withCheckbox: true
25275
25400
  };
25276
25401
 
25277
- var _excluded$3 = ["triggerSize", "placeholder", "withClearButton", "icon", "disabled", "inlineLabel", "iconType", "onClear", "setLabel"];
25402
+ var _excluded$7 = ["triggerSize", "placeholder", "withClearButton", "icon", "disabled", "inlineLabel", "iconType", "onClear", "setLabel"];
25278
25403
 
25279
25404
  var SelectTrigger = function SelectTrigger(props) {
25280
25405
  var _classNames, _classNames2;
@@ -25288,7 +25413,7 @@ var SelectTrigger = function SelectTrigger(props) {
25288
25413
  iconType = props.iconType,
25289
25414
  onClear = props.onClear,
25290
25415
  setLabel = props.setLabel,
25291
- rest = _objectWithoutProperties(props, _excluded$3);
25416
+ rest = _objectWithoutProperties(props, _excluded$7);
25292
25417
 
25293
25418
  var contextProp = React.useContext(SelectContext);
25294
25419
  var openPopover = contextProp.openPopover,
@@ -25370,7 +25495,7 @@ SelectTrigger.defaultProps = {
25370
25495
  withClearButton: true
25371
25496
  };
25372
25497
 
25373
- var _excluded$2 = ["onChange", "onClear"];
25498
+ var _excluded$6 = ["onChange", "onClear"];
25374
25499
  var SearchInput = function SearchInput(props) {
25375
25500
  var contextProp = React.useContext(SelectContext);
25376
25501
  var setWithSearch = contextProp.setWithSearch,
@@ -25382,7 +25507,7 @@ var SearchInput = function SearchInput(props) {
25382
25507
 
25383
25508
  var onChange = props.onChange,
25384
25509
  onClear = props.onClear,
25385
- rest = _objectWithoutProperties(props, _excluded$2);
25510
+ rest = _objectWithoutProperties(props, _excluded$6);
25386
25511
 
25387
25512
  React.useEffect(function () {
25388
25513
  setWithSearch === null || setWithSearch === void 0 ? void 0 : setWithSearch(true);
@@ -25416,7 +25541,7 @@ var SearchInput = function SearchInput(props) {
25416
25541
  })));
25417
25542
  };
25418
25543
 
25419
- var _excluded$1 = ["title", "description", "children"];
25544
+ var _excluded$5 = ["title", "description", "children"];
25420
25545
  var SelectEmptyTemplate = function SelectEmptyTemplate(props) {
25421
25546
  var contextProp = React.useContext(SelectContext);
25422
25547
  var maxHeight = contextProp.maxHeight,
@@ -25425,7 +25550,7 @@ var SelectEmptyTemplate = function SelectEmptyTemplate(props) {
25425
25550
  var title = props.title,
25426
25551
  description = props.description,
25427
25552
  children = props.children,
25428
- rest = _objectWithoutProperties(props, _excluded$1);
25553
+ rest = _objectWithoutProperties(props, _excluded$5);
25429
25554
 
25430
25555
  var searchInputHeight = 33;
25431
25556
  var wrapperStyle = {
@@ -25455,10 +25580,10 @@ var SelectEmptyTemplate = function SelectEmptyTemplate(props) {
25455
25580
  }, description), children && children));
25456
25581
  };
25457
25582
 
25458
- var _excluded = ["children"];
25583
+ var _excluded$4 = ["children"];
25459
25584
  var SelectFooter = function SelectFooter(props) {
25460
25585
  var children = props.children,
25461
- rest = _objectWithoutProperties(props, _excluded);
25586
+ rest = _objectWithoutProperties(props, _excluded$4);
25462
25587
 
25463
25588
  return /*#__PURE__*/React.createElement("div", _extends$2({
25464
25589
  className: "Select-buttonWrapper"
@@ -25532,7 +25657,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (props, ref) {
25532
25657
  setFocusFirstItem: function setFocusFirstItem() {
25533
25658
  if (openPopover) {
25534
25659
  requestAnimationFrame(function () {
25535
- return focusListItem('down', setFocusedOption, listRef);
25660
+ return focusListItem$1('down', setFocusedOption, listRef);
25536
25661
  });
25537
25662
  setHighlightFirstItem(true);
25538
25663
  }
@@ -25540,7 +25665,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (props, ref) {
25540
25665
  setFocusLastItem: function setFocusLastItem() {
25541
25666
  if (openPopover) {
25542
25667
  requestAnimationFrame(function () {
25543
- return focusListItem('up', setFocusedOption, listRef);
25668
+ return focusListItem$1('up', setFocusedOption, listRef);
25544
25669
  });
25545
25670
  setHighlightLastItem(true);
25546
25671
  }
@@ -25556,14 +25681,14 @@ var Select = /*#__PURE__*/React.forwardRef(function (props, ref) {
25556
25681
  React.useEffect(function () {
25557
25682
  if (highlightFirstItem && openPopover) {
25558
25683
  requestAnimationFrame(function () {
25559
- return focusListItem('down', setFocusedOption, listRef);
25684
+ return focusListItem$1('down', setFocusedOption, listRef);
25560
25685
  });
25561
25686
  }
25562
25687
  }, [highlightFirstItem]);
25563
25688
  React.useEffect(function () {
25564
25689
  if (highlightLastItem && openPopover) {
25565
25690
  requestAnimationFrame(function () {
25566
- return focusListItem('up', setFocusedOption, listRef);
25691
+ return focusListItem$1('up', setFocusedOption, listRef);
25567
25692
  });
25568
25693
  }
25569
25694
  }, [highlightLastItem]);
@@ -25648,6 +25773,469 @@ Select.SearchInput = SearchInput;
25648
25773
  Select.EmptyTemplate = SelectEmptyTemplate;
25649
25774
  Select.Footer = SelectFooter;
25650
25775
 
25651
- var version = "2.29.0";
25776
+ var _excluded$3 = ["label", "children", "showDivider"];
25777
+ var MenuGroup = function MenuGroup(props) {
25778
+ var label = props.label,
25779
+ children = props.children,
25780
+ showDivider = props.showDivider,
25781
+ rest = _objectWithoutProperties(props, _excluded$3);
25782
+
25783
+ if (label) {
25784
+ return /*#__PURE__*/React__default.createElement("div", _extends$2({
25785
+ "data-test": "DesignSystem-Menu-Group",
25786
+ role: "group",
25787
+ className: "Menu-Group"
25788
+ }, rest), /*#__PURE__*/React__default.createElement(Text, {
25789
+ "data-test": "DesignSystem-Menu-Group-Label",
25790
+ size: "small",
25791
+ weight: "medium",
25792
+ appearance: "subtle",
25793
+ className: "Menu-Group-Label"
25794
+ }, label), children);
25795
+ }
25796
+
25797
+ return /*#__PURE__*/React__default.createElement("div", _extends$2({
25798
+ "data-test": "DesignSystem-Menu-Group",
25799
+ role: "group"
25800
+ }, rest), children, showDivider && /*#__PURE__*/React__default.createElement(Divider, {
25801
+ className: "my-3"
25802
+ }));
25803
+ };
25804
+ MenuGroup.defaultProps = {
25805
+ showDivider: true
25806
+ };
25807
+
25808
+ var MenuContext = /*#__PURE__*/React.createContext({});
25809
+
25810
+ var handleKeyDown$1 = function handleKeyDown(event, focusedOption, setFocusedOption, setOpenPopover, menuTriggerRef, listRef, subListRef, isSubMenuTrigger, triggerRef, menuID, triggerID, parentListRef) {
25811
+ switch (event.key) {
25812
+ case 'ArrowUp':
25813
+ event.preventDefault();
25814
+ navigateOptions('up', focusedOption, setFocusedOption, listRef);
25815
+ break;
25816
+
25817
+ case 'ArrowDown':
25818
+ event.preventDefault();
25819
+ navigateOptions('down', focusedOption, setFocusedOption, listRef);
25820
+ break;
25821
+
25822
+ case 'Enter':
25823
+ focusedOption === null || focusedOption === void 0 ? void 0 : focusedOption.click();
25824
+ setOpenPopover === null || setOpenPopover === void 0 ? void 0 : setOpenPopover(false);
25825
+ break;
25826
+
25827
+ case 'Escape':
25828
+ setOpenPopover === null || setOpenPopover === void 0 ? void 0 : setOpenPopover(false);
25829
+
25830
+ if (triggerRef && !isSubMenuTrigger) {
25831
+ var _triggerRef$current;
25832
+
25833
+ triggerRef === null || triggerRef === void 0 ? void 0 : (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : _triggerRef$current.focus();
25834
+ } else {
25835
+ var _menuTriggerRef$curre;
25836
+
25837
+ menuTriggerRef === null || menuTriggerRef === void 0 ? void 0 : (_menuTriggerRef$curre = menuTriggerRef.current) === null || _menuTriggerRef$curre === void 0 ? void 0 : _menuTriggerRef$curre.focus();
25838
+ }
25839
+
25840
+ setFocusedOption === null || setFocusedOption === void 0 ? void 0 : setFocusedOption(undefined);
25841
+ break;
25842
+
25843
+ case 'Tab':
25844
+ setOpenPopover === null || setOpenPopover === void 0 ? void 0 : setOpenPopover(false);
25845
+ break;
25846
+
25847
+ case 'ArrowRight':
25848
+ navigateSubMenu(isSubMenuTrigger, 'right', subListRef, menuID, triggerID, parentListRef);
25849
+ break;
25850
+
25851
+ case 'ArrowLeft':
25852
+ navigateSubMenu(isSubMenuTrigger, 'left', subListRef, menuID, triggerID, parentListRef);
25853
+ break;
25854
+ }
25855
+ };
25856
+
25857
+ var navigateOptions = function navigateOptions(direction, focusedOption, setFocusedOption, listRef) {
25858
+ var _listRef$current, _targetOption$scrollI;
25859
+
25860
+ var listItems = (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');
25861
+ var index = Array.from(listItems).findIndex(function (item) {
25862
+ return item == focusedOption;
25863
+ });
25864
+
25865
+ if (index === -1) {
25866
+ index = direction === 'up' ? listItems.length - 1 : 0;
25867
+ } else {
25868
+ index = direction === 'up' ? (index - 1 + listItems.length) % listItems.length : (index + 1) % listItems.length;
25869
+ }
25870
+
25871
+ var targetOption = listItems[index];
25872
+ targetOption.focus();
25873
+ setFocusedOption && setFocusedOption(targetOption);
25874
+ targetOption === null || targetOption === void 0 ? void 0 : (_targetOption$scrollI = targetOption.scrollIntoView) === null || _targetOption$scrollI === void 0 ? void 0 : _targetOption$scrollI.call(targetOption, {
25875
+ block: 'center'
25876
+ });
25877
+ };
25878
+
25879
+ var navigateSubMenu = function navigateSubMenu(isSubMenuTrigger, direction, subListRef, menuID, triggerID, parentListRef) {
25880
+ var element = document.querySelector("[data-name=\"".concat(menuID, "\"]"));
25881
+ var menuPlacement = element === null || element === void 0 ? void 0 : element.getAttribute('data-placement');
25882
+
25883
+ if (isSubMenuTrigger) {
25884
+ if (direction === 'right' && menuPlacement !== null && menuPlacement !== void 0 && menuPlacement.includes('right') || direction === 'left' && menuPlacement !== null && menuPlacement !== void 0 && menuPlacement.includes('left')) {
25885
+ var _subListRef$current;
25886
+
25887
+ var listItems = subListRef === null || subListRef === void 0 ? void 0 : (_subListRef$current = subListRef.current) === null || _subListRef$current === void 0 ? void 0 : _subListRef$current.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');
25888
+ (listItems === null || listItems === void 0 ? void 0 : listItems[0]).focus();
25889
+ }
25890
+ } else if (direction === 'left' && menuPlacement !== null && menuPlacement !== void 0 && menuPlacement.includes('right') || direction === 'right' && menuPlacement !== null && menuPlacement !== void 0 && menuPlacement.includes('left')) {
25891
+ var _parentListRef$curren, _parentListRef$curren2;
25892
+
25893
+ var triggerElement = parentListRef === null || parentListRef === void 0 ? void 0 : (_parentListRef$curren = parentListRef.current) === null || _parentListRef$curren === void 0 ? void 0 : (_parentListRef$curren2 = _parentListRef$curren.querySelector("#".concat(triggerID))) === null || _parentListRef$curren2 === void 0 ? void 0 : _parentListRef$curren2.firstChild;
25894
+ triggerElement === null || triggerElement === void 0 ? void 0 : triggerElement.focus();
25895
+ }
25896
+ };
25897
+
25898
+ var SubMenuContext = /*#__PURE__*/React.createContext({});
25899
+
25900
+ var _excluded$2 = ["children", "className", "onClick", "disabled"];
25901
+ var MenuItem = function MenuItem(props) {
25902
+ var children = props.children,
25903
+ className = props.className,
25904
+ onClick = props.onClick,
25905
+ disabled = props.disabled,
25906
+ rest = _objectWithoutProperties(props, _excluded$2);
25907
+
25908
+ var contextProp = React__default.useContext(MenuContext);
25909
+ var subMenuContextProp = React__default.useContext(SubMenuContext);
25910
+ var isSubMenuTrigger = false;
25911
+ var subListRef = null;
25912
+ var triggerRef = subMenuContextProp.triggerRef,
25913
+ menuID = subMenuContextProp.menuID,
25914
+ setParentOpen = subMenuContextProp.setParentOpen,
25915
+ triggerID = subMenuContextProp.triggerID,
25916
+ parentListRef = subMenuContextProp.parentListRef;
25917
+ var setOpenPopover = contextProp.setOpenPopover,
25918
+ focusedOption = contextProp.focusedOption,
25919
+ setFocusedOption = contextProp.setFocusedOption,
25920
+ menuTriggerRef = contextProp.menuTriggerRef,
25921
+ listRef = contextProp.listRef;
25922
+ var MenuItemClassName = classnames({
25923
+ 'Menu-Item': true
25924
+ }, className);
25925
+ React__default.useEffect(function () {
25926
+ var _parentListRef$curren, _parentListRef$curren2;
25927
+
25928
+ var handlePopoverOpen = function handlePopoverOpen() {
25929
+ setOpenPopover === null || setOpenPopover === void 0 ? void 0 : setOpenPopover(true);
25930
+ };
25931
+
25932
+ var handlePopoverClose = function handlePopoverClose() {
25933
+ setOpenPopover === null || setOpenPopover === void 0 ? void 0 : setOpenPopover(false);
25934
+ };
25935
+
25936
+ var triggerElement = parentListRef === null || parentListRef === void 0 ? void 0 : (_parentListRef$curren = parentListRef.current) === null || _parentListRef$curren === void 0 ? void 0 : (_parentListRef$curren2 = _parentListRef$curren.querySelector("#".concat(triggerID))) === null || _parentListRef$curren2 === void 0 ? void 0 : _parentListRef$curren2.firstChild;
25937
+ triggerElement === null || triggerElement === void 0 ? void 0 : triggerElement.addEventListener('focus', handlePopoverOpen);
25938
+ triggerElement === null || triggerElement === void 0 ? void 0 : triggerElement.addEventListener('blur', handlePopoverClose);
25939
+ return function () {
25940
+ triggerElement === null || triggerElement === void 0 ? void 0 : triggerElement.removeEventListener('focus', handlePopoverOpen);
25941
+ triggerElement === null || triggerElement === void 0 ? void 0 : triggerElement.removeEventListener('blur', handlePopoverClose);
25942
+ };
25943
+ }, [triggerID]);
25944
+
25945
+ var onFocusHandler = function onFocusHandler(event) {
25946
+ setFocusedOption === null || setFocusedOption === void 0 ? void 0 : setFocusedOption(event.target);
25947
+ setOpenPopover === null || setOpenPopover === void 0 ? void 0 : setOpenPopover(true);
25948
+ };
25949
+
25950
+ var onKeyDownHandler = function onKeyDownHandler(event) {
25951
+ handleKeyDown$1(event, focusedOption, setFocusedOption, setOpenPopover, menuTriggerRef, listRef, subListRef, isSubMenuTrigger, triggerRef, menuID, triggerID, parentListRef);
25952
+ };
25953
+
25954
+ var onClickHandler = function onClickHandler(event) {
25955
+ if (disabled) {
25956
+ return;
25957
+ }
25958
+
25959
+ setOpenPopover === null || setOpenPopover === void 0 ? void 0 : setOpenPopover(false);
25960
+ onClick === null || onClick === void 0 ? void 0 : onClick(event);
25961
+ setParentOpen === null || setParentOpen === void 0 ? void 0 : setParentOpen(false);
25962
+ };
25963
+
25964
+ return /*#__PURE__*/React__default.createElement(Listbox.Item, _extends$2({
25965
+ "data-test": "DesignSystem-Menu-ListItem",
25966
+ className: MenuItemClassName,
25967
+ tabIndex: -1,
25968
+ onKeyDown: onKeyDownHandler,
25969
+ onFocus: onFocusHandler,
25970
+ onClick: onClickHandler,
25971
+ disabled: disabled,
25972
+ role: "menuitem",
25973
+ "aria-disabled": disabled
25974
+ }, rest), children);
25975
+ };
25976
+ MenuItem.displayName = 'MenuItem';
25977
+ MenuItem.defaultProps = {
25978
+ tagName: 'a'
25979
+ };
25980
+
25981
+ var _excluded$1 = ["children"];
25982
+ var MenuList = function MenuList(props) {
25983
+ var children = props.children,
25984
+ rest = _objectWithoutProperties(props, _excluded$1);
25985
+
25986
+ return /*#__PURE__*/React__default.createElement(Listbox, _extends$2({
25987
+ "data-test": "DesignSystem-Menu-List"
25988
+ }, rest), children);
25989
+ };
25990
+ MenuList.defaultProps = {
25991
+ type: 'option',
25992
+ showDivider: false,
25993
+ tagName: 'nav',
25994
+ size: 'compressed'
25995
+ };
25996
+
25997
+ var handleKeyDown = function handleKeyDown(event, setOpenPopover, setHighlightFirstItem, setHighlightLastItem) {
25998
+ switch (event.key) {
25999
+ case 'ArrowUp':
26000
+ event.preventDefault();
26001
+ setOpenPopover === null || setOpenPopover === void 0 ? void 0 : setOpenPopover(true);
26002
+ setHighlightLastItem === null || setHighlightLastItem === void 0 ? void 0 : setHighlightLastItem(true);
26003
+ break;
26004
+
26005
+ case 'ArrowDown':
26006
+ event.preventDefault();
26007
+ setOpenPopover === null || setOpenPopover === void 0 ? void 0 : setOpenPopover(true);
26008
+ setHighlightFirstItem === null || setHighlightFirstItem === void 0 ? void 0 : setHighlightFirstItem(true);
26009
+ break;
26010
+
26011
+ case 'Escape':
26012
+ case 'Tab':
26013
+ setOpenPopover === null || setOpenPopover === void 0 ? void 0 : setOpenPopover(false);
26014
+ break;
26015
+ }
26016
+ };
26017
+ var focusListItem = function focusListItem(position, setFocusedOption, listRef) {
26018
+ var _listRef$current, _targetOption;
26019
+
26020
+ var listItems = (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');
26021
+ var targetOption;
26022
+
26023
+ if (position === 'down') {
26024
+ targetOption = listItems === null || listItems === void 0 ? void 0 : listItems[0];
26025
+ } else {
26026
+ targetOption = listItems === null || listItems === void 0 ? void 0 : listItems[listItems.length - 1];
26027
+ }
26028
+
26029
+ (_targetOption = targetOption) === null || _targetOption === void 0 ? void 0 : _targetOption.focus();
26030
+
26031
+ if (targetOption && typeof targetOption.scrollIntoView === 'function') {
26032
+ var _targetOption2;
26033
+
26034
+ (_targetOption2 = targetOption) === null || _targetOption2 === void 0 ? void 0 : _targetOption2.scrollIntoView({
26035
+ block: 'end'
26036
+ });
26037
+ }
26038
+
26039
+ setFocusedOption && setFocusedOption(targetOption);
26040
+ };
26041
+
26042
+ var MenuTrigger = function MenuTrigger(props) {
26043
+ var className = props.className;
26044
+ var contextProp = React__default.useContext(MenuContext);
26045
+ var openPopover = contextProp.openPopover,
26046
+ setOpenPopover = contextProp.setOpenPopover,
26047
+ setHighlightFirstItem = contextProp.setHighlightFirstItem,
26048
+ setHighlightLastItem = contextProp.setHighlightLastItem,
26049
+ menuTriggerRef = contextProp.menuTriggerRef;
26050
+ var triggerClassName = classnames({
26051
+ 'Menu-Trigger--active': openPopover
26052
+ }, className);
26053
+
26054
+ var onKeyDownHandler = function onKeyDownHandler(event) {
26055
+ handleKeyDown(event, setOpenPopover, setHighlightFirstItem, setHighlightLastItem);
26056
+ };
26057
+
26058
+ return /*#__PURE__*/React__default.createElement(Button, _extends$2({
26059
+ "data-test": "DesignSystem-Menu-Trigger",
26060
+ icon: "more_horiz",
26061
+ ref: menuTriggerRef,
26062
+ "aria-label": "Open menu",
26063
+ "aria-haspopup": true,
26064
+ "aria-expanded": openPopover
26065
+ }, props, {
26066
+ className: triggerClassName,
26067
+ onKeyDown: onKeyDownHandler
26068
+ }));
26069
+ };
26070
+
26071
+ var SubMenu = function SubMenu(props) {
26072
+ var children = props.children;
26073
+ var menuID = "DesignSystem-Menu--Popover-".concat(uidGenerator());
26074
+ var triggerID = "DesignSystem-Menu--Trigger-".concat(uidGenerator());
26075
+
26076
+ var _React$Children$toArr = React__default.Children.toArray(children),
26077
+ _React$Children$toArr2 = _slicedToArray(_React$Children$toArr, 2),
26078
+ submenuTrigger = _React$Children$toArr2[0],
26079
+ submenuContent = _React$Children$toArr2[1];
26080
+
26081
+ var contextProp = React__default.useContext(MenuContext);
26082
+ var subListRef = React__default.useRef(null);
26083
+ var triggerRef = React__default.useRef(null);
26084
+ var isSubMenuTrigger = true;
26085
+ var subMenuElement = /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
26086
+ var setOpenPopover = contextProp.setOpenPopover,
26087
+ focusedOption = contextProp.focusedOption,
26088
+ setFocusedOption = contextProp.setFocusedOption,
26089
+ menuTriggerRef = contextProp.menuTriggerRef,
26090
+ listRef = contextProp.listRef;
26091
+
26092
+ var onKeyDownHandler = function onKeyDownHandler(event) {
26093
+ handleKeyDown$1(event, focusedOption, setFocusedOption, setOpenPopover, menuTriggerRef, listRef, subListRef, isSubMenuTrigger, triggerRef, menuID);
26094
+ };
26095
+
26096
+ var subMenuContextProp = {
26097
+ triggerRef: triggerRef,
26098
+ menuID: menuID,
26099
+ setParentOpen: setOpenPopover,
26100
+ parentListRef: listRef,
26101
+ triggerID: triggerID
26102
+ };
26103
+ var triggerElement = /*#__PURE__*/React__default.cloneElement(submenuTrigger, _objectSpread2(_objectSpread2({}, submenuTrigger === null || submenuTrigger === void 0 ? void 0 : submenuTrigger.props), {}, {
26104
+ onKeyDown: onKeyDownHandler,
26105
+ ref: triggerRef,
26106
+ 'aria-haspopup': 'menu',
26107
+ 'aria-expanded': subListRef.current ? 'true' : 'false',
26108
+ 'aria-controls': menuID,
26109
+ id: triggerID
26110
+ }));
26111
+
26112
+ if ( /*#__PURE__*/React__default.isValidElement(submenuContent)) {
26113
+ var _submenuContent$props = submenuContent === null || submenuContent === void 0 ? void 0 : submenuContent.props,
26114
+ on = _submenuContent$props.on,
26115
+ _children = _submenuContent$props.children;
26116
+
26117
+ subMenuElement = /*#__PURE__*/React__default.cloneElement(submenuContent, _objectSpread2(_objectSpread2({}, submenuContent.props), {}, {
26118
+ on: on || 'hover',
26119
+ offset: 'small',
26120
+ children: /*#__PURE__*/React__default.createElement("div", {
26121
+ ref: subListRef
26122
+ }, _children),
26123
+ trigger: triggerElement
26124
+ }));
26125
+ }
26126
+
26127
+ return /*#__PURE__*/React__default.createElement(SubMenuContext.Provider, {
26128
+ value: subMenuContextProp
26129
+ }, subMenuElement);
26130
+ };
26131
+
26132
+ var _excluded = ["children", "width", "minHeight", "maxHeight", "className", "open"];
26133
+ var Menu = function Menu(props) {
26134
+ var children = props.children,
26135
+ width = props.width,
26136
+ minHeight = props.minHeight,
26137
+ maxHeight = props.maxHeight,
26138
+ className = props.className,
26139
+ open = props.open,
26140
+ rest = _objectWithoutProperties(props, _excluded);
26141
+
26142
+ var _React$useState = React__default.useState(open),
26143
+ _React$useState2 = _slicedToArray(_React$useState, 2),
26144
+ openPopover = _React$useState2[0],
26145
+ setOpenPopover = _React$useState2[1];
26146
+
26147
+ var _React$useState3 = React__default.useState(false),
26148
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
26149
+ highlightFirstItem = _React$useState4[0],
26150
+ setHighlightFirstItem = _React$useState4[1];
26151
+
26152
+ var _React$useState5 = React__default.useState(false),
26153
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
26154
+ highlightLastItem = _React$useState6[0],
26155
+ setHighlightLastItem = _React$useState6[1];
26156
+
26157
+ var _React$useState7 = React__default.useState(),
26158
+ _React$useState8 = _slicedToArray(_React$useState7, 2),
26159
+ focusedOption = _React$useState8[0],
26160
+ setFocusedOption = _React$useState8[1];
26161
+
26162
+ var listRef = /*#__PURE__*/React__default.createRef();
26163
+ var menuTriggerRef = React__default.useRef(null);
26164
+ var subMenuContextProp = React__default.useContext(SubMenuContext);
26165
+ var menuID = subMenuContextProp.menuID;
26166
+ var popoverClassName = classnames(_defineProperty$1({}, 'Menu', true), className);
26167
+ React__default.useEffect(function () {
26168
+ setOpenPopover(open);
26169
+ }, [open]);
26170
+ React__default.useEffect(function () {
26171
+ if (highlightFirstItem && openPopover) {
26172
+ requestAnimationFrame(function () {
26173
+ return focusListItem('down', setFocusedOption, listRef);
26174
+ });
26175
+ }
26176
+ }, [highlightFirstItem]);
26177
+ React__default.useEffect(function () {
26178
+ if (highlightLastItem && openPopover) {
26179
+ requestAnimationFrame(function () {
26180
+ return focusListItem('up', setFocusedOption, listRef);
26181
+ });
26182
+ }
26183
+ }, [highlightLastItem]);
26184
+ React__default.useEffect(function () {
26185
+ if (!openPopover) {
26186
+ setHighlightFirstItem(false);
26187
+ setHighlightLastItem(false);
26188
+ }
26189
+ }, [openPopover]);
26190
+
26191
+ var onToggleHandler = function onToggleHandler(open) {
26192
+ setOpenPopover(open);
26193
+ };
26194
+
26195
+ var contextProp = {
26196
+ openPopover: openPopover,
26197
+ setOpenPopover: setOpenPopover,
26198
+ setHighlightFirstItem: setHighlightFirstItem,
26199
+ setHighlightLastItem: setHighlightLastItem,
26200
+ focusedOption: focusedOption,
26201
+ setFocusedOption: setFocusedOption,
26202
+ menuTriggerRef: menuTriggerRef,
26203
+ listRef: listRef
26204
+ };
26205
+ return /*#__PURE__*/React__default.createElement(MenuContext.Provider, {
26206
+ value: contextProp
26207
+ }, /*#__PURE__*/React__default.createElement(Popover, _extends$2({
26208
+ "data-test": "DesignSystem-Menu",
26209
+ name: menuID,
26210
+ offset: "medium"
26211
+ }, rest, {
26212
+ open: openPopover,
26213
+ customStyle: {
26214
+ width: width
26215
+ },
26216
+ onToggle: onToggleHandler
26217
+ }), /*#__PURE__*/React__default.createElement("div", {
26218
+ ref: listRef,
26219
+ role: "menu",
26220
+ "data-test": props['data-test'] || 'DesignSystem-Menu-Wrapper',
26221
+ className: popoverClassName,
26222
+ style: {
26223
+ maxHeight: maxHeight,
26224
+ minHeight: minHeight
26225
+ }
26226
+ }, children)));
26227
+ };
26228
+ Menu.Group = MenuGroup;
26229
+ Menu.Item = MenuItem;
26230
+ Menu.List = MenuList;
26231
+ Menu.Trigger = MenuTrigger;
26232
+ Menu.SubMenu = SubMenu;
26233
+ Menu.defaultProps = {
26234
+ width: 176,
26235
+ maxHeight: 256,
26236
+ position: 'bottom-start'
26237
+ };
26238
+
26239
+ var version = "2.30.0";
25652
26240
 
25653
- export { 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, 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, 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 };
26241
+ export { 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, 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, 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 };