@itwin/itwinui-react 3.0.0-dev.5 → 3.0.0-dev.6
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 +53 -1
- package/cjs/core/Buttons/DropdownButton/DropdownButton.d.ts +1 -1
- package/cjs/core/Dialog/DialogContent.d.ts +2 -1
- package/cjs/core/Dialog/DialogContent.js +25 -1
- package/cjs/core/Dialog/DialogMain.js +0 -1
- package/cjs/core/Header/HeaderButton.d.ts +4 -0
- package/cjs/core/Header/HeaderButton.js +2 -0
- package/cjs/core/Input/Input.d.ts +5 -0
- package/cjs/core/Input/Input.js +2 -1
- package/cjs/core/Radio/Radio.d.ts +8 -0
- package/cjs/core/Radio/Radio.js +22 -9
- package/cjs/core/RadioTiles/RadioTile.d.ts +16 -0
- package/cjs/core/RadioTiles/RadioTile.js +61 -27
- package/cjs/core/Table/Table.d.ts +16 -0
- package/cjs/core/Table/Table.js +50 -8
- package/cjs/core/utils/components/Resizer.js +21 -13
- package/cjs/styles.js +3 -4
- package/esm/core/Buttons/DropdownButton/DropdownButton.d.ts +1 -1
- package/esm/core/Dialog/DialogContent.d.ts +2 -1
- package/esm/core/Dialog/DialogContent.js +25 -2
- package/esm/core/Dialog/DialogMain.js +0 -1
- package/esm/core/Header/HeaderButton.d.ts +4 -0
- package/esm/core/Header/HeaderButton.js +2 -0
- package/esm/core/Input/Input.d.ts +5 -0
- package/esm/core/Input/Input.js +2 -1
- package/esm/core/Radio/Radio.d.ts +8 -0
- package/esm/core/Radio/Radio.js +19 -6
- package/esm/core/RadioTiles/RadioTile.d.ts +16 -0
- package/esm/core/RadioTiles/RadioTile.js +52 -22
- package/esm/core/Table/Table.d.ts +16 -0
- package/esm/core/Table/Table.js +47 -8
- package/esm/core/utils/components/Resizer.js +21 -13
- package/esm/core/utils/functions/import.js +2 -1
- package/esm/styles.js +3 -4
- package/package.json +2 -2
- package/styles.css +719 -1562
package/cjs/styles.js
CHANGED
|
@@ -108,6 +108,7 @@ const styles = {
|
|
|
108
108
|
'iui-calendar-day-range-today': '_iui3-calendar-day-range-today',
|
|
109
109
|
'iui-dialog-wrapper': '_iui3-dialog-wrapper',
|
|
110
110
|
'iui-dialog': '_iui3-dialog',
|
|
111
|
+
'iui-dialog-content': '_iui3-dialog-content',
|
|
111
112
|
'iui-dialog-visible': '_iui3-dialog-visible',
|
|
112
113
|
'iui-dialog-default': '_iui3-dialog-default',
|
|
113
114
|
'iui-dialog-full-page': '_iui3-dialog-full-page',
|
|
@@ -117,7 +118,6 @@ const styles = {
|
|
|
117
118
|
'iui-dialog-title': '_iui3-dialog-title',
|
|
118
119
|
'iui-dialog-title-bar': '_iui3-dialog-title-bar',
|
|
119
120
|
'iui-dialog-title-bar-filled': '_iui3-dialog-title-bar-filled',
|
|
120
|
-
'iui-dialog-content': '_iui3-dialog-content',
|
|
121
121
|
'iui-dialog-button-bar': '_iui3-dialog-button-bar',
|
|
122
122
|
'iui-expandable-block': '_iui3-expandable-block',
|
|
123
123
|
'iui-expandable-header': '_iui3-expandable-header',
|
|
@@ -243,13 +243,12 @@ const styles = {
|
|
|
243
243
|
'iui-overlay-exiting': '_iui3-overlay-exiting',
|
|
244
244
|
closeAnimation,
|
|
245
245
|
'iui-progress-indicator-radial': '_iui3-progress-indicator-radial',
|
|
246
|
-
'iui-
|
|
246
|
+
'iui-ux8sxma': '_iui3-ux8sxma',
|
|
247
247
|
'iui-progress-indicator-linear-label':
|
|
248
248
|
'_iui3-progress-indicator-linear-label',
|
|
249
|
-
'iui-
|
|
249
|
+
'iui-ux8sxmt': '_iui3-ux8sxmt',
|
|
250
250
|
'iui-radio': '_iui3-radio',
|
|
251
251
|
'iui-radio-tile': '_iui3-radio-tile',
|
|
252
|
-
'iui-radio-tile-content': '_iui3-radio-tile-content',
|
|
253
252
|
'iui-radio-tile-icon': '_iui3-radio-tile-icon',
|
|
254
253
|
'iui-radio-tile-container': '_iui3-radio-tile-container',
|
|
255
254
|
'iui-radio-tile-input': '_iui3-radio-tile-input',
|
|
@@ -14,7 +14,7 @@ export type DropdownButtonProps = {
|
|
|
14
14
|
* Use 'borderless' to hide outline.
|
|
15
15
|
* @default 'default'
|
|
16
16
|
*/
|
|
17
|
-
styleType?: 'default' | 'borderless';
|
|
17
|
+
styleType?: 'default' | 'borderless' | 'high-visibility';
|
|
18
18
|
/**
|
|
19
19
|
* Props for the `DropdownMenu` which extends `PopoverProps`.
|
|
20
20
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
1
2
|
/**
|
|
2
3
|
* Container for content in `Dialog`. Recommended to be used as a child of `Dialog`.
|
|
3
4
|
* @example
|
|
@@ -5,5 +6,5 @@
|
|
|
5
6
|
* My dialog content
|
|
6
7
|
* </Dialog.Content>
|
|
7
8
|
*/
|
|
8
|
-
export declare const DialogContent:
|
|
9
|
+
export declare const DialogContent: PolymorphicForwardRefComponent<"div", {}>;
|
|
9
10
|
export default DialogContent;
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import cx from 'classnames';
|
|
7
|
+
import { supportsHas, useMergedRefs, Box } from '../utils/index.js';
|
|
6
8
|
/**
|
|
7
9
|
* Container for content in `Dialog`. Recommended to be used as a child of `Dialog`.
|
|
8
10
|
* @example
|
|
@@ -10,5 +12,26 @@ import { polymorphic } from '../utils/index.js';
|
|
|
10
12
|
* My dialog content
|
|
11
13
|
* </Dialog.Content>
|
|
12
14
|
*/
|
|
13
|
-
export const DialogContent =
|
|
15
|
+
export const DialogContent = React.forwardRef((props, ref) => {
|
|
16
|
+
const { children, className, ...rest } = props;
|
|
17
|
+
const contentRef = React.useRef(null);
|
|
18
|
+
React.useEffect(() => {
|
|
19
|
+
// firefox hack for adding data-iui-flex in absence of :has
|
|
20
|
+
if (!supportsHas()) {
|
|
21
|
+
const dialog = contentRef.current?.closest('[role=dialog]');
|
|
22
|
+
if (dialog instanceof HTMLElement) {
|
|
23
|
+
dialog.dataset.iuiFlex = 'true';
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}, []);
|
|
27
|
+
return React.createElement(
|
|
28
|
+
Box,
|
|
29
|
+
{
|
|
30
|
+
className: cx('iui-dialog-content', className),
|
|
31
|
+
ref: useMergedRefs(contentRef, ref),
|
|
32
|
+
...rest,
|
|
33
|
+
},
|
|
34
|
+
children,
|
|
35
|
+
);
|
|
36
|
+
});
|
|
14
37
|
export default DialogContent;
|
|
@@ -16,6 +16,10 @@ type HeaderButtonProps = {
|
|
|
16
16
|
* @default false
|
|
17
17
|
*/
|
|
18
18
|
isActive?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Modify the native `name` attribute of the `<button>` element.
|
|
21
|
+
*/
|
|
22
|
+
htmlName?: string;
|
|
19
23
|
} & Partial<Pick<DropdownButtonProps, 'menuItems'>> & Pick<ButtonProps, 'startIcon' | 'endIcon'>;
|
|
20
24
|
/**
|
|
21
25
|
* Header button that handles slim state of the `Header` it's in.
|
|
@@ -21,6 +21,7 @@ export const HeaderButton = React.forwardRef((props, ref) => {
|
|
|
21
21
|
const {
|
|
22
22
|
name,
|
|
23
23
|
description,
|
|
24
|
+
htmlName,
|
|
24
25
|
isActive = false,
|
|
25
26
|
startIcon,
|
|
26
27
|
menuItems,
|
|
@@ -59,6 +60,7 @@ export const HeaderButton = React.forwardRef((props, ref) => {
|
|
|
59
60
|
),
|
|
60
61
|
ref: ref,
|
|
61
62
|
disabled: disabled,
|
|
63
|
+
name: htmlName,
|
|
62
64
|
...(!!menuItems && { menuItems }),
|
|
63
65
|
...rest,
|
|
64
66
|
}; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
@@ -4,6 +4,11 @@ export type InputProps = {
|
|
|
4
4
|
* Modify size of the input.
|
|
5
5
|
*/
|
|
6
6
|
size?: 'small' | 'large';
|
|
7
|
+
/**
|
|
8
|
+
* Modify the native `size` attribute of the `<input>` element.
|
|
9
|
+
* The `width` or `inline-size` property must be unset in order to use this prop.
|
|
10
|
+
*/
|
|
11
|
+
htmlSize?: number;
|
|
7
12
|
};
|
|
8
13
|
/**
|
|
9
14
|
* Basic input component
|
package/esm/core/Input/Input.js
CHANGED
|
@@ -13,13 +13,14 @@ import { useMergedRefs, Box } from '../utils/index.js';
|
|
|
13
13
|
* <Input size='small' />
|
|
14
14
|
*/
|
|
15
15
|
export const Input = React.forwardRef((props, ref) => {
|
|
16
|
-
const { size, className, ...rest } = props;
|
|
16
|
+
const { size, htmlSize, className, ...rest } = props;
|
|
17
17
|
const inputRef = React.useRef(null);
|
|
18
18
|
const refs = useMergedRefs(inputRef, ref);
|
|
19
19
|
return React.createElement(Box, {
|
|
20
20
|
as: 'input',
|
|
21
21
|
className: cx('iui-input', className),
|
|
22
22
|
'data-iui-size': size,
|
|
23
|
+
size: htmlSize,
|
|
23
24
|
ref: refs,
|
|
24
25
|
...rest,
|
|
25
26
|
});
|
|
@@ -9,6 +9,14 @@ type RadioProps = {
|
|
|
9
9
|
* Status of the radio.
|
|
10
10
|
*/
|
|
11
11
|
status?: 'positive' | 'warning' | 'negative';
|
|
12
|
+
/**
|
|
13
|
+
* Passes props to Radio label.
|
|
14
|
+
*/
|
|
15
|
+
labelProps?: React.ComponentProps<'span'>;
|
|
16
|
+
/**
|
|
17
|
+
* Passes props to Radio wrapper.
|
|
18
|
+
*/
|
|
19
|
+
wrapperProps?: React.ComponentProps<'label'>;
|
|
12
20
|
};
|
|
13
21
|
/**
|
|
14
22
|
* Basic radio input component
|
package/esm/core/Radio/Radio.js
CHANGED
|
@@ -16,13 +16,22 @@ import { useMergedRefs, Box } from '../utils/index.js';
|
|
|
16
16
|
* <Radio status='negative' label='Negative' />
|
|
17
17
|
*/
|
|
18
18
|
export const Radio = React.forwardRef((props, ref) => {
|
|
19
|
-
const {
|
|
19
|
+
const {
|
|
20
|
+
className,
|
|
21
|
+
disabled = false,
|
|
22
|
+
label,
|
|
23
|
+
status,
|
|
24
|
+
labelProps,
|
|
25
|
+
wrapperProps,
|
|
26
|
+
style,
|
|
27
|
+
...rest
|
|
28
|
+
} = props;
|
|
20
29
|
const inputElementRef = React.useRef(null);
|
|
21
30
|
const refs = useMergedRefs(inputElementRef, ref);
|
|
22
31
|
const radio = React.createElement(Box, {
|
|
23
32
|
as: 'input',
|
|
24
|
-
className: cx('iui-radio', className
|
|
25
|
-
style:
|
|
33
|
+
className: cx('iui-radio', className),
|
|
34
|
+
style: style,
|
|
26
35
|
disabled: disabled,
|
|
27
36
|
type: 'radio',
|
|
28
37
|
ref: refs,
|
|
@@ -34,18 +43,22 @@ export const Radio = React.forwardRef((props, ref) => {
|
|
|
34
43
|
Box,
|
|
35
44
|
{
|
|
36
45
|
as: 'label',
|
|
46
|
+
...wrapperProps,
|
|
37
47
|
className: cx(
|
|
38
48
|
'iui-radio-wrapper',
|
|
39
49
|
{ 'iui-disabled': disabled, [`iui-${status}`]: !!status },
|
|
40
|
-
className,
|
|
50
|
+
wrapperProps?.className,
|
|
41
51
|
),
|
|
42
|
-
style: style,
|
|
43
52
|
},
|
|
44
53
|
radio,
|
|
45
54
|
label &&
|
|
46
55
|
React.createElement(
|
|
47
56
|
Box,
|
|
48
|
-
{
|
|
57
|
+
{
|
|
58
|
+
as: 'span',
|
|
59
|
+
...labelProps,
|
|
60
|
+
className: cx('iui-radio-label', labelProps?.className),
|
|
61
|
+
},
|
|
49
62
|
label,
|
|
50
63
|
),
|
|
51
64
|
);
|
|
@@ -13,6 +13,22 @@ type RadioTileProps = {
|
|
|
13
13
|
* Additional description, if needed.
|
|
14
14
|
*/
|
|
15
15
|
description?: React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Passes props to tile wrapper.
|
|
18
|
+
*/
|
|
19
|
+
wrapperProps?: React.ComponentProps<'label'>;
|
|
20
|
+
/**
|
|
21
|
+
* Passes props to tile icon.
|
|
22
|
+
*/
|
|
23
|
+
iconProps?: React.ComponentProps<'span'>;
|
|
24
|
+
/**
|
|
25
|
+
* Passes props to tile label.
|
|
26
|
+
*/
|
|
27
|
+
labelProps?: React.ComponentProps<'div'>;
|
|
28
|
+
/**
|
|
29
|
+
* Passes props to tile sublabel.
|
|
30
|
+
*/
|
|
31
|
+
subLabelProps?: React.ComponentProps<'div'>;
|
|
16
32
|
};
|
|
17
33
|
/**
|
|
18
34
|
* RadioTile component to be used in RadioTileGroup component
|
|
@@ -11,37 +11,67 @@ import { useMergedRefs, Box } from '../utils/index.js';
|
|
|
11
11
|
* <RadioTile label='My tile' description='Some info' icon={<SvgSmileyHappy />} />
|
|
12
12
|
*/
|
|
13
13
|
export const RadioTile = React.forwardRef((props, ref) => {
|
|
14
|
-
const {
|
|
14
|
+
const {
|
|
15
|
+
icon,
|
|
16
|
+
label,
|
|
17
|
+
description,
|
|
18
|
+
className,
|
|
19
|
+
wrapperProps,
|
|
20
|
+
iconProps,
|
|
21
|
+
labelProps,
|
|
22
|
+
subLabelProps,
|
|
23
|
+
style,
|
|
24
|
+
...rest
|
|
25
|
+
} = props;
|
|
15
26
|
const inputElementRef = React.useRef(null);
|
|
16
27
|
const refs = useMergedRefs(inputElementRef, ref);
|
|
17
28
|
return React.createElement(
|
|
18
29
|
Box,
|
|
19
|
-
{
|
|
30
|
+
{
|
|
31
|
+
as: 'label',
|
|
32
|
+
'data-iui-disabled': props.disabled ? 'true' : undefined,
|
|
33
|
+
...wrapperProps,
|
|
34
|
+
className: cx('iui-radio-tile', wrapperProps?.className),
|
|
35
|
+
},
|
|
20
36
|
React.createElement(Box, {
|
|
21
37
|
as: 'input',
|
|
22
|
-
className: 'iui-radio-tile-input',
|
|
23
|
-
type: 'radio',
|
|
24
38
|
ref: refs,
|
|
39
|
+
className: cx('iui-radio-tile-input', className),
|
|
40
|
+
style: style,
|
|
41
|
+
type: 'radio',
|
|
25
42
|
...rest,
|
|
26
43
|
}),
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
icon,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
icon &&
|
|
45
|
+
React.createElement(
|
|
46
|
+
Box,
|
|
47
|
+
{
|
|
48
|
+
as: 'span',
|
|
49
|
+
'aria-hidden': true,
|
|
50
|
+
...iconProps,
|
|
51
|
+
className: cx('iui-radio-tile-icon', iconProps?.className),
|
|
52
|
+
},
|
|
53
|
+
icon,
|
|
54
|
+
),
|
|
55
|
+
label &&
|
|
56
|
+
React.createElement(
|
|
57
|
+
Box,
|
|
58
|
+
{
|
|
59
|
+
as: 'div',
|
|
60
|
+
...labelProps,
|
|
61
|
+
className: cx('iui-radio-tile-label', labelProps?.className),
|
|
62
|
+
},
|
|
63
|
+
label,
|
|
64
|
+
),
|
|
65
|
+
description &&
|
|
66
|
+
React.createElement(
|
|
67
|
+
Box,
|
|
68
|
+
{
|
|
69
|
+
as: 'div',
|
|
70
|
+
...subLabelProps,
|
|
71
|
+
className: cx('iui-radio-tile-sublabel', subLabelProps?.className),
|
|
72
|
+
},
|
|
73
|
+
description,
|
|
74
|
+
),
|
|
45
75
|
);
|
|
46
76
|
});
|
|
47
77
|
export default RadioTile;
|
|
@@ -190,6 +190,22 @@ export type TableProps<T extends Record<string, unknown> = Record<string, unknow
|
|
|
190
190
|
* @default false
|
|
191
191
|
*/
|
|
192
192
|
enableColumnReordering?: boolean;
|
|
193
|
+
/**
|
|
194
|
+
* Passes props to Table header wrapper.
|
|
195
|
+
*/
|
|
196
|
+
headerWrapperProps?: React.ComponentProps<'div'>;
|
|
197
|
+
/**
|
|
198
|
+
* Passes props to Table header.
|
|
199
|
+
*/
|
|
200
|
+
headerProps?: React.ComponentProps<'div'>;
|
|
201
|
+
/**
|
|
202
|
+
* Passes custom props to Table body.
|
|
203
|
+
*/
|
|
204
|
+
bodyProps?: React.ComponentProps<'div'>;
|
|
205
|
+
/**
|
|
206
|
+
* Passes custom props to empty table.
|
|
207
|
+
*/
|
|
208
|
+
emptyTableContentProps?: React.ComponentProps<'div'>;
|
|
193
209
|
/**
|
|
194
210
|
* Function that returns index of the row that you want to scroll to.
|
|
195
211
|
*
|
package/esm/core/Table/Table.js
CHANGED
|
@@ -146,6 +146,10 @@ export const Table = (props) => {
|
|
|
146
146
|
styleType = 'default',
|
|
147
147
|
enableVirtualization = false,
|
|
148
148
|
enableColumnReordering = false,
|
|
149
|
+
headerWrapperProps,
|
|
150
|
+
headerProps,
|
|
151
|
+
bodyProps,
|
|
152
|
+
emptyTableContentProps,
|
|
149
153
|
...rest
|
|
150
154
|
} = props;
|
|
151
155
|
useGlobals();
|
|
@@ -596,7 +600,7 @@ export const Table = (props) => {
|
|
|
596
600
|
return React.createElement(
|
|
597
601
|
Box,
|
|
598
602
|
{
|
|
599
|
-
|
|
603
|
+
as: 'div',
|
|
600
604
|
ref: headerRef,
|
|
601
605
|
onScroll: () => {
|
|
602
606
|
if (headerRef.current && bodyRef.current) {
|
|
@@ -605,10 +609,19 @@ export const Table = (props) => {
|
|
|
605
609
|
}
|
|
606
610
|
},
|
|
607
611
|
key: headerGroupProps.key,
|
|
612
|
+
...headerWrapperProps,
|
|
613
|
+
className: cx(
|
|
614
|
+
'iui-table-header-wrapper',
|
|
615
|
+
headerWrapperProps?.className,
|
|
616
|
+
),
|
|
608
617
|
},
|
|
609
618
|
React.createElement(
|
|
610
619
|
Box,
|
|
611
|
-
{
|
|
620
|
+
{
|
|
621
|
+
as: 'div',
|
|
622
|
+
...headerProps,
|
|
623
|
+
className: cx('iui-table-header', headerProps?.className),
|
|
624
|
+
},
|
|
612
625
|
React.createElement(
|
|
613
626
|
Box,
|
|
614
627
|
{ ...headerGroupProps },
|
|
@@ -723,10 +736,15 @@ export const Table = (props) => {
|
|
|
723
736
|
React.createElement(
|
|
724
737
|
Box,
|
|
725
738
|
{
|
|
739
|
+
...bodyProps,
|
|
726
740
|
...getTableBodyProps({
|
|
727
|
-
className: cx(
|
|
728
|
-
'iui-
|
|
729
|
-
|
|
741
|
+
className: cx(
|
|
742
|
+
'iui-table-body',
|
|
743
|
+
{
|
|
744
|
+
'iui-zebra-striping': styleType === 'zebra-rows',
|
|
745
|
+
},
|
|
746
|
+
bodyProps?.className,
|
|
747
|
+
),
|
|
730
748
|
style: { outline: 0 },
|
|
731
749
|
}),
|
|
732
750
|
ref: bodyRef,
|
|
@@ -756,7 +774,14 @@ export const Table = (props) => {
|
|
|
756
774
|
data.length === 0 &&
|
|
757
775
|
React.createElement(
|
|
758
776
|
Box,
|
|
759
|
-
{
|
|
777
|
+
{
|
|
778
|
+
as: 'div',
|
|
779
|
+
...emptyTableContentProps,
|
|
780
|
+
className: cx(
|
|
781
|
+
'iui-table-empty',
|
|
782
|
+
emptyTableContentProps?.className,
|
|
783
|
+
),
|
|
784
|
+
},
|
|
760
785
|
React.createElement(ProgressRadial, { indeterminate: true }),
|
|
761
786
|
),
|
|
762
787
|
isLoading &&
|
|
@@ -782,7 +807,14 @@ export const Table = (props) => {
|
|
|
782
807
|
!areFiltersSet &&
|
|
783
808
|
React.createElement(
|
|
784
809
|
Box,
|
|
785
|
-
{
|
|
810
|
+
{
|
|
811
|
+
as: 'div',
|
|
812
|
+
...emptyTableContentProps,
|
|
813
|
+
className: cx(
|
|
814
|
+
'iui-table-empty',
|
|
815
|
+
emptyTableContentProps?.className,
|
|
816
|
+
),
|
|
817
|
+
},
|
|
786
818
|
React.createElement('div', null, emptyTableContent),
|
|
787
819
|
),
|
|
788
820
|
!isLoading &&
|
|
@@ -790,7 +822,14 @@ export const Table = (props) => {
|
|
|
790
822
|
areFiltersSet &&
|
|
791
823
|
React.createElement(
|
|
792
824
|
Box,
|
|
793
|
-
{
|
|
825
|
+
{
|
|
826
|
+
as: 'div',
|
|
827
|
+
...emptyTableContentProps,
|
|
828
|
+
className: cx(
|
|
829
|
+
'iui-table-empty',
|
|
830
|
+
emptyTableContentProps?.className,
|
|
831
|
+
),
|
|
832
|
+
},
|
|
794
833
|
React.createElement('div', null, emptyFilteredTableContent),
|
|
795
834
|
),
|
|
796
835
|
),
|
|
@@ -34,7 +34,10 @@ export const Resizer = (props) => {
|
|
|
34
34
|
let height = `${initialHeight}px`;
|
|
35
35
|
let translateX = initialTranslateX;
|
|
36
36
|
let translateY = initialTranslateY;
|
|
37
|
-
|
|
37
|
+
let minWidth = parseFloat(getComputedStyle(elementRef.current).minWidth);
|
|
38
|
+
if (Number.isNaN(minWidth)) {
|
|
39
|
+
minWidth = 380;
|
|
40
|
+
}
|
|
38
41
|
const minHeight = parseFloat(
|
|
39
42
|
getComputedStyle(elementRef.current).minHeight,
|
|
40
43
|
);
|
|
@@ -102,6 +105,8 @@ export const Resizer = (props) => {
|
|
|
102
105
|
}
|
|
103
106
|
case 'right': {
|
|
104
107
|
width = elementRef.current.style.width = `${initialWidth - diffX}px`;
|
|
108
|
+
height = elementRef.current.style.height = `${initialHeight}px`;
|
|
109
|
+
elementRef.current.style.transform = `translate(${translateX}px, ${translateY}px)`;
|
|
105
110
|
break;
|
|
106
111
|
}
|
|
107
112
|
case 'bottom-right': {
|
|
@@ -109,12 +114,14 @@ export const Resizer = (props) => {
|
|
|
109
114
|
height = elementRef.current.style.height = `${
|
|
110
115
|
initialHeight - diffY
|
|
111
116
|
}px`;
|
|
117
|
+
elementRef.current.style.transform = `translate(${translateX}px, ${translateY}px)`;
|
|
112
118
|
break;
|
|
113
119
|
}
|
|
114
120
|
case 'bottom': {
|
|
115
121
|
height = elementRef.current.style.height = `${
|
|
116
122
|
initialHeight - diffY
|
|
117
123
|
}px`;
|
|
124
|
+
elementRef.current.style.transform = `translate(${translateX}px, ${translateY}px)`;
|
|
118
125
|
break;
|
|
119
126
|
}
|
|
120
127
|
case 'bottom-left': {
|
|
@@ -135,6 +142,7 @@ export const Resizer = (props) => {
|
|
|
135
142
|
break;
|
|
136
143
|
}
|
|
137
144
|
width = elementRef.current.style.width = `${newWidth}px`;
|
|
145
|
+
height = elementRef.current.style.height = `${initialHeight}px`;
|
|
138
146
|
translateX = initialTranslateX - diffX;
|
|
139
147
|
elementRef.current.style.transform = `translate(${translateX}px, ${translateY}px)`;
|
|
140
148
|
break;
|
|
@@ -169,8 +177,8 @@ export const Resizer = (props) => {
|
|
|
169
177
|
onPointerDown: onResizePointerDown,
|
|
170
178
|
style: {
|
|
171
179
|
position: 'absolute',
|
|
172
|
-
top:
|
|
173
|
-
left:
|
|
180
|
+
top: 0,
|
|
181
|
+
left: 0,
|
|
174
182
|
width: 12,
|
|
175
183
|
height: 12,
|
|
176
184
|
cursor: 'nw-resize',
|
|
@@ -181,7 +189,7 @@ export const Resizer = (props) => {
|
|
|
181
189
|
onPointerDown: onResizePointerDown,
|
|
182
190
|
style: {
|
|
183
191
|
position: 'absolute',
|
|
184
|
-
top:
|
|
192
|
+
top: 0,
|
|
185
193
|
left: 8,
|
|
186
194
|
right: 8,
|
|
187
195
|
height: 8,
|
|
@@ -193,8 +201,8 @@ export const Resizer = (props) => {
|
|
|
193
201
|
onPointerDown: onResizePointerDown,
|
|
194
202
|
style: {
|
|
195
203
|
position: 'absolute',
|
|
196
|
-
top:
|
|
197
|
-
right:
|
|
204
|
+
top: 0,
|
|
205
|
+
right: 0,
|
|
198
206
|
width: 12,
|
|
199
207
|
height: 12,
|
|
200
208
|
cursor: 'ne-resize',
|
|
@@ -206,7 +214,7 @@ export const Resizer = (props) => {
|
|
|
206
214
|
style: {
|
|
207
215
|
position: 'absolute',
|
|
208
216
|
top: 8,
|
|
209
|
-
right:
|
|
217
|
+
right: 0,
|
|
210
218
|
bottom: 8,
|
|
211
219
|
width: 8,
|
|
212
220
|
cursor: 'e-resize',
|
|
@@ -217,8 +225,8 @@ export const Resizer = (props) => {
|
|
|
217
225
|
onPointerDown: onResizePointerDown,
|
|
218
226
|
style: {
|
|
219
227
|
position: 'absolute',
|
|
220
|
-
bottom:
|
|
221
|
-
right:
|
|
228
|
+
bottom: 0,
|
|
229
|
+
right: 0,
|
|
222
230
|
width: 12,
|
|
223
231
|
height: 12,
|
|
224
232
|
cursor: 'se-resize',
|
|
@@ -229,7 +237,7 @@ export const Resizer = (props) => {
|
|
|
229
237
|
onPointerDown: onResizePointerDown,
|
|
230
238
|
style: {
|
|
231
239
|
position: 'absolute',
|
|
232
|
-
bottom:
|
|
240
|
+
bottom: 0,
|
|
233
241
|
left: 8,
|
|
234
242
|
right: 8,
|
|
235
243
|
height: 8,
|
|
@@ -241,8 +249,8 @@ export const Resizer = (props) => {
|
|
|
241
249
|
onPointerDown: onResizePointerDown,
|
|
242
250
|
style: {
|
|
243
251
|
position: 'absolute',
|
|
244
|
-
bottom:
|
|
245
|
-
left:
|
|
252
|
+
bottom: 0,
|
|
253
|
+
left: 0,
|
|
246
254
|
width: 12,
|
|
247
255
|
height: 12,
|
|
248
256
|
cursor: 'sw-resize',
|
|
@@ -254,7 +262,7 @@ export const Resizer = (props) => {
|
|
|
254
262
|
style: {
|
|
255
263
|
position: 'absolute',
|
|
256
264
|
top: 8,
|
|
257
|
-
left:
|
|
265
|
+
left: 0,
|
|
258
266
|
bottom: 8,
|
|
259
267
|
width: 8,
|
|
260
268
|
cursor: 'w-resize',
|
package/esm/styles.js
CHANGED
|
@@ -107,6 +107,7 @@ const styles = {
|
|
|
107
107
|
'iui-calendar-day-range-today': '_iui3-calendar-day-range-today',
|
|
108
108
|
'iui-dialog-wrapper': '_iui3-dialog-wrapper',
|
|
109
109
|
'iui-dialog': '_iui3-dialog',
|
|
110
|
+
'iui-dialog-content': '_iui3-dialog-content',
|
|
110
111
|
'iui-dialog-visible': '_iui3-dialog-visible',
|
|
111
112
|
'iui-dialog-default': '_iui3-dialog-default',
|
|
112
113
|
'iui-dialog-full-page': '_iui3-dialog-full-page',
|
|
@@ -116,7 +117,6 @@ const styles = {
|
|
|
116
117
|
'iui-dialog-title': '_iui3-dialog-title',
|
|
117
118
|
'iui-dialog-title-bar': '_iui3-dialog-title-bar',
|
|
118
119
|
'iui-dialog-title-bar-filled': '_iui3-dialog-title-bar-filled',
|
|
119
|
-
'iui-dialog-content': '_iui3-dialog-content',
|
|
120
120
|
'iui-dialog-button-bar': '_iui3-dialog-button-bar',
|
|
121
121
|
'iui-expandable-block': '_iui3-expandable-block',
|
|
122
122
|
'iui-expandable-header': '_iui3-expandable-header',
|
|
@@ -242,13 +242,12 @@ const styles = {
|
|
|
242
242
|
'iui-overlay-exiting': '_iui3-overlay-exiting',
|
|
243
243
|
closeAnimation,
|
|
244
244
|
'iui-progress-indicator-radial': '_iui3-progress-indicator-radial',
|
|
245
|
-
'iui-
|
|
245
|
+
'iui-ux8sxma': '_iui3-ux8sxma',
|
|
246
246
|
'iui-progress-indicator-linear-label':
|
|
247
247
|
'_iui3-progress-indicator-linear-label',
|
|
248
|
-
'iui-
|
|
248
|
+
'iui-ux8sxmt': '_iui3-ux8sxmt',
|
|
249
249
|
'iui-radio': '_iui3-radio',
|
|
250
250
|
'iui-radio-tile': '_iui3-radio-tile',
|
|
251
|
-
'iui-radio-tile-content': '_iui3-radio-tile-content',
|
|
252
251
|
'iui-radio-tile-icon': '_iui3-radio-tile-icon',
|
|
253
252
|
'iui-radio-tile-container': '_iui3-radio-tile-container',
|
|
254
253
|
'iui-radio-tile-input': '_iui3-radio-tile-input',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/itwinui-react",
|
|
3
|
-
"version": "3.0.0-dev.
|
|
3
|
+
"version": "3.0.0-dev.6",
|
|
4
4
|
"author": "Bentley Systems",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"tslib": "^2.6.0"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"@itwin/itwinui-css": "^2.0.0-dev.
|
|
86
|
+
"@itwin/itwinui-css": "^2.0.0-dev.6",
|
|
87
87
|
"@itwin/itwinui-illustrations-react": "^2.1.0",
|
|
88
88
|
"@itwin/itwinui-variables": "3.0.0-dev.1",
|
|
89
89
|
"@swc/cli": "^0.1.62",
|