Rename css class .form-input-reset to .form-input-action

This commit is contained in:
Giuseppe Criscione 2024-10-27 14:22:41 +01:00
parent 703b1bcec8
commit afd82a4dc7
4 changed files with 7 additions and 12 deletions

View File

@ -26,11 +26,6 @@
background-color: var(--color-base-700);
color: var(--color-base-300);
}
&[readonly] {
// Safari Mobile bug
@include user-select-none;
}
}
.form-input[type="checkbox"],
@ -129,7 +124,7 @@
margin-bottom: 0;
}
.form-input-reset {
.form-input-action {
position: absolute;
top: 50%;
right: 0.5rem;
@ -159,7 +154,7 @@
padding-left: 1.75rem;
}
.form-input-wrap .form-input:has(+ .form-input-reset) {
.form-input-wrap .form-input:has(+ .form-input-action) {
padding-right: 1.625rem;
}

View File

@ -35,7 +35,7 @@ export class Inputs {
$$("select:not([hidden])", parent).forEach((element: HTMLSelectElement) => (this[element.name] = new SelectInput(element, app.config.SelectInput)));
$$(".form-input-reset", parent).forEach((element) => {
$$(".form-input-action[data-reset]", parent).forEach((element) => {
const targetId = element.dataset.reset;
if (targetId) {
element.addEventListener("click", () => {

View File

@ -12,5 +12,5 @@
'disabled' => $field->isDisabled(),
'hidden' => $field->isHidden(),
]) ?>>
<span class="form-input-reset" data-reset="<?= $field->name() ?>"><?= $this->icon('times-circle') ?></span>
</div>
<span class="form-input-action" data-reset="<?= $field->name() ?>"><?= $this->icon('times-circle') ?></span>
</div>

View File

@ -13,5 +13,5 @@
'disabled' => $field->isDisabled(),
'hidden' => $field->isHidden(),
]) ?>>
<span class="form-input-reset" data-reset="<?= $field->name() ?>"><?= $this->icon('times-circle') ?></span>
</div>
<span class="form-input-action" data-reset="<?= $field->name() ?>"><?= $this->icon('times-circle') ?></span>
</div>