@ngx-smz/ui-kit 21.9.0-next.8 → 21.9.0-next.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5867,7 +5867,7 @@ class SmzInputMaskComponent extends SmzValueAccessor {
|
|
|
5867
5867
|
}, ...(ngDevMode ? [{ debugName: "display" }] : []));
|
|
5868
5868
|
writeValue(value) {
|
|
5869
5869
|
super.writeValue(value);
|
|
5870
|
-
this.entered.set(this.
|
|
5870
|
+
this.entered.set(this.fitToSlots(value ?? ''));
|
|
5871
5871
|
}
|
|
5872
5872
|
onFocus() {
|
|
5873
5873
|
this.focusedState.set(true);
|
|
@@ -5912,6 +5912,10 @@ class SmzInputMaskComponent extends SmzValueAccessor {
|
|
|
5912
5912
|
setTimeout(() => this.moveCaret(focusSlot));
|
|
5913
5913
|
}
|
|
5914
5914
|
}
|
|
5915
|
+
/**
|
|
5916
|
+
* Sem `maxlength` no `<input>`: numa mascara fixa o texto exibido ja tem o tamanho maximo (ex.: "5__.___.___-__"),
|
|
5917
|
+
* e o navegador bloquearia a insercao de qualquer caractere novo. `fitToSlots` descarta o que nao cabe.
|
|
5918
|
+
*/
|
|
5915
5919
|
onInput(event) {
|
|
5916
5920
|
const element = event.target;
|
|
5917
5921
|
const entered = this.fitToSlots(element.value);
|
|
@@ -5973,7 +5977,6 @@ class SmzInputMaskComponent extends SmzValueAccessor {
|
|
|
5973
5977
|
class="h-control w-full min-w-0 rounded-control border border-ui-line-strong bg-ui-surface-1 px-input-x font-ui text-ui-md text-ui-fg transition-colors duration-ui placeholder:text-ui-fg-subtle focus:outline-none focus:border-ui-focus focus:ring-1 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50 [&.ng-invalid.ng-dirty]:border-ui-danger"
|
|
5974
5978
|
[attr.id]="inputId() || null"
|
|
5975
5979
|
[attr.placeholder]="placeholder() || null"
|
|
5976
|
-
[attr.maxlength]="parsed().literals.length"
|
|
5977
5980
|
[disabled]="isDisabled()"
|
|
5978
5981
|
[readOnly]="readonly()"
|
|
5979
5982
|
[value]="display()"
|
|
@@ -5998,7 +6001,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
5998
6001
|
class="h-control w-full min-w-0 rounded-control border border-ui-line-strong bg-ui-surface-1 px-input-x font-ui text-ui-md text-ui-fg transition-colors duration-ui placeholder:text-ui-fg-subtle focus:outline-none focus:border-ui-focus focus:ring-1 focus:ring-ui-focus disabled:cursor-not-allowed disabled:opacity-50 [&.ng-invalid.ng-dirty]:border-ui-danger"
|
|
5999
6002
|
[attr.id]="inputId() || null"
|
|
6000
6003
|
[attr.placeholder]="placeholder() || null"
|
|
6001
|
-
[attr.maxlength]="parsed().literals.length"
|
|
6002
6004
|
[disabled]="isDisabled()"
|
|
6003
6005
|
[readOnly]="readonly()"
|
|
6004
6006
|
[value]="display()"
|