nk_jtb 0.21.0 → 0.22.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.
Files changed (171) hide show
  1. package/.github/copilot-instructions.md +71 -0
  2. package/.stylelintrc.json +16 -16
  3. package/dev.html +0 -201
  4. package/docs/animation.md +131 -0
  5. package/docs/api/architecture-naming.md +79 -0
  6. package/docs/api/build-classes.md +108 -0
  7. package/docs/api/make-from-breakpoint.md +52 -0
  8. package/docs/api/make-on-breakpoint.md +52 -0
  9. package/docs/api/make-position-based-class.md +83 -0
  10. package/docs/api/make-single-property-class.md +79 -0
  11. package/docs/api/make-themes.md +55 -0
  12. package/docs/api/make-to-breakpoint.md +52 -0
  13. package/docs/api/makers.md +15 -0
  14. package/docs/api/workflow.md +126 -0
  15. package/docs/automatic-spacing.md +97 -0
  16. package/docs/color-and-themes.md +104 -0
  17. package/docs/components/accordion.md +198 -0
  18. package/docs/components/button.md +55 -0
  19. package/docs/components/forms.md +282 -0
  20. package/docs/components/table.md +130 -0
  21. package/docs/conventions.md +205 -0
  22. package/docs/core-architecture.md +114 -0
  23. package/docs/display-and-visibility.md +56 -0
  24. package/docs/examples/form-examples.md +300 -0
  25. package/docs/examples/layout-dashboard.md +142 -0
  26. package/docs/examples/navbar.md +52 -0
  27. package/docs/examples/navigation.md +0 -0
  28. package/docs/examples/page-layouts-and-structures.md +153 -0
  29. package/docs/examples/ui-elements.md +147 -0
  30. package/docs/faqs.md +25 -0
  31. package/docs/installation.md +58 -0
  32. package/docs/introduction.md +146 -0
  33. package/docs/magic-classes.md +137 -0
  34. package/docs/navigation/example-navigations.md +19 -0
  35. package/docs/navigation/menu.md +215 -0
  36. package/docs/navigation/navbar.md +123 -0
  37. package/docs/navigation/overview.md +98 -0
  38. package/docs/navigation/pagination.md +90 -0
  39. package/docs/responsive-design.md +185 -0
  40. package/docs/responsive-testing.md +447 -0
  41. package/docs/utilities/animation.md +131 -0
  42. package/docs/utilities/border.md +229 -0
  43. package/docs/utilities/display-and-visibility.md +56 -0
  44. package/docs/utilities/effects.md +28 -0
  45. package/docs/wip.md +447 -0
  46. package/index.html +43 -89
  47. package/js/markdown-loader.js +27 -0
  48. package/js/markdown-renderer.js +122 -0
  49. package/js/nav.json +154 -0
  50. package/js/navigation.js +65 -0
  51. package/jtb-for review/alignment.md +36 -0
  52. package/jtb-for review/aria.md +192 -0
  53. package/{docs/directory-structure.md → jtb-for review/directory-structure.md } +140 -140
  54. package/jtb-for review/margin-padding-spacing.md +86 -0
  55. package/{docs/resolvers.md → jtb-for review/resolvers.md } +91 -91
  56. package/jtb-for review/state-management.md +80 -0
  57. package/jtb-for review/utility-and-class-generation.md +942 -0
  58. package/main.js +21 -5
  59. package/package.json +8 -3
  60. package/prompt.md +2 -0
  61. package/public/images/favicon.svg +1 -1
  62. package/public/images/logo.svg +1 -1
  63. package/public/images/svg/jtb-icon.svg +9 -0
  64. package/public/svg/blur-red.svg +12 -12
  65. package/public/svg/blur.svg +1 -1
  66. package/public/svg/icons.svg +40 -0
  67. package/readme.md +19 -40
  68. package/src/base/_auto-spacing.scss +44 -44
  69. package/src/base/_base.scss +202 -233
  70. package/src/base/_list.scss +19 -6
  71. package/src/base/_root.scss +113 -8
  72. package/src/base/_table.scss +28 -0
  73. package/src/base/_typography.scss +18 -10
  74. package/src/base/index.scss +5 -4
  75. package/src/build.scss +6 -7
  76. package/src/common-tools.scss +12 -12
  77. package/src/components/_accordion.scss +94 -94
  78. package/src/components/_banner.scss +17 -17
  79. package/src/components/_box.scss +15 -19
  80. package/src/components/_button.scss +3 -11
  81. package/src/components/_dropdown.scss +46 -28
  82. package/src/components/_icon.scss +14 -24
  83. package/src/components/_list.scss +31 -31
  84. package/src/components/_loaders-and-spinners.scss +58 -0
  85. package/src/components/_menu.scss +89 -71
  86. package/src/components/_navbar.scss +26 -65
  87. package/src/components/_other.scss +17 -2
  88. package/src/components/_tabs.scss +37 -28
  89. package/src/components/index.scss +11 -10
  90. package/src/extras/_hero.scss +34 -34
  91. package/src/extras/_nk-app.scss +83 -57
  92. package/src/extras/_nk-docs.scss +262 -39
  93. package/src/extras/choices.scss +410 -410
  94. package/src/forms/_control.scss +50 -57
  95. package/src/forms/_file.scss +19 -20
  96. package/src/forms/_form.scss +90 -115
  97. package/src/forms/_toggle.scss +89 -78
  98. package/src/forms/index.scss +3 -3
  99. package/src/functions/_classes.scss +240 -233
  100. package/src/functions/_color-functions.scss +24 -19
  101. package/src/functions/_helpers.scss +12 -7
  102. package/src/functions/_map-and-list-helpers.scss +161 -166
  103. package/src/functions/_normalise-config.scss +55 -0
  104. package/src/functions/_strings.scss +164 -164
  105. package/src/maps_and_variables/_base.scss +22 -42
  106. package/src/maps_and_variables/_colors.scss +37 -23
  107. package/src/maps_and_variables/_components.scss +148 -68
  108. package/src/maps_and_variables/_config.scss +16 -5
  109. package/src/maps_and_variables/{_form-controls.scss → _forms.scss} +11 -13
  110. package/src/maps_and_variables/_property-maps.scss +43 -35
  111. package/src/maps_and_variables/_typography.scss +23 -10
  112. package/src/maps_and_variables/_value-maps.scss +178 -0
  113. package/src/maps_and_variables/index.scss +8 -10
  114. package/src/mixins/_backgrounds.scss +24 -24
  115. package/src/mixins/_build-classes.scss +195 -11
  116. package/src/mixins/_build-magic-classes.scss +113 -113
  117. package/src/mixins/_build-magic-grid.scss +89 -89
  118. package/src/mixins/_gradients.scss +82 -0
  119. package/src/mixins/_make-classes-old.scss +279 -0
  120. package/src/mixins/_make-classes.scss +187 -218
  121. package/src/mixins/_make-properties.scss +35 -0
  122. package/src/mixins/_media-container-queries.scss +200 -0
  123. package/src/mixins/_state.scss +44 -0
  124. package/src/mixins/_themes.scss +52 -0
  125. package/src/mixins/_transition.scss +88 -88
  126. package/src/play.scss +35 -2
  127. package/src/tests.scss +102 -0
  128. package/src/utilities/_alignment.scss +68 -68
  129. package/src/utilities/_animation.scss +177 -0
  130. package/src/utilities/_backgrounds.scss +10 -0
  131. package/src/utilities/_border.scss +8 -8
  132. package/src/utilities/_container.scss +15 -15
  133. package/src/utilities/_display-visibility.scss +40 -7
  134. package/src/utilities/_effects.scss +23 -3
  135. package/src/utilities/_flexbox.scss +58 -58
  136. package/src/utilities/_gradients.scss +57 -0
  137. package/src/utilities/_grid.scss +17 -49
  138. package/src/utilities/_interactivity.scss +15 -15
  139. package/src/utilities/_layout.scss +21 -21
  140. package/src/utilities/_misc.scss +95 -119
  141. package/src/utilities/_sizing.scss +16 -14
  142. package/src/utilities/_spacing.scss +36 -3
  143. package/src/utilities/_state.scss +80 -0
  144. package/src/utilities/_themes.scss +22 -13
  145. package/src/utilities/_transforms.scss +62 -32
  146. package/src/utilities/_transition.scss +48 -48
  147. package/src/utilities/_typography.scss +103 -49
  148. package/tw.html +16 -0
  149. package/vite.config.js +22 -7
  150. package/_root.scss +0 -31
  151. package/_themes.scss +0 -165
  152. package/dev1.html +0 -221
  153. package/dev2.html +0 -18
  154. package/examples/accordion.html +0 -210
  155. package/examples/dropdown.html +0 -75
  156. package/examples/examples-to-sort.html +0 -1729
  157. package/examples/flexbox.html +0 -723
  158. package/examples/laravel-page-layout.html +0 -227
  159. package/examples/layout-examples.html +0 -44
  160. package/examples/navigation-and-menus.html +0 -220
  161. package/examples/pagination.html +0 -153
  162. package/examples/sidebar.html +0 -315
  163. package/examples.html +0 -1041
  164. package/public/svg/naykel-ui.svg +0 -1
  165. package/src/maps_and_variables/_property-and-value-maps.scss +0 -50
  166. package/src/maps_and_variables/_utility-maps.scss +0 -53
  167. package/src/mixins/_build-themes.scss +0 -22
  168. package/src/mixins/_media.scss +0 -104
  169. package/src/mixins/_property-makers.scss +0 -74
  170. package/src/mixins/_theme-makers.scss +0 -11
  171. package/src/utilities/_color.scss +0 -27
@@ -0,0 +1,71 @@
1
+ # Copilot Instructions for JTB (Just the Basics)
2
+
3
+ ## Project Overview
4
+ - **JTB** is a Sass-based utility framework focused on composable classes, minimal components, and predictable naming. It avoids runtime JavaScript and prioritizes build-time CSS generation.
5
+ - The architecture centers on SCSS mixins for class generation, using configuration maps and builder/maker mixins.
6
+
7
+ - This framework uses tailwind-like class, but is not tailwind.
8
+ - Read the conventions in `docs/conventions.md` for naming patterns and class structures.
9
+
10
+ ## Key Files & Structure
11
+ - `src/` — Main SCSS source. Organized by `base/`, `components/`, `forms/`, `functions/`, `maps_and_variables/`, `mixins/`, `utilities/`.
12
+ - `build.scss` — Entry point for building the full framework.
13
+ - `docs/` — Documentation, conventions, and architecture explanations.
14
+ - `examples/` — Examples are provided in the documents not the examples/ folder.
15
+ - `package.json` — Build/test/lint scripts and dependencies.
16
+
17
+ ## Before Responding
18
+ - Always consider existing patterns in the codebase
19
+ - Reference docs/ when explaining architecture
20
+ - Don't give generic CSS advice—this is a framework with specific conventions
21
+
22
+ For more details, see:
23
+ - `docs/core-architecture.md`
24
+ - `docs/conventions.md`
25
+ - `docs/responsive-design.md`
26
+ - `README.md`
27
+
28
+ ## Class Generation Patterns
29
+ - **Builders**: Use configuration maps to generate sets of utility classes. Example:
30
+ ```scss
31
+ @include build-classes((margin: (prefix: 'm-', values: (1,2,3), unit: 'rem')));
32
+ // Generates: .m-1, .m-2, .m-3
33
+ ```
34
+ - **Makers**: For single, precise classes. Example:
35
+ ```scss
36
+ @include make-single-property-class('display', 'hidden', 'none', $breakpoints: (md, lg), $states: (hover));
37
+ // Generates: .hidden, .md:hidden, .lg:hidden, .hover:hidden:hover
38
+ ```
39
+ - **Responsive Prefixes**: `md:`, `on-md:`, `to-md:` control when styles apply. See `docs/responsive-design.md` for details.
40
+
41
+ ## Naming Conventions
42
+ - Utility classes: `{breakpoint}:{property}-{variant/value}`
43
+ - Examples: `mxy`, `gap-lg`, `md:mxy-3`, `on-lg:hidden`
44
+ - Properties use short prefixes: `m` (margin), `p` (padding), `bg` (background), `txt` (text)
45
+ - Variants: Semantic keywords (`sm`, `lg`) or direct values (`1.5`, `0`)
46
+
47
+ ## Developer Workflows
48
+ - **Build**: `npm run build` (uses Vite)
49
+ - **Dev**: `npm run dev` (hot reload, watches SCSS)
50
+ - **Watch**: `npm run watch` (watches build.scss)
51
+ - **Lint**: `npm run lint` or `npm run lint:base` (uses stylelint)
52
+ - **Playground**: `npm run play` (watches play.scss, opens files)
53
+ - **Debug**: `npm run debug` (Vite debug mode)
54
+
55
+ ## Customization & Configuration
56
+ - Override variables in `maps_and_variables/` before importing modules.
57
+ - Import only needed modules for smaller builds.
58
+ - Vite config for SCSS: see `docs/installation.md` for `additionalData` usage.
59
+
60
+ ## Integration Points
61
+ - Minimal JS: Only for interactive components (see `public/docs/components/` and dependencies in `package.json`).
62
+ - External: Uses Alpine.js for some components, Highlight.js and Marked for docs/examples.
63
+
64
+ ## Project-Specific Patterns
65
+ - **No runtime CSS-in-JS.** All class generation is build-time via SCSS.
66
+ - **Responsive system**: Three prefix types for breakpoints (`md:`, `on-md:`, `to-md:`).
67
+ - **Spacing scale**: See `README.md` for px/rem mapping.
68
+ - **Class name prediction**: See `docs/conventions.md` for structure and examples.
69
+
70
+ ---
71
+
package/.stylelintrc.json CHANGED
@@ -1,17 +1,17 @@
1
- {
2
- "extends": "stylelint-config-standard-scss",
3
- "plugins": [
4
- "stylelint-order"
5
- ],
6
- "ignoreFiles": [
7
- "dist/**/*",
8
- "**/*.min.css"
9
- ],
10
- "rules": {
11
- "scss/comment-no-empty": null,
12
- "order/properties-alphabetical-order": true,
13
- "scss/dollar-variable-colon-space-after": "always",
14
- "scss/dollar-variable-empty-line-before": null,
15
- "hue-degree-notation": null
16
- }
1
+ {
2
+ "extends": "stylelint-config-standard-scss",
3
+ "plugins": [
4
+ "stylelint-order"
5
+ ],
6
+ "ignoreFiles": [
7
+ "dist/**/*",
8
+ "**/*.min.css"
9
+ ],
10
+ "rules": {
11
+ "scss/comment-no-empty": null,
12
+ "order/properties-alphabetical-order": true,
13
+ "scss/dollar-variable-colon-space-after": "always",
14
+ "scss/dollar-variable-empty-line-before": null,
15
+ "hue-degree-notation": null
16
+ }
17
17
  }
package/dev.html CHANGED
@@ -12,208 +12,7 @@
12
12
  </head>
13
13
 
14
14
  <body class="container py-5 bg-gray-200">
15
- <div class="x">some text</div>
16
- <section id="horizontal-menu-examples">
17
- <h2>Horizontal Menu Examples</h2>
18
- <p>All parents are identical except for the alpine.js triggers.</p>
19
- <div class="menu-title">Utility Example</div>
20
- <nav id="utility-example" class="bx pxy-1 bdr bdr-blue">
21
- <ul class="flex gap-05 txt-sm">
22
- <li>
23
- <a href="#" class="flex items-center gap-075 px-075 py-05 rounded-lg txt-gray-700 hover:bg-gray-100">
24
- <svg class="wh-1.25 bdr bdr-blue bg-stripes-blue"></svg>
25
- Item
26
- </a>
27
- </li>
28
- <li>
29
- <a href="#" class="bg-gray-200 flex items-center gap-075 px-075 py-05 rounded-lg txt-gray-700">
30
- <svg class="wh-1.25 bdr bdr-blue bg-stripes-blue"></svg>
31
- Active
32
- </a>
33
- </li>
34
- <!-- Click to toggle -->
35
- <li class="relative" x-data="{ open: false }">
36
- <button x-on:click="open = ! open" class="flex items-center gap-075 px-075 py-05 rounded-lg txt-gray-700 hover:bg-gray-100">
37
- <span class="flex items-center gap-075">
38
- <svg class="wh-1.25 bdr bdr-blue bg-stripes-blue"></svg>
39
- Parent (Click)
40
- </span>
41
- <svg class="wh-1" xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24">
42
- <path x-show="open" d="m6 15 6-6 6 6" />
43
- <path x-show="!open" d="m6 9 6 6 6-6" />
44
- </svg>
45
- </button>
46
- <div x-show="open" x-collapse x-cloak class="absolute mt-05 flex w-10 z-100">
47
- <ul class="bx pxy-0 w-full flex-col gap-0">
48
- <li>
49
- <a href="#" class="flex items-center gap-075 px-075 py-05 txt-gray-700 hover:bg-gray-100">
50
- Child Item
51
- </a>
52
- </li>
53
- <li>
54
- <a href="#" class="flex items-center gap-075 px-075 py-05 txt-gray-700 hover:bg-gray-100">
55
- Child Item
56
- </a>
57
- </li>
58
- </ul>
59
- </div>
60
- </li>
61
- <!-- Click with click.away -->
62
- <li class="relative" x-data="{ open: false }" x-on:click.away="open = false">
63
- <button x-on:click="open = ! open" class="flex items-center gap-075 px-075 py-05 rounded-lg txt-gray-700 hover:bg-gray-100">
64
- <span class="flex items-center gap-075">
65
- <svg class="wh-1.25 bdr bdr-blue bg-stripes-blue"></svg>
66
- Parent (Click Away)
67
- </span>
68
- <svg class="wh-1" xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24">
69
- <path x-show="open" d="m6 15 6-6 6 6" />
70
- <path x-show="!open" d="m6 9 6 6 6-6" />
71
- </svg>
72
- </button>
73
- <div x-show="open" x-collapse class="absolute mt-05 flex w-10 z-100" style="display: none;">
74
- <ul class="bx pxy-0 w-full flex-col gap-0">
75
- <li>
76
- <a href="#" class="flex items-center gap-075 px-075 py-05 txt-gray-700 hover:bg-gray-100">
77
- Child Item
78
- </a>
79
- </li>
80
- <li>
81
- <a href="#" class="flex items-center gap-075 px-075 py-05 txt-gray-700 hover:bg-gray-100">
82
- Child Item
83
- </a>
84
- </li>
85
- </ul>
86
- </div>
87
- </li>
88
- <!-- Hover to show -->
89
- <li class="relative" x-data="{ open: false }" x-on:mouseenter="open = true" x-on:mouseleave="open = false">
90
- <button x-on:click="open = ! open" class="flex items-center gap-075 px-075 py-05 rounded-lg txt-gray-700 hover:bg-gray-100">
91
- <span class="flex items-center gap-075">
92
- <svg class="wh-1.25 bdr bdr-blue bg-stripes-blue"></svg>
93
- Parent (Hover)
94
- </span>
95
- <svg class="wh-1" xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24">
96
- <path x-show="open" d="m6 15 6-6 6 6" />
97
- <path x-show="!open" d="m6 9 6 6 6-6" />
98
- </svg>
99
- </button>
100
- <div x-show="open" x-collapse x-cloak class="absolute mt-05 flex w-10 z-100">
101
- <ul class="bx pxy-0 w-full flex-col gap-0">
102
- <li>
103
- <a href="#" class="flex items-center gap-075 px-075 py-05 txt-gray-700 hover:bg-gray-100">
104
- Child Item
105
- </a>
106
- </li>
107
- <li>
108
- <a href="#" class="flex items-center gap-075 px-075 py-05 txt-gray-700 hover:bg-gray-100">
109
- Child Item
110
- </a>
111
- </li>
112
- </ul>
113
- </div>
114
- </li>
115
- </ul>
116
- </nav>
117
- <div class="menu-title">Menu Class Example</div>
118
- <nav id="menu-class-example" class="menu bx pxy-1 bdr bdr-green">
119
- <ul class="flex gap-05 txt-sm">
120
- <li>
121
- <a href="#" class="flex items-center gap-075 px-075 py-05 rounded-lg txt-gray-700 hover:bg-gray-100">
122
- <svg class="wh-1.25 bdr bdr-green bg-stripes-green"></svg>
123
- Item
124
- </a>
125
- </li>
126
- <li>
127
- <a href="#" class="bg-gray-200 flex items-center gap-075 px-075 py-05 rounded-lg txt-gray-700">
128
- <svg class="wh-1.25 bdr bdr-green bg-stripes-green"></svg>
129
- Active
130
- </a>
131
- </li>
132
- <!-- Click to toggle -->
133
- <li class="relative" x-data="{ open: false }">
134
- <button x-on:click="open = ! open" class="flex items-center gap-075 px-075 py-05 rounded-lg txt-gray-700 hover:bg-gray-100">
135
- <span class="flex items-center gap-075">
136
- <svg class="wh-1.25 bdr bdr-green bg-stripes-green"></svg>
137
- Parent (Click)
138
- </span>
139
- <svg class="wh-1" xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24">
140
- <path x-show="open" d="m6 15 6-6 6 6" />
141
- <path x-show="!open" d="m6 9 6 6 6-6" />
142
- </svg>
143
- </button>
144
- <div x-show="open" x-collapse x-cloak class="absolute mt-05 flex w-10 z-100">
145
- <ul class="bx pxy-0 w-full flex-col gap-0">
146
- <li>
147
- <a href="#" class="flex items-center gap-075 px-075 py-05 txt-gray-700 hover:bg-gray-100">
148
- Child Item
149
- </a>
150
- </li>
151
- <li>
152
- <a href="#" class="flex items-center gap-075 px-075 py-05 txt-gray-700 hover:bg-gray-100">
153
- Child Item
154
- </a>
155
- </li>
156
- </ul>
157
- </div>
158
- </li>
159
- <!-- Click with click.away -->
160
- <li class="relative" x-data="{ open: false }" x-on:click.away="open = false">
161
- <button x-on:click="open = ! open" class="flex items-center gap-075 px-075 py-05 rounded-lg txt-gray-700 hover:bg-gray-100">
162
- <span class="flex items-center gap-075">
163
- <svg class="wh-1.25 bdr bdr-green bg-stripes-green"></svg>
164
- Parent (Click Away)
165
- </span>
166
- <svg class="wh-1" xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24">
167
- <path x-show="open" d="m6 15 6-6 6 6" />
168
- <path x-show="!open" d="m6 9 6 6 6-6" />
169
- </svg>
170
- </button>
171
- <div x-show="open" x-collapse class="absolute mt-05 flex w-10 z-100" style="display: none;">
172
- <ul class="bx pxy-0 w-full flex-col gap-0">
173
- <li>
174
- <a href="#" class="flex items-center gap-075 px-075 py-05 txt-gray-700 hover:bg-gray-100">
175
- Child Item
176
- </a>
177
- </li>
178
- <li>
179
- <a href="#" class="flex items-center gap-075 px-075 py-05 txt-gray-700 hover:bg-gray-100">
180
- Child Item
181
- </a>
182
- </li>
183
- </ul>
184
- </div>
185
- </li>
186
- <!-- Hover to show -->
187
- <li class="relative" x-data="{ open: false }" x-on:mouseenter="open = true" x-on:mouseleave="open = false">
188
- <button x-on:click="open = ! open" class="flex items-center gap-075 px-075 py-05 rounded-lg txt-gray-700 hover:bg-gray-100">
189
- <span class="flex items-center gap-075">
190
- <svg class="wh-1.25 bdr bdr-green bg-stripes-green"></svg>
191
- Parent (Hover)
192
- </span>
193
- <svg class="wh-1" xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24">
194
- <path x-show="open" d="m6 15 6-6 6 6" />
195
- <path x-show="!open" d="m6 9 6 6 6-6" />
196
- </svg>
197
- </button>
198
- <div x-show="open" x-collapse x-cloak class="absolute mt-05 flex w-10 z-100">
199
- <ul class="bx pxy-0 w-full flex-col gap-0">
200
- <li>
201
- <a href="#" class="flex items-center gap-075 px-075 py-05 txt-gray-700 hover:bg-gray-100">
202
- Child Item
203
- </a>
204
- </li>
205
- <li>
206
- <a href="#" class="flex items-center gap-075 px-075 py-05 txt-gray-700 hover:bg-gray-100">
207
- Child Item
208
- </a>
209
- </li>
210
- </ul>
211
- </div>
212
- </li>
213
- </ul>
214
- </nav>
215
15
 
216
- </section>
217
16
  <script type="module" src="/main.js"></script>
218
17
  </body>
219
18
 
@@ -0,0 +1,131 @@
1
+ # Animation Utilities
2
+
3
+ <h2>Loading States</h2>
4
+ <div class="grid md:cols-2 lg:cols-3 gap">
5
+ <!-- Simple Spinner -->
6
+ <div class="bx bdr-none shadow-lg flex-centered flex-col gap">
7
+ <h3 class="bx-title txt-1 font-semibold">Simple Spinner</h3>
8
+ <div class="animate-spin rounded-full wh-4 bdr-4 bdr-gray-200 bdr-t-blue-600"></div>
9
+ <p class="txt-sm txt-gray-600">Sending message...</p>
10
+ </div>
11
+ <!-- Ring Spinner (Thicker) -->
12
+ <div class="bx bdr-none shadow-lg flex-centered flex-col gap">
13
+ <h3 class="bx-title txt-1 font-semibold">Ring Spinner</h3>
14
+ <div class="animate-spin rounded-full wh-4 bdr-8 bdr-gray-200 bdr-t-indigo-600"></div>
15
+ <p class="txt-sm txt-gray-600">Processing...</p>
16
+ </div>
17
+ <!-- Dual Ring -->
18
+ <div class="bx bdr-none shadow-lg flex-centered flex-col gap">
19
+ <h3 class="bx-title txt-1 font-semibold">Dual Ring</h3>
20
+ <div class="relative">
21
+ <div class="animate-spin rounded-full wh-4 bdr-4 bdr-gray-200 bdr-t-purple-600"></div>
22
+ <div class="absolute top-05 left-05 animate-spin rounded-full wh-3 bdr-4 bdr-gray-100 bdr-t-purple-400" style="animation-direction: reverse;"></div>
23
+ </div>
24
+ <p class="txt-sm txt-gray-600">Loading...</p>
25
+ </div>
26
+ <!-- Bouncing Dots -->
27
+ <div class="bx bdr-none shadow-lg flex-centered flex-col gap">
28
+ <h3 class="bx-title txt-1 font-semibold">Bouncing Dots</h3>
29
+ <div class="flex space-x-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
+ </div>
34
+ <p class="txt-sm txt-gray-600">Submitting...</p>
35
+ </div>
36
+ <!-- Pulsing Circle -->
37
+ <div class="bx bdr-none shadow-lg flex-centered flex-col gap">
38
+ <h3 class="bx-title txt-1 font-semibold">Pulse</h3>
39
+ <div class="wh-4 bg-teal-500 rounded-full animate-pulse"></div>
40
+ <p class="txt-sm txt-gray-600">Please wait...</p>
41
+ </div>
42
+ <!-- Pulse Rings -->
43
+ <div class="bx bdr-none shadow-lg flex-centered flex-col gap">
44
+ <h3 class="bx-title txt-1 font-semibold">Pulse Rings</h3>
45
+ <div class="relative">
46
+ <div class="wh-4 bg-emerald-500 rounded-full"></div>
47
+ <div class="absolute top-0 left-0 wh-4 bg-emerald-400 rounded-full animate-pulse-ring"></div>
48
+ <div class="absolute top-0 left-0 wh-4 bg-emerald-400 rounded-full animate-pulse-ring" style="animation-delay: 0.5s;"></div>
49
+ </div>
50
+ <p class="txt-sm txt-gray-600">Processing...</p>
51
+ </div>
52
+ <!-- SVG Spinner -->
53
+ <div class="bx bdr-none shadow-lg flex-centered flex-col gap">
54
+ <h3 class="bx-title txt-1 font-semibold">SVG Spinner</h3>
55
+ <svg class="animate-spin wh-4 txt-orange-600" fill="none" viewBox="0 0 24 24">
56
+ <circle class="opacity-30" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
57
+ <path class="opacity-80" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
58
+ </svg>
59
+ <p class="txt-sm txt-gray-600">Uploading...</p>
60
+ </div>
61
+ <!-- Progress Bar -->
62
+ <div class="bx bdr-none shadow-lg flex-centered flex-col gap">
63
+ <h3 class="bx-title txt-1 font-semibold">Progress Bar</h3>
64
+ <div class="w-full h-2 bg-gray-200 rounded-full overflow-hidden">
65
+ <div class="h-full bg-blue-600 rounded-full animate-pulse" style="width: 70%;"></div>
66
+ </div>
67
+ <p class="txt-sm txt-gray-600">70% Complete</p>
68
+ </div>
69
+ <!-- Sequential Dots -->
70
+ <div class="bx bdr-none shadow-lg flex-centered flex-col gap">
71
+ <h3 class="bx-title txt-1 font-semibold">Sequential Dots</h3>
72
+ <div class="flex space-x-05 items-center h-2">
73
+ <div class="wh-05 bg-gray-600 rounded-full opacity-0 animate-pulse" style="animation-delay: 0s;"></div>
74
+ <div class="wh-05 bg-gray-600 rounded-full opacity-0 animate-pulse" style="animation-delay: 0.3s;"></div>
75
+ <div class="wh-05 bg-gray-600 rounded-full opacity-0 animate-pulse" style="animation-delay: 0.6s;"></div>
76
+ </div>
77
+ <p class="txt-sm txt-gray-600">Loading...</p>
78
+ </div>
79
+ </div>
80
+
81
+ ## Loading Animations
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
+
93
+ ## SVG Spinners
94
+
95
+ <div class="bx flex va-c">
96
+ <svg class="wh-2 animate-spin" viewBox="0 0 200 200">
97
+ <circle cx="100" cy="100" r="80" fill="none" class="stroke-gray-400" stroke-width="12" />
98
+ <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" />
99
+ </svg>
100
+ <svg class="wh-3 animate-spin" viewBox="0 0 200 200">
101
+ <circle cx="100" cy="100" r="80" fill="none" class="stroke-red-300" stroke-width="12" />
102
+ <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" />
103
+ </svg>
104
+ <svg class="wh-4 animate-spin" viewBox="0 0 200 200">
105
+ <circle cx="100" cy="100" r="80" fill="none" class="stroke-yellow-300" stroke-width="12" />
106
+ <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" />
107
+ </svg>
108
+ </div>
109
+
110
+
111
+ ## Border Animations
112
+
113
+ ### Spinner
114
+
115
+ ```html +code +preview +collapse
116
+ <div class="dark flex-centered gap bx">
117
+ <div class="spinner sm"></div>
118
+ <div class="spinner"></div>
119
+ <div class="spinner lg"></div>
120
+ </div>
121
+ ```
122
+
123
+ **Thick Spinners:**
124
+
125
+ ```html +code +preview +collapse
126
+ <div class="dark flex-centered gap bx">
127
+ <div class="spinner sm thick"></div>
128
+ <div class="spinner thick "></div>
129
+ <div class="spinner lg thick"></div>
130
+ </div>
131
+ ```
@@ -0,0 +1,79 @@
1
+ # Mixin Architecture & Naming Conventions
2
+
3
+
4
+
5
+ ## Architecture Levels
6
+
7
+ ## The 4 Layers
8
+
9
+ **Layer 1: Base**
10
+ Foundation classes without breakpoints or states. Lowest priority in cascade.
11
+
12
+ **Layer 2: Responsive**
13
+ Media query variants that override base at different breakpoints (md:, lg:, etc).
14
+
15
+ **Layer 3: State**
16
+ Interaction state variants (hover:, focus:, active:) that override responsive.
17
+
18
+ **Layer 4: Responsive + State**
19
+ Combined breakpoint and state variants (md:hover:, lg:focus:, etc). Highest priority.
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+ Based on the pattern, here's my recommendation:
35
+
36
+ ## Naming Convention: **class** vs **variant**
37
+
38
+ - **`make-base-class()`** — Generates THE class (foundation, layer 1 only)
39
+ - **`make-responsive-variant()`** — Generates variants OF that class (layer 2)
40
+ - **`make-state-variant()`** — Generates variants OF that class (layer 3)
41
+ - **`make-responsive-state-variant()`** — Generates variants OF that class (layer 4)
42
+
43
+ And for position-based:
44
+ - **`make-responsive-position-variant()`** — Responsive variants (layer 2)
45
+ - **`make-state-position-variant()`** — State variants (layer 3)
46
+ - **`make-responsive-state-position-variant()`** — Both (layer 4)
47
+
48
+
49
+
50
+ ## Data Flow
51
+
52
+ ```
53
+ User Config (property map)
54
+
55
+ build-classes-new (normalize config)
56
+
57
+ build-base-layer (loop through values)
58
+
59
+ make-base-class (generate CSS for one class)
60
+
61
+ Final CSS Output
62
+ ```
63
+
64
+
65
+
66
+
67
+ ## Layer Order (Cascade Priority)
68
+
69
+ 1. **Base Layer** → Lowest priority, establishes defaults
70
+ 2. **Responsive Layer** → Overrides base at screen sizes
71
+ 3. **State Layer** → Interactive states (hover, focus)
72
+ 4. **Responsive+State Layer** → Highest priority, combined variants
73
+
74
+
75
+
76
+
77
+
78
+
79
+
@@ -0,0 +1,108 @@
1
+ # build-classes()
2
+
3
+ ## Signature
4
+
5
+ ```scss +code
6
+ @mixin build-classes(
7
+ $properties-map,
8
+ $responsive: false,
9
+ $with-state: false,
10
+ $debug: false
11
+ )
12
+ ```
13
+
14
+ ## Parameters
15
+
16
+ | Parameter | Type | Default | Description |
17
+ | ----------------- | ------- | ------- | ---------------------------------------------------------------------------------- |
18
+ | `$properties-map` | Map | — | CSS property config with `prefix`, `values`, `unit`, `positions`, `omit-axis-keys` |
19
+ | `$responsive` | Boolean | `false` | Generate responsive variants (`md:`, `lg:`, etc.) |
20
+ | `$with-state` | Boolean | `false` | Generate state variants (`:hover`, `:focus`, `:active`) |
21
+ | `$debug` | Boolean | `false` | Output debug info during compilation |
22
+
23
+ ### `$properties-map` Configuration
24
+
25
+ ```scss +code
26
+ $border-properties-map: (
27
+ border-width: (
28
+ prefix: 'bdr-', // Class prefix (optional)
29
+ values: $border-width-map, // Values to generate (required)
30
+ positions: $logical-position-map, // For directional properties (t, b, l, r)
31
+ omit-axis-keys: (xy), // Exclude x/y combinations
32
+ unit: 'px' // CSS unit
33
+ ),
34
+ border-color: (
35
+ prefix: 'bdr-',
36
+ values: $colors-map
37
+ )
38
+ );
39
+
40
+ @include build-classes($border-properties-map);
41
+ ```
42
+
43
+ ## Examples
44
+
45
+ ### Basic Usage
46
+
47
+ ```scss +code
48
+ @include build-classes((
49
+ margin: (
50
+ prefix: 'm-',
51
+ values: (1, 2, 3, 4),
52
+ unit: 'rem'
53
+ )
54
+ ));
55
+ // Output: .m-1, .m-2, .m-3, .m-4
56
+ ```
57
+
58
+ ### With Positions
59
+
60
+ ```scss +code
61
+ @include build-classes((
62
+ margin: (
63
+ prefix: 'm-',
64
+ values: (1, 2, 3),
65
+ positions: (t: margin-top, b: margin-bottom, l: margin-left, r: margin-right),
66
+ unit: 'rem'
67
+ )
68
+ ));
69
+ // Output: .m-1, .mt-1, .mb-1, .ml-1, .mr-1
70
+ ```
71
+
72
+ ### With Responsive Variants
73
+
74
+ ```scss +code
75
+ @include build-classes((
76
+ display: (prefix: 'd-', values: (flex, grid, block, hidden))
77
+ ), $responsive: true);
78
+ // Output: .d-flex, .md:d-flex, .lg:d-flex, etc.
79
+ ```
80
+
81
+ ### With State Variants
82
+
83
+ ```scss +code
84
+ @include build-classes((
85
+ opacity: (prefix: 'op-', values: (0.5, 0.75, 1))
86
+ ), $with-state: true);
87
+ // Output: .op-0.5, .op-0.5:hover, .op-0.5:focus, etc.
88
+ ```
89
+
90
+ ### Omitting Axis Combinations
91
+
92
+ ```scss +code
93
+ @include build-classes((
94
+ border-width: (
95
+ prefix: 'bdr-',
96
+ values: (1, 2, 3),
97
+ positions: $logical-position-map,
98
+ omit-axis-keys: (xy), // Exclude x/y combinations
99
+ unit: 'px'
100
+ )
101
+ ));
102
+ ```
103
+
104
+ ## Output Structure
105
+
106
+ Pattern: `{breakpoint}:{property}-{value}{state}`
107
+
108
+ Examples: `m-1`, `md:m-1`, `m-1:hover`, `md:m-1:hover`