skillgrid 0.0.85 → 0.0.86

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.
@@ -0,0 +1 @@
1
+ ._stack_184s0_1{pointer-events:none;position:fixed;z-index:var(--z-toast);bottom:48px;left:50%;transform:translate(-50%);overflow-x:clip;display:flex;flex-direction:column;align-items:center;box-sizing:border-box;width:100%;padding:24px 24px 0}._stack_184s0_1._local_184s0_20{position:absolute;right:0;left:0;transform:none}._snackGroup_184s0_27{display:inline-flex;flex-direction:column;align-items:stretch;box-sizing:border-box;max-width:100%}._snackGroupHug_184s0_43{width:fit-content;max-width:100%}._snackGroupFix_184s0_54{width:600px;max-width:100%}._snackGroupFill_184s0_64{width:100%}._snackWrapper_184s0_68{pointer-events:none;display:flex;justify-content:center;width:100%;transition:transform var(--duration-400) var(--ease-in-out)}@media (width <= 600px){._stack_184s0_1{bottom:16px;padding:16px 16px 0}}
@@ -0,0 +1 @@
1
+ :root{--snackbar-content-gap: 8px;--snackbar-content-big-gap: 11px;--snackbar-vertical-padding: 24px;--snackbar-horizontal-padding: 16px 24px;--snackbar-vertical-radius: 24px;--snackbar-horizontal-radius: 64px;--snackbar-bg: #000000;--snackbar-color: var(--text-text-invert, #ffffff)}._snackbar_92a88_13{pointer-events:all;will-change:transform,opacity;z-index:var(--z-toast);overflow:hidden;display:flex;gap:var(--snackbar-content-big-gap);align-items:center;justify-content:space-between;padding:var(--snackbar-horizontal-padding);font-family:var(--font-family);font-weight:400;color:var(--snackbar-color);background-color:var(--snackbar-bg);border-radius:var(--snackbar-horizontal-radius);transition:transform var(--duration-300) var(--ease-in-out),opacity var(--duration-300) var(--ease-in-out);animation-name:_slideIn_92a88_1;animation-duration:var(--duration-300);animation-timing-function:var(--ease-in-out);animation-fill-mode:both}._snackbarStack_92a88_44{animation-duration:var(--duration-400);animation-timing-function:var(--ease-in-out)}._snackbarVertical_92a88_49{align-items:start;padding:var(--snackbar-vertical-padding);border-radius:var(--snackbar-vertical-radius)}._fix_92a88_56{box-sizing:border-box;width:100%;max-width:600px}._fill_92a88_62{box-sizing:border-box;width:100%;max-width:none}._hug_92a88_68{display:inline-flex;width:auto;max-width:100%}._snackbar_92a88_13._stackWidth_92a88_80{box-sizing:border-box;width:100%;max-width:100%}._content_92a88_86{touch-action:auto;display:flex;gap:var(--snackbar-content-gap);align-items:center;width:100%}._textActionsContainer_92a88_96{display:flex;gap:var(--snackbar-content-big-gap);align-items:center;width:100%}._textActionsContainerVertical_92a88_103{flex-direction:column;align-items:start}._contentVertical_92a88_108{align-items:start}._contentText_92a88_112{width:100%;overflow-wrap:anywhere}._icon_92a88_117{width:24px;height:24px}._buttonLink_92a88_122{min-width:fit-content;font-weight:600}._exiting_92a88_128{animation-name:_slideOut_92a88_1;animation-fill-mode:both}._exitingTimeout_92a88_134{animation-duration:var(--duration-500);animation-timing-function:var(--ease-in-out)}._exitingClose_92a88_139{animation-duration:var(--duration-100);animation-timing-function:var(--ease-in-out)}._exitingStack_92a88_145{animation-duration:var(--duration-400);animation-timing-function:var(--ease-in-out);animation-fill-mode:both}._swipeTransition_92a88_151{transition:transform var(--duration-300) var(--ease-in-out),opacity var(--duration-300) var(--ease-in-out)}._exitingEscape_92a88_157{animation-duration:var(--duration-100);animation-timing-function:var(--ease-in-out)}@keyframes _slideOut_92a88_1{0%{transform:translateY(0) scale(1);opacity:1}to{transform:translateY(100%) scale(.75);opacity:0}}@keyframes _slideIn_92a88_1{0%{transform:translateY(100%) scale(.75);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}
@@ -1,76 +1,165 @@
1
- import { jsx as n, jsxs as y } from "react/jsx-runtime";
2
- import { useReducer as I, useEffect as c } from "react";
3
- import d from "react-dom";
4
- import T from "classnames";
5
- import { nanoid as k } from "nanoid";
6
- import i from "./SnackbarProvider.module.css.js";
7
- import { Snackbar as w } from "../Snackbar.js";
8
- import { snackbarReducer as O } from "../lib/snackbarReducer/snackbarReducer.js";
9
- import { MAX_VISIBLE as R } from "../lib/constants.js";
10
- import { SnackbarContext as q } from "../lib/useSnackbar.js";
11
- const V = (p) => {
12
- const { children: m, dataTestId: f = "snackbar-wrapper" } = p, [o, s] = I(O, { visible: [], queue: [] }), u = (e) => {
13
- const t = k(), r = { ...e, id: t, open: !0 };
14
- s({ type: "ENQUEUE", snack: r });
15
- }, S = (e) => {
16
- s({ type: "REMOVE", id: e });
1
+ import { jsx as u, jsxs as M } from "react/jsx-runtime";
2
+ import { useReducer as O, useEffect as v, useRef as T, useState as S, useLayoutEffect as x } from "react";
3
+ import E from "react-dom";
4
+ import N from "classnames";
5
+ import { nanoid as W } from "nanoid";
6
+ import l from "./SnackbarProvider.module.css.js";
7
+ import { Snackbar as C } from "../Snackbar.js";
8
+ import { snackbarReducer as I } from "../lib/snackbarReducer/snackbarReducer.js";
9
+ import { MAX_VISIBLE as k } from "../lib/constants.js";
10
+ import { SnackbarContext as G } from "../lib/useSnackbar.js";
11
+ const f = {
12
+ hug: 0,
13
+ fix: 1,
14
+ fill: 2
15
+ }, H = (n) => n.reduce((d, p) => {
16
+ const t = p.mode ?? "fix";
17
+ return f[t] > f[d] ? t : d;
18
+ }, "hug"), R = ({
19
+ snacks: n,
20
+ dataTestId: d,
21
+ onClose: p
22
+ }) => {
23
+ const t = T(null), [s, h] = S("hug"), [m, g] = S(0), a = H(n), c = n.length > 0 && f[a] > f[s] ? a : s;
24
+ x(() => {
25
+ if (n.length === 0) {
26
+ h("hug"), g(0);
27
+ return;
28
+ }
29
+ h((r) => f[a] > f[r] ? a : r);
30
+ }, [n.length, a]), x(() => {
31
+ if (n.length === 0 || c !== "hug")
32
+ return;
33
+ const r = t.current;
34
+ if (!r) return;
35
+ const e = () => {
36
+ const i = r.getBoundingClientRect().width;
37
+ g(
38
+ (y) => Math.max(y, i)
39
+ );
40
+ };
41
+ e();
42
+ const o = new ResizeObserver(e);
43
+ return o.observe(r), () => o.disconnect();
44
+ }, [c, n.length]);
45
+ const b = n.length > 1;
46
+ return /* @__PURE__ */ u(
47
+ "div",
48
+ {
49
+ ref: t,
50
+ className: N(l.snackGroup, {
51
+ [l.snackGroupHug]: c === "hug",
52
+ [l.snackGroupFix]: c === "fix",
53
+ [l.snackGroupFill]: c === "fill"
54
+ }),
55
+ style: m > 0 ? {
56
+ /**
57
+ * Сохранённая hug-ширина продолжает действовать
58
+ * и после перехода в fix/fill.
59
+ *
60
+ * Например:
61
+ * hug 820px -> fix не должен уменьшить стек до 600px.
62
+ */
63
+ minWidth: `min(${m}px, 100%)`
64
+ } : void 0,
65
+ children: n.map((r, e) => {
66
+ const o = (n.length - 1 - e) * -8;
67
+ return /* @__PURE__ */ u(
68
+ "div",
69
+ {
70
+ "data-testid": d,
71
+ className: l.snackWrapper,
72
+ style: {
73
+ transform: `translateY(${o}px)`
74
+ },
75
+ children: /* @__PURE__ */ u(
76
+ C,
77
+ {
78
+ ...r,
79
+ open: !r.exiting,
80
+ isStack: b,
81
+ stretchToStack: !0,
82
+ forceClose: r.exiting,
83
+ onClose: () => p(r.id)
84
+ }
85
+ )
86
+ },
87
+ r.id
88
+ );
89
+ })
90
+ }
91
+ );
92
+ }, B = (n) => {
93
+ const { children: d, dataTestId: p = "snackbar-wrapper" } = n, [t, s] = O(I, {
94
+ visible: [],
95
+ queue: []
96
+ }), h = (e) => {
97
+ const o = W(), i = {
98
+ ...e,
99
+ id: o,
100
+ open: !0
101
+ };
102
+ s({
103
+ type: "ENQUEUE",
104
+ snack: i
105
+ });
106
+ }, m = (e) => {
107
+ s({
108
+ type: "REMOVE",
109
+ id: e
110
+ });
17
111
  };
18
- c(() => {
112
+ v(() => {
19
113
  s({ type: "SHOW_NEXT" });
20
- }, [o.queue, o.visible]), c(() => {
21
- if (o.queue.length !== 0)
22
- if (o.visible.length >= R) {
23
- const e = o.visible[0];
24
- s({ type: "START_EXIT", id: e.id });
114
+ }, [t.queue, t.visible]), v(() => {
115
+ if (t.queue.length !== 0)
116
+ if (t.visible.length >= k) {
117
+ const e = t.visible[0];
118
+ s({
119
+ type: "START_EXIT",
120
+ id: e.id
121
+ });
25
122
  } else
26
123
  s({ type: "SHOW_NEXT" });
27
- }, [o.queue]);
28
- const l = (e) => e.map((t, r) => {
29
- const g = (e.length - 1 - r) * -8, a = e.length > 1;
30
- a && !t.wasInStack && (t.wasInStack = !0);
31
- const x = t.wasInStack || a ? "fix" : t.mode;
32
- return /* @__PURE__ */ n(
33
- "div",
124
+ }, [t.queue]);
125
+ const g = t.visible.filter((e) => !e.parent), a = t.visible.filter((e) => e.parent), c = E.createPortal(
126
+ /* @__PURE__ */ u("div", { className: l.stack, children: /* @__PURE__ */ u(
127
+ R,
34
128
  {
35
- "data-testid": f,
36
- className: i.snackWrapper,
37
- style: {
38
- transform: `translateY(${g}px)`
39
- },
40
- children: /* @__PURE__ */ n(
41
- w,
42
- {
43
- ...t,
44
- open: !t.exiting,
45
- isStack: a,
46
- mode: x,
47
- forceClose: t.exiting,
48
- onClose: () => S(t.id)
49
- }
50
- )
51
- },
52
- t.id
53
- );
54
- }), b = o.visible.filter((e) => !e.parent), h = o.visible.filter((e) => e.parent), v = d.createPortal(
55
- /* @__PURE__ */ n("div", { className: i.stack, children: l(b) }),
129
+ snacks: g,
130
+ dataTestId: p,
131
+ onClose: m
132
+ }
133
+ ) }),
56
134
  document.body
57
- ), E = h.reduce((e, t) => {
58
- if (!t.parent) return e;
59
- const r = t.parent.id || `parent-${t.parent.className}`;
60
- return (e[r] || (e[r] = [])).push(t), e;
61
- }, {}), N = Object.entries(E).map(([e, t]) => {
62
- const r = t[0];
63
- return r.parent ? d.createPortal(
64
- /* @__PURE__ */ n("div", { className: T(i.stack, i.local), children: l(t) }, e),
65
- r.parent
135
+ ), b = a.reduce(
136
+ (e, o) => {
137
+ if (!o.parent) return e;
138
+ const i = o.parent.id || `parent-${o.parent.className}`;
139
+ return (e[i] || (e[i] = [])).push(o), e;
140
+ },
141
+ {}
142
+ ), r = Object.entries(b).map(([e, o]) => {
143
+ const i = o[0];
144
+ return i.parent ? E.createPortal(
145
+ /* @__PURE__ */ u("div", { className: N(l.stack, l.local), children: /* @__PURE__ */ u(
146
+ R,
147
+ {
148
+ snacks: o,
149
+ dataTestId: p,
150
+ onClose: m
151
+ }
152
+ ) }),
153
+ i.parent,
154
+ e
66
155
  ) : null;
67
156
  });
68
- return /* @__PURE__ */ y(q.Provider, { value: { show: u }, children: [
69
- m,
70
- v,
71
- N
157
+ return /* @__PURE__ */ M(G.Provider, { value: { show: h }, children: [
158
+ d,
159
+ c,
160
+ r
72
161
  ] });
73
162
  };
74
163
  export {
75
- V as SnackbarProvider
164
+ B as SnackbarProvider
76
165
  };
@@ -1,11 +1,19 @@
1
- import '../../../assets/components/Snackbar/Provider/SnackbarProvider.module-F1FVM9qU.css';const a = "_stack_11xtv_1", c = "_local_11xtv_19", s = "_snackWrapper_11xtv_28", t = {
2
- stack: a,
1
+ import '../../../assets/components/Snackbar/Provider/SnackbarProvider.module-CXp57W1g.css';const s = "_stack_184s0_1", c = "_local_184s0_20", a = "_snackGroup_184s0_27", o = "_snackGroupHug_184s0_43", n = "_snackGroupFix_184s0_54", _ = "_snackGroupFill_184s0_64", p = "_snackWrapper_184s0_68", r = {
2
+ stack: s,
3
3
  local: c,
4
- snackWrapper: s
4
+ snackGroup: a,
5
+ snackGroupHug: o,
6
+ snackGroupFix: n,
7
+ snackGroupFill: _,
8
+ snackWrapper: p
5
9
  };
6
10
  export {
7
- t as default,
11
+ r as default,
8
12
  c as local,
9
- s as snackWrapper,
10
- a as stack
13
+ a as snackGroup,
14
+ _ as snackGroupFill,
15
+ n as snackGroupFix,
16
+ o as snackGroupHug,
17
+ p as snackWrapper,
18
+ s as stack
11
19
  };
@@ -3,9 +3,10 @@ import { SnackbarProps } from '../Snackbar.type';
3
3
  * Параметры, которые можно передать в метод `show()` для отображения Snackbar.
4
4
  * Наследует все пропсы Snackbar, кроме управляемых провайдером (`open`, `onClose`).
5
5
  */
6
- export type ShowSnackbarProps = Omit<SnackbarProps, 'open' | 'onClose' | 'isStack' | 'forceClose'> & {
6
+ export type ShowSnackbarProps = Omit<SnackbarProps, 'open' | 'onClose' | 'isStack' | 'forceClose' | 'stretchToStack'> & {
7
7
  /**
8
- * Контейнер, в котором Snackbar будет показан (по умолчанию — `document.body`).
8
+ * Контейнер, в котором Snackbar будет показан
9
+ * (по умолчанию — document.body).
9
10
  */
10
11
  parent?: HTMLElement;
11
12
  };
@@ -20,8 +21,12 @@ export interface InternalSnackbar extends ShowSnackbarProps {
20
21
  open: boolean;
21
22
  /** Флаг завершения анимации (используется при скрытии). */
22
23
  exiting?: boolean;
23
- /** Флаг, указывающий, что Snackbar когда-либо находился в стеке */
24
- wasInStack?: boolean;
24
+ }
25
+ export type StackWidthMode = NonNullable<InternalSnackbar['mode']>;
26
+ export interface SnackbarGroupProps {
27
+ snacks: InternalSnackbar[];
28
+ dataTestId: string;
29
+ onClose: (id: string) => void;
25
30
  }
26
31
  /**
27
32
  * Интерфейс контекста Snackbar-провайдера.
@@ -1,157 +1,195 @@
1
1
  import { jsxs as w, jsx as n } from "react/jsx-runtime";
2
- import { forwardRef as W, useRef as i, useState as x, useEffect as a } from "react";
2
+ import { forwardRef as Z, useRef as s, useState as x, useEffect as a } from "react";
3
+ import S from "classnames";
3
4
  import e from "./Snackbar.module.css.js";
4
- import b from "classnames";
5
- import { useSwipe as Z } from "./lib/useSwipe.js";
6
- import { Typography as _ } from "../Typography/Typography.js";
5
+ import { useSwipe as _ } from "./lib/useSwipe.js";
6
+ import { Typography as $ } from "../Typography/Typography.js";
7
7
  import { Button as E } from "../Button/Button.js";
8
- import { CloseIcon as $ } from "./assets/close.js";
9
- import { stackDurationMap as tt, durationMap as et, animationMap as nt } from "./lib/constants.js";
10
- import { Loader as ot } from "../Loader/Loader.js";
8
+ import { CloseIcon as tt } from "./assets/close.js";
9
+ import { stackDurationMap as et, durationMap as nt, animationMap as ot } from "./lib/constants.js";
10
+ import { Loader as st } from "../Loader/Loader.js";
11
11
  import { InfoIcon as it } from "./assets/info.js";
12
- import { ErrorIcon as st } from "./assets/error.js";
13
- import { SuccessIcon as rt } from "./assets/success.js";
14
- const xt = W((M, u) => {
15
- const {
16
- open: o,
17
- variant: d = "info",
18
- mode: H = "fix",
19
- onClose: p,
20
- autoHideDuration: S = 6e3,
21
- disableAutoHide: h = !1,
22
- showButtonClose: A = !0,
23
- showIcon: B = !0,
24
- content: v,
25
- classNameSnackbarRoot: D,
26
- icon: N,
27
- isStack: k = !1,
28
- forceClose: R,
29
- linkButtonProps: y,
30
- closeOnLinkClick: V = !0,
31
- "data-testid": j = "snackbar"
32
- } = M, L = i(null), T = i(null), [g, z] = x(!1), [l, m] = x(!1), [C, f] = x(), F = i(0), O = i(0), X = i(0), Y = i(0), q = i(!1), s = i(null), c = (t) => {
33
- clearTimeout(s.current || 0), s.current = null;
34
- const r = k ? tt[t] : et[t];
35
- t === "swipe" || (m(!0), f(t)), s.current = setTimeout(() => {
36
- p == null || p(), m(!1), f(void 0), s.current = null;
37
- }, r);
38
- };
39
- Z({
40
- ref: T,
41
- open: o,
42
- onClose: c,
43
- setExiting: m,
44
- setExitReason: f,
45
- swiping: q,
46
- startX: F,
47
- startY: O,
48
- currentX: X,
49
- currentY: Y
50
- }), a(() => {
51
- R && c("close");
52
- }, [R]), a(() => {
53
- if (o && !h && d !== "loading") {
54
- const t = setTimeout(() => c("timeout"), S);
55
- return () => clearTimeout(t);
56
- }
57
- }, [o, h, d, S]), a(() => {
58
- o && (m(!1), f(void 0));
59
- }, [o]), a(() => {
60
- const t = L.current;
61
- t && requestAnimationFrame(() => {
62
- const r = parseFloat(getComputedStyle(t).lineHeight), I = t.offsetHeight, U = Math.round(I / r);
63
- z(U > 1);
64
- });
65
- }, [v]), a(() => {
66
- if (!o) return;
67
- const t = (r) => {
68
- r.key === "Escape" && c("escape");
12
+ import { ErrorIcon as rt } from "./assets/error.js";
13
+ import { SuccessIcon as ct } from "./assets/success.js";
14
+ const St = Z(
15
+ (M, u) => {
16
+ const {
17
+ open: o,
18
+ variant: d = "info",
19
+ mode: H = "fix",
20
+ onClose: p,
21
+ autoHideDuration: b = 6e3,
22
+ disableAutoHide: h = !1,
23
+ showButtonClose: A = !0,
24
+ showIcon: B = !0,
25
+ content: v,
26
+ classNameSnackbarRoot: D,
27
+ icon: N,
28
+ isStack: k = !1,
29
+ stretchToStack: V = !1,
30
+ forceClose: R,
31
+ linkButtonProps: y,
32
+ closeOnLinkClick: j = !0,
33
+ "data-testid": z = "snackbar"
34
+ } = M, T = s(null), L = s(null), [g, F] = x(!1), [l, m] = x(!1), [C, f] = x(), O = s(0), X = s(0), Y = s(0), q = s(0), K = s(!1), i = s(null), c = (t) => {
35
+ clearTimeout(i.current || 0), i.current = null;
36
+ const r = k ? et[t] : nt[t];
37
+ t === "swipe" || (m(!0), f(t)), i.current = setTimeout(() => {
38
+ p == null || p(), m(!1), f(void 0), i.current = null;
39
+ }, r);
69
40
  };
70
- return window.addEventListener("keydown", t), () => window.removeEventListener("keydown", t);
71
- }, [o]), a(() => () => {
72
- s.current && (clearTimeout(s.current), s.current = null);
73
- }, []);
74
- const K = l && C && e[nt[C]];
75
- if (!o && !l) return null;
76
- const P = {
77
- success: /* @__PURE__ */ n(rt, { className: e.icon }),
78
- error: /* @__PURE__ */ n(st, { className: e.icon }),
79
- info: /* @__PURE__ */ n(it, { className: e.icon }),
80
- loading: /* @__PURE__ */ n(ot, { "data-testid": "snackbar-icon-loading", variant: "contrast" })
81
- }, G = b(
82
- e.snackbar,
83
- e[H],
84
- { [e.exiting]: l && C },
85
- { [e.snackbarVertical]: g },
86
- D,
87
- K,
88
- {
89
- [e.snackbarStack]: k && !l,
90
- // при появлении стека
91
- [e.exitingStack]: k && l
92
- // при уходе стека
93
- }
94
- ), J = (t) => {
95
- T.current = t, u && (typeof u == "function" ? u(t) : u.current = t);
96
- }, Q = (t, r) => {
97
- t == null || t(r);
98
- };
99
- return /* @__PURE__ */ w("div", { ref: J, "data-testid": j, className: G, children: [
100
- /* @__PURE__ */ w(
41
+ _({
42
+ ref: L,
43
+ open: o,
44
+ onClose: c,
45
+ setExiting: m,
46
+ setExitReason: f,
47
+ swiping: K,
48
+ startX: O,
49
+ startY: X,
50
+ currentX: Y,
51
+ currentY: q
52
+ }), a(() => {
53
+ R && c("close");
54
+ }, [R]), a(() => {
55
+ if (o && !h && d !== "loading") {
56
+ const t = setTimeout(
57
+ () => c("timeout"),
58
+ b
59
+ );
60
+ return () => clearTimeout(t);
61
+ }
62
+ }, [
63
+ o,
64
+ h,
65
+ d,
66
+ b
67
+ ]), a(() => {
68
+ o && (m(!1), f(void 0));
69
+ }, [o]), a(() => {
70
+ const t = T.current;
71
+ t && requestAnimationFrame(() => {
72
+ const r = parseFloat(getComputedStyle(t).lineHeight), I = t.offsetHeight, U = Math.round(I / r);
73
+ F(U > 1);
74
+ });
75
+ }, [v]), a(() => {
76
+ if (!o) return;
77
+ const t = (r) => {
78
+ r.key === "Escape" && c("escape");
79
+ };
80
+ return window.addEventListener("keydown", t), () => {
81
+ window.removeEventListener("keydown", t);
82
+ };
83
+ }, [o]), a(() => () => {
84
+ i.current && (clearTimeout(i.current), i.current = null);
85
+ }, []);
86
+ const P = l && C && e[ot[C]];
87
+ if (!o && !l)
88
+ return null;
89
+ const W = {
90
+ success: /* @__PURE__ */ n(ct, { className: e.icon }),
91
+ error: /* @__PURE__ */ n(rt, { className: e.icon }),
92
+ info: /* @__PURE__ */ n(it, { className: e.icon }),
93
+ loading: /* @__PURE__ */ n(
94
+ st,
95
+ {
96
+ "data-testid": "snackbar-icon-loading",
97
+ variant: "contrast"
98
+ }
99
+ )
100
+ }, G = S(
101
+ e.snackbar,
102
+ e[H],
103
+ {
104
+ [e.exiting]: l && C
105
+ },
106
+ {
107
+ [e.snackbarVertical]: g
108
+ },
109
+ D,
110
+ P,
111
+ {
112
+ /*
113
+ * Ширина элемента в provider-стеке теперь не зависит
114
+ * от количества элементов.
115
+ *
116
+ * Даже когда после удаления остаётся один snackbar,
117
+ * он продолжает занимать сохранённую ширину группы.
118
+ */
119
+ [e.stackWidth]: V,
120
+ [e.snackbarStack]: k && !l,
121
+ [e.exitingStack]: k && l
122
+ }
123
+ ), J = (t) => {
124
+ L.current = t, u && (typeof u == "function" ? u(t) : u.current = t);
125
+ }, Q = (t, r) => {
126
+ t == null || t(r);
127
+ };
128
+ return /* @__PURE__ */ w(
101
129
  "div",
102
130
  {
103
- className: b(e.content, {
104
- [e.contentVertical]: g
105
- }),
131
+ ref: J,
132
+ "data-testid": z,
133
+ className: G,
106
134
  children: [
107
- B && /* @__PURE__ */ n("div", { className: e.icon, children: N || P[d] }),
108
135
  /* @__PURE__ */ w(
109
136
  "div",
110
137
  {
111
- className: b(e.textActionsContainer, {
112
- [e.textActionsContainerVertical]: g
138
+ className: S(e.content, {
139
+ [e.contentVertical]: g
113
140
  }),
114
141
  children: [
115
- /* @__PURE__ */ n(
116
- _.Label,
142
+ B && /* @__PURE__ */ n("div", { className: e.icon, children: N || W[d] }),
143
+ /* @__PURE__ */ w(
144
+ "div",
117
145
  {
118
- className: e.contentText,
119
- ref: L,
120
- typographyStyle: "contrast",
121
- children: v
122
- }
123
- ),
124
- y && /* @__PURE__ */ n(
125
- E.Link,
126
- {
127
- size: "s",
128
- className: e.buttonLink,
129
- buttonStyle: "contrast",
130
- ...y,
131
- onClick: (t) => {
132
- Q(y.onClick, t), V && c("timeout");
133
- }
146
+ className: S(e.textActionsContainer, {
147
+ [e.textActionsContainerVertical]: g
148
+ }),
149
+ children: [
150
+ /* @__PURE__ */ n(
151
+ $.Label,
152
+ {
153
+ className: e.contentText,
154
+ ref: T,
155
+ typographyStyle: "contrast",
156
+ children: v
157
+ }
158
+ ),
159
+ y && /* @__PURE__ */ n(
160
+ E.Link,
161
+ {
162
+ size: "s",
163
+ className: e.buttonLink,
164
+ buttonStyle: "contrast",
165
+ ...y,
166
+ onClick: (t) => {
167
+ Q(y.onClick, t), j && c("timeout");
168
+ }
169
+ }
170
+ )
171
+ ]
134
172
  }
135
173
  )
136
174
  ]
137
175
  }
176
+ ),
177
+ A && /* @__PURE__ */ n(
178
+ E,
179
+ {
180
+ iconLeft: /* @__PURE__ */ n(tt, {}),
181
+ onClick: () => c("close"),
182
+ mode: "tertiary",
183
+ size: "l",
184
+ buttonStyle: "contrast",
185
+ style: { padding: "0px" }
186
+ }
138
187
  )
139
188
  ]
140
189
  }
141
- ),
142
- A && /* @__PURE__ */ n(
143
- E,
144
- {
145
- iconLeft: /* @__PURE__ */ n($, {}),
146
- onClick: () => c("close"),
147
- mode: "tertiary",
148
- size: "l",
149
- buttonStyle: "contrast",
150
- style: { padding: "0px" }
151
- }
152
- )
153
- ] });
154
- });
190
+ );
191
+ }
192
+ );
155
193
  export {
156
- xt as Snackbar
194
+ St as Snackbar
157
195
  };