@ng-matero/extensions 20.3.1 → 21.1.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 (57) hide show
  1. package/fesm2022/mtxAlert.mjs +8 -8
  2. package/fesm2022/mtxAlert.mjs.map +1 -1
  3. package/fesm2022/mtxButton.mjs +7 -7
  4. package/fesm2022/mtxButton.mjs.map +1 -1
  5. package/fesm2022/mtxCheckboxGroup.mjs +7 -7
  6. package/fesm2022/mtxCheckboxGroup.mjs.map +1 -1
  7. package/fesm2022/mtxColorpicker.mjs +35 -128
  8. package/fesm2022/mtxColorpicker.mjs.map +1 -1
  9. package/fesm2022/mtxColumnResize.mjs +43 -43
  10. package/fesm2022/mtxColumnResize.mjs.map +1 -1
  11. package/fesm2022/mtxCore.mjs +21 -21
  12. package/fesm2022/mtxCore.mjs.map +1 -1
  13. package/fesm2022/mtxDatetimepicker.mjs +72 -265
  14. package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
  15. package/fesm2022/mtxDialog.mjs +11 -11
  16. package/fesm2022/mtxDialog.mjs.map +1 -1
  17. package/fesm2022/mtxDrawer.mjs +27 -88
  18. package/fesm2022/mtxDrawer.mjs.map +1 -1
  19. package/fesm2022/mtxGrid.mjs +75 -75
  20. package/fesm2022/mtxGrid.mjs.map +1 -1
  21. package/fesm2022/mtxLoader.mjs +7 -7
  22. package/fesm2022/mtxLoader.mjs.map +1 -1
  23. package/fesm2022/mtxPhotoviewer.mjs +7 -7
  24. package/fesm2022/mtxPhotoviewer.mjs.map +1 -1
  25. package/fesm2022/mtxPopover.mjs +93 -188
  26. package/fesm2022/mtxPopover.mjs.map +1 -1
  27. package/fesm2022/mtxProgress.mjs +8 -8
  28. package/fesm2022/mtxProgress.mjs.map +1 -1
  29. package/fesm2022/mtxSelect.mjs +53 -60
  30. package/fesm2022/mtxSelect.mjs.map +1 -1
  31. package/fesm2022/mtxSplit.mjs +10 -10
  32. package/fesm2022/mtxSplit.mjs.map +1 -1
  33. package/fesm2022/mtxTooltip.mjs +38 -127
  34. package/fesm2022/mtxTooltip.mjs.map +1 -1
  35. package/package.json +35 -35
  36. package/prebuilt-themes/deeppurple-amber.css +1 -1
  37. package/prebuilt-themes/indigo-pink.css +1 -1
  38. package/prebuilt-themes/pink-bluegrey.css +1 -1
  39. package/prebuilt-themes/purple-green.css +1 -1
  40. package/{colorpicker/index.d.ts → types/mtxColorpicker.d.ts} +12 -40
  41. package/{datetimepicker/index.d.ts → types/mtxDatetimepicker.d.ts} +5 -33
  42. package/{drawer/index.d.ts → types/mtxDrawer.d.ts} +12 -13
  43. package/{grid/index.d.ts → types/mtxGrid.d.ts} +5 -6
  44. package/{popover/index.d.ts → types/mtxPopover.d.ts} +2 -38
  45. package/{select/index.d.ts → types/mtxSelect.d.ts} +2 -3
  46. package/{tooltip/index.d.ts → types/mtxTooltip.d.ts} +9 -41
  47. /package/{alert/index.d.ts → types/mtxAlert.d.ts} +0 -0
  48. /package/{button/index.d.ts → types/mtxButton.d.ts} +0 -0
  49. /package/{checkbox-group/index.d.ts → types/mtxCheckboxGroup.d.ts} +0 -0
  50. /package/{column-resize/index.d.ts → types/mtxColumnResize.d.ts} +0 -0
  51. /package/{core/index.d.ts → types/mtxCore.d.ts} +0 -0
  52. /package/{dialog/index.d.ts → types/mtxDialog.d.ts} +0 -0
  53. /package/{loader/index.d.ts → types/mtxLoader.d.ts} +0 -0
  54. /package/{photoviewer/index.d.ts → types/mtxPhotoviewer.d.ts} +0 -0
  55. /package/{progress/index.d.ts → types/mtxProgress.d.ts} +0 -0
  56. /package/{split/index.d.ts → types/mtxSplit.d.ts} +0 -0
  57. /package/{index.d.ts → types/ng-matero-extensions.d.ts} +0 -0
@@ -3,15 +3,14 @@ import { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
3
3
  import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
4
4
  import { NgTemplateOutlet, CommonModule } from '@angular/common';
5
5
  import * as i0 from '@angular/core';
6
- import { InjectionToken, inject, ElementRef, ANIMATION_MODULE_TYPE, ChangeDetectorRef, NgZone, Renderer2, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, ViewContainerRef, DOCUMENT, EventEmitter, Injector, afterNextRender, booleanAttribute, Output, forwardRef, Directive, HostAttributeToken, ViewChild, ContentChild, NgModule } from '@angular/core';
6
+ import { InjectionToken, inject, ElementRef, ChangeDetectorRef, NgZone, Renderer2, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, ViewContainerRef, DOCUMENT, EventEmitter, Injector, afterNextRender, booleanAttribute, Output, forwardRef, Directive, HostAttributeToken, ViewChild, ContentChild, NgModule } from '@angular/core';
7
7
  import { MatIconButton, MatButtonModule } from '@angular/material/button';
8
- import * as i1 from 'ngx-color/chrome';
9
- import { ColorChromeModule } from 'ngx-color/chrome';
8
+ import { ColorPicker } from '@acrodata/color-picker';
10
9
  import { Directionality } from '@angular/cdk/bidi';
11
10
  import { hasModifierKey, ESCAPE, UP_ARROW, DOWN_ARROW } from '@angular/cdk/keycodes';
11
+ import { _animationsDisabled } from '@angular/material/core';
12
12
  import { Subject, Subscription, merge, of } from 'rxjs';
13
13
  import { take, filter } from 'rxjs/operators';
14
- import { TinyColor } from '@ctrl/tinycolor';
15
14
  import { NG_VALUE_ACCESSOR, NG_VALIDATORS, Validators } from '@angular/forms';
16
15
  import { MatFormField } from '@angular/material/form-field';
17
16
  import { MAT_INPUT_VALUE_ACCESSOR } from '@angular/material/input';
@@ -26,28 +25,10 @@ const MTX_COLORPICKER_SCROLL_STRATEGY = new InjectionToken('mtx-colorpicker-scro
26
25
  return () => overlay.scrollStrategies.reposition();
27
26
  },
28
27
  });
29
- /**
30
- * @docs-private
31
- * @deprecated No longer used, will be removed.
32
- * @breaking-change 21.0.0
33
- */
34
- function MTX_COLORPICKER_SCROLL_STRATEGY_FACTORY(overlay) {
35
- return () => overlay.scrollStrategies.reposition();
36
- }
37
- /**
38
- * @docs-private
39
- * @deprecated No longer used, will be removed.
40
- * @breaking-change 21.0.0
41
- */
42
- const MTX_COLORPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER = {
43
- provide: MTX_COLORPICKER_SCROLL_STRATEGY,
44
- deps: [Overlay],
45
- useFactory: MTX_COLORPICKER_SCROLL_STRATEGY_FACTORY,
46
- };
47
28
  class MtxColorpickerContent {
48
29
  constructor() {
49
30
  this._elementRef = inject(ElementRef);
50
- this._animationsDisabled = inject(ANIMATION_MODULE_TYPE, { optional: true }) === 'NoopAnimations';
31
+ this._animationsDisabled = _animationsDisabled();
51
32
  this._changeDetectorRef = inject(ChangeDetectorRef);
52
33
  this._ngZone = inject(NgZone);
53
34
  /** Emits when an animation has finished. */
@@ -98,24 +79,16 @@ class MtxColorpickerContent {
98
79
  }, 200);
99
80
  }
100
81
  }
101
- getColorString(e) {
102
- return {
103
- hex: e.color.rgb.a === 1 ? e.color.hex : new TinyColor(e.color.rgb).toHex8String(),
104
- rgb: new TinyColor(e.color.rgb).toRgbString(),
105
- hsl: new TinyColor(e.color.hsl).toHslString(),
106
- hsv: new TinyColor(e.color.hsv).toHsvString(),
107
- }[this.picker.format];
108
- }
109
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MtxColorpickerContent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
110
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: MtxColorpickerContent, isStandalone: true, selector: "mtx-colorpicker-content", inputs: { color: "color" }, host: { properties: { "class": "color ? \"mat-\" + color : \"\"", "class.mtx-colorpicker-content-animations-enabled": "!_animationsDisabled" }, classAttribute: "mtx-colorpicker-content" }, exportAs: ["mtxColorpickerContent"], ngImport: i0, template: "@if (picker.content) {\n <ng-template [ngTemplateOutlet]=\"picker.content\"></ng-template>\n} @else {\n <color-chrome\n [color]=\"picker.selected\"\n (onChangeComplete)=\"picker.select(getColorString($event))\"\n />\n}\n", styles: ["@keyframes _mtx-colorpicker-content-dropdown-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _mtx-colorpicker-content-exit{0%{opacity:1}to{opacity:0}}.mtx-colorpicker-content{display:block;border-radius:4px}.mtx-colorpicker-content.mtx-colorpicker-content-animations-enabled{animation:_mtx-colorpicker-content-dropdown-enter .12s cubic-bezier(0,0,.2,1)}.mtx-colorpicker-content-exit.mtx-colorpicker-content-animations-enabled{animation:_mtx-colorpicker-content-exit .1s linear}\n"], dependencies: [{ kind: "ngmodule", type: ColorChromeModule }, { kind: "component", type: i1.ChromeComponent, selector: "color-chrome", inputs: ["disableAlpha"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
82
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: MtxColorpickerContent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
83
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.1", type: MtxColorpickerContent, isStandalone: true, selector: "mtx-colorpicker-content", inputs: { color: "color" }, host: { properties: { "class": "color ? \"mat-\" + color : \"\"", "class.mtx-colorpicker-content-animations-enabled": "!_animationsDisabled" }, classAttribute: "mtx-colorpicker-content" }, exportAs: ["mtxColorpickerContent"], ngImport: i0, template: "@if (picker.content) {\n <ng-template [ngTemplateOutlet]=\"picker.content\"></ng-template>\n} @else {\n <color-picker\n [format]=\"picker.format\"\n [color]=\"picker.selected\"\n (colorChange)=\"picker.select($event)\"\n />\n}\n", styles: ["@keyframes _mtx-colorpicker-content-dropdown-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _mtx-colorpicker-content-exit{0%{opacity:1}to{opacity:0}}.mtx-colorpicker-content{display:block;border-radius:4px}.mtx-colorpicker-content.mtx-colorpicker-content-animations-enabled{animation:_mtx-colorpicker-content-dropdown-enter .12s cubic-bezier(0,0,.2,1)}.mtx-colorpicker-content-exit.mtx-colorpicker-content-animations-enabled{animation:_mtx-colorpicker-content-exit .1s linear}\n"], dependencies: [{ kind: "component", type: ColorPicker, selector: "color-picker", inputs: ["format", "color", "hideAlpha", "disabled"], outputs: ["formatChange", "colorChange", "valueChange", "valueChanged"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
111
84
  }
112
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MtxColorpickerContent, decorators: [{
85
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: MtxColorpickerContent, decorators: [{
113
86
  type: Component,
114
87
  args: [{ selector: 'mtx-colorpicker-content', host: {
115
88
  'class': 'mtx-colorpicker-content',
116
89
  '[class]': 'color ? "mat-" + color : ""',
117
90
  '[class.mtx-colorpicker-content-animations-enabled]': '!_animationsDisabled',
118
- }, exportAs: 'mtxColorpickerContent', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [ColorChromeModule, NgTemplateOutlet], template: "@if (picker.content) {\n <ng-template [ngTemplateOutlet]=\"picker.content\"></ng-template>\n} @else {\n <color-chrome\n [color]=\"picker.selected\"\n (onChangeComplete)=\"picker.select(getColorString($event))\"\n />\n}\n", styles: ["@keyframes _mtx-colorpicker-content-dropdown-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _mtx-colorpicker-content-exit{0%{opacity:1}to{opacity:0}}.mtx-colorpicker-content{display:block;border-radius:4px}.mtx-colorpicker-content.mtx-colorpicker-content-animations-enabled{animation:_mtx-colorpicker-content-dropdown-enter .12s cubic-bezier(0,0,.2,1)}.mtx-colorpicker-content-exit.mtx-colorpicker-content-animations-enabled{animation:_mtx-colorpicker-content-exit .1s linear}\n"] }]
91
+ }, exportAs: 'mtxColorpickerContent', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [ColorPicker, NgTemplateOutlet], template: "@if (picker.content) {\n <ng-template [ngTemplateOutlet]=\"picker.content\"></ng-template>\n} @else {\n <color-picker\n [format]=\"picker.format\"\n [color]=\"picker.selected\"\n (colorChange)=\"picker.select($event)\"\n />\n}\n", styles: ["@keyframes _mtx-colorpicker-content-dropdown-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _mtx-colorpicker-content-exit{0%{opacity:1}to{opacity:0}}.mtx-colorpicker-content{display:block;border-radius:4px}.mtx-colorpicker-content.mtx-colorpicker-content-animations-enabled{animation:_mtx-colorpicker-content-dropdown-enter .12s cubic-bezier(0,0,.2,1)}.mtx-colorpicker-content-exit.mtx-colorpicker-content-animations-enabled{animation:_mtx-colorpicker-content-exit .1s linear}\n"] }]
119
92
  }], ctorParameters: () => [], propDecorators: { color: [{
120
93
  type: Input
121
94
  }] } });
@@ -182,7 +155,7 @@ class MtxColorpicker {
182
155
  }
183
156
  /** The input and output color format. */
184
157
  get format() {
185
- return this._format || this.pickerInput?.format || this.getColorFormat();
158
+ return this._format || this.pickerInput?.format;
186
159
  }
187
160
  set format(value) {
188
161
  this._format = value;
@@ -201,15 +174,6 @@ class MtxColorpicker {
201
174
  this._inputStateChanges.unsubscribe();
202
175
  this._disabledChange.complete();
203
176
  }
204
- getColorFormat() {
205
- const color = new TinyColor(this.selected);
206
- if (color.format === 'rgb' || color.format === 'hsl' || color.format === 'hsv') {
207
- return color.format;
208
- }
209
- else {
210
- return 'hex';
211
- }
212
- }
213
177
  /** Selects the given color. */
214
178
  select(nextVal) {
215
179
  const oldValue = this.selected;
@@ -372,10 +336,10 @@ class MtxColorpicker {
372
336
  (this.pickerInput && hasModifierKey(event, 'altKey') && event.keyCode === UP_ARROW));
373
337
  })));
374
338
  }
375
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MtxColorpicker, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
376
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.3.0", type: MtxColorpicker, isStandalone: true, selector: "mtx-colorpicker", inputs: { content: "content", disabled: ["disabled", "disabled", booleanAttribute], xPosition: "xPosition", yPosition: "yPosition", restoreFocus: ["restoreFocus", "restoreFocus", booleanAttribute], opened: ["opened", "opened", booleanAttribute], color: "color", format: "format" }, outputs: { openedStream: "opened", closedStream: "closed" }, exportAs: ["mtxColorpicker"], usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
339
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: MtxColorpicker, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
340
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "21.0.1", type: MtxColorpicker, isStandalone: true, selector: "mtx-colorpicker", inputs: { content: "content", disabled: ["disabled", "disabled", booleanAttribute], xPosition: "xPosition", yPosition: "yPosition", restoreFocus: ["restoreFocus", "restoreFocus", booleanAttribute], opened: ["opened", "opened", booleanAttribute], color: "color", format: "format" }, outputs: { openedStream: "opened", closedStream: "closed" }, exportAs: ["mtxColorpicker"], usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
377
341
  }
378
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MtxColorpicker, decorators: [{
342
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: MtxColorpicker, decorators: [{
379
343
  type: Component,
380
344
  args: [{
381
345
  selector: 'mtx-colorpicker',
@@ -566,7 +530,8 @@ class MtxColorpickerInput {
566
530
  }
567
531
  this._onTouched();
568
532
  }
569
- _onInput(value) {
533
+ _onInput(event) {
534
+ const value = event.target.value;
570
535
  const nextValue = value;
571
536
  this._value = nextValue;
572
537
  this._cvaOnChange(nextValue);
@@ -584,14 +549,14 @@ class MtxColorpickerInput {
584
549
  _formatValue(value) {
585
550
  this._elementRef.nativeElement.value = value ? value : '';
586
551
  }
587
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MtxColorpickerInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
588
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.0", type: MtxColorpickerInput, isStandalone: true, selector: "input[mtxColorpicker]", inputs: { mtxColorpicker: "mtxColorpicker", disabled: ["disabled", "disabled", booleanAttribute], value: "value", format: "format" }, outputs: { colorChange: "colorChange", colorInput: "colorInput" }, host: { listeners: { "input": "_onInput($event.target.value)", "change": "_onChange()", "blur": "_onBlur()", "keydown": "_onKeydown($event)" }, properties: { "attr.aria-haspopup": "_picker ? \"dialog\" : null", "attr.aria-owns": "(_picker?.opened && _picker.id) || null", "disabled": "disabled" }, classAttribute: "mtx-colorpicker-input" }, providers: [
552
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: MtxColorpickerInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
553
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "21.0.1", type: MtxColorpickerInput, isStandalone: true, selector: "input[mtxColorpicker]", inputs: { mtxColorpicker: "mtxColorpicker", disabled: ["disabled", "disabled", booleanAttribute], value: "value", format: "format" }, outputs: { colorChange: "colorChange", colorInput: "colorInput" }, host: { listeners: { "input": "_onInput($event)", "change": "_onChange()", "blur": "_onBlur()", "keydown": "_onKeydown($event)" }, properties: { "attr.aria-haspopup": "_picker ? \"dialog\" : null", "attr.aria-owns": "(_picker?.opened && _picker.id) || null", "disabled": "disabled" }, classAttribute: "mtx-colorpicker-input" }, providers: [
589
554
  MTX_COLORPICKER_VALUE_ACCESSOR,
590
555
  MTX_COLORPICKER_VALIDATORS,
591
556
  { provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: MtxColorpickerInput },
592
557
  ], exportAs: ["mtxColorpickerInput"], ngImport: i0 }); }
593
558
  }
594
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MtxColorpickerInput, decorators: [{
559
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: MtxColorpickerInput, decorators: [{
595
560
  type: Directive,
596
561
  args: [{
597
562
  selector: 'input[mtxColorpicker]',
@@ -605,7 +570,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
605
570
  '[attr.aria-haspopup]': '_picker ? "dialog" : null',
606
571
  '[attr.aria-owns]': '(_picker?.opened && _picker.id) || null',
607
572
  '[disabled]': 'disabled',
608
- '(input)': '_onInput($event.target.value)',
573
+ '(input)': '_onInput($event)',
609
574
  '(change)': '_onChange()',
610
575
  '(blur)': '_onBlur()',
611
576
  '(keydown)': '_onKeydown($event)',
@@ -629,10 +594,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
629
594
 
630
595
  /** Can be used to override the icon of a `mtxColorpickerToggle`. */
631
596
  class MtxColorpickerToggleIcon {
632
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MtxColorpickerToggleIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
633
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: MtxColorpickerToggleIcon, isStandalone: true, selector: "[mtxColorpickerToggleIcon]", ngImport: i0 }); }
597
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: MtxColorpickerToggleIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
598
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.1", type: MtxColorpickerToggleIcon, isStandalone: true, selector: "[mtxColorpickerToggleIcon]", ngImport: i0 }); }
634
599
  }
635
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MtxColorpickerToggleIcon, decorators: [{
600
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: MtxColorpickerToggleIcon, decorators: [{
636
601
  type: Directive,
637
602
  args: [{
638
603
  selector: '[mtxColorpickerToggleIcon]',
@@ -684,10 +649,10 @@ class MtxColorpickerToggle {
684
649
  this._stateChanges.unsubscribe();
685
650
  this._stateChanges = merge(pickerDisabled, inputDisabled, pickerToggled).subscribe(() => this._changeDetectorRef.markForCheck());
686
651
  }
687
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MtxColorpickerToggle, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
688
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: MtxColorpickerToggle, isStandalone: true, selector: "mtx-colorpicker-toggle", inputs: { picker: ["for", "picker"], tabIndex: "tabIndex", ariaLabel: ["aria-label", "ariaLabel"], disabled: ["disabled", "disabled", booleanAttribute], disableRipple: ["disableRipple", "disableRipple", booleanAttribute] }, host: { listeners: { "click": "_open($event)" }, properties: { "attr.tabindex": "null", "class.mtx-colorpicker-toggle-active": "picker && picker.opened", "class.mat-accent": "picker && picker.color === \"accent\"", "class.mat-warn": "picker && picker.color === \"warn\"" }, classAttribute: "mtx-colorpicker-toggle" }, queries: [{ propertyName: "_customIcon", first: true, predicate: MtxColorpickerToggleIcon, descendants: true }], viewQueries: [{ propertyName: "_button", first: true, predicate: ["button"], descendants: true }], exportAs: ["mtxColorpickerToggle"], usesOnChanges: true, ngImport: i0, template: "<button\n #button\n mat-icon-button\n type=\"button\"\n [attr.aria-haspopup]=\"picker ? 'dialog' : null\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\n [disabled]=\"disabled\"\n [disableRipple]=\"disableRipple\"\n>\n @if (!_customIcon) {\n <svg\n class=\"mtx-colorpicker-toggle-default-icon\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n fill=\"currentColor\"\n focusable=\"false\"\n >\n <path\n d=\"M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z\"\n />\n </svg>\n }\n\n <ng-content select=\"[mtxColorpickerToggleIcon]\"></ng-content>\n</button>\n", styles: [".mtx-colorpicker-toggle{pointer-events:auto;color:var(--mtx-colorpicker-toggle-icon-color, var(--mat-sys-on-surface-variant))}.mtx-colorpicker-toggle-active{color:var(--mtx-colorpicker-toggle-active-state-icon-color, var(--mat-sys-on-surface-variant))}@media (forced-colors: active){.mtx-colorpicker-toggle-default-icon{color:CanvasText}}\n"], dependencies: [{ kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
652
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: MtxColorpickerToggle, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
653
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.1", type: MtxColorpickerToggle, isStandalone: true, selector: "mtx-colorpicker-toggle", inputs: { picker: ["for", "picker"], tabIndex: "tabIndex", ariaLabel: ["aria-label", "ariaLabel"], disabled: ["disabled", "disabled", booleanAttribute], disableRipple: ["disableRipple", "disableRipple", booleanAttribute] }, host: { listeners: { "click": "_open($event)" }, properties: { "attr.tabindex": "null", "class.mtx-colorpicker-toggle-active": "picker && picker.opened", "class.mat-accent": "picker && picker.color === \"accent\"", "class.mat-warn": "picker && picker.color === \"warn\"" }, classAttribute: "mtx-colorpicker-toggle" }, queries: [{ propertyName: "_customIcon", first: true, predicate: MtxColorpickerToggleIcon, descendants: true }], viewQueries: [{ propertyName: "_button", first: true, predicate: ["button"], descendants: true }], exportAs: ["mtxColorpickerToggle"], usesOnChanges: true, ngImport: i0, template: "<button\n #button\n matIconButton\n type=\"button\"\n [attr.aria-haspopup]=\"picker ? 'dialog' : null\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\n [disabled]=\"disabled\"\n [disableRipple]=\"disableRipple\"\n>\n @if (!_customIcon) {\n <svg\n class=\"mtx-colorpicker-toggle-default-icon\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n fill=\"currentColor\"\n focusable=\"false\"\n >\n <path\n d=\"M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z\"\n />\n </svg>\n }\n\n <ng-content select=\"[mtxColorpickerToggleIcon]\"></ng-content>\n</button>\n", styles: [".mtx-colorpicker-toggle{pointer-events:auto;color:var(--mtx-colorpicker-toggle-icon-color, var(--mat-sys-on-surface-variant))}.mtx-colorpicker-toggle-active{color:var(--mtx-colorpicker-toggle-active-state-icon-color, var(--mat-sys-on-surface-variant))}@media(forced-colors:active){.mtx-colorpicker-toggle-default-icon{color:CanvasText}}\n"], dependencies: [{ kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
689
654
  }
690
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MtxColorpickerToggle, decorators: [{
655
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: MtxColorpickerToggle, decorators: [{
691
656
  type: Component,
692
657
  args: [{ selector: 'mtx-colorpicker-toggle', host: {
693
658
  'class': 'mtx-colorpicker-toggle',
@@ -699,7 +664,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
699
664
  // `stopPropagation` on it without affecting the user's `click` handlers. We need to stop
700
665
  // it so that the input doesn't get focused automatically by the form field (See #21836).
701
666
  '(click)': '_open($event)',
702
- }, exportAs: 'mtxColorpickerToggle', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatIconButton], template: "<button\n #button\n mat-icon-button\n type=\"button\"\n [attr.aria-haspopup]=\"picker ? 'dialog' : null\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\n [disabled]=\"disabled\"\n [disableRipple]=\"disableRipple\"\n>\n @if (!_customIcon) {\n <svg\n class=\"mtx-colorpicker-toggle-default-icon\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n fill=\"currentColor\"\n focusable=\"false\"\n >\n <path\n d=\"M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z\"\n />\n </svg>\n }\n\n <ng-content select=\"[mtxColorpickerToggleIcon]\"></ng-content>\n</button>\n", styles: [".mtx-colorpicker-toggle{pointer-events:auto;color:var(--mtx-colorpicker-toggle-icon-color, var(--mat-sys-on-surface-variant))}.mtx-colorpicker-toggle-active{color:var(--mtx-colorpicker-toggle-active-state-icon-color, var(--mat-sys-on-surface-variant))}@media (forced-colors: active){.mtx-colorpicker-toggle-default-icon{color:CanvasText}}\n"] }]
667
+ }, exportAs: 'mtxColorpickerToggle', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatIconButton], template: "<button\n #button\n matIconButton\n type=\"button\"\n [attr.aria-haspopup]=\"picker ? 'dialog' : null\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\n [disabled]=\"disabled\"\n [disableRipple]=\"disableRipple\"\n>\n @if (!_customIcon) {\n <svg\n class=\"mtx-colorpicker-toggle-default-icon\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n fill=\"currentColor\"\n focusable=\"false\"\n >\n <path\n d=\"M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z\"\n />\n </svg>\n }\n\n <ng-content select=\"[mtxColorpickerToggleIcon]\"></ng-content>\n</button>\n", styles: [".mtx-colorpicker-toggle{pointer-events:auto;color:var(--mtx-colorpicker-toggle-icon-color, var(--mat-sys-on-surface-variant))}.mtx-colorpicker-toggle-active{color:var(--mtx-colorpicker-toggle-active-state-icon-color, var(--mat-sys-on-surface-variant))}@media(forced-colors:active){.mtx-colorpicker-toggle-default-icon{color:CanvasText}}\n"] }]
703
668
  }], ctorParameters: () => [], propDecorators: { picker: [{
704
669
  type: Input,
705
670
  args: ['for']
@@ -723,32 +688,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
723
688
  }] } });
724
689
 
725
690
  class MtxColorpickerModule {
726
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MtxColorpickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
727
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: MtxColorpickerModule, imports: [CommonModule,
691
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: MtxColorpickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
692
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.1", ngImport: i0, type: MtxColorpickerModule, imports: [CommonModule,
728
693
  OverlayModule,
729
694
  A11yModule,
730
695
  PortalModule,
731
696
  MatButtonModule,
732
- ColorChromeModule,
733
697
  MtxColorpicker,
734
698
  MtxColorpickerContent,
735
699
  MtxColorpickerInput,
736
700
  MtxColorpickerToggle,
737
- MtxColorpickerToggleIcon], exports: [MtxColorpicker,
701
+ MtxColorpickerToggleIcon,
702
+ ColorPicker], exports: [MtxColorpicker,
738
703
  MtxColorpickerContent,
739
704
  MtxColorpickerInput,
740
705
  MtxColorpickerToggle,
741
706
  MtxColorpickerToggleIcon] }); }
742
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MtxColorpickerModule, providers: [MTX_COLORPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [CommonModule,
707
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: MtxColorpickerModule, imports: [CommonModule,
743
708
  OverlayModule,
744
709
  A11yModule,
745
710
  PortalModule,
746
711
  MatButtonModule,
747
- ColorChromeModule,
748
712
  MtxColorpickerContent,
749
- MtxColorpickerToggle] }); }
713
+ MtxColorpickerToggle,
714
+ ColorPicker] }); }
750
715
  }
751
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MtxColorpickerModule, decorators: [{
716
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: MtxColorpickerModule, decorators: [{
752
717
  type: NgModule,
753
718
  args: [{
754
719
  imports: [
@@ -757,12 +722,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
757
722
  A11yModule,
758
723
  PortalModule,
759
724
  MatButtonModule,
760
- ColorChromeModule,
761
725
  MtxColorpicker,
762
726
  MtxColorpickerContent,
763
727
  MtxColorpickerInput,
764
728
  MtxColorpickerToggle,
765
729
  MtxColorpickerToggleIcon,
730
+ ColorPicker,
766
731
  ],
767
732
  exports: [
768
733
  MtxColorpicker,
@@ -771,70 +736,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
771
736
  MtxColorpickerToggle,
772
737
  MtxColorpickerToggleIcon,
773
738
  ],
774
- providers: [MTX_COLORPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER],
775
739
  }]
776
740
  }] });
777
741
 
778
- /**
779
- * Animations used by the colorpicker.
780
- * @docs-private
781
- * @deprecated No longer used, will be removed.
782
- * @breaking-change 21.0.0
783
- */
784
- const mtxColorpickerAnimations = {
785
- // Represents:
786
- // transformPanel: trigger('transformPanel', [
787
- // transition(
788
- // 'void => enter-dropdown',
789
- // animate(
790
- // '120ms cubic-bezier(0, 0, 0.2, 1)',
791
- // keyframes([
792
- // style({ opacity: 0, transform: 'scale(1, 0.8)' }),
793
- // style({ opacity: 1, transform: 'scale(1, 1)' }),
794
- // ])
795
- // )
796
- // ),
797
- // transition('* => void', animate('100ms linear', style({ opacity: 0 }))),
798
- // ]),
799
- /** Transforms the height of the colorpicker's panel. */
800
- transformPanel: {
801
- type: 7,
802
- name: 'transformPanel',
803
- definitions: [
804
- {
805
- type: 1,
806
- expr: 'void => enter-dropdown',
807
- animation: {
808
- type: 4,
809
- styles: {
810
- type: 5,
811
- steps: [
812
- { type: 6, styles: { opacity: 0, transform: 'scale(1, 0.8)' }, offset: null },
813
- { type: 6, styles: { opacity: 1, transform: 'scale(1, 1)' }, offset: null },
814
- ],
815
- },
816
- timings: '120ms cubic-bezier(0, 0, 0.2, 1)',
817
- },
818
- options: null,
819
- },
820
- {
821
- type: 1,
822
- expr: '* => void',
823
- animation: {
824
- type: 4,
825
- styles: { type: 6, styles: { opacity: 0 }, offset: null },
826
- timings: '100ms linear',
827
- },
828
- options: null,
829
- },
830
- ],
831
- options: {},
832
- },
833
- };
834
-
835
742
  /**
836
743
  * Generated bundle index. Do not edit.
837
744
  */
838
745
 
839
- export { MTX_COLORPICKER_SCROLL_STRATEGY, MTX_COLORPICKER_SCROLL_STRATEGY_FACTORY, MTX_COLORPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER, MTX_COLORPICKER_VALIDATORS, MTX_COLORPICKER_VALUE_ACCESSOR, MtxColorpicker, MtxColorpickerContent, MtxColorpickerInput, MtxColorpickerModule, MtxColorpickerToggle, MtxColorpickerToggleIcon, mtxColorpickerAnimations };
746
+ export { MTX_COLORPICKER_SCROLL_STRATEGY, MTX_COLORPICKER_VALIDATORS, MTX_COLORPICKER_VALUE_ACCESSOR, MtxColorPickerInputEvent, MtxColorpicker, MtxColorpickerContent, MtxColorpickerInput, MtxColorpickerModule, MtxColorpickerToggle, MtxColorpickerToggleIcon };
840
747
  //# sourceMappingURL=mtxColorpicker.mjs.map