@masterteam/components 0.0.268 → 0.0.270
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-entities.mjs +6 -6
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/fesm2022/masterteam-components-tabs.mjs +73 -13
- package/fesm2022/masterteam-components-tabs.mjs.map +1 -1
- package/fesm2022/masterteam-components.mjs +118 -210
- package/fesm2022/masterteam-components.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-tabs.d.ts +24 -1
- package/types/masterteam-components.d.ts +1 -18
package/package.json
CHANGED
|
@@ -37,14 +37,37 @@ declare class Tabs {
|
|
|
37
37
|
private readonly tabsContainer;
|
|
38
38
|
private readonly measureRow;
|
|
39
39
|
private readonly morePopover;
|
|
40
|
+
private readonly moreBlock;
|
|
40
41
|
private resizeObserver?;
|
|
41
42
|
private measureHandle;
|
|
42
43
|
private alignHandle;
|
|
44
|
+
/** Last real width of the more block; 0 until it has been rendered once. */
|
|
45
|
+
private moreWidth;
|
|
43
46
|
readonly visibleCount: _angular_core.WritableSignal<number>;
|
|
47
|
+
/** Natural width of every option, in order, from the measurement ghost row. */
|
|
48
|
+
private readonly tabWidths;
|
|
49
|
+
/** Room the visible row actually has, once the more button is accounted for. */
|
|
50
|
+
private readonly availableWidth;
|
|
51
|
+
private readonly activeIndex;
|
|
52
|
+
/**
|
|
53
|
+
* The tabs the strip shows — the widest prefix that fits, plus the active tab
|
|
54
|
+
* if that prefix would have hidden it.
|
|
55
|
+
*
|
|
56
|
+
* Without the second half, selecting a tab from the more menu left the strip
|
|
57
|
+
* with nothing selected at all: no underline, and no `aria-selected` on any
|
|
58
|
+
* tab, so neither a sighted user nor a screen reader could tell where they
|
|
59
|
+
* were. A project exposes twenty-three tabs and ten of them sit in the menu,
|
|
60
|
+
* so this is the normal case for a third of the product, not an edge.
|
|
61
|
+
*
|
|
62
|
+
* The active tab is appended rather than swapped in, which keeps the row in
|
|
63
|
+
* the options' own order: everything in the prefix precedes it already.
|
|
64
|
+
* Trailing tabs are dropped until it genuinely fits, using the same measured
|
|
65
|
+
* widths the prefix was chosen with, so pinning never pushes the row wider
|
|
66
|
+
* than the space it was measured against.
|
|
67
|
+
*/
|
|
44
68
|
readonly visibleOptions: _angular_core.Signal<OptionItem[]>;
|
|
45
69
|
readonly overflowOptions: _angular_core.Signal<OptionItem[]>;
|
|
46
70
|
readonly hasOverflow: _angular_core.Signal<boolean>;
|
|
47
|
-
readonly isActiveInOverflow: _angular_core.Signal<boolean>;
|
|
48
71
|
readonly searchThreshold: _angular_core.InputSignal<number>;
|
|
49
72
|
readonly searchTerm: _angular_core.WritableSignal<string>;
|
|
50
73
|
readonly showOverflowSearch: _angular_core.Signal<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
|
/**
|
|
@@ -1270,5 +1253,5 @@ declare class MTDateFormatPipe implements PipeTransform {
|
|
|
1270
1253
|
static ɵpipe: i0.ɵɵPipeDeclaration<MTDateFormatPipe, "mtDateFormat", true>;
|
|
1271
1254
|
}
|
|
1272
1255
|
|
|
1273
|
-
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,
|
|
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 };
|
|
1274
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 };
|