@thalassic/ui 0.7.0 → 0.8.2

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/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@thalassic/ui",
3
- "version": "0.7.0",
3
+ "version": "0.8.2",
4
4
  "license": "MIT",
5
5
  "peerDependencies": {
6
+ "@angular/cdk": "^21.0.0",
6
7
  "@angular/common": "^21.0.0",
7
8
  "@angular/core": "^21.0.0",
8
9
  "chart.js": "^4.0.0"
@@ -29,6 +30,10 @@
29
30
  ".": {
30
31
  "types": "./types/thalassic-ui.d.ts",
31
32
  "default": "./fesm2022/thalassic-ui.mjs"
33
+ },
34
+ "./charts": {
35
+ "types": "./types/thalassic-ui-charts.d.ts",
36
+ "default": "./fesm2022/thalassic-ui-charts.mjs"
32
37
  }
33
38
  },
34
39
  "dependencies": {
@@ -0,0 +1,102 @@
1
+ import * as node_modules_chart_js_dist_types_utils from 'node_modules/chart.js/dist/types/utils';
2
+ import * as i0 from '@angular/core';
3
+ import { InputSignalWithTransform, OnInit, OnDestroy, Signal, ElementRef, InjectionToken, EnvironmentProviders } from '@angular/core';
4
+ import * as chart_js from 'chart.js';
5
+ import { ChartType, ChartDatasetCustomTypesPerDataset, ChartDataset, ChartOptions } from 'chart.js';
6
+
7
+ declare abstract class ChartElement<T extends ChartType = ChartType> {
8
+ abstract readonly type: T;
9
+ dataset: InputSignalWithTransform<ChartDatasetCustomTypesPerDataset<T>, ChartDataset>;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<ChartElement<any>, never>;
11
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ChartElement<any>, never, never, { "dataset": { "alias": "dataset"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
12
+ }
13
+
14
+ declare class Chart implements OnInit, OnDestroy {
15
+ private _config;
16
+ private _chartService;
17
+ private _destroyRef;
18
+ private _themeService;
19
+ protected canvasRef: Signal<ElementRef<HTMLCanvasElement> | undefined>;
20
+ protected chartElements: Signal<readonly ChartElement<keyof chart_js.ChartTypeRegistry>[]>;
21
+ private _chart;
22
+ labels: i0.InputSignal<unknown[]>;
23
+ options: i0.InputSignal<node_modules_chart_js_dist_types_utils._DeepPartialObject<chart_js.CoreChartOptions<keyof chart_js.ChartTypeRegistry> & chart_js.ElementChartOptions<keyof chart_js.ChartTypeRegistry> & chart_js.PluginChartOptions<keyof chart_js.ChartTypeRegistry> & chart_js.DatasetChartOptions<keyof chart_js.ChartTypeRegistry> & chart_js.ScaleChartOptions<keyof chart_js.ChartTypeRegistry>> | undefined>;
24
+ private _options;
25
+ private _datasets;
26
+ protected hostClasses: Signal<string[]>;
27
+ constructor();
28
+ protected get canvasElement(): HTMLCanvasElement | undefined;
29
+ private _tryInitThemeListener;
30
+ ngOnInit(): void;
31
+ ngOnDestroy(): void;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<Chart, never>;
33
+ static ɵcmp: i0.ɵɵComponentDeclaration<Chart, "tls-chart", never, { "labels": { "alias": "labels"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, ["chartElements"], never, true, never>;
34
+ }
35
+
36
+ interface ChartConfig {
37
+ options: ChartOptions;
38
+ }
39
+ declare const DEFAULT_CHART_CONFIG: ChartConfig;
40
+
41
+ declare const CHART_CONFIG: InjectionToken<ChartConfig>;
42
+
43
+ declare class BarChart extends ChartElement<'bar'> {
44
+ readonly type = "bar";
45
+ constructor();
46
+ static ɵfac: i0.ɵɵFactoryDeclaration<BarChart, never>;
47
+ static ɵcmp: i0.ɵɵComponentDeclaration<BarChart, "tls-bar-chart", never, {}, {}, never, never, true, never>;
48
+ }
49
+
50
+ declare class BubbleChart extends ChartElement<'bubble'> {
51
+ readonly type = "bubble";
52
+ constructor();
53
+ static ɵfac: i0.ɵɵFactoryDeclaration<BubbleChart, never>;
54
+ static ɵcmp: i0.ɵɵComponentDeclaration<BubbleChart, "tls-bubble-chart", never, {}, {}, never, never, true, never>;
55
+ }
56
+
57
+ declare class DoughnutChart extends ChartElement<'doughnut'> {
58
+ readonly type = "doughnut";
59
+ constructor();
60
+ static ɵfac: i0.ɵɵFactoryDeclaration<DoughnutChart, never>;
61
+ static ɵcmp: i0.ɵɵComponentDeclaration<DoughnutChart, "tls-doughnut-chart", never, {}, {}, never, never, true, never>;
62
+ }
63
+
64
+ declare class LineChart extends ChartElement<'line'> {
65
+ readonly type = "line";
66
+ constructor();
67
+ static ɵfac: i0.ɵɵFactoryDeclaration<LineChart, never>;
68
+ static ɵcmp: i0.ɵɵComponentDeclaration<LineChart, "tls-line-chart", never, {}, {}, never, never, true, never>;
69
+ }
70
+
71
+ declare class PieChart extends ChartElement<'pie'> {
72
+ readonly type = "pie";
73
+ constructor();
74
+ static ɵfac: i0.ɵɵFactoryDeclaration<PieChart, never>;
75
+ static ɵcmp: i0.ɵɵComponentDeclaration<PieChart, "tls-pie-chart", never, {}, {}, never, never, true, never>;
76
+ }
77
+
78
+ declare class PolarAreaChart extends ChartElement<'polarArea'> {
79
+ readonly type = "polarArea";
80
+ constructor();
81
+ static ɵfac: i0.ɵɵFactoryDeclaration<PolarAreaChart, never>;
82
+ static ɵcmp: i0.ɵɵComponentDeclaration<PolarAreaChart, "tls-polar-area-chart", never, {}, {}, never, never, true, never>;
83
+ }
84
+
85
+ declare class RadarChart extends ChartElement<'radar'> {
86
+ readonly type = "radar";
87
+ constructor();
88
+ static ɵfac: i0.ɵɵFactoryDeclaration<RadarChart, never>;
89
+ static ɵcmp: i0.ɵɵComponentDeclaration<RadarChart, "tls-radar-chart", never, {}, {}, never, never, true, never>;
90
+ }
91
+
92
+ declare class ScatterChart extends ChartElement<'scatter'> {
93
+ readonly type = "scatter";
94
+ constructor();
95
+ static ɵfac: i0.ɵɵFactoryDeclaration<ScatterChart, never>;
96
+ static ɵcmp: i0.ɵɵComponentDeclaration<ScatterChart, "tls-scatter-chart", never, {}, {}, never, never, true, never>;
97
+ }
98
+
99
+ declare const provideThalassicChartConfig: (config: ChartConfig) => EnvironmentProviders;
100
+
101
+ export { BarChart, BubbleChart, CHART_CONFIG, Chart, DEFAULT_CHART_CONFIG, DoughnutChart, LineChart, PieChart, PolarAreaChart, RadarChart, ScatterChart, provideThalassicChartConfig };
102
+ export type { ChartConfig };
@@ -1,13 +1,14 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InputSignal, InputSignalWithTransform, InjectionToken, OnInit, OnDestroy, Signal, ElementRef, ModelSignal, TemplateRef, OutputEmitterRef, EnvironmentProviders } from '@angular/core';
2
+ import { InputSignal, InputSignalWithTransform, InjectionToken, ModelSignal, Signal, WritableSignal, OnDestroy, TemplateRef, OutputEmitterRef, TrackByFunction, EnvironmentProviders } from '@angular/core';
3
3
  import * as _thalassic_ui from '@thalassic/ui';
4
- import * as node_modules_chart_js_dist_types_utils from 'node_modules/chart.js/dist/types/utils';
5
- import * as chart_js from 'chart.js';
6
- import { ChartType, ChartDatasetCustomTypesPerDataset, ChartDataset, ChartOptions } from 'chart.js';
4
+ import { CdkDialogContainer, DialogRole, DialogRef } from '@angular/cdk/dialog';
5
+ import { ComponentType } from '@angular/cdk/portal';
7
6
  import { FieldTree, FormUiControl, WithOptionalFieldTree, ValidationError, FormCheckboxControl, FormValueControl } from '@angular/forms/signals';
7
+ import { Day } from 'date-fns';
8
8
  import { SafeHtml } from '@angular/platform-browser';
9
- import { ConnectedPosition } from '@angular/cdk/overlay';
10
9
  import { Point } from '@thalassic/core';
10
+ import { DataSource } from '@angular/cdk/table';
11
+ import { ConnectedPosition } from '@angular/cdk/overlay';
11
12
 
12
13
  type color = 'primary' | 'secondary' | 'tertiary' | 'success' | 'info' | 'warning' | 'danger';
13
14
 
@@ -15,27 +16,34 @@ type controlSize = 'sm' | 'md' | 'lg';
15
16
 
16
17
  type orientation = 'horizontal' | 'vertical';
17
18
 
19
+ type overlayPosition = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
20
+
18
21
  type size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
19
22
 
20
23
  interface tlsUiConfigProvider {
21
24
  components: {
22
25
  alert?: Partial<AlertConfig>;
23
26
  button?: Partial<ButtonConfig>;
27
+ dateTimePicker?: Partial<DateTimePickerConfig>;
28
+ dialog?: Partial<DialogConfig>;
24
29
  divider?: Partial<DividerConfig>;
25
30
  input?: Partial<InputConfig>;
26
31
  password?: Partial<PasswordConfig>;
32
+ select?: Partial<SelectConfig>;
27
33
  switch?: Partial<SwitchConfig>;
28
34
  formItem?: Partial<FormItemConfig>;
29
35
  icon?: Partial<IconConfig>;
36
+ pagination?: Partial<PaginationConfig>;
37
+ popover?: Partial<PopoverConfig>;
30
38
  skeleton?: Partial<SkeletonConfig>;
31
39
  stepper?: Partial<StepperConfig>;
40
+ table?: Partial<TableConfig>;
32
41
  tabs?: Partial<TabsConfig>;
33
42
  tooltip?: Partial<TooltipConfig>;
34
43
  };
35
44
  }
36
45
 
37
46
  type buttonType = 'submit' | 'reset' | 'button';
38
- type buttonSize = controlSize;
39
47
  type buttonVariant = 'filled' | 'outlined' | 'text' | 'elevated';
40
48
  type buttonColor = color;
41
49
 
@@ -69,7 +77,7 @@ declare abstract class ButtonBase {
69
77
  readonly icon: InputSignalWithTransform<boolean, unknown>;
70
78
  readonly color: InputSignal<buttonColor>;
71
79
  readonly variant: InputSignal<buttonVariant>;
72
- readonly size: InputSignal<buttonSize>;
80
+ readonly size: InputSignal<controlSize>;
73
81
  readonly rounded: InputSignalWithTransform<boolean, unknown>;
74
82
  /** Whether the button stretches to fill its container's width. */
75
83
  readonly fluid: InputSignalWithTransform<boolean, unknown>;
@@ -100,7 +108,7 @@ declare class ButtonDirective extends ButtonBase {
100
108
  interface ButtonConfig {
101
109
  color: buttonColor;
102
110
  variant: buttonVariant;
103
- size: buttonSize;
111
+ size: controlSize;
104
112
  type: buttonType;
105
113
  fluid: boolean;
106
114
  }
@@ -108,97 +116,45 @@ declare const DEFAULT_BUTTON_CONFIG: ButtonConfig;
108
116
 
109
117
  declare const BUTTON_CONFIG: InjectionToken<ButtonConfig>;
110
118
 
111
- declare abstract class ChartElement<T extends ChartType = ChartType> {
112
- abstract readonly type: T;
113
- dataset: InputSignalWithTransform<ChartDatasetCustomTypesPerDataset<T>, ChartDataset>;
114
- static ɵfac: i0.ɵɵFactoryDeclaration<ChartElement<any>, never>;
115
- static ɵdir: i0.ɵɵDirectiveDeclaration<ChartElement<any>, never, never, { "dataset": { "alias": "dataset"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
116
- }
117
-
118
- declare class Chart implements OnInit, OnDestroy {
119
- private _config;
120
- private _chartService;
121
- private _destroyRef;
122
- private _themeService;
123
- protected canvasRef: Signal<ElementRef<HTMLCanvasElement> | undefined>;
124
- protected chartElements: Signal<readonly ChartElement<keyof chart_js.ChartTypeRegistry>[]>;
125
- private _chart;
126
- labels: i0.InputSignal<unknown[]>;
127
- options: i0.InputSignal<node_modules_chart_js_dist_types_utils._DeepPartialObject<chart_js.CoreChartOptions<keyof chart_js.ChartTypeRegistry> & chart_js.ElementChartOptions<keyof chart_js.ChartTypeRegistry> & chart_js.PluginChartOptions<keyof chart_js.ChartTypeRegistry> & chart_js.DatasetChartOptions<keyof chart_js.ChartTypeRegistry> & chart_js.ScaleChartOptions<keyof chart_js.ChartTypeRegistry>> | undefined>;
128
- private _options;
129
- private _datasets;
130
- protected hostClasses: Signal<string[]>;
131
- constructor();
132
- protected get canvasElement(): HTMLCanvasElement | undefined;
133
- private _tryInitThemeListener;
134
- ngOnInit(): void;
135
- ngOnDestroy(): void;
136
- static ɵfac: i0.ɵɵFactoryDeclaration<Chart, never>;
137
- static ɵcmp: i0.ɵɵComponentDeclaration<Chart, "tls-chart", never, { "labels": { "alias": "labels"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, ["chartElements"], never, true, never>;
138
- }
139
-
140
- interface ChartConfig {
141
- options: ChartOptions;
142
- }
143
- declare const DEFAULT_CHART_CONFIG: ChartConfig;
144
-
145
- declare const CHART_CONFIG: InjectionToken<ChartConfig>;
146
-
147
- declare class BarChart extends ChartElement<'bar'> {
148
- readonly type = "bar";
149
- constructor();
150
- static ɵfac: i0.ɵɵFactoryDeclaration<BarChart, never>;
151
- static ɵcmp: i0.ɵɵComponentDeclaration<BarChart, "tls-bar-chart", never, {}, {}, never, never, true, never>;
152
- }
153
-
154
- declare class BubbleChart extends ChartElement<'bubble'> {
155
- readonly type = "bubble";
156
- constructor();
157
- static ɵfac: i0.ɵɵFactoryDeclaration<BubbleChart, never>;
158
- static ɵcmp: i0.ɵɵComponentDeclaration<BubbleChart, "tls-bubble-chart", never, {}, {}, never, never, true, never>;
159
- }
160
-
161
- declare class DoughnutChart extends ChartElement<'doughnut'> {
162
- readonly type = "doughnut";
163
- constructor();
164
- static ɵfac: i0.ɵɵFactoryDeclaration<DoughnutChart, never>;
165
- static ɵcmp: i0.ɵɵComponentDeclaration<DoughnutChart, "tls-doughnut-chart", never, {}, {}, never, never, true, never>;
166
- }
119
+ type dialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'wide' | 'full';
167
120
 
168
- declare class LineChart extends ChartElement<'line'> {
169
- readonly type = "line";
170
- constructor();
171
- static ɵfac: i0.ɵɵFactoryDeclaration<LineChart, never>;
172
- static ɵcmp: i0.ɵɵComponentDeclaration<LineChart, "tls-line-chart", never, {}, {}, never, never, true, never>;
121
+ interface DialogConfig {
122
+ size: dialogSize;
123
+ closeable: boolean;
124
+ backdropClose: boolean;
173
125
  }
126
+ declare const DEFAULT_DIALOG_CONFIG: DialogConfig;
174
127
 
175
- declare class PieChart extends ChartElement<'pie'> {
176
- readonly type = "pie";
177
- constructor();
178
- static ɵfac: i0.ɵɵFactoryDeclaration<PieChart, never>;
179
- static ɵcmp: i0.ɵɵComponentDeclaration<PieChart, "tls-pie-chart", never, {}, {}, never, never, true, never>;
128
+ declare class Dialog extends CdkDialogContainer {
129
+ private readonly _tlsConfig;
130
+ private readonly _dialogRef;
131
+ protected readonly hostClasses: string[];
132
+ protected get config(): DialogConfig;
133
+ protected close(): void;
134
+ static ɵfac: i0.ɵɵFactoryDeclaration<Dialog, never>;
135
+ static ɵcmp: i0.ɵɵComponentDeclaration<Dialog, "tls-dialog", never, {}, {}, never, never, true, never>;
180
136
  }
181
137
 
182
- declare class PolarAreaChart extends ChartElement<'polarArea'> {
183
- readonly type = "polarArea";
184
- constructor();
185
- static ɵfac: i0.ɵɵFactoryDeclaration<PolarAreaChart, never>;
186
- static ɵcmp: i0.ɵɵComponentDeclaration<PolarAreaChart, "tls-polar-area-chart", never, {}, {}, never, never, true, never>;
138
+ interface DialogOpenConfig<D = unknown> {
139
+ data?: D | null;
140
+ size?: dialogSize;
141
+ closeable?: boolean;
142
+ backdropClose?: boolean;
143
+ role?: DialogRole;
144
+ ariaLabel?: string | null;
145
+ ariaLabelledBy?: string | null;
146
+ ariaDescribedBy?: string | null;
187
147
  }
188
-
189
- declare class RadarChart extends ChartElement<'radar'> {
190
- readonly type = "radar";
191
- constructor();
192
- static ɵfac: i0.ɵɵFactoryDeclaration<RadarChart, never>;
193
- static ɵcmp: i0.ɵɵComponentDeclaration<RadarChart, "tls-radar-chart", never, {}, {}, never, never, true, never>;
148
+ declare class DialogService {
149
+ private readonly _dialog;
150
+ private readonly _config;
151
+ open<R = unknown, D = unknown, C = unknown>(component: ComponentType<C>, config?: DialogOpenConfig<D>): DialogRef<R, C>;
152
+ closeAll(): void;
153
+ static ɵfac: i0.ɵɵFactoryDeclaration<DialogService, never>;
154
+ static ɵprov: i0.ɵɵInjectableDeclaration<DialogService>;
194
155
  }
195
156
 
196
- declare class ScatterChart extends ChartElement<'scatter'> {
197
- readonly type = "scatter";
198
- constructor();
199
- static ɵfac: i0.ɵɵFactoryDeclaration<ScatterChart, never>;
200
- static ɵcmp: i0.ɵɵComponentDeclaration<ScatterChart, "tls-scatter-chart", never, {}, {}, never, never, true, never>;
201
- }
157
+ declare const DIALOG_CONFIG: InjectionToken<DialogConfig>;
202
158
 
203
159
  type dividerOrientation = orientation;
204
160
  type dividerContentPosition = 'start' | 'center' | 'end';
@@ -305,7 +261,47 @@ declare class Checkbox extends CheckboxFormControl {
305
261
  static ɵcmp: i0.ɵɵComponentDeclaration<Checkbox, "tls-checkbox", never, { "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; }, { "indeterminate": "indeterminateChange"; "checked": "checkedChange"; }, never, never, true, never>;
306
262
  }
307
263
 
308
- type inputSize = controlSize;
264
+ type dateTimePickerMode = 'calendar' | 'month-picker' | 'year-picker' | 'time-picker' | 'date-time';
265
+
266
+ type ActiveView = 'calendar' | 'month-picker' | 'year-picker' | 'time-picker' | 'date-time';
267
+ declare class DateTimePicker extends ValueFormControl<Date | null> {
268
+ private readonly config;
269
+ private readonly popoverComponent;
270
+ readonly value: ModelSignal<Date | null>;
271
+ readonly mode: InputSignal<dateTimePickerMode>;
272
+ readonly inline: InputSignalWithTransform<boolean, unknown>;
273
+ readonly placeholder: InputSignal<string>;
274
+ readonly size: InputSignal<controlSize>;
275
+ readonly fluid: InputSignalWithTransform<boolean, unknown>;
276
+ readonly yearsPerPage: InputSignal<number>;
277
+ readonly weekStartsOn: InputSignal<Day>;
278
+ readonly weekDays: InputSignal<string[]>;
279
+ protected readonly viewDate: WritableSignal<Date>;
280
+ protected readonly activeView: WritableSignal<ActiveView>;
281
+ protected readonly hostClasses: Signal<string[]>;
282
+ protected readonly triggerLabel: Signal<string>;
283
+ constructor();
284
+ protected onViewDateChange(date: Date): void;
285
+ protected onDaySelect(date: Date): void;
286
+ protected onMonthSelect(date: Date): void;
287
+ protected onYearSelect(date: Date): void;
288
+ protected onTimeChange(date: Date): void;
289
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateTimePicker, never>;
290
+ static ɵcmp: i0.ɵɵComponentDeclaration<DateTimePicker, "tls-date-time-picker", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "inline": { "alias": "inline"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fluid": { "alias": "fluid"; "required": false; "isSignal": true; }; "yearsPerPage": { "alias": "yearsPerPage"; "required": false; "isSignal": true; }; "weekStartsOn": { "alias": "weekStartsOn"; "required": false; "isSignal": true; }; "weekDays": { "alias": "weekDays"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
291
+ }
292
+
293
+ interface DateTimePickerConfig {
294
+ mode: dateTimePickerMode;
295
+ inline: boolean;
296
+ placeholder: string;
297
+ size: controlSize;
298
+ yearsPerPage: number;
299
+ weekStartsOn: Day;
300
+ weekDays: string[];
301
+ }
302
+ declare const DEFAULT_DATE_TIME_PICKER_CONFIG: DateTimePickerConfig;
303
+
304
+ declare const DATE_TIME_PICKER_CONFIG: InjectionToken<DateTimePickerConfig>;
309
305
 
310
306
  declare class Input extends ValueFormControl<string> {
311
307
  private _config;
@@ -313,7 +309,7 @@ declare class Input extends ValueFormControl<string> {
313
309
  readonly value: ModelSignal<string>;
314
310
  readonly inputId: InputSignal<string | null>;
315
311
  readonly placeholder: InputSignal<string>;
316
- readonly size: InputSignal<inputSize>;
312
+ readonly size: InputSignal<controlSize>;
317
313
  readonly fluid: InputSignalWithTransform<boolean, unknown>;
318
314
  protected readonly classes: Signal<string[]>;
319
315
  protected onInput(event: Event): void;
@@ -322,7 +318,7 @@ declare class Input extends ValueFormControl<string> {
322
318
  }
323
319
 
324
320
  interface InputConfig {
325
- size: inputSize;
321
+ size: controlSize;
326
322
  type: string;
327
323
  placeholder: string;
328
324
  fluid: boolean;
@@ -331,7 +327,7 @@ declare const DEFAULT_INPUT_CONFIG: InputConfig;
331
327
 
332
328
  declare class InputDirective {
333
329
  private _config;
334
- readonly size: InputSignal<inputSize>;
330
+ readonly size: InputSignal<controlSize>;
335
331
  readonly fluid: InputSignalWithTransform<boolean, unknown>;
336
332
  protected readonly hostClasses: Signal<string[]>;
337
333
  static ɵfac: i0.ɵɵFactoryDeclaration<InputDirective, never>;
@@ -346,7 +342,7 @@ declare class Password extends ValueFormControl<string> {
346
342
  readonly visible: ModelSignal<boolean>;
347
343
  readonly inputId: InputSignal<string | null>;
348
344
  readonly placeholder: InputSignal<string>;
349
- readonly size: InputSignal<inputSize>;
345
+ readonly size: InputSignal<controlSize>;
350
346
  readonly fluid: InputSignalWithTransform<boolean, unknown>;
351
347
  protected readonly hostClasses: Signal<string[]>;
352
348
  protected type: Signal<"text" | "password">;
@@ -357,7 +353,7 @@ declare class Password extends ValueFormControl<string> {
357
353
  }
358
354
 
359
355
  interface PasswordConfig {
360
- size: inputSize;
356
+ size: controlSize;
361
357
  placeholder: string;
362
358
  fluid: boolean;
363
359
  }
@@ -420,6 +416,62 @@ declare class RadioButton extends ValueFormControl<unknown> {
420
416
  static ɵcmp: i0.ɵɵComponentDeclaration<RadioButton, "tls-radio-button", never, { "radioValue": { "alias": "radioValue"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
421
417
  }
422
418
 
419
+ type selectOptionType<T> = string | number | T;
420
+
421
+ interface NormalizedOption<V = unknown> {
422
+ value: V;
423
+ label: string;
424
+ disabled: boolean;
425
+ }
426
+ declare class Select<T, V = unknown> extends ValueFormControl<V | null> implements OnDestroy {
427
+ private readonly _config;
428
+ private readonly _overlay;
429
+ private readonly _viewContainerRef;
430
+ private readonly _destroyRef;
431
+ private readonly _triggerElement;
432
+ private readonly _panelTemplate;
433
+ private _overlayRef;
434
+ private _portal;
435
+ readonly value: ModelSignal<V | null>;
436
+ readonly inputId: InputSignal<string | null>;
437
+ readonly options: InputSignal<selectOptionType<T>[]>;
438
+ readonly optionLabel: InputSignal<keyof T | undefined>;
439
+ readonly optionValue: InputSignal<keyof T | undefined>;
440
+ readonly optionDisabled: InputSignal<keyof T | undefined>;
441
+ readonly placeholder: InputSignal<string>;
442
+ readonly size: InputSignal<controlSize>;
443
+ readonly fluid: InputSignalWithTransform<boolean, unknown>;
444
+ readonly tabindex: InputSignal<string | number>;
445
+ readonly clearable: InputSignalWithTransform<boolean, unknown>;
446
+ protected readonly isOpen: WritableSignal<boolean>;
447
+ protected readonly activeIndex: WritableSignal<number>;
448
+ protected readonly normalizedOptions: Signal<NormalizedOption<V>[]>;
449
+ protected readonly hasValue: Signal<boolean>;
450
+ protected readonly selectedLabel: Signal<string>;
451
+ protected readonly hostClasses: Signal<string[]>;
452
+ protected open(): void;
453
+ protected close(): void;
454
+ protected toggle(): void;
455
+ protected select(option: NormalizedOption<V>): void;
456
+ protected clear(): void;
457
+ protected onOptionHover(index: number, disabled?: boolean): void;
458
+ protected onKeydown(event: KeyboardEvent): void;
459
+ private _moveActive;
460
+ ngOnDestroy(): void;
461
+ static ɵfac: i0.ɵɵFactoryDeclaration<Select<any, any>, never>;
462
+ static ɵcmp: i0.ɵɵComponentDeclaration<Select<any, any>, "tls-select", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "optionLabel": { "alias": "optionLabel"; "required": false; "isSignal": true; }; "optionValue": { "alias": "optionValue"; "required": false; "isSignal": true; }; "optionDisabled": { "alias": "optionDisabled"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fluid": { "alias": "fluid"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
463
+ }
464
+
465
+ interface SelectConfig {
466
+ size: controlSize;
467
+ placeholder: string;
468
+ fluid: boolean;
469
+ clearable: boolean;
470
+ }
471
+ declare const DEFAULT_SELECT_CONFIG: SelectConfig;
472
+
473
+ declare const SELECT_CONFIG: InjectionToken<SelectConfig>;
474
+
423
475
  type switchColor = color;
424
476
 
425
477
  declare class Switch extends CheckboxFormControl {
@@ -506,6 +558,77 @@ declare const DEFAULT_LOADER_CONFIG: LoaderConfig;
506
558
 
507
559
  declare const LOADER_CONFIG: InjectionToken<LoaderConfig>;
508
560
 
561
+ type paginationItem = number | 'gap';
562
+
563
+ declare class Pagination {
564
+ private readonly _config;
565
+ readonly value: i0.ModelSignal<number>;
566
+ readonly pageSize: i0.InputSignal<number>;
567
+ readonly total: i0.InputSignal<number>;
568
+ readonly size: i0.InputSignal<controlSize>;
569
+ readonly boundaries: i0.InputSignal<number>;
570
+ readonly siblings: i0.InputSignal<number>;
571
+ readonly showFirstButton: i0.InputSignalWithTransform<boolean, unknown>;
572
+ readonly showLastButton: i0.InputSignalWithTransform<boolean, unknown>;
573
+ protected readonly pageCount: i0.Signal<number>;
574
+ protected readonly visiblePages: i0.Signal<paginationItem[]>;
575
+ protected readonly classes: i0.Signal<string[]>;
576
+ protected setPage(page: number): void;
577
+ protected firstPage(): void;
578
+ protected prevPage(): void;
579
+ protected nextPage(): void;
580
+ protected lastPage(): void;
581
+ /** Returns an inclusive array of integers from start to end. Returns [] if end < start. */
582
+ private _range;
583
+ /** Computes the visible page items, inserting 'gap' where ellipsis should appear based on boundaries and siblings. */
584
+ private _buildPages;
585
+ static ɵfac: i0.ɵɵFactoryDeclaration<Pagination, never>;
586
+ static ɵcmp: i0.ɵɵComponentDeclaration<Pagination, "tls-pagination", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "total": { "alias": "total"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "boundaries": { "alias": "boundaries"; "required": false; "isSignal": true; }; "siblings": { "alias": "siblings"; "required": false; "isSignal": true; }; "showFirstButton": { "alias": "showFirstButton"; "required": false; "isSignal": true; }; "showLastButton": { "alias": "showLastButton"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
587
+ }
588
+
589
+ interface PaginationConfig {
590
+ size: controlSize;
591
+ pageSize: number;
592
+ boundaries: number;
593
+ siblings: number;
594
+ showFirstButton: boolean;
595
+ showLastButton: boolean;
596
+ }
597
+ declare const DEFAULT_PAGINATION_CONFIG: PaginationConfig;
598
+
599
+ declare const PAGINATION_CONFIG: InjectionToken<PaginationConfig>;
600
+
601
+ declare class Popover implements OnDestroy {
602
+ private static _counter;
603
+ private readonly _overlay;
604
+ private readonly _viewContainerRef;
605
+ private readonly _config;
606
+ private readonly _destroyRef;
607
+ private readonly _templateRef;
608
+ private _overlayRef;
609
+ private readonly _isOpen;
610
+ readonly id: string;
611
+ readonly isOpen: i0.Signal<boolean>;
612
+ readonly position: i0.InputSignal<overlayPosition>;
613
+ readonly offset: i0.InputSignal<Point>;
614
+ readonly ariaLabel: i0.InputSignal<string | undefined>;
615
+ private readonly _positions;
616
+ open(trigger: MouseEvent | HTMLElement): void;
617
+ close(): void;
618
+ toggle(trigger: MouseEvent | HTMLElement): void;
619
+ ngOnDestroy(): void;
620
+ static ɵfac: i0.ɵɵFactoryDeclaration<Popover, never>;
621
+ static ɵcmp: i0.ɵɵComponentDeclaration<Popover, "tls-popover", never, { "position": { "alias": "position"; "required": false; "isSignal": true; }; "offset": { "alias": "offset"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
622
+ }
623
+
624
+ interface PopoverConfig {
625
+ position: overlayPosition;
626
+ offset: Point;
627
+ }
628
+ declare const DEFAULT_POPOVER_CONFIG: PopoverConfig;
629
+
630
+ declare const POPOVER_CONFIG: InjectionToken<PopoverConfig>;
631
+
509
632
  declare class Skeleton {
510
633
  private _config;
511
634
  readonly size: InputSignal<number>;
@@ -600,6 +723,56 @@ declare const DEFAULT_STEPPER_CONFIG: StepperConfig;
600
723
 
601
724
  declare const STEPPER_CONFIG: InjectionToken<StepperConfig>;
602
725
 
726
+ type tableColumnAlignment = 'start' | 'center' | 'end';
727
+ type TableData = Record<string, unknown>;
728
+ type TableTrackBy = string | TrackByFunction<TableData>;
729
+ interface TableColumnDefinition {
730
+ key: string;
731
+ header?: string;
732
+ hidden?: boolean;
733
+ alignment?: tableColumnAlignment;
734
+ width?: number;
735
+ template?: TemplateRef<unknown>;
736
+ }
737
+
738
+ declare class TableColumn {
739
+ readonly key: i0.InputSignal<string>;
740
+ readonly header: i0.InputSignal<string | undefined>;
741
+ readonly hidden: InputSignalWithTransform<boolean, unknown>;
742
+ readonly alignment: i0.InputSignal<tableColumnAlignment | undefined>;
743
+ readonly width: i0.InputSignal<number | undefined>;
744
+ readonly template: i0.Signal<TemplateRef<any> | undefined>;
745
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableColumn, never>;
746
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableColumn, "tls-table-column", never, { "key": { "alias": "key"; "required": true; "isSignal": true; }; "header": { "alias": "header"; "required": false; "isSignal": true; }; "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; "alignment": { "alias": "alignment"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, {}, ["template"], never, true, never>;
747
+ }
748
+
749
+ declare class Table {
750
+ private readonly _config;
751
+ readonly data: InputSignal<TableData[]>;
752
+ readonly columnDefinitions: InputSignal<TableColumnDefinition[]>;
753
+ readonly hideHeader: InputSignalWithTransform<boolean, unknown>;
754
+ readonly striped: InputSignalWithTransform<boolean, unknown>;
755
+ readonly trackBy: InputSignal<TableTrackBy | undefined>;
756
+ protected readonly tableColumns: i0.Signal<readonly TableColumn[]>;
757
+ protected readonly effectiveColumnDefinitions: i0.Signal<TableColumnDefinition[]>;
758
+ protected readonly columns: i0.Signal<string[]>;
759
+ protected readonly resolvedTrackBy: i0.Signal<TrackByFunction<TableData>>;
760
+ protected readonly classes: i0.Signal<string[]>;
761
+ protected readonly dataSource: DataSource<TableData>;
762
+ private _mapContentColumns;
763
+ private _mapContentColumn;
764
+ static ɵfac: i0.ɵɵFactoryDeclaration<Table, never>;
765
+ static ɵcmp: i0.ɵɵComponentDeclaration<Table, "tls-table", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "columnDefinitions": { "alias": "columnDefinitions"; "required": false; "isSignal": true; }; "hideHeader": { "alias": "hideHeader"; "required": false; "isSignal": true; }; "striped": { "alias": "striped"; "required": false; "isSignal": true; }; "trackBy": { "alias": "trackBy"; "required": false; "isSignal": true; }; }, {}, ["tableColumns"], never, true, never>;
766
+ }
767
+
768
+ interface TableConfig {
769
+ hideHeader: boolean;
770
+ striped: boolean;
771
+ }
772
+ declare const DEFAULT_TABLE_CONFIG: TableConfig;
773
+
774
+ declare const TABLE_CONFIG: InjectionToken<TableConfig>;
775
+
603
776
  type tabsVariant = 'flat' | 'outlined';
604
777
  type tabValue = string | number;
605
778
 
@@ -633,7 +806,7 @@ declare const DEFAULT_TABS_CONFIG: TabsConfig;
633
806
  declare const TABS_CONFIG: InjectionToken<TabsConfig>;
634
807
 
635
808
  type tooltipOrigin = 'cursor' | 'element';
636
- type tooltipPosition = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
809
+ type tooltipPosition = overlayPosition;
637
810
  type tooltipColor = color;
638
811
 
639
812
  declare class TooltipDirective implements OnDestroy {
@@ -673,9 +846,7 @@ declare const DEFAULT_TOOLTIP_CONFIG: TooltipConfig;
673
846
 
674
847
  declare const TOOLTIP_CONFIG: InjectionToken<TooltipConfig>;
675
848
 
676
- declare const provideThalassicChartConfig: (config: ChartConfig) => EnvironmentProviders;
677
-
678
849
  declare const provideThalassicUIConfig: (config: tlsUiConfigProvider) => EnvironmentProviders;
679
850
 
680
- export { ALERT_CONFIG, Alert, BUTTON_CONFIG, BarChart, BubbleChart, Button, ButtonDirective, CHART_CONFIG, CHECKBOX_CONFIG, Chart, Checkbox, DEFAULT_ALERT_CONFIG, DEFAULT_BUTTON_CONFIG, DEFAULT_CHART_CONFIG, DEFAULT_CHECKBOX_CONFIG, DEFAULT_DIVIDER_CONFIG, DEFAULT_FORM_ITEM_CONFIG, DEFAULT_ICON_CONFIG, DEFAULT_INPUT_CONFIG, DEFAULT_LOADER_CONFIG, DEFAULT_PASSWORD_CONFIG, DEFAULT_PIN_INPUT_CONFIG, DEFAULT_RADIO_BUTTON_CONFIG, DEFAULT_SKELETON_CONFIG, DEFAULT_STEPPER_CONFIG, DEFAULT_STEP_CONFIG, DEFAULT_SWITCH_CONFIG, DEFAULT_TABS_CONFIG, DEFAULT_TOOLTIP_CONFIG, DIVIDER_CONFIG, Divider, DoughnutChart, FORM_ITEM_CONFIG, FormItem, ICON_CONFIG, INPUT_CONFIG, Icon, Input, InputDirective, LOADER_CONFIG, LineChart, Loader, PASSWORD_CONFIG, PIN_INPUT_CONFIG, Password, PieChart, PinInput, PolarAreaChart, RADIO_BUTTON_CONFIG, RadarChart, RadioButton, SKELETON_CONFIG, STEPPER_CONFIG, SWITCH_CONFIG, ScatterChart, Skeleton, Step, Stepper, Switch, TABS_CONFIG, TOOLTIP_CONFIG, Tab, Tabs, TooltipDirective, provideThalassicChartConfig, provideThalassicUIConfig };
681
- export type { AlertConfig, ButtonConfig, ChartConfig, CheckboxConfig, DividerConfig, FormItemConfig, IconConfig, InputConfig, LoaderConfig, PasswordConfig, PinInputConfig, RadioButtonConfig, SkeletonConfig, StepConfig, StepperConfig, SwitchConfig, TabsConfig, TooltipConfig, color, controlSize, inputSize, orientation, pinInputType, size, tlsUiConfigProvider, tooltipColor, tooltipOrigin, tooltipPosition };
851
+ export { ALERT_CONFIG, Alert, BUTTON_CONFIG, Button, ButtonDirective, CHECKBOX_CONFIG, Checkbox, DATE_TIME_PICKER_CONFIG, DEFAULT_ALERT_CONFIG, DEFAULT_BUTTON_CONFIG, DEFAULT_CHECKBOX_CONFIG, DEFAULT_DATE_TIME_PICKER_CONFIG, DEFAULT_DIALOG_CONFIG, DEFAULT_DIVIDER_CONFIG, DEFAULT_FORM_ITEM_CONFIG, DEFAULT_ICON_CONFIG, DEFAULT_INPUT_CONFIG, DEFAULT_LOADER_CONFIG, DEFAULT_PAGINATION_CONFIG, DEFAULT_PASSWORD_CONFIG, DEFAULT_PIN_INPUT_CONFIG, DEFAULT_POPOVER_CONFIG, DEFAULT_RADIO_BUTTON_CONFIG, DEFAULT_SELECT_CONFIG, DEFAULT_SKELETON_CONFIG, DEFAULT_STEPPER_CONFIG, DEFAULT_STEP_CONFIG, DEFAULT_SWITCH_CONFIG, DEFAULT_TABLE_CONFIG, DEFAULT_TABS_CONFIG, DEFAULT_TOOLTIP_CONFIG, DIALOG_CONFIG, DIVIDER_CONFIG, DateTimePicker, Dialog, DialogService, Divider, FORM_ITEM_CONFIG, FormItem, ICON_CONFIG, INPUT_CONFIG, Icon, Input, InputDirective, LOADER_CONFIG, Loader, PAGINATION_CONFIG, PASSWORD_CONFIG, PIN_INPUT_CONFIG, POPOVER_CONFIG, Pagination, Password, PinInput, Popover, RADIO_BUTTON_CONFIG, RadioButton, SELECT_CONFIG, SKELETON_CONFIG, STEPPER_CONFIG, SWITCH_CONFIG, Select, Skeleton, Step, Stepper, Switch, TABLE_CONFIG, TABS_CONFIG, TOOLTIP_CONFIG, Tab, Table, TableColumn, Tabs, TooltipDirective, provideThalassicUIConfig };
852
+ export type { AlertConfig, ButtonConfig, CheckboxConfig, DateTimePickerConfig, DialogConfig, DialogOpenConfig, DividerConfig, FormItemConfig, IconConfig, InputConfig, LoaderConfig, PaginationConfig, PasswordConfig, PinInputConfig, PopoverConfig, RadioButtonConfig, SelectConfig, SkeletonConfig, StepConfig, StepperConfig, StepperSelectEvent, SwitchConfig, TableColumnDefinition, TableConfig, TableData, TableTrackBy, TabsConfig, TooltipConfig, color, controlSize, dateTimePickerMode, dialogSize, dividerContentPosition, dividerOrientation, dividerVariant, orientation, overlayPosition, paginationItem, pinInputType, selectOptionType, size, stepperColor, stepperOrientation, stepperValue, tableColumnAlignment, tlsUiConfigProvider, tooltipColor, tooltipOrigin, tooltipPosition };