@taiga-ui/addon-commerce 4.43.0 → 4.44.0-canary.0bcf1bf
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/input-card/input-card.options.d.ts +2 -1
- package/components/input-card-group/input-card-group.component.d.ts +3 -3
- package/components/input-card-group/input-card-group.options.d.ts +2 -1
- package/components/input-card-group/input-card-group.providers.d.ts +2 -1
- package/components/thumbnail-card/thumbnail-card.options.d.ts +2 -1
- package/esm2022/components/input-card/input-card.component.mjs +3 -2
- package/esm2022/components/input-card/input-card.options.mjs +6 -3
- package/esm2022/components/input-card-group/input-card-group.component.mjs +14 -12
- package/esm2022/components/input-card-group/input-card-group.options.mjs +6 -3
- package/esm2022/components/input-card-group/input-card-group.providers.mjs +21 -20
- package/esm2022/components/thumbnail-card/thumbnail-card.options.mjs +9 -8
- package/esm2022/constants/mask-card.mjs +6 -6
- package/esm2022/pipes/amount/amount.options.mjs +6 -3
- package/esm2022/pipes/format-card/format-card.pipe.mjs +3 -2
- package/esm2022/tokens/i18n.mjs +11 -5
- package/esm2022/tokens/payment-system-icons.mjs +19 -17
- package/fesm2022/taiga-ui-addon-commerce-components-input-card-group.mjs +37 -31
- package/fesm2022/taiga-ui-addon-commerce-components-input-card-group.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-components-input-card.mjs +7 -4
- package/fesm2022/taiga-ui-addon-commerce-components-input-card.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-components-thumbnail-card.mjs +8 -7
- package/fesm2022/taiga-ui-addon-commerce-components-thumbnail-card.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-constants.mjs +5 -5
- package/fesm2022/taiga-ui-addon-commerce-constants.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-pipes-amount.mjs +5 -3
- package/fesm2022/taiga-ui-addon-commerce-pipes-amount.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-pipes-format-card.mjs +2 -1
- package/fesm2022/taiga-ui-addon-commerce-pipes-format-card.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-commerce-tokens.mjs +27 -19
- package/fesm2022/taiga-ui-addon-commerce-tokens.mjs.map +1 -1
- package/package.json +18 -18
- package/pipes/amount/amount.options.d.ts +2 -1
- package/tokens/i18n.d.ts +4 -3
- package/tokens/payment-system-icons.d.ts +1 -1
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { inject } from '@angular/core';
|
|
1
|
+
import { inject, InjectionToken } from '@angular/core';
|
|
2
2
|
import { WA_WINDOW } from '@ng-web-apis/common';
|
|
3
3
|
import { TUI_CARD_CVC_TEXTS, TUI_CARD_EXPIRY_TEXTS, TUI_CARD_NUMBER_TEXTS, } from '@taiga-ui/addon-commerce/tokens';
|
|
4
4
|
import { tuiTypedFromEvent } from '@taiga-ui/cdk/observables';
|
|
5
|
-
import { tuiCreateTokenFromFactory } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
6
5
|
import { TUI_MEDIA } from '@taiga-ui/core/tokens';
|
|
7
6
|
import { combineLatest, map, of, startWith, switchMap } from 'rxjs';
|
|
8
7
|
/**
|
|
9
8
|
* InputCardGroup texts
|
|
10
9
|
*/
|
|
11
|
-
export const TUI_INPUT_CARD_GROUP_TEXTS =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
10
|
+
export const TUI_INPUT_CARD_GROUP_TEXTS = new InjectionToken(ngDevMode ? 'TUI_INPUT_CARD_GROUP_TEXTS' : '', {
|
|
11
|
+
factory: () => {
|
|
12
|
+
const win = inject(WA_WINDOW);
|
|
13
|
+
const cardNumberTexts = inject(TUI_CARD_NUMBER_TEXTS);
|
|
14
|
+
const expiryTexts = inject(TUI_CARD_EXPIRY_TEXTS);
|
|
15
|
+
const cvcTexts = inject(TUI_CARD_CVC_TEXTS);
|
|
16
|
+
const { desktopSmall } = inject(TUI_MEDIA);
|
|
17
|
+
const media = win.matchMedia(`screen and (min-width: ${(desktopSmall - 1) / 16}em)`);
|
|
18
|
+
return tuiTypedFromEvent(media, 'change').pipe(startWith(null), switchMap(() => combineLatest([
|
|
19
|
+
of(Number(media.matches)),
|
|
20
|
+
cardNumberTexts,
|
|
21
|
+
expiryTexts,
|
|
22
|
+
cvcTexts,
|
|
23
|
+
])), map(([index, cardNumber, expiry, cvcTexts]) => ({
|
|
24
|
+
cardNumberText: cardNumber[index] ?? '',
|
|
25
|
+
expiryText: expiry[index] ?? '',
|
|
26
|
+
cvcText: cvcTexts[index] ?? '',
|
|
27
|
+
})));
|
|
28
|
+
},
|
|
28
29
|
});
|
|
29
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQtY2FyZC1ncm91cC5wcm92aWRlcnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hZGRvbi1jb21tZXJjZS9jb21wb25lbnRzL2lucHV0LWNhcmQtZ3JvdXAvaW5wdXQtY2FyZC1ncm91cC5wcm92aWRlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLE1BQU0sRUFBRSxjQUFjLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDckQsT0FBTyxFQUFDLFNBQVMsRUFBQyxNQUFNLHFCQUFxQixDQUFDO0FBQzlDLE9BQU8sRUFDSCxrQkFBa0IsRUFDbEIscUJBQXFCLEVBQ3JCLHFCQUFxQixHQUN4QixNQUFNLGlDQUFpQyxDQUFDO0FBQ3pDLE9BQU8sRUFBQyxpQkFBaUIsRUFBQyxNQUFNLDJCQUEyQixDQUFD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pdGgobnVsbCksXG4gICAgICAgICAgICBzd2l0Y2hNYXAoKCkgPT5cbiAgICAgICAgICAgICAgICBjb21iaW5lTGF0ZXN0KFtcbiAgICAgICAgICAgICAgICAgICAgb2YoTnVtYmVyKG1lZGlhLm1hdGNoZXMpKSxcbiAgICAgICAgICAgICAgICAgICAgY2FyZE51bWJlclRleHRzLFxuICAgICAgICAgICAgICAgICAgICBleHBpcnlUZXh0cyxcbiAgICAgICAgICAgICAgICAgICAgY3ZjVGV4dHMsXG4gICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICApLFxuICAgICAgICAgICAgbWFwKChbaW5kZXgsIGNhcmROdW1iZXIsIGV4cGlyeSwgY3ZjVGV4dHNdKSA9PiAoe1xuICAgICAgICAgICAgICAgIGNhcmROdW1iZXJUZXh0OiBjYXJkTnVtYmVyW2luZGV4XSA/PyAnJyxcbiAgICAgICAgICAgICAgICBleHBpcnlUZXh0OiBleHBpcnlbaW5kZXhdID8/ICcnLFxuICAgICAgICAgICAgICAgIGN2Y1RleHQ6IGN2Y1RleHRzW2luZGV4XSA/PyAnJyxcbiAgICAgICAgICAgIH0pKSxcbiAgICAgICAgKTtcbiAgICB9LFxufSk7XG4iXX0=
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { inject } from '@angular/core';
|
|
1
|
+
import { inject, InjectionToken } from '@angular/core';
|
|
2
2
|
import { TUI_PAYMENT_SYSTEM_ICONS } from '@taiga-ui/addon-commerce/tokens';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
})
|
|
9
|
-
|
|
3
|
+
export const TUI_THUMBNAIL_CARD_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_THUMBNAIL_CARD_OPTIONS' : '', {
|
|
4
|
+
factory: () => ({
|
|
5
|
+
icons: inject(TUI_PAYMENT_SYSTEM_ICONS),
|
|
6
|
+
size: 'm',
|
|
7
|
+
monoHandler: (ps) => ps === 'mir' || ps === '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I_DIGIT_REGEXP } from '@taiga-ui/cdk/constants';
|
|
1
|
+
import { CHAR_NO_BREAK_SPACE, TUI_DIGIT_REGEXP } from '@taiga-ui/cdk/constants';
|
|
2
2
|
export const TUI_MASK_CARD = {
|
|
3
3
|
mask: [
|
|
4
4
|
TUI_DIGIT_REGEXP,
|
|
5
5
|
TUI_DIGIT_REGEXP,
|
|
6
6
|
TUI_DIGIT_REGEXP,
|
|
7
7
|
TUI_DIGIT_REGEXP,
|
|
8
|
-
|
|
8
|
+
CHAR_NO_BREAK_SPACE,
|
|
9
9
|
TUI_DIGIT_REGEXP,
|
|
10
10
|
TUI_DIGIT_REGEXP,
|
|
11
11
|
TUI_DIGIT_REGEXP,
|
|
12
12
|
TUI_DIGIT_REGEXP,
|
|
13
|
-
|
|
13
|
+
CHAR_NO_BREAK_SPACE,
|
|
14
14
|
TUI_DIGIT_REGEXP,
|
|
15
15
|
TUI_DIGIT_REGEXP,
|
|
16
16
|
TUI_DIGIT_REGEXP,
|
|
17
17
|
TUI_DIGIT_REGEXP,
|
|
18
|
-
|
|
18
|
+
CHAR_NO_BREAK_SPACE,
|
|
19
19
|
TUI_DIGIT_REGEXP,
|
|
20
20
|
TUI_DIGIT_REGEXP,
|
|
21
21
|
TUI_DIGIT_REGEXP,
|
|
22
22
|
TUI_DIGIT_REGEXP,
|
|
23
|
-
|
|
23
|
+
CHAR_NO_BREAK_SPACE,
|
|
24
24
|
TUI_DIGIT_REGEXP,
|
|
25
25
|
TUI_DIGIT_REGEXP,
|
|
26
26
|
TUI_DIGIT_REGEXP,
|
|
27
27
|
],
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFzay1jYXJkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvYWRkb24tY29tbWVyY2UvY29uc3Rhbn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PX0JSRUFLX1NQQUNFLFxuICAgICAgICBUVUlfRElHSVRfUkVHRVhQLFxuICAgICAgICBUVUlfRElHSVRfUkVHRVhQLFxuICAgICAgICBUVUlfRElHSVRfUkVHRVhQLFxuICAgICAgICBUVUlfRElHSVRfUkVHRVhQLFxuICAgICAgICBDSEFSX05PX0JSRUFLX1NQQUNFLFxuICAgICAgICBUVUlfRElHSVRfUkVHRVhQLFxuICAgICAgICBUVUlfRElHSVRfUkVHRVhQLFxuICAgICAgICBUVUlfRElHSVRfUkVHRVhQLFxuICAgICAgICBUVUlfRElHSVRfUkVHRVhQLFxuICAgICAgICBDSEFSX05PX0JSRUFLX1NQQUNFLFxuICAgICAgICBUVUlfRElHSVRfUkVHRVhQLFxuICAgICAgICBUVUlfRElHSVRfUkVHRVhQLFxuICAgICAgICBUVUlfRElHSVRfUkVHRVhQLFxuICAgICAgICBUVUlfRElHSVRfUkVHRVhQLFxuICAgICAgICBDSEFSX05PX0JSRUFLX1NQQUNFLFxuICAgICAgICBUVUlfRElHSVRfUkVHRVhQLFxuICAgICAgICBUVUlfRElHSVRfUkVHRVhQLFxuICAgICAgICBUVUlfRElHSVRfUkVHRVhQLFxuICAgIF0sXG59O1xuIl19
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { tuiProvideOptions } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
2
3
|
export const TUI_AMOUNT_DEFAULT_OPTIONS = {
|
|
3
4
|
currency: null,
|
|
4
5
|
currencyAlign: 'left',
|
|
5
6
|
sign: 'negative-only',
|
|
6
7
|
};
|
|
7
|
-
export const TUI_AMOUNT_OPTIONS =
|
|
8
|
+
export const TUI_AMOUNT_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_AMOUNT_OPTIONS' : '', {
|
|
9
|
+
factory: () => TUI_AMOUNT_DEFAULT_OPTIONS,
|
|
10
|
+
});
|
|
8
11
|
export function tuiAmountOptionsProvider(options) {
|
|
9
12
|
return tuiProvideOptions(TUI_AMOUNT_OPTIONS, options, TUI_AMOUNT_DEFAULT_OPTIONS);
|
|
10
13
|
}
|
|
11
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW1vdW50Lm9wdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hZGRvbi1jb21tZXJjZS9waXBlcy9hbW91bnQvYW1vdW50Lm9wdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFDLGNBQWMsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUU3QyxPQUFPLEVBQUMsaUJBQWlCLEVBQUMsTUFBTSxtQ0FBbUMsQ0FBQztBQVdwRSxNQUFNLENBQUMsTUFBTSwwQkFBMEIsR0FBcUI7SUFDeEQsUUFBUSxFQUFFLElBQUk7SUFDZCxhQUFhLEVBQUUsTUFBTTtJQUNyQixJQUFJLEVBQUUsZUFBZTtDQUN4QixDQUFDO0FBRUYsTUFBTSxDQUFDLE1BQU0sa0JBQWtCLEdBQUcsSUFBSSxjQUFjLENBQ2hELFNBQVMsQ0FBQyxDQUFDLENBQUMsb0JBQW9CLENBQUMsQ0FBQyxDQUFDLEVBQUUsRUFDckM7SUFDSSxPQUFPLEVBQUUsR0FBRyxFQUFFLENBQUMsMEJBQTBCO0NBQzVDLENBQ0osQ0FBQztBQUVGLE1BQU0sVUFBVSx3QkFBd0IsQ0FBQyxPQUFrQztJQUN2RSxPQUFPLGlCQUFpQixDQUFDLGtCQUFrQixFQUFFLE9BQU8sRUFBRSwwQkFBMEIsQ0FBQyxDQUFDO0FBQ3RGLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7UHJvdmlkZXJ9IGZyb20gJ0Bhbmd1bG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uKTtcblxuZXhwb3J0IGZ1bmN0aW9uIHR1aUFtb3VudE9wdGlvbnNQcm92aWRlcihvcHRpb25zOiBQYXJ0aWFsPFR1aUFtb3VudE9wdGlvbnM+KTogUHJvdmlkZXIge1xuICAgIHJldHVybiB0dWlQcm92aWRlT3B0aW9ucyhUVUlfQU1PVU5UX09QVElPTlMsIG9wdGlvbnMsIFRVSV9BTU9VTlRfREVGQVVMVF9PUFRJT05TKTtcbn1cbiJdfQ==
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Pipe } from '@angular/core';
|
|
2
|
+
import { CHAR_NO_BREAK_SPACE } from '@taiga-ui/cdk/constants';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
class TuiFormatCardPipe {
|
|
4
5
|
transform(value = '', cardPrefilled = false) {
|
|
5
6
|
return value && !cardPrefilled
|
|
6
7
|
? value
|
|
7
8
|
.split('')
|
|
8
|
-
.map((char, index) =>
|
|
9
|
+
.map((char, index) => index && index % 4 === 0 ? `${CHAR_NO_BREAK_SPACE}${char}` : char)
|
|
9
10
|
.join('')
|
|
10
11
|
: '';
|
|
11
12
|
}
|
|
@@ -20,4 +21,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
20
21
|
name: 'tuiFormatCard',
|
|
21
22
|
}]
|
|
22
23
|
}] });
|
|
23
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybWF0LWNhcmQucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FkZG9uLWNvbW1lcmNlL3BpcGVzL2Zvcm1hdC1jYXJkL2Zvcm1hdC1jYXJkLnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFDLElBQUksRU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CBjbGFzcyBUdWlGb3JtYXRDYXJkUGlwZSBpbXBsZW1lbnRzIFBpcGVUcmFuc2Zvcm0ge1xuICAgIHB1YmxpYyB0cmFuc2Zvcm0odmFsdWU6IHN0cmluZyB8IG51bGwgPSAnJywgY2FyZFByZWZpbGxlZCA9IGZhbHNlKTogc3RyaW5nIHtcbiAgICAgICAgcmV0dXJuIHZhbHVlICYmICFjYXJkUHJlZmlsbGVkXG4gICAgICAgICAgICA/IHZhbHVlXG4gICAgICAgICAgICAgICAgICAuc3BsaXQoJycpXG4gICAgICAgICAgICAgICAgICAubWFwKChjaGFyLCBpbmRleCkgPT5cbiAgICAgICAgICAgICAgICAgICAgICBpbmRleCAmJiBpbmRleCAlIDQgPT09IDAgPyBgJHtDSEFSX05PX0JSRUFLX1NQQUNFfSR7Y2hhcn1gIDogY2hhcixcbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgIC5qb2luKCcnKVxuICAgICAgICAgICAgOiAnJztcbiAgICB9XG59XG4iXX0=
|
package/esm2022/tokens/i18n.mjs
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
2
|
import { tuiExtractI18n } from '@taiga-ui/i18n/utils';
|
|
3
3
|
import { of } from 'rxjs';
|
|
4
4
|
/**
|
|
5
5
|
* Number and card number i18n
|
|
6
6
|
*/
|
|
7
|
-
export const TUI_CARD_NUMBER_TEXTS =
|
|
7
|
+
export const TUI_CARD_NUMBER_TEXTS = new InjectionToken(ngDevMode ? 'TUI_CARD_NUMBER_TEXTS' : '', {
|
|
8
|
+
factory: tuiExtractI18n('cardNumber'),
|
|
9
|
+
});
|
|
8
10
|
/**
|
|
9
11
|
* Expiry and card expiry i18n
|
|
10
12
|
*/
|
|
11
|
-
export const TUI_CARD_EXPIRY_TEXTS =
|
|
13
|
+
export const TUI_CARD_EXPIRY_TEXTS = new InjectionToken(ngDevMode ? 'TUI_CARD_EXPIRY_TEXTS' : '', {
|
|
14
|
+
factory: tuiExtractI18n('cardExpiry'),
|
|
15
|
+
});
|
|
12
16
|
/**
|
|
13
17
|
* Card CVC number text [mobile, desktop]
|
|
14
18
|
*/
|
|
15
|
-
export const TUI_CARD_CVC_TEXTS =
|
|
16
|
-
|
|
19
|
+
export const TUI_CARD_CVC_TEXTS = new InjectionToken(ngDevMode ? 'TUI_CARD_CVC_TEXTS' : '', {
|
|
20
|
+
factory: () => of(['CVC', 'CVC/CVV']),
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaTE4bi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2FkZG9uLWNvbW1lcmNlL3Rva2Vucy9pMThuLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxjQUFjLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDN0MsT0FBTyxFQUFDLGNBQWMsRUFBQyxNQUFNLHNCQUFzQixDQUFDO0FBRXBELE9BQU8sRUFBQyxFQUFFLEVBQUMsTUFBTSxNQUFNLENBQUM7QUFFeEI7O0dBRUc7QUFDSCxNQUFNLENBQUMsTUFBTSxxQkFBcUIsR0FBRyxJQUFJLGNBQWMsQ0FDbkQsU0FBUyxDQUFDLENBQUMsQ0FBQyx1QkFBdUIsQ0FBQyxDQUFDLENBQUMsRUFBRSxFQUN4QztJQUNJLE9BQU8sRUFBRSxjQUFjLENBQUMsWUFBWSxDQUFDO0NBQ3hDLENBQ0osQ0FBQztBQUVGOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0scUJBQXFCLEdBQUcsSUFBSSxjQUFjLENBQ25ELFNBQVMsQ0FBQyxDQUFDLENBQUMsdUJBQXVCLENBQUMsQ0FBQyxDQUFDLEVBQUUsRUFDeEM7SUFDSSxPQUFPLEVBQUUsY0FB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EV4cGlyeScpLFxuICAgIH0sXG4pO1xuXG4vKipcbiAqIENhcmQgQ1ZDIG51bWJlciB0ZXh0IFttb2JpbGUsIGRlc2t0b3BdXG4gKi9cbmV4cG9ydCBjb25zdCBUVUlfQ0FSRF9DVkNfVEVYVFMgPSBuZXcgSW5qZWN0aW9uVG9rZW48T2JzZXJ2YWJsZTxbc3RyaW5nLCBzdHJpbmddPj4oXG4gICAgbmdEZXZNb2RlID8gJ1RVSV9DQVJEX0NWQ19URVhUUycgOiAnJyxcbiAgICB7XG4gICAgICAgIGZhY3Rvcnk6ICgpID0+IG9mKFsnQ1ZDJywgJ0NWQy9DVlYnXSksXG4gICAgfSxcbik7XG4iXX0=
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export const TUI_PAYMENT_SYSTEM_ICONS =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
export const TUI_PAYMENT_SYSTEM_ICONS = new InjectionToken(ngDevMode ? 'TUI_PAYMENT_SYSTEM_ICONS' : '', {
|
|
3
|
+
factory: () => ({
|
|
4
|
+
mir: '@tui.mir',
|
|
5
|
+
visa: '@tui.visa',
|
|
6
|
+
electron: '@tui.electron',
|
|
7
|
+
mastercard: '@tui.mastercard',
|
|
8
|
+
maestro: '@tui.maestro',
|
|
9
|
+
amex: '@tui.amex',
|
|
10
|
+
dinersclub: '@tui.diners-club',
|
|
11
|
+
discover: '@tui.discover',
|
|
12
|
+
humo: '@tui.humo',
|
|
13
|
+
jcb: '@tui.jcb',
|
|
14
|
+
rupay: '@tui.ru-pay',
|
|
15
|
+
unionpay: '@tui.union-pay',
|
|
16
|
+
uzcard: '@tui.uzcard',
|
|
17
|
+
verve: '@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ndWxhci9jb3JlJztcbmltcG9ydCB0eXBlIHtUdWlQYXltZW50U3lzdGVtfSBmcm9tICdAdGFpZ2EtdWkvYWRkb24tY29tbWVyY2UvdHlwZXMnO1xuXG5leHBvcnQgY29uc3QgVFVJX1BBWU1FTlRfU1lTVEVNX0lDT05TID0gbmV3IEluamVjdGlvblRva2VuPFxuICAgIFJlY29yZDxUdWlQYXltZW50U3lzdGVtLCBzdHJpbmc+XG4+KG5nRGV2TW9kZSA/ICdUVUlfUEFZTUVOVF9TWVNURU1fSUNPTlMnIDogJycsIHtcbiAgICBmYWN0b3J5OiAoKSA9PiAoe1xuICAgICAgICBtaXI6ICdAdHVpLm1pcicsXG4gICAgICAgIHZpc2E6ICdAdHVpLnZpc2EnLFxuICAgICAgICBlbGVjdHJvbjogJ0B0dWkuZWxlY3Ryb24nLFxuICAgICAgICBtYXN0ZXJjYXJkOiAnQHR1aS5tYXN0ZXJjYXJkJyxcbiAgICAgICAgbWFlc3RybzogJ0B0dWkubWFlc3RybycsXG4gICAgICAgIGFtZXg6ICdAdHVpLmFtZXgnLFxuICAgICAgICBkaW5lcnNjbHViOiAnQHR1aS5kaW5lcnMtY2x1YicsXG4gICAgICAgIGRpc2NvdmVyOiAnQHR1aS5kaXNjb3ZlcicsXG4gICAgICAgIGh1bW86ICdAdHVpLmh1bW8nLFxuICAgICAgICBqY2I6ICdAdHVpLmpjYicsXG4gICAgICAgIHJ1cGF5OiAnQHR1aS5ydS1wYXknLFxuICAgICAgICB1bmlvbnBheTogJ0B0dWkudW5pb24tcGF5JyxcbiAgICAgICAgdXpjYXJkOiAnQHR1aS51emNhcmQnLFxuICAgICAgICB2ZXJ2ZTogJ0B0dWkudmVydmUnLFxuICAgIH0pLFxufSk7XG4iXX0=
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import { DOCUMENT, isPlatformServer, NgIf } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { inject, PLATFORM_ID, computed, EventEmitter, Component, ChangeDetectionStrategy, ViewChild, Input, Output } from '@angular/core';
|
|
4
|
+
import { InjectionToken, inject, PLATFORM_ID, computed, EventEmitter, Component, ChangeDetectionStrategy, ViewChild, Input, Output } from '@angular/core';
|
|
5
5
|
import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
6
|
import * as i4 from '@angular/forms';
|
|
7
7
|
import { FormsModule } from '@angular/forms';
|
|
@@ -11,7 +11,7 @@ import { tuiDefaultCardValidator, TUI_MASK_CVC, TUI_MASK_CARD, TUI_MASK_EXPIRE }
|
|
|
11
11
|
import { TuiFormatCardPipe } from '@taiga-ui/addon-commerce/pipes';
|
|
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
13
|
import { TuiControl, tuiAsControl } from '@taiga-ui/cdk/classes';
|
|
14
|
-
import { TUI_NON_DIGIT_REGEXP } from '@taiga-ui/cdk/constants';
|
|
14
|
+
import { TUI_NON_DIGIT_REGEXP, CHAR_NO_BREAK_SPACE } from '@taiga-ui/cdk/constants';
|
|
15
15
|
import { tuiHovered, TuiHoveredService } from '@taiga-ui/cdk/directives/hovered';
|
|
16
16
|
import { TuiLet } from '@taiga-ui/cdk/directives/let';
|
|
17
17
|
import { tuiTypedFromEvent } from '@taiga-ui/cdk/observables';
|
|
@@ -20,7 +20,7 @@ import { tuiInjectId } from '@taiga-ui/cdk/services';
|
|
|
20
20
|
import { TUI_IS_MOBILE, TUI_IS_WEBKIT } from '@taiga-ui/cdk/tokens';
|
|
21
21
|
import { tuiInjectElement, tuiIsElement, tuiIsInput } from '@taiga-ui/cdk/utils/dom';
|
|
22
22
|
import { tuiIsNativeFocusedIn, tuiIsNativeFocused } from '@taiga-ui/cdk/utils/focus';
|
|
23
|
-
import {
|
|
23
|
+
import { tuiProvideOptions, tuiPure } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
24
24
|
import { tuiAsDataListHost } from '@taiga-ui/core/components/data-list';
|
|
25
25
|
import { TuiIcon, TuiIconPipe } from '@taiga-ui/core/components/icon';
|
|
26
26
|
import * as i3 from '@taiga-ui/core/components/textfield';
|
|
@@ -44,7 +44,9 @@ const TUI_INPUT_CARD_GROUP_DEFAULT_OPTIONS = {
|
|
|
44
44
|
cvcHidden: true,
|
|
45
45
|
inputs: { cvc: true, expire: true },
|
|
46
46
|
};
|
|
47
|
-
const TUI_INPUT_CARD_GROUP_OPTIONS =
|
|
47
|
+
const TUI_INPUT_CARD_GROUP_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_INPUT_CARD_GROUP_OPTIONS' : '', {
|
|
48
|
+
factory: () => TUI_INPUT_CARD_GROUP_DEFAULT_OPTIONS,
|
|
49
|
+
});
|
|
48
50
|
function tuiInputCardGroupOptionsProvider(options) {
|
|
49
51
|
return tuiProvideOptions(TUI_INPUT_CARD_GROUP_OPTIONS, options, TUI_INPUT_CARD_GROUP_DEFAULT_OPTIONS);
|
|
50
52
|
}
|
|
@@ -52,23 +54,25 @@ function tuiInputCardGroupOptionsProvider(options) {
|
|
|
52
54
|
/**
|
|
53
55
|
* InputCardGroup texts
|
|
54
56
|
*/
|
|
55
|
-
const TUI_INPUT_CARD_GROUP_TEXTS =
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
57
|
+
const TUI_INPUT_CARD_GROUP_TEXTS = new InjectionToken(ngDevMode ? 'TUI_INPUT_CARD_GROUP_TEXTS' : '', {
|
|
58
|
+
factory: () => {
|
|
59
|
+
const win = inject(WA_WINDOW);
|
|
60
|
+
const cardNumberTexts = inject(TUI_CARD_NUMBER_TEXTS);
|
|
61
|
+
const expiryTexts = inject(TUI_CARD_EXPIRY_TEXTS);
|
|
62
|
+
const cvcTexts = inject(TUI_CARD_CVC_TEXTS);
|
|
63
|
+
const { desktopSmall } = inject(TUI_MEDIA);
|
|
64
|
+
const media = win.matchMedia(`screen and (min-width: ${(desktopSmall - 1) / 16}em)`);
|
|
65
|
+
return tuiTypedFromEvent(media, 'change').pipe(startWith(null), switchMap(() => combineLatest([
|
|
66
|
+
of(Number(media.matches)),
|
|
67
|
+
cardNumberTexts,
|
|
68
|
+
expiryTexts,
|
|
69
|
+
cvcTexts,
|
|
70
|
+
])), map(([index, cardNumber, expiry, cvcTexts]) => ({
|
|
71
|
+
cardNumberText: cardNumber[index] ?? '',
|
|
72
|
+
expiryText: expiry[index] ?? '',
|
|
73
|
+
cvcText: cvcTexts[index] ?? '',
|
|
74
|
+
})));
|
|
75
|
+
},
|
|
72
76
|
});
|
|
73
77
|
|
|
74
78
|
class TuiInputCardGroup extends TuiControl {
|
|
@@ -226,11 +230,11 @@ class TuiInputCardGroup extends TuiControl {
|
|
|
226
230
|
return this.isFocusable(this.card);
|
|
227
231
|
}
|
|
228
232
|
get masked() {
|
|
229
|
-
return this.cardPrefilled ?
|
|
233
|
+
return this.cardPrefilled ? `${this.card.slice(-4)}` : '';
|
|
230
234
|
}
|
|
231
235
|
onCardChange(card) {
|
|
232
236
|
const { value, bin } = this;
|
|
233
|
-
const parsed = card.split(
|
|
237
|
+
const parsed = card.split(CHAR_NO_BREAK_SPACE).join('');
|
|
234
238
|
if (value()?.card === parsed) {
|
|
235
239
|
return;
|
|
236
240
|
}
|
|
@@ -252,10 +256,12 @@ class TuiInputCardGroup extends TuiControl {
|
|
|
252
256
|
onCVCChange(cvc) {
|
|
253
257
|
this.updateProperty(cvc, 'cvc');
|
|
254
258
|
}
|
|
255
|
-
|
|
256
|
-
return this.cardCollapsed
|
|
259
|
+
getStyle({ offsetWidth }) {
|
|
260
|
+
return this.cardCollapsed
|
|
261
|
+
? `transform: translate3d(calc(${offsetWidth}px * var(--t-inline)), 0, 0); clip-path: inset(0 0 0 calc(100% - ${offsetWidth}px));`
|
|
262
|
+
: '';
|
|
257
263
|
}
|
|
258
|
-
|
|
264
|
+
onPointerDown(event) {
|
|
259
265
|
if (tuiIsElement(event.target) && tuiIsInput(event.target)) {
|
|
260
266
|
return;
|
|
261
267
|
}
|
|
@@ -263,7 +269,7 @@ class TuiInputCardGroup extends TuiControl {
|
|
|
263
269
|
this.focusInput();
|
|
264
270
|
}
|
|
265
271
|
toggle() {
|
|
266
|
-
this.open.
|
|
272
|
+
this.open.update((open) => !open);
|
|
267
273
|
}
|
|
268
274
|
isFocusable(card) {
|
|
269
275
|
return this.cardValidator(card) || this.cardPrefilled;
|
|
@@ -290,12 +296,12 @@ class TuiInputCardGroup extends TuiControl {
|
|
|
290
296
|
element?.focus();
|
|
291
297
|
}
|
|
292
298
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiInputCardGroup, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
293
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiInputCardGroup, isStandalone: true, selector: "tui-input-card-group", inputs: { exampleText: "exampleText", placeholder: "placeholder", inputs: "inputs", cardValidator: "cardValidator", icon: "icon", id: "id", autocomplete: "autocomplete", codeLength: "codeLength" }, outputs: { binChange: "binChange" }, host: { attributes: { "data-size": "l" }, listeners: { "
|
|
299
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiInputCardGroup, isStandalone: true, selector: "tui-input-card-group", inputs: { exampleText: "exampleText", placeholder: "placeholder", inputs: "inputs", cardValidator: "cardValidator", icon: "icon", id: "id", autocomplete: "autocomplete", codeLength: "codeLength" }, outputs: { binChange: "binChange" }, host: { attributes: { "data-size": "l" }, listeners: { "pointerdown": "onPointerDown($event)", "scroll.zoneless": "$event.target.scrollLeft = 0" }, properties: { "style.--tui-duration.s": "0" } }, providers: [
|
|
294
300
|
tuiAsDataListHost(TuiInputCardGroup),
|
|
295
301
|
tuiAsControl(TuiInputCardGroup),
|
|
296
302
|
tuiDropdownOptionsProvider({ limitWidth: 'fixed' }),
|
|
297
303
|
TuiHoveredService,
|
|
298
|
-
], 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.transform]=\"transform(ghost)\"\n >\n {{ formattedCard }}\n </span>\n </span>\n </span>\n <div\n class=\"t-label\"\n [class.t-label_raised]=\"labelRaised()\"\n >\n {{ texts()?.cardNumberText }}\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(var(--t-translate),0,0)}to{transform:translate3d(100%,0,0)}}@keyframes inside{0%{transform:translate3d(100%,0,0)}to{transform:translate3d(var(--t-translate),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_enable-mask:before{content:attr(data-before)}.t-collapsed_enable-mask .t-collapsed-wrapper{left:1.375rem}.t-collapsed-wrapper{position:absolute;top:0;display:block;inline-size:100%;block-size:100%;overflow:hidden}.t-value{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;bottom:0;right:100%;display:block;transform:translate3d(100%,0,0)}.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)}.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:-62.4375rem;top:-62.4375rem;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}.t-icon-outlet{display:flex;margin-right:.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)}input:-webkit-autofill~.t-label,.t-label_raised{font-size:.8156rem;transform:translateY(-.7em)}: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 }); }
|
|
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(--t-inline)),0,0)}to{transform:translate3d(calc(100% * var(--t-inline)),0,0)}}@keyframes inside{0%{transform:translate3d(calc(100% * var(--t-inline)),0,0)}to{transform:translate3d(calc(var(--t-translate) * var(--t-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(--t-inline)),0,0)}:host-context([dir=\"rtl\"]) .t-value{right:unset;left:100%;transform:translate3d(calc(100% * var(--t-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 }); }
|
|
299
305
|
}
|
|
300
306
|
__decorate([
|
|
301
307
|
tuiPure
|
|
@@ -331,9 +337,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
331
337
|
], host: {
|
|
332
338
|
'data-size': 'l',
|
|
333
339
|
'[style.--tui-duration.s]': '0',
|
|
334
|
-
'(
|
|
340
|
+
'(pointerdown)': 'onPointerDown($event)',
|
|
335
341
|
'(scroll.zoneless)': '$event.target.scrollLeft = 0',
|
|
336
|
-
}, 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
|
|
342
|
+
}, 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(--t-inline)),0,0)}to{transform:translate3d(calc(100% * var(--t-inline)),0,0)}}@keyframes inside{0%{transform:translate3d(calc(100% * var(--t-inline)),0,0)}to{transform:translate3d(calc(var(--t-translate) * var(--t-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(--t-inline)),0,0)}:host-context([dir=\"rtl\"]) .t-value{right:unset;left:100%;transform:translate3d(calc(100% * var(--t-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"] }]
|
|
337
343
|
}], propDecorators: { inputCard: [{
|
|
338
344
|
type: ViewChild,
|
|
339
345
|
args: ['inputCard', { static: true }]
|