@m4l/components 0.0.26 → 0.0.27
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/dist/components/DataGrid/index.js +9 -9
- package/dist/components/FormActions/index.js +2 -1
- package/dist/components/FormActions/types.d.ts +2 -2
- package/dist/components/ModalDialog/dictionary.d.ts +1 -1
- package/dist/components/ModalDialog/index.js +3 -2
- package/dist/components/ModalDialog/types.d.ts +2 -1
- package/dist/components/mui_extended/MenuActions/styles.d.ts +1 -1
- package/dist/contexts/ModalContext/types.d.ts +2 -1
- package/dist/index.js +43 -42
- package/dist/utils/index.d.ts +4 -0
- package/dist/vendor.js +87 -0
- package/package.json +1 -2
|
@@ -1255,40 +1255,40 @@ const ColumnsConfig = forwardRef((props, ref) => {
|
|
|
1255
1255
|
onClick: handleMoveFirst,
|
|
1256
1256
|
"aria-label": "move first place",
|
|
1257
1257
|
disabled: rowSelectedIndex < 1,
|
|
1258
|
-
src: `${host_static_assets}/${environment}/components/grid/assets/icons/move_first_place.svg`
|
|
1258
|
+
src: `${host_static_assets}/${environment}/frontend/components/grid/assets/icons/move_first_place.svg`
|
|
1259
1259
|
}), /* @__PURE__ */ jsx(IconButton, {
|
|
1260
1260
|
dictionaryTooltip: "grid.settings_move_up",
|
|
1261
1261
|
onClick: () => handleMoveUpDownd(-1),
|
|
1262
1262
|
"aria-label": "move up place",
|
|
1263
1263
|
disabled: rowSelectedIndex < 1,
|
|
1264
|
-
src: `${host_static_assets}/${environment}/components/grid/assets/icons/move_up_place.svg`
|
|
1264
|
+
src: `${host_static_assets}/${environment}/frontend/components/grid/assets/icons/move_up_place.svg`
|
|
1265
1265
|
}), /* @__PURE__ */ jsx(IconButton, {
|
|
1266
1266
|
dictionaryTooltip: "grid.settings_move_last",
|
|
1267
1267
|
onClick: handleMoveLast,
|
|
1268
1268
|
"aria-label": "move last place",
|
|
1269
1269
|
disabled: !!(rowSelectedIndex === rows.length - 1 || rowSelectedIndex === -1),
|
|
1270
|
-
src: `${host_static_assets}/${environment}/components/grid/assets/icons/move_last_place.svg`
|
|
1270
|
+
src: `${host_static_assets}/${environment}/frontend/components/grid/assets/icons/move_last_place.svg`
|
|
1271
1271
|
}), /* @__PURE__ */ jsx(IconButton, {
|
|
1272
1272
|
dictionaryTooltip: "grid.settings_move_down",
|
|
1273
1273
|
onClick: () => handleMoveUpDownd(1),
|
|
1274
1274
|
"aria-label": "move down place",
|
|
1275
1275
|
disabled: !!(rowSelectedIndex === rows.length - 1 || rowSelectedIndex === -1),
|
|
1276
|
-
src: `${host_static_assets}/${environment}/components/grid/assets/icons/move_down_place.svg`
|
|
1276
|
+
src: `${host_static_assets}/${environment}/frontend/components/grid/assets/icons/move_down_place.svg`
|
|
1277
1277
|
}), /* @__PURE__ */ jsx(IconButton, {
|
|
1278
1278
|
dictionaryTooltip: "grid.settings_visible_all",
|
|
1279
1279
|
onClick: checkAll,
|
|
1280
1280
|
"aria-label": "check visible all",
|
|
1281
|
-
src: `${host_static_assets}/${environment}/components/grid/assets/icons/check_all.svg`
|
|
1281
|
+
src: `${host_static_assets}/${environment}/frontend/components/grid/assets/icons/check_all.svg`
|
|
1282
1282
|
}), /* @__PURE__ */ jsx(IconButton, {
|
|
1283
1283
|
dictionaryTooltip: "grid.settings_no_visible_all",
|
|
1284
1284
|
onClick: unCheckAll,
|
|
1285
1285
|
"aria-label": "un check all",
|
|
1286
|
-
src: `${host_static_assets}/${environment}/components/grid/assets/icons/uncheck_all.svg`
|
|
1286
|
+
src: `${host_static_assets}/${environment}/frontend/components/grid/assets/icons/uncheck_all.svg`
|
|
1287
1287
|
}), /* @__PURE__ */ jsx(IconButton, {
|
|
1288
1288
|
dictionaryTooltip: "grid.settings_restore",
|
|
1289
1289
|
onClick: restoreAll,
|
|
1290
1290
|
"aria-label": "Restore columns",
|
|
1291
|
-
src: `${host_static_assets}/${environment}/components/grid/assets/icons/restore_columns.svg`
|
|
1291
|
+
src: `${host_static_assets}/${environment}/frontend/components/grid/assets/icons/restore_columns.svg`
|
|
1292
1292
|
})]
|
|
1293
1293
|
})]
|
|
1294
1294
|
});
|
|
@@ -1543,9 +1543,9 @@ function Actions(props) {
|
|
|
1543
1543
|
...pagerOptions,
|
|
1544
1544
|
totalRecords: pagerOptions.totalRecords,
|
|
1545
1545
|
isSkeleton
|
|
1546
|
-
}), typeof rowHeights !== "number" && /* @__PURE__ */ jsx(Density, {}), withSettings && /* @__PURE__ */ jsx(Settings, {
|
|
1546
|
+
}), typeof rowHeights !== "number" && /* @__PURE__ */ jsx(Density, {}), withLocalFilters && /* @__PURE__ */ jsx(Filter, {}), withSettings && /* @__PURE__ */ jsx(Settings, {
|
|
1547
1547
|
...settingsProps
|
|
1548
|
-
})
|
|
1548
|
+
})]
|
|
1549
1549
|
});
|
|
1550
1550
|
}
|
|
1551
1551
|
function DataGrid(props) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useModuleDictionary } from "@m4l/core";
|
|
2
2
|
import { Button } from "@mui/material";
|
|
3
|
+
import { g as getVariantColor } from "../../vendor.js";
|
|
3
4
|
import { styled } from "@mui/material/styles";
|
|
4
5
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
5
6
|
const WrapperActions = styled("div")(({
|
|
@@ -33,7 +34,7 @@ const FormActions = (props) => {
|
|
|
33
34
|
variant: "contained",
|
|
34
35
|
onClick: standardActions.onClickIntro,
|
|
35
36
|
type: "submit",
|
|
36
|
-
color: variant
|
|
37
|
+
color: getVariantColor(variant),
|
|
37
38
|
children: getLabel("actions.action_accept")
|
|
38
39
|
})]
|
|
39
40
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ModalOpenOptions } from
|
|
1
|
+
import { ModalOpenOptions, VariantModal } from '../../contexts/ModalContext/types';
|
|
2
2
|
declare type ImodalOpt = Pick<ModalOpenOptions, 'actionComponents' | 'standardActions'>;
|
|
3
3
|
export interface ActionsProps extends ImodalOpt {
|
|
4
|
-
variant?:
|
|
4
|
+
variant?: VariantModal;
|
|
5
5
|
onCloseModal?: () => void | undefined;
|
|
6
6
|
}
|
|
7
7
|
export {};
|
|
@@ -2,6 +2,7 @@ import { Dialog, IconButton, Paper } from "@mui/material";
|
|
|
2
2
|
import { D as Draggable } from "../../react-draggable.js";
|
|
3
3
|
import { u as useModal } from "../../hooks/useModal/index.js";
|
|
4
4
|
import { styled } from "@mui/material/styles";
|
|
5
|
+
import { a as getThemeVariantColor } from "../../vendor.js";
|
|
5
6
|
import { R as Resizeable } from "../Resizeable/index.js";
|
|
6
7
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
7
8
|
import { useEnvironment } from "@m4l/core";
|
|
@@ -39,7 +40,7 @@ const IconHeader = styled("div")(({ theme, variant }) => ({
|
|
|
39
40
|
justifyContent: "center",
|
|
40
41
|
marginRight: theme.spacing(1.5),
|
|
41
42
|
"& > span": {
|
|
42
|
-
background:
|
|
43
|
+
background: getThemeVariantColor(theme, variant)
|
|
43
44
|
}
|
|
44
45
|
}));
|
|
45
46
|
const Content = styled("div")(() => ({
|
|
@@ -48,7 +49,7 @@ const Content = styled("div")(() => ({
|
|
|
48
49
|
}));
|
|
49
50
|
const ModalTitle = styled("div")(({ theme, variant }) => ({
|
|
50
51
|
...theme.typography.subtitle1,
|
|
51
|
-
color:
|
|
52
|
+
color: getThemeVariantColor(theme, variant)
|
|
52
53
|
}));
|
|
53
54
|
const Header = (props) => {
|
|
54
55
|
const {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export declare const WrapperMenuActions: import("@emotion/styled").StyledComponent<{
|
|
3
3
|
children?: import("react").ReactNode;
|
|
4
4
|
classes?: Partial<import("@mui/material").IconButtonClasses> | undefined;
|
|
5
|
-
color?: "
|
|
5
|
+
color?: "warning" | "info" | "primary" | "error" | "inherit" | "default" | "secondary" | "success" | undefined;
|
|
6
6
|
disabled?: boolean | undefined;
|
|
7
7
|
disableFocusRipple?: boolean | undefined;
|
|
8
8
|
edge?: false | "end" | "start" | undefined;
|
|
@@ -7,13 +7,14 @@ export interface StandarActions {
|
|
|
7
7
|
onClickIntro?: () => void;
|
|
8
8
|
onClickCancel?: () => void;
|
|
9
9
|
}
|
|
10
|
-
export declare type VariantModal = 'warning' | 'delete' | 'info';
|
|
10
|
+
export declare type VariantModal = 'warning' | 'delete' | 'info' | 'primary';
|
|
11
11
|
export interface ModalOpenOptions {
|
|
12
12
|
initialWidth?: number;
|
|
13
13
|
initialHeigth?: number;
|
|
14
14
|
maxWidth?: number;
|
|
15
15
|
maxHeigth?: number;
|
|
16
16
|
withClose?: boolean;
|
|
17
|
+
variant?: VariantModal;
|
|
17
18
|
onQueryClose?: () => void;
|
|
18
19
|
title: string;
|
|
19
20
|
iconComponent?: ReactNode;
|
package/dist/index.js
CHANGED
|
@@ -1,71 +1,72 @@
|
|
|
1
|
+
export { v as varFade } from "./components/animate/variants/fade.js";
|
|
2
|
+
export { v as varBounce } from "./components/animate/variants/bounce.js";
|
|
3
|
+
export { v as varContainer } from "./components/animate/variants/container.js";
|
|
4
|
+
export { v as varTranEnter, a as varTranExit, b as varTranHover } from "./components/animate/variants/transition.js";
|
|
1
5
|
export { I as IconButton, a as IconButtonAnimate } from "./components/mui_extended/IconButton/index.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import "react/jsx-runtime";
|
|
5
|
-
import "react";
|
|
6
|
-
import "react-hook-form";
|
|
6
|
+
export { M as MotionContainer } from "./components/animate/MotionContainer/index.js";
|
|
7
|
+
export { M as MotionLazyContainer } from "./components/animate/MotionLazyContainer/index.js";
|
|
7
8
|
export { F as FormProvider } from "./components/hook-form/FormProvider/index.js";
|
|
8
|
-
import "react-router-dom";
|
|
9
|
-
import "@m4l/core";
|
|
10
|
-
import "@mui/lab";
|
|
11
|
-
export { M as ModalContext, a as ModalProvider } from "./contexts/ModalContext/index.js";
|
|
12
9
|
export { R as RHFAutocompleteAsync } from "./components/hook-form/RHFAutocompleteAsync/index.js";
|
|
13
10
|
export { R as RHFCheckbox } from "./components/hook-form/RHFCheckbox/index.js";
|
|
11
|
+
export { R as RHFMultiCheckbox } from "./components/hook-form/RHFMultiCheckbox/index.js";
|
|
12
|
+
export { R as RHFSelect } from "./components/hook-form/RHFSelect.js";
|
|
14
13
|
export { R as RHFTextField } from "./components/hook-form/RHFTextField/index.js";
|
|
14
|
+
export { R as RHFRadioGroup } from "./components/hook-form/RHFRadioGroup.js";
|
|
15
|
+
export { A as Accordion } from "./components/mui_extended/Accordion/index.js";
|
|
16
|
+
export { B as BoxIcon } from "./components/mui_extended/BoxIcon/index.js";
|
|
17
|
+
export { B as Breadcrumbs } from "./components/mui_extended/Breadcrumbs/index.js";
|
|
18
|
+
export { L as LinkWithRoute } from "./components/mui_extended/LinkWithRoute/index.js";
|
|
15
19
|
export { L as LoadingButton } from "./components/mui_extended/LoadingButton/index.js";
|
|
16
|
-
export { M as MenuPopover } from "./components/mui_extended/MenuPopover/index.js";
|
|
17
20
|
export { M as MenuActions } from "./components/mui_extended/MenuActions/index.js";
|
|
21
|
+
export { M as MenuPopover } from "./components/mui_extended/MenuPopover/index.js";
|
|
18
22
|
export { P as Pager, g as getPagerComponentsDictionary } from "./components/mui_extended/Pager/index.js";
|
|
19
23
|
export { T as Tab } from "./components/mui_extended/Tab/index.js";
|
|
20
|
-
|
|
24
|
+
export { T as Typography } from "./components/mui_extended/Typography/index.js";
|
|
21
25
|
export { C as CompanyLogo } from "./components/CompanyLogo/index.js";
|
|
22
|
-
import "./react-lazy-load-image-component.js";
|
|
23
|
-
import "@mui/material/styles";
|
|
24
|
-
export { I as Image } from "./components/Image/index.js";
|
|
25
26
|
export { D as DataGrid, g as getGridComponentsDictionary } from "./components/DataGrid/index.js";
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
import "date-fns";
|
|
27
|
+
export { B as BooleanFormatter } from "./components/DataGrid/formatters/BooleanFormatter/index.js";
|
|
28
|
+
export { D as DateFormatter } from "./components/DataGrid/formatters/DateFormatter/index.js";
|
|
29
29
|
export { F as FormActions, d as defaultActionsDictionary, g as getActionnsComponentsDictionary } from "./components/FormActions/index.js";
|
|
30
30
|
export { I as Icon } from "./components/Icon/index.js";
|
|
31
|
-
|
|
31
|
+
export { I as Image } from "./components/Image/index.js";
|
|
32
|
+
export { L as LanguagePopover } from "./components/LanguagePopover/index.js";
|
|
33
|
+
export { L as Loadable } from "./components/Loadable/index.js";
|
|
32
34
|
export { M as ModalDialog, d as defaultModalDialogDictionary, g as getModalDialogComponentsDictionary } from "./components/ModalDialog/index.js";
|
|
33
|
-
export { R as Resizeable } from "./components/Resizeable/index.js";
|
|
34
35
|
export { N as NoItemSelected, d as defaultNoItemSelectedDictionary, g as getNoItemSelectedComponentsDictionary } from "./components/NoItemSelected/index.js";
|
|
35
|
-
import "@mui/x-date-pickers";
|
|
36
36
|
export { O as ObjectLogs, d as defaultObjectLogDictionary, g as getObjectLogsComponentsDictionary } from "./components/ObjectLogs/index.js";
|
|
37
|
-
import "./react-json-view.js";
|
|
38
37
|
export { P as PaperForm } from "./components/PaperForm/index.js";
|
|
39
38
|
export { P as PropertyValue } from "./components/PropertyValue/index.js";
|
|
39
|
+
export { R as Resizeable } from "./components/Resizeable/index.js";
|
|
40
40
|
export { S as ScrollBar } from "./components/ScrollBar/index.js";
|
|
41
|
-
import "./react-splitter-layout.js";
|
|
42
41
|
export { S as SplitLayout } from "./components/SplitLayout/index.js";
|
|
43
|
-
export {
|
|
44
|
-
export { v as varBounce } from "./components/animate/variants/bounce.js";
|
|
45
|
-
export { v as varContainer } from "./components/animate/variants/container.js";
|
|
46
|
-
export { v as varTranEnter, a as varTranExit, b as varTranHover } from "./components/animate/variants/transition.js";
|
|
47
|
-
export { M as MotionContainer } from "./components/animate/MotionContainer/index.js";
|
|
48
|
-
export { M as MotionLazyContainer } from "./components/animate/MotionLazyContainer/index.js";
|
|
49
|
-
export { R as RHFMultiCheckbox } from "./components/hook-form/RHFMultiCheckbox/index.js";
|
|
50
|
-
export { R as RHFSelect } from "./components/hook-form/RHFSelect.js";
|
|
51
|
-
export { R as RHFRadioGroup } from "./components/hook-form/RHFRadioGroup.js";
|
|
52
|
-
export { A as Accordion } from "./components/mui_extended/Accordion/index.js";
|
|
53
|
-
export { B as BoxIcon } from "./components/mui_extended/BoxIcon/index.js";
|
|
54
|
-
export { B as Breadcrumbs } from "./components/mui_extended/Breadcrumbs/index.js";
|
|
55
|
-
export { L as LinkWithRoute } from "./components/mui_extended/LinkWithRoute/index.js";
|
|
56
|
-
export { T as Typography } from "./components/mui_extended/Typography/index.js";
|
|
57
|
-
export { B as BooleanFormatter } from "./components/DataGrid/formatters/BooleanFormatter/index.js";
|
|
58
|
-
export { D as DateFormatter } from "./components/DataGrid/formatters/DateFormatter/index.js";
|
|
59
|
-
export { L as LanguagePopover } from "./components/LanguagePopover/index.js";
|
|
60
|
-
export { L as Loadable } from "./components/Loadable/index.js";
|
|
42
|
+
export { M as ModalContext, a as ModalProvider } from "./contexts/ModalContext/index.js";
|
|
61
43
|
export { u as useModal } from "./hooks/useModal/index.js";
|
|
44
|
+
import "framer-motion";
|
|
45
|
+
import "react";
|
|
46
|
+
import "@mui/material";
|
|
47
|
+
import "react/jsx-runtime";
|
|
48
|
+
import "@m4l/core";
|
|
49
|
+
import "react-hook-form";
|
|
62
50
|
import "./node_modules.js";
|
|
63
|
-
import "
|
|
51
|
+
import "@mui/material/styles";
|
|
52
|
+
import "react-router-dom";
|
|
53
|
+
import "@mui/lab";
|
|
54
|
+
import "@m4l/graphics";
|
|
64
55
|
import "./react-data-grid.js";
|
|
65
56
|
import "clsx";
|
|
57
|
+
import "react-dnd";
|
|
58
|
+
import "react-dnd-html5-backend";
|
|
59
|
+
import "date-fns";
|
|
60
|
+
import "./vendor.js";
|
|
61
|
+
import "./react-lazy-load-image-component.js";
|
|
62
|
+
import "react-dom";
|
|
63
|
+
import "./react-draggable.js";
|
|
66
64
|
import "prop-types";
|
|
67
|
-
import "
|
|
65
|
+
import "@mui/x-date-pickers";
|
|
66
|
+
import "./react-json-view.js";
|
|
68
67
|
import "./commonjs.js";
|
|
68
|
+
import "./react-splitter-layout.js";
|
|
69
|
+
import "./react-resizable.js";
|
|
69
70
|
import "./simplebar.js";
|
|
70
71
|
import "./core-js.js";
|
|
71
72
|
import "./lodash.js";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Theme } from '@mui/material/styles';
|
|
2
|
+
import { VariantModal } from '../contexts/ModalContext/types';
|
|
3
|
+
export declare const getVariantColor: (variant: VariantModal | undefined) => "warning" | "info" | "primary" | "error";
|
|
4
|
+
export declare const getThemeVariantColor: (theme: Theme, variant: VariantModal | undefined) => string;
|
package/dist/vendor.js
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import "./components/mui_extended/IconButton/index.js";
|
|
2
|
+
import "framer-motion";
|
|
3
|
+
import "@mui/material";
|
|
4
|
+
import "react/jsx-runtime";
|
|
5
|
+
import "react";
|
|
6
|
+
import "react-hook-form";
|
|
7
|
+
import "./components/hook-form/FormProvider/index.js";
|
|
8
|
+
import "react-router-dom";
|
|
9
|
+
import "@m4l/core";
|
|
10
|
+
import "@mui/lab";
|
|
11
|
+
import "./contexts/ModalContext/index.js";
|
|
12
|
+
import "./components/hook-form/RHFAutocompleteAsync/index.js";
|
|
13
|
+
import "./components/hook-form/RHFCheckbox/index.js";
|
|
14
|
+
import "./components/hook-form/RHFTextField/index.js";
|
|
15
|
+
import "./components/mui_extended/LoadingButton/index.js";
|
|
16
|
+
import "./components/mui_extended/MenuPopover/index.js";
|
|
17
|
+
import "./components/mui_extended/MenuActions/index.js";
|
|
18
|
+
import "./components/mui_extended/Pager/index.js";
|
|
19
|
+
import "./components/mui_extended/Tab/index.js";
|
|
20
|
+
import "@m4l/graphics";
|
|
21
|
+
import "./components/CompanyLogo/index.js";
|
|
22
|
+
import "./react-lazy-load-image-component.js";
|
|
23
|
+
import "@mui/material/styles";
|
|
24
|
+
import "./components/Image/index.js";
|
|
25
|
+
import "./components/DataGrid/index.js";
|
|
26
|
+
import "react-dnd";
|
|
27
|
+
import "react-dnd-html5-backend";
|
|
28
|
+
import "date-fns";
|
|
29
|
+
import "./components/FormActions/index.js";
|
|
30
|
+
import "./components/Icon/index.js";
|
|
31
|
+
import "./react-draggable.js";
|
|
32
|
+
import "./components/ModalDialog/index.js";
|
|
33
|
+
import "./components/Resizeable/index.js";
|
|
34
|
+
import "./components/NoItemSelected/index.js";
|
|
35
|
+
import "@mui/x-date-pickers";
|
|
36
|
+
import "./components/ObjectLogs/index.js";
|
|
37
|
+
import "./react-json-view.js";
|
|
38
|
+
import "./components/PaperForm/index.js";
|
|
39
|
+
import "./components/PropertyValue/index.js";
|
|
40
|
+
import "./components/ScrollBar/index.js";
|
|
41
|
+
import "./react-splitter-layout.js";
|
|
42
|
+
import "./components/SplitLayout/index.js";
|
|
43
|
+
import "./components/animate/variants/fade.js";
|
|
44
|
+
import "./components/animate/variants/bounce.js";
|
|
45
|
+
import "./components/animate/variants/container.js";
|
|
46
|
+
import "./components/animate/variants/transition.js";
|
|
47
|
+
import "./components/animate/MotionContainer/index.js";
|
|
48
|
+
import "./components/animate/MotionLazyContainer/index.js";
|
|
49
|
+
import "./components/hook-form/RHFMultiCheckbox/index.js";
|
|
50
|
+
import "./components/hook-form/RHFSelect.js";
|
|
51
|
+
import "./components/hook-form/RHFRadioGroup.js";
|
|
52
|
+
import "./components/mui_extended/Accordion/index.js";
|
|
53
|
+
import "./components/mui_extended/BoxIcon/index.js";
|
|
54
|
+
import "./components/mui_extended/Breadcrumbs/index.js";
|
|
55
|
+
import "./components/mui_extended/LinkWithRoute/index.js";
|
|
56
|
+
import "./components/mui_extended/Typography/index.js";
|
|
57
|
+
import "./components/DataGrid/formatters/BooleanFormatter/index.js";
|
|
58
|
+
import "./components/DataGrid/formatters/DateFormatter/index.js";
|
|
59
|
+
import "./components/LanguagePopover/index.js";
|
|
60
|
+
import "./components/Loadable/index.js";
|
|
61
|
+
import "./hooks/useModal/index.js";
|
|
62
|
+
const getVariantColor = (variant) => {
|
|
63
|
+
switch (variant) {
|
|
64
|
+
case "warning":
|
|
65
|
+
return "warning";
|
|
66
|
+
case "delete":
|
|
67
|
+
return "error";
|
|
68
|
+
case "info":
|
|
69
|
+
return "info";
|
|
70
|
+
}
|
|
71
|
+
return "primary";
|
|
72
|
+
};
|
|
73
|
+
const getThemeVariantColor = (theme, variant) => {
|
|
74
|
+
switch (variant) {
|
|
75
|
+
case "warning":
|
|
76
|
+
theme.palette.warning.main;
|
|
77
|
+
break;
|
|
78
|
+
case "delete":
|
|
79
|
+
theme.palette.error.main;
|
|
80
|
+
break;
|
|
81
|
+
case "info":
|
|
82
|
+
theme.palette.info.main;
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
return theme.palette.text.primary;
|
|
86
|
+
};
|
|
87
|
+
export { getThemeVariantColor as a, getVariantColor as g };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.27",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "vite",
|
|
@@ -43,7 +43,6 @@
|
|
|
43
43
|
"@hookform/resolvers": "^2.9.5",
|
|
44
44
|
"@m4l/core": "^0.0.27",
|
|
45
45
|
"@m4l/graphics": "^0.0.21",
|
|
46
|
-
"@m4l/layouts": "^0.0.9",
|
|
47
46
|
"@mui/lab": "^5.0.0-alpha.89",
|
|
48
47
|
"@mui/material": "^5.8.7",
|
|
49
48
|
"@mui/x-date-pickers": "^5.0.0-beta.0",
|