urfu-ui-kit-react 2.1.7-next.3 → 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.
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion/Accordion.js +16 -15
- package/dist/components/BreadCrumbs/BreadCrumbs.d.ts.map +1 -1
- package/dist/components/BreadCrumbs/BreadCrumbs.js +23 -22
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +51 -50
- package/dist/components/Button/ButtonRefreshIcon.d.ts.map +1 -1
- package/dist/components/Button/ButtonRefreshIcon.js +9 -8
- package/dist/components/Calendar/Calendar.d.ts.map +1 -1
- package/dist/components/Calendar/Calendar.js +237 -216
- package/dist/components/Calendar/Calendar.types.d.ts +19 -0
- package/dist/components/Calendar/Calendar.types.d.ts.map +1 -1
- package/dist/components/Calendar/CalendarSelect.d.ts.map +1 -1
- package/dist/components/Calendar/CalendarSelect.js +41 -40
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/Card/Card.js +59 -58
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.js +20 -19
- package/dist/components/ColumnSettings/ColumnSettings.d.ts.map +1 -1
- package/dist/components/ColumnSettings/ColumnSettings.js +112 -111
- package/dist/components/ConfirmModal/ConfirmModal.d.ts.map +1 -1
- package/dist/components/ConfirmModal/ConfirmModal.js +30 -29
- package/dist/components/Drawer/Drawer.js +57 -57
- package/dist/components/ErrorScreen/ErrorScreen.d.ts.map +1 -1
- package/dist/components/ErrorScreen/ErrorScreen.js +151 -150
- package/dist/components/ErrorScreen/ErrorScreenIllustration.d.ts.map +1 -1
- package/dist/components/ErrorScreen/ErrorScreenIllustration.js +35 -34
- package/dist/components/FormField/FormField.d.ts.map +1 -1
- package/dist/components/FormField/FormField.js +30 -29
- package/dist/components/Icon/Icon.d.ts.map +1 -1
- package/dist/components/Icon/Icon.js +17 -16
- package/dist/components/InfiniteScroll/InfiniteScroll.d.ts.map +1 -1
- package/dist/components/InfiniteScroll/InfiniteScroll.js +23 -22
- package/dist/components/InputExpandTextarea/InputExpandTextarea.d.ts.map +1 -1
- package/dist/components/InputExpandTextarea/InputExpandTextarea.js +88 -87
- package/dist/components/InputFile/InputFile.d.ts.map +1 -1
- package/dist/components/InputFile/InputFile.js +99 -98
- package/dist/components/InputNumber/InputNumber.d.ts.map +1 -1
- package/dist/components/InputNumber/InputNumber.js +112 -111
- package/dist/components/InputText/InputAffix.d.ts.map +1 -1
- package/dist/components/InputText/InputAffix.js +69 -68
- package/dist/components/InputText/InputText.d.ts.map +1 -1
- package/dist/components/InputText/InputText.js +108 -107
- package/dist/components/InputTime/InputTime.d.ts.map +1 -1
- package/dist/components/InputTime/InputTime.js +202 -201
- package/dist/components/InputTime/InputTimeDropdown.d.ts.map +1 -1
- package/dist/components/InputTime/InputTimeDropdown.js +21 -20
- package/dist/components/Menu/Menu.d.ts.map +1 -1
- package/dist/components/Menu/Menu.js +58 -57
- package/dist/components/Message/Message.d.ts.map +1 -1
- package/dist/components/Message/Message.js +19 -18
- package/dist/components/Modal/Modal.js +66 -66
- package/dist/components/Modal/useModalTitleClearance.d.ts.map +1 -1
- package/dist/components/Modal/useModalTitleClearance.js +34 -33
- package/dist/components/Multiselect/Multiselect.js +222 -222
- package/dist/components/Notification/Notification.js +90 -90
- package/dist/components/OfflineBanner/OfflineBanner.d.ts.map +1 -1
- package/dist/components/OfflineBanner/OfflineBanner.js +40 -37
- package/dist/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.js +59 -58
- package/dist/components/Preloader/Preloader.d.ts.map +1 -1
- package/dist/components/Preloader/Preloader.js +28 -27
- package/dist/components/Radio/Radio.d.ts.map +1 -1
- package/dist/components/Radio/Radio.js +21 -20
- package/dist/components/Search/Search.d.ts.map +1 -1
- package/dist/components/Search/Search.js +33 -32
- package/dist/components/SearchSelect/SearchSelect.d.ts.map +1 -1
- package/dist/components/SearchSelect/SearchSelect.js +176 -166
- package/dist/components/SearchSelect/SearchSelectOption.d.ts.map +1 -1
- package/dist/components/SearchSelect/SearchSelectOption.js +21 -20
- package/dist/components/Select/MobileOptionSheet.d.ts.map +1 -1
- package/dist/components/Select/MobileOptionSheet.js +65 -64
- package/dist/components/Select/Select.js +184 -184
- package/dist/components/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/components/Skeleton/Skeleton.js +26 -25
- package/dist/components/Status/Status.d.ts.map +1 -1
- package/dist/components/Status/Status.js +36 -35
- package/dist/components/StickyActionBar/StickyActionBar.d.ts.map +1 -1
- package/dist/components/StickyActionBar/StickyActionBar.js +36 -35
- package/dist/components/Switch/Switch.d.ts.map +1 -1
- package/dist/components/Switch/Switch.js +19 -18
- package/dist/components/Table/Filter/DefaultInput.d.ts.map +1 -1
- package/dist/components/Table/Filter/DefaultInput.js +12 -11
- package/dist/components/Table/Filter/Filter.d.ts.map +1 -1
- package/dist/components/Table/Filter/Filter.js +99 -98
- package/dist/components/Table/Filter/FilterBooleanBox.d.ts.map +1 -1
- package/dist/components/Table/Filter/FilterBooleanBox.js +7 -6
- package/dist/components/Table/Filter/FilterBoxShell.js +48 -48
- package/dist/components/Table/Filter/FilterDateBox.d.ts.map +1 -1
- package/dist/components/Table/Filter/FilterDateBox.js +65 -64
- package/dist/components/Table/Filter/FilterSortIndicator.d.ts.map +1 -1
- package/dist/components/Table/Filter/FilterSortIndicator.js +8 -7
- package/dist/components/Table/Filter/SelectFilter.js +53 -53
- package/dist/components/Table/Filter/TableFilterOptions.d.ts.map +1 -1
- package/dist/components/Table/Filter/TableFilterOptions.js +141 -140
- package/dist/components/Table/Filter/TableFilterSortButton.d.ts.map +1 -1
- package/dist/components/Table/Filter/TableFilterSortButton.js +10 -9
- package/dist/components/Table/Filter/useVirtualOptionWindow.d.ts.map +1 -1
- package/dist/components/Table/Filter/useVirtualOptionWindow.js +9 -8
- package/dist/components/Table/Skeleton/createSkeletonColumns.d.ts.map +1 -1
- package/dist/components/Table/Skeleton/createSkeletonColumns.js +9 -8
- package/dist/components/Table/Table.d.ts.map +1 -1
- package/dist/components/Table/Table.helpers.d.ts.map +1 -1
- package/dist/components/Table/Table.helpers.js +31 -30
- package/dist/components/Table/Table.js +253 -252
- package/dist/components/Table/TableHead.d.ts.map +1 -1
- package/dist/components/Table/TableHead.js +92 -91
- package/dist/components/Table/TableMobileCard.d.ts.map +1 -1
- package/dist/components/Table/TableMobileCard.js +121 -120
- package/dist/components/Table/TableMobileFilters.d.ts.map +1 -1
- package/dist/components/Table/TableMobileFilters.js +28 -27
- package/dist/components/Table/TableMobileView.d.ts.map +1 -1
- package/dist/components/Table/TableMobileView.js +178 -177
- package/dist/components/Table/TableRow.d.ts.map +1 -1
- package/dist/components/Table/TableRow.js +59 -58
- package/dist/components/Table/useTableColumnPinning.d.ts +2 -917
- package/dist/components/Table/useTableColumnPinning.d.ts.map +1 -1
- package/dist/components/Table/useTableColumnPinning.js +21 -20
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.js +101 -99
- 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/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.js +70 -69
- package/dist/components/Tooltip/Tooltip.js +106 -106
- package/dist/components/TreeView/TreeView.js +183 -183
- package/dist/components/VirtualList/VirtualList.d.ts.map +1 -1
- package/dist/components/VirtualList/VirtualList.js +42 -41
- package/dist/dev/index.js +2 -2
- package/dist/hooks/useAutoId.d.ts.map +1 -1
- package/dist/hooks/useAutoId.js +7 -6
- package/dist/hooks/useSelectEngine.d.ts.map +1 -1
- package/dist/hooks/useSelectEngine.js +31 -30
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/responsive/uiKitResponsive.d.ts +6 -0
- package/dist/responsive/uiKitResponsive.d.ts.map +1 -1
- package/dist/responsive/uiKitResponsive.js +27 -26
- package/dist/shared/kitCopy.js +1 -1
- package/dist/shared/optionStateColors.d.ts +3 -2
- package/dist/shared/optionStateColors.d.ts.map +1 -1
- package/dist/shared/optionStateColors.js +9 -4
- package/dist/shared/popupTransition.d.ts.map +1 -1
- package/dist/shared/popupTransition.js +7 -6
- package/dist/shared/sheetTitle.d.ts +2 -1
- package/dist/shared/sheetTitle.d.ts.map +1 -1
- package/dist/shared/size.d.ts.map +1 -1
- package/dist/shared/size.js +3 -2
- package/dist/shared/uiKitDefaults.d.ts +21 -0
- package/dist/shared/uiKitDefaults.d.ts.map +1 -1
- package/dist/shared/uiKitDefaults.js +32 -18
- 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/style.shell.lk.css +53 -0
- package/dist/urfu-ui-kit-react.js +29 -27
- 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/dist/vanilla/core/sheetTitle.js +7 -7
- package/package.json +3 -1
|
@@ -8,16 +8,16 @@ import { Accordion$u as u } from "./components/Accordion/Accordion.js";
|
|
|
8
8
|
import { BreadCrumbs$u as T } from "./components/BreadCrumbs/BreadCrumbs.js";
|
|
9
9
|
import { Button$u as d } from "./components/Button/Button.js";
|
|
10
10
|
import { Calendar$u as g } from "./components/Calendar/Calendar.js";
|
|
11
|
-
import { Card$u as
|
|
12
|
-
import { ErrorScreen$u as
|
|
13
|
-
import { OfflineBanner$u as
|
|
14
|
-
import { useOnlineStatus$u as
|
|
11
|
+
import { Card$u as P } from "./components/Card/Card.js";
|
|
12
|
+
import { ErrorScreen$u as k } from "./components/ErrorScreen/ErrorScreen.js";
|
|
13
|
+
import { OfflineBanner$u as I } from "./components/OfflineBanner/OfflineBanner.js";
|
|
14
|
+
import { useOnlineStatus$u as F } 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 A } 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
|
-
import { FormField$u as
|
|
20
|
+
import { FormField$u as y } from "./components/FormField/FormField.js";
|
|
21
21
|
import { Icon$u as N } from "./components/Icon/Icon.js";
|
|
22
22
|
import { InputExpandTextarea$u as X } from "./components/InputExpandTextarea/InputExpandTextarea.js";
|
|
23
23
|
import { InputFile$u as q } from "./components/InputFile/InputFile.js";
|
|
@@ -27,23 +27,23 @@ import { InputTime$u as Y } from "./components/InputTime/InputTime.js";
|
|
|
27
27
|
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
|
-
import { Drawer$u as
|
|
30
|
+
import { Drawer$u as ir } from "./components/Drawer/Drawer.js";
|
|
31
31
|
import { Multiselect$u as fr } 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";
|
|
35
35
|
import { Search$u as Sr } from "./components/Search/Search.js";
|
|
36
36
|
import { SearchSelect$u as Er } from "./components/SearchSelect/SearchSelect.js";
|
|
37
|
-
import { Select$u as
|
|
38
|
-
import { Status$u as
|
|
39
|
-
import { Switch$u as
|
|
40
|
-
import { StickyActionBar$u as
|
|
41
|
-
import { Table$u as
|
|
42
|
-
import { Pagination$u as
|
|
43
|
-
import { Tabs$u as
|
|
44
|
-
import { TabPanels$u as
|
|
45
|
-
import { Textarea$u as
|
|
46
|
-
import { Tooltip$u as
|
|
37
|
+
import { Select$u as Cr } from "./components/Select/Select.js";
|
|
38
|
+
import { Status$u as br } from "./components/Status/Status.js";
|
|
39
|
+
import { Switch$u as Mr } from "./components/Switch/Switch.js";
|
|
40
|
+
import { StickyActionBar$u as Ur } from "./components/StickyActionBar/StickyActionBar.js";
|
|
41
|
+
import { Table$u as Lr } from "./components/Table/Table.js";
|
|
42
|
+
import { Pagination$u as Vr } from "./components/Pagination/Pagination.js";
|
|
43
|
+
import { Tabs$u as Or } from "./components/Tabs/Tabs.js";
|
|
44
|
+
import { TabPanels$u as hr } from "./components/TabPanels/TabPanels.js";
|
|
45
|
+
import { Textarea$u as _r } from "./components/Textarea/Textarea.js";
|
|
46
|
+
import { Tooltip$u as Kr } 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";
|
|
49
49
|
import { InfiniteScroll$u as jr } from "./components/InfiniteScroll/InfiniteScroll.js";
|
|
@@ -52,14 +52,16 @@ import { useInfiniteScroll$u as Jr } from "./hooks/useInfiniteScroll.js";
|
|
|
52
52
|
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
|
-
import { configureUiKit$u as po, useUiKitViewport$u as
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
55
|
+
import { configureUiKit$u as po, useUiKitViewport$u as io } from "./responsive/uiKitResponsive.js";
|
|
56
|
+
import { getUiKitPrefix$u as fo, kitClasses$u as xo, kitCls$u as ao, kitData$u as no, kitVar$u as so, kitVarRef$u as lo } from "./shared/uiKitDefaults.js";
|
|
57
|
+
import { TableFilterOptions$u as co } from "./components/Table/Filter/TableFilterOptions.js";
|
|
58
|
+
import { TableFilterDates$u as So } from "./components/Table/Filter/FilterDateBox.js";
|
|
59
|
+
import { Skeleton$u as go } from "./components/Skeleton/Skeleton.js";
|
|
59
60
|
import { installInputModeTracking$u as o } from "./vanilla/core/inputMode.js";
|
|
60
|
-
import { DEFAULT_ERROR_TEXTS$u as
|
|
61
|
-
import { hasPreviousPage$u as
|
|
62
|
-
import {
|
|
61
|
+
import { DEFAULT_ERROR_TEXTS$u as Po, DEFAULT_SUPPORT_EMAIL$u as bo, DEFAULT_SUPPORT_LABEL$u as ko, configureErrorReport$u as Mo, configureErrorTexts$u as Io, describeError$u as Uo, describeFieldErrors$u as Fo, errorView$u as Lo, formatErrorDetails$u as Ro, isHumanMessage$u as Vo, supportMailto$u as Do } from "./vanilla/core/describeError.js";
|
|
62
|
+
import { hasPreviousPage$u as Ao } from "./vanilla/core/hasPreviousPage.js";
|
|
63
|
+
import { maskDateValue$u as wo } from "./vanilla/core/dateMask.js";
|
|
64
|
+
import { reconcileColumnOrder$u as Bo } from "./vanilla/core/reconcileColumnOrder.js";
|
|
63
65
|
r();
|
|
64
66
|
o();
|
|
65
|
-
export { u as Accordion, T as BreadCrumbs, d as Button, g as Calendar,
|
|
67
|
+
export { u as Accordion, T as BreadCrumbs, d as Button, g as Calendar, P as Card, A as Checkbox, B as ColumnSettings, w as ConfirmModal, Po as DEFAULT_ERROR_TEXTS, bo as DEFAULT_SUPPORT_EMAIL, ko as DEFAULT_SUPPORT_LABEL, ir as Drawer, k as ErrorScreen, y 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, fr as Multiselect, ar as NotificationProvider, I as OfflineBanner, Vr as Pagination, lr as Preloader, cr as Radio, Sr as Search, Er as SearchSelect, Cr as Select, go as Skeleton, br as Status, Ur as StickyActionBar, Mr as Switch, hr as TabPanels, Lr as Table, So as TableFilterDates, co as TableFilterOptions, Or as Tabs, _r as Textarea, Kr as Tooltip, vr as TreeView, Hr as VirtualList, ro as compareValues, Mo as configureErrorReport, Io as configureErrorTexts, po as configureUiKit, Uo as describeError, Fo as describeFieldErrors, Lo as errorView, Ro as formatErrorDetails, n as getUiKitCopies, fo as getUiKitPrefix, s as hasLegacyUiKitOverlay, Ao as hasPreviousPage, Vo as isHumanMessage, xo as kitClasses, ao as kitCls, no as kitData, so as kitVar, lo as kitVarRef, wo as maskDateValue, oo as nextSort, Bo as reconcileColumnOrder, eo as sortRows, Do as supportMailto, R as useCollapseMotion, D as useEnterMotion, Jr as useInfiniteScroll, nr as useNotification, F as useOnlineStatus, Zr as usePagination, Wr as useTableSort, io 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.5";
|
|
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 };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
function
|
|
2
|
-
var
|
|
1
|
+
function B(e, t, r = "u") {
|
|
2
|
+
var i, n, a;
|
|
3
3
|
if (t.title) return t.title;
|
|
4
4
|
if (t.ariaLabel) return t.ariaLabel;
|
|
5
|
-
const
|
|
6
|
-
var
|
|
7
|
-
return (
|
|
5
|
+
const o = e == null ? void 0 : e.ownerDocument, l = t.ariaLabelledBy && o ? t.ariaLabelledBy.split(/\s+/).map((b) => {
|
|
6
|
+
var c, u;
|
|
7
|
+
return (u = (c = o.getElementById(b)) == null ? void 0 : c.textContent) == null ? void 0 : u.trim();
|
|
8
8
|
}).filter(Boolean).join(" ") : "";
|
|
9
|
-
return
|
|
9
|
+
return l || ((a = (n = (i = e == null ? void 0 : e.closest(`.${r}-form-field`)) == null ? void 0 : i.querySelector(`.${r}-form-field__title`)) == null ? void 0 : n.textContent) == null ? void 0 : a.trim()) || t.placeholder || "";
|
|
10
10
|
}
|
|
11
|
-
export {
|
|
11
|
+
export { B as resolveSheetTitle$u };
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
],
|
|
13
13
|
"license": "UNLICENSED",
|
|
14
14
|
"private": false,
|
|
15
|
-
"version": "2.1.7-next.
|
|
15
|
+
"version": "2.1.7-next.5",
|
|
16
16
|
"type": "module",
|
|
17
17
|
"main": "dist/urfu-ui-kit-react",
|
|
18
18
|
"types": "dist/index.d.ts",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"./style.layer.css": "./dist/style.layer.css",
|
|
31
31
|
"./style.shell.css": "./dist/style.shell.css",
|
|
32
|
+
"./style.shell.lk.css": "./dist/style.shell.lk.css",
|
|
32
33
|
"./dist/*": "./dist/*",
|
|
33
34
|
"./package.json": "./package.json"
|
|
34
35
|
},
|
|
@@ -59,6 +60,7 @@
|
|
|
59
60
|
"docs": "start \"sb\" npm run sb && npm run vp",
|
|
60
61
|
"docsb": "npm run og:generate && storybook build --output-dir uikit-react && vitepress build docs",
|
|
61
62
|
"test": "vitest run",
|
|
63
|
+
"test:prefix": "vitest run --config vitest.prefix.config.ts",
|
|
62
64
|
"test:watch": "vitest",
|
|
63
65
|
"test:coverage": "vitest run --coverage",
|
|
64
66
|
"parity:dom": "vitest run --config vitest.parity.config.ts",
|