@tekus/design-system 5.21.0 → 5.22.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/fesm2022/tekus-design-system-components-autocomplete.mjs +15 -15
- package/fesm2022/tekus-design-system-components-autocomplete.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-badge.mjs +8 -8
- package/fesm2022/tekus-design-system-components-badge.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-button.mjs +3 -3
- package/fesm2022/tekus-design-system-components-button.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-checkbox.mjs +14 -16
- package/fesm2022/tekus-design-system-components-checkbox.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-date-picker.mjs +22 -22
- package/fesm2022/tekus-design-system-components-date-picker.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-drawer.mjs +29 -29
- package/fesm2022/tekus-design-system-components-drawer.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-fallback-view.mjs +4 -5
- package/fesm2022/tekus-design-system-components-fallback-view.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-icon.mjs +13 -15
- package/fesm2022/tekus-design-system-components-icon.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-input-number.mjs +12 -14
- package/fesm2022/tekus-design-system-components-input-number.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-input-text.mjs +17 -18
- package/fesm2022/tekus-design-system-components-input-text.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-modal.mjs +31 -31
- package/fesm2022/tekus-design-system-components-modal.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-multiselect.mjs +19 -19
- package/fesm2022/tekus-design-system-components-multiselect.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-pagination.mjs +12 -12
- package/fesm2022/tekus-design-system-components-pagination.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-panel.mjs +3 -3
- package/fesm2022/tekus-design-system-components-panel.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-radio-button.mjs +13 -15
- package/fesm2022/tekus-design-system-components-radio-button.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-select.mjs +16 -16
- package/fesm2022/tekus-design-system-components-select.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-table.mjs +13 -13
- package/fesm2022/tekus-design-system-components-table.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-tabs.mjs +18 -21
- package/fesm2022/tekus-design-system-components-tabs.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-tag.mjs +11 -19
- package/fesm2022/tekus-design-system-components-tag.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-textarea.mjs +16 -18
- package/fesm2022/tekus-design-system-components-textarea.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-toolbar.mjs +18 -18
- package/fesm2022/tekus-design-system-components-toolbar.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-tooltip.mjs +6 -6
- package/fesm2022/tekus-design-system-components-tooltip.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-topbar.mjs +9 -9
- package/fesm2022/tekus-design-system-components-topbar.mjs.map +1 -1
- package/fesm2022/tekus-design-system-core-types.mjs +6 -6
- package/fesm2022/tekus-design-system-core-types.mjs.map +1 -1
- package/fesm2022/tekus-design-system-core.mjs +6 -6
- package/fesm2022/tekus-design-system-core.mjs.map +1 -1
- package/fesm2022/tekus-design-system-directives-gird-item.mjs +4 -4
- package/fesm2022/tekus-design-system-directives-gird-item.mjs.map +1 -1
- package/fesm2022/tekus-design-system-utils-sanitizer-utils.mjs.map +1 -1
- package/package.json +53 -48
- package/{components/autocomplete/src/autocomplete.component.d.ts → types/tekus-design-system-components-autocomplete.d.ts} +18 -16
- package/{components/badge/src/badge.component.d.ts → types/tekus-design-system-components-badge.d.ts} +12 -8
- package/{components/button/src/button.component.d.ts → types/tekus-design-system-components-button.d.ts} +8 -4
- package/{components/checkbox/src/checkbox.component.d.ts → types/tekus-design-system-components-checkbox.d.ts} +18 -15
- package/{components/date-picker/src/date-picker.component.d.ts → types/tekus-design-system-components-date-picker.d.ts} +33 -28
- package/{components/drawer/src/drawer.component.d.ts → types/tekus-design-system-components-drawer.d.ts} +54 -19
- package/{components/fallback-view/src/fallback-view.component.d.ts → types/tekus-design-system-components-fallback-view.d.ts} +7 -3
- package/types/tekus-design-system-components-icon.d.ts +108 -0
- package/{components/input-number/src/input-number.component.d.ts → types/tekus-design-system-components-input-number.d.ts} +15 -12
- package/{components/input-text/src/input-text.component.d.ts → types/tekus-design-system-components-input-text.d.ts} +20 -17
- package/types/tekus-design-system-components-modal.d.ts +186 -0
- package/{components/multiselect/src/multiselect.component.d.ts → types/tekus-design-system-components-multiselect.d.ts} +30 -22
- package/{components/pagination/src/pagination.component.d.ts → types/tekus-design-system-components-pagination.d.ts} +16 -13
- package/{components/panel/src/panel.component.d.ts → types/tekus-design-system-components-panel.d.ts} +5 -2
- package/{components/radio-button/src/radio-button.component.d.ts → types/tekus-design-system-components-radio-button.d.ts} +16 -13
- package/{components/select/src/select.component.d.ts → types/tekus-design-system-components-select.d.ts} +20 -17
- package/{components/table/src/table.component.d.ts → types/tekus-design-system-components-table.d.ts} +30 -12
- package/{components/tabs/src/tabs.component.d.ts → types/tekus-design-system-components-tabs.d.ts} +23 -14
- package/{components/tag/src/tag.component.d.ts → types/tekus-design-system-components-tag.d.ts} +14 -10
- package/{components/textarea/src/textarea.component.d.ts → types/tekus-design-system-components-textarea.d.ts} +18 -15
- package/{components/toolbar/src/toolbar.component.d.ts → types/tekus-design-system-components-toolbar.d.ts} +21 -18
- package/types/tekus-design-system-components-tooltip.d.ts +39 -0
- package/types/tekus-design-system-components-topbar.d.ts +37 -0
- package/types/tekus-design-system-core-types.d.ts +182 -0
- package/types/tekus-design-system-core.d.ts +182 -0
- package/{directives/gird-item/src/grid-item.directive.d.ts → types/tekus-design-system-directives-gird-item.d.ts} +11 -7
- package/{utils/sanitizer-utils/src/sanitizer-utils.d.ts → types/tekus-design-system-utils-sanitizer-utils.d.ts} +5 -3
- package/types/tekus-design-system.d.ts +2 -0
- package/components/autocomplete/index.d.ts +0 -5
- package/components/autocomplete/public-api.d.ts +0 -1
- package/components/badge/index.d.ts +0 -5
- package/components/badge/public-api.d.ts +0 -1
- package/components/button/index.d.ts +0 -5
- package/components/button/public-api.d.ts +0 -1
- package/components/checkbox/index.d.ts +0 -5
- package/components/checkbox/public-api.d.ts +0 -1
- package/components/date-picker/index.d.ts +0 -5
- package/components/date-picker/public-api.d.ts +0 -1
- package/components/drawer/index.d.ts +0 -5
- package/components/drawer/public-api.d.ts +0 -3
- package/components/drawer/src/drawer.types.d.ts +0 -22
- package/components/drawer/src/services/drawer.service.d.ts +0 -15
- package/components/fallback-view/index.d.ts +0 -5
- package/components/fallback-view/public-api.d.ts +0 -1
- package/components/icon/core/icon-catalog.d.ts +0 -76
- package/components/icon/core/icons/ads.icons.d.ts +0 -2
- package/components/icon/core/icons/angle.icons.d.ts +0 -2
- package/components/icon/core/icons/arrow.icons.d.ts +0 -2
- package/components/icon/core/icons/arrows-rotate.d.ts +0 -2
- package/components/icon/core/icons/bars.icons.d.ts +0 -2
- package/components/icon/core/icons/bolt.icons.d.ts +0 -2
- package/components/icon/core/icons/book.icons.d.ts +0 -2
- package/components/icon/core/icons/calendar.icons.d.ts +0 -2
- package/components/icon/core/icons/camera.icons.d.ts +0 -2
- package/components/icon/core/icons/chart.icons.d.ts +0 -2
- package/components/icon/core/icons/check.icons.d.ts +0 -2
- package/components/icon/core/icons/chevron.icons.d.ts +0 -2
- package/components/icon/core/icons/circle.icons.d.ts +0 -2
- package/components/icon/core/icons/clock.icons.d.ts +0 -2
- package/components/icon/core/icons/clone.icons.d.ts +0 -2
- package/components/icon/core/icons/download.icons.d.ts +0 -2
- package/components/icon/core/icons/edit.d.ts +0 -2
- package/components/icon/core/icons/ellipsis.icons.d.ts +0 -2
- package/components/icon/core/icons/eye.icons.d.ts +0 -2
- package/components/icon/core/icons/filter.icons.d.ts +0 -2
- package/components/icon/core/icons/folders.icons.d.ts +0 -2
- package/components/icon/core/icons/gears.icons.d.ts +0 -2
- package/components/icon/core/icons/globe-pointer.d.ts +0 -2
- package/components/icon/core/icons/grip-vertical.d.ts +0 -2
- package/components/icon/core/icons/hand.icons.d.ts +0 -2
- package/components/icon/core/icons/language.icons.d.ts +0 -2
- package/components/icon/core/icons/layer.icons.d.ts +0 -2
- package/components/icon/core/icons/link.icons.d.ts +0 -2
- package/components/icon/core/icons/list.icons.d.ts +0 -2
- package/components/icon/core/icons/location.icons.d.ts +0 -2
- package/components/icon/core/icons/lock.icons.d.ts +0 -2
- package/components/icon/core/icons/magnifying-glass.icons.d.ts +0 -2
- package/components/icon/core/icons/media.icons.d.ts +0 -2
- package/components/icon/core/icons/megaphone.icons.d.ts +0 -2
- package/components/icon/core/icons/money.icons.d.ts +0 -2
- package/components/icon/core/icons/pen.icons.d.ts +0 -2
- package/components/icon/core/icons/pencil.icons.d.ts +0 -2
- package/components/icon/core/icons/plug.icons.d.ts +0 -2
- package/components/icon/core/icons/plus.icons.d.ts +0 -2
- package/components/icon/core/icons/qr-code.icons.d.ts +0 -2
- package/components/icon/core/icons/screwdriver-wrench.icons.d.ts +0 -2
- package/components/icon/core/icons/shuffle.icons.d.ts +0 -2
- package/components/icon/core/icons/square.icons.d.ts +0 -2
- package/components/icon/core/icons/tag.icons.d.ts +0 -2
- package/components/icon/core/icons/thumbs.icons.d.ts +0 -2
- package/components/icon/core/icons/trash.icons.d.ts +0 -2
- package/components/icon/core/icons/triangle.icons.d.ts +0 -2
- package/components/icon/core/icons/user.icons.d.ts +0 -2
- package/components/icon/core/icons/xmark.icons.d.ts +0 -2
- package/components/icon/core/svg-icons/ads-icon.svg.d.ts +0 -2
- package/components/icon/core/svg-icons/index.d.ts +0 -1
- package/components/icon/index.d.ts +0 -5
- package/components/icon/public-api.d.ts +0 -2
- package/components/icon/src/icon.component.d.ts +0 -79
- package/components/input-number/index.d.ts +0 -5
- package/components/input-number/public-api.d.ts +0 -1
- package/components/input-text/index.d.ts +0 -5
- package/components/input-text/public-api.d.ts +0 -1
- package/components/modal/index.d.ts +0 -5
- package/components/modal/public-api.d.ts +0 -3
- package/components/modal/src/modal.component.d.ts +0 -118
- package/components/modal/src/modal.types.d.ts +0 -39
- package/components/modal/src/services/modal.service.d.ts +0 -31
- package/components/multiselect/index.d.ts +0 -5
- package/components/multiselect/public-api.d.ts +0 -2
- package/components/multiselect/src/multiselect.types.d.ts +0 -4
- package/components/pagination/index.d.ts +0 -5
- package/components/pagination/public-api.d.ts +0 -1
- package/components/panel/index.d.ts +0 -5
- package/components/panel/public-api.d.ts +0 -1
- package/components/radio-button/index.d.ts +0 -5
- package/components/radio-button/public-api.d.ts +0 -1
- package/components/select/index.d.ts +0 -5
- package/components/select/public-api.d.ts +0 -1
- package/components/table/index.d.ts +0 -5
- package/components/table/public-api.d.ts +0 -2
- package/components/table/src/table.interface.d.ts +0 -14
- package/components/tabs/index.d.ts +0 -5
- package/components/tabs/public-api.d.ts +0 -2
- package/components/tabs/src/tabs.interface.d.ts +0 -11
- package/components/tag/index.d.ts +0 -5
- package/components/tag/public-api.d.ts +0 -1
- package/components/textarea/index.d.ts +0 -5
- package/components/textarea/public-api.d.ts +0 -1
- package/components/toolbar/index.d.ts +0 -5
- package/components/toolbar/public-api.d.ts +0 -1
- package/components/tooltip/index.d.ts +0 -5
- package/components/tooltip/public-api.d.ts +0 -1
- package/components/tooltip/src/tooltip.component.d.ts +0 -35
- package/components/topbar/index.d.ts +0 -5
- package/components/topbar/public-api.d.ts +0 -2
- package/components/topbar/src/topbar.component.d.ts +0 -20
- package/components/topbar/src/topbar.types.d.ts +0 -13
- package/core/index.d.ts +0 -5
- package/core/public-api.d.ts +0 -1
- package/core/types/index.d.ts +0 -5
- package/core/types/public-api.d.ts +0 -10
- package/core/types/src/branding/branding.types.d.ts +0 -15
- package/core/types/src/branding/index.d.ts +0 -1
- package/core/types/src/breakpoints/breakpoints.d.ts +0 -10
- package/core/types/src/breakpoints/index.d.ts +0 -1
- package/core/types/src/grids/grid.enum.d.ts +0 -18
- package/core/types/src/grids/grid.model.d.ts +0 -10
- package/core/types/src/grids/grid.type.d.ts +0 -40
- package/core/types/src/grids/index.d.ts +0 -3
- package/core/types/src/illustration-config/illustration-config.model.d.ts +0 -4
- package/core/types/src/illustration-config/index.d.ts +0 -1
- package/core/types/src/interception/index.d.ts +0 -1
- package/core/types/src/interception/interception.types.d.ts +0 -21
- package/core/types/src/option/index.d.ts +0 -1
- package/core/types/src/option/option.model.d.ts +0 -8
- package/core/types/src/theme/theme.provider.d.ts +0 -1
- package/core/types/src/theme/tk-preset.d.ts +0 -1
- package/core/types/src/typography-styles/index.d.ts +0 -1
- package/core/types/src/typography-styles/typographyStyles.model.d.ts +0 -36
- package/core/types/src/validator-with-message/index.d.ts +0 -1
- package/core/types/src/validator-with-message/validator-with-message.model.d.ts +0 -5
- package/directives/gird-item/index.d.ts +0 -5
- package/directives/gird-item/public-api.d.ts +0 -1
- package/index.d.ts +0 -1
- package/utils/sanitizer-utils/index.d.ts +0 -5
- package/utils/sanitizer-utils/public-api.d.ts +0 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
2
|
import { inject, model, input, signal, computed, Component } from '@angular/core';
|
|
4
3
|
import { NgControl, FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
@@ -23,70 +22,70 @@ class TextareaComponent {
|
|
|
23
22
|
* @description
|
|
24
23
|
* The value of the textarea. Supports two-way binding via signals.
|
|
25
24
|
*/
|
|
26
|
-
this.value = model('');
|
|
25
|
+
this.value = model('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
27
26
|
/**
|
|
28
27
|
* @property {InputSignal<FormControl>} control
|
|
29
28
|
* @description
|
|
30
29
|
* External FormControl used to read/set the textarea value.
|
|
31
30
|
* If not provided, an internal FormControl is created.
|
|
32
31
|
*/
|
|
33
|
-
this.control = input(new FormControl(''));
|
|
32
|
+
this.control = input(new FormControl(''), ...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
|
|
34
33
|
/**
|
|
35
34
|
* @property {InputSignal<string>} label
|
|
36
35
|
* @description
|
|
37
36
|
* Label displayed above the textarea.
|
|
38
37
|
*/
|
|
39
|
-
this.label = input('');
|
|
38
|
+
this.label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
40
39
|
/**
|
|
41
40
|
* @property {InputSignal<string>} id
|
|
42
41
|
* @description
|
|
43
42
|
* HTML id attribute for the textarea.
|
|
44
43
|
* @default 'tk-textarea'
|
|
45
44
|
*/
|
|
46
|
-
this.id = input('tk-textarea');
|
|
45
|
+
this.id = input('tk-textarea', ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
47
46
|
/**
|
|
48
47
|
* @property {InputSignal<number>} rows
|
|
49
48
|
* @description
|
|
50
49
|
* Number of visible text lines for the textarea.
|
|
51
50
|
* @default 1
|
|
52
51
|
*/
|
|
53
|
-
this.rows = input(1);
|
|
52
|
+
this.rows = input(1, ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
54
53
|
/**
|
|
55
54
|
* @property {InputSignal<number>} cols
|
|
56
55
|
* @description
|
|
57
56
|
* Visible width of the textarea in average character widths.
|
|
58
57
|
* @default 30
|
|
59
58
|
*/
|
|
60
|
-
this.cols = input(30);
|
|
59
|
+
this.cols = input(30, ...(ngDevMode ? [{ debugName: "cols" }] : /* istanbul ignore next */ []));
|
|
61
60
|
/**
|
|
62
61
|
* @property {InputSignal<string>} hint
|
|
63
62
|
* @description
|
|
64
63
|
* Hint text to display below the textarea.
|
|
65
64
|
*/
|
|
66
|
-
this.hint = input('');
|
|
65
|
+
this.hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
67
66
|
/**
|
|
68
67
|
* @property {InputSignal<string>} errorMessage
|
|
69
68
|
* @description
|
|
70
69
|
* Message to display when the control is invalid and touched.
|
|
71
70
|
*/
|
|
72
|
-
this.errorMessage = input('');
|
|
71
|
+
this.errorMessage = input('', ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
73
72
|
/**
|
|
74
73
|
* @property {InputSignal<number | null>} maxLength
|
|
75
74
|
* @description
|
|
76
75
|
* Maximum number of characters allowed in the textarea.
|
|
77
76
|
*/
|
|
78
|
-
this.maxLength = input(null);
|
|
77
|
+
this.maxLength = input(null, ...(ngDevMode ? [{ debugName: "maxLength" }] : /* istanbul ignore next */ []));
|
|
79
78
|
/**
|
|
80
79
|
* @property {boolean} disabled
|
|
81
80
|
* @description
|
|
82
81
|
* Whether the textarea is disabled.
|
|
83
82
|
*/
|
|
84
|
-
this.disabled = signal(false);
|
|
83
|
+
this.disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
85
84
|
/* ───────────── Derived state ───────────── */
|
|
86
85
|
this.counterText = computed(() => {
|
|
87
86
|
const limit = this.maxLength();
|
|
88
87
|
return limit ? `${this.value().length}/${limit}` : '';
|
|
89
|
-
});
|
|
88
|
+
}, ...(ngDevMode ? [{ debugName: "counterText" }] : /* istanbul ignore next */ []));
|
|
90
89
|
/* ───────────── CVA callbacks ───────────── */
|
|
91
90
|
this.propagateChange = () => { };
|
|
92
91
|
this.propagateTouched = () => { };
|
|
@@ -213,19 +212,18 @@ class TextareaComponent {
|
|
|
213
212
|
get effectiveControl() {
|
|
214
213
|
return this.getControl();
|
|
215
214
|
}
|
|
216
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
217
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
215
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: TextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
216
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.3", type: TextareaComponent, isStandalone: true, selector: "tk-textarea", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, cols: { classPropertyName: "cols", publicName: "cols", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, ngImport: i0, template: "<p-floatlabel>\n <div class=\"tk-textarea-wrapper\">\n <textarea\n pTextarea\n [autoResize]=\"true\"\n [id]=\"id()\"\n [rows]=\"rows()\"\n [cols]=\"cols()\"\n [value]=\"value()\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n [attr.maxlength]=\"maxLength()\"\n [disabled]=\"disabled()\"\n [class.p-filled]=\"!!value()\"\n [class.ng-invalid]=\"effectiveControl.invalid\"\n [class.ng-dirty]=\"effectiveControl.dirty\"\n [class.ng-touched]=\"effectiveControl.touched\"></textarea>\n\n <label [for]=\"id()\">{{ label() }}</label>\n </div>\n</p-floatlabel>\n\n<div class=\"tk-input-bottom\">\n <div class=\"tk-input-messages\">\n @if ((effectiveControl.invalid && (effectiveControl.dirty ||\n effectiveControl.touched)) && errorMessage()) {\n <p-message severity=\"error\" size=\"small\" variant=\"simple\">\n {{ errorMessage() }}\n </p-message>\n } @else if (hint()) {\n <p-message severity=\"secondary\" size=\"small\" variant=\"simple\">\n {{ hint() }}\n </p-message>\n }\n </div>\n\n @if (maxLength()) {\n <p-message\n severity=\"secondary\"\n size=\"small\"\n variant=\"simple\"\n class=\"tk-character-counter\">\n {{ counterText() }}\n </p-message>\n }\n</div>\n", styles: [":host ::ng-deep .p-textarea{width:100%;flex:1;border:none;border-bottom:.0625rem solid var(--tk-color-base-surface-300, #d2d2d2);border-radius:var(--tk-borderRadius-null, 0);padding:var(--tk-spacing-base-75, .75rem);padding-left:var(--tk-spacing-paddingX-xs, .25rem);color:var(--tk-color-base-surface-950, #191a1b);background-color:transparent}:host ::ng-deep .p-textarea:focus{border-color:var(--tk-color-base-primary-600, #140065);box-shadow:none}:host ::ng-deep .p-textarea.ng-invalid.ng-dirty,:host ::ng-deep .p-textarea.ng-invalid.ng-touched{border-color:var(--tk-color-base-red-700, #cf2604)}:host ::ng-deep .p-textarea.has-icon{padding-left:var(--tk-spacing-base-200, 2rem)}:host ::ng-deep .p-textarea:disabled{background-color:var(--tk-color-base-surface-200, #e4e4e4);color:var(--tk-color-base-surface-500, #8a8a8b);opacity:1}:host ::ng-deep .p-floatlabel label{color:var(--tk-color-base-surface-500, #8a8a8b);font-weight:var(--tk-font-weight-400, 400);left:var(--tk-spacing-base-25, .25rem);transition-duration:.2s}:host ::ng-deep .p-floatlabel:has(.p-textarea) label{top:var(--tk-spacing-base-125, 1.25rem)}:host ::ng-deep .p-floatlabel:has(textarea:disabled) label{display:none}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-filled) label,:host ::ng-deep .p-floatlabel:has(textarea.p-filled) label{top:-.75rem;color:var(--tk-color-base-surface-950, #191a1b)}:host ::ng-deep .p-floatlabel:has(textarea:focus) label{top:-.75rem;color:var(--tk-color-base-primary-600, #140065)}:host ::ng-deep .p-floatlabel:has(.p-textarea.ng-invalid.ng-dirty) label,:host ::ng-deep .p-floatlabel:has(.p-textarea.ng-invalid.ng-touched) label{color:var(--tk-color-base-red-700, #cf2604)}:host ::ng-deep p-message[severity=error] .p-inline-message-text,:host ::ng-deep p-message[severity=error] span{color:var(--tk-color-base-red-700, #cf2604)}:host ::ng-deep p-message[severity=secondary] .p-inline-message-text,:host ::ng-deep p-message[severity=secondary] span{color:var(--tk-color-base-surface-600, #5d5d5e)}:host ::ng-deep .tk-input-messages{flex:1;margin-right:1rem}:host ::ng-deep .tk-character-counter{white-space:nowrap;display:flex;justify-content:flex-end}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: TextareaModule }, { kind: "directive", type: i1.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["pTextareaPT", "pTextareaUnstyled", "autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: i2.FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "ngmodule", type: MessageModule }, { kind: "component", type: i3.Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant", "motionOptions"], outputs: ["onClose"] }] }); }
|
|
218
217
|
}
|
|
219
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
218
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: TextareaComponent, decorators: [{
|
|
220
219
|
type: Component,
|
|
221
220
|
args: [{ selector: 'tk-textarea', standalone: true, imports: [
|
|
222
|
-
CommonModule,
|
|
223
221
|
ReactiveFormsModule,
|
|
224
222
|
TextareaModule,
|
|
225
223
|
FloatLabelModule,
|
|
226
|
-
MessageModule
|
|
224
|
+
MessageModule
|
|
227
225
|
], template: "<p-floatlabel>\n <div class=\"tk-textarea-wrapper\">\n <textarea\n pTextarea\n [autoResize]=\"true\"\n [id]=\"id()\"\n [rows]=\"rows()\"\n [cols]=\"cols()\"\n [value]=\"value()\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n [attr.maxlength]=\"maxLength()\"\n [disabled]=\"disabled()\"\n [class.p-filled]=\"!!value()\"\n [class.ng-invalid]=\"effectiveControl.invalid\"\n [class.ng-dirty]=\"effectiveControl.dirty\"\n [class.ng-touched]=\"effectiveControl.touched\"></textarea>\n\n <label [for]=\"id()\">{{ label() }}</label>\n </div>\n</p-floatlabel>\n\n<div class=\"tk-input-bottom\">\n <div class=\"tk-input-messages\">\n @if ((effectiveControl.invalid && (effectiveControl.dirty ||\n effectiveControl.touched)) && errorMessage()) {\n <p-message severity=\"error\" size=\"small\" variant=\"simple\">\n {{ errorMessage() }}\n </p-message>\n } @else if (hint()) {\n <p-message severity=\"secondary\" size=\"small\" variant=\"simple\">\n {{ hint() }}\n </p-message>\n }\n </div>\n\n @if (maxLength()) {\n <p-message\n severity=\"secondary\"\n size=\"small\"\n variant=\"simple\"\n class=\"tk-character-counter\">\n {{ counterText() }}\n </p-message>\n }\n</div>\n", styles: [":host ::ng-deep .p-textarea{width:100%;flex:1;border:none;border-bottom:.0625rem solid var(--tk-color-base-surface-300, #d2d2d2);border-radius:var(--tk-borderRadius-null, 0);padding:var(--tk-spacing-base-75, .75rem);padding-left:var(--tk-spacing-paddingX-xs, .25rem);color:var(--tk-color-base-surface-950, #191a1b);background-color:transparent}:host ::ng-deep .p-textarea:focus{border-color:var(--tk-color-base-primary-600, #140065);box-shadow:none}:host ::ng-deep .p-textarea.ng-invalid.ng-dirty,:host ::ng-deep .p-textarea.ng-invalid.ng-touched{border-color:var(--tk-color-base-red-700, #cf2604)}:host ::ng-deep .p-textarea.has-icon{padding-left:var(--tk-spacing-base-200, 2rem)}:host ::ng-deep .p-textarea:disabled{background-color:var(--tk-color-base-surface-200, #e4e4e4);color:var(--tk-color-base-surface-500, #8a8a8b);opacity:1}:host ::ng-deep .p-floatlabel label{color:var(--tk-color-base-surface-500, #8a8a8b);font-weight:var(--tk-font-weight-400, 400);left:var(--tk-spacing-base-25, .25rem);transition-duration:.2s}:host ::ng-deep .p-floatlabel:has(.p-textarea) label{top:var(--tk-spacing-base-125, 1.25rem)}:host ::ng-deep .p-floatlabel:has(textarea:disabled) label{display:none}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-filled) label,:host ::ng-deep .p-floatlabel:has(textarea.p-filled) label{top:-.75rem;color:var(--tk-color-base-surface-950, #191a1b)}:host ::ng-deep .p-floatlabel:has(textarea:focus) label{top:-.75rem;color:var(--tk-color-base-primary-600, #140065)}:host ::ng-deep .p-floatlabel:has(.p-textarea.ng-invalid.ng-dirty) label,:host ::ng-deep .p-floatlabel:has(.p-textarea.ng-invalid.ng-touched) label{color:var(--tk-color-base-red-700, #cf2604)}:host ::ng-deep p-message[severity=error] .p-inline-message-text,:host ::ng-deep p-message[severity=error] span{color:var(--tk-color-base-red-700, #cf2604)}:host ::ng-deep p-message[severity=secondary] .p-inline-message-text,:host ::ng-deep p-message[severity=secondary] span{color:var(--tk-color-base-surface-600, #5d5d5e)}:host ::ng-deep .tk-input-messages{flex:1;margin-right:1rem}:host ::ng-deep .tk-character-counter{white-space:nowrap;display:flex;justify-content:flex-end}\n"] }]
|
|
228
|
-
}], ctorParameters: () => [] });
|
|
226
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], cols: [{ type: i0.Input, args: [{ isSignal: true, alias: "cols", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }] } });
|
|
229
227
|
|
|
230
228
|
/**
|
|
231
229
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tekus-design-system-components-textarea.mjs","sources":["../../../projects/design-system/components/textarea/src/textarea.component.ts","../../../projects/design-system/components/textarea/src/textarea.component.html","../../../projects/design-system/components/textarea/tekus-design-system-components-textarea.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n Component,\n input,\n model,\n signal,\n computed,\n inject,\n OnInit,\n OnDestroy,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n ReactiveFormsModule,\n NgControl,\n} from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { FloatLabelModule } from 'primeng/floatlabel';\nimport { TextareaModule } from 'primeng/textarea';\nimport { MessageModule } from 'primeng/message';\n\n@Component({\n selector: 'tk-textarea',\n standalone: true,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n TextareaModule,\n FloatLabelModule,\n MessageModule,\n ],\n templateUrl: './textarea.component.html',\n styleUrl: './textarea.component.scss',\n})\nexport class TextareaComponent\n implements ControlValueAccessor, OnInit, OnDestroy\n{\n /* ───────────── Dependency injection ───────────── */\n private readonly ngControl = inject(NgControl, {\n self: true,\n optional: true,\n });\n\n constructor() {\n this.bindValueAccessor();\n }\n\n /* ───────────── Inputs / State ───────────── */\n\n /**\n * @property {ModelSignal<string>} value\n * @description\n * The value of the textarea. Supports two-way binding via signals.\n */\n value = model<string>('');\n\n /**\n * @property {InputSignal<FormControl>} control\n * @description\n * External FormControl used to read/set the textarea value.\n * If not provided, an internal FormControl is created.\n */\n control = input<FormControl>(new FormControl(''));\n\n /**\n * @property {InputSignal<string>} label\n * @description\n * Label displayed above the textarea.\n */\n label = input<string>('');\n\n /**\n * @property {InputSignal<string>} id\n * @description\n * HTML id attribute for the textarea.\n * @default 'tk-textarea'\n */\n id = input<string>('tk-textarea');\n\n /**\n * @property {InputSignal<number>} rows\n * @description\n * Number of visible text lines for the textarea.\n * @default 1\n */\n rows = input<number>(1);\n\n /**\n * @property {InputSignal<number>} cols\n * @description\n * Visible width of the textarea in average character widths.\n * @default 30\n */\n cols = input<number>(30);\n\n /**\n * @property {InputSignal<string>} hint\n * @description\n * Hint text to display below the textarea.\n */\n hint = input<string>('');\n\n /**\n * @property {InputSignal<string>} errorMessage\n * @description\n * Message to display when the control is invalid and touched.\n */\n errorMessage = input<string>('');\n\n /**\n * @property {InputSignal<number | null>} maxLength\n * @description\n * Maximum number of characters allowed in the textarea.\n */\n maxLength = input<number | null>(null);\n\n /**\n * @property {boolean} disabled\n * @description\n * Whether the textarea is disabled.\n */\n disabled = signal<boolean>(false);\n\n /* ───────────── Derived state ───────────── */\n\n counterText = computed(() => {\n const limit = this.maxLength();\n return limit ? `${this.value().length}/${limit}` : '';\n });\n\n /* ───────────── CVA callbacks ───────────── */\n\n private propagateChange: (value: string) => void = () => {};\n private propagateTouched: () => void = () => {};\n\n /* ───────────── Internals ───────────── */\n\n private syncingFromView = false;\n private readonly subscriptions = new Subscription();\n\n /* ───────────── Lifecycle ───────────── */\n\n ngOnInit(): void {\n this.initializeFromControl();\n this.listenToControlChanges();\n }\n\n ngOnDestroy(): void {\n this.subscriptions.unsubscribe();\n }\n\n /* ───────────── ControlValueAccessor ───────────── */\n\n /**\n * @method writeValue\n * @description\n * Writes a new value to the element.\n * @param value The new value.\n */\n writeValue(value: string): void {\n const safeValue = value ?? '';\n this.value.set(safeValue);\n this.control().setValue(safeValue, { emitEvent: false });\n }\n\n /**\n * @method registerOnChange\n * @description\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function.\n */\n registerOnChange(fn: (value: string) => void): void {\n this.propagateChange = fn;\n }\n\n /**\n * @method registerOnTouched\n * @description\n * Registers a callback function that is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function.\n */\n registerOnTouched(fn: () => void): void {\n this.propagateTouched = fn;\n }\n\n /**\n * @method setDisabledState\n * @description\n * Function that is called by the forms API when the control status changes to or from 'DISABLED'.\n * @param isDisabled The disabled status to set on the element.\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n if (isDisabled) {\n this.control().disable({ emitEvent: false });\n } else {\n this.control().enable({ emitEvent: false });\n }\n }\n\n /* ───────────── Template handlers ───────────── */\n\n /**\n * @method onInput\n * @description\n * Handles input events to update the model and notify forms.\n * @param event The input event.\n */\n onInput(event: Event): void {\n const nextValue = (event.target as HTMLTextAreaElement).value;\n this.syncFromUserInput(nextValue);\n }\n\n /**\n * @method onBlur\n * @description\n * Handles blur events to mark the control as touched.\n */\n onBlur(): void {\n this.markControlAsTouched();\n }\n\n /* ───────────── Private helpers ───────────── */\n\n private bindValueAccessor(): void {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n private initializeFromControl(): void {\n const control = this.getControl();\n\n if (control.value !== null && control.value !== undefined) {\n this.value.set(control.value);\n }\n\n this.disabled.set(control.disabled);\n }\n\n private listenToControlChanges(): void {\n const control = this.getControl();\n\n this.subscriptions.add(\n control.valueChanges.subscribe(value => {\n if (this.syncingFromView) return;\n if (value !== this.value()) {\n this.value.set(value ?? '');\n this.propagateChange(value);\n }\n })\n );\n\n this.subscriptions.add(\n control.statusChanges.subscribe(() => {\n this.disabled.set(control.disabled);\n })\n );\n }\n\n private syncFromUserInput(value: string): void {\n this.syncingFromView = true;\n\n this.value.set(value);\n this.propagateChange(value);\n\n const control = this.getControl();\n control.setValue(value);\n control.markAsDirty();\n\n this.syncingFromView = false;\n }\n\n private markControlAsTouched(): void {\n this.propagateTouched();\n this.getControl().markAsTouched();\n }\n\n private getControl(): FormControl {\n return (this.ngControl?.control as FormControl) || this.control();\n }\n\n get effectiveControl(): FormControl {\n return this.getControl();\n }\n}\n","<p-floatlabel>\n <div class=\"tk-textarea-wrapper\">\n <textarea\n pTextarea\n [autoResize]=\"true\"\n [id]=\"id()\"\n [rows]=\"rows()\"\n [cols]=\"cols()\"\n [value]=\"value()\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n [attr.maxlength]=\"maxLength()\"\n [disabled]=\"disabled()\"\n [class.p-filled]=\"!!value()\"\n [class.ng-invalid]=\"effectiveControl.invalid\"\n [class.ng-dirty]=\"effectiveControl.dirty\"\n [class.ng-touched]=\"effectiveControl.touched\"></textarea>\n\n <label [for]=\"id()\">{{ label() }}</label>\n </div>\n</p-floatlabel>\n\n<div class=\"tk-input-bottom\">\n <div class=\"tk-input-messages\">\n @if ((effectiveControl.invalid && (effectiveControl.dirty ||\n effectiveControl.touched)) && errorMessage()) {\n <p-message severity=\"error\" size=\"small\" variant=\"simple\">\n {{ errorMessage() }}\n </p-message>\n } @else if (hint()) {\n <p-message severity=\"secondary\" size=\"small\" variant=\"simple\">\n {{ hint() }}\n </p-message>\n }\n </div>\n\n @if (maxLength()) {\n <p-message\n severity=\"secondary\"\n size=\"small\"\n variant=\"simple\"\n class=\"tk-character-counter\">\n {{ counterText() }}\n </p-message>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAmCa,iBAAiB,CAAA;AAS5B,IAAA,WAAA,GAAA;;AALiB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE;AAC7C,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,QAAQ,EAAE,IAAI;AACf,SAAA,CAAC;;AAQF;;;;AAIG;AACH,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,CAAC;AAEzB;;;;;AAKG;QACH,IAAO,CAAA,OAAA,GAAG,KAAK,CAAc,IAAI,WAAW,CAAC,EAAE,CAAC,CAAC;AAEjD;;;;AAIG;AACH,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,CAAC;AAEzB;;;;;AAKG;AACH,QAAA,IAAA,CAAA,EAAE,GAAG,KAAK,CAAS,aAAa,C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EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,OAAA,EAAA,YAAA,EAAA,UAAA,EAAA,MAAA,EAAA,WAAA,EAAA,MAAA,EAAA,uBAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAKJ,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAb7B,SAAS;+BACE,aAAa,EAAA,UAAA,EACX,IAAI,EACP,OAAA,EAAA;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,cAAc;wBACd,gBAAgB;wBAChB,aAAa;AACd,qBAAA,EAAA,QAAA,EAAA,yxCAAA,EAAA,MAAA,EAAA,CAAA,onEAAA,CAAA,EAAA;;;AE/BH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"tekus-design-system-components-textarea.mjs","sources":["../../../projects/design-system/components/textarea/src/textarea.component.ts","../../../projects/design-system/components/textarea/src/textarea.component.html","../../../projects/design-system/components/textarea/tekus-design-system-components-textarea.ts"],"sourcesContent":["\nimport {\n Component,\n input,\n model,\n signal,\n computed,\n inject,\n OnInit,\n OnDestroy,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n ReactiveFormsModule,\n NgControl,\n} from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { FloatLabelModule } from 'primeng/floatlabel';\nimport { TextareaModule } from 'primeng/textarea';\nimport { MessageModule } from 'primeng/message';\n\n@Component({\n selector: 'tk-textarea',\n standalone: true,\n imports: [\n ReactiveFormsModule,\n TextareaModule,\n FloatLabelModule,\n MessageModule\n],\n templateUrl: './textarea.component.html',\n styleUrl: './textarea.component.scss',\n})\nexport class TextareaComponent\n implements ControlValueAccessor, OnInit, OnDestroy\n{\n /* ───────────── Dependency injection ───────────── */\n private readonly ngControl = inject(NgControl, {\n self: true,\n optional: true,\n });\n\n constructor() {\n this.bindValueAccessor();\n }\n\n /* ───────────── Inputs / State ───────────── */\n\n /**\n * @property {ModelSignal<string>} value\n * @description\n * The value of the textarea. Supports two-way binding via signals.\n */\n value = model<string>('');\n\n /**\n * @property {InputSignal<FormControl>} control\n * @description\n * External FormControl used to read/set the textarea value.\n * If not provided, an internal FormControl is created.\n */\n control = input<FormControl>(new FormControl(''));\n\n /**\n * @property {InputSignal<string>} label\n * @description\n * Label displayed above the textarea.\n */\n label = input<string>('');\n\n /**\n * @property {InputSignal<string>} id\n * @description\n * HTML id attribute for the textarea.\n * @default 'tk-textarea'\n */\n id = input<string>('tk-textarea');\n\n /**\n * @property {InputSignal<number>} rows\n * @description\n * Number of visible text lines for the textarea.\n * @default 1\n */\n rows = input<number>(1);\n\n /**\n * @property {InputSignal<number>} cols\n * @description\n * Visible width of the textarea in average character widths.\n * @default 30\n */\n cols = input<number>(30);\n\n /**\n * @property {InputSignal<string>} hint\n * @description\n * Hint text to display below the textarea.\n */\n hint = input<string>('');\n\n /**\n * @property {InputSignal<string>} errorMessage\n * @description\n * Message to display when the control is invalid and touched.\n */\n errorMessage = input<string>('');\n\n /**\n * @property {InputSignal<number | null>} maxLength\n * @description\n * Maximum number of characters allowed in the textarea.\n */\n maxLength = input<number | null>(null);\n\n /**\n * @property {boolean} disabled\n * @description\n * Whether the textarea is disabled.\n */\n disabled = signal<boolean>(false);\n\n /* ───────────── Derived state ───────────── */\n\n counterText = computed(() => {\n const limit = this.maxLength();\n return limit ? `${this.value().length}/${limit}` : '';\n });\n\n /* ───────────── CVA callbacks ───────────── */\n\n private propagateChange: (value: string) => void = () => {};\n private propagateTouched: () => void = () => {};\n\n /* ───────────── Internals ───────────── */\n\n private syncingFromView = false;\n private readonly subscriptions = new Subscription();\n\n /* ───────────── Lifecycle ───────────── */\n\n ngOnInit(): void {\n this.initializeFromControl();\n this.listenToControlChanges();\n }\n\n ngOnDestroy(): void {\n this.subscriptions.unsubscribe();\n }\n\n /* ───────────── ControlValueAccessor ───────────── */\n\n /**\n * @method writeValue\n * @description\n * Writes a new value to the element.\n * @param value The new value.\n */\n writeValue(value: string): void {\n const safeValue = value ?? '';\n this.value.set(safeValue);\n this.control().setValue(safeValue, { emitEvent: false });\n }\n\n /**\n * @method registerOnChange\n * @description\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function.\n */\n registerOnChange(fn: (value: string) => void): void {\n this.propagateChange = fn;\n }\n\n /**\n * @method registerOnTouched\n * @description\n * Registers a callback function that is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function.\n */\n registerOnTouched(fn: () => void): void {\n this.propagateTouched = fn;\n }\n\n /**\n * @method setDisabledState\n * @description\n * Function that is called by the forms API when the control status changes to or from 'DISABLED'.\n * @param isDisabled The disabled status to set on the element.\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n if (isDisabled) {\n this.control().disable({ emitEvent: false });\n } else {\n this.control().enable({ emitEvent: false });\n }\n }\n\n /* ───────────── Template handlers ───────────── */\n\n /**\n * @method onInput\n * @description\n * Handles input events to update the model and notify forms.\n * @param event The input event.\n */\n onInput(event: Event): void {\n const nextValue = (event.target as HTMLTextAreaElement).value;\n this.syncFromUserInput(nextValue);\n }\n\n /**\n * @method onBlur\n * @description\n * Handles blur events to mark the control as touched.\n */\n onBlur(): void {\n this.markControlAsTouched();\n }\n\n /* ───────────── Private helpers ───────────── */\n\n private bindValueAccessor(): void {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n private initializeFromControl(): void {\n const control = this.getControl();\n\n if (control.value !== null && control.value !== undefined) {\n this.value.set(control.value);\n }\n\n this.disabled.set(control.disabled);\n }\n\n private listenToControlChanges(): void {\n const control = this.getControl();\n\n this.subscriptions.add(\n control.valueChanges.subscribe(value => {\n if (this.syncingFromView) return;\n if (value !== this.value()) {\n this.value.set(value ?? '');\n this.propagateChange(value);\n }\n })\n );\n\n this.subscriptions.add(\n control.statusChanges.subscribe(() => {\n this.disabled.set(control.disabled);\n })\n );\n }\n\n private syncFromUserInput(value: string): void {\n this.syncingFromView = true;\n\n this.value.set(value);\n this.propagateChange(value);\n\n const control = this.getControl();\n control.setValue(value);\n control.markAsDirty();\n\n this.syncingFromView = false;\n }\n\n private markControlAsTouched(): void {\n this.propagateTouched();\n this.getControl().markAsTouched();\n }\n\n private getControl(): FormControl {\n return (this.ngControl?.control as FormControl) || this.control();\n }\n\n get effectiveControl(): FormControl {\n return this.getControl();\n }\n}\n","<p-floatlabel>\n <div class=\"tk-textarea-wrapper\">\n <textarea\n pTextarea\n [autoResize]=\"true\"\n [id]=\"id()\"\n [rows]=\"rows()\"\n [cols]=\"cols()\"\n [value]=\"value()\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n [attr.maxlength]=\"maxLength()\"\n [disabled]=\"disabled()\"\n [class.p-filled]=\"!!value()\"\n [class.ng-invalid]=\"effectiveControl.invalid\"\n [class.ng-dirty]=\"effectiveControl.dirty\"\n [class.ng-touched]=\"effectiveControl.touched\"></textarea>\n\n <label [for]=\"id()\">{{ label() }}</label>\n </div>\n</p-floatlabel>\n\n<div class=\"tk-input-bottom\">\n <div class=\"tk-input-messages\">\n @if ((effectiveControl.invalid && (effectiveControl.dirty ||\n effectiveControl.touched)) && errorMessage()) {\n <p-message severity=\"error\" size=\"small\" variant=\"simple\">\n {{ errorMessage() }}\n </p-message>\n } @else if (hint()) {\n <p-message severity=\"secondary\" size=\"small\" variant=\"simple\">\n {{ hint() }}\n </p-message>\n }\n </div>\n\n @if (maxLength()) {\n <p-message\n severity=\"secondary\"\n size=\"small\"\n variant=\"simple\"\n class=\"tk-character-counter\">\n {{ counterText() }}\n </p-message>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAkCa,iBAAiB,CAAA;AAS5B,IAAA,WAAA,GAAA;;AALiB,QAAA,IAAA,CAAA,SAAS,GAAG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ding.
|
|
21
21
|
* @default ''
|
|
22
22
|
*/
|
|
23
|
-
this.searchModel = model('');
|
|
23
|
+
this.searchModel = model('', ...(ngDevMode ? [{ debugName: "searchModel" }] : /* istanbul ignore next */ []));
|
|
24
24
|
/**
|
|
25
25
|
* @property {ModelSignal<Record<string, string> | null>} filterModel
|
|
26
26
|
* @description
|
|
@@ -28,21 +28,21 @@ class ToolbarComponent {
|
|
|
28
28
|
* Supports [(filterModel)]="variable" syntax for two-way binding.
|
|
29
29
|
* @default null
|
|
30
30
|
*/
|
|
31
|
-
this.filterModel = model(null);
|
|
31
|
+
this.filterModel = model(null, ...(ngDevMode ? [{ debugName: "filterModel" }] : /* istanbul ignore next */ []));
|
|
32
32
|
/**
|
|
33
33
|
* @property {WritableSignal<boolean>} showSearchInput
|
|
34
34
|
* @description
|
|
35
35
|
* Controls the visibility of the search input. Toggles when the search button is clicked.
|
|
36
36
|
* @default false
|
|
37
37
|
*/
|
|
38
|
-
this.showSearchInput = signal(false);
|
|
38
|
+
this.showSearchInput = signal(false, ...(ngDevMode ? [{ debugName: "showSearchInput" }] : /* istanbul ignore next */ []));
|
|
39
39
|
/**
|
|
40
40
|
* @property {WritableSignal<boolean>} showFilterSelect
|
|
41
41
|
* @description
|
|
42
42
|
* Controls the visibility of the filter select. Toggles when the filter button is clicked.
|
|
43
43
|
* @default false
|
|
44
44
|
*/
|
|
45
|
-
this.showFilterSelect = signal(false);
|
|
45
|
+
this.showFilterSelect = signal(false, ...(ngDevMode ? [{ debugName: "showFilterSelect" }] : /* istanbul ignore next */ []));
|
|
46
46
|
/**
|
|
47
47
|
* @property {InputSignal<Array<{ label: string; value: string }>>} filterOptions
|
|
48
48
|
* @description
|
|
@@ -60,7 +60,7 @@ class ToolbarComponent {
|
|
|
60
60
|
{ label: 'Option 1', value: 'option1' },
|
|
61
61
|
{ label: 'Option 2', value: 'option2' },
|
|
62
62
|
{ label: 'Option 3', value: 'option3' },
|
|
63
|
-
]);
|
|
63
|
+
], ...(ngDevMode ? [{ debugName: "filterOptions" }] : /* istanbul ignore next */ []));
|
|
64
64
|
/**
|
|
65
65
|
* @property {InputSignal<string>} filterOptionLabel
|
|
66
66
|
* @description
|
|
@@ -69,7 +69,7 @@ class ToolbarComponent {
|
|
|
69
69
|
*
|
|
70
70
|
* @default 'label'
|
|
71
71
|
*/
|
|
72
|
-
this.filterOptionLabel = input('label');
|
|
72
|
+
this.filterOptionLabel = input('label', ...(ngDevMode ? [{ debugName: "filterOptionLabel" }] : /* istanbul ignore next */ []));
|
|
73
73
|
/**
|
|
74
74
|
* @property {InputSignal<string>} filterFloatLabel
|
|
75
75
|
* @description
|
|
@@ -78,7 +78,7 @@ class ToolbarComponent {
|
|
|
78
78
|
*
|
|
79
79
|
* @default 'Filtrar'
|
|
80
80
|
*/
|
|
81
|
-
this.filterFloatLabel = input('Filtrar');
|
|
81
|
+
this.filterFloatLabel = input('Filtrar', ...(ngDevMode ? [{ debugName: "filterFloatLabel" }] : /* istanbul ignore next */ []));
|
|
82
82
|
/**
|
|
83
83
|
* @property {InputSignal<string>} searchFloatLabel
|
|
84
84
|
* @description
|
|
@@ -87,28 +87,28 @@ class ToolbarComponent {
|
|
|
87
87
|
*
|
|
88
88
|
* @default 'Buscar'
|
|
89
89
|
*/
|
|
90
|
-
this.searchFloatLabel = input('Buscar');
|
|
90
|
+
this.searchFloatLabel = input('Buscar', ...(ngDevMode ? [{ debugName: "searchFloatLabel" }] : /* istanbul ignore next */ []));
|
|
91
91
|
/**
|
|
92
92
|
* @property {InputSignal<boolean>} searchVisible
|
|
93
93
|
* @description
|
|
94
94
|
* Controls the visibility of the search button.
|
|
95
95
|
* @default true
|
|
96
96
|
*/
|
|
97
|
-
this.searchVisible = input(true);
|
|
97
|
+
this.searchVisible = input(true, ...(ngDevMode ? [{ debugName: "searchVisible" }] : /* istanbul ignore next */ []));
|
|
98
98
|
/**
|
|
99
99
|
* @property {InputSignal<boolean>} filterVisible
|
|
100
100
|
* @description
|
|
101
101
|
* Controls the visibility of the filter button.
|
|
102
102
|
* @default true
|
|
103
103
|
*/
|
|
104
|
-
this.filterVisible = input(true);
|
|
104
|
+
this.filterVisible = input(true, ...(ngDevMode ? [{ debugName: "filterVisible" }] : /* istanbul ignore next */ []));
|
|
105
105
|
/**
|
|
106
106
|
* @property {InputSignal<boolean>} reloadVisible
|
|
107
107
|
* @description
|
|
108
108
|
* Controls the visibility of the reload button.
|
|
109
109
|
* @default false
|
|
110
110
|
*/
|
|
111
|
-
this.reloadVisible = input(false);
|
|
111
|
+
this.reloadVisible = input(false, ...(ngDevMode ? [{ debugName: "reloadVisible" }] : /* istanbul ignore next */ []));
|
|
112
112
|
/**
|
|
113
113
|
* @property {InputSignal<number | null>} reloadInterval
|
|
114
114
|
* @description
|
|
@@ -116,14 +116,14 @@ class ToolbarComponent {
|
|
|
116
116
|
* If null, automatic reload is disabled.
|
|
117
117
|
* @default null
|
|
118
118
|
*/
|
|
119
|
-
this.reloadInterval = input(null);
|
|
119
|
+
this.reloadInterval = input(null, ...(ngDevMode ? [{ debugName: "reloadInterval" }] : /* istanbul ignore next */ []));
|
|
120
120
|
/**
|
|
121
121
|
* @property {InputSignal<boolean>} loading
|
|
122
122
|
* @description
|
|
123
123
|
* Controls the loading state of the reload button, triggering a rotation animation.
|
|
124
124
|
* @default false
|
|
125
125
|
*/
|
|
126
|
-
this.loading = input(false);
|
|
126
|
+
this.loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
127
127
|
/**
|
|
128
128
|
* @property {OutputEmitter<void>} reload
|
|
129
129
|
* @description
|
|
@@ -178,13 +178,13 @@ class ToolbarComponent {
|
|
|
178
178
|
onReload() {
|
|
179
179
|
this.reload.emit();
|
|
180
180
|
}
|
|
181
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
182
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
181
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: ToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
182
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.3", 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 }, searchVisible: { classPropertyName: "searchVisible", publicName: "searchVisible", isSignal: true, isRequired: false, transformFunction: null }, filterVisible: { classPropertyName: "filterVisible", publicName: "filterVisible", isSignal: true, isRequired: false, transformFunction: null }, reloadVisible: { classPropertyName: "reloadVisible", publicName: "reloadVisible", isSignal: true, isRequired: false, transformFunction: null }, reloadInterval: { classPropertyName: "reloadInterval", publicName: "reloadInterval", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchModel: "searchModelChange", filterModel: "filterModelChange", reload: "reload" }, ngImport: i0, template: "<div class=\"toolbar\">\n @if (showSearchInput() && searchVisible()) {\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 }\n @if (showFilterSelect() && filterVisible()) {\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 }\n <div class=\"toolbar__buttons\">\n @if (searchVisible()) {\n <tk-button\n [icon]=\"'magnifying-glass'\"\n severity=\"secondary\"\n [variant]=\"!showSearchInput() ? 'outlined' : undefined\"\n (clicked)=\"toggleSearchInput()\">\n </tk-button>\n }\n @if (filterVisible()) {\n <tk-button\n [icon]=\"'filter'\"\n severity=\"secondary\"\n [variant]=\"!showFilterSelect() ? 'outlined' : undefined\"\n (clicked)=\"toggleFilterSelect()\">\n </tk-button>\n }\n @if (reloadVisible()) {\n <tk-button\n class=\"toolbar__reload-btn\"\n [class.toolbar__reload-btn--animating]=\"\n reloadInterval() && reloadInterval()! > 0 && !loading()\n \"\n [class.toolbar__reload-btn--spinning]=\"loading()\"\n [style.--reload-interval]=\"(reloadInterval() ?? 0) + 'ms'\"\n [icon]=\"'arrows-rotate'\"\n severity=\"secondary\"\n variant=\"outlined\"\n (clicked)=\"onReload()\">\n </tk-button>\n }\n </div>\n</div>\n", styles: [".toolbar{display:flex;justify-content:end;flex-wrap:wrap;gap:var(--tk-spacing-base-50, .5rem);row-gap:var(--tk-spacing-base-150, 1.5rem)}.toolbar__input-container{width:15rem}.toolbar__buttons{display:flex;gap:var(--tk-spacing-base-50, .5rem);margin-top:var(--tk-spacing-base-50, .5rem)}.toolbar__reload-btn{border-radius:var(--tk-borderRadius-s, 8px)!important;position:relative}.toolbar__reload-btn--animating:before{content:\"\";position:absolute;inset:-2px;background:conic-gradient(var(--tk-color-base-sky-300, #92bada) var(--progress, 0%),transparent var(--progress, 0%));-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;padding:2px;border-radius:inherit;animation:draw-border var(--reload-interval, 5s) infinite linear;pointer-events:none}.toolbar__reload-btn--spinning ::ng-deep tk-icon{display:inline-block;animation:spin 1s infinite linear}@media(max-width:768px){.toolbar{justify-content:flex-start}}@property --progress{syntax: \"<percentage>\"; inherits: false; initial-value: 0%;}@keyframes draw-border{0%{--progress: 0%}to{--progress: 100%}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}: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", "tooltipText"], 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", "control", "options", "optionLabel", "label", "showClear", "disabled", "errorMessage", "hint", "model"], outputs: ["modelChange"] }] }); }
|
|
183
183
|
}
|
|
184
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
184
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: ToolbarComponent, decorators: [{
|
|
185
185
|
type: Component,
|
|
186
|
-
args: [{ selector: 'tk-toolbar', imports: [ButtonComponent, InputTextComponent, SelectComponent], template: "<div class=\"toolbar\">\n @if (showSearchInput() && searchVisible()) {\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 }\n @if (showFilterSelect() && filterVisible()) {\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 }\n <div class=\"toolbar__buttons\">\n @if (searchVisible()) {\n <tk-button\n [icon]=\"'magnifying-glass'\"\n severity=\"secondary\"\n [variant]=\"!showSearchInput() ? 'outlined' : undefined\"\n (clicked)=\"toggleSearchInput()\">\n </tk-button>\n }\n @if (filterVisible()) {\n <tk-button\n [icon]=\"'filter'\"\n severity=\"secondary\"\n [variant]=\"!showFilterSelect() ? 'outlined' : undefined\"\n (clicked)=\"toggleFilterSelect()\">\n </tk-button>\n }\n @if (reloadVisible()) {\n <tk-button\n class=\"toolbar__reload-btn\"\n [class.toolbar__reload-btn--animating]=\"\n reloadInterval() && reloadInterval()! > 0 && !loading()\n \"\n [class.toolbar__reload-btn--spinning]=\"loading()\"\n [style.--reload-interval]=\"(reloadInterval() ?? 0) + 'ms'\"\n [icon]=\"'arrows-rotate'\"\n severity=\"secondary\"\n variant=\"outlined\"\n (clicked)=\"onReload()\">\n </tk-button>\n }\n </div>\n</div>\n", styles: [".toolbar{display:flex;justify-content:end;flex-wrap:wrap;gap:var(--tk-spacing-base-50, .5rem);row-gap:var(--tk-spacing-base-150, 1.5rem)}.toolbar__input-container{width:15rem}.toolbar__buttons{display:flex;gap:var(--tk-spacing-base-50, .5rem);margin-top:var(--tk-spacing-base-50, .5rem)}.toolbar__reload-btn{border-radius:var(--tk-borderRadius-s, 8px)!important;position:relative}.toolbar__reload-btn--animating:before{content:\"\";position:absolute;inset:-2px;background:conic-gradient(var(--tk-color-base-sky-300, #92bada) var(--progress, 0%),transparent var(--progress, 0%));-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;padding:2px;border-radius:inherit;animation:draw-border var(--reload-interval, 5s) infinite linear;pointer-events:none}.toolbar__reload-btn--spinning ::ng-deep tk-icon{display:inline-block;animation:spin 1s infinite linear}@media
|
|
187
|
-
}], ctorParameters: () => [] });
|
|
186
|
+
args: [{ selector: 'tk-toolbar', imports: [ButtonComponent, InputTextComponent, SelectComponent], template: "<div class=\"toolbar\">\n @if (showSearchInput() && searchVisible()) {\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 }\n @if (showFilterSelect() && filterVisible()) {\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 }\n <div class=\"toolbar__buttons\">\n @if (searchVisible()) {\n <tk-button\n [icon]=\"'magnifying-glass'\"\n severity=\"secondary\"\n [variant]=\"!showSearchInput() ? 'outlined' : undefined\"\n (clicked)=\"toggleSearchInput()\">\n </tk-button>\n }\n @if (filterVisible()) {\n <tk-button\n [icon]=\"'filter'\"\n severity=\"secondary\"\n [variant]=\"!showFilterSelect() ? 'outlined' : undefined\"\n (clicked)=\"toggleFilterSelect()\">\n </tk-button>\n }\n @if (reloadVisible()) {\n <tk-button\n class=\"toolbar__reload-btn\"\n [class.toolbar__reload-btn--animating]=\"\n reloadInterval() && reloadInterval()! > 0 && !loading()\n \"\n [class.toolbar__reload-btn--spinning]=\"loading()\"\n [style.--reload-interval]=\"(reloadInterval() ?? 0) + 'ms'\"\n [icon]=\"'arrows-rotate'\"\n severity=\"secondary\"\n variant=\"outlined\"\n (clicked)=\"onReload()\">\n </tk-button>\n }\n </div>\n</div>\n", styles: [".toolbar{display:flex;justify-content:end;flex-wrap:wrap;gap:var(--tk-spacing-base-50, .5rem);row-gap:var(--tk-spacing-base-150, 1.5rem)}.toolbar__input-container{width:15rem}.toolbar__buttons{display:flex;gap:var(--tk-spacing-base-50, .5rem);margin-top:var(--tk-spacing-base-50, .5rem)}.toolbar__reload-btn{border-radius:var(--tk-borderRadius-s, 8px)!important;position:relative}.toolbar__reload-btn--animating:before{content:\"\";position:absolute;inset:-2px;background:conic-gradient(var(--tk-color-base-sky-300, #92bada) var(--progress, 0%),transparent var(--progress, 0%));-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;padding:2px;border-radius:inherit;animation:draw-border var(--reload-interval, 5s) infinite linear;pointer-events:none}.toolbar__reload-btn--spinning ::ng-deep tk-icon{display:inline-block;animation:spin 1s infinite linear}@media(max-width:768px){.toolbar{justify-content:flex-start}}@property --progress{syntax: \"<percentage>\"; inherits: false; initial-value: 0%;}@keyframes draw-border{0%{--progress: 0%}to{--progress: 100%}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host ::ng-deep .tk-input-bottom{display:none}:host ::ng-deep .p-button-outlined{border:1px solid transparent!important}\n"] }]
|
|
187
|
+
}], ctorParameters: () => [], propDecorators: { searchModel: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchModel", required: false }] }, { type: i0.Output, args: ["searchModelChange"] }], filterModel: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterModel", required: false }] }, { type: i0.Output, args: ["filterModelChange"] }], filterOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterOptions", required: false }] }], filterOptionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterOptionLabel", required: false }] }], filterFloatLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterFloatLabel", required: false }] }], searchFloatLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchFloatLabel", required: false }] }], searchVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchVisible", required: false }] }], filterVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterVisible", required: false }] }], reloadVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "reloadVisible", required: false }] }], reloadInterval: [{ type: i0.Input, args: [{ isSignal: true, alias: "reloadInterval", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], reload: [{ type: i0.Output, args: ["reload"] }] } });
|
|
188
188
|
|
|
189
189
|
/**
|
|
190
190
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +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, output } from '@angular/core';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\nimport {\n combineLatest,\n distinctUntilChanged,\n EMPTY,\n switchMap,\n timer,\n} from 'rxjs';\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 * @property {InputSignal<boolean>} searchVisible\n * @description\n * Controls the visibility of the search button.\n * @default true\n */\n searchVisible = input<boolean>(true);\n\n /**\n * @property {InputSignal<boolean>} filterVisible\n * @description\n * Controls the visibility of the filter button.\n * @default true\n */\n filterVisible = input<boolean>(true);\n\n /**\n * @property {InputSignal<boolean>} reloadVisible\n * @description\n * Controls the visibility of the reload button.\n * @default false\n */\n reloadVisible = input<boolean>(false);\n\n /**\n * @property {InputSignal<number | null>} reloadInterval\n * @description\n * Sets the interval for automatic reload in milliseconds.\n * If null, automatic reload is disabled.\n * @default null\n */\n reloadInterval = input<number | null>(null);\n\n /**\n * @property {InputSignal<boolean>} loading\n * @description\n * Controls the loading state of the reload button, triggering a rotation animation.\n * @default false\n */\n loading = input<boolean>(false);\n\n /**\n * @property {OutputEmitter<void>} reload\n * @description\n * Emits an event when the reload button is clicked or the automatic interval is reached.\n */\n reload = output<void>();\n\n /**\n * @method constructor\n * @description\n * Initializes the automatic reload logic using a declarative RxJS approach.\n */\n constructor() {\n combineLatest([\n toObservable(this.reloadInterval).pipe(distinctUntilChanged()),\n toObservable(this.loading).pipe(distinctUntilChanged()),\n ])\n .pipe(\n switchMap(([interval, isLoading]) => {\n if (isLoading || !interval || interval <= 0) {\n return EMPTY;\n }\n return timer(interval, interval);\n }),\n takeUntilDestroyed()\n )\n .subscribe(() => this.onReload());\n }\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 /**\n * @method onReload\n * @description\n * Emits the reload event.\n */\n onReload(): void {\n this.reload.emit();\n }\n}\n","<div class=\"toolbar\">\n @if (showSearchInput() && searchVisible()) {\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 }\n @if (showFilterSelect() && filterVisible()) {\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 }\n <div class=\"toolbar__buttons\">\n @if (searchVisible()) {\n <tk-button\n [icon]=\"'magnifying-glass'\"\n severity=\"secondary\"\n [variant]=\"!showSearchInput() ? 'outlined' : undefined\"\n (clicked)=\"toggleSearchInput()\">\n </tk-button>\n }\n @if (filterVisible()) {\n <tk-button\n [icon]=\"'filter'\"\n severity=\"secondary\"\n [variant]=\"!showFilterSelect() ? 'outlined' : undefined\"\n (clicked)=\"toggleFilterSelect()\">\n </tk-button>\n }\n @if (reloadVisible()) {\n <tk-button\n class=\"toolbar__reload-btn\"\n [class.toolbar__reload-btn--animating]=\"\n reloadInterval() && reloadInterval()! > 0 && !loading()\n \"\n [class.toolbar__reload-btn--spinning]=\"loading()\"\n [style.--reload-interval]=\"(reloadInterval() ?? 0) + 'ms'\"\n [icon]=\"'arrows-rotate'\"\n severity=\"secondary\"\n variant=\"outlined\"\n (clicked)=\"onReload()\">\n </tk-button>\n }\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAmBa,gBAAgB,CAAA;AAoI3B;;;;AAIG;AACH,IAAA,WAAA,GAAA;AAxIA;;;;;;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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AA,EAAA,kBAAkB,mMAAE,eAAe,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,IAAA,EAAA,SAAA,EAAA,SAAA,EAAA,aAAA,EAAA,OAAA,EAAA,WAAA,EAAA,UAAA,EAAA,cAAA,EAAA,MAAA,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,kvDAAA,EAAA,MAAA,EAAA,CAAA,q3CAAA,CAAA,EAAA;;;AEfjE;;AAEG;;;;"}
|
|
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, output } from '@angular/core';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\nimport {\n combineLatest,\n distinctUntilChanged,\n EMPTY,\n switchMap,\n timer,\n} from 'rxjs';\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 * @property {InputSignal<boolean>} searchVisible\n * @description\n * Controls the visibility of the search button.\n * @default true\n */\n searchVisible = input<boolean>(true);\n\n /**\n * @property {InputSignal<boolean>} filterVisible\n * @description\n * Controls the visibility of the filter button.\n * @default true\n */\n filterVisible = input<boolean>(true);\n\n /**\n * @property {InputSignal<boolean>} reloadVisible\n * @description\n * Controls the visibility of the reload button.\n * @default false\n */\n reloadVisible = input<boolean>(false);\n\n /**\n * @property {InputSignal<number | null>} reloadInterval\n * @description\n * Sets the interval for automatic reload in milliseconds.\n * If null, automatic reload is disabled.\n * @default null\n */\n reloadInterval = input<number | null>(null);\n\n /**\n * @property {InputSignal<boolean>} loading\n * @description\n * Controls the loading state of the reload button, triggering a rotation animation.\n * @default false\n */\n loading = input<boolean>(false);\n\n /**\n * @property {OutputEmitter<void>} reload\n * @description\n * Emits an event when the reload button is clicked or the automatic interval is reached.\n */\n reload = output<void>();\n\n /**\n * @method constructor\n * @description\n * Initializes the automatic reload logic using a declarative RxJS approach.\n */\n constructor() {\n combineLatest([\n toObservable(this.reloadInterval).pipe(distinctUntilChanged()),\n toObservable(this.loading).pipe(distinctUntilChanged()),\n ])\n .pipe(\n switchMap(([interval, isLoading]) => {\n if (isLoading || !interval || interval <= 0) {\n return EMPTY;\n }\n return timer(interval, interval);\n }),\n takeUntilDestroyed()\n )\n .subscribe(() => this.onReload());\n }\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 /**\n * @method onReload\n * @description\n * Emits the reload event.\n */\n onReload(): void {\n this.reload.emit();\n }\n}\n","<div class=\"toolbar\">\n @if (showSearchInput() && searchVisible()) {\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 }\n @if (showFilterSelect() && filterVisible()) {\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 }\n <div class=\"toolbar__buttons\">\n @if (searchVisible()) {\n <tk-button\n [icon]=\"'magnifying-glass'\"\n severity=\"secondary\"\n [variant]=\"!showSearchInput() ? 'outlined' : undefined\"\n (clicked)=\"toggleSearchInput()\">\n </tk-button>\n }\n @if (filterVisible()) {\n <tk-button\n [icon]=\"'filter'\"\n severity=\"secondary\"\n [variant]=\"!showFilterSelect() ? 'outlined' : undefined\"\n (clicked)=\"toggleFilterSelect()\">\n </tk-button>\n }\n @if (reloadVisible()) {\n <tk-button\n class=\"toolbar__reload-btn\"\n [class.toolbar__reload-btn--animating]=\"\n reloadInterval() && reloadInterval()! > 0 && !loading()\n \"\n [class.toolbar__reload-btn--spinning]=\"loading()\"\n [style.--reload-interval]=\"(reloadInterval() ?? 0) + 'ms'\"\n [icon]=\"'arrows-rotate'\"\n severity=\"secondary\"\n variant=\"outlined\"\n (clicked)=\"onReload()\">\n </tk-button>\n }\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAmBa,gBAAgB,CAAA;AAoI3B;;;;AAIG;AACH,IAAA,WAAA,GAAA;AAxIA;;;;;;AAMG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAS,EAAE,kFAAC;AAE/B;;;;;;AAMG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAgC,IAAI,kFAAC;AAExD;;;;;AAKG;AACH,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAU,KAAK,sFAAC;AAExC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QAAA,EAAA,IAAA,EAAA,gBAAgB,wuDCnB7B,kvDAuDA,EAAA,MAAA,EAAA,CAAA,m3CAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDxCY,eAAe,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,UAAA,EAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,MAAA,EAAA,MAAA,EAAA,aAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,kBAAkB,mMAAE,eAAe,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,IAAA,EAAA,SAAA,EAAA,SAAA,EAAA,aAAA,EAAA,OAAA,EAAA,WAAA,EAAA,UAAA,EAAA,cAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EAAA,OAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAInD,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,kvDAAA,EAAA,MAAA,EAAA,CAAA,m3CAAA,CAAA,EAAA;;;AEfjE;;AAEG;;;;"}
|
|
@@ -11,7 +11,7 @@ class TooltipComponent {
|
|
|
11
11
|
*
|
|
12
12
|
* @required
|
|
13
13
|
*/
|
|
14
|
-
this.content = input.required();
|
|
14
|
+
this.content = input.required(...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
|
|
15
15
|
/**
|
|
16
16
|
* @property {TooltipPosition} position
|
|
17
17
|
* @description
|
|
@@ -19,15 +19,15 @@ class TooltipComponent {
|
|
|
19
19
|
*
|
|
20
20
|
* @default 'top'
|
|
21
21
|
*/
|
|
22
|
-
this.position = input('top');
|
|
22
|
+
this.position = input('top', ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
23
23
|
}
|
|
24
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
25
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
24
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
25
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.3", type: TooltipComponent, isStandalone: true, selector: "tk-tooltip", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<span [pTooltip]=\"content()\" [tooltipPosition]=\"position()\" class=\"tk-tooltip-wrapper\">\n <ng-content></ng-content>\n</span>\n", styles: [":host{display:inline-block}.tk-tooltip-wrapper{display:inline-block}\n"], dependencies: [{ kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }] }); }
|
|
26
26
|
}
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
28
28
|
type: Component,
|
|
29
29
|
args: [{ selector: 'tk-tooltip', imports: [Tooltip], template: "<span [pTooltip]=\"content()\" [tooltipPosition]=\"position()\" class=\"tk-tooltip-wrapper\">\n <ng-content></ng-content>\n</span>\n", styles: [":host{display:inline-block}.tk-tooltip-wrapper{display:inline-block}\n"] }]
|
|
30
|
-
}] });
|
|
30
|
+
}], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: true }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }] } });
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tekus-design-system-components-tooltip.mjs","sources":["../../../projects/design-system/components/tooltip/src/tooltip.component.ts","../../../projects/design-system/components/tooltip/src/tooltip.component.html","../../../projects/design-system/components/tooltip/tekus-design-system-components-tooltip.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport { Tooltip } from 'primeng/tooltip';\n\n/**\n * @component TooltipComponent\n * @description\n * Wrapper component that applies a PrimeNG tooltip to its projected content.\n * It allows defining the tooltip text and its position relative to the content.\n *\n * @usage\n * ```html\n * <tk-tooltip content=\"Tooltip text\" position=\"top\">\n * <button>Hover me</button>\n * </tk-tooltip>\n * ```\n */\nexport type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';\n\n@Component({\n selector: 'tk-tooltip',\n imports: [Tooltip],\n templateUrl: './tooltip.component.html',\n styleUrl: './tooltip.component.scss'\n})\nexport class TooltipComponent {\n /**\n * @property {string} content\n * @description\n * The text to be displayed in the tooltip.\n *\n * @required\n */\n content = input.required<string>();\n\n /**\n * @property {TooltipPosition} position\n * @description\n * Position of the tooltip relative to the element.\n *\n * @default 'top'\n */\n position = input<TooltipPosition>('top');\n}\n","<span [pTooltip]=\"content()\" [tooltipPosition]=\"position()\" class=\"tk-tooltip-wrapper\">\n <ng-content></ng-content>\n</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAwBa,gBAAgB,CAAA;AAN7B,IAAA,WAAA,GAAA;AAOE;;;;;;AAMG;AACH,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,
|
|
1
|
+
{"version":3,"file":"tekus-design-system-components-tooltip.mjs","sources":["../../../projects/design-system/components/tooltip/src/tooltip.component.ts","../../../projects/design-system/components/tooltip/src/tooltip.component.html","../../../projects/design-system/components/tooltip/tekus-design-system-components-tooltip.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport { Tooltip } from 'primeng/tooltip';\n\n/**\n * @component TooltipComponent\n * @description\n * Wrapper component that applies a PrimeNG tooltip to its projected content.\n * It allows defining the tooltip text and its position relative to the content.\n *\n * @usage\n * ```html\n * <tk-tooltip content=\"Tooltip text\" position=\"top\">\n * <button>Hover me</button>\n * </tk-tooltip>\n * ```\n */\nexport type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';\n\n@Component({\n selector: 'tk-tooltip',\n imports: [Tooltip],\n templateUrl: './tooltip.component.html',\n styleUrl: './tooltip.component.scss'\n})\nexport class TooltipComponent {\n /**\n * @property {string} content\n * @description\n * The text to be displayed in the tooltip.\n *\n * @required\n */\n content = input.required<string>();\n\n /**\n * @property {TooltipPosition} position\n * @description\n * Position of the tooltip relative to the element.\n *\n * @default 'top'\n */\n position = input<TooltipPosition>('top');\n}\n","<span [pTooltip]=\"content()\" [tooltipPosition]=\"position()\" class=\"tk-tooltip-wrapper\">\n <ng-content></ng-content>\n</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAwBa,gBAAgB,CAAA;AAN7B,IAAA,WAAA,GAAA;AAOE;;;;;;AAMG;AACH,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,6EAAU;AAElC;;;;;;AAMG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAkB,KAAK,+EAAC;AACzC,IAAA;8GAlBY,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA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
|
|
13
13
|
constructor() {
|
|
14
14
|
/** Main title text for the topbar. */
|
|
15
|
-
this.title = input.required();
|
|
15
|
+
this.title = input.required(...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
16
16
|
/** Optional list of actions displayed in the header. */
|
|
17
|
-
this.actions = input(null);
|
|
17
|
+
this.actions = input(null, ...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
18
18
|
/** Optional list of tags displayed in the meta section. */
|
|
19
|
-
this.tags = input(null);
|
|
19
|
+
this.tags = input(null, ...(ngDevMode ? [{ debugName: "tags" }] : /* istanbul ignore next */ []));
|
|
20
20
|
/** Optional description displayed in the meta section. */
|
|
21
|
-
this.description = input(null);
|
|
21
|
+
this.description = input(null, ...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
|
|
22
22
|
}
|
|
23
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
24
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
23
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: TopbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.3", 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
25
|
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: TopbarComponent, decorators: [{
|
|
27
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
|
|
29
|
-
}] });
|
|
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
|
+
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], tags: [{ type: i0.Input, args: [{ isSignal: true, alias: "tags", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }] } });
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Generated bundle index. Do not edit.
|