@taiga-ui/addon-commerce 4.52.0-canary.763e67d → 4.52.0-canary.7c53ccc
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.
- package/components/input-card/input-card.component.d.ts +1 -1
- package/components/input-card/input-cvc.directive.d.ts +1 -1
- package/components/input-card/input-expire.directive.d.ts +1 -1
- package/components/input-card-group/input-card-group.component.d.ts +19 -30
- package/components/input-card-group/input-card-group.directive.d.ts +3 -6
- package/components/input-card-group/input-card-group.options.d.ts +2 -2
- package/components/input-card-group/input-card-group.providers.d.ts +4 -5
- package/fesm2022/taiga-ui-addon-commerce-components-input-card-group.mjs +66 -114
- package/fesm2022/taiga-ui-addon-commerce-components-input-card-group.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-components-input-card.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-components-thumbnail-card.mjs +2 -4
- package/fesm2022/taiga-ui-addon-commerce-components-thumbnail-card.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-pipes-amount.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-pipes-currency.mjs +3 -5
- package/fesm2022/taiga-ui-addon-commerce-pipes-currency.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-pipes-decimal.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-pipes-format-card.mjs +1 -3
- package/fesm2022/taiga-ui-addon-commerce-pipes-format-card.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-tokens.mjs +2 -3
- package/fesm2022/taiga-ui-addon-commerce-tokens.mjs.map +1 -1
- package/package.json +9 -9
- package/pipes/currency/currency.pipe.d.ts +2 -2
- package/tokens/i18n.d.ts +4 -5
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
2
1
|
import { DOCUMENT, isPlatformServer } from '@angular/common';
|
|
3
2
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { inject, Directive, InjectionToken, viewChild, PLATFORM_ID,
|
|
5
|
-
import {
|
|
3
|
+
import { inject, input, Directive, InjectionToken, computed, viewChild, PLATFORM_ID, signal, output, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
5
|
import * as i4 from '@angular/forms';
|
|
7
6
|
import { FormsModule } from '@angular/forms';
|
|
8
7
|
import { MaskitoDirective } from '@maskito/angular';
|
|
@@ -19,7 +18,7 @@ import { TuiMapperPipe } from '@taiga-ui/cdk/pipes/mapper';
|
|
|
19
18
|
import { TUI_IS_MOBILE, TUI_IS_WEBKIT } from '@taiga-ui/cdk/tokens';
|
|
20
19
|
import { tuiInjectElement, tuiIsElement, tuiIsInput } from '@taiga-ui/cdk/utils/dom';
|
|
21
20
|
import { tuiFocusedIn, tuiIsFocused } from '@taiga-ui/cdk/utils/focus';
|
|
22
|
-
import { tuiGenerateId
|
|
21
|
+
import { tuiGenerateId } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
23
22
|
import { tuiAsDataListHost } from '@taiga-ui/core/components/data-list';
|
|
24
23
|
import { TuiIcon, TuiIconPipe } from '@taiga-ui/core/components/icon';
|
|
25
24
|
import { TUI_TEXTFIELD_OPTIONS } from '@taiga-ui/core/components/textfield';
|
|
@@ -27,38 +26,31 @@ import * as i1 from '@taiga-ui/core/directives/appearance';
|
|
|
27
26
|
import { tuiAppearanceMode, tuiAppearance, tuiAppearanceState, tuiAppearanceFocus, TuiAppearance } from '@taiga-ui/core/directives/appearance';
|
|
28
27
|
import * as i2 from '@taiga-ui/core/portals/dropdown';
|
|
29
28
|
import { TuiDropdownDirective, TuiDropdownOpen, tuiDropdownOptionsProvider, TuiWithDropdownOpen } from '@taiga-ui/core/portals/dropdown';
|
|
30
|
-
import { TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
|
|
29
|
+
import { TUI_BREAKPOINT, TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
|
|
31
30
|
import { TuiChevron } from '@taiga-ui/kit/directives/chevron';
|
|
32
31
|
import { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
|
|
33
|
-
import {
|
|
34
|
-
import { TuiBreakpointService } from '@taiga-ui/core/services';
|
|
32
|
+
import { Subject, EMPTY, switchMap, timer } from 'rxjs';
|
|
35
33
|
import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
36
34
|
|
|
37
35
|
class TuiInputCardGroupDirective {
|
|
38
36
|
constructor() {
|
|
39
|
-
this.
|
|
40
|
-
this.
|
|
41
|
-
this.compact$ = combineLatest([this.c$, this.m$]).pipe(map((c) => c.some(Boolean)));
|
|
42
|
-
this.compact = toSignal(this.compact$, { initialValue: false });
|
|
43
|
-
}
|
|
44
|
-
set compactSetter(compact) {
|
|
45
|
-
this.c$.next(compact);
|
|
37
|
+
this.breakpoint = inject(TUI_BREAKPOINT);
|
|
38
|
+
this.compact = input(false);
|
|
46
39
|
}
|
|
47
40
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputCardGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
48
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
41
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiInputCardGroupDirective, isStandalone: true, inputs: { compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class._compact": "compact() || breakpoint() === 'mobile'" } }, ngImport: i0 }); }
|
|
49
42
|
}
|
|
50
43
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputCardGroupDirective, decorators: [{
|
|
51
44
|
type: Directive,
|
|
52
45
|
args: [{
|
|
53
|
-
|
|
54
|
-
host: { '[class._compact]': 'compact()' },
|
|
46
|
+
host: { '[class._compact]': "compact() || breakpoint() === 'mobile'" },
|
|
55
47
|
}]
|
|
56
48
|
}] });
|
|
57
49
|
|
|
58
50
|
const TUI_INPUT_CARD_GROUP_DEFAULT_OPTIONS = {
|
|
59
51
|
cardValidator: tuiDefaultCardValidator,
|
|
60
|
-
|
|
61
|
-
|
|
52
|
+
placeholder: '0000 0000 0000 0000',
|
|
53
|
+
cvcPlaceholder: '000',
|
|
62
54
|
cvcHidden: true,
|
|
63
55
|
inputs: { cvc: true, expire: true },
|
|
64
56
|
};
|
|
@@ -67,17 +59,23 @@ const [TUI_INPUT_CARD_GROUP_OPTIONS, tuiInputCardGroupOptionsProvider] = tuiCrea
|
|
|
67
59
|
const TUI_INPUT_CARD_GROUP_TEXTS = new InjectionToken(ngDevMode ? 'TUI_INPUT_CARD_GROUP_TEXTS' : '');
|
|
68
60
|
const TUI_INPUT_CARD_GROUP_TEXTS_PROVIDER = {
|
|
69
61
|
provide: TUI_INPUT_CARD_GROUP_TEXTS,
|
|
70
|
-
useFactory: () =>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
62
|
+
useFactory: () => {
|
|
63
|
+
const cardGroupTexts = inject(TUI_INPUT_CARD_GROUP_TEXTS, {
|
|
64
|
+
skipSelf: true,
|
|
65
|
+
optional: true,
|
|
66
|
+
});
|
|
67
|
+
const breakpoint = inject(TUI_BREAKPOINT);
|
|
68
|
+
const directive = inject(TuiInputCardGroupDirective);
|
|
69
|
+
const compact = computed(() => directive.compact() || breakpoint() === 'mobile');
|
|
70
|
+
const cardNumber = inject(TUI_CARD_NUMBER_TEXTS);
|
|
71
|
+
const expiry = inject(TUI_CARD_EXPIRY_TEXTS);
|
|
72
|
+
const cvcTexts = inject(TUI_CARD_CVC_TEXTS);
|
|
73
|
+
return computed(() => cardGroupTexts?.() ?? {
|
|
74
|
+
cardNumberText: cardNumber()[Number(!compact())] ?? '',
|
|
75
|
+
expiryText: expiry()[Number(!compact())] ?? '',
|
|
76
|
+
cvcText: cvcTexts()[Number(!compact())] ?? '',
|
|
77
|
+
});
|
|
78
|
+
},
|
|
81
79
|
};
|
|
82
80
|
|
|
83
81
|
class TuiInputCardGroup extends TuiControl {
|
|
@@ -89,15 +87,19 @@ class TuiInputCardGroup extends TuiControl {
|
|
|
89
87
|
this.doc = inject(DOCUMENT);
|
|
90
88
|
this.isServer = isPlatformServer(inject(PLATFORM_ID));
|
|
91
89
|
this.focus$ = new Subject();
|
|
92
|
-
this.expirePrefilled = false;
|
|
90
|
+
this.expirePrefilled = signal(false);
|
|
93
91
|
this.paymentSystems = inject(TUI_PAYMENT_SYSTEM_ICONS);
|
|
94
92
|
this.options = inject(TUI_INPUT_CARD_GROUP_OPTIONS);
|
|
95
93
|
this.el = tuiInjectElement();
|
|
96
94
|
this.hover = tuiHovered();
|
|
97
95
|
this.focusedIn = tuiFocusedIn(this.el);
|
|
98
|
-
this.
|
|
99
|
-
this.maskCVC = computed((length = this.codeLength()) => TUI_MASK_CVC(length ?? 3));
|
|
96
|
+
this.cvcMask = computed(() => TUI_MASK_CVC(this.codeLength() ?? 3));
|
|
100
97
|
this.cvcHidden = this.options.cvcHidden;
|
|
98
|
+
this.cvcPlaceholder = computed((length = this.codeLength()) => length ? '0'.repeat(length) : this.options.cvcPlaceholder);
|
|
99
|
+
this.cvcPrefilled = computed(() => !this.inputs().cvc || !!this.cvc().match(TUI_NON_DIGIT_REGEXP));
|
|
100
|
+
this.cardPrefilled = computed(() => !!this.card().match(TUI_NON_DIGIT_REGEXP));
|
|
101
|
+
this.focusable = computed(() => this.cardValidator()(this.card()) || this.cardPrefilled());
|
|
102
|
+
this.expireFocusable = computed(() => this.focusable() && !this.expirePrefilled());
|
|
101
103
|
this.isMobile = inject(TUI_IS_MOBILE);
|
|
102
104
|
this.isWebkit = inject(TUI_IS_WEBKIT);
|
|
103
105
|
this.dropdown = inject(TuiDropdownDirective);
|
|
@@ -105,26 +107,27 @@ class TuiInputCardGroup extends TuiControl {
|
|
|
105
107
|
this.maskExpire = TUI_MASK_EXPIRE;
|
|
106
108
|
this.icons = inject(TUI_COMMON_ICONS);
|
|
107
109
|
this.textfield = inject(TUI_TEXTFIELD_OPTIONS);
|
|
108
|
-
this.texts =
|
|
110
|
+
this.texts = inject(TUI_INPUT_CARD_GROUP_TEXTS);
|
|
109
111
|
this.open = inject(TuiDropdownOpen).open;
|
|
110
112
|
this.$ = this.isWebkit
|
|
111
113
|
? this.focus$
|
|
112
114
|
.pipe(switchMap(() => timer(100)), takeUntilDestroyed())
|
|
113
|
-
.subscribe(() => (this.expire ? this.focusCVC() : this.focusExpire()))
|
|
115
|
+
.subscribe(() => (this.expire() ? this.focusCVC() : this.focusExpire()))
|
|
114
116
|
: EMPTY;
|
|
117
|
+
this.card = computed(() => this.value()?.card || '');
|
|
118
|
+
this.expire = computed(() => this.value()?.expire || '');
|
|
119
|
+
this.cvc = computed(() => this.value()?.cvc || '');
|
|
115
120
|
this.m = tuiAppearanceMode(this.mode);
|
|
116
121
|
this.appearance = tuiAppearance(inject(TUI_TEXTFIELD_OPTIONS).appearance);
|
|
117
122
|
this.state = tuiAppearanceState(
|
|
118
123
|
// eslint-disable-next-line no-nested-ternary
|
|
119
124
|
computed(() => (this.disabled() ? 'disabled' : this.hover() ? 'hover' : null)));
|
|
120
125
|
this.focus = tuiAppearanceFocus(computed(() => this.open() || this.focusedIn()));
|
|
121
|
-
this.labelRaised = computed(() => (this.focus() && !this.readOnly()) || !!this.
|
|
122
|
-
this.hasCleaner = computed(() => this.textfield.cleaner() &&
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
this.exampleText = input(this.options.exampleText);
|
|
127
|
-
this.placeholder = input(this.options.exampleText);
|
|
126
|
+
this.labelRaised = computed(() => (this.focus() && !this.readOnly()) || !!this.card());
|
|
127
|
+
this.hasCleaner = computed(() => this.textfield.cleaner() && this.card() && this.interactive());
|
|
128
|
+
this.bin = computed(() => this.card().length < 6 ? null : this.card().slice(0, 6));
|
|
129
|
+
this.content = computed((system = tuiGetPaymentSystem(this.card())) => this.icon() || (system && this.paymentSystems[system]));
|
|
130
|
+
this.placeholder = input(this.options.placeholder);
|
|
128
131
|
this.inputs = input(this.options.inputs);
|
|
129
132
|
this.cardValidator = input(this.options.cardValidator);
|
|
130
133
|
this.icon = input('');
|
|
@@ -132,31 +135,27 @@ class TuiInputCardGroup extends TuiControl {
|
|
|
132
135
|
this.codeLength = input();
|
|
133
136
|
this.binChange = output();
|
|
134
137
|
}
|
|
135
|
-
get bin() {
|
|
136
|
-
return this.card.length < 6 ? null : this.card.slice(0, 6);
|
|
137
|
-
}
|
|
138
138
|
writeValue(value) {
|
|
139
|
-
const
|
|
139
|
+
const bin = this.bin();
|
|
140
140
|
const { activeElement } = this.doc;
|
|
141
141
|
super.writeValue(value);
|
|
142
142
|
this.updateBin(bin);
|
|
143
|
-
this.expirePrefilled
|
|
143
|
+
this.expirePrefilled.set(!!this.expire() && this.cardPrefilled());
|
|
144
144
|
// Programmatic setting of expire input value breaks autofill in Chrome
|
|
145
145
|
const inputExpire = this.inputExpire();
|
|
146
146
|
if (!inputExpire ||
|
|
147
147
|
this.isMobile ||
|
|
148
148
|
this.isWebkit ||
|
|
149
149
|
this.isServer ||
|
|
150
|
-
inputExpire.nativeElement.value === this.expire) {
|
|
150
|
+
inputExpire.nativeElement.value === this.expire()) {
|
|
151
151
|
return;
|
|
152
152
|
}
|
|
153
153
|
inputExpire.nativeElement.focus({ preventScroll: true });
|
|
154
154
|
inputExpire.nativeElement.select();
|
|
155
|
-
this.doc.execCommand('insertText', false, this.expire);
|
|
155
|
+
this.doc.execCommand('insertText', false, this.expire());
|
|
156
156
|
inputExpire.nativeElement.blur();
|
|
157
157
|
activeElement?.focus({ preventScroll: true });
|
|
158
158
|
}
|
|
159
|
-
/** Public API for manual focus management */
|
|
160
159
|
focusCard() {
|
|
161
160
|
this.inputCard()?.nativeElement.focus({ preventScroll: true });
|
|
162
161
|
}
|
|
@@ -173,18 +172,18 @@ class TuiInputCardGroup extends TuiControl {
|
|
|
173
172
|
}
|
|
174
173
|
handleOption(option) {
|
|
175
174
|
const { card = '', expire = '', cvc = '' } = option || {};
|
|
176
|
-
const
|
|
175
|
+
const bin = this.bin();
|
|
177
176
|
const element = (!card && this.inputCard()?.nativeElement) ||
|
|
178
177
|
(!expire && this.inputExpire()?.nativeElement) ||
|
|
179
178
|
this.inputCVC()?.nativeElement;
|
|
180
179
|
this.onChange({ card, expire, cvc });
|
|
181
180
|
this.updateBin(bin);
|
|
182
181
|
this.open.set(false);
|
|
183
|
-
this.expirePrefilled
|
|
182
|
+
this.expirePrefilled.set(!!expire);
|
|
184
183
|
element?.focus();
|
|
185
184
|
}
|
|
186
185
|
clear() {
|
|
187
|
-
this.expirePrefilled
|
|
186
|
+
this.expirePrefilled.set(false);
|
|
188
187
|
[this.inputCVC(), this.inputExpire(), this.inputCard()].forEach((e) => {
|
|
189
188
|
e?.nativeElement.focus();
|
|
190
189
|
e?.nativeElement.select();
|
|
@@ -192,55 +191,21 @@ class TuiInputCardGroup extends TuiControl {
|
|
|
192
191
|
});
|
|
193
192
|
this.onChange(null);
|
|
194
193
|
}
|
|
195
|
-
onResize() {
|
|
196
|
-
this.cdr.detectChanges();
|
|
197
|
-
}
|
|
198
|
-
get content() {
|
|
199
|
-
const system = this.getPaymentSystem(this.card);
|
|
200
|
-
return this.icon() || (system && this.paymentSystems[system]);
|
|
201
|
-
}
|
|
202
|
-
get card() {
|
|
203
|
-
return this.value()?.card || '';
|
|
204
|
-
}
|
|
205
|
-
get expire() {
|
|
206
|
-
return this.value()?.expire || '';
|
|
207
|
-
}
|
|
208
|
-
get cvc() {
|
|
209
|
-
return this.value()?.cvc || '';
|
|
210
|
-
}
|
|
211
194
|
get cardCollapsed() {
|
|
212
|
-
return
|
|
195
|
+
return this.focusable() && !tuiIsFocused(this.inputCard()?.nativeElement);
|
|
213
196
|
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
}
|
|
217
|
-
get cardPrefilled() {
|
|
218
|
-
return !!this.card.match(TUI_NON_DIGIT_REGEXP);
|
|
219
|
-
}
|
|
220
|
-
get cvcPrefilled() {
|
|
221
|
-
return !this.inputs().cvc || !!this.cvc.match(TUI_NON_DIGIT_REGEXP);
|
|
222
|
-
}
|
|
223
|
-
get cardFocusable() {
|
|
224
|
-
return !this.cardPrefilled;
|
|
225
|
-
}
|
|
226
|
-
get expireFocusable() {
|
|
227
|
-
return this.isFocusable(this.card) && !this.expirePrefilled;
|
|
228
|
-
}
|
|
229
|
-
get cvcFocusable() {
|
|
230
|
-
return this.isFocusable(this.card);
|
|
231
|
-
}
|
|
232
|
-
get masked() {
|
|
233
|
-
return this.cardPrefilled ? `${this.card.slice(-4)}` : '';
|
|
197
|
+
onResize() {
|
|
198
|
+
this.cdr.detectChanges();
|
|
234
199
|
}
|
|
235
200
|
onCardChange(card) {
|
|
236
|
-
const
|
|
201
|
+
const bin = this.bin();
|
|
237
202
|
const parsed = card.split(CHAR_NO_BREAK_SPACE).join('');
|
|
238
|
-
if (
|
|
203
|
+
if (this.card() === parsed) {
|
|
239
204
|
return;
|
|
240
205
|
}
|
|
241
206
|
this.updateProperty(parsed, 'card');
|
|
242
207
|
this.updateBin(bin);
|
|
243
|
-
if (this.cardValidator()(this.card) && !
|
|
208
|
+
if (this.cardValidator()(this.card()) && !this.expire() && this.inputExpire()) {
|
|
244
209
|
this.focusExpire();
|
|
245
210
|
// Safari autofill focus jerk workaround
|
|
246
211
|
this.focus$.next();
|
|
@@ -271,16 +236,9 @@ class TuiInputCardGroup extends TuiControl {
|
|
|
271
236
|
toggle() {
|
|
272
237
|
this.open.update((open) => !open);
|
|
273
238
|
}
|
|
274
|
-
isFocusable(card) {
|
|
275
|
-
return this.cardValidator()(card) || this.cardPrefilled;
|
|
276
|
-
}
|
|
277
|
-
getPaymentSystem(value) {
|
|
278
|
-
return tuiGetPaymentSystem(value);
|
|
279
|
-
}
|
|
280
239
|
updateBin(oldBin) {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
this.binChange.emit(bin);
|
|
240
|
+
if (this.bin() !== oldBin && !this.cardPrefilled()) {
|
|
241
|
+
this.binChange.emit(this.bin());
|
|
284
242
|
}
|
|
285
243
|
}
|
|
286
244
|
updateProperty(value, propName) {
|
|
@@ -290,26 +248,20 @@ class TuiInputCardGroup extends TuiControl {
|
|
|
290
248
|
this.onChange(newValue.expire || newValue.cvc || newValue.card ? newValue : null);
|
|
291
249
|
}
|
|
292
250
|
focusInput() {
|
|
293
|
-
const element = (this.
|
|
294
|
-
(this.expireFocusable && this.inputExpire()?.nativeElement) ||
|
|
251
|
+
const element = (!this.cardPrefilled() && this.inputCard()?.nativeElement) ||
|
|
252
|
+
(this.expireFocusable() && this.inputExpire()?.nativeElement) ||
|
|
295
253
|
this.inputCVC()?.nativeElement;
|
|
296
254
|
element?.focus();
|
|
297
255
|
}
|
|
298
256
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputCardGroup, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
299
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiInputCardGroup, isStandalone: true, selector: "tui-input-card-group", inputs: {
|
|
257
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiInputCardGroup, isStandalone: true, selector: "tui-input-card-group", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, inputs: { classPropertyName: "inputs", publicName: "inputs", isSignal: true, isRequired: false, transformFunction: null }, cardValidator: { classPropertyName: "cardValidator", publicName: "cardValidator", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, codeLength: { classPropertyName: "codeLength", publicName: "codeLength", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { binChange: "binChange" }, host: { listeners: { "pointerdown": "onPointerDown($event)", "scroll.zoneless": "$event.target.scrollLeft = 0", "tuiActiveZoneChange": "onTouched()" }, properties: { "attr.data-size": "textfield.size()" } }, providers: [
|
|
300
258
|
tuiAsDataListHost(TuiInputCardGroup),
|
|
301
259
|
tuiAsControl(TuiInputCardGroup),
|
|
302
260
|
tuiDropdownOptionsProvider({ limitWidth: 'fixed' }),
|
|
303
261
|
TuiHoveredService,
|
|
304
262
|
TUI_INPUT_CARD_GROUP_TEXTS_PROVIDER,
|
|
305
|
-
], viewQueries: [{ propertyName: "inputCard", first: true, predicate: ["inputCard"], descendants: true, isSignal: true }, { propertyName: "inputExpire", first: true, predicate: ["inputExpire"], descendants: true, isSignal: true }, { propertyName: "inputCVC", first: true, predicate: ["inputCVC"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.TuiAppearance }, { directive: i2.TuiDropdownDirective }, { directive: i2.TuiWithDropdownOpen }, { directive: TuiInputCardGroupDirective, inputs: ["compact", "compact"] }], ngImport: i0, template: "@let formattedCard = value()?.card | tuiFormatCard: cardPrefilled;\n\n<div class=\"t-wrapper\">\n <label (click.zoneless.prevent)=\"(0)\">\n <input\n #inputCard\n autocomplete=\"cc-number\"\n automation-id=\"tui-input-card-group__card\"\n inputmode=\"numeric\"\n translate=\"no\"\n type=\"text\"\n class=\"t-input t-input_card\"\n [attr.aria-invalid]=\"!cardPrefilled && !(this.card | tuiMapper: cardValidator())\"\n [attr.id]=\"`${id()}_card`\"\n [class.t-input_filled]=\"card.length\"\n [class.t-input_inert]=\"cardPrefilled\"\n [disabled]=\"disabled()\"\n [maskito]=\"maskCard\"\n [ngModel]=\"formattedCard\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"cardPrefilled ? '' : placeholder() || exampleText()\"\n [readOnly]=\"readOnly()\"\n [tabIndex]=\"cardFocusable ? 0 : -1\"\n (focus)=\"(0)\"\n (ngModelChange)=\"onCardChange($event)\"\n />\n <span\n aria-hidden=\"true\"\n translate=\"no\"\n class=\"t-collapsed\"\n [attr.data-before]=\"masked\"\n [class.t-collapsed_enable-mask]=\"cardCollapsed\"\n (waResizeObserver)=\"onResize()\"\n >\n <span\n #ghost\n class=\"t-ghost\"\n [textContent]=\"formattedCard.slice(-tailLength)\"\n ></span>\n\n <span class=\"t-collapsed-wrapper\">\n <span\n class=\"t-value\"\n [style]=\"getStyle(ghost)\"\n [textContent]=\"formattedCard\"\n ></span>\n </span>\n </span>\n <div\n tuiTransitioned\n class=\"t-label\"\n [attr.data-label]=\"texts()?.cardNumberText\"\n [class.t-label_raised]=\"labelRaised()\"\n >\n <ng-content />\n </div>\n </label>\n</div>\n<div\n class=\"t-wrapper t-wrapper_expire\"\n [class.t-wrapper_active]=\"cardCollapsed\"\n>\n <label (click.zoneless.prevent)=\"(0)\">\n <input\n #inputExpire\n autocomplete=\"cc-exp\"\n automation-id=\"tui-input-card-group__expire\"\n inputmode=\"numeric\"\n maxlength=\"5\"\n name=\"ccexpiryyear\"\n translate=\"no\"\n class=\"t-input\"\n [attr.id]=\"`${id()}_expire`\"\n [class.t-input_inert]=\"!expireFocusable\"\n [class.t-input_prefilled]=\"!inputs().expire\"\n [disabled]=\"disabled()\"\n [maskito]=\"maskExpire\"\n [ngModel]=\"expire\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"inputs().expire ? '00/00' : '\u2022\u2022/\u2022\u2022'\"\n [readOnly]=\"readOnly() || !inputs().expire\"\n [tabIndex]=\"expireFocusable || (isMobile && isWebkit) ? 0 : -1\"\n (focus)=\"(0)\"\n (ngModelChange)=\"onExpireChange($event)\"\n />\n <div\n tuiTransitioned\n class=\"t-label\"\n [class.t-label_raised]=\"labelRaised()\"\n >\n {{ texts()?.expiryText }}\n </div>\n </label>\n</div>\n<div\n class=\"t-wrapper t-wrapper_cvc\"\n [class.t-wrapper_active]=\"cardCollapsed\"\n>\n <label (click.zoneless.prevent)=\"(0)\">\n <input\n #inputCVC\n autocomplete=\"cc-csc\"\n automation-id=\"tui-input-card-group__cvc\"\n inputmode=\"numeric\"\n translate=\"no\"\n type=\"text\"\n class=\"t-input\"\n [attr.id]=\"`${id()}_cvc`\"\n [class.t-input_cvc_hidden]=\"cvcHidden\"\n [class.t-input_prefilled]=\"cvcPrefilled\"\n [disabled]=\"disabled()\"\n [maskito]=\"maskCVC()\"\n [ngModel]=\"cvc\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"cvcPrefilled ? '\u2022\u2022\u2022' : exampleTextCVC()\"\n [readOnly]=\"readOnly() || cvcPrefilled\"\n [tabIndex]=\"cvcFocusable || (isMobile && isWebkit) ? 0 : -1\"\n (focus)=\"(0)\"\n (ngModelChange)=\"onCVCChange($event)\"\n />\n <div\n tuiTransitioned\n class=\"t-label\"\n [class.t-label_raised]=\"labelRaised()\"\n >\n {{ texts()?.cvcText }}\n </div>\n </label>\n</div>\n<div class=\"t-icons\">\n @if (content) {\n <div class=\"t-icon-outlet\">\n <img\n *polymorpheusOutlet=\"content as src\"\n alt=\"\"\n automation-id=\"tui-input-card-group__icon\"\n class=\"t-card\"\n [src]=\"src | tuiIcon\"\n />\n </div>\n }\n @if (hasCleaner()) {\n <tui-icon\n automation-id=\"tui-input-card-group__cleaner\"\n tuiAppearance=\"icon\"\n class=\"t-icon\"\n [icon]=\"icons.close\"\n (click)=\"clear()\"\n />\n }\n @if (dropdown.content()) {\n <tui-icon\n automation-id=\"tui-input-card-group__dropdown\"\n tuiAppearance=\"icon\"\n tuiChevron\n class=\"t-icon\"\n (click)=\"toggle()\"\n />\n }\n</div>\n", styles: ["@keyframes outside{0%{transform:translate3d(calc(var(--t-translate) * var(--tui-inline)),0,0)}to{transform:translate3d(calc(100% * var(--tui-inline)),0,0)}}@keyframes inside{0%{transform:translate3d(calc(100% * var(--tui-inline)),0,0)}to{transform:translate3d(calc(var(--t-translate) * var(--tui-inline)),0,0)}}:host{--t-height: var(--tui-height-l);--t-padding: var(--tui-padding-l);--t-label: -.7rem;--t-label-size: .83em;--t-translate: 6.5rem;--t-collapsed-offset: 1.4375rem;position:relative;display:block;block-size:var(--t-height);min-inline-size:24rem;border-radius:var(--tui-radius-l);overflow:hidden;font:var(--tui-font-text-ui-m);isolation:isolate}:host[data-size=m]{--t-label: -.7em;--t-height: var(--tui-height-m);--t-padding: var(--tui-padding-m);--t-collapsed-offset: 1.125rem;border-radius:var(--tui-radius-m);font:var(--tui-font-text-ui-s)}:host[data-size=m] .t-card{inline-size:1.5rem;block-size:1.5rem}:host[data-size=m] [tuiChevron]{margin-inline-end:-.875rem;margin-inline-start:.125rem}:host._compact{min-inline-size:19rem;--t-translate: 4rem}:host[tuiAppearance][data-appearance]:has(:-webkit-autofill,[chrome-autofilled]){background:var(--tui-service-autofill-background)!important}:host [tuiChevron]{block-size:auto;align-self:stretch;border-inline-end:var(--t-padding) solid transparent;margin-inline-end:-.75rem;box-sizing:content-box;font-size:1rem;cursor:pointer}.t-wrapper{position:absolute;z-index:1;inline-size:100%;block-size:var(--t-height);transition:opacity 0s var(--tui-duration)}.t-wrapper_cvc,.t-wrapper_expire{opacity:0;pointer-events:none;animation:outside var(--tui-duration) ease-in-out}.t-wrapper_cvc{margin-inline-start:7rem}:host._compact .t-wrapper_cvc{margin-inline-start:4rem}.t-wrapper_active{transition:none;pointer-events:auto;opacity:1;animation:inside var(--tui-duration) ease-in-out forwards}.t-card{inline-size:2rem;block-size:2rem}.t-collapsed{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;padding:calc(var(--t-height) / 3) var(--t-padding) 0;box-sizing:border-box;line-height:calc(2 * var(--t-height) / 3);color:var(--tui-text-primary);white-space:nowrap;pointer-events:none}.t-collapsed:after{content:\"*\";float:left;opacity:0}:host-context([dir=\"rtl\"]) .t-collapsed:after{float:none}.t-collapsed_enable-mask:before{content:attr(data-before)}.t-collapsed_enable-mask:after{opacity:1}:host-context([dir=\"rtl\"]) .t-collapsed_enable-mask:after{transition:opacity 0s var(--tui-duration)}.t-collapsed_enable-mask .t-collapsed-wrapper{inset-inline-start:var(--t-collapsed-offset)}:host-context([dir=\"rtl\"]) .t-collapsed_enable-mask .t-collapsed-wrapper{inset-inline-start:unset}.t-collapsed-wrapper{position:absolute;display:block;inset-block-start:0;inline-size:100%;block-size:100%;overflow:hidden}.t-value{transition-property:transform,clip-path;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;display:block;inset:auto 100% 0 auto;clip-path:inset(0);transform:translate3d(calc(100% * var(--tui-inline)),0,0)}:host-context([dir=\"rtl\"]) .t-value{inset:auto unset auto 100%;transform:translate3d(calc(100% * var(--tui-inline)),0,0)!important}.t-input{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;z-index:1;border:0;margin:0;padding:calc(var(--t-height) / 3) var(--t-padding) 0;outline:none;background:transparent;box-sizing:border-box;font:inherit;color:var(--tui-text-primary);direction:ltr}:host-context([dir=\"rtl\"]) .t-input{text-align:end}.t-input::placeholder{color:var(--tui-text-tertiary)}.t-input_prefilled::placeholder{color:var(--tui-text-primary)}.t-input[chrome-autofilled],.t-input:-webkit-autofill{-webkit-text-fill-color:var(--tui-text-primary)!important;caret-color:var(--tui-text-primary)!important;transition:background-color 600000s 0s}.t-input.t-input.t-input_card:not(:-webkit-autofill,[chrome-autofilled]):not(:focus:placeholder-shown),.t-input.t-input.t-input_card.t-input_filled{caret-color:var(--tui-text-primary);color:transparent!important;-webkit-text-fill-color:transparent!important}.t-input.t-input.t-input_card::-webkit-credit-card-auto-fill-button{content:none!important;position:absolute;z-index:-999;display:none!important;inset:-60rem 0 0 -60rem;background:transparent!important;pointer-events:none!important}.t-input_inert{pointer-events:none}.t-input_cvc_hidden{-webkit-text-security:disc}.t-icons{position:absolute;z-index:1;display:flex;inset-inline-end:1rem;align-items:center;block-size:var(--t-height);gap:.25rem;pointer-events:none}.t-icon-outlet{display:flex;margin-inline-end:.25rem}.t-icon{cursor:pointer;pointer-events:auto}.t-icon:before{font-size:1rem}.t-label{transition-property:all;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;margin:0 var(--t-padding);line-height:var(--t-height);color:var(--tui-text-secondary)}.t-label:empty:before{content:attr(data-label)}input[chrome-autofilled]~.t-label,input:-webkit-autofill~.t-label,.t-label_raised{font-size:var(--t-label-size);transform:translateY(var(--t-label))}:host([data-mode~=\"invalid\"]) input[chrome-autofilled]~.t-label,:host([data-mode~=\"invalid\"]) input:-webkit-autofill~.t-label,:host([data-mode~=\"invalid\"]) .t-label_raised{color:var(--tui-text-negative)}:host([data-focus=\"true\"]) .t-label{color:var(--tui-text-primary)}.t-ghost{visibility:hidden}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"], outputs: ["maskitoChange", "maskitoElementChange"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiAppearance, selector: "[tuiAppearance]", inputs: ["tuiAppearance", "tuiAppearanceState", "tuiAppearanceFocus", "tuiAppearanceMode"] }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "pipe", type: TuiFormatCardPipe, name: "tuiFormatCard" }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "pipe", type: TuiIconPipe, name: "tuiIcon" }, { kind: "pipe", type: TuiMapperPipe, name: "tuiMapper" }, { kind: "directive", type: TuiTransitioned, selector: "[tuiTransitioned]" }, { kind: "directive", type: WaResizeObserver, selector: "[waResizeObserver]", inputs: ["box"], outputs: ["waResizeObserver"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
263
|
+
], viewQueries: [{ propertyName: "inputCard", first: true, predicate: ["inputCard"], descendants: true, isSignal: true }, { propertyName: "inputExpire", first: true, predicate: ["inputExpire"], descendants: true, isSignal: true }, { propertyName: "inputCVC", first: true, predicate: ["inputCVC"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.TuiAppearance }, { directive: i2.TuiDropdownDirective }, { directive: i2.TuiWithDropdownOpen }, { directive: TuiInputCardGroupDirective, inputs: ["compact", "compact"] }], ngImport: i0, template: "@let formattedCard = card() | tuiFormatCard: cardPrefilled();\n\n<div class=\"t-wrapper\">\n <label (click.zoneless.prevent)=\"(0)\">\n <input\n #inputCard\n autocomplete=\"cc-number\"\n automation-id=\"tui-input-card-group__card\"\n inputmode=\"numeric\"\n translate=\"no\"\n type=\"text\"\n class=\"t-input t-input_card\"\n [attr.aria-invalid]=\"!cardPrefilled() && !(this.card() | tuiMapper: cardValidator())\"\n [attr.id]=\"`${id()}_card`\"\n [class.t-input_filled]=\"card().length\"\n [class.t-input_inert]=\"cardPrefilled()\"\n [disabled]=\"disabled()\"\n [maskito]=\"maskCard\"\n [ngModel]=\"formattedCard\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"cardPrefilled() ? '' : placeholder()\"\n [readOnly]=\"readOnly()\"\n [tabIndex]=\"cardPrefilled() ? -1 : 0\"\n (focus)=\"(0)\"\n (ngModelChange)=\"onCardChange($event)\"\n />\n <span\n aria-hidden=\"true\"\n translate=\"no\"\n class=\"t-collapsed\"\n [attr.data-before]=\"cardPrefilled() ? card().slice(-4) : ''\"\n [class.t-collapsed_enable-mask]=\"cardCollapsed\"\n (waResizeObserver)=\"onResize()\"\n >\n <span\n #ghost\n class=\"t-ghost\"\n [textContent]=\"formattedCard.slice(card().length % 4 > 0 ? -5 : -4)\"\n ></span>\n\n <span class=\"t-collapsed-wrapper\">\n <span\n class=\"t-value\"\n [style]=\"getStyle(ghost)\"\n [textContent]=\"formattedCard\"\n ></span>\n </span>\n </span>\n <div\n tuiTransitioned\n class=\"t-label\"\n [attr.data-label]=\"texts().cardNumberText\"\n [class.t-label_raised]=\"labelRaised()\"\n >\n <ng-content />\n </div>\n </label>\n</div>\n<div\n class=\"t-wrapper t-wrapper_expire\"\n [class.t-wrapper_active]=\"cardCollapsed\"\n>\n <label (click.zoneless.prevent)=\"(0)\">\n <input\n #inputExpire\n autocomplete=\"cc-exp\"\n automation-id=\"tui-input-card-group__expire\"\n inputmode=\"numeric\"\n maxlength=\"5\"\n name=\"ccexpiryyear\"\n translate=\"no\"\n class=\"t-input\"\n [attr.id]=\"`${id()}_expire`\"\n [class.t-input_inert]=\"!expireFocusable()\"\n [class.t-input_prefilled]=\"!inputs().expire\"\n [disabled]=\"disabled()\"\n [maskito]=\"maskExpire\"\n [ngModel]=\"expire()\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"inputs().expire ? '00/00' : '\u2022\u2022/\u2022\u2022'\"\n [readOnly]=\"readOnly() || !inputs().expire\"\n [tabIndex]=\"expireFocusable() || (isMobile && isWebkit) ? 0 : -1\"\n (focus)=\"(0)\"\n (ngModelChange)=\"onExpireChange($event)\"\n />\n <div\n tuiTransitioned\n class=\"t-label\"\n [class.t-label_raised]=\"labelRaised()\"\n >\n {{ texts().expiryText }}\n </div>\n </label>\n</div>\n<div\n class=\"t-wrapper t-wrapper_cvc\"\n [class.t-wrapper_active]=\"cardCollapsed\"\n>\n <label (click.zoneless.prevent)=\"(0)\">\n <input\n #inputCVC\n autocomplete=\"cc-csc\"\n automation-id=\"tui-input-card-group__cvc\"\n inputmode=\"numeric\"\n translate=\"no\"\n type=\"text\"\n class=\"t-input\"\n [attr.id]=\"`${id()}_cvc`\"\n [class.t-input_cvc_hidden]=\"cvcHidden\"\n [class.t-input_prefilled]=\"cvcPrefilled()\"\n [disabled]=\"disabled()\"\n [maskito]=\"cvcMask()\"\n [ngModel]=\"cvc()\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"cvcPrefilled() ? '\u2022\u2022\u2022' : cvcPlaceholder()\"\n [readOnly]=\"readOnly() || cvcPrefilled()\"\n [tabIndex]=\"focusable() || (isMobile && isWebkit) ? 0 : -1\"\n (focus)=\"(0)\"\n (ngModelChange)=\"onCVCChange($event)\"\n />\n <div\n tuiTransitioned\n class=\"t-label\"\n [class.t-label_raised]=\"labelRaised()\"\n >\n {{ texts().cvcText }}\n </div>\n </label>\n</div>\n<div class=\"t-icons\">\n @if (content()) {\n <div class=\"t-icon-outlet\">\n <img\n *polymorpheusOutlet=\"content() as src\"\n alt=\"\"\n automation-id=\"tui-input-card-group__icon\"\n class=\"t-card\"\n [src]=\"src | tuiIcon\"\n />\n </div>\n }\n @if (hasCleaner()) {\n <tui-icon\n automation-id=\"tui-input-card-group__cleaner\"\n tuiAppearance=\"icon\"\n class=\"t-icon\"\n [icon]=\"icons.close\"\n (click)=\"clear()\"\n />\n }\n @if (dropdown.content()) {\n <tui-icon\n automation-id=\"tui-input-card-group__dropdown\"\n tuiAppearance=\"icon\"\n tuiChevron\n class=\"t-icon\"\n (click)=\"toggle()\"\n />\n }\n</div>\n", styles: ["@keyframes outside{0%{transform:translate3d(calc(var(--t-translate) * var(--tui-inline)),0,0)}to{transform:translate3d(calc(100% * var(--tui-inline)),0,0)}}@keyframes inside{0%{transform:translate3d(calc(100% * var(--tui-inline)),0,0)}to{transform:translate3d(calc(var(--t-translate) * var(--tui-inline)),0,0)}}:host{--t-height: var(--tui-height-l);--t-padding: var(--tui-padding-l);--t-label: -.7rem;--t-label-size: .83em;--t-translate: 6.5rem;--t-collapsed-offset: 1.4375rem;position:relative;display:block;block-size:var(--t-height);min-inline-size:24rem;border-radius:var(--tui-radius-l);overflow:hidden;font:var(--tui-font-ui-m);isolation:isolate}:host[data-size=m]{--t-label: -.7em;--t-height: var(--tui-height-m);--t-padding: var(--tui-padding-m);--t-collapsed-offset: 1.125rem;border-radius:var(--tui-radius-m);font:var(--tui-font-ui-s)}:host[data-size=m] .t-card{inline-size:1.5rem;block-size:1.5rem}:host[data-size=m] [tuiChevron]{margin-inline-end:-.875rem;margin-inline-start:.125rem}:host._compact{min-inline-size:19rem;--t-translate: 4rem}:host[tuiAppearance][data-appearance]:has(:-webkit-autofill,[chrome-autofilled]){background:var(--tui-service-autofill-background)!important}:host [tuiChevron]{block-size:auto;align-self:stretch;border-inline-end:var(--t-padding) solid transparent;margin-inline-end:-.75rem;box-sizing:content-box;font-size:1rem;cursor:pointer}.t-wrapper{position:absolute;z-index:1;inline-size:100%;block-size:var(--t-height);transition:opacity 0s var(--tui-duration)}.t-wrapper_cvc,.t-wrapper_expire{opacity:0;pointer-events:none;animation:outside var(--tui-duration) ease-in-out}.t-wrapper_cvc{margin-inline-start:7rem}:host._compact .t-wrapper_cvc{margin-inline-start:4rem}.t-wrapper_active{transition:none;pointer-events:auto;opacity:1;animation:inside var(--tui-duration) ease-in-out forwards}.t-card{inline-size:2rem;block-size:2rem}.t-collapsed{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;padding:calc(var(--t-height) / 3) var(--t-padding) 0;box-sizing:border-box;line-height:calc(2 * var(--t-height) / 3);color:var(--tui-text-primary);white-space:nowrap;pointer-events:none}.t-collapsed:after{content:\"*\";float:left;opacity:0}:host-context([dir=\"rtl\"]) .t-collapsed:after{float:none}.t-collapsed_enable-mask:before{content:attr(data-before)}.t-collapsed_enable-mask:after{opacity:1}:host-context([dir=\"rtl\"]) .t-collapsed_enable-mask:after{transition:opacity 0s var(--tui-duration)}.t-collapsed_enable-mask .t-collapsed-wrapper{inset-inline-start:var(--t-collapsed-offset)}:host-context([dir=\"rtl\"]) .t-collapsed_enable-mask .t-collapsed-wrapper{inset-inline-start:unset}.t-collapsed-wrapper{position:absolute;display:block;inset-block-start:0;inline-size:100%;block-size:100%;overflow:hidden}.t-value{transition-property:transform,clip-path;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;display:block;inset:auto 100% 0 auto;clip-path:inset(0);transform:translate3d(calc(100% * var(--tui-inline)),0,0)}:host-context([dir=\"rtl\"]) .t-value{inset:auto unset auto 100%;transform:translate3d(calc(100% * var(--tui-inline)),0,0)!important}.t-input{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;z-index:1;border:0;margin:0;padding:calc(var(--t-height) / 3) var(--t-padding) 0;outline:none;background:transparent;box-sizing:border-box;font:inherit;color:var(--tui-text-primary);direction:ltr}:host-context([dir=\"rtl\"]) .t-input{text-align:end}.t-input::placeholder{color:var(--tui-text-tertiary)}.t-input_prefilled::placeholder{color:var(--tui-text-primary)}.t-input[chrome-autofilled],.t-input:-webkit-autofill{-webkit-text-fill-color:var(--tui-text-primary)!important;caret-color:var(--tui-text-primary)!important;transition:background-color 600000s 0s}.t-input.t-input.t-input_card:not(:-webkit-autofill,[chrome-autofilled]):not(:focus:placeholder-shown),.t-input.t-input.t-input_card.t-input_filled{caret-color:var(--tui-text-primary);color:transparent!important;-webkit-text-fill-color:transparent!important}.t-input.t-input.t-input_card::-webkit-credit-card-auto-fill-button{content:none!important;position:absolute;z-index:-999;display:none!important;inset:-60rem 0 0 -60rem;background:transparent!important;pointer-events:none!important}.t-input_inert{pointer-events:none}.t-input_cvc_hidden{-webkit-text-security:disc}.t-icons{position:absolute;z-index:1;display:flex;inset-inline-end:1rem;align-items:center;block-size:var(--t-height);gap:.25rem;pointer-events:none}.t-icon-outlet{display:flex;margin-inline-end:.25rem}.t-icon{cursor:pointer;pointer-events:auto}.t-icon:before{font-size:1rem}.t-label{transition-property:all;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;margin:0 var(--t-padding);line-height:var(--t-height);color:var(--tui-text-secondary)}.t-label:empty:before{content:attr(data-label)}input[chrome-autofilled]~.t-label,input:-webkit-autofill~.t-label,.t-label_raised{font-size:var(--t-label-size);transform:translateY(var(--t-label))}:host([data-mode~=\"invalid\"]) input[chrome-autofilled]~.t-label,:host([data-mode~=\"invalid\"]) input:-webkit-autofill~.t-label,:host([data-mode~=\"invalid\"]) .t-label_raised{color:var(--tui-text-negative)}:host([data-focus=\"true\"]) .t-label{color:var(--tui-text-primary)}.t-ghost{visibility:hidden}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"], outputs: ["maskitoChange", "maskitoElementChange"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiAppearance, selector: "[tuiAppearance]", inputs: ["tuiAppearance", "tuiAppearanceState", "tuiAppearanceFocus", "tuiAppearanceMode"] }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "pipe", type: TuiFormatCardPipe, name: "tuiFormatCard" }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "pipe", type: TuiIconPipe, name: "tuiIcon" }, { kind: "pipe", type: TuiMapperPipe, name: "tuiMapper" }, { kind: "directive", type: TuiTransitioned, selector: "[tuiTransitioned]" }, { kind: "directive", type: WaResizeObserver, selector: "[waResizeObserver]", inputs: ["box"], outputs: ["waResizeObserver"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
306
264
|
}
|
|
307
|
-
__decorate([
|
|
308
|
-
tuiPure
|
|
309
|
-
], TuiInputCardGroup.prototype, "isFocusable", null);
|
|
310
|
-
__decorate([
|
|
311
|
-
tuiPure
|
|
312
|
-
], TuiInputCardGroup.prototype, "getPaymentSystem", null);
|
|
313
265
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputCardGroup, decorators: [{
|
|
314
266
|
type: Component,
|
|
315
267
|
args: [{ selector: 'tui-input-card-group', imports: [
|
|
@@ -340,8 +292,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
340
292
|
'(pointerdown)': 'onPointerDown($event)',
|
|
341
293
|
'(scroll.zoneless)': '$event.target.scrollLeft = 0',
|
|
342
294
|
'(tuiActiveZoneChange)': 'onTouched()',
|
|
343
|
-
}, template: "@let formattedCard = value()?.card | tuiFormatCard: cardPrefilled;\n\n<div class=\"t-wrapper\">\n <label (click.zoneless.prevent)=\"(0)\">\n <input\n #inputCard\n autocomplete=\"cc-number\"\n automation-id=\"tui-input-card-group__card\"\n inputmode=\"numeric\"\n translate=\"no\"\n type=\"text\"\n class=\"t-input t-input_card\"\n [attr.aria-invalid]=\"!cardPrefilled && !(this.card | tuiMapper: cardValidator())\"\n [attr.id]=\"`${id()}_card`\"\n [class.t-input_filled]=\"card.length\"\n [class.t-input_inert]=\"cardPrefilled\"\n [disabled]=\"disabled()\"\n [maskito]=\"maskCard\"\n [ngModel]=\"formattedCard\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"cardPrefilled ? '' : placeholder() || exampleText()\"\n [readOnly]=\"readOnly()\"\n [tabIndex]=\"cardFocusable ? 0 : -1\"\n (focus)=\"(0)\"\n (ngModelChange)=\"onCardChange($event)\"\n />\n <span\n aria-hidden=\"true\"\n translate=\"no\"\n class=\"t-collapsed\"\n [attr.data-before]=\"masked\"\n [class.t-collapsed_enable-mask]=\"cardCollapsed\"\n (waResizeObserver)=\"onResize()\"\n >\n <span\n #ghost\n class=\"t-ghost\"\n [textContent]=\"formattedCard.slice(-tailLength)\"\n ></span>\n\n <span class=\"t-collapsed-wrapper\">\n <span\n class=\"t-value\"\n [style]=\"getStyle(ghost)\"\n [textContent]=\"formattedCard\"\n ></span>\n </span>\n </span>\n <div\n tuiTransitioned\n class=\"t-label\"\n [attr.data-label]=\"texts()?.cardNumberText\"\n [class.t-label_raised]=\"labelRaised()\"\n >\n <ng-content />\n </div>\n </label>\n</div>\n<div\n class=\"t-wrapper t-wrapper_expire\"\n [class.t-wrapper_active]=\"cardCollapsed\"\n>\n <label (click.zoneless.prevent)=\"(0)\">\n <input\n #inputExpire\n autocomplete=\"cc-exp\"\n automation-id=\"tui-input-card-group__expire\"\n inputmode=\"numeric\"\n maxlength=\"5\"\n name=\"ccexpiryyear\"\n translate=\"no\"\n class=\"t-input\"\n [attr.id]=\"`${id()}_expire`\"\n [class.t-input_inert]=\"!expireFocusable\"\n [class.t-input_prefilled]=\"!inputs().expire\"\n [disabled]=\"disabled()\"\n [maskito]=\"maskExpire\"\n [ngModel]=\"expire\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"inputs().expire ? '00/00' : '\u2022\u2022/\u2022\u2022'\"\n [readOnly]=\"readOnly() || !inputs().expire\"\n [tabIndex]=\"expireFocusable || (isMobile && isWebkit) ? 0 : -1\"\n (focus)=\"(0)\"\n (ngModelChange)=\"onExpireChange($event)\"\n />\n <div\n tuiTransitioned\n class=\"t-label\"\n [class.t-label_raised]=\"labelRaised()\"\n >\n {{ texts()?.expiryText }}\n </div>\n </label>\n</div>\n<div\n class=\"t-wrapper t-wrapper_cvc\"\n [class.t-wrapper_active]=\"cardCollapsed\"\n>\n <label (click.zoneless.prevent)=\"(0)\">\n <input\n #inputCVC\n autocomplete=\"cc-csc\"\n automation-id=\"tui-input-card-group__cvc\"\n inputmode=\"numeric\"\n translate=\"no\"\n type=\"text\"\n class=\"t-input\"\n [attr.id]=\"`${id()}_cvc`\"\n [class.t-input_cvc_hidden]=\"cvcHidden\"\n [class.t-input_prefilled]=\"cvcPrefilled\"\n [disabled]=\"disabled()\"\n [maskito]=\"maskCVC()\"\n [ngModel]=\"cvc\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"cvcPrefilled ? '\u2022\u2022\u2022' : exampleTextCVC()\"\n [readOnly]=\"readOnly() || cvcPrefilled\"\n [tabIndex]=\"cvcFocusable || (isMobile && isWebkit) ? 0 : -1\"\n (focus)=\"(0)\"\n (ngModelChange)=\"onCVCChange($event)\"\n />\n <div\n tuiTransitioned\n class=\"t-label\"\n [class.t-label_raised]=\"labelRaised()\"\n >\n {{ texts()?.cvcText }}\n </div>\n </label>\n</div>\n<div class=\"t-icons\">\n @if (content) {\n <div class=\"t-icon-outlet\">\n <img\n *polymorpheusOutlet=\"content as src\"\n alt=\"\"\n automation-id=\"tui-input-card-group__icon\"\n class=\"t-card\"\n [src]=\"src | tuiIcon\"\n />\n </div>\n }\n @if (hasCleaner()) {\n <tui-icon\n automation-id=\"tui-input-card-group__cleaner\"\n tuiAppearance=\"icon\"\n class=\"t-icon\"\n [icon]=\"icons.close\"\n (click)=\"clear()\"\n />\n }\n @if (dropdown.content()) {\n <tui-icon\n automation-id=\"tui-input-card-group__dropdown\"\n tuiAppearance=\"icon\"\n tuiChevron\n class=\"t-icon\"\n (click)=\"toggle()\"\n />\n }\n</div>\n", styles: ["@keyframes outside{0%{transform:translate3d(calc(var(--t-translate) * var(--tui-inline)),0,0)}to{transform:translate3d(calc(100% * var(--tui-inline)),0,0)}}@keyframes inside{0%{transform:translate3d(calc(100% * var(--tui-inline)),0,0)}to{transform:translate3d(calc(var(--t-translate) * var(--tui-inline)),0,0)}}:host{--t-height: var(--tui-height-l);--t-padding: var(--tui-padding-l);--t-label: -.7rem;--t-label-size: .83em;--t-translate: 6.5rem;--t-collapsed-offset: 1.4375rem;position:relative;display:block;block-size:var(--t-height);min-inline-size:24rem;border-radius:var(--tui-radius-l);overflow:hidden;font:var(--tui-font-text-ui-m);isolation:isolate}:host[data-size=m]{--t-label: -.7em;--t-height: var(--tui-height-m);--t-padding: var(--tui-padding-m);--t-collapsed-offset: 1.125rem;border-radius:var(--tui-radius-m);font:var(--tui-font-text-ui-s)}:host[data-size=m] .t-card{inline-size:1.5rem;block-size:1.5rem}:host[data-size=m] [tuiChevron]{margin-inline-end:-.875rem;margin-inline-start:.125rem}:host._compact{min-inline-size:19rem;--t-translate: 4rem}:host[tuiAppearance][data-appearance]:has(:-webkit-autofill,[chrome-autofilled]){background:var(--tui-service-autofill-background)!important}:host [tuiChevron]{block-size:auto;align-self:stretch;border-inline-end:var(--t-padding) solid transparent;margin-inline-end:-.75rem;box-sizing:content-box;font-size:1rem;cursor:pointer}.t-wrapper{position:absolute;z-index:1;inline-size:100%;block-size:var(--t-height);transition:opacity 0s var(--tui-duration)}.t-wrapper_cvc,.t-wrapper_expire{opacity:0;pointer-events:none;animation:outside var(--tui-duration) ease-in-out}.t-wrapper_cvc{margin-inline-start:7rem}:host._compact .t-wrapper_cvc{margin-inline-start:4rem}.t-wrapper_active{transition:none;pointer-events:auto;opacity:1;animation:inside var(--tui-duration) ease-in-out forwards}.t-card{inline-size:2rem;block-size:2rem}.t-collapsed{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;padding:calc(var(--t-height) / 3) var(--t-padding) 0;box-sizing:border-box;line-height:calc(2 * var(--t-height) / 3);color:var(--tui-text-primary);white-space:nowrap;pointer-events:none}.t-collapsed:after{content:\"*\";float:left;opacity:0}:host-context([dir=\"rtl\"]) .t-collapsed:after{float:none}.t-collapsed_enable-mask:before{content:attr(data-before)}.t-collapsed_enable-mask:after{opacity:1}:host-context([dir=\"rtl\"]) .t-collapsed_enable-mask:after{transition:opacity 0s var(--tui-duration)}.t-collapsed_enable-mask .t-collapsed-wrapper{inset-inline-start:var(--t-collapsed-offset)}:host-context([dir=\"rtl\"]) .t-collapsed_enable-mask .t-collapsed-wrapper{inset-inline-start:unset}.t-collapsed-wrapper{position:absolute;display:block;inset-block-start:0;inline-size:100%;block-size:100%;overflow:hidden}.t-value{transition-property:transform,clip-path;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;display:block;inset:auto 100% 0 auto;clip-path:inset(0);transform:translate3d(calc(100% * var(--tui-inline)),0,0)}:host-context([dir=\"rtl\"]) .t-value{inset:auto unset auto 100%;transform:translate3d(calc(100% * var(--tui-inline)),0,0)!important}.t-input{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;z-index:1;border:0;margin:0;padding:calc(var(--t-height) / 3) var(--t-padding) 0;outline:none;background:transparent;box-sizing:border-box;font:inherit;color:var(--tui-text-primary);direction:ltr}:host-context([dir=\"rtl\"]) .t-input{text-align:end}.t-input::placeholder{color:var(--tui-text-tertiary)}.t-input_prefilled::placeholder{color:var(--tui-text-primary)}.t-input[chrome-autofilled],.t-input:-webkit-autofill{-webkit-text-fill-color:var(--tui-text-primary)!important;caret-color:var(--tui-text-primary)!important;transition:background-color 600000s 0s}.t-input.t-input.t-input_card:not(:-webkit-autofill,[chrome-autofilled]):not(:focus:placeholder-shown),.t-input.t-input.t-input_card.t-input_filled{caret-color:var(--tui-text-primary);color:transparent!important;-webkit-text-fill-color:transparent!important}.t-input.t-input.t-input_card::-webkit-credit-card-auto-fill-button{content:none!important;position:absolute;z-index:-999;display:none!important;inset:-60rem 0 0 -60rem;background:transparent!important;pointer-events:none!important}.t-input_inert{pointer-events:none}.t-input_cvc_hidden{-webkit-text-security:disc}.t-icons{position:absolute;z-index:1;display:flex;inset-inline-end:1rem;align-items:center;block-size:var(--t-height);gap:.25rem;pointer-events:none}.t-icon-outlet{display:flex;margin-inline-end:.25rem}.t-icon{cursor:pointer;pointer-events:auto}.t-icon:before{font-size:1rem}.t-label{transition-property:all;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;margin:0 var(--t-padding);line-height:var(--t-height);color:var(--tui-text-secondary)}.t-label:empty:before{content:attr(data-label)}input[chrome-autofilled]~.t-label,input:-webkit-autofill~.t-label,.t-label_raised{font-size:var(--t-label-size);transform:translateY(var(--t-label))}:host([data-mode~=\"invalid\"]) input[chrome-autofilled]~.t-label,:host([data-mode~=\"invalid\"]) input:-webkit-autofill~.t-label,:host([data-mode~=\"invalid\"]) .t-label_raised{color:var(--tui-text-negative)}:host([data-focus=\"true\"]) .t-label{color:var(--tui-text-primary)}.t-ghost{visibility:hidden}\n"] }]
|
|
344
|
-
}]
|
|
295
|
+
}, template: "@let formattedCard = card() | tuiFormatCard: cardPrefilled();\n\n<div class=\"t-wrapper\">\n <label (click.zoneless.prevent)=\"(0)\">\n <input\n #inputCard\n autocomplete=\"cc-number\"\n automation-id=\"tui-input-card-group__card\"\n inputmode=\"numeric\"\n translate=\"no\"\n type=\"text\"\n class=\"t-input t-input_card\"\n [attr.aria-invalid]=\"!cardPrefilled() && !(this.card() | tuiMapper: cardValidator())\"\n [attr.id]=\"`${id()}_card`\"\n [class.t-input_filled]=\"card().length\"\n [class.t-input_inert]=\"cardPrefilled()\"\n [disabled]=\"disabled()\"\n [maskito]=\"maskCard\"\n [ngModel]=\"formattedCard\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"cardPrefilled() ? '' : placeholder()\"\n [readOnly]=\"readOnly()\"\n [tabIndex]=\"cardPrefilled() ? -1 : 0\"\n (focus)=\"(0)\"\n (ngModelChange)=\"onCardChange($event)\"\n />\n <span\n aria-hidden=\"true\"\n translate=\"no\"\n class=\"t-collapsed\"\n [attr.data-before]=\"cardPrefilled() ? card().slice(-4) : ''\"\n [class.t-collapsed_enable-mask]=\"cardCollapsed\"\n (waResizeObserver)=\"onResize()\"\n >\n <span\n #ghost\n class=\"t-ghost\"\n [textContent]=\"formattedCard.slice(card().length % 4 > 0 ? -5 : -4)\"\n ></span>\n\n <span class=\"t-collapsed-wrapper\">\n <span\n class=\"t-value\"\n [style]=\"getStyle(ghost)\"\n [textContent]=\"formattedCard\"\n ></span>\n </span>\n </span>\n <div\n tuiTransitioned\n class=\"t-label\"\n [attr.data-label]=\"texts().cardNumberText\"\n [class.t-label_raised]=\"labelRaised()\"\n >\n <ng-content />\n </div>\n </label>\n</div>\n<div\n class=\"t-wrapper t-wrapper_expire\"\n [class.t-wrapper_active]=\"cardCollapsed\"\n>\n <label (click.zoneless.prevent)=\"(0)\">\n <input\n #inputExpire\n autocomplete=\"cc-exp\"\n automation-id=\"tui-input-card-group__expire\"\n inputmode=\"numeric\"\n maxlength=\"5\"\n name=\"ccexpiryyear\"\n translate=\"no\"\n class=\"t-input\"\n [attr.id]=\"`${id()}_expire`\"\n [class.t-input_inert]=\"!expireFocusable()\"\n [class.t-input_prefilled]=\"!inputs().expire\"\n [disabled]=\"disabled()\"\n [maskito]=\"maskExpire\"\n [ngModel]=\"expire()\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"inputs().expire ? '00/00' : '\u2022\u2022/\u2022\u2022'\"\n [readOnly]=\"readOnly() || !inputs().expire\"\n [tabIndex]=\"expireFocusable() || (isMobile && isWebkit) ? 0 : -1\"\n (focus)=\"(0)\"\n (ngModelChange)=\"onExpireChange($event)\"\n />\n <div\n tuiTransitioned\n class=\"t-label\"\n [class.t-label_raised]=\"labelRaised()\"\n >\n {{ texts().expiryText }}\n </div>\n </label>\n</div>\n<div\n class=\"t-wrapper t-wrapper_cvc\"\n [class.t-wrapper_active]=\"cardCollapsed\"\n>\n <label (click.zoneless.prevent)=\"(0)\">\n <input\n #inputCVC\n autocomplete=\"cc-csc\"\n automation-id=\"tui-input-card-group__cvc\"\n inputmode=\"numeric\"\n translate=\"no\"\n type=\"text\"\n class=\"t-input\"\n [attr.id]=\"`${id()}_cvc`\"\n [class.t-input_cvc_hidden]=\"cvcHidden\"\n [class.t-input_prefilled]=\"cvcPrefilled()\"\n [disabled]=\"disabled()\"\n [maskito]=\"cvcMask()\"\n [ngModel]=\"cvc()\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"cvcPrefilled() ? '\u2022\u2022\u2022' : cvcPlaceholder()\"\n [readOnly]=\"readOnly() || cvcPrefilled()\"\n [tabIndex]=\"focusable() || (isMobile && isWebkit) ? 0 : -1\"\n (focus)=\"(0)\"\n (ngModelChange)=\"onCVCChange($event)\"\n />\n <div\n tuiTransitioned\n class=\"t-label\"\n [class.t-label_raised]=\"labelRaised()\"\n >\n {{ texts().cvcText }}\n </div>\n </label>\n</div>\n<div class=\"t-icons\">\n @if (content()) {\n <div class=\"t-icon-outlet\">\n <img\n *polymorpheusOutlet=\"content() as src\"\n alt=\"\"\n automation-id=\"tui-input-card-group__icon\"\n class=\"t-card\"\n [src]=\"src | tuiIcon\"\n />\n </div>\n }\n @if (hasCleaner()) {\n <tui-icon\n automation-id=\"tui-input-card-group__cleaner\"\n tuiAppearance=\"icon\"\n class=\"t-icon\"\n [icon]=\"icons.close\"\n (click)=\"clear()\"\n />\n }\n @if (dropdown.content()) {\n <tui-icon\n automation-id=\"tui-input-card-group__dropdown\"\n tuiAppearance=\"icon\"\n tuiChevron\n class=\"t-icon\"\n (click)=\"toggle()\"\n />\n }\n</div>\n", styles: ["@keyframes outside{0%{transform:translate3d(calc(var(--t-translate) * var(--tui-inline)),0,0)}to{transform:translate3d(calc(100% * var(--tui-inline)),0,0)}}@keyframes inside{0%{transform:translate3d(calc(100% * var(--tui-inline)),0,0)}to{transform:translate3d(calc(var(--t-translate) * var(--tui-inline)),0,0)}}:host{--t-height: var(--tui-height-l);--t-padding: var(--tui-padding-l);--t-label: -.7rem;--t-label-size: .83em;--t-translate: 6.5rem;--t-collapsed-offset: 1.4375rem;position:relative;display:block;block-size:var(--t-height);min-inline-size:24rem;border-radius:var(--tui-radius-l);overflow:hidden;font:var(--tui-font-ui-m);isolation:isolate}:host[data-size=m]{--t-label: -.7em;--t-height: var(--tui-height-m);--t-padding: var(--tui-padding-m);--t-collapsed-offset: 1.125rem;border-radius:var(--tui-radius-m);font:var(--tui-font-ui-s)}:host[data-size=m] .t-card{inline-size:1.5rem;block-size:1.5rem}:host[data-size=m] [tuiChevron]{margin-inline-end:-.875rem;margin-inline-start:.125rem}:host._compact{min-inline-size:19rem;--t-translate: 4rem}:host[tuiAppearance][data-appearance]:has(:-webkit-autofill,[chrome-autofilled]){background:var(--tui-service-autofill-background)!important}:host [tuiChevron]{block-size:auto;align-self:stretch;border-inline-end:var(--t-padding) solid transparent;margin-inline-end:-.75rem;box-sizing:content-box;font-size:1rem;cursor:pointer}.t-wrapper{position:absolute;z-index:1;inline-size:100%;block-size:var(--t-height);transition:opacity 0s var(--tui-duration)}.t-wrapper_cvc,.t-wrapper_expire{opacity:0;pointer-events:none;animation:outside var(--tui-duration) ease-in-out}.t-wrapper_cvc{margin-inline-start:7rem}:host._compact .t-wrapper_cvc{margin-inline-start:4rem}.t-wrapper_active{transition:none;pointer-events:auto;opacity:1;animation:inside var(--tui-duration) ease-in-out forwards}.t-card{inline-size:2rem;block-size:2rem}.t-collapsed{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;padding:calc(var(--t-height) / 3) var(--t-padding) 0;box-sizing:border-box;line-height:calc(2 * var(--t-height) / 3);color:var(--tui-text-primary);white-space:nowrap;pointer-events:none}.t-collapsed:after{content:\"*\";float:left;opacity:0}:host-context([dir=\"rtl\"]) .t-collapsed:after{float:none}.t-collapsed_enable-mask:before{content:attr(data-before)}.t-collapsed_enable-mask:after{opacity:1}:host-context([dir=\"rtl\"]) .t-collapsed_enable-mask:after{transition:opacity 0s var(--tui-duration)}.t-collapsed_enable-mask .t-collapsed-wrapper{inset-inline-start:var(--t-collapsed-offset)}:host-context([dir=\"rtl\"]) .t-collapsed_enable-mask .t-collapsed-wrapper{inset-inline-start:unset}.t-collapsed-wrapper{position:absolute;display:block;inset-block-start:0;inline-size:100%;block-size:100%;overflow:hidden}.t-value{transition-property:transform,clip-path;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;display:block;inset:auto 100% 0 auto;clip-path:inset(0);transform:translate3d(calc(100% * var(--tui-inline)),0,0)}:host-context([dir=\"rtl\"]) .t-value{inset:auto unset auto 100%;transform:translate3d(calc(100% * var(--tui-inline)),0,0)!important}.t-input{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;z-index:1;border:0;margin:0;padding:calc(var(--t-height) / 3) var(--t-padding) 0;outline:none;background:transparent;box-sizing:border-box;font:inherit;color:var(--tui-text-primary);direction:ltr}:host-context([dir=\"rtl\"]) .t-input{text-align:end}.t-input::placeholder{color:var(--tui-text-tertiary)}.t-input_prefilled::placeholder{color:var(--tui-text-primary)}.t-input[chrome-autofilled],.t-input:-webkit-autofill{-webkit-text-fill-color:var(--tui-text-primary)!important;caret-color:var(--tui-text-primary)!important;transition:background-color 600000s 0s}.t-input.t-input.t-input_card:not(:-webkit-autofill,[chrome-autofilled]):not(:focus:placeholder-shown),.t-input.t-input.t-input_card.t-input_filled{caret-color:var(--tui-text-primary);color:transparent!important;-webkit-text-fill-color:transparent!important}.t-input.t-input.t-input_card::-webkit-credit-card-auto-fill-button{content:none!important;position:absolute;z-index:-999;display:none!important;inset:-60rem 0 0 -60rem;background:transparent!important;pointer-events:none!important}.t-input_inert{pointer-events:none}.t-input_cvc_hidden{-webkit-text-security:disc}.t-icons{position:absolute;z-index:1;display:flex;inset-inline-end:1rem;align-items:center;block-size:var(--t-height);gap:.25rem;pointer-events:none}.t-icon-outlet{display:flex;margin-inline-end:.25rem}.t-icon{cursor:pointer;pointer-events:auto}.t-icon:before{font-size:1rem}.t-label{transition-property:all;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;margin:0 var(--t-padding);line-height:var(--t-height);color:var(--tui-text-secondary)}.t-label:empty:before{content:attr(data-label)}input[chrome-autofilled]~.t-label,input:-webkit-autofill~.t-label,.t-label_raised{font-size:var(--t-label-size);transform:translateY(var(--t-label))}:host([data-mode~=\"invalid\"]) input[chrome-autofilled]~.t-label,:host([data-mode~=\"invalid\"]) input:-webkit-autofill~.t-label,:host([data-mode~=\"invalid\"]) .t-label_raised{color:var(--tui-text-negative)}:host([data-focus=\"true\"]) .t-label{color:var(--tui-text-primary)}.t-ghost{visibility:hidden}\n"] }]
|
|
296
|
+
}] });
|
|
345
297
|
|
|
346
298
|
/**
|
|
347
299
|
* Generated bundle index. Do not edit.
|