@taiga-ui/addon-commerce 4.52.0-canary.216e347 → 4.52.0-canary.217a686
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/README.md +2 -2
- package/components/index.d.ts +0 -2
- package/components/input-card/index.d.ts +3 -1
- package/components/input-card/input-card.component.d.ts +6 -12
- package/components/input-card/input-card.d.ts +7 -0
- package/components/input-card/input-cvc.directive.d.ts +10 -0
- package/components/input-card/input-expire.directive.d.ts +8 -0
- package/components/input-card-group/index.d.ts +1 -0
- package/components/input-card-group/input-card-group.component.d.ts +23 -25
- package/components/input-card-group/input-card-group.directive.d.ts +8 -0
- package/components/input-card-group/input-card-group.options.d.ts +2 -5
- package/components/input-card-group/input-card-group.providers.d.ts +6 -6
- package/components/thumbnail-card/thumbnail-card.component.d.ts +5 -8
- package/components/thumbnail-card/thumbnail-card.options.d.ts +0 -2
- package/fesm2022/taiga-ui-addon-commerce-components-input-card-group.mjs +105 -133
- package/fesm2022/taiga-ui-addon-commerce-components-input-card-group.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-components-input-card.mjs +95 -66
- package/fesm2022/taiga-ui-addon-commerce-components-input-card.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-components-thumbnail-card.mjs +13 -26
- package/fesm2022/taiga-ui-addon-commerce-components-thumbnail-card.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-components.mjs +0 -2
- package/fesm2022/taiga-ui-addon-commerce-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-constants.mjs +4 -26
- package/fesm2022/taiga-ui-addon-commerce-constants.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-pipes-amount.mjs +26 -24
- package/fesm2022/taiga-ui-addon-commerce-pipes-amount.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-pipes-currency.mjs +3 -4
- package/fesm2022/taiga-ui-addon-commerce-pipes-currency.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-pipes-decimal.mjs +18 -10
- package/fesm2022/taiga-ui-addon-commerce-pipes-decimal.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-pipes-format-card.mjs +3 -4
- package/fesm2022/taiga-ui-addon-commerce-pipes-format-card.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-tokens.mjs +13 -14
- package/fesm2022/taiga-ui-addon-commerce-tokens.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-types.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-utils.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-validators.mjs.map +1 -1
- package/package.json +16 -55
- package/pipes/amount/amount.options.d.ts +1 -3
- package/pipes/amount/amount.pipe.d.ts +5 -2
- package/pipes/decimal/decimal.pipe.d.ts +4 -2
- package/tokens/i18n.d.ts +4 -5
- package/components/input-card/input-card.options.d.ts +0 -12
- package/components/input-cvc/index.d.ts +0 -1
- package/components/input-cvc/input-cvc.directive.d.ts +0 -14
- package/components/input-expire/index.d.ts +0 -1
- package/components/input-expire/input-expire.directive.d.ts +0 -10
- package/esm2022/components/index.mjs +0 -6
- package/esm2022/components/input-card/index.mjs +0 -3
- package/esm2022/components/input-card/input-card.component.mjs +0 -86
- package/esm2022/components/input-card/input-card.options.mjs +0 -15
- package/esm2022/components/input-card/taiga-ui-addon-commerce-components-input-card.mjs +0 -5
- package/esm2022/components/input-card-group/index.mjs +0 -4
- package/esm2022/components/input-card-group/input-card-group.component.mjs +0 -332
- package/esm2022/components/input-card-group/input-card-group.options.mjs +0 -19
- package/esm2022/components/input-card-group/input-card-group.providers.mjs +0 -30
- package/esm2022/components/input-card-group/taiga-ui-addon-commerce-components-input-card-group.mjs +0 -5
- package/esm2022/components/input-cvc/index.mjs +0 -2
- package/esm2022/components/input-cvc/input-cvc.directive.mjs +0 -47
- package/esm2022/components/input-cvc/taiga-ui-addon-commerce-components-input-cvc.mjs +0 -5
- package/esm2022/components/input-expire/index.mjs +0 -2
- package/esm2022/components/input-expire/input-expire.directive.mjs +0 -38
- package/esm2022/components/input-expire/taiga-ui-addon-commerce-components-input-expire.mjs +0 -5
- package/esm2022/components/taiga-ui-addon-commerce-components.mjs +0 -5
- package/esm2022/components/thumbnail-card/index.mjs +0 -3
- package/esm2022/components/thumbnail-card/taiga-ui-addon-commerce-components-thumbnail-card.mjs +0 -5
- package/esm2022/components/thumbnail-card/thumbnail-card.component.mjs +0 -35
- package/esm2022/components/thumbnail-card/thumbnail-card.options.mjs +0 -10
- package/esm2022/constants/default-card-validator.mjs +0 -3
- package/esm2022/constants/index.mjs +0 -6
- package/esm2022/constants/mask-card-holder.mjs +0 -51
- package/esm2022/constants/mask-card.mjs +0 -29
- package/esm2022/constants/mask-cvc.mjs +0 -5
- package/esm2022/constants/mask-expire.mjs +0 -6
- package/esm2022/constants/taiga-ui-addon-commerce-constants.mjs +0 -5
- package/esm2022/index.mjs +0 -8
- package/esm2022/pipes/amount/amount.options.mjs +0 -14
- package/esm2022/pipes/amount/amount.pipe.mjs +0 -45
- package/esm2022/pipes/amount/amount.types.mjs +0 -2
- package/esm2022/pipes/amount/amount.utils.mjs +0 -11
- package/esm2022/pipes/amount/index.mjs +0 -4
- package/esm2022/pipes/amount/taiga-ui-addon-commerce-pipes-amount.mjs +0 -5
- package/esm2022/pipes/currency/currency.pipe.mjs +0 -19
- package/esm2022/pipes/currency/index.mjs +0 -2
- package/esm2022/pipes/currency/taiga-ui-addon-commerce-pipes-currency.mjs +0 -5
- package/esm2022/pipes/decimal/decimal.pipe.mjs +0 -28
- package/esm2022/pipes/decimal/index.mjs +0 -2
- package/esm2022/pipes/decimal/taiga-ui-addon-commerce-pipes-decimal.mjs +0 -5
- package/esm2022/pipes/format-card/format-card.pipe.mjs +0 -24
- package/esm2022/pipes/format-card/index.mjs +0 -2
- package/esm2022/pipes/format-card/taiga-ui-addon-commerce-pipes-format-card.mjs +0 -5
- package/esm2022/pipes/index.mjs +0 -5
- package/esm2022/pipes/taiga-ui-addon-commerce-pipes.mjs +0 -5
- package/esm2022/taiga-ui-addon-commerce.mjs +0 -5
- package/esm2022/tokens/i18n.mjs +0 -22
- package/esm2022/tokens/index.mjs +0 -3
- package/esm2022/tokens/payment-system-icons.mjs +0 -20
- package/esm2022/tokens/taiga-ui-addon-commerce-tokens.mjs +0 -5
- package/esm2022/types/currency-code.mjs +0 -410
- package/esm2022/types/currency-variants.mjs +0 -2
- package/esm2022/types/currency.mjs +0 -419
- package/esm2022/types/index.mjs +0 -3
- package/esm2022/types/payment-system.mjs +0 -2
- package/esm2022/types/taiga-ui-addon-commerce-types.mjs +0 -5
- package/esm2022/utils/format-currency.mjs +0 -12
- package/esm2022/utils/get-code-by-currency.mjs +0 -52
- package/esm2022/utils/get-currency-by-code.mjs +0 -52
- package/esm2022/utils/get-currency-symbol.mjs +0 -139
- package/esm2022/utils/get-payment-system.mjs +0 -105
- package/esm2022/utils/index.mjs +0 -9
- package/esm2022/utils/is-card-length-valid.mjs +0 -22
- package/esm2022/utils/is-card-number-valid.mjs +0 -18
- package/esm2022/utils/is-expire-valid.mjs +0 -10
- package/esm2022/utils/taiga-ui-addon-commerce-utils.mjs +0 -5
- package/esm2022/validators/card-expire.validator.mjs +0 -8
- package/esm2022/validators/card-number.validator.mjs +0 -8
- package/esm2022/validators/index.mjs +0 -4
- package/esm2022/validators/luhn.validator.mjs +0 -6
- package/esm2022/validators/taiga-ui-addon-commerce-validators.mjs +0 -5
- package/fesm2022/taiga-ui-addon-commerce-components-input-cvc.mjs +0 -53
- package/fesm2022/taiga-ui-addon-commerce-components-input-cvc.mjs.map +0 -1
- package/fesm2022/taiga-ui-addon-commerce-components-input-expire.mjs +0 -44
- package/fesm2022/taiga-ui-addon-commerce-components-input-expire.mjs.map +0 -1
|
@@ -1,83 +1,89 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
|
-
import { DOCUMENT, isPlatformServer
|
|
2
|
+
import { DOCUMENT, isPlatformServer } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { inject, input, computed, Directive, InjectionToken, viewChild, PLATFORM_ID, output, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
5
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
6
|
import * as i4 from '@angular/forms';
|
|
7
7
|
import { FormsModule } from '@angular/forms';
|
|
8
8
|
import { MaskitoDirective } from '@maskito/angular';
|
|
9
9
|
import { WaResizeObserver } from '@ng-web-apis/resize-observer';
|
|
10
10
|
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';
|
|
11
|
+
import { TuiFormatCardPipe } from '@taiga-ui/addon-commerce/pipes/format-card';
|
|
12
12
|
import { TUI_CARD_NUMBER_TEXTS, TUI_CARD_EXPIRY_TEXTS, TUI_CARD_CVC_TEXTS, TUI_PAYMENT_SYSTEM_ICONS } from '@taiga-ui/addon-commerce/tokens';
|
|
13
|
+
import { tuiGetPaymentSystem } from '@taiga-ui/addon-commerce/utils';
|
|
13
14
|
import { TuiControl, tuiAsControl } from '@taiga-ui/cdk/classes';
|
|
14
15
|
import { TUI_NON_DIGIT_REGEXP, CHAR_NO_BREAK_SPACE } from '@taiga-ui/cdk/constants';
|
|
15
16
|
import { tuiHovered, TuiHoveredService } from '@taiga-ui/cdk/directives/hovered';
|
|
16
|
-
import {
|
|
17
|
-
import { tuiTypedFromEvent } from '@taiga-ui/cdk/observables';
|
|
17
|
+
import { TuiTransitioned } from '@taiga-ui/cdk/directives/transitioned';
|
|
18
18
|
import { TuiMapperPipe } from '@taiga-ui/cdk/pipes/mapper';
|
|
19
|
-
import { tuiInjectId } from '@taiga-ui/cdk/services';
|
|
20
19
|
import { TUI_IS_MOBILE, TUI_IS_WEBKIT } from '@taiga-ui/cdk/tokens';
|
|
21
20
|
import { tuiInjectElement, tuiIsElement, tuiIsInput } from '@taiga-ui/cdk/utils/dom';
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
21
|
+
import { tuiFocusedIn, tuiIsFocused } from '@taiga-ui/cdk/utils/focus';
|
|
22
|
+
import { tuiGenerateId, tuiPure } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
24
23
|
import { tuiAsDataListHost } from '@taiga-ui/core/components/data-list';
|
|
25
24
|
import { TuiIcon, TuiIconPipe } from '@taiga-ui/core/components/icon';
|
|
26
|
-
import
|
|
27
|
-
import { TUI_TEXTFIELD_OPTIONS, TuiWithTextfieldDropdown } from '@taiga-ui/core/components/textfield';
|
|
25
|
+
import { TUI_TEXTFIELD_OPTIONS } from '@taiga-ui/core/components/textfield';
|
|
28
26
|
import * as i1 from '@taiga-ui/core/directives/appearance';
|
|
29
27
|
import { tuiAppearanceMode, tuiAppearance, tuiAppearanceState, tuiAppearanceFocus, TuiAppearance } from '@taiga-ui/core/directives/appearance';
|
|
30
|
-
import * as i2 from '@taiga-ui/core/
|
|
31
|
-
import { TuiDropdownDirective,
|
|
32
|
-
import {
|
|
28
|
+
import * as i2 from '@taiga-ui/core/portals/dropdown';
|
|
29
|
+
import { TuiDropdownDirective, TuiDropdownOpen, tuiDropdownOptionsProvider, TuiWithDropdownOpen } from '@taiga-ui/core/portals/dropdown';
|
|
30
|
+
import { TUI_BREAKPOINT, TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
|
|
33
31
|
import { TuiChevron } from '@taiga-ui/kit/directives/chevron';
|
|
34
32
|
import { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
|
|
33
|
+
import { Subject, EMPTY, switchMap, timer } from 'rxjs';
|
|
34
|
+
import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
35
|
+
|
|
36
|
+
class TuiInputCardGroupDirective {
|
|
37
|
+
constructor() {
|
|
38
|
+
this.breakpoint = inject(TUI_BREAKPOINT);
|
|
39
|
+
this.compact = input(false);
|
|
40
|
+
this.c = computed(() => this.compact() || this.breakpoint() === 'mobile');
|
|
41
|
+
}
|
|
42
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputCardGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
43
|
+
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": "c()" } }, ngImport: i0 }); }
|
|
44
|
+
}
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputCardGroupDirective, decorators: [{
|
|
46
|
+
type: Directive,
|
|
47
|
+
args: [{
|
|
48
|
+
host: { '[class._compact]': 'c()' },
|
|
49
|
+
}]
|
|
50
|
+
}] });
|
|
38
51
|
|
|
39
52
|
const TUI_INPUT_CARD_GROUP_DEFAULT_OPTIONS = {
|
|
40
|
-
...TUI_INPUT_CARD_DEFAULT_OPTIONS,
|
|
41
53
|
cardValidator: tuiDefaultCardValidator,
|
|
42
54
|
exampleText: '0000 0000 0000 0000',
|
|
43
55
|
exampleTextCVC: '000',
|
|
44
56
|
cvcHidden: true,
|
|
45
57
|
inputs: { cvc: true, expire: true },
|
|
46
58
|
};
|
|
47
|
-
const TUI_INPUT_CARD_GROUP_OPTIONS =
|
|
48
|
-
factory: () => TUI_INPUT_CARD_GROUP_DEFAULT_OPTIONS,
|
|
49
|
-
});
|
|
50
|
-
function tuiInputCardGroupOptionsProvider(options) {
|
|
51
|
-
return tuiProvideOptions(TUI_INPUT_CARD_GROUP_OPTIONS, options, TUI_INPUT_CARD_GROUP_DEFAULT_OPTIONS);
|
|
52
|
-
}
|
|
59
|
+
const [TUI_INPUT_CARD_GROUP_OPTIONS, tuiInputCardGroupOptionsProvider] = tuiCreateOptions(TUI_INPUT_CARD_GROUP_DEFAULT_OPTIONS);
|
|
53
60
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
const TUI_INPUT_CARD_GROUP_TEXTS = new InjectionToken(ngDevMode ? 'TUI_INPUT_CARD_GROUP_TEXTS' : '');
|
|
62
|
+
const TUI_INPUT_CARD_GROUP_TEXTS_PROVIDER = {
|
|
63
|
+
provide: TUI_INPUT_CARD_GROUP_TEXTS,
|
|
64
|
+
useFactory: () => {
|
|
65
|
+
const cardGroupTexts = inject(TUI_INPUT_CARD_GROUP_TEXTS, {
|
|
66
|
+
skipSelf: true,
|
|
67
|
+
optional: true,
|
|
68
|
+
});
|
|
69
|
+
const compact = inject(TuiInputCardGroupDirective).c;
|
|
70
|
+
const cardNumber = inject(TUI_CARD_NUMBER_TEXTS);
|
|
71
|
+
const expiry = inject(TUI_CARD_EXPIRY_TEXTS);
|
|
62
72
|
const cvcTexts = inject(TUI_CARD_CVC_TEXTS);
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
expiryTexts,
|
|
69
|
-
cvcTexts,
|
|
70
|
-
])), map(([index, cardNumber, expiry, cvcTexts]) => ({
|
|
71
|
-
cardNumberText: cardNumber[index] ?? '',
|
|
72
|
-
expiryText: expiry[index] ?? '',
|
|
73
|
-
cvcText: cvcTexts[index] ?? '',
|
|
74
|
-
})));
|
|
73
|
+
return computed(() => cardGroupTexts?.() ?? {
|
|
74
|
+
cardNumberText: cardNumber()[Number(!compact())] ?? '',
|
|
75
|
+
expiryText: expiry()[Number(!compact())] ?? '',
|
|
76
|
+
cvcText: cvcTexts()[Number(!compact())] ?? '',
|
|
77
|
+
});
|
|
75
78
|
},
|
|
76
|
-
}
|
|
79
|
+
};
|
|
77
80
|
|
|
78
81
|
class TuiInputCardGroup extends TuiControl {
|
|
79
82
|
constructor() {
|
|
80
83
|
super(...arguments);
|
|
84
|
+
this.inputCard = viewChild('inputCard');
|
|
85
|
+
this.inputExpire = viewChild('inputExpire');
|
|
86
|
+
this.inputCVC = viewChild('inputCVC');
|
|
81
87
|
this.doc = inject(DOCUMENT);
|
|
82
88
|
this.isServer = isPlatformServer(inject(PLATFORM_ID));
|
|
83
89
|
this.focus$ = new Subject();
|
|
@@ -86,18 +92,19 @@ class TuiInputCardGroup extends TuiControl {
|
|
|
86
92
|
this.options = inject(TUI_INPUT_CARD_GROUP_OPTIONS);
|
|
87
93
|
this.el = tuiInjectElement();
|
|
88
94
|
this.hover = tuiHovered();
|
|
89
|
-
this.focusedIn =
|
|
90
|
-
this.exampleTextCVC = this.options.exampleTextCVC;
|
|
95
|
+
this.focusedIn = tuiFocusedIn(this.el);
|
|
96
|
+
this.exampleTextCVC = computed((length = this.codeLength()) => length ? '0'.repeat(length) : this.options.exampleTextCVC);
|
|
97
|
+
this.maskCVC = computed((length = this.codeLength()) => TUI_MASK_CVC(length ?? 3));
|
|
91
98
|
this.cvcHidden = this.options.cvcHidden;
|
|
92
|
-
this.maskCVC = TUI_MASK_CVC(3);
|
|
93
99
|
this.isMobile = inject(TUI_IS_MOBILE);
|
|
94
100
|
this.isWebkit = inject(TUI_IS_WEBKIT);
|
|
95
101
|
this.dropdown = inject(TuiDropdownDirective);
|
|
96
102
|
this.maskCard = TUI_MASK_CARD;
|
|
97
103
|
this.maskExpire = TUI_MASK_EXPIRE;
|
|
98
104
|
this.icons = inject(TUI_COMMON_ICONS);
|
|
99
|
-
this.
|
|
100
|
-
this.
|
|
105
|
+
this.textfield = inject(TUI_TEXTFIELD_OPTIONS);
|
|
106
|
+
this.texts = inject(TUI_INPUT_CARD_GROUP_TEXTS);
|
|
107
|
+
this.open = inject(TuiDropdownOpen).open;
|
|
101
108
|
this.$ = this.isWebkit
|
|
102
109
|
? this.focus$
|
|
103
110
|
.pipe(switchMap(() => timer(100)), takeUntilDestroyed())
|
|
@@ -110,31 +117,22 @@ class TuiInputCardGroup extends TuiControl {
|
|
|
110
117
|
computed(() => (this.disabled() ? 'disabled' : this.hover() ? 'hover' : null)));
|
|
111
118
|
this.focus = tuiAppearanceFocus(computed(() => this.open() || this.focusedIn()));
|
|
112
119
|
this.labelRaised = computed(() => (this.focus() && !this.readOnly()) || !!this.value()?.card);
|
|
113
|
-
this.hasCleaner = computed(() => !!this.value()?.card && this.interactive());
|
|
120
|
+
this.hasCleaner = computed(() => this.textfield.cleaner() && !!this.value()?.card && this.interactive());
|
|
114
121
|
/**
|
|
115
122
|
* @deprecated use 'placeholder' instead
|
|
116
123
|
*/
|
|
117
|
-
this.exampleText = this.options.exampleText;
|
|
118
|
-
this.placeholder = this.options.exampleText;
|
|
119
|
-
this.inputs = this.options.inputs;
|
|
120
|
-
this.cardValidator = this.options.cardValidator;
|
|
121
|
-
this.icon =
|
|
122
|
-
this.id =
|
|
123
|
-
|
|
124
|
-
this.
|
|
125
|
-
this.binChange = new EventEmitter();
|
|
126
|
-
}
|
|
127
|
-
set codeLength(length) {
|
|
128
|
-
this.exampleTextCVC = '0'.repeat(length);
|
|
129
|
-
this.maskCVC = TUI_MASK_CVC(length);
|
|
124
|
+
this.exampleText = input(this.options.exampleText);
|
|
125
|
+
this.placeholder = input(this.options.exampleText);
|
|
126
|
+
this.inputs = input(this.options.inputs);
|
|
127
|
+
this.cardValidator = input(this.options.cardValidator);
|
|
128
|
+
this.icon = input('');
|
|
129
|
+
this.id = input(tuiGenerateId());
|
|
130
|
+
this.codeLength = input();
|
|
131
|
+
this.binChange = output();
|
|
130
132
|
}
|
|
131
133
|
get bin() {
|
|
132
134
|
return this.card.length < 6 ? null : this.card.slice(0, 6);
|
|
133
135
|
}
|
|
134
|
-
ngAfterViewInit() {
|
|
135
|
-
// Enabling transitions
|
|
136
|
-
setTimeout(() => this.el.style.removeProperty('--tui-duration'), 500);
|
|
137
|
-
}
|
|
138
136
|
writeValue(value) {
|
|
139
137
|
const { bin } = this;
|
|
140
138
|
const { activeElement } = this.doc;
|
|
@@ -142,40 +140,41 @@ class TuiInputCardGroup extends TuiControl {
|
|
|
142
140
|
this.updateBin(bin);
|
|
143
141
|
this.expirePrefilled = !!this.expire && this.cardPrefilled;
|
|
144
142
|
// Programmatic setting of expire input value breaks autofill in Chrome
|
|
145
|
-
|
|
143
|
+
const inputExpire = this.inputExpire();
|
|
144
|
+
if (!inputExpire ||
|
|
146
145
|
this.isMobile ||
|
|
147
146
|
this.isWebkit ||
|
|
148
147
|
this.isServer ||
|
|
149
|
-
|
|
148
|
+
inputExpire.nativeElement.value === this.expire) {
|
|
150
149
|
return;
|
|
151
150
|
}
|
|
152
|
-
|
|
153
|
-
|
|
151
|
+
inputExpire.nativeElement.focus({ preventScroll: true });
|
|
152
|
+
inputExpire.nativeElement.select();
|
|
154
153
|
this.doc.execCommand('insertText', false, this.expire);
|
|
155
|
-
|
|
154
|
+
inputExpire.nativeElement.blur();
|
|
156
155
|
activeElement?.focus({ preventScroll: true });
|
|
157
156
|
}
|
|
158
157
|
/** Public API for manual focus management */
|
|
159
158
|
focusCard() {
|
|
160
|
-
this.inputCard?.nativeElement.focus({ preventScroll: true });
|
|
159
|
+
this.inputCard()?.nativeElement.focus({ preventScroll: true });
|
|
161
160
|
}
|
|
162
161
|
focusExpire() {
|
|
163
|
-
if (this.inputs.expire) {
|
|
164
|
-
this.inputExpire?.nativeElement.focus({ preventScroll: true });
|
|
162
|
+
if (this.inputs().expire) {
|
|
163
|
+
this.inputExpire()?.nativeElement.focus({ preventScroll: true });
|
|
165
164
|
}
|
|
166
165
|
else {
|
|
167
|
-
this.inputCVC?.nativeElement.focus({ preventScroll: true });
|
|
166
|
+
this.inputCVC()?.nativeElement.focus({ preventScroll: true });
|
|
168
167
|
}
|
|
169
168
|
}
|
|
170
169
|
focusCVC() {
|
|
171
|
-
this.inputCVC?.nativeElement.focus({ preventScroll: true });
|
|
170
|
+
this.inputCVC()?.nativeElement.focus({ preventScroll: true });
|
|
172
171
|
}
|
|
173
172
|
handleOption(option) {
|
|
174
173
|
const { card = '', expire = '', cvc = '' } = option || {};
|
|
175
174
|
const { bin } = this;
|
|
176
|
-
const element = (!card && this.inputCard?.nativeElement) ||
|
|
177
|
-
(!expire && this.inputExpire?.nativeElement) ||
|
|
178
|
-
this.inputCVC?.nativeElement;
|
|
175
|
+
const element = (!card && this.inputCard()?.nativeElement) ||
|
|
176
|
+
(!expire && this.inputExpire()?.nativeElement) ||
|
|
177
|
+
this.inputCVC()?.nativeElement;
|
|
179
178
|
this.onChange({ card, expire, cvc });
|
|
180
179
|
this.updateBin(bin);
|
|
181
180
|
this.open.set(false);
|
|
@@ -184,7 +183,7 @@ class TuiInputCardGroup extends TuiControl {
|
|
|
184
183
|
}
|
|
185
184
|
clear() {
|
|
186
185
|
this.expirePrefilled = false;
|
|
187
|
-
[this.inputCVC, this.inputExpire, this.inputCard].forEach((e) => {
|
|
186
|
+
[this.inputCVC(), this.inputExpire(), this.inputCard()].forEach((e) => {
|
|
188
187
|
e?.nativeElement.focus();
|
|
189
188
|
e?.nativeElement.select();
|
|
190
189
|
e?.nativeElement.ownerDocument.execCommand('delete');
|
|
@@ -196,7 +195,7 @@ class TuiInputCardGroup extends TuiControl {
|
|
|
196
195
|
}
|
|
197
196
|
get content() {
|
|
198
197
|
const system = this.getPaymentSystem(this.card);
|
|
199
|
-
return this.icon || (system && this.paymentSystems[system]);
|
|
198
|
+
return this.icon() || (system && this.paymentSystems[system]);
|
|
200
199
|
}
|
|
201
200
|
get card() {
|
|
202
201
|
return this.value()?.card || '';
|
|
@@ -208,8 +207,7 @@ class TuiInputCardGroup extends TuiControl {
|
|
|
208
207
|
return this.value()?.cvc || '';
|
|
209
208
|
}
|
|
210
209
|
get cardCollapsed() {
|
|
211
|
-
return (this.isFocusable(this.card) &&
|
|
212
|
-
!tuiIsNativeFocused(this.inputCard?.nativeElement));
|
|
210
|
+
return (this.isFocusable(this.card) && !tuiIsFocused(this.inputCard()?.nativeElement));
|
|
213
211
|
}
|
|
214
212
|
get tailLength() {
|
|
215
213
|
return this.card.length % 4 > 0 ? 5 : 4;
|
|
@@ -218,7 +216,7 @@ class TuiInputCardGroup extends TuiControl {
|
|
|
218
216
|
return !!this.card.match(TUI_NON_DIGIT_REGEXP);
|
|
219
217
|
}
|
|
220
218
|
get cvcPrefilled() {
|
|
221
|
-
return !this.inputs.cvc || !!this.cvc.match(TUI_NON_DIGIT_REGEXP);
|
|
219
|
+
return !this.inputs().cvc || !!this.cvc.match(TUI_NON_DIGIT_REGEXP);
|
|
222
220
|
}
|
|
223
221
|
get cardFocusable() {
|
|
224
222
|
return !this.cardPrefilled;
|
|
@@ -240,7 +238,7 @@ class TuiInputCardGroup extends TuiControl {
|
|
|
240
238
|
}
|
|
241
239
|
this.updateProperty(parsed, 'card');
|
|
242
240
|
this.updateBin(bin);
|
|
243
|
-
if (this.cardValidator(this.card) && !value()?.expire && this.inputExpire) {
|
|
241
|
+
if (this.cardValidator()(this.card) && !value()?.expire && this.inputExpire()) {
|
|
244
242
|
this.focusExpire();
|
|
245
243
|
// Safari autofill focus jerk workaround
|
|
246
244
|
this.focus$.next();
|
|
@@ -249,7 +247,7 @@ class TuiInputCardGroup extends TuiControl {
|
|
|
249
247
|
onExpireChange(expire) {
|
|
250
248
|
this.updateProperty(expire, 'expire');
|
|
251
249
|
// MM/YY
|
|
252
|
-
if (Number(this.inputExpire?.nativeElement.selectionStart) === 5) {
|
|
250
|
+
if (Number(this.inputExpire()?.nativeElement.selectionStart) === 5) {
|
|
253
251
|
this.focusCVC();
|
|
254
252
|
}
|
|
255
253
|
}
|
|
@@ -272,10 +270,10 @@ class TuiInputCardGroup extends TuiControl {
|
|
|
272
270
|
this.open.update((open) => !open);
|
|
273
271
|
}
|
|
274
272
|
isFocusable(card) {
|
|
275
|
-
return this.cardValidator(card) || this.cardPrefilled;
|
|
273
|
+
return this.cardValidator()(card) || this.cardPrefilled;
|
|
276
274
|
}
|
|
277
275
|
getPaymentSystem(value) {
|
|
278
|
-
return
|
|
276
|
+
return tuiGetPaymentSystem(value);
|
|
279
277
|
}
|
|
280
278
|
updateBin(oldBin) {
|
|
281
279
|
const { bin } = this;
|
|
@@ -290,18 +288,19 @@ class TuiInputCardGroup extends TuiControl {
|
|
|
290
288
|
this.onChange(newValue.expire || newValue.cvc || newValue.card ? newValue : null);
|
|
291
289
|
}
|
|
292
290
|
focusInput() {
|
|
293
|
-
const element = (this.cardFocusable && this.inputCard?.nativeElement) ||
|
|
294
|
-
(this.expireFocusable && this.inputExpire?.nativeElement) ||
|
|
295
|
-
this.inputCVC?.nativeElement;
|
|
291
|
+
const element = (this.cardFocusable && this.inputCard()?.nativeElement) ||
|
|
292
|
+
(this.expireFocusable && this.inputExpire()?.nativeElement) ||
|
|
293
|
+
this.inputCVC()?.nativeElement;
|
|
296
294
|
element?.focus();
|
|
297
295
|
}
|
|
298
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
299
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
296
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputCardGroup, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
297
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiInputCardGroup, isStandalone: true, selector: "tui-input-card-group", inputs: { exampleText: { classPropertyName: "exampleText", publicName: "exampleText", isSignal: true, isRequired: false, transformFunction: null }, 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
298
|
tuiAsDataListHost(TuiInputCardGroup),
|
|
301
299
|
tuiAsControl(TuiInputCardGroup),
|
|
302
300
|
tuiDropdownOptionsProvider({ limitWidth: 'fixed' }),
|
|
303
301
|
TuiHoveredService,
|
|
304
|
-
], viewQueries: [{ propertyName: "inputCard", first: true, predicate: ["inputCard"], descendants: true, static: true }, { propertyName: "inputExpire", first: true, predicate: ["inputExpire"], descendants: true, static: true }, { propertyName: "inputCVC", first: true, predicate: ["inputCVC"], descendants: true, static: true }], usesInheritance: true, hostDirectives: [{ directive: i1.TuiAppearance }, { directive: i2.TuiDropdownDirective }, { directive: i3.TuiWithTextfieldDropdown }, { directive: i2.TuiWithDropdownOpen }], ngImport: i0, template: "<div class=\"t-wrapper\">\n <label\n *tuiLet=\"value()?.card | tuiFormatCard: cardPrefilled as formattedCard\"\n (click.zoneless.prevent)=\"(0)\"\n >\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 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 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 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 <div\n *ngIf=\"content\"\n class=\"t-icon-outlet\"\n >\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 <tui-icon\n *ngIf=\"hasCleaner()\"\n automation-id=\"tui-input-card-group__cleaner\"\n tuiAppearance=\"icon\"\n class=\"t-icon\"\n [icon]=\"icons.close\"\n (click)=\"clear()\"\n />\n <tui-icon\n *ngIf=\"dropdown._content()\"\n automation-id=\"tui-input-card-group__dropdown\"\n tuiAppearance=\"icon\"\n tuiChevron\n (click)=\"toggle()\"\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{position:relative;display:block;block-size:var(--tui-height-l);inline-size:29.5rem;border-radius:var(--tui-radius-l);overflow:hidden;--t-translate: 6.5625rem}:host :host-context(tui-root._mobile){inline-size:18rem;--t-translate: 4.125rem}:host[tuiAppearance][data-appearance]:has(:-webkit-autofill){background:var(--tui-service-autofill-background)!important}.t-wrapper{position:absolute;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:7.1875rem}:host-context(tui-root._mobile) .t-wrapper_cvc{margin-inline-start:4.0625rem}.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:1.25rem var(--tui-padding-l) 0;box-sizing:border-box;font:var(--tui-font-text-m);line-height:2.25rem;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%;border:0;margin:0;padding:1.25rem var(--tui-padding-l) 0;outline:none;background:transparent;box-sizing:border-box;font:var(--tui-font-text-m);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;-webkit-transition:background-color 600000s 0s;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;display:flex;align-items:center;block-size:100%;gap:.25rem}@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;border-width:.25rem}.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:1.125rem 1rem;font:var(--tui-font-text-m);line-height:1.25rem;color:var(--tui-text-secondary)}.t-label:empty:before{content:attr(data-label)}input:-webkit-autofill~.t-label,.t-label_raised{font-size:.83rem;transform:translateY(-.7rem)}: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"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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", inputs: ["icon", "background"] }, { kind: "pipe", type: TuiIconPipe, name: "tuiIcon" }, { kind: "directive", type: TuiLet, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "pipe", type: TuiMapperPipe, name: "tuiMapper" }, { kind: "directive", type: WaResizeObserver, selector: "[waResizeObserver]", inputs: ["box"], outputs: ["waResizeObserver"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
302
|
+
TUI_INPUT_CARD_GROUP_TEXTS_PROVIDER,
|
|
303
|
+
], 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-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 }); }
|
|
305
304
|
}
|
|
306
305
|
__decorate([
|
|
307
306
|
tuiPure
|
|
@@ -309,69 +308,42 @@ __decorate([
|
|
|
309
308
|
__decorate([
|
|
310
309
|
tuiPure
|
|
311
310
|
], TuiInputCardGroup.prototype, "getPaymentSystem", null);
|
|
312
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
311
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputCardGroup, decorators: [{
|
|
313
312
|
type: Component,
|
|
314
|
-
args: [{
|
|
313
|
+
args: [{ selector: 'tui-input-card-group', imports: [
|
|
315
314
|
FormsModule,
|
|
316
315
|
MaskitoDirective,
|
|
317
|
-
NgIf,
|
|
318
316
|
PolymorpheusOutlet,
|
|
319
317
|
TuiAppearance,
|
|
320
318
|
TuiChevron,
|
|
321
319
|
TuiFormatCardPipe,
|
|
322
320
|
TuiIcon,
|
|
323
321
|
TuiIconPipe,
|
|
324
|
-
TuiLet,
|
|
325
322
|
TuiMapperPipe,
|
|
323
|
+
TuiTransitioned,
|
|
326
324
|
WaResizeObserver,
|
|
327
325
|
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
328
326
|
tuiAsDataListHost(TuiInputCardGroup),
|
|
329
327
|
tuiAsControl(TuiInputCardGroup),
|
|
330
328
|
tuiDropdownOptionsProvider({ limitWidth: 'fixed' }),
|
|
331
329
|
TuiHoveredService,
|
|
330
|
+
TUI_INPUT_CARD_GROUP_TEXTS_PROVIDER,
|
|
332
331
|
], hostDirectives: [
|
|
333
332
|
TuiAppearance,
|
|
334
333
|
TuiDropdownDirective,
|
|
335
|
-
TuiWithTextfieldDropdown,
|
|
336
334
|
TuiWithDropdownOpen,
|
|
335
|
+
{ directive: TuiInputCardGroupDirective, inputs: ['compact'] },
|
|
337
336
|
], host: {
|
|
338
|
-
'data-size': '
|
|
339
|
-
'[style.--tui-duration.s]': '0',
|
|
337
|
+
'[attr.data-size]': 'textfield.size()',
|
|
340
338
|
'(pointerdown)': 'onPointerDown($event)',
|
|
341
339
|
'(scroll.zoneless)': '$event.target.scrollLeft = 0',
|
|
342
|
-
|
|
343
|
-
}], propDecorators: { inputCard: [{
|
|
344
|
-
|
|
345
|
-
args: ['inputCard', { static: true }]
|
|
346
|
-
}], inputExpire: [{
|
|
347
|
-
type: ViewChild,
|
|
348
|
-
args: ['inputExpire', { static: true }]
|
|
349
|
-
}], inputCVC: [{
|
|
350
|
-
type: ViewChild,
|
|
351
|
-
args: ['inputCVC', { static: true }]
|
|
352
|
-
}], exampleText: [{
|
|
353
|
-
type: Input
|
|
354
|
-
}], placeholder: [{
|
|
355
|
-
type: Input
|
|
356
|
-
}], inputs: [{
|
|
357
|
-
type: Input
|
|
358
|
-
}], cardValidator: [{
|
|
359
|
-
type: Input
|
|
360
|
-
}], icon: [{
|
|
361
|
-
type: Input
|
|
362
|
-
}], id: [{
|
|
363
|
-
type: Input
|
|
364
|
-
}], autocomplete: [{
|
|
365
|
-
type: Input
|
|
366
|
-
}], binChange: [{
|
|
367
|
-
type: Output
|
|
368
|
-
}], codeLength: [{
|
|
369
|
-
type: Input
|
|
370
|
-
}], isFocusable: [], getPaymentSystem: [] } });
|
|
340
|
+
'(tuiActiveZoneChange)': 'onTouched()',
|
|
341
|
+
}, 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-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"] }]
|
|
342
|
+
}], propDecorators: { isFocusable: [], getPaymentSystem: [] } });
|
|
371
343
|
|
|
372
344
|
/**
|
|
373
345
|
* Generated bundle index. Do not edit.
|
|
374
346
|
*/
|
|
375
347
|
|
|
376
|
-
export { TUI_INPUT_CARD_GROUP_DEFAULT_OPTIONS, TUI_INPUT_CARD_GROUP_OPTIONS, TUI_INPUT_CARD_GROUP_TEXTS, TuiInputCardGroup, tuiInputCardGroupOptionsProvider };
|
|
348
|
+
export { TUI_INPUT_CARD_GROUP_DEFAULT_OPTIONS, TUI_INPUT_CARD_GROUP_OPTIONS, TUI_INPUT_CARD_GROUP_TEXTS, TUI_INPUT_CARD_GROUP_TEXTS_PROVIDER, TuiInputCardGroup, TuiInputCardGroupDirective, tuiInputCardGroupOptionsProvider };
|
|
377
349
|
//# sourceMappingURL=taiga-ui-addon-commerce-components-input-card-group.mjs.map
|