@gridkitjs/theme-tailwind 0.3.0 → 0.3.1
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 +61 -0
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
|
}
|