@ng-matero/extensions 19.4.1 → 20.0.1
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 +1 -1
- package/alert/_alert-theme.scss +26 -31
- package/alert/_m2-alert.scss +59 -0
- package/alert/_m3-alert.scss +41 -0
- package/alert/alert.scss +27 -31
- package/alert/index.d.ts +30 -5
- package/button/index.d.ts +31 -5
- package/checkbox-group/index.d.ts +117 -5
- package/colorpicker/_colorpicker-theme.scss +31 -36
- package/{core/tokens/m2/mtx/_colorpicker.scss → colorpicker/_m2-colorpicker.scss} +6 -10
- package/colorpicker/_m3-colorpicker.scss +23 -0
- package/colorpicker/colorpicker-toggle.scss +4 -9
- package/colorpicker/index.d.ts +285 -3
- package/column-resize/index.d.ts +456 -3
- package/core/index.d.ts +147 -5
- package/core/theming/_color-api-backwards-compatibility.scss +8 -15
- package/core/theming/_definition.scss +81 -75
- package/core/theming/_palettes.scss +1036 -0
- package/core/tokens/{m2/_index.scss → _m2-tokens.scss} +22 -22
- package/core/tokens/_m2-utils.scss +108 -0
- package/core/tokens/_m3-system.scss +128 -106
- package/core/tokens/_m3-tokens.scss +36 -282
- package/core/tokens/_m3-utils.scss +48 -0
- package/core/tokens/_token-utils.scss +67 -239
- package/core/tokens/m3/_index.scss +7 -0
- package/core/tokens/m3/_md-sys-color.scss +156 -0
- package/core/tokens/m3/_md-sys-elevation.scss +15 -0
- package/core/tokens/m3/_md-sys-motion.scss +35 -0
- package/core/tokens/m3/_md-sys-shape.scss +21 -0
- package/core/tokens/m3/_md-sys-state.scss +13 -0
- package/core/tokens/m3/_md-sys-typescale.scss +128 -0
- package/core/tokens/m3/_theme.scss +47 -0
- package/datetimepicker/_datetimepicker-theme.scss +29 -39
- package/datetimepicker/_m2-datetimepicker.scss +149 -0
- package/datetimepicker/_m3-datetimepicker.scss +81 -0
- package/datetimepicker/calendar-body.scss +31 -56
- package/datetimepicker/calendar.scss +43 -79
- package/datetimepicker/clock.scss +28 -47
- package/datetimepicker/datetimepicker-content.scss +9 -15
- package/datetimepicker/datetimepicker-toggle.scss +4 -9
- package/datetimepicker/index.d.ts +1208 -3
- package/datetimepicker/time-view.scss +26 -32
- package/dialog/index.d.ts +54 -5
- package/drawer/_drawer-theme.scss +25 -30
- package/{core/tokens/m2/mtx/_drawer.scss → drawer/_m2-drawer.scss} +9 -12
- package/drawer/_m3-drawer.scss +24 -0
- package/drawer/drawer-container.scss +13 -24
- package/drawer/index.d.ts +221 -3
- package/fesm2022/mtxAlert.mjs +7 -7
- package/fesm2022/mtxAlert.mjs.map +1 -1
- package/fesm2022/mtxButton.mjs +11 -11
- package/fesm2022/mtxButton.mjs.map +1 -1
- package/fesm2022/mtxCheckboxGroup.mjs +7 -7
- package/fesm2022/mtxColorpicker.mjs +21 -21
- package/fesm2022/mtxColorpicker.mjs.map +1 -1
- package/fesm2022/mtxColumnResize.mjs +232 -103
- package/fesm2022/mtxColumnResize.mjs.map +1 -1
- package/fesm2022/mtxCore.mjs +21 -21
- package/fesm2022/mtxDatetimepicker.mjs +63 -67
- package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
- package/fesm2022/mtxDialog.mjs +10 -10
- package/fesm2022/mtxDialog.mjs.map +1 -1
- package/fesm2022/mtxDrawer.mjs +10 -10
- package/fesm2022/mtxGrid.mjs +78 -77
- package/fesm2022/mtxGrid.mjs.map +1 -1
- package/fesm2022/mtxLoader.mjs +7 -7
- package/fesm2022/mtxPhotoviewer.mjs +7 -7
- package/fesm2022/mtxPopover.mjs +24 -25
- package/fesm2022/mtxPopover.mjs.map +1 -1
- package/fesm2022/mtxProgress.mjs +7 -7
- package/fesm2022/mtxSelect.mjs +54 -54
- package/fesm2022/mtxSelect.mjs.map +1 -1
- package/fesm2022/mtxSplit.mjs +10 -10
- package/fesm2022/mtxTooltip.mjs +13 -13
- package/fesm2022/mtxTooltip.mjs.map +1 -1
- package/grid/_grid-theme.scss +24 -34
- package/grid/_m2-grid.scss +66 -0
- package/grid/_m3-grid.scss +35 -0
- package/grid/column-menu.scss +6 -23
- package/grid/column-resize/_column-resize.scss +35 -30
- package/grid/grid.scss +41 -74
- package/grid/index.d.ts +799 -3
- package/index.d.ts +2 -5
- package/loader/_loader-theme.scss +26 -31
- package/{core/tokens/m2/mtx/_loader.scss → loader/_m2-loader.scss} +5 -10
- package/loader/_m3-loader.scss +20 -0
- package/loader/index.d.ts +43 -5
- package/loader/loader.scss +4 -5
- package/package.json +28 -28
- package/photoviewer/index.d.ts +26 -5
- package/{core/tokens/m2/mtx/_popover.scss → popover/_m2-popover.scss} +9 -12
- package/popover/_m3-popover.scss +26 -0
- package/popover/_popover-theme.scss +26 -31
- package/popover/index.d.ts +399 -3
- package/popover/popover.scss +23 -29
- package/prebuilt-themes/azure-blue.css +1 -1
- package/prebuilt-themes/cyan-orange.css +1 -1
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/magenta-violet.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/prebuilt-themes/rose-red.css +1 -1
- package/progress/_m2-progress.scss +53 -0
- package/progress/_m3-progress.scss +33 -0
- package/progress/_progress-theme.scss +22 -34
- package/progress/index.d.ts +35 -5
- package/progress/progress.scss +28 -43
- package/select/_m2-select.scss +79 -0
- package/select/_m3-select.scss +46 -0
- package/select/_select-theme.scss +27 -37
- package/select/index.d.ts +381 -3
- package/select/select.scss +189 -205
- package/{core/tokens/m2/mtx/_split.scss → split/_m2-split.scss} +6 -9
- package/split/_m3-split.scss +23 -0
- package/split/_split-theme.scss +31 -34
- package/split/index.d.ts +255 -3
- package/split/split.scss +8 -11
- package/tooltip/_m2-tooltip.scss +50 -0
- package/tooltip/_m3-tooltip.scss +28 -0
- package/tooltip/_tooltip-theme.scss +23 -47
- package/tooltip/index.d.ts +345 -3
- package/tooltip/tooltip.scss +11 -15
- package/alert/alert-module.d.ts +0 -8
- package/alert/alert.d.ts +0 -19
- package/alert/public-api.d.ts +0 -2
- package/button/button-loading.d.ts +0 -19
- package/button/button-module.d.ts +0 -10
- package/button/public-api.d.ts +0 -2
- package/checkbox-group/checkbox-group-module.d.ts +0 -11
- package/checkbox-group/checkbox-group.d.ts +0 -86
- package/checkbox-group/interfaces.d.ts +0 -17
- package/checkbox-group/public-api.d.ts +0 -3
- package/colorpicker/colorpicker-animations.d.ts +0 -9
- package/colorpicker/colorpicker-input.d.ts +0 -88
- package/colorpicker/colorpicker-module.d.ts +0 -15
- package/colorpicker/colorpicker-toggle.d.ts +0 -39
- package/colorpicker/colorpicker.d.ts +0 -140
- package/colorpicker/public-api.d.ts +0 -5
- package/column-resize/column-resize-directives/column-resize-flex.d.ts +0 -29
- package/column-resize/column-resize-directives/column-resize.d.ts +0 -29
- package/column-resize/column-resize-directives/constants.d.ts +0 -10
- package/column-resize/column-resize-module.d.ts +0 -12
- package/column-resize/column-resize-notifier.d.ts +0 -48
- package/column-resize/column-resize.d.ts +0 -39
- package/column-resize/column-size-store.d.ts +0 -12
- package/column-resize/event-dispatcher.d.ts +0 -35
- package/column-resize/overlay-handle.d.ts +0 -43
- package/column-resize/polyfill.d.ts +0 -9
- package/column-resize/public-api.d.ts +0 -12
- package/column-resize/resizable.d.ts +0 -63
- package/column-resize/resize-ref.d.ts +0 -17
- package/column-resize/resize-strategy.d.ts +0 -84
- package/column-resize/selectors.d.ts +0 -10
- package/core/datetime/datetime-adapter.d.ts +0 -45
- package/core/datetime/datetime-formats.d.ts +0 -22
- package/core/datetime/datetime.module.d.ts +0 -15
- package/core/datetime/index.d.ts +0 -5
- package/core/datetime/native-datetime-adapter.d.ts +0 -40
- package/core/datetime/native-datetime-formats.d.ts +0 -2
- package/core/pipes/index.d.ts +0 -3
- package/core/pipes/is-template-ref.pipe.d.ts +0 -7
- package/core/pipes/pipes.module.d.ts +0 -9
- package/core/pipes/to-observable.pipe.d.ts +0 -8
- package/core/public-api.d.ts +0 -2
- package/core/theming/_inspection.scss +0 -38
- package/core/theming/_validation.scss +0 -5
- package/core/tokens/_density.scss +0 -49
- package/core/tokens/_format-tokens.scss +0 -5
- package/core/tokens/_token-definition.scss +0 -271
- package/core/tokens/m2/mdc/_plain-tooltip.scss +0 -63
- package/core/tokens/m2/mtx/_alert.scss +0 -62
- package/core/tokens/m2/mtx/_datetimepicker.scss +0 -152
- package/core/tokens/m2/mtx/_grid.scss +0 -69
- package/core/tokens/m2/mtx/_progress.scss +0 -56
- package/core/tokens/m2/mtx/_select.scss +0 -82
- package/core/tokens/m3/definitions/_index.scss +0 -9
- package/core/tokens/m3/definitions/_md-comp-plain-tooltip.scss +0 -51
- package/core/tokens/m3/definitions/_md-ref-palette.scss +0 -100
- package/core/tokens/m3/definitions/_md-ref-typeface.scss +0 -14
- package/core/tokens/m3/definitions/_md-sys-color.scss +0 -126
- package/core/tokens/m3/definitions/_md-sys-elevation.scss +0 -15
- package/core/tokens/m3/definitions/_md-sys-motion.scss +0 -46
- package/core/tokens/m3/definitions/_md-sys-shape.scss +0 -24
- package/core/tokens/m3/definitions/_md-sys-state.scss +0 -13
- package/core/tokens/m3/definitions/_md-sys-typescale.scss +0 -308
- package/core/tokens/m3/index.scss +0 -47
- package/core/tokens/m3/mdc/_plain-tooltip.scss +0 -15
- package/core/tokens/m3/mtx/_alert.scss +0 -41
- package/core/tokens/m3/mtx/_colorpicker.scss +0 -19
- package/core/tokens/m3/mtx/_datetimepicker.scss +0 -140
- package/core/tokens/m3/mtx/_drawer.scss +0 -22
- package/core/tokens/m3/mtx/_grid.scss +0 -32
- package/core/tokens/m3/mtx/_loader.scss +0 -22
- package/core/tokens/m3/mtx/_popover.scss +0 -25
- package/core/tokens/m3/mtx/_progress.scss +0 -32
- package/core/tokens/m3/mtx/_select.scss +0 -76
- package/core/tokens/m3/mtx/_split.scss +0 -30
- package/datetimepicker/calendar-body.d.ts +0 -66
- package/datetimepicker/calendar.d.ts +0 -157
- package/datetimepicker/clock.d.ts +0 -101
- package/datetimepicker/datetimepicker-actions.d.ts +0 -36
- package/datetimepicker/datetimepicker-animations.d.ts +0 -11
- package/datetimepicker/datetimepicker-errors.d.ts +0 -2
- package/datetimepicker/datetimepicker-filtertype.d.ts +0 -5
- package/datetimepicker/datetimepicker-input.d.ts +0 -105
- package/datetimepicker/datetimepicker-intl.d.ts +0 -53
- package/datetimepicker/datetimepicker-module.d.ts +0 -22
- package/datetimepicker/datetimepicker-toggle.d.ts +0 -42
- package/datetimepicker/datetimepicker-types.d.ts +0 -6
- package/datetimepicker/datetimepicker.d.ts +0 -274
- package/datetimepicker/month-view.d.ts +0 -80
- package/datetimepicker/multi-year-view.d.ts +0 -86
- package/datetimepicker/public-api.d.ts +0 -16
- package/datetimepicker/time-view.d.ts +0 -147
- package/datetimepicker/year-view.d.ts +0 -68
- package/dialog/dialog-config.d.ts +0 -17
- package/dialog/dialog-container.d.ts +0 -11
- package/dialog/dialog-module.d.ts +0 -12
- package/dialog/dialog.d.ts +0 -15
- package/dialog/public-api.d.ts +0 -4
- package/drawer/drawer-animations.d.ts +0 -8
- package/drawer/drawer-config.d.ts +0 -63
- package/drawer/drawer-container.d.ts +0 -35
- package/drawer/drawer-module.d.ts +0 -10
- package/drawer/drawer-ref.d.ts +0 -53
- package/drawer/drawer.d.ts +0 -59
- package/drawer/public-api.d.ts +0 -6
- package/grid/cell.d.ts +0 -32
- package/grid/column-menu.d.ts +0 -39
- package/grid/column-resize/column-resize-directives/column-resize-flex.d.ts +0 -24
- package/grid/column-resize/column-resize-directives/column-resize.d.ts +0 -24
- package/grid/column-resize/column-resize-directives/common.d.ts +0 -13
- package/grid/column-resize/column-resize-module.d.ts +0 -17
- package/grid/column-resize/index.d.ts +0 -7
- package/grid/column-resize/overlay-handle.d.ts +0 -32
- package/grid/column-resize/resizable-directives/common.d.ts +0 -19
- package/grid/column-resize/resizable-directives/resizable.d.ts +0 -32
- package/grid/column-resize/resize-strategy.d.ts +0 -20
- package/grid/expansion-toggle.d.ts +0 -17
- package/grid/grid-module.d.ts +0 -31
- package/grid/grid-pipes.d.ts +0 -39
- package/grid/grid-utils.d.ts +0 -33
- package/grid/grid.d.ts +0 -268
- package/grid/interfaces.d.ts +0 -180
- package/grid/public-api.d.ts +0 -17
- package/grid/selectable-cell.d.ts +0 -16
- package/loader/loader-module.d.ts +0 -10
- package/loader/loader.d.ts +0 -30
- package/loader/public-api.d.ts +0 -2
- package/photoviewer/photoviewer-module.d.ts +0 -7
- package/photoviewer/photoviewer.d.ts +0 -17
- package/photoviewer/public-api.d.ts +0 -2
- package/popover/popover-animations.d.ts +0 -11
- package/popover/popover-content.d.ts +0 -43
- package/popover/popover-errors.d.ts +0 -14
- package/popover/popover-interfaces.d.ts +0 -50
- package/popover/popover-module.d.ts +0 -13
- package/popover/popover-target.d.ts +0 -7
- package/popover/popover-trigger.d.ts +0 -132
- package/popover/popover-types.d.ts +0 -10
- package/popover/popover.d.ts +0 -147
- package/popover/public-api.d.ts +0 -8
- package/progress/progress-module.d.ts +0 -8
- package/progress/progress.d.ts +0 -24
- package/progress/public-api.d.ts +0 -2
- package/public-api.d.ts +0 -2
- package/select/option.d.ts +0 -21
- package/select/public-api.d.ts +0 -5
- package/select/select-intl.d.ts +0 -18
- package/select/select-module.d.ts +0 -12
- package/select/select.d.ts +0 -270
- package/select/templates.d.ts +0 -67
- package/split/interfaces.d.ts +0 -52
- package/split/public-api.d.ts +0 -5
- package/split/split-module.d.ts +0 -9
- package/split/split-pane.d.ts +0 -53
- package/split/split.d.ts +0 -133
- package/split/utils.d.ts +0 -13
- package/tooltip/public-api.d.ts +0 -3
- package/tooltip/tooltip-animations.d.ts +0 -9
- package/tooltip/tooltip-module.d.ts +0 -13
- package/tooltip/tooltip.d.ts +0 -321
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../core/tokens/m3-utils';
|
|
3
|
+
@use '../core/tokens/m3';
|
|
4
|
+
|
|
5
|
+
/// Generates custom tokens for the mtx-colorpicker.
|
|
6
|
+
@function get-tokens($theme: m3.$sys-theme, $color-variant: null) {
|
|
7
|
+
$system: m3-utils.get-system($theme);
|
|
8
|
+
@if $color-variant {
|
|
9
|
+
$system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
$tokens: (
|
|
13
|
+
base: (),
|
|
14
|
+
color: (
|
|
15
|
+
colorpicker-toggle-active-state-icon-color: map.get($system, on-surface-variant),
|
|
16
|
+
colorpicker-toggle-icon-color: map.get($system, on-surface-variant),
|
|
17
|
+
),
|
|
18
|
+
typography: (),
|
|
19
|
+
density: (),
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
@return $tokens;
|
|
23
|
+
}
|
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
@use '@angular/cdk';
|
|
2
2
|
@use '../core/tokens/token-utils';
|
|
3
|
-
@use '
|
|
3
|
+
@use './m3-colorpicker';
|
|
4
4
|
|
|
5
|
-
$
|
|
5
|
+
$fallbacks: m3-colorpicker.get-tokens();
|
|
6
6
|
|
|
7
7
|
// We support the case where the form field is disabled, but the colorpicker is not.
|
|
8
8
|
// MDC sets `pointer-events: none` on disabled form fields which prevents clicks on the toggle.
|
|
9
9
|
.mtx-colorpicker-toggle {
|
|
10
10
|
pointer-events: auto;
|
|
11
|
-
|
|
12
|
-
@include token-utils.use-tokens($_tokens...) {
|
|
13
|
-
@include token-utils.create-token-slot(color, toggle-icon-color);
|
|
14
|
-
}
|
|
11
|
+
color: token-utils.slot(colorpicker-toggle-icon-color, $fallbacks);
|
|
15
12
|
}
|
|
16
13
|
|
|
17
14
|
.mtx-colorpicker-toggle-active {
|
|
18
|
-
|
|
19
|
-
@include token-utils.create-token-slot(color, toggle-active-state-icon-color);
|
|
20
|
-
}
|
|
15
|
+
color: token-utils.slot(colorpicker-toggle-active-state-icon-color, $fallbacks);
|
|
21
16
|
}
|
|
22
17
|
|
|
23
18
|
@include cdk.high-contrast(active, off) {
|
package/colorpicker/index.d.ts
CHANGED
|
@@ -1,5 +1,287 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { AfterViewInit, OnDestroy, EventEmitter, ElementRef, InjectionToken, OnChanges, TemplateRef, AfterContentInit, SimpleChanges } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import * as i2 from '@angular/cdk/overlay';
|
|
5
|
+
import { ScrollStrategy, Overlay } from '@angular/cdk/overlay';
|
|
6
|
+
import * as i3 from '@angular/cdk/a11y';
|
|
7
|
+
import * as i4 from '@angular/cdk/portal';
|
|
8
|
+
import * as i5 from '@angular/material/button';
|
|
9
|
+
import { MatButton } from '@angular/material/button';
|
|
10
|
+
import * as i6 from 'ngx-color/chrome';
|
|
11
|
+
import { ThemePalette } from '@angular/material/core';
|
|
12
|
+
import { Subject } from 'rxjs';
|
|
13
|
+
import { ColorEvent } from 'ngx-color';
|
|
14
|
+
import { ControlValueAccessor, AbstractControl, ValidationErrors } from '@angular/forms';
|
|
15
|
+
|
|
16
|
+
declare class MtxColorPickerInputEvent {
|
|
17
|
+
/** Reference to the colorpicker input component that emitted the event. */
|
|
18
|
+
target: MtxColorpickerInput;
|
|
19
|
+
/** Reference to the native input element associated with the colorpicker input. */
|
|
20
|
+
targetElement: HTMLElement;
|
|
21
|
+
/** The new value for the target colorpicker input. */
|
|
22
|
+
value: string | null;
|
|
23
|
+
constructor(
|
|
24
|
+
/** Reference to the colorpicker input component that emitted the event. */
|
|
25
|
+
target: MtxColorpickerInput,
|
|
26
|
+
/** Reference to the native input element associated with the colorpicker input. */
|
|
27
|
+
targetElement: HTMLElement);
|
|
28
|
+
}
|
|
29
|
+
declare const MTX_COLORPICKER_VALUE_ACCESSOR: any;
|
|
30
|
+
declare const MTX_COLORPICKER_VALIDATORS: any;
|
|
31
|
+
type ColorFormat = 'hex' | 'rgb' | 'hsl' | 'hsv';
|
|
32
|
+
declare class MtxColorpickerInput implements ControlValueAccessor, AfterViewInit, OnDestroy {
|
|
33
|
+
private _elementRef;
|
|
34
|
+
private _formField;
|
|
35
|
+
/** Whether the component has been initialized. */
|
|
36
|
+
private _isInitialized;
|
|
37
|
+
set mtxColorpicker(value: MtxColorpicker);
|
|
38
|
+
_picker: MtxColorpicker;
|
|
39
|
+
/** Whether the colorpicker-input is disabled. */
|
|
40
|
+
get disabled(): boolean;
|
|
41
|
+
set disabled(value: boolean);
|
|
42
|
+
private _disabled;
|
|
43
|
+
/** The value of the input. */
|
|
44
|
+
get value(): string | null;
|
|
45
|
+
set value(value: string | null);
|
|
46
|
+
private _value;
|
|
47
|
+
/** The input and output color format. */
|
|
48
|
+
format: ColorFormat;
|
|
49
|
+
/** Emits when a `change` event is fired on this `<input>`. */
|
|
50
|
+
readonly colorChange: EventEmitter<MtxColorPickerInputEvent>;
|
|
51
|
+
/** Emits when an `input` event is fired on this `<input>`. */
|
|
52
|
+
readonly colorInput: EventEmitter<MtxColorPickerInputEvent>;
|
|
53
|
+
/** Emits when the disabled state has changed */
|
|
54
|
+
_disabledChange: EventEmitter<boolean>;
|
|
55
|
+
/** Emits when the value changes (either due to user input or programmatic change). */
|
|
56
|
+
_valueChange: EventEmitter<string | null>;
|
|
57
|
+
_onTouched: () => void;
|
|
58
|
+
_validatorOnChange: () => void;
|
|
59
|
+
private _cvaOnChange;
|
|
60
|
+
private _pickerSubscription;
|
|
61
|
+
/** The combined form control validator for this input. */
|
|
62
|
+
private _validator;
|
|
63
|
+
/** Whether the last value set on the input was valid. */
|
|
64
|
+
private _lastValueValid;
|
|
65
|
+
ngAfterViewInit(): void;
|
|
66
|
+
ngOnDestroy(): void;
|
|
67
|
+
registerOnValidatorChange(fn: () => void): void;
|
|
68
|
+
/** @docs-private */
|
|
69
|
+
validate(c: AbstractControl): ValidationErrors | null;
|
|
70
|
+
/**
|
|
71
|
+
* @deprecated
|
|
72
|
+
* @breaking-change 8.0.0 Use `getConnectedOverlayOrigin` instead
|
|
73
|
+
*/
|
|
74
|
+
getPopupConnectionElementRef(): ElementRef;
|
|
75
|
+
/**
|
|
76
|
+
* Gets the element that the colorpicker popup should be connected to.
|
|
77
|
+
* @return The element to connect the popup to.
|
|
78
|
+
*/
|
|
79
|
+
getConnectedOverlayOrigin(): ElementRef;
|
|
80
|
+
/** Gets the ID of an element that should be used a description for the overlay. */
|
|
81
|
+
getOverlayLabelId(): string | null;
|
|
82
|
+
writeValue(value: string): void;
|
|
83
|
+
registerOnChange(fn: (value: any) => void): void;
|
|
84
|
+
registerOnTouched(fn: () => void): void;
|
|
85
|
+
setDisabledState(isDisabled: boolean): void;
|
|
86
|
+
_onKeydown(event: KeyboardEvent): void;
|
|
87
|
+
/** Handles blur events on the input. */
|
|
88
|
+
_onBlur(): void;
|
|
89
|
+
_onInput(value: string): void;
|
|
90
|
+
_onChange(): void;
|
|
91
|
+
/** Returns the palette used by the input's form field, if any. */
|
|
92
|
+
getThemePalette(): ThemePalette;
|
|
93
|
+
/** TODO: Formats a value and sets it on the input element. */
|
|
94
|
+
private _formatValue;
|
|
95
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MtxColorpickerInput, never>;
|
|
96
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MtxColorpickerInput, "input[mtxColorpicker]", ["mtxColorpickerInput"], { "mtxColorpicker": { "alias": "mtxColorpicker"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "value": { "alias": "value"; "required": false; }; "format": { "alias": "format"; "required": false; }; }, { "colorChange": "colorChange"; "colorInput": "colorInput"; }, never, never, true, never>;
|
|
97
|
+
static ngAcceptInputType_disabled: unknown;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** Injection token that determines the scroll handling while the panel is open. */
|
|
101
|
+
declare const MTX_COLORPICKER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
|
|
1
102
|
/**
|
|
2
|
-
*
|
|
103
|
+
* @docs-private
|
|
104
|
+
* @deprecated No longer used, will be removed.
|
|
105
|
+
* @breaking-change 21.0.0
|
|
3
106
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
107
|
+
declare function MTX_COLORPICKER_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy;
|
|
108
|
+
/** Possible positions for the colorpicker dropdown along the X axis. */
|
|
109
|
+
type ColorpickerDropdownPositionX = 'start' | 'end';
|
|
110
|
+
/** Possible positions for the colorpicker dropdown along the Y axis. */
|
|
111
|
+
type ColorpickerDropdownPositionY = 'above' | 'below';
|
|
112
|
+
/**
|
|
113
|
+
* @docs-private
|
|
114
|
+
* @deprecated No longer used, will be removed.
|
|
115
|
+
* @breaking-change 21.0.0
|
|
116
|
+
*/
|
|
117
|
+
declare const MTX_COLORPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER: {
|
|
118
|
+
provide: InjectionToken<() => ScrollStrategy>;
|
|
119
|
+
deps: (typeof Overlay)[];
|
|
120
|
+
useFactory: typeof MTX_COLORPICKER_SCROLL_STRATEGY_FACTORY;
|
|
121
|
+
};
|
|
122
|
+
declare class MtxColorpickerContent implements OnDestroy {
|
|
123
|
+
protected _elementRef: ElementRef<HTMLElement>;
|
|
124
|
+
protected _animationsDisabled: boolean;
|
|
125
|
+
private _changeDetectorRef;
|
|
126
|
+
private _ngZone;
|
|
127
|
+
private _eventCleanups;
|
|
128
|
+
private _animationFallback;
|
|
129
|
+
color: ThemePalette;
|
|
130
|
+
picker: MtxColorpicker;
|
|
131
|
+
/** Emits when an animation has finished. */
|
|
132
|
+
readonly _animationDone: Subject<void>;
|
|
133
|
+
/** Whether there is an in-progress animation. */
|
|
134
|
+
_isAnimating: boolean;
|
|
135
|
+
constructor();
|
|
136
|
+
ngOnDestroy(): void;
|
|
137
|
+
_startExitAnimation(): void;
|
|
138
|
+
private _handleAnimationEvent;
|
|
139
|
+
getColorString(e: ColorEvent): string;
|
|
140
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MtxColorpickerContent, never>;
|
|
141
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MtxColorpickerContent, "mtx-colorpicker-content", ["mtxColorpickerContent"], { "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>;
|
|
142
|
+
}
|
|
143
|
+
declare class MtxColorpicker implements OnChanges, OnDestroy {
|
|
144
|
+
private _overlay;
|
|
145
|
+
private _viewContainerRef;
|
|
146
|
+
private _dir?;
|
|
147
|
+
private _document?;
|
|
148
|
+
private _scrollStrategy;
|
|
149
|
+
private _inputStateChanges;
|
|
150
|
+
/** Custom colorpicker content set by the consumer. */
|
|
151
|
+
content: TemplateRef<any>;
|
|
152
|
+
/** Emits when the colorpicker has been opened. */
|
|
153
|
+
openedStream: EventEmitter<void>;
|
|
154
|
+
/** Emits when the colorpicker has been closed. */
|
|
155
|
+
closedStream: EventEmitter<void>;
|
|
156
|
+
get disabled(): boolean;
|
|
157
|
+
set disabled(value: boolean);
|
|
158
|
+
private _disabled;
|
|
159
|
+
/** Preferred position of the colorpicker in the X axis. */
|
|
160
|
+
xPosition: ColorpickerDropdownPositionX;
|
|
161
|
+
/** Preferred position of the colorpicker in the Y axis. */
|
|
162
|
+
yPosition: ColorpickerDropdownPositionY;
|
|
163
|
+
/**
|
|
164
|
+
* Whether to restore focus to the previously-focused element when the panel is closed.
|
|
165
|
+
* Note that automatic focus restoration is an accessibility feature and it is recommended that
|
|
166
|
+
* you provide your own equivalent, if you decide to turn it off.
|
|
167
|
+
*/
|
|
168
|
+
restoreFocus: boolean;
|
|
169
|
+
/** Whether the panel is open. */
|
|
170
|
+
get opened(): boolean;
|
|
171
|
+
set opened(value: boolean);
|
|
172
|
+
private _opened;
|
|
173
|
+
/** The id for the colorpicker panel. */
|
|
174
|
+
id: string;
|
|
175
|
+
/** Color palette to use on the colorpicker's panel. */
|
|
176
|
+
get color(): ThemePalette;
|
|
177
|
+
set color(value: ThemePalette);
|
|
178
|
+
private _color;
|
|
179
|
+
/** The input and output color format. */
|
|
180
|
+
get format(): ColorFormat;
|
|
181
|
+
set format(value: ColorFormat);
|
|
182
|
+
_format: ColorFormat;
|
|
183
|
+
/** The currently selected color. */
|
|
184
|
+
get selected(): string;
|
|
185
|
+
set selected(value: string);
|
|
186
|
+
private _validSelected;
|
|
187
|
+
/** A reference to the overlay when the picker is opened as a popup. */
|
|
188
|
+
private _overlayRef;
|
|
189
|
+
/** Reference to the component instance rendered in the overlay. */
|
|
190
|
+
private _componentRef;
|
|
191
|
+
/** The element that was focused before the colorpicker was opened. */
|
|
192
|
+
private _focusedElementBeforeOpen;
|
|
193
|
+
/** Unique class that will be added to the backdrop so that the test harnesses can look it up. */
|
|
194
|
+
private _backdropHarnessClass;
|
|
195
|
+
/** The input element this colorpicker is associated with. */
|
|
196
|
+
pickerInput: MtxColorpickerInput;
|
|
197
|
+
/** Emits when the colorpicker is disabled. */
|
|
198
|
+
readonly _disabledChange: Subject<boolean>;
|
|
199
|
+
/** Emits new selected color when selected color changes. */
|
|
200
|
+
readonly _selectedChanged: Subject<string>;
|
|
201
|
+
private _injector;
|
|
202
|
+
ngOnChanges(): void;
|
|
203
|
+
ngOnDestroy(): void;
|
|
204
|
+
/** Selects the given color. */
|
|
205
|
+
select(nextVal: string): void;
|
|
206
|
+
/**
|
|
207
|
+
* Register an input with this colorpicker.
|
|
208
|
+
* @param input The colorpicker input to register with this colorpicker.
|
|
209
|
+
*/
|
|
210
|
+
registerInput(input: MtxColorpickerInput): void;
|
|
211
|
+
/** Open the panel. */
|
|
212
|
+
open(): void;
|
|
213
|
+
/** Close the panel. */
|
|
214
|
+
close(): void;
|
|
215
|
+
/** Forwards relevant values from the colorpicker to the colorpicker content inside the overlay. */
|
|
216
|
+
protected _forwardContentValues(instance: MtxColorpickerContent): void;
|
|
217
|
+
/** Open the colopicker as a popup. */
|
|
218
|
+
private _openOverlay;
|
|
219
|
+
/** Destroys the current overlay. */
|
|
220
|
+
private _destroyOverlay;
|
|
221
|
+
/** Gets a position strategy that will open the panel as a dropdown. */
|
|
222
|
+
private _getDropdownStrategy;
|
|
223
|
+
/** Sets the positions of the colorpicker in dropdown mode based on the current configuration. */
|
|
224
|
+
private _setConnectedPositions;
|
|
225
|
+
/** Gets an observable that will emit when the overlay is supposed to be closed. */
|
|
226
|
+
private _getCloseStream;
|
|
227
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MtxColorpicker, never>;
|
|
228
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MtxColorpicker, "mtx-colorpicker", ["mtxColorpicker"], { "content": { "alias": "content"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "xPosition": { "alias": "xPosition"; "required": false; }; "yPosition": { "alias": "yPosition"; "required": false; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; }; "opened": { "alias": "opened"; "required": false; }; "color": { "alias": "color"; "required": false; }; "format": { "alias": "format"; "required": false; }; }, { "openedStream": "opened"; "closedStream": "closed"; }, never, never, true, never>;
|
|
229
|
+
static ngAcceptInputType_disabled: unknown;
|
|
230
|
+
static ngAcceptInputType_restoreFocus: unknown;
|
|
231
|
+
static ngAcceptInputType_opened: unknown;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/** Can be used to override the icon of a `mtxColorpickerToggle`. */
|
|
235
|
+
declare class MtxColorpickerToggleIcon {
|
|
236
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MtxColorpickerToggleIcon, never>;
|
|
237
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MtxColorpickerToggleIcon, "[mtxColorpickerToggleIcon]", never, {}, {}, never, never, true, never>;
|
|
238
|
+
}
|
|
239
|
+
declare class MtxColorpickerToggle implements AfterContentInit, OnChanges, OnDestroy {
|
|
240
|
+
private _changeDetectorRef;
|
|
241
|
+
private _stateChanges;
|
|
242
|
+
/** Colorpicker instance that the button will toggle. */
|
|
243
|
+
picker: MtxColorpicker;
|
|
244
|
+
/** Tabindex for the toggle. */
|
|
245
|
+
tabIndex: number | null;
|
|
246
|
+
/** Screen-reader label for the button. */
|
|
247
|
+
ariaLabel: string;
|
|
248
|
+
/** Whether the toggle button is disabled. */
|
|
249
|
+
get disabled(): boolean;
|
|
250
|
+
set disabled(value: boolean);
|
|
251
|
+
private _disabled;
|
|
252
|
+
/** Whether ripples on the toggle should be disabled. */
|
|
253
|
+
disableRipple: boolean;
|
|
254
|
+
/** Custom icon set by the consumer. */
|
|
255
|
+
_customIcon: MtxColorpickerToggleIcon;
|
|
256
|
+
/** Underlying button element. */
|
|
257
|
+
_button: MatButton;
|
|
258
|
+
constructor();
|
|
259
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
260
|
+
ngOnDestroy(): void;
|
|
261
|
+
ngAfterContentInit(): void;
|
|
262
|
+
_open(event: Event): void;
|
|
263
|
+
private _watchStateChanges;
|
|
264
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MtxColorpickerToggle, never>;
|
|
265
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MtxColorpickerToggle, "mtx-colorpicker-toggle", ["mtxColorpickerToggle"], { "picker": { "alias": "for"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; }, {}, ["_customIcon"], ["[mtxColorpickerToggleIcon]"], true, never>;
|
|
266
|
+
static ngAcceptInputType_disabled: unknown;
|
|
267
|
+
static ngAcceptInputType_disableRipple: unknown;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
declare class MtxColorpickerModule {
|
|
271
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MtxColorpickerModule, never>;
|
|
272
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MtxColorpickerModule, never, [typeof i1.CommonModule, typeof i2.OverlayModule, typeof i3.A11yModule, typeof i4.PortalModule, typeof i5.MatButtonModule, typeof i6.ColorChromeModule, typeof MtxColorpicker, typeof MtxColorpickerContent, typeof MtxColorpickerInput, typeof MtxColorpickerToggle, typeof MtxColorpickerToggleIcon], [typeof MtxColorpicker, typeof MtxColorpickerContent, typeof MtxColorpickerInput, typeof MtxColorpickerToggle, typeof MtxColorpickerToggleIcon]>;
|
|
273
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<MtxColorpickerModule>;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Animations used by the colorpicker.
|
|
278
|
+
* @docs-private
|
|
279
|
+
* @deprecated No longer used, will be removed.
|
|
280
|
+
* @breaking-change 21.0.0
|
|
281
|
+
*/
|
|
282
|
+
declare const mtxColorpickerAnimations: {
|
|
283
|
+
readonly transformPanel: any;
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
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 };
|
|
287
|
+
export type { ColorFormat, ColorpickerDropdownPositionX, ColorpickerDropdownPositionY };
|