@tekus/design-system 5.25.1 → 5.26.0
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/assets/readme-images/tk-card-default.svg +32 -0
- package/assets/readme-images/tk-card-horizontal.svg +22 -0
- package/assets/readme-images/tk-card-layouts.svg +58 -0
- package/assets/readme-images/tk-card-list-selected.svg +102 -0
- package/assets/readme-images/tk-card-list.svg +70 -0
- package/assets/readme-images/tk-card-simple-versions.svg +46 -0
- package/assets/readme-images/tk-card.svg +32 -0
- package/assets/readme-images/tk-progress-bar-sizes.svg +28 -0
- package/assets/readme-images/tk-progress-bar.svg +13 -0
- package/assets/readme-images/tk-status-bar-severity.svg +15 -0
- package/assets/readme-images/tk-status-bar.svg +9 -0
- package/assets/readme-images/tk-toast-action.svg +17 -0
- package/assets/readme-images/tk-toast.svg +38 -0
- package/fesm2022/tekus-design-system-components-button.mjs +14 -3
- package/fesm2022/tekus-design-system-components-button.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-card-list.mjs +61 -0
- package/fesm2022/tekus-design-system-components-card-list.mjs.map +1 -0
- package/fesm2022/tekus-design-system-components-card.mjs +126 -0
- package/fesm2022/tekus-design-system-components-card.mjs.map +1 -0
- package/fesm2022/tekus-design-system-components-drawer.mjs +1 -1
- package/fesm2022/tekus-design-system-components-drawer.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-fallback-view.mjs +1 -1
- package/fesm2022/tekus-design-system-components-fallback-view.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-modal.mjs +1 -1
- package/fesm2022/tekus-design-system-components-modal.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-progress-bar.mjs +55 -0
- package/fesm2022/tekus-design-system-components-progress-bar.mjs.map +1 -0
- package/fesm2022/tekus-design-system-components-status-bar.mjs +52 -0
- package/fesm2022/tekus-design-system-components-status-bar.mjs.map +1 -0
- package/fesm2022/tekus-design-system-components-table.mjs +1 -1
- package/fesm2022/tekus-design-system-components-table.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-toast.mjs +47 -0
- package/fesm2022/tekus-design-system-components-toast.mjs.map +1 -0
- package/fesm2022/tekus-design-system-components-toolbar.mjs +1 -1
- package/fesm2022/tekus-design-system-components-toolbar.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-topbar.mjs +1 -1
- package/fesm2022/tekus-design-system-components-topbar.mjs.map +1 -1
- package/fesm2022/tekus-design-system-core-types.mjs +41 -0
- package/fesm2022/tekus-design-system-core-types.mjs.map +1 -1
- package/fesm2022/tekus-design-system-core.mjs +41 -0
- package/fesm2022/tekus-design-system-core.mjs.map +1 -1
- package/package.json +21 -1
- package/types/tekus-design-system-components-button.d.ts +12 -1
- package/types/tekus-design-system-components-card-list.d.ts +63 -0
- package/types/tekus-design-system-components-card.d.ts +95 -0
- package/types/tekus-design-system-components-progress-bar.d.ts +43 -0
- package/types/tekus-design-system-components-status-bar.d.ts +42 -0
- package/types/tekus-design-system-components-toast.d.ts +27 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tekus/design-system",
|
|
3
3
|
"description": "Tekus design system library",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.26.0",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"peerDependencies": {
|
|
7
7
|
"@angular/core": "^21.0.0",
|
|
@@ -52,6 +52,14 @@
|
|
|
52
52
|
"types": "./types/tekus-design-system-components-button.d.ts",
|
|
53
53
|
"default": "./fesm2022/tekus-design-system-components-button.mjs"
|
|
54
54
|
},
|
|
55
|
+
"./components/card": {
|
|
56
|
+
"types": "./types/tekus-design-system-components-card.d.ts",
|
|
57
|
+
"default": "./fesm2022/tekus-design-system-components-card.mjs"
|
|
58
|
+
},
|
|
59
|
+
"./components/card-list": {
|
|
60
|
+
"types": "./types/tekus-design-system-components-card-list.d.ts",
|
|
61
|
+
"default": "./fesm2022/tekus-design-system-components-card-list.mjs"
|
|
62
|
+
},
|
|
55
63
|
"./components/checkbox": {
|
|
56
64
|
"types": "./types/tekus-design-system-components-checkbox.d.ts",
|
|
57
65
|
"default": "./fesm2022/tekus-design-system-components-checkbox.mjs"
|
|
@@ -96,6 +104,10 @@
|
|
|
96
104
|
"types": "./types/tekus-design-system-components-panel.d.ts",
|
|
97
105
|
"default": "./fesm2022/tekus-design-system-components-panel.mjs"
|
|
98
106
|
},
|
|
107
|
+
"./components/progress-bar": {
|
|
108
|
+
"types": "./types/tekus-design-system-components-progress-bar.d.ts",
|
|
109
|
+
"default": "./fesm2022/tekus-design-system-components-progress-bar.mjs"
|
|
110
|
+
},
|
|
99
111
|
"./components/radio-button": {
|
|
100
112
|
"types": "./types/tekus-design-system-components-radio-button.d.ts",
|
|
101
113
|
"default": "./fesm2022/tekus-design-system-components-radio-button.mjs"
|
|
@@ -104,6 +116,10 @@
|
|
|
104
116
|
"types": "./types/tekus-design-system-components-select.d.ts",
|
|
105
117
|
"default": "./fesm2022/tekus-design-system-components-select.mjs"
|
|
106
118
|
},
|
|
119
|
+
"./components/status-bar": {
|
|
120
|
+
"types": "./types/tekus-design-system-components-status-bar.d.ts",
|
|
121
|
+
"default": "./fesm2022/tekus-design-system-components-status-bar.mjs"
|
|
122
|
+
},
|
|
107
123
|
"./components/table": {
|
|
108
124
|
"types": "./types/tekus-design-system-components-table.d.ts",
|
|
109
125
|
"default": "./fesm2022/tekus-design-system-components-table.mjs"
|
|
@@ -120,6 +136,10 @@
|
|
|
120
136
|
"types": "./types/tekus-design-system-components-textarea.d.ts",
|
|
121
137
|
"default": "./fesm2022/tekus-design-system-components-textarea.mjs"
|
|
122
138
|
},
|
|
139
|
+
"./components/toast": {
|
|
140
|
+
"types": "./types/tekus-design-system-components-toast.d.ts",
|
|
141
|
+
"default": "./fesm2022/tekus-design-system-components-toast.mjs"
|
|
142
|
+
},
|
|
123
143
|
"./components/toolbar": {
|
|
124
144
|
"types": "./types/tekus-design-system-components-toolbar.d.ts",
|
|
125
145
|
"default": "./fesm2022/tekus-design-system-components-toolbar.mjs"
|
|
@@ -115,6 +115,17 @@ declare class ButtonComponent {
|
|
|
115
115
|
* @default `undefined`
|
|
116
116
|
*/
|
|
117
117
|
tooltipText: _angular_core.InputSignal<string | undefined>;
|
|
118
|
+
/**
|
|
119
|
+
* @property {'small' | 'large' | undefined} size
|
|
120
|
+
* @description
|
|
121
|
+
* Defines the size of the button.
|
|
122
|
+
* - `'small'`: Small button.
|
|
123
|
+
* - `'large'`: Large button.
|
|
124
|
+
* - `undefined`: Default size.
|
|
125
|
+
*
|
|
126
|
+
* @default `undefined`
|
|
127
|
+
*/
|
|
128
|
+
size: _angular_core.InputSignal<"small" | "large" | undefined>;
|
|
118
129
|
/**
|
|
119
130
|
* @method onButtonClick
|
|
120
131
|
* @description
|
|
@@ -123,7 +134,7 @@ declare class ButtonComponent {
|
|
|
123
134
|
*/
|
|
124
135
|
onButtonClick(): void;
|
|
125
136
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
126
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonComponent, "tk-button", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "severity": { "alias": "severity"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "link": { "alias": "link"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "tooltipText": { "alias": "tooltipText"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
137
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonComponent, "tk-button", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "severity": { "alias": "severity"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "link": { "alias": "link"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "tooltipText": { "alias": "tooltipText"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
127
138
|
}
|
|
128
139
|
|
|
129
140
|
export { ButtonComponent };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TkCardAction, TkCardInfoElement } from '@tekus/design-system/components/card';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Interface representing an item in the CardList.
|
|
6
|
+
* Contains all necessary properties to render a TkCard.
|
|
7
|
+
*/
|
|
8
|
+
interface TkCardListItem {
|
|
9
|
+
/** Unique identifier for the item (required for selection) */
|
|
10
|
+
id: string;
|
|
11
|
+
/** Primary title of the card */
|
|
12
|
+
title: string;
|
|
13
|
+
/** Optional icon to display next to the title */
|
|
14
|
+
titleIcon?: string;
|
|
15
|
+
/** Optional secondary description */
|
|
16
|
+
description?: string;
|
|
17
|
+
/** Optional image URL or source */
|
|
18
|
+
image?: string;
|
|
19
|
+
/** Optional ID or primary badge text displayed in the header */
|
|
20
|
+
badgeText?: string;
|
|
21
|
+
/** Optional secondary metadata text displayed next to the badge */
|
|
22
|
+
secondaryBadgeText?: string;
|
|
23
|
+
/** List of actions associated with the card */
|
|
24
|
+
actions?: TkCardAction[];
|
|
25
|
+
/** Dynamic list of informational elements (tags, progress bars, etc.) */
|
|
26
|
+
infoElements?: TkCardInfoElement[];
|
|
27
|
+
/** Whether this specific item can be selected. If not provided, list's selectable defaults apply. */
|
|
28
|
+
selectable?: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @component CardListComponent
|
|
33
|
+
* @description
|
|
34
|
+
* High-level component used to display a grid of cards with responsive behavioral breakpoints.
|
|
35
|
+
* Supports individual item selection and consistent spacing.
|
|
36
|
+
*/
|
|
37
|
+
declare class CardListComponent {
|
|
38
|
+
/** The list of items to display in the grid. Required. */
|
|
39
|
+
items: _angular_core.InputSignal<TkCardListItem[]>;
|
|
40
|
+
/** Whether the list supports global item selection (checkboxes). */
|
|
41
|
+
selectable: _angular_core.InputSignal<boolean>;
|
|
42
|
+
/** Two-way signal for the current selection of item IDs. */
|
|
43
|
+
selectedIds: _angular_core.ModelSignal<string[]>;
|
|
44
|
+
/**
|
|
45
|
+
* Helper method to determine if an individual item is currently selected.
|
|
46
|
+
*/
|
|
47
|
+
isItemSelected(id: string): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Helper method to determine if a card should be marked as selected in the template.
|
|
50
|
+
* Only returns true if the item is explicitly selectable and its ID is in the selected list.
|
|
51
|
+
*/
|
|
52
|
+
isCardSelected(item: TkCardListItem): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Handler for individual card selection change events.
|
|
55
|
+
* Updates the global selectedIds model accordingly.
|
|
56
|
+
*/
|
|
57
|
+
onItemSelected(id: string, selected: boolean): void;
|
|
58
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CardListComponent, never>;
|
|
59
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CardListComponent, "tk-card-list", never, { "items": { "alias": "items"; "required": true; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "selectedIds": { "alias": "selectedIds"; "required": false; "isSignal": true; }; }, { "selectedIds": "selectedIdsChange"; }, never, never, true, never>;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { CardListComponent };
|
|
63
|
+
export type { TkCardListItem };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { MenuItem } from 'primeng/api';
|
|
3
|
+
|
|
4
|
+
interface TkCardAction {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
handler: () => void;
|
|
9
|
+
severity?: 'primary' | 'secondary' | 'danger' | 'success' | 'warn' | 'info';
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
type TkCardInfoElementType = 'string' | 'chip' | 'tag' | 'button' | 'icon' | 'progress-bar' | 'status-bar';
|
|
13
|
+
interface TkCardInfoElement {
|
|
14
|
+
type: TkCardInfoElementType;
|
|
15
|
+
label?: string;
|
|
16
|
+
barLabel?: string;
|
|
17
|
+
icon?: string;
|
|
18
|
+
value?: number;
|
|
19
|
+
severity?: 'primary' | 'secondary' | 'danger' | 'success' | 'warn' | 'info';
|
|
20
|
+
handler?: () => void;
|
|
21
|
+
}
|
|
22
|
+
type TkCardLayout = 'vertical' | 'horizontal';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @component CardComponent
|
|
26
|
+
* @description
|
|
27
|
+
* Flexible card component used to display grouped content with multiple layout options.
|
|
28
|
+
* Supports vertical and horizontal orientations, optional images, headers with selection,
|
|
29
|
+
* and dynamic action buttons (with overflow menu support).
|
|
30
|
+
*
|
|
31
|
+
* It utilizes Angular 21 Signals for efficient state management and reactivity.
|
|
32
|
+
*
|
|
33
|
+
* @usage
|
|
34
|
+
* ```html
|
|
35
|
+
* <tk-card
|
|
36
|
+
* title="My Document"
|
|
37
|
+
* description="Upload in progress..."
|
|
38
|
+
* layout="horizontal"
|
|
39
|
+
* [actions]="myActions"
|
|
40
|
+
* [infoElements]="[{ type: 'progress-bar', value: 75 }]">
|
|
41
|
+
* </tk-card>
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
declare class CardComponent {
|
|
45
|
+
/** The primary title of the card. Required. */
|
|
46
|
+
title: _angular_core.InputSignal<string>;
|
|
47
|
+
/** Optional icon to display next to the title. */
|
|
48
|
+
titleIcon: _angular_core.InputSignal<string | undefined>;
|
|
49
|
+
/** Optional secondary description. */
|
|
50
|
+
description: _angular_core.InputSignal<string | undefined>;
|
|
51
|
+
/** Optional image URL or source. */
|
|
52
|
+
image: _angular_core.InputSignal<string | undefined>;
|
|
53
|
+
/** Whether to show the image section. If true and no URL is provided, a placeholder is shown. */
|
|
54
|
+
showImage: _angular_core.InputSignal<boolean>;
|
|
55
|
+
/** Layout orientation: 'vertical' (default) or 'horizontal'. */
|
|
56
|
+
layout: _angular_core.InputSignal<TkCardLayout>;
|
|
57
|
+
/** Whether the card shows a checkbox for selection. */
|
|
58
|
+
selectable: _angular_core.InputSignal<boolean>;
|
|
59
|
+
/** Two-way signal for the selection state. */
|
|
60
|
+
selected: _angular_core.ModelSignal<boolean>;
|
|
61
|
+
/** Optional ID or primary badge text displayed in the header. */
|
|
62
|
+
badgeText: _angular_core.InputSignal<string | undefined>;
|
|
63
|
+
/** Optional secondary metadata text (e.g. file size) displayed next to the badge. */
|
|
64
|
+
secondaryBadgeText: _angular_core.InputSignal<string | undefined>;
|
|
65
|
+
/** List of actions associated with the card. */
|
|
66
|
+
actions: _angular_core.InputSignal<TkCardAction[]>;
|
|
67
|
+
/** Dynamic list of informational elements (tags, progress bars, etc.). */
|
|
68
|
+
infoElements: _angular_core.InputSignal<TkCardInfoElement[]>;
|
|
69
|
+
/**
|
|
70
|
+
* Computed logic for handling actions.
|
|
71
|
+
* If there are > 3 actions, they are all moved to an overflow menu.
|
|
72
|
+
* Otherwise, they are displayed as individual buttons.
|
|
73
|
+
*/
|
|
74
|
+
hasOverflowActions: _angular_core.Signal<boolean>;
|
|
75
|
+
/** Actions to be displayed directly as buttons. */
|
|
76
|
+
visibleActions: _angular_core.Signal<TkCardAction[]>;
|
|
77
|
+
/**
|
|
78
|
+
* Actions to be displayed in the overflow menu.
|
|
79
|
+
* Maps TkCardAction to PrimeNG MenuItem format.
|
|
80
|
+
*/
|
|
81
|
+
menuItems: _angular_core.Signal<MenuItem[]>;
|
|
82
|
+
/**
|
|
83
|
+
* Maps card severity to button severity.
|
|
84
|
+
*/
|
|
85
|
+
getButtonSeverity(severity?: string): 'primary' | 'secondary' | 'danger';
|
|
86
|
+
/**
|
|
87
|
+
* Maps card severity to status bar severity.
|
|
88
|
+
*/
|
|
89
|
+
getStatusBarSeverity(severity?: string): 'primary' | 'secondary' | 'success' | 'error';
|
|
90
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CardComponent, never>;
|
|
91
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CardComponent, "tk-card", never, { "title": { "alias": "title"; "required": true; "isSignal": true; }; "titleIcon": { "alias": "titleIcon"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "image": { "alias": "image"; "required": false; "isSignal": true; }; "showImage": { "alias": "showImage"; "required": false; "isSignal": true; }; "layout": { "alias": "layout"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "badgeText": { "alias": "badgeText"; "required": false; "isSignal": true; }; "secondaryBadgeText": { "alias": "secondaryBadgeText"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "infoElements": { "alias": "infoElements"; "required": false; "isSignal": true; }; }, { "selected": "selectedChange"; }, never, never, true, never>;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export { CardComponent };
|
|
95
|
+
export type { TkCardAction, TkCardInfoElement, TkCardInfoElementType, TkCardLayout };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
type ProgressBarSize = 'small' | 'medium' | 'large';
|
|
4
|
+
/**
|
|
5
|
+
* @component ProgressBarComponent
|
|
6
|
+
* @description
|
|
7
|
+
* A component used to display the progress of a task.
|
|
8
|
+
* It wraps PrimeNG's `p-progressbar` component with custom styling and behavior.
|
|
9
|
+
*
|
|
10
|
+
* This component supports:
|
|
11
|
+
* - `value`: The progress value (0-100)
|
|
12
|
+
* - `showValue`: Whether to display the value text (only for medium/large)
|
|
13
|
+
* - `size`: The size of the progress bar ('small', 'medium', 'large')
|
|
14
|
+
*
|
|
15
|
+
* @usage
|
|
16
|
+
* ### Basic Usage
|
|
17
|
+
* ```html
|
|
18
|
+
* <tk-progress-bar [value]="50" size="medium"></tk-progress-bar>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
declare class ProgressBarComponent {
|
|
22
|
+
/** The progress value (0-100). */
|
|
23
|
+
value: _angular_core.InputSignal<number>;
|
|
24
|
+
/**
|
|
25
|
+
* Whether to display the progress value percentage.
|
|
26
|
+
* Only applicable for 'medium' or 'large' sizes.
|
|
27
|
+
* @default true
|
|
28
|
+
*/
|
|
29
|
+
showValue: _angular_core.InputSignal<boolean>;
|
|
30
|
+
/**
|
|
31
|
+
* The size of the progress bar.
|
|
32
|
+
* - 'small': Thin bar, no percentage text.
|
|
33
|
+
* - 'medium': Regular bar, percentage text on left.
|
|
34
|
+
* - 'large': Thick bar, percentage text on left.
|
|
35
|
+
* @default 'medium'
|
|
36
|
+
*/
|
|
37
|
+
size: _angular_core.InputSignal<ProgressBarSize>;
|
|
38
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ProgressBarComponent, never>;
|
|
39
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ProgressBarComponent, "tk-progress-bar", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "showValue": { "alias": "showValue"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export { ProgressBarComponent };
|
|
43
|
+
export type { ProgressBarSize };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
type StatusBarSeverity = 'primary' | 'secondary' | 'success' | 'error';
|
|
4
|
+
type StatusBarSize = 'medium' | 'large';
|
|
5
|
+
/**
|
|
6
|
+
* @component StatusBarComponent
|
|
7
|
+
* @description
|
|
8
|
+
* A component used to display a static status bar with a label.
|
|
9
|
+
*
|
|
10
|
+
* This component supports:
|
|
11
|
+
* - `label`: The message to display on the left.
|
|
12
|
+
* - `severity`: The color scheme of the status bar ('primary' | 'secondary' | 'success' | 'error').
|
|
13
|
+
* - `size`: The size of the status bar ('medium' | 'large').
|
|
14
|
+
*
|
|
15
|
+
* @usage
|
|
16
|
+
* ```html
|
|
17
|
+
* <tk-status-bar label="1/99" severity="success" size="medium"></tk-status-bar>
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
declare class StatusBarComponent {
|
|
21
|
+
/** The message to display on the left. */
|
|
22
|
+
label: _angular_core.InputSignal<string>;
|
|
23
|
+
/**
|
|
24
|
+
* The severity level of the status bar, which determines its color.
|
|
25
|
+
* @default 'primary'
|
|
26
|
+
*/
|
|
27
|
+
severity: _angular_core.InputSignal<StatusBarSeverity>;
|
|
28
|
+
/**
|
|
29
|
+
* The size of the status bar.
|
|
30
|
+
* - 'medium': Height 18px.
|
|
31
|
+
* - 'large': Height 32px.
|
|
32
|
+
* @default 'medium'
|
|
33
|
+
*/
|
|
34
|
+
size: _angular_core.InputSignal<StatusBarSize>;
|
|
35
|
+
/** The message to display in the center of the visual bar. */
|
|
36
|
+
barLabel: _angular_core.InputSignal<string>;
|
|
37
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StatusBarComponent, never>;
|
|
38
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StatusBarComponent, "tk-status-bar", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "severity": { "alias": "severity"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "barLabel": { "alias": "barLabel"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { StatusBarComponent };
|
|
42
|
+
export type { StatusBarSeverity, StatusBarSize };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
|
|
3
|
+
interface TkToastAction {
|
|
4
|
+
label: string;
|
|
5
|
+
handler: () => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* @component ToastComponent
|
|
9
|
+
* @description
|
|
10
|
+
* Custom wrapper around PrimeNG's Toast component to adhere to our Design System.
|
|
11
|
+
* Supports \`info\`, \`success\`, and \`error\` severities.
|
|
12
|
+
* Includes support for a custom action button on the left for \`info\` severity.
|
|
13
|
+
*
|
|
14
|
+
* To use this, add \`<tk-toast></tk-toast>\` in the root of your application, and then
|
|
15
|
+
* inject \`MessageService\` from \`primeng/api\` to trigger notifications.
|
|
16
|
+
*/
|
|
17
|
+
declare class ToastComponent {
|
|
18
|
+
/**
|
|
19
|
+
* Helper function to get the appropriate icon for a given severity.
|
|
20
|
+
*/
|
|
21
|
+
getIconForSeverity(severity: string | undefined): string;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToastComponent, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ToastComponent, "tk-toast", never, {}, {}, never, never, true, never>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { ToastComponent };
|
|
27
|
+
export type { TkToastAction };
|