@masterteam/components 0.0.333 → 0.0.335

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.
Files changed (45) hide show
  1. package/assets/common.css +2 -2
  2. package/fesm2022/masterteam-components-client-page.mjs +10 -4
  3. package/fesm2022/masterteam-components-client-page.mjs.map +1 -1
  4. package/fesm2022/masterteam-components-dynamic-drawer.mjs +112 -112
  5. package/fesm2022/masterteam-components-dynamic-drawer.mjs.map +1 -1
  6. package/fesm2022/masterteam-components-entities.mjs +8 -3
  7. package/fesm2022/masterteam-components-entities.mjs.map +1 -1
  8. package/fesm2022/masterteam-components-formula.mjs +4 -4
  9. package/fesm2022/masterteam-components-formula.mjs.map +1 -1
  10. package/fesm2022/masterteam-components-select-field.mjs +2 -2
  11. package/fesm2022/masterteam-components-select-field.mjs.map +1 -1
  12. package/fesm2022/masterteam-components-slider-field.mjs +2 -2
  13. package/fesm2022/masterteam-components-slider-field.mjs.map +1 -1
  14. package/fesm2022/masterteam-components-table.mjs +4 -4
  15. package/fesm2022/masterteam-components-table.mjs.map +1 -1
  16. package/fesm2022/masterteam-components-tooltip.mjs +11 -3
  17. package/fesm2022/masterteam-components-tooltip.mjs.map +1 -1
  18. package/fesm2022/masterteam-components.mjs +3 -662
  19. package/fesm2022/masterteam-components.mjs.map +1 -1
  20. package/package.json +1 -1
  21. package/types/masterteam-components-client-page.d.ts +7 -2
  22. package/types/masterteam-components-entities.d.ts +3 -0
  23. package/types/masterteam-components-tooltip.d.ts +1 -0
  24. package/types/masterteam-components.d.ts +2 -174
  25. package/assets/ds-components/button.css +0 -385
  26. package/assets/ds-components/content-switcher.css +0 -124
  27. package/assets/ds-components/feedback.css +0 -220
  28. package/assets/ds-components/field.css +0 -526
  29. package/assets/ds-components/misc.css +0 -252
  30. package/assets/ds-components/overlay.css +0 -268
  31. package/assets/ds-components/pagination.css +0 -140
  32. package/assets/ds-components/selection-controls.css +0 -245
  33. package/assets/ds-components/surfaces.css +0 -173
  34. package/assets/ds-components/table.css +0 -142
  35. package/assets/ds-components/tabs.css +0 -331
  36. package/assets/ds-identity.css +0 -275
  37. package/assets/fonts/IBMPlexSansArabic-400-arabic.woff2 +0 -0
  38. package/assets/fonts/IBMPlexSansArabic-400-latin.woff2 +0 -0
  39. package/assets/fonts/IBMPlexSansArabic-500-arabic.woff2 +0 -0
  40. package/assets/fonts/IBMPlexSansArabic-500-latin.woff2 +0 -0
  41. package/assets/fonts/IBMPlexSansArabic-600-arabic.woff2 +0 -0
  42. package/assets/fonts/IBMPlexSansArabic-600-latin.woff2 +0 -0
  43. package/assets/fonts/IBMPlexSansArabic-700-arabic.woff2 +0 -0
  44. package/assets/fonts/IBMPlexSansArabic-700-latin.woff2 +0 -0
  45. package/assets/ibm-plex-sans-arabic.css +0 -100
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masterteam/components",
3
- "version": "0.0.333",
3
+ "version": "0.0.335",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/components",
6
6
  "linkDirectory": true,
@@ -1,6 +1,7 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { OnDestroy, TemplateRef } from '@angular/core';
3
3
  import { ClientPageMenuItem } from '@masterteam/components/client-page-menu';
4
+ import { MTIcon } from '@masterteam/icons';
4
5
 
5
6
  declare class ClientPage implements OnDestroy {
6
7
  private readonly platformId;
@@ -15,6 +16,7 @@ declare class ClientPage implements OnDestroy {
15
16
  readonly isRtl: _angular_core.Signal<boolean>;
16
17
  /** Icon for the left sidebar header */
17
18
  readonly menuIcon: _angular_core.InputSignal<string | undefined>;
19
+ protected readonly sidebarIcon: _angular_core.Signal<MTIcon | undefined>;
18
20
  /** Title for the left sidebar header */
19
21
  readonly menuTitle: _angular_core.InputSignal<string | undefined>;
20
22
  /** List of menu items for the left sidebar */
@@ -27,6 +29,8 @@ declare class ClientPage implements OnDestroy {
27
29
  readonly activeItem: _angular_core.InputSignal<string | undefined>;
28
30
  /** Whether the sidebar menu is collapsed (two-way bindable) */
29
31
  readonly collapsed: _angular_core.ModelSignal<boolean>;
32
+ /** Allows the item-count heuristic; disable when the host owns collapse state. */
33
+ readonly autoCollapse: _angular_core.InputSignalWithTransform<boolean, unknown>;
30
34
  /** Enables desktop sidebar resizing from the divider */
31
35
  readonly resizable: _angular_core.InputSignalWithTransform<boolean, unknown>;
32
36
  /**
@@ -63,6 +67,7 @@ declare class ClientPage implements OnDestroy {
63
67
  * identical to `selectedItem` and its real `subtitle` description shows as-is.
64
68
  */
65
69
  readonly headerItem: _angular_core.Signal<ClientPageMenuItem | null>;
70
+ protected readonly headerIcon: _angular_core.Signal<MTIcon | undefined>;
66
71
  /** Whether the initial default selection has been emitted */
67
72
  private initialEmitted;
68
73
  /** Whether the sidebar area is being hovered */
@@ -84,7 +89,7 @@ declare class ClientPage implements OnDestroy {
84
89
  /** Whether the current state allows divider dragging */
85
90
  readonly canResize: _angular_core.Signal<boolean>;
86
91
  /** Icon for the collapse toggle button */
87
- readonly toggleIcon: _angular_core.Signal<"arrow.chevron-up" | "arrow.chevron-down" | "arrow.chevron-left" | "arrow.chevron-right">;
92
+ readonly toggleIcon: _angular_core.Signal<"arrow.chevron-down" | "arrow.chevron-left" | "arrow.chevron-right" | "arrow.chevron-up">;
88
93
  /** Accessible label for the toggle button */
89
94
  readonly toggleAriaLabel: _angular_core.Signal<string>;
90
95
  constructor();
@@ -111,7 +116,7 @@ declare class ClientPage implements OnDestroy {
111
116
  private readPersistedState;
112
117
  private writePersistedState;
113
118
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClientPage, never>;
114
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ClientPage, "mt-client-page", never, { "menuIcon": { "alias": "menuIcon"; "required": false; "isSignal": true; }; "menuTitle": { "alias": "menuTitle"; "required": false; "isSignal": true; }; "menuItems": { "alias": "menuItems"; "required": false; "isSignal": true; }; "menuItemsLoading": { "alias": "menuItemsLoading"; "required": false; "isSignal": true; }; "showExpandIcon": { "alias": "showExpandIcon"; "required": false; "isSignal": true; }; "activeItem": { "alias": "activeItem"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "resizable": { "alias": "resizable"; "required": false; "isSignal": true; }; "storageKey": { "alias": "storageKey"; "required": false; "isSignal": true; }; "storageMode": { "alias": "storageMode"; "required": false; "isSignal": true; }; "minSidebarWidth": { "alias": "minSidebarWidth"; "required": false; "isSignal": true; }; "maxSidebarWidth": { "alias": "maxSidebarWidth"; "required": false; "isSignal": true; }; "defaultSidebarWidth": { "alias": "defaultSidebarWidth"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; "menuItemClick": "menuItemClick"; "loadChildren": "loadChildren"; }, ["headerEnd"], ["*"], true, never>;
119
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ClientPage, "mt-client-page", never, { "menuIcon": { "alias": "menuIcon"; "required": false; "isSignal": true; }; "menuTitle": { "alias": "menuTitle"; "required": false; "isSignal": true; }; "menuItems": { "alias": "menuItems"; "required": false; "isSignal": true; }; "menuItemsLoading": { "alias": "menuItemsLoading"; "required": false; "isSignal": true; }; "showExpandIcon": { "alias": "showExpandIcon"; "required": false; "isSignal": true; }; "activeItem": { "alias": "activeItem"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "autoCollapse": { "alias": "autoCollapse"; "required": false; "isSignal": true; }; "resizable": { "alias": "resizable"; "required": false; "isSignal": true; }; "storageKey": { "alias": "storageKey"; "required": false; "isSignal": true; }; "storageMode": { "alias": "storageMode"; "required": false; "isSignal": true; }; "minSidebarWidth": { "alias": "minSidebarWidth"; "required": false; "isSignal": true; }; "maxSidebarWidth": { "alias": "maxSidebarWidth"; "required": false; "isSignal": true; }; "defaultSidebarWidth": { "alias": "defaultSidebarWidth"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; "menuItemClick": "menuItemClick"; "loadChildren": "loadChildren"; }, ["headerEnd"], ["*"], true, never>;
115
120
  }
116
121
 
117
122
  export { ClientPage };
@@ -964,7 +964,10 @@ declare class EntityText {
964
964
  readonly name: _angular_core.InputSignal<string | undefined>;
965
965
  readonly value: _angular_core.InputSignal<string | undefined>;
966
966
  readonly displayName: _angular_core.Signal<string>;
967
+ protected readonly hideLabel: _angular_core.Signal<boolean>;
968
+ protected readonly alignEnd: _angular_core.Signal<boolean>;
967
969
  readonly displayValue: _angular_core.Signal<string>;
970
+ protected readonly hasMarkup: _angular_core.Signal<boolean>;
968
971
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityText, never>;
969
972
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityText, "mt-entity-text", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
970
973
  }
@@ -15,6 +15,7 @@ declare class TruncateTooltip implements AfterViewInit {
15
15
  private resizeObserver?;
16
16
  private mutationObserver?;
17
17
  private syncTimeout;
18
+ private lastText;
18
19
  ngAfterViewInit(): void;
19
20
  syncTooltipState(): void;
20
21
  private queueSync;
@@ -1,7 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { EnvironmentProviders, InjectionToken, Signal, PipeTransform } from '@angular/core';
3
- import { Preset } from '@primeuix/themes/types';
4
- import { AuraBaseDesignTokens } from '@primeuix/themes/aura/base';
5
3
  import { MessageService, ConfirmationService } from 'primeng/api';
6
4
  import { HttpContext, HttpContextToken } from '@angular/common/http';
7
5
  import { AbstractControl, ValidatorFn } from '@angular/forms';
@@ -9,186 +7,16 @@ import * as _masterteam_components from '@masterteam/components';
9
7
  import { StateContext } from '@ngxs/store';
10
8
  import { Observable } from 'rxjs';
11
9
 
12
- /**
13
- * Masterteam Design System — experimental identity, expressed as a PrimeUIX
14
- * preset.
15
- *
16
- * Every `mt-*` component is a thin wrapper over a PrimeNG component, so the
17
- * identity is applied here rather than in 200 component stylesheets: retune the
18
- * preset and buttons, fields, tables, overlays, tabs and toasts all move
19
- * together. Only the handful of things a design token cannot express — the
20
- * font, the double focus ring, the animated input underline — live in
21
- * `assets/ds-identity.css`.
22
- *
23
- * This preset is *additive*: it is merged over the classic MT configuration, so
24
- * anything it does not mention keeps its current behaviour.
25
- */
26
- type MTDesignIdentity = 'classic' | 'experimental';
27
- /** Root class that gates the CSS half of the identity. */
28
- declare const MT_DESIGN_IDENTITY_CLASS = "mt-ds";
29
- /** DS primary button background. Used when the host does not brand the app. */
30
- declare const DS_DEFAULT_PRIMARY_COLOR: string;
31
- /**
32
- * The DS identity as a partial preset.
33
- *
34
- * @param primaryColor Optional brand override. Tenants that white-label the
35
- * product still need their own colour; when omitted the DS blue is used.
36
- * Note the DS itself treats the blue as fixed — an override is a deliberate
37
- * deviation, not a supported DS variant.
38
- */
39
- declare function dsIdentityConfigs(primaryColor?: string): Preset<AuraBaseDesignTokens>;
40
- /** The DS chart ramp, for hosts that render charts outside PrimeNG. */
41
- declare const dsChartSeries: readonly string[];
42
- /**
43
- * Adds or removes the root class that activates the CSS half of the identity.
44
- * No-ops outside the browser so SSR builds stay safe.
45
- */
46
- declare function applyDesignIdentityClass(identity: MTDesignIdentity): void;
47
-
48
10
  interface MTThemeOptions {
49
11
  primaryColor?: string;
50
12
  textColor?: string;
51
13
  backgroundColor?: string;
52
- /**
53
- * Which visual identity to render.
54
- *
55
- * - `'classic'` (default) — the shipped MT look. Unchanged.
56
- * - `'experimental'` — the Masterteam Design System identity (IBM Plex Sans
57
- * Arabic, DS blue, 4px control radius, DS elevation and focus ring).
58
- * Opt-in while the DS is being evaluated; see
59
- * `.claude/skills/mt-design-identity/SKILL.md`.
60
- */
61
- designIdentity?: MTDesignIdentity;
62
14
  }
63
- declare function getMTDesignIdentity(): MTDesignIdentity;
64
15
  declare function changePrimaryColor(color: string): void;
65
16
  declare function changeBackgroundColor(color?: string): void;
66
17
  declare function changeTextColor(color: string): void;
67
- /**
68
- * Switches identity at runtime — for the showcase toggle and for side-by-side
69
- * review. Replaces the active preset outright (rather than merging into it, as
70
- * `updatePreset` would) so switching back to classic is lossless.
71
- */
72
- declare function setMTDesignIdentity(identity: MTDesignIdentity, themeOptions?: Omit<MTThemeOptions, 'designIdentity'>): void;
73
18
  declare function provideMTComponents(themeOptions?: MTThemeOptions): EnvironmentProviders;
74
19
 
75
- /**
76
- * Masterteam Design System — raw palettes and scales.
77
- *
78
- * Transcribed from the DS Storybook foundations (Figma
79
- * `WTmRAkJVvw0IvZMA7wBdTC`). These are primitives: they name colours, not
80
- * roles. The mapping from primitive to role lives in `ds-identity.preset.ts`.
81
- *
82
- * Adding a value here without a corresponding Figma variable is how a design
83
- * system drifts — extend the Figma file first, then mirror it.
84
- */
85
- interface DSColorScale {
86
- readonly 25: string;
87
- readonly 50: string;
88
- readonly 100: string;
89
- readonly 200: string;
90
- readonly 300: string;
91
- readonly 400: string;
92
- readonly 500: string;
93
- readonly 600: string;
94
- readonly 700: string;
95
- readonly 800: string;
96
- readonly 900: string;
97
- readonly 950: string;
98
- }
99
- /** Primary blue. 800 is the primary button background. */
100
- declare const DS_BLUE: DSColorScale;
101
- /** Secondary indigo — accents, tags, selected states. */
102
- declare const DS_INDIGO: DSColorScale;
103
- declare const DS_SUCCESS: DSColorScale;
104
- declare const DS_WARNING: DSColorScale;
105
- declare const DS_ERROR: DSColorScale;
106
- /** Neutral scale. Note it stops at 900 in Figma; 0/25/950 are extrapolated
107
- * because PrimeUIX requires a full 0–950 surface ramp. */
108
- declare const DS_GRAY: {
109
- readonly 0: "#FFFFFF";
110
- readonly 25: "#FCFCFD";
111
- readonly 50: "#F9FAFB";
112
- readonly 100: "#F3F4F6";
113
- readonly 200: "#E5E7EB";
114
- readonly 300: "#D1D5DB";
115
- readonly 400: "#9CA3AF";
116
- readonly 500: "#6B7280";
117
- readonly 600: "#4B5563";
118
- readonly 700: "#374151";
119
- readonly 800: "#1F2937";
120
- readonly 900: "#111827";
121
- readonly 950: "#0A0F1C";
122
- };
123
- /**
124
- * Semantic values that are not part of a ramp. Each one is a named Figma
125
- * variable in its own right.
126
- */
127
- declare const DS_SEMANTIC: {
128
- /** Default body / label text. Deliberately navy-black, not gray-900. */
129
- readonly textStrong: "#000B36";
130
- readonly textSecondary: "#3C5073";
131
- readonly textPlaceholder: "#B6BDCA";
132
- readonly textHelper: "#384250";
133
- readonly surface: "#FFFFFF";
134
- readonly border: "#E5E7EB";
135
- /** Disabled is a colour swap, never an opacity fade. */
136
- readonly disabledBg: "#D2D6DB";
137
- readonly disabledText: "#6C7C96";
138
- readonly inputBorder: "#D2D6DB";
139
- readonly inputBorderHover: "#1F2A37";
140
- readonly inputBorderReadonly: "#CED3DC";
141
- readonly inputBgPressed: "#F3F4F6";
142
- /** Destructive red. Distinct from the error ramp — this is the button colour. */
143
- readonly danger: "#A30000";
144
- readonly dangerSecondaryBg: "#FCDAD7";
145
- readonly dangerSecondaryBgHover: "#F8BAB5";
146
- readonly dangerSecondaryBgPressed: "#F3908A";
147
- /** Tinted secondary button, expressed as primary-at-opacity. */
148
- readonly secondaryBg: "rgba(24, 73, 169, 0.2)";
149
- readonly secondaryBgHover: "rgba(24, 73, 169, 0.1)";
150
- readonly focusRing: "#1849A9";
151
- readonly focusOutline: "#FFFFFF";
152
- readonly tooltipBg: "#1A2236";
153
- };
154
- /** Figma effect styles. Never invent a shadow outside this set. */
155
- declare const DS_SHADOW: {
156
- readonly xs: "0 1px 2px 0 rgba(16, 24, 40, 0.05)";
157
- readonly sm: "0 1px 3px 0 rgba(16, 24, 40, 0.10), 0 1px 2px 0 rgba(16, 24, 40, 0.06)";
158
- readonly md: "0 4px 8px -2px rgba(16, 24, 40, 0.10), 0 2px 4px -2px rgba(16, 24, 40, 0.06)";
159
- readonly lg: "0 12px 16px -6px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03)";
160
- readonly xl: "0 20px 24px -4px rgba(16, 24, 40, 0.08), 0 8px 8px -4px rgba(16, 24, 40, 0.03)";
161
- readonly '2xl': "0 24px 48px -12px rgba(16, 24, 40, 0.18)";
162
- };
163
- /**
164
- * Radius scale. The DS names differ from the PrimeUIX names by one step —
165
- * DS `radius-sm` (4px, the default for buttons and inputs) lands on PrimeUIX
166
- * `md`, because that is the key PrimeNG components reference. Mapping them
167
- * here keeps the shift in one place instead of spreading it across overrides.
168
- */
169
- declare const DS_RADIUS: {
170
- readonly none: "0";
171
- /** DS radius-xs — code badges, small tags */
172
- readonly xs: "2px";
173
- /** DS radius-xs..sm boundary */
174
- readonly sm: "4px";
175
- /** DS radius-sm — buttons, inputs, dropdowns (PrimeNG's default reference) */
176
- readonly md: "4px";
177
- /** DS radius-md — cards, tooltips, popovers */
178
- readonly lg: "8px";
179
- /** DS radius-lg — modals, drawers */
180
- readonly xl: "16px";
181
- };
182
- /** Control heights, in px, from the Figma button spacing frame. */
183
- declare const DS_CONTROL_HEIGHT: {
184
- readonly sm: 24;
185
- readonly md: 32;
186
- readonly lg: 40;
187
- };
188
- declare const DS_FONT_FAMILY = "'IBM Plex Sans Arabic', system-ui, 'Segoe UI', sans-serif";
189
- /** Ordered chart series. Six is the hard maximum. */
190
- declare const DS_CHART_SERIES: readonly ["#1849A9", "#175CD3", "#2E90FA", "#53B1FD", "#B2DDFF", "#D1E9FF"];
191
-
192
20
  declare function provideMTMessages(): typeof MessageService;
193
21
 
194
22
  declare function provideMTConfirmation(): typeof ConfirmationService;
@@ -1367,5 +1195,5 @@ declare class MTDateFormatPipe implements PipeTransform {
1367
1195
  static ɵpipe: i0.ɵɵPipeDeclaration<MTDateFormatPipe, "mtDateFormat", true>;
1368
1196
  }
1369
1197
 
1370
- 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, coerceCheckboxValue, 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 };
1371
- export type { ApiRequestConfig, BaseFieldConstructorConfig, ClockTimeParts, CrudCreateConfig, CrudDeleteConfig, CrudLoadConfig, CrudUpdateConfig, DSColorScale, DynamicFieldConfig, DynamicFormConfig, EntityAdapter, EntityListFieldRuntimeContext, FieldOptionsFilterConfig, FieldOptionsFilterState, 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, SchemaConnectionFieldRuntimeContext, SectionConfig, ValidatorType };
1198
+ export { BaseFacade, BaseFieldConfig, CheckboxFieldConfig, ColorPickerFieldConfig, CrudStateBase, DEFAULT_MT_DATE_FORMATS, DateFieldConfig, EditorFieldConfig, EntityListFieldConfig, IconFieldConfig, LocationFieldConfig, LookupMatrixFieldConfig, LookupModuleCheckListFieldConfig, MTDateFormatPipe, MT_DATE_FORMATS, 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, changeBackgroundColor, changePrimaryColor, changeTextColor, clockTimeToSeconds, coerceCheckboxValue, contrastRatio, createCustomValidator, createEntityAdapter, endLoading, formatClockTime, generateTailwindPalette, getContrastColor, getLightColor, handleApiRequest, isInvalid, newFieldId, parseClockTime, provideMTComponents, provideMTConfirmation, provideMTDateFormats, provideMTMessages, readableTextOn, relativeLuminance, setLoadingError, startLoading, toAngularDateFormat, toClockTimeParts, wrapValidatorWithMessage };
1199
+ export type { ApiRequestConfig, BaseFieldConstructorConfig, ClockTimeParts, CrudCreateConfig, CrudDeleteConfig, CrudLoadConfig, CrudUpdateConfig, DynamicFieldConfig, DynamicFormConfig, EntityAdapter, EntityListFieldRuntimeContext, FieldOptionsFilterConfig, FieldOptionsFilterState, FieldRelationAction, FieldRelationConfig, FieldState, FieldType, FormulaConditionConfig, FormulaConditionMode, FormulaRuntimeMessage, FormulaRuntimeMessageCode, FormulaValidationRuleConfig, FormulaValidationSeverity, LayoutConfig, LoadingStateShape, LookupCheckListPropertyConfig, LookupMatrixCellConfig, LookupModuleCheckListFieldRuntimeContext, LookupOptionItemConfig, MTDateFormatType, MTDateFormats, MTThemeOptions, PaletteShade, QueryResult, RequestContextConfig, Response, ResponsiveColSpan, ScheduleItemSelectorFieldRuntimeContext, SchedulePredecessorFieldRuntimeContext, SchemaConnectionFieldRuntimeContext, SectionConfig, ValidatorType };
@@ -1,385 +0,0 @@
1
- /* ==========================================================================
2
- Button — transcribed from DS `Button/Button.module.css` (Figma node 4159:280)
3
- --------------------------------------------------------------------------
4
- The DS sizes buttons by explicit height + horizontal padding, not by vertical
5
- padding, so the label baseline stays put whatever the icon does. PrimeNG
6
- sizes by padding, so height is asserted here and padding-Y zeroed.
7
-
8
- DS variant → PrimeNG variant. No `mt-button` API change: existing call sites
9
- get the DS look for free.
10
-
11
- primary default (no severity)
12
- neutral severity="secondary"
13
- secondary-solid [outlined]
14
- transparent [text]
15
- danger severity="danger"
16
- danger-secondary severity="danger" + [outlined] | [text]
17
- ========================================================================== */
18
-
19
- html.mt-ds .p-button {
20
- /* Sized from the field tokens, not its own literals, so a button and a field
21
- on the same row can never drift apart. The DS default button size is `lg`,
22
- which is the same 40px the default field uses. */
23
- height: var(--ds-field-height);
24
- padding: 0 var(--ds-field-pad-x);
25
- gap: 4px;
26
- border-width: 1px;
27
- border-style: solid;
28
- border-radius: 4px;
29
- font-family: var(--ds-font-sans);
30
- font-size: var(--ds-field-font);
31
- line-height: var(--ds-field-line);
32
- font-weight: 500;
33
- white-space: nowrap;
34
- flex-shrink: 0;
35
- position: relative;
36
- overflow: hidden;
37
- transition:
38
- background-color var(--ds-transition-fast),
39
- border-color var(--ds-transition-fast),
40
- color var(--ds-transition-fast);
41
- }
42
-
43
- /* The DS scale is 24 / 32 / 40. With the default sitting on 40 (DS large),
44
- `size="small"` maps to DS *medium* rather than DS small — dropping two steps
45
- to 24px reads as broken next to a 40px default. DS small remains reachable
46
- via `.mt-ds-button-xs` for genuinely dense surfaces. */
47
- html.mt-ds .p-button-sm {
48
- height: 32px;
49
- padding: 0 8px;
50
- font-size: 14px;
51
- line-height: 20px;
52
- }
53
-
54
- html.mt-ds .p-button.mt-ds-button-xs {
55
- height: 24px;
56
- padding: 0 8px;
57
- font-size: 12px;
58
- line-height: 18px;
59
- }
60
-
61
- html.mt-ds .p-button.p-button-icon-only.mt-ds-button-xs {
62
- width: 24px;
63
- }
64
-
65
- html.mt-ds .p-button-lg {
66
- height: 40px;
67
- padding: 0 12px;
68
- font-size: 16px;
69
- line-height: 24px;
70
- }
71
-
72
- /* ── Icon slot: 16 / 20 / 24 by size ───────────────────────────────────── */
73
-
74
- html.mt-ds .p-button :is(.p-icon, .p-button-icon, mt-icon, svg) {
75
- width: 20px;
76
- height: 20px;
77
- font-size: 20px;
78
- flex-shrink: 0;
79
- }
80
-
81
- html.mt-ds .p-button-sm :is(.p-icon, .p-button-icon, mt-icon, svg) {
82
- width: 16px;
83
- height: 16px;
84
- font-size: 16px;
85
- }
86
-
87
- html.mt-ds .p-button-lg :is(.p-icon, .p-button-icon, mt-icon, svg) {
88
- width: 24px;
89
- height: 24px;
90
- font-size: 24px;
91
- }
92
-
93
- /* ── Icon-only: square, no horizontal padding ──────────────────────────── */
94
-
95
- /* `gap: 0` matters: PrimeNG still renders an (empty, zero-width) label span
96
- next to the icon, and the 4px inter-child gap then pushes the icon off
97
- centre by half of it. */
98
- html.mt-ds .p-button.p-button-icon-only {
99
- width: var(--ds-field-height);
100
- padding: 0;
101
- gap: 0;
102
- aspect-ratio: 1;
103
- }
104
-
105
- html.mt-ds .p-button.p-button-icon-only.p-button-sm {
106
- width: 32px;
107
- }
108
-
109
- html.mt-ds .p-button.p-button-icon-only.p-button-lg {
110
- width: 40px;
111
- }
112
-
113
- /* ── Primary ───────────────────────────────────────────────────────────── */
114
-
115
- html.mt-ds
116
- .p-button:not(
117
- .p-button-secondary,
118
- .p-button-danger,
119
- .p-button-outlined,
120
- .p-button-text,
121
- .p-button-link
122
- ) {
123
- background: #1849a9;
124
- border-color: #1849a9;
125
- color: #f9fafb;
126
- }
127
-
128
- html.mt-ds
129
- .p-button:not(
130
- .p-button-secondary,
131
- .p-button-danger,
132
- .p-button-outlined,
133
- .p-button-text,
134
- .p-button-link
135
- ):not(:disabled):hover {
136
- background: #194185;
137
- border-color: #194185;
138
- }
139
-
140
- html.mt-ds
141
- .p-button:not(
142
- .p-button-secondary,
143
- .p-button-danger,
144
- .p-button-outlined,
145
- .p-button-text,
146
- .p-button-link
147
- ):not(:disabled):active {
148
- background: #102a56;
149
- border-color: #102a56;
150
- }
151
-
152
- html.mt-ds
153
- .p-button:not(
154
- .p-button-secondary,
155
- .p-button-danger,
156
- .p-button-outlined,
157
- .p-button-text,
158
- .p-button-link
159
- ):focus-visible {
160
- outline: none;
161
- box-shadow:
162
- 0 0 0 2px #1849a9,
163
- 0 0 0 5px #f9fafb;
164
- }
165
-
166
- /* ── Neutral ───────────────────────────────────────────────────────────── */
167
-
168
- html.mt-ds
169
- .p-button.p-button-secondary:not(
170
- .p-button-outlined,
171
- .p-button-text,
172
- .p-button-link
173
- ) {
174
- background: #f3f4f6;
175
- border-color: #f3f4f6;
176
- color: #000b36;
177
- }
178
-
179
- html.mt-ds
180
- .p-button.p-button-secondary:not(
181
- .p-button-outlined,
182
- .p-button-text,
183
- .p-button-link
184
- ):not(:disabled):hover {
185
- background: #e5e7eb;
186
- border-color: #e5e7eb;
187
- color: #000b36;
188
- }
189
-
190
- html.mt-ds
191
- .p-button.p-button-secondary:not(
192
- .p-button-outlined,
193
- .p-button-text,
194
- .p-button-link
195
- ):not(:disabled):active {
196
- background: #d2d6db;
197
- border-color: #d2d6db;
198
- }
199
-
200
- html.mt-ds .p-button.p-button-secondary:focus-visible {
201
- outline: none;
202
- box-shadow:
203
- 0 0 0 2px #f3f4f6,
204
- 0 0 0 5px #1849a9;
205
- }
206
-
207
- /* ── Secondary-solid (tinted) ──────────────────────────────────────────── */
208
-
209
- html.mt-ds .p-button.p-button-outlined:not(.p-button-danger) {
210
- background: rgb(24 73 169 / 0.2);
211
- border-color: transparent;
212
- color: #1849a9;
213
- }
214
-
215
- html.mt-ds
216
- .p-button.p-button-outlined:not(.p-button-danger):not(:disabled):hover {
217
- background: rgb(24 73 169 / 0.1);
218
- border-color: transparent;
219
- color: #1849a9;
220
- }
221
-
222
- html.mt-ds
223
- .p-button.p-button-outlined:not(.p-button-danger):not(:disabled):active {
224
- background: rgb(24 73 169 / 0.3);
225
- }
226
-
227
- html.mt-ds .p-button.p-button-outlined:not(.p-button-danger):focus-visible {
228
- outline: none;
229
- box-shadow:
230
- 0 0 0 2px rgb(24 73 169 / 0.2),
231
- 0 0 0 5px #1849a9;
232
- }
233
-
234
- /* ── Transparent / ghost ───────────────────────────────────────────────── */
235
-
236
- html.mt-ds .p-button:is(.p-button-text, .p-button-link):not(.p-button-danger) {
237
- background: transparent;
238
- border-color: transparent;
239
- color: #175cd3;
240
- }
241
-
242
- html.mt-ds
243
- .p-button:is(.p-button-text, .p-button-link):not(.p-button-danger):not(
244
- :disabled
245
- ):hover {
246
- background: rgb(24 73 169 / 0.06);
247
- color: #1570ef;
248
- }
249
-
250
- html.mt-ds
251
- .p-button:is(.p-button-text, .p-button-link):not(.p-button-danger):not(
252
- :disabled
253
- ):active {
254
- background: rgb(24 73 169 / 0.12);
255
- color: #1570ef;
256
- }
257
-
258
- html.mt-ds
259
- .p-button:is(.p-button-text, .p-button-link):not(
260
- .p-button-danger
261
- ):focus-visible {
262
- outline: none;
263
- box-shadow:
264
- 0 0 0 2px transparent,
265
- 0 0 0 5px #1849a9;
266
- }
267
-
268
- /* ── Danger ────────────────────────────────────────────────────────────── */
269
-
270
- html.mt-ds
271
- .p-button.p-button-danger:not(
272
- .p-button-outlined,
273
- .p-button-text,
274
- .p-button-link
275
- ) {
276
- background: #a30000;
277
- border-color: #a30000;
278
- color: #f9fafb;
279
- }
280
-
281
- html.mt-ds
282
- .p-button.p-button-danger:not(
283
- .p-button-outlined,
284
- .p-button-text,
285
- .p-button-link
286
- ):not(:disabled):hover {
287
- background: #8b0000;
288
- border-color: #8b0000;
289
- }
290
-
291
- html.mt-ds
292
- .p-button.p-button-danger:not(
293
- .p-button-outlined,
294
- .p-button-text,
295
- .p-button-link
296
- ):not(:disabled):active {
297
- background: #6f0000;
298
- border-color: #6f0000;
299
- }
300
-
301
- html.mt-ds
302
- .p-button.p-button-danger:not(
303
- .p-button-outlined,
304
- .p-button-text,
305
- .p-button-link
306
- ):focus-visible {
307
- outline: none;
308
- box-shadow:
309
- 0 0 0 2px #a30000,
310
- 0 0 0 5px #f9fafb;
311
- }
312
-
313
- /* ── Danger-secondary ──────────────────────────────────────────────────── */
314
-
315
- html.mt-ds
316
- .p-button.p-button-danger:is(
317
- .p-button-outlined,
318
- .p-button-text,
319
- .p-button-link
320
- ) {
321
- background: #fcdad7;
322
- border-color: transparent;
323
- color: #a30000;
324
- }
325
-
326
- html.mt-ds
327
- .p-button.p-button-danger:is(
328
- .p-button-outlined,
329
- .p-button-text,
330
- .p-button-link
331
- ):not(:disabled):hover {
332
- background: #f8bab5;
333
- color: #a30000;
334
- }
335
-
336
- html.mt-ds
337
- .p-button.p-button-danger:is(
338
- .p-button-outlined,
339
- .p-button-text,
340
- .p-button-link
341
- ):not(:disabled):active {
342
- background: #f3908a;
343
- }
344
-
345
- html.mt-ds
346
- .p-button.p-button-danger:is(
347
- .p-button-outlined,
348
- .p-button-text,
349
- .p-button-link
350
- ):focus-visible {
351
- outline: none;
352
- box-shadow:
353
- 0 0 0 2px #fcdad7,
354
- 0 0 0 5px #a30000;
355
- }
356
-
357
- /* ── Disabled — dedicated tokens, never opacity ────────────────────────── */
358
-
359
- html.mt-ds .p-button:disabled,
360
- html.mt-ds .p-button.p-disabled {
361
- background: #d2d6db;
362
- border-color: #d2d6db;
363
- color: #6c7c96;
364
- opacity: 1;
365
- cursor: not-allowed;
366
- }
367
-
368
- html.mt-ds
369
- .p-button:is(.p-button-text, .p-button-link):is(:disabled, .p-disabled) {
370
- background: transparent;
371
- border-color: transparent;
372
- color: #6c7c96;
373
- }
374
-
375
- /* ── Loading — DS hides the label and centres the spinner ──────────────── */
376
-
377
- html.mt-ds .p-button-loading .p-button-label {
378
- visibility: hidden;
379
- }
380
-
381
- html.mt-ds .p-button-loading .p-button-loading-icon {
382
- position: absolute;
383
- inset: 0;
384
- margin: auto;
385
- }