@bendyline/squisq-grid-react 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,341 @@
1
+ /* src/styles/index.css */
2
+ .squisq-grid {
3
+ position: relative;
4
+ display: flex;
5
+ flex-direction: column;
6
+ border: 1px solid var(--squisq-grid-border, #d1d5db);
7
+ border-radius: 8px;
8
+ background: var(--squisq-grid-bg, #ffffff);
9
+ color: var(--squisq-grid-text, #1f2937);
10
+ font-size: 0.82rem;
11
+ overflow: hidden;
12
+ }
13
+ .squisq-grid-scroller {
14
+ overflow: auto;
15
+ overscroll-behavior: contain;
16
+ position: relative;
17
+ }
18
+ .squisq-grid-header {
19
+ display: grid;
20
+ position: sticky;
21
+ top: 0;
22
+ z-index: 2;
23
+ background: var(--squisq-grid-header-bg, #f9fafb);
24
+ border-bottom: 1px solid var(--squisq-grid-border, #d1d5db);
25
+ width: max-content;
26
+ min-width: 100%;
27
+ }
28
+ .squisq-grid-headercell {
29
+ position: relative;
30
+ display: flex;
31
+ flex-direction: column;
32
+ border-right: 1px solid var(--squisq-grid-border-subtle, #e5e7eb);
33
+ min-width: 0;
34
+ }
35
+ .squisq-grid-sortbutton {
36
+ display: flex;
37
+ align-items: center;
38
+ gap: 4px;
39
+ border: none;
40
+ background: none;
41
+ font: inherit;
42
+ font-weight: 600;
43
+ color: var(--squisq-grid-header-text, #374151);
44
+ padding: 4px 8px 2px;
45
+ cursor: pointer;
46
+ text-align: left;
47
+ min-width: 0;
48
+ }
49
+ .squisq-grid-colname {
50
+ overflow: hidden;
51
+ text-overflow: ellipsis;
52
+ white-space: nowrap;
53
+ }
54
+ .squisq-grid-sortmark {
55
+ flex: none;
56
+ font-size: 0.65rem;
57
+ color: var(--squisq-grid-accent, #2563eb);
58
+ }
59
+ .squisq-grid-filterrow {
60
+ position: relative;
61
+ display: flex;
62
+ align-items: stretch;
63
+ gap: 3px;
64
+ margin: 0 6px 4px;
65
+ min-width: 0;
66
+ }
67
+ .squisq-grid-opbutton {
68
+ flex: none;
69
+ display: flex;
70
+ align-items: center;
71
+ justify-content: center;
72
+ gap: 1px;
73
+ min-width: 26px;
74
+ white-space: nowrap;
75
+ padding: 0;
76
+ border: 1px solid var(--squisq-grid-border-subtle, #e5e7eb);
77
+ border-radius: 4px;
78
+ background: var(--squisq-grid-input-bg, #ffffff);
79
+ color: var(--squisq-grid-text-muted, #6b7280);
80
+ font: inherit;
81
+ font-size: 0.7rem;
82
+ font-weight: 600;
83
+ cursor: pointer;
84
+ }
85
+ .squisq-grid-opbutton:hover {
86
+ color: var(--squisq-grid-text, #1f2937);
87
+ }
88
+ .squisq-grid-opbutton--cs .squisq-grid-opglyph {
89
+ text-decoration: underline;
90
+ color: var(--squisq-grid-accent, #2563eb);
91
+ }
92
+ .squisq-grid-opcaret {
93
+ font-size: 0.55rem;
94
+ line-height: 1;
95
+ }
96
+ .squisq-grid-opmenu {
97
+ position: absolute;
98
+ z-index: 3;
99
+ min-width: 150px;
100
+ padding: 3px;
101
+ display: flex;
102
+ flex-direction: column;
103
+ border: 1px solid var(--squisq-grid-border, #d1d5db);
104
+ border-radius: 6px;
105
+ background: var(--squisq-grid-bg, #ffffff);
106
+ box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
107
+ font-weight: 400;
108
+ }
109
+ .squisq-grid-opoption {
110
+ display: flex;
111
+ align-items: center;
112
+ white-space: nowrap;
113
+ gap: 8px;
114
+ border: none;
115
+ border-radius: 4px;
116
+ background: none;
117
+ color: var(--squisq-grid-text, #1f2937);
118
+ font: inherit;
119
+ font-size: 0.74rem;
120
+ text-align: left;
121
+ padding: 3px 8px;
122
+ cursor: pointer;
123
+ }
124
+ .squisq-grid-opoption:hover {
125
+ background: var(--squisq-grid-row-hover, #f3f4f6);
126
+ }
127
+ .squisq-grid-opoption--active {
128
+ background: var(--squisq-grid-selection-bg, #eff6ff);
129
+ }
130
+ .squisq-grid-opclear {
131
+ margin-bottom: 2px;
132
+ padding-bottom: 4px;
133
+ border-bottom: 1px solid var(--squisq-grid-border-subtle, #e5e7eb);
134
+ border-radius: 4px 4px 0 0;
135
+ color: var(--squisq-grid-text-muted, #6b7280);
136
+ font-style: italic;
137
+ }
138
+ .squisq-grid-opoption .squisq-grid-opglyph {
139
+ flex: none;
140
+ min-width: 24px;
141
+ text-align: center;
142
+ font-weight: 600;
143
+ white-space: nowrap;
144
+ color: var(--squisq-grid-text-muted, #6b7280);
145
+ }
146
+ .squisq-grid-opcase {
147
+ display: flex;
148
+ align-items: center;
149
+ gap: 6px;
150
+ margin-top: 2px;
151
+ padding: 4px 8px;
152
+ border-top: 1px solid var(--squisq-grid-border-subtle, #e5e7eb);
153
+ font-size: 0.72rem;
154
+ color: var(--squisq-grid-text, #1f2937);
155
+ cursor: pointer;
156
+ }
157
+ .squisq-grid-filterinput {
158
+ flex: 1 1 auto;
159
+ padding: 1px 6px;
160
+ font: inherit;
161
+ font-size: 0.72rem;
162
+ font-weight: 400;
163
+ border: 1px solid var(--squisq-grid-border-subtle, #e5e7eb);
164
+ border-radius: 4px;
165
+ background: var(--squisq-grid-input-bg, #ffffff);
166
+ color: var(--squisq-grid-text, #1f2937);
167
+ min-width: 0;
168
+ }
169
+ .squisq-grid-valuebutton {
170
+ flex: none;
171
+ width: 18px;
172
+ padding: 0;
173
+ border: 1px solid var(--squisq-grid-border-subtle, #e5e7eb);
174
+ border-radius: 4px;
175
+ background: var(--squisq-grid-input-bg, #ffffff);
176
+ color: var(--squisq-grid-text-muted, #6b7280);
177
+ font: inherit;
178
+ font-size: 0.55rem;
179
+ cursor: pointer;
180
+ }
181
+ .squisq-grid-valuebutton:hover {
182
+ color: var(--squisq-grid-text, #1f2937);
183
+ }
184
+ .squisq-grid-valuemenu {
185
+ position: absolute;
186
+ z-index: 3;
187
+ min-width: 150px;
188
+ max-width: 260px;
189
+ max-height: 260px;
190
+ overflow-y: auto;
191
+ padding: 3px;
192
+ display: flex;
193
+ flex-direction: column;
194
+ border: 1px solid var(--squisq-grid-border, #d1d5db);
195
+ border-radius: 6px;
196
+ background: var(--squisq-grid-bg, #ffffff);
197
+ box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
198
+ font-weight: 400;
199
+ }
200
+ .squisq-grid-valueoption {
201
+ display: block;
202
+ overflow: hidden;
203
+ text-overflow: ellipsis;
204
+ }
205
+ .squisq-grid-valuemenu-note {
206
+ padding: 4px 8px;
207
+ border-top: 1px solid var(--squisq-grid-border-subtle, #e5e7eb);
208
+ color: var(--squisq-grid-text-muted, #6b7280);
209
+ font-size: 0.7rem;
210
+ font-style: italic;
211
+ }
212
+ .squisq-grid-filterinput:disabled {
213
+ background: var(--squisq-grid-row-hover, #f3f4f6);
214
+ color: var(--squisq-grid-text-muted, #6b7280);
215
+ font-style: italic;
216
+ cursor: default;
217
+ }
218
+ .squisq-grid-resizer {
219
+ position: absolute;
220
+ top: 0;
221
+ right: -3px;
222
+ width: 6px;
223
+ height: 100%;
224
+ cursor: col-resize;
225
+ z-index: 1;
226
+ }
227
+ .squisq-grid-resizer:hover {
228
+ background: var(--squisq-grid-resize-handle, #2563eb);
229
+ opacity: 0.5;
230
+ }
231
+ .squisq-grid-body {
232
+ position: relative;
233
+ width: max-content;
234
+ min-width: 100%;
235
+ }
236
+ .squisq-grid-row {
237
+ display: grid;
238
+ position: absolute;
239
+ top: 0;
240
+ left: 0;
241
+ width: max-content;
242
+ min-width: 100%;
243
+ }
244
+ .squisq-grid-row:hover .squisq-grid-cell {
245
+ background: var(--squisq-grid-row-hover, #f3f4f6);
246
+ }
247
+ .squisq-grid-cell {
248
+ padding: 4px 8px;
249
+ border-right: 1px solid var(--squisq-grid-border-subtle, #e5e7eb);
250
+ border-bottom: 1px solid var(--squisq-grid-border-subtle, #e5e7eb);
251
+ overflow: hidden;
252
+ text-overflow: ellipsis;
253
+ white-space: nowrap;
254
+ outline: none;
255
+ min-width: 0;
256
+ }
257
+ .squisq-grid-cell--num {
258
+ text-align: right;
259
+ font-variant-numeric: tabular-nums;
260
+ }
261
+ .squisq-grid-cell--selected,
262
+ .squisq-grid-row:hover .squisq-grid-cell--selected {
263
+ background: var(--squisq-grid-selection-bg, #eff6ff);
264
+ }
265
+ .squisq-grid-cell--focus {
266
+ box-shadow: inset 0 0 0 2px var(--squisq-grid-focus-ring, #2563eb);
267
+ }
268
+ .squisq-grid:not(:focus-within) .squisq-grid-cell--focus {
269
+ box-shadow: inset 0 0 0 2px var(--squisq-grid-border, #d1d5db);
270
+ }
271
+ .squisq-grid-cell--dirty {
272
+ box-shadow: inset 2px 0 0 0 var(--squisq-grid-dirty, #d97706);
273
+ }
274
+ .squisq-grid-cell--locked {
275
+ color: var(--squisq-grid-text-muted, #6b7280);
276
+ cursor: not-allowed;
277
+ }
278
+ .squisq-grid-cell--formula {
279
+ font-style: italic;
280
+ }
281
+ .squisq-grid-editor {
282
+ width: 100%;
283
+ height: 100%;
284
+ border: none;
285
+ outline: none;
286
+ font: inherit;
287
+ padding: 0;
288
+ background: var(--squisq-grid-input-bg, #ffffff);
289
+ color: var(--squisq-grid-text, #1f2937);
290
+ }
291
+ .squisq-grid-editor--error {
292
+ box-shadow: inset 0 0 0 2px var(--squisq-grid-error, #dc2626);
293
+ }
294
+ .squisq-grid-footer {
295
+ display: flex;
296
+ align-items: center;
297
+ gap: 12px;
298
+ padding: 4px 10px;
299
+ border-top: 1px solid var(--squisq-grid-border, #d1d5db);
300
+ background: var(--squisq-grid-header-bg, #f9fafb);
301
+ font-size: 0.74rem;
302
+ color: var(--squisq-grid-text-muted, #6b7280);
303
+ }
304
+ .squisq-grid-status {
305
+ flex: 1 1 auto;
306
+ overflow: hidden;
307
+ text-overflow: ellipsis;
308
+ white-space: nowrap;
309
+ }
310
+ .squisq-grid-refresh,
311
+ .squisq-grid-save,
312
+ .squisq-grid-discard {
313
+ border: 1px solid var(--squisq-grid-border, #d1d5db);
314
+ border-radius: 5px;
315
+ background: var(--squisq-grid-bg, #ffffff);
316
+ color: var(--squisq-grid-text, #1f2937);
317
+ font: inherit;
318
+ font-size: 0.72rem;
319
+ padding: 2px 8px;
320
+ cursor: pointer;
321
+ }
322
+ .squisq-grid-save {
323
+ background: var(--squisq-grid-accent, #2563eb);
324
+ border-color: var(--squisq-grid-accent, #2563eb);
325
+ color: var(--squisq-grid-text-on-accent, #ffffff);
326
+ }
327
+ .squisq-grid-save:disabled,
328
+ .squisq-grid-discard:disabled {
329
+ opacity: 0.6;
330
+ cursor: default;
331
+ }
332
+ .squisq-grid-dirtybar {
333
+ display: flex;
334
+ align-items: center;
335
+ gap: 8px;
336
+ color: var(--squisq-grid-dirty, #d97706);
337
+ font-weight: 600;
338
+ }
339
+ .squisq-grid-readonly {
340
+ font-style: italic;
341
+ }
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "@bendyline/squisq-grid-react",
3
+ "version": "2.11.0",
4
+ "description": "Virtualized data grid for squisq data sidecars: columnar worker store, TableQueryProvider, and a TanStack-Virtual React renderer",
5
+ "license": "MIT",
6
+ "author": "Bendyline",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/bendyline/squisq.git",
10
+ "directory": "packages/grid-react"
11
+ },
12
+ "homepage": "https://github.com/bendyline/squisq",
13
+ "keywords": [
14
+ "squisq",
15
+ "data-grid",
16
+ "react",
17
+ "virtualized",
18
+ "table",
19
+ "csv",
20
+ "xlsx"
21
+ ],
22
+ "type": "module",
23
+ "main": "./dist/index.js",
24
+ "module": "./dist/index.js",
25
+ "types": "./dist/index.d.ts",
26
+ "sideEffects": [
27
+ "**/*.css"
28
+ ],
29
+ "files": [
30
+ "dist",
31
+ "!dist/**/*.map",
32
+ "LICENSE",
33
+ "NOTICE.md",
34
+ "THIRD_PARTY_LICENSES.txt"
35
+ ],
36
+ "engines": {
37
+ "node": "^22.22.2 || ^24.15.0 || >=26.0.0"
38
+ },
39
+ "publishConfig": {
40
+ "access": "public"
41
+ },
42
+ "exports": {
43
+ ".": {
44
+ "types": "./dist/index.d.ts",
45
+ "import": "./dist/index.js",
46
+ "default": "./dist/index.js"
47
+ },
48
+ "./styles": "./dist/styles/index.css"
49
+ },
50
+ "scripts": {
51
+ "build": "tsup && node ../../scripts/build-styles.mjs && node ../../scripts/generate-bundle-licenses.mjs . && node ../../scripts/remove-empty-chunks.mjs dist",
52
+ "dev": "concurrently -n js,dts -c blue,gray -r \"tsup --watch --no-dts --no-clean\" \"tsup --watch --dts-only --no-clean\"",
53
+ "typecheck": "tsc --noEmit"
54
+ },
55
+ "dependencies": {
56
+ "@bendyline/squisq": "2.10.0",
57
+ "@tanstack/react-virtual": "3.14.10"
58
+ },
59
+ "peerDependencies": {
60
+ "react": "^18.0.0 || ^19.0.0",
61
+ "react-dom": "^18.0.0 || ^19.0.0"
62
+ },
63
+ "devDependencies": {
64
+ "@types/react": "18.3.28",
65
+ "@types/react-dom": "18.3.7",
66
+ "react": "18.3.1",
67
+ "react-dom": "18.3.1",
68
+ "tsup": "8.5.1",
69
+ "typescript": "5.9.3"
70
+ }
71
+ }