nk_jtb 0.27.0 → 0.27.1
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/.ai/skills/jtb-documentation/SKILL.md +9 -6
- package/AGENTS.md +4 -2
- package/CLAUDE.md +4 -2
- package/code-review-loaders-spinners-260514.md +104 -0
- package/dev.html +2 -57
- package/docs/components/loaders-and-spinners.md +85 -0
- package/docs/examples/showcase-ui.md +11 -0
- package/docs/jtb-status.md +2 -1
- package/docs/utilities/animation.md +81 -130
- package/index.html +311 -381
- package/jtb-conversion-notes.md +28 -0
- package/loaders_and_spinners.html +280 -0
- package/package.json +1 -1
- package/scripts/jtb-nav.json +16 -0
- package/skills-lock.json +1 -1
- package/src/build.scss +1 -0
- package/src/extras/_nk-docs.scss +8 -8
- package/src/utilities/_animation.scss +15 -73
- package/tasks.md +12 -2
- package/docs/review/animation.md +0 -130
|
@@ -15,23 +15,26 @@ precedence where they conflict.
|
|
|
15
15
|
|
|
16
16
|
Use for named structural classes such as `navbar`, `menu`, `bx`, or form controls.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
A class-based component has a named CSS class (e.g. `.spinner`, `.accordion`) that drives its core structure. A utility-based pattern achieves a similar result through composition of utility classes with no dedicated component class.
|
|
19
|
+
|
|
20
|
+
**Single-component page structure:**
|
|
19
21
|
|
|
20
22
|
1. One-line lead
|
|
21
23
|
2. `## Basic Usage` — minimum working markup
|
|
22
|
-
3. Additional
|
|
24
|
+
3. Additional `##` sections — simple to fuller usage
|
|
23
25
|
4. `## SCSS Variables` — if the component exposes overridable variables
|
|
24
|
-
5. `## Utility Examples` —
|
|
26
|
+
5. `## Utility Examples` — utility-based alternatives, always last
|
|
27
|
+
|
|
28
|
+
**Multi-component page:** repeat the same structure for each component, shifted down one heading level. The page title (`#`) becomes the group, each component becomes `##`, and its sections become `###`. A page with many components just repeats this pattern as many times as needed.
|
|
25
29
|
|
|
26
30
|
**Rules:**
|
|
27
31
|
|
|
28
32
|
- The lead describes purpose, not implementation. Do not mention specific CSS properties.
|
|
29
|
-
- Open
|
|
33
|
+
- Open Basic Usage with `Apply the [component class] to...` — directive, not descriptive.
|
|
30
34
|
- Component class examples use `class="bx example-jtb"`.
|
|
31
35
|
- Utility examples use `class="bx example-utils"`.
|
|
32
|
-
- Place
|
|
36
|
+
- Place SCSS Variables directly before Utility Examples.
|
|
33
37
|
- Link to `/docs/jtb/variable-system` for override instructions rather than explaining inline.
|
|
34
|
-
- `## Utility Examples` is always last. Lives in the component doc — not a separate file.
|
|
35
38
|
|
|
36
39
|
### Utility Documentation
|
|
37
40
|
|
package/AGENTS.md
CHANGED
|
@@ -200,8 +200,10 @@ follow the direction.
|
|
|
200
200
|
- Do not treat reading a `SKILL.md` file as a substitute for invoking the skill.
|
|
201
201
|
- When updating prompts, guidelines, or skills, first identify the project's
|
|
202
202
|
source-of-truth file before editing.
|
|
203
|
-
-
|
|
204
|
-
|
|
203
|
+
- Skills and guidelines are always edited via `.ai/` — never agent-managed
|
|
204
|
+
directories (`.claude/`, `.cursor/`, `.windsurf/`, etc.) directly.
|
|
205
|
+
- Check whether the `.ai/` entry is a local file or a symlink before editing.
|
|
206
|
+
If it is a symlink, follow it to the target and edit there.
|
|
205
207
|
- Do not update matching copies in parallel or alternate locations unless they
|
|
206
208
|
are the confirmed source of truth or the user explicitly asks.
|
|
207
209
|
- After changing project guidelines or adding/updating skills, run
|
package/CLAUDE.md
CHANGED
|
@@ -200,8 +200,10 @@ follow the direction.
|
|
|
200
200
|
- Do not treat reading a `SKILL.md` file as a substitute for invoking the skill.
|
|
201
201
|
- When updating prompts, guidelines, or skills, first identify the project's
|
|
202
202
|
source-of-truth file before editing.
|
|
203
|
-
-
|
|
204
|
-
|
|
203
|
+
- Skills and guidelines are always edited via `.ai/` — never agent-managed
|
|
204
|
+
directories (`.claude/`, `.cursor/`, `.windsurf/`, etc.) directly.
|
|
205
|
+
- Check whether the `.ai/` entry is a local file or a symlink before editing.
|
|
206
|
+
If it is a symlink, follow it to the target and edit there.
|
|
205
207
|
- Do not update matching copies in parallel or alternate locations unless they
|
|
206
208
|
are the confirmed source of truth or the user explicitly asks.
|
|
207
209
|
- After changing project guidelines or adding/updating skills, run
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Code Review — Loaders and Spinners
|
|
2
|
+
**Date:** 2026-05-14
|
|
3
|
+
**Scope:** Component review — loaders and spinners subsystem
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Scope Reviewed
|
|
8
|
+
|
|
9
|
+
- **Type:** Component/package review
|
|
10
|
+
- **Target:** `src/components/_loaders-and-spinners.scss`, `src/utilities/_animation.scss`, `docs/utilities/animation.md`, `docs/review/animation.md`
|
|
11
|
+
- **Coverage:** Full read of all four files; cross-referenced keyframe definitions against class usage
|
|
12
|
+
- **Exclusions:** No UI test harness or compiled output inspected
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Findings
|
|
17
|
+
|
|
18
|
+
### High — `@keyframes dots` is never defined; `.dots` animation is a no-op
|
|
19
|
+
|
|
20
|
+
- **Impact:** The animated dots in `.loader-container` (e.g. "Loading...") never animate — `animation: dots 1.5s steps(4, end) infinite` silently fails.
|
|
21
|
+
- **Evidence:** `_loaders-and-spinners.scss:54` references `animation: dots`. `_animation.scss` defines `spin`, `bounce`, `pulse-ring`, `pulse`, `checkmark`, `circle` — no `dots` keyframe exists anywhere in the codebase.
|
|
22
|
+
- **Fix:** Define `@keyframes dots` (typically stepping through `""`, `"."`, `".."`, `"..."` via `content`) in `_animation.scss` alongside the other keyframes.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
### High — `@keyframes ping` is never defined; `.animate-ping` is broken
|
|
27
|
+
|
|
28
|
+
- **Impact:** `.animate-ping` always resolves to `animation: none` and the `--animate-ping` CSS custom property is dead.
|
|
29
|
+
- **Evidence:** `_animation.scss:66` defines `--animate-ping: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite` and `_animation.scss:88–90` outputs the `.animate-ping` class, but no `@keyframes ping` exists in the file or anywhere else in `src/`.
|
|
30
|
+
- **Fix:** Add `@keyframes ping` (typically a scale-and-fade-out expanding ring) to `_animation.scss`, or remove `.animate-ping` and the `--animate-ping` custom property if ping is not planned.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
### Medium — `.loader-container .spinner` abandons the variable system with hardcoded values
|
|
35
|
+
|
|
36
|
+
- **Impact:** The nested `.spinner` is unaffected by `--size` or `--thickness`, so size variants (`sm`, `lg`, `thick`) do nothing inside a loader container. The two `.spinner` implementations are behaviourally inconsistent.
|
|
37
|
+
- **Evidence:** `_loaders-and-spinners.scss:32–39` — hardcoded `border: 4px solid`, `height: 60px`, `width: 60px`, `margin: 0 auto 20px` instead of `--size`/`--thickness`. The outer `.spinner` (lines 1–23) uses the variable system correctly.
|
|
38
|
+
- **Fix:** Remove the nested `.spinner` override; let the outer `.spinner` definition handle sizing, and rely on the `dark` context modifier or a wrapper class for colour changes rather than overriding the element entirely.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
### Medium — `.loading-text` and `.dots` use hardcoded px values and hex colours
|
|
43
|
+
|
|
44
|
+
- **Impact:** These values sit outside the framework variable and scale system, making them impossible to theme or override via custom properties.
|
|
45
|
+
- **Evidence:** `_loaders-and-spinners.scss:43–46` — `font-size: 18px`, `color: #fff`, `letter-spacing: 0.5px`; line 51 — `width: 20px`.
|
|
46
|
+
- **Fix:** Replace with framework scale references (e.g. `var(--fs-base)`, a color token or `currentColor`) and rem units.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
### Medium — `.spinner` uses physical `border-top` shorthand
|
|
51
|
+
|
|
52
|
+
- **Impact:** Breaks logical-property consistency; does not respect writing-mode.
|
|
53
|
+
- **Evidence:** `_loaders-and-spinners.scss:8` — `border-top: calc(var(--size) * var(--thickness)) solid #3498db`. CLAUDE.md requires logical properties (`border-block-start`) except in explicitly positioned contexts.
|
|
54
|
+
- **Fix:** Replace `border-top` with `border-block-start`.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
### Medium — Docs examples use class names that are not confirmed JTB utilities
|
|
59
|
+
|
|
60
|
+
- **Impact:** Examples may not render correctly and set misleading precedent for how the framework is used.
|
|
61
|
+
- **Evidence:** `docs/utilities/animation.md` lines 8–78 use: `rounded-full`, `space-x-05`, `opacity-0`, `opacity-30`, `opacity-80`, `overflow-hidden`, `items-center`, `w-full`, `h-2`, `h-full`, `font-semibold` — none of which appear in JTB docs or confirmed source files.
|
|
62
|
+
- **Fix:** Audit each class against JTB source; replace non-JTB classes with confirmed equivalents or extract to inline styles where no JTB utility exists.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
### Low — Large dead code block in `_animation.scss`
|
|
67
|
+
|
|
68
|
+
- **Impact:** Adds noise; the commented code differs from the live implementation, creating confusion about which version is canonical.
|
|
69
|
+
- **Evidence:** `_animation.scss:109–177` — three commented-out `.spinner` implementations spanning 68 lines.
|
|
70
|
+
- **Fix:** Delete the commented block. History is in git.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
### Low — `docs/utilities/animation.md` and `docs/review/animation.md` are identical
|
|
75
|
+
|
|
76
|
+
- **Impact:** Any update to one must be manually mirrored to the other; they will diverge.
|
|
77
|
+
- **Evidence:** Both files are byte-for-byte identical — same headings, same content, same `(review)` markers on every section heading.
|
|
78
|
+
- **Fix:** Delete `docs/review/animation.md` or make it a redirect/include. One source of truth.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
### Low — All section headings carry `(review)` markers; no content is marked final
|
|
83
|
+
|
|
84
|
+
- **Impact:** The docs page cannot be published or referenced as authoritative in its current state.
|
|
85
|
+
- **Evidence:** `docs/utilities/animation.md:1` — title is "Animation Utilities (review)"; every `##` heading appends `(review)`.
|
|
86
|
+
- **Fix:** Remove `(review)` markers as each section is confirmed; track incomplete sections explicitly.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
### Low — No dedicated loaders/spinners documentation page
|
|
91
|
+
|
|
92
|
+
- **Impact:** The `.spinner`, `.loader-container`, `.loading-text`, and `.dots` components are undiscoverable outside the animation utilities page. There is no entry in `docs/components/` for them, despite being defined as a named component file.
|
|
93
|
+
- **Evidence:** `docs/components/` has accordion, box, button, forms, list, menu, navbar, table — no loaders entry. The component is documented only as a subsection of `docs/utilities/animation.md`.
|
|
94
|
+
- **Fix:** Create `docs/components/loaders.md` covering the `.spinner` variants and `.loader-container` pattern, separate from the animation utility reference.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Maintainability Risk: **High**
|
|
99
|
+
|
|
100
|
+
Two broken animations (`dots`, `ping`), a nested component that silently overrides and breaks the variable system, and documentation that is unfinished and duplicated. The `.loader-container .spinner` inconsistency means any refactor of the variable approach requires tracking two divergent implementations.
|
|
101
|
+
|
|
102
|
+
## Cross-Boundary Coupling Risk: **Low**
|
|
103
|
+
|
|
104
|
+
The component is self-contained. The only cross-file dependency is `@keyframes spin` from `_animation.scss`, which is correctly defined.
|
package/dev.html
CHANGED
|
@@ -11,64 +11,9 @@
|
|
|
11
11
|
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
|
12
12
|
</head>
|
|
13
13
|
|
|
14
|
-
<body class="bg-
|
|
14
|
+
<body class="container py-5 bg-gray-200">
|
|
15
15
|
|
|
16
|
-
<style>
|
|
17
|
-
:root {
|
|
18
|
-
--primary: #6b1a3c;
|
|
19
|
-
--primary-hover: color-mix(in srgb, var(--primary), white 5%);
|
|
20
|
-
--primary-active: color-mix(in srgb, var(--primary), black 5%);
|
|
21
|
-
--primary-border: transparent;
|
|
22
|
-
--on-primary: #fff;
|
|
23
|
-
}
|
|
24
|
-
</style>
|
|
25
|
-
|
|
26
|
-
<section class="grid md:cols-2 gap-1">
|
|
27
|
-
<article class="bx flex-col md:flex-row p-0 overflow-hidden rounded-xl shadow-none bdr-stone-200">
|
|
28
|
-
<div class="h-8 md:h-auto md:w-8 md:min-w-8 bg-stone-300"></div>
|
|
29
|
-
<div class="flex-col flex-1 gap-075 pxy-1">
|
|
30
|
-
<span class="txt-primary txt-xs font-bold tracking-widest uppercase">Program</span>
|
|
31
|
-
<h3 class="font-serif txt-base font-bold lh-tight txt-stone-950">Ethics Program</h3>
|
|
32
|
-
<p class="txt-xs lh-relaxed txt-stone-700 flex-1">Two comprehensive courses equipping lactation professionals with practical skills in ethical decision-making and Code-compliant practice</p>
|
|
33
|
-
<a class="btn primary rounded-full w-full txt-xs">Enrol Now $154.00</a>
|
|
34
|
-
<a class="txt-primary txt-xs font-semibold">View Details →</a>
|
|
35
|
-
</div>
|
|
36
|
-
</article>
|
|
37
|
-
|
|
38
|
-
<article class="bx flex-col md:flex-row p-0 overflow-hidden rounded-xl shadow-none bdr-stone-200">
|
|
39
|
-
<div class="h-8 md:h-auto md:w-8 md:min-w-8 bg-stone-400"></div>
|
|
40
|
-
<div class="flex-col flex-1 gap-075 pxy-1">
|
|
41
|
-
<span class="txt-primary txt-xs font-bold tracking-widest uppercase">Program</span>
|
|
42
|
-
<h3 class="font-serif txt-base font-bold lh-tight txt-stone-950">Lactation Consultant Exam Prep Program</h3>
|
|
43
|
-
<p class="txt-xs lh-relaxed txt-stone-700 flex-1">13 targeted courses building core lactation science, clinical reasoning and exam strategy skills to help IBCLC candidates feel confident and ready to pass</p>
|
|
44
|
-
<a class="btn primary rounded-full w-full txt-xs">Enrol Now $1,200.00</a>
|
|
45
|
-
<a class="txt-primary txt-xs font-semibold">View Details →</a>
|
|
46
|
-
</div>
|
|
47
|
-
</article>
|
|
48
|
-
|
|
49
|
-
<article class="bx flex-col md:flex-row p-0 overflow-hidden rounded-xl shadow-none bdr-stone-200">
|
|
50
|
-
<div class="h-8 md:h-auto md:w-8 md:min-w-8 bg-stone-300"></div>
|
|
51
|
-
<div class="flex-col flex-1 gap-075 pxy-1">
|
|
52
|
-
<span class="txt-primary txt-xs font-bold tracking-widest uppercase">Program</span>
|
|
53
|
-
<h3 class="font-serif txt-base font-bold lh-tight txt-stone-950">Recertify, Renew, Refresh</h3>
|
|
54
|
-
<p class="txt-xs lh-relaxed txt-stone-700 flex-1">7 focused courses mapped to the IBCLC Detailed Content Outline to refresh knowledge, update evidence-based practice for recertification</p>
|
|
55
|
-
<a class="btn primary rounded-full w-full txt-xs">Enrol Now $385.00</a>
|
|
56
|
-
<a class="txt-primary txt-xs font-semibold">View Details →</a>
|
|
57
|
-
</div>
|
|
58
|
-
</article>
|
|
59
|
-
|
|
60
|
-
<article class="bx flex-col md:flex-row p-0 overflow-hidden rounded-xl shadow-none bdr-stone-200">
|
|
61
|
-
<div class="h-8 md:h-auto md:w-8 md:min-w-8 bg-emerald-200"></div>
|
|
62
|
-
<div class="flex-col flex-1 gap-075 pxy-1">
|
|
63
|
-
<span class="txt-primary txt-xs font-bold tracking-widest uppercase">Program</span>
|
|
64
|
-
<h3 class="font-serif txt-base font-bold lh-tight txt-stone-950">New Program Name</h3>
|
|
65
|
-
<p class="txt-xs lh-relaxed txt-stone-700 flex-1">Description text here for the new 4th program that your client wants to add to the page</p>
|
|
66
|
-
<a class="btn primary rounded-full w-full txt-xs">Enrol Now $XXX.00</a>
|
|
67
|
-
<a class="txt-primary txt-xs font-semibold">View Details →</a>
|
|
68
|
-
</div>
|
|
69
|
-
</article>
|
|
70
|
-
</section>
|
|
71
16
|
<script type="module" src="/main.js"></script>
|
|
72
17
|
</body>
|
|
73
18
|
|
|
74
|
-
</html>
|
|
19
|
+
</html>
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Loaders and Spinners
|
|
2
|
+
|
|
3
|
+
Page loaders and spinners to communicate in-progress and waiting states.
|
|
4
|
+
|
|
5
|
+
## Spinners
|
|
6
|
+
|
|
7
|
+
The `.spinner` class provides a CSS-only animated border spinner.
|
|
8
|
+
|
|
9
|
+
### Border Spinner
|
|
10
|
+
|
|
11
|
+
Apply the `.spinner` class to a `div` for an animated loading indicator.
|
|
12
|
+
|
|
13
|
+
#### Basic Usage
|
|
14
|
+
|
|
15
|
+
```html +demo-folded class="bx example-jtb" preview-class="flex-centered"
|
|
16
|
+
<div class="spinner"></div>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
#### Size
|
|
20
|
+
|
|
21
|
+
Add `.sm` or `.lg` to resize.
|
|
22
|
+
|
|
23
|
+
```html +demo-folded class="bx example-jtb" preview-class="flex-centered gap"
|
|
24
|
+
<div class="spinner sm"></div>
|
|
25
|
+
<div class="spinner"></div>
|
|
26
|
+
<div class="spinner lg"></div>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
#### Thickness
|
|
30
|
+
|
|
31
|
+
Add `.thick` to increase the border width. Combine with size modifiers.
|
|
32
|
+
|
|
33
|
+
```html +demo-folded class="bx example-jtb" preview-class="flex-centered gap"
|
|
34
|
+
<div class="spinner sm thick"></div>
|
|
35
|
+
<div class="spinner thick"></div>
|
|
36
|
+
<div class="spinner lg thick"></div>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Utility Examples
|
|
40
|
+
|
|
41
|
+
#### SVG Arc
|
|
42
|
+
|
|
43
|
+
```html +demo-folded class="bx example-utils" preview-class="flex-centered gap"
|
|
44
|
+
<svg class="animate-spin wh-5" viewBox="0 0 36 36">
|
|
45
|
+
<circle cx="18" cy="18" r="14" fill="none" stroke="currentColor" stroke-width="3" stroke-opacity="0.25" />
|
|
46
|
+
<circle cx="18" cy="18" r="14" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="butt" stroke-dasharray="22 66" />
|
|
47
|
+
</svg>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Use text color utilities to control the spinner color.
|
|
51
|
+
|
|
52
|
+
```html +demo-folded class="bx example-utils" preview-class="flex-centered gap"
|
|
53
|
+
<svg class="animate-spin wh-5 txt-blue" viewBox="0 0 36 36">
|
|
54
|
+
<circle cx="18" cy="18" r="14" fill="none" stroke="currentColor" stroke-width="3" stroke-opacity="0.25" />
|
|
55
|
+
<circle cx="18" cy="18" r="14" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="butt" stroke-dasharray="22 66" />
|
|
56
|
+
</svg>
|
|
57
|
+
<svg class="animate-spin wh-5 txt-blue-900" viewBox="0 0 36 36">
|
|
58
|
+
<circle cx="18" cy="18" r="14" fill="none" stroke="currentColor" stroke-width="3" stroke-opacity="0.25" />
|
|
59
|
+
<circle cx="18" cy="18" r="14" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="butt" stroke-dasharray="22 66" />
|
|
60
|
+
</svg>
|
|
61
|
+
<svg class="animate-spin wh-5 txt-orange-400" viewBox="0 0 36 36">
|
|
62
|
+
<circle cx="18" cy="18" r="14" fill="none" stroke="currentColor" stroke-width="3" stroke-opacity="0.25" />
|
|
63
|
+
<circle cx="18" cy="18" r="14" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="butt" stroke-dasharray="22 66" />
|
|
64
|
+
</svg>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Loader Container (review)
|
|
68
|
+
|
|
69
|
+
`.loader-container` centers a spinner and loading text as a column. For a
|
|
70
|
+
composed example see [UI Examples](/docs/jtb/examples/showcase-ui).
|
|
71
|
+
|
|
72
|
+
## CSS Custom Properties (review)
|
|
73
|
+
|
|
74
|
+
| Property | Default | Controls |
|
|
75
|
+
| ------------- | -------- | ------------------------------------ |
|
|
76
|
+
| `--size` | `2.5rem` | Spinner diameter |
|
|
77
|
+
| `--thickness` | `0.08` | Border width as a proportion of size |
|
|
78
|
+
|
|
79
|
+
Override on the element directly or scoped to a parent:
|
|
80
|
+
|
|
81
|
+
```html +code
|
|
82
|
+
<div class="spinner" style="--size: 4rem; --thickness: 0.12;"></div>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
See [Variable System](/docs/jtb/variable-system) for override instructions.
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# JTB UI Showcase
|
|
2
2
|
|
|
3
|
+
## Loaders
|
|
4
|
+
|
|
5
|
+
### Loader Container
|
|
6
|
+
|
|
7
|
+
```html +demo-folded class="bx dark"
|
|
8
|
+
<div class="loader-container">
|
|
9
|
+
<div class="spinner"></div>
|
|
10
|
+
<div class="loading-text">Loading<span class="dots"></span></div>
|
|
11
|
+
</div>
|
|
12
|
+
```
|
|
13
|
+
|
|
3
14
|
## Lists
|
|
4
15
|
|
|
5
16
|
### Checklist
|
package/docs/jtb-status.md
CHANGED
|
@@ -295,6 +295,7 @@ Files parked in `docs/review/` — purpose or audience unclear.
|
|
|
295
295
|
| `components/menu.md` | review | |
|
|
296
296
|
| `components/navbar.md` | review | |
|
|
297
297
|
| `components/table.md` | review | |
|
|
298
|
+
| `components/loaders-and-spinners.md` | partial | Border Spinner confirmed. Loader Container, CSS Custom Properties, SVG Arc utility example still pending. |
|
|
298
299
|
| `components/example-navigations.md` | stub | Bare HTML, no explanation |
|
|
299
300
|
|
|
300
301
|
### Utilities
|
|
@@ -303,7 +304,7 @@ Files parked in `docs/review/` — purpose or audience unclear.
|
|
|
303
304
|
| ------------------------------------- | ------ | --------------------------------------------------- |
|
|
304
305
|
| `utilities/border.md` | review | Border, outline, and divider utilities |
|
|
305
306
|
| `utilities/typography.md` | review | New — needs review pass |
|
|
306
|
-
| `utilities/animation.md` | review |
|
|
307
|
+
| `utilities/animation.md` | review | Rewritten — loader/spinner content moved to components/loaders-and-spinners.md |
|
|
307
308
|
| `utilities/display-and-visibility.md` | review | |
|
|
308
309
|
| `utilities/effects.md` | review | |
|
|
309
310
|
| `utilities/position.md` | review | |
|
|
@@ -1,130 +1,81 @@
|
|
|
1
|
-
# Animation Utilities
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
<div class="
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
<div class="loader-container bx dark">
|
|
84
|
-
<div class="spinner"></div>
|
|
85
|
-
<div class="loading-text">Loading<span class="dots"></span></div>
|
|
86
|
-
</div>
|
|
87
|
-
|
|
88
|
-
<div class="loader-container bx dark">
|
|
89
|
-
<div class="loading-text">Loading<span class="dots"></span></div>
|
|
90
|
-
</div>
|
|
91
|
-
|
|
92
|
-
## SVG Spinners (review)
|
|
93
|
-
|
|
94
|
-
<div class="bx flex va-c">
|
|
95
|
-
<svg class="wh-2 animate-spin" viewBox="0 0 200 200">
|
|
96
|
-
<circle cx="100" cy="100" r="80" fill="none" class="stroke-gray-400" stroke-width="12" />
|
|
97
|
-
<circle cx="100" cy="100" r="80" fill="none" class="stroke-gray-100" stroke-width="12" stroke-linecap="round" stroke-dasharray="251.2" stroke-dashoffset="188.4" />
|
|
98
|
-
</svg>
|
|
99
|
-
<svg class="wh-3 animate-spin" viewBox="0 0 200 200">
|
|
100
|
-
<circle cx="100" cy="100" r="80" fill="none" class="stroke-red-300" stroke-width="12" />
|
|
101
|
-
<circle cx="100" cy="100" r="80" fill="none" class="stroke-blue-500" stroke-width="12" stroke-linecap="round" stroke-dasharray="251.2" stroke-dashoffset="188.4" />
|
|
102
|
-
</svg>
|
|
103
|
-
<svg class="wh-4 animate-spin" viewBox="0 0 200 200">
|
|
104
|
-
<circle cx="100" cy="100" r="80" fill="none" class="stroke-yellow-300" stroke-width="12" />
|
|
105
|
-
<circle cx="100" cy="100" r="80" fill="none" class="stroke-green-500" stroke-width="12" stroke-linecap="round" stroke-dasharray="251.2" stroke-dashoffset="188.4" />
|
|
106
|
-
</svg>
|
|
107
|
-
</div>
|
|
108
|
-
|
|
109
|
-
## Border Animations (review)
|
|
110
|
-
|
|
111
|
-
### Spinner (review)
|
|
112
|
-
|
|
113
|
-
```html +demo-folded
|
|
114
|
-
<div class="dark flex-centered gap bx">
|
|
115
|
-
<div class="spinner sm"></div>
|
|
116
|
-
<div class="spinner"></div>
|
|
117
|
-
<div class="spinner lg"></div>
|
|
118
|
-
</div>
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
**Thick Spinners:**
|
|
122
|
-
|
|
123
|
-
```html +demo-folded
|
|
124
|
-
<div class="dark flex-centered gap bx">
|
|
125
|
-
<div class="spinner sm thick"></div>
|
|
126
|
-
<div class="spinner thick "></div>
|
|
127
|
-
<div class="spinner lg thick"></div>
|
|
128
|
-
</div>
|
|
129
|
-
```
|
|
130
|
-
|
|
1
|
+
# Animation Utilities
|
|
2
|
+
|
|
3
|
+
Utility classes for applying CSS animations.
|
|
4
|
+
|
|
5
|
+
| Class | Animation |
|
|
6
|
+
| --------------------- | ------------------- |
|
|
7
|
+
| `animate-spin` | Continuous rotation |
|
|
8
|
+
| `animate-bounce` | Vertical bounce |
|
|
9
|
+
| `animate-pulse` | Opacity fade |
|
|
10
|
+
| `animate-pulse-ring` | Expanding ring |
|
|
11
|
+
| `animate-ping` | Scale and fade out |
|
|
12
|
+
| `animate-checkmark` | SVG stroke draw-in |
|
|
13
|
+
| `animate-circle` | SVG stroke draw-in |
|
|
14
|
+
| `animate-none` | Removes animation |
|
|
15
|
+
|
|
16
|
+
## Spin (review)
|
|
17
|
+
|
|
18
|
+
Rotates an element continuously. Commonly used for loading indicators.
|
|
19
|
+
|
|
20
|
+
```html +demo-folded class="bx"
|
|
21
|
+
<div class="animate-spin wh-3 bdr-4 bdr-gray-200 bdr-t-blue-500 rounded-full"></div>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Bounce (review)
|
|
25
|
+
|
|
26
|
+
Applies a vertical bounce. Stagger `animation-delay` across sibling elements for
|
|
27
|
+
a sequential effect.
|
|
28
|
+
|
|
29
|
+
```html +demo-folded class="bx" preview-class="flex-centered gap-05"
|
|
30
|
+
<div class="wh-1 bg-blue-600 rounded-full animate-bounce" style="animation-delay: 0s;"></div>
|
|
31
|
+
<div class="wh-1 bg-blue-600 rounded-full animate-bounce" style="animation-delay: 0.1s;"></div>
|
|
32
|
+
<div class="wh-1 bg-blue-600 rounded-full animate-bounce" style="animation-delay: 0.2s;"></div>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Pulse (review)
|
|
36
|
+
|
|
37
|
+
Fades an element's opacity in and out. Use for skeleton loaders or ambient
|
|
38
|
+
status indicators.
|
|
39
|
+
|
|
40
|
+
```html +demo-folded class="bx"
|
|
41
|
+
<div class="wh-4 bg-teal-500 rounded-full animate-pulse"></div>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Pulse Ring (review)
|
|
45
|
+
|
|
46
|
+
Scales and fades an element outward to create an expanding ring effect. Use
|
|
47
|
+
`relative` positioning with overlapping siblings for layered rings.
|
|
48
|
+
|
|
49
|
+
```html +demo-folded class="bx"
|
|
50
|
+
<div class="relative">
|
|
51
|
+
<div class="wh-4 bg-emerald-500 rounded-full"></div>
|
|
52
|
+
<div class="absolute top-0 left-0 wh-4 bg-emerald-400 rounded-full animate-pulse-ring"></div>
|
|
53
|
+
<div class="absolute top-0 left-0 wh-4 bg-emerald-400 rounded-full animate-pulse-ring" style="animation-delay: 0.5s;"></div>
|
|
54
|
+
</div>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Ping (review)
|
|
58
|
+
|
|
59
|
+
Scales an element to twice its size while fading it out — a one-shot burst
|
|
60
|
+
effect. Commonly used as a notification indicator layered over a badge or dot.
|
|
61
|
+
|
|
62
|
+
```html +demo-folded class="bx"
|
|
63
|
+
<div class="relative">
|
|
64
|
+
<div class="wh-2 bg-red-500 rounded-full"></div>
|
|
65
|
+
<div class="absolute top-0 left-0 wh-2 bg-red-400 rounded-full animate-ping"></div>
|
|
66
|
+
</div>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## SVG Animations (review)
|
|
70
|
+
|
|
71
|
+
`animate-circle` draws a circular stroke in from nothing to full.
|
|
72
|
+
`animate-checkmark` does the same for a path. Both classes set `stroke-dasharray`
|
|
73
|
+
and animate `stroke-dashoffset`. The SVG path or circle length must be no greater
|
|
74
|
+
than the class's `stroke-dasharray` value (166 for circle, 100 for checkmark).
|
|
75
|
+
|
|
76
|
+
```html +demo-folded class="bx"
|
|
77
|
+
<svg viewBox="0 0 52 52" class="wh-4 txt-green-600" fill="none">
|
|
78
|
+
<circle cx="26" cy="26" r="25" stroke="currentColor" stroke-width="2" class="animate-circle" />
|
|
79
|
+
<path d="M14 27l8 8 16-16" stroke="currentColor" stroke-width="2" class="animate-checkmark" />
|
|
80
|
+
</svg>
|
|
81
|
+
```
|