@frame-kit/ui-ng 0.0.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.
- package/COMPONENTS.md +683 -0
- package/DEVELOPMENT_GUIDE.md +1102 -0
- package/LICENSE +21 -0
- package/README.md +69 -0
- package/THEMING.md +130 -0
- package/core/headline/README.md +121 -0
- package/core/icon/README.md +173 -0
- package/core/image/README.md +210 -0
- package/core/link/README.md +297 -0
- package/core/separator/README.md +145 -0
- package/core/text/README.md +240 -0
- package/directives/infinite-scroll/README.md +102 -0
- package/directives/spotlight/README.md +154 -0
- package/directives/tooltip/README.md +147 -0
- package/docs/endpoint-link/README.md +142 -0
- package/docs/method-badge/README.md +154 -0
- package/fesm2022/frame-kit-ui-ng-core-headline.mjs +122 -0
- package/fesm2022/frame-kit-ui-ng-core-headline.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-core-icon.mjs +189 -0
- package/fesm2022/frame-kit-ui-ng-core-icon.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-core-image.mjs +123 -0
- package/fesm2022/frame-kit-ui-ng-core-image.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-core-link.mjs +369 -0
- package/fesm2022/frame-kit-ui-ng-core-link.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-core-separator.mjs +59 -0
- package/fesm2022/frame-kit-ui-ng-core-separator.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-core-text.mjs +204 -0
- package/fesm2022/frame-kit-ui-ng-core-text.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-directives-infinite-scroll.mjs +74 -0
- package/fesm2022/frame-kit-ui-ng-directives-infinite-scroll.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-directives-spotlight.mjs +76 -0
- package/fesm2022/frame-kit-ui-ng-directives-spotlight.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-directives-tooltip.mjs +425 -0
- package/fesm2022/frame-kit-ui-ng-directives-tooltip.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-docs-endpoint-link.mjs +63 -0
- package/fesm2022/frame-kit-ui-ng-docs-endpoint-link.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-docs-method-badge.mjs +43 -0
- package/fesm2022/frame-kit-ui-ng-docs-method-badge.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-forms.mjs +3632 -0
- package/fesm2022/frame-kit-ui-ng-forms.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-layouts-app-shell.mjs +239 -0
- package/fesm2022/frame-kit-ui-ng-layouts-app-shell.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-layouts-content-split.mjs +132 -0
- package/fesm2022/frame-kit-ui-ng-layouts-content-split.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-services-overlay-orchestrator.mjs +133 -0
- package/fesm2022/frame-kit-ui-ng-services-overlay-orchestrator.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-services-spotlight.mjs +60 -0
- package/fesm2022/frame-kit-ui-ng-services-spotlight.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-services-toast.mjs +166 -0
- package/fesm2022/frame-kit-ui-ng-services-toast.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-accordion.mjs +214 -0
- package/fesm2022/frame-kit-ui-ng-ui-accordion.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-alert.mjs +82 -0
- package/fesm2022/frame-kit-ui-ng-ui-alert.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-avatar-stack.mjs +76 -0
- package/fesm2022/frame-kit-ui-ng-ui-avatar-stack.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-avatar.mjs +81 -0
- package/fesm2022/frame-kit-ui-ng-ui-avatar.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-badge.mjs +81 -0
- package/fesm2022/frame-kit-ui-ng-ui-badge.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-breadcrumb.mjs +68 -0
- package/fesm2022/frame-kit-ui-ng-ui-breadcrumb.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-button.mjs +108 -0
- package/fesm2022/frame-kit-ui-ng-ui-button.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-callout.mjs +58 -0
- package/fesm2022/frame-kit-ui-ng-ui-callout.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-card.mjs +70 -0
- package/fesm2022/frame-kit-ui-ng-ui-card.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-copyable-field.mjs +113 -0
- package/fesm2022/frame-kit-ui-ng-ui-copyable-field.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-data-table.mjs +1288 -0
- package/fesm2022/frame-kit-ui-ng-ui-data-table.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-dialog.mjs +456 -0
- package/fesm2022/frame-kit-ui-ng-ui-dialog.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-drawer.mjs +398 -0
- package/fesm2022/frame-kit-ui-ng-ui-drawer.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-dropdown-menu.mjs +398 -0
- package/fesm2022/frame-kit-ui-ng-ui-dropdown-menu.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-editable-field.mjs +125 -0
- package/fesm2022/frame-kit-ui-ng-ui-editable-field.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-icon-badge.mjs +113 -0
- package/fesm2022/frame-kit-ui-ng-ui-icon-badge.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-icon-list.mjs +111 -0
- package/fesm2022/frame-kit-ui-ng-ui-icon-list.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-inline-edit.mjs +103 -0
- package/fesm2022/frame-kit-ui-ng-ui-inline-edit.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-list-editor.mjs +135 -0
- package/fesm2022/frame-kit-ui-ng-ui-list-editor.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-loader.mjs +81 -0
- package/fesm2022/frame-kit-ui-ng-ui-loader.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-menu-item.mjs +79 -0
- package/fesm2022/frame-kit-ui-ng-ui-menu-item.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-nav-brand.mjs +40 -0
- package/fesm2022/frame-kit-ui-ng-ui-nav-brand.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-nav-group.mjs +110 -0
- package/fesm2022/frame-kit-ui-ng-ui-nav-group.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-nav-separator.mjs +91 -0
- package/fesm2022/frame-kit-ui-ng-ui-nav-separator.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-node-tree-breadcrumb.mjs +86 -0
- package/fesm2022/frame-kit-ui-ng-ui-node-tree-breadcrumb.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-node-tree.mjs +443 -0
- package/fesm2022/frame-kit-ui-ng-ui-node-tree.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-note.mjs +56 -0
- package/fesm2022/frame-kit-ui-ng-ui-note.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-numbered-list.mjs +105 -0
- package/fesm2022/frame-kit-ui-ng-ui-numbered-list.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-pagination.mjs +110 -0
- package/fesm2022/frame-kit-ui-ng-ui-pagination.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-progress-bar.mjs +129 -0
- package/fesm2022/frame-kit-ui-ng-ui-progress-bar.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-sidenav-link.mjs +42 -0
- package/fesm2022/frame-kit-ui-ng-ui-sidenav-link.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-tabs.mjs +894 -0
- package/fesm2022/frame-kit-ui-ng-ui-tabs.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-timeline.mjs +81 -0
- package/fesm2022/frame-kit-ui-ng-ui-timeline.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-toast.mjs +179 -0
- package/fesm2022/frame-kit-ui-ng-ui-toast.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-user-menu.mjs +143 -0
- package/fesm2022/frame-kit-ui-ng-ui-user-menu.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-wizard-dialog.mjs +191 -0
- package/fesm2022/frame-kit-ui-ng-ui-wizard-dialog.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng.mjs +58 -0
- package/fesm2022/frame-kit-ui-ng.mjs.map +1 -0
- package/layouts/app-shell/README.md +357 -0
- package/layouts/content-split/README.md +180 -0
- package/package.json +253 -0
- package/services/overlay-orchestrator/README.md +184 -0
- package/services/spotlight/README.md +61 -0
- package/services/toast/README.md +118 -0
- package/types/frame-kit-ui-ng-core-headline.d.ts +38 -0
- package/types/frame-kit-ui-ng-core-icon.d.ts +74 -0
- package/types/frame-kit-ui-ng-core-image.d.ts +93 -0
- package/types/frame-kit-ui-ng-core-link.d.ts +251 -0
- package/types/frame-kit-ui-ng-core-separator.d.ts +28 -0
- package/types/frame-kit-ui-ng-core-text.d.ts +186 -0
- package/types/frame-kit-ui-ng-directives-infinite-scroll.d.ts +42 -0
- package/types/frame-kit-ui-ng-directives-spotlight.d.ts +51 -0
- package/types/frame-kit-ui-ng-directives-tooltip.d.ts +70 -0
- package/types/frame-kit-ui-ng-docs-endpoint-link.d.ts +43 -0
- package/types/frame-kit-ui-ng-docs-method-badge.d.ts +30 -0
- package/types/frame-kit-ui-ng-forms.d.ts +1674 -0
- package/types/frame-kit-ui-ng-layouts-app-shell.d.ts +75 -0
- package/types/frame-kit-ui-ng-layouts-content-split.d.ts +43 -0
- package/types/frame-kit-ui-ng-services-overlay-orchestrator.d.ts +96 -0
- package/types/frame-kit-ui-ng-services-spotlight.d.ts +32 -0
- package/types/frame-kit-ui-ng-services-toast.d.ts +100 -0
- package/types/frame-kit-ui-ng-ui-accordion.d.ts +86 -0
- package/types/frame-kit-ui-ng-ui-alert.d.ts +34 -0
- package/types/frame-kit-ui-ng-ui-avatar-stack.d.ts +38 -0
- package/types/frame-kit-ui-ng-ui-avatar.d.ts +36 -0
- package/types/frame-kit-ui-ng-ui-badge.d.ts +33 -0
- package/types/frame-kit-ui-ng-ui-breadcrumb.d.ts +45 -0
- package/types/frame-kit-ui-ng-ui-button.d.ts +48 -0
- package/types/frame-kit-ui-ng-ui-callout.d.ts +26 -0
- package/types/frame-kit-ui-ng-ui-card.d.ts +30 -0
- package/types/frame-kit-ui-ng-ui-copyable-field.d.ts +62 -0
- package/types/frame-kit-ui-ng-ui-data-table.d.ts +482 -0
- package/types/frame-kit-ui-ng-ui-dialog.d.ts +166 -0
- package/types/frame-kit-ui-ng-ui-drawer.d.ts +130 -0
- package/types/frame-kit-ui-ng-ui-dropdown-menu.d.ts +77 -0
- package/types/frame-kit-ui-ng-ui-editable-field.d.ts +65 -0
- package/types/frame-kit-ui-ng-ui-icon-badge.d.ts +45 -0
- package/types/frame-kit-ui-ng-ui-icon-list.d.ts +67 -0
- package/types/frame-kit-ui-ng-ui-inline-edit.d.ts +44 -0
- package/types/frame-kit-ui-ng-ui-list-editor.d.ts +56 -0
- package/types/frame-kit-ui-ng-ui-loader.d.ts +32 -0
- package/types/frame-kit-ui-ng-ui-menu-item.d.ts +27 -0
- package/types/frame-kit-ui-ng-ui-nav-brand.d.ts +25 -0
- package/types/frame-kit-ui-ng-ui-nav-group.d.ts +60 -0
- package/types/frame-kit-ui-ng-ui-nav-separator.d.ts +33 -0
- package/types/frame-kit-ui-ng-ui-node-tree-breadcrumb.d.ts +35 -0
- package/types/frame-kit-ui-ng-ui-node-tree.d.ts +135 -0
- package/types/frame-kit-ui-ng-ui-note.d.ts +22 -0
- package/types/frame-kit-ui-ng-ui-numbered-list.d.ts +52 -0
- package/types/frame-kit-ui-ng-ui-pagination.d.ts +49 -0
- package/types/frame-kit-ui-ng-ui-progress-bar.d.ts +50 -0
- package/types/frame-kit-ui-ng-ui-sidenav-link.d.ts +24 -0
- package/types/frame-kit-ui-ng-ui-tabs.d.ts +266 -0
- package/types/frame-kit-ui-ng-ui-timeline.d.ts +42 -0
- package/types/frame-kit-ui-ng-ui-toast.d.ts +56 -0
- package/types/frame-kit-ui-ng-ui-user-menu.d.ts +87 -0
- package/types/frame-kit-ui-ng-ui-wizard-dialog.d.ts +116 -0
- package/types/frame-kit-ui-ng.d.ts +53 -0
- package/ui/accordion/README.md +261 -0
- package/ui/alert/README.md +211 -0
- package/ui/avatar/README.md +167 -0
- package/ui/avatar-stack/README.md +164 -0
- package/ui/badge/README.md +162 -0
- package/ui/breadcrumb/README.md +240 -0
- package/ui/button/README.md +184 -0
- package/ui/callout/README.md +159 -0
- package/ui/card/README.md +174 -0
- package/ui/copyable-field/README.md +235 -0
- package/ui/data-table/README.md +408 -0
- package/ui/dialog/README.md +222 -0
- package/ui/drawer/README.md +274 -0
- package/ui/dropdown-menu/README.md +336 -0
- package/ui/editable-field/README.md +171 -0
- package/ui/icon-badge/README.md +131 -0
- package/ui/icon-list/README.md +205 -0
- package/ui/inline-edit/README.md +135 -0
- package/ui/list-editor/README.md +162 -0
- package/ui/loader/README.md +160 -0
- package/ui/menu-item/README.md +204 -0
- package/ui/nav-brand/README.md +111 -0
- package/ui/nav-group/README.md +145 -0
- package/ui/nav-separator/README.md +44 -0
- package/ui/node-tree/README.md +278 -0
- package/ui/node-tree-breadcrumb/README.md +164 -0
- package/ui/note/README.md +146 -0
- package/ui/numbered-list/README.md +187 -0
- package/ui/pagination/README.md +174 -0
- package/ui/progress-bar/README.md +223 -0
- package/ui/sidenav-link/README.md +214 -0
- package/ui/tabs/README.md +204 -0
- package/ui/timeline/README.md +285 -0
- package/ui/toast/README.md +243 -0
- package/ui/user-menu/README.md +260 -0
- package/ui/wizard-dialog/README.md +283 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as _angular_platform_browser from '@angular/platform-browser';
|
|
2
|
+
import { SafeHtml } from '@angular/platform-browser';
|
|
3
|
+
import * as _angular_core from '@angular/core';
|
|
4
|
+
import { EnvironmentProviders } from '@angular/core';
|
|
5
|
+
|
|
6
|
+
type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | (string & {});
|
|
7
|
+
type IconColor = 'inherit' | 'default' | 'muted' | 'primary' | 'danger' | 'success' | (string & {});
|
|
8
|
+
|
|
9
|
+
declare class IconComponent {
|
|
10
|
+
private readonly registry;
|
|
11
|
+
/** Registry key for the SVG icon to render. */
|
|
12
|
+
readonly name: _angular_core.InputSignal<string>;
|
|
13
|
+
/** Preset size token applied as a CSS class; pass a CSS value for custom sizes. */
|
|
14
|
+
readonly size: _angular_core.InputSignal<IconSize>;
|
|
15
|
+
/** Icon color — preset token names resolve to design-token colors, any other string is applied as a literal CSS `color`. */
|
|
16
|
+
readonly color: _angular_core.InputSignal<IconColor>;
|
|
17
|
+
readonly className: _angular_core.InputSignal<string>;
|
|
18
|
+
readonly id: _angular_core.InputSignal<string | null>;
|
|
19
|
+
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
20
|
+
/** Explicitly sets `aria-hidden`; when null, the directive infers it from `ariaLabel`. */
|
|
21
|
+
readonly ariaHidden: _angular_core.InputSignal<boolean | null>;
|
|
22
|
+
readonly svgContent: _angular_core.Signal<_angular_platform_browser.SafeHtml | null>;
|
|
23
|
+
readonly effectiveAriaHidden: _angular_core.Signal<boolean>;
|
|
24
|
+
private readonly sizePresets;
|
|
25
|
+
readonly isCustomSize: _angular_core.Signal<boolean>;
|
|
26
|
+
readonly classes: _angular_core.Signal<string>;
|
|
27
|
+
get hostClass(): string;
|
|
28
|
+
get hostFontSize(): string | null;
|
|
29
|
+
get hostRole(): string | null;
|
|
30
|
+
get hostAriaLabel(): string | null;
|
|
31
|
+
get hostAriaHidden(): string | null;
|
|
32
|
+
get hostId(): string | null;
|
|
33
|
+
get hostColor(): string | null;
|
|
34
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<IconComponent, never>;
|
|
35
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<IconComponent, "fk-icon", never, { "name": { "alias": "name"; "required": true; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaHidden": { "alias": "ariaHidden"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare class IconRegistryService {
|
|
39
|
+
private readonly icons;
|
|
40
|
+
private readonly sanitizer;
|
|
41
|
+
registerIcon(name: string, svgContent: string): void;
|
|
42
|
+
private normalizeSvg;
|
|
43
|
+
registerIcons(icons: Record<string, string>): void;
|
|
44
|
+
getIcon(name: string): SafeHtml | null;
|
|
45
|
+
hasIcon(name: string): boolean;
|
|
46
|
+
getRegisteredNames(): string[];
|
|
47
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<IconRegistryService, never>;
|
|
48
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<IconRegistryService>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Registers icons into the `IconRegistryService` via Angular DI.
|
|
53
|
+
*
|
|
54
|
+
* Icons are provided as a record of name → SVG string pairs.
|
|
55
|
+
* This is tree-shakeable: only icons you import and pass here are bundled.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* import { searchIcon, lockIcon } from '@my-app/icons';
|
|
60
|
+
*
|
|
61
|
+
* export const appConfig: ApplicationConfig = {
|
|
62
|
+
* providers: [
|
|
63
|
+
* provideIcons({
|
|
64
|
+
* search: searchIcon,
|
|
65
|
+
* lock: lockIcon,
|
|
66
|
+
* }),
|
|
67
|
+
* ],
|
|
68
|
+
* };
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
declare function provideIcons(icons: Record<string, string>): EnvironmentProviders;
|
|
72
|
+
|
|
73
|
+
export { IconComponent, IconRegistryService, provideIcons };
|
|
74
|
+
export type { IconColor, IconSize };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
type ImageFit = 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
|
|
4
|
+
type ImageLoading = 'lazy' | 'eager';
|
|
5
|
+
type ImageDecoding = 'async' | 'sync' | 'auto';
|
|
6
|
+
type ImageFetchPriority = 'high' | 'low' | 'auto';
|
|
7
|
+
type ImageRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
8
|
+
type ImageCrossOrigin = 'anonymous' | 'use-credentials';
|
|
9
|
+
type ImageReferrerPolicy = '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
|
|
10
|
+
interface ImageBaseProps {
|
|
11
|
+
src: string;
|
|
12
|
+
alt: string;
|
|
13
|
+
srcSet?: string;
|
|
14
|
+
sizes?: string;
|
|
15
|
+
loading?: ImageLoading;
|
|
16
|
+
decoding?: ImageDecoding;
|
|
17
|
+
fetchPriority?: ImageFetchPriority;
|
|
18
|
+
fit?: ImageFit;
|
|
19
|
+
position?: string;
|
|
20
|
+
fallbackSrc?: string;
|
|
21
|
+
radius?: ImageRadius;
|
|
22
|
+
aspectRatio?: number | string;
|
|
23
|
+
crossOrigin?: ImageCrossOrigin;
|
|
24
|
+
referrerPolicy?: ImageReferrerPolicy;
|
|
25
|
+
}
|
|
26
|
+
interface ImageSizedProps extends ImageBaseProps {
|
|
27
|
+
fill?: false;
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
}
|
|
31
|
+
interface ImageFillProps extends ImageBaseProps {
|
|
32
|
+
fill: true;
|
|
33
|
+
width?: never;
|
|
34
|
+
height?: never;
|
|
35
|
+
}
|
|
36
|
+
type ImageProps = ImageSizedProps | ImageFillProps;
|
|
37
|
+
|
|
38
|
+
declare class ImageComponent {
|
|
39
|
+
/** URL of the image to display. */
|
|
40
|
+
readonly src: _angular_core.InputSignal<string>;
|
|
41
|
+
/** Accessible alternative text describing the image. */
|
|
42
|
+
readonly alt: _angular_core.InputSignal<string>;
|
|
43
|
+
/** When true, the image expands to fill its positioned parent; `width` and `height` are ignored. */
|
|
44
|
+
readonly fill: _angular_core.InputSignal<boolean>;
|
|
45
|
+
/** Explicit pixel width; required when `fill` is false to prevent layout shift. */
|
|
46
|
+
readonly width: _angular_core.InputSignal<number | null>;
|
|
47
|
+
/** Explicit pixel height; required when `fill` is false to prevent layout shift. */
|
|
48
|
+
readonly height: _angular_core.InputSignal<number | null>;
|
|
49
|
+
/** `srcset` attribute value for responsive image resolution switching. */
|
|
50
|
+
readonly srcSet: _angular_core.InputSignal<string | null>;
|
|
51
|
+
/** `sizes` attribute value used alongside `srcSet` for viewport-aware resolution selection. */
|
|
52
|
+
readonly sizes: _angular_core.InputSignal<string | null>;
|
|
53
|
+
/** Browser loading strategy — `"lazy"` defers off-screen images. */
|
|
54
|
+
readonly loading: _angular_core.InputSignal<ImageLoading>;
|
|
55
|
+
/** Browser decode hint — `"async"` avoids blocking the main thread. */
|
|
56
|
+
readonly decoding: _angular_core.InputSignal<ImageDecoding>;
|
|
57
|
+
/** Fetch priority hint for the browser's preload scanner. */
|
|
58
|
+
readonly fetchPriority: _angular_core.InputSignal<ImageFetchPriority>;
|
|
59
|
+
/** Cross-origin policy for the image request. */
|
|
60
|
+
readonly crossOrigin: _angular_core.InputSignal<ImageCrossOrigin | null>;
|
|
61
|
+
/** `referrerpolicy` attribute value forwarded to the underlying `<img>` element. */
|
|
62
|
+
readonly referrerPolicy: _angular_core.InputSignal<string | null>;
|
|
63
|
+
/** `object-fit` strategy when the image is displayed inside a fixed container. */
|
|
64
|
+
readonly fit: _angular_core.InputSignal<ImageFit>;
|
|
65
|
+
/** `object-position` value controlling focal point within the container. */
|
|
66
|
+
readonly position: _angular_core.InputSignal<string>;
|
|
67
|
+
/** Corner radius token applied to the image. */
|
|
68
|
+
readonly radius: _angular_core.InputSignal<ImageRadius>;
|
|
69
|
+
/** Locks the host to a specific aspect ratio expressed as a number (w/h) or CSS string. */
|
|
70
|
+
readonly aspectRatio: _angular_core.InputSignal<string | number | null>;
|
|
71
|
+
/** Fallback image URL displayed automatically when the primary `src` fails to load. */
|
|
72
|
+
readonly fallbackSrc: _angular_core.InputSignal<string | null>;
|
|
73
|
+
readonly className: _angular_core.InputSignal<string>;
|
|
74
|
+
readonly id: _angular_core.InputSignal<string | null>;
|
|
75
|
+
/** Fires when the image has finished loading successfully. */
|
|
76
|
+
readonly imageLoad: _angular_core.OutputEmitterRef<void>;
|
|
77
|
+
/** Fires when the image fails to load; switches to `fallbackSrc` if provided. */
|
|
78
|
+
readonly imageError: _angular_core.OutputEmitterRef<void>;
|
|
79
|
+
readonly currentSrc: _angular_core.Signal<string>;
|
|
80
|
+
readonly hasError: _angular_core.WritableSignal<boolean>;
|
|
81
|
+
constructor();
|
|
82
|
+
private readonly dimensionWarning;
|
|
83
|
+
readonly classes: _angular_core.Signal<string>;
|
|
84
|
+
get hostClass(): string;
|
|
85
|
+
get hostId(): string | null;
|
|
86
|
+
onLoad(): void;
|
|
87
|
+
onError(): void;
|
|
88
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ImageComponent, never>;
|
|
89
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ImageComponent, "fk-image", never, { "src": { "alias": "src"; "required": true; "isSignal": true; }; "alt": { "alias": "alt"; "required": true; "isSignal": true; }; "fill": { "alias": "fill"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "srcSet": { "alias": "srcSet"; "required": false; "isSignal": true; }; "sizes": { "alias": "sizes"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "decoding": { "alias": "decoding"; "required": false; "isSignal": true; }; "fetchPriority": { "alias": "fetchPriority"; "required": false; "isSignal": true; }; "crossOrigin": { "alias": "crossOrigin"; "required": false; "isSignal": true; }; "referrerPolicy": { "alias": "referrerPolicy"; "required": false; "isSignal": true; }; "fit": { "alias": "fit"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "radius": { "alias": "radius"; "required": false; "isSignal": true; }; "aspectRatio": { "alias": "aspectRatio"; "required": false; "isSignal": true; }; "fallbackSrc": { "alias": "fallbackSrc"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; }, { "imageLoad": "imageLoad"; "imageError": "imageError"; }, never, never, true, never>;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export { ImageComponent };
|
|
93
|
+
export type { ImageBaseProps, ImageCrossOrigin, ImageDecoding, ImageFetchPriority, ImageFillProps, ImageFit, ImageLoading, ImageProps, ImageRadius, ImageReferrerPolicy, ImageSizedProps };
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { InjectionToken } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Link variant types
|
|
6
|
+
* - default: standard link appearance
|
|
7
|
+
* - primary: primary brand color
|
|
8
|
+
* - muted: muted/subtle appearance
|
|
9
|
+
* - danger: for destructive actions
|
|
10
|
+
*/
|
|
11
|
+
type LinkVariant = 'default' | 'primary' | 'muted' | 'danger';
|
|
12
|
+
/**
|
|
13
|
+
* Link size types
|
|
14
|
+
* - small: compact text
|
|
15
|
+
* - medium: standard size (default)
|
|
16
|
+
* - large: prominent text
|
|
17
|
+
*/
|
|
18
|
+
type LinkSize = 'small' | 'medium' | 'large';
|
|
19
|
+
/**
|
|
20
|
+
* Underline behavior
|
|
21
|
+
* - none: no underline
|
|
22
|
+
* - hover: underline on hover only (default)
|
|
23
|
+
* - always: always underlined
|
|
24
|
+
*/
|
|
25
|
+
type LinkUnderline = 'none' | 'hover' | 'always';
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Link Component
|
|
29
|
+
*
|
|
30
|
+
* A flexible, accessible link component that supports:
|
|
31
|
+
* - External and internal links
|
|
32
|
+
* - Angular Router integration
|
|
33
|
+
* - Variants, sizes, and underline styles
|
|
34
|
+
* - Analytics tracking via data attributes
|
|
35
|
+
* - Accessibility features (aria-label, keyboard navigation)
|
|
36
|
+
* - Icon support (leading/trailing)
|
|
37
|
+
* - Disabled and loading states
|
|
38
|
+
* - External link indicators
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```html
|
|
42
|
+
* <!-- Internal router link -->
|
|
43
|
+
* <fk-link routerLink="/dashboard">Dashboard</fk-link>
|
|
44
|
+
*
|
|
45
|
+
* <!-- External link with icon -->
|
|
46
|
+
* <fk-link href="https://example.com" [external]="true">
|
|
47
|
+
* Visit Site
|
|
48
|
+
* </fk-link>
|
|
49
|
+
*
|
|
50
|
+
* <!-- With analytics tracking -->
|
|
51
|
+
* <fk-link
|
|
52
|
+
* href="/products"
|
|
53
|
+
* trackingId="nav-products"
|
|
54
|
+
* trackingCategory="navigation"
|
|
55
|
+
* >
|
|
56
|
+
* Products
|
|
57
|
+
* </fk-link>
|
|
58
|
+
*
|
|
59
|
+
* <!-- Variants -->
|
|
60
|
+
* <fk-link variant="primary" href="/signup">Sign Up</fk-link>
|
|
61
|
+
* <fk-link variant="muted" href="/help">Help</fk-link>
|
|
62
|
+
* <fk-link variant="danger" href="/delete">Delete</fk-link>
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
declare class LinkComponent {
|
|
66
|
+
/**
|
|
67
|
+
* External href (for standard <a> tags)
|
|
68
|
+
* Use this for external links or when not using Angular Router
|
|
69
|
+
*/
|
|
70
|
+
readonly href: _angular_core.InputSignal<string | null>;
|
|
71
|
+
/**
|
|
72
|
+
* Angular Router link (for internal navigation)
|
|
73
|
+
* Use this for internal app navigation
|
|
74
|
+
*/
|
|
75
|
+
readonly routerLink: _angular_core.InputSignal<string | string[] | null>;
|
|
76
|
+
/**
|
|
77
|
+
* Query parameters object passed through to the underlying
|
|
78
|
+
* `routerLink` directive. Only meaningful when `routerLink` is set.
|
|
79
|
+
* Equivalent to `<a [routerLink]="..." [queryParams]="...">`.
|
|
80
|
+
*/
|
|
81
|
+
readonly queryParams: _angular_core.InputSignal<Record<string, string | number | boolean | null | undefined> | null>;
|
|
82
|
+
/**
|
|
83
|
+
* Link variant (visual style)
|
|
84
|
+
* @default 'default'
|
|
85
|
+
*/
|
|
86
|
+
readonly variant: _angular_core.InputSignal<LinkVariant>;
|
|
87
|
+
/**
|
|
88
|
+
* Link size
|
|
89
|
+
* @default 'medium'
|
|
90
|
+
*/
|
|
91
|
+
readonly size: _angular_core.InputSignal<LinkSize>;
|
|
92
|
+
/**
|
|
93
|
+
* Underline behavior
|
|
94
|
+
* @default 'hover'
|
|
95
|
+
*/
|
|
96
|
+
readonly underline: _angular_core.InputSignal<LinkUnderline>;
|
|
97
|
+
/**
|
|
98
|
+
* Target attribute (e.g., '_blank', '_self')
|
|
99
|
+
* Automatically set to '_blank' if external is true
|
|
100
|
+
*/
|
|
101
|
+
readonly target: _angular_core.InputSignal<string | null>;
|
|
102
|
+
/**
|
|
103
|
+
* Rel attribute (e.g., 'noopener noreferrer')
|
|
104
|
+
* Automatically set to 'noopener noreferrer' for external links with target="_blank"
|
|
105
|
+
*/
|
|
106
|
+
readonly rel: _angular_core.InputSignal<string | null>;
|
|
107
|
+
/**
|
|
108
|
+
* Mark as external link (shows external icon, sets target="_blank")
|
|
109
|
+
* @default false
|
|
110
|
+
*/
|
|
111
|
+
readonly external: _angular_core.InputSignal<boolean>;
|
|
112
|
+
/**
|
|
113
|
+
* Disable the link (prevents navigation, changes appearance)
|
|
114
|
+
* @default false
|
|
115
|
+
*/
|
|
116
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
117
|
+
/**
|
|
118
|
+
* Loading state (shows loading indicator, prevents navigation)
|
|
119
|
+
* @default false
|
|
120
|
+
*/
|
|
121
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
122
|
+
/**
|
|
123
|
+
* Download attribute (for file downloads)
|
|
124
|
+
*/
|
|
125
|
+
readonly download: _angular_core.InputSignal<string | boolean | null>;
|
|
126
|
+
/**
|
|
127
|
+
* Additional CSS classes
|
|
128
|
+
*/
|
|
129
|
+
readonly className: _angular_core.InputSignal<string>;
|
|
130
|
+
/**
|
|
131
|
+
* ID attribute
|
|
132
|
+
*/
|
|
133
|
+
readonly id: _angular_core.InputSignal<string | null>;
|
|
134
|
+
/**
|
|
135
|
+
* ARIA label (for accessibility)
|
|
136
|
+
*/
|
|
137
|
+
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
138
|
+
/**
|
|
139
|
+
* ARIA described-by (for accessibility)
|
|
140
|
+
*/
|
|
141
|
+
readonly ariaDescribedBy: _angular_core.InputSignal<string | null>;
|
|
142
|
+
/**
|
|
143
|
+
* ARIA current (for indicating current page/location)
|
|
144
|
+
*/
|
|
145
|
+
readonly ariaCurrent: _angular_core.InputSignal<"page" | "step" | "location" | "date" | "time" | "true" | "false" | null>;
|
|
146
|
+
/**
|
|
147
|
+
* Role attribute (usually not needed for <a> tags)
|
|
148
|
+
*/
|
|
149
|
+
readonly role: _angular_core.InputSignal<string | null>;
|
|
150
|
+
/**
|
|
151
|
+
* Tab index (for keyboard navigation control)
|
|
152
|
+
*/
|
|
153
|
+
readonly tabIndex: _angular_core.InputSignal<number | null>;
|
|
154
|
+
/**
|
|
155
|
+
* Analytics tracking ID
|
|
156
|
+
*/
|
|
157
|
+
readonly trackingId: _angular_core.InputSignal<string | null>;
|
|
158
|
+
/**
|
|
159
|
+
* Analytics tracking category
|
|
160
|
+
*/
|
|
161
|
+
readonly trackingCategory: _angular_core.InputSignal<string | null>;
|
|
162
|
+
/**
|
|
163
|
+
* Analytics tracking label
|
|
164
|
+
*/
|
|
165
|
+
readonly trackingLabel: _angular_core.InputSignal<string | null>;
|
|
166
|
+
/**
|
|
167
|
+
* Custom data attributes (for analytics or other purposes)
|
|
168
|
+
*/
|
|
169
|
+
readonly dataAttributes: _angular_core.InputSignal<Record<string, string>>;
|
|
170
|
+
/**
|
|
171
|
+
* Click event (emitted when link is clicked)
|
|
172
|
+
* Note: Not emitted if disabled or loading
|
|
173
|
+
*/
|
|
174
|
+
readonly clicked: _angular_core.OutputEmitterRef<MouseEvent>;
|
|
175
|
+
/**
|
|
176
|
+
* Computed: is this an external link?
|
|
177
|
+
*/
|
|
178
|
+
readonly isExternalLink: _angular_core.Signal<boolean>;
|
|
179
|
+
/**
|
|
180
|
+
* Computed: effective target attribute
|
|
181
|
+
*/
|
|
182
|
+
readonly effectiveTarget: _angular_core.Signal<string | null>;
|
|
183
|
+
/**
|
|
184
|
+
* Computed: effective rel attribute
|
|
185
|
+
*/
|
|
186
|
+
readonly effectiveRel: _angular_core.Signal<string | null>;
|
|
187
|
+
/**
|
|
188
|
+
* Computed: effective download attribute
|
|
189
|
+
*/
|
|
190
|
+
readonly effectiveDownload: _angular_core.Signal<string | false | null>;
|
|
191
|
+
/**
|
|
192
|
+
* Computed: effective tab index
|
|
193
|
+
*/
|
|
194
|
+
readonly effectiveTabIndex: _angular_core.Signal<number | null>;
|
|
195
|
+
/**
|
|
196
|
+
* Host classes — single source of truth
|
|
197
|
+
*/
|
|
198
|
+
readonly classes: _angular_core.Signal<string>;
|
|
199
|
+
get hostClass(): string;
|
|
200
|
+
/**
|
|
201
|
+
* Computed: data attributes for analytics
|
|
202
|
+
*/
|
|
203
|
+
readonly computedDataAttributes: _angular_core.Signal<Record<string, string>>;
|
|
204
|
+
/**
|
|
205
|
+
* Handle click events
|
|
206
|
+
*/
|
|
207
|
+
handleClick(event: MouseEvent): void;
|
|
208
|
+
/**
|
|
209
|
+
* Track click for analytics
|
|
210
|
+
* Override this method or connect to your analytics service
|
|
211
|
+
*/
|
|
212
|
+
private trackClick;
|
|
213
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LinkComponent, never>;
|
|
214
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<LinkComponent, "fk-link", never, { "href": { "alias": "href"; "required": false; "isSignal": true; }; "routerLink": { "alias": "routerLink"; "required": false; "isSignal": true; }; "queryParams": { "alias": "queryParams"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "underline": { "alias": "underline"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; "rel": { "alias": "rel"; "required": false; "isSignal": true; }; "external": { "alias": "external"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "download": { "alias": "download"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; "isSignal": true; }; "ariaCurrent": { "alias": "ariaCurrent"; "required": false; "isSignal": true; }; "role": { "alias": "role"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "trackingId": { "alias": "trackingId"; "required": false; "isSignal": true; }; "trackingCategory": { "alias": "trackingCategory"; "required": false; "isSignal": true; }; "trackingLabel": { "alias": "trackingLabel"; "required": false; "isSignal": true; }; "dataAttributes": { "alias": "dataAttributes"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, ["[fkLinkIconStart]", "*", "[fkLinkIconEnd]"], true, never>;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
declare const FK_LINK_ICON_START: InjectionToken<FkLinkIconStartDirective>;
|
|
218
|
+
declare const FK_LINK_ICON_END: InjectionToken<FkLinkIconEndDirective>;
|
|
219
|
+
/**
|
|
220
|
+
* Marker directive for the leading icon slot inside `<fk-link>`.
|
|
221
|
+
* Mirrors the `[fkButtonIconStart]` pattern on `<fk-button>`.
|
|
222
|
+
*
|
|
223
|
+
* Apply to an `<fk-icon>` (or any element) projected as a child:
|
|
224
|
+
*
|
|
225
|
+
* ```html
|
|
226
|
+
* <fk-link variant="primary" (clicked)="download()">
|
|
227
|
+
* <fk-icon name="download" fkLinkIconStart />
|
|
228
|
+
* Download sample CSV
|
|
229
|
+
* </fk-link>
|
|
230
|
+
* ```
|
|
231
|
+
*
|
|
232
|
+
* The directive itself only marks the projection slot and applies
|
|
233
|
+
* `aria-hidden="true"` so screen readers don't announce decorative
|
|
234
|
+
* icons twice.
|
|
235
|
+
*/
|
|
236
|
+
declare class FkLinkIconStartDirective {
|
|
237
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FkLinkIconStartDirective, never>;
|
|
238
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FkLinkIconStartDirective, "[fkLinkIconStart]", never, {}, {}, never, never, true, never>;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Marker directive for the trailing icon slot inside `<fk-link>`.
|
|
242
|
+
* Note: the auto-shown external-link icon (when `href` points
|
|
243
|
+
* off-site) renders separately and is not affected by this slot.
|
|
244
|
+
*/
|
|
245
|
+
declare class FkLinkIconEndDirective {
|
|
246
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FkLinkIconEndDirective, never>;
|
|
247
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FkLinkIconEndDirective, "[fkLinkIconEnd]", never, {}, {}, never, never, true, never>;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export { FK_LINK_ICON_END, FK_LINK_ICON_START, FkLinkIconEndDirective, FkLinkIconStartDirective, LinkComponent };
|
|
251
|
+
export type { LinkSize, LinkUnderline, LinkVariant };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
declare class SeparatorComponent {
|
|
4
|
+
/** Space above the separator line; any valid CSS length or token. */
|
|
5
|
+
readonly marginTop: _angular_core.InputSignal<string | null>;
|
|
6
|
+
/** Space below the separator line; any valid CSS length or token. */
|
|
7
|
+
readonly marginBottom: _angular_core.InputSignal<string | null>;
|
|
8
|
+
/** Color of the separator line; any valid CSS color value or token. */
|
|
9
|
+
readonly color: _angular_core.InputSignal<string | null>;
|
|
10
|
+
readonly className: _angular_core.InputSignal<string>;
|
|
11
|
+
readonly classes: _angular_core.Signal<string>;
|
|
12
|
+
get hostClass(): string;
|
|
13
|
+
get hostMarginTop(): string | null;
|
|
14
|
+
get hostMarginBottom(): string | null;
|
|
15
|
+
get hostColor(): string | null;
|
|
16
|
+
readonly role = "separator";
|
|
17
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SeparatorComponent, never>;
|
|
18
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SeparatorComponent, "fk-separator", never, { "marginTop": { "alias": "marginTop"; "required": false; "isSignal": true; }; "marginBottom": { "alias": "marginBottom"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
type SeparatorProps = {
|
|
22
|
+
marginTop?: string | null;
|
|
23
|
+
marginBottom?: string | null;
|
|
24
|
+
color?: string | null;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { SeparatorComponent };
|
|
28
|
+
export type { SeparatorProps };
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Text variant types (type scale)
|
|
6
|
+
* - body: standard body text (default)
|
|
7
|
+
* - lead: hero/intro paragraph text
|
|
8
|
+
* - small: smaller body text
|
|
9
|
+
* - caption: small caption text
|
|
10
|
+
* - label: form label text
|
|
11
|
+
* - code: monospace/code text
|
|
12
|
+
*/
|
|
13
|
+
type TextVariant = 'body' | 'lead' | 'small' | 'caption' | 'label' | 'code';
|
|
14
|
+
/**
|
|
15
|
+
* Text tone/color variants
|
|
16
|
+
* - default: standard text color
|
|
17
|
+
* - muted: muted/subdued text
|
|
18
|
+
* - subtle: very subtle text
|
|
19
|
+
* - danger: error/danger text
|
|
20
|
+
* - success: success/positive text
|
|
21
|
+
*/
|
|
22
|
+
type TextTone = 'default' | 'muted' | 'subtle' | 'danger' | 'success';
|
|
23
|
+
/**
|
|
24
|
+
* Text alignment
|
|
25
|
+
* - inherit: inherits from parent (default)
|
|
26
|
+
* - start: left-aligned (default for LTR)
|
|
27
|
+
* - center: centered
|
|
28
|
+
* - end: right-aligned (default for RTL)
|
|
29
|
+
* - justify: justified
|
|
30
|
+
*/
|
|
31
|
+
type TextAlign = 'inherit' | 'start' | 'center' | 'end' | 'justify';
|
|
32
|
+
/**
|
|
33
|
+
* Font weight
|
|
34
|
+
* - normal: normal weight (400)
|
|
35
|
+
* - medium: medium weight (500)
|
|
36
|
+
* - semibold: semibold weight (600)
|
|
37
|
+
* - bold: bold weight (700)
|
|
38
|
+
*/
|
|
39
|
+
type TextWeight = 'normal' | 'medium' | 'semibold' | 'bold';
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Text Component
|
|
43
|
+
*
|
|
44
|
+
* A flexible typography component that supports:
|
|
45
|
+
* - Semantic HTML elements (p, span, div, label, small)
|
|
46
|
+
* - Design token-based variants (type scale)
|
|
47
|
+
* - Tone/color variants
|
|
48
|
+
* - Text truncation (single-line and multi-line)
|
|
49
|
+
* - Text alignment
|
|
50
|
+
* - Font weight control
|
|
51
|
+
* - Accessibility features (visually hidden, ARIA)
|
|
52
|
+
* - Responsive typography
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```html
|
|
56
|
+
* <!-- Basic paragraph -->
|
|
57
|
+
* <fk-text>This is body text</fk-text>
|
|
58
|
+
*
|
|
59
|
+
* <!-- Small caption -->
|
|
60
|
+
* <fk-text variant="caption" tone="muted">
|
|
61
|
+
* Last updated: 2 hours ago
|
|
62
|
+
* </fk-text>
|
|
63
|
+
*
|
|
64
|
+
* <!-- Truncated text -->
|
|
65
|
+
* <fk-text [truncate]="true">
|
|
66
|
+
* This is a very long text that will be truncated...
|
|
67
|
+
* </fk-text>
|
|
68
|
+
*
|
|
69
|
+
* <!-- Multi-line clamp -->
|
|
70
|
+
* <fk-text [maxLines]="3">
|
|
71
|
+
* Long description that will be clamped to 3 lines with ellipsis
|
|
72
|
+
* </fk-text>
|
|
73
|
+
*
|
|
74
|
+
* <!-- Inline span -->
|
|
75
|
+
* <fk-text as="span" variant="small" tone="muted">
|
|
76
|
+
* Inline text
|
|
77
|
+
* </fk-text>
|
|
78
|
+
*
|
|
79
|
+
* <!-- Form label -->
|
|
80
|
+
* <fk-text as="label" variant="label" weight="semibold" htmlFor="email-input">
|
|
81
|
+
* Email Address
|
|
82
|
+
* </fk-text>
|
|
83
|
+
* <input id="email-input" type="email" />
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
declare class TextComponent {
|
|
87
|
+
/**
|
|
88
|
+
* Semantic HTML element to render
|
|
89
|
+
* @default 'p'
|
|
90
|
+
*/
|
|
91
|
+
readonly as: _angular_core.InputSignal<"small" | "label" | "p" | "span" | "div">;
|
|
92
|
+
/**
|
|
93
|
+
* Typography variant (type scale)
|
|
94
|
+
* @default 'body'
|
|
95
|
+
*/
|
|
96
|
+
readonly variant: _angular_core.InputSignal<TextVariant>;
|
|
97
|
+
/**
|
|
98
|
+
* Text tone/color
|
|
99
|
+
* @default 'default'
|
|
100
|
+
*/
|
|
101
|
+
readonly tone: _angular_core.InputSignal<TextTone>;
|
|
102
|
+
/**
|
|
103
|
+
* Text alignment
|
|
104
|
+
* @default 'inherit'
|
|
105
|
+
*/
|
|
106
|
+
readonly align: _angular_core.InputSignal<TextAlign>;
|
|
107
|
+
/**
|
|
108
|
+
* Font weight
|
|
109
|
+
* @default null (uses variant default)
|
|
110
|
+
*/
|
|
111
|
+
readonly weight: _angular_core.InputSignal<TextWeight | null>;
|
|
112
|
+
/**
|
|
113
|
+
* Enable single-line truncation with ellipsis
|
|
114
|
+
* @default false
|
|
115
|
+
*/
|
|
116
|
+
readonly truncate: _angular_core.InputSignal<boolean>;
|
|
117
|
+
/**
|
|
118
|
+
* Maximum number of lines (multi-line clamp)
|
|
119
|
+
* @default null (no clamping)
|
|
120
|
+
*/
|
|
121
|
+
readonly maxLines: _angular_core.InputSignal<number | null>;
|
|
122
|
+
/**
|
|
123
|
+
* Add bottom margin/gutter
|
|
124
|
+
* @default false
|
|
125
|
+
*/
|
|
126
|
+
readonly gutterBottom: _angular_core.InputSignal<boolean>;
|
|
127
|
+
/**
|
|
128
|
+
* Italic text style
|
|
129
|
+
* @default false
|
|
130
|
+
*/
|
|
131
|
+
readonly italic: _angular_core.InputSignal<boolean>;
|
|
132
|
+
/**
|
|
133
|
+
* Visually hide the text (screen reader only)
|
|
134
|
+
* @default false
|
|
135
|
+
*/
|
|
136
|
+
readonly visuallyHidden: _angular_core.InputSignal<boolean>;
|
|
137
|
+
/**
|
|
138
|
+
* Additional CSS classes
|
|
139
|
+
*/
|
|
140
|
+
readonly className: _angular_core.InputSignal<string>;
|
|
141
|
+
/**
|
|
142
|
+
* ID attribute
|
|
143
|
+
*/
|
|
144
|
+
readonly id: _angular_core.InputSignal<string | null>;
|
|
145
|
+
/**
|
|
146
|
+
* ARIA label (for accessibility)
|
|
147
|
+
*/
|
|
148
|
+
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
149
|
+
/**
|
|
150
|
+
* ARIA described-by (for accessibility)
|
|
151
|
+
*/
|
|
152
|
+
readonly ariaDescribedBy: _angular_core.InputSignal<string | null>;
|
|
153
|
+
/**
|
|
154
|
+
* Role attribute (usually not needed)
|
|
155
|
+
*/
|
|
156
|
+
readonly role: _angular_core.InputSignal<string | null>;
|
|
157
|
+
/**
|
|
158
|
+
* For attribute (when using as="label" to associate with an input)
|
|
159
|
+
*/
|
|
160
|
+
readonly htmlFor: _angular_core.InputSignal<string | null>;
|
|
161
|
+
private readonly pTemplate;
|
|
162
|
+
private readonly spanTemplate;
|
|
163
|
+
private readonly divTemplate;
|
|
164
|
+
private readonly labelTemplate;
|
|
165
|
+
private readonly smallTemplate;
|
|
166
|
+
/**
|
|
167
|
+
* Host classes — single source of truth
|
|
168
|
+
*/
|
|
169
|
+
readonly classes: _angular_core.Signal<string>;
|
|
170
|
+
get hostClass(): string;
|
|
171
|
+
/**
|
|
172
|
+
* Computed: inline styles for line clamping
|
|
173
|
+
*/
|
|
174
|
+
readonly lineClampStyle: _angular_core.Signal<{
|
|
175
|
+
'-webkit-line-clamp': string;
|
|
176
|
+
} | null>;
|
|
177
|
+
/**
|
|
178
|
+
* Computed: choose the correct element template
|
|
179
|
+
*/
|
|
180
|
+
readonly template: _angular_core.Signal<TemplateRef<unknown>>;
|
|
181
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TextComponent, never>;
|
|
182
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TextComponent, "fk-text", never, { "as": { "alias": "as"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "weight": { "alias": "weight"; "required": false; "isSignal": true; }; "truncate": { "alias": "truncate"; "required": false; "isSignal": true; }; "maxLines": { "alias": "maxLines"; "required": false; "isSignal": true; }; "gutterBottom": { "alias": "gutterBottom"; "required": false; "isSignal": true; }; "italic": { "alias": "italic"; "required": false; "isSignal": true; }; "visuallyHidden": { "alias": "visuallyHidden"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; "isSignal": true; }; "role": { "alias": "role"; "required": false; "isSignal": true; }; "htmlFor": { "alias": "htmlFor"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export { TextComponent };
|
|
186
|
+
export type { TextAlign, TextTone, TextVariant, TextWeight };
|