@m4l/components 9.3.1-B21072025-beta.2 → 9.3.1-BE28072025-beta.1

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 (41) hide show
  1. package/components/SettingsLayout/SettingsLayout.d.ts +1 -1
  2. package/components/SettingsLayout/SettingsLayout.js +15 -16
  3. package/components/SettingsLayout/SettingsLayout.styles.js +67 -42
  4. package/components/SettingsLayout/icons.d.ts +1 -0
  5. package/components/SettingsLayout/icons.js +2 -1
  6. package/components/SettingsLayout/slots/SettingsLayoutEnum.d.ts +1 -0
  7. package/components/SettingsLayout/slots/SettingsLayoutEnum.js +1 -0
  8. package/components/SettingsLayout/slots/SettingsLayoutSlots.d.ts +4 -1
  9. package/components/SettingsLayout/slots/SettingsLayoutSlots.js +10 -5
  10. package/components/SettingsLayout/subcomponents/SettingFullscreen/SettingFullscreen.js +1 -1
  11. package/components/SettingsLayout/subcomponents/SettingItemColor/SettingItemColor.js +7 -3
  12. package/components/SettingsLayout/subcomponents/SettingsLayoutBase/SettingsLayoutBase.js +1 -1
  13. package/components/SettingsLayout/subcomponents/SettingsLayoutBase/types.d.ts +5 -0
  14. package/components/SettingsLayout/test/SettingsLayout.test.d.ts +18 -1
  15. package/components/SettingsLayout/types.d.ts +4 -4
  16. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions.d.ts +1 -1
  17. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions.js +4 -2
  18. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.d.ts +1 -1
  19. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.js +50 -47
  20. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.js +2 -1
  21. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/types.d.ts +5 -1
  22. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/WindowModal/WindowModal.js +12 -7
  23. package/components/formatters/ChipStatusFormatter/ChipStatusFormatter.js +7 -1
  24. package/components/formatters/ChipStatusFormatter/types.d.ts +9 -1
  25. package/components/hook-form/RHFPeriod/slots/RHFPeriodSlots.d.ts +2 -2
  26. package/components/hook-form/RHFSelect/slots/RHFSlots.d.ts +1 -1
  27. package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +1 -1
  28. package/components/hook-form/RHFTextFieldPassword/slots/RHFTextFieldPasswordSlots.d.ts +1 -1
  29. package/components/mui_extended/Accordion/Accordion.js +1 -1
  30. package/components/mui_extended/Autocomplete/slots/AutocompleteSlots.d.ts +1 -1
  31. package/components/mui_extended/Select/index.d.ts +2 -2
  32. package/components/mui_extended/Select/slots/SelectSlots.d.ts +1 -1
  33. package/components/mui_extended/Select/slots/SelectSlots.js +1 -1
  34. package/components/mui_extended/TextField/slots/TextFieldSlots.d.ts +1 -1
  35. package/components/mui_extended/index.d.ts +1 -0
  36. package/index.js +16 -14
  37. package/mockServiceWorker.js +1 -1
  38. package/package.json +3 -3
  39. package/storybook/components/Areas/AreasViewer/subcomponents/Launcher/PopupButton.d.ts +1 -1
  40. package/storybook/components/SettingsLayout/SettingsLayout.stories.d.ts +1 -1
  41. package/components/mui_extended/Select/types.js +0 -1
@@ -2,4 +2,4 @@ import { SettingsLayoutProps } from './types';
2
2
  /**
3
3
  * todo
4
4
  */
5
- export declare const SettingsLayout: (props: SettingsLayoutProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const SettingsLayout: (props: SettingsLayoutProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,33 +1,32 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { useEnvironment, ModuleDictionaryProvider, ModuleSkeletonProvider, BaseProvider } from "@m4l/core";
3
- import { useLocales } from "@m4l/graphics";
2
+ import { useEnvironment, FlagsProvider, ModuleDictionaryProvider, ModuleSkeletonProvider, CommonFlags, BaseProvider } from "@m4l/core";
3
+ import { useLocales, useThemeSettingsStore } from "@m4l/graphics";
4
4
  import { S as SETTINGS_LAYOUT_DEFAULT_WIDTH, a as SETTINGS_LAYOUT_CLASSES } from "./constants.js";
5
+ import { useMemo } from "react";
5
6
  import { S as SettingsLayoutBase } from "./subcomponents/SettingsLayoutBase/SettingsLayoutBase.js";
6
7
  const SettingsLayout = (props) => {
7
8
  const {
8
- onResetSetting,
9
- handleOpen,
10
- onChangeMode,
11
- onChangeColor,
12
- onChangeDirection,
13
- onChangeLayout,
14
- onToggleStretch,
15
- open,
16
- themeUserSettings,
17
- presetsOptionsColorMain,
18
9
  width = SETTINGS_LAYOUT_DEFAULT_WIDTH
19
10
  } = props;
20
11
  const currentLang = useLocales().currentLocale?.localeString;
21
12
  const { host_static_assets, environment_assets } = useEnvironment();
13
+ const { settingsActions, themeUserSettings, presetsOptionsColorMain, open } = useThemeSettingsStore((state) => state);
14
+ const { onResetSetting, onChangeMode, onChangeColor, onChangeDirection, onChangeLayout, onToggleStretch, handleOpen } = settingsActions;
22
15
  const prefixPathIcon = `${host_static_assets}/${environment_assets}`;
23
- return /* @__PURE__ */ jsx(
16
+ const componentsDictionary = useMemo(() => {
17
+ return [];
18
+ }, []);
19
+ if (!open) {
20
+ return null;
21
+ }
22
+ return /* @__PURE__ */ jsx(FlagsProvider, { children: /* @__PURE__ */ jsx(
24
23
  ModuleDictionaryProvider,
25
24
  {
26
25
  isAuth: false,
27
26
  moduleId: "theme_settings",
28
- componentsDictionary: [],
27
+ componentsDictionary,
29
28
  currentLang,
30
- children: /* @__PURE__ */ jsx(ModuleSkeletonProvider, { flags: ["dictionary_loaded"], children: /* @__PURE__ */ jsx(BaseProvider, { value: {
29
+ children: /* @__PURE__ */ jsx(ModuleSkeletonProvider, { flags: [CommonFlags.FLAG_DICTIONARY_LOADED], children: /* @__PURE__ */ jsx(BaseProvider, { value: {
31
30
  onResetSetting,
32
31
  handleOpen,
33
32
  onChangeMode,
@@ -43,7 +42,7 @@ const SettingsLayout = (props) => {
43
42
  prefixPathIcon
44
43
  }, children: /* @__PURE__ */ jsx(SettingsLayoutBase, {}) }) })
45
44
  }
46
- );
45
+ ) });
47
46
  };
48
47
  export {
49
48
  SettingsLayout as S
@@ -1,5 +1,7 @@
1
1
  import { PRIMARY_COLORS_LIGHT, PRIMARY_COLORS_DARK } from "@m4l/styles";
2
+ import { g as getTypographyStyles } from "../../utils/getTypographyStyles.js";
2
3
  import { v as varFade } from "../animate/variants/fade.js";
4
+ import { g as getSizeStyles } from "../../utils/getSizeStyles/getSizeStyles.js";
3
5
  const settingsLayoutStyles = {
4
6
  /**
5
7
  * Estilos css de la ranura root
@@ -159,6 +161,16 @@ const settingsLayoutStyles = {
159
161
  } : {}
160
162
  } : {}
161
163
  }),
164
+ /**
165
+ * Estilos css de la ranura settingItemColorContainer
166
+ */
167
+ settingItemColorContainer: () => ({
168
+ display: "flex",
169
+ flexDirection: "row",
170
+ width: "auto",
171
+ height: "auto",
172
+ position: "relative"
173
+ }),
162
174
  /**
163
175
  * Estilos css de la ranura settingItemColor
164
176
  */
@@ -166,55 +178,63 @@ const settingsLayoutStyles = {
166
178
  const presetColor = ownerState?.color ?? "patronus";
167
179
  const presetPalette = ownerState?.mode === "light" ? PRIMARY_COLORS_LIGHT[presetColor] : PRIMARY_COLORS_DARK[presetColor];
168
180
  return {
169
- display: "flex",
170
- flexDirection: "row",
171
- width: "24px",
172
- height: "24px",
173
- borderRadius: theme.vars.size.borderRadius.r2,
174
- backgroundColor: presetPalette.enabled,
175
- outline: "unset",
176
- position: "relative",
177
- overflow: "visible",
178
- transition: "all 0.3s ease",
179
- ...ownerState?.onChange ? {
180
- cursor: "pointer",
181
+ ...getSizeStyles(
182
+ theme,
183
+ ownerState?.size || "medium",
184
+ "box",
185
+ (size) => ({
186
+ width: size,
187
+ height: size
188
+ })
189
+ ),
190
+ "&:focus-visible": {
191
+ borderColor: theme.vars.palette.border.main,
192
+ boxShadow: theme.vars.customShadows?.primary,
193
+ "&:after": {
194
+ content: '""',
195
+ position: "absolute",
196
+ inset: "-4px",
197
+ borderRadius: "40% / 45%",
198
+ boxShadow: `0 0 0 1px ${presetPalette.focus}`,
199
+ zIndex: 1
200
+ }
201
+ },
202
+ ...ownerState?.selected ? {
203
+ "&:before": {
204
+ content: '""',
205
+ position: "absolute",
206
+ inset: "0",
207
+ borderRadius: theme.vars.size.borderRadius.r3,
208
+ boxShadow: `0 0 0 1px ${presetPalette.enabled}`,
209
+ backgroundColor: presetPalette.enabledOpacity,
210
+ zIndex: 1
211
+ }
212
+ } : {},
213
+ "& .M4LIcon-icon": {
214
+ display: "flex",
215
+ flexDirection: "row",
216
+ backgroundColor: presetPalette.enabled,
217
+ outline: "unset",
218
+ position: "relative",
219
+ overflow: "visible",
181
220
  transition: "all 0.3s ease",
182
- "&:hover": {
183
- backgroundColor: presetPalette.hover
184
- },
185
- "&:active": {
186
- backgroundColor: presetPalette.active
187
- },
188
- "&:focus-visible": {
189
- borderColor: theme.vars.palette.border.main,
190
- boxShadow: theme.vars.customShadows?.primary,
191
- "&:after": {
192
- content: '""',
193
- position: "absolute",
194
- inset: "-5px",
195
- borderRadius: theme.vars.size.borderRadius.r3,
196
- boxShadow: `0 0 0 1px ${presetPalette.focus}`,
197
- zIndex: 1
198
- }
199
- },
200
- ...ownerState?.selected ? {
201
- "&:before": {
202
- content: '""',
203
- position: "absolute",
204
- inset: "-5px",
205
- borderRadius: theme.vars.size.borderRadius.r3,
206
- boxShadow: `0 0 0 1px ${presetPalette.enabled}`,
207
- backgroundColor: presetPalette.enabledOpacity,
208
- zIndex: 1
221
+ ...ownerState?.onChange ? {
222
+ cursor: "pointer",
223
+ transition: "all 0.3s ease",
224
+ "&:hover": {
225
+ backgroundColor: presetPalette.hover
226
+ },
227
+ "&:active": {
228
+ backgroundColor: presetPalette.active
209
229
  }
210
230
  } : {}
211
- } : {}
231
+ }
212
232
  };
213
233
  },
214
234
  /**
215
235
  * Estilos css de la ranura settingFullscreen
216
236
  */
217
- settingFullscreen: ({ theme }) => ({
237
+ settingFullscreen: ({ theme, ownerState }) => ({
218
238
  /* borderRadius: theme.vars.size.borderRadius['r1-5'],
219
239
  border: 'unset',
220
240
  outline: 'unset', */
@@ -224,7 +244,12 @@ const settingsLayoutStyles = {
224
244
  justifyContent: "center",
225
245
  borderRadius: theme.vars.size.borderRadius["r1-5"],
226
246
  "& .MuiTypography-root": {
227
- width: "fit-content"
247
+ width: "fit-content",
248
+ ...getTypographyStyles(
249
+ theme.generalSettings.isMobile,
250
+ ownerState?.size || "medium",
251
+ "bodyDens"
252
+ )
228
253
  }
229
254
  }),
230
255
  /**
@@ -10,4 +10,5 @@ export declare const PATH_ICONS: {
10
10
  ALIGN_RIGHT: string;
11
11
  FULLSCREEN: string;
12
12
  FULLSCREEN_EXIT: string;
13
+ COLOR: string;
13
14
  };
@@ -9,7 +9,8 @@ const PATH_ICONS = {
9
9
  ALIGN_LEFT: "frontend/components/setting_layout/assets/icons/align-start-vertical.svg",
10
10
  ALIGN_RIGHT: "frontend/components/setting_layout/assets/icons/align-end-vertical.svg",
11
11
  FULLSCREEN: "frontend/components/setting_layout/assets/icons/FrameCorners.svg",
12
- FULLSCREEN_EXIT: "frontend/components/setting_layout/assets/icons/exit_fullscreen.svg"
12
+ FULLSCREEN_EXIT: "frontend/components/setting_layout/assets/icons/exit_fullscreen.svg",
13
+ COLOR: "frontend/components/setting_layout/assets/icons/color_preset.svg"
13
14
  };
14
15
  export {
15
16
  PATH_ICONS as P
@@ -11,6 +11,7 @@ export declare enum SettingsLayoutSlots {
11
11
  settingIconTitle = "settingIconTitle",
12
12
  settingItem = "settingItem",
13
13
  settingItemColor = "settingItemColor",
14
+ settingItemColorContainer = "settingItemColorContainer",
14
15
  settingItemContent = "settingItemContent",
15
16
  settingFullscreen = "settingFullscreen"
16
17
  }
@@ -11,6 +11,7 @@ var SettingsLayoutSlots = /* @__PURE__ */ ((SettingsLayoutSlots2) => {
11
11
  SettingsLayoutSlots2["settingIconTitle"] = "settingIconTitle";
12
12
  SettingsLayoutSlots2["settingItem"] = "settingItem";
13
13
  SettingsLayoutSlots2["settingItemColor"] = "settingItemColor";
14
+ SettingsLayoutSlots2["settingItemColorContainer"] = "settingItemColorContainer";
14
15
  SettingsLayoutSlots2["settingItemContent"] = "settingItemContent";
15
16
  SettingsLayoutSlots2["settingFullscreen"] = "settingFullscreen";
16
17
  return SettingsLayoutSlots2;
@@ -36,7 +36,10 @@ export declare const SettingItemStyled: import('@emotion/styled').StyledComponen
36
36
  export declare const SettingItemContentStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
37
37
  ownerState?: (Partial<import('../types').SettingsLayoutOwnerState> & Record<string, unknown>) | undefined;
38
38
  }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
39
- export declare const SettingItemColorStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
39
+ export declare const SettingItemColorStyled: import('@emotion/styled').StyledComponent<Pick<import('../..').IconProps, keyof import('../..').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
40
+ ownerState?: (Partial<import('../types').SettingsLayoutOwnerState> & Record<string, unknown>) | undefined;
41
+ }, {}, {}>;
42
+ export declare const SettingItemColorContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
40
43
  ownerState?: (Partial<import('../types').SettingsLayoutOwnerState> & Record<string, unknown>) | undefined;
41
44
  }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
42
45
  export declare const SettingFullscreenStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../mui_extended/Button').ButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "value" | "size" | "children" | "title" | "component" | "name" | "id" | "type" | "disabled" | "action" | "hidden" | "color" | "content" | "style" | "variant" | "translate" | "className" | "classes" | "sx" | "form" | "label" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "href" | "skeletonWidth" | "startIcon" | "endIcon" | keyof import('react').RefAttributes<HTMLButtonElement> | "disableElevation" | "fullWidth"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
@@ -54,10 +54,14 @@ const SettingItemContentStyled = styled("div", {
54
54
  name: SETTINGS_LAYOUT_COMPONENT_KEY,
55
55
  slot: SettingsLayoutSlots.settingItemContent
56
56
  })(settingsLayoutStyles.settingItemContent);
57
- const SettingItemColorStyled = styled("div", {
57
+ const SettingItemColorStyled = styled(Icon, {
58
58
  name: SETTINGS_LAYOUT_COMPONENT_KEY,
59
59
  slot: SettingsLayoutSlots.settingItemColor
60
60
  })(settingsLayoutStyles.settingItemColor);
61
+ const SettingItemColorContainerStyled = styled("div", {
62
+ name: SETTINGS_LAYOUT_COMPONENT_KEY,
63
+ slot: SettingsLayoutSlots.settingItemColorContainer
64
+ })(settingsLayoutStyles.settingItemColorContainer);
61
65
  const SettingFullscreenStyled = styled(Button, {
62
66
  name: SETTINGS_LAYOUT_COMPONENT_KEY,
63
67
  slot: SettingsLayoutSlots.settingFullscreen
@@ -71,8 +75,9 @@ export {
71
75
  SettingItemContentStyled as b,
72
76
  SettingFullscreenStyled as c,
73
77
  SettingItemStyled as d,
74
- SettingItemColorStyled as e,
75
- SettingsLayoutRootStyled as f,
76
- HeaderActionsStyled as g,
77
- BodyContentStyled as h
78
+ SettingItemColorContainerStyled as e,
79
+ SettingItemColorStyled as f,
80
+ SettingsLayoutRootStyled as g,
81
+ HeaderActionsStyled as h,
82
+ BodyContentStyled as i
78
83
  };
@@ -22,7 +22,7 @@ const SettingFullscreen = () => {
22
22
  SettingFullscreenStyled,
23
23
  {
24
24
  fullWidth: true,
25
- variant: "outlined",
25
+ variant: "contained",
26
26
  color: "default",
27
27
  startIcon: /* @__PURE__ */ jsx(
28
28
  Icon,
@@ -1,10 +1,14 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { e as SettingItemColorStyled } from "../../slots/SettingsLayoutSlots.js";
2
+ import { e as SettingItemColorContainerStyled, f as SettingItemColorStyled } from "../../slots/SettingsLayoutSlots.js";
3
+ import { P as PATH_ICONS } from "../../icons.js";
4
+ import { useEnvironment } from "@m4l/core";
3
5
  const SettingItemColor = (props) => {
4
6
  const { onChange, selected, color } = props;
5
- return /* @__PURE__ */ jsx(
7
+ const { host_static_assets, environment_assets } = useEnvironment();
8
+ return /* @__PURE__ */ jsx(SettingItemColorContainerStyled, { children: /* @__PURE__ */ jsx(
6
9
  SettingItemColorStyled,
7
10
  {
11
+ src: `${host_static_assets}/${environment_assets}/${PATH_ICONS.COLOR}`,
8
12
  ...onChange ? {
9
13
  onClick: onChange,
10
14
  tabIndex: 0,
@@ -13,7 +17,7 @@ const SettingItemColor = (props) => {
13
17
  } : {},
14
18
  ownerState: { selected, onChange: !!onChange, color }
15
19
  }
16
- );
20
+ ) });
17
21
  };
18
22
  export {
19
23
  SettingItemColor as S
@@ -2,7 +2,7 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { AnimatePresence } from "framer-motion";
3
3
  import { useBase, useModuleDictionary } from "@m4l/core";
4
4
  import { P as PATH_ICONS } from "../../icons.js";
5
- import { B as BackdropStyled, f as SettingsLayoutRootStyled, H as HeaderContainerStyled, T as TypographyStyled, g as HeaderActionsStyled, h as BodyContentStyled } from "../../slots/SettingsLayoutSlots.js";
5
+ import { B as BackdropStyled, g as SettingsLayoutRootStyled, H as HeaderContainerStyled, T as TypographyStyled, h as HeaderActionsStyled, i as BodyContentStyled } from "../../slots/SettingsLayoutSlots.js";
6
6
  import { S as SettingDirection } from "../SettingDirection/SettingDirection.js";
7
7
  import { D as DICTIONARY } from "../../dictionary.js";
8
8
  import { I as IconButton } from "../../../mui_extended/IconButton/IconButton.js";
@@ -0,0 +1,5 @@
1
+ import { SettingsLayoutProps } from '../../types';
2
+ export interface SettingsLayoutBaseProps {
3
+ prefixPathIcon: string;
4
+ width: SettingsLayoutProps['width'];
5
+ }
@@ -1 +1,18 @@
1
- export {};
1
+ export declare const mockThemeUserSettings: {
2
+ themeMode: string;
3
+ themeColor: string;
4
+ themeDirection: string;
5
+ themeLayout: string;
6
+ themeStretch: boolean;
7
+ };
8
+ export declare const mockSettingsActions: {
9
+ init: import('vitest').Mock<(...args: any[]) => any>;
10
+ onChangeMode: import('vitest').Mock<(...args: any[]) => any>;
11
+ onChangeColor: import('vitest').Mock<(...args: any[]) => any>;
12
+ onChangeDirection: import('vitest').Mock<(...args: any[]) => any>;
13
+ onChangeLayout: import('vitest').Mock<(...args: any[]) => any>;
14
+ onToggleStretch: import('vitest').Mock<(...args: any[]) => any>;
15
+ onResetSetting: import('vitest').Mock<(...args: any[]) => any>;
16
+ handleOpen: import('vitest').Mock<(...args: any[]) => any>;
17
+ setThemeSettings: import('vitest').Mock<(...args: any[]) => any>;
18
+ };
@@ -4,7 +4,7 @@ import { SETTINGS_LAYOUT_CLASSES, SETTINGS_LAYOUT_COMPONENT_KEY } from './consta
4
4
  import { Theme } from '@mui/material';
5
5
  import { Sizes, ThemeUserColor } from '@m4l/styles';
6
6
  import { ThemeSettingsStateWithActions, ThemeSettingsStore } from '@m4l/graphics';
7
- export interface SettingsLayoutProps extends Pick<ThemeSettingsStateWithActions['settingsActions'], 'onResetSetting' | 'handleOpen' | 'onChangeMode' | 'onChangeColor' | 'onChangeDirection' | 'onChangeLayout' | 'onToggleStretch'>, Pick<ThemeSettingsStore, 'open' | 'themeUserSettings' | 'presetsOptionsColorMain'> {
7
+ export interface SettingsLayoutProps {
8
8
  /**
9
9
  * Propiedad que define el ancho del componente.
10
10
  */
@@ -12,7 +12,7 @@ export interface SettingsLayoutProps extends Pick<ThemeSettingsStateWithActions[
12
12
  /**
13
13
  * Medida de tamaño para el componente.
14
14
  */
15
- size: Extract<Sizes, 'small' | 'medium'>;
15
+ size?: Extract<Sizes, 'small' | 'medium'>;
16
16
  /**
17
17
  * Nombre de clase css.
18
18
  */
@@ -22,7 +22,7 @@ export interface SettingsLayoutProps extends Pick<ThemeSettingsStateWithActions[
22
22
  */
23
23
  dataTestId?: string;
24
24
  }
25
- export type SettingsBaseProvider = Omit<SettingsLayoutProps, 'size' | 'className' | 'dataTestId'> & {
25
+ export type SettingsBaseProvider = Pick<SettingsLayoutProps, 'width'> & Pick<ThemeSettingsStateWithActions['settingsActions'], 'onResetSetting' | 'handleOpen' | 'onChangeMode' | 'onChangeColor' | 'onChangeDirection' | 'onChangeLayout' | 'onToggleStretch'> & Pick<ThemeSettingsStore, 'open' | 'themeUserSettings' | 'presetsOptionsColorMain'> & {
26
26
  classes: Record<keyof typeof SETTINGS_LAYOUT_CLASSES, string>;
27
27
  prefixPathIcon: string;
28
28
  };
@@ -37,7 +37,7 @@ export type SettingsLayoutSlotsType = keyof typeof SettingsLayoutSlots;
37
37
  * Este tipo se utiliza para describir el estado completo del componente , incluyendo
38
38
  * las propiedades pasadas al componente y el estado calculado.
39
39
  */
40
- export interface SettingsLayoutOwnerState extends Pick<SettingsLayoutProps['themeUserSettings'], 'themeDirection'> {
40
+ export interface SettingsLayoutOwnerState extends Pick<ThemeSettingsStore['themeUserSettings'], 'themeDirection'> {
41
41
  width: SettingsLayoutProps['width'];
42
42
  size: SettingsLayoutProps['size'];
43
43
  color?: ThemeUserColor;
@@ -5,7 +5,7 @@ import { UseHeaderActionsParams } from '../types';
5
5
  *
6
6
  * Retorna las acciones del header de una ventana. Izquierda, derecha y dentro del menu.
7
7
  */
8
- export declare const useHeaderActions: ({ windowId, areaId, }: UseHeaderActionsParams) => {
8
+ export declare const useHeaderActions: ({ windowId, areaId, emergeType, }: UseHeaderActionsParams) => {
9
9
  leftActions: WindowBaseAction[];
10
10
  insideActions: WindowBaseAction[];
11
11
  rightActions: WindowBaseAction[];
@@ -7,7 +7,8 @@ import { g as getLeftActions, a as getInsideMenuActions } from "../../../../../.
7
7
  import { u as useRightActions } from "./useRightActions.js";
8
8
  const useHeaderActions = ({
9
9
  windowId,
10
- areaId
10
+ areaId,
11
+ emergeType
11
12
  }) => {
12
13
  const { host_static_assets, environment_assets } = useEnvironment();
13
14
  const { getLabel } = useModuleDictionary();
@@ -45,7 +46,8 @@ const useHeaderActions = ({
45
46
  }, [windowId, isMobile, moduleActions, urlPrefix, saveModuleCookies, resetModuleCookies, windowOptions, getLabel]);
46
47
  const rightActions = useRightActions({
47
48
  windowId,
48
- areaId
49
+ areaId,
50
+ emergeType
49
51
  });
50
52
  return {
51
53
  leftActions,
@@ -3,4 +3,4 @@ import { UseHeaderActionsParams } from '../types';
3
3
  /**
4
4
  * Hook useRightActions, retorna las acciones de maximizar y minimizar una ventana, colapsar y expandir una ventana
5
5
  */
6
- export declare const useRightActions: ({ windowId, areaId, }: UseHeaderActionsParams) => WindowBaseAction[];
6
+ export declare const useRightActions: ({ windowId, areaId, emergeType, }: UseHeaderActionsParams) => WindowBaseAction[];
@@ -6,7 +6,8 @@ import { I as ICONS } from "../../../../../../../icons.js";
6
6
  import { g as getAreasDictionary, A as AREAS_DICCTIONARY } from "../../../../../../../dictionary.js";
7
7
  const useRightActions = ({
8
8
  windowId,
9
- areaId
9
+ areaId,
10
+ emergeType
10
11
  }) => {
11
12
  const { host_static_assets, environment_assets } = useEnvironment();
12
13
  const { getLabel } = useModuleDictionary();
@@ -29,54 +30,56 @@ const useRightActions = ({
29
30
  const { maximizeLayout, normalizeLayouts, colapseLayoutItem, unColapseLayoutItem } = useAreasStore((state) => state.areaActions);
30
31
  const rightActions = useMemo(() => {
31
32
  const actions = [];
32
- actions.push({
33
- place: "right",
34
- key: "collapseToggle",
35
- iconUrl: !collapsed ? `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.COLLAPSE}` : `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.UNCOLLPASE}`,
36
- label: !collapsed ? getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_collapse_window)) : getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_uncollapse_window)),
37
- tooltipProps: {
38
- placement: "bottom-end"
39
- },
40
- /**
41
- * Acción de collapse/expand.
42
- */
43
- onClick: () => {
44
- if (areaId) {
45
- if (collapsed) {
46
- unColapseLayoutItem(areaId, windowId);
47
- } else {
48
- colapseLayoutItem(areaId, windowId);
33
+ if (emergeType === "layout") {
34
+ actions.push({
35
+ place: "right",
36
+ key: "collapseToggle",
37
+ iconUrl: !collapsed ? `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.COLLAPSE}` : `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.UNCOLLPASE}`,
38
+ label: !collapsed ? getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_collapse_window)) : getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_uncollapse_window)),
39
+ tooltipProps: {
40
+ placement: "bottom-end"
41
+ },
42
+ /**
43
+ * Acción de collapse/expand.
44
+ */
45
+ onClick: () => {
46
+ if (areaId) {
47
+ if (collapsed) {
48
+ unColapseLayoutItem(areaId, windowId);
49
+ } else {
50
+ colapseLayoutItem(areaId, windowId);
51
+ }
49
52
  }
50
- }
51
- },
52
- disabled: !(maximizedId === void 0),
53
- color: "warning",
54
- className: "collapse-toggle window-actions"
55
- });
56
- actions.push({
57
- place: "right",
58
- key: "maximize",
59
- iconUrl: maximizedId ? `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.NORMALIZE}` : `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.MAXIMIZE}`,
60
- label: maximizedId ? getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_minimize_window)) : getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_maximize_window)),
61
- tooltipProps: {
62
- placement: "bottom-end"
63
- },
64
- /**
65
- * Acción de maximize/normalize.
66
- */
67
- onClick: () => {
68
- if (areaId) {
69
- if (maximizedId) {
70
- normalizeLayouts(areaId);
71
- } else {
72
- maximizeLayout(areaId, windowId);
53
+ },
54
+ disabled: !(maximizedId === void 0),
55
+ color: "warning",
56
+ className: "collapse-toggle window-actions"
57
+ });
58
+ actions.push({
59
+ place: "right",
60
+ key: "maximize",
61
+ iconUrl: maximizedId ? `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.NORMALIZE}` : `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.MAXIMIZE}`,
62
+ label: maximizedId ? getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_minimize_window)) : getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_maximize_window)),
63
+ tooltipProps: {
64
+ placement: "bottom-end"
65
+ },
66
+ /**
67
+ * Acción de maximize/normalize.
68
+ */
69
+ onClick: () => {
70
+ if (areaId) {
71
+ if (maximizedId) {
72
+ normalizeLayouts(areaId);
73
+ } else {
74
+ maximizeLayout(areaId, windowId);
75
+ }
73
76
  }
74
- }
75
- },
76
- disabled: false,
77
- color: "info",
78
- className: "expand-toggle window-actions"
79
- });
77
+ },
78
+ disabled: false,
79
+ color: "info",
80
+ className: "expand-toggle window-actions"
81
+ });
82
+ }
80
83
  return actions;
81
84
  }, [
82
85
  collapsed,
@@ -75,7 +75,8 @@ const useWindow = (windowId, areaId) => {
75
75
  }, [status, loadCookiesFromApi, windowId]);
76
76
  const { leftActions, insideActions: menuActions, rightActions } = useHeaderActions({
77
77
  windowId,
78
- areaId
78
+ areaId,
79
+ emergeType
79
80
  });
80
81
  const memoizedActions = useMemo(() => {
81
82
  return [...leftActions, ...menuActions, ...rightActions];
@@ -1,5 +1,5 @@
1
1
  import { WindowBaseAction } from '../../../../../../../../../src/components/WindowBase/types';
2
- import { AreaWindowBaseProps } from '../../../../../../types';
2
+ import { AreaWindowBaseProps, EmergeType } from '../../../../../../types';
3
3
  export interface WindowProps extends Pick<AreaWindowBaseProps, 'windowId' | 'areaId'> {
4
4
  /**
5
5
  * Acciones que se mostrarán en el header
@@ -9,4 +9,8 @@ export interface WindowProps extends Pick<AreaWindowBaseProps, 'windowId' | 'are
9
9
  export interface UseHeaderActionsParams {
10
10
  windowId: string;
11
11
  areaId?: string;
12
+ /**
13
+ * emergeType: 'popup' | 'modal'
14
+ */
15
+ emergeType: EmergeType;
12
16
  }