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.
@@ -1795,21 +1795,52 @@ const FArrowIcon = React.forwardRef(({
1795
1795
  );
1796
1796
  });
1797
1797
  FArrowIcon.displayName = "FArrowIcon";
1798
- const overlay$1 = "_overlay_avyqh_1";
1799
- const entering$1 = "_entering_avyqh_15";
1800
- const exiting$1 = "_exiting_avyqh_19";
1801
- const viewport = "_viewport_avyqh_24";
1802
- const image = "_image_avyqh_33";
1803
- const zoomed = "_zoomed_avyqh_44";
1804
- const close$1 = "_close_avyqh_52";
1805
- const arrow = "_arrow_avyqh_53";
1806
- const left = "_left_avyqh_95";
1807
- const right = "_right_avyqh_99";
1808
- const indicators = "_indicators_avyqh_103";
1809
- const dot = "_dot_avyqh_112";
1810
- const active$4 = "_active_avyqh_121";
1811
- const spinner = "_spinner_avyqh_126";
1812
- const error$2 = "_error_avyqh_136";
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 = "_preview_1mpqt_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__ */ jsx(
1996
- "button",
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
- onClick: () => setIsOpen(true),
2003
- "aria-label": alt ? `Открыть изображение: ${alt}` : "Открыть изображение в полном размере",
2004
- children: /* @__PURE__ */ jsx("img", { src, alt })
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,