urfu-ui-kit-react 2.1.5 → 2.1.7-next.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 (192) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +1 -1
  2. package/dist/components/Accordion/Accordion.d.ts.map +1 -1
  3. package/dist/components/Accordion/Accordion.js +9 -8
  4. package/dist/components/Accordion/Accordion.types.d.ts +2 -0
  5. package/dist/components/Accordion/Accordion.types.d.ts.map +1 -1
  6. package/dist/components/BreadCrumbs/BreadCrumbs.d.ts.map +1 -1
  7. package/dist/components/BreadCrumbs/BreadCrumbs.js +20 -19
  8. package/dist/components/Calendar/Calendar.d.ts.map +1 -1
  9. package/dist/components/Calendar/Calendar.js +145 -144
  10. package/dist/components/Calendar/Calendar.types.d.ts +9 -4
  11. package/dist/components/Calendar/Calendar.types.d.ts.map +1 -1
  12. package/dist/components/Card/Card.d.ts.map +1 -1
  13. package/dist/components/Card/Card.js +37 -31
  14. package/dist/components/ColumnSettings/ColumnSettings.d.ts.map +1 -1
  15. package/dist/components/ColumnSettings/ColumnSettings.js +72 -72
  16. package/dist/components/Drawer/Drawer.d.ts +11 -0
  17. package/dist/components/Drawer/Drawer.d.ts.map +1 -0
  18. package/dist/components/Drawer/Drawer.js +87 -0
  19. package/dist/components/Drawer/Drawer.types.d.ts +44 -0
  20. package/dist/components/Drawer/Drawer.types.d.ts.map +1 -0
  21. package/dist/components/ErrorScreen/ErrorScreen.d.ts.map +1 -1
  22. package/dist/components/ErrorScreen/ErrorScreen.js +172 -138
  23. package/dist/components/FormField/FormField.d.ts +1 -1
  24. package/dist/components/FormField/FormField.d.ts.map +1 -1
  25. package/dist/components/FormField/FormField.js +42 -29
  26. package/dist/components/FormField/FormField.types.d.ts +6 -0
  27. package/dist/components/FormField/FormField.types.d.ts.map +1 -1
  28. package/dist/components/InfiniteScroll/InfiniteScroll.d.ts +22 -0
  29. package/dist/components/InfiniteScroll/InfiniteScroll.d.ts.map +1 -0
  30. package/dist/components/InfiniteScroll/InfiniteScroll.js +27 -0
  31. package/dist/components/InputText/InputText.d.ts +39 -2
  32. package/dist/components/InputText/InputText.d.ts.map +1 -1
  33. package/dist/components/InputText/InputText.js +103 -94
  34. package/dist/components/InputText/InputText.types.d.ts +11 -0
  35. package/dist/components/InputText/InputText.types.d.ts.map +1 -1
  36. package/dist/components/InputTime/inputTimeKeyDown.d.ts +17 -2
  37. package/dist/components/InputTime/inputTimeKeyDown.d.ts.map +1 -1
  38. package/dist/components/InputTime/useInputTimeWheel.d.ts +13 -1
  39. package/dist/components/InputTime/useInputTimeWheel.d.ts.map +1 -1
  40. package/dist/components/Menu/Menu.d.ts.map +1 -1
  41. package/dist/components/Menu/Menu.js +54 -49
  42. package/dist/components/Modal/Modal.d.ts.map +1 -1
  43. package/dist/components/Modal/Modal.js +52 -49
  44. package/dist/components/Modal/Modal.types.d.ts +4 -2
  45. package/dist/components/Modal/Modal.types.d.ts.map +1 -1
  46. package/dist/components/Modal/useModalTitleClearance.js +5 -5
  47. package/dist/components/Multiselect/Multiselect.js +1 -1
  48. package/dist/components/Notification/Notification.d.ts.map +1 -1
  49. package/dist/components/Notification/Notification.js +97 -86
  50. package/dist/components/OfflineBanner/OfflineBanner.d.ts.map +1 -1
  51. package/dist/components/OfflineBanner/OfflineBanner.js +40 -32
  52. package/dist/components/Pagination/Pagination.d.ts.map +1 -1
  53. package/dist/components/Pagination/Pagination.js +61 -66
  54. package/dist/components/SearchSelect/SearchSelect.d.ts.map +1 -1
  55. package/dist/components/SearchSelect/SearchSelect.js +137 -134
  56. package/dist/components/TabPanels/TabPanels.d.ts +13 -0
  57. package/dist/components/TabPanels/TabPanels.d.ts.map +1 -0
  58. package/dist/components/TabPanels/TabPanels.js +8 -0
  59. package/dist/components/Table/Filter/Filter.d.ts.map +1 -1
  60. package/dist/components/Table/Filter/Filter.js +47 -47
  61. package/dist/components/Table/Filter/Filter.types.d.ts +2 -1
  62. package/dist/components/Table/Filter/Filter.types.d.ts.map +1 -1
  63. package/dist/components/Table/Filter/SelectFilter.d.ts.map +1 -1
  64. package/dist/components/Table/Filter/SelectFilter.js +9 -9
  65. package/dist/components/Table/Table.d.ts +1 -1
  66. package/dist/components/Table/Table.d.ts.map +1 -1
  67. package/dist/components/Table/Table.dataPipeline.d.ts +4 -3
  68. package/dist/components/Table/Table.dataPipeline.d.ts.map +1 -1
  69. package/dist/components/Table/Table.dataPipeline.js +63 -62
  70. package/dist/components/Table/Table.js +297 -297
  71. package/dist/components/Table/Table.rowTypes.d.ts +6 -0
  72. package/dist/components/Table/Table.rowTypes.d.ts.map +1 -0
  73. package/dist/components/Table/Table.types.d.ts +10 -3
  74. package/dist/components/Table/Table.types.d.ts.map +1 -1
  75. package/dist/components/Table/TableHead.d.ts +27 -19
  76. package/dist/components/Table/TableHead.d.ts.map +1 -1
  77. package/dist/components/Table/TableHead.js +1 -1
  78. package/dist/components/Table/TableMobileCard.d.ts +11 -11
  79. package/dist/components/Table/TableMobileCard.d.ts.map +1 -1
  80. package/dist/components/Table/TableMobileCard.js +81 -84
  81. package/dist/components/Table/TableMobileView.d.ts +7 -5
  82. package/dist/components/Table/TableMobileView.d.ts.map +1 -1
  83. package/dist/components/Table/TableRow.d.ts +10 -8
  84. package/dist/components/Table/TableRow.d.ts.map +1 -1
  85. package/dist/components/Table/TableRow.js +116 -112
  86. package/dist/components/Table/useTableColumnPinning.d.ts.map +1 -1
  87. package/dist/components/Table/useTableVirtualization.d.ts +5 -5
  88. package/dist/components/Table/useTableVirtualization.d.ts.map +1 -1
  89. package/dist/components/Table/useTableVirtualization.js +20 -20
  90. package/dist/components/Tabs/Tabs.d.ts +1 -1
  91. package/dist/components/Tabs/Tabs.d.ts.map +1 -1
  92. package/dist/components/Tabs/Tabs.js +109 -104
  93. package/dist/components/Tabs/Tabs.types.d.ts +29 -1
  94. package/dist/components/Tabs/Tabs.types.d.ts.map +1 -1
  95. package/dist/components/Tabs/distributeTabs.d.ts +6 -0
  96. package/dist/components/Tabs/distributeTabs.d.ts.map +1 -1
  97. package/dist/components/Tabs/tabsIndicator.d.ts +7 -3
  98. package/dist/components/Tabs/tabsIndicator.d.ts.map +1 -1
  99. package/dist/components/Tabs/tabsScroll.d.ts +20 -0
  100. package/dist/components/Tabs/tabsScroll.d.ts.map +1 -0
  101. package/dist/components/Tabs/useTabsOverflow.d.ts +3 -1
  102. package/dist/components/Tabs/useTabsOverflow.d.ts.map +1 -1
  103. package/dist/components/Tabs/useTabsOverflow.js +32 -32
  104. package/dist/components/Tabs/useTabsScroll.d.ts +4 -0
  105. package/dist/components/Tabs/useTabsScroll.d.ts.map +1 -0
  106. package/dist/components/Tabs/useTabsScroll.js +17 -0
  107. package/dist/components/Textarea/Textarea.d.ts +22 -2
  108. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  109. package/dist/components/Textarea/Textarea.js +48 -43
  110. package/dist/components/Textarea/Textarea.types.d.ts +1 -0
  111. package/dist/components/Textarea/Textarea.types.d.ts.map +1 -1
  112. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  113. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  114. package/dist/components/Tooltip/Tooltip.js +151 -132
  115. package/dist/components/Tooltip/Tooltip.types.d.ts +7 -2
  116. package/dist/components/Tooltip/Tooltip.types.d.ts.map +1 -1
  117. package/dist/components/TreeView/TreeView.js +95 -95
  118. package/dist/components/TreeView/TreeView.types.d.ts +1 -1
  119. package/dist/components/TreeView/TreeView.types.d.ts.map +1 -1
  120. package/dist/components/VirtualList/VirtualList.d.ts +45 -0
  121. package/dist/components/VirtualList/VirtualList.d.ts.map +1 -0
  122. package/dist/components/VirtualList/VirtualList.js +62 -0
  123. package/dist/dev/index.js +1306 -584
  124. package/dist/dev/types/react/src/dev/index.d.ts +1 -1
  125. package/dist/dev/types/vanilla/src/core/motion.d.ts +41 -0
  126. package/dist/dev/types/vanilla/src/core/requestLog.d.ts +29 -0
  127. package/dist/dev/types/vanilla/src/dev/highlight.d.ts +32 -0
  128. package/dist/dev/types/vanilla/src/dev/intercept.d.ts +4 -1
  129. package/dist/dev/types/vanilla/src/dev/motionModes.d.ts +30 -0
  130. package/dist/dev/types/vanilla/src/dev/panelKit.d.ts +49 -0
  131. package/dist/dev/types/vanilla/src/dev/panelStyles.d.ts +7 -0
  132. package/dist/dev/types/vanilla/src/dev/rules.d.ts +31 -0
  133. package/dist/dev/types/vanilla/src/dev/store.d.ts +7 -4
  134. package/dist/dev/types/vanilla/src/dev/types.d.ts +14 -3
  135. package/dist/dev/types/vanilla/src/dev/viewModes.d.ts +22 -0
  136. package/dist/hooks/useCollapseMotion.d.ts +18 -0
  137. package/dist/hooks/useCollapseMotion.d.ts.map +1 -0
  138. package/dist/hooks/useCollapseMotion.js +9 -0
  139. package/dist/hooks/useDismiss.d.ts +7 -1
  140. package/dist/hooks/useDismiss.d.ts.map +1 -1
  141. package/dist/hooks/useDismiss.js +19 -17
  142. package/dist/hooks/useEnterMotion.d.ts +9 -0
  143. package/dist/hooks/useEnterMotion.d.ts.map +1 -0
  144. package/dist/hooks/useEnterMotion.js +10 -0
  145. package/dist/hooks/useForwardedRef.d.ts +8 -0
  146. package/dist/hooks/useForwardedRef.d.ts.map +1 -0
  147. package/dist/hooks/useForwardedRef.js +8 -0
  148. package/dist/hooks/useInfiniteScroll.d.ts +27 -0
  149. package/dist/hooks/useInfiniteScroll.d.ts.map +1 -0
  150. package/dist/hooks/useInfiniteScroll.js +13 -0
  151. package/dist/hooks/useMountTransition.d.ts +1 -1
  152. package/dist/hooks/useMountTransition.d.ts.map +1 -1
  153. package/dist/hooks/useMountTransition.js +14 -13
  154. package/dist/hooks/useVirtualList.d.ts +34 -0
  155. package/dist/hooks/useVirtualList.d.ts.map +1 -0
  156. package/dist/hooks/useVirtualList.js +21 -0
  157. package/dist/index.d.ts +15 -1
  158. package/dist/index.d.ts.map +1 -1
  159. package/dist/shared/collapseMotion.d.ts +32 -0
  160. package/dist/shared/collapseMotion.d.ts.map +1 -0
  161. package/dist/shared/infiniteScroll.d.ts +42 -0
  162. package/dist/shared/infiniteScroll.d.ts.map +1 -0
  163. package/dist/shared/kitCopy.js +1 -1
  164. package/dist/shared/linkClick.d.ts +7 -0
  165. package/dist/shared/linkClick.d.ts.map +1 -0
  166. package/dist/shared/motion.d.ts +42 -0
  167. package/dist/shared/motion.d.ts.map +1 -0
  168. package/dist/shared/popupTransition.d.ts +10 -2
  169. package/dist/shared/popupTransition.d.ts.map +1 -1
  170. package/dist/shared/popupTransition.js +6 -5
  171. package/dist/shared/virtualList.d.ts +103 -0
  172. package/dist/shared/virtualList.d.ts.map +1 -0
  173. package/dist/style-no-fonts.css +1 -1
  174. package/dist/style.css +1 -1
  175. package/dist/style.layer.css +2 -2
  176. package/dist/style.shell.css +5 -5
  177. package/dist/urfu-ui-kit-react.js +53 -45
  178. package/dist/utils/describeError.d.ts +12 -1
  179. package/dist/utils/describeError.d.ts.map +1 -1
  180. package/dist/vanilla/core/collapseMotion.js +58 -0
  181. package/dist/vanilla/core/dateMask.js +6 -6
  182. package/dist/vanilla/core/describeError.js +169 -112
  183. package/dist/vanilla/core/distributeTabs.js +23 -20
  184. package/dist/vanilla/core/infiniteScroll.js +79 -0
  185. package/dist/vanilla/core/kitRegistry.js +4 -4
  186. package/dist/vanilla/core/linkClick.js +2 -0
  187. package/dist/vanilla/core/motion.js +29 -0
  188. package/dist/vanilla/core/requestLog.js +40 -0
  189. package/dist/vanilla/core/tabsIndicator.js +29 -26
  190. package/dist/vanilla/core/tabsScroll.js +29 -0
  191. package/dist/vanilla/core/virtualList.js +213 -0
  192. package/package.json +1 -1
@@ -1,165 +1,176 @@
1
- import { jsxs as s, jsx as o, Fragment as se } from "react/jsx-runtime";
2
- import { useRef as _, useState as v, useEffect as ue, useLayoutEffect as de, useMemo as me } from "react";
3
- import { Button$u as k } from "../Button/Button.js";
4
- import { Card$u as fe } from "../Card/Card.js";
5
- import { Icon$u as pe } from "../Icon/Icon.js";
6
- import { ErrorScreenIllustration$u as he, ErrorScreenDecor$u as Q } from "./ErrorScreenIllustration.js";
1
+ import { jsxs as a, jsx as o, Fragment as le } from "react/jsx-runtime";
2
+ import { useRef as P, useState as y, useEffect as ce, useLayoutEffect as ve, useMemo as Ee } from "react";
3
+ import { useAutoId$u as be } from "../../hooks/useAutoId.js";
4
+ import { Button$u as N } from "../Button/Button.js";
5
+ import { Card$u as Ce } from "../Card/Card.js";
6
+ import { Message$u as we } from "../Message/Message.js";
7
+ import { Modal$u as ge } from "../Modal/Modal.js";
8
+ import { ErrorScreenIllustration$u as ye, ErrorScreenDecor$u as q } from "./ErrorScreenIllustration.js";
7
9
  /* empty css */
8
10
  /* empty css */
9
- import { describeError$u as ve, formatErrorDetails$u as Ee, DEFAULT_SUPPORT_EMAIL$u as be, DEFAULT_SUPPORT_LABEL$u as we, supportMailto$u as ge, getErrorReportConfig$u as Ce } from "../../vanilla/core/describeError.js";
10
- const ye = {
11
+ import { describeError$u as Ne, DEFAULT_SUPPORT_EMAIL$u as Se, DEFAULT_SUPPORT_LABEL$u as Le, formatErrorDetails$u as Re, getErrorReportConfig$u as ke, supportMailto$u as Ae } from "../../vanilla/core/describeError.js";
12
+ const _e = {
11
13
  notFound: { code: "404", title: "Страница не найдена", text: "Возможно, страница была удалена или адрес введён с ошибкой." },
12
14
  forbidden: { code: "403", title: "Нет доступа к странице", text: "Права вашей роли не позволяют открыть этот раздел." },
13
15
  serverError: { code: "500", title: "Ошибка в работе сервиса", text: "Попробуйте обновить страницу. Если ошибка повторится, обратитесь в техническую поддержку." },
14
16
  maintenance: { code: "503", title: "Сервис на обслуживании", text: "Сейчас идут плановые работы — сервис скоро вернётся к работе. Всё, что вы успели сделать до этого, сохранено." }
15
- }, Ne = {
17
+ }, Te = {
16
18
  notFound: "none",
17
19
  forbidden: "forbidden",
18
20
  serverError: "error",
19
21
  maintenance: "maintenance"
20
- }, Se = '[id^="__qiankun_microapp_wrapper_for_"]';
21
- function Le() {
22
+ }, Oe = '[id^="__qiankun_microapp_wrapper_for_"]';
23
+ function Ie() {
22
24
  return typeof window < "u" && !!window.__POWERED_BY_QIANKUN__;
23
25
  }
24
- function Re(r) {
26
+ function xe(r) {
25
27
  for (let e = r.parentElement; e && e !== document.body; e = e.parentElement) {
26
28
  const { overflowY: t } = getComputedStyle(e);
27
29
  if (t === "auto" || t === "scroll") return e;
28
30
  }
29
31
  return r;
30
32
  }
31
- function Ae(r, e) {
33
+ function Pe(r, e) {
32
34
  const t = [];
33
35
  for (let n = r; n && n !== e; n = n.parentElement) {
34
- const u = n.parentElement;
35
- if (!u) break;
36
- for (const a of Array.from(u.children))
37
- a !== n && a instanceof HTMLElement && !a.inert && (a.inert = !0, t.push(a));
36
+ const d = n.parentElement;
37
+ if (!d) break;
38
+ for (const i of Array.from(d.children))
39
+ i !== n && i instanceof HTMLElement && !i.inert && (i.inert = !0, t.push(i));
38
40
  }
39
41
  return () => t.forEach((n) => {
40
42
  n.inert = !1;
41
43
  });
42
44
  }
43
- function $e({
45
+ function Je({
44
46
  variant: r,
45
47
  error: e,
46
48
  subject: t,
47
49
  operation: n,
48
- notFoundIsPage: u,
49
- onRetry: a,
50
- onLogin: f,
51
- onHome: E,
50
+ notFoundIsPage: d,
51
+ onRetry: i,
52
+ onLogin: u,
53
+ onHome: m,
52
54
  showDetails: b,
53
- supportEmail: T,
54
- supportLabel: x,
55
- onSupport: z,
56
- title: w,
57
- text: g,
58
- code: l,
59
- illustration: C,
60
- reasons: y,
61
- reasonsTitle: X,
62
- onAction: Z,
63
- actionLabel: ee,
64
- secondaryActionLabel: j,
65
- onSecondaryAction: q,
66
- loading: F = !1,
67
- className: I = "",
68
- fullScreen: N = !1
55
+ supportEmail: C,
56
+ supportLabel: S,
57
+ onSupport: L,
58
+ title: z,
59
+ text: R,
60
+ code: p,
61
+ illustration: k,
62
+ reasons: h,
63
+ reasonsTitle: F,
64
+ onAction: s,
65
+ actionLabel: A,
66
+ secondaryActionLabel: K,
67
+ onSecondaryAction: Y,
68
+ loading: V = !1,
69
+ className: B = "",
70
+ fullScreen: w = !1
69
71
  }) {
70
- const K = _(null), W = _(null), B = _(null), [re] = v(Le), [te, ne] = v(null), [oe, le] = v(!1), p = N && re && !oe;
71
- ue(() => {
72
- const i = K.current;
73
- if (!N || p || !i) return;
74
- const d = (L) => L.preventDefault();
75
- return i.setAttribute("closedby", "none"), i.addEventListener("cancel", d), i.showModal(), J(B.current), () => {
76
- i.removeEventListener("cancel", d), i.close();
72
+ const G = P(null), J = P(null), D = P(null), [ie] = y(Ie), [se, ae] = y(null), [ue, de] = y(!1), v = w && ie && !ue;
73
+ ce(() => {
74
+ const c = G.current;
75
+ if (!w || v || !c) return;
76
+ const f = (T) => T.preventDefault();
77
+ return c.setAttribute("closedby", "none"), c.addEventListener("cancel", f), c.showModal(), oe(D.current), () => {
78
+ c.removeEventListener("cancel", f), c.close();
77
79
  };
78
- }, [N, p]), de(() => {
79
- const i = W.current;
80
- if (!p || !i) return;
81
- const d = i.closest(Se);
82
- if (!d) {
83
- le(!0);
80
+ }, [w, v]), ve(() => {
81
+ const c = J.current;
82
+ if (!v || !c) return;
83
+ const f = c.closest(Oe);
84
+ if (!f) {
85
+ de(!0);
84
86
  return;
85
87
  }
86
- const L = Re(d), R = () => {
87
- const A = L.getBoundingClientRect();
88
- ne({ top: A.top, left: A.left, width: A.width, height: A.height });
88
+ const T = xe(f), O = () => {
89
+ const I = T.getBoundingClientRect();
90
+ ae({ top: I.top, left: I.left, width: I.width, height: I.height });
89
91
  };
90
- R();
91
- const m = typeof ResizeObserver > "u" ? null : new ResizeObserver(R);
92
- m == null || m.observe(L), window.addEventListener("resize", R);
93
- const ae = Ae(i, d), H = document.activeElement instanceof HTMLElement ? document.activeElement : null;
94
- return J(B.current), () => {
95
- m == null || m.disconnect(), window.removeEventListener("resize", R), ae(), H == null || H.focus();
92
+ O();
93
+ const E = typeof ResizeObserver > "u" ? null : new ResizeObserver(O);
94
+ E == null || E.observe(T), window.addEventListener("resize", O);
95
+ const he = Pe(c, f), j = document.activeElement instanceof HTMLElement ? document.activeElement : null;
96
+ return oe(D.current), () => {
97
+ E == null || E.disconnect(), window.removeEventListener("resize", O), he(), j == null || j.focus();
96
98
  };
97
- }, [p]);
98
- const c = me(() => {
99
+ }, [v]);
100
+ const l = Ee(() => {
99
101
  if (e == null) return;
100
- const i = ve(e, { subject: t, operation: n, notFoundIsPage: u });
101
- return i.group === "aborted" ? void 0 : i;
102
- }, [e, t, n, u]), Y = r ?? (c == null ? void 0 : c.variant) ?? "serverError", S = ye[Y], D = l !== void 0 ? l : c ? c.code : S.code, O = C ?? (l != null ? "none" : Ne[Y]), h = y != null && y.length ? y : null, P = D ?? void 0, U = w ?? (c == null ? void 0 : c.title) ?? S.title, M = typeof U == "string" ? U : S.title, ce = !!(j && q), V = _e(c, { onAction: Z, actionLabel: ee, onRetry: a, onLogin: f, onHome: E }), ie = [
102
+ const c = Ne(e, { subject: t, operation: n, notFoundIsPage: d });
103
+ return c.group === "aborted" ? void 0 : c;
104
+ }, [e, t, n, d]), X = r ?? (l == null ? void 0 : l.variant) ?? "serverError", _ = _e[X], M = p !== void 0 ? p : l ? l.code : _.code, U = k ?? (p != null ? "none" : Te[X]), g = h != null && h.length ? h : null, $ = M ?? void 0, H = z ?? (l == null ? void 0 : l.title) ?? _.title, Q = typeof H == "string" ? H : _.title, me = !!(K && Y), Z = ze(l, { onAction: s, actionLabel: A, onRetry: i, onLogin: u, onHome: m }), ee = Me({ supportEmail: C, supportLabel: S, onSupport: L }), re = !!l && b !== !1, [fe, te] = y(!1), pe = [
103
105
  "u-error-screen-card",
104
- O !== "none" && "u-error-screen-card--illustrated",
105
- h && "u-error-screen-card--reasons"
106
- ].filter(Boolean).join(" "), $ = /* @__PURE__ */ s(fe, { className: ie, children: [
107
- O !== "none" ? /* @__PURE__ */ o(he, { name: O }) : D !== null && /* @__PURE__ */ o("span", { className: "u-error-screen-code", "aria-hidden": "true", children: D }),
108
- /* @__PURE__ */ s("div", { className: "u-error-screen-message", children: [
109
- /* @__PURE__ */ o("p", { className: "u-error-screen-title", children: U }),
110
- (g !== void 0 || c || !h) && /* @__PURE__ */ o("p", { className: "u-error-screen-description", children: g ?? (c == null ? void 0 : c.text) ?? S.text }),
111
- h && /* @__PURE__ */ s("div", { className: "u-error-screen-reasons", children: [
112
- /* @__PURE__ */ o("p", { className: "u-error-screen-reasons-title", children: X ?? (h.length > 1 ? "Причины" : "Причина") }),
113
- /* @__PURE__ */ o("ul", { className: "u-error-screen-reasons-list", children: h.map((i, d) => /* @__PURE__ */ o("li", { children: i }, d)) })
106
+ U !== "none" && "u-error-screen-card--illustrated",
107
+ g && "u-error-screen-card--reasons"
108
+ ].filter(Boolean).join(" "), W = /* @__PURE__ */ a(Ce, { className: pe, children: [
109
+ U !== "none" ? /* @__PURE__ */ o(ye, { name: U }) : M !== null && /* @__PURE__ */ o("span", { className: "u-error-screen-code", "aria-hidden": "true", children: M }),
110
+ /* @__PURE__ */ a("div", { className: "u-error-screen-message", children: [
111
+ /* @__PURE__ */ o("p", { className: "u-error-screen-title", children: H }),
112
+ (R !== void 0 || l || !g) && /* @__PURE__ */ o("p", { className: "u-error-screen-description", children: De(R ?? (l == null ? void 0 : l.text) ?? _.text, ee.email, re ? () => te(!0) : void 0) }),
113
+ g && /* @__PURE__ */ a("div", { className: "u-error-screen-reasons", children: [
114
+ /* @__PURE__ */ o("p", { className: "u-error-screen-reasons-title", children: F ?? (g.length > 1 ? "Причины" : "Причина") }),
115
+ /* @__PURE__ */ o("ul", { className: "u-error-screen-reasons-list", children: g.map((c, f) => /* @__PURE__ */ o("li", { children: c }, f)) })
114
116
  ] })
115
117
  ] }),
116
- /* @__PURE__ */ s("div", { className: "u-error-screen-actions", ref: B, children: [
117
- ce && /* @__PURE__ */ o(k, { size: "small", variant: "simple", disabled: F, onClick: q, children: j }),
118
- /* @__PURE__ */ o(k, { size: "small", loading: F, onClick: V.onClick, children: V.label })
118
+ /* @__PURE__ */ a("div", { className: "u-error-screen-actions", ref: D, children: [
119
+ me && /* @__PURE__ */ o(N, { size: "small", variant: "simple", disabled: V, onClick: Y, children: K }),
120
+ /* @__PURE__ */ o(N, { size: "small", loading: V, onClick: Z.onClick, children: Z.label })
119
121
  ] }),
120
- c && b !== !1 && /* @__PURE__ */ o(Te, { description: { ...c, title: M }, support: ke({ supportEmail: T, supportLabel: x, onSupport: z }) })
122
+ l && re && /* @__PURE__ */ o(
123
+ Ue,
124
+ {
125
+ description: { ...l, title: Q },
126
+ inDialog: w && !v,
127
+ support: ee,
128
+ open: fe,
129
+ onOpenChange: te
130
+ }
131
+ )
121
132
  ] });
122
- return p ? /* @__PURE__ */ s(
133
+ return v ? /* @__PURE__ */ a(
123
134
  "div",
124
135
  {
125
- ref: W,
136
+ ref: J,
126
137
  role: "dialog",
127
- "aria-label": M,
128
- style: te ?? void 0,
129
- "data-error-code": P,
130
- className: `u-error-screen u-error-screen-fullscreen u-error-screen-area ${I}`,
138
+ "aria-label": Q,
139
+ style: se ?? void 0,
140
+ "data-error-code": $,
141
+ className: `u-error-screen u-error-screen-fullscreen u-error-screen-area ${B}`,
131
142
  children: [
132
- /* @__PURE__ */ o(Q, {}),
133
- $
143
+ /* @__PURE__ */ o(q, {}),
144
+ W
134
145
  ]
135
146
  }
136
- ) : N ? /* @__PURE__ */ s(
147
+ ) : w ? /* @__PURE__ */ a(
137
148
  "dialog",
138
149
  {
139
- ref: K,
140
- className: `u-error-screen u-error-screen-fullscreen ${I}`,
141
- "aria-label": M,
142
- "data-error-code": P,
150
+ ref: G,
151
+ className: `u-error-screen u-error-screen-fullscreen ${B}`,
152
+ "aria-label": Q,
153
+ "data-error-code": $,
143
154
  children: [
144
- /* @__PURE__ */ o(Q, {}),
145
- $
155
+ /* @__PURE__ */ o(q, {}),
156
+ W
146
157
  ]
147
158
  }
148
- ) : /* @__PURE__ */ s("div", { className: `u-error-screen ${I}`, role: "alert", "data-error-code": P, children: [
149
- /* @__PURE__ */ o(Q, {}),
150
- $
159
+ ) : /* @__PURE__ */ a("div", { className: `u-error-screen ${B}`, role: "alert", "data-error-code": $, children: [
160
+ /* @__PURE__ */ o(q, {}),
161
+ W
151
162
  ] });
152
163
  }
153
- const G = () => window.location.reload();
154
- function J(r) {
164
+ const ne = () => window.location.reload();
165
+ function oe(r) {
155
166
  var e;
156
167
  (e = r == null ? void 0 : r.querySelector("button:last-of-type")) == null || e.focus();
157
168
  }
158
- function _e(r, e) {
169
+ function ze(r, e) {
159
170
  const t = e.actionLabel;
160
171
  if (e.onAction) return { label: t ?? (r ? "Повторить" : "Обновить страницу"), onClick: e.onAction };
161
- if (!r) return { label: t ?? "Обновить страницу", onClick: e.onRetry ?? G };
162
- const n = { label: t ?? "Обновить страницу", onClick: G };
172
+ if (!r) return { label: t ?? "Обновить страницу", onClick: e.onRetry ?? ne };
173
+ const n = { label: t ?? "Обновить страницу", onClick: ne };
163
174
  switch (r.action) {
164
175
  case "login":
165
176
  return e.onLogin ? { label: t ?? r.actionLabel, onClick: e.onLogin } : n;
@@ -173,49 +184,72 @@ function _e(r, e) {
173
184
  return n;
174
185
  }
175
186
  }
176
- function ke(r) {
177
- const e = Ce();
178
- return { email: r.supportEmail !== void 0 ? r.supportEmail : e.supportEmail !== void 0 ? e.supportEmail : be, label: r.supportLabel ?? e.supportLabel ?? we, onSupport: r.onSupport ?? e.onSupport };
187
+ const Be = 2e3, x = "техническую поддержку";
188
+ function De(r, e, t) {
189
+ if (typeof r != "string") return r;
190
+ const n = r.indexOf(x);
191
+ return n < 0 || !e && !t ? r : /* @__PURE__ */ a(le, { children: [
192
+ r.slice(0, n),
193
+ t ? /* @__PURE__ */ o("button", { type: "button", className: "u-link u-error-screen-support-link", onClick: t, children: x }) : x,
194
+ e && `: ${e}`,
195
+ r.slice(n + x.length)
196
+ ] });
197
+ }
198
+ function Me(r) {
199
+ const e = ke();
200
+ return { email: r.supportEmail !== void 0 ? r.supportEmail : e.supportEmail !== void 0 ? e.supportEmail : Se, label: r.supportLabel ?? e.supportLabel ?? Le, onSupport: r.onSupport ?? e.onSupport };
179
201
  }
180
- function Te({ description: r, support: e }) {
181
- const t = e.email, [n, u] = v("idle"), a = _(null), f = Ee(r), E = () => {
182
- const l = window.getSelection();
183
- l && a.current && l.selectAllChildren(a.current);
184
- }, b = (l, C) => {
202
+ function Ue({ description: r, support: e, inDialog: t, open: n, onOpenChange: d }) {
203
+ const i = e.email, [u, m] = y("idle"), b = P(null), C = Re(r), S = () => {
204
+ const s = window.getSelection();
205
+ s && b.current && s.selectAllChildren(b.current);
206
+ }, L = (s, A) => {
185
207
  if (!navigator.clipboard) {
186
- E(), C();
208
+ S(), A();
187
209
  return;
188
210
  }
189
- navigator.clipboard.writeText(f).then(l, () => {
190
- E(), C();
211
+ navigator.clipboard.writeText(C).then(s, () => {
212
+ S(), A();
191
213
  });
192
- }, T = () => b(() => u("copied"), () => u("selected")), x = () => {
193
- const l = t ? ge(r, t) : null;
214
+ }, z = () => L(() => m("copied"), () => m("selected")), R = () => {
215
+ const s = i ? Ae(r, i) : null;
194
216
  if (e.onSupport) {
195
- e.onSupport({ report: f, description: r, mailto: l });
217
+ e.onSupport({ report: C, description: r, mailto: s });
196
218
  return;
197
219
  }
198
- l && (b(() => u("mailCopied"), () => u("mailSelected")), window.open(l, "_self"));
199
- }, z = {
200
- idle: "",
201
- copied: "Скопировано",
202
- selected: "Выделено — нажмите Ctrl+C",
203
- mailCopied: `Открываем письмо. Если почта не открылась — текст скопирован, вставьте его в письмо на ${t}`,
204
- mailSelected: `Открываем письмо. Если почта не открылась — текст выделен: нажмите Ctrl+C и вставьте его в письмо на ${t}`
205
- }[n], [w, g] = v(!1);
206
- return /* @__PURE__ */ s("details", { className: "u-error-screen-details", onToggle: (l) => g(l.currentTarget.open), children: [
207
- /* @__PURE__ */ s("summary", { children: [
208
- "Подробности для технической поддержки",
209
- /* @__PURE__ */ o(pe, { name: "up", size: 14, rotate: w ? 0 : 180 })
210
- ] }),
211
- w && /* @__PURE__ */ s(se, { children: [
212
- /* @__PURE__ */ o("pre", { ref: a, className: "u-error-screen-report", children: f }),
213
- /* @__PURE__ */ s("div", { className: "u-error-screen-copy", children: [
214
- (t || e.onSupport) && /* @__PURE__ */ o(k, { size: "small", variant: "outline", onClick: x, children: e.label }),
215
- /* @__PURE__ */ o(k, { size: "small", variant: "text", onClick: T, children: "Скопировать" })
216
- ] }),
217
- /* @__PURE__ */ o("p", { className: "u-error-screen-copy-status", role: "status", "aria-live": "polite", children: z })
218
- ] })
220
+ s && (L(() => m("mailCopied"), () => m("mailSelected")), window.open(s, "_self"));
221
+ };
222
+ ce(() => {
223
+ if (u !== "copied") return;
224
+ const s = setTimeout(() => m("idle"), Be);
225
+ return () => clearTimeout(s);
226
+ }, [u]);
227
+ const p = u === "copied" ? "Скопировано" : u === "selected" ? "Выделено — нажмите Ctrl+C" : "Скопировать", k = u === "mailCopied" ? `Открываем письмо. Если почта не открылась — текст скопирован, вставьте его в письмо на ${i}` : u === "mailSelected" ? `Открываем письмо. Если почта не открылась — текст выделен: нажмите Ctrl+C и вставьте его в письмо на ${i}` : "", h = be(void 0, "u-error-screen-details-title");
228
+ return /* @__PURE__ */ a(le, { children: [
229
+ /* @__PURE__ */ o(N, { size: "small", variant: "text", onClick: () => d(!0), children: "Подробности для технической поддержки" }),
230
+ /* @__PURE__ */ a(
231
+ ge,
232
+ {
233
+ active: n,
234
+ onCancel: () => {
235
+ d(!1), m("idle");
236
+ },
237
+ unmountOnClose: !0,
238
+ portalOn: !t,
239
+ ariaLabelledBy: h,
240
+ maxWidth: "640px",
241
+ className: "u-error-screen-details-modal",
242
+ children: [
243
+ /* @__PURE__ */ o("h3", { id: h, className: "u-error-screen-details-title", children: "Подробности для технической поддержки" }),
244
+ /* @__PURE__ */ o("pre", { ref: b, className: "u-error-screen-report", children: C }),
245
+ /* @__PURE__ */ a("div", { className: "u-error-screen-copy", children: [
246
+ /* @__PURE__ */ o(N, { size: "small", variant: "text", onClick: z, children: p }),
247
+ (i || e.onSupport) && /* @__PURE__ */ o(N, { size: "small", onClick: R, children: e.label })
248
+ ] }),
249
+ /* @__PURE__ */ o("div", { className: "u-error-screen-copy-status", role: "status", "aria-live": "polite", children: k ? /* @__PURE__ */ o(we, { size: "small", children: k }) : u !== "idle" && /* @__PURE__ */ o("span", { className: "u-error-screen-sr-only", children: p }) })
250
+ ]
251
+ }
252
+ )
219
253
  ] });
220
254
  }
221
- export { $e as ErrorScreen$u };
255
+ export { Je as ErrorScreen$u };
@@ -15,5 +15,5 @@ import type { FormFieldProperties } from './FormField.types';
15
15
  * Он нужен там, где раскладку удобнее задать один раз снаружи — например,
16
16
  * когда поле приходит из другой библиотеки или это вовсе не поле.
17
17
  */
18
- export declare const FormField: ({ title, required, error, inline, gap, hint, htmlFor, className, style, children, }: FormFieldProperties) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const FormField: ({ title, tooltip, required, error, inline, gap, hint, htmlFor, className, style, children, }: FormFieldProperties) => import("react/jsx-runtime").JSX.Element;
19
19
  //# sourceMappingURL=FormField.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../src/components/FormField/FormField.tsx"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,0BAA0B,CAAC;AAClC,OAAO,yDAAyD,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAG7D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,SAAS,GAAI,qFAWvB,mBAAmB,4CA6BrB,CAAC"}
1
+ {"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../src/components/FormField/FormField.tsx"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,0BAA0B,CAAC;AAClC,OAAO,yDAAyD,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAK7D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,SAAS,GAAI,8FAYvB,mBAAmB,4CA+CrB,CAAC"}
@@ -1,40 +1,53 @@
1
- import { jsxs as u, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as m, jsx as e } from "react/jsx-runtime";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  /* empty css */
5
- import { resolveValidation$u as p } from "../../vanilla/core/validation.js";
6
- const $ = ({
7
- title: i,
8
- required: a = !1,
9
- error: m,
10
- inline: t = !1,
11
- gap: r,
12
- hint: o,
13
- htmlFor: n,
14
- className: f = "",
15
- style: d,
16
- children: c
5
+ import { Button$u as h } from "../Button/Button.js";
6
+ import { Tooltip$u as x } from "../Tooltip/Tooltip.js";
7
+ import { resolveValidation$u as N } from "../../vanilla/core/validation.js";
8
+ const w = ({
9
+ title: r,
10
+ tooltip: o,
11
+ required: c = !1,
12
+ error: d,
13
+ inline: f = !1,
14
+ gap: l,
15
+ hint: a,
16
+ htmlFor: s,
17
+ className: u = "",
18
+ style: p,
19
+ children: _
17
20
  }) => {
18
- const l = p({ error: m }), s = typeof r == "number" ? `calc(${r} * var(--u-preset-unit, 1px))` : r;
19
- return /* @__PURE__ */ u(
21
+ const i = N({ error: d }), t = c ? " u-required" : "", n = typeof l == "number" ? `calc(${l} * var(--u-preset-unit, 1px))` : l;
22
+ return /* @__PURE__ */ m(
20
23
  "div",
21
24
  {
22
- className: `u-form-field${t ? " u-form-field--inline" : ""} ${f}`.trim(),
23
- style: { ...s ? { gap: s } : null, ...d },
25
+ className: `u-form-field${f ? " u-form-field--inline" : ""} ${u}`.trim(),
26
+ style: { ...n ? { gap: n } : null, ...p },
24
27
  children: [
25
- i && /* @__PURE__ */ e(
26
- "label",
27
- {
28
- className: `u-form-field__title${a ? " u-required" : ""}`,
29
- htmlFor: n,
30
- children: i
31
- }
32
- ),
33
- /* @__PURE__ */ e("div", { className: "u-form-field__control", children: c }),
34
- l.showText && /* @__PURE__ */ e("span", { className: "u-form-field__error", children: l.text }),
35
- !l.hasError && o && /* @__PURE__ */ e("span", { className: "u-form-field__hint", children: o })
28
+ r && o ? (
29
+ // «?» стоит рядом с подписью, а не внутри неё: иначе текст подсказки
30
+ // войдёт в имя поля для читалки экрана. Звёздочка — у подписи, перед «?».
31
+ /* @__PURE__ */ m("div", { className: "u-form-field__title-row", children: [
32
+ /* @__PURE__ */ e("label", { className: `u-form-field__title${t}`, htmlFor: s, children: r }),
33
+ /* @__PURE__ */ e("span", { className: "u-form-field__help", children: /* @__PURE__ */ e(x, { tooltipText: o, position: "top", portalOn: !0, children: /* @__PURE__ */ e(
34
+ h,
35
+ {
36
+ variant: "text-table",
37
+ size: "small",
38
+ icon: "question",
39
+ iconOnly: !0,
40
+ iconSize: 15,
41
+ "aria-label": "Подсказка"
42
+ }
43
+ ) }) })
44
+ ] })
45
+ ) : r && /* @__PURE__ */ e("label", { className: `u-form-field__title${t}`, htmlFor: s, children: r }),
46
+ /* @__PURE__ */ e("div", { className: "u-form-field__control", children: _ }),
47
+ i.showText && /* @__PURE__ */ e("span", { className: "u-form-field__error", children: i.text }),
48
+ !i.hasError && a && /* @__PURE__ */ e("span", { className: "u-form-field__hint", children: a })
36
49
  ]
37
50
  }
38
51
  );
39
52
  };
40
- export { $ as FormField$u };
53
+ export { w as FormField$u };
@@ -2,6 +2,12 @@ import type { CSSProperties, ReactNode } from 'react';
2
2
  export type FormFieldProperties = {
3
3
  /** Подпись поля. */
4
4
  title?: string;
5
+ /**
6
+ * Подсказка к подписи: кнопка «?» сразу после текста подписи, текст — по наведению
7
+ * и по фокусу с клавиатуры. Звёздочка обязательного поля — у подписи, перед «?».
8
+ * Без `title` не действует.
9
+ */
10
+ tooltip?: ReactNode;
5
11
  /** Пометить подпись как обязательную. */
6
12
  required?: boolean;
7
13
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"FormField.types.d.ts","sourceRoot":"","sources":["../../../src/components/FormField/FormField.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,MAAM,MAAM,mBAAmB,GAAG;IAC9B,oBAAoB;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,kDAAkD;IAClD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,yCAAyC;IACzC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,CAAC"}
1
+ {"version":3,"file":"FormField.types.d.ts","sourceRoot":"","sources":["../../../src/components/FormField/FormField.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,MAAM,MAAM,mBAAmB,GAAG;IAC9B,oBAAoB;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,kDAAkD;IAClD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,yCAAyC;IACzC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,CAAC"}
@@ -0,0 +1,22 @@
1
+
2
+ import { type ReactNode } from 'react';
3
+ import { type UseInfiniteScrollOptions } from '../../hooks/useInfiniteScroll';
4
+ export interface InfiniteScrollProps extends UseInfiniteScrollOptions {
5
+ /** Сколько строк уже загружено — для объявления «Загружено ещё N» скринридеру. */
6
+ itemCount?: number;
7
+ /** Индикатор под списком, пока `loading`. По умолчанию — две строки Skeleton. */
8
+ loader?: ReactNode;
9
+ /** Под списком, когда порций больше нет. */
10
+ endMessage?: ReactNode;
11
+ /** Объявление о начале загрузки. По умолчанию «Загрузка…». */
12
+ loadingLabel?: string;
13
+ className?: string;
14
+ }
15
+ /**
16
+ * Датчик ленивой подгрузки: ставится после последней строки — в конец обычного списка
17
+ * или в `footer` у `VirtualList`. Подходит к видимой части — вызывает `onLoadMore`
18
+ * (один раз на порцию), пока `loading` — показывает индикатор, после — объявляет
19
+ * скринридеру, сколько строк добавилось.
20
+ */
21
+ export declare const InfiniteScroll: ({ itemCount, loader, endMessage, loadingLabel, className, ...options }: InfiniteScrollProps) => import("react/jsx-runtime").JSX.Element;
22
+ //# sourceMappingURL=InfiniteScroll.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfiniteScroll.d.ts","sourceRoot":"","sources":["../../../src/components/InfiniteScroll/InfiniteScroll.tsx"],"names":[],"mappings":"AAAA,OAAO,2DAA2D,CAAC;AACnE,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,EAAqB,KAAK,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAGjG,MAAM,WAAW,mBAAoB,SAAQ,wBAAwB;IACnE,kFAAkF;IAClF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAKD;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,wEAO5B,mBAAmB,4CA0BrB,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { jsxs as v, jsx as i } from "react/jsx-runtime";
2
+ /* empty css */
3
+ import { useState as _, useRef as h, useEffect as f } from "react";
4
+ import { useInfiniteScroll$u as x } from "../../hooks/useInfiniteScroll.js";
5
+ import { Skeleton$u as N } from "../Skeleton/Skeleton.js";
6
+ const S = (e, r) => `Загружено ещё ${e}${r ? "" : ". Это все записи"}`, A = ({
7
+ itemCount: e,
8
+ loader: r,
9
+ endMessage: u,
10
+ loadingLabel: t = "Загрузка…",
11
+ className: d,
12
+ ...l
13
+ }) => {
14
+ const { sentinelRef: m } = x(l), { loading: n, hasMore: s } = l, [p, c] = _(""), a = h(e);
15
+ return f(() => {
16
+ n && c(t);
17
+ }, [n, t]), f(() => {
18
+ const o = a.current;
19
+ a.current = e, o !== void 0 && e !== void 0 && e > o && c(S(e - o, s));
20
+ }, [e, s]), /* @__PURE__ */ v("div", { className: ["u-infinite-scroll", d].filter(Boolean).join(" "), children: [
21
+ /* @__PURE__ */ i("div", { ref: m, className: "u-infinite-scroll__sentinel", "aria-hidden": "true" }),
22
+ n && /* @__PURE__ */ i("div", { className: "u-infinite-scroll__loader", children: r ?? /* @__PURE__ */ i(N, { variant: "text", count: 2 }) }),
23
+ !s && !n && u,
24
+ /* @__PURE__ */ i("span", { className: "u-infinite-scroll__status", role: "status", "aria-live": "polite", children: p })
25
+ ] });
26
+ };
27
+ export { A as InfiniteScroll$u };
@@ -1,6 +1,43 @@
1
1
 
2
- import { InputTextProperties } from './InputText.types';
3
2
 
4
3
 
5
- export declare const InputText: ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, title, placeholder, defaultValue, value, id: providedId, name, onChange, required, disabled, lineUp, rowGap, columnGap, styleInputContainer, styleTitle, styleInput, className, tableView, size, validationText, validationOn, error, validationOnWithoutText, absoluteValidationText, prefix, prefixValue, defaultPrefixValue, onPrefixChange, prefixPicker, suffix, suffixValue, defaultSuffixValue, onSuffixChange, suffixPicker, }: InputTextProperties) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const InputText: import("react").ForwardRefExoticComponent<import("../..").FieldAccessibilityProps & Partial<{
5
+ title: string;
6
+ placeholder: string;
7
+ defaultValue: string;
8
+ value: string;
9
+ id: string;
10
+ name: string;
11
+ onChange: React.ChangeEventHandler<HTMLInputElement>;
12
+ onBlur: React.FocusEventHandler<HTMLInputElement>;
13
+ type: "text" | "email" | "tel" | "url" | "search";
14
+ inputMode: React.HTMLAttributes<HTMLInputElement>["inputMode"];
15
+ pattern: string;
16
+ required: boolean;
17
+ disabled: boolean;
18
+ lineUp: boolean;
19
+ rowGap: string | number;
20
+ columnGap: string | number;
21
+ styleInputContainer: import("react").CSSProperties;
22
+ styleTitle: import("react").CSSProperties;
23
+ styleInput: import("react").CSSProperties;
24
+ className: string;
25
+ size: import("../..").ComponentSize;
26
+ tableView: boolean;
27
+ error: string | boolean;
28
+ validationText: string;
29
+ validationOn: boolean;
30
+ validationOnWithoutText: boolean;
31
+ absoluteValidationText: boolean;
32
+ prefix: import("./InputText.types").InputAffixOptions;
33
+ prefixValue: string;
34
+ defaultPrefixValue: string;
35
+ onPrefixChange: (value: string) => void;
36
+ prefixPicker: import("./InputText.types").InputAffixPicker;
37
+ suffix: import("./InputText.types").InputAffixOptions;
38
+ suffixValue: string;
39
+ defaultSuffixValue: string;
40
+ onSuffixChange: (value: string) => void;
41
+ suffixPicker: import("./InputText.types").InputAffixPicker;
42
+ }> & import("react").RefAttributes<HTMLInputElement>>;
6
43
  //# sourceMappingURL=InputText.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InputText.d.ts","sourceRoot":"","sources":["../../../src/components/InputText/InputText.tsx"],"names":[],"mappings":"AACA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAOvD,OAAO,yDAAyD,CAAC;AACjE,OAAO,0DAA0D,CAAC;AAElE,eAAO,MAAM,SAAS,GAAI,2gBAqCvB,mBAAmB,4CA8HrB,CAAA"}
1
+ {"version":3,"file":"InputText.d.ts","sourceRoot":"","sources":["../../../src/components/InputText/InputText.tsx"],"names":[],"mappings":"AACA,OAAO,kCAAkC,CAAC;AAS1C,OAAO,yDAAyD,CAAC;AACjE,OAAO,0DAA0D,CAAC;AAElE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qDAkLpB,CAAC"}