Skip to content

Commit 146f96a

Browse files
committed
feat(HTML): input[type="file"] support added, inclusive drag and drop files
1 parent dc38bec commit 146f96a

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed
Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
{{#input.file-upload}}
22
<section class="hoo-input-file">
3-
<div class="hoo-infile-icon">
4-
{{> atoms-icon }}
5-
</div>
6-
<div class="hoo-input-file-inner">
7-
<label for="file_upload" class="hoo-infile-label" name="file-upload" tabIndex="-1">{{label}}Click or drag and
8-
drop</label>
9-
<div class="hoo-infile-description">Lorem ipsum dolor sit amet consectetur adipisicing elit. Quasi, libero?
3+
<label class="hoo-infile-label" name="file-upload" tabIndex="-1" for="{{ getId "file-upload" }}" draggable="true">
4+
<div class="hoo-infile-icon">
5+
{{> atoms-icon }}
106
</div>
11-
<input type="file" id="file_upload" name="{{name}}" class="hoo-infile-context" multiple />
12-
13-
<output class="hoo-infile-output"></output>
14-
</div>
15-
</section>
7+
<div>
8+
{{label}}
9+
{{#description }}
10+
<p class="hoo-infile-description">{{ this }}
11+
</p>
12+
{{/description }}
13+
</div>
14+
</label>
15+
<input type="file" id="{{ getLastId }}" name="{{name}}" class="hoo-infile-context" multiple aria-describedby="{{ getLastId }}-content" />
16+
<output class="hoo-infile-output" id="{{ getLastNumericId }}-content" aria-live="polite" title="Current selection"></output>
1617
{{/input.file-upload}}
18+
</section>

0 commit comments

Comments
 (0)