<div class="flex flex-col items-start gap-8 w-full max-w-md bg-white">

    <div class="flex flex-col w-full gap-y-1">
        <div x-data="{showPassword: false}" class="input-wrapper flex flex-col relative w-full  floating-label">

            <div class="sr-only" aria-live="polite">
                <template x-if="!showPassword">
                    <span>Password hidden</span>
                </template>
                <template x-if="showPassword">
                    <span>Password shown</span>
                </template>
            </div>
            <!-- Keep input verification if Magento has one -->
            <input type="password" class="form-input w-full peer required" required placeholder="" :type="showPassword ? 'text' : 'password'" name="password" id="password" minlength="8" @input.debounce="onChange">

            <div class="input-svg password">
                <button type="button" :aria-pressed="showPassword" x-on:click="showPassword = !showPassword" :aria-label="showPassword ? 'Hide Password' : 'Show Password'">
                    <template x-if="showPassword">
                        <svg class=" shrink-0" width="16" height="16" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
                            <path fill-rule="evenodd" clip-rule="evenodd" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z" fill="none" />
                            <path fill-rule="evenodd" clip-rule="evenodd" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" fill="none" />

                        </svg> </template>
                    <template x-if="!showPassword">
                        <svg class=" shrink-0" width="16" height="16" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
                            <path d="M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88" stroke="currentColor" stroke-width="1.5" fill="none" />

                        </svg> </template>
                </button>
            </div>

            <div class="label-wrapper ">
                <label for="password" class="flex flex-row items-center gap-2">

                    <span class="flex-grow">Password</span>

                    <div class="required text-error">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
                            <path d="M8.48605 7.23022L8.81938 7.03777L11.8608 5.28179C12.0734 5.15906 12.3452 5.23189 12.468 5.44446C12.5907 5.65704 12.5179 5.92886 12.3053 6.05159L9.26383 7.80757L8.9305 8.00002L9.26383 8.19247L12.3053 9.94845C12.5179 10.0712 12.5907 10.343 12.468 10.5556C12.3452 10.7681 12.0734 10.841 11.8608 10.7183L8.81938 8.96226L8.48605 8.76981V9.15471V12.6667C8.48605 12.9121 8.28706 13.1111 8.0416 13.1111C7.79614 13.1111 7.59716 12.9121 7.59716 12.6667V9.15472V8.76982L7.26382 8.96227L4.22237 10.7183L4.32568 10.8972L4.22237 10.7183C4.0098 10.841 3.73798 10.7681 3.61525 10.5556C3.49252 10.343 3.56536 10.0712 3.77793 9.94845L6.81938 8.19247L7.15272 8.00002L6.81938 7.80757L3.77794 6.05159L3.66964 6.23916L3.77794 6.05159C3.56536 5.92886 3.49253 5.65704 3.61526 5.44446C3.73799 5.23189 4.0098 5.15906 4.22238 5.28179L7.26382 7.03776L7.59716 7.23021V6.84531V3.33335C7.59716 3.08789 7.79614 2.88891 8.0416 2.88891C8.28706 2.88891 8.48605 3.08789 8.48605 3.33335V6.84532V7.23022Z" fill="currentColor" stroke="currentColor" stroke-width="0.444444" />
                        </svg>
                    </div>
                </label>
            </div>
        </div>

    </div>
</div>
<div class="flex flex-col items-start gap-8 w-full max-w-md bg-white">
    {% for input in inputs %}
        {% include "@template-input-password" with {
            id: input.id,
            name: input.name,
            input_icon: input.input_icon,
            label: input.label,
            label_floating: input.label_floating,
            minlength : input.minlength,
            withHelper: input.withHelper,
        } %}
    {% endfor %}
</div>
{
  "inputs": [
    {
      "id": "password",
      "name": "password",
      "type": "password",
      "label": "Password",
      "label_floating": true,
      "required": true,
      "minlength": 8
    }
  ]
}

No notes defined.