nk_jtb 0.22.0 → 0.24.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/.ai/guidelines/jtb-framework.md +55 -0
- package/.ai/prompts/create-documentation.md +7 -0
- package/.ai/prompts/jtb-code-review.md +65 -0
- package/.ai/prompts/jtb-review-component.md +47 -0
- package/.ai/prompts/jtb-review-documentation.md +93 -0
- package/.ai/prompts/misc.md +18 -0
- package/.ai/skills/jtb-conversion/SKILL.md +76 -0
- package/.ai/skills/jtb-documentation/SKILL.md +174 -0
- package/.ai/skills/jtb-layout/SKILL.md +92 -0
- package/.ai/skills/scss-engineer/SKILL.md +16 -0
- package/.markdownlint.json +6 -0
- package/.stylelintrc.json +16 -16
- package/CLAUDE.md +144 -0
- package/docs/animation.md +130 -131
- package/docs/api/architecture-naming.md +7 -6
- package/docs/api/build-classes.md +12 -11
- package/docs/api/make-from-breakpoint.md +8 -7
- package/docs/api/make-on-breakpoint.md +8 -7
- package/docs/api/make-position-based-class.md +9 -8
- package/docs/api/make-single-property-class.md +10 -9
- package/docs/api/make-themes.md +3 -3
- package/docs/api/make-to-breakpoint.md +8 -7
- package/docs/api/makers.md +3 -2
- package/docs/api/variables.md +34 -0
- package/docs/api/workflow.md +12 -16
- package/{jtb-for review/aria.md → docs/aria.md} +192 -192
- package/docs/automatic-spacing.md +97 -97
- package/docs/components/accordion.md +12 -12
- package/docs/components/box.md +139 -0
- package/docs/components/button.md +86 -54
- package/docs/components/forms.md +279 -281
- package/docs/components/list.md +99 -0
- package/docs/{navigation → components}/menu.md +54 -104
- package/docs/components/navbar.md +164 -0
- package/docs/{navigation → components}/overview.md +16 -11
- package/docs/{navigation → components}/pagination.md +88 -90
- package/docs/components/table.md +10 -10
- package/docs/conventions-and-architecture-rules.md +183 -0
- package/docs/core-architecture.md +114 -114
- package/docs/design-decisions.md +155 -0
- package/docs/developer-responsive-class-generation.md +284 -0
- package/docs/display-and-visibility.md +56 -56
- package/docs/examples/form-examples.md +7 -10
- package/docs/examples/layout-dashboard.md +8 -5
- package/docs/examples/responsive-design-patterns.md +69 -0
- package/docs/examples/ui-elements.md +85 -113
- package/docs/installation.md +18 -36
- package/docs/introduction.md +43 -61
- package/docs/layer-system.md +99 -0
- package/docs/layouts-and-structures.md +92 -0
- package/docs/magic-classes.md +61 -100
- package/{jtb-for review/margin-padding-spacing.md → docs/margin-padding-spacing.md} +86 -86
- package/docs/quick-reference.md +89 -0
- package/{jtb-for review/resolvers.md → docs/resolvers.md} +92 -92
- package/docs/responsive-design.md +111 -185
- package/docs/responsive-testing.html +228 -0
- package/docs/responsive-testing.md +2 -1
- package/docs/showcase-typography.md +108 -0
- package/docs/showcase-ui.md +38 -0
- package/{jtb-for review/state-management.md → docs/state-management.md} +81 -80
- package/docs/{color-and-themes.md → themes.md} +118 -103
- package/docs/utilities/animation.md +130 -131
- package/docs/utilities/border.md +134 -181
- package/docs/utilities/display-and-visibility.md +56 -56
- package/docs/utilities/effects.md +28 -28
- package/docs/utilities/position.md +105 -0
- package/docs/utilities/transforms.md +90 -0
- package/docs/utilities/typography.md +195 -0
- package/docs/variable-system.md +58 -0
- package/docs-main.js +9 -0
- package/docs.html +20 -0
- package/framework-status.md +325 -0
- package/index.html +1 -49
- package/main.js +12 -21
- package/opencode.json +8 -0
- package/package.json +19 -15
- package/postcss.config.js +22 -0
- package/prompt.md +0 -2
- package/readme.md +15 -65
- package/scripts/ai-sync.js +210 -0
- package/{js → scripts}/markdown-renderer.js +4 -3
- package/scripts/nav.json +70 -0
- package/{js → scripts}/navigation.js +7 -9
- package/skills-lock.json +20 -0
- package/src/base/_auto-spacing.scss +44 -44
- package/src/base/_base.scss +203 -202
- package/src/base/_root.scss +54 -113
- package/src/base/_table.scss +1 -1
- package/src/base/_typography.scss +3 -4
- package/src/base/index.scss +5 -5
- package/src/build.scss +13 -1
- package/src/components/_accordion.scss +94 -94
- package/src/components/_badge.scss +29 -0
- package/src/components/_banner.scss +17 -17
- package/src/components/_box.scss +8 -7
- package/src/components/_button.scss +37 -19
- package/src/components/_dropdown.scss +46 -46
- package/src/components/_icon.scss +1 -1
- package/src/components/_list.scss +29 -31
- package/src/components/_loaders-and-spinners.scss +57 -57
- package/src/components/_menu.scss +128 -89
- package/src/components/_navbar.scss +24 -26
- package/src/components/_other.scss +1 -1
- package/src/components/_tabs.scss +37 -37
- package/src/components/index.scss +13 -12
- package/src/extras/_hero.scss +33 -34
- package/src/extras/_nk-app.scss +65 -83
- package/src/extras/_nk-docs.scss +84 -86
- package/src/extras/choices.scss +410 -410
- package/src/forms/_control.scss +16 -5
- package/src/forms/_file.scss +19 -19
- package/src/forms/_form.scss +90 -90
- package/src/forms/_toggle.scss +87 -88
- package/src/forms/index.scss +3 -3
- package/src/functions/_classes.scss +254 -240
- package/src/functions/_color-functions.scss +18 -18
- package/src/functions/_helpers.scss +12 -12
- package/src/functions/_map-and-list-helpers.scss +162 -158
- package/src/functions/_resolvers.scss +50 -28
- package/src/functions/_strings.scss +165 -164
- package/src/maps_and_variables/_base.scss +61 -14
- package/src/maps_and_variables/_colors.scss +37 -297
- package/src/maps_and_variables/_components.scss +100 -148
- package/src/maps_and_variables/_config.scss +56 -50
- package/src/maps_and_variables/_forms.scss +21 -13
- package/src/maps_and_variables/_typography.scss +50 -8
- package/src/maps_and_variables/_value-maps.scss +16 -7
- package/src/maps_and_variables/index.scss +7 -8
- package/src/mixins/_backgrounds.scss +26 -25
- package/src/mixins/_breakpoint-utilities.scss +86 -0
- package/src/mixins/_build-magic-classes.scss +122 -111
- package/src/mixins/_build-magic-grid.scss +54 -88
- package/src/mixins/_gradients.scss +82 -82
- package/src/mixins/_magic-shared.scss +67 -0
- package/src/mixins/_media-container-queries.scss +120 -200
- package/src/mixins/_themes.scss +11 -8
- package/src/mixins/_transition.scss +91 -82
- package/src/mixins/build-system/_breakpoint-handlers.scss +100 -0
- package/src/mixins/build-system/_controllers.scss +77 -0
- package/src/mixins/build-system/_helpers.scss +20 -0
- package/src/mixins/build-system/_layers.scss +136 -0
- package/src/mixins/build-system/_make-classes.scss +127 -0
- package/src/mixins/{_make-properties.scss → build-system/_make-properties.scss} +36 -32
- package/src/{functions → mixins/build-system}/_normalise-config.scss +59 -55
- package/src/play.scss +19 -36
- package/src/utilities/_alignment.scss +72 -68
- package/src/utilities/_animation.scss +177 -177
- package/src/utilities/_backgrounds.scss +3 -7
- package/src/utilities/_border.scss +16 -5
- package/src/utilities/_container.scss +16 -15
- package/src/utilities/_display-visibility.scss +11 -27
- package/src/utilities/_effects.scss +18 -23
- package/src/utilities/_flexbox.scss +59 -58
- package/src/utilities/_gradients.scss +6 -4
- package/src/utilities/_grid.scss +3 -8
- package/src/utilities/_interactivity.scss +18 -15
- package/src/utilities/_layout.scss +24 -21
- package/src/utilities/_magic-classes.scss +30 -0
- package/src/utilities/_misc.scss +100 -95
- package/src/utilities/_sizing.scss +4 -1
- package/src/utilities/_spacing.scss +4 -6
- package/src/utilities/_themes.scss +18 -20
- package/src/utilities/_transforms.scss +48 -36
- package/src/utilities/_transition.scss +51 -48
- package/src/utilities/_typography.scss +37 -39
- package/src/utilities.scss +21 -0
- package/vite.config.js +6 -0
- package/.github/copilot-instructions.md +0 -71
- package/docs/conventions.md +0 -205
- package/docs/examples/navbar.md +0 -52
- package/docs/examples/navigation.md +0 -0
- package/docs/examples/page-layouts-and-structures.md +0 -153
- package/docs/faqs.md +0 -25
- package/docs/navigation/navbar.md +0 -123
- package/docs/wip.md +0 -447
- package/js/nav.json +0 -154
- package/jtb-for review/alignment.md +0 -36
- package/jtb-for review/directory-structure.md +0 -141
- package/jtb-for review/utility-and-class-generation.md +0 -942
- package/src/common-tools.scss +0 -12
- package/src/maps_and_variables/_property-maps.scss +0 -60
- package/src/mixins/_build-classes.scss +0 -299
- package/src/mixins/_make-classes-old.scss +0 -279
- package/src/mixins/_make-classes.scss +0 -187
- package/tw.html +0 -16
- /package/docs/{navigation → components}/example-navigations.md +0 -0
- /package/{js → scripts}/markdown-loader.js +0 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# NK JTB Framework
|
|
2
|
+
|
|
3
|
+
NK JTB (NayKel Just the Basics) is a utility-based SCSS/CSS framework — a
|
|
4
|
+
lightweight Tailwind-like alternative. Components provide structure; utilities
|
|
5
|
+
add styling.
|
|
6
|
+
|
|
7
|
+
> JTB follows similar principles to Tailwind but has different naming
|
|
8
|
+
> conventions and uses logical properties. Always refer to JTB documentation for
|
|
9
|
+
> correct scales, breakpoints, and class names. Tailwind values are intent
|
|
10
|
+
> references only — never direct mappings.
|
|
11
|
+
|
|
12
|
+
## Naming Conventions
|
|
13
|
+
|
|
14
|
+
- **Numbers = rem** — `m-1` = 1rem, `p-2` = 2rem, `gap-05` = 0.5rem (sub-1
|
|
15
|
+
values drop the leading zero and decimal)
|
|
16
|
+
- **Property = class name** — use `relative`, `sticky`, `flex` directly. Never
|
|
17
|
+
`position-relative` or `display-flex`
|
|
18
|
+
- **Axis modifiers** — `-t`, `-b`, `-l`, `-r`, `-x`, `-y` map to logical
|
|
19
|
+
properties internally (e.g. `-t` → `block-start`, `-l` → `inline-start`)
|
|
20
|
+
- **Context-aware modifiers** — `.primary`, `.xs`, `.rounded` adapt to their
|
|
21
|
+
component. Use `<button class="btn primary">` not `.btn-primary`
|
|
22
|
+
- **Logical properties by default** — use logical properties
|
|
23
|
+
(`margin-inline-start`) not physical (`margin-left`). Physical properties only
|
|
24
|
+
in explicitly positioned contexts
|
|
25
|
+
|
|
26
|
+
## Responsive Prefixes
|
|
27
|
+
|
|
28
|
+
Three distinct prefix types — do not substitute one for another:
|
|
29
|
+
|
|
30
|
+
- **`{bp}:`** (e.g. `md:flex`) — applies from breakpoint upward. Primary pattern
|
|
31
|
+
for progressive layout and styling
|
|
32
|
+
- **`to-{bp}:`** (e.g. `to-md:hidden`) — applies below breakpoint. Use for
|
|
33
|
+
visibility windows
|
|
34
|
+
- **`on-{bp}:`** (e.g. `on-md:hidden`) — applies only within that breakpoint
|
|
35
|
+
range, non-cascading. Use for exact-range targeting
|
|
36
|
+
|
|
37
|
+
`on-` and `to-` are only generated for `display` and `visibility` utilities —
|
|
38
|
+
this is intentional. Use mixins for custom responsive behavior on other
|
|
39
|
+
properties.
|
|
40
|
+
|
|
41
|
+
## Auto Spacing
|
|
42
|
+
|
|
43
|
+
The framework automatically adds `margin-block-start` between content elements.
|
|
44
|
+
Do not manually add top margins between standard content elements — the spacing
|
|
45
|
+
system handles it. Elements inside flex or grid containers have margins reset;
|
|
46
|
+
use `gap` instead.
|
|
47
|
+
|
|
48
|
+
## Prohibited Patterns
|
|
49
|
+
|
|
50
|
+
- `@import` — use `@use` / `@forward`
|
|
51
|
+
- Component-specific modifiers like `.btn-primary` — use `<button class="btn
|
|
52
|
+
primary">`
|
|
53
|
+
- Hardcoded values — use variables
|
|
54
|
+
- Deep nesting — maximum 3 levels
|
|
55
|
+
- `!important` — never use
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Create documentation for the `[component].scss` component, following the conventions and architecture rules defined in the JTB documentation.
|
|
2
|
+
|
|
3
|
+
Invoke the `jtb-documentation` skill before starting. Read these in full first
|
|
4
|
+
— these define what is correct:
|
|
5
|
+
|
|
6
|
+
- `introduction.md`
|
|
7
|
+
- `docs/conventions-and-architecture-rules.md`
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Review the code changes for the NK JTB SCSS framework.
|
|
2
|
+
|
|
3
|
+
Invoke the `jtb-documentation` skill before starting.
|
|
4
|
+
|
|
5
|
+
## Guidelines
|
|
6
|
+
|
|
7
|
+
- **Framework Alignment:** Ensure all code strictly follows JTB conventions,
|
|
8
|
+
naming, and architecture. Do not use Tailwind or other frameworks as reference
|
|
9
|
+
for implementation details.
|
|
10
|
+
- **Directory Structure:** Verify files are placed in the correct directories
|
|
11
|
+
(`base`, `components`, `forms`, `utilities`, `mixins`, `functions`,
|
|
12
|
+
`maps_and_variables`).
|
|
13
|
+
- **Import Rules:** Only `@use` and `@forward` are permitted. `@import` is
|
|
14
|
+
prohibited.
|
|
15
|
+
- **Component Structure:** Components should provide structure only, not
|
|
16
|
+
decoration. Styling must be handled by utilities.
|
|
17
|
+
- **Modifiers:** Only use context-aware modifiers (e.g., `.primary`), never
|
|
18
|
+
component-specific ones (e.g., `.btn-primary`).
|
|
19
|
+
- **Variables:** All values must use variables or maps — no hardcoded values.
|
|
20
|
+
- **Nesting:** No selector nesting deeper than 3 levels.
|
|
21
|
+
- **Override Order:** Confirm the import order: base → components → forms →
|
|
22
|
+
utilities.
|
|
23
|
+
- **Documentation:** All new or changed code must be documented using JTB
|
|
24
|
+
documentation conventions. Drafts go in `docs-for-review/`, finalized docs
|
|
25
|
+
in `docs/`.
|
|
26
|
+
|
|
27
|
+
## Review Checklist
|
|
28
|
+
|
|
29
|
+
1. Does the code follow JTB naming, structure, and logical property conventions?
|
|
30
|
+
2. Are all values variable-driven and override-friendly?
|
|
31
|
+
3. Is the code placed in the correct directory and imported in the right order?
|
|
32
|
+
4. Is documentation provided or updated as required?
|
|
33
|
+
|
|
34
|
+
Provide clear, actionable feedback. If you suggest changes, reference the
|
|
35
|
+
specific JTB documentation section or rule.
|
|
36
|
+
|
|
37
|
+
## Skill File Review
|
|
38
|
+
|
|
39
|
+
When any source-of-truth files are included in the changeset, review them for
|
|
40
|
+
accuracy against the actual codebase.
|
|
41
|
+
|
|
42
|
+
**Accuracy**
|
|
43
|
+
|
|
44
|
+
- Do the documented conventions match how the SCSS actually works?
|
|
45
|
+
- Are examples valid and runnable — not invented or outdated?
|
|
46
|
+
- Do file paths, class names, and patterns reflect the real codebase?
|
|
47
|
+
|
|
48
|
+
**Completeness**
|
|
49
|
+
|
|
50
|
+
- Are new patterns or workflows introduced in this changeset documented?
|
|
51
|
+
- Are deprecated patterns removed or flagged?
|
|
52
|
+
|
|
53
|
+
**Internal Consistency**
|
|
54
|
+
|
|
55
|
+
- Do the files agree with each other? Flag contradictions between skill files
|
|
56
|
+
and documentation.
|
|
57
|
+
- Does a change in one file require an update in another?
|
|
58
|
+
|
|
59
|
+
**Scope Drift**
|
|
60
|
+
|
|
61
|
+
- Do changes silently expand or restrict the skill scope without clear intent?
|
|
62
|
+
|
|
63
|
+
**Output Format:**
|
|
64
|
+
List issues grouped by file. For each issue: severity (blocking/suggestion),
|
|
65
|
+
the violated rule, and a suggested fix.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
Review the `[component]` component.
|
|
2
|
+
|
|
3
|
+
Invoke the `jtb-documentation` skill before starting. Read
|
|
4
|
+
`docs/conventions-and-architecture-rules.md` in full.
|
|
5
|
+
|
|
6
|
+
## Scope
|
|
7
|
+
|
|
8
|
+
Review only the named target and its directly related docs and examples.
|
|
9
|
+
|
|
10
|
+
## Review Questions
|
|
11
|
+
|
|
12
|
+
1. Is the documentation correct and complete?
|
|
13
|
+
2. Does the code follow JTB rules and conventions?
|
|
14
|
+
3. Does it match the JTB philosophy and architecture rules?
|
|
15
|
+
4. Are there any mismatches between docs and code?
|
|
16
|
+
5. Are there any prohibited patterns in this target?
|
|
17
|
+
6. Are there target-level bugs or regressions visible?
|
|
18
|
+
|
|
19
|
+
## Priority Definitions
|
|
20
|
+
|
|
21
|
+
- `critical` — violates a documented rule or produces incorrect behavior. Must fix.
|
|
22
|
+
- `high` — likely causes confusion, inconsistency, or future breakage. Should fix.
|
|
23
|
+
- `low` — style, preference, or minor improvement. Fix if you want.
|
|
24
|
+
|
|
25
|
+
## Output Requirements
|
|
26
|
+
|
|
27
|
+
- Be direct and critical.
|
|
28
|
+
- Do not praise unnecessarily.
|
|
29
|
+
- Separate strengths and weaknesses clearly.
|
|
30
|
+
- Suggest improvements with trade-offs.
|
|
31
|
+
- If something is unclear or inconsistent, call it out explicitly.
|
|
32
|
+
|
|
33
|
+
Write results to `review-[component].md` in the project root.
|
|
34
|
+
|
|
35
|
+
Use these sections in order:
|
|
36
|
+
|
|
37
|
+
- **Confirmed Issues**
|
|
38
|
+
- **Docs-Code Mismatches**
|
|
39
|
+
- **Findings**
|
|
40
|
+
- **Pass** — if no confirmed issues: `No blocking issues found.`
|
|
41
|
+
|
|
42
|
+
For every issue use this format:
|
|
43
|
+
|
|
44
|
+
**Issue title** · `critical/high/low`
|
|
45
|
+
`file:line`
|
|
46
|
+
Rule: brief quote
|
|
47
|
+
Fix: one line
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Review the documentation for the JTB framework.
|
|
2
|
+
|
|
3
|
+
Invoke the `jtb-documentation` skill before starting. Read these in full first
|
|
4
|
+
— these define what is correct:
|
|
5
|
+
|
|
6
|
+
- `introduction.md`
|
|
7
|
+
- `docs/conventions-and-architecture-rules.md`
|
|
8
|
+
|
|
9
|
+
## Goals
|
|
10
|
+
|
|
11
|
+
1. Validate what exists — is documentation correct, consistent, and
|
|
12
|
+
rule-compliant?
|
|
13
|
+
2. Identify what's missing — what is absent but expected?
|
|
14
|
+
|
|
15
|
+
## Process
|
|
16
|
+
|
|
17
|
+
This review runs in three passes:
|
|
18
|
+
|
|
19
|
+
1. **Identify** — surface contradictions and gaps. Incomplete docs are expected;
|
|
20
|
+
flag them without treating incompleteness as a failure.
|
|
21
|
+
2. **Triage** — decide what's worth pursuing before any work happens.
|
|
22
|
+
3. **Sweep** — act only on approved items.
|
|
23
|
+
|
|
24
|
+
## Scope
|
|
25
|
+
|
|
26
|
+
Review only:
|
|
27
|
+
|
|
28
|
+
- `docs/` — all foundational documentation
|
|
29
|
+
- `src/maps_and_variables/` — all variable and configuration files
|
|
30
|
+
|
|
31
|
+
Do not review:
|
|
32
|
+
|
|
33
|
+
- `src/mixins/` — build system internals
|
|
34
|
+
- `src/functions/` — build system internals
|
|
35
|
+
- `src/base/` — output layer
|
|
36
|
+
|
|
37
|
+
## Review Questions
|
|
38
|
+
|
|
39
|
+
### Validation
|
|
40
|
+
|
|
41
|
+
1. Do the variable files in `src/maps_and_variables/` match what the
|
|
42
|
+
conventions doc describes?
|
|
43
|
+
2. Do all final maps follow the `-map` suffix rule?
|
|
44
|
+
3. Is the three-map pattern applied consistently across all variable files?
|
|
45
|
+
4. Is `smart-merge` order correct — variants first, values second?
|
|
46
|
+
5. Are `!default` flags present where the conventions require them?
|
|
47
|
+
6. Do the breakpoint values in `_base.scss` match what `responsive-design.md`
|
|
48
|
+
describes?
|
|
49
|
+
7. Does `index.scss` forward all expected files?
|
|
50
|
+
|
|
51
|
+
### Gap Identification
|
|
52
|
+
|
|
53
|
+
1. Are there variable files with no corresponding documentation?
|
|
54
|
+
2. Are there conventions described in the docs with no implementation in
|
|
55
|
+
`src/maps_and_variables/`?
|
|
56
|
+
|
|
57
|
+
## Priority Definitions
|
|
58
|
+
|
|
59
|
+
- `critical` — contradicts a source of truth or produces incorrect guidance.
|
|
60
|
+
Must fix.
|
|
61
|
+
- `high` — likely causes confusion, inconsistency, or future breakage. Should
|
|
62
|
+
fix.
|
|
63
|
+
- `low` — style, preference, or minor improvement. Fix if you want.
|
|
64
|
+
- `missing` — expected content that isn't there.
|
|
65
|
+
|
|
66
|
+
## Output Requirements
|
|
67
|
+
|
|
68
|
+
- Be direct and critical.
|
|
69
|
+
- Do not praise unnecessarily.
|
|
70
|
+
- Separate findings by type clearly.
|
|
71
|
+
- Suggest improvements with trade-offs.
|
|
72
|
+
- If something is unclear or inconsistent, call it out explicitly.
|
|
73
|
+
|
|
74
|
+
Write results to `review-docs-run1.md` in the project root.
|
|
75
|
+
|
|
76
|
+
Use these sections in order:
|
|
77
|
+
|
|
78
|
+
- **Confirmed Issues** — rule violations, bugs, mismatches
|
|
79
|
+
- **Gaps** — missing docs, tests, examples, or conventions
|
|
80
|
+
- **Findings** — observations that don't rise to issues
|
|
81
|
+
- **Pass** — if no confirmed issues: `No blocking issues found.`
|
|
82
|
+
|
|
83
|
+
For every confirmed issue use this format:
|
|
84
|
+
|
|
85
|
+
**Issue title** · `critical/high/low`
|
|
86
|
+
`file:line`
|
|
87
|
+
Rule: brief quote
|
|
88
|
+
Fix: one line
|
|
89
|
+
|
|
90
|
+
For every gap use this format:
|
|
91
|
+
|
|
92
|
+
**Gap title** · `missing`
|
|
93
|
+
What's absent and where it's expected.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
I have been working on the `jtb-documentation` skill at
|
|
2
|
+
C:\Users\natha\sites\nk_jtb\.ai\skills\jtb-documentation\SKILL.md. Read it
|
|
3
|
+
before we start.
|
|
4
|
+
|
|
5
|
+
I want to continue refining skills, guidelines, and framework documentation.
|
|
6
|
+
|
|
7
|
+
The next few threads I want to pull on:
|
|
8
|
+
|
|
9
|
+
- Utility Documentation section in the skill — never discussed, needs review
|
|
10
|
+
|
|
11
|
+
- Utility-based examples alongside class-based component docs — how to structure
|
|
12
|
+
and where they live. For example, the checklist component is a good candidate
|
|
13
|
+
for a utility-based example, but where does it go? Does it live in the
|
|
14
|
+
component doc, or do we create a separate utility-based example doc?
|
|
15
|
+
|
|
16
|
+
- Variable system document. I think this is full of rubbish and hard to make
|
|
17
|
+
sense of. needs a rethink and rewrite. maybe it should be a living document
|
|
18
|
+
that we update as we go, rather than trying to get it right in one go?
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: jtb-conversion
|
|
3
|
+
description: >-
|
|
4
|
+
Use this skill whenever applying or converting to NK JTB classes and
|
|
5
|
+
components, regardless of the source — Tailwind, custom CSS, plain HTML,
|
|
6
|
+
PHP, JS, or any other context. Do not wait for an explicit request — if JTB
|
|
7
|
+
classes or components are being applied or converted, this skill applies.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
For layout decisions during conversion, invoke the `jtb-layout` skill.
|
|
11
|
+
|
|
12
|
+
If the output file is not specified, ask before proceeding.
|
|
13
|
+
|
|
14
|
+
## Conversion Order (review)
|
|
15
|
+
|
|
16
|
+
1. Replace source classes with documented JTB utilities or components.
|
|
17
|
+
2. When the source uses arbitrary/custom values, snap to the closest existing
|
|
18
|
+
JTB token or utility instead of preserving the exact value.
|
|
19
|
+
3. Do not create new classes as a conversion shortcut.
|
|
20
|
+
4. If something appears to need a class, consider whether it should become a
|
|
21
|
+
real framework component, utility, or documented pattern.
|
|
22
|
+
5. Record only actionable gaps in `jtb-conversion-notes.md` — missing
|
|
23
|
+
utilities, unsupported patterns, or token mismatches that need a follow-up
|
|
24
|
+
decision. Do not record resolved matches, clean conversions, or decisions
|
|
25
|
+
made.
|
|
26
|
+
6. Only add local CSS when JTB cannot express the requirement.
|
|
27
|
+
|
|
28
|
+
## Rules (review)
|
|
29
|
+
|
|
30
|
+
- Treat source classes as intent references, not direct mappings.
|
|
31
|
+
- For color, reach for the closest JTB palette utility first (`bg-stone-50`,
|
|
32
|
+
`txt-stone-900` etc.). If the brand color maps to a semantic role, override
|
|
33
|
+
the JTB token via `:root` (e.g. `--primary`). If no palette utility or
|
|
34
|
+
semantic token is a reasonable match, record it in `jtb-conversion-notes.md`
|
|
35
|
+
and leave the decision to the developer — do not create a custom color class.
|
|
36
|
+
- Prefer documented JTB scales, breakpoints, and logical-property utilities.
|
|
37
|
+
- Prefer framework components when the structure already matches what they
|
|
38
|
+
provide. Common examples include `navbar`, `bx`, `bx-header`, `bx-content`,
|
|
39
|
+
`bx-footer`, and `divide-y`.
|
|
40
|
+
- Before finalizing a conversion, check whether repeated card-like shells such
|
|
41
|
+
as `bg-white` + border + radius combinations should be expressed as `bx`
|
|
42
|
+
instead.
|
|
43
|
+
- Check whether small badge-like UI should use existing `badge` variants before
|
|
44
|
+
rebuilding the same shape with low-level utilities.
|
|
45
|
+
- Check whether button-like controls should use the `btn` component before
|
|
46
|
+
rebuilding pill/button shells with low-level utilities.
|
|
47
|
+
- Remove no-op or default classes that do not materially change the layout or
|
|
48
|
+
styling.
|
|
49
|
+
- Prefer semantic utility tokens such as `txt-muted` when they match the intent,
|
|
50
|
+
instead of repeatedly assembling the same low-level token combination.
|
|
51
|
+
- If JTB cannot express a requirement, create a local helper class. Never use
|
|
52
|
+
inline styles — a class is visible, searchable, and signals a gap clearly.
|
|
53
|
+
Inline styles are only permitted if explicitly instructed by the developer.
|
|
54
|
+
- When Tailwind transition syntax depends on unsupported `duration-*`, easing,
|
|
55
|
+
or delay utilities, simplify to the closest supported JTB transition pattern
|
|
56
|
+
and record the missing utility coverage.
|
|
57
|
+
- Keep Alpine `x-data` scoped to the element that directly owns or uses the
|
|
58
|
+
state. Do not move it to a broader parent unless multiple descendants
|
|
59
|
+
genuinely share the same state.
|
|
60
|
+
- Do not create new classes just to make a single conversion easier.
|
|
61
|
+
|
|
62
|
+
## Review Checklist (review)
|
|
63
|
+
|
|
64
|
+
- Remove source-only syntax such as arbitrary value classes where a JTB
|
|
65
|
+
utility exists.
|
|
66
|
+
- Check whether an existing component expresses the structure more cleanly than
|
|
67
|
+
rebuilding it with low-level utilities.
|
|
68
|
+
- Check whether button-like controls are better expressed with `btn` plus theme
|
|
69
|
+
or utility overrides.
|
|
70
|
+
- Check whether repeated inline styles should be turned into a small reusable
|
|
71
|
+
local helper instead.
|
|
72
|
+
- Remove classes that only restate the default behavior.
|
|
73
|
+
- Check whether a nearby JTB token is acceptable before creating custom CSS.
|
|
74
|
+
- Document missing utilities or unsupported patterns in
|
|
75
|
+
`jtb-conversion-notes.md`.
|
|
76
|
+
- Flag framework gaps that should become docs or utilities later.
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: jtb-documentation
|
|
3
|
+
description: >-
|
|
4
|
+
Use this skill whenever creating or updating NK JTB framework documentation.
|
|
5
|
+
Do not wait for an explicit request — if documentation is being created or
|
|
6
|
+
updated, this skill applies.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Documentation Locations
|
|
10
|
+
|
|
11
|
+
- **All documentation** → `docs/`
|
|
12
|
+
|
|
13
|
+
## Workflow
|
|
14
|
+
|
|
15
|
+
- Create new documentation directly in `docs/`.
|
|
16
|
+
- Mark every new heading with `(review)` until its content is confirmed.
|
|
17
|
+
- When you update a section carrying `(review)`, ask: "[Section name] has been
|
|
18
|
+
updated. Is this section complete?"
|
|
19
|
+
- On confirmation: remove the `(review)` tag. If the confirmed section is in a
|
|
20
|
+
component or utility doc (not a skill, reference doc, or api doc), ask: "Do
|
|
21
|
+
you want this added to a showcase?"
|
|
22
|
+
- If yes, add it to the appropriate showcase file before moving on.
|
|
23
|
+
- Leave `(review)` on any headings that are still unresolved.
|
|
24
|
+
|
|
25
|
+
## Showcases
|
|
26
|
+
|
|
27
|
+
Showcases are quick visual references — not comprehensive docs. There are three
|
|
28
|
+
showcase files:
|
|
29
|
+
|
|
30
|
+
- `docs/showcase-typography.md` — font sizes, weights, families, text utilities
|
|
31
|
+
- `docs/showcase-ui.md` — components and UI elements: buttons, badges,
|
|
32
|
+
checklist, box etc.
|
|
33
|
+
- `docs/showcase-layouts.md` — grid, flex patterns, page structures
|
|
34
|
+
|
|
35
|
+
Two reasons something belongs in a showcase:
|
|
36
|
+
|
|
37
|
+
1. **Syntax reminder** — enough variations exist that you forget the class names
|
|
38
|
+
(border, typography)
|
|
39
|
+
2. **Existence reminder** — a single component worth flagging so it doesn't get
|
|
40
|
+
overlooked (checklist)
|
|
41
|
+
|
|
42
|
+
Showcase entries have no explanation — just enough to jog memory. Format depends
|
|
43
|
+
on content type:
|
|
44
|
+
|
|
45
|
+
- **UI components** (`showcase-ui.md`) — use `+demo-folded` so markup is visible
|
|
46
|
+
and copyable
|
|
47
|
+
- **Typography/syntax** (`showcase-typography.md`) — use raw HTML pairing
|
|
48
|
+
`<code>` class names with output
|
|
49
|
+
- **Layouts** (`showcase-layouts.md`) — case by case
|
|
50
|
+
|
|
51
|
+
Group entries by component family under `##` headings (e.g. `## Lists`, `##
|
|
52
|
+
Buttons`). Individual variants sit under `###` within that group.
|
|
53
|
+
|
|
54
|
+
Do not create a new showcase file for a single component — if it doesn't fit the
|
|
55
|
+
three above, discuss with the user.
|
|
56
|
+
|
|
57
|
+
## Documentation Types
|
|
58
|
+
|
|
59
|
+
Choose the document shape based on what is being documented.
|
|
60
|
+
|
|
61
|
+
### Utility Documentation
|
|
62
|
+
|
|
63
|
+
Use for class-based APIs such as spacing, sizing, border, position, transforms,
|
|
64
|
+
and typography helpers.
|
|
65
|
+
|
|
66
|
+
Default structure:
|
|
67
|
+
|
|
68
|
+
1. Title
|
|
69
|
+
2. One-line lead
|
|
70
|
+
3. Major utility groups as `##` headings when the page covers more than one
|
|
71
|
+
family
|
|
72
|
+
4. Example groups within those sections as `###` headings when needed
|
|
73
|
+
5. Optional compact table of available properties or value groups
|
|
74
|
+
6. Available values at the end, when useful
|
|
75
|
+
|
|
76
|
+
Rules:
|
|
77
|
+
|
|
78
|
+
- Let the examples do most of the work.
|
|
79
|
+
- Keep prose short.
|
|
80
|
+
- Use `##` for major utility families such as `Border` and `Outline` when the
|
|
81
|
+
page covers multiple related groups.
|
|
82
|
+
- Use `###` for example groups within those families such as `Width`, `Color`,
|
|
83
|
+
`Style`, or `Offset`.
|
|
84
|
+
- Keep utility heading levels parallel. Do not mix levels unevenly when the
|
|
85
|
+
groups are peers.
|
|
86
|
+
- Use a compact table near the top when it helps scan the utility API quickly.
|
|
87
|
+
- Only add notes when behaviour is non-obvious.
|
|
88
|
+
- Keep review notes, implementation commentary, and TODOs out of the main doc.
|
|
89
|
+
- Group examples by usage, not by SCSS implementation detail.
|
|
90
|
+
- Use `+demo-folded class="bx"` for interactive examples.
|
|
91
|
+
- Use `preview-class="..."` for preview-only layout or styling so copied code
|
|
92
|
+
stays clean.
|
|
93
|
+
- Use `class="..."` for the outer demo wrapper when the preview needs a
|
|
94
|
+
container such as `bx`.
|
|
95
|
+
|
|
96
|
+
### Component Documentation
|
|
97
|
+
|
|
98
|
+
Use for named structural classes such as `navbar`, `menu`, `bx`, or form
|
|
99
|
+
controls.
|
|
100
|
+
|
|
101
|
+
Every component doc must communicate four things — heading names can flex to
|
|
102
|
+
suit the content:
|
|
103
|
+
|
|
104
|
+
1. **What it is** — a one-line lead describing purpose, not implementation
|
|
105
|
+
2. **How to use it** — minimum working markup shown early with `+code`
|
|
106
|
+
3. **What it looks like** — examples moving from simple to fuller usage
|
|
107
|
+
4. **How to customise it** — variables, modifiers, or overrides
|
|
108
|
+
|
|
109
|
+
Rules:
|
|
110
|
+
|
|
111
|
+
- Do not add a separate `## Introduction` heading — the lead is the
|
|
112
|
+
introduction.
|
|
113
|
+
- The lead describes what the component is and does — not implementation
|
|
114
|
+
details. Do not mention specific CSS properties. Those may change; the
|
|
115
|
+
component's purpose does not.
|
|
116
|
+
- Heading names should match the content. A single component might use `##
|
|
117
|
+
Structure` and `## Basic Usage`. A page covering base styles and variants
|
|
118
|
+
might use `## Base` and `## Variants`. Use whatever is clearest.
|
|
119
|
+
- Show the minimum working structure early with `+code`.
|
|
120
|
+
- Use prose where structure or context-aware behaviour needs explanation.
|
|
121
|
+
- Move from simple usage to fuller examples.
|
|
122
|
+
- Wrap all interactive examples in `class="bx"` on the demo block so they are
|
|
123
|
+
visually presented in context.
|
|
124
|
+
- Include an SCSS Variables table when the component exposes overridable
|
|
125
|
+
variables. Link to `/docs/jtb/variable-system` for override instructions
|
|
126
|
+
rather than explaining inline.
|
|
127
|
+
- Include a `## Utility Examples` section when a utility-based approach to the
|
|
128
|
+
same pattern is viable. This lives in the component doc — not a separate
|
|
129
|
+
file. It shows the utility-built version alongside the component class.
|
|
130
|
+
|
|
131
|
+
## Prose vs Code
|
|
132
|
+
|
|
133
|
+
Default to code-first. Add prose only when:
|
|
134
|
+
|
|
135
|
+
- Context-aware behaviour needs explanation
|
|
136
|
+
- Non-obvious structure requires a note
|
|
137
|
+
- Foundational patterns apply across multiple examples
|
|
138
|
+
|
|
139
|
+
## Code Block Attributes
|
|
140
|
+
|
|
141
|
+
- `class="..."` → outer demo wrapper class
|
|
142
|
+
- `preview-class="..."` → class applied to the preview container
|
|
143
|
+
- `+demo` / `+demo-folded` → render preview and code together
|
|
144
|
+
|
|
145
|
+
Prefer `preview-class` when the layout is only for the preview. That keeps the
|
|
146
|
+
example code cleaner when copied.
|
|
147
|
+
|
|
148
|
+
For layout/responsive docs, use `class="resizable-container
|
|
149
|
+
with-docs-only-overrides"` so the example preview can respond inside the docs
|
|
150
|
+
without changing the copied markup.
|
|
151
|
+
|
|
152
|
+
## Links
|
|
153
|
+
|
|
154
|
+
Docs are served from a Laravel app. Always use app-rooted paths — never relative
|
|
155
|
+
file paths:
|
|
156
|
+
|
|
157
|
+
- `/docs/jtb/variable-system` ✅
|
|
158
|
+
- `../variable-system.md` ❌
|
|
159
|
+
|
|
160
|
+
The base path is `/docs/jtb/` followed by the directory and filename without
|
|
161
|
+
extension — mirroring the `docs/` folder structure:
|
|
162
|
+
|
|
163
|
+
- `docs/components/list.md` → `/docs/jtb/components/list`
|
|
164
|
+
- `docs/api/helpers.md` → `/docs/jtb/api/helpers`
|
|
165
|
+
- `docs/variable-system.md` → `/docs/jtb/variable-system`
|
|
166
|
+
|
|
167
|
+
## Formatting Rules
|
|
168
|
+
|
|
169
|
+
- **No horizontal rules (`---`)** — ever. Use headings and spacing
|
|
170
|
+
- **Concise** — get to the point
|
|
171
|
+
- **Show code** — examples over explanation
|
|
172
|
+
- **Document the non-obvious** — skip what's clear from context
|
|
173
|
+
- **Call out outstanding review tags** — when closing documentation work, say
|
|
174
|
+
which headings or docs still carry `(review)` tags
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: jtb-layout
|
|
3
|
+
description: >-
|
|
4
|
+
Use this skill whenever making layout decisions, choosing between grid and
|
|
5
|
+
flex, building or converting page structure, or finding documented JTB
|
|
6
|
+
alternatives to Tailwind layout patterns. Do not wait for an explicit
|
|
7
|
+
request — if layout decisions are being made, this skill applies.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
For layout or responsive work, read:
|
|
11
|
+
|
|
12
|
+
- `docs/responsive-design.md`
|
|
13
|
+
- `docs/conventions-and-architecture-rules.md`
|
|
14
|
+
- `docs/layer-system.md`
|
|
15
|
+
- `docs/layouts-and-structures.md`
|
|
16
|
+
|
|
17
|
+
## Scope (review)
|
|
18
|
+
|
|
19
|
+
Use this skill for structural layout decisions:
|
|
20
|
+
|
|
21
|
+
- page shells
|
|
22
|
+
- layout patterns
|
|
23
|
+
- reusable internal structures
|
|
24
|
+
- split layouts
|
|
25
|
+
- grid vs flex choices
|
|
26
|
+
- container and width strategy
|
|
27
|
+
- responsive visibility strategy
|
|
28
|
+
- alternatives to arbitrary grid-template columns
|
|
29
|
+
|
|
30
|
+
Do not use this skill for general documentation or for framework-internals work.
|
|
31
|
+
|
|
32
|
+
## Decision Order (review)
|
|
33
|
+
|
|
34
|
+
1. Recreate layout intent, not literal Tailwind syntax.
|
|
35
|
+
2. Try documented JTB primitives first:
|
|
36
|
+
- `grid` with `cols-*`
|
|
37
|
+
- `flex`, `flex-col`, `flex-1`, width utilities
|
|
38
|
+
- `container-*`
|
|
39
|
+
- spacing, alignment, and visibility utilities
|
|
40
|
+
3. Classify the problem correctly before choosing classes:
|
|
41
|
+
- sidebar + main
|
|
42
|
+
- reusable structures such as `thirds-2-1`
|
|
43
|
+
4. Prefer established layout patterns and structures over ad hoc reproduction:
|
|
44
|
+
- stacked mobile, split desktop
|
|
45
|
+
- fixed-width aside + flexible content using flex or width utilities
|
|
46
|
+
- proportional grid splits when the relationship is clearer as columns
|
|
47
|
+
5. If a Tailwind layout uses arbitrary grid templates, first ask whether the same result can be achieved by restructuring with documented JTB classes.
|
|
48
|
+
6. Only treat it as a framework gap when the documented primitives cannot express the layout cleanly.
|
|
49
|
+
|
|
50
|
+
## Rules (review)
|
|
51
|
+
|
|
52
|
+
- Do not preserve Tailwind arbitrary grid-template syntax by default.
|
|
53
|
+
- Do not create new classes just to reproduce one layout literally.
|
|
54
|
+
- Prefer mobile-first base layouts with responsive enhancement.
|
|
55
|
+
- Treat `container-*` as a layout primitive with built-in inline gutter. Do not add extra horizontal padding on the same element unless there is a clear reason.
|
|
56
|
+
- For standard page sections, prefer `container` as the default wrapper.
|
|
57
|
+
- Use `container-*` variants only when the page type or reading width clearly calls for them, such as narrower documentation/content pages.
|
|
58
|
+
- Let the section or component own its internal padding. Use the container for width and placement, not as the main holder of reusable section spacing.
|
|
59
|
+
- Default section rhythm:
|
|
60
|
+
- `py-4-3-2` for standard sections
|
|
61
|
+
- `py-5-3-2` for more prominent sections
|
|
62
|
+
- Distinguish between page-level layouts and reusable structures before deciding on implementation.
|
|
63
|
+
- For `thirds-2-1`, prefer a simple documented grid split such as `lg:cols-3` with `lg:col-span-2` / `lg:col-span-1` before considering custom templates.
|
|
64
|
+
- When solving dropdown or overlay layering, put z-index on the positioned overlay element before trying to solve it on inner children.
|
|
65
|
+
- Use `{bp}:` for progressive layout changes.
|
|
66
|
+
- Use `to-` and `on-` primarily for visibility windows, not general layout progression.
|
|
67
|
+
- Keep visibility logic consistent within the same layout shell.
|
|
68
|
+
- Record unresolved layout gaps in `jtb-conversion-notes.md`.
|
|
69
|
+
|
|
70
|
+
## Common Alternatives (review)
|
|
71
|
+
|
|
72
|
+
- Instead of custom two-column templates like `1fr 240px`, try:
|
|
73
|
+
- `flex` + fixed-width aside + `flex-1`
|
|
74
|
+
- `grid` with documented `cols-*` plus child width constraints
|
|
75
|
+
- stacked mobile layout with a desktop split at `lg:`
|
|
76
|
+
|
|
77
|
+
- Instead of inventing a new page layout name for a proportional split:
|
|
78
|
+
- keep the page layout and the reusable structure separate
|
|
79
|
+
- document the structure directly when the example is really about the split
|
|
80
|
+
|
|
81
|
+
- Instead of reproducing exact sidebar widths from Tailwind:
|
|
82
|
+
- use the nearest documented width token first
|
|
83
|
+
- only escalate when the difference materially breaks the layout
|
|
84
|
+
|
|
85
|
+
- Instead of mixing unrelated visibility strategies in one shell:
|
|
86
|
+
- choose one documented pattern and apply it consistently
|
|
87
|
+
|
|
88
|
+
## Output Expectations (review)
|
|
89
|
+
|
|
90
|
+
- Explain the chosen layout strategy in terms of JTB primitives.
|
|
91
|
+
- Call out when a layout was intentionally restructured instead of literally copied.
|
|
92
|
+
- If no clean documented approach exists, document the gap in `jtb-conversion-notes.md` rather than inventing a one-off layout API.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: scss-engineer
|
|
3
|
+
description: >-
|
|
4
|
+
Use this skill whenever building or extending JTB framework internals —
|
|
5
|
+
adding components, generating utilities, working with SCSS architecture,
|
|
6
|
+
maps, or mixins. Do not wait for an explicit request — if JTB internals
|
|
7
|
+
are being built or extended, this skill applies.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
Read `docs/conventions-and-architecture-rules.md` before starting.
|
|
11
|
+
|
|
12
|
+
## Component Workflow
|
|
13
|
+
|
|
14
|
+
1. Add variables to `src/maps_and_variables/_components.scss`.
|
|
15
|
+
2. Create the component file in `src/components/`.
|
|
16
|
+
3. Export via `src/components/index.scss`.
|