@itwin/itwinui-react 3.15.1 → 3.15.3
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 +17 -0
- package/DEV-cjs/core/ProgressIndicators/ProgressLinear.js +2 -1
- package/DEV-cjs/core/Table/columns/expanderColumn.js +1 -0
- package/DEV-cjs/core/TransferList/TransferList.js +18 -6
- package/DEV-cjs/react-table/react-table.types-test.js +1 -0
- package/DEV-cjs/styles.js +1 -1
- package/DEV-cjs/utils/functions/dev.js +3 -1
- package/DEV-esm/core/ProgressIndicators/ProgressLinear.js +2 -1
- package/DEV-esm/core/Table/columns/expanderColumn.js +1 -0
- package/DEV-esm/core/TransferList/TransferList.js +14 -2
- package/DEV-esm/react-table/react-table.types-test.js +1 -0
- package/DEV-esm/styles.js +1 -1
- package/DEV-esm/utils/functions/dev.js +3 -1
- package/cjs/core/ProgressIndicators/ProgressLinear.js +2 -1
- package/cjs/core/Table/columns/expanderColumn.js +1 -0
- package/cjs/core/TransferList/TransferList.d.ts +1 -1
- package/cjs/core/TransferList/TransferList.js +18 -6
- package/cjs/react-table/react-table.d.ts +5 -2
- package/cjs/react-table/react-table.types-test.js +1 -0
- package/cjs/styles.js +1 -1
- package/cjs/utils/functions/dev.js +3 -1
- package/esm/core/ProgressIndicators/ProgressLinear.js +2 -1
- package/esm/core/Table/columns/expanderColumn.js +1 -0
- package/esm/core/TransferList/TransferList.d.ts +1 -1
- package/esm/core/TransferList/TransferList.js +14 -2
- package/esm/react-table/react-table.d.ts +5 -2
- package/esm/react-table/react-table.types-test.js +1 -0
- package/esm/styles.js +1 -1
- package/esm/utils/functions/dev.js +3 -1
- package/package.json +1 -1
- package/styles.css +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.15.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2285](https://github.com/iTwin/iTwinUI/pull/2285): Fixed an issue in `ProgressLinear` where passing a `style` prop would cause it to lose its `value`.
|
|
8
|
+
- [#2281](https://github.com/iTwin/iTwinUI/pull/2281): Inputs (e.g. `Input`, `ComboBox`, etc.) with "small" size now have the same height as other field elements with "small" size (e.g. `Button`).
|
|
9
|
+
- [#2274](https://github.com/iTwin/iTwinUI/pull/2274): `IconButton`s inside `TransferList.Toolbar` will now show tooltips on the right side by default to avoid obscuring adjacent buttons in the group. This placement can be changed using the `labelProps.placement` prop on the `IconButton`.
|
|
10
|
+
- [#2274](https://github.com/iTwin/iTwinUI/pull/2274): `TransferList.Toolbar` implements the previously missing [toolbar pattern](https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/), including the arrow-key navigation functionality.
|
|
11
|
+
|
|
12
|
+
## 3.15.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#2275](https://github.com/iTwin/iTwinUI/pull/2275): Made the `ActionType.type` type in `Table` more specific. This will help when using the `action` argument in the `stateReducer` function, for example.
|
|
17
|
+
- [#2273](https://github.com/iTwin/iTwinUI/pull/2273): Fixed an issue where the internal unit test detection logic was incorrectly treating Cypress like a unit test environment.
|
|
18
|
+
|
|
3
19
|
## 3.15.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -13,6 +29,7 @@
|
|
|
13
29
|
### Minor Changes
|
|
14
30
|
|
|
15
31
|
- [#2233](https://github.com/iTwin/iTwinUI/pull/2233): `Popover` now enables the [`hide` middleware](https://floating-ui.com/docs/hide) to hide the floating content when the trigger is hidden.
|
|
32
|
+
|
|
16
33
|
- This also affects other popover-like components (e.g. `Select`, `ComboBox`, `DropdownMenu`, `SplitButton`).
|
|
17
34
|
- If the floating content gets hidden even when it shouldn't (e.g. due to some custom styles interfering with the trigger's hide detection), consider disabling the `hide` middleware.
|
|
18
35
|
|
|
@@ -37,10 +37,11 @@ const ProgressLinear = _react.forwardRef((props, forwardedRef) => {
|
|
|
37
37
|
'data-iui-status': status,
|
|
38
38
|
'data-iui-indeterminate': indeterminate ? 'true' : void 0,
|
|
39
39
|
'data-iui-animated': isAnimated ? 'true' : void 0,
|
|
40
|
+
...rest,
|
|
40
41
|
style: {
|
|
41
42
|
'--iui-progress-percentage': `${boundedValue}%`,
|
|
43
|
+
...props.style,
|
|
42
44
|
},
|
|
43
|
-
...rest,
|
|
44
45
|
},
|
|
45
46
|
_react.createElement(
|
|
46
47
|
_index.ShadowRoot,
|
|
@@ -25,6 +25,7 @@ const _index = require('../../utils/index.js');
|
|
|
25
25
|
const _List = require('../List/List.js');
|
|
26
26
|
const _ListItem = require('../List/ListItem.js');
|
|
27
27
|
const _Label = require('../Label/Label.js');
|
|
28
|
+
const _ButtonGroup = require('../ButtonGroup/ButtonGroup.js');
|
|
28
29
|
const TransferListComponent = _index.polymorphic.div(
|
|
29
30
|
'iui-transfer-list-wrapper',
|
|
30
31
|
);
|
|
@@ -174,12 +175,23 @@ const TransferListListboxLabel = _react.forwardRef((props, ref) => {
|
|
|
174
175
|
);
|
|
175
176
|
});
|
|
176
177
|
TransferListListboxLabel.displayName = 'TransferList.ListboxLabel';
|
|
177
|
-
const TransferListToolbar =
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
178
|
+
const TransferListToolbar = _react.forwardRef((props, ref) => {
|
|
179
|
+
let { className, children, ...rest } = props;
|
|
180
|
+
return _react.createElement(
|
|
181
|
+
_ButtonGroup.ButtonGroup,
|
|
182
|
+
{
|
|
183
|
+
role: 'toolbar',
|
|
184
|
+
ref: ref,
|
|
185
|
+
...rest,
|
|
186
|
+
orientation: 'vertical',
|
|
187
|
+
className: (0, _classnames.default)(
|
|
188
|
+
'iui-transfer-list-toolbar',
|
|
189
|
+
className,
|
|
190
|
+
),
|
|
191
|
+
},
|
|
192
|
+
children,
|
|
193
|
+
);
|
|
194
|
+
});
|
|
183
195
|
TransferListToolbar.displayName = 'TransferList.Toolbar';
|
|
184
196
|
const TransferList = Object.assign(TransferListComponent, {
|
|
185
197
|
ListboxWrapper: TransferListListboxWrapper,
|
package/DEV-cjs/styles.js
CHANGED
|
@@ -9,9 +9,11 @@ Object.defineProperty(exports, 'isUnitTest', {
|
|
|
9
9
|
},
|
|
10
10
|
});
|
|
11
11
|
const isJest = 'undefined' != typeof jest;
|
|
12
|
+
const isCypress = void 0 !== globalThis.Cypress;
|
|
12
13
|
const isMocha =
|
|
13
14
|
void 0 !== globalThis.beforeEach &&
|
|
14
15
|
'function(name,fn){suites[0].beforeEach(name,fn);}' ===
|
|
15
|
-
`${globalThis.beforeEach}`.replace(/\s/g, '')
|
|
16
|
+
`${globalThis.beforeEach}`.replace(/\s/g, '') &&
|
|
17
|
+
!isCypress;
|
|
16
18
|
const isVitest = void 0 !== globalThis.__vitest_index__;
|
|
17
19
|
const isUnitTest = isJest || isVitest || isMocha;
|
|
@@ -22,10 +22,11 @@ export const ProgressLinear = React.forwardRef((props, forwardedRef) => {
|
|
|
22
22
|
'data-iui-status': status,
|
|
23
23
|
'data-iui-indeterminate': indeterminate ? 'true' : void 0,
|
|
24
24
|
'data-iui-animated': isAnimated ? 'true' : void 0,
|
|
25
|
+
...rest,
|
|
25
26
|
style: {
|
|
26
27
|
'--iui-progress-percentage': `${boundedValue}%`,
|
|
28
|
+
...props.style,
|
|
27
29
|
},
|
|
28
|
-
...rest,
|
|
29
30
|
},
|
|
30
31
|
React.createElement(
|
|
31
32
|
ShadowRoot,
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
import { List } from '../List/List.js';
|
|
12
12
|
import { ListItem } from '../List/ListItem.js';
|
|
13
13
|
import { Label } from '../Label/Label.js';
|
|
14
|
+
import { ButtonGroup } from '../ButtonGroup/ButtonGroup.js';
|
|
14
15
|
let TransferListComponent = polymorphic.div('iui-transfer-list-wrapper');
|
|
15
16
|
TransferListComponent.displayName = 'TransferList';
|
|
16
17
|
let TransferListListboxWrapper = React.forwardRef((props, ref) => {
|
|
@@ -152,8 +153,19 @@ let TransferListListboxLabel = React.forwardRef((props, ref) => {
|
|
|
152
153
|
);
|
|
153
154
|
});
|
|
154
155
|
TransferListListboxLabel.displayName = 'TransferList.ListboxLabel';
|
|
155
|
-
let TransferListToolbar =
|
|
156
|
-
|
|
156
|
+
let TransferListToolbar = React.forwardRef((props, ref) => {
|
|
157
|
+
let { className, children, ...rest } = props;
|
|
158
|
+
return React.createElement(
|
|
159
|
+
ButtonGroup,
|
|
160
|
+
{
|
|
161
|
+
role: 'toolbar',
|
|
162
|
+
ref: ref,
|
|
163
|
+
...rest,
|
|
164
|
+
orientation: 'vertical',
|
|
165
|
+
className: cx('iui-transfer-list-toolbar', className),
|
|
166
|
+
},
|
|
167
|
+
children,
|
|
168
|
+
);
|
|
157
169
|
});
|
|
158
170
|
TransferListToolbar.displayName = 'TransferList.Toolbar';
|
|
159
171
|
export const TransferList = Object.assign(TransferListComponent, {
|
package/DEV-esm/styles.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
let isJest = 'undefined' != typeof jest;
|
|
2
|
+
let isCypress = void 0 !== globalThis.Cypress;
|
|
2
3
|
let isMocha =
|
|
3
4
|
void 0 !== globalThis.beforeEach &&
|
|
4
5
|
'function(name,fn){suites[0].beforeEach(name,fn);}' ===
|
|
5
|
-
`${globalThis.beforeEach}`.replace(/\s/g, '')
|
|
6
|
+
`${globalThis.beforeEach}`.replace(/\s/g, '') &&
|
|
7
|
+
!isCypress;
|
|
6
8
|
let isVitest = void 0 !== globalThis.__vitest_index__;
|
|
7
9
|
let isUnitTest = isJest || isVitest || isMocha;
|
|
8
10
|
export { isUnitTest };
|
|
@@ -37,10 +37,11 @@ const ProgressLinear = _react.forwardRef((props, forwardedRef) => {
|
|
|
37
37
|
'data-iui-status': status,
|
|
38
38
|
'data-iui-indeterminate': indeterminate ? 'true' : void 0,
|
|
39
39
|
'data-iui-animated': isAnimated ? 'true' : void 0,
|
|
40
|
+
...rest,
|
|
40
41
|
style: {
|
|
41
42
|
'--iui-progress-percentage': `${boundedValue}%`,
|
|
43
|
+
...props.style,
|
|
42
44
|
},
|
|
43
|
-
...rest,
|
|
44
45
|
},
|
|
45
46
|
_react.createElement(
|
|
46
47
|
_index.ShadowRoot,
|
|
@@ -54,7 +54,7 @@ export declare const TransferList: PolymorphicForwardRefComponent<"div", {}> & {
|
|
|
54
54
|
/**
|
|
55
55
|
* TransferList toolbar subcomponent
|
|
56
56
|
*/
|
|
57
|
-
Toolbar: PolymorphicForwardRefComponent<"div",
|
|
57
|
+
Toolbar: PolymorphicForwardRefComponent<"div", object>;
|
|
58
58
|
};
|
|
59
59
|
export declare const TransferListContext: React.Context<{
|
|
60
60
|
/**
|
|
@@ -25,6 +25,7 @@ const _index = require('../../utils/index.js');
|
|
|
25
25
|
const _List = require('../List/List.js');
|
|
26
26
|
const _ListItem = require('../List/ListItem.js');
|
|
27
27
|
const _Label = require('../Label/Label.js');
|
|
28
|
+
const _ButtonGroup = require('../ButtonGroup/ButtonGroup.js');
|
|
28
29
|
const TransferListComponent = _index.polymorphic.div(
|
|
29
30
|
'iui-transfer-list-wrapper',
|
|
30
31
|
);
|
|
@@ -169,12 +170,23 @@ const TransferListListboxLabel = _react.forwardRef((props, ref) => {
|
|
|
169
170
|
children,
|
|
170
171
|
);
|
|
171
172
|
});
|
|
172
|
-
const TransferListToolbar =
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
173
|
+
const TransferListToolbar = _react.forwardRef((props, ref) => {
|
|
174
|
+
let { className, children, ...rest } = props;
|
|
175
|
+
return _react.createElement(
|
|
176
|
+
_ButtonGroup.ButtonGroup,
|
|
177
|
+
{
|
|
178
|
+
role: 'toolbar',
|
|
179
|
+
ref: ref,
|
|
180
|
+
...rest,
|
|
181
|
+
orientation: 'vertical',
|
|
182
|
+
className: (0, _classnames.default)(
|
|
183
|
+
'iui-transfer-list-toolbar',
|
|
184
|
+
className,
|
|
185
|
+
),
|
|
186
|
+
},
|
|
187
|
+
children,
|
|
188
|
+
);
|
|
189
|
+
});
|
|
178
190
|
const TransferList = Object.assign(TransferListComponent, {
|
|
179
191
|
ListboxWrapper: TransferListListboxWrapper,
|
|
180
192
|
Listbox: TransferListListbox,
|
|
@@ -721,9 +721,12 @@ export interface SortingRule<D> {
|
|
|
721
721
|
id: IdType<D>;
|
|
722
722
|
desc?: boolean | undefined;
|
|
723
723
|
}
|
|
724
|
-
|
|
724
|
+
type BuiltInAction = 'init' | 'resetHiddenColumns' | 'toggleHideColumn' | 'setHiddenColumns' | 'toggleHideAllColumns' | 'resetPivot' | 'togglePivot' | 'resetColumnOrder' | 'setColumnOrder' | 'resetExpanded' | 'toggleRowExpanded' | 'toggleAllRowsExpanded' | 'resetFilters' | 'setFilter' | 'setAllFilters' | 'resetGlobalFilter' | 'setGlobalFilter' | 'columnStartResizing' | 'columnResizing' | 'columnDoneResizing' | 'resetResize' | 'resetGroupBy' | 'setGroupBy' | 'toggleGroupBy' | 'resetPage' | 'gotoPage' | 'setPageSize' | 'resetSelectedRows' | 'toggleAllRowsSelected' | 'toggleRowSelected' | 'toggleAllPageRowsSelected' | 'setRowState' | 'setCellState' | 'resetRowState' | 'resetSortBy' | 'setSortBy' | 'toggleSortBy' | 'clearSortBy';
|
|
725
|
+
type CustomAction = 'setScrolledLeft' | 'setScrolledRight' | 'columnDragStart' | 'columnDragEnd' | 'singleRowSelected' | 'shiftRowSelected' | 'tableResizeStart' | 'tableResizeEnd';
|
|
726
|
+
type PossibleActionType = BuiltInAction | CustomAction | AnyString;
|
|
727
|
+
export declare const actions: Record<PossibleActionType, string>;
|
|
725
728
|
export type ActionType = {
|
|
726
|
-
type:
|
|
729
|
+
type: PossibleActionType;
|
|
727
730
|
} & Record<string, any>;
|
|
728
731
|
export declare const defaultColumn: Partial<Column> & Record<string, any>;
|
|
729
732
|
export type StringKey<D> = Extract<keyof D, string>;
|
package/cjs/styles.js
CHANGED
|
@@ -9,9 +9,11 @@ Object.defineProperty(exports, 'isUnitTest', {
|
|
|
9
9
|
},
|
|
10
10
|
});
|
|
11
11
|
const isJest = 'undefined' != typeof jest;
|
|
12
|
+
const isCypress = void 0 !== globalThis.Cypress;
|
|
12
13
|
const isMocha =
|
|
13
14
|
void 0 !== globalThis.beforeEach &&
|
|
14
15
|
'function(name,fn){suites[0].beforeEach(name,fn);}' ===
|
|
15
|
-
`${globalThis.beforeEach}`.replace(/\s/g, '')
|
|
16
|
+
`${globalThis.beforeEach}`.replace(/\s/g, '') &&
|
|
17
|
+
!isCypress;
|
|
16
18
|
const isVitest = void 0 !== globalThis.__vitest_index__;
|
|
17
19
|
const isUnitTest = isJest || isVitest || isMocha;
|
|
@@ -22,10 +22,11 @@ export const ProgressLinear = React.forwardRef((props, forwardedRef) => {
|
|
|
22
22
|
'data-iui-status': status,
|
|
23
23
|
'data-iui-indeterminate': indeterminate ? 'true' : void 0,
|
|
24
24
|
'data-iui-animated': isAnimated ? 'true' : void 0,
|
|
25
|
+
...rest,
|
|
25
26
|
style: {
|
|
26
27
|
'--iui-progress-percentage': `${boundedValue}%`,
|
|
28
|
+
...props.style,
|
|
27
29
|
},
|
|
28
|
-
...rest,
|
|
29
30
|
},
|
|
30
31
|
React.createElement(
|
|
31
32
|
ShadowRoot,
|
|
@@ -54,7 +54,7 @@ export declare const TransferList: PolymorphicForwardRefComponent<"div", {}> & {
|
|
|
54
54
|
/**
|
|
55
55
|
* TransferList toolbar subcomponent
|
|
56
56
|
*/
|
|
57
|
-
Toolbar: PolymorphicForwardRefComponent<"div",
|
|
57
|
+
Toolbar: PolymorphicForwardRefComponent<"div", object>;
|
|
58
58
|
};
|
|
59
59
|
export declare const TransferListContext: React.Context<{
|
|
60
60
|
/**
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
import { List } from '../List/List.js';
|
|
12
12
|
import { ListItem } from '../List/ListItem.js';
|
|
13
13
|
import { Label } from '../Label/Label.js';
|
|
14
|
+
import { ButtonGroup } from '../ButtonGroup/ButtonGroup.js';
|
|
14
15
|
let TransferListComponent = polymorphic.div('iui-transfer-list-wrapper');
|
|
15
16
|
let TransferListListboxWrapper = React.forwardRef((props, ref) => {
|
|
16
17
|
let { className, children, ...rest } = props;
|
|
@@ -147,8 +148,19 @@ let TransferListListboxLabel = React.forwardRef((props, ref) => {
|
|
|
147
148
|
children,
|
|
148
149
|
);
|
|
149
150
|
});
|
|
150
|
-
let TransferListToolbar =
|
|
151
|
-
|
|
151
|
+
let TransferListToolbar = React.forwardRef((props, ref) => {
|
|
152
|
+
let { className, children, ...rest } = props;
|
|
153
|
+
return React.createElement(
|
|
154
|
+
ButtonGroup,
|
|
155
|
+
{
|
|
156
|
+
role: 'toolbar',
|
|
157
|
+
ref: ref,
|
|
158
|
+
...rest,
|
|
159
|
+
orientation: 'vertical',
|
|
160
|
+
className: cx('iui-transfer-list-toolbar', className),
|
|
161
|
+
},
|
|
162
|
+
children,
|
|
163
|
+
);
|
|
152
164
|
});
|
|
153
165
|
export const TransferList = Object.assign(TransferListComponent, {
|
|
154
166
|
ListboxWrapper: TransferListListboxWrapper,
|
|
@@ -721,9 +721,12 @@ export interface SortingRule<D> {
|
|
|
721
721
|
id: IdType<D>;
|
|
722
722
|
desc?: boolean | undefined;
|
|
723
723
|
}
|
|
724
|
-
|
|
724
|
+
type BuiltInAction = 'init' | 'resetHiddenColumns' | 'toggleHideColumn' | 'setHiddenColumns' | 'toggleHideAllColumns' | 'resetPivot' | 'togglePivot' | 'resetColumnOrder' | 'setColumnOrder' | 'resetExpanded' | 'toggleRowExpanded' | 'toggleAllRowsExpanded' | 'resetFilters' | 'setFilter' | 'setAllFilters' | 'resetGlobalFilter' | 'setGlobalFilter' | 'columnStartResizing' | 'columnResizing' | 'columnDoneResizing' | 'resetResize' | 'resetGroupBy' | 'setGroupBy' | 'toggleGroupBy' | 'resetPage' | 'gotoPage' | 'setPageSize' | 'resetSelectedRows' | 'toggleAllRowsSelected' | 'toggleRowSelected' | 'toggleAllPageRowsSelected' | 'setRowState' | 'setCellState' | 'resetRowState' | 'resetSortBy' | 'setSortBy' | 'toggleSortBy' | 'clearSortBy';
|
|
725
|
+
type CustomAction = 'setScrolledLeft' | 'setScrolledRight' | 'columnDragStart' | 'columnDragEnd' | 'singleRowSelected' | 'shiftRowSelected' | 'tableResizeStart' | 'tableResizeEnd';
|
|
726
|
+
type PossibleActionType = BuiltInAction | CustomAction | AnyString;
|
|
727
|
+
export declare const actions: Record<PossibleActionType, string>;
|
|
725
728
|
export type ActionType = {
|
|
726
|
-
type:
|
|
729
|
+
type: PossibleActionType;
|
|
727
730
|
} & Record<string, any>;
|
|
728
731
|
export declare const defaultColumn: Partial<Column> & Record<string, any>;
|
|
729
732
|
export type StringKey<D> = Extract<keyof D, string>;
|
package/esm/styles.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
let isJest = 'undefined' != typeof jest;
|
|
2
|
+
let isCypress = void 0 !== globalThis.Cypress;
|
|
2
3
|
let isMocha =
|
|
3
4
|
void 0 !== globalThis.beforeEach &&
|
|
4
5
|
'function(name,fn){suites[0].beforeEach(name,fn);}' ===
|
|
5
|
-
`${globalThis.beforeEach}`.replace(/\s/g, '')
|
|
6
|
+
`${globalThis.beforeEach}`.replace(/\s/g, '') &&
|
|
7
|
+
!isCypress;
|
|
6
8
|
let isVitest = void 0 !== globalThis.__vitest_index__;
|
|
7
9
|
let isUnitTest = isJest || isVitest || isMocha;
|
|
8
10
|
export { isUnitTest };
|