@ceed/ads 0.0.31 → 0.0.32
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.
|
@@ -239,14 +239,7 @@ function DataTable(props) {
|
|
|
239
239
|
boxShadow: "sm",
|
|
240
240
|
borderRadius: "sm",
|
|
241
241
|
} }, backgroundProps),
|
|
242
|
-
React.createElement(Table, __assign({
|
|
243
|
-
{
|
|
244
|
-
// "--TableCell-headBackground": "transparent",
|
|
245
|
-
"--TableCell-selectedBackground": function (theme) {
|
|
246
|
-
return theme.vars.palette.neutral.plainActiveBg;
|
|
247
|
-
},
|
|
248
|
-
},
|
|
249
|
-
] }, innerProps),
|
|
242
|
+
React.createElement(Table, __assign({}, innerProps),
|
|
250
243
|
React.createElement("thead", null,
|
|
251
244
|
React.createElement("tr", null,
|
|
252
245
|
checkboxSelection && (React.createElement("th", { style: {
|
|
@@ -259,14 +252,7 @@ function DataTable(props) {
|
|
|
259
252
|
var rowId = "".concat(rowIndex + (page - 1) * pageSize);
|
|
260
253
|
return (React.createElement("tr", { key: rowId, role: checkboxSelection ? "checkbox" : undefined, tabIndex: checkboxSelection ? -1 : undefined, onClick: checkboxSelection
|
|
261
254
|
? function (e) { return onCheckboxChange(e, rowId); }
|
|
262
|
-
: undefined, "aria-checked": checkboxSelection ? isSelectedRow(rowId) : undefined,
|
|
263
|
-
? {
|
|
264
|
-
"--TableCell-dataBackground": "var(--TableCell-selectedBackground)",
|
|
265
|
-
"--TableCell-headBackground": "var(--TableCell-selectedBackground)",
|
|
266
|
-
}
|
|
267
|
-
: {
|
|
268
|
-
"--TableCell-headBackground": "transparent",
|
|
269
|
-
} },
|
|
255
|
+
: undefined, "aria-checked": checkboxSelection ? isSelectedRow(rowId) : undefined },
|
|
270
256
|
checkboxSelection && (React.createElement("th", { scope: "row", style: {
|
|
271
257
|
textAlign: "center",
|
|
272
258
|
} },
|
|
@@ -12,8 +12,23 @@ var defaultTheme = extendTheme({
|
|
|
12
12
|
root: function (_a) {
|
|
13
13
|
var _b;
|
|
14
14
|
var theme = _a.theme;
|
|
15
|
-
return (_b = {
|
|
16
|
-
|
|
15
|
+
return (_b = {
|
|
16
|
+
"--TableRow-stripeBackground": theme.palette.background.level1,
|
|
17
|
+
"--TableCell-selectedBackground": theme.palette.background.level2,
|
|
18
|
+
"--TableRow-hoverBackground": theme.palette.background.level3,
|
|
19
|
+
"& tbody tr[aria-checked=false] th": {
|
|
20
|
+
"--TableCell-headBackground": "transparent",
|
|
21
|
+
},
|
|
22
|
+
"& tbody tr[aria-checked=true]:hover th": {
|
|
23
|
+
"--TableCell-headBackground": "var(--TableRow-hoverBackground)",
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
_b["& tbody tr[aria-checked=true]:not(:hover) th"] = {
|
|
27
|
+
"--TableCell-headBackground": "var(--TableCell-selectedBackground)",
|
|
28
|
+
},
|
|
29
|
+
_b["& tbody tr[aria-checked=true]:not(:hover) td"] = {
|
|
30
|
+
"--TableCell-dataBackground": "var(--TableCell-selectedBackground)",
|
|
31
|
+
},
|
|
17
32
|
_b["& .".concat(checkboxClasses.root)] = {
|
|
18
33
|
verticalAlign: "middle",
|
|
19
34
|
},
|
package/framer/index.js
CHANGED
|
@@ -32480,97 +32480,79 @@ function DataTable(props) {
|
|
|
32480
32480
|
borderRadius: "sm"
|
|
32481
32481
|
},
|
|
32482
32482
|
...backgroundProps,
|
|
32483
|
-
children: /* @__PURE__ */ jsxs2(
|
|
32484
|
-
|
|
32485
|
-
|
|
32486
|
-
|
|
32483
|
+
children: /* @__PURE__ */ jsxs2(Table3, { ...innerProps, children: [
|
|
32484
|
+
/* @__PURE__ */ jsx2("thead", { children: /* @__PURE__ */ jsxs2("tr", { children: [
|
|
32485
|
+
checkboxSelection && /* @__PURE__ */ jsx2(
|
|
32486
|
+
"th",
|
|
32487
32487
|
{
|
|
32488
|
-
|
|
32489
|
-
|
|
32490
|
-
|
|
32491
|
-
|
|
32492
|
-
|
|
32493
|
-
|
|
32494
|
-
/* @__PURE__ */ jsx2("thead", { children: /* @__PURE__ */ jsxs2("tr", { children: [
|
|
32495
|
-
checkboxSelection && /* @__PURE__ */ jsx2(
|
|
32496
|
-
"th",
|
|
32488
|
+
style: {
|
|
32489
|
+
width: "40px",
|
|
32490
|
+
textAlign: "center"
|
|
32491
|
+
},
|
|
32492
|
+
children: /* @__PURE__ */ jsx2(
|
|
32493
|
+
RenderCheckbox,
|
|
32497
32494
|
{
|
|
32498
|
-
|
|
32499
|
-
|
|
32500
|
-
|
|
32501
|
-
|
|
32502
|
-
children: /* @__PURE__ */ jsx2(
|
|
32503
|
-
RenderCheckbox,
|
|
32504
|
-
{
|
|
32505
|
-
onChange: onAllCheckboxChange,
|
|
32506
|
-
checked: isAllSelected,
|
|
32507
|
-
indeterminate: (selectionModel || []).length > 0 && !isAllSelected,
|
|
32508
|
-
...checkboxProps
|
|
32509
|
-
}
|
|
32510
|
-
)
|
|
32495
|
+
onChange: onAllCheckboxChange,
|
|
32496
|
+
checked: isAllSelected,
|
|
32497
|
+
indeterminate: (selectionModel || []).length > 0 && !isAllSelected,
|
|
32498
|
+
...checkboxProps
|
|
32511
32499
|
}
|
|
32512
|
-
)
|
|
32513
|
-
|
|
32514
|
-
|
|
32515
|
-
|
|
32516
|
-
|
|
32517
|
-
|
|
32518
|
-
|
|
32519
|
-
|
|
32520
|
-
|
|
32521
|
-
|
|
32522
|
-
|
|
32523
|
-
|
|
32524
|
-
|
|
32525
|
-
|
|
32526
|
-
|
|
32527
|
-
|
|
32528
|
-
|
|
32529
|
-
|
|
32530
|
-
|
|
32531
|
-
|
|
32532
|
-
|
|
32533
|
-
|
|
32534
|
-
|
|
32535
|
-
|
|
32536
|
-
|
|
32537
|
-
|
|
32538
|
-
|
|
32539
|
-
"
|
|
32500
|
+
)
|
|
32501
|
+
}
|
|
32502
|
+
),
|
|
32503
|
+
columns.map((c) => /* @__PURE__ */ jsx2(
|
|
32504
|
+
HeadCell2,
|
|
32505
|
+
{
|
|
32506
|
+
stickyHeader: props.stickyHeader,
|
|
32507
|
+
...c
|
|
32508
|
+
},
|
|
32509
|
+
c.field
|
|
32510
|
+
))
|
|
32511
|
+
] }) }),
|
|
32512
|
+
/* @__PURE__ */ jsx2("tbody", { children: dataInPage.map((row, rowIndex) => {
|
|
32513
|
+
const rowId = `${rowIndex + (page - 1) * pageSize}`;
|
|
32514
|
+
return /* @__PURE__ */ jsxs2(
|
|
32515
|
+
"tr",
|
|
32516
|
+
{
|
|
32517
|
+
role: checkboxSelection ? "checkbox" : void 0,
|
|
32518
|
+
tabIndex: checkboxSelection ? -1 : void 0,
|
|
32519
|
+
onClick: checkboxSelection ? (e) => onCheckboxChange(e, rowId) : void 0,
|
|
32520
|
+
"aria-checked": checkboxSelection ? isSelectedRow(rowId) : void 0,
|
|
32521
|
+
children: [
|
|
32522
|
+
checkboxSelection && /* @__PURE__ */ jsx2(
|
|
32523
|
+
"th",
|
|
32524
|
+
{
|
|
32525
|
+
scope: "row",
|
|
32526
|
+
style: {
|
|
32527
|
+
textAlign: "center"
|
|
32528
|
+
},
|
|
32529
|
+
children: /* @__PURE__ */ jsx2(
|
|
32530
|
+
RenderCheckbox,
|
|
32540
32531
|
{
|
|
32541
|
-
|
|
32542
|
-
|
|
32543
|
-
|
|
32544
|
-
},
|
|
32545
|
-
children: /* @__PURE__ */ jsx2(
|
|
32546
|
-
RenderCheckbox,
|
|
32547
|
-
{
|
|
32548
|
-
onChange: (e) => onCheckboxChange(e, rowId),
|
|
32549
|
-
checked: isSelectedRow(rowId),
|
|
32550
|
-
...checkboxProps
|
|
32551
|
-
}
|
|
32552
|
-
)
|
|
32532
|
+
onChange: (e) => onCheckboxChange(e, rowId),
|
|
32533
|
+
checked: isSelectedRow(rowId),
|
|
32534
|
+
...checkboxProps
|
|
32553
32535
|
}
|
|
32554
|
-
)
|
|
32555
|
-
|
|
32556
|
-
|
|
32557
|
-
|
|
32558
|
-
|
|
32559
|
-
|
|
32560
|
-
|
|
32561
|
-
|
|
32562
|
-
|
|
32563
|
-
|
|
32564
|
-
|
|
32565
|
-
|
|
32566
|
-
|
|
32567
|
-
|
|
32568
|
-
|
|
32569
|
-
|
|
32570
|
-
|
|
32571
|
-
|
|
32572
|
-
}
|
|
32573
|
-
)
|
|
32536
|
+
)
|
|
32537
|
+
}
|
|
32538
|
+
),
|
|
32539
|
+
columns.map((column2) => /* @__PURE__ */ jsx2(
|
|
32540
|
+
"td",
|
|
32541
|
+
{
|
|
32542
|
+
style: {
|
|
32543
|
+
textAlign: column2.type === "number" ? "end" : "start"
|
|
32544
|
+
},
|
|
32545
|
+
children: row[column2.field]
|
|
32546
|
+
},
|
|
32547
|
+
column2.field
|
|
32548
|
+
))
|
|
32549
|
+
]
|
|
32550
|
+
},
|
|
32551
|
+
rowId
|
|
32552
|
+
);
|
|
32553
|
+
}) }),
|
|
32554
|
+
Footer && /* @__PURE__ */ jsx2(Footer, {})
|
|
32555
|
+
] })
|
|
32574
32556
|
}
|
|
32575
32557
|
),
|
|
32576
32558
|
/* @__PURE__ */ jsx2(
|
|
@@ -32847,7 +32829,21 @@ var defaultTheme4 = extendTheme({
|
|
|
32847
32829
|
},
|
|
32848
32830
|
styleOverrides: {
|
|
32849
32831
|
root: ({ theme }) => ({
|
|
32850
|
-
|
|
32832
|
+
"--TableRow-stripeBackground": theme.palette.background.level1,
|
|
32833
|
+
"--TableCell-selectedBackground": theme.palette.background.level2,
|
|
32834
|
+
"--TableRow-hoverBackground": theme.palette.background.level3,
|
|
32835
|
+
"& tbody tr[aria-checked=false] th": {
|
|
32836
|
+
"--TableCell-headBackground": "transparent"
|
|
32837
|
+
},
|
|
32838
|
+
"& tbody tr[aria-checked=true]:hover th": {
|
|
32839
|
+
"--TableCell-headBackground": "var(--TableRow-hoverBackground)"
|
|
32840
|
+
},
|
|
32841
|
+
[`& tbody tr[aria-checked=true]:not(:hover) th`]: {
|
|
32842
|
+
"--TableCell-headBackground": "var(--TableCell-selectedBackground)"
|
|
32843
|
+
},
|
|
32844
|
+
[`& tbody tr[aria-checked=true]:not(:hover) td`]: {
|
|
32845
|
+
"--TableCell-dataBackground": "var(--TableCell-selectedBackground)"
|
|
32846
|
+
},
|
|
32851
32847
|
[`& .${checkboxClasses_default.root}`]: {
|
|
32852
32848
|
verticalAlign: "middle"
|
|
32853
32849
|
}
|