Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99827868
TabsListUnstyled.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
Sun, Jan 26, 20:29
Size
2 KB
Mime Type
text/x-java
Expires
Tue, Jan 28, 20:29 (2 d)
Engine
blob
Format
Raw Data
Handle
23829237
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
TabsListUnstyled.js
View Options
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
const _excluded = ["children", "component", "slotProps", "slots"];
import * as React from 'react';
import PropTypes from 'prop-types';
import composeClasses from '../composeClasses';
import { useSlotProps } from '../utils';
import { getTabsListUnstyledUtilityClass } from './tabsListUnstyledClasses';
import useTabsList from './useTabsList';
import { jsx as _jsx } from "react/jsx-runtime";
const useUtilityClasses = ownerState => {
const {
orientation
} = ownerState;
const slots = {
root: ['root', orientation]
};
return composeClasses(slots, getTabsListUnstyledUtilityClass, {});
};
/**
*
* Demos:
*
* - [Unstyled Tabs](https://mui.com/base/react-tabs/)
*
* API:
*
* - [TabsListUnstyled API](https://mui.com/base/api/tabs-list-unstyled/)
*/
const TabsListUnstyled = /*#__PURE__*/React.forwardRef((props, ref) => {
var _ref;
const {
component,
slotProps = {},
slots = {}
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded);
const {
isRtl,
orientation,
getRootProps,
processChildren
} = useTabsList(_extends({}, props, {
ref
}));
const ownerState = _extends({}, props, {
isRtl,
orientation
});
const classes = useUtilityClasses(ownerState);
const TabsListRoot = (_ref = component != null ? component : slots.root) != null ? _ref : 'div';
const tabsListRootProps = useSlotProps({
elementType: TabsListRoot,
getSlotProps: getRootProps,
externalSlotProps: slotProps.root,
externalForwardedProps: other,
ownerState,
className: classes.root
});
const processedChildren = processChildren();
return /*#__PURE__*/_jsx(TabsListRoot, _extends({}, tabsListRootProps, {
children: processedChildren
}));
});
process.env.NODE_ENV !== "production" ? TabsListUnstyled.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 TabsList.
* @default {}
*/
slotProps: PropTypes.shape({
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
}),
/**
* The components used for each slot inside the TabsList.
* Either a string to use a HTML element or a component.
* @default {}
*/
slots: PropTypes.shape({
root: PropTypes.elementType
})
} : void 0;
export default TabsListUnstyled;
Event Timeline
Log In to Comment