@ng-matero/extensions 20.4.2 → 20.5.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/select/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnChanges, AfterViewChecked, OnDestroy, ElementRef, SimpleChanges, OnInit, DoCheck, AfterViewInit, ChangeDetectorRef, TemplateRef, QueryList, EventEmitter, InjectionToken } from '@angular/core';
2
+ import { OnChanges, AfterViewChecked, OnDestroy, ElementRef, SimpleChanges, DoCheck, AfterViewInit, ChangeDetectorRef, QueryList, TemplateRef, EventEmitter, InjectionToken } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import * as i2 from '@angular/forms';
5
5
  import { ControlValueAccessor, NgControl } from '@angular/forms';
6
- import * as i3 from '@ng-select/ng-select';
7
- import { NgSelectComponent } from '@ng-select/ng-select';
6
+ import * as i3 from '@ng-matero/ng-select';
7
+ import { NgSelect, SearchEvent, ScrollEvent, AddTagFn, CompareWithFn, DropdownPanelPosition, GroupValueFn, SearchFn, TrackByFn } from '@ng-matero/ng-select';
8
8
  import { FocusMonitor } from '@angular/cdk/a11y';
9
9
  import { ErrorStateMatcher } from '@angular/material/core';
10
10
  import { MatFormFieldControl, MatFormField } from '@angular/material/form-field';
@@ -46,12 +46,6 @@ declare class MtxSelectIntl {
46
46
  static ɵprov: i0.ɵɵInjectableDeclaration<MtxSelectIntl>;
47
47
  }
48
48
 
49
- type DropdownPosition = 'bottom' | 'top' | 'auto';
50
- type AddTagFn = (term: string) => any;
51
- type CompareWithFn = (a: any, b: any) => boolean;
52
- type GroupValueFn = (key: string | Record<string, any>, children: any[]) => string | Record<string, any>;
53
- type SearchFn = (term: string, item: any) => boolean;
54
- type TrackByFn = (item: any) => any;
55
49
  /**
56
50
  * Represents the default options for the select that can be configured
57
51
  * using the `MTX_SELECT_DEFAULT_OPTIONS` injection token.
@@ -74,7 +68,7 @@ interface MtxSelectDefaultOptions {
74
68
  }
75
69
  /** Injection token that can be used to specify default select options. */
76
70
  declare const MTX_SELECT_DEFAULT_OPTIONS: InjectionToken<MtxSelectDefaultOptions>;
77
- declare class MtxSelect implements OnInit, OnDestroy, DoCheck, AfterViewInit, ControlValueAccessor, MatFormFieldControl<any> {
71
+ declare class MtxSelect implements OnDestroy, DoCheck, AfterViewInit, ControlValueAccessor, MatFormFieldControl<any> {
78
72
  protected _intl: MtxSelectIntl;
79
73
  protected _changeDetectorRef: ChangeDetectorRef;
80
74
  protected _elementRef: ElementRef<any>;
@@ -82,45 +76,53 @@ declare class MtxSelect implements OnInit, OnDestroy, DoCheck, AfterViewInit, Co
82
76
  ngControl: NgControl | null;
83
77
  protected _parentFormField?: MatFormField | null | undefined;
84
78
  protected _defaultOptions?: MtxSelectDefaultOptions | null | undefined;
85
- private _document;
86
- ngSelect: NgSelectComponent;
87
- optionTemplate: TemplateRef<any>;
88
- optgroupTemplate: TemplateRef<any>;
89
- labelTemplate: TemplateRef<any>;
90
- multiLabelTemplate: TemplateRef<any>;
91
- headerTemplate: TemplateRef<any>;
92
- footerTemplate: TemplateRef<any>;
93
- notFoundTemplate: TemplateRef<any>;
94
- typeToSearchTemplate: TemplateRef<any>;
95
- loadingTextTemplate: TemplateRef<any>;
96
- tagTemplate: TemplateRef<any>;
97
- loadingSpinnerTemplate: TemplateRef<any>;
98
- placeholderTemplate: TemplateRef<any>;
99
- clearbuttonTemplate: TemplateRef<any>;
100
- mtxOptions: QueryList<MtxOption>;
79
+ ngSelect: NgSelect;
80
+ mtxOptions?: QueryList<MtxOption>;
81
+ optionTemplate?: TemplateRef<any>;
82
+ optgroupTemplate?: TemplateRef<any>;
83
+ labelTemplate?: TemplateRef<any>;
84
+ multiLabelTemplate?: TemplateRef<any>;
85
+ headerTemplate?: TemplateRef<any>;
86
+ footerTemplate?: TemplateRef<any>;
87
+ notFoundTemplate?: TemplateRef<any>;
88
+ typeToSearchTemplate?: TemplateRef<any>;
89
+ loadingTextTemplate?: TemplateRef<any>;
90
+ tagTemplate?: TemplateRef<any>;
91
+ loadingSpinnerTemplate?: TemplateRef<any>;
92
+ placeholderTemplate?: TemplateRef<any>;
93
+ clearbuttonTemplate?: TemplateRef<any>;
94
+ blurEvent: EventEmitter<any>;
95
+ focusEvent: EventEmitter<any>;
96
+ changeEvent: EventEmitter<any>;
97
+ openEvent: EventEmitter<any>;
98
+ closeEvent: EventEmitter<any>;
99
+ searchEvent: EventEmitter<SearchEvent>;
100
+ clearEvent: EventEmitter<any>;
101
+ addEvent: EventEmitter<any>;
102
+ removeEvent: EventEmitter<any>;
103
+ scroll: EventEmitter<ScrollEvent>;
104
+ scrollToEnd: EventEmitter<any>;
101
105
  addTag: boolean | AddTagFn;
102
106
  addTagText?: string;
103
- appearance: string;
104
107
  appendTo: string;
105
108
  bindLabel: string | undefined;
106
109
  bindValue: string | undefined;
107
110
  closeOnSelect: boolean;
108
- clearAllText?: string;
109
111
  clearable: boolean;
112
+ clearAllText?: string;
110
113
  clearOnBackspace: boolean;
111
114
  compareWith: CompareWithFn;
112
- dropdownPosition: DropdownPosition;
113
- groupBy: string | ((value: any) => any);
114
- groupValue: GroupValueFn;
115
+ panelPosition: DropdownPanelPosition;
116
+ groupBy?: string | ((value: any) => any);
117
+ groupValue?: GroupValueFn;
115
118
  bufferAmount: number;
116
119
  selectableGroup: boolean;
117
120
  selectableGroupAsModel: boolean;
118
121
  hideSelected: boolean;
119
122
  loading: boolean;
120
123
  loadingText?: string;
121
- labelForId: string | null;
122
124
  markFirst: boolean;
123
- maxSelectedItems: number;
125
+ maxSelectedItems?: number;
124
126
  multiple: boolean;
125
127
  notFoundText?: string;
126
128
  searchable: boolean;
@@ -129,40 +131,24 @@ declare class MtxSelect implements OnInit, OnDestroy, DoCheck, AfterViewInit, Co
129
131
  searchWhileComposing: boolean;
130
132
  selectOnTab: boolean;
131
133
  trackByFn: TrackByFn | null;
132
- inputAttrs: {
133
- [key: string]: string;
134
- };
135
- tabIndex: number;
136
- openOnEnter: boolean;
134
+ openOnEnter: boolean | undefined;
137
135
  minTermLength: number;
138
136
  editableSearchTerm: boolean;
139
137
  keyDownFn: (_: KeyboardEvent) => boolean;
140
- virtualScroll: boolean;
138
+ virtualScroll: boolean | undefined;
141
139
  typeToSearchText?: string;
142
- typeahead: Subject<string>;
143
- isOpen?: boolean;
140
+ typeahead?: Subject<string>;
141
+ panelDisabled: boolean;
144
142
  fixedPlaceholder: boolean;
145
- deselectOnClick: boolean;
146
- blurEvent: EventEmitter<any>;
147
- focusEvent: EventEmitter<any>;
148
- changeEvent: EventEmitter<any>;
149
- openEvent: EventEmitter<any>;
150
- closeEvent: EventEmitter<any>;
151
- searchEvent: EventEmitter<{
152
- term: string;
153
- items: any[];
154
- }>;
155
- clearEvent: EventEmitter<any>;
156
- addEvent: EventEmitter<any>;
157
- removeEvent: EventEmitter<any>;
158
- scroll: EventEmitter<{
159
- start: number;
160
- end: number;
161
- }>;
162
- scrollToEnd: EventEmitter<any>;
163
- get clearSearchOnAdd(): boolean;
164
- set clearSearchOnAdd(value: boolean);
165
- private _clearSearchOnAdd;
143
+ preventToggleOnRightClick: boolean;
144
+ clearSearchOnAdd: boolean | undefined;
145
+ deselectOnClick: boolean | undefined;
146
+ tabIndex?: number;
147
+ inputId?: string | null;
148
+ inputAttrs: {
149
+ [key: string]: string;
150
+ };
151
+ panelClass?: string | string[] | Record<string, any>;
166
152
  get items(): any[];
167
153
  set items(value: any[]);
168
154
  private _items;
@@ -204,11 +190,13 @@ declare class MtxSelect implements OnInit, OnDestroy, DoCheck, AfterViewInit, Co
204
190
  /** Object used to control when error messages are shown. */
205
191
  get errorStateMatcher(): ErrorStateMatcher;
206
192
  set errorStateMatcher(value: ErrorStateMatcher);
207
- /** Aria label of the select. */
208
- ariaLabel: string;
209
- /** Input that can be used to specify the `aria-labelledby` attribute. */
193
+ /** `aria-label` of the ng-select input. */
194
+ ariaLabel: string | null;
195
+ /** `aria-labelledby` of the ng-select input. */
210
196
  ariaLabelledby: string | null;
211
- /** The aria-describedby attribute on the select for improved a11y. */
197
+ /** `aria-describedby` of the ng-select input. */
198
+ ariaDescribedby: string | null;
199
+ /** The aria-describedby attribute on the ng-select input for improved a11y. */
212
200
  _ariaDescribedby: string | null;
213
201
  /** A name for this control that can be used by `mat-form-field`. */
214
202
  controlType: string;
@@ -218,8 +206,6 @@ declare class MtxSelect implements OnInit, OnDestroy, DoCheck, AfterViewInit, Co
218
206
  _onTouched: () => void;
219
207
  /** ID for the DOM node containing the select's value. */
220
208
  _valueId: string;
221
- /** Whether or not the overlay panel is open. */
222
- get panelOpen(): boolean;
223
209
  /**
224
210
  * Keeps track of the previous form control assigned to the select.
225
211
  * Used to detect if it has changed.
@@ -232,7 +218,6 @@ declare class MtxSelect implements OnInit, OnDestroy, DoCheck, AfterViewInit, Co
232
218
  set errorState(value: boolean);
233
219
  private _intlChangesSubscription;
234
220
  constructor();
235
- ngOnInit(): void;
236
221
  ngAfterViewInit(): void;
237
222
  ngDoCheck(): void;
238
223
  ngOnDestroy(): void;
@@ -282,9 +267,8 @@ declare class MtxSelect implements OnInit, OnDestroy, DoCheck, AfterViewInit, Co
282
267
  close(): void;
283
268
  focus(): void;
284
269
  blur(): void;
285
- openChange(): void;
286
270
  static ɵfac: i0.ɵɵFactoryDeclaration<MtxSelect, never>;
287
- static ɵcmp: i0.ɵɵComponentDeclaration<MtxSelect, "mtx-select", ["mtxSelect"], { "addTag": { "alias": "addTag"; "required": false; }; "addTagText": { "alias": "addTagText"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; "bindLabel": { "alias": "bindLabel"; "required": false; }; "bindValue": { "alias": "bindValue"; "required": false; }; "closeOnSelect": { "alias": "closeOnSelect"; "required": false; }; "clearAllText": { "alias": "clearAllText"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "clearOnBackspace": { "alias": "clearOnBackspace"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; }; "dropdownPosition": { "alias": "dropdownPosition"; "required": false; }; "groupBy": { "alias": "groupBy"; "required": false; }; "groupValue": { "alias": "groupValue"; "required": false; }; "bufferAmount": { "alias": "bufferAmount"; "required": false; }; "selectableGroup": { "alias": "selectableGroup"; "required": false; }; "selectableGroupAsModel": { "alias": "selectableGroupAsModel"; "required": false; }; "hideSelected": { "alias": "hideSelected"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "loadingText": { "alias": "loadingText"; "required": false; }; "labelForId": { "alias": "labelForId"; "required": false; }; "markFirst": { "alias": "markFirst"; "required": false; }; "maxSelectedItems": { "alias": "maxSelectedItems"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "notFoundText": { "alias": "notFoundText"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "searchFn": { "alias": "searchFn"; "required": false; }; "searchWhileComposing": { "alias": "searchWhileComposing"; "required": false; }; "selectOnTab": { "alias": "selectOnTab"; "required": false; }; "trackByFn": { "alias": "trackByFn"; "required": false; }; "inputAttrs": { "alias": "inputAttrs"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "openOnEnter": { "alias": "openOnEnter"; "required": false; }; "minTermLength": { "alias": "minTermLength"; "required": false; }; "editableSearchTerm": { "alias": "editableSearchTerm"; "required": false; }; "keyDownFn": { "alias": "keyDownFn"; "required": false; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; }; "typeToSearchText": { "alias": "typeToSearchText"; "required": false; }; "typeahead": { "alias": "typeahead"; "required": false; }; "isOpen": { "alias": "isOpen"; "required": false; }; "fixedPlaceholder": { "alias": "fixedPlaceholder"; "required": false; }; "deselectOnClick": { "alias": "deselectOnClick"; "required": false; }; "clearSearchOnAdd": { "alias": "clearSearchOnAdd"; "required": false; }; "items": { "alias": "items"; "required": false; }; "value": { "alias": "value"; "required": false; }; "id": { "alias": "id"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; }; }, { "blurEvent": "blur"; "focusEvent": "focus"; "changeEvent": "change"; "openEvent": "open"; "closeEvent": "close"; "searchEvent": "search"; "clearEvent": "clear"; "addEvent": "add"; "removeEvent": "remove"; "scroll": "scroll"; "scrollToEnd": "scrollToEnd"; }, ["optionTemplate", "optgroupTemplate", "labelTemplate", "multiLabelTemplate", "headerTemplate", "footerTemplate", "notFoundTemplate", "typeToSearchTemplate", "loadingTextTemplate", "tagTemplate", "loadingSpinnerTemplate", "placeholderTemplate", "clearbuttonTemplate", "mtxOptions"], never, true, never>;
271
+ static ɵcmp: i0.ɵɵComponentDeclaration<MtxSelect, "mtx-select", ["mtxSelect"], { "addTag": { "alias": "addTag"; "required": false; }; "addTagText": { "alias": "addTagText"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; "bindLabel": { "alias": "bindLabel"; "required": false; }; "bindValue": { "alias": "bindValue"; "required": false; }; "closeOnSelect": { "alias": "closeOnSelect"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "clearAllText": { "alias": "clearAllText"; "required": false; }; "clearOnBackspace": { "alias": "clearOnBackspace"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; }; "panelPosition": { "alias": "panelPosition"; "required": false; }; "groupBy": { "alias": "groupBy"; "required": false; }; "groupValue": { "alias": "groupValue"; "required": false; }; "bufferAmount": { "alias": "bufferAmount"; "required": false; }; "selectableGroup": { "alias": "selectableGroup"; "required": false; }; "selectableGroupAsModel": { "alias": "selectableGroupAsModel"; "required": false; }; "hideSelected": { "alias": "hideSelected"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "loadingText": { "alias": "loadingText"; "required": false; }; "markFirst": { "alias": "markFirst"; "required": false; }; "maxSelectedItems": { "alias": "maxSelectedItems"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "notFoundText": { "alias": "notFoundText"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "searchFn": { "alias": "searchFn"; "required": false; }; "searchWhileComposing": { "alias": "searchWhileComposing"; "required": false; }; "selectOnTab": { "alias": "selectOnTab"; "required": false; }; "trackByFn": { "alias": "trackByFn"; "required": false; }; "openOnEnter": { "alias": "openOnEnter"; "required": false; }; "minTermLength": { "alias": "minTermLength"; "required": false; }; "editableSearchTerm": { "alias": "editableSearchTerm"; "required": false; }; "keyDownFn": { "alias": "keyDownFn"; "required": false; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; }; "typeToSearchText": { "alias": "typeToSearchText"; "required": false; }; "typeahead": { "alias": "typeahead"; "required": false; }; "panelDisabled": { "alias": "panelDisabled"; "required": false; }; "fixedPlaceholder": { "alias": "fixedPlaceholder"; "required": false; }; "preventToggleOnRightClick": { "alias": "preventToggleOnRightClick"; "required": false; }; "clearSearchOnAdd": { "alias": "clearSearchOnAdd"; "required": false; }; "deselectOnClick": { "alias": "deselectOnClick"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "inputId": { "alias": "inputId"; "required": false; }; "inputAttrs": { "alias": "inputAttrs"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "items": { "alias": "items"; "required": false; }; "value": { "alias": "value"; "required": false; }; "id": { "alias": "id"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaLabelledby": { "alias": "ariaLabelledby"; "required": false; }; "ariaDescribedby": { "alias": "ariaDescribedby"; "required": false; }; }, { "blurEvent": "blur"; "focusEvent": "focus"; "changeEvent": "change"; "openEvent": "open"; "closeEvent": "close"; "searchEvent": "search"; "clearEvent": "clear"; "addEvent": "add"; "removeEvent": "remove"; "scroll": "scroll"; "scrollToEnd": "scrollToEnd"; }, ["optionTemplate", "optgroupTemplate", "labelTemplate", "multiLabelTemplate", "headerTemplate", "footerTemplate", "notFoundTemplate", "typeToSearchTemplate", "loadingTextTemplate", "tagTemplate", "loadingSpinnerTemplate", "placeholderTemplate", "clearbuttonTemplate", "mtxOptions"], never, true, never>;
288
272
  static ngAcceptInputType_closeOnSelect: unknown;
289
273
  static ngAcceptInputType_clearable: unknown;
290
274
  static ngAcceptInputType_clearOnBackspace: unknown;
@@ -301,7 +285,10 @@ declare class MtxSelect implements OnInit, OnDestroy, DoCheck, AfterViewInit, Co
301
285
  static ngAcceptInputType_openOnEnter: unknown;
302
286
  static ngAcceptInputType_editableSearchTerm: unknown;
303
287
  static ngAcceptInputType_virtualScroll: unknown;
288
+ static ngAcceptInputType_panelDisabled: unknown;
304
289
  static ngAcceptInputType_fixedPlaceholder: unknown;
290
+ static ngAcceptInputType_preventToggleOnRightClick: unknown;
291
+ static ngAcceptInputType_clearSearchOnAdd: unknown;
305
292
  static ngAcceptInputType_deselectOnClick: unknown;
306
293
  static ngAcceptInputType_disabled: unknown;
307
294
  static ngAcceptInputType_required: unknown;
@@ -375,9 +362,9 @@ declare class MtxSelectClearbuttonTemplate {
375
362
 
376
363
  declare class MtxSelectModule {
377
364
  static ɵfac: i0.ɵɵFactoryDeclaration<MtxSelectModule, never>;
378
- static ɵmod: i0.ɵɵNgModuleDeclaration<MtxSelectModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i2.ReactiveFormsModule, typeof i3.NgSelectModule, typeof MtxSelect, typeof MtxOption, typeof MtxSelectOptgroupTemplate, typeof MtxSelectOptionTemplate, typeof MtxSelectLabelTemplate, typeof MtxSelectMultiLabelTemplate, typeof MtxSelectHeaderTemplate, typeof MtxSelectFooterTemplate, typeof MtxSelectNotFoundTemplate, typeof MtxSelectTypeToSearchTemplate, typeof MtxSelectLoadingTextTemplate, typeof MtxSelectTagTemplate, typeof MtxSelectLoadingSpinnerTemplate, typeof MtxSelectPlaceholderTemplate, typeof MtxSelectClearbuttonTemplate], [typeof MtxSelect, typeof MtxOption, typeof MtxSelectOptgroupTemplate, typeof MtxSelectOptionTemplate, typeof MtxSelectLabelTemplate, typeof MtxSelectMultiLabelTemplate, typeof MtxSelectHeaderTemplate, typeof MtxSelectFooterTemplate, typeof MtxSelectNotFoundTemplate, typeof MtxSelectTypeToSearchTemplate, typeof MtxSelectLoadingTextTemplate, typeof MtxSelectTagTemplate, typeof MtxSelectLoadingSpinnerTemplate, typeof MtxSelectPlaceholderTemplate, typeof MtxSelectClearbuttonTemplate]>;
365
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MtxSelectModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i3.NgSelectModule, typeof MtxSelect, typeof MtxOption, typeof MtxSelectOptgroupTemplate, typeof MtxSelectOptionTemplate, typeof MtxSelectLabelTemplate, typeof MtxSelectMultiLabelTemplate, typeof MtxSelectHeaderTemplate, typeof MtxSelectFooterTemplate, typeof MtxSelectNotFoundTemplate, typeof MtxSelectTypeToSearchTemplate, typeof MtxSelectLoadingTextTemplate, typeof MtxSelectTagTemplate, typeof MtxSelectLoadingSpinnerTemplate, typeof MtxSelectPlaceholderTemplate, typeof MtxSelectClearbuttonTemplate], [typeof MtxSelect, typeof MtxOption, typeof MtxSelectOptgroupTemplate, typeof MtxSelectOptionTemplate, typeof MtxSelectLabelTemplate, typeof MtxSelectMultiLabelTemplate, typeof MtxSelectHeaderTemplate, typeof MtxSelectFooterTemplate, typeof MtxSelectNotFoundTemplate, typeof MtxSelectTypeToSearchTemplate, typeof MtxSelectLoadingTextTemplate, typeof MtxSelectTagTemplate, typeof MtxSelectLoadingSpinnerTemplate, typeof MtxSelectPlaceholderTemplate, typeof MtxSelectClearbuttonTemplate]>;
379
366
  static ɵinj: i0.ɵɵInjectorDeclaration<MtxSelectModule>;
380
367
  }
381
368
 
382
369
  export { MTX_SELECT_DEFAULT_OPTIONS, MtxOption, MtxSelect, MtxSelectClearbuttonTemplate, MtxSelectFooterTemplate, MtxSelectHeaderTemplate, MtxSelectIntl, MtxSelectLabelTemplate, MtxSelectLoadingSpinnerTemplate, MtxSelectLoadingTextTemplate, MtxSelectModule, MtxSelectMultiLabelTemplate, MtxSelectNotFoundTemplate, MtxSelectOptgroupTemplate, MtxSelectOptionTemplate, MtxSelectPlaceholderTemplate, MtxSelectTagTemplate, MtxSelectTypeToSearchTemplate };
383
- export type { AddTagFn, CompareWithFn, DropdownPosition, GroupValueFn, MtxSelectDefaultOptions, SearchFn, TrackByFn };
370
+ export type { MtxSelectDefaultOptions };
@@ -4,20 +4,19 @@
4
4
 
5
5
  $fallbacks: m3-select.get-tokens();
6
6
 
7
- @mixin rtl {
8
- @at-root [dir='rtl'] #{&} {
9
- @content;
10
- }
11
- }
12
-
13
7
  .ng-select {
14
8
  $filled-padding-top: var(--mat-form-field-filled-with-label-container-padding-top, 24px);
15
9
  $filled-padding-bottom: var(--mat-form-field-filled-with-label-container-padding-bottom, 8px);
16
10
  $vertical-padding: var(--mat-form-field-container-vertical-padding, 16px);
17
- $text-line-height: var(--mat-form-field-container-text-line-height, var(--mat-sys-body-large-line-height));
11
+ $text-line-height: var(
12
+ --mat-form-field-container-text-line-height,
13
+ var(--mat-sys-body-large-line-height)
14
+ );
18
15
 
19
- padding: $filled-padding-top 16px $filled-padding-bottom;
20
- margin: calc($filled-padding-top * -1) -16px calc($filled-padding-bottom * -1);
16
+ .mat-mdc-form-field & {
17
+ padding: $filled-padding-top 16px $filled-padding-bottom;
18
+ margin: calc($filled-padding-top * -1) -16px calc($filled-padding-bottom * -1);
19
+ }
21
20
 
22
21
  .mdc-text-field--outlined &,
23
22
  .mdc-text-field--no-label & {
@@ -30,24 +29,29 @@ $fallbacks: m3-select.get-tokens();
30
29
  .ng-select-container {
31
30
  align-items: center;
32
31
  color: token-utils.slot(select-container-text-color, $fallbacks);
32
+ }
33
33
 
34
- .ng-value-container {
35
- align-items: center;
36
- gap: 4px;
34
+ .ng-value-container {
35
+ align-items: center;
36
+ gap: 4px;
37
+ }
37
38
 
38
- .ng-input > input {
39
- height: $text-line-height;
40
- color: inherit;
41
- font: inherit;
42
- }
43
- }
39
+ .ng-input > input {
40
+ height: $text-line-height;
41
+ color: inherit;
42
+ font: inherit;
43
+ }
44
44
 
45
- .ng-clear-wrapper {
46
- display: inline-flex;
47
- justify-content: center;
48
- align-items: center;
49
- width: 24px;
50
- height: $text-line-height;
45
+ .ng-clear-wrapper {
46
+ display: inline-flex;
47
+ justify-content: center;
48
+ align-items: center;
49
+ width: 24px;
50
+ height: $text-line-height;
51
+ color: token-utils.slot(select-clear-icon-color, $fallbacks);
52
+
53
+ &:hover .ng-clear {
54
+ color: token-utils.slot(select-clear-icon-hover-color, $fallbacks);
51
55
  }
52
56
  }
53
57
 
@@ -61,31 +65,12 @@ $fallbacks: m3-select.get-tokens();
61
65
  }
62
66
  }
63
67
 
64
- .ng-has-value .ng-placeholder {
65
- display: none;
66
- }
67
-
68
- .ng-clear-wrapper {
69
- color: token-utils.slot(select-clear-icon-color, $fallbacks);
70
-
71
- &:hover .ng-clear {
72
- color: token-utils.slot(select-clear-icon-hover-color, $fallbacks);
73
- }
74
- }
75
-
76
68
  &.ng-select-disabled {
77
69
  .ng-value {
78
70
  color: token-utils.slot(select-disabled-text-color, $fallbacks);
79
71
  }
80
72
  }
81
73
 
82
- &.ng-select-opened {
83
- .ng-arrow-wrapper .ng-arrow {
84
- top: -2px;
85
- border-width: 0 5px 5px;
86
- }
87
- }
88
-
89
74
  &.ng-select-single {
90
75
  &.ng-select-filtered .ng-placeholder {
91
76
  display: initial;
@@ -94,7 +79,8 @@ $fallbacks: m3-select.get-tokens();
94
79
  }
95
80
 
96
81
  &.ng-select-multiple {
97
- .ng-select-container .ng-value-container .ng-value {
82
+ .ng-value {
83
+ box-sizing: border-box;
98
84
  display: inline-flex;
99
85
  align-items: center;
100
86
  height: $text-line-height;
@@ -107,35 +93,34 @@ $fallbacks: m3-select.get-tokens();
107
93
  &.ng-value-disabled {
108
94
  opacity: 0.4;
109
95
  }
96
+ }
110
97
 
111
- .ng-value-label {
112
- display: inline-block;
113
- margin: 0 4px;
114
- line-height: 16px;
115
- }
116
-
117
- .ng-value-icon {
118
- width: 16px;
119
- height: 16px;
120
- line-height: 16px;
121
- border-radius: 50%;
122
- text-align: center;
98
+ .ng-value-label {
99
+ display: inline-block;
100
+ margin: 0 4px;
101
+ line-height: 16px;
102
+ }
123
103
 
124
- &:hover {
125
- background-color: token-utils.slot(select-multiple-value-icon-hover-background-color, $fallbacks);
126
- }
104
+ .ng-value-remove {
105
+ width: 16px;
106
+ height: 16px;
107
+ line-height: 16px;
108
+ border-radius: 50%;
109
+ text-align: center;
110
+
111
+ &:hover {
112
+ background-color: token-utils.slot(
113
+ select-multiple-value-icon-hover-background-color,
114
+ $fallbacks
115
+ );
127
116
  }
128
117
  }
129
118
 
130
- &.ng-select-disabled .ng-select-container .ng-value-container .ng-value {
119
+ &.ng-select-disabled .ng-value {
131
120
  border-color: token-utils.slot(select-multiple-value-disabled-outline-color, $fallbacks);
132
121
  }
133
122
  }
134
123
 
135
- .ng-arrow-wrapper {
136
- width: 10px;
137
- }
138
-
139
124
  $enabled-arrow-color: token-utils.slot(select-enabled-arrow-color, $fallbacks);
140
125
  $disabled-arrow-color: token-utils.slot(select-disabled-arrow-color, $fallbacks);
141
126
  $invalid-arrow-color: token-utils.slot(select-invalid-arrow-color, $fallbacks);
@@ -155,6 +140,8 @@ $fallbacks: m3-select.get-tokens();
155
140
  }
156
141
 
157
142
  &.ng-select-opened .ng-arrow {
143
+ top: -2px;
144
+ border-width: 0 5px 5px;
158
145
  border-color: transparent transparent $enabled-arrow-color;
159
146
  }
160
147
 
@@ -193,73 +180,53 @@ $fallbacks: m3-select.get-tokens();
193
180
  border-top: 1px solid token-utils.slot(select-panel-divider-color, $fallbacks);
194
181
  }
195
182
 
196
- .ng-dropdown-panel-items {
197
- .ng-optgroup {
198
- padding: 14px 16px;
199
- font-weight: 500;
200
- user-select: none;
201
- cursor: pointer;
202
- color: token-utils.slot(select-optgroup-label-text-color, $fallbacks);
203
-
204
- &.ng-option-disabled {
205
- cursor: default;
206
- }
207
-
208
- &.ng-option-marked {
209
- background-color: token-utils.slot(select-option-hover-state-background-color, $fallbacks);
210
- }
183
+ .ng-optgroup {
184
+ padding: 14px 16px;
185
+ font-weight: 500;
186
+ user-select: none;
187
+ cursor: pointer;
188
+ color: token-utils.slot(select-optgroup-label-text-color, $fallbacks);
211
189
 
212
- &.ng-option-selected {
213
- background-color: token-utils.slot(select-option-selected-state-background-color, $fallbacks);
214
- color: token-utils.slot(select-option-selected-state-text-color, $fallbacks);
215
- }
190
+ &.ng-option-disabled {
191
+ cursor: default;
216
192
  }
217
193
 
218
- .ng-option {
219
- position: relative;
220
- padding: 14px 16px;
221
- text-overflow: ellipsis;
222
- text-decoration: none;
223
- text-align: left;
224
- white-space: nowrap;
225
- overflow: hidden;
226
- color: token-utils.slot(select-option-label-text-color, $fallbacks);
227
-
228
- &.ng-option-marked {
229
- background-color: token-utils.slot(select-option-hover-state-background-color, $fallbacks);
230
- }
231
-
232
- &.ng-option-selected {
233
- background-color: token-utils.slot(select-option-selected-state-background-color, $fallbacks);
234
- color: token-utils.slot(select-option-selected-state-text-color, $fallbacks);
235
- }
194
+ &.ng-option-marked {
195
+ background-color: token-utils.slot(select-option-hover-state-background-color, $fallbacks);
196
+ }
236
197
 
237
- &.ng-option-disabled {
238
- color: token-utils.slot(select-option-disabled-state-text-color, $fallbacks);
239
- }
198
+ &.ng-option-selected {
199
+ background-color: token-utils.slot(select-option-selected-state-background-color, $fallbacks);
200
+ color: token-utils.slot(select-option-selected-state-text-color, $fallbacks);
201
+ }
202
+ }
240
203
 
241
- @include rtl {
242
- text-align: right;
243
- }
204
+ .ng-option {
205
+ position: relative;
206
+ padding: 14px 16px;
207
+ color: token-utils.slot(select-option-label-text-color, $fallbacks);
244
208
 
245
- &.ng-option-child {
246
- padding-left: 32px;
209
+ &.ng-option-marked {
210
+ background-color: token-utils.slot(select-option-hover-state-background-color, $fallbacks);
211
+ }
247
212
 
248
- @include rtl {
249
- padding-right: 32px;
250
- padding-left: 0;
251
- }
252
- }
213
+ &.ng-option-selected {
214
+ background-color: token-utils.slot(select-option-selected-state-background-color, $fallbacks);
215
+ color: token-utils.slot(select-option-selected-state-text-color, $fallbacks);
216
+ }
253
217
 
254
- .ng-tag-label {
255
- margin-right: 6px;
256
- font-size: 80%;
218
+ &.ng-option-disabled {
219
+ color: token-utils.slot(select-option-disabled-state-text-color, $fallbacks);
220
+ }
257
221
 
258
- @include rtl {
259
- margin-left: 6px;
260
- margin-right: 0;
261
- }
262
- }
222
+ &.ng-option-child {
223
+ padding-inline-start: 32px;
263
224
  }
264
225
  }
226
+
227
+ .ng-tag-label {
228
+ display: inline-block;
229
+ margin-inline-end: 6px;
230
+ font-size: 80%;
231
+ }
265
232
  }