@dss-kit/ui-kit 0.3.9 → 1.0.0
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/builders/Modal/Modal.js +3 -3
- package/dist/components/builders/Modal/ModalFooter/ModalFooter.js +7 -7
- package/dist/components/builders/Modal/ModalHeader/ModalHeader.js +15 -15
- package/dist/components/builders/Modal/ModalMain/styles.js +3 -3
- package/dist/components/builders/Modal/styles.js +2 -2
- package/dist/components/builders/Table/Table.js +66 -58
- package/dist/components/builders/Table/Table.utils.js +5 -5
- package/dist/components/builders/Table/TableBodyRow/TableBodyRow.js +5 -5
- package/dist/components/builders/Table/TableHeadRow/TableHeadRow.js +4 -4
- package/dist/components/builders/Table/TablePagination/TablePagination.js +44 -44
- package/dist/components/builders/Table/TableWrapper/TableWrapper.js +19 -19
- package/dist/components/charts/LineChart/constants.js +16 -16
- package/dist/components/charts/LineChart/utils.js +2 -2
- package/dist/components/charts/PieProgressChart/constants.js +16 -10
- package/dist/components/controls/Button/Button.js +56 -53
- package/dist/components/controls/Button/styles.js +4 -4
- package/dist/components/controls/Button/types.d.ts +2 -1
- package/dist/components/controls/Checkbox/styles.js +7 -7
- package/dist/components/controls/IconButton/styles.js +27 -27
- package/dist/components/controls/Input/styles.js +10 -10
- package/dist/components/controls/MarkdownTextEditor/MarkdownTextEditor.js +28 -28
- package/dist/components/controls/MarkdownTextEditor/components/EditorToolbar/ActionMenuButton/ActionMenuButton.js +13 -13
- package/dist/components/controls/MarkdownTextEditor/components/EditorToolbar/ActionMenuButton/ActionMenuButton.styles.js +2 -2
- package/dist/components/controls/MarkdownTextEditor/components/EditorToolbar/EditorToolbar.js +43 -43
- package/dist/components/controls/MarkdownTextEditor/nodes/CustomLinkNode/parts/CustomLinkNodeComponent/CustomLinkNodeComponent.styles.js +3 -3
- package/dist/components/controls/MarkdownTextEditor/nodes/ImageRowNode/parts/ImageRowNodeComponent/ImageRowNodeComponent.styles.js +2 -2
- package/dist/components/controls/MarkdownTextEditor/themes/editor.theme.js +1 -1
- package/dist/components/controls/OtpInput/styles.js +11 -11
- package/dist/components/controls/RadioGroup/Radio.d.ts +10 -1
- package/dist/components/controls/RadioGroup/Radio.js +78 -73
- package/dist/components/controls/SegmentControl/SegmentControl.js +12 -12
- package/dist/components/controls/SegmentControl/styles.js +8 -8
- package/dist/components/controls/Select/styles.js +19 -19
- package/dist/components/controls/Switch/styles.js +12 -12
- package/dist/components/controls/Tabs/Tabs.js +10 -10
- package/dist/components/shared/Avatar/Avatar.js +8 -8
- package/dist/components/shared/Badge/Badge.d.ts +1 -1
- package/dist/components/shared/Badge/Badge.js +75 -66
- package/dist/components/shared/Hint/styles.js +6 -6
- package/dist/components/shared/MarkdownText/MarkdownText.styles.js +4 -4
- package/dist/components/shared/Popover/PopoverContent/PopoverContent.js +2 -2
- package/dist/components/shared/Skeleton/Skeleton.js +11 -11
- package/dist/components/shared/Tag/Tag.js +14 -14
- package/dist/components/shared/Toast/Toast.js +30 -30
- package/dist/components/shared/Tooltip/Tooltip.js +28 -28
- package/dist/components/shared/Tooltip/constants.js +3 -3
- package/dist/index.js +37 -34
- package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.const.d.ts +8 -0
- package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.context.d.ts +12 -0
- package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.context.js +12 -0
- package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.d.ts +1 -1
- package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.js +37 -26
- package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.types.d.ts +30 -5
- package/dist/providers/ThemeProviderScoped/index.d.ts +1 -0
- package/dist/root.css +1 -1
- package/dist/ui-kit.cjs +8 -8
- package/dist/ui-kit.css +1 -1
- package/dist/utils/theme/index.d.ts +141 -141
- package/dist/utils/theme/index.js +14 -14
- package/dist/utils/theme/palette.d.ts +184 -0
- package/dist/utils/theme/palette.js +187 -0
- package/package.json +1 -1
- package/dist/providers/ThemeProviderScoped/styles.module.scss.js +0 -7
- package/dist/utils/theme/color.d.ts +0 -184
- package/dist/utils/theme/color.js +0 -187
|
@@ -6,7 +6,7 @@ import { ModalContext as E } from "./context.js";
|
|
|
6
6
|
import { styles as i } from "./styles.js";
|
|
7
7
|
import { Portal as I } from "../Portal/Portal.js";
|
|
8
8
|
import { Box as l } from "../Box/Box.js";
|
|
9
|
-
import { IconButton as
|
|
9
|
+
import { IconButton as _ } from "../../controls/IconButton/IconButton.js";
|
|
10
10
|
import { theme as f } from "../../../utils/theme/index.js";
|
|
11
11
|
const j = D(
|
|
12
12
|
({
|
|
@@ -61,7 +61,7 @@ const j = D(
|
|
|
61
61
|
flex: 1,
|
|
62
62
|
onMouseDown: b,
|
|
63
63
|
onClick: M,
|
|
64
|
-
backgroundColor: f.color.fill.
|
|
64
|
+
backgroundColor: f.color.fill.bg_overlay_primary,
|
|
65
65
|
className: s(i.overlay, y),
|
|
66
66
|
zIndex: 1,
|
|
67
67
|
children: /* @__PURE__ */ z(
|
|
@@ -83,7 +83,7 @@ const j = D(
|
|
|
83
83
|
right: f.spacing.lg,
|
|
84
84
|
zIndex: 1,
|
|
85
85
|
children: /* @__PURE__ */ t(
|
|
86
|
-
|
|
86
|
+
_,
|
|
87
87
|
{
|
|
88
88
|
className: g,
|
|
89
89
|
onClick: r,
|
|
@@ -4,15 +4,15 @@ import { forwardRef as d } from "react";
|
|
|
4
4
|
import { Box as n } from "../../Box/Box.js";
|
|
5
5
|
import { theme as o } from "../../../../utils/theme/index.js";
|
|
6
6
|
const x = f({
|
|
7
|
-
borderTop: `1px solid ${o.color.border.
|
|
7
|
+
borderTop: `1px solid ${o.color.border.neutral_alpha_basic}`
|
|
8
8
|
}), u = d(
|
|
9
9
|
({
|
|
10
10
|
children: r,
|
|
11
11
|
row: t = !0,
|
|
12
12
|
flex: e = !0,
|
|
13
|
-
gap:
|
|
14
|
-
p:
|
|
15
|
-
className:
|
|
13
|
+
gap: a = o.spacing.lg,
|
|
14
|
+
p: m = o.spacing["2xl"],
|
|
15
|
+
className: s,
|
|
16
16
|
// Остальные пропсы передаются в компонент Box
|
|
17
17
|
...p
|
|
18
18
|
}, l) => /* @__PURE__ */ i(
|
|
@@ -20,9 +20,9 @@ const x = f({
|
|
|
20
20
|
{
|
|
21
21
|
flex: e,
|
|
22
22
|
row: t,
|
|
23
|
-
gap:
|
|
24
|
-
p:
|
|
25
|
-
className: c(x,
|
|
23
|
+
gap: a,
|
|
24
|
+
p: m,
|
|
25
|
+
className: c(x, s),
|
|
26
26
|
ref: l,
|
|
27
27
|
...p,
|
|
28
28
|
children: r
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsxs as e, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as v } from "react";
|
|
3
|
-
import
|
|
4
|
-
import { useModalContext as
|
|
3
|
+
import W from "../../../../assets/svg/modal/close.svg.js";
|
|
4
|
+
import { useModalContext as B } from "../context.js";
|
|
5
5
|
import { Box as t } from "../../Box/Box.js";
|
|
6
6
|
import { theme as r } from "../../../../utils/theme/index.js";
|
|
7
7
|
import { Text as i } from "../../Text/Text.js";
|
|
8
8
|
import { IconButton as M } from "../../../controls/IconButton/IconButton.js";
|
|
9
9
|
const j = v(
|
|
10
10
|
({
|
|
11
|
-
title:
|
|
12
|
-
subtitle:
|
|
11
|
+
title: a,
|
|
12
|
+
subtitle: l,
|
|
13
13
|
w: m = "full",
|
|
14
14
|
p: s,
|
|
15
15
|
py: d,
|
|
@@ -18,13 +18,13 @@ const j = v(
|
|
|
18
18
|
pb: p = r.spacing.lg,
|
|
19
19
|
row: f = !0,
|
|
20
20
|
justifyContent: h = "space-between",
|
|
21
|
-
showCloseButton:
|
|
22
|
-
className:
|
|
23
|
-
titleClassName:
|
|
21
|
+
showCloseButton: b = !1,
|
|
22
|
+
className: g,
|
|
23
|
+
titleClassName: x,
|
|
24
24
|
subtitleClassName: u,
|
|
25
25
|
closeButtonClassName: N
|
|
26
26
|
}, y) => {
|
|
27
|
-
const { onClose: C } =
|
|
27
|
+
const { onClose: C } = B();
|
|
28
28
|
return /* @__PURE__ */ e(
|
|
29
29
|
t,
|
|
30
30
|
{
|
|
@@ -37,11 +37,11 @@ const j = v(
|
|
|
37
37
|
row: f,
|
|
38
38
|
justifyContent: h,
|
|
39
39
|
ref: y,
|
|
40
|
-
borderColor: r.color.border.
|
|
40
|
+
borderColor: r.color.border.neutral_alpha_basic,
|
|
41
41
|
borderWidth: 0,
|
|
42
42
|
borderBottomWidth: 1,
|
|
43
43
|
borderStyle: "solid",
|
|
44
|
-
className:
|
|
44
|
+
className: g,
|
|
45
45
|
children: [
|
|
46
46
|
/* @__PURE__ */ e(t, { gap: r.spacing.sm, children: [
|
|
47
47
|
/* @__PURE__ */ o(
|
|
@@ -50,8 +50,8 @@ const j = v(
|
|
|
50
50
|
variant: "title-3",
|
|
51
51
|
colorName: "primary",
|
|
52
52
|
fontWeight: "semibold",
|
|
53
|
-
className:
|
|
54
|
-
children:
|
|
53
|
+
className: x,
|
|
54
|
+
children: a
|
|
55
55
|
}
|
|
56
56
|
),
|
|
57
57
|
/* @__PURE__ */ o(
|
|
@@ -61,18 +61,18 @@ const j = v(
|
|
|
61
61
|
colorName: "tertiary",
|
|
62
62
|
fontWeight: "medium",
|
|
63
63
|
className: u,
|
|
64
|
-
children:
|
|
64
|
+
children: l
|
|
65
65
|
}
|
|
66
66
|
)
|
|
67
67
|
] }),
|
|
68
|
-
|
|
68
|
+
b && /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
|
|
69
69
|
M,
|
|
70
70
|
{
|
|
71
71
|
onClick: C,
|
|
72
72
|
color: "neutral",
|
|
73
73
|
className: N,
|
|
74
74
|
size: "xs",
|
|
75
|
-
children: /* @__PURE__ */ o(
|
|
75
|
+
children: /* @__PURE__ */ o(W, {})
|
|
76
76
|
}
|
|
77
77
|
) })
|
|
78
78
|
]
|
|
@@ -5,17 +5,17 @@ const c = {
|
|
|
5
5
|
flex: 0,
|
|
6
6
|
overflowY: "auto",
|
|
7
7
|
scrollbarWidth: "thin",
|
|
8
|
-
scrollbarColor: `${r.color.scrollbar.
|
|
8
|
+
scrollbarColor: `${r.color.scrollbar.thumb_primary} ${r.color.scrollbar.track_primary}`,
|
|
9
9
|
"&::-webkit-scrollbar": {
|
|
10
10
|
width: 6
|
|
11
11
|
},
|
|
12
12
|
"&::-webkit-scrollbar-track": {
|
|
13
|
-
background: r.color.scrollbar.
|
|
13
|
+
background: r.color.scrollbar.track_primary,
|
|
14
14
|
borderRadius: r.cornerRadius.fullRound
|
|
15
15
|
},
|
|
16
16
|
"&::-webkit-scrollbar-thumb": {
|
|
17
17
|
borderRadius: r.cornerRadius.fullRound,
|
|
18
|
-
backgroundColor: r.color.scrollbar.
|
|
18
|
+
backgroundColor: r.color.scrollbar.thumb_primary
|
|
19
19
|
}
|
|
20
20
|
})
|
|
21
21
|
};
|
|
@@ -21,8 +21,8 @@ const t = a`
|
|
|
21
21
|
maxWidth: `calc(100vw - ${o.spacing["3xl"]})`,
|
|
22
22
|
maxHeight: `calc(100vh - ${o.spacing["7xl"]} - ${o.spacing["7xl"]})`,
|
|
23
23
|
borderRadius: o.cornerRadius["2xl"],
|
|
24
|
-
backgroundColor: o.color.fill.
|
|
25
|
-
boxShadow: `0 4px 20px 0 ${o.color.effect.
|
|
24
|
+
backgroundColor: o.color.fill.bg_primary,
|
|
25
|
+
boxShadow: `0 4px 20px 0 ${o.color.effect.shadow_s}`,
|
|
26
26
|
[r.sm()]: {
|
|
27
27
|
flex: 1
|
|
28
28
|
}
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
1
|
+
import { jsx as o, jsxs as H } from "react/jsx-runtime";
|
|
2
2
|
import { cx as p, css as b } from "@emotion/css";
|
|
3
|
-
import { useReactTable as
|
|
4
|
-
import { useMemo as
|
|
5
|
-
import
|
|
6
|
-
import { typography as
|
|
3
|
+
import { useReactTable as Pe, getPaginationRowModel as Me, getSortedRowModel as Ne, getCoreRowModel as _e, flexRender as P, createColumnHelper as ke } from "@tanstack/react-table";
|
|
4
|
+
import { useMemo as ze, useImperativeHandle as Ie } from "react";
|
|
5
|
+
import Ve from "../../../assets/svg/table/search.svg.js";
|
|
6
|
+
import { typography as Le } from "../../../styles/utils/typography.js";
|
|
7
7
|
import { useControllableState as m } from "./Table.hooks.js";
|
|
8
8
|
import { getColumnPinningStyles as f } from "./Table.utils.js";
|
|
9
|
-
import { TablePlaceholder as
|
|
10
|
-
import { TableWrapper as
|
|
11
|
-
import { TableHeadRow as
|
|
12
|
-
import { TablePagination as
|
|
13
|
-
import { TableHeadCell as
|
|
14
|
-
import { TableBodyCell as
|
|
9
|
+
import { TablePlaceholder as We } from "./TablePlaceholder/TablePlaceholder.js";
|
|
10
|
+
import { TableWrapper as Ee } from "./TableWrapper/TableWrapper.js";
|
|
11
|
+
import { TableHeadRow as Fe } from "./TableHeadRow/TableHeadRow.js";
|
|
12
|
+
import { TablePagination as je } from "./TablePagination/TablePagination.js";
|
|
13
|
+
import { TableHeadCell as Be } from "./TableHeadCell/TableHeadCell.js";
|
|
14
|
+
import { TableBodyCell as De } from "./TableBodyCell/TableBodyCell.js";
|
|
15
15
|
import { TableBodyRow as Ae } from "./TableBodyRow/TableBodyRow.js";
|
|
16
|
-
import { TableBodyCellContent as
|
|
16
|
+
import { TableBodyCellContent as _ } from "./TableBodyCellContent/TableBodyCellContent.js";
|
|
17
17
|
import { Skeleton as Ke } from "../../shared/Skeleton/Skeleton.js";
|
|
18
18
|
import { TableHeadCellContent as Oe } from "./TableHeadCellContent/TableHeadCellContent.js";
|
|
19
19
|
import { TableHeadCellContentSortable as $e } from "./TableHeadCellContentSortable/TableHeadCellContentSortable.js";
|
|
20
20
|
import { theme as qe } from "../../../utils/theme/index.js";
|
|
21
21
|
import { Box as Ge } from "../Box/Box.js";
|
|
22
22
|
const { spacing: M, color: l } = qe, Je = b({
|
|
23
|
-
...
|
|
23
|
+
...Le.body2,
|
|
24
24
|
fontWeight: 500,
|
|
25
25
|
width: "100%",
|
|
26
26
|
maxWidth: "100%",
|
|
27
27
|
minWidth: "max-content",
|
|
28
28
|
borderCollapse: "collapse",
|
|
29
29
|
borderSpacing: 0,
|
|
30
|
-
backgroundColor: l.fill.
|
|
30
|
+
backgroundColor: l.fill.bg_primary
|
|
31
31
|
}), Qe = b({
|
|
32
|
-
backgroundColor: l.fill.
|
|
32
|
+
backgroundColor: l.fill.bg_secondary,
|
|
33
33
|
color: l.text.tertiary
|
|
34
34
|
}), Ue = b({
|
|
35
35
|
pointerEvents: "none",
|
|
36
36
|
userSelect: "none"
|
|
37
37
|
}), N = ["70%", "55%", "80%", "60%"], c = ({
|
|
38
|
-
ref:
|
|
38
|
+
ref: k,
|
|
39
39
|
data: h,
|
|
40
40
|
columns: u,
|
|
41
41
|
showBorders: g = !0,
|
|
42
|
-
enableSorting:
|
|
42
|
+
enableSorting: z = !1,
|
|
43
43
|
enablePagination: S = !1,
|
|
44
|
-
enableRowSelection:
|
|
45
|
-
enableMultiRowSelection:
|
|
44
|
+
enableRowSelection: I = !1,
|
|
45
|
+
enableMultiRowSelection: V = !1,
|
|
46
46
|
enableColumnPinning: d = !1,
|
|
47
|
-
columnPinning:
|
|
48
|
-
onColumnPinningChange:
|
|
49
|
-
sorting:
|
|
50
|
-
onSortingChange:
|
|
51
|
-
manualSorting:
|
|
52
|
-
columnFilters:
|
|
53
|
-
onColumnFiltersChange:
|
|
47
|
+
columnPinning: L,
|
|
48
|
+
onColumnPinningChange: W,
|
|
49
|
+
sorting: E,
|
|
50
|
+
onSortingChange: F,
|
|
51
|
+
manualSorting: j,
|
|
52
|
+
columnFilters: B,
|
|
53
|
+
onColumnFiltersChange: D,
|
|
54
54
|
columnVisibility: A,
|
|
55
55
|
onColumnVisibilityChange: K,
|
|
56
56
|
pagination: O,
|
|
@@ -76,9 +76,9 @@ const { spacing: M, color: l } = qe, Je = b({
|
|
|
76
76
|
tableOptions: te = {},
|
|
77
77
|
onRowClick: w,
|
|
78
78
|
getRowId: le,
|
|
79
|
-
headCellComponent: ie =
|
|
80
|
-
bodyCellComponent: x =
|
|
81
|
-
headRowComponent: ae =
|
|
79
|
+
headCellComponent: ie = Be,
|
|
80
|
+
bodyCellComponent: x = De,
|
|
81
|
+
headRowComponent: ae = Fe,
|
|
82
82
|
bodyRowComponent: R = Ae,
|
|
83
83
|
onReset: re,
|
|
84
84
|
paginationVariant: me,
|
|
@@ -87,12 +87,12 @@ const { spacing: M, color: l } = qe, Je = b({
|
|
|
87
87
|
renderPageSizeSelectorInputItem: ge
|
|
88
88
|
}) => {
|
|
89
89
|
const [de, pe] = m(
|
|
90
|
+
E,
|
|
90
91
|
F,
|
|
91
|
-
j,
|
|
92
92
|
[]
|
|
93
93
|
), [he, Ce] = m(
|
|
94
|
+
B,
|
|
94
95
|
D,
|
|
95
|
-
_,
|
|
96
96
|
[]
|
|
97
97
|
), [fe, be] = m(
|
|
98
98
|
A,
|
|
@@ -103,16 +103,16 @@ const { spacing: M, color: l } = qe, Je = b({
|
|
|
103
103
|
$,
|
|
104
104
|
{ pageIndex: 0, pageSize: 10 }
|
|
105
105
|
), [ue, Se] = m(q, G, {}), [ye, we] = m(
|
|
106
|
+
L,
|
|
106
107
|
W,
|
|
107
|
-
E,
|
|
108
108
|
{ left: [], right: [] }
|
|
109
|
-
), T =
|
|
109
|
+
), T = j ?? !!s, xe = ze(
|
|
110
110
|
() => u.map((e) => ({
|
|
111
111
|
enableSorting: !1,
|
|
112
112
|
...e
|
|
113
113
|
})),
|
|
114
114
|
[u]
|
|
115
|
-
), t =
|
|
115
|
+
), t = Pe({
|
|
116
116
|
data: h,
|
|
117
117
|
columns: xe,
|
|
118
118
|
state: {
|
|
@@ -129,11 +129,11 @@ const { spacing: M, color: l } = qe, Je = b({
|
|
|
129
129
|
onPaginationChange: C,
|
|
130
130
|
onRowSelectionChange: Se,
|
|
131
131
|
onColumnPinningChange: we,
|
|
132
|
-
getCoreRowModel:
|
|
133
|
-
getSortedRowModel:
|
|
132
|
+
getCoreRowModel: _e(),
|
|
133
|
+
getSortedRowModel: z && !T ? Ne() : void 0,
|
|
134
134
|
getPaginationRowModel: S ? Me() : void 0,
|
|
135
|
-
enableRowSelection:
|
|
136
|
-
enableMultiRowSelection:
|
|
135
|
+
enableRowSelection: I,
|
|
136
|
+
enableMultiRowSelection: V,
|
|
137
137
|
enableColumnPinning: d,
|
|
138
138
|
getRowId: le,
|
|
139
139
|
manualSorting: T,
|
|
@@ -141,21 +141,25 @@ const { spacing: M, color: l } = qe, Je = b({
|
|
|
141
141
|
pageCount: s ? Math.ceil(s / a.pageSize) : void 0,
|
|
142
142
|
...te
|
|
143
143
|
});
|
|
144
|
-
|
|
145
|
-
const { rows:
|
|
144
|
+
Ie(k, () => t);
|
|
145
|
+
const { rows: v } = t.getRowModel(), Re = (e, n) => {
|
|
146
146
|
w && w(e.original, n);
|
|
147
147
|
}, Te = (e) => /* @__PURE__ */ o(
|
|
148
148
|
ie,
|
|
149
149
|
{
|
|
150
150
|
style: {
|
|
151
151
|
width: e.getSize(),
|
|
152
|
-
...d && f(
|
|
152
|
+
...d && f(
|
|
153
|
+
t,
|
|
154
|
+
e.column,
|
|
155
|
+
l.fill.bg_secondary
|
|
156
|
+
)
|
|
153
157
|
},
|
|
154
158
|
onClick: i ? void 0 : e.column.getToggleSortingHandler(),
|
|
155
|
-
children: e.isPlaceholder ? null :
|
|
159
|
+
children: e.isPlaceholder ? null : P(e.column.columnDef.header, e.getContext())
|
|
156
160
|
},
|
|
157
161
|
e.id
|
|
158
|
-
),
|
|
162
|
+
), ve = (e, n) => /* @__PURE__ */ o(
|
|
159
163
|
R,
|
|
160
164
|
{
|
|
161
165
|
showBorders: g,
|
|
@@ -163,22 +167,26 @@ const { spacing: M, color: l } = qe, Je = b({
|
|
|
163
167
|
children: e.getVisibleCells().map((r) => /* @__PURE__ */ o(
|
|
164
168
|
x,
|
|
165
169
|
{
|
|
166
|
-
style: d ? f(
|
|
167
|
-
|
|
170
|
+
style: d ? f(
|
|
171
|
+
t,
|
|
172
|
+
r.column,
|
|
173
|
+
l.fill.bg_primary
|
|
174
|
+
) : void 0,
|
|
175
|
+
children: P(r.column.columnDef.cell, r.getContext())
|
|
168
176
|
},
|
|
169
177
|
r.id
|
|
170
178
|
))
|
|
171
179
|
},
|
|
172
180
|
e.id
|
|
173
|
-
),
|
|
181
|
+
), He = (e) => /* @__PURE__ */ o(
|
|
174
182
|
R,
|
|
175
183
|
{
|
|
176
184
|
showBorders: g,
|
|
177
185
|
children: t.getVisibleLeafColumns().map((n, r) => /* @__PURE__ */ o(
|
|
178
186
|
x,
|
|
179
187
|
{
|
|
180
|
-
style: d ? f(t, n, l.fill.
|
|
181
|
-
children: /* @__PURE__ */ o(
|
|
188
|
+
style: d ? f(t, n, l.fill.bg_primary) : void 0,
|
|
189
|
+
children: /* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(
|
|
182
190
|
Ke,
|
|
183
191
|
{
|
|
184
192
|
variant: "text",
|
|
@@ -192,11 +200,11 @@ const { spacing: M, color: l } = qe, Je = b({
|
|
|
192
200
|
},
|
|
193
201
|
`skeleton-row-${e}`
|
|
194
202
|
);
|
|
195
|
-
return !i && !
|
|
196
|
-
|
|
203
|
+
return !i && !v.length ? /* @__PURE__ */ o(
|
|
204
|
+
We,
|
|
197
205
|
{
|
|
198
206
|
icon: /* @__PURE__ */ o(
|
|
199
|
-
|
|
207
|
+
Ve,
|
|
200
208
|
{
|
|
201
209
|
width: 24,
|
|
202
210
|
height: 24,
|
|
@@ -209,8 +217,8 @@ const { spacing: M, color: l } = qe, Je = b({
|
|
|
209
217
|
titleClassName: ee,
|
|
210
218
|
descriptionClassName: oe
|
|
211
219
|
}
|
|
212
|
-
) : /* @__PURE__ */
|
|
213
|
-
/* @__PURE__ */ o(
|
|
220
|
+
) : /* @__PURE__ */ H(Ge, { w: "full", gap: M.xl, className: p(y), children: [
|
|
221
|
+
/* @__PURE__ */ o(Ee, { data: h, showBorders: g, children: /* @__PURE__ */ H("table", { className: p(Je, U), children: [
|
|
214
222
|
/* @__PURE__ */ o(
|
|
215
223
|
"thead",
|
|
216
224
|
{
|
|
@@ -225,11 +233,11 @@ const { spacing: M, color: l } = qe, Je = b({
|
|
|
225
233
|
),
|
|
226
234
|
/* @__PURE__ */ o("tbody", { className: Y, children: i ? Array.from(
|
|
227
235
|
{ length: J },
|
|
228
|
-
(e, n) =>
|
|
229
|
-
) :
|
|
236
|
+
(e, n) => He(n)
|
|
237
|
+
) : v.map((e, n) => ve(e, n)) })
|
|
230
238
|
] }) }),
|
|
231
239
|
S && !i && /* @__PURE__ */ o(
|
|
232
|
-
|
|
240
|
+
je,
|
|
233
241
|
{
|
|
234
242
|
pageIndex: a.pageIndex,
|
|
235
243
|
pageSize: a.pageSize,
|
|
@@ -247,9 +255,9 @@ const { spacing: M, color: l } = qe, Je = b({
|
|
|
247
255
|
};
|
|
248
256
|
c.displayName = "Table";
|
|
249
257
|
c.HeadCellContent = Oe;
|
|
250
|
-
c.BodyCellContent =
|
|
258
|
+
c.BodyCellContent = _;
|
|
251
259
|
c.HeadCellContentSortable = $e;
|
|
252
|
-
c.createColumnHelper =
|
|
260
|
+
c.createColumnHelper = ke;
|
|
253
261
|
export {
|
|
254
262
|
c as Table
|
|
255
263
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { theme as
|
|
2
|
-
const p = (s, f,
|
|
1
|
+
import { theme as l } from "../../../utils/theme/index.js";
|
|
2
|
+
const p = (s, f, d) => {
|
|
3
3
|
const e = f.getIsPinned();
|
|
4
4
|
if (!e) return {};
|
|
5
5
|
const n = e === "left" ? s.getLeftLeafColumns() : s.getRightLeafColumns(), i = f.getPinnedIndex();
|
|
@@ -10,14 +10,14 @@ const p = (s, f, g) => {
|
|
|
10
10
|
else
|
|
11
11
|
for (let t = n.length - 1; t > i; t--)
|
|
12
12
|
o += n[t].getSize();
|
|
13
|
-
const
|
|
13
|
+
const g = e === "left" && i === n.length - 1;
|
|
14
14
|
return {
|
|
15
15
|
position: "sticky",
|
|
16
16
|
left: e === "left" ? o : void 0,
|
|
17
17
|
right: e === "right" ? o : void 0,
|
|
18
18
|
zIndex: 1,
|
|
19
|
-
background:
|
|
20
|
-
boxShadow:
|
|
19
|
+
background: d,
|
|
20
|
+
boxShadow: g ? `-2px 0 2px -2px ${l.color.effect.shadow_l} inset` : e === "right" && i === 0 ? `2px 0 2px -2px ${l.color.effect.shadow_l} inset` : void 0
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
export {
|
|
@@ -2,19 +2,19 @@ import { jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import { css as m, cx as c } from "@emotion/css";
|
|
3
3
|
import { forwardRef as i } from "react";
|
|
4
4
|
import { theme as d } from "../../../../utils/theme/index.js";
|
|
5
|
-
const { color: o } = d,
|
|
5
|
+
const { color: o } = d, p = i(
|
|
6
6
|
({ children: r, className: e, showBorders: t = !1, ...a }, l) => {
|
|
7
7
|
const s = m({
|
|
8
|
-
borderBottom: t ? `1px solid ${o.border.
|
|
8
|
+
borderBottom: t ? `1px solid ${o.border.neutral_alpha_low}` : "none",
|
|
9
9
|
transition: "background-color 0.15s ease-in-out",
|
|
10
10
|
"&:hover": {
|
|
11
|
-
backgroundColor: o.fill.
|
|
11
|
+
backgroundColor: o.fill.neutral_primary_hover
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
14
|
return /* @__PURE__ */ n("tr", { ref: l, className: c(s, e), ...a, children: r });
|
|
15
15
|
}
|
|
16
16
|
);
|
|
17
|
-
|
|
17
|
+
p.displayName = "TableBodyRow";
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
p as TableBodyRow
|
|
20
20
|
};
|
|
@@ -3,12 +3,12 @@ import { css as c, cx as d } from "@emotion/css";
|
|
|
3
3
|
import { forwardRef as n } from "react";
|
|
4
4
|
import { theme as f } from "../../../../utils/theme/index.js";
|
|
5
5
|
const { color: o } = f, p = n(
|
|
6
|
-
({ children: r, className: e, showBorders: a = !1, ...
|
|
6
|
+
({ children: r, className: e, showBorders: a = !1, ...l }, t) => {
|
|
7
7
|
const s = c({
|
|
8
|
-
backgroundColor: o.fill.
|
|
9
|
-
borderBottom: a ? `1px solid ${o.border.
|
|
8
|
+
backgroundColor: o.fill.bg_secondary,
|
|
9
|
+
borderBottom: a ? `1px solid ${o.border.neutral_alpha_low}` : "none"
|
|
10
10
|
});
|
|
11
|
-
return /* @__PURE__ */ m("tr", { ref:
|
|
11
|
+
return /* @__PURE__ */ m("tr", { ref: t, className: d(s, e), ...l, children: r });
|
|
12
12
|
}
|
|
13
13
|
);
|
|
14
14
|
p.displayName = "TableHeadRow";
|