1 | 'use client';
|
2 |
|
3 | import * as React from 'react';
|
4 | import PropTypes from 'prop-types';
|
5 | import { emphasize } from '@mui/system/colorManipulator';
|
6 | import { styled } from "../zero-styled/index.js";
|
7 | import memoTheme from "../utils/memoTheme.js";
|
8 | import MoreHorizIcon from "../internal/svg-icons/MoreHoriz.js";
|
9 | import ButtonBase from "../ButtonBase/index.js";
|
10 | import { jsx as _jsx } from "react/jsx-runtime";
|
11 | const BreadcrumbCollapsedButton = styled(ButtonBase)(memoTheme(({
|
12 | theme
|
13 | }) => ({
|
14 | display: 'flex',
|
15 | marginLeft: `calc(${theme.spacing(1)} * 0.5)`,
|
16 | marginRight: `calc(${theme.spacing(1)} * 0.5)`,
|
17 | ...(theme.palette.mode === 'light' ? {
|
18 | backgroundColor: theme.palette.grey[100],
|
19 | color: theme.palette.grey[700]
|
20 | } : {
|
21 | backgroundColor: theme.palette.grey[700],
|
22 | color: theme.palette.grey[100]
|
23 | }),
|
24 | borderRadius: 2,
|
25 | '&:hover, &:focus': {
|
26 | ...(theme.palette.mode === 'light' ? {
|
27 | backgroundColor: theme.palette.grey[200]
|
28 | } : {
|
29 | backgroundColor: theme.palette.grey[600]
|
30 | })
|
31 | },
|
32 | '&:active': {
|
33 | boxShadow: theme.shadows[0],
|
34 | ...(theme.palette.mode === 'light' ? {
|
35 | backgroundColor: emphasize(theme.palette.grey[200], 0.12)
|
36 | } : {
|
37 | backgroundColor: emphasize(theme.palette.grey[600], 0.12)
|
38 | })
|
39 | }
|
40 | })));
|
41 | const BreadcrumbCollapsedIcon = styled(MoreHorizIcon)({
|
42 | width: 24,
|
43 | height: 16
|
44 | });
|
45 |
|
46 |
|
47 |
|
48 |
|
49 | function BreadcrumbCollapsed(props) {
|
50 | const {
|
51 | slots = {},
|
52 | slotProps = {},
|
53 | ...otherProps
|
54 | } = props;
|
55 | const ownerState = props;
|
56 | return _jsx("li", {
|
57 | children: _jsx(BreadcrumbCollapsedButton, {
|
58 | focusRipple: true,
|
59 | ...otherProps,
|
60 | ownerState: ownerState,
|
61 | children: _jsx(BreadcrumbCollapsedIcon, {
|
62 | as: slots.CollapsedIcon,
|
63 | ownerState: ownerState,
|
64 | ...slotProps.collapsedIcon
|
65 | })
|
66 | })
|
67 | });
|
68 | }
|
69 | process.env.NODE_ENV !== "production" ? BreadcrumbCollapsed.propTypes = {
|
70 | |
71 |
|
72 |
|
73 |
|
74 | slotProps: PropTypes.shape({
|
75 | collapsedIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
76 | }),
|
77 | |
78 |
|
79 |
|
80 |
|
81 |
|
82 | slots: PropTypes.shape({
|
83 | CollapsedIcon: PropTypes.elementType
|
84 | }),
|
85 | |
86 |
|
87 |
|
88 | sx: PropTypes.object
|
89 | } : void 0;
|
90 | export default BreadcrumbCollapsed; |
\ | No newline at end of file |