@thalassic/ui 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/thalassic-ui.mjs +1205 -113
- package/fesm2022/thalassic-ui.mjs.map +1 -1
- package/package.json +8 -2
- package/types/thalassic-ui.d.ts +372 -65
package/package.json
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thalassic/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^21.0.0",
|
|
7
|
-
"@angular/core": "^21.0.0"
|
|
7
|
+
"@angular/core": "^21.0.0",
|
|
8
|
+
"chart.js": "^4.0.0"
|
|
9
|
+
},
|
|
10
|
+
"peerDependenciesMeta": {
|
|
11
|
+
"chart.js": {
|
|
12
|
+
"optional": true
|
|
13
|
+
}
|
|
8
14
|
},
|
|
9
15
|
"publishConfig": {
|
|
10
16
|
"access": "public"
|
package/types/thalassic-ui.d.ts
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { InputSignal, InputSignalWithTransform, InjectionToken, OnInit, OnDestroy, Signal, ElementRef, ModelSignal, TemplateRef, OutputEmitterRef, 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
7
|
import { FieldTree, FormUiControl, WithOptionalFieldTree, ValidationError, FormCheckboxControl, FormValueControl } from '@angular/forms/signals';
|
|
5
8
|
import { SafeHtml } from '@angular/platform-browser';
|
|
9
|
+
import { ConnectedPosition } from '@angular/cdk/overlay';
|
|
10
|
+
import { Point } from '@thalassic/core';
|
|
6
11
|
|
|
7
12
|
type color = 'primary' | 'secondary' | 'tertiary' | 'success' | 'info' | 'warning' | 'danger';
|
|
8
13
|
|
|
9
14
|
type controlSize = 'sm' | 'md' | 'lg';
|
|
10
15
|
|
|
16
|
+
type orientation = 'horizontal' | 'vertical';
|
|
17
|
+
|
|
18
|
+
type size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
19
|
+
|
|
11
20
|
interface tlsUiConfigProvider {
|
|
12
21
|
components: {
|
|
22
|
+
alert?: Partial<AlertConfig>;
|
|
13
23
|
button?: Partial<ButtonConfig>;
|
|
14
24
|
divider?: Partial<DividerConfig>;
|
|
15
25
|
input?: Partial<InputConfig>;
|
|
@@ -17,6 +27,10 @@ interface tlsUiConfigProvider {
|
|
|
17
27
|
switch?: Partial<SwitchConfig>;
|
|
18
28
|
formItem?: Partial<FormItemConfig>;
|
|
19
29
|
icon?: Partial<IconConfig>;
|
|
30
|
+
skeleton?: Partial<SkeletonConfig>;
|
|
31
|
+
stepper?: Partial<StepperConfig>;
|
|
32
|
+
tabs?: Partial<TabsConfig>;
|
|
33
|
+
tooltip?: Partial<TooltipConfig>;
|
|
20
34
|
};
|
|
21
35
|
}
|
|
22
36
|
|
|
@@ -25,6 +39,29 @@ type buttonSize = controlSize;
|
|
|
25
39
|
type buttonVariant = 'filled' | 'outlined' | 'text' | 'elevated';
|
|
26
40
|
type buttonColor = color;
|
|
27
41
|
|
|
42
|
+
declare class Alert {
|
|
43
|
+
private _config;
|
|
44
|
+
readonly color: InputSignal<buttonColor>;
|
|
45
|
+
readonly label: InputSignal<string | null>;
|
|
46
|
+
readonly hideLabel: InputSignalWithTransform<boolean, unknown>;
|
|
47
|
+
protected displayLabel: i0.Signal<string>;
|
|
48
|
+
protected hostClasses: i0.Signal<string[]>;
|
|
49
|
+
protected hostRole: i0.Signal<"alert" | "note">;
|
|
50
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Alert, never>;
|
|
51
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Alert, "tls-alert", never, { "color": { "alias": "color"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "hideLabel": { "alias": "hideLabel"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
type alertColor = color;
|
|
55
|
+
|
|
56
|
+
interface AlertConfig {
|
|
57
|
+
color: alertColor;
|
|
58
|
+
label: Record<alertColor, string> | string;
|
|
59
|
+
hideLabel: boolean;
|
|
60
|
+
}
|
|
61
|
+
declare const DEFAULT_ALERT_CONFIG: AlertConfig;
|
|
62
|
+
|
|
63
|
+
declare const ALERT_CONFIG: InjectionToken<AlertConfig>;
|
|
64
|
+
|
|
28
65
|
declare abstract class ButtonBase {
|
|
29
66
|
protected _config: _thalassic_ui.ButtonConfig;
|
|
30
67
|
protected APPLY_HOST_CLASSES: boolean;
|
|
@@ -71,7 +108,99 @@ declare const DEFAULT_BUTTON_CONFIG: ButtonConfig;
|
|
|
71
108
|
|
|
72
109
|
declare const BUTTON_CONFIG: InjectionToken<ButtonConfig>;
|
|
73
110
|
|
|
74
|
-
|
|
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
|
+
}
|
|
167
|
+
|
|
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>;
|
|
173
|
+
}
|
|
174
|
+
|
|
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>;
|
|
180
|
+
}
|
|
181
|
+
|
|
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>;
|
|
187
|
+
}
|
|
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>;
|
|
194
|
+
}
|
|
195
|
+
|
|
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
|
+
}
|
|
202
|
+
|
|
203
|
+
type dividerOrientation = orientation;
|
|
75
204
|
type dividerContentPosition = 'start' | 'center' | 'end';
|
|
76
205
|
type dividerVariant = 'dashed' | 'dotted' | 'solid';
|
|
77
206
|
|
|
@@ -236,6 +365,41 @@ declare const DEFAULT_PASSWORD_CONFIG: PasswordConfig;
|
|
|
236
365
|
|
|
237
366
|
declare const PASSWORD_CONFIG: InjectionToken<PasswordConfig>;
|
|
238
367
|
|
|
368
|
+
type pinInputType = 'numeric' | 'alphanumeric' | RegExp;
|
|
369
|
+
|
|
370
|
+
declare class PinInput extends ValueFormControl<string> {
|
|
371
|
+
private _config;
|
|
372
|
+
private readonly _inputs;
|
|
373
|
+
readonly value: ModelSignal<string>;
|
|
374
|
+
readonly length: InputSignal<number>;
|
|
375
|
+
readonly type: InputSignal<pinInputType>;
|
|
376
|
+
readonly placeholder: InputSignal<string>;
|
|
377
|
+
protected CLASS_NAME: string;
|
|
378
|
+
protected readonly cells: Signal<number[]>;
|
|
379
|
+
protected readonly hostClasses: Signal<string[]>;
|
|
380
|
+
protected getCellValue(index: number): string;
|
|
381
|
+
protected onInput(event: Event, index: number): void;
|
|
382
|
+
protected onKeydown(event: KeyboardEvent, index: number): void;
|
|
383
|
+
protected onPaste(event: ClipboardEvent, index: number): void;
|
|
384
|
+
protected onFocus(event: FocusEvent): void;
|
|
385
|
+
private _setCell;
|
|
386
|
+
private _commitArray;
|
|
387
|
+
private _focusCell;
|
|
388
|
+
private _getAllowedRegularExpression;
|
|
389
|
+
private _getValueArray;
|
|
390
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PinInput, never>;
|
|
391
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PinInput, "tls-pin-input", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "length": { "alias": "length"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
interface PinInputConfig {
|
|
395
|
+
type: pinInputType;
|
|
396
|
+
length: number;
|
|
397
|
+
placeholder: string;
|
|
398
|
+
}
|
|
399
|
+
declare const DEFAULT_PIN_INPUT_CONFIG: PinInputConfig;
|
|
400
|
+
|
|
401
|
+
declare const PIN_INPUT_CONFIG: InjectionToken<PinInputConfig>;
|
|
402
|
+
|
|
239
403
|
interface RadioButtonConfig {
|
|
240
404
|
}
|
|
241
405
|
declare const DEFAULT_RADIO_BUTTON_CONFIG: RadioButtonConfig;
|
|
@@ -299,76 +463,219 @@ declare const DEFAULT_ICON_CONFIG: IconConfig;
|
|
|
299
463
|
|
|
300
464
|
declare const ICON_CONFIG: InjectionToken<IconConfig>;
|
|
301
465
|
|
|
302
|
-
type
|
|
303
|
-
|
|
304
|
-
type themePreference = 'light' | 'dark' | 'system';
|
|
466
|
+
type loaderSize = size | number;
|
|
305
467
|
|
|
306
468
|
/**
|
|
307
|
-
*
|
|
469
|
+
* Indeterminate spinner for indicating a loading state.
|
|
470
|
+
*
|
|
471
|
+
* @example
|
|
472
|
+
* <!-- predefined size -->
|
|
473
|
+
* <tls-loader size="lg" />
|
|
474
|
+
*
|
|
475
|
+
* @example
|
|
476
|
+
* <!-- custom size in pixels -->
|
|
477
|
+
* <tls-loader [size]="64" />
|
|
478
|
+
*
|
|
479
|
+
* @example
|
|
480
|
+
* <!-- custom size with explicit stroke width -->
|
|
481
|
+
* <tls-loader [size]="64" [width]="8" />
|
|
308
482
|
*/
|
|
309
|
-
declare class
|
|
310
|
-
private
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
483
|
+
declare class Loader {
|
|
484
|
+
private _config;
|
|
485
|
+
/** Predefined size token or custom pixel value. */
|
|
486
|
+
readonly size: InputSignal<loaderSize>;
|
|
487
|
+
/** Stroke width in pixels. Overrides the size-class default for both token and numeric sizes. */
|
|
488
|
+
readonly width: InputSignal<number | null>;
|
|
489
|
+
/** Divisor for auto stroke width when size is a number and width is null (`size / widthRatio`). */
|
|
490
|
+
readonly widthRatio: InputSignal<number>;
|
|
491
|
+
/** Text announced by screen readers via `aria-label`. */
|
|
492
|
+
readonly ariaLabel: InputSignal<string>;
|
|
493
|
+
protected hostClasses: i0.Signal<string[]>;
|
|
494
|
+
protected hostStyles: i0.Signal<Record<string, string> | null>;
|
|
495
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Loader, never>;
|
|
496
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Loader, "tls-loader", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "widthRatio": { "alias": "widthRatio"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
interface LoaderConfig {
|
|
500
|
+
size: loaderSize;
|
|
501
|
+
width: number | null;
|
|
502
|
+
widthRatio: number;
|
|
503
|
+
ariaLabel: string;
|
|
504
|
+
}
|
|
505
|
+
declare const DEFAULT_LOADER_CONFIG: LoaderConfig;
|
|
506
|
+
|
|
507
|
+
declare const LOADER_CONFIG: InjectionToken<LoaderConfig>;
|
|
508
|
+
|
|
509
|
+
declare class Skeleton {
|
|
510
|
+
private _config;
|
|
511
|
+
readonly size: InputSignal<number>;
|
|
512
|
+
readonly width: InputSignal<number | null>;
|
|
513
|
+
readonly height: InputSignal<number | null>;
|
|
514
|
+
readonly radius: InputSignal<number>;
|
|
515
|
+
readonly duration: InputSignal<number>;
|
|
516
|
+
readonly rounded: InputSignalWithTransform<boolean, unknown>;
|
|
517
|
+
readonly animate: InputSignalWithTransform<boolean, unknown>;
|
|
518
|
+
protected hostClasses: i0.Signal<string[]>;
|
|
519
|
+
protected hostStyles: i0.Signal<{
|
|
520
|
+
'--tls-skeleton-width': string;
|
|
521
|
+
'--tls-skeleton-height': string;
|
|
522
|
+
'--tls-skeleton-radius': string;
|
|
523
|
+
'--tls-skeleton-duration': string;
|
|
524
|
+
}>;
|
|
525
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Skeleton, never>;
|
|
526
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Skeleton, "tls-skeleton", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "radius": { "alias": "radius"; "required": false; "isSignal": true; }; "duration": { "alias": "duration"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "animate": { "alias": "animate"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
interface SkeletonConfig {
|
|
530
|
+
size: number;
|
|
531
|
+
width: number | null;
|
|
532
|
+
height: number | null;
|
|
533
|
+
radius: number;
|
|
534
|
+
duration: number;
|
|
535
|
+
rounded: boolean;
|
|
536
|
+
animate: boolean;
|
|
537
|
+
}
|
|
538
|
+
declare const DEFAULT_SKELETON_CONFIG: SkeletonConfig;
|
|
539
|
+
|
|
540
|
+
declare const SKELETON_CONFIG: InjectionToken<SkeletonConfig>;
|
|
541
|
+
|
|
542
|
+
type stepperValue = string | number;
|
|
543
|
+
type stepperColor = color;
|
|
544
|
+
type stepperOrientation = orientation;
|
|
545
|
+
interface StepperSelectEvent {
|
|
546
|
+
index: number;
|
|
547
|
+
value: stepperValue;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
declare class Step {
|
|
551
|
+
private _config;
|
|
552
|
+
private _stepperService;
|
|
553
|
+
readonly iconTemplateRef: i0.Signal<TemplateRef<unknown> | undefined>;
|
|
554
|
+
readonly completedIconTemplateRef: i0.Signal<TemplateRef<unknown> | undefined>;
|
|
555
|
+
readonly value: InputSignal<stepperValue>;
|
|
556
|
+
readonly label: InputSignal<string | undefined>;
|
|
557
|
+
readonly description: InputSignal<string | undefined>;
|
|
558
|
+
readonly color: InputSignal<stepperColor>;
|
|
559
|
+
readonly disabled: InputSignal<boolean>;
|
|
560
|
+
private _active;
|
|
561
|
+
protected hostClasses: i0.Signal<string[]>;
|
|
562
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Step, never>;
|
|
563
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Step, "tls-step", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, ["iconTemplateRef", "completedIconTemplateRef"], ["*"], true, never>;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
declare class Stepper {
|
|
567
|
+
private static _counter;
|
|
568
|
+
protected readonly panelId: string;
|
|
569
|
+
private _config;
|
|
570
|
+
private _stepperService;
|
|
571
|
+
protected steps: Signal<readonly Step[]>;
|
|
572
|
+
protected completedTemplateRef: Signal<TemplateRef<unknown> | undefined>;
|
|
573
|
+
protected completedIconTemplateRef: Signal<TemplateRef<unknown> | undefined>;
|
|
574
|
+
private _stepButtons;
|
|
575
|
+
readonly active: ModelSignal<stepperValue>;
|
|
576
|
+
readonly orientation: InputSignal<stepperOrientation>;
|
|
577
|
+
readonly completed: InputSignal<boolean>;
|
|
578
|
+
readonly linear: InputSignal<boolean>;
|
|
579
|
+
readonly stepSelect: OutputEmitterRef<StepperSelectEvent>;
|
|
580
|
+
protected hostClasses: Signal<string[]>;
|
|
581
|
+
protected activeIndex: Signal<number>;
|
|
319
582
|
constructor();
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
* A readonly signal of the user's selected theme preference (`'light'`, `'dark'`, or `'system'`).
|
|
327
|
-
*/
|
|
328
|
-
get currentThemePreference(): Signal<themePreference>;
|
|
329
|
-
/**
|
|
330
|
-
* Toggles between `'light'` and `'dark'` themes based on the currently applied theme.
|
|
331
|
-
* Does not toggle to `'system'`.
|
|
332
|
-
*/
|
|
333
|
-
toggle(): void;
|
|
334
|
-
/**
|
|
335
|
-
* Sets the theme preference and applies the corresponding theme to the document.
|
|
336
|
-
* When `'system'` is passed, the theme is resolved from the OS color scheme preference.
|
|
337
|
-
*
|
|
338
|
-
* @param preference - The desired theme preference: `'light'`, `'dark'`, or `'system'`.
|
|
339
|
-
*/
|
|
340
|
-
setTheme(preference: themePreference): void;
|
|
341
|
-
/**
|
|
342
|
-
* Applies the given theme to the document root element by toggling theme CSS classes.
|
|
343
|
-
*
|
|
344
|
-
* @param theme - The theme to apply: `'light'` or `'dark'`.
|
|
345
|
-
*/
|
|
346
|
-
private _applyTheme;
|
|
347
|
-
/**
|
|
348
|
-
* Detects the OS-level color scheme preference using the `prefers-color-scheme` media query.
|
|
349
|
-
*
|
|
350
|
-
* @returns `'dark'` if the OS prefers dark mode, otherwise `'light'`.
|
|
351
|
-
*/
|
|
352
|
-
private _detectSystemTheme;
|
|
353
|
-
/**
|
|
354
|
-
* Initializes the theme on app startup (browser only).
|
|
355
|
-
* Reads the stored preference from localStorage, falling back to the configured default.
|
|
356
|
-
* Also registers a listener for OS color scheme changes to reactively update the theme
|
|
357
|
-
* when the preference is `'system'`.
|
|
358
|
-
*/
|
|
359
|
-
private _initTheme;
|
|
360
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeService, never>;
|
|
361
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ThemeService>;
|
|
583
|
+
protected onSelect(step: Step, index: number): void;
|
|
584
|
+
protected onKeydown(event: KeyboardEvent, index: number): void;
|
|
585
|
+
private _nextFocusable;
|
|
586
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Stepper, never>;
|
|
587
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Stepper, "tls-stepper", never, { "active": { "alias": "active"; "required": true; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "completed": { "alias": "completed"; "required": false; "isSignal": true; }; "linear": { "alias": "linear"; "required": false; "isSignal": true; }; }, { "active": "activeChange"; "stepSelect": "stepSelect"; }, ["steps", "completedTemplateRef", "completedIconTemplateRef"], ["*"], true, never>;
|
|
362
588
|
}
|
|
363
589
|
|
|
364
|
-
|
|
590
|
+
interface StepperConfig {
|
|
591
|
+
orientation: stepperOrientation;
|
|
592
|
+
linear: boolean;
|
|
593
|
+
step: StepConfig;
|
|
594
|
+
}
|
|
595
|
+
interface StepConfig {
|
|
596
|
+
color: stepperColor;
|
|
597
|
+
}
|
|
598
|
+
declare const DEFAULT_STEP_CONFIG: StepConfig;
|
|
599
|
+
declare const DEFAULT_STEPPER_CONFIG: StepperConfig;
|
|
600
|
+
|
|
601
|
+
declare const STEPPER_CONFIG: InjectionToken<StepperConfig>;
|
|
602
|
+
|
|
603
|
+
type tabsVariant = 'flat' | 'outlined';
|
|
604
|
+
type tabValue = string | number;
|
|
605
|
+
|
|
606
|
+
declare class Tab {
|
|
607
|
+
private _tabsService;
|
|
608
|
+
value: InputSignal<tabValue>;
|
|
609
|
+
label: InputSignal<string>;
|
|
610
|
+
private _active;
|
|
611
|
+
protected hostClasses: i0.Signal<string[]>;
|
|
612
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Tab, never>;
|
|
613
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Tab, "tls-tab", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
declare class Tabs {
|
|
617
|
+
private _config;
|
|
618
|
+
private _tabsService;
|
|
619
|
+
protected tabs: Signal<readonly Tab[]>;
|
|
620
|
+
readonly variant: InputSignal<tabsVariant>;
|
|
621
|
+
readonly selected: ModelSignal<tabValue | null>;
|
|
622
|
+
protected hostClasses: Signal<string[]>;
|
|
623
|
+
constructor();
|
|
624
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Tabs, never>;
|
|
625
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Tabs, "tls-tabs", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; }, { "selected": "selectedChange"; }, ["tabs"], ["*"], true, never>;
|
|
626
|
+
}
|
|
365
627
|
|
|
366
|
-
interface
|
|
367
|
-
|
|
368
|
-
defaultTheme: themePreference;
|
|
628
|
+
interface TabsConfig {
|
|
629
|
+
variant: tabsVariant;
|
|
369
630
|
}
|
|
631
|
+
declare const DEFAULT_TABS_CONFIG: TabsConfig;
|
|
632
|
+
|
|
633
|
+
declare const TABS_CONFIG: InjectionToken<TabsConfig>;
|
|
370
634
|
|
|
371
|
-
|
|
635
|
+
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';
|
|
637
|
+
type tooltipColor = color;
|
|
638
|
+
|
|
639
|
+
declare class TooltipDirective implements OnDestroy {
|
|
640
|
+
private _tooltipService;
|
|
641
|
+
private _elementRef;
|
|
642
|
+
private _renderer;
|
|
643
|
+
private _config;
|
|
644
|
+
content: InputSignal<string | TemplateRef<unknown>>;
|
|
645
|
+
data: InputSignal<unknown>;
|
|
646
|
+
tooltipDisabled: InputSignal<boolean>;
|
|
647
|
+
tooltipOrigin: InputSignal<tooltipOrigin>;
|
|
648
|
+
tooltipPositions: InputSignal<ConnectedPosition[] | undefined>;
|
|
649
|
+
tooltipPosition: InputSignal<tooltipPosition>;
|
|
650
|
+
tooltipOffset: InputSignal<Point>;
|
|
651
|
+
tooltipColor: InputSignal<tooltipColor>;
|
|
652
|
+
private _visible;
|
|
653
|
+
private _positions;
|
|
654
|
+
protected onMouseEnter(event: MouseEvent): void;
|
|
655
|
+
protected onMouseMove(event: MouseEvent): void;
|
|
656
|
+
protected onMouseLeave(): void;
|
|
657
|
+
protected onTouchStart(event: TouchEvent): void;
|
|
658
|
+
private _show;
|
|
659
|
+
private _hide;
|
|
660
|
+
ngOnDestroy(): void;
|
|
661
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipDirective, never>;
|
|
662
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TooltipDirective, "[tlsTooltip]", never, { "content": { "alias": "tlsTooltip"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "tooltipDisabled": { "alias": "tooltipDisabled"; "required": false; "isSignal": true; }; "tooltipOrigin": { "alias": "tooltipOrigin"; "required": false; "isSignal": true; }; "tooltipPositions": { "alias": "tooltipPositions"; "required": false; "isSignal": true; }; "tooltipPosition": { "alias": "tooltipPosition"; "required": false; "isSignal": true; }; "tooltipOffset": { "alias": "tooltipOffset"; "required": false; "isSignal": true; }; "tooltipColor": { "alias": "tooltipColor"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
interface TooltipConfig {
|
|
666
|
+
positions: ConnectedPosition[] | undefined;
|
|
667
|
+
position: tooltipPosition;
|
|
668
|
+
offset: Point;
|
|
669
|
+
origin: tooltipOrigin;
|
|
670
|
+
color: tooltipColor;
|
|
671
|
+
}
|
|
672
|
+
declare const DEFAULT_TOOLTIP_CONFIG: TooltipConfig;
|
|
673
|
+
|
|
674
|
+
declare const TOOLTIP_CONFIG: InjectionToken<TooltipConfig>;
|
|
675
|
+
|
|
676
|
+
declare const provideThalassicChartConfig: (config: ChartConfig) => EnvironmentProviders;
|
|
677
|
+
|
|
678
|
+
declare const provideThalassicUIConfig: (config: tlsUiConfigProvider) => EnvironmentProviders;
|
|
372
679
|
|
|
373
|
-
export { BUTTON_CONFIG, Button, ButtonDirective, CHECKBOX_CONFIG, Checkbox, DEFAULT_BUTTON_CONFIG, DEFAULT_CHECKBOX_CONFIG, DEFAULT_DIVIDER_CONFIG, DEFAULT_FORM_ITEM_CONFIG, DEFAULT_ICON_CONFIG, DEFAULT_INPUT_CONFIG, DEFAULT_PASSWORD_CONFIG, DEFAULT_RADIO_BUTTON_CONFIG, DEFAULT_SWITCH_CONFIG, DIVIDER_CONFIG, Divider, FORM_ITEM_CONFIG, FormItem, ICON_CONFIG, INPUT_CONFIG, Icon, Input, InputDirective, PASSWORD_CONFIG, Password, RADIO_BUTTON_CONFIG, RadioButton, SWITCH_CONFIG, Switch,
|
|
374
|
-
export type { ButtonConfig, CheckboxConfig, DividerConfig, FormItemConfig, IconConfig, InputConfig, PasswordConfig, RadioButtonConfig, SwitchConfig, color, controlSize,
|
|
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 };
|