loading-state-zoo 0.1.2 → 0.2.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/dist/index.cjs +111 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -3
- package/dist/index.d.ts +15 -3
- package/dist/index.js +111 -30
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +111 -30
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +59 -1
- package/dist/react.d.ts +59 -1
- package/dist/react.js +111 -30
- package/dist/react.js.map +1 -1
- package/dist/theme.css +142 -0
- package/docs/components.json +119 -1
- package/package.json +1 -1
package/docs/components.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$comment": "loading-state-zoo v0.
|
|
3
|
+
"$comment": "loading-state-zoo v0.2.0 — machine-readable spec. Source of truth for all 21 components. Defaults match the rendered site.",
|
|
4
4
|
"package": {
|
|
5
5
|
"name": "loading-state-zoo",
|
|
6
|
+
"version": "0.2.0",
|
|
6
7
|
"entrypoints": {
|
|
7
8
|
"webComponents": "loading-state-zoo",
|
|
8
9
|
"react": "loading-state-zoo/react",
|
|
@@ -201,6 +202,33 @@
|
|
|
201
202
|
"react": "<DotGridWave rows={4} cols={6} size={8} gap={14} />"
|
|
202
203
|
}
|
|
203
204
|
},
|
|
205
|
+
{
|
|
206
|
+
"id": "ellipsis",
|
|
207
|
+
"tag": "lz-ellipsis",
|
|
208
|
+
"reactComponent": "Ellipsis",
|
|
209
|
+
"category": "Dots",
|
|
210
|
+
"role": "status",
|
|
211
|
+
"description": "Three periods appearing in a typing rhythm.",
|
|
212
|
+
"useCases": ["chat", "messaging", "text queues"],
|
|
213
|
+
"defaults": { "size": 8, "color": "#f5f5f7", "speed": 1 },
|
|
214
|
+
"attributes": [
|
|
215
|
+
{ "name": "size", "reactProp": "size", "type": "number", "unit": "px", "default": 8 },
|
|
216
|
+
{ "name": "color", "reactProp": "color", "type": "string", "default": "#f5f5f7" },
|
|
217
|
+
{ "name": "speed", "reactProp": "speed", "type": "number", "default": 1 }
|
|
218
|
+
],
|
|
219
|
+
"cssVars": [
|
|
220
|
+
{ "name": "--lz-size", "default": "8px", "purpose": "Dot diameter" },
|
|
221
|
+
{ "name": "--lz-color", "default": "#f5f5f7", "purpose": "Dot color" }
|
|
222
|
+
],
|
|
223
|
+
"keyframeVars": [
|
|
224
|
+
{ "name": "--lz-ellipsis-min", "default": "0.8", "purpose": "Resting dot scale" },
|
|
225
|
+
{ "name": "--lz-ellipsis-fade", "default": "0.15", "purpose": "Resting dot opacity" }
|
|
226
|
+
],
|
|
227
|
+
"examples": {
|
|
228
|
+
"html": "<lz-ellipsis size=\"10\" color=\"#0a84ff\"></lz-ellipsis>",
|
|
229
|
+
"react": "<Ellipsis size={10} color=\"#0a84ff\" />"
|
|
230
|
+
}
|
|
231
|
+
},
|
|
204
232
|
{
|
|
205
233
|
"id": "arc-spinner",
|
|
206
234
|
"tag": "lz-arc-spinner",
|
|
@@ -471,6 +499,37 @@
|
|
|
471
499
|
"react": "<ProgressRing percent={65} size={56} strokeWidth={6} color=\"#0a84ff\" />"
|
|
472
500
|
}
|
|
473
501
|
},
|
|
502
|
+
{
|
|
503
|
+
"id": "progress-bar",
|
|
504
|
+
"tag": "lz-progress-bar",
|
|
505
|
+
"reactComponent": "ProgressBar",
|
|
506
|
+
"category": "Bars & rings",
|
|
507
|
+
"role": "progressbar",
|
|
508
|
+
"description": "A determinate linear progress bar filling to a driven percentage.",
|
|
509
|
+
"useCases": ["uploads", "downloads", "known percent tasks"],
|
|
510
|
+
"defaults": { "width": 160, "height": 6, "percent": 0, "color": "#f5f5f7", "speed": 1 },
|
|
511
|
+
"attributes": [
|
|
512
|
+
{ "name": "width", "reactProp": "width", "type": "number", "unit": "px", "default": 160 },
|
|
513
|
+
{ "name": "height", "reactProp": "height", "type": "number", "unit": "px", "default": 6 },
|
|
514
|
+
{ "name": "percent", "reactProp": "percent", "type": "number", "unit": "0-100", "default": 0 },
|
|
515
|
+
{ "name": "color", "reactProp": "color", "type": "string", "default": "#f5f5f7" },
|
|
516
|
+
{ "name": "track-color", "reactProp": "trackColor", "type": "string", "default": "rgba(255,255,255,0.15)" },
|
|
517
|
+
{ "name": "speed", "reactProp": "speed", "type": "number", "default": 1 }
|
|
518
|
+
],
|
|
519
|
+
"cssVars": [
|
|
520
|
+
{ "name": "--lz-width", "default": "160px", "purpose": "Bar width" },
|
|
521
|
+
{ "name": "--lz-height", "default": "6px", "purpose": "Bar thickness" },
|
|
522
|
+
{ "name": "--lz-color", "default": "#f5f5f7", "purpose": "Fill color" },
|
|
523
|
+
{ "name": "--lz-track", "default": "rgba(255,255,255,0.15)", "purpose": "Track color" },
|
|
524
|
+
{ "name": "--lz-percent", "default": "0", "purpose": "Fill percent number" }
|
|
525
|
+
],
|
|
526
|
+
"keyframeVars": [],
|
|
527
|
+
"a11y": "role=progressbar, aria-valuenow/min/max updated with percent",
|
|
528
|
+
"examples": {
|
|
529
|
+
"html": "<lz-progress-bar percent=\"65\" width=\"220\" height=\"8\" color=\"#0a84ff\"></lz-progress-bar>",
|
|
530
|
+
"react": "<ProgressBar percent={65} width={220} height={8} color=\"#0a84ff\" />"
|
|
531
|
+
}
|
|
532
|
+
},
|
|
474
533
|
{
|
|
475
534
|
"id": "indeterminate-progress-bar",
|
|
476
535
|
"tag": "lz-indeterminate-progress-bar",
|
|
@@ -528,6 +587,65 @@
|
|
|
528
587
|
"html": "<lz-skeleton-shimmer width=\"240\" height=\"24\"></lz-skeleton-shimmer>",
|
|
529
588
|
"react": "<SkeletonShimmer width={240} height={24} />"
|
|
530
589
|
}
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
"id": "skeleton-card",
|
|
593
|
+
"tag": "lz-skeleton-card",
|
|
594
|
+
"reactComponent": "SkeletonCard",
|
|
595
|
+
"category": "Skeletons",
|
|
596
|
+
"role": "status",
|
|
597
|
+
"description": "A composite card skeleton with an avatar circle and text lines under one shared sheen.",
|
|
598
|
+
"useCases": ["profile cards", "feed items", "user rows"],
|
|
599
|
+
"defaults": { "width": 200, "height": 64, "speed": 1 },
|
|
600
|
+
"attributes": [
|
|
601
|
+
{ "name": "width", "reactProp": "width", "type": "number", "unit": "px", "default": 200 },
|
|
602
|
+
{ "name": "height", "reactProp": "height", "type": "number", "unit": "px", "default": 64 },
|
|
603
|
+
{ "name": "track-color", "reactProp": "trackColor", "type": "string", "default": "#1c1c1e" },
|
|
604
|
+
{ "name": "speed", "reactProp": "speed", "type": "number", "default": 1 }
|
|
605
|
+
],
|
|
606
|
+
"cssVars": [
|
|
607
|
+
{ "name": "--lz-width", "default": "200px", "purpose": "Card width" },
|
|
608
|
+
{ "name": "--lz-height", "default": "64px", "purpose": "Card height" },
|
|
609
|
+
{ "name": "--lz-surface", "default": "#1c1c1e", "purpose": "Block background" },
|
|
610
|
+
{ "name": "--lz-radius", "default": "10px", "purpose": "Corner radius" }
|
|
611
|
+
],
|
|
612
|
+
"keyframeVars": [
|
|
613
|
+
{ "name": "--lz-sheen-from", "default": "-120%", "purpose": "Sheen start" },
|
|
614
|
+
{ "name": "--lz-sheen-to", "default": "220%", "purpose": "Sheen end" }
|
|
615
|
+
],
|
|
616
|
+
"examples": {
|
|
617
|
+
"html": "<lz-skeleton-card width=\"240\" height=\"72\"></lz-skeleton-card>",
|
|
618
|
+
"react": "<SkeletonCard width={240} height={72} />"
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
"id": "skeleton-list",
|
|
623
|
+
"tag": "lz-skeleton-list",
|
|
624
|
+
"reactComponent": "SkeletonList",
|
|
625
|
+
"category": "Skeletons",
|
|
626
|
+
"role": "status",
|
|
627
|
+
"description": "Repeated list rows with avatars and text lines under one shared sheen.",
|
|
628
|
+
"useCases": ["chat lists", "inbox rows", "search results"],
|
|
629
|
+
"defaults": { "width": 180, "rows": 4, "speed": 1 },
|
|
630
|
+
"attributes": [
|
|
631
|
+
{ "name": "width", "reactProp": "width", "type": "number", "unit": "px", "default": 180 },
|
|
632
|
+
{ "name": "rows", "reactProp": "rows", "type": "number", "unit": "rows", "default": 4 },
|
|
633
|
+
{ "name": "track-color", "reactProp": "trackColor", "type": "string", "default": "#1c1c1e" },
|
|
634
|
+
{ "name": "speed", "reactProp": "speed", "type": "number", "default": 1 }
|
|
635
|
+
],
|
|
636
|
+
"cssVars": [
|
|
637
|
+
{ "name": "--lz-width", "default": "180px", "purpose": "List width" },
|
|
638
|
+
{ "name": "--lz-surface", "default": "#1c1c1e", "purpose": "Block background" },
|
|
639
|
+
{ "name": "--lz-radius", "default": "10px", "purpose": "Corner radius" }
|
|
640
|
+
],
|
|
641
|
+
"keyframeVars": [
|
|
642
|
+
{ "name": "--lz-sheen-from", "default": "-120%", "purpose": "Sheen start" },
|
|
643
|
+
{ "name": "--lz-sheen-to", "default": "220%", "purpose": "Sheen end" }
|
|
644
|
+
],
|
|
645
|
+
"examples": {
|
|
646
|
+
"html": "<lz-skeleton-list width=\"220\" rows=\"5\"></lz-skeleton-list>",
|
|
647
|
+
"react": "<SkeletonList width={220} rows={5} />"
|
|
648
|
+
}
|
|
531
649
|
}
|
|
532
650
|
]
|
|
533
651
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "loading-state-zoo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "17 smooth, transform-only loading patterns as framework-agnostic web components with a thin React wrapper. Works in React, plain web, iOS and Android WebViews.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|