@cerberus-design/data-grid 0.25.3 → 1.0.0-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/column-helpers.cjs +55 -21
- package/dist/column-helpers.js +55 -17
- package/dist/components/cerby-data-grid.client.cjs +12 -11
- package/dist/components/cerby-data-grid.client.js +12 -7
- package/dist/components/count-menu.client.cjs +46 -49
- package/dist/components/count-menu.client.js +46 -45
- package/dist/components/data-grid.client.cjs +89 -82
- package/dist/components/data-grid.client.js +89 -78
- package/dist/components/features.client.cjs +72 -76
- package/dist/components/features.client.js +72 -72
- package/dist/components/grid.client.cjs +280 -309
- package/dist/components/grid.client.js +281 -303
- package/dist/components/pagination.client.cjs +90 -113
- package/dist/components/pagination.client.js +90 -109
- package/dist/components/pinned-items.client.cjs +60 -59
- package/dist/components/pinned-items.client.js +60 -55
- package/dist/components/sort-items.client.cjs +44 -49
- package/dist/components/sort-items.client.js +44 -45
- package/dist/const.cjs +32 -43
- package/dist/const.js +33 -31
- package/dist/context.client.cjs +12 -12
- package/dist/context.client.js +12 -8
- package/dist/hooks.client.cjs +13 -20
- package/dist/hooks.client.js +13 -16
- package/dist/index.cjs +9 -15
- package/dist/index.js +5 -4
- package/dist/panda.buildinfo.json +23 -0
- package/dist/store.cjs +241 -284
- package/dist/store.js +241 -280
- package/dist/utils.cjs +23 -45
- package/dist/utils.js +23 -41
- package/dist/virtualizer.client.cjs +63 -53
- package/dist/virtualizer.client.js +63 -49
- package/package.json +33 -27
|
@@ -1,319 +1,290 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const virtualizer_client = require('../virtualizer.client.cjs');
|
|
15
|
-
const features_client = require('./features.client.cjs');
|
|
16
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
const require_const = require("../const.cjs");
|
|
4
|
+
const require_context_client = require("../context.client.cjs");
|
|
5
|
+
const require_hooks_client = require("../hooks.client.cjs");
|
|
6
|
+
const require_virtualizer_client = require("../virtualizer.client.cjs");
|
|
7
|
+
const require_features_client = require("./features.client.cjs");
|
|
8
|
+
let _cerberus_design_react = require("@cerberus-design/react");
|
|
9
|
+
let _cerberus_design_signals = require("@cerberus-design/signals");
|
|
10
|
+
let react = require("react");
|
|
11
|
+
let styled_system_jsx = require("styled-system/jsx");
|
|
12
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
13
|
+
//#region src/components/grid.client.tsx
|
|
17
14
|
function GridViewport() {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
{
|
|
89
|
-
each: staticRows.slice(
|
|
90
|
-
currentPageRange.start,
|
|
91
|
-
currentPageRange.end
|
|
92
|
-
),
|
|
93
|
-
children: (row, index) => /* @__PURE__ */ jsxRuntime.jsx(GridRow, { row, index }, index)
|
|
94
|
-
}
|
|
95
|
-
) })
|
|
96
|
-
}
|
|
97
|
-
)
|
|
98
|
-
]
|
|
99
|
-
}
|
|
100
|
-
);
|
|
15
|
+
const viewportRef = (0, react.useRef)(null);
|
|
16
|
+
const store = require_context_client.useDataGridContext();
|
|
17
|
+
const { virtualRows, totalHeight } = require_virtualizer_client.useVirtualizer(store, viewportRef);
|
|
18
|
+
const columns = (0, _cerberus_design_signals.useRead)(store.columns);
|
|
19
|
+
const isServerPaginated = (0, _cerberus_design_signals.useRead)(store.isServerPaginated);
|
|
20
|
+
const staticRows = (0, _cerberus_design_signals.useRead)(store.rows);
|
|
21
|
+
const currentPageRange = (0, _cerberus_design_signals.useRead)(store.currentPageRange);
|
|
22
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(styled_system_jsx.Scrollable, {
|
|
23
|
+
hideScrollbar: true,
|
|
24
|
+
"data-scope": require_const.SCOPE,
|
|
25
|
+
"data-part": require_const.PARTS.VIEWPORT,
|
|
26
|
+
h: "full",
|
|
27
|
+
minH: "0",
|
|
28
|
+
minW: "full",
|
|
29
|
+
pos: "relative",
|
|
30
|
+
w: "full",
|
|
31
|
+
ref: viewportRef,
|
|
32
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(styled_system_jsx.Box, {
|
|
33
|
+
role: "grid",
|
|
34
|
+
"aria-rowcount": staticRows.length + 1,
|
|
35
|
+
"aria-colcount": columns.length,
|
|
36
|
+
h: "var(--row-height)",
|
|
37
|
+
pos: "sticky",
|
|
38
|
+
top: "0",
|
|
39
|
+
w: "var(--total-grid-width)",
|
|
40
|
+
zIndex: "sticky",
|
|
41
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(styled_system_jsx.HStack, {
|
|
42
|
+
"aria-rowindex": 1,
|
|
43
|
+
role: "rowgroup",
|
|
44
|
+
gap: "0",
|
|
45
|
+
h: "full",
|
|
46
|
+
pos: "relative",
|
|
47
|
+
w: "full",
|
|
48
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_cerberus_design_react.For, {
|
|
49
|
+
each: columns,
|
|
50
|
+
children: (col) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_cerberus_design_react.Show, {
|
|
51
|
+
when: col.isVisible(),
|
|
52
|
+
children: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GridHeaderCell, { column: col })
|
|
53
|
+
}, col.id)
|
|
54
|
+
})
|
|
55
|
+
})
|
|
56
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_cerberus_design_react.Show, {
|
|
57
|
+
when: isServerPaginated,
|
|
58
|
+
fallback: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(styled_system_jsx.Box, {
|
|
59
|
+
pos: "relative",
|
|
60
|
+
w: "var(--total-grid-width)",
|
|
61
|
+
style: { height: `${totalHeight}px` },
|
|
62
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_cerberus_design_react.For, {
|
|
63
|
+
each: virtualRows,
|
|
64
|
+
children: (vRow) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GridRow, {
|
|
65
|
+
row: vRow.data,
|
|
66
|
+
index: vRow.index,
|
|
67
|
+
offsetY: vRow.offsetY
|
|
68
|
+
}, vRow.index)
|
|
69
|
+
})
|
|
70
|
+
}),
|
|
71
|
+
children: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(styled_system_jsx.Stack, {
|
|
72
|
+
direction: "column",
|
|
73
|
+
gap: "0",
|
|
74
|
+
w: "var(--total-grid-width)",
|
|
75
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_cerberus_design_react.For, {
|
|
76
|
+
each: staticRows.slice(currentPageRange.start, currentPageRange.end),
|
|
77
|
+
children: (row, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GridRow, {
|
|
78
|
+
row,
|
|
79
|
+
index
|
|
80
|
+
}, index)
|
|
81
|
+
})
|
|
82
|
+
})
|
|
83
|
+
})]
|
|
84
|
+
});
|
|
101
85
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
) })
|
|
198
|
-
]
|
|
199
|
-
}
|
|
200
|
-
),
|
|
201
|
-
/* @__PURE__ */ jsxRuntime.jsx(features_client.HeaderCellOptions, { ...column }),
|
|
202
|
-
/* @__PURE__ */ jsxRuntime.jsx(react$1.Show, { when: pinnedState === "pinned", children: () => /* @__PURE__ */ jsxRuntime.jsx(ShadowFiller, { style, ...pinnedAttr }) })
|
|
203
|
-
]
|
|
204
|
-
}
|
|
205
|
-
);
|
|
86
|
+
var GridHeaderCell = (0, react.memo)(function GridHeaderCell(props) {
|
|
87
|
+
const { column } = props;
|
|
88
|
+
const store = require_context_client.useDataGridContext();
|
|
89
|
+
const { icons } = (0, _cerberus_design_react.useCerberusContext)();
|
|
90
|
+
const pinnedVal = (0, _cerberus_design_signals.useRead)(column.pinned);
|
|
91
|
+
const sortingVal = (0, _cerberus_design_signals.useRead)(store.sorting);
|
|
92
|
+
const pinnedState = require_hooks_client.usePinnedState(pinnedVal);
|
|
93
|
+
const pinnedAttr = require_hooks_client.usePinnedAttribute(pinnedVal);
|
|
94
|
+
const style = require_hooks_client.useColumnStyles(column, pinnedVal);
|
|
95
|
+
const isSortedDesc = (0, react.useMemo)(() => {
|
|
96
|
+
const result = sortingVal.find((item) => item.id === column.id);
|
|
97
|
+
if (result) return result.desc;
|
|
98
|
+
return false;
|
|
99
|
+
}, [sortingVal, column.id]);
|
|
100
|
+
const SortAscIcon = icons.sortAsc;
|
|
101
|
+
const SortDescIcon = icons.sortDesc;
|
|
102
|
+
function handleToggleSorting(e) {
|
|
103
|
+
store.toggleSort(column.id, e.shiftKey);
|
|
104
|
+
}
|
|
105
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(styled_system_jsx.HStack, {
|
|
106
|
+
role: "columnheader",
|
|
107
|
+
"data-scope": require_const.SCOPE,
|
|
108
|
+
"data-part": require_const.PARTS.HEAD_CELL,
|
|
109
|
+
"data-state": pinnedState,
|
|
110
|
+
"data-col": column.id,
|
|
111
|
+
...pinnedAttr,
|
|
112
|
+
bgColor: "page.bg.initial",
|
|
113
|
+
borderBottom: "1px solid",
|
|
114
|
+
borderColor: "page.border.200",
|
|
115
|
+
h: "full",
|
|
116
|
+
justify: "space-between",
|
|
117
|
+
pos: "relative",
|
|
118
|
+
px: "md",
|
|
119
|
+
userSelect: "none",
|
|
120
|
+
textAlign: "left",
|
|
121
|
+
textStyle: "label-md",
|
|
122
|
+
verticalAlign: "middle",
|
|
123
|
+
w: "full",
|
|
124
|
+
zIndex: "10",
|
|
125
|
+
_first: { borderTopLeftRadius: "md" },
|
|
126
|
+
_last: { borderTopRightRadius: "md" },
|
|
127
|
+
_pinned: {
|
|
128
|
+
pos: "sticky",
|
|
129
|
+
zIndex: 20
|
|
130
|
+
},
|
|
131
|
+
_leftPinned: {
|
|
132
|
+
borderRightColor: "page.border.200",
|
|
133
|
+
borderRight: "1px solid"
|
|
134
|
+
},
|
|
135
|
+
_rightPinned: {
|
|
136
|
+
borderLeftColor: "page.border.200",
|
|
137
|
+
borderLeft: "1px solid"
|
|
138
|
+
},
|
|
139
|
+
className: "group",
|
|
140
|
+
style,
|
|
141
|
+
children: [
|
|
142
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(styled_system_jsx.HStack, {
|
|
143
|
+
gap: "sm",
|
|
144
|
+
_groupHover: { "& :is(button)": { opacity: "1" } },
|
|
145
|
+
children: [typeof column.original.header === "function" ? column.original.header({ colId: column.id }) : column.original.header, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_cerberus_design_react.Show, {
|
|
146
|
+
when: column.sortable,
|
|
147
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_cerberus_design_react.Tooltip, {
|
|
148
|
+
content: isSortedDesc ? "Sort Ascending" : "Sort Decending",
|
|
149
|
+
openDelay: 800,
|
|
150
|
+
asChild: true,
|
|
151
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_cerberus_design_react.IconButton, {
|
|
152
|
+
ariaLabel: "Toggle sorting",
|
|
153
|
+
size: "sm",
|
|
154
|
+
opacity: {
|
|
155
|
+
base: 1,
|
|
156
|
+
md: 0
|
|
157
|
+
},
|
|
158
|
+
transitionProperty: "opacity",
|
|
159
|
+
transitionDuration: "fast",
|
|
160
|
+
onClick: handleToggleSorting,
|
|
161
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_cerberus_design_react.Show, {
|
|
162
|
+
when: isSortedDesc,
|
|
163
|
+
fallback: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SortAscIcon, {}),
|
|
164
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SortDescIcon, {})
|
|
165
|
+
})
|
|
166
|
+
})
|
|
167
|
+
})
|
|
168
|
+
})]
|
|
169
|
+
}),
|
|
170
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_features_client.HeaderCellOptions, { ...column }),
|
|
171
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_cerberus_design_react.Show, {
|
|
172
|
+
when: pinnedState === "pinned",
|
|
173
|
+
children: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShadowFiller, {
|
|
174
|
+
style,
|
|
175
|
+
...pinnedAttr
|
|
176
|
+
})
|
|
177
|
+
})
|
|
178
|
+
]
|
|
179
|
+
});
|
|
206
180
|
});
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
181
|
+
var GridCell = (0, react.memo)(function GridCell(props) {
|
|
182
|
+
const { column, row } = props;
|
|
183
|
+
const value = column.getValue(row);
|
|
184
|
+
const pinnedVal = (0, _cerberus_design_signals.useRead)(column.pinned);
|
|
185
|
+
const pinnedState = require_hooks_client.usePinnedState(pinnedVal);
|
|
186
|
+
const pinnedAttr = require_hooks_client.usePinnedAttribute(pinnedVal);
|
|
187
|
+
const style = require_hooks_client.useColumnStyles(column, pinnedVal);
|
|
188
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(styled_system_jsx.HStack, {
|
|
189
|
+
role: "cell",
|
|
190
|
+
"data-scope": require_const.SCOPE,
|
|
191
|
+
"data-part": require_const.PARTS.CELL,
|
|
192
|
+
"data-state": pinnedState,
|
|
193
|
+
...pinnedAttr,
|
|
194
|
+
bgColor: "inherit",
|
|
195
|
+
borderColor: "page.border.200",
|
|
196
|
+
h: "full",
|
|
197
|
+
pos: "relative",
|
|
198
|
+
px: "md",
|
|
199
|
+
userSelect: "none",
|
|
200
|
+
verticalAlign: "middle",
|
|
201
|
+
zIndex: "base",
|
|
202
|
+
_pinned: {
|
|
203
|
+
pos: "sticky",
|
|
204
|
+
zIndex: 20
|
|
205
|
+
},
|
|
206
|
+
_leftPinned: {
|
|
207
|
+
borderRightColor: "page.border.200",
|
|
208
|
+
borderRight: "1px solid"
|
|
209
|
+
},
|
|
210
|
+
_rightPinned: {
|
|
211
|
+
borderLeftColor: "page.border.200",
|
|
212
|
+
borderLeft: "1px solid"
|
|
213
|
+
},
|
|
214
|
+
style,
|
|
215
|
+
children: [column.original.cell ? column.original.cell({
|
|
216
|
+
row,
|
|
217
|
+
value
|
|
218
|
+
}) : value, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_cerberus_design_react.Show, {
|
|
219
|
+
when: pinnedState === "pinned",
|
|
220
|
+
children: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShadowFiller, {
|
|
221
|
+
style,
|
|
222
|
+
...pinnedAttr
|
|
223
|
+
})
|
|
224
|
+
})]
|
|
225
|
+
});
|
|
249
226
|
});
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
227
|
+
var GridRow = (0, react.memo)(function GridRow(props) {
|
|
228
|
+
const columns = (0, _cerberus_design_signals.useRead)(require_context_client.useDataGridContext().columns);
|
|
229
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GridRowContainer, {
|
|
230
|
+
offsetY: props.offsetY,
|
|
231
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_cerberus_design_react.For, {
|
|
232
|
+
each: columns,
|
|
233
|
+
children: (col) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_cerberus_design_react.Show, {
|
|
234
|
+
when: col.isVisible(),
|
|
235
|
+
children: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GridCell, {
|
|
236
|
+
row: props.row,
|
|
237
|
+
column: col
|
|
238
|
+
})
|
|
239
|
+
}, col.id)
|
|
240
|
+
})
|
|
241
|
+
});
|
|
254
242
|
});
|
|
255
243
|
function GridRowContainer(props) {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
"&:is([data-render=virtualized])": {
|
|
276
|
-
pos: "absolute",
|
|
277
|
-
left: 0
|
|
278
|
-
}
|
|
279
|
-
},
|
|
280
|
-
style: {
|
|
281
|
-
transform: isVirtualized ? `translateY(${props.offsetY}px)` : void 0
|
|
282
|
-
},
|
|
283
|
-
children: props.children
|
|
284
|
-
}
|
|
285
|
-
);
|
|
244
|
+
const isVirtualized = props.offsetY !== void 0;
|
|
245
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(styled_system_jsx.HStack, {
|
|
246
|
+
role: "row",
|
|
247
|
+
"data-scope": require_const.SCOPE,
|
|
248
|
+
"data-part": require_const.PARTS.ROW,
|
|
249
|
+
"data-render": isVirtualized ? "virtualized" : "static",
|
|
250
|
+
bgColor: "page.surface.100",
|
|
251
|
+
gap: "0",
|
|
252
|
+
h: "var(--row-height)",
|
|
253
|
+
w: "full",
|
|
254
|
+
_even: { bgColor: "page.surface.initial" },
|
|
255
|
+
_hover: { bgColor: "page.surface.200" },
|
|
256
|
+
css: { "&:is([data-render=virtualized])": {
|
|
257
|
+
pos: "absolute",
|
|
258
|
+
left: 0
|
|
259
|
+
} },
|
|
260
|
+
style: { transform: isVirtualized ? `translateY(${props.offsetY}px)` : void 0 },
|
|
261
|
+
children: props.children
|
|
262
|
+
});
|
|
286
263
|
}
|
|
287
264
|
function ShadowFiller(props) {
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
...rest
|
|
312
|
-
}
|
|
313
|
-
);
|
|
265
|
+
const { style, ...rest } = props;
|
|
266
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(styled_system_jsx.Box, {
|
|
267
|
+
bottom: "0",
|
|
268
|
+
h: "full",
|
|
269
|
+
pos: "absolute",
|
|
270
|
+
w: "0.75rem",
|
|
271
|
+
zIndex: "inherit",
|
|
272
|
+
_leftPinned: {
|
|
273
|
+
bgGradient: "to-r",
|
|
274
|
+
gradientFrom: "black/10",
|
|
275
|
+
gradientTo: "transparent"
|
|
276
|
+
},
|
|
277
|
+
_rightPinned: {
|
|
278
|
+
bgGradient: "to-l",
|
|
279
|
+
gradientFrom: "black/10",
|
|
280
|
+
gradientTo: "transparent"
|
|
281
|
+
},
|
|
282
|
+
style: {
|
|
283
|
+
left: style.left ? style.width : void 0,
|
|
284
|
+
right: style.right ? style.width : void 0
|
|
285
|
+
},
|
|
286
|
+
...rest
|
|
287
|
+
});
|
|
314
288
|
}
|
|
315
|
-
|
|
316
|
-
exports.GridCell = GridCell;
|
|
317
|
-
exports.GridHeaderCell = GridHeaderCell;
|
|
318
|
-
exports.GridRow = GridRow;
|
|
289
|
+
//#endregion
|
|
319
290
|
exports.GridViewport = GridViewport;
|