urfu-ui-kit-react 2.1.7-next.4 → 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 (150) 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.js +232 -232
  10. package/dist/components/Calendar/CalendarSelect.d.ts.map +1 -1
  11. package/dist/components/Calendar/CalendarSelect.js +41 -40
  12. package/dist/components/Card/Card.d.ts.map +1 -1
  13. package/dist/components/Card/Card.js +59 -58
  14. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  15. package/dist/components/Checkbox/Checkbox.js +20 -19
  16. package/dist/components/ColumnSettings/ColumnSettings.d.ts.map +1 -1
  17. package/dist/components/ColumnSettings/ColumnSettings.js +112 -111
  18. package/dist/components/ConfirmModal/ConfirmModal.d.ts.map +1 -1
  19. package/dist/components/ConfirmModal/ConfirmModal.js +30 -29
  20. package/dist/components/Drawer/Drawer.js +57 -57
  21. package/dist/components/ErrorScreen/ErrorScreen.d.ts.map +1 -1
  22. package/dist/components/ErrorScreen/ErrorScreen.js +151 -150
  23. package/dist/components/ErrorScreen/ErrorScreenIllustration.d.ts.map +1 -1
  24. package/dist/components/ErrorScreen/ErrorScreenIllustration.js +35 -34
  25. package/dist/components/FormField/FormField.d.ts.map +1 -1
  26. package/dist/components/FormField/FormField.js +30 -29
  27. package/dist/components/Icon/Icon.d.ts.map +1 -1
  28. package/dist/components/Icon/Icon.js +17 -16
  29. package/dist/components/InfiniteScroll/InfiniteScroll.d.ts.map +1 -1
  30. package/dist/components/InfiniteScroll/InfiniteScroll.js +23 -22
  31. package/dist/components/InputExpandTextarea/InputExpandTextarea.d.ts.map +1 -1
  32. package/dist/components/InputExpandTextarea/InputExpandTextarea.js +88 -87
  33. package/dist/components/InputFile/InputFile.d.ts.map +1 -1
  34. package/dist/components/InputFile/InputFile.js +99 -98
  35. package/dist/components/InputNumber/InputNumber.d.ts.map +1 -1
  36. package/dist/components/InputNumber/InputNumber.js +112 -111
  37. package/dist/components/InputText/InputAffix.d.ts.map +1 -1
  38. package/dist/components/InputText/InputAffix.js +69 -68
  39. package/dist/components/InputText/InputText.d.ts.map +1 -1
  40. package/dist/components/InputText/InputText.js +108 -107
  41. package/dist/components/InputTime/InputTime.d.ts.map +1 -1
  42. package/dist/components/InputTime/InputTime.js +202 -201
  43. package/dist/components/InputTime/InputTimeDropdown.d.ts.map +1 -1
  44. package/dist/components/InputTime/InputTimeDropdown.js +21 -20
  45. package/dist/components/Menu/Menu.d.ts.map +1 -1
  46. package/dist/components/Menu/Menu.js +58 -57
  47. package/dist/components/Message/Message.d.ts.map +1 -1
  48. package/dist/components/Message/Message.js +19 -18
  49. package/dist/components/Modal/Modal.js +66 -66
  50. package/dist/components/Modal/useModalTitleClearance.d.ts.map +1 -1
  51. package/dist/components/Modal/useModalTitleClearance.js +34 -33
  52. package/dist/components/Multiselect/Multiselect.js +222 -222
  53. package/dist/components/Notification/Notification.js +90 -90
  54. package/dist/components/OfflineBanner/OfflineBanner.d.ts.map +1 -1
  55. package/dist/components/OfflineBanner/OfflineBanner.js +40 -37
  56. package/dist/components/Pagination/Pagination.d.ts.map +1 -1
  57. package/dist/components/Pagination/Pagination.js +59 -58
  58. package/dist/components/Preloader/Preloader.d.ts.map +1 -1
  59. package/dist/components/Preloader/Preloader.js +28 -27
  60. package/dist/components/Radio/Radio.d.ts.map +1 -1
  61. package/dist/components/Radio/Radio.js +21 -20
  62. package/dist/components/Search/Search.d.ts.map +1 -1
  63. package/dist/components/Search/Search.js +33 -32
  64. package/dist/components/SearchSelect/SearchSelect.js +178 -178
  65. package/dist/components/SearchSelect/SearchSelectOption.d.ts.map +1 -1
  66. package/dist/components/SearchSelect/SearchSelectOption.js +21 -20
  67. package/dist/components/Select/MobileOptionSheet.d.ts.map +1 -1
  68. package/dist/components/Select/MobileOptionSheet.js +65 -64
  69. package/dist/components/Select/Select.js +184 -184
  70. package/dist/components/Skeleton/Skeleton.d.ts.map +1 -1
  71. package/dist/components/Skeleton/Skeleton.js +26 -25
  72. package/dist/components/Status/Status.d.ts.map +1 -1
  73. package/dist/components/Status/Status.js +36 -35
  74. package/dist/components/StickyActionBar/StickyActionBar.d.ts.map +1 -1
  75. package/dist/components/StickyActionBar/StickyActionBar.js +36 -35
  76. package/dist/components/Switch/Switch.d.ts.map +1 -1
  77. package/dist/components/Switch/Switch.js +19 -18
  78. package/dist/components/Table/Filter/DefaultInput.d.ts.map +1 -1
  79. package/dist/components/Table/Filter/DefaultInput.js +12 -11
  80. package/dist/components/Table/Filter/Filter.d.ts.map +1 -1
  81. package/dist/components/Table/Filter/Filter.js +99 -98
  82. package/dist/components/Table/Filter/FilterBooleanBox.d.ts.map +1 -1
  83. package/dist/components/Table/Filter/FilterBooleanBox.js +7 -6
  84. package/dist/components/Table/Filter/FilterBoxShell.js +48 -48
  85. package/dist/components/Table/Filter/FilterDateBox.d.ts.map +1 -1
  86. package/dist/components/Table/Filter/FilterDateBox.js +65 -64
  87. package/dist/components/Table/Filter/FilterSortIndicator.d.ts.map +1 -1
  88. package/dist/components/Table/Filter/FilterSortIndicator.js +8 -7
  89. package/dist/components/Table/Filter/SelectFilter.js +53 -53
  90. package/dist/components/Table/Filter/TableFilterOptions.d.ts.map +1 -1
  91. package/dist/components/Table/Filter/TableFilterOptions.js +141 -140
  92. package/dist/components/Table/Filter/TableFilterSortButton.d.ts.map +1 -1
  93. package/dist/components/Table/Filter/TableFilterSortButton.js +10 -9
  94. package/dist/components/Table/Filter/useVirtualOptionWindow.d.ts.map +1 -1
  95. package/dist/components/Table/Filter/useVirtualOptionWindow.js +9 -8
  96. package/dist/components/Table/Skeleton/createSkeletonColumns.d.ts.map +1 -1
  97. package/dist/components/Table/Skeleton/createSkeletonColumns.js +9 -8
  98. package/dist/components/Table/Table.d.ts.map +1 -1
  99. package/dist/components/Table/Table.helpers.d.ts.map +1 -1
  100. package/dist/components/Table/Table.helpers.js +31 -30
  101. package/dist/components/Table/Table.js +253 -252
  102. package/dist/components/Table/TableHead.d.ts.map +1 -1
  103. package/dist/components/Table/TableHead.js +92 -91
  104. package/dist/components/Table/TableMobileCard.d.ts.map +1 -1
  105. package/dist/components/Table/TableMobileCard.js +121 -120
  106. package/dist/components/Table/TableMobileFilters.d.ts.map +1 -1
  107. package/dist/components/Table/TableMobileFilters.js +28 -27
  108. package/dist/components/Table/TableMobileView.d.ts.map +1 -1
  109. package/dist/components/Table/TableMobileView.js +178 -177
  110. package/dist/components/Table/TableRow.d.ts.map +1 -1
  111. package/dist/components/Table/TableRow.js +59 -58
  112. package/dist/components/Table/useTableColumnPinning.d.ts +2 -917
  113. package/dist/components/Table/useTableColumnPinning.d.ts.map +1 -1
  114. package/dist/components/Table/useTableColumnPinning.js +21 -20
  115. package/dist/components/Tabs/Tabs.d.ts.map +1 -1
  116. package/dist/components/Tabs/Tabs.js +102 -101
  117. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  118. package/dist/components/Textarea/Textarea.js +70 -69
  119. package/dist/components/Tooltip/Tooltip.js +106 -106
  120. package/dist/components/TreeView/TreeView.js +183 -183
  121. package/dist/components/VirtualList/VirtualList.d.ts.map +1 -1
  122. package/dist/components/VirtualList/VirtualList.js +42 -41
  123. package/dist/dev/index.js +1 -1
  124. package/dist/hooks/useAutoId.d.ts.map +1 -1
  125. package/dist/hooks/useAutoId.js +7 -6
  126. package/dist/hooks/useSelectEngine.d.ts.map +1 -1
  127. package/dist/hooks/useSelectEngine.js +31 -30
  128. package/dist/index.d.ts +2 -1
  129. package/dist/index.d.ts.map +1 -1
  130. package/dist/responsive/uiKitResponsive.d.ts +6 -0
  131. package/dist/responsive/uiKitResponsive.d.ts.map +1 -1
  132. package/dist/responsive/uiKitResponsive.js +27 -26
  133. package/dist/shared/kitCopy.js +1 -1
  134. package/dist/shared/optionStateColors.d.ts +3 -2
  135. package/dist/shared/optionStateColors.d.ts.map +1 -1
  136. package/dist/shared/optionStateColors.js +9 -4
  137. package/dist/shared/popupTransition.d.ts.map +1 -1
  138. package/dist/shared/popupTransition.js +7 -6
  139. package/dist/shared/sheetTitle.d.ts +2 -1
  140. package/dist/shared/sheetTitle.d.ts.map +1 -1
  141. package/dist/shared/size.d.ts.map +1 -1
  142. package/dist/shared/size.js +3 -2
  143. package/dist/shared/uiKitDefaults.d.ts +21 -0
  144. package/dist/shared/uiKitDefaults.d.ts.map +1 -1
  145. package/dist/shared/uiKitDefaults.js +32 -18
  146. package/dist/style.shell.lk.css +53 -0
  147. package/dist/urfu-ui-kit-react.js +27 -26
  148. package/dist/vanilla/core/describeError.js +1 -1
  149. package/dist/vanilla/core/sheetTitle.js +7 -7
  150. package/package.json +3 -1
@@ -1,37 +1,38 @@
1
- import { jsxs as m, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  /* empty css */
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,
5
+ import { Button$u as x } from "../Button/Button.js";
6
+ import { Tooltip$u as N } from "../Tooltip/Tooltip.js";
7
+ import { getUiKitPrefix$u as r, kitCls$u as i } from "../../shared/uiKitDefaults.js";
8
+ import { resolveValidation$u as v } from "../../vanilla/core/validation.js";
9
+ const O = ({
10
+ title: l,
11
+ tooltip: a,
12
+ required: d = !1,
13
+ error: p,
14
+ inline: _ = !1,
15
+ gap: o,
16
+ hint: s,
17
+ htmlFor: m,
17
18
  className: u = "",
18
- style: p,
19
- children: _
19
+ style: $,
20
+ children: h
20
21
  }) => {
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(
22
+ const t = v({ error: p }), n = d ? ` ${r()}-required` : "", f = typeof o == "number" ? `calc(${o} * var(--${r()}-preset-unit, 1px))` : o;
23
+ return /* @__PURE__ */ c(
23
24
  "div",
24
25
  {
25
- className: `u-form-field${f ? " u-form-field--inline" : ""} ${u}`.trim(),
26
- style: { ...n ? { gap: n } : null, ...p },
26
+ className: `${r()}-form-field${_ ? ` ${r()}-form-field--inline` : ""} ${u}`.trim(),
27
+ style: { ...f ? { gap: f } : null, ...$ },
27
28
  children: [
28
- r && o ? (
29
+ l && a ? (
29
30
  // «?» стоит рядом с подписью, а не внутри неё: иначе текст подсказки
30
31
  // войдёт в имя поля для читалки экрана. Звёздочка — у подписи, перед «?».
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,
32
+ /* @__PURE__ */ c("div", { className: i("form-field__title-row"), children: [
33
+ /* @__PURE__ */ e("label", { className: `${r()}-form-field__title${n}`, htmlFor: m, children: l }),
34
+ /* @__PURE__ */ e("span", { className: i("form-field__help"), children: /* @__PURE__ */ e(N, { tooltipText: a, position: "top", portalOn: !0, children: /* @__PURE__ */ e(
35
+ x,
35
36
  {
36
37
  variant: "text-table",
37
38
  size: "small",
@@ -42,12 +43,12 @@ const w = ({
42
43
  }
43
44
  ) }) })
44
45
  ] })
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 })
46
+ ) : l && /* @__PURE__ */ e("label", { className: `${r()}-form-field__title${n}`, htmlFor: m, children: l }),
47
+ /* @__PURE__ */ e("div", { className: i("form-field__control"), children: h }),
48
+ t.showText && /* @__PURE__ */ e("span", { className: i("form-field__error"), children: t.text }),
49
+ !t.hasError && s && /* @__PURE__ */ e("span", { className: i("form-field__hint"), children: s })
49
50
  ]
50
51
  }
51
52
  );
52
53
  };
53
- export { w as FormField$u };
54
+ export { O as FormField$u };
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,mDAAmD,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,eAAO,MAAM,IAAI,GAAI,oEAOlB,cAAc,4CAgChB,CAAC"}
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,mDAAmD,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAG9C,eAAO,MAAM,IAAI,GAAI,oEAOlB,cAAc,4CAgChB,CAAC"}
@@ -1,32 +1,33 @@
1
- import { jsx as m } from "react/jsx-runtime";
1
+ import { jsx as u } from "react/jsx-runtime";
2
2
  /* empty css */
3
3
  /* empty css */
4
- const $ = ({
5
- name: e = "",
6
- size: c = "",
7
- color: a = "",
8
- className: u = "",
9
- rotate: o,
4
+ import { getUiKitPrefix$u as o } from "../../shared/uiKitDefaults.js";
5
+ const x = ({
6
+ name: c = "",
7
+ size: a = "",
8
+ color: m = "",
9
+ className: p = "",
10
+ rotate: i,
10
11
  "aria-label": r
11
12
  }) => {
12
13
  const l = (t) => {
13
14
  if (typeof t == "number") return `calc(${t} * var(--u-unit, 1px))`;
14
- const i = String(t).trim().match(/^(-?\d+(?:\.\d+)?)px$/);
15
- return i ? `calc(${i[1]} * var(--u-preset-unit, 1px))` : String(t);
16
- }, n = typeof o == "number";
17
- return /* @__PURE__ */ m(
15
+ const e = String(t).trim().match(/^(-?\d+(?:\.\d+)?)px$/);
16
+ return e ? `calc(${e[1]} * var(--${o()}-preset-unit, 1px))` : String(t);
17
+ }, n = typeof i == "number";
18
+ return /* @__PURE__ */ u(
18
19
  "i",
19
20
  {
20
21
  style: {
21
- fontSize: l(c),
22
- color: a,
23
- ...n ? { transform: `rotate(${o}deg)` } : null
22
+ fontSize: l(a),
23
+ color: m,
24
+ ...n ? { transform: `rotate(${i}deg)` } : null
24
25
  },
25
- className: `u-icon icon-${e}${n ? " u-react-icon-rotatable" : ""} ${u}`,
26
+ className: `${o()}-icon icon-${c}${n ? ` ${o()}-react-icon-rotatable` : ""} ${p}`,
26
27
  role: r ? "img" : void 0,
27
28
  "aria-label": r || void 0,
28
29
  "aria-hidden": r ? void 0 : !0
29
30
  }
30
31
  );
31
32
  };
32
- export { $ as Icon$u };
33
+ export { x as Icon$u };
@@ -1 +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"}
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;AAIjG,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"}
@@ -1,27 +1,28 @@
1
- import { jsxs as v, jsx as i } from "react/jsx-runtime";
1
+ import { jsxs as _, jsx as n } from "react/jsx-runtime";
2
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 = ({
3
+ import { useState as h, useRef as x, useEffect as d } from "react";
4
+ import { useInfiniteScroll$u as N } from "../../hooks/useInfiniteScroll.js";
5
+ import { Skeleton$u as S } from "../Skeleton/Skeleton.js";
6
+ import { kitCls$u as r } from "../../shared/uiKitDefaults.js";
7
+ const j = (e, s) => `Загружено ещё ${e}${s ? "" : ". Это все записи"}`, E = ({
7
8
  itemCount: e,
8
- loader: r,
9
- endMessage: u,
10
- loadingLabel: t = "Загрузка…",
11
- className: d,
12
- ...l
9
+ loader: s,
10
+ endMessage: m,
11
+ loadingLabel: l = "Загрузка…",
12
+ className: u,
13
+ ...c
13
14
  }) => {
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 })
15
+ const { sentinelRef: p } = N(c), { loading: i, hasMore: o } = c, [v, a] = h(""), f = x(e);
16
+ return d(() => {
17
+ i && a(l);
18
+ }, [i, l]), d(() => {
19
+ const t = f.current;
20
+ f.current = e, t !== void 0 && e !== void 0 && e > t && a(j(e - t, o));
21
+ }, [e, o]), /* @__PURE__ */ _("div", { className: [r("infinite-scroll"), u].filter(Boolean).join(" "), children: [
22
+ /* @__PURE__ */ n("div", { ref: p, className: r("infinite-scroll__sentinel"), "aria-hidden": "true" }),
23
+ i && /* @__PURE__ */ n("div", { className: r("infinite-scroll__loader"), children: s ?? /* @__PURE__ */ n(S, { variant: "text", count: 2 }) }),
24
+ !o && !i && m,
25
+ /* @__PURE__ */ n("span", { className: r("infinite-scroll__status"), role: "status", "aria-live": "polite", children: v })
25
26
  ] });
26
27
  };
27
- export { A as InfiniteScroll$u };
28
+ export { E as InfiniteScroll$u };
@@ -1 +1 @@
1
- {"version":3,"file":"InputExpandTextarea.d.ts","sourceRoot":"","sources":["../../../src/components/InputExpandTextarea/InputExpandTextarea.tsx"],"names":[],"mappings":"AACA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,oEAAoE,CAAC;AAC5E,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAA;AAM3E,eAAO,MAAM,mBAAmB,GAAI,+XA4BjC,6BAA6B,4CAmJ/B,CAAA"}
1
+ {"version":3,"file":"InputExpandTextarea.d.ts","sourceRoot":"","sources":["../../../src/components/InputExpandTextarea/InputExpandTextarea.tsx"],"names":[],"mappings":"AACA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,oEAAoE,CAAC;AAC5E,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAA;AAO3E,eAAO,MAAM,mBAAmB,GAAI,+XA4BjC,6BAA6B,4CAmJ/B,CAAA"}
@@ -1,144 +1,145 @@
1
- import { jsxs as o, jsx as f } from "react/jsx-runtime";
2
- import { getFieldAccessibility$u as W } from "../../shared/fieldAccessibility.js";
1
+ import { jsxs as l, jsx as v } from "react/jsx-runtime";
2
+ import { getFieldAccessibility$u as Z } from "../../shared/fieldAccessibility.js";
3
3
  /* empty css */
4
4
  /* empty css */
5
- import { useState as X, useRef as Z, useCallback as U, useEffect as v } from "react";
6
- import { useAutoId$u as ee } from "../../hooks/useAutoId.js";
7
- import { sizeClassName$u as te, isCompact$u as ie } from "../../shared/size.js";
8
- import { resolveValidation$u as re } from "../../vanilla/core/validation.js";
9
- const me = ({
10
- "aria-label": E,
11
- "aria-labelledby": H,
12
- "aria-describedby": A,
13
- title: l = "",
14
- placeholder: T = "",
15
- id: M,
16
- onChange: x,
17
- required: h = !1,
18
- lineUp: s = !1,
19
- rowGap: O = 4,
20
- columnGap: R = 20,
21
- styleInputContainer: _,
22
- styleTitle: F,
23
- styleInput: G,
24
- className: I = "",
25
- tableView: b = !1,
26
- size: g,
27
- validationText: k = "Заполните поле",
28
- validationOn: D,
5
+ import { useState as U, useRef as ee, useCallback as te, useEffect as x } from "react";
6
+ import { useAutoId$u as ie } from "../../hooks/useAutoId.js";
7
+ import { sizeClassName$u as re, isCompact$u as ne } from "../../shared/size.js";
8
+ import { getUiKitPrefix$u as t, kitCls$u as h } from "../../shared/uiKitDefaults.js";
9
+ import { resolveValidation$u as ae } from "../../vanilla/core/validation.js";
10
+ const xe = ({
11
+ "aria-label": A,
12
+ "aria-labelledby": T,
13
+ "aria-describedby": M,
14
+ title: s = "",
15
+ placeholder: O = "",
16
+ id: R,
17
+ onChange: b,
18
+ required: g = !1,
19
+ lineUp: c = !1,
20
+ rowGap: _ = 4,
21
+ columnGap: k = 20,
22
+ styleInputContainer: F,
23
+ styleTitle: G,
24
+ styleInput: I,
25
+ className: D = "",
26
+ tableView: $ = !1,
27
+ size: y,
28
+ validationText: K = "Заполните поле",
29
+ validationOn: P,
29
30
  error: V,
30
31
  absoluteValidationText: Y,
31
- value: c,
32
+ value: d,
32
33
  minHeight: u,
33
- maxHeight: d,
34
- maxLength: t,
34
+ maxHeight: p,
35
+ maxLength: i,
35
36
  counterLayout: q = "flow",
36
37
  disabled: B
37
38
  }) => {
38
- const r = re({ error: V, validationOn: D, validationText: k }), J = ie(g, b), y = te(g, b), n = ee(M, "u-input-expand"), K = W(n, l, h, r, {
39
- "aria-label": E,
40
- "aria-labelledby": H,
41
- "aria-describedby": A
42
- }), [p, L] = X(null), a = Z(null), w = (e) => typeof e == "number" ? `calc(${e} * var(--u-preset-unit, 1px))` : String(e), $ = (e) => {
39
+ const n = ae({ error: V, validationOn: P, validationText: K }), J = ne(y, $), w = re(y, $), a = ie(R, h("input-expand")), L = Z(a, s, g, n, {
40
+ "aria-label": A,
41
+ "aria-labelledby": T,
42
+ "aria-describedby": M
43
+ }), [m, Q] = U(null), o = ee(null), S = (e) => typeof e == "number" ? `calc(${e} * var(--${t()}-preset-unit, 1px))` : String(e), C = (e) => {
43
44
  if (e == null || e === "") return;
44
45
  if (typeof e == "number") return `calc(${e} * var(--u-unit, 1px))`;
45
- const j = String(e).trim().match(/^(-?\d+(?:\.\d+)?)px$/);
46
- return j ? `calc(${j[1]} * var(--u-unit, 1px))` : e;
47
- }, i = U(() => {
48
- const e = a.current;
46
+ const H = String(e).trim().match(/^(-?\d+(?:\.\d+)?)px$/);
47
+ return H ? `calc(${H[1]} * var(--u-unit, 1px))` : e;
48
+ }, r = te(() => {
49
+ const e = o.current;
49
50
  if (e) {
50
- if (u === void 0 && d === void 0) {
51
+ if (u === void 0 && p === void 0) {
51
52
  e.style.height = "5px", e.style.height = e.scrollHeight + 2 + "px";
52
53
  return;
53
54
  }
54
55
  e.style.height = "0px", e.style.height = `${e.scrollHeight + 2}px`;
55
56
  }
56
- }, [d, u]);
57
- v(() => {
58
- const e = a.current;
59
- e && e.setSelectionRange(p, p);
60
- }, [a, p, c]);
61
- const P = (e) => {
62
- i(), L(e.target.selectionStart), x && x(e);
57
+ }, [p, u]);
58
+ x(() => {
59
+ const e = o.current;
60
+ e && e.setSelectionRange(m, m);
61
+ }, [o, m, d]);
62
+ const W = (e) => {
63
+ r(), Q(e.target.selectionStart), b && b(e);
63
64
  };
64
- v(() => {
65
- i();
66
- }, [i, c]), v(() => {
65
+ x(() => {
66
+ r();
67
+ }, [r, d]), x(() => {
67
68
  if (!(typeof window > "u"))
68
- return window.addEventListener("resize", i), () => window.removeEventListener("resize", i);
69
- }, [i]);
70
- const S = c || "", N = S.length, m = typeof t == "number" && Number.isFinite(t) && t >= 0, Q = m && N >= t, z = $(u), C = $(d);
71
- return /* @__PURE__ */ o("div", { className: `${I}${y ? ` ${y}` : ""}`, style: { position: "relative" }, children: [
72
- /* @__PURE__ */ o(
69
+ return window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
70
+ }, [r]);
71
+ const N = d || "", z = N.length, f = typeof i == "number" && Number.isFinite(i) && i >= 0, X = f && z >= i, j = C(u), E = C(p);
72
+ return /* @__PURE__ */ l("div", { className: `${D}${w ? ` ${w}` : ""}`, style: { position: "relative" }, children: [
73
+ /* @__PURE__ */ l(
73
74
  "div",
74
75
  {
75
76
  style: Object.assign(
76
77
  {
77
78
  display: "flex",
78
- flexDirection: s ? "row" : "column",
79
- rowGap: s ? null : w(O),
80
- columnGap: s ? w(R) : null
79
+ flexDirection: c ? "row" : "column",
80
+ rowGap: c ? null : S(_),
81
+ columnGap: c ? S(k) : null
81
82
  },
82
- _
83
+ F
83
84
  ),
84
85
  children: [
85
- l && /* @__PURE__ */ f(
86
+ s && /* @__PURE__ */ v(
86
87
  "div",
87
88
  {
88
- id: `${n}-label`,
89
- className: `${h ? "u-required" : ""} u-react-input-title`,
89
+ id: `${a}-label`,
90
+ className: `${g ? h("required") : ""} ${t()}-react-input-title`,
90
91
  style: Object.assign(
91
92
  {
92
- color: "var(--u-field-title-color, #545454)",
93
- fontSize: "var(--u-field-label-size-main, calc(14 * var(--u-unit, 1px)))"
93
+ color: `var(--${t()}-field-title-color, #545454)`,
94
+ fontSize: `var(--${t()}-field-label-size-main, calc(14 * var(--u-unit, 1px)))`
94
95
  },
95
- F
96
+ G
96
97
  ),
97
- children: l
98
+ children: s
98
99
  }
99
100
  ),
100
- /* @__PURE__ */ o("div", { className: `u-input-expand-textarea-field${q === "gap" && !r.showText ? " u-input-expand-textarea-field--counter-gap" : ""}`, children: [
101
- /* @__PURE__ */ f(
101
+ /* @__PURE__ */ l("div", { className: `${t()}-input-expand-textarea-field${q === "gap" && !n.showText ? ` ${t()}-input-expand-textarea-field--counter-gap` : ""}`, children: [
102
+ /* @__PURE__ */ v(
102
103
  "textarea",
103
104
  {
104
- ...K,
105
+ ...L,
105
106
  disabled: B,
106
- className: "u-textarea input_expand",
107
+ className: `${t()}-textarea input_expand`,
107
108
  style: Object.assign(
108
109
  {
109
- height: z || C ? "auto" : void 0,
110
+ height: j || E ? "auto" : void 0,
110
111
  lineHeight: "calc(18 * var(--u-unit, 1px))",
111
- minHeight: z,
112
- maxHeight: C,
112
+ minHeight: j,
113
+ maxHeight: E,
113
114
  overflowY: "auto"
114
115
  },
115
116
  J && {
116
- minHeight: "var(--u-compact-height)",
117
- fontSize: "var(--u-compact-font-size)",
117
+ minHeight: `var(--${t()}-compact-height)`,
118
+ fontSize: `var(--${t()}-compact-font-size)`,
118
119
  lineHeight: 1,
119
- padding: "var(--u-compact-padding)",
120
+ padding: `var(--${t()}-compact-padding)`,
120
121
  borderRadius: "8px"
121
122
  },
122
- G
123
+ I
123
124
  ),
124
- maxLength: m ? t : void 0,
125
- placeholder: T,
126
- ref: a,
127
- value: S,
128
- onChange: P,
129
- id: `input_expand${n}`
125
+ maxLength: f ? i : void 0,
126
+ placeholder: O,
127
+ ref: o,
128
+ value: N,
129
+ onChange: W,
130
+ id: `input_expand${a}`
130
131
  }
131
132
  ),
132
- m && /* @__PURE__ */ o("div", { className: "u-input-expand-textarea-counter", style: Q ? { color: "var(--u-color-error, #ef302b)" } : void 0, children: [
133
- N,
133
+ f && /* @__PURE__ */ l("div", { className: h("input-expand-textarea-counter"), style: X ? { color: `var(--${t()}-color-error, #ef302b)` } : void 0, children: [
134
+ z,
134
135
  "/",
135
- t
136
+ i
136
137
  ] })
137
138
  ] })
138
139
  ]
139
140
  }
140
141
  ),
141
- r.showText && /* @__PURE__ */ f("h5", { id: `${n}-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: r.text })
142
+ n.showText && /* @__PURE__ */ v("h5", { id: `${a}-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: n.text })
142
143
  ] });
143
144
  };
144
- export { me as InputExpandTextarea$u };
145
+ export { xe as InputExpandTextarea$u };
@@ -1 +1 @@
1
- {"version":3,"file":"InputFile.d.ts","sourceRoot":"","sources":["../../../src/components/InputFile/InputFile.tsx"],"names":[],"mappings":"AACA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,yDAAyD,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGxD,eAAO,MAAM,SAAS,GAAI,uSA0BvB,mBAAmB,GAAG;IACrB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;CACvD,4CAoPA,CAAA"}
1
+ {"version":3,"file":"InputFile.d.ts","sourceRoot":"","sources":["../../../src/components/InputFile/InputFile.tsx"],"names":[],"mappings":"AACA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,yDAAyD,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAIxD,eAAO,MAAM,SAAS,GAAI,uSA0BvB,mBAAmB,GAAG;IACrB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;CACvD,4CAoPA,CAAA"}