urfu-ui-kit-react 2.1.7-next.0 → 2.1.7-next.2

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 (75) hide show
  1. package/dist/components/Calendar/Calendar.d.ts.map +1 -1
  2. package/dist/components/Calendar/Calendar.js +232 -194
  3. package/dist/components/Calendar/Calendar.types.d.ts +21 -0
  4. package/dist/components/Calendar/Calendar.types.d.ts.map +1 -1
  5. package/dist/components/Calendar/CalendarSelect.js +38 -38
  6. package/dist/components/Calendar/MaskedDateInput.d.ts +2 -0
  7. package/dist/components/Calendar/MaskedDateInput.d.ts.map +1 -1
  8. package/dist/components/Calendar/MaskedDateInput.js +120 -113
  9. package/dist/components/ColumnSettings/ColumnSettings.d.ts.map +1 -1
  10. package/dist/components/ColumnSettings/ColumnSettings.js +22 -21
  11. package/dist/components/ConfirmModal/ConfirmModal.d.ts +0 -1
  12. package/dist/components/ConfirmModal/ConfirmModal.d.ts.map +1 -1
  13. package/dist/components/ConfirmModal/ConfirmModal.js +11 -12
  14. package/dist/components/Drawer/Drawer.d.ts.map +1 -1
  15. package/dist/components/Drawer/Drawer.js +23 -22
  16. package/dist/components/ErrorScreen/ErrorScreenIllustration.js +28 -28
  17. package/dist/components/InputExpandTextarea/InputExpandTextarea.js +1 -1
  18. package/dist/components/InputTime/InputTime.js +12 -12
  19. package/dist/components/Menu/Menu.js +11 -11
  20. package/dist/components/Modal/Modal.js +33 -33
  21. package/dist/components/Pagination/Pagination.js +22 -22
  22. package/dist/components/Preloader/Preloader.d.ts.map +1 -1
  23. package/dist/components/Preloader/Preloader.js +13 -13
  24. package/dist/components/Search/Search.d.ts.map +1 -1
  25. package/dist/components/Search/Search.js +28 -23
  26. package/dist/components/Select/Select.d.ts +2 -0
  27. package/dist/components/Select/Select.d.ts.map +1 -1
  28. package/dist/components/Select/Select.js +21 -19
  29. package/dist/components/StickyActionBar/StickyActionBar.d.ts.map +1 -1
  30. package/dist/components/StickyActionBar/StickyActionBar.js +45 -58
  31. package/dist/components/Switch/Switch.d.ts.map +1 -1
  32. package/dist/components/Switch/Switch.js +8 -8
  33. package/dist/components/Table/Filter/FilterStringBox.d.ts.map +1 -1
  34. package/dist/components/Table/Filter/FilterStringBox.js +45 -40
  35. package/dist/components/Table/Filter/SelectFilter.d.ts.map +1 -1
  36. package/dist/components/Table/Filter/SelectFilter.js +24 -22
  37. package/dist/components/Table/Filter/filterLoading.d.ts +4 -1
  38. package/dist/components/Table/Filter/filterLoading.d.ts.map +1 -1
  39. package/dist/components/Table/Filter/filterLoading.js +6 -2
  40. package/dist/components/Table/Filter/useServerFilterOptions.d.ts +4 -1
  41. package/dist/components/Table/Filter/useServerFilterOptions.d.ts.map +1 -1
  42. package/dist/components/Table/Filter/useServerFilterOptions.js +28 -25
  43. package/dist/components/Table/Table.filterTypes.d.ts +5 -0
  44. package/dist/components/Table/Table.filterTypes.d.ts.map +1 -1
  45. package/dist/components/Table/TableHead.js +6 -6
  46. package/dist/components/Table/TableMobileCard.d.ts.map +1 -1
  47. package/dist/components/Table/TableMobileCard.js +27 -26
  48. package/dist/components/Table/TableMobileView.js +46 -46
  49. package/dist/components/Table/TableRow.js +1 -1
  50. package/dist/components/Tabs/Tabs.d.ts.map +1 -1
  51. package/dist/components/Tabs/Tabs.js +25 -24
  52. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  53. package/dist/components/Tooltip/Tooltip.js +37 -36
  54. package/dist/dev/index.js +18 -19
  55. package/dist/dev/types/vanilla/src/dev/panelStyles.d.ts +1 -1
  56. package/dist/hooks/useAutoId.js +3 -3
  57. package/dist/index.d.ts +1 -1
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/shared/kitCopy.js +1 -1
  60. package/dist/shared/kitRegistry.d.ts +2 -2
  61. package/dist/shared/optionStateColors.d.ts +2 -2
  62. package/dist/shared/optionStateColors.js +4 -4
  63. package/dist/style-no-fonts.css +1 -1
  64. package/dist/style.css +1 -1
  65. package/dist/style.layer.css +2 -2
  66. package/dist/style.shell.css +3 -3
  67. package/dist/utils/inputMode.d.ts +5 -0
  68. package/dist/utils/inputMode.d.ts.map +1 -1
  69. package/dist/vanilla/core/dateMask.js +1 -1
  70. package/dist/vanilla/core/describeError.js +10 -10
  71. package/dist/vanilla/core/inputMode.js +18 -11
  72. package/package.json +1 -1
  73. package/dist/shared/devLauncherOffset.d.ts +0 -8
  74. package/dist/shared/devLauncherOffset.d.ts.map +0 -1
  75. package/dist/vanilla/core/devLauncherOffset.js +0 -20
@@ -6,7 +6,7 @@ import { Select$u as fe } from "../Select/Select.js";
6
6
  import { Preloader$u as he } from "../Preloader/Preloader.js";
7
7
  import { Tooltip$u as ve } from "../Tooltip/Tooltip.js";
8
8
  import { MobileCard$u as _e, MobileCollapsibleField$u as ge } from "./TableMobileCard.js";
9
- const ye = ({
9
+ const Re = ({
10
10
  filteredColumns: m,
11
11
  pagedData: P,
12
12
  filteredDataLength: D,
@@ -28,9 +28,9 @@ const ye = ({
28
28
  mobileFilterOptions: f,
29
29
  renderMobileFilter: T,
30
30
  onMobileFiltersReset: ae,
31
- mobileFilterSortLabel: ie,
31
+ mobileFilterSortLabel: oe,
32
32
  renderMobileCard: W,
33
- mobileCardCollapsible: oe,
33
+ mobileCardCollapsible: ie,
34
34
  mobileCardLabels: j = !0,
35
35
  mobileMaxVisible: h,
36
36
  mobileCardColumns: v = 1,
@@ -40,33 +40,33 @@ const ye = ({
40
40
  mobileCardInset: q,
41
41
  mobileCardDensity: J = "default"
42
42
  }) => {
43
- const K = `${q ? " u-table-mobile-card--inset" : ""}${J === "compact" ? " u-table-mobile-card--compact" : ""}`, E = X(null), [Q, re] = Y({ atStart: !0, atEnd: !0 }), R = () => {
44
- const l = E.current;
43
+ const K = `${q ? " u-table-mobile-card--inset" : ""}${J === "compact" ? " u-table-mobile-card--compact" : ""}`, y = X(null), [Q, re] = Y({ atStart: !0, atEnd: !0 }), E = () => {
44
+ const l = y.current;
45
45
  if (!l) return;
46
- const i = l.scrollWidth > l.clientWidth + 1;
46
+ const o = l.scrollWidth > l.clientWidth + 1;
47
47
  re({
48
- atStart: !i || l.scrollLeft <= 1,
49
- atEnd: !i || l.scrollLeft + l.clientWidth >= l.scrollWidth - 1
48
+ atStart: !o || l.scrollLeft <= 1,
49
+ atEnd: !o || l.scrollLeft + l.clientWidth >= l.scrollWidth - 1
50
50
  });
51
51
  };
52
52
  Z(() => {
53
53
  if (!H || p !== "segments") return;
54
- const l = E.current;
54
+ const l = y.current;
55
55
  if (!l || typeof ResizeObserver > "u") return;
56
- R();
57
- const i = new ResizeObserver(R);
58
- return i.observe(l), () => i.disconnect();
56
+ E();
57
+ const o = new ResizeObserver(E);
58
+ return o.observe(l), () => o.disconnect();
59
59
  }, [H, p, I]);
60
- const y = X(null), [_, $] = Y(!1);
60
+ const R = X(null), [_, $] = Y(!1);
61
61
  Z(() => {
62
62
  if (!_) return;
63
- const l = (i) => {
64
- y.current && !y.current.contains(i.target) && $(!1);
63
+ const l = (o) => {
64
+ R.current && !R.current.contains(o.target) && $(!1);
65
65
  };
66
66
  return document.addEventListener("mousedown", l), () => document.removeEventListener("mousedown", l);
67
67
  }, [_]);
68
- const b = (l, i, r) => l.renderMobile ? l.renderMobile(i, r) : l.render ? l.render(i, r) : i[l.field], o = m.find((l) => l.mobilePrimary) ?? m[0], g = m.filter(
69
- (l) => l !== o && l.mobileHidden !== !0
68
+ const b = (l, o, r) => l.renderMobile ? l.renderMobile(o, r) : l.render ? l.render(o, r) : o[l.field], i = m.find((l) => l.mobilePrimary) ?? m[0], g = m.filter(
69
+ (l) => l !== i && l.mobileHidden !== !0
70
70
  ), d = g.find((l) => l.mobileSubtitle), U = g.filter((l) => l.mobileActions), k = g.filter((l) => l !== d && !l.mobileActions), te = k.filter((l) => l.mobileInline), ne = k.filter(
71
71
  (l) => l.mobileSecondary && !l.mobileInline
72
72
  ), G = k.filter(
@@ -84,13 +84,13 @@ const ye = ({
84
84
  options: f,
85
85
  renderFilter: T,
86
86
  onReset: ae,
87
- sortLabel: ie
87
+ sortLabel: oe
88
88
  }
89
89
  ) });
90
90
  const l = m.filter((e) => e.sortOn);
91
91
  if (!(le ?? l.length > 0) || l.length === 0) return null;
92
92
  const r = l.find((e) => e.field === u);
93
- return p === "menu" ? /* @__PURE__ */ n("div", { className: "u-table-mobile-sortmenu", ref: y, children: [
93
+ return p === "menu" ? /* @__PURE__ */ n("div", { className: "u-table-mobile-sortmenu", ref: R, children: [
94
94
  /* @__PURE__ */ n(
95
95
  "button",
96
96
  {
@@ -100,7 +100,7 @@ const ye = ({
100
100
  "aria-expanded": _,
101
101
  "aria-haspopup": "listbox",
102
102
  children: [
103
- /* @__PURE__ */ a(w, { name: "sorting", size: "16px", color: "#1E4391" }),
103
+ /* @__PURE__ */ a(w, { name: "sorting", size: "16px", color: "var(--u-color-primary, #1E4391)" }),
104
104
  /* @__PURE__ */ a("span", { className: "u-table-mobile-sortmenu__label", children: r ? r.mobileLabel ?? r.title ?? r.field : c })
105
105
  ]
106
106
  }
@@ -123,7 +123,7 @@ const ye = ({
123
123
  {
124
124
  name: L === "desc" ? "down-arrow" : "up-arrow",
125
125
  size: "12px",
126
- color: "#1E4391"
126
+ color: "var(--u-color-primary, #1E4391)"
127
127
  }
128
128
  )
129
129
  ]
@@ -134,8 +134,8 @@ const ye = ({
134
134
  ] }) : p === "segments" ? /* @__PURE__ */ a(
135
135
  "div",
136
136
  {
137
- ref: E,
138
- onScroll: R,
137
+ ref: y,
138
+ onScroll: E,
139
139
  className: `u-table-mobile-sortseg${Q.atStart ? "" : " u-table-mobile-sortseg--clip-start"}${Q.atEnd ? "" : " u-table-mobile-sortseg--clip-end"}`,
140
140
  role: "group",
141
141
  "aria-label": c,
@@ -162,7 +162,7 @@ const ye = ({
162
162
  {
163
163
  name: L === "desc" ? "down-arrow" : "up-arrow",
164
164
  size: "10px",
165
- color: "#1E4391",
165
+ color: "var(--u-color-primary, #1E4391)",
166
166
  className: "u-table-mobile-sortseg__arrow"
167
167
  }
168
168
  )
@@ -201,17 +201,17 @@ const ye = ({
201
201
  {
202
202
  name: L === "desc" ? "down-arrow" : "up-arrow",
203
203
  size: "20px",
204
- color: "#1E4391"
204
+ color: "var(--u-color-primary, #1E4391)"
205
205
  }
206
206
  )
207
207
  }
208
208
  )
209
209
  ] })
210
210
  ] });
211
- }, me = (l, i) => {
212
- if (W) return W(l, i);
211
+ }, me = (l, o) => {
212
+ if (W) return W(l, o);
213
213
  const r = v === 3 ? " u-table-mobile-card__fields--cols3" : v === 2 ? " u-table-mobile-card__fields--cols2" : "";
214
- return oe ? /* @__PURE__ */ a(
214
+ return ie ? /* @__PURE__ */ a(
215
215
  _e,
216
216
  {
217
217
  flat: x,
@@ -220,17 +220,17 @@ const ye = ({
220
220
  divider: S,
221
221
  showLabels: j,
222
222
  columns: v,
223
- title: o ? b(o, l, i) : null,
224
- titleLabel: o ? o.mobileLabel ?? o.title : null,
225
- titleHideLabel: !!(o != null && o.mobileHideLabel),
226
- titleColor: o == null ? void 0 : o.mobileValueColor,
227
- titleLabelColor: o == null ? void 0 : o.mobileLabelColor,
228
- subtitle: d ? b(d, l, i) : null,
223
+ title: i ? b(i, l, o) : null,
224
+ titleLabel: i ? i.mobileLabel ?? i.title : null,
225
+ titleHideLabel: !!(i != null && i.mobileHideLabel),
226
+ titleColor: i == null ? void 0 : i.mobileValueColor,
227
+ titleLabelColor: i == null ? void 0 : i.mobileLabelColor,
228
+ subtitle: d ? b(d, l, o) : null,
229
229
  subtitleColor: d == null ? void 0 : d.mobileValueColor,
230
- actions: U.length ? U.map((e) => /* @__PURE__ */ a("span", { children: b(e, l, i) }, e.field)) : void 0,
230
+ actions: U.length ? U.map((e) => /* @__PURE__ */ a("span", { children: b(e, l, o) }, e.field)) : void 0,
231
231
  inline: te.map((e) => ({
232
232
  label: e.mobileLabel ?? e.title,
233
- value: b(e, l, i),
233
+ value: b(e, l, o),
234
234
  hideLabel: !!e.mobileHideLabel,
235
235
  valueColor: e.mobileValueColor,
236
236
  labelColor: e.mobileLabelColor,
@@ -240,7 +240,7 @@ const ye = ({
240
240
  })),
241
241
  body: se.map((e) => ({
242
242
  label: e.mobileLabel ?? e.title,
243
- value: b(e, l, i),
243
+ value: b(e, l, o),
244
244
  hideLabel: !!e.mobileHideLabel,
245
245
  valueColor: e.mobileValueColor,
246
246
  labelColor: e.mobileLabelColor,
@@ -250,7 +250,7 @@ const ye = ({
250
250
  })),
251
251
  details: be.map((e) => ({
252
252
  label: e.mobileLabel ?? e.title,
253
- value: b(e, l, i),
253
+ value: b(e, l, o),
254
254
  hideLabel: !!e.mobileHideLabel,
255
255
  valueColor: e.mobileValueColor,
256
256
  labelColor: e.mobileLabelColor,
@@ -259,15 +259,15 @@ const ye = ({
259
259
  gridRowSpan: e.mobileGridRowSpan
260
260
  }))
261
261
  },
262
- l.id ?? i
262
+ l.id ?? o
263
263
  ) : /* @__PURE__ */ n(
264
264
  "div",
265
265
  {
266
266
  className: `u-table-mobile-card${x ? " u-table-mobile-card--flat" : ""}${S ? " u-table-mobile-card--divider" : ""}${v === 3 ? " u-table-mobile-card--cols3" : ""}${K}`,
267
267
  children: [
268
- o && /* @__PURE__ */ a("div", { className: "u-table-mobile-card__title", style: o.mobileValueColor ? { color: o.mobileValueColor } : void 0, children: b(o, l, i) }),
268
+ i && /* @__PURE__ */ a("div", { className: "u-table-mobile-card__title", style: i.mobileValueColor ? { color: i.mobileValueColor } : void 0, children: b(i, l, o) }),
269
269
  /* @__PURE__ */ a("div", { className: "u-table-mobile-card__fields" + r, children: g.map((e, t) => {
270
- const s = b(e, l, i);
270
+ const s = b(e, l, o);
271
271
  if (s == null || s === "" || s === !1 || Array.isArray(s) && s.length === 0) return null;
272
272
  const V = j && !e.mobileHideLabel ? e.mobileLabel ?? e.title : null, ue = e.mobileGridSpan === "full" ? " u-table-mobile-card__row--span-full" : e.mobileGridSpan === 2 ? " u-table-mobile-card__row--span2" : e.mobileGridSpan === "narrow" ? " u-table-mobile-card__row--span-narrow" : "";
273
273
  return e.mobileCollapsible || e.mobileExpandLines ? /* @__PURE__ */ a(
@@ -292,25 +292,25 @@ const ye = ({
292
292
  }) })
293
293
  ]
294
294
  },
295
- l.id ?? i
295
+ l.id ?? o
296
296
  );
297
297
  };
298
298
  return /* @__PURE__ */ n(ce, { children: [
299
299
  de(),
300
- z && !A ? /* @__PURE__ */ a("div", { className: "u-table-mobile-list", "aria-hidden": "true", children: Array.from({ length: I || F }, (l, i) => /* @__PURE__ */ n("div", { className: `u-table-mobile-card u-table-mobile-card--skeleton${x ? " u-table-mobile-card--flat" : ""}${S ? " u-table-mobile-card--divider" : ""}${K}`, children: [
300
+ z && !A ? /* @__PURE__ */ a("div", { className: "u-table-mobile-list", "aria-hidden": "true", children: Array.from({ length: I || F }, (l, o) => /* @__PURE__ */ n("div", { className: `u-table-mobile-card u-table-mobile-card--skeleton${x ? " u-table-mobile-card--flat" : ""}${S ? " u-table-mobile-card--divider" : ""}${K}`, children: [
301
301
  /* @__PURE__ */ a("div", { className: "skeleton-cell u-table-mobile-card__skeleton-title" }),
302
302
  /* @__PURE__ */ n("div", { className: "u-table-mobile-card__skeleton-fields", children: [
303
303
  /* @__PURE__ */ a("div", { className: "skeleton-cell" }),
304
304
  /* @__PURE__ */ a("div", { className: "skeleton-cell" })
305
305
  ] })
306
- ] }, i)) }) : z || A ? /* @__PURE__ */ a("div", { className: "u-table-mobile-loading", children: /* @__PURE__ */ a(he, { variant: "large-primary", className: "" }) }) : D === 0 ? M ? /* @__PURE__ */ a("div", { className: "u-table-mobile-empty", children: M }) : null : /* @__PURE__ */ a(
306
+ ] }, o)) }) : z || A ? /* @__PURE__ */ a("div", { className: "u-table-mobile-loading", children: /* @__PURE__ */ a(he, { variant: "large-primary", className: "" }) }) : D === 0 ? M ? /* @__PURE__ */ a("div", { className: "u-table-mobile-empty", children: M }) : null : /* @__PURE__ */ a(
307
307
  "div",
308
308
  {
309
309
  className: "u-table-mobile-list",
310
310
  style: O != null ? { gap: O } : void 0,
311
- children: P.map((l, i) => me(l, i))
311
+ children: P.map((l, o) => me(l, o))
312
312
  }
313
313
  )
314
314
  ] });
315
315
  };
316
- export { ye as TableMobileView$u };
316
+ export { Re as TableMobileView$u };
@@ -121,7 +121,7 @@ const C = "auto", P = ({
121
121
  "path",
122
122
  {
123
123
  d: "M1 4.5625L5.99999 9.5625L11 4.5625",
124
- stroke: "#1E4391",
124
+ style: { stroke: "var(--u-color-primary, #1E4391)" },
125
125
  strokeWidth: "2",
126
126
  strokeLinecap: "round",
127
127
  strokeLinejoin: "round"
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,mDAAmD,CAAC;AAC3D,OAAO,aAAa,CAAC;AACrB,OAAO,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAsB,cAAc,EAAE,MAAM,cAAc,CAAC;AA0BvE,eAAO,MAAM,IAAI,GAAI,wHAWlB,cAAc,4CA6LhB,CAAC"}
1
+ {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,mDAAmD,CAAC;AAC3D,OAAO,aAAa,CAAC;AACrB,OAAO,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAsB,cAAc,EAAE,MAAM,cAAc,CAAC;AA2BvE,eAAO,MAAM,IAAI,GAAI,wHAWlB,cAAc,4CA6LhB,CAAC"}
@@ -3,32 +3,33 @@ import { jsxs as a, jsx as r } from "react/jsx-runtime";
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  /* empty css */
6
- import { useState as x, useRef as p, useId as D, useEffect as ee, Fragment as oe } from "react";
6
+ import { useState as x, useRef as p, useEffect as D, Fragment as ee } from "react";
7
7
  import { Icon$u as b } from "../Icon/Icon.js";
8
- import { Tooltip$u as te } from "../Tooltip/Tooltip.js";
9
- import { useDismiss$u as re } from "../../hooks/useDismiss.js";
10
- import { useMountTransition$u as ne } from "../../hooks/useMountTransition.js";
11
- import { getPopupTransitionStyle$u as se, POPUP_TRANSITION_MS$u as ie } from "../../shared/popupTransition.js";
12
- import { useTabsOverflow$u as le } from "./useTabsOverflow.js";
13
- import { useTabsIndicator$u as ae } from "./useTabsIndicator.js";
14
- import { useTabsScroll$u as ce } from "./useTabsScroll.js";
8
+ import { Tooltip$u as oe } from "../Tooltip/Tooltip.js";
9
+ import { useDismiss$u as te } from "../../hooks/useDismiss.js";
10
+ import { useMountTransition$u as re } from "../../hooks/useMountTransition.js";
11
+ import { getPopupTransitionStyle$u as ne, POPUP_TRANSITION_MS$u as se } from "../../shared/popupTransition.js";
12
+ import { useTabsOverflow$u as ie } from "./useTabsOverflow.js";
13
+ import { useTabsIndicator$u as le } from "./useTabsIndicator.js";
14
+ import { useTabsScroll$u as ae } from "./useTabsScroll.js";
15
+ import { useAutoId$u as ce } from "../../hooks/useAutoId.js";
15
16
  import { isPlainLeftClick$u as ue } from "../../vanilla/core/linkClick.js";
16
- const me = [], Ie = ({
17
+ const me = [], Se = ({
17
18
  onClick: h,
18
19
  tabsData: n = me,
19
20
  activeTab: m,
20
- className: $ = "",
21
+ className: w = "",
21
22
  variant: g = "line",
22
23
  fullWidth: y = !1,
23
24
  tooltipOn: U = !1,
24
25
  tooltipDisabled: _ = !1,
25
- LinkComponent: v,
26
+ LinkComponent: $,
26
27
  ariaLabel: B
27
28
  }) => {
28
- const { containerRef: K, measureRef: j, moreMeasureRef: q, visible: z, overflow: u, paddingOf: F, promote: L } = le(n, m, y, g !== "segment"), [d, c] = x(!1), R = p(null), N = p(null), k = p(null), O = D(), { shouldRender: H, status: J, isAnimated: Y } = ne({ isOpen: d, duration: ie }), A = p(u);
29
- d && (A.current = u);
30
- const f = g === "segment", T = n.some((e) => e.url), w = f ? "u-tab-segment" : "u-tab-line", G = f ? "u-tab-segment-active" : "u-tab-active", { trackRef: I, indicatorRef: Q } = ae(m, `${g}|${y}|${JSON.stringify(n.map((e) => e.id))}`);
31
- ce(I, !f, m), re({ refs: [R], enabled: d, onDismiss: () => c(!1) }), ee(() => {
29
+ const { containerRef: K, measureRef: j, moreMeasureRef: q, visible: z, overflow: u, paddingOf: F, promote: L } = ie(n, m, y, g !== "segment"), [d, c] = x(!1), R = p(null), N = p(null), k = p(null), A = ce(void 0, "u-tabs-menu"), { shouldRender: H, status: J, isAnimated: Y } = re({ isOpen: d, duration: se }), O = p(u);
30
+ d && (O.current = u);
31
+ const f = g === "segment", T = n.some((e) => e.url), v = f ? "u-tab-segment" : "u-tab-line", G = f ? "u-tab-segment-active" : "u-tab-active", { trackRef: I, indicatorRef: Q } = le(m, `${g}|${y}|${JSON.stringify(n.map((e) => e.id))}`);
32
+ ae(I, !f, m), te({ refs: [R], enabled: d, onDismiss: () => c(!1) }), D(() => {
32
33
  u.length || c(!1);
33
34
  }, [u.length]);
34
35
  const S = (e) => {
@@ -63,10 +64,10 @@ const me = [], Ie = ({
63
64
  const l = (W) => {
64
65
  ue(W) && S(e);
65
66
  };
66
- return v ? /* @__PURE__ */ r(v, { to: i.url, ...o, onClick: l, children: t }) : /* @__PURE__ */ r("a", { href: i.url, ...o, onClick: l, children: t });
67
+ return $ ? /* @__PURE__ */ r($, { to: i.url, ...o, onClick: l, children: t }) : /* @__PURE__ */ r("a", { href: i.url, ...o, onClick: l, children: t });
67
68
  }, E = (e, o = !1) => {
68
69
  const t = n[e], s = !!(t.icon && t.iconOnly), i = t.icon ? s ? " u-tab-icon-only" : ` u-tab-with-icon${t.iconPosition === "right" ? " u-tab-icon-right" : ""}` : "", l = C(e, {
69
- className: `${w}${i}${t.id === m ? ` ${G}` : ""}${t.disabled ? " u-tab--disabled" : ""}`,
70
+ className: `${v}${i}${t.id === m ? ` ${G}` : ""}${t.disabled ? " u-tab--disabled" : ""}`,
70
71
  "data-label": s ? void 0 : t.title,
71
72
  "aria-label": s ? t.title : void 0,
72
73
  "data-measure-tab": o ? "" : void 0,
@@ -78,13 +79,13 @@ const me = [], Ie = ({
78
79
  "aria-current": !o && t.id === m ? "page" : void 0,
79
80
  "aria-disabled": !o && t.disabled ? "true" : void 0
80
81
  }, Z(t), o);
81
- return /* @__PURE__ */ r("div", { className: "u-tabs-item", children: U && !_ && !o ? /* @__PURE__ */ r(te, { tooltipText: t.title, portalOn: !0, className: "u-tabs-tooltip", children: l }) : l }, e);
82
+ return /* @__PURE__ */ r("div", { className: "u-tabs-item", children: U && !_ && !o ? /* @__PURE__ */ r(oe, { tooltipText: t.title, portalOn: !0, className: "u-tabs-tooltip", children: l }) : l }, e);
82
83
  };
83
84
  return /* @__PURE__ */ a(
84
85
  T ? "nav" : "div",
85
86
  {
86
87
  ref: K,
87
- className: `u-tabs ${f ? "u-tabs-segment" : "u-tabs-line"}${y ? " u-tabs-full-width" : ""}${$ ? ` ${$}` : ""}`,
88
+ className: `u-tabs ${f ? "u-tabs-segment" : "u-tabs-line"}${y ? " u-tabs-full-width" : ""}${w ? ` ${w}` : ""}`,
88
89
  "aria-label": T ? B : void 0,
89
90
  children: [
90
91
  /* @__PURE__ */ a("div", { className: "u-tabs-track", ref: I, children: [
@@ -106,10 +107,10 @@ const me = [], Ie = ({
106
107
  {
107
108
  type: "button",
108
109
  ref: N,
109
- className: `${w} u-tabs-more-trigger`,
110
+ className: `${v} u-tabs-more-trigger`,
110
111
  "aria-expanded": d,
111
112
  "aria-haspopup": "menu",
112
- "aria-controls": O,
113
+ "aria-controls": A,
113
114
  onClick: () => c((e) => !e),
114
115
  onKeyDown: (e) => {
115
116
  (e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), e.stopPropagation(), c(!0), requestAnimationFrame(() => V(e.key === "ArrowUp" ? -1 : 0)));
@@ -120,7 +121,7 @@ const me = [], Ie = ({
120
121
  ]
121
122
  }
122
123
  ),
123
- H && /* @__PURE__ */ r("div", { className: "u-tabs-more-menu", role: "menu", id: O, ref: k, style: se(J, Y), children: A.current.filter((e) => n[e]).map((e) => /* @__PURE__ */ r(oe, { children: C(e, {
124
+ H && /* @__PURE__ */ r("div", { className: "u-tabs-more-menu", role: "menu", id: A, ref: k, style: ne(J, Y), children: O.current.filter((e) => n[e]).map((e) => /* @__PURE__ */ r(ee, { children: C(e, {
124
125
  role: "menuitem",
125
126
  "aria-disabled": n[e].disabled ? "true" : void 0,
126
127
  tabIndex: n[e].disabled ? -1 : void 0
@@ -134,7 +135,7 @@ const me = [], Ie = ({
134
135
  ] }),
135
136
  /* @__PURE__ */ a("div", { ref: j, className: "u-tabs-measure", "aria-hidden": "true", children: [
136
137
  n.map((e, o) => E(o, !0)),
137
- f && /* @__PURE__ */ a("button", { ref: q, type: "button", tabIndex: -1, className: `${w} u-tabs-more-trigger u-tabs-more-measure`, children: [
138
+ f && /* @__PURE__ */ a("button", { ref: q, type: "button", tabIndex: -1, className: `${v} u-tabs-more-trigger u-tabs-more-measure`, children: [
138
139
  /* @__PURE__ */ r("span", { children: "Ещё" }),
139
140
  /* @__PURE__ */ r(b, { name: "down", size: 14 })
140
141
  ] })
@@ -143,4 +144,4 @@ const me = [], Ie = ({
143
144
  }
144
145
  );
145
146
  };
146
- export { Ie as Tabs$u };
147
+ export { Se as Tabs$u };
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,kCAAkC,CAAC;AAE1C,OAAO,sDAAsD,CAAC;AAC9D,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AA2OpD,eAAO,MAAM,OAAO,GAAI,wHAYrB,iBAAiB,4CAgRnB,CAAC"}
1
+ {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,kCAAkC,CAAC;AAE1C,OAAO,sDAAsD,CAAC;AAC9D,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AA4OpD,eAAO,MAAM,OAAO,GAAI,wHAYrB,iBAAiB,4CAgRnB,CAAC"}
@@ -1,11 +1,12 @@
1
- import { jsxs as X, jsx as $ } from "react/jsx-runtime";
2
- import { useRef as z, useState as N, useCallback as B, useEffect as v, useLayoutEffect as W, useId as q } from "react";
1
+ import { jsxs as X, jsx as N } from "react/jsx-runtime";
2
+ import { useRef as z, useState as Y, useCallback as B, useEffect as v, useLayoutEffect as W } from "react";
3
3
  /* empty css */
4
- import { createPortal as tt } from "react-dom";
4
+ import { createPortal as q } from "react-dom";
5
5
  /* empty css */
6
6
  /* empty css */
7
- import { getPortalScopeProps$u as et } from "../../shared/uiKitDefaults.js";
8
- import { useMountTransition$u as nt } from "../../hooks/useMountTransition.js";
7
+ import { getPortalScopeProps$u as tt } from "../../shared/uiKitDefaults.js";
8
+ import { useMountTransition$u as et } from "../../hooks/useMountTransition.js";
9
+ import { useAutoId$u as nt } from "../../hooks/useAutoId.js";
9
10
  import { MOTION_EASE$u as C, motionMs$u as L, MOTION_MS$u as rt } from "../../vanilla/core/motion.js";
10
11
  const ot = 100, it = {
11
12
  top: "0 var(--u-motion-shift-sm, 4px)",
@@ -50,8 +51,8 @@ const ot = 100, it = {
50
51
  let f = M.x;
51
52
  const x = n / 2;
52
53
  f - x < R ? f = x + R : f + x > m - R && (f = m - R - x);
53
- const T = t.x + t.width / 2, s = Math.max(0, x - ct), Y = Math.max(-s, Math.min(s, T - f));
54
- return { placement: M.placement, x: f, y: M.y, arrowShift: Y };
54
+ const T = t.x + t.width / 2, s = Math.max(0, x - ct), $ = Math.max(-s, Math.min(s, T - f));
55
+ return { placement: M.placement, x: f, y: M.y, arrowShift: $ };
55
56
  }, K = (r) => {
56
57
  const t = document.activeElement;
57
58
  if (!r || !t || !r.contains(t)) return !1;
@@ -68,12 +69,12 @@ const at = () => {
68
69
  U || typeof document > "u" || (U = !0, document.addEventListener("pointerdown", () => {
69
70
  Q = Date.now();
70
71
  }, { capture: !0, passive: !0 }));
71
- }, mt = () => document.documentElement.getAttribute("data-input-mode") !== "keyboard" && Date.now() - Q < dt, St = ({
72
- children: r = /* @__PURE__ */ $("div", {}),
72
+ }, mt = () => document.documentElement.getAttribute("data-input-mode") !== "keyboard" && Date.now() - Q < dt, Rt = ({
73
+ children: r = /* @__PURE__ */ N("div", {}),
73
74
  className: t = "",
74
75
  portalOn: n = !1,
75
76
  id: a = "",
76
- tooltipText: u = /* @__PURE__ */ $("div", {}),
77
+ tooltipText: u = /* @__PURE__ */ N("div", {}),
77
78
  style: y,
78
79
  tooltipStyle: m,
79
80
  position: w = "top",
@@ -81,19 +82,19 @@ const at = () => {
81
82
  showWhenActive: d = !1,
82
83
  showDelay: M = ot
83
84
  }) => {
84
- const f = z(null), x = z(null), T = z(null), [s, Y] = N(!1), [_, I] = N(null), [o, p] = N(null), [b, H] = N(w), [k, G] = N(!1), P = () => {
85
+ const f = z(null), x = z(null), T = z(null), [s, $] = Y(!1), [_, I] = Y(null), [o, p] = Y(null), [b, H] = Y(w), [k, G] = Y(!1), P = () => {
85
86
  T.current && (clearTimeout(T.current), T.current = null);
86
87
  }, h = B(() => {
87
- P(), Y(!1), I(null), G(!1);
88
- }, []), { shouldRender: D, isAnimated: j } = nt({ isOpen: s, duration: rt.instant });
88
+ P(), $(!1), I(null), G(!1);
89
+ }, []), { shouldRender: D, isAnimated: j } = et({ isOpen: s, duration: rt.instant });
89
90
  v(() => {
90
91
  D || (p(null), H(w));
91
92
  }, [D, w]);
92
- const F = B((e) => {
93
+ const A = B((e) => {
93
94
  P();
94
95
  const { x: c, y: i, width: l, height: E } = e.getBoundingClientRect();
95
- I({ x: c, y: i, width: l, height: E, scrollY: window.scrollY }), Y(!0);
96
- }, []), O = B((e) => {
96
+ I({ x: c, y: i, width: l, height: E, scrollY: window.scrollY }), $(!0);
97
+ }, []), F = B((e) => {
97
98
  const { x: c, y: i, width: l, height: E } = e.getBoundingClientRect();
98
99
  I((S) => S && { x: c, y: i, width: l, height: E, scrollY: window.scrollY });
99
100
  }, []);
@@ -114,19 +115,19 @@ const at = () => {
114
115
  if (d && g) return;
115
116
  const c = f.current;
116
117
  if (c && K(c)) {
117
- O(c);
118
+ F(c);
118
119
  return;
119
120
  }
120
121
  h();
121
122
  };
122
123
  return window.addEventListener("scroll", e, !0), () => window.removeEventListener("scroll", e, !0);
123
- }, [s, d, g, h, O]), v(() => {
124
+ }, [s, d, g, h, F]), v(() => {
124
125
  if (!n || !s) return;
125
126
  let e;
126
127
  const c = () => {
127
128
  e !== void 0 && window.cancelAnimationFrame(e), e = window.requestAnimationFrame(() => {
128
129
  const S = f.current;
129
- S && O(S);
130
+ S && F(S);
130
131
  });
131
132
  };
132
133
  window.addEventListener("resize", c);
@@ -138,37 +139,37 @@ const at = () => {
138
139
  return E && (i == null || i.observe(E)), () => {
139
140
  window.removeEventListener("resize", c), i == null || i.disconnect(), e !== void 0 && window.cancelAnimationFrame(e);
140
141
  };
141
- }, [n, s, O]), v(() => {
142
+ }, [n, s, F]), v(() => {
142
143
  if (!d || !n) return;
143
144
  if (!g) {
144
145
  h();
145
146
  return;
146
147
  }
147
148
  const e = f.current;
148
- e && F(e);
149
- }, [d, n, g, h, F]), v(() => P, []), v(at, []);
150
- const Z = q(), A = a ? `u-tooltip${a}` : `u-tooltip${Z.replace(/:/g, "")}`;
149
+ e && A(e);
150
+ }, [d, n, g, h, A]), v(() => P, []), v(at, []);
151
+ const Z = nt(void 0, "u-tooltip"), O = a ? `u-tooltip${a}` : Z;
151
152
  return v(() => {
152
153
  const e = f.current;
153
154
  if (!n || !s || !e) return;
154
155
  const c = document.activeElement, i = c instanceof HTMLElement && e.contains(c) ? c : e, l = new Set((i.getAttribute("aria-describedby") ?? "").split(/\s+/).filter(Boolean));
155
- return l.add(A), i.setAttribute("aria-describedby", [...l].join(" ")), () => {
156
- const E = (i.getAttribute("aria-describedby") ?? "").split(/\s+/).filter((S) => S && S !== A);
156
+ return l.add(O), i.setAttribute("aria-describedby", [...l].join(" ")), () => {
157
+ const E = (i.getAttribute("aria-describedby") ?? "").split(/\s+/).filter((S) => S && S !== O);
157
158
  E.length ? i.setAttribute("aria-describedby", E.join(" ")) : i.removeAttribute("aria-describedby");
158
159
  };
159
- }, [n, s, A]), n ? /* @__PURE__ */ X(
160
+ }, [n, s, O]), n ? /* @__PURE__ */ X(
160
161
  "div",
161
162
  {
162
163
  ref: f,
163
164
  style: y,
164
165
  onMouseEnter: d ? void 0 : (e) => {
165
- g && F(e.currentTarget);
166
+ g && A(e.currentTarget);
166
167
  },
167
168
  onMouseLeave: d ? void 0 : () => {
168
169
  K(f.current) || h();
169
170
  },
170
171
  onFocus: d ? void 0 : (e) => {
171
- g && !mt() && F(e.currentTarget);
172
+ g && !mt() && A(e.currentTarget);
172
173
  },
173
174
  onBlur: d ? void 0 : (e) => {
174
175
  e.currentTarget.contains(e.relatedTarget) || h();
@@ -178,12 +179,12 @@ const at = () => {
178
179
  },
179
180
  className: `u-help ${t}`,
180
181
  children: [
181
- D && tt(
182
- /* @__PURE__ */ $(
182
+ D && q(
183
+ /* @__PURE__ */ N(
183
184
  "div",
184
185
  {
185
186
  ref: x,
186
- ...et(),
187
+ ...tt(),
187
188
  style: {
188
189
  left: (o == null ? void 0 : o.x) ?? 0,
189
190
  top: (o == null ? void 0 : o.y) ?? 0,
@@ -219,19 +220,19 @@ const at = () => {
219
220
  ...s ? null : { pointerEvents: "none" }
220
221
  },
221
222
  className: `u-help-tooltip u-help-tooltip-portal--${b}`,
222
- id: A,
223
+ id: O,
223
224
  role: "tooltip",
224
225
  children: u
225
226
  }
226
227
  ),
227
228
  document.body
228
229
  ),
229
- /* @__PURE__ */ $("div", { className: "u-help__content", children: r })
230
+ /* @__PURE__ */ N("div", { className: "u-help__content", children: r })
230
231
  ]
231
232
  }
232
233
  ) : /* @__PURE__ */ X("div", { style: y, className: `u-help ${t}`, children: [
233
- /* @__PURE__ */ $("div", { className: `u-help-tooltip u-help-tooltip--${w}`, children: u }),
234
- /* @__PURE__ */ $("div", { className: "u-help__content", children: r })
234
+ /* @__PURE__ */ N("div", { className: `u-help-tooltip u-help-tooltip--${w}`, children: u }),
235
+ /* @__PURE__ */ N("div", { className: "u-help__content", children: r })
235
236
  ] });
236
237
  };
237
- export { St as Tooltip$u };
238
+ export { Rt as Tooltip$u };