@primer/react 38.44.1-rc.db12d2e52 → 38.45.0-rc.3d36dffa3
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/CHANGELOG.md +9 -1
- package/dist/DataTable/DataTable.d.ts +11 -2
- package/dist/DataTable/DataTable.js +148 -61
- package/dist/DataTable/Table-7f0e985b.css +2 -0
- package/dist/DataTable/{Table-0327e248.css.map → Table-7f0e985b.css.map} +1 -1
- package/dist/DataTable/Table.d.ts +1 -0
- package/dist/DataTable/Table.js +18 -13
- package/dist/DataTable/Table.module.css.js +1 -1
- package/dist/DataTable/TableBulkActions-aca5618a.css +2 -0
- package/dist/DataTable/TableBulkActions-aca5618a.css.map +1 -0
- package/dist/DataTable/TableBulkActions.d.ts +15 -0
- package/dist/DataTable/TableBulkActions.js +217 -0
- package/dist/DataTable/TableBulkActions.module.css.js +12 -0
- package/dist/DataTable/index.d.ts +4 -2
- package/dist/DataTable/index.js +2 -0
- package/dist/DataTable/useTable.js +46 -36
- package/dist/FilteredActionList/FilteredActionList.js +7 -3
- package/dist/FilteredActionList/FilteredActionListInput.d.ts +2 -1
- package/dist/FilteredActionList/FilteredActionListInput.js +16 -14
- package/dist/experimental/index.d.ts +3 -2
- package/dist/utils/descendant-registry.d.ts +1 -1
- package/generated/components.json +51 -0
- package/package.json +1 -1
- package/dist/DataTable/Table-0327e248.css +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
# @primer/react
|
|
2
2
|
|
|
3
|
-
## 38.
|
|
3
|
+
## 38.45.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#8534](https://github.com/primer/react/pull/8534) [`57c2ac5`](https://github.com/primer/react/commit/57c2ac594efb8ee9b3e59ed2b9abb66fc15a36d9) Thanks [@rickyzhangca](https://github.com/rickyzhangca)! - DataTable: Add bulk actions in the table header with selection counts and focus recovery.
|
|
4
8
|
|
|
5
9
|
### Patch Changes
|
|
6
10
|
|
|
7
11
|
- [#8612](https://github.com/primer/react/pull/8612) [`9cd1f8a`](https://github.com/primer/react/commit/9cd1f8ae897b8db44434474b937fda39f57f15f9) Thanks [@alexus37](https://github.com/alexus37)! - ActionBar, UnderlineNav: Batch descendant registry updates to reduce cascading renders during rapid item changes
|
|
8
12
|
|
|
13
|
+
- [#8634](https://github.com/primer/react/pull/8634) [`62d32c9`](https://github.com/primer/react/commit/62d32c94ac730847a4557441b65a6a48334201a3) Thanks [@HadrielWonda](https://github.com/HadrielWonda)! - FilteredActionList: Only reference the list from the filter input while the list is rendered, so `aria-controls` never points at a missing element during body loading or when a message is shown
|
|
14
|
+
|
|
9
15
|
- [#8638](https://github.com/primer/react/pull/8638) [`4b1cc1d`](https://github.com/primer/react/commit/4b1cc1d863209aa9aaf9f6ab47ae25b86de5c1e1) Thanks [@joshblack](https://github.com/joshblack)! - Polymorphic components: Fix TypeScript inference for component-specific props while preserving `as` support.
|
|
10
16
|
|
|
11
17
|
- [#8611](https://github.com/primer/react/pull/8611) [`68a5c0b`](https://github.com/primer/react/commit/68a5c0b18c800b8f6f6555f9d4d327c48389ae06) Thanks [@alexus37](https://github.com/alexus37)! - ActionMenu: Avoid an extra render when closed menus mount while preserving accessible trigger labeling
|
|
12
18
|
|
|
19
|
+
- [#8534](https://github.com/primer/react/pull/8534) [`57c2ac5`](https://github.com/primer/react/commit/57c2ac594efb8ee9b3e59ed2b9abb66fc15a36d9) Thanks [@rickyzhangca](https://github.com/rickyzhangca)! - Table: Preserve bottom corners when the final row group is empty.
|
|
20
|
+
|
|
13
21
|
## 38.44.0
|
|
14
22
|
|
|
15
23
|
### Minor Changes
|
|
@@ -2,9 +2,15 @@ import { IsAny, ObjectPaths } from "./utils.js";
|
|
|
2
2
|
import { DataTableData, DataTableRowGroup, DataTableRowId, UniqueRow } from "./row.js";
|
|
3
3
|
import { SortDirection } from "./sorting.js";
|
|
4
4
|
import { Column } from "./column.js";
|
|
5
|
-
import {
|
|
5
|
+
import { TableBulkActionsProps } from "./TableBulkActions.js";
|
|
6
|
+
import { ReactElement, ReactNode, RefObject } from "react";
|
|
6
7
|
|
|
7
8
|
//#region src/DataTable/DataTable.d.ts
|
|
9
|
+
interface DataTableBulkActionsContext {
|
|
10
|
+
selectedRows: ReadonlySet<DataTableRowId>;
|
|
11
|
+
selectedCount: number;
|
|
12
|
+
clearSelection: () => void;
|
|
13
|
+
}
|
|
8
14
|
type DataTableBaseProps<Data extends UniqueRow> = {
|
|
9
15
|
/**
|
|
10
16
|
* Provide an id to an element which uniquely describes this table
|
|
@@ -100,6 +106,9 @@ type DataTableBaseProps<Data extends UniqueRow> = {
|
|
|
100
106
|
}: {
|
|
101
107
|
expandedGroups: Set<DataTableRowId>;
|
|
102
108
|
}) => void;
|
|
109
|
+
renderBulkActions?: (context: DataTableBulkActionsContext) => ReactNode;
|
|
110
|
+
bulkActionsProps?: Pick<TableBulkActionsProps, 'aria-label' | 'getSelectedCountLabel'>;
|
|
111
|
+
bulkActionsReturnFocusRef?: RefObject<HTMLElement | null>;
|
|
103
112
|
};
|
|
104
113
|
type DataTableProps<Data extends UniqueRow> = DataTableBaseProps<Data> & {
|
|
105
114
|
/**
|
|
@@ -118,4 +127,4 @@ interface DataTableComponent {
|
|
|
118
127
|
}
|
|
119
128
|
declare const DataTable: DataTableComponent;
|
|
120
129
|
//#endregion
|
|
121
|
-
export { DataTable, DataTableProps };
|
|
130
|
+
export { DataTable, DataTableBulkActionsContext, DataTableProps };
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
import { c } from "../utils/react-compiler-runtime.js";
|
|
2
|
+
import VisuallyHidden from "../_VisuallyHidden.js";
|
|
2
3
|
import { useTable } from "./useTable.js";
|
|
3
4
|
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, TableRowSelection, TableSelectionHeader, TableSortHeader } from "./Table.js";
|
|
4
5
|
import { TableGroup } from "./TableGroup.js";
|
|
6
|
+
import TableBulkActions_module_css_default from "./TableBulkActions.module.css.js";
|
|
7
|
+
import { TableBulkActions } from "./TableBulkActions.js";
|
|
8
|
+
import { useId, useRef } from "react";
|
|
5
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
10
|
//#region src/DataTable/DataTable.tsx
|
|
7
11
|
function defaultGetRowId(row) {
|
|
8
12
|
return row.id;
|
|
9
13
|
}
|
|
10
14
|
function DataTableImplementation(t0) {
|
|
11
|
-
const $ = c(
|
|
12
|
-
const { "aria-labelledby": labelledby, "aria-describedby": describedby, cellPadding, columns, data, initialSortColumn, initialSortDirection, externalSorting, getRowId: t1, onToggleSort, rowSelection: t2, selectedRows, defaultSelectedRows, onSelectionChange, isRowSelectable, collapsibleGroups: t3, expandedGroups, defaultExpandedGroups, onExpandedGroupsChange } = t0;
|
|
15
|
+
const $ = c(72);
|
|
16
|
+
const { "aria-labelledby": labelledby, "aria-describedby": describedby, cellPadding, columns, data, initialSortColumn, initialSortDirection, externalSorting, getRowId: t1, onToggleSort, rowSelection: t2, selectedRows, defaultSelectedRows, onSelectionChange, isRowSelectable, collapsibleGroups: t3, expandedGroups, defaultExpandedGroups, onExpandedGroupsChange, renderBulkActions, bulkActionsProps, bulkActionsReturnFocusRef } = t0;
|
|
13
17
|
const getRowId = t1 === void 0 ? defaultGetRowId : t1;
|
|
14
18
|
const rowSelection = t2 === void 0 ? false : t2;
|
|
15
19
|
const collapsibleGroups = t3 === void 0 ? false : t3;
|
|
20
|
+
const selectionCheckboxRef = useRef(null);
|
|
21
|
+
const tableRef = useRef(null);
|
|
22
|
+
const bulkActionsId = useId();
|
|
16
23
|
let t4;
|
|
17
24
|
if ($[0] !== collapsibleGroups || $[1] !== columns || $[2] !== data || $[3] !== defaultExpandedGroups || $[4] !== defaultSelectedRows || $[5] !== expandedGroups || $[6] !== externalSorting || $[7] !== getRowId || $[8] !== initialSortColumn || $[9] !== initialSortDirection || $[10] !== isRowSelectable || $[11] !== onExpandedGroupsChange || $[12] !== onSelectionChange || $[13] !== rowSelection || $[14] !== selectedRows) {
|
|
18
25
|
t4 = {
|
|
@@ -50,6 +57,8 @@ function DataTableImplementation(t0) {
|
|
|
50
57
|
$[15] = t4;
|
|
51
58
|
} else t4 = $[15];
|
|
52
59
|
const { headers, bodies, actions, selection, gridTemplateColumns } = useTable(t4);
|
|
60
|
+
const hasBulkActions = Boolean(rowSelection && renderBulkActions);
|
|
61
|
+
const bulkActionsActive = hasBulkActions && selection.selectedCount > 0;
|
|
53
62
|
let t5;
|
|
54
63
|
if ($[16] !== actions || $[17] !== rowSelection || $[18] !== selection) {
|
|
55
64
|
t5 = (row) => /* @__PURE__ */ jsxs(TableRow, { children: [rowSelection ? /* @__PURE__ */ jsx(TableRowSelection, {
|
|
@@ -74,9 +83,12 @@ function DataTableImplementation(t0) {
|
|
|
74
83
|
$[19] = t5;
|
|
75
84
|
} else t5 = $[19];
|
|
76
85
|
const renderRow = t5;
|
|
77
|
-
|
|
86
|
+
const t6 = hasBulkActions ? -1 : void 0;
|
|
87
|
+
const t7 = hasBulkActions ? TableBulkActions_module_css_default.HeaderRow : void 0;
|
|
88
|
+
let t8;
|
|
78
89
|
if ($[20] !== actions || $[21] !== rowSelection || $[22] !== selection) {
|
|
79
|
-
|
|
90
|
+
t8 = rowSelection ? /* @__PURE__ */ jsx(TableSelectionHeader, {
|
|
91
|
+
checkboxRef: selectionCheckboxRef,
|
|
80
92
|
id: selection.headerId,
|
|
81
93
|
selection: selection.allSelected ? "all" : selection.someSelected ? "some" : "none",
|
|
82
94
|
disabled: selection.selectableCount === 0,
|
|
@@ -89,13 +101,30 @@ function DataTableImplementation(t0) {
|
|
|
89
101
|
$[20] = actions;
|
|
90
102
|
$[21] = rowSelection;
|
|
91
103
|
$[22] = selection;
|
|
92
|
-
$[23] =
|
|
93
|
-
} else
|
|
94
|
-
let
|
|
95
|
-
if ($[24] !== actions || $[25] !==
|
|
96
|
-
let
|
|
97
|
-
if ($[
|
|
98
|
-
|
|
104
|
+
$[23] = t8;
|
|
105
|
+
} else t8 = $[23];
|
|
106
|
+
let t9;
|
|
107
|
+
if ($[24] !== actions || $[25] !== bulkActionsActive || $[26] !== bulkActionsId || $[27] !== headers || $[28] !== onToggleSort) {
|
|
108
|
+
let t10;
|
|
109
|
+
if ($[30] !== actions || $[31] !== bulkActionsActive || $[32] !== bulkActionsId || $[33] !== onToggleSort) {
|
|
110
|
+
t10 = (header, index) => {
|
|
111
|
+
if (bulkActionsActive) {
|
|
112
|
+
const labelId = typeof header.column.header === "string" ? void 0 : `${bulkActionsId}-column-${index}`;
|
|
113
|
+
return /* @__PURE__ */ jsx(TableHeader, {
|
|
114
|
+
id: header.domId,
|
|
115
|
+
"aria-labelledby": labelId,
|
|
116
|
+
align: header.column.align,
|
|
117
|
+
"aria-sort": header.getSortDirection() === "ASC" ? "ascending" : header.getSortDirection() === "DESC" ? "descending" : void 0,
|
|
118
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
119
|
+
className: TableBulkActions_module_css_default.ColumnLabel,
|
|
120
|
+
children: typeof header.column.header === "string" ? /* @__PURE__ */ jsx(VisuallyHidden, { children: header.column.header }) : /* @__PURE__ */ jsx("span", {
|
|
121
|
+
id: labelId,
|
|
122
|
+
hidden: true,
|
|
123
|
+
children: header.column.header()
|
|
124
|
+
})
|
|
125
|
+
})
|
|
126
|
+
}, header.id);
|
|
127
|
+
}
|
|
99
128
|
if (header.isSortable()) return /* @__PURE__ */ jsx(TableSortHeader, {
|
|
100
129
|
id: header.domId,
|
|
101
130
|
align: header.column.align,
|
|
@@ -113,28 +142,83 @@ function DataTableImplementation(t0) {
|
|
|
113
142
|
children: typeof header.column.header === "string" ? header.column.header : header.column.header()
|
|
114
143
|
}, header.id);
|
|
115
144
|
};
|
|
116
|
-
$[
|
|
117
|
-
$[
|
|
118
|
-
$[
|
|
119
|
-
|
|
120
|
-
|
|
145
|
+
$[30] = actions;
|
|
146
|
+
$[31] = bulkActionsActive;
|
|
147
|
+
$[32] = bulkActionsId;
|
|
148
|
+
$[33] = onToggleSort;
|
|
149
|
+
$[34] = t10;
|
|
150
|
+
} else t10 = $[34];
|
|
151
|
+
t9 = headers.map(t10);
|
|
121
152
|
$[24] = actions;
|
|
122
|
-
$[25] =
|
|
123
|
-
$[26] =
|
|
124
|
-
$[27] =
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
153
|
+
$[25] = bulkActionsActive;
|
|
154
|
+
$[26] = bulkActionsId;
|
|
155
|
+
$[27] = headers;
|
|
156
|
+
$[28] = onToggleSort;
|
|
157
|
+
$[29] = t9;
|
|
158
|
+
} else t9 = $[29];
|
|
159
|
+
let t10;
|
|
160
|
+
if ($[35] !== t7 || $[36] !== t8 || $[37] !== t9) {
|
|
161
|
+
t10 = /* @__PURE__ */ jsxs(TableRow, {
|
|
162
|
+
className: t7,
|
|
163
|
+
children: [t8, t9]
|
|
164
|
+
});
|
|
165
|
+
$[35] = t7;
|
|
166
|
+
$[36] = t8;
|
|
167
|
+
$[37] = t9;
|
|
168
|
+
$[38] = t10;
|
|
169
|
+
} else t10 = $[38];
|
|
170
|
+
let t11;
|
|
171
|
+
if ($[39] !== actions || $[40] !== bulkActionsActive || $[41] !== bulkActionsProps || $[42] !== bulkActionsReturnFocusRef || $[43] !== hasBulkActions || $[44] !== headers.length || $[45] !== renderBulkActions || $[46] !== selection) {
|
|
172
|
+
t11 = hasBulkActions ? /* @__PURE__ */ jsx(TableRow, {
|
|
173
|
+
className: TableBulkActions_module_css_default.HeaderRow,
|
|
174
|
+
children: /* @__PURE__ */ jsx(VisuallyHidden, {
|
|
175
|
+
as: "td",
|
|
176
|
+
isVisible: bulkActionsActive,
|
|
177
|
+
colSpan: headers.length + 1,
|
|
178
|
+
role: "cell",
|
|
179
|
+
className: bulkActionsActive ? TableBulkActions_module_css_default.BulkActionsCell : void 0,
|
|
180
|
+
children: /* @__PURE__ */ jsx(TableBulkActions, {
|
|
181
|
+
...bulkActionsProps,
|
|
182
|
+
selectedCount: selection.selectedCount,
|
|
183
|
+
onFocusReturn: () => {
|
|
184
|
+
const target = bulkActionsReturnFocusRef === null || bulkActionsReturnFocusRef === void 0 ? void 0 : bulkActionsReturnFocusRef.current;
|
|
185
|
+
if (target !== null && target !== void 0 && target.isConnected) target.focus();
|
|
186
|
+
else if (selectionCheckboxRef.current && !selectionCheckboxRef.current.disabled) selectionCheckboxRef.current.focus();
|
|
187
|
+
else {
|
|
188
|
+
var _tableRef$current;
|
|
189
|
+
(_tableRef$current = tableRef.current) === null || _tableRef$current === void 0 || _tableRef$current.focus();
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
children: bulkActionsActive ? renderBulkActions === null || renderBulkActions === void 0 ? void 0 : renderBulkActions({
|
|
193
|
+
selectedRows: new Set(selection.selectedRows),
|
|
194
|
+
selectedCount: selection.selectedCount,
|
|
195
|
+
clearSelection: actions.clearSelection
|
|
196
|
+
}) : null
|
|
197
|
+
})
|
|
198
|
+
})
|
|
199
|
+
}) : null;
|
|
200
|
+
$[39] = actions;
|
|
201
|
+
$[40] = bulkActionsActive;
|
|
202
|
+
$[41] = bulkActionsProps;
|
|
203
|
+
$[42] = bulkActionsReturnFocusRef;
|
|
204
|
+
$[43] = hasBulkActions;
|
|
205
|
+
$[44] = headers.length;
|
|
206
|
+
$[45] = renderBulkActions;
|
|
207
|
+
$[46] = selection;
|
|
208
|
+
$[47] = t11;
|
|
209
|
+
} else t11 = $[47];
|
|
210
|
+
let t12;
|
|
211
|
+
if ($[48] !== t10 || $[49] !== t11) {
|
|
212
|
+
t12 = /* @__PURE__ */ jsxs(TableHead, { children: [t10, t11] });
|
|
213
|
+
$[48] = t10;
|
|
214
|
+
$[49] = t11;
|
|
215
|
+
$[50] = t12;
|
|
216
|
+
} else t12 = $[50];
|
|
217
|
+
let t13;
|
|
218
|
+
if ($[51] !== actions || $[52] !== bodies || $[53] !== collapsibleGroups || $[54] !== headers.length || $[55] !== renderRow || $[56] !== rowSelection) {
|
|
219
|
+
let t14;
|
|
220
|
+
if ($[58] !== actions || $[59] !== collapsibleGroups || $[60] !== headers.length || $[61] !== renderRow || $[62] !== rowSelection) {
|
|
221
|
+
t14 = (body) => body.type === "row-group" ? /* @__PURE__ */ jsx(TableGroup, {
|
|
138
222
|
id: body.id,
|
|
139
223
|
label: body.label,
|
|
140
224
|
rowCount: body.rows.length,
|
|
@@ -147,40 +231,43 @@ function DataTableImplementation(t0) {
|
|
|
147
231
|
},
|
|
148
232
|
children: body.rows.map(renderRow)
|
|
149
233
|
}, body.key) : /* @__PURE__ */ jsx(TableBody, { children: body.rows.map(renderRow) }, body.key);
|
|
150
|
-
$[
|
|
151
|
-
$[
|
|
152
|
-
$[
|
|
153
|
-
$[
|
|
154
|
-
$[
|
|
155
|
-
$[
|
|
156
|
-
} else
|
|
157
|
-
|
|
158
|
-
$[
|
|
159
|
-
$[
|
|
160
|
-
$[
|
|
161
|
-
$[
|
|
162
|
-
$[
|
|
163
|
-
$[
|
|
164
|
-
$[
|
|
165
|
-
} else
|
|
166
|
-
let
|
|
167
|
-
if ($[
|
|
168
|
-
|
|
234
|
+
$[58] = actions;
|
|
235
|
+
$[59] = collapsibleGroups;
|
|
236
|
+
$[60] = headers.length;
|
|
237
|
+
$[61] = renderRow;
|
|
238
|
+
$[62] = rowSelection;
|
|
239
|
+
$[63] = t14;
|
|
240
|
+
} else t14 = $[63];
|
|
241
|
+
t13 = bodies.map(t14);
|
|
242
|
+
$[51] = actions;
|
|
243
|
+
$[52] = bodies;
|
|
244
|
+
$[53] = collapsibleGroups;
|
|
245
|
+
$[54] = headers.length;
|
|
246
|
+
$[55] = renderRow;
|
|
247
|
+
$[56] = rowSelection;
|
|
248
|
+
$[57] = t13;
|
|
249
|
+
} else t13 = $[57];
|
|
250
|
+
let t14;
|
|
251
|
+
if ($[64] !== cellPadding || $[65] !== describedby || $[66] !== gridTemplateColumns || $[67] !== labelledby || $[68] !== t12 || $[69] !== t13 || $[70] !== t6) {
|
|
252
|
+
t14 = /* @__PURE__ */ jsxs(Table, {
|
|
253
|
+
ref: tableRef,
|
|
254
|
+
tabIndex: t6,
|
|
169
255
|
"aria-labelledby": labelledby,
|
|
170
256
|
"aria-describedby": describedby,
|
|
171
257
|
cellPadding,
|
|
172
258
|
gridTemplateColumns,
|
|
173
|
-
children: [
|
|
259
|
+
children: [t12, t13]
|
|
174
260
|
});
|
|
175
|
-
$[
|
|
176
|
-
$[
|
|
177
|
-
$[
|
|
178
|
-
$[
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
181
|
-
$[
|
|
182
|
-
|
|
183
|
-
|
|
261
|
+
$[64] = cellPadding;
|
|
262
|
+
$[65] = describedby;
|
|
263
|
+
$[66] = gridTemplateColumns;
|
|
264
|
+
$[67] = labelledby;
|
|
265
|
+
$[68] = t12;
|
|
266
|
+
$[69] = t13;
|
|
267
|
+
$[70] = t6;
|
|
268
|
+
$[71] = t14;
|
|
269
|
+
} else t14 = $[71];
|
|
270
|
+
return t14;
|
|
184
271
|
}
|
|
185
272
|
const DataTable = DataTableImplementation;
|
|
186
273
|
//#endregion
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.prc-DataTable-TableContainer-hn0p3{column-gap:var(--base-size-8,.5rem);display:grid;grid-template-areas:"title actions" "divider divider" "subtitle subtitle" "filter filter" "table table" "footer footer";grid-template-columns:1fr 1fr}.prc-DataTable-TableTitle-nM43N{align-self:center;font-size:var(--text-body-size-medium,.875rem);font-weight:var(--base-text-weight-semibold,600);grid-area:title;line-height:20px}.prc-DataTable-TableSubtitle--L6Ho,.prc-DataTable-TableTitle-nM43N{color:var(--fgColor-default,#1f2328);margin:0}.prc-DataTable-TableSubtitle--L6Ho{font-size:var(--text-body-size-small,.75rem);font-weight:var(--base-text-weight-normal,400);grid-area:subtitle;line-height:var(--text-title-lineHeight-small,1.5)}.prc-DataTable-TableActions-fkc2b{align-items:center;column-gap:var(--base-size-8,.5rem);display:flex;grid-area:actions;justify-self:end}.prc-DataTable-TableDivider-TRc3b{background-color:var(--borderColor-default,#d1d9e0);grid-area:divider;height:1px;margin-block-end:var(--base-size-8,.5rem);margin-block-start:var(--base-size-16,1rem);width:100%}.prc-DataTable-TableActions-fkc2b+.prc-DataTable-TableOverflowWrapper-bSqT-,.prc-DataTable-TableSubtitle--L6Ho+.prc-DataTable-TableOverflowWrapper-bSqT-,.prc-DataTable-TableTitle-nM43N+.prc-DataTable-TableOverflowWrapper-bSqT-{margin-block-start:var(--base-size-8,.5rem)}.prc-DataTable-Table-7ux1n,.prc-DataTable-TableOverflowWrapper-bSqT-{grid-area:table}.prc-DataTable-Table-7ux1n{--table-border-radius:0.375rem;--table-cell-padding:var(--cell-padding-block,0.5rem) var(--cell-padding-inline,0.75rem);--table-font-size:0.75rem;background-color:var(--bgColor-default,#fff);border-collapse:separate;border-spacing:0;display:grid;font-size:var(--table-font-size);grid-template-columns:var(--grid-template-columns);line-height:1.66667;width:100%}.prc-DataTable-Table-7ux1n:where([data-cell-padding=condensed]){--cell-padding-block:0.25rem;--cell-padding-inline:0.5rem}.prc-DataTable-Table-7ux1n:where([data-cell-padding=normal]){--cell-padding-block:0.5rem;--cell-padding-inline:0.75rem}.prc-DataTable-Table-7ux1n:where([data-cell-padding=spacious]){--cell-padding-block:0.75rem;--cell-padding-inline:1rem}.prc-DataTable-TableCell-Fk4ve:first-child,.prc-DataTable-TableHeader-eyTab:first-child{border-inline-start:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,#d1d9e0)}.prc-DataTable-TableCell-Fk4ve:last-child,.prc-DataTable-TableHeader-eyTab:last-child{border-inline-end:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,#d1d9e0)}.prc-DataTable-TableCell-Fk4ve,.prc-DataTable-TableHeader-eyTab{align-items:center;border-block-end:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,#d1d9e0);display:flex;padding:var(--table-cell-padding);text-align:start}.prc-DataTable-TableCell-Fk4ve:where([data-cell-align=end]),.prc-DataTable-TableHeader-eyTab:where([data-cell-align=end]){display:flex;justify-content:flex-end;text-align:end}.prc-DataTable-TableHeader-eyTab[data-cell-align=end] .prc-DataTable-TableSortButton--aq0y{display:flex;flex-direction:row-reverse}.prc-DataTable-TableHead-4FaBf .prc-DataTable-TableRow-Icc7F:first-of-type .prc-DataTable-TableHeader-eyTab{border-block-start:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,#d1d9e0)}.prc-DataTable-TableHead-4FaBf .prc-DataTable-TableRow-Icc7F:first-of-type .prc-DataTable-TableHeader-eyTab:first-child{border-top-left-radius:var(--table-border-radius)}.prc-DataTable-TableHead-4FaBf .prc-DataTable-TableRow-Icc7F:first-of-type .prc-DataTable-TableHeader-eyTab:last-child{border-top-right-radius:var(--table-border-radius)}.prc-DataTable-TableOverflowWrapper-bSqT-:last-child .prc-DataTable-Table-7ux1n .prc-DataTable-TableBody-QKQy2:last-of-type .prc-DataTable-TableRow-Icc7F:last-of-type .prc-DataTable-TableCell-Fk4ve:first-child{border-bottom-left-radius:var(--table-border-radius)}.prc-DataTable-TableOverflowWrapper-bSqT-:last-child .prc-DataTable-Table-7ux1n .prc-DataTable-TableBody-QKQy2:last-of-type .prc-DataTable-TableRow-Icc7F:last-of-type .prc-DataTable-TableCell-Fk4ve:last-child{border-bottom-right-radius:var(--table-border-radius)}.prc-DataTable-TableOverflowWrapper-bSqT-:last-child .prc-DataTable-TableGroupHeaderBody-K-YqR:where(:has(+.prc-DataTable-TableBody-QKQy2:where([hidden],:empty):last-child)) .prc-DataTable-TableGroupHeaderCell-vnb30{border-bottom-left-radius:var(--table-border-radius);border-bottom-right-radius:var(--table-border-radius)}.prc-DataTable-TableRow-Icc7F>:first-child .prc-DataTable-TableCellSkeletonItem-bGhwZ,.prc-DataTable-TableRow-Icc7F>:first-child:not(.prc-DataTable-TableCellSkeleton-DMdM5){padding-inline-start:var(--base-size-16,1rem)}.prc-DataTable-TableRow-Icc7F>:last-child .prc-DataTable-TableCellSkeletonItem-bGhwZ,.prc-DataTable-TableRow-Icc7F>:last-child:not(.prc-DataTable-TableCellSkeleton-DMdM5){padding-inline-end:var(--base-size-16,1rem)}.prc-DataTable-TableHeader-eyTab{background-color:var(--bgColor-muted,#f6f8fa);border-block-start:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,#d1d9e0);color:var(--fgColor-muted,#59636e);font-weight:var(--base-text-weight-semibold,600)}.prc-DataTable-TableHeader-eyTab:where([aria-sort=ascending]),.prc-DataTable-TableHeader-eyTab:where([aria-sort=descending]){color:var(--fgColor-default,#1f2328)}.prc-DataTable-TableRowSelection-HwyDU,.prc-DataTable-TableSelectionHeader-Op0cK{justify-content:center}.prc-DataTable-TableSortIcon-wHvJw{visibility:hidden}.prc-DataTable-TableHeader-eyTab .prc-DataTable-TableSortButton--aq0y:focus .prc-DataTable-TableSortIcon--ascending-Lpx6z,.prc-DataTable-TableHeader-eyTab:hover .prc-DataTable-TableSortIcon--ascending-Lpx6z,.prc-DataTable-TableHeader-eyTab[aria-sort=ascending] .prc-DataTable-TableSortIcon--ascending-Lpx6z,.prc-DataTable-TableHeader-eyTab[aria-sort=descending] .prc-DataTable-TableSortIcon--descending-hHJGo{visibility:visible}.prc-DataTable-TableRow-Icc7F:hover .prc-DataTable-TableCell-Fk4ve:not(.prc-DataTable-TableCellSkeleton-DMdM5){background-color:var(--control-transparent-bgColor-hover,#818b981a)}.prc-DataTable-TableCell-Fk4ve:where([scope=row]){align-items:center;color:var(--fgColor-default,#1f2328);display:flex;font-weight:var(--base-text-weight-semibold,600)}.prc-DataTable-TableCellSkeleton-DMdM5{padding:0}.prc-DataTable-TableCellSkeletonItems-Ljhq5{display:flex;flex-direction:column;width:100%}.prc-DataTable-TableCellSkeletonItem-bGhwZ{padding:var(--table-cell-padding)}.prc-DataTable-TableCellSkeletonItem-bGhwZ:nth-of-type(5n+1){--skeleton-item-width:85%}.prc-DataTable-TableCellSkeletonItem-bGhwZ:nth-of-type(5n+2){--skeleton-item-width:67.5%}.prc-DataTable-TableCellSkeletonItem-bGhwZ:nth-of-type(5n+3){--skeleton-item-width:80%}.prc-DataTable-TableCellSkeletonItem-bGhwZ:nth-of-type(5n+4){--skeleton-item-width:60%}.prc-DataTable-TableCellSkeletonItem-bGhwZ:nth-of-type(5n+5){--skeleton-item-width:75%}.prc-DataTable-TableCellSkeletonItem-bGhwZ [data-component=SkeletonText]{width:var(--skeleton-item-width)}.prc-DataTable-TableCellSkeletonItem-bGhwZ:not(:last-of-type){border-block-end:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,#d1d9e0)}.prc-DataTable-TableSortButton--aq0y{column-gap:.5rem}.prc-DataTable-TableBody-QKQy2,.prc-DataTable-TableGroupHeaderBody-K-YqR,.prc-DataTable-TableHead-4FaBf,.prc-DataTable-TableRow-Icc7F{display:contents}@supports (grid-template-columns:subgrid){.prc-DataTable-TableBody-QKQy2,.prc-DataTable-TableGroupHeaderBody-K-YqR,.prc-DataTable-TableHead-4FaBf,.prc-DataTable-TableRow-Icc7F{display:grid;grid-column:-1/1;grid-template-columns:subgrid}}.prc-DataTable-TableGroupHeaderCell-vnb30{align-items:center;background-color:var(--bgColor-muted,#f6f8fa);border-block-end:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,#d1d9e0);border-inline-end:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,#d1d9e0);border-inline-start:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,#d1d9e0);color:var(--fgColor-muted,#59636e);column-gap:calc(var(--cell-padding-inline)*2);display:flex;grid-column:1/-1;padding:var(--table-cell-padding);text-align:start}.prc-DataTable-TableGroupHeaderContent-H9FbA{align-items:baseline;column-gap:var(--base-size-8,.5rem);display:flex}.prc-DataTable-TableGroupHeaderLabel--c-od{color:var(--fgColor-default,#1f2328);font-weight:var(--base-text-weight-semibold,600)}.prc-DataTable-TableGroupHeaderCount-6r8Pj{color:var(--fgColor-muted,#59636e)}.prc-DataTable-TableBody-QKQy2:where([hidden]){display:none}.prc-DataTable-TableGroupToggle-9OwNG{align-items:center;align-self:center;border-radius:var(--borderRadius-small,.1875rem);color:var(--fgColor-default,#1f2328);display:inline-flex;flex-shrink:0;height:var(--base-size-24,1.5rem);justify-content:center;margin-inline:calc((var(--base-size-16,1rem) - var(--base-size-24,1.5rem))/2);width:var(--base-size-24,1.5rem)}.prc-DataTable-TableGroupToggle-9OwNG:hover{background-color:var(--bgColor-neutral-muted,#818b981f)}.prc-DataTable-TableGroupToggle-9OwNG:where([aria-expanded=true]) svg{transform:rotate(90deg)}.prc-DataTable-PlaceholderText-8bHo7{color:var(--fgColor-muted,#59636e)}
|
|
2
|
+
/*# sourceMappingURL=Table-7f0e985b.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/DataTable/Table.module.css.js"],"names":[],"mappings":"AACA,oCAUE,mCAA8B,CAT9B,YAAa,CAEb,uHAMiB,CAPjB,6BASF,CAGA,gCAQE,iBAAkB,CANlB,8CAAuC,CACvC,gDAA6C,CAI7C,eAAgB,CAFhB,gBAIF,CAGA,mEANE,oCAA6B,CAL7B,QAkBF,CAPA,mCAEE,4CAAsC,CACtC,8CAA2C,CAG3C,kBAAmB,CAFnB,kDAGF,CAGA,kCAGE,kBAAmB,CADnB,mCAA8B,CAD9B,YAAa,CAGb,iBAAkB,CAClB,gBACF,CAGA,kCAIE,mDAA4C,CAC5C,iBAAkB,CAHlB,UAAW,CAKX,yCAAoC,CADpC,2CAAuC,CALvC,UAOF,CAGA,mOAGE,2CACF,CAOA,qEAJE,eAsCF,CAlCA,2BAEE,8BAA+B,CAC/B,wFAA2F,CAC3F,yBAA0B,CAW1B,4CAAwC,CADxC,wBAAyB,CAFzB,gBAAiB,CANjB,YAAa,CAGb,gCAAiC,CAQjC,kDAAmD,CANnD,mBAA0B,CAJ1B,UA2BF,CAdE,gEACE,4BAA6B,CAC7B,4BACF,CAEA,6DACE,2BAA4B,CAC5B,6BACF,CAEA,+DACE,4BAA6B,CAC7B,0BACF,CAIF,wFAEE,6FACF,CAEA,sFAEE,2FACF,CAEA,gEAME,kBAAmB,CACnB,0FAA0E,CAL1E,YAAa,CAEb,iCAAkC,CAClC,gBAGF,CAEA,0HAEE,YAAa,CAEb,wBAAyB,CADzB,cAEF,CAEA,2FACE,YAAa,CACb,0BACF,CAEA,4GACE,4FACF,CAIA,wHAEE,iDACF,CAGA,uHAEE,kDACF,CAGA,kNAEE,oDACF,CAGA,iNAEE,qDACF,CAGA,yMAIE,oDAAqD,CAErD,qDACF,CAOA,6KAEE,6CACF,CAEA,2KAEE,2CACF,CAGA,iCAGE,6CAAsC,CACtC,4FAA4E,CAF5E,kCAA2B,CAD3B,gDAIF,CAEA,6HAEE,oCACF,CAEA,iFAEE,sBACF,CAGA,mCACE,iBACF,CASA,yZAEE,kBACF,CAGA,+GACE,mEACF,CAGA,kDAIE,kBAAmB,CADnB,oCAA6B,CAF7B,YAAa,CACb,gDAGF,CAGA,uCACE,SACF,CAEA,4CACE,YAAa,CAEb,qBAAsB,CADtB,UAEF,CAEA,2CAEE,iCAqBF,CAnBE,6DACE,yBACF,CAEA,6DACE,2BACF,CAEA,6DACE,yBACF,CAEA,6DACE,yBACF,CAEA,6DACE,yBACF,CAGF,yEACE,gCACF,CAEA,8DACE,0FACF,CAEA,qCACE,gBACF,CAGA,sIAIE,gBACF,CAEA,0CACE,sIAIE,YAAa,CAEb,gBAAkB,CADlB,6BAEF,CACF,CAEA,0CAGE,kBAAmB,CAOnB,6CAAsC,CAGtC,0FAA0E,CAD1E,2FAA2E,CAD3E,6FAA6E,CAF7E,kCAA2B,CAJ3B,6CAAgD,CAJhD,YAAa,CACb,gBAAmB,CAKnB,iCAAkC,CAClC,gBAMF,CAEA,6CAEE,oBAAqB,CACrB,mCAA8B,CAF9B,YAGF,CAEA,2CAEE,oCAA6B,CAD7B,gDAEF,CAEA,2CACE,kCACF,CAEA,+CACE,YACF,CAEA,sCAOE,kBAAmB,CAEnB,iBAAkB,CAElB,gDAAwC,CALxC,oCAA6B,CAL7B,mBAAoB,CASpB,aAAc,CAPd,iCAA2B,CAK3B,sBAAuB,CAHvB,6EAAoE,CAHpE,gCAkBF,CAPE,4CACE,uDACF,CAEA,sEACE,uBACF,CAGF,qCACE,kCACF","file":"Table-0327e248.css","sourcesContent":["/* Container ---------------------------------------------------------------- */\n.TableContainer {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-template-areas:\n 'title actions'\n 'divider divider'\n 'subtitle subtitle'\n 'filter filter'\n 'table table'\n 'footer footer';\n column-gap: var(--base-size-8);\n}\n\n/* TableTitle */\n.TableTitle {\n margin: 0;\n font-size: var(--text-body-size-medium);\n font-weight: var(--base-text-weight-semibold);\n /* stylelint-disable-next-line primer/typography */\n line-height: 20px;\n color: var(--fgColor-default);\n grid-area: title;\n align-self: center;\n}\n\n/* TableSubtitle */\n.TableSubtitle {\n margin: 0;\n font-size: var(--text-body-size-small);\n font-weight: var(--base-text-weight-normal);\n line-height: var(--text-title-lineHeight-small);\n color: var(--fgColor-default);\n grid-area: subtitle;\n}\n\n/* TableActions */\n.TableActions {\n display: flex;\n column-gap: var(--base-size-8);\n align-items: center;\n grid-area: actions;\n justify-self: end;\n}\n\n/* TableDivider */\n.TableDivider {\n width: 100%;\n height: 1px;\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--borderColor-default);\n grid-area: divider;\n margin-block-start: var(--base-size-16);\n margin-block-end: var(--base-size-8);\n}\n\n/* Spacing before the table */\n.TableTitle + .TableOverflowWrapper,\n.TableSubtitle + .TableOverflowWrapper,\n.TableActions + .TableOverflowWrapper {\n margin-block-start: var(--base-size-8);\n}\n\n.TableOverflowWrapper {\n grid-area: table;\n}\n\n/* Table -------------------------------------------------------------------- */\n.Table {\n /* Default table styles */\n --table-border-radius: 0.375rem;\n --table-cell-padding: var(--cell-padding-block, 0.5rem) var(--cell-padding-inline, 0.75rem);\n --table-font-size: 0.75rem;\n\n display: grid;\n width: 100%;\n /* stylelint-disable-next-line primer/typography */\n font-size: var(--table-font-size);\n /* stylelint-disable-next-line primer/typography */\n line-height: calc(20 / 12);\n border-spacing: 0;\n /* stylelint-disable-next-line primer/borders */\n border-collapse: separate;\n background-color: var(--bgColor-default);\n grid-area: table;\n grid-template-columns: var(--grid-template-columns);\n\n /* Density modes: condensed, normal, spacious */\n &:where([data-cell-padding='condensed']) {\n --cell-padding-block: 0.25rem;\n --cell-padding-inline: 0.5rem;\n }\n\n &:where([data-cell-padding='normal']) {\n --cell-padding-block: 0.5rem;\n --cell-padding-inline: 0.75rem;\n }\n\n &:where([data-cell-padding='spacious']) {\n --cell-padding-block: 0.75rem;\n --cell-padding-inline: 1rem;\n }\n}\n\n/* Borders */\n.TableCell:first-child,\n.TableHeader:first-child {\n border-inline-start: var(--borderWidth-thin) solid var(--borderColor-default);\n}\n\n.TableCell:last-child,\n.TableHeader:last-child {\n border-inline-end: var(--borderWidth-thin) solid var(--borderColor-default);\n}\n\n.TableHeader,\n.TableCell {\n display: flex;\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--table-cell-padding);\n text-align: start;\n align-items: center;\n border-block-end: var(--borderWidth-thin) solid var(--borderColor-default);\n}\n\n.TableHeader:where([data-cell-align='end']),\n.TableCell:where([data-cell-align='end']) {\n display: flex;\n text-align: end;\n justify-content: flex-end;\n}\n\n.TableHeader[data-cell-align='end'] .TableSortButton {\n display: flex;\n flex-direction: row-reverse;\n}\n\n.TableHead .TableRow:first-of-type .TableHeader {\n border-block-start: var(--borderWidth-thin) solid var(--borderColor-default);\n}\n\n/* Border radius */\n/* stylelint-disable-next-line selector-max-specificity */\n.TableHead .TableRow:first-of-type .TableHeader:first-child {\n /* stylelint-disable-next-line primer/borders */\n border-top-left-radius: var(--table-border-radius);\n}\n\n/* stylelint-disable-next-line selector-max-specificity */\n.TableHead .TableRow:first-of-type .TableHeader:last-child {\n /* stylelint-disable-next-line primer/borders */\n border-top-right-radius: var(--table-border-radius);\n}\n\n/* stylelint-disable-next-line selector-max-compound-selectors,selector-max-specificity */\n.TableOverflowWrapper:last-child .Table .TableBody:last-of-type .TableRow:last-of-type .TableCell:first-child {\n /* stylelint-disable-next-line primer/borders */\n border-bottom-left-radius: var(--table-border-radius);\n}\n\n/* stylelint-disable-next-line selector-max-compound-selectors,selector-max-specificity */\n.TableOverflowWrapper:last-child .Table .TableBody:last-of-type .TableRow:last-of-type .TableCell:last-child {\n /* stylelint-disable-next-line primer/borders */\n border-bottom-right-radius: var(--table-border-radius);\n}\n\n/* stylelint-disable selector-pseudo-class-disallowed-list, selector-max-compound-selectors -- scoped to a group header and its adjacent member body */\n.TableOverflowWrapper:last-child\n .TableGroupHeaderBody:where(:has(+ .TableBody[hidden]:last-child))\n .TableGroupHeaderCell {\n /* stylelint-disable-next-line primer/borders */\n border-bottom-left-radius: var(--table-border-radius);\n /* stylelint-disable-next-line primer/borders */\n border-bottom-right-radius: var(--table-border-radius);\n}\n/* stylelint-enable selector-pseudo-class-disallowed-list, selector-max-compound-selectors */\n\n/**\n * Offset padding to make sure type aligns regardless of cell padding\n * selection\n */\n.TableRow > *:first-child:not(.TableCellSkeleton),\n.TableRow > *:first-child .TableCellSkeletonItem {\n padding-inline-start: var(--base-size-16);\n}\n\n.TableRow > *:last-child:not(.TableCellSkeleton),\n.TableRow > *:last-child .TableCellSkeletonItem {\n padding-inline-end: var(--base-size-16);\n}\n\n/* TableHeader */\n.TableHeader {\n font-weight: var(--base-text-weight-semibold);\n color: var(--fgColor-muted);\n background-color: var(--bgColor-muted);\n border-block-start: var(--borderWidth-thin) solid var(--borderColor-default);\n}\n\n.TableHeader:where([aria-sort='descending']),\n.TableHeader:where([aria-sort='ascending']) {\n color: var(--fgColor-default);\n}\n\n.TableSelectionHeader,\n.TableRowSelection {\n justify-content: center;\n}\n\n/* Control visibility of sort icons */\n.TableSortIcon {\n visibility: hidden;\n}\n\n/* The ASC icon is visible if the header is sortable and is hovered or focused */\n.TableHeader:hover .TableSortIcon--ascending,\n.TableHeader .TableSortButton:focus .TableSortIcon--ascending {\n visibility: visible;\n}\n\n/* Each sort icon is visible if the TableHeader is currently in the corresponding sort state */\n.TableHeader[aria-sort='ascending'] .TableSortIcon--ascending,\n.TableHeader[aria-sort='descending'] .TableSortIcon--descending {\n visibility: visible;\n}\n\n/* TableRow */\n.TableRow:hover .TableCell:not(.TableCellSkeleton) {\n background-color: var(--control-transparent-bgColor-hover);\n}\n\n/* TableCell */\n.TableCell:where([scope='row']) {\n display: flex;\n font-weight: var(--base-text-weight-semibold);\n color: var(--fgColor-default);\n align-items: center;\n}\n\n/* TableCellSkeleton */\n.TableCellSkeleton {\n padding: 0;\n}\n\n.TableCellSkeletonItems {\n display: flex;\n width: 100%;\n flex-direction: column;\n}\n\n.TableCellSkeletonItem {\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--table-cell-padding);\n\n &:nth-of-type(5n + 1) {\n --skeleton-item-width: 85%;\n }\n\n &:nth-of-type(5n + 2) {\n --skeleton-item-width: 67.5%;\n }\n\n &:nth-of-type(5n + 3) {\n --skeleton-item-width: 80%;\n }\n\n &:nth-of-type(5n + 4) {\n --skeleton-item-width: 60%;\n }\n\n &:nth-of-type(5n + 5) {\n --skeleton-item-width: 75%;\n }\n}\n\n.TableCellSkeletonItem [data-component='SkeletonText'] {\n width: var(--skeleton-item-width);\n}\n\n.TableCellSkeletonItem:not(:last-of-type) {\n border-block-end: var(--borderWidth-thin) solid var(--borderColor-default);\n}\n\n.TableSortButton {\n column-gap: 0.5rem;\n}\n\n/* Grid layout */\n.TableHead,\n.TableBody,\n.TableGroupHeaderBody,\n.TableRow {\n display: contents;\n}\n\n@supports (grid-template-columns: subgrid) {\n .TableHead,\n .TableBody,\n .TableGroupHeaderBody,\n .TableRow {\n display: grid;\n grid-template-columns: subgrid;\n grid-column: -1 /1;\n }\n}\n\n.TableGroupHeaderCell {\n display: flex;\n grid-column: 1 / -1;\n align-items: center;\n /* Match the padding on either side of the selection/data column boundary. */\n column-gap: calc(2 * var(--cell-padding-inline));\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--table-cell-padding);\n text-align: start;\n color: var(--fgColor-muted);\n background-color: var(--bgColor-muted);\n border-inline-start: var(--borderWidth-thin) solid var(--borderColor-default);\n border-inline-end: var(--borderWidth-thin) solid var(--borderColor-default);\n border-block-end: var(--borderWidth-thin) solid var(--borderColor-default);\n}\n\n.TableGroupHeaderContent {\n display: flex;\n align-items: baseline;\n column-gap: var(--base-size-8);\n}\n\n.TableGroupHeaderLabel {\n font-weight: var(--base-text-weight-semibold);\n color: var(--fgColor-default);\n}\n\n.TableGroupHeaderCount {\n color: var(--fgColor-muted);\n}\n\n.TableBody:where([hidden]) {\n display: none;\n}\n\n.TableGroupToggle {\n display: inline-flex;\n width: var(--base-size-24);\n height: var(--base-size-24);\n /* Center the hit target over the same 16px slot as a selection checkbox. */\n margin-inline: calc((var(--base-size-16) - var(--base-size-24)) / 2);\n color: var(--fgColor-default);\n align-items: center;\n justify-content: center;\n align-self: center;\n flex-shrink: 0;\n border-radius: var(--borderRadius-small);\n\n &:hover {\n background-color: var(--bgColor-neutral-muted);\n }\n\n &:where([aria-expanded='true']) svg {\n transform: rotate(90deg);\n }\n}\n\n.PlaceholderText {\n color: var(--fgColor-muted);\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/DataTable/Table.module.css.js"],"names":[],"mappings":"AACA,oCAUE,mCAA8B,CAT9B,YAAa,CAEb,uHAMiB,CAPjB,6BASF,CAGA,gCAQE,iBAAkB,CANlB,8CAAuC,CACvC,gDAA6C,CAI7C,eAAgB,CAFhB,gBAIF,CAGA,mEANE,oCAA6B,CAL7B,QAkBF,CAPA,mCAEE,4CAAsC,CACtC,8CAA2C,CAG3C,kBAAmB,CAFnB,kDAGF,CAGA,kCAGE,kBAAmB,CADnB,mCAA8B,CAD9B,YAAa,CAGb,iBAAkB,CAClB,gBACF,CAGA,kCAIE,mDAA4C,CAC5C,iBAAkB,CAHlB,UAAW,CAKX,yCAAoC,CADpC,2CAAuC,CALvC,UAOF,CAGA,mOAGE,2CACF,CAOA,qEAJE,eAsCF,CAlCA,2BAEE,8BAA+B,CAC/B,wFAA2F,CAC3F,yBAA0B,CAW1B,4CAAwC,CADxC,wBAAyB,CAFzB,gBAAiB,CANjB,YAAa,CAGb,gCAAiC,CAQjC,kDAAmD,CANnD,mBAA0B,CAJ1B,UA2BF,CAdE,gEACE,4BAA6B,CAC7B,4BACF,CAEA,6DACE,2BAA4B,CAC5B,6BACF,CAEA,+DACE,4BAA6B,CAC7B,0BACF,CAIF,wFAEE,6FACF,CAEA,sFAEE,2FACF,CAEA,gEAME,kBAAmB,CACnB,0FAA0E,CAL1E,YAAa,CAEb,iCAAkC,CAClC,gBAGF,CAEA,0HAEE,YAAa,CAEb,wBAAyB,CADzB,cAEF,CAEA,2FACE,YAAa,CACb,0BACF,CAEA,4GACE,4FACF,CAIA,wHAEE,iDACF,CAGA,uHAEE,kDACF,CAGA,kNAEE,oDACF,CAGA,iNAEE,qDACF,CAGA,wNAIE,oDAAqD,CAErD,qDACF,CAOA,6KAEE,6CACF,CAEA,2KAEE,2CACF,CAGA,iCAGE,6CAAsC,CACtC,4FAA4E,CAF5E,kCAA2B,CAD3B,gDAIF,CAEA,6HAEE,oCACF,CAEA,iFAEE,sBACF,CAGA,mCACE,iBACF,CASA,yZAEE,kBACF,CAGA,+GACE,mEACF,CAGA,kDAIE,kBAAmB,CADnB,oCAA6B,CAF7B,YAAa,CACb,gDAGF,CAGA,uCACE,SACF,CAEA,4CACE,YAAa,CAEb,qBAAsB,CADtB,UAEF,CAEA,2CAEE,iCAqBF,CAnBE,6DACE,yBACF,CAEA,6DACE,2BACF,CAEA,6DACE,yBACF,CAEA,6DACE,yBACF,CAEA,6DACE,yBACF,CAGF,yEACE,gCACF,CAEA,8DACE,0FACF,CAEA,qCACE,gBACF,CAGA,sIAIE,gBACF,CAEA,0CACE,sIAIE,YAAa,CAEb,gBAAkB,CADlB,6BAEF,CACF,CAEA,0CAGE,kBAAmB,CAOnB,6CAAsC,CAGtC,0FAA0E,CAD1E,2FAA2E,CAD3E,6FAA6E,CAF7E,kCAA2B,CAJ3B,6CAAgD,CAJhD,YAAa,CACb,gBAAmB,CAKnB,iCAAkC,CAClC,gBAMF,CAEA,6CAEE,oBAAqB,CACrB,mCAA8B,CAF9B,YAGF,CAEA,2CAEE,oCAA6B,CAD7B,gDAEF,CAEA,2CACE,kCACF,CAEA,+CACE,YACF,CAEA,sCAOE,kBAAmB,CAEnB,iBAAkB,CAElB,gDAAwC,CALxC,oCAA6B,CAL7B,mBAAoB,CASpB,aAAc,CAPd,iCAA2B,CAK3B,sBAAuB,CAHvB,6EAAoE,CAHpE,gCAkBF,CAPE,4CACE,uDACF,CAEA,sEACE,uBACF,CAGF,qCACE,kCACF","file":"Table-7f0e985b.css","sourcesContent":["/* Container ---------------------------------------------------------------- */\n.TableContainer {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-template-areas:\n 'title actions'\n 'divider divider'\n 'subtitle subtitle'\n 'filter filter'\n 'table table'\n 'footer footer';\n column-gap: var(--base-size-8);\n}\n\n/* TableTitle */\n.TableTitle {\n margin: 0;\n font-size: var(--text-body-size-medium);\n font-weight: var(--base-text-weight-semibold);\n /* stylelint-disable-next-line primer/typography */\n line-height: 20px;\n color: var(--fgColor-default);\n grid-area: title;\n align-self: center;\n}\n\n/* TableSubtitle */\n.TableSubtitle {\n margin: 0;\n font-size: var(--text-body-size-small);\n font-weight: var(--base-text-weight-normal);\n line-height: var(--text-title-lineHeight-small);\n color: var(--fgColor-default);\n grid-area: subtitle;\n}\n\n/* TableActions */\n.TableActions {\n display: flex;\n column-gap: var(--base-size-8);\n align-items: center;\n grid-area: actions;\n justify-self: end;\n}\n\n/* TableDivider */\n.TableDivider {\n width: 100%;\n height: 1px;\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--borderColor-default);\n grid-area: divider;\n margin-block-start: var(--base-size-16);\n margin-block-end: var(--base-size-8);\n}\n\n/* Spacing before the table */\n.TableTitle + .TableOverflowWrapper,\n.TableSubtitle + .TableOverflowWrapper,\n.TableActions + .TableOverflowWrapper {\n margin-block-start: var(--base-size-8);\n}\n\n.TableOverflowWrapper {\n grid-area: table;\n}\n\n/* Table -------------------------------------------------------------------- */\n.Table {\n /* Default table styles */\n --table-border-radius: 0.375rem;\n --table-cell-padding: var(--cell-padding-block, 0.5rem) var(--cell-padding-inline, 0.75rem);\n --table-font-size: 0.75rem;\n\n display: grid;\n width: 100%;\n /* stylelint-disable-next-line primer/typography */\n font-size: var(--table-font-size);\n /* stylelint-disable-next-line primer/typography */\n line-height: calc(20 / 12);\n border-spacing: 0;\n /* stylelint-disable-next-line primer/borders */\n border-collapse: separate;\n background-color: var(--bgColor-default);\n grid-area: table;\n grid-template-columns: var(--grid-template-columns);\n\n /* Density modes: condensed, normal, spacious */\n &:where([data-cell-padding='condensed']) {\n --cell-padding-block: 0.25rem;\n --cell-padding-inline: 0.5rem;\n }\n\n &:where([data-cell-padding='normal']) {\n --cell-padding-block: 0.5rem;\n --cell-padding-inline: 0.75rem;\n }\n\n &:where([data-cell-padding='spacious']) {\n --cell-padding-block: 0.75rem;\n --cell-padding-inline: 1rem;\n }\n}\n\n/* Borders */\n.TableCell:first-child,\n.TableHeader:first-child {\n border-inline-start: var(--borderWidth-thin) solid var(--borderColor-default);\n}\n\n.TableCell:last-child,\n.TableHeader:last-child {\n border-inline-end: var(--borderWidth-thin) solid var(--borderColor-default);\n}\n\n.TableHeader,\n.TableCell {\n display: flex;\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--table-cell-padding);\n text-align: start;\n align-items: center;\n border-block-end: var(--borderWidth-thin) solid var(--borderColor-default);\n}\n\n.TableHeader:where([data-cell-align='end']),\n.TableCell:where([data-cell-align='end']) {\n display: flex;\n text-align: end;\n justify-content: flex-end;\n}\n\n.TableHeader[data-cell-align='end'] .TableSortButton {\n display: flex;\n flex-direction: row-reverse;\n}\n\n.TableHead .TableRow:first-of-type .TableHeader {\n border-block-start: var(--borderWidth-thin) solid var(--borderColor-default);\n}\n\n/* Border radius */\n/* stylelint-disable-next-line selector-max-specificity */\n.TableHead .TableRow:first-of-type .TableHeader:first-child {\n /* stylelint-disable-next-line primer/borders */\n border-top-left-radius: var(--table-border-radius);\n}\n\n/* stylelint-disable-next-line selector-max-specificity */\n.TableHead .TableRow:first-of-type .TableHeader:last-child {\n /* stylelint-disable-next-line primer/borders */\n border-top-right-radius: var(--table-border-radius);\n}\n\n/* stylelint-disable-next-line selector-max-compound-selectors,selector-max-specificity */\n.TableOverflowWrapper:last-child .Table .TableBody:last-of-type .TableRow:last-of-type .TableCell:first-child {\n /* stylelint-disable-next-line primer/borders */\n border-bottom-left-radius: var(--table-border-radius);\n}\n\n/* stylelint-disable-next-line selector-max-compound-selectors,selector-max-specificity */\n.TableOverflowWrapper:last-child .Table .TableBody:last-of-type .TableRow:last-of-type .TableCell:last-child {\n /* stylelint-disable-next-line primer/borders */\n border-bottom-right-radius: var(--table-border-radius);\n}\n\n/* stylelint-disable selector-pseudo-class-disallowed-list, selector-max-compound-selectors -- scoped to a group header and its adjacent member body */\n.TableOverflowWrapper:last-child\n .TableGroupHeaderBody:where(:has(+ .TableBody:where([hidden], :empty):last-child))\n .TableGroupHeaderCell {\n /* stylelint-disable-next-line primer/borders */\n border-bottom-left-radius: var(--table-border-radius);\n /* stylelint-disable-next-line primer/borders */\n border-bottom-right-radius: var(--table-border-radius);\n}\n/* stylelint-enable selector-pseudo-class-disallowed-list, selector-max-compound-selectors */\n\n/**\n * Offset padding to make sure type aligns regardless of cell padding\n * selection\n */\n.TableRow > *:first-child:not(.TableCellSkeleton),\n.TableRow > *:first-child .TableCellSkeletonItem {\n padding-inline-start: var(--base-size-16);\n}\n\n.TableRow > *:last-child:not(.TableCellSkeleton),\n.TableRow > *:last-child .TableCellSkeletonItem {\n padding-inline-end: var(--base-size-16);\n}\n\n/* TableHeader */\n.TableHeader {\n font-weight: var(--base-text-weight-semibold);\n color: var(--fgColor-muted);\n background-color: var(--bgColor-muted);\n border-block-start: var(--borderWidth-thin) solid var(--borderColor-default);\n}\n\n.TableHeader:where([aria-sort='descending']),\n.TableHeader:where([aria-sort='ascending']) {\n color: var(--fgColor-default);\n}\n\n.TableSelectionHeader,\n.TableRowSelection {\n justify-content: center;\n}\n\n/* Control visibility of sort icons */\n.TableSortIcon {\n visibility: hidden;\n}\n\n/* The ASC icon is visible if the header is sortable and is hovered or focused */\n.TableHeader:hover .TableSortIcon--ascending,\n.TableHeader .TableSortButton:focus .TableSortIcon--ascending {\n visibility: visible;\n}\n\n/* Each sort icon is visible if the TableHeader is currently in the corresponding sort state */\n.TableHeader[aria-sort='ascending'] .TableSortIcon--ascending,\n.TableHeader[aria-sort='descending'] .TableSortIcon--descending {\n visibility: visible;\n}\n\n/* TableRow */\n.TableRow:hover .TableCell:not(.TableCellSkeleton) {\n background-color: var(--control-transparent-bgColor-hover);\n}\n\n/* TableCell */\n.TableCell:where([scope='row']) {\n display: flex;\n font-weight: var(--base-text-weight-semibold);\n color: var(--fgColor-default);\n align-items: center;\n}\n\n/* TableCellSkeleton */\n.TableCellSkeleton {\n padding: 0;\n}\n\n.TableCellSkeletonItems {\n display: flex;\n width: 100%;\n flex-direction: column;\n}\n\n.TableCellSkeletonItem {\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--table-cell-padding);\n\n &:nth-of-type(5n + 1) {\n --skeleton-item-width: 85%;\n }\n\n &:nth-of-type(5n + 2) {\n --skeleton-item-width: 67.5%;\n }\n\n &:nth-of-type(5n + 3) {\n --skeleton-item-width: 80%;\n }\n\n &:nth-of-type(5n + 4) {\n --skeleton-item-width: 60%;\n }\n\n &:nth-of-type(5n + 5) {\n --skeleton-item-width: 75%;\n }\n}\n\n.TableCellSkeletonItem [data-component='SkeletonText'] {\n width: var(--skeleton-item-width);\n}\n\n.TableCellSkeletonItem:not(:last-of-type) {\n border-block-end: var(--borderWidth-thin) solid var(--borderColor-default);\n}\n\n.TableSortButton {\n column-gap: 0.5rem;\n}\n\n/* Grid layout */\n.TableHead,\n.TableBody,\n.TableGroupHeaderBody,\n.TableRow {\n display: contents;\n}\n\n@supports (grid-template-columns: subgrid) {\n .TableHead,\n .TableBody,\n .TableGroupHeaderBody,\n .TableRow {\n display: grid;\n grid-template-columns: subgrid;\n grid-column: -1 /1;\n }\n}\n\n.TableGroupHeaderCell {\n display: flex;\n grid-column: 1 / -1;\n align-items: center;\n /* Match the padding on either side of the selection/data column boundary. */\n column-gap: calc(2 * var(--cell-padding-inline));\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--table-cell-padding);\n text-align: start;\n color: var(--fgColor-muted);\n background-color: var(--bgColor-muted);\n border-inline-start: var(--borderWidth-thin) solid var(--borderColor-default);\n border-inline-end: var(--borderWidth-thin) solid var(--borderColor-default);\n border-block-end: var(--borderWidth-thin) solid var(--borderColor-default);\n}\n\n.TableGroupHeaderContent {\n display: flex;\n align-items: baseline;\n column-gap: var(--base-size-8);\n}\n\n.TableGroupHeaderLabel {\n font-weight: var(--base-text-weight-semibold);\n color: var(--fgColor-default);\n}\n\n.TableGroupHeaderCount {\n color: var(--fgColor-muted);\n}\n\n.TableBody:where([hidden]) {\n display: none;\n}\n\n.TableGroupToggle {\n display: inline-flex;\n width: var(--base-size-24);\n height: var(--base-size-24);\n /* Center the hit target over the same 16px slot as a selection checkbox. */\n margin-inline: calc((var(--base-size-16) - var(--base-size-24)) / 2);\n color: var(--fgColor-default);\n align-items: center;\n justify-content: center;\n align-self: center;\n flex-shrink: 0;\n border-radius: var(--borderRadius-small);\n\n &:hover {\n background-color: var(--bgColor-neutral-muted);\n }\n\n &:where([aria-expanded='true']) svg {\n transform: rotate(90deg);\n }\n}\n\n.PlaceholderText {\n color: var(--fgColor-muted);\n}\n"]}
|
|
@@ -101,6 +101,7 @@ declare function TableSelectionHeader({
|
|
|
101
101
|
type TableRowProps = React.ComponentPropsWithoutRef<'tr'>;
|
|
102
102
|
declare function TableRow({
|
|
103
103
|
children,
|
|
104
|
+
className,
|
|
104
105
|
...rest
|
|
105
106
|
}: TableRowProps): JSX.Element;
|
|
106
107
|
type TableCellProps = Omit<React.ComponentPropsWithoutRef<'td'>, 'align'> & {
|
package/dist/DataTable/Table.js
CHANGED
|
@@ -370,25 +370,29 @@ function TableSelectionHeader(t0) {
|
|
|
370
370
|
return t9;
|
|
371
371
|
}
|
|
372
372
|
function TableRow(t0) {
|
|
373
|
-
const $ = c(
|
|
373
|
+
const $ = c(10);
|
|
374
374
|
let children;
|
|
375
|
+
let className;
|
|
375
376
|
let rest;
|
|
376
377
|
if ($[0] !== t0) {
|
|
377
|
-
({children, ...rest} = t0);
|
|
378
|
+
({children, className, ...rest} = t0);
|
|
378
379
|
$[0] = t0;
|
|
379
380
|
$[1] = children;
|
|
380
|
-
$[2] =
|
|
381
|
+
$[2] = className;
|
|
382
|
+
$[3] = rest;
|
|
381
383
|
} else {
|
|
382
384
|
children = $[1];
|
|
383
|
-
|
|
385
|
+
className = $[2];
|
|
386
|
+
rest = $[3];
|
|
384
387
|
}
|
|
385
388
|
let t1;
|
|
386
|
-
if ($[
|
|
387
|
-
t1 = clsx("TableRow", Table_module_css_default.TableRow);
|
|
388
|
-
$[
|
|
389
|
-
|
|
389
|
+
if ($[4] !== className) {
|
|
390
|
+
t1 = clsx("TableRow", Table_module_css_default.TableRow, className);
|
|
391
|
+
$[4] = className;
|
|
392
|
+
$[5] = t1;
|
|
393
|
+
} else t1 = $[5];
|
|
390
394
|
let t2;
|
|
391
|
-
if ($[
|
|
395
|
+
if ($[6] !== children || $[7] !== rest || $[8] !== t1) {
|
|
392
396
|
t2 = /* @__PURE__ */ jsx("tr", {
|
|
393
397
|
...rest,
|
|
394
398
|
className: t1,
|
|
@@ -396,10 +400,11 @@ function TableRow(t0) {
|
|
|
396
400
|
"data-component": "Table.Row",
|
|
397
401
|
children
|
|
398
402
|
});
|
|
399
|
-
$[
|
|
400
|
-
$[
|
|
401
|
-
$[
|
|
402
|
-
|
|
403
|
+
$[6] = children;
|
|
404
|
+
$[7] = rest;
|
|
405
|
+
$[8] = t1;
|
|
406
|
+
$[9] = t2;
|
|
407
|
+
} else t2 = $[9];
|
|
403
408
|
return t2;
|
|
404
409
|
}
|
|
405
410
|
function TableCell(t0) {
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.prc-DataTable-TableBulkActions-kfFOd:where([data-active]){align-items:center;display:flex;flex-wrap:wrap;gap:var(--base-size-8,.5rem)}.prc-DataTable-Count-G2fIf{color:var(--fgColor-muted,#59636e);font-weight:var(--base-text-weight-semibold,600)}.prc-DataTable-ColumnLabel-nT9S-{min-block-size:1lh}.prc-DataTable-Actions-BRFii{align-items:center;display:flex;flex-wrap:wrap;gap:var(--base-size-8,.5rem);margin-inline-start:auto}.prc-DataTable-Actions-BRFii :focus{scroll-margin:var(--base-size-4,.25rem)}.prc-DataTable-HeaderRow-vCWxU,.prc-DataTable-HeaderRow-vCWxU>*{grid-row:1}.prc-DataTable-BulkActionsCell-ji6XT{align-content:center;background-color:var(--bgColor-muted,#f6f8fa);border-block-end:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,#d1d9e0);border-block-start:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,#d1d9e0);border-inline-end:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,#d1d9e0);border-start-end-radius:var(--table-border-radius);grid-column:2/-1;grid-row:1;min-width:0;padding:var(--table-cell-padding);padding-block:0;z-index:1}.prc-DataTable-HeaderRow-vCWxU>.prc-DataTable-BulkActionsCell-ji6XT:first-child:last-child{padding-inline-end:var(--base-size-8,.5rem);padding-inline-start:var(--cell-padding-inline,var(--base-size-12,.75rem))}
|
|
2
|
+
/*# sourceMappingURL=TableBulkActions-aca5618a.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/DataTable/TableBulkActions.module.css.js"],"names":[],"mappings":"AACE,2DAGE,kBAAmB,CAFnB,YAAa,CACb,cAAe,CAEf,4BACF,CAGF,2BAEE,kCAA2B,CAD3B,gDAEF,CAEA,iCACE,kBACF,CAEA,6BAGE,kBAAmB,CAFnB,YAAa,CACb,cAAe,CAEf,4BAAuB,CACvB,wBAKF,CAHE,oCACE,uCACF,CAGF,gEAEE,UACF,CAEA,qCAKE,oBAAqB,CAIrB,6CAAsC,CAEtC,0FAA0E,CAD1E,4FAA4E,CAE5E,2FAA2E,CAE3E,kDAAmD,CAZnD,gBAAmB,CADnB,UAAW,CAGX,WAAY,CAGZ,iCAAkC,CAClC,eAAgB,CALhB,SAYF,CAEA,2FAGE,2CAAsC,CADtC,0EAEF","file":"TableBulkActions-aca5618a.css","sourcesContent":[".TableBulkActions {\n &:where([data-active]) {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--base-size-8);\n }\n}\n\n.Count {\n font-weight: var(--base-text-weight-semibold);\n color: var(--fgColor-muted);\n}\n\n.ColumnLabel {\n min-block-size: 1lh;\n}\n\n.Actions {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--base-size-8);\n margin-inline-start: auto;\n\n :focus {\n scroll-margin: var(--base-size-4);\n }\n}\n\n.HeaderRow,\n.HeaderRow > * {\n grid-row: 1;\n}\n\n.BulkActionsCell {\n grid-row: 1;\n grid-column: 2 / -1;\n z-index: 1;\n min-width: 0;\n align-content: center;\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--table-cell-padding);\n padding-block: 0;\n background-color: var(--bgColor-muted);\n border-block-start: var(--borderWidth-thin) solid var(--borderColor-default);\n border-block-end: var(--borderWidth-thin) solid var(--borderColor-default);\n border-inline-end: var(--borderWidth-thin) solid var(--borderColor-default);\n /* stylelint-disable-next-line primer/borders */\n border-start-end-radius: var(--table-border-radius);\n}\n\n.HeaderRow > .BulkActionsCell:first-child:last-child {\n /* stylelint-disable-next-line primer/spacing */\n padding-inline-start: var(--cell-padding-inline, var(--base-size-12));\n padding-inline-end: var(--base-size-8);\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/DataTable/TableBulkActions.d.ts
|
|
4
|
+
type TableBulkActionsProps = Omit<React.ComponentPropsWithoutRef<'div'>, 'role'> & {
|
|
5
|
+
selectedCount: number;
|
|
6
|
+
onFocusReturn?: () => void;
|
|
7
|
+
getSelectedCountLabel?: (selectedCount: number) => string;
|
|
8
|
+
};
|
|
9
|
+
declare const TableBulkActions: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "role"> & {
|
|
10
|
+
selectedCount: number;
|
|
11
|
+
onFocusReturn?: () => void;
|
|
12
|
+
getSelectedCountLabel?: (selectedCount: number) => string;
|
|
13
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { TableBulkActions, TableBulkActionsProps };
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
2
|
+
import { AriaStatus } from "../live-region/AriaStatus.js";
|
|
3
|
+
import useIsomorphicLayoutEffect from "../utils/useIsomorphicLayoutEffect.js";
|
|
4
|
+
import VisuallyHidden from "../_VisuallyHidden.js";
|
|
5
|
+
import TableBulkActions_module_css_default from "./TableBulkActions.module.css.js";
|
|
6
|
+
import React, { useRef } from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { clsx } from "clsx";
|
|
9
|
+
//#region src/DataTable/TableBulkActions.tsx
|
|
10
|
+
function defaultSelectedCountLabel(selectedCount) {
|
|
11
|
+
return `${selectedCount} selected`;
|
|
12
|
+
}
|
|
13
|
+
const TableBulkActions = /*#__PURE__*/ React.forwardRef(function TableBulkActions(t0, ref) {
|
|
14
|
+
const $ = c(47);
|
|
15
|
+
let children;
|
|
16
|
+
let className;
|
|
17
|
+
let onBlurCapture;
|
|
18
|
+
let onFocusCapture;
|
|
19
|
+
let onFocusReturn;
|
|
20
|
+
let rest;
|
|
21
|
+
let selectedCount;
|
|
22
|
+
let t1;
|
|
23
|
+
let t2;
|
|
24
|
+
if ($[0] !== t0) {
|
|
25
|
+
({selectedCount, onFocusReturn, getSelectedCountLabel: t1, "aria-label": t2, className, children, onFocusCapture, onBlurCapture, ...rest} = t0);
|
|
26
|
+
$[0] = t0;
|
|
27
|
+
$[1] = children;
|
|
28
|
+
$[2] = className;
|
|
29
|
+
$[3] = onBlurCapture;
|
|
30
|
+
$[4] = onFocusCapture;
|
|
31
|
+
$[5] = onFocusReturn;
|
|
32
|
+
$[6] = rest;
|
|
33
|
+
$[7] = selectedCount;
|
|
34
|
+
$[8] = t1;
|
|
35
|
+
$[9] = t2;
|
|
36
|
+
} else {
|
|
37
|
+
children = $[1];
|
|
38
|
+
className = $[2];
|
|
39
|
+
onBlurCapture = $[3];
|
|
40
|
+
onFocusCapture = $[4];
|
|
41
|
+
onFocusReturn = $[5];
|
|
42
|
+
rest = $[6];
|
|
43
|
+
selectedCount = $[7];
|
|
44
|
+
t1 = $[8];
|
|
45
|
+
t2 = $[9];
|
|
46
|
+
}
|
|
47
|
+
const getSelectedCountLabel = t1 === void 0 ? defaultSelectedCountLabel : t1;
|
|
48
|
+
const ariaLabel = t2 === void 0 ? "Bulk actions" : t2;
|
|
49
|
+
const focusedAction = useRef(null);
|
|
50
|
+
const focusObserver = useRef(null);
|
|
51
|
+
const active = selectedCount > 0;
|
|
52
|
+
let t3;
|
|
53
|
+
if ($[10] !== onFocusReturn) {
|
|
54
|
+
t3 = function recoverFocus() {
|
|
55
|
+
const element = focusedAction.current;
|
|
56
|
+
if (element && !element.isConnected) {
|
|
57
|
+
var _focusObserver$curren;
|
|
58
|
+
focusedAction.current = null;
|
|
59
|
+
(_focusObserver$curren = focusObserver.current) === null || _focusObserver$curren === void 0 || _focusObserver$curren.disconnect();
|
|
60
|
+
const document = element.ownerDocument;
|
|
61
|
+
if (document.activeElement === document.body) {
|
|
62
|
+
var _onFocusReturn;
|
|
63
|
+
(_onFocusReturn = onFocusReturn) === null || _onFocusReturn === void 0 || _onFocusReturn();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
$[10] = onFocusReturn;
|
|
68
|
+
$[11] = t3;
|
|
69
|
+
} else t3 = $[11];
|
|
70
|
+
const recoverFocus = t3;
|
|
71
|
+
let t4;
|
|
72
|
+
if ($[12] !== recoverFocus) {
|
|
73
|
+
t4 = function observeFocusedAction() {
|
|
74
|
+
var _focusObserver$curren2;
|
|
75
|
+
(_focusObserver$curren2 = focusObserver.current) === null || _focusObserver$curren2 === void 0 || _focusObserver$curren2.disconnect();
|
|
76
|
+
const element_0 = focusedAction.current;
|
|
77
|
+
if (element_0) {
|
|
78
|
+
const observer = new MutationObserver(recoverFocus);
|
|
79
|
+
observer.observe(element_0.ownerDocument.body, {
|
|
80
|
+
childList: true,
|
|
81
|
+
subtree: true
|
|
82
|
+
});
|
|
83
|
+
focusObserver.current = observer;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
$[12] = recoverFocus;
|
|
87
|
+
$[13] = t4;
|
|
88
|
+
} else t4 = $[13];
|
|
89
|
+
const observeFocusedAction = t4;
|
|
90
|
+
let t5;
|
|
91
|
+
if ($[14] !== observeFocusedAction || $[15] !== recoverFocus) {
|
|
92
|
+
t5 = () => {
|
|
93
|
+
recoverFocus();
|
|
94
|
+
observeFocusedAction();
|
|
95
|
+
return () => {
|
|
96
|
+
var _focusObserver$curren3;
|
|
97
|
+
(_focusObserver$curren3 = focusObserver.current) === null || _focusObserver$curren3 === void 0 || _focusObserver$curren3.disconnect();
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
$[14] = observeFocusedAction;
|
|
101
|
+
$[15] = recoverFocus;
|
|
102
|
+
$[16] = t5;
|
|
103
|
+
} else t5 = $[16];
|
|
104
|
+
useIsomorphicLayoutEffect(t5);
|
|
105
|
+
let t6;
|
|
106
|
+
if ($[17] !== getSelectedCountLabel || $[18] !== selectedCount) {
|
|
107
|
+
t6 = getSelectedCountLabel(selectedCount);
|
|
108
|
+
$[17] = getSelectedCountLabel;
|
|
109
|
+
$[18] = selectedCount;
|
|
110
|
+
$[19] = t6;
|
|
111
|
+
} else t6 = $[19];
|
|
112
|
+
let t7;
|
|
113
|
+
if ($[20] !== active || $[21] !== t6) {
|
|
114
|
+
t7 = /* @__PURE__ */ jsx(AriaStatus, {
|
|
115
|
+
as: "span",
|
|
116
|
+
className: TableBulkActions_module_css_default.Count,
|
|
117
|
+
announceOnShow: active,
|
|
118
|
+
children: t6
|
|
119
|
+
});
|
|
120
|
+
$[20] = active;
|
|
121
|
+
$[21] = t6;
|
|
122
|
+
$[22] = t7;
|
|
123
|
+
} else t7 = $[22];
|
|
124
|
+
const count = t7;
|
|
125
|
+
let t8;
|
|
126
|
+
if ($[23] !== observeFocusedAction || $[24] !== onFocusCapture) {
|
|
127
|
+
t8 = (event) => {
|
|
128
|
+
focusedAction.current = event.target;
|
|
129
|
+
observeFocusedAction();
|
|
130
|
+
if (event.currentTarget.contains(event.target)) event.target.scrollIntoView({
|
|
131
|
+
block: "nearest",
|
|
132
|
+
inline: "nearest"
|
|
133
|
+
});
|
|
134
|
+
if (!event.defaultPrevented) {
|
|
135
|
+
var _onFocusCapture;
|
|
136
|
+
(_onFocusCapture = onFocusCapture) === null || _onFocusCapture === void 0 || _onFocusCapture(event);
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
$[23] = observeFocusedAction;
|
|
140
|
+
$[24] = onFocusCapture;
|
|
141
|
+
$[25] = t8;
|
|
142
|
+
} else t8 = $[25];
|
|
143
|
+
let t9;
|
|
144
|
+
if ($[26] !== onBlurCapture) {
|
|
145
|
+
t9 = (event_0) => {
|
|
146
|
+
if (event_0.target.isConnected) {
|
|
147
|
+
var _focusObserver$curren4;
|
|
148
|
+
focusedAction.current = null;
|
|
149
|
+
(_focusObserver$curren4 = focusObserver.current) === null || _focusObserver$curren4 === void 0 || _focusObserver$curren4.disconnect();
|
|
150
|
+
}
|
|
151
|
+
if (!event_0.defaultPrevented) {
|
|
152
|
+
var _onBlurCapture;
|
|
153
|
+
(_onBlurCapture = onBlurCapture) === null || _onBlurCapture === void 0 || _onBlurCapture(event_0);
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
$[26] = onBlurCapture;
|
|
157
|
+
$[27] = t9;
|
|
158
|
+
} else t9 = $[27];
|
|
159
|
+
const t10 = active ? "group" : void 0;
|
|
160
|
+
const t11 = active ? ariaLabel : void 0;
|
|
161
|
+
const t12 = active || void 0;
|
|
162
|
+
let t13;
|
|
163
|
+
if ($[28] !== className) {
|
|
164
|
+
t13 = clsx(TableBulkActions_module_css_default.TableBulkActions, className);
|
|
165
|
+
$[28] = className;
|
|
166
|
+
$[29] = t13;
|
|
167
|
+
} else t13 = $[29];
|
|
168
|
+
let t14;
|
|
169
|
+
if ($[30] !== active || $[31] !== count) {
|
|
170
|
+
t14 = /* @__PURE__ */ jsx(VisuallyHidden, {
|
|
171
|
+
isVisible: active,
|
|
172
|
+
children: count
|
|
173
|
+
});
|
|
174
|
+
$[30] = active;
|
|
175
|
+
$[31] = count;
|
|
176
|
+
$[32] = t14;
|
|
177
|
+
} else t14 = $[32];
|
|
178
|
+
let t15;
|
|
179
|
+
if ($[33] !== active || $[34] !== children) {
|
|
180
|
+
t15 = active ? /* @__PURE__ */ jsx("div", {
|
|
181
|
+
className: TableBulkActions_module_css_default.Actions,
|
|
182
|
+
children
|
|
183
|
+
}) : null;
|
|
184
|
+
$[33] = active;
|
|
185
|
+
$[34] = children;
|
|
186
|
+
$[35] = t15;
|
|
187
|
+
} else t15 = $[35];
|
|
188
|
+
let t16;
|
|
189
|
+
if ($[36] !== ref || $[37] !== rest || $[38] !== t10 || $[39] !== t11 || $[40] !== t12 || $[41] !== t13 || $[42] !== t14 || $[43] !== t15 || $[44] !== t8 || $[45] !== t9) {
|
|
190
|
+
t16 = /* @__PURE__ */ jsxs("div", {
|
|
191
|
+
...rest,
|
|
192
|
+
onFocusCapture: t8,
|
|
193
|
+
onBlurCapture: t9,
|
|
194
|
+
ref,
|
|
195
|
+
role: t10,
|
|
196
|
+
"aria-label": t11,
|
|
197
|
+
"data-component": "Table.BulkActions",
|
|
198
|
+
"data-active": t12,
|
|
199
|
+
className: t13,
|
|
200
|
+
children: [t14, t15]
|
|
201
|
+
});
|
|
202
|
+
$[36] = ref;
|
|
203
|
+
$[37] = rest;
|
|
204
|
+
$[38] = t10;
|
|
205
|
+
$[39] = t11;
|
|
206
|
+
$[40] = t12;
|
|
207
|
+
$[41] = t13;
|
|
208
|
+
$[42] = t14;
|
|
209
|
+
$[43] = t15;
|
|
210
|
+
$[44] = t8;
|
|
211
|
+
$[45] = t9;
|
|
212
|
+
$[46] = t16;
|
|
213
|
+
} else t16 = $[46];
|
|
214
|
+
return t16;
|
|
215
|
+
});
|
|
216
|
+
//#endregion
|
|
217
|
+
export { TableBulkActions };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "./TableBulkActions-aca5618a.css";
|
|
2
|
+
//#region src/DataTable/TableBulkActions.module.css.js
|
|
3
|
+
var TableBulkActions_module_css_default = {
|
|
4
|
+
"TableBulkActions": "prc-DataTable-TableBulkActions-kfFOd",
|
|
5
|
+
"Count": "prc-DataTable-Count-G2fIf",
|
|
6
|
+
"ColumnLabel": "prc-DataTable-ColumnLabel-nT9S-",
|
|
7
|
+
"Actions": "prc-DataTable-Actions-BRFii",
|
|
8
|
+
"HeaderRow": "prc-DataTable-HeaderRow-vCWxU",
|
|
9
|
+
"BulkActionsCell": "prc-DataTable-BulkActionsCell-ji6XT"
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { TableBulkActions_module_css_default as default };
|
|
@@ -2,7 +2,8 @@ import { SlotMarker } from "../utils/types/Slots.js";
|
|
|
2
2
|
import { ObjectPaths } from "./utils.js";
|
|
3
3
|
import { DataTableData, DataTableRowGroup, DataTableRowId, UniqueRow } from "./row.js";
|
|
4
4
|
import { CellAlignment, Column, ColumnWidth, createColumnHelper } from "./column.js";
|
|
5
|
-
import {
|
|
5
|
+
import { TableBulkActions, TableBulkActionsProps } from "./TableBulkActions.js";
|
|
6
|
+
import { DataTable, DataTableBulkActionsContext, DataTableProps } from "./DataTable.js";
|
|
6
7
|
import { ErrorDialog } from "./ErrorDialog.js";
|
|
7
8
|
import { Table as Table$1, TableActions, TableActionsProps, TableBody, TableBodyProps, TableCell, TableCellPlaceholder, TableCellProps, TableContainer, TableContainerProps, TableDivider, TableHead, TableHeadProps, TableHeader, TableHeaderProps, TableProps, TableRow, TableRowProps, TableRowSelection, TableRowSelectionProps, TableSelectionHeader, TableSelectionHeaderProps, TableSkeleton, TableSkeletonProps, TableSubtitle, TableSubtitleProps, TableTitle, TableTitleProps } from "./Table.js";
|
|
8
9
|
import { TableGroup, TableGroupProps } from "./TableGroup.js";
|
|
@@ -14,6 +15,7 @@ declare const Table: typeof Table$1 & SlotMarker & {
|
|
|
14
15
|
Title: typeof TableTitle;
|
|
15
16
|
Subtitle: typeof TableSubtitle;
|
|
16
17
|
Actions: typeof TableActions;
|
|
18
|
+
BulkActions: typeof TableBulkActions;
|
|
17
19
|
Divider: typeof TableDivider;
|
|
18
20
|
Skeleton: typeof TableSkeleton;
|
|
19
21
|
Head: typeof TableHead;
|
|
@@ -29,4 +31,4 @@ declare const Table: typeof Table$1 & SlotMarker & {
|
|
|
29
31
|
ErrorDialog: typeof ErrorDialog;
|
|
30
32
|
};
|
|
31
33
|
//#endregion
|
|
32
|
-
export { type CellAlignment, type Column, type ColumnWidth, DataTable, type DataTableData, type DataTableProps, type DataTableRowGroup, type DataTableRowId, type ObjectPaths, Table, type TableActionsProps, type TableBodyProps, type TableCellProps, type TableContainerProps, type TableGroupProps, type TableHeadProps, type TableHeaderProps, type TableProps, type TableRowProps, type TableRowSelectionProps, type TableSelectionHeaderProps, type TableSubtitleProps, type TableTitleProps, type UniqueRow, createColumnHelper };
|
|
34
|
+
export { type CellAlignment, type Column, type ColumnWidth, DataTable, type DataTableBulkActionsContext, type DataTableData, type DataTableProps, type DataTableRowGroup, type DataTableRowId, type ObjectPaths, Table, type TableActionsProps, type TableBodyProps, type TableBulkActionsProps, type TableCellProps, type TableContainerProps, type TableGroupProps, type TableHeadProps, type TableHeaderProps, type TableProps, type TableRowProps, type TableRowSelectionProps, type TableSelectionHeaderProps, type TableSubtitleProps, type TableTitleProps, type UniqueRow, createColumnHelper };
|
package/dist/DataTable/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Table as Table$1, TableActions, TableBody, TableCell, TableCellPlaceholder, TableContainer, TableDivider, TableHead, TableHeader, TableRow, TableRowSelection, TableSelectionHeader, TableSkeleton, TableSubtitle, TableTitle } from "./Table.js";
|
|
2
2
|
import { TableGroup } from "./TableGroup.js";
|
|
3
|
+
import { TableBulkActions } from "./TableBulkActions.js";
|
|
3
4
|
import { DataTable } from "./DataTable.js";
|
|
4
5
|
import { ErrorDialog } from "./ErrorDialog.js";
|
|
5
6
|
import { Pagination } from "./Pagination.js";
|
|
@@ -10,6 +11,7 @@ const Table = Object.assign(Table$1, {
|
|
|
10
11
|
Title: TableTitle,
|
|
11
12
|
Subtitle: TableSubtitle,
|
|
12
13
|
Actions: TableActions,
|
|
14
|
+
BulkActions: TableBulkActions,
|
|
13
15
|
Divider: TableDivider,
|
|
14
16
|
Skeleton: TableSkeleton,
|
|
15
17
|
Head: TableHead,
|
|
@@ -4,7 +4,7 @@ import { DEFAULT_SORT_DIRECTION, SortDirection, strategies, transition } from ".
|
|
|
4
4
|
import { useId, useState } from "react";
|
|
5
5
|
//#region src/DataTable/useTable.ts
|
|
6
6
|
function useTable(t0) {
|
|
7
|
-
const $ = c(
|
|
7
|
+
const $ = c(80);
|
|
8
8
|
const { columns, data, initialSortColumn, initialSortDirection, externalSorting, getRowId, rowSelection: t1, selectedRows: controlledSelectedRows, defaultSelectedRows, onSelectionChange, isRowSelectable, collapsibleGroups: t2, expandedGroups: controlledExpandedGroups, defaultExpandedGroups, onExpandedGroupsChange } = t0;
|
|
9
9
|
const rowSelection = t1 === void 0 ? false : t1;
|
|
10
10
|
const collapsibleGroups = t2 === void 0 ? false : t2;
|
|
@@ -335,55 +335,65 @@ function useTable(t0) {
|
|
|
335
335
|
} else t15 = $[58];
|
|
336
336
|
const toggleGroupExpansion = t15;
|
|
337
337
|
let t16;
|
|
338
|
-
if ($[59] !==
|
|
339
|
-
t16 = {
|
|
338
|
+
if ($[59] !== setSelectedRows) {
|
|
339
|
+
t16 = () => {
|
|
340
|
+
setSelectedRows(/* @__PURE__ */ new Set());
|
|
341
|
+
};
|
|
342
|
+
$[59] = setSelectedRows;
|
|
343
|
+
$[60] = t16;
|
|
344
|
+
} else t16 = $[60];
|
|
345
|
+
let t17;
|
|
346
|
+
if ($[61] !== sortBy || $[62] !== t16 || $[63] !== toggleAllRows || $[64] !== toggleGroupExpansion || $[65] !== toggleRowSelection) {
|
|
347
|
+
t17 = {
|
|
340
348
|
sortBy,
|
|
341
349
|
toggleRowSelection,
|
|
342
350
|
toggleAllRows,
|
|
343
|
-
toggleGroupExpansion
|
|
351
|
+
toggleGroupExpansion,
|
|
352
|
+
clearSelection: t16
|
|
344
353
|
};
|
|
345
|
-
$[
|
|
346
|
-
$[
|
|
347
|
-
$[
|
|
348
|
-
$[
|
|
349
|
-
$[
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
354
|
+
$[61] = sortBy;
|
|
355
|
+
$[62] = t16;
|
|
356
|
+
$[63] = toggleAllRows;
|
|
357
|
+
$[64] = toggleGroupExpansion;
|
|
358
|
+
$[65] = toggleRowSelection;
|
|
359
|
+
$[66] = t17;
|
|
360
|
+
} else t17 = $[66];
|
|
361
|
+
const t18 = `${tableId}-selection-column`;
|
|
362
|
+
let t19;
|
|
363
|
+
if ($[67] !== allSelected || $[68] !== effectiveSelectedRows || $[69] !== selectableCount || $[70] !== selectedCount || $[71] !== someSelected || $[72] !== t18) {
|
|
364
|
+
t19 = {
|
|
365
|
+
headerId: t18,
|
|
356
366
|
selectedRows: effectiveSelectedRows,
|
|
357
367
|
allSelected,
|
|
358
368
|
someSelected,
|
|
359
369
|
selectableCount,
|
|
360
370
|
selectedCount
|
|
361
371
|
};
|
|
362
|
-
$[
|
|
363
|
-
$[
|
|
364
|
-
$[
|
|
365
|
-
$[
|
|
366
|
-
$[
|
|
367
|
-
$[
|
|
368
|
-
$[
|
|
369
|
-
} else
|
|
370
|
-
let
|
|
371
|
-
if ($[
|
|
372
|
-
|
|
372
|
+
$[67] = allSelected;
|
|
373
|
+
$[68] = effectiveSelectedRows;
|
|
374
|
+
$[69] = selectableCount;
|
|
375
|
+
$[70] = selectedCount;
|
|
376
|
+
$[71] = someSelected;
|
|
377
|
+
$[72] = t18;
|
|
378
|
+
$[73] = t19;
|
|
379
|
+
} else t19 = $[73];
|
|
380
|
+
let t20;
|
|
381
|
+
if ($[74] !== bodies || $[75] !== gridTemplateColumns || $[76] !== headers || $[77] !== t17 || $[78] !== t19) {
|
|
382
|
+
t20 = {
|
|
373
383
|
headers,
|
|
374
|
-
actions:
|
|
375
|
-
selection:
|
|
384
|
+
actions: t17,
|
|
385
|
+
selection: t19,
|
|
376
386
|
gridTemplateColumns,
|
|
377
387
|
bodies
|
|
378
388
|
};
|
|
379
|
-
$[
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
} else
|
|
386
|
-
return
|
|
389
|
+
$[74] = bodies;
|
|
390
|
+
$[75] = gridTemplateColumns;
|
|
391
|
+
$[76] = headers;
|
|
392
|
+
$[77] = t17;
|
|
393
|
+
$[78] = t19;
|
|
394
|
+
$[79] = t20;
|
|
395
|
+
} else t20 = $[79];
|
|
396
|
+
return t20;
|
|
387
397
|
}
|
|
388
398
|
function _temp5(row_4) {
|
|
389
399
|
return row_4.selectionId;
|
|
@@ -26,6 +26,7 @@ const menuScrollMargins = {
|
|
|
26
26
|
endMargin: 8
|
|
27
27
|
};
|
|
28
28
|
function FilteredActionList({ loading = false, placeholderText, filterValue: externalFilterValue, loadingType = FilteredActionListLoadingTypes.bodySpinner, onFilterChange, onListContainerRefChanged, onInputRefChanged, items, textInputProps, inputRef: providedInputRef, scrollContainerRef: providedScrollContainerRef, groupMetadata, showItemDividers, message, messageText, className, selectionVariant, announcementsEnabled = true, fullScreenOnNarrow, onSelectAllChange, actionListProps, focusOutBehavior = "wrap", _PrivateFocusManagement = "active-descendant", onActiveDescendantChanged, disableSelectOnHover = false, setInitialFocus = false, focusPrependedElements, scrollBehavior, virtualized = false, ...listProps }) {
|
|
29
|
+
var _readScrollContainerR;
|
|
29
30
|
if (virtualized && groupMetadata !== null && groupMetadata !== void 0 && groupMetadata.length) console.warn("FilteredActionList: `virtualized` has no effect when `groupMetadata` is provided. Grouped lists are rendered without virtualization.");
|
|
30
31
|
const isVirtualized = virtualized && !(groupMetadata !== null && groupMetadata !== void 0 && groupMetadata.length);
|
|
31
32
|
const [filterValue, setInternalFilterValue] = useProvidedStateOrCreate(externalFilterValue, void 0, "");
|
|
@@ -207,10 +208,13 @@ function FilteredActionList({ loading = false, placeholderText, filterValue: ext
|
|
|
207
208
|
const handleSelectAllChange = useCallback((e) => {
|
|
208
209
|
if (onSelectAllChange) onSelectAllChange(e.target.checked);
|
|
209
210
|
}, [onSelectAllChange]);
|
|
211
|
+
const bodyLoaderHeight = loading && loadingType.appearsInBody ? (_readScrollContainerR = readScrollContainerRef.current) === null || _readScrollContainerR === void 0 ? void 0 : _readScrollContainerR.clientHeight : void 0;
|
|
212
|
+
const showBodyLoader = bodyLoaderHeight !== void 0;
|
|
213
|
+
const isListRendered = !showBodyLoader && !message;
|
|
210
214
|
function getBodyContent() {
|
|
211
|
-
if (
|
|
215
|
+
if (showBodyLoader) return /* @__PURE__ */ jsx(FilteredActionListBodyLoader, {
|
|
212
216
|
loadingType,
|
|
213
|
-
height:
|
|
217
|
+
height: bodyLoaderHeight
|
|
214
218
|
});
|
|
215
219
|
if (message) return message;
|
|
216
220
|
let firstGroupIndex = 0;
|
|
@@ -309,7 +313,7 @@ function FilteredActionList({ loading = false, placeholderText, filterValue: ext
|
|
|
309
313
|
onInputKeyPress,
|
|
310
314
|
onInputKeyDown: usingRovingTabindex ? onInputKeyDown : void 0,
|
|
311
315
|
placeholderText,
|
|
312
|
-
listId,
|
|
316
|
+
listId: isListRendered ? listId : void 0,
|
|
313
317
|
inputDescriptionTextId,
|
|
314
318
|
loading: loading && !loadingType.appearsInBody,
|
|
315
319
|
fullScreenOnNarrow,
|
|
@@ -9,7 +9,8 @@ interface FilteredActionListInputProps extends Partial<Omit<TextInputProps, 'onC
|
|
|
9
9
|
onInputKeyPress?: React.KeyboardEventHandler<HTMLInputElement>;
|
|
10
10
|
onInputKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;
|
|
11
11
|
placeholderText?: string;
|
|
12
|
-
|
|
12
|
+
/** ID of the rendered list. Omit it while the list is not rendered. */
|
|
13
|
+
listId?: string;
|
|
13
14
|
inputDescriptionTextId: string;
|
|
14
15
|
loading: boolean;
|
|
15
16
|
fullScreenOnNarrow?: boolean;
|
|
@@ -5,7 +5,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
5
5
|
import { clsx } from "clsx";
|
|
6
6
|
//#region src/FilteredActionList/FilteredActionListInput.tsx
|
|
7
7
|
function FilteredActionListInput(t0) {
|
|
8
|
-
const $ = c(
|
|
8
|
+
const $ = c(35);
|
|
9
9
|
let className;
|
|
10
10
|
let fullScreenOnNarrow;
|
|
11
11
|
let inputDescriptionTextId;
|
|
@@ -64,16 +64,17 @@ function FilteredActionListInput(t0) {
|
|
|
64
64
|
$[16] = onInputFocus;
|
|
65
65
|
$[17] = t1;
|
|
66
66
|
} else t1 = $[17];
|
|
67
|
-
|
|
67
|
+
const t2 = listId !== void 0;
|
|
68
|
+
let t3;
|
|
68
69
|
if ($[18] !== className || $[19] !== fullScreenOnNarrow) {
|
|
69
|
-
|
|
70
|
+
t3 = clsx(className, { [FilteredActionList_module_css_default.FullScreenTextInput]: fullScreenOnNarrow });
|
|
70
71
|
$[18] = className;
|
|
71
72
|
$[19] = fullScreenOnNarrow;
|
|
72
|
-
$[20] =
|
|
73
|
-
} else
|
|
74
|
-
let
|
|
75
|
-
if ($[21] !== inputDescriptionTextId || $[22] !== inputRef || $[23] !== listId || $[24] !== loading || $[25] !== onInputChange || $[26] !== onInputKeyDown || $[27] !== onInputKeyPress || $[28] !== placeholderText || $[29] !== restTextInputProps || $[30] !== t1 || $[31] !== t2 || $[32] !== value) {
|
|
76
|
-
|
|
73
|
+
$[20] = t3;
|
|
74
|
+
} else t3 = $[20];
|
|
75
|
+
let t4;
|
|
76
|
+
if ($[21] !== inputDescriptionTextId || $[22] !== inputRef || $[23] !== listId || $[24] !== loading || $[25] !== onInputChange || $[26] !== onInputKeyDown || $[27] !== onInputKeyPress || $[28] !== placeholderText || $[29] !== restTextInputProps || $[30] !== t1 || $[31] !== t2 || $[32] !== t3 || $[33] !== value) {
|
|
77
|
+
t4 = /* @__PURE__ */ jsx("div", {
|
|
77
78
|
className: FilteredActionList_module_css_default.Header,
|
|
78
79
|
"data-component": "FilteredActionList.Header",
|
|
79
80
|
children: /* @__PURE__ */ jsx(TextInput_default, {
|
|
@@ -88,14 +89,14 @@ function FilteredActionListInput(t0) {
|
|
|
88
89
|
onKeyDown: onInputKeyDown,
|
|
89
90
|
placeholder: placeholderText,
|
|
90
91
|
role: "combobox",
|
|
91
|
-
"aria-expanded":
|
|
92
|
+
"aria-expanded": t2,
|
|
92
93
|
"aria-autocomplete": "list",
|
|
93
94
|
"aria-controls": listId,
|
|
94
95
|
"aria-label": placeholderText,
|
|
95
96
|
"aria-describedby": inputDescriptionTextId,
|
|
96
97
|
loaderPosition: "leading",
|
|
97
98
|
loading,
|
|
98
|
-
className:
|
|
99
|
+
className: t3,
|
|
99
100
|
...restTextInputProps
|
|
100
101
|
})
|
|
101
102
|
});
|
|
@@ -110,10 +111,11 @@ function FilteredActionListInput(t0) {
|
|
|
110
111
|
$[29] = restTextInputProps;
|
|
111
112
|
$[30] = t1;
|
|
112
113
|
$[31] = t2;
|
|
113
|
-
$[32] =
|
|
114
|
-
$[33] =
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
$[32] = t3;
|
|
115
|
+
$[33] = value;
|
|
116
|
+
$[34] = t4;
|
|
117
|
+
} else t4 = $[34];
|
|
118
|
+
return t4;
|
|
117
119
|
}
|
|
118
120
|
//#endregion
|
|
119
121
|
export { FilteredActionListInput };
|
|
@@ -27,7 +27,8 @@ import { BlankslateProps } from "../Blankslate/Blankslate.js";
|
|
|
27
27
|
import { Blankslate as BlankslateContainer } from "../Blankslate/index.js";
|
|
28
28
|
import { CardActionProps as ActionProps, CardDescriptionProps as DescriptionProps, CardHeadingProps as HeadingProps, CardIconProps as IconProps, CardImageProps as ImageProps, CardMetadataProps as MetadataProps, CardProps } from "../Card/Card.js";
|
|
29
29
|
import { Card } from "../Card/index.js";
|
|
30
|
-
import {
|
|
30
|
+
import { TableBulkActionsProps } from "../DataTable/TableBulkActions.js";
|
|
31
|
+
import { DataTable, DataTableBulkActionsContext, DataTableProps } from "../DataTable/DataTable.js";
|
|
31
32
|
import { TableActionsProps, TableBodyProps, TableCellProps, TableContainerProps, TableHeadProps, TableHeaderProps, TableProps, TableRowProps, TableRowSelectionProps, TableSelectionHeaderProps, TableSubtitleProps, TableTitleProps } from "../DataTable/Table.js";
|
|
32
33
|
import { TableGroupProps } from "../DataTable/TableGroup.js";
|
|
33
34
|
import { Table } from "../DataTable/index.js";
|
|
@@ -51,4 +52,4 @@ import { useTabPanel } from "./Tabs/useTabPanel.js";
|
|
|
51
52
|
import { TopicTagProps } from "../TopicTag/TopicTag.js";
|
|
52
53
|
import { TopicTagGroupProps } from "../TopicTag/TopicTagGroup.js";
|
|
53
54
|
import { TopicTag } from "../TopicTag/index.js";
|
|
54
|
-
export { ActionBar, type ActionBarButtonProps, type ActionBarMenuItemProps, type ActionBarMenuProps, type ActionBarProps, Announce, type AnnounceProps, AriaAlert, type AriaAlertProps, AriaStatus, type AriaStatusProps, BlankslateContainer as Blankslate, type BlankslateProps, ButtonBase, type ButtonBaseProps, Card, type ActionProps as CardActionProps, type DescriptionProps as CardDescriptionProps, type HeadingProps as CardHeadingProps, type IconProps as CardIconProps, type ImageProps as CardImageProps, type MetadataProps as CardMetadataProps, type CardProps, type CellAlignment, type Column, type ColumnWidth, DataTable, type DataTableData, type DataTableProps, type DataTableRowGroup, type DataTableRowId, DefaultFeatureFlags, Dialog, type DialogButtonProps, type DialogHeaderProps, type DialogHeight, type DialogProps, type DialogWidth, FeatureFlags, type FeatureFlagsProps, FilteredActionList, type FilteredActionListInputProps, FilteredActionListLoadingTypes, type FilteredActionListProps, Hidden, type HiddenProps, InlineMessage, type InlineMessageProps, IssueLabel, type IssueLabelProps, KeybindingHint, type KeybindingHintProps, NavList, type NavListDividerProps, type NavListGroupProps, type NavListItemProps, type NavListLeadingVisualProps, type NavListProps, type NavListSubNavProps, type NavListTrailingVisualProps, type ObjectPaths, PageHeader, type ActionsProps as PageHeaderActionsProps, type PageHeaderProps, type TitleProps as PageHeaderTitleProps, ScrollableRegion, type ScrollableRegionProps, SelectPanel, type SelectPanelMessageProps, type SelectPanelProps, type SelectPanelSecondaryActionProps, SkeletonAvatar, type SkeletonAvatarProps, SkeletonBox, type SkeletonBoxProps, SkeletonText, type SkeletonTextProps, SlotConfig, Stack, type StackItemProps, type StackProps, type TabListProps, type TabPanelProps, type TabProps, Table, type TableActionsProps, type TableBodyProps, type TableCellProps, type TableContainerProps, type TableGroupProps, type TableHeadProps, type TableHeaderProps, type TableProps, type TableRowProps, type TableRowSelectionProps, type TableSelectionHeaderProps, type TableSubtitleProps, type TableTitleProps, Tabs, type TabsProps, type TitleProps, Tooltip, type TooltipProps, TopicTag, type TopicTagGroupProps, type TopicTagProps, _default as UnderlinePanels, type PanelProps as UnderlinePanelsPanelProps, type UnderlinePanelsProps, type TabProps$1 as UnderlinePanelsTabProps, type UniqueRow, createColumnHelper, getAccessibleKeybindingHintString, useFeatureFlag, useOverflow, useSlots, useTab, useTabList, useTabPanel };
|
|
55
|
+
export { ActionBar, type ActionBarButtonProps, type ActionBarMenuItemProps, type ActionBarMenuProps, type ActionBarProps, Announce, type AnnounceProps, AriaAlert, type AriaAlertProps, AriaStatus, type AriaStatusProps, BlankslateContainer as Blankslate, type BlankslateProps, ButtonBase, type ButtonBaseProps, Card, type ActionProps as CardActionProps, type DescriptionProps as CardDescriptionProps, type HeadingProps as CardHeadingProps, type IconProps as CardIconProps, type ImageProps as CardImageProps, type MetadataProps as CardMetadataProps, type CardProps, type CellAlignment, type Column, type ColumnWidth, DataTable, type DataTableBulkActionsContext, type DataTableData, type DataTableProps, type DataTableRowGroup, type DataTableRowId, DefaultFeatureFlags, Dialog, type DialogButtonProps, type DialogHeaderProps, type DialogHeight, type DialogProps, type DialogWidth, FeatureFlags, type FeatureFlagsProps, FilteredActionList, type FilteredActionListInputProps, FilteredActionListLoadingTypes, type FilteredActionListProps, Hidden, type HiddenProps, InlineMessage, type InlineMessageProps, IssueLabel, type IssueLabelProps, KeybindingHint, type KeybindingHintProps, NavList, type NavListDividerProps, type NavListGroupProps, type NavListItemProps, type NavListLeadingVisualProps, type NavListProps, type NavListSubNavProps, type NavListTrailingVisualProps, type ObjectPaths, PageHeader, type ActionsProps as PageHeaderActionsProps, type PageHeaderProps, type TitleProps as PageHeaderTitleProps, ScrollableRegion, type ScrollableRegionProps, SelectPanel, type SelectPanelMessageProps, type SelectPanelProps, type SelectPanelSecondaryActionProps, SkeletonAvatar, type SkeletonAvatarProps, SkeletonBox, type SkeletonBoxProps, SkeletonText, type SkeletonTextProps, SlotConfig, Stack, type StackItemProps, type StackProps, type TabListProps, type TabPanelProps, type TabProps, Table, type TableActionsProps, type TableBodyProps, type TableBulkActionsProps, type TableCellProps, type TableContainerProps, type TableGroupProps, type TableHeadProps, type TableHeaderProps, type TableProps, type TableRowProps, type TableRowSelectionProps, type TableSelectionHeaderProps, type TableSubtitleProps, type TableTitleProps, Tabs, type TabsProps, type TitleProps, Tooltip, type TooltipProps, TopicTag, type TopicTagGroupProps, type TopicTagProps, _default as UnderlinePanels, type PanelProps as UnderlinePanelsPanelProps, type UnderlinePanelsProps, type TabProps$1 as UnderlinePanelsTabProps, type UniqueRow, createColumnHelper, getAccessibleKeybindingHintString, useFeatureFlag, useOverflow, useSlots, useTab, useTabList, useTabPanel };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from "react";
|
|
@@ -2771,6 +2771,10 @@
|
|
|
2771
2771
|
"id": "experimental-components-datatable-features--with-row-selection",
|
|
2772
2772
|
"code": "() => {\n const [selectedRows, setSelectedRows] = React.useState<\n ReadonlySet<DataTableRowId>\n >(() => new Set([2]))\n return (\n <Table.Container>\n <Table.Title as=\"h2\" id=\"selectable-repositories\">\n Selectable repositories\n </Table.Title>\n <DataTable\n aria-labelledby=\"selectable-repositories\"\n data={data}\n columns={groupedColumns}\n rowSelection\n selectedRows={selectedRows}\n onSelectionChange={({ selectedRows: nextSelectedRows }) => {\n setSelectedRows(nextSelectedRows)\n }}\n />\n </Table.Container>\n )\n}"
|
|
2773
2773
|
},
|
|
2774
|
+
{
|
|
2775
|
+
"id": "experimental-components-datatable-features--with-bulk-actions",
|
|
2776
|
+
"code": "() => {\n const repositories = [\n {\n id: 1,\n name: 'primer/react',\n visibility: 'Public',\n },\n {\n id: 2,\n name: 'primer/css',\n visibility: 'Public',\n },\n {\n id: 3,\n name: 'github/github',\n visibility: 'Internal',\n },\n ]\n const titleId = React.useId()\n const [rows, setRows] = React.useState(repositories)\n const [selectedRows, setSelectedRows] = React.useState<\n ReadonlySet<DataTableRowId>\n >(() => new Set([1]))\n const resetButtonRef = React.useRef<HTMLButtonElement>(null)\n return (\n <Table.Container>\n <Table.Title id={titleId}>Repositories</Table.Title>\n <Table.Actions>\n <Button\n ref={resetButtonRef}\n onClick={() => {\n setRows(repositories)\n setSelectedRows(new Set())\n }}\n >\n Reset repositories\n </Button>\n </Table.Actions>\n <DataTable\n aria-labelledby={titleId}\n data={[\n ...rows.filter((row) => row.visibility === 'Internal'),\n {\n groupId: 'public',\n label: 'Public',\n rows: rows.filter((row) => row.visibility === 'Public'),\n },\n ]}\n columns={[\n {\n header: 'Repository',\n field: 'name',\n rowHeader: true,\n sortBy: 'alphanumeric',\n },\n {\n header: 'Visibility',\n field: 'visibility',\n },\n ]}\n rowSelection\n selectedRows={selectedRows}\n onSelectionChange={({ selectedRows: next }) => setSelectedRows(next)}\n bulkActionsReturnFocusRef={\n rows.length === 0 ? resetButtonRef : undefined\n }\n collapsibleGroups\n renderBulkActions={({ selectedRows: effectiveIds, clearSelection }) => (\n <>\n <Button\n size=\"small\"\n onClick={() => {\n setRows((current) =>\n current.map((row) =>\n effectiveIds.has(row.id)\n ? {\n ...row,\n visibility: 'Internal',\n }\n : row,\n ),\n )\n clearSelection()\n }}\n >\n Make internal\n </Button>\n <Button\n size=\"small\"\n variant=\"danger\"\n onClick={() => {\n setRows((current) =>\n current.filter((row) => !effectiveIds.has(row.id)),\n )\n clearSelection()\n }}\n >\n Delete selected\n </Button>\n </>\n )}\n />\n </Table.Container>\n )\n}"
|
|
2777
|
+
},
|
|
2774
2778
|
{
|
|
2775
2779
|
"id": "experimental-components-datatable-features--with-grouped-row-selection",
|
|
2776
2780
|
"code": "() => {\n const [selectedRows, setSelectedRows] = React.useState<\n ReadonlySet<DataTableRowId>\n >(() => new Set())\n return (\n <Table.Container>\n <Table.Title as=\"h2\" id=\"selectable-repositories-by-visibility\">\n Selectable repositories by visibility\n </Table.Title>\n <DataTable\n aria-labelledby=\"selectable-repositories-by-visibility\"\n data={repoGroupsWithDisabledRow}\n columns={groupedColumns}\n rowSelection\n selectedRows={selectedRows}\n isRowSelectable={(repo) => repo.id !== 1}\n onSelectionChange={({ selectedRows: nextSelectedRows }) => {\n setSelectedRows(nextSelectedRows)\n }}\n />\n </Table.Container>\n )\n}"
|
|
@@ -2873,6 +2877,21 @@
|
|
|
2873
2877
|
"type": "({ expandedGroups }: { expandedGroups: Set<DataTableRowId> }) => void",
|
|
2874
2878
|
"description": "Receive a new expansion set on a disclosure request. Sorting and data replacement do not emit this callback or clear stored IDs."
|
|
2875
2879
|
},
|
|
2880
|
+
{
|
|
2881
|
+
"name": "renderBulkActions",
|
|
2882
|
+
"type": "(context: DataTableBulkActionsContext) => React.ReactNode",
|
|
2883
|
+
"description": "Render actions in place of visible column labels when rowSelection is enabled and selectable rows are selected. Receives selectedRows IDs, selectedCount, and clearSelection, excluding missing and non-selectable rows."
|
|
2884
|
+
},
|
|
2885
|
+
{
|
|
2886
|
+
"name": "bulkActionsProps",
|
|
2887
|
+
"type": "Pick<TableBulkActionsProps, 'aria-label' | 'getSelectedCountLabel'>",
|
|
2888
|
+
"description": "Localize the bulk-action group name and selected-count announcement (including zero)."
|
|
2889
|
+
},
|
|
2890
|
+
{
|
|
2891
|
+
"name": "bulkActionsReturnFocusRef",
|
|
2892
|
+
"type": "React.RefObject<HTMLElement | null>",
|
|
2893
|
+
"description": "Override focus recovery when a focused action disappears. Defaults to select-all, or the table when no selectable rows remain. Does not override focus already moved by the consumer."
|
|
2894
|
+
},
|
|
2876
2895
|
{
|
|
2877
2896
|
"name": "cellPadding",
|
|
2878
2897
|
"type": "'condensed' | 'normal' | 'spacious'",
|
|
@@ -2922,6 +2941,38 @@
|
|
|
2922
2941
|
}
|
|
2923
2942
|
],
|
|
2924
2943
|
"subcomponents": [
|
|
2944
|
+
{
|
|
2945
|
+
"name": "Table.BulkActions",
|
|
2946
|
+
"props": [
|
|
2947
|
+
{
|
|
2948
|
+
"name": "selectedCount",
|
|
2949
|
+
"type": "number",
|
|
2950
|
+
"required": true,
|
|
2951
|
+
"description": "The effectively selected row count. Keep the component mounted at zero so count announcements and focus recovery can complete."
|
|
2952
|
+
},
|
|
2953
|
+
{
|
|
2954
|
+
"name": "onFocusReturn",
|
|
2955
|
+
"type": "() => void",
|
|
2956
|
+
"description": "Choose the recovery destination when a focused action disappears and focus has not moved elsewhere."
|
|
2957
|
+
},
|
|
2958
|
+
{
|
|
2959
|
+
"name": "getSelectedCountLabel",
|
|
2960
|
+
"type": "(selectedCount: number) => string",
|
|
2961
|
+
"description": "Localize the visible and announced selected count, including zero."
|
|
2962
|
+
},
|
|
2963
|
+
{
|
|
2964
|
+
"name": "aria-label",
|
|
2965
|
+
"type": "string",
|
|
2966
|
+
"defaultValue": "'Bulk actions'",
|
|
2967
|
+
"description": "Name the action group."
|
|
2968
|
+
},
|
|
2969
|
+
{
|
|
2970
|
+
"name": "children",
|
|
2971
|
+
"type": "React.ReactNode",
|
|
2972
|
+
"description": "Consumer-owned action elements in native Tab order, rendered only when selectedCount is positive."
|
|
2973
|
+
}
|
|
2974
|
+
]
|
|
2975
|
+
},
|
|
2925
2976
|
{
|
|
2926
2977
|
"name": "Table",
|
|
2927
2978
|
"props": [
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
.prc-DataTable-TableContainer-hn0p3{column-gap:var(--base-size-8,.5rem);display:grid;grid-template-areas:"title actions" "divider divider" "subtitle subtitle" "filter filter" "table table" "footer footer";grid-template-columns:1fr 1fr}.prc-DataTable-TableTitle-nM43N{align-self:center;font-size:var(--text-body-size-medium,.875rem);font-weight:var(--base-text-weight-semibold,600);grid-area:title;line-height:20px}.prc-DataTable-TableSubtitle--L6Ho,.prc-DataTable-TableTitle-nM43N{color:var(--fgColor-default,#1f2328);margin:0}.prc-DataTable-TableSubtitle--L6Ho{font-size:var(--text-body-size-small,.75rem);font-weight:var(--base-text-weight-normal,400);grid-area:subtitle;line-height:var(--text-title-lineHeight-small,1.5)}.prc-DataTable-TableActions-fkc2b{align-items:center;column-gap:var(--base-size-8,.5rem);display:flex;grid-area:actions;justify-self:end}.prc-DataTable-TableDivider-TRc3b{background-color:var(--borderColor-default,#d1d9e0);grid-area:divider;height:1px;margin-block-end:var(--base-size-8,.5rem);margin-block-start:var(--base-size-16,1rem);width:100%}.prc-DataTable-TableActions-fkc2b+.prc-DataTable-TableOverflowWrapper-bSqT-,.prc-DataTable-TableSubtitle--L6Ho+.prc-DataTable-TableOverflowWrapper-bSqT-,.prc-DataTable-TableTitle-nM43N+.prc-DataTable-TableOverflowWrapper-bSqT-{margin-block-start:var(--base-size-8,.5rem)}.prc-DataTable-Table-7ux1n,.prc-DataTable-TableOverflowWrapper-bSqT-{grid-area:table}.prc-DataTable-Table-7ux1n{--table-border-radius:0.375rem;--table-cell-padding:var(--cell-padding-block,0.5rem) var(--cell-padding-inline,0.75rem);--table-font-size:0.75rem;background-color:var(--bgColor-default,#fff);border-collapse:separate;border-spacing:0;display:grid;font-size:var(--table-font-size);grid-template-columns:var(--grid-template-columns);line-height:1.66667;width:100%}.prc-DataTable-Table-7ux1n:where([data-cell-padding=condensed]){--cell-padding-block:0.25rem;--cell-padding-inline:0.5rem}.prc-DataTable-Table-7ux1n:where([data-cell-padding=normal]){--cell-padding-block:0.5rem;--cell-padding-inline:0.75rem}.prc-DataTable-Table-7ux1n:where([data-cell-padding=spacious]){--cell-padding-block:0.75rem;--cell-padding-inline:1rem}.prc-DataTable-TableCell-Fk4ve:first-child,.prc-DataTable-TableHeader-eyTab:first-child{border-inline-start:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,#d1d9e0)}.prc-DataTable-TableCell-Fk4ve:last-child,.prc-DataTable-TableHeader-eyTab:last-child{border-inline-end:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,#d1d9e0)}.prc-DataTable-TableCell-Fk4ve,.prc-DataTable-TableHeader-eyTab{align-items:center;border-block-end:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,#d1d9e0);display:flex;padding:var(--table-cell-padding);text-align:start}.prc-DataTable-TableCell-Fk4ve:where([data-cell-align=end]),.prc-DataTable-TableHeader-eyTab:where([data-cell-align=end]){display:flex;justify-content:flex-end;text-align:end}.prc-DataTable-TableHeader-eyTab[data-cell-align=end] .prc-DataTable-TableSortButton--aq0y{display:flex;flex-direction:row-reverse}.prc-DataTable-TableHead-4FaBf .prc-DataTable-TableRow-Icc7F:first-of-type .prc-DataTable-TableHeader-eyTab{border-block-start:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,#d1d9e0)}.prc-DataTable-TableHead-4FaBf .prc-DataTable-TableRow-Icc7F:first-of-type .prc-DataTable-TableHeader-eyTab:first-child{border-top-left-radius:var(--table-border-radius)}.prc-DataTable-TableHead-4FaBf .prc-DataTable-TableRow-Icc7F:first-of-type .prc-DataTable-TableHeader-eyTab:last-child{border-top-right-radius:var(--table-border-radius)}.prc-DataTable-TableOverflowWrapper-bSqT-:last-child .prc-DataTable-Table-7ux1n .prc-DataTable-TableBody-QKQy2:last-of-type .prc-DataTable-TableRow-Icc7F:last-of-type .prc-DataTable-TableCell-Fk4ve:first-child{border-bottom-left-radius:var(--table-border-radius)}.prc-DataTable-TableOverflowWrapper-bSqT-:last-child .prc-DataTable-Table-7ux1n .prc-DataTable-TableBody-QKQy2:last-of-type .prc-DataTable-TableRow-Icc7F:last-of-type .prc-DataTable-TableCell-Fk4ve:last-child{border-bottom-right-radius:var(--table-border-radius)}.prc-DataTable-TableOverflowWrapper-bSqT-:last-child .prc-DataTable-TableGroupHeaderBody-K-YqR:where(:has(+.prc-DataTable-TableBody-QKQy2[hidden]:last-child)) .prc-DataTable-TableGroupHeaderCell-vnb30{border-bottom-left-radius:var(--table-border-radius);border-bottom-right-radius:var(--table-border-radius)}.prc-DataTable-TableRow-Icc7F>:first-child .prc-DataTable-TableCellSkeletonItem-bGhwZ,.prc-DataTable-TableRow-Icc7F>:first-child:not(.prc-DataTable-TableCellSkeleton-DMdM5){padding-inline-start:var(--base-size-16,1rem)}.prc-DataTable-TableRow-Icc7F>:last-child .prc-DataTable-TableCellSkeletonItem-bGhwZ,.prc-DataTable-TableRow-Icc7F>:last-child:not(.prc-DataTable-TableCellSkeleton-DMdM5){padding-inline-end:var(--base-size-16,1rem)}.prc-DataTable-TableHeader-eyTab{background-color:var(--bgColor-muted,#f6f8fa);border-block-start:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,#d1d9e0);color:var(--fgColor-muted,#59636e);font-weight:var(--base-text-weight-semibold,600)}.prc-DataTable-TableHeader-eyTab:where([aria-sort=ascending]),.prc-DataTable-TableHeader-eyTab:where([aria-sort=descending]){color:var(--fgColor-default,#1f2328)}.prc-DataTable-TableRowSelection-HwyDU,.prc-DataTable-TableSelectionHeader-Op0cK{justify-content:center}.prc-DataTable-TableSortIcon-wHvJw{visibility:hidden}.prc-DataTable-TableHeader-eyTab .prc-DataTable-TableSortButton--aq0y:focus .prc-DataTable-TableSortIcon--ascending-Lpx6z,.prc-DataTable-TableHeader-eyTab:hover .prc-DataTable-TableSortIcon--ascending-Lpx6z,.prc-DataTable-TableHeader-eyTab[aria-sort=ascending] .prc-DataTable-TableSortIcon--ascending-Lpx6z,.prc-DataTable-TableHeader-eyTab[aria-sort=descending] .prc-DataTable-TableSortIcon--descending-hHJGo{visibility:visible}.prc-DataTable-TableRow-Icc7F:hover .prc-DataTable-TableCell-Fk4ve:not(.prc-DataTable-TableCellSkeleton-DMdM5){background-color:var(--control-transparent-bgColor-hover,#818b981a)}.prc-DataTable-TableCell-Fk4ve:where([scope=row]){align-items:center;color:var(--fgColor-default,#1f2328);display:flex;font-weight:var(--base-text-weight-semibold,600)}.prc-DataTable-TableCellSkeleton-DMdM5{padding:0}.prc-DataTable-TableCellSkeletonItems-Ljhq5{display:flex;flex-direction:column;width:100%}.prc-DataTable-TableCellSkeletonItem-bGhwZ{padding:var(--table-cell-padding)}.prc-DataTable-TableCellSkeletonItem-bGhwZ:nth-of-type(5n+1){--skeleton-item-width:85%}.prc-DataTable-TableCellSkeletonItem-bGhwZ:nth-of-type(5n+2){--skeleton-item-width:67.5%}.prc-DataTable-TableCellSkeletonItem-bGhwZ:nth-of-type(5n+3){--skeleton-item-width:80%}.prc-DataTable-TableCellSkeletonItem-bGhwZ:nth-of-type(5n+4){--skeleton-item-width:60%}.prc-DataTable-TableCellSkeletonItem-bGhwZ:nth-of-type(5n+5){--skeleton-item-width:75%}.prc-DataTable-TableCellSkeletonItem-bGhwZ [data-component=SkeletonText]{width:var(--skeleton-item-width)}.prc-DataTable-TableCellSkeletonItem-bGhwZ:not(:last-of-type){border-block-end:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,#d1d9e0)}.prc-DataTable-TableSortButton--aq0y{column-gap:.5rem}.prc-DataTable-TableBody-QKQy2,.prc-DataTable-TableGroupHeaderBody-K-YqR,.prc-DataTable-TableHead-4FaBf,.prc-DataTable-TableRow-Icc7F{display:contents}@supports (grid-template-columns:subgrid){.prc-DataTable-TableBody-QKQy2,.prc-DataTable-TableGroupHeaderBody-K-YqR,.prc-DataTable-TableHead-4FaBf,.prc-DataTable-TableRow-Icc7F{display:grid;grid-column:-1/1;grid-template-columns:subgrid}}.prc-DataTable-TableGroupHeaderCell-vnb30{align-items:center;background-color:var(--bgColor-muted,#f6f8fa);border-block-end:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,#d1d9e0);border-inline-end:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,#d1d9e0);border-inline-start:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,#d1d9e0);color:var(--fgColor-muted,#59636e);column-gap:calc(var(--cell-padding-inline)*2);display:flex;grid-column:1/-1;padding:var(--table-cell-padding);text-align:start}.prc-DataTable-TableGroupHeaderContent-H9FbA{align-items:baseline;column-gap:var(--base-size-8,.5rem);display:flex}.prc-DataTable-TableGroupHeaderLabel--c-od{color:var(--fgColor-default,#1f2328);font-weight:var(--base-text-weight-semibold,600)}.prc-DataTable-TableGroupHeaderCount-6r8Pj{color:var(--fgColor-muted,#59636e)}.prc-DataTable-TableBody-QKQy2:where([hidden]){display:none}.prc-DataTable-TableGroupToggle-9OwNG{align-items:center;align-self:center;border-radius:var(--borderRadius-small,.1875rem);color:var(--fgColor-default,#1f2328);display:inline-flex;flex-shrink:0;height:var(--base-size-24,1.5rem);justify-content:center;margin-inline:calc((var(--base-size-16,1rem) - var(--base-size-24,1.5rem))/2);width:var(--base-size-24,1.5rem)}.prc-DataTable-TableGroupToggle-9OwNG:hover{background-color:var(--bgColor-neutral-muted,#818b981f)}.prc-DataTable-TableGroupToggle-9OwNG:where([aria-expanded=true]) svg{transform:rotate(90deg)}.prc-DataTable-PlaceholderText-8bHo7{color:var(--fgColor-muted,#59636e)}
|
|
2
|
-
/*# sourceMappingURL=Table-0327e248.css.map */
|