fui-material 2.8.14 → 2.8.15
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/f-ui-kit.es.js +70 -54
- package/dist/f-ui-kit.es.js.map +1 -1
- package/dist/f-ui-kit.umd.js +2 -2
- package/dist/f-ui-kit.umd.js.map +1 -1
- package/dist/index.css +1 -1
- package/package.json +1 -1
package/dist/f-ui-kit.es.js
CHANGED
|
@@ -1795,21 +1795,52 @@ const FArrowIcon = React.forwardRef(({
|
|
|
1795
1795
|
);
|
|
1796
1796
|
});
|
|
1797
1797
|
FArrowIcon.displayName = "FArrowIcon";
|
|
1798
|
-
const
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1798
|
+
const FDownloadIcon = React.forwardRef(({
|
|
1799
|
+
color = "primary",
|
|
1800
|
+
size = 30,
|
|
1801
|
+
st,
|
|
1802
|
+
id,
|
|
1803
|
+
className,
|
|
1804
|
+
handleClick,
|
|
1805
|
+
["data-testid"]: dataTestId,
|
|
1806
|
+
...props
|
|
1807
|
+
}, ref) => {
|
|
1808
|
+
return /* @__PURE__ */ jsxs(
|
|
1809
|
+
"svg",
|
|
1810
|
+
{
|
|
1811
|
+
ref,
|
|
1812
|
+
style: st,
|
|
1813
|
+
id,
|
|
1814
|
+
width: size,
|
|
1815
|
+
onClick: handleClick,
|
|
1816
|
+
className: `f-icon ${handleClick ? " clicking-icon" : ""} ${color} ${className || ""}`,
|
|
1817
|
+
viewBox: "0 0 16 16",
|
|
1818
|
+
"data-testid": dataTestId,
|
|
1819
|
+
...props,
|
|
1820
|
+
children: [
|
|
1821
|
+
/* @__PURE__ */ jsx("path", { d: "M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5z" }),
|
|
1822
|
+
/* @__PURE__ */ jsx("path", { d: "M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3z" })
|
|
1823
|
+
]
|
|
1824
|
+
}
|
|
1825
|
+
);
|
|
1826
|
+
});
|
|
1827
|
+
FDownloadIcon.displayName = "FDownloadIcon";
|
|
1828
|
+
const overlay$1 = "_overlay_19vq5_1";
|
|
1829
|
+
const entering$1 = "_entering_19vq5_15";
|
|
1830
|
+
const exiting$1 = "_exiting_19vq5_19";
|
|
1831
|
+
const viewport = "_viewport_19vq5_24";
|
|
1832
|
+
const image = "_image_19vq5_33";
|
|
1833
|
+
const zoomed = "_zoomed_19vq5_44";
|
|
1834
|
+
const close$1 = "_close_19vq5_52";
|
|
1835
|
+
const download$1 = "_download_19vq5_53";
|
|
1836
|
+
const arrow = "_arrow_19vq5_54";
|
|
1837
|
+
const left = "_left_19vq5_107";
|
|
1838
|
+
const right = "_right_19vq5_111";
|
|
1839
|
+
const indicators = "_indicators_19vq5_115";
|
|
1840
|
+
const dot = "_dot_19vq5_124";
|
|
1841
|
+
const active$4 = "_active_19vq5_133";
|
|
1842
|
+
const spinner = "_spinner_19vq5_138";
|
|
1843
|
+
const error$2 = "_error_19vq5_148";
|
|
1813
1844
|
const styles$o = {
|
|
1814
1845
|
overlay: overlay$1,
|
|
1815
1846
|
entering: entering$1,
|
|
@@ -1818,6 +1849,7 @@ const styles$o = {
|
|
|
1818
1849
|
image,
|
|
1819
1850
|
zoomed,
|
|
1820
1851
|
close: close$1,
|
|
1852
|
+
download: download$1,
|
|
1821
1853
|
arrow,
|
|
1822
1854
|
left,
|
|
1823
1855
|
right,
|
|
@@ -1854,7 +1886,7 @@ const FOpenImgFull = ({
|
|
|
1854
1886
|
} else if (isMounted) {
|
|
1855
1887
|
setIsClosing(true);
|
|
1856
1888
|
}
|
|
1857
|
-
}, [openAndClose]);
|
|
1889
|
+
}, [isMounted, openAndClose]);
|
|
1858
1890
|
useEffect(() => {
|
|
1859
1891
|
if (!isClosing) return;
|
|
1860
1892
|
const timer = window.setTimeout(() => {
|
|
@@ -1905,6 +1937,7 @@ const FOpenImgFull = ({
|
|
|
1905
1937
|
},
|
|
1906
1938
|
children: [
|
|
1907
1939
|
handleClose && /* @__PURE__ */ jsx("button", { type: "button", className: styles$o.close, onClick: handleClose, "aria-label": "Закрыть просмотр изображений", children: /* @__PURE__ */ jsx(FCloseIcon, { color: "light", size: 24 }) }),
|
|
1940
|
+
/* @__PURE__ */ jsx("a", { className: styles$o.download, href: imageUrl, download: true, "aria-label": "Скачать изображение", title: "Скачать изображение", children: /* @__PURE__ */ jsx(FDownloadIcon, { color: "light", size: 20 }) }),
|
|
1908
1941
|
selectedImg > 0 && /* @__PURE__ */ jsx("button", { type: "button", className: `${styles$o.arrow} ${styles$o.left}`, onClick: () => changeImage(-1), "aria-label": "Предыдущее изображение", children: /* @__PURE__ */ jsx(FArrowIcon, { direction: "left", color: "light", size: 28 }) }),
|
|
1909
1942
|
/* @__PURE__ */ jsxs("div", { className: styles$o.viewport, children: [
|
|
1910
1943
|
isLoading && !hasError && /* @__PURE__ */ jsx("span", { className: styles$o.spinner, "aria-label": "Загрузка изображения" }),
|
|
@@ -1985,23 +2018,36 @@ const FOpenImgFull = ({
|
|
|
1985
2018
|
document.body
|
|
1986
2019
|
);
|
|
1987
2020
|
};
|
|
1988
|
-
const preview$1 = "
|
|
2021
|
+
const preview$1 = "_preview_b55p5_1";
|
|
2022
|
+
const imageButton = "_imageButton_b55p5_7";
|
|
2023
|
+
const download = "_download_b55p5_27";
|
|
1989
2024
|
const styles$n = {
|
|
1990
|
-
preview: preview$1
|
|
2025
|
+
preview: preview$1,
|
|
2026
|
+
imageButton,
|
|
2027
|
+
download
|
|
1991
2028
|
};
|
|
1992
2029
|
const FImagePreview = ({ src, alt = "", id, className, st }) => {
|
|
1993
2030
|
const [isOpen, setIsOpen] = useState(false);
|
|
1994
2031
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1995
|
-
/* @__PURE__ */
|
|
1996
|
-
"
|
|
2032
|
+
/* @__PURE__ */ jsxs(
|
|
2033
|
+
"div",
|
|
1997
2034
|
{
|
|
1998
2035
|
id,
|
|
1999
|
-
type: "button",
|
|
2000
2036
|
className: `${styles$n.preview} ${className || ""}`,
|
|
2001
2037
|
style: st,
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2038
|
+
children: [
|
|
2039
|
+
/* @__PURE__ */ jsx(
|
|
2040
|
+
"button",
|
|
2041
|
+
{
|
|
2042
|
+
type: "button",
|
|
2043
|
+
className: styles$n.imageButton,
|
|
2044
|
+
onClick: () => setIsOpen(true),
|
|
2045
|
+
"aria-label": alt ? `Открыть изображение: ${alt}` : "Открыть изображение в полном размере",
|
|
2046
|
+
children: /* @__PURE__ */ jsx("img", { src, alt })
|
|
2047
|
+
}
|
|
2048
|
+
),
|
|
2049
|
+
/* @__PURE__ */ jsx("a", { className: styles$n.download, href: src, download: true, "aria-label": "Скачать изображение", title: "Скачать изображение", children: /* @__PURE__ */ jsx(FDownloadIcon, { color: "light", size: 18 }) })
|
|
2050
|
+
]
|
|
2005
2051
|
}
|
|
2006
2052
|
),
|
|
2007
2053
|
/* @__PURE__ */ jsx(
|
|
@@ -4783,36 +4829,6 @@ const FUploadIcon = React.forwardRef(({
|
|
|
4783
4829
|
);
|
|
4784
4830
|
});
|
|
4785
4831
|
FUploadIcon.displayName = "FUploadIcon";
|
|
4786
|
-
const FDownloadIcon = React.forwardRef(({
|
|
4787
|
-
color = "primary",
|
|
4788
|
-
size = 30,
|
|
4789
|
-
st,
|
|
4790
|
-
id,
|
|
4791
|
-
className,
|
|
4792
|
-
handleClick,
|
|
4793
|
-
["data-testid"]: dataTestId,
|
|
4794
|
-
...props
|
|
4795
|
-
}, ref) => {
|
|
4796
|
-
return /* @__PURE__ */ jsxs(
|
|
4797
|
-
"svg",
|
|
4798
|
-
{
|
|
4799
|
-
ref,
|
|
4800
|
-
style: st,
|
|
4801
|
-
id,
|
|
4802
|
-
width: size,
|
|
4803
|
-
onClick: handleClick,
|
|
4804
|
-
className: `f-icon ${handleClick ? " clicking-icon" : ""} ${color} ${className || ""}`,
|
|
4805
|
-
viewBox: "0 0 16 16",
|
|
4806
|
-
"data-testid": dataTestId,
|
|
4807
|
-
...props,
|
|
4808
|
-
children: [
|
|
4809
|
-
/* @__PURE__ */ jsx("path", { d: "M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5z" }),
|
|
4810
|
-
/* @__PURE__ */ jsx("path", { d: "M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3z" })
|
|
4811
|
-
]
|
|
4812
|
-
}
|
|
4813
|
-
);
|
|
4814
|
-
});
|
|
4815
|
-
FDownloadIcon.displayName = "FDownloadIcon";
|
|
4816
4832
|
const FCopyAddIcon = React.forwardRef(({
|
|
4817
4833
|
color = "primary",
|
|
4818
4834
|
size = 30,
|