@itwin/itwinui-react 1.37.0 → 1.37.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/cjs/core/Alert/Alert.js +1 -1
  3. package/cjs/core/Badge/Badge.js +1 -1
  4. package/cjs/core/Breadcrumbs/Breadcrumbs.d.ts +2 -2
  5. package/cjs/core/Buttons/Button/Button.js +2 -2
  6. package/cjs/core/Buttons/IconButton/IconButton.js +2 -2
  7. package/cjs/core/Carousel/Carousel.js +1 -1
  8. package/cjs/core/Carousel/CarouselDotsList.js +1 -1
  9. package/cjs/core/Carousel/CarouselSlider.js +1 -1
  10. package/cjs/core/Checkbox/Checkbox.js +1 -1
  11. package/cjs/core/ColorPicker/ColorBuilder.js +3 -3
  12. package/cjs/core/ColorPicker/ColorInputPanel.js +1 -1
  13. package/cjs/core/ColorPicker/ColorSwatch.d.ts +1 -1
  14. package/cjs/core/ColorPicker/ColorSwatch.js +1 -1
  15. package/cjs/core/ComboBox/ComboBox.js +9 -6
  16. package/cjs/core/DatePicker/DatePicker.js +2 -2
  17. package/cjs/core/ExpandableBlock/ExpandableBlock.js +1 -1
  18. package/cjs/core/Footer/Footer.js +2 -2
  19. package/cjs/core/Header/HeaderBreadcrumbs.js +1 -1
  20. package/cjs/core/InformationPanel/InformationPanel.js +2 -2
  21. package/cjs/core/Input/Input.js +1 -1
  22. package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.d.ts +1 -1
  23. package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +2 -2
  24. package/cjs/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +2 -2
  25. package/cjs/core/Radio/Radio.js +1 -1
  26. package/cjs/core/Select/Select.js +3 -3
  27. package/cjs/core/Slider/Slider.js +1 -1
  28. package/cjs/core/Slider/Thumb.js +1 -1
  29. package/cjs/core/Slider/Track.js +1 -1
  30. package/cjs/core/Surface/Surface.js +1 -1
  31. package/cjs/core/Table/Table.js +1 -1
  32. package/cjs/core/Table/TablePaginator.js +6 -6
  33. package/cjs/core/Table/TableRowMemoized.js +1 -1
  34. package/cjs/core/Table/columns/actionColumn.js +2 -2
  35. package/cjs/core/Table/utils.js +5 -5
  36. package/cjs/core/Tabs/Tabs.d.ts +1 -1
  37. package/cjs/core/Tabs/Tabs.js +7 -8
  38. package/cjs/core/Tag/TagContainer.js +1 -1
  39. package/cjs/core/Tile/Tile.js +1 -1
  40. package/cjs/core/Toast/Toast.js +2 -2
  41. package/cjs/core/Toast/ToastWrapper.js +1 -1
  42. package/cjs/core/Tree/TreeNode.js +2 -2
  43. package/cjs/core/Typography/Text/Text.js +1 -1
  44. package/cjs/core/UserIcon/UserIcon.js +2 -2
  45. package/cjs/core/UserIconGroup/UserIconGroup.js +3 -3
  46. package/cjs/core/Wizard/Step.js +1 -1
  47. package/cjs/core/Wizard/Wizard.js +1 -1
  48. package/cjs/core/utils/color/ColorValue.js +11 -11
  49. package/cjs/core/utils/color/index.js +5 -1
  50. package/cjs/core/utils/components/FocusTrap.js +6 -8
  51. package/cjs/core/utils/components/InputContainer.js +1 -1
  52. package/cjs/core/utils/components/MiddleTextTruncation.js +1 -1
  53. package/cjs/core/utils/components/VirtualScroll.js +1 -1
  54. package/cjs/core/utils/components/WithCSSTransition.js +5 -5
  55. package/cjs/core/utils/components/index.js +5 -1
  56. package/cjs/core/utils/functions/focusable.js +1 -1
  57. package/cjs/core/utils/functions/index.js +5 -1
  58. package/cjs/core/utils/hooks/index.js +5 -1
  59. package/cjs/core/utils/hooks/useOverflow.js +3 -3
  60. package/cjs/core/utils/hooks/useTheme.js +1 -1
  61. package/cjs/core/utils/index.js +5 -1
  62. package/cjs/index.js +5 -1
  63. package/esm/core/Alert/Alert.js +1 -1
  64. package/esm/core/Badge/Badge.js +1 -1
  65. package/esm/core/Breadcrumbs/Breadcrumbs.d.ts +2 -2
  66. package/esm/core/Buttons/Button/Button.js +2 -2
  67. package/esm/core/Buttons/IconButton/IconButton.js +2 -2
  68. package/esm/core/Carousel/Carousel.js +1 -1
  69. package/esm/core/Carousel/CarouselDotsList.js +1 -1
  70. package/esm/core/Carousel/CarouselSlider.js +1 -1
  71. package/esm/core/Checkbox/Checkbox.js +1 -1
  72. package/esm/core/ColorPicker/ColorBuilder.js +3 -3
  73. package/esm/core/ColorPicker/ColorInputPanel.js +1 -1
  74. package/esm/core/ColorPicker/ColorSwatch.d.ts +1 -1
  75. package/esm/core/ColorPicker/ColorSwatch.js +1 -1
  76. package/esm/core/ComboBox/ComboBox.js +9 -6
  77. package/esm/core/DatePicker/DatePicker.js +2 -2
  78. package/esm/core/ExpandableBlock/ExpandableBlock.js +1 -1
  79. package/esm/core/Footer/Footer.js +2 -2
  80. package/esm/core/Header/HeaderBreadcrumbs.js +1 -1
  81. package/esm/core/InformationPanel/InformationPanel.js +2 -2
  82. package/esm/core/Input/Input.js +1 -1
  83. package/esm/core/ProgressIndicators/ProgressLinear/ProgressLinear.d.ts +1 -1
  84. package/esm/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +2 -2
  85. package/esm/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +2 -2
  86. package/esm/core/Radio/Radio.js +1 -1
  87. package/esm/core/Select/Select.js +3 -3
  88. package/esm/core/Slider/Slider.js +1 -1
  89. package/esm/core/Slider/Thumb.js +1 -1
  90. package/esm/core/Slider/Track.js +1 -1
  91. package/esm/core/Surface/Surface.js +1 -1
  92. package/esm/core/Table/Table.js +1 -1
  93. package/esm/core/Table/TablePaginator.js +6 -6
  94. package/esm/core/Table/TableRowMemoized.js +1 -1
  95. package/esm/core/Table/columns/actionColumn.js +2 -2
  96. package/esm/core/Table/utils.js +5 -5
  97. package/esm/core/Tabs/Tabs.d.ts +1 -1
  98. package/esm/core/Tabs/Tabs.js +7 -8
  99. package/esm/core/Tag/TagContainer.js +1 -1
  100. package/esm/core/Tile/Tile.js +1 -1
  101. package/esm/core/Toast/Toast.js +2 -2
  102. package/esm/core/Toast/ToastWrapper.js +1 -1
  103. package/esm/core/Tree/TreeNode.js +2 -2
  104. package/esm/core/Typography/Text/Text.js +1 -1
  105. package/esm/core/UserIcon/UserIcon.js +2 -2
  106. package/esm/core/UserIconGroup/UserIconGroup.js +3 -3
  107. package/esm/core/Wizard/Step.js +1 -1
  108. package/esm/core/Wizard/Wizard.js +1 -1
  109. package/esm/core/utils/color/ColorValue.js +11 -11
  110. package/esm/core/utils/components/FocusTrap.js +6 -8
  111. package/esm/core/utils/components/InputContainer.js +1 -1
  112. package/esm/core/utils/components/MiddleTextTruncation.js +1 -1
  113. package/esm/core/utils/components/VirtualScroll.js +1 -1
  114. package/esm/core/utils/components/WithCSSTransition.js +5 -5
  115. package/esm/core/utils/functions/focusable.js +1 -1
  116. package/esm/core/utils/hooks/useOverflow.js +3 -3
  117. package/esm/core/utils/hooks/useTheme.js +1 -1
  118. package/package.json +20 -19
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ### [1.37.1](https://www.github.com/iTwin/iTwinUI-react/compare/v1.37.0...v1.37.1) (2022-04-22)
4
+
5
+ ### Fixes
6
+
7
+ * **ComboBox:** Use latest value of `onChange` prop ([#636](https://www.github.com/iTwin/iTwinUI-react/issues/636)) ([a1f705e](https://www.github.com/iTwin/iTwinUI-react/commit/a1f705e05a7608f66e56d3555c679c180fadcae0))
8
+
3
9
  ## [1.37.0](https://www.github.com/iTwin/iTwinUI-react/compare/v1.36.0...v1.37.0) (2022-04-21)
4
10
 
5
11
  ### What's new
@@ -49,7 +49,7 @@ var Alert = function (props) {
49
49
  var children = props.children, className = props.className, _a = props.type, type = _a === void 0 ? 'informational' : _a, clickableText = props.clickableText, clickableTextProps = props.clickableTextProps, onClick = props.onClick, onClose = props.onClose, style = props.style, _b = props.isSticky, isSticky = _b === void 0 ? false : _b, rest = __rest(props, ["children", "className", "type", "clickableText", "clickableTextProps", "onClick", "onClose", "style", "isSticky"]);
50
50
  (0, utils_1.useTheme)();
51
51
  var StatusIcon = utils_1.StatusIconMap[type];
52
- return (react_1.default.createElement("div", __assign({ className: (0, classnames_1.default)('iui-alert', "iui-" + type, { 'iui-sticky': isSticky }, className), style: style }, rest),
52
+ return (react_1.default.createElement("div", __assign({ className: (0, classnames_1.default)('iui-alert', "iui-".concat(type), { 'iui-sticky': isSticky }, className), style: style }, rest),
53
53
  react_1.default.createElement(StatusIcon, { className: 'iui-alert-icon' }),
54
54
  react_1.default.createElement("span", { className: 'iui-alert-message' },
55
55
  children,
@@ -66,7 +66,7 @@ var Badge = function (props) {
66
66
  var backgroundColor = props.backgroundColor, style = props.style, className = props.className, children = props.children, rest = __rest(props, ["backgroundColor", "style", "className", "children"]);
67
67
  (0, utils_1.useTheme)();
68
68
  var _style = backgroundColor &&
69
- ((_c = (_b = (_a = (0, utils_1.getWindow)()) === null || _a === void 0 ? void 0 : _a.CSS) === null || _b === void 0 ? void 0 : _b.supports) === null || _c === void 0 ? void 0 : _c.call(_b, "--iui-badge-background-color: " + backgroundColor))
69
+ ((_c = (_b = (_a = (0, utils_1.getWindow)()) === null || _a === void 0 ? void 0 : _a.CSS) === null || _b === void 0 ? void 0 : _b.supports) === null || _c === void 0 ? void 0 : _c.call(_b, "--iui-badge-background-color: ".concat(backgroundColor)))
70
70
  ? __assign({ '--iui-badge-background-color': getBadgeColorValue(backgroundColor) }, style) : __assign({ backgroundColor: getBadgeColorValue(backgroundColor) }, style);
71
71
  return (react_1.default.createElement("span", __assign({ className: (0, classnames_1.default)('iui-badge', className), style: _style }, rest), children));
72
72
  };
@@ -10,7 +10,7 @@ export declare type BreadcrumbsProps = {
10
10
  /**
11
11
  * Breadcrumb items.
12
12
  */
13
- children: React.ReactNodeArray;
13
+ children: React.ReactNode[];
14
14
  /**
15
15
  * Specify a custom separator element to show between breadcrumb items.
16
16
  * Defaults to the `SvgChevronRight` icon.
@@ -48,7 +48,7 @@ export declare const Breadcrumbs: React.ForwardRefExoticComponent<{
48
48
  /**
49
49
  * Breadcrumb items.
50
50
  */
51
- children: React.ReactNodeArray;
51
+ children: React.ReactNode[];
52
52
  /**
53
53
  * Specify a custom separator element to show between breadcrumb items.
54
54
  * Defaults to the `SvgChevronRight` icon.
@@ -47,8 +47,8 @@ exports.Button = react_1.default.forwardRef(function (props, ref) {
47
47
  var _a;
48
48
  var children = props.children, className = props.className, size = props.size, style = props.style, _b = props.styleType, styleType = _b === void 0 ? 'default' : _b, _c = props.type, type = _c === void 0 ? 'button' : _c, startIcon = props.startIcon, endIcon = props.endIcon, _d = props.as, Element = _d === void 0 ? 'button' : _d, rest = __rest(props, ["children", "className", "size", "style", "styleType", "type", "startIcon", "endIcon", "as"]);
49
49
  (0, utils_1.useTheme)();
50
- return (react_1.default.createElement(Element, __assign({ ref: ref, className: (0, classnames_1.default)('iui-button', "iui-" + styleType, (_a = {},
51
- _a["iui-" + size] = !!size,
50
+ return (react_1.default.createElement(Element, __assign({ ref: ref, className: (0, classnames_1.default)('iui-button', "iui-".concat(styleType), (_a = {},
51
+ _a["iui-".concat(size)] = !!size,
52
52
  _a), className), style: style, type: type }, rest),
53
53
  startIcon &&
54
54
  react_1.default.cloneElement(startIcon, {
@@ -44,8 +44,8 @@ exports.IconButton = react_1.default.forwardRef(function (props, ref) {
44
44
  var _a;
45
45
  var isActive = props.isActive, children = props.children, _b = props.styleType, styleType = _b === void 0 ? 'default' : _b, size = props.size, _c = props.type, type = _c === void 0 ? 'button' : _c, className = props.className, _d = props.as, Element = _d === void 0 ? 'button' : _d, rest = __rest(props, ["isActive", "children", "styleType", "size", "type", "className", "as"]);
46
46
  (0, utils_1.useTheme)();
47
- return (react_1.default.createElement(Element, __assign({ ref: ref, className: (0, classnames_1.default)('iui-button', "iui-" + styleType, (_a = {},
48
- _a["iui-" + size] = !!size,
47
+ return (react_1.default.createElement(Element, __assign({ ref: ref, className: (0, classnames_1.default)('iui-button', "iui-".concat(styleType), (_a = {},
48
+ _a["iui-".concat(size)] = !!size,
49
49
  _a['iui-active'] = isActive,
50
50
  _a), className), type: type }, rest), react_1.default.cloneElement(children, {
51
51
  className: (0, classnames_1.default)('iui-button-icon', children.props.className),
@@ -61,7 +61,7 @@ var CarouselNavigation_1 = require("./CarouselNavigation");
61
61
  exports.Carousel = Object.assign(react_1.default.forwardRef(function (props, ref) {
62
62
  var _a = props.activeSlideIndex, userActiveIndex = _a === void 0 ? 0 : _a, onSlideChange = props.onSlideChange, className = props.className, children = props.children, rest = __rest(props, ["activeSlideIndex", "onSlideChange", "className", "children"]);
63
63
  // Generate a stateful random id if not specified
64
- var id = react_1.default.useState(function () { var _a; return (_a = props.id) !== null && _a !== void 0 ? _a : "iui-carousel-" + (0, utils_1.getRandomValue)(10); })[0];
64
+ var id = react_1.default.useState(function () { var _a; return (_a = props.id) !== null && _a !== void 0 ? _a : "iui-carousel-".concat((0, utils_1.getRandomValue)(10)); })[0];
65
65
  (0, utils_1.useTheme)();
66
66
  var isManuallyUpdating = react_1.default.useRef(false);
67
67
  var scrollInstantly = react_1.default.useRef(false);
@@ -102,7 +102,7 @@ exports.CarouselDotsList = react_1.default.forwardRef(function (props, ref) {
102
102
  var isSecondSmallDot = (index === firstVisibleDotIndex + 1 && index !== 1) ||
103
103
  (index === lastVisibleDotIndex - 1 && index !== slideCount - 2);
104
104
  var isClipped = index < firstVisibleDotIndex || index > lastVisibleDotIndex;
105
- return (react_1.default.createElement(CarouselDot_1.CarouselDot, { key: index, "aria-label": "Slide " + index, isActive: index === currentIndex, onClick: function () { return handleSlideChange(index); }, isSmall: isSecondSmallDot, isSmaller: isFirstSmallDot || isClipped, id: idPrefix && idPrefix + "--dot-" + index, "aria-controls": idPrefix && idPrefix + "--slide-" + index }));
105
+ return (react_1.default.createElement(CarouselDot_1.CarouselDot, { key: index, "aria-label": "Slide ".concat(index), isActive: index === currentIndex, onClick: function () { return handleSlideChange(index); }, isSmall: isSecondSmallDot, isSmaller: isFirstSmallDot || isClipped, id: idPrefix && "".concat(idPrefix, "--dot-").concat(index), "aria-controls": idPrefix && "".concat(idPrefix, "--slide-").concat(index) }));
106
106
  });
107
107
  }, [
108
108
  slideCount,
@@ -49,7 +49,7 @@ exports.CarouselSlider = react_1.default.forwardRef(function (props, ref) {
49
49
  return (_a = react_1.default.Children.map(children, function (child, index) {
50
50
  return react_1.default.isValidElement(child)
51
51
  ? react_1.default.cloneElement(child, {
52
- id: idPrefix + "--slide-" + index,
52
+ id: "".concat(idPrefix, "--slide-").concat(index),
53
53
  index: index,
54
54
  })
55
55
  : child;
@@ -75,7 +75,7 @@ exports.Checkbox = react_1.default.forwardRef(function (props, ref) {
75
75
  return !label ? (checkbox) : (react_1.default.createElement("label", { className: (0, classnames_1.default)('iui-checkbox-wrapper', (_b = {
76
76
  'iui-disabled': disabled
77
77
  },
78
- _b["iui-" + status] = !!status,
78
+ _b["iui-".concat(status)] = !!status,
79
79
  _b['iui-loading'] = isLoading,
80
80
  _b), className), style: style },
81
81
  checkbox,
@@ -69,20 +69,20 @@ exports.ColorBuilder = react_1.default.forwardRef(function (props, ref) {
69
69
  ]);
70
70
  var _p = react_1.default.useState(false), colorDotActive = _p[0], setColorDotActive = _p[1];
71
71
  var hueColorString = hueSliderColor.toHexString();
72
- var colorSquareStyle = ((_c = (_b = (_a = (0, utils_1.getWindow)()) === null || _a === void 0 ? void 0 : _a.CSS) === null || _b === void 0 ? void 0 : _b.supports) === null || _c === void 0 ? void 0 : _c.call(_b, "--iui-color-field-hue: " + hueColorString))
72
+ var colorSquareStyle = ((_c = (_b = (_a = (0, utils_1.getWindow)()) === null || _a === void 0 ? void 0 : _a.CSS) === null || _b === void 0 ? void 0 : _b.supports) === null || _c === void 0 ? void 0 : _c.call(_b, "--iui-color-field-hue: ".concat(hueColorString)))
73
73
  ? {
74
74
  '--iui-color-field-hue': hueColorString,
75
75
  '--iui-color-picker-selected-color': dotColorString,
76
76
  }
77
77
  : { backgroundColor: hueColorString };
78
- var opacitySliderStyle = ((_f = (_e = (_d = (0, utils_1.getWindow)()) === null || _d === void 0 ? void 0 : _d.CSS) === null || _e === void 0 ? void 0 : _e.supports) === null || _f === void 0 ? void 0 : _f.call(_e, "--iui-color-picker-selected-color: " + hueColorString))
78
+ var opacitySliderStyle = ((_f = (_e = (_d = (0, utils_1.getWindow)()) === null || _d === void 0 ? void 0 : _d.CSS) === null || _e === void 0 ? void 0 : _e.supports) === null || _f === void 0 ? void 0 : _f.call(_e, "--iui-color-picker-selected-color: ".concat(hueColorString)))
79
79
  ? { '--iui-color-picker-selected-color': hueColorString }
80
80
  : { backgroundColor: hueColorString };
81
81
  var squareTop = 100 - hsvColor.v;
82
82
  var squareLeft = hsvColor.s;
83
83
  var colorDotStyle = ((_j = (_h = (_g = (0, utils_1.getWindow)()) === null || _g === void 0 ? void 0 : _g.CSS) === null || _h === void 0 ? void 0 : _h.supports) === null || _j === void 0 ? void 0 : _j.call(_h, "--iui-color-dot-inset: 0"))
84
84
  ? {
85
- '--iui-color-dot-inset': squareTop.toString() + "% auto auto " + squareLeft.toString() + "%",
85
+ '--iui-color-dot-inset': "".concat(squareTop.toString(), "% auto auto ").concat(squareLeft.toString(), "%"),
86
86
  }
87
87
  : {
88
88
  backgroundColor: dotColorString,
@@ -156,7 +156,7 @@ exports.ColorInputPanel = react_1.default.forwardRef(function (props, ref) {
156
156
  react_1.default.createElement(Input_1.Input, { size: 'small', maxLength: showAlpha ? 9 : 7, minLength: 1, placeholder: 'HEX', value: input[0], onChange: function (event) {
157
157
  var value = event.target.value.startsWith('#')
158
158
  ? event.target.value
159
- : "#" + event.target.value;
159
+ : "#".concat(event.target.value);
160
160
  setInput([value]);
161
161
  }, onKeyDown: function (event) {
162
162
  if (event.key === 'Enter') {
@@ -17,5 +17,5 @@ export declare type ColorSwatchProps = {
17
17
  * <ColorSwatch color='#23450b' onClick={onClick}/>
18
18
  * <ColorSwatch color={{ r: 255, g: 255, b: 0 }} onClick={onClick}/>
19
19
  */
20
- export declare const ColorSwatch: React.ForwardRefExoticComponent<Pick<ColorSwatchProps, "dir" | "slot" | "style" | "title" | "id" | "aria-disabled" | "role" | "children" | "className" | "onClick" | "accessKey" | "draggable" | "hidden" | "lang" | "translate" | "prefix" | "contentEditable" | "inputMode" | "tabIndex" | "onFocus" | "color" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "isActive"> & React.RefAttributes<HTMLDivElement>>;
20
+ export declare const ColorSwatch: React.ForwardRefExoticComponent<Pick<ColorSwatchProps, "dir" | "slot" | "style" | "title" | "id" | "aria-disabled" | "role" | "children" | "className" | "onClick" | "accessKey" | "draggable" | "hidden" | "lang" | "translate" | "prefix" | "contentEditable" | "inputMode" | "tabIndex" | "onFocus" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "color" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "contextMenu" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "isActive"> & React.RefAttributes<HTMLDivElement>>;
21
21
  export default ColorSwatch;
@@ -51,7 +51,7 @@ exports.ColorSwatch = react_1.default.forwardRef(function (props, ref) {
51
51
  }, [color]);
52
52
  var _style = react_1.default.useMemo(function () {
53
53
  var _a, _b, _c;
54
- return ((_c = (_b = (_a = (0, utils_1.getWindow)()) === null || _a === void 0 ? void 0 : _a.CSS) === null || _b === void 0 ? void 0 : _b.supports) === null || _c === void 0 ? void 0 : _c.call(_b, "--iui-color-swatch-background: " + colorString))
54
+ return ((_c = (_b = (_a = (0, utils_1.getWindow)()) === null || _a === void 0 ? void 0 : _a.CSS) === null || _b === void 0 ? void 0 : _b.supports) === null || _c === void 0 ? void 0 : _c.call(_b, "--iui-color-swatch-background: ".concat(colorString)))
55
55
  ? __assign({ '--iui-color-swatch-background': colorString }, style) : __assign({ backgroundColor: colorString }, style);
56
56
  }, [colorString, style]);
57
57
  return (react_1.default.createElement("div", __assign({ className: (0, classnames_1.default)('iui-color-swatch', { 'iui-active': isActive }, className), style: _style, onClick: onClick, tabIndex: isActive ? 0 : -1, "aria-selected": isActive, ref: ref }, rest)));
@@ -57,18 +57,21 @@ var ComboBox = function (props) {
57
57
  // Generate a stateful random id if not specified
58
58
  var id = react_1.default.useState(function () {
59
59
  var _a, _b;
60
- return (_b = (_a = props.id) !== null && _a !== void 0 ? _a : ((inputProps === null || inputProps === void 0 ? void 0 : inputProps.id) && inputProps.id + "-cb")) !== null && _b !== void 0 ? _b : "iui-cb-" + (0, utils_1.getRandomValue)(10);
60
+ return (_b = (_a = props.id) !== null && _a !== void 0 ? _a : ((inputProps === null || inputProps === void 0 ? void 0 : inputProps.id) && "".concat(inputProps.id, "-cb"))) !== null && _b !== void 0 ? _b : "iui-cb-".concat((0, utils_1.getRandomValue)(10));
61
61
  })[0];
62
62
  (0, utils_1.useTheme)();
63
63
  /** Generates a memoized id for an option, given the index from original list */
64
64
  var getOptionId = react_1.default.useCallback(function (index) {
65
65
  var _a;
66
- return (_a = options[index].id) !== null && _a !== void 0 ? _a : id + "-option" + options.findIndex(function (_a) {
66
+ return (_a = options[index].id) !== null && _a !== void 0 ? _a : "".concat(id, "-option").concat(options.findIndex(function (_a) {
67
67
  var value = _a.value;
68
68
  return value === options[index].value;
69
- });
69
+ }));
70
70
  }, [options, id]);
71
71
  var userOnChange = react_1.default.useRef(onChange);
72
+ react_1.default.useEffect(function () {
73
+ userOnChange.current = onChange;
74
+ }, [onChange]);
72
75
  var memoizedItems = react_1.default.useMemo(function () {
73
76
  return options.map(function (option, index) {
74
77
  var label = option.label, value = option.value, rest = __rest(option, ["label", "value"]);
@@ -284,9 +287,9 @@ var ComboBox = function (props) {
284
287
  if (!((_b = toggleButtonRef.current) === null || _b === void 0 ? void 0 : _b.contains(target))) {
285
288
  setIsOpen(false);
286
289
  }
287
- }, animation: 'shift-away', duration: 200 }, dropdownMenuProps, { content: react_1.default.createElement(Menu_1.Menu, { id: id + "-list", className: 'iui-scroll', style: {
290
+ }, animation: 'shift-away', duration: 200 }, dropdownMenuProps, { content: react_1.default.createElement(Menu_1.Menu, { id: "".concat(id, "-list"), className: 'iui-scroll', style: {
288
291
  minWidth: minWidth,
289
- maxWidth: "min(" + minWidth * 2 + "px, 90vw)",
292
+ maxWidth: "min(".concat(minWidth * 2, "px, 90vw)"),
290
293
  maxHeight: 300,
291
294
  }, setFocus: false, role: 'listbox', ref: menuRef }, menuItems), onHide: function (instance) {
292
295
  var _a;
@@ -302,7 +305,7 @@ var ComboBox = function (props) {
302
305
  } }),
303
306
  react_1.default.createElement(Input_1.Input, __assign({ ref: inputRef, onKeyDown: onKeyDown, onFocus: function () { return setIsOpen(true); }, value: inputValue, "aria-activedescendant": isOpen && focusedIndex > -1
304
307
  ? getOptionId(focusedIndex)
305
- : undefined, role: 'combobox', "aria-controls": isOpen ? id + "-list" : undefined, "aria-autocomplete": 'list', spellCheck: false, autoCapitalize: 'none', autoCorrect: 'off' }, inputProps, { onChange: onInput }))),
308
+ : undefined, role: 'combobox', "aria-controls": isOpen ? "".concat(id, "-list") : undefined, "aria-autocomplete": 'list', spellCheck: false, autoCapitalize: 'none', autoCorrect: 'off' }, inputProps, { onChange: onInput }))),
306
309
  react_1.default.createElement("span", { ref: toggleButtonRef, className: (0, classnames_1.default)('iui-end-icon', {
307
310
  'iui-actionable': !(inputProps === null || inputProps === void 0 ? void 0 : inputProps.disabled),
308
311
  'iui-disabled': inputProps === null || inputProps === void 0 ? void 0 : inputProps.disabled,
@@ -295,9 +295,9 @@ var DatePicker = function (props) {
295
295
  react_1.default.createElement(ChevronRightDouble_1.default, null)))),
296
296
  react_1.default.createElement("div", { className: 'iui-calendar-weekdays' }, shortDays.map(function (day, index) { return (react_1.default.createElement("div", { key: day, title: longDays[index] }, day)); })),
297
297
  react_1.default.createElement("div", { onKeyDown: handleCalendarKeyDown, role: 'listbox' }, weeks.map(function (weekDays, weekIndex) {
298
- return (react_1.default.createElement("div", { key: "week-" + displayedMonthIndex + "-" + weekIndex, className: 'iui-calendar-week' }, weekDays.map(function (weekDay, dayIndex) {
298
+ return (react_1.default.createElement("div", { key: "week-".concat(displayedMonthIndex, "-").concat(weekIndex), className: 'iui-calendar-week' }, weekDays.map(function (weekDay, dayIndex) {
299
299
  var dateValue = weekDay.getDate();
300
- return (react_1.default.createElement("div", { key: "day-" + displayedMonthIndex + "-" + dayIndex, className: getDayClass(weekDay), onClick: function () { return onDayClick(weekDay); }, role: 'option', tabIndex: isSameDay(weekDay, focusedDay) ? 0 : -1, ref: function (element) {
300
+ return (react_1.default.createElement("div", { key: "day-".concat(displayedMonthIndex, "-").concat(dayIndex), className: getDayClass(weekDay), onClick: function () { return onDayClick(weekDay); }, role: 'option', tabIndex: isSameDay(weekDay, focusedDay) ? 0 : -1, ref: function (element) {
301
301
  return isSameDay(weekDay, focusedDay) &&
302
302
  needFocus.current &&
303
303
  (element === null || element === void 0 ? void 0 : element.focus());
@@ -77,7 +77,7 @@ var ExpandableBlock = function (props) {
77
77
  caption && react_1.default.createElement("div", { className: 'iui-caption' }, caption)),
78
78
  icon &&
79
79
  react_1.default.cloneElement(icon, {
80
- className: (0, classnames_1.default)('iui-status-icon', (_a = {}, _a["iui-" + status] = !!status, _a), icon.props.className),
80
+ className: (0, classnames_1.default)('iui-status-icon', (_a = {}, _a["iui-".concat(status)] = !!status, _a), icon.props.className),
81
81
  })),
82
82
  react_1.default.createElement(utils_1.WithCSSTransition, { in: expanded },
83
83
  react_1.default.createElement("div", { className: 'iui-expandable-content' },
@@ -70,7 +70,7 @@ var Footer = function (props) {
70
70
  var defaultElements = [
71
71
  {
72
72
  key: 'copyright',
73
- title: "\u00A9 " + new Date().getFullYear() + " Bentley Systems, Incorporated",
73
+ title: "\u00A9 ".concat(new Date().getFullYear(), " Bentley Systems, Incorporated"),
74
74
  },
75
75
  {
76
76
  key: 'termsOfService',
@@ -107,7 +107,7 @@ var Footer = function (props) {
107
107
  }
108
108
  return (react_1.default.createElement("footer", __assign({ className: (0, classnames_1.default)('iui-legal-footer', className) }, rest),
109
109
  react_1.default.createElement("ul", null, elements.map(function (element, index) {
110
- return (react_1.default.createElement("li", { key: element.key || element.title + "-" + index },
110
+ return (react_1.default.createElement("li", { key: element.key || "".concat(element.title, "-").concat(index) },
111
111
  index > 0 && react_1.default.createElement("span", { className: 'iui-separator' }),
112
112
  element.url ? (react_1.default.createElement("a", { href: element.url, target: '_blank', rel: 'noreferrer' }, element.title)) : (element.title)));
113
113
  }))));
@@ -58,7 +58,7 @@ var HeaderBreadcrumbs = function (props) {
58
58
  (0, utils_1.useTheme)();
59
59
  return (react_1.default.createElement("nav", __assign({ "aria-label": 'breadcrumbs' }, rest), items.reduce(function (previous, current, index) { return __spreadArray(__spreadArray([], previous, true), [
60
60
  current,
61
- index !== items.length - 1 && (react_1.default.createElement(ChevronRight_1.default, { key: "chevron" + index, "aria-hidden": true, className: 'iui-chevron' })),
61
+ index !== items.length - 1 && (react_1.default.createElement(ChevronRight_1.default, { key: "chevron".concat(index), "aria-hidden": true, className: 'iui-chevron' })),
62
62
  ], false); }, [])));
63
63
  };
64
64
  exports.HeaderBreadcrumbs = HeaderBreadcrumbs;
@@ -82,10 +82,10 @@ exports.InformationPanel = react_1.default.forwardRef(function (props, ref) {
82
82
  }
83
83
  var _a = infoPanelRef.current.getBoundingClientRect(), right = _a.right, bottom = _a.bottom;
84
84
  if (orientation === 'vertical') {
85
- infoPanelRef.current.style.width = right - e.clientX + "px";
85
+ infoPanelRef.current.style.width = "".concat(right - e.clientX, "px");
86
86
  }
87
87
  else {
88
- infoPanelRef.current.style.height = bottom - e.clientY + "px";
88
+ infoPanelRef.current.style.height = "".concat(bottom - e.clientY, "px");
89
89
  }
90
90
  }, [orientation]);
91
91
  return (react_1.default.createElement("div", __assign({ className: (0, classnames_1.default)('iui-information-panel', {
@@ -52,6 +52,6 @@ exports.Input = react_1.default.forwardRef(function (props, ref) {
52
52
  inputRef.current.focus();
53
53
  }
54
54
  }, [setFocus]);
55
- return (react_1.default.createElement("input", __assign({ className: (0, classnames_1.default)('iui-input', (_a = {}, _a["iui-" + size] = !!size, _a), className), ref: refs }, rest)));
55
+ return (react_1.default.createElement("input", __assign({ className: (0, classnames_1.default)('iui-input', (_a = {}, _a["iui-".concat(size)] = !!size, _a), className), ref: refs }, rest)));
56
56
  });
57
57
  exports.default = exports.Input;
@@ -15,7 +15,7 @@ export declare type ProgressLinearProps = {
15
15
  /**
16
16
  * Labels array. One label will be centered, two will be put to the sides.
17
17
  */
18
- labels?: React.ReactNodeArray;
18
+ labels?: React.ReactNode[];
19
19
  /**
20
20
  * Apply animation to the value change, if determinate.
21
21
  * @default false
@@ -55,13 +55,13 @@ var ProgressLinear = function (props) {
55
55
  (0, utils_1.useTheme)();
56
56
  var boundedValue = Math.min(100, Math.max(0, value));
57
57
  return (react_1.default.createElement("div", __assign({ className: (0, classnames_1.default)('iui-progress-indicator-linear', (_a = {},
58
- _a["iui-" + status] = !!status,
58
+ _a["iui-".concat(status)] = !!status,
59
59
  _a), className), style: style }, rest),
60
60
  react_1.default.createElement("div", { className: 'iui-track' },
61
61
  react_1.default.createElement("div", { className: (0, classnames_1.default)('iui-fill', {
62
62
  'iui-determinate': !indeterminate && isAnimated,
63
63
  'iui-indeterminate': indeterminate,
64
- }), style: { width: indeterminate ? '100%' : boundedValue + "%" } })),
64
+ }), style: { width: indeterminate ? '100%' : "".concat(boundedValue, "%") } })),
65
65
  labels.length > 0 && (react_1.default.createElement("div", { className: 'iui-label' }, labels.map(function (label, index) { return (react_1.default.createElement("span", { key: index }, label)); })))));
66
66
  };
67
67
  exports.ProgressLinear = ProgressLinear;
@@ -69,8 +69,8 @@ var ProgressRadial = function (props) {
69
69
  'iui-determinate': !indeterminate,
70
70
  'iui-indeterminate': indeterminate
71
71
  },
72
- _a["iui-" + size] = !!size,
73
- _a["iui-" + status] = !!status,
72
+ _a["iui-".concat(size)] = !!size,
73
+ _a["iui-".concat(status)] = !!status,
74
74
  _a), className), style: style }, rest),
75
75
  react_1.default.createElement("svg", { className: 'iui-radial', viewBox: '0 0 32 32', "aria-hidden": 'true' },
76
76
  react_1.default.createElement("circle", { className: 'iui-track', cx: '16', cy: '16', r: '14' }),
@@ -56,7 +56,7 @@ exports.Radio = react_1.default.forwardRef(function (props, ref) {
56
56
  }
57
57
  }, [setFocus]);
58
58
  var radio = (react_1.default.createElement("input", __assign({ className: (0, classnames_1.default)('iui-radio', className && (_a = {}, _a[className] = !label, _a), checkmarkClassName), style: __assign(__assign({}, (!label && style)), checkmarkStyle), disabled: disabled, type: 'radio', ref: refs }, rest)));
59
- return !label ? (radio) : (react_1.default.createElement("label", { className: (0, classnames_1.default)('iui-radio-wrapper', (_b = { 'iui-disabled': disabled }, _b["iui-" + status] = !!status, _b), className), style: style },
59
+ return !label ? (radio) : (react_1.default.createElement("label", { className: (0, classnames_1.default)('iui-radio-wrapper', (_b = { 'iui-disabled': disabled }, _b["iui-".concat(status)] = !!status, _b), className), style: style },
60
60
  radio,
61
61
  label && react_1.default.createElement("span", { className: 'iui-radio-label' }, label)));
62
62
  });
@@ -133,7 +133,7 @@ var Select = function (props) {
133
133
  return options.map(function (option, index) {
134
134
  var isSelected = value === option.value;
135
135
  var menuItem = itemRenderer ? (itemRenderer(option, { close: close, isSelected: isSelected })) : (react_1.default.createElement(MenuItem_1.MenuItem, null, option.label));
136
- return react_1.default.cloneElement(menuItem, __assign(__assign({ key: option.label + "-" + index, isSelected: isSelected, onClick: function () {
136
+ return react_1.default.cloneElement(menuItem, __assign(__assign({ key: "".concat(option.label, "-").concat(index), isSelected: isSelected, onClick: function () {
137
137
  !option.disabled && (onChange === null || onChange === void 0 ? void 0 : onChange(option.value));
138
138
  close();
139
139
  }, ref: function (el) { return isSelected && (el === null || el === void 0 ? void 0 : el.scrollIntoView()); }, role: 'option' }, option), menuItem.props));
@@ -146,7 +146,7 @@ var Select = function (props) {
146
146
  return options.find(function (option) { return option.value === value; });
147
147
  }, [options, value]);
148
148
  return (react_1.default.createElement("div", __assign({ className: (0, classnames_1.default)('iui-input-with-icon', className), "aria-expanded": isOpen, "aria-haspopup": 'listbox', style: style }, rest),
149
- react_1.default.createElement(DropdownMenu_1.DropdownMenu, __assign({ menuItems: menuItems, placement: 'bottom-start', className: (0, classnames_1.default)('iui-scroll', menuClassName), style: __assign({ minWidth: minWidth, maxWidth: "min(" + minWidth * 2 + "px, 90vw)", maxHeight: "300px" }, menuStyle), role: 'listbox', onShow: onShowHandler, onHide: onHideHandler, disabled: disabled }, popoverProps, { visible: isOpen, onClickOutside: function (_, _a) {
149
+ react_1.default.createElement(DropdownMenu_1.DropdownMenu, __assign({ menuItems: menuItems, placement: 'bottom-start', className: (0, classnames_1.default)('iui-scroll', menuClassName), style: __assign({ minWidth: minWidth, maxWidth: "min(".concat(minWidth * 2, "px, 90vw)"), maxHeight: "300px" }, menuStyle), role: 'listbox', onShow: onShowHandler, onHide: onHideHandler, disabled: disabled }, popoverProps, { visible: isOpen, onClickOutside: function (_, _a) {
150
150
  var _b;
151
151
  var target = _a.target;
152
152
  if (!((_b = toggleButtonRef.current) === null || _b === void 0 ? void 0 : _b.contains(target))) {
@@ -157,7 +157,7 @@ var Select = function (props) {
157
157
  'iui-placeholder': !selectedItem && !!placeholder,
158
158
  'iui-disabled': disabled
159
159
  },
160
- _a["iui-" + size] = !!size,
160
+ _a["iui-".concat(size)] = !!size,
161
161
  _a)), onClick: function () { return !disabled && toggle(); }, onKeyDown: function (e) { return !disabled && onKeyDown(e, toggle); }, tabIndex: !disabled ? 0 : undefined },
162
162
  !selectedItem && react_1.default.createElement("span", { className: 'iui-content' }, placeholder),
163
163
  selectedItem &&
@@ -80,7 +80,7 @@ var focusThumb = function (sliderContainer, activeIndex) {
80
80
  var doc = sliderContainer.ownerDocument;
81
81
  if (!sliderContainer.contains(doc.activeElement) ||
82
82
  Number((_a = doc.activeElement) === null || _a === void 0 ? void 0 : _a.getAttribute('data-index')) !== activeIndex) {
83
- var thumbToFocus = sliderContainer.querySelector("[data-index=\"" + activeIndex + "\"]");
83
+ var thumbToFocus = sliderContainer.querySelector("[data-index=\"".concat(activeIndex, "\"]"));
84
84
  thumbToFocus && thumbToFocus.focus();
85
85
  }
86
86
  };
@@ -73,6 +73,6 @@ var Thumb = function (props) {
73
73
  var leftPercent = (100.0 * (value - sliderMin)) / (sliderMax - sliderMin);
74
74
  var _c = thumbProps || {}, style = _c.style, className = _c.className, rest = __rest(_c, ["style", "className"]);
75
75
  return (react_1.default.createElement(Tooltip_1.Tooltip, __assign({ visible: isActive || hasFocus || isHovered, placement: 'top' }, tooltipProps),
76
- react_1.default.createElement("div", __assign({}, rest, { "data-index": index, ref: thumbRef, style: __assign(__assign({}, style), { left: leftPercent + "%" }), className: (0, classnames_1.default)('iui-slider-thumb', { 'iui-active': isActive }, className), role: 'slider', tabIndex: disabled ? undefined : 0, "aria-valuemin": minVal, "aria-valuenow": value, "aria-valuemax": maxVal, "aria-disabled": disabled, onPointerDown: handlePointerDownOnThumb, onKeyDown: handleOnKeyDown, onFocus: function () { return setHasFocus(true); }, onBlur: function () { return setHasFocus(false); }, onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); } }))));
76
+ react_1.default.createElement("div", __assign({}, rest, { "data-index": index, ref: thumbRef, style: __assign(__assign({}, style), { left: "".concat(leftPercent, "%") }), className: (0, classnames_1.default)('iui-slider-thumb', { 'iui-active': isActive }, className), role: 'slider', tabIndex: disabled ? undefined : 0, "aria-valuemin": minVal, "aria-valuenow": value, "aria-valuemax": maxVal, "aria-disabled": disabled, onPointerDown: handlePointerDownOnThumb, onKeyDown: handleOnKeyDown, onFocus: function () { return setHasFocus(true); }, onBlur: function () { return setHasFocus(false); }, onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); } }))));
77
77
  };
78
78
  exports.Thumb = Thumb;
@@ -55,7 +55,7 @@ var Track = function (props) {
55
55
  var leftPercent = (100.0 * (segment.left - sliderMin)) / (sliderMax - sliderMin);
56
56
  var rightPercent = (100.0 * (segment.right - sliderMin)) / (sliderMax - sliderMin);
57
57
  rightPercent = 100.0 - rightPercent;
58
- return (react_1.default.createElement(react_1.default.Fragment, { key: index }, shouldDisplaySegment(index, trackDisplayMode) ? (react_1.default.createElement("div", { className: 'iui-slider-track', style: { left: leftPercent + "%", right: rightPercent + "%" } })) : null));
58
+ return (react_1.default.createElement(react_1.default.Fragment, { key: index }, shouldDisplaySegment(index, trackDisplayMode) ? (react_1.default.createElement("div", { className: 'iui-slider-track', style: { left: "".concat(leftPercent, "%"), right: "".concat(rightPercent, "%") } })) : null));
59
59
  })));
60
60
  };
61
61
  exports.Track = Track;
@@ -63,7 +63,7 @@ exports.Surface = react_1.default.forwardRef(function (props, ref) {
63
63
  var _a, _b, _c;
64
64
  var _d = props.elevation, elevation = _d === void 0 ? 0 : _d, className = props.className, style = props.style, children = props.children, rest = __rest(props, ["elevation", "className", "style", "children"]);
65
65
  (0, utils_1.useTheme)();
66
- var _style = ((_c = (_b = (_a = (0, utils_1.getWindow)()) === null || _a === void 0 ? void 0 : _a.CSS) === null || _b === void 0 ? void 0 : _b.supports) === null || _c === void 0 ? void 0 : _c.call(_b, "--iui-surface-elevation: " + getSurfaceElevationValue(elevation)))
66
+ var _style = ((_c = (_b = (_a = (0, utils_1.getWindow)()) === null || _a === void 0 ? void 0 : _a.CSS) === null || _b === void 0 ? void 0 : _b.supports) === null || _c === void 0 ? void 0 : _c.call(_b, "--iui-surface-elevation: ".concat(getSurfaceElevationValue(elevation))))
67
67
  ? __assign({ '--iui-surface-elevation': getSurfaceElevationValue(elevation) }, style) : __assign({ boxShadow: getSurfaceElevationValue(elevation) }, style);
68
68
  return (react_1.default.createElement("div", __assign({ className: (0, classnames_1.default)('iui-surface', className), style: _style, ref: ref }, rest), children));
69
69
  });
@@ -282,7 +282,7 @@ var Table = function (props) {
282
282
  resizeRef(element);
283
283
  }
284
284
  }, id: id }, getTableProps({
285
- className: (0, classnames_1.default)('iui-table', (_a = {}, _a["iui-" + density] = density !== 'default', _a), className),
285
+ className: (0, classnames_1.default)('iui-table', (_a = {}, _a["iui-".concat(density)] = density !== 'default', _a), className),
286
286
  style: style,
287
287
  }), ariaDataAttributes),
288
288
  react_1.default.createElement("div", { className: 'iui-table-header', ref: headerRef }, headerGroups.slice(1).map(function (headerGroup) {
@@ -40,15 +40,15 @@ var ProgressIndicators_1 = require("../ProgressIndicators");
40
40
  var Menu_1 = require("../Menu");
41
41
  var utils_1 = require("../utils");
42
42
  var defaultLocalization = {
43
- pageSizeLabel: function (size) { return size + " per page"; },
43
+ pageSizeLabel: function (size) { return "".concat(size, " per page"); },
44
44
  rangeLabel: function (startIndex, endIndex, totalRows, isLoading) {
45
45
  return isLoading
46
- ? startIndex + "-" + endIndex + "\u2026"
47
- : startIndex + "-" + endIndex + " of " + totalRows;
46
+ ? "".concat(startIndex, "-").concat(endIndex, "\u2026")
47
+ : "".concat(startIndex, "-").concat(endIndex, " of ").concat(totalRows);
48
48
  },
49
49
  previousPage: 'Previous page',
50
50
  nextPage: 'Next page',
51
- goToPageLabel: function (page) { return "Go to page " + page; },
51
+ goToPageLabel: function (page) { return "Go to page ".concat(page); },
52
52
  rowsPerPageLabel: 'Rows per page',
53
53
  };
54
54
  /**
@@ -72,12 +72,12 @@ var TablePaginator = function (props) {
72
72
  var needFocus = react_1.default.useRef(false);
73
73
  var isMounted = react_1.default.useRef(false);
74
74
  react_1.default.useEffect(function () {
75
- var _a, _b, _c;
75
+ var _a, _b;
76
76
  // Checking `isMounted.current` prevents from focusing on initial load.
77
77
  // Checking `needFocus.current` prevents from focusing page when clicked on previous/next page.
78
78
  if (isMounted.current && needFocus.current) {
79
79
  var buttonToFocus = Array.from((_b = (_a = pageListRef.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll('.iui-paginator-page-button')) !== null && _b !== void 0 ? _b : []).find(function (el) { var _a; return ((_a = el.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === (focusedIndex + 1).toString(); });
80
- (_c = buttonToFocus) === null || _c === void 0 ? void 0 : _c.focus();
80
+ buttonToFocus === null || buttonToFocus === void 0 ? void 0 : buttonToFocus.focus();
81
81
  needFocus.current = false;
82
82
  }
83
83
  isMounted.current = true;
@@ -37,7 +37,7 @@ var TableRow = function (props) {
37
37
  isLast && ((_b = onBottomReached.current) === null || _b === void 0 ? void 0 : _b.call(onBottomReached));
38
38
  }, [isLast, onBottomReached, onRowInViewport, row.original]);
39
39
  var rowRef = (0, utils_1.useIntersection)(onIntersect, {
40
- rootMargin: intersectionMargin + "px",
40
+ rootMargin: "".concat(intersectionMargin, "px"),
41
41
  });
42
42
  var userRowProps = rowProps === null || rowProps === void 0 ? void 0 : rowProps(row);
43
43
  var mergedProps = __assign(__assign(__assign({}, row.getRowProps({ style: { flex: "0 0 auto", minWidth: '100%' } })), userRowProps), {
@@ -78,8 +78,8 @@ var ActionColumn = function (_a) {
78
78
  // Triggers an update to resize the widths of all visible columns
79
79
  dispatch({ type: Table_1.tableResizeStartAction });
80
80
  };
81
- return (react_1.default.createElement(Menu_1.MenuItem, { key: column.id, icon: react_1.default.createElement(Checkbox_1.Checkbox, { checked: checked, disabled: column.disableToggleVisibility, onClick: function (e) { return e.stopPropagation(); }, onChange: onClick, "aria-labelledby": "iui-column-" + column.id }), onClick: onClick, disabled: column.disableToggleVisibility },
82
- react_1.default.createElement("div", { id: "iui-column-" + column.id }, column.render('Header'))));
81
+ return (react_1.default.createElement(Menu_1.MenuItem, { key: column.id, icon: react_1.default.createElement(Checkbox_1.Checkbox, { checked: checked, disabled: column.disableToggleVisibility, onClick: function (e) { return e.stopPropagation(); }, onChange: onClick, "aria-labelledby": "iui-column-".concat(column.id) }), onClick: onClick, disabled: column.disableToggleVisibility },
82
+ react_1.default.createElement("div", { id: "iui-column-".concat(column.id) }, column.render('Header'))));
83
83
  });
84
84
  };
85
85
  return (react_1.default.createElement(DropdownMenu_1.DropdownMenu, { menuItems: headerCheckBoxes, onHide: function () { return setIsOpen(false); }, onShow: function () { return setIsOpen(true); } },
@@ -5,21 +5,21 @@ var getCellStyle = function (column, isTableResizing) {
5
5
  var style = {};
6
6
  style.flex = "1 1 145px";
7
7
  if (column.width) {
8
- var width = typeof column.width === 'string' ? column.width : column.width + "px";
8
+ var width = typeof column.width === 'string' ? column.width : "".concat(column.width, "px");
9
9
  style.width = width;
10
10
  // This allows flexbox to handle the width of the column on table resize
11
11
  if (isTableResizing && column.canResize) {
12
- style.flex = Number(column.width) + " " + Number(column.width) + " " + width;
12
+ style.flex = "".concat(Number(column.width), " ").concat(Number(column.width), " ").concat(width);
13
13
  }
14
14
  else {
15
- style.flex = "0 0 " + width;
15
+ style.flex = "0 0 ".concat(width);
16
16
  }
17
17
  }
18
18
  if (column.maxWidth) {
19
- style.maxWidth = column.maxWidth + "px";
19
+ style.maxWidth = "".concat(column.maxWidth, "px");
20
20
  }
21
21
  if (column.minWidth) {
22
- style.minWidth = column.minWidth + "px";
22
+ style.minWidth = "".concat(column.minWidth, "px");
23
23
  }
24
24
  return style;
25
25
  };
@@ -5,7 +5,7 @@ export declare type TabsProps = {
5
5
  * Elements shown for each tab.
6
6
  * Recommended to pass an array of `Tab` components.
7
7
  */
8
- labels: React.ReactNodeArray;
8
+ labels: React.ReactNode[];
9
9
  /**
10
10
  * Handler for activating a tab.
11
11
  */