@alphakits/ui 2.3.1 → 2.4.1

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 (219) 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 +31 -34
  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 +77 -80
  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/modal/hooks/use-modal.js +22 -22
  107. package/dist/mq/component.js +1 -6
  108. package/dist/notification/component.js +14 -12
  109. package/dist/page-container/component.js +1 -6
  110. package/dist/page-loading/component.d.ts +1 -2
  111. package/dist/page-with-controls/component.js +4 -7
  112. package/dist/picker-button/common/labeled-button/index.js +18 -12
  113. package/dist/picker-button/component.js +5 -5
  114. package/dist/picker-button/field/{Component.d.ts → component.d.ts} +1 -2
  115. package/dist/picker-button/field/index.d.ts +1 -1
  116. package/dist/picker-button/field/index.js +1 -1
  117. package/dist/picker-button/index.d.ts +1 -1
  118. package/dist/picker-button/index.js +4 -4
  119. package/dist/popover/component.d.ts +2 -2
  120. package/dist/popover/component.js +77 -79
  121. package/dist/radio/component.js +7 -7
  122. package/dist/radio-groups/component.d.ts +1 -2
  123. package/dist/radio-groups/component.js +9 -7
  124. package/dist/select/component.d.ts +8 -9
  125. package/dist/select/component.js +1 -9
  126. package/dist/select/components/arrow/component.d.ts +1 -2
  127. package/dist/select/components/base-select/component.js +97 -90
  128. package/dist/select/components/checkmark/component.d.ts +1 -2
  129. package/dist/select/components/field/component.d.ts +1 -2
  130. package/dist/select/components/field/component.js +8 -5
  131. package/dist/select/components/native-select/component.js +4 -11
  132. package/dist/select/components/optgroup/component.d.ts +1 -2
  133. package/dist/select/components/optgroup/component.js +4 -4
  134. package/dist/select/components/option/component.js +1 -1
  135. package/dist/select/components/options-list/component.d.ts +1 -2
  136. package/dist/select/components/options-list/component.js +25 -23
  137. package/dist/select/components/select-search/index.d.ts +1 -1
  138. package/dist/select/components/select-search/index.js +28 -26
  139. package/dist/select/components/virtual-options-list/component.d.ts +1 -2
  140. package/dist/select/components/virtual-options-list/component.js +52 -45
  141. package/dist/select/index.js +4 -4
  142. package/dist/select/presets/index.d.ts +1 -1
  143. package/dist/select/presets/index.js +4 -4
  144. package/dist/select/presets/use-lazy-loading/index.d.ts +3 -4
  145. package/dist/select/presets/use-lazy-loading/index.js +45 -43
  146. package/dist/select/presets/use-select-with-loading/hook.d.ts +1 -2
  147. package/dist/select/presets/use-select-with-loading/hook.js +8 -1
  148. package/dist/select/utils.js +32 -32
  149. package/dist/sidepanel/component.js +21 -15
  150. package/dist/sidepanel-header/component.js +17 -16
  151. package/dist/skeleton/component.js +4 -4
  152. package/dist/space/component.d.ts +2 -2
  153. package/dist/space/component.js +42 -45
  154. package/dist/space/{Item.d.ts → item.d.ts} +2 -2
  155. package/dist/spinner/component.js +6 -5
  156. package/dist/stack/index.d.ts +1 -1
  157. package/dist/stack/index.js +5 -5
  158. package/dist/stepped-progress-bar/components/step-bar.js +3 -3
  159. package/dist/stepped-progress-bar/index.d.ts +2 -2
  160. package/dist/stepped-progress-bar/index.js +37 -22
  161. package/dist/sticker/component.js +1 -17
  162. package/dist/suffix-input/component.js +13 -13
  163. package/dist/switch/component.js +7 -7
  164. package/dist/table/components/cells/index.d.ts +1 -2
  165. package/dist/table/components/empty-list/index.d.ts +3 -3
  166. package/dist/table/components/empty-list/index.js +6 -3
  167. package/dist/table/components/error/index.d.ts +3 -3
  168. package/dist/table/components/error/index.js +8 -5
  169. package/dist/table/components/loading/index.d.ts +1 -1
  170. package/dist/table/components/loading/index.js +18 -12
  171. package/dist/table/components/pagination/index.js +56 -53
  172. package/dist/table/components/table-header/index.js +59 -56
  173. package/dist/table/hooks/use-table-data.js +64 -59
  174. package/dist/table/table.d.ts +1 -1
  175. package/dist/table/table.js +80 -80
  176. package/dist/table/types.d.ts +3 -3
  177. package/dist/table/utils/get-query-from-url.js +1 -8
  178. package/dist/table/utils/get-tags.d.ts +1 -1
  179. package/dist/table/utils/get-tags.js +9 -12
  180. package/dist/table/utils/index.d.ts +1 -1
  181. package/dist/table/utils/index.js +4 -4
  182. package/dist/table/utils/parse-query-params.js +5 -1
  183. package/dist/table/utils/prepare-rows.d.ts +1 -2
  184. package/dist/table/utils/prepare-rows.js +4 -3
  185. package/dist/table/utils/query-adapter.d.ts +1 -1
  186. package/dist/table/utils/query-adapter.js +5 -5
  187. package/dist/table/utils/remove-query-param.js +3 -1
  188. package/dist/table/utils/reset-query-param.js +16 -9
  189. package/dist/table-status/component.js +5 -1
  190. package/dist/textarea/component.js +36 -28
  191. package/dist/theme-provider/component.js +33 -29
  192. package/dist/toast/component.d.ts +7 -8
  193. package/dist/toast/component.js +6 -6
  194. package/dist/toast-notifier/component.js +13 -13
  195. package/dist/toast-notifier/use-timer.d.ts +1 -1
  196. package/dist/toast-notifier/use-timer.js +5 -5
  197. package/dist/toast-plate/component.d.ts +3 -3
  198. package/dist/toast-plate/component.js +7 -7
  199. package/dist/tooltip/component.js +35 -35
  200. package/dist/tooltip/node-resolver.js +7 -7
  201. package/dist/typings/api.d.ts +3 -5
  202. package/dist/typography/colors.d.ts +1 -1
  203. package/dist/typography/title/component.d.ts +3 -3
  204. package/dist/typography/title/index.d.ts +1 -1
  205. package/dist/typography/title/index.js +3 -3
  206. package/dist/utils/date/index.js +12 -2
  207. package/dist/utils/index.d.ts +2 -2
  208. package/dist/utils/index.js +14 -14
  209. package/dist/utils/split-amount/util.js +4 -4
  210. package/dist/with-suffix/component.d.ts +13 -13
  211. package/dist/with-suffix/component.js +8 -8
  212. package/package.json +9 -34
  213. /package/dist/__internal/utils/{getDataTestId.d.ts → get-data-test-id.d.ts} +0 -0
  214. /package/dist/__internal/utils/{getDataTestId.js → get-data-test-id.js} +0 -0
  215. /package/dist/calendar/components/header/{/321/201omponent.d.ts" → component.d.ts} +0 -0
  216. /package/dist/calendar/components/months-table/{/321/201omponent.d.ts" → component.d.ts} +0 -0
  217. /package/dist/calendar/components/years-table/{/321/201omponent.d.ts" → component.d.ts} +0 -0
  218. /package/dist/picker-button/field/{Component.js → component.js} +0 -0
  219. /package/dist/space/{Item.js → item.js} +0 -0
@@ -1,13 +1,13 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
- import { forwardRef as F, useRef as u, useState as G, useCallback as r, useEffect as R } from "react";
3
- import L from "react-merge-refs";
4
- import { useSwipeable as M, LEFT as U, RIGHT as V, UP as $ } from "react-swipeable";
5
- import q from "classnames";
2
+ import F from "classnames";
3
+ import { forwardRef as G, useRef as u, useState as L, useCallback as r, useEffect as R } from "react";
4
+ import M from "react-merge-refs";
5
+ import { useSwipeable as U, LEFT as V, RIGHT as $, UP as q } from "react-swipeable";
6
6
  import { Portal as z } from "../portal/component.js";
7
7
  import { ToastPlate as B } from "../toast-plate/component.js";
8
- import { useClickOutside as J } from "./utils/index.js";
9
8
  import i from "./index.module.css.js";
10
- const K = `.${i.notificationComponent}`, v = F(
9
+ import { useClickOutside as J } from "./utils/index.js";
10
+ const K = `.${i.notificationComponent}`, v = G(
11
11
  ({
12
12
  className: g,
13
13
  children: h,
@@ -23,7 +23,7 @@ const K = `.${i.notificationComponent}`, v = F(
23
23
  style: P,
24
24
  ...k
25
25
  }, x) => {
26
- const d = u(null), T = u(0), w = u(0), [A, C] = G(!1), s = r(() => {
26
+ const d = u(null), T = u(0), w = u(0), [A, C] = L(!1), s = r(() => {
27
27
  T.current = window.setTimeout(() => {
28
28
  c && c();
29
29
  }, p);
@@ -50,15 +50,17 @@ const K = `.${i.notificationComponent}`, v = F(
50
50
  [f, s, o]
51
51
  ), I = r(
52
52
  (t) => {
53
- const y = !!t.target.closest(K);
53
+ const y = !!t.target.closest(
54
+ K
55
+ );
54
56
  m && e && !y && m(t);
55
57
  },
56
58
  [m, e]
57
59
  );
58
60
  J(d, I);
59
- const j = M({
61
+ const j = U({
60
62
  onSwiped: ({ dir: t }) => {
61
- n && [U, V, $].includes(t) && (C(!0), w.current = window.setTimeout(() => {
63
+ n && [V, $, q].includes(t) && (C(!0), w.current = window.setTimeout(() => {
62
64
  C(!1), n();
63
65
  }, 100));
64
66
  },
@@ -68,7 +70,7 @@ const K = `.${i.notificationComponent}`, v = F(
68
70
  return /* @__PURE__ */ l(z, { children: /* @__PURE__ */ l("div", { ...j, children: /* @__PURE__ */ l(
69
71
  B,
70
72
  {
71
- className: q(
73
+ className: F(
72
74
  i.notificationComponent,
73
75
  {
74
76
  [i.isVisible]: e,
@@ -83,7 +85,7 @@ const K = `.${i.notificationComponent}`, v = F(
83
85
  },
84
86
  onMouseEnter: E,
85
87
  onMouseLeave: H,
86
- ref: L([x, d]),
88
+ ref: M([x, d]),
87
89
  role: e ? "alert" : void 0,
88
90
  hasCloser: S,
89
91
  onClose: n,
@@ -1,11 +1,6 @@
1
1
  import { jsxs as o, jsx as s } from "react/jsx-runtime";
2
2
  import e from "./index.module.css.js";
3
- const n = ({
4
- children: r,
5
- color: i,
6
- image: a,
7
- imageDescription: t
8
- }) => /* @__PURE__ */ o("div", { style: { backgroundColor: i }, className: e.pageContainer, children: [
3
+ const n = ({ children: r, color: i, image: a, imageDescription: t }) => /* @__PURE__ */ o("div", { style: { backgroundColor: i }, className: e.pageContainer, children: [
9
4
  a && /* @__PURE__ */ o("section", { children: [
10
5
  /* @__PURE__ */ s("img", { className: e.image, src: a, alt: t }),
11
6
  /* @__PURE__ */ s("div", { className: e.bg })
@@ -1,2 +1 @@
1
- import { default as React } from 'react';
2
- export declare const PageLoading: () => React.JSX.Element;
1
+ export declare const PageLoading: () => import("react/jsx-runtime").JSX.Element;
@@ -1,14 +1,11 @@
1
1
  import { jsxs as h, jsx as r } from "react/jsx-runtime";
2
2
  import { Button as n } from "../button/component.js";
3
- import { FlexColumns as i } from "../flex-columns/component.js";
3
+ import { FlexColumns as l } from "../flex-columns/component.js";
4
4
  import { Grid as o } from "../grid/component.js";
5
5
  import { Typography as s } from "../typography/component.js";
6
- const f = ({
7
- children: l,
8
- buttons: t
9
- }) => /* @__PURE__ */ h(o.Row, { children: [
10
- /* @__PURE__ */ r(o.Col, { width: 7, children: /* @__PURE__ */ r(i, { columns: 1, gr: 32, children: l }) }),
11
- /* @__PURE__ */ r(o.Col, { width: 4, offset: 1, children: /* @__PURE__ */ r(i, { columns: 1, gr: 16, children: t.map(({ text: m, ...e }) => /* @__PURE__ */ r(n, { view: "ghost", ...e, children: /* @__PURE__ */ r(s.Title, { tag: "div", view: "xxsmall", color: "primary", weight: "regular", children: m }) })) }) })
6
+ const f = ({ children: m, buttons: t }) => /* @__PURE__ */ h(o.Row, { children: [
7
+ /* @__PURE__ */ r(o.Col, { width: 7, children: /* @__PURE__ */ r(l, { columns: 1, gr: 32, children: m }) }),
8
+ /* @__PURE__ */ r(o.Col, { width: 4, offset: 1, children: /* @__PURE__ */ r(l, { columns: 1, gr: 16, children: t.map(({ text: i, ...e }) => /* @__PURE__ */ r(n, { view: "ghost", ...e, children: /* @__PURE__ */ r(s.Title, { tag: "div", view: "xxsmall", color: "primary", weight: "regular", children: i }) }, i)) }) })
12
9
  ] });
13
10
  export {
14
11
  f as PageWithControls
@@ -1,18 +1,24 @@
1
1
  import { jsxs as c, jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as l } from "react";
3
- import s from "classnames";
2
+ import l from "classnames";
3
+ import { forwardRef as s } from "react";
4
4
  import { Typography as t } from "../../../typography/component.js";
5
5
  import n from "./index.module.css.js";
6
- const u = l(({
7
- label: e,
8
- value: o,
9
- id: i,
10
- className: m,
11
- onClick: p
12
- }, a) => /* @__PURE__ */ c("button", { className: s(n.wrapper, m), ref: a, id: i, type: "button", onClick: p, children: [
13
- /* @__PURE__ */ r(t.Text, { view: "caps", weight: "medium", color: "tertiary", children: e }),
14
- /* @__PURE__ */ r(t.Text, { view: "title", weight: "medium", color: "primary", children: o })
15
- ] }));
6
+ const u = s(
7
+ ({ label: e, value: o, id: i, className: m, onClick: p }, a) => /* @__PURE__ */ c(
8
+ "button",
9
+ {
10
+ className: l(n.wrapper, m),
11
+ ref: a,
12
+ id: i,
13
+ type: "button",
14
+ onClick: p,
15
+ children: [
16
+ /* @__PURE__ */ r(t.Text, { view: "caps", weight: "medium", color: "tertiary", children: e }),
17
+ /* @__PURE__ */ r(t.Text, { view: "title", weight: "medium", color: "primary", children: o })
18
+ ]
19
+ }
20
+ )
21
+ );
16
22
  export {
17
23
  u as LabeledButton
18
24
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as u } from "react/jsx-runtime";
2
- import { forwardRef as d } from "react";
3
- import a from "classnames";
2
+ import d from "classnames";
3
+ import { forwardRef as a } from "react";
4
4
  import "../select/component.js";
5
5
  import { BaseSelect as g } from "../select/components/base-select/component.js";
6
6
  import "../form-control/component.js";
@@ -10,9 +10,9 @@ import { OptionsList as S } from "../select/components/options-list/component.js
10
10
  import "react-virtual";
11
11
  import "../toast-notifier/component.js";
12
12
  import "intersection-observer";
13
- import { Field as b } from "./field/Component.js";
13
+ import { Field as b } from "./field/component.js";
14
14
  import x from "./index.module.css.js";
15
- const D = d(
15
+ const D = a(
16
16
  ({
17
17
  OptionsList: t,
18
18
  Optgroup: r,
@@ -45,7 +45,7 @@ const D = d(
45
45
  },
46
46
  Optgroup: r || F,
47
47
  OptionsList: t || S,
48
- className: a(x.container, s),
48
+ className: d(x.container, s),
49
49
  selected: [],
50
50
  closeOnSelect: !0
51
51
  }
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  import { ButtonProps } from '../../button';
3
2
  import { SelectFieldProps as BaseFieldProps } from '../../select';
4
3
  import { PickerButtonSize } from '..';
@@ -7,5 +6,5 @@ type FieldProps = Omit<BaseFieldProps, 'size' | 'hint' | 'success' | 'error' | '
7
6
  icon?: any;
8
7
  fieldComponent?: 'button' | 'iconButton';
9
8
  };
10
- export declare const Field: ({ buttonSize, view, label, open, multiple, rightAddons, Arrow, innerProps, className, selected, selectedMultiple, valueRenderer, fieldComponent, ...restProps }: FieldProps) => React.JSX.Element;
9
+ export declare const Field: ({ buttonSize, view, label, open, multiple, rightAddons, Arrow, innerProps, className, selected, selectedMultiple, valueRenderer, fieldComponent, ...restProps }: FieldProps) => import("react/jsx-runtime").JSX.Element;
11
10
  export {};
@@ -1 +1 @@
1
- export * from './Component';
1
+ export * from './component';
@@ -1,4 +1,4 @@
1
- import { Field as r } from "./Component.js";
1
+ import { Field as r } from "./component.js";
2
2
  export {
3
3
  r as Field
4
4
  };
@@ -1,2 +1,2 @@
1
- export * from './component';
2
1
  export * from './common';
2
+ export * from './component';
@@ -1,6 +1,6 @@
1
- import { PickerButton as e } from "./component.js";
2
- import { LabeledButton as f } from "./common/labeled-button/index.js";
1
+ import { LabeledButton as e } from "./common/labeled-button/index.js";
2
+ import { PickerButton as f } from "./component.js";
3
3
  export {
4
- f as LabeledButton,
5
- e as PickerButton
4
+ e as LabeledButton,
5
+ f as PickerButton
6
6
  };
@@ -1,5 +1,5 @@
1
- import { default as React, CSSProperties, MutableRefObject } from 'react';
2
1
  import { Placement } from '@floating-ui/react-dom';
2
+ import { default as React, CSSProperties, MutableRefObject } from 'react';
3
3
  import { CSSTransitionProps } from 'react-transition-group/CSSTransition';
4
4
  export type Position = Placement;
5
5
  export type PopoverProps = {
@@ -13,7 +13,7 @@ export type PopoverProps = {
13
13
  popperClassName?: string;
14
14
  arrowClassName?: string;
15
15
  getPortalContainer?: () => HTMLElement;
16
- transition?: CSSTransitionProps;
16
+ transition?: Omit<CSSTransitionProps<HTMLDivElement>, 'children' | 'nodeRef'>;
17
17
  transitionDuration?: CSSProperties['transitionDuration'];
18
18
  withTransition?: boolean;
19
19
  dataTestId?: string;
@@ -1,11 +1,11 @@
1
- import { jsx as r, jsxs as $ } from "react/jsx-runtime";
2
- import { useRef as N, useLayoutEffect as j, useEffect as R, useMemo as D, useCallback as P } from "react";
3
- import { useFloating as U, autoUpdate as z, offset as V, flip as q, shift as B, arrow as G } from "@floating-ui/react-dom";
1
+ import { jsx as r, jsxs as D } from "react/jsx-runtime";
2
+ import { offset as L, flip as P, shift as U, arrow as z, useFloating as V, autoUpdate as q } from "@floating-ui/react-dom";
3
+ import c from "classnames";
4
+ import { useRef as g, useMemo as N, useEffect as B, useCallback as G } from "react";
4
5
  import { CSSTransition as H } from "react-transition-group";
5
- import m from "classnames";
6
6
  import { Portal as J } from "../portal/component.js";
7
- import { stackingOrder as K } from "../stack/context.js";
8
- import { Stack as Q } from "../stack/component.js";
7
+ import { Stack as K } from "../stack/component.js";
8
+ import { stackingOrder as Q } from "../stack/context.js";
9
9
  import e from "./index.module.css.js";
10
10
  const W = {
11
11
  timeout: 150
@@ -14,99 +14,97 @@ const W = {
14
14
  enterActive: e.enterActive,
15
15
  exit: e.exit,
16
16
  exitActive: e.exitActive
17
- }, Y = {
17
+ }, Y = H, Z = {
18
18
  top: "bottom",
19
19
  right: "left",
20
20
  bottom: "top",
21
21
  left: "right"
22
- }, lt = ({
23
- children: f,
24
- getPortalContainer: A,
25
- transition: u = W,
26
- anchorElement: d,
27
- offset: a = [0, 0],
28
- withArrow: s = !1,
29
- withTransition: b = !0,
30
- position: y = "left",
31
- preventFlip: E,
32
- popperClassName: O,
33
- arrowClassName: T,
34
- className: h,
35
- open: p,
22
+ }, ct = ({
23
+ children: R,
24
+ getPortalContainer: b,
25
+ transition: m = W,
26
+ anchorElement: A,
27
+ offset: n = [0, 0],
28
+ withArrow: o = !1,
29
+ withTransition: T = !0,
30
+ position: h = "left",
31
+ preventFlip: f,
32
+ popperClassName: y,
33
+ arrowClassName: E,
34
+ className: O,
35
+ open: i,
36
36
  dataTestId: C,
37
37
  update: l,
38
- transitionDuration: F = `${u.timeout}ms`,
39
- zIndex: w = K.POPOVER
38
+ transitionDuration: F = `${m.timeout}ms`,
39
+ zIndex: I = Q.POPOVER
40
40
  }) => {
41
- const x = N(null), S = N(null), {
42
- refs: i,
43
- floatingStyles: I,
44
- middlewareData: c,
45
- placement: v,
46
- update: o
47
- } = U({
48
- placement: y,
49
- whileElementsMounted: z,
50
- middleware: [
51
- V(
52
- {
53
- crossAxis: a[0],
54
- mainAxis: a[1]
55
- },
56
- [a]
57
- ),
58
- ...E ? [] : [q()],
59
- B({ padding: 4 }),
60
- ...s ? [G({ element: x })] : []
61
- ]
41
+ const d = g(null), u = g(null), M = N(
42
+ () => [
43
+ L({
44
+ crossAxis: n[0],
45
+ mainAxis: n[1]
46
+ }),
47
+ ...f ? [] : [P()],
48
+ U({ padding: 4 }),
49
+ ...o ? [z({ element: d })] : []
50
+ ],
51
+ [n[0], n[1], f, o]
52
+ ), {
53
+ refs: { setFloating: p },
54
+ floatingStyles: _,
55
+ middlewareData: a,
56
+ placement: x,
57
+ update: S
58
+ } = V({
59
+ placement: h,
60
+ open: i,
61
+ elements: { reference: A },
62
+ whileElementsMounted: i ? q : void 0,
63
+ middleware: M
62
64
  });
63
- j(() => {
64
- i.setReference(d);
65
- }, [d, i]), R(() => {
66
- l && o && (l.current = o);
67
- }, [o, l]), R(() => {
68
- o();
69
- }, [o, f]);
70
- const M = D(() => {
71
- if (!s || !c.arrow)
65
+ B(() => {
66
+ l && (l.current = S);
67
+ }, [S, l]);
68
+ const k = N(() => {
69
+ if (!o || !a.arrow)
72
70
  return {};
73
- const { x: t, y: n } = c.arrow, k = v.split("-")[0], L = Y[k] ?? "bottom";
71
+ const { x: t, y: s } = a.arrow, j = x.split("-")[0], w = Z[j] ?? "bottom";
74
72
  return {
75
73
  position: "absolute",
76
74
  left: t != null ? `${t}px` : void 0,
77
- top: n != null ? `${n}px` : void 0,
75
+ top: s != null ? `${s}px` : void 0,
78
76
  right: "",
79
77
  bottom: "",
80
- [L]: "-4px"
78
+ [w]: "-4px"
81
79
  };
82
- }, [s, c.arrow, v]), _ = P(
80
+ }, [o, a.arrow, x]), $ = G(
83
81
  (t) => {
84
- S.current = t, i.setFloating(t);
82
+ u.current = t, p(t);
85
83
  },
86
- [i]
87
- ), g = (t, n) => /* @__PURE__ */ r(
84
+ [p]
85
+ ), v = (t, s) => /* @__PURE__ */ r(
88
86
  "div",
89
87
  {
90
- ref: _,
88
+ ref: $,
91
89
  style: {
92
90
  zIndex: t,
93
- ...I
91
+ ..._
94
92
  },
95
- className: m(e.component, h),
96
- children: /* @__PURE__ */ $(
93
+ className: c(e.component, O),
94
+ children: /* @__PURE__ */ D(
97
95
  "div",
98
96
  {
99
97
  "data-test-id": C,
100
- className: m(e.inner, O),
101
- style: n,
98
+ className: c(e.inner, y),
99
+ style: s,
102
100
  children: [
103
- f,
104
- s && /* @__PURE__ */ r(
101
+ R,
102
+ o && /* @__PURE__ */ r(
105
103
  "div",
106
104
  {
107
- ref: x,
108
- style: M,
109
- className: m(e.arrow, T)
105
+ ref: d,
106
+ style: k,
107
+ className: c(e.arrow, E)
110
108
  }
111
109
  )
112
110
  ]
@@ -114,18 +112,18 @@ const W = {
114
112
  )
115
113
  }
116
114
  );
117
- return /* @__PURE__ */ r(Q, { value: w, children: (t) => /* @__PURE__ */ r(J, { getPortalContainer: A, children: b ? /* @__PURE__ */ r(
118
- H,
115
+ return /* @__PURE__ */ r(K, { value: I, children: (t) => /* @__PURE__ */ r(J, { getPortalContainer: b, children: T ? /* @__PURE__ */ r(
116
+ Y,
119
117
  {
120
118
  unmountOnExit: !0,
121
119
  classNames: X,
122
- ...u,
123
- in: p,
124
- nodeRef: S,
125
- children: g(t, { transitionDuration: F })
120
+ ...m,
121
+ in: i,
122
+ nodeRef: u,
123
+ children: v(t, { transitionDuration: F })
126
124
  }
127
- ) : p && g(t) }) });
125
+ ) : i && v(t) }) });
128
126
  };
129
127
  export {
130
- lt as Popover
128
+ ct as Popover
131
129
  };
@@ -1,10 +1,10 @@
1
1
  import { jsxs as i, jsx as s } from "react/jsx-runtime";
2
- import { forwardRef as x, useRef as y } from "react";
3
- import j from "react-merge-refs";
4
- import w from "classnames";
2
+ import x from "classnames";
3
+ import { forwardRef as y, useRef as j } from "react";
4
+ import w from "react-merge-refs";
5
5
  import { useFocus as C } from "../hooks/useFocus/index.js";
6
6
  import e from "./index.module.css.js";
7
- const E = x(
7
+ const E = y(
8
8
  ({
9
9
  onChange: r,
10
10
  className: d,
@@ -20,7 +20,7 @@ const E = x(
20
20
  block: N,
21
21
  ...b
22
22
  }, R) => {
23
- const t = y(null), [k] = C(t, "keyboard"), g = (m) => {
23
+ const t = j(null), [k] = C(t, "keyboard"), g = (m) => {
24
24
  r && r(m, { checked: m.target.checked, name: a });
25
25
  };
26
26
  return (
@@ -28,13 +28,13 @@ const E = x(
28
28
  /* @__PURE__ */ i(
29
29
  "label",
30
30
  {
31
- className: w(e.container, e[h], e[u], d, {
31
+ className: x(e.container, e[h], e[u], d, {
32
32
  [e.disabled]: c,
33
33
  [e.checked]: o,
34
34
  [e.focused]: k,
35
35
  [e.block]: N
36
36
  }),
37
- ref: j([t, R]),
37
+ ref: w([t, R]),
38
38
  children: [
39
39
  /* @__PURE__ */ s(
40
40
  "input",
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  type Child = {
3
2
  id: number;
4
3
  title: string;
@@ -15,5 +14,5 @@ export interface RadioGroupsProps {
15
14
  collapsable?: boolean;
16
15
  onChange: (value: number) => void;
17
16
  }
18
- export declare const RadioGroups: ({ parents, childs, selected, collapsable, onChange, }: RadioGroupsProps) => React.JSX.Element;
17
+ export declare const RadioGroups: ({ parents, childs, selected, collapsable, onChange, }: RadioGroupsProps) => import("react/jsx-runtime").JSX.Element;
19
18
  export {};
@@ -1,7 +1,7 @@
1
1
  import { jsx as t, jsxs as c } from "react/jsx-runtime";
2
- import g, { useState as x } from "react";
3
- import v from "@alphakits/icons/dist/ChevronDownS";
4
- import y from "classnames";
2
+ import g from "@alphakits/icons/dist/ChevronDownS";
3
+ import x from "classnames";
4
+ import v, { useState as y } from "react";
5
5
  import { Collapse as b } from "../collapse/component.js";
6
6
  import { Divider as w } from "../divider/component.js";
7
7
  import { FlexColumns as _ } from "../flex-columns/component.js";
@@ -28,11 +28,11 @@ const P = ({
28
28
  e.locationId === o.id && (r.parent = o, r.childs.push(e));
29
29
  }), r.parent.id && n.push(r);
30
30
  });
31
- const [l, u] = x(n), C = (o) => {
31
+ const [l, u] = y(n), C = (o) => {
32
32
  const r = l.map((i, a) => (a === o && (i.collapsed ? i.collapsed = !1 : i.collapsed = !0), i)), e = l.concat(r);
33
33
  u(e.filter((i, a) => e.indexOf(i) === a));
34
34
  };
35
- return /* @__PURE__ */ t("div", { children: l.map((o, r) => /* @__PURE__ */ c(g.Fragment, { children: [
35
+ return /* @__PURE__ */ t("div", { children: l.map((o, r) => /* @__PURE__ */ c(v.Fragment, { children: [
36
36
  /* @__PURE__ */ c("div", { className: s.list_head, children: [
37
37
  /* @__PURE__ */ t(S.Text, { view: "title", color: "primary", weight: "medium", children: o.parent.title }),
38
38
  f && /* @__PURE__ */ t(
@@ -40,8 +40,10 @@ const P = ({
40
40
  {
41
41
  onClick: () => C(r),
42
42
  size: "s",
43
- className: y(s.collapse_btn, { [s.collapse_btn_collapsed]: o.collapsed }),
44
- icon: v
43
+ className: x(s.collapse_btn, {
44
+ [s.collapse_btn_collapsed]: o.collapsed
45
+ }),
46
+ icon: g
45
47
  }
46
48
  )
47
49
  ] }),
@@ -1,12 +1,11 @@
1
- import { default as React } from 'react';
2
1
  import { FormControlProps } from '../form-control';
3
2
  import { BaseSelectProps } from './typings';
4
3
  export type SelectProps = Omit<BaseSelectProps, 'fieldProps'> & {
5
4
  fieldProps?: FormControlProps & Record<string, unknown>;
6
5
  showSearch?: boolean;
7
6
  };
8
- export declare const Select: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "fieldProps"> & {
9
- fieldProps?: (React.HTMLAttributes<HTMLDivElement> & {
7
+ export declare const Select: import('react').ForwardRefExoticComponent<Omit<BaseSelectProps, "fieldProps"> & {
8
+ fieldProps?: (import('react').HTMLAttributes<HTMLDivElement> & {
10
9
  block?: boolean | undefined;
11
10
  size?: "s" | "xs" | "m" | "l" | "xl" | undefined;
12
11
  disabled?: boolean | undefined;
@@ -15,16 +14,16 @@ export declare const Select: React.ForwardRefExoticComponent<Omit<BaseSelectProp
15
14
  error?: string | boolean | undefined;
16
15
  hint?: string | undefined;
17
16
  required?: boolean | undefined;
18
- label?: React.ReactNode;
19
- leftAddons?: React.ReactNode;
20
- rightAddons?: React.ReactNode;
21
- bottomAddons?: React.ReactNode;
17
+ label?: import('react').ReactNode;
18
+ leftAddons?: import('react').ReactNode;
19
+ rightAddons?: import('react').ReactNode;
20
+ bottomAddons?: import('react').ReactNode;
22
21
  className?: string | undefined;
23
22
  fieldClassName?: string | undefined;
24
23
  labelClassName?: string | undefined;
25
24
  addonsClassName?: string | undefined;
26
25
  dataTestId?: string | undefined;
27
- children?: React.ReactNode;
26
+ children?: import('react').ReactNode;
28
27
  } & Record<string, unknown>) | undefined;
29
28
  showSearch?: boolean | undefined;
30
- } & React.RefAttributes<HTMLDivElement>>;
29
+ } & import('react').RefAttributes<HTMLDivElement>>;
@@ -8,15 +8,7 @@ import { Option as l } from "./components/option/component.js";
8
8
  import { OptionsList as c } from "./components/options-list/component.js";
9
9
  import { SelectSearch as w } from "./components/select-search/index.js";
10
10
  const R = S(
11
- ({
12
- Arrow: r,
13
- Field: t,
14
- OptionsList: i,
15
- Optgroup: p,
16
- Option: m,
17
- showSearch: s,
18
- ...o
19
- }, u) => o.options?.length > 8 || s ? /* @__PURE__ */ e(
11
+ ({ Arrow: r, Field: t, OptionsList: i, Optgroup: p, Option: m, showSearch: s, ...o }, u) => o.options?.length > 8 || s ? /* @__PURE__ */ e(
20
12
  w,
21
13
  {
22
14
  Option: m || l,
@@ -1,3 +1,2 @@
1
- import { default as React } from 'react';
2
1
  import { ArrowProps } from '../../typings';
3
- export declare const Arrow: ({ open, className }: ArrowProps) => React.JSX.Element;
2
+ export declare const Arrow: ({ open, className }: ArrowProps) => import("react/jsx-runtime").JSX.Element;