@gridkitjs/theme-css 0.0.0-dev-20261118223155 → 0.0.0-dev-20261119132858

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 +86 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridkitjs/theme-css",
3
- "version": "0.0.0-dev-20261118223155",
3
+ "version": "0.0.0-dev-20261119132858",
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
@@ -345,9 +345,11 @@
345
345
  * The rows' rowgroup. As wide as its table, and never narrower than the
346
346
  * scroll area, so its box covers every row however far the area scrolls
347
347
  * sideways; and at least `height` tall, so under a few rows the space
348
- * down to the footer is the body's.
348
+ * down to the footer is the body's. Positioned, as the box the loading
349
+ * overlay covers.
349
350
  */
350
351
  .gridkit-data-grid-body {
352
+ position: relative;
351
353
  width: max-content;
352
354
  min-width: 100%;
353
355
  min-height: var(--gridkit-body-height, 0);
@@ -1075,6 +1077,86 @@
1075
1077
  text-align: center;
1076
1078
  }
1077
1079
 
1080
+ /*
1081
+ * The message standing in for the rows of an empty grid. Padding lives on
1082
+ * the content rather than the cell, as the group label's does. The content
1083
+ * sticks to the start edge and is as wide as the scroll area's inside
1084
+ * (`--gridkit-empty-width`, set by the grid), or the cell if that is
1085
+ * narrower, so it stays in view and centred however far a wide grid
1086
+ * scrolls sideways.
1087
+ */
1088
+ .gridkit-data-grid .gridkit-grid-empty-cell {
1089
+ padding: 0;
1090
+ }
1091
+
1092
+ .gridkit-data-grid .gridkit-grid-empty-content {
1093
+ position: sticky;
1094
+ inset-inline-start: 0;
1095
+ width: min(100%, var(--gridkit-empty-width, 100%));
1096
+ min-height: calc(var(--gridkit-spacing) * 24);
1097
+ display: flex;
1098
+ flex-direction: column;
1099
+ align-items: center;
1100
+ justify-content: center;
1101
+ gap: calc(var(--gridkit-spacing) * 2);
1102
+ padding: calc(var(--gridkit-spacing) * 4) var(--gridkit-cell-padding-x);
1103
+ color: var(--gridkit-fg-muted);
1104
+ text-align: center;
1105
+ }
1106
+
1107
+ /*
1108
+ * The layer over the body while the grid is loading: translucent, so the
1109
+ * rows beneath stay in view and in place, and catching the pointer, so
1110
+ * they take no clicks. Above the pinned cells (1, and before it in the
1111
+ * document) and under the header and footer (2), which the rows scroll
1112
+ * under.
1113
+ *
1114
+ * The content sticks under the header at the start edge, as wide as the
1115
+ * scroll area's inside (`--gridkit-loading-width`, set by the grid) and,
1116
+ * with `height`, as tall as the rows' part of it, so the message stays
1117
+ * centred in the rows in view however the body scrolls. Over a body with
1118
+ * no rows (`.is-empty`) the layer is in the flow instead, as tall as the
1119
+ * empty message, which takes its place when loading ends.
1120
+ */
1121
+ .gridkit-data-grid-body .gridkit-grid-loading-overlay {
1122
+ position: absolute;
1123
+ inset: 0;
1124
+ z-index: 1;
1125
+ background-color: color-mix(
1126
+ in oklab,
1127
+ var(--gridkit-surface) 70%,
1128
+ transparent
1129
+ );
1130
+ }
1131
+
1132
+ .gridkit-data-grid-body .gridkit-grid-loading-overlay.is-empty {
1133
+ position: relative;
1134
+ }
1135
+
1136
+ .gridkit-data-grid-body .gridkit-grid-loading-overlay-content {
1137
+ position: sticky;
1138
+ inset-block-start: var(--gridkit-header-height, 0px);
1139
+ inset-inline-start: 0;
1140
+ width: min(100%, var(--gridkit-loading-width, 100%));
1141
+ height: min(100%, var(--gridkit-body-height, 100%));
1142
+ display: flex;
1143
+ flex-direction: column;
1144
+ align-items: center;
1145
+ justify-content: center;
1146
+ gap: calc(var(--gridkit-spacing) * 2);
1147
+ padding: calc(var(--gridkit-spacing) * 4) var(--gridkit-cell-padding-x);
1148
+ color: var(--gridkit-fg);
1149
+ font-weight: 500;
1150
+ text-align: center;
1151
+ }
1152
+
1153
+ .gridkit-data-grid-body
1154
+ .gridkit-grid-loading-overlay.is-empty
1155
+ .gridkit-grid-loading-overlay-content {
1156
+ height: auto;
1157
+ min-height: calc(var(--gridkit-spacing) * 24);
1158
+ }
1159
+
1078
1160
  /*
1079
1161
  * Indents only the first cell, matching how `GridGroupRow`'s own
1080
1162
  * `paddingInlineStart` indents just the one spanning cell it has — an
@@ -2617,7 +2699,9 @@
2617
2699
 
2618
2700
  .gridkit-data-grid-viewport .gridkit-data-grid-header,
2619
2701
  .gridkit-data-grid-viewport .gridkit-data-grid-footer,
2620
- .gridkit-data-grid-viewport .gridkit-grid-group-cell-content {
2702
+ .gridkit-data-grid-viewport .gridkit-grid-group-cell-content,
2703
+ .gridkit-data-grid-viewport .gridkit-grid-empty-content,
2704
+ .gridkit-data-grid-viewport .gridkit-grid-loading-overlay-content {
2621
2705
  position: static;
2622
2706
  }
2623
2707