@ng-matero/extensions 16.3.1 → 17.0.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.
- package/_index.scss +2 -1
- package/alert/_alert-theme.scss +54 -24
- package/alert/alert.d.ts +3 -6
- package/alert/alert.scss +3 -3
- package/button/_button-theme.scss +6 -4
- package/button/button-loading.d.ts +5 -10
- package/button/button-module.d.ts +5 -5
- package/checkbox-group/checkbox-group.d.ts +4 -9
- package/colorpicker/_colorpicker-theme.scss +62 -34
- package/colorpicker/colorpicker-input.d.ts +1 -3
- package/colorpicker/colorpicker-toggle.d.ts +2 -3
- package/colorpicker/colorpicker.d.ts +5 -6
- package/core/color/_all-color.scss +7 -18
- package/core/density/_all-density.scss +28 -14
- package/core/mdc-helpers/_mdc-helpers.scss +27 -238
- package/core/style/_sass-utils.scss +13 -1
- package/core/style/_validation.scss +43 -0
- package/core/theming/_all-theme.scss +32 -17
- package/core/theming/_inspection.scss +303 -0
- package/core/theming/_m2-inspection.scss +266 -0
- package/core/tokens/_token-utils.scss +4 -5
- package/core/tokens/m2/mdc/_plain-tooltip.scss +21 -29
- package/core/tokens/m2/mtx/_alert.scss +14 -15
- package/core/tokens/m2/mtx/_colorpicker.scss +8 -11
- package/core/tokens/m2/mtx/_datetimepicker.scss +38 -47
- package/core/tokens/m2/mtx/_drawer.scss +9 -10
- package/core/tokens/m2/mtx/_grid.scss +34 -22
- package/core/tokens/m2/mtx/_loader.scss +6 -6
- package/core/tokens/m2/mtx/_popover.scss +10 -11
- package/core/tokens/m2/mtx/_progress.scss +18 -17
- package/core/tokens/m2/mtx/_select.scss +65 -25
- package/core/tokens/m2/mtx/_split.scss +8 -11
- package/core/typography/_all-typography.scss +40 -0
- package/core/typography/_typography.scss +1 -579
- package/datetimepicker/_datetimepicker-theme.scss +75 -48
- package/datetimepicker/calendar.d.ts +7 -14
- package/datetimepicker/calendar.scss +16 -4
- package/datetimepicker/clock.d.ts +1 -2
- package/datetimepicker/datetimepicker-content.scss +3 -3
- package/datetimepicker/datetimepicker-input.d.ts +1 -2
- package/datetimepicker/datetimepicker-toggle.d.ts +2 -3
- package/datetimepicker/datetimepicker.d.ts +15 -26
- package/datetimepicker/month-view.d.ts +1 -1
- package/datetimepicker/multi-year-view.d.ts +1 -1
- package/datetimepicker/time.d.ts +3 -5
- package/datetimepicker/time.scss +2 -2
- package/datetimepicker/year-view.d.ts +1 -1
- package/drawer/_drawer-theme.scss +55 -22
- package/drawer/drawer-container.scss +25 -4
- package/esm2022/alert/alert-module.mjs +4 -4
- package/esm2022/alert/alert.mjs +11 -18
- package/esm2022/button/button-loading.mjs +13 -23
- package/esm2022/button/button-module.mjs +6 -7
- package/esm2022/checkbox-group/checkbox-group-module.mjs +4 -4
- package/esm2022/checkbox-group/checkbox-group.mjs +18 -29
- package/esm2022/colorpicker/colorpicker-input.mjs +13 -14
- package/esm2022/colorpicker/colorpicker-module.mjs +4 -4
- package/esm2022/colorpicker/colorpicker-toggle.mjs +18 -18
- package/esm2022/colorpicker/colorpicker.mjs +31 -36
- package/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +4 -4
- package/esm2022/column-resize/column-resize-directives/column-resize.mjs +4 -4
- package/esm2022/column-resize/column-resize-module.mjs +4 -4
- package/esm2022/column-resize/column-resize-notifier.mjs +7 -7
- package/esm2022/column-resize/column-resize.mjs +3 -3
- package/esm2022/column-resize/column-size-store.mjs +3 -3
- package/esm2022/column-resize/event-dispatcher.mjs +4 -4
- package/esm2022/column-resize/overlay-handle.mjs +3 -3
- package/esm2022/column-resize/resizable.mjs +3 -3
- package/esm2022/column-resize/resize-strategy.mjs +13 -13
- package/esm2022/core/datetime/datetime.module.mjs +8 -8
- package/esm2022/core/datetime/native-datetime-adapter.mjs +5 -5
- package/esm2022/core/pipes/is-template-ref.pipe.mjs +3 -3
- package/esm2022/core/pipes/pipes.module.mjs +4 -4
- package/esm2022/core/pipes/to-observable.pipe.mjs +3 -3
- package/esm2022/datetimepicker/calendar-body.mjs +5 -6
- package/esm2022/datetimepicker/calendar.mjs +30 -47
- package/esm2022/datetimepicker/clock.mjs +10 -9
- package/esm2022/datetimepicker/datetimepicker-input.mjs +14 -15
- package/esm2022/datetimepicker/datetimepicker-intl.mjs +3 -3
- package/esm2022/datetimepicker/datetimepicker-module.mjs +4 -4
- package/esm2022/datetimepicker/datetimepicker-toggle.mjs +18 -18
- package/esm2022/datetimepicker/datetimepicker.mjs +57 -80
- package/esm2022/datetimepicker/month-view.mjs +8 -9
- package/esm2022/datetimepicker/multi-year-view.mjs +8 -8
- package/esm2022/datetimepicker/time.mjs +18 -24
- package/esm2022/datetimepicker/year-view.mjs +8 -8
- package/esm2022/dialog/dialog-container.mjs +7 -7
- package/esm2022/dialog/dialog-module.mjs +4 -4
- package/esm2022/dialog/dialog.mjs +4 -4
- package/esm2022/drawer/drawer-container.mjs +7 -7
- package/esm2022/drawer/drawer-module.mjs +4 -4
- package/esm2022/drawer/drawer.mjs +5 -5
- package/esm2022/grid/cell.mjs +6 -6
- package/esm2022/grid/column-menu.mjs +5 -5
- package/esm2022/grid/column-resize/column-resize-directives/column-resize-flex.mjs +4 -4
- package/esm2022/grid/column-resize/column-resize-directives/column-resize.mjs +4 -4
- package/esm2022/grid/column-resize/column-resize-module.mjs +8 -8
- package/esm2022/grid/column-resize/overlay-handle.mjs +6 -6
- package/esm2022/grid/column-resize/resizable-directives/resizable.mjs +6 -6
- package/esm2022/grid/column-resize/resize-strategy.mjs +5 -5
- package/esm2022/grid/expansion-toggle.mjs +5 -5
- package/esm2022/grid/grid-module.mjs +4 -4
- package/esm2022/grid/grid-pipes.mjs +22 -22
- package/esm2022/grid/grid-utils.mjs +4 -4
- package/esm2022/grid/grid.mjs +76 -44
- package/esm2022/loader/loader-module.mjs +4 -4
- package/esm2022/loader/loader.mjs +17 -29
- package/esm2022/photoviewer/photoviewer-module.mjs +4 -4
- package/esm2022/photoviewer/photoviewer.mjs +7 -7
- package/esm2022/popover/popover-content.mjs +8 -8
- package/esm2022/popover/popover-module.mjs +4 -4
- package/esm2022/popover/popover-target.mjs +4 -4
- package/esm2022/popover/popover-trigger.mjs +6 -6
- package/esm2022/popover/popover.mjs +52 -137
- package/esm2022/progress/progress-module.mjs +4 -4
- package/esm2022/progress/progress.mjs +14 -25
- package/esm2022/select/option.mjs +11 -17
- package/esm2022/select/select-module.mjs +4 -4
- package/esm2022/select/select.mjs +13 -13
- package/esm2022/select/templates.mjs +44 -44
- package/esm2022/split/split-module.mjs +4 -4
- package/esm2022/split/split-pane.mjs +5 -5
- package/esm2022/split/split.mjs +7 -7
- package/esm2022/tooltip/tooltip-module.mjs +4 -4
- package/esm2022/tooltip/tooltip.mjs +22 -22
- package/fesm2022/mtxAlert.mjs +14 -21
- package/fesm2022/mtxAlert.mjs.map +1 -1
- package/fesm2022/mtxButton.mjs +17 -28
- package/fesm2022/mtxButton.mjs.map +1 -1
- package/fesm2022/mtxCheckboxGroup.mjs +21 -32
- package/fesm2022/mtxCheckboxGroup.mjs.map +1 -1
- package/fesm2022/mtxColorpicker.mjs +61 -64
- package/fesm2022/mtxColorpicker.mjs.map +1 -1
- package/fesm2022/mtxColumnResize.mjs +48 -48
- package/fesm2022/mtxCore.mjs +23 -23
- package/fesm2022/mtxDatetimepicker.mjs +150 -190
- package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
- package/fesm2022/mtxDialog.mjs +14 -14
- package/fesm2022/mtxDialog.mjs.map +1 -1
- package/fesm2022/mtxDrawer.mjs +17 -17
- package/fesm2022/mtxDrawer.mjs.map +1 -1
- package/fesm2022/mtxGrid.mjs +150 -118
- package/fesm2022/mtxGrid.mjs.map +1 -1
- package/fesm2022/mtxLoader.mjs +20 -32
- package/fesm2022/mtxLoader.mjs.map +1 -1
- package/fesm2022/mtxPhotoviewer.mjs +10 -10
- package/fesm2022/mtxPhotoviewer.mjs.map +1 -1
- package/fesm2022/mtxPopover.mjs +73 -158
- package/fesm2022/mtxPopover.mjs.map +1 -1
- package/fesm2022/mtxProgress.mjs +17 -28
- package/fesm2022/mtxProgress.mjs.map +1 -1
- package/fesm2022/mtxSelect.mjs +68 -73
- package/fesm2022/mtxSelect.mjs.map +1 -1
- package/fesm2022/mtxSplit.mjs +14 -14
- package/fesm2022/mtxSplit.mjs.map +1 -1
- package/fesm2022/mtxTooltip.mjs +26 -26
- package/fesm2022/mtxTooltip.mjs.map +1 -1
- package/grid/_grid-theme.scss +60 -24
- package/grid/column-menu.scss +32 -3
- package/grid/grid.d.ts +33 -1
- package/grid/grid.scss +36 -108
- package/loader/_loader-theme.scss +55 -22
- package/loader/loader.d.ts +4 -9
- package/loader/loader.scss +1 -1
- package/package.json +13 -19
- package/photoviewer/photoviewer.d.ts +1 -0
- package/popover/_popover-theme.scss +55 -22
- package/popover/popover.d.ts +23 -54
- package/popover/popover.scss +2 -2
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/progress/_progress-theme.scss +60 -22
- package/progress/progress.d.ts +4 -9
- package/progress/progress.scss +3 -3
- package/select/_select-theme.scss +66 -34
- package/select/option.d.ts +2 -5
- package/select/select.d.ts +1 -3
- package/select/select.scss +104 -127
- package/split/_split-theme.scss +62 -32
- package/split/split.scss +2 -4
- package/tooltip/_tooltip-theme.scss +66 -34
- package/_theming.scss +0 -16
- package/alert/_alert-theme.import.scss +0 -2
- package/button/_button-theme.import.scss +0 -2
- package/colorpicker/_colorpicker-theme.import.scss +0 -2
- package/core/style/_elevation.scss +0 -91
- package/core/style/_private.scss +0 -32
- package/core/style/_variables.scss +0 -44
- package/core/style/_vendor-prefixes.scss +0 -46
- package/core/theming/_palette.scss +0 -746
- package/core/theming/_theming.scss +0 -463
- package/core/typography/_typography-utils.scss +0 -101
- package/datetimepicker/_datetimepicker-theme.import.scss +0 -4
- package/drawer/_drawer-theme.import.scss +0 -2
- package/grid/_grid-theme.import.scss +0 -2
- package/loader/_loader-theme.import.scss +0 -2
- package/popover/_popover-theme.import.scss +0 -2
- package/progress/_progress-theme.import.scss +0 -2
- package/select/_select-density.scss +0 -68
- package/select/_select-theme.import.scss +0 -3
- package/split/_split-theme.import.scss +0 -2
- package/tooltip/_tooltip-theme.import.scss +0 -1
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import * as i1$
|
|
1
|
+
import * as i1$2 from '@angular/common';
|
|
2
2
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { forwardRef, EventEmitter, Directive, Optional, Input, Output, Component, ViewEncapsulation, ChangeDetectionStrategy, Attribute, ContentChild, ViewChild, InjectionToken, Inject, NgModule } from '@angular/core';
|
|
4
|
+
import { forwardRef, EventEmitter, booleanAttribute, Directive, Optional, Input, Output, Component, ViewEncapsulation, ChangeDetectionStrategy, Attribute, ContentChild, ViewChild, InjectionToken, Inject, NgModule } from '@angular/core';
|
|
5
5
|
import * as i3 from '@angular/cdk/overlay';
|
|
6
6
|
import { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
7
7
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
8
8
|
import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
|
|
9
|
-
import * as
|
|
9
|
+
import * as i1$1 from '@angular/material/button';
|
|
10
10
|
import { MatButtonModule } from '@angular/material/button';
|
|
11
|
-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
12
11
|
import { DOWN_ARROW, ESCAPE, hasModifierKey, UP_ARROW } from '@angular/cdk/keycodes';
|
|
13
12
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, Validators } from '@angular/forms';
|
|
14
13
|
import { MAT_INPUT_VALUE_ACCESSOR } from '@angular/material/input';
|
|
@@ -16,9 +15,9 @@ import { Subscription, of, merge, Subject } from 'rxjs';
|
|
|
16
15
|
import * as i1 from '@angular/material/form-field';
|
|
17
16
|
import { mixinColor } from '@angular/material/core';
|
|
18
17
|
import { take, filter } from 'rxjs/operators';
|
|
19
|
-
import {
|
|
18
|
+
import { style, keyframes, animate, transition, trigger } from '@angular/animations';
|
|
20
19
|
import { TinyColor } from '@ctrl/tinycolor';
|
|
21
|
-
import * as i2
|
|
20
|
+
import * as i2 from 'ngx-color/chrome';
|
|
22
21
|
import { ColorChromeModule } from 'ngx-color/chrome';
|
|
23
22
|
import * as i4 from '@angular/cdk/bidi';
|
|
24
23
|
|
|
@@ -64,17 +63,16 @@ class MtxColorpickerInput {
|
|
|
64
63
|
return !!this._disabled;
|
|
65
64
|
}
|
|
66
65
|
set disabled(value) {
|
|
67
|
-
const newValue = coerceBooleanProperty(value);
|
|
68
66
|
const element = this._elementRef.nativeElement;
|
|
69
|
-
if (this._disabled !==
|
|
70
|
-
this._disabled =
|
|
71
|
-
this._disabledChange.emit(
|
|
67
|
+
if (this._disabled !== value) {
|
|
68
|
+
this._disabled = value;
|
|
69
|
+
this._disabledChange.emit(value);
|
|
72
70
|
}
|
|
73
71
|
// We need to null check the `blur` method, because it's undefined during SSR.
|
|
74
72
|
// In Ivy static bindings are invoked earlier, before the element is attached to the DOM.
|
|
75
73
|
// This can cause an error to be thrown in some browsers (IE/Edge) which assert that the
|
|
76
74
|
// element has been inserted.
|
|
77
|
-
if (
|
|
75
|
+
if (value && this._isInitialized && element.blur) {
|
|
78
76
|
// Normally, native input elements automatically blur if they turn disabled. This behavior
|
|
79
77
|
// is problematic, because it would mean that it triggers another change detection cycle,
|
|
80
78
|
// which then causes a changed after checked error if the input element was focused before.
|
|
@@ -198,14 +196,14 @@ class MtxColorpickerInput {
|
|
|
198
196
|
_formatValue(value) {
|
|
199
197
|
this._elementRef.nativeElement.value = value ? value : '';
|
|
200
198
|
}
|
|
201
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
202
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
199
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxColorpickerInput, deps: [{ token: i0.ElementRef }, { token: i1.MatFormField, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
200
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.0.7", type: MtxColorpickerInput, 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: [
|
|
203
201
|
MTX_COLORPICKER_VALUE_ACCESSOR,
|
|
204
202
|
MTX_COLORPICKER_VALIDATORS,
|
|
205
203
|
{ provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: MtxColorpickerInput },
|
|
206
204
|
], exportAs: ["mtxColorpickerInput"], ngImport: i0 }); }
|
|
207
205
|
}
|
|
208
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
206
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxColorpickerInput, decorators: [{
|
|
209
207
|
type: Directive,
|
|
210
208
|
args: [{
|
|
211
209
|
selector: 'input[mtxColorpicker]',
|
|
@@ -226,12 +224,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImpor
|
|
|
226
224
|
},
|
|
227
225
|
exportAs: 'mtxColorpickerInput',
|
|
228
226
|
}]
|
|
229
|
-
}], ctorParameters:
|
|
227
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.MatFormField, decorators: [{
|
|
230
228
|
type: Optional
|
|
231
|
-
}] }]
|
|
229
|
+
}] }], propDecorators: { mtxColorpicker: [{
|
|
232
230
|
type: Input
|
|
233
231
|
}], disabled: [{
|
|
234
|
-
type: Input
|
|
232
|
+
type: Input,
|
|
233
|
+
args: [{ transform: booleanAttribute }]
|
|
235
234
|
}], value: [{
|
|
236
235
|
type: Input
|
|
237
236
|
}], format: [{
|
|
@@ -244,10 +243,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImpor
|
|
|
244
243
|
|
|
245
244
|
/** Can be used to override the icon of a `mtxColorpickerToggle`. */
|
|
246
245
|
class MtxColorpickerToggleIcon {
|
|
247
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
248
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
246
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxColorpickerToggleIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
247
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.7", type: MtxColorpickerToggleIcon, selector: "[mtxColorpickerToggleIcon]", ngImport: i0 }); }
|
|
249
248
|
}
|
|
250
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
249
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxColorpickerToggleIcon, decorators: [{
|
|
251
250
|
type: Directive,
|
|
252
251
|
args: [{
|
|
253
252
|
selector: '[mtxColorpickerToggleIcon]',
|
|
@@ -262,7 +261,7 @@ class MtxColorpickerToggle {
|
|
|
262
261
|
return !!this._disabled;
|
|
263
262
|
}
|
|
264
263
|
set disabled(value) {
|
|
265
|
-
this._disabled =
|
|
264
|
+
this._disabled = value;
|
|
266
265
|
}
|
|
267
266
|
constructor(_changeDetectorRef, defaultTabIndex) {
|
|
268
267
|
this._changeDetectorRef = _changeDetectorRef;
|
|
@@ -298,10 +297,10 @@ class MtxColorpickerToggle {
|
|
|
298
297
|
this._stateChanges.unsubscribe();
|
|
299
298
|
this._stateChanges = merge(pickerDisabled, inputDisabled, pickerToggled).subscribe(() => this._changeDetectorRef.markForCheck());
|
|
300
299
|
}
|
|
301
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
302
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
300
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxColorpickerToggle, deps: [{ token: i0.ChangeDetectorRef }, { token: 'tabindex', attribute: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
301
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.7", type: MtxColorpickerToggle, 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 #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 <path 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 </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)}.mtx-colorpicker-toggle-active{color:var(--mtx-colorpicker-toggle-active-state-icon-color)}.cdk-high-contrast-active .mtx-colorpicker-toggle-default-icon{color:CanvasText}\n"], dependencies: [{ kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
303
302
|
}
|
|
304
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
303
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxColorpickerToggle, decorators: [{
|
|
305
304
|
type: Component,
|
|
306
305
|
args: [{ selector: 'mtx-colorpicker-toggle', host: {
|
|
307
306
|
'class': 'mtx-colorpicker-toggle',
|
|
@@ -313,11 +312,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImpor
|
|
|
313
312
|
// `stopPropagation` on it without affecting the user's `click` handlers. We need to stop
|
|
314
313
|
// it so that the input doesn't get focused automatically by the form field (See #21836).
|
|
315
314
|
'(click)': '_open($event)',
|
|
316
|
-
}, exportAs: 'mtxColorpickerToggle', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<button #button\n
|
|
317
|
-
}], ctorParameters:
|
|
315
|
+
}, exportAs: 'mtxColorpickerToggle', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<button #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 <path 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 </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)}.mtx-colorpicker-toggle-active{color:var(--mtx-colorpicker-toggle-active-state-icon-color)}.cdk-high-contrast-active .mtx-colorpicker-toggle-default-icon{color:CanvasText}\n"] }]
|
|
316
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
|
318
317
|
type: Attribute,
|
|
319
318
|
args: ['tabindex']
|
|
320
|
-
}] }]
|
|
319
|
+
}] }], propDecorators: { picker: [{
|
|
321
320
|
type: Input,
|
|
322
321
|
args: ['for']
|
|
323
322
|
}], tabIndex: [{
|
|
@@ -326,9 +325,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImpor
|
|
|
326
325
|
type: Input,
|
|
327
326
|
args: ['aria-label']
|
|
328
327
|
}], disabled: [{
|
|
329
|
-
type: Input
|
|
328
|
+
type: Input,
|
|
329
|
+
args: [{ transform: booleanAttribute }]
|
|
330
330
|
}], disableRipple: [{
|
|
331
|
-
type: Input
|
|
331
|
+
type: Input,
|
|
332
|
+
args: [{ transform: booleanAttribute }]
|
|
332
333
|
}], _customIcon: [{
|
|
333
334
|
type: ContentChild,
|
|
334
335
|
args: [MtxColorpickerToggleIcon]
|
|
@@ -395,17 +396,17 @@ class MtxColorpickerContent extends _MtxColorpickerContentBase {
|
|
|
395
396
|
hsv: new TinyColor(e.color.hsv).toHsvString(),
|
|
396
397
|
}[this.picker.format];
|
|
397
398
|
}
|
|
398
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
399
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
399
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxColorpickerContent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
400
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.7", type: MtxColorpickerContent, selector: "mtx-colorpicker-content", inputs: { color: "color" }, host: { listeners: { "@transformPanel.done": "_animationDone.next()" }, properties: { "@transformPanel": "_animationState" }, classAttribute: "mtx-colorpicker-content" }, exportAs: ["mtxColorpickerContent"], usesInheritance: true, ngImport: i0, template: "@if (picker.content) {\n <ng-template [ngTemplateOutlet]=\"picker.content\"></ng-template>\n} @else {\n <color-chrome [color]=\"picker.selected\" (onChangeComplete)=\"picker.select(getColorString($event))\" />\n}\n", styles: [".mtx-colorpicker-content{display:block;border-radius:4px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.ChromeComponent, selector: "color-chrome", inputs: ["disableAlpha"] }], animations: [mtxColorpickerAnimations.transformPanel], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
400
401
|
}
|
|
401
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
402
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxColorpickerContent, decorators: [{
|
|
402
403
|
type: Component,
|
|
403
404
|
args: [{ selector: 'mtx-colorpicker-content', host: {
|
|
404
405
|
'class': 'mtx-colorpicker-content',
|
|
405
406
|
'[@transformPanel]': '_animationState',
|
|
406
407
|
'(@transformPanel.done)': '_animationDone.next()',
|
|
407
|
-
}, animations: [mtxColorpickerAnimations.transformPanel], exportAs: 'mtxColorpickerContent', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, inputs: ['color'], template: "
|
|
408
|
-
}], ctorParameters:
|
|
408
|
+
}, animations: [mtxColorpickerAnimations.transformPanel], exportAs: 'mtxColorpickerContent', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, inputs: ['color'], template: "@if (picker.content) {\n <ng-template [ngTemplateOutlet]=\"picker.content\"></ng-template>\n} @else {\n <color-chrome [color]=\"picker.selected\" (onChangeComplete)=\"picker.select(getColorString($event))\" />\n}\n", styles: [".mtx-colorpicker-content{display:block;border-radius:4px}\n"] }]
|
|
409
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }] });
|
|
409
410
|
class MtxColorpicker {
|
|
410
411
|
get disabled() {
|
|
411
412
|
return this._disabled === undefined && this.pickerInput
|
|
@@ -413,29 +414,17 @@ class MtxColorpicker {
|
|
|
413
414
|
: !!this._disabled;
|
|
414
415
|
}
|
|
415
416
|
set disabled(value) {
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
this.
|
|
419
|
-
this._disabledChange.next(newValue);
|
|
417
|
+
if (value !== this._disabled) {
|
|
418
|
+
this._disabled = value;
|
|
419
|
+
this._disabledChange.next(value);
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
/**
|
|
423
|
-
* Whether to restore focus to the previously-focused element when the panel is closed.
|
|
424
|
-
* Note that automatic focus restoration is an accessibility feature and it is recommended that
|
|
425
|
-
* you provide your own equivalent, if you decide to turn it off.
|
|
426
|
-
*/
|
|
427
|
-
get restoreFocus() {
|
|
428
|
-
return this._restoreFocus;
|
|
429
|
-
}
|
|
430
|
-
set restoreFocus(value) {
|
|
431
|
-
this._restoreFocus = coerceBooleanProperty(value);
|
|
432
|
-
}
|
|
433
422
|
/** Whether the panel is open. */
|
|
434
423
|
get opened() {
|
|
435
424
|
return this._opened;
|
|
436
425
|
}
|
|
437
426
|
set opened(value) {
|
|
438
|
-
|
|
427
|
+
value ? this.open() : this.close();
|
|
439
428
|
}
|
|
440
429
|
/** Color palette to use on the colorpicker's panel. */
|
|
441
430
|
get color() {
|
|
@@ -473,7 +462,12 @@ class MtxColorpicker {
|
|
|
473
462
|
this.xPosition = 'start';
|
|
474
463
|
/** Preferred position of the colorpicker in the Y axis. */
|
|
475
464
|
this.yPosition = 'below';
|
|
476
|
-
|
|
465
|
+
/**
|
|
466
|
+
* Whether to restore focus to the previously-focused element when the panel is closed.
|
|
467
|
+
* Note that automatic focus restoration is an accessibility feature and it is recommended that
|
|
468
|
+
* you provide your own equivalent, if you decide to turn it off.
|
|
469
|
+
*/
|
|
470
|
+
this.restoreFocus = true;
|
|
477
471
|
this._opened = false;
|
|
478
472
|
/** The id for the colorpicker panel. */
|
|
479
473
|
this.id = `mtx-colorpicker-${colorpickerUid++}`;
|
|
@@ -547,7 +541,7 @@ class MtxColorpicker {
|
|
|
547
541
|
this._focusedElementBeforeOpen = null;
|
|
548
542
|
}
|
|
549
543
|
};
|
|
550
|
-
if (this.
|
|
544
|
+
if (this.restoreFocus &&
|
|
551
545
|
this._focusedElementBeforeOpen &&
|
|
552
546
|
typeof this._focusedElementBeforeOpen.focus === 'function') {
|
|
553
547
|
// Because IE moves focus asynchronously, we can't count on it being restored before we've
|
|
@@ -655,10 +649,10 @@ class MtxColorpicker {
|
|
|
655
649
|
(this.pickerInput && hasModifierKey(event, 'altKey') && event.keyCode === UP_ARROW));
|
|
656
650
|
})));
|
|
657
651
|
}
|
|
658
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
659
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
652
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxColorpicker, deps: [{ token: i3.Overlay }, { token: i0.NgZone }, { token: i0.ViewContainerRef }, { token: MTX_COLORPICKER_SCROLL_STRATEGY }, { token: i4.Directionality, optional: true }, { token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
653
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.0.7", type: MtxColorpicker, 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 }); }
|
|
660
654
|
}
|
|
661
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
655
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxColorpicker, decorators: [{
|
|
662
656
|
type: Component,
|
|
663
657
|
args: [{
|
|
664
658
|
selector: 'mtx-colorpicker',
|
|
@@ -667,7 +661,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImpor
|
|
|
667
661
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
668
662
|
encapsulation: ViewEncapsulation.None,
|
|
669
663
|
}]
|
|
670
|
-
}], ctorParameters:
|
|
664
|
+
}], ctorParameters: () => [{ type: i3.Overlay }, { type: i0.NgZone }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
|
|
671
665
|
type: Inject,
|
|
672
666
|
args: [MTX_COLORPICKER_SCROLL_STRATEGY]
|
|
673
667
|
}] }, { type: i4.Directionality, decorators: [{
|
|
@@ -677,7 +671,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImpor
|
|
|
677
671
|
}, {
|
|
678
672
|
type: Inject,
|
|
679
673
|
args: [DOCUMENT]
|
|
680
|
-
}] }]
|
|
674
|
+
}] }], propDecorators: { content: [{
|
|
681
675
|
type: Input
|
|
682
676
|
}], openedStream: [{
|
|
683
677
|
type: Output,
|
|
@@ -686,15 +680,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImpor
|
|
|
686
680
|
type: Output,
|
|
687
681
|
args: ['closed']
|
|
688
682
|
}], disabled: [{
|
|
689
|
-
type: Input
|
|
683
|
+
type: Input,
|
|
684
|
+
args: [{ transform: booleanAttribute }]
|
|
690
685
|
}], xPosition: [{
|
|
691
686
|
type: Input
|
|
692
687
|
}], yPosition: [{
|
|
693
688
|
type: Input
|
|
694
689
|
}], restoreFocus: [{
|
|
695
|
-
type: Input
|
|
690
|
+
type: Input,
|
|
691
|
+
args: [{ transform: booleanAttribute }]
|
|
696
692
|
}], opened: [{
|
|
697
|
-
type: Input
|
|
693
|
+
type: Input,
|
|
694
|
+
args: [{ transform: booleanAttribute }]
|
|
698
695
|
}], color: [{
|
|
699
696
|
type: Input
|
|
700
697
|
}], format: [{
|
|
@@ -702,8 +699,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImpor
|
|
|
702
699
|
}] } });
|
|
703
700
|
|
|
704
701
|
class MtxColorpickerModule {
|
|
705
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
706
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
702
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxColorpickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
703
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.7", ngImport: i0, type: MtxColorpickerModule, declarations: [MtxColorpicker,
|
|
707
704
|
MtxColorpickerContent,
|
|
708
705
|
MtxColorpickerInput,
|
|
709
706
|
MtxColorpickerToggle,
|
|
@@ -717,14 +714,14 @@ class MtxColorpickerModule {
|
|
|
717
714
|
MtxColorpickerInput,
|
|
718
715
|
MtxColorpickerToggle,
|
|
719
716
|
MtxColorpickerToggleIcon] }); }
|
|
720
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
717
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxColorpickerModule, providers: [MTX_COLORPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [CommonModule,
|
|
721
718
|
OverlayModule,
|
|
722
719
|
A11yModule,
|
|
723
720
|
PortalModule,
|
|
724
721
|
MatButtonModule,
|
|
725
722
|
ColorChromeModule] }); }
|
|
726
723
|
}
|
|
727
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
724
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxColorpickerModule, decorators: [{
|
|
728
725
|
type: NgModule,
|
|
729
726
|
args: [{
|
|
730
727
|
imports: [
|