@astronox/core 0.4.2 → 0.4.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astronox/core",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Reusable Astro components, patterns, styles, and infrastructure for AstroNox sites.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -55,6 +55,23 @@ const stateMessage =
55
55
  data-tooltip-boundary
56
56
  data-tone={dataTone}
57
57
  >
58
+ <div
59
+ class="table-body__initial-skeleton"
60
+ data-table-initial-skeleton
61
+ aria-hidden="true"
62
+ >
63
+ {
64
+ columns.map((column) => (
65
+ <div
66
+ class="table-skeleton__cell"
67
+ data-align={getTableColumnAlignment(column)}
68
+ data-table-column-role={column.role}
69
+ >
70
+ <span class="table-skeleton__placeholder" />
71
+ </div>
72
+ ))
73
+ }
74
+ </div>
58
75
  <table class="table-body__table">
59
76
  <caption class="table-body__visually-hidden">{caption}</caption>
60
77
  <thead class="table-body__visually-hidden">
@@ -7,6 +7,23 @@
7
7
  border-block-start: 0;
8
8
  }
9
9
 
10
+ .table-body__initial-skeleton {
11
+ display: none;
12
+ min-width: 0;
13
+ min-height: var(--table-row-min-block-size);
14
+ grid-template-columns: var(--table-column-template);
15
+ }
16
+
17
+ [data-nox-table-enhanced]
18
+ .table:is(
19
+ [data-table-loading-state='pending'],
20
+ [data-table-loading-state='refreshing']
21
+ )
22
+ .table-body:not(:has(.table-skeleton__row))
23
+ > .table-body__initial-skeleton {
24
+ display: grid;
25
+ }
26
+
10
27
  .table-skeleton__row + .table-skeleton__row,
11
28
  [data-nox-table-enhanced]
12
29
  .table[data-table-loading-state='appending']
@@ -80,6 +97,11 @@
80
97
  min-height: var(--table-index-row-block-size);
81
98
  }
82
99
 
100
+ .table[data-table-layout='index'] .table-body__initial-skeleton {
101
+ block-size: var(--table-index-row-block-size);
102
+ min-height: var(--table-index-row-block-size);
103
+ }
104
+
83
105
  @media (prefers-reduced-motion: no-preference) {
84
106
  .table-skeleton__placeholder {
85
107
  animation: table-skeleton-pulse 1.4s ease-in-out infinite;
@@ -97,7 +119,8 @@
97
119
  }
98
120
 
99
121
  @container (width < 36rem) {
100
- .table-skeleton__row {
122
+ .table-skeleton__row,
123
+ .table-body__initial-skeleton {
101
124
  min-height: var(--table-row-narrow-min-block-size);
102
125
  }
103
126
  }