@itwin/itwinui-react 3.15.0 → 3.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/DEV-cjs/core/Table/columns/expanderColumn.js +1 -0
- package/DEV-cjs/core/Tooltip/Tooltip.js +7 -4
- 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/Table/columns/expanderColumn.js +1 -0
- package/DEV-esm/core/Tooltip/Tooltip.js +7 -4
- 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/Table/columns/expanderColumn.js +1 -0
- package/cjs/core/Tooltip/Tooltip.js +7 -4
- 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/Table/columns/expanderColumn.js +1 -0
- package/esm/core/Tooltip/Tooltip.js +7 -4
- 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,10 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.15.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#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.
|
|
8
|
+
- [#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.
|
|
9
|
+
|
|
10
|
+
## 3.15.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#2263](https://github.com/iTwin/iTwinUI/pull/2263): Default `Tooltip` delay is now correctly applied.
|
|
15
|
+
- [#2266](https://github.com/iTwin/iTwinUI/pull/2266): All instances of `user-select: all` have been removed.
|
|
16
|
+
- Affected components: `Code`, `InformationPanel`, `Slider`, `Stepper`, `Tile`.
|
|
17
|
+
|
|
3
18
|
## 3.15.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
|
6
21
|
|
|
7
22
|
- [#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.
|
|
23
|
+
|
|
8
24
|
- This also affects other popover-like components (e.g. `Select`, `ComboBox`, `DropdownMenu`, `SplitButton`).
|
|
9
25
|
- 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.
|
|
10
26
|
|
|
@@ -111,10 +111,13 @@ const useTooltip = (options = {}) => {
|
|
|
111
111
|
});
|
|
112
112
|
let interactions = (0, _react1.useInteractions)([
|
|
113
113
|
(0, _react1.useHover)(floating.context, {
|
|
114
|
-
delay:
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
114
|
+
delay:
|
|
115
|
+
0 !== delay
|
|
116
|
+
? delay
|
|
117
|
+
: {
|
|
118
|
+
open: 50,
|
|
119
|
+
close: 250,
|
|
120
|
+
},
|
|
118
121
|
handleClose: (0, _react1.safePolygon)({
|
|
119
122
|
buffer: -1 / 0,
|
|
120
123
|
}),
|
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;
|
|
@@ -118,10 +118,13 @@ let useTooltip = (options = {}) => {
|
|
|
118
118
|
});
|
|
119
119
|
let interactions = useInteractions([
|
|
120
120
|
useHover(floating.context, {
|
|
121
|
-
delay:
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
delay:
|
|
122
|
+
0 !== delay
|
|
123
|
+
? delay
|
|
124
|
+
: {
|
|
125
|
+
open: 50,
|
|
126
|
+
close: 250,
|
|
127
|
+
},
|
|
125
128
|
handleClose: safePolygon({
|
|
126
129
|
buffer: -1 / 0,
|
|
127
130
|
}),
|
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 };
|
|
@@ -111,10 +111,13 @@ const useTooltip = (options = {}) => {
|
|
|
111
111
|
});
|
|
112
112
|
let interactions = (0, _react1.useInteractions)([
|
|
113
113
|
(0, _react1.useHover)(floating.context, {
|
|
114
|
-
delay:
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
114
|
+
delay:
|
|
115
|
+
0 !== delay
|
|
116
|
+
? delay
|
|
117
|
+
: {
|
|
118
|
+
open: 50,
|
|
119
|
+
close: 250,
|
|
120
|
+
},
|
|
118
121
|
handleClose: (0, _react1.safePolygon)({
|
|
119
122
|
buffer: -1 / 0,
|
|
120
123
|
}),
|
|
@@ -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;
|
|
@@ -118,10 +118,13 @@ let useTooltip = (options = {}) => {
|
|
|
118
118
|
});
|
|
119
119
|
let interactions = useInteractions([
|
|
120
120
|
useHover(floating.context, {
|
|
121
|
-
delay:
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
delay:
|
|
122
|
+
0 !== delay
|
|
123
|
+
? delay
|
|
124
|
+
: {
|
|
125
|
+
open: 50,
|
|
126
|
+
close: 250,
|
|
127
|
+
},
|
|
125
128
|
handleClose: safePolygon({
|
|
126
129
|
buffer: -1 / 0,
|
|
127
130
|
}),
|
|
@@ -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 };
|