worked on GarageApp stuff
This commit is contained in:
parent
60aaf17af3
commit
eb606572b0
51919 changed files with 2168177 additions and 18 deletions
133
node_modules/@mui/material/Chip/Chip.d.ts
generated
vendored
Normal file
133
node_modules/@mui/material/Chip/Chip.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
import * as React from 'react';
|
||||
import { OverridableStringUnion } from '@mui/types';
|
||||
import { SxProps } from '@mui/system';
|
||||
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js";
|
||||
import { Theme } from "../styles/index.js";
|
||||
import { OverridableComponent, OverrideProps } from "../OverridableComponent/index.js";
|
||||
import { ChipClasses } from "./chipClasses.js";
|
||||
export interface ChipSlots {
|
||||
/**
|
||||
* The component that renders the root.
|
||||
* @default div
|
||||
*/
|
||||
root: React.ElementType;
|
||||
/**
|
||||
* The component that renders the label.
|
||||
* @default span
|
||||
*/
|
||||
label: React.ElementType;
|
||||
}
|
||||
export type ChipSlotsAndSlotProps = CreateSlotsAndSlotProps<ChipSlots, {
|
||||
/**
|
||||
* Props forwarded to the root slot.
|
||||
* By default, the avaible props are based on the div element.
|
||||
*/
|
||||
root: SlotProps<'div', {}, ChipOwnerState>;
|
||||
/**
|
||||
* Props forwarded to the label slot.
|
||||
* By default, the avaible props are based on the span element.
|
||||
*/
|
||||
label: SlotProps<'span', {}, ChipOwnerState>;
|
||||
}>;
|
||||
export interface ChipOwnerState extends Omit<ChipProps, 'slots' | 'slotProps'> {}
|
||||
export interface ChipPropsVariantOverrides {}
|
||||
export interface ChipPropsSizeOverrides {}
|
||||
export interface ChipPropsColorOverrides {}
|
||||
export interface ChipOwnProps {
|
||||
/**
|
||||
* The Avatar element to display.
|
||||
*/
|
||||
avatar?: React.ReactElement<unknown>;
|
||||
/**
|
||||
* This prop isn't supported.
|
||||
* Use the `component` prop if you need to change the children structure.
|
||||
*/
|
||||
children?: null;
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes?: Partial<ChipClasses>;
|
||||
/**
|
||||
* If `true`, the chip will appear clickable, and will raise when pressed,
|
||||
* even if the onClick prop is not defined.
|
||||
* If `false`, the chip will not appear clickable, even if onClick prop is defined.
|
||||
* This can be used, for example,
|
||||
* along with the component prop to indicate an anchor Chip is clickable.
|
||||
* Note: this controls the UI and does not affect the onClick event.
|
||||
*/
|
||||
clickable?: boolean;
|
||||
/**
|
||||
* The color of the component.
|
||||
* It supports both default and custom theme colors, which can be added as shown in the
|
||||
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
||||
* @default 'default'
|
||||
*/
|
||||
color?: OverridableStringUnion<'default' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning', ChipPropsColorOverrides>;
|
||||
/**
|
||||
* Override the default delete icon element. Shown only if `onDelete` is set.
|
||||
*/
|
||||
deleteIcon?: React.ReactElement<unknown>;
|
||||
/**
|
||||
* If `true`, the component is disabled.
|
||||
* @default false
|
||||
*/
|
||||
disabled?: boolean;
|
||||
/**
|
||||
* Icon element.
|
||||
*/
|
||||
icon?: React.ReactElement<unknown>;
|
||||
/**
|
||||
* The content of the component.
|
||||
*/
|
||||
label?: React.ReactNode;
|
||||
/**
|
||||
* Callback fired when the delete icon is clicked.
|
||||
* If set, the delete icon will be shown.
|
||||
*/
|
||||
onDelete?: React.EventHandler<any>;
|
||||
/**
|
||||
* The size of the component.
|
||||
* @default 'medium'
|
||||
*/
|
||||
size?: OverridableStringUnion<'small' | 'medium', ChipPropsSizeOverrides>;
|
||||
/**
|
||||
* If `true`, allows the disabled chip to escape focus.
|
||||
* If `false`, allows the disabled chip to receive focus.
|
||||
* @default false
|
||||
*/
|
||||
skipFocusWhenDisabled?: boolean;
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx?: SxProps<Theme>;
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
tabIndex?: number;
|
||||
/**
|
||||
* The variant to use.
|
||||
* @default 'filled'
|
||||
*/
|
||||
variant?: OverridableStringUnion<'filled' | 'outlined', ChipPropsVariantOverrides>;
|
||||
}
|
||||
export interface ChipTypeMap<AdditionalProps = {}, RootComponent extends React.ElementType = 'div'> {
|
||||
props: AdditionalProps & ChipOwnProps & ChipSlotsAndSlotProps;
|
||||
defaultComponent: RootComponent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Chips represent complex entities in small blocks, such as a contact.
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Chip](https://mui.com/material-ui/react-chip/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [Chip API](https://mui.com/material-ui/api/chip/)
|
||||
*/
|
||||
declare const Chip: OverridableComponent<ChipTypeMap>;
|
||||
export type ChipProps<RootComponent extends React.ElementType = ChipTypeMap['defaultComponent'], AdditionalProps = {}> = OverrideProps<ChipTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
||||
component?: React.ElementType;
|
||||
};
|
||||
export default Chip;
|
||||
634
node_modules/@mui/material/Chip/Chip.js
generated
vendored
Normal file
634
node_modules/@mui/material/Chip/Chip.js
generated
vendored
Normal file
|
|
@ -0,0 +1,634 @@
|
|||
"use strict";
|
||||
'use client';
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
var _propTypes = _interopRequireDefault(require("prop-types"));
|
||||
var _clsx = _interopRequireDefault(require("clsx"));
|
||||
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
||||
var _Cancel = _interopRequireDefault(require("../internal/svg-icons/Cancel"));
|
||||
var _useForkRef = _interopRequireDefault(require("../utils/useForkRef"));
|
||||
var _unsupportedProp = _interopRequireDefault(require("../utils/unsupportedProp"));
|
||||
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
||||
var _ButtonBase = _interopRequireDefault(require("../ButtonBase"));
|
||||
var _zeroStyled = require("../zero-styled");
|
||||
var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
||||
var _createSimplePaletteValueFilter = _interopRequireDefault(require("../utils/createSimplePaletteValueFilter"));
|
||||
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
||||
var _chipClasses = _interopRequireWildcard(require("./chipClasses"));
|
||||
var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
||||
var _jsxRuntime = require("react/jsx-runtime");
|
||||
const useUtilityClasses = ownerState => {
|
||||
const {
|
||||
classes,
|
||||
disabled,
|
||||
size,
|
||||
color,
|
||||
iconColor,
|
||||
onDelete,
|
||||
clickable,
|
||||
variant
|
||||
} = ownerState;
|
||||
const slots = {
|
||||
root: ['root', variant, disabled && 'disabled', `size${(0, _capitalize.default)(size)}`, `color${(0, _capitalize.default)(color)}`, clickable && 'clickable', clickable && `clickableColor${(0, _capitalize.default)(color)}`, onDelete && 'deletable', onDelete && `deletableColor${(0, _capitalize.default)(color)}`, `${variant}${(0, _capitalize.default)(color)}`],
|
||||
label: ['label', `label${(0, _capitalize.default)(size)}`],
|
||||
avatar: ['avatar', `avatar${(0, _capitalize.default)(size)}`, `avatarColor${(0, _capitalize.default)(color)}`],
|
||||
icon: ['icon', `icon${(0, _capitalize.default)(size)}`, `iconColor${(0, _capitalize.default)(iconColor)}`],
|
||||
deleteIcon: ['deleteIcon', `deleteIcon${(0, _capitalize.default)(size)}`, `deleteIconColor${(0, _capitalize.default)(color)}`, `deleteIcon${(0, _capitalize.default)(variant)}Color${(0, _capitalize.default)(color)}`]
|
||||
};
|
||||
return (0, _composeClasses.default)(slots, _chipClasses.getChipUtilityClass, classes);
|
||||
};
|
||||
const ChipRoot = (0, _zeroStyled.styled)('div', {
|
||||
name: 'MuiChip',
|
||||
slot: 'Root',
|
||||
overridesResolver: (props, styles) => {
|
||||
const {
|
||||
ownerState
|
||||
} = props;
|
||||
const {
|
||||
color,
|
||||
iconColor,
|
||||
clickable,
|
||||
onDelete,
|
||||
size,
|
||||
variant
|
||||
} = ownerState;
|
||||
return [{
|
||||
[`& .${_chipClasses.default.avatar}`]: styles.avatar
|
||||
}, {
|
||||
[`& .${_chipClasses.default.avatar}`]: styles[`avatar${(0, _capitalize.default)(size)}`]
|
||||
}, {
|
||||
[`& .${_chipClasses.default.avatar}`]: styles[`avatarColor${(0, _capitalize.default)(color)}`]
|
||||
}, {
|
||||
[`& .${_chipClasses.default.icon}`]: styles.icon
|
||||
}, {
|
||||
[`& .${_chipClasses.default.icon}`]: styles[`icon${(0, _capitalize.default)(size)}`]
|
||||
}, {
|
||||
[`& .${_chipClasses.default.icon}`]: styles[`iconColor${(0, _capitalize.default)(iconColor)}`]
|
||||
}, {
|
||||
[`& .${_chipClasses.default.deleteIcon}`]: styles.deleteIcon
|
||||
}, {
|
||||
[`& .${_chipClasses.default.deleteIcon}`]: styles[`deleteIcon${(0, _capitalize.default)(size)}`]
|
||||
}, {
|
||||
[`& .${_chipClasses.default.deleteIcon}`]: styles[`deleteIconColor${(0, _capitalize.default)(color)}`]
|
||||
}, {
|
||||
[`& .${_chipClasses.default.deleteIcon}`]: styles[`deleteIcon${(0, _capitalize.default)(variant)}Color${(0, _capitalize.default)(color)}`]
|
||||
}, styles.root, styles[`size${(0, _capitalize.default)(size)}`], styles[`color${(0, _capitalize.default)(color)}`], clickable && styles.clickable, clickable && color !== 'default' && styles[`clickableColor${(0, _capitalize.default)(color)})`], onDelete && styles.deletable, onDelete && color !== 'default' && styles[`deletableColor${(0, _capitalize.default)(color)}`], styles[variant], styles[`${variant}${(0, _capitalize.default)(color)}`]];
|
||||
}
|
||||
})((0, _memoTheme.default)(({
|
||||
theme
|
||||
}) => {
|
||||
const textColor = theme.palette.mode === 'light' ? theme.palette.grey[700] : theme.palette.grey[300];
|
||||
return {
|
||||
maxWidth: '100%',
|
||||
fontFamily: theme.typography.fontFamily,
|
||||
fontSize: theme.typography.pxToRem(13),
|
||||
display: 'inline-flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
height: 32,
|
||||
lineHeight: 1.5,
|
||||
color: (theme.vars || theme).palette.text.primary,
|
||||
backgroundColor: (theme.vars || theme).palette.action.selected,
|
||||
borderRadius: 32 / 2,
|
||||
whiteSpace: 'nowrap',
|
||||
transition: theme.transitions.create(['background-color', 'box-shadow']),
|
||||
// reset cursor explicitly in case ButtonBase is used
|
||||
cursor: 'unset',
|
||||
// We disable the focus ring for mouse, touch and keyboard users.
|
||||
outline: 0,
|
||||
textDecoration: 'none',
|
||||
border: 0,
|
||||
// Remove `button` border
|
||||
padding: 0,
|
||||
// Remove `button` padding
|
||||
verticalAlign: 'middle',
|
||||
boxSizing: 'border-box',
|
||||
[`&.${_chipClasses.default.disabled}`]: {
|
||||
opacity: (theme.vars || theme).palette.action.disabledOpacity,
|
||||
pointerEvents: 'none'
|
||||
},
|
||||
[`& .${_chipClasses.default.avatar}`]: {
|
||||
marginLeft: 5,
|
||||
marginRight: -6,
|
||||
width: 24,
|
||||
height: 24,
|
||||
color: theme.vars ? theme.vars.palette.Chip.defaultAvatarColor : textColor,
|
||||
fontSize: theme.typography.pxToRem(12)
|
||||
},
|
||||
[`& .${_chipClasses.default.avatarColorPrimary}`]: {
|
||||
color: (theme.vars || theme).palette.primary.contrastText,
|
||||
backgroundColor: (theme.vars || theme).palette.primary.dark
|
||||
},
|
||||
[`& .${_chipClasses.default.avatarColorSecondary}`]: {
|
||||
color: (theme.vars || theme).palette.secondary.contrastText,
|
||||
backgroundColor: (theme.vars || theme).palette.secondary.dark
|
||||
},
|
||||
[`& .${_chipClasses.default.avatarSmall}`]: {
|
||||
marginLeft: 4,
|
||||
marginRight: -4,
|
||||
width: 18,
|
||||
height: 18,
|
||||
fontSize: theme.typography.pxToRem(10)
|
||||
},
|
||||
[`& .${_chipClasses.default.icon}`]: {
|
||||
marginLeft: 5,
|
||||
marginRight: -6
|
||||
},
|
||||
[`& .${_chipClasses.default.deleteIcon}`]: {
|
||||
WebkitTapHighlightColor: 'transparent',
|
||||
color: theme.alpha((theme.vars || theme).palette.text.primary, 0.26),
|
||||
fontSize: 22,
|
||||
cursor: 'pointer',
|
||||
margin: '0 5px 0 -6px',
|
||||
'&:hover': {
|
||||
color: theme.alpha((theme.vars || theme).palette.text.primary, 0.4)
|
||||
}
|
||||
},
|
||||
variants: [{
|
||||
props: {
|
||||
size: 'small'
|
||||
},
|
||||
style: {
|
||||
height: 24,
|
||||
[`& .${_chipClasses.default.icon}`]: {
|
||||
fontSize: 18,
|
||||
marginLeft: 4,
|
||||
marginRight: -4
|
||||
},
|
||||
[`& .${_chipClasses.default.deleteIcon}`]: {
|
||||
fontSize: 16,
|
||||
marginRight: 4,
|
||||
marginLeft: -4
|
||||
}
|
||||
}
|
||||
}, ...Object.entries(theme.palette).filter((0, _createSimplePaletteValueFilter.default)(['contrastText'])).map(([color]) => {
|
||||
return {
|
||||
props: {
|
||||
color
|
||||
},
|
||||
style: {
|
||||
backgroundColor: (theme.vars || theme).palette[color].main,
|
||||
color: (theme.vars || theme).palette[color].contrastText,
|
||||
[`& .${_chipClasses.default.deleteIcon}`]: {
|
||||
color: theme.alpha((theme.vars || theme).palette[color].contrastText, 0.7),
|
||||
'&:hover, &:active': {
|
||||
color: (theme.vars || theme).palette[color].contrastText
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}), {
|
||||
props: props => props.iconColor === props.color,
|
||||
style: {
|
||||
[`& .${_chipClasses.default.icon}`]: {
|
||||
color: theme.vars ? theme.vars.palette.Chip.defaultIconColor : textColor
|
||||
}
|
||||
}
|
||||
}, {
|
||||
props: props => props.iconColor === props.color && props.color !== 'default',
|
||||
style: {
|
||||
[`& .${_chipClasses.default.icon}`]: {
|
||||
color: 'inherit'
|
||||
}
|
||||
}
|
||||
}, {
|
||||
props: {
|
||||
onDelete: true
|
||||
},
|
||||
style: {
|
||||
[`&.${_chipClasses.default.focusVisible}`]: {
|
||||
backgroundColor: theme.alpha((theme.vars || theme).palette.action.selected, `${(theme.vars || theme).palette.action.selectedOpacity} + ${(theme.vars || theme).palette.action.focusOpacity}`)
|
||||
}
|
||||
}
|
||||
}, ...Object.entries(theme.palette).filter((0, _createSimplePaletteValueFilter.default)(['dark'])).map(([color]) => {
|
||||
return {
|
||||
props: {
|
||||
color,
|
||||
onDelete: true
|
||||
},
|
||||
style: {
|
||||
[`&.${_chipClasses.default.focusVisible}`]: {
|
||||
background: (theme.vars || theme).palette[color].dark
|
||||
}
|
||||
}
|
||||
};
|
||||
}), {
|
||||
props: {
|
||||
clickable: true
|
||||
},
|
||||
style: {
|
||||
userSelect: 'none',
|
||||
WebkitTapHighlightColor: 'transparent',
|
||||
cursor: 'pointer',
|
||||
'&:hover': {
|
||||
backgroundColor: theme.alpha((theme.vars || theme).palette.action.selected, `${(theme.vars || theme).palette.action.selectedOpacity} + ${(theme.vars || theme).palette.action.hoverOpacity}`)
|
||||
},
|
||||
[`&.${_chipClasses.default.focusVisible}`]: {
|
||||
backgroundColor: theme.alpha((theme.vars || theme).palette.action.selected, `${(theme.vars || theme).palette.action.selectedOpacity} + ${(theme.vars || theme).palette.action.focusOpacity}`)
|
||||
},
|
||||
'&:active': {
|
||||
boxShadow: (theme.vars || theme).shadows[1]
|
||||
}
|
||||
}
|
||||
}, ...Object.entries(theme.palette).filter((0, _createSimplePaletteValueFilter.default)(['dark'])).map(([color]) => ({
|
||||
props: {
|
||||
color,
|
||||
clickable: true
|
||||
},
|
||||
style: {
|
||||
[`&:hover, &.${_chipClasses.default.focusVisible}`]: {
|
||||
backgroundColor: (theme.vars || theme).palette[color].dark
|
||||
}
|
||||
}
|
||||
})), {
|
||||
props: {
|
||||
variant: 'outlined'
|
||||
},
|
||||
style: {
|
||||
backgroundColor: 'transparent',
|
||||
border: theme.vars ? `1px solid ${theme.vars.palette.Chip.defaultBorder}` : `1px solid ${theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[700]}`,
|
||||
[`&.${_chipClasses.default.clickable}:hover`]: {
|
||||
backgroundColor: (theme.vars || theme).palette.action.hover
|
||||
},
|
||||
[`&.${_chipClasses.default.focusVisible}`]: {
|
||||
backgroundColor: (theme.vars || theme).palette.action.focus
|
||||
},
|
||||
[`& .${_chipClasses.default.avatar}`]: {
|
||||
marginLeft: 4
|
||||
},
|
||||
[`& .${_chipClasses.default.avatarSmall}`]: {
|
||||
marginLeft: 2
|
||||
},
|
||||
[`& .${_chipClasses.default.icon}`]: {
|
||||
marginLeft: 4
|
||||
},
|
||||
[`& .${_chipClasses.default.iconSmall}`]: {
|
||||
marginLeft: 2
|
||||
},
|
||||
[`& .${_chipClasses.default.deleteIcon}`]: {
|
||||
marginRight: 5
|
||||
},
|
||||
[`& .${_chipClasses.default.deleteIconSmall}`]: {
|
||||
marginRight: 3
|
||||
}
|
||||
}
|
||||
}, ...Object.entries(theme.palette).filter((0, _createSimplePaletteValueFilter.default)()) // no need to check for mainChannel as it's calculated from main
|
||||
.map(([color]) => ({
|
||||
props: {
|
||||
variant: 'outlined',
|
||||
color
|
||||
},
|
||||
style: {
|
||||
color: (theme.vars || theme).palette[color].main,
|
||||
border: `1px solid ${theme.alpha((theme.vars || theme).palette[color].main, 0.7)}`,
|
||||
[`&.${_chipClasses.default.clickable}:hover`]: {
|
||||
backgroundColor: theme.alpha((theme.vars || theme).palette[color].main, (theme.vars || theme).palette.action.hoverOpacity)
|
||||
},
|
||||
[`&.${_chipClasses.default.focusVisible}`]: {
|
||||
backgroundColor: theme.alpha((theme.vars || theme).palette[color].main, (theme.vars || theme).palette.action.focusOpacity)
|
||||
},
|
||||
[`& .${_chipClasses.default.deleteIcon}`]: {
|
||||
color: theme.alpha((theme.vars || theme).palette[color].main, 0.7),
|
||||
'&:hover, &:active': {
|
||||
color: (theme.vars || theme).palette[color].main
|
||||
}
|
||||
}
|
||||
}
|
||||
}))]
|
||||
};
|
||||
}));
|
||||
const ChipLabel = (0, _zeroStyled.styled)('span', {
|
||||
name: 'MuiChip',
|
||||
slot: 'Label',
|
||||
overridesResolver: (props, styles) => {
|
||||
const {
|
||||
ownerState
|
||||
} = props;
|
||||
const {
|
||||
size
|
||||
} = ownerState;
|
||||
return [styles.label, styles[`label${(0, _capitalize.default)(size)}`]];
|
||||
}
|
||||
})({
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis',
|
||||
paddingLeft: 12,
|
||||
paddingRight: 12,
|
||||
whiteSpace: 'nowrap',
|
||||
variants: [{
|
||||
props: {
|
||||
variant: 'outlined'
|
||||
},
|
||||
style: {
|
||||
paddingLeft: 11,
|
||||
paddingRight: 11
|
||||
}
|
||||
}, {
|
||||
props: {
|
||||
size: 'small'
|
||||
},
|
||||
style: {
|
||||
paddingLeft: 8,
|
||||
paddingRight: 8
|
||||
}
|
||||
}, {
|
||||
props: {
|
||||
size: 'small',
|
||||
variant: 'outlined'
|
||||
},
|
||||
style: {
|
||||
paddingLeft: 7,
|
||||
paddingRight: 7
|
||||
}
|
||||
}]
|
||||
});
|
||||
function isDeleteKeyboardEvent(keyboardEvent) {
|
||||
return keyboardEvent.key === 'Backspace' || keyboardEvent.key === 'Delete';
|
||||
}
|
||||
|
||||
/**
|
||||
* Chips represent complex entities in small blocks, such as a contact.
|
||||
*/
|
||||
const Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {
|
||||
const props = (0, _DefaultPropsProvider.useDefaultProps)({
|
||||
props: inProps,
|
||||
name: 'MuiChip'
|
||||
});
|
||||
const {
|
||||
avatar: avatarProp,
|
||||
className,
|
||||
clickable: clickableProp,
|
||||
color = 'default',
|
||||
component: ComponentProp,
|
||||
deleteIcon: deleteIconProp,
|
||||
disabled = false,
|
||||
icon: iconProp,
|
||||
label,
|
||||
onClick,
|
||||
onDelete,
|
||||
onKeyDown,
|
||||
onKeyUp,
|
||||
size = 'medium',
|
||||
variant = 'filled',
|
||||
tabIndex,
|
||||
skipFocusWhenDisabled = false,
|
||||
// TODO v6: Rename to `focusableWhenDisabled`.
|
||||
slots = {},
|
||||
slotProps = {},
|
||||
...other
|
||||
} = props;
|
||||
const chipRef = React.useRef(null);
|
||||
const handleRef = (0, _useForkRef.default)(chipRef, ref);
|
||||
const handleDeleteIconClick = event => {
|
||||
// Stop the event from bubbling up to the `Chip`
|
||||
event.stopPropagation();
|
||||
if (onDelete) {
|
||||
onDelete(event);
|
||||
}
|
||||
};
|
||||
const handleKeyDown = event => {
|
||||
// Ignore events from children of `Chip`.
|
||||
if (event.currentTarget === event.target && isDeleteKeyboardEvent(event)) {
|
||||
// Will be handled in keyUp, otherwise some browsers
|
||||
// might init navigation
|
||||
event.preventDefault();
|
||||
}
|
||||
if (onKeyDown) {
|
||||
onKeyDown(event);
|
||||
}
|
||||
};
|
||||
const handleKeyUp = event => {
|
||||
// Ignore events from children of `Chip`.
|
||||
if (event.currentTarget === event.target) {
|
||||
if (onDelete && isDeleteKeyboardEvent(event)) {
|
||||
onDelete(event);
|
||||
}
|
||||
}
|
||||
if (onKeyUp) {
|
||||
onKeyUp(event);
|
||||
}
|
||||
};
|
||||
const clickable = clickableProp !== false && onClick ? true : clickableProp;
|
||||
const component = clickable || onDelete ? _ButtonBase.default : ComponentProp || 'div';
|
||||
const ownerState = {
|
||||
...props,
|
||||
component,
|
||||
disabled,
|
||||
size,
|
||||
color,
|
||||
iconColor: /*#__PURE__*/React.isValidElement(iconProp) ? iconProp.props.color || color : color,
|
||||
onDelete: !!onDelete,
|
||||
clickable,
|
||||
variant
|
||||
};
|
||||
const classes = useUtilityClasses(ownerState);
|
||||
const moreProps = component === _ButtonBase.default ? {
|
||||
component: ComponentProp || 'div',
|
||||
focusVisibleClassName: classes.focusVisible,
|
||||
...(onDelete && {
|
||||
disableRipple: true
|
||||
})
|
||||
} : {};
|
||||
let deleteIcon = null;
|
||||
if (onDelete) {
|
||||
deleteIcon = deleteIconProp && /*#__PURE__*/React.isValidElement(deleteIconProp) ? (/*#__PURE__*/React.cloneElement(deleteIconProp, {
|
||||
className: (0, _clsx.default)(deleteIconProp.props.className, classes.deleteIcon),
|
||||
onClick: handleDeleteIconClick
|
||||
})) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Cancel.default, {
|
||||
className: classes.deleteIcon,
|
||||
onClick: handleDeleteIconClick
|
||||
});
|
||||
}
|
||||
let avatar = null;
|
||||
if (avatarProp && /*#__PURE__*/React.isValidElement(avatarProp)) {
|
||||
avatar = /*#__PURE__*/React.cloneElement(avatarProp, {
|
||||
className: (0, _clsx.default)(classes.avatar, avatarProp.props.className)
|
||||
});
|
||||
}
|
||||
let icon = null;
|
||||
if (iconProp && /*#__PURE__*/React.isValidElement(iconProp)) {
|
||||
icon = /*#__PURE__*/React.cloneElement(iconProp, {
|
||||
className: (0, _clsx.default)(classes.icon, iconProp.props.className)
|
||||
});
|
||||
}
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (avatar && icon) {
|
||||
console.error('MUI: The Chip component can not handle the avatar ' + 'and the icon prop at the same time. Pick one.');
|
||||
}
|
||||
}
|
||||
const externalForwardedProps = {
|
||||
slots,
|
||||
slotProps
|
||||
};
|
||||
const [RootSlot, rootProps] = (0, _useSlot.default)('root', {
|
||||
elementType: ChipRoot,
|
||||
externalForwardedProps: {
|
||||
...externalForwardedProps,
|
||||
...other
|
||||
},
|
||||
ownerState,
|
||||
// The `component` prop is preserved because `Chip` relies on it for internal logic. If `shouldForwardComponentProp` were `false`, `useSlot` would remove the `component` prop, potentially breaking the component's behavior.
|
||||
shouldForwardComponentProp: true,
|
||||
ref: handleRef,
|
||||
className: (0, _clsx.default)(classes.root, className),
|
||||
additionalProps: {
|
||||
disabled: clickable && disabled ? true : undefined,
|
||||
tabIndex: skipFocusWhenDisabled && disabled ? -1 : tabIndex,
|
||||
...moreProps
|
||||
},
|
||||
getSlotProps: handlers => ({
|
||||
...handlers,
|
||||
onClick: event => {
|
||||
handlers.onClick?.(event);
|
||||
onClick?.(event);
|
||||
},
|
||||
onKeyDown: event => {
|
||||
handlers.onKeyDown?.(event);
|
||||
handleKeyDown?.(event);
|
||||
},
|
||||
onKeyUp: event => {
|
||||
handlers.onKeyUp?.(event);
|
||||
handleKeyUp?.(event);
|
||||
}
|
||||
})
|
||||
});
|
||||
const [LabelSlot, labelProps] = (0, _useSlot.default)('label', {
|
||||
elementType: ChipLabel,
|
||||
externalForwardedProps,
|
||||
ownerState,
|
||||
className: classes.label
|
||||
});
|
||||
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(RootSlot, {
|
||||
as: component,
|
||||
...rootProps,
|
||||
children: [avatar || icon, /*#__PURE__*/(0, _jsxRuntime.jsx)(LabelSlot, {
|
||||
...labelProps,
|
||||
children: label
|
||||
}), deleteIcon]
|
||||
});
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? Chip.propTypes /* remove-proptypes */ = {
|
||||
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
||||
// │ These PropTypes are generated from the TypeScript type definitions. │
|
||||
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
||||
// └─────────────────────────────────────────────────────────────────────┘
|
||||
/**
|
||||
* The Avatar element to display.
|
||||
*/
|
||||
avatar: _propTypes.default.element,
|
||||
/**
|
||||
* This prop isn't supported.
|
||||
* Use the `component` prop if you need to change the children structure.
|
||||
*/
|
||||
children: _unsupportedProp.default,
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes: _propTypes.default.object,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: _propTypes.default.string,
|
||||
/**
|
||||
* If `true`, the chip will appear clickable, and will raise when pressed,
|
||||
* even if the onClick prop is not defined.
|
||||
* If `false`, the chip will not appear clickable, even if onClick prop is defined.
|
||||
* This can be used, for example,
|
||||
* along with the component prop to indicate an anchor Chip is clickable.
|
||||
* Note: this controls the UI and does not affect the onClick event.
|
||||
*/
|
||||
clickable: _propTypes.default.bool,
|
||||
/**
|
||||
* The color of the component.
|
||||
* It supports both default and custom theme colors, which can be added as shown in the
|
||||
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
||||
* @default 'default'
|
||||
*/
|
||||
color: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['default', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), _propTypes.default.string]),
|
||||
/**
|
||||
* The component used for the root node.
|
||||
* Either a string to use a HTML element or a component.
|
||||
*/
|
||||
component: _propTypes.default.elementType,
|
||||
/**
|
||||
* Override the default delete icon element. Shown only if `onDelete` is set.
|
||||
*/
|
||||
deleteIcon: _propTypes.default.element,
|
||||
/**
|
||||
* If `true`, the component is disabled.
|
||||
* @default false
|
||||
*/
|
||||
disabled: _propTypes.default.bool,
|
||||
/**
|
||||
* Icon element.
|
||||
*/
|
||||
icon: _propTypes.default.element,
|
||||
/**
|
||||
* The content of the component.
|
||||
*/
|
||||
label: _propTypes.default.node,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
onClick: _propTypes.default.func,
|
||||
/**
|
||||
* Callback fired when the delete icon is clicked.
|
||||
* If set, the delete icon will be shown.
|
||||
*/
|
||||
onDelete: _propTypes.default.func,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
onKeyDown: _propTypes.default.func,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
onKeyUp: _propTypes.default.func,
|
||||
/**
|
||||
* The size of the component.
|
||||
* @default 'medium'
|
||||
*/
|
||||
size: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['medium', 'small']), _propTypes.default.string]),
|
||||
/**
|
||||
* If `true`, allows the disabled chip to escape focus.
|
||||
* If `false`, allows the disabled chip to receive focus.
|
||||
* @default false
|
||||
*/
|
||||
skipFocusWhenDisabled: _propTypes.default.bool,
|
||||
/**
|
||||
* The props used for each slot inside.
|
||||
* @default {}
|
||||
*/
|
||||
slotProps: _propTypes.default.shape({
|
||||
label: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
||||
root: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
|
||||
}),
|
||||
/**
|
||||
* The components used for each slot inside.
|
||||
* @default {}
|
||||
*/
|
||||
slots: _propTypes.default.shape({
|
||||
label: _propTypes.default.elementType,
|
||||
root: _propTypes.default.elementType
|
||||
}),
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
tabIndex: _propTypes.default.number,
|
||||
/**
|
||||
* The variant to use.
|
||||
* @default 'filled'
|
||||
*/
|
||||
variant: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['filled', 'outlined']), _propTypes.default.string])
|
||||
} : void 0;
|
||||
var _default = exports.default = Chip;
|
||||
150
node_modules/@mui/material/Chip/chipClasses.d.ts
generated
vendored
Normal file
150
node_modules/@mui/material/Chip/chipClasses.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
export interface ChipClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
/** Styles applied to the root element if `size="small"`. */
|
||||
sizeSmall: string;
|
||||
/** Styles applied to the root element if `size="medium"`. */
|
||||
sizeMedium: string;
|
||||
/** Styles applied to the root element if `color="default"`. */
|
||||
colorDefault: string;
|
||||
/** Styles applied to the root element if `color="error"`. */
|
||||
colorError: string;
|
||||
/** Styles applied to the root element if `color="info"`. */
|
||||
colorInfo: string;
|
||||
/** Styles applied to the root element if `color="primary"`. */
|
||||
colorPrimary: string;
|
||||
/** Styles applied to the root element if `color="secondary"`. */
|
||||
colorSecondary: string;
|
||||
/** Styles applied to the root element if `color="success"`. */
|
||||
colorSuccess: string;
|
||||
/** Styles applied to the root element if `color="warning"`. */
|
||||
colorWarning: string;
|
||||
/** State class applied to the root element if `disabled={true}`. */
|
||||
disabled: string;
|
||||
/** Styles applied to the root element if `onClick` is defined or `clickable={true}`. */
|
||||
clickable: string;
|
||||
/** Styles applied to the root element if `onClick` and `color="primary"` is defined or `clickable={true}`.
|
||||
* @deprecated Combine the [.MuiChip-clickable](/material-ui/api/chip/#chip-classes-clickable) and [.MuiChip-colorPrimary](/material-ui/api/chip/#chip-classes-colorPrimary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
clickableColorPrimary: string;
|
||||
/** Styles applied to the root element if `onClick` and `color="secondary"` is defined or `clickable={true}`.
|
||||
* @deprecated Combine the [.MuiChip-clickable](/material-ui/api/chip/#chip-classes-clickable) and [.MuiChip-colorSecondary](/material-ui/api/chip/#chip-classes-colorSecondary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
clickableColorSecondary: string;
|
||||
/** Styles applied to the root element if `onDelete` is defined. */
|
||||
deletable: string;
|
||||
/** Styles applied to the root element if `onDelete` and `color="primary"` is defined.
|
||||
* @deprecated Combine the [.MuiChip-deletable](/material-ui/api/chip/#chip-classes-deletable) and [.MuiChip-colorPrimary](/material-ui/api/chip/#chip-classes-colorPrimary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
deletableColorPrimary: string;
|
||||
/** Styles applied to the root element if `onDelete` and `color="secondary"` is defined.
|
||||
* @deprecated Combine the [.MuiChip-deletable](/material-ui/api/chip/#chip-classes-deletable) and [.MuiChip-colorSecondary](/material-ui/api/chip/#chip-classes-colorSecondary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
deletableColorSecondary: string;
|
||||
/** Styles applied to the root element if `variant="outlined"`. */
|
||||
outlined: string;
|
||||
/** Styles applied to the root element if `variant="filled"`. */
|
||||
filled: string;
|
||||
/** Styles applied to the root element if `variant="outlined"` and `color="primary"`.
|
||||
* @deprecated Combine the [.MuiChip-outlined](/material-ui/api/chip/#chip-classes-outlined) and [.MuiChip-colorPrimary](/material-ui/api/chip/#chip-classes-colorPrimary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
outlinedPrimary: string;
|
||||
/** Styles applied to the root element if `variant="outlined"` and `color="secondary"`.
|
||||
* @deprecated Combine the [.MuiChip-outlined](/material-ui/api/chip/#chip-classes-outlined) and [.MuiChip-colorSecondary](/material-ui/api/chip/#chip-classes-colorSecondary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
outlinedSecondary: string;
|
||||
/** Styles applied to the root element if `variant="filled"` and `color="primary"`.
|
||||
* @deprecated Combine the [.MuiChip-filled](/material-ui/api/chip/#chip-classes-filled) and [.MuiChip-colorPrimary](/material-ui/api/chip/#chip-classes-colorPrimary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
filledPrimary: string;
|
||||
/** Styles applied to the root element if `variant="filled"` and `color="secondary"`.
|
||||
* @deprecated Combine the [.MuiChip-filled](/material-ui/api/chip/#chip-classes-filled) and [.MuiChip-colorSecondary](/material-ui/api/chip/#chip-classes-colorSecondary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
filledSecondary: string;
|
||||
/** Styles applied to the avatar element. */
|
||||
avatar: string;
|
||||
/** Styles applied to the avatar element if `size="small"`.
|
||||
* @deprecated Combine the [.MuiChip-avatar](/material-ui/api/chip/#chip-classes-avatar) and [.MuiChip-sizeSmall](/material-ui/api/chip/#chip-classes-sizeSmall) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
avatarSmall: string;
|
||||
/** Styles applied to the avatar element if `size="medium"`.
|
||||
* @deprecated Combine the [.MuiChip-avatar](/material-ui/api/chip/#chip-classes-avatar) and [.MuiChip-sizeMedium](/material-ui/api/chip/#chip-classes-sizeMedium) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
avatarMedium: string;
|
||||
/** Styles applied to the avatar element if `color="primary"`.
|
||||
* @deprecated Combine the [.MuiChip-avatar](/material-ui/api/chip/#chip-classes-avatar) and [.MuiChip-colorPrimary](/material-ui/api/chip/#chip-classes-colorPrimary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
avatarColorPrimary: string;
|
||||
/** Styles applied to the avatar element if `color="secondary"`.
|
||||
* @deprecated Combine the [.MuiChip-avatar](/material-ui/api/chip/#chip-classes-avatar) and [.MuiChip-colorSecondary](/material-ui/api/chip/#chip-classes-colorSecondary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
avatarColorSecondary: string;
|
||||
/** Styles applied to the icon element. */
|
||||
icon: string;
|
||||
/** Styles applied to the icon element if `size="small"`.
|
||||
* @deprecated Combine the [.MuiChip-icon](/material-ui/api/chip/#chip-classes-icon) and [.MuiChip-sizeSmall](/material-ui/api/chip/#chip-classes-sizeSmall) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
iconSmall: string;
|
||||
/** Styles applied to the icon element if `size="medium"`.
|
||||
* @deprecated Combine the [.MuiChip-icon](/material-ui/api/chip/#chip-classes-icon) and [.MuiChip-sizeMedium](/material-ui/api/chip/#chip-classes-sizeMedium) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
iconMedium: string;
|
||||
/** Styles applied to the icon element if `color="primary"`.
|
||||
* @deprecated Combine the [.MuiChip-icon](/material-ui/api/chip/#chip-classes-icon) and [.MuiChip-colorPrimary](/material-ui/api/chip/#chip-classes-colorPrimary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
iconColorPrimary: string;
|
||||
/** Styles applied to the icon element if `color="secondary"`.
|
||||
* @deprecated Combine the [.MuiChip-icon](/material-ui/api/chip/#chip-classes-icon) and [.MuiChip-colorSecondary](/material-ui/api/chip/#chip-classes-colorSecondary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
iconColorSecondary: string;
|
||||
/** Styles applied to the label `span` element. */
|
||||
label: string;
|
||||
/** Styles applied to the label `span` element if `size="small"`.
|
||||
* @deprecated Combine the [.MuiChip-label](/material-ui/api/chip/#chip-classes-label) and [.MuiChip-sizeSmall](/material-ui/api/chip/#chip-classes-sizeSmall) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
labelSmall: string;
|
||||
/** Styles applied to the label `span` element if `size="medium"`.
|
||||
* @deprecated Combine the [.MuiChip-label](/material-ui/api/chip/#chip-classes-label) and [.MuiChip-sizeMedium](/material-ui/api/chip/#chip-classes-sizeMedium) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
labelMedium: string;
|
||||
/** Styles applied to the deleteIcon element. */
|
||||
deleteIcon: string;
|
||||
/** Styles applied to the deleteIcon element if `size="small"`.
|
||||
* @deprecated Combine the [.MuiChip-deleteIcon](/material-ui/api/chip/#chip-classes-deleteIcon) and [.MuiChip-sizeSmall](/material-ui/api/chip/#chip-classes-sizeSmall) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
deleteIconSmall: string;
|
||||
/** Styles applied to the deleteIcon element if `size="medium"`.
|
||||
* @deprecated Combine the [.MuiChip-deleteIcon](/material-ui/api/chip/#chip-classes-deleteIcon) and [.MuiChip-sizeMedium](/material-ui/api/chip/#chip-classes-sizeMedium) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
deleteIconMedium: string;
|
||||
/** Styles applied to the deleteIcon element if `color="primary"`.
|
||||
* @deprecated Combine the [.MuiChip-deleteIcon](/material-ui/api/chip/#chip-classes-deleteIcon) and [.MuiChip-colorPrimary](/material-ui/api/chip/#chip-classes-colorPrimary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
deleteIconColorPrimary: string;
|
||||
/** Styles applied to the deleteIcon element if `color="secondary"`.
|
||||
* @deprecated Combine the [.MuiChip-deleteIcon](/material-ui/api/chip/#chip-classes-deleteIcon) and [.MuiChip-colorSecondary](/material-ui/api/chip/#chip-classes-colorSecondary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
deleteIconColorSecondary: string;
|
||||
/** Styles applied to the deleteIcon element if `color="primary"` and `variant="outlined"`.
|
||||
* @deprecated Combine the [.MuiChip-deleteIcon](/material-ui/api/chip/#chip-classes-deleteIcon) , [.MuiChip-outlined](/material-ui/api/chip/#chip-classes-outlined) and [.MuiChip-colorPrimary](/material-ui/api/chip/#chip-classes-colorPrimary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
deleteIconOutlinedColorPrimary: string;
|
||||
/** Styles applied to the deleteIcon element if `color="secondary"` and `variant="outlined"`.
|
||||
* @deprecated Combine the [.MuiChip-deleteIcon](/material-ui/api/chip/#chip-classes-deleteIcon) , [.MuiChip-outlined](/material-ui/api/chip/#chip-classes-outlined) and [.MuiChip-colorSecondary](/material-ui/api/chip/#chip-classes-colorSecondary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
deleteIconOutlinedColorSecondary: string;
|
||||
/** Styles applied to the deleteIcon element if `color="primary"` and `variant="filled"`.
|
||||
* @deprecated Combine the [.MuiChip-deleteIcon](/material-ui/api/chip/#chip-classes-deleteIcon) , [.MuiChip-filled](/material-ui/api/chip/#chip-classes-filled) and [.MuiChip-colorPrimary](/material-ui/api/chip/#chip-classes-colorPrimary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
deleteIconFilledColorPrimary: string;
|
||||
/** Styles applied to the deleteIcon element if `color="secondary"` and `variant="filled"`.
|
||||
* @deprecated Combine the [.MuiChip-deleteIcon](/material-ui/api/chip/#chip-classes-deleteIcon) , [.MuiChip-filled](/material-ui/api/chip/#chip-classes-filled) and [.MuiChip-colorSecondary](/material-ui/api/chip/#chip-classes-colorSecondary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
deleteIconFilledColorSecondary: string;
|
||||
/** State class applied to the root element if keyboard focused. */
|
||||
focusVisible: string;
|
||||
}
|
||||
export type ChipClassKey = keyof ChipClasses;
|
||||
export declare function getChipUtilityClass(slot: string): string;
|
||||
declare const chipClasses: ChipClasses;
|
||||
export default chipClasses;
|
||||
15
node_modules/@mui/material/Chip/chipClasses.js
generated
vendored
Normal file
15
node_modules/@mui/material/Chip/chipClasses.js
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
exports.getChipUtilityClass = getChipUtilityClass;
|
||||
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
|
||||
var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
|
||||
function getChipUtilityClass(slot) {
|
||||
return (0, _generateUtilityClass.default)('MuiChip', slot);
|
||||
}
|
||||
const chipClasses = (0, _generateUtilityClasses.default)('MuiChip', ['root', 'sizeSmall', 'sizeMedium', 'colorDefault', 'colorError', 'colorInfo', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorWarning', 'disabled', 'clickable', 'clickableColorPrimary', 'clickableColorSecondary', 'deletable', 'deletableColorPrimary', 'deletableColorSecondary', 'outlined', 'filled', 'outlinedPrimary', 'outlinedSecondary', 'filledPrimary', 'filledSecondary', 'avatar', 'avatarSmall', 'avatarMedium', 'avatarColorPrimary', 'avatarColorSecondary', 'icon', 'iconSmall', 'iconMedium', 'iconColorPrimary', 'iconColorSecondary', 'label', 'labelSmall', 'labelMedium', 'deleteIcon', 'deleteIconSmall', 'deleteIconMedium', 'deleteIconColorPrimary', 'deleteIconColorSecondary', 'deleteIconOutlinedColorPrimary', 'deleteIconOutlinedColorSecondary', 'deleteIconFilledColorPrimary', 'deleteIconFilledColorSecondary', 'focusVisible']);
|
||||
var _default = exports.default = chipClasses;
|
||||
4
node_modules/@mui/material/Chip/index.d.ts
generated
vendored
Normal file
4
node_modules/@mui/material/Chip/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
export { default } from "./Chip.js";
|
||||
export * from "./Chip.js";
|
||||
export { default as chipClasses } from "./chipClasses.js";
|
||||
export * from "./chipClasses.js";
|
||||
35
node_modules/@mui/material/Chip/index.js
generated
vendored
Normal file
35
node_modules/@mui/material/Chip/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _exportNames = {
|
||||
chipClasses: true
|
||||
};
|
||||
Object.defineProperty(exports, "chipClasses", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _chipClasses.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _Chip.default;
|
||||
}
|
||||
});
|
||||
var _Chip = _interopRequireDefault(require("./Chip"));
|
||||
var _chipClasses = _interopRequireWildcard(require("./chipClasses"));
|
||||
Object.keys(_chipClasses).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _chipClasses[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _chipClasses[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue