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.
- 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.js +232 -232
- 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.js +178 -178
- 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 +102 -101
- 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 +1 -1
- 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 +2 -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.shell.lk.css +53 -0
- package/dist/urfu-ui-kit-react.js +27 -26
- package/dist/vanilla/core/describeError.js +1 -1
- package/dist/vanilla/core/sheetTitle.js +7 -7
- package/package.json +3 -1
|
@@ -1,53 +1,54 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { adaptTypographyStyle$u as
|
|
3
|
-
import { handleDragOver$u as
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { jsx as f, jsxs as K } from "react/jsx-runtime";
|
|
2
|
+
import { adaptTypographyStyle$u as O, pxAdd$u as v } from "./Table.helpers.js";
|
|
3
|
+
import { handleDragOver$u as P, handleDragStart$u as U } from "./Functions.js";
|
|
4
|
+
import { kitCls$u as X, getUiKitPrefix$u as i } from "../../shared/uiKitDefaults.js";
|
|
5
|
+
import { prefersReducedMotion$u as Y } from "../../vanilla/core/motion.js";
|
|
6
|
+
const q = "auto", T = ({
|
|
6
7
|
item: r,
|
|
7
8
|
i: e,
|
|
8
|
-
level:
|
|
9
|
-
rowKey:
|
|
10
|
-
absoluteIndex:
|
|
11
|
-
filteredColumns:
|
|
12
|
-
id:
|
|
13
|
-
virtualizationOn:
|
|
14
|
-
start:
|
|
15
|
-
draggable:
|
|
16
|
-
rowRefs:
|
|
9
|
+
level: k,
|
|
10
|
+
rowKey: S,
|
|
11
|
+
absoluteIndex: s,
|
|
12
|
+
filteredColumns: h,
|
|
13
|
+
id: j,
|
|
14
|
+
virtualizationOn: y,
|
|
15
|
+
start: D,
|
|
16
|
+
draggable: L,
|
|
17
|
+
rowRefs: x,
|
|
17
18
|
resize: a,
|
|
18
|
-
columnWidths:
|
|
19
|
-
parentDataField:
|
|
19
|
+
columnWidths: w,
|
|
20
|
+
parentDataField: p,
|
|
20
21
|
calcLeftValues: W,
|
|
21
|
-
handleDrop:
|
|
22
|
-
insertChildRows:
|
|
23
|
-
removeChildRows:
|
|
24
|
-
cellStyle:
|
|
25
|
-
tdStyle:
|
|
26
|
-
allTdStyleFunction:
|
|
27
|
-
cellContentStyle:
|
|
28
|
-
tdContentStyle:
|
|
29
|
-
allTdContentStyleFunction:
|
|
22
|
+
handleDrop: B,
|
|
23
|
+
insertChildRows: E,
|
|
24
|
+
removeChildRows: M,
|
|
25
|
+
cellStyle: N,
|
|
26
|
+
tdStyle: R,
|
|
27
|
+
allTdStyleFunction: g,
|
|
28
|
+
cellContentStyle: A,
|
|
29
|
+
tdContentStyle: C,
|
|
30
|
+
allTdContentStyleFunction: $,
|
|
30
31
|
fillColumnIndex: b = -1
|
|
31
|
-
}) => /* @__PURE__ */
|
|
32
|
+
}) => /* @__PURE__ */ f(
|
|
32
33
|
"tr",
|
|
33
34
|
{
|
|
34
|
-
"data-virtual-index":
|
|
35
|
-
id: `row${
|
|
36
|
-
draggable:
|
|
37
|
-
onDragStart: (t) =>
|
|
38
|
-
onDragOver: (t) =>
|
|
39
|
-
onDrop: (t) =>
|
|
40
|
-
ref:
|
|
41
|
-
|
|
35
|
+
"data-virtual-index": y && s !== void 0 ? s : void 0,
|
|
36
|
+
id: `row${k ? `${k}.` : ""}${e}`,
|
|
37
|
+
draggable: L,
|
|
38
|
+
onDragStart: (t) => U(t, String(e)),
|
|
39
|
+
onDragOver: (t) => P(t),
|
|
40
|
+
onDrop: (t) => B(t, e),
|
|
41
|
+
ref: y && s !== void 0 ? (t) => {
|
|
42
|
+
x.current[s] = t;
|
|
42
43
|
} : void 0,
|
|
43
|
-
children:
|
|
44
|
-
var
|
|
45
|
-
return /* @__PURE__ */
|
|
44
|
+
children: h == null ? void 0 : h.map((t, d) => {
|
|
45
|
+
var o;
|
|
46
|
+
return /* @__PURE__ */ K(
|
|
46
47
|
"td",
|
|
47
48
|
{
|
|
48
|
-
id: `${
|
|
49
|
+
id: `${j}td${e}${d}`,
|
|
49
50
|
className: `${t.sticky ? "sticky" : ""}`,
|
|
50
|
-
style:
|
|
51
|
+
style: O(
|
|
51
52
|
Object.assign(
|
|
52
53
|
{
|
|
53
54
|
left: t.sticky ? W(d) : "",
|
|
@@ -56,30 +57,30 @@ const C = "auto", P = ({
|
|
|
56
57
|
// Инлайном, потому что vanilla задаёт ячейке свои 20px и порядок
|
|
57
58
|
// подключения стилей у проектов разный. tdStyle по-прежнему главнее.
|
|
58
59
|
padding: "calc(15 * var(--u-unit, 1px)) 0",
|
|
59
|
-
display:
|
|
60
|
-
gap:
|
|
60
|
+
display: p && d === 0 && r[p] ? "flex" : "table-cell",
|
|
61
|
+
gap: `calc(4 * var(--${i()}-preset-unit, 1px))`
|
|
61
62
|
},
|
|
62
|
-
M,
|
|
63
63
|
N,
|
|
64
|
+
R,
|
|
64
65
|
t.tdStyle,
|
|
65
66
|
t.cellStyle,
|
|
66
|
-
|
|
67
|
+
g && g(r),
|
|
67
68
|
t.tdStyleFunction && t.tdStyleFunction(r)
|
|
68
69
|
)
|
|
69
70
|
),
|
|
70
71
|
children: [
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ f(
|
|
72
73
|
"div",
|
|
73
74
|
{
|
|
74
|
-
className: "
|
|
75
|
-
style:
|
|
75
|
+
className: X("table-td-content"),
|
|
76
|
+
style: O(
|
|
76
77
|
Object.assign(
|
|
77
78
|
{
|
|
78
79
|
// Растянутая колонка: width колонки — нижняя граница, иначе текст
|
|
79
80
|
// переносится по ней посреди широкой пустой ячейки, а скелетон
|
|
80
81
|
// меряет тот же узкий блок и висит по центру.
|
|
81
|
-
width: d === b && !(a && !t.resizeOff) ? "100%" : a && !t.resizeOff && (t != null && t.width) ?
|
|
82
|
-
minWidth: d === b && !(a && !t.resizeOff) && t.width ?
|
|
82
|
+
width: d === b && !(a && !t.resizeOff) ? "100%" : a && !t.resizeOff && (t != null && t.width) ? w[t.field] >= t.width ? w[t.field] : v(t.width) : a && !t.resizeOff || t != null && t.width ? w[t.field] || (t == null ? void 0 : t.width) : q,
|
|
83
|
+
minWidth: d === b && !(a && !t.resizeOff) && t.width ? v(t.width) : a && !t.resizeOff && t.width ? v(t.width) : "",
|
|
83
84
|
position: t.sticky ? "sticky" : "",
|
|
84
85
|
overflowX: "hidden",
|
|
85
86
|
// break-word, а не anywhere: с anywhere минимальная ширина колонки без width — одна буква,
|
|
@@ -90,18 +91,18 @@ const C = "auto", P = ({
|
|
|
90
91
|
WebkitLineClamp: 15,
|
|
91
92
|
WebkitBoxOrient: "vertical"
|
|
92
93
|
},
|
|
93
|
-
R,
|
|
94
94
|
A,
|
|
95
|
+
C,
|
|
95
96
|
t.tdContentStyle,
|
|
96
97
|
t.cellContentStyle,
|
|
97
|
-
|
|
98
|
+
$ && $(r),
|
|
98
99
|
t.tdContentStyleFunction && t.tdContentStyleFunction(r)
|
|
99
100
|
)
|
|
100
101
|
),
|
|
101
102
|
children: t.render ? t.render(r, e) : r[t.field]
|
|
102
103
|
}
|
|
103
104
|
),
|
|
104
|
-
!r.notExpandable &&
|
|
105
|
+
!r.notExpandable && p && d === 0 && (((o = r[p]) == null ? void 0 : o.length) ?? 0) > 0 && /* @__PURE__ */ f(
|
|
105
106
|
"svg",
|
|
106
107
|
{
|
|
107
108
|
width: "12",
|
|
@@ -110,18 +111,18 @@ const C = "auto", P = ({
|
|
|
110
111
|
fill: "none",
|
|
111
112
|
style: {
|
|
112
113
|
cursor: "pointer",
|
|
113
|
-
margin:
|
|
114
|
+
margin: `auto calc(8 * var(--${i()}-preset-unit, 1px)) auto auto`,
|
|
114
115
|
transform: r.parentDataOpened ? "rotate(180deg)" : "",
|
|
115
|
-
transition:
|
|
116
|
+
transition: Y() ? "none" : `transform var(--${i()}-duration-base, .2s) var(--${i()}-ease-move, cubic-bezier(.2, 0, 0, 1))`
|
|
116
117
|
},
|
|
117
118
|
onClick: () => {
|
|
118
|
-
r.parentDataOpened ?
|
|
119
|
+
r.parentDataOpened ? M(e) : E(e);
|
|
119
120
|
},
|
|
120
|
-
children: /* @__PURE__ */
|
|
121
|
+
children: /* @__PURE__ */ f(
|
|
121
122
|
"path",
|
|
122
123
|
{
|
|
123
124
|
d: "M1 4.5625L5.99999 9.5625L11 4.5625",
|
|
124
|
-
style: { stroke:
|
|
125
|
+
style: { stroke: `var(--${i()}-color-primary, #1E4391)` },
|
|
125
126
|
strokeWidth: "2",
|
|
126
127
|
strokeLinecap: "round",
|
|
127
128
|
strokeLinejoin: "round"
|
|
@@ -135,6 +136,6 @@ const C = "auto", P = ({
|
|
|
135
136
|
);
|
|
136
137
|
})
|
|
137
138
|
},
|
|
138
|
-
|
|
139
|
+
S ?? r.id ?? (y ? D + e : e)
|
|
139
140
|
);
|
|
140
|
-
export {
|
|
141
|
+
export { T as TableRow$u };
|