qaema-ui 0.0.61 → 0.0.62
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/_virtual/index.js +5 -5
- package/dist/_virtual/index2.js +4 -4
- package/dist/_virtual/index3.js +5 -5
- package/dist/_virtual/index4.js +4 -4
- package/dist/components/Badge.js +1 -1
- package/dist/components/PageHeader.js +4 -4
- package/dist/components/SearchBar.js +10 -9
- package/dist/components/Sidemenu.js +58 -51
- package/dist/components/StatCard.js +1 -1
- package/dist/components/Table/Table.js +104 -100
- package/dist/components/Table/Table.styles.d.ts +4 -2
- package/dist/components/Table/Table.styles.js +49 -36
- package/dist/components/Table/Table.types.d.ts +1 -0
- package/dist/node_modules/react-bootstrap/esm/Alert.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/AlertHeading.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/AlertLink.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Button.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/CloseButton.js +2 -2
- package/dist/node_modules/react-bootstrap/esm/Col.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Collapse.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Dropdown.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/DropdownDivider.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/DropdownHeader.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/DropdownItem.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/DropdownItemText.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/DropdownMenu.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/DropdownToggle.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Fade.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Feedback.js +2 -2
- package/dist/node_modules/react-bootstrap/esm/FloatingLabel.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Form.js +2 -2
- package/dist/node_modules/react-bootstrap/esm/FormCheck.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormCheckInput.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormCheckLabel.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormControl.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormFloating.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormLabel.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormRange.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormSelect.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormText.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Image.js +2 -2
- package/dist/node_modules/react-bootstrap/esm/Nav.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/NavItem.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/NavLink.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Navbar.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/NavbarBrand.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/NavbarText.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/NavbarToggle.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Offcanvas.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/OffcanvasBody.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/OffcanvasHeader.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/OffcanvasTitle.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/OffcanvasToggling.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Toast.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/ToastBody.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/ToastHeader.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/divWithClassName.js +1 -1
- package/dist/node_modules/react-helmet-async/lib/index.esm.js +2 -2
- package/dist/node_modules/react-icons/fi/index.js +5 -1
- package/dist/node_modules/react-smooth/es6/Animate.js +1 -1
- package/dist/node_modules/react-transition-group/esm/Transition.js +1 -1
- package/dist/node_modules/react-transition-group/esm/utils/PropTypes.js +1 -1
- package/package.json +1 -1
|
@@ -1,167 +1,171 @@
|
|
|
1
1
|
import { j as t } from "../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
2
|
+
import { useState as p, useRef as Q, useCallback as U, useEffect as T, useMemo as X } from "react";
|
|
3
|
+
import { useTranslation as Y } from "react-i18next";
|
|
4
|
+
import Z from "../Spinner.js";
|
|
5
|
+
import D from "../Pagination.js";
|
|
6
|
+
import k from "../Typography.js";
|
|
7
|
+
import W, { CheckboxCell as F } from "./components/CellComponents.js";
|
|
8
8
|
import O from "./components/TableHead.js";
|
|
9
|
-
import { TableContainer as
|
|
10
|
-
function
|
|
11
|
-
columns:
|
|
12
|
-
data:
|
|
13
|
-
keyField:
|
|
14
|
-
selectable:
|
|
15
|
-
onRowSelect:
|
|
16
|
-
rowActions:
|
|
17
|
-
stickyHeader:
|
|
18
|
-
loading:
|
|
19
|
-
emptyStateMessage:
|
|
20
|
-
pagination:
|
|
21
|
-
onRowClick:
|
|
22
|
-
rowClassName:
|
|
9
|
+
import { TableContainer as R, LoadingOverlay as w, TablesWrapper as ee, DataScrollBox as te, StyledTable as re, TableBody as y, EmptyState as ne, TableRow as I, TableCellContainer as $, ActionsTable as se, TableFooter as le } from "./Table.styles.js";
|
|
10
|
+
function fe({
|
|
11
|
+
columns: C,
|
|
12
|
+
data: s,
|
|
13
|
+
keyField: l,
|
|
14
|
+
selectable: g = !1,
|
|
15
|
+
onRowSelect: a,
|
|
16
|
+
rowActions: m,
|
|
17
|
+
stickyHeader: B = !1,
|
|
18
|
+
loading: x = !1,
|
|
19
|
+
emptyStateMessage: N,
|
|
20
|
+
pagination: r,
|
|
21
|
+
onRowClick: u,
|
|
22
|
+
rowClassName: b,
|
|
23
23
|
isRowDisabled: d,
|
|
24
|
-
breakpoint:
|
|
25
|
-
alignHeader:
|
|
24
|
+
breakpoint: _ = "md",
|
|
25
|
+
alignHeader: E = "start"
|
|
26
26
|
}) {
|
|
27
|
-
const [h,
|
|
28
|
-
|
|
27
|
+
const [h, v] = p([]), [L, P] = p(_), [K, z] = p(null), [M, V] = p(!1), f = Q(null), { t: q } = Y(), j = U(() => {
|
|
28
|
+
f.current && V(f.current.scrollWidth > f.current.clientWidth);
|
|
29
|
+
}, []);
|
|
30
|
+
T(() => (j(), window.addEventListener("resize", j), () => window.removeEventListener("resize", j)), [j, s]), T(() => {
|
|
29
31
|
const e = () => {
|
|
30
|
-
|
|
32
|
+
z(null);
|
|
31
33
|
};
|
|
32
34
|
return document.addEventListener("click", e), () => {
|
|
33
35
|
document.removeEventListener("click", e);
|
|
34
36
|
};
|
|
35
|
-
}, []),
|
|
37
|
+
}, []), T(() => {
|
|
36
38
|
const e = () => {
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
+
const i = window.innerWidth;
|
|
40
|
+
i < 576 ? P("sm") : i < 992 ? P("md") : P("lg");
|
|
39
41
|
};
|
|
40
42
|
return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
41
43
|
}, []);
|
|
42
|
-
const
|
|
43
|
-
h.length ===
|
|
44
|
-
},
|
|
45
|
-
const
|
|
46
|
-
return
|
|
47
|
-
},
|
|
48
|
-
const
|
|
49
|
-
let
|
|
50
|
-
|
|
44
|
+
const S = X(() => C.filter((e) => typeof e.hidden == "function" ? !e.hidden(L) : !e.hidden), [C, L]), G = () => {
|
|
45
|
+
h.length === s.length ? v([]) : v([...s]), a && a(h.length === s.length ? [] : [...s]);
|
|
46
|
+
}, H = (e) => {
|
|
47
|
+
const i = h.filter((n) => e[l] === n[l]);
|
|
48
|
+
return i && i.length > 0;
|
|
49
|
+
}, J = (e) => {
|
|
50
|
+
const i = h.some((o) => o[l] === e[l]);
|
|
51
|
+
let n;
|
|
52
|
+
i ? n = h.filter((o) => o[l] !== e[l]) : n = [...h, e], v(n), a && a(n);
|
|
51
53
|
};
|
|
52
|
-
return /* @__PURE__ */ t.jsxs(
|
|
53
|
-
|
|
54
|
-
/* @__PURE__ */ t.jsxs(
|
|
55
|
-
/* @__PURE__ */ t.jsx(
|
|
54
|
+
return /* @__PURE__ */ t.jsxs(R, { children: [
|
|
55
|
+
x && /* @__PURE__ */ t.jsx(w, { children: /* @__PURE__ */ t.jsx(Z, { size: "3rem" }) }),
|
|
56
|
+
/* @__PURE__ */ t.jsxs(ee, { children: [
|
|
57
|
+
/* @__PURE__ */ t.jsx(te, { ref: f, children: /* @__PURE__ */ t.jsxs(re, { children: [
|
|
56
58
|
/* @__PURE__ */ t.jsx(
|
|
57
59
|
O,
|
|
58
60
|
{
|
|
59
|
-
data:
|
|
60
|
-
handleSelectAll:
|
|
61
|
+
data: s,
|
|
62
|
+
handleSelectAll: G,
|
|
61
63
|
selectedRows: h,
|
|
62
|
-
visibleColumns:
|
|
63
|
-
alignHeader:
|
|
64
|
+
visibleColumns: S,
|
|
65
|
+
alignHeader: E,
|
|
64
66
|
rowActions: void 0,
|
|
65
|
-
stickyHeader:
|
|
66
|
-
selectable:
|
|
67
|
-
loading:
|
|
67
|
+
stickyHeader: B,
|
|
68
|
+
selectable: g,
|
|
69
|
+
loading: x
|
|
68
70
|
}
|
|
69
71
|
),
|
|
70
|
-
/* @__PURE__ */ t.jsx(
|
|
71
|
-
const
|
|
72
|
+
/* @__PURE__ */ t.jsx(y, { children: s.length === 0 ? /* @__PURE__ */ t.jsx("tr", { children: /* @__PURE__ */ t.jsx("td", { colSpan: (g ? 1 : 0) + S.length, children: /* @__PURE__ */ t.jsx(ne, { children: /* @__PURE__ */ t.jsx(k, { variant: "mdText", children: N ?? q("NO_DATA_AVAILABLE") }) }) }) }) : s.map((e, i) => {
|
|
73
|
+
const n = (d == null ? void 0 : d(e)) ?? !1, o = h.some((c) => c[l] === e[l]), A = e[l];
|
|
72
74
|
return /* @__PURE__ */ t.jsxs(
|
|
73
|
-
|
|
75
|
+
I,
|
|
74
76
|
{
|
|
75
77
|
$selected: o,
|
|
76
|
-
$disabled:
|
|
77
|
-
$clickable: !!
|
|
78
|
-
onClick: () =>
|
|
79
|
-
|
|
78
|
+
$disabled: n,
|
|
79
|
+
$clickable: !!u && !n,
|
|
80
|
+
onClick: () => {
|
|
81
|
+
n || u == null || u(e);
|
|
82
|
+
},
|
|
83
|
+
className: (b == null ? void 0 : b(e, i)) ?? "",
|
|
80
84
|
children: [
|
|
81
|
-
|
|
82
|
-
|
|
85
|
+
g && /* @__PURE__ */ t.jsx($, { $align: "center", $isFirstColumn: !0, children: /* @__PURE__ */ t.jsx(
|
|
86
|
+
F,
|
|
83
87
|
{
|
|
84
88
|
checkBoxOptions: {
|
|
85
|
-
checked:
|
|
89
|
+
checked: H(e),
|
|
86
90
|
$variant: "primary",
|
|
87
|
-
$disabled:
|
|
91
|
+
$disabled: n,
|
|
88
92
|
$size: "sm",
|
|
89
|
-
onChange: () => !
|
|
93
|
+
onChange: () => !n && J(e)
|
|
90
94
|
}
|
|
91
95
|
}
|
|
92
96
|
) }),
|
|
93
|
-
|
|
94
|
-
|
|
97
|
+
S.map((c) => /* @__PURE__ */ t.jsx($, { $align: c.align, children: /* @__PURE__ */ t.jsx(
|
|
98
|
+
W,
|
|
95
99
|
{
|
|
96
|
-
column:
|
|
100
|
+
column: c,
|
|
97
101
|
row: e,
|
|
98
|
-
type:
|
|
99
|
-
align:
|
|
100
|
-
className:
|
|
101
|
-
width:
|
|
102
|
-
minWidth:
|
|
103
|
-
maxWidth:
|
|
102
|
+
type: c.cellType ?? "text",
|
|
103
|
+
align: c.align,
|
|
104
|
+
className: c.className,
|
|
105
|
+
width: c.width ?? "",
|
|
106
|
+
minWidth: c.minWidth ?? "",
|
|
107
|
+
maxWidth: c.maxWidth ?? ""
|
|
104
108
|
}
|
|
105
|
-
) }, `${A}-${
|
|
109
|
+
) }, `${A}-${c.id}`))
|
|
106
110
|
]
|
|
107
111
|
},
|
|
108
112
|
A
|
|
109
113
|
);
|
|
110
114
|
}) })
|
|
111
115
|
] }) }),
|
|
112
|
-
|
|
116
|
+
m && m.length > 0 && /* @__PURE__ */ t.jsxs(se, { $hasScrollbar: M, children: [
|
|
113
117
|
/* @__PURE__ */ t.jsx(
|
|
114
118
|
O,
|
|
115
119
|
{
|
|
116
|
-
data:
|
|
120
|
+
data: s,
|
|
117
121
|
handleSelectAll: () => {
|
|
118
122
|
},
|
|
119
123
|
selectedRows: h,
|
|
120
124
|
visibleColumns: [],
|
|
121
|
-
alignHeader:
|
|
122
|
-
rowActions:
|
|
123
|
-
stickyHeader:
|
|
125
|
+
alignHeader: E,
|
|
126
|
+
rowActions: m,
|
|
127
|
+
stickyHeader: B,
|
|
124
128
|
selectable: !1,
|
|
125
|
-
loading:
|
|
129
|
+
loading: x
|
|
126
130
|
}
|
|
127
131
|
),
|
|
128
|
-
/* @__PURE__ */ t.jsx(
|
|
129
|
-
const
|
|
130
|
-
return /* @__PURE__ */ t.jsx(
|
|
131
|
-
|
|
132
|
+
/* @__PURE__ */ t.jsx(y, { children: s.length === 0 ? /* @__PURE__ */ t.jsx("tr", { children: /* @__PURE__ */ t.jsx("td", { children: /* @__PURE__ */ t.jsx("div", { style: { height: "3.5rem" } }) }) }) : s.map((e) => {
|
|
133
|
+
const i = (d == null ? void 0 : d(e)) ?? !1;
|
|
134
|
+
return /* @__PURE__ */ t.jsx(I, { $disabled: i, children: /* @__PURE__ */ t.jsx($, { $align: "center", $isActionCell: !0, children: /* @__PURE__ */ t.jsx(
|
|
135
|
+
W,
|
|
132
136
|
{
|
|
133
137
|
row: e,
|
|
134
138
|
type: "icon",
|
|
135
139
|
iconOptions: {
|
|
136
|
-
keyField:
|
|
137
|
-
rowActions:
|
|
138
|
-
activeDropdown:
|
|
139
|
-
setActiveDropdown:
|
|
140
|
+
keyField: l,
|
|
141
|
+
rowActions: m,
|
|
142
|
+
activeDropdown: K,
|
|
143
|
+
setActiveDropdown: z
|
|
140
144
|
}
|
|
141
145
|
}
|
|
142
|
-
) }) }, `action-${e[
|
|
146
|
+
) }) }, `action-${e[l]}`);
|
|
143
147
|
}) })
|
|
144
148
|
] })
|
|
145
149
|
] }),
|
|
146
|
-
|
|
147
|
-
|
|
150
|
+
r && r.enabled && /* @__PURE__ */ t.jsx(le, { children: /* @__PURE__ */ t.jsx(
|
|
151
|
+
D,
|
|
148
152
|
{
|
|
149
|
-
currentPage:
|
|
150
|
-
totalPages:
|
|
151
|
-
onChange:
|
|
152
|
-
disabled:
|
|
153
|
-
hidePrevButton:
|
|
154
|
-
hideNextButton:
|
|
155
|
-
siblingCount:
|
|
156
|
-
boundaryCount:
|
|
157
|
-
itemsPerPage:
|
|
158
|
-
totalItems:
|
|
159
|
-
itemsPerPageOptions:
|
|
160
|
-
onItemsPerPageChange:
|
|
153
|
+
currentPage: r.currentPage,
|
|
154
|
+
totalPages: r.totalPages,
|
|
155
|
+
onChange: r.onPageChange,
|
|
156
|
+
disabled: x,
|
|
157
|
+
hidePrevButton: r.hidePrevButton,
|
|
158
|
+
hideNextButton: r.hideNextButton,
|
|
159
|
+
siblingCount: r.siblingCount,
|
|
160
|
+
boundaryCount: r.boundaryCount,
|
|
161
|
+
itemsPerPage: r.pageSize,
|
|
162
|
+
totalItems: r.totalItems,
|
|
163
|
+
itemsPerPageOptions: r.itemsPerPageOptions,
|
|
164
|
+
onItemsPerPageChange: r.onItemsPerPageChange
|
|
161
165
|
}
|
|
162
166
|
) })
|
|
163
167
|
] });
|
|
164
168
|
}
|
|
165
169
|
export {
|
|
166
|
-
|
|
170
|
+
fe as default
|
|
167
171
|
};
|
|
@@ -53,6 +53,8 @@ export declare const TablesWrapper: import("styled-components/dist/types").IStyl
|
|
|
53
53
|
export declare const DataScrollBox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, "ref"> & {
|
|
54
54
|
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
55
55
|
}, never>> & string;
|
|
56
|
-
export declare const ActionsTable: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").
|
|
56
|
+
export declare const ActionsTable: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, never>, "ref"> & {
|
|
57
57
|
ref?: ((instance: HTMLTableElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLTableElement> | null | undefined;
|
|
58
|
-
},
|
|
58
|
+
}, {
|
|
59
|
+
$hasScrollbar?: boolean;
|
|
60
|
+
}>> & string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import r, { css as
|
|
1
|
+
import r, { css as e } from "styled-components";
|
|
2
2
|
import { Scrollbar as s } from "../../styles/Scrollbar.styles.js";
|
|
3
3
|
r.button`
|
|
4
4
|
background: none;
|
|
@@ -52,7 +52,7 @@ const a = r.div`
|
|
|
52
52
|
color: ${({ theme: o }) => o.colors.grey.n600};
|
|
53
53
|
|
|
54
54
|
&:hover {
|
|
55
|
-
background-color: ${({ theme: o, $disabled:
|
|
55
|
+
background-color: ${({ theme: o, $disabled: n }) => n ? "transparent" : o.colors.primary.purple.n100};
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
svg {
|
|
@@ -62,7 +62,7 @@ const a = r.div`
|
|
|
62
62
|
width: 100%;
|
|
63
63
|
position: relative;
|
|
64
64
|
border-radius: ${({ theme: o }) => o.borderRadius.md};
|
|
65
|
-
box-shadow: ${({ theme: o }) => o.boxShadow.s2};
|
|
65
|
+
/* box-shadow: ${({ theme: o }) => o.boxShadow.s2}; */
|
|
66
66
|
background-color: ${({ theme: o }) => o.colors.grey.n50};
|
|
67
67
|
overflow-x: hidden;
|
|
68
68
|
overflow-y: auto;
|
|
@@ -79,7 +79,7 @@ r(s)`
|
|
|
79
79
|
-webkit-overflow-scrolling: touch;
|
|
80
80
|
`;
|
|
81
81
|
const u = r.thead`
|
|
82
|
-
${({ $sticky: o }) => o &&
|
|
82
|
+
${({ $sticky: o }) => o && e`
|
|
83
83
|
top: 0;
|
|
84
84
|
`}
|
|
85
85
|
`, $ = r.tr`
|
|
@@ -99,61 +99,73 @@ const u = r.thead`
|
|
|
99
99
|
height: 3.5rem;
|
|
100
100
|
|
|
101
101
|
/* Apply sticky positioning for first and last columns */
|
|
102
|
-
${({ $isFirstColumn: o }) => o &&
|
|
102
|
+
${({ $isFirstColumn: o }) => o && e`
|
|
103
103
|
left: 0;
|
|
104
104
|
/* z-index: 2; */
|
|
105
105
|
`}
|
|
106
106
|
|
|
107
|
-
${({ $isLastColumn: o }) => o &&
|
|
107
|
+
${({ $isLastColumn: o }) => o && e`
|
|
108
108
|
right: 0;
|
|
109
109
|
/* z-index: 2; */
|
|
110
110
|
text-align: end;
|
|
111
111
|
`}
|
|
112
|
-
${({ $isActionCell: o }) => o &&
|
|
113
|
-
padding: ${({ theme:
|
|
112
|
+
${({ $isActionCell: o }) => o && e`
|
|
113
|
+
padding: ${({ theme: n }) => n.spacing.sm} 0;
|
|
114
114
|
text-align: center;
|
|
115
115
|
`}
|
|
116
116
|
|
|
117
117
|
&:hover {
|
|
118
|
-
${({ $sortable: o }) => o &&
|
|
119
|
-
background-color: ${({ theme:
|
|
118
|
+
${({ $sortable: o }) => o && e`
|
|
119
|
+
background-color: ${({ theme: n }) => n.colors.grey.n150};
|
|
120
120
|
`}
|
|
121
121
|
}
|
|
122
|
-
`, y = r.tbody``,
|
|
123
|
-
background-color: ${({ theme: o, $selected:
|
|
122
|
+
`, y = r.tbody``, m = r.tr`
|
|
123
|
+
background-color: ${({ theme: o, $selected: n }) => n ? o.colors.primary.purple.n100 : o.colors.grey.n50};
|
|
124
124
|
height: 3.5rem;
|
|
125
|
-
|
|
125
|
+
transition: background-color 0.2s;
|
|
126
|
+
|
|
127
|
+
${({ $disabled: o }) => o && e`
|
|
126
128
|
opacity: 0.6;
|
|
127
129
|
pointer-events: none;
|
|
128
130
|
`}
|
|
129
131
|
|
|
130
|
-
${({ $clickable: o }) => o &&
|
|
132
|
+
${({ $clickable: o }) => o && e`
|
|
131
133
|
cursor: pointer;
|
|
132
134
|
`}
|
|
133
|
-
|
|
135
|
+
|
|
136
|
+
&:hover {
|
|
137
|
+
${({ $disabled: o }) => !o && e`
|
|
138
|
+
background-color: ${({ theme: n }) => n.colors.grey.n100};
|
|
139
|
+
|
|
140
|
+
td {
|
|
141
|
+
background-color: ${({ theme: n }) => n.colors.grey.n100};
|
|
142
|
+
}
|
|
143
|
+
`}
|
|
144
|
+
}
|
|
145
|
+
`, x = r.td`
|
|
134
146
|
padding: ${({ theme: o }) => o.spacing.s} ${({ theme: o }) => o.spacing.sm};
|
|
135
147
|
text-align: ${({ $align: o }) => o ?? "left"};
|
|
136
|
-
|
|
148
|
+
border-bottom: 1px solid ${({ theme: o }) => o.colors.grey.n150};
|
|
137
149
|
color: ${({ theme: o }) => o.colors.grey.n700};
|
|
138
150
|
/* min-height: 3.5rem;
|
|
139
151
|
max-height: 3.5rem; */
|
|
140
152
|
background-color: ${({ theme: o }) => o.colors.grey.n50};
|
|
141
153
|
/* height: 3.5rem; */
|
|
142
154
|
/* Apply sticky positioning for first and last columns */
|
|
143
|
-
${({ $isFirstColumn: o }) => o &&
|
|
155
|
+
${({ $isFirstColumn: o }) => o && e`
|
|
144
156
|
z-index: 1;
|
|
145
157
|
left: 0;
|
|
146
158
|
`}
|
|
147
159
|
|
|
148
|
-
${({ $isLastColumn: o }) => o &&
|
|
160
|
+
${({ $isLastColumn: o }) => o && e`
|
|
149
161
|
right: 0;
|
|
150
162
|
width: 0px;
|
|
151
163
|
z-index: 1;
|
|
152
164
|
background-color: transparent;
|
|
153
165
|
`}
|
|
154
166
|
|
|
155
|
-
${({ $isActionCell: o }) => o &&
|
|
156
|
-
padding: 0 ${({ theme:
|
|
167
|
+
${({ $isActionCell: o }) => o && e`
|
|
168
|
+
padding: 0 ${({ theme: n }) => n.spacing.sm};
|
|
157
169
|
`}
|
|
158
170
|
`;
|
|
159
171
|
r.span`
|
|
@@ -161,7 +173,7 @@ r.span`
|
|
|
161
173
|
align-items: center;
|
|
162
174
|
margin-left: ${({ theme: o }) => o.spacing.xxs};
|
|
163
175
|
`;
|
|
164
|
-
const
|
|
176
|
+
const h = r.div`
|
|
165
177
|
display: flex;
|
|
166
178
|
justify-content: center;
|
|
167
179
|
align-items: center;
|
|
@@ -192,30 +204,30 @@ r.span`
|
|
|
192
204
|
font-size: ${({ theme: o }) => o.typography.sizes.s2};
|
|
193
205
|
font-weight: ${({ theme: o }) => o.typography.weights.semiBold};
|
|
194
206
|
|
|
195
|
-
${({ theme: o, $variant:
|
|
196
|
-
switch (
|
|
207
|
+
${({ theme: o, $variant: n }) => {
|
|
208
|
+
switch (n) {
|
|
197
209
|
case "primary":
|
|
198
|
-
return
|
|
210
|
+
return e`
|
|
199
211
|
background-color: ${o.colors.primary.purple.n100};
|
|
200
212
|
color: ${o.colors.primary.purple.n500};
|
|
201
213
|
`;
|
|
202
214
|
case "success":
|
|
203
|
-
return
|
|
215
|
+
return e`
|
|
204
216
|
background-color: ${o.colors.state.success.n100};
|
|
205
217
|
color: ${o.colors.state.success.n500};
|
|
206
218
|
`;
|
|
207
219
|
case "warning":
|
|
208
|
-
return
|
|
220
|
+
return e`
|
|
209
221
|
background-color: ${o.colors.secondary.yellow.n200};
|
|
210
222
|
color: ${o.colors.secondary.yellow.n600};
|
|
211
223
|
`;
|
|
212
224
|
case "error":
|
|
213
|
-
return
|
|
225
|
+
return e`
|
|
214
226
|
background-color: ${o.colors.state.error.n100};
|
|
215
227
|
color: ${o.colors.state.error.n500};
|
|
216
228
|
`;
|
|
217
229
|
default:
|
|
218
|
-
return
|
|
230
|
+
return e`
|
|
219
231
|
background-color: ${o.colors.grey.n200};
|
|
220
232
|
color: ${o.colors.grey.n600};
|
|
221
233
|
`;
|
|
@@ -228,8 +240,8 @@ r.span`
|
|
|
228
240
|
height: 0.5rem;
|
|
229
241
|
border-radius: 50%;
|
|
230
242
|
margin-right: ${({ theme: o }) => o.spacing.xxs};
|
|
231
|
-
background-color: ${({ theme: o, $status:
|
|
232
|
-
switch (
|
|
243
|
+
background-color: ${({ theme: o, $status: n }) => {
|
|
244
|
+
switch (n) {
|
|
233
245
|
case "success":
|
|
234
246
|
return o.colors.state.success.n500;
|
|
235
247
|
case "warning":
|
|
@@ -245,9 +257,11 @@ const k = r.div`
|
|
|
245
257
|
display: flex;
|
|
246
258
|
position: relative;
|
|
247
259
|
width: 100%;
|
|
260
|
+
gap: 0;
|
|
248
261
|
`, v = r(s)`
|
|
249
262
|
flex: 1 1 auto;
|
|
250
263
|
overflow-x: auto;
|
|
264
|
+
overflow-y: hidden;
|
|
251
265
|
min-width: 0;
|
|
252
266
|
&::-webkit-scrollbar {
|
|
253
267
|
height: ${({ theme: o }) => o.spacing.s};
|
|
@@ -256,12 +270,11 @@ const k = r.div`
|
|
|
256
270
|
height: ${({ theme: o }) => o.spacing.s};
|
|
257
271
|
}
|
|
258
272
|
`, T = r(t)`
|
|
259
|
-
/* position: sticky;
|
|
260
|
-
right: 0; */
|
|
261
273
|
flex: 0 0 auto;
|
|
262
|
-
width:
|
|
274
|
+
width: auto;
|
|
263
275
|
table-layout: fixed;
|
|
264
276
|
background-color: ${({ theme: o }) => o.colors.grey.n50};
|
|
277
|
+
margin-bottom: ${({ theme: o, $hasScrollbar: n }) => n ? o.spacing.s : "0"};
|
|
265
278
|
`;
|
|
266
279
|
export {
|
|
267
280
|
T as ActionsTable,
|
|
@@ -275,11 +288,11 @@ export {
|
|
|
275
288
|
t as StyledTable,
|
|
276
289
|
u as StyledTableHead,
|
|
277
290
|
y as TableBody,
|
|
278
|
-
|
|
291
|
+
x as TableCellContainer,
|
|
279
292
|
g as TableContainer,
|
|
280
|
-
|
|
293
|
+
h as TableFooter,
|
|
281
294
|
b as TableHeaderCell,
|
|
282
295
|
$ as TableHeaderRow,
|
|
283
|
-
|
|
296
|
+
m as TableRow,
|
|
284
297
|
k as TablesWrapper
|
|
285
298
|
};
|
|
@@ -50,6 +50,7 @@ export type TableProps<T> = {
|
|
|
50
50
|
onItemsPerPageChange?: (itemsPerPage: number) => void;
|
|
51
51
|
};
|
|
52
52
|
onRowClick?: (row: T) => void;
|
|
53
|
+
onClickView?: (row: T) => void;
|
|
53
54
|
rowClassName?: (row: T, index: number) => string;
|
|
54
55
|
isRowDisabled?: (row: T) => boolean;
|
|
55
56
|
breakpoint?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as m from "react";
|
|
2
|
-
import i from "../../../_virtual/
|
|
2
|
+
import i from "../../../_virtual/index.js";
|
|
3
3
|
import { useBootstrapPrefix as l } from "./ThemeProvider.js";
|
|
4
4
|
import d from "./divWithClassName.js";
|
|
5
5
|
import { j as p } from "../../../_virtual/jsx-runtime.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as s from "react";
|
|
2
|
-
import e from "../../../_virtual/
|
|
2
|
+
import e from "../../../_virtual/index.js";
|
|
3
3
|
import i from "../../@restart/ui/esm/Anchor.js";
|
|
4
4
|
import { useBootstrapPrefix as p } from "./ThemeProvider.js";
|
|
5
5
|
import { j as f } from "../../../_virtual/jsx-runtime.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import o from "../../../_virtual/
|
|
1
|
+
import o from "../../../_virtual/index2.js";
|
|
2
2
|
import * as p from "react";
|
|
3
|
-
import n from "../../../_virtual/
|
|
3
|
+
import n from "../../../_virtual/index.js";
|
|
4
4
|
import { j as i } from "../../../_virtual/jsx-runtime.js";
|
|
5
5
|
const m = {
|
|
6
6
|
/** An accessible label indicating the relevant information about the Close Button. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import $ from "../../../_virtual/
|
|
1
|
+
import $ from "../../../_virtual/index.js";
|
|
2
2
|
import * as d from "react";
|
|
3
3
|
import { useBootstrapPrefix as B, useBootstrapBreakpoints as h, useBootstrapMinBreakpoint as N } from "./ThemeProvider.js";
|
|
4
4
|
import { j } from "../../../_virtual/jsx-runtime.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import j from "../../../_virtual/
|
|
1
|
+
import j from "../../../_virtual/index.js";
|
|
2
2
|
import d from "../../dom-helpers/esm/css.js";
|
|
3
3
|
import h, { useMemo as r } from "react";
|
|
4
4
|
import { ENTERED as G, ENTERING as L, EXITING as B, EXITED as M } from "../../react-transition-group/esm/Transition.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as m from "react";
|
|
2
|
-
import p from "../../../_virtual/
|
|
2
|
+
import p from "../../../_virtual/index.js";
|
|
3
3
|
import { useBootstrapPrefix as d } from "./ThemeProvider.js";
|
|
4
4
|
import { j as i } from "../../../_virtual/jsx-runtime.js";
|
|
5
5
|
const f = /* @__PURE__ */ m.forwardRef(({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as d from "react";
|
|
2
|
-
import m from "../../../_virtual/
|
|
2
|
+
import m from "../../../_virtual/index.js";
|
|
3
3
|
import { useBootstrapPrefix as p } from "./ThemeProvider.js";
|
|
4
4
|
import { j as f } from "../../../_virtual/jsx-runtime.js";
|
|
5
5
|
const i = /* @__PURE__ */ d.forwardRef(({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as m from "react";
|
|
2
|
-
import s from "../../../_virtual/
|
|
2
|
+
import s from "../../../_virtual/index.js";
|
|
3
3
|
import { useBootstrapPrefix as p } from "./ThemeProvider.js";
|
|
4
4
|
import { j as d } from "../../../_virtual/jsx-runtime.js";
|
|
5
5
|
const f = /* @__PURE__ */ m.forwardRef(({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import a from "../../@restart/hooks/esm/useMergedRefs.js";
|
|
2
2
|
import d from "../../@restart/ui/esm/DropdownContext.js";
|
|
3
3
|
import { useDropdownToggle as g } from "../../@restart/ui/esm/DropdownToggle.js";
|
|
4
|
-
import l from "../../../_virtual/
|
|
4
|
+
import l from "../../../_virtual/index.js";
|
|
5
5
|
import * as u from "react";
|
|
6
6
|
import { useContext as w } from "react";
|
|
7
7
|
import x from "./Button.js";
|