@itwin/itwinui-react 3.17.3 → 3.17.4
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 +8 -0
- package/DEV-cjs/core/ComboBox/ComboBox.js +17 -21
- package/DEV-cjs/core/ComboBox/ComboBoxMenu.js +6 -2
- package/DEV-cjs/core/Tabs/Tabs.js +7 -2
- package/DEV-cjs/core/Tree/Tree.js +25 -17
- package/DEV-cjs/styles.js +1 -1
- package/DEV-esm/core/ComboBox/ComboBox.js +17 -21
- package/DEV-esm/core/ComboBox/ComboBoxMenu.js +6 -2
- package/DEV-esm/core/Tabs/Tabs.js +5 -2
- package/DEV-esm/core/Tree/Tree.js +25 -17
- package/DEV-esm/styles.js +1 -1
- package/cjs/core/ComboBox/ComboBox.js +17 -21
- package/cjs/core/ComboBox/ComboBoxMenu.js +6 -2
- package/cjs/core/Tabs/Tabs.js +7 -2
- package/cjs/core/Tree/Tree.js +25 -17
- package/cjs/styles.js +1 -1
- package/esm/core/ComboBox/ComboBox.js +17 -21
- package/esm/core/ComboBox/ComboBoxMenu.js +6 -2
- package/esm/core/Tabs/Tabs.js +5 -2
- package/esm/core/Tree/Tree.js +25 -17
- package/esm/styles.js +1 -1
- package/package.json +2 -2
- package/styles.css +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.17.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2473](https://github.com/iTwin/iTwinUI/pull/2473): Fixed scrolling on touch devices when using the `enableVirtualization` prop in `Tree` and `ComboBox`.
|
|
8
|
+
- [#2466](https://github.com/iTwin/iTwinUI/pull/2466): Fix `Tab`'s stripe positioning when `Tabs.TabList` overflows.
|
|
9
|
+
- [#2469](https://github.com/iTwin/iTwinUI/pull/2469): Fixed `Tabs` bug where orientation related styles of nested tabs were sometimes incorrect.
|
|
10
|
+
|
|
3
11
|
## 3.17.3
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -371,27 +371,23 @@ const ComboBox = _react.forwardRef((props, forwardedRef) => {
|
|
|
371
371
|
disabled: inputProps?.disabled,
|
|
372
372
|
...rest,
|
|
373
373
|
},
|
|
374
|
-
_react.createElement(
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
.filter(Boolean)
|
|
392
|
-
: void 0,
|
|
393
|
-
}),
|
|
394
|
-
),
|
|
374
|
+
_react.createElement(_ComboBoxInput.ComboBoxInput, {
|
|
375
|
+
value: inputValue,
|
|
376
|
+
disabled: inputProps?.disabled,
|
|
377
|
+
...inputProps,
|
|
378
|
+
onChange: handleOnInput,
|
|
379
|
+
selectTags: isMultipleEnabled(selectedIndexes, multiple)
|
|
380
|
+
? selectedIndexes
|
|
381
|
+
?.map((index) => {
|
|
382
|
+
let item = options[index];
|
|
383
|
+
return _react.createElement(_SelectTag.SelectTag, {
|
|
384
|
+
key: item.label,
|
|
385
|
+
label: item.label,
|
|
386
|
+
});
|
|
387
|
+
})
|
|
388
|
+
.filter(Boolean)
|
|
389
|
+
: void 0,
|
|
390
|
+
}),
|
|
395
391
|
_react.createElement(_ComboBoxEndIcon.ComboBoxEndIcon, {
|
|
396
392
|
...endIconProps,
|
|
397
393
|
disabled: inputProps?.disabled,
|
|
@@ -65,8 +65,12 @@ const VirtualizedComboBoxMenu = (props) => {
|
|
|
65
65
|
[filteredOptions, getMenuItem, children, virtualizer.measureElement],
|
|
66
66
|
);
|
|
67
67
|
return _react.createElement(
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
'div',
|
|
69
|
+
{
|
|
70
|
+
style: {
|
|
71
|
+
display: 'contents',
|
|
72
|
+
},
|
|
73
|
+
},
|
|
70
74
|
_react.createElement(
|
|
71
75
|
_index.ShadowRoot,
|
|
72
76
|
{
|
|
@@ -84,7 +84,9 @@ const TabsWrapper = _react.forwardRef((props, ref) => {
|
|
|
84
84
|
TabsWrapper.displayName = 'Tabs.Wrapper';
|
|
85
85
|
const TabList = _react.forwardRef((props, ref) => {
|
|
86
86
|
let { className, children, ...rest } = props;
|
|
87
|
-
let { type, hasSublabel, color } = (0, _index.useSafeContext)(
|
|
87
|
+
let { type, hasSublabel, color, orientation } = (0, _index.useSafeContext)(
|
|
88
|
+
TabsContext,
|
|
89
|
+
);
|
|
88
90
|
let isClient = (0, _index.useIsClient)();
|
|
89
91
|
let tablistRef = _react.useRef(null);
|
|
90
92
|
let [tablistSizeRef, tabsWidth] = (0, _index.useContainerWidth)(
|
|
@@ -110,6 +112,7 @@ const TabList = _react.forwardRef((props, ref) => {
|
|
|
110
112
|
},
|
|
111
113
|
className,
|
|
112
114
|
),
|
|
115
|
+
'data-iui-orientation': orientation,
|
|
113
116
|
role: 'tablist',
|
|
114
117
|
ref: refs,
|
|
115
118
|
...rest,
|
|
@@ -156,10 +159,12 @@ const Tab = _react.forwardRef((props, forwardedRef) => {
|
|
|
156
159
|
let updateStripe = () => {
|
|
157
160
|
let currentTabRect = tabRef.current?.getBoundingClientRect();
|
|
158
161
|
let tabslistRect = tablistRef.current?.getBoundingClientRect();
|
|
162
|
+
let currentTabLeftIncludingScroll =
|
|
163
|
+
(currentTabRect?.x ?? 0) + (tablistRef.current?.scrollLeft ?? 0);
|
|
159
164
|
let tabsStripePosition =
|
|
160
165
|
null != currentTabRect && null != tabslistRect
|
|
161
166
|
? {
|
|
162
|
-
horizontal:
|
|
167
|
+
horizontal: currentTabLeftIncludingScroll - tabslistRect.x,
|
|
163
168
|
vertical: currentTabRect.y - tabslistRect.y,
|
|
164
169
|
}
|
|
165
170
|
: {
|
|
@@ -217,29 +217,37 @@ const VirtualizedTree = _react.forwardRef(
|
|
|
217
217
|
ref: (0, _index.useMergedRefs)(ref, parentRef),
|
|
218
218
|
},
|
|
219
219
|
_react.createElement(
|
|
220
|
-
|
|
220
|
+
'div',
|
|
221
221
|
{
|
|
222
|
-
|
|
222
|
+
style: {
|
|
223
|
+
display: 'contents',
|
|
224
|
+
},
|
|
223
225
|
},
|
|
224
226
|
_react.createElement(
|
|
225
|
-
|
|
227
|
+
_index.ShadowRoot,
|
|
226
228
|
{
|
|
227
|
-
|
|
228
|
-
style: {
|
|
229
|
-
minBlockSize: virtualizer.getTotalSize(),
|
|
230
|
-
},
|
|
229
|
+
css: virtualizerCss,
|
|
231
230
|
},
|
|
232
|
-
_react.createElement(
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
itemRenderer(virtualItem.index, virtualItem, virtualizer),
|
|
231
|
+
_react.createElement(
|
|
232
|
+
'div',
|
|
233
|
+
{
|
|
234
|
+
'data-iui-virtualizer': 'root',
|
|
235
|
+
style: {
|
|
236
|
+
minBlockSize: virtualizer.getTotalSize(),
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
_react.createElement('slot', null),
|
|
242
240
|
),
|
|
241
|
+
),
|
|
242
|
+
_react.createElement(
|
|
243
|
+
_react.Fragment,
|
|
244
|
+
null,
|
|
245
|
+
virtualizer
|
|
246
|
+
.getVirtualItems()
|
|
247
|
+
.map((virtualItem) =>
|
|
248
|
+
itemRenderer(virtualItem.index, virtualItem, virtualizer),
|
|
249
|
+
),
|
|
250
|
+
),
|
|
243
251
|
),
|
|
244
252
|
);
|
|
245
253
|
},
|
package/DEV-cjs/styles.js
CHANGED
|
@@ -367,27 +367,23 @@ export const ComboBox = React.forwardRef((props, forwardedRef) => {
|
|
|
367
367
|
disabled: inputProps?.disabled,
|
|
368
368
|
...rest,
|
|
369
369
|
},
|
|
370
|
-
React.createElement(
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
.filter(Boolean)
|
|
388
|
-
: void 0,
|
|
389
|
-
}),
|
|
390
|
-
),
|
|
370
|
+
React.createElement(ComboBoxInput, {
|
|
371
|
+
value: inputValue,
|
|
372
|
+
disabled: inputProps?.disabled,
|
|
373
|
+
...inputProps,
|
|
374
|
+
onChange: handleOnInput,
|
|
375
|
+
selectTags: isMultipleEnabled(selectedIndexes, multiple)
|
|
376
|
+
? selectedIndexes
|
|
377
|
+
?.map((index) => {
|
|
378
|
+
let item = options[index];
|
|
379
|
+
return React.createElement(SelectTag, {
|
|
380
|
+
key: item.label,
|
|
381
|
+
label: item.label,
|
|
382
|
+
});
|
|
383
|
+
})
|
|
384
|
+
.filter(Boolean)
|
|
385
|
+
: void 0,
|
|
386
|
+
}),
|
|
391
387
|
React.createElement(ComboBoxEndIcon, {
|
|
392
388
|
...endIconProps,
|
|
393
389
|
disabled: inputProps?.disabled,
|
|
@@ -59,8 +59,12 @@ let VirtualizedComboBoxMenu = (props) => {
|
|
|
59
59
|
[filteredOptions, getMenuItem, children, virtualizer.measureElement],
|
|
60
60
|
);
|
|
61
61
|
return React.createElement(
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
'div',
|
|
63
|
+
{
|
|
64
|
+
style: {
|
|
65
|
+
display: 'contents',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
64
68
|
React.createElement(
|
|
65
69
|
ShadowRoot,
|
|
66
70
|
{
|
|
@@ -70,7 +70,7 @@ let TabsWrapper = React.forwardRef((props, ref) => {
|
|
|
70
70
|
TabsWrapper.displayName = 'Tabs.Wrapper';
|
|
71
71
|
let TabList = React.forwardRef((props, ref) => {
|
|
72
72
|
let { className, children, ...rest } = props;
|
|
73
|
-
let { type, hasSublabel, color } = useSafeContext(TabsContext);
|
|
73
|
+
let { type, hasSublabel, color, orientation } = useSafeContext(TabsContext);
|
|
74
74
|
let isClient = useIsClient();
|
|
75
75
|
let tablistRef = React.useRef(null);
|
|
76
76
|
let [tablistSizeRef, tabsWidth] = useContainerWidth('default' !== type);
|
|
@@ -94,6 +94,7 @@ let TabList = React.forwardRef((props, ref) => {
|
|
|
94
94
|
},
|
|
95
95
|
className,
|
|
96
96
|
),
|
|
97
|
+
'data-iui-orientation': orientation,
|
|
97
98
|
role: 'tablist',
|
|
98
99
|
ref: refs,
|
|
99
100
|
...rest,
|
|
@@ -140,10 +141,12 @@ let Tab = React.forwardRef((props, forwardedRef) => {
|
|
|
140
141
|
let updateStripe = () => {
|
|
141
142
|
let currentTabRect = tabRef.current?.getBoundingClientRect();
|
|
142
143
|
let tabslistRect = tablistRef.current?.getBoundingClientRect();
|
|
144
|
+
let currentTabLeftIncludingScroll =
|
|
145
|
+
(currentTabRect?.x ?? 0) + (tablistRef.current?.scrollLeft ?? 0);
|
|
143
146
|
let tabsStripePosition =
|
|
144
147
|
null != currentTabRect && null != tabslistRect
|
|
145
148
|
? {
|
|
146
|
-
horizontal:
|
|
149
|
+
horizontal: currentTabLeftIncludingScroll - tabslistRect.x,
|
|
147
150
|
vertical: currentTabRect.y - tabslistRect.y,
|
|
148
151
|
}
|
|
149
152
|
: {
|
|
@@ -211,29 +211,37 @@ let VirtualizedTree = React.forwardRef(
|
|
|
211
211
|
ref: useMergedRefs(ref, parentRef),
|
|
212
212
|
},
|
|
213
213
|
React.createElement(
|
|
214
|
-
|
|
214
|
+
'div',
|
|
215
215
|
{
|
|
216
|
-
|
|
216
|
+
style: {
|
|
217
|
+
display: 'contents',
|
|
218
|
+
},
|
|
217
219
|
},
|
|
218
220
|
React.createElement(
|
|
219
|
-
|
|
221
|
+
ShadowRoot,
|
|
220
222
|
{
|
|
221
|
-
|
|
222
|
-
style: {
|
|
223
|
-
minBlockSize: virtualizer.getTotalSize(),
|
|
224
|
-
},
|
|
223
|
+
css: virtualizerCss,
|
|
225
224
|
},
|
|
226
|
-
React.createElement(
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
itemRenderer(virtualItem.index, virtualItem, virtualizer),
|
|
225
|
+
React.createElement(
|
|
226
|
+
'div',
|
|
227
|
+
{
|
|
228
|
+
'data-iui-virtualizer': 'root',
|
|
229
|
+
style: {
|
|
230
|
+
minBlockSize: virtualizer.getTotalSize(),
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
React.createElement('slot', null),
|
|
236
234
|
),
|
|
235
|
+
),
|
|
236
|
+
React.createElement(
|
|
237
|
+
React.Fragment,
|
|
238
|
+
null,
|
|
239
|
+
virtualizer
|
|
240
|
+
.getVirtualItems()
|
|
241
|
+
.map((virtualItem) =>
|
|
242
|
+
itemRenderer(virtualItem.index, virtualItem, virtualizer),
|
|
243
|
+
),
|
|
244
|
+
),
|
|
237
245
|
),
|
|
238
246
|
);
|
|
239
247
|
},
|
package/DEV-esm/styles.js
CHANGED
|
@@ -371,27 +371,23 @@ const ComboBox = _react.forwardRef((props, forwardedRef) => {
|
|
|
371
371
|
disabled: inputProps?.disabled,
|
|
372
372
|
...rest,
|
|
373
373
|
},
|
|
374
|
-
_react.createElement(
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
.filter(Boolean)
|
|
392
|
-
: void 0,
|
|
393
|
-
}),
|
|
394
|
-
),
|
|
374
|
+
_react.createElement(_ComboBoxInput.ComboBoxInput, {
|
|
375
|
+
value: inputValue,
|
|
376
|
+
disabled: inputProps?.disabled,
|
|
377
|
+
...inputProps,
|
|
378
|
+
onChange: handleOnInput,
|
|
379
|
+
selectTags: isMultipleEnabled(selectedIndexes, multiple)
|
|
380
|
+
? selectedIndexes
|
|
381
|
+
?.map((index) => {
|
|
382
|
+
let item = options[index];
|
|
383
|
+
return _react.createElement(_SelectTag.SelectTag, {
|
|
384
|
+
key: item.label,
|
|
385
|
+
label: item.label,
|
|
386
|
+
});
|
|
387
|
+
})
|
|
388
|
+
.filter(Boolean)
|
|
389
|
+
: void 0,
|
|
390
|
+
}),
|
|
395
391
|
_react.createElement(_ComboBoxEndIcon.ComboBoxEndIcon, {
|
|
396
392
|
...endIconProps,
|
|
397
393
|
disabled: inputProps?.disabled,
|
|
@@ -65,8 +65,12 @@ const VirtualizedComboBoxMenu = (props) => {
|
|
|
65
65
|
[filteredOptions, getMenuItem, children, virtualizer.measureElement],
|
|
66
66
|
);
|
|
67
67
|
return _react.createElement(
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
'div',
|
|
69
|
+
{
|
|
70
|
+
style: {
|
|
71
|
+
display: 'contents',
|
|
72
|
+
},
|
|
73
|
+
},
|
|
70
74
|
_react.createElement(
|
|
71
75
|
_index.ShadowRoot,
|
|
72
76
|
{
|
package/cjs/core/Tabs/Tabs.js
CHANGED
|
@@ -83,7 +83,9 @@ const TabsWrapper = _react.forwardRef((props, ref) => {
|
|
|
83
83
|
});
|
|
84
84
|
const TabList = _react.forwardRef((props, ref) => {
|
|
85
85
|
let { className, children, ...rest } = props;
|
|
86
|
-
let { type, hasSublabel, color } = (0, _index.useSafeContext)(
|
|
86
|
+
let { type, hasSublabel, color, orientation } = (0, _index.useSafeContext)(
|
|
87
|
+
TabsContext,
|
|
88
|
+
);
|
|
87
89
|
let isClient = (0, _index.useIsClient)();
|
|
88
90
|
let tablistRef = _react.useRef(null);
|
|
89
91
|
let [tablistSizeRef, tabsWidth] = (0, _index.useContainerWidth)(
|
|
@@ -109,6 +111,7 @@ const TabList = _react.forwardRef((props, ref) => {
|
|
|
109
111
|
},
|
|
110
112
|
className,
|
|
111
113
|
),
|
|
114
|
+
'data-iui-orientation': orientation,
|
|
112
115
|
role: 'tablist',
|
|
113
116
|
ref: refs,
|
|
114
117
|
...rest,
|
|
@@ -154,10 +157,12 @@ const Tab = _react.forwardRef((props, forwardedRef) => {
|
|
|
154
157
|
let updateStripe = () => {
|
|
155
158
|
let currentTabRect = tabRef.current?.getBoundingClientRect();
|
|
156
159
|
let tabslistRect = tablistRef.current?.getBoundingClientRect();
|
|
160
|
+
let currentTabLeftIncludingScroll =
|
|
161
|
+
(currentTabRect?.x ?? 0) + (tablistRef.current?.scrollLeft ?? 0);
|
|
157
162
|
let tabsStripePosition =
|
|
158
163
|
null != currentTabRect && null != tabslistRect
|
|
159
164
|
? {
|
|
160
|
-
horizontal:
|
|
165
|
+
horizontal: currentTabLeftIncludingScroll - tabslistRect.x,
|
|
161
166
|
vertical: currentTabRect.y - tabslistRect.y,
|
|
162
167
|
}
|
|
163
168
|
: {
|
package/cjs/core/Tree/Tree.js
CHANGED
|
@@ -216,29 +216,37 @@ const VirtualizedTree = _react.forwardRef(
|
|
|
216
216
|
ref: (0, _index.useMergedRefs)(ref, parentRef),
|
|
217
217
|
},
|
|
218
218
|
_react.createElement(
|
|
219
|
-
|
|
219
|
+
'div',
|
|
220
220
|
{
|
|
221
|
-
|
|
221
|
+
style: {
|
|
222
|
+
display: 'contents',
|
|
223
|
+
},
|
|
222
224
|
},
|
|
223
225
|
_react.createElement(
|
|
224
|
-
|
|
226
|
+
_index.ShadowRoot,
|
|
225
227
|
{
|
|
226
|
-
|
|
227
|
-
style: {
|
|
228
|
-
minBlockSize: virtualizer.getTotalSize(),
|
|
229
|
-
},
|
|
228
|
+
css: virtualizerCss,
|
|
230
229
|
},
|
|
231
|
-
_react.createElement(
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
itemRenderer(virtualItem.index, virtualItem, virtualizer),
|
|
230
|
+
_react.createElement(
|
|
231
|
+
'div',
|
|
232
|
+
{
|
|
233
|
+
'data-iui-virtualizer': 'root',
|
|
234
|
+
style: {
|
|
235
|
+
minBlockSize: virtualizer.getTotalSize(),
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
_react.createElement('slot', null),
|
|
241
239
|
),
|
|
240
|
+
),
|
|
241
|
+
_react.createElement(
|
|
242
|
+
_react.Fragment,
|
|
243
|
+
null,
|
|
244
|
+
virtualizer
|
|
245
|
+
.getVirtualItems()
|
|
246
|
+
.map((virtualItem) =>
|
|
247
|
+
itemRenderer(virtualItem.index, virtualItem, virtualizer),
|
|
248
|
+
),
|
|
249
|
+
),
|
|
242
250
|
),
|
|
243
251
|
);
|
|
244
252
|
},
|
package/cjs/styles.js
CHANGED
|
@@ -367,27 +367,23 @@ export const ComboBox = React.forwardRef((props, forwardedRef) => {
|
|
|
367
367
|
disabled: inputProps?.disabled,
|
|
368
368
|
...rest,
|
|
369
369
|
},
|
|
370
|
-
React.createElement(
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
.filter(Boolean)
|
|
388
|
-
: void 0,
|
|
389
|
-
}),
|
|
390
|
-
),
|
|
370
|
+
React.createElement(ComboBoxInput, {
|
|
371
|
+
value: inputValue,
|
|
372
|
+
disabled: inputProps?.disabled,
|
|
373
|
+
...inputProps,
|
|
374
|
+
onChange: handleOnInput,
|
|
375
|
+
selectTags: isMultipleEnabled(selectedIndexes, multiple)
|
|
376
|
+
? selectedIndexes
|
|
377
|
+
?.map((index) => {
|
|
378
|
+
let item = options[index];
|
|
379
|
+
return React.createElement(SelectTag, {
|
|
380
|
+
key: item.label,
|
|
381
|
+
label: item.label,
|
|
382
|
+
});
|
|
383
|
+
})
|
|
384
|
+
.filter(Boolean)
|
|
385
|
+
: void 0,
|
|
386
|
+
}),
|
|
391
387
|
React.createElement(ComboBoxEndIcon, {
|
|
392
388
|
...endIconProps,
|
|
393
389
|
disabled: inputProps?.disabled,
|
|
@@ -59,8 +59,12 @@ let VirtualizedComboBoxMenu = (props) => {
|
|
|
59
59
|
[filteredOptions, getMenuItem, children, virtualizer.measureElement],
|
|
60
60
|
);
|
|
61
61
|
return React.createElement(
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
'div',
|
|
63
|
+
{
|
|
64
|
+
style: {
|
|
65
|
+
display: 'contents',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
64
68
|
React.createElement(
|
|
65
69
|
ShadowRoot,
|
|
66
70
|
{
|
package/esm/core/Tabs/Tabs.js
CHANGED
|
@@ -69,7 +69,7 @@ let TabsWrapper = React.forwardRef((props, ref) => {
|
|
|
69
69
|
});
|
|
70
70
|
let TabList = React.forwardRef((props, ref) => {
|
|
71
71
|
let { className, children, ...rest } = props;
|
|
72
|
-
let { type, hasSublabel, color } = useSafeContext(TabsContext);
|
|
72
|
+
let { type, hasSublabel, color, orientation } = useSafeContext(TabsContext);
|
|
73
73
|
let isClient = useIsClient();
|
|
74
74
|
let tablistRef = React.useRef(null);
|
|
75
75
|
let [tablistSizeRef, tabsWidth] = useContainerWidth('default' !== type);
|
|
@@ -93,6 +93,7 @@ let TabList = React.forwardRef((props, ref) => {
|
|
|
93
93
|
},
|
|
94
94
|
className,
|
|
95
95
|
),
|
|
96
|
+
'data-iui-orientation': orientation,
|
|
96
97
|
role: 'tablist',
|
|
97
98
|
ref: refs,
|
|
98
99
|
...rest,
|
|
@@ -138,10 +139,12 @@ let Tab = React.forwardRef((props, forwardedRef) => {
|
|
|
138
139
|
let updateStripe = () => {
|
|
139
140
|
let currentTabRect = tabRef.current?.getBoundingClientRect();
|
|
140
141
|
let tabslistRect = tablistRef.current?.getBoundingClientRect();
|
|
142
|
+
let currentTabLeftIncludingScroll =
|
|
143
|
+
(currentTabRect?.x ?? 0) + (tablistRef.current?.scrollLeft ?? 0);
|
|
141
144
|
let tabsStripePosition =
|
|
142
145
|
null != currentTabRect && null != tabslistRect
|
|
143
146
|
? {
|
|
144
|
-
horizontal:
|
|
147
|
+
horizontal: currentTabLeftIncludingScroll - tabslistRect.x,
|
|
145
148
|
vertical: currentTabRect.y - tabslistRect.y,
|
|
146
149
|
}
|
|
147
150
|
: {
|
package/esm/core/Tree/Tree.js
CHANGED
|
@@ -210,29 +210,37 @@ let VirtualizedTree = React.forwardRef(
|
|
|
210
210
|
ref: useMergedRefs(ref, parentRef),
|
|
211
211
|
},
|
|
212
212
|
React.createElement(
|
|
213
|
-
|
|
213
|
+
'div',
|
|
214
214
|
{
|
|
215
|
-
|
|
215
|
+
style: {
|
|
216
|
+
display: 'contents',
|
|
217
|
+
},
|
|
216
218
|
},
|
|
217
219
|
React.createElement(
|
|
218
|
-
|
|
220
|
+
ShadowRoot,
|
|
219
221
|
{
|
|
220
|
-
|
|
221
|
-
style: {
|
|
222
|
-
minBlockSize: virtualizer.getTotalSize(),
|
|
223
|
-
},
|
|
222
|
+
css: virtualizerCss,
|
|
224
223
|
},
|
|
225
|
-
React.createElement(
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
itemRenderer(virtualItem.index, virtualItem, virtualizer),
|
|
224
|
+
React.createElement(
|
|
225
|
+
'div',
|
|
226
|
+
{
|
|
227
|
+
'data-iui-virtualizer': 'root',
|
|
228
|
+
style: {
|
|
229
|
+
minBlockSize: virtualizer.getTotalSize(),
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
React.createElement('slot', null),
|
|
235
233
|
),
|
|
234
|
+
),
|
|
235
|
+
React.createElement(
|
|
236
|
+
React.Fragment,
|
|
237
|
+
null,
|
|
238
|
+
virtualizer
|
|
239
|
+
.getVirtualItems()
|
|
240
|
+
.map((virtualItem) =>
|
|
241
|
+
itemRenderer(virtualItem.index, virtualItem, virtualizer),
|
|
242
|
+
),
|
|
243
|
+
),
|
|
236
244
|
),
|
|
237
245
|
);
|
|
238
246
|
},
|
package/esm/styles.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/itwinui-react",
|
|
3
|
-
"version": "3.17.
|
|
3
|
+
"version": "3.17.4",
|
|
4
4
|
"author": "Bentley Systems",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"react": "^19.0.0",
|
|
105
105
|
"react-dom": "^19.0.0",
|
|
106
106
|
"typescript": "5",
|
|
107
|
-
"vite": "~5.4.
|
|
107
|
+
"vite": "~5.4.15",
|
|
108
108
|
"vitest": "^1.6.1"
|
|
109
109
|
},
|
|
110
110
|
"peerDependencies": {
|