wispcss 0.0.0-stage → 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 +385 -2
  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 +73 -3
  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
@@ -0,0 +1,112 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+ <link id="wispcss-css" rel="stylesheet" href="../dist/wispcss.css">
8
+ <link rel="stylesheet" href="./demo-styles.css">
9
+ <title>Empty - WispCSS Demo</title>
10
+ </head>
11
+
12
+ <body>
13
+ <h1>Empty Component</h1>
14
+ <p>Empty state placeholder with text and optional SVG illustration. Supports <code>data-empty</code> for custom messages and <code>--i18n-no-data</code> for locale defaults.</p>
15
+
16
+ <h2>Notes</h2>
17
+ <div class="section">
18
+ <ul>
19
+ <li>Base class: <code>.empty</code>. Displays centered caption text via <code>::before</code> pseudo-element.</li>
20
+ <li>Custom text via <code>data-empty="Your message"</code> attribute. Falls back to <code>--i18n-no-data</code> CSS variable (default "No Data").</li>
21
+ <li>Add <code>.empty-illustrated</code> for an SVG illustration above the text.</li>
22
+ <li>Children (e.g. buttons, links) are automatically placed below the text via flex column layout.</li>
23
+ <li>Custom colors are supported — <code>.empty</code> text and SVG illustration color inherit from <code>text-*</code> utilities (e.g. <code>text-gray-300</code>).</li>
24
+ </ul>
25
+ </div>
26
+
27
+ <h2 id="text-only">Text-only</h2>
28
+ <div class="section">
29
+ <div>
30
+ <h3>Custom message</h3>
31
+ <div class="empty" data-empty="No data available"></div>
32
+ </div>
33
+ <div>
34
+ <h3>Default message</h3>
35
+ <div class="empty"></div>
36
+ </div>
37
+ <div>
38
+ <h3>Custom i18n default</h3>
39
+ <div class="empty" style="--i18n-no-data: 'No Content'"></div>
40
+ </div>
41
+ </div>
42
+
43
+ <h2 id="illustrated">Illustrated</h2>
44
+ <div class="section">
45
+ <div>
46
+ <h3>With custom message</h3>
47
+ <div class="empty empty-illustrated" data-empty="No search results"></div>
48
+ </div>
49
+ <div>
50
+ <h3>Default message</h3>
51
+ <div class="empty empty-illustrated"></div>
52
+ </div>
53
+ <div>
54
+ <h3>Use color</h3>
55
+ <div class="empty empty-illustrated text-blue-300"></div>
56
+ </div>
57
+ </div>
58
+
59
+ <h2 id="with-actions">With actions</h2>
60
+ <div class="section">
61
+ <div>
62
+ <h3>Text + button</h3>
63
+ <div class="empty" data-empty="No data">
64
+ <div><button>Refresh</button></div>
65
+ </div>
66
+ </div>
67
+ <div>
68
+ <h3>Illustrated + buttons</h3>
69
+ <div class="empty empty-illustrated" data-empty="Nothing found">
70
+ <div><button class="btn-primary">Go Home</button> <button>Retry</button></div>
71
+ </div>
72
+ </div>
73
+ <div>
74
+ <h3>With link</h3>
75
+ <div class="empty" data-empty="Cart is empty">
76
+ <div><a class="btn btn-primary" href="#">Browse</a></div>
77
+ </div>
78
+ </div>
79
+ </div>
80
+
81
+ <h2 id="use-cases">Use cases</h2>
82
+ <div class="section">
83
+ <div>
84
+ <h3>Search no results</h3>
85
+ <div class="empty empty-illustrated" data-empty="No results for 'wispcss'">
86
+ <div><button>Clear filters</button></div>
87
+ </div>
88
+ </div>
89
+ <div>
90
+ <h3>Empty messages</h3>
91
+ <div class="empty" data-empty="No new messages">
92
+ <div><button>View history</button></div>
93
+ </div>
94
+ </div>
95
+ <div>
96
+ <h3>Empty orders</h3>
97
+ <div class="empty empty-illustrated" data-empty="No orders yet">
98
+ <div><button class="btn-primary">Start Shopping</button></div>
99
+ </div>
100
+ </div>
101
+ <div>
102
+ <h3>Empty favorites</h3>
103
+ <div class="empty" data-empty="Favorites is empty">
104
+ <div><a class="btn btn-primary" href="#">Discover</a></div>
105
+ </div>
106
+ </div>
107
+ </div>
108
+
109
+ <script src="./demo-utils.js"></script>
110
+ </body>
111
+
112
+ </html>
@@ -0,0 +1,219 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+ <link id="wispcss-css" rel="stylesheet" href="../dist/wispcss.css">
8
+ <link rel="stylesheet" href="./demo-styles.css">
9
+ <title>Entry - WispCSS Demo</title>
10
+ </head>
11
+
12
+ <body>
13
+ <h1>Entry Component</h1>
14
+ <p>List item container with centered text and optional side media (icons, images, checkboxes). Supports single-line truncation, multi-line expansion, states, shapes, variants, and sizes.</p>
15
+
16
+ <h2>Notes</h2>
17
+ <div class="section">
18
+ <ul>
19
+ <li>Base structure: <code>.entry > .entry-body > .entry-label</code>. Side slots accept any content (icons, checkboxes, text).</li>
20
+ <li>States: <code>.entry-placeholder</code>, <code>.entry-selected</code>, <code>.entry-checked</code>.</li>
21
+ <li>Shapes: <code>.entry-rounded</code>, <code>.entry-pill</code> (pill).</li>
22
+ <li>Variants: <code>.entry-muted</code> (border), <code>.entry-outline</code> (dark border), <code>.entry-subtle</code> (background), <code>.entry-ghost</code> (hover bg).</li>
23
+ <li>Text features: <code>.entry-nowrap</code> (single-line truncation), <code>.entry-multiline</code> (wrap), <code>.entry-padded</code> (extra padding), <code>.entry-hoverable</code> (hover color).</li>
24
+ <li>Sizes: <code>entry-4</code> ~ <code>entry-15</code>. Default is entry-9.</li>
25
+ </ul>
26
+ </div>
27
+
28
+ <h2 id="basic">Basic usage</h2>
29
+ <div class="section">
30
+ <div>
31
+ <h3>Simple entry</h3>
32
+ <div class="entry">
33
+ <div class="entry-body">
34
+ <div class="entry-label">Basic entry item</div>
35
+ </div>
36
+ </div>
37
+ <div class="entry">
38
+ <div class="entry-body">
39
+ <div class="entry-label">With arrow</div>
40
+ </div>
41
+ <span>→</span>
42
+ </div>
43
+ <div class="entry">
44
+ <span>🔍</span>
45
+ <div class="entry-body">
46
+ <div class="entry-label">With icon on left</div>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ <div>
51
+ <h3>With icons + side info</h3>
52
+ <div class="entry">
53
+ <span>📁</span>
54
+ <div class="entry-body">
55
+ <div class="entry-label">Documents</div>
56
+ </div>
57
+ <span style="font-size:0.75rem;color:var(--color-caption);">12 items</span>
58
+ </div>
59
+ <div class="entry">
60
+ <span>🖼️</span>
61
+ <div class="entry-body">
62
+ <div class="entry-label">Images</div>
63
+ </div>
64
+ <span style="font-size:0.75rem;color:var(--color-caption);">8 items</span>
65
+ </div>
66
+ </div>
67
+ <div>
68
+ <h3>With checkbox</h3>
69
+ <div class="entry">
70
+ <input type="checkbox">
71
+ <div class="entry-body">
72
+ <div class="entry-label">Option 1</div>
73
+ </div>
74
+ </div>
75
+ <div class="entry">
76
+ <input type="checkbox" checked>
77
+ <div class="entry-body">
78
+ <div class="entry-label">Option 2 (checked)</div>
79
+ </div>
80
+ </div>
81
+ <div class="entry">
82
+ <input type="checkbox" disabled>
83
+ <div class="entry-body">
84
+ <div class="entry-label">Option 3 (disabled)</div>
85
+ </div>
86
+ </div>
87
+ </div>
88
+ </div>
89
+
90
+ <h2 id="states">States</h2>
91
+ <div class="section">
92
+ <div>
93
+ <h3>.entry-placeholder</h3>
94
+ <div class="entry entry-placeholder">
95
+ <div class="entry-body"><div class="entry-label">Disabled item</div></div>
96
+ </div>
97
+ <div class="entry entry-placeholder">
98
+ <span>🔒</span>
99
+ <div class="entry-body"><div class="entry-label">No access</div></div>
100
+ </div>
101
+ </div>
102
+ <div>
103
+ <h3>.entry-selected</h3>
104
+ <div class="entry entry-selected">
105
+ <div class="entry-body"><div class="entry-label">Selected item</div></div>
106
+ </div>
107
+ <div class="entry entry-selected">
108
+ <span>⭐</span>
109
+ <div class="entry-body"><div class="entry-label">Favorited</div></div>
110
+ </div>
111
+ </div>
112
+ <div>
113
+ <h3>.entry-checked</h3>
114
+ <div class="entry entry-checked">
115
+ <div class="entry-body"><div class="entry-label">Checked item</div></div>
116
+ </div>
117
+ <div class="entry entry-checked">
118
+ <span>📄</span>
119
+ <div class="entry-body"><div class="entry-label">Selected file</div></div>
120
+ </div>
121
+ </div>
122
+ <div>
123
+ <h3>Comparison</h3>
124
+ <div class="entry"><div class="entry-body"><div class="entry-label">Default</div></div></div>
125
+ <div class="entry entry-selected"><div class="entry-body"><div class="entry-label">Selected</div></div></div>
126
+ <div class="entry entry-checked"><div class="entry-body"><div class="entry-label">Checked</div></div></div>
127
+ <div class="entry entry-placeholder"><div class="entry-body"><div class="entry-label">Disabled</div></div></div>
128
+ </div>
129
+ </div>
130
+
131
+ <h2 id="shapes">Shapes</h2>
132
+ <div class="section">
133
+ <div>
134
+ <h3>Square (default)</h3>
135
+ <div class="entry entry-muted"><div class="entry-body"><div class="entry-label">Square item</div></div></div>
136
+ </div>
137
+ <div>
138
+ <h3>.entry-rounded</h3>
139
+ <div class="entry entry-rounded entry-muted"><div class="entry-body"><div class="entry-label">Rounded item</div></div></div>
140
+ </div>
141
+ <div>
142
+ <h3>.entry-pill (pill)</h3>
143
+ <div class="entry entry-pill entry-muted"><div class="entry-body"><div class="entry-label">Pill item</div></div></div>
144
+ </div>
145
+ </div>
146
+
147
+ <h2 id="variants">Variants</h2>
148
+ <div class="section">
149
+ <div>
150
+ <h3>Default (no bg/border)</h3>
151
+ <div class="entry"><div class="entry-body"><div class="entry-label">Default</div></div></div>
152
+ </div>
153
+ <div>
154
+ <h3>.entry-muted (border)</h3>
155
+ <div class="entry entry-muted"><div class="entry-body"><div class="entry-label">Muted</div></div></div>
156
+ </div>
157
+ <div>
158
+ <h3>.entry-outline (dark border)</h3>
159
+ <div class="entry entry-outline"><div class="entry-body"><div class="entry-label">Outline</div></div></div>
160
+ </div>
161
+ <div>
162
+ <h3>.entry-subtle (background)</h3>
163
+ <div class="entry entry-subtle"><div class="entry-body"><div class="entry-label">Subtle</div></div></div>
164
+ </div>
165
+ <div>
166
+ <h3>.entry-ghost (hover bg)</h3>
167
+ <div class="entry entry-ghost" style="cursor:pointer;"><div class="entry-body"><div class="entry-label">Ghost (hover me)</div></div></div>
168
+ </div>
169
+ </div>
170
+
171
+ <h2 id="text-features">Text features</h2>
172
+ <div class="section">
173
+ <div>
174
+ <h3>.entry-nowrap (single-line truncation)</h3>
175
+ <div class="entry entry-nowrap entry-muted" style="max-width:280px;">
176
+ <div class="entry-body"><div class="entry-label">This is a very long text that will be truncated with ellipsis when it exceeds the container width.</div></div>
177
+ </div>
178
+ </div>
179
+ <div>
180
+ <h3>.entry-multiline (wrap)</h3>
181
+ <div class="entry entry-multiline entry-muted" style="max-width:280px;">
182
+ <div class="entry-body"><div class="entry-label">Multi-line text that wraps automatically. Height adapts to content. Useful for longer descriptions in list items.</div></div>
183
+ </div>
184
+ </div>
185
+ <div>
186
+ <h3>.entry-padded (extra padding)</h3>
187
+ <div class="entry entry-padded entry-muted"><div class="entry-body"><div class="entry-label">Padded item</div></div></div>
188
+ <div class="entry entry-padded entry-subtle"><div class="entry-body"><div class="entry-label">Padded subtle</div></div></div>
189
+ </div>
190
+ <div>
191
+ <h3>.entry-hoverable (hover color)</h3>
192
+ <div class="entry entry-hoverable" style="cursor:pointer;"><div class="entry-body"><div class="entry-label">Hover me to see color change</div></div></div>
193
+ </div>
194
+ </div>
195
+
196
+ <h2 id="sizes">Sizes (entry-4 ~ entry-15)</h2>
197
+ <div class="section">
198
+ <div>
199
+ <div class="entry entry-4 entry-muted"><div class="entry-body"><div class="entry-label">entry-4</div></div></div>
200
+ <div class="entry entry-5 entry-muted"><div class="entry-body"><div class="entry-label">entry-5</div></div></div>
201
+ <div class="entry entry-6 entry-muted"><div class="entry-body"><div class="entry-label">entry-6</div></div></div>
202
+ <div class="entry entry-7 entry-muted"><div class="entry-body"><div class="entry-label">entry-7</div></div></div>
203
+ <div class="entry entry-8 entry-muted"><div class="entry-body"><div class="entry-label">entry-8</div></div></div>
204
+ <div class="entry entry-9 entry-muted"><div class="entry-body"><div class="entry-label">entry-9</div></div></div>
205
+ <div class="entry entry-10 entry-muted"><div class="entry-body"><div class="entry-label">entry-10</div></div></div>
206
+ <div class="entry entry-11 entry-muted"><div class="entry-body"><div class="entry-label">entry-11</div></div></div>
207
+ <div class="entry entry-12 entry-muted"><div class="entry-body"><div class="entry-label">entry-12</div></div></div>
208
+ <div class="entry entry-13 entry-muted"><div class="entry-body"><div class="entry-label">entry-13</div></div></div>
209
+ <div class="entry entry-14 entry-muted"><div class="entry-body"><div class="entry-label">entry-14</div></div></div>
210
+ <div class="entry entry-15 entry-muted"><div class="entry-body"><div class="entry-label">entry-15</div></div></div>
211
+ </div>
212
+ </div>
213
+
214
+
215
+
216
+ <script src="./demo-utils.js"></script>
217
+ </body>
218
+
219
+ </html>