github.com/hernad/nomad@v1.6.112/ui/app/templates/components/stepper-input.hbs (about) 1 {{! 2 Copyright (c) HashiCorp, Inc. 3 SPDX-License-Identifier: MPL-2.0 4 ~}} 5 6 <label 7 data-test-stepper-label 8 for="stepper-input-{{this.elementId}}" 9 class="stepper-input-label" 10 >{{yield}}</label> 11 <input 12 data-test-stepper-input 13 type="number" 14 min={{this.min}} 15 max={{this.max}} 16 value={{this.internalValue}} 17 disabled={{this.disabled}} 18 id="stepper-input-{{this.elementId}}" 19 class="stepper-input-input" 20 onFocus={{action "selectValue"}} 21 onKeyUp={{action "resetTextInput"}} 22 onChange={{action "setValue"}} 23 /> 24 <button 25 data-test-stepper-decrement 26 role="button" 27 aria-label="decrement" 28 class="stepper-input-stepper button {{this.class}}" 29 disabled={{or this.disabled (lte this.internalValue this.min)}} 30 onclick={{action "decrement"}} 31 type="button" 32 > 33 {{x-icon "minus-plain"}} 34 </button> 35 <button 36 data-test-stepper-increment 37 role="button" 38 aria-label="increment" 39 class="stepper-input-stepper button {{this.class}}" 40 disabled={{or this.disabled (gte this.internalValue this.max)}} 41 onclick={{action "increment"}} 42 type="button" 43 > 44 {{x-icon "plus-plain"}} 45 </button>