tutuca 0.9.39 → 0.9.41
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/dist/tutuca-cli.js +92 -39
- package/dist/tutuca-dev.js +18 -0
- package/dist/tutuca-dev.min.js +1 -1
- package/package.json +6 -7
- package/skill/immutable-js/SKILL.md +79 -0
- package/skill/immutable-js/references/collection.md +346 -0
- package/skill/immutable-js/references/conversions.md +99 -0
- package/skill/immutable-js/references/deep-updates.md +172 -0
- package/skill/immutable-js/references/equality.md +95 -0
- package/skill/immutable-js/references/list.md +266 -0
- package/skill/immutable-js/references/map.md +300 -0
- package/skill/immutable-js/references/predicates.md +93 -0
- package/skill/immutable-js/references/range-repeat.md +55 -0
- package/skill/immutable-js/references/record.md +196 -0
- package/skill/immutable-js/references/seq.md +248 -0
- package/skill/immutable-js/references/set.md +270 -0
- package/skill/immutable-js/references/shallow-functional.md +99 -0
- package/skill/immutable-js/references/stack.md +210 -0
- package/skill/margaui/SKILL.md +101 -0
- package/skill/margaui/components/accordion.md +127 -0
- package/skill/margaui/components/alert.md +174 -0
- package/skill/margaui/components/avatar.md +220 -0
- package/skill/margaui/components/badge.md +193 -0
- package/skill/margaui/components/breadcrumbs.md +103 -0
- package/skill/margaui/components/button.md +322 -0
- package/skill/margaui/components/calendar.md +67 -0
- package/skill/margaui/components/card.md +373 -0
- package/skill/margaui/components/carousel.md +387 -0
- package/skill/margaui/components/chat.md +171 -0
- package/skill/margaui/components/checkbox.md +101 -0
- package/skill/margaui/components/collapse.md +172 -0
- package/skill/margaui/components/countdown.md +165 -0
- package/skill/margaui/components/diff.md +53 -0
- package/skill/margaui/components/divider.md +107 -0
- package/skill/margaui/components/dock.md +173 -0
- package/skill/margaui/components/drawer.md +184 -0
- package/skill/margaui/components/dropdown.md +388 -0
- package/skill/margaui/components/fab.md +346 -0
- package/skill/margaui/components/fieldset.md +88 -0
- package/skill/margaui/components/file-input.md +84 -0
- package/skill/margaui/components/filter.md +52 -0
- package/skill/margaui/components/footer.md +583 -0
- package/skill/margaui/components/hero.md +135 -0
- package/skill/margaui/components/hover-3d.md +129 -0
- package/skill/margaui/components/hover-gallery.md +49 -0
- package/skill/margaui/components/indicator.md +265 -0
- package/skill/margaui/components/input.md +389 -0
- package/skill/margaui/components/join.md +100 -0
- package/skill/margaui/components/kbd.md +127 -0
- package/skill/margaui/components/label.md +102 -0
- package/skill/margaui/components/link.md +96 -0
- package/skill/margaui/components/list.md +182 -0
- package/skill/margaui/components/loading.md +105 -0
- package/skill/margaui/components/mask.md +168 -0
- package/skill/margaui/components/menu.md +856 -0
- package/skill/margaui/components/mockup-browser.md +39 -0
- package/skill/margaui/components/mockup-code.md +81 -0
- package/skill/margaui/components/mockup-phone.md +39 -0
- package/skill/margaui/components/mockup-window.md +33 -0
- package/skill/margaui/components/modal.md +178 -0
- package/skill/margaui/components/navbar.md +282 -0
- package/skill/margaui/components/pagination.md +122 -0
- package/skill/margaui/components/progress.md +135 -0
- package/skill/margaui/components/radial-progress.md +67 -0
- package/skill/margaui/components/radio.md +133 -0
- package/skill/margaui/components/range.md +134 -0
- package/skill/margaui/components/rating.md +170 -0
- package/skill/margaui/components/select.md +225 -0
- package/skill/margaui/components/skeleton.md +64 -0
- package/skill/margaui/components/stack.md +142 -0
- package/skill/margaui/components/stat.md +254 -0
- package/skill/margaui/components/status.md +73 -0
- package/skill/margaui/components/steps.md +138 -0
- package/skill/margaui/components/swap.md +152 -0
- package/skill/margaui/components/tab.md +248 -0
- package/skill/margaui/components/table.md +1018 -0
- package/skill/margaui/components/text-rotate.md +91 -0
- package/skill/margaui/components/textarea.md +85 -0
- package/skill/margaui/components/theme-controller.md +266 -0
- package/skill/margaui/components/timeline.md +1356 -0
- package/skill/margaui/components/toast.md +165 -0
- package/skill/margaui/components/toggle.md +135 -0
- package/skill/margaui/components/tooltip.md +181 -0
- package/skill/margaui/components/validator.md +163 -0
- package/skill/{advanced.md → tutuca/advanced.md} +5 -0
- package/skill/{cli.md → tutuca/cli.md} +17 -0
- package/skill/{core.md → tutuca/core.md} +5 -0
- /package/skill/{SKILL.md → tutuca/SKILL.md} +0 -0
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
# input
|
|
2
|
+
|
|
3
|
+
_themed text-style input wrapper_
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
Themed wrapper for `<input>` with optional inner icon, label, and **validator** support.
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
- Any single-line text input (text, email, search, password, number, date, etc.).
|
|
12
|
+
- For multi-line, use **textarea**.
|
|
13
|
+
- For dropdowns, use **select**.
|
|
14
|
+
|
|
15
|
+
## Core classes
|
|
16
|
+
|
|
17
|
+
`input`; color `input-primary|secondary|accent|info|success|warning|error|neutral`; style `input-ghost`; size `input-xs|sm|md|lg|xl`.
|
|
18
|
+
|
|
19
|
+
## Examples
|
|
20
|
+
|
|
21
|
+
### Date input
|
|
22
|
+
|
|
23
|
+
Source: `playground/components/input/date-input.html`
|
|
24
|
+
|
|
25
|
+
```html
|
|
26
|
+
<input type="date" class="input" />
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Datetime local input
|
|
30
|
+
|
|
31
|
+
Source: `playground/components/input/datetime-local-input.html`
|
|
32
|
+
|
|
33
|
+
```html
|
|
34
|
+
<input type="datetime-local" class="input" />
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Disabled
|
|
38
|
+
|
|
39
|
+
Source: `playground/components/input/disabled.html`
|
|
40
|
+
|
|
41
|
+
```html
|
|
42
|
+
<input type="text" placeholder="You can't touch this" class="input" disabled />
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Email input with icon and validator
|
|
46
|
+
|
|
47
|
+
Source: `playground/components/input/email-input-with-icon-and-validator.html`
|
|
48
|
+
|
|
49
|
+
```html
|
|
50
|
+
<label class="input validator">
|
|
51
|
+
<svg class="h-[1em] opacity-50" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
52
|
+
<g
|
|
53
|
+
stroke-linejoin="round"
|
|
54
|
+
stroke-linecap="round"
|
|
55
|
+
stroke-width="2.5"
|
|
56
|
+
fill="none"
|
|
57
|
+
stroke="currentColor"
|
|
58
|
+
>
|
|
59
|
+
<rect width="20" height="16" x="2" y="4" rx="2"></rect>
|
|
60
|
+
<path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path>
|
|
61
|
+
</g>
|
|
62
|
+
</svg>
|
|
63
|
+
<input type="email" placeholder="mail@site.com" required />
|
|
64
|
+
</label>
|
|
65
|
+
<div class="validator-hint hidden">Enter valid email address</div>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Email input with icon validator button join
|
|
69
|
+
|
|
70
|
+
Source: `playground/components/input/email-input-with-icon-validator-button-join.html`
|
|
71
|
+
|
|
72
|
+
```html
|
|
73
|
+
<div class="join">
|
|
74
|
+
<div>
|
|
75
|
+
<label class="input validator join-item">
|
|
76
|
+
<svg class="h-[1em] opacity-50" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
77
|
+
<g
|
|
78
|
+
stroke-linejoin="round"
|
|
79
|
+
stroke-linecap="round"
|
|
80
|
+
stroke-width="2.5"
|
|
81
|
+
fill="none"
|
|
82
|
+
stroke="currentColor"
|
|
83
|
+
>
|
|
84
|
+
<rect width="20" height="16" x="2" y="4" rx="2"></rect>
|
|
85
|
+
<path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path>
|
|
86
|
+
</g>
|
|
87
|
+
</svg>
|
|
88
|
+
<input type="email" placeholder="mail@site.com" required />
|
|
89
|
+
</label>
|
|
90
|
+
<div class="validator-hint hidden">Enter valid email address</div>
|
|
91
|
+
</div>
|
|
92
|
+
<button class="btn btn-neutral join-item">Join</button>
|
|
93
|
+
</div>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Ghost style
|
|
97
|
+
|
|
98
|
+
Source: `playground/components/input/ghost-style.html`
|
|
99
|
+
|
|
100
|
+
```html
|
|
101
|
+
<input type="text" placeholder="Type here" class="input input-ghost" />
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Input colors
|
|
105
|
+
|
|
106
|
+
Source: `playground/components/input/input-colors.html`
|
|
107
|
+
|
|
108
|
+
```html
|
|
109
|
+
<input type="text" placeholder="neutral" class="input input-neutral" />
|
|
110
|
+
<input type="text" placeholder="Primary" class="input input-primary" />
|
|
111
|
+
<input type="text" placeholder="Secondary" class="input input-secondary" />
|
|
112
|
+
<input type="text" placeholder="Accent" class="input input-accent" />
|
|
113
|
+
|
|
114
|
+
<input type="text" placeholder="Info" class="input input-info" />
|
|
115
|
+
<input type="text" placeholder="Success" class="input input-success" />
|
|
116
|
+
<input type="text" placeholder="Warning" class="input input-warning" />
|
|
117
|
+
<input type="text" placeholder="Error" class="input input-error" />
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Number input with validator
|
|
121
|
+
|
|
122
|
+
Source: `playground/components/input/number-input-with-validator.html`
|
|
123
|
+
|
|
124
|
+
```html
|
|
125
|
+
<input
|
|
126
|
+
type="number"
|
|
127
|
+
class="input validator"
|
|
128
|
+
required
|
|
129
|
+
placeholder="Type a number between 1 to 10"
|
|
130
|
+
min="1"
|
|
131
|
+
max="10"
|
|
132
|
+
title="Must be between be 1 to 10"
|
|
133
|
+
/>
|
|
134
|
+
<p class="validator-hint">Must be between be 1 to 10</p>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Password input with icon and validator
|
|
138
|
+
|
|
139
|
+
Source: `playground/components/input/password-input-with-icon-and-validator.html`
|
|
140
|
+
|
|
141
|
+
```html
|
|
142
|
+
<label class="input validator">
|
|
143
|
+
<svg class="h-[1em] opacity-50" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
144
|
+
<g
|
|
145
|
+
stroke-linejoin="round"
|
|
146
|
+
stroke-linecap="round"
|
|
147
|
+
stroke-width="2.5"
|
|
148
|
+
fill="none"
|
|
149
|
+
stroke="currentColor"
|
|
150
|
+
>
|
|
151
|
+
<path
|
|
152
|
+
d="M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z"
|
|
153
|
+
></path>
|
|
154
|
+
<circle cx="16.5" cy="7.5" r=".5" fill="currentColor"></circle>
|
|
155
|
+
</g>
|
|
156
|
+
</svg>
|
|
157
|
+
<input
|
|
158
|
+
type="password"
|
|
159
|
+
required
|
|
160
|
+
placeholder="Password"
|
|
161
|
+
minlength="8"
|
|
162
|
+
pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}"
|
|
163
|
+
title="Must be more than 8 characters, including number, lowercase letter, uppercase letter"
|
|
164
|
+
/>
|
|
165
|
+
</label>
|
|
166
|
+
<p class="validator-hint hidden">
|
|
167
|
+
Must be more than 8 characters, including
|
|
168
|
+
<br />At least one number <br />At least one lowercase letter <br />At least one uppercase letter
|
|
169
|
+
</p>
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Search input with icon
|
|
173
|
+
|
|
174
|
+
Source: `playground/components/input/search-input-with-icon.html`
|
|
175
|
+
|
|
176
|
+
```html
|
|
177
|
+
<label class="input">
|
|
178
|
+
<svg class="h-[1em] opacity-50" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
179
|
+
<g
|
|
180
|
+
stroke-linejoin="round"
|
|
181
|
+
stroke-linecap="round"
|
|
182
|
+
stroke-width="2.5"
|
|
183
|
+
fill="none"
|
|
184
|
+
stroke="currentColor"
|
|
185
|
+
>
|
|
186
|
+
<circle cx="11" cy="11" r="8"></circle>
|
|
187
|
+
<path d="m21 21-4.3-4.3"></path>
|
|
188
|
+
</g>
|
|
189
|
+
</svg>
|
|
190
|
+
<input type="search" required placeholder="Search" />
|
|
191
|
+
</label>
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Sizes
|
|
195
|
+
|
|
196
|
+
Source: `playground/components/input/sizes.html`
|
|
197
|
+
|
|
198
|
+
```html
|
|
199
|
+
<input type="text" placeholder="Xsmall" class="input input-xs" />
|
|
200
|
+
<input type="text" placeholder="Small" class="input input-sm" />
|
|
201
|
+
<input type="text" placeholder="Medium" class="input input-md" />
|
|
202
|
+
<input type="text" placeholder="Large" class="input input-lg" />
|
|
203
|
+
<input type="text" placeholder="Xlarge" class="input input-xl" />
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Telephone number input with icon and validator
|
|
207
|
+
|
|
208
|
+
Source: `playground/components/input/telephone-number-input-with-icon-and-validator.html`
|
|
209
|
+
|
|
210
|
+
```html
|
|
211
|
+
<label class="input validator">
|
|
212
|
+
<svg class="h-[1em] opacity-50" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
|
213
|
+
<g fill="none">
|
|
214
|
+
<path
|
|
215
|
+
d="M7.25 11.5C6.83579 11.5 6.5 11.8358 6.5 12.25C6.5 12.6642 6.83579 13 7.25 13H8.75C9.16421 13 9.5 12.6642 9.5 12.25C9.5 11.8358 9.16421 11.5 8.75 11.5H7.25Z"
|
|
216
|
+
fill="currentColor"
|
|
217
|
+
></path>
|
|
218
|
+
<path
|
|
219
|
+
fill-rule="evenodd"
|
|
220
|
+
clip-rule="evenodd"
|
|
221
|
+
d="M6 1C4.61929 1 3.5 2.11929 3.5 3.5V12.5C3.5 13.8807 4.61929 15 6 15H10C11.3807 15 12.5 13.8807 12.5 12.5V3.5C12.5 2.11929 11.3807 1 10 1H6ZM10 2.5H9.5V3C9.5 3.27614 9.27614 3.5 9 3.5H7C6.72386 3.5 6.5 3.27614 6.5 3V2.5H6C5.44771 2.5 5 2.94772 5 3.5V12.5C5 13.0523 5.44772 13.5 6 13.5H10C10.5523 13.5 11 13.0523 11 12.5V3.5C11 2.94772 10.5523 2.5 10 2.5Z"
|
|
222
|
+
fill="currentColor"
|
|
223
|
+
></path>
|
|
224
|
+
</g>
|
|
225
|
+
</svg>
|
|
226
|
+
<input
|
|
227
|
+
type="tel"
|
|
228
|
+
class="tabular-nums"
|
|
229
|
+
required
|
|
230
|
+
placeholder="Phone"
|
|
231
|
+
pattern="[0-9]*"
|
|
232
|
+
minlength="10"
|
|
233
|
+
maxlength="10"
|
|
234
|
+
title="Must be 10 digits"
|
|
235
|
+
/>
|
|
236
|
+
</label>
|
|
237
|
+
<p class="validator-hint">Must be 10 digits</p>
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### Text input with data list suggestion
|
|
241
|
+
|
|
242
|
+
Source: `playground/components/input/text-input-with-data-list-suggestion.html`
|
|
243
|
+
|
|
244
|
+
```html
|
|
245
|
+
<input type="text" class="input" placeholder="Which browser do you use" list="browsers" />
|
|
246
|
+
<datalist id="browsers">
|
|
247
|
+
<option value="Chrome"></option>
|
|
248
|
+
<option value="Firefox"></option>
|
|
249
|
+
<option value="Safari"></option>
|
|
250
|
+
<option value="Opera"></option>
|
|
251
|
+
<option value="Edge"></option>
|
|
252
|
+
</datalist>
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### Text input with text label inside
|
|
256
|
+
|
|
257
|
+
Source: `playground/components/input/text-input-with-text-label-inside.html`
|
|
258
|
+
|
|
259
|
+
```html
|
|
260
|
+
<label class="input">
|
|
261
|
+
<svg class="h-[1em] opacity-50" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
262
|
+
<g
|
|
263
|
+
stroke-linejoin="round"
|
|
264
|
+
stroke-linecap="round"
|
|
265
|
+
stroke-width="2.5"
|
|
266
|
+
fill="none"
|
|
267
|
+
stroke="currentColor"
|
|
268
|
+
>
|
|
269
|
+
<circle cx="11" cy="11" r="8"></circle>
|
|
270
|
+
<path d="m21 21-4.3-4.3"></path>
|
|
271
|
+
</g>
|
|
272
|
+
</svg>
|
|
273
|
+
<input type="search" class="grow" placeholder="Search" />
|
|
274
|
+
<kbd class="kbd kbd-sm">⌘</kbd>
|
|
275
|
+
<kbd class="kbd kbd-sm">K</kbd>
|
|
276
|
+
</label>
|
|
277
|
+
<label class="input">
|
|
278
|
+
<svg class="h-[1em] opacity-50" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
279
|
+
<g
|
|
280
|
+
stroke-linejoin="round"
|
|
281
|
+
stroke-linecap="round"
|
|
282
|
+
stroke-width="2.5"
|
|
283
|
+
fill="none"
|
|
284
|
+
stroke="currentColor"
|
|
285
|
+
>
|
|
286
|
+
<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path>
|
|
287
|
+
<path d="M14 2v4a2 2 0 0 0 2 2h4"></path>
|
|
288
|
+
</g>
|
|
289
|
+
</svg>
|
|
290
|
+
<input type="text" class="grow" placeholder="index.php" />
|
|
291
|
+
</label>
|
|
292
|
+
<label class="input">
|
|
293
|
+
Path
|
|
294
|
+
<input type="text" class="grow" placeholder="src/app/" />
|
|
295
|
+
<span class="badge badge-neutral badge-xs">Optional</span>
|
|
296
|
+
</label>
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
### Text input
|
|
300
|
+
|
|
301
|
+
Source: `playground/components/input/text-input.html`
|
|
302
|
+
|
|
303
|
+
```html
|
|
304
|
+
<input type="text" placeholder="Type here" class="input" />
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### Time input
|
|
308
|
+
|
|
309
|
+
Source: `playground/components/input/time-input.html`
|
|
310
|
+
|
|
311
|
+
```html
|
|
312
|
+
<input type="time" class="input" />
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
### Url with icon and validator
|
|
316
|
+
|
|
317
|
+
Source: `playground/components/input/url-with-icon-and-validator.html`
|
|
318
|
+
|
|
319
|
+
```html
|
|
320
|
+
<label class="input validator">
|
|
321
|
+
<svg class="h-[1em] opacity-50" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
322
|
+
<g
|
|
323
|
+
stroke-linejoin="round"
|
|
324
|
+
stroke-linecap="round"
|
|
325
|
+
stroke-width="2.5"
|
|
326
|
+
fill="none"
|
|
327
|
+
stroke="currentColor"
|
|
328
|
+
>
|
|
329
|
+
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path>
|
|
330
|
+
<path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
|
331
|
+
</g>
|
|
332
|
+
</svg>
|
|
333
|
+
<input
|
|
334
|
+
type="url"
|
|
335
|
+
required
|
|
336
|
+
placeholder="https://"
|
|
337
|
+
value="https://"
|
|
338
|
+
pattern="^(https?://)?([a-zA-Z0-9]([a-zA-Z0-9\-].*[a-zA-Z0-9])?\.)+[a-zA-Z].*$"
|
|
339
|
+
title="Must be valid URL"
|
|
340
|
+
/>
|
|
341
|
+
</label>
|
|
342
|
+
<p class="validator-hint">Must be valid URL</p>
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
### Username text input with icon and validator
|
|
346
|
+
|
|
347
|
+
Source: `playground/components/input/username-text-input-with-icon-and-validator.html`
|
|
348
|
+
|
|
349
|
+
```html
|
|
350
|
+
<label class="input validator">
|
|
351
|
+
<svg class="h-[1em] opacity-50" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
352
|
+
<g
|
|
353
|
+
stroke-linejoin="round"
|
|
354
|
+
stroke-linecap="round"
|
|
355
|
+
stroke-width="2.5"
|
|
356
|
+
fill="none"
|
|
357
|
+
stroke="currentColor"
|
|
358
|
+
>
|
|
359
|
+
<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"></path>
|
|
360
|
+
<circle cx="12" cy="7" r="4"></circle>
|
|
361
|
+
</g>
|
|
362
|
+
</svg>
|
|
363
|
+
<input
|
|
364
|
+
type="text"
|
|
365
|
+
required
|
|
366
|
+
placeholder="Username"
|
|
367
|
+
pattern="[A-Za-z][A-Za-z0-9\-]*"
|
|
368
|
+
minlength="3"
|
|
369
|
+
maxlength="30"
|
|
370
|
+
title="Only letters, numbers or dash"
|
|
371
|
+
/>
|
|
372
|
+
</label>
|
|
373
|
+
<p class="validator-hint">
|
|
374
|
+
Must be 3 to 30 characters
|
|
375
|
+
<br />containing only letters, numbers or dash
|
|
376
|
+
</p>
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
### With fieldset and fieldset legend
|
|
380
|
+
|
|
381
|
+
Source: `playground/components/input/with-fieldset-and-fieldset-legend.html`
|
|
382
|
+
|
|
383
|
+
```html
|
|
384
|
+
<fieldset class="fieldset">
|
|
385
|
+
<legend class="fieldset-legend">What is your name?</legend>
|
|
386
|
+
<input type="text" class="input" placeholder="Type here" />
|
|
387
|
+
<p class="label">Optional</p>
|
|
388
|
+
</fieldset>
|
|
389
|
+
```
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# join
|
|
2
|
+
|
|
3
|
+
_group adjacent items so borders/radii merge_
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
Layout helper that strips inner borders/radii so children render as one fused control (button group, segmented control, input + button).
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
- Button groups, segmented controls, input-with-button combos.
|
|
12
|
+
|
|
13
|
+
## Core classes
|
|
14
|
+
|
|
15
|
+
`join` on the wrapper; `join-item` on each child; modifier `join-vertical|horizontal`.
|
|
16
|
+
|
|
17
|
+
## Examples
|
|
18
|
+
|
|
19
|
+
### Join
|
|
20
|
+
|
|
21
|
+
Source: `playground/components/join/join.html`
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<div class="join">
|
|
25
|
+
<button class="btn join-item">Button</button>
|
|
26
|
+
<button class="btn join-item">Button</button>
|
|
27
|
+
<button class="btn join-item">Button</button>
|
|
28
|
+
</div>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Custom border radius
|
|
32
|
+
|
|
33
|
+
Source: `playground/components/join/custom-border-radius.html`
|
|
34
|
+
|
|
35
|
+
```html
|
|
36
|
+
<div class="join">
|
|
37
|
+
<input class="input join-item" placeholder="Email" />
|
|
38
|
+
<button class="btn join-item rounded-r-full">Subscribe</button>
|
|
39
|
+
</div>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Group items vertically
|
|
43
|
+
|
|
44
|
+
Source: `playground/components/join/group-items-vertically.html`
|
|
45
|
+
|
|
46
|
+
```html
|
|
47
|
+
<div class="join join-vertical">
|
|
48
|
+
<button class="btn join-item">Button</button>
|
|
49
|
+
<button class="btn join-item">Button</button>
|
|
50
|
+
<button class="btn join-item">Button</button>
|
|
51
|
+
</div>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Join radio inputs with btn style
|
|
55
|
+
|
|
56
|
+
Source: `playground/components/join/join-radio-inputs-with-btn-style.html`
|
|
57
|
+
|
|
58
|
+
```html
|
|
59
|
+
<div class="join">
|
|
60
|
+
<input class="join-item btn" type="radio" name="options" aria-label="Radio 1" />
|
|
61
|
+
<input class="join-item btn" type="radio" name="options" aria-label="Radio 2" />
|
|
62
|
+
<input class="join-item btn" type="radio" name="options" aria-label="Radio 3" />
|
|
63
|
+
</div>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Responsive its vertical on small screen and horizontal on large screen
|
|
67
|
+
|
|
68
|
+
Source: `playground/components/join/responsive-its-vertical-on-small-screen-and-horizontal-on-large-screen.html`
|
|
69
|
+
|
|
70
|
+
```html
|
|
71
|
+
<div class="join join-vertical lg:join-horizontal">
|
|
72
|
+
<button class="btn join-item">Button</button>
|
|
73
|
+
<button class="btn join-item">Button</button>
|
|
74
|
+
<button class="btn join-item">Button</button>
|
|
75
|
+
</div>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### With extra elements in the group
|
|
79
|
+
|
|
80
|
+
Source: `playground/components/join/with-extra-elements-in-the-group.html`
|
|
81
|
+
|
|
82
|
+
```html
|
|
83
|
+
<div class="join">
|
|
84
|
+
<div>
|
|
85
|
+
<div>
|
|
86
|
+
<input class="input join-item" placeholder="Search" />
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
<select class="select join-item">
|
|
90
|
+
<option disabled selected>Filter</option>
|
|
91
|
+
<option>Sci-fi</option>
|
|
92
|
+
<option>Drama</option>
|
|
93
|
+
<option>Action</option>
|
|
94
|
+
</select>
|
|
95
|
+
<div class="indicator">
|
|
96
|
+
<span class="indicator-item badge badge-secondary">new</span>
|
|
97
|
+
<button class="btn join-item">Search</button>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
```
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# kbd
|
|
2
|
+
|
|
3
|
+
_keyboard-key visual_
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
Renders text as a keyboard key.
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
- Documenting keyboard shortcuts inline with text.
|
|
12
|
+
|
|
13
|
+
## Core classes
|
|
14
|
+
|
|
15
|
+
`kbd`; size `kbd-xs|sm|md|lg|xl`.
|
|
16
|
+
|
|
17
|
+
## Examples
|
|
18
|
+
|
|
19
|
+
### Kbd
|
|
20
|
+
|
|
21
|
+
Source: `playground/components/kbd/kbd.html`
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<kbd class="kbd">K</kbd>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### A full keyboard
|
|
28
|
+
|
|
29
|
+
Source: `playground/components/kbd/a-full-keyboard.html`
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<div class="my-1 flex w-full justify-center gap-1">
|
|
33
|
+
<kbd class="kbd">q</kbd>
|
|
34
|
+
<kbd class="kbd">w</kbd>
|
|
35
|
+
<kbd class="kbd">e</kbd>
|
|
36
|
+
<kbd class="kbd">r</kbd>
|
|
37
|
+
<kbd class="kbd">t</kbd>
|
|
38
|
+
<kbd class="kbd">y</kbd>
|
|
39
|
+
<kbd class="kbd">u</kbd>
|
|
40
|
+
<kbd class="kbd">i</kbd>
|
|
41
|
+
<kbd class="kbd">o</kbd>
|
|
42
|
+
<kbd class="kbd">p</kbd>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="my-1 flex w-full justify-center gap-1">
|
|
45
|
+
<kbd class="kbd">a</kbd>
|
|
46
|
+
<kbd class="kbd">s</kbd>
|
|
47
|
+
<kbd class="kbd">d</kbd>
|
|
48
|
+
<kbd class="kbd">f</kbd>
|
|
49
|
+
<kbd class="kbd">g</kbd>
|
|
50
|
+
<kbd class="kbd">h</kbd>
|
|
51
|
+
<kbd class="kbd">j</kbd>
|
|
52
|
+
<kbd class="kbd">k</kbd>
|
|
53
|
+
<kbd class="kbd">l</kbd>
|
|
54
|
+
</div>
|
|
55
|
+
<div class="my-1 flex w-full justify-center gap-1">
|
|
56
|
+
<kbd class="kbd">z</kbd>
|
|
57
|
+
<kbd class="kbd">x</kbd>
|
|
58
|
+
<kbd class="kbd">c</kbd>
|
|
59
|
+
<kbd class="kbd">v</kbd>
|
|
60
|
+
<kbd class="kbd">b</kbd>
|
|
61
|
+
<kbd class="kbd">n</kbd>
|
|
62
|
+
<kbd class="kbd">m</kbd>
|
|
63
|
+
<kbd class="kbd">/</kbd>
|
|
64
|
+
</div>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Arrow keys
|
|
68
|
+
|
|
69
|
+
Source: `playground/components/kbd/arrow-keys.html`
|
|
70
|
+
|
|
71
|
+
```html
|
|
72
|
+
<div class="flex w-full justify-center">
|
|
73
|
+
<kbd class="kbd">▲</kbd>
|
|
74
|
+
</div>
|
|
75
|
+
<div class="flex w-full justify-center gap-12">
|
|
76
|
+
<kbd class="kbd">◀︎</kbd>
|
|
77
|
+
<kbd class="kbd">▶︎</kbd>
|
|
78
|
+
</div>
|
|
79
|
+
<div class="flex w-full justify-center">
|
|
80
|
+
<kbd class="kbd">▼</kbd>
|
|
81
|
+
</div>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Function keys
|
|
85
|
+
|
|
86
|
+
Source: `playground/components/kbd/function-keys.html`
|
|
87
|
+
|
|
88
|
+
```html
|
|
89
|
+
<kbd class="kbd">⌘</kbd>
|
|
90
|
+
<kbd class="kbd">⌥</kbd>
|
|
91
|
+
<kbd class="kbd">⇧</kbd>
|
|
92
|
+
<kbd class="kbd">⌃</kbd>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### In text
|
|
96
|
+
|
|
97
|
+
Source: `playground/components/kbd/in-text.html`
|
|
98
|
+
|
|
99
|
+
```html
|
|
100
|
+
Press
|
|
101
|
+
<kbd class="kbd kbd-sm">F</kbd>
|
|
102
|
+
to pay respects.
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Kbd sizes
|
|
106
|
+
|
|
107
|
+
Source: `playground/components/kbd/kbd-sizes.html`
|
|
108
|
+
|
|
109
|
+
```html
|
|
110
|
+
<kbd class="kbd kbd-xs">Xsmall</kbd>
|
|
111
|
+
<kbd class="kbd kbd-sm">Small</kbd>
|
|
112
|
+
<kbd class="kbd kbd-md">Medium</kbd>
|
|
113
|
+
<kbd class="kbd kbd-lg">Large</kbd>
|
|
114
|
+
<kbd class="kbd kbd-xl">Xlarge</kbd>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Key combination
|
|
118
|
+
|
|
119
|
+
Source: `playground/components/kbd/key-combination.html`
|
|
120
|
+
|
|
121
|
+
```html
|
|
122
|
+
<kbd class="kbd">ctrl</kbd>
|
|
123
|
+
+
|
|
124
|
+
<kbd class="kbd">shift</kbd>
|
|
125
|
+
+
|
|
126
|
+
<kbd class="kbd">del</kbd>
|
|
127
|
+
```
|