@wandelbots/wandelbots-js-react-components 2.54.3-pr.fix-dom-leak.403.4c7bc8d → 2.54.3-pr.fix-dom-leak.403.8043b0b
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/dist/components/TabBar.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +85 -70
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/TabBar.tsx +30 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wandelbots/wandelbots-js-react-components",
|
|
3
|
-
"version": "2.54.3-pr.fix-dom-leak.403.
|
|
3
|
+
"version": "2.54.3-pr.fix-dom-leak.403.8043b0b",
|
|
4
4
|
"description": "React UI toolkit for building applications on top of the Wandelbots platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -70,6 +70,34 @@ function TabPanel(props: TabPanelProps) {
|
|
|
70
70
|
)
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
/**
|
|
74
|
+
* Wrapper component that filters out MUI Tabs internal props
|
|
75
|
+
* to prevent them from being passed to DOM elements
|
|
76
|
+
*/
|
|
77
|
+
interface TabWrapperProps {
|
|
78
|
+
children: React.ReactNode
|
|
79
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
80
|
+
[key: string]: any
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function TabWrapper({ children, ...props }: TabWrapperProps) {
|
|
84
|
+
// Filter out MUI Tabs internal props that shouldn't reach the DOM
|
|
85
|
+
const {
|
|
86
|
+
fullWidth,
|
|
87
|
+
indicator,
|
|
88
|
+
onChange,
|
|
89
|
+
orientation,
|
|
90
|
+
scrollButtons,
|
|
91
|
+
selectionFollowsFocus,
|
|
92
|
+
textColor,
|
|
93
|
+
value,
|
|
94
|
+
variant,
|
|
95
|
+
...cleanProps
|
|
96
|
+
} = props
|
|
97
|
+
|
|
98
|
+
return <Box {...cleanProps}>{children}</Box>
|
|
99
|
+
}
|
|
100
|
+
|
|
73
101
|
/**
|
|
74
102
|
* A styled tab bar component with configurable tabs and content.
|
|
75
103
|
* Features the same styling as the Wandelbots design system with rounded tabs
|
|
@@ -238,7 +266,7 @@ export const TabBar = externalizeComponent(
|
|
|
238
266
|
}
|
|
239
267
|
|
|
240
268
|
return (
|
|
241
|
-
<
|
|
269
|
+
<TabWrapper
|
|
242
270
|
key={item.id}
|
|
243
271
|
component="span"
|
|
244
272
|
sx={{ display: "inline-flex" }}
|
|
@@ -262,7 +290,7 @@ export const TabBar = externalizeComponent(
|
|
|
262
290
|
>
|
|
263
291
|
{tab}
|
|
264
292
|
</Badge>
|
|
265
|
-
</
|
|
293
|
+
</TabWrapper>
|
|
266
294
|
)
|
|
267
295
|
})}
|
|
268
296
|
</Tabs>
|