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,233 +1,233 @@
1
- import { jsx as l, jsxs as h } from "react/jsx-runtime";
2
- import { getFieldAccessibility$u as Ee } from "../../shared/fieldAccessibility.js";
3
- import { useState as Ke, useRef as _, useEffect as k, useMemo as Pe } from "react";
1
+ import { jsx as o, jsxs as O } from "react/jsx-runtime";
2
+ import { getFieldAccessibility$u as Ae } from "../../shared/fieldAccessibility.js";
3
+ import { useState as Fe, useRef as I, useEffect as z, useMemo as He } from "react";
4
4
  /* empty css */
5
- import { createPortal as Ae } from "react-dom";
5
+ import { createPortal as Be } from "react-dom";
6
6
  /* empty css */
7
7
  /* empty css */
8
- import { useSelectEngine$u as Fe } from "../../hooks/useSelectEngine.js";
9
- import { isSameOptionValue$u as He, getOptionKeys$u as Be } from "../../shared/optionValue.js";
10
- import { getPopupTransitionStyle$u as U } from "../../shared/popupTransition.js";
11
- import { useFlippedPlacement$u as Ge } from "./useFlippedPlacement.js";
12
- import { SearchSelectOption$u as Me } from "./SearchSelectOption.js";
13
- import { isCompact$u as We, sizeClassName$u as Ye } from "../../shared/size.js";
14
- import { getPortalScopeProps$u as qe } from "../../shared/uiKitDefaults.js";
15
- import { resolveValidation$u as Je } from "../../vanilla/core/validation.js";
16
- const ot = ({
17
- "aria-label": I,
18
- "aria-labelledby": C,
19
- "aria-describedby": V,
20
- title: v = "",
21
- required: z = !1,
22
- options: R,
23
- styleSelectContainer: ee,
24
- styleTitle: te,
25
- styleSelect: ce,
26
- lineUp: S = !1,
27
- rowGap: se = 4,
28
- columnGap: ie = 20,
29
- placeholder: re = "Не выбрано",
8
+ import { useSelectEngine$u as Ge } from "../../hooks/useSelectEngine.js";
9
+ import { isSameOptionValue$u as Me, getOptionKeys$u as We } from "../../shared/optionValue.js";
10
+ import { getPopupTransitionStyle$u as C } from "../../shared/popupTransition.js";
11
+ import { useFlippedPlacement$u as Ye } from "./useFlippedPlacement.js";
12
+ import { SearchSelectOption$u as qe } from "./SearchSelectOption.js";
13
+ import { isCompact$u as Je, sizeClassName$u as Qe } from "../../shared/size.js";
14
+ import { getUiKitPrefix$u as r, kitClasses$u as V, kitCls$u as n, getPortalScopeProps$u as Ue } from "../../shared/uiKitDefaults.js";
15
+ import { resolveValidation$u as Xe } from "../../vanilla/core/validation.js";
16
+ const dt = ({
17
+ "aria-label": ee,
18
+ "aria-labelledby": te,
19
+ "aria-describedby": ce,
20
+ title: g = "",
21
+ required: R = !1,
22
+ options: T,
23
+ styleSelectContainer: se,
24
+ styleTitle: ie,
25
+ styleSelect: re,
26
+ lineUp: $ = !1,
27
+ rowGap: le = 4,
28
+ columnGap: oe = 20,
29
+ placeholder: ae = "Не выбрано",
30
30
  value: t,
31
- isClearable: le = !1,
32
- onChange: f,
33
- className: oe,
34
- tableView: T = !1,
35
- size: $,
36
- validationText: ae = "Заполните поле",
37
- validationOn: D,
38
- error: ne,
39
- absoluteValidationText: de,
40
- disabled: n,
41
- portalOn: pe,
42
- onInputChange: u,
43
- loading: x,
44
- inputValue: y,
31
+ isClearable: ne = !1,
32
+ onChange: b,
33
+ className: de,
34
+ tableView: D = !1,
35
+ size: K,
36
+ validationText: pe = "Заполните поле",
37
+ validationOn: L,
38
+ error: fe,
39
+ absoluteValidationText: me,
40
+ disabled: p,
41
+ portalOn: be,
42
+ onInputChange: S,
43
+ loading: h,
44
+ inputValue: v,
45
45
  onInputValueChange: c,
46
- emptyOptionsText: fe = "Ничего не найдено",
47
- id: me
46
+ emptyOptionsText: xe = "Ничего не найдено",
47
+ id: ye
48
48
  }) => {
49
- const m = We($, T), L = Ye($, T), O = Je({ error: ne, validationOn: D, validationText: ae }), [g, b] = Ke(""), E = _(!1), a = typeof y == "string" && typeof c == "function", o = g && !a ? R.filter((e) => (e.label ?? "").toLowerCase().includes((a ? y : g).toLowerCase())) : R, K = o.findIndex((e) => He(e == null ? void 0 : e.value, t == null ? void 0 : t.value)), d = Fe({
50
- optionsLength: o.length,
51
- initialIndex: Math.max(0, K),
52
- selectedIndex: K,
53
- disabled: n,
54
- portalOn: pe,
55
- loading: x,
56
- id: me,
57
- idPrefix: "u-search-select",
49
+ const x = Je(K, D), P = Qe(K, D), w = Xe({ error: fe, validationOn: L, validationText: pe }), [j, y] = Fe(""), E = I(!1), d = typeof v == "string" && typeof c == "function", a = j && !d ? T.filter((e) => (e.label ?? "").toLowerCase().includes((d ? v : j).toLowerCase())) : T, A = a.findIndex((e) => Me(e == null ? void 0 : e.value, t == null ? void 0 : t.value)), f = Ge({
50
+ optionsLength: a.length,
51
+ initialIndex: Math.max(0, A),
52
+ selectedIndex: A,
53
+ disabled: p,
54
+ portalOn: be,
55
+ loading: h,
56
+ id: ye,
57
+ idPrefix: n("search-select"),
58
58
  // Под полем, а не в 30 пикселях от его верха: прежняя постоянная
59
59
  // подходила только компактному полю и накрывала обычное.
60
60
  getPortalPosition: (e) => ({ x: e.x, y: e.y + 60 + e.height + e.scrollY }),
61
61
  onSelectByIndex: (e) => {
62
- const r = o[e];
63
- r && M.current(r);
62
+ const l = a[e];
63
+ l && Y.current(l);
64
64
  }
65
65
  }), {
66
66
  isOpen: s,
67
- blockRef: P,
68
- portalOptionsRef: A,
69
- optionsListRef: F,
70
- listboxId: p,
71
- activeDescendantId: be,
72
- activeIndex: xe,
73
- hoveredIndex: ye,
74
- setHoveredIndex: ue,
75
- handleKeyDown: he,
76
- shouldRenderPortal: ve,
77
- portalStatus: Se,
78
- shouldRenderLocal: Oe,
79
- localStatus: ge,
80
- isAnimated: H,
81
- portalWidth: we,
82
- anchor: je,
83
- usePortal: w
84
- } = d, i = d.portalPosition, Ne = Ee(p, v, z, O, {
85
- "aria-label": I,
86
- "aria-labelledby": C,
87
- "aria-describedby": V
88
- }), B = d.close, G = (e) => typeof e == "number" ? `calc(${e} * var(--u-preset-unit, 1px))` : String(e), M = _(() => {
89
- }), { flippedTop: ke, flippedUp: ze } = Ge({
67
+ blockRef: F,
68
+ portalOptionsRef: H,
69
+ optionsListRef: B,
70
+ listboxId: m,
71
+ activeDescendantId: he,
72
+ activeIndex: ve,
73
+ hoveredIndex: Se,
74
+ setHoveredIndex: Oe,
75
+ handleKeyDown: ge,
76
+ shouldRenderPortal: $e,
77
+ portalStatus: we,
78
+ shouldRenderLocal: je,
79
+ localStatus: ke,
80
+ isAnimated: G,
81
+ portalWidth: Ne,
82
+ anchor: ue,
83
+ usePortal: k
84
+ } = f, i = f.portalPosition, ze = Ae(m, g, R, w, {
85
+ "aria-label": ee,
86
+ "aria-labelledby": te,
87
+ "aria-describedby": ce
88
+ }), M = f.close, W = (e) => typeof e == "number" ? `calc(${e} * var(--${r()}-preset-unit, 1px))` : String(e), Y = I(() => {
89
+ }), { flippedTop: Re, flippedUp: Te } = Ye({
90
90
  isOpen: s,
91
- portalOn: w,
92
- anchor: je,
93
- blockRef: P,
94
- portalOptionsRef: A,
95
- optionsListRef: F,
96
- dependencies: [i == null ? void 0 : i.x, i == null ? void 0 : i.y, o.length, x]
91
+ portalOn: k,
92
+ anchor: ue,
93
+ blockRef: F,
94
+ portalOptionsRef: H,
95
+ optionsListRef: B,
96
+ dependencies: [i == null ? void 0 : i.x, i == null ? void 0 : i.y, a.length, h]
97
97
  });
98
- k(() => {
99
- t && Object.keys(t).length == 0 && b("");
100
- }, [t]), k(() => {
101
- t != null && t.label && Object.keys(t).length && !s && b(t.label);
98
+ z(() => {
99
+ t && Object.keys(t).length == 0 && y("");
100
+ }, [t]), z(() => {
101
+ t != null && t.label && Object.keys(t).length && !s && y(t.label);
102
102
  }, [s, t]);
103
- const j = a ? y : g, Re = (e) => {
104
- n || (s || d.open(e.currentTarget), a ? c && c(e.target.value) : b(e.target.value), u && u(e.target.value));
105
- }, N = !!(t && typeof t == "object" && t.value !== void 0 && String(t.value).length > 0), W = t != null && t.label && Object.keys(t).length ? t.label : "", Y = !s && !j ? W : "";
106
- k(() => {
103
+ const N = d ? v : j, De = (e) => {
104
+ p || (s || f.open(e.currentTarget), d ? c && c(e.target.value) : y(e.target.value), S && S(e.target.value));
105
+ }, u = !!(t && typeof t == "object" && t.value !== void 0 && String(t.value).length > 0), q = t != null && t.label && Object.keys(t).length ? t.label : "", J = !s && !N ? q : "";
106
+ z(() => {
107
107
  const e = E.current;
108
- E.current = s, e && !s && a && N && y.length > 0 && (c == null || c(""));
109
- }, [s, a, N, y, c]);
110
- const Te = () => {
111
- n || (f == null || f(null), a ? c == null || c("") : b(""), u && u(""), B());
112
- }, q = (e) => {
113
- e.preventDefault(), e.stopPropagation(), Te();
114
- }, J = (e) => {
115
- f == null || f(e), B(), a ? c == null || c("") : b(e.label ?? "");
116
- }, $e = Pe(() => Be(o), [o]);
117
- M.current = J;
118
- const Q = le && !n && N, De = Q ? m ? "calc(44 * var(--u-unit, 1px))" : "calc(64 * var(--u-unit, 1px))" : m ? "calc(28 * var(--u-unit, 1px))" : "calc(40 * var(--u-unit, 1px))", X = /* @__PURE__ */ l("div", { className: "u-selectbox-empty-text", children: fe }), Z = (e, r) => /* @__PURE__ */ l(
119
- Me,
108
+ E.current = s, e && !s && d && u && v.length > 0 && (c == null || c(""));
109
+ }, [s, d, u, v, c]);
110
+ const Ke = () => {
111
+ p || (b == null || b(null), d ? c == null || c("") : y(""), S && S(""), M());
112
+ }, Q = (e) => {
113
+ e.preventDefault(), e.stopPropagation(), Ke();
114
+ }, U = (e) => {
115
+ b == null || b(e), M(), d ? c == null || c("") : y(e.label ?? "");
116
+ }, Le = He(() => We(a), [a]);
117
+ Y.current = U;
118
+ const X = ne && !p && u, Pe = X ? x ? "calc(44 * var(--u-unit, 1px))" : "calc(64 * var(--u-unit, 1px))" : x ? "calc(28 * var(--u-unit, 1px))" : "calc(40 * var(--u-unit, 1px))", Z = /* @__PURE__ */ o("div", { className: n("selectbox-empty-text"), children: xe }), _ = (e, l) => /* @__PURE__ */ o(
119
+ qe,
120
120
  {
121
121
  option: e,
122
- index: r,
123
- listboxId: p,
122
+ index: l,
123
+ listboxId: m,
124
124
  selectedValue: t == null ? void 0 : t.value,
125
- isActive: ye === r || xe === r,
126
- tableView: m,
127
- onSelect: J,
128
- onHover: ue
125
+ isActive: Se === l || ve === l,
126
+ tableView: x,
127
+ onSelect: U,
128
+ onHover: Oe
129
129
  },
130
- $e[r]
131
- ), Le = /* @__PURE__ */ l(
130
+ Le[l]
131
+ ), Ee = /* @__PURE__ */ o(
132
132
  "input",
133
133
  {
134
- className: s ? "u-selectbox-select u-selectbox-select-open" : "u-selectbox-select",
134
+ className: s ? V("selectbox-select", "selectbox-select-open") : n("selectbox-select"),
135
135
  role: "combobox",
136
- ...Ne,
136
+ ...ze,
137
137
  "aria-expanded": s,
138
138
  "aria-haspopup": "listbox",
139
- "aria-controls": p,
139
+ "aria-controls": m,
140
140
  "aria-autocomplete": "list",
141
- "aria-activedescendant": be,
141
+ "aria-activedescendant": he,
142
142
  onClick: (e) => {
143
- j.length > 0 && (a ? c && c("") : b("")), !n && s && e.currentTarget.blur(), d.toggle(e.currentTarget);
143
+ N.length > 0 && (d ? c && c("") : y("")), !p && s && e.currentTarget.blur(), f.toggle(e.currentTarget);
144
144
  },
145
145
  style: Object.assign(
146
- m ? {
147
- height: "var(--u-compact-height)",
148
- fontSize: "var(--u-compact-font-size)",
146
+ x ? {
147
+ height: `var(--${r()}-compact-height)`,
148
+ fontSize: `var(--${r()}-compact-font-size)`,
149
149
  lineHeight: 1,
150
- padding: "var(--u-compact-padding)",
150
+ padding: `var(--${r()}-compact-padding)`,
151
151
  borderRadius: "calc(8 * var(--u-unit, 1px))"
152
152
  } : {},
153
- { paddingRight: De },
154
- D && { border: "1px solid var(--u-color-error, #EF302B)" }
153
+ { paddingRight: Pe },
154
+ L && { border: `1px solid var(--${r()}-color-error, #EF302B)` }
155
155
  ),
156
156
  type: "text",
157
- disabled: n,
158
- value: j || Y,
157
+ disabled: p,
158
+ value: N || J,
159
159
  onFocus: (e) => {
160
- Y && e.currentTarget.select();
160
+ J && e.currentTarget.select();
161
161
  },
162
- onChange: Re,
163
- onKeyDown: he,
164
- placeholder: W || re
162
+ onChange: De,
163
+ onKeyDown: ge,
164
+ placeholder: q || ae
165
165
  }
166
166
  );
167
- return /* @__PURE__ */ h("div", { className: `u-react-select-container${L ? ` ${L}` : ""} ${oe ?? ""}`, style: { position: "relative" }, children: [
168
- /* @__PURE__ */ h(
167
+ return /* @__PURE__ */ O("div", { className: `${r()}-react-select-container${P ? ` ${P}` : ""} ${de ?? ""}`, style: { position: "relative" }, children: [
168
+ /* @__PURE__ */ O(
169
169
  "div",
170
170
  {
171
171
  style: Object.assign(
172
172
  {
173
173
  display: "flex",
174
- flexDirection: S ? "row" : "column",
175
- rowGap: S ? null : G(se),
176
- columnGap: S ? G(ie) : null
174
+ flexDirection: $ ? "row" : "column",
175
+ rowGap: $ ? null : W(le),
176
+ columnGap: $ ? W(oe) : null
177
177
  },
178
- ee
178
+ se
179
179
  ),
180
180
  children: [
181
- v && /* @__PURE__ */ l(
181
+ g && /* @__PURE__ */ o(
182
182
  "div",
183
183
  {
184
- id: `${p}-label`,
185
- className: `${z ? "u-required" : ""} u-react-select-title`,
184
+ id: `${m}-label`,
185
+ className: `${R ? n("required") : ""} ${r()}-react-select-title`,
186
186
  style: Object.assign(
187
187
  {
188
- color: "var(--u-field-title-color, #545454)",
189
- fontSize: "var(--u-field-label-size-main, calc(14 * var(--u-unit, 1px)))"
188
+ color: `var(--${r()}-field-title-color, #545454)`,
189
+ fontSize: `var(--${r()}-field-label-size-main, calc(14 * var(--u-unit, 1px)))`
190
190
  },
191
- te
191
+ ie
192
192
  ),
193
- children: v
193
+ children: g
194
194
  }
195
195
  ),
196
- /* @__PURE__ */ h(
196
+ /* @__PURE__ */ O(
197
197
  "div",
198
198
  {
199
- className: `u-selectbox${n ? " u-selectbox-disabled" : ""} u-react-select`,
200
- ref: P,
199
+ className: `${r()}-selectbox${p ? ` ${r()}-selectbox-disabled` : ""} ${r()}-react-select`,
200
+ ref: F,
201
201
  style: Object.assign(
202
202
  {
203
203
  width: "100%"
204
204
  },
205
- ce
205
+ re
206
206
  ),
207
207
  children: [
208
- /* @__PURE__ */ h("div", { style: { position: "relative", width: "100%" }, children: [
209
- Le,
210
- Q ? /* @__PURE__ */ l(
208
+ /* @__PURE__ */ O("div", { style: { position: "relative", width: "100%" }, children: [
209
+ Ee,
210
+ X ? /* @__PURE__ */ o(
211
211
  "div",
212
212
  {
213
213
  role: "button",
214
214
  tabIndex: -1,
215
- className: "u-selectbox-select-icon-cross",
215
+ className: n("selectbox-select-icon-cross"),
216
216
  "aria-label": "Очистить",
217
- onClick: q,
217
+ onClick: Q,
218
218
  onKeyDown: (e) => {
219
- (e.key === "Enter" || e.key === " ") && q(e);
219
+ (e.key === "Enter" || e.key === " ") && Q(e);
220
220
  },
221
221
  style: Object.assign(
222
222
  { zIndex: 2, cursor: "pointer" },
223
- m ? { right: "calc(28 * var(--u-unit, 1px))" } : {}
223
+ x ? { right: "calc(28 * var(--u-unit, 1px))" } : {}
224
224
  )
225
225
  }
226
226
  ) : null,
227
- /* @__PURE__ */ l(
227
+ /* @__PURE__ */ o(
228
228
  "i",
229
229
  {
230
- className: "u-selectbox-select-icon-arrow",
230
+ className: n("selectbox-select-icon-arrow"),
231
231
  "aria-hidden": "true",
232
232
  style: Object.assign(
233
233
  { pointerEvents: "none" },
@@ -235,65 +235,65 @@ const ot = ({
235
235
  transform: "rotate(180deg)",
236
236
  top: "calc(50% - calc(4 * var(--u-unit, 1px)))"
237
237
  } : {},
238
- m ? { right: "calc(8 * var(--u-unit, 1px))" } : {}
238
+ x ? { right: "calc(8 * var(--u-unit, 1px))" } : {}
239
239
  )
240
240
  }
241
241
  )
242
242
  ] }),
243
- s && x ? /* @__PURE__ */ l(
243
+ s && h ? /* @__PURE__ */ o(
244
244
  "div",
245
245
  {
246
- className: "u-selectbox-options",
246
+ className: n("selectbox-options"),
247
247
  style: { textAlign: "center", padding: "calc(16 * var(--u-unit, 1px))", display: "block" },
248
- children: /* @__PURE__ */ l("span", { className: "u-selectbox-loading", children: "Загрузка..." })
248
+ children: /* @__PURE__ */ o("span", { className: n("selectbox-loading"), children: "Загрузка..." })
249
249
  }
250
250
  ) : null,
251
- !x && w && ve && i && Ae(
252
- /* @__PURE__ */ l(
251
+ !h && k && $e && i && Be(
252
+ /* @__PURE__ */ o(
253
253
  "div",
254
254
  {
255
- ref: A,
256
- ...qe(),
257
- id: p,
255
+ ref: H,
256
+ ...Ue(),
257
+ id: m,
258
258
  role: "listbox",
259
- className: "u-selectbox-options",
259
+ className: n("selectbox-options"),
260
260
  style: Object.assign(
261
261
  {
262
- width: we,
262
+ width: Ne,
263
263
  left: i == null ? void 0 : i.x,
264
- top: ke ?? (i == null ? void 0 : i.y) - 60,
264
+ top: Re ?? (i == null ? void 0 : i.y) - 60,
265
265
  opacity: 1,
266
266
  visibility: "visible",
267
267
  height: "fit-content",
268
268
  // Переменная, чтобы список внутри модалки можно было
269
269
  // поднять над ней, не трогая код потребителя.
270
- zIndex: "var(--u-select-popup-z, 10010)",
270
+ zIndex: `var(--${r()}-select-popup-z, 10010)`,
271
271
  display: "block"
272
272
  },
273
- d.optionsStyle,
274
- U(Se, H)
273
+ f.optionsStyle,
274
+ C(we, G)
275
275
  ),
276
- children: o.length > 0 ? o.map((e, r) => Z(e, r)) : X
276
+ children: a.length > 0 ? a.map((e, l) => _(e, l)) : Z
277
277
  }
278
278
  ),
279
279
  document.body
280
280
  ),
281
- !x && !w && Oe ? /* @__PURE__ */ l(
281
+ !h && !k && je ? /* @__PURE__ */ o(
282
282
  "div",
283
283
  {
284
- ref: F,
285
- id: p,
284
+ ref: B,
285
+ id: m,
286
286
  role: "listbox",
287
- className: ze ? "u-selectbox-options u-selectbox-options-up" : "u-selectbox-options",
287
+ className: Te ? V("selectbox-options", "selectbox-options-up") : n("selectbox-options"),
288
288
  style: Object.assign(
289
289
  {},
290
290
  // см. Select: без своего `display` переход срывается на кадре,
291
291
  // когда vanilla уже спрятала список, а узел ещё нужен
292
292
  { display: "block" },
293
- d.optionsStyle,
294
- U(ge, H)
293
+ f.optionsStyle,
294
+ C(ke, G)
295
295
  ),
296
- children: o.length > 0 ? o.map((e, r) => Z(e, r)) : X
296
+ children: a.length > 0 ? a.map((e, l) => _(e, l)) : Z
297
297
  }
298
298
  ) : null
299
299
  ]
@@ -302,7 +302,7 @@ const ot = ({
302
302
  ]
303
303
  }
304
304
  ),
305
- O.showText && /* @__PURE__ */ l("h5", { id: `${p}-error`, className: "h5 clr-red-main", style: de ? { position: "absolute", bottom: "calc(-20 * var(--u-unit, 1px))" } : { position: "relative", marginTop: "calc(4 * var(--u-unit, 1px))" }, children: O.text })
305
+ w.showText && /* @__PURE__ */ o("h5", { id: `${m}-error`, className: "h5 clr-red-main", style: me ? { position: "absolute", bottom: "calc(-20 * var(--u-unit, 1px))" } : { position: "relative", marginTop: "calc(4 * var(--u-unit, 1px))" }, children: w.text })
306
306
  ] });
307
307
  };
308
- export { ot as SearchSelect$u };
308
+ export { dt as SearchSelect$u };
@@ -1 +1 @@
1
- {"version":3,"file":"SearchSelectOption.d.ts","sourceRoot":"","sources":["../../../src/components/SearchSelect/SearchSelectOption.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,KAAK,KAAK,GAAG;IACT,MAAM,EAAE,gBAAgB,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,oFAAoF;IACpF,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7C,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC3C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,sFAShC,KAAK,4CAmCP,CAAC"}
1
+ {"version":3,"file":"SearchSelectOption.d.ts","sourceRoot":"","sources":["../../../src/components/SearchSelect/SearchSelectOption.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG7D,KAAK,KAAK,GAAG;IACT,MAAM,EAAE,gBAAgB,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,oFAAoF;IACpF,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7C,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC3C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,sFAShC,KAAK,4CAmCP,CAAC"}
@@ -1,36 +1,37 @@
1
- import { jsx as u } from "react/jsx-runtime";
2
- import { OPTION_STATE_COLORS$u as r } from "../../shared/optionStateColors.js";
3
- import { isSameOptionValue$u as m } from "../../shared/optionValue.js";
4
- const O = ({
1
+ import { jsx as g } from "react/jsx-runtime";
2
+ import { OPTION_STATE_COLORS$u as i } from "../../shared/optionStateColors.js";
3
+ import { isSameOptionValue$u as p } from "../../shared/optionValue.js";
4
+ import { getUiKitPrefix$u as t, kitCls$u as u } from "../../shared/uiKitDefaults.js";
5
+ const k = ({
5
6
  option: e,
6
7
  index: o,
7
8
  listboxId: c,
8
- selectedValue: i,
9
- isActive: l,
10
- tableView: n,
11
- onSelect: s,
9
+ selectedValue: l,
10
+ isActive: n,
11
+ tableView: s,
12
+ onSelect: d,
12
13
  onHover: a
13
14
  }) => {
14
- const t = m(i, e == null ? void 0 : e.value);
15
- return /* @__PURE__ */ u(
15
+ const r = p(l, e == null ? void 0 : e.value);
16
+ return /* @__PURE__ */ g(
16
17
  "div",
17
18
  {
18
- className: "u-selectbox-option",
19
+ className: u("selectbox-option"),
19
20
  "data-option-index": o,
20
21
  id: `${c}-option-${o}`,
21
22
  role: "option",
22
- "aria-selected": t,
23
- onClick: (d) => {
24
- d.stopPropagation(), s(e);
23
+ "aria-selected": r,
24
+ onClick: (m) => {
25
+ m.stopPropagation(), d(e);
25
26
  },
26
27
  style: Object.assign(
27
- n ? {
28
- minHeight: "var(--u-compact-height)",
29
- fontSize: "var(--u-compact-font-size)",
28
+ s ? {
29
+ minHeight: `var(--${t()}-compact-height)`,
30
+ fontSize: `var(--${t()}-compact-font-size)`,
30
31
  lineHeight: 1,
31
- padding: "var(--u-compact-padding)"
32
+ padding: `var(--${t()}-compact-padding)`
32
33
  } : {},
33
- t ? { backgroundColor: r.selectedBackground } : l ? { backgroundColor: r.hoveredBackground } : {}
34
+ r ? { backgroundColor: i.selectedBackground } : n ? { backgroundColor: i.hoveredBackground } : {}
34
35
  ),
35
36
  onMouseEnter: () => a(o),
36
37
  onMouseLeave: () => a(null),
@@ -38,4 +39,4 @@ const O = ({
38
39
  }
39
40
  );
40
41
  };
41
- export { O as SearchSelectOption$u };
42
+ export { k as SearchSelectOption$u };
@@ -1 +1 @@
1
- {"version":3,"file":"MobileOptionSheet.d.ts","sourceRoot":"","sources":["../../../src/components/Select/MobileOptionSheet.tsx"],"names":[],"mappings":"AAQA,OAAO,kEAAkE,CAAC;AA4B1E,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,KAAK,sBAAsB,CAAC,CAAC,SAAS,WAAW,IAAI;IACjD,MAAM,EAAE,OAAO,CAAC;IAChB,4DAA4D;IAC5D,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,OAAO,CAAC;IACnC,qGAAqG;IACrG,QAAQ,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,+EAA+E;IAC/E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,6FAA6F;IAC7F,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,WAAW,EAAE,EACrD,MAAM,EACN,KAAK,EACL,OAAO,EACP,QAAgB,EAChB,UAAU,EACV,QAAQ,EACR,OAAO,EACP,UAAkB,EAClB,cAAc,EACd,OAAe,GAClB,EAAE,sBAAsB,CAAC,CAAC,CAAC,2CAgH3B"}
1
+ {"version":3,"file":"MobileOptionSheet.d.ts","sourceRoot":"","sources":["../../../src/components/Select/MobileOptionSheet.tsx"],"names":[],"mappings":"AAQA,OAAO,kEAAkE,CAAC;AA6B1E,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,KAAK,sBAAsB,CAAC,CAAC,SAAS,WAAW,IAAI;IACjD,MAAM,EAAE,OAAO,CAAC;IAChB,4DAA4D;IAC5D,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,OAAO,CAAC;IACnC,qGAAqG;IACrG,QAAQ,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,+EAA+E;IAC/E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,6FAA6F;IAC7F,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,WAAW,EAAE,EACrD,MAAM,EACN,KAAK,EACL,OAAO,EACP,QAAgB,EAChB,UAAU,EACV,QAAQ,EACR,OAAO,EACP,UAAkB,EAClB,cAAc,EACd,OAAe,GAClB,EAAE,sBAAsB,CAAC,CAAC,CAAC,2CAgH3B"}