urfu-ui-kit-react 2.1.7-next.3 → 2.1.7-next.4
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.
- package/dist/components/Calendar/Calendar.d.ts.map +1 -1
- package/dist/components/Calendar/Calendar.js +226 -205
- package/dist/components/Calendar/Calendar.types.d.ts +19 -0
- package/dist/components/Calendar/Calendar.types.d.ts.map +1 -1
- package/dist/components/SearchSelect/SearchSelect.d.ts.map +1 -1
- package/dist/components/SearchSelect/SearchSelect.js +162 -152
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.js +34 -33
- package/dist/components/Tabs/distributeTabs.d.ts +7 -3
- package/dist/components/Tabs/distributeTabs.d.ts.map +1 -1
- package/dist/components/Tabs/useTabsOverflow.d.ts +4 -0
- package/dist/components/Tabs/useTabsOverflow.d.ts.map +1 -1
- package/dist/components/Tabs/useTabsOverflow.js +40 -41
- package/dist/dev/index.js +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/shared/kitCopy.js +1 -1
- package/dist/style-no-fonts.css +1 -1
- package/dist/style.css +1 -1
- package/dist/style.layer.css +2 -2
- package/dist/style.shell.css +2 -2
- package/dist/urfu-ui-kit-react.js +11 -10
- package/dist/vanilla/core/dateLimits.js +21 -0
- package/dist/vanilla/core/describeError.js +1 -1
- package/dist/vanilla/core/distributeTabs.js +36 -23
- package/package.json +1 -1
|
@@ -13,9 +13,9 @@ import { ErrorScreen$u as C } from "./components/ErrorScreen/ErrorScreen.js";
|
|
|
13
13
|
import { OfflineBanner$u as F } from "./components/OfflineBanner/OfflineBanner.js";
|
|
14
14
|
import { useOnlineStatus$u as U } from "./hooks/useOnlineStatus.js";
|
|
15
15
|
import { useCollapseMotion$u as R } from "./hooks/useCollapseMotion.js";
|
|
16
|
-
import { useEnterMotion$u as
|
|
17
|
-
import { Checkbox$u as
|
|
18
|
-
import { ConfirmModal$u as
|
|
16
|
+
import { useEnterMotion$u as D } from "./hooks/useEnterMotion.js";
|
|
17
|
+
import { Checkbox$u as h } from "./components/Checkbox/Checkbox.js";
|
|
18
|
+
import { ConfirmModal$u as w } from "./components/ConfirmModal/ConfirmModal.js";
|
|
19
19
|
import { ColumnSettings$u as B } from "./components/ColumnSettings/ColumnSettings.js";
|
|
20
20
|
import { FormField$u as K } from "./components/FormField/FormField.js";
|
|
21
21
|
import { Icon$u as N } from "./components/Icon/Icon.js";
|
|
@@ -28,7 +28,7 @@ import { Menu$u as $ } from "./components/Menu/Menu.js";
|
|
|
28
28
|
import { Message$u as or } from "./components/Message/Message.js";
|
|
29
29
|
import { Modal$u as tr } from "./components/Modal/Modal.js";
|
|
30
30
|
import { Drawer$u as mr } from "./components/Drawer/Drawer.js";
|
|
31
|
-
import { Multiselect$u as
|
|
31
|
+
import { Multiselect$u as ir } from "./components/Multiselect/Multiselect.js";
|
|
32
32
|
import { NotificationProvider$u as ar, useNotification$u as nr } from "./components/Notification/Notification.js";
|
|
33
33
|
import { Preloader$u as lr } from "./components/Preloader/Preloader.js";
|
|
34
34
|
import { Radio$u as cr } from "./components/Radio/Radio.js";
|
|
@@ -40,9 +40,9 @@ import { Switch$u as Ir } from "./components/Switch/Switch.js";
|
|
|
40
40
|
import { StickyActionBar$u as Lr } from "./components/StickyActionBar/StickyActionBar.js";
|
|
41
41
|
import { Table$u as Or } from "./components/Table/Table.js";
|
|
42
42
|
import { Pagination$u as Ar } from "./components/Pagination/Pagination.js";
|
|
43
|
-
import { Tabs$u as
|
|
44
|
-
import { TabPanels$u as
|
|
45
|
-
import { Textarea$u as
|
|
43
|
+
import { Tabs$u as Vr } from "./components/Tabs/Tabs.js";
|
|
44
|
+
import { TabPanels$u as kr } from "./components/TabPanels/TabPanels.js";
|
|
45
|
+
import { Textarea$u as _r } from "./components/Textarea/Textarea.js";
|
|
46
46
|
import { Tooltip$u as yr } from "./components/Tooltip/Tooltip.js";
|
|
47
47
|
import { TreeView$u as vr } from "./components/TreeView/TreeView.js";
|
|
48
48
|
import { VirtualList$u as Hr } from "./components/VirtualList/VirtualList.js";
|
|
@@ -53,13 +53,14 @@ import { useTableSort$u as Wr } from "./hooks/useTableSort.js";
|
|
|
53
53
|
import { usePagination$u as Zr } from "./hooks/usePagination.js";
|
|
54
54
|
import { compareValues$u as ro, nextSort$u as oo, sortRows$u as eo } from "./shared/sortRows.js";
|
|
55
55
|
import { configureUiKit$u as po, useUiKitViewport$u as mo } from "./responsive/uiKitResponsive.js";
|
|
56
|
-
import { TableFilterOptions$u as
|
|
56
|
+
import { TableFilterOptions$u as io } from "./components/Table/Filter/TableFilterOptions.js";
|
|
57
57
|
import { TableFilterDates$u as ao } from "./components/Table/Filter/FilterDateBox.js";
|
|
58
58
|
import { Skeleton$u as so } from "./components/Skeleton/Skeleton.js";
|
|
59
59
|
import { installInputModeTracking$u as o } from "./vanilla/core/inputMode.js";
|
|
60
60
|
import { DEFAULT_ERROR_TEXTS$u as uo, DEFAULT_SUPPORT_EMAIL$u as co, DEFAULT_SUPPORT_LABEL$u as To, configureErrorReport$u as So, configureErrorTexts$u as Eo, describeError$u as go, describeFieldErrors$u as bo, errorView$u as Mo, formatErrorDetails$u as Po, isHumanMessage$u as Co, supportMailto$u as Io } from "./vanilla/core/describeError.js";
|
|
61
61
|
import { hasPreviousPage$u as Lo } from "./vanilla/core/hasPreviousPage.js";
|
|
62
|
-
import {
|
|
62
|
+
import { maskDateValue$u as Oo } from "./vanilla/core/dateMask.js";
|
|
63
|
+
import { reconcileColumnOrder$u as Ao } from "./vanilla/core/reconcileColumnOrder.js";
|
|
63
64
|
r();
|
|
64
65
|
o();
|
|
65
|
-
export { u as Accordion, T as BreadCrumbs, d as Button, g as Calendar, M as Card,
|
|
66
|
+
export { u as Accordion, T as BreadCrumbs, d as Button, g as Calendar, M as Card, h as Checkbox, B as ColumnSettings, w as ConfirmModal, uo as DEFAULT_ERROR_TEXTS, co as DEFAULT_SUPPORT_EMAIL, To as DEFAULT_SUPPORT_LABEL, mr as Drawer, C as ErrorScreen, K as FormField, N as Icon, jr as InfiniteScroll, X as InputExpandTextarea, q as InputFile, G as InputNumber, Q as InputText, Y as InputTime, $ as Menu, or as Message, tr as Modal, ir as Multiselect, ar as NotificationProvider, F as OfflineBanner, Ar as Pagination, lr as Preloader, cr as Radio, Sr as Search, Er as SearchSelect, br as Select, so as Skeleton, Pr as Status, Lr as StickyActionBar, Ir as Switch, kr as TabPanels, Or as Table, ao as TableFilterDates, io as TableFilterOptions, Vr as Tabs, _r as Textarea, yr as Tooltip, vr as TreeView, Hr as VirtualList, ro as compareValues, So as configureErrorReport, Eo as configureErrorTexts, po as configureUiKit, go as describeError, bo as describeFieldErrors, Mo as errorView, Po as formatErrorDetails, n as getUiKitCopies, s as hasLegacyUiKitOverlay, Lo as hasPreviousPage, Co as isHumanMessage, Oo as maskDateValue, oo as nextSort, Ao as reconcileColumnOrder, eo as sortRows, Io as supportMailto, R as useCollapseMotion, D as useEnterMotion, Jr as useInfiniteScroll, nr as useNotification, U as useOnlineStatus, Zr as usePagination, Wr as useTableSort, mo as useUiKitViewport, zr as useVirtualList };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const l = (e) => {
|
|
2
|
+
if (e == null || e === "") return null;
|
|
3
|
+
const n = new Date(e);
|
|
4
|
+
return Number.isNaN(n.getTime()) ? null : (n.setHours(12, 0, 0, 0), n);
|
|
5
|
+
}, a = (e) => e.getFullYear() * 1e4 + e.getMonth() * 100 + e.getDate(), f = /* @__PURE__ */ new WeakMap(), i = (e) => {
|
|
6
|
+
const n = f.get(e);
|
|
7
|
+
if (n) return n;
|
|
8
|
+
const s = l(e.minDate), t = l(e.maxDate), r = [];
|
|
9
|
+
for (const c of e.excludeDates ?? []) {
|
|
10
|
+
const u = l(c);
|
|
11
|
+
u !== null && r.push(a(u));
|
|
12
|
+
}
|
|
13
|
+
const o = { min: s && a(s), max: t && a(t), excluded: r };
|
|
14
|
+
return f.set(e, o), o;
|
|
15
|
+
}, m = (e, n, s) => {
|
|
16
|
+
let t = a(e), r = a(n);
|
|
17
|
+
t > r && ([t, r] = [r, t]);
|
|
18
|
+
const { min: o, max: c, excluded: u } = i(s);
|
|
19
|
+
return o !== null && t < o || c !== null && r > c ? !0 : u.some((d) => d >= t && d <= r);
|
|
20
|
+
}, x = (e, n) => m(e, e, n);
|
|
21
|
+
export { x as isCalendarDayBlocked$u, m as isCalendarRangeBlocked$u, l as toCalendarDay$u };
|
|
@@ -230,7 +230,7 @@ function G() {
|
|
|
230
230
|
return `${e <= 576 ? "mobile" : e <= 900 ? "tablet" : "desktop"} (по ширине окна, шкала urfu не включена)`;
|
|
231
231
|
}
|
|
232
232
|
function T() {
|
|
233
|
-
return "2.1.7-next.
|
|
233
|
+
return "2.1.7-next.4";
|
|
234
234
|
}
|
|
235
235
|
function z(t) {
|
|
236
236
|
if (!(!s.roles && !t))
|
|
@@ -1,28 +1,41 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
3
|
-
if (
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
const I = 0.4, T = (e, a, u, r, p, c, m, N = 0, O = !1) => {
|
|
2
|
+
const h = e.length + Number(m), g = Math.max(0, h - 1) * p, b = m ? N : 0;
|
|
3
|
+
if (O) {
|
|
4
|
+
const t = (l) => Math.max(0, ...e.map((o) => a[o] - l * (u[o] ?? 0))) * e.length + (m ? c - l * b : 0) + g;
|
|
5
|
+
if (t(0) - r <= 0.01) return 0;
|
|
6
|
+
const s = r - 0.5;
|
|
7
|
+
if (t(1) > s) return 1;
|
|
8
|
+
let A = 0, i = 1;
|
|
9
|
+
for (let l = 0; l < 24; l += 1) {
|
|
10
|
+
const o = (A + i) / 2;
|
|
11
|
+
t(o) > s ? A = o : i = o;
|
|
12
|
+
}
|
|
13
|
+
return i;
|
|
14
|
+
}
|
|
15
|
+
const n = e.reduce((t, s) => t + a[s], 0) + (m ? c : 0) + g - r;
|
|
16
|
+
if (n <= 0.01) return 0;
|
|
17
|
+
const f = e.reduce((t, s) => t + (u[s] ?? 0), 0) + b;
|
|
18
|
+
return f > 0 ? Math.min(1, (n + 0.5) / f) : 0;
|
|
19
|
+
}, M = (e, a, u, r, p) => {
|
|
20
|
+
const c = T(e, a, u, r, p, 0, !1);
|
|
8
21
|
return c < 1 ? c : 0;
|
|
9
|
-
},
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
return
|
|
22
|
+
}, _ = (e, a, u, r, p, c, m = !1, N = [], O = 0) => {
|
|
23
|
+
const h = (t) => t <= u + 0.01, g = (t) => a[t] - (N[t] ?? 0), b = p - O, x = (t, s) => {
|
|
24
|
+
const A = m ? Math.max(0, ...t.map(g)) * t.length : t.reduce((l, o) => l + g(o), 0), i = t.length + Number(s);
|
|
25
|
+
return A + (s ? b : 0) + Math.max(0, i - 1) * r;
|
|
13
26
|
};
|
|
14
|
-
if (
|
|
15
|
-
return { visible:
|
|
16
|
-
const
|
|
17
|
-
for (const
|
|
18
|
-
if (!
|
|
19
|
-
|
|
27
|
+
if (u <= 0 || h(x(e, !1)))
|
|
28
|
+
return { visible: e, overflow: [] };
|
|
29
|
+
const n = [];
|
|
30
|
+
for (const t of e) {
|
|
31
|
+
if (!h(x([...n, t], !0))) break;
|
|
32
|
+
n.push(t);
|
|
20
33
|
}
|
|
21
|
-
const
|
|
22
|
-
for (
|
|
23
|
-
const
|
|
24
|
-
|
|
34
|
+
const f = e.includes(c) ? c : e[0];
|
|
35
|
+
for (f !== void 0 && !n.includes(f) && (n.length && n.pop(), n.push(f)); n.length > 1 && !h(x(n, !0)); ) {
|
|
36
|
+
const t = n.map((s) => s !== f).lastIndexOf(!0);
|
|
37
|
+
n.splice(t, 1);
|
|
25
38
|
}
|
|
26
|
-
return { visible:
|
|
39
|
+
return { visible: n, overflow: e.filter((t) => !n.includes(t)) };
|
|
27
40
|
};
|
|
28
|
-
export {
|
|
41
|
+
export { I as TAB_PADDING_MIN_RATIO$u, _ as distributeTabs$u, M as lineTabsSqueeze$u, T as tabsSqueeze$u };
|