@m4l/components 9.1.53 → 9.1.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/types.d.ts +10 -1
- package/components/Chip/Chip.js +108 -0
- package/components/Chip/ChipStyles.js +533 -0
- package/components/Chip/constants.d.ts +4 -0
- package/components/Chip/constants.js +8 -0
- package/components/Chip/slots/ChipEnum.d.ts +7 -7
- package/components/Chip/slots/ChipEnum.js +11 -0
- package/components/Chip/slots/ChipSlots.js +35 -0
- package/components/Chip/slots/index.js +1 -0
- package/components/Chip/types.d.ts +41 -11
- package/components/DynamicFilter/types.d.ts +2 -2
- package/components/Label/Label.styles.js +28 -8
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +9 -21
- package/components/hook-form/RHFAutocomplete/RFHAutocompleteStyles.d.ts +2 -0
- package/components/hook-form/RHFAutocomplete/RFHAutocompleteStyles.js +24 -0
- package/components/hook-form/RHFAutocomplete/RHFAutocomplete.d.ts +3 -5
- package/components/hook-form/RHFAutocomplete/RHFAutocomplete.js +161 -4
- package/components/hook-form/RHFAutocomplete/RHFAutocomplete.test.d.ts +1 -0
- package/components/hook-form/RHFAutocomplete/constants.d.ts +9 -0
- package/components/hook-form/RHFAutocomplete/constants.js +4 -0
- package/components/hook-form/RHFAutocomplete/oldTypes.d.ts +43 -0
- package/components/hook-form/RHFAutocomplete/slots/RHFAutocompleteEnum.d.ts +4 -0
- package/components/hook-form/RHFAutocomplete/slots/RHFAutocompleteEnum.js +8 -0
- package/components/hook-form/RHFAutocomplete/slots/RHFAutocompleteSlots.d.ts +6 -0
- package/components/hook-form/RHFAutocomplete/slots/RHFAutocompleteSlots.js +17 -0
- package/components/hook-form/RHFAutocomplete/slots/index.d.ts +2 -0
- package/components/hook-form/RHFAutocomplete/slots/index.js +1 -0
- package/components/hook-form/RHFAutocomplete/types.d.ts +63 -25
- package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync.d.ts +5 -8
- package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync.js +105 -4
- package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsyncStyles.d.ts +2 -0
- package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsyncStyles.js +6 -0
- package/components/hook-form/RHFAutocompleteAsync/constants.d.ts +9 -0
- package/components/hook-form/RHFAutocompleteAsync/constants.js +4 -0
- package/components/hook-form/RHFAutocompleteAsync/slots/RHFAutocompleteEnumAsync.d.ts +3 -0
- package/components/hook-form/RHFAutocompleteAsync/slots/RHFAutocompleteEnumAsync.js +7 -0
- package/components/hook-form/RHFAutocompleteAsync/slots/RHFAutocompleteSlotsAsync.d.ts +1 -0
- package/components/hook-form/RHFAutocompleteAsync/slots/RHFAutocompleteSlotsAsync.js +12 -0
- package/components/hook-form/RHFAutocompleteAsync/slots/index.d.ts +2 -0
- package/components/hook-form/RHFAutocompleteAsync/slots/index.js +1 -0
- package/components/hook-form/RHFAutocompleteAsync/types.d.ts +19 -5
- package/components/mui_extended/Autocomplete/Autocomplete.d.ts +1 -1
- package/components/mui_extended/Autocomplete/Autocomplete.js +299 -0
- package/components/mui_extended/Autocomplete/AutocompleteStyles.js +136 -0
- package/components/mui_extended/Autocomplete/constants.js +4 -0
- package/components/mui_extended/Autocomplete/dictionary.d.ts +0 -2
- package/components/mui_extended/Autocomplete/index.js +1 -0
- package/components/mui_extended/Autocomplete/renderOptions/index.d.ts +3 -0
- package/components/mui_extended/Autocomplete/renderOptions/index.js +24 -0
- package/components/mui_extended/Autocomplete/slots /AutocompleteEnum.d.ts +2 -1
- package/components/mui_extended/Autocomplete/slots /AutocompleteEnum.js +19 -0
- package/components/mui_extended/Autocomplete/slots /AutocompleteSlots.d.ts +3 -0
- package/components/mui_extended/Autocomplete/slots /AutocompleteSlots.js +72 -0
- package/components/mui_extended/Autocomplete/slots /index.js +1 -0
- package/components/mui_extended/Autocomplete/types.d.ts +2 -2
- package/components/mui_extended/CircularProgress/CircularProgress.js +1 -1
- package/components/mui_extended/MenuItem/MenuItem.js +11 -12
- package/components/mui_extended/MenuItem/MenuItem.styles.js +56 -66
- package/components/mui_extended/MenuItem/constants.d.ts +4 -0
- package/components/mui_extended/MenuItem/constants.js +5 -1
- package/components/mui_extended/MenuItem/slots/MenuItemEnum.d.ts +1 -1
- package/components/mui_extended/MenuItem/slots/MenuItemEnum.js +1 -1
- package/components/mui_extended/MenuItem/slots/MenuItemSlots.js +3 -3
- package/components/mui_extended/MenuItem/types.d.ts +32 -11
- package/components/mui_extended/Pager/classes/index.d.ts +1 -1
- package/components/mui_extended/Popper/Popper.js +79 -0
- package/components/mui_extended/Popper/PopperStyles.js +265 -0
- package/components/mui_extended/Popper/constants.js +4 -0
- package/components/mui_extended/Popper/index.js +1 -0
- package/components/mui_extended/Popper/slots/PopperEnum.js +6 -0
- package/components/mui_extended/Popper/slots/PopperStlots.js +12 -0
- package/components/mui_extended/Popper/slots/index.js +1 -0
- package/components/mui_extended/Popper/types.js +1 -0
- package/components/mui_extended/Select/slots/SelectSlots.d.ts +1 -1
- package/components/mui_extended/Select/slots/SelectSlots.js +1 -1
- package/components/mui_extended/TextField/TextField.js +11 -11
- package/components/mui_extended/TextField/TextField.styles.js +108 -203
- package/components/mui_extended/TextField/constants.d.ts +10 -0
- package/components/mui_extended/TextField/constants.js +8 -3
- package/components/mui_extended/TextField/slots/TextFieldEnum.d.ts +4 -0
- package/components/mui_extended/TextField/slots/TextFieldEnum.js +7 -1
- package/components/mui_extended/TextField/slots/TextFieldSlots.js +1 -1
- package/components/mui_extended/TextField/types.d.ts +3 -4
- package/components/mui_extended/Typography/Typography.js +4 -3
- package/components/mui_extended/Typography/constants.d.ts +4 -0
- package/components/mui_extended/Typography/constants.js +5 -1
- package/components/mui_extended/Typography/slots/typographySlots.js +1 -1
- package/package.json +1 -1
- package/utils/getHeightSizeStyles.d.ts +12 -0
- package/utils/getHeightSizeStyles.js +13 -0
- package/components/hook-form/RHFAutocomplete/classes/constant.d.ts +0 -1
- package/components/hook-form/RHFAutocomplete/classes/constant.js +0 -4
- package/components/hook-form/RHFAutocomplete/classes/index.d.ts +0 -19
- package/components/hook-form/RHFAutocomplete/classes/index.js +0 -77
- package/components/hook-form/RHFAutocomplete/classes/types.d.ts +0 -26
- package/components/hook-form/RHFAutocomplete/styles.d.ts +0 -1
- package/components/hook-form/RHFAutocomplete/styles.js +0 -7
- package/components/hook-form/RHFAutocomplete/subcomponents/ComponentTypeImage/index.d.ts +0 -5
- package/components/hook-form/RHFAutocomplete/subcomponents/ComponentTypeImage/index.js +0 -293
- package/components/hook-form/RHFAutocomplete/subcomponents/ComponentTypeText/index.d.ts +0 -9
- package/components/hook-form/RHFAutocomplete/subcomponents/ComponentTypeText/index.js +0 -281
- package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/index.d.ts +0 -6
- package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/index.js +0 -25
- package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/styles.d.ts +0 -1
- package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/styles.js +0 -9
- package/components/hook-form/RHFAutocomplete/subcomponents/Skeleton/index.d.ts +0 -5
- package/components/hook-form/RHFAutocomplete/subcomponents/Skeleton/index.js +0 -28
- package/components/hook-form/RHFAutocomplete/subcomponents/Skeleton/types.d.ts +0 -6
- package/components/hook-form/RHFAutocomplete/test/constants.d.ts +0 -2
- package/components/hook-form/RHFAutocomplete/test/constants.js +0 -6
- package/components/hook-form/RHFAutocomplete/test/utils.d.ts +0 -2
- package/components/hook-form/RHFAutocomplete/test/utils.js +0 -7
- package/components/hook-form/RHFAutocompleteAsync/classes/constant.d.ts +0 -1
- package/components/hook-form/RHFAutocompleteAsync/classes/constant.js +0 -4
- package/components/hook-form/RHFAutocompleteAsync/classes/index.d.ts +0 -9
- package/components/hook-form/RHFAutocompleteAsync/classes/index.js +0 -26
- package/components/hook-form/RHFAutocompleteAsync/classes/types.d.ts +0 -4
- package/components/hook-form/RHFAutocompleteAsync/styles.d.ts +0 -4
- package/components/hook-form/RHFAutocompleteAsync/styles.js +0 -34
- package/components/hook-form/RHFAutocompleteAsync/subcomponents/ComponentTypeImage/index.d.ts +0 -10
- package/components/hook-form/RHFAutocompleteAsync/subcomponents/ComponentTypeImage/index.js +0 -103
- package/components/hook-form/RHFAutocompleteAsync/subcomponents/ComponentTypeText/index.d.ts +0 -9
- package/components/hook-form/RHFAutocompleteAsync/subcomponents/ComponentTypeText/index.js +0 -103
- package/components/hook-form/RHFAutocompleteAsync/tests/constants.d.ts +0 -1
- package/components/hook-form/RHFAutocompleteAsync/tests/constants.js +0 -4
- package/components/hook-form/RHFAutocompleteAsync/tests/utils.d.ts +0 -2
- package/components/hook-form/RHFAutocompleteAsync/tests/utils.js +0 -7
package/@types/types.d.ts
CHANGED
|
@@ -137,6 +137,8 @@ import { PopoverOwnerState, PopoverSlotsType } from '../components/mui_extended/
|
|
|
137
137
|
import { AccountPopoverOwnerState, AccountPopoverSlotsType } from '../components/AccountPopover/types';
|
|
138
138
|
import { PropertyVaLueOwnerState, PropertyValueType } from '../components/PropertyValue/types';
|
|
139
139
|
|
|
140
|
+
import { RHFAutocompleteOwnerState, RHFAutocompleteSlotsType } from '../components/hook-form/RHFAutocomplete/types';
|
|
141
|
+
|
|
140
142
|
declare module '@mui/material/styles' {
|
|
141
143
|
// Define the slots in the theme
|
|
142
144
|
interface ComponentNameToClassKey {
|
|
@@ -186,6 +188,7 @@ declare module '@mui/material/styles' {
|
|
|
186
188
|
M4LToggleButton: ToggleButtonSlotsType;
|
|
187
189
|
M4LBooleanFormatter: PresentationType;
|
|
188
190
|
M4LToggleIconButton: ToggleIconButtonSlotsType;
|
|
191
|
+
RHFM4LAutocomplete: RHFAutocompleteSlotsType;
|
|
189
192
|
M4LAccountPopover: AccountPopoverSlotsType;
|
|
190
193
|
M4LPropertyValue: PropertyValueType;
|
|
191
194
|
}
|
|
@@ -236,6 +239,7 @@ declare module '@mui/material/styles' {
|
|
|
236
239
|
M4LToggleButton: Partial<ToggleButtonOwnerState>;
|
|
237
240
|
M4LBooleanFormatter: Partial<BooleanFormatterOwnerState>;
|
|
238
241
|
M4LToggleIconButton: Partial<ToggleIconButtonOwnerState>;
|
|
242
|
+
RHFM4LAutocomplete: Partial<RHFAutocompleteOwnerState>;
|
|
239
243
|
M4LAccountPopover: Partial<AccountPopoverOwnerState>;
|
|
240
244
|
M4LPropertyValue: Partial<PropertyVaLueOwnerState>;
|
|
241
245
|
M4LColor: Partial<ColorOwnerState>;
|
|
@@ -573,10 +577,15 @@ declare module '@mui/material/styles' {
|
|
|
573
577
|
styleOverrides?: ComponentsOverrides<Theme>['M4LRHFColorPicker'];
|
|
574
578
|
variants?: ComponentsVariants['M4LRHFColorPicker'];
|
|
575
579
|
};
|
|
580
|
+
RHFM4LAutocomplete?: {
|
|
581
|
+
defaultProps?: ComponentsPropsList['RHFM4LAutocomplete'];
|
|
582
|
+
styleOverrides?: ComponentsOverrides<Theme>['RHFM4LAutocomplete'];
|
|
583
|
+
variants?: ComponentsVariants['RHFM4LAutocomplete'];
|
|
584
|
+
};
|
|
576
585
|
M4LAccountPopover?: {
|
|
577
586
|
defaultProps?: ComponentsPropsList['M4LAccountPopover'];
|
|
578
587
|
styleOverrides?: ComponentsOverrides<Theme>['M4LAccountPopover'];
|
|
579
588
|
variants?: ComponentsVariants['M4LAccountPopover'];
|
|
580
589
|
};
|
|
581
590
|
}
|
|
582
|
-
}
|
|
591
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useModuleSkeleton, useEnvironment, getPropertyByString } from "@m4l/core";
|
|
3
|
+
import { useTheme } from "@mui/material";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
import { forwardRef } from "react";
|
|
6
|
+
import { C as CHIP_CLASSES } from "./constants.js";
|
|
7
|
+
import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
|
|
8
|
+
import { S as SkeletonChipStyled, C as ChipRootStyled, T as TextChipStyled, I as IconButtonStyled, a as IconStyled } from "./slots/ChipSlots.js";
|
|
9
|
+
const Chip = forwardRef((props, ref) => {
|
|
10
|
+
const {
|
|
11
|
+
endIcon,
|
|
12
|
+
label,
|
|
13
|
+
startIcon,
|
|
14
|
+
color = "default",
|
|
15
|
+
size = "small",
|
|
16
|
+
variant = "contained",
|
|
17
|
+
skeletonWidth = "100%",
|
|
18
|
+
opacity = false,
|
|
19
|
+
hasIconClose = true,
|
|
20
|
+
onClick,
|
|
21
|
+
onDeleted,
|
|
22
|
+
className,
|
|
23
|
+
...others
|
|
24
|
+
} = props;
|
|
25
|
+
const { currentSize } = useComponentSize(size);
|
|
26
|
+
const isSkeleton = useModuleSkeleton();
|
|
27
|
+
const theme = useTheme();
|
|
28
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
29
|
+
const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
|
|
30
|
+
const paletteColor = getPropertyByString(
|
|
31
|
+
theme.vars.palette,
|
|
32
|
+
color || "default",
|
|
33
|
+
theme.vars.palette.default
|
|
34
|
+
);
|
|
35
|
+
const ownerState = {
|
|
36
|
+
chipSize: adjustedSize,
|
|
37
|
+
variant,
|
|
38
|
+
paletteColor,
|
|
39
|
+
color,
|
|
40
|
+
opacity
|
|
41
|
+
};
|
|
42
|
+
if (isSkeleton) {
|
|
43
|
+
return /* @__PURE__ */ jsx(
|
|
44
|
+
SkeletonChipStyled,
|
|
45
|
+
{
|
|
46
|
+
"data-testid": "SkeletonButton",
|
|
47
|
+
width: skeletonWidth,
|
|
48
|
+
ownerState: { ...ownerState }
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
const iconClose = `${host_static_assets}/${environment_assets}/frontend/components/chip/assets/icons/closeSmall.svg`;
|
|
53
|
+
const renderIcon = (icon, instaceDataTestId) => {
|
|
54
|
+
if (!icon) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
if (typeof icon !== "string") {
|
|
58
|
+
return icon;
|
|
59
|
+
} else {
|
|
60
|
+
return /* @__PURE__ */ jsx(
|
|
61
|
+
IconStyled,
|
|
62
|
+
{
|
|
63
|
+
color,
|
|
64
|
+
ownerState: { ...ownerState },
|
|
65
|
+
src: icon,
|
|
66
|
+
size: adjustedSize,
|
|
67
|
+
instaceDataTestId
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const handleDelete = (e) => {
|
|
73
|
+
e.stopPropagation();
|
|
74
|
+
onDeleted?.(e);
|
|
75
|
+
};
|
|
76
|
+
return /* @__PURE__ */ jsxs(
|
|
77
|
+
ChipRootStyled,
|
|
78
|
+
{
|
|
79
|
+
role: "button-chip",
|
|
80
|
+
tabIndex: 0,
|
|
81
|
+
size: adjustedSize,
|
|
82
|
+
onClick,
|
|
83
|
+
ownerState: { ...ownerState },
|
|
84
|
+
className: clsx(className, CHIP_CLASSES.root),
|
|
85
|
+
ref,
|
|
86
|
+
...others,
|
|
87
|
+
children: [
|
|
88
|
+
renderIcon(startIcon, "ChipStartIcon"),
|
|
89
|
+
/* @__PURE__ */ jsx(TextChipStyled, { size: adjustedSize, ownerState: { ...ownerState }, color, children: label }),
|
|
90
|
+
renderIcon(endIcon, "ChipEndIcon"),
|
|
91
|
+
hasIconClose && /* @__PURE__ */ jsx(
|
|
92
|
+
IconButtonStyled,
|
|
93
|
+
{
|
|
94
|
+
src: iconClose,
|
|
95
|
+
size: adjustedSize,
|
|
96
|
+
ownerState: { ...ownerState },
|
|
97
|
+
color,
|
|
98
|
+
onClick: handleDelete
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
});
|
|
105
|
+
Chip.displayName = "Chip";
|
|
106
|
+
export {
|
|
107
|
+
Chip as C
|
|
108
|
+
};
|
|
@@ -0,0 +1,533 @@
|
|
|
1
|
+
const chipStyles = {
|
|
2
|
+
/**
|
|
3
|
+
* Styles for the root element of the chip.
|
|
4
|
+
* @author SebastianM - automatic
|
|
5
|
+
* @createdAt 2024-12-02 13:49:12 - automatic
|
|
6
|
+
* @updatedAt 2024-12-06 13:56:58 - automatic
|
|
7
|
+
* @updatedUser SebastianM - automatic
|
|
8
|
+
*/
|
|
9
|
+
root: ({ theme, ownerState }) => ({
|
|
10
|
+
display: "flex",
|
|
11
|
+
alignItems: "center",
|
|
12
|
+
padding: theme.vars.size.baseSpacings.sp1,
|
|
13
|
+
borderRadius: theme.vars.size.borderRadius["r0-5"],
|
|
14
|
+
width: "max-content",
|
|
15
|
+
cursor: "pointer",
|
|
16
|
+
...ownerState.variant === "contained" && {
|
|
17
|
+
...ownerState.color === "default" && {
|
|
18
|
+
color: theme.vars.palette.chips.default.contrastText,
|
|
19
|
+
backgroundColor: theme.vars.palette.chips.default.backgroundColor,
|
|
20
|
+
"& .M4LIconClass-root": {
|
|
21
|
+
backgroundColor: theme.vars.palette.chips.default.contrastText
|
|
22
|
+
},
|
|
23
|
+
"&:hover": {
|
|
24
|
+
backgroundColor: theme.vars.palette.chips.default.backgroundHover,
|
|
25
|
+
"&:active": {
|
|
26
|
+
backgroundColor: theme.vars.palette.chips.default.backgroundActive,
|
|
27
|
+
"& .M4LIconClass-root": {
|
|
28
|
+
backgroundColor: theme.vars.palette.chips.default.contrastText
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
...ownerState.opacity === true && {
|
|
33
|
+
color: theme.vars.palette.chips.default.semanticText,
|
|
34
|
+
backgroundColor: theme.vars.palette.chips.defaultOpacity.backgroundColor,
|
|
35
|
+
"& .M4LIconClass-root": {
|
|
36
|
+
backgroundColor: theme.vars.palette.chips.default.semanticText
|
|
37
|
+
},
|
|
38
|
+
"&:hover": {
|
|
39
|
+
backgroundColor: theme.vars.palette.chips.defaultOpacity.backgroundHover,
|
|
40
|
+
"&:active": {
|
|
41
|
+
backgroundColor: theme.vars.palette.chips.defaultOpacity.backgroundActive,
|
|
42
|
+
"& .M4LIconClass-root": {
|
|
43
|
+
backgroundColor: theme.vars.palette.chips.default.semanticText
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"&:focus-visible": {
|
|
49
|
+
boxShadow: "none",
|
|
50
|
+
outline: theme.vars.size.borderStroke.container,
|
|
51
|
+
outlineColor: theme.vars.palette.border.main,
|
|
52
|
+
outlineOffset: theme.vars.size.baseSpacings["sp0-5"],
|
|
53
|
+
backgroundColor: theme.vars.palette.chips.default.backgroundActive
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
...ownerState.color === "warning" && {
|
|
57
|
+
color: theme.vars.palette.chips.warning.contrastText,
|
|
58
|
+
backgroundColor: theme.vars.palette.chips.warning.backgroundColor,
|
|
59
|
+
"& .M4LIconClass-root": {
|
|
60
|
+
backgroundColor: theme.vars.palette.chips.warning.contrastText
|
|
61
|
+
},
|
|
62
|
+
"&:hover": {
|
|
63
|
+
backgroundColor: theme.vars.palette.chips.warning.backgroundHover,
|
|
64
|
+
"&:active": {
|
|
65
|
+
backgroundColor: theme.vars.palette.chips.warning.backgroundActive,
|
|
66
|
+
"& .M4LIconClass-root": {
|
|
67
|
+
backgroundColor: theme.vars.palette.chips.warning.contrastText
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
...ownerState.opacity === true && {
|
|
72
|
+
color: theme.vars.palette.chips.warningOpacity.contrastText,
|
|
73
|
+
backgroundColor: theme.vars.palette.chips.warningOpacity.backgroundColor,
|
|
74
|
+
"& .M4LIconClass-root": {
|
|
75
|
+
backgroundColor: theme.vars.palette.text.primary
|
|
76
|
+
},
|
|
77
|
+
"&:hover": {
|
|
78
|
+
backgroundColor: theme.vars.palette.chips.warningOpacity.backgroundHover,
|
|
79
|
+
"&:active": {
|
|
80
|
+
backgroundColor: theme.vars.palette.chips.warningOpacity.backgroundActive,
|
|
81
|
+
"& .M4LIconClass-root": {
|
|
82
|
+
backgroundColor: theme.vars.palette.text.primary
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"&:focus-visible": {
|
|
88
|
+
boxShadow: "none",
|
|
89
|
+
outline: theme.vars.size.borderStroke.container,
|
|
90
|
+
outlineColor: theme.vars.palette.border.main,
|
|
91
|
+
outlineOffset: theme.vars.size.baseSpacings["sp0-5"],
|
|
92
|
+
backgroundColor: theme.vars.palette.chips.warning.backgroundActive
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
...ownerState.color === "success" && {
|
|
96
|
+
color: theme.vars.palette.chips.success.contrastText,
|
|
97
|
+
backgroundColor: theme.vars.palette.chips.success.backgroundColor,
|
|
98
|
+
"& .M4LIconClass-root": {
|
|
99
|
+
backgroundColor: theme.vars.palette.chips.info.contrastText
|
|
100
|
+
},
|
|
101
|
+
"&:hover": {
|
|
102
|
+
backgroundColor: theme.vars.palette.chips.success.backgroundHover,
|
|
103
|
+
"&:active": {
|
|
104
|
+
backgroundColor: theme.vars.palette.chips.success.backgroundActive,
|
|
105
|
+
"& .M4LIconClass-root": {
|
|
106
|
+
backgroundColor: theme.vars.palette.chips.info.contrastText
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
...ownerState.opacity === true && {
|
|
111
|
+
color: theme.vars.palette.text.primary,
|
|
112
|
+
backgroundColor: theme.vars.palette.chips.successOpacity.backgroundColor,
|
|
113
|
+
"& .M4LIconClass-root": {
|
|
114
|
+
backgroundColor: theme.vars.palette.text.primary
|
|
115
|
+
},
|
|
116
|
+
"&:hover": {
|
|
117
|
+
backgroundColor: theme.vars.palette.chips.successOpacity.backgroundHover,
|
|
118
|
+
"&:active": {
|
|
119
|
+
backgroundColor: theme.vars.palette.chips.successOpacity.backgroundActive,
|
|
120
|
+
"& .M4LIconClass-root": {
|
|
121
|
+
backgroundColor: theme.vars.palette.text.primary
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"&:focus-visible": {
|
|
127
|
+
boxShadow: "none",
|
|
128
|
+
outline: theme.vars.size.borderStroke.container,
|
|
129
|
+
outlineColor: theme.vars.palette.border.main,
|
|
130
|
+
outlineOffset: theme.vars.size.baseSpacings["sp0-5"],
|
|
131
|
+
backgroundColor: theme.vars.palette.chips.success.backgroundActive
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
...ownerState.color === "error" && {
|
|
135
|
+
color: theme.vars.palette.chips.error.contrastText,
|
|
136
|
+
backgroundColor: theme.vars.palette.chips.error.backgroundColor,
|
|
137
|
+
"& .M4LIconClass-root": {
|
|
138
|
+
backgroundColor: theme.vars.palette.chips.error.contrastText
|
|
139
|
+
},
|
|
140
|
+
"&:hover": {
|
|
141
|
+
backgroundColor: theme.vars.palette.chips.error.backgroundHover,
|
|
142
|
+
"&:active": {
|
|
143
|
+
backgroundColor: theme.vars.palette.chips.error.backgroundActive,
|
|
144
|
+
"& .M4LIconClass-root": {
|
|
145
|
+
backgroundColor: theme.vars.palette.chips.error.contrastText
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
...ownerState.opacity === true && {
|
|
150
|
+
color: theme.vars.palette.chips.error.semanticText,
|
|
151
|
+
backgroundColor: theme.vars.palette.chips.errorOpacity.backgroundColor,
|
|
152
|
+
"& .M4LIconClass-root": {
|
|
153
|
+
backgroundColor: theme.vars.palette.chips.error.semanticText
|
|
154
|
+
},
|
|
155
|
+
"&:hover": {
|
|
156
|
+
backgroundColor: theme.vars.palette.chips.errorOpacity.backgroundHover,
|
|
157
|
+
"&:active": {
|
|
158
|
+
backgroundColor: theme.vars.palette.chips.errorOpacity.backgroundActive,
|
|
159
|
+
"& .M4LIconClass-root": {
|
|
160
|
+
backgroundColor: theme.vars.palette.chips.error.semanticText
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"&:focus-visible": {
|
|
166
|
+
boxShadow: "none",
|
|
167
|
+
outline: theme.vars.size.borderStroke.container,
|
|
168
|
+
outlineColor: theme.vars.palette.border.main,
|
|
169
|
+
outlineOffset: theme.vars.size.baseSpacings["sp0-5"],
|
|
170
|
+
backgroundColor: theme.vars.palette.chips.error.backgroundActive
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
...ownerState.color === "info" && {
|
|
174
|
+
color: theme.vars.palette.chips.info.contrastText,
|
|
175
|
+
backgroundColor: theme.vars.palette.chips.info.backgroundColor,
|
|
176
|
+
"& .M4LIconClass-root": {
|
|
177
|
+
backgroundColor: theme.vars.palette.chips.info.contrastText
|
|
178
|
+
},
|
|
179
|
+
"&:hover": {
|
|
180
|
+
backgroundColor: theme.vars.palette.chips.info.backgroundHover,
|
|
181
|
+
"&:active": {
|
|
182
|
+
backgroundColor: theme.vars.palette.chips.info.backgroundActive,
|
|
183
|
+
"& .M4LIconClass-root": {
|
|
184
|
+
backgroundColor: theme.vars.palette.chips.info.contrastText
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
...ownerState.opacity === true && {
|
|
189
|
+
color: theme.vars.palette.text.primary,
|
|
190
|
+
backgroundColor: theme.vars.palette.chips.infoOpacity.backgroundColor,
|
|
191
|
+
"& .M4LIconClass-root": {
|
|
192
|
+
backgroundColor: theme.vars.palette.text.primary
|
|
193
|
+
},
|
|
194
|
+
"&:hover": {
|
|
195
|
+
backgroundColor: theme.vars.palette.chips.infoOpacity.backgroundHover,
|
|
196
|
+
"&:active": {
|
|
197
|
+
backgroundColor: theme.vars.palette.chips.infoOpacity.backgroundActive,
|
|
198
|
+
"& .M4LIconClass-root": {
|
|
199
|
+
backgroundColor: theme.vars.palette.text.primary
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"&:focus-visible": {
|
|
205
|
+
boxShadow: "none",
|
|
206
|
+
outline: theme.vars.size.borderStroke.container,
|
|
207
|
+
outlineColor: theme.vars.palette.border.main,
|
|
208
|
+
outlineOffset: theme.vars.size.baseSpacings["sp0-5"],
|
|
209
|
+
backgroundColor: theme.vars.palette.chips.info.backgroundActive
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
...ownerState.variant === "outlined" && {
|
|
214
|
+
backgroundColor: "transparent",
|
|
215
|
+
border: `${theme.vars.size.borderStroke.container}`,
|
|
216
|
+
...ownerState.color === "default" && {
|
|
217
|
+
color: theme.vars.palette.chips.default.semanticText,
|
|
218
|
+
borderColor: theme.vars.palette.chips.default.backgroundColor,
|
|
219
|
+
"& .M4LIconClass-root": {
|
|
220
|
+
backgroundColor: theme.vars.palette.chips.default.semanticText
|
|
221
|
+
},
|
|
222
|
+
"&:hover": {
|
|
223
|
+
backgroundColor: theme.vars.palette.chips.default.backgroundHover,
|
|
224
|
+
"&:active": {
|
|
225
|
+
backgroundColor: theme.vars.palette.chips.default.backgroundActive,
|
|
226
|
+
"& .M4LIconClass-root": {
|
|
227
|
+
backgroundColor: theme.vars.palette.chips.default.semanticText
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
...ownerState.opacity === true && {
|
|
232
|
+
color: theme.vars.palette.chips.default.semanticText,
|
|
233
|
+
borderColor: theme.vars.palette.chips.default.backgroundColor,
|
|
234
|
+
"& .M4LIconClass-root": {
|
|
235
|
+
backgroundColor: theme.vars.palette.chips.default.semanticText
|
|
236
|
+
},
|
|
237
|
+
"&:hover": {
|
|
238
|
+
backgroundColor: theme.vars.palette.chips.defaultOpacity.backgroundHover,
|
|
239
|
+
"&:active": {
|
|
240
|
+
backgroundColor: theme.vars.palette.chips.defaultOpacity.backgroundActive,
|
|
241
|
+
"& .M4LIconClass-root": {
|
|
242
|
+
backgroundColor: theme.vars.palette.chips.default.semanticText
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"&:focus-visible": {
|
|
248
|
+
boxShadow: "none",
|
|
249
|
+
outline: theme.vars.size.borderStroke.container,
|
|
250
|
+
outlineColor: theme.vars.palette.border.main,
|
|
251
|
+
outlineOffset: theme.vars.size.baseSpacings["sp0-5"],
|
|
252
|
+
backgroundColor: theme.vars.palette.chips.default.backgroundActive
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
...ownerState.color === "warning" && {
|
|
256
|
+
color: theme.vars.palette.chips.warning.semanticText,
|
|
257
|
+
borderColor: theme.vars.palette.chips.warning.backgroundColor,
|
|
258
|
+
"& .M4LIconClass-root": {
|
|
259
|
+
backgroundColor: theme.vars.palette.chips.warning.semanticText
|
|
260
|
+
},
|
|
261
|
+
"&:hover": {
|
|
262
|
+
backgroundColor: theme.vars.palette.chips.warning.backgroundHover,
|
|
263
|
+
"&:active": {
|
|
264
|
+
backgroundColor: theme.vars.palette.chips.warning.backgroundActive,
|
|
265
|
+
"& .M4LIconClass-root": {
|
|
266
|
+
backgroundColor: theme.vars.palette.chips.warning.semanticText
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
...ownerState.opacity === true && {
|
|
271
|
+
color: theme.vars.palette.chips.default.semanticText,
|
|
272
|
+
borderColor: theme.vars.palette.chips.default.backgroundColor,
|
|
273
|
+
"& .M4LIconClass-root": {
|
|
274
|
+
backgroundColor: theme.vars.palette.chips.default.semanticText
|
|
275
|
+
},
|
|
276
|
+
"&:hover": {
|
|
277
|
+
color: theme.vars.palette.chips.warning.semanticText,
|
|
278
|
+
borderColor: theme.vars.palette.chips.warningOpacity.backgroundHover,
|
|
279
|
+
backgroundColor: theme.vars.palette.chips.warningOpacity.backgroundHover,
|
|
280
|
+
"& .M4LIconClass-root": {
|
|
281
|
+
backgroundColor: theme.vars.palette.chips.warning.semanticText
|
|
282
|
+
},
|
|
283
|
+
"&:active": {
|
|
284
|
+
backgroundColor: theme.vars.palette.chips.warningOpacity.backgroundActive,
|
|
285
|
+
"& .M4LIconClass-root": {
|
|
286
|
+
backgroundColor: theme.vars.palette.chips.warning.semanticText
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"&:focus-visible": {
|
|
292
|
+
boxShadow: "none",
|
|
293
|
+
outline: theme.vars.size.borderStroke.container,
|
|
294
|
+
outlineColor: theme.vars.palette.border.main,
|
|
295
|
+
outlineOffset: theme.vars.size.baseSpacings["sp0-5"],
|
|
296
|
+
backgroundColor: theme.vars.palette.chips.warning.backgroundActive
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
...ownerState.color === "success" && {
|
|
300
|
+
color: theme.vars.palette.chips.success.semanticText,
|
|
301
|
+
borderColor: theme.vars.palette.chips.success.backgroundColor,
|
|
302
|
+
"& .M4LIconClass-root": {
|
|
303
|
+
backgroundColor: theme.vars.palette.chips.success.semanticText
|
|
304
|
+
},
|
|
305
|
+
"&:hover": {
|
|
306
|
+
color: theme.vars.palette.chips.success.contrastText,
|
|
307
|
+
backgroundColor: theme.vars.palette.chips.success.backgroundHover,
|
|
308
|
+
"& .M4LIconClass-root": {
|
|
309
|
+
backgroundColor: theme.vars.palette.chips.success.contrastText
|
|
310
|
+
},
|
|
311
|
+
"&:active": {
|
|
312
|
+
backgroundColor: theme.vars.palette.chips.success.backgroundActive,
|
|
313
|
+
"& .M4LIconClass-root": {
|
|
314
|
+
backgroundColor: theme.vars.palette.chips.success.contrastText
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
...ownerState.opacity === true && {
|
|
319
|
+
color: theme.vars.palette.chips.success.semanticText,
|
|
320
|
+
borderColor: theme.vars.palette.chips.successOpacity.backgroundColor,
|
|
321
|
+
"& .M4LIconClass-root": {
|
|
322
|
+
backgroundColor: theme.vars.palette.chips.success.semanticText
|
|
323
|
+
},
|
|
324
|
+
"&:hover": {
|
|
325
|
+
backgroundColor: theme.vars.palette.chips.successOpacity.backgroundHover,
|
|
326
|
+
"&:active": {
|
|
327
|
+
backgroundColor: theme.vars.palette.chips.successOpacity.backgroundActive,
|
|
328
|
+
"& .M4LIconClass-root": {
|
|
329
|
+
backgroundColor: theme.vars.palette.chips.success.semanticText
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
"&:focus-visible": {
|
|
335
|
+
boxShadow: "none",
|
|
336
|
+
outline: theme.vars.size.borderStroke.container,
|
|
337
|
+
outlineColor: theme.vars.palette.border.main,
|
|
338
|
+
outlineOffset: theme.vars.size.baseSpacings["sp0-5"],
|
|
339
|
+
backgroundColor: theme.vars.palette.chips.success.backgroundActive
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
...ownerState.color === "error" && {
|
|
343
|
+
color: theme.vars.palette.chips.error.semanticText,
|
|
344
|
+
borderColor: theme.vars.palette.chips.error.backgroundColor,
|
|
345
|
+
"& .M4LIconClass-root": {
|
|
346
|
+
backgroundColor: theme.vars.palette.chips.error.semanticText
|
|
347
|
+
},
|
|
348
|
+
"&:hover": {
|
|
349
|
+
color: theme.vars.palette.chips.error.contrastText,
|
|
350
|
+
backgroundColor: theme.vars.palette.chips.error.backgroundHover,
|
|
351
|
+
"& .M4LIconClass-root": {
|
|
352
|
+
backgroundColor: theme.vars.palette.chips.error.contrastText
|
|
353
|
+
},
|
|
354
|
+
"&:active": {
|
|
355
|
+
backgroundColor: theme.vars.palette.chips.error.backgroundActive,
|
|
356
|
+
"& .M4LIconClass-root": {
|
|
357
|
+
backgroundColor: theme.vars.palette.chips.error.contrastText
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
...ownerState.opacity === true && {
|
|
362
|
+
color: theme.vars.palette.chips.error.semanticText,
|
|
363
|
+
borderColor: theme.vars.palette.chips.errorOpacity.backgroundColor,
|
|
364
|
+
"& .M4LIconClass-root": {
|
|
365
|
+
backgroundColor: theme.vars.palette.chips.error.semanticText
|
|
366
|
+
},
|
|
367
|
+
"&:hover": {
|
|
368
|
+
backgroundColor: theme.vars.palette.chips.errorOpacity.backgroundHover,
|
|
369
|
+
"&:active": {
|
|
370
|
+
backgroundColor: theme.vars.palette.chips.errorOpacity.backgroundActive,
|
|
371
|
+
"& .M4LIconClass-root": {
|
|
372
|
+
backgroundColor: theme.vars.palette.chips.error.semanticText
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
"&:focus-visible": {
|
|
378
|
+
boxShadow: "none",
|
|
379
|
+
outline: theme.vars.size.borderStroke.container,
|
|
380
|
+
outlineColor: theme.vars.palette.border.main,
|
|
381
|
+
outlineOffset: theme.vars.size.baseSpacings["sp0-5"],
|
|
382
|
+
backgroundColor: theme.vars.palette.chips.error.backgroundActive
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
...ownerState.color === "info" && {
|
|
386
|
+
color: theme.vars.palette.chips.info.semanticText,
|
|
387
|
+
borderColor: theme.vars.palette.chips.info.backgroundColor,
|
|
388
|
+
"& .M4LIconClass-root": {
|
|
389
|
+
backgroundColor: theme.vars.palette.chips.info.semanticText
|
|
390
|
+
},
|
|
391
|
+
"&:hover": {
|
|
392
|
+
color: theme.vars.palette.chips.info.contrastText,
|
|
393
|
+
backgroundColor: theme.vars.palette.chips.info.backgroundHover,
|
|
394
|
+
"& .M4LIconClass-root": {
|
|
395
|
+
backgroundColor: theme.vars.palette.chips.info.contrastText
|
|
396
|
+
},
|
|
397
|
+
"&:active": {
|
|
398
|
+
backgroundColor: theme.vars.palette.chips.info.backgroundActive,
|
|
399
|
+
"& .M4LIconClass-root": {
|
|
400
|
+
backgroundColor: theme.vars.palette.chips.info.contrastText
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
...ownerState.opacity === true && {
|
|
405
|
+
color: theme.vars.palette.chips.info.semanticText,
|
|
406
|
+
borderColor: theme.vars.palette.chips.infoOpacity.backgroundColor,
|
|
407
|
+
"& .M4LIconClass-root": {
|
|
408
|
+
backgroundColor: theme.vars.palette.chips.info.semanticText
|
|
409
|
+
},
|
|
410
|
+
"&:hover": {
|
|
411
|
+
backgroundColor: theme.vars.palette.chips.infoOpacity.backgroundHover,
|
|
412
|
+
"&:active": {
|
|
413
|
+
backgroundColor: theme.vars.palette.chips.infoOpacity.backgroundActive
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
"&:focus-visible": {
|
|
418
|
+
boxShadow: "none",
|
|
419
|
+
outline: theme.vars.size.borderStroke.container,
|
|
420
|
+
outlineColor: theme.vars.palette.border.main,
|
|
421
|
+
outlineOffset: theme.vars.size.baseSpacings["sp0-5"],
|
|
422
|
+
backgroundColor: theme.vars.palette.chips.info.backgroundActive
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
// Estilos específicos para el tamaño small
|
|
427
|
+
...ownerState.chipSize === "small" && {
|
|
428
|
+
...theme.generalSettings.isMobile ? {
|
|
429
|
+
height: theme.vars.size.mobile.small.base,
|
|
430
|
+
minHeight: theme.vars.size.mobile.small.base
|
|
431
|
+
} : {
|
|
432
|
+
height: theme.vars.size.desktop.small.base,
|
|
433
|
+
minHeight: theme.vars.size.desktop.small.base
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
// Estilos específicos para el tamaño medium
|
|
437
|
+
...ownerState.chipSize === "medium" && {
|
|
438
|
+
...theme.generalSettings.isMobile ? {
|
|
439
|
+
height: theme.vars.size.mobile.medium.base,
|
|
440
|
+
minHeight: theme.vars.size.mobile.medium.base
|
|
441
|
+
} : {
|
|
442
|
+
height: theme.vars.size.desktop.medium.base,
|
|
443
|
+
minHeight: theme.vars.size.desktop.medium.base
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}),
|
|
447
|
+
/**
|
|
448
|
+
* Styles for the text chip element.
|
|
449
|
+
* @author SebastianM - automatic
|
|
450
|
+
* @createdAt 2024-12-03 11:55:46 - automatic
|
|
451
|
+
* @updatedAt 2024-12-06 13:56:58 - automatic
|
|
452
|
+
* @updatedUser SebastianM - automatic
|
|
453
|
+
*/
|
|
454
|
+
textChip: ({ theme }) => ({
|
|
455
|
+
paddingLeft: theme.vars.size.baseSpacings.sp1,
|
|
456
|
+
paddingRight: theme.vars.size.baseSpacings.sp1
|
|
457
|
+
}),
|
|
458
|
+
/**
|
|
459
|
+
* Styles for the chip icon element.
|
|
460
|
+
* @author SebastianM - automatic
|
|
461
|
+
* @createdAt 2024-12-02 13:49:12 - automatic
|
|
462
|
+
* @updatedAt 2024-12-06 13:56:58 - automatic
|
|
463
|
+
* @updatedUser SebastianM - automatic
|
|
464
|
+
*/
|
|
465
|
+
chipIcon: () => ({}),
|
|
466
|
+
/**
|
|
467
|
+
* Styles for the icon button inside the chip element.
|
|
468
|
+
* @author SebastianM - automatic
|
|
469
|
+
* @createdAt 2024-12-02 13:49:12 - automatic
|
|
470
|
+
* @updatedAt 2024-12-06 13:56:58 - automatic
|
|
471
|
+
* @updatedUser SebastianM - automatic
|
|
472
|
+
*/
|
|
473
|
+
iconButton: ({ theme, ownerState }) => ({
|
|
474
|
+
// Estilos específicos para el tamaño small
|
|
475
|
+
...ownerState.chipSize === "small" && {
|
|
476
|
+
...theme.generalSettings.isMobile ? {
|
|
477
|
+
height: theme.vars.size.mobile.small.base,
|
|
478
|
+
width: theme.vars.size.mobile.small.base,
|
|
479
|
+
minHeight: theme.vars.size.mobile.small.base
|
|
480
|
+
} : {
|
|
481
|
+
height: theme.vars.size.desktop.small.base,
|
|
482
|
+
width: theme.vars.size.desktop.small.base,
|
|
483
|
+
minHeight: theme.vars.size.desktop.small.base
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
// Estilos específicos para el tamaño medium
|
|
487
|
+
...ownerState.chipSize === "medium" && {
|
|
488
|
+
...theme.generalSettings.isMobile ? {
|
|
489
|
+
height: theme.vars.size.mobile.medium.base,
|
|
490
|
+
width: theme.vars.size.mobile.medium.base,
|
|
491
|
+
minHeight: theme.vars.size.mobile.medium.base
|
|
492
|
+
} : {
|
|
493
|
+
height: theme.vars.size.desktop.medium.base,
|
|
494
|
+
width: theme.vars.size.desktop.medium.base,
|
|
495
|
+
minHeight: theme.vars.size.desktop.medium.base
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
}),
|
|
499
|
+
/**
|
|
500
|
+
* Styles for the skeleton chip element.
|
|
501
|
+
* @author SebastianM - automatic
|
|
502
|
+
* @createdAt 2024-12-02 13:49:12 - automatic
|
|
503
|
+
* @updatedAt 2024-12-06 13:56:58 - automatic
|
|
504
|
+
* @updatedUser SebastianM - automatic
|
|
505
|
+
*/
|
|
506
|
+
skeletonChip: ({ theme, ownerState }) => ({
|
|
507
|
+
width: "100%",
|
|
508
|
+
background: theme.vars.palette.skeleton.transition,
|
|
509
|
+
// Estilos específicos para el tamaño small
|
|
510
|
+
...ownerState.chipSize === "small" && {
|
|
511
|
+
...theme.generalSettings.isMobile ? {
|
|
512
|
+
height: theme.vars.size.mobile.small.base,
|
|
513
|
+
minHeight: theme.vars.size.mobile.small.base
|
|
514
|
+
} : {
|
|
515
|
+
height: theme.vars.size.desktop.small.base,
|
|
516
|
+
minHeight: theme.vars.size.desktop.small.base
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
// Estilos específicos para el tamaño medium
|
|
520
|
+
...ownerState.chipSize === "medium" && {
|
|
521
|
+
...theme.generalSettings.isMobile ? {
|
|
522
|
+
height: theme.vars.size.mobile.medium.base,
|
|
523
|
+
minHeight: theme.vars.size.mobile.medium.base
|
|
524
|
+
} : {
|
|
525
|
+
height: theme.vars.size.desktop.medium.base,
|
|
526
|
+
minHeight: theme.vars.size.desktop.medium.base
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
})
|
|
530
|
+
};
|
|
531
|
+
export {
|
|
532
|
+
chipStyles as c
|
|
533
|
+
};
|