@tekus/design-system 5.2.0 → 5.3.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/components/date-picker/index.d.ts +5 -0
- package/components/date-picker/public-api.d.ts +1 -0
- package/components/date-picker/src/date-picker.component.d.ts +156 -0
- package/fesm2022/tekus-design-system-components-date-picker.mjs +266 -0
- package/fesm2022/tekus-design-system-components-date-picker.mjs.map +1 -0
- package/fesm2022/tekus-design-system-components-modal.mjs +2 -2
- package/fesm2022/tekus-design-system-components-modal.mjs.map +1 -1
- package/fesm2022/tekus-design-system-core-types.mjs +10 -9
- package/fesm2022/tekus-design-system-core-types.mjs.map +1 -1
- package/fesm2022/tekus-design-system-core.mjs +10 -9
- package/fesm2022/tekus-design-system-core.mjs.map +1 -1
- package/package.json +9 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/date-picker.component';
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { EventEmitter, OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { FormControl, ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export type DateValue = Date | [Date, Date] | null;
|
|
5
|
+
export declare class DatePickerComponent implements OnInit, OnDestroy, ControlValueAccessor {
|
|
6
|
+
/**
|
|
7
|
+
* @property {'single' | 'range'} selectionMode
|
|
8
|
+
* @description
|
|
9
|
+
* Defines how the datepicker behaves:
|
|
10
|
+
* - `'single'`: select one date
|
|
11
|
+
* - `'range'`: select a pair of dates [start, end]
|
|
12
|
+
* @default 'range'
|
|
13
|
+
*/
|
|
14
|
+
selectionMode: 'single' | 'range';
|
|
15
|
+
/**
|
|
16
|
+
* @property {boolean} readonlyInput
|
|
17
|
+
* @description
|
|
18
|
+
* Disables manual typing in the input and forces the user to select via the calendar.
|
|
19
|
+
* @default true
|
|
20
|
+
*/
|
|
21
|
+
readonlyInput: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* @property {boolean} showClear
|
|
24
|
+
* @description
|
|
25
|
+
* Displays a clear button that resets the datepicker value.
|
|
26
|
+
* @default true
|
|
27
|
+
*/
|
|
28
|
+
showClear: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* @property {boolean} showIcon
|
|
31
|
+
* @description
|
|
32
|
+
* Shows the calendar icon inside the input.
|
|
33
|
+
* @default true
|
|
34
|
+
*/
|
|
35
|
+
showIcon: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* @property {string} dateFormat
|
|
38
|
+
* @description
|
|
39
|
+
* Format used by PrimeNG for displaying dates.
|
|
40
|
+
* @default 'mm/dd/yy'
|
|
41
|
+
*/
|
|
42
|
+
dateFormat: string;
|
|
43
|
+
/**
|
|
44
|
+
* @property {Date | null} maxDate
|
|
45
|
+
* @description
|
|
46
|
+
* Maximum selectable date. When set, the calendar will prevent selecting dates after this value.
|
|
47
|
+
* Provide a JavaScript Date object. Use `null` to allow any future date.
|
|
48
|
+
* @default null
|
|
49
|
+
*/
|
|
50
|
+
maxDate: Date | null;
|
|
51
|
+
/**
|
|
52
|
+
* @property {Date | null} minDate
|
|
53
|
+
* @description
|
|
54
|
+
* Minimum selectable date. When set, the calendar will prevent selecting dates before this value.
|
|
55
|
+
* Provide a JavaScript Date object. Use `null` to allow any past date.
|
|
56
|
+
* @default null
|
|
57
|
+
*/
|
|
58
|
+
minDate: Date | null;
|
|
59
|
+
/**
|
|
60
|
+
* @property {string} labelText
|
|
61
|
+
* @description
|
|
62
|
+
* Label shown by the float-label wrapper.
|
|
63
|
+
* @default 'Select a date'
|
|
64
|
+
*/
|
|
65
|
+
labelText: string;
|
|
66
|
+
/**
|
|
67
|
+
* @private
|
|
68
|
+
* @property {FormControl<DateValue>} internalControl
|
|
69
|
+
* @description
|
|
70
|
+
* The internal FormControl used in the template. It handles value synchronization
|
|
71
|
+
* for both CVA and the optional external control input.
|
|
72
|
+
*/
|
|
73
|
+
internalControl: FormControl<DateValue>;
|
|
74
|
+
/**
|
|
75
|
+
* @private
|
|
76
|
+
* @property {Subscription} sub
|
|
77
|
+
* @description Subscription to the valueChanges observable.
|
|
78
|
+
*/
|
|
79
|
+
private sub;
|
|
80
|
+
private onChange;
|
|
81
|
+
private onTouched;
|
|
82
|
+
/**
|
|
83
|
+
* @property {FormControl<DateValue> | null} control
|
|
84
|
+
* @description
|
|
85
|
+
* Allows passing an external FormControl (traditional Reactive Forms usage).
|
|
86
|
+
* If provided, it overrides the internal control.
|
|
87
|
+
*/
|
|
88
|
+
set control(ctrl: FormControl<DateValue> | null);
|
|
89
|
+
get control(): FormControl<DateValue>;
|
|
90
|
+
/**
|
|
91
|
+
* @event handleSelect
|
|
92
|
+
* @description
|
|
93
|
+
* Emitted when:
|
|
94
|
+
* - single mode → a valid Date is selected
|
|
95
|
+
* - range mode → both start and end dates are selected
|
|
96
|
+
*
|
|
97
|
+
* Payload:
|
|
98
|
+
* - Date (single mode)
|
|
99
|
+
* - [Date, Date] (completed range)
|
|
100
|
+
*/
|
|
101
|
+
handleSelect: EventEmitter<DateValue>;
|
|
102
|
+
/**
|
|
103
|
+
* @event handleClear
|
|
104
|
+
* @description
|
|
105
|
+
* Emitted when the control's value becomes `null`.
|
|
106
|
+
*/
|
|
107
|
+
handleClear: EventEmitter<void>;
|
|
108
|
+
/**
|
|
109
|
+
* @property faCalendarDay
|
|
110
|
+
* @description
|
|
111
|
+
* Icon displayed inside the datepicker input.
|
|
112
|
+
*/
|
|
113
|
+
faCalendarDay: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
114
|
+
/**
|
|
115
|
+
* @method writeValue
|
|
116
|
+
* @description Writes a new value from the form model (ngModel or formControl) into the component.
|
|
117
|
+
*/
|
|
118
|
+
writeValue(value: DateValue): void;
|
|
119
|
+
/**
|
|
120
|
+
* @method registerOnChange
|
|
121
|
+
* @description Registers a callback function to be called when the control's value changes.
|
|
122
|
+
*/
|
|
123
|
+
registerOnChange(fn: (value: DateValue) => void): void;
|
|
124
|
+
/**
|
|
125
|
+
* @method registerOnTouched
|
|
126
|
+
* @description Registers a callback function to be called when the control receives a blur event (is touched).
|
|
127
|
+
*/
|
|
128
|
+
registerOnTouched(fn: () => void): void;
|
|
129
|
+
/**
|
|
130
|
+
* @method setDisabledState
|
|
131
|
+
* @description Called when the control should be disabled or enabled.
|
|
132
|
+
*/
|
|
133
|
+
setDisabledState(isDisabled: boolean): void;
|
|
134
|
+
/**
|
|
135
|
+
* @method ngOnInit
|
|
136
|
+
* @description
|
|
137
|
+
* Subscribes to the internal control's valueChanges:
|
|
138
|
+
* 1. Notifies the external form (CVA) via `this.onChange()`.
|
|
139
|
+
* 2. Emits the semantic events `handleSelect` or `handleClear`.
|
|
140
|
+
*/
|
|
141
|
+
ngOnInit(): void;
|
|
142
|
+
/**
|
|
143
|
+
* @method ngOnDestroy
|
|
144
|
+
* @description Cleans up the internal subscription when the component is destroyed.
|
|
145
|
+
*/
|
|
146
|
+
ngOnDestroy(): void;
|
|
147
|
+
/**
|
|
148
|
+
* @method clear
|
|
149
|
+
* @description
|
|
150
|
+
* Programmatically clears the control's value,
|
|
151
|
+
* which automatically triggers `handleClear`.
|
|
152
|
+
*/
|
|
153
|
+
clear(): void;
|
|
154
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatePickerComponent, never>;
|
|
155
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerComponent, "tk-date-picker", never, { "selectionMode": { "alias": "selectionMode"; "required": false; }; "readonlyInput": { "alias": "readonlyInput"; "required": false; }; "showClear": { "alias": "showClear"; "required": false; }; "showIcon": { "alias": "showIcon"; "required": false; }; "dateFormat": { "alias": "dateFormat"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "labelText": { "alias": "labelText"; "required": false; }; "control": { "alias": "control"; "required": false; }; }, { "handleSelect": "handleSelect"; "handleClear": "handleClear"; }, never, never, true, never>;
|
|
156
|
+
}
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { forwardRef, EventEmitter, Output, Input, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/forms';
|
|
4
|
+
import { NG_VALUE_ACCESSOR, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
+
import * as i2 from 'primeng/datepicker';
|
|
6
|
+
import { DatePickerModule } from 'primeng/datepicker';
|
|
7
|
+
import * as i3 from 'primeng/floatlabel';
|
|
8
|
+
import { FloatLabelModule } from 'primeng/floatlabel';
|
|
9
|
+
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
|
10
|
+
import { faCalendarDay } from '@fortawesome/pro-regular-svg-icons';
|
|
11
|
+
|
|
12
|
+
const TK_DATE_PICKER_VALUE_ACCESSOR = {
|
|
13
|
+
provide: NG_VALUE_ACCESSOR,
|
|
14
|
+
useExisting: forwardRef(() => DatePickerComponent),
|
|
15
|
+
multi: true,
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* @component DatePickerComponent
|
|
19
|
+
* @description
|
|
20
|
+
* A wrapper around PrimeNG's DatePicker component with support for single-date
|
|
21
|
+
* and range selection modes. It is compatible with both Reactive Forms (formControlName, [control])
|
|
22
|
+
* and Template-Driven Forms ([(ngModel)]).
|
|
23
|
+
*
|
|
24
|
+
* The component emits:
|
|
25
|
+
* - `handleSelect` when a valid single date or a completed date range is selected.
|
|
26
|
+
* - `handleClear` when the control is cleared (value becomes `null`).
|
|
27
|
+
*/
|
|
28
|
+
class DatePickerComponent {
|
|
29
|
+
constructor() {
|
|
30
|
+
/**
|
|
31
|
+
* @property {'single' | 'range'} selectionMode
|
|
32
|
+
* @description
|
|
33
|
+
* Defines how the datepicker behaves:
|
|
34
|
+
* - `'single'`: select one date
|
|
35
|
+
* - `'range'`: select a pair of dates [start, end]
|
|
36
|
+
* @default 'range'
|
|
37
|
+
*/
|
|
38
|
+
this.selectionMode = 'range';
|
|
39
|
+
/**
|
|
40
|
+
* @property {boolean} readonlyInput
|
|
41
|
+
* @description
|
|
42
|
+
* Disables manual typing in the input and forces the user to select via the calendar.
|
|
43
|
+
* @default true
|
|
44
|
+
*/
|
|
45
|
+
this.readonlyInput = true;
|
|
46
|
+
/**
|
|
47
|
+
* @property {boolean} showClear
|
|
48
|
+
* @description
|
|
49
|
+
* Displays a clear button that resets the datepicker value.
|
|
50
|
+
* @default true
|
|
51
|
+
*/
|
|
52
|
+
this.showClear = true;
|
|
53
|
+
/**
|
|
54
|
+
* @property {boolean} showIcon
|
|
55
|
+
* @description
|
|
56
|
+
* Shows the calendar icon inside the input.
|
|
57
|
+
* @default true
|
|
58
|
+
*/
|
|
59
|
+
this.showIcon = true;
|
|
60
|
+
/**
|
|
61
|
+
* @property {string} dateFormat
|
|
62
|
+
* @description
|
|
63
|
+
* Format used by PrimeNG for displaying dates.
|
|
64
|
+
* @default 'mm/dd/yy'
|
|
65
|
+
*/
|
|
66
|
+
this.dateFormat = 'mm/dd/yy';
|
|
67
|
+
/**
|
|
68
|
+
* @property {Date | null} maxDate
|
|
69
|
+
* @description
|
|
70
|
+
* Maximum selectable date. When set, the calendar will prevent selecting dates after this value.
|
|
71
|
+
* Provide a JavaScript Date object. Use `null` to allow any future date.
|
|
72
|
+
* @default null
|
|
73
|
+
*/
|
|
74
|
+
this.maxDate = null;
|
|
75
|
+
/**
|
|
76
|
+
* @property {Date | null} minDate
|
|
77
|
+
* @description
|
|
78
|
+
* Minimum selectable date. When set, the calendar will prevent selecting dates before this value.
|
|
79
|
+
* Provide a JavaScript Date object. Use `null` to allow any past date.
|
|
80
|
+
* @default null
|
|
81
|
+
*/
|
|
82
|
+
this.minDate = null;
|
|
83
|
+
/**
|
|
84
|
+
* @property {string} labelText
|
|
85
|
+
* @description
|
|
86
|
+
* Label shown by the float-label wrapper.
|
|
87
|
+
* @default 'Select a date'
|
|
88
|
+
*/
|
|
89
|
+
this.labelText = 'Select a date';
|
|
90
|
+
/**
|
|
91
|
+
* @private
|
|
92
|
+
* @property {FormControl<DateValue>} internalControl
|
|
93
|
+
* @description
|
|
94
|
+
* The internal FormControl used in the template. It handles value synchronization
|
|
95
|
+
* for both CVA and the optional external control input.
|
|
96
|
+
*/
|
|
97
|
+
this.internalControl = new FormControl(null);
|
|
98
|
+
// Functions registered by ControlValueAccessor to communicate with the outside form
|
|
99
|
+
this.onChange = () => { };
|
|
100
|
+
this.onTouched = () => { };
|
|
101
|
+
/**
|
|
102
|
+
* @event handleSelect
|
|
103
|
+
* @description
|
|
104
|
+
* Emitted when:
|
|
105
|
+
* - single mode → a valid Date is selected
|
|
106
|
+
* - range mode → both start and end dates are selected
|
|
107
|
+
*
|
|
108
|
+
* Payload:
|
|
109
|
+
* - Date (single mode)
|
|
110
|
+
* - [Date, Date] (completed range)
|
|
111
|
+
*/
|
|
112
|
+
this.handleSelect = new EventEmitter();
|
|
113
|
+
/**
|
|
114
|
+
* @event handleClear
|
|
115
|
+
* @description
|
|
116
|
+
* Emitted when the control's value becomes `null`.
|
|
117
|
+
*/
|
|
118
|
+
this.handleClear = new EventEmitter();
|
|
119
|
+
/**
|
|
120
|
+
* @property faCalendarDay
|
|
121
|
+
* @description
|
|
122
|
+
* Icon displayed inside the datepicker input.
|
|
123
|
+
*/
|
|
124
|
+
this.faCalendarDay = faCalendarDay;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* @property {FormControl<DateValue> | null} control
|
|
128
|
+
* @description
|
|
129
|
+
* Allows passing an external FormControl (traditional Reactive Forms usage).
|
|
130
|
+
* If provided, it overrides the internal control.
|
|
131
|
+
*/
|
|
132
|
+
set control(ctrl) {
|
|
133
|
+
// If the user provides a control, we use that control for everything.
|
|
134
|
+
if (ctrl) {
|
|
135
|
+
this.internalControl = ctrl;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
get control() {
|
|
139
|
+
return this.internalControl;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* @method writeValue
|
|
143
|
+
* @description Writes a new value from the form model (ngModel or formControl) into the component.
|
|
144
|
+
*/
|
|
145
|
+
writeValue(value) {
|
|
146
|
+
if (value !== undefined) {
|
|
147
|
+
// Use { emitEvent: false } to prevent an unnecessary valueChanges loop.
|
|
148
|
+
this.internalControl.setValue(value, { emitEvent: false });
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* @method registerOnChange
|
|
153
|
+
* @description Registers a callback function to be called when the control's value changes.
|
|
154
|
+
*/
|
|
155
|
+
registerOnChange(fn) {
|
|
156
|
+
this.onChange = fn;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* @method registerOnTouched
|
|
160
|
+
* @description Registers a callback function to be called when the control receives a blur event (is touched).
|
|
161
|
+
*/
|
|
162
|
+
registerOnTouched(fn) {
|
|
163
|
+
this.onTouched = fn;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* @method setDisabledState
|
|
167
|
+
* @description Called when the control should be disabled or enabled.
|
|
168
|
+
*/
|
|
169
|
+
setDisabledState(isDisabled) {
|
|
170
|
+
const actionMap = {
|
|
171
|
+
true: () => this.internalControl.disable(),
|
|
172
|
+
false: () => this.internalControl.enable(),
|
|
173
|
+
};
|
|
174
|
+
actionMap[String(isDisabled)]();
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* @method ngOnInit
|
|
178
|
+
* @description
|
|
179
|
+
* Subscribes to the internal control's valueChanges:
|
|
180
|
+
* 1. Notifies the external form (CVA) via `this.onChange()`.
|
|
181
|
+
* 2. Emits the semantic events `handleSelect` or `handleClear`.
|
|
182
|
+
*/
|
|
183
|
+
ngOnInit() {
|
|
184
|
+
this.sub = this.internalControl.valueChanges.subscribe(value => {
|
|
185
|
+
// Notify the CVA / External Form
|
|
186
|
+
this.onChange(value);
|
|
187
|
+
this.onTouched();
|
|
188
|
+
if (value === null) {
|
|
189
|
+
this.handleClear.emit();
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
// RANGE MODE
|
|
193
|
+
if (this.selectionMode === 'range') {
|
|
194
|
+
if (Array.isArray(value)) {
|
|
195
|
+
const [start, end] = value;
|
|
196
|
+
// Emit ONLY when both dates exist
|
|
197
|
+
if (start instanceof Date && end instanceof Date) {
|
|
198
|
+
this.handleSelect.emit([start, end]);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
// SINGLE MODE
|
|
204
|
+
if (this.selectionMode === 'single' && value instanceof Date) {
|
|
205
|
+
this.handleSelect.emit(value);
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* @method ngOnDestroy
|
|
211
|
+
* @description Cleans up the internal subscription when the component is destroyed.
|
|
212
|
+
*/
|
|
213
|
+
ngOnDestroy() {
|
|
214
|
+
this.sub?.unsubscribe();
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* @method clear
|
|
218
|
+
* @description
|
|
219
|
+
* Programmatically clears the control's value,
|
|
220
|
+
* which automatically triggers `handleClear`.
|
|
221
|
+
*/
|
|
222
|
+
clear() {
|
|
223
|
+
this.internalControl.setValue(null);
|
|
224
|
+
}
|
|
225
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DatePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
226
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DatePickerComponent, isStandalone: true, selector: "tk-date-picker", inputs: { selectionMode: "selectionMode", readonlyInput: "readonlyInput", showClear: "showClear", showIcon: "showIcon", dateFormat: "dateFormat", maxDate: "maxDate", minDate: "minDate", labelText: "labelText", control: "control" }, outputs: { handleSelect: "handleSelect", handleClear: "handleClear" }, providers: [TK_DATE_PICKER_VALUE_ACCESSOR], ngImport: i0, template: "<div class=\"datepicker-container\">\n <p-floatlabel>\n <p-datepicker\n inputId=\"datepicker\"\n iconDisplay=\"input\"\n [formControl]=\"internalControl\"\n [selectionMode]=\"selectionMode\"\n [readonlyInput]=\"readonlyInput\"\n [showClear]=\"showClear\"\n [showIcon]=\"showIcon\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [dateFormat]=\"dateFormat\">\n <ng-template #inputicon let-clickCallBack=\"clickCallBack\">\n <fa-icon\n tabindex=\"0\"\n [icon]=\"faCalendarDay\"\n (keydown.enter)=\"clickCallBack($event)\"\n (keydown.space)=\"clickCallBack($event)\"\n (click)=\"clickCallBack($event)\">\n </fa-icon>\n </ng-template>\n </p-datepicker>\n\n <label for=\"datepicker\">{{ labelText }}</label>\n </p-floatlabel>\n</div>\n", styles: [":host ::ng-deep .p-datepicker{width:100%}:host ::ng-deep .p-datepicker-input{border:none;border-bottom:1px solid var(--tk-color-border-default, #cecdcd);border-radius:0}:host ::ng-deep .p-datepicker-input:focus{border-color:var(--tk-color-accent-default, #16006f)}:host ::ng-deep .p-datepicker-decade{color:var(--tk-color-text-default, #121214)}:host ::ng-deep .p-datepicker-clear-icon{color:var(--tk-surface-700, #424243);inset-inline-end:2.5rem!important}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-filled) label,:host ::ng-deep .p-floatlabel:has(input:focus) label{color:var(--tk-primary-500, #16006f)}:host ::ng-deep .p-floatlabel label{color:var(--tk-surface-700, #8a8a8b);font-family:var(--tk-font-family, Poppins, sans-serif);font-size:var(--tk-font-size-2xs, 1rem);font-weight:var(--tk-font-weight-400, 400)}:host ::ng-deep .p-datepicker-day-selected-range{background-color:var(--tk-primary-100, #b7b0d2);color:var(--tk-primary-700, #10004f)}:host ::ng-deep .p-datepicker-panel{top:-383px!important}.datepicker-container{margin-top:var(--tk-spacing-base-200, 2rem)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i2.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "fluid", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "variant", "size", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: i3.FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }] }); }
|
|
227
|
+
}
|
|
228
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DatePickerComponent, decorators: [{
|
|
229
|
+
type: Component,
|
|
230
|
+
args: [{ selector: 'tk-date-picker', standalone: true, imports: [
|
|
231
|
+
FormsModule,
|
|
232
|
+
ReactiveFormsModule,
|
|
233
|
+
DatePickerModule,
|
|
234
|
+
FloatLabelModule,
|
|
235
|
+
FaIconComponent,
|
|
236
|
+
], providers: [TK_DATE_PICKER_VALUE_ACCESSOR], template: "<div class=\"datepicker-container\">\n <p-floatlabel>\n <p-datepicker\n inputId=\"datepicker\"\n iconDisplay=\"input\"\n [formControl]=\"internalControl\"\n [selectionMode]=\"selectionMode\"\n [readonlyInput]=\"readonlyInput\"\n [showClear]=\"showClear\"\n [showIcon]=\"showIcon\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [dateFormat]=\"dateFormat\">\n <ng-template #inputicon let-clickCallBack=\"clickCallBack\">\n <fa-icon\n tabindex=\"0\"\n [icon]=\"faCalendarDay\"\n (keydown.enter)=\"clickCallBack($event)\"\n (keydown.space)=\"clickCallBack($event)\"\n (click)=\"clickCallBack($event)\">\n </fa-icon>\n </ng-template>\n </p-datepicker>\n\n <label for=\"datepicker\">{{ labelText }}</label>\n </p-floatlabel>\n</div>\n", styles: [":host ::ng-deep .p-datepicker{width:100%}:host ::ng-deep .p-datepicker-input{border:none;border-bottom:1px solid var(--tk-color-border-default, #cecdcd);border-radius:0}:host ::ng-deep .p-datepicker-input:focus{border-color:var(--tk-color-accent-default, #16006f)}:host ::ng-deep .p-datepicker-decade{color:var(--tk-color-text-default, #121214)}:host ::ng-deep .p-datepicker-clear-icon{color:var(--tk-surface-700, #424243);inset-inline-end:2.5rem!important}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-filled) label,:host ::ng-deep .p-floatlabel:has(input:focus) label{color:var(--tk-primary-500, #16006f)}:host ::ng-deep .p-floatlabel label{color:var(--tk-surface-700, #8a8a8b);font-family:var(--tk-font-family, Poppins, sans-serif);font-size:var(--tk-font-size-2xs, 1rem);font-weight:var(--tk-font-weight-400, 400)}:host ::ng-deep .p-datepicker-day-selected-range{background-color:var(--tk-primary-100, #b7b0d2);color:var(--tk-primary-700, #10004f)}:host ::ng-deep .p-datepicker-panel{top:-383px!important}.datepicker-container{margin-top:var(--tk-spacing-base-200, 2rem)}\n"] }]
|
|
237
|
+
}], propDecorators: { selectionMode: [{
|
|
238
|
+
type: Input
|
|
239
|
+
}], readonlyInput: [{
|
|
240
|
+
type: Input
|
|
241
|
+
}], showClear: [{
|
|
242
|
+
type: Input
|
|
243
|
+
}], showIcon: [{
|
|
244
|
+
type: Input
|
|
245
|
+
}], dateFormat: [{
|
|
246
|
+
type: Input
|
|
247
|
+
}], maxDate: [{
|
|
248
|
+
type: Input
|
|
249
|
+
}], minDate: [{
|
|
250
|
+
type: Input
|
|
251
|
+
}], labelText: [{
|
|
252
|
+
type: Input
|
|
253
|
+
}], control: [{
|
|
254
|
+
type: Input
|
|
255
|
+
}], handleSelect: [{
|
|
256
|
+
type: Output
|
|
257
|
+
}], handleClear: [{
|
|
258
|
+
type: Output
|
|
259
|
+
}] } });
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Generated bundle index. Do not edit.
|
|
263
|
+
*/
|
|
264
|
+
|
|
265
|
+
export { DatePickerComponent };
|
|
266
|
+
//# sourceMappingURL=tekus-design-system-components-date-picker.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tekus-design-system-components-date-picker.mjs","sources":["../../../projects/design-system/components/date-picker/src/date-picker.component.ts","../../../projects/design-system/components/date-picker/src/date-picker.component.html","../../../projects/design-system/components/date-picker/tekus-design-system-components-date-picker.ts"],"sourcesContent":["import {\n Component,\n Input,\n Output,\n EventEmitter,\n OnInit,\n OnDestroy,\n forwardRef,\n} from '@angular/core';\nimport {\n FormsModule,\n ReactiveFormsModule,\n FormControl,\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n} from '@angular/forms';\nimport { Subscription } from 'rxjs';\n\nimport { DatePickerModule } from 'primeng/datepicker';\nimport { FloatLabelModule } from 'primeng/floatlabel';\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\nimport { faCalendarDay } from '@fortawesome/pro-regular-svg-icons';\n\nconst TK_DATE_PICKER_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DatePickerComponent),\n multi: true,\n};\n\nexport type DateValue = Date | [Date, Date] | null;\n@Component({\n selector: 'tk-date-picker',\n standalone: true,\n imports: [\n FormsModule,\n ReactiveFormsModule,\n DatePickerModule,\n FloatLabelModule,\n FaIconComponent,\n ],\n providers: [TK_DATE_PICKER_VALUE_ACCESSOR],\n templateUrl: './date-picker.component.html',\n styleUrls: ['./date-picker.component.scss'],\n})\n/**\n * @component DatePickerComponent\n * @description\n * A wrapper around PrimeNG's DatePicker component with support for single-date\n * and range selection modes. It is compatible with both Reactive Forms (formControlName, [control])\n * and Template-Driven Forms ([(ngModel)]).\n *\n * The component emits:\n * - `handleSelect` when a valid single date or a completed date range is selected.\n * - `handleClear` when the control is cleared (value becomes `null`).\n */\nexport class DatePickerComponent\n implements OnInit, OnDestroy, ControlValueAccessor\n{\n /**\n * @property {'single' | 'range'} selectionMode\n * @description\n * Defines how the datepicker behaves:\n * - `'single'`: select one date\n * - `'range'`: select a pair of dates [start, end]\n * @default 'range'\n */\n @Input() selectionMode: 'single' | 'range' = 'range';\n\n /**\n * @property {boolean} readonlyInput\n * @description\n * Disables manual typing in the input and forces the user to select via the calendar.\n * @default true\n */\n @Input() readonlyInput = true;\n\n /**\n * @property {boolean} showClear\n * @description\n * Displays a clear button that resets the datepicker value.\n * @default true\n */\n @Input() showClear = true;\n\n /**\n * @property {boolean} showIcon\n * @description\n * Shows the calendar icon inside the input.\n * @default true\n */\n @Input() showIcon = true;\n\n /**\n * @property {string} dateFormat\n * @description\n * Format used by PrimeNG for displaying dates.\n * @default 'mm/dd/yy'\n */\n @Input() dateFormat = 'mm/dd/yy';\n\n /**\n * @property {Date | null} maxDate\n * @description\n * Maximum selectable date. When set, the calendar will prevent selecting dates after this value.\n * Provide a JavaScript Date object. Use `null` to allow any future date.\n * @default null\n */\n @Input() maxDate: Date | null = null;\n\n /**\n * @property {Date | null} minDate\n * @description\n * Minimum selectable date. When set, the calendar will prevent selecting dates before this value.\n * Provide a JavaScript Date object. Use `null` to allow any past date.\n * @default null\n */\n @Input() minDate: Date | null = null;\n\n /**\n * @property {string} labelText\n * @description\n * Label shown by the float-label wrapper.\n * @default 'Select a date'\n */\n @Input() labelText = 'Select a date';\n\n /**\n * @private\n * @property {FormControl<DateValue>} internalControl\n * @description\n * The internal FormControl used in the template. It handles value synchronization\n * for both CVA and the optional external control input.\n */\n internalControl = new FormControl<DateValue>(null);\n\n /**\n * @private\n * @property {Subscription} sub\n * @description Subscription to the valueChanges observable.\n */\n private sub!: Subscription;\n\n // Functions registered by ControlValueAccessor to communicate with the outside form\n private onChange: (value: DateValue) => void = () => {};\n private onTouched: () => void = () => {};\n\n /**\n * @property {FormControl<DateValue> | null} control\n * @description\n * Allows passing an external FormControl (traditional Reactive Forms usage).\n * If provided, it overrides the internal control.\n */\n @Input() set control(ctrl: FormControl<DateValue> | null) {\n // If the user provides a control, we use that control for everything.\n if (ctrl) {\n this.internalControl = ctrl;\n }\n }\n get control(): FormControl<DateValue> {\n return this.internalControl;\n }\n\n /**\n * @event handleSelect\n * @description\n * Emitted when:\n * - single mode → a valid Date is selected\n * - range mode → both start and end dates are selected\n *\n * Payload:\n * - Date (single mode)\n * - [Date, Date] (completed range)\n */\n @Output() handleSelect = new EventEmitter<DateValue>();\n\n /**\n * @event handleClear\n * @description\n * Emitted when the control's value becomes `null`.\n */\n @Output() handleClear = new EventEmitter<void>();\n\n /**\n * @property faCalendarDay\n * @description\n * Icon displayed inside the datepicker input.\n */\n faCalendarDay = faCalendarDay;\n\n /**\n * @method writeValue\n * @description Writes a new value from the form model (ngModel or formControl) into the component.\n */\n writeValue(value: DateValue): void {\n if (value !== undefined) {\n // Use { emitEvent: false } to prevent an unnecessary valueChanges loop.\n this.internalControl.setValue(value, { emitEvent: false });\n }\n }\n\n /**\n * @method registerOnChange\n * @description Registers a callback function to be called when the control's value changes.\n */\n registerOnChange(fn: (value: DateValue) => void): void {\n this.onChange = fn;\n }\n\n /**\n * @method registerOnTouched\n * @description Registers a callback function to be called when the control receives a blur event (is touched).\n */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * @method setDisabledState\n * @description Called when the control should be disabled or enabled.\n */\n setDisabledState(isDisabled: boolean): void {\n const actionMap: { [key: string]: () => void } = {\n true: () => this.internalControl.disable(),\n false: () => this.internalControl.enable(),\n };\n actionMap[String(isDisabled)]();\n }\n\n /**\n * @method ngOnInit\n * @description\n * Subscribes to the internal control's valueChanges:\n * 1. Notifies the external form (CVA) via `this.onChange()`.\n * 2. Emits the semantic events `handleSelect` or `handleClear`.\n */\n ngOnInit(): void {\n this.sub = this.internalControl.valueChanges.subscribe(value => {\n // Notify the CVA / External Form\n this.onChange(value);\n this.onTouched();\n\n if (value === null) {\n this.handleClear.emit();\n return;\n }\n // RANGE MODE\n if (this.selectionMode === 'range') {\n if (Array.isArray(value)) {\n const [start, end] = value;\n // Emit ONLY when both dates exist\n if (start instanceof Date && end instanceof Date) {\n this.handleSelect.emit([start, end]);\n }\n }\n return;\n }\n // SINGLE MODE\n if (this.selectionMode === 'single' && value instanceof Date) {\n this.handleSelect.emit(value);\n }\n });\n }\n\n /**\n * @method ngOnDestroy\n * @description Cleans up the internal subscription when the component is destroyed.\n */\n ngOnDestroy(): void {\n this.sub?.unsubscribe();\n }\n\n /**\n * @method clear\n * @description\n * Programmatically clears the control's value,\n * which automatically triggers `handleClear`.\n */\n clear() {\n this.internalControl.setValue(null);\n }\n}\n","<div class=\"datepicker-container\">\n <p-floatlabel>\n <p-datepicker\n inputId=\"datepicker\"\n iconDisplay=\"input\"\n [formControl]=\"internalControl\"\n [selectionMode]=\"selectionMode\"\n [readonlyInput]=\"readonlyInput\"\n [showClear]=\"showClear\"\n [showIcon]=\"showIcon\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [dateFormat]=\"dateFormat\">\n <ng-template #inputicon let-clickCallBack=\"clickCallBack\">\n <fa-icon\n tabindex=\"0\"\n [icon]=\"faCalendarDay\"\n (keydown.enter)=\"clickCallBack($event)\"\n (keydown.space)=\"clickCallBack($event)\"\n (click)=\"clickCallBack($event)\">\n </fa-icon>\n </ng-template>\n </p-datepicker>\n\n <label for=\"datepicker\">{{ labelText }}</label>\n </p-floatlabel>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAuBA,MAAM,6BAA6B,GAAG;AACpC,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,mBAAmB,CAAC;AAClD,IAAA,KAAK,EAAE,IAAI;CACZ;AAiBD;;;;;;;;;;AAUG;MACU,mBAAmB,CAAA;AAzBhC,IAAA,WAAA,GAAA;AA4BE;;;;;;;AAOG;QACM,IAAa,CAAA,aAAA,GAAuB,OAAO;AAEpD;;;;;AAKG;QACM,IAAa,CAAA,aAAA,GAAG,IAAI;AAE7B;;;;;AAKG;QACM,IAAS,CAAA,SAAA,GAAG,IAAI;AAEzB;;;;;AAKG;QACM,IAAQ,CAAA,QAAA,GAAG,IAAI;AAExB;;;;;AAKG;QACM,IAAU,CAAA,UAAA,GAAG,UAAU;AAEhC;;;;;;AAMG;QACM,IAAO,CAAA,OAAA,GAAgB,IAAI;AAEpC;;;;;;AAMG;QACM,IAAO,CAAA,OAAA,GAAgB,IAAI;AAEpC;;;;;AAKG;QACM,IAAS,CAAA,SAAA,GAAG,eAAe;AAEpC;;;;;;AAMG;AACH,QAAA,IAAA,CAAA,eAAe,GAAG,IAAI,WAAW,CAAY,IAAI,CAAC;;AAU1C,QAAA,IAAA,CAAA,QAAQ,GAA+B,MAAK,GAAG;AAC/C,QAAA,IAAA,CAAA,SAAS,GAAe,MAAK,GAAG;AAkBxC;;;;;;;;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BAChB,EACU,SAAA,EAAA,CAAC,6BAA6B,CAAC,EAAA,QAAA,EAAA,g2BAAA,EAAA,MAAA,EAAA,CAAA,2jCAAA,CAAA,EAAA;8BA0BjC,aAAa,EAAA,CAAA;sBAArB;gBAQQ,aAAa,EAAA,CAAA;sBAArB;gBAQQ,SAAS,EAAA,CAAA;sBAAjB;gBAQQ,QAAQ,EAAA,CAAA;sBAAhB;gBAQQ,UAAU,EAAA,CAAA;sBAAlB;gBASQ,OAAO,EAAA,CAAA;sBAAf;gBASQ,OAAO,EAAA,CAAA;sBAAf;gBAQQ,SAAS,EAAA,CAAA;sBAAjB;gBA4BY,OAAO,EAAA,CAAA;sBAAnB;gBAqBS,YAAY,EAAA,CAAA;sBAArB;gBAOS,WAAW,EAAA,CAAA;sBAApB;;;AEpLH;;AAEG;;;;"}
|
|
@@ -115,11 +115,11 @@ class ModalComponent {
|
|
|
115
115
|
this.isOpened = false;
|
|
116
116
|
}
|
|
117
117
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
118
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: ModalComponent, isStandalone: true, selector: "tk-modal", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, footerButtons: { classPropertyName: "footerButtons", publicName: "footerButtons", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, closeOnOutsideClick: { classPropertyName: "closeOnOutsideClick", publicName: "closeOnOutsideClick", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<p-dialog\n [modal]=\"true\"\n [(visible)]=\"isOpened\"\n [closable]=\"closable()\"\n [dismissableMask]=\"closeOnOutsideClick()\"\n [draggable]=\"false\"\n [header]=\"title()\"\n [style]=\"{ width: modalWidth() }\"\n (onHide)=\"handleClose()\"\n class=\"tk-modal\"\n>\n <section>\n @if (content()) {\n <p [innerHTML]=\"content()\" class=\"tk-modal__content\"></p>\n }\n </section>\n\n @if (hasFooter()) {\n <section class=\"tk-modal__footer\">\n @for (btn of footerButtons()!; track $index) {\n <tk-button\n [label]=\"btn.label\"\n [severity]=\"btn.severity\"\n (clicked)=\"handleAction(btn.action, btn.returnValue)\"\n (keydown.enter)=\"handleAction(btn.action, btn.returnValue)\"\n (keydown.space)=\"handleAction(btn.action, btn.returnValue)\"\n />\n }\n </section>\n }\n</p-dialog>\n", styles: [":host ::ng-deep .p-dialog-title{color:var(--tk-color-text-default, #212121)}:host ::ng-deep .p-dialog-close-button{color:var(--tk-surface-500, #8a8a8b)}:host ::ng-deep .p-dialog-close-button:hover{background:var(--tk-color-base-surface-100, #f0f0f0)!important;color:var(--tk-surface-500, #8a8a8b)}.tk-modal__content{padding-bottom:var(--tk-spacing-paddingY-l, 1.25rem);color:var(--tk-surface-1000, #000000)}.tk-modal__footer{display:flex;flex-direction:row;justify-content:end;align-items:center;gap:var(--tk-spacing-
|
|
118
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: ModalComponent, isStandalone: true, selector: "tk-modal", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, footerButtons: { classPropertyName: "footerButtons", publicName: "footerButtons", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, closeOnOutsideClick: { classPropertyName: "closeOnOutsideClick", publicName: "closeOnOutsideClick", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<p-dialog\n [modal]=\"true\"\n [(visible)]=\"isOpened\"\n [closable]=\"closable()\"\n [dismissableMask]=\"closeOnOutsideClick()\"\n [draggable]=\"false\"\n [header]=\"title()\"\n [style]=\"{ width: modalWidth() }\"\n (onHide)=\"handleClose()\"\n class=\"tk-modal\"\n>\n <section>\n @if (content()) {\n <p [innerHTML]=\"content()\" class=\"tk-modal__content\"></p>\n }\n </section>\n\n @if (hasFooter()) {\n <section class=\"tk-modal__footer\">\n @for (btn of footerButtons()!; track $index) {\n <tk-button\n [label]=\"btn.label\"\n [severity]=\"btn.severity\"\n (clicked)=\"handleAction(btn.action, btn.returnValue)\"\n (keydown.enter)=\"handleAction(btn.action, btn.returnValue)\"\n (keydown.space)=\"handleAction(btn.action, btn.returnValue)\"\n />\n }\n </section>\n }\n</p-dialog>\n", styles: [":host ::ng-deep .p-dialog-title{color:var(--tk-color-text-default, #212121)}:host ::ng-deep .p-dialog-close-button{color:var(--tk-surface-500, #8a8a8b)}:host ::ng-deep .p-dialog-close-button:hover{background:var(--tk-color-base-surface-100, #f0f0f0)!important;color:var(--tk-surface-500, #8a8a8b)}.tk-modal__content{padding-bottom:var(--tk-spacing-paddingY-l, 1.25rem);color:var(--tk-surface-1000, #000000)}.tk-modal__footer{display:flex;flex-direction:row;justify-content:end;align-items:center;gap:var(--tk-spacing-base-50, .5rem)}\n"], dependencies: [{ kind: "ngmodule", type: DialogModule }, { kind: "component", type: i1.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "component", type: ButtonComponent, selector: "tk-button", inputs: ["label", "disabled", "type", "severity", "link"], outputs: ["clicked"] }] }); }
|
|
119
119
|
}
|
|
120
120
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ModalComponent, decorators: [{
|
|
121
121
|
type: Component,
|
|
122
|
-
args: [{ selector: 'tk-modal', standalone: true, imports: [DialogModule, ButtonComponent], template: "<p-dialog\n [modal]=\"true\"\n [(visible)]=\"isOpened\"\n [closable]=\"closable()\"\n [dismissableMask]=\"closeOnOutsideClick()\"\n [draggable]=\"false\"\n [header]=\"title()\"\n [style]=\"{ width: modalWidth() }\"\n (onHide)=\"handleClose()\"\n class=\"tk-modal\"\n>\n <section>\n @if (content()) {\n <p [innerHTML]=\"content()\" class=\"tk-modal__content\"></p>\n }\n </section>\n\n @if (hasFooter()) {\n <section class=\"tk-modal__footer\">\n @for (btn of footerButtons()!; track $index) {\n <tk-button\n [label]=\"btn.label\"\n [severity]=\"btn.severity\"\n (clicked)=\"handleAction(btn.action, btn.returnValue)\"\n (keydown.enter)=\"handleAction(btn.action, btn.returnValue)\"\n (keydown.space)=\"handleAction(btn.action, btn.returnValue)\"\n />\n }\n </section>\n }\n</p-dialog>\n", styles: [":host ::ng-deep .p-dialog-title{color:var(--tk-color-text-default, #212121)}:host ::ng-deep .p-dialog-close-button{color:var(--tk-surface-500, #8a8a8b)}:host ::ng-deep .p-dialog-close-button:hover{background:var(--tk-color-base-surface-100, #f0f0f0)!important;color:var(--tk-surface-500, #8a8a8b)}.tk-modal__content{padding-bottom:var(--tk-spacing-paddingY-l, 1.25rem);color:var(--tk-surface-1000, #000000)}.tk-modal__footer{display:flex;flex-direction:row;justify-content:end;align-items:center;gap:var(--tk-spacing-
|
|
122
|
+
args: [{ selector: 'tk-modal', standalone: true, imports: [DialogModule, ButtonComponent], template: "<p-dialog\n [modal]=\"true\"\n [(visible)]=\"isOpened\"\n [closable]=\"closable()\"\n [dismissableMask]=\"closeOnOutsideClick()\"\n [draggable]=\"false\"\n [header]=\"title()\"\n [style]=\"{ width: modalWidth() }\"\n (onHide)=\"handleClose()\"\n class=\"tk-modal\"\n>\n <section>\n @if (content()) {\n <p [innerHTML]=\"content()\" class=\"tk-modal__content\"></p>\n }\n </section>\n\n @if (hasFooter()) {\n <section class=\"tk-modal__footer\">\n @for (btn of footerButtons()!; track $index) {\n <tk-button\n [label]=\"btn.label\"\n [severity]=\"btn.severity\"\n (clicked)=\"handleAction(btn.action, btn.returnValue)\"\n (keydown.enter)=\"handleAction(btn.action, btn.returnValue)\"\n (keydown.space)=\"handleAction(btn.action, btn.returnValue)\"\n />\n }\n </section>\n }\n</p-dialog>\n", styles: [":host ::ng-deep .p-dialog-title{color:var(--tk-color-text-default, #212121)}:host ::ng-deep .p-dialog-close-button{color:var(--tk-surface-500, #8a8a8b)}:host ::ng-deep .p-dialog-close-button:hover{background:var(--tk-color-base-surface-100, #f0f0f0)!important;color:var(--tk-surface-500, #8a8a8b)}.tk-modal__content{padding-bottom:var(--tk-spacing-paddingY-l, 1.25rem);color:var(--tk-surface-1000, #000000)}.tk-modal__footer{display:flex;flex-direction:row;justify-content:end;align-items:center;gap:var(--tk-spacing-base-50, .5rem)}\n"] }]
|
|
123
123
|
}] });
|
|
124
124
|
|
|
125
125
|
class ModalService {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tekus-design-system-components-modal.mjs","sources":["../../../projects/design-system/components/modal/src/modal.component.ts","../../../projects/design-system/components/modal/src/modal.component.html","../../../projects/design-system/components/modal/src/services/modal.service.ts","../../../projects/design-system/components/modal/tekus-design-system-components-modal.ts"],"sourcesContent":["import { Component, computed, input, EventEmitter } from '@angular/core';\nimport { ButtonComponent } from '@tekus/design-system/components/button';\nimport { DialogModule } from 'primeng/dialog';\nimport { ModalFooterButton, ModalSizeType } from './modal.types';\n\n/**\n * @component ModalComponent\n * @description\n * A programmatically controlled modal dialog used for displaying dynamic content, titles, and footer actions.\n * The modal is not instantiated via template bindings, but rather opened through a service with a configuration object.\n *\n * This component supports:\n * - Configurable title and content.\n * - Optional footer buttons with callbacks and return values.\n * - Multiple sizes: `'small' | 'large' | 'full'`.\n * - Closable modal and outside-click behavior.\n * - Passing arbitrary data to the modal instance.\n *\n * @usage\n * ### Open a modal from TypeScript using the modal service\n * ```ts\n * this.modalService.open({\n * title: 'Demo Modal',\n * content: 'This modal is opened from TypeScript using the service.',\n * footerButtons: [\n * {\n * label: 'Accept',\n * severity: 'secondary',\n * action: () => console.log('Accept clicked'),\n * returnValue: true,\n * },\n * {\n * label: 'Cancel',\n * severity: 'danger',\n * action: () => console.log('Cancel clicked'),\n * returnValue: false,\n * },\n * ],\n * size: 'small',\n * closable: true,\n * closeOnOutsideClick: false,\n * }).subscribe((result) => {\n * console.log('Modal closed with value:', result);\n * });\n * ```\n */\n\n@Component({\n selector: 'tk-modal',\n standalone: true,\n imports: [DialogModule, ButtonComponent],\n templateUrl: './modal.component.html',\n styleUrls: ['./modal.component.scss']\n})\nexport class ModalComponent {\n\n /** The title displayed at the top of the modal */\n title = input<string>('');\n /** The main content of the modal */\n content = input<string | null>(null);\n /** Array of footer buttons with label, callback, and return value */\n footerButtons = input<ModalFooterButton[]>([]);\n /** Modal size: 'small', 'large', or 'full' */\n size = input<ModalSizeType>('small');\n /** Whether the modal can be closed by the user */\n closable = input<boolean>(true);\n /** Whether clicking outside closes the modal */\n closeOnOutsideClick = input<boolean>(false);\n /** Computed: whether the modal has footer buttons */\n hasFooter = computed(() => (this.footerButtons() ?? []).length > 0);\n /** Computed: calculates modal width based on `size` */\n modalWidth = computed(() => {\n switch (this.size()) {\n case 'large':\n return '67.5rem'; // Large\n case 'full':\n return '98vw'; // Full\n default:\n return '25rem'; // Small\n }\n});\n\n /** Visibility flag */\n isOpened: boolean = false;\n\n /** Emits when the modal closes, passing the return value from footer buttons or null */\n readonly onClose = new EventEmitter<unknown>();\n private alreadyEmitted = false;\n private returnValueOnClose: unknown = null;\n\n /** Opens the modal */\n open() {\n this.isOpened = true;\n this.alreadyEmitted = false;\n this.returnValueOnClose = null;\n }\n\n /** Closes the modal and emits onClose with null */\n handleClose() {\n if (!this.alreadyEmitted) {\n this.onClose.emit(null);\n } else {\n this.onClose.emit(this.returnValueOnClose);\n }\n this.alreadyEmitted = false;\n this.returnValueOnClose = null;\n }\n\n /** Closes the modal without emitting an event */\n close() {\n this.isOpened = false;\n }\n\n /**\n * Handles footer button actions.\n * Executes the action callback, emits `onClose` with the provided returnValue, then closes the modal.\n * @param action Callback to execute when the button is clicked\n * @param returnValue Value emitted on modal close\n */\n handleAction(action: () => void, returnValue: unknown) {\n if (action) action();\n this.alreadyEmitted = true;\n this.returnValueOnClose = returnValue;\n this.isOpened = false;\n }\n}\n","<p-dialog\n [modal]=\"true\"\n [(visible)]=\"isOpened\"\n [closable]=\"closable()\"\n [dismissableMask]=\"closeOnOutsideClick()\"\n [draggable]=\"false\"\n [header]=\"title()\"\n [style]=\"{ width: modalWidth() }\"\n (onHide)=\"handleClose()\"\n class=\"tk-modal\"\n>\n <section>\n @if (content()) {\n <p [innerHTML]=\"content()\" class=\"tk-modal__content\"></p>\n }\n </section>\n\n @if (hasFooter()) {\n <section class=\"tk-modal__footer\">\n @for (btn of footerButtons()!; track $index) {\n <tk-button\n [label]=\"btn.label\"\n [severity]=\"btn.severity\"\n (clicked)=\"handleAction(btn.action, btn.returnValue)\"\n (keydown.enter)=\"handleAction(btn.action, btn.returnValue)\"\n (keydown.space)=\"handleAction(btn.action, btn.returnValue)\"\n />\n }\n </section>\n }\n</p-dialog>\n","import {\n Injectable,\n ApplicationRef,\n ComponentRef,\n Injector,\n createComponent,\n EmbeddedViewRef,\n} from '@angular/core';\nimport { ModalComponent } from '../modal.component';\nimport { Observable, Subject } from 'rxjs';\nimport { ModalConfig } from '../modal.types';\n\n@Injectable({ providedIn: 'root' })\nexport class ModalService {\n private modalRef: ComponentRef<ModalComponent> | null = null;\n\n constructor(\n private readonly injector: Injector,\n private readonly appRef: ApplicationRef\n ) {}\n\n get _modalRefForTesting(): ComponentRef<ModalComponent> | null {\n return this.modalRef;\n }\n set _modalRefForTesting(ref: ComponentRef<ModalComponent> | null) {\n this.modalRef = ref;\n }\n\n open(config: ModalConfig): Observable<unknown> {\n if (this.modalRef) {\n return this.modalRef.instance.onClose.asObservable();\n }\n\n const componentRef = createComponent(ModalComponent, {\n environmentInjector: this.appRef.injector,\n });\n\n this.appRef.attachView(componentRef.hostView);\n\n const domElem = (componentRef.hostView as EmbeddedViewRef<unknown>).rootNodes[0] as HTMLElement;\n document.body.appendChild(domElem);\n\n componentRef.setInput('title', config.title);\n componentRef.setInput('content', config.content ?? null);\n componentRef.setInput('footerButtons', config.footerButtons ?? []);\n componentRef.setInput('size', config.size ?? 'small');\n componentRef.setInput('closable', config.closable ?? true);\n componentRef.setInput('closeOnOutsideClick', config.closeOnOutsideClick ?? false);\n\n const close$ = new Subject<unknown>();\n\n componentRef.instance.onClose.subscribe((value) => {\n close$.next(value);\n close$.complete();\n\n this.appRef.detachView(componentRef.hostView);\n componentRef.destroy();\n this.modalRef = null;\n });\n\n componentRef.instance.open();\n this.modalRef = componentRef;\n\n return close$.asObservable();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCG;MASU,cAAc,CAAA;AAP3B,IAAA,WAAA,GAAA;;AAUE,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,CAAC;;AAEzB,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAgB,I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,CAAC,QAAQ,CAAC;YAC7C,YAAY,CAAC,OAAO,EAAE;AACtB,YAAA,IAAI,CAAC,QAAQ,GAAG,IAAI;AACtB,SAAC,CAAC;AAEF,QAAA,YAAY,CAAC,QAAQ,CAAC,IAAI,EAAE;AAC5B,QAAA,IAAI,CAAC,QAAQ,GAAG,YAAY;AAE5B,QAAA,OAAO,MAAM,CAAC,YAAY,EAAE;;+GAlDnB,YAAY,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,QAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,cAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAZ,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cADC,MAAM,EAAA,CAAA,CAAA;;4FACnB,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACZlC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"tekus-design-system-components-modal.mjs","sources":["../../../projects/design-system/components/modal/src/modal.component.ts","../../../projects/design-system/components/modal/src/modal.component.html","../../../projects/design-system/components/modal/src/services/modal.service.ts","../../../projects/design-system/components/modal/tekus-design-system-components-modal.ts"],"sourcesContent":["import { Component, computed, input, EventEmitter } from '@angular/core';\nimport { ButtonComponent } from '@tekus/design-system/components/button';\nimport { DialogModule } from 'primeng/dialog';\nimport { ModalFooterButton, ModalSizeType } from './modal.types';\n\n/**\n * @component ModalComponent\n * @description\n * A programmatically controlled modal dialog used for displaying dynamic content, titles, and footer actions.\n * The modal is not instantiated via template bindings, but rather opened through a service with a configuration object.\n *\n * This component supports:\n * - Configurable title and content.\n * - Optional footer buttons with callbacks and return values.\n * - Multiple sizes: `'small' | 'large' | 'full'`.\n * - Closable modal and outside-click behavior.\n * - Passing arbitrary data to the modal instance.\n *\n * @usage\n * ### Open a modal from TypeScript using the modal service\n * ```ts\n * this.modalService.open({\n * title: 'Demo Modal',\n * content: 'This modal is opened from TypeScript using the service.',\n * footerButtons: [\n * {\n * label: 'Accept',\n * severity: 'secondary',\n * action: () => console.log('Accept clicked'),\n * returnValue: true,\n * },\n * {\n * label: 'Cancel',\n * severity: 'danger',\n * action: () => console.log('Cancel clicked'),\n * returnValue: false,\n * },\n * ],\n * size: 'small',\n * closable: true,\n * closeOnOutsideClick: false,\n * }).subscribe((result) => {\n * console.log('Modal closed with value:', result);\n * });\n * ```\n */\n\n@Component({\n selector: 'tk-modal',\n standalone: true,\n imports: [DialogModule, ButtonComponent],\n templateUrl: './modal.component.html',\n styleUrls: ['./modal.component.scss']\n})\nexport class ModalComponent {\n\n /** The title displayed at the top of the modal */\n title = input<string>('');\n /** The main content of the modal */\n content = input<string | null>(null);\n /** Array of footer buttons with label, callback, and return value */\n footerButtons = input<ModalFooterButton[]>([]);\n /** Modal size: 'small', 'large', or 'full' */\n size = input<ModalSizeType>('small');\n /** Whether the modal can be closed by the user */\n closable = input<boolean>(true);\n /** Whether clicking outside closes the modal */\n closeOnOutsideClick = input<boolean>(false);\n /** Computed: whether the modal has footer buttons */\n hasFooter = computed(() => (this.footerButtons() ?? []).length > 0);\n /** Computed: calculates modal width based on `size` */\n modalWidth = computed(() => {\n switch (this.size()) {\n case 'large':\n return '67.5rem'; // Large\n case 'full':\n return '98vw'; // Full\n default:\n return '25rem'; // Small\n }\n});\n\n /** Visibility flag */\n isOpened: boolean = false;\n\n /** Emits when the modal closes, passing the return value from footer buttons or null */\n readonly onClose = new EventEmitter<unknown>();\n private alreadyEmitted = false;\n private returnValueOnClose: unknown = null;\n\n /** Opens the modal */\n open() {\n this.isOpened = true;\n this.alreadyEmitted = false;\n this.returnValueOnClose = null;\n }\n\n /** Closes the modal and emits onClose with null */\n handleClose() {\n if (!this.alreadyEmitted) {\n this.onClose.emit(null);\n } else {\n this.onClose.emit(this.returnValueOnClose);\n }\n this.alreadyEmitted = false;\n this.returnValueOnClose = null;\n }\n\n /** Closes the modal without emitting an event */\n close() {\n this.isOpened = false;\n }\n\n /**\n * Handles footer button actions.\n * Executes the action callback, emits `onClose` with the provided returnValue, then closes the modal.\n * @param action Callback to execute when the button is clicked\n * @param returnValue Value emitted on modal close\n */\n handleAction(action: () => void, returnValue: unknown) {\n if (action) action();\n this.alreadyEmitted = true;\n this.returnValueOnClose = returnValue;\n this.isOpened = false;\n }\n}\n","<p-dialog\n [modal]=\"true\"\n [(visible)]=\"isOpened\"\n [closable]=\"closable()\"\n [dismissableMask]=\"closeOnOutsideClick()\"\n [draggable]=\"false\"\n [header]=\"title()\"\n [style]=\"{ width: modalWidth() }\"\n (onHide)=\"handleClose()\"\n class=\"tk-modal\"\n>\n <section>\n @if (content()) {\n <p [innerHTML]=\"content()\" class=\"tk-modal__content\"></p>\n }\n </section>\n\n @if (hasFooter()) {\n <section class=\"tk-modal__footer\">\n @for (btn of footerButtons()!; track $index) {\n <tk-button\n [label]=\"btn.label\"\n [severity]=\"btn.severity\"\n (clicked)=\"handleAction(btn.action, btn.returnValue)\"\n (keydown.enter)=\"handleAction(btn.action, btn.returnValue)\"\n (keydown.space)=\"handleAction(btn.action, btn.returnValue)\"\n />\n }\n </section>\n }\n</p-dialog>\n","import {\n Injectable,\n ApplicationRef,\n ComponentRef,\n Injector,\n createComponent,\n EmbeddedViewRef,\n} from '@angular/core';\nimport { ModalComponent } from '../modal.component';\nimport { Observable, Subject } from 'rxjs';\nimport { ModalConfig } from '../modal.types';\n\n@Injectable({ providedIn: 'root' })\nexport class ModalService {\n private modalRef: ComponentRef<ModalComponent> | null = null;\n\n constructor(\n private readonly injector: Injector,\n private readonly appRef: ApplicationRef\n ) {}\n\n get _modalRefForTesting(): ComponentRef<ModalComponent> | null {\n return this.modalRef;\n }\n set _modalRefForTesting(ref: ComponentRef<ModalComponent> | null) {\n this.modalRef = ref;\n }\n\n open(config: ModalConfig): Observable<unknown> {\n if (this.modalRef) {\n return this.modalRef.instance.onClose.asObservable();\n }\n\n const componentRef = createComponent(ModalComponent, {\n environmentInjector: this.appRef.injector,\n });\n\n this.appRef.attachView(componentRef.hostView);\n\n const domElem = (componentRef.hostView as EmbeddedViewRef<unknown>).rootNodes[0] as HTMLElement;\n document.body.appendChild(domElem);\n\n componentRef.setInput('title', config.title);\n componentRef.setInput('content', config.content ?? null);\n componentRef.setInput('footerButtons', config.footerButtons ?? []);\n componentRef.setInput('size', config.size ?? 'small');\n componentRef.setInput('closable', config.closable ?? true);\n componentRef.setInput('closeOnOutsideClick', config.closeOnOutsideClick ?? false);\n\n const close$ = new Subject<unknown>();\n\n componentRef.instance.onClose.subscribe((value) => {\n close$.next(value);\n close$.complete();\n\n this.appRef.detachView(componentRef.hostView);\n componentRef.destroy();\n this.modalRef = null;\n });\n\n componentRef.instance.open();\n this.modalRef = componentRef;\n\n return close$.asObservable();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCG;MASU,cAAc,CAAA;AAP3B,IAAA,WAAA,GAAA;;AAUE,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,CAAC;;AAEzB,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAgB,IAAI,CAAC;;AAEpC,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAsB,EAAE,CAAC;;AAE9C,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAgB,OAAO,CAAC;;AAEpC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,IAAI,CAAC;;AAE/B,QAAA,IAAA,CAAA,mBAAmB,GAAG,KAAK,CAAU,KAAK,CAAC;;AAE3C,QAAA,IA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,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,QAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,cAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAZ,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cADC,MAAM,EAAA,CAAA,CAAA;;4FACnB,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACZlC;;AAEG;;;;"}
|
|
@@ -57,7 +57,7 @@ const TkPreset = definePreset(Aura, {
|
|
|
57
57
|
700: 'var(--tk-color-base-primary-700)',
|
|
58
58
|
800: 'var(--tk-color-base-primary-800)',
|
|
59
59
|
900: 'var(--tk-color-base-primary-900)',
|
|
60
|
-
950: 'var(--tk-color-base-primary-950)'
|
|
60
|
+
950: 'var(--tk-color-base-primary-950)',
|
|
61
61
|
},
|
|
62
62
|
red: {
|
|
63
63
|
50: 'var(--tk-color-base-red-50)',
|
|
@@ -70,7 +70,7 @@ const TkPreset = definePreset(Aura, {
|
|
|
70
70
|
700: 'var(--tk-color-base-red-700)',
|
|
71
71
|
800: 'var(--tk-color-base-red-800)',
|
|
72
72
|
900: 'var(--tk-color-base-red-900)',
|
|
73
|
-
950: 'var(--tk-color-base-red-950)'
|
|
73
|
+
950: 'var(--tk-color-base-red-950)',
|
|
74
74
|
},
|
|
75
75
|
surface: {
|
|
76
76
|
0: 'var(--tk-color-base-surface-0)',
|
|
@@ -84,7 +84,7 @@ const TkPreset = definePreset(Aura, {
|
|
|
84
84
|
700: 'var(--tk-color-base-surface-700)',
|
|
85
85
|
800: 'var(--tk-color-base-surface-800)',
|
|
86
86
|
900: 'var(--tk-color-base-surface-900)',
|
|
87
|
-
950: 'var(--tk-color-base-surface-950)'
|
|
87
|
+
950: 'var(--tk-color-base-surface-950)',
|
|
88
88
|
},
|
|
89
89
|
},
|
|
90
90
|
font: {
|
|
@@ -148,7 +148,7 @@ const TkPreset = definePreset(Aura, {
|
|
|
148
148
|
borderColor: 'var(--tk-color-base-red-500)',
|
|
149
149
|
hoverBorderColor: 'var(--tk-color-base-red-600)',
|
|
150
150
|
activeBorderColor: 'var(--tk-color-base-red-700)',
|
|
151
|
-
}
|
|
151
|
+
},
|
|
152
152
|
},
|
|
153
153
|
},
|
|
154
154
|
},
|
|
@@ -159,10 +159,10 @@ const TkPreset = definePreset(Aura, {
|
|
|
159
159
|
background: 'var(--tk-color-base-surface-0)',
|
|
160
160
|
borderColor: 'var(--tk-color-base-surface-200)',
|
|
161
161
|
},
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
166
|
});
|
|
167
167
|
|
|
168
168
|
function themeFactory(config, document) {
|
|
@@ -183,7 +183,8 @@ function themeFactory(config, document) {
|
|
|
183
183
|
preset: TkPreset,
|
|
184
184
|
options: {
|
|
185
185
|
prefix: 'tk',
|
|
186
|
-
darkMode: false
|
|
186
|
+
darkMode: false,
|
|
187
|
+
darkModeSelector: false,
|
|
187
188
|
},
|
|
188
189
|
});
|
|
189
190
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tekus-design-system-core-types.mjs","sources":["../../../projects/design-system/core/types/src/grids/grid.enum.ts","../../../projects/design-system/core/types/src/breakpoints/breakpoints.ts","../../../projects/design-system/core/types/src/theme/tk-preset.ts","../../../projects/design-system/core/types/src/theme/theme.provider.ts","../../../projects/design-system/core/types/tekus-design-system-core-types.ts"],"sourcesContent":["enum GapGutter {\n normal = '24px',\n small = '16px',\n large = '32px',\n extraLarge = '40px',\n}\n\nenum PaddingGridContainer {\n large = '32px',\n medium = '24px',\n small = '16px'\n}\n\nenum Gutter {\n normal = 'normal',\n small = 'small',\n large = 'large',\n extraLarge = 'extraLarge',\n\n}\n\nexport {\n Gutter,\n GapGutter,\n PaddingGridContainer\n}","export const Breakpoints = {\n // Covers all devices with a width less than or equal to 360px.\n mobileSmall: '(max-width: 360px)',\n\n // For small phones (e.g., most modern cell phones)\n mobile: '(min-width: 361px) and (max-width: 424px)',\n\n // For large phones (e.g., Google Pixel, iPhone Plus/Max)\n mobileLarge: '(min-width: 425px) and (max-width: 575px)',\n\n // Vertical tablets and medium-sized devices\n tabletVertical: '(min-width: 576px) and (max-width: 767px)',\n\n // Tablets in landscape mode\n tabletHorizontal: '(min-width: 768px) and (max-width: 991px)',\n\n // Laptops and small desktops\n desktopSmall: '(min-width: 992px) and (max-width: 1199px)',\n\n // Large desks\n desktop: '(min-width: 1200px) and (max-width: 1399px)',\n\n // Ultra-wide screens\n desktopLarge: '(min-width: 1400px)',\n}","import { definePreset } from '@primeng/themes';\nimport Aura from '@primeng/themes/aura';\n\nexport const TkPreset = definePreset(Aura, {\n semantic: {\n primary: {\n 50: 'var(--tk-color-base-primary-50)',\n 100: 'var(--tk-color-base-primary-100)',\n 200: 'var(--tk-color-base-primary-200)',\n 300: 'var(--tk-color-base-primary-300)',\n 400: 'var(--tk-color-base-primary-400)',\n 500: 'var(--tk-color-base-primary-500)',\n 600: 'var(--tk-color-base-primary-600)',\n 700: 'var(--tk-color-base-primary-700)',\n 800: 'var(--tk-color-base-primary-800)',\n 900: 'var(--tk-color-base-primary-900)',\n 950: 'var(--tk-color-base-primary-950)'\n },\n red: {\n 50: 'var(--tk-color-base-red-50)',\n 100: 'var(--tk-color-base-red-100)',\n 200: 'var(--tk-color-base-red-200)',\n 300: 'var(--tk-color-base-red-300)',\n 400: 'var(--tk-color-base-red-400)',\n 500: 'var(--tk-color-base-red-500)',\n 600: 'var(--tk-color-base-red-600)',\n 700: 'var(--tk-color-base-red-700)',\n 800: 'var(--tk-color-base-red-800)',\n 900: 'var(--tk-color-base-red-900)',\n 950: 'var(--tk-color-base-red-950)'\n },\n surface: {\n 0: 'var(--tk-color-base-surface-0)',\n 50: 'var(--tk-color-base-surface-50)',\n 100: 'var(--tk-color-base-surface-100)',\n 200: 'var(--tk-color-base-surface-200)',\n 300: 'var(--tk-color-base-surface-300)',\n 400: 'var(--tk-color-base-surface-400)',\n 500: 'var(--tk-color-base-surface-500)',\n 600: 'var(--tk-color-base-surface-600)',\n 700: 'var(--tk-color-base-surface-700)',\n 800: 'var(--tk-color-base-surface-800)',\n 900: 'var(--tk-color-base-surface-900)',\n 950: 'var(--tk-color-base-surface-950)'\n },\n },\n font: {\n family: 'var(--tk-font-family)',\n },\n\n components: {\n button: {\n root: {\n outline: 'none',\n boxShadow: 'none',\n border: 'none',\n focusBoxShadow: 'none',\n },\n label: {\n color: 'inherit',\n },\n colorScheme: {\n light: {\n root: {\n primary: {\n hoverBackground: 'var(--tk-color-base-primary-400)',\n activeBackground: 'var(--tk-color-base-primary-400)',\n hoverBorderColor: 'transparent',\n activeBorderColor: 'transparent',\n },\n secondary: {\n background: 'var(--tk-color-base-surface-0)',\n hoverBackground: 'var(--tk-color-base-surface-100)',\n borderColor: 'var(--tk-color-base-surface-200)',\n hoverBorderColor: 'var(--tk-color-base-surface-200)',\n activeBorderColor: 'var(--tk-color-base-surface-200)',\n },\n },\n text: {\n secondary: {\n hoverBackground: 'var(--tk-color-base-surface-200)',\n activeBackground: 'var(--tk-color-base-surface-200)',\n },\n },\n },\n dark: {\n primary: {\n background: 'var(--tk-color-base-primary-500)',\n hoverBackground: 'var(--tk-color-base-primary-400)',\n activeBackground: 'var(--tk-color-base-primary-400)',\n borderColor: 'transparent',\n hoverBorderColor: 'transparent',\n activeBorderColor: 'transparent',\n },\n secondary: {\n background: 'var(--tk-color-base-surface-0)',\n hoverBackground: 'var(--tk-color-base-surface-200)',\n borderColor: 'var(--tk-color-base-surface-200)',\n hoverBorderColor: 'var(--tk-color-base-surface-200)',\n activeBorderColor: 'var(--tk-color-base-surface-200)',\n },\n danger: {\n background: 'var(--tk-color-base-red-500)',\n hoverBackground: 'var(--tk-color-base-red-600)',\n activeBackground: 'var(--tk-color-base-red-700)',\n borderColor: 'var(--tk-color-base-red-500)',\n hoverBorderColor: 'var(--tk-color-base-red-600)',\n activeBorderColor: 'var(--tk-color-base-red-700)',\n }\n },\n },\n },\n dialog: {\n colorScheme: {\n dark: {\n root: {\n background: 'var(--tk-color-base-surface-0)',\n borderColor: 'var(--tk-color-base-surface-200)',\n },\n }\n }\n }\n }\n});\n","import { inject, provideAppInitializer } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { PrimeNG } from 'primeng/config';\nimport { TkPreset } from './tk-preset';\n\nfunction themeFactory(config: PrimeNG, document: Document): () => void {\n return () => {\n const fontLink = document.createElement('link');\n fontLink.rel = 'stylesheet';\n fontLink.href =\n 'https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap';\n document.head.appendChild(fontLink);\n\n const style = document.createElement('style');\n style.innerHTML = `\n body {\n font-family: 'Poppins', sans-serif;\n }\n `;\n document.head.appendChild(style);\n\n config.theme.set({\n preset: TkPreset,\n options: {\n prefix: 'tk',\n darkMode: false\n },\n });\n };\n}\n\nexport function provideTkTheme() {\n return provideAppInitializer(() => {\n const config = inject(PrimeNG);\n const document = inject(DOCUMENT);\n return themeFactory(config, document)();\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA,IAAK;AAAL,CAAA,UAAK,SAAS,EAAA;AACV,IAAA,SAAA,CAAA,QAAA,CAAA,GAAA,MAAe;AACf,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,MAAc;AACd,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,MAAc;AACd,IAAA,SAAA,CAAA,YAAA,CAAA,GAAA,MAAmB;AACvB,CAAC,EALI,SAAS,KAAT,SAAS,GAKb,EA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EAAE,QAAQ,CAAC,EAAE;AACzC,KAAC,CAAC;AACJ;;ACrCA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"tekus-design-system-core-types.mjs","sources":["../../../projects/design-system/core/types/src/grids/grid.enum.ts","../../../projects/design-system/core/types/src/breakpoints/breakpoints.ts","../../../projects/design-system/core/types/src/theme/tk-preset.ts","../../../projects/design-system/core/types/src/theme/theme.provider.ts","../../../projects/design-system/core/types/tekus-design-system-core-types.ts"],"sourcesContent":["enum GapGutter {\n normal = '24px',\n small = '16px',\n large = '32px',\n extraLarge = '40px',\n}\n\nenum PaddingGridContainer {\n large = '32px',\n medium = '24px',\n small = '16px'\n}\n\nenum Gutter {\n normal = 'normal',\n small = 'small',\n large = 'large',\n extraLarge = 'extraLarge',\n\n}\n\nexport {\n Gutter,\n GapGutter,\n PaddingGridContainer\n}","export const Breakpoints = {\n // Covers all devices with a width less than or equal to 360px.\n mobileSmall: '(max-width: 360px)',\n\n // For small phones (e.g., most modern cell phones)\n mobile: '(min-width: 361px) and (max-width: 424px)',\n\n // For large phones (e.g., Google Pixel, iPhone Plus/Max)\n mobileLarge: '(min-width: 425px) and (max-width: 575px)',\n\n // Vertical tablets and medium-sized devices\n tabletVertical: '(min-width: 576px) and (max-width: 767px)',\n\n // Tablets in landscape mode\n tabletHorizontal: '(min-width: 768px) and (max-width: 991px)',\n\n // Laptops and small desktops\n desktopSmall: '(min-width: 992px) and (max-width: 1199px)',\n\n // Large desks\n desktop: '(min-width: 1200px) and (max-width: 1399px)',\n\n // Ultra-wide screens\n desktopLarge: '(min-width: 1400px)',\n}","import { definePreset } from '@primeng/themes';\nimport Aura from '@primeng/themes/aura';\n\nexport const TkPreset = definePreset(Aura, {\n semantic: {\n primary: {\n 50: 'var(--tk-color-base-primary-50)',\n 100: 'var(--tk-color-base-primary-100)',\n 200: 'var(--tk-color-base-primary-200)',\n 300: 'var(--tk-color-base-primary-300)',\n 400: 'var(--tk-color-base-primary-400)',\n 500: 'var(--tk-color-base-primary-500)',\n 600: 'var(--tk-color-base-primary-600)',\n 700: 'var(--tk-color-base-primary-700)',\n 800: 'var(--tk-color-base-primary-800)',\n 900: 'var(--tk-color-base-primary-900)',\n 950: 'var(--tk-color-base-primary-950)',\n },\n red: {\n 50: 'var(--tk-color-base-red-50)',\n 100: 'var(--tk-color-base-red-100)',\n 200: 'var(--tk-color-base-red-200)',\n 300: 'var(--tk-color-base-red-300)',\n 400: 'var(--tk-color-base-red-400)',\n 500: 'var(--tk-color-base-red-500)',\n 600: 'var(--tk-color-base-red-600)',\n 700: 'var(--tk-color-base-red-700)',\n 800: 'var(--tk-color-base-red-800)',\n 900: 'var(--tk-color-base-red-900)',\n 950: 'var(--tk-color-base-red-950)',\n },\n surface: {\n 0: 'var(--tk-color-base-surface-0)',\n 50: 'var(--tk-color-base-surface-50)',\n 100: 'var(--tk-color-base-surface-100)',\n 200: 'var(--tk-color-base-surface-200)',\n 300: 'var(--tk-color-base-surface-300)',\n 400: 'var(--tk-color-base-surface-400)',\n 500: 'var(--tk-color-base-surface-500)',\n 600: 'var(--tk-color-base-surface-600)',\n 700: 'var(--tk-color-base-surface-700)',\n 800: 'var(--tk-color-base-surface-800)',\n 900: 'var(--tk-color-base-surface-900)',\n 950: 'var(--tk-color-base-surface-950)',\n },\n },\n font: {\n family: 'var(--tk-font-family)',\n },\n\n components: {\n button: {\n root: {\n outline: 'none',\n boxShadow: 'none',\n border: 'none',\n focusBoxShadow: 'none',\n },\n label: {\n color: 'inherit',\n },\n colorScheme: {\n light: {\n root: {\n primary: {\n hoverBackground: 'var(--tk-color-base-primary-400)',\n activeBackground: 'var(--tk-color-base-primary-400)',\n hoverBorderColor: 'transparent',\n activeBorderColor: 'transparent',\n },\n secondary: {\n background: 'var(--tk-color-base-surface-0)',\n hoverBackground: 'var(--tk-color-base-surface-100)',\n borderColor: 'var(--tk-color-base-surface-200)',\n hoverBorderColor: 'var(--tk-color-base-surface-200)',\n activeBorderColor: 'var(--tk-color-base-surface-200)',\n },\n },\n text: {\n secondary: {\n hoverBackground: 'var(--tk-color-base-surface-200)',\n activeBackground: 'var(--tk-color-base-surface-200)',\n },\n },\n },\n dark: {\n primary: {\n background: 'var(--tk-color-base-primary-500)',\n hoverBackground: 'var(--tk-color-base-primary-400)',\n activeBackground: 'var(--tk-color-base-primary-400)',\n borderColor: 'transparent',\n hoverBorderColor: 'transparent',\n activeBorderColor: 'transparent',\n },\n secondary: {\n background: 'var(--tk-color-base-surface-0)',\n hoverBackground: 'var(--tk-color-base-surface-200)',\n borderColor: 'var(--tk-color-base-surface-200)',\n hoverBorderColor: 'var(--tk-color-base-surface-200)',\n activeBorderColor: 'var(--tk-color-base-surface-200)',\n },\n danger: {\n background: 'var(--tk-color-base-red-500)',\n hoverBackground: 'var(--tk-color-base-red-600)',\n activeBackground: 'var(--tk-color-base-red-700)',\n borderColor: 'var(--tk-color-base-red-500)',\n hoverBorderColor: 'var(--tk-color-base-red-600)',\n activeBorderColor: 'var(--tk-color-base-red-700)',\n },\n },\n },\n },\n dialog: {\n colorScheme: {\n dark: {\n root: {\n background: 'var(--tk-color-base-surface-0)',\n borderColor: 'var(--tk-color-base-surface-200)',\n },\n },\n },\n },\n },\n});\n","import { inject, provideAppInitializer } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { PrimeNG } from 'primeng/config';\nimport { TkPreset } from './tk-preset';\n\nfunction themeFactory(config: PrimeNG, document: Document): () => void {\n return () => {\n const fontLink = document.createElement('link');\n fontLink.rel = 'stylesheet';\n fontLink.href =\n 'https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap';\n document.head.appendChild(fontLink);\n\n const style = document.createElement('style');\n style.innerHTML = `\n body {\n font-family: 'Poppins', sans-serif;\n }\n `;\n document.head.appendChild(style);\n\n config.theme.set({\n preset: TkPreset,\n options: {\n prefix: 'tk',\n darkMode: false,\n darkModeSelector: false,\n },\n });\n };\n}\n\nexport function provideTkTheme() {\n return provideAppInitializer(() => {\n const config = inject(PrimeNG);\n const document = inject(DOCUMENT);\n return themeFactory(config, document)();\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA,IAAK;AAAL,CAAA,UAAK,SAAS,EAAA;AACV,IAAA,SAAA,CAAA,QAAA,CAAA,GAAA,MAAe;AACf,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,MAAc;AACd,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,MAAc;AACd,IAAA,SAAA,CAAA,YAAA,CAAA,GAAA,MAAmB;AACvB,CAAC,EALI,SAAS,KAAT,SAAS,GAKb,EAAA,CAAA,CAAA;AAED,IAAK;AAAL,CAAA,UAAK,oBAAoB,EAAA;AACrB,IAAA,oBAAA,CAAA,OAAA,CAAA,GAAA,MAAc;AACd,IAAA,oBAAA,CAAA,QAAA,CAAA,GAAA,MAAe;AACf,IAAA,oBAAA,CAAA,OAAA,CAAA,GAAA,MAAc;AAClB,CAAC,EAJI,oBAAoB,KAApB,oBAAoB,GAIxB,EAAA,CAAA,CAAA;AAED,IAAK;AAAL,CAAA,UAAK,MAAM,EAAA;AACP,IAAA,MAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,MAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,MAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,MAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AAE7B,CAAC,EANI,MAAM,KAAN,MAAM,GAMV,EAAA,CAAA,CAAA;;ACnBY,MAAA,WAAW,GAAG;;AAEvB,IAAA,WAAW,EAAE,oBAAoB;;AAGjC,IAAA,MAAM,EAAE,2CAA2C;;AAGnD,IAAA,WAAW,EAAE,2CAA2C;;AAGxD,IAAA,cAAc,EAAE,2CAA2C;;AAG3D,IAAA,gBAAgB,EAAE,2CAA2C;;AAG7D,IAAA,YAAY,EAAE,4CAA4C;;AAG1D,IAAA,OAAO,EAAE,6CAA6C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AA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAEhC,QAAA,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC;AACf,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,OAAO,EAAE;AACP,gBAAA,MAAM,EAAE,IAAI;AACZ,gBAAA,QAAQ,EAAE,KAAK;AACf,gBAAA,gBAAgB,EAAE,KAAK;AACxB,aAAA;AACF,SAAA,CAAC;AACJ,KAAC;AACH;SAEgB,cAAc,GAAA;IAC5B,OAAO,qBAAqB,CAAC,MAAK;AAChC,QAAA,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC;AAC9B,QAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AACjC,QAAA,OAAO,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE;AACzC,KAAC,CAAC;AACJ;;ACtCA;;AAEG;;;;"}
|
|
@@ -57,7 +57,7 @@ const TkPreset = definePreset(Aura, {
|
|
|
57
57
|
700: 'var(--tk-color-base-primary-700)',
|
|
58
58
|
800: 'var(--tk-color-base-primary-800)',
|
|
59
59
|
900: 'var(--tk-color-base-primary-900)',
|
|
60
|
-
950: 'var(--tk-color-base-primary-950)'
|
|
60
|
+
950: 'var(--tk-color-base-primary-950)',
|
|
61
61
|
},
|
|
62
62
|
red: {
|
|
63
63
|
50: 'var(--tk-color-base-red-50)',
|
|
@@ -70,7 +70,7 @@ const TkPreset = definePreset(Aura, {
|
|
|
70
70
|
700: 'var(--tk-color-base-red-700)',
|
|
71
71
|
800: 'var(--tk-color-base-red-800)',
|
|
72
72
|
900: 'var(--tk-color-base-red-900)',
|
|
73
|
-
950: 'var(--tk-color-base-red-950)'
|
|
73
|
+
950: 'var(--tk-color-base-red-950)',
|
|
74
74
|
},
|
|
75
75
|
surface: {
|
|
76
76
|
0: 'var(--tk-color-base-surface-0)',
|
|
@@ -84,7 +84,7 @@ const TkPreset = definePreset(Aura, {
|
|
|
84
84
|
700: 'var(--tk-color-base-surface-700)',
|
|
85
85
|
800: 'var(--tk-color-base-surface-800)',
|
|
86
86
|
900: 'var(--tk-color-base-surface-900)',
|
|
87
|
-
950: 'var(--tk-color-base-surface-950)'
|
|
87
|
+
950: 'var(--tk-color-base-surface-950)',
|
|
88
88
|
},
|
|
89
89
|
},
|
|
90
90
|
font: {
|
|
@@ -148,7 +148,7 @@ const TkPreset = definePreset(Aura, {
|
|
|
148
148
|
borderColor: 'var(--tk-color-base-red-500)',
|
|
149
149
|
hoverBorderColor: 'var(--tk-color-base-red-600)',
|
|
150
150
|
activeBorderColor: 'var(--tk-color-base-red-700)',
|
|
151
|
-
}
|
|
151
|
+
},
|
|
152
152
|
},
|
|
153
153
|
},
|
|
154
154
|
},
|
|
@@ -159,10 +159,10 @@ const TkPreset = definePreset(Aura, {
|
|
|
159
159
|
background: 'var(--tk-color-base-surface-0)',
|
|
160
160
|
borderColor: 'var(--tk-color-base-surface-200)',
|
|
161
161
|
},
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
166
|
});
|
|
167
167
|
|
|
168
168
|
function themeFactory(config, document) {
|
|
@@ -183,7 +183,8 @@ function themeFactory(config, document) {
|
|
|
183
183
|
preset: TkPreset,
|
|
184
184
|
options: {
|
|
185
185
|
prefix: 'tk',
|
|
186
|
-
darkMode: false
|
|
186
|
+
darkMode: false,
|
|
187
|
+
darkModeSelector: false,
|
|
187
188
|
},
|
|
188
189
|
});
|
|
189
190
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tekus-design-system-core.mjs","sources":["../../../projects/design-system/core/types/src/grids/grid.enum.ts","../../../projects/design-system/core/types/src/breakpoints/breakpoints.ts","../../../projects/design-system/core/types/src/theme/tk-preset.ts","../../../projects/design-system/core/types/src/theme/theme.provider.ts","../../../projects/design-system/core/tekus-design-system-core.ts"],"sourcesContent":["enum GapGutter {\n normal = '24px',\n small = '16px',\n large = '32px',\n extraLarge = '40px',\n}\n\nenum PaddingGridContainer {\n large = '32px',\n medium = '24px',\n small = '16px'\n}\n\nenum Gutter {\n normal = 'normal',\n small = 'small',\n large = 'large',\n extraLarge = 'extraLarge',\n\n}\n\nexport {\n Gutter,\n GapGutter,\n PaddingGridContainer\n}","export const Breakpoints = {\n // Covers all devices with a width less than or equal to 360px.\n mobileSmall: '(max-width: 360px)',\n\n // For small phones (e.g., most modern cell phones)\n mobile: '(min-width: 361px) and (max-width: 424px)',\n\n // For large phones (e.g., Google Pixel, iPhone Plus/Max)\n mobileLarge: '(min-width: 425px) and (max-width: 575px)',\n\n // Vertical tablets and medium-sized devices\n tabletVertical: '(min-width: 576px) and (max-width: 767px)',\n\n // Tablets in landscape mode\n tabletHorizontal: '(min-width: 768px) and (max-width: 991px)',\n\n // Laptops and small desktops\n desktopSmall: '(min-width: 992px) and (max-width: 1199px)',\n\n // Large desks\n desktop: '(min-width: 1200px) and (max-width: 1399px)',\n\n // Ultra-wide screens\n desktopLarge: '(min-width: 1400px)',\n}","import { definePreset } from '@primeng/themes';\nimport Aura from '@primeng/themes/aura';\n\nexport const TkPreset = definePreset(Aura, {\n semantic: {\n primary: {\n 50: 'var(--tk-color-base-primary-50)',\n 100: 'var(--tk-color-base-primary-100)',\n 200: 'var(--tk-color-base-primary-200)',\n 300: 'var(--tk-color-base-primary-300)',\n 400: 'var(--tk-color-base-primary-400)',\n 500: 'var(--tk-color-base-primary-500)',\n 600: 'var(--tk-color-base-primary-600)',\n 700: 'var(--tk-color-base-primary-700)',\n 800: 'var(--tk-color-base-primary-800)',\n 900: 'var(--tk-color-base-primary-900)',\n 950: 'var(--tk-color-base-primary-950)'\n },\n red: {\n 50: 'var(--tk-color-base-red-50)',\n 100: 'var(--tk-color-base-red-100)',\n 200: 'var(--tk-color-base-red-200)',\n 300: 'var(--tk-color-base-red-300)',\n 400: 'var(--tk-color-base-red-400)',\n 500: 'var(--tk-color-base-red-500)',\n 600: 'var(--tk-color-base-red-600)',\n 700: 'var(--tk-color-base-red-700)',\n 800: 'var(--tk-color-base-red-800)',\n 900: 'var(--tk-color-base-red-900)',\n 950: 'var(--tk-color-base-red-950)'\n },\n surface: {\n 0: 'var(--tk-color-base-surface-0)',\n 50: 'var(--tk-color-base-surface-50)',\n 100: 'var(--tk-color-base-surface-100)',\n 200: 'var(--tk-color-base-surface-200)',\n 300: 'var(--tk-color-base-surface-300)',\n 400: 'var(--tk-color-base-surface-400)',\n 500: 'var(--tk-color-base-surface-500)',\n 600: 'var(--tk-color-base-surface-600)',\n 700: 'var(--tk-color-base-surface-700)',\n 800: 'var(--tk-color-base-surface-800)',\n 900: 'var(--tk-color-base-surface-900)',\n 950: 'var(--tk-color-base-surface-950)'\n },\n },\n font: {\n family: 'var(--tk-font-family)',\n },\n\n components: {\n button: {\n root: {\n outline: 'none',\n boxShadow: 'none',\n border: 'none',\n focusBoxShadow: 'none',\n },\n label: {\n color: 'inherit',\n },\n colorScheme: {\n light: {\n root: {\n primary: {\n hoverBackground: 'var(--tk-color-base-primary-400)',\n activeBackground: 'var(--tk-color-base-primary-400)',\n hoverBorderColor: 'transparent',\n activeBorderColor: 'transparent',\n },\n secondary: {\n background: 'var(--tk-color-base-surface-0)',\n hoverBackground: 'var(--tk-color-base-surface-100)',\n borderColor: 'var(--tk-color-base-surface-200)',\n hoverBorderColor: 'var(--tk-color-base-surface-200)',\n activeBorderColor: 'var(--tk-color-base-surface-200)',\n },\n },\n text: {\n secondary: {\n hoverBackground: 'var(--tk-color-base-surface-200)',\n activeBackground: 'var(--tk-color-base-surface-200)',\n },\n },\n },\n dark: {\n primary: {\n background: 'var(--tk-color-base-primary-500)',\n hoverBackground: 'var(--tk-color-base-primary-400)',\n activeBackground: 'var(--tk-color-base-primary-400)',\n borderColor: 'transparent',\n hoverBorderColor: 'transparent',\n activeBorderColor: 'transparent',\n },\n secondary: {\n background: 'var(--tk-color-base-surface-0)',\n hoverBackground: 'var(--tk-color-base-surface-200)',\n borderColor: 'var(--tk-color-base-surface-200)',\n hoverBorderColor: 'var(--tk-color-base-surface-200)',\n activeBorderColor: 'var(--tk-color-base-surface-200)',\n },\n danger: {\n background: 'var(--tk-color-base-red-500)',\n hoverBackground: 'var(--tk-color-base-red-600)',\n activeBackground: 'var(--tk-color-base-red-700)',\n borderColor: 'var(--tk-color-base-red-500)',\n hoverBorderColor: 'var(--tk-color-base-red-600)',\n activeBorderColor: 'var(--tk-color-base-red-700)',\n }\n },\n },\n },\n dialog: {\n colorScheme: {\n dark: {\n root: {\n background: 'var(--tk-color-base-surface-0)',\n borderColor: 'var(--tk-color-base-surface-200)',\n },\n }\n }\n }\n }\n});\n","import { inject, provideAppInitializer } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { PrimeNG } from 'primeng/config';\nimport { TkPreset } from './tk-preset';\n\nfunction themeFactory(config: PrimeNG, document: Document): () => void {\n return () => {\n const fontLink = document.createElement('link');\n fontLink.rel = 'stylesheet';\n fontLink.href =\n 'https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap';\n document.head.appendChild(fontLink);\n\n const style = document.createElement('style');\n style.innerHTML = `\n body {\n font-family: 'Poppins', sans-serif;\n }\n `;\n document.head.appendChild(style);\n\n config.theme.set({\n preset: TkPreset,\n options: {\n prefix: 'tk',\n darkMode: false\n },\n });\n };\n}\n\nexport function provideTkTheme() {\n return provideAppInitializer(() => {\n const config = inject(PrimeNG);\n const document = inject(DOCUMENT);\n return themeFactory(config, document)();\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA,IAAK;AAAL,CAAA,UAAK,SAAS,EAAA;AACV,IAAA,SAAA,CAAA,QAAA,CAAA,GAAA,MAAe;AACf,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,MAAc;AACd,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,MAAc;AACd,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QAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AACjC,QAAA,OAAO,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE;AACzC,KAAC,CAAC;AACJ;;ACrCA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"tekus-design-system-core.mjs","sources":["../../../projects/design-system/core/types/src/grids/grid.enum.ts","../../../projects/design-system/core/types/src/breakpoints/breakpoints.ts","../../../projects/design-system/core/types/src/theme/tk-preset.ts","../../../projects/design-system/core/types/src/theme/theme.provider.ts","../../../projects/design-system/core/tekus-design-system-core.ts"],"sourcesContent":["enum GapGutter {\n normal = '24px',\n small = '16px',\n large = '32px',\n extraLarge = '40px',\n}\n\nenum PaddingGridContainer {\n large = '32px',\n medium = '24px',\n small = '16px'\n}\n\nenum Gutter {\n normal = 'normal',\n small = 'small',\n large = 'large',\n extraLarge = 'extraLarge',\n\n}\n\nexport {\n Gutter,\n GapGutter,\n PaddingGridContainer\n}","export const Breakpoints = {\n // Covers all devices with a width less than or equal to 360px.\n mobileSmall: '(max-width: 360px)',\n\n // For small phones (e.g., most modern cell phones)\n mobile: '(min-width: 361px) and (max-width: 424px)',\n\n // For large phones (e.g., Google Pixel, iPhone Plus/Max)\n mobileLarge: '(min-width: 425px) and (max-width: 575px)',\n\n // Vertical tablets and medium-sized devices\n tabletVertical: '(min-width: 576px) and (max-width: 767px)',\n\n // Tablets in landscape mode\n tabletHorizontal: '(min-width: 768px) and (max-width: 991px)',\n\n // Laptops and small desktops\n desktopSmall: '(min-width: 992px) and (max-width: 1199px)',\n\n // Large desks\n desktop: '(min-width: 1200px) and (max-width: 1399px)',\n\n // Ultra-wide screens\n desktopLarge: '(min-width: 1400px)',\n}","import { definePreset } from '@primeng/themes';\nimport Aura from '@primeng/themes/aura';\n\nexport const TkPreset = definePreset(Aura, {\n semantic: {\n primary: {\n 50: 'var(--tk-color-base-primary-50)',\n 100: 'var(--tk-color-base-primary-100)',\n 200: 'var(--tk-color-base-primary-200)',\n 300: 'var(--tk-color-base-primary-300)',\n 400: 'var(--tk-color-base-primary-400)',\n 500: 'var(--tk-color-base-primary-500)',\n 600: 'var(--tk-color-base-primary-600)',\n 700: 'var(--tk-color-base-primary-700)',\n 800: 'var(--tk-color-base-primary-800)',\n 900: 'var(--tk-color-base-primary-900)',\n 950: 'var(--tk-color-base-primary-950)',\n },\n red: {\n 50: 'var(--tk-color-base-red-50)',\n 100: 'var(--tk-color-base-red-100)',\n 200: 'var(--tk-color-base-red-200)',\n 300: 'var(--tk-color-base-red-300)',\n 400: 'var(--tk-color-base-red-400)',\n 500: 'var(--tk-color-base-red-500)',\n 600: 'var(--tk-color-base-red-600)',\n 700: 'var(--tk-color-base-red-700)',\n 800: 'var(--tk-color-base-red-800)',\n 900: 'var(--tk-color-base-red-900)',\n 950: 'var(--tk-color-base-red-950)',\n },\n surface: {\n 0: 'var(--tk-color-base-surface-0)',\n 50: 'var(--tk-color-base-surface-50)',\n 100: 'var(--tk-color-base-surface-100)',\n 200: 'var(--tk-color-base-surface-200)',\n 300: 'var(--tk-color-base-surface-300)',\n 400: 'var(--tk-color-base-surface-400)',\n 500: 'var(--tk-color-base-surface-500)',\n 600: 'var(--tk-color-base-surface-600)',\n 700: 'var(--tk-color-base-surface-700)',\n 800: 'var(--tk-color-base-surface-800)',\n 900: 'var(--tk-color-base-surface-900)',\n 950: 'var(--tk-color-base-surface-950)',\n },\n },\n font: {\n family: 'var(--tk-font-family)',\n },\n\n components: {\n button: {\n root: {\n outline: 'none',\n boxShadow: 'none',\n border: 'none',\n focusBoxShadow: 'none',\n },\n label: {\n color: 'inherit',\n },\n colorScheme: {\n light: {\n root: {\n primary: {\n hoverBackground: 'var(--tk-color-base-primary-400)',\n activeBackground: 'var(--tk-color-base-primary-400)',\n hoverBorderColor: 'transparent',\n activeBorderColor: 'transparent',\n },\n secondary: {\n background: 'var(--tk-color-base-surface-0)',\n hoverBackground: 'var(--tk-color-base-surface-100)',\n borderColor: 'var(--tk-color-base-surface-200)',\n hoverBorderColor: 'var(--tk-color-base-surface-200)',\n activeBorderColor: 'var(--tk-color-base-surface-200)',\n },\n },\n text: {\n secondary: {\n hoverBackground: 'var(--tk-color-base-surface-200)',\n activeBackground: 'var(--tk-color-base-surface-200)',\n },\n },\n },\n dark: {\n primary: {\n background: 'var(--tk-color-base-primary-500)',\n hoverBackground: 'var(--tk-color-base-primary-400)',\n activeBackground: 'var(--tk-color-base-primary-400)',\n borderColor: 'transparent',\n hoverBorderColor: 'transparent',\n activeBorderColor: 'transparent',\n },\n secondary: {\n background: 'var(--tk-color-base-surface-0)',\n hoverBackground: 'var(--tk-color-base-surface-200)',\n borderColor: 'var(--tk-color-base-surface-200)',\n hoverBorderColor: 'var(--tk-color-base-surface-200)',\n activeBorderColor: 'var(--tk-color-base-surface-200)',\n },\n danger: {\n background: 'var(--tk-color-base-red-500)',\n hoverBackground: 'var(--tk-color-base-red-600)',\n activeBackground: 'var(--tk-color-base-red-700)',\n borderColor: 'var(--tk-color-base-red-500)',\n hoverBorderColor: 'var(--tk-color-base-red-600)',\n activeBorderColor: 'var(--tk-color-base-red-700)',\n },\n },\n },\n },\n dialog: {\n colorScheme: {\n dark: {\n root: {\n background: 'var(--tk-color-base-surface-0)',\n borderColor: 'var(--tk-color-base-surface-200)',\n },\n },\n },\n },\n },\n});\n","import { inject, provideAppInitializer } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { PrimeNG } from 'primeng/config';\nimport { TkPreset } from './tk-preset';\n\nfunction themeFactory(config: PrimeNG, document: Document): () => void {\n return () => {\n const fontLink = document.createElement('link');\n fontLink.rel = 'stylesheet';\n fontLink.href =\n 'https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap';\n document.head.appendChild(fontLink);\n\n const style = document.createElement('style');\n style.innerHTML = `\n body {\n font-family: 'Poppins', sans-serif;\n }\n `;\n document.head.appendChild(style);\n\n config.theme.set({\n preset: TkPreset,\n options: {\n prefix: 'tk',\n darkMode: false,\n darkModeSelector: false,\n },\n });\n };\n}\n\nexport function provideTkTheme() {\n return provideAppInitializer(() => {\n const config = inject(PrimeNG);\n const document = inject(DOCUMENT);\n return themeFactory(config, document)();\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA,IAAK;AAAL,CAAA,UAAK,SAAS,EAAA;AACV,IAAA,SAAA,CAAA,QAAA,CAAA,GAAA,MAAe;AACf,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,MAAc;AACd,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,MAAc;AACd,IAAA,SAAA,CAAA,YAAA,CAAA,GAAA,MAAmB;AACvB,CAAC,EALI,SAAS,KAAT,SAAS,GAKb,EAAA,CAAA,CAAA;AAED,IAAK;AAAL,CAAA,UAAK,oBAAoB,EAAA;AACrB,IAAA,oBAAA,CAAA,OAAA,CAAA,GAAA,MAAc;AACd,IAAA,oBAAA,CAAA,QAAA,CAAA,GAAA,MAAe;AACf,IAAA,oBAAA,CAAA,OAAA,CAAA,GAAA,MAAc;AAClB,CAAC,EAJI,oBAAoB,KAApB,oBAAoB,GAIxB,EAAA,CAAA,CAAA;AAED,IAAK;AAAL,CAAA,UAAK,MAAM,EAAA;AACP,IAAA,MAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,MAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,MAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,MAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AAE7B,CAAC,EANI,MAAM,KAAN,MAAM,GAMV,EAAA,CAAA,CAAA;;ACnBY,MAAA,WAAW,GAAG;;AAEvB,IAAA,WAAW,EAAE,oBAAoB;;AAGjC,IAAA,MAAM,EAAE,2CAA2C;;AAGnD,IAAA,WAAW,EAAE,2CAA2C;;AAGxD,IAAA,cAAc,EAAE,2CAA2C;;AAG3D,IAAA,gBAAgB,EAA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CAAC,aAAa,CAAC,OAAO,CAAC;QAC7C,KAAK,CAAC,SAAS,GAAG;;;;KAIjB;AACD,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAEhC,QAAA,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC;AACf,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,OAAO,EAAE;AACP,gBAAA,MAAM,EAAE,IAAI;AACZ,gBAAA,QAAQ,EAAE,KAAK;AACf,gBAAA,gBAAgB,EAAE,KAAK;AACxB,aAAA;AACF,SAAA,CAAC;AACJ,KAAC;AACH;SAEgB,cAAc,GAAA;IAC5B,OAAO,qBAAqB,CAAC,MAAK;AAChC,QAAA,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC;AAC9B,QAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AACjC,QAAA,OAAO,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE;AACzC,KAAC,CAAC;AACJ;;ACtCA;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tekus/design-system",
|
|
3
3
|
"description": "Tekus design system library",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.3.0",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"peerDependencies": {
|
|
7
7
|
"@angular/core": "^19.2.15",
|
|
@@ -43,6 +43,10 @@
|
|
|
43
43
|
"types": "./components/button/index.d.ts",
|
|
44
44
|
"default": "./fesm2022/tekus-design-system-components-button.mjs"
|
|
45
45
|
},
|
|
46
|
+
"./components/date-picker": {
|
|
47
|
+
"types": "./components/date-picker/index.d.ts",
|
|
48
|
+
"default": "./fesm2022/tekus-design-system-components-date-picker.mjs"
|
|
49
|
+
},
|
|
46
50
|
"./components/fallback-view": {
|
|
47
51
|
"types": "./components/fallback-view/index.d.ts",
|
|
48
52
|
"default": "./fesm2022/tekus-design-system-components-fallback-view.mjs"
|
|
@@ -51,14 +55,14 @@
|
|
|
51
55
|
"types": "./components/modal/index.d.ts",
|
|
52
56
|
"default": "./fesm2022/tekus-design-system-components-modal.mjs"
|
|
53
57
|
},
|
|
54
|
-
"./directives/gird-item": {
|
|
55
|
-
"types": "./directives/gird-item/index.d.ts",
|
|
56
|
-
"default": "./fesm2022/tekus-design-system-directives-gird-item.mjs"
|
|
57
|
-
},
|
|
58
58
|
"./core/types": {
|
|
59
59
|
"types": "./core/types/index.d.ts",
|
|
60
60
|
"default": "./fesm2022/tekus-design-system-core-types.mjs"
|
|
61
61
|
},
|
|
62
|
+
"./directives/gird-item": {
|
|
63
|
+
"types": "./directives/gird-item/index.d.ts",
|
|
64
|
+
"default": "./fesm2022/tekus-design-system-directives-gird-item.mjs"
|
|
65
|
+
},
|
|
62
66
|
"./utils/sanitizer-utils": {
|
|
63
67
|
"types": "./utils/sanitizer-utils/index.d.ts",
|
|
64
68
|
"default": "./fesm2022/tekus-design-system-utils-sanitizer-utils.mjs"
|