@m4l/components 9.2.62-B10072025beta.1 → 9.2.62-B10072025beta.2

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 (85) hide show
  1. package/components/AppBar/AppBar.js +10 -12
  2. package/components/AppBar/constants.d.ts +1 -1
  3. package/components/AppBar/constants.js +1 -1
  4. package/components/AppBar/slots/AppBarEnum.d.ts +5 -1
  5. package/components/AppBar/slots/AppBarEnum.js +4 -0
  6. package/components/AppBar/slots/AppBarSlots.d.ts +18 -4
  7. package/components/AppBar/slots/AppBarSlots.js +27 -3
  8. package/components/AppBar/styles.js +42 -0
  9. package/components/AppBar/types.d.ts +0 -8
  10. package/components/LoadingError/slots/LoadingErrorSlots.js +1 -1
  11. package/components/PropertyValue/PropertyValue.styles.js +1 -1
  12. package/components/SideBar/SideBar.js +2 -6
  13. package/components/SideBar/constants.d.ts +6 -7
  14. package/components/SideBar/constants.js +7 -7
  15. package/components/SideBar/context/sideBarContext/index.js +10 -9
  16. package/components/SideBar/context/sideBarContext/types.d.ts +10 -2
  17. package/components/SideBar/slots/SideBarEnum.d.ts +7 -7
  18. package/components/SideBar/slots/SideBarEnum.js +5 -5
  19. package/components/SideBar/slots/SideBarSlots.d.ts +9 -9
  20. package/components/SideBar/slots/SideBarSlots.js +28 -31
  21. package/components/SideBar/styles.js +3 -3
  22. package/components/SideBar/subcomponents/ContentComponent/index.js +68 -12
  23. package/components/SideBar/subcomponents/ContentComponent/style.js +103 -122
  24. package/components/SideBar/subcomponents/HeaderSidebar/index.d.ts +6 -0
  25. package/components/SideBar/subcomponents/HeaderSidebar/styles.d.ts +2 -0
  26. package/components/SideBar/subcomponents/HeaderSidebar/styles.js +24 -0
  27. package/components/SideBar/subcomponents/HeaderSidebar/types.d.ts +5 -0
  28. package/components/SideBar/subcomponents/{FooterComponent → Promotion}/index.d.ts +1 -1
  29. package/components/SideBar/subcomponents/{FooterComponent → Promotion}/index.js +4 -4
  30. package/components/SideBar/subcomponents/{FooterComponent → Promotion}/styles.js +2 -8
  31. package/components/SideBar/subcomponents/SideBarDesktop/index.js +3 -4
  32. package/components/SideBar/subcomponents/SideBarDesktop/styles.js +32 -4
  33. package/components/SideBar/subcomponents/SideBarMobile/index.js +1 -1
  34. package/components/SideBar/subcomponents/TreeGroupItems/index.js +3 -4
  35. package/components/SideBar/subcomponents/TreeGroupItems/styles.js +2 -90
  36. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/index.js +4 -6
  37. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/types.d.ts +0 -1
  38. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.js +3 -8
  39. package/components/SideBar/types.d.ts +7 -12
  40. package/components/commercial/HamburgerMenu/HamburgerMenu.js +2 -1
  41. package/components/hook-form/RHFColorPicker/RHFColorPicker.styles.js +2 -1
  42. package/components/hook-form/RHFDateTime/RHFDateTime.styles.js +2 -1
  43. package/components/hook-form/RHFNumberInput/RHFNumberInput.styles.js +2 -1
  44. package/components/hook-form/RHFPeriod/RHFPeriod.styles.js +2 -5
  45. package/components/hook-form/RHFPeriod/slots/RHFPeriodEnum.d.ts +1 -1
  46. package/components/hook-form/RHFPeriod/slots/RHFPeriodEnum.js +1 -1
  47. package/components/hook-form/RHFPeriod/slots/RHFPeriodSlots.d.ts +1 -1
  48. package/components/hook-form/RHFPeriod/slots/RHFPeriodSlots.js +6 -6
  49. package/components/hook-form/RHFPeriod/subcomponents/Period/Period.js +8 -7
  50. package/components/hook-form/RHFPeriod/subcomponents/Period/dictionary.js +4 -5
  51. package/components/hook-form/RHFPeriod/subcomponents/Period/types.d.ts +2 -2
  52. package/components/hook-form/RHFSelect/RHFSelect.styles.js +2 -1
  53. package/components/mui_extended/MenuItem/MenuItem.js +1 -1
  54. package/components/mui_extended/TabContent/TabContent.js +2 -2
  55. package/components/mui_extended/TabContent/TabContent.styles.js +1 -1
  56. package/components/mui_extended/TabContent/types.d.ts +1 -1
  57. package/index.js +8 -8
  58. package/package.json +3 -3
  59. package/storybook/components/SideBar/SideBar.stories.d.ts +11 -5
  60. package/storybook/components/SideBar/subcomponents/FooterPromotion/FooterPromotion.d.ts +4 -0
  61. package/storybook/components/SideBar/subcomponents/FooterPromotion/index.d.ts +1 -0
  62. package/utils/getSizeStyles/getSizeStyles.d.ts +1 -1
  63. package/components/SideBar/subcomponents/HeaderComponent/HeaderComponent.d.ts +0 -5
  64. package/components/SideBar/subcomponents/HeaderComponent/HeaderComponent.js +0 -37
  65. package/components/SideBar/subcomponents/HeaderComponent/index.d.ts +0 -1
  66. package/components/SideBar/subcomponents/HeaderComponent/index.js +0 -1
  67. package/components/SideBar/subcomponents/HeaderComponent/styles.d.ts +0 -2
  68. package/components/SideBar/subcomponents/HeaderComponent/styles.js +0 -44
  69. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/AdormentIcon/AdormentIcon.d.ts +0 -7
  70. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/AdormentIcon/AdormentIcon.js +0 -12
  71. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/AdormentIcon/types.d.ts +0 -4
  72. package/components/hook-form/RHFDateTime/styles.d.ts +0 -1
  73. package/storybook/components/SideBar/subcomponents/FooterComponentHost/FooterComponentHost.d.ts +0 -4
  74. package/storybook/components/SideBar/subcomponents/FooterComponentHost/index.d.ts +0 -1
  75. package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/FooterComponentMicrofrontend.d.ts +0 -4
  76. package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/FooterComponentMicrofrontend.stories.d.ts +0 -14
  77. package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/constants.d.ts +0 -1
  78. package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/index.d.ts +0 -1
  79. package/storybook/components/SideBar/subcomponents/HeaderComponentHost/HeaderComponentHost.d.ts +0 -5
  80. package/storybook/components/SideBar/subcomponents/HeaderComponentHost/constants.d.ts +0 -1
  81. package/storybook/components/SideBar/subcomponents/HeaderComponentMicrofrontend/HeaderComponentMicrofrontend.d.ts +0 -5
  82. package/storybook/components/SideBar/subcomponents/HeaderComponentMicrofrontend/constants.d.ts +0 -1
  83. /package/components/SideBar/subcomponents/{FooterComponent → Promotion}/styles.d.ts +0 -0
  84. /package/components/SideBar/subcomponents/{FooterComponent → Promotion}/types.d.ts +0 -0
  85. /package/storybook/components/SideBar/subcomponents/{FooterComponentHost → FooterPromotion}/constants.d.ts +0 -0
@@ -6,16 +6,10 @@ const footerSideBarStyles = {
6
6
  height: "auto",
7
7
  display: "grid",
8
8
  placeItems: "center",
9
- boxShadow: `0px -1px 0px 0px ${theme.vars.palette.border.disabled}`,
9
+ borderTop: `${theme.vars.size.baseSpacings["sp0-5"]} solid ${theme.vars.palette.border.secondary}`,
10
10
  borderWidth: ownerState?.anchored ? theme.vars.size.baseSpacings["sp0-5"] : theme.vars.size.baseSpacings.sp0,
11
11
  transition: "all 0.5s",
12
- paddingBottom: theme.vars.size.baseSpacings.sp2,
13
- marginLeft: theme.vars.size.baseSpacings.sp4,
14
- marginRight: theme.vars.size.baseSpacings.sp4,
15
- ...!ownerState?.anchored && !theme.generalSettings.isMobile && {
16
- transition: "all 0.5s",
17
- visibility: "hidden"
18
- }
12
+ paddingBottom: theme.vars.size.baseSpacings.sp2
19
13
  })
20
14
  };
21
15
  export {
@@ -1,13 +1,13 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useFirstRender } from "@m4l/graphics";
3
3
  import { u as useSideBar } from "../../hooks/useSideBar/index.js";
4
- import { c as ContainerDesktopContentStyled, d as ContainerDesktopRootStyled } from "../../slots/SideBarSlots.js";
4
+ import { e as ContainerDesktopContentStyled, f as ContainerDesktopRootStyled } from "../../slots/SideBarSlots.js";
5
5
  import { S as SIDEBAR_KEY_COMPONENT } from "../../constants.js";
6
6
  import { C as ContentComponent } from "../ContentComponent/index.js";
7
7
  import { useState, useEffect } from "react";
8
8
  import { a as getComponentSlotRoot } from "../../../../utils/getComponentSlotRoot.js";
9
9
  const SideBarDesktop = () => {
10
- const { anchored, expandedWidth, variant } = useSideBar();
10
+ const { anchored, expandedWidth } = useSideBar();
11
11
  const [eventAnchored, setEventAnchored] = useState(anchored);
12
12
  const isFirstRender = useFirstRender([anchored]);
13
13
  useEffect(() => {
@@ -18,8 +18,7 @@ const SideBarDesktop = () => {
18
18
  }, [anchored]);
19
19
  const ownerState = {
20
20
  anchored: eventAnchored,
21
- expandedWidth,
22
- variant
21
+ expandedWidth
23
22
  };
24
23
  const classRoot = getComponentSlotRoot(SIDEBAR_KEY_COMPONENT);
25
24
  return /* @__PURE__ */ jsx(
@@ -5,7 +5,7 @@ const sideBarDesktopStyles = {
5
5
  * sin que se oculte por el overflow hidden que tiene el contenido del sidebar
6
6
  */
7
7
  containerDesktopContent: ({ theme, ownerState }) => {
8
- const width = ownerState?.anchored ? ownerState?.expandedWidth : ownerState?.variant === "host" ? 0 : theme.vars.size.baseSpacings.sp10;
8
+ const width = ownerState?.anchored ? ownerState?.expandedWidth : theme.vars.size.baseSpacings.sp4;
9
9
  return {
10
10
  height: "100%",
11
11
  position: "relative",
@@ -17,14 +17,42 @@ const sideBarDesktopStyles = {
17
17
  /**
18
18
  * Styles applied to the root element of the `SideBar` component in desktop mode.
19
19
  */
20
- containerDesktopRoot: ({ theme }) => ({
20
+ containerDesktopRoot: ({ ownerState, theme }) => ({
21
21
  height: "100%",
22
- width: "100%",
22
+ width: "fit-content",
23
23
  overflow: "visible",
24
- borderRight: `1px solid ${theme.vars.palette.border.secondary}`,
24
+ borderRight: `1px solid ${theme.vars.palette.border.default}`,
25
+ position: !ownerState?.anchored ? "absolute" : "relative",
25
26
  inset: 0,
26
27
  //add hover effect
27
28
  zIndex: 999
29
+ }),
30
+ /**
31
+ * Container button to achores the sidebar.
32
+ */
33
+ containerBtnAnchored: ({ theme, ownerState }) => ({
34
+ position: "absolute",
35
+ right: "-20px",
36
+ top: "20px",
37
+ zIndex: 1e3,
38
+ padding: `${theme.vars.size.baseSpacings.sp10} 10px`,
39
+ "& .MuiButtonBase-root": {
40
+ ...!ownerState?.anchored && {
41
+ "&:before": {
42
+ content: '""',
43
+ position: "absolute",
44
+ inset: 0,
45
+ backgroundColor: theme.vars.palette.background.default,
46
+ zIndex: -1
47
+ }
48
+ }
49
+ },
50
+ "&&& .M4LIconButton-root:hover": {
51
+ backgroundColor: theme.vars.palette.primary.enabled,
52
+ "& .M4LIcon-icon": {
53
+ backgroundColor: `${theme.vars.palette.primary.contrastText}!important`
54
+ }
55
+ }
28
56
  })
29
57
  };
30
58
  export {
@@ -4,7 +4,7 @@ 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
6
  import { D as Drawer } from "./subcomponents/Drawer.js";
7
- import { e as ContainerSideBarMobileStyled } from "../../slots/SideBarSlots.js";
7
+ import { g as ContainerSideBarMobileStyled } from "../../slots/SideBarSlots.js";
8
8
  import { C as ContentComponent } from "../ContentComponent/index.js";
9
9
  const SideBarMobile = () => {
10
10
  const {
@@ -3,19 +3,18 @@ import { useModuleDictionary, useModuleSkeleton } 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 { f as ContainerTreeGroupItemsStyled, g as ContainerContentGroupsStyled, h as ContainerContentTitleStyled } from "../../slots/SideBarSlots.js";
6
+ import { h as ContainerTreeGroupItemsStyled, i as ContainerContentGroupsStyled, j as ContainerContentTitleStyled } from "../../slots/SideBarSlots.js";
7
7
  import { N as NodeMenuItemMain } from "./subcomponents/NodeMenuItemMain/NodeMenuItemMain.js";
8
8
  import { u as useComponentSize } from "../../../../hooks/useComponentSize/useComponentSize.js";
9
9
  import { M as MenuItem } from "../../../mui_extended/MenuItem/MenuItem.js";
10
10
  const TreeGroupItems = (contentGroupsProps) => {
11
- const { menuData, anchored } = useSideBar();
11
+ const { menuData } = useSideBar();
12
12
  const { getLabel } = useModuleDictionary();
13
13
  const { size } = contentGroupsProps;
14
14
  const { currentSize } = useComponentSize(size);
15
15
  const isSkeleton = useModuleSkeleton();
16
16
  const ownerState = {
17
- noItems: menuData.length === 0,
18
- anchored
17
+ noItems: menuData.length === 0
19
18
  };
20
19
  const renderItemsDisabled = () => {
21
20
  return /* @__PURE__ */ jsx(ContainerContentTitleStyled, { ownerState: { disabled: true }, children: /* @__PURE__ */ jsx(
@@ -1,4 +1,3 @@
1
- import { g as getSizeStyles } from "../../../../utils/getSizeStyles/getSizeStyles.js";
2
1
  const contentGroupStyles = {
3
2
  /**
4
3
  * Container for the group items in the sidebar
@@ -10,17 +9,9 @@ const contentGroupStyles = {
10
9
  flex: 1,
11
10
  flexDirection: "column",
12
11
  overflowY: "auto",
12
+ padding: `${theme.vars.size.baseSpacings.sp3} 0px 0px 0px`,
13
13
  alignItems: "center",
14
- justifyContent: ownerState?.noItems ? "center" : "flex-start",
15
- transition: "all 0.5s",
16
- paddingTop: theme.vars.size.baseSpacings.sp3,
17
- paddingLeft: theme.vars.size.baseSpacings.sp4,
18
- paddingRight: theme.vars.size.baseSpacings.sp4,
19
- gap: theme.vars.size.baseSpacings.sp4,
20
- ...!ownerState?.anchored && !theme.generalSettings.isMobile && {
21
- transition: "all 0.5s",
22
- visibility: "hidden"
23
- }
14
+ justifyContent: ownerState?.noItems ? "center" : "flex-start"
24
15
  }),
25
16
  /**
26
17
  * Wrapper for every principal item group in the sidebar
@@ -37,7 +28,6 @@ const contentGroupStyles = {
37
28
  containerContentTitle: ({ theme, ownerState }) => ({
38
29
  padding: `${theme.vars.size.baseSpacings.sp3} ${theme.vars.size.baseSpacings.sp4} ${theme.vars.size.baseSpacings.sp1}`,
39
30
  color: theme.vars.palette.text.primary,
40
- width: "100%",
41
31
  textAlign: "left",
42
32
  "& .MuiTypography-root": {
43
33
  color: !ownerState?.disabled ? theme.vars.palette.text.primary : `${theme.vars.palette.text.primary} !important`
@@ -72,84 +62,6 @@ const contentGroupStyles = {
72
62
  alignSelf: "center",
73
63
  lineHeight: 0,
74
64
  marginLeft: "auto"
75
- }),
76
- /**
77
- * Styles applied to the container of the adornment icon in the header component
78
- */
79
- containerAdornmentIcon: ({ theme, ownerState }) => ({
80
- overflow: "hidden",
81
- borderRadius: theme.vars.size.borderRadius["r1-5"],
82
- display: "flex",
83
- justifyContent: "center",
84
- alignItems: "center",
85
- position: "relative",
86
- width: "fit-content",
87
- height: "fit-content",
88
- padding: "1px",
89
- "& .M4LIcon-root": {
90
- width: "fit-content",
91
- height: "fit-content",
92
- padding: theme.vars.size.baseSpacings["sp0-5"],
93
- "& .M4LIcon-icon": {
94
- ...getSizeStyles(
95
- theme,
96
- ownerState?.size || "medium",
97
- "case",
98
- (sizeValue) => ({
99
- width: `${sizeValue}!important`,
100
- height: `${sizeValue}!important`,
101
- minWidth: `${sizeValue}!important`,
102
- minHeight: `${sizeValue}!important`
103
- })
104
- )
105
- }
106
- },
107
- ...ownerState?.variant !== "itemActive" && ownerState?.variant !== "normal" && {
108
- "& .M4LIcon-icon": {
109
- backgroundColor: `${theme.vars.palette.chips.persianGreen.contained.colorTone}!important`
110
- }
111
- },
112
- ...ownerState?.variant === "normal" && {
113
- "& .M4LIcon-icon": {
114
- backgroundColor: `${theme.vars.palette.text.secondary}!important`
115
- }
116
- },
117
- ...ownerState?.variant === "main" && {
118
- backgroundColor: theme.vars.palette.chips.persianGreen.contained.backgroundColorTone
119
- },
120
- ...ownerState?.variant === "root" && {
121
- backgroundColor: theme.vars.palette.primary.enabled
122
- },
123
- ...ownerState?.variant === "itemActive" && {
124
- boxShadow: theme.vars.customShadows.primary2,
125
- background: `linear-gradient(to right,
126
- ${theme.vars.palette.primary.opacityGradient1},
127
- ${theme.vars.palette.primary.opacityGradient2})`,
128
- "& .M4LSideBar-backgroundAdornmentIcon": {
129
- background: theme.vars.palette.background.default
130
- },
131
- "&::before": {
132
- content: '""',
133
- position: "absolute",
134
- inset: "1.4px",
135
- background: theme.vars.palette.primary.enabledOpacity,
136
- borderRadius: "5px"
137
- },
138
- "& .M4LIcon-icon": {
139
- backgroundColor: `${theme.vars.palette.primary.enabled}!important`
140
- }
141
- }
142
- }),
143
- /**
144
- * Styles applied to the background of the adornment icon in the header component
145
- */
146
- backgroundAdornmentIcon: () => ({
147
- width: "100%",
148
- height: "100%",
149
- display: "flex",
150
- justifyContent: "center",
151
- alignItems: "center",
152
- borderRadius: "5px"
153
65
  })
154
66
  };
155
67
  export {
@@ -6,14 +6,13 @@ import { T as TEST_PROP_ID } from "../../../../../../test/constants_no_mock.js";
6
6
  import { g as getNameDataTestId } from "../../../../tests/utils.js";
7
7
  import { A as ArrowIcon } from "../ArrowIcon/index.js";
8
8
  import { l as ContainerNodeMenuItemStyled } from "../../../../slots/SideBarSlots.js";
9
- import { a as CLASS_NAME_MENU_ACTIVE, d as CLASS_NAME_ITEM_IN_TREE_ACTIVE, b as CLASS_NAME_HAS_CHILDREN, c as CLASS_NAME_ITEM_CLOSED } from "../../../../constants.js";
9
+ import { c as CLASS_NAME_MENU_ACTIVE, d as CLASS_NAME_ITEM_IN_TREE_ACTIVE, e as CLASS_NAME_HAS_CHILDREN } from "../../../../constants.js";
10
10
  import { useModuleSkeleton } from "@m4l/core";
11
- import { A as AdornmentIcon } from "../AdormentIcon/AdormentIcon.js";
12
11
  import { u as useCollapse } from "../../../../hooks/useCollapse/useCollapse.js";
13
12
  import { u as useComponentSize } from "../../../../../../hooks/useComponentSize/useComponentSize.js";
14
13
  import { M as MenuItem } from "../../../../../mui_extended/MenuItem/MenuItem.js";
15
14
  function NodeMenuItem(props) {
16
- const { item, size, defaultOpen = false, className, isLastSibling = false, isRoot = false } = props;
15
+ const { item, size, defaultOpen = false, className, isLastSibling = false } = props;
17
16
  const { urlIconPrefix, classes } = useSideBar();
18
17
  const { isOpen, handlerClick, hasChildren } = useCollapse(item, defaultOpen);
19
18
  const { currentSize } = useComponentSize(size);
@@ -41,12 +40,11 @@ function NodeMenuItem(props) {
41
40
  CLASS_NAME_ITEM_STATE,
42
41
  className,
43
42
  item.children && item.children.length > 0 && CLASS_NAME_HAS_CHILDREN,
44
- item.itemInTreeActive && CLASS_NAME_ITEM_IN_TREE_ACTIVE,
45
- !isOpen && CLASS_NAME_ITEM_CLOSED
43
+ item.itemInTreeActive && CLASS_NAME_ITEM_IN_TREE_ACTIVE
46
44
  ),
47
45
  label: item.title,
48
46
  selected: item.active,
49
- startIcon: /* @__PURE__ */ jsx(AdornmentIcon, { icon: `${urlIconPrefix}${item.iconUrl}`, variant: isRoot && item.itemInTreeActive ? "root" : item.active ? "itemActive" : "normal" }),
47
+ startIcon: `${urlIconPrefix}${item.iconUrl}`,
50
48
  endIcon: hasChildren ? /* @__PURE__ */ jsx(ArrowIcon, { openState: isOpen, active: item.active }) : null,
51
49
  onClick: () => handlerClick(),
52
50
  size: currentSize
@@ -6,5 +6,4 @@ export type NodeMenuItemProps = {
6
6
  size: Extract<Sizes, 'small' | 'medium'>;
7
7
  className?: string;
8
8
  isLastSibling?: boolean;
9
- isRoot?: boolean;
10
9
  };
@@ -5,16 +5,13 @@ import { T as TEST_PROP_ID } from "../../../../../../test/constants_no_mock.js";
5
5
  import { A as ArrowIcon } from "../ArrowIcon/index.js";
6
6
  import { Collapse } from "@mui/material";
7
7
  import { N as NodeMenuItem } from "../NodeMenuItem/index.js";
8
- import { C as CLASS_NAME_IS_ROOT } from "../../../../constants.js";
8
+ import { b as CLASS_NAME_IS_ROOT } from "../../../../constants.js";
9
9
  import clsx from "clsx";
10
10
  import { useModuleSkeleton } from "@m4l/core";
11
- import { u as useSideBar } from "../../../../hooks/useSideBar/index.js";
12
- import { A as AdornmentIcon } from "../AdormentIcon/AdormentIcon.js";
13
11
  import { u as useComponentSize } from "../../../../../../hooks/useComponentSize/useComponentSize.js";
14
12
  import { u as useCollapse } from "../../../../hooks/useCollapse/useCollapse.js";
15
13
  const NodeMenuItemMain = (props) => {
16
14
  const { item, size, defaultOpen = false } = props;
17
- const { urlIconPrefix } = useSideBar();
18
15
  const { currentSize } = useComponentSize(size);
19
16
  const { isOpen, handlerClick, hasChildren } = useCollapse(item, defaultOpen);
20
17
  const isSkeleton = useModuleSkeleton();
@@ -34,8 +31,7 @@ const NodeMenuItemMain = (props) => {
34
31
  MenuItemMainStyled,
35
32
  {
36
33
  label: item.title,
37
- startIcon: /* @__PURE__ */ jsx(AdornmentIcon, { icon: `${urlIconPrefix}${item.iconUrl}`, variant: "main" }),
38
- endIcon: hasChildren ? /* @__PURE__ */ jsx(ArrowIcon, { openState: isOpen, active: item.active }) : null,
34
+ startIcon: hasChildren ? /* @__PURE__ */ jsx(ArrowIcon, { openState: isOpen, active: item.active }) : null,
39
35
  onClick: () => handlerClick(),
40
36
  size: currentSize
41
37
  }
@@ -47,8 +43,7 @@ const NodeMenuItemMain = (props) => {
47
43
  size: currentSize,
48
44
  className: clsx(CLASS_NAME_IS_ROOT),
49
45
  defaultOpen: isSkeleton ? false : true,
50
- isLastSibling: item.children?.length === index + 1,
51
- isRoot: true
46
+ isLastSibling: item.children?.length === index + 1
52
47
  },
53
48
  child.title
54
49
  )) })
@@ -51,6 +51,10 @@ export interface SideBarProps {
51
51
  * Slogan de la empresa
52
52
  */
53
53
  companySlogan?: string;
54
+ /**
55
+ * Indica la variación de estilo del componente
56
+ */
57
+ variantStyle?: 'variantDefault' | 'variantComercial';
54
58
  moduleSelectedId?: string | undefined;
55
59
  onMenuItemClick: (item: MenuDataType) => void;
56
60
  /**
@@ -70,19 +74,10 @@ export interface SideBarProps {
70
74
  */
71
75
  urlIconPrefix?: string;
72
76
  /**
73
- * Variación del componente, puede ser uno de los valores definidos en 'variantDefault' , 'variantComercial'
74
- */
75
- variant?: SidebarVariants;
76
- /**
77
- * Componente que se renderiza en el encabezado del sidebar
78
- */
79
- headerComponent?: ReactElement;
80
- /**
81
- * Componente que se renderiza en el pie de página del sidebar
77
+ * Promoción del sidebar, se renderiza en el footer del sidebar
82
78
  */
83
- footerComponent?: ReactElement;
79
+ promotion?: ReactElement;
84
80
  }
85
- export type SidebarVariants = 'host' | 'microfrontend';
86
81
  /**
87
82
  * Interface que representa el estado de un elemento de menú en la barra lateral.
88
83
  */
@@ -101,7 +96,7 @@ export type SideBarOwnerState = Pick<IMenuDataWithState, 'active' | 'itemInTreeA
101
96
  export type SideBarStyles = M4LOverridesStyleRules<SideBarSlotsType, typeof SIDEBAR_KEY_COMPONENT, Theme>;
102
97
  export type SideBarDesktopStyles = M4LOverridesStyleRules<SideBarDesktopSlots, typeof SIDEBAR_KEY_COMPONENT, Theme>;
103
98
  export type ContentGroupsStyles = M4LOverridesStyleRules<ContentGroupsSlots, typeof SIDEBAR_KEY_COMPONENT, Theme>;
104
- export type HeaderComponentStyles = M4LOverridesStyleRules<HeaderSidebarSlots, typeof SIDEBAR_KEY_COMPONENT, Theme>;
99
+ export type HeaderSidebarStyles = M4LOverridesStyleRules<HeaderSidebarSlots, typeof SIDEBAR_KEY_COMPONENT, Theme>;
105
100
  export type SideBarFooterStyles = M4LOverridesStyleRules<SideBarFooterSlots, typeof SIDEBAR_KEY_COMPONENT, Theme>;
106
101
  export type SideBarMobileStyles = M4LOverridesStyleRules<SideBarMobileSlots, typeof SIDEBAR_KEY_COMPONENT, Theme>;
107
102
  export type ContentComponentStyles = M4LOverridesStyleRules<ContentComponentSlots, typeof SIDEBAR_KEY_COMPONENT, Theme>;
@@ -44,7 +44,8 @@ const HamburgerMenu = (props) => {
44
44
  onToggleVisible: handlerOnVisible,
45
45
  anchored: false,
46
46
  companyLogoSmallUrl: "",
47
- companyName: ""
47
+ companyName: "",
48
+ variantStyle: "variantComercial"
48
49
  }
49
50
  )
50
51
  ]
@@ -6,7 +6,8 @@ const rhfcolorPickerStyles = {
6
6
  root: ({ theme }) => ({
7
7
  display: "flex",
8
8
  flexDirection: "column",
9
- gap: theme.vars.size.baseSpacings["sp0-5"]
9
+ gap: theme.vars.size.baseSpacings["sp0-5"],
10
+ width: "100%"
10
11
  })
11
12
  };
12
13
  export {
@@ -5,7 +5,8 @@ const rhfDateTimeStyles = {
5
5
  root: ({ theme }) => ({
6
6
  display: "flex",
7
7
  flexDirection: "column",
8
- gap: theme.vars.size.baseSpacings["sp0-5"]
8
+ gap: theme.vars.size.baseSpacings["sp0-5"],
9
+ width: "100%"
9
10
  })
10
11
  };
11
12
  export {
@@ -8,7 +8,8 @@ const rhfNumberInputStyles = {
8
8
  root: ({ theme }) => ({
9
9
  display: "flex",
10
10
  flexDirection: "column",
11
- gap: theme.vars.size.baseSpacings.sp1
11
+ gap: theme.vars.size.baseSpacings.sp1,
12
+ width: "100%"
12
13
  })
13
14
  };
14
15
  export {
@@ -23,11 +23,8 @@ const rhfPeriodStyles = {
23
23
  /**
24
24
  * textField class
25
25
  */
26
- textField: ({ theme }) => ({
27
- borderRadius: "50px",
28
- width: "43px !important",
29
- border: theme.vars.palette.border.default,
30
- color: theme.vars.palette.text.disabled
26
+ numberInput: () => ({
27
+ width: "43px !important"
31
28
  }),
32
29
  /**
33
30
  * select class
@@ -1,6 +1,6 @@
1
1
  export declare enum RHFPeriodSlots {
2
2
  root = "root",
3
3
  periodRoot = "periodRoot",
4
- textField = "textField",
4
+ numberInput = "numberInput",
5
5
  select = "select"
6
6
  }
@@ -1,7 +1,7 @@
1
1
  var RHFPeriodSlots = /* @__PURE__ */ ((RHFPeriodSlots2) => {
2
2
  RHFPeriodSlots2["root"] = "root";
3
3
  RHFPeriodSlots2["periodRoot"] = "periodRoot";
4
- RHFPeriodSlots2["textField"] = "textField";
4
+ RHFPeriodSlots2["numberInput"] = "numberInput";
5
5
  RHFPeriodSlots2["select"] = "select";
6
6
  return RHFPeriodSlots2;
7
7
  })(RHFPeriodSlots || {});
@@ -1,4 +1,4 @@
1
1
  export declare const RHFPeriodRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
2
2
  export declare const PeriodRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
3
- export declare const TextFieldStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../../mui_extended/TextField/types').TextFieldProps, "ref"> & import('react').RefAttributes<HTMLDivElement>, "value" | "size" | "children" | "title" | "component" | "name" | "error" | "select" | "rows" | "id" | "type" | "disabled" | "hidden" | "content" | "style" | "variant" | "margin" | "translate" | "className" | "classes" | "sx" | "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" | "dataTestId" | "autoComplete" | "placeholder" | "required" | keyof import('react').RefAttributes<HTMLDivElement> | "maxRows" | "fullWidth" | "inputProps" | "inputRef" | "focused" | "hiddenLabel" | "InputProps" | "FormHelperTextProps" | "helperText" | "InputLabelProps" | "multiline" | "minRows" | "SelectProps"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, {}, {}>;
3
+ export declare const NumberInputStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../NumberInput/types').NumberInputProps & import('react').RefAttributes<HTMLDivElement>, keyof import('react').RefAttributes<HTMLDivElement> | keyof import('../../../NumberInput/types').NumberInputProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, {}, {}>;
4
4
  export declare const SelectStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../../mui_extended/Select').SelectProps<string | number, boolean | undefined>, "ref"> & import('react').RefAttributes<HTMLDivElement>, "value" | "size" | "children" | "onClose" | "title" | "name" | "error" | "input" | "options" | "rows" | "id" | "type" | "disabled" | "components" | "hidden" | "content" | "style" | "open" | "multiple" | "variant" | "margin" | "translate" | "className" | "classes" | "sx" | "slots" | "slotProps" | "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" | "componentsProps" | "onOpen" | "dataTestId" | "autoComplete" | "placeholder" | "readOnly" | "required" | keyof import('react').RefAttributes<HTMLDivElement> | "maxRows" | "fullWidth" | "inputProps" | "inputRef" | "multiline" | "minRows" | "disableInjectingGlobalStyles" | "endAdornment" | "inputComponent" | "renderSuffix" | "startAdornment" | "disableUnderline" | "autoWidth" | "defaultOpen" | "displayEmpty" | "IconComponent" | "labelId" | "MenuProps" | "native" | "renderValue" | "SelectDisplayProps"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, {}, {}>;
@@ -2,7 +2,7 @@ import { styled } from "@mui/material/styles";
2
2
  import { R as RHF_PERIOD_KEY_COMPONENT } from "../constants.js";
3
3
  import { r as rhfPeriodStyles } from "../RHFPeriod.styles.js";
4
4
  import { R as RHFPeriodSlots } from "./RHFPeriodEnum.js";
5
- import { T as TextField } from "../../../mui_extended/TextField/TextField.js";
5
+ import { N as NumberInput } from "../../../NumberInput/NumberInput.js";
6
6
  import { S as Select } from "../../../mui_extended/Select/Select.js";
7
7
  const RHFPeriodRootStyled = styled("div", {
8
8
  name: RHF_PERIOD_KEY_COMPONENT,
@@ -12,17 +12,17 @@ const PeriodRootStyled = styled("div", {
12
12
  name: RHF_PERIOD_KEY_COMPONENT,
13
13
  slot: RHFPeriodSlots.periodRoot
14
14
  })(rhfPeriodStyles?.periodRoot);
15
- const TextFieldStyled = styled(TextField, {
15
+ const NumberInputStyled = styled(NumberInput, {
16
16
  name: RHF_PERIOD_KEY_COMPONENT,
17
- slot: RHFPeriodSlots.textField
18
- })(rhfPeriodStyles?.textField);
17
+ slot: RHFPeriodSlots.numberInput
18
+ })(rhfPeriodStyles?.numberInput);
19
19
  const SelectStyled = styled(Select, {
20
20
  name: RHF_PERIOD_KEY_COMPONENT,
21
21
  slot: RHFPeriodSlots.select
22
22
  })(rhfPeriodStyles?.select);
23
23
  export {
24
+ NumberInputStyled as N,
24
25
  PeriodRootStyled as P,
25
26
  RHFPeriodRootStyled as R,
26
- SelectStyled as S,
27
- TextFieldStyled as T
27
+ SelectStyled as S
28
28
  };
@@ -4,7 +4,7 @@ import { E as ETimePeriods } from "./types.js";
4
4
  import { d as dictionary } from "./dictionary.js";
5
5
  import { useMemo } from "react";
6
6
  import { u as useComponentSize } from "../../../../../hooks/useComponentSize/useComponentSize.js";
7
- import { P as PeriodRootStyled, S as SelectStyled, T as TextFieldStyled } from "../../slots/RHFPeriodSlots.js";
7
+ import { P as PeriodRootStyled, S as SelectStyled, N as NumberInputStyled } from "../../slots/RHFPeriodSlots.js";
8
8
  import { I as Icon } from "../../../../Icon/Icon.js";
9
9
  const Period = (props) => {
10
10
  const {
@@ -27,7 +27,7 @@ const Period = (props) => {
27
27
  );
28
28
  const getSingleValue = (period) => {
29
29
  if (!period) {
30
- return "";
30
+ return null;
31
31
  }
32
32
  if (period.singleValue !== void 0) {
33
33
  return period.singleValue;
@@ -41,7 +41,7 @@ const Period = (props) => {
41
41
  if (period.days && period.days > 0) {
42
42
  return period.days;
43
43
  }
44
- return "";
44
+ return null;
45
45
  };
46
46
  const getSelPeriodTime = (period) => {
47
47
  if (!period) {
@@ -68,7 +68,7 @@ const Period = (props) => {
68
68
  selPeriodTime: newPeriodTime,
69
69
  singleValue: newValue
70
70
  };
71
- if (newValue !== "" && newValue > 0) {
71
+ if (newValue && newValue > 0) {
72
72
  newPeriod.years = 0;
73
73
  newPeriod.months = 0;
74
74
  newPeriod.days = 0;
@@ -117,13 +117,14 @@ const Period = (props) => {
117
117
  }
118
118
  ),
119
119
  /* @__PURE__ */ jsx(
120
- TextFieldStyled,
120
+ NumberInputStyled,
121
121
  {
122
122
  type: "number",
123
123
  variant: "outlined",
124
124
  value: singleValue,
125
- onChange: (e) => {
126
- onTotalChange(selPeriodTime, e.target.value === "" ? "" : parseInt(e.target.value));
125
+ withDecimal: true,
126
+ onChange: (_event, newValue) => {
127
+ onTotalChange(selPeriodTime, newValue);
127
128
  }
128
129
  }
129
130
  )
@@ -1,12 +1,11 @@
1
1
  import { g as getCommonActionsDictionary } from "../../../../CommonActions/dictionary.js";
2
- const DICTIONARY_KEY = "rhf_period";
3
2
  const dictionary = {
4
- LABEL_YEARS: `${DICTIONARY_KEY}.label_years`,
5
- LABEL_MONTHS: `${DICTIONARY_KEY}.label_months`,
6
- LABEL_DAYS: `${DICTIONARY_KEY}.label_days`
3
+ LABEL_YEARS: "period.label_years",
4
+ LABEL_MONTHS: "period.label_months",
5
+ LABEL_DAYS: "period.label_days"
7
6
  };
8
7
  function getPeriodComponetsDictionary() {
9
- return [DICTIONARY_KEY].concat(getCommonActionsDictionary());
8
+ return ["period"].concat(getCommonActionsDictionary());
10
9
  }
11
10
  export {
12
11
  dictionary as d,
@@ -9,8 +9,8 @@ export type PeriodTime = {
9
9
  label: string;
10
10
  };
11
11
  export type PeriodType = {
12
- selPeriodTime: '' | ETimePeriods | undefined;
13
- singleValue: number | '';
12
+ selPeriodTime: null | ETimePeriods | undefined;
13
+ singleValue: number | null;
14
14
  years?: number;
15
15
  months?: number;
16
16
  days?: number;
@@ -5,7 +5,8 @@ const rhfSelectStyles = {
5
5
  root: ({ theme }) => ({
6
6
  display: "flex",
7
7
  flexDirection: "column",
8
- gap: theme.vars.size.baseSpacings.sp1
8
+ gap: theme.vars.size.baseSpacings.sp1,
9
+ width: "100%"
9
10
  }),
10
11
  /**
11
12
  * Estilos del Label.
@@ -94,7 +94,7 @@ const MenuItem = (props) => {
94
94
  disabled
95
95
  }
96
96
  ),
97
- /* @__PURE__ */ jsxs(MenuItemContainerStyled, { ownerState: { ...ownerState }, className: MENUITEM_CLASSES.menuItemContainer, children: [
97
+ /* @__PURE__ */ jsxs(MenuItemContainerStyled, { ownerState: { ...ownerState }, children: [
98
98
  renderIcon(startIcon, "MenuItemStartIcon", getComponentSlotRoot("MenuItemStartIcon")),
99
99
  /* @__PURE__ */ jsx(
100
100
  MenuItemTypographyStyled,