@gridkitjs/theme-css 0.0.0-dev-20261112201151 → 0.0.0-dev-20261118115237

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/styles.css +150 -25
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridkitjs/theme-css",
3
- "version": "0.0.0-dev-20261112201151",
3
+ "version": "0.0.0-dev-20261118115237",
4
4
  "description": "Plain-CSS theme for GridKit — palette tokens, dark mode and grid styles, no Tailwind needed.",
5
5
  "license": "MIT",
6
6
  "author": "Blagoja Blazhevski",
package/src/styles.css CHANGED
@@ -444,7 +444,7 @@
444
444
  .gridkit-data-grid .gridkit-header-resize-handle {
445
445
  position: absolute;
446
446
  top: 0;
447
- right: 0;
447
+ inset-inline-end: 0;
448
448
  bottom: 0;
449
449
  width: 6px;
450
450
  cursor: col-resize;
@@ -456,7 +456,7 @@
456
456
  /*
457
457
  * A resize colours the edge being dragged on every cell in the column, so it
458
458
  * reads as one line down the grid rather than a stack of outlined cells.
459
- * `box-shadow` rather than `border-right`: under `borders="none"` there is no
459
+ * `box-shadow` rather than a border: under `borders="none"` there is no
460
460
  * border to recolour, and adding one would shift the cell's content by a
461
461
  * pixel mid-drag.
462
462
  */
@@ -466,6 +466,13 @@
466
466
  var(--gridkit-hover-line);
467
467
  }
468
468
 
469
+ /* A shadow's offset is physical, so right-to-left moves it to the left edge. */
470
+ .gridkit-data-grid .gridkit-header-cell.is-resizing:dir(rtl),
471
+ .gridkit-data-grid .gridkit-grid-cell.is-resizing:dir(rtl) {
472
+ box-shadow: inset var(--gridkit-indicator-width) 0 0 0
473
+ var(--gridkit-hover-line);
474
+ }
475
+
469
476
  /*
470
477
  * The grid is one tab stop and the arrow keys move within it, so the focused
471
478
  * cell is the only sign of where that stop currently is — without this ring a
@@ -525,6 +532,7 @@
525
532
  .gridkit-data-grid.gridkit-drag-ghost {
526
533
  position: fixed;
527
534
  top: 0;
535
+ /* Physical in either direction: the transform is a viewport x from the left. */
528
536
  left: 0;
529
537
  z-index: 50;
530
538
  padding: var(--gridkit-header-padding-y) var(--gridkit-header-padding-x);
@@ -567,14 +575,24 @@
567
575
  var(--gridkit-accent);
568
576
  }
569
577
 
578
+ /* Mirrored for the resize line's reason: a shadow's offset is physical. */
579
+ .gridkit-data-grid .gridkit-header-cell.is-drop-before:dir(rtl) {
580
+ box-shadow: inset calc(var(--gridkit-indicator-width) * -1) 0 0 0
581
+ var(--gridkit-accent);
582
+ }
583
+
584
+ .gridkit-data-grid .gridkit-header-cell.is-drop-after:dir(rtl) {
585
+ box-shadow: inset var(--gridkit-indicator-width) 0 0 0 var(--gridkit-accent);
586
+ }
587
+
570
588
  /*
571
- * Docked to the header's own right edge, absolutely — like the resize
589
+ * Docked to the header's own inline-end edge, absolutely — like the resize
572
590
  * handle, and for the same reason: sitting in the label's normal flow, a
573
591
  * long label under `text-overflow: ellipsis` pushes the toggle out past
574
592
  * where `overflow: hidden` clips it, leaving it unclickable (a real click
575
593
  * there lands on the header cell instead and selects the column). Docked
576
594
  * to a fixed offset, it stays inside the clipped area — and clear of the
577
- * resize handle's own 6px strip at `right: 0`, so a resizable, sortable
595
+ * resize handle's own 6px strip at the inline end, so a resizable, sortable
578
596
  * column keeps two independent hit targets rather than one shadowing the
579
597
  * other.
580
598
  */
@@ -582,7 +600,7 @@
582
600
  display: inline-flex;
583
601
  position: absolute;
584
602
  top: 50%;
585
- right: calc(var(--gridkit-spacing) * 3);
603
+ inset-inline-end: calc(var(--gridkit-spacing) * 3);
586
604
  transform: translateY(-50%);
587
605
  align-items: center;
588
606
  gap: calc(var(--gridkit-spacing) * 0.5);
@@ -647,7 +665,7 @@
647
665
  display: inline-flex;
648
666
  align-items: center;
649
667
  vertical-align: middle;
650
- margin-right: calc(var(--gridkit-spacing) * 1.5);
668
+ margin-inline-end: calc(var(--gridkit-spacing) * 1.5);
651
669
  cursor: pointer;
652
670
  color: var(--gridkit-fg-muted);
653
671
  }
@@ -689,7 +707,7 @@
689
707
  display: inline-flex;
690
708
  position: absolute;
691
709
  top: 50%;
692
- right: calc(var(--gridkit-spacing) * 3);
710
+ inset-inline-end: calc(var(--gridkit-spacing) * 3);
693
711
  transform: translateY(-50%);
694
712
  align-items: center;
695
713
  cursor: pointer;
@@ -728,7 +746,96 @@
728
746
  .gridkit-header-cell:has(> .gridkit-header-filter-toggle)
729
747
  .gridkit-header-sort-toggle {
730
748
  /* The filter button's offset and width, then a gap. */
731
- right: calc(var(--gridkit-spacing) * 4.5 + var(--gridkit-header-icon-size));
749
+ inset-inline-end: calc(
750
+ var(--gridkit-spacing) * 4.5 + var(--gridkit-header-icon-size)
751
+ );
752
+ }
753
+
754
+ /*
755
+ * A screen that cannot hover never brings the header's toggles out, so
756
+ * there they show at rest, still told apart by colour and fill once the
757
+ * column is sorted, filtered or grouped.
758
+ */
759
+ @media (hover: none) {
760
+ .gridkit-data-grid
761
+ .gridkit-header-sort-toggle:not(.is-sorted-asc):not(.is-sorted-desc),
762
+ .gridkit-data-grid .gridkit-header-filter-toggle:not(.is-filtered),
763
+ .gridkit-data-grid .gridkit-header-group-toggle:not(.is-grouped) {
764
+ opacity: 1;
765
+ }
766
+ }
767
+
768
+ /*
769
+ * A finger needs 24 by 24 pixels to land on, WCAG 2.2's minimum target.
770
+ * Each toggle grows its box by padding around an unchanged icon, and the
771
+ * ones docked to the inline end move inward to sit side by side, clear of
772
+ * the resize handle, which widens to the same 24 pixels. The handle draws
773
+ * nothing of its own, so the line a resize colours stays on the column's
774
+ * edge.
775
+ */
776
+ @media (pointer: coarse) {
777
+ .gridkit-data-grid .gridkit-header-resize-handle {
778
+ width: 24px;
779
+ }
780
+
781
+ .gridkit-data-grid .gridkit-header-sort-toggle,
782
+ .gridkit-data-grid .gridkit-header-filter-toggle,
783
+ .gridkit-data-grid .gridkit-header-group-toggle {
784
+ box-sizing: border-box;
785
+ min-width: 24px;
786
+ min-height: 24px;
787
+ justify-content: center;
788
+ padding: max(0px, calc((24px - var(--gridkit-header-icon-size)) / 2));
789
+ }
790
+
791
+ .gridkit-data-grid .gridkit-header-sort-toggle,
792
+ .gridkit-data-grid .gridkit-header-filter-toggle {
793
+ inset-inline-end: 24px;
794
+ }
795
+
796
+ .gridkit-data-grid
797
+ .gridkit-header-cell:has(> .gridkit-header-filter-toggle)
798
+ .gridkit-header-sort-toggle {
799
+ inset-inline-end: 48px;
800
+ }
801
+
802
+ /*
803
+ * A touch screen shows the docked toggles at rest, where they would sit
804
+ * over the label, so the label keeps clear of them and is cut short
805
+ * instead.
806
+ */
807
+ .gridkit-data-grid
808
+ .gridkit-grid-header
809
+ .gridkit-header-cell:has(> .gridkit-header-sort-toggle),
810
+ .gridkit-data-grid
811
+ .gridkit-grid-header
812
+ .gridkit-header-cell:has(> .gridkit-header-filter-toggle) {
813
+ padding-inline-end: 48px;
814
+ }
815
+
816
+ .gridkit-data-grid
817
+ .gridkit-grid-header
818
+ .gridkit-header-cell:has(> .gridkit-header-sort-toggle):has(
819
+ > .gridkit-header-filter-toggle
820
+ ) {
821
+ padding-inline-end: 72px;
822
+ }
823
+
824
+ /* Grown into the header's padding, so the label stays where it was. */
825
+ .gridkit-data-grid .gridkit-header-group-toggle {
826
+ margin-block: min(
827
+ 0px,
828
+ calc((var(--gridkit-header-icon-size) - 24px) / 2)
829
+ );
830
+ margin-inline-start: min(
831
+ 0px,
832
+ calc((var(--gridkit-header-icon-size) - 24px) / 2)
833
+ );
834
+ margin-inline-end: calc(
835
+ var(--gridkit-spacing) * 1.5 +
836
+ min(0px, calc((var(--gridkit-header-icon-size) - 24px) / 2))
837
+ );
838
+ }
732
839
  }
733
840
 
734
841
  .gridkit-data-grid .gridkit-grid-cell {
@@ -797,16 +904,17 @@
797
904
  font-weight: var(--gridkit-group-font-weight);
798
905
  }
799
906
 
800
- /* A right-pointing triangle that rotates open on expand. */
907
+ /* A triangle pointing to the inline end that rotates open on expand. */
801
908
  .gridkit-data-grid .gridkit-grid-group-row .gridkit-group-toggle {
802
909
  display: inline-block;
803
910
  flex-shrink: 0;
804
911
  width: 0;
805
912
  height: 0;
806
913
  border-style: solid;
807
- border-width: calc(var(--gridkit-icon-size) / 4) 0
808
- calc(var(--gridkit-icon-size) / 4) calc(var(--gridkit-icon-size) * 0.4);
809
- border-color: transparent transparent transparent var(--gridkit-fg-muted);
914
+ border-block-width: calc(var(--gridkit-icon-size) / 4);
915
+ border-inline-width: calc(var(--gridkit-icon-size) * 0.4) 0;
916
+ border-color: transparent;
917
+ border-inline-start-color: var(--gridkit-fg-muted);
810
918
  transition: transform var(--gridkit-transition-duration) ease;
811
919
  }
812
920
 
@@ -814,6 +922,13 @@
814
922
  transform: rotate(90deg);
815
923
  }
816
924
 
925
+ /* Pointing left, the triangle turns the other way to point down. */
926
+ .gridkit-data-grid
927
+ .gridkit-grid-group-row
928
+ .gridkit-group-toggle.is-expanded:dir(rtl) {
929
+ transform: rotate(-90deg);
930
+ }
931
+
817
932
  /*
818
933
  * Set on the rule rather than on `--gridkit-transition-duration`, so a
819
934
  * theme's own duration can't bring the motion back.
@@ -994,7 +1109,7 @@
994
1109
  /*
995
1110
  * The last row's bottom edge has no row below it to collapse with, so
996
1111
  * unlike every internal boundary it is a genuinely extra line — the same
997
- * reason `gridkit-borders-vertical` drops its `:last-child` border-right below.
1112
+ * reason `gridkit-borders-vertical` drops its `:last-child` end border below.
998
1113
  * Matched against both row kinds: the last rendered row can just as well
999
1114
  * be a collapsed group header as a data row.
1000
1115
  */
@@ -1017,8 +1132,8 @@
1017
1132
  .gridkit-data-grid.gridkit-borders-vertical .gridkit-grid-cell,
1018
1133
  .gridkit-data-grid.gridkit-borders-vertical .gridkit-grid-footer-cell,
1019
1134
  .gridkit-data-grid.gridkit-borders-vertical .gridkit-grid-group-summary-cell {
1020
- border-right: var(--gridkit-column-line-width) var(--gridkit-border-style)
1021
- var(--gridkit-line);
1135
+ border-inline-end: var(--gridkit-column-line-width)
1136
+ var(--gridkit-border-style) var(--gridkit-line);
1022
1137
  }
1023
1138
 
1024
1139
  .gridkit-data-grid.gridkit-borders-vertical
@@ -1029,7 +1144,7 @@
1029
1144
  .gridkit-grid-footer-cell:last-child,
1030
1145
  .gridkit-data-grid.gridkit-borders-vertical
1031
1146
  .gridkit-grid-group-summary-cell:last-child {
1032
- border-right: none;
1147
+ border-inline-end: none;
1033
1148
  }
1034
1149
 
1035
1150
  /* Borders on all sides */
@@ -1041,17 +1156,17 @@
1041
1156
  .gridkit-data-grid.gridkit-borders-all .gridkit-grid-group-summary-cell {
1042
1157
  border-bottom: var(--gridkit-row-line-width) var(--gridkit-border-style)
1043
1158
  var(--gridkit-line);
1044
- border-right: var(--gridkit-column-line-width) var(--gridkit-border-style)
1045
- var(--gridkit-line);
1159
+ border-inline-end: var(--gridkit-column-line-width)
1160
+ var(--gridkit-border-style) var(--gridkit-line);
1046
1161
  }
1047
1162
 
1048
1163
  .gridkit-data-grid.gridkit-borders-all .gridkit-grid-footer-cell {
1049
- border-right: var(--gridkit-column-line-width) var(--gridkit-border-style)
1050
- var(--gridkit-line);
1164
+ border-inline-end: var(--gridkit-column-line-width)
1165
+ var(--gridkit-border-style) var(--gridkit-line);
1051
1166
  }
1052
1167
 
1053
1168
  /*
1054
- * The outer left/right edges have no neighbouring cell to collapse with, so
1169
+ * The outer start and end edges have no neighbouring cell to collapse with, so
1055
1170
  * unlike every internal boundary they are a genuinely extra line — without
1056
1171
  * this the table would render two lines wider than the sum of its columns. A
1057
1172
  * group cell is both its row's first and last child at once (it is the
@@ -1065,7 +1180,7 @@
1065
1180
  .gridkit-data-grid.gridkit-borders-all .gridkit-grid-footer-cell:first-child,
1066
1181
  .gridkit-data-grid.gridkit-borders-all
1067
1182
  .gridkit-grid-group-summary-cell:first-child {
1068
- border-left: none;
1183
+ border-inline-start: none;
1069
1184
  }
1070
1185
 
1071
1186
  .gridkit-data-grid.gridkit-borders-all
@@ -1076,7 +1191,7 @@
1076
1191
  .gridkit-data-grid.gridkit-borders-all .gridkit-grid-footer-cell:last-child,
1077
1192
  .gridkit-data-grid.gridkit-borders-all
1078
1193
  .gridkit-grid-group-summary-cell:last-child {
1079
- border-right: none;
1194
+ border-inline-end: none;
1080
1195
  }
1081
1196
 
1082
1197
  .gridkit-data-grid.gridkit-borders-all
@@ -1326,13 +1441,13 @@
1326
1441
  }
1327
1442
 
1328
1443
  .gridkit-group-by-chip.is-drop-before::before {
1329
- left: calc(
1444
+ inset-inline-start: calc(
1330
1445
  var(--gridkit-spacing) * -1 - var(--gridkit-indicator-width) / 2
1331
1446
  );
1332
1447
  }
1333
1448
 
1334
1449
  .gridkit-group-by-chip.is-drop-after::after {
1335
- right: calc(
1450
+ inset-inline-end: calc(
1336
1451
  var(--gridkit-spacing) * -1 - var(--gridkit-indicator-width) / 2
1337
1452
  );
1338
1453
  }
@@ -1346,6 +1461,7 @@
1346
1461
  .gridkit-group-by-chip.gridkit-drag-ghost {
1347
1462
  position: fixed;
1348
1463
  top: 0;
1464
+ /* Physical for the header ghost's reason. */
1349
1465
  left: 0;
1350
1466
  z-index: 50;
1351
1467
  border: var(--gridkit-border-width) dashed var(--gridkit-accent);
@@ -1678,6 +1794,10 @@
1678
1794
  color: var(--gridkit-fg-muted);
1679
1795
  }
1680
1796
 
1797
+ .gridkit-menu-submenu-indicator:dir(rtl) svg {
1798
+ transform: scaleX(-1);
1799
+ }
1800
+
1681
1801
  .gridkit-menu-separator {
1682
1802
  height: var(--gridkit-border-width);
1683
1803
  margin: var(--gridkit-spacing) 0;
@@ -2030,6 +2150,11 @@
2030
2150
  margin-inline-start: auto;
2031
2151
  }
2032
2152
 
2153
+ .gridkit-filter-menu-submenu-indicator:dir(rtl) svg,
2154
+ .gridkit-filter-menu-back-icon:dir(rtl) svg {
2155
+ transform: scaleX(-1);
2156
+ }
2157
+
2033
2158
  .gridkit-filter-menu-search {
2034
2159
  box-sizing: border-box;
2035
2160
  width: 100%;