@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 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
 
@@ -41,6 +41,7 @@ const ExpanderColumn = (props = {}) => {
41
41
  return _react.createElement(
42
42
  _IconButton.IconButton,
43
43
  {
44
+ 'aria-label': 'Toggle expandable content',
44
45
  className: 'iui-table-row-expander',
45
46
  styleType: 'borderless',
46
47
  size: 'small',
@@ -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: delay ?? {
115
- open: 50,
116
- close: 250,
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
  }),
@@ -402,6 +402,7 @@ const _index1 = require('../index.js');
402
402
  styleType: 'borderless',
403
403
  onClick: (e) => e.stopPropagation(),
404
404
  disabled: isRowDisabled(props.row.original),
405
+ label: 'Column manager',
405
406
  },
406
407
  _react.default.createElement('svg', null),
407
408
  ),
package/DEV-cjs/styles.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
- const e = '3.15.0';
3
+ const e = '3.15.2';
4
4
  const u = new Proxy(
5
5
  {},
6
6
  {
@@ -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;
@@ -21,6 +21,7 @@ export const ExpanderColumn = (props = {}) => {
21
21
  return React.createElement(
22
22
  IconButton,
23
23
  {
24
+ 'aria-label': 'Toggle expandable content',
24
25
  className: 'iui-table-row-expander',
25
26
  styleType: 'borderless',
26
27
  size: 'small',
@@ -118,10 +118,13 @@ let useTooltip = (options = {}) => {
118
118
  });
119
119
  let interactions = useInteractions([
120
120
  useHover(floating.context, {
121
- delay: delay ?? {
122
- open: 50,
123
- close: 250,
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
  }),
@@ -409,6 +409,7 @@ import {
409
409
  styleType: 'borderless',
410
410
  onClick: (e) => e.stopPropagation(),
411
411
  disabled: isRowDisabled(props.row.original),
412
+ label: 'Column manager',
412
413
  },
413
414
  React.createElement('svg', null),
414
415
  ),
package/DEV-esm/styles.js CHANGED
@@ -1,4 +1,4 @@
1
- const t = '3.15.0';
1
+ const t = '3.15.2';
2
2
  const u = new Proxy(
3
3
  {},
4
4
  {
@@ -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 };
@@ -41,6 +41,7 @@ const ExpanderColumn = (props = {}) => {
41
41
  return _react.createElement(
42
42
  _IconButton.IconButton,
43
43
  {
44
+ 'aria-label': 'Toggle expandable content',
44
45
  className: 'iui-table-row-expander',
45
46
  styleType: 'borderless',
46
47
  size: 'small',
@@ -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: delay ?? {
115
- open: 50,
116
- close: 250,
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
- export declare const actions: Record<string, string>;
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: string;
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>;
@@ -402,6 +402,7 @@ const _index1 = require('../index.js');
402
402
  styleType: 'borderless',
403
403
  onClick: (e) => e.stopPropagation(),
404
404
  disabled: isRowDisabled(props.row.original),
405
+ label: 'Column manager',
405
406
  },
406
407
  _react.default.createElement('svg', null),
407
408
  ),
package/cjs/styles.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
- const e = '3.15.0';
3
+ const e = '3.15.2';
4
4
  const u = new Proxy(
5
5
  {},
6
6
  {
@@ -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;
@@ -21,6 +21,7 @@ export const ExpanderColumn = (props = {}) => {
21
21
  return React.createElement(
22
22
  IconButton,
23
23
  {
24
+ 'aria-label': 'Toggle expandable content',
24
25
  className: 'iui-table-row-expander',
25
26
  styleType: 'borderless',
26
27
  size: 'small',
@@ -118,10 +118,13 @@ let useTooltip = (options = {}) => {
118
118
  });
119
119
  let interactions = useInteractions([
120
120
  useHover(floating.context, {
121
- delay: delay ?? {
122
- open: 50,
123
- close: 250,
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
- export declare const actions: Record<string, string>;
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: string;
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>;
@@ -409,6 +409,7 @@ import {
409
409
  styleType: 'borderless',
410
410
  onClick: (e) => e.stopPropagation(),
411
411
  disabled: isRowDisabled(props.row.original),
412
+ label: 'Column manager',
412
413
  },
413
414
  React.createElement('svg', null),
414
415
  ),
package/esm/styles.js CHANGED
@@ -1,4 +1,4 @@
1
- const t = '3.15.0';
1
+ const t = '3.15.2';
2
2
  const u = new Proxy(
3
3
  {},
4
4
  {
@@ -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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/itwinui-react",
3
- "version": "3.15.0",
3
+ "version": "3.15.2",
4
4
  "author": "Bentley Systems",
5
5
  "license": "MIT",
6
6
  "type": "module",