@weeehaoooz/talos-ui 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/fesm2022/{weeehaoooz-talos-ui-button-button-group.mjs → weeehaoooz-talos-ui-button.mjs} +91 -15
- package/fesm2022/weeehaoooz-talos-ui-button.mjs.map +1 -0
- package/fesm2022/weeehaoooz-talos-ui-data-display.mjs +3110 -0
- package/fesm2022/weeehaoooz-talos-ui-data-display.mjs.map +1 -0
- package/fesm2022/weeehaoooz-talos-ui-data-viz.mjs +2414 -0
- package/fesm2022/weeehaoooz-talos-ui-data-viz.mjs.map +1 -0
- package/fesm2022/weeehaoooz-talos-ui-dropdown.mjs +1039 -0
- package/fesm2022/weeehaoooz-talos-ui-dropdown.mjs.map +1 -0
- package/fesm2022/weeehaoooz-talos-ui-feedback.mjs +2885 -0
- package/fesm2022/weeehaoooz-talos-ui-feedback.mjs.map +1 -0
- package/fesm2022/weeehaoooz-talos-ui-form.mjs +10799 -0
- package/fesm2022/weeehaoooz-talos-ui-form.mjs.map +1 -0
- package/fesm2022/weeehaoooz-talos-ui-layout.mjs +1316 -7
- package/fesm2022/weeehaoooz-talos-ui-layout.mjs.map +1 -1
- package/fesm2022/weeehaoooz-talos-ui-nav.mjs +3 -3
- package/fesm2022/weeehaoooz-talos-ui-nav.mjs.map +1 -1
- package/fesm2022/weeehaoooz-talos-ui.mjs +21592 -16293
- package/fesm2022/weeehaoooz-talos-ui.mjs.map +1 -1
- package/package.json +20 -139
- package/styles/_breadcrumb.scss +16 -0
- package/styles/_button-group.scss +2 -1
- package/styles/_buttons.scss +51 -0
- package/styles/_dropdown.scss +438 -0
- package/styles/_form-controls.scss +13 -0
- package/styles/_progress-bar.scss +43 -0
- package/styles/_skeleton.scss +176 -0
- package/styles/_spinner.scss +58 -0
- package/styles/_variables.scss +33 -0
- package/styles/index.scss +6 -1
- package/types/weeehaoooz-talos-ui-button.d.ts +92 -0
- package/types/weeehaoooz-talos-ui-button.d.ts.map +1 -0
- package/types/weeehaoooz-talos-ui-data-display.d.ts +1018 -0
- package/types/weeehaoooz-talos-ui-data-display.d.ts.map +1 -0
- package/types/weeehaoooz-talos-ui-data-viz.d.ts +839 -0
- package/types/weeehaoooz-talos-ui-data-viz.d.ts.map +1 -0
- package/types/weeehaoooz-talos-ui-dropdown.d.ts +187 -0
- package/types/weeehaoooz-talos-ui-dropdown.d.ts.map +1 -0
- package/types/weeehaoooz-talos-ui-feedback.d.ts +1495 -0
- package/types/weeehaoooz-talos-ui-feedback.d.ts.map +1 -0
- package/types/weeehaoooz-talos-ui-form.d.ts +2639 -0
- package/types/weeehaoooz-talos-ui-form.d.ts.map +1 -0
- package/types/weeehaoooz-talos-ui-layout.d.ts +851 -3
- package/types/weeehaoooz-talos-ui-layout.d.ts.map +1 -1
- package/types/weeehaoooz-talos-ui-nav.d.ts +1 -1
- package/types/weeehaoooz-talos-ui.d.ts +7148 -4629
- package/types/weeehaoooz-talos-ui.d.ts.map +1 -1
- package/fesm2022/weeehaoooz-talos-ui-button-button-group.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-button-button.mjs +0 -94
- package/fesm2022/weeehaoooz-talos-ui-button-button.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-data-display-badge.mjs +0 -233
- package/fesm2022/weeehaoooz-talos-ui-data-display-badge.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-data-display-data-grid.mjs +0 -1627
- package/fesm2022/weeehaoooz-talos-ui-data-display-data-grid.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-data-display-status-tag.mjs +0 -361
- package/fesm2022/weeehaoooz-talos-ui-data-display-status-tag.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-data-display-timeline.mjs +0 -312
- package/fesm2022/weeehaoooz-talos-ui-data-display-timeline.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-data-display-trend-indicator.mjs +0 -235
- package/fesm2022/weeehaoooz-talos-ui-data-display-trend-indicator.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-data-viz-category-bar.mjs +0 -462
- package/fesm2022/weeehaoooz-talos-ui-data-viz-category-bar.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-data-viz-heatmap.mjs +0 -805
- package/fesm2022/weeehaoooz-talos-ui-data-viz-heatmap.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-data-viz-mini-donut.mjs +0 -267
- package/fesm2022/weeehaoooz-talos-ui-data-viz-mini-donut.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-data-viz-mini-gauge.mjs +0 -351
- package/fesm2022/weeehaoooz-talos-ui-data-viz-mini-gauge.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-data-viz-sparkline.mjs +0 -566
- package/fesm2022/weeehaoooz-talos-ui-data-viz-sparkline.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-feedback-alert.mjs +0 -534
- package/fesm2022/weeehaoooz-talos-ui-feedback-alert.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-feedback-dialog.mjs +0 -446
- package/fesm2022/weeehaoooz-talos-ui-feedback-dialog.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-feedback-snackbar.mjs +0 -376
- package/fesm2022/weeehaoooz-talos-ui-feedback-snackbar.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-feedback-tooltip.mjs +0 -147
- package/fesm2022/weeehaoooz-talos-ui-feedback-tooltip.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-form-affix.mjs +0 -242
- package/fesm2022/weeehaoooz-talos-ui-form-affix.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-form-autocomplete.mjs +0 -514
- package/fesm2022/weeehaoooz-talos-ui-form-autocomplete.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-form-checkbox.mjs +0 -548
- package/fesm2022/weeehaoooz-talos-ui-form-checkbox.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-form-chips.mjs +0 -692
- package/fesm2022/weeehaoooz-talos-ui-form-chips.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-form-color-picker.mjs +0 -761
- package/fesm2022/weeehaoooz-talos-ui-form-color-picker.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-form-date-picker.mjs +0 -896
- package/fesm2022/weeehaoooz-talos-ui-form-date-picker.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-form-date-range-picker.mjs +0 -872
- package/fesm2022/weeehaoooz-talos-ui-form-date-range-picker.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-form-date-time-picker.mjs +0 -119
- package/fesm2022/weeehaoooz-talos-ui-form-date-time-picker.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-form-date-time-range-picker.mjs +0 -135
- package/fesm2022/weeehaoooz-talos-ui-form-date-time-range-picker.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-form-drop-zone.mjs +0 -666
- package/fesm2022/weeehaoooz-talos-ui-form-drop-zone.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-form-form-field.mjs +0 -147
- package/fesm2022/weeehaoooz-talos-ui-form-form-field.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-form-input.mjs +0 -33
- package/fesm2022/weeehaoooz-talos-ui-form-input.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-form-otp.mjs +0 -455
- package/fesm2022/weeehaoooz-talos-ui-form-otp.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-form-password-input.mjs +0 -379
- package/fesm2022/weeehaoooz-talos-ui-form-password-input.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-form-radio.mjs +0 -297
- package/fesm2022/weeehaoooz-talos-ui-form-radio.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-form-range-input.mjs +0 -661
- package/fesm2022/weeehaoooz-talos-ui-form-range-input.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-form-rating.mjs +0 -346
- package/fesm2022/weeehaoooz-talos-ui-form-rating.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-form-select-input.mjs +0 -896
- package/fesm2022/weeehaoooz-talos-ui-form-select-input.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-form-slide-toggle.mjs +0 -252
- package/fesm2022/weeehaoooz-talos-ui-form-slide-toggle.mjs.map +0 -1
- package/fesm2022/weeehaoooz-talos-ui-form-transfer-list.mjs +0 -916
- package/fesm2022/weeehaoooz-talos-ui-form-transfer-list.mjs.map +0 -1
- package/types/weeehaoooz-talos-ui-button-button-group.d.ts +0 -62
- package/types/weeehaoooz-talos-ui-button-button-group.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-button-button.d.ts +0 -38
- package/types/weeehaoooz-talos-ui-button-button.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-data-display-badge.d.ts +0 -119
- package/types/weeehaoooz-talos-ui-data-display-badge.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-data-display-data-grid.d.ts +0 -272
- package/types/weeehaoooz-talos-ui-data-display-data-grid.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-data-display-status-tag.d.ts +0 -135
- package/types/weeehaoooz-talos-ui-data-display-status-tag.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-data-display-timeline.d.ts +0 -144
- package/types/weeehaoooz-talos-ui-data-display-timeline.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-data-display-trend-indicator.d.ts +0 -83
- package/types/weeehaoooz-talos-ui-data-display-trend-indicator.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-data-viz-category-bar.d.ts +0 -255
- package/types/weeehaoooz-talos-ui-data-viz-category-bar.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-data-viz-heatmap.d.ts +0 -204
- package/types/weeehaoooz-talos-ui-data-viz-heatmap.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-data-viz-mini-donut.d.ts +0 -101
- package/types/weeehaoooz-talos-ui-data-viz-mini-donut.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-data-viz-mini-gauge.d.ts +0 -138
- package/types/weeehaoooz-talos-ui-data-viz-mini-gauge.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-data-viz-sparkline.d.ts +0 -161
- package/types/weeehaoooz-talos-ui-data-viz-sparkline.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-feedback-alert.d.ts +0 -212
- package/types/weeehaoooz-talos-ui-feedback-alert.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-feedback-dialog.d.ts +0 -259
- package/types/weeehaoooz-talos-ui-feedback-dialog.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-feedback-snackbar.d.ts +0 -147
- package/types/weeehaoooz-talos-ui-feedback-snackbar.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-feedback-tooltip.d.ts +0 -32
- package/types/weeehaoooz-talos-ui-feedback-tooltip.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-form-affix.d.ts +0 -88
- package/types/weeehaoooz-talos-ui-form-affix.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-form-autocomplete.d.ts +0 -113
- package/types/weeehaoooz-talos-ui-form-autocomplete.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-form-checkbox.d.ts +0 -165
- package/types/weeehaoooz-talos-ui-form-checkbox.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-form-chips.d.ts +0 -152
- package/types/weeehaoooz-talos-ui-form-chips.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-form-color-picker.d.ts +0 -144
- package/types/weeehaoooz-talos-ui-form-color-picker.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-form-date-picker.d.ts +0 -138
- package/types/weeehaoooz-talos-ui-form-date-picker.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-form-date-range-picker.d.ts +0 -148
- package/types/weeehaoooz-talos-ui-form-date-range-picker.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-form-date-time-picker.d.ts +0 -44
- package/types/weeehaoooz-talos-ui-form-date-time-picker.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-form-date-time-range-picker.d.ts +0 -48
- package/types/weeehaoooz-talos-ui-form-date-time-range-picker.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-form-drop-zone.d.ts +0 -227
- package/types/weeehaoooz-talos-ui-form-drop-zone.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-form-form-field.d.ts +0 -42
- package/types/weeehaoooz-talos-ui-form-form-field.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-form-input.d.ts +0 -15
- package/types/weeehaoooz-talos-ui-form-input.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-form-otp.d.ts +0 -111
- package/types/weeehaoooz-talos-ui-form-otp.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-form-password-input.d.ts +0 -145
- package/types/weeehaoooz-talos-ui-form-password-input.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-form-radio.d.ts +0 -84
- package/types/weeehaoooz-talos-ui-form-radio.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-form-range-input.d.ts +0 -181
- package/types/weeehaoooz-talos-ui-form-range-input.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-form-rating.d.ts +0 -110
- package/types/weeehaoooz-talos-ui-form-rating.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-form-select-input.d.ts +0 -195
- package/types/weeehaoooz-talos-ui-form-select-input.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-form-slide-toggle.d.ts +0 -79
- package/types/weeehaoooz-talos-ui-form-slide-toggle.d.ts.map +0 -1
- package/types/weeehaoooz-talos-ui-form-transfer-list.d.ts +0 -192
- package/types/weeehaoooz-talos-ui-form-transfer-list.d.ts.map +0 -1
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, computed, Component, NgModule } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Types and interfaces for TalosTrendIndicatorComponent
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
class TalosTrendIndicatorComponent {
|
|
9
|
-
/** Explicit value to display (e.g. 14.2, -5.3, "+12%") */
|
|
10
|
-
value = input(null, /* @ts-ignore */
|
|
11
|
-
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
12
|
-
/** Current value for automatic delta calculation */
|
|
13
|
-
current = input(null, /* @ts-ignore */
|
|
14
|
-
...(ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []));
|
|
15
|
-
/** Previous value for automatic delta calculation */
|
|
16
|
-
previous = input(null, /* @ts-ignore */
|
|
17
|
-
...(ngDevMode ? [{ debugName: "previous" }] : /* istanbul ignore next */ []));
|
|
18
|
-
/** Explicit direction override or 'auto' */
|
|
19
|
-
direction = input('auto', /* @ts-ignore */
|
|
20
|
-
...(ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []));
|
|
21
|
-
/** Explicit status override or 'auto' */
|
|
22
|
-
status = input('auto', /* @ts-ignore */
|
|
23
|
-
...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
|
|
24
|
-
/** Polarity: normal (+ is good), inverse (+ is bad), neutral */
|
|
25
|
-
polarity = input('normal', /* @ts-ignore */
|
|
26
|
-
...(ngDevMode ? [{ debugName: "polarity" }] : /* istanbul ignore next */ []));
|
|
27
|
-
/** Visual variant */
|
|
28
|
-
variant = input('badge', /* @ts-ignore */
|
|
29
|
-
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
30
|
-
/** Layout orientation: horizontal or vertical */
|
|
31
|
-
layout = input('horizontal', /* @ts-ignore */
|
|
32
|
-
...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
|
|
33
|
-
/** Icon shape / style */
|
|
34
|
-
iconType = input('arrow-diagonal', /* @ts-ignore */
|
|
35
|
-
...(ngDevMode ? [{ debugName: "iconType" }] : /* istanbul ignore next */ []));
|
|
36
|
-
/** Size preset */
|
|
37
|
-
size = input('md', /* @ts-ignore */
|
|
38
|
-
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
39
|
-
/** Value formatting mode */
|
|
40
|
-
format = input('percentage', /* @ts-ignore */
|
|
41
|
-
...(ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []));
|
|
42
|
-
/** Prefix string before number */
|
|
43
|
-
prefix = input('', /* @ts-ignore */
|
|
44
|
-
...(ngDevMode ? [{ debugName: "prefix" }] : /* istanbul ignore next */ []));
|
|
45
|
-
/** Suffix string after number (e.g. '%', 'pts') */
|
|
46
|
-
suffix = input('', /* @ts-ignore */
|
|
47
|
-
...(ngDevMode ? [{ debugName: "suffix" }] : /* istanbul ignore next */ []));
|
|
48
|
-
/** Number of decimal places */
|
|
49
|
-
decimals = input(1, /* @ts-ignore */
|
|
50
|
-
...(ngDevMode ? [{ debugName: "decimals" }] : /* istanbul ignore next */ []));
|
|
51
|
-
/** Whether to show '+' / '-' sign */
|
|
52
|
-
showSign = input(true, /* @ts-ignore */
|
|
53
|
-
...(ngDevMode ? [{ debugName: "showSign" }] : /* istanbul ignore next */ []));
|
|
54
|
-
/** Whether to show arrow icon */
|
|
55
|
-
showIcon = input(true, /* @ts-ignore */
|
|
56
|
-
...(ngDevMode ? [{ debugName: "showIcon" }] : /* istanbul ignore next */ []));
|
|
57
|
-
/** Show only the icon without text */
|
|
58
|
-
iconOnly = input(false, /* @ts-ignore */
|
|
59
|
-
...(ngDevMode ? [{ debugName: "iconOnly" }] : /* istanbul ignore next */ []));
|
|
60
|
-
/** Secondary comparison label (e.g. 'vs last month') */
|
|
61
|
-
label = input('', /* @ts-ignore */
|
|
62
|
-
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
63
|
-
/** Currency symbol when format is 'currency' */
|
|
64
|
-
currencySymbol = input('$', /* @ts-ignore */
|
|
65
|
-
...(ngDevMode ? [{ debugName: "currencySymbol" }] : /* istanbul ignore next */ []));
|
|
66
|
-
/** Custom formatter function */
|
|
67
|
-
valueFormatter = input(null, /* @ts-ignore */
|
|
68
|
-
...(ngDevMode ? [{ debugName: "valueFormatter" }] : /* istanbul ignore next */ []));
|
|
69
|
-
/** Accessible label */
|
|
70
|
-
ariaLabel = input(null, /* @ts-ignore */
|
|
71
|
-
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
72
|
-
/** Calculation result */
|
|
73
|
-
calculation = computed(() => {
|
|
74
|
-
const cur = this.current();
|
|
75
|
-
const prev = this.previous();
|
|
76
|
-
const val = this.value();
|
|
77
|
-
const dec = this.decimals();
|
|
78
|
-
let delta = 0;
|
|
79
|
-
let deltaPct = 0;
|
|
80
|
-
let dir = 'flat';
|
|
81
|
-
if (cur !== null && prev !== null) {
|
|
82
|
-
delta = cur - prev;
|
|
83
|
-
deltaPct = prev !== 0 ? ((cur - prev) / Math.abs(prev)) * 100 : cur > 0 ? 100 : cur < 0 ? -100 : 0;
|
|
84
|
-
if (delta > 0.0001)
|
|
85
|
-
dir = 'up';
|
|
86
|
-
else if (delta < -0.0001)
|
|
87
|
-
dir = 'down';
|
|
88
|
-
else
|
|
89
|
-
dir = 'flat';
|
|
90
|
-
}
|
|
91
|
-
else if (typeof val === 'number') {
|
|
92
|
-
delta = val;
|
|
93
|
-
deltaPct = val;
|
|
94
|
-
if (val > 0.0001)
|
|
95
|
-
dir = 'up';
|
|
96
|
-
else if (val < -0.0001)
|
|
97
|
-
dir = 'down';
|
|
98
|
-
else
|
|
99
|
-
dir = 'flat';
|
|
100
|
-
}
|
|
101
|
-
else if (typeof val === 'string') {
|
|
102
|
-
const parsed = parseFloat(val.replace(/[^0-9.-]/g, ''));
|
|
103
|
-
delta = isNaN(parsed) ? 0 : parsed;
|
|
104
|
-
deltaPct = delta;
|
|
105
|
-
if (val.includes('+') || delta > 0.0001)
|
|
106
|
-
dir = 'up';
|
|
107
|
-
else if (val.includes('-') || delta < -0.0001)
|
|
108
|
-
dir = 'down';
|
|
109
|
-
else
|
|
110
|
-
dir = 'flat';
|
|
111
|
-
}
|
|
112
|
-
// Force direction override if specified
|
|
113
|
-
const explicitDir = this.direction();
|
|
114
|
-
if (explicitDir !== 'auto') {
|
|
115
|
-
dir = explicitDir;
|
|
116
|
-
}
|
|
117
|
-
// Determine status (positive / negative / neutral) based on polarity or explicit override
|
|
118
|
-
const explicitStatus = this.status();
|
|
119
|
-
let calculatedStatus = 'neutral';
|
|
120
|
-
if (explicitStatus !== 'auto') {
|
|
121
|
-
calculatedStatus = explicitStatus;
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
const pol = this.polarity();
|
|
125
|
-
if (pol === 'neutral' || dir === 'flat') {
|
|
126
|
-
calculatedStatus = 'neutral';
|
|
127
|
-
}
|
|
128
|
-
else if (pol === 'normal') {
|
|
129
|
-
calculatedStatus = dir === 'up' ? 'positive' : 'negative';
|
|
130
|
-
}
|
|
131
|
-
else if (pol === 'inverse') {
|
|
132
|
-
calculatedStatus = dir === 'up' ? 'negative' : 'positive';
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
// Format text
|
|
136
|
-
let formattedText = '';
|
|
137
|
-
const customFmt = this.valueFormatter();
|
|
138
|
-
if (customFmt) {
|
|
139
|
-
formattedText = customFmt({ delta, deltaPercentage: deltaPct, direction: dir, status: calculatedStatus, formattedText: '' });
|
|
140
|
-
}
|
|
141
|
-
else if (typeof val === 'string' && cur === null) {
|
|
142
|
-
formattedText = val;
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
const sign = this.showSign() ? (dir === 'up' ? '+' : dir === 'down' ? '-' : '') : '';
|
|
146
|
-
const absDelta = Math.abs(delta);
|
|
147
|
-
const absPct = Math.abs(deltaPct);
|
|
148
|
-
const pfx = this.prefix();
|
|
149
|
-
const sfx = this.suffix();
|
|
150
|
-
switch (this.format()) {
|
|
151
|
-
case 'percentage':
|
|
152
|
-
formattedText = `${sign}${pfx}${absPct.toFixed(dec)}%${sfx}`;
|
|
153
|
-
break;
|
|
154
|
-
case 'currency':
|
|
155
|
-
formattedText = `${sign}${this.currencySymbol()}${pfx}${absDelta.toFixed(dec)}${sfx}`;
|
|
156
|
-
break;
|
|
157
|
-
case 'points':
|
|
158
|
-
formattedText = `${sign}${pfx}${absDelta.toFixed(dec)} pts${sfx}`;
|
|
159
|
-
break;
|
|
160
|
-
case 'number':
|
|
161
|
-
default:
|
|
162
|
-
formattedText = `${sign}${pfx}${absDelta.toFixed(dec)}${sfx}`;
|
|
163
|
-
break;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
return {
|
|
167
|
-
delta,
|
|
168
|
-
deltaPercentage: deltaPct,
|
|
169
|
-
direction: dir,
|
|
170
|
-
status: calculatedStatus,
|
|
171
|
-
formattedText
|
|
172
|
-
};
|
|
173
|
-
}, /* @ts-ignore */
|
|
174
|
-
...(ngDevMode ? [{ debugName: "calculation" }] : /* istanbul ignore next */ []));
|
|
175
|
-
computedStatus = computed(() => this.calculation().status, /* @ts-ignore */
|
|
176
|
-
...(ngDevMode ? [{ debugName: "computedStatus" }] : /* istanbul ignore next */ []));
|
|
177
|
-
computedDirection = computed(() => this.calculation().direction, /* @ts-ignore */
|
|
178
|
-
...(ngDevMode ? [{ debugName: "computedDirection" }] : /* istanbul ignore next */ []));
|
|
179
|
-
displayValue = computed(() => this.calculation().formattedText, /* @ts-ignore */
|
|
180
|
-
...(ngDevMode ? [{ debugName: "displayValue" }] : /* istanbul ignore next */ []));
|
|
181
|
-
computedAriaLabel = computed(() => {
|
|
182
|
-
const custom = this.ariaLabel();
|
|
183
|
-
if (custom)
|
|
184
|
-
return custom;
|
|
185
|
-
const calc = this.calculation();
|
|
186
|
-
const dirWord = calc.direction === 'up' ? 'Increased by' : calc.direction === 'down' ? 'Decreased by' : 'No change';
|
|
187
|
-
const labelText = this.label() ? ` (${this.label()})` : '';
|
|
188
|
-
return `Trend: ${dirWord} ${calc.formattedText}${labelText}`;
|
|
189
|
-
}, /* @ts-ignore */
|
|
190
|
-
...(ngDevMode ? [{ debugName: "computedAriaLabel" }] : /* istanbul ignore next */ []));
|
|
191
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: TalosTrendIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
192
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: TalosTrendIndicatorComponent, isStandalone: true, selector: "talos-trend-indicator", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, current: { classPropertyName: "current", publicName: "current", isSignal: true, isRequired: false, transformFunction: null }, previous: { classPropertyName: "previous", publicName: "previous", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, polarity: { classPropertyName: "polarity", publicName: "polarity", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, iconType: { classPropertyName: "iconType", publicName: "iconType", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null }, decimals: { classPropertyName: "decimals", publicName: "decimals", isSignal: true, isRequired: false, transformFunction: null }, showSign: { classPropertyName: "showSign", publicName: "showSign", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, currencySymbol: { classPropertyName: "currencySymbol", publicName: "currencySymbol", isSignal: true, isRequired: false, transformFunction: null }, valueFormatter: { classPropertyName: "valueFormatter", publicName: "valueFormatter", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.talos-trend-badge": "variant() === \"badge\"", "class.talos-trend-subtle": "variant() === \"subtle\"", "class.talos-trend-text": "variant() === \"text\"", "class.talos-trend-bordered": "variant() === \"bordered\"", "class.talos-trend-solid": "variant() === \"solid\"", "class.talos-trend-horizontal": "layout() === \"horizontal\"", "class.talos-trend-vertical": "layout() === \"vertical\"", "class.talos-trend-positive": "computedStatus() === \"positive\"", "class.talos-trend-negative": "computedStatus() === \"negative\"", "class.talos-trend-neutral": "computedStatus() === \"neutral\"", "class.talos-trend-xs": "size() === \"xs\"", "class.talos-trend-sm": "size() === \"sm\"", "class.talos-trend-md": "size() === \"md\"", "class.talos-trend-lg": "size() === \"lg\"", "attr.role": "\"status\"", "attr.aria-label": "computedAriaLabel()" }, classAttribute: "talos-trend-indicator" }, ngImport: i0, template: "<span class=\"talos-trend-main\">\n @if (showIcon()) {\n <span class=\"talos-trend-icon-wrapper\" aria-hidden=\"true\">\n @switch (iconType()) {\n @case ('arrow-vertical') {\n @if (computedDirection() === 'up') {\n <svg class=\"talos-trend-icon talos-trend-icon-up\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M8 12.5V3.5M8 3.5L4.5 7M8 3.5L11.5 7\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n } @else if (computedDirection() === 'down') {\n <svg class=\"talos-trend-icon talos-trend-icon-down\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M8 3.5V12.5M8 12.5L4.5 9M8 12.5L11.5 9\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n } @else {\n <svg class=\"talos-trend-icon talos-trend-icon-flat\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M3.5 8H12.5\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n }\n }\n @case ('chevron') {\n @if (computedDirection() === 'up') {\n <svg class=\"talos-trend-icon talos-trend-icon-up\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M3.5 10L8 5.5L12.5 10\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n } @else if (computedDirection() === 'down') {\n <svg class=\"talos-trend-icon talos-trend-icon-down\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M3.5 6L8 10.5L12.5 6\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n } @else {\n <svg class=\"talos-trend-icon talos-trend-icon-flat\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M3.5 8H12.5\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n }\n }\n @case ('triangle') {\n @if (computedDirection() === 'up') {\n <svg class=\"talos-trend-icon talos-trend-icon-up talos-trend-icon--fill\" viewBox=\"0 0 16 16\" fill=\"currentColor\">\n <path d=\"M8 4.5L13 12H3L8 4.5Z\"/>\n </svg>\n } @else if (computedDirection() === 'down') {\n <svg class=\"talos-trend-icon talos-trend-icon-down talos-trend-icon--fill\" viewBox=\"0 0 16 16\" fill=\"currentColor\">\n <path d=\"M8 11.5L3 4H13L8 11.5Z\"/>\n </svg>\n } @else {\n <svg class=\"talos-trend-icon talos-trend-icon-flat talos-trend-icon--fill\" viewBox=\"0 0 16 16\" fill=\"currentColor\">\n <rect x=\"3.5\" y=\"7\" width=\"9\" height=\"2\" rx=\"1\"/>\n </svg>\n }\n }\n @default {\n @if (computedDirection() === 'up') {\n <svg class=\"talos-trend-icon talos-trend-icon-up\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M4 11.5L11.5 4M11.5 4H6M11.5 4V9.5\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n } @else if (computedDirection() === 'down') {\n <svg class=\"talos-trend-icon talos-trend-icon-down\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M4 4.5L11.5 12M11.5 12H6M11.5 12V6.5\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n } @else {\n <svg class=\"talos-trend-icon talos-trend-icon-flat\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M3.5 8H12.5\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n }\n }\n }\n </span>\n }\n\n @if (!iconOnly()) {\n <span class=\"talos-trend-value\">{{ displayValue() }}</span>\n }\n</span>\n\n@if (label()) {\n <span class=\"talos-trend-label\">{{ label() }}</span>\n}\n\n", styles: [":host{display:inline-flex;vertical-align:middle;box-sizing:border-box;font-family:inherit;font-weight:600;line-height:1;transition:background-color .15s ease,color .15s ease,border-color .15s ease;white-space:nowrap;--_trend-color: #64748b;--_trend-bg: #f1f5f9;--_trend-border: #e2e8f0;--_trend-solid-bg: #64748b;--_trend-solid-text: #ffffff;--_trend-subtle-bg: rgba(100, 116, 139, .1)}:host.talos-trend-positive{--_trend-color: #15803d;--_trend-bg: #dcfce7;--_trend-border: #bbf7d0;--_trend-solid-bg: #16a34a;--_trend-solid-text: #ffffff;--_trend-subtle-bg: rgba(22, 163, 74, .12)}:host.talos-trend-negative{--_trend-color: #b91c1c;--_trend-bg: #fee2e2;--_trend-border: #fecaca;--_trend-solid-bg: #dc2626;--_trend-solid-text: #ffffff;--_trend-subtle-bg: rgba(220, 38, 38, .12)}:host.talos-trend-neutral{--_trend-color: #475569;--_trend-bg: #f1f5f9;--_trend-border: #e2e8f0;--_trend-solid-bg: #64748b;--_trend-solid-text: #ffffff;--_trend-subtle-bg: rgba(100, 116, 139, .1)}:host.talos-trend-horizontal{flex-direction:row;align-items:center;gap:.25rem}:host.talos-trend-horizontal .talos-trend-label{font-weight:400;opacity:.8;margin-left:.125rem}:host.talos-trend-vertical{flex-direction:column;align-items:flex-start;gap:.125rem}:host.talos-trend-vertical .talos-trend-label{font-weight:400;opacity:.75;font-size:.85em}:host .talos-trend-main{display:inline-flex;align-items:center;gap:.25rem;line-height:1}:host .talos-trend-icon-wrapper{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;line-height:1}:host .talos-trend-icon{display:block;width:.875rem;height:.875rem;flex-shrink:0}:host .talos-trend-icon--fill{fill:currentColor}:host .talos-trend-value{letter-spacing:-.01em}:host.talos-trend-xs{font-size:.6875rem}:host.talos-trend-xs .talos-trend-icon{width:.625rem;height:.625rem}:host.talos-trend-xs.talos-trend-badge,:host.talos-trend-xs.talos-trend-subtle,:host.talos-trend-xs.talos-trend-bordered,:host.talos-trend-xs.talos-trend-solid{padding:.125rem .375rem;border-radius:9999px}:host.talos-trend-sm{font-size:.75rem}:host.talos-trend-sm .talos-trend-icon{width:.75rem;height:.75rem}:host.talos-trend-sm.talos-trend-badge,:host.talos-trend-sm.talos-trend-subtle,:host.talos-trend-sm.talos-trend-bordered,:host.talos-trend-sm.talos-trend-solid{padding:.1875rem .5rem;border-radius:9999px}:host.talos-trend-md{font-size:.8125rem}:host.talos-trend-md .talos-trend-icon{width:.875rem;height:.875rem}:host.talos-trend-md.talos-trend-badge,:host.talos-trend-md.talos-trend-subtle,:host.talos-trend-md.talos-trend-bordered,:host.talos-trend-md.talos-trend-solid{padding:.25rem .625rem;border-radius:9999px}:host.talos-trend-lg{font-size:.9375rem}:host.talos-trend-lg .talos-trend-icon{width:1rem;height:1rem}:host.talos-trend-lg.talos-trend-badge,:host.talos-trend-lg.talos-trend-subtle,:host.talos-trend-lg.talos-trend-bordered,:host.talos-trend-lg.talos-trend-solid{padding:.3125rem .75rem;border-radius:9999px}:host.talos-trend-badge{background-color:var(--_trend-bg);color:var(--_trend-color)}:host.talos-trend-subtle{background-color:var(--_trend-subtle-bg);color:var(--_trend-color)}:host.talos-trend-bordered{background-color:var(--_trend-bg);border:1px solid var(--_trend-border);color:var(--_trend-color)}:host.talos-trend-solid{background-color:var(--_trend-solid-bg);color:var(--_trend-solid-text);box-shadow:0 1px 2px #00000014}:host.talos-trend-text{padding:0;background:transparent;color:var(--_trend-color)}:root[data-theme=dark] :host.talos-trend-positive,:root.dark :host.talos-trend-positive,[data-theme=dark] :host.talos-trend-positive,[data-mode=dark] :host.talos-trend-positive,.dark :host.talos-trend-positive,.dark-theme :host.talos-trend-positive{--_trend-color: #4ade80;--_trend-bg: rgba(34, 197, 94, .18);--_trend-border: rgba(74, 222, 128, .3);--_trend-solid-bg: #16a34a;--_trend-solid-text: #ffffff;--_trend-subtle-bg: rgba(34, 197, 94, .12)}:root[data-theme=dark] :host.talos-trend-negative,:root.dark :host.talos-trend-negative,[data-theme=dark] :host.talos-trend-negative,[data-mode=dark] :host.talos-trend-negative,.dark :host.talos-trend-negative,.dark-theme :host.talos-trend-negative{--_trend-color: #f87171;--_trend-bg: rgba(239, 68, 68, .18);--_trend-border: rgba(248, 113, 113, .3);--_trend-solid-bg: #dc2626;--_trend-solid-text: #ffffff;--_trend-subtle-bg: rgba(239, 68, 68, .12)}:root[data-theme=dark] :host.talos-trend-neutral,:root.dark :host.talos-trend-neutral,[data-theme=dark] :host.talos-trend-neutral,[data-mode=dark] :host.talos-trend-neutral,.dark :host.talos-trend-neutral,.dark-theme :host.talos-trend-neutral{--_trend-color: #94a3b8;--_trend-bg: rgba(100, 116, 139, .18);--_trend-border: rgba(148, 163, 184, .25);--_trend-solid-bg: #475569;--_trend-solid-text: #ffffff;--_trend-subtle-bg: rgba(100, 116, 139, .12)}\n"] });
|
|
193
|
-
}
|
|
194
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: TalosTrendIndicatorComponent, decorators: [{
|
|
195
|
-
type: Component,
|
|
196
|
-
args: [{ selector: 'talos-trend-indicator', host: {
|
|
197
|
-
'class': 'talos-trend-indicator',
|
|
198
|
-
'[class.talos-trend-badge]': 'variant() === "badge"',
|
|
199
|
-
'[class.talos-trend-subtle]': 'variant() === "subtle"',
|
|
200
|
-
'[class.talos-trend-text]': 'variant() === "text"',
|
|
201
|
-
'[class.talos-trend-bordered]': 'variant() === "bordered"',
|
|
202
|
-
'[class.talos-trend-solid]': 'variant() === "solid"',
|
|
203
|
-
'[class.talos-trend-horizontal]': 'layout() === "horizontal"',
|
|
204
|
-
'[class.talos-trend-vertical]': 'layout() === "vertical"',
|
|
205
|
-
'[class.talos-trend-positive]': 'computedStatus() === "positive"',
|
|
206
|
-
'[class.talos-trend-negative]': 'computedStatus() === "negative"',
|
|
207
|
-
'[class.talos-trend-neutral]': 'computedStatus() === "neutral"',
|
|
208
|
-
'[class.talos-trend-xs]': 'size() === "xs"',
|
|
209
|
-
'[class.talos-trend-sm]': 'size() === "sm"',
|
|
210
|
-
'[class.talos-trend-md]': 'size() === "md"',
|
|
211
|
-
'[class.talos-trend-lg]': 'size() === "lg"',
|
|
212
|
-
'[attr.role]': '"status"',
|
|
213
|
-
'[attr.aria-label]': 'computedAriaLabel()'
|
|
214
|
-
}, template: "<span class=\"talos-trend-main\">\n @if (showIcon()) {\n <span class=\"talos-trend-icon-wrapper\" aria-hidden=\"true\">\n @switch (iconType()) {\n @case ('arrow-vertical') {\n @if (computedDirection() === 'up') {\n <svg class=\"talos-trend-icon talos-trend-icon-up\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M8 12.5V3.5M8 3.5L4.5 7M8 3.5L11.5 7\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n } @else if (computedDirection() === 'down') {\n <svg class=\"talos-trend-icon talos-trend-icon-down\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M8 3.5V12.5M8 12.5L4.5 9M8 12.5L11.5 9\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n } @else {\n <svg class=\"talos-trend-icon talos-trend-icon-flat\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M3.5 8H12.5\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n }\n }\n @case ('chevron') {\n @if (computedDirection() === 'up') {\n <svg class=\"talos-trend-icon talos-trend-icon-up\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M3.5 10L8 5.5L12.5 10\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n } @else if (computedDirection() === 'down') {\n <svg class=\"talos-trend-icon talos-trend-icon-down\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M3.5 6L8 10.5L12.5 6\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n } @else {\n <svg class=\"talos-trend-icon talos-trend-icon-flat\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M3.5 8H12.5\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n }\n }\n @case ('triangle') {\n @if (computedDirection() === 'up') {\n <svg class=\"talos-trend-icon talos-trend-icon-up talos-trend-icon--fill\" viewBox=\"0 0 16 16\" fill=\"currentColor\">\n <path d=\"M8 4.5L13 12H3L8 4.5Z\"/>\n </svg>\n } @else if (computedDirection() === 'down') {\n <svg class=\"talos-trend-icon talos-trend-icon-down talos-trend-icon--fill\" viewBox=\"0 0 16 16\" fill=\"currentColor\">\n <path d=\"M8 11.5L3 4H13L8 11.5Z\"/>\n </svg>\n } @else {\n <svg class=\"talos-trend-icon talos-trend-icon-flat talos-trend-icon--fill\" viewBox=\"0 0 16 16\" fill=\"currentColor\">\n <rect x=\"3.5\" y=\"7\" width=\"9\" height=\"2\" rx=\"1\"/>\n </svg>\n }\n }\n @default {\n @if (computedDirection() === 'up') {\n <svg class=\"talos-trend-icon talos-trend-icon-up\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M4 11.5L11.5 4M11.5 4H6M11.5 4V9.5\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n } @else if (computedDirection() === 'down') {\n <svg class=\"talos-trend-icon talos-trend-icon-down\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M4 4.5L11.5 12M11.5 12H6M11.5 12V6.5\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n } @else {\n <svg class=\"talos-trend-icon talos-trend-icon-flat\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M3.5 8H12.5\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n }\n }\n }\n </span>\n }\n\n @if (!iconOnly()) {\n <span class=\"talos-trend-value\">{{ displayValue() }}</span>\n }\n</span>\n\n@if (label()) {\n <span class=\"talos-trend-label\">{{ label() }}</span>\n}\n\n", styles: [":host{display:inline-flex;vertical-align:middle;box-sizing:border-box;font-family:inherit;font-weight:600;line-height:1;transition:background-color .15s ease,color .15s ease,border-color .15s ease;white-space:nowrap;--_trend-color: #64748b;--_trend-bg: #f1f5f9;--_trend-border: #e2e8f0;--_trend-solid-bg: #64748b;--_trend-solid-text: #ffffff;--_trend-subtle-bg: rgba(100, 116, 139, .1)}:host.talos-trend-positive{--_trend-color: #15803d;--_trend-bg: #dcfce7;--_trend-border: #bbf7d0;--_trend-solid-bg: #16a34a;--_trend-solid-text: #ffffff;--_trend-subtle-bg: rgba(22, 163, 74, .12)}:host.talos-trend-negative{--_trend-color: #b91c1c;--_trend-bg: #fee2e2;--_trend-border: #fecaca;--_trend-solid-bg: #dc2626;--_trend-solid-text: #ffffff;--_trend-subtle-bg: rgba(220, 38, 38, .12)}:host.talos-trend-neutral{--_trend-color: #475569;--_trend-bg: #f1f5f9;--_trend-border: #e2e8f0;--_trend-solid-bg: #64748b;--_trend-solid-text: #ffffff;--_trend-subtle-bg: rgba(100, 116, 139, .1)}:host.talos-trend-horizontal{flex-direction:row;align-items:center;gap:.25rem}:host.talos-trend-horizontal .talos-trend-label{font-weight:400;opacity:.8;margin-left:.125rem}:host.talos-trend-vertical{flex-direction:column;align-items:flex-start;gap:.125rem}:host.talos-trend-vertical .talos-trend-label{font-weight:400;opacity:.75;font-size:.85em}:host .talos-trend-main{display:inline-flex;align-items:center;gap:.25rem;line-height:1}:host .talos-trend-icon-wrapper{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;line-height:1}:host .talos-trend-icon{display:block;width:.875rem;height:.875rem;flex-shrink:0}:host .talos-trend-icon--fill{fill:currentColor}:host .talos-trend-value{letter-spacing:-.01em}:host.talos-trend-xs{font-size:.6875rem}:host.talos-trend-xs .talos-trend-icon{width:.625rem;height:.625rem}:host.talos-trend-xs.talos-trend-badge,:host.talos-trend-xs.talos-trend-subtle,:host.talos-trend-xs.talos-trend-bordered,:host.talos-trend-xs.talos-trend-solid{padding:.125rem .375rem;border-radius:9999px}:host.talos-trend-sm{font-size:.75rem}:host.talos-trend-sm .talos-trend-icon{width:.75rem;height:.75rem}:host.talos-trend-sm.talos-trend-badge,:host.talos-trend-sm.talos-trend-subtle,:host.talos-trend-sm.talos-trend-bordered,:host.talos-trend-sm.talos-trend-solid{padding:.1875rem .5rem;border-radius:9999px}:host.talos-trend-md{font-size:.8125rem}:host.talos-trend-md .talos-trend-icon{width:.875rem;height:.875rem}:host.talos-trend-md.talos-trend-badge,:host.talos-trend-md.talos-trend-subtle,:host.talos-trend-md.talos-trend-bordered,:host.talos-trend-md.talos-trend-solid{padding:.25rem .625rem;border-radius:9999px}:host.talos-trend-lg{font-size:.9375rem}:host.talos-trend-lg .talos-trend-icon{width:1rem;height:1rem}:host.talos-trend-lg.talos-trend-badge,:host.talos-trend-lg.talos-trend-subtle,:host.talos-trend-lg.talos-trend-bordered,:host.talos-trend-lg.talos-trend-solid{padding:.3125rem .75rem;border-radius:9999px}:host.talos-trend-badge{background-color:var(--_trend-bg);color:var(--_trend-color)}:host.talos-trend-subtle{background-color:var(--_trend-subtle-bg);color:var(--_trend-color)}:host.talos-trend-bordered{background-color:var(--_trend-bg);border:1px solid var(--_trend-border);color:var(--_trend-color)}:host.talos-trend-solid{background-color:var(--_trend-solid-bg);color:var(--_trend-solid-text);box-shadow:0 1px 2px #00000014}:host.talos-trend-text{padding:0;background:transparent;color:var(--_trend-color)}:root[data-theme=dark] :host.talos-trend-positive,:root.dark :host.talos-trend-positive,[data-theme=dark] :host.talos-trend-positive,[data-mode=dark] :host.talos-trend-positive,.dark :host.talos-trend-positive,.dark-theme :host.talos-trend-positive{--_trend-color: #4ade80;--_trend-bg: rgba(34, 197, 94, .18);--_trend-border: rgba(74, 222, 128, .3);--_trend-solid-bg: #16a34a;--_trend-solid-text: #ffffff;--_trend-subtle-bg: rgba(34, 197, 94, .12)}:root[data-theme=dark] :host.talos-trend-negative,:root.dark :host.talos-trend-negative,[data-theme=dark] :host.talos-trend-negative,[data-mode=dark] :host.talos-trend-negative,.dark :host.talos-trend-negative,.dark-theme :host.talos-trend-negative{--_trend-color: #f87171;--_trend-bg: rgba(239, 68, 68, .18);--_trend-border: rgba(248, 113, 113, .3);--_trend-solid-bg: #dc2626;--_trend-solid-text: #ffffff;--_trend-subtle-bg: rgba(239, 68, 68, .12)}:root[data-theme=dark] :host.talos-trend-neutral,:root.dark :host.talos-trend-neutral,[data-theme=dark] :host.talos-trend-neutral,[data-mode=dark] :host.talos-trend-neutral,.dark :host.talos-trend-neutral,.dark-theme :host.talos-trend-neutral{--_trend-color: #94a3b8;--_trend-bg: rgba(100, 116, 139, .18);--_trend-border: rgba(148, 163, 184, .25);--_trend-solid-bg: #475569;--_trend-solid-text: #ffffff;--_trend-subtle-bg: rgba(100, 116, 139, .12)}\n"] }]
|
|
215
|
-
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], current: [{ type: i0.Input, args: [{ isSignal: true, alias: "current", required: false }] }], previous: [{ type: i0.Input, args: [{ isSignal: true, alias: "previous", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], polarity: [{ type: i0.Input, args: [{ isSignal: true, alias: "polarity", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], iconType: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconType", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], format: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }], prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], suffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffix", required: false }] }], decimals: [{ type: i0.Input, args: [{ isSignal: true, alias: "decimals", required: false }] }], showSign: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSign", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], iconOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOnly", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], currencySymbol: [{ type: i0.Input, args: [{ isSignal: true, alias: "currencySymbol", required: false }] }], valueFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFormatter", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
216
|
-
|
|
217
|
-
class TalosTrendIndicatorModule {
|
|
218
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: TalosTrendIndicatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
219
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.1", ngImport: i0, type: TalosTrendIndicatorModule, imports: [TalosTrendIndicatorComponent], exports: [TalosTrendIndicatorComponent] });
|
|
220
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: TalosTrendIndicatorModule });
|
|
221
|
-
}
|
|
222
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: TalosTrendIndicatorModule, decorators: [{
|
|
223
|
-
type: NgModule,
|
|
224
|
-
args: [{
|
|
225
|
-
imports: [TalosTrendIndicatorComponent],
|
|
226
|
-
exports: [TalosTrendIndicatorComponent]
|
|
227
|
-
}]
|
|
228
|
-
}] });
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* Generated bundle index. Do not edit.
|
|
232
|
-
*/
|
|
233
|
-
|
|
234
|
-
export { TalosTrendIndicatorComponent, TalosTrendIndicatorModule };
|
|
235
|
-
//# sourceMappingURL=weeehaoooz-talos-ui-data-display-trend-indicator.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"weeehaoooz-talos-ui-data-display-trend-indicator.mjs","sources":["../../../projects/talos-ui/data-display/trend-indicator/trend-indicator.types.ts","../../../projects/talos-ui/data-display/trend-indicator/trend-indicator.component.ts","../../../projects/talos-ui/data-display/trend-indicator/trend-indicator.component.html","../../../projects/talos-ui/data-display/trend-indicator/trend-indicator.module.ts","../../../projects/talos-ui/data-display/trend-indicator/weeehaoooz-talos-ui-data-display-trend-indicator.ts"],"sourcesContent":["/**\n * Types and interfaces for TalosTrendIndicatorComponent\n */\n\nexport type TrendDirection = 'up' | 'down' | 'flat' | 'auto';\n\nexport type TrendPolarity = 'normal' | 'inverse' | 'neutral';\n\nexport type TrendVariant = 'badge' | 'subtle' | 'text' | 'bordered' | 'solid';\n\nexport type TrendSize = 'xs' | 'sm' | 'md' | 'lg';\n\nexport type TrendLayout = 'horizontal' | 'vertical';\n\nexport type TrendIconType = 'arrow-diagonal' | 'arrow-vertical' | 'chevron' | 'triangle';\n\nexport type TrendStatus = 'auto' | 'positive' | 'negative' | 'neutral';\n\nexport type TrendFormat = 'percentage' | 'currency' | 'number' | 'points' | 'custom';\n\nexport interface TrendCalculationResult {\n delta: number;\n deltaPercentage: number;\n direction: 'up' | 'down' | 'flat';\n status: 'positive' | 'negative' | 'neutral';\n formattedText: string;\n}\n\n","import { Component, computed, input } from '@angular/core';\nimport {\n TrendCalculationResult,\n TrendDirection,\n TrendFormat,\n TrendIconType,\n TrendLayout,\n TrendPolarity,\n TrendSize,\n TrendStatus,\n TrendVariant\n} from './trend-indicator.types';\n\n@Component({\n selector: 'talos-trend-indicator',\n templateUrl: './trend-indicator.component.html',\n styleUrl: './trend-indicator.component.scss',\n host: {\n 'class': 'talos-trend-indicator',\n '[class.talos-trend-badge]': 'variant() === \"badge\"',\n '[class.talos-trend-subtle]': 'variant() === \"subtle\"',\n '[class.talos-trend-text]': 'variant() === \"text\"',\n '[class.talos-trend-bordered]': 'variant() === \"bordered\"',\n '[class.talos-trend-solid]': 'variant() === \"solid\"',\n '[class.talos-trend-horizontal]': 'layout() === \"horizontal\"',\n '[class.talos-trend-vertical]': 'layout() === \"vertical\"',\n '[class.talos-trend-positive]': 'computedStatus() === \"positive\"',\n '[class.talos-trend-negative]': 'computedStatus() === \"negative\"',\n '[class.talos-trend-neutral]': 'computedStatus() === \"neutral\"',\n '[class.talos-trend-xs]': 'size() === \"xs\"',\n '[class.talos-trend-sm]': 'size() === \"sm\"',\n '[class.talos-trend-md]': 'size() === \"md\"',\n '[class.talos-trend-lg]': 'size() === \"lg\"',\n '[attr.role]': '\"status\"',\n '[attr.aria-label]': 'computedAriaLabel()'\n }\n})\nexport class TalosTrendIndicatorComponent {\n /** Explicit value to display (e.g. 14.2, -5.3, \"+12%\") */\n readonly value = input<number | string | null>(null);\n\n /** Current value for automatic delta calculation */\n readonly current = input<number | null>(null);\n\n /** Previous value for automatic delta calculation */\n readonly previous = input<number | null>(null);\n\n /** Explicit direction override or 'auto' */\n readonly direction = input<TrendDirection>('auto');\n\n /** Explicit status override or 'auto' */\n readonly status = input<TrendStatus>('auto');\n\n /** Polarity: normal (+ is good), inverse (+ is bad), neutral */\n readonly polarity = input<TrendPolarity>('normal');\n\n /** Visual variant */\n readonly variant = input<TrendVariant>('badge');\n\n /** Layout orientation: horizontal or vertical */\n readonly layout = input<TrendLayout>('horizontal');\n\n /** Icon shape / style */\n readonly iconType = input<TrendIconType>('arrow-diagonal');\n\n /** Size preset */\n readonly size = input<TrendSize>('md');\n\n /** Value formatting mode */\n readonly format = input<TrendFormat>('percentage');\n\n /** Prefix string before number */\n readonly prefix = input<string>('');\n\n /** Suffix string after number (e.g. '%', 'pts') */\n readonly suffix = input<string>('');\n\n /** Number of decimal places */\n readonly decimals = input<number>(1);\n\n /** Whether to show '+' / '-' sign */\n readonly showSign = input<boolean>(true);\n\n /** Whether to show arrow icon */\n readonly showIcon = input<boolean>(true);\n\n /** Show only the icon without text */\n readonly iconOnly = input<boolean>(false);\n\n /** Secondary comparison label (e.g. 'vs last month') */\n readonly label = input<string>('');\n\n /** Currency symbol when format is 'currency' */\n readonly currencySymbol = input<string>('$');\n\n /** Custom formatter function */\n readonly valueFormatter = input<((calc: TrendCalculationResult) => string) | null>(null);\n\n /** Accessible label */\n readonly ariaLabel = input<string | null>(null);\n\n /** Calculation result */\n readonly calculation = computed<TrendCalculationResult>(() => {\n const cur = this.current();\n const prev = this.previous();\n const val = this.value();\n const dec = this.decimals();\n\n let delta = 0;\n let deltaPct = 0;\n let dir: 'up' | 'down' | 'flat' = 'flat';\n\n if (cur !== null && prev !== null) {\n delta = cur - prev;\n deltaPct = prev !== 0 ? ((cur - prev) / Math.abs(prev)) * 100 : cur > 0 ? 100 : cur < 0 ? -100 : 0;\n if (delta > 0.0001) dir = 'up';\n else if (delta < -0.0001) dir = 'down';\n else dir = 'flat';\n } else if (typeof val === 'number') {\n delta = val;\n deltaPct = val;\n if (val > 0.0001) dir = 'up';\n else if (val < -0.0001) dir = 'down';\n else dir = 'flat';\n } else if (typeof val === 'string') {\n const parsed = parseFloat(val.replace(/[^0-9.-]/g, ''));\n delta = isNaN(parsed) ? 0 : parsed;\n deltaPct = delta;\n if (val.includes('+') || delta > 0.0001) dir = 'up';\n else if (val.includes('-') || delta < -0.0001) dir = 'down';\n else dir = 'flat';\n }\n\n // Force direction override if specified\n const explicitDir = this.direction();\n if (explicitDir !== 'auto') {\n dir = explicitDir;\n }\n\n // Determine status (positive / negative / neutral) based on polarity or explicit override\n const explicitStatus = this.status();\n let calculatedStatus: 'positive' | 'negative' | 'neutral' = 'neutral';\n\n if (explicitStatus !== 'auto') {\n calculatedStatus = explicitStatus;\n } else {\n const pol = this.polarity();\n if (pol === 'neutral' || dir === 'flat') {\n calculatedStatus = 'neutral';\n } else if (pol === 'normal') {\n calculatedStatus = dir === 'up' ? 'positive' : 'negative';\n } else if (pol === 'inverse') {\n calculatedStatus = dir === 'up' ? 'negative' : 'positive';\n }\n }\n\n // Format text\n let formattedText = '';\n const customFmt = this.valueFormatter();\n if (customFmt) {\n formattedText = customFmt({ delta, deltaPercentage: deltaPct, direction: dir, status: calculatedStatus, formattedText: '' });\n } else if (typeof val === 'string' && cur === null) {\n formattedText = val;\n } else {\n const sign = this.showSign() ? (dir === 'up' ? '+' : dir === 'down' ? '-' : '') : '';\n const absDelta = Math.abs(delta);\n const absPct = Math.abs(deltaPct);\n const pfx = this.prefix();\n const sfx = this.suffix();\n\n switch (this.format()) {\n case 'percentage':\n formattedText = `${sign}${pfx}${absPct.toFixed(dec)}%${sfx}`;\n break;\n case 'currency':\n formattedText = `${sign}${this.currencySymbol()}${pfx}${absDelta.toFixed(dec)}${sfx}`;\n break;\n case 'points':\n formattedText = `${sign}${pfx}${absDelta.toFixed(dec)} pts${sfx}`;\n break;\n case 'number':\n default:\n formattedText = `${sign}${pfx}${absDelta.toFixed(dec)}${sfx}`;\n break;\n }\n }\n\n return {\n delta,\n deltaPercentage: deltaPct,\n direction: dir,\n status: calculatedStatus,\n formattedText\n };\n });\n\n readonly computedStatus = computed(() => this.calculation().status);\n readonly computedDirection = computed(() => this.calculation().direction);\n readonly displayValue = computed(() => this.calculation().formattedText);\n\n readonly computedAriaLabel = computed(() => {\n const custom = this.ariaLabel();\n if (custom) return custom;\n const calc = this.calculation();\n const dirWord = calc.direction === 'up' ? 'Increased by' : calc.direction === 'down' ? 'Decreased by' : 'No change';\n const labelText = this.label() ? ` (${this.label()})` : '';\n return `Trend: ${dirWord} ${calc.formattedText}${labelText}`;\n });\n}\n\n","<span class=\"talos-trend-main\">\n @if (showIcon()) {\n <span class=\"talos-trend-icon-wrapper\" aria-hidden=\"true\">\n @switch (iconType()) {\n @case ('arrow-vertical') {\n @if (computedDirection() === 'up') {\n <svg class=\"talos-trend-icon talos-trend-icon-up\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M8 12.5V3.5M8 3.5L4.5 7M8 3.5L11.5 7\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n } @else if (computedDirection() === 'down') {\n <svg class=\"talos-trend-icon talos-trend-icon-down\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M8 3.5V12.5M8 12.5L4.5 9M8 12.5L11.5 9\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n } @else {\n <svg class=\"talos-trend-icon talos-trend-icon-flat\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M3.5 8H12.5\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n }\n }\n @case ('chevron') {\n @if (computedDirection() === 'up') {\n <svg class=\"talos-trend-icon talos-trend-icon-up\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M3.5 10L8 5.5L12.5 10\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n } @else if (computedDirection() === 'down') {\n <svg class=\"talos-trend-icon talos-trend-icon-down\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M3.5 6L8 10.5L12.5 6\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n } @else {\n <svg class=\"talos-trend-icon talos-trend-icon-flat\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M3.5 8H12.5\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n }\n }\n @case ('triangle') {\n @if (computedDirection() === 'up') {\n <svg class=\"talos-trend-icon talos-trend-icon-up talos-trend-icon--fill\" viewBox=\"0 0 16 16\" fill=\"currentColor\">\n <path d=\"M8 4.5L13 12H3L8 4.5Z\"/>\n </svg>\n } @else if (computedDirection() === 'down') {\n <svg class=\"talos-trend-icon talos-trend-icon-down talos-trend-icon--fill\" viewBox=\"0 0 16 16\" fill=\"currentColor\">\n <path d=\"M8 11.5L3 4H13L8 11.5Z\"/>\n </svg>\n } @else {\n <svg class=\"talos-trend-icon talos-trend-icon-flat talos-trend-icon--fill\" viewBox=\"0 0 16 16\" fill=\"currentColor\">\n <rect x=\"3.5\" y=\"7\" width=\"9\" height=\"2\" rx=\"1\"/>\n </svg>\n }\n }\n @default {\n @if (computedDirection() === 'up') {\n <svg class=\"talos-trend-icon talos-trend-icon-up\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M4 11.5L11.5 4M11.5 4H6M11.5 4V9.5\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n } @else if (computedDirection() === 'down') {\n <svg class=\"talos-trend-icon talos-trend-icon-down\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M4 4.5L11.5 12M11.5 12H6M11.5 12V6.5\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n } @else {\n <svg class=\"talos-trend-icon talos-trend-icon-flat\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\">\n <path d=\"M3.5 8H12.5\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n }\n }\n }\n </span>\n }\n\n @if (!iconOnly()) {\n <span class=\"talos-trend-value\">{{ displayValue() }}</span>\n }\n</span>\n\n@if (label()) {\n <span class=\"talos-trend-label\">{{ label() }}</span>\n}\n\n","import { NgModule } from '@angular/core';\nimport { TalosTrendIndicatorComponent } from './trend-indicator.component';\n\n@NgModule({\n imports: [TalosTrendIndicatorComponent],\n exports: [TalosTrendIndicatorComponent]\n})\nexport class TalosTrendIndicatorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;AAEG;;MCmCU,4BAA4B,CAAA;;IAE9B,KAAK,GAAG,KAAK,CAAyB,IAAI;8EAAC;;IAG3C,OAAO,GAAG,KAAK,CAAgB,IAAI;gFAAC;;IAGpC,QAAQ,GAAG,KAA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