@m4l/components 9.3.3 → 9.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/types.d.ts +15 -0
- package/components/NumberInput/NumberInput.styles.js +1 -0
- package/components/PaperForm/PaperForm.js +1 -2
- package/components/PaperForm/components/Header.js +1 -10
- package/components/PaperForm/styles.js +1 -4
- package/components/PropertyValue/PropertyValue.js +1 -1
- package/components/SettingsLayout/SettingsLayout.d.ts +5 -0
- package/components/SettingsLayout/SettingsLayout.js +34 -0
- package/components/SettingsLayout/SettingsLayout.styles.d.ts +2 -0
- package/components/SettingsLayout/SettingsLayout.styles.js +270 -0
- package/components/SettingsLayout/constants.d.ts +7 -0
- package/components/SettingsLayout/constants.js +10 -0
- package/components/SettingsLayout/dictionary.d.ts +8 -0
- package/components/SettingsLayout/dictionary.js +11 -0
- package/components/SettingsLayout/icons.d.ts +14 -0
- package/components/SettingsLayout/icons.js +17 -0
- package/components/SettingsLayout/index.d.ts +2 -0
- package/components/SettingsLayout/index.js +1 -0
- package/components/SettingsLayout/slots/SettingsLayoutEnum.d.ts +17 -0
- package/components/SettingsLayout/slots/SettingsLayoutEnum.js +21 -0
- package/components/SettingsLayout/slots/SettingsLayoutSlots.d.ts +47 -0
- package/components/SettingsLayout/slots/SettingsLayoutSlots.js +83 -0
- package/components/SettingsLayout/subcomponents/SettingColorPresets/SettingColorPresets.d.ts +5 -0
- package/components/SettingsLayout/subcomponents/SettingColorPresets/SettingColorPresets.js +37 -0
- package/components/SettingsLayout/subcomponents/SettingColorPresets/index.d.ts +1 -0
- package/components/SettingsLayout/subcomponents/SettingColorPresets/index.js +1 -0
- package/components/SettingsLayout/subcomponents/SettingColorPresets/types.d.ts +3 -0
- package/components/SettingsLayout/subcomponents/SettingDirection/SettingDirection.d.ts +5 -0
- package/components/SettingsLayout/subcomponents/SettingDirection/SettingDirection.js +37 -0
- package/components/SettingsLayout/subcomponents/SettingDirection/index.d.ts +1 -0
- package/components/SettingsLayout/subcomponents/SettingDirection/types.d.ts +3 -0
- package/components/SettingsLayout/subcomponents/SettingFullscreen/SettingFullscreen.d.ts +5 -0
- package/components/SettingsLayout/subcomponents/SettingFullscreen/SettingFullscreen.js +40 -0
- package/components/SettingsLayout/subcomponents/SettingFullscreen/index.d.ts +1 -0
- package/components/SettingsLayout/subcomponents/SettingFullscreen/index.js +1 -0
- package/components/SettingsLayout/subcomponents/SettingFullscreen/types.d.ts +3 -0
- package/components/SettingsLayout/subcomponents/SettingItem/SettingItem.d.ts +8 -0
- package/components/SettingsLayout/subcomponents/SettingItem/SettingItem.js +23 -0
- package/components/SettingsLayout/subcomponents/SettingItem/index.d.ts +1 -0
- package/components/SettingsLayout/subcomponents/SettingItem/index.js +1 -0
- package/components/SettingsLayout/subcomponents/SettingItem/types.d.ts +5 -0
- package/components/SettingsLayout/subcomponents/SettingItemColor/SettingItemColor.d.ts +8 -0
- package/components/SettingsLayout/subcomponents/SettingItemColor/SettingItemColor.js +24 -0
- package/components/SettingsLayout/subcomponents/SettingItemColor/index.d.ts +1 -0
- package/components/SettingsLayout/subcomponents/SettingItemColor/index.js +1 -0
- package/components/SettingsLayout/subcomponents/SettingItemColor/types.d.ts +6 -0
- package/components/SettingsLayout/subcomponents/SettingMode/SettingMode.d.ts +5 -0
- package/components/SettingsLayout/subcomponents/SettingMode/SettingMode.js +36 -0
- package/components/SettingsLayout/subcomponents/SettingMode/index.d.ts +1 -0
- package/components/SettingsLayout/subcomponents/SettingMode/index.js +1 -0
- package/components/SettingsLayout/subcomponents/SettingMode/types.d.ts +3 -0
- package/components/SettingsLayout/subcomponents/SettingsLayoutBase/SettingsLayoutBase.d.ts +5 -0
- package/components/SettingsLayout/subcomponents/SettingsLayoutBase/SettingsLayoutBase.js +76 -0
- package/components/SettingsLayout/subcomponents/SettingsLayoutBase/index.d.ts +1 -0
- package/components/SettingsLayout/subcomponents/SettingsLayoutBase/index.js +1 -0
- package/components/SettingsLayout/subcomponents/SettingsLayoutBase/types.d.ts +5 -0
- package/components/SettingsLayout/test/SettingsLayout.test.d.ts +18 -0
- package/components/SettingsLayout/types.d.ts +47 -0
- package/components/ToastContainer/ToastContainer.js +0 -1
- package/components/ToastContainer/ToastContainer.styles.js +126 -122
- package/components/ToastContainer/constants.d.ts +670 -0
- package/components/ToastContainer/constants.js +672 -1
- package/components/hook-form/RHFColorPicker/RHFColorPicker.styles.js +2 -1
- package/components/hook-form/RHFDateTime/RHFDateTime.styles.js +2 -1
- package/components/hook-form/RHFNumberInput/RHFNumberInput.styles.js +2 -1
- package/components/hook-form/RHFPeriod/RHFPeriod.styles.js +2 -5
- package/components/hook-form/RHFPeriod/slots/RHFPeriodEnum.d.ts +1 -1
- package/components/hook-form/RHFPeriod/slots/RHFPeriodEnum.js +1 -1
- package/components/hook-form/RHFPeriod/slots/RHFPeriodSlots.d.ts +1 -1
- package/components/hook-form/RHFPeriod/slots/RHFPeriodSlots.js +6 -6
- package/components/hook-form/RHFPeriod/subcomponents/Period/Period.js +13 -11
- package/components/hook-form/RHFPeriod/subcomponents/Period/dictionary.js +1 -1
- package/components/hook-form/RHFPeriod/subcomponents/Period/types.d.ts +2 -2
- package/components/hook-form/RHFSelect/RHFSelect.styles.js +2 -1
- package/components/index.d.ts +1 -0
- package/components/mui_extended/Button/ButtonStyles.js +2 -1
- package/components/mui_extended/IconButton/IconButton.styles.js +1 -1
- package/components/mui_extended/MenuItem/MenuItem.styles.js +2 -1
- package/components/mui_extended/TextField/constants.d.ts +5 -5
- package/components/mui_extended/TextField/constants.js +2 -2
- package/components/mui_extended/TextField/slots/TextFieldEnum.d.ts +1 -1
- package/components/mui_extended/TextField/slots/TextFieldEnum.js +8 -8
- package/index.js +12 -10
- package/package.json +1 -1
- package/storybook/components/SettingsLayout/SettingsLayout.stories.d.ts +6 -0
- package/storybook/components/SettingsLayout/subcomponents/SettingsLayoutRender/SettingsLayoutsRender.d.ts +5 -0
- package/storybook/components/SettingsLayout/subcomponents/SettingsLayoutRender/index.d.ts +1 -0
- package/storybook/components/paperForm/PaperForm.stories.d.ts +4 -0
- package/components/hook-form/RHFDateTime/styles.d.ts +0 -1
package/@types/types.d.ts
CHANGED
|
@@ -144,6 +144,7 @@ import { RHFUploadSingleFileOwnerState, RHFUploadSingleFileSlotsType } from '../
|
|
|
144
144
|
import { ChipStatusFormatterSlotsType } from '../components/formatters/ChipStatusFormatter/types';
|
|
145
145
|
import { RHFUploadImageOwnerState, RHFUploadImageSlotsType } from '../components/hook-form/RHFUpload/RHFUploadImage/types';
|
|
146
146
|
import { PrintingSystemOwnerState, PrintingSystemSlotsType } from '../components/PrintingSystem/types';
|
|
147
|
+
import { SettingsLayoutOwnerState, SettingsLayoutSlotsType } from '../components/SettingsLayout/types';
|
|
147
148
|
import { ScrollBarOwnerState, ScrollBarSlotsType } from '../components/ScrollBar/types';
|
|
148
149
|
import { SplitLayoutOwnerState } from '../components/extended/React-resizable-panels/types';
|
|
149
150
|
import { ObjectLogsOwnerState, ObjectLogsSlotsType } from '../components/ObjectLogs/types';
|
|
@@ -225,12 +226,14 @@ declare module '@mui/material/styles' {
|
|
|
225
226
|
M4LChipStatusFormatter: ChipStatusFormatterSlotsType;
|
|
226
227
|
M4LRHFUploadImage: RHFUploadImageSlotsType;
|
|
227
228
|
M4LPrintingSystem: PrintingSystemSlotsType;
|
|
229
|
+
M4LSettingsLayout: SettingsLayoutSlotsType;
|
|
228
230
|
M4LScrollbar: ScrollBarSlotsType;
|
|
229
231
|
M4LSplitLayout: SplitLayoutOwnerState;
|
|
230
232
|
M4LObjectLogs: ObjectLogsSlotsType;
|
|
231
233
|
M4LLanguagePopover: LanguagePopoverSlotsType;
|
|
232
234
|
M4LCard: CardSlotsType;
|
|
233
235
|
M4LContainerFlow: ContainerFlowSlotsType;
|
|
236
|
+
M4LSettingsLayoutBase: SettingsLayoutSlotsType;
|
|
234
237
|
}
|
|
235
238
|
interface ComponentsPropsList {
|
|
236
239
|
// Extend ComponentsProps or ComponentsOwnerState(this extend ComponentProps)
|
|
@@ -306,12 +309,14 @@ declare module '@mui/material/styles' {
|
|
|
306
309
|
M4LChipStatusFormatter: Partial<ChipStatusFormatterOwnerState>;
|
|
307
310
|
M4LRHFUploadImage: Partial<RHFUploadImageOwnerState>;
|
|
308
311
|
M4LPrintingSystem: Partial<PrintingSystemOwnerState>;
|
|
312
|
+
M4LSettingsLayout: Partial<SettingsLayoutOwnerState>;
|
|
309
313
|
M4LScrollBar: Partial<ScrollBarOwnerState>;
|
|
310
314
|
M4LSplitLayout: Partial<SplitLayoutOwnerState>;
|
|
311
315
|
M4LObjectLogs: Partial<ObjectLogsOwnerState>;
|
|
312
316
|
M4LLanguagePopover: Partial<LanguagePopoverOwnerState>;
|
|
313
317
|
M4LCard: Partial<CardOwnerState>;
|
|
314
318
|
M4LContainerFlow: Partial<ContainerFlowOwnerState>;
|
|
319
|
+
M4LSettingsLayoutBase: Partial<SettingsLayoutOwnerState>;
|
|
315
320
|
}
|
|
316
321
|
interface Components {
|
|
317
322
|
M4LDynamicFilter?: {
|
|
@@ -684,6 +689,11 @@ declare module '@mui/material/styles' {
|
|
|
684
689
|
styleOverrides?: ComponentsOverrides<Theme>['M4LPrintingSystem'];
|
|
685
690
|
variants?: ComponentsVariants['M4LPrintingSystem'];
|
|
686
691
|
};
|
|
692
|
+
M4LSettingsLayout?: {
|
|
693
|
+
defaultProps?: ComponentsPropsList['M4LSettingsLayout'];
|
|
694
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LSettingsLayout'];
|
|
695
|
+
variants?: ComponentsVariants['M4LSettingsLayout'];
|
|
696
|
+
};
|
|
687
697
|
M4LScrollBar?: {
|
|
688
698
|
defaultProps?: ComponentsPropsList['M4LScrollBar'];
|
|
689
699
|
styleOverrides?: ComponentsOverrides<Theme>['M4LScrollBar'];
|
|
@@ -714,5 +724,10 @@ declare module '@mui/material/styles' {
|
|
|
714
724
|
styleOverrides?: ComponentsOverrides<Theme>['M4LContainerFlow'];
|
|
715
725
|
variants?: ComponentsVariants['M4LContainerFlow'];
|
|
716
726
|
};
|
|
727
|
+
M4LSettingsLayoutBase?: {
|
|
728
|
+
defaultProps?: ComponentsPropsList['M4LSettingsLayoutBase'];
|
|
729
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LSettingsLayoutBase'];
|
|
730
|
+
variants?: ComponentsVariants['M4LSettingsLayoutBase'];
|
|
731
|
+
};
|
|
717
732
|
}
|
|
718
733
|
}
|
|
@@ -15,6 +15,7 @@ const numberInputStyles = {
|
|
|
15
15
|
paddingLeft: theme.vars.size.baseSpacings.sp1,
|
|
16
16
|
paddingRight: ownerState?.noButtons && theme.vars.size.baseSpacings.sp1,
|
|
17
17
|
boxSizing: "border-box",
|
|
18
|
+
overflow: "hidden",
|
|
18
19
|
...getHeightSizeStyles(
|
|
19
20
|
theme.generalSettings.isMobile,
|
|
20
21
|
ownerState?.size || "medium",
|
|
@@ -29,9 +29,8 @@ function PaperForm(props) {
|
|
|
29
29
|
const { currentSize } = useComponentSize(size);
|
|
30
30
|
const paperFormRef = useRef(null);
|
|
31
31
|
const rootClass = getComponentSlotRoot(PAPER_FORM_KEY);
|
|
32
|
-
const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
|
|
33
32
|
const ownerState = {
|
|
34
|
-
size:
|
|
33
|
+
size: currentSize,
|
|
35
34
|
color,
|
|
36
35
|
isForm,
|
|
37
36
|
paperFormVariant: variant
|
|
@@ -1,26 +1,17 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useModuleSkeleton } from "@m4l/core";
|
|
3
2
|
import { H as HeaderStyled, I as IconStyled, T as TitleStyled } from "../slots/PaperFormSlots.js";
|
|
4
|
-
import { S as Skeleton } from "../../mui_extended/Skeleton/Skeleton.js";
|
|
5
3
|
const Header = (props) => {
|
|
6
4
|
const { urlIcon, title, size, dataTestId, color } = props;
|
|
7
|
-
const isSkeleton = useModuleSkeleton();
|
|
8
5
|
const ownerState = {
|
|
9
6
|
color
|
|
10
7
|
};
|
|
11
|
-
const renderSkeleton = () => {
|
|
12
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13
|
-
urlIcon ? /* @__PURE__ */ jsx(Skeleton, { variant: "circular", width: 16, height: 16 }) : null,
|
|
14
|
-
/* @__PURE__ */ jsx(Skeleton, { variant: "text", width: 80, height: 16 })
|
|
15
|
-
] });
|
|
16
|
-
};
|
|
17
8
|
const renderContentHeader = () => {
|
|
18
9
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
19
10
|
urlIcon ? /* @__PURE__ */ jsx(IconStyled, { src: urlIcon, size }) : null,
|
|
20
11
|
/* @__PURE__ */ jsx(TitleStyled, { variant: "bodyDens", size, children: title })
|
|
21
12
|
] });
|
|
22
13
|
};
|
|
23
|
-
return /* @__PURE__ */ jsx(HeaderStyled, { role: "heading", ownerState, ...process.env.NODE_ENV !== "production" ? { "data-testid": dataTestId } : {}, children:
|
|
14
|
+
return /* @__PURE__ */ jsx(HeaderStyled, { role: "heading", ownerState, ...process.env.NODE_ENV !== "production" ? { "data-testid": dataTestId } : {}, children: renderContentHeader() });
|
|
24
15
|
};
|
|
25
16
|
export {
|
|
26
17
|
Header as H
|
|
@@ -58,10 +58,7 @@ const paperFormStyles = {
|
|
|
58
58
|
* @param theme
|
|
59
59
|
***********************************************************
|
|
60
60
|
*/
|
|
61
|
-
containerIcon:
|
|
62
|
-
display: "grid",
|
|
63
|
-
placeItems: "center"
|
|
64
|
-
}),
|
|
61
|
+
containerIcon: {},
|
|
65
62
|
/**
|
|
66
63
|
* ************************************************************
|
|
67
64
|
* Estilos del contenido del componente PaperForm
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEnvironment, FlagsProvider, ModuleDictionaryProvider, ModuleSkeletonProvider, CommonFlags } from "@m4l/core";
|
|
3
|
+
import { useLocales, useThemeSettingsStore } from "@m4l/graphics";
|
|
4
|
+
import { S as SETTINGS_LAYOUT_DEFAULT_WIDTH } from "./constants.js";
|
|
5
|
+
import { useMemo } from "react";
|
|
6
|
+
import { S as SettingsLayoutBase } from "./subcomponents/SettingsLayoutBase/SettingsLayoutBase.js";
|
|
7
|
+
const SettingsLayout = (props) => {
|
|
8
|
+
const {
|
|
9
|
+
width = SETTINGS_LAYOUT_DEFAULT_WIDTH
|
|
10
|
+
} = props;
|
|
11
|
+
const currentLang = useLocales().currentLocale?.localeString;
|
|
12
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
13
|
+
const { open } = useThemeSettingsStore((state) => state);
|
|
14
|
+
const prefixPathIcon = `${host_static_assets}/${environment_assets}`;
|
|
15
|
+
const componentsDictionary = useMemo(() => {
|
|
16
|
+
return [];
|
|
17
|
+
}, []);
|
|
18
|
+
if (!open) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
return /* @__PURE__ */ jsx(FlagsProvider, { children: /* @__PURE__ */ jsx(
|
|
22
|
+
ModuleDictionaryProvider,
|
|
23
|
+
{
|
|
24
|
+
isAuth: false,
|
|
25
|
+
moduleId: "theme_settings",
|
|
26
|
+
componentsDictionary,
|
|
27
|
+
currentLang,
|
|
28
|
+
children: /* @__PURE__ */ jsx(ModuleSkeletonProvider, { flags: [CommonFlags.FLAG_DICTIONARY_LOADED], children: /* @__PURE__ */ jsx(SettingsLayoutBase, { prefixPathIcon, width }) })
|
|
29
|
+
}
|
|
30
|
+
) });
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
SettingsLayout as S
|
|
34
|
+
};
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { PRIMARY_COLORS_LIGHT, PRIMARY_COLORS_DARK } from "@m4l/styles";
|
|
2
|
+
import { g as getTypographyStyles } from "../../utils/getTypographyStyles.js";
|
|
3
|
+
import { v as varFade } from "../animate/variants/fade.js";
|
|
4
|
+
import { g as getSizeStyles } from "../../utils/getSizeStyles/getSizeStyles.js";
|
|
5
|
+
const settingsLayoutStyles = {
|
|
6
|
+
/**
|
|
7
|
+
* Estilos css de la ranura root
|
|
8
|
+
*/
|
|
9
|
+
root: ({ theme, ownerState }) => ({
|
|
10
|
+
top: 0,
|
|
11
|
+
right: 0,
|
|
12
|
+
bottom: 0,
|
|
13
|
+
transform: "unset!important",
|
|
14
|
+
padding: theme.vars.size.baseSpacings.sp6,
|
|
15
|
+
opacity: "1!important",
|
|
16
|
+
display: "flex",
|
|
17
|
+
position: "fixed",
|
|
18
|
+
width: ownerState?.width,
|
|
19
|
+
flexDirection: "column",
|
|
20
|
+
gap: theme.vars.size.baseSpacings.sp6,
|
|
21
|
+
boxShadow: theme.vars.customShadows?.z4,
|
|
22
|
+
overflowY: "auto",
|
|
23
|
+
zIndex: theme.zIndex.drawer + 3,
|
|
24
|
+
...ownerState?.themeDirection === "ltr" && {
|
|
25
|
+
borderTopLeftRadius: theme.vars.size.borderRadius.r3,
|
|
26
|
+
borderBottomLeftRadius: theme.vars.size.borderRadius.r3
|
|
27
|
+
},
|
|
28
|
+
...ownerState?.themeDirection === "rtl" && {
|
|
29
|
+
borderTopRightRadius: theme.vars.size.borderRadius.r3,
|
|
30
|
+
borderBottomRightRadius: theme.vars.size.borderRadius.r3
|
|
31
|
+
},
|
|
32
|
+
border: theme.vars.size.borderStroke.container,
|
|
33
|
+
borderColor: theme.vars.palette.border.secondary,
|
|
34
|
+
backgroundColor: theme.vars.palette.background.base,
|
|
35
|
+
...ownerState?.themeDirection !== "rtl" ? varFade({
|
|
36
|
+
distance: ownerState?.width,
|
|
37
|
+
durationIn: 0.32,
|
|
38
|
+
durationOut: 0.32
|
|
39
|
+
}).inRight : varFade({
|
|
40
|
+
distance: ownerState?.width,
|
|
41
|
+
durationIn: 0.32,
|
|
42
|
+
durationOut: 0.32
|
|
43
|
+
}).inLeft
|
|
44
|
+
}),
|
|
45
|
+
/**
|
|
46
|
+
* Estilos css de la ranura backdrop
|
|
47
|
+
*/
|
|
48
|
+
backdrop: ({ theme }) => ({
|
|
49
|
+
background: "transparent",
|
|
50
|
+
zIndex: theme.zIndex.drawer + 1,
|
|
51
|
+
transform: "unset",
|
|
52
|
+
opacity: 1
|
|
53
|
+
}),
|
|
54
|
+
/**
|
|
55
|
+
* Estilos css de la ranura header
|
|
56
|
+
*/
|
|
57
|
+
headerContainer: () => ({
|
|
58
|
+
width: "100%",
|
|
59
|
+
display: "flex",
|
|
60
|
+
flexDirection: "row",
|
|
61
|
+
alignItems: "center",
|
|
62
|
+
justifyContent: "space-between"
|
|
63
|
+
}),
|
|
64
|
+
/**
|
|
65
|
+
* Estilos css de la ranura headerActions
|
|
66
|
+
*/
|
|
67
|
+
headerActions: ({ theme }) => ({
|
|
68
|
+
display: "flex",
|
|
69
|
+
flexDirection: "row",
|
|
70
|
+
width: "fit-content",
|
|
71
|
+
alignItems: "center",
|
|
72
|
+
padding: theme.vars.size.baseSpacings["sp0-5"],
|
|
73
|
+
gap: theme.vars.size.baseSpacings["sp0-5"],
|
|
74
|
+
borderRadius: theme.vars.size.borderRadius.r2,
|
|
75
|
+
border: theme.vars.size.borderStroke.container,
|
|
76
|
+
borderColor: theme.vars.palette.border.disabled,
|
|
77
|
+
backgroundColor: theme.vars.palette.background.default
|
|
78
|
+
}),
|
|
79
|
+
/**
|
|
80
|
+
* Estilos css de la ranura content
|
|
81
|
+
*/
|
|
82
|
+
bodyContent: ({ theme }) => ({
|
|
83
|
+
display: "flex",
|
|
84
|
+
flexDirection: "column",
|
|
85
|
+
position: "relative",
|
|
86
|
+
overflowY: "auto",
|
|
87
|
+
width: "100%",
|
|
88
|
+
gap: theme.vars.size.baseSpacings.sp6
|
|
89
|
+
}),
|
|
90
|
+
/**
|
|
91
|
+
* Estilos css de la ranura settingContainer
|
|
92
|
+
*/
|
|
93
|
+
settingContainer: ({ theme }) => ({
|
|
94
|
+
display: "flex",
|
|
95
|
+
flexDirection: "column",
|
|
96
|
+
padding: theme.vars.size.baseSpacings.sp4,
|
|
97
|
+
gap: theme.vars.size.baseSpacings.sp4,
|
|
98
|
+
borderRadius: theme.vars.size.borderRadius.r2,
|
|
99
|
+
backgroundColor: theme.vars.palette.background.default
|
|
100
|
+
}),
|
|
101
|
+
/**
|
|
102
|
+
* Estilos css de la ranura settingIconTitle
|
|
103
|
+
*/
|
|
104
|
+
settingIconTitle: ({ theme }) => ({
|
|
105
|
+
display: "flex",
|
|
106
|
+
flexDirection: "row",
|
|
107
|
+
gap: theme.vars.size.baseSpacings["sp2-5"],
|
|
108
|
+
justifyContent: "flex-start",
|
|
109
|
+
alignItems: "center"
|
|
110
|
+
}),
|
|
111
|
+
/**
|
|
112
|
+
* Estilos css de la ranura settingItemContent
|
|
113
|
+
*/
|
|
114
|
+
settingItemContent: ({ theme }) => ({
|
|
115
|
+
display: "flex",
|
|
116
|
+
flexDirection: "row",
|
|
117
|
+
gap: theme.vars.size.baseSpacings.sp4,
|
|
118
|
+
justifyContent: "space-between"
|
|
119
|
+
}),
|
|
120
|
+
/**
|
|
121
|
+
* Estilos css de la ranura settingItem
|
|
122
|
+
*/
|
|
123
|
+
settingItem: ({ theme, ownerState }) => ({
|
|
124
|
+
display: "flex",
|
|
125
|
+
flexDirection: "row",
|
|
126
|
+
justifyContent: "center",
|
|
127
|
+
alignItems: "center",
|
|
128
|
+
width: "100%",
|
|
129
|
+
height: "100%",
|
|
130
|
+
borderRadius: theme.vars.size.borderRadius.r2,
|
|
131
|
+
border: theme.vars.size.borderStroke.container,
|
|
132
|
+
borderColor: theme.vars.palette.border.disabled,
|
|
133
|
+
padding: theme.vars.size.baseSpacings.sp2,
|
|
134
|
+
outline: "unset",
|
|
135
|
+
"& .M4LIcon-root": {
|
|
136
|
+
width: theme.vars.size.baseSpacings.sp5,
|
|
137
|
+
height: theme.vars.size.baseSpacings.sp5
|
|
138
|
+
},
|
|
139
|
+
...ownerState?.onChange ? {
|
|
140
|
+
transition: "all 0.3s ease",
|
|
141
|
+
cursor: "pointer",
|
|
142
|
+
"&:hover": {
|
|
143
|
+
backgroundColor: theme.vars.palette.default.hoverOpacity
|
|
144
|
+
},
|
|
145
|
+
"&:active": {
|
|
146
|
+
backgroundColor: theme.vars.palette.default.activeOpacity
|
|
147
|
+
},
|
|
148
|
+
"&:focus-visible": {
|
|
149
|
+
borderColor: theme.vars.palette.border.main,
|
|
150
|
+
boxShadow: theme.vars.customShadows?.primary
|
|
151
|
+
},
|
|
152
|
+
...ownerState?.selected ? {
|
|
153
|
+
borderColor: theme.vars.palette.border.main,
|
|
154
|
+
backgroundColor: theme.vars.palette.primary.enabledOpacity,
|
|
155
|
+
"&:hover": {
|
|
156
|
+
backgroundColor: theme.vars.palette.primary.hoverOpacity
|
|
157
|
+
},
|
|
158
|
+
"&:active": {
|
|
159
|
+
backgroundColor: theme.vars.palette.primary.activeOpacity
|
|
160
|
+
}
|
|
161
|
+
} : {}
|
|
162
|
+
} : {}
|
|
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
|
+
}),
|
|
174
|
+
/**
|
|
175
|
+
* Estilos css de la ranura settingItemColor
|
|
176
|
+
*/
|
|
177
|
+
settingItemColor: ({ theme, ownerState }) => {
|
|
178
|
+
const presetColor = ownerState?.color ?? "patronus";
|
|
179
|
+
const presetPalette = ownerState?.mode === "light" ? PRIMARY_COLORS_LIGHT[presetColor] : PRIMARY_COLORS_DARK[presetColor];
|
|
180
|
+
return {
|
|
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",
|
|
220
|
+
transition: "all 0.3s ease",
|
|
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
|
|
229
|
+
}
|
|
230
|
+
} : {}
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
},
|
|
234
|
+
/**
|
|
235
|
+
* Estilos css de la ranura settingFullscreen
|
|
236
|
+
*/
|
|
237
|
+
settingFullscreen: ({ theme, ownerState }) => ({
|
|
238
|
+
/* borderRadius: theme.vars.size.borderRadius['r1-5'],
|
|
239
|
+
border: 'unset',
|
|
240
|
+
outline: 'unset', */
|
|
241
|
+
display: "flex",
|
|
242
|
+
flexDirection: "row",
|
|
243
|
+
alignItems: "center",
|
|
244
|
+
justifyContent: "center",
|
|
245
|
+
borderRadius: theme.vars.size.borderRadius["r1-5"],
|
|
246
|
+
"& .MuiTypography-root": {
|
|
247
|
+
width: "fit-content",
|
|
248
|
+
...getTypographyStyles(
|
|
249
|
+
theme.generalSettings.isMobile,
|
|
250
|
+
ownerState?.size || "medium",
|
|
251
|
+
"bodyDens"
|
|
252
|
+
)
|
|
253
|
+
}
|
|
254
|
+
}),
|
|
255
|
+
/**
|
|
256
|
+
* Estilos css de la ranura icon
|
|
257
|
+
*/
|
|
258
|
+
icon: {},
|
|
259
|
+
/**
|
|
260
|
+
* Estilos css de la ranura typography
|
|
261
|
+
*/
|
|
262
|
+
typography: {},
|
|
263
|
+
/**
|
|
264
|
+
* Estilos css de la ranura divider
|
|
265
|
+
*/
|
|
266
|
+
divider: {}
|
|
267
|
+
};
|
|
268
|
+
export {
|
|
269
|
+
settingsLayoutStyles as s
|
|
270
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SettingsLayoutSlots } from './slots/SettingsLayoutEnum';
|
|
2
|
+
/**
|
|
3
|
+
* Nombre de clase del componente.
|
|
4
|
+
*/
|
|
5
|
+
export declare const SETTINGS_LAYOUT_COMPONENT_KEY = "M4LSettingsLayout";
|
|
6
|
+
export declare const SETTINGS_LAYOUT_CLASSES: Record<keyof typeof SettingsLayoutSlots, string>;
|
|
7
|
+
export declare const SETTINGS_LAYOUT_DEFAULT_WIDTH = 300;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { g as getComponentClasses } from "../../utils/getComponentSlotRoot.js";
|
|
2
|
+
import { S as SettingsLayoutSlots } from "./slots/SettingsLayoutEnum.js";
|
|
3
|
+
const SETTINGS_LAYOUT_COMPONENT_KEY = "M4LSettingsLayout";
|
|
4
|
+
const SETTINGS_LAYOUT_CLASSES = getComponentClasses(SETTINGS_LAYOUT_COMPONENT_KEY, SettingsLayoutSlots);
|
|
5
|
+
const SETTINGS_LAYOUT_DEFAULT_WIDTH = 300;
|
|
6
|
+
export {
|
|
7
|
+
SETTINGS_LAYOUT_DEFAULT_WIDTH as S,
|
|
8
|
+
SETTINGS_LAYOUT_COMPONENT_KEY as a,
|
|
9
|
+
SETTINGS_LAYOUT_CLASSES as b
|
|
10
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const PATH_ICONS: {
|
|
2
|
+
REFRESH: string;
|
|
3
|
+
CLOSE: string;
|
|
4
|
+
MOON: string;
|
|
5
|
+
SUN: string;
|
|
6
|
+
MODE: string;
|
|
7
|
+
PALETTE: string;
|
|
8
|
+
DIRECTION: string;
|
|
9
|
+
ALIGN_LEFT: string;
|
|
10
|
+
ALIGN_RIGHT: string;
|
|
11
|
+
FULLSCREEN: string;
|
|
12
|
+
FULLSCREEN_EXIT: string;
|
|
13
|
+
COLOR: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const PATH_ICONS = {
|
|
2
|
+
REFRESH: "frontend/components/setting_layout/assets/icons/refresh.svg",
|
|
3
|
+
CLOSE: "frontend/components/setting_layout/assets/icons/closeSmall.svg",
|
|
4
|
+
MOON: "frontend/components/setting_layout/assets/icons/CloudMoon.svg",
|
|
5
|
+
SUN: "frontend/components/setting_layout/assets/icons/Sun.svg",
|
|
6
|
+
MODE: "frontend/components/setting_layout/assets/icons/eclipse.svg",
|
|
7
|
+
PALETTE: "frontend/components/setting_layout/assets/icons/palette.svg",
|
|
8
|
+
DIRECTION: "frontend/components/setting_layout/assets/icons/signpost.svg",
|
|
9
|
+
ALIGN_LEFT: "frontend/components/setting_layout/assets/icons/align-start-vertical.svg",
|
|
10
|
+
ALIGN_RIGHT: "frontend/components/setting_layout/assets/icons/align-end-vertical.svg",
|
|
11
|
+
FULLSCREEN: "frontend/components/setting_layout/assets/icons/FrameCorners.svg",
|
|
12
|
+
FULLSCREEN_EXIT: "frontend/components/setting_layout/assets/icons/exit_fullscreen.svg",
|
|
13
|
+
COLOR: "frontend/components/setting_layout/assets/icons/color_preset.svg"
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
PATH_ICONS as P
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare enum SettingsLayoutSlots {
|
|
2
|
+
root = "root",
|
|
3
|
+
backdrop = "backdrop",
|
|
4
|
+
icon = "icon",
|
|
5
|
+
typography = "typography",
|
|
6
|
+
divider = "divider",
|
|
7
|
+
headerContainer = "headerContainer",
|
|
8
|
+
headerActions = "headerActions",
|
|
9
|
+
bodyContent = "bodyContent",
|
|
10
|
+
settingContainer = "settingContainer",
|
|
11
|
+
settingIconTitle = "settingIconTitle",
|
|
12
|
+
settingItem = "settingItem",
|
|
13
|
+
settingItemColor = "settingItemColor",
|
|
14
|
+
settingItemColorContainer = "settingItemColorContainer",
|
|
15
|
+
settingItemContent = "settingItemContent",
|
|
16
|
+
settingFullscreen = "settingFullscreen"
|
|
17
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var SettingsLayoutSlots = /* @__PURE__ */ ((SettingsLayoutSlots2) => {
|
|
2
|
+
SettingsLayoutSlots2["root"] = "root";
|
|
3
|
+
SettingsLayoutSlots2["backdrop"] = "backdrop";
|
|
4
|
+
SettingsLayoutSlots2["icon"] = "icon";
|
|
5
|
+
SettingsLayoutSlots2["typography"] = "typography";
|
|
6
|
+
SettingsLayoutSlots2["divider"] = "divider";
|
|
7
|
+
SettingsLayoutSlots2["headerContainer"] = "headerContainer";
|
|
8
|
+
SettingsLayoutSlots2["headerActions"] = "headerActions";
|
|
9
|
+
SettingsLayoutSlots2["bodyContent"] = "bodyContent";
|
|
10
|
+
SettingsLayoutSlots2["settingContainer"] = "settingContainer";
|
|
11
|
+
SettingsLayoutSlots2["settingIconTitle"] = "settingIconTitle";
|
|
12
|
+
SettingsLayoutSlots2["settingItem"] = "settingItem";
|
|
13
|
+
SettingsLayoutSlots2["settingItemColor"] = "settingItemColor";
|
|
14
|
+
SettingsLayoutSlots2["settingItemColorContainer"] = "settingItemColorContainer";
|
|
15
|
+
SettingsLayoutSlots2["settingItemContent"] = "settingItemContent";
|
|
16
|
+
SettingsLayoutSlots2["settingFullscreen"] = "settingFullscreen";
|
|
17
|
+
return SettingsLayoutSlots2;
|
|
18
|
+
})(SettingsLayoutSlots || {});
|
|
19
|
+
export {
|
|
20
|
+
SettingsLayoutSlots as S
|
|
21
|
+
};
|