@ptsecurity/mosaic 13.1.1 → 13.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/_theming.scss +321 -121
  2. package/_visual.scss +79 -26
  3. package/design-tokens/legacy-2017/tokens/components/badge.json5 +28 -38
  4. package/design-tokens/legacy-2017/tokens/components/dl.json5 +38 -0
  5. package/design-tokens/legacy-2017/tokens/components/form-field.json5 +39 -0
  6. package/design-tokens/legacy-2017/tokens/components/tabs.json5 +80 -4
  7. package/design-tokens/legacy-2017/tokens/properties/colors.json5 +4 -0
  8. package/design-tokens/legacy-2017/tokens/properties/globals.json5 +20 -1
  9. package/design-tokens/legacy-2017/tokens.d.ts +79 -26
  10. package/design-tokens/pt-2022/tokens/components/badge.json5 +30 -40
  11. package/design-tokens/pt-2022/tokens/components/dl.json5 +38 -0
  12. package/design-tokens/pt-2022/tokens/components/form-field.json5 +40 -1
  13. package/design-tokens/pt-2022/tokens/components/tabs.json5 +82 -6
  14. package/design-tokens/pt-2022/tokens/properties/colors.json5 +4 -0
  15. package/design-tokens/pt-2022/tokens/properties/globals.json5 +20 -1
  16. package/design-tokens/pt-2022/tokens.d.ts +79 -26
  17. package/dl/README.md +0 -0
  18. package/dl/dl.component.d.ts +26 -0
  19. package/dl/dl.module.d.ts +10 -0
  20. package/dl/index.d.ts +1 -0
  21. package/dl/package.json +10 -0
  22. package/dl/ptsecurity-mosaic-dl.d.ts +5 -0
  23. package/dl/public-api.d.ts +2 -0
  24. package/esm2020/design-tokens/legacy-2017/tokens.mjs +80 -27
  25. package/esm2020/design-tokens/pt-2022/tokens.mjs +80 -27
  26. package/esm2020/dl/dl.component.mjs +78 -0
  27. package/esm2020/dl/dl.module.mjs +42 -0
  28. package/esm2020/dl/index.mjs +2 -0
  29. package/esm2020/dl/ptsecurity-mosaic-dl.mjs +5 -0
  30. package/esm2020/dl/public-api.mjs +3 -0
  31. package/esm2020/form-field/form-field.mjs +44 -24
  32. package/esm2020/form-field/form-field.module.mjs +6 -1
  33. package/esm2020/form-field/hint.mjs +3 -3
  34. package/esm2020/form-field/password-hint.mjs +115 -0
  35. package/esm2020/form-field/public-api.mjs +2 -1
  36. package/esm2020/input/input-password.mjs +367 -0
  37. package/esm2020/input/input.module.mjs +48 -6
  38. package/esm2020/input/public-api.mjs +2 -1
  39. package/esm2020/sidepanel/sidepanel-directives.mjs +3 -3
  40. package/esm2020/tabs/tab-group.component.mjs +3 -3
  41. package/esm2020/tabs/tab-header.component.mjs +2 -2
  42. package/esm2020/tabs/tab-nav-bar/tab-nav-bar.mjs +5 -5
  43. package/fesm2015/ptsecurity-mosaic-design-tokens.mjs +238 -79
  44. package/fesm2015/ptsecurity-mosaic-design-tokens.mjs.map +1 -1
  45. package/fesm2015/ptsecurity-mosaic-dl.mjs +124 -0
  46. package/fesm2015/ptsecurity-mosaic-dl.mjs.map +1 -0
  47. package/fesm2015/ptsecurity-mosaic-form-field.mjs +169 -27
  48. package/fesm2015/ptsecurity-mosaic-form-field.mjs.map +1 -1
  49. package/fesm2015/ptsecurity-mosaic-input.mjs +412 -11
  50. package/fesm2015/ptsecurity-mosaic-input.mjs.map +1 -1
  51. package/fesm2015/ptsecurity-mosaic-sidepanel.mjs +2 -2
  52. package/fesm2015/ptsecurity-mosaic-sidepanel.mjs.map +1 -1
  53. package/fesm2015/ptsecurity-mosaic-tabs.mjs +8 -8
  54. package/fesm2015/ptsecurity-mosaic-tabs.mjs.map +1 -1
  55. package/fesm2020/ptsecurity-mosaic-design-tokens.mjs +238 -79
  56. package/fesm2020/ptsecurity-mosaic-design-tokens.mjs.map +1 -1
  57. package/fesm2020/ptsecurity-mosaic-dl.mjs +124 -0
  58. package/fesm2020/ptsecurity-mosaic-dl.mjs.map +1 -0
  59. package/fesm2020/ptsecurity-mosaic-form-field.mjs +158 -27
  60. package/fesm2020/ptsecurity-mosaic-form-field.mjs.map +1 -1
  61. package/fesm2020/ptsecurity-mosaic-input.mjs +405 -11
  62. package/fesm2020/ptsecurity-mosaic-input.mjs.map +1 -1
  63. package/fesm2020/ptsecurity-mosaic-sidepanel.mjs +2 -2
  64. package/fesm2020/ptsecurity-mosaic-sidepanel.mjs.map +1 -1
  65. package/fesm2020/ptsecurity-mosaic-tabs.mjs +8 -8
  66. package/fesm2020/ptsecurity-mosaic-tabs.mjs.map +1 -1
  67. package/form-field/form-field.d.ts +9 -2
  68. package/form-field/form-field.module.d.ts +8 -7
  69. package/form-field/password-hint.d.ts +38 -0
  70. package/form-field/public-api.d.ts +1 -0
  71. package/input/input-password.d.ts +120 -0
  72. package/input/input.module.d.ts +7 -6
  73. package/input/public-api.d.ts +1 -0
  74. package/package.json +12 -4
  75. package/prebuilt-themes/dark-theme.css +1 -1
  76. package/prebuilt-themes/default-theme.css +1 -1
@@ -0,0 +1,124 @@
1
+ import { A11yModule } from '@angular/cdk/a11y';
2
+ import { PlatformModule } from '@angular/cdk/platform';
3
+ import { CommonModule } from '@angular/common';
4
+ import * as i0 from '@angular/core';
5
+ import { Component, ViewEncapsulation, Input, NgModule } from '@angular/core';
6
+ import { Subject, Subscription } from 'rxjs';
7
+ import { debounceTime } from 'rxjs/operators';
8
+
9
+ class McDlComponent {
10
+ constructor(elementRef) {
11
+ this.elementRef = elementRef;
12
+ this.minWidth = 400;
13
+ this.wide = false;
14
+ this.vertical = null;
15
+ this.resizeStream = new Subject();
16
+ this.resizeDebounceInterval = 100;
17
+ this.resizeSubscription = Subscription.EMPTY;
18
+ this.updateState = () => {
19
+ const { width } = this.elementRef.nativeElement.getClientRects()[0];
20
+ this.vertical = width <= this.minWidth;
21
+ };
22
+ }
23
+ ngAfterContentInit() {
24
+ if (this.vertical !== null) {
25
+ return;
26
+ }
27
+ this.resizeSubscription = this.resizeStream
28
+ .pipe(debounceTime(this.resizeDebounceInterval))
29
+ .subscribe(this.updateState);
30
+ }
31
+ ngOnDestroy() {
32
+ this.resizeSubscription.unsubscribe();
33
+ }
34
+ }
35
+ /** @nocollapse */ /** @nocollapse */ McDlComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McDlComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
36
+ /** @nocollapse */ /** @nocollapse */ McDlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: McDlComponent, selector: "mc-dl", inputs: { minWidth: "minWidth", wide: "wide", vertical: "vertical" }, host: { listeners: { "window:resize": "resizeStream.next()" }, properties: { "class.mc-dl_vertical": "vertical", "class.mc-dl_wide": "wide" }, classAttribute: "mc-dl" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [".mc-dl{display:grid;grid-column-gap:var(--mc-description-list-size-horizontal-column-gap, 16px);column-gap:var(--mc-description-list-size-horizontal-column-gap, 16px);grid-row-gap:var(--mc-description-list-size-horizontal-row-gap, 12px);row-gap:var(--mc-description-list-size-horizontal-row-gap, 12px);grid-template-columns:repeat(4,1fr)}.mc-dl .mc-dt{grid-column:var(--mc-description-list-size-dt-grid-column, 1)}.mc-dl .mc-dd{grid-column:var(--mc-description-list-size-dd-grid-column, 2/span 3)}.mc-dl.mc-dl_wide{grid-template-columns:repeat(2,1fr)}.mc-dl.mc-dl_wide .mc-dt{grid-column:1}.mc-dl.mc-dl_wide .mc-dd{grid-column:2}.mc-dl.mc-dl_vertical{grid-template-columns:repeat(1,1fr);column-gap:var(--mc-description-list-size-vertical-column-gap, 0);row-gap:var(--mc-description-list-size-vertical-row-gap, 2px)}.mc-dl.mc-dl_vertical .mc-dt,.mc-dl.mc-dl_vertical .mc-dd{grid-column:1}.mc-dl.mc-dl_vertical .mc-dd{margin-bottom:var(--mc-description-list-size-vertical-dd-margin-bottom, 16px)}\n"], encapsulation: i0.ViewEncapsulation.None });
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McDlComponent, decorators: [{
38
+ type: Component,
39
+ args: [{ selector: 'mc-dl', template: '<ng-content></ng-content>', host: {
40
+ class: 'mc-dl',
41
+ '[class.mc-dl_vertical]': 'vertical',
42
+ '[class.mc-dl_wide]': 'wide',
43
+ '(window:resize)': 'resizeStream.next()'
44
+ }, encapsulation: ViewEncapsulation.None, styles: [".mc-dl{display:grid;grid-column-gap:var(--mc-description-list-size-horizontal-column-gap, 16px);column-gap:var(--mc-description-list-size-horizontal-column-gap, 16px);grid-row-gap:var(--mc-description-list-size-horizontal-row-gap, 12px);row-gap:var(--mc-description-list-size-horizontal-row-gap, 12px);grid-template-columns:repeat(4,1fr)}.mc-dl .mc-dt{grid-column:var(--mc-description-list-size-dt-grid-column, 1)}.mc-dl .mc-dd{grid-column:var(--mc-description-list-size-dd-grid-column, 2/span 3)}.mc-dl.mc-dl_wide{grid-template-columns:repeat(2,1fr)}.mc-dl.mc-dl_wide .mc-dt{grid-column:1}.mc-dl.mc-dl_wide .mc-dd{grid-column:2}.mc-dl.mc-dl_vertical{grid-template-columns:repeat(1,1fr);column-gap:var(--mc-description-list-size-vertical-column-gap, 0);row-gap:var(--mc-description-list-size-vertical-row-gap, 2px)}.mc-dl.mc-dl_vertical .mc-dt,.mc-dl.mc-dl_vertical .mc-dd{grid-column:1}.mc-dl.mc-dl_vertical .mc-dd{margin-bottom:var(--mc-description-list-size-vertical-dd-margin-bottom, 16px)}\n"] }]
45
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { minWidth: [{
46
+ type: Input
47
+ }], wide: [{
48
+ type: Input
49
+ }], vertical: [{
50
+ type: Input
51
+ }] } });
52
+ class McDtComponent {
53
+ }
54
+ /** @nocollapse */ /** @nocollapse */ McDtComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McDtComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
55
+ /** @nocollapse */ /** @nocollapse */ McDtComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: McDtComponent, selector: "mc-dt", host: { classAttribute: "mc-dt" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, encapsulation: i0.ViewEncapsulation.None });
56
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McDtComponent, decorators: [{
57
+ type: Component,
58
+ args: [{
59
+ selector: 'mc-dt',
60
+ template: '<ng-content></ng-content>',
61
+ host: {
62
+ class: 'mc-dt'
63
+ },
64
+ encapsulation: ViewEncapsulation.None
65
+ }]
66
+ }] });
67
+ class McDdComponent {
68
+ }
69
+ /** @nocollapse */ /** @nocollapse */ McDdComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McDdComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
70
+ /** @nocollapse */ /** @nocollapse */ McDdComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: McDdComponent, selector: "mc-dd", host: { classAttribute: "mc-dd" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, encapsulation: i0.ViewEncapsulation.None });
71
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McDdComponent, decorators: [{
72
+ type: Component,
73
+ args: [{
74
+ selector: 'mc-dd',
75
+ template: '<ng-content></ng-content>',
76
+ host: {
77
+ class: 'mc-dd'
78
+ },
79
+ encapsulation: ViewEncapsulation.None
80
+ }]
81
+ }] });
82
+
83
+ class McDlModule {
84
+ }
85
+ /** @nocollapse */ /** @nocollapse */ McDlModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McDlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
86
+ /** @nocollapse */ /** @nocollapse */ McDlModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McDlModule, declarations: [McDlComponent,
87
+ McDtComponent,
88
+ McDdComponent], imports: [CommonModule,
89
+ A11yModule,
90
+ PlatformModule], exports: [McDlComponent,
91
+ McDtComponent,
92
+ McDdComponent] });
93
+ /** @nocollapse */ /** @nocollapse */ McDlModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McDlModule, imports: [[
94
+ CommonModule,
95
+ A11yModule,
96
+ PlatformModule
97
+ ]] });
98
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McDlModule, decorators: [{
99
+ type: NgModule,
100
+ args: [{
101
+ imports: [
102
+ CommonModule,
103
+ A11yModule,
104
+ PlatformModule
105
+ ],
106
+ exports: [
107
+ McDlComponent,
108
+ McDtComponent,
109
+ McDdComponent
110
+ ],
111
+ declarations: [
112
+ McDlComponent,
113
+ McDtComponent,
114
+ McDdComponent
115
+ ]
116
+ }]
117
+ }] });
118
+
119
+ /**
120
+ * Generated bundle index. Do not edit.
121
+ */
122
+
123
+ export { McDdComponent, McDlComponent, McDlModule, McDtComponent };
124
+ //# sourceMappingURL=ptsecurity-mosaic-dl.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ptsecurity-mosaic-dl.mjs","sources":["../../../packages/mosaic/dl/dl.component.ts","../../../packages/mosaic/dl/dl.module.ts","../../../packages/mosaic/dl/ptsecurity-mosaic-dl.ts"],"sourcesContent":["import {\n AfterContentInit,\n Component,\n ElementRef,\n Input,\n OnDestroy,\n ViewEncapsulation\n} from '@angular/core';\nimport { Subject, Subscription } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\n\n\n@Component({\n selector: 'mc-dl',\n template: '<ng-content></ng-content>',\n styleUrls: ['dl.scss'],\n host: {\n class: 'mc-dl',\n '[class.mc-dl_vertical]': 'vertical',\n '[class.mc-dl_wide]': 'wide',\n '(window:resize)': 'resizeStream.next()'\n },\n encapsulation: ViewEncapsulation.None\n})\nexport class McDlComponent implements AfterContentInit, OnDestroy {\n @Input() minWidth: number = 400;\n @Input() wide = false;\n @Input() vertical: boolean | null = null;\n\n readonly resizeStream = new Subject<Event>();\n private readonly resizeDebounceInterval: number = 100;\n\n private resizeSubscription = Subscription.EMPTY;\n\n\n constructor(protected elementRef: ElementRef) {}\n\n ngAfterContentInit(): void {\n if (this.vertical !== null) { return; }\n\n this.resizeSubscription = this.resizeStream\n .pipe(debounceTime(this.resizeDebounceInterval))\n .subscribe(this.updateState);\n }\n\n ngOnDestroy() {\n this.resizeSubscription.unsubscribe();\n }\n\n updateState = () => {\n const { width } = this.elementRef.nativeElement.getClientRects()[0];\n\n this.vertical = width <= this.minWidth;\n }\n}\n\n@Component({\n selector: 'mc-dt',\n template: '<ng-content></ng-content>',\n host: {\n class: 'mc-dt'\n },\n encapsulation: ViewEncapsulation.None\n})\nexport class McDtComponent {}\n\n@Component({\n selector: 'mc-dd',\n template: '<ng-content></ng-content>',\n host: {\n class: 'mc-dd'\n },\n encapsulation: ViewEncapsulation.None\n})\nexport class McDdComponent {}\n","import { A11yModule } from '@angular/cdk/a11y';\nimport { PlatformModule } from '@angular/cdk/platform';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport {\n McDlComponent,\n McDtComponent,\n McDdComponent\n} from './dl.component';\n\n\n@NgModule({\n imports: [\n CommonModule,\n A11yModule,\n PlatformModule\n ],\n exports: [\n McDlComponent,\n McDtComponent,\n McDdComponent\n ],\n declarations: [\n McDlComponent,\n McDtComponent,\n McDdComponent\n ]\n})\nexport class McDlModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAwBa,aAAa,CAAA;AAWtB,IAAA,WAAA,CAAsB,UAAsB,EAAA;QAAtB,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;QAVnC,IAAQ,CAAA,QAAA,GAAW,GAAG,CAAC;QACvB,IAAI,CAAA,IAAA,GAAG,KAAK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Q,UAAU,EAAA,UAAA,EAAA,CAAA;kBAjBtB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,UAAU;wBACV,cAAc;AACjB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,aAAa;wBACb,aAAa;wBACb,aAAa;AAChB,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACV,aAAa;wBACb,aAAa;wBACb,aAAa;AAChB,qBAAA;AACJ,iBAAA,CAAA;;;AC5BD;;AAEG;;;;"}
@@ -1,11 +1,12 @@
1
- import * as i1$1 from '@angular/common';
1
+ import * as i3 from '@angular/common';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { Component, Directive, Input, EventEmitter, Output, ViewEncapsulation, ChangeDetectionStrategy, ContentChild, ContentChildren, ViewChild, NgModule } from '@angular/core';
4
+ import { Component, Directive, Input, ChangeDetectionStrategy, EventEmitter, Output, ViewEncapsulation, ContentChild, ContentChildren, ViewChild, NgModule } from '@angular/core';
5
5
  import * as i1 from '@ptsecurity/mosaic/icon';
6
6
  import { McIconModule } from '@ptsecurity/mosaic/icon';
7
7
  import { ThemePalette, mixinColor } from '@ptsecurity/mosaic/core';
8
- import { ESCAPE } from '@ptsecurity/cdk/keycodes';
8
+ import * as i1$1 from '@angular/cdk/a11y';
9
+ import { F8, ESCAPE } from '@ptsecurity/cdk/keycodes';
9
10
  import { Subject, EMPTY, merge } from 'rxjs';
10
11
  import { startWith, takeUntil } from 'rxjs/operators';
11
12
 
@@ -40,10 +41,10 @@ function getMcFormFieldYouCanNotUseCleanerInNumberInputError() {
40
41
  return Error(`You can't use mc-cleaner with input that have type="number"`);
41
42
  }
42
43
 
43
- let nextUniqueId$1 = 0;
44
+ let nextHintUniqueId = 0;
44
45
  class McHint {
45
46
  constructor() {
46
- this.id = `mc-hint-${nextUniqueId$1++}`;
47
+ this.id = `mc-hint-${nextHintUniqueId++}`;
47
48
  }
48
49
  }
49
50
  /** @nocollapse */ /** @nocollapse */ McHint.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McHint, deps: [], target: i0.ɵɵFactoryTarget.Directive });
@@ -61,6 +62,115 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
61
62
  type: Input
62
63
  }] } });
63
64
 
65
+ let nextPasswordHintUniqueId = 0;
66
+ var PasswordRules;
67
+ (function (PasswordRules) {
68
+ PasswordRules[PasswordRules["Length"] = 0] = "Length";
69
+ PasswordRules[PasswordRules["UpperLatin"] = 1] = "UpperLatin";
70
+ PasswordRules[PasswordRules["LowerLatin"] = 2] = "LowerLatin";
71
+ PasswordRules[PasswordRules["Digit"] = 3] = "Digit";
72
+ PasswordRules[PasswordRules["SpecialSymbols"] = 4] = "SpecialSymbols";
73
+ })(PasswordRules || (PasswordRules = {}));
74
+ const regExpPasswordValidator = {
75
+ [PasswordRules.LowerLatin]: RegExp(/^(?=.*?[a-z])/),
76
+ [PasswordRules.UpperLatin]: RegExp(/^(?=.*?[A-Z])/),
77
+ [PasswordRules.Digit]: RegExp(/^(?=.*?[0-9])/),
78
+ [PasswordRules.SpecialSymbols]: RegExp(/^(?=.*?[" !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~"])/)
79
+ };
80
+ class McPasswordHint {
81
+ constructor(changeDetectorRef, formField) {
82
+ this.changeDetectorRef = changeDetectorRef;
83
+ this.formField = formField;
84
+ this.id = `mc-hint-${nextPasswordHintUniqueId++}`;
85
+ this.hasError = false;
86
+ this.checked = false;
87
+ this.checkValue = () => {
88
+ if (this.control.focused && this.isValueChanged()) {
89
+ this.hasError = false;
90
+ this.checked = this.checkRule(this.control.value);
91
+ }
92
+ else if (!this.control.focused && !this.isValueChanged()) {
93
+ this.hasError = !this.checkRule(this.control.value);
94
+ }
95
+ this.lastControlValue = this.control.value;
96
+ this.changeDetectorRef.markForCheck();
97
+ };
98
+ }
99
+ get control() {
100
+ return this.formField.control;
101
+ }
102
+ ngAfterContentInit() {
103
+ if (this.rule === null) {
104
+ throw Error('You should set [rule] name');
105
+ }
106
+ if (this.rule === PasswordRules.Length && (this.min || this.max) === null) {
107
+ throw Error('For [rule] "Length" need set [min] and [max]');
108
+ }
109
+ if (this.rule === PasswordRules.Length) {
110
+ this.checkRule = this.checkLengthRule;
111
+ }
112
+ else if ([PasswordRules.UpperLatin, PasswordRules.LowerLatin, PasswordRules.Digit, PasswordRules.SpecialSymbols]
113
+ .includes(this.rule)) {
114
+ this.regex = this.regex || regExpPasswordValidator[this.rule];
115
+ this.checkRule = this.checkRegexRule;
116
+ }
117
+ else {
118
+ throw Error(`Unknown [rule]=${this.rule}`);
119
+ }
120
+ this.formField.control.stateChanges
121
+ .subscribe(this.checkValue);
122
+ }
123
+ checkLengthRule(value) {
124
+ return value.length >= this.min && value.length <= this.max;
125
+ }
126
+ checkRegexRule(value) {
127
+ return !!this.regex?.test(value);
128
+ }
129
+ isValueChanged() {
130
+ return this.lastControlValue !== this.formField.control.value;
131
+ }
132
+ }
133
+ /** @nocollapse */ /** @nocollapse */ McPasswordHint.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McPasswordHint, deps: [{ token: i0.ChangeDetectorRef }, { token: McFormField }], target: i0.ɵɵFactoryTarget.Component });
134
+ /** @nocollapse */ /** @nocollapse */ McPasswordHint.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: McPasswordHint, selector: "mc-password-hint", inputs: { id: "id", rule: "rule", min: "min", max: "max", regex: "regex" }, host: { properties: { "class.mc-password-hint_valid": "checked", "class.mc-password-hint_invalid": "hasError", "attr.id": "id" }, classAttribute: "mc-password-hint" }, ngImport: i0, template: `
135
+ <i *ngIf="!checked" class="mc-password-hint__icon" mc-icon="mc-close-M_16"></i>
136
+ <i *ngIf="checked" class="mc-password-hint__icon" mc-icon="mc-check_16"></i>
137
+
138
+ <span class="mc-password-hint__text">
139
+ <ng-content></ng-content>
140
+ </span>
141
+ `, isInline: true, components: [{ type: i1.McIcon, selector: "[mc-icon]", inputs: ["color"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.McIconCSSStyler, selector: "[mc-icon]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
142
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McPasswordHint, decorators: [{
143
+ type: Component,
144
+ args: [{
145
+ selector: 'mc-password-hint',
146
+ template: `
147
+ <i *ngIf="!checked" class="mc-password-hint__icon" mc-icon="mc-close-M_16"></i>
148
+ <i *ngIf="checked" class="mc-password-hint__icon" mc-icon="mc-check_16"></i>
149
+
150
+ <span class="mc-password-hint__text">
151
+ <ng-content></ng-content>
152
+ </span>
153
+ `,
154
+ host: {
155
+ class: 'mc-password-hint',
156
+ '[class.mc-password-hint_valid]': 'checked',
157
+ '[class.mc-password-hint_invalid]': 'hasError',
158
+ '[attr.id]': 'id'
159
+ },
160
+ changeDetection: ChangeDetectionStrategy.OnPush
161
+ }]
162
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: McFormField }]; }, propDecorators: { id: [{
163
+ type: Input
164
+ }], rule: [{
165
+ type: Input
166
+ }], min: [{
167
+ type: Input
168
+ }], max: [{
169
+ type: Input
170
+ }], regex: [{
171
+ type: Input
172
+ }] } });
173
+
64
174
  class McPrefix {
65
175
  }
66
176
  /** @nocollapse */ /** @nocollapse */ McPrefix.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McPrefix, deps: [], target: i0.ɵɵFactoryTarget.Directive });
@@ -146,25 +256,31 @@ class McFormFieldBase {
146
256
  // tslint:disable-next-line:naming-convention
147
257
  const McFormFieldMixinBase = mixinColor(McFormFieldBase);
148
258
  class McFormField extends McFormFieldMixinBase {
259
+ constructor(
149
260
  // tslint:disable-next-line:naming-convention
150
- constructor(_elementRef, _changeDetectorRef) {
261
+ _elementRef, _changeDetectorRef, focusMonitor) {
151
262
  super(_elementRef);
152
263
  this._elementRef = _elementRef;
153
264
  this._changeDetectorRef = _changeDetectorRef;
265
+ this.focusMonitor = focusMonitor;
154
266
  // Unique id for the internal form field label.
155
267
  this.labelId = `mc-form-field-label-${nextUniqueId++}`;
156
268
  this.hovered = false;
157
269
  this.canCleanerClearByEsc = true;
158
270
  this.$unsubscribe = new Subject();
271
+ this.runFocusMonitor();
159
272
  }
160
273
  get hasHint() {
161
- return this.hint && this.hint.length > 0;
274
+ return this.hint?.length > 0;
275
+ }
276
+ get hasPasswordStrengthError() {
277
+ return this.passwordHints?.some((hint) => hint.hasError);
162
278
  }
163
279
  get hasSuffix() {
164
- return this.suffix && this.suffix.length > 0;
280
+ return this.suffix?.length > 0;
165
281
  }
166
282
  get hasPrefix() {
167
- return this.prefix && this.prefix.length > 0;
283
+ return this.prefix?.length > 0;
168
284
  }
169
285
  get hasCleaner() {
170
286
  return !!this.cleaner;
@@ -174,13 +290,12 @@ class McFormField extends McFormFieldMixinBase {
174
290
  }
175
291
  get canShowCleaner() {
176
292
  return this.hasCleaner &&
177
- this.control &&
178
- this.control.ngControl
293
+ this.control?.ngControl
179
294
  ? this.control.ngControl.value && !this.control.disabled
180
295
  : false;
181
296
  }
182
297
  get disabled() {
183
- return this.control && this.control.disabled;
298
+ return this.control?.disabled;
184
299
  }
185
300
  get canShowStepper() {
186
301
  return this.hasStepper &&
@@ -199,14 +314,17 @@ class McFormField extends McFormFieldMixinBase {
199
314
  // Subscribe to changes in the child control state in order to update the form field UI.
200
315
  this.control.stateChanges
201
316
  .pipe(startWith())
202
- .subscribe(() => {
317
+ .subscribe((state) => {
318
+ if (!state?.focused && this.hasPasswordStrengthError) {
319
+ this.control.ngControl?.control?.setErrors({ passwordStrength: true });
320
+ }
203
321
  this._changeDetectorRef.markForCheck();
204
322
  });
205
323
  if (this.hasStepper) {
206
324
  this.stepper.connectTo(this.control.numberInput);
207
325
  }
208
326
  // Run change detection if the value changes.
209
- const valueChanges = this.control.ngControl && this.control.ngControl.valueChanges || EMPTY;
327
+ const valueChanges = this.control.ngControl?.valueChanges || EMPTY;
210
328
  merge(valueChanges)
211
329
  .pipe(takeUntil(this.$unsubscribe))
212
330
  .subscribe(() => this._changeDetectorRef.markForCheck());
@@ -220,10 +338,8 @@ class McFormField extends McFormFieldMixinBase {
220
338
  }
221
339
  clearValue($event) {
222
340
  $event.stopPropagation();
223
- if (this.control && this.control.ngControl) {
224
- this.control.ngControl.reset();
225
- this.control.focus();
226
- }
341
+ this.control?.ngControl?.reset();
342
+ this.control?.focus();
227
343
  }
228
344
  onContainerClick($event) {
229
345
  if (this.control.onContainerClick) {
@@ -231,11 +347,13 @@ class McFormField extends McFormFieldMixinBase {
231
347
  }
232
348
  }
233
349
  onKeyDown(event) {
350
+ // tslint:disable-next-line:deprecation
351
+ if (this.control.controlType === 'input-password' && event.altKey && event.keyCode === F8) {
352
+ this.control.toggleType();
353
+ }
234
354
  // tslint:disable-next-line:deprecation
235
355
  if (this.canCleanerClearByEsc && event.keyCode === ESCAPE && this.control.focused && this.hasCleaner) {
236
- if (this.control && this.control.ngControl) {
237
- this.control.ngControl.reset();
238
- }
356
+ this.control?.ngControl?.reset();
239
357
  event.preventDefault();
240
358
  }
241
359
  }
@@ -260,6 +378,7 @@ class McFormField extends McFormFieldMixinBase {
260
378
  ngOnDestroy() {
261
379
  this.$unsubscribe.next();
262
380
  this.$unsubscribe.complete();
381
+ this.stopFocusMonitor();
263
382
  }
264
383
  /** Throws an error if the form field's control is missing. */
265
384
  validateControlChild() {
@@ -267,9 +386,15 @@ class McFormField extends McFormFieldMixinBase {
267
386
  throw getMcFormFieldMissingControlError();
268
387
  }
269
388
  }
389
+ runFocusMonitor() {
390
+ this.focusMonitor.monitor(this._elementRef.nativeElement, true);
391
+ }
392
+ stopFocusMonitor() {
393
+ this.focusMonitor.stopMonitoring(this._elementRef.nativeElement);
394
+ }
270
395
  }
271
- /** @nocollapse */ /** @nocollapse */ McFormField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McFormField, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
272
- /** @nocollapse */ /** @nocollapse */ McFormField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: McFormField, selector: "mc-form-field", inputs: { color: "color" }, host: { listeners: { "keydown": "onKeyDown($event)", "mouseenter": "onHoverChanged(true)", "mouseleave": "onHoverChanged(false)" }, properties: { "class.mc-form-field_invalid": "control.errorState", "class.mc-form-field_has-prefix": "hasPrefix", "class.mc-form-field_has-suffix": "hasSuffix", "class.mc-form-field_has-cleaner": "canShowCleaner", "class.mc-form-field_has-stepper": "canShowStepper", "class.mc-disabled": "control.disabled", "class.mc-focused": "control.focused", "class.ng-untouched": "shouldForward(\"untouched\")", "class.ng-touched": "shouldForward(\"touched\")", "class.ng-pristine": "shouldForward(\"pristine\")", "class.ng-dirty": "shouldForward(\"dirty\")", "class.ng-valid": "shouldForward(\"valid\")", "class.ng-invalid": "shouldForward(\"invalid\")", "class.ng-pending": "shouldForward(\"pending\")" }, classAttribute: "mc-form-field" }, queries: [{ propertyName: "control", first: true, predicate: McFormFieldControl, descendants: true }, { propertyName: "stepper", first: true, predicate: McStepper, descendants: true }, { propertyName: "cleaner", first: true, predicate: McCleaner, descendants: true }, { propertyName: "hint", predicate: McHint }, { propertyName: "suffix", predicate: McSuffix }, { propertyName: "prefix", predicate: McPrefix }], viewQueries: [{ propertyName: "connectionContainerRef", first: true, predicate: ["connectionContainer"], descendants: true, static: true }], exportAs: ["mcFormField"], usesInheritance: true, ngImport: i0, template: "<div class=\"mc-form-field__container\" (click)=\"onContainerClick($event)\">\n\n <div class=\"mc-form-field__prefix\" *ngIf=\"hasPrefix\">\n <ng-content select=\"[mcPrefix]\"></ng-content>\n </div>\n\n <div class=\"mc-form-field__infix\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"mc-form-field__suffix\" *ngIf=\"hasSuffix\">\n <ng-content select=\"[mcSuffix]\"></ng-content>\n </div>\n\n <div class=\"mc-form-field__cleaner\"\n *ngIf=\"canShowCleaner && !hasSuffix\"\n (click)=\"clearValue($event)\">\n <ng-content select=\"mc-cleaner\"></ng-content>\n </div>\n\n <ng-content *ngIf=\"canShowStepper\" select=\"mc-stepper\"></ng-content>\n</div>\n\n<div class=\"mc-form-field__hint\">\n <ng-content select=\"mc-hint\"></ng-content>\n</div>\n", styles: [".mc-form-field{position:relative;display:inline-block;width:100%;border-radius:var(--mc-form-field-size-border-radius, 3px)}.mc-form-field:hover{z-index:1}.mc-form-field.mc-focused{z-index:2}.mc-hint{display:block}.mc-form-field__hint>.mc-hint{margin-top:var(--mc-form-field-hint-size-margin-top, 4px)}.mc-form-field__container{position:relative;border-width:var(--mc-form-field-size-border-width, 1px);border-style:solid;border-color:transparent;border-radius:var(--mc-form-field-size-border-radius, 3px)}.mc-form-field_without-borders .mc-form-field__container{border-color:transparent}.mc-form-field__prefix,.mc-form-field__suffix{position:absolute;top:0;bottom:0;width:32px;display:flex;flex-direction:row;justify-content:center;align-items:center}.mc-form-field__prefix{left:0}.mc-form-field__suffix{right:0}.mc-form-field_has-suffix .mc-input,.mc-form-field_has-cleaner .mc-input,.mc-form-field_has-stepper .mc-input{padding-right:var(--mc-form-field-size-button-width, 32px)}.mc-form-field_has-prefix .mc-input{padding-left:var(--mc-form-field-size-button-width, 32px)}.mc-cleaner{display:flex;width:var(--mc-form-field-size-button-width, 32px);height:100%;cursor:pointer}.mc-cleaner .mc-icon{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.mc-form-field__cleaner .mc-cleaner{position:absolute;top:0;bottom:0;right:0}mc-stepper{position:absolute;display:flex;flex-direction:column;justify-content:center;align-items:center;top:0;bottom:0;right:0;width:var(--mc-form-field-size-button-width, 32px)}mc-stepper .mc-stepper-step-up,mc-stepper .mc-stepper-step-down{cursor:pointer;width:var(--mc-form-field-size-button-width, 32px);text-align:center}mc-stepper .mc-stepper-step-up{transform:scaleY(-1)}\n", ".mc-input{background:transparent;padding:0;margin:0;border:none;outline:none;box-sizing:border-box;padding:var(--mc-input-size-padding, 5px 16px);width:var(--mc-input-size-width, 100%);min-height:var(--mc-input-size-min-height, 30px)}.mc-input::-ms-clear{display:none;width:0;height:0}.mc-input::-ms-reveal{display:none;width:0;height:0}.mc-input::-webkit-search-decoration,.mc-input::-webkit-search-cancel-button,.mc-input::-webkit-search-results-button,.mc-input::-webkit-search-results-decoration{display:none}.mc-input{display:inline-block}input.mc-input[type=number]{-moz-appearance:textfield}input.mc-input[type=number]::-webkit-inner-spin-button,input.mc-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}input.mc-input:invalid{box-shadow:unset}\n", ".mc-timepicker{padding-right:calc(var(--mc-timepicker-size-padding-right, 16px) - var(--mc-form-field-size-border-width, 1px))}.mc-form-field-type-timepicker{width:auto}\n", ".mc-form-field-type-datepicker{width:auto}.mc-datepicker{width:var(--mc-datepicker-input-size-width, 130px)}\n", ".mc-textarea{background:transparent;margin:0;border:none;outline:none;resize:none;overflow:auto;width:100%;box-sizing:border-box;padding:var(--mc-textarea-size-padding, 5px 16px)}.mc-textarea{display:inline-block;-webkit-appearance:none;vertical-align:bottom}.mc-textarea:not(.mc-textarea-resizable){box-sizing:border-box;overflow-y:hidden}.mc-textarea.mc-textarea-resizable{resize:vertical;min-height:var(--mc-textarea-size-min-height, 50px)}.mc-textarea:invalid{box-shadow:unset}\n"], directives: [{ type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
396
+ /** @nocollapse */ /** @nocollapse */ McFormField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McFormField, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component });
397
+ /** @nocollapse */ /** @nocollapse */ McFormField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: McFormField, selector: "mc-form-field", inputs: { color: "color" }, host: { listeners: { "keydown": "onKeyDown($event)", "mouseenter": "onHoverChanged(true)", "mouseleave": "onHoverChanged(false)" }, properties: { "class.mc-form-field_invalid": "control.errorState", "class.mc-form-field_has-prefix": "hasPrefix", "class.mc-form-field_has-suffix": "hasSuffix", "class.mc-form-field_has-cleaner": "canShowCleaner", "class.mc-form-field_has-stepper": "canShowStepper", "class.mc-disabled": "control.disabled", "class.ng-untouched": "shouldForward(\"untouched\")", "class.ng-touched": "shouldForward(\"touched\")", "class.ng-pristine": "shouldForward(\"pristine\")", "class.ng-dirty": "shouldForward(\"dirty\")", "class.ng-valid": "shouldForward(\"valid\")", "class.ng-invalid": "shouldForward(\"invalid\")", "class.ng-pending": "shouldForward(\"pending\")" }, classAttribute: "mc-form-field" }, queries: [{ propertyName: "control", first: true, predicate: McFormFieldControl, descendants: true }, { propertyName: "stepper", first: true, predicate: McStepper, descendants: true }, { propertyName: "cleaner", first: true, predicate: McCleaner, descendants: true }, { propertyName: "hint", predicate: McHint }, { propertyName: "passwordHints", predicate: McPasswordHint }, { propertyName: "suffix", predicate: McSuffix }, { propertyName: "prefix", predicate: McPrefix }], viewQueries: [{ propertyName: "connectionContainerRef", first: true, predicate: ["connectionContainer"], descendants: true, static: true }], exportAs: ["mcFormField"], usesInheritance: true, ngImport: i0, template: "<div class=\"mc-form-field__container\" (click)=\"onContainerClick($event)\">\n\n <div class=\"mc-form-field__prefix\" *ngIf=\"hasPrefix\">\n <ng-content select=\"[mcPrefix]\"></ng-content>\n </div>\n\n <div class=\"mc-form-field__infix\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"mc-form-field__suffix\" *ngIf=\"hasSuffix\">\n <ng-content select=\"[mcSuffix]\"></ng-content>\n </div>\n\n <div class=\"mc-form-field__cleaner\"\n *ngIf=\"canShowCleaner && !hasSuffix\"\n (click)=\"clearValue($event)\">\n <ng-content select=\"mc-cleaner\"></ng-content>\n </div>\n\n <ng-content select=\"mc-password-toggle\"></ng-content>\n\n <ng-content *ngIf=\"canShowStepper\" select=\"mc-stepper\"></ng-content>\n</div>\n\n<div class=\"mc-form-field__hint\">\n <ng-content select=\"mc-hint, mc-password-hint\"></ng-content>\n</div>\n", styles: [".mc-form-field{position:relative;display:inline-block;width:100%;border-radius:var(--mc-form-field-size-border-radius, 3px)}.mc-form-field:hover{z-index:1}.mc-form-field.mc-focused{z-index:2}.mc-form-field-type-input-password .mc-input{padding-right:var(--mc-form-field-size-button-width, 32px)}.mc-hint{display:block}.mc-password-hint{display:block;padding-left:calc(16px + var(--mc-form-field-password-hint-size-icon-margin, 4px))}.mc-password-hint .mc-icon{position:absolute;left:0}.mc-form-field__hint>.mc-password-hint{margin-top:var(--mc-form-field-password-hint-size-margin-top, 8px)}.mc-form-field__hint>.mc-hint{margin-top:var(--mc-form-field-hint-size-margin-top, 4px)}.mc-form-field__container{position:relative;border-width:var(--mc-form-field-size-border-width, 1px);border-style:solid;border-color:transparent;border-radius:var(--mc-form-field-size-border-radius, 3px)}.mc-form-field_without-borders .mc-form-field__container{border-color:transparent}.mc-form-field__prefix,.mc-form-field__suffix{position:absolute;top:0;bottom:0;width:32px;display:flex;flex-direction:row;justify-content:center;align-items:center}.mc-form-field__prefix{left:0}.mc-form-field__suffix{right:0}.mc-form-field_has-suffix .mc-input,.mc-form-field_has-cleaner .mc-input,.mc-form-field_has-stepper .mc-input{padding-right:var(--mc-form-field-size-button-width, 32px)}.mc-form-field_has-prefix .mc-input{padding-left:var(--mc-form-field-size-button-width, 32px)}.mc-cleaner{display:flex;width:var(--mc-form-field-size-button-width, 32px);height:100%;cursor:pointer}.mc-cleaner .mc-icon{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.mc-form-field__cleaner .mc-cleaner{position:absolute;top:0;bottom:0;right:0}mc-stepper{position:absolute;display:flex;flex-direction:column;justify-content:center;align-items:center;top:0;bottom:0;right:0;width:var(--mc-form-field-size-button-width, 32px)}mc-stepper .mc-stepper-step-up,mc-stepper .mc-stepper-step-down{cursor:pointer;width:var(--mc-form-field-size-button-width, 32px);text-align:center}mc-stepper .mc-stepper-step-up{transform:scaleY(-1)}\n", ".mc-input{background:transparent;padding:0;margin:0;border:none;outline:none;box-sizing:border-box;padding:var(--mc-input-size-padding, 5px 16px);width:var(--mc-input-size-width, 100%);min-height:var(--mc-input-size-min-height, 30px)}.mc-input::-ms-clear{display:none;width:0;height:0}.mc-input::-ms-reveal{display:none;width:0;height:0}.mc-input::-webkit-search-decoration,.mc-input::-webkit-search-cancel-button,.mc-input::-webkit-search-results-button,.mc-input::-webkit-search-results-decoration{display:none}.mc-input{display:inline-block}input.mc-input[type=number]{-moz-appearance:textfield}input.mc-input[type=number]::-webkit-inner-spin-button,input.mc-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}input.mc-input:invalid{box-shadow:unset}.mc-password-toggle{display:flex;position:absolute;top:-1px;right:-1px;border:1px solid transparent;width:32px;height:32px;align-items:center;justify-content:center;cursor:pointer;border-top-right-radius:var(--mc-form-field-size-border-radius, 3px);border-bottom-right-radius:var(--mc-form-field-size-border-radius, 3px)}.mc-password-toggle::-moz-focus-inner{border:0}.mc-password-toggle:focus{outline:none}\n", ".mc-timepicker{padding-right:calc(var(--mc-timepicker-size-padding-right, 16px) - var(--mc-form-field-size-border-width, 1px))}.mc-form-field-type-timepicker{width:auto}\n", ".mc-form-field-type-datepicker{width:auto}.mc-datepicker{width:var(--mc-datepicker-input-size-width, 130px)}\n", ".mc-textarea{background:transparent;margin:0;border:none;outline:none;resize:none;overflow:auto;width:100%;box-sizing:border-box;padding:var(--mc-textarea-size-padding, 5px 16px)}.mc-textarea{display:inline-block;-webkit-appearance:none;vertical-align:bottom}.mc-textarea:not(.mc-textarea-resizable){box-sizing:border-box;overflow-y:hidden}.mc-textarea.mc-textarea-resizable{resize:vertical;min-height:var(--mc-textarea-size-min-height, 50px)}.mc-textarea:invalid{box-shadow:unset}\n"], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
273
398
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McFormField, decorators: [{
274
399
  type: Component,
275
400
  args: [{ selector: 'mc-form-field', exportAs: 'mcFormField', host: {
@@ -280,7 +405,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
280
405
  '[class.mc-form-field_has-cleaner]': 'canShowCleaner',
281
406
  '[class.mc-form-field_has-stepper]': 'canShowStepper',
282
407
  '[class.mc-disabled]': 'control.disabled',
283
- '[class.mc-focused]': 'control.focused',
284
408
  '[class.ng-untouched]': 'shouldForward("untouched")',
285
409
  '[class.ng-touched]': 'shouldForward("touched")',
286
410
  '[class.ng-pristine]': 'shouldForward("pristine")',
@@ -291,8 +415,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
291
415
  '(keydown)': 'onKeyDown($event)',
292
416
  '(mouseenter)': 'onHoverChanged(true)',
293
417
  '(mouseleave)': 'onHoverChanged(false)'
294
- }, inputs: ['color'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"mc-form-field__container\" (click)=\"onContainerClick($event)\">\n\n <div class=\"mc-form-field__prefix\" *ngIf=\"hasPrefix\">\n <ng-content select=\"[mcPrefix]\"></ng-content>\n </div>\n\n <div class=\"mc-form-field__infix\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"mc-form-field__suffix\" *ngIf=\"hasSuffix\">\n <ng-content select=\"[mcSuffix]\"></ng-content>\n </div>\n\n <div class=\"mc-form-field__cleaner\"\n *ngIf=\"canShowCleaner && !hasSuffix\"\n (click)=\"clearValue($event)\">\n <ng-content select=\"mc-cleaner\"></ng-content>\n </div>\n\n <ng-content *ngIf=\"canShowStepper\" select=\"mc-stepper\"></ng-content>\n</div>\n\n<div class=\"mc-form-field__hint\">\n <ng-content select=\"mc-hint\"></ng-content>\n</div>\n", styles: [".mc-form-field{position:relative;display:inline-block;width:100%;border-radius:var(--mc-form-field-size-border-radius, 3px)}.mc-form-field:hover{z-index:1}.mc-form-field.mc-focused{z-index:2}.mc-hint{display:block}.mc-form-field__hint>.mc-hint{margin-top:var(--mc-form-field-hint-size-margin-top, 4px)}.mc-form-field__container{position:relative;border-width:var(--mc-form-field-size-border-width, 1px);border-style:solid;border-color:transparent;border-radius:var(--mc-form-field-size-border-radius, 3px)}.mc-form-field_without-borders .mc-form-field__container{border-color:transparent}.mc-form-field__prefix,.mc-form-field__suffix{position:absolute;top:0;bottom:0;width:32px;display:flex;flex-direction:row;justify-content:center;align-items:center}.mc-form-field__prefix{left:0}.mc-form-field__suffix{right:0}.mc-form-field_has-suffix .mc-input,.mc-form-field_has-cleaner .mc-input,.mc-form-field_has-stepper .mc-input{padding-right:var(--mc-form-field-size-button-width, 32px)}.mc-form-field_has-prefix .mc-input{padding-left:var(--mc-form-field-size-button-width, 32px)}.mc-cleaner{display:flex;width:var(--mc-form-field-size-button-width, 32px);height:100%;cursor:pointer}.mc-cleaner .mc-icon{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.mc-form-field__cleaner .mc-cleaner{position:absolute;top:0;bottom:0;right:0}mc-stepper{position:absolute;display:flex;flex-direction:column;justify-content:center;align-items:center;top:0;bottom:0;right:0;width:var(--mc-form-field-size-button-width, 32px)}mc-stepper .mc-stepper-step-up,mc-stepper .mc-stepper-step-down{cursor:pointer;width:var(--mc-form-field-size-button-width, 32px);text-align:center}mc-stepper .mc-stepper-step-up{transform:scaleY(-1)}\n", ".mc-input{background:transparent;padding:0;margin:0;border:none;outline:none;box-sizing:border-box;padding:var(--mc-input-size-padding, 5px 16px);width:var(--mc-input-size-width, 100%);min-height:var(--mc-input-size-min-height, 30px)}.mc-input::-ms-clear{display:none;width:0;height:0}.mc-input::-ms-reveal{display:none;width:0;height:0}.mc-input::-webkit-search-decoration,.mc-input::-webkit-search-cancel-button,.mc-input::-webkit-search-results-button,.mc-input::-webkit-search-results-decoration{display:none}.mc-input{display:inline-block}input.mc-input[type=number]{-moz-appearance:textfield}input.mc-input[type=number]::-webkit-inner-spin-button,input.mc-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}input.mc-input:invalid{box-shadow:unset}\n", ".mc-timepicker{padding-right:calc(var(--mc-timepicker-size-padding-right, 16px) - var(--mc-form-field-size-border-width, 1px))}.mc-form-field-type-timepicker{width:auto}\n", ".mc-form-field-type-datepicker{width:auto}.mc-datepicker{width:var(--mc-datepicker-input-size-width, 130px)}\n", ".mc-textarea{background:transparent;margin:0;border:none;outline:none;resize:none;overflow:auto;width:100%;box-sizing:border-box;padding:var(--mc-textarea-size-padding, 5px 16px)}.mc-textarea{display:inline-block;-webkit-appearance:none;vertical-align:bottom}.mc-textarea:not(.mc-textarea-resizable){box-sizing:border-box;overflow-y:hidden}.mc-textarea.mc-textarea-resizable{resize:vertical;min-height:var(--mc-textarea-size-min-height, 50px)}.mc-textarea:invalid{box-shadow:unset}\n"] }]
295
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { control: [{
418
+ }, inputs: ['color'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"mc-form-field__container\" (click)=\"onContainerClick($event)\">\n\n <div class=\"mc-form-field__prefix\" *ngIf=\"hasPrefix\">\n <ng-content select=\"[mcPrefix]\"></ng-content>\n </div>\n\n <div class=\"mc-form-field__infix\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"mc-form-field__suffix\" *ngIf=\"hasSuffix\">\n <ng-content select=\"[mcSuffix]\"></ng-content>\n </div>\n\n <div class=\"mc-form-field__cleaner\"\n *ngIf=\"canShowCleaner && !hasSuffix\"\n (click)=\"clearValue($event)\">\n <ng-content select=\"mc-cleaner\"></ng-content>\n </div>\n\n <ng-content select=\"mc-password-toggle\"></ng-content>\n\n <ng-content *ngIf=\"canShowStepper\" select=\"mc-stepper\"></ng-content>\n</div>\n\n<div class=\"mc-form-field__hint\">\n <ng-content select=\"mc-hint, mc-password-hint\"></ng-content>\n</div>\n", styles: [".mc-form-field{position:relative;display:inline-block;width:100%;border-radius:var(--mc-form-field-size-border-radius, 3px)}.mc-form-field:hover{z-index:1}.mc-form-field.mc-focused{z-index:2}.mc-form-field-type-input-password .mc-input{padding-right:var(--mc-form-field-size-button-width, 32px)}.mc-hint{display:block}.mc-password-hint{display:block;padding-left:calc(16px + var(--mc-form-field-password-hint-size-icon-margin, 4px))}.mc-password-hint .mc-icon{position:absolute;left:0}.mc-form-field__hint>.mc-password-hint{margin-top:var(--mc-form-field-password-hint-size-margin-top, 8px)}.mc-form-field__hint>.mc-hint{margin-top:var(--mc-form-field-hint-size-margin-top, 4px)}.mc-form-field__container{position:relative;border-width:var(--mc-form-field-size-border-width, 1px);border-style:solid;border-color:transparent;border-radius:var(--mc-form-field-size-border-radius, 3px)}.mc-form-field_without-borders .mc-form-field__container{border-color:transparent}.mc-form-field__prefix,.mc-form-field__suffix{position:absolute;top:0;bottom:0;width:32px;display:flex;flex-direction:row;justify-content:center;align-items:center}.mc-form-field__prefix{left:0}.mc-form-field__suffix{right:0}.mc-form-field_has-suffix .mc-input,.mc-form-field_has-cleaner .mc-input,.mc-form-field_has-stepper .mc-input{padding-right:var(--mc-form-field-size-button-width, 32px)}.mc-form-field_has-prefix .mc-input{padding-left:var(--mc-form-field-size-button-width, 32px)}.mc-cleaner{display:flex;width:var(--mc-form-field-size-button-width, 32px);height:100%;cursor:pointer}.mc-cleaner .mc-icon{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.mc-form-field__cleaner .mc-cleaner{position:absolute;top:0;bottom:0;right:0}mc-stepper{position:absolute;display:flex;flex-direction:column;justify-content:center;align-items:center;top:0;bottom:0;right:0;width:var(--mc-form-field-size-button-width, 32px)}mc-stepper .mc-stepper-step-up,mc-stepper .mc-stepper-step-down{cursor:pointer;width:var(--mc-form-field-size-button-width, 32px);text-align:center}mc-stepper .mc-stepper-step-up{transform:scaleY(-1)}\n", ".mc-input{background:transparent;padding:0;margin:0;border:none;outline:none;box-sizing:border-box;padding:var(--mc-input-size-padding, 5px 16px);width:var(--mc-input-size-width, 100%);min-height:var(--mc-input-size-min-height, 30px)}.mc-input::-ms-clear{display:none;width:0;height:0}.mc-input::-ms-reveal{display:none;width:0;height:0}.mc-input::-webkit-search-decoration,.mc-input::-webkit-search-cancel-button,.mc-input::-webkit-search-results-button,.mc-input::-webkit-search-results-decoration{display:none}.mc-input{display:inline-block}input.mc-input[type=number]{-moz-appearance:textfield}input.mc-input[type=number]::-webkit-inner-spin-button,input.mc-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}input.mc-input:invalid{box-shadow:unset}.mc-password-toggle{display:flex;position:absolute;top:-1px;right:-1px;border:1px solid transparent;width:32px;height:32px;align-items:center;justify-content:center;cursor:pointer;border-top-right-radius:var(--mc-form-field-size-border-radius, 3px);border-bottom-right-radius:var(--mc-form-field-size-border-radius, 3px)}.mc-password-toggle::-moz-focus-inner{border:0}.mc-password-toggle:focus{outline:none}\n", ".mc-timepicker{padding-right:calc(var(--mc-timepicker-size-padding-right, 16px) - var(--mc-form-field-size-border-width, 1px))}.mc-form-field-type-timepicker{width:auto}\n", ".mc-form-field-type-datepicker{width:auto}.mc-datepicker{width:var(--mc-datepicker-input-size-width, 130px)}\n", ".mc-textarea{background:transparent;margin:0;border:none;outline:none;resize:none;overflow:auto;width:100%;box-sizing:border-box;padding:var(--mc-textarea-size-padding, 5px 16px)}.mc-textarea{display:inline-block;-webkit-appearance:none;vertical-align:bottom}.mc-textarea:not(.mc-textarea-resizable){box-sizing:border-box;overflow-y:hidden}.mc-textarea.mc-textarea-resizable{resize:vertical;min-height:var(--mc-textarea-size-min-height, 50px)}.mc-textarea:invalid{box-shadow:unset}\n"] }]
419
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$1.FocusMonitor }]; }, propDecorators: { control: [{
296
420
  type: ContentChild,
297
421
  args: [McFormFieldControl, { static: false }]
298
422
  }], stepper: [{
@@ -304,6 +428,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
304
428
  }], hint: [{
305
429
  type: ContentChildren,
306
430
  args: [McHint]
431
+ }], passwordHints: [{
432
+ type: ContentChildren,
433
+ args: [McPasswordHint]
307
434
  }], suffix: [{
308
435
  type: ContentChildren,
309
436
  args: [McSuffix]
@@ -333,12 +460,14 @@ class McFormFieldModule {
333
460
  /** @nocollapse */ /** @nocollapse */ McFormFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McFormFieldModule, declarations: [McFormField,
334
461
  McFormFieldWithoutBorders,
335
462
  McHint,
463
+ McPasswordHint,
336
464
  McPrefix,
337
465
  McSuffix,
338
466
  McCleaner,
339
467
  McStepper], imports: [CommonModule, McIconModule], exports: [McFormField,
340
468
  McFormFieldWithoutBorders,
341
469
  McHint,
470
+ McPasswordHint,
342
471
  McPrefix,
343
472
  McSuffix,
344
473
  McCleaner,
@@ -351,6 +480,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
351
480
  McFormField,
352
481
  McFormFieldWithoutBorders,
353
482
  McHint,
483
+ McPasswordHint,
354
484
  McPrefix,
355
485
  McSuffix,
356
486
  McCleaner,
@@ -361,6 +491,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
361
491
  McFormField,
362
492
  McFormFieldWithoutBorders,
363
493
  McHint,
494
+ McPasswordHint,
364
495
  McPrefix,
365
496
  McSuffix,
366
497
  McCleaner,
@@ -373,5 +504,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
373
504
  * Generated bundle index. Do not edit.
374
505
  */
375
506
 
376
- export { McCleaner, McFormField, McFormFieldBase, McFormFieldControl, McFormFieldMixinBase, McFormFieldModule, McFormFieldWithoutBorders, McHint, McPrefix, McStepper, McSuffix, getMcFormFieldMissingControlError, getMcFormFieldYouCanNotUseCleanerInNumberInputError };
507
+ export { McCleaner, McFormField, McFormFieldBase, McFormFieldControl, McFormFieldMixinBase, McFormFieldModule, McFormFieldWithoutBorders, McHint, McPasswordHint, McPrefix, McStepper, McSuffix, PasswordRules, getMcFormFieldMissingControlError, getMcFormFieldYouCanNotUseCleanerInNumberInputError, regExpPasswordValidator };
377
508
  //# sourceMappingURL=ptsecurity-mosaic-form-field.mjs.map