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,237 +1,237 @@
1
- import { jsxs as u, jsx as o, Fragment as Ne } from "react/jsx-runtime";
2
- import { getFieldAccessibility$u as we } from "../../shared/fieldAccessibility.js";
3
- import { useRef as $e, useMemo as je, useState as F, useEffect as Pe } from "react";
1
+ import { jsxs as h, jsx as c, Fragment as Pe } from "react/jsx-runtime";
2
+ import { getFieldAccessibility$u as je } from "../../shared/fieldAccessibility.js";
3
+ import { useRef as ze, useMemo as Te, useState as Y, useEffect as Ce } from "react";
4
4
  /* empty css */
5
5
  /* empty css */
6
6
  /* empty css */
7
7
  /* empty css */
8
8
  /* empty css */
9
9
  /* empty css */
10
- import { createPortal as ze } from "react-dom";
11
- import { useSelectEngine$u as Te } from "../../hooks/useSelectEngine.js";
12
- import { OPTION_STATE_COLORS$u as G } from "../../shared/optionStateColors.js";
13
- import { isSameOptionValue$u as k, getOptionKeys$u as Re } from "../../shared/optionValue.js";
14
- import { getPopupTransitionStyle$u as _ } from "../../shared/popupTransition.js";
15
- import { sizeClassName$u as De, isCompact$u as Ee } from "../../shared/size.js";
16
- import { Icon$u as He } from "../Icon/Icon.js";
17
- import { useMobilePicker$u as Ce } from "../../hooks/useMobilePicker.js";
18
- import { MobileOptionSheet$u as Ae } from "./MobileOptionSheet.js";
19
- import { getPortalScopeProps$u as Ke } from "../../shared/uiKitDefaults.js";
20
- import { resolveValidation$u as Le } from "../../vanilla/core/validation.js";
21
- import { resolveSheetTitle$u as Me } from "../../vanilla/core/sheetTitle.js";
22
- const at = ({
23
- "aria-label": N,
24
- "aria-labelledby": w,
25
- "aria-describedby": Y,
26
- title: p = "",
27
- required: $ = !1,
28
- options: i,
29
- styleSelectContainer: q,
30
- styleTitle: J,
31
- styleSelect: j,
32
- lineUp: y = !1,
33
- rowGap: Q = 4,
34
- columnGap: X = 20,
35
- placeholder: P = "Не выбрано",
36
- value: t,
37
- isClearable: z,
38
- onChange: m,
39
- className: Z,
40
- tableView: h = !1,
41
- size: T,
42
- validationText: V = "Заполните поле",
43
- validationOn: U,
44
- error: ee,
45
- absoluteValidationText: te,
46
- disabled: n,
47
- portalOn: oe,
48
- noScroll: v,
49
- variant: ce = "field",
50
- id: re,
51
- mobilePicker: ie
10
+ import { createPortal as Re } from "react-dom";
11
+ import { useSelectEngine$u as De } from "../../hooks/useSelectEngine.js";
12
+ import { OPTION_STATE_COLORS$u as q } from "../../shared/optionStateColors.js";
13
+ import { isSameOptionValue$u as N, getOptionKeys$u as Ee } from "../../shared/optionValue.js";
14
+ import { getPopupTransitionStyle$u as J } from "../../shared/popupTransition.js";
15
+ import { sizeClassName$u as He, isCompact$u as Ke } from "../../shared/size.js";
16
+ import { Icon$u as Ae } from "../Icon/Icon.js";
17
+ import { useMobilePicker$u as Le } from "../../hooks/useMobilePicker.js";
18
+ import { MobileOptionSheet$u as Me } from "./MobileOptionSheet.js";
19
+ import { getUiKitPrefix$u as t, kitCls$u as r, kitClasses$u as w, getPortalScopeProps$u as Be } from "../../shared/uiKitDefaults.js";
20
+ import { resolveValidation$u as We } from "../../vanilla/core/validation.js";
21
+ import { resolveSheetTitle$u as Fe } from "../../vanilla/core/sheetTitle.js";
22
+ const pt = ({
23
+ "aria-label": P,
24
+ "aria-labelledby": j,
25
+ "aria-describedby": Q,
26
+ title: b = "",
27
+ required: z = !1,
28
+ options: l,
29
+ styleSelectContainer: X,
30
+ styleTitle: Z,
31
+ styleSelect: T,
32
+ lineUp: $ = !1,
33
+ rowGap: U = 4,
34
+ columnGap: V = 20,
35
+ placeholder: C = "Не выбрано",
36
+ value: o,
37
+ isClearable: R,
38
+ onChange: u,
39
+ className: ee,
40
+ tableView: f = !1,
41
+ size: D,
42
+ validationText: te = "Заполните поле",
43
+ validationOn: oe,
44
+ error: ce,
45
+ absoluteValidationText: ie,
46
+ disabled: p,
47
+ portalOn: re,
48
+ noScroll: S,
49
+ variant: se = "field",
50
+ id: le,
51
+ mobilePicker: ae
52
52
  }) => {
53
- const d = Ee(T, h), R = De(T, h), b = ce === "button", f = Le({ error: ee, validationOn: U, validationText: V }), S = i.findIndex((e) => k(e == null ? void 0 : e.value, t == null ? void 0 : t.value)), s = Te({
54
- optionsLength: i.length,
55
- initialIndex: S >= 0 ? S : 0,
56
- selectedIndex: S,
57
- disabled: n,
58
- portalOn: oe,
59
- id: re,
60
- idPrefix: "u-select",
53
+ const m = Ke(D, f), E = He(D, f), x = se === "button", g = We({ error: ce, validationOn: oe, validationText: te }), O = l.findIndex((e) => N(e == null ? void 0 : e.value, o == null ? void 0 : o.value)), a = De({
54
+ optionsLength: l.length,
55
+ initialIndex: O >= 0 ? O : 0,
56
+ selectedIndex: O,
57
+ disabled: p,
58
+ portalOn: re,
59
+ id: le,
60
+ idPrefix: r("select"),
61
61
  // Список встаёт под полем: прежняя постоянная в 90 была подогнана под
62
62
  // компактное поле в 30 пикселей и на обычном поле накрывала его край.
63
63
  getPortalPosition: (e) => ({ x: e.x, y: e.y + 60 + e.height + e.scrollY }),
64
64
  onSelectByIndex: (e) => {
65
- var g;
66
- const c = i[e];
67
- c && (m(c), (g = O.current) == null || g.close());
65
+ var v;
66
+ const i = l[e];
67
+ i && (u(i), (v = k.current) == null || v.close());
68
68
  }
69
- }), O = $e(s);
70
- O.current = s;
69
+ }), k = ze(a);
70
+ k.current = a;
71
71
  const {
72
72
  isOpen: I,
73
- blockRef: D,
74
- portalOptionsRef: se,
75
- optionsListRef: le,
76
- listboxId: l,
77
- activeDescendantId: ae,
78
- activeIndex: ne,
79
- hoveredIndex: de,
80
- setHoveredIndex: E,
81
- handleKeyDown: ue,
82
- shouldRenderPortal: pe,
83
- portalStatus: me,
84
- shouldRenderLocal: he,
85
- localStatus: be,
86
- isAnimated: H,
87
- portalWidth: fe,
88
- usePortal: xe
89
- } = s, a = s.portalPosition, ge = we(l, p, $, f, {
90
- "aria-label": N,
91
- "aria-labelledby": w,
92
- "aria-describedby": Y
93
- }), C = s.close, A = (e) => typeof e == "number" ? `calc(${e} * var(--u-preset-unit, 1px))` : String(e), ye = je(() => Re(i), [i]), r = Ce(ie) && !b, [K, x] = F(!1), [ve, Se] = F("");
94
- Pe(() => {
73
+ blockRef: H,
74
+ portalOptionsRef: ne,
75
+ optionsListRef: de,
76
+ listboxId: n,
77
+ activeDescendantId: pe,
78
+ activeIndex: me,
79
+ hoveredIndex: he,
80
+ setHoveredIndex: K,
81
+ handleKeyDown: be,
82
+ shouldRenderPortal: ue,
83
+ portalStatus: fe,
84
+ shouldRenderLocal: xe,
85
+ localStatus: ge,
86
+ isAnimated: A,
87
+ portalWidth: ye,
88
+ usePortal: ve
89
+ } = a, d = a.portalPosition, $e = je(n, b, z, g, {
90
+ "aria-label": P,
91
+ "aria-labelledby": j,
92
+ "aria-describedby": Q
93
+ }), L = a.close, M = (e) => typeof e == "number" ? `calc(${e} * var(--${t()}-preset-unit, 1px))` : String(e), Se = Te(() => Ee(l), [l]), s = Le(ae) && !x, [B, y] = Y(!1), [Oe, ke] = Y("");
94
+ Ce(() => {
95
95
  var e;
96
- r ? (e = O.current) == null || e.close() : x(!1);
97
- }, [r]);
98
- const L = () => {
99
- n || (Se(Me(D.current, { title: p, ariaLabel: N, ariaLabelledBy: w, placeholder: P })), x(!0));
100
- }, Oe = (e) => {
101
- e.key !== "Enter" && e.key !== " " && e.key !== "ArrowDown" || (e.preventDefault(), L());
102
- }, M = (e) => e.icon ? /* @__PURE__ */ u("span", { className: "u-react-select-option-content", children: [
103
- /* @__PURE__ */ o("span", { className: "u-react-select-option-label", children: e.label }),
104
- /* @__PURE__ */ o("span", { role: e.iconLabel ? "img" : void 0, "aria-label": e.iconLabel, "aria-hidden": e.iconLabel ? void 0 : !0, children: /* @__PURE__ */ o(He, { name: e.icon, size: 16 }) })
105
- ] }) : e.label, B = (e, c, g) => {
106
- const W = k(t == null ? void 0 : t.value, e == null ? void 0 : e.value), Ie = de === c || ne === c;
107
- return /* @__PURE__ */ o(
96
+ s ? (e = k.current) == null || e.close() : y(!1);
97
+ }, [s]);
98
+ const W = () => {
99
+ p || (ke(Fe(H.current, { title: b, ariaLabel: P, ariaLabelledBy: j, placeholder: C }, t())), y(!0));
100
+ }, Ie = (e) => {
101
+ e.key !== "Enter" && e.key !== " " && e.key !== "ArrowDown" || (e.preventDefault(), W());
102
+ }, F = (e) => e.icon ? /* @__PURE__ */ h("span", { className: r("react-select-option-content"), children: [
103
+ /* @__PURE__ */ c("span", { className: r("react-select-option-label"), children: e.label }),
104
+ /* @__PURE__ */ c("span", { role: e.iconLabel ? "img" : void 0, "aria-label": e.iconLabel, "aria-hidden": e.iconLabel ? void 0 : !0, children: /* @__PURE__ */ c(Ae, { name: e.icon, size: 16 }) })
105
+ ] }) : e.label, G = (e, i, v) => {
106
+ const _ = N(o == null ? void 0 : o.value, e == null ? void 0 : e.value), Ne = he === i || me === i;
107
+ return /* @__PURE__ */ c(
108
108
  "div",
109
109
  {
110
- className: "u-selectbox-option",
111
- "data-option-index": c,
112
- id: `${l}-option-${c}`,
110
+ className: r("selectbox-option"),
111
+ "data-option-index": i,
112
+ id: `${n}-option-${i}`,
113
113
  role: "option",
114
- "aria-selected": W,
115
- onClick: (ke) => {
116
- ke.stopPropagation(), m(e), C();
114
+ "aria-selected": _,
115
+ onClick: (we) => {
116
+ we.stopPropagation(), u(e), L();
117
117
  },
118
118
  style: Object.assign(
119
119
  {
120
120
  wordBreak: "break-word"
121
121
  },
122
- d ? {
123
- minHeight: "var(--u-compact-height)",
124
- fontSize: "var(--u-compact-font-size)",
122
+ m ? {
123
+ minHeight: `var(--${t()}-compact-height)`,
124
+ fontSize: `var(--${t()}-compact-font-size)`,
125
125
  lineHeight: 1,
126
- padding: "var(--u-compact-padding)"
126
+ padding: `var(--${t()}-compact-padding)`
127
127
  } : null,
128
- W ? { backgroundColor: G.selectedBackground } : Ie ? { backgroundColor: G.hoveredBackground } : null,
129
- g && v ? {
128
+ _ ? { backgroundColor: q.selectedBackground } : Ne ? { backgroundColor: q.hoveredBackground } : null,
129
+ v && S ? {
130
130
  maxHeight: "none"
131
131
  } : null,
132
- j
132
+ T
133
133
  ),
134
- onMouseEnter: () => E(c),
135
- onMouseLeave: () => E(null),
136
- children: M(e)
134
+ onMouseEnter: () => K(i),
135
+ onMouseLeave: () => K(null),
136
+ children: F(e)
137
137
  },
138
- ye[c]
138
+ Se[i]
139
139
  );
140
140
  };
141
- return /* @__PURE__ */ u("div", { className: `u-react-select-container${h && d ? " u-react-select-container--table" : ""}${R ? ` ${R}` : ""} ${Z ?? ""}`, style: { position: "relative" }, children: [
142
- /* @__PURE__ */ u(
141
+ return /* @__PURE__ */ h("div", { className: `${t()}-react-select-container${f && m ? ` ${t()}-react-select-container--table` : ""}${E ? ` ${E}` : ""} ${ee ?? ""}`, style: { position: "relative" }, children: [
142
+ /* @__PURE__ */ h(
143
143
  "div",
144
144
  {
145
145
  style: Object.assign(
146
146
  {
147
147
  display: "flex",
148
- flexDirection: y ? "row" : "column",
149
- rowGap: y ? null : A(Q),
150
- columnGap: y ? A(X) : null
148
+ flexDirection: $ ? "row" : "column",
149
+ rowGap: $ ? null : M(U),
150
+ columnGap: $ ? M(V) : null
151
151
  },
152
- q
152
+ X
153
153
  ),
154
154
  children: [
155
- p && /* @__PURE__ */ o(
155
+ b && /* @__PURE__ */ c(
156
156
  "div",
157
157
  {
158
- id: `${l}-label`,
159
- className: `${$ ? "u-required" : ""} u-react-select-title`,
158
+ id: `${n}-label`,
159
+ className: `${z ? r("required") : ""} ${t()}-react-select-title`,
160
160
  style: Object.assign(
161
161
  {
162
- color: "var(--u-field-title-color, #545454)",
163
- fontSize: "var(--u-field-label-size-main, calc(14 * var(--u-unit, 1px)))"
162
+ color: `var(--${t()}-field-title-color, #545454)`,
163
+ fontSize: `var(--${t()}-field-label-size-main, calc(14 * var(--u-unit, 1px)))`
164
164
  },
165
- J
165
+ Z
166
166
  ),
167
- children: p
167
+ children: b
168
168
  }
169
169
  ),
170
- /* @__PURE__ */ u(
170
+ /* @__PURE__ */ h(
171
171
  "div",
172
172
  {
173
- className: `u-selectbox${n ? " u-selectbox-disabled" : ""} u-react-select${b ? " u-react-select--button" : ""}`,
174
- ref: D,
173
+ className: `${t()}-selectbox${p ? ` ${t()}-selectbox-disabled` : ""} ${t()}-react-select${x ? ` ${t()}-react-select--button` : ""}`,
174
+ ref: H,
175
175
  style: Object.assign(
176
176
  {
177
177
  width: "100%"
178
178
  },
179
- j
179
+ T
180
180
  ),
181
181
  children: [
182
- /* @__PURE__ */ u(
182
+ /* @__PURE__ */ h(
183
183
  "div",
184
184
  {
185
- className: I ? "u-selectbox-select u-selectbox-select-open" : "u-selectbox-select",
186
- tabIndex: n ? -1 : 0,
185
+ className: I ? w("selectbox-select", "selectbox-select-open") : r("selectbox-select"),
186
+ tabIndex: p ? -1 : 0,
187
187
  role: "combobox",
188
- ...ge,
189
- "aria-expanded": r ? K : I,
190
- "aria-haspopup": r ? "dialog" : "listbox",
191
- "aria-controls": r ? void 0 : l,
192
- "aria-disabled": n || void 0,
193
- "aria-activedescendant": r ? void 0 : ae,
194
- onKeyDown: r ? Oe : ue,
195
- onClick: (e) => r ? L() : s.toggle(e.currentTarget),
188
+ ...$e,
189
+ "aria-expanded": s ? B : I,
190
+ "aria-haspopup": s ? "dialog" : "listbox",
191
+ "aria-controls": s ? void 0 : n,
192
+ "aria-disabled": p || void 0,
193
+ "aria-activedescendant": s ? void 0 : pe,
194
+ onKeyDown: s ? Ie : be,
195
+ onClick: (e) => s ? W() : a.toggle(e.currentTarget),
196
196
  style: Object.assign(
197
- d ? {
198
- height: "var(--u-compact-height)",
199
- fontSize: "var(--u-compact-font-size)",
197
+ m ? {
198
+ height: `var(--${t()}-compact-height)`,
199
+ fontSize: `var(--${t()}-compact-font-size)`,
200
200
  lineHeight: 1,
201
- padding: "var(--u-compact-padding)",
201
+ padding: `var(--${t()}-compact-padding)`,
202
202
  borderRadius: "calc(8 * var(--u-unit, 1px))"
203
203
  } : {},
204
- f.hasError && { border: "1px solid var(--u-color-error, #EF302B)" }
204
+ g.hasError && { border: `1px solid var(--${t()}-color-error, #EF302B)` }
205
205
  ),
206
206
  children: [
207
- t != null && t.value && !b ? /* @__PURE__ */ o("span", { style: { maxWidth: h && d ? "none" : z ? "calc(100% - calc(40 * var(--u-unit, 1px)))" : "calc(100% - calc(18 * var(--u-unit, 1px)))" }, className: "u-selectbox-select-title", children: M(t) }) : /* @__PURE__ */ o("span", { style: { color: "var(--u-field-title-color, #545454)" }, className: "u-selectbox-select-title", children: P }),
208
- t != null && t.value && z && !b ? /* @__PURE__ */ o(
207
+ o != null && o.value && !x ? /* @__PURE__ */ c("span", { style: { maxWidth: f && m ? "none" : R ? "calc(100% - calc(40 * var(--u-unit, 1px)))" : "calc(100% - calc(18 * var(--u-unit, 1px)))" }, className: r("selectbox-select-title"), children: F(o) }) : /* @__PURE__ */ c("span", { style: { color: `var(--${t()}-field-title-color, #545454)` }, className: r("selectbox-select-title"), children: C }),
208
+ o != null && o.value && R && !x ? /* @__PURE__ */ c(
209
209
  "i",
210
210
  {
211
- className: "u-selectbox-select-icon-cross",
211
+ className: r("selectbox-select-icon-cross"),
212
212
  role: "button",
213
213
  "aria-label": "Очистить",
214
214
  style: Object.assign(
215
- d ? {
215
+ m ? {
216
216
  right: "calc(28 * var(--u-unit, 1px))"
217
217
  } : {},
218
- n && { pointerEvents: "none" }
218
+ p && { pointerEvents: "none" }
219
219
  ),
220
220
  onClick: (e) => {
221
- e.stopPropagation(), m({}), C();
221
+ e.stopPropagation(), u({}), L();
222
222
  }
223
223
  }
224
- ) : /* @__PURE__ */ o(Ne, {}),
225
- /* @__PURE__ */ o(
224
+ ) : /* @__PURE__ */ c(Pe, {}),
225
+ /* @__PURE__ */ c(
226
226
  "i",
227
227
  {
228
- className: "u-selectbox-select-icon-arrow",
228
+ className: r("selectbox-select-icon-arrow"),
229
229
  style: Object.assign(
230
230
  I ? {
231
231
  transform: "rotate(180deg)",
232
232
  top: "calc(50% - calc(4 * var(--u-unit, 1px)))"
233
233
  } : {},
234
- d ? {
234
+ m ? {
235
235
  width: "calc(12 * var(--u-unit, 1px)) !important",
236
236
  right: "calc(8 * var(--u-unit, 1px))",
237
237
  maxWidth: "calc(100% - calc(18 * var(--u-unit, 1px)))"
@@ -242,46 +242,46 @@ const at = ({
242
242
  ]
243
243
  }
244
244
  ),
245
- xe ? pe && a && ze(
246
- /* @__PURE__ */ o(
245
+ ve ? ue && d && Re(
246
+ /* @__PURE__ */ c(
247
247
  "div",
248
248
  {
249
- ref: se,
250
- ...Ke(),
251
- id: l,
249
+ ref: ne,
250
+ ...Be(),
251
+ id: n,
252
252
  role: "listbox",
253
- className: "u-selectbox-options u-react-select-options",
253
+ className: w("selectbox-options", "react-select-options"),
254
254
  style: Object.assign(
255
255
  {
256
- width: fe,
257
- left: a == null ? void 0 : a.x,
258
- top: (a == null ? void 0 : a.y) - 60,
256
+ width: ye,
257
+ left: d == null ? void 0 : d.x,
258
+ top: (d == null ? void 0 : d.y) - 60,
259
259
  opacity: 1,
260
260
  height: "fit-content",
261
261
  // Переменная, чтобы список внутри модалки можно было
262
262
  // поднять над ней, не трогая код потребителя.
263
- zIndex: "var(--u-select-popup-z, 10010)",
263
+ zIndex: `var(--${t()}-select-popup-z, 10010)`,
264
264
  display: "block"
265
265
  },
266
- v ? {
266
+ S ? {
267
267
  maxHeight: "none"
268
268
  } : {},
269
- s.optionsStyle,
270
- _(me, H)
269
+ a.optionsStyle,
270
+ J(fe, A)
271
271
  ),
272
- children: i.map((e, c) => B(e, c, !1))
272
+ children: l.map((e, i) => G(e, i, !1))
273
273
  }
274
274
  ),
275
275
  document.body
276
- ) : he && /* @__PURE__ */ o(
276
+ ) : xe && /* @__PURE__ */ c(
277
277
  "div",
278
278
  {
279
- ref: le,
280
- id: l,
279
+ ref: de,
280
+ id: n,
281
281
  role: "listbox",
282
- className: "u-selectbox-options u-react-select-options",
282
+ className: w("selectbox-options", "react-select-options"),
283
283
  style: Object.assign(
284
- v ? { maxHeight: "none" } : {},
284
+ S ? { maxHeight: "none" } : {},
285
285
  /**
286
286
  * `display` держим сами всё время, пока узел в разметке.
287
287
  * Иначе при закрытии снимается класс `…-select-open`,
@@ -290,10 +290,10 @@ const at = ({
290
290
  * вместо плавного угасания.
291
291
  */
292
292
  { display: "block" },
293
- s.optionsStyle,
294
- _(be, H)
293
+ a.optionsStyle,
294
+ J(ge, A)
295
295
  ),
296
- children: i.map((e, c) => B(e, c, !0))
296
+ children: l.map((e, i) => G(e, i, !0))
297
297
  }
298
298
  )
299
299
  ]
@@ -302,20 +302,20 @@ const at = ({
302
302
  ]
303
303
  }
304
304
  ),
305
- f.showText && /* @__PURE__ */ o("h5", { id: `${l}-error`, className: "h5 clr-red-main", style: te ? { position: "absolute", bottom: "calc(-20 * var(--u-unit, 1px))" } : { position: "relative", marginTop: "calc(4 * var(--u-unit, 1px))" }, children: f.text }),
306
- r ? /* @__PURE__ */ o(
307
- Ae,
305
+ g.showText && /* @__PURE__ */ c("h5", { id: `${n}-error`, className: "h5 clr-red-main", style: ie ? { position: "absolute", bottom: "calc(-20 * var(--u-unit, 1px))" } : { position: "relative", marginTop: "calc(4 * var(--u-unit, 1px))" }, children: g.text }),
306
+ s ? /* @__PURE__ */ c(
307
+ Me,
308
308
  {
309
- active: K,
310
- title: ve,
311
- options: i,
312
- isSelected: (e) => k(t == null ? void 0 : t.value, e == null ? void 0 : e.value),
309
+ active: B,
310
+ title: Oe,
311
+ options: l,
312
+ isSelected: (e) => N(o == null ? void 0 : o.value, e == null ? void 0 : e.value),
313
313
  onSelect: (e) => {
314
- m(e), x(!1);
314
+ u(e), y(!1);
315
315
  },
316
- onClose: () => x(!1)
316
+ onClose: () => y(!1)
317
317
  }
318
318
  ) : null
319
319
  ] });
320
320
  };
321
- export { at as Select$u };
321
+ export { pt as Select$u };
@@ -1 +1 @@
1
- {"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,0BAA0B,CAAC;AAClC,OAAO,iBAAiB,CAAC;AAYzB,mFAAmF;AACnF,wBAAgB,QAAQ,CAAC,EACvB,OAAgB,EAAE,KAAK,EAAE,MAAM,EAAE,KAAS,EAAE,GAAG,EAAE,aAAqB,EACtE,SAAkB,EAAE,KAAK,EAAE,SAAc,EAAE,KAAK,GACjD,EAAE,aAAa,2CAqBf"}
1
+ {"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,0BAA0B,CAAC;AAClC,OAAO,iBAAiB,CAAC;AASzB,mFAAmF;AACnF,wBAAgB,QAAQ,CAAC,EACvB,OAAgB,EAAE,KAAK,EAAE,MAAM,EAAE,KAAS,EAAE,GAAG,EAAE,aAAqB,EACtE,SAAkB,EAAE,KAAK,EAAE,SAAc,EAAE,KAAK,GACjD,EAAE,aAAa,2CAqBf"}
@@ -1,38 +1,39 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  /* empty css */
3
3
  /* empty css */
4
- const t = (e) => typeof e == "number" ? `calc(${Math.max(0, e)} * var(--u-unit, 1px))` : e;
5
- function w({
6
- variant: e = "text",
7
- width: r,
8
- height: u,
4
+ import { kitCls$u as f, getUiKitPrefix$u as e } from "../../shared/uiKitDefaults.js";
5
+ const o = (t) => typeof t == "number" ? `calc(${Math.max(0, t)} * var(--u-unit, 1px))` : t;
6
+ function M({
7
+ variant: t = "text",
8
+ width: a,
9
+ height: m,
9
10
  count: n = 1,
10
- gap: a,
11
- lastLineWidth: m = "70%",
12
- animation: i = "wave",
13
- label: o,
11
+ gap: $,
12
+ lastLineWidth: k = "70%",
13
+ animation: r = "wave",
14
+ label: s,
14
15
  className: h = "",
15
- style: k
16
+ style: p
16
17
  }) {
17
- const s = Number.isFinite(n) ? Math.max(0, Math.floor(n)) : 1;
18
- if (!s) return null;
19
- const p = {
20
- "--u-skeleton-width": t(r),
21
- "--u-skeleton-height": t(u),
22
- "--u-skeleton-gap": t(a),
23
- "--u-skeleton-last-line-width": t(m),
24
- ...k
18
+ const i = Number.isFinite(n) ? Math.max(0, Math.floor(n)) : 1;
19
+ if (!i) return null;
20
+ const d = {
21
+ [`--${e()}-skeleton-width`]: o(a),
22
+ [`--${e()}-skeleton-height`]: o(m),
23
+ [`--${e()}-skeleton-gap`]: o($),
24
+ [`--${e()}-skeleton-last-line-width`]: o(k),
25
+ ...p
25
26
  };
26
27
  return /* @__PURE__ */ l(
27
28
  "span",
28
29
  {
29
- className: `u-skeleton u-skeleton--${e}${i ? ` u-skeleton--${i}` : ""}${e === "text" && s > 1 ? " u-skeleton--multiline" : ""} ${h}`.trim(),
30
- style: p,
31
- role: o ? "status" : void 0,
32
- "aria-label": o || void 0,
33
- "aria-hidden": o ? void 0 : !0,
34
- children: Array.from({ length: s }, (c, d) => /* @__PURE__ */ l("span", { className: "u-skeleton__shape" }, d))
30
+ className: `${e()}-skeleton ${e()}-skeleton--${t}${r ? ` ${e()}-skeleton--${r}` : ""}${t === "text" && i > 1 ? ` ${e()}-skeleton--multiline` : ""} ${h}`.trim(),
31
+ style: d,
32
+ role: s ? "status" : void 0,
33
+ "aria-label": s || void 0,
34
+ "aria-hidden": s ? void 0 : !0,
35
+ children: Array.from({ length: i }, (u, c) => /* @__PURE__ */ l("span", { className: f("skeleton__shape") }, c))
35
36
  }
36
37
  );
37
38
  }
38
- export { w as Skeleton$u };
39
+ export { M as Skeleton$u };
@@ -1 +1 @@
1
- {"version":3,"file":"Status.d.ts","sourceRoot":"","sources":["../../../src/components/Status/Status.tsx"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAEjD,OAAO,eAAe,CAAC;AAEvB,eAAO,MAAM,MAAM,GAAI,yEAQpB,gBAAgB,4CAuClB,CAAA"}
1
+ {"version":3,"file":"Status.d.ts","sourceRoot":"","sources":["../../../src/components/Status/Status.tsx"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAEjD,OAAO,eAAe,CAAC;AAGvB,eAAO,MAAM,MAAM,GAAI,yEAQpB,gBAAgB,4CAuClB,CAAA"}