@tectra-ng/core 0.3.2 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/fesm2022/tectra-ng-core-a11y.mjs.map +1 -1
  2. package/fesm2022/tectra-ng-core-config.mjs.map +1 -1
  3. package/fesm2022/tectra-ng-core-fluid.mjs.map +1 -1
  4. package/fesm2022/tectra-ng-core-forms.mjs.map +1 -1
  5. package/fesm2022/tectra-ng-core-i18n-ua.mjs +0 -14
  6. package/fesm2022/tectra-ng-core-i18n-ua.mjs.map +1 -1
  7. package/fesm2022/tectra-ng-core-i18n.mjs +0 -14
  8. package/fesm2022/tectra-ng-core-i18n.mjs.map +1 -1
  9. package/fesm2022/tectra-ng-core-overlay.mjs.map +1 -1
  10. package/fesm2022/tectra-ng-core-ripple.mjs.map +1 -1
  11. package/fesm2022/tectra-ng-core-styles.mjs.map +1 -1
  12. package/fesm2022/tectra-ng-core-utils.mjs.map +1 -1
  13. package/fesm2022/tectra-ng-core.mjs +1 -1
  14. package/fesm2022/tectra-ng-core.mjs.map +1 -1
  15. package/package.json +2 -2
  16. package/types/tectra-ng-core-a11y.d.ts +42 -0
  17. package/types/tectra-ng-core-a11y.d.ts.map +1 -1
  18. package/types/tectra-ng-core-config.d.ts +63 -0
  19. package/types/tectra-ng-core-config.d.ts.map +1 -1
  20. package/types/tectra-ng-core-fluid.d.ts +2 -0
  21. package/types/tectra-ng-core-fluid.d.ts.map +1 -1
  22. package/types/tectra-ng-core-forms.d.ts +15 -0
  23. package/types/tectra-ng-core-forms.d.ts.map +1 -1
  24. package/types/tectra-ng-core-i18n-types.d.ts +493 -14
  25. package/types/tectra-ng-core-i18n-types.d.ts.map +1 -1
  26. package/types/tectra-ng-core-i18n-ua.d.ts +1 -0
  27. package/types/tectra-ng-core-i18n-ua.d.ts.map +1 -1
  28. package/types/tectra-ng-core-i18n.d.ts +14 -0
  29. package/types/tectra-ng-core-i18n.d.ts.map +1 -1
  30. package/types/tectra-ng-core-overlay.d.ts +135 -0
  31. package/types/tectra-ng-core-overlay.d.ts.map +1 -1
  32. package/types/tectra-ng-core-ripple.d.ts +6 -0
  33. package/types/tectra-ng-core-ripple.d.ts.map +1 -1
  34. package/types/tectra-ng-core-styles.d.ts +2 -0
  35. package/types/tectra-ng-core-styles.d.ts.map +1 -1
  36. package/types/tectra-ng-core-utils.d.ts +17 -0
  37. package/types/tectra-ng-core-utils.d.ts.map +1 -1
  38. package/types/tectra-ng-core.d.ts +2 -1
  39. package/types/tectra-ng-core.d.ts.map +1 -1
@@ -1,4 +1,4 @@
1
- const TECTRA_CORE_VERSION = "0.0.0";
1
+ const TECTRA_CORE_VERSION = "0.4.1";
2
2
  export { TECTRA_CORE_VERSION };
3
3
 
4
4
  //# sourceMappingURL=tectra-ng-core.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-core.mjs","names":[],"sources":["../../../../packages/core/index.ts"],"sourcesContent":["export const TECTRA_CORE_VERSION = '0.0.0';\n"],"mappings":"AAAA,MAAa,sBAAsB"}
1
+ {"version":3,"file":"tectra-ng-core.mjs","names":[],"sources":["../../../../packages/core/index.ts"],"sourcesContent":["/** Version of the installed `@tectra-ng/core` package, written in when the package is built. */\nexport const TECTRA_CORE_VERSION = '0.0.0';\n"],"mappings":"AACA,MAAa,sBAAsB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tectra-ng/core",
3
- "version": "0.3.2",
3
+ "version": "0.4.1",
4
4
  "description": "tectra core for Angular: provideTectra, overlay, accessibility helpers, forms, locale and styles.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://tectra-ng.com",
@@ -27,7 +27,7 @@
27
27
  "@angular/core": "^22.2.0",
28
28
  "@angular/forms": "^22.2.0",
29
29
  "rxjs": "^7.8.0",
30
- "@tectra-ng/themes": "^0.3.2"
30
+ "@tectra-ng/themes": "^0.4.1"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"
@@ -1,23 +1,47 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import { OnDestroy, Signal } from "@angular/core";
3
3
  import { AriaLivePoliteness, InteractivityChecker } from "@angular/cdk/a11y";
4
+ /** Returns a page-unique id with the given prefix, like `tx-input-3`; used for `id` and ARIA links. */
4
5
  export declare function uniqueId(prefix: string): string;
6
+ /** State of a keyboard-navigated list passed to `nextListIndex`. */
5
7
  export interface TxListNavigationOptions {
8
+ /** Number of items in the list. */
6
9
  count: number;
10
+ /** Index of the active item; `-1` when none is active. */
7
11
  current: number;
12
+ /** Whether arrows wrap around at the ends (default `true`). */
8
13
  loop?: boolean;
14
+ /** How many items `PageUp` / `PageDown` jump (default 10). */
9
15
  pageSize?: number;
16
+ /** Tells whether the item at an index is disabled and must be skipped. */
10
17
  isDisabled?: (index: number) => boolean;
11
18
  }
19
+ /**
20
+ * Index a list moves to for a navigation key (arrows, `Home`, `End`, `PageUp`, `PageDown`), skipping disabled
21
+ * items; `null` for any other key or an empty list.
22
+ */
12
23
  export declare function nextListIndex(key: string, options: TxListNavigationOptions): number | null;
24
+ /**
25
+ * Type-to-find for lists: collects typed characters and finds the next label that starts with them; the
26
+ * buffer clears after a pause (default 500 ms).
27
+ */
13
28
  export declare class TxTypeahead {
14
29
  private readonly delay;
15
30
  private buffer;
16
31
  private timer;
17
32
  constructor(delay?: number);
33
+ /**
34
+ * Adds a typed character and returns the index of the matching label, searching from the item after
35
+ * `current`; `null` when nothing matches.
36
+ */
18
37
  search(character: string, labels: string[], current: number): number | null;
38
+ /** Clears the typed characters. */
19
39
  reset(): void;
20
40
  }
41
+ /**
42
+ * Keeps Tab focus inside an element, moves focus into it on creation and returns it to the previous element
43
+ * on destroy.
44
+ */
21
45
  export declare class TxFocusTrap implements OnDestroy {
22
46
  private elementRef;
23
47
  private focusTrapFactory;
@@ -48,18 +72,36 @@ export declare class TxFocusTrap implements OnDestroy {
48
72
  };
49
73
  }, {}, never, never, true, never>;
50
74
  }
75
+ /** Announces messages to screen readers through a visually hidden live region. */
51
76
  export declare class TxAnnouncer {
52
77
  private liveAnnouncer;
53
78
  constructor();
79
+ /** Announces a message to screen readers with the given politeness (default `polite`). */
54
80
  announce(message: string, politeness?: AriaLivePoliteness): Promise<void>;
81
+ /** Clears the live region. */
55
82
  clear(): void;
56
83
  static ɵfac: i0.ɵɵFactoryDeclaration<TxAnnouncer, never>;
57
84
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
58
85
  }
86
+ /** ARIA attributes that hold a list of element ids. */
59
87
  export type TxAriaReference = 'aria-describedby' | 'aria-labelledby' | 'aria-controls' | 'aria-owns';
88
+ /**
89
+ * Adds an id to an ARIA reference attribute of an element without duplicating it; returns a function that
90
+ * removes it again.
91
+ */
60
92
  export declare function linkAriaReference(target: Element, attribute: TxAriaReference, id: string): () => void;
93
+ /** Adds an id to `aria-describedby` of an element; returns a function that removes it again. */
61
94
  export declare function linkDescribedBy(target: Element, id: string): () => void;
95
+ /**
96
+ * Keeps the element with the target id described by the element with the given id, while both ids are set;
97
+ * call in an injection context.
98
+ */
62
99
  export declare function injectDescribedBy(targetId: Signal<string | undefined>, id: Signal<string>): void;
100
+ /** Tabbable and visible elements inside a root, in DOM order; skips everything inside `[inert]`. */
63
101
  export declare function tabbableElements(root: ParentNode, checker: InteractivityChecker): HTMLElement[];
102
+ /**
103
+ * First tabbable element after an element in the document, not inside it or inside the optional `skip`
104
+ * element; `null` when there is none.
105
+ */
64
106
  export declare function nextTabbable(after: Element, checker: InteractivityChecker, skip?: Element): HTMLElement | null;
65
107
  //# sourceMappingURL=tectra-ng-core-a11y.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-core-a11y.d.ts","names":[],"sources":["../../../../packages/core/a11y/src/unique-id.ts","../../../../packages/core/a11y/src/list-navigation.types.ts","../../../../packages/core/a11y/src/list-navigation.ts","../../../../packages/core/a11y/src/typeahead.ts","../../../../packages/core/a11y/src/focus-trap.directive.ts","../../../../packages/core/a11y/src/announcer.service.ts","../../../../packages/core/a11y/src/described-by.ts","../../../../packages/core/a11y/src/tabbable.ts"],"mappings":";;;wBAEgB,SAAS;iBCFR;EACf;EACA;EACA;EACA;EACA,cAAc;;wBCkBA,cAAc,aAAa,SAAS;qBCvBvC;mBAIkB;UAHrB;UACA;EAEqB,YAAA;EAE7B,OAAO,mBAAmB,kBAAkB;EAsB5C;;qBCxBW,uBAAuB;UAC1B;UACA;UACA;UACA;UACA;WAEC,qCAAW;WACX,mCAAS;WACT,sCAAY;;EAarB;SAtBW,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAW;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;;;qBCEX;UACH;;EAMR,SAAS,iBAAiB,aAAY,qBAAgC;EAItE;SAXW,MAAA,GAAA,qBAAA;;;YCJD;wBAEI,kBAAkB,QAAQ,SAAS,WAAW,iBAAiB;wBAe/D,gBAAgB,QAAQ,SAAS;wBAIjC,kBAAkB,UAAU,4BAA4B,IAAI;wBCnB5D,iBAAiB,MAAM,YAAY,SAAS,uBAAuB;wBAMnE,aAAa,OAAO,SAAS,SAAS,sBAAsB,OAAO,UAAU"}
1
+ {"version":3,"file":"tectra-ng-core-a11y.d.ts","names":[],"sources":["../../../../packages/core/a11y/src/unique-id.ts","../../../../packages/core/a11y/src/list-navigation.types.ts","../../../../packages/core/a11y/src/list-navigation.ts","../../../../packages/core/a11y/src/typeahead.ts","../../../../packages/core/a11y/src/focus-trap.directive.ts","../../../../packages/core/a11y/src/announcer.service.ts","../../../../packages/core/a11y/src/described-by.ts","../../../../packages/core/a11y/src/tabbable.ts"],"mappings":";;;;wBAGgB,SAAS;;iBCFR;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA,cAAc;;;;;;wBCgBA,cAAc,aAAa,SAAS;;;;;qBCvBvC;mBAIkB;UAHrB;UACA;EAEqB,YAAA;;;;;EAM7B,OAAO,mBAAmB,kBAAkB;;EAuB5C;;;;;;qBC7BW,uBAAuB;UAC1B;UACA;UACA;UACA;UACA;WAEC,qCAAW;WACX,mCAAS;WACT,sCAAY;;EAarB;SAtBW,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAW;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;;;;qBCDX;UACH;;;EAOR,SAAS,iBAAiB,aAAY,qBAAgC;;EAKtE;SAbW,MAAA,GAAA,qBAAA;;;;YCJD;;;;;wBAMI,kBAAkB,QAAQ,SAAS,WAAW,iBAAiB;;wBAgB/D,gBAAgB,QAAQ,SAAS;;;;;wBAQjC,kBAAkB,UAAU,4BAA4B,IAAI;;wBC5B5D,iBAAiB,MAAM,YAAY,SAAS,uBAAuB;;;;;wBAUnE,aAAa,OAAO,SAAS,SAAS,sBAAsB,OAAO,UAAU"}
@@ -2,74 +2,137 @@ import * as i0 from "@angular/core";
2
2
  import { EnvironmentProviders, InjectionToken, Signal } from "@angular/core";
3
3
  import { TectraPreset } from "@tectra-ng/themes";
4
4
  import { TxLocaleCode, TxLocaleDefinition, TxTranslations } from "@tectra-ng/core/i18n/types";
5
+ /** Extra class and inline styles for one part of a component. */
5
6
  export interface TxPassThroughPart {
7
+ /** CSS classes added to the part. */
6
8
  class?: string;
9
+ /** Inline styles added to the part, as property names and values. */
7
10
  style?: Record<string, string>;
8
11
  }
12
+ /** Context a pass-through function receives. */
9
13
  export interface TxPassThroughContext<TInstance> {
14
+ /** The component instance the part belongs to. */
10
15
  instance: TInstance;
11
16
  }
17
+ /** Pass-through of one part: an object, or a function of the component instance that returns it. */
12
18
  export type TxPassThroughValue<TInstance> = TxPassThroughPart | ((context: TxPassThroughContext<TInstance>) => TxPassThroughPart | undefined);
19
+ /** Pass-through of a component: classes and styles by part name. */
13
20
  export type TxPassThrough<TPart extends string, TInstance = never> = Partial<Record<TPart, TxPassThroughValue<TInstance>>>;
21
+ /** Pass-through of a component after global and local values are merged, by part name. */
14
22
  export type TxResolvedPassThrough<TPart extends string> = Partial<Record<TPart, TxPassThroughPart>>;
23
+ /** How global and local pass-through are merged. */
15
24
  export interface TxPassThroughOptions {
25
+ /** Whether local parts are added to the global parts instead of replacing them (default `true`). */
16
26
  mergeSections?: boolean;
27
+ /**
28
+ * Whether the class and style of a part present in both are merged instead of the local one winning
29
+ * (default `false`).
30
+ */
17
31
  mergeProps?: boolean;
18
32
  }
33
+ /** Global pass-through of the app: by component name, then by part name. */
19
34
  export type TxGlobalPassThrough = Record<string, Record<string, TxPassThroughValue<never>>>;
35
+ /** Color scheme of the app. */
20
36
  export type TxThemeMode = 'light' | 'dark';
37
+ /** Text of a validation error, or a function that builds it from the error value. */
21
38
  export type TxValidationMessage = string | ((error: unknown) => string);
39
+ /** Validation error texts by error key. */
22
40
  export type TxValidationMessages = Record<string, TxValidationMessage>;
41
+ /** Space in px that overlays leave free at the top and bottom of the viewport, for fixed bars. */
23
42
  export interface TxViewportInsets {
43
+ /** Space left free at the top, in px. */
24
44
  top?: number;
45
+ /** Space left free at the bottom, in px. */
25
46
  bottom?: number;
26
47
  }
48
+ /** App-wide settings of overlays. */
27
49
  export interface TxOverlayConfig {
50
+ /** Space overlays keep free at the viewport edges. */
28
51
  viewportInsets?: TxViewportInsets;
29
52
  }
53
+ /** Config passed to `provideTectra`: theme, locale, ripple, pass-through and validation texts. */
30
54
  export interface TectraConfig {
55
+ /** Theme preset to apply. */
31
56
  preset: TectraPreset;
57
+ /** Initial color scheme (default `light`). */
32
58
  mode?: TxThemeMode;
59
+ /** Extra CSS selector that also turns on dark tokens, e.g. `.app-dark`. */
33
60
  darkSelector?: string;
61
+ /** Whether the click ripple effect is on by default (default `false`). */
34
62
  ripple?: boolean;
63
+ /** Turns off the kit styles of every component that has no own `unstyled` input. */
35
64
  unstyled?: boolean;
65
+ /** Global pass-through: classes and styles for parts of components, by component name. */
36
66
  pt?: TxGlobalPassThrough;
67
+ /** Default merge rules of global and local pass-through. */
37
68
  ptOptions?: TxPassThroughOptions;
69
+ /** Locale to use: a code of a built-in or added locale, or a whole locale definition. */
38
70
  locale?: TxLocaleCode | TxLocaleDefinition;
71
+ /** Extra locale definitions to register. */
39
72
  locales?: TxLocaleDefinition[];
73
+ /** Texts that override the ones of the current locale. */
40
74
  translations?: Partial<TxTranslations>;
75
+ /** App-wide settings of overlays. */
41
76
  overlay?: TxOverlayConfig;
77
+ /** Validation error texts by error key, shown by form field components. */
42
78
  validationMessages?: TxValidationMessages;
43
79
  }
80
+ /** Registers the tectra config in the app: applies the preset and color scheme and registers locales. */
44
81
  export declare function provideTectra(config: TectraConfig): EnvironmentProviders;
82
+ /**
83
+ * Signal that tells whether a component is unstyled: its own `unstyled` input, else the global config, else
84
+ * `false`.
85
+ */
45
86
  export declare function injectUnstyled(local: Signal<boolean | undefined>): Signal<boolean>;
87
+ /** Signal with the pass-through of a component, merging the global config and the local `pt` by the merge options. */
46
88
  export declare function injectPassThrough<TPart extends string, TInstance>(component: string, instance: TInstance, local: Signal<TxPassThrough<TPart, TInstance> | undefined>, localOptions: Signal<TxPassThroughOptions | undefined>): Signal<TxResolvedPassThrough<TPart>>;
89
+ /** Injection token with the config given to `provideTectra`. */
47
90
  export declare const TECTRA_CONFIG: InjectionToken<TectraConfig>;
91
+ /** Component token groups by name, each an object of tokens. */
48
92
  export type TxComponentTokenGroups = Readonly<Record<string, object>>;
93
+ /** Applies the preset and color scheme to the document and writes the CSS variables of component tokens. */
49
94
  export declare class TxThemeService {
50
95
  private document;
51
96
  private config;
52
97
  private readonly groups;
98
+ /** The applied preset; `null` before the first one. */
53
99
  readonly preset: import("@angular/core").WritableSignal<TectraPreset | null>;
100
+ /** The current color scheme. */
54
101
  readonly mode: import("@angular/core").WritableSignal<TxThemeMode>;
102
+ /** Whether the click ripple effect is on. */
55
103
  readonly ripple: import("@angular/core").WritableSignal<boolean>;
104
+ /** Writes the CSS variables of a preset and rewrites the registered component tokens with its overrides. */
56
105
  applyPreset(preset: TectraPreset): void;
106
+ /** Registers component token groups and writes their CSS variables; groups already registered are skipped. */
57
107
  registerTokens(groups: TxComponentTokenGroups): void;
108
+ /** Names of the registered component token groups. */
58
109
  registeredTokens(): string[];
110
+ /** Turns the click ripple effect on or off. */
59
111
  setRipple(enabled: boolean): void;
112
+ /** Sets the color scheme on the `<html>` element. */
60
113
  setMode(mode: TxThemeMode): void;
114
+ /** Switches between light and dark. */
61
115
  toggleMode(): void;
62
116
  private writeGroup;
63
117
  private style;
64
118
  static ɵfac: i0.ɵɵFactoryDeclaration<TxThemeService, never>;
65
119
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
66
120
  }
121
+ /** Registers the component token groups of a component and returns them; call in an injection context. */
67
122
  export declare function injectTokens<T extends TxComponentTokenGroups>(groups: T): T;
123
+ /** Lazy loaders of the built-in locales by code. */
68
124
  export declare const TX_LOCALE_LOADERS: Readonly<Record<string, () => Promise<TxLocaleDefinition>>>;
125
+ /** Holds the known locale definitions and loads the built-in ones on demand. */
69
126
  export declare class TxLocaleRegistry {
70
127
  private readonly locales;
128
+ /** Returns a registered locale by code. */
71
129
  get(code: string): TxLocaleDefinition | undefined;
130
+ /** Registers locale definitions by their codes, replacing the same codes. */
72
131
  add(...locales: TxLocaleDefinition[]): void;
132
+ /**
133
+ * Returns a locale by code, loading a built-in one if it is not registered yet; `undefined` for an unknown
134
+ * code.
135
+ */
73
136
  load(code: string): Promise<TxLocaleDefinition | undefined>;
74
137
  static ɵfac: i0.ɵɵFactoryDeclaration<TxLocaleRegistry, never>;
75
138
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-core-config.d.ts","names":[],"sources":["../../../../packages/core/config/src/pass-through.interface.ts","../../../../packages/core/config/src/tectra-config.interface.ts","../../../../packages/core/config/src/provide-tectra.ts","../../../../packages/core/config/src/component-config.ts","../../../../packages/core/config/src/tectra-config.token.ts","../../../../packages/core/config/src/theme.service.ts","../../../../packages/core/config/src/locale-registry.ts"],"mappings":";;;;iBAAiB;EACf;EACA,QAAQ;;iBAGO,qBAAqB;EACpC,UAAU;;YAGA,mBAAmB,aAC3B,sBACE,SAAS,qBAAqB,eAAe;YAEvC,cAAc,sBAAsB,qBAAqB,QAAQ,OAAO,OAAO,mBAAmB;YAElG,sBAAsB,wBAAwB,QAAQ,OAAO,OAAO;iBAE/D;EACf;EACA;;YAGU,sBAAsB,eAAe,eAAe;YChBpD;YAEA,iCAAiC;YACjC,uBAAuB,eAAe;iBAEjC;EACf;EACA;;iBAGe;EACf,iBAAiB;;iBAGF;EACf,QAAQ;EACR,OAAO;EACP;EACA;EACA;EACA,KAAK;EACL,YAAY;EACZ,SAAS,eAAe;EACxB,UAAU;EACV,eAAe,QAAQ;EACvB,UAAU;EACV,qBAAqB;;wBC1BP,cAAc,QAAQ,eAAe;wBCIrC,eAAe,OAAO,8BAA8B;wBAgBpD,kBAAkB,sBAAsB,WACtD,mBACA,UAAU,WACV,OAAO,OAAO,cAAc,OAAO,yBACnC,cAAc,OAAO,oCACpB,OAAO,sBAAsB;qBC5BnB,eAAa,eAAA;YCEd,yBAAyB,SAAS;qBAGjC;UACH;UACA;mBACS;WAER,gCAAM,eAAA;WACN,8BAAI,eAAA;WACJ,gCAAM;EAEf,YAAY,QAAQ;EAUpB,eAAe,QAAQ;EASvB;EAIA,UAAU;EAIV,QAAQ,MAAM;EAKd;UAIQ;UAKA;SAlDG,MAAA,GAAA,qBAAA;;;wBA6DG,aAAa,UAAU,wBAAwB,QAAQ,IAAI;qBClE9D,mBAAmB,SAAS,qBAAqB,QAAQ;qBAKzD;mBACM;EAEjB,IAAI,eAAe;EAInB,OAAO,SAAS;EAMV,KAAK,eAAe,QAAQ;SAbvB,MAAA,GAAA,qBAAA"}
1
+ {"version":3,"file":"tectra-ng-core-config.d.ts","names":[],"sources":["../../../../packages/core/config/src/pass-through.interface.ts","../../../../packages/core/config/src/tectra-config.interface.ts","../../../../packages/core/config/src/provide-tectra.ts","../../../../packages/core/config/src/component-config.ts","../../../../packages/core/config/src/tectra-config.token.ts","../../../../packages/core/config/src/theme.service.ts","../../../../packages/core/config/src/locale-registry.ts"],"mappings":";;;;;iBACiB;;EAEf;;EAEA,QAAQ;;;iBAIO,qBAAqB;;EAEpC,UAAU;;;YAIA,mBAAmB,aAC3B,sBACE,SAAS,qBAAqB,eAAe;;YAGvC,cAAc,sBAAsB,qBAAqB,QAAQ,OAAO,OAAO,mBAAmB;;YAGlG,sBAAsB,wBAAwB,QAAQ,OAAO,OAAO;;iBAG/D;;EAEf;;;;;EAKA;;;YAIU,sBAAsB,eAAe,eAAe;;YC9BpD;;YAGA,iCAAiC;;YAEjC,uBAAuB,eAAe;;iBAGjC;;EAEf;;EAEA;;;iBAIe;;EAEf,iBAAiB;;;iBAIF;;EAEf,QAAQ;;EAER,OAAO;;EAEP;;EAEA;;EAEA;;EAEA,KAAK;;EAEL,YAAY;;EAEZ,SAAS,eAAe;;EAExB,UAAU;;EAEV,eAAe,QAAQ;;EAEvB,UAAU;;EAEV,qBAAqB;;;wBC9CP,cAAc,QAAQ,eAAe;;;;;wBCOrC,eAAe,OAAO,8BAA8B;;wBAiBpD,kBAAkB,sBAAsB,WACtD,mBACA,UAAU,WACV,OAAO,OAAO,cAAc,OAAO,yBACnC,cAAc,OAAO,oCACpB,OAAO,sBAAsB;;qBChCnB,eAAa,eAAA;;YCEd,yBAAyB,SAAS;;qBAIjC;UACH;UACA;mBACS;;WAGR,gCAAM,eAAA;;WAEN,8BAAI,eAAA;;WAEJ,gCAAM;;EAGf,YAAY,QAAQ;;EAWpB,eAAe,QAAQ;;EAUvB;;EAKA,UAAU;;EAKV,QAAQ,MAAM;;EAMd;UAIQ;UAKA;SA3DG,MAAA,GAAA,qBAAA;;;;wBAuEG,aAAa,UAAU,wBAAwB,QAAQ,IAAI;;qBC7E9D,mBAAmB,SAAS,qBAAqB,QAAQ;;qBAMzD;mBACM;;EAGjB,IAAI,eAAe;;EAKnB,OAAO,SAAS;;;;;EAUV,KAAK,eAAe,QAAQ;SAnBvB,MAAA,GAAA,qBAAA"}
@@ -1,8 +1,10 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import { Signal } from "@angular/core";
3
+ /** Container that makes the form fields inside it fill the full width of their row. */
3
4
  export declare class TxFluid {
4
5
  static ɵfac: i0.ɵɵFactoryDeclaration<TxFluid, never>;
5
6
  static ɵcmp: i0.ɵɵComponentDeclaration<TxFluid, "tx-fluid, [txFluid]", never, {}, {}, never, ["*"], true, never>;
6
7
  }
8
+ /** Signal that tells whether a component is fluid: its own `fluid` input, else whether it sits inside `tx-fluid`. */
7
9
  export declare function injectFluid(local: Signal<boolean | undefined>): Signal<boolean>;
8
10
  //# sourceMappingURL=tectra-ng-core-fluid.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-core-fluid.d.ts","names":[],"sources":["../../../../packages/core/fluid/src/fluid.component.ts","../../../../packages/core/fluid/src/inject-fluid.ts"],"mappings":";;qBAQa;SAAA,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;;wBCLG,YAAY,OAAO,8BAA8B"}
1
+ {"version":3,"file":"tectra-ng-core-fluid.d.ts","names":[],"sources":["../../../../packages/core/fluid/src/fluid.component.ts","../../../../packages/core/fluid/src/inject-fluid.ts"],"mappings":";;;qBASa;SAAA,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;;;wBCLG,YAAY,OAAO,8BAA8B"}
@@ -1,21 +1,36 @@
1
1
  import { ControlValueAccessor } from "@angular/forms";
2
2
  import { InjectionToken, Signal } from "@angular/core";
3
+ /** Base class of form controls that implement `ControlValueAccessor` with a `value` signal. */
3
4
  export declare abstract class TxFormControlBase<T> implements ControlValueAccessor {
5
+ /** Current value; `null` when empty. */
4
6
  readonly value: import("@angular/core").WritableSignal<T | null>;
7
+ /** Whether the control is disabled by the form. */
5
8
  readonly disabled: import("@angular/core").WritableSignal<boolean>;
6
9
  private onChange;
7
10
  private onTouched;
11
+ /** Sets the value from the form model. */
8
12
  writeValue(value: T | null): void;
13
+ /** Registers the callback the form calls to learn about value changes. */
9
14
  registerOnChange(fn: (value: T | null) => void): void;
15
+ /** Registers the callback the form calls to learn that the control was touched. */
10
16
  registerOnTouched(fn: () => void): void;
17
+ /** Sets the disabled state from the form. */
11
18
  setDisabledState(isDisabled: boolean): void;
12
19
  protected updateValue(value: T | null): void;
13
20
  protected markTouched(): void;
14
21
  }
22
+ /**
23
+ * Signal that tells whether a field shows its invalid state: the own `invalid` input, else the enclosing
24
+ * field, else an invalid form control that was touched or changed.
25
+ */
15
26
  export declare function injectFieldInvalid(local: Signal<boolean | undefined>): Signal<boolean>;
27
+ /** Signal that tells whether the native input or textarea of the host has a value; used for floating labels. */
16
28
  export declare function injectFieldFilled(): Signal<boolean>;
29
+ /** State a form field shares with the controls inside it. */
17
30
  export interface TxFieldState {
31
+ /** Whether the field is in the invalid state. */
18
32
  readonly invalid: Signal<boolean>;
19
33
  }
34
+ /** Injection token a form field provides so the controls inside it can follow its state. */
20
35
  export declare const TX_FIELD_STATE: InjectionToken<TxFieldState>;
21
36
  //# sourceMappingURL=tectra-ng-core-forms.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-core-forms.d.ts","names":[],"sources":["../../../../packages/core/forms/src/form-control-base.ts","../../../../packages/core/forms/src/field-invalid.ts","../../../../packages/core/forms/src/field-filled.ts","../../../../packages/core/forms/src/field-state.ts"],"mappings":";;8BAGsB,kBAAkB,cAAc;WAC3C,+BAAK,eAAA;WACL,kCAAQ;UAET;UACA;EAER,WAAW,OAAO;EAIlB,iBAAiB,KAAK,OAAO;EAI7B,kBAAkB;EAIlB,iBAAiB;YAIP,YAAY,OAAO;YAKnB;;wBC3BI,mBAAmB,OAAO,8BAA8B;wBCDxD,qBAAqB;iBCDpB;WACN,SAAS;;qBAGP,gBAAc,eAAA"}
1
+ {"version":3,"file":"tectra-ng-core-forms.d.ts","names":[],"sources":["../../../../packages/core/forms/src/form-control-base.ts","../../../../packages/core/forms/src/field-invalid.ts","../../../../packages/core/forms/src/field-filled.ts","../../../../packages/core/forms/src/field-state.ts"],"mappings":";;;8BAIsB,kBAAkB,cAAc;;WAE3C,+BAAK,eAAA;;WAEL,kCAAQ;UAET;UACA;;EAGR,WAAW,OAAO;;EAKlB,iBAAiB,KAAK,OAAO;;EAK7B,kBAAkB;;EAKlB,iBAAiB;YAIP,YAAY,OAAO;YAKnB;;;;;;wBC9BI,mBAAmB,OAAO,8BAA8B;;wBCJxD,qBAAqB;;iBCDpB;;WAEN,SAAS;;;qBAIP,gBAAc,eAAA"}