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.
- package/CHANGELOG.md +74 -0
- package/LICENSE +49 -0
- package/README.md +386 -0
- package/README.zh-CN.md +385 -0
- package/dist/wispcss.css +45823 -0
- package/dist/wispcss.min.css +2 -0
- package/examples/add-h2-ids.cjs +284 -0
- package/examples/demo-actions.html +188 -0
- package/examples/demo-alarm.html +219 -0
- package/examples/demo-animation.html +399 -0
- package/examples/demo-aura.html +195 -0
- package/examples/demo-avatar.html +279 -0
- package/examples/demo-background.html +284 -0
- package/examples/demo-badge.html +398 -0
- package/examples/demo-blob.html +307 -0
- package/examples/demo-blockquote.html +190 -0
- package/examples/demo-bookmark.html +243 -0
- package/examples/demo-breadcrumb.html +179 -0
- package/examples/demo-btns.html +349 -0
- package/examples/demo-bubble.html +215 -0
- package/examples/demo-buoy.html +187 -0
- package/examples/demo-button-icon.html +231 -0
- package/examples/demo-button-link.html +177 -0
- package/examples/demo-button.html +361 -0
- package/examples/demo-callout.html +601 -0
- package/examples/demo-check.html +323 -0
- package/examples/demo-code.html +212 -0
- package/examples/demo-color.html +545 -0
- package/examples/demo-comment.html +510 -0
- package/examples/demo-deform.html +229 -0
- package/examples/demo-dialog.html +932 -0
- package/examples/demo-divider.html +208 -0
- package/examples/demo-drawer.html +623 -0
- package/examples/demo-dropmenu.html +382 -0
- package/examples/demo-droppanel.html +354 -0
- package/examples/demo-ellipsis.html +145 -0
- package/examples/demo-emphasis.html +146 -0
- package/examples/demo-empty.html +112 -0
- package/examples/demo-entry.html +219 -0
- package/examples/demo-field.html +359 -0
- package/examples/demo-file.html +206 -0
- package/examples/demo-flag.html +225 -0
- package/examples/demo-form.html +201 -0
- package/examples/demo-gilt.html +170 -0
- package/examples/demo-heading.html +93 -0
- package/examples/demo-icon.html +164 -0
- package/examples/demo-input.html +300 -0
- package/examples/demo-kbd.html +202 -0
- package/examples/demo-lamp.html +248 -0
- package/examples/demo-link.html +142 -0
- package/examples/demo-normalize.html +366 -0
- package/examples/demo-otp.html +277 -0
- package/examples/demo-pagination.html +562 -0
- package/examples/demo-position.html +205 -0
- package/examples/demo-poster.html +384 -0
- package/examples/demo-pre - /345/211/257/346/234/254.html" +169 -0
- package/examples/demo-pre.html +205 -0
- package/examples/demo-preset.html +344 -0
- package/examples/demo-progress.html +303 -0
- package/examples/demo-range.html +211 -0
- package/examples/demo-rank.html +270 -0
- package/examples/demo-rating.html +251 -0
- package/examples/demo-reset.html +105 -0
- package/examples/demo-segment.html +436 -0
- package/examples/demo-select.html +332 -0
- package/examples/demo-shadow.html +152 -0
- package/examples/demo-shell.html +377 -0
- package/examples/demo-shimmer.html +217 -0
- package/examples/demo-size.html +149 -0
- package/examples/demo-skeleton.html +143 -0
- package/examples/demo-sketch.html +213 -0
- package/examples/demo-spacer.html +150 -0
- package/examples/demo-spinner.html +220 -0
- package/examples/demo-stats.html +165 -0
- package/examples/demo-status.html +212 -0
- package/examples/demo-step.html +240 -0
- package/examples/demo-styles.css +14 -0
- package/examples/demo-summary.html +128 -0
- package/examples/demo-swatch.html +253 -0
- package/examples/demo-switch.html +223 -0
- package/examples/demo-table.html +339 -0
- package/examples/demo-tag.html +318 -0
- package/examples/demo-text.html +91 -0
- package/examples/demo-theme.html +167 -0
- package/examples/demo-tools.html +152 -0
- package/examples/demo-transition.html +169 -0
- package/examples/demo-tree.html +929 -0
- package/examples/demo-underline.html +76 -0
- package/examples/demo-utils.js +131 -0
- package/examples/demo-validate.html +120 -0
- package/examples/index.html +149 -0
- package/package.json +72 -8
- package/script-gen-color.js +148 -0
- package/script-mini.js +78 -0
- package/script-prefix.js +398 -0
- package/skill.md +575 -0
|
@@ -0,0 +1,377 @@
|
|
|
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>Shell - WispCSS Demo</title>
|
|
10
|
+
</head>
|
|
11
|
+
|
|
12
|
+
<body>
|
|
13
|
+
<h1>Shell Component</h1>
|
|
14
|
+
<p>A decorative wrapper around <code><input></code> that provides border, focus ring, hover, disabled, invalid states, and supports prefix/suffix icons/text.</p>
|
|
15
|
+
|
|
16
|
+
<h2>Notes</h2>
|
|
17
|
+
<div class="section">
|
|
18
|
+
<ul>
|
|
19
|
+
<li>Base: <code>.shell</code>. Wraps an <code><input></code> with visual styling while keeping input functionality.</li>
|
|
20
|
+
<li>Variants: <code>shell-subtle</code>, <code>shell-ghost</code>, <code>shell-underline</code>, <code>shell-outline</code> (default).</li>
|
|
21
|
+
<li>Prefer compound variant+color classes like <code>shell-outline-primary</code> over <code>shell-outline shell-primary</code>.</li>
|
|
22
|
+
<li>Floating placeholder: add <code>[data-role="placeholder"]</code> and <code>input[placeholder=" "]</code>. Minimum size <code>shell-10</code> recommended.</li>
|
|
23
|
+
<li>Sizes: <code>shell-4</code> ~ <code>shell-15</code>. Width: <code>shell-scale</code>, <code>shell-ratio</code>, <code>shell-full</code>. Layout: <code>shell-v</code> (vertical).</li>
|
|
24
|
+
</ul>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<h2 id="basic">Basic usage</h2>
|
|
28
|
+
<div class="section">
|
|
29
|
+
<div>
|
|
30
|
+
<h3>Default shell</h3>
|
|
31
|
+
<section class="shell">name: <input /></section>
|
|
32
|
+
<section class="shell">name: <input required placeholder="Required" /></section>
|
|
33
|
+
</div>
|
|
34
|
+
<div>
|
|
35
|
+
<h3>With suffix text / icons</h3>
|
|
36
|
+
<section class="shell">name: <input /> Forgot?</section>
|
|
37
|
+
<section class="shell"><span class="icon icon-check"></span><input placeholder="Search..." /><kbd class="kbd-4">⌘K</kbd></section>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<h2 id="floating-placeholder">Floating placeholder</h2>
|
|
42
|
+
<div class="section">
|
|
43
|
+
<div>
|
|
44
|
+
<h3>Basic floating</h3>
|
|
45
|
+
<section class="shell shell-10"><span data-role="placeholder">Username</span><input placeholder=" " /></section>
|
|
46
|
+
<section class="shell shell-12"><span data-role="placeholder">Email</span><input placeholder=" " value="user@example.com" /></section>
|
|
47
|
+
</div>
|
|
48
|
+
<div>
|
|
49
|
+
<h3>Sizes</h3>
|
|
50
|
+
<section class="shell shell-9"><span data-role="placeholder">9 (tight)</span><input placeholder=" " /></section>
|
|
51
|
+
<section class="shell shell-10"><span data-role="placeholder">10 (min)</span><input placeholder=" " /></section>
|
|
52
|
+
<section class="shell shell-12"><span data-role="placeholder">12 (comfort)</span><input placeholder=" " /></section>
|
|
53
|
+
<section class="shell shell-14"><span data-role="placeholder">14 (large)</span><input placeholder=" " /></section>
|
|
54
|
+
</div>
|
|
55
|
+
<div>
|
|
56
|
+
<h3>Floating + variant colors</h3>
|
|
57
|
+
<section class="shell shell-outline-primary shell-10"><span data-role="placeholder">Username</span><input placeholder=" " /></section>
|
|
58
|
+
<section class="shell shell-outline-success shell-11"><span data-role="placeholder">Email</span><input placeholder=" " /></section>
|
|
59
|
+
<section class="shell shell-outline-error shell-12"><span data-role="placeholder">Password</span><input placeholder=" " required /></section>
|
|
60
|
+
<section class="shell shell-subtle-info shell-10"><span data-role="placeholder">Search</span><input placeholder=" " /></section>
|
|
61
|
+
<section class="shell shell-ghost-primary shell-10"><span data-role="placeholder">Username</span><input placeholder=" " /></section>
|
|
62
|
+
<section class="shell shell-underline-primary shell-10"><span data-role="placeholder">Name</span><input placeholder=" " /></section>
|
|
63
|
+
<section class="shell shell-muted-info shell-10"><span data-role="placeholder">Phone</span><input placeholder=" " /></section>
|
|
64
|
+
</div>
|
|
65
|
+
<div>
|
|
66
|
+
<h3>Floating + suffix elements</h3>
|
|
67
|
+
<section class="shell shell-outline-primary shell-11"><span data-role="placeholder">Search</span><input placeholder=" " /><span class="icon icon-check"></span></section>
|
|
68
|
+
<section class="shell shell-outline-secondary shell-11"><span data-role="placeholder">Search articles</span><input placeholder=" " /><kbd class="kbd-4">⌘K</kbd></section>
|
|
69
|
+
<section class="shell shell-outline-success shell-11"><span data-role="placeholder">Invite code</span><input placeholder=" " /><button class="btn btn-success btn-6">Verify</button></section>
|
|
70
|
+
</div>
|
|
71
|
+
<div>
|
|
72
|
+
<h3>Floating + full width</h3>
|
|
73
|
+
<section class="shell shell-full shell-outline-primary shell-12"><span data-role="placeholder">Search articles, users and tags...</span><input placeholder=" " /><kbd class="kbd-4">⌘K</kbd></section>
|
|
74
|
+
</div>
|
|
75
|
+
<div>
|
|
76
|
+
<h3>Floating + custom colors</h3>
|
|
77
|
+
<section class="shell shell-outline-blue-500 shell-11"><span data-role="placeholder">Blue</span><input placeholder=" " /></section>
|
|
78
|
+
<section class="shell shell-subtle-pink-400 shell-11"><span data-role="placeholder">Pink</span><input placeholder=" " /></section>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<h2 id="variants">Visual variants</h2>
|
|
83
|
+
<div class="section">
|
|
84
|
+
<div>
|
|
85
|
+
<h3>shell-subtle</h3>
|
|
86
|
+
<section class="shell shell-subtle">name: <input placeholder="Subtle" /></section>
|
|
87
|
+
<section class="shell shell-subtle-primary">name: <input placeholder="Subtle + primary" /></section>
|
|
88
|
+
</div>
|
|
89
|
+
<div>
|
|
90
|
+
<h3>shell-muted</h3>
|
|
91
|
+
<section class="shell shell-muted">name: <input placeholder="Muted" /></section>
|
|
92
|
+
<section class="shell shell-muted-info">name: <input placeholder="Muted + info" /></section>
|
|
93
|
+
</div>
|
|
94
|
+
<div>
|
|
95
|
+
<h3>shell-outline</h3>
|
|
96
|
+
<section class="shell shell-outline">name: <input placeholder="Outline" /></section>
|
|
97
|
+
<section class="shell shell-outline-primary">name: <input placeholder="Outline + primary" /></section>
|
|
98
|
+
</div>
|
|
99
|
+
<div>
|
|
100
|
+
<h3>shell-ghost</h3>
|
|
101
|
+
<section class="shell shell-ghost">name: <input placeholder="Ghost" /></section>
|
|
102
|
+
<section class="shell shell-ghost-primary">name: <input placeholder="Ghost + primary" /></section>
|
|
103
|
+
</div>
|
|
104
|
+
<div>
|
|
105
|
+
<h3>shell-underline</h3>
|
|
106
|
+
<section class="shell shell-underline">name: <input placeholder="Underline" /></section>
|
|
107
|
+
<section class="shell shell-underline-primary">name: <input placeholder="Underline + primary" /></section>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
|
|
111
|
+
<h2 id="theme-colors">Theme colors (outline variant)</h2>
|
|
112
|
+
<div class="section">
|
|
113
|
+
<div>
|
|
114
|
+
<h3>Primary / Secondary / Tertiary</h3>
|
|
115
|
+
<section class="shell shell-primary">name: <input /></section>
|
|
116
|
+
<section class="shell shell-secondary">name: <input /></section>
|
|
117
|
+
<section class="shell shell-tertiary">name: <input /></section>
|
|
118
|
+
</div>
|
|
119
|
+
<div>
|
|
120
|
+
<h3>Success / Error / Info</h3>
|
|
121
|
+
<section class="shell shell-success">name: <input /></section>
|
|
122
|
+
<section class="shell shell-error">name: <input /></section>
|
|
123
|
+
<section class="shell shell-info">name: <input /></section>
|
|
124
|
+
</div>
|
|
125
|
+
<div>
|
|
126
|
+
<h3>Highlight / Warning / Caution</h3>
|
|
127
|
+
<section class="shell shell-highlight">name: <input /></section>
|
|
128
|
+
<section class="shell shell-warning">name: <input /></section>
|
|
129
|
+
<section class="shell shell-caution">name: <input /></section>
|
|
130
|
+
</div>
|
|
131
|
+
<div>
|
|
132
|
+
<h3>Ink / Title / Description / Caption / Disabled</h3>
|
|
133
|
+
<section class="shell shell-ink">name: <input /></section>
|
|
134
|
+
<section class="shell shell-title">name: <input /></section>
|
|
135
|
+
<section class="shell shell-description">name: <input /></section>
|
|
136
|
+
<section class="shell shell-caption">name: <input /></section>
|
|
137
|
+
<section class="shell shell-placeholder">name: <input /></section>
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
|
|
141
|
+
<h2 id="theme-colors">Theme colors + variant compounds</h2>
|
|
142
|
+
<div class="section">
|
|
143
|
+
<div>
|
|
144
|
+
<h3>shell-outline-*</h3>
|
|
145
|
+
<section class="shell shell-outline-primary">name: <input /></section>
|
|
146
|
+
<section class="shell shell-outline-success">email: <input /></section>
|
|
147
|
+
<section class="shell shell-outline-error">password: <input /></section>
|
|
148
|
+
</div>
|
|
149
|
+
<div>
|
|
150
|
+
<h3>shell-muted-*</h3>
|
|
151
|
+
<section class="shell shell-muted-primary">name: <input /></section>
|
|
152
|
+
<section class="shell shell-muted-success">email: <input /></section>
|
|
153
|
+
<section class="shell shell-muted-error">password: <input /></section>
|
|
154
|
+
<section class="shell shell-muted-warning">code: <input /></section>
|
|
155
|
+
<section class="shell shell-muted-info">search: <input /></section>
|
|
156
|
+
<section class="shell shell-muted-highlight">highlight: <input /></section>
|
|
157
|
+
</div>
|
|
158
|
+
<div>
|
|
159
|
+
<h3>shell-subtle-*</h3>
|
|
160
|
+
<section class="shell shell-subtle-primary">name: <input /></section>
|
|
161
|
+
<section class="shell shell-subtle-success">email: <input /></section>
|
|
162
|
+
<section class="shell shell-subtle-error">password: <input /></section>
|
|
163
|
+
<section class="shell shell-subtle-warning">code: <input /></section>
|
|
164
|
+
<section class="shell shell-subtle-info">search: <input /></section>
|
|
165
|
+
<section class="shell shell-subtle-highlight">highlight: <input /></section>
|
|
166
|
+
</div>
|
|
167
|
+
<div>
|
|
168
|
+
<h3>shell-ghost-*</h3>
|
|
169
|
+
<section class="shell shell-ghost-primary">name: <input /></section>
|
|
170
|
+
<section class="shell shell-ghost-success">email: <input /></section>
|
|
171
|
+
<section class="shell shell-ghost-error">password: <input /></section>
|
|
172
|
+
<section class="shell shell-ghost-warning">code: <input /></section>
|
|
173
|
+
<section class="shell shell-ghost-info">search: <input /></section>
|
|
174
|
+
<section class="shell shell-ghost-highlight">highlight: <input /></section>
|
|
175
|
+
</div>
|
|
176
|
+
<div>
|
|
177
|
+
<h3>shell-underline-*</h3>
|
|
178
|
+
<section class="shell shell-underline-primary">name: <input /></section>
|
|
179
|
+
<section class="shell shell-underline-success">email: <input /></section>
|
|
180
|
+
<section class="shell shell-underline-error">password: <input /></section>
|
|
181
|
+
<section class="shell shell-underline-warning">code: <input /></section>
|
|
182
|
+
<section class="shell shell-underline-info">search: <input /></section>
|
|
183
|
+
<section class="shell shell-underline-highlight">highlight: <input /></section>
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
|
|
187
|
+
<h2 id="custom-colors">Custom colors</h2>
|
|
188
|
+
<p>Multiple color formats are supported:</p>
|
|
189
|
+
<ul>
|
|
190
|
+
<li>1. Theme semantic colors, e.g. <code>*-error</code>, <code>*-error-hover</code></li>
|
|
191
|
+
<li>2. Tailwind built-in colors, e.g. <code>*-indigo-500</code></li>
|
|
192
|
+
<li>3. Raw color values, e.g. <code>*-[#ff0000]</code></li>
|
|
193
|
+
<li>4. CSS named colors, e.g. <code>*-[red]</code>, <code>*-[green]</code></li>
|
|
194
|
+
</ul>
|
|
195
|
+
<div class="section">
|
|
196
|
+
<div>
|
|
197
|
+
<h3>Outline variant</h3>
|
|
198
|
+
<section class="shell shell-blue-500">name: <input /></section>
|
|
199
|
+
<section class="shell shell-teal-500">name: <input /></section>
|
|
200
|
+
</div>
|
|
201
|
+
<div>
|
|
202
|
+
<h3>Subtle variant</h3>
|
|
203
|
+
<section class="shell shell-subtle-blue-200">name: <input /></section>
|
|
204
|
+
<section class="shell shell-subtle-blue-500">name: <input /></section>
|
|
205
|
+
</div>
|
|
206
|
+
<div>
|
|
207
|
+
<h3>Muted variant</h3>
|
|
208
|
+
<section class="shell shell-muted-blue-200">name: <input /></section>
|
|
209
|
+
<section class="shell shell-muted-blue-500">name: <input /></section>
|
|
210
|
+
</div>
|
|
211
|
+
<div>
|
|
212
|
+
<h3>Ghost variant</h3>
|
|
213
|
+
<section class="shell shell-ghost-blue-200">name: <input /></section>
|
|
214
|
+
<section class="shell shell-ghost-blue-500">name: <input /></section>
|
|
215
|
+
</div>
|
|
216
|
+
<div>
|
|
217
|
+
<h3>Underline variant</h3>
|
|
218
|
+
<section class="shell shell-underline-blue-200">name: <input /></section>
|
|
219
|
+
<section class="shell shell-underline-blue-500">name: <input /></section>
|
|
220
|
+
</div>
|
|
221
|
+
</div>
|
|
222
|
+
|
|
223
|
+
<h2 id="vertical-layout-shell-v">Vertical layout (shell-v)</h2>
|
|
224
|
+
<div class="section">
|
|
225
|
+
<div>
|
|
226
|
+
<h3>shell-v</h3>
|
|
227
|
+
<section class="shell-v">name: <input /><span>Forgot?</span></section>
|
|
228
|
+
</div>
|
|
229
|
+
<div>
|
|
230
|
+
<h3>shell-v + colors</h3>
|
|
231
|
+
<section class="shell-v shell-primary">Email: <input placeholder="your@email.com" /><span class="icon icon-check"></span></section>
|
|
232
|
+
<section class="shell-v shell-error">Password: <input type="password" /><span style="color:var(--color-error);">Invalid</span></section>
|
|
233
|
+
</div>
|
|
234
|
+
</div>
|
|
235
|
+
|
|
236
|
+
<h2 id="sizes">Sizes (shell-4 ~ shell-15)</h2>
|
|
237
|
+
<div class="section">
|
|
238
|
+
<div>
|
|
239
|
+
<h3>16px (shell-4)</h3>
|
|
240
|
+
<section class="shell shell-4">name: <input /></section>
|
|
241
|
+
</div>
|
|
242
|
+
<div>
|
|
243
|
+
<h3>20px (shell-5)</h3>
|
|
244
|
+
<section class="shell shell-5">name: <input /></section>
|
|
245
|
+
</div>
|
|
246
|
+
<div>
|
|
247
|
+
<h3>24px (shell-6)</h3>
|
|
248
|
+
<section class="shell shell-6">name: <input /></section>
|
|
249
|
+
</div>
|
|
250
|
+
<div>
|
|
251
|
+
<h3>28px (shell-7)</h3>
|
|
252
|
+
<section class="shell shell-7">name: <input /></section>
|
|
253
|
+
</div>
|
|
254
|
+
<div>
|
|
255
|
+
<h3>32px (shell-8, default)</h3>
|
|
256
|
+
<section class="shell shell-8">name: <input /></section>
|
|
257
|
+
</div>
|
|
258
|
+
<div>
|
|
259
|
+
<h3>36px (shell-9)</h3>
|
|
260
|
+
<section class="shell shell-9">name: <input /></section>
|
|
261
|
+
</div>
|
|
262
|
+
<div>
|
|
263
|
+
<h3>40px (shell-10)</h3>
|
|
264
|
+
<section class="shell shell-10">name: <input /></section>
|
|
265
|
+
</div>
|
|
266
|
+
<div>
|
|
267
|
+
<h3>44px (shell-11)</h3>
|
|
268
|
+
<section class="shell shell-11">name: <input /></section>
|
|
269
|
+
</div>
|
|
270
|
+
<div>
|
|
271
|
+
<h3>48px (shell-12)</h3>
|
|
272
|
+
<section class="shell shell-12">name: <input /></section>
|
|
273
|
+
</div>
|
|
274
|
+
<div>
|
|
275
|
+
<h3>52px (shell-13)</h3>
|
|
276
|
+
<section class="shell shell-13">name: <input /></section>
|
|
277
|
+
</div>
|
|
278
|
+
<div>
|
|
279
|
+
<h3>56px (shell-14)</h3>
|
|
280
|
+
<section class="shell shell-14">name: <input /></section>
|
|
281
|
+
</div>
|
|
282
|
+
<div>
|
|
283
|
+
<h3>60px (shell-15)</h3>
|
|
284
|
+
<section class="shell shell-15">name: <input /></section>
|
|
285
|
+
</div>
|
|
286
|
+
</div>
|
|
287
|
+
|
|
288
|
+
<h2 id="shapes">Shapes</h2>
|
|
289
|
+
<div class="section">
|
|
290
|
+
<div>
|
|
291
|
+
<h3>shell-pill</h3>
|
|
292
|
+
<section class="shell shell-pill">name: <input /></section>
|
|
293
|
+
<section class="shell shell-pill shell-primary">name: <input /></section>
|
|
294
|
+
</div>
|
|
295
|
+
<div>
|
|
296
|
+
<h3>shell-rounded</h3>
|
|
297
|
+
<section class="shell shell-rounded">name: <input /></section>
|
|
298
|
+
<section class="shell shell-rounded shell-primary">name: <input /></section>
|
|
299
|
+
</div>
|
|
300
|
+
<div>
|
|
301
|
+
<h3>shell-square</h3>
|
|
302
|
+
<section class="shell shell-square">name: <input /></section>
|
|
303
|
+
<section class="shell shell-square shell-primary">name: <input /></section>
|
|
304
|
+
</div>
|
|
305
|
+
<div>
|
|
306
|
+
<h3>shell-fluid</h3>
|
|
307
|
+
<section class="shell shell-fluid">name: <input /></section>
|
|
308
|
+
<section class="shell shell-fluid shell-primary">name: <input /></section>
|
|
309
|
+
</div>
|
|
310
|
+
</div>
|
|
311
|
+
|
|
312
|
+
<h2 id="width-modifiers">Width modifiers</h2>
|
|
313
|
+
<div class="section">
|
|
314
|
+
<div>
|
|
315
|
+
<h3>shell-scale (fixed)</h3>
|
|
316
|
+
<section class="shell shell-scale">name: <input /></section>
|
|
317
|
+
</div>
|
|
318
|
+
<div>
|
|
319
|
+
<h3>shell-scale-2 (2x)</h3>
|
|
320
|
+
<section class="shell shell-scale-2">name: <input /></section>
|
|
321
|
+
</div>
|
|
322
|
+
<div>
|
|
323
|
+
<h3>shell-ratio (1:1)</h3>
|
|
324
|
+
<section class="shell shell-ratio"><input /></section>
|
|
325
|
+
</div>
|
|
326
|
+
<div>
|
|
327
|
+
<h3>shell-ratio-2 (2:1)</h3>
|
|
328
|
+
<section class="shell shell-ratio-2"><input /></section>
|
|
329
|
+
</div>
|
|
330
|
+
<div>
|
|
331
|
+
<h3>shell-full (100%)</h3>
|
|
332
|
+
<section class="shell shell-full">name: <input /></section>
|
|
333
|
+
<section class="shell shell-full shell-primary">name: <input /></section>
|
|
334
|
+
</div>
|
|
335
|
+
</div>
|
|
336
|
+
|
|
337
|
+
<h2 id="states">State</h2>
|
|
338
|
+
<div class="section">
|
|
339
|
+
<div>
|
|
340
|
+
<h3>Readonly</h3>
|
|
341
|
+
<section class="shell">name: <input readonly value="Readonly text" /></section>
|
|
342
|
+
</div>
|
|
343
|
+
<div>
|
|
344
|
+
<h3>Disabled</h3>
|
|
345
|
+
<section class="shell">name: <input disabled value="Disabled" /></section>
|
|
346
|
+
</div>
|
|
347
|
+
</div>
|
|
348
|
+
|
|
349
|
+
<h2 id="combinations">Combinations</h2>
|
|
350
|
+
<div class="section">
|
|
351
|
+
<div>
|
|
352
|
+
<h3>Search with icon + shortcut</h3>
|
|
353
|
+
<section class="shell shell-primary"><span class="icon icon-check"></span><input placeholder="Search articles, users..." /><kbd class="kbd-4">⌘K</kbd></section>
|
|
354
|
+
</div>
|
|
355
|
+
<div>
|
|
356
|
+
<h3>With action button</h3>
|
|
357
|
+
<section class="shell"><input placeholder="Invite code" /><button class="btn btn-primary btn-5">Verify</button></section>
|
|
358
|
+
</div>
|
|
359
|
+
<div>
|
|
360
|
+
<h3>Vertical + icon + button</h3>
|
|
361
|
+
<section class="shell-v shell-success"><span class="icon icon-check"></span><input value="https://example.com" /><button class="btn btn-success btn-5">Copy</button></section>
|
|
362
|
+
</div>
|
|
363
|
+
<div>
|
|
364
|
+
<h3>Variant comparison (primary)</h3>
|
|
365
|
+
<section class="shell shell-subtle-primary">name: <input placeholder="Subtle" /></section>
|
|
366
|
+
<section class="shell shell-ghost-primary">name: <input placeholder="Ghost" /></section>
|
|
367
|
+
<section class="shell shell-underline-primary">name: <input placeholder="Underline" /></section>
|
|
368
|
+
<section class="shell shell-muted-primary">name: <input placeholder="Muted" /></section>
|
|
369
|
+
</div>
|
|
370
|
+
</div>
|
|
371
|
+
|
|
372
|
+
<p style="margin-top: 2rem;">For <code>input</code> (type=text) or <code>textarea</code> utilities, see <a class="link" href="./demo-input.html">demo-input.html</a>.</p>
|
|
373
|
+
|
|
374
|
+
<script src="./demo-utils.js"></script>
|
|
375
|
+
</body>
|
|
376
|
+
|
|
377
|
+
|
|
@@ -0,0 +1,217 @@
|
|
|
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>Shimmer - WispCSS Demo</title>
|
|
10
|
+
</head>
|
|
11
|
+
|
|
12
|
+
<body>
|
|
13
|
+
<h1>Shimmer Component</h1>
|
|
14
|
+
<p>Text glow / shimmer effect using CSS gradient clip and keyframe animations. The light sweep passes across the text in a configurable direction, color, and speed.</p>
|
|
15
|
+
|
|
16
|
+
<h2>Notes</h2>
|
|
17
|
+
<div class="section">
|
|
18
|
+
<ul>
|
|
19
|
+
<li>Base: <code>.shimmer</code>. Default direction is left-to-right (LTR) with a 2s duration.</li>
|
|
20
|
+
<li>Uses <code>background-clip: text</code> with transparent fill — the shimmer color is derived from <code>currentColor</code>.</li>
|
|
21
|
+
<li>Direction modifiers: <code>shimmer-start</code> (RTL), <code>shimmer-bottom</code> (TTB), <code>shimmer-top</code> (BTT).</li>
|
|
22
|
+
<li>Color: <code>shimmer-*</code> (e.g. <code>shimmer-red-500</code>, <code>shimmer-primary</code>).</li>
|
|
23
|
+
<li>Duration: <code>animate-shimmer-ltr-1000</code> (1000ms), <code>animate-shimmer-rtl-[3s]</code> (arbitrary).</li>
|
|
24
|
+
</ul>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<h2 id="basic">Basic usage</h2>
|
|
28
|
+
<div class="section">
|
|
29
|
+
<div>
|
|
30
|
+
<h3>Default shimmer (LTR, 2s)</h3>
|
|
31
|
+
<span class="shimmer" style="font-size: 1.5rem; font-weight: 700;">Shimmer Text</span>
|
|
32
|
+
</div>
|
|
33
|
+
<div>
|
|
34
|
+
<h3>Different font sizes</h3>
|
|
35
|
+
<span class="shimmer" style="font-size: 1rem; font-weight: 600;">Small text</span><br>
|
|
36
|
+
<span class="shimmer" style="font-size: 1.5rem; font-weight: 700;">Medium text</span><br>
|
|
37
|
+
<span class="shimmer" style="font-size: 2.5rem; font-weight: 800;">Large text</span>
|
|
38
|
+
</div>
|
|
39
|
+
<div>
|
|
40
|
+
<h3>Chinese text</h3>
|
|
41
|
+
<span class="shimmer" style="font-size: 1.5rem; font-weight: 700;">流光文字效果</span>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<h2 id="direction">Direction</h2>
|
|
46
|
+
<div class="section">
|
|
47
|
+
<div>
|
|
48
|
+
<h3>LTR (default)</h3>
|
|
49
|
+
<span class="shimmer" style="font-size: 1.5rem; font-weight: 700;">Left to Right</span>
|
|
50
|
+
</div>
|
|
51
|
+
<div>
|
|
52
|
+
<h3>RTL (shimmer-start)</h3>
|
|
53
|
+
<span class="shimmer shimmer-start" style="font-size: 1.5rem; font-weight: 700;">Right to Left</span>
|
|
54
|
+
</div>
|
|
55
|
+
<div>
|
|
56
|
+
<h3>TTB (shimmer-bottom)</h3>
|
|
57
|
+
<span class="shimmer shimmer-bottom" style="font-size: 1.5rem; font-weight: 700;">Top to Bottom</span>
|
|
58
|
+
</div>
|
|
59
|
+
<div>
|
|
60
|
+
<h3>BTT (shimmer-top)</h3>
|
|
61
|
+
<span class="shimmer shimmer-top" style="font-size: 1.5rem; font-weight: 700;">Bottom to Top</span>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<h2 id="theme-colors">Theme colors</h2>
|
|
66
|
+
<div class="section">
|
|
67
|
+
<div>
|
|
68
|
+
<h3>Primary</h3>
|
|
69
|
+
<span class="shimmer shimmer-primary" style="font-size: 1.5rem; font-weight: 700;">Primary</span>
|
|
70
|
+
</div>
|
|
71
|
+
<div>
|
|
72
|
+
<h3>Secondary</h3>
|
|
73
|
+
<span class="shimmer shimmer-secondary" style="font-size: 1.5rem; font-weight: 700;">Secondary</span>
|
|
74
|
+
</div>
|
|
75
|
+
<div>
|
|
76
|
+
<h3>Tertiary</h3>
|
|
77
|
+
<span class="shimmer shimmer-tertiary" style="font-size: 1.5rem; font-weight: 700;">Tertiary</span>
|
|
78
|
+
</div>
|
|
79
|
+
<div>
|
|
80
|
+
<h3>Success</h3>
|
|
81
|
+
<span class="shimmer shimmer-success" style="font-size: 1.5rem; font-weight: 700;">Success</span>
|
|
82
|
+
</div>
|
|
83
|
+
<div>
|
|
84
|
+
<h3>Error</h3>
|
|
85
|
+
<span class="shimmer shimmer-error" style="font-size: 1.5rem; font-weight: 700;">Error</span>
|
|
86
|
+
</div>
|
|
87
|
+
<div>
|
|
88
|
+
<h3>Info</h3>
|
|
89
|
+
<span class="shimmer shimmer-info" style="font-size: 1.5rem; font-weight: 700;">Info</span>
|
|
90
|
+
</div>
|
|
91
|
+
<div>
|
|
92
|
+
<h3>Highlight</h3>
|
|
93
|
+
<span class="shimmer shimmer-highlight" style="font-size: 1.5rem; font-weight: 700;">Highlight</span>
|
|
94
|
+
</div>
|
|
95
|
+
<div>
|
|
96
|
+
<h3>Warning</h3>
|
|
97
|
+
<span class="shimmer shimmer-warning" style="font-size: 1.5rem; font-weight: 700;">Warning</span>
|
|
98
|
+
</div>
|
|
99
|
+
<div>
|
|
100
|
+
<h3>Caution</h3>
|
|
101
|
+
<span class="shimmer shimmer-caution" style="font-size: 1.5rem; font-weight: 700;">Caution</span>
|
|
102
|
+
</div>
|
|
103
|
+
<div>
|
|
104
|
+
<h3>Ink</h3>
|
|
105
|
+
<span class="shimmer shimmer-ink text-stage-light" style="font-size: 1.5rem; font-weight: 700;">Ink</span>
|
|
106
|
+
</div>
|
|
107
|
+
<div>
|
|
108
|
+
<h3>Title</h3>
|
|
109
|
+
<span class="shimmer shimmer-title text-stage" style="font-size: 1.5rem; font-weight: 700;">Title</span>
|
|
110
|
+
</div>
|
|
111
|
+
<div>
|
|
112
|
+
<h3>Description</h3>
|
|
113
|
+
<span class="shimmer shimmer-description text-stage" style="font-size: 1.5rem; font-weight: 700;">Description</span>
|
|
114
|
+
</div>
|
|
115
|
+
<div>
|
|
116
|
+
<h3>Caption</h3>
|
|
117
|
+
<span class="shimmer shimmer-caption" style="font-size: 1.5rem; font-weight: 700;">Caption</span>
|
|
118
|
+
</div>
|
|
119
|
+
<div>
|
|
120
|
+
<h3>Placeholder</h3>
|
|
121
|
+
<span class="shimmer shimmer-placeholder" style="font-size: 1.5rem; font-weight: 700;">Placeholder</span>
|
|
122
|
+
</div>
|
|
123
|
+
<div>
|
|
124
|
+
<h3>White</h3>
|
|
125
|
+
<span class="shimmer shimmer-white" style="font-size: 1.5rem; font-weight: 700;">White</span>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
|
|
129
|
+
<h2 id="custom-colors">Custom colors</h2>
|
|
130
|
+
<p>Multiple color formats are supported:</p>
|
|
131
|
+
<ul>
|
|
132
|
+
<li>1. Theme semantic colors, e.g. <code>*-error</code>, <code>*-error-hover</code></li>
|
|
133
|
+
<li>2. Tailwind built-in colors, e.g. <code>*-indigo-500</code></li>
|
|
134
|
+
<li>3. Raw color values, e.g. <code>*-[#ff0000]</code></li>
|
|
135
|
+
<li>4. CSS named colors, e.g. <code>*-[red]</code>, <code>*-[green]</code></li>
|
|
136
|
+
</ul>
|
|
137
|
+
<div class="section">
|
|
138
|
+
<div>
|
|
139
|
+
<h3>Tailwind colors</h3>
|
|
140
|
+
<span class="shimmer shimmer-red-500" style="font-size: 1.5rem; font-weight: 700;">Red</span><br>
|
|
141
|
+
<span class="shimmer shimmer-green-500" style="font-size: 1.5rem; font-weight: 700;">Green</span><br>
|
|
142
|
+
<span class="shimmer shimmer-blue-500" style="font-size: 1.5rem; font-weight: 700;">Blue</span><br>
|
|
143
|
+
<span class="shimmer shimmer-purple-500" style="font-size: 1.5rem; font-weight: 700;">Purple</span>
|
|
144
|
+
</div>
|
|
145
|
+
<div>
|
|
146
|
+
<h3>Raw / named colors</h3>
|
|
147
|
+
<span class="shimmer shimmer-[#ff6b6b]" style="font-size: 1.5rem; font-weight: 700;">Coral</span><br>
|
|
148
|
+
<span class="shimmer shimmer-[#48dbfb]" style="font-size: 1.5rem; font-weight: 700;">Sky</span><br>
|
|
149
|
+
<span class="shimmer shimmer-[#feca57]" style="font-size: 1.5rem; font-weight: 700;">Gold</span>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
|
|
153
|
+
<h2 id="animation-duration">Animation duration</h2>
|
|
154
|
+
<div class="section">
|
|
155
|
+
<div>
|
|
156
|
+
<h3>Fast (1s) — animate-shimmer-ltr-1000</h3>
|
|
157
|
+
<span class="shimmer animate-shimmer-ltr-1000" style="font-size: 1.5rem; font-weight: 700;">Fast</span>
|
|
158
|
+
</div>
|
|
159
|
+
<div>
|
|
160
|
+
<h3>Default (2s) — no class needed</h3>
|
|
161
|
+
<span class="shimmer" style="font-size: 1.5rem; font-weight: 700;">Normal</span>
|
|
162
|
+
</div>
|
|
163
|
+
<div>
|
|
164
|
+
<h3>Slow (4s) — animate-shimmer-ltr-4000</h3>
|
|
165
|
+
<span class="shimmer animate-shimmer-ltr-4000" style="font-size: 1.5rem; font-weight: 700;">Slow</span>
|
|
166
|
+
</div>
|
|
167
|
+
<div>
|
|
168
|
+
<h3>Very slow (8s) — animate-shimmer-ltr-8000</h3>
|
|
169
|
+
<span class="shimmer animate-shimmer-ltr-8000" style="font-size: 1.5rem; font-weight: 700;">Very Slow</span>
|
|
170
|
+
</div>
|
|
171
|
+
</div>
|
|
172
|
+
|
|
173
|
+
<h2 id="direction-plus-duration-combinations">Direction + duration combinations</h2>
|
|
174
|
+
<div class="section">
|
|
175
|
+
<div>
|
|
176
|
+
<h3>RTL + fast</h3>
|
|
177
|
+
<span class="shimmer shimmer-start animate-shimmer-rtl-1000" style="font-size: 1.5rem; font-weight: 700;">RTL Fast</span>
|
|
178
|
+
</div>
|
|
179
|
+
<div>
|
|
180
|
+
<h3>TTB + slow</h3>
|
|
181
|
+
<span class="shimmer shimmer-bottom animate-shimmer-ttb-4000" style="font-size: 1.5rem; font-weight: 700;">TTB Slow</span>
|
|
182
|
+
</div>
|
|
183
|
+
<div>
|
|
184
|
+
<h3>BTT + medium</h3>
|
|
185
|
+
<span class="shimmer shimmer-top animate-shimmer-btt-2500" style="font-size: 1.5rem; font-weight: 700;">BTT Medium</span>
|
|
186
|
+
</div>
|
|
187
|
+
<div>
|
|
188
|
+
<h3>Color + direction + duration</h3>
|
|
189
|
+
<span class="shimmer shimmer-red-500 shimmer-start animate-shimmer-rtl-3000" style="font-size: 1.5rem; font-weight: 700;">Red RTL 3s</span>
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
192
|
+
|
|
193
|
+
<h2 id="use-cases">Use cases</h2>
|
|
194
|
+
<div class="section">
|
|
195
|
+
<div>
|
|
196
|
+
<h3>Brand title</h3>
|
|
197
|
+
<span class="shimmer shimmer-primary" style="font-size: 2rem; font-weight: 800;">Brand Title</span>
|
|
198
|
+
</div>
|
|
199
|
+
<div>
|
|
200
|
+
<h3>Loading indicator</h3>
|
|
201
|
+
<span class="shimmer shimmer-blue-500" style="font-size: 1.2rem; font-weight: 600;">Loading...</span>
|
|
202
|
+
</div>
|
|
203
|
+
<div>
|
|
204
|
+
<h3>Multi-line tagline</h3>
|
|
205
|
+
<span class="shimmer shimmer-purple-500 animate-shimmer-ltr-3000" style="font-size: 1.8rem; font-weight: 800;">WispCSS</span><br>
|
|
206
|
+
<span class="shimmer shimmer-[#48dbfb] shimmer-start animate-shimmer-rtl-2500" style="font-size: 1rem; font-weight: 500;">Make Your UI Beautiful</span>
|
|
207
|
+
</div>
|
|
208
|
+
<div>
|
|
209
|
+
<h3>Extra large text</h3>
|
|
210
|
+
<span class="shimmer shimmer-red-500 animate-shimmer-ltr-4000" style="font-size: 3.5rem; font-weight: 900;">SHIMMER</span>
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
|
|
214
|
+
<script src="./demo-utils.js"></script>
|
|
215
|
+
</body>
|
|
216
|
+
|
|
217
|
+
</html>
|