wispcss 0.0.1 → 1.0.4

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 (96) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/LICENSE +49 -0
  3. package/README.md +386 -0
  4. package/README.zh-CN.md +385 -0
  5. package/dist/wispcss.css +45823 -0
  6. package/dist/wispcss.min.css +2 -0
  7. package/examples/add-h2-ids.cjs +284 -0
  8. package/examples/demo-actions.html +188 -0
  9. package/examples/demo-alarm.html +219 -0
  10. package/examples/demo-animation.html +399 -0
  11. package/examples/demo-aura.html +195 -0
  12. package/examples/demo-avatar.html +279 -0
  13. package/examples/demo-background.html +284 -0
  14. package/examples/demo-badge.html +398 -0
  15. package/examples/demo-blob.html +307 -0
  16. package/examples/demo-blockquote.html +190 -0
  17. package/examples/demo-bookmark.html +243 -0
  18. package/examples/demo-breadcrumb.html +179 -0
  19. package/examples/demo-btns.html +349 -0
  20. package/examples/demo-bubble.html +215 -0
  21. package/examples/demo-buoy.html +187 -0
  22. package/examples/demo-button-icon.html +231 -0
  23. package/examples/demo-button-link.html +177 -0
  24. package/examples/demo-button.html +361 -0
  25. package/examples/demo-callout.html +601 -0
  26. package/examples/demo-check.html +323 -0
  27. package/examples/demo-code.html +212 -0
  28. package/examples/demo-color.html +545 -0
  29. package/examples/demo-comment.html +510 -0
  30. package/examples/demo-deform.html +229 -0
  31. package/examples/demo-dialog.html +932 -0
  32. package/examples/demo-divider.html +208 -0
  33. package/examples/demo-drawer.html +623 -0
  34. package/examples/demo-dropmenu.html +382 -0
  35. package/examples/demo-droppanel.html +354 -0
  36. package/examples/demo-ellipsis.html +145 -0
  37. package/examples/demo-emphasis.html +146 -0
  38. package/examples/demo-empty.html +112 -0
  39. package/examples/demo-entry.html +219 -0
  40. package/examples/demo-field.html +359 -0
  41. package/examples/demo-file.html +206 -0
  42. package/examples/demo-flag.html +225 -0
  43. package/examples/demo-form.html +201 -0
  44. package/examples/demo-gilt.html +170 -0
  45. package/examples/demo-heading.html +93 -0
  46. package/examples/demo-icon.html +164 -0
  47. package/examples/demo-input.html +300 -0
  48. package/examples/demo-kbd.html +202 -0
  49. package/examples/demo-lamp.html +248 -0
  50. package/examples/demo-link.html +142 -0
  51. package/examples/demo-normalize.html +366 -0
  52. package/examples/demo-otp.html +277 -0
  53. package/examples/demo-pagination.html +562 -0
  54. package/examples/demo-position.html +205 -0
  55. package/examples/demo-poster.html +384 -0
  56. package/examples/demo-pre - /345/211/257/346/234/254.html" +169 -0
  57. package/examples/demo-pre.html +205 -0
  58. package/examples/demo-preset.html +344 -0
  59. package/examples/demo-progress.html +303 -0
  60. package/examples/demo-range.html +211 -0
  61. package/examples/demo-rank.html +270 -0
  62. package/examples/demo-rating.html +251 -0
  63. package/examples/demo-reset.html +105 -0
  64. package/examples/demo-segment.html +436 -0
  65. package/examples/demo-select.html +332 -0
  66. package/examples/demo-shadow.html +152 -0
  67. package/examples/demo-shell.html +377 -0
  68. package/examples/demo-shimmer.html +217 -0
  69. package/examples/demo-size.html +149 -0
  70. package/examples/demo-skeleton.html +143 -0
  71. package/examples/demo-sketch.html +213 -0
  72. package/examples/demo-spacer.html +150 -0
  73. package/examples/demo-spinner.html +220 -0
  74. package/examples/demo-stats.html +165 -0
  75. package/examples/demo-status.html +212 -0
  76. package/examples/demo-step.html +240 -0
  77. package/examples/demo-styles.css +14 -0
  78. package/examples/demo-summary.html +128 -0
  79. package/examples/demo-swatch.html +253 -0
  80. package/examples/demo-switch.html +223 -0
  81. package/examples/demo-table.html +339 -0
  82. package/examples/demo-tag.html +318 -0
  83. package/examples/demo-text.html +91 -0
  84. package/examples/demo-theme.html +167 -0
  85. package/examples/demo-tools.html +152 -0
  86. package/examples/demo-transition.html +169 -0
  87. package/examples/demo-tree.html +929 -0
  88. package/examples/demo-underline.html +76 -0
  89. package/examples/demo-utils.js +131 -0
  90. package/examples/demo-validate.html +120 -0
  91. package/examples/index.html +149 -0
  92. package/package.json +72 -8
  93. package/script-gen-color.js +148 -0
  94. package/script-mini.js +78 -0
  95. package/script-prefix.js +398 -0
  96. package/skill.md +575 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,74 @@
1
+ # Changelog
2
+
3
+ All changes to WispCSS including new features, updates, and removals are documented here.
4
+
5
+
6
+ ## [v1.0.4] - 2026-10-28
7
+
8
+ ### Changes
9
+
10
+ #### Added
11
+ - Added handling for `menu` nodes.
12
+ - Added the `src-prefix` package for projects using the `tailwind` prefix.
13
+ - Added the `script-prefix.js` script; running `npm run prefix` generates prefixed `src` files.
14
+
15
+ #### Fixed
16
+ - Fixed the background color issue for `meter` nodes.
17
+ - Changed the `var(--spancing)*n` syntax to `--spacing(n)`;
18
+ - Used the `--theme` system approach to ensure variables work correctly in prefix mode.
19
+
20
+ #### Edited
21
+ - Changed the static `.light` and `.dark` classes to utility classes.
22
+
23
+ #### Removed
24
+ - Removed `normalize.css` and fully switched to Tailwind's Preflight.
25
+
26
+ ## [v1.0.3] - 2026-08-03
27
+
28
+ ### Changes
29
+
30
+ #### Added
31
+ - Added the `tree` component. / 新增`tree`组件。
32
+ - Added the `--default-size-check` variable to globally control the default size of radio and checkbox elements. / 新增`--default-size-check`变量,全局控制radio和checkbox的默认尺寸。
33
+
34
+ #### Fixed
35
+ - Fixed an issue where the `font-mono` font displayed incorrectly when rendering Chinese/Japanese text. / 修复`font-mono`字体在现实中文/日文时的问题。
36
+
37
+ #### Edited
38
+ - Changed the `disabled` color semantics to `placeholder`. / 将`disabled`颜色语义改成了`placeholder`。
39
+
40
+
41
+ ## [v1.0.2] - 2026-07-30
42
+
43
+ ### Changes
44
+
45
+ #### Added
46
+ - Added `pre.css` file and new utilities related to `pre` elements. / 新增`pre.css`文件,并新增了与pre相关的utilities。
47
+
48
+ #### Fixed
49
+ - Modified the `segment` component to add a border to the `selected` item. / 修改`segment`组件,对`selected`项添加边框。
50
+ - Modified the `blockquote-quote` utility to remove the `:after` pseudo-element. / 修改了`blockquote-quote`这个utility,删除`:after`伪元素。
51
+ - Changed the default color of the `code` element to `currentColor`. / 修改了`code`节点的默认颜色为`currentColor`。
52
+ - Updated the default background color of the `skeleton` component. / 修改了`skeleton`组件的默认背景色。
53
+
54
+ ## [v1.0.1] - 2026-07-14
55
+
56
+ ### Distribution Files
57
+ - **Compiled CSS**: `dist/wispcss.css` — compiled production file
58
+ - **Examples**: `examples/index.html` directory with HTML demo files for all components
59
+
60
+ > Note: The `src/` directory contains commercial source CSS files and is **not** included in the published npm package. It is available for purchase separately.
61
+
62
+ ### Changes
63
+
64
+ #### Added
65
+ - Initial release of WispCSS — a pure CSS component and utility library built on the Tailwind CSS v4 compiler.
66
+ - **Components**: 40+ UI components including buttons, badges, tags, breadcrumbs, pagination, steps, dividers, inputs, forms, switches, checkboxes, avatars, blockquotes, code blocks, kbd, links, emphasis, underline, ellipsis, gilt, spinner, progress, stats, rank, buoy, flag, segment, swatch, poster, blob, bubble, callout, alarm, aura, sketch, shadow, comment, tools, spacer, lamp, bookmark, dropmenu, droppanel, table, heading, dialog, deform, shimmer, shell, field, and more.
67
+ - **Utilities**: Supplemental utility classes not included in Tailwind CSS by default (`inline-flex-center`, `flex-center`, `disabled`, `inactive`, `text-3xs`, `text-2xs`, `hidden-appearance`, `background-cover`, `rotate-*`).
68
+ - **Animation**: `transition` utilities and `animate-*` keyframe animation classes.
69
+ - **Color System**: Complete design token system based on the OKLCH color space with automatic dark/light mode adaptation.
70
+ - **Dark Mode**: Support via `.dark` class or `prefers-color-scheme: dark`.
71
+ - **RTL Support**: Direction-aware components using CSS logical properties and `:dir()` selector.
72
+ - **Tree-shaking**: All components written as Tailwind v4 `@utility` blocks for automatic dead code elimination.
73
+ - **Documentation**: Bilingual README (English and Chinese) with AI-friendly design notes.
74
+ - **Examples**: Comprehensive demo HTML files for every component with visual references.
package/LICENSE ADDED
@@ -0,0 +1,49 @@
1
+ # WispCSS License
2
+
3
+ Copyright (c) 2026 DEVIVID.COM
4
+
5
+ This repository contains files under two different licenses:
6
+
7
+ ---
8
+
9
+ ## Commercial Software License Agreement (CSLA)
10
+
11
+ **Applies to: All files in the `src/` directory**
12
+
13
+ The files in the `src/` directory are proprietary commercial software. All rights are reserved.
14
+
15
+ ### Terms and Conditions
16
+
17
+ 1. **License Grant**: A paid license is required to use, copy, modify, or distribute any files from the `src/` directory in any project, whether personal, commercial, or otherwise.
18
+
19
+ 2. **Restrictions**: Without a valid paid license, you may NOT:
20
+ - Use the source files in any project
21
+ - Copy, modify, or distribute the source files
22
+ - Create derivative works based on the source files
23
+ - Include the source files in any software distribution
24
+
25
+ 3. **Purchase**: To obtain a license, see the contact information at the bottom of this file.
26
+
27
+ 4. **Warranty Disclaimer**: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28
+
29
+ 5. **Liability**: IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30
+
31
+ ---
32
+
33
+ ## MIT License
34
+
35
+ **Applies to: All other files (examples/, dist/, docs/, configuration files, etc.)**
36
+
37
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
38
+
39
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
40
+
41
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
42
+
43
+ ---
44
+
45
+ ## Contact
46
+
47
+ For licensing inquiries or questions:
48
+ - Email: zimeko2026@outlook.com
49
+ - Website: https://wispcss.zimeko.com
package/README.md ADDED
@@ -0,0 +1,386 @@
1
+ # WispCSS
2
+
3
+ > [中文版](./README.zh-CN.md)
4
+
5
+
6
+ A pure CSS component and utility library built on the Tailwind CSS v4 compiler. Fully documented with inline comments, AI-friendly. It provides styled HTML native elements and a comprehensive set of utility classes for UI layout, without requiring any JavaScript.
7
+
8
+ Explore **[100 Component Demos](https://unpkg.com/wispcss/examples/index.html)** →
9
+
10
+ ---
11
+
12
+ ## Overview
13
+
14
+ WispCSS serves as the foundational CSS layer for web projects. It sits on top of Tailwind CSS and below application-level styles, functioning as the base design system. It is not a replacement for Tailwind, but an extension that adds:
15
+
16
+ - Pre-styled HTML native elements (inputs, buttons, forms, tables, etc.)
17
+ - A library of UI components (badges, tags, breadcrumbs, pagination, steps, dividers, etc.)
18
+ - Utility classes that supplement Tailwind's default offerings
19
+ - A complete design token system based on the OKLCH color space
20
+
21
+ All components and utilities are authored as Tailwind v4 `@utility` directives. When compiled with the Tailwind CLI, unused classes are automatically removed via tree-shaking.
22
+
23
+ ---
24
+
25
+ ## AI-Friendly
26
+
27
+ WispCSS is designed with AI engines in mind. Every CSS file in `src/` contains extensive inline comments explaining each component's structure, variants, and usage patterns. This means:
28
+
29
+ - **An AI engine reading `src/index.css` alone can fully understand the entire project** — all components, utilities, and their relationships are documented in context.
30
+ - **Pair with `examples/index.html`** for even greater accuracy: the example file maps every component to its visual demo, giving an AI a complete reference of how each component looks and behaves.
31
+ - Together, these files enable an AI to **quickly auto-create accurate demos and usage examples** without external documentation.
32
+ - To reduce token usage, simply have the AI read the `skill.md` file directly.
33
+
34
+ ---
35
+
36
+ ## Target Audience
37
+
38
+ Any project that already uses **Tailwind CSS** can adopt WispCSS directly.
39
+
40
+ ---
41
+
42
+ ## Browser Compatibility
43
+
44
+ The project uses modern CSS features. The following browser versions are required:
45
+
46
+ | Feature | Minimum Browser Support |
47
+ | ------------------------ | ------------------------------------------------------- |
48
+ | OKLCH color space | Chrome 111+, Safari 15.4+, Firefox 113+ (March 2023) |
49
+ | CSS Nesting (`&`) | Chrome 120+, Safari 17.2+, Firefox 117+ (December 2023) |
50
+ | `:has()` selector | Chrome 105+, Safari 15.4+, Firefox 121+ |
51
+ | `:dir()` selector | Chrome 120+, Safari 16.6+, Firefox 120+ (December 2023) |
52
+ | `:user-invalid` selector | Chrome 119+, Safari 16.5+, Firefox 88+((October 2023) |
53
+ | `@property` | Chrome 85+, Safari 15.4+, Firefox 128+ |
54
+ | `container-type` | Chrome 105+, Safari 16+, Firefox 110+ |
55
+
56
+ ---
57
+
58
+ ## Installation
59
+
60
+ ### Prerequisites
61
+
62
+ - [Tailwind CSS v4](https://tailwindcss.com/docs/installation/) installed and configured in your project.
63
+
64
+ ### Method 1: Manual Setup (Recommended)
65
+
66
+ This is the recommended approach. Place the purchased `src/` directory anywhere inside your project (e.g. `lib/wispcss/src/`), add it to version control, and import it directly. The files stay under your control and are never affected by `npm install`.
67
+
68
+ 1. Copy the purchased `src/` directory into your project, for example:
69
+
70
+ ```
71
+ your-project/
72
+ └── lib/
73
+ └── wispcss/
74
+ └── src/
75
+ ├── index.css
76
+ ├── button.css
77
+ └── ...
78
+ ```
79
+
80
+ 2. Import in your CSS entry point:
81
+
82
+ ```css
83
+ /* Example: app.css */
84
+ @import "./lib/wispcss/src/index.css";
85
+ ```
86
+
87
+ 3. Configure Tailwind CSS:
88
+
89
+ ```css
90
+ @import "tailwindcss";
91
+ @import "./lib/wispcss/src/index.css";
92
+ ```
93
+
94
+ 4. Run the Tailwind CLI to compile:
95
+
96
+ ```bash
97
+ npx @tailwindcss/cli -i app.css -o dist/output.css
98
+ ```
99
+
100
+ ### Method 2: Install via npm
101
+
102
+ The npm package does **not** include the `src/` source files by default, since they are commercial software (see [License](#license)). After purchasing a license, place the `src/` directory you received into `node_modules/@zimeko/wispcss/src/` to enable the imports below.
103
+
104
+ 1. Install the package:
105
+
106
+ ```bash
107
+ npm install @zimeko/wispcss
108
+ ```
109
+
110
+ 2. Obtain a license and copy the purchased `src/` directory into:
111
+
112
+ ```
113
+ node_modules/@zimeko/wispcss/src/
114
+ ```
115
+
116
+ 3. Import in your CSS entry point:
117
+
118
+ ```css
119
+ /* Import everything */
120
+ @import "@zimeko/wispcss";
121
+
122
+ /* Core only — components + utilities, no Tailwind import (import Tailwind yourself first) */
123
+ @import "@zimeko/wispcss/core.css";
124
+
125
+ /* Or import specific components */
126
+ @import "@zimeko/wispcss/color.css";
127
+ @import "@zimeko/wispcss/button.css";
128
+ @import "@zimeko/wispcss/input.css";
129
+ ```
130
+
131
+ 4. Configure Tailwind CSS:
132
+
133
+ ```css
134
+ @import "tailwindcss";
135
+ @import "@zimeko/wispcss";
136
+ ```
137
+
138
+ 5. Run the Tailwind CLI to compile:
139
+
140
+ ```bash
141
+ npx @tailwindcss/cli -i app.css -o dist/output.css
142
+ ```
143
+
144
+ > Note: Since `node_modules` is typically excluded from version control and reinstalled via `npm install`, you will need to re-copy the `src/` directory into `node_modules/@zimeko/wispcss/src/` after every fresh install (e.g. in CI pipelines or after `npm ci`).
145
+
146
+ ### Method 3: Use Your Own Tailwind Import (`core.css`)
147
+
148
+ Methods 1 and 2 import `index.css`, which is nothing more than an entry point:
149
+
150
+ ```css
151
+ @import "tailwindcss";
152
+ @import "./core.css";
153
+ ```
154
+
155
+ `core.css` contains the whole library (components, utilities, design tokens) and **does not import Tailwind itself**. If your project already imports Tailwind CSS somewhere else — a framework preset, a shared entry file, or a custom `prefix(...)` / `@theme` setup — import `core.css` instead, so the Tailwind layer is not loaded twice:
156
+
157
+ ```css
158
+ /* Example: app.css */
159
+ @import "tailwindcss"; /* your own Tailwind setup, imported first */
160
+ @import "./lib/wispcss/src/core.css"; /* WispCSS components and utilities only */
161
+ ```
162
+
163
+ - **Tailwind must be imported first.** `core.css` relies on Tailwind v4 features (`@utility`, `@theme`, `--theme()`, `--spacing()`), so it cannot be compiled on its own.
164
+ - **Everything else stays the same.** Same class names, same tree-shaking; only the Tailwind import is under your control.
165
+ - **Prefix-friendly.** If your Tailwind entry uses `prefix(tw)`, pair it with `src-prefix/core.css` (see *Using a Prefix* below).
166
+
167
+ ---
168
+
169
+ ## Usage
170
+
171
+ WispCSS components use Tailwind v4 `@utility` directives. They are applied as class names in your HTML.
172
+
173
+ ```html
174
+ <!-- Buttons -->
175
+ <button class="btn-primary">Submit</button>
176
+ <button class="btn-outline-error">Cancel</button>
177
+
178
+ <!-- Badges -->
179
+ <span class="badge badge-success">10</span>
180
+
181
+ <!-- Inputs -->
182
+ <input class="input-subtle-primary input-8 input-rounded" placeholder="Name" />
183
+
184
+ <!-- Typography colors -->
185
+ <p class="text-primary">Highlighted text</p>
186
+ ```
187
+
188
+ ---
189
+
190
+ ## Using a Prefix (`src-prefix/`)
191
+
192
+ Tailwind CSS v4 can prefix every generated utility (`tw:btn-primary` instead of `btn-primary`). WispCSS ships a ready-to-use prefixed copy of its source in `src-prefix/`, so its class names can never collide with your own Tailwind classes, another version of the library, or a third-party UI kit.
193
+
194
+ ### What is inside `src-prefix/`
195
+
196
+ - The same file list as `src/` — `index.css`, `core.css` and every component file.
197
+ - `src-prefix/index.css` imports Tailwind with the prefix applied:
198
+
199
+ ```css
200
+ @import "tailwindcss" prefix(tw);
201
+ @import "./core.css";
202
+ ```
203
+
204
+ - Every `@apply` statement **and** every static class selector in a rule header is prefixed as well, because Tailwind v4 requires prefixed names in both places:
205
+
206
+ ```css
207
+ /* src/check.css */
208
+ &:where(.check-subtle, .check-ghost) {
209
+ @apply transition-all-normal;
210
+ }
211
+
212
+ /* src-prefix/check.css */
213
+ &:where(.tw\:check-subtle, .tw\:check-ghost) {
214
+ @apply tw:transition-all-normal;
215
+ }
216
+ ```
217
+
218
+ The backslash is the CSS escape for the colon, so `.tw\:check-subtle` matches the HTML class `tw:check-subtle`.
219
+
220
+ ### Import
221
+
222
+ Local paths (source copied into your project):
223
+
224
+ ```css
225
+ /* Tailwind + all components, prefix = tw */
226
+ @import "./lib/wispcss/src-prefix/index.css";
227
+
228
+ /* Or: your own Tailwind entry + prefixed components */
229
+ @import "tailwindcss" prefix(tw);
230
+ @import "./lib/wispcss/src-prefix/core.css";
231
+ ```
232
+
233
+ npm subpaths (source copied into `node_modules/@zimeko/wispcss/`) — the `.css` extension is optional:
234
+
235
+ ```css
236
+ @import "@zimeko/wispcss/prefix"; /* = src-prefix/index.css (includes prefix(tw)) */
237
+ @import "@zimeko/wispcss/prefix/core.css"; /* = src-prefix/core.css (Tailwind imported by you) */
238
+ @import "@zimeko/wispcss/prefix/button"; /* = src-prefix/button.css (single component) */
239
+ ```
240
+
241
+ Full subpath map:
242
+
243
+ | Specifier | File | Tailwind included |
244
+ | ------------------------------------ | ------------------------------- | ------------------ |
245
+ | `@zimeko/wispcss` | `src/index.css` | Yes |
246
+ | `@zimeko/wispcss/core.css` | `src/core.css` | No |
247
+ | `@zimeko/wispcss/<component>.css` | `src/<component>.css` | No |
248
+ | `@zimeko/wispcss/prefix` | `src-prefix/index.css` | Yes, `prefix(tw)` |
249
+ | `@zimeko/wispcss/prefix/core.css` | `src-prefix/core.css` | No |
250
+ | `@zimeko/wispcss/prefix/<component>` | `src-prefix/<component>.css` | No |
251
+
252
+ > The prefix name inside `src-prefix/index.css` is fixed to whatever `npm run prefix` generated (default `tw`). If you import `src-prefix/core.css`, your own Tailwind entry must use the **same** prefix: `@import "tailwindcss" prefix(tw);`.
253
+
254
+ ```html
255
+ <button class="tw:btn-primary">Submit</button>
256
+ <span class="tw:badge tw:badge-success">10</span>
257
+ <input class="tw:input-subtle tw:input-8 tw:input-rounded" placeholder="Name" />
258
+ ```
259
+
260
+ ### Regenerate with a different prefix
261
+
262
+ `src-prefix/` is generated output — never edit it by hand. The generator script uses Node.js built-ins only (Node 18+), so no extra dependency is required:
263
+
264
+ ```bash
265
+ npm run prefix
266
+ ```
267
+
268
+ It asks for the prefix and starts immediately when you press Enter:
269
+
270
+ ```
271
+ Enter Tailwind prefix (press Enter to use the default "tw"):
272
+ ```
273
+
274
+ - Press **Enter** to keep the default `tw`.
275
+ - Type another name (e.g. `wisp`) to get `wisp:btn-primary`.
276
+
277
+ The script then deletes and rebuilds `src-prefix/` from `src/`, rewriting the entry import, every `@apply` statement and every class selector — including `:where()`, `:not()`, `:has()`, `:is()`, nested and multi-line selectors. Comments, strings, attribute selectors (`[class*="..."]`) and declaration values are left untouched.
278
+
279
+ > Since the directory is deleted on every run, make your changes in `src/` and regenerate.
280
+
281
+ ---
282
+
283
+ ## Included Components
284
+
285
+ The library provides 50+ components and utility groups, including but not limited to:
286
+
287
+ | Category | Components |
288
+ | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
289
+ | Buttons | `btn` (solid / outline / subtle / ghost / vivid / link variants), `btns` (grouped button layouts) |
290
+ | Forms | `input` / `textarea` / `select` (shared text-input styling), `field` (form layout), `shell` (input wrapper), `check` (checkbox/radio), `switch`, `rating` (star rating), `otp` (one-time password), `validate` (validation feedback) |
291
+ | Display | `avatar`, `badge`, `tag`, `segment` (pill radio group), `flag` (corner ribbon), `buoy` (dual-segment badge), `rank`, `stats`, `swatch` (color swatch), `progress`, `spinner`, `poster` (image cover), `icon`, `skeleton`, `table`, `tree` (hierarchical tree) |
292
+ | Navigation | `breadcrumb`, `pagination`, `step`, `dropmenu`, `droppanel`, `lamp` (indicator-bar tabs), `bookmark` (tab-style switch), `tools` (action toolbar) |
293
+ | Typography | `link`, `code`, `pre`, `blockquote`, `kbd`, `ellipsis`, `underline`, `emphasis`, `gilt` (gradient text) |
294
+ | Layout | `divider`, `spacer`, `comment` (comment threads), `entry` (list item container) |
295
+ | Decoration | `background` (pattern & gradient backgrounds), `blob` (organic shapes), `bubble` (popover with arrow), `callout`, `alarm` (pulse badge), `aura` (animated glow border), `sketch` (hand-drawn styles), `shimmer`, `shadow` |
296
+ | Status | `status` (status dot), `deform` (morphing CSS icons), `empty` (empty state placeholder) |
297
+ | Animation | `animation` keyframe utilities, `transition` utilities |
298
+ | Color | `color` design tokens (OKLCH-based theme system), `theme` utilities |
299
+
300
+ ---
301
+
302
+ ## Supplemental Utilities
303
+
304
+ WispCSS adds utility classes that are not included in Tailwind CSS by default:
305
+
306
+ | Utility | Description |
307
+ | -------------------- | ------------------------------------------------------------------------------------ |
308
+ | `inline-flex-center` | Shortcut for `display: inline-flex; align-items: center; justify-content: center;` |
309
+ | `flex-center` | Shortcut for `display: flex; align-items: center; justify-content: center;` |
310
+ | `disabled` | Applies disabled-state opacity and cursor |
311
+ | `inactive` | Applies reduced opacity for non-interactive elements |
312
+ | `text-3xs` | 8px font size (`max(0.5rem, 8px)`) |
313
+ | `text-2xs` | 10px font size (`max(0.625rem, 10px)`) |
314
+ | `hidden-appearance` | Visually hides input while keeping it accessible |
315
+ | `background-cover` | `background-size: cover; background-position: center; background-repeat: no-repeat;` |
316
+ | `rotate-reverse` | 180-degree rotation |
317
+ | `rotate-cross` | 45-degree rotation (plus to cross) |
318
+ | `rotate-expand` | 90-degree rotation |
319
+ | `rotate-collapse` | -90-degree rotation |
320
+
321
+ ---
322
+
323
+ ## Technical Notes
324
+
325
+ ### Color System
326
+
327
+ WispCSS uses the **OKLCH** color space for all theme colors. This provides perceptually uniform lightness, which allows the framework to automatically adjust text contrast for both light and dark modes. The color system is defined via CSS custom properties and computed dynamically based on lightness thresholds.
328
+
329
+ ### Tree-shaking
330
+
331
+ Because all components are defined as Tailwind v4 `@utility` blocks, only the classes you actually use in your HTML will be included in the compiled CSS output. This keeps the final file size minimal.
332
+
333
+ ### RTL Support
334
+
335
+ Components that depend on direction (arrows, spacing, borders) use CSS logical properties (`inset-inline-start`, `border-inline-end`, `padding-inline`, etc.) and the `:dir()` selector. Right-to-left layout is supported without additional configuration.
336
+
337
+ ### Dark Mode
338
+
339
+ Dark mode is activated by adding the class `dark` to a parent container, or automatically via `prefers-color-scheme: dark`. The theme adjusts all components accordingly.
340
+
341
+ ---
342
+
343
+ ## Project Structure
344
+
345
+ | Path | Description |
346
+ | ------------------ | ---------------------------------------------------------------------------------- |
347
+ | `src/index.css` | Entry point: `@import "tailwindcss";` followed by `core.css` |
348
+ | `src/core.css` | Components, utilities and tokens only — for projects importing Tailwind themselves |
349
+ | `src/` | Source CSS files (`*.css` with `@utility` directives) |
350
+ | `src-prefix/` | Prefixed copy of `src/` (`tw:` namespace), generated by `npm run prefix` |
351
+ | `script-prefix.js` | Prefix generator used by `npm run prefix` |
352
+ | `dist/` | Compiled output (`wispcss.css`, `wispcss.min.css`) |
353
+ | `examples/` | HTML demo files for all components |
354
+ | `CHANGELOG.md` | Version history |
355
+ | `LICENSE` | License information |
356
+
357
+ ---
358
+
359
+ ## Links
360
+
361
+ - **GitHub**: [https://github.com/zimeko/wispcss](https://github.com/zimeko/wispcss)
362
+ - **Gitee**: [https://gitee.com/zimeko/wispcss](https://gitee.com/zimeko/wispcss)
363
+ - **Online Demo**: [https://zimeko.github.io/wispcss/](https://zimeko.github.io/wispcss/)
364
+ - **Issue Tracking**: [https://github.com/zimeko/wispcss/issues](https://github.com/zimeko/wispcss/issues)
365
+ - **Feedback**: [https://www.zimeko.com/feedback/wispcss](https://www.zimeko.com/feedback/wispcss)
366
+ - **Contact**: zimeko2026@outlook.com
367
+
368
+ ---
369
+
370
+ ## License
371
+
372
+ ### Source files (`src/`)
373
+
374
+ The files in the `src/` directory are **commercial software**. A paid license is required to use them in any project, including personal and commercial work.
375
+
376
+ Purchase a license through [ZIMEKO](https://wispcss.zimeko.com) payment.
377
+
378
+ ### Other files
379
+
380
+ All other files in this repository (including `examples/`, `dist/`, `docs/`, configuration files) are distributed under the **MIT License**.
381
+
382
+ ---
383
+
384
+ ## Changelog
385
+
386
+ See [CHANGELOG.md](./CHANGELOG.md) for version history.