@tekus/design-system 5.17.0 → 5.18.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/tokens/tk-foundations.json +2 -2
- package/components/topbar/index.d.ts +5 -0
- package/components/topbar/public-api.d.ts +2 -0
- package/components/topbar/src/topbar.component.d.ts +20 -0
- package/components/topbar/src/topbar.types.d.ts +13 -0
- package/fesm2022/tekus-design-system-components-button.mjs +2 -2
- package/fesm2022/tekus-design-system-components-button.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-topbar.mjs +36 -0
- package/fesm2022/tekus-design-system-components-topbar.mjs.map +1 -0
- package/package.json +12 -8
- package/styles/variables.css +2 -2
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TopbarAction, TopbarTag } from './topbar.types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* @component TopbarComponent
|
|
5
|
+
* @description
|
|
6
|
+
* Layout component that renders a title with optional actions and metadata.
|
|
7
|
+
* It composes `tk-button` and `tk-tag` and uses only design tokens for styles.
|
|
8
|
+
*/
|
|
9
|
+
export declare class TopbarComponent {
|
|
10
|
+
/** Main title text for the topbar. */
|
|
11
|
+
title: import("@angular/core").InputSignal<string>;
|
|
12
|
+
/** Optional list of actions displayed in the header. */
|
|
13
|
+
actions: import("@angular/core").InputSignal<TopbarAction[] | null>;
|
|
14
|
+
/** Optional list of tags displayed in the meta section. */
|
|
15
|
+
tags: import("@angular/core").InputSignal<TopbarTag[] | null>;
|
|
16
|
+
/** Optional description displayed in the meta section. */
|
|
17
|
+
description: import("@angular/core").InputSignal<string | null>;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TopbarComponent, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TopbarComponent, "tk-topbar", never, { "title": { "alias": "title"; "required": true; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "tags": { "alias": "tags"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TagSeverity } from '@tekus/design-system/components/tag';
|
|
2
|
+
export type TopbarActionType = 'primary' | 'icon';
|
|
3
|
+
export interface TopbarAction {
|
|
4
|
+
type: TopbarActionType;
|
|
5
|
+
label?: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
tooltipText?: string;
|
|
8
|
+
onClick: () => void;
|
|
9
|
+
}
|
|
10
|
+
export interface TopbarTag {
|
|
11
|
+
label: string;
|
|
12
|
+
variant?: TagSeverity;
|
|
13
|
+
}
|
|
@@ -96,11 +96,11 @@ class ButtonComponent {
|
|
|
96
96
|
this.clicked.emit('mouse');
|
|
97
97
|
}
|
|
98
98
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
99
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: ButtonComponent, isStandalone: true, selector: "tk-button", inputs: { label: "label", disabled: "disabled", type: "type", severity: "severity", variant: "variant", link: "link", icon: "icon", tooltipText: "tooltipText" }, outputs: { clicked: "clicked" }, ngImport: i0, template: "<p-button\n class=\"tk-button\"\n [label]=\"label\"\n [disabled]=\"disabled\"\n [type]=\"type\"\n [severity]=\"link ? null : severity\"\n [variant]=\"variant\"\n [link]=\"link\"\n [pTooltip]=\"tooltipText\"\n tooltipPosition=\"top\"\n (click)=\"onButtonClick()\"\n (keydown.enter)=\"onButtonClick()\"\n (keydown.space)=\"onButtonClick()\">\n\n @if (icon) {\n <tk-icon [icon]=\"icon\"></tk-icon>\n }\n</p-button>\n", styles: [":host ::ng-deep .p-button.p-button-primary .p-button-label,:host ::ng-deep .p-button.p-button-danger .p-button-label{color:var(--tk-color-base-surface-0, #ffffff)!important}:host ::ng-deep .p-button.p-button-link .p-button-label{color:var(--tk-color-base-primary-500, #16006f)!important}:host ::ng-deep .p-button.p-button-link:hover .p-button-label{color:var(--tk-color-base-primary-400, #45338c)!important}:host ::ng-deep .p-button.p-button-secondary .p-button-label{color:var(--tk-color-base-surface-900, #191A1B)!important}:host ::ng-deep .p-button.p-button-secondary.p-button-outlined .p-button-label{color:var(--tk-color-base-surface-500, #8a8a8b)!important}:host ::ng-deep .p-button.p-button-secondary .p-button-label,:host ::ng-deep .p-button.p-button-danger .p-button-label{font-weight:var(--tk-font-weight-400, 400)}:host ::ng-deep p-button{display:inline-block}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: IconComponent, selector: "tk-icon", inputs: ["icon", "styleIcon", "color", "size", "disabled"], outputs: ["iconChange", "styleIconChange", "colorChange", "sizeChange", "disabledChange"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }] }); }
|
|
99
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: ButtonComponent, isStandalone: true, selector: "tk-button", inputs: { label: "label", disabled: "disabled", type: "type", severity: "severity", variant: "variant", link: "link", icon: "icon", tooltipText: "tooltipText" }, outputs: { clicked: "clicked" }, ngImport: i0, template: "<p-button\n class=\"tk-button\"\n [label]=\"label\"\n [disabled]=\"disabled\"\n [type]=\"type\"\n [severity]=\"link ? null : severity\"\n [variant]=\"variant\"\n [link]=\"link\"\n [pTooltip]=\"tooltipText\"\n tooltipPosition=\"top\"\n (click)=\"onButtonClick()\"\n (keydown.enter)=\"onButtonClick()\"\n (keydown.space)=\"onButtonClick()\">\n\n @if (icon) {\n <tk-icon [icon]=\"icon\"></tk-icon>\n }\n</p-button>\n", styles: [":host ::ng-deep .p-button{min-width:var(--tk-size-base-250, 2.5rem)}:host ::ng-deep .p-button.p-button-primary .p-button-label,:host ::ng-deep .p-button.p-button-danger .p-button-label{color:var(--tk-color-base-surface-0, #ffffff)!important}:host ::ng-deep .p-button.p-button-link .p-button-label{color:var(--tk-color-base-primary-500, #16006f)!important}:host ::ng-deep .p-button.p-button-link:hover .p-button-label{color:var(--tk-color-base-primary-400, #45338c)!important}:host ::ng-deep .p-button.p-button-secondary .p-button-label{color:var(--tk-color-base-surface-900, #191A1B)!important}:host ::ng-deep .p-button.p-button-secondary.p-button-outlined .p-button-label{color:var(--tk-color-base-surface-500, #8a8a8b)!important}:host ::ng-deep .p-button.p-button-secondary .p-button-label,:host ::ng-deep .p-button.p-button-danger .p-button-label{font-weight:var(--tk-font-weight-400, 400)}:host ::ng-deep .p-button-label{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: IconComponent, selector: "tk-icon", inputs: ["icon", "styleIcon", "color", "size", "disabled"], outputs: ["iconChange", "styleIconChange", "colorChange", "sizeChange", "disabledChange"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }] }); }
|
|
100
100
|
}
|
|
101
101
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
102
102
|
type: Component,
|
|
103
|
-
args: [{ selector: 'tk-button', standalone: true, imports: [ButtonModule, IconComponent, Tooltip], template: "<p-button\n class=\"tk-button\"\n [label]=\"label\"\n [disabled]=\"disabled\"\n [type]=\"type\"\n [severity]=\"link ? null : severity\"\n [variant]=\"variant\"\n [link]=\"link\"\n [pTooltip]=\"tooltipText\"\n tooltipPosition=\"top\"\n (click)=\"onButtonClick()\"\n (keydown.enter)=\"onButtonClick()\"\n (keydown.space)=\"onButtonClick()\">\n\n @if (icon) {\n <tk-icon [icon]=\"icon\"></tk-icon>\n }\n</p-button>\n", styles: [":host ::ng-deep .p-button.p-button-primary .p-button-label,:host ::ng-deep .p-button.p-button-danger .p-button-label{color:var(--tk-color-base-surface-0, #ffffff)!important}:host ::ng-deep .p-button.p-button-link .p-button-label{color:var(--tk-color-base-primary-500, #16006f)!important}:host ::ng-deep .p-button.p-button-link:hover .p-button-label{color:var(--tk-color-base-primary-400, #45338c)!important}:host ::ng-deep .p-button.p-button-secondary .p-button-label{color:var(--tk-color-base-surface-900, #191A1B)!important}:host ::ng-deep .p-button.p-button-secondary.p-button-outlined .p-button-label{color:var(--tk-color-base-surface-500, #8a8a8b)!important}:host ::ng-deep .p-button.p-button-secondary .p-button-label,:host ::ng-deep .p-button.p-button-danger .p-button-label{font-weight:var(--tk-font-weight-400, 400)}:host ::ng-deep p-button{display:inline-block}\n"] }]
|
|
103
|
+
args: [{ selector: 'tk-button', standalone: true, imports: [ButtonModule, IconComponent, Tooltip], template: "<p-button\n class=\"tk-button\"\n [label]=\"label\"\n [disabled]=\"disabled\"\n [type]=\"type\"\n [severity]=\"link ? null : severity\"\n [variant]=\"variant\"\n [link]=\"link\"\n [pTooltip]=\"tooltipText\"\n tooltipPosition=\"top\"\n (click)=\"onButtonClick()\"\n (keydown.enter)=\"onButtonClick()\"\n (keydown.space)=\"onButtonClick()\">\n\n @if (icon) {\n <tk-icon [icon]=\"icon\"></tk-icon>\n }\n</p-button>\n", styles: [":host ::ng-deep .p-button{min-width:var(--tk-size-base-250, 2.5rem)}:host ::ng-deep .p-button.p-button-primary .p-button-label,:host ::ng-deep .p-button.p-button-danger .p-button-label{color:var(--tk-color-base-surface-0, #ffffff)!important}:host ::ng-deep .p-button.p-button-link .p-button-label{color:var(--tk-color-base-primary-500, #16006f)!important}:host ::ng-deep .p-button.p-button-link:hover .p-button-label{color:var(--tk-color-base-primary-400, #45338c)!important}:host ::ng-deep .p-button.p-button-secondary .p-button-label{color:var(--tk-color-base-surface-900, #191A1B)!important}:host ::ng-deep .p-button.p-button-secondary.p-button-outlined .p-button-label{color:var(--tk-color-base-surface-500, #8a8a8b)!important}:host ::ng-deep .p-button.p-button-secondary .p-button-label,:host ::ng-deep .p-button.p-button-danger .p-button-label{font-weight:var(--tk-font-weight-400, 400)}:host ::ng-deep .p-button-label{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"] }]
|
|
104
104
|
}], propDecorators: { label: [{
|
|
105
105
|
type: Input
|
|
106
106
|
}], disabled: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tekus-design-system-components-button.mjs","sources":["../../../projects/design-system/components/button/src/button.component.ts","../../../projects/design-system/components/button/src/button.component.html","../../../projects/design-system/components/button/tekus-design-system-components-button.ts"],"sourcesContent":["import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { ButtonModule } from 'primeng/button';\nimport { IconComponent } from '@tekus/design-system/components/icon';\nimport { Tooltip } from 'primeng/tooltip';\n\n\nexport type ButtonSeverity = 'primary' | 'secondary' | 'danger';\nexport type Variant = 'text' | 'outlined';\n/**\n * @component ButtonComponent\n * @description\n * Atomic button component that provides a reusable and customizable button element\n * across the application.\n * It uses PrimeNG’s `ButtonModule` under the hood and allows setting different visual\n * variants (severity), button types, and disabled states.\n *\n * This component ensures consistent design and behavior in all button interactions.\n * It is accessible via both mouse clicks and keyboard actions (Enter/Space).\n *\n * @usage\n * ```html\n * <tk-button\n * label=\"Save\"\n * [severity]=\"'primary'\"\n * [type]=\"'submit'\"\n * (clicked)=\"handleSave()\">\n * </tk-button>\n *\n * <tk-button\n * label=\"Cancel\"\n * [severity]=\"'secondary'\"\n * [disabled]=\"true\">\n * </tk-button>\n * ```\n */\n@Component({\n selector: 'tk-button',\n standalone: true,\n imports: [ButtonModule, IconComponent, Tooltip],\n templateUrl: './button.component.html',\n styleUrls: ['./button.component.scss'],\n})\nexport class ButtonComponent {\n /**\n * @property {string} label\n * @description\n * Text displayed inside the button.\n *\n * @description\n * Text displayed inside the button.\n *\n * @default `undefined`\n */\n @Input() label?: string;\n\n /**\n * @property {boolean} disabled\n * @description\n * Disables the button, preventing user interaction and applying a visual style\n * that indicates the inactive state.\n *\n * @default `false`\n */\n @Input() disabled = false;\n\n /**\n * @property {'button' | 'submit'} type\n * @description\n * Defines the button’s HTML type attribute.\n * - `'button'`: Standard clickable button (default).\n * - `'submit'`: Used to submit forms.\n *\n * @default `'button'`\n */\n @Input() type: 'button' | 'submit' = 'button';\n\n /**\n * @property {ButtonSeverity} severity\n * @description\n * Defines the visual importance or style of the button.\n * - `'primary'`: Default, neutral action.\n * - `'secondary'`: Secondary option.\n * - `'danger'`: Destructive or warning actions.\n *\n * @default `'secondary'`\n */\n @Input() severity: ButtonSeverity = 'primary';\n\n /**\n * @property {'text' | 'outlined'} variant\n * @description\n * Defines the variant of the button.\n * - `'text'`: Text-only button.\n * - `'outlined'`: Outlined button.\n *\n * @default `undefined`\n */\n @Input() variant?: Variant;\n\n /**\n * @property {boolean} link\n * @description\n * When true, the button will be styled as a link (text only with underline).\n *\n * @default false\n */\n @Input() link = false;\n\n /**\n * @property {string} icon\n * @description\n * - If `label` is provided, the icon is displayed to the left.\n * - If `label` is empty, the button is rendered as an icon-only button.\n *\n * @default `undefined`\n */\n @Input() icon?: string;\n\n /**\n * @event clicked\n * @description\n * Emits when the button is activated via click or keyboard (Enter/Space),\n * unless the button is disabled.\n *\n * @example\n * ```html\n * <tk-button label=\"Click me\" (clicked)=\"handleClick()\"></tk-button>\n * ```\n */\n @Output() clicked = new EventEmitter<'mouse' | 'keyboard'>();\n\n /**\n * @property {string} tooltipText\n * @description\n * Tooltip text to be displayed when the user hovers over the button.\n *\n * @default `undefined`\n */\n @Input() tooltipText?: string;\n\n /**\n * @method onButtonClick\n * @description\n * Handles the native click event. Emits the `clicked` event if the button\n * is not disabled.\n */\n onButtonClick(): void {\n if (!this.disabled) this.clicked.emit('mouse');\n }\n}\n","<p-button\n class=\"tk-button\"\n [label]=\"label\"\n [disabled]=\"disabled\"\n [type]=\"type\"\n [severity]=\"link ? null : severity\"\n [variant]=\"variant\"\n [link]=\"link\"\n [pTooltip]=\"tooltipText\"\n tooltipPosition=\"top\"\n (click)=\"onButtonClick()\"\n (keydown.enter)=\"onButtonClick()\"\n (keydown.space)=\"onButtonClick()\">\n\n @if (icon) {\n <tk-icon [icon]=\"icon\"></tk-icon>\n }\n</p-button>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BG;MAQU,eAAe,CAAA;AAP5B,IAAA,WAAA,GAAA;AAoBE;;;;;;;AAOG;QACM,IAAQ,CAAA,QAAA,GAAG,KAAK;AAEzB;;;;;;;;AAQG;QACM,IAAI,CAAA,IAAA,GAAwB,QAAQ;AAE7C;;;;;;;;;AASG;QACM,IAAQ,CAAA,QAAA,GAAmB,SAAS;AAa7C;;;;;;AAMG;QACM,IAAI,CAAA,IAAA,GAAG,KAAK;AAYrB;;;;;;;;;;AAUG;AACO,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,YAAY,EAAwB;AAoB7D;AATC;;;;;AAKG;IACH,aAAa,GAAA;QACX,IAAI,CAAC,IAAI,CAAC,QAAQ;AAAE,YAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;;+GAzGrC,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,eAAe,wQC1C5B,+aAkBA,EAAA,MAAA,EAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"tekus-design-system-components-button.mjs","sources":["../../../projects/design-system/components/button/src/button.component.ts","../../../projects/design-system/components/button/src/button.component.html","../../../projects/design-system/components/button/tekus-design-system-components-button.ts"],"sourcesContent":["import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { ButtonModule } from 'primeng/button';\nimport { IconComponent } from '@tekus/design-system/components/icon';\nimport { Tooltip } from 'primeng/tooltip';\n\n\nexport type ButtonSeverity = 'primary' | 'secondary' | 'danger';\nexport type Variant = 'text' | 'outlined';\n/**\n * @component ButtonComponent\n * @description\n * Atomic button component that provides a reusable and customizable button element\n * across the application.\n * It uses PrimeNG’s `ButtonModule` under the hood and allows setting different visual\n * variants (severity), button types, and disabled states.\n *\n * This component ensures consistent design and behavior in all button interactions.\n * It is accessible via both mouse clicks and keyboard actions (Enter/Space).\n *\n * @usage\n * ```html\n * <tk-button\n * label=\"Save\"\n * [severity]=\"'primary'\"\n * [type]=\"'submit'\"\n * (clicked)=\"handleSave()\">\n * </tk-button>\n *\n * <tk-button\n * label=\"Cancel\"\n * [severity]=\"'secondary'\"\n * [disabled]=\"true\">\n * </tk-button>\n * ```\n */\n@Component({\n selector: 'tk-button',\n standalone: true,\n imports: [ButtonModule, IconComponent, Tooltip],\n templateUrl: './button.component.html',\n styleUrls: ['./button.component.scss'],\n})\nexport class ButtonComponent {\n /**\n * @property {string} label\n * @description\n * Text displayed inside the button.\n *\n * @description\n * Text displayed inside the button.\n *\n * @default `undefined`\n */\n @Input() label?: string;\n\n /**\n * @property {boolean} disabled\n * @description\n * Disables the button, preventing user interaction and applying a visual style\n * that indicates the inactive state.\n *\n * @default `false`\n */\n @Input() disabled = false;\n\n /**\n * @property {'button' | 'submit'} type\n * @description\n * Defines the button’s HTML type attribute.\n * - `'button'`: Standard clickable button (default).\n * - `'submit'`: Used to submit forms.\n *\n * @default `'button'`\n */\n @Input() type: 'button' | 'submit' = 'button';\n\n /**\n * @property {ButtonSeverity} severity\n * @description\n * Defines the visual importance or style of the button.\n * - `'primary'`: Default, neutral action.\n * - `'secondary'`: Secondary option.\n * - `'danger'`: Destructive or warning actions.\n *\n * @default `'secondary'`\n */\n @Input() severity: ButtonSeverity = 'primary';\n\n /**\n * @property {'text' | 'outlined'} variant\n * @description\n * Defines the variant of the button.\n * - `'text'`: Text-only button.\n * - `'outlined'`: Outlined button.\n *\n * @default `undefined`\n */\n @Input() variant?: Variant;\n\n /**\n * @property {boolean} link\n * @description\n * When true, the button will be styled as a link (text only with underline).\n *\n * @default false\n */\n @Input() link = false;\n\n /**\n * @property {string} icon\n * @description\n * - If `label` is provided, the icon is displayed to the left.\n * - If `label` is empty, the button is rendered as an icon-only button.\n *\n * @default `undefined`\n */\n @Input() icon?: string;\n\n /**\n * @event clicked\n * @description\n * Emits when the button is activated via click or keyboard (Enter/Space),\n * unless the button is disabled.\n *\n * @example\n * ```html\n * <tk-button label=\"Click me\" (clicked)=\"handleClick()\"></tk-button>\n * ```\n */\n @Output() clicked = new EventEmitter<'mouse' | 'keyboard'>();\n\n /**\n * @property {string} tooltipText\n * @description\n * Tooltip text to be displayed when the user hovers over the button.\n *\n * @default `undefined`\n */\n @Input() tooltipText?: string;\n\n /**\n * @method onButtonClick\n * @description\n * Handles the native click event. Emits the `clicked` event if the button\n * is not disabled.\n */\n onButtonClick(): void {\n if (!this.disabled) this.clicked.emit('mouse');\n }\n}\n","<p-button\n class=\"tk-button\"\n [label]=\"label\"\n [disabled]=\"disabled\"\n [type]=\"type\"\n [severity]=\"link ? null : severity\"\n [variant]=\"variant\"\n [link]=\"link\"\n [pTooltip]=\"tooltipText\"\n tooltipPosition=\"top\"\n (click)=\"onButtonClick()\"\n (keydown.enter)=\"onButtonClick()\"\n (keydown.space)=\"onButtonClick()\">\n\n @if (icon) {\n <tk-icon [icon]=\"icon\"></tk-icon>\n }\n</p-button>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BG;MAQU,eAAe,CAAA;AAP5B,IAAA,WAAA,GAAA;AAoBE;;;;;;;AAOG;QACM,IAAQ,CAAA,QAAA,GAAG,KAAK;AAEzB;;;;;;;;AAQG;QACM,IAAI,CAAA,IAAA,GAAwB,QAAQ;AAE7C;;;;;;;;;AASG;QACM,IAAQ,CAAA,QAAA,GAAmB,SAAS;AAa7C;;;;;;AAMG;QACM,IAAI,CAAA,IAAA,GAAG,KAAK;AAYrB;;;;;;;;;;AAUG;AACO,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,YAAY,EAAwB;AAoB7D;AATC;;;;;AAKG;IACH,aAAa,GAAA;QACX,IAAI,CAAC,IAAI,CAAC,QAAQ;AAAE,YAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;;+GAzGrC,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,Q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,EAAA,CAAA,+/BAAA,CAAA,EAAA;8BAetC,KAAK,EAAA,CAAA;sBAAb;gBAUQ,QAAQ,EAAA,CAAA;sBAAhB;gBAWQ,IAAI,EAAA,CAAA;sBAAZ;gBAYQ,QAAQ,EAAA,CAAA;sBAAhB;gBAWQ,OAAO,EAAA,CAAA;sBAAf;gBASQ,IAAI,EAAA,CAAA;sBAAZ;gBAUQ,IAAI,EAAA,CAAA;sBAAZ;gBAaS,OAAO,EAAA,CAAA;sBAAhB;gBASQ,WAAW,EAAA,CAAA;sBAAnB;;;AE1IH;;AAEG;;;;"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, Component } from '@angular/core';
|
|
3
|
+
import { ButtonComponent } from '@tekus/design-system/components/button';
|
|
4
|
+
import { TagComponent } from '@tekus/design-system/components/tag';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @component TopbarComponent
|
|
8
|
+
* @description
|
|
9
|
+
* Layout component that renders a title with optional actions and metadata.
|
|
10
|
+
* It composes `tk-button` and `tk-tag` and uses only design tokens for styles.
|
|
11
|
+
*/
|
|
12
|
+
class TopbarComponent {
|
|
13
|
+
constructor() {
|
|
14
|
+
/** Main title text for the topbar. */
|
|
15
|
+
this.title = input.required();
|
|
16
|
+
/** Optional list of actions displayed in the header. */
|
|
17
|
+
this.actions = input(null);
|
|
18
|
+
/** Optional list of tags displayed in the meta section. */
|
|
19
|
+
this.tags = input(null);
|
|
20
|
+
/** Optional description displayed in the meta section. */
|
|
21
|
+
this.description = input(null);
|
|
22
|
+
}
|
|
23
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TopbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: TopbarComponent, isStandalone: true, selector: "tk-topbar", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, tags: { classPropertyName: "tags", publicName: "tags", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"tk-topbar\">\n <div class=\"tk-topbar__header\">\n <h2 class=\"tk-topbar__title\">{{ title() }}</h2>\n\n @if (actions()?.length) {\n <div class=\"tk-topbar__actions\">\n @for (action of actions(); track $index) {\n @if (action.type === 'primary') {\n <tk-button\n [label]=\"action.label\"\n severity=\"primary\"\n [tooltipText]=\"action.tooltipText\"\n (clicked)=\"action.onClick()\">\n </tk-button>\n } @else {\n <tk-button\n [icon]=\"action.icon\"\n severity=\"secondary\"\n [tooltipText]=\"action.tooltipText\"\n (clicked)=\"action.onClick()\">\n </tk-button>\n }\n }\n </div>\n }\n </div>\n\n @if (tags()?.length || description()) {\n <div class=\"tk-topbar__meta\">\n @if (tags()?.length) {\n <div class=\"tk-topbar__tags\">\n @for (tag of tags(); track $index) {\n <tk-tag\n [value]=\"tag.label\"\n [severity]=\"tag.variant ?? 'secondary'\"></tk-tag>\n }\n </div>\n }\n @if (description()) {\n <p class=\"tk-topbar__description\">{{ description() }}</p>\n }\n </div>\n }\n</div>\n", styles: [".tk-topbar{display:flex;flex-direction:column;gap:var(--tk-spacing-gap-s, .25rem);padding:var(--tk-spacing-paddingY-m, 1rem) var(--tk-spacing-paddingX-m, 1rem);background:var(--tk-color-background-soft, #f2f1f1);border-radius:var(--tk-borderRadius-s, .5rem)}.tk-topbar__header{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:var(--tk-spacing-gap-m, 1rem);width:100%}.tk-topbar__title{margin:0;flex:1 1 auto;min-width:12.5rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--tk-font-size-headers-l, 2rem);font-weight:var(--tk-font-weight-600, 600);color:var(--tk-color-text-default, #191a1b)}.tk-topbar__actions{display:flex;align-items:center;gap:var(--tk-spacing-gap-s, .25rem);margin-left:auto}@media (max-width: 768px){.tk-topbar__header{flex-wrap:wrap}.tk-topbar__actions{width:100%;margin-left:0}}.tk-topbar__meta{display:flex;align-items:center;gap:var(--tk-spacing-gap-m, 1rem);width:100%}.tk-topbar__tags{display:flex;align-items:center;gap:var(--tk-spacing-gap-s, .25rem)}.tk-topbar__description{margin:0;font-size:var(--tk-font-size-paragraph-s, .875rem);font-weight:var(--tk-font-weight-400, 400);color:var(--tk-color-text-default, #191a1b)}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "tk-button", inputs: ["label", "disabled", "type", "severity", "variant", "link", "icon", "tooltipText"], outputs: ["clicked"] }, { kind: "component", type: TagComponent, selector: "tk-tag", inputs: ["value", "severity", "truncationLimit"] }] }); }
|
|
25
|
+
}
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TopbarComponent, decorators: [{
|
|
27
|
+
type: Component,
|
|
28
|
+
args: [{ selector: 'tk-topbar', standalone: true, imports: [ButtonComponent, TagComponent], template: "<div class=\"tk-topbar\">\n <div class=\"tk-topbar__header\">\n <h2 class=\"tk-topbar__title\">{{ title() }}</h2>\n\n @if (actions()?.length) {\n <div class=\"tk-topbar__actions\">\n @for (action of actions(); track $index) {\n @if (action.type === 'primary') {\n <tk-button\n [label]=\"action.label\"\n severity=\"primary\"\n [tooltipText]=\"action.tooltipText\"\n (clicked)=\"action.onClick()\">\n </tk-button>\n } @else {\n <tk-button\n [icon]=\"action.icon\"\n severity=\"secondary\"\n [tooltipText]=\"action.tooltipText\"\n (clicked)=\"action.onClick()\">\n </tk-button>\n }\n }\n </div>\n }\n </div>\n\n @if (tags()?.length || description()) {\n <div class=\"tk-topbar__meta\">\n @if (tags()?.length) {\n <div class=\"tk-topbar__tags\">\n @for (tag of tags(); track $index) {\n <tk-tag\n [value]=\"tag.label\"\n [severity]=\"tag.variant ?? 'secondary'\"></tk-tag>\n }\n </div>\n }\n @if (description()) {\n <p class=\"tk-topbar__description\">{{ description() }}</p>\n }\n </div>\n }\n</div>\n", styles: [".tk-topbar{display:flex;flex-direction:column;gap:var(--tk-spacing-gap-s, .25rem);padding:var(--tk-spacing-paddingY-m, 1rem) var(--tk-spacing-paddingX-m, 1rem);background:var(--tk-color-background-soft, #f2f1f1);border-radius:var(--tk-borderRadius-s, .5rem)}.tk-topbar__header{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:var(--tk-spacing-gap-m, 1rem);width:100%}.tk-topbar__title{margin:0;flex:1 1 auto;min-width:12.5rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--tk-font-size-headers-l, 2rem);font-weight:var(--tk-font-weight-600, 600);color:var(--tk-color-text-default, #191a1b)}.tk-topbar__actions{display:flex;align-items:center;gap:var(--tk-spacing-gap-s, .25rem);margin-left:auto}@media (max-width: 768px){.tk-topbar__header{flex-wrap:wrap}.tk-topbar__actions{width:100%;margin-left:0}}.tk-topbar__meta{display:flex;align-items:center;gap:var(--tk-spacing-gap-m, 1rem);width:100%}.tk-topbar__tags{display:flex;align-items:center;gap:var(--tk-spacing-gap-s, .25rem)}.tk-topbar__description{margin:0;font-size:var(--tk-font-size-paragraph-s, .875rem);font-weight:var(--tk-font-weight-400, 400);color:var(--tk-color-text-default, #191a1b)}\n"] }]
|
|
29
|
+
}] });
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Generated bundle index. Do not edit.
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
export { TopbarComponent };
|
|
36
|
+
//# sourceMappingURL=tekus-design-system-components-topbar.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tekus-design-system-components-topbar.mjs","sources":["../../../projects/design-system/components/topbar/src/topbar.component.ts","../../../projects/design-system/components/topbar/src/topbar.component.html","../../../projects/design-system/components/topbar/tekus-design-system-components-topbar.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport { ButtonComponent } from '@tekus/design-system/components/button';\nimport { TagComponent } from '@tekus/design-system/components/tag';\nimport { TopbarAction, TopbarTag } from './topbar.types';\n\n/**\n * @component TopbarComponent\n * @description\n * Layout component that renders a title with optional actions and metadata.\n * It composes `tk-button` and `tk-tag` and uses only design tokens for styles.\n */\n@Component({\n selector: 'tk-topbar',\n standalone: true,\n imports: [ButtonComponent, TagComponent],\n templateUrl: './topbar.component.html',\n styleUrl: './topbar.component.scss',\n})\nexport class TopbarComponent {\n /** Main title text for the topbar. */\n title = input.required<string>();\n\n /** Optional list of actions displayed in the header. */\n actions = input<TopbarAction[] | null>(null);\n\n /** Optional list of tags displayed in the meta section. */\n tags = input<TopbarTag[] | null>(null);\n\n /** Optional description displayed in the meta section. */\n description = input<string | null>(null);\n}\n","<div class=\"tk-topbar\">\n <div class=\"tk-topbar__header\">\n <h2 class=\"tk-topbar__title\">{{ title() }}</h2>\n\n @if (actions()?.length) {\n <div class=\"tk-topbar__actions\">\n @for (action of actions(); track $index) {\n @if (action.type === 'primary') {\n <tk-button\n [label]=\"action.label\"\n severity=\"primary\"\n [tooltipText]=\"action.tooltipText\"\n (clicked)=\"action.onClick()\">\n </tk-button>\n } @else {\n <tk-button\n [icon]=\"action.icon\"\n severity=\"secondary\"\n [tooltipText]=\"action.tooltipText\"\n (clicked)=\"action.onClick()\">\n </tk-button>\n }\n }\n </div>\n }\n </div>\n\n @if (tags()?.length || description()) {\n <div class=\"tk-topbar__meta\">\n @if (tags()?.length) {\n <div class=\"tk-topbar__tags\">\n @for (tag of tags(); track $index) {\n <tk-tag\n [value]=\"tag.label\"\n [severity]=\"tag.variant ?? 'secondary'\"></tk-tag>\n }\n </div>\n }\n @if (description()) {\n <p class=\"tk-topbar__description\">{{ description() }}</p>\n }\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],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A,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,mrCA4CA,ED9BY,MAAA,EAAA,CAAA,gsCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,eAAe,yKAAE,YAAY,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,UAAA,EAAA,iBAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAI5B,eAAe,EAAA,UAAA,EAAA,CAAA;kBAP3B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,cACT,IAAI,EAAA,OAAA,EACP,CAAC,eAAe,EAAE,YAAY,CAAC,EAAA,QAAA,EAAA,mrCAAA,EAAA,MAAA,EAAA,CAAA,gsCAAA,CAAA,EAAA;;;AEd1C;;AAEG;;;;"}
|
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.18.0",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"peerDependencies": {
|
|
7
7
|
"@angular/core": "^19.2.15",
|
|
@@ -95,14 +95,14 @@
|
|
|
95
95
|
"types": "./components/select/index.d.ts",
|
|
96
96
|
"default": "./fesm2022/tekus-design-system-components-select.mjs"
|
|
97
97
|
},
|
|
98
|
-
"./components/tabs": {
|
|
99
|
-
"types": "./components/tabs/index.d.ts",
|
|
100
|
-
"default": "./fesm2022/tekus-design-system-components-tabs.mjs"
|
|
101
|
-
},
|
|
102
98
|
"./components/table": {
|
|
103
99
|
"types": "./components/table/index.d.ts",
|
|
104
100
|
"default": "./fesm2022/tekus-design-system-components-table.mjs"
|
|
105
101
|
},
|
|
102
|
+
"./components/tabs": {
|
|
103
|
+
"types": "./components/tabs/index.d.ts",
|
|
104
|
+
"default": "./fesm2022/tekus-design-system-components-tabs.mjs"
|
|
105
|
+
},
|
|
106
106
|
"./components/tag": {
|
|
107
107
|
"types": "./components/tag/index.d.ts",
|
|
108
108
|
"default": "./fesm2022/tekus-design-system-components-tag.mjs"
|
|
@@ -119,14 +119,18 @@
|
|
|
119
119
|
"types": "./components/tooltip/index.d.ts",
|
|
120
120
|
"default": "./fesm2022/tekus-design-system-components-tooltip.mjs"
|
|
121
121
|
},
|
|
122
|
-
"./
|
|
123
|
-
"types": "./
|
|
124
|
-
"default": "./fesm2022/tekus-design-system-
|
|
122
|
+
"./components/topbar": {
|
|
123
|
+
"types": "./components/topbar/index.d.ts",
|
|
124
|
+
"default": "./fesm2022/tekus-design-system-components-topbar.mjs"
|
|
125
125
|
},
|
|
126
126
|
"./directives/gird-item": {
|
|
127
127
|
"types": "./directives/gird-item/index.d.ts",
|
|
128
128
|
"default": "./fesm2022/tekus-design-system-directives-gird-item.mjs"
|
|
129
129
|
},
|
|
130
|
+
"./core/types": {
|
|
131
|
+
"types": "./core/types/index.d.ts",
|
|
132
|
+
"default": "./fesm2022/tekus-design-system-core-types.mjs"
|
|
133
|
+
},
|
|
130
134
|
"./utils/sanitizer-utils": {
|
|
131
135
|
"types": "./utils/sanitizer-utils/index.d.ts",
|
|
132
136
|
"default": "./fesm2022/tekus-design-system-utils-sanitizer-utils.mjs"
|
package/styles/variables.css
CHANGED
|
@@ -139,8 +139,8 @@
|
|
|
139
139
|
--tk-spacing-gap-l: var(--tk-spacing-base-150);
|
|
140
140
|
--tk-spacing-gap-xl: var(--tk-spacing-base-250);
|
|
141
141
|
--tk-font-family: Poppins;
|
|
142
|
-
--tk-font-weight-400:
|
|
143
|
-
--tk-font-weight-600:
|
|
142
|
+
--tk-font-weight-400: 400;
|
|
143
|
+
--tk-font-weight-600: 600;
|
|
144
144
|
--tk-font-size-base-63: 0.625rem;
|
|
145
145
|
--tk-font-size-base-75: 0.75rem;
|
|
146
146
|
--tk-font-size-base-88: 0.875rem;
|