@alphakits/ui 2.4.3 → 2.4.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.
Files changed (41) hide show
  1. package/dist/calendar/component.js +32 -31
  2. package/dist/calendar/components/months-table/component.js +22 -23
  3. package/dist/calendar/components/months-table/index.css +1 -1
  4. package/dist/calendar/components/months-table/index.module.css.js +4 -6
  5. package/dist/calendar/components/select-button/index.css +1 -1
  6. package/dist/calendar/index.css +1 -1
  7. package/dist/calendar-input/component.js +124 -121
  8. package/dist/checkbox-lists/mock.data.d.ts +81 -0
  9. package/dist/checkbox-lists/mock.data.js +207 -0
  10. package/dist/collapsable-row/fixtures.data.d.ts +99 -0
  11. package/dist/collapsable-row/fixtures.data.js +196 -0
  12. package/dist/confirm-popup/component.d.ts +21 -0
  13. package/dist/confirm-popup/component.js +138 -0
  14. package/dist/confirm-popup/index.css +1 -0
  15. package/dist/confirm-popup/index.d.ts +1 -0
  16. package/dist/confirm-popup/index.js +6 -0
  17. package/dist/confirm-popup/index.module.css.js +23 -0
  18. package/dist/form/component.js +16 -16
  19. package/dist/form/templates/filters-form/index.js +17 -17
  20. package/dist/form/templates/rest-form/form.d.ts +1 -1
  21. package/dist/form/templates/rest-form/form.js +72 -67
  22. package/dist/form/templates/rest-form/index.d.ts +1 -0
  23. package/dist/index.d.ts +1 -0
  24. package/dist/index.js +298 -293
  25. package/dist/modal/components/modals/modal.js +50 -40
  26. package/dist/modal/hooks/use-modal.js +11 -11
  27. package/dist/modal/types.d.ts +2 -1
  28. package/dist/popover/component.js +72 -55
  29. package/dist/radio-groups/mock.data.d.ts +9 -0
  30. package/dist/radio-groups/mock.data.js +82 -0
  31. package/dist/select/components/base-select/component.js +73 -73
  32. package/dist/select/utils.js +23 -23
  33. package/dist/theme-provider/default-themes.d.ts +4 -0
  34. package/dist/theme-provider/default-themes.js +4 -0
  35. package/dist/toast-plate/component.js +47 -46
  36. package/dist/toast-plate/index.css +1 -1
  37. package/dist/toast-plate/index.module.css.js +26 -24
  38. package/dist/utils/index.js +26 -25
  39. package/dist/utils/show-toast/index.d.ts +1 -0
  40. package/dist/utils/show-toast/index.js +17 -9
  41. package/package.json +9 -27
@@ -1,18 +1,18 @@
1
1
  import { jsx as a, jsxs as rt } from "react/jsx-runtime";
2
- import re from "classnames";
3
- import { useMultipleSelection as se, useCombobox as L } from "downshift";
4
- import st, { forwardRef as ot, useRef as y, useMemo as T, useCallback as W, useEffect as j } from "react";
2
+ import ne from "classnames";
3
+ import { useMultipleSelection as re, useCombobox as B } from "downshift";
4
+ import st, { forwardRef as ot, useRef as y, useMemo as T, useCallback as W, useEffect as se, useLayoutEffect as ct } from "react";
5
5
  import oe from "react-merge-refs";
6
- import { ResizeObserver as ct } from "resize-observer";
7
- import { getDataTestId as A } from "../../../__internal/utils/get-data-test-id.js";
8
- import { Popover as it } from "../../../popover/component.js";
9
- import { processOptions as lt } from "../../utils.js";
10
- import { NativeSelect as at } from "../native-select/component.js";
6
+ import { ResizeObserver as it } from "resize-observer";
7
+ import { getDataTestId as j } from "../../../__internal/utils/get-data-test-id.js";
8
+ import { Popover as lt } from "../../../popover/component.js";
9
+ import { processOptions as at } from "../../utils.js";
10
+ import { NativeSelect as dt } from "../native-select/component.js";
11
11
  import v from "./index.module.css.js";
12
12
  const ce = (o) => o ? o.key?.toString() : "", ie = (o) => {
13
13
  const x = y(o);
14
14
  return x.current = o, x;
15
- }, kt = ot(
15
+ }, vt = ot(
16
16
  ({
17
17
  dataTestId: o = "",
18
18
  className: x,
@@ -20,29 +20,29 @@ const ce = (o) => o ? o.key?.toString() : "", ie = (o) => {
20
20
  filteredOptions: ae,
21
21
  popoverOuterClassname: de,
22
22
  optionsListClassName: ue,
23
- optionClassName: $,
23
+ optionClassName: A,
24
24
  options: R,
25
- actionButton: H,
25
+ actionButton: $,
26
26
  autocomplete: I = !1,
27
27
  multiple: m = !1,
28
28
  allowUnselect: M = !1,
29
29
  disabled: u = !1,
30
- closeOnSelect: U = !m,
30
+ closeOnSelect: H = !m,
31
31
  circularNavigation: fe = !1,
32
32
  nativeSelect: w = !1,
33
- defaultOpen: V = !1,
33
+ defaultOpen: U = !1,
34
34
  open: N,
35
35
  popoverPosition: pe = "bottom-start",
36
36
  offset: me,
37
37
  withArrow: he,
38
38
  preventFlip: ge = !0,
39
- optionsListWidth: _ = "field",
39
+ optionsListWidth: V = "field",
40
40
  name: h,
41
41
  id: ye,
42
42
  required: Ie,
43
43
  selected: C,
44
44
  size: S = "m",
45
- optionsSize: q = S,
45
+ optionsSize: _ = S,
46
46
  error: we,
47
47
  hint: be,
48
48
  block: ke = !0,
@@ -50,27 +50,27 @@ const ce = (o) => o ? o.key?.toString() : "", ie = (o) => {
50
50
  placeholder: ve,
51
51
  fieldProps: xe = {},
52
52
  optionsListProps: Re = {},
53
- optionProps: z = {},
53
+ optionProps: q = {},
54
54
  valueRenderer: Ce,
55
55
  onChange: Pe,
56
56
  onOpen: De,
57
57
  onFocus: Te,
58
58
  onBlur: Me,
59
59
  onScroll: Ne,
60
- Arrow: G,
60
+ Arrow: z,
61
61
  Field: Se = () => null,
62
62
  OptionsList: Oe = () => null,
63
63
  Optgroup: Ee = () => null,
64
- Option: J = () => null,
64
+ Option: G = () => null,
65
65
  updatePopover: Fe,
66
66
  zIndexPopover: Ke,
67
- showEmptyOptionsList: Be = !1,
68
- visibleOptions: Le
67
+ showEmptyOptionsList: Le = !1,
68
+ visibleOptions: Be
69
69
  }, We) => {
70
- const b = y(null), Q = y(null), k = y(null), X = y(null), g = y(null), Y = ie(Pe), Z = ie(De), { flatOptions: c, selectedOptions: ee } = T(
71
- () => lt(R || [], C),
70
+ const b = y(null), J = y(null), k = y(null), Q = y(null), g = y(null), X = ie(Pe), Y = ie(De), { flatOptions: c, selectedOptions: Z } = T(
71
+ () => at(R || [], C),
72
72
  [R, C]
73
- ), te = T(() => {
73
+ ), ee = T(() => {
74
74
  const e = /* @__PURE__ */ new Map();
75
75
  return c.forEach((t, s) => {
76
76
  e.set(t.key, s);
@@ -80,7 +80,7 @@ const ce = (o) => o ? o.key?.toString() : "", ie = (o) => {
80
80
  itemToString: ce,
81
81
  onSelectedItemsChange: (e) => {
82
82
  const { selectedItems: t = [] } = e;
83
- Y.current?.({
83
+ X.current?.({
84
84
  selectedMultiple: t,
85
85
  selected: t.length ? t[0] : null,
86
86
  name: h
@@ -88,31 +88,31 @@ const ce = (o) => o ? o.key?.toString() : "", ie = (o) => {
88
88
  },
89
89
  stateReducer: (e, t) => {
90
90
  const { type: s, changes: n } = t;
91
- return !M && s === se.stateChangeTypes.DropdownKeyDownBackspace ? e : n;
91
+ return !M && s === re.stateChangeTypes.DropdownKeyDownBackspace ? e : n;
92
92
  },
93
- ...C !== void 0 ? { selectedItems: ee } : {}
93
+ ...C !== void 0 ? { selectedItems: Z } : {}
94
94
  }),
95
- [M, h, C, ee, Y]
95
+ [M, h, C, Z, X]
96
96
  ), {
97
97
  selectedItems: i,
98
98
  addSelectedItem: Ae,
99
99
  setSelectedItems: E,
100
100
  removeSelectedItem: $e,
101
101
  getDropdownProps: He
102
- } = se(je), F = T(
102
+ } = re(je), F = T(
103
103
  () => new Set(i.map((e) => e.key)),
104
104
  [i]
105
105
  ), {
106
106
  isOpen: l,
107
107
  getMenuProps: Ue,
108
108
  getInputProps: Ve,
109
- getItemProps: ne,
109
+ getItemProps: te,
110
110
  getComboboxProps: _e,
111
111
  getLabelProps: qe,
112
112
  highlightedIndex: P,
113
113
  toggleMenu: K,
114
114
  openMenu: f
115
- } = L({
115
+ } = B({
116
116
  id: ye,
117
117
  isOpen: N,
118
118
  circularNavigation: fe,
@@ -120,23 +120,23 @@ const ce = (o) => o ? o.key?.toString() : "", ie = (o) => {
120
120
  itemToString: ce,
121
121
  defaultHighlightedIndex: i.length === 0 ? -1 : void 0,
122
122
  onIsOpenChange: (e) => {
123
- Z.current && setTimeout(() => {
124
- Z.current?.({ open: e.isOpen, name: h });
123
+ Y.current && setTimeout(() => {
124
+ Y.current?.({ open: e.isOpen, name: h });
125
125
  }, 0);
126
126
  },
127
127
  stateReducer: (e, t) => {
128
128
  const { type: s, changes: n } = t, { selectedItem: d } = n;
129
129
  switch (s) {
130
- case L.stateChangeTypes.InputKeyDownEnter:
131
- case L.stateChangeTypes.ItemClick:
130
+ case B.stateChangeTypes.InputKeyDownEnter:
131
+ case B.stateChangeTypes.ItemClick:
132
132
  if (d && !d.disabled) {
133
133
  const D = F.has(d.key), r = M || m && i.length > 1;
134
134
  D && r && $e(d), D || (m ? Ae(d) : E([d]));
135
135
  }
136
136
  return {
137
137
  ...n,
138
- isOpen: !U,
139
- highlightedIndex: e.isOpen && !U ? e.highlightedIndex : n.highlightedIndex
138
+ isOpen: !H,
139
+ highlightedIndex: e.isOpen && !H ? e.highlightedIndex : n.highlightedIndex
140
140
  };
141
141
  default:
142
142
  return n;
@@ -145,7 +145,7 @@ const ce = (o) => o ? o.key?.toString() : "", ie = (o) => {
145
145
  }), ze = Ue(
146
146
  { ref: k },
147
147
  { suppressRefError: !0 }
148
- ), p = Ve(He({ ref: oe([We, Q]) })), Ge = (e) => {
148
+ ), p = Ve(He({ ref: oe([We, J]) })), Ge = (e) => {
149
149
  Te?.(e), I && !l && f();
150
150
  }, Je = (e) => {
151
151
  const t = e.relatedTarget || document.activeElement;
@@ -167,9 +167,9 @@ const ce = (o) => o ? o.key?.toString() : "", ie = (o) => {
167
167
  ), Ze = W(
168
168
  ({ option: e, index: t, ...s }) => {
169
169
  if (!e) return null;
170
- const n = te.get(e.key);
170
+ const n = ee.get(e.key);
171
171
  if (n === void 0) return null;
172
- const d = c[n], D = ne({
172
+ const d = c[n], D = te({
173
173
  item: d,
174
174
  index: n,
175
175
  disabled: e.disabled,
@@ -184,66 +184,66 @@ const ce = (o) => o ? o.key?.toString() : "", ie = (o) => {
184
184
  r.stopPropagation();
185
185
  }
186
186
  });
187
- return /* @__PURE__ */ a(st.Fragment, { children: J({
188
- ...z,
187
+ return /* @__PURE__ */ a(st.Fragment, { children: G({
188
+ ...q,
189
189
  ...s,
190
- className: $,
190
+ className: A,
191
191
  innerProps: D,
192
192
  index: t,
193
193
  option: e,
194
- size: q,
194
+ size: _,
195
195
  disabled: e.disabled,
196
196
  highlighted: n === P,
197
197
  selected: F.has(e.key)
198
198
  }) }, e.key);
199
199
  },
200
200
  [
201
- z,
201
+ q,
202
202
  c,
203
+ ee,
204
+ A,
203
205
  te,
204
- $,
205
- ne,
206
- q,
206
+ _,
207
207
  P,
208
208
  F,
209
- J
209
+ G
210
210
  ]
211
211
  );
212
- j(() => {
213
- V && f();
214
- }, [V, f]), j(() => {
212
+ se(() => {
213
+ U && f();
214
+ }, [U, f]), se(() => {
215
215
  N === !0 && f();
216
216
  }, [N, f]);
217
- const B = W(() => {
217
+ const L = W(() => {
218
218
  if (!k.current || !b.current) return;
219
- const e = _ === "field" ? "width" : "minWidth", t = Math.round(b.current.getBoundingClientRect().width);
220
- X.current !== t && (X.current = t, k.current.style[e] = `${t}px`);
221
- }, [_]);
222
- j(() => {
219
+ const e = V === "field" ? "width" : "minWidth", t = Math.round(b.current.getBoundingClientRect().width);
220
+ Q.current !== t && (Q.current = t, k.current.style[e] = `${t}px`);
221
+ }, [V]);
222
+ ct(() => {
223
223
  if (!l || !b.current) return;
224
224
  const e = () => {
225
- g.current && window.clearTimeout(g.current), g.current = window.setTimeout(B, 50);
226
- }, t = new ct(e);
227
- return t.observe(b.current), B(), () => {
225
+ g.current && window.clearTimeout(g.current), g.current = window.setTimeout(L, 50);
226
+ }, t = new it(e);
227
+ return t.observe(b.current), L(), () => {
228
228
  t.disconnect(), g.current && window.clearTimeout(g.current), g.current = null;
229
229
  };
230
- }, [l, B]);
231
- const et = m ? i.map((e) => e.key?.toString()) : i[0]?.key?.toString(), tt = c.length > 0 || Be || !!H, nt = O ? /* @__PURE__ */ a("span", { ...qe(), children: Ie ? `${O} *` : O }) : void 0;
230
+ }, [l, L]);
231
+ const et = m ? i.map((e) => e.key?.toString()) : i[0]?.key?.toString(), tt = c.length > 0 || Le || !!$, nt = O ? /* @__PURE__ */ a("span", { ...qe(), children: Ie ? `${O} *` : O }) : void 0;
232
232
  return /* @__PURE__ */ rt(
233
233
  "div",
234
234
  {
235
235
  ..._e({
236
236
  ref: b,
237
237
  ...u && { "aria-disabled": !0 },
238
- className: re(v.component, { [v.block]: ke }, x)
238
+ className: ne(v.component, { [v.block]: ke }, x)
239
239
  }),
240
240
  onKeyDown: u ? void 0 : Qe,
241
241
  tabIndex: -1,
242
242
  id: "slect_wrapper",
243
- "data-test-id": A("combobox", o),
243
+ "data-test-id": j("combobox", o),
244
244
  children: [
245
245
  w && /* @__PURE__ */ a(
246
- at,
246
+ dt,
247
247
  {
248
248
  className: v.nativeSelect,
249
249
  disabled: u,
@@ -265,7 +265,7 @@ const ce = (o) => o ? o.key?.toString() : "", ie = (o) => {
265
265
  size: S,
266
266
  placeholder: ve,
267
267
  label: nt,
268
- Arrow: G && /* @__PURE__ */ a(G, { open: l }),
268
+ Arrow: z && /* @__PURE__ */ a(z, { open: l }),
269
269
  error: we,
270
270
  hint: be,
271
271
  valueRenderer: Ce,
@@ -281,17 +281,17 @@ const ce = (o) => o ? o.key?.toString() : "", ie = (o) => {
281
281
  "aria-controls": p["aria-controls"],
282
282
  "aria-autocomplete": I ? p["aria-autocomplete"] : void 0
283
283
  },
284
- dataTestId: A("field", o),
284
+ dataTestId: j("field", o),
285
285
  ...xe
286
286
  }
287
287
  ),
288
288
  h && !w && i.map((e) => /* @__PURE__ */ a("input", { type: "hidden", name: h, value: e.key }, e.key)),
289
289
  !w && /* @__PURE__ */ a(
290
- it,
290
+ lt,
291
291
  {
292
292
  open: l,
293
293
  withTransition: !1,
294
- anchorElement: Q.current,
294
+ anchorElement: J.current,
295
295
  position: pe,
296
296
  offset: me,
297
297
  withArrow: he,
@@ -304,7 +304,7 @@ const ce = (o) => o ? o.key?.toString() : "", ie = (o) => {
304
304
  "div",
305
305
  {
306
306
  ...ze,
307
- className: re(ue, v.optionsList),
307
+ className: ne(ue, v.optionsList),
308
308
  children: /* @__PURE__ */ a(
309
309
  Oe,
310
310
  {
@@ -314,13 +314,13 @@ const ce = (o) => o ? o.key?.toString() : "", ie = (o) => {
314
314
  open: l,
315
315
  size: S,
316
316
  toggleMenu: K,
317
- actionButton: H,
317
+ actionButton: $,
318
318
  options: ae ?? R,
319
319
  Optgroup: Ee,
320
320
  Option: Ze,
321
- visibleOptions: Le,
321
+ visibleOptions: Be,
322
322
  onScroll: Ne,
323
- dataTestId: A("options-list", o)
323
+ dataTestId: j("options-list", o)
324
324
  }
325
325
  )
326
326
  }
@@ -333,5 +333,5 @@ const ce = (o) => o ? o.key?.toString() : "", ie = (o) => {
333
333
  }
334
334
  );
335
335
  export {
336
- kt as BaseSelect
336
+ vt as BaseSelect
337
337
  };
@@ -1,50 +1,50 @@
1
- import { useEffect as f, isValidElement as p, cloneElement as a } from "react";
2
- const y = (e) => Object.hasOwn(e, "options"), d = (e) => typeof e == "object" && e !== null && Object.hasOwn(e, "key"), O = ({
3
- selected: e,
1
+ import { useLayoutEffect as f, isValidElement as p, cloneElement as a } from "react";
2
+ const y = (t) => Object.hasOwn(t, "options"), d = (t) => typeof t == "object" && t !== null && Object.hasOwn(t, "key"), O = ({
3
+ selected: t,
4
4
  selectedMultiple: s
5
5
  }) => {
6
- const t = s || (e ? [e] : []);
7
- return t.length ? t.reduce((r, c, o) => (p(c.content) ? r.push(a(c.content, { key: c.key })) : r.push(c.content), o < t.length - 1 && r.push(", "), r), []) : null;
6
+ const e = s || (t ? [t] : []);
7
+ return e.length ? e.reduce((r, c, o) => (p(c.content) ? r.push(a(c.content, { key: c.key })) : r.push(c.content), o < e.length - 1 && r.push(", "), r), []) : null;
8
8
  };
9
- function k(e, s = []) {
10
- const t = [], r = Array.isArray(s) ? s : [s], c = r.filter(d), o = new Set(
9
+ function k(t, s = []) {
10
+ const e = [], r = Array.isArray(s) ? s : [s], c = r.filter(d), o = new Set(
11
11
  r.filter(
12
12
  (n) => typeof n == "string" || typeof n == "number"
13
13
  )
14
14
  ), h = (n) => o.has(n.key), l = (n) => {
15
- t.push(n), h(n) && c.push(n);
15
+ e.push(n), h(n) && c.push(n);
16
16
  };
17
- return e.forEach((n) => {
17
+ return t.forEach((n) => {
18
18
  y(n) ? n.options.forEach(l) : l(n);
19
- }), { flatOptions: t, selectedOptions: c };
19
+ }), { flatOptions: e, selectedOptions: c };
20
20
  }
21
21
  function E({
22
- visibleOptions: e,
22
+ visibleOptions: t,
23
23
  listRef: s,
24
- styleTargetRef: t = s,
24
+ styleTargetRef: e = s,
25
25
  open: r,
26
26
  invalidate: c
27
27
  }) {
28
28
  f(() => {
29
- const o = s.current, h = t.current;
29
+ const o = s.current, h = e.current;
30
30
  if (r && o && h) {
31
31
  const l = [].slice.call(
32
32
  o.children,
33
33
  0,
34
- e + 1
34
+ t + 1
35
35
  );
36
- let n = l.slice(0, e).reduce((i, u) => i + u.clientHeight, 0);
37
- e < o.children.length && (n += Math.round(l[l.length - 1].clientHeight / 2)), h.style.height = `${n}px`;
36
+ let n = l.slice(0, t).reduce((i, u) => i + u.clientHeight, 0);
37
+ t < o.children.length && (n += Math.round(l[l.length - 1].clientHeight / 2)), h.style.height = `${n}px`;
38
38
  }
39
- }, [s, r, t, e]);
39
+ }, [s, r, e, t]);
40
40
  }
41
- const j = (e, s) => {
42
- for (let t = e.length - 1; t >= 0; t--)
43
- if (s(e[t])) return t;
41
+ const j = (t, s) => {
42
+ for (let e = t.length - 1; e >= 0; e--)
43
+ if (s(t[e])) return e;
44
44
  return -1;
45
- }, w = (e, s) => e.map((t) => ({
46
- key: t.id,
47
- content: s && t[s] || t.title || t.name
45
+ }, w = (t, s) => t.map((e) => ({
46
+ key: e.id,
47
+ content: s && e[s] || e.title || e.name
48
48
  }));
49
49
  export {
50
50
  w as convertToOptions,
@@ -18,6 +18,7 @@ export declare const defaultThemes: {
18
18
  readonly thirdly: "#E7E8EA";
19
19
  readonly quaternary: "#D5D6DC";
20
20
  readonly 'special-super-light': "#FDFDFD";
21
+ readonly 'primary-inverted': "#0E0E0E";
21
22
  readonly 'secondary-inverted': "#1C1C1E";
22
23
  readonly 'special-big-objects': "#F8F8F9";
23
24
  readonly positive: "#63C956";
@@ -46,6 +47,7 @@ export declare const defaultThemes: {
46
47
  readonly attention: "#F19938";
47
48
  readonly accent: "#2174EF";
48
49
  readonly 'accent-special': "#649EF4";
50
+ readonly 'primary-inverted': "#F8F8F8";
49
51
  readonly 'secondary-inverted': "#85858D";
50
52
  readonly main: "#2174ef";
51
53
  readonly static: "#FFFFFF";
@@ -92,6 +94,7 @@ export declare const defaultThemes: {
92
94
  readonly thirdly: "#27272A";
93
95
  readonly quaternary: "#36363A";
94
96
  readonly 'special-super-light': "#18181970";
97
+ readonly 'primary-inverted': "#FFFFFF";
95
98
  readonly 'secondary-inverted': "#F2F3F5";
96
99
  readonly 'special-big-objects': "#171718";
97
100
  readonly positive: "#32D74B";
@@ -120,6 +123,7 @@ export declare const defaultThemes: {
120
123
  readonly attention: "#F19938";
121
124
  readonly accent: "#2174EF";
122
125
  readonly 'accent-special': "#649EF4";
126
+ readonly 'primary-inverted': "#0E0E0E";
123
127
  readonly 'secondary-inverted': "#86868A";
124
128
  readonly main: "#2174ef";
125
129
  readonly static: "#FFFFFF";
@@ -18,6 +18,7 @@ const t = {
18
18
  thirdly: "#E7E8EA",
19
19
  quaternary: "#D5D6DC",
20
20
  "special-super-light": "#FDFDFD",
21
+ "primary-inverted": "#0E0E0E",
21
22
  "secondary-inverted": "#1C1C1E",
22
23
  "special-big-objects": "#F8F8F9",
23
24
  positive: "#63C956",
@@ -46,6 +47,7 @@ const t = {
46
47
  attention: "#F19938",
47
48
  accent: "#2174EF",
48
49
  "accent-special": "#649EF4",
50
+ "primary-inverted": "#F8F8F8",
49
51
  "secondary-inverted": "#85858D",
50
52
  main: "#2174ef",
51
53
  static: "#FFFFFF"
@@ -92,6 +94,7 @@ const t = {
92
94
  thirdly: "#27272A",
93
95
  quaternary: "#36363A",
94
96
  "special-super-light": "#18181970",
97
+ "primary-inverted": "#FFFFFF",
95
98
  "secondary-inverted": "#F2F3F5",
96
99
  "special-big-objects": "#171718",
97
100
  positive: "#32D74B",
@@ -120,6 +123,7 @@ const t = {
120
123
  attention: "#F19938",
121
124
  accent: "#2174EF",
122
125
  "accent-special": "#649EF4",
126
+ "primary-inverted": "#0E0E0E",
123
127
  "secondary-inverted": "#86868A",
124
128
  main: "#2174ef",
125
129
  static: "#FFFFFF"
@@ -1,71 +1,72 @@
1
- import { jsx as e, jsxs as d } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as d } from "react/jsx-runtime";
2
2
  import f from "@alphakits/icons/dist/AlertCircleM";
3
- import M from "@alphakits/icons/dist/CheckmarkCircleM";
4
- import p from "@alphakits/icons/dist/ClockCircleM";
3
+ import p from "@alphakits/icons/dist/CheckmarkCircleM";
4
+ import h from "@alphakits/icons/dist/ClockCircleM";
5
5
  import g from "@alphakits/icons/dist/CloseS";
6
- import o from "classnames";
6
+ import l from "classnames";
7
7
  import { forwardRef as j, useCallback as A } from "react";
8
8
  import { Button as B } from "../button/component.js";
9
- import r from "./index.module.css.js";
9
+ import t from "./index.module.css.js";
10
10
  const E = j(
11
11
  ({
12
- dataTestId: h,
13
- className: k,
14
- contentClassName: N,
15
- hasCloser: c,
12
+ dataTestId: k,
13
+ className: N,
14
+ contentClassName: u,
15
+ hasCloser: o,
16
16
  leftAddons: s,
17
- view: t = "default",
17
+ view: e = "default",
18
18
  title: i,
19
19
  children: m,
20
20
  bottomAddons: n,
21
- block: u,
22
- onClose: a,
23
- ...v
24
- }, C) => {
25
- const l = {
26
- negative: /* @__PURE__ */ e(f, {}),
27
- attention: /* @__PURE__ */ e(f, {}),
28
- positive: /* @__PURE__ */ e(M, {}),
29
- default: /* @__PURE__ */ e(p, {}),
30
- neutral: /* @__PURE__ */ e(p, {}),
31
- black: null
32
- }, b = A(
33
- (x) => {
34
- a && a(x);
21
+ block: v,
22
+ onClose: r,
23
+ ...C
24
+ }, b) => {
25
+ const c = {
26
+ negative: /* @__PURE__ */ a(f, {}),
27
+ attention: /* @__PURE__ */ a(f, {}),
28
+ positive: /* @__PURE__ */ a(p, {}),
29
+ default: /* @__PURE__ */ a(h, {}),
30
+ neutral: /* @__PURE__ */ a(h, {}),
31
+ black: /* @__PURE__ */ a(p, {})
32
+ }, x = A(
33
+ (M) => {
34
+ r && r(M);
35
35
  },
36
- [a]
36
+ [r]
37
37
  );
38
- return /* @__PURE__ */ e(
38
+ return /* @__PURE__ */ a(
39
39
  "div",
40
40
  {
41
- ref: C,
42
- className: o(
43
- r.component,
44
- r[t],
41
+ ref: b,
42
+ className: l(
43
+ t.component,
44
+ t[e],
45
45
  {
46
- [r.block]: u,
47
- [r.hasCloser]: c
46
+ [t.block]: v,
47
+ [t.hasCloser]: o,
48
+ [t.compact]: e === "black"
48
49
  },
49
- k
50
+ N
50
51
  ),
51
- "data-test-id": h,
52
- ...v,
53
- children: /* @__PURE__ */ d("div", { className: r.contentWrap, children: [
54
- s && /* @__PURE__ */ e("div", { className: r.leftAddons, children: l[t] }),
55
- l[t] && !s && /* @__PURE__ */ e("div", { className: r.checkmark, children: l[t] }),
56
- /* @__PURE__ */ d("div", { className: o(N, r.content), children: [
57
- i && /* @__PURE__ */ e("div", { className: r.title, children: i }),
58
- m && /* @__PURE__ */ e("div", { className: r.children, children: m }),
59
- n && /* @__PURE__ */ e("div", { className: r.bottomAddons, children: n })
52
+ "data-test-id": k,
53
+ ...C,
54
+ children: /* @__PURE__ */ d("div", { className: t.contentWrap, children: [
55
+ s && /* @__PURE__ */ a("div", { className: t.leftAddons, children: c[e] }),
56
+ c[e] && !s && /* @__PURE__ */ a("div", { className: t.checkmark, children: c[e] }),
57
+ /* @__PURE__ */ d("div", { className: l(u, t.content), children: [
58
+ i && /* @__PURE__ */ a("div", { className: t.title, children: i }),
59
+ m && /* @__PURE__ */ a("div", { className: t.children, children: m }),
60
+ n && /* @__PURE__ */ a("div", { className: t.bottomAddons, children: n })
60
61
  ] }),
61
- c && /* @__PURE__ */ e(
62
+ o && /* @__PURE__ */ a(
62
63
  B,
63
64
  {
64
- className: o(r.closeButton),
65
+ className: l(t.closeButton),
65
66
  view: "ghost",
66
- onClick: b,
67
+ onClick: x,
67
68
  "aria-label": "закрыть",
68
- leftAddons: /* @__PURE__ */ e(g, {})
69
+ leftAddons: /* @__PURE__ */ a(g, {})
69
70
  }
70
71
  )
71
72
  ] })
@@ -1 +1 @@
1
- :root{--text-primary-color: var(--color-text-primary);--text-secondary-color: var(--color-text-secondary);--text-tertiary-color: var(--color-text-tertiary);--border-radius: 4px;--focus-color: var(--color-border-link);--font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, sans-serif;--disabled-cursor: not-allowed;--arrow-transform: rotate(180deg)}:root{--toast-plate-bg-color: var(--color-bg-secondary-inverted);--toast-plate-bg-color-negative: var(--color-bg-negative);--toast-plate-bg-color-positive: var(--color-bg-positive);--toast-plate-border-radius: 8px;--toast-plate-title-font-weight: 700;--toast-plate-action-align: center;--toast-plate-action-padding: 0 var(--gap-2xl);--toast-plate-action-divider-display: block}.component_2FCo{position:relative;display:inline-flex;flex-direction:column;box-sizing:border-box;border-radius:var(--toast-plate-border-radius);color:var(--color-text-primary);min-height:56px;width:100%;padding:var(--gap-m);background-color:var(--toast-plate-bg-color)}.component_2FCo.hasCloser_ig0b{padding-right:56px}.component_2FCo.block_aZI2{display:flex;width:100%}.component_2FCo.positive_k8le{background-color:color-mix(in srgb,var(--color-bg-positive) 10%,var(--color-bg-primary));border:1px solid var(--color-bg-positive)}.component_2FCo.positive_k8le .checkmark_Uk-P svg{color:var(--color-graphic-positive)}.component_2FCo.attention_qo9d{background-color:color-mix(in srgb,var(--color-bg-attention) 10%,var(--color-bg-primary));border:1px solid var(--color-bg-attention)}.component_2FCo.attention_qo9d .checkmark_Uk-P svg{color:var(--color-graphic-attention)}.component_2FCo.negative_rdTB{background-color:color-mix(in srgb,var(--color-bg-negative) 10%,var(--color-bg-primary));border:1px solid var(--color-bg-negative)}.component_2FCo.negative_rdTB .checkmark_Uk-P svg{color:var(--color-graphic-negative)}.component_2FCo.default_yyLQ{background-color:color-mix(in srgb,var(--color-bg-accent) 10%,var(--color-bg-primary));border:1px solid var(--color-bg-accent)}.component_2FCo.default_yyLQ .checkmark_Uk-P svg{color:var(--color-graphic-accent)}.component_2FCo.neutral_KAat{background-color:var(--color-bg-secondary);border:1px solid var(--color-border-primary)}.component_2FCo.neutral_KAat .checkmark_Uk-P svg{color:var(--color-graphic-secondary)}.component_2FCo.black_c7gB{background-color:var(--color-bg-primary-inverted);color:var(--color-text-primary-inverted)}.component_2FCo.black_c7gB .checkmark_Uk-P svg{color:var(--color-graphic-primaty-inverted)}.component_2FCo.black_c7gB .closeButton_mFhA{color:var(--color-text-primary-inverted)!important}.contentWrap_-P3J{display:flex;justify-content:space-between}.content_ING2{display:flex;flex:1;flex-direction:column;padding-left:12px}.leftAddons_Odkd{display:flex;align-items:flex-start;flex-shrink:0;padding-right:var(--gap-s)}.title_QZFU{font-size:16px;line-height:24px;font-weight:700;font-family:var(--font-family);font-weight:var(--toast-plate-title-font-weight);margin-bottom:4px}.children_tKSv{font-size:13px;line-height:24px;font-weight:500;font-family:var(--font-family);margin-bottom:0}.bottomAddons_ixVc{margin-top:16px}.closeButton_mFhA{display:flex!important;align-items:flex-start!important;position:absolute!important;top:var(--gap-m)!important;bottom:var(--gap-s)!important;right:var(--gap-s)!important;padding:var(--gap-2xs)!important;transition:opacity .2s ease-out!important;cursor:pointer!important;color:var(--color-text-primary)!important}.closeButton_mFhA:hover{opacity:.7!important}.closeButton_mFhA:active{opacity:.5!important}
1
+ :root{--text-primary-color: var(--color-text-primary);--text-secondary-color: var(--color-text-secondary);--text-tertiary-color: var(--color-text-tertiary);--border-radius: 4px;--focus-color: var(--color-border-link);--font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, sans-serif;--disabled-cursor: not-allowed;--arrow-transform: rotate(180deg)}:root{--toast-plate-bg-color: var(--color-bg-secondary-inverted);--toast-plate-bg-color-negative: var(--color-bg-negative);--toast-plate-bg-color-positive: var(--color-bg-positive);--toast-plate-border-radius: 8px;--toast-plate-title-font-weight: 700;--toast-plate-action-align: center;--toast-plate-action-padding: 0 var(--gap-2xl);--toast-plate-action-divider-display: block}.component_2FCo{position:relative;display:inline-flex;flex-direction:column;box-sizing:border-box;border-radius:var(--toast-plate-border-radius);color:var(--color-text-primary);min-height:56px;width:100%;padding:var(--gap-m);background-color:var(--toast-plate-bg-color)}.component_2FCo.hasCloser_ig0b{padding-right:56px}.component_2FCo.block_aZI2{display:flex;width:100%}.component_2FCo.positive_k8le{background-color:color-mix(in srgb,var(--color-bg-positive) 10%,var(--color-bg-primary));border:1px solid var(--color-bg-positive)}.component_2FCo.positive_k8le .checkmark_Uk-P svg{color:var(--color-graphic-positive)}.component_2FCo.attention_qo9d{background-color:color-mix(in srgb,var(--color-bg-attention) 10%,var(--color-bg-primary));border:1px solid var(--color-bg-attention)}.component_2FCo.attention_qo9d .checkmark_Uk-P svg{color:var(--color-graphic-attention)}.component_2FCo.negative_rdTB{background-color:color-mix(in srgb,var(--color-bg-negative) 10%,var(--color-bg-primary));border:1px solid var(--color-bg-negative)}.component_2FCo.negative_rdTB .checkmark_Uk-P svg{color:var(--color-graphic-negative)}.component_2FCo.default_yyLQ{background-color:color-mix(in srgb,var(--color-bg-accent) 10%,var(--color-bg-primary));border:1px solid var(--color-bg-accent)}.component_2FCo.default_yyLQ .checkmark_Uk-P svg{color:var(--color-graphic-accent)}.component_2FCo.neutral_KAat{background-color:var(--color-bg-secondary);border:1px solid var(--color-border-primary)}.component_2FCo.neutral_KAat .checkmark_Uk-P svg{color:var(--color-graphic-secondary)}.component_2FCo.black_c7gB{background-color:var(--color-bg-secondary);border:none;color:var(--color-text-primary)}.component_2FCo.black_c7gB .checkmark_Uk-P svg{color:var(--color-graphic-positive)}.component_2FCo.compact_hOwR{min-height:0;min-height:initial;padding:var(--gap-xs) var(--gap-s);border-radius:6px}.component_2FCo.compact_hOwR.hasCloser_ig0b{padding-right:36px}.component_2FCo.compact_hOwR .contentWrap_-P3J{align-items:center}.component_2FCo.compact_hOwR .checkmark_Uk-P{display:flex;align-items:center;flex-shrink:0}:is(.component_2FCo.compact_hOwR .checkmark_Uk-P) svg{width:20px;height:20px}.component_2FCo.compact_hOwR .content_ING2{padding-left:var(--gap-xs);justify-content:center}.component_2FCo.compact_hOwR .title_QZFU{font-size:13px;line-height:24px;font-weight:500;font-family:var(--font-family);font-weight:600;margin-bottom:0}.component_2FCo.compact_hOwR .children_tKSv{font-size:13px;line-height:24px;font-weight:500;font-family:var(--font-family);margin-bottom:0}.component_2FCo.compact_hOwR .bottomAddons_ixVc{margin-top:var(--gap-xs)}.component_2FCo.compact_hOwR .closeButton_mFhA{top:50%!important;bottom:auto!important;transform:translateY(-50%);right:var(--gap-2xs)!important;color:var(--color-text-secondary)!important}.contentWrap_-P3J{display:flex;justify-content:space-between}.content_ING2{display:flex;flex:1;flex-direction:column;padding-left:12px}.leftAddons_Odkd{display:flex;align-items:flex-start;flex-shrink:0;padding-right:var(--gap-s)}.title_QZFU{font-size:16px;line-height:24px;font-weight:700;font-family:var(--font-family);font-weight:var(--toast-plate-title-font-weight);margin-bottom:4px}.children_tKSv{font-size:13px;line-height:24px;font-weight:500;font-family:var(--font-family);margin-bottom:0}.bottomAddons_ixVc{margin-top:16px}.closeButton_mFhA{display:flex!important;align-items:flex-start!important;position:absolute!important;top:var(--gap-m)!important;bottom:var(--gap-s)!important;right:var(--gap-s)!important;padding:var(--gap-2xs)!important;transition:opacity .2s ease-out!important;cursor:pointer!important;color:var(--color-text-primary)!important}.closeButton_mFhA:hover{opacity:.7!important}.closeButton_mFhA:active{opacity:.5!important}