@m4l/components 9.1.32 → 9.1.33
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/components/SideBar/constants.d.ts +3 -0
- package/components/SideBar/constants.js +8 -2
- package/components/SideBar/slots/SideBarSlots.d.ts +1 -1
- package/components/SideBar/slots/SideBarSlots.js +2 -2
- package/components/SideBar/subcomponents/ContentComponent/index.js +3 -1
- package/components/SideBar/subcomponents/ContentGroups/index.d.ts +4 -1
- package/components/SideBar/subcomponents/ContentGroups/index.js +8 -5
- package/components/SideBar/subcomponents/ContentGroups/styles.js +7 -3
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/index.js +14 -7
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +27 -7
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/subcomponents/ArrowIcon/index.js +4 -4
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/types.d.ts +2 -0
- package/components/SideBar/subcomponents/FooterSidebar/index.js +1 -1
- package/components/SideBar/subcomponents/FooterSidebar/styles.js +1 -0
- package/components/SideBar/subcomponents/SideBarDesktop/index.js +1 -1
- package/components/maps/components/Map/subcomponents/LayersContainer/subcomponents/MyLayer/subcomponents/MarkerClusterGroup/index.d.ts +2 -0
- package/components/mui_extended/Button/Button.d.ts +2 -2
- package/components/mui_extended/IconButton/IconButton.js +3 -1
- package/components/mui_extended/MenuItem/MenuItem.js +11 -7
- package/components/mui_extended/MenuItem/MenuItem.styles.js +10 -13
- package/components/mui_extended/ToggleButton/ToggleButton.styles.js +2 -2
- package/components/mui_extended/Typography/typography.styles.js +160 -160
- package/package.json +1 -1
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export declare const SIDEBAR_KEY_COMPONENT = "M4LSideBar";
|
|
2
2
|
export declare const CONTAINER_BTN_ANCHORED = "M4LSideBarButtonAnchored";
|
|
3
3
|
export declare const LIST_MENU_ITEM = "M4LListMenuItem";
|
|
4
|
+
export declare const ITEM_ACTIVE = "M4LItemActive";
|
|
5
|
+
export declare const ITEM_IN_TREE_ACTIVE = "M4LItemInTreeActive";
|
|
6
|
+
export declare const PATH_ICONS = "/frontend/domain/microfrontends/";
|
|
4
7
|
export declare const PATH_ARROW_DOWN_ICON = "frontend/components/sidebar/assets/icons/ChevronRight.svg";
|
|
5
8
|
export declare const PATH_ARROW_RIGHT_ICON = "frontend/components/sidebar/assets/icons/arrow_right.svg";
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
const SIDEBAR_KEY_COMPONENT = "M4LSideBar";
|
|
2
2
|
const CONTAINER_BTN_ANCHORED = "M4LSideBarButtonAnchored";
|
|
3
3
|
const LIST_MENU_ITEM = "M4LListMenuItem";
|
|
4
|
+
const ITEM_ACTIVE = "M4LItemActive";
|
|
5
|
+
const ITEM_IN_TREE_ACTIVE = "M4LItemInTreeActive";
|
|
6
|
+
const PATH_ICONS = "/frontend/domain/microfrontends/";
|
|
4
7
|
const PATH_ARROW_DOWN_ICON = "frontend/components/sidebar/assets/icons/ChevronRight.svg";
|
|
5
8
|
const PATH_ARROW_RIGHT_ICON = "frontend/components/sidebar/assets/icons/arrow_right.svg";
|
|
6
9
|
export {
|
|
7
10
|
CONTAINER_BTN_ANCHORED as C,
|
|
11
|
+
ITEM_ACTIVE as I,
|
|
8
12
|
LIST_MENU_ITEM as L,
|
|
9
|
-
|
|
13
|
+
PATH_ICONS as P,
|
|
10
14
|
SIDEBAR_KEY_COMPONENT as S,
|
|
11
|
-
|
|
15
|
+
ITEM_IN_TREE_ACTIVE as a,
|
|
16
|
+
PATH_ARROW_DOWN_ICON as b,
|
|
17
|
+
PATH_ARROW_RIGHT_ICON as c
|
|
12
18
|
};
|
|
@@ -13,7 +13,7 @@ export declare const ContainerContentGroupsRootStyled: import('@emotion/styled')
|
|
|
13
13
|
export declare const ContainerContentGroupsStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').SideBarOwnerState> & Record<string, unknown> & {
|
|
14
14
|
ownerState: Partial<import('../types').SideBarOwnerState> & Record<string, unknown>;
|
|
15
15
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, keyof import('react').HTMLAttributes<HTMLElement> | keyof import('react').ClassAttributes<HTMLElement>>, {}>;
|
|
16
|
-
export declare const
|
|
16
|
+
export declare const ContainerContentTitleStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').SideBarOwnerState> & Record<string, unknown> & {
|
|
17
17
|
ownerState: Partial<import('../types').SideBarOwnerState> & Record<string, unknown>;
|
|
18
18
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
19
19
|
export declare const ContainerContentNavItemsStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').SideBarOwnerState> & Record<string, unknown> & {
|
|
@@ -22,7 +22,7 @@ const ContainerContentGroupsStyled = styled("section", {
|
|
|
22
22
|
name: SIDEBAR_KEY_COMPONENT,
|
|
23
23
|
slot: ContentGroupsSlots.containerContentGroups
|
|
24
24
|
})(sideBarStyles?.containerContentGroups);
|
|
25
|
-
const
|
|
25
|
+
const ContainerContentTitleStyled = styled("div", {
|
|
26
26
|
name: SIDEBAR_KEY_COMPONENT,
|
|
27
27
|
slot: ContentGroupsSlots.containerContentTitle
|
|
28
28
|
})(sideBarStyles?.containerContentTitle);
|
|
@@ -66,7 +66,7 @@ export {
|
|
|
66
66
|
ContentComponentRootStyled as C,
|
|
67
67
|
ContainerContentGroupsRootStyled as a,
|
|
68
68
|
ContainerContentGroupsStyled as b,
|
|
69
|
-
|
|
69
|
+
ContainerContentTitleStyled as c,
|
|
70
70
|
ContainerContentNavItemsStyled as d,
|
|
71
71
|
ContainerMenuItemsStyled as e,
|
|
72
72
|
ContainerArrowIconRootStyled as f,
|
|
@@ -4,11 +4,13 @@ import { C as ContentComponentRootStyled } from "../../slots/SideBarSlots.js";
|
|
|
4
4
|
import { C as ContentGroups } from "../ContentGroups/index.js";
|
|
5
5
|
import { F as FooterSidebar } from "../FooterSidebar/index.js";
|
|
6
6
|
import { H as HeaderSidebar } from "../HeaderSidebar/index.js";
|
|
7
|
+
import { u as useComponentSize } from "../../../../hooks/useComponentSize/useComponentSize.js";
|
|
7
8
|
const ContentComponent = () => {
|
|
8
9
|
const { anchored, onToggleAnchored, companyName, companySlogan, companyLogoSmallUrl, expandedWidth } = useSideBar();
|
|
9
10
|
const ownerState = {
|
|
10
11
|
expandedWidth
|
|
11
12
|
};
|
|
13
|
+
const { currentSize } = useComponentSize();
|
|
12
14
|
return /* @__PURE__ */ jsxs(ContentComponentRootStyled, { ownerState, children: [
|
|
13
15
|
/* @__PURE__ */ jsx(
|
|
14
16
|
HeaderSidebar,
|
|
@@ -18,7 +20,7 @@ const ContentComponent = () => {
|
|
|
18
20
|
srcIcon: companyLogoSmallUrl ?? ""
|
|
19
21
|
}
|
|
20
22
|
),
|
|
21
|
-
/* @__PURE__ */ jsx(ContentGroups, {}),
|
|
23
|
+
/* @__PURE__ */ jsx(ContentGroups, { size: currentSize }),
|
|
22
24
|
/* @__PURE__ */ jsx(FooterSidebar, { onToggleAnchored, anchored })
|
|
23
25
|
] });
|
|
24
26
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Sizes } from '@m4l/styles';
|
|
1
2
|
/**
|
|
2
3
|
* Renderiza el contenido de los grupos
|
|
3
4
|
* @author Andrés Quintero - automatic
|
|
@@ -5,4 +6,6 @@
|
|
|
5
6
|
* @updatedAt 2024-12-10 11:21:21 - automatic
|
|
6
7
|
* @updatedUser Andrés Quintero - automatic
|
|
7
8
|
*/
|
|
8
|
-
export declare const ContentGroups: (
|
|
9
|
+
export declare const ContentGroups: (props: {
|
|
10
|
+
size: Sizes;
|
|
11
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,24 +3,27 @@ import { useModuleDictionary } from "@m4l/core";
|
|
|
3
3
|
import { u as useSideBar } from "../../hooks/useSideBar/index.js";
|
|
4
4
|
import { T as TEST_PROP_ID } from "../../../../test/constants_no_mock.js";
|
|
5
5
|
import { g as getNameDataTestId } from "../../tests/utils.js";
|
|
6
|
-
import { a as ContainerContentGroupsRootStyled, b as ContainerContentGroupsStyled, c as
|
|
6
|
+
import { a as ContainerContentGroupsRootStyled, b as ContainerContentGroupsStyled, c as ContainerContentTitleStyled, d as ContainerContentNavItemsStyled } from "../../slots/SideBarSlots.js";
|
|
7
7
|
import { C as ContainerMenuItemsMain } from "./subcomponents/ContainerMenuItemsMain/index.js";
|
|
8
|
+
import { u as useComponentSize } from "../../../../hooks/useComponentSize/useComponentSize.js";
|
|
8
9
|
import { T as Typography } from "../../../mui_extended/Typography/Typography.js";
|
|
9
10
|
import { M as MenuItem } from "../../../mui_extended/MenuItem/MenuItem.js";
|
|
10
|
-
const ContentGroups = () => {
|
|
11
|
+
const ContentGroups = (props) => {
|
|
12
|
+
const { size } = props;
|
|
11
13
|
const { menuData } = useSideBar();
|
|
12
14
|
const { getLabel } = useModuleDictionary();
|
|
15
|
+
const { currentSize } = useComponentSize(size);
|
|
13
16
|
const ownerState = {
|
|
14
17
|
noItems: menuData.length === 0
|
|
15
18
|
};
|
|
16
19
|
const renderTitle = (title) => {
|
|
17
|
-
return /* @__PURE__ */ jsx(
|
|
20
|
+
return /* @__PURE__ */ jsx(ContainerContentTitleStyled, { ownerState: {}, children: /* @__PURE__ */ jsx(Typography, { variant: "bodyDens", skeletonWidth: "100px", children: title }) });
|
|
18
21
|
};
|
|
19
22
|
const renderItems = (item) => {
|
|
20
|
-
return /* @__PURE__ */ jsx(ContainerContentNavItemsStyled, { ownerState: {}, children: item?.map((list, id) => /* @__PURE__ */ jsx(ContainerMenuItemsMain, { item: list, openSubItem: true }, id)) });
|
|
23
|
+
return /* @__PURE__ */ jsx(ContainerContentNavItemsStyled, { ownerState: {}, children: item?.map((list, id) => /* @__PURE__ */ jsx(ContainerMenuItemsMain, { item: list, openSubItem: true, size: currentSize }, id)) });
|
|
21
24
|
};
|
|
22
25
|
const renderItemsDisabled = () => {
|
|
23
|
-
return /* @__PURE__ */ jsx(
|
|
26
|
+
return /* @__PURE__ */ jsx(ContainerContentTitleStyled, { ownerState: { disabled: true }, children: Array.from({ length: 1 }).map((_, index) => /* @__PURE__ */ jsx(
|
|
24
27
|
MenuItem,
|
|
25
28
|
{
|
|
26
29
|
disabled: true,
|
|
@@ -36,10 +36,13 @@ const contentGroupStyles = {
|
|
|
36
36
|
* @updatedAt 2024-12-10 11:21:21 - automatic
|
|
37
37
|
* @updatedUser Andrés Quintero - automatic
|
|
38
38
|
*/
|
|
39
|
-
containerContentTitle: ({ theme }) => ({
|
|
39
|
+
containerContentTitle: ({ theme, ownerState }) => ({
|
|
40
40
|
padding: `${theme.vars.size.baseSpacings.sp3} ${theme.vars.size.baseSpacings.sp4} ${theme.vars.size.baseSpacings.sp1}`,
|
|
41
41
|
color: theme.vars.palette.text.primary,
|
|
42
|
-
textAlign: "left"
|
|
42
|
+
textAlign: "left",
|
|
43
|
+
"& .MuiTypography-root": {
|
|
44
|
+
color: !ownerState.disabled ? theme.vars.palette.text.primary : `${theme.vars.palette.text.primary} !important`
|
|
45
|
+
}
|
|
43
46
|
}),
|
|
44
47
|
/**
|
|
45
48
|
* Navigation wrapper for every principal item group in the sidebar
|
|
@@ -51,7 +54,8 @@ const contentGroupStyles = {
|
|
|
51
54
|
containerContentNavItems: ({ theme }) => ({
|
|
52
55
|
display: "flex",
|
|
53
56
|
flexDirection: "column",
|
|
54
|
-
gap: theme.vars.size.baseSpacings["sp0-5"]
|
|
57
|
+
gap: theme.vars.size.baseSpacings["sp0-5"],
|
|
58
|
+
marginRight: theme.vars.size.baseSpacings.sp4
|
|
55
59
|
}),
|
|
56
60
|
/**
|
|
57
61
|
*Container for the items in the sidebar group
|
package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/index.js
CHANGED
|
@@ -9,17 +9,23 @@ import { g as getNameDataTestId } from "../../../../tests/utils.js";
|
|
|
9
9
|
import { A as ArrowIcon } from "./subcomponents/ArrowIcon/index.js";
|
|
10
10
|
import { e as ContainerMenuItemsStyled } from "../../../../slots/SideBarSlots.js";
|
|
11
11
|
import { g as getComponentSlotRoot } from "../../../../../../utils/getComponentSlotRoot.js";
|
|
12
|
-
import { L as LIST_MENU_ITEM } from "../../../../constants.js";
|
|
12
|
+
import { I as ITEM_ACTIVE, a as ITEM_IN_TREE_ACTIVE, P as PATH_ICONS, L as LIST_MENU_ITEM } from "../../../../constants.js";
|
|
13
|
+
import { useEnvironment } from "@m4l/core";
|
|
14
|
+
import { u as useComponentSize } from "../../../../../../hooks/useComponentSize/useComponentSize.js";
|
|
13
15
|
import { M as MenuItem } from "../../../../../mui_extended/MenuItem/MenuItem.js";
|
|
14
16
|
function ContainerMenuItemsMain(props) {
|
|
15
|
-
const { item } = props;
|
|
17
|
+
const { item, size } = props;
|
|
16
18
|
const { onMenuItemClick, onToggleVisible } = useSideBar();
|
|
17
19
|
const [openSub, setOpenSub] = useState(props.openSubItem ?? false);
|
|
18
20
|
const hasChildren = item.children && Array.isArray(item.children) && item.children.length > 0;
|
|
19
21
|
const isMobile = useIsMobile();
|
|
22
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
23
|
+
const { currentSize } = useComponentSize(size);
|
|
24
|
+
const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
|
|
20
25
|
const ownerState = {
|
|
21
26
|
active: item.active,
|
|
22
|
-
itemInTreeActive: item.itemInTreeActive
|
|
27
|
+
itemInTreeActive: item.itemInTreeActive,
|
|
28
|
+
sidebarSize: adjustedSize
|
|
23
29
|
};
|
|
24
30
|
const handlerClick = () => {
|
|
25
31
|
if (item.moduleId) {
|
|
@@ -42,15 +48,16 @@ function ContainerMenuItemsMain(props) {
|
|
|
42
48
|
/* @__PURE__ */ jsx(
|
|
43
49
|
MenuItem,
|
|
44
50
|
{
|
|
45
|
-
className: clsx(item.active ?
|
|
51
|
+
className: clsx(item.active ? ITEM_ACTIVE : ITEM_IN_TREE_ACTIVE),
|
|
46
52
|
label: item.title,
|
|
47
53
|
selected: item.active || item.itemInTreeActive,
|
|
48
|
-
startIcon: item.iconUrl
|
|
54
|
+
startIcon: `${host_static_assets}/${environment_assets}${PATH_ICONS}${item.iconUrl}`,
|
|
49
55
|
endIcon: hasChildren ? /* @__PURE__ */ jsx(ArrowIcon, { openState: openSub, active: item.active }) : null,
|
|
50
|
-
onClick: handlerClick
|
|
56
|
+
onClick: handlerClick,
|
|
57
|
+
size: adjustedSize
|
|
51
58
|
}
|
|
52
59
|
),
|
|
53
|
-
hasChildren ? /* @__PURE__ */ jsx(Collapse, { in: openSub, timeout: "auto", unmountOnExit: true, children: (item.children || []).map((child) => /* @__PURE__ */ jsx(ContainerMenuItemsMain, { item: child }, child.title)) }) : null
|
|
60
|
+
hasChildren ? /* @__PURE__ */ jsx(Collapse, { in: openSub, timeout: "auto", unmountOnExit: true, children: (item.children || []).map((child) => /* @__PURE__ */ jsx(ContainerMenuItemsMain, { item: child, size: adjustedSize }, child.title)) }) : null
|
|
54
61
|
]
|
|
55
62
|
}
|
|
56
63
|
);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { a as ITEM_IN_TREE_ACTIVE, I as ITEM_ACTIVE } from "../../../../constants.js";
|
|
1
2
|
const containerMenuItemsMainStyles = {
|
|
2
3
|
/**
|
|
3
4
|
* Style aplicado al contenedor de los items del menú
|
|
@@ -6,21 +7,39 @@ const containerMenuItemsMainStyles = {
|
|
|
6
7
|
* @updatedAt 2024-12-10 11:21:21 - automatic
|
|
7
8
|
* @updatedUser Andrés Quintero - automatic
|
|
8
9
|
*/
|
|
9
|
-
containerMenuItems: ({ theme }) => ({
|
|
10
|
+
containerMenuItems: ({ theme, ownerState }) => ({
|
|
10
11
|
marginLeft: theme.vars.size.baseSpacings.sp4,
|
|
11
|
-
/* padding: `${theme.vars.size.baseSpacings['sp0-5']} 0`, */
|
|
12
12
|
display: "flex",
|
|
13
13
|
flexDirection: "column",
|
|
14
14
|
gap: theme.vars.size.baseSpacings["sp0-5"],
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
"& .M4LMenuItem-menuItemContainer": {
|
|
16
|
+
// Estilos específicos para el tamaño small
|
|
17
|
+
...ownerState.sidebarSize === "small" && {
|
|
18
|
+
...theme.generalSettings.isMobile ? {
|
|
19
|
+
minHeight: theme.vars.size.mobile.small.action
|
|
20
|
+
} : {
|
|
21
|
+
minHeight: theme.vars.size.desktop.small.action
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
// Estilos específicos para el tamaño medium
|
|
25
|
+
...ownerState.sidebarSize === "medium" && {
|
|
26
|
+
...theme.generalSettings.isMobile ? {
|
|
27
|
+
minHeight: theme.vars.size.mobile.medium.action
|
|
28
|
+
} : {
|
|
29
|
+
minHeight: theme.vars.size.desktop.medium.action
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
[`&.M4LListMenuItem-root > .M4LMenuItemRoot[class*="${ITEM_IN_TREE_ACTIVE}"]`]: {
|
|
17
34
|
borderColor: theme.vars.palette.divider,
|
|
18
35
|
"& span": {
|
|
19
36
|
color: theme.vars.palette.text.primary
|
|
20
37
|
}
|
|
21
38
|
},
|
|
22
|
-
|
|
23
|
-
|
|
39
|
+
[`&.M4LListMenuItem-root > .M4LMenuItemRoot[class*="${ITEM_IN_TREE_ACTIVE}"] .M4LIconClass-root`]: {
|
|
40
|
+
background: theme.vars.palette.text.primary
|
|
41
|
+
},
|
|
42
|
+
[`&.M4LListMenuItem-root > .M4LMenuItemRoot[class*="${ITEM_ACTIVE}"]`]: {
|
|
24
43
|
borderColor: theme.vars.palette.primary.main,
|
|
25
44
|
"& span": {
|
|
26
45
|
color: theme.vars.palette.primary.main
|
|
@@ -42,7 +61,8 @@ const containerMenuItemsMainStyles = {
|
|
|
42
61
|
containerArrowIconRoot: () => ({
|
|
43
62
|
display: "flex",
|
|
44
63
|
alignSelf: "center",
|
|
45
|
-
lineHeight: 0
|
|
64
|
+
lineHeight: 0,
|
|
65
|
+
marginLeft: "auto"
|
|
46
66
|
})
|
|
47
67
|
};
|
|
48
68
|
export {
|
|
@@ -2,9 +2,9 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEnvironment } from "@m4l/core";
|
|
3
3
|
import { T as TEST_PROP_ID } from "../../../../../../../../test/constants_no_mock.js";
|
|
4
4
|
import { g as getNameDataTestId } from "../../../../../../tests/utils.js";
|
|
5
|
-
import {
|
|
5
|
+
import { b as PATH_ARROW_DOWN_ICON } from "../../../../../../constants.js";
|
|
6
6
|
import { f as ContainerArrowIconRootStyled } from "../../../../../../slots/SideBarSlots.js";
|
|
7
|
-
import { I as
|
|
7
|
+
import { I as IconButton } from "../../../../../../../mui_extended/IconButton/IconButton.js";
|
|
8
8
|
function ArrowIcon(props) {
|
|
9
9
|
const { openState, active } = props;
|
|
10
10
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
@@ -14,11 +14,11 @@ function ArrowIcon(props) {
|
|
|
14
14
|
ownerState: {},
|
|
15
15
|
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("arrowIconRoot") } : {},
|
|
16
16
|
children: /* @__PURE__ */ jsx(
|
|
17
|
-
|
|
17
|
+
IconButton,
|
|
18
18
|
{
|
|
19
19
|
src: `${host_static_assets}/${environment_assets}/${PATH_ARROW_DOWN_ICON}`,
|
|
20
20
|
rotationAngle: openState ? 270 : 90,
|
|
21
|
-
|
|
21
|
+
componentPaletteColor: active ? "primary" : "default"
|
|
22
22
|
}
|
|
23
23
|
)
|
|
24
24
|
}
|
|
@@ -7,6 +7,7 @@ const footerSideBarStyles = {
|
|
|
7
7
|
* @updatedUser Andrés Quintero - automatic
|
|
8
8
|
*/
|
|
9
9
|
containerFooter: ({ theme, ownerState }) => ({
|
|
10
|
+
height: "auto",
|
|
10
11
|
display: "grid",
|
|
11
12
|
placeItems: "center",
|
|
12
13
|
padding: `${theme.vars.size.baseSpacings.sp4} ${theme.vars.size.baseSpacings.sp12}`,
|
|
@@ -2,7 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEnvironment } from "@m4l/core";
|
|
3
3
|
import { u as useSideBar } from "../../hooks/useSideBar/index.js";
|
|
4
4
|
import { j as ContainerDesktopContentStyled, k as ContainerDesktopRootStyled, l as ContainerBtnAnchoredStyled } from "../../slots/SideBarSlots.js";
|
|
5
|
-
import {
|
|
5
|
+
import { c as PATH_ARROW_RIGHT_ICON, S as SIDEBAR_KEY_COMPONENT, C as CONTAINER_BTN_ANCHORED } from "../../constants.js";
|
|
6
6
|
import { C as ContentComponent } from "../ContentComponent/index.js";
|
|
7
7
|
import { useState, useEffect } from "react";
|
|
8
8
|
import { useFirstRender } from "@m4l/graphics";
|
|
@@ -7,5 +7,7 @@ import { MarkerClusterGroupProps } from './types';
|
|
|
7
7
|
* @author Juan Andrés Escobar
|
|
8
8
|
* @createdAt 2024/02/22
|
|
9
9
|
* @returns ForwardRefExoticComponent (significa que es un componente que ha sido envuelto con React.forwardRef.).
|
|
10
|
+
* @updatedAt 2024-12-20 16:44:24 - automatic
|
|
11
|
+
* @updatedUser Andrés Quintero - automatic
|
|
10
12
|
*/
|
|
11
13
|
export declare const MarkerClusterGroup: import('react').ForwardRefExoticComponent<L.MarkerClusterGroupOptions & import('@react-leaflet/core').PathProps & import('./types').PropsWithChildren & import('react').RefAttributes<MarkerClusterGroupProps>>;
|
|
@@ -7,7 +7,7 @@ import { ButtonProps } from './types';
|
|
|
7
7
|
* @returns
|
|
8
8
|
* @author SebastianM - automatic
|
|
9
9
|
* @createdAt 2024-11-06 07:42:00 - automatic
|
|
10
|
-
* @updatedAt 2024-12-
|
|
11
|
-
* @updatedUser
|
|
10
|
+
* @updatedAt 2024-12-20 16:44:24 - automatic
|
|
11
|
+
* @updatedUser Andrés Quintero - automatic
|
|
12
12
|
*/
|
|
13
13
|
export declare const Button: import('react').ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -23,6 +23,7 @@ const IconButton = (props) => {
|
|
|
23
23
|
componentPaletteColor = "default",
|
|
24
24
|
selected = false,
|
|
25
25
|
icon,
|
|
26
|
+
rotationAngle,
|
|
26
27
|
...other
|
|
27
28
|
} = props;
|
|
28
29
|
const classRoot = getComponentSlotRoot(ICON_BUTTON_KEY_COMPONENT);
|
|
@@ -62,7 +63,8 @@ const IconButton = (props) => {
|
|
|
62
63
|
src,
|
|
63
64
|
size: adjustedSize,
|
|
64
65
|
color: iconColor,
|
|
65
|
-
disabled
|
|
66
|
+
disabled,
|
|
67
|
+
rotationAngle
|
|
66
68
|
}
|
|
67
69
|
);
|
|
68
70
|
}
|
|
@@ -3,9 +3,10 @@ import { createElement } from "react";
|
|
|
3
3
|
import { useModuleSkeleton, getPropertyByString } from "@m4l/core";
|
|
4
4
|
import { useTheme } from "@mui/material";
|
|
5
5
|
import clsx from "clsx";
|
|
6
|
-
import { g as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.js";
|
|
6
|
+
import { a as getComponentClasses, g as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.js";
|
|
7
7
|
import { M as MENUITEM_KEY_COMPONENT } from "./constants.js";
|
|
8
8
|
import { M as MenuItemSkeletonStyled, a as MenuItemRootStyled, b as MenuItemIconCheckedStyled, c as MenuItemContainerStyled, d as MenuItemTypographyStyled, e as MenuItemIconStyled } from "./slots/MenuItemSlots.js";
|
|
9
|
+
import { M as MenuItemSlots } from "./slots/MenuItemEnum.js";
|
|
9
10
|
import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
|
|
10
11
|
const MenuItem = (props) => {
|
|
11
12
|
const {
|
|
@@ -20,6 +21,7 @@ const MenuItem = (props) => {
|
|
|
20
21
|
disabled = false,
|
|
21
22
|
size = "medium",
|
|
22
23
|
checked = false,
|
|
24
|
+
className,
|
|
23
25
|
...other
|
|
24
26
|
} = props;
|
|
25
27
|
const { currentSize } = useComponentSize(size);
|
|
@@ -38,6 +40,7 @@ const MenuItem = (props) => {
|
|
|
38
40
|
paletteColor,
|
|
39
41
|
color
|
|
40
42
|
};
|
|
43
|
+
const classes = getComponentClasses(MENUITEM_KEY_COMPONENT, MenuItemSlots);
|
|
41
44
|
if (isSkeleton) {
|
|
42
45
|
return /* @__PURE__ */ jsx(
|
|
43
46
|
MenuItemSkeletonStyled,
|
|
@@ -48,7 +51,7 @@ const MenuItem = (props) => {
|
|
|
48
51
|
}
|
|
49
52
|
);
|
|
50
53
|
}
|
|
51
|
-
const renderIcon = (icon, instaceDataTestId,
|
|
54
|
+
const renderIcon = (icon, instaceDataTestId, iconClassName) => {
|
|
52
55
|
if (!icon) {
|
|
53
56
|
return null;
|
|
54
57
|
}
|
|
@@ -64,14 +67,13 @@ const MenuItem = (props) => {
|
|
|
64
67
|
size: adjustedSize,
|
|
65
68
|
disabled,
|
|
66
69
|
instaceDataTestId,
|
|
67
|
-
className
|
|
70
|
+
className: iconClassName
|
|
68
71
|
}
|
|
69
72
|
);
|
|
70
73
|
}
|
|
71
74
|
};
|
|
72
75
|
const checkedIcon = "https://s3.us-east-1.amazonaws.com/static.made4labs/environments/d1/frontend/components/menu_item/checked.svg";
|
|
73
76
|
const hasCheckedIcon = checked && checkedIcon;
|
|
74
|
-
const classRoot = getComponentSlotRoot(MENUITEM_KEY_COMPONENT);
|
|
75
77
|
return /* @__PURE__ */ createElement(
|
|
76
78
|
MenuItemRootStyled,
|
|
77
79
|
{
|
|
@@ -81,17 +83,18 @@ const MenuItem = (props) => {
|
|
|
81
83
|
ownerState: { ...ownerState },
|
|
82
84
|
disabled,
|
|
83
85
|
disableRipple: true,
|
|
84
|
-
className: clsx("M4LMenuItemRoot",
|
|
86
|
+
className: clsx("M4LMenuItemRoot", classes.root, className),
|
|
85
87
|
"data-testid": "MenuItemRoot"
|
|
86
88
|
},
|
|
87
89
|
hasCheckedIcon && /* @__PURE__ */ jsx(
|
|
88
90
|
MenuItemIconCheckedStyled,
|
|
89
91
|
{
|
|
90
92
|
src: checkedIcon,
|
|
91
|
-
ownerState: { ...ownerState }
|
|
93
|
+
ownerState: { ...ownerState },
|
|
94
|
+
className: classes.menuItemIconChecked
|
|
92
95
|
}
|
|
93
96
|
),
|
|
94
|
-
/* @__PURE__ */ jsxs(MenuItemContainerStyled, { ownerState: { ...ownerState }, children: [
|
|
97
|
+
/* @__PURE__ */ jsxs(MenuItemContainerStyled, { ownerState: { ...ownerState }, className: classes.menuItemContainer, children: [
|
|
95
98
|
renderIcon(startIcon, "MenuItemStartIcon", getComponentSlotRoot("MenuItemStartIcon")),
|
|
96
99
|
/* @__PURE__ */ jsx(
|
|
97
100
|
MenuItemTypographyStyled,
|
|
@@ -100,6 +103,7 @@ const MenuItem = (props) => {
|
|
|
100
103
|
variant: "body",
|
|
101
104
|
size: adjustedSize,
|
|
102
105
|
"data-testid": "MenuItemLabel",
|
|
106
|
+
className: classes.menuItemTypography,
|
|
103
107
|
children: label
|
|
104
108
|
}
|
|
105
109
|
),
|
|
@@ -12,6 +12,7 @@ const menuItemStyles = {
|
|
|
12
12
|
*/
|
|
13
13
|
menuItemRoot: ({ theme, ownerState }) => ({
|
|
14
14
|
width: "100%",
|
|
15
|
+
height: "auto",
|
|
15
16
|
gap: theme.vars.size.baseSpacings.sp3,
|
|
16
17
|
padding: theme.vars.size.baseSpacings.sp1,
|
|
17
18
|
borderRadius: theme.vars.size.borderRadius.r0,
|
|
@@ -71,20 +72,16 @@ const menuItemStyles = {
|
|
|
71
72
|
// Estilos específicos para el tamaño small
|
|
72
73
|
...ownerState.size === "small" && {
|
|
73
74
|
...theme.generalSettings.isMobile ? {
|
|
74
|
-
height: theme.vars.size.mobile.small.action,
|
|
75
75
|
minHeight: theme.vars.size.mobile.small.action
|
|
76
76
|
} : {
|
|
77
|
-
height: theme.vars.size.desktop.small.action,
|
|
78
77
|
minHeight: theme.vars.size.desktop.small.action
|
|
79
78
|
}
|
|
80
79
|
},
|
|
81
80
|
// Estilos específicos para el tamaño medium
|
|
82
81
|
...ownerState.size === "medium" && {
|
|
83
82
|
...theme.generalSettings.isMobile ? {
|
|
84
|
-
height: theme.vars.size.mobile.medium.action,
|
|
85
83
|
minHeight: theme.vars.size.mobile.medium.action
|
|
86
84
|
} : {
|
|
87
|
-
height: theme.vars.size.desktop.medium.action,
|
|
88
85
|
minHeight: theme.vars.size.desktop.medium.action
|
|
89
86
|
}
|
|
90
87
|
}
|
|
@@ -130,7 +127,7 @@ const menuItemStyles = {
|
|
|
130
127
|
display: "flex",
|
|
131
128
|
alignItems: "center",
|
|
132
129
|
width: "100%",
|
|
133
|
-
gap: theme.vars.size.baseSpacings
|
|
130
|
+
gap: theme.vars.size.baseSpacings.sp1
|
|
134
131
|
}),
|
|
135
132
|
/**
|
|
136
133
|
* Estilos para el contenedor de los items del menú en skeleton
|
|
@@ -149,21 +146,21 @@ const menuItemStyles = {
|
|
|
149
146
|
// Estilos específicos para el tamaño small
|
|
150
147
|
...ownerState.size === "small" && {
|
|
151
148
|
...theme.generalSettings.isMobile ? {
|
|
152
|
-
height: theme.vars.size.mobile.small.action
|
|
153
|
-
minHeight: theme.vars.size.mobile.small.action
|
|
149
|
+
height: `${theme.vars.size.mobile.small.action}!important`,
|
|
150
|
+
minHeight: `${theme.vars.size.mobile.small.action}!important`
|
|
154
151
|
} : {
|
|
155
|
-
height: theme.vars.size.desktop.small.action
|
|
156
|
-
minHeight: theme.vars.size.desktop.small.action
|
|
152
|
+
height: `${theme.vars.size.desktop.small.action}!important`,
|
|
153
|
+
minHeight: `${theme.vars.size.desktop.small.action}!important`
|
|
157
154
|
}
|
|
158
155
|
},
|
|
159
156
|
// Estilos específicos para el tamaño medium
|
|
160
157
|
...ownerState.size === "medium" && {
|
|
161
158
|
...theme.generalSettings.isMobile ? {
|
|
162
|
-
height: theme.vars.size.mobile.medium.action
|
|
163
|
-
minHeight: theme.vars.size.mobile.medium.action
|
|
159
|
+
height: `${theme.vars.size.mobile.medium.action}!important`,
|
|
160
|
+
minHeight: `${theme.vars.size.mobile.medium.action}!important`
|
|
164
161
|
} : {
|
|
165
|
-
height: theme.vars.size.desktop.medium.action
|
|
166
|
-
minHeight: theme.vars.size.desktop.medium.action
|
|
162
|
+
height: `${theme.vars.size.desktop.medium.action}!important`,
|
|
163
|
+
minHeight: `${theme.vars.size.desktop.medium.action}!important`
|
|
167
164
|
}
|
|
168
165
|
}
|
|
169
166
|
})
|
|
@@ -5,8 +5,8 @@ const toggleButtonStyles = {
|
|
|
5
5
|
* @param ownerState - The owner state of the Toggle Button.
|
|
6
6
|
* @author cesar - automatic
|
|
7
7
|
* @createdAt 2024-12-12 10:02:53 - automatic
|
|
8
|
-
* @updatedAt 2024-12-
|
|
9
|
-
* @updatedUser
|
|
8
|
+
* @updatedAt 2024-12-20 16:44:24 - automatic
|
|
9
|
+
* @updatedUser Andrés Quintero - automatic
|
|
10
10
|
*/
|
|
11
11
|
toggleButtonRoot: ({ theme, ownerState }) => {
|
|
12
12
|
const innerShadow = ownerState?.variant === "contained" ? theme.vars.customShadows.innerShadowContainer : ownerState?.variant === "outlined" ? theme.vars.customShadows.innerShadowOutlinedText : theme.vars.customShadows.innerShadowText;
|
|
@@ -35,146 +35,146 @@ const typographyStyles = {
|
|
|
35
35
|
...ownerState.typographySize === "small" && {
|
|
36
36
|
// mobile - »small - »variant (h1) 💅
|
|
37
37
|
...ownerState.typographyVariant === "h1" && {
|
|
38
|
-
fontSize: theme.
|
|
39
|
-
fontWeight: theme.
|
|
40
|
-
lineHeight: theme.
|
|
41
|
-
letterSpacing: theme.
|
|
38
|
+
fontSize: theme.size.typography.mobile.small.h1.fontSize,
|
|
39
|
+
fontWeight: theme.size.typography.mobile.small.h1.weight,
|
|
40
|
+
lineHeight: theme.size.typography.mobile.small.h1.lineHeight,
|
|
41
|
+
letterSpacing: theme.size.typography.mobile.small.h1.letterSpacing
|
|
42
42
|
},
|
|
43
43
|
// mobile - »small - »variant (h2) 💅
|
|
44
44
|
...ownerState.typographyVariant === "h2" && {
|
|
45
|
-
fontSize: theme.
|
|
46
|
-
fontWeight: theme.
|
|
47
|
-
lineHeight: theme.
|
|
48
|
-
letterSpacing: theme.
|
|
45
|
+
fontSize: theme.size.typography.mobile.small.h2.fontSize,
|
|
46
|
+
fontWeight: theme.size.typography.mobile.small.h2.weight,
|
|
47
|
+
lineHeight: theme.size.typography.mobile.small.h2.lineHeight,
|
|
48
|
+
letterSpacing: theme.size.typography.mobile.small.h2.letterSpacing
|
|
49
49
|
},
|
|
50
50
|
// mobile - »small - »variant (h3) 💅
|
|
51
51
|
...ownerState.typographyVariant === "h3" && {
|
|
52
|
-
fontSize: theme.
|
|
53
|
-
fontWeight: theme.
|
|
54
|
-
lineHeight: theme.
|
|
55
|
-
letterSpacing: theme.
|
|
52
|
+
fontSize: theme.size.typography.mobile.small.h3.fontSize,
|
|
53
|
+
fontWeight: theme.size.typography.mobile.small.h3.weight,
|
|
54
|
+
lineHeight: theme.size.typography.mobile.small.h3.lineHeight,
|
|
55
|
+
letterSpacing: theme.size.typography.mobile.small.h3.letterSpacing
|
|
56
56
|
},
|
|
57
57
|
// mobile - »small - »variant(h5) 💅
|
|
58
58
|
...ownerState.typographyVariant === "h5" && {
|
|
59
|
-
fontSize: theme.
|
|
60
|
-
fontWeight: theme.
|
|
61
|
-
lineHeight: theme.
|
|
62
|
-
letterSpacing: theme.
|
|
59
|
+
fontSize: theme.size.typography.mobile.small.h5.fontSize,
|
|
60
|
+
fontWeight: theme.size.typography.mobile.small.h5.weight,
|
|
61
|
+
lineHeight: theme.size.typography.mobile.small.h5.lineHeight,
|
|
62
|
+
letterSpacing: theme.size.typography.mobile.small.h5.letterSpacing
|
|
63
63
|
},
|
|
64
64
|
// mobile - »small - »variant (subtitle) 💅
|
|
65
65
|
...ownerState.typographyVariant === "subtitle" && {
|
|
66
|
-
fontSize: theme.
|
|
67
|
-
fontWeight: theme.
|
|
68
|
-
lineHeight: theme.
|
|
69
|
-
letterSpacing: theme.
|
|
66
|
+
fontSize: theme.size.typography.mobile.small.subtitle.fontSize,
|
|
67
|
+
fontWeight: theme.size.typography.mobile.small.subtitle.weight,
|
|
68
|
+
lineHeight: theme.size.typography.mobile.small.subtitle.lineHeight,
|
|
69
|
+
letterSpacing: theme.size.typography.mobile.small.subtitle.letterSpacing
|
|
70
70
|
},
|
|
71
71
|
// mobile - »small - »variant (subtitleDens) 💅
|
|
72
72
|
...ownerState.typographyVariant === "subtitleDens" && {
|
|
73
|
-
fontSize: theme.
|
|
74
|
-
fontWeight: theme.
|
|
75
|
-
lineHeight: theme.
|
|
76
|
-
letterSpacing: theme.
|
|
73
|
+
fontSize: theme.size.typography.mobile.small.subtitleDens.fontSize,
|
|
74
|
+
fontWeight: theme.size.typography.mobile.small.subtitleDens.weight,
|
|
75
|
+
lineHeight: theme.size.typography.mobile.small.subtitleDens.lineHeight,
|
|
76
|
+
letterSpacing: theme.size.typography.mobile.small.subtitleDens.letterSpacing
|
|
77
77
|
},
|
|
78
78
|
// mobile - »small - »variant (paragraph) 💅
|
|
79
79
|
...ownerState.typographyVariant === "paragraph" && {
|
|
80
|
-
fontSize: theme.
|
|
81
|
-
fontWeight: theme.
|
|
82
|
-
lineHeight: theme.
|
|
83
|
-
letterSpacing: theme.
|
|
80
|
+
fontSize: theme.size.typography.mobile.small.paragraph.fontSize,
|
|
81
|
+
fontWeight: theme.size.typography.mobile.small.paragraph.weight,
|
|
82
|
+
lineHeight: theme.size.typography.mobile.small.paragraph.lineHeight,
|
|
83
|
+
letterSpacing: theme.size.typography.mobile.small.paragraph.letterSpacing
|
|
84
84
|
},
|
|
85
85
|
// mobile - »small - »variant (paragraphDens) 💅
|
|
86
86
|
...ownerState.typographyVariant === "paragraphDens" && {
|
|
87
|
-
fontSize: theme.
|
|
88
|
-
fontWeight: theme.
|
|
89
|
-
lineHeight: theme.
|
|
90
|
-
letterSpacing: theme.
|
|
87
|
+
fontSize: theme.size.typography.mobile.small.paragraphDens.fontSize,
|
|
88
|
+
fontWeight: theme.size.typography.mobile.small.paragraphDens.weight,
|
|
89
|
+
lineHeight: theme.size.typography.mobile.small.paragraphDens.lineHeight,
|
|
90
|
+
letterSpacing: theme.size.typography.mobile.small.paragraphDens.letterSpacing
|
|
91
91
|
},
|
|
92
92
|
// mobile - »small - »variant (body) 💅
|
|
93
93
|
...ownerState.typographyVariant === "body" && {
|
|
94
|
-
fontSize: theme.
|
|
95
|
-
fontWeight: theme.
|
|
96
|
-
lineHeight: theme.
|
|
97
|
-
letterSpacing: theme.
|
|
94
|
+
fontSize: theme.size.typography.mobile.small.body.fontSize,
|
|
95
|
+
fontWeight: theme.size.typography.mobile.small.body.weight,
|
|
96
|
+
lineHeight: theme.size.typography.mobile.small.body.lineHeight,
|
|
97
|
+
letterSpacing: theme.size.typography.mobile.small.body.letterSpacing
|
|
98
98
|
},
|
|
99
99
|
// mobile - »small - »variant (bodyDens) 💅
|
|
100
100
|
...ownerState.typographyVariant === "body" && {
|
|
101
|
-
fontSize: theme.
|
|
102
|
-
fontWeight: theme.
|
|
103
|
-
lineHeight: theme.
|
|
104
|
-
letterSpacing: theme.
|
|
101
|
+
fontSize: theme.size.typography.mobile.small.bodyDens.fontSize,
|
|
102
|
+
fontWeight: theme.size.typography.mobile.small.bodyDens.weight,
|
|
103
|
+
lineHeight: theme.size.typography.mobile.small.bodyDens.lineHeight,
|
|
104
|
+
letterSpacing: theme.size.typography.mobile.small.bodyDens.letterSpacing
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
// mobile - »medium - 👑 Predeterminado
|
|
108
108
|
...ownerState.typographySize === "medium" && {
|
|
109
109
|
// mobile - medium - »variant (h1) 💅
|
|
110
110
|
...ownerState.typographyVariant === "h1" && {
|
|
111
|
-
fontSize: theme.
|
|
112
|
-
fontWeight: theme.
|
|
113
|
-
lineHeight: theme.
|
|
114
|
-
letterSpacing: theme.
|
|
111
|
+
fontSize: theme.size.typography.mobile.medium.h1.fontSize,
|
|
112
|
+
fontWeight: theme.size.typography.mobile.medium.h1.weight,
|
|
113
|
+
lineHeight: theme.size.typography.mobile.medium.h1.lineHeight,
|
|
114
|
+
letterSpacing: theme.size.typography.mobile.medium.h1.letterSpacing
|
|
115
115
|
},
|
|
116
116
|
// mobile - medium - »variant (h2) 💅
|
|
117
117
|
...ownerState.typographyVariant === "h2" && {
|
|
118
|
-
fontSize: theme.
|
|
119
|
-
fontWeight: theme.
|
|
120
|
-
lineHeight: theme.
|
|
121
|
-
letterSpacing: theme.
|
|
118
|
+
fontSize: theme.size.typography.mobile.medium.h2.fontSize,
|
|
119
|
+
fontWeight: theme.size.typography.mobile.medium.h2.weight,
|
|
120
|
+
lineHeight: theme.size.typography.mobile.medium.h2.lineHeight,
|
|
121
|
+
letterSpacing: theme.size.typography.mobile.medium.h2.letterSpacing
|
|
122
122
|
},
|
|
123
123
|
// mobile - medium - »variant (h3) 💅
|
|
124
124
|
...ownerState.typographyVariant === "h3" && {
|
|
125
|
-
fontSize: theme.
|
|
126
|
-
fontWeight: theme.
|
|
127
|
-
lineHeight: theme.
|
|
128
|
-
letterSpacing: theme.
|
|
125
|
+
fontSize: theme.size.typography.mobile.medium.h3.fontSize,
|
|
126
|
+
fontWeight: theme.size.typography.mobile.medium.h3.weight,
|
|
127
|
+
lineHeight: theme.size.typography.mobile.medium.h3.lineHeight,
|
|
128
|
+
letterSpacing: theme.size.typography.mobile.medium.h3.letterSpacing
|
|
129
129
|
},
|
|
130
130
|
// mobile - medium - »variant(h5) 💅
|
|
131
131
|
...ownerState.typographyVariant === "h5" && {
|
|
132
|
-
fontSize: theme.
|
|
133
|
-
fontWeight: theme.
|
|
134
|
-
lineHeight: theme.
|
|
135
|
-
letterSpacing: theme.
|
|
132
|
+
fontSize: theme.size.typography.mobile.medium.h5.fontSize,
|
|
133
|
+
fontWeight: theme.size.typography.mobile.medium.h5.weight,
|
|
134
|
+
lineHeight: theme.size.typography.mobile.medium.h5.lineHeight,
|
|
135
|
+
letterSpacing: theme.size.typography.mobile.medium.h5.letterSpacing
|
|
136
136
|
},
|
|
137
137
|
// mobile - medium - »variant (subtitle) 💅
|
|
138
138
|
...ownerState.typographyVariant === "subtitle" && {
|
|
139
|
-
fontSize: theme.
|
|
140
|
-
fontWeight: theme.
|
|
141
|
-
lineHeight: theme.
|
|
142
|
-
letterSpacing: theme.
|
|
139
|
+
fontSize: theme.size.typography.mobile.medium.subtitle.fontSize,
|
|
140
|
+
fontWeight: theme.size.typography.mobile.medium.subtitle.weight,
|
|
141
|
+
lineHeight: theme.size.typography.mobile.medium.subtitle.lineHeight,
|
|
142
|
+
letterSpacing: theme.size.typography.mobile.medium.subtitle.letterSpacing
|
|
143
143
|
},
|
|
144
144
|
// mobile - medium - »variant (subtitleDens) 💅
|
|
145
145
|
...ownerState.typographyVariant === "subtitleDens" && {
|
|
146
|
-
fontSize: theme.
|
|
147
|
-
fontWeight: theme.
|
|
148
|
-
lineHeight: theme.
|
|
149
|
-
letterSpacing: theme.
|
|
146
|
+
fontSize: theme.size.typography.mobile.medium.subtitleDens.fontSize,
|
|
147
|
+
fontWeight: theme.size.typography.mobile.medium.subtitleDens.weight,
|
|
148
|
+
lineHeight: theme.size.typography.mobile.medium.subtitleDens.lineHeight,
|
|
149
|
+
letterSpacing: theme.size.typography.mobile.medium.subtitleDens.letterSpacing
|
|
150
150
|
},
|
|
151
151
|
// mobile - medium - »variant (paragraph) 💅
|
|
152
152
|
...ownerState.typographyVariant === "paragraph" && {
|
|
153
|
-
fontSize: theme.
|
|
154
|
-
fontWeight: theme.
|
|
155
|
-
lineHeight: theme.
|
|
156
|
-
letterSpacing: theme.
|
|
153
|
+
fontSize: theme.size.typography.mobile.medium.paragraph.fontSize,
|
|
154
|
+
fontWeight: theme.size.typography.mobile.medium.paragraph.weight,
|
|
155
|
+
lineHeight: theme.size.typography.mobile.medium.paragraph.lineHeight,
|
|
156
|
+
letterSpacing: theme.size.typography.mobile.medium.paragraph.letterSpacing
|
|
157
157
|
},
|
|
158
158
|
// mobile - medium - »variant (paragraphDens) 💅
|
|
159
159
|
...ownerState.typographyVariant === "paragraphDens" && {
|
|
160
|
-
fontSize: theme.
|
|
161
|
-
fontWeight: theme.
|
|
162
|
-
lineHeight: theme.
|
|
163
|
-
letterSpacing: theme.
|
|
160
|
+
fontSize: theme.size.typography.mobile.medium.paragraphDens.fontSize,
|
|
161
|
+
fontWeight: theme.size.typography.mobile.medium.paragraphDens.weight,
|
|
162
|
+
lineHeight: theme.size.typography.mobile.medium.paragraphDens.lineHeight,
|
|
163
|
+
letterSpacing: theme.size.typography.mobile.medium.paragraphDens.letterSpacing
|
|
164
164
|
},
|
|
165
165
|
// mobile - medium - »variant (body) 💅
|
|
166
166
|
...ownerState.typographyVariant === "body" && {
|
|
167
|
-
fontSize: theme.
|
|
168
|
-
fontWeight: theme.
|
|
169
|
-
lineHeight: theme.
|
|
170
|
-
letterSpacing: theme.
|
|
167
|
+
fontSize: theme.size.typography.mobile.medium.body.fontSize,
|
|
168
|
+
fontWeight: theme.size.typography.mobile.medium.body.weight,
|
|
169
|
+
lineHeight: theme.size.typography.mobile.medium.body.lineHeight,
|
|
170
|
+
letterSpacing: theme.size.typography.mobile.medium.body.letterSpacing
|
|
171
171
|
},
|
|
172
172
|
// mobile - medium - »variant (bodyDens) 💅
|
|
173
173
|
...ownerState.typographyVariant === "body" && {
|
|
174
|
-
fontSize: theme.
|
|
175
|
-
fontWeight: theme.
|
|
176
|
-
lineHeight: theme.
|
|
177
|
-
letterSpacing: theme.
|
|
174
|
+
fontSize: theme.size.typography.mobile.medium.bodyDens.fontSize,
|
|
175
|
+
fontWeight: theme.size.typography.mobile.medium.bodyDens.weight,
|
|
176
|
+
lineHeight: theme.size.typography.mobile.medium.bodyDens.lineHeight,
|
|
177
|
+
letterSpacing: theme.size.typography.mobile.medium.bodyDens.letterSpacing
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
},
|
|
@@ -184,146 +184,146 @@ const typographyStyles = {
|
|
|
184
184
|
...ownerState.typographySize === "small" && {
|
|
185
185
|
// desktop - »small - »variant (h1) 💅
|
|
186
186
|
...ownerState.typographyVariant === "h1" && {
|
|
187
|
-
fontSize: theme.
|
|
188
|
-
fontWeight: theme.
|
|
189
|
-
lineHeight: theme.
|
|
190
|
-
letterSpacing: theme.
|
|
187
|
+
fontSize: theme.size.typography.desktop.small.h1.fontSize,
|
|
188
|
+
fontWeight: theme.size.typography.desktop.small.h1.weight,
|
|
189
|
+
lineHeight: theme.size.typography.desktop.small.h1.lineHeight,
|
|
190
|
+
letterSpacing: theme.size.typography.desktop.small.h1.letterSpacing
|
|
191
191
|
},
|
|
192
192
|
// desktop - »small - »variant (h2) 💅
|
|
193
193
|
...ownerState.typographyVariant === "h2" && {
|
|
194
|
-
fontSize: theme.
|
|
195
|
-
fontWeight: theme.
|
|
196
|
-
lineHeight: theme.
|
|
197
|
-
letterSpacing: theme.
|
|
194
|
+
fontSize: theme.size.typography.desktop.small.h2.fontSize,
|
|
195
|
+
fontWeight: theme.size.typography.desktop.small.h2.weight,
|
|
196
|
+
lineHeight: theme.size.typography.desktop.small.h2.lineHeight,
|
|
197
|
+
letterSpacing: theme.size.typography.desktop.small.h2.letterSpacing
|
|
198
198
|
},
|
|
199
199
|
// desktop - »small - »variant (h3) 💅
|
|
200
200
|
...ownerState.typographyVariant === "h3" && {
|
|
201
|
-
fontSize: theme.
|
|
202
|
-
fontWeight: theme.
|
|
203
|
-
lineHeight: theme.
|
|
204
|
-
letterSpacing: theme.
|
|
201
|
+
fontSize: theme.size.typography.desktop.small.h3.fontSize,
|
|
202
|
+
fontWeight: theme.size.typography.desktop.small.h3.weight,
|
|
203
|
+
lineHeight: theme.size.typography.desktop.small.h3.lineHeight,
|
|
204
|
+
letterSpacing: theme.size.typography.desktop.small.h3.letterSpacing
|
|
205
205
|
},
|
|
206
206
|
// desktop - »small - »variant(h5) 💅
|
|
207
207
|
...ownerState.typographyVariant === "h5" && {
|
|
208
|
-
fontSize: theme.
|
|
209
|
-
fontWeight: theme.
|
|
210
|
-
lineHeight: theme.
|
|
211
|
-
letterSpacing: theme.
|
|
208
|
+
fontSize: theme.size.typography.desktop.small.h5.fontSize,
|
|
209
|
+
fontWeight: theme.size.typography.desktop.small.h5.weight,
|
|
210
|
+
lineHeight: theme.size.typography.desktop.small.h5.lineHeight,
|
|
211
|
+
letterSpacing: theme.size.typography.desktop.small.h5.letterSpacing
|
|
212
212
|
},
|
|
213
213
|
// desktop - »small - »variant (subtitle) 💅
|
|
214
214
|
...ownerState.typographyVariant === "subtitle" && {
|
|
215
|
-
fontSize: theme.
|
|
216
|
-
fontWeight: theme.
|
|
217
|
-
lineHeight: theme.
|
|
218
|
-
letterSpacing: theme.
|
|
215
|
+
fontSize: theme.size.typography.desktop.small.subtitle.fontSize,
|
|
216
|
+
fontWeight: theme.size.typography.desktop.small.subtitle.weight,
|
|
217
|
+
lineHeight: theme.size.typography.desktop.small.subtitle.lineHeight,
|
|
218
|
+
letterSpacing: theme.size.typography.desktop.small.subtitle.letterSpacing
|
|
219
219
|
},
|
|
220
220
|
// desktop - »small - »variant (subtitleDens) 💅
|
|
221
221
|
...ownerState.typographyVariant === "subtitleDens" && {
|
|
222
|
-
fontSize: theme.
|
|
223
|
-
fontWeight: theme.
|
|
224
|
-
lineHeight: theme.
|
|
225
|
-
letterSpacing: theme.
|
|
222
|
+
fontSize: theme.size.typography.desktop.small.subtitleDens.fontSize,
|
|
223
|
+
fontWeight: theme.size.typography.desktop.small.subtitleDens.weight,
|
|
224
|
+
lineHeight: theme.size.typography.desktop.small.subtitleDens.lineHeight,
|
|
225
|
+
letterSpacing: theme.size.typography.desktop.small.subtitleDens.letterSpacing
|
|
226
226
|
},
|
|
227
227
|
// desktop - »small - »variant (paragraph) 💅
|
|
228
228
|
...ownerState.typographyVariant === "paragraph" && {
|
|
229
|
-
fontSize: theme.
|
|
230
|
-
fontWeight: theme.
|
|
231
|
-
lineHeight: theme.
|
|
232
|
-
letterSpacing: theme.
|
|
229
|
+
fontSize: theme.size.typography.desktop.small.paragraph.fontSize,
|
|
230
|
+
fontWeight: theme.size.typography.desktop.small.paragraph.weight,
|
|
231
|
+
lineHeight: theme.size.typography.desktop.small.paragraph.lineHeight,
|
|
232
|
+
letterSpacing: theme.size.typography.desktop.small.paragraph.letterSpacing
|
|
233
233
|
},
|
|
234
234
|
// desktop - »small - »variant (paragraphDens) 💅
|
|
235
235
|
...ownerState.typographyVariant === "paragraphDens" && {
|
|
236
|
-
fontSize: theme.
|
|
237
|
-
fontWeight: theme.
|
|
238
|
-
lineHeight: theme.
|
|
239
|
-
letterSpacing: theme.
|
|
236
|
+
fontSize: theme.size.typography.desktop.small.paragraphDens.fontSize,
|
|
237
|
+
fontWeight: theme.size.typography.desktop.small.paragraphDens.weight,
|
|
238
|
+
lineHeight: theme.size.typography.desktop.small.paragraphDens.lineHeight,
|
|
239
|
+
letterSpacing: theme.size.typography.desktop.small.paragraphDens.letterSpacing
|
|
240
240
|
},
|
|
241
241
|
// desktop - »small - »variant (body) 💅
|
|
242
242
|
...ownerState.typographyVariant === "body" && {
|
|
243
|
-
fontSize: theme.
|
|
244
|
-
fontWeight: theme.
|
|
245
|
-
lineHeight: theme.
|
|
246
|
-
letterSpacing: theme.
|
|
243
|
+
fontSize: theme.size.typography.desktop.small.body.fontSize,
|
|
244
|
+
fontWeight: theme.size.typography.desktop.small.body.weight,
|
|
245
|
+
lineHeight: theme.size.typography.desktop.small.body.lineHeight,
|
|
246
|
+
letterSpacing: theme.size.typography.desktop.small.body.letterSpacing
|
|
247
247
|
},
|
|
248
248
|
// desktop - »small - »variant (bodyDens) 💅
|
|
249
249
|
...ownerState.typographyVariant === "bodyDens" && {
|
|
250
|
-
fontSize: theme.
|
|
251
|
-
fontWeight: theme.
|
|
252
|
-
lineHeight: theme.
|
|
253
|
-
letterSpacing: theme.
|
|
250
|
+
fontSize: theme.size.typography.desktop.small.bodyDens.fontSize,
|
|
251
|
+
fontWeight: theme.size.typography.desktop.small.bodyDens.weight,
|
|
252
|
+
lineHeight: theme.size.typography.desktop.small.bodyDens.lineHeight,
|
|
253
|
+
letterSpacing: theme.size.typography.desktop.small.bodyDens.letterSpacing
|
|
254
254
|
}
|
|
255
255
|
},
|
|
256
256
|
// desktop - »medium - 👑 Predeterminado
|
|
257
257
|
...ownerState.typographySize === "medium" && {
|
|
258
258
|
// desktop - medium - »variant (h1) 💅
|
|
259
259
|
...ownerState.typographyVariant === "h1" && {
|
|
260
|
-
fontSize: theme.
|
|
261
|
-
fontWeight: theme.
|
|
262
|
-
lineHeight: theme.
|
|
263
|
-
letterSpacing: theme.
|
|
260
|
+
fontSize: theme.size.typography.desktop.medium.h1.fontSize,
|
|
261
|
+
fontWeight: theme.size.typography.desktop.medium.h1.weight,
|
|
262
|
+
lineHeight: theme.size.typography.desktop.medium.h1.lineHeight,
|
|
263
|
+
letterSpacing: theme.size.typography.desktop.medium.h1.letterSpacing
|
|
264
264
|
},
|
|
265
265
|
// desktop - medium - »variant (h2) 💅
|
|
266
266
|
...ownerState.typographyVariant === "h2" && {
|
|
267
|
-
fontSize: theme.
|
|
268
|
-
fontWeight: theme.
|
|
269
|
-
lineHeight: theme.
|
|
270
|
-
letterSpacing: theme.
|
|
267
|
+
fontSize: theme.size.typography.desktop.medium.h2.fontSize,
|
|
268
|
+
fontWeight: theme.size.typography.desktop.medium.h2.weight,
|
|
269
|
+
lineHeight: theme.size.typography.desktop.medium.h2.lineHeight,
|
|
270
|
+
letterSpacing: theme.size.typography.desktop.medium.h2.letterSpacing
|
|
271
271
|
},
|
|
272
272
|
// desktop - medium - »variant (h3) 💅
|
|
273
273
|
...ownerState.typographyVariant === "h3" && {
|
|
274
|
-
fontSize: theme.
|
|
275
|
-
fontWeight: theme.
|
|
276
|
-
lineHeight: theme.
|
|
277
|
-
letterSpacing: theme.
|
|
274
|
+
fontSize: theme.size.typography.desktop.medium.h3.fontSize,
|
|
275
|
+
fontWeight: theme.size.typography.desktop.medium.h3.weight,
|
|
276
|
+
lineHeight: theme.size.typography.desktop.medium.h3.lineHeight,
|
|
277
|
+
letterSpacing: theme.size.typography.desktop.medium.h3.letterSpacing
|
|
278
278
|
},
|
|
279
279
|
// desktop - medium - »variant(h5) 💅
|
|
280
280
|
...ownerState.typographyVariant === "h5" && {
|
|
281
|
-
fontSize: theme.
|
|
282
|
-
fontWeight: theme.
|
|
283
|
-
lineHeight: theme.
|
|
284
|
-
letterSpacing: theme.
|
|
281
|
+
fontSize: theme.size.typography.desktop.medium.h5.fontSize,
|
|
282
|
+
fontWeight: theme.size.typography.desktop.medium.h5.weight,
|
|
283
|
+
lineHeight: theme.size.typography.desktop.medium.h5.lineHeight,
|
|
284
|
+
letterSpacing: theme.size.typography.desktop.medium.h5.letterSpacing
|
|
285
285
|
},
|
|
286
286
|
// desktop - medium - »variant (subtitle) 💅
|
|
287
287
|
...ownerState.typographyVariant === "subtitle" && {
|
|
288
|
-
fontSize: theme.
|
|
289
|
-
fontWeight: theme.
|
|
290
|
-
lineHeight: theme.
|
|
291
|
-
letterSpacing: theme.
|
|
288
|
+
fontSize: theme.size.typography.desktop.medium.subtitle.fontSize,
|
|
289
|
+
fontWeight: theme.size.typography.desktop.medium.subtitle.weight,
|
|
290
|
+
lineHeight: theme.size.typography.desktop.medium.subtitle.lineHeight,
|
|
291
|
+
letterSpacing: theme.size.typography.desktop.medium.subtitle.letterSpacing
|
|
292
292
|
},
|
|
293
293
|
// desktop - medium - »variant (subtitleDens) 💅
|
|
294
294
|
...ownerState.typographyVariant === "subtitleDens" && {
|
|
295
|
-
fontSize: theme.
|
|
296
|
-
fontWeight: theme.
|
|
297
|
-
lineHeight: theme.
|
|
298
|
-
letterSpacing: theme.
|
|
295
|
+
fontSize: theme.size.typography.desktop.medium.subtitleDens.fontSize,
|
|
296
|
+
fontWeight: theme.size.typography.desktop.medium.subtitleDens.weight,
|
|
297
|
+
lineHeight: theme.size.typography.desktop.medium.subtitleDens.lineHeight,
|
|
298
|
+
letterSpacing: theme.size.typography.desktop.medium.subtitleDens.letterSpacing
|
|
299
299
|
},
|
|
300
300
|
// desktop - medium - »variant (paragraph) 💅
|
|
301
301
|
...ownerState.typographyVariant === "paragraph" && {
|
|
302
|
-
fontSize: theme.
|
|
303
|
-
fontWeight: theme.
|
|
304
|
-
lineHeight: theme.
|
|
305
|
-
letterSpacing: theme.
|
|
302
|
+
fontSize: theme.size.typography.desktop.medium.paragraph.fontSize,
|
|
303
|
+
fontWeight: theme.size.typography.desktop.medium.paragraph.weight,
|
|
304
|
+
lineHeight: theme.size.typography.desktop.medium.paragraph.lineHeight,
|
|
305
|
+
letterSpacing: theme.size.typography.desktop.medium.paragraph.letterSpacing
|
|
306
306
|
},
|
|
307
307
|
// desktop - medium - »variant (paragraphDens) 💅
|
|
308
308
|
...ownerState.typographyVariant === "paragraphDens" && {
|
|
309
|
-
fontSize: theme.
|
|
310
|
-
fontWeight: theme.
|
|
311
|
-
lineHeight: theme.
|
|
312
|
-
letterSpacing: theme.
|
|
309
|
+
fontSize: theme.size.typography.desktop.medium.paragraphDens.fontSize,
|
|
310
|
+
fontWeight: theme.size.typography.desktop.medium.paragraphDens.weight,
|
|
311
|
+
lineHeight: theme.size.typography.desktop.medium.paragraphDens.lineHeight,
|
|
312
|
+
letterSpacing: theme.size.typography.desktop.medium.paragraphDens.letterSpacing
|
|
313
313
|
},
|
|
314
314
|
// desktop - medium - »variant (body) 💅
|
|
315
315
|
...ownerState.typographyVariant === "body" && {
|
|
316
|
-
fontSize: theme.
|
|
317
|
-
fontWeight: theme.
|
|
318
|
-
lineHeight: theme.
|
|
319
|
-
letterSpacing: theme.
|
|
316
|
+
fontSize: theme.size.typography.desktop.medium.body.fontSize,
|
|
317
|
+
fontWeight: theme.size.typography.desktop.medium.body.weight,
|
|
318
|
+
lineHeight: theme.size.typography.desktop.medium.body.lineHeight,
|
|
319
|
+
letterSpacing: theme.size.typography.desktop.medium.body.letterSpacing
|
|
320
320
|
},
|
|
321
321
|
// desktop - medium - »variant (bodyDens) 💅
|
|
322
322
|
...ownerState.typographyVariant === "bodyDens" && {
|
|
323
|
-
fontSize: theme.
|
|
324
|
-
fontWeight: theme.
|
|
325
|
-
lineHeight: theme.
|
|
326
|
-
letterSpacing: theme.
|
|
323
|
+
fontSize: theme.size.typography.desktop.medium.bodyDens.fontSize,
|
|
324
|
+
fontWeight: theme.size.typography.desktop.medium.bodyDens.weight,
|
|
325
|
+
lineHeight: theme.size.typography.desktop.medium.bodyDens.lineHeight,
|
|
326
|
+
letterSpacing: theme.size.typography.desktop.medium.bodyDens.letterSpacing
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
}
|