@eclass/ui-kit 1.53.3 → 1.53.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eclass-ui-kit.es.js +159 -76
- package/dist/eclass-ui-kit.es.js.map +1 -1
- package/dist/eclass-ui-kit.umd.js +28 -28
- package/dist/eclass-ui-kit.umd.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/molecules/NavBarButtons/Icons/CalendarButtonIcon.d.ts.map +1 -0
- package/dist/molecules/NavBarButtons/Icons/HelpIcon.d.ts +3 -0
- package/dist/molecules/NavBarButtons/Icons/HelpIcon.d.ts.map +1 -0
- package/dist/molecules/NavBarButtons/NavBarButton.d.ts +18 -0
- package/dist/molecules/NavBarButtons/NavBarButton.d.ts.map +1 -0
- package/dist/molecules/Tooltip/NewTooltip.d.ts +1 -0
- package/dist/molecules/Tooltip/NewTooltip.d.ts.map +1 -1
- package/dist/molecules/index.d.ts +1 -0
- package/dist/molecules/index.d.ts.map +1 -1
- package/dist/organisms/Calendar/Dropdown/CalendarDropdown/CalendarDropdownContainer.d.ts.map +1 -1
- package/dist/organisms/Calendar/Dropdown/CalendarDropdown/Components/GoToCalendar.d.ts +1 -2
- package/dist/organisms/Calendar/Dropdown/CalendarDropdown/Components/GoToCalendar.d.ts.map +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/organisms/Calendar/Dropdown/CalendarDropdown/Icons/CalendarButtonIcon.d.ts.map +0 -1
- /package/dist/{organisms/Calendar/Dropdown/CalendarDropdown → molecules/NavBarButtons}/Icons/CalendarButtonIcon.d.ts +0 -0
package/dist/eclass-ui-kit.es.js
CHANGED
|
@@ -1811,6 +1811,134 @@ function BtnLink({
|
|
|
1811
1811
|
});
|
|
1812
1812
|
}
|
|
1813
1813
|
BtnLink.displayName = "BtnLink";
|
|
1814
|
+
const HelpIcon = () => {
|
|
1815
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
1816
|
+
width: "16",
|
|
1817
|
+
height: "16",
|
|
1818
|
+
viewBox: "0 0 16 16",
|
|
1819
|
+
fill: "none",
|
|
1820
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
1821
|
+
d: "M8 0C3.6 0 0 3.6 0 8C0 12.4 3.6 16 8 16C12.4 16 16 12.4 16 8C16 3.6 12.4 0 8 0ZM8 13C7.448 13 7 12.552 7 12C7 11.448 7.448 11 8 11C8.552 11 9 11.448 9 12C9 12.552 8.552 13 8 13ZM9.623 8.092C9.126 8.519 9 8.663 9 9C9 9.553 8.552 10 8 10C7.448 10 7 9.553 7 9C7 7.706 7.795 7.024 8.322 6.573C8.819 6.148 8.945 6.003 8.945 5.667C8.945 5.484 8.945 5 8.001 5C7.565 5.024 7.1 5.224 6.743 5.561C6.342 5.939 5.708 5.92 5.329 5.52C4.95 5.118 4.968 4.485 5.37 4.106C6.072 3.445 6.987 3.052 7.949 3.002H7.952C9.764 3.002 10.945 4.073 10.945 5.668C10.945 6.961 10.15 7.643 9.624 8.093L9.623 8.092Z",
|
|
1822
|
+
fill: "white"
|
|
1823
|
+
})
|
|
1824
|
+
});
|
|
1825
|
+
};
|
|
1826
|
+
const CalendarButtonIcon = () => /* @__PURE__ */ jsxs("svg", {
|
|
1827
|
+
width: "16px",
|
|
1828
|
+
height: "16px",
|
|
1829
|
+
fill: "none",
|
|
1830
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
1831
|
+
fill: "#fff",
|
|
1832
|
+
d: "M15 2h-2V0h-2v2H9V0H7v2H5V0H3v2H1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1Zm-1 12H2V5h12v9Z"
|
|
1833
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
1834
|
+
fill: "#fff",
|
|
1835
|
+
d: "M6 7H4v2h2V7ZM9 7H7v2h2V7ZM6 10H4v2h2v-2ZM9 10H7v2h2v-2ZM12 7h-2v2h2V7ZM12 10h-2v2h2v-2Z"
|
|
1836
|
+
})]
|
|
1837
|
+
});
|
|
1838
|
+
function Accessibility(props) {
|
|
1839
|
+
return /* @__PURE__ */ jsx(Base, {
|
|
1840
|
+
...props,
|
|
1841
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
1842
|
+
width: "16",
|
|
1843
|
+
height: "16",
|
|
1844
|
+
viewBox: "0 0 16 16",
|
|
1845
|
+
fill: "none",
|
|
1846
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
1847
|
+
fillRule: "evenodd",
|
|
1848
|
+
clipRule: "evenodd",
|
|
1849
|
+
d: "M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM8 5C8.82843 5 9.5 4.32843 9.5 3.5C9.5 2.67157 8.82843 2 8 2C7.17157 2 6.5 2.67157 6.5 3.5C6.5 4.32843 7.17157 5 8 5ZM2.96967 5.96967C3.11032 5.82902 3.30109 5.75 3.5 5.75H12.5C12.6989 5.75 12.8897 5.82902 13.0303 5.96967C13.171 6.11032 13.25 6.30109 13.25 6.5C13.25 6.69891 13.171 6.88968 13.0303 7.03033C12.8897 7.17098 12.6989 7.25 12.5 7.25H10.25V13.25C10.25 13.4489 10.171 13.6397 10.0303 13.7803C9.88968 13.921 9.69891 14 9.5 14C9.30109 14 9.11032 13.921 8.96967 13.7803C8.82902 13.6397 8.75 13.4489 8.75 13.25V10.25H7.25V13.25C7.25 13.4489 7.17098 13.6397 7.03033 13.7803C6.88968 13.921 6.69891 14 6.5 14C6.30109 14 6.11032 13.921 5.96967 13.7803C5.82902 13.6397 5.75 13.4489 5.75 13.25V7.25H3.5C3.30109 7.25 3.11032 7.17098 2.96967 7.03033C2.82902 6.88968 2.75 6.69891 2.75 6.5C2.75 6.30109 2.82902 6.11032 2.96967 5.96967Z",
|
|
1850
|
+
fill: "white"
|
|
1851
|
+
})
|
|
1852
|
+
})
|
|
1853
|
+
});
|
|
1854
|
+
}
|
|
1855
|
+
const NavBarButton = ({
|
|
1856
|
+
as = "button",
|
|
1857
|
+
buttonName,
|
|
1858
|
+
onlyLink,
|
|
1859
|
+
onClick,
|
|
1860
|
+
type
|
|
1861
|
+
}) => {
|
|
1862
|
+
var _a;
|
|
1863
|
+
const buttonType = {
|
|
1864
|
+
accessibility: {
|
|
1865
|
+
icon: /* @__PURE__ */ jsx(Accessibility, {}),
|
|
1866
|
+
text: buttonName != null ? buttonName : "ACCESIBILIDAD"
|
|
1867
|
+
},
|
|
1868
|
+
calendar: {
|
|
1869
|
+
icon: /* @__PURE__ */ jsx(CalendarButtonIcon, {}),
|
|
1870
|
+
text: buttonName != null ? buttonName : "CALENDARIO"
|
|
1871
|
+
},
|
|
1872
|
+
help: {
|
|
1873
|
+
icon: /* @__PURE__ */ jsx(HelpIcon, {}),
|
|
1874
|
+
text: buttonName != null ? buttonName : "AYUDA"
|
|
1875
|
+
}
|
|
1876
|
+
};
|
|
1877
|
+
const triggerWidget = () => {
|
|
1878
|
+
const buttonB = document.getElementById("userWayTrigger");
|
|
1879
|
+
if (buttonB == null ? void 0 : buttonB.click) {
|
|
1880
|
+
buttonB.click();
|
|
1881
|
+
}
|
|
1882
|
+
};
|
|
1883
|
+
const activeBg = (_a = vars("colors-main-deepSkyBlue")) != null ? _a : "#0189FF";
|
|
1884
|
+
const hoverBg = "rgba(96, 121, 142, 0.8)";
|
|
1885
|
+
const isAccessibility = type === "accessibility";
|
|
1886
|
+
return /* @__PURE__ */ jsxs(Box, {
|
|
1887
|
+
as,
|
|
1888
|
+
className: "nav-bar-button",
|
|
1889
|
+
id: isAccessibility ? "UserWayButton" : "",
|
|
1890
|
+
onClick: isAccessibility ? triggerWidget : onClick,
|
|
1891
|
+
sx: {
|
|
1892
|
+
display: "flex",
|
|
1893
|
+
gap: "8px",
|
|
1894
|
+
h: "30px",
|
|
1895
|
+
maxH: "30px",
|
|
1896
|
+
_hover: {
|
|
1897
|
+
".icon": {
|
|
1898
|
+
bg: hoverBg
|
|
1899
|
+
},
|
|
1900
|
+
".text": {
|
|
1901
|
+
color: vars("colors-neutral-white")
|
|
1902
|
+
}
|
|
1903
|
+
},
|
|
1904
|
+
_active: {
|
|
1905
|
+
".icon": {
|
|
1906
|
+
bg: onlyLink || isAccessibility ? hoverBg : activeBg
|
|
1907
|
+
},
|
|
1908
|
+
".text": {
|
|
1909
|
+
color: vars("colors-neutral-white")
|
|
1910
|
+
}
|
|
1911
|
+
},
|
|
1912
|
+
".icon": {
|
|
1913
|
+
alignItems: "center",
|
|
1914
|
+
bg: vars("colors-main-blueGrey"),
|
|
1915
|
+
borderRadius: "100%",
|
|
1916
|
+
border: "1px solid transparent",
|
|
1917
|
+
display: "flex",
|
|
1918
|
+
height: "30px",
|
|
1919
|
+
justifyContent: "center",
|
|
1920
|
+
type: "button",
|
|
1921
|
+
role: "button",
|
|
1922
|
+
width: "30px"
|
|
1923
|
+
},
|
|
1924
|
+
".text": {
|
|
1925
|
+
alignContent: "center",
|
|
1926
|
+
fontSize: "12px",
|
|
1927
|
+
fontWeight: "500",
|
|
1928
|
+
forntFamily: "Roboto",
|
|
1929
|
+
color: vars("colors-neutral-silverSand")
|
|
1930
|
+
}
|
|
1931
|
+
},
|
|
1932
|
+
children: [/* @__PURE__ */ jsx(Box, {
|
|
1933
|
+
className: "icon",
|
|
1934
|
+
children: buttonType[type].icon
|
|
1935
|
+
}), /* @__PURE__ */ jsx(Box, {
|
|
1936
|
+
as: "span",
|
|
1937
|
+
className: "text",
|
|
1938
|
+
children: buttonType[type].text
|
|
1939
|
+
})]
|
|
1940
|
+
});
|
|
1941
|
+
};
|
|
1814
1942
|
const NewTooltip = ({
|
|
1815
1943
|
children,
|
|
1816
1944
|
className = "tooltip",
|
|
@@ -1820,7 +1948,8 @@ const NewTooltip = ({
|
|
|
1820
1948
|
maxWidth = "200px",
|
|
1821
1949
|
placement = "bottom",
|
|
1822
1950
|
isOpen,
|
|
1823
|
-
sx
|
|
1951
|
+
sx,
|
|
1952
|
+
transform
|
|
1824
1953
|
}) => {
|
|
1825
1954
|
return /* @__PURE__ */ jsx(Tooltip, {
|
|
1826
1955
|
isOpen,
|
|
@@ -1832,6 +1961,7 @@ const NewTooltip = ({
|
|
|
1832
1961
|
fontWeight: "400",
|
|
1833
1962
|
maxWidth,
|
|
1834
1963
|
padding: "8px",
|
|
1964
|
+
transform: transform != null ? transform : "",
|
|
1835
1965
|
".chakra-tooltip__arrow": {
|
|
1836
1966
|
bg: `${vars("colors-neutral-darkCharcoal")} !important`
|
|
1837
1967
|
},
|
|
@@ -1849,23 +1979,6 @@ const NewTooltip = ({
|
|
|
1849
1979
|
})
|
|
1850
1980
|
});
|
|
1851
1981
|
};
|
|
1852
|
-
function Accessibility(props) {
|
|
1853
|
-
return /* @__PURE__ */ jsx(Base, {
|
|
1854
|
-
...props,
|
|
1855
|
-
children: /* @__PURE__ */ jsx("svg", {
|
|
1856
|
-
width: "16",
|
|
1857
|
-
height: "16",
|
|
1858
|
-
viewBox: "0 0 16 16",
|
|
1859
|
-
fill: "none",
|
|
1860
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
1861
|
-
fillRule: "evenodd",
|
|
1862
|
-
clipRule: "evenodd",
|
|
1863
|
-
d: "M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM8 5C8.82843 5 9.5 4.32843 9.5 3.5C9.5 2.67157 8.82843 2 8 2C7.17157 2 6.5 2.67157 6.5 3.5C6.5 4.32843 7.17157 5 8 5ZM2.96967 5.96967C3.11032 5.82902 3.30109 5.75 3.5 5.75H12.5C12.6989 5.75 12.8897 5.82902 13.0303 5.96967C13.171 6.11032 13.25 6.30109 13.25 6.5C13.25 6.69891 13.171 6.88968 13.0303 7.03033C12.8897 7.17098 12.6989 7.25 12.5 7.25H10.25V13.25C10.25 13.4489 10.171 13.6397 10.0303 13.7803C9.88968 13.921 9.69891 14 9.5 14C9.30109 14 9.11032 13.921 8.96967 13.7803C8.82902 13.6397 8.75 13.4489 8.75 13.25V10.25H7.25V13.25C7.25 13.4489 7.17098 13.6397 7.03033 13.7803C6.88968 13.921 6.69891 14 6.5 14C6.30109 14 6.11032 13.921 5.96967 13.7803C5.82902 13.6397 5.75 13.4489 5.75 13.25V7.25H3.5C3.30109 7.25 3.11032 7.17098 2.96967 7.03033C2.82902 6.88968 2.75 6.69891 2.75 6.5C2.75 6.30109 2.82902 6.11032 2.96967 5.96967Z",
|
|
1864
|
-
fill: "white"
|
|
1865
|
-
})
|
|
1866
|
-
})
|
|
1867
|
-
});
|
|
1868
|
-
}
|
|
1869
1982
|
function UserWay() {
|
|
1870
1983
|
const triggerWidget = () => {
|
|
1871
1984
|
const buttonB = document.getElementById("userWayTrigger");
|
|
@@ -5830,59 +5943,39 @@ const useParseEvents = (events, now) => {
|
|
|
5830
5943
|
hasMoreNext
|
|
5831
5944
|
};
|
|
5832
5945
|
};
|
|
5833
|
-
const CalendarButtonIcon = () => /* @__PURE__ */ jsxs("svg", {
|
|
5834
|
-
width: "16px",
|
|
5835
|
-
height: "16px",
|
|
5836
|
-
fill: "none",
|
|
5837
|
-
children: [/* @__PURE__ */ jsx("path", {
|
|
5838
|
-
fill: "#fff",
|
|
5839
|
-
d: "M15 2h-2V0h-2v2H9V0H7v2H5V0H3v2H1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1Zm-1 12H2V5h12v9Z"
|
|
5840
|
-
}), /* @__PURE__ */ jsx("path", {
|
|
5841
|
-
fill: "#fff",
|
|
5842
|
-
d: "M6 7H4v2h2V7ZM9 7H7v2h2V7ZM6 10H4v2h2v-2ZM9 10H7v2h2v-2ZM12 7h-2v2h2V7ZM12 10h-2v2h2v-2Z"
|
|
5843
|
-
})]
|
|
5844
|
-
});
|
|
5845
5946
|
const GoToCalendar = ({
|
|
5846
5947
|
text,
|
|
5847
|
-
tooltipDisabled,
|
|
5848
5948
|
onlyToCalendar,
|
|
5849
5949
|
onClick
|
|
5850
5950
|
}) => {
|
|
5851
|
-
var _a
|
|
5951
|
+
var _a;
|
|
5852
5952
|
const activeBg = (_a = vars("colors-main-deepSkyBlue")) != null ? _a : "#0189FF";
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
onClick: () => onlyToCalendar && onClick && onClick(),
|
|
5859
|
-
background: (_b = vars("colors-main-blueGrey")) != null ? _b : "#60798E",
|
|
5860
|
-
border: "1px solid transparent",
|
|
5861
|
-
borderRadius: "100%",
|
|
5862
|
-
height: "30px !important",
|
|
5863
|
-
width: "30px !important",
|
|
5864
|
-
padding: "0 !important",
|
|
5865
|
-
margin: "0 !important",
|
|
5866
|
-
position: "relative",
|
|
5867
|
-
_active: {
|
|
5868
|
-
bg: activeBg,
|
|
5869
|
-
"&:hover": {
|
|
5870
|
-
bg: activeBg
|
|
5871
|
-
}
|
|
5872
|
-
},
|
|
5953
|
+
const hoverBg = "rgba(96, 121, 142, 0.8)";
|
|
5954
|
+
return /* @__PURE__ */ jsx(MenuButton, {
|
|
5955
|
+
onClick: () => onlyToCalendar && onClick && onClick(),
|
|
5956
|
+
position: "relative",
|
|
5957
|
+
sx: {
|
|
5873
5958
|
_hover: {
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
"
|
|
5878
|
-
|
|
5879
|
-
alignContent: "center",
|
|
5880
|
-
h: "16px!important",
|
|
5881
|
-
justifyItems: "center",
|
|
5882
|
-
lineHeight: "0"
|
|
5959
|
+
".icon": {
|
|
5960
|
+
bg: hoverBg
|
|
5961
|
+
},
|
|
5962
|
+
".text": {
|
|
5963
|
+
color: vars("colors-neutral-white")
|
|
5883
5964
|
}
|
|
5884
5965
|
},
|
|
5885
|
-
|
|
5966
|
+
_active: {
|
|
5967
|
+
".icon": {
|
|
5968
|
+
bg: onlyToCalendar ? hoverBg : activeBg
|
|
5969
|
+
},
|
|
5970
|
+
".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()
|
|
5886
5979
|
})
|
|
5887
5980
|
});
|
|
5888
5981
|
};
|
|
@@ -6217,16 +6310,7 @@ const CalendarDropdownContainer = ({
|
|
|
6217
6310
|
hasMoreNext,
|
|
6218
6311
|
...all
|
|
6219
6312
|
} = useParseEvents(events, now);
|
|
6220
|
-
const [isTooltipDisabled, setTooltipDisabled] = useState(false);
|
|
6221
6313
|
const [isMenuOpen, setMenuOpen] = useState(false);
|
|
6222
|
-
useEffect(() => {
|
|
6223
|
-
if (isMenuOpen) {
|
|
6224
|
-
setTooltipDisabled(true);
|
|
6225
|
-
} else {
|
|
6226
|
-
const timer = setTimeout(() => setTooltipDisabled(false), 300);
|
|
6227
|
-
return () => clearTimeout(timer);
|
|
6228
|
-
}
|
|
6229
|
-
}, [isMenuOpen]);
|
|
6230
6314
|
useEffect(() => {
|
|
6231
6315
|
if (!isMobile || onlyToCalendar)
|
|
6232
6316
|
return;
|
|
@@ -6256,7 +6340,7 @@ const CalendarDropdownContainer = ({
|
|
|
6256
6340
|
return /* @__PURE__ */ jsx(Box, {
|
|
6257
6341
|
zIndex: 4,
|
|
6258
6342
|
className: `calendarDropdown ${hasNew && !onlyToCalendar ? "hasNew" : ""}`,
|
|
6259
|
-
width: "
|
|
6343
|
+
width: "fit-content",
|
|
6260
6344
|
height: "30px",
|
|
6261
6345
|
m: m2,
|
|
6262
6346
|
position: "relative",
|
|
@@ -6268,7 +6352,7 @@ const CalendarDropdownContainer = ({
|
|
|
6268
6352
|
content: '""',
|
|
6269
6353
|
display: isMenuOpen ? "block" : "none",
|
|
6270
6354
|
height: "0",
|
|
6271
|
-
left: "
|
|
6355
|
+
left: "14%",
|
|
6272
6356
|
position: "absolute",
|
|
6273
6357
|
top: "30px",
|
|
6274
6358
|
transform: "translateX(-50%)",
|
|
@@ -6326,8 +6410,7 @@ const CalendarDropdownContainer = ({
|
|
|
6326
6410
|
onClose,
|
|
6327
6411
|
children: /* @__PURE__ */ jsxs(Fragment, {
|
|
6328
6412
|
children: [/* @__PURE__ */ jsx(GoToCalendar, {
|
|
6329
|
-
text: (_c = text == null ? void 0 : text.tooltip) != null ? _c : "
|
|
6330
|
-
tooltipDisabled: isTooltipDisabled,
|
|
6413
|
+
text: (_c = text == null ? void 0 : text.tooltip) != null ? _c : "Calendario",
|
|
6331
6414
|
onlyToCalendar,
|
|
6332
6415
|
onClick: redirectToCalendar
|
|
6333
6416
|
}), !onlyToCalendar && /* @__PURE__ */ jsxs(MenuList, {
|
|
@@ -6498,5 +6581,5 @@ const EventsList = ({
|
|
|
6498
6581
|
})]
|
|
6499
6582
|
});
|
|
6500
6583
|
};
|
|
6501
|
-
export { Alert, Btn, BtnLink, BtnPrimary, BtnSecondary, BtnTertiary, CalendarDropdown, CourseList, CourseStatus, Eventos, EventsList, FlashNotification, index as Icons, Label, ModalAlert, NewTooltip, Progress, Resources, Ripples, TinyAlert, UserWay, UserWayCookie, dataFake, maxWidthCoursesList, theme, useFlashNotification, vars };
|
|
6584
|
+
export { Alert, Btn, BtnLink, BtnPrimary, BtnSecondary, BtnTertiary, CalendarDropdown, CourseList, CourseStatus, Eventos, EventsList, FlashNotification, index as Icons, Label, ModalAlert, NavBarButton, NewTooltip, Progress, Resources, Ripples, TinyAlert, UserWay, UserWayCookie, dataFake, maxWidthCoursesList, theme, useFlashNotification, vars };
|
|
6502
6585
|
//# sourceMappingURL=eclass-ui-kit.es.js.map
|