Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98193106
ScopedCssBaseline.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
Fri, Jan 10, 22:00
Size
3 KB
Mime Type
text/x-java
Expires
Sun, Jan 12, 22:00 (2 d)
Engine
blob
Format
Raw Data
Handle
23525453
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
ScopedCssBaseline.js
View Options
import
_objectWithoutPropertiesLoose
from
"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"
;
import
_extends
from
"@babel/runtime/helpers/esm/extends"
;
const
_excluded
=
[
"className"
,
"component"
,
"enableColorScheme"
];
import
*
as
React
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
clsx
from
'clsx'
;
import
{
unstable_composeClasses
as
composeClasses
}
from
'@mui/base'
;
import
useThemeProps
from
'../styles/useThemeProps'
;
import
styled
from
'../styles/styled'
;
import
{
html
,
body
}
from
'../CssBaseline/CssBaseline'
;
import
{
getScopedCssBaselineUtilityClass
}
from
'./scopedCssBaselineClasses'
;
import
{
jsx
as
_jsx
}
from
"react/jsx-runtime"
;
const
useUtilityClasses
=
ownerState
=>
{
const
{
classes
}
=
ownerState
;
const
slots
=
{
root
:
[
'root'
]
};
return
composeClasses
(
slots
,
getScopedCssBaselineUtilityClass
,
classes
);
};
const
ScopedCssBaselineRoot
=
styled
(
'div'
,
{
name
:
'MuiScopedCssBaseline'
,
slot
:
'Root'
,
overridesResolver
:
(
props
,
styles
)
=>
styles
.
root
})(({
theme
,
ownerState
})
=>
{
const
colorSchemeStyles
=
{};
if
(
ownerState
.
enableColorScheme
&&
theme
.
colorSchemes
)
{
Object
.
entries
(
theme
.
colorSchemes
).
forEach
(([
key
,
scheme
])
=>
{
var
_scheme$palette
;
colorSchemeStyles
[
`
&
$
{
theme
.
getColorSchemeSelector
(
key
).
replace
(
/\s*&/
,
''
)}
`
]
=
{
colorScheme
:
(
_scheme$palette
=
scheme
.
palette
)
==
null
?
void
0
:
_scheme$palette
.
mode
};
});
}
return
_extends
({},
html
(
theme
,
ownerState
.
enableColorScheme
),
body
(
theme
),
{
'& *, & *::before, & *::after'
:
{
boxSizing
:
'inherit'
},
'& strong, & b'
:
{
fontWeight
:
theme
.
typography
.
fontWeightBold
}
},
colorSchemeStyles
);
});
const
ScopedCssBaseline
=
/*#__PURE__*/
React
.
forwardRef
(
function
ScopedCssBaseline
(
inProps
,
ref
)
{
const
props
=
useThemeProps
({
props
:
inProps
,
name
:
'MuiScopedCssBaseline'
});
const
{
className
,
component
=
'div'
}
=
props
,
other
=
_objectWithoutPropertiesLoose
(
props
,
_excluded
);
const
ownerState
=
_extends
({},
props
,
{
component
});
const
classes
=
useUtilityClasses
(
ownerState
);
return
/*#__PURE__*/
_jsx
(
ScopedCssBaselineRoot
,
_extends
({
as
:
component
,
className
:
clsx
(
classes
.
root
,
className
),
ref
:
ref
,
ownerState
:
ownerState
},
other
));
});
process
.
env
.
NODE_ENV
!==
"production"
?
ScopedCssBaseline
.
propTypes
/* remove-proptypes */
=
{
// ----------------------------- Warning --------------------------------
// | These PropTypes are generated from the TypeScript type definitions |
// | To update them edit the d.ts file and run "yarn proptypes" |
// ----------------------------------------------------------------------
/**
* The content of the component.
*/
children
:
PropTypes
.
node
,
/**
* Override or extend the styles applied to the component.
*/
classes
:
PropTypes
.
object
,
/**
* @ignore
*/
className
:
PropTypes
.
string
,
/**
* The component used for the root node.
* Either a string to use a HTML element or a component.
*/
component
:
PropTypes
.
elementType
,
/**
* Enable `color-scheme` CSS property to use `theme.palette.mode`.
* For more details, check out https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme
* For browser support, check out https://caniuse.com/?search=color-scheme
*/
enableColorScheme
:
PropTypes
.
bool
,
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx
:
PropTypes
.
oneOfType
([
PropTypes
.
arrayOf
(
PropTypes
.
oneOfType
([
PropTypes
.
func
,
PropTypes
.
object
,
PropTypes
.
bool
])),
PropTypes
.
func
,
PropTypes
.
object
])
}
:
void
0
;
export
default
ScopedCssBaseline
;
Event Timeline
Log In to Comment