urfu-ui-kit-react 2.1.7-next.3 → 2.1.7-next.5

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 (165) hide show
  1. package/dist/components/Accordion/Accordion.d.ts.map +1 -1
  2. package/dist/components/Accordion/Accordion.js +16 -15
  3. package/dist/components/BreadCrumbs/BreadCrumbs.d.ts.map +1 -1
  4. package/dist/components/BreadCrumbs/BreadCrumbs.js +23 -22
  5. package/dist/components/Button/Button.d.ts.map +1 -1
  6. package/dist/components/Button/Button.js +51 -50
  7. package/dist/components/Button/ButtonRefreshIcon.d.ts.map +1 -1
  8. package/dist/components/Button/ButtonRefreshIcon.js +9 -8
  9. package/dist/components/Calendar/Calendar.d.ts.map +1 -1
  10. package/dist/components/Calendar/Calendar.js +237 -216
  11. package/dist/components/Calendar/Calendar.types.d.ts +19 -0
  12. package/dist/components/Calendar/Calendar.types.d.ts.map +1 -1
  13. package/dist/components/Calendar/CalendarSelect.d.ts.map +1 -1
  14. package/dist/components/Calendar/CalendarSelect.js +41 -40
  15. package/dist/components/Card/Card.d.ts.map +1 -1
  16. package/dist/components/Card/Card.js +59 -58
  17. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  18. package/dist/components/Checkbox/Checkbox.js +20 -19
  19. package/dist/components/ColumnSettings/ColumnSettings.d.ts.map +1 -1
  20. package/dist/components/ColumnSettings/ColumnSettings.js +112 -111
  21. package/dist/components/ConfirmModal/ConfirmModal.d.ts.map +1 -1
  22. package/dist/components/ConfirmModal/ConfirmModal.js +30 -29
  23. package/dist/components/Drawer/Drawer.js +57 -57
  24. package/dist/components/ErrorScreen/ErrorScreen.d.ts.map +1 -1
  25. package/dist/components/ErrorScreen/ErrorScreen.js +151 -150
  26. package/dist/components/ErrorScreen/ErrorScreenIllustration.d.ts.map +1 -1
  27. package/dist/components/ErrorScreen/ErrorScreenIllustration.js +35 -34
  28. package/dist/components/FormField/FormField.d.ts.map +1 -1
  29. package/dist/components/FormField/FormField.js +30 -29
  30. package/dist/components/Icon/Icon.d.ts.map +1 -1
  31. package/dist/components/Icon/Icon.js +17 -16
  32. package/dist/components/InfiniteScroll/InfiniteScroll.d.ts.map +1 -1
  33. package/dist/components/InfiniteScroll/InfiniteScroll.js +23 -22
  34. package/dist/components/InputExpandTextarea/InputExpandTextarea.d.ts.map +1 -1
  35. package/dist/components/InputExpandTextarea/InputExpandTextarea.js +88 -87
  36. package/dist/components/InputFile/InputFile.d.ts.map +1 -1
  37. package/dist/components/InputFile/InputFile.js +99 -98
  38. package/dist/components/InputNumber/InputNumber.d.ts.map +1 -1
  39. package/dist/components/InputNumber/InputNumber.js +112 -111
  40. package/dist/components/InputText/InputAffix.d.ts.map +1 -1
  41. package/dist/components/InputText/InputAffix.js +69 -68
  42. package/dist/components/InputText/InputText.d.ts.map +1 -1
  43. package/dist/components/InputText/InputText.js +108 -107
  44. package/dist/components/InputTime/InputTime.d.ts.map +1 -1
  45. package/dist/components/InputTime/InputTime.js +202 -201
  46. package/dist/components/InputTime/InputTimeDropdown.d.ts.map +1 -1
  47. package/dist/components/InputTime/InputTimeDropdown.js +21 -20
  48. package/dist/components/Menu/Menu.d.ts.map +1 -1
  49. package/dist/components/Menu/Menu.js +58 -57
  50. package/dist/components/Message/Message.d.ts.map +1 -1
  51. package/dist/components/Message/Message.js +19 -18
  52. package/dist/components/Modal/Modal.js +66 -66
  53. package/dist/components/Modal/useModalTitleClearance.d.ts.map +1 -1
  54. package/dist/components/Modal/useModalTitleClearance.js +34 -33
  55. package/dist/components/Multiselect/Multiselect.js +222 -222
  56. package/dist/components/Notification/Notification.js +90 -90
  57. package/dist/components/OfflineBanner/OfflineBanner.d.ts.map +1 -1
  58. package/dist/components/OfflineBanner/OfflineBanner.js +40 -37
  59. package/dist/components/Pagination/Pagination.d.ts.map +1 -1
  60. package/dist/components/Pagination/Pagination.js +59 -58
  61. package/dist/components/Preloader/Preloader.d.ts.map +1 -1
  62. package/dist/components/Preloader/Preloader.js +28 -27
  63. package/dist/components/Radio/Radio.d.ts.map +1 -1
  64. package/dist/components/Radio/Radio.js +21 -20
  65. package/dist/components/Search/Search.d.ts.map +1 -1
  66. package/dist/components/Search/Search.js +33 -32
  67. package/dist/components/SearchSelect/SearchSelect.d.ts.map +1 -1
  68. package/dist/components/SearchSelect/SearchSelect.js +176 -166
  69. package/dist/components/SearchSelect/SearchSelectOption.d.ts.map +1 -1
  70. package/dist/components/SearchSelect/SearchSelectOption.js +21 -20
  71. package/dist/components/Select/MobileOptionSheet.d.ts.map +1 -1
  72. package/dist/components/Select/MobileOptionSheet.js +65 -64
  73. package/dist/components/Select/Select.js +184 -184
  74. package/dist/components/Skeleton/Skeleton.d.ts.map +1 -1
  75. package/dist/components/Skeleton/Skeleton.js +26 -25
  76. package/dist/components/Status/Status.d.ts.map +1 -1
  77. package/dist/components/Status/Status.js +36 -35
  78. package/dist/components/StickyActionBar/StickyActionBar.d.ts.map +1 -1
  79. package/dist/components/StickyActionBar/StickyActionBar.js +36 -35
  80. package/dist/components/Switch/Switch.d.ts.map +1 -1
  81. package/dist/components/Switch/Switch.js +19 -18
  82. package/dist/components/Table/Filter/DefaultInput.d.ts.map +1 -1
  83. package/dist/components/Table/Filter/DefaultInput.js +12 -11
  84. package/dist/components/Table/Filter/Filter.d.ts.map +1 -1
  85. package/dist/components/Table/Filter/Filter.js +99 -98
  86. package/dist/components/Table/Filter/FilterBooleanBox.d.ts.map +1 -1
  87. package/dist/components/Table/Filter/FilterBooleanBox.js +7 -6
  88. package/dist/components/Table/Filter/FilterBoxShell.js +48 -48
  89. package/dist/components/Table/Filter/FilterDateBox.d.ts.map +1 -1
  90. package/dist/components/Table/Filter/FilterDateBox.js +65 -64
  91. package/dist/components/Table/Filter/FilterSortIndicator.d.ts.map +1 -1
  92. package/dist/components/Table/Filter/FilterSortIndicator.js +8 -7
  93. package/dist/components/Table/Filter/SelectFilter.js +53 -53
  94. package/dist/components/Table/Filter/TableFilterOptions.d.ts.map +1 -1
  95. package/dist/components/Table/Filter/TableFilterOptions.js +141 -140
  96. package/dist/components/Table/Filter/TableFilterSortButton.d.ts.map +1 -1
  97. package/dist/components/Table/Filter/TableFilterSortButton.js +10 -9
  98. package/dist/components/Table/Filter/useVirtualOptionWindow.d.ts.map +1 -1
  99. package/dist/components/Table/Filter/useVirtualOptionWindow.js +9 -8
  100. package/dist/components/Table/Skeleton/createSkeletonColumns.d.ts.map +1 -1
  101. package/dist/components/Table/Skeleton/createSkeletonColumns.js +9 -8
  102. package/dist/components/Table/Table.d.ts.map +1 -1
  103. package/dist/components/Table/Table.helpers.d.ts.map +1 -1
  104. package/dist/components/Table/Table.helpers.js +31 -30
  105. package/dist/components/Table/Table.js +253 -252
  106. package/dist/components/Table/TableHead.d.ts.map +1 -1
  107. package/dist/components/Table/TableHead.js +92 -91
  108. package/dist/components/Table/TableMobileCard.d.ts.map +1 -1
  109. package/dist/components/Table/TableMobileCard.js +121 -120
  110. package/dist/components/Table/TableMobileFilters.d.ts.map +1 -1
  111. package/dist/components/Table/TableMobileFilters.js +28 -27
  112. package/dist/components/Table/TableMobileView.d.ts.map +1 -1
  113. package/dist/components/Table/TableMobileView.js +178 -177
  114. package/dist/components/Table/TableRow.d.ts.map +1 -1
  115. package/dist/components/Table/TableRow.js +59 -58
  116. package/dist/components/Table/useTableColumnPinning.d.ts +2 -917
  117. package/dist/components/Table/useTableColumnPinning.d.ts.map +1 -1
  118. package/dist/components/Table/useTableColumnPinning.js +21 -20
  119. package/dist/components/Tabs/Tabs.d.ts.map +1 -1
  120. package/dist/components/Tabs/Tabs.js +101 -99
  121. package/dist/components/Tabs/distributeTabs.d.ts +7 -3
  122. package/dist/components/Tabs/distributeTabs.d.ts.map +1 -1
  123. package/dist/components/Tabs/useTabsOverflow.d.ts +4 -0
  124. package/dist/components/Tabs/useTabsOverflow.d.ts.map +1 -1
  125. package/dist/components/Tabs/useTabsOverflow.js +40 -41
  126. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  127. package/dist/components/Textarea/Textarea.js +70 -69
  128. package/dist/components/Tooltip/Tooltip.js +106 -106
  129. package/dist/components/TreeView/TreeView.js +183 -183
  130. package/dist/components/VirtualList/VirtualList.d.ts.map +1 -1
  131. package/dist/components/VirtualList/VirtualList.js +42 -41
  132. package/dist/dev/index.js +2 -2
  133. package/dist/hooks/useAutoId.d.ts.map +1 -1
  134. package/dist/hooks/useAutoId.js +7 -6
  135. package/dist/hooks/useSelectEngine.d.ts.map +1 -1
  136. package/dist/hooks/useSelectEngine.js +31 -30
  137. package/dist/index.d.ts +4 -1
  138. package/dist/index.d.ts.map +1 -1
  139. package/dist/responsive/uiKitResponsive.d.ts +6 -0
  140. package/dist/responsive/uiKitResponsive.d.ts.map +1 -1
  141. package/dist/responsive/uiKitResponsive.js +27 -26
  142. package/dist/shared/kitCopy.js +1 -1
  143. package/dist/shared/optionStateColors.d.ts +3 -2
  144. package/dist/shared/optionStateColors.d.ts.map +1 -1
  145. package/dist/shared/optionStateColors.js +9 -4
  146. package/dist/shared/popupTransition.d.ts.map +1 -1
  147. package/dist/shared/popupTransition.js +7 -6
  148. package/dist/shared/sheetTitle.d.ts +2 -1
  149. package/dist/shared/sheetTitle.d.ts.map +1 -1
  150. package/dist/shared/size.d.ts.map +1 -1
  151. package/dist/shared/size.js +3 -2
  152. package/dist/shared/uiKitDefaults.d.ts +21 -0
  153. package/dist/shared/uiKitDefaults.d.ts.map +1 -1
  154. package/dist/shared/uiKitDefaults.js +32 -18
  155. package/dist/style-no-fonts.css +1 -1
  156. package/dist/style.css +1 -1
  157. package/dist/style.layer.css +2 -2
  158. package/dist/style.shell.css +2 -2
  159. package/dist/style.shell.lk.css +53 -0
  160. package/dist/urfu-ui-kit-react.js +29 -27
  161. package/dist/vanilla/core/dateLimits.js +21 -0
  162. package/dist/vanilla/core/describeError.js +1 -1
  163. package/dist/vanilla/core/distributeTabs.js +36 -23
  164. package/dist/vanilla/core/sheetTitle.js +7 -7
  165. package/package.json +3 -1
@@ -1,109 +1,110 @@
1
- import { jsx as r, jsxs as g } from "react/jsx-runtime";
2
- import { useState as N, useRef as E, useLayoutEffect as O } from "react";
3
- import { Icon$u as z } from "../Icon/Icon.js";
4
- import { useDismiss$u as K } from "../../hooks/useDismiss.js";
5
- const I = { prefix: "Префикс", suffix: "Суффикс" }, q = 3, B = (l) => typeof l == "string" ? { value: l, label: l } : { value: l.value, label: l.label ?? l.value };
6
- function W(l, n, s, e) {
7
- const i = l == null ? [] : (Array.isArray(l) ? l : [l]).map(B), [d, p] = N(s), o = n ?? d, x = i.findIndex((b) => b.value === o), m = o !== void 0 && x < 0 && n !== void 0 ? { value: o, label: o } : i[Math.max(x, 0)], f = i.length > 1 ? i[(Math.max(x, 0) + 1) % i.length] : void 0;
8
- return { variants: i, current: m, next: f, select: (b) => {
9
- b.value !== (m == null ? void 0 : m.value) && (n === void 0 && p(b.value), e == null || e(b.value));
1
+ import { jsx as u, jsxs as N } from "react/jsx-runtime";
2
+ import { useState as R, useRef as L, useLayoutEffect as S } from "react";
3
+ import { Icon$u as C } from "../Icon/Icon.js";
4
+ import { useDismiss$u as U } from "../../hooks/useDismiss.js";
5
+ import { kitCls$u as b, getUiKitPrefix$u as k } from "../../shared/uiKitDefaults.js";
6
+ const E = { prefix: "Префикс", suffix: "Суффикс" }, q = 3, B = (l) => typeof l == "string" ? { value: l, label: l } : { value: l.value, label: l.label ?? l.value };
7
+ function G(l, n, a, e) {
8
+ const s = l == null ? [] : (Array.isArray(l) ? l : [l]).map(B), [d, p] = R(a), o = n ?? d, y = s.findIndex((x) => x.value === o), m = o !== void 0 && y < 0 && n !== void 0 ? { value: o, label: o } : s[Math.max(y, 0)], f = s.length > 1 ? s[(Math.max(y, 0) + 1) % s.length] : void 0;
9
+ return { variants: s, current: m, next: f, select: (x) => {
10
+ x.value !== (m == null ? void 0 : m.value) && (n === void 0 && p(x.value), e == null || e(x.value));
10
11
  } };
11
12
  }
12
- function C(l) {
13
- const n = E(null), [s, e] = N(0);
14
- return O(() => {
15
- const i = n.current;
16
- if (!i) {
13
+ function H(l) {
14
+ const n = L(null), [a, e] = R(0);
15
+ return S(() => {
16
+ const s = n.current;
17
+ if (!s) {
17
18
  e(0);
18
19
  return;
19
20
  }
20
- const d = () => e(i.getBoundingClientRect().width);
21
+ const d = () => e(s.getBoundingClientRect().width);
21
22
  if (d(), typeof ResizeObserver > "u") return;
22
23
  const p = new ResizeObserver(d);
23
- return p.observe(i), () => p.disconnect();
24
- }, [l]), [n, s];
24
+ return p.observe(s), () => p.disconnect();
25
+ }, [l]), [n, a];
25
26
  }
26
- const M = (l, n) => /* @__PURE__ */ g("span", { className: "u-react-input-affix__variants", "aria-hidden": "true", children: [
27
- l.map((s) => /* @__PURE__ */ r("span", { className: s.value === n.value ? "u-react-input-affix__current" : void 0, children: s.label }, s.value)),
28
- !l.some((s) => s.value === n.value) && /* @__PURE__ */ r("span", { className: "u-react-input-affix__current", children: n.label })
27
+ const O = (l, n) => /* @__PURE__ */ N("span", { className: b("react-input-affix__variants"), "aria-hidden": "true", children: [
28
+ l.map((a) => /* @__PURE__ */ u("span", { className: a.value === n.value ? b("react-input-affix__current") : void 0, children: a.label }, a.value)),
29
+ !l.some((a) => a.value === n.value) && /* @__PURE__ */ u("span", { className: b("react-input-affix__current"), children: n.label })
29
30
  ] });
30
- function Y({ side: l, inputId: n, variants: s, current: e, next: i, onSelect: d, onPicked: p, picker: o, disabled: x, compact: m }) {
31
- const f = !e || s.length < 2 ? "static" : o === "cycle" || o === "menu" ? o : s.length <= q ? "cycle" : "menu", [_, b] = C(`${f}|${f === "static" ? e == null ? void 0 : e.label : s.map((t) => t.label).join("|")}`), [u, y] = N(!1), A = E(null), k = E(null), $ = `${n}-${l}`;
32
- K({ refs: [_], onDismiss: () => y(!1), enabled: u }), O(() => {
33
- var w, c;
34
- if (!u) return;
35
- const t = (w = k.current) == null ? void 0 : w.querySelectorAll('[role="option"]'), a = s.findIndex((D) => D.value === (e == null ? void 0 : e.value));
36
- (c = t == null ? void 0 : t[Math.max(a, 0)]) == null || c.focus();
37
- }, [u]);
38
- const v = `u-react-input-affix u-react-input-affix--${l} u-react-input-affix--${f}${m ? " u-react-input-affix--small" : ""}`, S = (t) => {
39
- var c, D, L, R;
40
- const a = [...((c = k.current) == null ? void 0 : c.querySelectorAll('[role="option"]')) ?? []], w = a.indexOf(document.activeElement);
31
+ function J({ side: l, inputId: n, variants: a, current: e, next: s, onSelect: d, onPicked: p, picker: o, disabled: y, compact: m }) {
32
+ const f = !e || a.length < 2 ? "static" : o === "cycle" || o === "menu" ? o : a.length <= q ? "cycle" : "menu", [_, x] = H(`${f}|${f === "static" ? e == null ? void 0 : e.label : a.map((t) => t.label).join("|")}`), [c, h] = R(!1), g = L(null), v = L(null), D = `${n}-${l}`;
33
+ U({ refs: [_], onDismiss: () => h(!1), enabled: c }), S(() => {
34
+ var w, r;
35
+ if (!c) return;
36
+ const t = (w = v.current) == null ? void 0 : w.querySelectorAll('[role="option"]'), i = a.findIndex((A) => A.value === (e == null ? void 0 : e.value));
37
+ (r = t == null ? void 0 : t[Math.max(i, 0)]) == null || r.focus();
38
+ }, [c]);
39
+ const I = `${k()}-react-input-affix ${k()}-react-input-affix--${l} ${k()}-react-input-affix--${f}${m ? ` ${k()}-react-input-affix--small` : ""}`, j = (t) => {
40
+ var r, A, K, M;
41
+ const i = [...((r = v.current) == null ? void 0 : r.querySelectorAll('[role="option"]')) ?? []], w = i.indexOf(document.activeElement);
41
42
  if (t.key === "ArrowDown" || t.key === "ArrowUp") {
42
43
  t.preventDefault();
43
- const j = t.key === "ArrowDown" ? 1 : -1;
44
- (D = a[(w + j + a.length) % a.length]) == null || D.focus();
45
- } else t.key === "Home" || t.key === "End" ? (t.preventDefault(), (L = a[t.key === "Home" ? 0 : a.length - 1]) == null || L.focus()) : t.key === "Escape" ? (t.preventDefault(), y(!1), (R = A.current) == null || R.focus()) : t.key === "Tab" && y(!1);
44
+ const z = t.key === "ArrowDown" ? 1 : -1;
45
+ (A = i[(w + z + i.length) % i.length]) == null || A.focus();
46
+ } else t.key === "Home" || t.key === "End" ? (t.preventDefault(), (K = i[t.key === "Home" ? 0 : i.length - 1]) == null || K.focus()) : t.key === "Escape" ? (t.preventDefault(), h(!1), (M = g.current) == null || M.focus()) : t.key === "Tab" && h(!1);
46
47
  };
47
- let h = null;
48
+ let $ = null;
48
49
  if (e && f === "static")
49
- h = /* @__PURE__ */ r("span", { ref: _, id: $, className: v, children: e.label });
50
- else if (e && i && f === "cycle")
51
- h = /* @__PURE__ */ r(
50
+ $ = /* @__PURE__ */ u("span", { ref: _, id: D, className: I, children: e.label });
51
+ else if (e && s && f === "cycle")
52
+ $ = /* @__PURE__ */ u(
52
53
  "button",
53
54
  {
54
55
  ref: _,
55
- id: $,
56
+ id: D,
56
57
  type: "button",
57
- className: v,
58
- disabled: x,
59
- "aria-label": `${I[l]}: ${e.label}. Сменить на ${i.label}`,
58
+ className: I,
59
+ disabled: y,
60
+ "aria-label": `${E[l]}: ${e.label}. Сменить на ${s.label}`,
60
61
  onClick: (t) => {
61
- d(i), t.detail > 0 && p();
62
+ d(s), t.detail > 0 && p();
62
63
  },
63
- children: M(s, e)
64
+ children: O(a, e)
64
65
  }
65
66
  );
66
67
  else if (e) {
67
- const t = `${$}-list`;
68
- h = /* @__PURE__ */ g("div", { ref: _, className: `${v}${u ? " u-react-input-affix--open" : ""}`, children: [
69
- /* @__PURE__ */ g(
68
+ const t = `${D}-list`;
69
+ $ = /* @__PURE__ */ N("div", { ref: _, className: `${I}${c ? ` ${k()}-react-input-affix--open` : ""}`, children: [
70
+ /* @__PURE__ */ N(
70
71
  "button",
71
72
  {
72
- ref: A,
73
- id: $,
73
+ ref: g,
74
+ id: D,
74
75
  type: "button",
75
- className: "u-react-input-affix__trigger",
76
- disabled: x,
76
+ className: b("react-input-affix__trigger"),
77
+ disabled: y,
77
78
  "aria-haspopup": "listbox",
78
- "aria-expanded": u,
79
- "aria-controls": u ? t : void 0,
80
- "aria-label": `${I[l]}: ${e.label}`,
81
- onClick: () => y((a) => !a),
82
- onKeyDown: (a) => {
83
- (a.key === "ArrowDown" || a.key === "ArrowUp") && (a.preventDefault(), y(!0));
79
+ "aria-expanded": c,
80
+ "aria-controls": c ? t : void 0,
81
+ "aria-label": `${E[l]}: ${e.label}`,
82
+ onClick: () => h((i) => !i),
83
+ onKeyDown: (i) => {
84
+ (i.key === "ArrowDown" || i.key === "ArrowUp") && (i.preventDefault(), h(!0));
84
85
  },
85
86
  children: [
86
- M(s, e),
87
- /* @__PURE__ */ r(z, { name: "down", size: m ? 10 : 12, rotate: u ? 180 : 0, className: "u-react-input-affix__icon" })
87
+ O(a, e),
88
+ /* @__PURE__ */ u(C, { name: "down", size: m ? 10 : 12, rotate: c ? 180 : 0, className: b("react-input-affix__icon") })
88
89
  ]
89
90
  }
90
91
  ),
91
- u && /* @__PURE__ */ r("ul", { ref: k, id: t, role: "listbox", "aria-label": I[l], className: "u-react-input-affix__menu", onKeyDown: S, children: s.map((a) => /* @__PURE__ */ r("li", { role: "presentation", children: /* @__PURE__ */ r(
92
+ c && /* @__PURE__ */ u("ul", { ref: v, id: t, role: "listbox", "aria-label": E[l], className: b("react-input-affix__menu"), onKeyDown: j, children: a.map((i) => /* @__PURE__ */ u("li", { role: "presentation", children: /* @__PURE__ */ u(
92
93
  "button",
93
94
  {
94
95
  type: "button",
95
96
  role: "option",
96
- "aria-selected": a.value === e.value,
97
- className: "u-react-input-affix__option",
97
+ "aria-selected": i.value === e.value,
98
+ className: b("react-input-affix__option"),
98
99
  onClick: (w) => {
99
- var c;
100
- d(a), y(!1), w.detail > 0 ? p() : (c = A.current) == null || c.focus();
100
+ var r;
101
+ d(i), h(!1), w.detail > 0 ? p() : (r = g.current) == null || r.focus();
101
102
  },
102
- children: a.label
103
+ children: i.label
103
104
  }
104
- ) }, a.value)) })
105
+ ) }, i.value)) })
105
106
  ] });
106
107
  }
107
- return { element: h, width: h ? b : 0, mode: f, id: h ? $ : void 0 };
108
+ return { element: $, width: $ ? x : 0, mode: f, id: $ ? D : void 0 };
108
109
  }
109
- export { W as useInputAffix$u, Y as useInputAffixElement$u };
110
+ export { G as useInputAffix$u, J as useInputAffixElement$u };
@@ -1 +1 @@
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"}
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;AAGlE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qDAkLpB,CAAC"}
@@ -1,146 +1,147 @@
1
- import { jsx as d, jsxs as p } from "react/jsx-runtime";
2
- import { getFieldAccessibility$u as be } from "../../shared/fieldAccessibility.js";
1
+ import { jsx as m, jsxs as x } from "react/jsx-runtime";
2
+ import { getFieldAccessibility$u as $e } from "../../shared/fieldAccessibility.js";
3
3
  /* empty css */
4
- import { forwardRef as he, useState as ye, useEffect as ge } from "react";
5
- import { useAutoId$u as Se } from "../../hooks/useAutoId.js";
6
- import { useForwardedRef$u as $e } from "../../hooks/useForwardedRef.js";
7
- import { useInputOverflow$u as Ie } from "../../hooks/useInputOverflow.js";
8
- import { isCompact$u as we, sizeClassName$u as Ce } from "../../shared/size.js";
9
- import { useInputAffix$u as N, useInputAffixElement$u as O } from "./InputAffix.js";
4
+ import { forwardRef as ge, useState as ye, useEffect as Se } from "react";
5
+ import { useAutoId$u as Ie } from "../../hooks/useAutoId.js";
6
+ import { useForwardedRef$u as Ce } from "../../hooks/useForwardedRef.js";
7
+ import { useInputOverflow$u as we } from "../../hooks/useInputOverflow.js";
8
+ import { isCompact$u as Pe, sizeClassName$u as Ae } from "../../shared/size.js";
9
+ import { useInputAffix$u as O, useInputAffixElement$u as T } from "./InputAffix.js";
10
10
  /* empty css */
11
11
  /* empty css */
12
- import { resolveValidation$u as Ae } from "../../vanilla/core/validation.js";
13
- const Ne = he((m, P) => {
12
+ import { getUiKitPrefix$u as t, kitCls$u as u } from "../../shared/uiKitDefaults.js";
13
+ import { resolveValidation$u as Ne } from "../../vanilla/core/validation.js";
14
+ const Oe = ge((v, V) => {
14
15
  const {
15
- "aria-label": T,
16
- "aria-labelledby": V,
17
- "aria-describedby": j,
18
- title: u = "",
19
- placeholder: z = "",
20
- defaultValue: k,
21
- value: c,
22
- id: R,
23
- name: B = "",
24
- onChange: x,
25
- onBlur: E,
26
- type: G = "text",
27
- inputMode: q,
28
- pattern: L,
29
- required: v = !1,
30
- disabled: r = !1,
31
- lineUp: f = !1,
32
- rowGap: D = 4,
33
- columnGap: F = 20,
16
+ "aria-label": j,
17
+ "aria-labelledby": k,
18
+ "aria-describedby": z,
19
+ title: f = "",
20
+ placeholder: R = "",
21
+ defaultValue: B,
22
+ value: p,
23
+ id: E,
24
+ name: G = "",
25
+ onChange: b,
26
+ onBlur: q,
27
+ type: L = "text",
28
+ inputMode: D,
29
+ pattern: F,
30
+ required: h = !1,
31
+ disabled: o = !1,
32
+ lineUp: d = !1,
33
+ rowGap: U = 4,
34
+ columnGap: K = 20,
34
35
  styleInputContainer: M,
35
- styleTitle: U,
36
- styleInput: W,
37
- className: H = "",
38
- tableView: b = !1,
39
- size: h,
40
- validationText: J = "Заполните поле",
41
- validationOn: K,
42
- error: Q,
43
- validationOnWithoutText: X,
44
- absoluteValidationText: Y,
45
- prefix: Z,
46
- prefixValue: _,
47
- defaultPrefixValue: ee,
48
- onPrefixChange: te,
49
- prefixPicker: ie = "auto",
50
- suffix: ae,
51
- suffixValue: ne,
52
- defaultSuffixValue: re,
53
- onSuffixChange: oe,
54
- suffixPicker: le = "auto"
55
- } = m, se = Object.prototype.hasOwnProperty.call(m, "value"), o = Ae({ error: Q, validationOn: K, validationOnWithoutText: X, validationText: J }), t = we(h, b), y = Ce(h, b), i = Se(R, "u-input-text"), g = N(Z, _, ee, te), S = N(ae, ne, re, oe), [l, ue] = $e(P);
56
- Ie(l, c, r);
57
- const $ = () => {
36
+ styleTitle: W,
37
+ styleInput: H,
38
+ className: J = "",
39
+ tableView: $ = !1,
40
+ size: g,
41
+ validationText: Q = "Заполните поле",
42
+ validationOn: X,
43
+ error: Y,
44
+ validationOnWithoutText: Z,
45
+ absoluteValidationText: _,
46
+ prefix: ee,
47
+ prefixValue: te,
48
+ defaultPrefixValue: ie,
49
+ onPrefixChange: ae,
50
+ prefixPicker: re = "auto",
51
+ suffix: ne,
52
+ suffixValue: oe,
53
+ defaultSuffixValue: le,
54
+ onSuffixChange: se,
55
+ suffixPicker: ce = "auto"
56
+ } = v, ue = Object.prototype.hasOwnProperty.call(v, "value"), l = Ne({ error: Y, validationOn: X, validationOnWithoutText: Z, validationText: Q }), i = Pe(g, $), y = Ae(g, $), a = Ie(E, u("input-text")), S = O(ee, te, ie, ae), I = O(ne, oe, le, se), [s, fe] = Ce(V);
57
+ we(s, p, o);
58
+ const C = () => {
58
59
  var e;
59
- return (e = l.current) == null ? void 0 : e.focus();
60
- }, a = O({ side: "prefix", inputId: i, ...g, onSelect: g.select, onPicked: $, picker: ie, disabled: r, compact: t }), n = O({ side: "suffix", inputId: i, ...S, onSelect: S.select, onPicked: $, picker: le, disabled: r, compact: t }), ce = !!(a.element || n.element), fe = be(i, u, v, o, {
61
- "aria-label": T,
62
- "aria-labelledby": V,
63
- "aria-describedby": [j, a.id, n.id].filter(Boolean).join(" ") || void 0
64
- }), I = ({ mode: e, width: me }) => {
65
- const A = t ? "var(--u-unit, 1px)" : "var(--u-preset-unit, 1px)", [xe, ve] = e === "menu" ? [0, t ? 8 : 16] : [t ? 4 : 8, t ? 6 : 10];
66
- return `calc(${xe} * ${A} + ${me}px + ${ve} * ${A})`;
67
- }, [s, de] = ye(null), pe = (e) => {
68
- de(e.target.selectionStart), x && x(e);
60
+ return (e = s.current) == null ? void 0 : e.focus();
61
+ }, r = T({ side: "prefix", inputId: a, ...S, onSelect: S.select, onPicked: C, picker: re, disabled: o, compact: i }), n = T({ side: "suffix", inputId: a, ...I, onSelect: I.select, onPicked: C, picker: ce, disabled: o, compact: i }), pe = !!(r.element || n.element), de = $e(a, f, h, l, {
62
+ "aria-label": j,
63
+ "aria-labelledby": k,
64
+ "aria-describedby": [z, r.id, n.id].filter(Boolean).join(" ") || void 0
65
+ }), w = ({ mode: e, width: ve }) => {
66
+ const N = i ? "var(--u-unit, 1px)" : `var(--${t()}-preset-unit, 1px)`, [be, he] = e === "menu" ? [0, i ? 8 : 16] : [i ? 4 : 8, i ? 6 : 10];
67
+ return `calc(${be} * ${N} + ${ve}px + ${he} * ${N})`;
68
+ }, [c, me] = ye(null), xe = (e) => {
69
+ me(e.target.selectionStart), b && b(e);
69
70
  };
70
- ge(() => {
71
- const e = l.current;
72
- s !== null && (e != null && e.matches(":focus")) && e.setSelectionRange(s, s);
73
- }, [l, s, c]);
74
- const w = (e) => typeof e == "number" ? `calc(${e} * var(--u-preset-unit, 1px))` : String(e), C = /* @__PURE__ */ d(
71
+ Se(() => {
72
+ const e = s.current;
73
+ c !== null && (e != null && e.matches(":focus")) && e.setSelectionRange(c, c);
74
+ }, [s, c, p]);
75
+ const P = (e) => typeof e == "number" ? `calc(${e} * var(--${t()}-preset-unit, 1px))` : String(e), A = /* @__PURE__ */ m(
75
76
  "input",
76
77
  {
77
- ...fe,
78
- className: `u-react-input u-input ${o.hasError ? "u-input-required" : ""}`,
79
- id: i,
80
- ref: ue,
81
- name: B,
78
+ ...de,
79
+ className: `${t()}-react-input ${t()}-input ${l.hasError ? u("input-required") : ""}`,
80
+ id: a,
81
+ ref: fe,
82
+ name: G,
82
83
  style: Object.assign(
83
84
  {},
84
- t && {
85
- height: "var(--u-compact-height)",
86
- fontSize: "var(--u-compact-font-size)",
87
- padding: "var(--u-compact-padding)",
85
+ i && {
86
+ height: `var(--${t()}-compact-height)`,
87
+ fontSize: `var(--${t()}-compact-font-size)`,
88
+ padding: `var(--${t()}-compact-padding)`,
88
89
  borderRadius: "8px"
89
90
  },
90
- a.element && { paddingLeft: I(a) },
91
- n.element && { paddingRight: I(n) },
92
- W
91
+ r.element && { paddingLeft: w(r) },
92
+ n.element && { paddingRight: w(n) },
93
+ H
93
94
  ),
94
- type: G,
95
- inputMode: q,
96
- pattern: L,
97
- placeholder: z,
98
- value: se ? c || "" : void 0,
99
- defaultValue: k,
100
- disabled: r,
101
- onChange: pe,
102
- onBlur: E
95
+ type: L,
96
+ inputMode: D,
97
+ pattern: F,
98
+ placeholder: R,
99
+ value: ue ? p || "" : void 0,
100
+ defaultValue: B,
101
+ disabled: o,
102
+ onChange: xe,
103
+ onBlur: q
103
104
  }
104
105
  );
105
- return /* @__PURE__ */ p("div", { className: `u-react-input-container${y ? ` ${y}` : ""} ${H}`, style: { position: "relative" }, children: [
106
- /* @__PURE__ */ p(
106
+ return /* @__PURE__ */ x("div", { className: `${t()}-react-input-container${y ? ` ${y}` : ""} ${J}`, style: { position: "relative" }, children: [
107
+ /* @__PURE__ */ x(
107
108
  "div",
108
109
  {
109
110
  style: Object.assign(
110
111
  {
111
112
  display: "flex",
112
- flexDirection: f ? "row" : "column",
113
- rowGap: f ? null : w(D),
114
- columnGap: f ? w(F) : null
113
+ flexDirection: d ? "row" : "column",
114
+ rowGap: d ? null : P(U),
115
+ columnGap: d ? P(K) : null
115
116
  },
116
117
  M
117
118
  ),
118
119
  children: [
119
- u && /* @__PURE__ */ d(
120
+ f && /* @__PURE__ */ m(
120
121
  "div",
121
122
  {
122
- id: `${i}-label`,
123
- className: `${v ? "u-required" : ""} u-react-input-title`,
123
+ id: `${a}-label`,
124
+ className: `${h ? u("required") : ""} ${t()}-react-input-title`,
124
125
  style: Object.assign(
125
126
  {
126
- color: "var(--u-field-title-color, #545454)",
127
- fontSize: "var(--u-field-label-size-main, calc(14 * var(--u-unit, 1px)))"
127
+ color: `var(--${t()}-field-title-color, #545454)`,
128
+ fontSize: `var(--${t()}-field-label-size-main, calc(14 * var(--u-unit, 1px)))`
128
129
  },
129
- U
130
+ W
130
131
  ),
131
- children: u
132
+ children: f
132
133
  }
133
134
  ),
134
- ce ? /* @__PURE__ */ p("div", { className: "u-react-input-affixed", children: [
135
- a.element,
136
- C,
135
+ pe ? /* @__PURE__ */ x("div", { className: u("react-input-affixed"), children: [
136
+ r.element,
137
+ A,
137
138
  n.element
138
- ] }) : C
139
+ ] }) : A
139
140
  ]
140
141
  }
141
142
  ),
142
- o.showText && /* @__PURE__ */ d("h5", { id: `${i}-error`, className: "h5 clr-red-main", style: Y ? { position: "absolute", bottom: "calc(-20 * var(--u-unit, 1px))" } : { position: "relative", marginTop: "calc(4 * var(--u-unit, 1px))" }, children: o.text })
143
+ l.showText && /* @__PURE__ */ m("h5", { id: `${a}-error`, className: "h5 clr-red-main", style: _ ? { position: "absolute", bottom: "calc(-20 * var(--u-unit, 1px))" } : { position: "relative", marginTop: "calc(4 * var(--u-unit, 1px))" }, children: l.text })
143
144
  ] });
144
145
  });
145
- Ne.displayName = "InputText";
146
- export { Ne as InputText$u };
146
+ Oe.displayName = "InputText";
147
+ export { Oe as InputText$u };
@@ -1 +1 @@
1
- {"version":3,"file":"InputTime.d.ts","sourceRoot":"","sources":["../../../src/components/InputTime/InputTime.tsx"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,yDAAyD,CAAC;AACjE,OAAO,0BAA0B,CAAA;AACjC,OAAO,yBAAyB,CAAC;AAQjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAS7D,eAAO,MAAM,SAAS,GAAI,+aA+BvB,mBAAmB,4CA2erB,CAAC"}
1
+ {"version":3,"file":"InputTime.d.ts","sourceRoot":"","sources":["../../../src/components/InputTime/InputTime.tsx"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,yDAAyD,CAAC;AACjE,OAAO,0BAA0B,CAAA;AACjC,OAAO,yBAAyB,CAAC;AAQjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAU7D,eAAO,MAAM,SAAS,GAAI,+aA+BvB,mBAAmB,4CA2erB,CAAC"}