@taiga-ui/addon-commerce 4.52.0-canary.bf9131e → 4.52.0-canary.c8448e0

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.
Files changed (45) hide show
  1. package/README.md +2 -2
  2. package/components/index.d.ts +0 -2
  3. package/components/input-card/index.d.ts +3 -0
  4. package/components/input-card/input-card.component.d.ts +5 -5
  5. package/components/input-card/input-card.d.ts +7 -0
  6. package/components/input-card/input-cvc.directive.d.ts +10 -0
  7. package/components/input-card/input-expire.directive.d.ts +8 -0
  8. package/components/input-card-group/input-card-group.component.d.ts +28 -39
  9. package/components/input-card-group/input-card-group.directive.d.ts +3 -6
  10. package/components/input-card-group/input-card-group.options.d.ts +3 -5
  11. package/components/input-card-group/input-card-group.providers.d.ts +4 -5
  12. package/fesm2022/taiga-ui-addon-commerce-components-input-card-group.mjs +84 -155
  13. package/fesm2022/taiga-ui-addon-commerce-components-input-card-group.mjs.map +1 -1
  14. package/fesm2022/taiga-ui-addon-commerce-components-input-card.mjs +72 -12
  15. package/fesm2022/taiga-ui-addon-commerce-components-input-card.mjs.map +1 -1
  16. package/fesm2022/taiga-ui-addon-commerce-components-thumbnail-card.mjs +4 -6
  17. package/fesm2022/taiga-ui-addon-commerce-components-thumbnail-card.mjs.map +1 -1
  18. package/fesm2022/taiga-ui-addon-commerce-components.mjs +0 -2
  19. package/fesm2022/taiga-ui-addon-commerce-components.mjs.map +1 -1
  20. package/fesm2022/taiga-ui-addon-commerce-constants.mjs +1 -1
  21. package/fesm2022/taiga-ui-addon-commerce-constants.mjs.map +1 -1
  22. package/fesm2022/taiga-ui-addon-commerce-pipes-amount.mjs +27 -25
  23. package/fesm2022/taiga-ui-addon-commerce-pipes-amount.mjs.map +1 -1
  24. package/fesm2022/taiga-ui-addon-commerce-pipes-currency.mjs +6 -9
  25. package/fesm2022/taiga-ui-addon-commerce-pipes-currency.mjs.map +1 -1
  26. package/fesm2022/taiga-ui-addon-commerce-pipes-decimal.mjs +18 -10
  27. package/fesm2022/taiga-ui-addon-commerce-pipes-decimal.mjs.map +1 -1
  28. package/fesm2022/taiga-ui-addon-commerce-pipes-format-card.mjs +4 -7
  29. package/fesm2022/taiga-ui-addon-commerce-pipes-format-card.mjs.map +1 -1
  30. package/fesm2022/taiga-ui-addon-commerce-tokens.mjs +2 -3
  31. package/fesm2022/taiga-ui-addon-commerce-tokens.mjs.map +1 -1
  32. package/package.json +16 -21
  33. package/pipes/amount/amount.options.d.ts +1 -3
  34. package/pipes/amount/amount.pipe.d.ts +5 -2
  35. package/pipes/currency/currency.pipe.d.ts +2 -2
  36. package/pipes/decimal/decimal.pipe.d.ts +4 -2
  37. package/tokens/i18n.d.ts +4 -5
  38. package/components/input-cvc/index.d.ts +0 -1
  39. package/components/input-cvc/input-cvc.directive.d.ts +0 -10
  40. package/components/input-expire/index.d.ts +0 -1
  41. package/components/input-expire/input-expire.directive.d.ts +0 -8
  42. package/fesm2022/taiga-ui-addon-commerce-components-input-cvc.mjs +0 -40
  43. package/fesm2022/taiga-ui-addon-commerce-components-input-cvc.mjs.map +0 -1
  44. package/fesm2022/taiga-ui-addon-commerce-components-input-expire.mjs +0 -39
  45. package/fesm2022/taiga-ui-addon-commerce-components-input-expire.mjs.map +0 -1
@@ -1,14 +1,13 @@
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, computed, EventEmitter, Input, Output, ChangeDetectionStrategy, Component } from '@angular/core';
5
- import { toSignal, toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
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';
9
8
  import { WaResizeObserver } from '@ng-web-apis/resize-observer';
10
9
  import { tuiDefaultCardValidator, TUI_MASK_CVC, TUI_MASK_CARD, TUI_MASK_EXPIRE } from '@taiga-ui/addon-commerce/constants';
11
- import { TuiFormatCardPipe } from '@taiga-ui/addon-commerce/pipes';
10
+ import { TuiFormatCardPipe } from '@taiga-ui/addon-commerce/pipes/format-card';
12
11
  import { TUI_CARD_NUMBER_TEXTS, TUI_CARD_EXPIRY_TEXTS, TUI_CARD_CVC_TEXTS, TUI_PAYMENT_SYSTEM_ICONS } from '@taiga-ui/addon-commerce/tokens';
13
12
  import { tuiGetPaymentSystem } from '@taiga-ui/addon-commerce/utils';
14
13
  import { TuiControl, tuiAsControl } from '@taiga-ui/cdk/classes';
@@ -16,73 +15,67 @@ import { TUI_NON_DIGIT_REGEXP, CHAR_NO_BREAK_SPACE } from '@taiga-ui/cdk/constan
16
15
  import { tuiHovered, TuiHoveredService } from '@taiga-ui/cdk/directives/hovered';
17
16
  import { TuiTransitioned } from '@taiga-ui/cdk/directives/transitioned';
18
17
  import { TuiMapperPipe } from '@taiga-ui/cdk/pipes/mapper';
19
- import { tuiInjectId } from '@taiga-ui/cdk/services';
20
18
  import { TUI_IS_MOBILE, TUI_IS_WEBKIT } from '@taiga-ui/cdk/tokens';
21
19
  import { tuiInjectElement, tuiIsElement, tuiIsInput } from '@taiga-ui/cdk/utils/dom';
22
20
  import { tuiFocusedIn, tuiIsFocused } from '@taiga-ui/cdk/utils/focus';
23
- import { tuiProvideOptions, tuiPure } from '@taiga-ui/cdk/utils/miscellaneous';
21
+ import { tuiGenerateId } from '@taiga-ui/cdk/utils/miscellaneous';
24
22
  import { tuiAsDataListHost } from '@taiga-ui/core/components/data-list';
25
23
  import { TuiIcon, TuiIconPipe } from '@taiga-ui/core/components/icon';
26
24
  import { TUI_TEXTFIELD_OPTIONS } from '@taiga-ui/core/components/textfield';
27
25
  import * as i1 from '@taiga-ui/core/directives/appearance';
28
26
  import { tuiAppearanceMode, tuiAppearance, tuiAppearanceState, tuiAppearanceFocus, TuiAppearance } from '@taiga-ui/core/directives/appearance';
29
- import * as i2 from '@taiga-ui/core/directives/dropdown';
30
- import { TuiDropdownDirective, tuiDropdownOpen, tuiDropdownOptionsProvider, TuiWithDropdownOpen } from '@taiga-ui/core/directives/dropdown';
31
- import { TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
27
+ import * as i2 from '@taiga-ui/core/portals/dropdown';
28
+ import { TuiDropdownDirective, TuiDropdownOpen, tuiDropdownOptionsProvider, TuiWithDropdownOpen } from '@taiga-ui/core/portals/dropdown';
29
+ import { TUI_BREAKPOINT, TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
32
30
  import { TuiChevron } from '@taiga-ui/kit/directives/chevron';
33
31
  import { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
34
- import { BehaviorSubject, map, combineLatest, Subject, EMPTY, switchMap, timer } from 'rxjs';
35
- import { TuiBreakpointService } from '@taiga-ui/core/services';
32
+ import { Subject, EMPTY, switchMap, timer } from 'rxjs';
33
+ import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
36
34
 
37
35
  class TuiInputCardGroupDirective {
38
36
  constructor() {
39
- this.c$ = new BehaviorSubject(false);
40
- this.m$ = inject(TuiBreakpointService).pipe(map((b) => b === 'mobile'));
41
- this.compact$ = combineLatest([this.c$, this.m$]).pipe(map((c) => c.some(Boolean)));
42
- this.compact = toSignal(this.compact$, { initialValue: false });
37
+ this.breakpoint = inject(TUI_BREAKPOINT);
38
+ this.compact = input(false);
43
39
  }
44
- set compactSetter(compact) {
45
- this.c$.next(compact);
46
- }
47
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputCardGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
48
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiInputCardGroupDirective, isStandalone: true, inputs: { compactSetter: ["compact", "compactSetter"] }, host: { properties: { "class._compact": "compact()" } }, ngImport: i0 }); }
40
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputCardGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
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
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputCardGroupDirective, decorators: [{
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputCardGroupDirective, decorators: [{
51
44
  type: Directive,
52
45
  args: [{
53
- inputs: ['compactSetter: compact'],
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
- exampleText: '0000 0000 0000 0000',
61
- exampleTextCVC: '000',
52
+ placeholder: '0000 0000 0000 0000',
53
+ cvcPlaceholder: '000',
62
54
  cvcHidden: true,
63
55
  inputs: { cvc: true, expire: true },
64
56
  };
65
- const TUI_INPUT_CARD_GROUP_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_INPUT_CARD_GROUP_OPTIONS' : '', {
66
- factory: () => TUI_INPUT_CARD_GROUP_DEFAULT_OPTIONS,
67
- });
68
- function tuiInputCardGroupOptionsProvider(options) {
69
- return tuiProvideOptions(TUI_INPUT_CARD_GROUP_OPTIONS, options, TUI_INPUT_CARD_GROUP_DEFAULT_OPTIONS);
70
- }
57
+ const [TUI_INPUT_CARD_GROUP_OPTIONS, tuiInputCardGroupOptionsProvider] = tuiCreateOptions(TUI_INPUT_CARD_GROUP_DEFAULT_OPTIONS);
71
58
 
72
59
  const TUI_INPUT_CARD_GROUP_TEXTS = new InjectionToken(ngDevMode ? 'TUI_INPUT_CARD_GROUP_TEXTS' : '');
73
60
  const TUI_INPUT_CARD_GROUP_TEXTS_PROVIDER = {
74
61
  provide: TUI_INPUT_CARD_GROUP_TEXTS,
75
- useFactory: () => inject(TUI_INPUT_CARD_GROUP_TEXTS, { skipSelf: true, optional: true }) ??
76
- combineLatest([
77
- inject(TuiInputCardGroupDirective).compact$,
78
- toObservable(inject(TUI_CARD_NUMBER_TEXTS)),
79
- toObservable(inject(TUI_CARD_EXPIRY_TEXTS)),
80
- inject(TUI_CARD_CVC_TEXTS),
81
- ]).pipe(map(([compact, cardNumber, expiry, cvcTexts]) => ({
82
- cardNumberText: cardNumber[Number(!compact)] ?? '',
83
- expiryText: expiry[Number(!compact)] ?? '',
84
- cvcText: cvcTexts[Number(!compact)] ?? '',
85
- }))),
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
+ },
86
79
  };
87
80
 
88
81
  class TuiInputCardGroup extends TuiControl {
@@ -94,15 +87,19 @@ class TuiInputCardGroup extends TuiControl {
94
87
  this.doc = inject(DOCUMENT);
95
88
  this.isServer = isPlatformServer(inject(PLATFORM_ID));
96
89
  this.focus$ = new Subject();
97
- this.expirePrefilled = false;
90
+ this.expirePrefilled = signal(false);
98
91
  this.paymentSystems = inject(TUI_PAYMENT_SYSTEM_ICONS);
99
92
  this.options = inject(TUI_INPUT_CARD_GROUP_OPTIONS);
100
93
  this.el = tuiInjectElement();
101
94
  this.hover = tuiHovered();
102
95
  this.focusedIn = tuiFocusedIn(this.el);
103
- this.exampleTextCVC = this.options.exampleTextCVC;
96
+ this.cvcMask = computed(() => TUI_MASK_CVC(this.codeLength() ?? 3));
104
97
  this.cvcHidden = this.options.cvcHidden;
105
- this.maskCVC = TUI_MASK_CVC(3);
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());
106
103
  this.isMobile = inject(TUI_IS_MOBILE);
107
104
  this.isWebkit = inject(TUI_IS_WEBKIT);
108
105
  this.dropdown = inject(TuiDropdownDirective);
@@ -110,66 +107,60 @@ class TuiInputCardGroup extends TuiControl {
110
107
  this.maskExpire = TUI_MASK_EXPIRE;
111
108
  this.icons = inject(TUI_COMMON_ICONS);
112
109
  this.textfield = inject(TUI_TEXTFIELD_OPTIONS);
113
- this.texts = toSignal(inject(TUI_INPUT_CARD_GROUP_TEXTS));
114
- this.open = tuiDropdownOpen();
110
+ this.texts = inject(TUI_INPUT_CARD_GROUP_TEXTS);
111
+ this.open = inject(TuiDropdownOpen).open;
115
112
  this.$ = this.isWebkit
116
113
  ? this.focus$
117
114
  .pipe(switchMap(() => timer(100)), takeUntilDestroyed())
118
- .subscribe(() => (this.expire ? this.focusCVC() : this.focusExpire()))
115
+ .subscribe(() => (this.expire() ? this.focusCVC() : this.focusExpire()))
119
116
  : EMPTY;
117
+ this.card = computed(() => this.value()?.card || '');
118
+ this.expire = computed(() => this.value()?.expire || '');
119
+ this.cvc = computed(() => this.value()?.cvc || '');
120
120
  this.m = tuiAppearanceMode(this.mode);
121
121
  this.appearance = tuiAppearance(inject(TUI_TEXTFIELD_OPTIONS).appearance);
122
122
  this.state = tuiAppearanceState(
123
123
  // eslint-disable-next-line no-nested-ternary
124
124
  computed(() => (this.disabled() ? 'disabled' : this.hover() ? 'hover' : null)));
125
125
  this.focus = tuiAppearanceFocus(computed(() => this.open() || this.focusedIn()));
126
- this.labelRaised = computed(() => (this.focus() && !this.readOnly()) || !!this.value()?.card);
127
- this.hasCleaner = computed(() => !!this.value()?.card && this.interactive());
128
- /**
129
- * @deprecated use 'placeholder' instead
130
- */
131
- this.exampleText = this.options.exampleText;
132
- this.placeholder = this.options.exampleText;
133
- this.inputs = this.options.inputs;
134
- this.cardValidator = this.options.cardValidator;
135
- this.icon = '';
136
- this.id = tuiInjectId();
137
- this.binChange = new EventEmitter();
138
- }
139
- set codeLength(length) {
140
- this.exampleTextCVC = '0'.repeat(length);
141
- this.maskCVC = TUI_MASK_CVC(length);
142
- }
143
- get bin() {
144
- return this.card.length < 6 ? null : this.card.slice(0, 6);
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);
131
+ this.inputs = input(this.options.inputs);
132
+ this.cardValidator = input(this.options.cardValidator);
133
+ this.icon = input('');
134
+ this.id = input(tuiGenerateId());
135
+ this.codeLength = input();
136
+ this.binChange = output();
145
137
  }
146
138
  writeValue(value) {
147
- const { bin } = this;
139
+ const bin = this.bin();
148
140
  const { activeElement } = this.doc;
149
141
  super.writeValue(value);
150
142
  this.updateBin(bin);
151
- this.expirePrefilled = !!this.expire && this.cardPrefilled;
143
+ this.expirePrefilled.set(!!this.expire() && this.cardPrefilled());
152
144
  // Programmatic setting of expire input value breaks autofill in Chrome
153
145
  const inputExpire = this.inputExpire();
154
146
  if (!inputExpire ||
155
147
  this.isMobile ||
156
148
  this.isWebkit ||
157
149
  this.isServer ||
158
- inputExpire.nativeElement.value === this.expire) {
150
+ inputExpire.nativeElement.value === this.expire()) {
159
151
  return;
160
152
  }
161
153
  inputExpire.nativeElement.focus({ preventScroll: true });
162
154
  inputExpire.nativeElement.select();
163
- this.doc.execCommand('insertText', false, this.expire);
155
+ this.doc.execCommand('insertText', false, this.expire());
164
156
  inputExpire.nativeElement.blur();
165
157
  activeElement?.focus({ preventScroll: true });
166
158
  }
167
- /** Public API for manual focus management */
168
159
  focusCard() {
169
160
  this.inputCard()?.nativeElement.focus({ preventScroll: true });
170
161
  }
171
162
  focusExpire() {
172
- if (this.inputs.expire) {
163
+ if (this.inputs().expire) {
173
164
  this.inputExpire()?.nativeElement.focus({ preventScroll: true });
174
165
  }
175
166
  else {
@@ -181,18 +172,18 @@ class TuiInputCardGroup extends TuiControl {
181
172
  }
182
173
  handleOption(option) {
183
174
  const { card = '', expire = '', cvc = '' } = option || {};
184
- const { bin } = this;
175
+ const bin = this.bin();
185
176
  const element = (!card && this.inputCard()?.nativeElement) ||
186
177
  (!expire && this.inputExpire()?.nativeElement) ||
187
178
  this.inputCVC()?.nativeElement;
188
179
  this.onChange({ card, expire, cvc });
189
180
  this.updateBin(bin);
190
181
  this.open.set(false);
191
- this.expirePrefilled = !!expire;
182
+ this.expirePrefilled.set(!!expire);
192
183
  element?.focus();
193
184
  }
194
185
  clear() {
195
- this.expirePrefilled = false;
186
+ this.expirePrefilled.set(false);
196
187
  [this.inputCVC(), this.inputExpire(), this.inputCard()].forEach((e) => {
197
188
  e?.nativeElement.focus();
198
189
  e?.nativeElement.select();
@@ -200,55 +191,21 @@ class TuiInputCardGroup extends TuiControl {
200
191
  });
201
192
  this.onChange(null);
202
193
  }
203
- onResize() {
204
- this.cdr.detectChanges();
205
- }
206
- get content() {
207
- const system = this.getPaymentSystem(this.card);
208
- return this.icon || (system && this.paymentSystems[system]);
209
- }
210
- get card() {
211
- return this.value()?.card || '';
212
- }
213
- get expire() {
214
- return this.value()?.expire || '';
215
- }
216
- get cvc() {
217
- return this.value()?.cvc || '';
218
- }
219
194
  get cardCollapsed() {
220
- return (this.isFocusable(this.card) && !tuiIsFocused(this.inputCard()?.nativeElement));
221
- }
222
- get tailLength() {
223
- return this.card.length % 4 > 0 ? 5 : 4;
224
- }
225
- get cardPrefilled() {
226
- return !!this.card.match(TUI_NON_DIGIT_REGEXP);
227
- }
228
- get cvcPrefilled() {
229
- return !this.inputs.cvc || !!this.cvc.match(TUI_NON_DIGIT_REGEXP);
230
- }
231
- get cardFocusable() {
232
- return !this.cardPrefilled;
233
- }
234
- get expireFocusable() {
235
- return this.isFocusable(this.card) && !this.expirePrefilled;
195
+ return this.focusable() && !tuiIsFocused(this.inputCard()?.nativeElement);
236
196
  }
237
- get cvcFocusable() {
238
- return this.isFocusable(this.card);
239
- }
240
- get masked() {
241
- return this.cardPrefilled ? `${this.card.slice(-4)}` : '';
197
+ onResize() {
198
+ this.cdr.detectChanges();
242
199
  }
243
200
  onCardChange(card) {
244
- const { value, bin } = this;
201
+ const bin = this.bin();
245
202
  const parsed = card.split(CHAR_NO_BREAK_SPACE).join('');
246
- if (value()?.card === parsed) {
203
+ if (this.card() === parsed) {
247
204
  return;
248
205
  }
249
206
  this.updateProperty(parsed, 'card');
250
207
  this.updateBin(bin);
251
- if (this.cardValidator(this.card) && !value()?.expire && this.inputExpire()) {
208
+ if (this.cardValidator()(this.card()) && !this.expire() && this.inputExpire()) {
252
209
  this.focusExpire();
253
210
  // Safari autofill focus jerk workaround
254
211
  this.focus$.next();
@@ -279,16 +236,9 @@ class TuiInputCardGroup extends TuiControl {
279
236
  toggle() {
280
237
  this.open.update((open) => !open);
281
238
  }
282
- isFocusable(card) {
283
- return this.cardValidator(card) || this.cardPrefilled;
284
- }
285
- getPaymentSystem(value) {
286
- return tuiGetPaymentSystem(value);
287
- }
288
239
  updateBin(oldBin) {
289
- const { bin } = this;
290
- if (bin !== oldBin && !this.cardPrefilled) {
291
- this.binChange.emit(bin);
240
+ if (this.bin() !== oldBin && !this.cardPrefilled()) {
241
+ this.binChange.emit(this.bin());
292
242
  }
293
243
  }
294
244
  updateProperty(value, propName) {
@@ -298,27 +248,21 @@ class TuiInputCardGroup extends TuiControl {
298
248
  this.onChange(newValue.expire || newValue.cvc || newValue.card ? newValue : null);
299
249
  }
300
250
  focusInput() {
301
- const element = (this.cardFocusable && this.inputCard()?.nativeElement) ||
302
- (this.expireFocusable && this.inputExpire()?.nativeElement) ||
251
+ const element = (!this.cardPrefilled() && this.inputCard()?.nativeElement) ||
252
+ (this.expireFocusable() && this.inputExpire()?.nativeElement) ||
303
253
  this.inputCVC()?.nativeElement;
304
254
  element?.focus();
305
255
  }
306
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputCardGroup, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
307
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiInputCardGroup, isStandalone: true, selector: "tui-input-card-group", inputs: { exampleText: "exampleText", placeholder: "placeholder", inputs: "inputs", cardValidator: "cardValidator", icon: "icon", id: "id", codeLength: "codeLength" }, outputs: { binChange: "binChange" }, host: { listeners: { "pointerdown": "onPointerDown($event)", "scroll.zoneless": "$event.target.scrollLeft = 0" }, properties: { "attr.data-size": "textfield.size()" } }, providers: [
256
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputCardGroup, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
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: [
308
258
  tuiAsDataListHost(TuiInputCardGroup),
309
259
  tuiAsControl(TuiInputCardGroup),
310
260
  tuiDropdownOptionsProvider({ limitWidth: 'fixed' }),
311
261
  TuiHoveredService,
312
262
  TUI_INPUT_CARD_GROUP_TEXTS_PROVIDER,
313
- ], 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;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);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){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:100%;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{left:1.375rem}:host-context([dir=\"rtl\"]) .t-collapsed_enable-mask .t-collapsed-wrapper{left:unset}.t-collapsed-wrapper{position:absolute;top:0;display:block;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;bottom:0;right:100%;display:block;clip-path:inset(0);transform:translate3d(calc(100% * var(--tui-inline)),0,0)}:host-context([dir=\"rtl\"]) .t-value{right:unset;left: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):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;left:-60rem;top:-60rem;z-index:-999;display:none!important;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;right:1rem;z-index:1;display:flex;align-items:center;block-size:100%;gap:.25rem;pointer-events:none}@supports (inset-inline-end: 0){.t-icons{right:unset;inset-inline-end:1rem}}.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:-webkit-autofill~.t-label,.t-label_raised{font-size:var(--t-label-size);transform:translateY(var(--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-block:auto 0;inset-inline:auto 100%;clip-path:inset(0);transform:translate3d(calc(100% * var(--tui-inline)),0,0)}:host-context([dir=\"rtl\"]) .t-value{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 }); }
314
264
  }
315
- __decorate([
316
- tuiPure
317
- ], TuiInputCardGroup.prototype, "isFocusable", null);
318
- __decorate([
319
- tuiPure
320
- ], TuiInputCardGroup.prototype, "getPaymentSystem", null);
321
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputCardGroup, decorators: [{
265
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputCardGroup, decorators: [{
322
266
  type: Component,
323
267
  args: [{ selector: 'tui-input-card-group', imports: [
324
268
  FormsModule,
@@ -347,24 +291,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
347
291
  '[attr.data-size]': 'textfield.size()',
348
292
  '(pointerdown)': 'onPointerDown($event)',
349
293
  '(scroll.zoneless)': '$event.target.scrollLeft = 0',
350
- }, 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;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);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){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:100%;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{left:1.375rem}:host-context([dir=\"rtl\"]) .t-collapsed_enable-mask .t-collapsed-wrapper{left:unset}.t-collapsed-wrapper{position:absolute;top:0;display:block;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;bottom:0;right:100%;display:block;clip-path:inset(0);transform:translate3d(calc(100% * var(--tui-inline)),0,0)}:host-context([dir=\"rtl\"]) .t-value{right:unset;left: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):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;left:-60rem;top:-60rem;z-index:-999;display:none!important;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;right:1rem;z-index:1;display:flex;align-items:center;block-size:100%;gap:.25rem;pointer-events:none}@supports (inset-inline-end: 0){.t-icons{right:unset;inset-inline-end:1rem}}.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:-webkit-autofill~.t-label,.t-label_raised{font-size:var(--t-label-size);transform:translateY(var(--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"] }]
351
- }], propDecorators: { exampleText: [{
352
- type: Input
353
- }], placeholder: [{
354
- type: Input
355
- }], inputs: [{
356
- type: Input
357
- }], cardValidator: [{
358
- type: Input
359
- }], icon: [{
360
- type: Input
361
- }], id: [{
362
- type: Input
363
- }], binChange: [{
364
- type: Output
365
- }], codeLength: [{
366
- type: Input
367
- }], isFocusable: [], getPaymentSystem: [] } });
294
+ '(tuiActiveZoneChange)': 'onTouched()',
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-block:auto 0;inset-inline:auto 100%;clip-path:inset(0);transform:translate3d(calc(100% * var(--tui-inline)),0,0)}:host-context([dir=\"rtl\"]) .t-value{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
+ }] });
368
297
 
369
298
  /**
370
299
  * Generated bundle index. Do not edit.