@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,39 +1,34 @@
1
1
  import { jsx as l, jsxs as g } from "react/jsx-runtime";
2
- import { useState as v, useEffect as h, useCallback as y } from "react";
3
- import N from "@alphakits/icons/dist/ChevronBackM";
4
- import x from "@alphakits/icons/dist/ChevronForwardM";
5
- import C from "@alphakits/icons/dist/CloseM";
6
- import m from "classnames";
2
+ import v from "@alphakits/icons/dist/ChevronBackM";
3
+ import N from "@alphakits/icons/dist/ChevronForwardM";
4
+ import x from "@alphakits/icons/dist/CloseM";
5
+ import o from "classnames";
6
+ import { useState as C, useEffect as h, useCallback as y } from "react";
7
7
  import { Portal as w } from "../portal/component.js";
8
8
  import e from "./index.module.css.js";
9
- const j = ({
10
- onClose: i,
11
- initialSlide: s = 0,
12
- photos: t,
13
- open: n
14
- }) => {
15
- const [c, o] = v(s);
9
+ const p = ({ onClose: i, initialSlide: s = 0, photos: r, open: a }) => {
10
+ const [n, m] = C(s);
16
11
  h(() => {
17
- n && o(s);
18
- }, [n, s]);
12
+ a && m(s);
13
+ }, [a, s]);
19
14
  const d = y(() => {
20
- o((r) => Math.max(0, r - 1));
15
+ m((t) => Math.max(0, t - 1));
21
16
  }, []), u = y(() => {
22
- o((r) => Math.min(t.length - 1, r + 1));
23
- }, [t.length]);
17
+ m((t) => Math.min(r.length - 1, t + 1));
18
+ }, [r.length]);
24
19
  if (h(() => {
25
- if (!n) return;
26
- const r = (b) => {
20
+ if (!a) return;
21
+ const t = (b) => {
27
22
  b.key === "Escape" ? i() : b.key === "ArrowLeft" ? d() : b.key === "ArrowRight" && u();
28
23
  };
29
- document.addEventListener("keydown", r);
30
- const { overflow: a } = document.body.style;
24
+ document.addEventListener("keydown", t);
25
+ const { overflow: c } = document.body.style;
31
26
  return document.body.style.overflow = "hidden", () => {
32
- document.removeEventListener("keydown", r), document.body.style.overflow = a;
27
+ document.removeEventListener("keydown", t), document.body.style.overflow = c;
33
28
  };
34
- }, [n, i, d, u]), !n || !t.length) return null;
35
- const k = t[Math.min(c, t.length - 1)], f = (r) => {
36
- r.target === r.currentTarget && i();
29
+ }, [a, i, d, u]), !a || !r.length) return null;
30
+ const k = r[Math.min(n, r.length - 1)], f = (t) => {
31
+ t.target === t.currentTarget && i();
37
32
  };
38
33
  return /* @__PURE__ */ l(w, { children: /* @__PURE__ */ g(
39
34
  "div",
@@ -47,59 +42,59 @@ const j = ({
47
42
  "button",
48
43
  {
49
44
  type: "button",
50
- className: m(e.button, e.closeButton),
45
+ className: o(e.button, e.closeButton),
51
46
  onClick: i,
52
47
  "aria-label": "Close gallery",
53
- children: /* @__PURE__ */ l(C, {})
48
+ children: /* @__PURE__ */ l(x, {})
54
49
  }
55
50
  ),
56
51
  /* @__PURE__ */ g("div", { className: e.stage, onClick: f, children: [
57
52
  /* @__PURE__ */ g("div", { className: e.counter, children: [
58
- c + 1,
53
+ n + 1,
59
54
  " / ",
60
- t.length
55
+ r.length
61
56
  ] }),
62
- t.length > 1 && /* @__PURE__ */ l(
57
+ r.length > 1 && /* @__PURE__ */ l(
63
58
  "button",
64
59
  {
65
60
  type: "button",
66
- className: m(e.button, e.prevButton),
61
+ className: o(e.button, e.prevButton),
67
62
  onClick: d,
68
- disabled: c === 0,
63
+ disabled: n === 0,
69
64
  "aria-label": "Previous image",
70
- children: /* @__PURE__ */ l(N, {})
65
+ children: /* @__PURE__ */ l(v, {})
71
66
  }
72
67
  ),
73
68
  /* @__PURE__ */ l("img", { className: e.image, src: k.src, alt: "" }),
74
- t.length > 1 && /* @__PURE__ */ l(
69
+ r.length > 1 && /* @__PURE__ */ l(
75
70
  "button",
76
71
  {
77
72
  type: "button",
78
- className: m(e.button, e.nextButton),
73
+ className: o(e.button, e.nextButton),
79
74
  onClick: u,
80
- disabled: c === t.length - 1,
75
+ disabled: n === r.length - 1,
81
76
  "aria-label": "Next image",
82
- children: /* @__PURE__ */ l(x, {})
77
+ children: /* @__PURE__ */ l(N, {})
83
78
  }
84
79
  )
85
80
  ] }),
86
- t.length > 1 && /* @__PURE__ */ l("div", { className: e.thumbnails, children: t.map((r, a) => /* @__PURE__ */ l(
81
+ r.length > 1 && /* @__PURE__ */ l("div", { className: e.thumbnails, children: r.map((t, c) => /* @__PURE__ */ l(
87
82
  "button",
88
83
  {
89
84
  type: "button",
90
- className: m(e.thumbnail, {
91
- [e.thumbnailActive]: a === c
85
+ className: o(e.thumbnail, {
86
+ [e.thumbnailActive]: c === n
92
87
  }),
93
- onClick: () => o(a),
94
- "aria-label": `Image ${a + 1}`,
95
- children: /* @__PURE__ */ l("img", { className: e.thumbnailImage, src: r.src, alt: "" })
88
+ onClick: () => m(c),
89
+ "aria-label": `Image ${c + 1}`,
90
+ children: /* @__PURE__ */ l("img", { className: e.thumbnailImage, src: t.src, alt: "" })
96
91
  },
97
- a
92
+ t.src
98
93
  )) })
99
94
  ]
100
95
  }
101
96
  ) });
102
97
  };
103
98
  export {
104
- j as ImageGallery
99
+ p as ImageGallery
105
100
  };
@@ -1,9 +1,9 @@
1
1
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
- import j, { forwardRef as B, useState as p, useRef as H } from "react";
3
- import L from "@alphakits/icons/dist/EyeM";
4
- import b from "@alphakits/icons/dist/HeartStrokeM";
5
- import D from "@alphakits/icons/dist/PlusS";
6
- import G from "@alphakits/icons/dist/TrashM";
2
+ import j from "@alphakits/icons/dist/EyeM";
3
+ import B from "@alphakits/icons/dist/HeartStrokeM";
4
+ import H from "@alphakits/icons/dist/PlusS";
5
+ import L from "@alphakits/icons/dist/TrashM";
6
+ import b, { forwardRef as D, useState as p, useRef as G } from "react";
7
7
  import { Button as O } from "../button/component.js";
8
8
  import { FlexColumns as q } from "../flex-columns/component.js";
9
9
  import { IconButton as m } from "../icon-button/component.js";
@@ -15,7 +15,7 @@ import { Typography as k } from "../typography/component.js";
15
15
  import { getServiceError as V } from "../utils/get-service-error/index.js";
16
16
  import { showError as W } from "../utils/show-toast/index.js";
17
17
  import t from "./index.module.css.js";
18
- const de = B(
18
+ const de = D(
19
19
  ({
20
20
  value: n = [],
21
21
  title: S,
@@ -31,7 +31,7 @@ const de = B(
31
31
  className: z,
32
32
  children: y
33
33
  }, T) => {
34
- const [A, w] = p(!1), [E, F] = p(), [v, C] = p(!1), s = H(null), M = (r, c) => {
34
+ const [A, w] = p(!1), [E, F] = p(), [v, C] = p(!1), s = G(null), M = (r, c) => {
35
35
  f(r.filter((i) => i !== c));
36
36
  }, x = async ({ target: { files: r } }) => {
37
37
  if (!r) return;
@@ -73,14 +73,7 @@ const de = B(
73
73
  accept: "image/*, .heic"
74
74
  }
75
75
  ),
76
- y ? /* @__PURE__ */ e(
77
- O,
78
- {
79
- view: "ghost",
80
- onClick: () => s.current?.click(),
81
- children: y({ value: n, loading: v })
82
- }
83
- ) : /* @__PURE__ */ a(j.Fragment, { children: [
76
+ y ? /* @__PURE__ */ e(O, { view: "ghost", onClick: () => s.current?.click(), children: y({ value: n, loading: v }) }) : /* @__PURE__ */ a(b.Fragment, { children: [
84
77
  /* @__PURE__ */ e(
85
78
  U,
86
79
  {
@@ -89,7 +82,7 @@ const de = B(
89
82
  m,
90
83
  {
91
84
  onClick: () => s.current?.click(),
92
- icon: D,
85
+ icon: H,
93
86
  loading: v
94
87
  }
95
88
  )
@@ -97,43 +90,53 @@ const de = B(
97
90
  ),
98
91
  d && /* @__PURE__ */ e(k.Text, { view: "primary-small", color: "secondary", weight: "medium", children: d }),
99
92
  /* @__PURE__ */ e(Q, { padding: "4px 0", children: g && /* @__PURE__ */ e(k.Text, { view: "caps", color: "negative", weight: "medium", children: g }) }),
100
- /* @__PURE__ */ e(q, { columns: N, children: n.map((r, c) => /* @__PURE__ */ a(J, { className: t.image, src: r, size: "xl", view: "default", children: [
101
- /* @__PURE__ */ a("div", { className: t.controls, children: [
102
- !!h && u !== r && /* @__PURE__ */ e(
103
- m,
104
- {
105
- onClick: () => h(r),
106
- icon: b,
107
- size: "m",
108
- view: "secondary",
109
- className: t.icon
110
- }
111
- ),
112
- /* @__PURE__ */ e(
113
- m,
114
- {
115
- onClick: () => {
116
- F(c), w(!0);
117
- },
118
- icon: L,
119
- size: "m",
120
- view: "secondary",
121
- className: t.icon
122
- }
123
- ),
124
- /* @__PURE__ */ e(
125
- m,
126
- {
127
- onClick: () => M(n, r),
128
- icon: G,
129
- size: "m",
130
- view: "secondary",
131
- className: t.icon
132
- }
133
- )
134
- ] }),
135
- u === r && /* @__PURE__ */ e("div", { className: t.main, children: "MAIN" })
136
- ] }, r)) }),
93
+ /* @__PURE__ */ e(q, { columns: N, children: n.map((r, c) => /* @__PURE__ */ a(
94
+ J,
95
+ {
96
+ className: t.image,
97
+ src: r,
98
+ size: "xl",
99
+ view: "default",
100
+ children: [
101
+ /* @__PURE__ */ a("div", { className: t.controls, children: [
102
+ !!h && u !== r && /* @__PURE__ */ e(
103
+ m,
104
+ {
105
+ onClick: () => h(r),
106
+ icon: B,
107
+ size: "m",
108
+ view: "secondary",
109
+ className: t.icon
110
+ }
111
+ ),
112
+ /* @__PURE__ */ e(
113
+ m,
114
+ {
115
+ onClick: () => {
116
+ F(c), w(!0);
117
+ },
118
+ icon: j,
119
+ size: "m",
120
+ view: "secondary",
121
+ className: t.icon
122
+ }
123
+ ),
124
+ /* @__PURE__ */ e(
125
+ m,
126
+ {
127
+ onClick: () => M(n, r),
128
+ icon: L,
129
+ size: "m",
130
+ view: "secondary",
131
+ className: t.icon
132
+ }
133
+ )
134
+ ] }),
135
+ u === r && /* @__PURE__ */ e("div", { className: t.main, children: "MAIN" })
136
+ ]
137
+ },
138
+ r
139
+ )) }),
137
140
  /* @__PURE__ */ e(
138
141
  K,
139
142
  {
package/dist/index.js CHANGED
@@ -9,8 +9,8 @@ import { Box as T, Radiuses as c, Spaces as O } from "./box/component.js";
9
9
  import { Button as h } from "./button/component.js";
10
10
  import { ButtonArrow as D } from "./button-arrow/component.js";
11
11
  import { Calendar as k } from "./calendar/component.js";
12
- import { usePeriod as M } from "./calendar/use-period.js";
13
- import { useCalendar as _ } from "./calendar/use-calendar.js";
12
+ import { useCalendar as M } from "./calendar/use-calendar.js";
13
+ import { usePeriod as _ } from "./calendar/use-period.js";
14
14
  import { DAYS_IN_WEEK as F, MONTHS_IN_YEAR as R, SUNDAY_INDEX as B, dateInLimits as L, limitDate as y, monthName as b, russianWeekDay as W } from "./calendar/utils.js";
15
15
  import { CalendarInput as Y } from "./calendar-input/component.js";
16
16
  import { DATE_FORMAT as w, DATE_MASK as G, IS_BROWSER as H, NATIVE_DATE_FORMAT as U, SUPPORTS_INPUT_TYPE_DATE as q, isCompleteDateInput as z, isInputDateSupported as K, parseDateString as V } from "./calendar-input/utils.js";
@@ -37,11 +37,11 @@ import { FormControl as yo } from "./form-control/component.js";
37
37
  import { ErrorMessage as Wo, FastField as No, Field as Yo, FieldArray as vo, Form as wo, Formik as Go, connect as Ho, useField as Uo, useFormik as qo, useFormikContext as zo, withFormik as Ko } from "formik";
38
38
  import { Col as jo, Grid as Jo, Row as Xo } from "./grid/component.js";
39
39
  import { HeaderSearch as Zo } from "./header-search/component.js";
40
- import { useClickOutside as or } from "./hooks/useClickOutside/index.js";
41
- import { useFocus as er } from "./hooks/useFocus/index.js";
42
- import { usePrevious as pr } from "./hooks/usePrevious/index.js";
43
- import { useCrudFormRequests as fr } from "./hooks/use-crud-form-requests/index.js";
44
- import { useGetOne as xr } from "./hooks/use-get-one/index.js";
40
+ import { useCrudFormRequests as or } from "./hooks/use-crud-form-requests/index.js";
41
+ import { useGetOne as er } from "./hooks/use-get-one/index.js";
42
+ import { useClickOutside as pr } from "./hooks/useClickOutside/index.js";
43
+ import { useFocus as fr } from "./hooks/useFocus/index.js";
44
+ import { usePrevious as xr } from "./hooks/usePrevious/index.js";
45
45
  import { IconButton as ir } from "./icon-button/component.js";
46
46
  import { Image as lr } from "./image/component.js";
47
47
  import { textSizes as dr } from "./image/types.js";
@@ -67,8 +67,8 @@ import { Padding as oe } from "./padding/component.js";
67
67
  import { PageContainer as ee } from "./page-container/component.js";
68
68
  import { PageLoading as pe } from "./page-loading/component.js";
69
69
  import { PageWithControls as fe } from "./page-with-controls/component.js";
70
- import { PickerButton as xe } from "./picker-button/component.js";
71
- import { LabeledButton as ie } from "./picker-button/common/labeled-button/index.js";
70
+ import { LabeledButton as xe } from "./picker-button/common/labeled-button/index.js";
71
+ import { PickerButton as ie } from "./picker-button/component.js";
72
72
  import { Popover as le } from "./popover/component.js";
73
73
  import { Portal as de } from "./portal/component.js";
74
74
  import { ProgressBar as Te } from "./progress-bar/component.js";
@@ -85,16 +85,16 @@ import { Optgroup as We } from "./select/components/optgroup/component.js";
85
85
  import { Option as Ye } from "./select/components/option/component.js";
86
86
  import { OptionsList as we } from "./select/components/options-list/component.js";
87
87
  import { VirtualOptionsList as He } from "./select/components/virtual-options-list/component.js";
88
- import { useSelectWithLoading as qe } from "./select/presets/use-select-with-loading/hook.js";
89
- import { useLazyLoading as Ke } from "./select/presets/use-lazy-loading/index.js";
88
+ import { useLazyLoading as qe } from "./select/presets/use-lazy-loading/index.js";
89
+ import { useSelectWithLoading as Ke } from "./select/presets/use-select-with-loading/hook.js";
90
90
  import { convertToOptions as je, isGroup as Je, isOptionShape as Xe, joinOptions as Qe, lastIndexOf as Ze, processOptions as $e, useVisibleOptions as ot } from "./select/utils.js";
91
91
  import { Sidepanel as et } from "./sidepanel/component.js";
92
92
  import { SidepanelHeader as pt } from "./sidepanel-header/component.js";
93
93
  import { Skeleton as ft } from "./skeleton/component.js";
94
94
  import { Space as xt } from "./space/component.js";
95
95
  import { Spinner as it } from "./spinner/component.js";
96
- import { StackingContext as lt, stackingOrder as ut } from "./stack/context.js";
97
- import { Stack as St } from "./stack/component.js";
96
+ import { Stack as lt } from "./stack/component.js";
97
+ import { StackingContext as dt, stackingOrder as St } from "./stack/context.js";
98
98
  import { Status as ct } from "./status/component.js";
99
99
  import { SteppedProgressBar as It, useSteps as ht } from "./stepped-progress-bar/index.js";
100
100
  import { Sticker as Dt } from "./sticker/component.js";
@@ -117,16 +117,16 @@ import { Tooltip as mp } from "./tooltip/component.js";
117
117
  import { Typography as ap } from "./typography/component.js";
118
118
  import { add as sp, addDays as ip, addMonths as np, addYears as lp, eachDayOfInterval as up, eachMonthOfInterval as dp, eachYearOfInterval as Sp, endOfDay as Tp, endOfISOWeek as cp, endOfWeek as Op, endOfYear as Ip, format as hp, isAfter as Ap, isBefore as Dp, isEqual as Cp, isLastDayOfMonth as kp, isSameDay as Ep, isSameMonth as Mp, isSameYear as gp, isThisMonth as _p, isThisYear as Pp, isToday as Fp, isWithinInterval as Rp, lastDayOfMonth as Bp, max as Lp, min as yp, parse as bp, parseISO as Wp, startOfDay as Np, startOfISOWeek as Yp, startOfMonth as vp, startOfWeek as wp, startOfYear as Gp, subDays as Hp, subMonths as Up, subWeeks as qp, subYears as zp, weekDaysShort as Kp } from "./utils/date/index.js";
119
119
  import { debounce as jp } from "./utils/debounce.js";
120
- import { safeStringify as Xp } from "./utils/safe-stringify.js";
121
- import { AMOUNT_MAJOR_MINOR_PARTS_SEPARATOR as Zp, THINSP as $p, formatAmount as om } from "./utils/format-amount/util.js";
122
- import { showError as em, showSuccess as tm } from "./utils/show-toast/index.js";
123
- import { splitAmount as mm } from "./utils/split-amount/util.js";
124
- import { formatDate as am, locales as xm } from "./utils/format-date/index.js";
120
+ import { AMOUNT_MAJOR_MINOR_PARTS_SEPARATOR as Xp, THINSP as Qp, formatAmount as Zp } from "./utils/format-amount/util.js";
121
+ import { formatDate as om, locales as rm } from "./utils/format-date/index.js";
122
+ import { safeStringify as tm } from "./utils/safe-stringify.js";
123
+ import { showError as mm, showSuccess as fm } from "./utils/show-toast/index.js";
124
+ import { splitAmount as xm } from "./utils/split-amount/util.js";
125
125
  import { capitalize as im } from "./utils/string.js";
126
126
  import { WelcomeContainer as lm } from "./welcome-layout/component.js";
127
127
  import { withSuffix as dm } from "./with-suffix/component.js";
128
128
  export {
129
- Zp as AMOUNT_MAJOR_MINOR_PARTS_SEPARATOR,
129
+ Xp as AMOUNT_MAJOR_MINOR_PARTS_SEPARATOR,
130
130
  e as Amount,
131
131
  p as AmountInput,
132
132
  Fe as Arrow,
@@ -185,7 +185,7 @@ export {
185
185
  _r as InputAutocomplete,
186
186
  Fr as InputGhost,
187
187
  qt as LOACAL_STORAGE_THEME_KEY,
188
- ie as LabeledButton,
188
+ xe as LabeledButton,
189
189
  Br as Link,
190
190
  yr as ListAllert,
191
191
  Wr as Loader,
@@ -206,7 +206,7 @@ export {
206
206
  ee as PageContainer,
207
207
  pe as PageLoading,
208
208
  fe as PageWithControls,
209
- xe as PickerButton,
209
+ ie as PickerButton,
210
210
  le as Popover,
211
211
  de as Portal,
212
212
  Te as ProgressBar,
@@ -228,8 +228,8 @@ export {
228
228
  xt as Space,
229
229
  O as Spaces,
230
230
  it as Spinner,
231
- St as Stack,
232
- lt as StackingContext,
231
+ lt as Stack,
232
+ dt as StackingContext,
233
233
  ct as Status,
234
234
  It as SteppedProgressBar,
235
235
  Dt as Sticker,
@@ -239,7 +239,7 @@ export {
239
239
  Ft as Switch,
240
240
  Kt as THEME,
241
241
  Vt as THEME_DATA_ATTR,
242
- $p as THINSP,
242
+ Qp as THINSP,
243
243
  Bt as Table,
244
244
  yt as TableCell,
245
245
  Wt as TableStatus,
@@ -272,8 +272,8 @@ export {
272
272
  Op as endOfWeek,
273
273
  Ip as endOfYear,
274
274
  hp as format,
275
- om as formatAmount,
276
- am as formatDate,
275
+ Zp as formatAmount,
276
+ om as formatDate,
277
277
  Ap as isAfter,
278
278
  Dp as isBefore,
279
279
  z as isCompleteDateInput,
@@ -293,7 +293,7 @@ export {
293
293
  Bp as lastDayOfMonth,
294
294
  Ze as lastIndexOf,
295
295
  y as limitDate,
296
- xm as locales,
296
+ rm as locales,
297
297
  Lp as max,
298
298
  yp as min,
299
299
  b as monthName,
@@ -302,11 +302,11 @@ export {
302
302
  Wp as parseISO,
303
303
  $e as processOptions,
304
304
  W as russianWeekDay,
305
- Xp as safeStringify,
306
- em as showError,
307
- tm as showSuccess,
308
- mm as splitAmount,
309
- ut as stackingOrder,
305
+ tm as safeStringify,
306
+ mm as showError,
307
+ fm as showSuccess,
308
+ xm as splitAmount,
309
+ St as stackingOrder,
310
310
  Np as startOfDay,
311
311
  Yp as startOfISOWeek,
312
312
  vp as startOfMonth,
@@ -317,19 +317,19 @@ export {
317
317
  qp as subWeeks,
318
318
  zp as subYears,
319
319
  dr as textSizes,
320
- _ as useCalendar,
321
- or as useClickOutside,
322
- fr as useCrudFormRequests,
320
+ M as useCalendar,
321
+ pr as useClickOutside,
322
+ or as useCrudFormRequests,
323
323
  Uo as useField,
324
- er as useFocus,
324
+ fr as useFocus,
325
325
  qo as useFormik,
326
326
  zo as useFormikContext,
327
- xr as useGetOne,
328
- Ke as useLazyLoading,
327
+ er as useGetOne,
328
+ qe as useLazyLoading,
329
329
  Xr as useMatchMedia,
330
- M as usePeriod,
331
- pr as usePrevious,
332
- qe as useSelectWithLoading,
330
+ _ as usePeriod,
331
+ xr as usePrevious,
332
+ Ke as useSelectWithLoading,
333
333
  ht as useSteps,
334
334
  Jt as useTheme,
335
335
  ot as useVisibleOptions,
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  export interface InfoBlockWrapperProps {
3
- children: React.ReactNode;
3
+ children?: React.ReactNode;
4
4
  view?: 'default' | 'bordered';
5
5
  }
6
6
  export declare const InfoBlockWrapper: React.FC<InfoBlockWrapperProps>;
@@ -1,7 +1,7 @@
1
1
  import { jsx as a, jsxs as et } from "react/jsx-runtime";
2
+ import I from "classnames";
2
3
  import st, { useRef as ot, useState as F, useCallback as l, Fragment as at } from "react";
3
4
  import nt from "react-merge-refs";
4
- import I from "classnames";
5
5
  import { Button as rt } from "../button/component.js";
6
6
  import { FormControl as it } from "../form-control/component.js";
7
7
  import { useFocus as ct } from "../hooks/useFocus/index.js";
@@ -1,5 +1,4 @@
1
- import { default as React } from 'react';
2
1
  import { SelectFieldProps } from '../../select';
3
2
  import { InputAutocompleteProps } from '../component';
4
3
  export type AutocompleteFieldProps = SelectFieldProps & Pick<InputAutocompleteProps, 'Input' | 'inputProps' | 'value' | 'onInput' | 'readOnly'>;
5
- export declare const AutocompleteField: ({ label, placeholder, Arrow, Input, value, error, success, hint, disabled, readOnly, onInput, inputProps, innerProps, }: AutocompleteFieldProps) => React.JSX.Element;
4
+ export declare const AutocompleteField: ({ label, placeholder, Arrow, Input, value, error, success, hint, disabled, readOnly, onInput, inputProps, innerProps, }: AutocompleteFieldProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import { jsx as i, jsxs as b } from "react/jsx-runtime";
2
- import j, { useRef as v, useCallback as A } from "react";
3
- import I from "classnames";
4
- import { Input as w } from "../../input/component.js";
2
+ import j from "classnames";
3
+ import v, { useRef as A, useCallback as I } from "react";
5
4
  import l from "react-merge-refs";
5
+ import { Input as w } from "../../input/component.js";
6
6
  import a from "./index.module.css.js";
7
7
  const E = ({
8
8
  label: u,
@@ -19,7 +19,7 @@ const E = ({
19
19
  inputProps: o = {},
20
20
  innerProps: t
21
21
  }) => {
22
- const r = v(null), { onClick: c, onFocus: k } = t, s = n || m, F = A(
22
+ const r = A(null), { onClick: c, onFocus: k } = t, s = n || m, F = I(
23
23
  (x) => {
24
24
  c && c(x), r.current && r.current.focus();
25
25
  },
@@ -45,12 +45,12 @@ const E = ({
45
45
  onFocus: s ? void 0 : k,
46
46
  autoComplete: "off",
47
47
  value: h,
48
- rightAddons: (e || o.rightAddons) && /* @__PURE__ */ b(j.Fragment, { children: [
48
+ rightAddons: (e || o.rightAddons) && /* @__PURE__ */ b(v.Fragment, { children: [
49
49
  o.rightAddons,
50
50
  e && /* @__PURE__ */ i(
51
51
  "span",
52
52
  {
53
- className: I(a.arrow, {
53
+ className: j(a.arrow, {
54
54
  [a.error]: f
55
55
  }),
56
56
  children: e
@@ -1,4 +1,4 @@
1
- import { default as React, FC, ChangeEvent, RefAttributes } from 'react';
1
+ import { ChangeEvent, FC, RefAttributes } from 'react';
2
2
  import { InputProps } from '../input';
3
3
  import { BaseSelectProps } from '../select';
4
4
  export type InputAutocompleteProps = Omit<BaseSelectProps, 'Field' | 'nativeSelect'> & {
@@ -10,8 +10,8 @@ export type InputAutocompleteProps = Omit<BaseSelectProps, 'Field' | 'nativeSele
10
10
  onInput?: (event: ChangeEvent<HTMLInputElement>) => void;
11
11
  updatePopover?: BaseSelectProps['updatePopover'];
12
12
  };
13
- export declare const InputAutocomplete: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "Field" | "nativeSelect"> & {
14
- Input?: React.FC<Omit<React.InputHTMLAttributes<HTMLInputElement>, "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "value" | "type" | "size"> & {
13
+ export declare const InputAutocomplete: import('react').ForwardRefExoticComponent<Omit<BaseSelectProps, "Field" | "nativeSelect"> & {
14
+ Input?: FC<Omit<import('react').InputHTMLAttributes<HTMLInputElement>, "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "value" | "type" | "size"> & {
15
15
  value?: string | undefined;
16
16
  defaultValue?: string | undefined;
17
17
  block?: boolean | undefined;
@@ -21,12 +21,12 @@ export declare const InputAutocomplete: React.ForwardRefExoticComponent<Omit<Bas
21
21
  error?: string | boolean | undefined;
22
22
  success?: boolean | undefined;
23
23
  hint?: string | undefined;
24
- label?: React.ReactNode;
24
+ label?: import('react').ReactNode;
25
25
  type?: "number" | "text" | "tel" | "email" | "card" | "money" | "password" | undefined;
26
- wrapperRef?: React.Ref<HTMLDivElement> | undefined;
27
- leftAddons?: React.ReactNode;
28
- rightAddons?: React.ReactNode;
29
- bottomAddons?: React.ReactNode;
26
+ wrapperRef?: import('react').Ref<HTMLDivElement> | undefined;
27
+ leftAddons?: import('react').ReactNode;
28
+ rightAddons?: import('react').ReactNode;
29
+ bottomAddons?: import('react').ReactNode;
30
30
  className?: string | undefined;
31
31
  fieldClassName?: string | undefined;
32
32
  inputClassName?: string | undefined;
@@ -34,16 +34,16 @@ export declare const InputAutocomplete: React.ForwardRefExoticComponent<Omit<Bas
34
34
  addonsClassName?: string | undefined;
35
35
  focusedClassName?: string | undefined;
36
36
  filledClassName?: string | undefined;
37
- onChange?: ((event: React.ChangeEvent<HTMLInputElement, Element>, payload: {
37
+ onChange?: ((event: ChangeEvent<HTMLInputElement, Element>, payload: {
38
38
  value: string;
39
39
  }) => void) | undefined;
40
- onClear?: ((event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void) | undefined;
41
- onClick?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
42
- onMouseDown?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
43
- onMouseUp?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
40
+ onClear?: ((event: import('react').MouseEvent<HTMLButtonElement, MouseEvent>) => void) | undefined;
41
+ onClick?: ((event: import('react').MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
42
+ onMouseDown?: ((event: import('react').MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
43
+ onMouseUp?: ((event: import('react').MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
44
44
  dataTestId?: string | undefined;
45
- } & React.RefAttributes<HTMLInputElement>> | undefined;
46
- inputProps?: (Omit<React.InputHTMLAttributes<HTMLInputElement>, "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "value" | "type" | "size"> & {
45
+ } & RefAttributes<HTMLInputElement>> | undefined;
46
+ inputProps?: (Omit<import('react').InputHTMLAttributes<HTMLInputElement>, "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "value" | "type" | "size"> & {
47
47
  value?: string | undefined;
48
48
  defaultValue?: string | undefined;
49
49
  block?: boolean | undefined;
@@ -53,12 +53,12 @@ export declare const InputAutocomplete: React.ForwardRefExoticComponent<Omit<Bas
53
53
  error?: string | boolean | undefined;
54
54
  success?: boolean | undefined;
55
55
  hint?: string | undefined;
56
- label?: React.ReactNode;
56
+ label?: import('react').ReactNode;
57
57
  type?: "number" | "text" | "tel" | "email" | "card" | "money" | "password" | undefined;
58
- wrapperRef?: React.Ref<HTMLDivElement> | undefined;
59
- leftAddons?: React.ReactNode;
60
- rightAddons?: React.ReactNode;
61
- bottomAddons?: React.ReactNode;
58
+ wrapperRef?: import('react').Ref<HTMLDivElement> | undefined;
59
+ leftAddons?: import('react').ReactNode;
60
+ rightAddons?: import('react').ReactNode;
61
+ bottomAddons?: import('react').ReactNode;
62
62
  className?: string | undefined;
63
63
  fieldClassName?: string | undefined;
64
64
  inputClassName?: string | undefined;
@@ -66,13 +66,13 @@ export declare const InputAutocomplete: React.ForwardRefExoticComponent<Omit<Bas
66
66
  addonsClassName?: string | undefined;
67
67
  focusedClassName?: string | undefined;
68
68
  filledClassName?: string | undefined;
69
- onChange?: ((event: React.ChangeEvent<HTMLInputElement, Element>, payload: {
69
+ onChange?: ((event: ChangeEvent<HTMLInputElement, Element>, payload: {
70
70
  value: string;
71
71
  }) => void) | undefined;
72
- onClear?: ((event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void) | undefined;
73
- onClick?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
74
- onMouseDown?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
75
- onMouseUp?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
72
+ onClear?: ((event: import('react').MouseEvent<HTMLButtonElement, MouseEvent>) => void) | undefined;
73
+ onClick?: ((event: import('react').MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
74
+ onMouseDown?: ((event: import('react').MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
75
+ onMouseUp?: ((event: import('react').MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
76
76
  dataTestId?: string | undefined;
77
77
  } & Record<string, unknown>) | undefined;
78
78
  value?: string | undefined;
@@ -80,4 +80,4 @@ export declare const InputAutocomplete: React.ForwardRefExoticComponent<Omit<Bas
80
80
  success?: boolean | undefined;
81
81
  onInput?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
82
82
  updatePopover?: BaseSelectProps['updatePopover'];
83
- } & React.RefAttributes<HTMLInputElement>>;
83
+ } & RefAttributes<HTMLInputElement>>;
@@ -7,4 +7,4 @@ export interface InputGhostProps {
7
7
  block?: boolean;
8
8
  size?: 's' | 'm';
9
9
  }
10
- export declare const InputGhost: ({ value, onChange, placeholder, leftAddons, block, size, }: InputGhostProps) => React.JSX.Element;
10
+ export declare const InputGhost: ({ value, onChange, placeholder, leftAddons, block, size, }: InputGhostProps) => import("react/jsx-runtime").JSX.Element;