mimir-ui-kit 1.42.0 → 1.42.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.
@@ -1 +1 @@
1
- ._card-trail_c21mz_3{display:flex;flex-direction:column}._card-trail-header_c21mz_7{display:flex;align-items:flex-end;justify-content:space-between}._card-trail-header_c21mz_7:not(:last-child){margin-bottom:var(--mimir-space-xs)}._card-trail-header-title_c21mz_15{margin-bottom:0;font-weight:var(--mimir-font-weight-text-medium);font-size:var(--mimir-size-text-l);font-family:var(--mimir-font-montserrat);line-height:var(--mimir-line-height-text-s1);letter-spacing:calc(var(--mimir-size-text-l) * -.02)}@media (max-width: 600px){._card-trail-header-title_c21mz_15{font-size:var(--mimir-size-text-m);letter-spacing:calc(var(--mimir-size-text-m) * -.02)}}._card-trail-header-merged-button_c21mz_29{margin-left:auto}._card-trail-list_c21mz_32{display:flex;margin-bottom:0;padding:0;overflow:auto;white-space:nowrap;scroll-behavior:smooth;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}._card-trail-list_c21mz_32::-webkit-scrollbar{display:none}._card-trail-list-item_c21mz_45{white-space:normal;white-space:initial;scroll-snap-align:start}._card-trail-list-item_c21mz_45._pointer_c21mz_49{cursor:pointer}
1
+ ._card-trail_1wzbr_3{display:flex;flex-direction:column}._card-trail-header_1wzbr_7{display:flex;align-items:flex-end;justify-content:space-between}._card-trail-header_1wzbr_7:not(:last-child){margin-bottom:var(--mimir-space-xs)}._card-trail-header-title_1wzbr_15{margin-bottom:0;font-weight:var(--mimir-font-weight-text-medium);font-size:var(--mimir-size-text-l);font-family:var(--mimir-font-montserrat);line-height:var(--mimir-line-height-text-s1);letter-spacing:calc(var(--mimir-size-text-l) * -.02)}@media (max-width: 600px){._card-trail-header-title_1wzbr_15{font-size:var(--mimir-size-text-m);letter-spacing:calc(var(--mimir-size-text-m) * -.02)}}._card-trail-header-merged-button_1wzbr_29{margin-left:auto}._card-trail-list_1wzbr_32{display:flex;margin-bottom:0;padding:0;overflow:auto;white-space:nowrap;scroll-behavior:smooth;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scrollbar-width:none}._card-trail-list_1wzbr_32::-webkit-scrollbar{display:none}._card-trail-list-item_1wzbr_46{white-space:normal;white-space:initial;scroll-snap-align:start}._card-trail-list-item_1wzbr_46._pointer_1wzbr_50{cursor:pointer}
@@ -1 +1 @@
1
- ._clear_135p1_2{color:var(--asphalt-normal);border-radius:var(--mimir-control-radius-xs);display:flex;align-items:center;justify-content:center;flex-shrink:0}._clear_135p1_2 svg{color:currentcolor;fill:currentcolor}._clear_135p1_2 svg path{color:currentcolor;fill:currentcolor}._clear_135p1_2._gray_135p1_18{background:var(--gray-normal)}._clear_135p1_2:hover{box-shadow:none;color:var(--counter-text)}._clear_135p1_2:active{box-shadow:none;color:var(--asphalt-active)}._clear_135p1_2:disabled{color:var(--disabled)}._clear_135p1_2._l_135p1_32{height:var(--button-height-xs);width:var(--button-height-xs)}._clear_135p1_2._m-s_135p1_36{height:var(--button-height-ms);width:var(--button-height-ms)}
1
+ ._clear_n3to9_2{display:flex;flex-shrink:0;align-items:center;justify-content:center;color:var(--asphalt-normal);border-radius:var(--mimir-control-radius-xs)}._clear_n3to9_2 svg{color:currentcolor;fill:currentcolor}._clear_n3to9_2 svg path{color:currentcolor;fill:currentcolor}._clear_n3to9_2._gray_n3to9_18{background:var(--gray-normal)}._clear_n3to9_2:hover{color:var(--counter-text);box-shadow:none}._clear_n3to9_2:active{color:var(--asphalt-active);box-shadow:none}._clear_n3to9_2:disabled{color:var(--disabled)}._clear_n3to9_2._l_n3to9_32{width:var(--button-height-xs);height:var(--button-height-xs)}._clear_n3to9_2._m-s_n3to9_36{width:var(--button-height-ms);height:var(--button-height-ms)}
@@ -1 +1 @@
1
- ._file-info_rd4f3_2{display:flex;flex-direction:column;gap:var(--mimir-space-xs);overflow:hidden}._file-info_rd4f3_2 ._file-info-size_rd4f3_8{color:var(--disabled-color);font-weight:var(--mimir-font-weight-text-regular);font-size:var(--mimir-size-text-m);font-family:var(--mimir-font-inter),sans-serif;line-height:var(--mimir-line-height-text-xxs);text-align:left;height:var(--mimir-space-2m);display:flex;align-items:center}._file-info_rd4f3_2 ._file-info-name-wrapper_rd4f3_19{display:table;width:100%;table-layout:fixed}._file-info_rd4f3_2 ._file-info-name-wrapper_rd4f3_19 ._file-info-name_rd4f3_19{display:table-cell;overflow:hidden;color:var(--black-100);font-weight:var(--mimir-font-weight-text-regular);font-size:var(--mimir-size-text-l2);font-family:var(--mimir-font-inter),sans-serif;line-height:var(--mimir-line-height-text-xl);white-space:nowrap;text-align:left;text-overflow:ellipsis}._file-upload-container_rd4f3_37{display:flex;flex-direction:column;gap:var(--mimir-space-xs);width:100%;margin-bottom:0;padding-left:0}._file-upload-container_rd4f3_37 ._file-upload-container-item_rd4f3_45{position:relative;display:flex;align-items:center;justify-content:space-between;padding:var(--mimir-space-xs) var(--mimir-space-m);background:var(--file-upload-container-background);border-radius:var(--mimir-control-radius)}._file-upload-container_rd4f3_37 ._file-upload-container-item_rd4f3_45 ._delete-button_rd4f3_54{position:absolute;top:var(--mimir-space-2xs);right:var(--mimir-space-2xs);background:var(--delete-button-background)}._white_rd4f3_61{--file-upload-container-background: var(--white);--delete-button-background: var(--black-5)}._gray_rd4f3_66{--file-upload-container-background: var(--black-5);--delete-button-background: var(--white)}
1
+ ._file-info_hpqrc_2{display:flex;flex-direction:column;gap:var(--mimir-space-xs);overflow:hidden}._file-info_hpqrc_2 ._file-info-size_hpqrc_8{display:flex;align-items:center;height:var(--mimir-space-2m);color:var(--disabled-color);font-weight:var(--mimir-font-weight-text-regular);font-size:var(--mimir-size-text-m);font-family:var(--mimir-font-inter),sans-serif;line-height:var(--mimir-line-height-text-xxs);text-align:left}._file-info_hpqrc_2 ._file-info-name-wrapper_hpqrc_19{display:table;width:100%;table-layout:fixed}._file-info_hpqrc_2 ._file-info-name-wrapper_hpqrc_19 ._file-info-name_hpqrc_19{display:table-cell;overflow:hidden;color:var(--black-100);font-weight:var(--mimir-font-weight-text-regular);font-size:var(--mimir-size-text-l2);font-family:var(--mimir-font-inter),sans-serif;line-height:var(--mimir-line-height-text-xl);white-space:nowrap;text-align:left;text-overflow:ellipsis}._file-upload-container_hpqrc_37{display:flex;flex-direction:column;gap:var(--mimir-space-xs);width:100%;margin-bottom:0;padding-left:0}._file-upload-container_hpqrc_37 ._file-upload-container-item_hpqrc_45{position:relative;display:flex;align-items:center;justify-content:space-between;padding:var(--mimir-space-xs) var(--mimir-space-m);background:var(--file-upload-container-background);border-radius:var(--mimir-control-radius)}._file-upload-container_hpqrc_37 ._file-upload-container-item_hpqrc_45 ._delete-button_hpqrc_54{position:absolute;top:var(--mimir-space-2xs);right:var(--mimir-space-2xs);background:var(--delete-button-background)}._white_hpqrc_61{--file-upload-container-background: var(--white);--delete-button-background: var(--black-5)}._gray_hpqrc_66{--file-upload-container-background: var(--black-5);--delete-button-background: var(--white)}
@@ -25,6 +25,10 @@ export type TProps = {
25
25
  * Флаг, определяющий, нужно ли при клике на карточку скроллиться до нее.
26
26
  */
27
27
  scrollToCard?: boolean;
28
+ /**
29
+ * Значение, которое раздвигает отрицательными и положительным отступами.
30
+ */
31
+ padding?: number;
28
32
  /**
29
33
  * Флаг, определяющий, нужны ли кнопки для перелистывания.
30
34
  */
@@ -1,118 +1,135 @@
1
- import { jsxs as N, jsx as s } from "react/jsx-runtime";
2
- import { c as i } from "../../index-DIxK0V-G.js";
3
- import { forwardRef as H, useRef as E, useState as u, useEffect as O, Children as $ } from "react";
4
- import { DEFAULT_SPACE_BETWEEN as j, DEFAULT_SCROLL_STEP as V, DEFAULT_DIVIDED as q, DEFAULT_CARD_INDEX as X } from "./constants.js";
5
- import { hasHorizontalScroll as h, isScrollAtEdge as S } from "./utils.js";
6
- import { useMergeRefs as G } from "../../hooks/useMergeRefs/useMergeRefs.js";
7
- import { useThrottledCallback as J } from "../../hooks/useThrottledCallback/index.js";
8
- import { MergedButton as K } from "../MergedButton/MergedButton.js";
9
- import '../../assets/CardTrail.css';const P = "_pointer_c21mz_49", c = {
10
- "card-trail": "_card-trail_c21mz_3",
11
- "card-trail-header": "_card-trail-header_c21mz_7",
12
- "card-trail-header-title": "_card-trail-header-title_c21mz_15",
13
- "card-trail-header-merged-button": "_card-trail-header-merged-button_c21mz_29",
14
- "card-trail-list": "_card-trail-list_c21mz_32",
15
- "card-trail-list-item": "_card-trail-list-item_c21mz_45",
16
- pointer: P
17
- }, lr = H((v, D) => {
1
+ import { jsxs as S, jsx as u } from "react/jsx-runtime";
2
+ import { c as n } from "../../index-DIxK0V-G.js";
3
+ import { forwardRef as q, useRef as f, useState as _, useEffect as P, Children as X } from "react";
4
+ import { DEFAULT_SPACE_BETWEEN as Y, DEFAULT_SCROLL_STEP as G, DEFAULT_DIVIDED as J, DEFAULT_CARD_INDEX as K } from "./constants.js";
5
+ import { hasHorizontalScroll as g, isScrollAtEdge as T } from "./utils.js";
6
+ import { useMergeRefs as Q } from "../../hooks/useMergeRefs/useMergeRefs.js";
7
+ import { useThrottledCallback as Z } from "../../hooks/useThrottledCallback/index.js";
8
+ import { MergedButton as rr } from "../MergedButton/MergedButton.js";
9
+ import '../../assets/CardTrail.css';const tr = "_pointer_1wzbr_50", i = {
10
+ "card-trail": "_card-trail_1wzbr_3",
11
+ "card-trail-header": "_card-trail-header_1wzbr_7",
12
+ "card-trail-header-title": "_card-trail-header-title_1wzbr_15",
13
+ "card-trail-header-merged-button": "_card-trail-header-merged-button_1wzbr_29",
14
+ "card-trail-list": "_card-trail-list_1wzbr_32",
15
+ "card-trail-list-item": "_card-trail-list-item_1wzbr_46",
16
+ pointer: tr
17
+ };
18
+ let v = {};
19
+ const dr = q((w, D) => {
18
20
  const {
19
- cardClassName: T,
21
+ cardClassName: L,
20
22
  cardTrailClassName: z,
21
- cardTrailHeaderClassName: L,
23
+ cardTrailHeaderClassName: W,
22
24
  cardTrailListClassName: A,
23
- cardTrailMergedButtonClassName: W,
24
- children: m,
25
- title: f,
26
- spaceBetween: d = j,
27
- scrollStep: _ = V,
28
- mergedButtonProps: l,
29
- scrollToCard: C = !1,
30
- needButtons: k = !0,
31
- dividedCardWidth: p = q,
32
- currentCardIndex: g = X
33
- } = v, r = E(null), n = E(null), [o, I] = u({
25
+ cardTrailMergedButtonClassName: R,
26
+ children: b,
27
+ title: p,
28
+ spaceBetween: o = Y,
29
+ scrollStep: C = G,
30
+ dividedCardWidth: k = J,
31
+ currentCardIndex: h = K,
32
+ mergedButtonProps: c,
33
+ scrollToCard: B = !1,
34
+ needButtons: I = !0,
35
+ padding: l = 0
36
+ } = w, r = f(null), N = f(!0), s = f(null), [d, y] = _({
34
37
  leftButton: !0,
35
38
  rightButton: !1
36
- }), [w, B] = u(0), [y, b] = u(
37
- () => h(r == null ? void 0 : r.current)
38
- ), x = G(r, D), M = J(() => {
39
- const e = !S(r.current, "left"), t = !S(r.current, "right");
40
- I({
41
- leftButton: !e,
42
- rightButton: !t
39
+ }), [M, x] = _(0), [U, E] = _(
40
+ () => g(r == null ? void 0 : r.current)
41
+ ), F = Q(r, D), H = Z(() => {
42
+ var a;
43
+ if (N.current) {
44
+ N.current = !1;
45
+ const m = r.current, V = ((a = m == null ? void 0 : m.children[h]) == null ? void 0 : a.clientWidth) ?? 0;
46
+ x(
47
+ V / k + l + o
48
+ );
49
+ }
50
+ v = {
51
+ paddingLeft: l,
52
+ paddingRight: l,
53
+ marginLeft: -l,
54
+ marginRight: -l
55
+ };
56
+ const t = !T(r.current, "left"), e = !T(r.current, "right");
57
+ y({
58
+ leftButton: !t,
59
+ rightButton: !e
43
60
  });
44
- }, 300), F = (e) => () => {
61
+ }, 300), O = (t) => () => {
45
62
  var a;
46
- if (!C)
63
+ if (!B)
47
64
  return;
48
- const t = (a = r == null ? void 0 : r.current) == null ? void 0 : a.querySelector(
49
- `[data-active-card='${e}']`
65
+ const e = (a = r == null ? void 0 : r.current) == null ? void 0 : a.querySelector(
66
+ `[data-active-card='${t}']`
50
67
  );
51
- t && (t == null || t.scrollIntoView({
68
+ e && (e == null || e.scrollIntoView({
52
69
  behavior: "smooth",
53
70
  block: "nearest",
54
71
  inline: "center"
55
72
  }));
56
- }, R = () => {
73
+ }, $ = () => {
57
74
  var a;
58
- if (!r.current || o.leftButton) return;
59
- const e = r.current, t = ((a = e.children[g]) == null ? void 0 : a.clientWidth) ?? 0;
60
- B(t / p), e.scrollBy({
61
- left: -(t + d) * _,
75
+ if (!r.current || d.leftButton) return;
76
+ const t = r.current, e = ((a = t.children[h]) == null ? void 0 : a.clientWidth) ?? 0;
77
+ t.scrollBy({
78
+ left: -(e + o) * C,
62
79
  behavior: "smooth"
63
80
  });
64
- }, U = () => {
81
+ }, j = () => {
65
82
  var a;
66
- if (!r.current || o.rightButton) return;
67
- const e = r.current, t = ((a = e.children[g]) == null ? void 0 : a.clientWidth) ?? 0;
68
- B(t / p), e.scrollBy({
69
- left: (t + d) * _,
83
+ if (!r.current || d.rightButton) return;
84
+ const t = r.current, e = ((a = t.children[h]) == null ? void 0 : a.clientWidth) ?? 0;
85
+ t.scrollBy({
86
+ left: (e + o) * C,
70
87
  behavior: "smooth"
71
88
  });
72
89
  };
73
- return O(() => {
74
- const e = r.current;
75
- if (e)
76
- return n.current = new ResizeObserver(() => {
77
- b(h(r == null ? void 0 : r.current));
78
- }), n.current.observe(e), b(h(r == null ? void 0 : r.current)), () => {
79
- n.current && n.current.disconnect();
90
+ return P(() => {
91
+ const t = r.current;
92
+ if (t)
93
+ return s.current = new ResizeObserver(() => {
94
+ E(g(r == null ? void 0 : r.current));
95
+ }), s.current.observe(t), E(g(r == null ? void 0 : r.current)), () => {
96
+ s.current && s.current.disconnect();
80
97
  };
81
- }, [m]), /* @__PURE__ */ N("section", { className: i(c["card-trail"], z), children: [
82
- /* @__PURE__ */ N(
98
+ }, [b]), /* @__PURE__ */ S("section", { className: n(i["card-trail"], z), children: [
99
+ /* @__PURE__ */ S(
83
100
  "header",
84
101
  {
85
- className: i(
86
- c["card-trail-header"],
87
- L
102
+ className: n(
103
+ i["card-trail-header"],
104
+ W
88
105
  ),
89
106
  children: [
90
- f && /* @__PURE__ */ s("h3", { className: c["card-trail-header-title"], children: f }),
91
- y && k && /* @__PURE__ */ s(
92
- K,
107
+ p && /* @__PURE__ */ u("h3", { className: i["card-trail-header-title"], children: p }),
108
+ U && I && /* @__PURE__ */ u(
109
+ rr,
93
110
  {
94
- buttonsWrapperClassName: i(
95
- c["card-trail-header-merged-button"],
96
- W
111
+ buttonsWrapperClassName: n(
112
+ i["card-trail-header-merged-button"],
113
+ R
97
114
  ),
98
115
  buttons: [
99
116
  {
100
117
  isIconButton: !0,
101
118
  iconName: "ArrowLeft16px",
102
119
  variant: "gray",
103
- onClick: R,
104
- disabled: o.leftButton,
120
+ onClick: $,
121
+ disabled: d.leftButton,
105
122
  size: "s",
106
- ...l == null ? void 0 : l.leftButton
123
+ ...c == null ? void 0 : c.leftButton
107
124
  },
108
125
  {
109
126
  isIconButton: !0,
110
127
  iconName: "ArrowRight16px",
111
128
  variant: "gray",
112
- onClick: U,
129
+ onClick: j,
113
130
  size: "s",
114
- disabled: o.rightButton,
115
- ...l == null ? void 0 : l.rightButton
131
+ disabled: d.rightButton,
132
+ ...c == null ? void 0 : c.rightButton
116
133
  }
117
134
  ]
118
135
  }
@@ -120,25 +137,29 @@ import '../../assets/CardTrail.css';const P = "_pointer_c21mz_49", c = {
120
137
  ]
121
138
  }
122
139
  ),
123
- /* @__PURE__ */ s(
140
+ /* @__PURE__ */ u(
124
141
  "ul",
125
142
  {
126
- onScroll: M,
127
- style: { gap: d, scrollPadding: `0 ${w}px` },
128
- className: i(c["card-trail-list"], A),
129
- ref: x,
130
- children: $.map(m, (e, t) => /* @__PURE__ */ s(
143
+ onScroll: H,
144
+ style: {
145
+ gap: o,
146
+ scrollPadding: `0 ${M}px`,
147
+ ...v
148
+ },
149
+ className: n(i["card-trail-list"], A),
150
+ ref: F,
151
+ children: X.map(b, (t, e) => /* @__PURE__ */ u(
131
152
  "li",
132
153
  {
133
- onClick: F(t),
134
- "data-active-card": t,
135
- "data-testid": `card-trail-item-${t}`,
136
- className: i(
137
- c["card-trail-list-item"],
138
- { [c.pointer]: C },
139
- T
154
+ onClick: O(e),
155
+ "data-active-card": e,
156
+ "data-testid": `card-trail-item-${e}`,
157
+ className: n(
158
+ i["card-trail-list-item"],
159
+ { [i.pointer]: B },
160
+ L
140
161
  ),
141
- children: e
162
+ children: t
142
163
  }
143
164
  ))
144
165
  }
@@ -146,5 +167,5 @@ import '../../assets/CardTrail.css';const P = "_pointer_c21mz_49", c = {
146
167
  ] });
147
168
  });
148
169
  export {
149
- lr as CardTrail
170
+ dr as CardTrail
150
171
  };
@@ -25,6 +25,22 @@ type TProps = ComponentProps<'img'> & {
25
25
  * Изображение для мобильной версии
26
26
  */
27
27
  mobileImage?: string;
28
+ /**
29
+ * Изображение для Retina (2x) десктопной версии
30
+ */
31
+ desktopImage2x?: string;
32
+ /**
33
+ * Изображение для Retina (2x) мобильной версии
34
+ */
35
+ mobileImage2x?: string;
36
+ /**
37
+ * Изображение для Super Retina (3x) десктопной версии
38
+ */
39
+ desktopImage3x?: string;
40
+ /**
41
+ * Изображение для Super Retina (3x) мобильной версии
42
+ */
43
+ mobileImage3x?: string;
28
44
  };
29
45
  /**
30
46
  * Компонент для отображения изображения с возможность показа загрузки и ошибки
@@ -1,49 +1,77 @@
1
- import { jsxs as E, jsx as i } from "react/jsx-runtime";
2
- import { c as l } from "../../index-DIxK0V-G.js";
3
- import { memo as I, useState as g, useLayoutEffect as N } from "react";
4
- import { EMediaQuery as S, EMinMediaQuery as y } from "../../hooks/useMediaQuery/constants.js";
5
- import '../../assets/Image.css';const b = "_picture_1hx49_2", k = "_image_1hx49_3", L = "_loading_1hx49_10", r = {
6
- picture: b,
7
- image: k,
8
- loading: L
9
- }, z = I((u) => {
1
+ import { jsxs as M, jsx as m } from "react/jsx-runtime";
2
+ import { c as S } from "../../index-DIxK0V-G.js";
3
+ import { memo as j, useState as _, useLayoutEffect as Q } from "react";
4
+ import { EMediaQuery as $, EMinMediaQuery as w } from "../../hooks/useMediaQuery/constants.js";
5
+ import '../../assets/Image.css';const z = "_picture_1hx49_2", A = "_image_1hx49_3", C = "_loading_1hx49_10", a = {
6
+ picture: z,
7
+ image: A,
8
+ loading: C
9
+ }, q = j((h) => {
10
10
  const {
11
- className: d,
12
- src: s,
13
- alt: p = "image",
14
- desktopImage: e,
15
- mobileImage: a,
16
- pictureClassName: f,
17
- errorFallback: c,
18
- fallback: m,
19
- ..._
20
- } = u, [o, n] = g(!0), [h, x] = g(!1);
21
- return N(() => {
22
- const t = new Image();
23
- t.src = s ?? e ?? a ?? "", t.onload = () => {
24
- n(!1);
25
- }, t.onerror = () => {
26
- n(!1), x(!0);
11
+ className: b,
12
+ src: o,
13
+ alt: k = "image",
14
+ desktopImage: r,
15
+ mobileImage: s,
16
+ pictureClassName: E,
17
+ errorFallback: l,
18
+ fallback: n,
19
+ desktopImage2x: g,
20
+ mobileImage2x: u,
21
+ desktopImage3x: d,
22
+ mobileImage3x: p,
23
+ ...N
24
+ } = h, [t, f] = _(!0), [y, L] = _(!1);
25
+ if (Q(() => {
26
+ const e = new Image();
27
+ e.src = o ?? r ?? s ?? "", e.onload = () => {
28
+ f(!1);
29
+ }, e.onerror = () => {
30
+ f(!1), L(!0);
27
31
  };
28
- }, [s, e, a]), o && m ? m : h && c ? c : /* @__PURE__ */ E(
32
+ }, [o, r, s]), t && n)
33
+ return n;
34
+ if (y && l)
35
+ return l;
36
+ const i = (e, x, I) => {
37
+ let c = e;
38
+ return x && (c += `, ${x} 2x`), I && (c += `, ${I} 3x`), c;
39
+ };
40
+ return /* @__PURE__ */ M(
29
41
  "picture",
30
42
  {
31
- className: l(r.picture, f, {
32
- [r.loading]: o
43
+ className: S(a.picture, E, {
44
+ [a.loading]: t
33
45
  }),
34
46
  children: [
35
- a && /* @__PURE__ */ i("source", { srcSet: a, media: S.XS1 }),
36
- e && /* @__PURE__ */ i("source", { srcSet: e, media: y.S }),
37
- /* @__PURE__ */ i(
47
+ s && /* @__PURE__ */ m(
48
+ "source",
49
+ {
50
+ srcSet: i(s, u, p),
51
+ media: $.XS1
52
+ }
53
+ ),
54
+ r && /* @__PURE__ */ m(
55
+ "source",
56
+ {
57
+ srcSet: i(r, g, d),
58
+ media: w.S
59
+ }
60
+ ),
61
+ /* @__PURE__ */ m(
38
62
  "img",
39
63
  {
40
- ..._,
41
- className: l(r.image, d, {
42
- [r.loading]: o
64
+ ...N,
65
+ className: S(a.image, b, {
66
+ [a.loading]: t
43
67
  }),
44
68
  loading: "lazy",
45
- src: s,
46
- alt: p
69
+ srcSet: i(
70
+ o ?? "",
71
+ g ?? u,
72
+ d ?? p
73
+ ),
74
+ alt: k
47
75
  }
48
76
  )
49
77
  ]
@@ -51,5 +79,5 @@ import '../../assets/Image.css';const b = "_picture_1hx49_2", k = "_image_1hx49_
51
79
  );
52
80
  });
53
81
  export {
54
- z as AppImage
82
+ q as AppImage
55
83
  };
@@ -1,36 +1,36 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { c as i } from "../../index-DIxK0V-G.js";
3
- import { forwardRef as _ } from "react";
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { c as _ } from "../../index-DIxK0V-G.js";
3
+ import { forwardRef as p } from "react";
4
4
  import { EClearButtonSize as a, EClearButtonVariant as f } from "./constants.js";
5
5
  import { Icon as u } from "../../icons/Icon.js";
6
- import '../../assets/ClearButton.css';const C = "_clear_135p1_2", y = "_gray_135p1_18", N = "_l_135p1_32", o = {
6
+ import '../../assets/ClearButton.css';const C = "_clear_n3to9_2", y = "_gray_n3to9_18", N = "_l_n3to9_32", o = {
7
7
  clear: C,
8
8
  gray: y,
9
9
  l: N,
10
- "m-s": "_m-s_135p1_36"
11
- }, d = _(
10
+ "m-s": "_m-s_n3to9_36"
11
+ }, d = p(
12
12
  (s, e) => {
13
13
  const {
14
14
  disabled: l = !1,
15
- size: r = a.MS,
15
+ size: t = a.MS,
16
16
  variant: n = f.Gray,
17
17
  className: c,
18
18
  ...m
19
- } = s, p = i(
19
+ } = s, i = _(
20
20
  o.clear,
21
- r === a.L ? o.l : o["m-s"],
21
+ t === a.L ? o.l : o["m-s"],
22
22
  o[n],
23
23
  c
24
24
  );
25
- return /* @__PURE__ */ t(
25
+ return /* @__PURE__ */ r(
26
26
  "button",
27
27
  {
28
28
  type: "button",
29
29
  ref: e,
30
30
  ...m,
31
31
  disabled: l,
32
- className: p,
33
- children: /* @__PURE__ */ t(u, { iconName: r === "l" ? "Close16px" : "Close12px" })
32
+ className: i,
33
+ children: /* @__PURE__ */ r(u, { iconName: t === "l" ? "Close16px" : "Close12px" })
34
34
  }
35
35
  );
36
36
  }
@@ -1,57 +1,57 @@
1
- import { jsx as r, jsxs as a } from "react/jsx-runtime";
2
- import { c as p } from "../../index-DIxK0V-G.js";
3
- import { useState as u, useEffect as w } from "react";
4
- import { EFileItemVariant as h } from "./constants.js";
5
- import { formating as z } from "../../utils/index.js";
6
- import { ClearButton as N } from "../InputClearButton/ClearButton.js";
7
- import '../../assets/ListFiles.css';const y = "_white_rd4f3_61", x = "_gray_rd4f3_66", e = {
8
- "file-info": "_file-info_rd4f3_2",
9
- "file-info-size": "_file-info-size_rd4f3_8",
10
- "file-info-name-wrapper": "_file-info-name-wrapper_rd4f3_19",
11
- "file-info-name": "_file-info-name_rd4f3_19",
12
- "file-upload-container": "_file-upload-container_rd4f3_37",
13
- "file-upload-container-item": "_file-upload-container-item_rd4f3_45",
14
- "delete-button": "_delete-button_rd4f3_54",
15
- white: y,
16
- gray: x
1
+ import { jsx as r, jsxs as s } from "react/jsx-runtime";
2
+ import { c as d } from "../../index-DIxK0V-G.js";
3
+ import { useState as h, useEffect as u } from "react";
4
+ import { EFileItemVariant as q } from "./constants.js";
5
+ import { formating as w } from "../../utils/index.js";
6
+ import { ClearButton as z } from "../InputClearButton/ClearButton.js";
7
+ import '../../assets/ListFiles.css';const N = "_white_hpqrc_61", y = "_gray_hpqrc_66", e = {
8
+ "file-info": "_file-info_hpqrc_2",
9
+ "file-info-size": "_file-info-size_hpqrc_8",
10
+ "file-info-name-wrapper": "_file-info-name-wrapper_hpqrc_19",
11
+ "file-info-name": "_file-info-name_hpqrc_19",
12
+ "file-upload-container": "_file-upload-container_hpqrc_37",
13
+ "file-upload-container-item": "_file-upload-container-item_hpqrc_45",
14
+ "delete-button": "_delete-button_hpqrc_54",
15
+ white: N,
16
+ gray: y
17
17
  };
18
- function F({
18
+ function E({
19
19
  value: n,
20
- onChange: f,
20
+ onChange: o,
21
21
  classNameWrapper: l,
22
- variant: m = h.white,
23
- disabled: c
22
+ variant: c = q.white,
23
+ disabled: m
24
24
  }) {
25
- const [o, s] = u(n);
26
- w(() => {
27
- s(n);
25
+ const [a, f] = h(n);
26
+ u(() => {
27
+ f(n);
28
28
  }, [n]);
29
- const d = async (i) => {
30
- const t = [...o.filter((_) => _.id !== i)];
31
- s(t), f == null || f({ deleteId: i, list: t });
29
+ const p = async (i) => {
30
+ const t = [...a.filter((_) => _.id !== i)];
31
+ f(t), o == null || o({ deleteId: i, list: t });
32
32
  };
33
- return o.length ? /* @__PURE__ */ r(
33
+ return a.length ? /* @__PURE__ */ r(
34
34
  "ul",
35
35
  {
36
- className: p(
36
+ className: d(
37
37
  e["file-upload-container"],
38
38
  l,
39
- e[m]
39
+ e[c]
40
40
  ),
41
- children: o.map((i, t) => /* @__PURE__ */ a("li", { className: e["file-upload-container-item"], children: [
42
- /* @__PURE__ */ a("div", { className: e["file-info"], children: [
43
- (i == null ? void 0 : i.size) && /* @__PURE__ */ a("span", { className: e["file-info-size"], children: [
41
+ children: a.map((i, t) => /* @__PURE__ */ s("li", { className: e["file-upload-container-item"], children: [
42
+ /* @__PURE__ */ s("div", { className: e["file-info"], children: [
43
+ (i == null ? void 0 : i.size) && /* @__PURE__ */ s("span", { className: e["file-info-size"], children: [
44
44
  " ",
45
- z.Size(i == null ? void 0 : i.size)
45
+ w.Size(i == null ? void 0 : i.size)
46
46
  ] }),
47
47
  /* @__PURE__ */ r("div", { className: e["file-info-name-wrapper"], children: /* @__PURE__ */ r("div", { className: e["file-info-name"], children: i.name }) })
48
48
  ] }),
49
- !c && /* @__PURE__ */ r(
50
- N,
49
+ !m && /* @__PURE__ */ r(
50
+ z,
51
51
  {
52
52
  size: "m-s",
53
53
  variant: "gray",
54
- onClick: () => d(i.id)
54
+ onClick: () => p(i.id)
55
55
  }
56
56
  )
57
57
  ] }, t))
@@ -59,5 +59,5 @@ function F({
59
59
  ) : null;
60
60
  }
61
61
  export {
62
- F as ListFiles
62
+ E as ListFiles
63
63
  };
@@ -50,6 +50,10 @@ type TProps = {
50
50
  * Расстояние между слайдами.
51
51
  */
52
52
  spaceBetween?: number;
53
+ /**
54
+ * Функция, которая будет вызвана при клике на слайд.
55
+ */
56
+ onSlideClick?: VoidFunction;
53
57
  };
54
- export declare const PromoSlider: ({ slides, delay, spaceBetween, imageClassName, slideClassName, swiperClassName, contentClassName }: TProps) => import("react/jsx-runtime").JSX.Element;
58
+ export declare const PromoSlider: ({ slides, onSlideClick, delay, spaceBetween, imageClassName, slideClassName, swiperClassName, contentClassName }: TProps) => import("react/jsx-runtime").JSX.Element;
55
59
  export {};
@@ -1,80 +1,80 @@
1
- import { jsxs as Y, jsx as L, Fragment as K } from "react/jsx-runtime";
2
- import { c as A } from "../../index-DIxK0V-G.js";
1
+ import { jsxs as Y, jsx as L, Fragment as F } from "react/jsx-runtime";
2
+ import { c as C } from "../../index-DIxK0V-G.js";
3
3
  import { useState as j } from "react";
4
- import { g as R, b as G, e as U, c as $, n as B, d as C, S as q, A as Z, a as J } from "../../swiper-react-BvAw14a4.js";
4
+ import { g as R, b as G, e as U, c as $, n as B, d as A, S as q, A as Z, a as J } from "../../swiper-react-BvAw14a4.js";
5
5
  import { Chip as Q } from "../Chip/Chip.js";
6
6
  import { AppImage as ee } from "../Image/Image.js";
7
7
  import '../../assets/PromoSlider.css';function te(P) {
8
8
  let {
9
9
  swiper: e,
10
- extendParams: S,
11
- on: w,
12
- emit: _
10
+ extendParams: k,
11
+ on: T,
12
+ emit: x
13
13
  } = P;
14
- const c = R(), b = G();
14
+ const p = R(), v = G();
15
15
  e.keyboard = {
16
16
  enabled: !1
17
- }, S({
17
+ }, k({
18
18
  keyboard: {
19
19
  enabled: !1,
20
20
  onlyInViewport: !0,
21
21
  pageUpDown: !0
22
22
  }
23
23
  });
24
- function I(E) {
24
+ function I(n) {
25
25
  if (!e.enabled) return;
26
26
  const {
27
- rtlTranslate: x
27
+ rtlTranslate: u
28
28
  } = e;
29
- let l = E;
30
- l.originalEvent && (l = l.originalEvent);
31
- const T = l.keyCode || l.charCode, H = e.params.keyboard.pageUpDown, h = H && T === 33, v = H && T === 34, y = T === 37, M = T === 39, n = T === 38, s = T === 40;
32
- if (!e.allowSlideNext && (e.isHorizontal() && M || e.isVertical() && s || v) || !e.allowSlidePrev && (e.isHorizontal() && y || e.isVertical() && n || h))
29
+ let o = n;
30
+ o.originalEvent && (o = o.originalEvent);
31
+ const g = o.keyCode || o.charCode, H = e.params.keyboard.pageUpDown, b = H && g === 33, _ = H && g === 34, y = g === 37, M = g === 39, t = g === 38, s = g === 40;
32
+ if (!e.allowSlideNext && (e.isHorizontal() && M || e.isVertical() && s || _) || !e.allowSlidePrev && (e.isHorizontal() && y || e.isVertical() && t || b))
33
33
  return !1;
34
- if (!(l.shiftKey || l.altKey || l.ctrlKey || l.metaKey) && !(c.activeElement && c.activeElement.nodeName && (c.activeElement.nodeName.toLowerCase() === "input" || c.activeElement.nodeName.toLowerCase() === "textarea"))) {
35
- if (e.params.keyboard.onlyInViewport && (h || v || y || M || n || s)) {
34
+ if (!(o.shiftKey || o.altKey || o.ctrlKey || o.metaKey) && !(p.activeElement && p.activeElement.nodeName && (p.activeElement.nodeName.toLowerCase() === "input" || p.activeElement.nodeName.toLowerCase() === "textarea"))) {
35
+ if (e.params.keyboard.onlyInViewport && (b || _ || y || M || t || s)) {
36
36
  let N = !1;
37
37
  if (U(e.el, `.${e.params.slideClass}, swiper-slide`).length > 0 && U(e.el, `.${e.params.slideActiveClass}`).length === 0)
38
38
  return;
39
- const p = e.el, d = p.clientWidth, u = p.clientHeight, a = b.innerWidth, o = b.innerHeight, i = $(p);
40
- x && (i.left -= p.scrollLeft);
41
- const D = [[i.left, i.top], [i.left + d, i.top], [i.left, i.top + u], [i.left + d, i.top + u]];
39
+ const w = e.el, m = w.clientWidth, d = w.clientHeight, a = v.innerWidth, f = v.innerHeight, l = $(w);
40
+ u && (l.left -= w.scrollLeft);
41
+ const D = [[l.left, l.top], [l.left + m, l.top], [l.left, l.top + d], [l.left + m, l.top + d]];
42
42
  for (let r = 0; r < D.length; r += 1) {
43
- const f = D[r];
44
- if (f[0] >= 0 && f[0] <= a && f[1] >= 0 && f[1] <= o) {
45
- if (f[0] === 0 && f[1] === 0) continue;
43
+ const c = D[r];
44
+ if (c[0] >= 0 && c[0] <= a && c[1] >= 0 && c[1] <= f) {
45
+ if (c[0] === 0 && c[1] === 0) continue;
46
46
  N = !0;
47
47
  }
48
48
  }
49
49
  if (!N) return;
50
50
  }
51
- e.isHorizontal() ? ((h || v || y || M) && (l.preventDefault ? l.preventDefault() : l.returnValue = !1), ((v || M) && !x || (h || y) && x) && e.slideNext(), ((h || y) && !x || (v || M) && x) && e.slidePrev()) : ((h || v || n || s) && (l.preventDefault ? l.preventDefault() : l.returnValue = !1), (v || s) && e.slideNext(), (h || n) && e.slidePrev()), _("keyPress", T);
51
+ e.isHorizontal() ? ((b || _ || y || M) && (o.preventDefault ? o.preventDefault() : o.returnValue = !1), ((_ || M) && !u || (b || y) && u) && e.slideNext(), ((b || y) && !u || (_ || M) && u) && e.slidePrev()) : ((b || _ || t || s) && (o.preventDefault ? o.preventDefault() : o.returnValue = !1), (_ || s) && e.slideNext(), (b || t) && e.slidePrev()), x("keyPress", g);
52
52
  }
53
53
  }
54
- function m() {
55
- e.keyboard.enabled || (c.addEventListener("keydown", I), e.keyboard.enabled = !0);
54
+ function h() {
55
+ e.keyboard.enabled || (p.addEventListener("keydown", I), e.keyboard.enabled = !0);
56
56
  }
57
- function t() {
58
- e.keyboard.enabled && (c.removeEventListener("keydown", I), e.keyboard.enabled = !1);
57
+ function i() {
58
+ e.keyboard.enabled && (p.removeEventListener("keydown", I), e.keyboard.enabled = !1);
59
59
  }
60
- w("init", () => {
61
- e.params.keyboard.enabled && m();
62
- }), w("destroy", () => {
63
- e.keyboard.enabled && t();
60
+ T("init", () => {
61
+ e.params.keyboard.enabled && h();
62
+ }), T("destroy", () => {
63
+ e.keyboard.enabled && i();
64
64
  }), Object.assign(e.keyboard, {
65
- enable: m,
66
- disable: t
65
+ enable: h,
66
+ disable: i
67
67
  });
68
68
  }
69
69
  function ne(P) {
70
70
  let {
71
71
  swiper: e,
72
- extendParams: S,
73
- on: w,
74
- emit: _
72
+ extendParams: k,
73
+ on: T,
74
+ emit: x
75
75
  } = P;
76
- const c = G();
77
- S({
76
+ const p = G();
77
+ k({
78
78
  mousewheel: {
79
79
  enabled: !1,
80
80
  releaseOnEdges: !1,
@@ -89,123 +89,123 @@ function ne(P) {
89
89
  }), e.mousewheel = {
90
90
  enabled: !1
91
91
  };
92
- let b, I = C(), m;
93
- const t = [];
94
- function E(n) {
95
- let d = 0, u = 0, a = 0, o = 0;
96
- return "detail" in n && (u = n.detail), "wheelDelta" in n && (u = -n.wheelDelta / 120), "wheelDeltaY" in n && (u = -n.wheelDeltaY / 120), "wheelDeltaX" in n && (d = -n.wheelDeltaX / 120), "axis" in n && n.axis === n.HORIZONTAL_AXIS && (d = u, u = 0), a = d * 10, o = u * 10, "deltaY" in n && (o = n.deltaY), "deltaX" in n && (a = n.deltaX), n.shiftKey && !a && (a = o, o = 0), (a || o) && n.deltaMode && (n.deltaMode === 1 ? (a *= 40, o *= 40) : (a *= 800, o *= 800)), a && !d && (d = a < 1 ? -1 : 1), o && !u && (u = o < 1 ? -1 : 1), {
97
- spinX: d,
98
- spinY: u,
92
+ let v, I = A(), h;
93
+ const i = [];
94
+ function n(t) {
95
+ let m = 0, d = 0, a = 0, f = 0;
96
+ return "detail" in t && (d = t.detail), "wheelDelta" in t && (d = -t.wheelDelta / 120), "wheelDeltaY" in t && (d = -t.wheelDeltaY / 120), "wheelDeltaX" in t && (m = -t.wheelDeltaX / 120), "axis" in t && t.axis === t.HORIZONTAL_AXIS && (m = d, d = 0), a = m * 10, f = d * 10, "deltaY" in t && (f = t.deltaY), "deltaX" in t && (a = t.deltaX), t.shiftKey && !a && (a = f, f = 0), (a || f) && t.deltaMode && (t.deltaMode === 1 ? (a *= 40, f *= 40) : (a *= 800, f *= 800)), a && !m && (m = a < 1 ? -1 : 1), f && !d && (d = f < 1 ? -1 : 1), {
97
+ spinX: m,
98
+ spinY: d,
99
99
  pixelX: a,
100
- pixelY: o
100
+ pixelY: f
101
101
  };
102
102
  }
103
- function x() {
103
+ function u() {
104
104
  e.enabled && (e.mouseEntered = !0);
105
105
  }
106
- function l() {
106
+ function o() {
107
107
  e.enabled && (e.mouseEntered = !1);
108
108
  }
109
- function T(n) {
110
- return e.params.mousewheel.thresholdDelta && n.delta < e.params.mousewheel.thresholdDelta || e.params.mousewheel.thresholdTime && C() - I < e.params.mousewheel.thresholdTime ? !1 : n.delta >= 6 && C() - I < 60 ? !0 : (n.direction < 0 ? (!e.isEnd || e.params.loop) && !e.animating && (e.slideNext(), _("scroll", n.raw)) : (!e.isBeginning || e.params.loop) && !e.animating && (e.slidePrev(), _("scroll", n.raw)), I = new c.Date().getTime(), !1);
109
+ function g(t) {
110
+ return e.params.mousewheel.thresholdDelta && t.delta < e.params.mousewheel.thresholdDelta || e.params.mousewheel.thresholdTime && A() - I < e.params.mousewheel.thresholdTime ? !1 : t.delta >= 6 && A() - I < 60 ? !0 : (t.direction < 0 ? (!e.isEnd || e.params.loop) && !e.animating && (e.slideNext(), x("scroll", t.raw)) : (!e.isBeginning || e.params.loop) && !e.animating && (e.slidePrev(), x("scroll", t.raw)), I = new p.Date().getTime(), !1);
111
111
  }
112
- function H(n) {
112
+ function H(t) {
113
113
  const s = e.params.mousewheel;
114
- if (n.direction < 0) {
114
+ if (t.direction < 0) {
115
115
  if (e.isEnd && !e.params.loop && s.releaseOnEdges)
116
116
  return !0;
117
117
  } else if (e.isBeginning && !e.params.loop && s.releaseOnEdges)
118
118
  return !0;
119
119
  return !1;
120
120
  }
121
- function h(n) {
122
- let s = n, N = !0;
123
- if (!e.enabled || n.target.closest(`.${e.params.mousewheel.noMousewheelClass}`)) return;
124
- const p = e.params.mousewheel;
121
+ function b(t) {
122
+ let s = t, N = !0;
123
+ if (!e.enabled || t.target.closest(`.${e.params.mousewheel.noMousewheelClass}`)) return;
124
+ const w = e.params.mousewheel;
125
125
  e.params.cssMode && s.preventDefault();
126
- let d = e.el;
127
- e.params.mousewheel.eventsTarget !== "container" && (d = document.querySelector(e.params.mousewheel.eventsTarget));
128
- const u = d && d.contains(s.target);
129
- if (!e.mouseEntered && !u && !p.releaseOnEdges) return !0;
126
+ let m = e.el;
127
+ e.params.mousewheel.eventsTarget !== "container" && (m = document.querySelector(e.params.mousewheel.eventsTarget));
128
+ const d = m && m.contains(s.target);
129
+ if (!e.mouseEntered && !d && !w.releaseOnEdges) return !0;
130
130
  s.originalEvent && (s = s.originalEvent);
131
131
  let a = 0;
132
- const o = e.rtlTranslate ? -1 : 1, i = E(s);
133
- if (p.forceToAxis)
132
+ const f = e.rtlTranslate ? -1 : 1, l = n(s);
133
+ if (w.forceToAxis)
134
134
  if (e.isHorizontal())
135
- if (Math.abs(i.pixelX) > Math.abs(i.pixelY)) a = -i.pixelX * o;
135
+ if (Math.abs(l.pixelX) > Math.abs(l.pixelY)) a = -l.pixelX * f;
136
136
  else return !0;
137
- else if (Math.abs(i.pixelY) > Math.abs(i.pixelX)) a = -i.pixelY;
137
+ else if (Math.abs(l.pixelY) > Math.abs(l.pixelX)) a = -l.pixelY;
138
138
  else return !0;
139
139
  else
140
- a = Math.abs(i.pixelX) > Math.abs(i.pixelY) ? -i.pixelX * o : -i.pixelY;
140
+ a = Math.abs(l.pixelX) > Math.abs(l.pixelY) ? -l.pixelX * f : -l.pixelY;
141
141
  if (a === 0) return !0;
142
- p.invert && (a = -a);
143
- let D = e.getTranslate() + a * p.sensitivity;
142
+ w.invert && (a = -a);
143
+ let D = e.getTranslate() + a * w.sensitivity;
144
144
  if (D >= e.minTranslate() && (D = e.minTranslate()), D <= e.maxTranslate() && (D = e.maxTranslate()), N = e.params.loop ? !0 : !(D === e.minTranslate() || D === e.maxTranslate()), N && e.params.nested && s.stopPropagation(), !e.params.freeMode || !e.params.freeMode.enabled) {
145
145
  const r = {
146
- time: C(),
146
+ time: A(),
147
147
  delta: Math.abs(a),
148
148
  direction: Math.sign(a),
149
- raw: n
149
+ raw: t
150
150
  };
151
- t.length >= 2 && t.shift();
152
- const f = t.length ? t[t.length - 1] : void 0;
153
- if (t.push(r), f ? (r.direction !== f.direction || r.delta > f.delta || r.time > f.time + 150) && T(r) : T(r), H(r))
151
+ i.length >= 2 && i.shift();
152
+ const c = i.length ? i[i.length - 1] : void 0;
153
+ if (i.push(r), c ? (r.direction !== c.direction || r.delta > c.delta || r.time > c.time + 150) && g(r) : g(r), H(r))
154
154
  return !0;
155
155
  } else {
156
156
  const r = {
157
- time: C(),
157
+ time: A(),
158
158
  delta: Math.abs(a),
159
159
  direction: Math.sign(a)
160
- }, f = m && r.time < m.time + 500 && r.delta <= m.delta && r.direction === m.direction;
161
- if (!f) {
162
- m = void 0;
163
- let k = e.getTranslate() + a * p.sensitivity;
164
- const W = e.isBeginning, F = e.isEnd;
165
- if (k >= e.minTranslate() && (k = e.minTranslate()), k <= e.maxTranslate() && (k = e.maxTranslate()), e.setTransition(0), e.setTranslate(k), e.updateProgress(), e.updateActiveIndex(), e.updateSlidesClasses(), (!W && e.isBeginning || !F && e.isEnd) && e.updateSlidesClasses(), e.params.loop && e.loopFix({
160
+ }, c = h && r.time < h.time + 500 && r.delta <= h.delta && r.direction === h.direction;
161
+ if (!c) {
162
+ h = void 0;
163
+ let S = e.getTranslate() + a * w.sensitivity;
164
+ const W = e.isBeginning, K = e.isEnd;
165
+ if (S >= e.minTranslate() && (S = e.minTranslate()), S <= e.maxTranslate() && (S = e.maxTranslate()), e.setTransition(0), e.setTranslate(S), e.updateProgress(), e.updateActiveIndex(), e.updateSlidesClasses(), (!W && e.isBeginning || !K && e.isEnd) && e.updateSlidesClasses(), e.params.loop && e.loopFix({
166
166
  direction: r.direction < 0 ? "next" : "prev",
167
167
  byMousewheel: !0
168
168
  }), e.params.freeMode.sticky) {
169
- clearTimeout(b), b = void 0, t.length >= 15 && t.shift();
170
- const X = t.length ? t[t.length - 1] : void 0, z = t[0];
171
- if (t.push(r), X && (r.delta > X.delta || r.direction !== X.direction))
172
- t.splice(0);
173
- else if (t.length >= 15 && r.time - z.time < 500 && z.delta - r.delta >= 1 && r.delta <= 6) {
169
+ clearTimeout(v), v = void 0, i.length >= 15 && i.shift();
170
+ const X = i.length ? i[i.length - 1] : void 0, z = i[0];
171
+ if (i.push(r), X && (r.delta > X.delta || r.direction !== X.direction))
172
+ i.splice(0);
173
+ else if (i.length >= 15 && r.time - z.time < 500 && z.delta - r.delta >= 1 && r.delta <= 6) {
174
174
  const O = a > 0 ? 0.8 : 0.2;
175
- m = r, t.splice(0), b = B(() => {
175
+ h = r, i.splice(0), v = B(() => {
176
176
  e.slideToClosest(e.params.speed, !0, void 0, O);
177
177
  }, 0);
178
178
  }
179
- b || (b = B(() => {
180
- m = r, t.splice(0), e.slideToClosest(e.params.speed, !0, void 0, 0.5);
179
+ v || (v = B(() => {
180
+ h = r, i.splice(0), e.slideToClosest(e.params.speed, !0, void 0, 0.5);
181
181
  }, 500));
182
182
  }
183
- if (f || _("scroll", s), e.params.autoplay && e.params.autoplayDisableOnInteraction && e.autoplay.stop(), p.releaseOnEdges && (k === e.minTranslate() || k === e.maxTranslate()))
183
+ if (c || x("scroll", s), e.params.autoplay && e.params.autoplayDisableOnInteraction && e.autoplay.stop(), w.releaseOnEdges && (S === e.minTranslate() || S === e.maxTranslate()))
184
184
  return !0;
185
185
  }
186
186
  }
187
187
  return s.preventDefault ? s.preventDefault() : s.returnValue = !1, !1;
188
188
  }
189
- function v(n) {
189
+ function _(t) {
190
190
  let s = e.el;
191
- e.params.mousewheel.eventsTarget !== "container" && (s = document.querySelector(e.params.mousewheel.eventsTarget)), s[n]("mouseenter", x), s[n]("mouseleave", l), s[n]("wheel", h);
191
+ e.params.mousewheel.eventsTarget !== "container" && (s = document.querySelector(e.params.mousewheel.eventsTarget)), s[t]("mouseenter", u), s[t]("mouseleave", o), s[t]("wheel", b);
192
192
  }
193
193
  function y() {
194
- return e.params.cssMode ? (e.wrapperEl.removeEventListener("wheel", h), !0) : e.mousewheel.enabled ? !1 : (v("addEventListener"), e.mousewheel.enabled = !0, !0);
194
+ return e.params.cssMode ? (e.wrapperEl.removeEventListener("wheel", b), !0) : e.mousewheel.enabled ? !1 : (_("addEventListener"), e.mousewheel.enabled = !0, !0);
195
195
  }
196
196
  function M() {
197
- return e.params.cssMode ? (e.wrapperEl.addEventListener(event, h), !0) : e.mousewheel.enabled ? (v("removeEventListener"), e.mousewheel.enabled = !1, !0) : !1;
197
+ return e.params.cssMode ? (e.wrapperEl.addEventListener(event, b), !0) : e.mousewheel.enabled ? (_("removeEventListener"), e.mousewheel.enabled = !1, !0) : !1;
198
198
  }
199
- w("init", () => {
199
+ T("init", () => {
200
200
  !e.params.mousewheel.enabled && e.params.cssMode && M(), e.params.mousewheel.enabled && y();
201
- }), w("destroy", () => {
201
+ }), T("destroy", () => {
202
202
  e.params.cssMode && y(), e.mousewheel.enabled && M();
203
203
  }), Object.assign(e.mousewheel, {
204
204
  enable: y,
205
205
  disable: M
206
206
  });
207
207
  }
208
- const ae = "_swiper_f3z07_2", se = "_slide_f3z07_7", re = "_image_f3z07_14", ie = "_chip_f3z07_21", le = "_content_f3z07_27", oe = "_bullet_f3z07_46", g = {
208
+ const ae = "_swiper_f3z07_2", se = "_slide_f3z07_7", re = "_image_f3z07_14", ie = "_chip_f3z07_21", le = "_content_f3z07_27", oe = "_bullet_f3z07_46", E = {
209
209
  swiper: ae,
210
210
  slide: se,
211
211
  image: re,
@@ -216,90 +216,91 @@ const ae = "_swiper_f3z07_2", se = "_slide_f3z07_7", re = "_image_f3z07_14", ie
216
216
  "bullet-active": "_bullet-active_f3z07_47",
217
217
  "bullet-s": "_bullet-s_f3z07_48",
218
218
  "bullet-xs": "_bullet-xs_f3z07_49"
219
- }, V = 5, ue = 5e3, fe = 8, de = (P, e) => {
220
- const S = e % V, w = Math.abs(P - S), _ = 0, c = 1;
221
- return w === _ ? g["bullet-active"] : w === c ? g["bullet-s"] : g["bullet-xs"];
219
+ }, V = 5, fe = 5e3, ue = 8, de = (P, e) => {
220
+ const k = e % V, T = Math.abs(P - k), x = 0, p = 1;
221
+ return T === x ? E["bullet-active"] : T === p ? E["bullet-s"] : E["bullet-xs"];
222
222
  }, be = ({
223
223
  slides: P,
224
- delay: e = ue,
225
- spaceBetween: S = fe,
226
- imageClassName: w,
227
- slideClassName: _,
228
- swiperClassName: c,
229
- contentClassName: b
224
+ onSlideClick: e,
225
+ delay: k = fe,
226
+ spaceBetween: T = ue,
227
+ imageClassName: x,
228
+ slideClassName: p,
229
+ swiperClassName: v,
230
+ contentClassName: I
230
231
  }) => {
231
- const [I, m] = j(0);
232
+ const [h, i] = j(0);
232
233
  return /* @__PURE__ */ Y(
233
234
  q,
234
235
  {
235
236
  direction: "horizontal",
236
- spaceBetween: S,
237
+ spaceBetween: T,
237
238
  modules: [Z, te, ne],
238
- onSlideChange: (t) => m(t.realIndex),
239
+ onSlideChange: (n) => i(n.realIndex),
239
240
  loop: !0,
240
241
  mousewheel: !0,
241
242
  keyboard: {
242
- enabled: !0,
243
- onlyInViewport: !0
243
+ enabled: !0
244
244
  },
245
245
  autoplay: {
246
- delay: e,
246
+ delay: k,
247
247
  disableOnInteraction: !1,
248
248
  pauseOnMouseEnter: !0
249
249
  },
250
- className: A(g.swiper, c),
250
+ className: C(E.swiper, v),
251
251
  children: [
252
- P.map((t) => {
253
- if (!t) return null;
254
- const E = t != null && t.imageUrl ? /* @__PURE__ */ L(
252
+ P.map((n) => {
253
+ if (!n) return null;
254
+ const u = n != null && n.imageUrl ? /* @__PURE__ */ L(
255
255
  ee,
256
256
  {
257
- className: A(g.image, w),
258
- src: t.imageUrl,
259
- desktopImage: t.imageDesktop,
260
- mobileImage: t.imageMobile,
261
- alt: t.title
257
+ className: C(E.image, x),
258
+ src: n.imageUrl,
259
+ desktopImage: n.imageDesktop,
260
+ mobileImage: n.imageMobile,
261
+ alt: n.title
262
262
  }
263
- ) : null, x = /* @__PURE__ */ L(
263
+ ) : null, o = /* @__PURE__ */ L(
264
264
  "a",
265
265
  {
266
- className: g.link,
267
- href: t.url,
266
+ className: E.link,
267
+ href: n.url,
268
268
  rel: "noopener noreferrer",
269
269
  target: "_blank",
270
- children: E
270
+ children: u
271
271
  }
272
- ), l = () => t.url ? x : E;
272
+ ), g = () => n.url ? o : u;
273
273
  return /* @__PURE__ */ L(
274
274
  J,
275
275
  {
276
- className: A(g.slide, _),
277
- children: /* @__PURE__ */ Y(K, { children: [
278
- t.isPromotion && /* @__PURE__ */ L(
276
+ onClick: e,
277
+ className: C(E.slide, p),
278
+ children: /* @__PURE__ */ Y(F, { children: [
279
+ n.isPromotion && /* @__PURE__ */ L(
279
280
  Q,
280
281
  {
281
- ...t.promotionProps,
282
- className: A(
283
- t.promotionProps.className,
284
- g.chip
282
+ ...n.promotionProps,
283
+ className: C(
284
+ n.promotionProps.className,
285
+ E.chip
285
286
  )
286
287
  }
287
288
  ),
288
- l(),
289
- (t == null ? void 0 : t.content) && /* @__PURE__ */ L("div", { className: A(g.content, b), children: t == null ? void 0 : t.content })
289
+ g(),
290
+ (n == null ? void 0 : n.content) && /* @__PURE__ */ L("div", { className: C(E.content, I), children: n == null ? void 0 : n.content })
290
291
  ] })
291
292
  },
292
- t.id
293
+ n.id
293
294
  );
294
295
  }),
295
- /* @__PURE__ */ L("div", { className: g["custom-pagination"], children: Array.from({ length: V }).map((t, E) => /* @__PURE__ */ L(
296
+ /* @__PURE__ */ L("div", { className: E["custom-pagination"], children: Array.from({ length: V }).map((n, u) => /* @__PURE__ */ L(
296
297
  "button",
297
298
  {
299
+ tabIndex: u,
298
300
  type: "button",
299
- autoFocus: E === 0,
300
- className: A(g.bullet, de(E, I))
301
+ className: C(E.bullet, de(u, h))
301
302
  },
302
- E
303
+ u
303
304
  )) })
304
305
  ]
305
306
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mimir-ui-kit",
3
3
  "private": false,
4
- "version": "1.42.0",
4
+ "version": "1.42.2",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
@@ -13,9 +13,7 @@ $xxs: 375px;
13
13
  @media (min-width: $breakpoint) {
14
14
  @content;
15
15
  }
16
- }
17
-
18
- @else if $type == max {
16
+ } @else if $type == max {
19
17
  @media (max-width: $breakpoint) {
20
18
  @content;
21
19
  }