2020-06-30 00:17:17 +00:00
|
|
|
<label
|
|
|
|
data-test-stepper-label
|
2020-07-28 17:59:14 +00:00
|
|
|
for="stepper-input-{{this.elementId}}"
|
|
|
|
class="stepper-input-label">{{yield}}</label>
|
2020-06-18 20:19:47 +00:00
|
|
|
<input
|
2020-06-19 05:07:51 +00:00
|
|
|
data-test-stepper-input
|
2020-06-18 20:19:47 +00:00
|
|
|
type="number"
|
2020-07-09 20:19:07 +00:00
|
|
|
min={{this.min}}
|
|
|
|
max={{this.max}}
|
|
|
|
value={{this.internalValue}}
|
|
|
|
disabled={{this.disabled}}
|
2020-07-28 17:59:14 +00:00
|
|
|
id="stepper-input-{{this.elementId}}"
|
2020-06-19 03:13:36 +00:00
|
|
|
class="stepper-input-input"
|
2020-06-30 00:17:17 +00:00
|
|
|
onFocus={{action "selectValue"}}
|
2020-06-18 20:19:47 +00:00
|
|
|
onKeyDown={{action "resetTextInput"}}
|
|
|
|
onChange={{action "setValue"}}>
|
|
|
|
<button
|
2020-06-19 05:07:51 +00:00
|
|
|
data-test-stepper-decrement
|
2020-06-18 20:19:47 +00:00
|
|
|
role="button"
|
2020-06-29 22:57:15 +00:00
|
|
|
aria-label="decrement"
|
2020-07-09 20:19:07 +00:00
|
|
|
class="stepper-input-stepper button {{this.class}}"
|
|
|
|
disabled={{or this.disabled (lte this.internalValue this.min)}}
|
2020-07-09 17:30:11 +00:00
|
|
|
onclick={{action "decrement"}}
|
|
|
|
type="button">
|
2020-06-18 20:19:47 +00:00
|
|
|
{{x-icon "minus-plain"}}
|
|
|
|
</button>
|
|
|
|
<button
|
2020-06-19 05:07:51 +00:00
|
|
|
data-test-stepper-increment
|
2020-06-18 20:19:47 +00:00
|
|
|
role="button"
|
2020-06-29 22:57:15 +00:00
|
|
|
aria-label="increment"
|
2020-07-09 20:19:07 +00:00
|
|
|
class="stepper-input-stepper button {{this.class}}"
|
|
|
|
disabled={{or this.disabled (gte this.internalValue this.max)}}
|
2020-07-09 17:30:11 +00:00
|
|
|
onclick={{action "increment"}}
|
|
|
|
type="button">
|
2020-06-18 20:19:47 +00:00
|
|
|
{{x-icon "plus-plain"}}
|
|
|
|
</button>
|