@eclass/ui-kit 1.53.4 → 1.53.6

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.
@@ -1853,6 +1853,7 @@ function Accessibility(props) {
1853
1853
  });
1854
1854
  }
1855
1855
  const NavBarButton = ({
1856
+ as = "button",
1856
1857
  buttonName,
1857
1858
  onlyLink,
1858
1859
  onClick,
@@ -1883,31 +1884,33 @@ const NavBarButton = ({
1883
1884
  const hoverBg = "rgba(96, 121, 142, 0.8)";
1884
1885
  const isAccessibility = type === "accessibility";
1885
1886
  return /* @__PURE__ */ jsxs(Box, {
1886
- as: "button",
1887
+ as,
1888
+ className: "nav-bar-button",
1887
1889
  id: isAccessibility ? "UserWayButton" : "",
1888
1890
  onClick: isAccessibility ? triggerWidget : onClick,
1889
1891
  sx: {
1892
+ cursor: "pointer",
1890
1893
  display: "flex",
1891
1894
  gap: "8px",
1892
1895
  h: "30px",
1893
1896
  maxH: "30px",
1894
1897
  _hover: {
1895
- ".icon": {
1898
+ ".nav-bar-icon": {
1896
1899
  bg: hoverBg
1897
1900
  },
1898
- ".text": {
1901
+ ".nav-bar-text": {
1899
1902
  color: vars("colors-neutral-white")
1900
1903
  }
1901
1904
  },
1902
1905
  _active: {
1903
- ".icon": {
1906
+ ".nav-bar-icon": {
1904
1907
  bg: onlyLink || isAccessibility ? hoverBg : activeBg
1905
1908
  },
1906
- ".text": {
1909
+ ".nav-bar-text": {
1907
1910
  color: vars("colors-neutral-white")
1908
1911
  }
1909
1912
  },
1910
- ".icon": {
1913
+ ".nav-bar-icon": {
1911
1914
  alignItems: "center",
1912
1915
  bg: vars("colors-main-blueGrey"),
1913
1916
  borderRadius: "100%",
@@ -1919,20 +1922,19 @@ const NavBarButton = ({
1919
1922
  role: "button",
1920
1923
  width: "30px"
1921
1924
  },
1922
- ".text": {
1925
+ ".nav-bar-text": {
1923
1926
  alignContent: "center",
1927
+ color: vars("colors-neutral-silverSand"),
1924
1928
  fontSize: "12px",
1925
1929
  fontWeight: "500",
1926
- forntFamily: "Roboto",
1927
- color: vars("colors-neutral-silverSand")
1930
+ fontFamily: "Roboto"
1928
1931
  }
1929
1932
  },
1930
1933
  children: [/* @__PURE__ */ jsx(Box, {
1931
- className: "icon",
1934
+ className: "nav-bar-icon",
1932
1935
  children: buttonType[type].icon
1933
1936
  }), /* @__PURE__ */ jsx(Box, {
1934
- as: "span",
1935
- className: "text",
1937
+ className: "nav-bar-text",
1936
1938
  children: buttonType[type].text
1937
1939
  })]
1938
1940
  });
@@ -5943,45 +5945,37 @@ const useParseEvents = (events, now) => {
5943
5945
  };
5944
5946
  const GoToCalendar = ({
5945
5947
  text,
5946
- tooltipDisabled,
5947
5948
  onlyToCalendar,
5948
5949
  onClick
5949
5950
  }) => {
5950
5951
  var _a;
5951
5952
  const activeBg = (_a = vars("colors-main-deepSkyBlue")) != null ? _a : "#0189FF";
5952
5953
  const hoverBg = "rgba(96, 121, 142, 0.8)";
5953
- return /* @__PURE__ */ jsx(NewTooltip, {
5954
- label: text != null ? text : "Calendario",
5955
- m: "2px 0 0 -59px",
5956
- isDisabled: tooltipDisabled,
5957
- transform: "translateX(-10px) !important",
5958
- children: /* @__PURE__ */ jsx(MenuButton, {
5959
- onClick: () => onlyToCalendar && onClick && onClick(),
5960
- position: "relative",
5961
- sx: {
5962
- _hover: {
5963
- ".icon": {
5964
- bg: hoverBg
5965
- },
5966
- ".text": {
5967
- color: vars("colors-neutral-white")
5968
- }
5954
+ return /* @__PURE__ */ jsx(MenuButton, {
5955
+ onClick: () => onlyToCalendar && onClick && onClick(),
5956
+ position: "relative",
5957
+ sx: {
5958
+ _hover: {
5959
+ ".nav-bar-icon": {
5960
+ bg: hoverBg
5969
5961
  },
5970
- _active: {
5971
- ".icon": {
5972
- bg: onlyToCalendar ? hoverBg : activeBg
5973
- },
5974
- ".text": {
5975
- color: vars("colors-neutral-white")
5976
- }
5962
+ ".nav-bar-text": {
5963
+ color: vars("colors-neutral-white")
5977
5964
  }
5978
5965
  },
5979
- children: /* @__PURE__ */ jsx(NavBarButton, {
5980
- type: "calendar",
5981
- onClick: () => {
5966
+ _active: {
5967
+ ".nav-bar-icon": {
5968
+ bg: onlyToCalendar ? hoverBg : activeBg
5982
5969
  },
5983
- buttonName: text.toUpperCase()
5984
- })
5970
+ ".nav-bar-text": {
5971
+ color: vars("colors-neutral-white")
5972
+ }
5973
+ }
5974
+ },
5975
+ children: /* @__PURE__ */ jsx(NavBarButton, {
5976
+ as: "div",
5977
+ type: "calendar",
5978
+ buttonName: text.toUpperCase()
5985
5979
  })
5986
5980
  });
5987
5981
  };
@@ -6316,16 +6310,7 @@ const CalendarDropdownContainer = ({
6316
6310
  hasMoreNext,
6317
6311
  ...all
6318
6312
  } = useParseEvents(events, now);
6319
- const [isTooltipDisabled, setTooltipDisabled] = useState(false);
6320
6313
  const [isMenuOpen, setMenuOpen] = useState(false);
6321
- useEffect(() => {
6322
- if (isMenuOpen) {
6323
- setTooltipDisabled(true);
6324
- } else {
6325
- const timer = setTimeout(() => setTooltipDisabled(false), 300);
6326
- return () => clearTimeout(timer);
6327
- }
6328
- }, [isMenuOpen]);
6329
6314
  useEffect(() => {
6330
6315
  if (!isMobile || onlyToCalendar)
6331
6316
  return;
@@ -6426,7 +6411,6 @@ const CalendarDropdownContainer = ({
6426
6411
  children: /* @__PURE__ */ jsxs(Fragment, {
6427
6412
  children: [/* @__PURE__ */ jsx(GoToCalendar, {
6428
6413
  text: (_c = text == null ? void 0 : text.tooltip) != null ? _c : "Calendario",
6429
- tooltipDisabled: isTooltipDisabled,
6430
6414
  onlyToCalendar,
6431
6415
  onClick: redirectToCalendar
6432
6416
  }), !onlyToCalendar && /* @__PURE__ */ jsxs(MenuList, {