@m4l/components 0.2.36 → 1.0.0
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/components/AccountPopover/{index.a9dc9f92.js → index.efc74d5c.js} +3 -5
- package/components/AppBar/{index.7dee7427.js → index.fc126a22.js} +6 -5
- package/components/AppBar/styles.d.ts +1 -1
- package/components/CommonActions/components/Actions/styles.d.ts +1 -1
- package/components/DataGrid/styles.d.ts +1 -1
- package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/styles.d.ts +7 -7
- package/components/DragResizeWindow/{index.a9f25040.js → index.46b380e1.js} +3 -6
- package/components/DynamicFilter/dynamicFilterSlots.d.ts +76 -101
- package/components/DynamicFilter/{index.48d809e2.js → index.d9168c12.js} +22 -96
- package/components/FieldLabel/{index.2622ee40.js → index.f9cdcc27.js} +4 -4
- package/components/GridLayout/{index.b9c47a4c.js → index.bb3b7769.js} +23 -46
- package/components/GridLayout/subcomponents/Griditem/{index.69bc14e5.js → index.bb23f651.js} +4 -3
- package/components/GridLayout/subcomponents/Responsive/{index.094c1d09.js → index.b8a2a121.js} +2 -1
- package/components/GridLayout/subcomponents/SizeProvider/{index.e1d2df80.js → index.094bc6b5.js} +1 -1
- package/components/{commercial/index.b90488db.js → HamburgerMenu/index.5997af31.js} +4 -6
- package/components/HelperText/{index.81c5d349.js → index.be949cdf.js} +3 -2
- package/components/HelperText/styles.d.ts +1 -1
- package/components/Icon/index.d5fed418.js +420 -0
- package/components/Icon/styles.d.ts +2 -2
- package/components/{hook-form/RHFUpload/index.c5e5c61c.js → Image/index.36a3d440.js} +233 -32
- package/components/Image/styles.d.ts +1 -1
- package/components/LanguagePopover/{index.72f316fc.js → index.e6fa2336.js} +5 -8
- package/components/LanguagePopover/styles.d.ts +5 -5
- package/components/LinearProgressIndeterminate/{index.2ecd571e.js → index.de9d447c.js} +2 -4
- package/components/Loadable/{index.97fe63f9.js → index.e83cdb4e.js} +1 -1
- package/components/LoadingError/{index.7aaba1cf.js → index.9f00c83c.js} +8 -12
- package/components/LoadingError/styles.d.ts +1 -1
- package/components/MFLoader/{index.40c419c0.js → index.402c1acc.js} +4 -8
- package/components/ModalDialog/{index.42349189.js → index.ea9189c3.js} +5 -14
- package/components/NavLink/{index.9e847eb5.js → index.4e548cee.js} +4 -4
- package/components/NavLink/styles.d.ts +1 -1
- package/components/NoItemSelected/{index.5a8160fd.js → index.418c8316.js} +6 -15
- package/components/NoItemSelected/styles.d.ts +4 -4
- package/components/ObjectLogs/{index.6955149e.js → index.bfa7dad3.js} +10 -27
- package/components/ObjectLogs/styles.d.ts +3 -3
- package/components/PDFViewer/{index.47bb0928.js → index.bb2eca5a.js} +2 -2
- package/components/{mui_extended/Pager/index.1ba2d52b.js → Page/index.fdf04592.js} +134 -26
- package/components/PaperForm/{index.9f6fd02d.js → index.8121e3da.js} +8 -7
- package/components/PaperForm/styles.d.ts +6 -6
- package/components/Period/{index.c6d1a95a.js → index.5233694b.js} +157 -22
- package/components/Period/styles.d.ts +5 -5
- package/components/PrintingSystem/{index.f51a00f8.js → index.fb176a93.js} +14 -14
- package/components/PrintingSystem/subcomponents/BodyNode/{index.6792c353.js → index.c1d61038.js} +1 -1
- package/components/PrintingSystem/subcomponents/ChartNode/{index.eec6b4cd.js → index.18bd9bad.js} +1 -1
- package/components/PrintingSystem/subcomponents/DividerNode/{index.e58467c9.js → index.67d9f1b4.js} +1 -1
- package/components/PrintingSystem/subcomponents/FooterNode/{index.920b75c9.js → index.eaee152a.js} +1 -1
- package/components/PrintingSystem/subcomponents/GridNode/{index.6c1ad53c.js → index.f5f63a2a.js} +1 -1
- package/components/PrintingSystem/subcomponents/HeaderNode/{index.e8b151ad.js → index.7de4e411.js} +1 -1
- package/components/PrintingSystem/subcomponents/PaperNode/{index.bf199422.js → index.f9ccf22b.js} +1 -1
- package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.44d436b9.js → index.f2f2e903.js} +1 -1
- package/components/PrintingSystem/subcomponents/SectionNode/{index.879cf13d.js → index.540a4b19.js} +1 -1
- package/components/PrintingSystem/subcomponents/TextBoxNode/{index.eb6af0ca.js → index.41e7fcb0.js} +1 -1
- package/components/PropertyValue/{index.5e59580c.js → index.9572c347.js} +4 -7
- package/components/Resizeable/{index.5e8e48b1.js → index.1f0c1359.js} +7 -7
- package/components/ResizeableWindow/styles.d.ts +1 -1
- package/components/ScrollBar/{index.4b965665.js → index.adf0eade.js} +2 -4
- package/components/SideBar/classes/index.d.ts +1 -1
- package/components/SideBar/{index.5d1f4a23.js → index.629ba840.js} +24 -26
- package/components/SideBar/styles.d.ts +2 -2
- package/components/SideBar/subcomponents/ContentGroups/styles.d.ts +3 -3
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/styles.d.ts +1 -1
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/subcomponents/NavItemSubContent/styles.d.ts +2 -18
- package/components/SplitLayout/{index.15756f0f.js → index.74091a81.js} +1 -3
- package/components/ToastContainer/{index.dbd78941.js → index.f9b507b9.js} +3 -3
- package/components/animate/LoadingScreen/{index.1a83615a.js → index.779690a7.js} +3 -5
- package/components/animate/PropagateLoader/{index.76d7ea70.js → index.a9da8d00.js} +3 -2
- package/components/animate/PropagateLoader/syles.d.ts +1 -1
- package/components/animate/{index.87296638.js → index.b8497385.js} +3 -2
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/styles.d.ts +3 -3
- package/components/areas/constants.5387d83e.js +412 -0
- package/components/areas/contexts/AreasContext/{index.19c7b906.js → index.bb316000.js} +5 -6
- package/components/areas/contexts/DynamicMFParmsContext/{index.3d9ad0ad.js → index.37d1d444.js} +2 -2
- package/components/areas/contexts/WindowToolsMFContext/{index.992ae7a3.js → index.69d95c15.js} +2 -2
- package/components/areas/dictionary.7e74022a.js +286 -0
- package/components/areas/hooks/useAreas/{index.cedd30ee.js → index.e24bd74d.js} +1 -1
- package/components/areas/hooks/useDynamicMFParameters/{index.9e09e1e3.js → index.03ce6078.js} +1 -1
- package/components/areas/hooks/useWindowToolsMF/{index.2fbae9dc.js → index.09801b66.js} +1 -1
- package/components/areas/icons.504ec098.js +83 -0
- package/components/commercial/HamburgerMenu/styles.d.ts +1 -1
- package/components/commercial/SectionCommercial/styles.d.ts +4 -9
- package/components/hook-form/RHFAutocomplete/classes/index.d.ts +1 -1
- package/components/hook-form/RHFAutocomplete/styles.d.ts +1 -1
- package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/styles.d.ts +1 -1
- package/components/hook-form/RHFAutocompleteAsync/styles.d.ts +4 -4
- package/components/hook-form/RHFCheckbox/styles.d.ts +2 -10
- package/components/hook-form/RHFPeriod/styles.d.ts +1 -1
- package/components/hook-form/RHFTextField/styles.d.ts +2 -2
- package/components/hook-form/RHFTextField/subcomponents/Skeleton/styles.d.ts +2 -2
- package/components/hook-form/RHFTextFieldPassword/styles.d.ts +1 -1
- package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/styles.d.ts +1 -1
- package/components/maps/components/GpsTools/{index.4ea69dd1.js → index.75880ce0.js} +14 -136
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/styles.d.ts +4 -9
- package/components/maps/{components/Map/index.62b7d09b.js → index.8ec46ce4.js} +19 -194
- package/components/modal/{WindowBase.2414cd02.js → WindowBase.a3ac7adc.js} +3 -4
- package/components/modal/{WindowConfirm.48140481.js → WindowConfirm.e35da619.js} +6 -10
- package/components/modal/{index.81eb6def.js → index.a0e30c8b.js} +1 -5
- package/components/mui_extended/Accordion/styles.d.ts +3 -3
- package/components/mui_extended/Badge/styles.d.ts +1 -1
- package/components/mui_extended/Button/styles.d.ts +2 -10
- package/components/mui_extended/IconButton/styles.d.ts +1 -1
- package/components/mui_extended/ImageButton/styles.d.ts +1 -1
- package/components/mui_extended/MenuActions/styles.d.ts +2 -27
- package/components/mui_extended/Pager/styles.d.ts +1 -1
- package/components/mui_extended/Stack/styles.d.ts +2 -9
- package/components/mui_extended/Tab/styles.d.ts +2 -2
- package/components/mui_extended/Tabs/styles.d.ts +3 -58
- package/components/mui_extended/Typography/styles.d.ts +1 -1
- package/components/popups/PopupsProvider/{index.8fb6232a.js → index.18669fb4.js} +1 -1
- package/components/popups/PopupsViewer/{index.813854e4.js → index.ba354267.js} +5 -10
- package/contexts/ModalContext/{index.45c275cd.js → index.cf02e6bd.js} +1 -1
- package/contexts/RHFormContext/{index.bf3a2812.js → index.dc955a09.js} +2 -6
- package/hooks/useFormAddEdit/{index.9b27ca02.js → index.f156a2cd.js} +4 -8
- package/hooks/useModal/index.ef54bcf2.js +66 -0
- package/hooks/useTab/{index.f7973779.js → index.bce8b99e.js} +1 -1
- package/index.d.ts +0 -1
- package/index.js +276 -360
- package/package.json +3 -2
- package/{react-draggable.79b4c69a.js → react-draggable.5331add7.js} +1 -1
- package/{react-resizable.af1f31c1.js → react-resizable.37bfb965.js} +3 -5
- package/test/{getNameDataTestId.0faeade8.js → getNameDataTestId.aee44365.js} +2 -2
- package/test/index.6d4b98b9.js +4 -0
- package/utils/{index.0718eeac.js → index.9ee4c99a.js} +113 -3
- package/vendor.a1ce6777.js +6352 -0
- package/assets/Logo/index.109a182d.js +0 -38
- package/assets/Logo.d.ts +0 -6
- package/components/CommonActions/components/ActionCancel/index.46f636e9.js +0 -12
- package/components/CommonActions/components/ActionFormCancel/index.2b0bd50d.js +0 -56
- package/components/CommonActions/components/ActionFormIntro/index.4f212c39.js +0 -33
- package/components/CommonActions/components/ActionIntro/index.7406bd47.js +0 -25
- package/components/CommonActions/components/Actions/index.273645af.js +0 -70
- package/components/DataGrid/constants.e334cd50.js +0 -10
- package/components/DataGrid/formatters/ColumnBooleanFormatter/index.cee6b676.js +0 -26
- package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/index.708f3fb5.js +0 -22
- package/components/DataGrid/formatters/ColumnDateFormatter/index.e00d0cf2.js +0 -19
- package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/index.c064bb07.js +0 -23
- package/components/DataGrid/formatters/ColumnNestedValueFormatter/index.880e743b.js +0 -14
- package/components/DataGrid/formatters/ColumnPointsFormatter/index.226cc583.js +0 -10
- package/components/DataGrid/formatters/ColumnPriceFormatter/index.bf9d9e60.js +0 -10
- package/components/DataGrid/formatters/ColumnSetCheckFormatter/index.4045b2f2.js +0 -36
- package/components/DataGrid/formatters/ColumnUncertaintyFormatter/index.a87302d1.js +0 -10
- package/components/DataGrid/formatters/index.2c2f0ae4.js +0 -1
- package/components/DataGrid/index.304437ee.js +0 -917
- package/components/DataGrid/subcomponents/Actions/index.f14590d2.js +0 -595
- package/components/DataGrid/subcomponents/editors/TextEditor/index.3f0d9e28.js +0 -76
- package/components/Icon/index.ee7b85c9.js +0 -192
- package/components/Image/index.8cc036b1.js +0 -168
- package/components/Page/index.c1d4a319.js +0 -114
- package/components/animate/variants/index.7a912140.js +0 -1
- package/components/areas/components/AreasAdmin/index.f239c717.js +0 -733
- package/components/areas/components/AreasViewer/index.61e0538b.js +0 -1071
- package/components/areas/components/index.558684b3.js +0 -1
- package/components/areas/constants.66529246.js +0 -6
- package/components/areas/contexts/index.24025b97.js +0 -1
- package/components/areas/dictionary.08cfc4c9.js +0 -36
- package/components/areas/hooks/index.d9dc1e21.js +0 -1
- package/components/areas/icons.8266ccc8.js +0 -26
- package/components/areas/index.4cc6a221.js +0 -22
- package/components/commercial/AppBarCommercial/index.9f654f8e.js +0 -28
- package/components/commercial/SectionCommercial/index.3df4685b.js +0 -57
- package/components/commercial/TopBar/index.7aeb6ec0.js +0 -234
- package/components/formatters/BooleanFormatter/index.0c2d8e35.js +0 -44
- package/components/formatters/DateFormatter/index.2ef6f261.js +0 -43
- package/components/formatters/PointsFormatter/index.d8a4ee54.js +0 -25
- package/components/formatters/PriceFormatter/index.97f75b4b.js +0 -35
- package/components/formatters/UncertaintyFormatter/index.c3ffdebc.js +0 -29
- package/components/formatters/index.b816c6b6.js +0 -117
- package/components/hook-form/HelperError/index.c8b046b7.js +0 -19
- package/components/hook-form/RHFAutocomplete/index.ea2ac2b1.js +0 -408
- package/components/hook-form/RHFAutocompleteAsync/index.98dcf0de.js +0 -158
- package/components/hook-form/RHFCheckbox/index.c32278fa.js +0 -142
- package/components/hook-form/RHFColorPicker/index.8c939bfd.js +0 -191
- package/components/hook-form/RHFDateTime/index.ac27deab.js +0 -190
- package/components/hook-form/RHFMultiCheckbox/index.437e6ba3.js +0 -34
- package/components/hook-form/RHFPeriod/index.70cfc422.js +0 -104
- package/components/hook-form/RHFRadioGroup/index.11c0add8.js +0 -35
- package/components/hook-form/RHFSelect/index.c6c60ecc.js +0 -29
- package/components/hook-form/RHFTextField/index.fa97889a.js +0 -325
- package/components/maps/index.13bb982c.js +0 -7
- package/components/mui_extended/Accordion/index.d08a0361.js +0 -142
- package/components/mui_extended/Avatar/index.fb9ad158.js +0 -63
- package/components/mui_extended/Badge/index.2a3aef2c.js +0 -30
- package/components/mui_extended/BoxIcon/index.d61e7ac5.js +0 -22
- package/components/mui_extended/Breadcrumbs/index.4a44883c.js +0 -87
- package/components/mui_extended/Button/index.5395d101.js +0 -213
- package/components/mui_extended/CheckBox.256169f0.js +0 -76
- package/components/mui_extended/CircularProgress/index.967e70b7.js +0 -8
- package/components/mui_extended/IconButton/index.b0ee4965.js +0 -119
- package/components/mui_extended/LinearProgress/index.4092bb69.js +0 -9
- package/components/mui_extended/LinkWithRoute/index.288c51f3.js +0 -15
- package/components/mui_extended/MenuActions/index.d92ed0d6.js +0 -175
- package/components/mui_extended/Popover/index.4e7340b4.js +0 -142
- package/components/mui_extended/Stack/index.fe363ca5.js +0 -31
- package/components/mui_extended/Tab/index.c5ad86e2.js +0 -134
- package/components/mui_extended/ToggleButton/index.7fbc8614.js +0 -18
- package/components/mui_extended/ToggleIconButton/index.0cd347b4.js +0 -24
- package/components/mui_extended/Tooltip/index.49bb5ee1.js +0 -40
- package/components/mui_extended/Typography/index.a1e774a2.js +0 -54
- package/components/mui_extended/index.b606cd9d.js +0 -1
- package/hooks/useModal/index.30674bb7.js +0 -11
- package/style.css +0 -65
- package/test/constants_no_mock.86c553a9.js +0 -4
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import React__default, { useState, useEffect, useMemo } from "react";
|
|
3
|
-
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
4
|
-
import { styled, IconButton, generateUtilityClasses, generateUtilityClass, useTheme, MenuItem } from "@mui/material";
|
|
5
|
-
import { P as Popover } from "../Popover/index.4e7340b4.js";
|
|
6
|
-
import { I as Icon } from "../../Icon/index.ee7b85c9.js";
|
|
7
|
-
import clsx from "clsx";
|
|
8
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
9
|
-
import { B as Badge } from "../Badge/index.2a3aef2c.js";
|
|
10
|
-
import { I as IconButton$1 } from "../IconButton/index.b0ee4965.js";
|
|
11
|
-
styled(IconButton)(() => ({}));
|
|
12
|
-
const LabelMemuItem = styled("div")(({ theme }) => ({
|
|
13
|
-
height: "22px",
|
|
14
|
-
overflow: "hidden",
|
|
15
|
-
wordBreak: "break-all",
|
|
16
|
-
marginLeft: theme.spacing(1.5),
|
|
17
|
-
display: "flex",
|
|
18
|
-
alignItems: "center"
|
|
19
|
-
}));
|
|
20
|
-
const ICONS = {
|
|
21
|
-
MENU: "menu.svg"
|
|
22
|
-
};
|
|
23
|
-
const componentName = "M4LMenuActions";
|
|
24
|
-
generateUtilityClasses(componentName, [
|
|
25
|
-
"root",
|
|
26
|
-
"itemDelete"
|
|
27
|
-
]);
|
|
28
|
-
function getMenuActionsUtilityClass(slot) {
|
|
29
|
-
return generateUtilityClass(componentName, slot);
|
|
30
|
-
}
|
|
31
|
-
const useMenuActionsUtilityClasses = () => {
|
|
32
|
-
const slots = {
|
|
33
|
-
root: ["root"],
|
|
34
|
-
itemDelete: ["itemDelete"]
|
|
35
|
-
};
|
|
36
|
-
const composedClasses = unstable_composeClasses(slots, getMenuActionsUtilityClass, {});
|
|
37
|
-
return {
|
|
38
|
-
...composedClasses
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
function MenuActions(props) {
|
|
42
|
-
const {
|
|
43
|
-
menuActions,
|
|
44
|
-
endListElement,
|
|
45
|
-
menuActionSx,
|
|
46
|
-
className,
|
|
47
|
-
iconButtonClassName = "",
|
|
48
|
-
objItem = {},
|
|
49
|
-
urlIcon,
|
|
50
|
-
toolTip = "",
|
|
51
|
-
marginTop = -1,
|
|
52
|
-
marginBottom,
|
|
53
|
-
marginLeft,
|
|
54
|
-
marginRight,
|
|
55
|
-
width = 200,
|
|
56
|
-
withBadge = false,
|
|
57
|
-
badgeContent,
|
|
58
|
-
arrowType = "right-top",
|
|
59
|
-
externalOpen = null,
|
|
60
|
-
externalClose,
|
|
61
|
-
...other
|
|
62
|
-
} = props;
|
|
63
|
-
const { host_static_assets, environment_assets } = useEnvironment();
|
|
64
|
-
const { getLabel } = useModuleDictionary();
|
|
65
|
-
const [open, setOpen] = useState(null);
|
|
66
|
-
const handleOpen = (event) => {
|
|
67
|
-
setOpen(event.currentTarget);
|
|
68
|
-
};
|
|
69
|
-
const theme = useTheme();
|
|
70
|
-
const classes = useMenuActionsUtilityClasses();
|
|
71
|
-
useEffect(() => {
|
|
72
|
-
let mounted = true;
|
|
73
|
-
if (mounted) {
|
|
74
|
-
setOpen(externalOpen);
|
|
75
|
-
}
|
|
76
|
-
return function cleanUp() {
|
|
77
|
-
mounted = false;
|
|
78
|
-
};
|
|
79
|
-
}, [externalOpen]);
|
|
80
|
-
const urlFinalIcon = useMemo(() => {
|
|
81
|
-
if (urlIcon)
|
|
82
|
-
return urlIcon;
|
|
83
|
-
return `${host_static_assets}/${environment_assets}/frontend/components/menu_actions/assets/icons/${ICONS.MENU}`;
|
|
84
|
-
}, [urlIcon, host_static_assets, environment_assets]);
|
|
85
|
-
const handleClose = (e) => {
|
|
86
|
-
e.stopPropagation();
|
|
87
|
-
setOpen(null);
|
|
88
|
-
externalClose && externalClose(null);
|
|
89
|
-
};
|
|
90
|
-
const handleClick = (e, menuAction) => {
|
|
91
|
-
e.stopPropagation();
|
|
92
|
-
setOpen(null);
|
|
93
|
-
menuAction.onClick();
|
|
94
|
-
};
|
|
95
|
-
const finalActions = useMemo(() => {
|
|
96
|
-
let ret;
|
|
97
|
-
if (typeof menuActions !== "function") {
|
|
98
|
-
ret = menuActions;
|
|
99
|
-
} else {
|
|
100
|
-
ret = menuActions(objItem);
|
|
101
|
-
}
|
|
102
|
-
return ret;
|
|
103
|
-
}, [menuActions, objItem]);
|
|
104
|
-
const IconButtonElement = /* @__PURE__ */ jsx(Fragment, { children: withBadge ? /* @__PURE__ */ jsx(Badge, { badgeContent, children: /* @__PURE__ */ jsx(
|
|
105
|
-
IconButton$1,
|
|
106
|
-
{
|
|
107
|
-
src: urlFinalIcon,
|
|
108
|
-
onClick: handleOpen,
|
|
109
|
-
tooltip: toolTip,
|
|
110
|
-
className: iconButtonClassName
|
|
111
|
-
}
|
|
112
|
-
) }) : /* @__PURE__ */ jsx(
|
|
113
|
-
IconButton$1,
|
|
114
|
-
{
|
|
115
|
-
src: urlFinalIcon,
|
|
116
|
-
onClick: handleOpen,
|
|
117
|
-
tooltip: toolTip,
|
|
118
|
-
className: iconButtonClassName
|
|
119
|
-
}
|
|
120
|
-
) });
|
|
121
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
122
|
-
IconButtonElement,
|
|
123
|
-
/* @__PURE__ */ jsxs(
|
|
124
|
-
Popover,
|
|
125
|
-
{
|
|
126
|
-
id: "Popover",
|
|
127
|
-
open: Boolean(open),
|
|
128
|
-
anchorEl: open,
|
|
129
|
-
onClose: handleClose,
|
|
130
|
-
arrowType,
|
|
131
|
-
className: clsx(classes.root, className),
|
|
132
|
-
sx: {
|
|
133
|
-
marginTop,
|
|
134
|
-
marginBottom,
|
|
135
|
-
marginLeft,
|
|
136
|
-
marginRight,
|
|
137
|
-
width,
|
|
138
|
-
maxWidth: 300,
|
|
139
|
-
"& .MuiMenuItem-root": { px: 1, typography: "body2", borderRadius: 0.75 },
|
|
140
|
-
...theme.components?.M4LMenuActions?.styleOverrides,
|
|
141
|
-
...menuActionSx
|
|
142
|
-
},
|
|
143
|
-
...other,
|
|
144
|
-
children: [
|
|
145
|
-
finalActions.map((menuAction, index) => /* @__PURE__ */ jsxs(
|
|
146
|
-
MenuItem,
|
|
147
|
-
{
|
|
148
|
-
dense: true,
|
|
149
|
-
onClick: (e) => {
|
|
150
|
-
handleClick(e, menuAction);
|
|
151
|
-
},
|
|
152
|
-
sx: { color: menuAction.color ?? "text.main" },
|
|
153
|
-
disabled: menuAction.disabled,
|
|
154
|
-
className: clsx(
|
|
155
|
-
menuAction?.className,
|
|
156
|
-
menuAction.variant === "delete" && classes.itemDelete
|
|
157
|
-
),
|
|
158
|
-
children: [
|
|
159
|
-
menuAction.urlIcon ? /* @__PURE__ */ jsx(Icon, { src: menuAction.urlIcon }) : null,
|
|
160
|
-
/* @__PURE__ */ jsx(LabelMemuItem, { children: menuAction.label || menuAction.dictionaryId && getLabel(menuAction.dictionaryId) })
|
|
161
|
-
]
|
|
162
|
-
},
|
|
163
|
-
`menu_action_${index}`
|
|
164
|
-
)),
|
|
165
|
-
endListElement ? endListElement : null
|
|
166
|
-
]
|
|
167
|
-
}
|
|
168
|
-
)
|
|
169
|
-
] });
|
|
170
|
-
}
|
|
171
|
-
const MemonizedMenuActions = React__default.memo(MenuActions);
|
|
172
|
-
export {
|
|
173
|
-
MenuActions as M,
|
|
174
|
-
MemonizedMenuActions as a
|
|
175
|
-
};
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { styled, Popover as Popover$1, generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
3
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
4
|
-
import clsx from "clsx";
|
|
5
|
-
const PopoverRoot = styled(Popover$1)(({ theme }) => ({
|
|
6
|
-
...theme.components?.M4LPopover?.styleOverrides
|
|
7
|
-
}));
|
|
8
|
-
generateUtilityClasses("M4LPopover", [
|
|
9
|
-
"root",
|
|
10
|
-
"arrowStyle",
|
|
11
|
-
"noArrow",
|
|
12
|
-
"topLeft",
|
|
13
|
-
"topCenter",
|
|
14
|
-
"topRight",
|
|
15
|
-
"bottomLeft",
|
|
16
|
-
"bottomCenter",
|
|
17
|
-
"bottomRight",
|
|
18
|
-
"leftTop",
|
|
19
|
-
"leftCenter",
|
|
20
|
-
"leftBottom",
|
|
21
|
-
"rightTop",
|
|
22
|
-
"rightCenter",
|
|
23
|
-
"rightBottom"
|
|
24
|
-
]);
|
|
25
|
-
function getPopoverClassesUtilityClass(slot) {
|
|
26
|
-
return generateUtilityClass("M4LPopover", slot);
|
|
27
|
-
}
|
|
28
|
-
const useUtilityClasses = (ownerState) => {
|
|
29
|
-
const slots = {
|
|
30
|
-
root: ["root"],
|
|
31
|
-
arrowStyle: [
|
|
32
|
-
"arrowStyle",
|
|
33
|
-
ownerState.arrowType === "top-left" && "topLeft",
|
|
34
|
-
ownerState.arrowType === "top-center" && "topCenter",
|
|
35
|
-
ownerState.arrowType === "top-right" && "topRight",
|
|
36
|
-
ownerState.arrowType === "bottom-left" && "bottomLeft",
|
|
37
|
-
ownerState.arrowType === "bottom-center" && "bottomCenter",
|
|
38
|
-
ownerState.arrowType === "bottom-right" && "bottomRight",
|
|
39
|
-
ownerState.arrowType === "left-top" && "leftTop",
|
|
40
|
-
ownerState.arrowType === "left-center" && "leftCenter",
|
|
41
|
-
ownerState.arrowType === "left-bottom" && "leftBottom",
|
|
42
|
-
ownerState.arrowType === "right-top" && "rightTop",
|
|
43
|
-
ownerState.arrowType === "right-center" && "rightCenter",
|
|
44
|
-
ownerState.arrowType === "right-bottom" && "rightBottom"
|
|
45
|
-
]
|
|
46
|
-
};
|
|
47
|
-
const composedClasses = unstable_composeClasses(slots, getPopoverClassesUtilityClass, {});
|
|
48
|
-
return {
|
|
49
|
-
...composedClasses
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
const ArrowStyle = styled("span")(({ arrowType, theme }) => {
|
|
53
|
-
const SIZE = 12;
|
|
54
|
-
const POSITION = -(SIZE / 2);
|
|
55
|
-
const borderStyle = `solid 1px ${theme.palette.grey[50012]}`;
|
|
56
|
-
const topStyle = {
|
|
57
|
-
borderRadius: "0 0 3px 0",
|
|
58
|
-
top: POSITION,
|
|
59
|
-
borderBottom: borderStyle,
|
|
60
|
-
borderRight: borderStyle
|
|
61
|
-
};
|
|
62
|
-
const bottomStyle = {
|
|
63
|
-
borderRadius: "3px 0 0 0",
|
|
64
|
-
bottom: POSITION,
|
|
65
|
-
borderTop: borderStyle,
|
|
66
|
-
borderLeft: borderStyle
|
|
67
|
-
};
|
|
68
|
-
const leftStyle = {
|
|
69
|
-
borderRadius: "0 3px 0 0",
|
|
70
|
-
left: POSITION,
|
|
71
|
-
borderTop: borderStyle,
|
|
72
|
-
borderRight: borderStyle
|
|
73
|
-
};
|
|
74
|
-
const rightStyle = {
|
|
75
|
-
borderRadius: "0 0 0 3px",
|
|
76
|
-
right: POSITION,
|
|
77
|
-
borderBottom: borderStyle,
|
|
78
|
-
borderLeft: borderStyle
|
|
79
|
-
};
|
|
80
|
-
return {
|
|
81
|
-
display: "none",
|
|
82
|
-
[theme.breakpoints.up("sm")]: {
|
|
83
|
-
width: SIZE,
|
|
84
|
-
height: SIZE,
|
|
85
|
-
content: "''",
|
|
86
|
-
position: "absolute",
|
|
87
|
-
display: "block",
|
|
88
|
-
transform: "rotate(-135deg)",
|
|
89
|
-
background: theme.palette.background.default
|
|
90
|
-
},
|
|
91
|
-
...arrowType === "top-left" && { ...topStyle, left: 20 },
|
|
92
|
-
...arrowType === "top-center" && { ...topStyle, left: 0, right: 0, margin: "auto" },
|
|
93
|
-
...arrowType === "top-right" && { ...topStyle, right: 20 },
|
|
94
|
-
...arrowType === "bottom-left" && { ...bottomStyle, left: 20 },
|
|
95
|
-
...arrowType === "bottom-center" && { ...bottomStyle, left: 0, right: 0, margin: "auto" },
|
|
96
|
-
...arrowType === "bottom-right" && { ...bottomStyle, right: 20 },
|
|
97
|
-
...arrowType === "left-top" && { ...leftStyle, top: 20 },
|
|
98
|
-
...arrowType === "left-center" && { ...leftStyle, top: 0, bottom: 0, margin: "auto" },
|
|
99
|
-
...arrowType === "left-bottom" && { ...leftStyle, bottom: 20 },
|
|
100
|
-
...arrowType === "right-top" && { ...rightStyle, top: 20 },
|
|
101
|
-
...arrowType === "right-center" && { ...rightStyle, top: 0, bottom: 0, margin: "auto" },
|
|
102
|
-
...arrowType === "right-bottom" && { ...rightStyle, bottom: 20 }
|
|
103
|
-
};
|
|
104
|
-
});
|
|
105
|
-
const Popover = (props) => {
|
|
106
|
-
const { children, arrowType = "top-right", className, ...other } = props;
|
|
107
|
-
const ownerState = {
|
|
108
|
-
arrowType
|
|
109
|
-
};
|
|
110
|
-
const classes = useUtilityClasses(ownerState);
|
|
111
|
-
return /* @__PURE__ */ jsxs(
|
|
112
|
-
PopoverRoot,
|
|
113
|
-
{
|
|
114
|
-
className: clsx(classes.root, className),
|
|
115
|
-
"data-testid": "PopoverRoot",
|
|
116
|
-
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
117
|
-
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
118
|
-
transitionDuration: 0,
|
|
119
|
-
PaperProps: {
|
|
120
|
-
sx: {
|
|
121
|
-
p: 1,
|
|
122
|
-
overflow: "inherit"
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
...other,
|
|
126
|
-
children: [
|
|
127
|
-
/* @__PURE__ */ jsx(
|
|
128
|
-
ArrowStyle,
|
|
129
|
-
{
|
|
130
|
-
className: classes.arrowStyle,
|
|
131
|
-
"data-testid": "ArrowStyle",
|
|
132
|
-
arrowType
|
|
133
|
-
}
|
|
134
|
-
),
|
|
135
|
-
children
|
|
136
|
-
]
|
|
137
|
-
}
|
|
138
|
-
);
|
|
139
|
-
};
|
|
140
|
-
export {
|
|
141
|
-
Popover as P
|
|
142
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { generateUtilityClasses, generateUtilityClass, styled, Stack as Stack$1 } from "@mui/material";
|
|
3
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
4
|
-
import clsx from "clsx";
|
|
5
|
-
const componentName = "M4LStack";
|
|
6
|
-
generateUtilityClasses(componentName, [
|
|
7
|
-
"root"
|
|
8
|
-
]);
|
|
9
|
-
function getStackUtilityClass(slot) {
|
|
10
|
-
return generateUtilityClass(componentName, slot);
|
|
11
|
-
}
|
|
12
|
-
const useStackUtilityClasses = () => {
|
|
13
|
-
const slots = {
|
|
14
|
-
root: ["root"]
|
|
15
|
-
};
|
|
16
|
-
const composedClasses = unstable_composeClasses(slots, getStackUtilityClass, {});
|
|
17
|
-
return {
|
|
18
|
-
...composedClasses
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
const MUISTack = styled(Stack$1)(({ theme }) => ({
|
|
22
|
-
...theme.components?.M4LStack?.styleOverrides
|
|
23
|
-
}));
|
|
24
|
-
const classes = useStackUtilityClasses();
|
|
25
|
-
const Stack = (props) => {
|
|
26
|
-
const { children, className, ...others } = props;
|
|
27
|
-
return /* @__PURE__ */ jsx(MUISTack, { ...others, className: clsx(classes.root, className), children });
|
|
28
|
-
};
|
|
29
|
-
export {
|
|
30
|
-
Stack as S
|
|
31
|
-
};
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import clsx from "clsx";
|
|
3
|
-
import { generateUtilityClasses, generateUtilityClass, styled, Tabs as Tabs$1, Tab as Tab$1, Skeleton } from "@mui/material";
|
|
4
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
5
|
-
import { useModuleSkeleton } from "@m4l/core";
|
|
6
|
-
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
7
|
-
import { g as getNameDataTestId } from "../../../test/getNameDataTestId.0faeade8.js";
|
|
8
|
-
import { createContext, useState } from "react";
|
|
9
|
-
const componentName$2 = "M4LTabs";
|
|
10
|
-
generateUtilityClasses(componentName$2, [
|
|
11
|
-
"root"
|
|
12
|
-
]);
|
|
13
|
-
function getTabsUtilityClass(slot) {
|
|
14
|
-
return generateUtilityClass(componentName$2, slot);
|
|
15
|
-
}
|
|
16
|
-
const useTabsUtilityClasses = () => {
|
|
17
|
-
const slots = {
|
|
18
|
-
root: ["root"]
|
|
19
|
-
};
|
|
20
|
-
const composedClasses = unstable_composeClasses(slots, getTabsUtilityClass, {});
|
|
21
|
-
return {
|
|
22
|
-
...composedClasses
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
const MUITabs = styled(Tabs$1)(({ theme }) => ({
|
|
26
|
-
...theme.components?.M4LTabs?.styleOverrides
|
|
27
|
-
}));
|
|
28
|
-
const Tabs = (props) => {
|
|
29
|
-
const { children, className, ...others } = props;
|
|
30
|
-
const classes = useTabsUtilityClasses();
|
|
31
|
-
return /* @__PURE__ */ jsx(MUITabs, { className: clsx(classes.root, className), ...others, children });
|
|
32
|
-
};
|
|
33
|
-
const componentName$1 = "M4LTabContent";
|
|
34
|
-
generateUtilityClasses(componentName$1, [
|
|
35
|
-
"root"
|
|
36
|
-
]);
|
|
37
|
-
function getTabContentUtilityClass(slot) {
|
|
38
|
-
return generateUtilityClass(componentName$1, slot);
|
|
39
|
-
}
|
|
40
|
-
const useTabContentUtilityClasses = () => {
|
|
41
|
-
const slots = {
|
|
42
|
-
root: ["root"]
|
|
43
|
-
};
|
|
44
|
-
const composedClasses = unstable_composeClasses(slots, getTabContentUtilityClass, {});
|
|
45
|
-
return {
|
|
46
|
-
...composedClasses
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
const TabContentRoot = styled("div")(({ theme }) => ({
|
|
50
|
-
...theme.components?.M4LTabContent?.styleOverrides
|
|
51
|
-
}));
|
|
52
|
-
const TabContent = (props) => {
|
|
53
|
-
const { children, className, ...others } = props;
|
|
54
|
-
const classes = useTabContentUtilityClasses();
|
|
55
|
-
return /* @__PURE__ */ jsx(TabContentRoot, { className: clsx(classes.root, className), ...others, children });
|
|
56
|
-
};
|
|
57
|
-
const TabRoot = styled("div")(({ theme }) => ({
|
|
58
|
-
...theme.components?.M4LTab?.styleOverrides
|
|
59
|
-
}));
|
|
60
|
-
const SKTTabWrapper = styled("div")(({ theme }) => ({
|
|
61
|
-
padding: theme.spacing(1.5, 2)
|
|
62
|
-
}));
|
|
63
|
-
const componentName = "M4LTab";
|
|
64
|
-
generateUtilityClasses(componentName, [
|
|
65
|
-
"root",
|
|
66
|
-
"skeleton"
|
|
67
|
-
]);
|
|
68
|
-
function getTabUtilityClass(slot) {
|
|
69
|
-
return generateUtilityClass(componentName, slot);
|
|
70
|
-
}
|
|
71
|
-
const tabUtilityClasses = () => {
|
|
72
|
-
const slots = {
|
|
73
|
-
root: ["root"],
|
|
74
|
-
skeleton: ["skeleton"]
|
|
75
|
-
};
|
|
76
|
-
const composedClasses = unstable_composeClasses(slots, getTabUtilityClass, {});
|
|
77
|
-
return {
|
|
78
|
-
...composedClasses
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
const COMPONENT_PREFIX = "m4l-tab";
|
|
82
|
-
function Tab(props) {
|
|
83
|
-
const { SKTWidth, SKTHeight, className, dataTestId = "", ...other } = props;
|
|
84
|
-
const isSkeleton = useModuleSkeleton();
|
|
85
|
-
const classes = tabUtilityClasses();
|
|
86
|
-
return /* @__PURE__ */ jsx(
|
|
87
|
-
TabRoot,
|
|
88
|
-
{
|
|
89
|
-
className: clsx(classes.root, className),
|
|
90
|
-
...process.env.NODE_ENV !== "production" ? {
|
|
91
|
-
[TEST_PROP_ID]: getNameDataTestId(COMPONENT_PREFIX, "root", dataTestId)
|
|
92
|
-
} : {},
|
|
93
|
-
children: !isSkeleton ? /* @__PURE__ */ jsx(Tab$1, { ...other }) : /* @__PURE__ */ jsx(
|
|
94
|
-
SKTTabWrapper,
|
|
95
|
-
{
|
|
96
|
-
className: classes.skeleton,
|
|
97
|
-
...process.env.NODE_ENV !== "production" ? {
|
|
98
|
-
[TEST_PROP_ID]: getNameDataTestId(
|
|
99
|
-
COMPONENT_PREFIX,
|
|
100
|
-
"skeleton",
|
|
101
|
-
dataTestId
|
|
102
|
-
)
|
|
103
|
-
} : {},
|
|
104
|
-
children: /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: SKTWidth, height: SKTHeight })
|
|
105
|
-
}
|
|
106
|
-
)
|
|
107
|
-
}
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
const TabContext = createContext(null);
|
|
111
|
-
function TabProvider(props) {
|
|
112
|
-
const { children, initialValue } = props;
|
|
113
|
-
const [currentTab, setCurrentTab] = useState(initialValue);
|
|
114
|
-
const handleChange = (_event, newTab) => {
|
|
115
|
-
setCurrentTab(newTab);
|
|
116
|
-
};
|
|
117
|
-
return /* @__PURE__ */ jsx(
|
|
118
|
-
TabContext.Provider,
|
|
119
|
-
{
|
|
120
|
-
value: {
|
|
121
|
-
currentTab: currentTab.toString(),
|
|
122
|
-
handleChange
|
|
123
|
-
},
|
|
124
|
-
children
|
|
125
|
-
}
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
export {
|
|
129
|
-
Tabs as T,
|
|
130
|
-
Tab as a,
|
|
131
|
-
TabContent as b,
|
|
132
|
-
TabProvider as c,
|
|
133
|
-
TabContext as d
|
|
134
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import clsx from "clsx";
|
|
3
|
-
import { B as Button, b as buttonClasses } from "../Button/index.5395d101.js";
|
|
4
|
-
import { w as withToggle } from "../../../hocs/withToggle/index.548aeace.js";
|
|
5
|
-
const ToggleAbleButton = ({ onToggle, isToggled, ...props }) => {
|
|
6
|
-
return /* @__PURE__ */ jsx(
|
|
7
|
-
Button,
|
|
8
|
-
{
|
|
9
|
-
onClick: onToggle,
|
|
10
|
-
...props,
|
|
11
|
-
className: clsx(isToggled ? buttonClasses.togglePressed : buttonClasses.toggleNotPressed)
|
|
12
|
-
}
|
|
13
|
-
);
|
|
14
|
-
};
|
|
15
|
-
const ToggleButton = withToggle(ToggleAbleButton);
|
|
16
|
-
export {
|
|
17
|
-
ToggleButton as T
|
|
18
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import clsx from "clsx";
|
|
3
|
-
import { I as IconButton, i as iconButtonClasses } from "../IconButton/index.b0ee4965.js";
|
|
4
|
-
import { w as withToggle } from "../../../hocs/withToggle/index.548aeace.js";
|
|
5
|
-
const ToggleAbleIconButton = ({
|
|
6
|
-
onToggle,
|
|
7
|
-
isToggled,
|
|
8
|
-
...props
|
|
9
|
-
}) => {
|
|
10
|
-
return /* @__PURE__ */ jsx(
|
|
11
|
-
IconButton,
|
|
12
|
-
{
|
|
13
|
-
onClick: onToggle,
|
|
14
|
-
...props,
|
|
15
|
-
className: clsx(
|
|
16
|
-
onToggle ? iconButtonClasses.togglePressed : iconButtonClasses.toggleNotPressed
|
|
17
|
-
)
|
|
18
|
-
}
|
|
19
|
-
);
|
|
20
|
-
};
|
|
21
|
-
const ToggleIconButton = withToggle(ToggleAbleIconButton);
|
|
22
|
-
export {
|
|
23
|
-
ToggleIconButton as T
|
|
24
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { generateUtilityClasses, generateUtilityClass, useTheme, Tooltip as Tooltip$1 } from "@mui/material";
|
|
3
|
-
import clsx from "clsx";
|
|
4
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
5
|
-
const componentName = "M4LTooltip";
|
|
6
|
-
generateUtilityClasses(componentName, [
|
|
7
|
-
"root"
|
|
8
|
-
]);
|
|
9
|
-
function getTooltipUtilityClass(slot) {
|
|
10
|
-
return generateUtilityClass(componentName, slot);
|
|
11
|
-
}
|
|
12
|
-
const tooltipUtilityClasses = () => {
|
|
13
|
-
const slots = {
|
|
14
|
-
root: ["root"]
|
|
15
|
-
};
|
|
16
|
-
const composedClasses = unstable_composeClasses(slots, getTooltipUtilityClass, {});
|
|
17
|
-
return {
|
|
18
|
-
...composedClasses
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
const Tooltip = (props) => {
|
|
22
|
-
const { children, className, ...others } = props;
|
|
23
|
-
const classes = tooltipUtilityClasses();
|
|
24
|
-
const theme = useTheme();
|
|
25
|
-
const stylesoverrides = theme.components?.M4LTooltip?.styleOverrides;
|
|
26
|
-
return /* @__PURE__ */ jsx(
|
|
27
|
-
Tooltip$1,
|
|
28
|
-
{
|
|
29
|
-
PopperProps: {
|
|
30
|
-
sx: { ...stylesoverrides },
|
|
31
|
-
className: clsx(classes.root, className)
|
|
32
|
-
},
|
|
33
|
-
...others,
|
|
34
|
-
children
|
|
35
|
-
}
|
|
36
|
-
);
|
|
37
|
-
};
|
|
38
|
-
export {
|
|
39
|
-
Tooltip as T
|
|
40
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useModuleSkeleton } from "@m4l/core";
|
|
3
|
-
import { styled, Skeleton, generateUtilityClasses, generateUtilityClass, Typography as Typography$1 } from "@mui/material";
|
|
4
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
5
|
-
import clsx from "clsx";
|
|
6
|
-
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
7
|
-
const WarpperTypography = styled("div")(({ theme }) => ({
|
|
8
|
-
...theme.components?.M4LTypography?.styleOverrides
|
|
9
|
-
}));
|
|
10
|
-
const SkeletonTypography = (props) => {
|
|
11
|
-
const { skeletonWidth, skeletongHeight } = props;
|
|
12
|
-
return /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: skeletonWidth, height: skeletongHeight });
|
|
13
|
-
};
|
|
14
|
-
generateUtilityClasses("M4LTypography", [
|
|
15
|
-
"root"
|
|
16
|
-
]);
|
|
17
|
-
function getTypographyClassesUtilityClass(slot) {
|
|
18
|
-
return generateUtilityClass("M4LTypography", slot);
|
|
19
|
-
}
|
|
20
|
-
const useUtilityClasses = () => {
|
|
21
|
-
const slots = {
|
|
22
|
-
root: ["root"]
|
|
23
|
-
};
|
|
24
|
-
const composedClasses = unstable_composeClasses(slots, getTypographyClassesUtilityClass, {});
|
|
25
|
-
return {
|
|
26
|
-
...composedClasses
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
const TYPOGRAPHY_PREFIX = "Typography";
|
|
30
|
-
const getNameDataTestId = (KEY) => {
|
|
31
|
-
return `${TYPOGRAPHY_PREFIX}-${KEY}`;
|
|
32
|
-
};
|
|
33
|
-
function Typography(props) {
|
|
34
|
-
const {
|
|
35
|
-
skeletonWidth = "100%",
|
|
36
|
-
skeletongHeight = "18px",
|
|
37
|
-
variant = "body",
|
|
38
|
-
className,
|
|
39
|
-
...other
|
|
40
|
-
} = props;
|
|
41
|
-
const isSkeleton = useModuleSkeleton();
|
|
42
|
-
const classes = useUtilityClasses();
|
|
43
|
-
return /* @__PURE__ */ jsx(
|
|
44
|
-
WarpperTypography,
|
|
45
|
-
{
|
|
46
|
-
className: clsx(classes.root, className),
|
|
47
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("root") } : {},
|
|
48
|
-
children: !isSkeleton ? /* @__PURE__ */ jsx(Typography$1, { ...other, variant }) : /* @__PURE__ */ jsx(SkeletonTypography, { skeletonWidth, skeletongHeight })
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
export {
|
|
53
|
-
Typography as T
|
|
54
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { useContext } from "react";
|
|
2
|
-
import { M as ModalContext } from "../../contexts/ModalContext/index.45c275cd.js";
|
|
3
|
-
function useModal() {
|
|
4
|
-
const context = useContext(ModalContext);
|
|
5
|
-
if (!context)
|
|
6
|
-
throw new Error("useModal context must be use inside ModalContext");
|
|
7
|
-
return context;
|
|
8
|
-
}
|
|
9
|
-
export {
|
|
10
|
-
useModal as u
|
|
11
|
-
};
|