@tekus/design-system 5.5.0 → 5.6.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.
@@ -0,0 +1,126 @@
1
+ import * as i0 from '@angular/core';
2
+ import { model, signal, input, Component } from '@angular/core';
3
+ import { ButtonComponent } from '@tekus/design-system/components/button';
4
+ import { SelectComponent } from '@tekus/design-system/components/select';
5
+ import { InputTextComponent } from '@tekus/design-system/components/input-text';
6
+
7
+ class ToolbarComponent {
8
+ constructor() {
9
+ /**
10
+ * @property {ModelSignal<string>} searchModel
11
+ * @description
12
+ * Two-way bindable signal for the search input value.
13
+ * Supports [(searchModel)]="variable" syntax for two-way binding.
14
+ * @default ''
15
+ */
16
+ this.searchModel = model('');
17
+ /**
18
+ * @property {ModelSignal<Record<string, string> | null>} filterModel
19
+ * @description
20
+ * Two-way bindable signal for the filter select value.
21
+ * Supports [(filterModel)]="variable" syntax for two-way binding.
22
+ * @default null
23
+ */
24
+ this.filterModel = model(null);
25
+ /**
26
+ * @property {WritableSignal<boolean>} showSearchInput
27
+ * @description
28
+ * Controls the visibility of the search input. Toggles when the search button is clicked.
29
+ * @default false
30
+ */
31
+ this.showSearchInput = signal(false);
32
+ /**
33
+ * @property {WritableSignal<boolean>} showFilterSelect
34
+ * @description
35
+ * Controls the visibility of the filter select. Toggles when the filter button is clicked.
36
+ * @default false
37
+ */
38
+ this.showFilterSelect = signal(false);
39
+ /**
40
+ * @property {InputSignal<Array<{ label: string; value: string }>>} filterOptions
41
+ * @description
42
+ * Array of options available in the filter select dropdown.
43
+ * Each option is an object with `label` (displayed text) and `value` (internal identifier).
44
+ *
45
+ * @default
46
+ * [
47
+ * { label: 'Option 1', value: 'option1' },
48
+ * { label: 'Option 2', value: 'option2' },
49
+ * { label: 'Option 3', value: 'option3' }
50
+ * ]
51
+ */
52
+ this.filterOptions = input([
53
+ { label: 'Option 1', value: 'option1' },
54
+ { label: 'Option 2', value: 'option2' },
55
+ { label: 'Option 3', value: 'option3' },
56
+ ]);
57
+ /**
58
+ * @property {InputSignal<string>} filterOptionLabel
59
+ * @description
60
+ * Property name used to display the label in the select dropdown options.
61
+ * This corresponds to the key in each option object that contains the display text.
62
+ *
63
+ * @default 'label'
64
+ */
65
+ this.filterOptionLabel = input('label');
66
+ /**
67
+ * @property {InputSignal<string>} filterFloatLabel
68
+ * @description
69
+ * Label text displayed above the filter select input using the FloatLabel wrapper.
70
+ * This is the placeholder/label that floats when the select is focused or has a value.
71
+ *
72
+ * @default 'Filtrar'
73
+ */
74
+ this.filterFloatLabel = input('Filtrar');
75
+ /**
76
+ * @property {InputSignal<string>} searchFloatLabel
77
+ * @description
78
+ * Label text displayed above the search input using the FloatLabel wrapper.
79
+ * This is the placeholder/label that floats when the search input is focused or has a value.
80
+ *
81
+ * @default 'Buscar'
82
+ */
83
+ this.searchFloatLabel = input('Buscar');
84
+ }
85
+ /**
86
+ * @method toggleSearchInput
87
+ * @description
88
+ * Toggles the visibility of the search input field.
89
+ */
90
+ toggleSearchInput() {
91
+ this.showSearchInput.update(value => !value);
92
+ this.searchModel.set('');
93
+ }
94
+ /**
95
+ * @method toggleFilterSelect
96
+ * @description
97
+ * Toggles the visibility of the filter select dropdown.
98
+ */
99
+ toggleFilterSelect() {
100
+ this.showFilterSelect.update(value => !value);
101
+ this.filterModel.set(null);
102
+ }
103
+ /**
104
+ * @method onSelectedOption
105
+ * @description
106
+ * Handles filter select changes and updates the filterModel signal.
107
+ *
108
+ * @param value - Selected option value from tk-select
109
+ */
110
+ onSelectedOption(value) {
111
+ this.filterModel.set(value);
112
+ }
113
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
114
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: ToolbarComponent, isStandalone: true, selector: "tk-toolbar", inputs: { searchModel: { classPropertyName: "searchModel", publicName: "searchModel", isSignal: true, isRequired: false, transformFunction: null }, filterModel: { classPropertyName: "filterModel", publicName: "filterModel", isSignal: true, isRequired: false, transformFunction: null }, filterOptions: { classPropertyName: "filterOptions", publicName: "filterOptions", isSignal: true, isRequired: false, transformFunction: null }, filterOptionLabel: { classPropertyName: "filterOptionLabel", publicName: "filterOptionLabel", isSignal: true, isRequired: false, transformFunction: null }, filterFloatLabel: { classPropertyName: "filterFloatLabel", publicName: "filterFloatLabel", isSignal: true, isRequired: false, transformFunction: null }, searchFloatLabel: { classPropertyName: "searchFloatLabel", publicName: "searchFloatLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchModel: "searchModelChange", filterModel: "filterModelChange" }, ngImport: i0, template: "<div class=\"toolbar\">\n @if (showSearchInput()) {\n <div class=\"toolbar__input-container\">\n <tk-input-text\n [label]=\"searchFloatLabel()\"\n icon=\"magnifying-glass\"\n [clearable]=\"true\"\n [value]=\"searchModel()\"\n (valueChange)=\"searchModel.set($event)\">\n </tk-input-text>\n </div>\n } @if (showFilterSelect()) {\n <div class=\"toolbar__input-container\">\n <tk-select\n [options]=\"filterOptions()\"\n [optionLabel]=\"filterOptionLabel()\"\n [label]=\"filterFloatLabel()\"\n (modelChange)=\"onSelectedOption($event ?? null)\">\n </tk-select>\n </div>\n } @if (searchModel() !== undefined) {\n <tk-button\n [icon]=\"'magnifying-glass'\"\n severity=\"secondary\"\n [variant]=\"!showSearchInput() ? 'outlined' : undefined\"\n (clicked)=\"toggleSearchInput()\">\n </tk-button>\n } @if (filterModel() !== undefined) {\n <tk-button\n [icon]=\"'filter'\"\n severity=\"secondary\"\n [variant]=\"!showFilterSelect() ? 'outlined' : undefined\"\n (clicked)=\"toggleFilterSelect()\">\n </tk-button>\n }\n</div>\n", styles: [".toolbar{display:flex;align-items:flex-end;justify-content:center;flex-wrap:wrap;gap:var(--tk-spacing-base-50, .5rem);row-gap:var(--tk-spacing-base-150, 1.5rem)}.toolbar__input-container{width:15rem}@media (max-width: 768px){.toolbar{justify-content:flex-start}}:host ::ng-deep .tk-input-bottom{display:none}:host ::ng-deep .p-button-outlined{border:1px solid transparent!important}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "tk-button", inputs: ["label", "disabled", "type", "severity", "variant", "link", "icon"], outputs: ["clicked"] }, { kind: "component", type: InputTextComponent, selector: "tk-input-text", inputs: ["value", "control", "label", "type", "id", "icon", "clearable", "errorMessage", "hint", "maxLength"], outputs: ["valueChange"] }, { kind: "component", type: SelectComponent, selector: "tk-select", inputs: ["id", "options", "optionLabel", "label", "showClear", "disabled", "model"], outputs: ["modelChange"] }] }); }
115
+ }
116
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ToolbarComponent, decorators: [{
117
+ type: Component,
118
+ args: [{ selector: 'tk-toolbar', imports: [ButtonComponent, InputTextComponent, SelectComponent], template: "<div class=\"toolbar\">\n @if (showSearchInput()) {\n <div class=\"toolbar__input-container\">\n <tk-input-text\n [label]=\"searchFloatLabel()\"\n icon=\"magnifying-glass\"\n [clearable]=\"true\"\n [value]=\"searchModel()\"\n (valueChange)=\"searchModel.set($event)\">\n </tk-input-text>\n </div>\n } @if (showFilterSelect()) {\n <div class=\"toolbar__input-container\">\n <tk-select\n [options]=\"filterOptions()\"\n [optionLabel]=\"filterOptionLabel()\"\n [label]=\"filterFloatLabel()\"\n (modelChange)=\"onSelectedOption($event ?? null)\">\n </tk-select>\n </div>\n } @if (searchModel() !== undefined) {\n <tk-button\n [icon]=\"'magnifying-glass'\"\n severity=\"secondary\"\n [variant]=\"!showSearchInput() ? 'outlined' : undefined\"\n (clicked)=\"toggleSearchInput()\">\n </tk-button>\n } @if (filterModel() !== undefined) {\n <tk-button\n [icon]=\"'filter'\"\n severity=\"secondary\"\n [variant]=\"!showFilterSelect() ? 'outlined' : undefined\"\n (clicked)=\"toggleFilterSelect()\">\n </tk-button>\n }\n</div>\n", styles: [".toolbar{display:flex;align-items:flex-end;justify-content:center;flex-wrap:wrap;gap:var(--tk-spacing-base-50, .5rem);row-gap:var(--tk-spacing-base-150, 1.5rem)}.toolbar__input-container{width:15rem}@media (max-width: 768px){.toolbar{justify-content:flex-start}}:host ::ng-deep .tk-input-bottom{display:none}:host ::ng-deep .p-button-outlined{border:1px solid transparent!important}\n"] }]
119
+ }] });
120
+
121
+ /**
122
+ * Generated bundle index. Do not edit.
123
+ */
124
+
125
+ export { ToolbarComponent };
126
+ //# sourceMappingURL=tekus-design-system-components-toolbar.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tekus-design-system-components-toolbar.mjs","sources":["../../../projects/design-system/components/toolbar/src/toolbar.component.ts","../../../projects/design-system/components/toolbar/src/toolbar.component.html","../../../projects/design-system/components/toolbar/tekus-design-system-components-toolbar.ts"],"sourcesContent":["import { Component, model, signal, input } from '@angular/core';\nimport { ButtonComponent } from '@tekus/design-system/components/button';\nimport { SelectComponent } from '@tekus/design-system/components/select';\nimport { InputTextComponent } from '@tekus/design-system/components/input-text';\n\n@Component({\n selector: 'tk-toolbar',\n imports: [ButtonComponent, InputTextComponent, SelectComponent],\n templateUrl: './toolbar.component.html',\n styleUrl: './toolbar.component.scss',\n})\nexport class ToolbarComponent {\n /**\n * @property {ModelSignal<string>} searchModel\n * @description\n * Two-way bindable signal for the search input value.\n * Supports [(searchModel)]=\"variable\" syntax for two-way binding.\n * @default ''\n */\n searchModel = model<string>('');\n\n /**\n * @property {ModelSignal<Record<string, string> | null>} filterModel\n * @description\n * Two-way bindable signal for the filter select value.\n * Supports [(filterModel)]=\"variable\" syntax for two-way binding.\n * @default null\n */\n filterModel = model<Record<string, string> | null>(null);\n\n /**\n * @property {WritableSignal<boolean>} showSearchInput\n * @description\n * Controls the visibility of the search input. Toggles when the search button is clicked.\n * @default false\n */\n showSearchInput = signal<boolean>(false);\n\n /**\n * @property {WritableSignal<boolean>} showFilterSelect\n * @description\n * Controls the visibility of the filter select. Toggles when the filter button is clicked.\n * @default false\n */\n showFilterSelect = signal<boolean>(false);\n\n /**\n * @property {InputSignal<Array<{ label: string; value: string }>>} filterOptions\n * @description\n * Array of options available in the filter select dropdown.\n * Each option is an object with `label` (displayed text) and `value` (internal identifier).\n *\n * @default\n * [\n * { label: 'Option 1', value: 'option1' },\n * { label: 'Option 2', value: 'option2' },\n * { label: 'Option 3', value: 'option3' }\n * ]\n */\n filterOptions = input<Array<{ label: string; value: string }>>([\n { label: 'Option 1', value: 'option1' },\n { label: 'Option 2', value: 'option2' },\n { label: 'Option 3', value: 'option3' },\n ]);\n\n /**\n * @property {InputSignal<string>} filterOptionLabel\n * @description\n * Property name used to display the label in the select dropdown options.\n * This corresponds to the key in each option object that contains the display text.\n *\n * @default 'label'\n */\n filterOptionLabel = input<string>('label');\n\n /**\n * @property {InputSignal<string>} filterFloatLabel\n * @description\n * Label text displayed above the filter select input using the FloatLabel wrapper.\n * This is the placeholder/label that floats when the select is focused or has a value.\n *\n * @default 'Filtrar'\n */\n filterFloatLabel = input<string>('Filtrar');\n\n /**\n * @property {InputSignal<string>} searchFloatLabel\n * @description\n * Label text displayed above the search input using the FloatLabel wrapper.\n * This is the placeholder/label that floats when the search input is focused or has a value.\n *\n * @default 'Buscar'\n */\n searchFloatLabel = input<string>('Buscar');\n\n /**\n * @method toggleSearchInput\n * @description\n * Toggles the visibility of the search input field.\n */\n toggleSearchInput(): void {\n this.showSearchInput.update(value => !value);\n this.searchModel.set('');\n }\n\n /**\n * @method toggleFilterSelect\n * @description\n * Toggles the visibility of the filter select dropdown.\n */\n toggleFilterSelect(): void {\n this.showFilterSelect.update(value => !value);\n this.filterModel.set(null);\n }\n\n /**\n * @method onSelectedOption\n * @description\n * Handles filter select changes and updates the filterModel signal.\n *\n * @param value - Selected option value from tk-select\n */\n onSelectedOption(value: Record<string, string> | null): void {\n this.filterModel.set(value);\n }\n}\n","<div class=\"toolbar\">\n @if (showSearchInput()) {\n <div class=\"toolbar__input-container\">\n <tk-input-text\n [label]=\"searchFloatLabel()\"\n icon=\"magnifying-glass\"\n [clearable]=\"true\"\n [value]=\"searchModel()\"\n (valueChange)=\"searchModel.set($event)\">\n </tk-input-text>\n </div>\n } @if (showFilterSelect()) {\n <div class=\"toolbar__input-container\">\n <tk-select\n [options]=\"filterOptions()\"\n [optionLabel]=\"filterOptionLabel()\"\n [label]=\"filterFloatLabel()\"\n (modelChange)=\"onSelectedOption($event ?? null)\">\n </tk-select>\n </div>\n } @if (searchModel() !== undefined) {\n <tk-button\n [icon]=\"'magnifying-glass'\"\n severity=\"secondary\"\n [variant]=\"!showSearchInput() ? 'outlined' : undefined\"\n (clicked)=\"toggleSearchInput()\">\n </tk-button>\n } @if (filterModel() !== undefined) {\n <tk-button\n [icon]=\"'filter'\"\n severity=\"secondary\"\n [variant]=\"!showFilterSelect() ? 'outlined' : undefined\"\n (clicked)=\"toggleFilterSelect()\">\n </tk-button>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAWa,gBAAgB,CAAA;AAN7B,IAAA,WAAA,GAAA;AAOE;;;;;;AAMG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAS,EAAE,CAAC;AAE/B;;;;;;AAMG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAgC,IAAI,CAAC;AAExD;;;;;AAKG;AACH,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAU,KAAK,CAAC;AAExC;;;;;AAKG;AACH,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAU,KAAK,CAAC;AAEzC;;;;;;;;;;;;AAYG;QACH,IAAa,CAAA,aAAA,GAAG,KAAK,CAA0C;AAC7D,YAAA,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE;AACvC,YAAA,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE;AACvC,YAAA,EAAE,KAAK,EAAE,UAAU,EAAE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AAA,UAAA,EAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,kBAAkB,mMAAE,eAAe,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,IAAA,EAAA,SAAA,EAAA,aAAA,EAAA,OAAA,EAAA,WAAA,EAAA,UAAA,EAAA,OAAA,CAAA,EAAA,OAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAInD,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAN5B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,WACb,CAAC,eAAe,EAAE,kBAAkB,EAAE,eAAe,CAAC,EAAA,QAAA,EAAA,wlCAAA,EAAA,MAAA,EAAA,CAAA,kYAAA,CAAA,EAAA;;;AEPjE;;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.5.0",
4
+ "version": "5.6.0",
5
5
  "license": "UNLICENSED",
6
6
  "peerDependencies": {
7
7
  "@angular/core": "^19.2.15",
@@ -39,14 +39,6 @@
39
39
  "types": "./core/index.d.ts",
40
40
  "default": "./fesm2022/tekus-design-system-core.mjs"
41
41
  },
42
- "./core/types": {
43
- "types": "./core/types/index.d.ts",
44
- "default": "./fesm2022/tekus-design-system-core-types.mjs"
45
- },
46
- "./directives/gird-item": {
47
- "types": "./directives/gird-item/index.d.ts",
48
- "default": "./fesm2022/tekus-design-system-directives-gird-item.mjs"
49
- },
50
42
  "./components/button": {
51
43
  "types": "./components/button/index.d.ts",
52
44
  "default": "./fesm2022/tekus-design-system-components-button.mjs"
@@ -75,10 +67,30 @@
75
67
  "types": "./components/multiselect/index.d.ts",
76
68
  "default": "./fesm2022/tekus-design-system-components-multiselect.mjs"
77
69
  },
70
+ "./components/pagination": {
71
+ "types": "./components/pagination/index.d.ts",
72
+ "default": "./fesm2022/tekus-design-system-components-pagination.mjs"
73
+ },
74
+ "./components/select": {
75
+ "types": "./components/select/index.d.ts",
76
+ "default": "./fesm2022/tekus-design-system-components-select.mjs"
77
+ },
78
78
  "./components/tag": {
79
79
  "types": "./components/tag/index.d.ts",
80
80
  "default": "./fesm2022/tekus-design-system-components-tag.mjs"
81
81
  },
82
+ "./components/toolbar": {
83
+ "types": "./components/toolbar/index.d.ts",
84
+ "default": "./fesm2022/tekus-design-system-components-toolbar.mjs"
85
+ },
86
+ "./directives/gird-item": {
87
+ "types": "./directives/gird-item/index.d.ts",
88
+ "default": "./fesm2022/tekus-design-system-directives-gird-item.mjs"
89
+ },
90
+ "./core/types": {
91
+ "types": "./core/types/index.d.ts",
92
+ "default": "./fesm2022/tekus-design-system-core-types.mjs"
93
+ },
82
94
  "./utils/sanitizer-utils": {
83
95
  "types": "./utils/sanitizer-utils/index.d.ts",
84
96
  "default": "./fesm2022/tekus-design-system-utils-sanitizer-utils.mjs"