@itwin/itwinui-react 1.36.0 → 1.37.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/CHANGELOG.md +27 -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/Header/HeaderButton.js +1 -0
  21. package/cjs/core/InformationPanel/InformationPanel.js +2 -2
  22. package/cjs/core/Input/Input.js +1 -1
  23. package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.d.ts +1 -1
  24. package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +2 -2
  25. package/cjs/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +2 -2
  26. package/cjs/core/Radio/Radio.js +1 -1
  27. package/cjs/core/Select/Select.js +3 -3
  28. package/cjs/core/SkipToContentLink/SkipToContentLink.d.ts +33 -0
  29. package/cjs/core/SkipToContentLink/SkipToContentLink.js +50 -0
  30. package/cjs/core/SkipToContentLink/index.d.ts +4 -0
  31. package/cjs/core/SkipToContentLink/index.js +10 -0
  32. package/cjs/core/Slider/Slider.js +1 -1
  33. package/cjs/core/Slider/Thumb.js +1 -1
  34. package/cjs/core/Slider/Track.js +1 -1
  35. package/cjs/core/Surface/Surface.d.ts +32 -0
  36. package/cjs/core/Surface/Surface.js +70 -0
  37. package/cjs/core/Surface/index.d.ts +4 -0
  38. package/cjs/core/Surface/index.js +10 -0
  39. package/cjs/core/Table/Table.d.ts +6 -0
  40. package/cjs/core/Table/Table.js +34 -12
  41. package/cjs/core/Table/TablePaginator.js +6 -6
  42. package/cjs/core/Table/TableRowMemoized.js +1 -1
  43. package/cjs/core/Table/cells/EditableCell.js +2 -1
  44. package/cjs/core/Table/columns/actionColumn.js +2 -2
  45. package/cjs/core/Table/hooks/useSelectionCell.d.ts +1 -1
  46. package/cjs/core/Table/hooks/useSelectionCell.js +3 -2
  47. package/cjs/core/Table/utils.js +5 -5
  48. package/cjs/core/Tabs/Tabs.d.ts +1 -1
  49. package/cjs/core/Tabs/Tabs.js +7 -8
  50. package/cjs/core/Tag/Tag.js +6 -3
  51. package/cjs/core/Tag/TagContainer.js +1 -1
  52. package/cjs/core/Tile/Tile.d.ts +6 -2
  53. package/cjs/core/Tile/Tile.js +8 -3
  54. package/cjs/core/Toast/Toast.js +2 -2
  55. package/cjs/core/Toast/ToastWrapper.js +1 -1
  56. package/cjs/core/Tree/TreeNode.js +2 -2
  57. package/cjs/core/Typography/Text/Text.js +1 -1
  58. package/cjs/core/UserIcon/UserIcon.js +2 -2
  59. package/cjs/core/UserIconGroup/UserIconGroup.js +3 -3
  60. package/cjs/core/Wizard/Step.js +1 -1
  61. package/cjs/core/Wizard/Wizard.js +1 -1
  62. package/cjs/core/index.d.ts +4 -0
  63. package/cjs/core/index.js +6 -2
  64. package/cjs/core/utils/color/ColorValue.js +11 -11
  65. package/cjs/core/utils/color/index.js +5 -1
  66. package/cjs/core/utils/components/FocusTrap.js +6 -8
  67. package/cjs/core/utils/components/InputContainer.js +1 -1
  68. package/cjs/core/utils/components/MiddleTextTruncation.js +1 -1
  69. package/cjs/core/utils/components/VirtualScroll.js +1 -1
  70. package/cjs/core/utils/components/WithCSSTransition.js +5 -5
  71. package/cjs/core/utils/components/index.js +5 -1
  72. package/cjs/core/utils/functions/focusable.js +1 -1
  73. package/cjs/core/utils/functions/index.js +5 -1
  74. package/cjs/core/utils/hooks/index.js +5 -1
  75. package/cjs/core/utils/hooks/useOverflow.js +3 -3
  76. package/cjs/core/utils/hooks/useTheme.js +1 -1
  77. package/cjs/core/utils/index.js +5 -1
  78. package/cjs/index.js +5 -1
  79. package/esm/core/Alert/Alert.js +1 -1
  80. package/esm/core/Badge/Badge.js +1 -1
  81. package/esm/core/Breadcrumbs/Breadcrumbs.d.ts +2 -2
  82. package/esm/core/Buttons/Button/Button.js +2 -2
  83. package/esm/core/Buttons/IconButton/IconButton.js +2 -2
  84. package/esm/core/Carousel/Carousel.js +1 -1
  85. package/esm/core/Carousel/CarouselDotsList.js +1 -1
  86. package/esm/core/Carousel/CarouselSlider.js +1 -1
  87. package/esm/core/Checkbox/Checkbox.js +1 -1
  88. package/esm/core/ColorPicker/ColorBuilder.js +3 -3
  89. package/esm/core/ColorPicker/ColorInputPanel.js +1 -1
  90. package/esm/core/ColorPicker/ColorSwatch.d.ts +1 -1
  91. package/esm/core/ColorPicker/ColorSwatch.js +1 -1
  92. package/esm/core/ComboBox/ComboBox.js +9 -6
  93. package/esm/core/DatePicker/DatePicker.js +2 -2
  94. package/esm/core/ExpandableBlock/ExpandableBlock.js +1 -1
  95. package/esm/core/Footer/Footer.js +2 -2
  96. package/esm/core/Header/HeaderBreadcrumbs.js +1 -1
  97. package/esm/core/Header/HeaderButton.js +1 -0
  98. package/esm/core/InformationPanel/InformationPanel.js +2 -2
  99. package/esm/core/Input/Input.js +1 -1
  100. package/esm/core/ProgressIndicators/ProgressLinear/ProgressLinear.d.ts +1 -1
  101. package/esm/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +2 -2
  102. package/esm/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +2 -2
  103. package/esm/core/Radio/Radio.js +1 -1
  104. package/esm/core/Select/Select.js +3 -3
  105. package/esm/core/SkipToContentLink/SkipToContentLink.d.ts +33 -0
  106. package/esm/core/SkipToContentLink/SkipToContentLink.js +44 -0
  107. package/esm/core/SkipToContentLink/index.d.ts +4 -0
  108. package/esm/core/SkipToContentLink/index.js +6 -0
  109. package/esm/core/Slider/Slider.js +1 -1
  110. package/esm/core/Slider/Thumb.js +1 -1
  111. package/esm/core/Slider/Track.js +1 -1
  112. package/esm/core/Surface/Surface.d.ts +32 -0
  113. package/esm/core/Surface/Surface.js +64 -0
  114. package/esm/core/Surface/index.d.ts +4 -0
  115. package/esm/core/Surface/index.js +6 -0
  116. package/esm/core/Table/Table.d.ts +6 -0
  117. package/esm/core/Table/Table.js +34 -12
  118. package/esm/core/Table/TablePaginator.js +6 -6
  119. package/esm/core/Table/TableRowMemoized.js +1 -1
  120. package/esm/core/Table/cells/EditableCell.js +2 -1
  121. package/esm/core/Table/columns/actionColumn.js +2 -2
  122. package/esm/core/Table/hooks/useSelectionCell.d.ts +1 -1
  123. package/esm/core/Table/hooks/useSelectionCell.js +3 -2
  124. package/esm/core/Table/utils.js +5 -5
  125. package/esm/core/Tabs/Tabs.d.ts +1 -1
  126. package/esm/core/Tabs/Tabs.js +7 -8
  127. package/esm/core/Tag/Tag.js +6 -3
  128. package/esm/core/Tag/TagContainer.js +1 -1
  129. package/esm/core/Tile/Tile.d.ts +6 -2
  130. package/esm/core/Tile/Tile.js +8 -3
  131. package/esm/core/Toast/Toast.js +2 -2
  132. package/esm/core/Toast/ToastWrapper.js +1 -1
  133. package/esm/core/Tree/TreeNode.js +2 -2
  134. package/esm/core/Typography/Text/Text.js +1 -1
  135. package/esm/core/UserIcon/UserIcon.js +2 -2
  136. package/esm/core/UserIconGroup/UserIconGroup.js +3 -3
  137. package/esm/core/Wizard/Step.js +1 -1
  138. package/esm/core/Wizard/Wizard.js +1 -1
  139. package/esm/core/index.d.ts +4 -0
  140. package/esm/core/index.js +2 -0
  141. package/esm/core/utils/color/ColorValue.js +11 -11
  142. package/esm/core/utils/components/FocusTrap.js +6 -8
  143. package/esm/core/utils/components/InputContainer.js +1 -1
  144. package/esm/core/utils/components/MiddleTextTruncation.js +1 -1
  145. package/esm/core/utils/components/VirtualScroll.js +1 -1
  146. package/esm/core/utils/components/WithCSSTransition.js +5 -5
  147. package/esm/core/utils/functions/focusable.js +1 -1
  148. package/esm/core/utils/hooks/useOverflow.js +3 -3
  149. package/esm/core/utils/hooks/useTheme.js +1 -1
  150. package/package.json +22 -21
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # Changelog
2
2
 
3
+ ### [1.37.2](https://www.github.com/iTwin/iTwinUI-react/compare/v1.37.1...v1.37.2) (2022-05-04)
4
+
5
+ ### Fixes
6
+
7
+ * **Table:** Fix direction of sort icons ([#645](https://www.github.com/iTwin/iTwinUI-react/issues/645)) ([1a0683b](https://www.github.com/iTwin/iTwinUI-react/commit/1a0683b2d8f18b8ec80412e2208fbfa12df88d51))
8
+ * **Table:** Fix error of headless table ([#648](https://www.github.com/iTwin/iTwinUI-react/issues/648)) ([87c6b9e](https://www.github.com/iTwin/iTwinUI-react/commit/87c6b9eb0b8338357aec107af3f7a7539dd0f5a3))
9
+
10
+ ### [1.37.1](https://www.github.com/iTwin/iTwinUI-react/compare/v1.37.0...v1.37.1) (2022-04-22)
11
+
12
+ ### Fixes
13
+
14
+ * **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))
15
+
16
+ ## [1.37.0](https://www.github.com/iTwin/iTwinUI-react/compare/v1.36.0...v1.37.0) (2022-04-21)
17
+
18
+ ### What's new
19
+
20
+ * **SkipToContent:** Add `SkipToContent` Component ([#618](https://www.github.com/iTwin/iTwinUI-react/issues/618)) ([5d56809](https://www.github.com/iTwin/iTwinUI-react/commit/5d56809c46ad312402669f9cb2dbf6c8d3c733ad))
21
+ * **Surface:** Add `Surface` component ([#624](https://www.github.com/iTwin/iTwinUI-react/issues/624)) ([aa8f992](https://www.github.com/iTwin/iTwinUI-react/commit/aa8f99228cd4069bcba237c4a599d4735beccd0e))
22
+ * **Table:** Single selection of rows ([#628](https://www.github.com/iTwin/iTwinUI-react/issues/628)) ([b8e0bf6](https://www.github.com/iTwin/iTwinUI-react/commit/b8e0bf63cbb07d8bd21fc165a505af1388e57a98))
23
+ * **Tile:** Add `isActionable` prop to use for interactive tile ([#631](https://www.github.com/iTwin/iTwinUI-react/issues/631)) ([abfb807](https://www.github.com/iTwin/iTwinUI-react/commit/abfb8073c129c06488be276e4d301b89bf4588d5))
24
+
25
+ ### Fixes
26
+
27
+ * **Table:** Add support for `preventDefault` in row click events ([#629](https://www.github.com/iTwin/iTwinUI-react/issues/629)) ([997897d](https://www.github.com/iTwin/iTwinUI-react/commit/997897d438ff00ed9d63da1745c81f37957c14ba))
28
+ * **Header:** Fix `HeaderButton` spacing through css package update ([4094a3b](https://www.github.com/iTwin/iTwinUI-react/commit/4094a3bc94c8e589b4dbc6a2fd68f4f00389d941))
29
+
3
30
  ## [1.36.0](https://www.github.com/iTwin/iTwinUI-react/compare/v1.35.0...v1.36.0) (2022-04-15)
4
31
 
5
32
  ### 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;
@@ -61,6 +61,7 @@ exports.HeaderButton = react_1.default.forwardRef(function (props, ref) {
61
61
  : undefined, styleType: 'borderless', className: (0, classnames_1.default)({
62
62
  'iui-header-button': !isSplitButton(props),
63
63
  'iui-header-split-button': isSplitButton(props),
64
+ 'iui-header-dropdown-button': !isSplitButton(props) && isDropdownButton(props),
64
65
  'iui-active': isActive,
65
66
  }, className), 'aria-current': isActive ? 'location' : undefined, children: (react_1.default.createElement(react_1.default.Fragment, null,
66
67
  react_1.default.createElement("div", null, name),
@@ -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 &&
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import '@itwin/itwinui-css/css/skip-to-content.css';
3
+ export declare type SkipToContentLinkProps = {
4
+ /**
5
+ * The id of the main content that the link directs to. Don't forget the #!
6
+ */
7
+ href: string;
8
+ /**
9
+ * Localize 'Skip to main content' label.
10
+ * @default 'Skip to main content'
11
+ */
12
+ children?: React.ReactNode;
13
+ } & Omit<React.ComponentPropsWithoutRef<'a'>, 'href'>;
14
+ /**
15
+ * `SkipToContentLink` is for screen reader and keyboard users and will not be visible unless tabbed to.
16
+ * Provides a shortcut to the main content of the page without navigating through the header, etc.
17
+ * Should be placed just inside the body. Set `href` to the id of your main content component. Don't forget the `#`!
18
+ * @example
19
+ * <body><SkipToContentLink href='#main-content-id' /> ... </body>
20
+ * <body><SkipToContentLink href='#main-content-id'>{localizedLabel}</SkipToContentLink> ... </body>
21
+ */
22
+ export declare const SkipToContentLink: React.ForwardRefExoticComponent<{
23
+ /**
24
+ * The id of the main content that the link directs to. Don't forget the #!
25
+ */
26
+ href: string;
27
+ /**
28
+ * Localize 'Skip to main content' label.
29
+ * @default 'Skip to main content'
30
+ */
31
+ children?: React.ReactNode;
32
+ } & Omit<Pick<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "key" | keyof React.AnchorHTMLAttributes<HTMLAnchorElement>>, "href"> & React.RefAttributes<HTMLAnchorElement>>;
33
+ export default SkipToContentLink;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __rest = (this && this.__rest) || function (s, e) {
14
+ var t = {};
15
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
+ t[p] = s[p];
17
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
+ t[p[i]] = s[p[i]];
21
+ }
22
+ return t;
23
+ };
24
+ var __importDefault = (this && this.__importDefault) || function (mod) {
25
+ return (mod && mod.__esModule) ? mod : { "default": mod };
26
+ };
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ exports.SkipToContentLink = void 0;
29
+ /*---------------------------------------------------------------------------------------------
30
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
31
+ * See LICENSE.md in the project root for license terms and full copyright notice.
32
+ *--------------------------------------------------------------------------------------------*/
33
+ var react_1 = __importDefault(require("react"));
34
+ var classnames_1 = __importDefault(require("classnames"));
35
+ var utils_1 = require("../utils");
36
+ require("@itwin/itwinui-css/css/skip-to-content.css");
37
+ /**
38
+ * `SkipToContentLink` is for screen reader and keyboard users and will not be visible unless tabbed to.
39
+ * Provides a shortcut to the main content of the page without navigating through the header, etc.
40
+ * Should be placed just inside the body. Set `href` to the id of your main content component. Don't forget the `#`!
41
+ * @example
42
+ * <body><SkipToContentLink href='#main-content-id' /> ... </body>
43
+ * <body><SkipToContentLink href='#main-content-id'>{localizedLabel}</SkipToContentLink> ... </body>
44
+ */
45
+ exports.SkipToContentLink = react_1.default.forwardRef(function (props, ref) {
46
+ var _a = props.children, children = _a === void 0 ? 'Skip to main content' : _a, className = props.className, rest = __rest(props, ["children", "className"]);
47
+ (0, utils_1.useTheme)();
48
+ return (react_1.default.createElement("a", __assign({ ref: ref, className: (0, classnames_1.default)('iui-skip-to-content-link', className) }, rest), children));
49
+ });
50
+ exports.default = exports.SkipToContentLink;
@@ -0,0 +1,4 @@
1
+ export { SkipToContentLink } from './SkipToContentLink';
2
+ export type { SkipToContentLinkProps } from './SkipToContentLink';
3
+ declare const _default: "./SkipToContentLink";
4
+ export default _default;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SkipToContentLink = void 0;
4
+ /*---------------------------------------------------------------------------------------------
5
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
6
+ * See LICENSE.md in the project root for license terms and full copyright notice.
7
+ *--------------------------------------------------------------------------------------------*/
8
+ var SkipToContentLink_1 = require("./SkipToContentLink");
9
+ Object.defineProperty(exports, "SkipToContentLink", { enumerable: true, get: function () { return SkipToContentLink_1.SkipToContentLink; } });
10
+ exports.default = './SkipToContentLink';
@@ -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;