|
1 |
| -<!-- The aria-labelledby attribute on the input and related id on the label as well as aria-hidden="true" are being set for correct support within assistive tools like screenreaders //--> |
2 |
| -<!-- [html-validate-disable-next input-missing-label] --> |
3 |
| -<input type="{{ type }}" |
4 |
| - class="elm-input {{ styleModifier }}" |
5 |
| - placeholder="{{ placeholder }}" |
6 |
| - name="{{ id }}" |
7 |
| - id="{{ id }}" |
8 |
| - {{#if disabled}} disabled{{/if }} |
9 |
| - value="{{ value }}" |
10 |
| - {{#if describedbyid }} aria-describedby="{{ describedbyid }}"{{/if }} |
11 |
| - {{#if aria-invalid }} aria-invalid="{{ aria-invalid }}"{{/if }} |
12 |
| - {{{ validation }}} |
13 |
| - {{#if datalist }} list="datalist{{ id }}"{{/if }} |
14 |
| - aria-labelledby="{{ id }}-label" |
15 |
| - {{#if variant}} data-variant="{{variant}}"{{/if }}> |
16 |
| -<label class="elm-label" |
17 |
| - for="{{ id }}" |
18 |
| - aria-hidden="true" |
19 |
| - id="{{ id }}-label">{{ label }}</label> |
20 |
| -{{#if description }}<p{{#if describedbyid }} id="{{ describedbyid }}"{{/if }} class="description">{{{ description }}}</p>{{/if }} |
21 |
| -{{#if datalist }}<datalist id="datalist{{ id }}"> |
22 |
| - {{#each datalistItems }} |
23 |
| - <option{{#if value }} value="{{ value }}"{{/if }}>{{ text }}</option> |
24 |
| - {{/each }} |
25 |
| -</datalist>{{/if }} |
| 1 | +<div class="elm-input" |
| 2 | + {{#if variant}} data-variant="{{variant}}"{{/if }} |
| 3 | + {{#if icon-before}} data-icon-before="{{icon-before}}"{{/if}} |
| 4 | + {{#if icon-before}} data-icon-after="{{icon-after}}"{{/if}}> |
| 5 | + <!-- The aria-labelledby attribute on the input and related id on the label as well as aria-hidden="true" are being set for correct support within assistive tools like screenreaders //--> |
| 6 | + <!-- [html-validate-disable-next input-missing-label] --> |
| 7 | + <input type="{{ type }}" |
| 8 | + {{#if styleModifier }}class="{{ styleModifier }}"{{/if }} |
| 9 | + placeholder="{{ placeholder }}" |
| 10 | + name="{{ id }}" |
| 11 | + id="{{ id }}" |
| 12 | + {{#if disabled}} disabled{{/if }} |
| 13 | + value="{{ value }}" |
| 14 | + {{#if describedbyid }} aria-describedby="{{ describedbyid }}"{{/if }} |
| 15 | + {{#if aria-invalid }} aria-invalid="{{ aria-invalid }}"{{/if }} |
| 16 | + {{{ validation }}} |
| 17 | + {{#if datalist }} list="datalist{{ id }}"{{/if }} |
| 18 | + aria-labelledby="{{ id }}-label"> |
| 19 | + <label for="{{ id }}" |
| 20 | + aria-hidden="true" |
| 21 | + id="{{ id }}-label">{{ label }}</label> |
| 22 | + |
| 23 | + {{#if description }}<p{{#if describedbyid }} id="{{ describedbyid }}"{{/if }} class="description">{{{ description }}}</p>{{/if }} |
| 24 | + |
| 25 | + {{#if datalist }}<datalist id="datalist-{{ id }}"> |
| 26 | + {{#each datalistItems }} |
| 27 | + <option{{#if value }} value="{{ value }}"{{/if }}>{{ text }}</option> |
| 28 | + {{/each }} |
| 29 | + </datalist> |
| 30 | + {{/if }} |
| 31 | + |
| 32 | + {{!-- icon for data-variants like error or success --}} |
| 33 | + <span class="elm-state-icon"></span> |
| 34 | +</div> |
0 commit comments