@taiga-ui/addon-charts 4.52.0-canary.40b6993 → 4.52.0-canary.49575ff

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.
@@ -1,19 +1,20 @@
1
- import { type ElementRef, type QueryList } from '@angular/core';
2
1
  import { type TuiSizeXL } from '@taiga-ui/core/types';
3
- import { type Observable } from 'rxjs';
4
2
  import * as i0 from "@angular/core";
5
3
  export declare class TuiArcChart {
6
- private readonly arcs$;
7
- protected initialized: import("@angular/core").WritableSignal<boolean>;
8
- protected readonly $: import("rxjs").Subscription;
9
- value: readonly number[];
10
- size: TuiSizeXL;
11
- max: number;
12
- minLabel: string;
13
- maxLabel: string;
14
- activeItemIndex: number;
15
- readonly activeItemIndexChange: Observable<number>;
16
- protected set arcs(arcs: QueryList<ElementRef<SVGElement>>);
4
+ private readonly arcs;
5
+ private readonly indexChange$;
6
+ protected readonly initialized: import("@angular/core").Signal<boolean>;
7
+ readonly value: import("@angular/core").InputSignal<readonly number[]>;
8
+ readonly size: import("@angular/core").InputSignal<TuiSizeXL>;
9
+ readonly max: import("@angular/core").InputSignal<number>;
10
+ readonly minLabel: import("@angular/core").InputSignal<string>;
11
+ readonly maxLabel: import("@angular/core").InputSignal<string>;
12
+ /**
13
+ * Set to change the index of the active arc.
14
+ * Will be overridden by hover state.
15
+ */
16
+ readonly activeItemIndex: import("@angular/core").ModelSignal<number>;
17
+ readonly activeItemIndexChange: import("@angular/core").OutputRef<number>;
17
18
  protected get width(): number;
18
19
  protected get strokeWidth(): number;
19
20
  protected isInactive(index: number): boolean;
@@ -22,5 +23,5 @@ export declare class TuiArcChart {
22
23
  protected getLength(index: number): number;
23
24
  protected getOffset(index: number): number;
24
25
  static ɵfac: i0.ɵɵFactoryDeclaration<TuiArcChart, never>;
25
- static ɵcmp: i0.ɵɵComponentDeclaration<TuiArcChart, "tui-arc-chart", never, { "value": { "alias": "value"; "required": false; }; "size": { "alias": "size"; "required": false; }; "max": { "alias": "max"; "required": false; }; "minLabel": { "alias": "minLabel"; "required": false; }; "maxLabel": { "alias": "maxLabel"; "required": false; }; "activeItemIndex": { "alias": "activeItemIndex"; "required": false; }; }, { "activeItemIndexChange": "activeItemIndexChange"; }, never, ["*"], true, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<TuiArcChart, "tui-arc-chart", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "minLabel": { "alias": "minLabel"; "required": false; "isSignal": true; }; "maxLabel": { "alias": "maxLabel"; "required": false; "isSignal": true; }; "activeItemIndex": { "alias": "activeItemIndex"; "required": false; "isSignal": true; }; }, { "activeItemIndex": "activeItemIndexChange"; "activeItemIndexChange": "activeItemIndexChange"; }, never, ["*"], true, never>;
26
27
  }
@@ -5,24 +5,28 @@ export declare const TUI_ALWAYS_DOTTED: TuiLineHandler;
5
5
  export declare const TUI_ALWAYS_SOLID: TuiLineHandler;
6
6
  export declare const TUI_ALWAYS_NONE: TuiLineHandler;
7
7
  export declare class TuiAxes {
8
- axisX: TuiLineType;
9
- axisXLabels: ReadonlyArray<string | null>;
10
- axisY: TuiLineType;
11
- axisYInset: boolean;
12
- axisYLabels: readonly string[];
13
- axisYName: string;
14
- axisYSecondaryInset: boolean;
15
- axisYSecondaryLabels: readonly string[];
16
- axisYSecondaryName: string;
17
- horizontalLines: number;
18
- horizontalLinesHandler: TuiLineHandler;
19
- verticalLines: number;
20
- verticalLinesHandler: TuiLineHandler;
21
- get hasXLabels(): boolean;
22
- get hasYLabels(): boolean;
23
- get hasYSecondaryLabels(): boolean;
24
- fallback(label: string | null): string;
25
- protected get centeredXLabels(): boolean;
8
+ protected readonly centeredXLabels: import("@angular/core").Signal<boolean>;
9
+ readonly axisX: import("@angular/core").InputSignal<TuiLineType>;
10
+ readonly axisXLabels: import("@angular/core").InputSignal<readonly (string | null)[]>;
11
+ readonly axisY: import("@angular/core").InputSignal<TuiLineType>;
12
+ readonly axisYInset: import("@angular/core").InputSignal<boolean>;
13
+ readonly axisYLabels: import("@angular/core").InputSignal<readonly string[]>;
14
+ readonly axisYName: import("@angular/core").InputSignal<string>;
15
+ readonly axisYSecondaryInset: import("@angular/core").InputSignal<boolean>;
16
+ readonly axisYSecondaryLabels: import("@angular/core").InputSignal<readonly string[]>;
17
+ readonly axisYSecondaryName: import("@angular/core").InputSignal<string>;
18
+ readonly horizontalLines: import("@angular/core").InputSignal<number>;
19
+ readonly horizontalLinesHandler: import("@angular/core").InputSignal<TuiLineHandler>;
20
+ readonly verticalLines: import("@angular/core").InputSignal<number>;
21
+ /**
22
+ * A function to handle vertical lines style.
23
+ * Initially set to always dashed.
24
+ */
25
+ readonly verticalLinesHandler: import("@angular/core").InputSignal<TuiLineHandler>;
26
+ readonly fallbackLabel = "\u00A0";
27
+ readonly hasXLabels: import("@angular/core").Signal<boolean>;
28
+ readonly hasYLabels: import("@angular/core").Signal<boolean>;
29
+ readonly hasYSecondaryLabels: import("@angular/core").Signal<boolean>;
26
30
  static ɵfac: i0.ɵɵFactoryDeclaration<TuiAxes, never>;
27
- static ɵcmp: i0.ɵɵComponentDeclaration<TuiAxes, "tui-axes", never, { "axisX": { "alias": "axisX"; "required": false; }; "axisXLabels": { "alias": "axisXLabels"; "required": false; }; "axisY": { "alias": "axisY"; "required": false; }; "axisYInset": { "alias": "axisYInset"; "required": false; }; "axisYLabels": { "alias": "axisYLabels"; "required": false; }; "axisYName": { "alias": "axisYName"; "required": false; }; "axisYSecondaryInset": { "alias": "axisYSecondaryInset"; "required": false; }; "axisYSecondaryLabels": { "alias": "axisYSecondaryLabels"; "required": false; }; "axisYSecondaryName": { "alias": "axisYSecondaryName"; "required": false; }; "horizontalLines": { "alias": "horizontalLines"; "required": false; }; "horizontalLinesHandler": { "alias": "horizontalLinesHandler"; "required": false; }; "verticalLines": { "alias": "verticalLines"; "required": false; }; "verticalLinesHandler": { "alias": "verticalLinesHandler"; "required": false; }; }, {}, never, ["*"], true, never>;
31
+ static ɵcmp: i0.ɵɵComponentDeclaration<TuiAxes, "tui-axes", never, { "axisX": { "alias": "axisX"; "required": false; "isSignal": true; }; "axisXLabels": { "alias": "axisXLabels"; "required": false; "isSignal": true; }; "axisY": { "alias": "axisY"; "required": false; "isSignal": true; }; "axisYInset": { "alias": "axisYInset"; "required": false; "isSignal": true; }; "axisYLabels": { "alias": "axisYLabels"; "required": false; "isSignal": true; }; "axisYName": { "alias": "axisYName"; "required": false; "isSignal": true; }; "axisYSecondaryInset": { "alias": "axisYSecondaryInset"; "required": false; "isSignal": true; }; "axisYSecondaryLabels": { "alias": "axisYSecondaryLabels"; "required": false; "isSignal": true; }; "axisYSecondaryName": { "alias": "axisYSecondaryName"; "required": false; "isSignal": true; }; "horizontalLines": { "alias": "horizontalLines"; "required": false; "isSignal": true; }; "horizontalLinesHandler": { "alias": "horizontalLinesHandler"; "required": false; "isSignal": true; }; "verticalLines": { "alias": "verticalLines"; "required": false; "isSignal": true; }; "verticalLinesHandler": { "alias": "verticalLinesHandler"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
28
32
  }
@@ -1,8 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
- import { signal, ViewChildren, Output, Input, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
2
+ import { viewChildren, input, model, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { toObservable, takeUntilDestroyed, toSignal, outputFromObservable } from '@angular/core/rxjs-interop';
4
4
  import { tuiTypedFromEvent, tuiZonefree } from '@taiga-ui/cdk/observables';
5
- import { merge, map, ReplaySubject, timer, switchMap, startWith, tap } from 'rxjs';
5
+ import { merge, map, switchMap, tap, timer, take } from 'rxjs';
6
6
 
7
7
  const ARC = 0.76; // 3/4 with 1% safety offset
8
8
  const SIZE = { m: 9, l: 11, xl: 16 };
@@ -13,74 +13,58 @@ function arcsToIndex(arcs) {
13
13
  }
14
14
  class TuiArcChart {
15
15
  constructor() {
16
- this.arcs$ = new ReplaySubject(1);
17
- this.initialized = signal(false);
18
- this.$ = timer(0)
19
- .pipe(tuiZonefree(), takeUntilDestroyed())
20
- .subscribe(() => this.initialized.set(true));
21
- this.value = [];
22
- this.size = 'm';
23
- this.max = 100;
24
- this.minLabel = '0%';
25
- this.maxLabel = '100%';
26
- this.activeItemIndex = NaN;
27
- this.activeItemIndexChange = this.arcs$.pipe(switchMap((arcs) => arcs.changes.pipe(startWith(null), switchMap(() => merge(...arcsToIndex(arcs))))), tap((index) => {
28
- this.activeItemIndex = index;
29
- }));
30
- }
31
- set arcs(arcs) {
32
- this.arcs$.next(arcs);
16
+ this.arcs = viewChildren('arc');
17
+ this.indexChange$ = toObservable(this.arcs).pipe(takeUntilDestroyed(), switchMap((arcs) => merge(...arcsToIndex(arcs)).pipe(tap((i) => this.activeItemIndex.set(i)))));
18
+ this.initialized = toSignal(timer(0).pipe(tuiZonefree(), take(1),
19
+ // The linter rule 'no-restricted-syntax' incorrectly flags 'map(() => true)' here,
20
+ // because the literal 'true' has type 'true' (not 'boolean'), which is intentional for this signal initialization.
21
+ map(() => true)), { initialValue: false });
22
+ this.value = input([]);
23
+ this.size = input('m');
24
+ this.max = input(100);
25
+ this.minLabel = input('0%');
26
+ this.maxLabel = input('100%');
27
+ /**
28
+ * Set to change the index of the active arc.
29
+ * Will be overridden by hover state.
30
+ */
31
+ this.activeItemIndex = model(NaN);
32
+ this.activeItemIndexChange = outputFromObservable(this.indexChange$);
33
33
  }
34
34
  get width() {
35
- return SIZE[this.size];
35
+ return SIZE[this.size()];
36
36
  }
37
37
  get strokeWidth() {
38
- return WIDTH[this.size];
38
+ return WIDTH[this.size()];
39
39
  }
40
40
  isInactive(index) {
41
- return !Number.isNaN(this.activeItemIndex) && index !== this.activeItemIndex;
41
+ return !Number.isNaN(this.activeItemIndex()) && index !== this.activeItemIndex();
42
42
  }
43
43
  getInset(index) {
44
- return this.strokeWidth / 2 + index * (this.strokeWidth + GAP[this.size]);
44
+ return this.strokeWidth / 2 + index * (this.strokeWidth + GAP[this.size()]);
45
45
  }
46
46
  getDiameter(index) {
47
- return SIZE[this.size] - 2 * this.getInset(index);
47
+ return SIZE[this.size()] - 2 * this.getInset(index);
48
48
  }
49
49
  getLength(index) {
50
50
  return Math.PI * this.getDiameter(index) * ARC;
51
51
  }
52
52
  getOffset(index) {
53
- return (this.getLength(index) * (1 - Math.min((this.value[index] || 0) / this.max, 1)));
53
+ return (this.getLength(index) *
54
+ (1 - Math.min((this.value()[index] || 0) / this.max(), 1)));
54
55
  }
55
56
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiArcChart, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
56
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiArcChart, isStandalone: true, selector: "tui-arc-chart", inputs: { value: "value", size: "size", max: "max", minLabel: "minLabel", maxLabel: "maxLabel", activeItemIndex: "activeItemIndex" }, outputs: { activeItemIndexChange: "activeItemIndexChange" }, host: { properties: { "attr.data-size": "size", "style.width.rem": "width", "style.height.rem": "width", "style.strokeWidth.rem": "strokeWidth" } }, viewQueries: [{ propertyName: "arcs", predicate: ["arc"], descendants: true }], ngImport: i0, template: "@for (_ of '-'.repeat(value.length); track $index) {\n <svg\n focusable=\"false\"\n viewBox=\"-100 -100 200 200\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-svg\"\n [style.height.rem]=\"getDiameter($index)\"\n [style.inset-block-start.rem]=\"getInset($index)\"\n [style.inset-inline-end.rem]=\"getInset($index)\"\n [style.inset-inline-start.rem]=\"getInset($index)\"\n >\n <path\n d=\"M -70 70 A 100 100 0 1 1 70 70\"\n vector-effect=\"non-scaling-stroke\"\n />\n <path\n #arc\n d=\"M -70 70 A 100 100 0 1 1 70 70\"\n vector-effect=\"non-scaling-stroke\"\n class=\"t-value\"\n [class.t-value_inactive]=\"isInactive($index)\"\n [style.stroke]=\"`var(--tui-chart-categorical-${$index.toString().padStart(2, '0')})`\"\n [style.strokeDasharray.em]=\"getLength($index)\"\n [style.strokeDashoffset.em]=\"initialized() ? getOffset($index) : getLength($index)\"\n />\n </svg>\n}\n<div class=\"t-content\">\n <div class=\"t-wrapper\">\n <ng-content />\n </div>\n</div>\n<div class=\"t-percent\">\n <span>{{ minLabel }}</span>\n <span>{{ maxLabel }}</span>\n</div>\n", styles: [":host{position:relative;display:block;flex-shrink:0}.t-svg{position:absolute;inset:0;overflow:visible;fill:none;stroke:currentColor;stroke-linecap:round;color:var(--tui-background-neutral-1);font-size:1rem;pointer-events:none}.t-value{pointer-events:auto;transition:stroke-dashoffset var(--tui-duration) ease-in-out,opacity var(--tui-duration) ease-in-out .1s}.t-value_inactive{transition-property:stroke-dashoffset,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:.16}.t-content{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex;justify-content:center;align-items:center;text-align:center;color:var(--tui-text-secondary);font:var(--tui-font-text-xs);pointer-events:none}:host[data-size=xl] .t-content{font:var(--tui-font-text-m)}.t-wrapper{pointer-events:auto}.t-wrapper:first-line{color:var(--tui-text-primary)}:host[data-size=m] .t-wrapper:first-line{font:var(--tui-font-text-s);font-weight:700}:host[data-size=l] .t-wrapper:first-line{font:var(--tui-font-text-m);font-weight:700}:host[data-size=xl] .t-wrapper:first-line{font:var(--tui-font-heading-5)}.t-percent{position:absolute;left:25%;bottom:11%;display:flex;inline-size:50%;justify-content:space-between;font:var(--tui-font-text-xs);color:var(--tui-text-secondary)}:host[data-size=xl] .t-percent{font:var(--tui-font-text-m)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
57
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiArcChart, isStandalone: true, selector: "tui-arc-chart", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, minLabel: { classPropertyName: "minLabel", publicName: "minLabel", isSignal: true, isRequired: false, transformFunction: null }, maxLabel: { classPropertyName: "maxLabel", publicName: "maxLabel", isSignal: true, isRequired: false, transformFunction: null }, activeItemIndex: { classPropertyName: "activeItemIndex", publicName: "activeItemIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activeItemIndex: "activeItemIndexChange", activeItemIndexChange: "activeItemIndexChange" }, host: { properties: { "attr.data-size": "size()", "style.width.rem": "width", "style.height.rem": "width", "style.strokeWidth.rem": "strokeWidth" } }, viewQueries: [{ propertyName: "arcs", predicate: ["arc"], descendants: true, isSignal: true }], ngImport: i0, template: "@let data = value();\n@let min = minLabel();\n@let max = maxLabel();\n@for (_ of '-'.repeat(data.length); track $index) {\n <svg\n focusable=\"false\"\n viewBox=\"-100 -100 200 200\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-svg\"\n [style.height.rem]=\"getDiameter($index)\"\n [style.inset-block-start.rem]=\"getInset($index)\"\n [style.inset-inline-end.rem]=\"getInset($index)\"\n [style.inset-inline-start.rem]=\"getInset($index)\"\n >\n <path\n d=\"M -70 70 A 100 100 0 1 1 70 70\"\n vector-effect=\"non-scaling-stroke\"\n />\n <path\n #arc\n d=\"M -70 70 A 100 100 0 1 1 70 70\"\n vector-effect=\"non-scaling-stroke\"\n class=\"t-value\"\n [class.t-value_inactive]=\"isInactive($index)\"\n [style.stroke]=\"`var(--tui-chart-categorical-${$index.toString().padStart(2, '0')})`\"\n [style.strokeDasharray.em]=\"getLength($index)\"\n [style.strokeDashoffset.em]=\"initialized() ? getOffset($index) : getLength($index)\"\n />\n </svg>\n}\n<div class=\"t-content\">\n <div class=\"t-wrapper\">\n <ng-content />\n </div>\n</div>\n<div class=\"t-percent\">\n <span>{{ min }}</span>\n <span>{{ max }}</span>\n</div>\n", styles: [":host{position:relative;display:block;flex-shrink:0}.t-svg{position:absolute;inset:0;overflow:visible;fill:none;stroke:currentColor;stroke-linecap:round;color:var(--tui-background-neutral-1);font-size:1rem;pointer-events:none}.t-value{pointer-events:auto;transition:stroke-dashoffset var(--tui-duration) ease-in-out,opacity var(--tui-duration) ease-in-out .1s}.t-value_inactive{transition-property:stroke-dashoffset,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:.16}.t-content{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex;justify-content:center;align-items:center;text-align:center;color:var(--tui-text-secondary);font:var(--tui-font-body-xs);pointer-events:none}:host[data-size=xl] .t-content{font:var(--tui-font-body-m)}.t-wrapper{pointer-events:auto}.t-wrapper:first-line{color:var(--tui-text-primary)}:host[data-size=m] .t-wrapper:first-line{font:var(--tui-font-body-s);font-weight:700}:host[data-size=l] .t-wrapper:first-line{font:var(--tui-font-body-m);font-weight:700}:host[data-size=xl] .t-wrapper:first-line{font:var(--tui-font-heading-h5)}.t-percent{position:absolute;left:25%;bottom:11%;display:flex;inline-size:50%;justify-content:space-between;font:var(--tui-font-body-xs);color:var(--tui-text-secondary)}:host[data-size=xl] .t-percent{font:var(--tui-font-body-m)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
57
58
  }
58
59
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiArcChart, decorators: [{
59
60
  type: Component,
60
61
  args: [{ selector: 'tui-arc-chart', changeDetection: ChangeDetectionStrategy.OnPush, host: {
61
- '[attr.data-size]': 'size',
62
+ '[attr.data-size]': 'size()',
62
63
  '[style.width.rem]': 'width',
63
64
  '[style.height.rem]': 'width',
64
65
  '[style.strokeWidth.rem]': 'strokeWidth',
65
- }, template: "@for (_ of '-'.repeat(value.length); track $index) {\n <svg\n focusable=\"false\"\n viewBox=\"-100 -100 200 200\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-svg\"\n [style.height.rem]=\"getDiameter($index)\"\n [style.inset-block-start.rem]=\"getInset($index)\"\n [style.inset-inline-end.rem]=\"getInset($index)\"\n [style.inset-inline-start.rem]=\"getInset($index)\"\n >\n <path\n d=\"M -70 70 A 100 100 0 1 1 70 70\"\n vector-effect=\"non-scaling-stroke\"\n />\n <path\n #arc\n d=\"M -70 70 A 100 100 0 1 1 70 70\"\n vector-effect=\"non-scaling-stroke\"\n class=\"t-value\"\n [class.t-value_inactive]=\"isInactive($index)\"\n [style.stroke]=\"`var(--tui-chart-categorical-${$index.toString().padStart(2, '0')})`\"\n [style.strokeDasharray.em]=\"getLength($index)\"\n [style.strokeDashoffset.em]=\"initialized() ? getOffset($index) : getLength($index)\"\n />\n </svg>\n}\n<div class=\"t-content\">\n <div class=\"t-wrapper\">\n <ng-content />\n </div>\n</div>\n<div class=\"t-percent\">\n <span>{{ minLabel }}</span>\n <span>{{ maxLabel }}</span>\n</div>\n", styles: [":host{position:relative;display:block;flex-shrink:0}.t-svg{position:absolute;inset:0;overflow:visible;fill:none;stroke:currentColor;stroke-linecap:round;color:var(--tui-background-neutral-1);font-size:1rem;pointer-events:none}.t-value{pointer-events:auto;transition:stroke-dashoffset var(--tui-duration) ease-in-out,opacity var(--tui-duration) ease-in-out .1s}.t-value_inactive{transition-property:stroke-dashoffset,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:.16}.t-content{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex;justify-content:center;align-items:center;text-align:center;color:var(--tui-text-secondary);font:var(--tui-font-text-xs);pointer-events:none}:host[data-size=xl] .t-content{font:var(--tui-font-text-m)}.t-wrapper{pointer-events:auto}.t-wrapper:first-line{color:var(--tui-text-primary)}:host[data-size=m] .t-wrapper:first-line{font:var(--tui-font-text-s);font-weight:700}:host[data-size=l] .t-wrapper:first-line{font:var(--tui-font-text-m);font-weight:700}:host[data-size=xl] .t-wrapper:first-line{font:var(--tui-font-heading-5)}.t-percent{position:absolute;left:25%;bottom:11%;display:flex;inline-size:50%;justify-content:space-between;font:var(--tui-font-text-xs);color:var(--tui-text-secondary)}:host[data-size=xl] .t-percent{font:var(--tui-font-text-m)}\n"] }]
66
- }], propDecorators: { value: [{
67
- type: Input
68
- }], size: [{
69
- type: Input
70
- }], max: [{
71
- type: Input
72
- }], minLabel: [{
73
- type: Input
74
- }], maxLabel: [{
75
- type: Input
76
- }], activeItemIndex: [{
77
- type: Input
78
- }], activeItemIndexChange: [{
79
- type: Output
80
- }], arcs: [{
81
- type: ViewChildren,
82
- args: ['arc']
83
- }] } });
66
+ }, template: "@let data = value();\n@let min = minLabel();\n@let max = maxLabel();\n@for (_ of '-'.repeat(data.length); track $index) {\n <svg\n focusable=\"false\"\n viewBox=\"-100 -100 200 200\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-svg\"\n [style.height.rem]=\"getDiameter($index)\"\n [style.inset-block-start.rem]=\"getInset($index)\"\n [style.inset-inline-end.rem]=\"getInset($index)\"\n [style.inset-inline-start.rem]=\"getInset($index)\"\n >\n <path\n d=\"M -70 70 A 100 100 0 1 1 70 70\"\n vector-effect=\"non-scaling-stroke\"\n />\n <path\n #arc\n d=\"M -70 70 A 100 100 0 1 1 70 70\"\n vector-effect=\"non-scaling-stroke\"\n class=\"t-value\"\n [class.t-value_inactive]=\"isInactive($index)\"\n [style.stroke]=\"`var(--tui-chart-categorical-${$index.toString().padStart(2, '0')})`\"\n [style.strokeDasharray.em]=\"getLength($index)\"\n [style.strokeDashoffset.em]=\"initialized() ? getOffset($index) : getLength($index)\"\n />\n </svg>\n}\n<div class=\"t-content\">\n <div class=\"t-wrapper\">\n <ng-content />\n </div>\n</div>\n<div class=\"t-percent\">\n <span>{{ min }}</span>\n <span>{{ max }}</span>\n</div>\n", styles: [":host{position:relative;display:block;flex-shrink:0}.t-svg{position:absolute;inset:0;overflow:visible;fill:none;stroke:currentColor;stroke-linecap:round;color:var(--tui-background-neutral-1);font-size:1rem;pointer-events:none}.t-value{pointer-events:auto;transition:stroke-dashoffset var(--tui-duration) ease-in-out,opacity var(--tui-duration) ease-in-out .1s}.t-value_inactive{transition-property:stroke-dashoffset,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:.16}.t-content{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex;justify-content:center;align-items:center;text-align:center;color:var(--tui-text-secondary);font:var(--tui-font-body-xs);pointer-events:none}:host[data-size=xl] .t-content{font:var(--tui-font-body-m)}.t-wrapper{pointer-events:auto}.t-wrapper:first-line{color:var(--tui-text-primary)}:host[data-size=m] .t-wrapper:first-line{font:var(--tui-font-body-s);font-weight:700}:host[data-size=l] .t-wrapper:first-line{font:var(--tui-font-body-m);font-weight:700}:host[data-size=xl] .t-wrapper:first-line{font:var(--tui-font-heading-h5)}.t-percent{position:absolute;left:25%;bottom:11%;display:flex;inline-size:50%;justify-content:space-between;font:var(--tui-font-body-xs);color:var(--tui-text-secondary)}:host[data-size=xl] .t-percent{font:var(--tui-font-body-m)}\n"] }]
67
+ }] });
84
68
 
85
69
  /**
86
70
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-charts-components-arc-chart.mjs","sources":["../../../projects/addon-charts/components/arc-chart/arc-chart.component.ts","../../../projects/addon-charts/components/arc-chart/arc-chart.template.html","../../../projects/addon-charts/components/arc-chart/taiga-ui-addon-charts-components-arc-chart.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n type ElementRef,\n Input,\n Output,\n type QueryList,\n signal,\n ViewChildren,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {tuiTypedFromEvent, tuiZonefree} from '@taiga-ui/cdk/observables';\nimport {type TuiSizeXL} from '@taiga-ui/core/types';\nimport {\n map,\n merge,\n type Observable,\n ReplaySubject,\n startWith,\n switchMap,\n tap,\n timer,\n} from 'rxjs';\n\nconst ARC = 0.76; // 3/4 with 1% safety offset\nconst SIZE = {m: 9, l: 11, xl: 16} as const;\nconst WIDTH = {m: 0.25, l: 0.375, xl: 0.5625} as const;\nconst GAP = {m: 0.125, l: 0.1875, xl: 0.25} as const;\n\nfunction arcsToIndex(arcs: QueryList<ElementRef<SVGElement>>): Array<Observable<number>> {\n return arcs.map(({nativeElement}, index) =>\n merge(\n tuiTypedFromEvent(nativeElement, 'mouseenter').pipe(map(() => index)),\n tuiTypedFromEvent(nativeElement, 'mouseleave').pipe(map(() => NaN)),\n ),\n );\n}\n\n@Component({\n selector: 'tui-arc-chart',\n templateUrl: './arc-chart.template.html',\n styleUrl: './arc-chart.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.data-size]': 'size',\n '[style.width.rem]': 'width',\n '[style.height.rem]': 'width',\n '[style.strokeWidth.rem]': 'strokeWidth',\n },\n})\nexport class TuiArcChart {\n private readonly arcs$ = new ReplaySubject<QueryList<ElementRef<SVGElement>>>(1);\n\n protected initialized = signal(false);\n\n protected readonly $ = timer(0)\n .pipe(tuiZonefree(), takeUntilDestroyed())\n .subscribe(() => this.initialized.set(true));\n\n @Input()\n public value: readonly number[] = [];\n\n @Input()\n public size: TuiSizeXL = 'm';\n\n @Input()\n public max = 100;\n\n @Input()\n public minLabel = '0%';\n\n @Input()\n public maxLabel = '100%';\n\n @Input()\n public activeItemIndex = NaN;\n\n @Output()\n public readonly activeItemIndexChange = this.arcs$.pipe(\n switchMap((arcs) =>\n arcs.changes.pipe(\n startWith(null),\n switchMap(() => merge(...arcsToIndex(arcs))),\n ),\n ),\n tap((index) => {\n this.activeItemIndex = index;\n }),\n );\n\n @ViewChildren('arc')\n protected set arcs(arcs: QueryList<ElementRef<SVGElement>>) {\n this.arcs$.next(arcs);\n }\n\n protected get width(): number {\n return SIZE[this.size];\n }\n\n protected get strokeWidth(): number {\n return WIDTH[this.size];\n }\n\n protected isInactive(index: number): boolean {\n return !Number.isNaN(this.activeItemIndex) && index !== this.activeItemIndex;\n }\n\n protected getInset(index: number): number {\n return this.strokeWidth / 2 + index * (this.strokeWidth + GAP[this.size]);\n }\n\n protected getDiameter(index: number): number {\n return SIZE[this.size] - 2 * this.getInset(index);\n }\n\n protected getLength(index: number): number {\n return Math.PI * this.getDiameter(index) * ARC;\n }\n\n protected getOffset(index: number): number {\n return (\n this.getLength(index) * (1 - Math.min((this.value[index] || 0) / this.max, 1))\n );\n }\n}\n","@for (_ of '-'.repeat(value.length); track $index) {\n <svg\n focusable=\"false\"\n viewBox=\"-100 -100 200 200\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-svg\"\n [style.height.rem]=\"getDiameter($index)\"\n [style.inset-block-start.rem]=\"getInset($index)\"\n [style.inset-inline-end.rem]=\"getInset($index)\"\n [style.inset-inline-start.rem]=\"getInset($index)\"\n >\n <path\n d=\"M -70 70 A 100 100 0 1 1 70 70\"\n vector-effect=\"non-scaling-stroke\"\n />\n <path\n #arc\n d=\"M -70 70 A 100 100 0 1 1 70 70\"\n vector-effect=\"non-scaling-stroke\"\n class=\"t-value\"\n [class.t-value_inactive]=\"isInactive($index)\"\n [style.stroke]=\"`var(--tui-chart-categorical-${$index.toString().padStart(2, '0')})`\"\n [style.strokeDasharray.em]=\"getLength($index)\"\n [style.strokeDashoffset.em]=\"initialized() ? getOffset($index) : getLength($index)\"\n />\n </svg>\n}\n<div class=\"t-content\">\n <div class=\"t-wrapper\">\n <ng-content />\n </div>\n</div>\n<div class=\"t-percent\">\n <span>{{ minLabel }}</span>\n <span>{{ maxLabel }}</span>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAwBA,MAAM,GAAG,GAAG,IAAI,CAAC;AACjB,MAAM,IAAI,GAAG,EAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAU;AAC3C,MAAM,KAAK,GAAG,E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.component.ts","../../../projects/addon-charts/components/arc-chart/arc-chart.template.html","../../../projects/addon-charts/components/arc-chart/taiga-ui-addon-charts-components-arc-chart.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n type ElementRef,\n input,\n model,\n viewChildren,\n} from '@angular/core';\nimport {\n outputFromObservable,\n takeUntilDestroyed,\n toObservable,\n toSignal,\n} from '@angular/core/rxjs-interop';\nimport {tuiTypedFromEvent, tuiZonefree} from '@taiga-ui/cdk/observables';\nimport {type TuiSizeXL} from '@taiga-ui/core/types';\nimport {map, merge, type Observable, switchMap, take, tap, timer} from 'rxjs';\n\nconst ARC = 0.76; // 3/4 with 1% safety offset\nconst SIZE = {m: 9, l: 11, xl: 16} as const;\nconst WIDTH = {m: 0.25, l: 0.375, xl: 0.5625} as const;\nconst GAP = {m: 0.125, l: 0.1875, xl: 0.25} as const;\n\nfunction arcsToIndex(arcs: Array<ElementRef<SVGElement>>): Array<Observable<number>> {\n return arcs.map(({nativeElement}, index) =>\n merge(\n tuiTypedFromEvent(nativeElement, 'mouseenter').pipe(map(() => index)),\n tuiTypedFromEvent(nativeElement, 'mouseleave').pipe(map(() => NaN)),\n ),\n );\n}\n\n@Component({\n selector: 'tui-arc-chart',\n templateUrl: './arc-chart.template.html',\n styleUrl: './arc-chart.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.data-size]': 'size()',\n '[style.width.rem]': 'width',\n '[style.height.rem]': 'width',\n '[style.strokeWidth.rem]': 'strokeWidth',\n },\n})\nexport class TuiArcChart {\n private readonly arcs = viewChildren<ElementRef<SVGElement>>('arc');\n\n private readonly indexChange$ = toObservable(this.arcs).pipe(\n takeUntilDestroyed(),\n switchMap((arcs) =>\n merge(...arcsToIndex(arcs as Array<ElementRef<SVGElement>>)).pipe(\n tap((i) => this.activeItemIndex.set(i)),\n ),\n ),\n );\n\n protected readonly initialized = toSignal(\n timer(0).pipe(\n tuiZonefree(),\n take(1),\n // The linter rule 'no-restricted-syntax' incorrectly flags 'map(() => true)' here,\n // because the literal 'true' has type 'true' (not 'boolean'), which is intentional for this signal initialization.\n map(() => true),\n ),\n {initialValue: false},\n );\n\n public readonly value = input<readonly number[]>([]);\n\n public readonly size = input<TuiSizeXL>('m');\n\n public readonly max = input(100);\n\n public readonly minLabel = input('0%');\n\n public readonly maxLabel = input('100%');\n\n /**\n * Set to change the index of the active arc.\n * Will be overridden by hover state.\n */\n public readonly activeItemIndex = model<number>(NaN);\n\n public readonly activeItemIndexChange = outputFromObservable(this.indexChange$);\n\n protected get width(): number {\n return SIZE[this.size()];\n }\n\n protected get strokeWidth(): number {\n return WIDTH[this.size()];\n }\n\n protected isInactive(index: number): boolean {\n return !Number.isNaN(this.activeItemIndex()) && index !== this.activeItemIndex();\n }\n\n protected getInset(index: number): number {\n return this.strokeWidth / 2 + index * (this.strokeWidth + GAP[this.size()]);\n }\n\n protected getDiameter(index: number): number {\n return SIZE[this.size()] - 2 * this.getInset(index);\n }\n\n protected getLength(index: number): number {\n return Math.PI * this.getDiameter(index) * ARC;\n }\n\n protected getOffset(index: number): number {\n return (\n this.getLength(index) *\n (1 - Math.min((this.value()[index] || 0) / this.max(), 1))\n );\n }\n}\n","@let data = value();\n@let min = minLabel();\n@let max = maxLabel();\n@for (_ of '-'.repeat(data.length); track $index) {\n <svg\n focusable=\"false\"\n viewBox=\"-100 -100 200 200\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-svg\"\n [style.height.rem]=\"getDiameter($index)\"\n [style.inset-block-start.rem]=\"getInset($index)\"\n [style.inset-inline-end.rem]=\"getInset($index)\"\n [style.inset-inline-start.rem]=\"getInset($index)\"\n >\n <path\n d=\"M -70 70 A 100 100 0 1 1 70 70\"\n vector-effect=\"non-scaling-stroke\"\n />\n <path\n #arc\n d=\"M -70 70 A 100 100 0 1 1 70 70\"\n vector-effect=\"non-scaling-stroke\"\n class=\"t-value\"\n [class.t-value_inactive]=\"isInactive($index)\"\n [style.stroke]=\"`var(--tui-chart-categorical-${$index.toString().padStart(2, '0')})`\"\n [style.strokeDasharray.em]=\"getLength($index)\"\n [style.strokeDashoffset.em]=\"initialized() ? getOffset($index) : getLength($index)\"\n />\n </svg>\n}\n<div class=\"t-content\">\n <div class=\"t-wrapper\">\n <ng-content />\n </div>\n</div>\n<div class=\"t-percent\">\n <span>{{ min }}</span>\n <span>{{ max }}</span>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAkBA,MAAM,GAAG,GAAG,IAAI,CAAC;AACjB,MAAM,IAAI,GAAG,EAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAU;AAC3C,MAAM,KAAK,GAAG,EAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAU;AACtD,MAAM,GAAG,GAAG,EAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAU;AAEpD,SAAS,WAAW,CAAC,IAAmC,EAAA;IACpD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAC,aAAa,EAAC,EAAE,KAAK,KACnC,KAAK,CACD,iBAAiB,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC,CAAC,EACrE,iBAAiB,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CACtE,CACJ;AACL;MAca,WAAW,CAAA;AAZxB,IAAA,WAAA,GAAA;AAaqB,QAAA,IAAA,CAAA,IAAI,GAAG,YAAY,CAAyB,KAAK,CAAC;QAElD,IAAY,CAAA,YAAA,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CACxD,kBAAkB,EAAE,EACpB,SAAS,CAAC,CAAC,IAAI,KACX,KAAK,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AAE,QAAQ;AAC5B,wBAAA,mBAAmB,EAAE,OAAO;AAC5B,wBAAA,oBAAoB,EAAE,OAAO;AAC7B,wBAAA,yBAAyB,EAAE,aAAa;AAC3C,qBAAA,EAAA,QAAA,EAAA,m0CAAA,EAAA,MAAA,EAAA,CAAA,u1CAAA,CAAA,EAAA;;;AE1CL;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Input, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { computed, input, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { CHAR_NO_BREAK_SPACE } from '@taiga-ui/cdk/constants';
4
4
 
5
5
  const TUI_ALWAYS_DASHED = () => 'dashed';
@@ -8,72 +8,47 @@ const TUI_ALWAYS_SOLID = () => 'solid';
8
8
  const TUI_ALWAYS_NONE = () => 'none';
9
9
  class TuiAxes {
10
10
  constructor() {
11
- this.axisX = 'solid';
12
- this.axisXLabels = [];
13
- this.axisY = 'solid';
14
- this.axisYInset = false;
15
- this.axisYLabels = [];
16
- this.axisYName = '';
17
- this.axisYSecondaryInset = false;
18
- this.axisYSecondaryLabels = [];
19
- this.axisYSecondaryName = '';
20
- this.horizontalLines = 0;
21
- this.horizontalLinesHandler = TUI_ALWAYS_SOLID;
22
- this.verticalLines = 0;
23
- this.verticalLinesHandler = TUI_ALWAYS_DASHED;
24
- }
25
- get hasXLabels() {
26
- return !!this.axisXLabels.length;
27
- }
28
- get hasYLabels() {
29
- return (!!this.axisYLabels.length && !this.axisYInset) || !!this.axisYName;
30
- }
31
- get hasYSecondaryLabels() {
32
- return ((!!this.axisYSecondaryLabels.length && !this.axisYSecondaryInset) ||
33
- !!this.axisYSecondaryName);
34
- }
35
- fallback(label) {
36
- return label || CHAR_NO_BREAK_SPACE;
37
- }
38
- get centeredXLabels() {
39
- return this.axisY === 'none';
11
+ this.centeredXLabels = computed(() => this.axisY() === 'none');
12
+ this.axisX = input('solid');
13
+ this.axisXLabels = input([]);
14
+ this.axisY = input('solid');
15
+ this.axisYInset = input(false);
16
+ this.axisYLabels = input([]);
17
+ this.axisYName = input('');
18
+ this.axisYSecondaryInset = input(false);
19
+ this.axisYSecondaryLabels = input([]);
20
+ this.axisYSecondaryName = input('');
21
+ this.horizontalLines = input(0);
22
+ this.horizontalLinesHandler = input(TUI_ALWAYS_SOLID);
23
+ this.verticalLines = input(0);
24
+ /**
25
+ * A function to handle vertical lines style.
26
+ * Initially set to always dashed.
27
+ */
28
+ this.verticalLinesHandler = input(TUI_ALWAYS_DASHED);
29
+ this.fallbackLabel = CHAR_NO_BREAK_SPACE;
30
+ this.hasXLabels = computed(() => !!this.axisXLabels().length);
31
+ this.hasYLabels = computed(() => {
32
+ // keep this to prevent tracking loss on short circuits
33
+ const yN = this.axisYName();
34
+ return (this.axisYLabels().length && !this.axisYInset()) || !!yN;
35
+ });
36
+ this.hasYSecondaryLabels = computed(() => {
37
+ // keep this to prevent tracking loss on short circuits
38
+ const ySN = this.axisYSecondaryName();
39
+ return ((this.axisYSecondaryLabels().length && !this.axisYSecondaryInset()) || !!ySN);
40
+ });
40
41
  }
41
42
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiAxes, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
42
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiAxes, isStandalone: true, selector: "tui-axes", inputs: { axisX: "axisX", axisXLabels: "axisXLabels", axisY: "axisY", axisYInset: "axisYInset", axisYLabels: "axisYLabels", axisYName: "axisYName", axisYSecondaryInset: "axisYSecondaryInset", axisYSecondaryLabels: "axisYSecondaryLabels", axisYSecondaryName: "axisYSecondaryName", horizontalLines: "horizontalLines", horizontalLinesHandler: "horizontalLinesHandler", verticalLines: "verticalLines", verticalLinesHandler: "verticalLinesHandler" }, host: { attributes: { "dir": "ltr" }, properties: { "class._centered": "centeredXLabels" } }, ngImport: i0, template: "@if (hasYLabels) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXLabels\"\n >\n @if (axisYName) {\n <div\n automation-id=\"tui-axex__axis-y-name\"\n class=\"t-name t-name_primary\"\n >\n {{ axisYName }}\n </div>\n }\n @if (!axisYInset) {\n <div class=\"t-labels-y t-labels-y_primary\">\n @for (label of axisYLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n </div>\n}\n<div class=\"t-wrapper\">\n <div\n class=\"t-grid\"\n [style.borderBottomStyle]=\"axisX\"\n [style.borderLeftStyle]=\"axisY\"\n >\n <div class=\"t-vertical\">\n @for (_ of '-'.repeat(verticalLines); track $index) {\n <div\n automation-id=\"tui-axex__vertical-line\"\n class=\"t-line t-line_vertical\"\n [style.border-right-style]=\"verticalLinesHandler($index, verticalLines)\"\n ></div>\n }\n </div>\n <div class=\"t-horizontal\">\n @for (_ of '-'.repeat(horizontalLines); track $index) {\n <div\n automation-id=\"tui-axex__horizontal-line\"\n class=\"t-line\"\n [style.border-top-style]=\"horizontalLinesHandler($index, horizontalLines)\"\n ></div>\n }\n </div>\n @if (axisYInset) {\n <div class=\"t-labels-y t-labels-y_inset\">\n @for (label of axisYLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n @if (axisYSecondaryInset) {\n <div class=\"t-labels-y t-labels-y_inset t-labels-y_inset_secondary\">\n @for (label of axisYSecondaryLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n <div class=\"t-content\">\n <ng-content />\n </div>\n </div>\n @if (hasXLabels) {\n <div class=\"t-labels-x\">\n @for (label of axisXLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-x-label\"\n class=\"t-label-x\"\n [class.t-label-x_transparent]=\"label === null\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n</div>\n@if (hasYSecondaryLabels) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXLabels\"\n >\n @if (!axisYSecondaryInset) {\n <div class=\"t-labels-y t-labels-y_secondary\">\n @for (label of axisYSecondaryLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n @if (axisYSecondaryName) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-name\"\n class=\"t-name\"\n >\n {{ axisYSecondaryName }}\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex}.t-wrapper{display:flex;flex:1;block-size:100%;flex-direction:column}.t-grid{position:relative;display:flex;flex:1;justify-content:space-around;align-items:flex-end;border-width:1px;border-color:var(--tui-border-normal);isolation:isolate}.t-horizontal{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex;flex-direction:column}.t-vertical{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex}:host._centered .t-vertical:after{content:\"\";display:block;flex:1 0 1px}.t-line{flex:2 0 1px;box-sizing:border-box;border-width:1px;border-color:var(--tui-border-normal)}:host._centered .t-line_vertical:first-child{flex:1 0 1px;pointer-events:none}.t-side{display:flex;align-items:stretch}.t-side_padding{padding-block-end:2rem}.t-name{font:var(--tui-font-text-xs);writing-mode:tb;text-align:center;padding-block-end:.75rem;color:var(--tui-text-secondary)}.t-name_primary{transform:rotate(180deg)}.t-labels-y{display:flex;font:var(--tui-font-text-xs);flex-direction:column-reverse;justify-content:space-between;color:var(--tui-text-secondary)}.t-labels-y_primary{text-align:end;padding-inline-end:.75rem}.t-labels-y_secondary{padding-inline-start:.75rem}.t-labels-y_transparent{border-color:transparent}.t-labels-y_inset{position:absolute;top:.5625rem;left:.25rem;bottom:-.75rem;pointer-events:none}.t-labels-y_inset_secondary{left:auto;right:.25rem;text-align:end}.t-labels-x{position:relative;display:flex;font:var(--tui-font-text-xs);border-inline-end:1px solid transparent;color:var(--tui-text-secondary)}.t-label-x{block-size:.4375rem;border-inline-start:1px solid var(--tui-border-normal);flex:1;margin-block-end:1.5625rem}.t-label-x:before{content:\"\";display:block;block-size:.5625rem}.t-label-x_transparent{border-color:transparent}:host._centered .t-label-x{block-size:2rem;text-align:center;border:none;margin:0}:host:not(._centered) .t-label-x:last-child:not(:first-child){position:absolute;right:0;text-align:end;border-inline-start:none}.t-label-y:first-child{margin-block-end:-.375rem}.t-label-y:last-child{margin-block-start:-.375rem}.t-content{position:absolute;inset:0 0 -1px -1px;display:flex;align-items:flex-end}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
43
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiAxes, isStandalone: true, selector: "tui-axes", inputs: { axisX: { classPropertyName: "axisX", publicName: "axisX", isSignal: true, isRequired: false, transformFunction: null }, axisXLabels: { classPropertyName: "axisXLabels", publicName: "axisXLabels", isSignal: true, isRequired: false, transformFunction: null }, axisY: { classPropertyName: "axisY", publicName: "axisY", isSignal: true, isRequired: false, transformFunction: null }, axisYInset: { classPropertyName: "axisYInset", publicName: "axisYInset", isSignal: true, isRequired: false, transformFunction: null }, axisYLabels: { classPropertyName: "axisYLabels", publicName: "axisYLabels", isSignal: true, isRequired: false, transformFunction: null }, axisYName: { classPropertyName: "axisYName", publicName: "axisYName", isSignal: true, isRequired: false, transformFunction: null }, axisYSecondaryInset: { classPropertyName: "axisYSecondaryInset", publicName: "axisYSecondaryInset", isSignal: true, isRequired: false, transformFunction: null }, axisYSecondaryLabels: { classPropertyName: "axisYSecondaryLabels", publicName: "axisYSecondaryLabels", isSignal: true, isRequired: false, transformFunction: null }, axisYSecondaryName: { classPropertyName: "axisYSecondaryName", publicName: "axisYSecondaryName", isSignal: true, isRequired: false, transformFunction: null }, horizontalLines: { classPropertyName: "horizontalLines", publicName: "horizontalLines", isSignal: true, isRequired: false, transformFunction: null }, horizontalLinesHandler: { classPropertyName: "horizontalLinesHandler", publicName: "horizontalLinesHandler", isSignal: true, isRequired: false, transformFunction: null }, verticalLines: { classPropertyName: "verticalLines", publicName: "verticalLines", isSignal: true, isRequired: false, transformFunction: null }, verticalLinesHandler: { classPropertyName: "verticalLinesHandler", publicName: "verticalLinesHandler", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "dir": "ltr" }, properties: { "class._centered": "centeredXLabels()" } }, ngImport: i0, template: "@let ySecLabels = axisYSecondaryLabels();\n@let ySecInset = axisYSecondaryInset();\n@let yLabels = axisYLabels();\n@let yInset = axisYInset();\n@let hasXs = hasXLabels();\n\n@if (hasYLabels()) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXs\"\n >\n @let yName = axisYName();\n @if (yName) {\n <div\n automation-id=\"tui-axex__axis-y-name\"\n class=\"t-name t-name_primary\"\n >\n {{ yName }}\n </div>\n }\n @if (!yInset) {\n <div class=\"t-labels-y t-labels-y_primary\">\n @for (label of yLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n </div>\n}\n<div class=\"t-wrapper\">\n <div\n class=\"t-grid\"\n [style.borderBottomStyle]=\"axisX()\"\n [style.borderLeftStyle]=\"axisY()\"\n >\n <div class=\"t-vertical\">\n @let vLineFn = verticalLinesHandler();\n @let vLines = verticalLines();\n @for (_ of '-'.repeat(vLines); track $index) {\n <div\n automation-id=\"tui-axex__vertical-line\"\n class=\"t-line t-line_vertical\"\n [style.border-right-style]=\"vLineFn($index, vLines)\"\n ></div>\n }\n </div>\n <div class=\"t-horizontal\">\n @let hLineFn = horizontalLinesHandler();\n @let hLines = horizontalLines();\n @for (_ of '-'.repeat(hLines); track $index) {\n <div\n automation-id=\"tui-axex__horizontal-line\"\n class=\"t-line\"\n [style.border-top-style]=\"hLineFn($index, hLines)\"\n ></div>\n }\n </div>\n @if (yInset) {\n <div class=\"t-labels-y t-labels-y_inset\">\n @for (label of yLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n @if (ySecInset) {\n <div class=\"t-labels-y t-labels-y_inset t-labels-y_inset_secondary\">\n @for (label of ySecLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n <div class=\"t-content\">\n <ng-content />\n </div>\n </div>\n @if (hasXs) {\n <div class=\"t-labels-x\">\n @for (label of axisXLabels(); track label) {\n <div\n automation-id=\"tui-axex__axis-x-label\"\n class=\"t-label-x\"\n [class.t-label-x_transparent]=\"label === null\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n</div>\n@if (hasYSecondaryLabels()) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXs\"\n >\n @if (!ySecInset) {\n <div class=\"t-labels-y t-labels-y_secondary\">\n @for (label of ySecLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n @let axisYSec = axisYSecondaryName();\n @if (axisYSec) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-name\"\n class=\"t-name\"\n >\n {{ axisYSec }}\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex}.t-wrapper{display:flex;flex:1;block-size:100%;flex-direction:column}.t-grid{position:relative;display:flex;flex:1;justify-content:space-around;align-items:flex-end;border-width:1px;border-color:var(--tui-border-normal);isolation:isolate}.t-horizontal{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex;flex-direction:column}.t-vertical{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex}:host._centered .t-vertical:after{content:\"\";display:block;flex:1 0 1px}.t-line{flex:2 0 1px;box-sizing:border-box;border-width:1px;border-color:var(--tui-border-normal)}:host._centered .t-line_vertical:first-child{flex:1 0 1px;pointer-events:none}.t-side{display:flex;align-items:stretch}.t-side_padding{padding-block-end:2rem}.t-name{font:var(--tui-font-body-xs);writing-mode:tb;text-align:center;padding-block-end:.75rem;color:var(--tui-text-secondary)}.t-name_primary{transform:rotate(180deg)}.t-labels-y{display:flex;font:var(--tui-font-body-xs);flex-direction:column-reverse;justify-content:space-between;color:var(--tui-text-secondary)}.t-labels-y_primary{text-align:end;padding-inline-end:.75rem}.t-labels-y_secondary{padding-inline-start:.75rem}.t-labels-y_transparent{border-color:transparent}.t-labels-y_inset{position:absolute;top:.5625rem;left:.25rem;bottom:-.75rem;pointer-events:none}.t-labels-y_inset_secondary{left:auto;right:.25rem;text-align:end}.t-labels-x{position:relative;display:flex;font:var(--tui-font-body-xs);border-inline-end:1px solid transparent;color:var(--tui-text-secondary)}.t-label-x{block-size:.4375rem;border-inline-start:1px solid var(--tui-border-normal);flex:1;margin-block-end:1.5625rem}.t-label-x:before{content:\"\";display:block;block-size:.5625rem}.t-label-x_transparent{border-color:transparent}:host._centered .t-label-x{block-size:2rem;text-align:center;border:none;margin:0}:host:not(._centered) .t-label-x:last-child:not(:first-child){position:absolute;right:0;text-align:end;border-inline-start:none}.t-label-y:first-child{margin-block-end:-.375rem}.t-label-y:last-child{margin-block-start:-.375rem}.t-content{position:absolute;inset:0 0 -1px -1px;display:flex;align-items:flex-end}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
43
44
  }
44
45
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiAxes, decorators: [{
45
46
  type: Component,
46
47
  args: [{ selector: 'tui-axes', changeDetection: ChangeDetectionStrategy.OnPush, host: {
47
48
  dir: 'ltr',
48
- '[class._centered]': 'centeredXLabels',
49
- }, template: "@if (hasYLabels) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXLabels\"\n >\n @if (axisYName) {\n <div\n automation-id=\"tui-axex__axis-y-name\"\n class=\"t-name t-name_primary\"\n >\n {{ axisYName }}\n </div>\n }\n @if (!axisYInset) {\n <div class=\"t-labels-y t-labels-y_primary\">\n @for (label of axisYLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n </div>\n}\n<div class=\"t-wrapper\">\n <div\n class=\"t-grid\"\n [style.borderBottomStyle]=\"axisX\"\n [style.borderLeftStyle]=\"axisY\"\n >\n <div class=\"t-vertical\">\n @for (_ of '-'.repeat(verticalLines); track $index) {\n <div\n automation-id=\"tui-axex__vertical-line\"\n class=\"t-line t-line_vertical\"\n [style.border-right-style]=\"verticalLinesHandler($index, verticalLines)\"\n ></div>\n }\n </div>\n <div class=\"t-horizontal\">\n @for (_ of '-'.repeat(horizontalLines); track $index) {\n <div\n automation-id=\"tui-axex__horizontal-line\"\n class=\"t-line\"\n [style.border-top-style]=\"horizontalLinesHandler($index, horizontalLines)\"\n ></div>\n }\n </div>\n @if (axisYInset) {\n <div class=\"t-labels-y t-labels-y_inset\">\n @for (label of axisYLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n @if (axisYSecondaryInset) {\n <div class=\"t-labels-y t-labels-y_inset t-labels-y_inset_secondary\">\n @for (label of axisYSecondaryLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n <div class=\"t-content\">\n <ng-content />\n </div>\n </div>\n @if (hasXLabels) {\n <div class=\"t-labels-x\">\n @for (label of axisXLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-x-label\"\n class=\"t-label-x\"\n [class.t-label-x_transparent]=\"label === null\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n</div>\n@if (hasYSecondaryLabels) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXLabels\"\n >\n @if (!axisYSecondaryInset) {\n <div class=\"t-labels-y t-labels-y_secondary\">\n @for (label of axisYSecondaryLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n @if (axisYSecondaryName) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-name\"\n class=\"t-name\"\n >\n {{ axisYSecondaryName }}\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex}.t-wrapper{display:flex;flex:1;block-size:100%;flex-direction:column}.t-grid{position:relative;display:flex;flex:1;justify-content:space-around;align-items:flex-end;border-width:1px;border-color:var(--tui-border-normal);isolation:isolate}.t-horizontal{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex;flex-direction:column}.t-vertical{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex}:host._centered .t-vertical:after{content:\"\";display:block;flex:1 0 1px}.t-line{flex:2 0 1px;box-sizing:border-box;border-width:1px;border-color:var(--tui-border-normal)}:host._centered .t-line_vertical:first-child{flex:1 0 1px;pointer-events:none}.t-side{display:flex;align-items:stretch}.t-side_padding{padding-block-end:2rem}.t-name{font:var(--tui-font-text-xs);writing-mode:tb;text-align:center;padding-block-end:.75rem;color:var(--tui-text-secondary)}.t-name_primary{transform:rotate(180deg)}.t-labels-y{display:flex;font:var(--tui-font-text-xs);flex-direction:column-reverse;justify-content:space-between;color:var(--tui-text-secondary)}.t-labels-y_primary{text-align:end;padding-inline-end:.75rem}.t-labels-y_secondary{padding-inline-start:.75rem}.t-labels-y_transparent{border-color:transparent}.t-labels-y_inset{position:absolute;top:.5625rem;left:.25rem;bottom:-.75rem;pointer-events:none}.t-labels-y_inset_secondary{left:auto;right:.25rem;text-align:end}.t-labels-x{position:relative;display:flex;font:var(--tui-font-text-xs);border-inline-end:1px solid transparent;color:var(--tui-text-secondary)}.t-label-x{block-size:.4375rem;border-inline-start:1px solid var(--tui-border-normal);flex:1;margin-block-end:1.5625rem}.t-label-x:before{content:\"\";display:block;block-size:.5625rem}.t-label-x_transparent{border-color:transparent}:host._centered .t-label-x{block-size:2rem;text-align:center;border:none;margin:0}:host:not(._centered) .t-label-x:last-child:not(:first-child){position:absolute;right:0;text-align:end;border-inline-start:none}.t-label-y:first-child{margin-block-end:-.375rem}.t-label-y:last-child{margin-block-start:-.375rem}.t-content{position:absolute;inset:0 0 -1px -1px;display:flex;align-items:flex-end}\n"] }]
50
- }], propDecorators: { axisX: [{
51
- type: Input
52
- }], axisXLabels: [{
53
- type: Input
54
- }], axisY: [{
55
- type: Input
56
- }], axisYInset: [{
57
- type: Input
58
- }], axisYLabels: [{
59
- type: Input
60
- }], axisYName: [{
61
- type: Input
62
- }], axisYSecondaryInset: [{
63
- type: Input
64
- }], axisYSecondaryLabels: [{
65
- type: Input
66
- }], axisYSecondaryName: [{
67
- type: Input
68
- }], horizontalLines: [{
69
- type: Input
70
- }], horizontalLinesHandler: [{
71
- type: Input
72
- }], verticalLines: [{
73
- type: Input
74
- }], verticalLinesHandler: [{
75
- type: Input
76
- }] } });
49
+ '[class._centered]': 'centeredXLabels()',
50
+ }, template: "@let ySecLabels = axisYSecondaryLabels();\n@let ySecInset = axisYSecondaryInset();\n@let yLabels = axisYLabels();\n@let yInset = axisYInset();\n@let hasXs = hasXLabels();\n\n@if (hasYLabels()) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXs\"\n >\n @let yName = axisYName();\n @if (yName) {\n <div\n automation-id=\"tui-axex__axis-y-name\"\n class=\"t-name t-name_primary\"\n >\n {{ yName }}\n </div>\n }\n @if (!yInset) {\n <div class=\"t-labels-y t-labels-y_primary\">\n @for (label of yLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n </div>\n}\n<div class=\"t-wrapper\">\n <div\n class=\"t-grid\"\n [style.borderBottomStyle]=\"axisX()\"\n [style.borderLeftStyle]=\"axisY()\"\n >\n <div class=\"t-vertical\">\n @let vLineFn = verticalLinesHandler();\n @let vLines = verticalLines();\n @for (_ of '-'.repeat(vLines); track $index) {\n <div\n automation-id=\"tui-axex__vertical-line\"\n class=\"t-line t-line_vertical\"\n [style.border-right-style]=\"vLineFn($index, vLines)\"\n ></div>\n }\n </div>\n <div class=\"t-horizontal\">\n @let hLineFn = horizontalLinesHandler();\n @let hLines = horizontalLines();\n @for (_ of '-'.repeat(hLines); track $index) {\n <div\n automation-id=\"tui-axex__horizontal-line\"\n class=\"t-line\"\n [style.border-top-style]=\"hLineFn($index, hLines)\"\n ></div>\n }\n </div>\n @if (yInset) {\n <div class=\"t-labels-y t-labels-y_inset\">\n @for (label of yLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n @if (ySecInset) {\n <div class=\"t-labels-y t-labels-y_inset t-labels-y_inset_secondary\">\n @for (label of ySecLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n <div class=\"t-content\">\n <ng-content />\n </div>\n </div>\n @if (hasXs) {\n <div class=\"t-labels-x\">\n @for (label of axisXLabels(); track label) {\n <div\n automation-id=\"tui-axex__axis-x-label\"\n class=\"t-label-x\"\n [class.t-label-x_transparent]=\"label === null\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n</div>\n@if (hasYSecondaryLabels()) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXs\"\n >\n @if (!ySecInset) {\n <div class=\"t-labels-y t-labels-y_secondary\">\n @for (label of ySecLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n @let axisYSec = axisYSecondaryName();\n @if (axisYSec) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-name\"\n class=\"t-name\"\n >\n {{ axisYSec }}\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex}.t-wrapper{display:flex;flex:1;block-size:100%;flex-direction:column}.t-grid{position:relative;display:flex;flex:1;justify-content:space-around;align-items:flex-end;border-width:1px;border-color:var(--tui-border-normal);isolation:isolate}.t-horizontal{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex;flex-direction:column}.t-vertical{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex}:host._centered .t-vertical:after{content:\"\";display:block;flex:1 0 1px}.t-line{flex:2 0 1px;box-sizing:border-box;border-width:1px;border-color:var(--tui-border-normal)}:host._centered .t-line_vertical:first-child{flex:1 0 1px;pointer-events:none}.t-side{display:flex;align-items:stretch}.t-side_padding{padding-block-end:2rem}.t-name{font:var(--tui-font-body-xs);writing-mode:tb;text-align:center;padding-block-end:.75rem;color:var(--tui-text-secondary)}.t-name_primary{transform:rotate(180deg)}.t-labels-y{display:flex;font:var(--tui-font-body-xs);flex-direction:column-reverse;justify-content:space-between;color:var(--tui-text-secondary)}.t-labels-y_primary{text-align:end;padding-inline-end:.75rem}.t-labels-y_secondary{padding-inline-start:.75rem}.t-labels-y_transparent{border-color:transparent}.t-labels-y_inset{position:absolute;top:.5625rem;left:.25rem;bottom:-.75rem;pointer-events:none}.t-labels-y_inset_secondary{left:auto;right:.25rem;text-align:end}.t-labels-x{position:relative;display:flex;font:var(--tui-font-body-xs);border-inline-end:1px solid transparent;color:var(--tui-text-secondary)}.t-label-x{block-size:.4375rem;border-inline-start:1px solid var(--tui-border-normal);flex:1;margin-block-end:1.5625rem}.t-label-x:before{content:\"\";display:block;block-size:.5625rem}.t-label-x_transparent{border-color:transparent}:host._centered .t-label-x{block-size:2rem;text-align:center;border:none;margin:0}:host:not(._centered) .t-label-x:last-child:not(:first-child){position:absolute;right:0;text-align:end;border-inline-start:none}.t-label-y:first-child{margin-block-end:-.375rem}.t-label-y:last-child{margin-block-start:-.375rem}.t-content{position:absolute;inset:0 0 -1px -1px;display:flex;align-items:flex-end}\n"] }]
51
+ }] });
77
52
 
78
53
  /**
79
54
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-charts-components-axes.mjs","sources":["../../../projects/addon-charts/components/axes/axes.component.ts","../../../projects/addon-charts/components/axes/axes.template.html","../../../projects/addon-charts/components/axes/taiga-ui-addon-charts-components-axes.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, Input} from '@angular/core';\nimport {type TuiLineHandler, type TuiLineType} from '@taiga-ui/addon-charts/types';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk/constants';\n\nexport const TUI_ALWAYS_DASHED: TuiLineHandler = () => 'dashed';\nexport const TUI_ALWAYS_DOTTED: TuiLineHandler = () => 'dotted';\nexport const TUI_ALWAYS_SOLID: TuiLineHandler = () => 'solid';\nexport const TUI_ALWAYS_NONE: TuiLineHandler = () => 'none';\n\n@Component({\n selector: 'tui-axes',\n templateUrl: './axes.template.html',\n styleUrl: './axes.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n dir: 'ltr',\n '[class._centered]': 'centeredXLabels',\n },\n})\nexport class TuiAxes {\n @Input()\n public axisX: TuiLineType = 'solid';\n\n @Input()\n public axisXLabels: ReadonlyArray<string | null> = [];\n\n @Input()\n public axisY: TuiLineType = 'solid';\n\n @Input()\n public axisYInset = false;\n\n @Input()\n public axisYLabels: readonly string[] = [];\n\n @Input()\n public axisYName = '';\n\n @Input()\n public axisYSecondaryInset = false;\n\n @Input()\n public axisYSecondaryLabels: readonly string[] = [];\n\n @Input()\n public axisYSecondaryName = '';\n\n @Input()\n public horizontalLines = 0;\n\n @Input()\n public horizontalLinesHandler: TuiLineHandler = TUI_ALWAYS_SOLID;\n\n @Input()\n public verticalLines = 0;\n\n @Input()\n public verticalLinesHandler: TuiLineHandler = TUI_ALWAYS_DASHED;\n\n public get hasXLabels(): boolean {\n return !!this.axisXLabels.length;\n }\n\n public get hasYLabels(): boolean {\n return (!!this.axisYLabels.length && !this.axisYInset) || !!this.axisYName;\n }\n\n public get hasYSecondaryLabels(): boolean {\n return (\n (!!this.axisYSecondaryLabels.length && !this.axisYSecondaryInset) ||\n !!this.axisYSecondaryName\n );\n }\n\n public fallback(label: string | null): string {\n return label || CHAR_NO_BREAK_SPACE;\n }\n\n protected get centeredXLabels(): boolean {\n return this.axisY === 'none';\n }\n}\n","@if (hasYLabels) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXLabels\"\n >\n @if (axisYName) {\n <div\n automation-id=\"tui-axex__axis-y-name\"\n class=\"t-name t-name_primary\"\n >\n {{ axisYName }}\n </div>\n }\n @if (!axisYInset) {\n <div class=\"t-labels-y t-labels-y_primary\">\n @for (label of axisYLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n </div>\n}\n<div class=\"t-wrapper\">\n <div\n class=\"t-grid\"\n [style.borderBottomStyle]=\"axisX\"\n [style.borderLeftStyle]=\"axisY\"\n >\n <div class=\"t-vertical\">\n @for (_ of '-'.repeat(verticalLines); track $index) {\n <div\n automation-id=\"tui-axex__vertical-line\"\n class=\"t-line t-line_vertical\"\n [style.border-right-style]=\"verticalLinesHandler($index, verticalLines)\"\n ></div>\n }\n </div>\n <div class=\"t-horizontal\">\n @for (_ of '-'.repeat(horizontalLines); track $index) {\n <div\n automation-id=\"tui-axex__horizontal-line\"\n class=\"t-line\"\n [style.border-top-style]=\"horizontalLinesHandler($index, horizontalLines)\"\n ></div>\n }\n </div>\n @if (axisYInset) {\n <div class=\"t-labels-y t-labels-y_inset\">\n @for (label of axisYLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n @if (axisYSecondaryInset) {\n <div class=\"t-labels-y t-labels-y_inset t-labels-y_inset_secondary\">\n @for (label of axisYSecondaryLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n <div class=\"t-content\">\n <ng-content />\n </div>\n </div>\n @if (hasXLabels) {\n <div class=\"t-labels-x\">\n @for (label of axisXLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-x-label\"\n class=\"t-label-x\"\n [class.t-label-x_transparent]=\"label === null\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n</div>\n@if (hasYSecondaryLabels) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXLabels\"\n >\n @if (!axisYSecondaryInset) {\n <div class=\"t-labels-y t-labels-y_secondary\">\n @for (label of axisYSecondaryLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n @if (axisYSecondaryName) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-name\"\n class=\"t-name\"\n >\n {{ axisYSecondaryName }}\n </div>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAIa,iBAAiB,GAAmB,MAAM;MAC1C,iBAAiB,GAAmB,MAAM;MAC1C,gBAAgB,GAAmB,MAAM;MACzC,eAAe,GAAmB,MAAM;MAYxC,OAAO,CAAA;AAVpB,IAAA,WAAA,GAAA;QAYW,IAAK,CAAA,KAAA,GAAgB,OAAO;QAG5B,IAAW,CAAA,WAAA,GAAiC,EAAE;QAG9C,IAAK,CAAA,KAAA,GAAgB,OAAO;QAG5B,IAAU,CAAA,UAAA,GAAG,KAAK;QAGlB,IAAW,CAAA,WAAA,GAAsB,EAAE;QAGnC,IAAS,CAAA,SAAA,GAAG,EAAE;QAGd,IAAmB,CAAA,mBAAA,GAAG,KAAK;QAG3B,IAAoB,CAAA,o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,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,UAAU,EAGH,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA;AACF,wBAAA,GAAG,EAAE,KAAK;AACV,wBAAA,mBAAmB,EAAE,iBAAiB;AACzC,qBAAA,EAAA,QAAA,EAAA,i7HAAA,EAAA,MAAA,EAAA,CAAA,upEAAA,CAAA,EAAA;8BAIM,KAAK,EAAA,CAAA;sBADX;gBAIM,WAAW,EAAA,CAAA;sBADjB;gBAIM,KAAK,EAAA,CAAA;sBADX;gBAIM,UAAU,EAAA,CAAA;sBADhB;gBAIM,WAAW,EAAA,CAAA;sBADjB;gBAIM,SAAS,EAAA,CAAA;sBADf;gBAIM,mBAAmB,EAAA,CAAA;sBADzB;gBAIM,oBAAoB,EAAA,CAAA;sBAD1B;gBAIM,kBAAkB,EAAA,CAAA;sBADxB;gBAIM,eAAe,EAAA,CAAA;sBADrB;gBAIM,sBAAsB,EAAA,CAAA;sBAD5B;gBAIM,aAAa,EAAA,CAAA;sBADnB;gBAIM,oBAAoB,EAAA,CAAA;sBAD1B;;;AExDL;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-charts-components-axes.mjs","sources":["../../../projects/addon-charts/components/axes/axes.component.ts","../../../projects/addon-charts/components/axes/axes.template.html","../../../projects/addon-charts/components/axes/taiga-ui-addon-charts-components-axes.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, computed, input} from '@angular/core';\nimport {type TuiLineHandler, type TuiLineType} from '@taiga-ui/addon-charts/types';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk/constants';\n\nexport const TUI_ALWAYS_DASHED: TuiLineHandler = () => 'dashed';\nexport const TUI_ALWAYS_DOTTED: TuiLineHandler = () => 'dotted';\nexport const TUI_ALWAYS_SOLID: TuiLineHandler = () => 'solid';\nexport const TUI_ALWAYS_NONE: TuiLineHandler = () => 'none';\n\n@Component({\n selector: 'tui-axes',\n templateUrl: './axes.template.html',\n styleUrl: './axes.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n dir: 'ltr',\n '[class._centered]': 'centeredXLabels()',\n },\n})\nexport class TuiAxes {\n protected readonly centeredXLabels = computed(() => this.axisY() === 'none');\n\n public readonly axisX = input<TuiLineType>('solid');\n\n public readonly axisXLabels = input<ReadonlyArray<string | null>>([]);\n\n public readonly axisY = input<TuiLineType>('solid');\n\n public readonly axisYInset = input(false);\n\n public readonly axisYLabels = input<readonly string[]>([]);\n\n public readonly axisYName = input('');\n\n public readonly axisYSecondaryInset = input(false);\n\n public readonly axisYSecondaryLabels = input<readonly string[]>([]);\n\n public readonly axisYSecondaryName = input('');\n\n public readonly horizontalLines = input(0);\n\n public readonly horizontalLinesHandler = input<TuiLineHandler>(TUI_ALWAYS_SOLID);\n\n public readonly verticalLines = input(0);\n\n /**\n * A function to handle vertical lines style.\n * Initially set to always dashed.\n */\n public readonly verticalLinesHandler = input<TuiLineHandler>(TUI_ALWAYS_DASHED);\n\n public readonly fallbackLabel = CHAR_NO_BREAK_SPACE;\n\n public readonly hasXLabels = computed(() => !!this.axisXLabels().length);\n\n public readonly hasYLabels = computed(() => {\n // keep this to prevent tracking loss on short circuits\n const yN = this.axisYName();\n\n return (this.axisYLabels().length && !this.axisYInset()) || !!yN;\n });\n\n public readonly hasYSecondaryLabels = computed(() => {\n // keep this to prevent tracking loss on short circuits\n const ySN = this.axisYSecondaryName();\n\n return (\n (this.axisYSecondaryLabels().length && !this.axisYSecondaryInset()) || !!ySN\n );\n });\n}\n","@let ySecLabels = axisYSecondaryLabels();\n@let ySecInset = axisYSecondaryInset();\n@let yLabels = axisYLabels();\n@let yInset = axisYInset();\n@let hasXs = hasXLabels();\n\n@if (hasYLabels()) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXs\"\n >\n @let yName = axisYName();\n @if (yName) {\n <div\n automation-id=\"tui-axex__axis-y-name\"\n class=\"t-name t-name_primary\"\n >\n {{ yName }}\n </div>\n }\n @if (!yInset) {\n <div class=\"t-labels-y t-labels-y_primary\">\n @for (label of yLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n </div>\n}\n<div class=\"t-wrapper\">\n <div\n class=\"t-grid\"\n [style.borderBottomStyle]=\"axisX()\"\n [style.borderLeftStyle]=\"axisY()\"\n >\n <div class=\"t-vertical\">\n @let vLineFn = verticalLinesHandler();\n @let vLines = verticalLines();\n @for (_ of '-'.repeat(vLines); track $index) {\n <div\n automation-id=\"tui-axex__vertical-line\"\n class=\"t-line t-line_vertical\"\n [style.border-right-style]=\"vLineFn($index, vLines)\"\n ></div>\n }\n </div>\n <div class=\"t-horizontal\">\n @let hLineFn = horizontalLinesHandler();\n @let hLines = horizontalLines();\n @for (_ of '-'.repeat(hLines); track $index) {\n <div\n automation-id=\"tui-axex__horizontal-line\"\n class=\"t-line\"\n [style.border-top-style]=\"hLineFn($index, hLines)\"\n ></div>\n }\n </div>\n @if (yInset) {\n <div class=\"t-labels-y t-labels-y_inset\">\n @for (label of yLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n @if (ySecInset) {\n <div class=\"t-labels-y t-labels-y_inset t-labels-y_inset_secondary\">\n @for (label of ySecLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n <div class=\"t-content\">\n <ng-content />\n </div>\n </div>\n @if (hasXs) {\n <div class=\"t-labels-x\">\n @for (label of axisXLabels(); track label) {\n <div\n automation-id=\"tui-axex__axis-x-label\"\n class=\"t-label-x\"\n [class.t-label-x_transparent]=\"label === null\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n</div>\n@if (hasYSecondaryLabels()) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXs\"\n >\n @if (!ySecInset) {\n <div class=\"t-labels-y t-labels-y_secondary\">\n @for (label of ySecLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n @let axisYSec = axisYSecondaryName();\n @if (axisYSec) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-name\"\n class=\"t-name\"\n >\n {{ axisYSec }}\n </div>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAIa,iBAAiB,GAAmB,MAAM;MAC1C,iBAAiB,GAAmB,MAAM;MAC1C,gBAAgB,GAAmB,MAAM;MACzC,eAAe,GAAmB,MAAM;MAYxC,OAAO,CAAA;AAVpB,IAAA,WAAA,GAAA;AAWuB,QAAA,IAAA,CAAA,eAAe,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,KAAK,MAAM,CAAC;AAE5D,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAc,OAAO,CAAC;AAEnC,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAA+B,EAAE,CAAC;AAErD,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAc,OAAO,CAAC;AAEnC,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC;AAEzB,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAoB,EAAE,CAAC;AAE1C,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,EAAE,CAAC;AAErB,QAAA,IAAA,CAAA,mBAAmB,GAAG,KAAK,CAAC,KAAK,CAAC;AAElC,QAAA,IAAA,CAAA,oBAAoB,GAAG,KAAK,CAAoB,EAAE,CAAC;AAEnD,QAAA,IAAA,CAAA,kBAAkB,GAAG,KAAK,CAAC,EAAE,CAAC;AAE9B,QAAA,IAAA,CAAA,e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,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FDjHa,OAAO,EAAA,UAAA,EAAA,CAAA;kBAVnB,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,UAAU,EAGH,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA;AACF,wBAAA,GAAG,EAAE,KAAK;AACV,wBAAA,mBAAmB,EAAE,mBAAmB;AAC3C,qBAAA,EAAA,QAAA,EAAA,mwIAAA,EAAA,MAAA,EAAA,CAAA,upEAAA,CAAA,EAAA;;;AEjBL;;AAEG;;;;"}
@@ -32,14 +32,14 @@ class TuiBarSet {
32
32
  : Math.abs(value.reduce((a, b) => (a < b ? a : b), 0));
33
33
  }
34
34
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiBarSet, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
35
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiBarSet, isStandalone: true, selector: "tui-bar-set", inputs: { value: "value", size: "size", collapsed: "collapsed" }, ngImport: i0, template: "@if (size) {\n @for (item of computedValue; track item) {\n <ng-container\n [ngTemplateOutlet]=\"bar\"\n [ngTemplateOutletContext]=\"{$implicit: item, index: $index, flexible: false}\"\n />\n }\n} @else {\n @for (item of computedValue; track item) {\n <div class=\"t-wrapper\">\n <ng-container\n [ngTemplateOutlet]=\"bar\"\n [ngTemplateOutletContext]=\"{$implicit: item, index: $index, flexible: true}\"\n />\n </div>\n }\n}\n<ng-template\n #bar\n let-flexible=\"flexible\"\n let-index=\"index\"\n let-item\n>\n <tui-bar\n automation-id=\"tui-bar-set__bar\"\n class=\"t-bar\"\n [class.t-bar_flexible]=\"flexible\"\n [class.t-bar_negative]=\"item < 0\"\n [size]=\"computedSize\"\n [style.background]=\"`var(--tui-chart-categorical-${index.toString().padStart(2, '0')})`\"\n [style.height.%]=\"getHeight(item)\"\n [value]=\"computedSegments\"\n />\n</ng-template>\n<span class=\"t-label\">\n <ng-content />\n</span>\n", styles: [":host{position:relative;display:flex;block-size:100%;align-items:flex-end;justify-content:center}.t-wrapper{display:flex;flex:1;block-size:100%;align-items:flex-end}.t-wrapper:first-of-type{margin-inline-start:25%}.t-wrapper:last-of-type{margin-inline-end:25%}.t-bar{transform-origin:bottom center}.t-bar_negative{transform:rotate(180deg);opacity:var(--tui-disabled-opacity)}.t-bar.t-bar_flexible{max-inline-size:none;inline-size:75%;margin:0 auto}.t-label{position:absolute;top:-1.5rem;font:var(--tui-font-text-xs);color:var(--tui-text-secondary)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: TuiBar, selector: "tui-bar", inputs: ["value", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
35
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiBarSet, isStandalone: true, selector: "tui-bar-set", inputs: { value: "value", size: "size", collapsed: "collapsed" }, ngImport: i0, template: "@if (size) {\n @for (item of computedValue; track item) {\n <ng-container\n [ngTemplateOutlet]=\"bar\"\n [ngTemplateOutletContext]=\"{$implicit: item, index: $index, flexible: false}\"\n />\n }\n} @else {\n @for (item of computedValue; track item) {\n <div class=\"t-wrapper\">\n <ng-container\n [ngTemplateOutlet]=\"bar\"\n [ngTemplateOutletContext]=\"{$implicit: item, index: $index, flexible: true}\"\n />\n </div>\n }\n}\n<ng-template\n #bar\n let-flexible=\"flexible\"\n let-index=\"index\"\n let-item\n>\n <tui-bar\n automation-id=\"tui-bar-set__bar\"\n class=\"t-bar\"\n [class.t-bar_flexible]=\"flexible\"\n [class.t-bar_negative]=\"item < 0\"\n [size]=\"computedSize\"\n [style.background]=\"`var(--tui-chart-categorical-${index.toString().padStart(2, '0')})`\"\n [style.height.%]=\"getHeight(item)\"\n [value]=\"computedSegments\"\n />\n</ng-template>\n<span class=\"t-label\">\n <ng-content />\n</span>\n", styles: [":host{position:relative;display:flex;block-size:100%;align-items:flex-end;justify-content:center}.t-wrapper{display:flex;flex:1;block-size:100%;align-items:flex-end}.t-wrapper:first-of-type{margin-inline-start:25%}.t-wrapper:last-of-type{margin-inline-end:25%}.t-bar{transform-origin:bottom center}.t-bar_negative{transform:rotate(180deg);opacity:var(--tui-disabled-opacity)}.t-bar.t-bar_flexible{max-inline-size:none;inline-size:75%;margin:0 auto}.t-label{position:absolute;top:-1.5rem;font:var(--tui-font-body-xs);color:var(--tui-text-secondary)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: TuiBar, selector: "tui-bar", inputs: ["value", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
36
36
  }
37
37
  __decorate([
38
38
  tuiPure
39
39
  ], TuiBarSet.prototype, "getLargest", null);
40
40
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiBarSet, decorators: [{
41
41
  type: Component,
42
- args: [{ selector: 'tui-bar-set', imports: [NgTemplateOutlet, TuiBar], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (size) {\n @for (item of computedValue; track item) {\n <ng-container\n [ngTemplateOutlet]=\"bar\"\n [ngTemplateOutletContext]=\"{$implicit: item, index: $index, flexible: false}\"\n />\n }\n} @else {\n @for (item of computedValue; track item) {\n <div class=\"t-wrapper\">\n <ng-container\n [ngTemplateOutlet]=\"bar\"\n [ngTemplateOutletContext]=\"{$implicit: item, index: $index, flexible: true}\"\n />\n </div>\n }\n}\n<ng-template\n #bar\n let-flexible=\"flexible\"\n let-index=\"index\"\n let-item\n>\n <tui-bar\n automation-id=\"tui-bar-set__bar\"\n class=\"t-bar\"\n [class.t-bar_flexible]=\"flexible\"\n [class.t-bar_negative]=\"item < 0\"\n [size]=\"computedSize\"\n [style.background]=\"`var(--tui-chart-categorical-${index.toString().padStart(2, '0')})`\"\n [style.height.%]=\"getHeight(item)\"\n [value]=\"computedSegments\"\n />\n</ng-template>\n<span class=\"t-label\">\n <ng-content />\n</span>\n", styles: [":host{position:relative;display:flex;block-size:100%;align-items:flex-end;justify-content:center}.t-wrapper{display:flex;flex:1;block-size:100%;align-items:flex-end}.t-wrapper:first-of-type{margin-inline-start:25%}.t-wrapper:last-of-type{margin-inline-end:25%}.t-bar{transform-origin:bottom center}.t-bar_negative{transform:rotate(180deg);opacity:var(--tui-disabled-opacity)}.t-bar.t-bar_flexible{max-inline-size:none;inline-size:75%;margin:0 auto}.t-label{position:absolute;top:-1.5rem;font:var(--tui-font-text-xs);color:var(--tui-text-secondary)}\n"] }]
42
+ args: [{ selector: 'tui-bar-set', imports: [NgTemplateOutlet, TuiBar], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (size) {\n @for (item of computedValue; track item) {\n <ng-container\n [ngTemplateOutlet]=\"bar\"\n [ngTemplateOutletContext]=\"{$implicit: item, index: $index, flexible: false}\"\n />\n }\n} @else {\n @for (item of computedValue; track item) {\n <div class=\"t-wrapper\">\n <ng-container\n [ngTemplateOutlet]=\"bar\"\n [ngTemplateOutletContext]=\"{$implicit: item, index: $index, flexible: true}\"\n />\n </div>\n }\n}\n<ng-template\n #bar\n let-flexible=\"flexible\"\n let-index=\"index\"\n let-item\n>\n <tui-bar\n automation-id=\"tui-bar-set__bar\"\n class=\"t-bar\"\n [class.t-bar_flexible]=\"flexible\"\n [class.t-bar_negative]=\"item < 0\"\n [size]=\"computedSize\"\n [style.background]=\"`var(--tui-chart-categorical-${index.toString().padStart(2, '0')})`\"\n [style.height.%]=\"getHeight(item)\"\n [value]=\"computedSegments\"\n />\n</ng-template>\n<span class=\"t-label\">\n <ng-content />\n</span>\n", styles: [":host{position:relative;display:flex;block-size:100%;align-items:flex-end;justify-content:center}.t-wrapper{display:flex;flex:1;block-size:100%;align-items:flex-end}.t-wrapper:first-of-type{margin-inline-start:25%}.t-wrapper:last-of-type{margin-inline-end:25%}.t-bar{transform-origin:bottom center}.t-bar_negative{transform:rotate(180deg);opacity:var(--tui-disabled-opacity)}.t-bar.t-bar_flexible{max-inline-size:none;inline-size:75%;margin:0 auto}.t-label{position:absolute;top:-1.5rem;font:var(--tui-font-body-xs);color:var(--tui-text-secondary)}\n"] }]
43
43
  }], propDecorators: { value: [{
44
44
  type: Input
45
45
  }], size: [{
@@ -14,7 +14,7 @@ class TuiLegendItem {
14
14
  return this.color === 'var(--tui-background-accent-1)' ? null : this.color;
15
15
  }
16
16
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiLegendItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
17
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: TuiLegendItem, isStandalone: true, selector: "tui-legend-item", inputs: { active: "active", color: "color", text: "text", size: "size", disabled: "disabled" }, host: { properties: { "attr.data-size": "size", "class._disabled": "disabled", "style.--tui-background-accent-1": "computedColor" } }, ngImport: i0, template: "<button\n appearance=\"outline-grayscale\"\n size=\"s\"\n tuiButton\n type=\"button\"\n class=\"t-button\"\n [tuiAppearanceState]=\"active ? 'hover' : null\"\n>\n <div class=\"t-wrapper\">\n <ng-content select=\"[tuiCheckbox]\" />\n <span\n class=\"t-dot\"\n [style.backgroundColor]=\"color || 'var(--tui-background-accent-1)'\"\n ></span>\n <span class=\"t-text\">{{ text }}</span>\n <ng-content />\n </div>\n</button>\n", styles: [":host{display:inline-block}.t-button{block-size:2rem;font-weight:700}:host[data-size=m] .t-button{block-size:2.25rem;font:var(--tui-font-text-m);font-weight:700}.t-wrapper{display:flex;align-items:center;pointer-events:none}:host._disabled .t-wrapper{color:var(--tui-text-tertiary)}.t-dot{inline-size:.5rem;block-size:.5rem;border-radius:100%;flex-shrink:0}:host._disabled .t-dot{background:var(--tui-border-normal)}.t-dot:not(:first-child){display:none}.t-text{margin:0 .5rem;font-weight:400}\n"], dependencies: [{ kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
17
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: TuiLegendItem, isStandalone: true, selector: "tui-legend-item", inputs: { active: "active", color: "color", text: "text", size: "size", disabled: "disabled" }, host: { properties: { "attr.data-size": "size", "class._disabled": "disabled", "style.--tui-background-accent-1": "computedColor" } }, ngImport: i0, template: "<button\n appearance=\"outline-grayscale\"\n size=\"s\"\n tuiButton\n type=\"button\"\n class=\"t-button\"\n [tuiAppearanceState]=\"active ? 'hover' : null\"\n>\n <div class=\"t-wrapper\">\n <ng-content select=\"[tuiCheckbox]\" />\n <span\n class=\"t-dot\"\n [style.backgroundColor]=\"color || 'var(--tui-background-accent-1)'\"\n ></span>\n <span class=\"t-text\">{{ text }}</span>\n <ng-content />\n </div>\n</button>\n", styles: [":host{display:inline-block}.t-button{block-size:2rem;font-weight:700}:host[data-size=m] .t-button{block-size:2.25rem;font:var(--tui-font-body-m);font-weight:700}.t-wrapper{display:flex;align-items:center;pointer-events:none}:host._disabled .t-wrapper{color:var(--tui-text-tertiary)}.t-dot{inline-size:.5rem;block-size:.5rem;border-radius:100%;flex-shrink:0}:host._disabled .t-dot{background:var(--tui-border-normal)}.t-dot:not(:first-child){display:none}.t-text{margin:0 .5rem;font-weight:400}\n"], dependencies: [{ kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
18
18
  }
19
19
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiLegendItem, decorators: [{
20
20
  type: Component,
@@ -22,7 +22,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
22
22
  '[attr.data-size]': 'size',
23
23
  '[class._disabled]': 'disabled',
24
24
  '[style.--tui-background-accent-1]': 'computedColor',
25
- }, template: "<button\n appearance=\"outline-grayscale\"\n size=\"s\"\n tuiButton\n type=\"button\"\n class=\"t-button\"\n [tuiAppearanceState]=\"active ? 'hover' : null\"\n>\n <div class=\"t-wrapper\">\n <ng-content select=\"[tuiCheckbox]\" />\n <span\n class=\"t-dot\"\n [style.backgroundColor]=\"color || 'var(--tui-background-accent-1)'\"\n ></span>\n <span class=\"t-text\">{{ text }}</span>\n <ng-content />\n </div>\n</button>\n", styles: [":host{display:inline-block}.t-button{block-size:2rem;font-weight:700}:host[data-size=m] .t-button{block-size:2.25rem;font:var(--tui-font-text-m);font-weight:700}.t-wrapper{display:flex;align-items:center;pointer-events:none}:host._disabled .t-wrapper{color:var(--tui-text-tertiary)}.t-dot{inline-size:.5rem;block-size:.5rem;border-radius:100%;flex-shrink:0}:host._disabled .t-dot{background:var(--tui-border-normal)}.t-dot:not(:first-child){display:none}.t-text{margin:0 .5rem;font-weight:400}\n"] }]
25
+ }, template: "<button\n appearance=\"outline-grayscale\"\n size=\"s\"\n tuiButton\n type=\"button\"\n class=\"t-button\"\n [tuiAppearanceState]=\"active ? 'hover' : null\"\n>\n <div class=\"t-wrapper\">\n <ng-content select=\"[tuiCheckbox]\" />\n <span\n class=\"t-dot\"\n [style.backgroundColor]=\"color || 'var(--tui-background-accent-1)'\"\n ></span>\n <span class=\"t-text\">{{ text }}</span>\n <ng-content />\n </div>\n</button>\n", styles: [":host{display:inline-block}.t-button{block-size:2rem;font-weight:700}:host[data-size=m] .t-button{block-size:2.25rem;font:var(--tui-font-body-m);font-weight:700}.t-wrapper{display:flex;align-items:center;pointer-events:none}:host._disabled .t-wrapper{color:var(--tui-text-tertiary)}.t-dot{inline-size:.5rem;block-size:.5rem;border-radius:100%;flex-shrink:0}:host._disabled .t-dot{background:var(--tui-border-normal)}.t-dot:not(:first-child){display:none}.t-text{margin:0 .5rem;font-weight:400}\n"] }]
26
26
  }], propDecorators: { active: [{
27
27
  type: Input
28
28
  }], color: [{
@@ -204,7 +204,7 @@ class TuiLineChart {
204
204
  : this.getX(index + 1) - this.getX(index);
205
205
  }
206
206
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiLineChart, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
207
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiLineChart, isStandalone: true, selector: "tui-line-chart", inputs: { x: "x", y: "y", width: "width", height: "height", smoothingFactor: "smoothingFactor", xStringify: "xStringify", yStringify: "yStringify", filled: "filled", dots: "dots", valueSetter: ["value", "valueSetter"] }, host: { listeners: { "mouseleave": "onMouseLeave()" } }, providers: [ResizeObserverService], viewQueries: [{ propertyName: "drivers", predicate: TuiHintHover, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "@let hovered = hovered$ | async;\n\n<svg\n focusable=\"false\"\n height=\"100%\"\n preserveAspectRatio=\"none\"\n width=\"100%\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-svg\"\n [attr.viewBox]=\"viewBox()\"\n>\n <defs>\n <linearGradient\n x1=\"0\"\n x2=\"0\"\n y1=\"1\"\n y2=\"0\"\n [attr.id]=\"fillId\"\n >\n <stop\n offset=\"0%\"\n stop-color=\"currentColor\"\n stop-opacity=\"0.5\"\n />\n <stop\n offset=\"100%\"\n stop-color=\"currentColor\"\n stop-opacity=\"0\"\n />\n </linearGradient>\n </defs>\n <path\n stroke=\"none\"\n [attr.d]=\"fillD\"\n [attr.fill]=\"fill\"\n />\n <path\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n vector-effect=\"non-scaling-stroke\"\n [attr.d]=\"d\"\n />\n</svg>\n@if (dots) {\n @for (point of value; track point) {\n <div\n class=\"t-dot\"\n [style.inset-block-end.%]=\"getBottom(point[1])\"\n [style.inset-inline-start.%]=\"getLeft(point[0])\"\n ></div>\n }\n}\n@if (hasHints) {\n @for (point of value; track point) {\n <!-- TODO: Fix hint type -->\n @if ($count > 1 || dots) {\n <div\n class=\"t-column\"\n [class.t-column_hint_hovered]=\"drivers()[$index] | async\"\n [class.t-column_hovered]=\"hovered === $index\"\n [style.inset-inline-start.%]=\"getLeft(getX($index))\"\n [style.width.%]=\"getWidth($index)\"\n [tuiHint]=\"$any(hintDirective?.hint || hintContent)\"\n [tuiHintContext]=\"{$implicit: getImplicit(point), index: $index}\"\n [tuiHintDescribe]=\"isFocusable ? getHintId($index) : null\"\n [tuiHintHost]=\"hintHost\"\n (mouseenter)=\"onMouseEnter($index)\"\n >\n <div\n class=\"t-line t-line_vertical\"\n [style.inset-inline-start.%]=\"getOffset($index)\"\n ></div>\n <div\n #hintHost\n class=\"t-host\"\n [id]=\"getHintId($index)\"\n [style.inset-block-end.%]=\"getBottom(point[1])\"\n [style.inset-inline-start.%]=\"getOffset($index)\"\n [tabIndex]=\"isFocusable ? 0 : -1\"\n ></div>\n </div>\n }\n @if (isFocusable) {\n <div\n class=\"t-line t-line_horizontal\"\n [style.inset-block-end.%]=\"getBottom(point[1])\"\n ></div>\n }\n }\n}\n@if (getHovered(hovered); as point) {\n @if (xStringify) {\n <div\n class=\"t-hint t-hint_x\"\n [style.inset-inline-start.%]=\"getLeft(point[0])\"\n >\n {{ xStringify(point[0]) }}\n </div>\n }\n @if (yStringify) {\n <div\n class=\"t-hint t-hint_y\"\n [style.inset-block-end.%]=\"getBottom(point[1])\"\n >\n {{ yStringify(point[1]) }}\n </div>\n }\n}\n", styles: [":host{display:flex;inline-size:100%;block-size:100%;pointer-events:none}.t-svg{block-size:calc(100% + 1px);transform:scaleY(-1);margin:-.03125rem 0}.t-column{position:absolute;top:0;block-size:100%;pointer-events:auto}.t-dot{position:absolute;inline-size:.375rem;block-size:.375rem;border-radius:100%;background:currentColor;margin:-.1875rem;box-shadow:0 0 0 2px #fff}.t-host{position:absolute;left:50%;inline-size:.5rem;block-size:.5rem;border-radius:100%;opacity:0;background:#fff;margin:-.25rem;box-shadow:0 0 0 2px currentColor,0 .0625rem .1875rem .125rem #0000001a;outline:none;pointer-events:none}.t-host:focus,.t-column_hovered .t-host,.t-column:hover .t-host,.t-column_hint_hovered .t-host{opacity:1}.t-line{position:absolute;opacity:0;background:var(--tui-border-normal)}.t-line_vertical{top:0;bottom:0;left:50%;inline-size:1px}.t-line_horizontal{z-index:-1;inline-size:100%;block-size:1px}:host[style^=\"z-index: 0\"] .t-column_hovered .t-line,:host:not([style]) .t-column:hover .t-line,:host:not([style]) .t-column_hint_hovered .t-line,:host[style^=\"z-index: 0\"] .t-column_hovered+.t-line,:host:not([style]) .t-column:hover+.t-line,:host:not([style]) .t-column_hint_hovered+.t-line{opacity:1}.t-hint{position:absolute;box-shadow:var(--tui-shadow-small);font:var(--tui-font-text-xs);block-size:1.25rem;line-height:1.25rem;margin-block-end:-.625rem;padding:0 .375rem;white-space:nowrap;color:var(--tui-text-primary);background:var(--tui-background-base);transform:translate3d(-50%,0,0)}.t-hint_x{bottom:0}.t-hint_y{left:0}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: i1.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHint", "tuiHintContext", "tuiHintAppearance"], outputs: ["tuiHintVisible"] }, { kind: "directive", type: i1.TuiHintDescribe, selector: "[tuiHintDescribe]", inputs: ["tuiHintDescribe"] }, { kind: "directive", type: i1.TuiHintHost, selector: "[tuiHint][tuiHintHost]", inputs: ["tuiHintHost"] }], viewProviders: [tuiHintOptionsProvider({ direction: 'top', hideDelay: 0 })], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
207
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiLineChart, isStandalone: true, selector: "tui-line-chart", inputs: { x: "x", y: "y", width: "width", height: "height", smoothingFactor: "smoothingFactor", xStringify: "xStringify", yStringify: "yStringify", filled: "filled", dots: "dots", valueSetter: ["value", "valueSetter"] }, host: { listeners: { "mouseleave": "onMouseLeave()" } }, providers: [ResizeObserverService], viewQueries: [{ propertyName: "drivers", predicate: TuiHintHover, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "@let hovered = hovered$ | async;\n\n<svg\n focusable=\"false\"\n height=\"100%\"\n preserveAspectRatio=\"none\"\n width=\"100%\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-svg\"\n [attr.viewBox]=\"viewBox()\"\n>\n <defs>\n <linearGradient\n x1=\"0\"\n x2=\"0\"\n y1=\"1\"\n y2=\"0\"\n [attr.id]=\"fillId\"\n >\n <stop\n offset=\"0%\"\n stop-color=\"currentColor\"\n stop-opacity=\"0.5\"\n />\n <stop\n offset=\"100%\"\n stop-color=\"currentColor\"\n stop-opacity=\"0\"\n />\n </linearGradient>\n </defs>\n <path\n stroke=\"none\"\n [attr.d]=\"fillD\"\n [attr.fill]=\"fill\"\n />\n <path\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n vector-effect=\"non-scaling-stroke\"\n [attr.d]=\"d\"\n />\n</svg>\n@if (dots) {\n @for (point of value; track point) {\n <div\n class=\"t-dot\"\n [style.inset-block-end.%]=\"getBottom(point[1])\"\n [style.inset-inline-start.%]=\"getLeft(point[0])\"\n ></div>\n }\n}\n@if (hasHints) {\n @for (point of value; track point) {\n <!-- TODO: Fix hint type -->\n @if ($count > 1 || dots) {\n <div\n class=\"t-column\"\n [class.t-column_hint_hovered]=\"drivers()[$index] | async\"\n [class.t-column_hovered]=\"hovered === $index\"\n [style.inset-inline-start.%]=\"getLeft(getX($index))\"\n [style.width.%]=\"getWidth($index)\"\n [tuiHint]=\"$any(hintDirective?.hint || hintContent)\"\n [tuiHintContext]=\"{$implicit: getImplicit(point), index: $index}\"\n [tuiHintDescribe]=\"isFocusable ? getHintId($index) : null\"\n [tuiHintHost]=\"hintHost\"\n (mouseenter)=\"onMouseEnter($index)\"\n >\n <div\n class=\"t-line t-line_vertical\"\n [style.inset-inline-start.%]=\"getOffset($index)\"\n ></div>\n <div\n #hintHost\n class=\"t-host\"\n [id]=\"getHintId($index)\"\n [style.inset-block-end.%]=\"getBottom(point[1])\"\n [style.inset-inline-start.%]=\"getOffset($index)\"\n [tabIndex]=\"isFocusable ? 0 : -1\"\n ></div>\n </div>\n }\n @if (isFocusable) {\n <div\n class=\"t-line t-line_horizontal\"\n [style.inset-block-end.%]=\"getBottom(point[1])\"\n ></div>\n }\n }\n}\n@if (getHovered(hovered); as point) {\n @if (xStringify) {\n <div\n class=\"t-hint t-hint_x\"\n [style.inset-inline-start.%]=\"getLeft(point[0])\"\n >\n {{ xStringify(point[0]) }}\n </div>\n }\n @if (yStringify) {\n <div\n class=\"t-hint t-hint_y\"\n [style.inset-block-end.%]=\"getBottom(point[1])\"\n >\n {{ yStringify(point[1]) }}\n </div>\n }\n}\n", styles: [":host{display:flex;inline-size:100%;block-size:100%;pointer-events:none}.t-svg{block-size:calc(100% + 1px);transform:scaleY(-1);margin:-.03125rem 0}.t-column{position:absolute;top:0;block-size:100%;pointer-events:auto}.t-dot{position:absolute;inline-size:.375rem;block-size:.375rem;border-radius:100%;background:currentColor;margin:-.1875rem;box-shadow:0 0 0 2px #fff}.t-host{position:absolute;left:50%;inline-size:.5rem;block-size:.5rem;border-radius:100%;opacity:0;background:#fff;margin:-.25rem;box-shadow:0 0 0 2px currentColor,0 .0625rem .1875rem .125rem #0000001a;outline:none;pointer-events:none}.t-host:focus,.t-column_hovered .t-host,.t-column:hover .t-host,.t-column_hint_hovered .t-host{opacity:1}.t-line{position:absolute;opacity:0;background:var(--tui-border-normal)}.t-line_vertical{top:0;bottom:0;left:50%;inline-size:1px}.t-line_horizontal{z-index:-1;inline-size:100%;block-size:1px}:host[style^=\"z-index: 0\"] .t-column_hovered .t-line,:host:not([style]) .t-column:hover .t-line,:host:not([style]) .t-column_hint_hovered .t-line,:host[style^=\"z-index: 0\"] .t-column_hovered+.t-line,:host:not([style]) .t-column:hover+.t-line,:host:not([style]) .t-column_hint_hovered+.t-line{opacity:1}.t-hint{position:absolute;box-shadow:var(--tui-shadow-small);font:var(--tui-font-body-xs);block-size:1.25rem;line-height:1.25rem;margin-block-end:-.625rem;padding:0 .375rem;white-space:nowrap;color:var(--tui-text-primary);background:var(--tui-background-base);transform:translate3d(-50%,0,0)}.t-hint_x{bottom:0}.t-hint_y{left:0}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: i1.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHint", "tuiHintContext", "tuiHintAppearance"], outputs: ["tuiHintVisible"] }, { kind: "directive", type: i1.TuiHintDescribe, selector: "[tuiHintDescribe]", inputs: ["tuiHintDescribe"] }, { kind: "directive", type: i1.TuiHintHost, selector: "[tuiHint][tuiHintHost]", inputs: ["tuiHintHost"] }], viewProviders: [tuiHintOptionsProvider({ direction: 'top', hideDelay: 0 })], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
208
208
  }
209
209
  __decorate([
210
210
  tuiPure
@@ -216,7 +216,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
216
216
  type: Component,
217
217
  args: [{ selector: 'tui-line-chart', imports: [AsyncPipe, TuiHint], changeDetection: ChangeDetectionStrategy.OnPush, providers: [ResizeObserverService], viewProviders: [tuiHintOptionsProvider({ direction: 'top', hideDelay: 0 })], host: {
218
218
  '(mouseleave)': 'onMouseLeave()',
219
- }, template: "@let hovered = hovered$ | async;\n\n<svg\n focusable=\"false\"\n height=\"100%\"\n preserveAspectRatio=\"none\"\n width=\"100%\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-svg\"\n [attr.viewBox]=\"viewBox()\"\n>\n <defs>\n <linearGradient\n x1=\"0\"\n x2=\"0\"\n y1=\"1\"\n y2=\"0\"\n [attr.id]=\"fillId\"\n >\n <stop\n offset=\"0%\"\n stop-color=\"currentColor\"\n stop-opacity=\"0.5\"\n />\n <stop\n offset=\"100%\"\n stop-color=\"currentColor\"\n stop-opacity=\"0\"\n />\n </linearGradient>\n </defs>\n <path\n stroke=\"none\"\n [attr.d]=\"fillD\"\n [attr.fill]=\"fill\"\n />\n <path\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n vector-effect=\"non-scaling-stroke\"\n [attr.d]=\"d\"\n />\n</svg>\n@if (dots) {\n @for (point of value; track point) {\n <div\n class=\"t-dot\"\n [style.inset-block-end.%]=\"getBottom(point[1])\"\n [style.inset-inline-start.%]=\"getLeft(point[0])\"\n ></div>\n }\n}\n@if (hasHints) {\n @for (point of value; track point) {\n <!-- TODO: Fix hint type -->\n @if ($count > 1 || dots) {\n <div\n class=\"t-column\"\n [class.t-column_hint_hovered]=\"drivers()[$index] | async\"\n [class.t-column_hovered]=\"hovered === $index\"\n [style.inset-inline-start.%]=\"getLeft(getX($index))\"\n [style.width.%]=\"getWidth($index)\"\n [tuiHint]=\"$any(hintDirective?.hint || hintContent)\"\n [tuiHintContext]=\"{$implicit: getImplicit(point), index: $index}\"\n [tuiHintDescribe]=\"isFocusable ? getHintId($index) : null\"\n [tuiHintHost]=\"hintHost\"\n (mouseenter)=\"onMouseEnter($index)\"\n >\n <div\n class=\"t-line t-line_vertical\"\n [style.inset-inline-start.%]=\"getOffset($index)\"\n ></div>\n <div\n #hintHost\n class=\"t-host\"\n [id]=\"getHintId($index)\"\n [style.inset-block-end.%]=\"getBottom(point[1])\"\n [style.inset-inline-start.%]=\"getOffset($index)\"\n [tabIndex]=\"isFocusable ? 0 : -1\"\n ></div>\n </div>\n }\n @if (isFocusable) {\n <div\n class=\"t-line t-line_horizontal\"\n [style.inset-block-end.%]=\"getBottom(point[1])\"\n ></div>\n }\n }\n}\n@if (getHovered(hovered); as point) {\n @if (xStringify) {\n <div\n class=\"t-hint t-hint_x\"\n [style.inset-inline-start.%]=\"getLeft(point[0])\"\n >\n {{ xStringify(point[0]) }}\n </div>\n }\n @if (yStringify) {\n <div\n class=\"t-hint t-hint_y\"\n [style.inset-block-end.%]=\"getBottom(point[1])\"\n >\n {{ yStringify(point[1]) }}\n </div>\n }\n}\n", styles: [":host{display:flex;inline-size:100%;block-size:100%;pointer-events:none}.t-svg{block-size:calc(100% + 1px);transform:scaleY(-1);margin:-.03125rem 0}.t-column{position:absolute;top:0;block-size:100%;pointer-events:auto}.t-dot{position:absolute;inline-size:.375rem;block-size:.375rem;border-radius:100%;background:currentColor;margin:-.1875rem;box-shadow:0 0 0 2px #fff}.t-host{position:absolute;left:50%;inline-size:.5rem;block-size:.5rem;border-radius:100%;opacity:0;background:#fff;margin:-.25rem;box-shadow:0 0 0 2px currentColor,0 .0625rem .1875rem .125rem #0000001a;outline:none;pointer-events:none}.t-host:focus,.t-column_hovered .t-host,.t-column:hover .t-host,.t-column_hint_hovered .t-host{opacity:1}.t-line{position:absolute;opacity:0;background:var(--tui-border-normal)}.t-line_vertical{top:0;bottom:0;left:50%;inline-size:1px}.t-line_horizontal{z-index:-1;inline-size:100%;block-size:1px}:host[style^=\"z-index: 0\"] .t-column_hovered .t-line,:host:not([style]) .t-column:hover .t-line,:host:not([style]) .t-column_hint_hovered .t-line,:host[style^=\"z-index: 0\"] .t-column_hovered+.t-line,:host:not([style]) .t-column:hover+.t-line,:host:not([style]) .t-column_hint_hovered+.t-line{opacity:1}.t-hint{position:absolute;box-shadow:var(--tui-shadow-small);font:var(--tui-font-text-xs);block-size:1.25rem;line-height:1.25rem;margin-block-end:-.625rem;padding:0 .375rem;white-space:nowrap;color:var(--tui-text-primary);background:var(--tui-background-base);transform:translate3d(-50%,0,0)}.t-hint_x{bottom:0}.t-hint_y{left:0}\n"] }]
219
+ }, template: "@let hovered = hovered$ | async;\n\n<svg\n focusable=\"false\"\n height=\"100%\"\n preserveAspectRatio=\"none\"\n width=\"100%\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-svg\"\n [attr.viewBox]=\"viewBox()\"\n>\n <defs>\n <linearGradient\n x1=\"0\"\n x2=\"0\"\n y1=\"1\"\n y2=\"0\"\n [attr.id]=\"fillId\"\n >\n <stop\n offset=\"0%\"\n stop-color=\"currentColor\"\n stop-opacity=\"0.5\"\n />\n <stop\n offset=\"100%\"\n stop-color=\"currentColor\"\n stop-opacity=\"0\"\n />\n </linearGradient>\n </defs>\n <path\n stroke=\"none\"\n [attr.d]=\"fillD\"\n [attr.fill]=\"fill\"\n />\n <path\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n vector-effect=\"non-scaling-stroke\"\n [attr.d]=\"d\"\n />\n</svg>\n@if (dots) {\n @for (point of value; track point) {\n <div\n class=\"t-dot\"\n [style.inset-block-end.%]=\"getBottom(point[1])\"\n [style.inset-inline-start.%]=\"getLeft(point[0])\"\n ></div>\n }\n}\n@if (hasHints) {\n @for (point of value; track point) {\n <!-- TODO: Fix hint type -->\n @if ($count > 1 || dots) {\n <div\n class=\"t-column\"\n [class.t-column_hint_hovered]=\"drivers()[$index] | async\"\n [class.t-column_hovered]=\"hovered === $index\"\n [style.inset-inline-start.%]=\"getLeft(getX($index))\"\n [style.width.%]=\"getWidth($index)\"\n [tuiHint]=\"$any(hintDirective?.hint || hintContent)\"\n [tuiHintContext]=\"{$implicit: getImplicit(point), index: $index}\"\n [tuiHintDescribe]=\"isFocusable ? getHintId($index) : null\"\n [tuiHintHost]=\"hintHost\"\n (mouseenter)=\"onMouseEnter($index)\"\n >\n <div\n class=\"t-line t-line_vertical\"\n [style.inset-inline-start.%]=\"getOffset($index)\"\n ></div>\n <div\n #hintHost\n class=\"t-host\"\n [id]=\"getHintId($index)\"\n [style.inset-block-end.%]=\"getBottom(point[1])\"\n [style.inset-inline-start.%]=\"getOffset($index)\"\n [tabIndex]=\"isFocusable ? 0 : -1\"\n ></div>\n </div>\n }\n @if (isFocusable) {\n <div\n class=\"t-line t-line_horizontal\"\n [style.inset-block-end.%]=\"getBottom(point[1])\"\n ></div>\n }\n }\n}\n@if (getHovered(hovered); as point) {\n @if (xStringify) {\n <div\n class=\"t-hint t-hint_x\"\n [style.inset-inline-start.%]=\"getLeft(point[0])\"\n >\n {{ xStringify(point[0]) }}\n </div>\n }\n @if (yStringify) {\n <div\n class=\"t-hint t-hint_y\"\n [style.inset-block-end.%]=\"getBottom(point[1])\"\n >\n {{ yStringify(point[1]) }}\n </div>\n }\n}\n", styles: [":host{display:flex;inline-size:100%;block-size:100%;pointer-events:none}.t-svg{block-size:calc(100% + 1px);transform:scaleY(-1);margin:-.03125rem 0}.t-column{position:absolute;top:0;block-size:100%;pointer-events:auto}.t-dot{position:absolute;inline-size:.375rem;block-size:.375rem;border-radius:100%;background:currentColor;margin:-.1875rem;box-shadow:0 0 0 2px #fff}.t-host{position:absolute;left:50%;inline-size:.5rem;block-size:.5rem;border-radius:100%;opacity:0;background:#fff;margin:-.25rem;box-shadow:0 0 0 2px currentColor,0 .0625rem .1875rem .125rem #0000001a;outline:none;pointer-events:none}.t-host:focus,.t-column_hovered .t-host,.t-column:hover .t-host,.t-column_hint_hovered .t-host{opacity:1}.t-line{position:absolute;opacity:0;background:var(--tui-border-normal)}.t-line_vertical{top:0;bottom:0;left:50%;inline-size:1px}.t-line_horizontal{z-index:-1;inline-size:100%;block-size:1px}:host[style^=\"z-index: 0\"] .t-column_hovered .t-line,:host:not([style]) .t-column:hover .t-line,:host:not([style]) .t-column_hint_hovered .t-line,:host[style^=\"z-index: 0\"] .t-column_hovered+.t-line,:host:not([style]) .t-column:hover+.t-line,:host:not([style]) .t-column_hint_hovered+.t-line{opacity:1}.t-hint{position:absolute;box-shadow:var(--tui-shadow-small);font:var(--tui-font-body-xs);block-size:1.25rem;line-height:1.25rem;margin-block-end:-.625rem;padding:0 .375rem;white-space:nowrap;color:var(--tui-text-primary);background:var(--tui-background-base);transform:translate3d(-50%,0,0)}.t-hint_x{bottom:0}.t-hint_y{left:0}\n"] }]
220
220
  }], propDecorators: { x: [{
221
221
  type: Input
222
222
  }], y: [{
@@ -20,13 +20,13 @@ class TuiRingChart {
20
20
  this.activeItemIndexChange.next(index);
21
21
  }
22
22
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiRingChart, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
23
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: TuiRingChart, isStandalone: true, selector: "tui-ring-chart", inputs: { value: "value", size: "size", activeItemIndex: "activeItemIndex" }, outputs: { activeItemIndexChange: "activeItemIndexChange" }, host: { properties: { "attr.data-size": "size" } }, ngImport: i0, template: "<div class=\"t-content\">\n <div class=\"t-wrapper\">\n <ng-content />\n </div>\n</div>\n\n<tui-pie-chart\n class=\"t-chart\"\n [activeItemIndex]=\"activeItemIndex\"\n [masked]=\"true\"\n [size]=\"size\"\n [value]=\"value\"\n (activeItemIndexChange)=\"onActiveItemIndexChange($event)\"\n/>\n\n<div class=\"t-shield\"></div>\n", styles: [":host{position:relative;display:block;inline-size:var(--t-size);block-size:var(--t-size);flex-shrink:0;border-radius:100%}:host[data-size=xs]{--t-size: 3rem}:host[data-size=s]{--t-size: 4rem}:host[data-size=m]{--t-size: 9rem}:host[data-size=l]{--t-size: 11rem}:host[data-size=xl]{--t-size: 16rem}.t-content{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex;font:var(--tui-font-text-m);max-block-size:100%;flex-direction:column;justify-content:center;text-align:center;padding:1.5rem;border-radius:100%;box-sizing:border-box;overflow:hidden;word-break:break-word;white-space:pre-wrap;color:var(--tui-text-secondary)}:host[data-size=m] .t-content{font:var(--tui-font-text-xs)}.t-wrapper:first-line{color:var(--tui-text-primary)}:host[data-size=l] .t-wrapper:first-line{font:var(--tui-font-text-l);font-weight:700}:host[data-size=m] .t-wrapper:first-line{font:var(--tui-font-text-m);font-weight:700}.t-shield{position:absolute;inset:25%;border-radius:100%}.t-chart{inline-size:100%;block-size:100%}\n"], dependencies: [{ kind: "component", type: TuiPieChart, selector: "tui-pie-chart", inputs: ["value", "size", "masked", "activeItemIndex"], outputs: ["activeItemIndexChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
23
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: TuiRingChart, isStandalone: true, selector: "tui-ring-chart", inputs: { value: "value", size: "size", activeItemIndex: "activeItemIndex" }, outputs: { activeItemIndexChange: "activeItemIndexChange" }, host: { properties: { "attr.data-size": "size" } }, ngImport: i0, template: "<div class=\"t-content\">\n <div class=\"t-wrapper\">\n <ng-content />\n </div>\n</div>\n\n<tui-pie-chart\n class=\"t-chart\"\n [activeItemIndex]=\"activeItemIndex\"\n [masked]=\"true\"\n [size]=\"size\"\n [value]=\"value\"\n (activeItemIndexChange)=\"onActiveItemIndexChange($event)\"\n/>\n\n<div class=\"t-shield\"></div>\n", styles: [":host{position:relative;display:block;inline-size:var(--t-size);block-size:var(--t-size);flex-shrink:0;border-radius:100%}:host[data-size=xs]{--t-size: 3rem}:host[data-size=s]{--t-size: 4rem}:host[data-size=m]{--t-size: 9rem}:host[data-size=l]{--t-size: 11rem}:host[data-size=xl]{--t-size: 16rem}.t-content{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex;font:var(--tui-font-body-m);max-block-size:100%;flex-direction:column;justify-content:center;text-align:center;padding:1.5rem;border-radius:100%;box-sizing:border-box;overflow:hidden;word-break:break-word;white-space:pre-wrap;color:var(--tui-text-secondary)}:host[data-size=m] .t-content{font:var(--tui-font-body-xs)}.t-wrapper:first-line{color:var(--tui-text-primary)}:host[data-size=l] .t-wrapper:first-line{font:var(--tui-font-body-l);font-weight:700}:host[data-size=m] .t-wrapper:first-line{font:var(--tui-font-body-m);font-weight:700}.t-shield{position:absolute;inset:25%;border-radius:100%}.t-chart{inline-size:100%;block-size:100%}\n"], dependencies: [{ kind: "component", type: TuiPieChart, selector: "tui-pie-chart", inputs: ["value", "size", "masked", "activeItemIndex"], outputs: ["activeItemIndexChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
24
24
  }
25
25
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiRingChart, decorators: [{
26
26
  type: Component,
27
27
  args: [{ selector: 'tui-ring-chart', imports: [TuiPieChart], changeDetection: ChangeDetectionStrategy.OnPush, host: {
28
28
  '[attr.data-size]': 'size',
29
- }, template: "<div class=\"t-content\">\n <div class=\"t-wrapper\">\n <ng-content />\n </div>\n</div>\n\n<tui-pie-chart\n class=\"t-chart\"\n [activeItemIndex]=\"activeItemIndex\"\n [masked]=\"true\"\n [size]=\"size\"\n [value]=\"value\"\n (activeItemIndexChange)=\"onActiveItemIndexChange($event)\"\n/>\n\n<div class=\"t-shield\"></div>\n", styles: [":host{position:relative;display:block;inline-size:var(--t-size);block-size:var(--t-size);flex-shrink:0;border-radius:100%}:host[data-size=xs]{--t-size: 3rem}:host[data-size=s]{--t-size: 4rem}:host[data-size=m]{--t-size: 9rem}:host[data-size=l]{--t-size: 11rem}:host[data-size=xl]{--t-size: 16rem}.t-content{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex;font:var(--tui-font-text-m);max-block-size:100%;flex-direction:column;justify-content:center;text-align:center;padding:1.5rem;border-radius:100%;box-sizing:border-box;overflow:hidden;word-break:break-word;white-space:pre-wrap;color:var(--tui-text-secondary)}:host[data-size=m] .t-content{font:var(--tui-font-text-xs)}.t-wrapper:first-line{color:var(--tui-text-primary)}:host[data-size=l] .t-wrapper:first-line{font:var(--tui-font-text-l);font-weight:700}:host[data-size=m] .t-wrapper:first-line{font:var(--tui-font-text-m);font-weight:700}.t-shield{position:absolute;inset:25%;border-radius:100%}.t-chart{inline-size:100%;block-size:100%}\n"] }]
29
+ }, template: "<div class=\"t-content\">\n <div class=\"t-wrapper\">\n <ng-content />\n </div>\n</div>\n\n<tui-pie-chart\n class=\"t-chart\"\n [activeItemIndex]=\"activeItemIndex\"\n [masked]=\"true\"\n [size]=\"size\"\n [value]=\"value\"\n (activeItemIndexChange)=\"onActiveItemIndexChange($event)\"\n/>\n\n<div class=\"t-shield\"></div>\n", styles: [":host{position:relative;display:block;inline-size:var(--t-size);block-size:var(--t-size);flex-shrink:0;border-radius:100%}:host[data-size=xs]{--t-size: 3rem}:host[data-size=s]{--t-size: 4rem}:host[data-size=m]{--t-size: 9rem}:host[data-size=l]{--t-size: 11rem}:host[data-size=xl]{--t-size: 16rem}.t-content{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex;font:var(--tui-font-body-m);max-block-size:100%;flex-direction:column;justify-content:center;text-align:center;padding:1.5rem;border-radius:100%;box-sizing:border-box;overflow:hidden;word-break:break-word;white-space:pre-wrap;color:var(--tui-text-secondary)}:host[data-size=m] .t-content{font:var(--tui-font-body-xs)}.t-wrapper:first-line{color:var(--tui-text-primary)}:host[data-size=l] .t-wrapper:first-line{font:var(--tui-font-body-l);font-weight:700}:host[data-size=m] .t-wrapper:first-line{font:var(--tui-font-body-m);font-weight:700}.t-shield{position:absolute;inset:25%;border-radius:100%}.t-chart{inline-size:100%;block-size:100%}\n"] }]
30
30
  }], propDecorators: { value: [{
31
31
  type: Input
32
32
  }], size: [{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/addon-charts",
3
- "version": "4.52.0-canary.40b6993",
3
+ "version": "4.52.0-canary.49575ff",
4
4
  "description": "Extension package for Taiga UI that adds various charts, graphs and related components.",
5
5
  "keywords": [
6
6
  "angular",
@@ -78,13 +78,13 @@
78
78
  "types": "./components/line-days-chart/index.d.ts",
79
79
  "default": "./fesm2022/taiga-ui-addon-charts-components-line-days-chart.mjs"
80
80
  },
81
- "./components/pie-chart": {
82
- "types": "./components/pie-chart/index.d.ts",
83
- "default": "./fesm2022/taiga-ui-addon-charts-components-pie-chart.mjs"
84
- },
85
81
  "./components/ring-chart": {
86
82
  "types": "./components/ring-chart/index.d.ts",
87
83
  "default": "./fesm2022/taiga-ui-addon-charts-components-ring-chart.mjs"
84
+ },
85
+ "./components/pie-chart": {
86
+ "types": "./components/pie-chart/index.d.ts",
87
+ "default": "./fesm2022/taiga-ui-addon-charts-components-pie-chart.mjs"
88
88
  }
89
89
  },
90
90
  "sideEffects": false,