@m4l/components 9.1.66 → 9.1.68

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 (42) hide show
  1. package/@types/types.d.ts +8 -1
  2. package/components/LinearProgressIndeterminate/LinearProgressIndeterminate.d.ts +7 -6
  3. package/components/LinearProgressIndeterminate/LinearProgressIndeterminate.js +19 -18
  4. package/components/LinearProgressIndeterminate/LinearProgressIndeterminate.styles.d.ts +2 -0
  5. package/components/LinearProgressIndeterminate/LinearProgressIndeterminate.styles.js +25 -0
  6. package/components/LinearProgressIndeterminate/constants.d.ts +1 -0
  7. package/components/LinearProgressIndeterminate/constants.js +4 -0
  8. package/components/LinearProgressIndeterminate/slots/LinearProgressIndeterminateEnum.d.ts +3 -0
  9. package/components/LinearProgressIndeterminate/slots/LinearProgressIndeterminateEnum.js +7 -0
  10. package/components/LinearProgressIndeterminate/slots/LinearProgressIndeterminateSlots.d.ts +3 -0
  11. package/components/LinearProgressIndeterminate/slots/LinearProgressIndeterminateSlots.js +12 -0
  12. package/components/LinearProgressIndeterminate/slots/index.d.ts +2 -0
  13. package/components/LinearProgressIndeterminate/slots/index.js +1 -0
  14. package/components/LinearProgressIndeterminate/types.d.ts +45 -0
  15. package/components/WindowBase/WindowBase.d.ts +2 -2
  16. package/components/WindowBase/WindowBase.js +6 -3
  17. package/components/WindowBase/WindowBase.styles.js +36 -24
  18. package/components/WindowBase/slots/WindowBaseEnum.d.ts +2 -1
  19. package/components/WindowBase/slots/WindowBaseEnum.js +1 -0
  20. package/components/WindowBase/slots/WindowBaseSlots.d.ts +3 -0
  21. package/components/WindowBase/slots/WindowBaseSlots.js +6 -0
  22. package/components/WindowBase/types.d.ts +10 -2
  23. package/components/mui_extended/MenuItem/MenuItem.d.ts +2 -2
  24. package/components/mui_extended/MenuItem/MenuItem.js +8 -5
  25. package/components/mui_extended/MenuItem/MenuItem.styles.js +28 -9
  26. package/components/mui_extended/MenuItem/types.d.ts +5 -1
  27. package/index.js +10 -9
  28. package/package.json +1 -1
  29. package/components/LinearProgressIndeterminate/classes/constants.d.ts +0 -1
  30. package/components/LinearProgressIndeterminate/classes/constants.js +0 -4
  31. package/components/LinearProgressIndeterminate/classes/index.d.ts +0 -6
  32. package/components/LinearProgressIndeterminate/classes/index.js +0 -28
  33. package/components/LinearProgressIndeterminate/classes/types.d.ts +0 -7
  34. package/components/LinearProgressIndeterminate/styles.d.ts +0 -1
  35. package/components/LinearProgressIndeterminate/styles.js +0 -7
  36. package/components/LinearProgressIndeterminate/tests/constants.d.ts +0 -1
  37. package/components/LinearProgressIndeterminate/tests/constants.js +0 -4
  38. package/components/LinearProgressIndeterminate/tests/utils.d.ts +0 -5
  39. package/components/LinearProgressIndeterminate/tests/utils.js +0 -7
  40. /package/components/LinearProgressIndeterminate/tests/{index.test.d.ts → LinearProgressIndeterminate.test.d.ts} +0 -0
  41. /package/components/mui_extended/MenuItem/{MenuItem.integration.test.d.ts → tests/MenuItem.integration.test.d.ts} +0 -0
  42. /package/components/mui_extended/MenuItem/{MenuItem.test.d.ts → tests/MenuItem.test.d.ts} +0 -0
package/@types/types.d.ts CHANGED
@@ -138,8 +138,8 @@ import { PopoverOwnerState, PopoverSlotsType } from '../components/mui_extended/
138
138
  import { AccountPopoverOwnerState, AccountPopoverSlotsType } from '../components/AccountPopover/types';
139
139
  import { PropertyVaLueOwnerState, PropertyValueType } from '../components/PropertyValue/types';
140
140
  import { RHFTextFieldPasswordOwnerState, RHFTextFieldPasswordType } from '../components/hook-form/RHFTextFieldPassword/types';
141
-
142
141
  import { RHFAutocompleteOwnerState, RHFAutocompleteSlotsType } from '../components/hook-form/RHFAutocomplete/types';
142
+ import { LinearProgressIndeterminateOwnerState, LinearProgressIndeterminateType } from '../components/LinearProgressIndeterminate/types';
143
143
  import { MenuDividerOwnerState, MenuDividerSlotsType } from '../components/mui_extended/MenuDivider/types';
144
144
 
145
145
  declare module '@mui/material/styles' {
@@ -196,6 +196,7 @@ declare module '@mui/material/styles' {
196
196
  M4LAccountPopover: AccountPopoverSlotsType;
197
197
  M4LPropertyValue: PropertyValueType;
198
198
  M4LRHFTextFieldPassword: RHFTextFieldPasswordType;
199
+ M4LLinearProgressIndeterminate: LinearProgressIndeterminateType;
199
200
  M4LMenuDivider: MenuDividerSlotsType;
200
201
  }
201
202
 
@@ -252,6 +253,7 @@ declare module '@mui/material/styles' {
252
253
  M4LColor: Partial<ColorOwnerState>;
253
254
  M4LRHFColorPicker: Partial<RHFColorPickerOwnerState>;
254
255
  M4LRHFTextFieldPassword: Partial<RHFTextFieldPasswordOwnerState>;
256
+ M4LLinearProgressIndeterminate: Partial<LinearProgressIndeterminateOwnerState>;
255
257
  M4LMenuDivider: Partial<MenuDividerOwnerState>;
256
258
  }
257
259
 
@@ -606,6 +608,11 @@ declare module '@mui/material/styles' {
606
608
  styleOverrides?: ComponentsOverrides<Theme>['M4LRHFTextFieldPassword'];
607
609
  variants?: ComponentsVariants['M4LRHFTextFieldPassword'];
608
610
  };
611
+ M4LLinearProgressIndeterminate?: {
612
+ defaultProps?: ComponentsPropsList['M4LLinearProgressIndeterminate'];
613
+ styleOverrides?: ComponentsOverrides<Theme>['M4LLinearProgressIndeterminate'];
614
+ variants?: ComponentsVariants['M4LLinearProgressIndeterminate'];
615
+ };
609
616
  M4LMenuDivider?: {
610
617
  defaultProps?: ComponentsPropsList['M4LMenuDivider'];
611
618
  styleOverrides?: ComponentsOverrides<Theme>['M4LMenuDivider'];
@@ -1,8 +1,9 @@
1
+ import { LinearProgressIndeterminateProps } from './types';
1
2
  /**
2
- * @function este componente proporciona una representación visual de una barra de progreso indeterminada con opciones de personalización y soporte para pruebas.
3
- * @returns {JSX.Element} Elemento JSX que representa el componente.
3
+ * LinearProgressIndeterminateProps Component to display a linear progress bar with an indeterminate state.
4
+ * @author cesar - automatic
5
+ * @createdAt 2025-01-13 11:39:49 - automatic
6
+ * @updatedAt 2025-01-14 09:10:46 - automatic
7
+ * @updatedUser cesar - automatic
4
8
  */
5
- /**
6
- * TODO: Documentar
7
- */
8
- export declare const LinearProgressIndeterminate: () => import("react/jsx-runtime").JSX.Element;
9
+ export declare const LinearProgressIndeterminate: (props: LinearProgressIndeterminateProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,25 +1,26 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
+ import { g as getPropDataTestId } from "../../test/getNameDataTestId.js";
2
3
  import clsx from "clsx";
3
- import { g as getLinearProgressIndeterminateUtilityClasses } from "./classes/index.js";
4
- import { L as LinearProgressIndeterminateRoot } from "./styles.js";
5
- import { g as getNameLinearProgressIndeterminateDataTestId } from "./tests/utils.js";
6
- import { T as TEST_PROP_ID } from "../../test/constants_no_mock.js";
7
- const classes = getLinearProgressIndeterminateUtilityClasses();
8
- const LinearProgressIndeterminate = () => {
4
+ import { a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
5
+ import { L as LINEAR_PROGRESS_INDETERMINATE_KEY_COMPONENT } from "./constants.js";
6
+ import { L as LinearProgressIndeterminateRootStyled } from "./slots/LinearProgressIndeterminateSlots.js";
7
+ import { L as LinearProgressIndeterminateSlots } from "./slots/LinearProgressIndeterminateEnum.js";
8
+ const LinearProgressIndeterminate = (props) => {
9
+ const {
10
+ dataTestId,
11
+ className,
12
+ color = "primary"
13
+ } = props;
14
+ const ownerState = {
15
+ linearProgressIndeterminateColor: color
16
+ };
9
17
  return /* @__PURE__ */ jsx(
10
- LinearProgressIndeterminateRoot,
18
+ LinearProgressIndeterminateRootStyled,
11
19
  {
12
- className: clsx(classes.root, "borealisBar"),
13
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameLinearProgressIndeterminateDataTestId("root") } : {},
14
- children: /* @__PURE__ */ jsx(
15
- "div",
16
- {
17
- className: classes.windowLinearProgressBar,
18
- ...process.env.NODE_ENV !== "production" ? {
19
- [TEST_PROP_ID]: getNameLinearProgressIndeterminateDataTestId("windowLinearProgressBar")
20
- } : {}
21
- }
22
- )
20
+ role: "linear-progress-indeterminate-role",
21
+ className: clsx(getComponentSlotRoot(LINEAR_PROGRESS_INDETERMINATE_KEY_COMPONENT), className),
22
+ ...getPropDataTestId(LINEAR_PROGRESS_INDETERMINATE_KEY_COMPONENT, LinearProgressIndeterminateSlots.root, dataTestId),
23
+ ownerState
23
24
  }
24
25
  );
25
26
  };
@@ -0,0 +1,2 @@
1
+ import { LinearProgressIndeterminateStyles } from './types';
2
+ export declare const linearProgressIndeterminateStyles: LinearProgressIndeterminateStyles;
@@ -0,0 +1,25 @@
1
+ const linearProgressIndeterminateStyles = {
2
+ /**
3
+ * Root element of the LinearProgressIndeterminate.
4
+ * @author cesar - automatic
5
+ * @createdAt 2025-01-13 11:39:49 - automatic
6
+ * @updatedAt 2025-01-14 09:38:54 - automatic
7
+ * @updatedUser cesar - automatic
8
+ */
9
+ root: ({ theme, ownerState }) => ({
10
+ position: "absolute",
11
+ top: 0,
12
+ left: 0,
13
+ right: 0,
14
+ zIndex: 10,
15
+ height: theme.vars.size.baseSpacings["sp0-5"],
16
+ backgroundColor: theme.vars.palette[ownerState.linearProgressIndeterminateColor ?? "default"].selectedOpacity,
17
+ borderRadius: theme.vars.size.borderRadius.r1,
18
+ "& .MuiLinearProgress-bar": {
19
+ backgroundColor: theme.vars.palette[ownerState.linearProgressIndeterminateColor ?? "default"].semanticText
20
+ }
21
+ })
22
+ };
23
+ export {
24
+ linearProgressIndeterminateStyles as l
25
+ };
@@ -0,0 +1 @@
1
+ export declare const LINEAR_PROGRESS_INDETERMINATE_KEY_COMPONENT = "M4LLinearProgressIndeterminate";
@@ -0,0 +1,4 @@
1
+ const LINEAR_PROGRESS_INDETERMINATE_KEY_COMPONENT = "M4LLinearProgressIndeterminate";
2
+ export {
3
+ LINEAR_PROGRESS_INDETERMINATE_KEY_COMPONENT as L
4
+ };
@@ -0,0 +1,3 @@
1
+ export declare enum LinearProgressIndeterminateSlots {
2
+ root = "root"
3
+ }
@@ -0,0 +1,7 @@
1
+ var LinearProgressIndeterminateSlots = /* @__PURE__ */ ((LinearProgressIndeterminateSlots2) => {
2
+ LinearProgressIndeterminateSlots2["root"] = "root";
3
+ return LinearProgressIndeterminateSlots2;
4
+ })(LinearProgressIndeterminateSlots || {});
5
+ export {
6
+ LinearProgressIndeterminateSlots as L
7
+ };
@@ -0,0 +1,3 @@
1
+ export declare const LinearProgressIndeterminateRootStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').LinearProgressProps, keyof import('@mui/material').LinearProgressProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').LinearProgressIndeterminateOwnerState> & Record<string, unknown> & {
2
+ ownerState: Partial<import('../types').LinearProgressIndeterminateOwnerState> & Record<string, unknown>;
3
+ }, {}, {}>;
@@ -0,0 +1,12 @@
1
+ import { L as LINEAR_PROGRESS_INDETERMINATE_KEY_COMPONENT } from "../constants.js";
2
+ import { styled } from "@mui/material/styles";
3
+ import { L as LinearProgressIndeterminateSlots } from "./LinearProgressIndeterminateEnum.js";
4
+ import { l as linearProgressIndeterminateStyles } from "../LinearProgressIndeterminate.styles.js";
5
+ import { L as LinearProgress } from "../../mui_extended/LinearProgress/index.js";
6
+ const LinearProgressIndeterminateRootStyled = styled(LinearProgress, {
7
+ name: LINEAR_PROGRESS_INDETERMINATE_KEY_COMPONENT,
8
+ slot: LinearProgressIndeterminateSlots.root
9
+ })(linearProgressIndeterminateStyles?.root);
10
+ export {
11
+ LinearProgressIndeterminateRootStyled as L
12
+ };
@@ -0,0 +1,2 @@
1
+ export * from './LinearProgressIndeterminateEnum';
2
+ export * from './LinearProgressIndeterminateSlots';
@@ -0,0 +1,45 @@
1
+ import { OverridesStyleRules } from '@mui/material/styles/overrides';
2
+ import { Theme } from '@mui/material/styles';
3
+ import { LinearProgressIndeterminateSlots } from './slots/LinearProgressIndeterminateEnum';
4
+ import { LINEAR_PROGRESS_INDETERMINATE_KEY_COMPONENT } from './constants';
5
+ import { ComponentPalletColor } from '@m4l/styles';
6
+ /**
7
+ * Tipos de ranuras disponibles para el componente `LinearProgressIndeterminate`.
8
+ */
9
+ export type LinearProgressIndeterminateType = keyof typeof LinearProgressIndeterminateSlots;
10
+ /**
11
+ * Props principales para el componente `LinearProgressIndeterminate`.
12
+ */
13
+ export interface LinearProgressIndeterminateProps {
14
+ /**
15
+ * Clase CSS personalizada que se aplicará al componente raíz.
16
+ */
17
+ className?: string;
18
+ /**
19
+ * Define si el componente está deshabilitado.
20
+ */
21
+ disabled?: boolean;
22
+ /**
23
+ * Texto o contenido adicional que se puede renderizar dentro del componente.
24
+ */
25
+ children?: React.ReactNode;
26
+ /**
27
+ * Identificador de prueba para el componente.
28
+ */
29
+ dataTestId?: string;
30
+ /**
31
+ * Define el color del componente.
32
+ */
33
+ color?: Extract<ComponentPalletColor, 'primary'>;
34
+ /**
35
+ * Propiedades adicionales que se pueden aplicar al componente.
36
+ */
37
+ [key: string]: any;
38
+ }
39
+ export type LinearProgressIndeterminateOwnerState = {
40
+ linearProgressIndeterminateColor?: LinearProgressIndeterminateProps['color'];
41
+ };
42
+ /**
43
+ * Define las clases CSS aplicables al componente.
44
+ */
45
+ export type LinearProgressIndeterminateStyles = OverridesStyleRules<LinearProgressIndeterminateType, typeof LINEAR_PROGRESS_INDETERMINATE_KEY_COMPONENT, Theme>;
@@ -5,7 +5,7 @@ import { WindowBaseProps } from './types';
5
5
  * It uses hooks like `useModal` and utility style classes.
6
6
  * @author cesar - automatic
7
7
  * @createdAt 2024-11-15 18:08:44 - automatic
8
- * @updatedAt 2024-12-30 14:36:09 - automatic
9
- * @updatedUser Andrés Quintero - automatic
8
+ * @updatedAt 2025-01-13 11:59:58 - automatic
9
+ * @updatedUser cesar - automatic
10
10
  */
11
11
  export declare const WindowBase: (props: WindowBaseProps) => import("react/jsx-runtime").JSX.Element;
@@ -6,7 +6,7 @@ import { W as WINDOW_BASE_KEY_COMPONENT } from "./constants.js";
6
6
  import { a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
7
7
  import clsx from "clsx";
8
8
  import { H as HeaderWindowBase } from "./subcomponents/Header/HeaderWindowBase.js";
9
- import { W as WindowBaseStyled, C as ContentWindowStyled } from "./slots/WindowBaseSlots.js";
9
+ import { W as WindowBaseStyled, C as ContentWindowStyled, L as LinearProgressIndeterminateStyled } from "./slots/WindowBaseSlots.js";
10
10
  import { W as WindowBaseSlots } from "./slots/WindowBaseEnum.js";
11
11
  const WindowBase = (props) => {
12
12
  const {
@@ -18,6 +18,8 @@ const WindowBase = (props) => {
18
18
  version,
19
19
  dataTestId,
20
20
  onClose,
21
+ className,
22
+ isLoading,
21
23
  ...other
22
24
  } = props;
23
25
  const { currentSize } = useComponentSize(size);
@@ -31,7 +33,7 @@ const WindowBase = (props) => {
31
33
  return /* @__PURE__ */ jsx(AppearanceComponentProvider, { defaultSize: currentSize, children: /* @__PURE__ */ jsxs(
32
34
  WindowBaseStyled,
33
35
  {
34
- className: clsx(getComponentSlotRoot(WINDOW_BASE_KEY_COMPONENT)),
36
+ className: clsx(getComponentSlotRoot(WINDOW_BASE_KEY_COMPONENT), className),
35
37
  ...getPropDataTestId(WINDOW_BASE_KEY_COMPONENT, WindowBaseSlots.wrapperWindowBase, dataTestId),
36
38
  ownerState,
37
39
  children: [
@@ -53,7 +55,8 @@ const WindowBase = (props) => {
53
55
  ownerState,
54
56
  children
55
57
  }
56
- )
58
+ ),
59
+ isLoading && /* @__PURE__ */ jsx(LinearProgressIndeterminateStyled, { ownerState: {} })
57
60
  ]
58
61
  }
59
62
  ) });
@@ -3,10 +3,11 @@ const windowBaseStyles = {
3
3
  * Styles for the window base wrapper component.
4
4
  * @author cesar - automatic
5
5
  * @createdAt 2024-11-15 18:08:44 - automatic
6
- * @updatedAt 2024-12-30 14:36:09 - automatic
7
- * @updatedUser Andrés Quintero - automatic
6
+ * @updatedAt 2025-01-13 11:59:58 - automatic
7
+ * @updatedUser cesar - automatic
8
8
  */
9
9
  wrapperWindowBase: ({ theme, ownerState }) => ({
10
+ position: "relative",
10
11
  height: "100%",
11
12
  width: "100%",
12
13
  display: "flex",
@@ -27,8 +28,8 @@ const windowBaseStyles = {
27
28
  * Styles for the content of the window base component.
28
29
  * @author cesar - automatic
29
30
  * @createdAt 2024-11-15 18:08:44 - automatic
30
- * @updatedAt 2024-12-30 14:36:09 - automatic
31
- * @updatedUser Andrés Quintero - automatic
31
+ * @updatedAt 2025-01-13 11:59:58 - automatic
32
+ * @updatedUser cesar - automatic
32
33
  */
33
34
  contentWindowBase: ({ theme }) => ({
34
35
  padding: theme.vars.size.baseSpacings.sp3,
@@ -40,8 +41,8 @@ const windowBaseStyles = {
40
41
  * Styles for the header of the window base component.
41
42
  * @author cesar - automatic
42
43
  * @createdAt 2024-11-15 18:08:44 - automatic
43
- * @updatedAt 2024-12-30 14:36:09 - automatic
44
- * @updatedUser Andrés Quintero - automatic
44
+ * @updatedAt 2025-01-13 11:59:58 - automatic
45
+ * @updatedUser cesar - automatic
45
46
  */
46
47
  headerWindowComponent: ({ theme, ownerState }) => ({
47
48
  width: "100%",
@@ -77,8 +78,8 @@ const windowBaseStyles = {
77
78
  * Styles for the content of the header of the window base component.
78
79
  * @author cesar - automatic
79
80
  * @createdAt 2024-11-15 18:08:44 - automatic
80
- * @updatedAt 2024-12-30 14:36:09 - automatic
81
- * @updatedUser Andrés Quintero - automatic
81
+ * @updatedAt 2025-01-13 11:59:58 - automatic
82
+ * @updatedUser cesar - automatic
82
83
  */
83
84
  headerContentWindowBase: ({ theme }) => ({
84
85
  width: "100%",
@@ -94,8 +95,8 @@ const windowBaseStyles = {
94
95
  * Styles for the title of the header of the window base component.
95
96
  * @author cesar - automatic
96
97
  * @createdAt 2024-11-15 18:08:44 - automatic
97
- * @updatedAt 2024-12-30 14:36:09 - automatic
98
- * @updatedUser Andrés Quintero - automatic
98
+ * @updatedAt 2025-01-13 11:59:58 - automatic
99
+ * @updatedUser cesar - automatic
99
100
  */
100
101
  headerTitleWindowBase: ({ theme }) => ({
101
102
  minWidth: "30px",
@@ -110,8 +111,8 @@ const windowBaseStyles = {
110
111
  * Styles for the subtitle container of the header of the window base component.
111
112
  * @author cesar - automatic
112
113
  * @createdAt 2024-11-15 18:08:44 - automatic
113
- * @updatedAt 2024-12-30 14:36:09 - automatic
114
- * @updatedUser Andrés Quintero - automatic
114
+ * @updatedAt 2025-01-13 11:59:58 - automatic
115
+ * @updatedUser cesar - automatic
115
116
  */
116
117
  subtitleContainer: ({ theme }) => ({
117
118
  display: "flex",
@@ -125,8 +126,8 @@ const windowBaseStyles = {
125
126
  * @returns An object containing the styles for the dot window base component.
126
127
  * @author cesar - automatic
127
128
  * @createdAt 2024-11-22 19:40:23 - automatic
128
- * @updatedAt 2024-12-30 14:36:09 - automatic
129
- * @updatedUser Andrés Quintero - automatic
129
+ * @updatedAt 2025-01-13 11:59:58 - automatic
130
+ * @updatedUser cesar - automatic
130
131
  */
131
132
  pointWindowBase: ({ theme, ownerState }) => ({
132
133
  display: "flex",
@@ -152,8 +153,8 @@ const windowBaseStyles = {
152
153
  * Styles for the subtitle of the header of the window base component.
153
154
  * @author cesar - automatic
154
155
  * @createdAt 2024-11-15 18:08:44 - automatic
155
- * @updatedAt 2024-12-30 14:36:09 - automatic
156
- * @updatedUser Andrés Quintero - automatic
156
+ * @updatedAt 2025-01-13 11:59:58 - automatic
157
+ * @updatedUser cesar - automatic
157
158
  */
158
159
  headerSubTitleWindowBase: ({ theme }) => ({
159
160
  width: "auto !important",
@@ -164,8 +165,8 @@ const windowBaseStyles = {
164
165
  * Styles for the icon of the header of the window base component.
165
166
  * @author cesar - automatic
166
167
  * @createdAt 2024-11-18 08:11:19 - automatic
167
- * @updatedAt 2024-12-30 14:36:09 - automatic
168
- * @updatedUser Andrés Quintero - automatic
168
+ * @updatedAt 2025-01-13 11:59:58 - automatic
169
+ * @updatedUser cesar - automatic
169
170
  */
170
171
  headerIconWindowBase: ({ theme }) => ({
171
172
  display: "flex",
@@ -178,8 +179,8 @@ const windowBaseStyles = {
178
179
  * Styles for the icons wrapper of the window base component.
179
180
  * @author cesar - automatic
180
181
  * @createdAt 2024-11-18 08:11:19 - automatic
181
- * @updatedAt 2024-12-30 14:36:09 - automatic
182
- * @updatedUser Andrés Quintero - automatic
182
+ * @updatedAt 2025-01-13 11:59:58 - automatic
183
+ * @updatedUser cesar - automatic
183
184
  */
184
185
  iconsWrapperWindowBase: () => ({
185
186
  display: "flex",
@@ -193,8 +194,8 @@ const windowBaseStyles = {
193
194
  * Styles for the dot icon of the window base component.
194
195
  * @author cesar - automatic
195
196
  * @createdAt 2024-11-22 19:40:23 - automatic
196
- * @updatedAt 2024-12-30 14:36:09 - automatic
197
- * @updatedUser Andrés Quintero - automatic
197
+ * @updatedAt 2025-01-13 11:59:58 - automatic
198
+ * @updatedUser cesar - automatic
198
199
  */
199
200
  pointIcon: ({ theme, ownerState }) => ({
200
201
  color: theme.vars.palette.text.primary,
@@ -218,11 +219,22 @@ const windowBaseStyles = {
218
219
  * Styles for the menu actions of the window base component.
219
220
  * @author cesar - automatic
220
221
  * @createdAt 2024-12-05 07:49:27 - automatic
221
- * @updatedAt 2024-12-30 14:36:09 - automatic
222
- * @updatedUser Andrés Quintero - automatic
222
+ * @updatedAt 2025-01-13 11:59:58 - automatic
223
+ * @updatedUser cesar - automatic
223
224
  */
224
225
  menuActionsWindowBase: () => ({
225
226
  left: "-50px"
227
+ }),
228
+ /**
229
+ * Styles for the linear progress of the window base component.
230
+ * @author cesar - automatic
231
+ * @createdAt 2025-01-13 11:59:57 - automatic
232
+ * @updatedAt 2025-01-13 11:59:58 - automatic
233
+ * @updatedUser cesar - automatic
234
+ */
235
+ linearProgressIndeterminate: ({ theme }) => ({
236
+ borderBottomRightRadius: theme.vars.size.borderRadius.r0,
237
+ borderBottomLeftRadius: theme.vars.size.borderRadius.r0
226
238
  })
227
239
  };
228
240
  export {
@@ -10,5 +10,6 @@ export declare enum WindowBaseSlots {
10
10
  headerIconWindowBase = "headerIconWindowBase",
11
11
  menuActionsWindowBase = "menuActionsWindowBase",
12
12
  iconsWrapperWindowBase = "iconsWrapperWindowBase",
13
- headerWindowComponent = "headerWindowComponent"
13
+ headerWindowComponent = "headerWindowComponent",
14
+ linearProgressIndeterminate = "linearProgressIndeterminate"
14
15
  }
@@ -11,6 +11,7 @@ var WindowBaseSlots = /* @__PURE__ */ ((WindowBaseSlots2) => {
11
11
  WindowBaseSlots2["menuActionsWindowBase"] = "menuActionsWindowBase";
12
12
  WindowBaseSlots2["iconsWrapperWindowBase"] = "iconsWrapperWindowBase";
13
13
  WindowBaseSlots2["headerWindowComponent"] = "headerWindowComponent";
14
+ WindowBaseSlots2["linearProgressIndeterminate"] = "linearProgressIndeterminate";
14
15
  return WindowBaseSlots2;
15
16
  })(WindowBaseSlots || {});
16
17
  export {
@@ -76,3 +76,6 @@ export declare const IconsWrapperStyled: import('@emotion/styled').StyledCompone
76
76
  export declare const MenuActionsWindowsStyled: import('@emotion/styled').StyledComponent<Pick<import('../../MenuActions/types').MenuActionsProps, keyof import('../../MenuActions/types').MenuActionsProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').WindowBaseOwnerState> & Record<string, unknown> & {
77
77
  ownerState: Partial<import('..').WindowBaseOwnerState> & Record<string, unknown>;
78
78
  }, {}, {}>;
79
+ export declare const LinearProgressIndeterminateStyled: import('@emotion/styled').StyledComponent<Pick<import('../../LinearProgressIndeterminate/types').LinearProgressIndeterminateProps, keyof import('../../LinearProgressIndeterminate/types').LinearProgressIndeterminateProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').WindowBaseOwnerState> & Record<string, unknown> & {
80
+ ownerState: Partial<import('..').WindowBaseOwnerState> & Record<string, unknown>;
81
+ }, {}, {}>;
@@ -4,6 +4,7 @@ import { W as WindowBaseSlots } from "./WindowBaseEnum.js";
4
4
  import { w as windowBaseStyles } from "../WindowBase.styles.js";
5
5
  import { T as Typography } from "../../mui_extended/Typography/Typography.js";
6
6
  import { M as MenuActions } from "../../MenuActions/MenuActions.js";
7
+ import { L as LinearProgressIndeterminate } from "../../LinearProgressIndeterminate/LinearProgressIndeterminate.js";
7
8
  import { I as Icon } from "../../Icon/Icon.js";
8
9
  const WindowBaseStyled = styled("div", {
9
10
  name: WINDOW_BASE_KEY_COMPONENT,
@@ -53,10 +54,15 @@ const MenuActionsWindowsStyled = styled(MenuActions, {
53
54
  name: WINDOW_BASE_KEY_COMPONENT,
54
55
  slot: WindowBaseSlots.menuActionsWindowBase
55
56
  })(windowBaseStyles.menuActionsWindowBase);
57
+ const LinearProgressIndeterminateStyled = styled(LinearProgressIndeterminate, {
58
+ name: WINDOW_BASE_KEY_COMPONENT,
59
+ slot: WindowBaseSlots.linearProgressIndeterminate
60
+ })(windowBaseStyles.linearProgressIndeterminate);
56
61
  export {
57
62
  ContentWindowStyled as C,
58
63
  HeaderWindowComponentStyled as H,
59
64
  IconWindowStyled as I,
65
+ LinearProgressIndeterminateStyled as L,
60
66
  MenuActionsWindowsStyled as M,
61
67
  PointStyled as P,
62
68
  SubtitleContainerStyled as S,
@@ -8,8 +8,8 @@ import { ComponentPalletColor, Sizes } from '@m4l/styles';
8
8
  * Type representing a single action in the `WindowBase` component.
9
9
  * @author cesar - automatic
10
10
  * @createdAt 2024-12-23 09:48:25 - automatic
11
- * @updatedAt 2024-12-30 14:36:09 - automatic
12
- * @updatedUser Andrés Quintero - automatic
11
+ * @updatedAt 2025-01-13 09:31:36 - automatic
12
+ * @updatedUser cesar - automatic
13
13
  */
14
14
  export interface WindowBaseAction {
15
15
  place: 'left' | 'right' | 'inside';
@@ -123,6 +123,14 @@ export interface WindowBaseProps {
123
123
  * Each action defines its placement, icon, label, and other properties.
124
124
  */
125
125
  actions?: WindowBaseAction[];
126
+ /**
127
+ * An optional class name to apply to the root element of the component.
128
+ */
129
+ className?: string;
130
+ /**
131
+ * Indicates if the window is in a loading state.
132
+ */
133
+ isLoading?: boolean;
126
134
  }
127
135
  /**
128
136
  * Type representing the possible values of `WindowBaseSlots`.
@@ -7,7 +7,7 @@ import { MenuItemProps } from './types';
7
7
  * @returns
8
8
  * @author Bruce Escobar - automatic
9
9
  * @createdAt 2024-10-22 19:53:39 - automatic
10
- * @updatedAt 2025-01-08 10:36:41 - automatic
11
- * @updatedUser Andrés Quintero - automatic
10
+ * @updatedAt 2025-01-14 11:50:41 - automatic
11
+ * @updatedUser cesar - automatic
12
12
  */
13
13
  export declare const MenuItem: (props: MenuItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { useModuleSkeleton, getPropertyByString } from "@m4l/core";
2
+ import { useModuleSkeleton, useEnvironment, getPropertyByString } from "@m4l/core";
3
3
  import { useTheme } from "@mui/material";
4
4
  import clsx from "clsx";
5
5
  import { a as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.js";
@@ -18,12 +18,14 @@ const MenuItem = (props) => {
18
18
  disabled = false,
19
19
  size = "medium",
20
20
  checked = false,
21
+ checkable = false,
21
22
  className,
22
23
  ...other
23
24
  } = props;
24
25
  const { currentSize } = useComponentSize(size);
25
26
  const isSkeleton = useModuleSkeleton();
26
27
  const theme = useTheme();
28
+ const { host_static_assets, environment_assets } = useEnvironment();
27
29
  const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
28
30
  const paletteColor = getPropertyByString(
29
31
  theme.vars.palette,
@@ -35,7 +37,9 @@ const MenuItem = (props) => {
35
37
  disabled,
36
38
  selected,
37
39
  paletteColor,
38
- color
40
+ color,
41
+ checkable,
42
+ checked
39
43
  };
40
44
  if (isSkeleton) {
41
45
  return /* @__PURE__ */ jsx(
@@ -69,8 +73,7 @@ const MenuItem = (props) => {
69
73
  );
70
74
  }
71
75
  };
72
- const checkedIcon = "https://s3.us-east-1.amazonaws.com/static.made4labs/environments/d1/frontend/components/menu_item/checked.svg";
73
- const hasCheckedIcon = checked && checkedIcon;
76
+ const checkedIcon = `${host_static_assets}/${environment_assets}/frontend/components/menu_item/checked.svg`;
74
77
  return /* @__PURE__ */ jsxs(
75
78
  MenuItemRootStyled,
76
79
  {
@@ -83,7 +86,7 @@ const MenuItem = (props) => {
83
86
  className: clsx(className, MENUITEM_CLASSES.root),
84
87
  "data-testid": "MenuItemRoot",
85
88
  children: [
86
- hasCheckedIcon && /* @__PURE__ */ jsx(
89
+ checkable && /* @__PURE__ */ jsx(
87
90
  MenuItemIconCheckedStyled,
88
91
  {
89
92
  src: checkedIcon,
@@ -2,6 +2,7 @@ import { g as getHeightSizeStyles } from "../../../utils/getHeightSizeStyles.js"
2
2
  const menuItemStyles = {
3
3
  /**
4
4
  * Estilos para el contenedor de los items del menú
5
+ * <<<<<<< HEAD
5
6
  * @updatedUser Andrés Quintero - automatic
6
7
  * @updatedAt 2025-01-08 10:36:41 - automatic
7
8
  * @createdAt 2025-01-08 10:36:40 - automatic
@@ -20,6 +21,22 @@ const menuItemStyles = {
20
21
  * @author Andrés Quintero - automatic
21
22
  * @updatedUser Andrés Quintero - automatic
22
23
  * @updatedAt 2025-01-08 10:36:41 - automatic
24
+ * =======
25
+ * @updatedUser cesar - automatic
26
+ * @updatedAt 2025-01-10 16:51:28 - automatic
27
+ * @createdAt 2025-01-10 16:51:28 - automatic
28
+ * @author cesar - automatic
29
+ * @updatedUser cesar - automatic
30
+ * @updatedAt 2025-01-10 16:51:28 - automatic
31
+ * @createdAt 2024-12-31 11:23:51 - automatic
32
+ * @author Andrés Quintero - automatic
33
+ * @updatedUser cesar - automatic
34
+ * @updatedAt 2025-01-10 16:51:28 - automatic
35
+ * @createdAt 2024-12-30 14:36:06 - automatic
36
+ * @author Andrés Quintero - automatic
37
+ * @updatedUser cesar - automatic
38
+ * @updatedAt 2025-01-10 16:51:28 - automatic
39
+ * >>>>>>> c15c4888 (Add checkable prop to MenuItem and update checked icon visibility logic)
23
40
  * @createdAt 2024-12-27 08:28:33 - automatic
24
41
  * @author Andrés Quintero - automatic
25
42
  */
@@ -107,8 +124,8 @@ const menuItemStyles = {
107
124
  * Estilos para el icono de los items del menú
108
125
  * @author SebastianM - automatic
109
126
  * @createdAt 2024-12-02 19:12:14 - automatic
110
- * @updatedAt 2025-01-08 10:36:41 - automatic
111
- * @updatedUser Andrés Quintero - automatic
127
+ * @updatedAt 2025-01-10 16:51:28 - automatic
128
+ * @updatedUser cesar - automatic
112
129
  */
113
130
  menuItemIcon: () => ({
114
131
  "&.MenuItemEndIcon-root": {
@@ -119,22 +136,24 @@ const menuItemStyles = {
119
136
  * Estilos para el icono de los items del menú cuando están seleccionados
120
137
  * @author SebastianM - automatic
121
138
  * @createdAt 2024-12-13 12:45:48 - automatic
122
- * @updatedAt 2025-01-08 10:36:41 - automatic
123
- * @updatedUser Andrés Quintero - automatic
139
+ * @updatedAt 2025-01-10 16:51:28 - automatic
140
+ * @updatedUser cesar - automatic
124
141
  */
125
142
  menuItemIconChecked: ({ ownerState }) => ({
143
+ visibility: ownerState.checkable ? ownerState.checked ? "visible" : "hidden" : "hidden",
126
144
  ...ownerState.selected && {
127
145
  "& .M4LIcon-icon": {
128
146
  backgroundColor: ownerState.paletteColor?.main
129
147
  }
130
- }
148
+ },
149
+ variants: []
131
150
  }),
132
151
  /**
133
152
  * Estilos para la tipografía del menú item
134
153
  * @author SebastianM - automatic
135
154
  * @createdAt 2024-12-13 12:45:48 - automatic
136
- * @updatedAt 2025-01-08 10:36:41 - automatic
137
- * @updatedUser Andrés Quintero - automatic
155
+ * @updatedAt 2025-01-10 16:51:28 - automatic
156
+ * @updatedUser cesar - automatic
138
157
  */
139
158
  menuItemTypography: () => ({}),
140
159
  /**
@@ -150,8 +169,8 @@ const menuItemStyles = {
150
169
  * Estilos para el contenedor de los items del menú en skeleton
151
170
  * @author Bruce Escobar - automatic
152
171
  * @createdAt 2024-10-22 10:38:00 - automatic
153
- * @updatedAt 2025-01-08 10:36:41 - automatic
154
- * @updatedUser Andrés Quintero - automatic
172
+ * @updatedAt 2025-01-10 16:51:28 - automatic
173
+ * @updatedUser cesar - automatic
155
174
  */
156
175
  skeletonMenuItem: ({ theme, ownerState }) => ({
157
176
  width: "100%",
@@ -48,13 +48,17 @@ export interface MenuItemProps extends Omit<MUIMenuItemProps, 'size' | 'color'>
48
48
  * Define si el ícono de check está activo
49
49
  */
50
50
  checked?: boolean;
51
+ /**
52
+ * indica si debe aparecer el icono de check
53
+ */
54
+ checkable?: boolean;
51
55
  }
52
56
  /**
53
57
  * Estado del propietario del `MenuItem` utilizado para definir propiedades internas de estilo y comportamiento.
54
58
  * Pick<MenuItemProps, 'size' | 'componentPaletteColor' | 'disabled' | 'selected'>
55
59
  * paletteColor - Define el color de la paleta aplicada al `MenuItem`.
56
60
  */
57
- export interface MenuItemOwnerState extends Pick<MenuItemProps, 'size' | 'componentPaletteColor' | 'disabled' | 'selected' | 'color'> {
61
+ export interface MenuItemOwnerState extends Pick<MenuItemProps, 'checked' | 'checkable' | 'size' | 'componentPaletteColor' | 'disabled' | 'selected' | 'color'> {
58
62
  paletteColor: PaletteColor;
59
63
  }
60
64
  /**
package/index.js CHANGED
@@ -110,9 +110,9 @@ import { W as W3 } from "./components/WindowBase/WindowBase.js";
110
110
  import { W as W4 } from "./components/WindowBase/constants.js";
111
111
  import { I as I4 } from "./components/WindowBase/icons.js";
112
112
  import { W as W5 } from "./components/WindowBase/slots/WindowBaseEnum.js";
113
- import { C as C12, a as a8, H as H2, I as I5, d as d5, M as M9, b as b3, P as P7, S as S2, c as c6, T as T2, W as W6 } from "./components/WindowBase/slots/WindowBaseSlots.js";
113
+ import { C as C12, a as a8, H as H2, I as I5, d as d5, L as L7, M as M9, b as b3, P as P7, S as S2, c as c6, T as T2, W as W6 } from "./components/WindowBase/slots/WindowBaseSlots.js";
114
114
  import { H as H3 } from "./components/WindowBase/subcomponents/Header/HeaderWindowBase.js";
115
- import { L as L7 } from "./components/LoadingError/LoadingError.js";
115
+ import { L as L8 } from "./components/LoadingError/LoadingError.js";
116
116
  import { g as g19 } from "./components/LoadingError/dictionary.js";
117
117
  import { M as M10 } from "./components/MFLoader/MFLoader.js";
118
118
  import { g as g20 } from "./components/MFLoader/dictionary.js";
@@ -153,9 +153,9 @@ import { B as B3 } from "./components/mui_extended/BoxIcon/index.js";
153
153
  import { B as B4 } from "./components/mui_extended/Breadcrumbs/index.js";
154
154
  import { C as C13 } from "./components/mui_extended/CircularProgress/CircularProgress.js";
155
155
  import { B as B5 } from "./components/mui_extended/Badge/Badge.js";
156
- import { L as L8 } from "./components/mui_extended/LinearProgress/index.js";
157
- import { L as L9 } from "./components/mui_extended/LinkWithRoute/index.js";
158
- import { L as L10 } from "./components/mui_extended/LoadingButton/LoadingButton.js";
156
+ import { L as L9 } from "./components/mui_extended/LinearProgress/index.js";
157
+ import { L as L10 } from "./components/mui_extended/LinkWithRoute/index.js";
158
+ import { L as L11 } from "./components/mui_extended/LoadingButton/LoadingButton.js";
159
159
  import { P as P14 } from "./components/mui_extended/Pager/index.js";
160
160
  import { g as g25 } from "./components/mui_extended/Pager/dicctionary.js";
161
161
  import { T as T6 } from "./components/mui_extended/Tab/Tab.js";
@@ -261,12 +261,13 @@ export {
261
261
  L2 as LABEL_FILTER_BUTTON,
262
262
  L3 as Label,
263
263
  L4 as LanguagePopover,
264
- L8 as LinearProgress,
264
+ L9 as LinearProgress,
265
265
  L5 as LinearProgressIndeterminate,
266
- L9 as LinkWithRoute,
266
+ L7 as LinearProgressIndeterminateStyled,
267
+ L10 as LinkWithRoute,
267
268
  L6 as Loadable,
268
- L10 as LoadingButton,
269
- L7 as LoadingError,
269
+ L11 as LoadingButton,
270
+ L8 as LoadingError,
270
271
  L as LoadingScreen,
271
272
  M12 as MFIsolationApp,
272
273
  M10 as MFLoader,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "9.1.66",
3
+ "version": "9.1.68",
4
4
  "license": "UNLICENSED",
5
5
  "lint-staged": {
6
6
  "*.{js,ts,tsx}": "eslint --fix --max-warnings 0"
@@ -1 +0,0 @@
1
- export declare const LINEAR_PROGRESS_INDETERMINATE_CLASS_NAME = "M4LinearProgressIndeterminate";
@@ -1,4 +0,0 @@
1
- const LINEAR_PROGRESS_INDETERMINATE_CLASS_NAME = "M4LinearProgressIndeterminate";
2
- export {
3
- LINEAR_PROGRESS_INDETERMINATE_CLASS_NAME as L
4
- };
@@ -1,6 +0,0 @@
1
- import { LinearProgressIndeterminateClasses } from './types';
2
- export declare const linearProgressIndeterminateClasses: LinearProgressIndeterminateClasses;
3
- /**
4
- * TODO: Documentar
5
- */
6
- export declare const getLinearProgressIndeterminateUtilityClasses: () => Record<"root" | "windowLinearProgressBar", string>;
@@ -1,28 +0,0 @@
1
- import { generateUtilityClasses } from "@mui/material";
2
- import { unstable_composeClasses } from "@mui/base";
3
- import { L as LINEAR_PROGRESS_INDETERMINATE_CLASS_NAME } from "./constants.js";
4
- import { g as getComponentUtilityClass } from "../../../utils/index.js";
5
- generateUtilityClasses(
6
- LINEAR_PROGRESS_INDETERMINATE_CLASS_NAME,
7
- [
8
- /* elements */
9
- "root",
10
- "windowLinearProgressBar"
11
- /* states or variants of elements */
12
- ],
13
- LINEAR_PROGRESS_INDETERMINATE_CLASS_NAME
14
- );
15
- const getLinearProgressIndeterminateUtilityClasses = () => {
16
- const slots = {
17
- root: ["root"],
18
- windowLinearProgressBar: ["windowLinearProgressBar"]
19
- };
20
- return unstable_composeClasses(
21
- slots,
22
- getComponentUtilityClass(LINEAR_PROGRESS_INDETERMINATE_CLASS_NAME),
23
- {}
24
- );
25
- };
26
- export {
27
- getLinearProgressIndeterminateUtilityClasses as g
28
- };
@@ -1,7 +0,0 @@
1
- import { getLinearProgressIndeterminateUtilityClasses } from '.';
2
- export interface LinearProgressIndeterminateClasses {
3
- root: string;
4
- windowLinearProgressBar: string;
5
- }
6
- export type LinearProgressIndeterminateClassesKey = keyof LinearProgressIndeterminateClasses;
7
- export type Classes = ReturnType<typeof getLinearProgressIndeterminateUtilityClasses>;
@@ -1 +0,0 @@
1
- export declare const LinearProgressIndeterminateRoot: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,7 +0,0 @@
1
- import { styled } from "@mui/material";
2
- const LinearProgressIndeterminateRoot = styled("div")(({ theme }) => ({
3
- ...theme.components?.M4LinearProgressIndeterminate?.styleOverrides || {}
4
- }));
5
- export {
6
- LinearProgressIndeterminateRoot as L
7
- };
@@ -1 +0,0 @@
1
- export declare const ICON_PREFIX = "M4LinearProgressIndeterminate";
@@ -1,4 +0,0 @@
1
- const ICON_PREFIX = "M4LinearProgressIndeterminate";
2
- export {
3
- ICON_PREFIX as I
4
- };
@@ -1,5 +0,0 @@
1
- import { LinearProgressIndeterminateClassesKey } from '../classes/types';
2
- /**
3
- * TODO: Documentar
4
- */
5
- export declare const getNameLinearProgressIndeterminateDataTestId: (KEY: LinearProgressIndeterminateClassesKey) => string;
@@ -1,7 +0,0 @@
1
- import { I as ICON_PREFIX } from "./constants.js";
2
- const getNameLinearProgressIndeterminateDataTestId = (KEY) => {
3
- return `${ICON_PREFIX}-${KEY}`;
4
- };
5
- export {
6
- getNameLinearProgressIndeterminateDataTestId as g
7
- };