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.
- package/CHANGELOG.md +74 -0
- package/LICENSE +49 -0
- package/README.md +385 -2
- 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 +73 -3
- 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,93 @@
|
|
|
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>Heading - WispCSS Demo</title>
|
|
10
|
+
<style>
|
|
11
|
+
.test { max-width: 420px; }
|
|
12
|
+
</style>
|
|
13
|
+
</head>
|
|
14
|
+
|
|
15
|
+
<body>
|
|
16
|
+
<h1>Heading Component</h1>
|
|
17
|
+
<p>Typography line-height demo for <code><h1></code> ~ <code><h6></code> across multiple languages. Line-height is optimized per script via <code>lang</code> attribute.</p>
|
|
18
|
+
|
|
19
|
+
<h2>Notes</h2>
|
|
20
|
+
<div class="section">
|
|
21
|
+
<ul>
|
|
22
|
+
<li>Heading line-height is automatically optimized based on the <code>lang</code> attribute.</li>
|
|
23
|
+
<li>CJK (Chinese/Japanese/Korean) scripts use tighter line-height by default.</li>
|
|
24
|
+
<li>Arabic and Latin scripts use standard line-height for readability.</li>
|
|
25
|
+
</ul>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<p></p><p></p>
|
|
29
|
+
|
|
30
|
+
<section lang="zh">
|
|
31
|
+
<h2 id="chinese-zh">Chinese (zh)</h2>
|
|
32
|
+
<div class="test">
|
|
33
|
+
<h1>这是一个用于测试标题换行效果的中文标题示例</h1>
|
|
34
|
+
<h2 id="这是一个用于测试标题换行效果的中文标题示例">这是一个用于测试标题换行效果的中文标题示例</h2>
|
|
35
|
+
<h3>这是一个用于测试标题换行效果的中文标题示例</h3>
|
|
36
|
+
<h4>这是一个用于测试标题换行效果的中文标题示例</h4>
|
|
37
|
+
<h5>这是一个用于测试标题换行效果的中文标题示例</h5>
|
|
38
|
+
<h6>这是一个用于测试标题换行效果的中文标题示例</h6>
|
|
39
|
+
</div>
|
|
40
|
+
</section>
|
|
41
|
+
<p></p><p></p>
|
|
42
|
+
<section lang="ja">
|
|
43
|
+
<h2 id="japanese-ja">Japanese (ja)</h2>
|
|
44
|
+
<div class="test">
|
|
45
|
+
<h1>これは見出しの改行表示を確認するための日本語のサンプルです</h1>
|
|
46
|
+
<h2 id="見出改行表示確認日本語">これは見出しの改行表示を確認するための日本語のサンプルです</h2>
|
|
47
|
+
<h3>これは見出しの改行表示を確認するための日本語のサンプルです</h3>
|
|
48
|
+
<h4>これは見出しの改行表示を確認するための日本語のサンプルです</h4>
|
|
49
|
+
<h5>これは見出しの改行表示を確認するための日本語のサンプルです</h5>
|
|
50
|
+
<h6>これは見出しの改行表示を確認するための日本語のサンプルです</h6>
|
|
51
|
+
</div>
|
|
52
|
+
</section>
|
|
53
|
+
<p></p><p></p>
|
|
54
|
+
<section lang="ko">
|
|
55
|
+
<h2 id="korean-ko">Korean (ko)</h2>
|
|
56
|
+
<div class="test">
|
|
57
|
+
<h1>이 문장은 제목 줄바꿈 표시를 확인하기 위한 한국어 샘플입니다</h1>
|
|
58
|
+
<h2>이 문장은 제목 줄바꿈 표시를 확인하기 위한 한국어 샘플입니다</h2>
|
|
59
|
+
<h3>이 문장은 제목 줄바꿈 표시를 확인하기 위한 한국어 샘플입니다</h3>
|
|
60
|
+
<h4>이 문장은 제목 줄바꿈 표시를 확인하기 위한 한국어 샘플입니다</h4>
|
|
61
|
+
<h5>이 문장은 제목 줄바꿈 표시를 확인하기 위한 한국어 샘플입니다</h5>
|
|
62
|
+
<h6>이 문장은 제목 줄바꿈 표시를 확인하기 위한 한국어 샘플입니다</h6>
|
|
63
|
+
</div>
|
|
64
|
+
</section>
|
|
65
|
+
<p></p><p></p>
|
|
66
|
+
<section lang="ar" dir="rtl">
|
|
67
|
+
<h2 id="arabic-ar">Arabic (ar)</h2>
|
|
68
|
+
<div class="test">
|
|
69
|
+
<h1>هذا نص عربي لاختبار كيفية عرض العناوين عند التفاف السطر في التصميم</h1>
|
|
70
|
+
<h2>هذا نص عربي لاختبار كيفية عرض العناوين عند التفاف السطر في التصميم</h2>
|
|
71
|
+
<h3>هذا نص عربي لاختبار كيفية عرض العناوين عند التفاف السطر في التصميم</h3>
|
|
72
|
+
<h4>هذا نص عربي لاختبار كيفية عرض العناوين عند التفاف السطر في التصميم</h4>
|
|
73
|
+
<h5>هذا نص عربي لاختبار كيفية عرض العناوين عند التفاف السطر في التصميم</h5>
|
|
74
|
+
<h6>هذا نص عربي لاختبار كيفية عرض العناوين عند التفاف السطر في التصميم</h6>
|
|
75
|
+
</div>
|
|
76
|
+
</section>
|
|
77
|
+
<p></p><p></p>
|
|
78
|
+
<section lang="en">
|
|
79
|
+
<h2 id="english-en">English (en)</h2>
|
|
80
|
+
<div class="test">
|
|
81
|
+
<h1>This is a sample heading used to test line wrapping behavior in typography systems</h1>
|
|
82
|
+
<h2 id="this-is-a-sample-heading-used-to-test-line-wrapping-behavior-in-typography-systems">This is a sample heading used to test line wrapping behavior in typography systems</h2>
|
|
83
|
+
<h3>This is a sample heading used to test line wrapping behavior in typography systems</h3>
|
|
84
|
+
<h4>This is a sample heading used to test line wrapping behavior in typography systems</h4>
|
|
85
|
+
<h5>This is a sample heading used to test line wrapping behavior in typography systems</h5>
|
|
86
|
+
<h6>This is a sample heading used to test line wrapping behavior in typography systems</h6>
|
|
87
|
+
</div>
|
|
88
|
+
</section>
|
|
89
|
+
|
|
90
|
+
<script src="./demo-utils.js"></script>
|
|
91
|
+
</body>
|
|
92
|
+
|
|
93
|
+
</html>
|
|
@@ -0,0 +1,164 @@
|
|
|
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>Icon - WispCSS Demo</title>
|
|
10
|
+
</head>
|
|
11
|
+
|
|
12
|
+
<body>
|
|
13
|
+
<h1>Icon Component</h1>
|
|
14
|
+
<p>Vector icons implemented with CSS mask-image. Color via <code>text-*</code> or <code>icon-*</code> utilities. Supports multiple icon families, sizes, and custom colors.</p>
|
|
15
|
+
|
|
16
|
+
<h2>Notes</h2>
|
|
17
|
+
<div class="section">
|
|
18
|
+
<ul>
|
|
19
|
+
<li>Base class: <code>.icon</code>. Shape class: <code>icon-*</code> (e.g. <code>icon-check</code>).</li>
|
|
20
|
+
<li>Icon color follows <code>currentColor</code> by default. Use <code>text-*</code> utilities or inline <code>style="color:..."</code> to set color.</li>
|
|
21
|
+
<li>Sizes via <code>icon-*</code> dynamic utilities (e.g. <code>icon-6</code>, <code>icon-10</code>, <code>icon-20</code>, <code>icon-[28px]</code>).</li>
|
|
22
|
+
<li>More icons will be added in future releases.</li>
|
|
23
|
+
</ul>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<h2 id="basic">Basic usage</h2>
|
|
27
|
+
<div class="section">
|
|
28
|
+
<div>
|
|
29
|
+
<h3>Default icons</h3>
|
|
30
|
+
<span class="icon icon-check"></span>
|
|
31
|
+
<span class="icon icon-close"></span>
|
|
32
|
+
<span class="icon icon-info"></span>
|
|
33
|
+
<span class="icon icon-warning"></span>
|
|
34
|
+
<span class="icon icon-chevron-start"></span>
|
|
35
|
+
</div>
|
|
36
|
+
<div>
|
|
37
|
+
<h3>With color (text-*)</h3>
|
|
38
|
+
<span class="icon icon-check-circle-fill text-success"></span>
|
|
39
|
+
<span class="icon icon-close-circle-fill text-error"></span>
|
|
40
|
+
<span class="icon icon-info-circle-fill text-info"></span>
|
|
41
|
+
<span class="icon icon-warning-triangle-fill text-warning"></span>
|
|
42
|
+
</div>
|
|
43
|
+
<div>
|
|
44
|
+
<h3>Icon + text</h3>
|
|
45
|
+
<span class="icon icon-check-circle-fill text-success"></span> Success
|
|
46
|
+
<span class="icon icon-close-circle-fill text-error"></span> Error
|
|
47
|
+
<span class="icon icon-info-circle-fill text-info"></span> Info
|
|
48
|
+
<span class="icon icon-warning-triangle-fill text-warning"></span> Warning
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<h2 id="icon-families">Icon families</h2>
|
|
53
|
+
<div class="section">
|
|
54
|
+
<div>
|
|
55
|
+
<h3>Check</h3>
|
|
56
|
+
<span class="icon icon-check icon-2xl text-success"></span> check
|
|
57
|
+
<span class="icon icon-check-circle icon-2xl text-success"></span> check-pill
|
|
58
|
+
<span class="icon icon-check-circle-fill icon-2xl text-success"></span> check-pill-fill
|
|
59
|
+
</div>
|
|
60
|
+
<div>
|
|
61
|
+
<h3>Close</h3>
|
|
62
|
+
<span class="icon icon-close icon-2xl text-error"></span> close
|
|
63
|
+
<span class="icon icon-close-circle icon-2xl text-error"></span> close-circle
|
|
64
|
+
<span class="icon icon-close-circle-fill icon-2xl text-error"></span> close-circle-fill
|
|
65
|
+
</div>
|
|
66
|
+
<div>
|
|
67
|
+
<h3>Warning / triangle</h3>
|
|
68
|
+
<span class="icon icon-warning icon-2xl text-warning"></span> warning
|
|
69
|
+
<span class="icon icon-warning-triangle icon-2xl text-warning"></span> warning-triangle
|
|
70
|
+
<span class="icon icon-warning-triangle-fill icon-2xl text-warning"></span> warning-triangle-fill
|
|
71
|
+
</div>
|
|
72
|
+
<div>
|
|
73
|
+
<h3>Question / help</h3>
|
|
74
|
+
<span class="icon icon-warning icon-2xl text-help"></span> warning
|
|
75
|
+
<span class="icon icon-warning-circle icon-2xl text-help"></span> warning-circle
|
|
76
|
+
<span class="icon icon-warning-circle-fill icon-2xl text-help"></span> warning-circle-fill
|
|
77
|
+
</div>
|
|
78
|
+
<div>
|
|
79
|
+
<h3>Info</h3>
|
|
80
|
+
<span class="icon icon-info icon-2xl text-info"></span> info
|
|
81
|
+
<span class="icon icon-info-circle icon-2xl text-info"></span> info-circle
|
|
82
|
+
<span class="icon icon-info-circle-fill icon-2xl text-info"></span> info-circle-fill
|
|
83
|
+
</div>
|
|
84
|
+
<div>
|
|
85
|
+
<h3>Chevron down</h3>
|
|
86
|
+
<span class="icon icon-chevron-down icon-2xl"></span> chevron-down
|
|
87
|
+
<span class="icon icon-chevron-down-circle icon-2xl"></span> chevron-down-circle
|
|
88
|
+
<span class="icon icon-chevron-down-circle-fill icon-2xl"></span> chevron-down-circle-fill
|
|
89
|
+
</div>
|
|
90
|
+
<div>
|
|
91
|
+
<h3>Plus</h3>
|
|
92
|
+
<span class="icon icon-plus icon-2xl"></span> plus
|
|
93
|
+
<span class="icon icon-plus-circle icon-2xl"></span> plus-circle
|
|
94
|
+
<span class="icon icon-plus-circle-fill icon-2xl"></span> plus-circle-fill
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
<h2 id="sizes">Sizes</h2>
|
|
99
|
+
<div class="section">
|
|
100
|
+
<div>
|
|
101
|
+
<h3>Custom via icon-*</h3>
|
|
102
|
+
<span class="icon icon-check-circle-fill icon-6"></span>
|
|
103
|
+
<span class="icon icon-check-circle-fill icon-10"></span>
|
|
104
|
+
<span class="icon icon-check-circle-fill icon-[28px]"></span>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
<h2 id="theme-colors">Theme colors</h2>
|
|
109
|
+
<div class="section">
|
|
110
|
+
<div>
|
|
111
|
+
<span class="icon icon-info-circle-fill icon-3xl"></span> default
|
|
112
|
+
<span class="icon icon-info-circle-fill icon-3xl text-primary"></span> primary
|
|
113
|
+
<span class="icon icon-info-circle-fill icon-3xl text-secondary"></span> secondary
|
|
114
|
+
<span class="icon icon-info-circle-fill icon-3xl text-tertiary"></span> tertiary
|
|
115
|
+
<span class="icon icon-check-circle-fill icon-3xl text-success"></span> success
|
|
116
|
+
<span class="icon icon-close-circle-fill icon-3xl text-error"></span> error
|
|
117
|
+
<span class="icon icon-info-circle-fill icon-3xl text-info"></span> info
|
|
118
|
+
<span class="icon icon-warning-triangle-fill icon-3xl text-warning"></span> warning
|
|
119
|
+
<span class="icon icon-warning-circle-fill icon-3xl text-help"></span> help
|
|
120
|
+
<span class="icon icon-info-circle-fill icon-3xl text-ink"></span> ink
|
|
121
|
+
<span class="icon icon-info-circle-fill icon-3xl text-title"></span> title
|
|
122
|
+
<span class="icon icon-info-circle-fill icon-3xl text-description"></span> description
|
|
123
|
+
<span class="icon icon-info-circle-fill icon-3xl text-caption"></span> caption
|
|
124
|
+
<span class="icon icon-info-circle-fill icon-3xl text-placeholder"></span> disabled
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
<h2 id="custom-colors">Custom colors</h2>
|
|
129
|
+
<div class="section">
|
|
130
|
+
<p>Icon color follows the text color — use <code>style="color:..."</code> or <code>text-*</code> utilities.</p>
|
|
131
|
+
<div>
|
|
132
|
+
<span class="icon icon-check-circle-fill" style="color:blue"></span>
|
|
133
|
+
<span class="icon icon-check-circle-fill text-success"></span>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
|
|
137
|
+
<h2 id="use-cases">Use cases</h2>
|
|
138
|
+
<div class="section">
|
|
139
|
+
<div>
|
|
140
|
+
<h3>Status indicators</h3>
|
|
141
|
+
<span class="icon icon-check-circle-fill icon-sm text-success"></span> Upload successful
|
|
142
|
+
<span class="icon icon-close-circle-fill icon-sm text-error"></span> Upload failed
|
|
143
|
+
<span class="icon icon-warning-triangle-fill icon-sm text-warning"></span> Disk space low
|
|
144
|
+
<span class="icon icon-info-circle-fill icon-sm text-info"></span> Update available
|
|
145
|
+
</div>
|
|
146
|
+
<div>
|
|
147
|
+
<h3>Button icons</h3>
|
|
148
|
+
<span class="icon icon-check icon-4xs"></span> Save
|
|
149
|
+
<span class="icon icon-close icon-4xs"></span> Delete
|
|
150
|
+
<span class="icon icon-info-circle icon-4xs text-info"></span> Details
|
|
151
|
+
</div>
|
|
152
|
+
<div>
|
|
153
|
+
<h3>Form validation</h3>
|
|
154
|
+
<span class="icon icon-check-circle-fill icon-sm text-success"></span> Username available
|
|
155
|
+
<span class="icon icon-close-circle-fill icon-sm text-error"></span> Password too weak
|
|
156
|
+
<span class="icon icon-info-circle-fill icon-sm text-info"></span> Email format OK
|
|
157
|
+
<span class="icon icon-warning-triangle-fill icon-sm text-warning"></span> Code expiring
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
|
|
161
|
+
<script src="./demo-utils.js"></script>
|
|
162
|
+
</body>
|
|
163
|
+
|
|
164
|
+
</html>
|
|
@@ -0,0 +1,300 @@
|
|
|
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>Input - WispCSS Demo</title>
|
|
10
|
+
</head>
|
|
11
|
+
|
|
12
|
+
<body>
|
|
13
|
+
<h1>Input Component</h1>
|
|
14
|
+
<p>Text input and textarea styling utilities with CSS variables. Supports visual variants, dynamic theme colors, shapes, sizes, and width modes.</p>
|
|
15
|
+
|
|
16
|
+
<h2>Notes</h2>
|
|
17
|
+
<div class="section">
|
|
18
|
+
<ul>
|
|
19
|
+
<li>Prefer combined utilities like <code>input-subtle-primary</code> over separate <code>input-subtle input-primary</code> — smaller CSS output.</li>
|
|
20
|
+
<li>Variants: <code>input-subtle</code>, <code>input-ghost</code>, <code>input-underline</code>, <code>input-outline</code>.</li>
|
|
21
|
+
<li>Sizes: <code>input-4</code> ~ <code>input-15</code> (row height increases by 1 spacing unit per step).</li>
|
|
22
|
+
<li>Shapes: <code>input-pill</code>, <code>input-rounded</code>, <code>input-square</code>, <code>input-fluid</code>.</li>
|
|
23
|
+
<li>Width: <code>input-scale</code>, <code>input-scale-*</code>, <code>input-ratio</code>, <code>input-ratio-*</code>, <code>input-full</code>.</li>
|
|
24
|
+
<li>Colors: <code>input-*</code> dynamic utilities (e.g. <code>input-primary</code>, <code>input-error</code>, <code>input-teal-500</code>). Works with all variants as compound classes like <code>input-subtle-primary</code>.</li>
|
|
25
|
+
<li>States: <code>disabled</code>, <code>readonly</code>, <code>required</code>, <code>pattern</code> all work natively with styling.</li>
|
|
26
|
+
</ul>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<h2 id="variants">Variants</h2>
|
|
30
|
+
<div class="section">
|
|
31
|
+
<div>
|
|
32
|
+
<h3>Default</h3>
|
|
33
|
+
<input type="text" placeholder="Text input">
|
|
34
|
+
<input type="text" value="Disabled" disabled>
|
|
35
|
+
<input type="text" value="Readonly" readonly>
|
|
36
|
+
<input type="text" placeholder="Required" required>
|
|
37
|
+
<input type="text" value="Aabc" pattern="[a-z]+" placeholder="Lowercase only">
|
|
38
|
+
</div>
|
|
39
|
+
<div>
|
|
40
|
+
<h3>Textarea</h3>
|
|
41
|
+
<textarea placeholder="Multi-line text"></textarea>
|
|
42
|
+
<textarea disabled>Disabled</textarea>
|
|
43
|
+
<textarea readonly>Readonly</textarea>
|
|
44
|
+
<textarea placeholder="Required" required></textarea>
|
|
45
|
+
</div>
|
|
46
|
+
<div>
|
|
47
|
+
<h3>.input-subtle</h3>
|
|
48
|
+
<input type="text" class="input-subtle" placeholder="Subtle">
|
|
49
|
+
<input type="text" class="input-subtle" value="Disabled" disabled>
|
|
50
|
+
</div>
|
|
51
|
+
<div>
|
|
52
|
+
<h3>.input-ghost</h3>
|
|
53
|
+
<input type="text" class="input-ghost" placeholder="Ghost">
|
|
54
|
+
<input type="text" class="input-ghost" value="Disabled" disabled>
|
|
55
|
+
</div>
|
|
56
|
+
<div>
|
|
57
|
+
<h3>.input-underline</h3>
|
|
58
|
+
<input type="text" class="input-underline" placeholder="Underline">
|
|
59
|
+
<input type="text" class="input-underline" value="Disabled" disabled>
|
|
60
|
+
</div>
|
|
61
|
+
<div>
|
|
62
|
+
<h3>.input-outline</h3>
|
|
63
|
+
<input type="text" class="input-outline" placeholder="Outline">
|
|
64
|
+
<input type="text" class="input-outline" value="Disabled" disabled>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<h2 id="theme-colors">Theme colors + variants</h2>
|
|
69
|
+
<div class="section">
|
|
70
|
+
<div>
|
|
71
|
+
<h3>Primary</h3>
|
|
72
|
+
<input type="text" class="input-primary" placeholder="Default">
|
|
73
|
+
<input type="text" class="input-subtle-primary" placeholder="Subtle">
|
|
74
|
+
<input type="text" class="input-muted-primary" placeholder="Muted">
|
|
75
|
+
<input type="text" class="input-ghost-primary" placeholder="Ghost">
|
|
76
|
+
<input type="text" class="input-underline-primary" placeholder="Underline">
|
|
77
|
+
<input type="text" class="input-outline-primary" placeholder="Outline">
|
|
78
|
+
</div>
|
|
79
|
+
<div>
|
|
80
|
+
<h3>Secondary</h3>
|
|
81
|
+
<input type="text" class="input-secondary" placeholder="Default">
|
|
82
|
+
<input type="text" class="input-subtle-secondary" placeholder="Subtle">
|
|
83
|
+
<input type="text" class="input-muted-secondary" placeholder="Muted">
|
|
84
|
+
<input type="text" class="input-ghost-secondary" placeholder="Ghost">
|
|
85
|
+
<input type="text" class="input-underline-secondary" placeholder="Underline">
|
|
86
|
+
<input type="text" class="input-outline-secondary" placeholder="Outline">
|
|
87
|
+
</div>
|
|
88
|
+
<div>
|
|
89
|
+
<h3>Tertiary</h3>
|
|
90
|
+
<input type="text" class="input-tertiary" placeholder="Default">
|
|
91
|
+
<input type="text" class="input-subtle-tertiary" placeholder="Subtle">
|
|
92
|
+
<input type="text" class="input-muted-tertiary" placeholder="Muted">
|
|
93
|
+
<input type="text" class="input-outline-tertiary" placeholder="Outline">
|
|
94
|
+
<input type="text" class="input-ghost-tertiary" placeholder="Ghost">
|
|
95
|
+
<input type="text" class="input-underline-tertiary" placeholder="Underline">
|
|
96
|
+
</div>
|
|
97
|
+
<div>
|
|
98
|
+
<h3>Success</h3>
|
|
99
|
+
<input type="text" class="input-success" placeholder="Default">
|
|
100
|
+
<input type="text" class="input-subtle-success" placeholder="Subtle">
|
|
101
|
+
<input type="text" class="input-muted-success" placeholder="Muted">
|
|
102
|
+
<input type="text" class="input-outline-success" placeholder="Outline">
|
|
103
|
+
<input type="text" class="input-ghost-success" placeholder="Ghost">
|
|
104
|
+
<input type="text" class="input-underline-success" placeholder="Underline">
|
|
105
|
+
</div>
|
|
106
|
+
<div>
|
|
107
|
+
<h3>Error</h3>
|
|
108
|
+
<input type="text" class="input-error" placeholder="Default">
|
|
109
|
+
<input type="text" class="input-subtle-error" placeholder="Subtle">
|
|
110
|
+
<input type="text" class="input-muted-error" placeholder="Muted">
|
|
111
|
+
<input type="text" class="input-outline-error" placeholder="Outline">
|
|
112
|
+
<input type="text" class="input-ghost-error" placeholder="Ghost">
|
|
113
|
+
<input type="text" class="input-underline-error" placeholder="Underline">
|
|
114
|
+
</div>
|
|
115
|
+
<div>
|
|
116
|
+
<h3>Info</h3>
|
|
117
|
+
<input type="text" class="input-info" placeholder="Default">
|
|
118
|
+
<input type="text" class="input-subtle-info" placeholder="Subtle">
|
|
119
|
+
<input type="text" class="input-muted-info" placeholder="Muted">
|
|
120
|
+
<input type="text" class="input-outline-info" placeholder="Outline">
|
|
121
|
+
<input type="text" class="input-ghost-info" placeholder="Ghost">
|
|
122
|
+
<input type="text" class="input-underline-info" placeholder="Underline">
|
|
123
|
+
</div>
|
|
124
|
+
<div>
|
|
125
|
+
<h3>Warning</h3>
|
|
126
|
+
<input type="text" class="input-warning" placeholder="Default">
|
|
127
|
+
<input type="text" class="input-subtle-warning" placeholder="Subtle">
|
|
128
|
+
<input type="text" class="input-muted-warning" placeholder="Muted">
|
|
129
|
+
<input type="text" class="input-outline-warning" placeholder="Outline">
|
|
130
|
+
<input type="text" class="input-ghost-warning" placeholder="Ghost">
|
|
131
|
+
<input type="text" class="input-underline-warning" placeholder="Underline">
|
|
132
|
+
</div>
|
|
133
|
+
<div>
|
|
134
|
+
<h3>Highlight</h3>
|
|
135
|
+
<input type="text" class="input-highlight" placeholder="Default">
|
|
136
|
+
<input type="text" class="input-subtle-highlight" placeholder="Subtle">
|
|
137
|
+
<input type="text" class="input-muted-highlight" placeholder="Muted">
|
|
138
|
+
<input type="text" class="input-outline-highlight" placeholder="Outline">
|
|
139
|
+
<input type="text" class="input-ghost-highlight" placeholder="Ghost">
|
|
140
|
+
<input type="text" class="input-underline-highlight" placeholder="Underline">
|
|
141
|
+
</div>
|
|
142
|
+
<div>
|
|
143
|
+
<h3>Ink</h3>
|
|
144
|
+
<input type="text" class="input-ink" placeholder="Default">
|
|
145
|
+
<input type="text" class="input-subtle-ink" placeholder="Subtle">
|
|
146
|
+
<input type="text" class="input-muted-ink" placeholder="Muted">
|
|
147
|
+
<input type="text" class="input-outline-ink" placeholder="Outline">
|
|
148
|
+
<input type="text" class="input-ghost-ink" placeholder="Ghost">
|
|
149
|
+
<input type="text" class="input-underline-ink" placeholder="Underline">
|
|
150
|
+
</div>
|
|
151
|
+
<div>
|
|
152
|
+
<h3>Title</h3>
|
|
153
|
+
<input type="text" class="input-title" placeholder="Default">
|
|
154
|
+
<input type="text" class="input-subtle-title" placeholder="Subtle">
|
|
155
|
+
<input type="text" class="input-muted-title" placeholder="Muted">
|
|
156
|
+
<input type="text" class="input-outline-title" placeholder="Outline">
|
|
157
|
+
<input type="text" class="input-ghost-title" placeholder="Ghost">
|
|
158
|
+
<input type="text" class="input-underline-title" placeholder="Underline">
|
|
159
|
+
</div>
|
|
160
|
+
<div>
|
|
161
|
+
<h3>Description</h3>
|
|
162
|
+
<input type="text" class="input-description" placeholder="Default">
|
|
163
|
+
<input type="text" class="input-subtle-description" placeholder="Subtle">
|
|
164
|
+
<input type="text" class="input-muted-description" placeholder="Muted">
|
|
165
|
+
<input type="text" class="input-outline-description" placeholder="Outline">
|
|
166
|
+
<input type="text" class="input-ghost-description" placeholder="Ghost">
|
|
167
|
+
<input type="text" class="input-underline-description" placeholder="Underline">
|
|
168
|
+
</div>
|
|
169
|
+
<div>
|
|
170
|
+
<h3>Caption</h3>
|
|
171
|
+
<input type="text" class="input-caption" placeholder="Default">
|
|
172
|
+
<input type="text" class="input-subtle-caption" placeholder="Subtle">
|
|
173
|
+
<input type="text" class="input-muted-caption" placeholder="Muted">
|
|
174
|
+
<input type="text" class="input-outline-caption" placeholder="Outline">
|
|
175
|
+
<input type="text" class="input-ghost-caption" placeholder="Ghost">
|
|
176
|
+
<input type="text" class="input-underline-caption" placeholder="Underline">
|
|
177
|
+
</div>
|
|
178
|
+
<div>
|
|
179
|
+
<h3>Placeholder</h3>
|
|
180
|
+
<input type="text" class="input-placeholder" placeholder="Default">
|
|
181
|
+
<input type="text" class="input-subtle-placeholder" placeholder="Subtle">
|
|
182
|
+
<input type="text" class="input-muted-placeholder" placeholder="Muted">
|
|
183
|
+
<input type="text" class="input-outline-placeholder" placeholder="Outline">
|
|
184
|
+
<input type="text" class="input-ghost-placeholder" placeholder="Ghost">
|
|
185
|
+
<input type="text" class="input-underline-placeholder" placeholder="Underline">
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
|
|
189
|
+
<h2 id="custom-colors">Custom colors</h2>
|
|
190
|
+
<div class="section">
|
|
191
|
+
<p>Multiple color formats are supported:</p>
|
|
192
|
+
<ul>
|
|
193
|
+
<li>1. Theme semantic colors, e.g. <code>*-error</code>, <code>*-error-hover</code></li>
|
|
194
|
+
<li>2. Tailwind built-in colors, e.g. <code>*-indigo-500</code></li>
|
|
195
|
+
<li>3. Raw color values, e.g. <code>*-[#ff0000]</code></li>
|
|
196
|
+
<li>4. CSS named colors, e.g. <code>*-[red]</code>, <code>*-[green]</code></li>
|
|
197
|
+
</ul>
|
|
198
|
+
<div>
|
|
199
|
+
<h3>Default variant</h3>
|
|
200
|
+
<input type="text" class="input-teal-500" placeholder="teal-500">
|
|
201
|
+
<input type="text" class="input-fuchsia-800" placeholder="fuchsia-800">
|
|
202
|
+
<input type="text" class="input-fuchsia-200" placeholder="fuchsia-200">
|
|
203
|
+
</div>
|
|
204
|
+
<div>
|
|
205
|
+
<h3>Subtle variant</h3>
|
|
206
|
+
<input type="text" class="input-subtle-teal-500" placeholder="subtle-teal-500">
|
|
207
|
+
<input type="text" class="input-subtle-[#ff0000]" placeholder="subtle-[#ff0000]">
|
|
208
|
+
</div>
|
|
209
|
+
<div>
|
|
210
|
+
<h3>Ghost variant</h3>
|
|
211
|
+
<input type="text" class="input-ghost-teal-500" placeholder="ghost-teal-500">
|
|
212
|
+
<input type="text" class="input-ghost-[#ff0000]" placeholder="ghost-[#ff0000]">
|
|
213
|
+
</div>
|
|
214
|
+
<div>
|
|
215
|
+
<h3>Underline variant</h3>
|
|
216
|
+
<input type="text" class="input-underline-teal-500" placeholder="underline-teal-500">
|
|
217
|
+
<input type="text" class="input-underline-[#ff0000]" placeholder="underline-[#ff0000]">
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
220
|
+
|
|
221
|
+
<h2 id="shapes">Shapes</h2>
|
|
222
|
+
<div class="section">
|
|
223
|
+
<div>
|
|
224
|
+
<h3>.input-pill (pill)</h3>
|
|
225
|
+
<input type="text" class="input-pill" placeholder="Circle">
|
|
226
|
+
<input type="text" class="input-primary input-pill" placeholder="Primary">
|
|
227
|
+
</div>
|
|
228
|
+
<div>
|
|
229
|
+
<h3>.input-rounded</h3>
|
|
230
|
+
<input type="text" class="input-rounded" placeholder="Rounded">
|
|
231
|
+
<input type="text" class="input-secondary input-rounded" placeholder="Secondary">
|
|
232
|
+
</div>
|
|
233
|
+
<div>
|
|
234
|
+
<h3>.input-fluid</h3>
|
|
235
|
+
<input type="text" class="input-fluid" placeholder="Fluid">
|
|
236
|
+
<input type="text" class="input-tertiary input-fluid" placeholder="Tertiary">
|
|
237
|
+
</div>
|
|
238
|
+
<div>
|
|
239
|
+
<h3>.input-square</h3>
|
|
240
|
+
<input type="text" class="input-square" placeholder="Square">
|
|
241
|
+
<input type="text" class="input-primary input-square" placeholder="Primary">
|
|
242
|
+
</div>
|
|
243
|
+
</div>
|
|
244
|
+
|
|
245
|
+
<h2 id="sizes">Sizes (input-4 ~ input-15)</h2>
|
|
246
|
+
<div class="section">
|
|
247
|
+
<div>
|
|
248
|
+
<h3>input-4 ~ input-7</h3>
|
|
249
|
+
<input type="text" class="input-4" placeholder="input-4">
|
|
250
|
+
<input type="text" class="input-5" placeholder="input-5">
|
|
251
|
+
<input type="text" class="input-6" placeholder="input-6">
|
|
252
|
+
<input type="text" class="input-7" placeholder="input-7">
|
|
253
|
+
</div>
|
|
254
|
+
<div>
|
|
255
|
+
<h3>input-8 ~ input-11</h3>
|
|
256
|
+
<input type="text" class="input-8" placeholder="input-8">
|
|
257
|
+
<input type="text" class="input-9" placeholder="input-9 (default)">
|
|
258
|
+
<input type="text" class="input-10" placeholder="input-10">
|
|
259
|
+
<input type="text" class="input-11" placeholder="input-11">
|
|
260
|
+
</div>
|
|
261
|
+
<div>
|
|
262
|
+
<h3>input-12 ~ input-15</h3>
|
|
263
|
+
<input type="text" class="input-12" placeholder="input-12">
|
|
264
|
+
<input type="text" class="input-13" placeholder="input-13">
|
|
265
|
+
<input type="text" class="input-14" placeholder="input-14">
|
|
266
|
+
<input type="text" class="input-15" placeholder="input-15">
|
|
267
|
+
</div>
|
|
268
|
+
</div>
|
|
269
|
+
|
|
270
|
+
<h2 id="width">Width</h2>
|
|
271
|
+
<div class="section">
|
|
272
|
+
<div>
|
|
273
|
+
<h3>.input-scale</h3>
|
|
274
|
+
<input type="text" class="input-scale" placeholder="Default width">
|
|
275
|
+
</div>
|
|
276
|
+
<div>
|
|
277
|
+
<h3>.input-scale-2 / .input-scale-[2.5]</h3>
|
|
278
|
+
<input type="text" class="input-scale-2" placeholder="2x width">
|
|
279
|
+
<input type="text" class="input-scale-[2.5]" placeholder="2.5x width">
|
|
280
|
+
</div>
|
|
281
|
+
<div>
|
|
282
|
+
<h3>.input-ratio (1:1)</h3>
|
|
283
|
+
<input type="text" class="input-ratio input-8" placeholder="1:1">
|
|
284
|
+
<input type="text" class="input-ratio input-10" placeholder="1:1">
|
|
285
|
+
</div>
|
|
286
|
+
<div>
|
|
287
|
+
<h3>.input-ratio-2 / .input-ratio-3 (2:1 / 3:1)</h3>
|
|
288
|
+
<input type="text" class="input-ratio-2 input-8" placeholder="2:1">
|
|
289
|
+
<input type="text" class="input-ratio-3 input-8" placeholder="3:1">
|
|
290
|
+
</div>
|
|
291
|
+
<div>
|
|
292
|
+
<h3>.input-full</h3>
|
|
293
|
+
<input type="text" class="input-full" placeholder="Full width">
|
|
294
|
+
</div>
|
|
295
|
+
</div>
|
|
296
|
+
|
|
297
|
+
<script src="./demo-utils.js"></script>
|
|
298
|
+
</body>
|
|
299
|
+
|
|
300
|
+
</html>
|