@gridkitjs/theme-tailwind 0.3.0 → 0.3.2
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/package.json +1 -1
- package/src/styles.css +76 -1
package/package.json
CHANGED
package/src/styles.css
CHANGED
|
@@ -277,6 +277,67 @@
|
|
|
277
277
|
opacity: 0;
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
+
/*
|
|
281
|
+
* Docked to the header's own right edge, absolutely — like the resize
|
|
282
|
+
* handle, and for the same reason: sitting in the label's normal flow, a
|
|
283
|
+
* long label under `text-overflow: ellipsis` pushes the toggle out past
|
|
284
|
+
* where `overflow: hidden` clips it, leaving it unclickable (a real click
|
|
285
|
+
* there lands on the header cell instead and selects the column). Docked
|
|
286
|
+
* to a fixed offset, it stays inside the clipped area — and clear of the
|
|
287
|
+
* resize handle's own 6px strip at `right: 0`, so a resizable, sortable
|
|
288
|
+
* column keeps two independent hit targets rather than one shadowing the
|
|
289
|
+
* other.
|
|
290
|
+
*/
|
|
291
|
+
.gridkit-data-grid .header-sort-toggle {
|
|
292
|
+
display: inline-flex;
|
|
293
|
+
position: absolute;
|
|
294
|
+
top: 50%;
|
|
295
|
+
right: 0.75rem;
|
|
296
|
+
transform: translateY(-50%);
|
|
297
|
+
align-items: center;
|
|
298
|
+
gap: 0.125rem;
|
|
299
|
+
cursor: pointer;
|
|
300
|
+
color: var(--gridkit-fg-muted);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.gridkit-data-grid .header-sort-toggle svg {
|
|
304
|
+
width: 14px;
|
|
305
|
+
height: 14px;
|
|
306
|
+
flex-shrink: 0;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/*
|
|
310
|
+
* Hidden until the column has a direction or the header is hovered or
|
|
311
|
+
* focused — an unsorted, un-hovered header stays quiet, the same restraint
|
|
312
|
+
* `.header-resize-grip` uses.
|
|
313
|
+
*/
|
|
314
|
+
.gridkit-data-grid
|
|
315
|
+
.header-sort-toggle:not(.is-sorted-asc):not(.is-sorted-desc) {
|
|
316
|
+
opacity: 0;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.gridkit-data-grid .grid-header .header-cell:hover .header-sort-toggle,
|
|
320
|
+
.gridkit-data-grid .header-cell:focus-visible .header-sort-toggle {
|
|
321
|
+
opacity: 1;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.gridkit-data-grid .header-sort-toggle.is-sorted-asc,
|
|
325
|
+
.gridkit-data-grid .header-sort-toggle.is-sorted-desc {
|
|
326
|
+
opacity: 1;
|
|
327
|
+
color: var(--gridkit-accent);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/* One chevron covers both directions; `desc` is `asc` turned upside down. */
|
|
331
|
+
.gridkit-data-grid .header-sort-toggle.is-sorted-desc svg {
|
|
332
|
+
transform: rotate(180deg);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.gridkit-data-grid .header-sort-priority {
|
|
336
|
+
font-size: 0.625rem;
|
|
337
|
+
font-weight: 700;
|
|
338
|
+
line-height: 1;
|
|
339
|
+
}
|
|
340
|
+
|
|
280
341
|
.gridkit-data-grid:not(.no-hover-columns) .grid-header .header-cell:hover {
|
|
281
342
|
background-color: var(--gridkit-surface-muted);
|
|
282
343
|
}
|
|
@@ -351,6 +412,15 @@
|
|
|
351
412
|
border-bottom: 1px solid var(--gridkit-line);
|
|
352
413
|
}
|
|
353
414
|
|
|
415
|
+
/*
|
|
416
|
+
* The last row's bottom edge has no row below it to collapse with, so
|
|
417
|
+
* unlike every internal boundary it is a genuinely extra pixel — the same
|
|
418
|
+
* reason `borders-vertical` drops its `:last-child` border-right below.
|
|
419
|
+
*/
|
|
420
|
+
.gridkit-data-grid.borders-horizontal .grid-row:last-child .grid-cell {
|
|
421
|
+
border-bottom: none;
|
|
422
|
+
}
|
|
423
|
+
|
|
354
424
|
/* Vertical borders */
|
|
355
425
|
.gridkit-data-grid.borders-vertical .grid-header .header-cell,
|
|
356
426
|
.gridkit-data-grid.borders-vertical .grid-cell {
|
|
@@ -365,7 +435,8 @@
|
|
|
365
435
|
/* Borders on all sides */
|
|
366
436
|
.gridkit-data-grid.borders-all .grid-header .header-cell,
|
|
367
437
|
.gridkit-data-grid.borders-all .grid-cell {
|
|
368
|
-
border: 1px solid var(--gridkit-line);
|
|
438
|
+
border-bottom: 1px solid var(--gridkit-line);
|
|
439
|
+
border-right: 1px solid var(--gridkit-line);
|
|
369
440
|
}
|
|
370
441
|
|
|
371
442
|
/*
|
|
@@ -382,4 +453,8 @@
|
|
|
382
453
|
.gridkit-data-grid.borders-all .grid-cell:last-child {
|
|
383
454
|
border-right: none;
|
|
384
455
|
}
|
|
456
|
+
|
|
457
|
+
.gridkit-data-grid.borders-all .grid-row:last-child .grid-cell {
|
|
458
|
+
border-bottom: none;
|
|
459
|
+
}
|
|
385
460
|
}
|