@masterteam/components 0.0.267 → 0.0.269
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/fesm2022/masterteam-components-business-fields.mjs +5 -7
- package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
- package/fesm2022/masterteam-components-checkbox-field.mjs +6 -8
- package/fesm2022/masterteam-components-checkbox-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-color-picker-field.mjs +6 -8
- package/fesm2022/masterteam-components-color-picker-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-date-field.mjs +6 -8
- package/fesm2022/masterteam-components-date-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-editor-field.mjs +6 -8
- package/fesm2022/masterteam-components-editor-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-entities.mjs +3 -62
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/fesm2022/masterteam-components-field-validation.mjs +2 -8
- package/fesm2022/masterteam-components-field-validation.mjs.map +1 -1
- package/fesm2022/masterteam-components-icon-field.mjs +6 -8
- package/fesm2022/masterteam-components-icon-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-location-field.mjs +6 -8
- package/fesm2022/masterteam-components-location-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-multi-select-field.mjs +6 -8
- package/fesm2022/masterteam-components-multi-select-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-number-field.mjs +6 -8
- package/fesm2022/masterteam-components-number-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-pick-list-field.mjs +6 -8
- package/fesm2022/masterteam-components-pick-list-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-radio-cards-field.mjs +6 -8
- package/fesm2022/masterteam-components-radio-cards-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-select-field.mjs +5 -7
- package/fesm2022/masterteam-components-select-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-slider-field.mjs +5 -9
- package/fesm2022/masterteam-components-slider-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-text-field.mjs +6 -8
- package/fesm2022/masterteam-components-text-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-textarea-field.mjs +6 -8
- package/fesm2022/masterteam-components-textarea-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-upload-field.mjs +5 -7
- package/fesm2022/masterteam-components-upload-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-user-search-field.mjs +6 -8
- package/fesm2022/masterteam-components-user-search-field.mjs.map +1 -1
- package/fesm2022/masterteam-components.mjs +149 -235
- package/fesm2022/masterteam-components.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-business-fields.d.ts +2 -4
- package/types/masterteam-components-checkbox-field.d.ts +2 -4
- package/types/masterteam-components-color-picker-field.d.ts +2 -4
- package/types/masterteam-components-date-field.d.ts +2 -4
- package/types/masterteam-components-editor-field.d.ts +2 -4
- package/types/masterteam-components-entities.d.ts +0 -14
- package/types/masterteam-components-icon-field.d.ts +2 -4
- package/types/masterteam-components-location-field.d.ts +2 -4
- package/types/masterteam-components-multi-select-field.d.ts +2 -4
- package/types/masterteam-components-number-field.d.ts +2 -4
- package/types/masterteam-components-pick-list-field.d.ts +2 -4
- package/types/masterteam-components-radio-cards-field.d.ts +2 -4
- package/types/masterteam-components-select-field.d.ts +2 -4
- package/types/masterteam-components-slider-field.d.ts +2 -2
- package/types/masterteam-components-text-field.d.ts +2 -4
- package/types/masterteam-components-textarea-field.d.ts +2 -4
- package/types/masterteam-components-upload-field.d.ts +2 -4
- package/types/masterteam-components-user-search-field.d.ts +2 -4
- package/types/masterteam-components.d.ts +33 -37
package/package.json
CHANGED
|
@@ -213,10 +213,8 @@ declare class SchedulePredecessorField implements ControlValueAccessor {
|
|
|
213
213
|
private readonly typeCellTpl;
|
|
214
214
|
private readonly lagCellTpl;
|
|
215
215
|
readonly label: _angular_core.InputSignal<string>;
|
|
216
|
-
/**
|
|
217
|
-
|
|
218
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
219
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
216
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
217
|
+
readonly fieldId: string;
|
|
220
218
|
readonly placeholder: _angular_core.InputSignal<string>;
|
|
221
219
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
222
220
|
readonly required: _angular_core.InputSignal<boolean>;
|
|
@@ -6,10 +6,8 @@ import { isInvalid } from '@masterteam/components';
|
|
|
6
6
|
declare class CheckboxField implements ControlValueAccessor {
|
|
7
7
|
checkbox: Checkbox;
|
|
8
8
|
label: _angular_core.InputSignal<string | undefined>;
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
12
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
9
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
10
|
+
readonly fieldId: string;
|
|
13
11
|
labelPosition: _angular_core.InputSignal<"top" | "start" | "end" | "bottom">;
|
|
14
12
|
placeholder: _angular_core.InputSignal<string | undefined>;
|
|
15
13
|
readonly: _angular_core.InputSignal<boolean>;
|
|
@@ -6,10 +6,8 @@ import { isInvalid } from '@masterteam/components';
|
|
|
6
6
|
declare class ColorPickerField implements ControlValueAccessor {
|
|
7
7
|
colorPicker: ColorPicker;
|
|
8
8
|
label: _angular_core.InputSignal<string | undefined>;
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
12
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
9
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
10
|
+
readonly fieldId: string;
|
|
13
11
|
appendTo: _angular_core.InputSignal<string>;
|
|
14
12
|
placeholder: _angular_core.InputSignal<string | undefined>;
|
|
15
13
|
class: _angular_core.InputSignal<string>;
|
|
@@ -9,10 +9,8 @@ declare class DateField implements ControlValueAccessor, OnInit, OnChanges {
|
|
|
9
9
|
readonly field: _angular_core.InputSignal<boolean>;
|
|
10
10
|
readonly hint: _angular_core.InputSignal<string | undefined>;
|
|
11
11
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
15
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
12
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
13
|
+
readonly fieldId: string;
|
|
16
14
|
readonly placeholder: _angular_core.InputSignal<string | undefined>;
|
|
17
15
|
readonly class: _angular_core.InputSignal<string>;
|
|
18
16
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
@@ -5,10 +5,8 @@ import { isInvalid } from '@masterteam/components';
|
|
|
5
5
|
type EditorDirection = 'ltr' | 'rtl' | 'auto';
|
|
6
6
|
declare class EditorField implements ControlValueAccessor {
|
|
7
7
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
11
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
8
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
9
|
+
readonly fieldId: string;
|
|
12
10
|
readonly hint: _angular_core.InputSignal<string | undefined>;
|
|
13
11
|
readonly placeholder: _angular_core.InputSignal<string | undefined>;
|
|
14
12
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
@@ -956,9 +956,6 @@ interface EntitySlotGroup {
|
|
|
956
956
|
}
|
|
957
957
|
declare class EntitiesPreview {
|
|
958
958
|
private readonly transloco;
|
|
959
|
-
private readonly elementRef;
|
|
960
|
-
private readonly destroyRef;
|
|
961
|
-
private readonly zone;
|
|
962
959
|
/** Array of entity data to display */
|
|
963
960
|
readonly entities: _angular_core.InputSignal<EntityData[]>;
|
|
964
961
|
readonly attachmentShape: _angular_core.InputSignal<"compact" | "default">;
|
|
@@ -1017,17 +1014,6 @@ declare class EntitiesPreview {
|
|
|
1017
1014
|
* this cheap mapping re-runs when the key sets or tooltips change.
|
|
1018
1015
|
*/
|
|
1019
1016
|
protected readonly slotGroups: _angular_core.Signal<EntitySlotGroup[]>;
|
|
1020
|
-
/**
|
|
1021
|
-
* Whether the host is too narrow for the 24-column grid to stay legible.
|
|
1022
|
-
*
|
|
1023
|
-
* Measured rather than assumed: this component is narrow because of the
|
|
1024
|
-
* column layout it sits in, not because of the viewport, so a media query
|
|
1025
|
-
* would answer the wrong question — the same reason the stylesheet uses a
|
|
1026
|
-
* container query.
|
|
1027
|
-
*/
|
|
1028
|
-
private readonly hostWidth;
|
|
1029
|
-
protected readonly isNarrowHost: _angular_core.Signal<boolean>;
|
|
1030
|
-
constructor();
|
|
1031
1017
|
protected onSlotClick(source: MouseEvent, slot: EntitySlot): void;
|
|
1032
1018
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntitiesPreview, never>;
|
|
1033
1019
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntitiesPreview, "mt-entities-preview", never, { "entities": { "alias": "entities"; "required": true; "isSignal": true; }; "attachmentShape": { "alias": "attachmentShape"; "required": false; "isSignal": true; }; "stackOnNarrow": { "alias": "stackOnNarrow"; "required": false; "isSignal": true; }; "clickableKeys": { "alias": "clickableKeys"; "required": false; "isSignal": true; }; "activeKeys": { "alias": "activeKeys"; "required": false; "isSignal": true; }; "clickableTooltip": { "alias": "clickableTooltip"; "required": false; "isSignal": true; }; "activeTooltip": { "alias": "activeTooltip"; "required": false; "isSignal": true; }; }, { "entityClick": "entityClick"; }, never, never, true, never>;
|
|
@@ -12,10 +12,8 @@ interface IconFieldOption {
|
|
|
12
12
|
}
|
|
13
13
|
declare class IconField implements ControlValueAccessor {
|
|
14
14
|
readonly label: _angular_core.InputSignal<string>;
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
18
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
15
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
16
|
+
readonly fieldId: string;
|
|
19
17
|
readonly required: _angular_core.InputSignal<boolean>;
|
|
20
18
|
icons: IconFieldOption[];
|
|
21
19
|
selectedIcon: _angular_core.WritableSignal<MTIcon | null>;
|
|
@@ -44,10 +44,8 @@ interface LocationFieldConfiguration {
|
|
|
44
44
|
declare class LocationField implements ControlValueAccessor, OnDestroy {
|
|
45
45
|
readonly hint: _angular_core.InputSignal<string | undefined>;
|
|
46
46
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
47
|
-
/**
|
|
48
|
-
|
|
49
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
50
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
47
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
48
|
+
readonly fieldId: string;
|
|
51
49
|
readonly placeholder: _angular_core.InputSignal<string | undefined>;
|
|
52
50
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
53
51
|
readonly required: _angular_core.InputSignal<boolean>;
|
|
@@ -13,10 +13,8 @@ declare class MultiSelectField implements ControlValueAccessor, OnInit, OnChange
|
|
|
13
13
|
ngAfterViewInit(): void;
|
|
14
14
|
readonly field: _angular_core.InputSignal<boolean>;
|
|
15
15
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
19
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
16
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
17
|
+
readonly fieldId: string;
|
|
20
18
|
readonly placeholder: _angular_core.InputSignal<string | undefined>;
|
|
21
19
|
readonly class: _angular_core.InputSignal<string>;
|
|
22
20
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
@@ -9,10 +9,8 @@ declare class NumberField implements ControlValueAccessor, OnInit, OnChanges {
|
|
|
9
9
|
readonly field: _angular_core.InputSignal<boolean>;
|
|
10
10
|
readonly hint: _angular_core.InputSignal<string | undefined>;
|
|
11
11
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
15
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
12
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
13
|
+
readonly fieldId: string;
|
|
16
14
|
readonly placeholder: _angular_core.InputSignal<string | undefined>;
|
|
17
15
|
readonly class: _angular_core.InputSignal<string>;
|
|
18
16
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
@@ -7,10 +7,8 @@ import { isInvalid } from '@masterteam/components';
|
|
|
7
7
|
declare class PickListField implements ControlValueAccessor, OnInit {
|
|
8
8
|
private readonly transloco;
|
|
9
9
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
13
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
10
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
11
|
+
readonly fieldId: string;
|
|
14
12
|
readonly class: _angular_core.InputSignal<string>;
|
|
15
13
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
16
14
|
readonly options: _angular_core.InputSignal<any[]>;
|
|
@@ -6,10 +6,8 @@ import { RadioItem } from '@masterteam/components/radio-cards';
|
|
|
6
6
|
declare class RadioCardsField implements ControlValueAccessor {
|
|
7
7
|
readonly circle: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
8
8
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
12
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
9
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
10
|
+
readonly fieldId: string;
|
|
13
11
|
readonly hint: _angular_core.InputSignal<string | undefined>;
|
|
14
12
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
15
13
|
readonly required: _angular_core.InputSignal<boolean>;
|
|
@@ -29,10 +29,8 @@ declare class SelectField implements ControlValueAccessor, OnInit, OnChanges, Af
|
|
|
29
29
|
readonly field: _angular_core.InputSignal<boolean>;
|
|
30
30
|
readonly hint: _angular_core.InputSignal<string | undefined>;
|
|
31
31
|
readonly label: _angular_core.InputSignal<string>;
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
35
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
32
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
33
|
+
readonly fieldId: string;
|
|
36
34
|
readonly placeholder: _angular_core.InputSignal<string>;
|
|
37
35
|
readonly hasPlaceholderPrefix: _angular_core.InputSignal<boolean>;
|
|
38
36
|
readonly class: _angular_core.InputSignal<string>;
|
|
@@ -16,7 +16,8 @@ declare class SliderField implements ControlValueAccessor {
|
|
|
16
16
|
readonly required: _angular_core.InputSignal<boolean>;
|
|
17
17
|
readonly ngControl: NgControl | null;
|
|
18
18
|
readonly hostClass: _angular_core.Signal<string>;
|
|
19
|
-
|
|
19
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
20
|
+
readonly fieldId: string;
|
|
20
21
|
readonly progressBgStyle: _angular_core.Signal<string>;
|
|
21
22
|
readonly numberInput: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
22
23
|
readonly requiredValidator: typeof Validators.required;
|
|
@@ -25,7 +26,6 @@ declare class SliderField implements ControlValueAccessor {
|
|
|
25
26
|
onTouched: () => void;
|
|
26
27
|
onModelChange: (value: number | null) => void;
|
|
27
28
|
isInvalid: typeof isInvalid;
|
|
28
|
-
private readonly defaultId;
|
|
29
29
|
constructor();
|
|
30
30
|
onValueChange(value: number | null): void;
|
|
31
31
|
private syncInputDisplay;
|
|
@@ -9,10 +9,8 @@ declare class TextField implements ControlValueAccessor, OnInit, OnChanges {
|
|
|
9
9
|
readonly field: _angular_core.InputSignal<boolean>;
|
|
10
10
|
readonly hint: _angular_core.InputSignal<string | undefined>;
|
|
11
11
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
15
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
12
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
13
|
+
readonly fieldId: string;
|
|
16
14
|
readonly placeholder: _angular_core.InputSignal<string | undefined>;
|
|
17
15
|
readonly class: _angular_core.InputSignal<string>;
|
|
18
16
|
readonly type: _angular_core.InputSignal<string>;
|
|
@@ -8,10 +8,8 @@ declare class TextareaField implements ControlValueAccessor, OnInit, OnChanges {
|
|
|
8
8
|
readonly field: _angular_core.InputSignal<boolean>;
|
|
9
9
|
readonly hint: _angular_core.InputSignal<string | undefined>;
|
|
10
10
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
14
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
11
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
12
|
+
readonly fieldId: string;
|
|
15
13
|
readonly placeholder: _angular_core.InputSignal<string | undefined>;
|
|
16
14
|
readonly class: _angular_core.InputSignal<string>;
|
|
17
15
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
@@ -9,10 +9,8 @@ declare class UploadField implements ControlValueAccessor {
|
|
|
9
9
|
private readonly activeLang;
|
|
10
10
|
private readonly confirmationService;
|
|
11
11
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
15
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
12
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
13
|
+
readonly fieldId: string;
|
|
16
14
|
readonly title: _angular_core.InputSignal<string>;
|
|
17
15
|
readonly description: _angular_core.InputSignal<string>;
|
|
18
16
|
readonly endPoint: _angular_core.InputSignal<string>;
|
|
@@ -28,10 +28,8 @@ declare class UserSearchField implements ControlValueAccessor, OnInit, OnDestroy
|
|
|
28
28
|
*/
|
|
29
29
|
readonly hideUnlinkedHint: _angular_core.InputSignal<boolean>;
|
|
30
30
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
34
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
31
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
32
|
+
readonly fieldId: string;
|
|
35
33
|
readonly placeholder: _angular_core.InputSignal<string | undefined>;
|
|
36
34
|
readonly class: _angular_core.InputSignal<string>;
|
|
37
35
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
@@ -1163,23 +1163,6 @@ declare function relativeLuminance(hex: string): number | null;
|
|
|
1163
1163
|
declare function contrastRatio(foreground: string, background: string): number | null;
|
|
1164
1164
|
/** WCAG 1.4.3 Contrast Minimum, normal-size text. */
|
|
1165
1165
|
declare const WCAG_AA_NORMAL_TEXT = 4.5;
|
|
1166
|
-
/**
|
|
1167
|
-
* The first shade at or below `preferred` on a generated ramp whose contrast
|
|
1168
|
-
* against `foreground` clears `minRatio`.
|
|
1169
|
-
*
|
|
1170
|
-
* This is how the brand colour stays fully tenant-configurable while the
|
|
1171
|
-
* primary button still passes AA (finding H-03). The shipped default
|
|
1172
|
-
* `#2AAEC0` gives white text 2.65:1 — the single most important control in the
|
|
1173
|
-
* product was the least legible one, and any tenant picking a light brand hit
|
|
1174
|
-
* the same wall. Rather than hardcode a darker teal, which fixes exactly one
|
|
1175
|
-
* tenant, we keep their hue and step down the ramp their own colour generated
|
|
1176
|
-
* until the text is readable.
|
|
1177
|
-
*
|
|
1178
|
-
* Returns `preferred` unchanged when it already passes, so a tenant whose brand
|
|
1179
|
-
* is dark enough sees no change at all. Returns the darkest available shade if
|
|
1180
|
-
* none passes — better to be as close as the palette allows than to give up.
|
|
1181
|
-
*/
|
|
1182
|
-
declare function pickAccessibleShade(palette: Record<string, string>, preferred: string, foreground?: string, minRatio?: number): string;
|
|
1183
1166
|
/** Dark ink used when white text would not be legible on a status colour. */
|
|
1184
1167
|
declare const READABLE_DARK_INK = "#1f2937";
|
|
1185
1168
|
/**
|
|
@@ -1199,29 +1182,42 @@ declare const READABLE_DARK_INK = "#1f2937";
|
|
|
1199
1182
|
declare function readableTextOn(bgColor: string | null | undefined, dark?: string, light?: string): string;
|
|
1200
1183
|
|
|
1201
1184
|
/**
|
|
1202
|
-
*
|
|
1185
|
+
* A unique DOM id for a form field, shared by its control and its `<label for>`.
|
|
1203
1186
|
*
|
|
1204
|
-
*
|
|
1205
|
-
* inside a reactive form that resolves, but a stand-alone field with no control
|
|
1206
|
-
* and no label produced `id="undefined"` — literally, because Angular
|
|
1207
|
-
* stringifies. The global search input was exactly that case, which is why it
|
|
1208
|
-
* also had no associated `<label>` and reported as unlabelled in the
|
|
1209
|
-
* accessibility tree (findings L-03 and H-04).
|
|
1187
|
+
* Call it in a property initialiser, where an injection context exists:
|
|
1210
1188
|
*
|
|
1211
|
-
*
|
|
1212
|
-
*
|
|
1213
|
-
*
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
*
|
|
1219
|
-
*
|
|
1189
|
+
* ```ts
|
|
1190
|
+
* readonly fieldId = newFieldId('mt-text-field');
|
|
1191
|
+
* ```
|
|
1192
|
+
*
|
|
1193
|
+
* ---
|
|
1194
|
+
*
|
|
1195
|
+
* Fields used to bind `[id]="ngControl?.name || label()"`, which failed twice
|
|
1196
|
+
* over:
|
|
1197
|
+
*
|
|
1198
|
+
* 1. A field with no control and no label rendered `id="undefined"` —
|
|
1199
|
+
* literally, because Angular stringifies. The global search input was
|
|
1200
|
+
* exactly that, which is why it reported as unlabelled in the accessibility
|
|
1201
|
+
* tree (findings L-03, H-04).
|
|
1202
|
+
*
|
|
1203
|
+
* 2. **A control name is not unique on a page.** Measured on the forms
|
|
1204
|
+
* showcase: `country` on four elements, and 15 of 63 `<label for>` pointing
|
|
1205
|
+
* at an id shared by more than one. A label activates the FIRST element with
|
|
1206
|
+
* that id, so the third "Country" label focused the first Country field —
|
|
1207
|
+
* a wrong-field click for a sighted mouse user, not just a conformance note.
|
|
1208
|
+
*
|
|
1209
|
+
* The first attempt at this fix addressed only (1): it preferred the control
|
|
1210
|
+
* name and fell back to a generated id, which is precisely what produced the
|
|
1211
|
+
* duplicates in (2). Uniqueness has to be the default, not the fallback, so the
|
|
1212
|
+
* id is always generated and never derived from user-facing content.
|
|
1220
1213
|
*
|
|
1221
|
-
*
|
|
1222
|
-
*
|
|
1214
|
+
* `_IdGenerator` is the CDK service Angular Material uses for exactly this, and
|
|
1215
|
+
* CDK is already a dependency here. It salts with the application id, so an app
|
|
1216
|
+
* embedded alongside another Angular app cannot collide either. The underscore
|
|
1217
|
+
* marks it Angular-internal: if a future CDK moves it, the replacement is a
|
|
1218
|
+
* module-scoped counter and this file is the only thing that changes.
|
|
1223
1219
|
*/
|
|
1224
|
-
declare function
|
|
1220
|
+
declare function newFieldId(prefix: string): string;
|
|
1225
1221
|
|
|
1226
1222
|
/**
|
|
1227
1223
|
* Helpers for wall-clock values — the `HH:mm:ss` shape a `Time` property
|
|
@@ -1257,5 +1253,5 @@ declare class MTDateFormatPipe implements PipeTransform {
|
|
|
1257
1253
|
static ɵpipe: i0.ɵɵPipeDeclaration<MTDateFormatPipe, "mtDateFormat", true>;
|
|
1258
1254
|
}
|
|
1259
1255
|
|
|
1260
|
-
export { BaseFacade, BaseFieldConfig, CheckboxFieldConfig, ColorPickerFieldConfig, CrudStateBase, DEFAULT_MT_DATE_FORMATS, DS_BLUE, DS_CHART_SERIES, DS_CONTROL_HEIGHT, DS_DEFAULT_PRIMARY_COLOR, DS_ERROR, DS_FONT_FAMILY, DS_GRAY, DS_INDIGO, DS_RADIUS, DS_SEMANTIC, DS_SHADOW, DS_SUCCESS, DS_WARNING, DateFieldConfig, EditorFieldConfig, EntityListFieldConfig, IconFieldConfig, LocationFieldConfig, LookupMatrixFieldConfig, LookupModuleCheckListFieldConfig, MTDateFormatPipe, MT_DATE_FORMATS, MT_DESIGN_IDENTITY_CLASS, MultiSelectFieldConfig, NumberFieldConfig, PickListFieldConfig, READABLE_DARK_INK, REQUEST_CONTEXT, RadioButtonFieldConfig, RadioCardsFieldConfig, ScheduleItemSelectorFieldConfig, SchedulePredecessorFieldConfig, SchemaConnectionFieldConfig, SelectFieldConfig, SliderFieldConfig, SpacerFieldConfig, TextFieldConfig, TextareaFieldConfig, ToggleFieldConfig, UploadFileFieldConfig, UserSearchFieldConfig, ValidatorConfig, WCAG_AA_NORMAL_TEXT, applyDesignIdentityClass, changeBackgroundColor, changePrimaryColor, changeTextColor, clockTimeToSeconds, contrastRatio, createCustomValidator, createEntityAdapter, dsChartSeries, dsIdentityConfigs, endLoading, formatClockTime, generateTailwindPalette, getContrastColor, getLightColor, getMTDesignIdentity, handleApiRequest, isInvalid,
|
|
1256
|
+
export { BaseFacade, BaseFieldConfig, CheckboxFieldConfig, ColorPickerFieldConfig, CrudStateBase, DEFAULT_MT_DATE_FORMATS, DS_BLUE, DS_CHART_SERIES, DS_CONTROL_HEIGHT, DS_DEFAULT_PRIMARY_COLOR, DS_ERROR, DS_FONT_FAMILY, DS_GRAY, DS_INDIGO, DS_RADIUS, DS_SEMANTIC, DS_SHADOW, DS_SUCCESS, DS_WARNING, DateFieldConfig, EditorFieldConfig, EntityListFieldConfig, IconFieldConfig, LocationFieldConfig, LookupMatrixFieldConfig, LookupModuleCheckListFieldConfig, MTDateFormatPipe, MT_DATE_FORMATS, MT_DESIGN_IDENTITY_CLASS, MultiSelectFieldConfig, NumberFieldConfig, PickListFieldConfig, READABLE_DARK_INK, REQUEST_CONTEXT, RadioButtonFieldConfig, RadioCardsFieldConfig, ScheduleItemSelectorFieldConfig, SchedulePredecessorFieldConfig, SchemaConnectionFieldConfig, SelectFieldConfig, SliderFieldConfig, SpacerFieldConfig, TextFieldConfig, TextareaFieldConfig, ToggleFieldConfig, UploadFileFieldConfig, UserSearchFieldConfig, ValidatorConfig, WCAG_AA_NORMAL_TEXT, applyDesignIdentityClass, changeBackgroundColor, changePrimaryColor, changeTextColor, clockTimeToSeconds, contrastRatio, createCustomValidator, createEntityAdapter, dsChartSeries, dsIdentityConfigs, endLoading, formatClockTime, generateTailwindPalette, getContrastColor, getLightColor, getMTDesignIdentity, handleApiRequest, isInvalid, newFieldId, parseClockTime, provideMTComponents, provideMTConfirmation, provideMTDateFormats, provideMTMessages, readableTextOn, relativeLuminance, setLoadingError, setMTDesignIdentity, startLoading, toAngularDateFormat, toClockTimeParts, wrapValidatorWithMessage };
|
|
1261
1257
|
export type { ApiRequestConfig, BaseFieldConstructorConfig, ClockTimeParts, CrudCreateConfig, CrudDeleteConfig, CrudLoadConfig, CrudUpdateConfig, DSColorScale, DynamicFieldConfig, DynamicFormConfig, EntityAdapter, EntityListFieldRuntimeContext, FieldRelationAction, FieldRelationConfig, FieldState, FieldType, FormulaConditionConfig, FormulaConditionMode, FormulaRuntimeMessage, FormulaRuntimeMessageCode, FormulaValidationRuleConfig, FormulaValidationSeverity, LayoutConfig, LoadingStateShape, LookupCheckListPropertyConfig, LookupMatrixCellConfig, LookupModuleCheckListFieldRuntimeContext, LookupOptionItemConfig, MTDateFormatType, MTDateFormats, MTDesignIdentity, MTThemeOptions, PaletteShade, QueryResult, RequestContextConfig, Response, ResponsiveColSpan, ScheduleItemSelectorFieldRuntimeContext, SchedulePredecessorFieldRuntimeContext, SectionConfig, ValidatorType };
|