@gopherium/godmin 0.3.0 → 0.5.0

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/README.md CHANGED
@@ -145,15 +145,15 @@ label through a visually hidden status region, so give `label` the same
145
145
  sentence you would have rendered as text.
146
146
 
147
147
  ```tsx
148
- if (report.data === undefined) {
149
- return <LoadingScreen label="Loading the report." />
148
+ if (reports.isPending) {
149
+ return <LoadingRows label="Loading reports." rows={8} />
150
150
  }
151
-
152
- {reports.isPending ? <LoadingRows label="Loading reports." rows={8} /> : <ReportTable />}
151
+ return <ReportTable className="godmin-arrival" />
153
152
  ```
154
153
 
155
- A ghost appears only after a short delay, so a load that resolves quickly
156
- shows nothing at all rather than a flash.
154
+ A ghost fades in after a short delay, so a fast load never shows one.
155
+ Give the content that replaces a ghost the `godmin-arrival` class and it
156
+ fades in too, so the swap reads as one motion rather than a snap.
157
157
 
158
158
  `base.css` also ships `godmin-empty`, `godmin-form`, `godmin-table` and
159
159
  `godmin-table-scroll`. The last two go together: a table wider than a phone
package/dist/base.css CHANGED
@@ -155,11 +155,20 @@ body {
155
155
  .godmin-loading-screen,
156
156
  .godmin-loading-rows {
157
157
  opacity: 0;
158
- animation: godmin-loading-appear var(--wpds-motion-duration-md)
159
- var(--wpds-motion-easing-balanced) 200ms forwards;
158
+ animation: godmin-fade-in var(--wpds-motion-duration-md)
159
+ var(--wpds-motion-easing-balanced) 150ms forwards;
160
160
  }
161
161
 
162
- @keyframes godmin-loading-appear {
162
+ .godmin-arrival {
163
+ animation: godmin-fade-in var(--wpds-motion-duration-md)
164
+ var(--wpds-motion-easing-balanced);
165
+ }
166
+
167
+ @keyframes godmin-fade-in {
168
+ 0% {
169
+ opacity: 0;
170
+ }
171
+
163
172
  100% {
164
173
  opacity: 1;
165
174
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gopherium/godmin",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "The admin kit for Gopherium projects: host layer for React admin applications on the WordPress Design System.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",