@m4l/components 0.1.18 → 0.1.20

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.
Files changed (129) hide show
  1. package/components/CommonActions/components/ActionCancel/{index.7e947996.js → index.3775989f.js} +1 -1
  2. package/components/CommonActions/components/ActionFormCancel/{index.63405f6c.js → index.d69d9e0f.js} +2 -2
  3. package/components/CommonActions/components/ActionIntro/{index.bac90f39.js → index.ca7b6952.js} +1 -1
  4. package/components/CommonActions/components/Actions/{index.6b25caed.js → index.a908e4b9.js} +170 -171
  5. package/components/DataGrid/{index.091572bf.js → index.5cbf0dd8.js} +3 -3
  6. package/components/DynamicFilter/{index.7efecd5d.js → index.8a571617.js} +80 -82
  7. package/components/HelmetPage/index.d.ts +6 -0
  8. package/components/{Page → HelmetPage}/types.d.ts +2 -2
  9. package/components/Icon/{index.cbca79b0.js → index.f569765b.js} +41 -29
  10. package/components/Icon/types.d.ts +1 -0
  11. package/components/Image/index.c9da2d5a.js +152 -0
  12. package/components/Image/index.d.ts +2 -2
  13. package/components/Image/styles.d.ts +2 -4
  14. package/components/Image/subcomponents/BasicIntersectComponent/index.d.ts +3 -0
  15. package/components/Image/subcomponents/LazyLoadComponent/index.d.ts +3 -0
  16. package/components/Image/subcomponents/Skeleton/index.d.ts +3 -0
  17. package/components/Image/subcomponents/Skeleton/styles.d.ts +2 -0
  18. package/components/Image/subcomponents/Skeleton/types.d.ts +4 -0
  19. package/components/Image/types.d.ts +30 -15
  20. package/components/Image/utils/isIntersectionObserverAvailable.d.ts +1 -0
  21. package/components/LanguagePopover/styles.d.ts +1 -1
  22. package/components/ModalDialog/{index.0ddffae6.js → index.16024a4e.js} +3 -3
  23. package/components/NoItemSelected/{index.12f0ca67.js → index.9609a7f7.js} +1 -1
  24. package/components/NoItemSelected/styles.d.ts +1 -1
  25. package/components/ObjectLogs/{index.64f06b3d.js → index.ac2bfa48.js} +5 -5
  26. package/components/Page/index.fc660ee5.js +27 -0
  27. package/components/PaperForm/{index.d7c74064.js → index.3f8c7ef2.js} +1 -1
  28. package/components/Period/{index.8423f865.js → index.497b8df4.js} +7 -8
  29. package/components/animate/IconButtonAnimate/index.d.ts +1 -1
  30. package/components/animate/features.d.ts +2 -0
  31. package/components/animate/variants/bounce.d.ts +10 -10
  32. package/components/animate/variants/container.d.ts +1 -1
  33. package/components/animate/variants/fade.d.ts +21 -21
  34. package/components/animate/variants/transition.d.ts +6 -6
  35. package/components/{hook-form/FormProvider/index.936cbb98.js → contexts/RHFormContext/index.f8241292.js} +17 -16
  36. package/components/formatters/BooleanFormatter/{index.cca53b7f.js → index.3ec56305.js} +1 -1
  37. package/components/formatters/DateFormatter/{index.ad8d9b8e.js → index.08d8823b.js} +1 -1
  38. package/components/formatters/{index.55856d65.js → index.6959c2de.js} +1 -1
  39. package/components/hook-form/RHFAutocomplete/index.b7f11146.js +146 -0
  40. package/components/hook-form/RHFAutocomplete/index.d.ts +1 -2
  41. package/components/hook-form/RHFAutocomplete/styles.d.ts +0 -1
  42. package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/index.d.ts +3 -0
  43. package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/styles.d.ts +2 -0
  44. package/components/hook-form/RHFAutocomplete/types.d.ts +13 -7
  45. package/components/hook-form/RHFAutocompleteAsync/index.97a5a66e.js +51 -0
  46. package/components/hook-form/RHFAutocompleteAsync/index.d.ts +1 -2
  47. package/components/hook-form/RHFAutocompleteAsync/types.d.ts +3 -11
  48. package/components/hook-form/RHFCheckbox/index.6a40e25f.js +55 -0
  49. package/components/hook-form/RHFCheckbox/subcomponents/Skeleton/index.d.ts +2 -0
  50. package/components/hook-form/RHFCheckbox/subcomponents/Skeleton/styles.d.ts +2 -0
  51. package/components/hook-form/RHFDateTime/{index.fc5cbafe.js → index.5ed774e3.js} +24 -26
  52. package/components/hook-form/RHFDateTime/types.d.ts +2 -5
  53. package/components/hook-form/RHFPeriod/{index.0b982ae8.js → index.e17b1c72.js} +1 -1
  54. package/components/hook-form/RHFTextField/index.bab2a2cf.js +113 -0
  55. package/components/hook-form/RHFTextField/index.d.ts +1 -1
  56. package/components/hook-form/RHFTextField/subcomponents/Skeleton/index.d.ts +3 -0
  57. package/components/hook-form/RHFTextField/subcomponents/Skeleton/styles.d.ts +2 -0
  58. package/components/hook-form/RHFTextField/subcomponents/Skeleton/types.d.ts +4 -0
  59. package/components/hook-form/RHFTextField/types.d.ts +2 -5
  60. package/components/hook-form/RHFTextFieldPassword/index.d.ts +3 -0
  61. package/components/hook-form/RHFTextFieldPassword/types.d.ts +4 -0
  62. package/components/hook-form/RHFUpload/{index.ed3d739f.js → index.cbf11b68.js} +31 -36
  63. package/components/hook-form/index.d.ts +1 -2
  64. package/components/index.d.ts +2 -3
  65. package/components/mui_extended/Accordion/{index.2116e423.js → index.49f5df8e.js} +2 -2
  66. package/components/mui_extended/Avatar/index.d.ts +1 -1
  67. package/components/mui_extended/Avatar/index.dadb0528.js +37 -0
  68. package/components/mui_extended/Avatar/subcomponents/SkeletonAvatar/index.d.ts +2 -0
  69. package/components/mui_extended/Button/index.16591787.js +144 -0
  70. package/components/mui_extended/IconButton/index.4b5ce8b5.js +103 -0
  71. package/components/mui_extended/IconButton/index.d.ts +1 -1
  72. package/components/mui_extended/IconButton/subcomponents/SkeletonIconButton/index.d.ts +2 -0
  73. package/components/mui_extended/ImageButton/index.d.ts +3 -0
  74. package/components/mui_extended/ImageButton/types.d.ts +7 -0
  75. package/components/mui_extended/LinkWithRoute/index.16436ab8.js +26 -0
  76. package/components/mui_extended/LinkWithRoute/types.d.ts +2 -6
  77. package/components/mui_extended/LoadingButton/subcomponents/Skeleton/index.d.ts +2 -0
  78. package/components/mui_extended/LoadingButton/subcomponents/Skeleton/styles.d.ts +2 -0
  79. package/components/mui_extended/LoadingButton/types.d.ts +2 -2
  80. package/components/mui_extended/MenuActions/styles.d.ts +2 -2
  81. package/components/mui_extended/MenuActions/types.d.ts +2 -2
  82. package/components/mui_extended/Pager/{index.f0911163.js → index.80c2f8a0.js} +1 -1
  83. package/components/mui_extended/Popover/index.305f2ea5.js +218 -0
  84. package/components/mui_extended/Popover/index.d.ts +4 -0
  85. package/components/mui_extended/Popover/types.d.ts +9 -0
  86. package/components/mui_extended/Typography/index.e5494696.js +31 -0
  87. package/components/mui_extended/Typography/subcomponents/index.d.ts +3 -0
  88. package/components/mui_extended/Typography/subcomponents/types.d.ts +2 -0
  89. package/components/mui_extended/Typography/types.d.ts +3 -5
  90. package/components/mui_extended/index.d.ts +1 -1
  91. package/contexts/ModalContext/{index.1688a07c.js → index.699767c7.js} +3 -3
  92. package/contexts/RHFormContext/index.d.ts +3 -0
  93. package/{components/hook-form/FormProvider → contexts/RHFormContext}/styles.d.ts +0 -0
  94. package/{components/hook-form/FormProvider → contexts/RHFormContext}/types.d.ts +0 -0
  95. package/contexts/index.d.ts +2 -0
  96. package/hooks/useFormAddEdit/index.d.ts +1 -1
  97. package/hooks/useFormAddEdit/types.d.ts +1 -1
  98. package/hooks/useModal/{index.cdd84702.js → index.8201ccec.js} +1 -1
  99. package/index.js +148 -151
  100. package/package.json +3 -1
  101. package/utils/index.d.ts +1 -1
  102. package/components/CompanyLogo/index.d.ts +0 -3
  103. package/components/CompanyLogo/index.f81c179c.js +0 -75
  104. package/components/CompanyLogo/styles.d.ts +0 -5
  105. package/components/CompanyLogo/types.d.ts +0 -6
  106. package/components/Image/index.e790b50b.js +0 -122
  107. package/components/LanguagePopover/index.15f7dea7.js +0 -87
  108. package/components/Page/index.6d69977e.js +0 -35
  109. package/components/Page/index.d.ts +0 -3
  110. package/components/hook-form/FormProvider/index.d.ts +0 -3
  111. package/components/hook-form/RHFAutocomplete/index.6ed76d4c.js +0 -122
  112. package/components/hook-form/RHFAutocompleteAsync/index.8f2c97ea.js +0 -153
  113. package/components/hook-form/RHFAutocompleteAsync/styles.d.ts +0 -4
  114. package/components/hook-form/RHFCheckbox/index.f9ce6c39.js +0 -59
  115. package/components/hook-form/RHFCheckbox/styles.d.ts +0 -13
  116. package/components/hook-form/RHFTextField/index.4c455f75.js +0 -77
  117. package/components/hook-form/RHFTextField/styles.d.ts +0 -2
  118. package/components/mui_extended/Avatar/index.0a2a4523.js +0 -32
  119. package/components/mui_extended/Button/index.3debb608.js +0 -110
  120. package/components/mui_extended/Button/styles.d.ts +0 -12
  121. package/components/mui_extended/IconButton/index.88f3aadb.js +0 -98
  122. package/components/mui_extended/LinkWithRoute/index.d4b263de.js +0 -28
  123. package/components/mui_extended/LoadingButton/skeleton.d.ts +0 -2
  124. package/components/mui_extended/LoadingButton/styles.d.ts +0 -2
  125. package/components/mui_extended/MenuPopover/index.488fc536.js +0 -131
  126. package/components/mui_extended/MenuPopover/index.d.ts +0 -4
  127. package/components/mui_extended/MenuPopover/types.d.ts +0 -9
  128. package/components/mui_extended/Typography/index.0c4604b3.js +0 -22
  129. package/react-lazy-load-image-component.45b56650.js +0 -784
@@ -0,0 +1,37 @@
1
+ import { forwardRef as p } from "react";
2
+ import { useTheme as s } from "@mui/material/styles";
3
+ import { Skeleton as f, Avatar as m } from "@mui/material";
4
+ import { useModuleSkeleton as u } from "@m4l/core";
5
+ import { jsx as t } from "react/jsx-runtime";
6
+ const l = () => /* @__PURE__ */ t(f, {
7
+ variant: "circular",
8
+ width: "32px",
9
+ height: "32px"
10
+ }), d = p(({
11
+ color: e = "default",
12
+ children: a,
13
+ sx: o,
14
+ ...n
15
+ }, i) => {
16
+ const r = s();
17
+ return u() ? /* @__PURE__ */ t(l, {}) : e === "default" ? /* @__PURE__ */ t(m, {
18
+ ref: i,
19
+ sx: o,
20
+ ...n,
21
+ children: a
22
+ }) : /* @__PURE__ */ t(m, {
23
+ ref: i,
24
+ sx: {
25
+ fontWeight: r.typography.fontWeightMedium,
26
+ color: r.palette[e].contrastText,
27
+ backgroundColor: r.palette[e].main,
28
+ ...o
29
+ },
30
+ ...n,
31
+ children: a
32
+ });
33
+ });
34
+ d.displayName = "Avatar";
35
+ export {
36
+ d as A
37
+ };
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const SkeletonAvatar: () => JSX.Element;
@@ -0,0 +1,144 @@
1
+ import { useModuleSkeleton as g, useEnvironment as B, useModuleDictionary as k } from "@m4l/core";
2
+ import { Skeleton as m, styled as S, IconButton as v, Tooltip as I } from "@mui/material";
3
+ import _ from "@mui/material/Button";
4
+ import { jsx as i } from "react/jsx-runtime";
5
+ import { LoadingButton as b } from "@mui/lab";
6
+ import { I as x } from "../IconButton/index.4b5ce8b5.js";
7
+ import { styled as h, alpha as F } from "@mui/material/styles";
8
+ import { u as L } from "../../DynamicFilter/index.8a571617.js";
9
+ import { useMemo as u } from "react";
10
+ import { I as $ } from "../../Image/index.c9da2d5a.js";
11
+ const G = (t) => g() ? /* @__PURE__ */ i(_, {
12
+ ...t
13
+ }) : /* @__PURE__ */ i(m, {
14
+ sx: {
15
+ borderRadius: 2
16
+ },
17
+ variant: "rectangular",
18
+ width: "100px",
19
+ height: "36px"
20
+ }), D = S("div")(({
21
+ theme: t
22
+ }) => ({
23
+ display: "flex",
24
+ width: "100%",
25
+ borderRadius: t.spacing(1),
26
+ overflow: "hidden"
27
+ })), W = () => /* @__PURE__ */ i(D, {
28
+ id: "WrapperSKTLoadingButton",
29
+ children: /* @__PURE__ */ i(m, {
30
+ variant: "rectangular",
31
+ width: "100%",
32
+ height: "48px"
33
+ })
34
+ }), H = (t) => {
35
+ const {
36
+ children: r,
37
+ ...n
38
+ } = t;
39
+ return g() ? /* @__PURE__ */ i(W, {}) : /* @__PURE__ */ i(b, {
40
+ ...n,
41
+ children: r
42
+ });
43
+ }, w = h("div")(({
44
+ theme: t
45
+ }) => ({
46
+ display: "flex",
47
+ justifyContent: "center",
48
+ alignItems: "center",
49
+ minWidth: t.spacing(3.75),
50
+ height: t.spacing(3.75),
51
+ background: F(t.palette.primary.main, 0.3)
52
+ })), C = h("div")(() => ({
53
+ "&.isDirty": {
54
+ animationName: "dirtyEffect",
55
+ animationDuration: "1s",
56
+ animationFillMode: "both",
57
+ animationIterationCount: "infinite",
58
+ transition: "all .3s",
59
+ "@keyframes dirtyEffect": {
60
+ "20%": {
61
+ opacity: 1
62
+ },
63
+ "50%": {
64
+ opacity: 0.5
65
+ },
66
+ "100%": {
67
+ opacity: 1
68
+ }
69
+ }
70
+ },
71
+ "&.isDirtyError": {}
72
+ }));
73
+ function J() {
74
+ const {
75
+ isSkeleton: t,
76
+ fireOnChangeFilters: r,
77
+ automatic: n,
78
+ isDirty: o,
79
+ isValid: e
80
+ } = L(), {
81
+ host_static_assets: s,
82
+ environment_assets: l
83
+ } = B();
84
+ if (t)
85
+ return /* @__PURE__ */ i(w, {
86
+ children: /* @__PURE__ */ i(m, {
87
+ variant: "circular",
88
+ width: 20,
89
+ height: 20
90
+ })
91
+ });
92
+ const a = u(() => n || !o ? "action.active" : e ? "primary.main" : "error.main", [n, e, o]);
93
+ return /* @__PURE__ */ i(C, {
94
+ id: "WrapperFilterButton",
95
+ className: o && e ? "isDirty" : "",
96
+ children: /* @__PURE__ */ i(x, {
97
+ bgColor: a,
98
+ dictionaryTooltip: "dynamic_filter.filter_tooltip",
99
+ onClick: () => r(),
100
+ "aria-label": "settings",
101
+ src: `${s}/${l}/frontend/components/dynamic_filter/assets/icons/${n ? "refresh" : "search"}.svg`
102
+ })
103
+ });
104
+ }
105
+ function O({
106
+ src: t,
107
+ width: r,
108
+ height: n,
109
+ className: o,
110
+ useIntersectionObserver: e,
111
+ skeletonVariant: s = "circle",
112
+ tooltip: l,
113
+ dictionaryTooltip: a,
114
+ sx: d = {
115
+ width: 40,
116
+ height: 40
117
+ },
118
+ ...y
119
+ }) {
120
+ const {
121
+ getLabel: c
122
+ } = k(), p = u(() => a && c ? c(a) : l, [l, a, c]), f = u(() => /* @__PURE__ */ i(v, {
123
+ sx: d,
124
+ className: `m4l_image_button ${o || ""}`,
125
+ ...y,
126
+ children: /* @__PURE__ */ i($, {
127
+ src: t,
128
+ width: r,
129
+ height: n,
130
+ useIntersectionObserver: e,
131
+ skeletonVariant: s
132
+ })
133
+ }), [t, r, n, e, s, d]);
134
+ return p ? /* @__PURE__ */ i(I, {
135
+ title: p || "",
136
+ children: f
137
+ }) : f;
138
+ }
139
+ export {
140
+ G as B,
141
+ J as F,
142
+ O as I,
143
+ H as L
144
+ };
@@ -0,0 +1,103 @@
1
+ import { m as p } from "framer-motion";
2
+ import { forwardRef as f, useMemo as v } from "react";
3
+ import { IconButton as l, Box as I, Skeleton as b, Tooltip as h } from "@mui/material";
4
+ import { jsx as e } from "react/jsx-runtime";
5
+ import { useModuleDictionary as x, useModuleSkeleton as B } from "@m4l/core";
6
+ import { I as d } from "../../Icon/index.f569765b.js";
7
+ const g = {
8
+ hover: {
9
+ scale: 1.1
10
+ },
11
+ tap: {
12
+ scale: 0.95
13
+ }
14
+ }, S = {
15
+ hover: {
16
+ scale: 1.09
17
+ },
18
+ tap: {
19
+ scale: 0.97
20
+ }
21
+ }, k = {
22
+ hover: {
23
+ scale: 1.08
24
+ },
25
+ tap: {
26
+ scale: 0.99
27
+ }
28
+ };
29
+ function w({
30
+ size: n,
31
+ children: t
32
+ }) {
33
+ const a = n === "small", o = n === "large";
34
+ return /* @__PURE__ */ e(I, {
35
+ component: p.div,
36
+ whileTap: "tap",
37
+ whileHover: "hover",
38
+ variants: a && g || o && k || S,
39
+ sx: {
40
+ display: "inline-flex"
41
+ },
42
+ children: t
43
+ });
44
+ }
45
+ const M = f(({
46
+ children: n,
47
+ size: t = "medium",
48
+ ...a
49
+ }, o) => /* @__PURE__ */ e(w, {
50
+ size: t,
51
+ children: /* @__PURE__ */ e(l, {
52
+ size: t,
53
+ ref: o,
54
+ ...a,
55
+ children: n
56
+ })
57
+ }));
58
+ M.displayName = "IconButtonAnimate";
59
+ const A = () => /* @__PURE__ */ e(b, {
60
+ variant: "circular",
61
+ width: "30px",
62
+ height: "30px"
63
+ });
64
+ function N({
65
+ src: n,
66
+ tooltip: t,
67
+ size: a = "small",
68
+ dictionaryTooltip: o,
69
+ bgColor: s = "primary.active",
70
+ rotate: c,
71
+ ...r
72
+ }) {
73
+ const {
74
+ getLabel: i
75
+ } = x(), u = B(), m = v(() => {
76
+ if (!r.disabled)
77
+ return o && i ? i(o) : t;
78
+ }, [o, i, r.disabled]);
79
+ return u ? /* @__PURE__ */ e(A, {}) : m ? /* @__PURE__ */ e(h, {
80
+ title: m || "",
81
+ children: /* @__PURE__ */ e(l, {
82
+ size: a,
83
+ ...r,
84
+ children: /* @__PURE__ */ e(d, {
85
+ src: n,
86
+ bgColor: r.disabled ? "action.disabled" : s,
87
+ rotate: c
88
+ })
89
+ })
90
+ }) : /* @__PURE__ */ e(l, {
91
+ size: a,
92
+ ...r,
93
+ children: /* @__PURE__ */ e(d, {
94
+ src: n,
95
+ bgColor: r.disabled ? "action.disabled" : s,
96
+ rotate: c
97
+ })
98
+ });
99
+ }
100
+ export {
101
+ N as I,
102
+ M as a
103
+ };
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { IconButtonProps as MUIIconButtonProps } from '@mui/material';
3
3
  import { IconButtonProps } from './types';
4
- export declare function IconButton({ src, tooltip, size, dictionaryTooltip, bgColor, ...other }: IconButtonProps & MUIIconButtonProps): JSX.Element;
4
+ export declare function IconButton({ src, tooltip, size, dictionaryTooltip, bgColor, rotate, ...other }: IconButtonProps & MUIIconButtonProps): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const SkeletonIconButton: () => JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { ImageButtonProps } from './types';
3
+ export declare function ImageButton({ src, width, height, className, useIntersectionObserver, skeletonVariant, tooltip, dictionaryTooltip, sx, ...other }: ImageButtonProps): JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { ImageProps } from '../../Image/types';
2
+ import { IconButtonProps as MUIIconButtonProps } from '@mui/material';
3
+ export interface ImageButtonProps extends ImageProps, MUIIconButtonProps {
4
+ tooltip?: string;
5
+ className?: string;
6
+ dictionaryTooltip?: string;
7
+ }
@@ -0,0 +1,26 @@
1
+ import { Link as k } from "react-router-dom";
2
+ import { Skeleton as m, Link as h } from "@mui/material";
3
+ import { useModuleSkeleton as l } from "@m4l/core";
4
+ import { jsx as t } from "react/jsx-runtime";
5
+ const a = (e) => {
6
+ const {
7
+ to: o,
8
+ children: n,
9
+ skeletonWidth: i = "100%",
10
+ skeletonHeight: r = "14px",
11
+ ...s
12
+ } = e;
13
+ return l() ? /* @__PURE__ */ t(m, {
14
+ variant: "text",
15
+ width: i,
16
+ height: r
17
+ }) : /* @__PURE__ */ t(h, {
18
+ component: k,
19
+ to: o,
20
+ ...s,
21
+ children: n
22
+ });
23
+ };
24
+ export {
25
+ a as L
26
+ };
@@ -1,11 +1,7 @@
1
1
  import { LinkProps as MuiLinkProps } from '@mui/material';
2
2
  import { To } from 'history';
3
- export interface SkeletonProps {
4
- isSkeleton?: boolean;
5
- width?: string | number;
6
- height?: string | number;
7
- }
8
3
  export interface LinkWithRouteProps extends MuiLinkProps {
9
4
  to: To;
10
- skeletonProps: SkeletonProps;
5
+ skeletonWidth: string | number;
6
+ skeletonHeight: string | number;
11
7
  }
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const SkeletonLoadingButton: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const WrapperSkeleton: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,5 +1,5 @@
1
1
  import { LoadingButtonProps } from '@mui/lab';
2
+ import { ReactNode } from 'react';
2
3
  export interface MuiLabLoadingButtonProps extends LoadingButtonProps {
3
- isSkeleton?: boolean;
4
- children?: any;
4
+ children?: ReactNode;
5
5
  }
@@ -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" | "warning" | "info" | "primary" | "error" | "secondary" | "success" | undefined;
5
+ color?: "error" | "default" | "inherit" | "warning" | "info" | "primary" | "secondary" | "success" | undefined;
6
6
  disabled?: boolean | undefined;
7
7
  disableFocusRipple?: boolean | undefined;
8
8
  edge?: false | "end" | "start" | undefined;
@@ -26,5 +26,5 @@ export declare const WrapperMenuActions: import("@emotion/styled").StyledCompone
26
26
  touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
27
27
  }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>> & {
28
28
  ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
29
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "children" | "sx" | "tabIndex" | "disabled" | "action" | "size" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
29
+ }, "disabled" | "children" | "tabIndex" | "action" | keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "sx" | "size" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
30
30
  export declare const LabelMemuItem: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { MenuPopoverProps } from '../MenuPopover/types';
2
+ import { PopoverProps } from '../Popover/types';
3
3
  export interface ComponentActionProps {
4
4
  description?: string;
5
5
  onClick: (props?: any) => void;
@@ -14,7 +14,7 @@ export interface MenuAction {
14
14
  color?: string;
15
15
  component?: (props: ComponentActionProps) => JSX.Element;
16
16
  }
17
- export interface MenuActionsProps extends Omit<MenuPopoverProps, 'open'> {
17
+ export interface MenuActionsProps extends Omit<PopoverProps, 'open'> {
18
18
  objItem?: any;
19
19
  urlIcon?: string;
20
20
  menuActions: MenuAction[] | ((row: any) => MenuAction[]);
@@ -1,6 +1,6 @@
1
1
  import { useMemo as y } from "react";
2
2
  import { Skeleton as i, TablePagination as R } from "@mui/material";
3
- import { P as S } from "../../CommonActions/components/Actions/index.6b25caed.js";
3
+ import { P as S } from "../../CommonActions/components/Actions/index.a908e4b9.js";
4
4
  import { styled as a } from "@mui/material/styles";
5
5
  import { jsxs as l, jsx as e } from "react/jsx-runtime";
6
6
  a("div")(() => ({
@@ -0,0 +1,218 @@
1
+ import { useState as c } from "react";
2
+ import { Popover as g, styled as d, Stack as h, MenuItem as b } from "@mui/material";
3
+ import { I as u } from "../../Image/index.c9da2d5a.js";
4
+ import { useLocales as f } from "@m4l/graphics";
5
+ import "@m4l/core";
6
+ import "../../Icon/index.f569765b.js";
7
+ import { styled as I } from "@mui/material/styles";
8
+ import { jsxs as m, jsx as l, Fragment as x } from "react/jsx-runtime";
9
+ import "../Accordion/index.49f5df8e.js";
10
+ import "../Avatar/index.dadb0528.js";
11
+ import "react-router-dom";
12
+ import "@mui/material/Button";
13
+ import "@mui/lab";
14
+ import { I as S } from "../Button/index.16591787.js";
15
+ import "../../CommonActions/components/Actions/index.a908e4b9.js";
16
+ import "../Pager/index.80c2f8a0.js";
17
+ import "../Tab/index.e0653a0a.js";
18
+ const O = I("span")(({
19
+ arrowType: t,
20
+ theme: e
21
+ }) => {
22
+ const o = `solid 1px ${e.palette.grey[50012]}`, a = {
23
+ borderRadius: "0 0 3px 0",
24
+ top: -6,
25
+ borderBottom: o,
26
+ borderRight: o
27
+ }, n = {
28
+ borderRadius: "3px 0 0 0",
29
+ bottom: -6,
30
+ borderTop: o,
31
+ borderLeft: o
32
+ }, r = {
33
+ borderRadius: "0 3px 0 0",
34
+ left: -6,
35
+ borderTop: o,
36
+ borderRight: o
37
+ }, s = {
38
+ borderRadius: "0 0 0 3px",
39
+ right: -6,
40
+ borderBottom: o,
41
+ borderLeft: o
42
+ };
43
+ return {
44
+ display: "none",
45
+ [e.breakpoints.up("sm")]: {
46
+ zIndex: 1,
47
+ width: 12,
48
+ height: 12,
49
+ content: "''",
50
+ position: "absolute",
51
+ display: "block",
52
+ transform: "rotate(-135deg)",
53
+ background: e.palette.background.paper
54
+ },
55
+ ...t === "top-left" && {
56
+ ...a,
57
+ left: 20
58
+ },
59
+ ...t === "top-center" && {
60
+ ...a,
61
+ left: 0,
62
+ right: 0,
63
+ margin: "auto"
64
+ },
65
+ ...t === "top-right" && {
66
+ ...a,
67
+ right: 20
68
+ },
69
+ ...t === "bottom-left" && {
70
+ ...n,
71
+ left: 20
72
+ },
73
+ ...t === "bottom-center" && {
74
+ ...n,
75
+ left: 0,
76
+ right: 0,
77
+ margin: "auto"
78
+ },
79
+ ...t === "bottom-right" && {
80
+ ...n,
81
+ right: 20
82
+ },
83
+ ...t === "left-top" && {
84
+ ...r,
85
+ top: 20
86
+ },
87
+ ...t === "left-center" && {
88
+ ...r,
89
+ top: 0,
90
+ bottom: 0,
91
+ margin: "auto"
92
+ },
93
+ ...t === "left-bottom" && {
94
+ ...r,
95
+ bottom: 20
96
+ },
97
+ ...t === "right-top" && {
98
+ ...s,
99
+ top: 20
100
+ },
101
+ ...t === "right-center" && {
102
+ ...s,
103
+ top: 0,
104
+ bottom: 0,
105
+ margin: "auto"
106
+ },
107
+ ...t === "right-bottom" && {
108
+ ...s,
109
+ bottom: 20
110
+ }
111
+ };
112
+ });
113
+ function v({
114
+ children: t,
115
+ arrowType: e = "top-right",
116
+ sx: p,
117
+ className: i,
118
+ ...o
119
+ }) {
120
+ return /* @__PURE__ */ m(g, {
121
+ className: `m4l_popover ${i || ""}`,
122
+ anchorOrigin: {
123
+ vertical: "bottom",
124
+ horizontal: "right"
125
+ },
126
+ transformOrigin: {
127
+ vertical: "top",
128
+ horizontal: "right"
129
+ },
130
+ PaperProps: {
131
+ sx: {
132
+ p: 1,
133
+ overflow: "inherit",
134
+ ...p
135
+ }
136
+ },
137
+ ...o,
138
+ children: [e !== "no-arrow" && /* @__PURE__ */ l(O, {
139
+ arrowType: e
140
+ }), t]
141
+ });
142
+ }
143
+ const P = d("span")(({
144
+ theme: t
145
+ }) => ({
146
+ marginLeft: t.spacing(1)
147
+ }));
148
+ function V() {
149
+ const {
150
+ allLang: t,
151
+ currentLang: e,
152
+ onChangeLang: p
153
+ } = f(), [i, o] = c(null), a = (r) => {
154
+ o(r.currentTarget);
155
+ }, n = () => {
156
+ o(null);
157
+ };
158
+ return /* @__PURE__ */ m(x, {
159
+ children: [/* @__PURE__ */ l(S, {
160
+ className: "m4l_language_popover",
161
+ onClick: a,
162
+ sx: {
163
+ width: 40,
164
+ height: 40,
165
+ ...i && {
166
+ bgcolor: "action.selected"
167
+ }
168
+ },
169
+ src: e.icon,
170
+ alt: e.label,
171
+ width: "24px",
172
+ height: "24px",
173
+ skeletonVariant: "circle",
174
+ tooltip: "dddd"
175
+ }), /* @__PURE__ */ l(v, {
176
+ arrowType: "top-right",
177
+ open: Boolean(i),
178
+ anchorEl: i,
179
+ anchorOrigin: {
180
+ vertical: "bottom",
181
+ horizontal: "right"
182
+ },
183
+ onClose: n,
184
+ sx: {
185
+ mt: 1.5,
186
+ ml: 0.75,
187
+ width: 180,
188
+ rowGap: "100px",
189
+ "& .MuiMenuItem-root": {
190
+ px: 1,
191
+ typography: "body2",
192
+ borderRadius: 0.75
193
+ }
194
+ },
195
+ children: /* @__PURE__ */ l(h, {
196
+ spacing: 0.75,
197
+ children: t.map((r) => /* @__PURE__ */ m(b, {
198
+ selected: r.value === e.value,
199
+ onClick: () => {
200
+ p(r.value), n();
201
+ },
202
+ children: [/* @__PURE__ */ l(u, {
203
+ alt: r.label,
204
+ src: r.icon,
205
+ width: "24px",
206
+ height: "24px"
207
+ }), /* @__PURE__ */ l(P, {
208
+ children: r.label
209
+ })]
210
+ }, r.value))
211
+ })
212
+ })]
213
+ });
214
+ }
215
+ export {
216
+ V as L,
217
+ v as P
218
+ };
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { PopoverProps } from './types';
3
+ export declare function Popover({ children, arrowType, sx, className, ...other }: PopoverProps): JSX.Element;
4
+ export default Popover;
@@ -0,0 +1,9 @@
1
+ import { PopoverProps as MUIPopeverProps } from '@mui/material';
2
+ export declare type ArrowType = 'no-arrow' | 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'left-top' | 'left-center' | 'left-bottom' | 'right-top' | 'right-center' | 'right-bottom';
3
+ export declare type ArrowStyleProps = {
4
+ arrowType: ArrowType;
5
+ };
6
+ export interface PopoverProps extends MUIPopeverProps {
7
+ className?: string;
8
+ arrowType?: ArrowType;
9
+ }
@@ -0,0 +1,31 @@
1
+ import { useModuleSkeleton as s } from "@m4l/core";
2
+ import { Skeleton as p, Typography as i } from "@mui/material";
3
+ import { jsx as r } from "react/jsx-runtime";
4
+ const h = (t) => {
5
+ const {
6
+ skeletonWidth: e,
7
+ skeletongHeight: o
8
+ } = t;
9
+ return /* @__PURE__ */ r(p, {
10
+ variant: "text",
11
+ width: e,
12
+ height: o
13
+ });
14
+ };
15
+ function k(t) {
16
+ const {
17
+ skeletonWidth: e = "100%",
18
+ skeletongHeight: o = "18px",
19
+ ...n
20
+ } = t;
21
+ return s() ? /* @__PURE__ */ r(h, {
22
+ skeletonWidth: e,
23
+ skeletongHeight: o
24
+ }) : /* @__PURE__ */ r(i, {
25
+ className: "m4l_typography",
26
+ ...n
27
+ });
28
+ }
29
+ export {
30
+ k as T
31
+ };