@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,41 +1,47 @@
1
1
  import { jsx as e, jsxs as v } from "react/jsx-runtime";
2
- import N from "react";
3
- import x from "classnames";
2
+ import N from "classnames";
3
+ import x from "react";
4
4
  import { FlexColumns as S } from "../flex-columns/component.js";
5
5
  import { SidepanelHeader as g } from "../sidepanel-header/component.js";
6
- import { Skeleton as y } from "../skeleton/component.js";
6
+ import { Skeleton as j } from "../skeleton/component.js";
7
7
  import r from "./index.module.css.js";
8
8
  const R = ({
9
- dataTestId: i,
9
+ dataTestId: o,
10
10
  title: m,
11
- loading: t,
12
- headerRightAddons: a,
13
- subtitle: l,
14
- noCloser: s,
11
+ loading: i,
12
+ headerRightAddons: t,
13
+ subtitle: a,
14
+ noCloser: l,
15
15
  showCloser: n,
16
16
  headerBottomAddons: c,
17
17
  noStickyFooter: d,
18
18
  noStickyHeader: p,
19
- bottomAddons: o,
19
+ bottomAddons: s,
20
20
  children: f,
21
21
  ...h
22
- }) => /* @__PURE__ */ e(N.Fragment, { children: t ? /* @__PURE__ */ e(S, { className: r.loader, columns: 1, gr: 20, children: new Array(7).fill("").map((j, u) => /* @__PURE__ */ e(y, { animate: !0, visible: !0, className: r.input }, u)) }) : /* @__PURE__ */ v("div", { children: [
22
+ }) => /* @__PURE__ */ e(x.Fragment, { children: i ? /* @__PURE__ */ e(S, { className: r.loader, columns: 1, gr: 20, children: ["s1", "s2", "s3", "s4", "s5", "s6", "s7"].map((u) => /* @__PURE__ */ e(j, { animate: !0, visible: !0, className: r.input }, u)) }) : /* @__PURE__ */ v("div", { children: [
23
23
  /* @__PURE__ */ e(
24
24
  g,
25
25
  {
26
26
  title: m,
27
27
  className: p ? void 0 : r.header,
28
- subtitle: l,
29
- noCloser: s,
28
+ subtitle: a,
29
+ noCloser: l,
30
30
  showCloser: n,
31
- dataTestId: i,
32
- rightAddons: a,
31
+ dataTestId: o,
32
+ rightAddons: t,
33
33
  bottomAddons: c,
34
34
  ...h
35
35
  }
36
36
  ),
37
37
  /* @__PURE__ */ e("div", { className: r.content, children: f }),
38
- o && /* @__PURE__ */ e("div", { className: x(r.footer, { [r.noSticky]: d }), children: o })
38
+ s && /* @__PURE__ */ e(
39
+ "div",
40
+ {
41
+ className: N(r.footer, { [r.noSticky]: d }),
42
+ children: s
43
+ }
44
+ )
39
45
  ] }) });
40
46
  export {
41
47
  R as Sidepanel
@@ -18,22 +18,23 @@ const h = ({ title: m, subtitle: l }) => /* @__PURE__ */ a(w, { columns: 1, gr:
18
18
  bottomAddons: n,
19
19
  noCloser: f,
20
20
  showCloser: v
21
- }) => /* @__PURE__ */ a(
22
- "div",
23
- {
24
- "data-test-id": l,
25
- className: p(e.wrapper, m),
26
- children: [
27
- (i || o || s) && /* @__PURE__ */ a("div", { className: e.heading, children: [
28
- i && d && /* @__PURE__ */ r(g, { onClick: i, t: d }),
29
- !i && o && /* @__PURE__ */ r(h, { title: o, subtitle: c }),
30
- s && /* @__PURE__ */ r("div", { className: p(e.rightAddons, { [e.noCloser]: !!f || v === !1 }), children: s })
31
- ] }),
32
- !!i && o && /* @__PURE__ */ r(h, { title: o, subtitle: c }),
33
- !!n && /* @__PURE__ */ r("div", { className: e.bottomAddons, children: n })
34
- ]
35
- }
36
- );
21
+ }) => /* @__PURE__ */ a("div", { "data-test-id": l, className: p(e.wrapper, m), children: [
22
+ (i || o || s) && /* @__PURE__ */ a("div", { className: e.heading, children: [
23
+ i && d && /* @__PURE__ */ r(g, { onClick: i, t: d }),
24
+ !i && o && /* @__PURE__ */ r(h, { title: o, subtitle: c }),
25
+ s && /* @__PURE__ */ r(
26
+ "div",
27
+ {
28
+ className: p(e.rightAddons, {
29
+ [e.noCloser]: !!f || v === !1
30
+ }),
31
+ children: s
32
+ }
33
+ )
34
+ ] }),
35
+ !!i && o && /* @__PURE__ */ r(h, { title: o, subtitle: c }),
36
+ !!n && /* @__PURE__ */ r("div", { className: e.bottomAddons, children: n })
37
+ ] });
37
38
  export {
38
39
  u as SidepanelHeader
39
40
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import i from "react";
3
- import s from "classnames";
2
+ import i from "classnames";
3
+ import s from "react";
4
4
  import o from "./index.module.css.js";
5
5
  const d = ({
6
6
  visible: e,
@@ -11,11 +11,11 @@ const d = ({
11
11
  }) => e ? /* @__PURE__ */ r(
12
12
  "div",
13
13
  {
14
- className: s(o.component, { [o.animate]: m }, a),
14
+ className: i(o.component, { [o.animate]: m }, a),
15
15
  "data-test-id": n,
16
16
  children: t
17
17
  }
18
- ) : /* @__PURE__ */ r(i.Fragment, { children: t });
18
+ ) : /* @__PURE__ */ r(s.Fragment, { children: t });
19
19
  export {
20
20
  d as Skeleton
21
21
  };
@@ -1,11 +1,11 @@
1
1
  import { default as React, ReactNode } from 'react';
2
- import { Direction, Align, Size } from './utils';
2
+ import { Align, Direction, Size } from './utils';
3
3
  export type SpaceProps = {
4
4
  align?: Align;
5
5
  direction?: Direction;
6
6
  size?: Size | [Size, Size];
7
7
  className?: string;
8
- children: ReactNode;
8
+ children?: ReactNode;
9
9
  dataTestId?: string;
10
10
  wrap?: boolean;
11
11
  divider?: string | ReactNode;
@@ -1,70 +1,67 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import z, { forwardRef as W, Children as w } from "react";
3
- import f from "classnames";
4
- import A from "./Item.js";
5
- import e from "./index.module.css.js";
6
- const I = {
1
+ import { jsx as f } from "react/jsx-runtime";
2
+ import d from "classnames";
3
+ import W, { forwardRef as w, Children as A, isValidElement as I } from "react";
4
+ import t from "./index.module.css.js";
5
+ import k from "./item.js";
6
+ const x = {
7
7
  s: 12,
8
8
  m: 16,
9
9
  l: 20
10
- }, F = (t) => typeof t == "string" ? I[t] : t || 0, M = W((t, h) => {
10
+ }, F = (r) => typeof r == "string" ? x[r] : r || 0, E = w((r, u) => {
11
11
  const {
12
- children: u,
12
+ children: h,
13
13
  className: N,
14
14
  align: n = "start",
15
15
  direction: o = "vertical",
16
- size: r = "m",
17
- wrap: i = !1,
16
+ size: a = "m",
17
+ wrap: l = !1,
18
18
  divider: g = !1,
19
- fullWidth: l = !1
20
- } = t, [C, c] = z.useMemo(
21
- () => (Array.isArray(r) ? r : [r, r]).map(
22
- (s) => F(s)
19
+ fullWidth: i = !1
20
+ } = r, [y, m] = W.useMemo(
21
+ () => (Array.isArray(a) ? a : [a, a]).map(
22
+ (e) => F(e)
23
23
  ),
24
- [r]
25
- ), a = w.toArray(u);
26
- if (a.length === 0)
24
+ [a]
25
+ ), s = A.toArray(h);
26
+ if (s.length === 0)
27
27
  return null;
28
- const y = e[o], S = e[n], v = f(
29
- e.spaceContainer,
30
- y,
28
+ const C = t[o], S = t[n], v = d(
29
+ t.spaceContainer,
30
+ C,
31
31
  {
32
32
  [S]: n,
33
- [e.spaceContainerFullWidth]: l
33
+ [t.spaceContainerFullWidth]: i
34
34
  },
35
35
  N
36
- ), m = f(e.spaceItem, {
37
- [e.spaceItemFullWidth]: l
38
- }), x = a.map((s, p) => (
39
- /* eslint-disable react/no-array-index-key */
40
- /* @__PURE__ */ d(
41
- A,
42
- {
43
- className: m,
44
- direction: o,
45
- horizontalSize: C,
46
- verticalSize: c,
47
- length: a.length,
48
- index: p,
49
- wrap: i,
50
- divider: g,
51
- children: s
52
- },
53
- `${m}-${p}`
54
- )
36
+ ), c = d(t.spaceItem, {
37
+ [t.spaceItemFullWidth]: i
38
+ }), z = s.map((e, p) => /* @__PURE__ */ f(
39
+ k,
40
+ {
41
+ className: c,
42
+ direction: o,
43
+ horizontalSize: y,
44
+ verticalSize: m,
45
+ length: s.length,
46
+ index: p,
47
+ wrap: l,
48
+ divider: g,
49
+ children: e
50
+ },
51
+ I(e) && e.key != null ? e.key : `${c}-${p}`
55
52
  ));
56
- return /* @__PURE__ */ d(
53
+ return /* @__PURE__ */ f(
57
54
  "div",
58
55
  {
59
56
  className: v,
60
57
  style: {
61
- ...i && { flexWrap: "wrap", marginBottom: -c }
58
+ ...l && { flexWrap: "wrap", marginBottom: -m }
62
59
  },
63
- ref: h,
64
- children: x
60
+ ref: u,
61
+ children: z
65
62
  }
66
63
  );
67
64
  });
68
65
  export {
69
- M as Space
66
+ E as Space
70
67
  };
@@ -5,11 +5,11 @@ export interface ItemProps {
5
5
  horizontalSize: number;
6
6
  verticalSize: number;
7
7
  length: number;
8
- children: React.ReactNode;
8
+ children?: React.ReactNode;
9
9
  index: number;
10
10
  direction?: Direction;
11
11
  divider?: string | React.ReactNode;
12
12
  wrap?: boolean;
13
13
  }
14
- declare const Item: (props: ItemProps) => React.JSX.Element | null;
14
+ declare const Item: (props: ItemProps) => import("react/jsx-runtime").JSX.Element | null;
15
15
  export default Item;
@@ -1,8 +1,8 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import s from "classnames";
2
+ import i from "classnames";
3
3
  import e from "./index.module.css.js";
4
4
  const m = ({
5
- size: i = "s",
5
+ size: s = "s",
6
6
  id: t,
7
7
  view: n = "default",
8
8
  className: a,
@@ -12,17 +12,18 @@ const m = ({
12
12
  {
13
13
  id: t,
14
14
  "data-test-id": c,
15
- className: s(e.spinnerWrapper, e[i], a),
15
+ className: i(e.spinnerWrapper, e[s], a),
16
16
  children: /* @__PURE__ */ r(
17
17
  "svg",
18
18
  {
19
- className: s(e.spinner, e[i]),
19
+ className: i(e.spinner, e[s]),
20
20
  preserveAspectRatio: "xMinYMin meet",
21
21
  viewBox: "0 0 50 50",
22
+ "aria-hidden": "true",
22
23
  children: /* @__PURE__ */ r(
23
24
  "circle",
24
25
  {
25
- className: s(e.path, e[n]),
26
+ className: i(e.path, e[n]),
26
27
  cx: "25",
27
28
  cy: "25",
28
29
  r: "20",
@@ -1,2 +1,2 @@
1
- export * from './context';
2
1
  export * from './component';
2
+ export * from './context';
@@ -1,7 +1,7 @@
1
- import { StackingContext as o, stackingOrder as e } from "./context.js";
2
- import { Stack as c } from "./component.js";
1
+ import { Stack as o } from "./component.js";
2
+ import { StackingContext as a, stackingOrder as c } from "./context.js";
3
3
  export {
4
- c as Stack,
5
- o as StackingContext,
6
- e as stackingOrder
4
+ o as Stack,
5
+ a as StackingContext,
6
+ c as stackingOrder
7
7
  };
@@ -1,8 +1,8 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { memo as p } from "react";
3
- import s from "classnames";
2
+ import p from "classnames";
3
+ import { memo as s } from "react";
4
4
  import t from "../index.module.css.js";
5
- const c = p(({ isDone: o, view: m = "positive" }) => /* @__PURE__ */ r("span", { "data-test-id": o ? "on" : "off", className: s(t.bar, o && t[m]) }));
5
+ const c = s(({ isDone: o, view: m = "positive" }) => /* @__PURE__ */ r("span", { "data-test-id": o ? "on" : "off", className: p(t.bar, o && t[m]) }));
6
6
  export {
7
7
  c as StepBar
8
8
  };
@@ -1,4 +1,4 @@
1
- import { default as React, FC } from 'react';
1
+ import { FC } from 'react';
2
2
  import { SteppedProgressBarView } from './components/step-bar';
3
3
  export type SteppedProgressBarProps = {
4
4
  maxStep: number;
@@ -14,7 +14,7 @@ export declare const useSteps: ({ maxStep, initialStep, }: {
14
14
  initialStep?: number;
15
15
  }) => {
16
16
  step: number;
17
- setStep: React.Dispatch<React.SetStateAction<number>>;
17
+ setStep: import('react').Dispatch<import('react').SetStateAction<number>>;
18
18
  nextStep: () => void;
19
19
  prevStep: () => void;
20
20
  };
@@ -1,34 +1,49 @@
1
- import { jsxs as l, jsx as p } from "react/jsx-runtime";
2
- import { useState as d } from "react";
3
- import S from "classnames";
4
- import { Typography as f } from "../typography/component.js";
5
- import { StepBar as y } from "./components/step-bar.js";
1
+ import { jsxs as S, jsx as p } from "react/jsx-runtime";
2
+ import f from "classnames";
3
+ import { useMemo as g, useState as y } from "react";
4
+ import { Typography as v } from "../typography/component.js";
5
+ import { StepBar as h } from "./components/step-bar.js";
6
6
  import n from "./index.module.css.js";
7
- const A = ({
7
+ const T = ({
8
8
  maxStep: e,
9
- description: s,
9
+ description: o,
10
10
  step: t = 0,
11
11
  view: r,
12
- dataTestId: a,
13
- className: i
12
+ dataTestId: i,
13
+ className: a
14
14
  }) => {
15
- const c = e <= 0 ? 1 : e, m = typeof r == "string";
16
- return /* @__PURE__ */ l("div", { className: S(n.component, i), "data-test-id": a, children: [
17
- /* @__PURE__ */ p("div", { className: n.stepsContainer, children: Array.from(Array(c), (v, o) => /* @__PURE__ */ p(
18
- y,
15
+ const m = e <= 0 ? 1 : e, l = typeof r == "string", d = g(
16
+ () => Array.from({ length: m }, (c, s) => ({
17
+ id: `progress-step-${s + 1}`,
18
+ stepIndex: s
19
+ })),
20
+ [m]
21
+ );
22
+ return /* @__PURE__ */ S("div", { className: f(n.component, a), "data-test-id": i, children: [
23
+ /* @__PURE__ */ p("div", { className: n.stepsContainer, children: d.map(({ id: c, stepIndex: s }) => /* @__PURE__ */ p(
24
+ h,
19
25
  {
20
- isDone: o < t,
21
- view: m ? r : r?.[o]
26
+ isDone: s < t,
27
+ view: l ? r : r?.[s]
22
28
  },
23
- o
29
+ c
24
30
  )) }),
25
- s && /* @__PURE__ */ p(f.Text, { color: "secondary", tag: "div", className: n.description, view: "primary-small", children: s })
31
+ o && /* @__PURE__ */ p(
32
+ v.Text,
33
+ {
34
+ color: "secondary",
35
+ tag: "div",
36
+ className: n.description,
37
+ view: "primary-small",
38
+ children: o
39
+ }
40
+ )
26
41
  ] });
27
- }, B = ({
42
+ }, w = ({
28
43
  maxStep: e,
29
- initialStep: s = 1
44
+ initialStep: o = 1
30
45
  }) => {
31
- const [t, r] = d(s);
46
+ const [t, r] = y(o);
32
47
  return {
33
48
  step: t,
34
49
  setStep: r,
@@ -41,6 +56,6 @@ const A = ({
41
56
  };
42
57
  };
43
58
  export {
44
- A as SteppedProgressBar,
45
- B as useSteps
59
+ T as SteppedProgressBar,
60
+ w as useSteps
46
61
  };
@@ -1,23 +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 a = ({
5
- className: r,
6
- text: e,
7
- color: i,
8
- dataTestId: m
9
- }) => /* @__PURE__ */ t(
10
- "div",
11
- {
12
- className: s(
13
- o.component,
14
- o[i],
15
- r
16
- ),
17
- "data-test-id": m,
18
- children: /* @__PURE__ */ t("span", { children: e })
19
- }
20
- );
4
+ const a = ({ className: r, text: e, color: i, dataTestId: m }) => /* @__PURE__ */ t("div", { className: s(o.component, o[i], r), "data-test-id": m, children: /* @__PURE__ */ t("span", { children: e }) });
21
5
  export {
22
6
  a as Sticker
23
7
  };
@@ -1,10 +1,10 @@
1
1
  import { jsx as a, jsxs as f } from "react/jsx-runtime";
2
- import { forwardRef as S, useState as v, useEffect as y, useCallback as A, Fragment as j } from "react";
3
2
  import m from "classnames";
3
+ import { forwardRef as S, useState as v, useEffect as y, useCallback as A, Fragment as j } from "react";
4
4
  import { Input as w } from "../input/component.js";
5
- import { withSuffix as k } from "../with-suffix/component.js";
5
+ import { withSuffix as $ } from "../with-suffix/component.js";
6
6
  import t from "./index.module.css.js";
7
- const B = k(w), z = S(
7
+ const k = $(w), z = S(
8
8
  ({
9
9
  value: e,
10
10
  suffix: c,
@@ -16,34 +16,34 @@ const B = k(w), z = S(
16
16
  dataTestId: C,
17
17
  clear: N = !1,
18
18
  onChange: o,
19
- onClear: r,
19
+ onClear: i,
20
20
  ...I
21
21
  }, b) => {
22
- const [i, s] = v(e);
23
- y(() => i !== e ? s(e) : () => {
24
- }, [e]);
22
+ const [r, s] = v(e);
23
+ y(() => r !== e ? s(e) : () => {
24
+ }, [e, r]);
25
25
  const g = (n) => {
26
26
  const u = n.target.value;
27
27
  o && o(n, { value: Number.isInteger(+u) ? +u : void 0 });
28
28
  }, V = A(
29
29
  (n) => {
30
- s(void 0), r && r(n);
30
+ s(void 0), i && i(n);
31
31
  },
32
- [r]
32
+ [i]
33
33
  );
34
34
  return /* @__PURE__ */ a(
35
35
  "div",
36
36
  {
37
37
  className: m(t.container, {
38
38
  [t.bold]: p,
39
- [t.filled]: !!i
39
+ [t.filled]: !!r
40
40
  }),
41
41
  children: /* @__PURE__ */ a(
42
- B,
42
+ k,
43
43
  {
44
44
  ...I,
45
45
  suffix: /* @__PURE__ */ f(j, { children: [
46
- i,
46
+ r,
47
47
  /* @__PURE__ */ f("span", { className: t.minorPartAndCurrency, children: [
48
48
  " ",
49
49
  c
@@ -53,7 +53,7 @@ const B = k(w), z = S(
53
53
  clear: N,
54
54
  required: h,
55
55
  placeholder: l,
56
- value: Number.isInteger(e) ? "" + e : void 0,
56
+ value: Number.isInteger(e) ? `${e}` : void 0,
57
57
  type: "number",
58
58
  className: m(t.component, d),
59
59
  focusedClassName: x,
@@ -1,10 +1,10 @@
1
1
  import { jsxs as d, jsx as s } from "react/jsx-runtime";
2
- import { forwardRef as y, useRef as g, useCallback as j } from "react";
3
- import v from "react-merge-refs";
4
- import C from "classnames";
2
+ import y from "classnames";
3
+ import { forwardRef as g, useRef as j, useCallback as v } from "react";
4
+ import C from "react-merge-refs";
5
5
  import { useFocus as F } from "../hooks/useFocus/index.js";
6
6
  import e from "./index.module.css.js";
7
- const E = y(
7
+ const E = g(
8
8
  ({
9
9
  reversed: i = !1,
10
10
  checked: t = !1,
@@ -21,7 +21,7 @@ const E = y(
21
21
  dataTestId: N,
22
22
  ...b
23
23
  }, x) => {
24
- const m = g(null), [R] = F(m, "keyboard"), w = j(
24
+ const m = j(null), [R] = F(m, "keyboard"), w = v(
25
25
  (f) => {
26
26
  o && o(f, { checked: f.target.checked, name: a });
27
27
  },
@@ -32,14 +32,14 @@ const E = y(
32
32
  /* @__PURE__ */ d(
33
33
  "label",
34
34
  {
35
- className: C(e.component, e[p], k, {
35
+ className: y(e.component, e[p], k, {
36
36
  [e.disabled]: n,
37
37
  [e.checked]: t,
38
38
  [e.reversed]: i,
39
39
  [e.focused]: R,
40
40
  [e.block]: h
41
41
  }),
42
- ref: v([m, x]),
42
+ ref: C([m, x]),
43
43
  children: [
44
44
  /* @__PURE__ */ s(
45
45
  "input",
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  import { Query, QueryDTO, TableColumns } from '../../types';
3
2
  type Props<T extends object> = {
4
3
  columns: TableColumns<T>;
@@ -7,5 +6,5 @@ type Props<T extends object> = {
7
6
  addParam: ({ sort, order }: Pick<Query, 'order' | 'sort'>) => void;
8
7
  compact?: boolean;
9
8
  };
10
- export declare function Cells<T extends object>({ columns, sort, order, addParam, compact, }: Props<T>): React.JSX.Element;
9
+ export declare function Cells<T extends object>({ columns, sort, order, addParam, compact, }: Props<T>): import("react/jsx-runtime").JSX.Element;
11
10
  export {};
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  export declare const EmptyList: ({ language }: {
3
2
  language: 'en' | 'de' | 'ru';
4
- }) => React.JSX.Element;
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
- export declare const Error: ({ language }: {
1
+ export declare const TableError: ({ language }: {
3
2
  language: 'en' | 'de' | 'ru';
4
- }) => React.JSX.Element;
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -4,5 +4,5 @@ import { translate as e } from "../../languages/index.js";
4
4
  import i from "./index.module.css.js";
5
5
  const a = ({ language: o }) => /* @__PURE__ */ r("div", { className: i.empty_list, children: /* @__PURE__ */ r(t.Text, { color: "primary", view: "title", children: e(o)("error") }) });
6
6
  export {
7
- a as Error
7
+ a as TableError
8
8
  };
@@ -2,5 +2,5 @@ import { default as React } from 'react';
2
2
  type Props = {
3
3
  columnsLength: number;
4
4
  };
5
- export declare const Loading: React.MemoExoticComponent<({ columnsLength }: Props) => React.JSX.Element>;
5
+ export declare const Loading: React.MemoExoticComponent<({ columnsLength }: Props) => import("react/jsx-runtime").JSX.Element>;
6
6
  export {};
@@ -1,15 +1,21 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import t, { memo as a } from "react";
3
- import e from "classnames";
4
- import { TableCell as l } from "../cell/component.js";
5
- import m from "./index.module.css.js";
6
- const f = a(({ columnsLength: o }) => /* @__PURE__ */ r(t.Fragment, { children: new Array(5).fill(1).map(() => /* @__PURE__ */ r("tr", { className: e(m.row, m.tr), children: new Array(o).fill(1).map(() => /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(
7
- "div",
8
- {
9
- className: m.td,
10
- style: { width: `${Math.floor(Math.random() * 51) + 50}%` }
11
- }
12
- ) })) })) }));
2
+ import l from "classnames";
3
+ import s, { memo as c, useMemo as i } from "react";
4
+ import { TableCell as n } from "../cell/component.js";
5
+ import t from "./index.module.css.js";
6
+ const d = ["r1", "r2", "r3", "r4", "r5"], M = c(({ columnsLength: e }) => {
7
+ const a = i(
8
+ () => Array.from({ length: e }, (o, m) => `col-${m + 1}`),
9
+ [e]
10
+ );
11
+ return /* @__PURE__ */ r(s.Fragment, { children: d.map((o) => /* @__PURE__ */ r("tr", { className: l(t.row, t.tr), children: a.map((m) => /* @__PURE__ */ r(n, { children: /* @__PURE__ */ r(
12
+ "div",
13
+ {
14
+ className: t.td,
15
+ style: { width: `${Math.floor(Math.random() * 51) + 50}%` }
16
+ }
17
+ ) }, `${o}-${m}`)) }, o)) });
18
+ });
13
19
  export {
14
- f as Loading
20
+ M as Loading
15
21
  };