Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100888692
TabPanelUnstyled.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Feb 3, 15:48
Size
3 KB
Mime Type
text/x-java
Expires
Wed, Feb 5, 15:48 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24049417
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
TabPanelUnstyled.js
View Options
import
_extends
from
"@babel/runtime/helpers/esm/extends"
;
import
_objectWithoutPropertiesLoose
from
"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"
;
const
_excluded
=
[
"children"
,
"component"
,
"value"
,
"slotProps"
,
"slots"
];
import
*
as
React
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
{
useSlotProps
}
from
'../utils'
;
import
composeClasses
from
'../composeClasses'
;
import
{
getTabPanelUnstyledUtilityClass
}
from
'./tabPanelUnstyledClasses'
;
import
useTabPanel
from
'./useTabPanel'
;
import
{
jsx
as
_jsx
}
from
"react/jsx-runtime"
;
const
useUtilityClasses
=
ownerState
=>
{
const
{
hidden
}
=
ownerState
;
const
slots
=
{
root
:
[
'root'
,
hidden
&&
'hidden'
]
};
return
composeClasses
(
slots
,
getTabPanelUnstyledUtilityClass
,
{});
};
/**
*
* Demos:
*
* - [Unstyled Tabs](https://mui.com/base/react-tabs/)
*
* API:
*
* - [TabPanelUnstyled API](https://mui.com/base/api/tab-panel-unstyled/)
*/
const
TabPanelUnstyled
=
/*#__PURE__*/
React
.
forwardRef
(
function
TabPanelUnstyled
(
props
,
ref
)
{
var
_ref
;
const
{
children
,
component
,
slotProps
=
{},
slots
=
{}
}
=
props
,
other
=
_objectWithoutPropertiesLoose
(
props
,
_excluded
);
const
{
hidden
,
getRootProps
}
=
useTabPanel
(
props
);
const
ownerState
=
_extends
({},
props
,
{
hidden
});
const
classes
=
useUtilityClasses
(
ownerState
);
const
TabPanelRoot
=
(
_ref
=
component
!=
null
?
component
:
slots
.
root
)
!=
null
?
_ref
:
'div'
;
const
tabPanelRootProps
=
useSlotProps
({
elementType
:
TabPanelRoot
,
getSlotProps
:
getRootProps
,
externalSlotProps
:
slotProps
.
root
,
externalForwardedProps
:
other
,
additionalProps
:
{
role
:
'tabpanel'
,
ref
},
ownerState
,
className
:
classes
.
root
});
return
/*#__PURE__*/
_jsx
(
TabPanelRoot
,
_extends
({},
tabPanelRootProps
,
{
children
:
!
hidden
&&
children
}));
});
process
.
env
.
NODE_ENV
!==
"production"
?
TabPanelUnstyled
.
propTypes
/* remove-proptypes */
=
{
// ----------------------------- Warning --------------------------------
// | These PropTypes are generated from the TypeScript type definitions |
// | To update them edit TypeScript types and run "yarn proptypes" |
// ----------------------------------------------------------------------
/**
* The content of the component.
*/
children
:
PropTypes
.
node
,
/**
* The component used for the root node.
* Either a string to use a HTML element or a component.
*/
component
:
PropTypes
.
elementType
,
/**
* The props used for each slot inside the TabPanel.
* @default {}
*/
slotProps
:
PropTypes
.
shape
({
root
:
PropTypes
.
oneOfType
([
PropTypes
.
func
,
PropTypes
.
object
])
}),
/**
* The components used for each slot inside the TabPanel.
* Either a string to use a HTML element or a component.
* @default {}
*/
slots
:
PropTypes
.
shape
({
root
:
PropTypes
.
elementType
}),
/**
* The value of the TabPanel. It will be shown when the Tab with the corresponding value is selected.
*/
value
:
PropTypes
.
oneOfType
([
PropTypes
.
number
,
PropTypes
.
string
]).
isRequired
}
:
void
0
;
export
default
TabPanelUnstyled
;
Event Timeline
Log In to Comment