@itwin/itwinui-react 1.37.3 → 1.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/cjs/core/Breadcrumbs/Breadcrumbs.js +3 -5
- package/cjs/core/ColorPicker/ColorSwatch.d.ts +1 -1
- package/cjs/core/ComboBox/ComboBox.d.ts +4 -2
- package/cjs/core/ComboBox/ComboBox.js +129 -246
- package/cjs/core/ComboBox/ComboBoxDropdown.d.ts +8 -0
- package/cjs/core/ComboBox/ComboBoxDropdown.js +55 -0
- package/cjs/core/ComboBox/ComboBoxEndIcon.d.ts +5 -0
- package/cjs/core/ComboBox/ComboBoxEndIcon.js +54 -0
- package/cjs/core/ComboBox/ComboBoxInput.d.ts +5 -0
- package/cjs/core/ComboBox/ComboBoxInput.js +134 -0
- package/cjs/core/ComboBox/ComboBoxInputContainer.d.ts +8 -0
- package/cjs/core/ComboBox/ComboBoxInputContainer.js +45 -0
- package/cjs/core/ComboBox/ComboBoxMenu.d.ts +3 -0
- package/cjs/core/ComboBox/ComboBoxMenu.js +45 -0
- package/cjs/core/ComboBox/ComboBoxMenuItem.d.ts +21 -0
- package/cjs/core/ComboBox/ComboBoxMenuItem.js +65 -0
- package/cjs/core/ComboBox/helpers.d.ts +27 -0
- package/cjs/core/ComboBox/helpers.js +50 -0
- package/cjs/core/Modal/Modal.d.ts +1 -1
- package/cjs/core/Modal/Modal.js +6 -6
- package/cjs/core/Modal/ModalButtonBar.d.ts +1 -1
- package/cjs/core/Modal/ModalButtonBar.js +2 -2
- package/cjs/core/Modal/ModalContent.d.ts +1 -1
- package/cjs/core/Modal/ModalContent.js +2 -2
- package/cjs/core/RadioTiles/RadioTile.d.ts +1 -1
- package/cjs/core/RadioTiles/RadioTile.js +7 -9
- package/cjs/core/Table/Table.js +2 -2
- package/cjs/core/Table/filters/FilterToggle.js +3 -2
- package/cjs/core/Toast/ToastWrapper.d.ts +7 -5
- package/cjs/core/Toast/ToastWrapper.js +8 -4
- package/cjs/core/Toast/Toaster.d.ts +3 -0
- package/cjs/core/Toast/Toaster.js +66 -5
- package/cjs/core/utils/components/Popover.d.ts +1 -1
- package/cjs/core/utils/hooks/index.d.ts +1 -0
- package/cjs/core/utils/hooks/index.js +1 -0
- package/cjs/core/utils/hooks/useSafeContext.d.ts +6 -0
- package/cjs/core/utils/hooks/useSafeContext.js +23 -0
- package/esm/core/Breadcrumbs/Breadcrumbs.js +3 -5
- package/esm/core/ColorPicker/ColorSwatch.d.ts +1 -1
- package/esm/core/ComboBox/ComboBox.d.ts +4 -2
- package/esm/core/ComboBox/ComboBox.js +131 -248
- package/esm/core/ComboBox/ComboBoxDropdown.d.ts +8 -0
- package/esm/core/ComboBox/ComboBoxDropdown.js +49 -0
- package/esm/core/ComboBox/ComboBoxEndIcon.d.ts +5 -0
- package/esm/core/ComboBox/ComboBoxEndIcon.js +48 -0
- package/esm/core/ComboBox/ComboBoxInput.d.ts +5 -0
- package/esm/core/ComboBox/ComboBoxInput.js +128 -0
- package/esm/core/ComboBox/ComboBoxInputContainer.d.ts +8 -0
- package/esm/core/ComboBox/ComboBoxInputContainer.js +38 -0
- package/esm/core/ComboBox/ComboBoxMenu.d.ts +3 -0
- package/esm/core/ComboBox/ComboBoxMenu.js +39 -0
- package/esm/core/ComboBox/ComboBoxMenuItem.d.ts +21 -0
- package/esm/core/ComboBox/ComboBoxMenuItem.js +59 -0
- package/esm/core/ComboBox/helpers.d.ts +27 -0
- package/esm/core/ComboBox/helpers.js +43 -0
- package/esm/core/Modal/Modal.d.ts +1 -1
- package/esm/core/Modal/Modal.js +6 -6
- package/esm/core/Modal/ModalButtonBar.d.ts +1 -1
- package/esm/core/Modal/ModalButtonBar.js +2 -2
- package/esm/core/Modal/ModalContent.d.ts +1 -1
- package/esm/core/Modal/ModalContent.js +2 -2
- package/esm/core/RadioTiles/RadioTile.d.ts +1 -1
- package/esm/core/RadioTiles/RadioTile.js +7 -9
- package/esm/core/Table/Table.js +2 -2
- package/esm/core/Table/filters/FilterToggle.js +3 -2
- package/esm/core/Toast/ToastWrapper.d.ts +7 -5
- package/esm/core/Toast/ToastWrapper.js +8 -3
- package/esm/core/Toast/Toaster.d.ts +3 -0
- package/esm/core/Toast/Toaster.js +66 -5
- package/esm/core/utils/components/Popover.d.ts +1 -1
- package/esm/core/utils/hooks/index.d.ts +1 -0
- package/esm/core/utils/hooks/index.js +1 -0
- package/esm/core/utils/hooks/useSafeContext.d.ts +6 -0
- package/esm/core/utils/hooks/useSafeContext.js +16 -0
- package/package.json +5 -33
|
@@ -0,0 +1,54 @@
|
|
|
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.ComboBoxEndIcon = 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 classnames_1 = __importDefault(require("classnames"));
|
|
34
|
+
var react_1 = __importDefault(require("react"));
|
|
35
|
+
var utils_1 = require("../utils");
|
|
36
|
+
var helpers_1 = require("./helpers");
|
|
37
|
+
var CaretDownSmall_1 = __importDefault(require("@itwin/itwinui-icons-react/cjs/icons/CaretDownSmall"));
|
|
38
|
+
exports.ComboBoxEndIcon = react_1.default.forwardRef(function (props, forwardedRef) {
|
|
39
|
+
var className = props.className, children = props.children, onClickProp = props.onClick, disabled = props.disabled, isOpen = props.isOpen, rest = __rest(props, ["className", "children", "onClick", "disabled", "isOpen"]);
|
|
40
|
+
var dispatch = (0, utils_1.useSafeContext)(helpers_1.ComboBoxActionContext);
|
|
41
|
+
var toggleButtonRef = (0, utils_1.useSafeContext)(helpers_1.ComboBoxRefsContext).toggleButtonRef;
|
|
42
|
+
var refs = (0, utils_1.useMergedRefs)(toggleButtonRef, forwardedRef);
|
|
43
|
+
return (react_1.default.createElement("span", __assign({ ref: refs, className: (0, classnames_1.default)('iui-end-icon', {
|
|
44
|
+
'iui-actionable': !disabled,
|
|
45
|
+
'iui-disabled': disabled,
|
|
46
|
+
'iui-open': isOpen,
|
|
47
|
+
}, className), onClick: function (e) {
|
|
48
|
+
onClickProp === null || onClickProp === void 0 ? void 0 : onClickProp(e);
|
|
49
|
+
if (!e.isDefaultPrevented()) {
|
|
50
|
+
dispatch([isOpen ? 'close' : 'open']);
|
|
51
|
+
}
|
|
52
|
+
} }, rest), children !== null && children !== void 0 ? children : react_1.default.createElement(CaretDownSmall_1.default, { "aria-hidden": true })));
|
|
53
|
+
});
|
|
54
|
+
exports.ComboBoxEndIcon.displayName = 'ComboBoxEndIcon';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const ComboBoxInput: React.ForwardRefExoticComponent<{
|
|
3
|
+
setFocus?: boolean | undefined;
|
|
4
|
+
size?: "small" | "large" | undefined;
|
|
5
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,134 @@
|
|
|
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.ComboBoxInput = 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 Input_1 = require("../Input");
|
|
35
|
+
var utils_1 = require("../utils");
|
|
36
|
+
var helpers_1 = require("./helpers");
|
|
37
|
+
exports.ComboBoxInput = react_1.default.forwardRef(function (props, forwardedRef) {
|
|
38
|
+
var onKeyDownProp = props.onKeyDown, onFocusProp = props.onFocus, rest = __rest(props, ["onKeyDown", "onFocus"]);
|
|
39
|
+
var _a = (0, utils_1.useSafeContext)(helpers_1.ComboBoxStateContext), isOpen = _a.isOpen, id = _a.id, focusedIndex = _a.focusedIndex;
|
|
40
|
+
var dispatch = (0, utils_1.useSafeContext)(helpers_1.ComboBoxActionContext);
|
|
41
|
+
var _b = (0, utils_1.useSafeContext)(helpers_1.ComboBoxRefsContext), inputRef = _b.inputRef, menuRef = _b.menuRef, optionsExtraInfoRef = _b.optionsExtraInfoRef;
|
|
42
|
+
var refs = (0, utils_1.useMergedRefs)(inputRef, forwardedRef);
|
|
43
|
+
var focusedIndexRef = react_1.default.useRef(focusedIndex !== null && focusedIndex !== void 0 ? focusedIndex : -1);
|
|
44
|
+
react_1.default.useEffect(function () {
|
|
45
|
+
focusedIndexRef.current = focusedIndex !== null && focusedIndex !== void 0 ? focusedIndex : -1;
|
|
46
|
+
}, [focusedIndex]);
|
|
47
|
+
var getIdFromIndex = function (index) {
|
|
48
|
+
var _a, _b, _c;
|
|
49
|
+
return ((_c = (_b = (_a = menuRef.current) === null || _a === void 0 ? void 0 : _a.querySelector("[data-iui-index=\"".concat(index, "\"]"))) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : '');
|
|
50
|
+
};
|
|
51
|
+
var handleKeyDown = react_1.default.useCallback(function (event) {
|
|
52
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
53
|
+
onKeyDownProp === null || onKeyDownProp === void 0 ? void 0 : onKeyDownProp(event);
|
|
54
|
+
var length = (_a = Object.keys(optionsExtraInfoRef.current).length) !== null && _a !== void 0 ? _a : 0;
|
|
55
|
+
switch (event.key) {
|
|
56
|
+
case 'ArrowDown': {
|
|
57
|
+
event.preventDefault();
|
|
58
|
+
if (!isOpen) {
|
|
59
|
+
return dispatch(['open']);
|
|
60
|
+
}
|
|
61
|
+
if (length === 0) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
if (focusedIndexRef.current === -1) {
|
|
65
|
+
return dispatch([
|
|
66
|
+
'focus',
|
|
67
|
+
(_c = (_b = Object.values(optionsExtraInfoRef.current)) === null || _b === void 0 ? void 0 : _b[0].__originalIndex) !== null && _c !== void 0 ? _c : -1,
|
|
68
|
+
]);
|
|
69
|
+
}
|
|
70
|
+
var nextIndex = focusedIndexRef.current;
|
|
71
|
+
do {
|
|
72
|
+
var currentElement = (_d = menuRef.current) === null || _d === void 0 ? void 0 : _d.querySelector("[data-iui-index=\"".concat(nextIndex, "\"]"));
|
|
73
|
+
var nextElement = (_e = currentElement === null || currentElement === void 0 ? void 0 : currentElement.nextElementSibling) !== null && _e !== void 0 ? _e : (_f = menuRef.current) === null || _f === void 0 ? void 0 : _f.querySelector('[data-iui-index]');
|
|
74
|
+
nextIndex = Number(nextElement === null || nextElement === void 0 ? void 0 : nextElement.getAttribute('data-iui-index'));
|
|
75
|
+
if ((nextElement === null || nextElement === void 0 ? void 0 : nextElement.ariaDisabled) !== 'true') {
|
|
76
|
+
return dispatch(['focus', nextIndex]);
|
|
77
|
+
}
|
|
78
|
+
} while (nextIndex !== focusedIndexRef.current);
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
case 'ArrowUp': {
|
|
82
|
+
event.preventDefault();
|
|
83
|
+
if (!isOpen) {
|
|
84
|
+
return dispatch(['open']);
|
|
85
|
+
}
|
|
86
|
+
if (length === 0) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (focusedIndexRef.current === -1) {
|
|
90
|
+
return dispatch([
|
|
91
|
+
'focus',
|
|
92
|
+
(_h = (_g = Object.values(optionsExtraInfoRef.current)) === null || _g === void 0 ? void 0 : _g[length - 1].__originalIndex) !== null && _h !== void 0 ? _h : -1,
|
|
93
|
+
]);
|
|
94
|
+
}
|
|
95
|
+
var prevIndex = focusedIndexRef.current;
|
|
96
|
+
do {
|
|
97
|
+
var currentElement = (_j = menuRef.current) === null || _j === void 0 ? void 0 : _j.querySelector("[data-iui-index=\"".concat(prevIndex, "\"]"));
|
|
98
|
+
var prevElement = (_k = currentElement === null || currentElement === void 0 ? void 0 : currentElement.previousElementSibling) !== null && _k !== void 0 ? _k : (_l = menuRef.current) === null || _l === void 0 ? void 0 : _l.querySelector('[data-iui-index]:last-of-type');
|
|
99
|
+
prevIndex = Number(prevElement === null || prevElement === void 0 ? void 0 : prevElement.getAttribute('data-iui-index'));
|
|
100
|
+
if ((prevElement === null || prevElement === void 0 ? void 0 : prevElement.ariaDisabled) !== 'true') {
|
|
101
|
+
return dispatch(['focus', prevIndex]);
|
|
102
|
+
}
|
|
103
|
+
} while (prevIndex !== focusedIndexRef.current);
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
case 'Enter': {
|
|
107
|
+
event.preventDefault();
|
|
108
|
+
if (isOpen) {
|
|
109
|
+
dispatch(['select', focusedIndexRef.current]);
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
dispatch(['open']);
|
|
113
|
+
}
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
case 'Escape': {
|
|
117
|
+
event.preventDefault();
|
|
118
|
+
dispatch(['close']);
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
case 'Tab':
|
|
122
|
+
dispatch(['close']);
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
}, [dispatch, isOpen, menuRef, onKeyDownProp, optionsExtraInfoRef]);
|
|
126
|
+
var handleFocus = react_1.default.useCallback(function (event) {
|
|
127
|
+
dispatch(['open']);
|
|
128
|
+
onFocusProp === null || onFocusProp === void 0 ? void 0 : onFocusProp(event);
|
|
129
|
+
}, [dispatch, onFocusProp]);
|
|
130
|
+
return (react_1.default.createElement(Input_1.Input, __assign({ ref: refs, onKeyDown: handleKeyDown, onFocus: handleFocus, "aria-activedescendant": isOpen && focusedIndex != undefined && focusedIndex > -1
|
|
131
|
+
? getIdFromIndex(focusedIndex)
|
|
132
|
+
: undefined, role: 'combobox', "aria-controls": isOpen ? "".concat(id, "-list") : undefined, "aria-autocomplete": 'list', spellCheck: false, autoCapitalize: 'none', autoCorrect: 'off' }, rest)));
|
|
133
|
+
});
|
|
134
|
+
exports.ComboBoxInput.displayName = 'ComboBoxInput';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InputContainerProps } from '../utils';
|
|
3
|
+
declare type ComboBoxInputContainerProps = React.ComponentPropsWithoutRef<'div'> & Pick<InputContainerProps, 'status' | 'message' | 'disabled'>;
|
|
4
|
+
export declare const ComboBoxInputContainer: {
|
|
5
|
+
(props: ComboBoxInputContainerProps): JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
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.ComboBoxInputContainer = 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 StatusMessage_1 = require("../StatusMessage");
|
|
35
|
+
var utils_1 = require("../utils");
|
|
36
|
+
var helpers_1 = require("./helpers");
|
|
37
|
+
var ComboBoxInputContainer = function (props) {
|
|
38
|
+
var className = props.className, status = props.status, message = props.message, children = props.children, rest = __rest(props, ["className", "status", "message", "children"]);
|
|
39
|
+
var id = (0, utils_1.useSafeContext)(helpers_1.ComboBoxStateContext).id;
|
|
40
|
+
return (react_1.default.createElement(utils_1.InputContainer, __assign({ className: className, status: status, statusMessage: typeof message === 'string' ? (react_1.default.createElement(StatusMessage_1.StatusMessage, { status: status }, message)) : (react_1.default.isValidElement(message) &&
|
|
41
|
+
react_1.default.cloneElement(message, { status: status })) }, rest, { id: id }),
|
|
42
|
+
react_1.default.createElement("div", { className: 'iui-input-with-icon' }, children)));
|
|
43
|
+
};
|
|
44
|
+
exports.ComboBoxInputContainer = ComboBoxInputContainer;
|
|
45
|
+
exports.ComboBoxInputContainer.displayName = 'ComboBoxInputContainer';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MenuProps } from '../Menu';
|
|
3
|
+
export declare const ComboBoxMenu: React.ForwardRefExoticComponent<Omit<MenuProps, "onClick"> & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "key" | keyof React.HTMLAttributes<HTMLUListElement>> & React.RefAttributes<HTMLUListElement>>;
|
|
@@ -0,0 +1,45 @@
|
|
|
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.ComboBoxMenu = 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 classnames_1 = __importDefault(require("classnames"));
|
|
34
|
+
var react_1 = __importDefault(require("react"));
|
|
35
|
+
var Menu_1 = require("../Menu");
|
|
36
|
+
var utils_1 = require("../utils");
|
|
37
|
+
var helpers_1 = require("./helpers");
|
|
38
|
+
exports.ComboBoxMenu = react_1.default.forwardRef(function (props, forwardedRef) {
|
|
39
|
+
var className = props.className, style = props.style, rest = __rest(props, ["className", "style"]);
|
|
40
|
+
var _a = (0, utils_1.useSafeContext)(helpers_1.ComboBoxStateContext), minWidth = _a.minWidth, id = _a.id;
|
|
41
|
+
var menuRef = (0, utils_1.useSafeContext)(helpers_1.ComboBoxRefsContext).menuRef;
|
|
42
|
+
var refs = (0, utils_1.useMergedRefs)(menuRef, forwardedRef);
|
|
43
|
+
return (react_1.default.createElement(Menu_1.Menu, __assign({ id: "".concat(id, "-list"), style: react_1.default.useMemo(function () { return (__assign({ minWidth: minWidth, maxWidth: "min(".concat(minWidth * 2, "px, 90vw)"), maxHeight: 300 }, style)); }, [minWidth, style]), setFocus: false, role: 'listbox', ref: refs, className: (0, classnames_1.default)('iui-scroll', className) }, rest)));
|
|
44
|
+
});
|
|
45
|
+
exports.ComboBoxMenu.displayName = 'ComboBoxMenu';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const ComboBoxMenuItem: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
|
|
3
|
+
isSelected?: boolean | undefined;
|
|
4
|
+
disabled?: boolean | undefined;
|
|
5
|
+
value?: unknown;
|
|
6
|
+
onClick?: ((value?: unknown) => void) | undefined;
|
|
7
|
+
size?: "default" | "large" | undefined;
|
|
8
|
+
sublabel?: React.ReactNode;
|
|
9
|
+
icon?: JSX.Element | undefined;
|
|
10
|
+
badge?: JSX.Element | undefined;
|
|
11
|
+
role?: string | undefined;
|
|
12
|
+
subMenuItems?: JSX.Element[] | undefined;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
} & {
|
|
15
|
+
title?: string | undefined;
|
|
16
|
+
id?: string | undefined;
|
|
17
|
+
} & {
|
|
18
|
+
style?: React.CSSProperties | undefined;
|
|
19
|
+
} & import("../utils").ClassNameProps & {
|
|
20
|
+
index: number;
|
|
21
|
+
} & React.RefAttributes<HTMLLIElement>>>;
|
|
@@ -0,0 +1,65 @@
|
|
|
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.ComboBoxMenuItem = 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 classnames_1 = __importDefault(require("classnames"));
|
|
34
|
+
var react_1 = __importDefault(require("react"));
|
|
35
|
+
var utils_1 = require("../utils");
|
|
36
|
+
var helpers_1 = require("./helpers");
|
|
37
|
+
exports.ComboBoxMenuItem = react_1.default.memo(react_1.default.forwardRef(function (props, forwardedRef) {
|
|
38
|
+
var children = props.children, isSelected = props.isSelected, disabled = props.disabled, value = props.value, onClick = props.onClick, sublabel = props.sublabel, _a = props.size, size = _a === void 0 ? !!sublabel ? 'large' : 'default' : _a, icon = props.icon, badge = props.badge, className = props.className, _b = props.role, role = _b === void 0 ? 'menuitem' : _b, index = props.index, rest = __rest(props, ["children", "isSelected", "disabled", "value", "onClick", "sublabel", "size", "icon", "badge", "className", "role", "index"]);
|
|
39
|
+
var focusedIndex = (0, utils_1.useSafeContext)(helpers_1.ComboBoxStateContext).focusedIndex;
|
|
40
|
+
var focusRef = function (el) {
|
|
41
|
+
// will need to check for virtualization here too
|
|
42
|
+
if (focusedIndex === index) {
|
|
43
|
+
el === null || el === void 0 ? void 0 : el.scrollIntoView({ block: 'nearest' });
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
var refs = (0, utils_1.useMergedRefs)(forwardedRef, focusRef);
|
|
47
|
+
return (react_1.default.createElement("li", __assign({ className: (0, classnames_1.default)('iui-menu-item', {
|
|
48
|
+
'iui-large': size === 'large',
|
|
49
|
+
'iui-active': isSelected,
|
|
50
|
+
'iui-disabled': disabled,
|
|
51
|
+
'iui-focused': focusedIndex === index,
|
|
52
|
+
}, className), ref: refs, onClick: function () { return !disabled && (onClick === null || onClick === void 0 ? void 0 : onClick(value)); }, role: role, tabIndex: disabled || role === 'presentation' ? undefined : -1, "aria-selected": isSelected, "aria-disabled": disabled, "data-iui-index": index }, rest),
|
|
53
|
+
icon &&
|
|
54
|
+
react_1.default.cloneElement(icon, {
|
|
55
|
+
className: (0, classnames_1.default)(icon.props.className, 'iui-icon'),
|
|
56
|
+
}),
|
|
57
|
+
react_1.default.createElement("span", { className: 'iui-content' },
|
|
58
|
+
react_1.default.createElement("div", { className: 'iui-menu-label' }, children),
|
|
59
|
+
sublabel && react_1.default.createElement("div", { className: 'iui-menu-description' }, sublabel)),
|
|
60
|
+
badge &&
|
|
61
|
+
react_1.default.cloneElement(badge, {
|
|
62
|
+
className: (0, classnames_1.default)(badge.props.className, 'iui-icon'),
|
|
63
|
+
})));
|
|
64
|
+
}));
|
|
65
|
+
exports.ComboBoxMenuItem.displayName = 'ComboBoxMenuItem';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type ComboBoxAction = 'open' | 'close' | 'select' | 'focus';
|
|
3
|
+
export declare const comboBoxReducer: (state: {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
selectedIndex: number;
|
|
6
|
+
focusedIndex: number;
|
|
7
|
+
}, [type, value]: [ComboBoxAction] | [ComboBoxAction, number | undefined]) => {
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
selectedIndex: number;
|
|
10
|
+
focusedIndex: number;
|
|
11
|
+
};
|
|
12
|
+
export declare const ComboBoxRefsContext: React.Context<{
|
|
13
|
+
inputRef: React.RefObject<HTMLInputElement>;
|
|
14
|
+
menuRef: React.RefObject<HTMLUListElement>;
|
|
15
|
+
toggleButtonRef: React.RefObject<HTMLSpanElement>;
|
|
16
|
+
optionsExtraInfoRef: React.MutableRefObject<Record<string, {
|
|
17
|
+
__originalIndex: number;
|
|
18
|
+
}>>;
|
|
19
|
+
} | undefined>;
|
|
20
|
+
export declare const ComboBoxStateContext: React.Context<{
|
|
21
|
+
isOpen: boolean;
|
|
22
|
+
id: string;
|
|
23
|
+
minWidth: number;
|
|
24
|
+
focusedIndex?: number | undefined;
|
|
25
|
+
} | undefined>;
|
|
26
|
+
export declare const ComboBoxActionContext: React.Context<((x: [ComboBoxAction] | [ComboBoxAction, number]) => void) | undefined>;
|
|
27
|
+
export {};
|
|
@@ -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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.ComboBoxActionContext = exports.ComboBoxStateContext = exports.ComboBoxRefsContext = exports.comboBoxReducer = void 0;
|
|
18
|
+
/*---------------------------------------------------------------------------------------------
|
|
19
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
20
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
21
|
+
*--------------------------------------------------------------------------------------------*/
|
|
22
|
+
var react_1 = __importDefault(require("react"));
|
|
23
|
+
var comboBoxReducer = function (state, _a) {
|
|
24
|
+
var _b;
|
|
25
|
+
var type = _a[0], value = _a[1];
|
|
26
|
+
switch (type) {
|
|
27
|
+
case 'open': {
|
|
28
|
+
return __assign(__assign({}, state), { isOpen: true });
|
|
29
|
+
}
|
|
30
|
+
case 'close': {
|
|
31
|
+
return __assign(__assign({}, state), { isOpen: false });
|
|
32
|
+
}
|
|
33
|
+
case 'select': {
|
|
34
|
+
return __assign(__assign({}, state), { isOpen: false, selectedIndex: value !== null && value !== void 0 ? value : state.selectedIndex, focusedIndex: value !== null && value !== void 0 ? value : state.focusedIndex });
|
|
35
|
+
}
|
|
36
|
+
case 'focus': {
|
|
37
|
+
return __assign(__assign({}, state), { focusedIndex: (_b = value !== null && value !== void 0 ? value : state.selectedIndex) !== null && _b !== void 0 ? _b : -1 });
|
|
38
|
+
}
|
|
39
|
+
default: {
|
|
40
|
+
return state;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
exports.comboBoxReducer = comboBoxReducer;
|
|
45
|
+
exports.ComboBoxRefsContext = react_1.default.createContext(undefined);
|
|
46
|
+
exports.ComboBoxRefsContext.displayName = 'ComboBoxRefsContext';
|
|
47
|
+
exports.ComboBoxStateContext = react_1.default.createContext(undefined);
|
|
48
|
+
exports.ComboBoxStateContext.displayName = 'ComboBoxStateContext';
|
|
49
|
+
exports.ComboBoxActionContext = react_1.default.createContext(undefined);
|
|
50
|
+
exports.ComboBoxActionContext.displayName = 'ComboBoxActionContext';
|
package/cjs/core/Modal/Modal.js
CHANGED
|
@@ -35,7 +35,7 @@ var react_dom_1 = __importDefault(require("react-dom"));
|
|
|
35
35
|
var classnames_1 = __importDefault(require("classnames"));
|
|
36
36
|
var Close_1 = __importDefault(require("@itwin/itwinui-icons-react/cjs/icons/Close"));
|
|
37
37
|
var utils_1 = require("../utils");
|
|
38
|
-
require("@itwin/itwinui-css/css/
|
|
38
|
+
require("@itwin/itwinui-css/css/dialog.css");
|
|
39
39
|
var IconButton_1 = require("../Buttons/IconButton");
|
|
40
40
|
var react_transition_group_1 = require("react-transition-group");
|
|
41
41
|
/**
|
|
@@ -118,12 +118,12 @@ var Modal = function (props) {
|
|
|
118
118
|
onClose(event);
|
|
119
119
|
}
|
|
120
120
|
};
|
|
121
|
-
return !!container ? (react_dom_1.default.createPortal(react_1.default.createElement(react_transition_group_1.CSSTransition, { in: isOpen, classNames: 'iui-
|
|
121
|
+
return !!container ? (react_dom_1.default.createPortal(react_1.default.createElement(react_transition_group_1.CSSTransition, { in: isOpen, classNames: 'iui-dialog-animation', timeout: { exit: 600 }, unmountOnExit: true },
|
|
122
122
|
react_1.default.createElement(utils_1.FocusTrap, null,
|
|
123
|
-
react_1.default.createElement("div", __assign({ className: (0, classnames_1.default)('iui-
|
|
124
|
-
react_1.default.createElement("div", { className: 'iui-
|
|
125
|
-
react_1.default.createElement("div", { className: 'iui-title-bar' },
|
|
126
|
-
react_1.default.createElement("div", { className: 'iui-title' }, title),
|
|
123
|
+
react_1.default.createElement("div", __assign({ className: (0, classnames_1.default)('iui-dialog-backdrop', { 'iui-dialog-default': styleType === 'default' }, { 'iui-dialog-full-page': styleType === 'fullPage' }, { 'iui-dialog-visible': isOpen }, className), tabIndex: -1, onKeyDown: handleKeyDown, ref: overlayRef, onMouseDown: handleMouseDown }, rest),
|
|
124
|
+
react_1.default.createElement("div", { className: 'iui-dialog', id: id, style: style, role: 'dialog', "aria-modal": 'true' },
|
|
125
|
+
react_1.default.createElement("div", { className: 'iui-dialog-title-bar' },
|
|
126
|
+
react_1.default.createElement("div", { className: 'iui-dialog-title' }, title),
|
|
127
127
|
isDismissible && (react_1.default.createElement(IconButton_1.IconButton, { size: 'small', styleType: 'borderless', onClick: onClose, "aria-label": 'Close' },
|
|
128
128
|
react_1.default.createElement(Close_1.default, null)))),
|
|
129
129
|
children)))), container)) : (react_1.default.createElement(react_1.default.Fragment, null));
|
|
@@ -33,14 +33,14 @@ exports.ModalButtonBar = void 0;
|
|
|
33
33
|
var react_1 = __importDefault(require("react"));
|
|
34
34
|
var classnames_1 = __importDefault(require("classnames"));
|
|
35
35
|
var utils_1 = require("../utils");
|
|
36
|
-
require("@itwin/itwinui-css/css/
|
|
36
|
+
require("@itwin/itwinui-css/css/dialog.css");
|
|
37
37
|
/**
|
|
38
38
|
* Container for Buttons in modal.
|
|
39
39
|
*/
|
|
40
40
|
var ModalButtonBar = function (props) {
|
|
41
41
|
var children = props.children, className = props.className, rest = __rest(props, ["children", "className"]);
|
|
42
42
|
(0, utils_1.useTheme)();
|
|
43
|
-
return (react_1.default.createElement("div", __assign({ className: (0, classnames_1.default)('iui-button-bar', className) }, rest), children));
|
|
43
|
+
return (react_1.default.createElement("div", __assign({ className: (0, classnames_1.default)('iui-dialog-button-bar', className) }, rest), children));
|
|
44
44
|
};
|
|
45
45
|
exports.ModalButtonBar = ModalButtonBar;
|
|
46
46
|
exports.default = exports.ModalButtonBar;
|
|
@@ -33,14 +33,14 @@ exports.ModalContent = void 0;
|
|
|
33
33
|
var react_1 = __importDefault(require("react"));
|
|
34
34
|
var classnames_1 = __importDefault(require("classnames"));
|
|
35
35
|
var utils_1 = require("../utils");
|
|
36
|
-
require("@itwin/itwinui-css/css/
|
|
36
|
+
require("@itwin/itwinui-css/css/dialog.css");
|
|
37
37
|
/**
|
|
38
38
|
* Container for content in `Modal`.
|
|
39
39
|
*/
|
|
40
40
|
var ModalContent = function (props) {
|
|
41
41
|
var children = props.children, className = props.className, rest = __rest(props, ["children", "className"]);
|
|
42
42
|
(0, utils_1.useTheme)();
|
|
43
|
-
return (react_1.default.createElement("div", __assign({ className: (0, classnames_1.default)('iui-
|
|
43
|
+
return (react_1.default.createElement("div", __assign({ className: (0, classnames_1.default)('iui-dialog-content', className) }, rest), children));
|
|
44
44
|
};
|
|
45
45
|
exports.ModalContent = ModalContent;
|
|
46
46
|
exports.default = exports.ModalContent;
|
|
@@ -30,11 +30,10 @@ exports.RadioTile = void 0;
|
|
|
30
30
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
31
31
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
32
32
|
*--------------------------------------------------------------------------------------------*/
|
|
33
|
-
var Checkmark_1 = __importDefault(require("@itwin/itwinui-icons-react/cjs/icons/Checkmark"));
|
|
34
33
|
var classnames_1 = __importDefault(require("classnames"));
|
|
35
34
|
var react_1 = __importDefault(require("react"));
|
|
36
35
|
var utils_1 = require("../utils");
|
|
37
|
-
require("@itwin/itwinui-css/css/
|
|
36
|
+
require("@itwin/itwinui-css/css/radio-tile.css");
|
|
38
37
|
/**
|
|
39
38
|
* RadioTile component to be used in RadioTileGroup component
|
|
40
39
|
* @example
|
|
@@ -50,15 +49,14 @@ exports.RadioTile = react_1.default.forwardRef(function (props, ref) {
|
|
|
50
49
|
inputElementRef.current.focus();
|
|
51
50
|
}
|
|
52
51
|
}, [setFocus]);
|
|
53
|
-
return (react_1.default.createElement("label", { className: className, style: style },
|
|
54
|
-
react_1.default.createElement("input", __assign({ type: 'radio', ref: refs }, rest)),
|
|
55
|
-
react_1.default.createElement("div", { className: 'iui-radio-tile' },
|
|
56
|
-
react_1.default.createElement(Checkmark_1.default, { className: 'iui-checkmark', "aria-hidden": true }),
|
|
52
|
+
return (react_1.default.createElement("label", { className: (0, classnames_1.default)('iui-radio-tile', className), style: style },
|
|
53
|
+
react_1.default.createElement("input", __assign({ className: 'iui-radio-tile-input', type: 'radio', ref: refs }, rest)),
|
|
54
|
+
react_1.default.createElement("div", { className: 'iui-radio-tile-content' },
|
|
57
55
|
icon &&
|
|
58
56
|
react_1.default.cloneElement(icon, {
|
|
59
|
-
className: (0, classnames_1.default)('iui-icon', icon.props.className),
|
|
57
|
+
className: (0, classnames_1.default)('iui-radio-tile-icon', icon.props.className),
|
|
60
58
|
}),
|
|
61
|
-
label && react_1.default.createElement("div", { className: 'iui-label' }, label),
|
|
62
|
-
description && react_1.default.createElement("div", { className: 'iui-
|
|
59
|
+
label && react_1.default.createElement("div", { className: 'iui-radio-tile-label' }, label),
|
|
60
|
+
description && (react_1.default.createElement("div", { className: 'iui-radio-tile-sublabel' }, description)))));
|
|
63
61
|
});
|
|
64
62
|
exports.default = exports.RadioTile;
|
package/cjs/core/Table/Table.js
CHANGED
|
@@ -186,7 +186,7 @@ var Table = function (props) {
|
|
|
186
186
|
}
|
|
187
187
|
return result;
|
|
188
188
|
}, {});
|
|
189
|
-
var areFiltersSet = allColumns.some(function (column) { return
|
|
189
|
+
var areFiltersSet = allColumns.some(function (column) { return column.filterValue != null && column.filterValue !== ''; });
|
|
190
190
|
var onRowClickHandler = react_1.default.useCallback(function (event, row) {
|
|
191
191
|
var isDisabled = isRowDisabled === null || isRowDisabled === void 0 ? void 0 : isRowDisabled(row.original);
|
|
192
192
|
if (!isDisabled) {
|
|
@@ -302,7 +302,7 @@ var Table = function (props) {
|
|
|
302
302
|
className: 'iui-row',
|
|
303
303
|
});
|
|
304
304
|
return (react_1.default.createElement("div", __assign({}, headerGroupProps, { key: headerGroupProps.key }), headerGroup.headers.map(function (column, index) {
|
|
305
|
-
var columnProps = column.getHeaderProps(__assign(__assign({}, column.getSortByToggleProps()), { className: (0, classnames_1.default)('iui-cell', { 'iui-actionable': column.canSort }, { 'iui-sorted': column.isSorted }, column.columnClassName), style: __assign({}, (0, utils_2.getCellStyle)(column, !!state.isTableResizing)) }));
|
|
305
|
+
var columnProps = column.getHeaderProps(__assign(__assign({}, column.getSortByToggleProps()), { className: (0, classnames_1.default)('iui-cell', { 'iui-actionable': column.canSort }, { 'iui-sorted': column.isSorted }, column.columnClassName), style: __assign(__assign({}, (0, utils_2.getCellStyle)(column, !!state.isTableResizing)), { flexWrap: 'unset' }) }));
|
|
306
306
|
return (react_1.default.createElement("div", __assign({}, columnProps, column.getDragAndDropProps(), { key: columnProps.key, title: undefined, ref: function (el) {
|
|
307
307
|
if (el && isResizable) {
|
|
308
308
|
columnRefs.current[column.id] = el;
|