@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.
- package/CHANGELOG.md +6 -0
- package/cjs/core/Alert/Alert.js +1 -1
- package/cjs/core/Badge/Badge.js +1 -1
- package/cjs/core/Breadcrumbs/Breadcrumbs.d.ts +2 -2
- package/cjs/core/Buttons/Button/Button.js +2 -2
- package/cjs/core/Buttons/IconButton/IconButton.js +2 -2
- package/cjs/core/Carousel/Carousel.js +1 -1
- package/cjs/core/Carousel/CarouselDotsList.js +1 -1
- package/cjs/core/Carousel/CarouselSlider.js +1 -1
- package/cjs/core/Checkbox/Checkbox.js +1 -1
- package/cjs/core/ColorPicker/ColorBuilder.js +3 -3
- package/cjs/core/ColorPicker/ColorInputPanel.js +1 -1
- package/cjs/core/ColorPicker/ColorSwatch.d.ts +1 -1
- package/cjs/core/ColorPicker/ColorSwatch.js +1 -1
- package/cjs/core/ComboBox/ComboBox.js +9 -6
- package/cjs/core/DatePicker/DatePicker.js +2 -2
- package/cjs/core/ExpandableBlock/ExpandableBlock.js +1 -1
- package/cjs/core/Footer/Footer.js +2 -2
- package/cjs/core/Header/HeaderBreadcrumbs.js +1 -1
- package/cjs/core/InformationPanel/InformationPanel.js +2 -2
- package/cjs/core/Input/Input.js +1 -1
- package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.d.ts +1 -1
- package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +2 -2
- package/cjs/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +2 -2
- package/cjs/core/Radio/Radio.js +1 -1
- package/cjs/core/Select/Select.js +3 -3
- package/cjs/core/Slider/Slider.js +1 -1
- package/cjs/core/Slider/Thumb.js +1 -1
- package/cjs/core/Slider/Track.js +1 -1
- package/cjs/core/Surface/Surface.js +1 -1
- package/cjs/core/Table/Table.js +1 -1
- package/cjs/core/Table/TablePaginator.js +6 -6
- package/cjs/core/Table/TableRowMemoized.js +1 -1
- package/cjs/core/Table/columns/actionColumn.js +2 -2
- package/cjs/core/Table/utils.js +5 -5
- package/cjs/core/Tabs/Tabs.d.ts +1 -1
- package/cjs/core/Tabs/Tabs.js +7 -8
- package/cjs/core/Tag/TagContainer.js +1 -1
- package/cjs/core/Tile/Tile.js +1 -1
- package/cjs/core/Toast/Toast.js +2 -2
- package/cjs/core/Toast/ToastWrapper.js +1 -1
- package/cjs/core/Tree/TreeNode.js +2 -2
- package/cjs/core/Typography/Text/Text.js +1 -1
- package/cjs/core/UserIcon/UserIcon.js +2 -2
- package/cjs/core/UserIconGroup/UserIconGroup.js +3 -3
- package/cjs/core/Wizard/Step.js +1 -1
- package/cjs/core/Wizard/Wizard.js +1 -1
- package/cjs/core/utils/color/ColorValue.js +11 -11
- package/cjs/core/utils/color/index.js +5 -1
- package/cjs/core/utils/components/FocusTrap.js +6 -8
- package/cjs/core/utils/components/InputContainer.js +1 -1
- package/cjs/core/utils/components/MiddleTextTruncation.js +1 -1
- package/cjs/core/utils/components/VirtualScroll.js +1 -1
- package/cjs/core/utils/components/WithCSSTransition.js +5 -5
- package/cjs/core/utils/components/index.js +5 -1
- package/cjs/core/utils/functions/focusable.js +1 -1
- package/cjs/core/utils/functions/index.js +5 -1
- package/cjs/core/utils/hooks/index.js +5 -1
- package/cjs/core/utils/hooks/useOverflow.js +3 -3
- package/cjs/core/utils/hooks/useTheme.js +1 -1
- package/cjs/core/utils/index.js +5 -1
- package/cjs/index.js +5 -1
- package/esm/core/Alert/Alert.js +1 -1
- package/esm/core/Badge/Badge.js +1 -1
- package/esm/core/Breadcrumbs/Breadcrumbs.d.ts +2 -2
- package/esm/core/Buttons/Button/Button.js +2 -2
- package/esm/core/Buttons/IconButton/IconButton.js +2 -2
- package/esm/core/Carousel/Carousel.js +1 -1
- package/esm/core/Carousel/CarouselDotsList.js +1 -1
- package/esm/core/Carousel/CarouselSlider.js +1 -1
- package/esm/core/Checkbox/Checkbox.js +1 -1
- package/esm/core/ColorPicker/ColorBuilder.js +3 -3
- package/esm/core/ColorPicker/ColorInputPanel.js +1 -1
- package/esm/core/ColorPicker/ColorSwatch.d.ts +1 -1
- package/esm/core/ColorPicker/ColorSwatch.js +1 -1
- package/esm/core/ComboBox/ComboBox.js +9 -6
- package/esm/core/DatePicker/DatePicker.js +2 -2
- package/esm/core/ExpandableBlock/ExpandableBlock.js +1 -1
- package/esm/core/Footer/Footer.js +2 -2
- package/esm/core/Header/HeaderBreadcrumbs.js +1 -1
- package/esm/core/InformationPanel/InformationPanel.js +2 -2
- package/esm/core/Input/Input.js +1 -1
- package/esm/core/ProgressIndicators/ProgressLinear/ProgressLinear.d.ts +1 -1
- package/esm/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +2 -2
- package/esm/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +2 -2
- package/esm/core/Radio/Radio.js +1 -1
- package/esm/core/Select/Select.js +3 -3
- package/esm/core/Slider/Slider.js +1 -1
- package/esm/core/Slider/Thumb.js +1 -1
- package/esm/core/Slider/Track.js +1 -1
- package/esm/core/Surface/Surface.js +1 -1
- package/esm/core/Table/Table.js +1 -1
- package/esm/core/Table/TablePaginator.js +6 -6
- package/esm/core/Table/TableRowMemoized.js +1 -1
- package/esm/core/Table/columns/actionColumn.js +2 -2
- package/esm/core/Table/utils.js +5 -5
- package/esm/core/Tabs/Tabs.d.ts +1 -1
- package/esm/core/Tabs/Tabs.js +7 -8
- package/esm/core/Tag/TagContainer.js +1 -1
- package/esm/core/Tile/Tile.js +1 -1
- package/esm/core/Toast/Toast.js +2 -2
- package/esm/core/Toast/ToastWrapper.js +1 -1
- package/esm/core/Tree/TreeNode.js +2 -2
- package/esm/core/Typography/Text/Text.js +1 -1
- package/esm/core/UserIcon/UserIcon.js +2 -2
- package/esm/core/UserIconGroup/UserIconGroup.js +3 -3
- package/esm/core/Wizard/Step.js +1 -1
- package/esm/core/Wizard/Wizard.js +1 -1
- package/esm/core/utils/color/ColorValue.js +11 -11
- package/esm/core/utils/components/FocusTrap.js +6 -8
- package/esm/core/utils/components/InputContainer.js +1 -1
- package/esm/core/utils/components/MiddleTextTruncation.js +1 -1
- package/esm/core/utils/components/VirtualScroll.js +1 -1
- package/esm/core/utils/components/WithCSSTransition.js +5 -5
- package/esm/core/utils/functions/focusable.js +1 -1
- package/esm/core/utils/hooks/useOverflow.js +3 -3
- package/esm/core/utils/hooks/useTheme.js +1 -1
- package/package.json +20 -19
|
@@ -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" | "
|
|
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;
|
|
@@ -45,7 +45,7 @@ export var ColorSwatch = React.forwardRef(function (props, ref) {
|
|
|
45
45
|
}, [color]);
|
|
46
46
|
var _style = React.useMemo(function () {
|
|
47
47
|
var _a, _b, _c;
|
|
48
|
-
return ((_c = (_b = (_a = 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: "
|
|
48
|
+
return ((_c = (_b = (_a = 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)))
|
|
49
49
|
? __assign({ '--iui-color-swatch-background': colorString }, style) : __assign({ backgroundColor: colorString }, style);
|
|
50
50
|
}, [colorString, style]);
|
|
51
51
|
return (React.createElement("div", __assign({ className: cx('iui-color-swatch', { 'iui-active': isActive }, className), style: _style, onClick: onClick, tabIndex: isActive ? 0 : -1, "aria-selected": isActive, ref: ref }, rest)));
|
|
@@ -51,18 +51,21 @@ export var ComboBox = function (props) {
|
|
|
51
51
|
// Generate a stateful random id if not specified
|
|
52
52
|
var id = React.useState(function () {
|
|
53
53
|
var _a, _b;
|
|
54
|
-
return (_b = (_a = props.id) !== null && _a !== void 0 ? _a : ((inputProps === null || inputProps === void 0 ? void 0 : inputProps.id) && inputProps.id
|
|
54
|
+
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(getRandomValue(10));
|
|
55
55
|
})[0];
|
|
56
56
|
useTheme();
|
|
57
57
|
/** Generates a memoized id for an option, given the index from original list */
|
|
58
58
|
var getOptionId = React.useCallback(function (index) {
|
|
59
59
|
var _a;
|
|
60
|
-
return (_a = options[index].id) !== null && _a !== void 0 ? _a : id
|
|
60
|
+
return (_a = options[index].id) !== null && _a !== void 0 ? _a : "".concat(id, "-option").concat(options.findIndex(function (_a) {
|
|
61
61
|
var value = _a.value;
|
|
62
62
|
return value === options[index].value;
|
|
63
|
-
});
|
|
63
|
+
}));
|
|
64
64
|
}, [options, id]);
|
|
65
65
|
var userOnChange = React.useRef(onChange);
|
|
66
|
+
React.useEffect(function () {
|
|
67
|
+
userOnChange.current = onChange;
|
|
68
|
+
}, [onChange]);
|
|
66
69
|
var memoizedItems = React.useMemo(function () {
|
|
67
70
|
return options.map(function (option, index) {
|
|
68
71
|
var label = option.label, value = option.value, rest = __rest(option, ["label", "value"]);
|
|
@@ -278,9 +281,9 @@ export var ComboBox = function (props) {
|
|
|
278
281
|
if (!((_b = toggleButtonRef.current) === null || _b === void 0 ? void 0 : _b.contains(target))) {
|
|
279
282
|
setIsOpen(false);
|
|
280
283
|
}
|
|
281
|
-
}, animation: 'shift-away', duration: 200 }, dropdownMenuProps, { content: React.createElement(Menu, { id: id
|
|
284
|
+
}, animation: 'shift-away', duration: 200 }, dropdownMenuProps, { content: React.createElement(Menu, { id: "".concat(id, "-list"), className: 'iui-scroll', style: {
|
|
282
285
|
minWidth: minWidth,
|
|
283
|
-
maxWidth: "min("
|
|
286
|
+
maxWidth: "min(".concat(minWidth * 2, "px, 90vw)"),
|
|
284
287
|
maxHeight: 300,
|
|
285
288
|
}, setFocus: false, role: 'listbox', ref: menuRef }, menuItems), onHide: function (instance) {
|
|
286
289
|
var _a;
|
|
@@ -296,7 +299,7 @@ export var ComboBox = function (props) {
|
|
|
296
299
|
} }),
|
|
297
300
|
React.createElement(Input, __assign({ ref: inputRef, onKeyDown: onKeyDown, onFocus: function () { return setIsOpen(true); }, value: inputValue, "aria-activedescendant": isOpen && focusedIndex > -1
|
|
298
301
|
? getOptionId(focusedIndex)
|
|
299
|
-
: undefined, role: 'combobox', "aria-controls": isOpen ? id
|
|
302
|
+
: undefined, role: 'combobox', "aria-controls": isOpen ? "".concat(id, "-list") : undefined, "aria-autocomplete": 'list', spellCheck: false, autoCapitalize: 'none', autoCorrect: 'off' }, inputProps, { onChange: onInput }))),
|
|
300
303
|
React.createElement("span", { ref: toggleButtonRef, className: cx('iui-end-icon', {
|
|
301
304
|
'iui-actionable': !(inputProps === null || inputProps === void 0 ? void 0 : inputProps.disabled),
|
|
302
305
|
'iui-disabled': inputProps === null || inputProps === void 0 ? void 0 : inputProps.disabled,
|
|
@@ -288,9 +288,9 @@ export var DatePicker = function (props) {
|
|
|
288
288
|
React.createElement(SvgChevronRightDouble, null)))),
|
|
289
289
|
React.createElement("div", { className: 'iui-calendar-weekdays' }, shortDays.map(function (day, index) { return (React.createElement("div", { key: day, title: longDays[index] }, day)); })),
|
|
290
290
|
React.createElement("div", { onKeyDown: handleCalendarKeyDown, role: 'listbox' }, weeks.map(function (weekDays, weekIndex) {
|
|
291
|
-
return (React.createElement("div", { key: "week-"
|
|
291
|
+
return (React.createElement("div", { key: "week-".concat(displayedMonthIndex, "-").concat(weekIndex), className: 'iui-calendar-week' }, weekDays.map(function (weekDay, dayIndex) {
|
|
292
292
|
var dateValue = weekDay.getDate();
|
|
293
|
-
return (React.createElement("div", { key: "day-"
|
|
293
|
+
return (React.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) {
|
|
294
294
|
return isSameDay(weekDay, focusedDay) &&
|
|
295
295
|
needFocus.current &&
|
|
296
296
|
(element === null || element === void 0 ? void 0 : element.focus());
|
|
@@ -71,7 +71,7 @@ export var ExpandableBlock = function (props) {
|
|
|
71
71
|
caption && React.createElement("div", { className: 'iui-caption' }, caption)),
|
|
72
72
|
icon &&
|
|
73
73
|
React.cloneElement(icon, {
|
|
74
|
-
className: cx('iui-status-icon', (_a = {}, _a["iui-"
|
|
74
|
+
className: cx('iui-status-icon', (_a = {}, _a["iui-".concat(status)] = !!status, _a), icon.props.className),
|
|
75
75
|
})),
|
|
76
76
|
React.createElement(WithCSSTransition, { in: expanded },
|
|
77
77
|
React.createElement("div", { className: 'iui-expandable-content' },
|
|
@@ -64,7 +64,7 @@ export var Footer = function (props) {
|
|
|
64
64
|
var defaultElements = [
|
|
65
65
|
{
|
|
66
66
|
key: 'copyright',
|
|
67
|
-
title: "\u00A9 "
|
|
67
|
+
title: "\u00A9 ".concat(new Date().getFullYear(), " Bentley Systems, Incorporated"),
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
key: 'termsOfService',
|
|
@@ -101,7 +101,7 @@ export var Footer = function (props) {
|
|
|
101
101
|
}
|
|
102
102
|
return (React.createElement("footer", __assign({ className: cx('iui-legal-footer', className) }, rest),
|
|
103
103
|
React.createElement("ul", null, elements.map(function (element, index) {
|
|
104
|
-
return (React.createElement("li", { key: element.key || element.title
|
|
104
|
+
return (React.createElement("li", { key: element.key || "".concat(element.title, "-").concat(index) },
|
|
105
105
|
index > 0 && React.createElement("span", { className: 'iui-separator' }),
|
|
106
106
|
element.url ? (React.createElement("a", { href: element.url, target: '_blank', rel: 'noreferrer' }, element.title)) : (element.title)));
|
|
107
107
|
}))));
|
|
@@ -52,7 +52,7 @@ export var HeaderBreadcrumbs = function (props) {
|
|
|
52
52
|
useTheme();
|
|
53
53
|
return (React.createElement("nav", __assign({ "aria-label": 'breadcrumbs' }, rest), items.reduce(function (previous, current, index) { return __spreadArray(__spreadArray([], previous, true), [
|
|
54
54
|
current,
|
|
55
|
-
index !== items.length - 1 && (React.createElement(SvgChevronRight, { key: "chevron"
|
|
55
|
+
index !== items.length - 1 && (React.createElement(SvgChevronRight, { key: "chevron".concat(index), "aria-hidden": true, className: 'iui-chevron' })),
|
|
56
56
|
], false); }, [])));
|
|
57
57
|
};
|
|
58
58
|
export default HeaderBreadcrumbs;
|
|
@@ -76,10 +76,10 @@ export var InformationPanel = React.forwardRef(function (props, ref) {
|
|
|
76
76
|
}
|
|
77
77
|
var _a = infoPanelRef.current.getBoundingClientRect(), right = _a.right, bottom = _a.bottom;
|
|
78
78
|
if (orientation === 'vertical') {
|
|
79
|
-
infoPanelRef.current.style.width = right - e.clientX
|
|
79
|
+
infoPanelRef.current.style.width = "".concat(right - e.clientX, "px");
|
|
80
80
|
}
|
|
81
81
|
else {
|
|
82
|
-
infoPanelRef.current.style.height = bottom - e.clientY
|
|
82
|
+
infoPanelRef.current.style.height = "".concat(bottom - e.clientY, "px");
|
|
83
83
|
}
|
|
84
84
|
}, [orientation]);
|
|
85
85
|
return (React.createElement("div", __assign({ className: cx('iui-information-panel', {
|
package/esm/core/Input/Input.js
CHANGED
|
@@ -46,6 +46,6 @@ export var Input = React.forwardRef(function (props, ref) {
|
|
|
46
46
|
inputRef.current.focus();
|
|
47
47
|
}
|
|
48
48
|
}, [setFocus]);
|
|
49
|
-
return (React.createElement("input", __assign({ className: cx('iui-input', (_a = {}, _a["iui-"
|
|
49
|
+
return (React.createElement("input", __assign({ className: cx('iui-input', (_a = {}, _a["iui-".concat(size)] = !!size, _a), className), ref: refs }, rest)));
|
|
50
50
|
});
|
|
51
51
|
export default 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.
|
|
18
|
+
labels?: React.ReactNode[];
|
|
19
19
|
/**
|
|
20
20
|
* Apply animation to the value change, if determinate.
|
|
21
21
|
* @default false
|
|
@@ -49,13 +49,13 @@ export var ProgressLinear = function (props) {
|
|
|
49
49
|
useTheme();
|
|
50
50
|
var boundedValue = Math.min(100, Math.max(0, value));
|
|
51
51
|
return (React.createElement("div", __assign({ className: cx('iui-progress-indicator-linear', (_a = {},
|
|
52
|
-
_a["iui-"
|
|
52
|
+
_a["iui-".concat(status)] = !!status,
|
|
53
53
|
_a), className), style: style }, rest),
|
|
54
54
|
React.createElement("div", { className: 'iui-track' },
|
|
55
55
|
React.createElement("div", { className: cx('iui-fill', {
|
|
56
56
|
'iui-determinate': !indeterminate && isAnimated,
|
|
57
57
|
'iui-indeterminate': indeterminate,
|
|
58
|
-
}), style: { width: indeterminate ? '100%' : boundedValue
|
|
58
|
+
}), style: { width: indeterminate ? '100%' : "".concat(boundedValue, "%") } })),
|
|
59
59
|
labels.length > 0 && (React.createElement("div", { className: 'iui-label' }, labels.map(function (label, index) { return (React.createElement("span", { key: index }, label)); })))));
|
|
60
60
|
};
|
|
61
61
|
export default ProgressLinear;
|
|
@@ -63,8 +63,8 @@ export var ProgressRadial = function (props) {
|
|
|
63
63
|
'iui-determinate': !indeterminate,
|
|
64
64
|
'iui-indeterminate': indeterminate
|
|
65
65
|
},
|
|
66
|
-
_a["iui-"
|
|
67
|
-
_a["iui-"
|
|
66
|
+
_a["iui-".concat(size)] = !!size,
|
|
67
|
+
_a["iui-".concat(status)] = !!status,
|
|
68
68
|
_a), className), style: style }, rest),
|
|
69
69
|
React.createElement("svg", { className: 'iui-radial', viewBox: '0 0 32 32', "aria-hidden": 'true' },
|
|
70
70
|
React.createElement("circle", { className: 'iui-track', cx: '16', cy: '16', r: '14' }),
|
package/esm/core/Radio/Radio.js
CHANGED
|
@@ -50,7 +50,7 @@ export var Radio = React.forwardRef(function (props, ref) {
|
|
|
50
50
|
}
|
|
51
51
|
}, [setFocus]);
|
|
52
52
|
var radio = (React.createElement("input", __assign({ className: cx('iui-radio', className && (_a = {}, _a[className] = !label, _a), checkmarkClassName), style: __assign(__assign({}, (!label && style)), checkmarkStyle), disabled: disabled, type: 'radio', ref: refs }, rest)));
|
|
53
|
-
return !label ? (radio) : (React.createElement("label", { className: cx('iui-radio-wrapper', (_b = { 'iui-disabled': disabled }, _b["iui-"
|
|
53
|
+
return !label ? (radio) : (React.createElement("label", { className: cx('iui-radio-wrapper', (_b = { 'iui-disabled': disabled }, _b["iui-".concat(status)] = !!status, _b), className), style: style },
|
|
54
54
|
radio,
|
|
55
55
|
label && React.createElement("span", { className: 'iui-radio-label' }, label)));
|
|
56
56
|
});
|
|
@@ -127,7 +127,7 @@ export var Select = function (props) {
|
|
|
127
127
|
return options.map(function (option, index) {
|
|
128
128
|
var isSelected = value === option.value;
|
|
129
129
|
var menuItem = itemRenderer ? (itemRenderer(option, { close: close, isSelected: isSelected })) : (React.createElement(MenuItem, null, option.label));
|
|
130
|
-
return React.cloneElement(menuItem, __assign(__assign({ key: option.label
|
|
130
|
+
return React.cloneElement(menuItem, __assign(__assign({ key: "".concat(option.label, "-").concat(index), isSelected: isSelected, onClick: function () {
|
|
131
131
|
!option.disabled && (onChange === null || onChange === void 0 ? void 0 : onChange(option.value));
|
|
132
132
|
close();
|
|
133
133
|
}, ref: function (el) { return isSelected && (el === null || el === void 0 ? void 0 : el.scrollIntoView()); }, role: 'option' }, option), menuItem.props));
|
|
@@ -140,7 +140,7 @@ export var Select = function (props) {
|
|
|
140
140
|
return options.find(function (option) { return option.value === value; });
|
|
141
141
|
}, [options, value]);
|
|
142
142
|
return (React.createElement("div", __assign({ className: cx('iui-input-with-icon', className), "aria-expanded": isOpen, "aria-haspopup": 'listbox', style: style }, rest),
|
|
143
|
-
React.createElement(DropdownMenu, __assign({ menuItems: menuItems, placement: 'bottom-start', className: cx('iui-scroll', menuClassName), style: __assign({ minWidth: minWidth, maxWidth: "min("
|
|
143
|
+
React.createElement(DropdownMenu, __assign({ menuItems: menuItems, placement: 'bottom-start', className: cx('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) {
|
|
144
144
|
var _b;
|
|
145
145
|
var target = _a.target;
|
|
146
146
|
if (!((_b = toggleButtonRef.current) === null || _b === void 0 ? void 0 : _b.contains(target))) {
|
|
@@ -151,7 +151,7 @@ export var Select = function (props) {
|
|
|
151
151
|
'iui-placeholder': !selectedItem && !!placeholder,
|
|
152
152
|
'iui-disabled': disabled
|
|
153
153
|
},
|
|
154
|
-
_a["iui-"
|
|
154
|
+
_a["iui-".concat(size)] = !!size,
|
|
155
155
|
_a)), onClick: function () { return !disabled && toggle(); }, onKeyDown: function (e) { return !disabled && onKeyDown(e, toggle); }, tabIndex: !disabled ? 0 : undefined },
|
|
156
156
|
!selectedItem && React.createElement("span", { className: 'iui-content' }, placeholder),
|
|
157
157
|
selectedItem &&
|
|
@@ -74,7 +74,7 @@ var focusThumb = function (sliderContainer, activeIndex) {
|
|
|
74
74
|
var doc = sliderContainer.ownerDocument;
|
|
75
75
|
if (!sliderContainer.contains(doc.activeElement) ||
|
|
76
76
|
Number((_a = doc.activeElement) === null || _a === void 0 ? void 0 : _a.getAttribute('data-index')) !== activeIndex) {
|
|
77
|
-
var thumbToFocus = sliderContainer.querySelector("[data-index=\""
|
|
77
|
+
var thumbToFocus = sliderContainer.querySelector("[data-index=\"".concat(activeIndex, "\"]"));
|
|
78
78
|
thumbToFocus && thumbToFocus.focus();
|
|
79
79
|
}
|
|
80
80
|
};
|
package/esm/core/Slider/Thumb.js
CHANGED
|
@@ -67,5 +67,5 @@ export var Thumb = function (props) {
|
|
|
67
67
|
var leftPercent = (100.0 * (value - sliderMin)) / (sliderMax - sliderMin);
|
|
68
68
|
var _c = thumbProps || {}, style = _c.style, className = _c.className, rest = __rest(_c, ["style", "className"]);
|
|
69
69
|
return (React.createElement(Tooltip, __assign({ visible: isActive || hasFocus || isHovered, placement: 'top' }, tooltipProps),
|
|
70
|
-
React.createElement("div", __assign({}, rest, { "data-index": index, ref: thumbRef, style: __assign(__assign({}, style), { left: leftPercent
|
|
70
|
+
React.createElement("div", __assign({}, rest, { "data-index": index, ref: thumbRef, style: __assign(__assign({}, style), { left: "".concat(leftPercent, "%") }), className: cx('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); } }))));
|
|
71
71
|
};
|
package/esm/core/Slider/Track.js
CHANGED
|
@@ -49,6 +49,6 @@ export var Track = function (props) {
|
|
|
49
49
|
var leftPercent = (100.0 * (segment.left - sliderMin)) / (sliderMax - sliderMin);
|
|
50
50
|
var rightPercent = (100.0 * (segment.right - sliderMin)) / (sliderMax - sliderMin);
|
|
51
51
|
rightPercent = 100.0 - rightPercent;
|
|
52
|
-
return (React.createElement(React.Fragment, { key: index }, shouldDisplaySegment(index, trackDisplayMode) ? (React.createElement("div", { className: 'iui-slider-track', style: { left: leftPercent
|
|
52
|
+
return (React.createElement(React.Fragment, { key: index }, shouldDisplaySegment(index, trackDisplayMode) ? (React.createElement("div", { className: 'iui-slider-track', style: { left: "".concat(leftPercent, "%"), right: "".concat(rightPercent, "%") } })) : null));
|
|
53
53
|
})));
|
|
54
54
|
};
|
|
@@ -57,7 +57,7 @@ export var Surface = React.forwardRef(function (props, ref) {
|
|
|
57
57
|
var _a, _b, _c;
|
|
58
58
|
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"]);
|
|
59
59
|
useTheme();
|
|
60
|
-
var _style = ((_c = (_b = (_a = 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: "
|
|
60
|
+
var _style = ((_c = (_b = (_a = 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))))
|
|
61
61
|
? __assign({ '--iui-surface-elevation': getSurfaceElevationValue(elevation) }, style) : __assign({ boxShadow: getSurfaceElevationValue(elevation) }, style);
|
|
62
62
|
return (React.createElement("div", __assign({ className: cx('iui-surface', className), style: _style, ref: ref }, rest), children));
|
|
63
63
|
});
|
package/esm/core/Table/Table.js
CHANGED
|
@@ -276,7 +276,7 @@ export var Table = function (props) {
|
|
|
276
276
|
resizeRef(element);
|
|
277
277
|
}
|
|
278
278
|
}, id: id }, getTableProps({
|
|
279
|
-
className: cx('iui-table', (_a = {}, _a["iui-"
|
|
279
|
+
className: cx('iui-table', (_a = {}, _a["iui-".concat(density)] = density !== 'default', _a), className),
|
|
280
280
|
style: style,
|
|
281
281
|
}), ariaDataAttributes),
|
|
282
282
|
React.createElement("div", { className: 'iui-table-header', ref: headerRef }, headerGroups.slice(1).map(function (headerGroup) {
|
|
@@ -34,15 +34,15 @@ import { ProgressRadial } from '../ProgressIndicators';
|
|
|
34
34
|
import { MenuItem } from '../Menu';
|
|
35
35
|
import { getBoundedValue, useTheme, useOverflow, useContainerWidth, } from '../utils';
|
|
36
36
|
var defaultLocalization = {
|
|
37
|
-
pageSizeLabel: function (size) { return size
|
|
37
|
+
pageSizeLabel: function (size) { return "".concat(size, " per page"); },
|
|
38
38
|
rangeLabel: function (startIndex, endIndex, totalRows, isLoading) {
|
|
39
39
|
return isLoading
|
|
40
|
-
? startIndex
|
|
41
|
-
: startIndex
|
|
40
|
+
? "".concat(startIndex, "-").concat(endIndex, "\u2026")
|
|
41
|
+
: "".concat(startIndex, "-").concat(endIndex, " of ").concat(totalRows);
|
|
42
42
|
},
|
|
43
43
|
previousPage: 'Previous page',
|
|
44
44
|
nextPage: 'Next page',
|
|
45
|
-
goToPageLabel: function (page) { return "Go to page "
|
|
45
|
+
goToPageLabel: function (page) { return "Go to page ".concat(page); },
|
|
46
46
|
rowsPerPageLabel: 'Rows per page',
|
|
47
47
|
};
|
|
48
48
|
/**
|
|
@@ -66,12 +66,12 @@ export var TablePaginator = function (props) {
|
|
|
66
66
|
var needFocus = React.useRef(false);
|
|
67
67
|
var isMounted = React.useRef(false);
|
|
68
68
|
React.useEffect(function () {
|
|
69
|
-
var _a, _b
|
|
69
|
+
var _a, _b;
|
|
70
70
|
// Checking `isMounted.current` prevents from focusing on initial load.
|
|
71
71
|
// Checking `needFocus.current` prevents from focusing page when clicked on previous/next page.
|
|
72
72
|
if (isMounted.current && needFocus.current) {
|
|
73
73
|
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(); });
|
|
74
|
-
|
|
74
|
+
buttonToFocus === null || buttonToFocus === void 0 ? void 0 : buttonToFocus.focus();
|
|
75
75
|
needFocus.current = false;
|
|
76
76
|
}
|
|
77
77
|
isMounted.current = true;
|
|
@@ -31,7 +31,7 @@ export var TableRow = function (props) {
|
|
|
31
31
|
isLast && ((_b = onBottomReached.current) === null || _b === void 0 ? void 0 : _b.call(onBottomReached));
|
|
32
32
|
}, [isLast, onBottomReached, onRowInViewport, row.original]);
|
|
33
33
|
var rowRef = useIntersection(onIntersect, {
|
|
34
|
-
rootMargin: intersectionMargin
|
|
34
|
+
rootMargin: "".concat(intersectionMargin, "px"),
|
|
35
35
|
});
|
|
36
36
|
var userRowProps = rowProps === null || rowProps === void 0 ? void 0 : rowProps(row);
|
|
37
37
|
var mergedProps = __assign(__assign(__assign({}, row.getRowProps({ style: { flex: "0 0 auto", minWidth: '100%' } })), userRowProps), {
|
|
@@ -72,8 +72,8 @@ export var ActionColumn = function (_a) {
|
|
|
72
72
|
// Triggers an update to resize the widths of all visible columns
|
|
73
73
|
dispatch({ type: tableResizeStartAction });
|
|
74
74
|
};
|
|
75
|
-
return (React.createElement(MenuItem, { key: column.id, icon: React.createElement(Checkbox, { checked: checked, disabled: column.disableToggleVisibility, onClick: function (e) { return e.stopPropagation(); }, onChange: onClick, "aria-labelledby": "iui-column-"
|
|
76
|
-
React.createElement("div", { id: "iui-column-"
|
|
75
|
+
return (React.createElement(MenuItem, { key: column.id, icon: React.createElement(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 },
|
|
76
|
+
React.createElement("div", { id: "iui-column-".concat(column.id) }, column.render('Header'))));
|
|
77
77
|
});
|
|
78
78
|
};
|
|
79
79
|
return (React.createElement(DropdownMenu, { menuItems: headerCheckBoxes, onHide: function () { return setIsOpen(false); }, onShow: function () { return setIsOpen(true); } },
|
package/esm/core/Table/utils.js
CHANGED
|
@@ -2,21 +2,21 @@ export var getCellStyle = function (column, isTableResizing) {
|
|
|
2
2
|
var style = {};
|
|
3
3
|
style.flex = "1 1 145px";
|
|
4
4
|
if (column.width) {
|
|
5
|
-
var width = typeof column.width === 'string' ? column.width : column.width
|
|
5
|
+
var width = typeof column.width === 'string' ? column.width : "".concat(column.width, "px");
|
|
6
6
|
style.width = width;
|
|
7
7
|
// This allows flexbox to handle the width of the column on table resize
|
|
8
8
|
if (isTableResizing && column.canResize) {
|
|
9
|
-
style.flex = Number(column.width)
|
|
9
|
+
style.flex = "".concat(Number(column.width), " ").concat(Number(column.width), " ").concat(width);
|
|
10
10
|
}
|
|
11
11
|
else {
|
|
12
|
-
style.flex = "0 0 "
|
|
12
|
+
style.flex = "0 0 ".concat(width);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
if (column.maxWidth) {
|
|
16
|
-
style.maxWidth = column.maxWidth
|
|
16
|
+
style.maxWidth = "".concat(column.maxWidth, "px");
|
|
17
17
|
}
|
|
18
18
|
if (column.minWidth) {
|
|
19
|
-
style.minWidth = column.minWidth
|
|
19
|
+
style.minWidth = "".concat(column.minWidth, "px");
|
|
20
20
|
}
|
|
21
21
|
return style;
|
|
22
22
|
};
|
package/esm/core/Tabs/Tabs.d.ts
CHANGED
package/esm/core/Tabs/Tabs.js
CHANGED
|
@@ -77,20 +77,19 @@ export var Tabs = function (props) {
|
|
|
77
77
|
var activeTab = tablistRef.current.children[currentActiveIndex];
|
|
78
78
|
var activeTabRect = activeTab.getBoundingClientRect();
|
|
79
79
|
setStripeProperties(__assign(__assign({}, (orientation === 'horizontal' && {
|
|
80
|
-
'--stripe-width': activeTabRect.width
|
|
81
|
-
'--stripe-left': activeTab.offsetLeft
|
|
80
|
+
'--stripe-width': "".concat(activeTabRect.width, "px"),
|
|
81
|
+
'--stripe-left': "".concat(activeTab.offsetLeft, "px"),
|
|
82
82
|
})), (orientation === 'vertical' && {
|
|
83
|
-
'--stripe-height': activeTabRect.height
|
|
84
|
-
'--stripe-top': activeTab.offsetTop
|
|
83
|
+
'--stripe-height': "".concat(activeTabRect.height, "px"),
|
|
84
|
+
'--stripe-top': "".concat(activeTab.offsetTop, "px"),
|
|
85
85
|
})));
|
|
86
86
|
}
|
|
87
87
|
}, [currentActiveIndex, type, orientation, tabsWidth]);
|
|
88
88
|
var _l = React.useState(), focusedIndex = _l[0], setFocusedIndex = _l[1];
|
|
89
89
|
React.useEffect(function () {
|
|
90
|
-
var _a;
|
|
91
90
|
if (tablistRef.current && focusedIndex !== undefined) {
|
|
92
91
|
var tab = tablistRef.current.querySelectorAll('.iui-tab')[focusedIndex];
|
|
93
|
-
|
|
92
|
+
tab === null || tab === void 0 ? void 0 : tab.focus();
|
|
94
93
|
}
|
|
95
94
|
}, [focusedIndex]);
|
|
96
95
|
var _m = React.useState(false), hasSublabel = _m[0], setHasSublabel = _m[1]; // used for setting size
|
|
@@ -167,8 +166,8 @@ export var Tabs = function (props) {
|
|
|
167
166
|
}
|
|
168
167
|
};
|
|
169
168
|
var isIE = !((_c = (_b = (_a = 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, '--stripe-width', '100px'));
|
|
170
|
-
return (React.createElement("div", { className: cx('iui-tabs-wrapper', "iui-"
|
|
171
|
-
React.createElement("ul", __assign({ className: cx('iui-tabs', "iui-"
|
|
169
|
+
return (React.createElement("div", { className: cx('iui-tabs-wrapper', "iui-".concat(orientation), wrapperClassName), style: stripeProperties },
|
|
170
|
+
React.createElement("ul", __assign({ className: cx('iui-tabs', "iui-".concat(type), {
|
|
172
171
|
'iui-green': color === 'green',
|
|
173
172
|
'iui-animated': type !== 'default' && !isIE,
|
|
174
173
|
'iui-not-animated': isIE,
|
|
@@ -39,7 +39,7 @@ export var TagContainer = function (props) {
|
|
|
39
39
|
var className = props.className, children = props.children, overflow = props.overflow, _b = props.background, background = _b === void 0 ? 'none' : _b, rest = __rest(props, ["className", "children", "overflow", "background"]);
|
|
40
40
|
useTheme();
|
|
41
41
|
return (React.createElement("div", __assign({ className: cx('iui-tag-container', (_a = {},
|
|
42
|
-
_a["iui-"
|
|
42
|
+
_a["iui-".concat(overflow)] = !!overflow,
|
|
43
43
|
_a['iui-visible'] = background !== 'none',
|
|
44
44
|
_a), className) }, rest), children));
|
|
45
45
|
};
|
package/esm/core/Tile/Tile.js
CHANGED
|
@@ -63,7 +63,7 @@ export var Tile = function (props) {
|
|
|
63
63
|
'iui-actionable': isActionable,
|
|
64
64
|
}, className), tabIndex: isActionable ? 0 : undefined }, rest),
|
|
65
65
|
thumbnail && (React.createElement("div", { className: 'iui-tile-thumbnail' },
|
|
66
|
-
typeof thumbnail === 'string' ? (React.createElement("div", { className: 'iui-tile-thumbnail-picture', style: { backgroundImage: "url("
|
|
66
|
+
typeof thumbnail === 'string' ? (React.createElement("div", { className: 'iui-tile-thumbnail-picture', style: { backgroundImage: "url(".concat(thumbnail, ")") } })) : thumbnail && thumbnail.type === 'img' ? (React.cloneElement(thumbnail, {
|
|
67
67
|
className: 'iui-tile-thumbnail-picture',
|
|
68
68
|
})) : React.isValidElement(thumbnail) ? (React.cloneElement(thumbnail, {
|
|
69
69
|
className: cx('iui-thumbnail-icon', thumbnail.props.className),
|
package/esm/core/Toast/Toast.js
CHANGED
|
@@ -117,7 +117,7 @@ export var Toast = function (props) {
|
|
|
117
117
|
}, onExiting: function (node) {
|
|
118
118
|
var _a = calculateOutAnimation(node), translateX = _a.translateX, translateY = _a.translateY;
|
|
119
119
|
node.style.transform = animateOutTo
|
|
120
|
-
? "scale(0.9) translate("
|
|
120
|
+
? "scale(0.9) translate(".concat(translateX, "px,").concat(translateY, "px)")
|
|
121
121
|
: "scale(0.9)";
|
|
122
122
|
node.style.opacity = '0';
|
|
123
123
|
node.style.transitionDuration = animateOutTo ? '400ms' : '120ms';
|
|
@@ -133,7 +133,7 @@ export var Toast = function (props) {
|
|
|
133
133
|
export var ToastPresentation = function (props) {
|
|
134
134
|
var content = props.content, category = props.category, _a = props.type, type = _a === void 0 ? 'temporary' : _a, link = props.link, hasCloseButton = props.hasCloseButton, onClose = props.onClose, className = props.className, rest = __rest(props, ["content", "category", "type", "link", "hasCloseButton", "onClose", "className"]);
|
|
135
135
|
var StatusIcon = StatusIconMap[category];
|
|
136
|
-
return (React.createElement("div", __assign({ className: cx("iui-toast iui-"
|
|
136
|
+
return (React.createElement("div", __assign({ className: cx("iui-toast iui-".concat(category), className) }, rest),
|
|
137
137
|
React.createElement("div", { className: 'iui-status-area' }, React.createElement(StatusIcon, { className: 'iui-icon' })),
|
|
138
138
|
React.createElement("div", { className: 'iui-message' }, content),
|
|
139
139
|
link && (React.createElement("a", { className: 'iui-toast-anchor', onClick: link.onClick }, link.title)),
|
|
@@ -20,7 +20,7 @@ import Toast from './Toast';
|
|
|
20
20
|
export var ToastWrapper = function (props) {
|
|
21
21
|
var toasts = props.toasts, _a = props.placement, placement = _a === void 0 ? 'top' : _a;
|
|
22
22
|
var placementPosition = placement.startsWith('top') ? 'top' : 'bottom';
|
|
23
|
-
return (React.createElement("span", { className: cx("iui-toast-wrapper", "iui-placement-"
|
|
23
|
+
return (React.createElement("span", { className: cx("iui-toast-wrapper", "iui-placement-".concat(placement)) }, toasts.map(function (toastProps) {
|
|
24
24
|
return (React.createElement(Toast, __assign({ key: toastProps.id, placementPosition: placementPosition }, toastProps)));
|
|
25
25
|
})));
|
|
26
26
|
};
|
|
@@ -57,7 +57,7 @@ export var TreeNode = function (props) {
|
|
|
57
57
|
var nodeRef = React.useRef(null);
|
|
58
58
|
var styleDepth = React.useMemo(function () {
|
|
59
59
|
var _a, _b, _c;
|
|
60
|
-
return ((_c = (_b = (_a = 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, "--level: "
|
|
60
|
+
return ((_c = (_b = (_a = 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, "--level: ".concat(nodeDepth)))
|
|
61
61
|
? { '--level': nodeDepth }
|
|
62
62
|
: { marginLeft: nodeDepth ? nodeDepth * 28 : 0 };
|
|
63
63
|
}, [nodeDepth]);
|
|
@@ -73,7 +73,7 @@ export var TreeNode = function (props) {
|
|
|
73
73
|
break;
|
|
74
74
|
}
|
|
75
75
|
if (parentNodeId) {
|
|
76
|
-
var parentNode = (_b = nodeRef.current) === null || _b === void 0 ? void 0 : _b.ownerDocument.querySelector("#"
|
|
76
|
+
var parentNode = (_b = nodeRef.current) === null || _b === void 0 ? void 0 : _b.ownerDocument.querySelector("#".concat(parentNodeId));
|
|
77
77
|
parentNode === null || parentNode === void 0 ? void 0 : parentNode.focus();
|
|
78
78
|
break;
|
|
79
79
|
}
|
|
@@ -43,7 +43,7 @@ export var Text = React.forwardRef(function (props, ref) {
|
|
|
43
43
|
var _b = props.variant, variant = _b === void 0 ? 'body' : _b, _c = props.as, Element = _c === void 0 ? 'div' : _c, className = props.className, _d = props.isMuted, isMuted = _d === void 0 ? false : _d, _e = props.isSkeleton, isSkeleton = _e === void 0 ? false : _e, rest = __rest(props, ["variant", "as", "className", "isMuted", "isSkeleton"]);
|
|
44
44
|
useTheme();
|
|
45
45
|
return (React.createElement(Element, __assign({ className: cx((_a = {},
|
|
46
|
-
_a["iui-text-"
|
|
46
|
+
_a["iui-text-".concat(variant)] = variant !== 'body',
|
|
47
47
|
_a['iui-text-block'] = variant === 'body',
|
|
48
48
|
_a['iui-text-muted'] = isMuted,
|
|
49
49
|
_a['iui-skeleton'] = isSkeleton,
|
|
@@ -54,10 +54,10 @@ export var UserIcon = function (props) {
|
|
|
54
54
|
var _c = props.size, size = _c === void 0 ? 'small' : _c, status = props.status, abbreviation = props.abbreviation, image = props.image, _d = props.backgroundColor, backgroundColor = _d === void 0 ? 'white' : _d, title = props.title, translatedStatusTitles = props.translatedStatusTitles, className = props.className, style = props.style, rest = __rest(props, ["size", "status", "abbreviation", "image", "backgroundColor", "title", "translatedStatusTitles", "className", "style"]);
|
|
55
55
|
useTheme();
|
|
56
56
|
var statusTitles = __assign(__assign({}, defaultStatusTitles), translatedStatusTitles);
|
|
57
|
-
return (React.createElement("span", __assign({ className: cx('iui-user-icon', (_a = {}, _a["iui-"
|
|
57
|
+
return (React.createElement("span", __assign({ className: cx('iui-user-icon', (_a = {}, _a["iui-".concat(size)] = size !== 'medium', _a), className), title: title, style: style }, rest), image !== null && image !== void 0 ? image : (React.createElement("abbr", { className: 'iui-initials', style: { backgroundColor: backgroundColor } }, abbreviation === null || abbreviation === void 0 ? void 0 : abbreviation.substring(0, 2))),
|
|
58
58
|
React.createElement("span", { className: 'iui-stroke' }),
|
|
59
59
|
status && (React.createElement("span", { title: statusTitles[status], className: cx('iui-status', (_b = {},
|
|
60
|
-
_b["iui-"
|
|
60
|
+
_b["iui-".concat(status)] = !!status,
|
|
61
61
|
_b)), "aria-label": statusTitles[status] }))));
|
|
62
62
|
};
|
|
63
63
|
export default UserIcon;
|
|
@@ -78,10 +78,10 @@ export var UserIconGroup = function (props) {
|
|
|
78
78
|
childrenArray.length <= maxIcons + 1 && getUserIconList(maxIcons + 1),
|
|
79
79
|
childrenArray.length > maxIcons + 1 && (React.createElement(React.Fragment, null,
|
|
80
80
|
getUserIconList(maxIcons),
|
|
81
|
-
React.createElement("div", __assign({}, countIconProps, { className: cx('iui-user-icon', (_a = {}, _a["iui-"
|
|
81
|
+
React.createElement("div", __assign({}, countIconProps, { className: cx('iui-user-icon', (_a = {}, _a["iui-".concat(iconSize)] = iconSize !== 'medium', _a), 'iui-user-icon-count', countIconProps === null || countIconProps === void 0 ? void 0 : countIconProps.className) }),
|
|
82
82
|
React.createElement("abbr", { className: 'iui-initials' }, childrenLength <= maxLength
|
|
83
|
-
? ""
|
|
84
|
-
: maxLength
|
|
83
|
+
? "".concat(childrenLength - maxIcons)
|
|
84
|
+
: "".concat(maxLength, "+")),
|
|
85
85
|
React.createElement("span", { className: 'iui-stroke' })))))));
|
|
86
86
|
};
|
|
87
87
|
export default UserIconGroup;
|
package/esm/core/Wizard/Step.js
CHANGED
|
@@ -48,7 +48,7 @@ export var Step = function (props) {
|
|
|
48
48
|
var stepShape = (React.createElement("li", __assign({ className: cx('iui-wizard-step', {
|
|
49
49
|
'iui-current': isActive,
|
|
50
50
|
'iui-clickable': isClickable,
|
|
51
|
-
}, className), style: __assign({ width: type === 'default' ? 100 / totalSteps
|
|
51
|
+
}, className), style: __assign({ width: type === 'default' ? "".concat(100 / totalSteps, "%") : undefined }, style), onClick: onCompletedClick, onKeyDown: onKeyDown, "aria-current": isActive ? 'step' : undefined, tabIndex: isClickable ? 0 : undefined }, rest),
|
|
52
52
|
React.createElement("div", { className: 'iui-wizard-track-content' },
|
|
53
53
|
React.createElement("span", { className: 'iui-wizard-circle' }, type === 'workflow' ? title : index + 1)),
|
|
54
54
|
type === 'default' && (React.createElement("span", { className: 'iui-wizard-step-name' }, title))));
|
|
@@ -31,7 +31,7 @@ import '@itwin/itwinui-css/css/wizard.css';
|
|
|
31
31
|
import { Step } from './Step';
|
|
32
32
|
var defaultWizardLocalization = {
|
|
33
33
|
stepsCountLabel: function (currentStep, totalSteps) {
|
|
34
|
-
return "Step "
|
|
34
|
+
return "Step ".concat(currentStep, " of ").concat(totalSteps, ":");
|
|
35
35
|
},
|
|
36
36
|
};
|
|
37
37
|
/**
|