@alphakits/ui 2.3.0 → 2.4.0

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 (217) hide show
  1. package/dist/__internal/utils/index.d.ts +1 -1
  2. package/dist/__internal/utils/index.js +4 -4
  3. package/dist/amount-input/component.js +41 -41
  4. package/dist/avatar/component.js +2 -18
  5. package/dist/badge/component.d.ts +1 -1
  6. package/dist/base-card/component.js +1 -7
  7. package/dist/bottom-sheet/component.d.ts +1 -1
  8. package/dist/bottom-sheet/component.js +9 -13
  9. package/dist/box/component.d.ts +2 -2
  10. package/dist/box/component.js +4 -4
  11. package/dist/button/component.js +9 -9
  12. package/dist/button-arrow/component.js +6 -1
  13. package/dist/calendar/component.d.ts +1 -2
  14. package/dist/calendar/component.js +77 -74
  15. package/dist/calendar/components/days-table/component.js +46 -43
  16. package/dist/calendar/components/header/{/321/201omponent.js → component.js} +3 -12
  17. package/dist/calendar/components/header/index.d.ts +1 -1
  18. package/dist/calendar/components/header/index.js +1 -1
  19. package/dist/calendar/components/months-table/{/321/201omponent.js → component.js} +7 -7
  20. package/dist/calendar/components/months-table/index.d.ts +1 -1
  21. package/dist/calendar/components/months-table/index.js +1 -1
  22. package/dist/calendar/components/select-button/{/321/201omponent.d.ts → component.d.ts} +3 -3
  23. package/dist/calendar/components/select-button/{/321/201omponent.js → component.js} +5 -11
  24. package/dist/calendar/components/select-button/index.d.ts +1 -1
  25. package/dist/calendar/components/select-button/index.js +1 -1
  26. package/dist/calendar/components/years-table/{/321/201omponent.js → component.js} +14 -14
  27. package/dist/calendar/components/years-table/index.d.ts +1 -1
  28. package/dist/calendar/components/years-table/index.js +1 -1
  29. package/dist/calendar/index.d.ts +2 -2
  30. package/dist/calendar/index.js +4 -4
  31. package/dist/calendar/use-calendar.js +51 -47
  32. package/dist/calendar/utils.js +7 -9
  33. package/dist/calendar-input/component.js +22 -22
  34. package/dist/card/component.js +2 -18
  35. package/dist/cell/base/component.js +31 -31
  36. package/dist/cell/pure/component.js +2 -2
  37. package/dist/checkbox/component.js +11 -11
  38. package/dist/checkbox-group/component.js +23 -24
  39. package/dist/checkbox-lists/component.d.ts +1 -2
  40. package/dist/checkbox-lists/component.js +59 -61
  41. package/dist/collapsable-row/addons.d.ts +3 -4
  42. package/dist/collapsable-row/addons.js +6 -9
  43. package/dist/collapsable-row/component.d.ts +1 -1
  44. package/dist/collapsable-row/component.js +7 -7
  45. package/dist/collapse/component.js +45 -54
  46. package/dist/copy-button/component.d.ts +1 -2
  47. package/dist/copy-button/component.js +1 -5
  48. package/dist/date/component.js +1 -1
  49. package/dist/date-switcher/component.d.ts +1 -2
  50. package/dist/date-switcher/component.js +8 -8
  51. package/dist/decorated-item/component.js +10 -20
  52. package/dist/dot/component.js +1 -4
  53. package/dist/empty-page/component.js +1 -9
  54. package/dist/filter-tag/component.d.ts +1 -1
  55. package/dist/flex/component.d.ts +2 -2
  56. package/dist/footer/component.js +57 -53
  57. package/dist/form/component.d.ts +1 -2
  58. package/dist/form/component.js +2 -12
  59. package/dist/form/templates/base-form/index.d.ts +3 -3
  60. package/dist/form/templates/base-form/index.js +26 -26
  61. package/dist/form/templates/filters-form/index.d.ts +1 -1
  62. package/dist/form/templates/filters-form/index.js +20 -23
  63. package/dist/form/templates/rest-form/form.d.ts +1 -2
  64. package/dist/form/templates/rest-form/form.js +51 -56
  65. package/dist/form/templates/rest-form/index.d.ts +3 -3
  66. package/dist/form/templates/rest-form/index.js +16 -27
  67. package/dist/form/utils/get-default-values.js +3 -6
  68. package/dist/form/utils/remove-undefined-from-object.js +1 -3
  69. package/dist/form-control/component.js +1 -1
  70. package/dist/formik/index.d.ts +2 -2
  71. package/dist/header-search/component.js +1 -6
  72. package/dist/hooks/index.d.ts +2 -2
  73. package/dist/hooks/index.js +10 -10
  74. package/dist/hooks/use-get-one/index.js +16 -16
  75. package/dist/icon-button/component.d.ts +3 -3
  76. package/dist/icon-button/component.js +2 -8
  77. package/dist/image/component.js +52 -30
  78. package/dist/image/image-base.js +1 -7
  79. package/dist/image/use-image-render-component.d.ts +1 -1
  80. package/dist/image/use-image-render-component.js +11 -14
  81. package/dist/image-gallery/component.js +40 -45
  82. package/dist/image-uploader/component.js +56 -53
  83. package/dist/index.js +41 -41
  84. package/dist/info-block-wrapper/component.d.ts +1 -1
  85. package/dist/input/component.js +1 -1
  86. package/dist/input-autocomplete/autocomplete-field/index.d.ts +1 -2
  87. package/dist/input-autocomplete/autocomplete-field/index.js +6 -6
  88. package/dist/input-autocomplete/component.d.ts +26 -26
  89. package/dist/input-ghost/component.d.ts +1 -1
  90. package/dist/link/component.d.ts +2 -2
  91. package/dist/link/component.js +1 -1
  92. package/dist/loader/component.js +6 -5
  93. package/dist/masked-input/component.js +7 -16
  94. package/dist/menu/component.js +12 -17
  95. package/dist/menu/components/content-header/index.js +1 -9
  96. package/dist/menu/components/menu-avatar/index.js +1 -6
  97. package/dist/menu/components/menu-button/index.js +1 -10
  98. package/dist/menu/components/menu-buttons-list/index.d.ts +1 -1
  99. package/dist/menu/components/menu-buttons-list/index.js +1 -7
  100. package/dist/menu/hooks/use-menu.js +12 -12
  101. package/dist/message/component.js +33 -14
  102. package/dist/modal/components/modals/modal.d.ts +1 -2
  103. package/dist/modal/components/modals/modal.js +30 -33
  104. package/dist/modal/context.js +12 -9
  105. package/dist/modal/hooks/use-modal.d.ts +1 -1
  106. package/dist/mq/component.js +1 -6
  107. package/dist/notification/component.js +14 -12
  108. package/dist/page-container/component.js +1 -6
  109. package/dist/page-loading/component.d.ts +1 -2
  110. package/dist/page-with-controls/component.js +4 -7
  111. package/dist/picker-button/common/labeled-button/index.js +18 -12
  112. package/dist/picker-button/component.js +5 -5
  113. package/dist/picker-button/field/{Component.d.ts → component.d.ts} +1 -2
  114. package/dist/picker-button/field/index.d.ts +1 -1
  115. package/dist/picker-button/field/index.js +1 -1
  116. package/dist/picker-button/index.d.ts +1 -1
  117. package/dist/picker-button/index.js +4 -4
  118. package/dist/popover/component.d.ts +2 -2
  119. package/dist/popover/component.js +69 -63
  120. package/dist/radio/component.js +7 -7
  121. package/dist/radio-groups/component.d.ts +1 -2
  122. package/dist/radio-groups/component.js +9 -7
  123. package/dist/select/component.d.ts +8 -9
  124. package/dist/select/component.js +1 -9
  125. package/dist/select/components/arrow/component.d.ts +1 -2
  126. package/dist/select/components/base-select/component.js +97 -90
  127. package/dist/select/components/checkmark/component.d.ts +1 -2
  128. package/dist/select/components/field/component.d.ts +1 -2
  129. package/dist/select/components/field/component.js +8 -5
  130. package/dist/select/components/native-select/component.js +4 -11
  131. package/dist/select/components/optgroup/component.d.ts +1 -2
  132. package/dist/select/components/optgroup/component.js +4 -4
  133. package/dist/select/components/option/component.js +1 -1
  134. package/dist/select/components/options-list/component.d.ts +1 -2
  135. package/dist/select/components/options-list/component.js +25 -23
  136. package/dist/select/components/select-search/index.d.ts +1 -1
  137. package/dist/select/components/select-search/index.js +28 -26
  138. package/dist/select/components/virtual-options-list/component.d.ts +1 -2
  139. package/dist/select/components/virtual-options-list/component.js +52 -45
  140. package/dist/select/index.js +4 -4
  141. package/dist/select/presets/index.d.ts +1 -1
  142. package/dist/select/presets/index.js +4 -4
  143. package/dist/select/presets/use-lazy-loading/index.d.ts +3 -4
  144. package/dist/select/presets/use-lazy-loading/index.js +45 -43
  145. package/dist/select/presets/use-select-with-loading/hook.d.ts +1 -2
  146. package/dist/select/presets/use-select-with-loading/hook.js +8 -1
  147. package/dist/select/utils.js +32 -32
  148. package/dist/sidepanel/component.js +21 -15
  149. package/dist/sidepanel-header/component.js +17 -16
  150. package/dist/skeleton/component.js +4 -4
  151. package/dist/space/component.d.ts +2 -2
  152. package/dist/space/component.js +42 -45
  153. package/dist/space/{Item.d.ts → item.d.ts} +2 -2
  154. package/dist/spinner/component.js +6 -5
  155. package/dist/stack/index.d.ts +1 -1
  156. package/dist/stack/index.js +5 -5
  157. package/dist/stepped-progress-bar/components/step-bar.js +3 -3
  158. package/dist/stepped-progress-bar/index.d.ts +2 -2
  159. package/dist/stepped-progress-bar/index.js +37 -22
  160. package/dist/sticker/component.js +1 -17
  161. package/dist/suffix-input/component.js +13 -13
  162. package/dist/switch/component.js +7 -7
  163. package/dist/table/components/cells/index.d.ts +1 -2
  164. package/dist/table/components/empty-list/index.d.ts +1 -2
  165. package/dist/table/components/error/index.d.ts +2 -3
  166. package/dist/table/components/error/index.js +1 -1
  167. package/dist/table/components/loading/index.d.ts +1 -1
  168. package/dist/table/components/loading/index.js +18 -12
  169. package/dist/table/components/pagination/index.js +56 -53
  170. package/dist/table/components/table-header/index.js +59 -56
  171. package/dist/table/hooks/use-table-data.js +63 -60
  172. package/dist/table/table.d.ts +1 -1
  173. package/dist/table/table.js +73 -73
  174. package/dist/table/types.d.ts +3 -3
  175. package/dist/table/utils/get-query-from-url.js +1 -8
  176. package/dist/table/utils/get-tags.d.ts +1 -1
  177. package/dist/table/utils/get-tags.js +9 -12
  178. package/dist/table/utils/index.d.ts +1 -1
  179. package/dist/table/utils/index.js +4 -4
  180. package/dist/table/utils/parse-query-params.js +5 -1
  181. package/dist/table/utils/prepare-rows.d.ts +1 -2
  182. package/dist/table/utils/prepare-rows.js +4 -3
  183. package/dist/table/utils/query-adapter.d.ts +1 -1
  184. package/dist/table/utils/query-adapter.js +5 -5
  185. package/dist/table/utils/remove-query-param.js +3 -1
  186. package/dist/table/utils/reset-query-param.js +16 -9
  187. package/dist/table-status/component.js +5 -1
  188. package/dist/textarea/component.js +36 -28
  189. package/dist/theme-provider/component.js +33 -29
  190. package/dist/toast/component.d.ts +7 -8
  191. package/dist/toast/component.js +65 -63
  192. package/dist/toast-notifier/component.js +13 -13
  193. package/dist/toast-notifier/use-timer.d.ts +1 -1
  194. package/dist/toast-notifier/use-timer.js +5 -5
  195. package/dist/toast-plate/component.d.ts +3 -3
  196. package/dist/toast-plate/component.js +7 -7
  197. package/dist/tooltip/component.js +35 -35
  198. package/dist/tooltip/node-resolver.js +7 -7
  199. package/dist/typings/api.d.ts +3 -5
  200. package/dist/typography/colors.d.ts +1 -1
  201. package/dist/typography/title/component.d.ts +3 -3
  202. package/dist/typography/title/index.d.ts +1 -1
  203. package/dist/typography/title/index.js +3 -3
  204. package/dist/utils/date/index.js +12 -2
  205. package/dist/utils/index.d.ts +2 -2
  206. package/dist/utils/index.js +14 -14
  207. package/dist/utils/split-amount/util.js +4 -4
  208. package/dist/with-suffix/component.d.ts +13 -13
  209. package/dist/with-suffix/component.js +8 -8
  210. package/package.json +9 -34
  211. /package/dist/__internal/utils/{getDataTestId.d.ts → get-data-test-id.d.ts} +0 -0
  212. /package/dist/__internal/utils/{getDataTestId.js → get-data-test-id.js} +0 -0
  213. /package/dist/calendar/components/header/{/321/201omponent.d.ts" → component.d.ts} +0 -0
  214. /package/dist/calendar/components/months-table/{/321/201omponent.d.ts" → component.d.ts} +0 -0
  215. /package/dist/calendar/components/years-table/{/321/201omponent.d.ts" → component.d.ts} +0 -0
  216. /package/dist/picker-button/field/{Component.js → component.js} +0 -0
  217. /package/dist/space/{Item.js → item.js} +0 -0
@@ -1,17 +1,17 @@
1
1
  import { jsxs as j, jsx as l } from "react/jsx-runtime";
2
- import { forwardRef as $, useRef as v, useState as I, useCallback as f, useEffect as p, useMemo as M } from "react";
3
- import u from "classnames";
4
- import { debounce as O } from "../utils/debounce.js";
5
- import { ResizeObserver as P } from "resize-observer";
6
- import { Link as _ } from "../link/component.js";
2
+ import f from "classnames";
3
+ import { forwardRef as $, useRef as v, useState as I, useCallback as p, useEffect as u, useMemo as M } from "react";
4
+ import { ResizeObserver as O } from "resize-observer";
5
+ import { Link as P } from "../link/component.js";
6
+ import { debounce as _ } from "../utils/debounce.js";
7
7
  import c from "./index.module.css.js";
8
8
  const K = $((E, w) => {
9
9
  const {
10
- expanded: o,
11
- defaultExpanded: g,
10
+ expanded: s,
11
+ defaultExpanded: b,
12
12
  collapsedLabel: m,
13
13
  expandedLabel: h,
14
- children: b,
14
+ children: g,
15
15
  className: C,
16
16
  contentClassName: z,
17
17
  id: L,
@@ -19,64 +19,55 @@ const K = $((E, w) => {
19
19
  onTransitionEnd: a,
20
20
  dataTestId: R,
21
21
  linkProps: x
22
- } = E, d = o === void 0, r = v(null), s = v(null), [y, N] = I(g || o), n = d ? y : o, t = f(() => {
22
+ } = E, d = s === void 0, o = v(null), r = v(null), [y, N] = I(b || s), n = d ? y : s, t = p(() => {
23
23
  let e;
24
- !s.current || !r.current || (n ? e = s.current.offsetHeight : e = 0, r.current.style.height = `${e}px`);
25
- }, [n]), k = f(() => {
26
- a && a(o);
27
- }, [o, a]), H = f(() => {
28
- d && N(!n), console.log(n), i && i();
24
+ !r.current || !o.current || (n ? e = r.current.offsetHeight : e = 0, o.current.style.height = `${e}px`);
25
+ }, [n]), k = p(() => {
26
+ a && a(s);
27
+ }, [s, a]), H = p(() => {
28
+ d && N(!n), i && i();
29
29
  }, [n, i, d]);
30
- p(() => {
31
- const e = O(() => t(), 300);
30
+ u(() => {
31
+ const e = _(() => t(), 300);
32
32
  return window.addEventListener("resize", e), () => {
33
33
  e.cancel(), window.removeEventListener("resize", e);
34
34
  };
35
- }, [t]), p(() => {
36
- const e = new P(t);
37
- return s.current && e.observe(s.current), () => {
35
+ }, [t]), u(() => {
36
+ const e = new O(t);
37
+ return r.current && e.observe(r.current), () => {
38
38
  e.disconnect();
39
39
  };
40
- }, [t]), p(() => t(), [n, t]);
40
+ }, [t]), u(() => t(), [t]);
41
41
  const S = M(() => {
42
- const e = r.current?.offsetHeight;
42
+ const e = o.current?.offsetHeight;
43
43
  return {
44
44
  height: n && !e ? "0px" : `${e}px`
45
45
  };
46
46
  }, [n]), T = !!h || !!m;
47
- return /* @__PURE__ */ j(
48
- "div",
49
- {
50
- ref: w,
51
- className: u(C, c.collapse),
52
- id: L,
53
- "data-test-id": R,
54
- children: [
55
- /* @__PURE__ */ l(
56
- "div",
57
- {
58
- onTransitionEnd: k,
59
- ref: r,
60
- className: u(c.content, z, {
61
- [c.expandedContent]: n
62
- }),
63
- style: S,
64
- children: /* @__PURE__ */ l("div", { className: u(c.children_wrap), ref: s, children: b })
65
- }
66
- ),
67
- T && /* @__PURE__ */ l(
68
- _,
69
- {
70
- view: x?.view || "secondary",
71
- size: x?.size || "m",
72
- pseudo: !0,
73
- onClick: H,
74
- children: n ? h : m
75
- }
76
- )
77
- ]
78
- }
79
- );
47
+ return /* @__PURE__ */ j("div", { ref: w, className: f(C, c.collapse), id: L, "data-test-id": R, children: [
48
+ /* @__PURE__ */ l(
49
+ "div",
50
+ {
51
+ onTransitionEnd: k,
52
+ ref: o,
53
+ className: f(c.content, z, {
54
+ [c.expandedContent]: n
55
+ }),
56
+ style: S,
57
+ children: /* @__PURE__ */ l("div", { className: f(c.children_wrap), ref: r, children: g })
58
+ }
59
+ ),
60
+ T && /* @__PURE__ */ l(
61
+ P,
62
+ {
63
+ view: x?.view || "secondary",
64
+ size: x?.size || "m",
65
+ pseudo: !0,
66
+ onClick: H,
67
+ children: n ? h : m
68
+ }
69
+ )
70
+ ] });
80
71
  });
81
72
  export {
82
73
  K as Collapse
@@ -1,8 +1,7 @@
1
- import { default as React } from 'react';
2
1
  import { TextProps } from '../typography/text';
3
2
  export type CopyButtonProps = {
4
3
  text: string;
5
4
  color?: TextProps['color'];
6
5
  fullText?: string;
7
6
  };
8
- export declare const CopyButton: ({ text, fullText, color, }: CopyButtonProps) => React.JSX.Element;
7
+ export declare const CopyButton: ({ text, fullText, color }: CopyButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -4,11 +4,7 @@ import { IconButton as n } from "../icon-button/component.js";
4
4
  import { ToastNotifier as a } from "../toast-notifier/component.js";
5
5
  import { Typography as c } from "../typography/component.js";
6
6
  import i from "./index.module.css.js";
7
- const y = ({
8
- text: o,
9
- fullText: r,
10
- color: e
11
- }) => /* @__PURE__ */ m("div", { className: i.wrapper, children: [
7
+ const y = ({ text: o, fullText: r, color: e }) => /* @__PURE__ */ m("div", { className: i.wrapper, children: [
12
8
  /* @__PURE__ */ t(c.Text, { view: "title", weight: "medium", color: e || "primary", children: o }),
13
9
  /* @__PURE__ */ t(
14
10
  n,
@@ -1,7 +1,7 @@
1
1
  import { jsx as p } from "react/jsx-runtime";
2
2
  import { Typography as i } from "../typography/component.js";
3
- import "../toast-notifier/component.js";
4
3
  import { formatDate as y } from "../utils/format-date/index.js";
4
+ import "../toast-notifier/component.js";
5
5
  const c = ({
6
6
  className: t,
7
7
  dataTestId: o,
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  export interface DateSwitcherProps {
3
2
  view?: 'day' | 'week';
4
3
  startDate: string;
@@ -7,4 +6,4 @@ export interface DateSwitcherProps {
7
6
  maxDate?: string;
8
7
  todayLabel: string;
9
8
  }
10
- export declare const DateSwitcher: ({ view, startDate, onChange, minDate, maxDate, todayLabel, }: DateSwitcherProps) => React.JSX.Element;
9
+ export declare const DateSwitcher: ({ view, startDate, onChange, minDate, maxDate, todayLabel, }: DateSwitcherProps) => import("react/jsx-runtime").JSX.Element;
@@ -2,10 +2,10 @@ import { jsxs as A, jsx as e } from "react/jsx-runtime";
2
2
  import D from "@alphakits/icons/dist/ChevronBackM";
3
3
  import B from "@alphakits/icons/dist/ChevronForwardM";
4
4
  import F from "classnames";
5
- import { startOfISOWeek as x, parseISO as i, isAfter as N, isBefore as R, isToday as S, format as t, subDays as C, subWeeks as E, add as c } from "../utils/date/index.js";
6
- import { Button as I } from "../button/component.js";
5
+ import { Button as x } from "../button/component.js";
7
6
  import { IconButton as m } from "../icon-button/component.js";
8
- import { Typography as W } from "../typography/component.js";
7
+ import { Typography as N } from "../typography/component.js";
8
+ import { startOfISOWeek as R, parseISO as i, isAfter as S, isBefore as C, isToday as E, format as t, subDays as I, subWeeks as W, add as c } from "../utils/date/index.js";
9
9
  import n from "./index.module.css.js";
10
10
  const s = "yyyy-MM-dd", y = "dd.MM.yy", G = ({
11
11
  view: r = "day",
@@ -15,16 +15,16 @@ const s = "yyyy-MM-dd", y = "dd.MM.yy", G = ({
15
15
  maxDate: f,
16
16
  todayLabel: p
17
17
  }) => {
18
- const k = x(i(l)), o = r === "day" ? i(l) : k, h = a ? i(a) : /* @__PURE__ */ new Date(), O = () => {
18
+ const k = R(i(l)), o = r === "day" ? i(l) : k, h = a ? i(a) : /* @__PURE__ */ new Date(), O = () => {
19
19
  r === "day" && d(t(c(o, { days: 1 }), s)), r === "week" && d(t(c(o, { days: 7 }), s));
20
20
  }, T = () => {
21
- r === "day" && d(t(C(o, 1), s)), r === "week" && d(t(E(o, 1), s));
21
+ r === "day" && d(t(I(o, 1), s)), r === "week" && d(t(W(o, 1), s));
22
22
  }, u = () => {
23
23
  d(t(/* @__PURE__ */ new Date(), s));
24
24
  }, M = () => r === "day" ? t(o, y) : `${t(o, y)} - ${t(
25
25
  c(o, { days: 6 }),
26
26
  y
27
- )}`, b = N(o, h), _ = f ? R(o, i(f)) : !0, w = S(o);
27
+ )}`, b = S(o, h), _ = f ? C(o, i(f)) : !0, w = E(o);
28
28
  return /* @__PURE__ */ A("div", { className: n.date_switcher, children: [
29
29
  /* @__PURE__ */ e(
30
30
  m,
@@ -34,9 +34,9 @@ const s = "yyyy-MM-dd", y = "dd.MM.yy", G = ({
34
34
  icon: D
35
35
  }
36
36
  ),
37
- /* @__PURE__ */ e("div", { className: F(n.date_wrap, n[r]), children: /* @__PURE__ */ e(W.Text, { tag: "div", view: "title", color: "secondary", weight: "bold", children: M() }) }),
37
+ /* @__PURE__ */ e("div", { className: F(n.date_wrap, n[r]), children: /* @__PURE__ */ e(N.Text, { tag: "div", view: "title", color: "secondary", weight: "bold", children: M() }) }),
38
38
  /* @__PURE__ */ e(m, { disabled: !_, onClick: O, icon: B }),
39
- /* @__PURE__ */ e(I, { disabled: w, onClick: u, view: "ghost", children: p })
39
+ /* @__PURE__ */ e(x, { disabled: w, onClick: u, view: "ghost", children: p })
40
40
  ] });
41
41
  };
42
42
  export {
@@ -8,26 +8,16 @@ const h = ({
8
8
  rightAddon: t,
9
9
  description: a,
10
10
  dataTestId: l
11
- }) => /* @__PURE__ */ s(
12
- "div",
13
- {
14
- className: d(
15
- e.component,
16
- i
17
- ),
18
- "data-test-id": l,
19
- children: [
20
- r,
21
- /* @__PURE__ */ s("div", { className: e.textWrap, children: [
22
- /* @__PURE__ */ s("div", { className: e.title, children: [
23
- m,
24
- t && /* @__PURE__ */ c("span", { children: t })
25
- ] }),
26
- a && /* @__PURE__ */ c("div", { className: e.description, children: a })
27
- ] })
28
- ]
29
- }
30
- );
11
+ }) => /* @__PURE__ */ s("div", { className: d(e.component, i), "data-test-id": l, children: [
12
+ r,
13
+ /* @__PURE__ */ s("div", { className: e.textWrap, children: [
14
+ /* @__PURE__ */ s("div", { className: e.title, children: [
15
+ m,
16
+ t && /* @__PURE__ */ c("span", { children: t })
17
+ ] }),
18
+ a && /* @__PURE__ */ c("div", { className: e.description, children: a })
19
+ ] })
20
+ ] });
31
21
  export {
32
22
  h as DecoratedItem
33
23
  };
@@ -1,10 +1,7 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import s from "classnames";
3
3
  import o from "./index.module.css.js";
4
- const c = ({
5
- color: m = "green",
6
- size: r = "sm"
7
- }) => /* @__PURE__ */ t("div", { className: s([o.dot, o[r], o[m]]) });
4
+ const c = ({ color: m = "green", size: r = "sm" }) => /* @__PURE__ */ t("div", { className: s([o.dot, o[r], o[m]]) });
8
5
  export {
9
6
  c as Dot
10
7
  };
@@ -19,15 +19,7 @@ const N = ({
19
19
  /* @__PURE__ */ t(y, { columns: 1, gr: 8, className: i.content, children: [
20
20
  e && /* @__PURE__ */ r(o.Title, { view: "large", weight: "bold", color: "primary", tag: "div", children: e }),
21
21
  /* @__PURE__ */ r(o.Title, { view: "small", weight: "bold", color: "primary", tag: "div", children: a }),
22
- c && /* @__PURE__ */ r(
23
- o.Text,
24
- {
25
- color: "primary",
26
- weight: "medium",
27
- view: "primary-medium",
28
- children: c
29
- }
30
- )
22
+ c && /* @__PURE__ */ r(o.Text, { color: "primary", weight: "medium", view: "primary-medium", children: c })
31
23
  ] }),
32
24
  (!!m?.onClick || m?.href) && /* @__PURE__ */ r(g, { view: d, size: h, ...m, children: n })
33
25
  ] });
@@ -5,7 +5,7 @@ export type FilterTagProps = {
5
5
  color?: FilterTagColor;
6
6
  count?: number | string;
7
7
  className?: string;
8
- children: React.ReactNode;
8
+ children?: React.ReactNode;
9
9
  onClick?: () => void;
10
10
  dataTestId?: string;
11
11
  };
@@ -1,4 +1,4 @@
1
- import { default as React, ReactNode } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  declare enum Spaces {
3
3
  xxxs = 4,
4
4
  xxs = 4,
@@ -19,5 +19,5 @@ type Props = {
19
19
  direction?: 'row' | 'column';
20
20
  justify?: 'start' | 'center' | 'end' | 'between' | 'around';
21
21
  };
22
- export declare const Flex: ({ children, className, gap, marginBottom, wrap, align, direction, justify, }: Props) => React.JSX.Element;
22
+ export declare const Flex: ({ children, className, gap, marginBottom, wrap, align, direction, justify, }: Props) => import("react/jsx-runtime").JSX.Element;
23
23
  export {};
@@ -1,18 +1,18 @@
1
1
  import { jsxs as t, jsx as r } from "react/jsx-runtime";
2
- import v from "react";
3
- import w from "@alphakits/icons/dist/AppStoreM";
4
- import C from "@alphakits/icons/dist/FacebookM";
5
- import M from "@alphakits/icons/dist/GooglePlayM";
6
- import F from "@alphakits/icons/dist/InstagramM";
7
- import S from "@alphakits/icons/dist/YoutubeM";
2
+ import b from "@alphakits/icons/dist/AppStoreM";
3
+ import w from "@alphakits/icons/dist/FacebookM";
4
+ import C from "@alphakits/icons/dist/GooglePlayM";
5
+ import M from "@alphakits/icons/dist/InstagramM";
6
+ import F from "@alphakits/icons/dist/YoutubeM";
7
+ import S from "react";
8
8
  import { Grid as n } from "../grid/component.js";
9
9
  import { IconButton as i } from "../icon-button/component.js";
10
10
  import { SectionWrapper as j } from "../section-wrapper/component.js";
11
11
  import { ContactBlock as A } from "./contact-block.js";
12
12
  import e from "./index.module.css.js";
13
13
  const H = ({
14
- sections: u = [],
15
- contacts: x = [],
14
+ sections: v = [],
15
+ contacts: u = [],
16
16
  company: h,
17
17
  email: p,
18
18
  address: f,
@@ -23,54 +23,58 @@ const H = ({
23
23
  google: s,
24
24
  appstore: a
25
25
  }) => {
26
- const B = o || c || m, b = N && a && s;
26
+ const x = o || c || m, B = N && a && s;
27
27
  return /* @__PURE__ */ t(j, { pb: "m", pt: "l", isBlackBg: !0, children: [
28
- /* @__PURE__ */ r("div", { className: e.wrapper, children: /* @__PURE__ */ r("div", { className: e.row_wrapper, children: /* @__PURE__ */ r(n.Row, { children: /* @__PURE__ */ t(v.Fragment, { children: [
29
- u.map((l) => /* @__PURE__ */ r(
30
- n.Col,
31
- {
32
- className: e.gridCol,
33
- children: /* @__PURE__ */ t("div", { className: e.block, children: [
34
- /* @__PURE__ */ r("span", { className: e.title, children: l.title }),
35
- l.items.map((d) => /* @__PURE__ */ r("a", { className: e.link, href: d.link, children: d.text }, d.text))
36
- ] })
37
- },
38
- l.title
39
- )),
40
- /* @__PURE__ */ r(
41
- n.Col,
42
- {
43
- className: e.gridCol,
44
- children: /* @__PURE__ */ t("div", { className: e.contacts, children: [
45
- x.map((l) => /* @__PURE__ */ r(
46
- A,
47
- {
48
- title: l.title,
49
- value: l.value
50
- },
51
- l.title
52
- )),
53
- p && /* @__PURE__ */ r("div", { className: e.email, children: p }),
54
- /* @__PURE__ */ r("br", {}),
55
- f && /* @__PURE__ */ r("div", { className: e.text, children: f }),
56
- /* @__PURE__ */ r("br", {}),
57
- h && /* @__PURE__ */ r("div", { className: e.text, children: h }),
58
- /* @__PURE__ */ r("br", {}),
59
- B && /* @__PURE__ */ t("div", { className: e.buttons, children: [
60
- o && /* @__PURE__ */ r(i, { href: o, icon: C }),
61
- m && /* @__PURE__ */ r(i, { href: m, icon: S }),
62
- c && /* @__PURE__ */ r(i, { href: c, icon: F })
63
- ] })
64
- ] })
65
- },
66
- "cont"
67
- )
68
- ] }) }) }) }),
69
- /* @__PURE__ */ r("div", { className: e.bottomBlock, children: b && /* @__PURE__ */ t(v.Fragment, { children: [
28
+ /* @__PURE__ */ r("div", { className: e.wrapper, children: /* @__PURE__ */ r("div", { className: e.row_wrapper, children: /* @__PURE__ */ t(n.Row, { children: [
29
+ v.map((l) => /* @__PURE__ */ r(n.Col, { className: e.gridCol, children: /* @__PURE__ */ t("div", { className: e.block, children: [
30
+ /* @__PURE__ */ r("span", { className: e.title, children: l.title }),
31
+ l.items.map((d) => /* @__PURE__ */ r("a", { className: e.link, href: d.link, children: d.text }, d.text))
32
+ ] }) }, l.title)),
33
+ /* @__PURE__ */ r(n.Col, { className: e.gridCol, children: /* @__PURE__ */ t("div", { className: e.contacts, children: [
34
+ u.map((l) => /* @__PURE__ */ r(
35
+ A,
36
+ {
37
+ title: l.title,
38
+ value: l.value
39
+ },
40
+ l.title
41
+ )),
42
+ p && /* @__PURE__ */ r("div", { className: e.email, children: p }),
43
+ /* @__PURE__ */ r("br", {}),
44
+ f && /* @__PURE__ */ r("div", { className: e.text, children: f }),
45
+ /* @__PURE__ */ r("br", {}),
46
+ h && /* @__PURE__ */ r("div", { className: e.text, children: h }),
47
+ /* @__PURE__ */ r("br", {}),
48
+ x && /* @__PURE__ */ t("div", { className: e.buttons, children: [
49
+ o && /* @__PURE__ */ r(
50
+ i,
51
+ {
52
+ href: o,
53
+ icon: w
54
+ }
55
+ ),
56
+ m && /* @__PURE__ */ r(
57
+ i,
58
+ {
59
+ href: m,
60
+ icon: F
61
+ }
62
+ ),
63
+ c && /* @__PURE__ */ r(
64
+ i,
65
+ {
66
+ href: c,
67
+ icon: M
68
+ }
69
+ )
70
+ ] })
71
+ ] }) }, "cont")
72
+ ] }) }) }),
73
+ /* @__PURE__ */ r("div", { className: e.bottomBlock, children: B && /* @__PURE__ */ t(S.Fragment, { children: [
70
74
  /* @__PURE__ */ r("div", { className: e.text, children: N }),
71
75
  /* @__PURE__ */ t("div", { className: e.buttons, children: [
72
- a && /* @__PURE__ */ r(i, { href: a, icon: w }),
73
- s && /* @__PURE__ */ r(i, { href: s, icon: M })
76
+ a && /* @__PURE__ */ r(i, { href: a, icon: b }),
77
+ s && /* @__PURE__ */ r(i, { href: s, icon: C })
74
78
  ] })
75
79
  ] }) })
76
80
  ] });
@@ -1,2 +1 @@
1
- import { default as React } from 'react';
2
- export declare const Component: () => React.JSX.Element;
1
+ export declare const Component: () => import("react/jsx-runtime").JSX.Element;
@@ -33,12 +33,7 @@ const E = { baz: "", bar: "" }, M = { buz: "", bur: "" }, V = (l) => {
33
33
  removing: p,
34
34
  close: l?.close,
35
35
  t: (b) => b,
36
- children: ({
37
- values: b,
38
- touched: d,
39
- errors: r,
40
- handleChange: o
41
- }) => /* @__PURE__ */ C(S, { columns: 1, gr: 16, gc: 0, children: [
36
+ children: ({ values: b, touched: d, errors: r, handleChange: o }) => /* @__PURE__ */ C(S, { columns: 1, gr: 16, gc: 0, children: [
42
37
  /* @__PURE__ */ e(
43
38
  t,
44
39
  {
@@ -91,12 +86,7 @@ const E = { baz: "", bar: "" }, M = { buz: "", bur: "" }, V = (l) => {
91
86
  removing: p,
92
87
  close: l?.close,
93
88
  t: (r) => r,
94
- children: ({
95
- values: r,
96
- touched: o,
97
- errors: n,
98
- handleChange: s
99
- }) => /* @__PURE__ */ C(S, { columns: 1, gr: 16, gc: 0, children: [
89
+ children: ({ values: r, touched: o, errors: n, handleChange: s }) => /* @__PURE__ */ C(S, { columns: 1, gr: 16, gc: 0, children: [
100
90
  /* @__PURE__ */ e(
101
91
  t,
102
92
  {
@@ -1,9 +1,9 @@
1
- import { default as React, PropsWithChildren } from 'react';
2
1
  import { FormikErrors, FormikProps, FormikValues } from 'formik';
2
+ import { default as React, PropsWithChildren } from 'react';
3
3
  import { TFunction } from '../../../modal';
4
4
  export type Props<T extends FormikValues> = {
5
5
  initialValues: T;
6
- validate?: (values: T) => void | Record<string, unknown> | Promise<FormikErrors<T>>;
6
+ validate?: (values: T) => undefined | Record<string, unknown> | Promise<FormikErrors<T>>;
7
7
  customValidationFields?: Array<keyof T>;
8
8
  enableReinitialize?: boolean;
9
9
  loading?: boolean;
@@ -11,4 +11,4 @@ export type Props<T extends FormikValues> = {
11
11
  save: (values: any) => any;
12
12
  children: (props: FormikProps<FormikValues & T>) => React.ReactNode;
13
13
  };
14
- export declare function BaseForm<T extends FormikValues>({ loading, validate, customValidationFields, initialValues, enableReinitialize, save, children, t, }: PropsWithChildren<Props<T>>): React.JSX.Element;
14
+ export declare function BaseForm<T extends FormikValues>({ loading, validate, customValidationFields, initialValues, enableReinitialize, save, children, t, }: PropsWithChildren<Props<T>>): import("react/jsx-runtime").JSX.Element;
@@ -1,35 +1,35 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { Formik as p } from "formik";
3
- import { FormLoading as v } from "../../components/form-loading/index.js";
4
- function g({
5
- loading: i,
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { Formik as l } from "formik";
3
+ import { FormLoading as h } from "../../components/form-loading/index.js";
4
+ function v({
5
+ loading: n,
6
6
  validate: a,
7
- customValidationFields: u,
8
- initialValues: d,
9
- enableReinitialize: s,
10
- save: m,
11
- children: f,
12
- t: l
7
+ customValidationFields: d,
8
+ initialValues: m,
9
+ enableReinitialize: f,
10
+ save: u,
11
+ children: s,
12
+ t: p
13
13
  }) {
14
- if (i) return /* @__PURE__ */ n(v, {});
15
- const c = (r) => (e) => r.reduce((o, t) => ((typeof e == "object" ? e : {})[t] || (o[t] = l("validationErrors:Required")), o), {});
16
- return /* @__PURE__ */ n(
17
- p,
14
+ if (n) return /* @__PURE__ */ i(h, {});
15
+ const c = (r) => (o) => r.reduce(
16
+ (e, t) => ((typeof o == "object" ? o : {})[t] || (e[t] = p("validationErrors:Required")), e),
17
+ {}
18
+ );
19
+ return /* @__PURE__ */ i(
20
+ l,
18
21
  {
19
- validate: ((r, e) => {
22
+ validate: ((r, o) => {
20
23
  if (r) return r;
21
- if (e) return c(e);
22
- })(a, u),
23
- initialValues: d,
24
- enableReinitialize: s,
25
- onSubmit: m,
26
- children: (r) => (process.env.REACT_APP_STAGE !== "prod" && console.debug({
27
- values: r.values,
28
- errors: r.errors
29
- }), f({ ...r }))
24
+ if (o) return c(o);
25
+ })(a, d),
26
+ initialValues: m,
27
+ enableReinitialize: f,
28
+ onSubmit: u,
29
+ children: (r) => (process.env.REACT_APP_STAGE, s({ ...r }))
30
30
  }
31
31
  );
32
32
  }
33
33
  export {
34
- g as BaseForm
34
+ v as BaseForm
35
35
  };
@@ -1,5 +1,5 @@
1
- import { default as React } from 'react';
2
1
  import { FormikProps, FormikValues } from 'formik';
2
+ import { default as React } from 'react';
3
3
  import { TFunction } from '../../../modal';
4
4
  type Props<T> = {
5
5
  initialValues: Record<string, unknown> & T;
@@ -1,40 +1,37 @@
1
- import { jsx as r, jsxs as c } from "react/jsx-runtime";
2
- import u from "react";
1
+ import { jsx as e, jsxs as c } from "react/jsx-runtime";
3
2
  import { Formik as d } from "formik";
3
+ import u from "react";
4
4
  import { Button as i } from "../../../button/component.js";
5
- import { Sidepanel as b } from "../../../sidepanel/component.js";
6
- import { getDefaultValues as f } from "../../utils/get-default-values.js";
5
+ import { Sidepanel as f } from "../../../sidepanel/component.js";
6
+ import { getDefaultValues as p } from "../../utils/get-default-values.js";
7
7
  const C = ({
8
8
  initialValues: n,
9
- defaultValues: s,
10
- children: l,
11
- submitCallback: m,
9
+ defaultValues: m,
10
+ children: s,
11
+ submitCallback: l,
12
12
  close: o,
13
- t
13
+ t: r
14
14
  }) => {
15
- const a = f(n, s);
16
- return /* @__PURE__ */ r(d, { initialValues: a, onSubmit: (e) => {
17
- m(e), o();
18
- }, children: (e) => (process.env.REACT_APP_STAGE !== "prod" && console.debug({
19
- values: e.values,
20
- errors: e.errors
21
- }), /* @__PURE__ */ r(
22
- b,
15
+ const a = p(n, m);
16
+ return /* @__PURE__ */ e(d, { initialValues: a, onSubmit: (t) => {
17
+ l(t), o();
18
+ }, children: (t) => (process.env.REACT_APP_STAGE, /* @__PURE__ */ e(
19
+ f,
23
20
  {
24
- title: t("filters"),
21
+ title: r("filters"),
25
22
  bottomAddons: /* @__PURE__ */ c(u.Fragment, { children: [
26
- /* @__PURE__ */ r(
23
+ /* @__PURE__ */ e(
27
24
  i,
28
25
  {
29
26
  view: "primary",
30
27
  size: "s",
31
28
  block: !0,
32
29
  dataTestId: "buttonSave",
33
- onClick: () => e.submitForm(),
34
- children: t("save")
30
+ onClick: () => t.submitForm(),
31
+ children: r("save")
35
32
  }
36
33
  ),
37
- /* @__PURE__ */ r(
34
+ /* @__PURE__ */ e(
38
35
  i,
39
36
  {
40
37
  block: !0,
@@ -42,11 +39,11 @@ const C = ({
42
39
  size: "s",
43
40
  dataTestId: "buttonCancel",
44
41
  onClick: o,
45
- children: t("cancel")
42
+ children: r("cancel")
46
43
  }
47
44
  )
48
45
  ] }),
49
- children: l(e)
46
+ children: s(t)
50
47
  }
51
48
  )) });
52
49
  };