@m4l/components 0.0.24 → 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.
@@ -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
- }), withLocalFilters && /* @__PURE__ */ jsx(Filter, {})]
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 === "warning" ? "warning" : variant === "error" ? "error" : "info",
37
+ color: getVariantColor(variant),
37
38
  children: getLabel("actions.action_accept")
38
39
  })]
39
40
  });
@@ -1,7 +1,7 @@
1
- import { ModalOpenOptions } from "../../contexts/ModalContext/types";
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?: string | undefined;
4
+ variant?: VariantModal;
5
5
  onCloseModal?: () => void | undefined;
6
6
  }
7
7
  export {};
@@ -1,3 +1,3 @@
1
- import { Dictionary } from "@m4l/core";
1
+ import { Dictionary } from '@m4l/core';
2
2
  export declare function getModalDialogComponentsDictionary(): string[];
3
3
  export declare const defaultModalDialogDictionary: Dictionary;
@@ -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: variant === "warning" ? theme.palette.warning.main : variant === "error" ? theme.palette.error.main : variant === "info" ? theme.palette.info.main : theme.palette.text.primary
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: variant === "warning" ? theme.palette.warning.main : variant === "error" ? theme.palette.error.main : variant === "info" ? theme.palette.info.main : theme.palette.text.primary
52
+ color: getThemeVariantColor(theme, variant)
52
53
  }));
53
54
  const Header = (props) => {
54
55
  const {
@@ -1,5 +1,6 @@
1
+ import { VariantModal } from '../../contexts/ModalContext/types';
1
2
  export interface ModalDialogProps {
2
3
  }
3
4
  export interface VariantProps {
4
- variant?: string | undefined;
5
+ variant?: VariantModal;
5
6
  }
@@ -1,8 +1,7 @@
1
1
  import { useState, useEffect, useCallback, useMemo } from "react";
2
2
  import { useNetwork, useModuleDictionary, usePaginate } from "@m4l/core";
3
3
  import { Tooltip, IconButton, TextField } from "@mui/material";
4
- import { LocalizationProvider, DateTimePicker } from "@mui/x-date-pickers";
5
- import AdapterDateFns from "@mui/lab/AdapterDateFns";
4
+ import { DateTimePicker } from "@mui/x-date-pickers";
6
5
  import { styled, useTheme } from "@mui/material/styles";
7
6
  import { startOfMonth, endOfDay } from "date-fns";
8
7
  import { D as DataGrid } from "../DataGrid/index.js";
@@ -225,25 +224,22 @@ function ObjectLogs(props) {
225
224
  return /* @__PURE__ */ jsxs(Container$1, {
226
225
  children: [/* @__PURE__ */ jsxs(Actions, {
227
226
  id: "objectLogsActions",
228
- children: [/* @__PURE__ */ jsxs(LocalizationProvider, {
229
- dateAdapter: AdapterDateFns,
230
- children: [/* @__PURE__ */ jsx(DateTimePicker, {
231
- value: startValue,
232
- onChange: (newValue) => {
233
- onChangeDate(newValue, "start");
234
- },
235
- renderInput: (params) => /* @__PURE__ */ jsx(TextField, {
236
- ...params
237
- })
238
- }), /* @__PURE__ */ jsx(DateTimePicker, {
239
- value: endValue,
240
- onChange: (newValue) => {
241
- onChangeDate(newValue, "end");
242
- },
243
- renderInput: (params) => /* @__PURE__ */ jsx(TextField, {
244
- ...params
245
- })
246
- })]
227
+ children: [/* @__PURE__ */ jsx(DateTimePicker, {
228
+ value: startValue,
229
+ onChange: (newValue) => {
230
+ onChangeDate(newValue, "start");
231
+ },
232
+ renderInput: (params) => /* @__PURE__ */ jsx(TextField, {
233
+ ...params
234
+ })
235
+ }), /* @__PURE__ */ jsx(DateTimePicker, {
236
+ value: endValue,
237
+ onChange: (newValue) => {
238
+ onChangeDate(newValue, "end");
239
+ },
240
+ renderInput: (params) => /* @__PURE__ */ jsx(TextField, {
241
+ ...params
242
+ })
247
243
  }), /* @__PURE__ */ jsx(IconButton$1, {
248
244
  dictionaryTooltip: "object_logs.search",
249
245
  onClick: onClickFilter,
@@ -0,0 +1,136 @@
1
+ import { VariantsType } from '../type';
2
+ export declare const varBounce: (props?: VariantsType | undefined) => {
3
+ in: {
4
+ initial: {};
5
+ animate: {
6
+ scale: number[];
7
+ opacity: number[];
8
+ transition: {
9
+ duration: number;
10
+ ease: "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate" | number[];
11
+ };
12
+ };
13
+ exit: {
14
+ scale: number[];
15
+ opacity: number[];
16
+ };
17
+ };
18
+ inUp: {
19
+ initial: {};
20
+ animate: {
21
+ y: number[];
22
+ scaleY: number[];
23
+ opacity: number[];
24
+ transition: {
25
+ duration: number;
26
+ ease: "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate" | number[];
27
+ };
28
+ };
29
+ exit: {
30
+ y: number[];
31
+ scaleY: number[];
32
+ opacity: number[];
33
+ transition: {
34
+ duration: number;
35
+ ease: "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate" | number[];
36
+ };
37
+ };
38
+ };
39
+ inDown: {
40
+ initial: {};
41
+ animate: {
42
+ y: number[];
43
+ scaleY: number[];
44
+ opacity: number[];
45
+ transition: {
46
+ duration: number;
47
+ ease: "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate" | number[];
48
+ };
49
+ };
50
+ exit: {
51
+ y: number[];
52
+ scaleY: number[];
53
+ opacity: number[];
54
+ transition: {
55
+ duration: number;
56
+ ease: "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate" | number[];
57
+ };
58
+ };
59
+ };
60
+ inLeft: {
61
+ initial: {};
62
+ animate: {
63
+ x: number[];
64
+ scaleX: number[];
65
+ opacity: number[];
66
+ transition: {
67
+ duration: number;
68
+ ease: "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate" | number[];
69
+ };
70
+ };
71
+ exit: {
72
+ x: number[];
73
+ scaleX: number[];
74
+ opacity: number[];
75
+ transition: {
76
+ duration: number;
77
+ ease: "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate" | number[];
78
+ };
79
+ };
80
+ };
81
+ inRight: {
82
+ initial: {};
83
+ animate: {
84
+ x: number[];
85
+ scaleX: number[];
86
+ opacity: number[];
87
+ transition: {
88
+ duration: number;
89
+ ease: "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate" | number[];
90
+ };
91
+ };
92
+ exit: {
93
+ x: number[];
94
+ scaleX: number[];
95
+ opacity: number[];
96
+ transition: {
97
+ duration: number;
98
+ ease: "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate" | number[];
99
+ };
100
+ };
101
+ };
102
+ out: {
103
+ animate: {
104
+ scale: number[];
105
+ opacity: number[];
106
+ };
107
+ };
108
+ outUp: {
109
+ animate: {
110
+ y: number[];
111
+ scaleY: number[];
112
+ opacity: number[];
113
+ };
114
+ };
115
+ outDown: {
116
+ animate: {
117
+ y: number[];
118
+ scaleY: number[];
119
+ opacity: number[];
120
+ };
121
+ };
122
+ outLeft: {
123
+ animate: {
124
+ x: number[];
125
+ scaleX: number[];
126
+ opacity: number[];
127
+ };
128
+ };
129
+ outRight: {
130
+ animate: {
131
+ x: number[];
132
+ scaleX: number[];
133
+ opacity: number[];
134
+ };
135
+ };
136
+ };
@@ -0,0 +1,97 @@
1
+ import { v as varTranEnter, a as varTranExit } from "./transition.js";
2
+ const varBounce = (props) => {
3
+ const durationIn = props?.durationIn;
4
+ const durationOut = props?.durationOut;
5
+ const easeIn = props?.easeIn;
6
+ const easeOut = props?.easeOut;
7
+ return {
8
+ in: {
9
+ initial: {},
10
+ animate: {
11
+ scale: [0.3, 1.1, 0.9, 1.03, 0.97, 1],
12
+ opacity: [0, 1, 1, 1, 1, 1],
13
+ transition: varTranEnter({ durationIn, easeIn })
14
+ },
15
+ exit: {
16
+ scale: [0.9, 1.1, 0.3],
17
+ opacity: [1, 1, 0]
18
+ }
19
+ },
20
+ inUp: {
21
+ initial: {},
22
+ animate: {
23
+ y: [720, -24, 12, -4, 0],
24
+ scaleY: [4, 0.9, 0.95, 0.985, 1],
25
+ opacity: [0, 1, 1, 1, 1],
26
+ transition: { ...varTranEnter({ durationIn, easeIn }) }
27
+ },
28
+ exit: {
29
+ y: [12, -24, 720],
30
+ scaleY: [0.985, 0.9, 3],
31
+ opacity: [1, 1, 0],
32
+ transition: varTranExit({ durationOut, easeOut })
33
+ }
34
+ },
35
+ inDown: {
36
+ initial: {},
37
+ animate: {
38
+ y: [-720, 24, -12, 4, 0],
39
+ scaleY: [4, 0.9, 0.95, 0.985, 1],
40
+ opacity: [0, 1, 1, 1, 1],
41
+ transition: varTranEnter({ durationIn, easeIn })
42
+ },
43
+ exit: {
44
+ y: [-12, 24, -720],
45
+ scaleY: [0.985, 0.9, 3],
46
+ opacity: [1, 1, 0],
47
+ transition: varTranExit({ durationOut, easeOut })
48
+ }
49
+ },
50
+ inLeft: {
51
+ initial: {},
52
+ animate: {
53
+ x: [-720, 24, -12, 4, 0],
54
+ scaleX: [3, 1, 0.98, 0.995, 1],
55
+ opacity: [0, 1, 1, 1, 1],
56
+ transition: varTranEnter({ durationIn, easeIn })
57
+ },
58
+ exit: {
59
+ x: [0, 24, -720],
60
+ scaleX: [1, 0.9, 2],
61
+ opacity: [1, 1, 0],
62
+ transition: varTranExit({ durationOut, easeOut })
63
+ }
64
+ },
65
+ inRight: {
66
+ initial: {},
67
+ animate: {
68
+ x: [720, -24, 12, -4, 0],
69
+ scaleX: [3, 1, 0.98, 0.995, 1],
70
+ opacity: [0, 1, 1, 1, 1],
71
+ transition: varTranEnter({ durationIn, easeIn })
72
+ },
73
+ exit: {
74
+ x: [0, -24, 720],
75
+ scaleX: [1, 0.9, 2],
76
+ opacity: [1, 1, 0],
77
+ transition: varTranExit({ durationOut, easeOut })
78
+ }
79
+ },
80
+ out: {
81
+ animate: { scale: [0.9, 1.1, 0.3], opacity: [1, 1, 0] }
82
+ },
83
+ outUp: {
84
+ animate: { y: [-12, 24, -720], scaleY: [0.985, 0.9, 3], opacity: [1, 1, 0] }
85
+ },
86
+ outDown: {
87
+ animate: { y: [12, -24, 720], scaleY: [0.985, 0.9, 3], opacity: [1, 1, 0] }
88
+ },
89
+ outLeft: {
90
+ animate: { x: [0, 24, -720], scaleX: [1, 0.9, 2], opacity: [1, 1, 0] }
91
+ },
92
+ outRight: {
93
+ animate: { x: [0, -24, 720], scaleX: [1, 0.9, 2], opacity: [1, 1, 0] }
94
+ }
95
+ };
96
+ };
97
+ export { varBounce as v };
@@ -1,3 +1,4 @@
1
1
  export * from './fade';
2
+ export * from './bounce';
2
3
  export * from './container';
3
4
  export * from './transition';
@@ -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?: "inherit" | "default" | "primary" | "secondary" | "success" | "error" | "info" | "warning" | undefined;
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
- import "framer-motion";
3
- import "@mui/material";
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
- import "@m4l/graphics";
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
- import "react-dnd";
27
- import "react-dnd-html5-backend";
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
- import "./react-draggable.js";
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
- import "@mui/lab/AdapterDateFns";
37
36
  export { O as ObjectLogs, d as defaultObjectLogDictionary, g as getObjectLogsComponentsDictionary } from "./components/ObjectLogs/index.js";
38
- import "./react-json-view.js";
39
37
  export { P as PaperForm } from "./components/PaperForm/index.js";
40
38
  export { P as PropertyValue } from "./components/PropertyValue/index.js";
39
+ export { R as Resizeable } from "./components/Resizeable/index.js";
41
40
  export { S as ScrollBar } from "./components/ScrollBar/index.js";
42
- import "./react-splitter-layout.js";
43
41
  export { S as SplitLayout } from "./components/SplitLayout/index.js";
44
- export { v as varFade } from "./components/animate/variants/fade.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 "react-dom";
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 "./react-resizable.js";
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.24",
4
+ "version": "0.0.27",
5
5
  "license": "UNLICENSED",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -21,7 +21,7 @@
21
21
  "peerDependencies": {
22
22
  "@hookform/resolvers": "^2.9.5",
23
23
  "@m4l/core": "^0.0.27",
24
- "@m4l/graphics": "^0.0.20",
24
+ "@m4l/graphics": "^0.0.21",
25
25
  "@mui/lab": "^5.0.0-alpha.89",
26
26
  "@mui/material": "^5.8.7",
27
27
  "@mui/x-date-pickers": "^5.0.0-beta.0",
@@ -42,7 +42,7 @@
42
42
  "@emotion/styled": "^11.9.3",
43
43
  "@hookform/resolvers": "^2.9.5",
44
44
  "@m4l/core": "^0.0.27",
45
- "@m4l/graphics": "^0.0.20",
45
+ "@m4l/graphics": "^0.0.21",
46
46
  "@mui/lab": "^5.0.0-alpha.89",
47
47
  "@mui/material": "^5.8.7",
48
48
  "@mui/x-date-pickers": "^5.0.0-beta.0",
@@ -81,6 +81,7 @@
81
81
  "react-lazy-load-image-component": "^1.5.4",
82
82
  "react-resizable": "^3.0.4",
83
83
  "react-splitter-layout": "^4.0.0",
84
+ "react-toastify": "^9.0.5",
84
85
  "rollup-plugin-terser": "^7.0.2",
85
86
  "simplebar-react": "^2.4.1",
86
87
  "typescript": "^4.6.3",