@hyalo/angular 0.1.0 → 0.3.1
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/CHANGELOG.md +95 -41
- package/README.md +46 -32
- package/fesm2022/hyalo-angular-accordion.mjs +6 -6
- package/fesm2022/hyalo-angular-accordion.mjs.map +1 -1
- package/fesm2022/hyalo-angular-alert.mjs +171 -0
- package/fesm2022/hyalo-angular-alert.mjs.map +1 -0
- package/fesm2022/hyalo-angular-aspect-ratio.mjs +64 -0
- package/fesm2022/hyalo-angular-aspect-ratio.mjs.map +1 -0
- package/fesm2022/hyalo-angular-avatar.mjs +169 -0
- package/fesm2022/hyalo-angular-avatar.mjs.map +1 -0
- package/fesm2022/hyalo-angular-badge.mjs +268 -0
- package/fesm2022/hyalo-angular-badge.mjs.map +1 -0
- package/fesm2022/hyalo-angular-bento.mjs +132 -0
- package/fesm2022/hyalo-angular-bento.mjs.map +1 -0
- package/fesm2022/hyalo-angular-blocks.mjs +985 -0
- package/fesm2022/hyalo-angular-blocks.mjs.map +1 -0
- package/fesm2022/hyalo-angular-border-beam.mjs +73 -0
- package/fesm2022/hyalo-angular-border-beam.mjs.map +1 -0
- package/fesm2022/hyalo-angular-breadcrumb.mjs +77 -0
- package/fesm2022/hyalo-angular-breadcrumb.mjs.map +1 -0
- package/fesm2022/hyalo-angular-button-group.mjs +90 -0
- package/fesm2022/hyalo-angular-button-group.mjs.map +1 -0
- package/fesm2022/hyalo-angular-button.mjs +4 -3
- package/fesm2022/hyalo-angular-button.mjs.map +1 -1
- package/fesm2022/hyalo-angular-card.mjs +2 -2
- package/fesm2022/hyalo-angular-card.mjs.map +1 -1
- package/fesm2022/hyalo-angular-carousel.mjs +709 -0
- package/fesm2022/hyalo-angular-carousel.mjs.map +1 -0
- package/fesm2022/hyalo-angular-chapter-nav.mjs +336 -0
- package/fesm2022/hyalo-angular-chapter-nav.mjs.map +1 -0
- package/fesm2022/hyalo-angular-chart-engine-DSJop6He.mjs +5 -0
- package/fesm2022/hyalo-angular-chart-engine-DSJop6He.mjs.map +1 -0
- package/fesm2022/hyalo-angular-chart.mjs +391 -0
- package/fesm2022/hyalo-angular-chart.mjs.map +1 -0
- package/fesm2022/hyalo-angular-choice.mjs +2 -1
- package/fesm2022/hyalo-angular-choice.mjs.map +1 -1
- package/fesm2022/hyalo-angular-code-block-highlight-B20d5C76.mjs +40 -0
- package/fesm2022/hyalo-angular-code-block-highlight-B20d5C76.mjs.map +1 -0
- package/fesm2022/hyalo-angular-code-block.mjs +161 -0
- package/fesm2022/hyalo-angular-code-block.mjs.map +1 -0
- package/fesm2022/hyalo-angular-command.mjs +193 -0
- package/fesm2022/hyalo-angular-command.mjs.map +1 -0
- package/fesm2022/hyalo-angular-copy.mjs +138 -0
- package/fesm2022/hyalo-angular-copy.mjs.map +1 -0
- package/fesm2022/hyalo-angular-core.mjs +424 -0
- package/fesm2022/hyalo-angular-core.mjs.map +1 -0
- package/fesm2022/hyalo-angular-description-list.mjs +57 -0
- package/fesm2022/hyalo-angular-description-list.mjs.map +1 -0
- package/fesm2022/hyalo-angular-dialog.mjs +51 -22
- package/fesm2022/hyalo-angular-dialog.mjs.map +1 -1
- package/fesm2022/hyalo-angular-divider.mjs +66 -0
- package/fesm2022/hyalo-angular-divider.mjs.map +1 -0
- package/fesm2022/hyalo-angular-empty-state.mjs +123 -0
- package/fesm2022/hyalo-angular-empty-state.mjs.map +1 -0
- package/fesm2022/hyalo-angular-field.mjs +41 -9
- package/fesm2022/hyalo-angular-field.mjs.map +1 -1
- package/fesm2022/hyalo-angular-filter.mjs +309 -0
- package/fesm2022/hyalo-angular-filter.mjs.map +1 -0
- package/fesm2022/hyalo-angular-hotspot.mjs +225 -0
- package/fesm2022/hyalo-angular-hotspot.mjs.map +1 -0
- package/fesm2022/hyalo-angular-hover-card.mjs +233 -0
- package/fesm2022/hyalo-angular-hover-card.mjs.map +1 -0
- package/fesm2022/hyalo-angular-icon.mjs +42 -0
- package/fesm2022/hyalo-angular-icon.mjs.map +1 -1
- package/fesm2022/hyalo-angular-image-compare.mjs +168 -0
- package/fesm2022/hyalo-angular-image-compare.mjs.map +1 -0
- package/fesm2022/hyalo-angular-interaction.mjs +32 -41
- package/fesm2022/hyalo-angular-interaction.mjs.map +1 -1
- package/fesm2022/hyalo-angular-kbd.mjs +41 -0
- package/fesm2022/hyalo-angular-kbd.mjs.map +1 -0
- package/fesm2022/hyalo-angular-lightbox.mjs +228 -0
- package/fesm2022/hyalo-angular-lightbox.mjs.map +1 -0
- package/fesm2022/hyalo-angular-link.mjs +42 -0
- package/fesm2022/hyalo-angular-link.mjs.map +1 -0
- package/fesm2022/hyalo-angular-list.mjs +131 -0
- package/fesm2022/hyalo-angular-list.mjs.map +1 -0
- package/fesm2022/hyalo-angular-marquee.mjs +197 -0
- package/fesm2022/hyalo-angular-marquee.mjs.map +1 -0
- package/fesm2022/hyalo-angular-menu.mjs +423 -0
- package/fesm2022/hyalo-angular-menu.mjs.map +1 -0
- package/fesm2022/hyalo-angular-mesh.mjs +126 -0
- package/fesm2022/hyalo-angular-mesh.mjs.map +1 -0
- package/fesm2022/hyalo-angular-motion.mjs +620 -0
- package/fesm2022/hyalo-angular-motion.mjs.map +1 -0
- package/fesm2022/hyalo-angular-navbar.mjs +1 -1
- package/fesm2022/hyalo-angular-navbar.mjs.map +1 -1
- package/fesm2022/hyalo-angular-navigation-menu.mjs +222 -0
- package/fesm2022/hyalo-angular-navigation-menu.mjs.map +1 -0
- package/fesm2022/hyalo-angular-number-ticker.mjs +174 -0
- package/fesm2022/hyalo-angular-number-ticker.mjs.map +1 -0
- package/fesm2022/hyalo-angular-overlay.mjs +71 -2
- package/fesm2022/hyalo-angular-overlay.mjs.map +1 -1
- package/fesm2022/hyalo-angular-pagination.mjs +187 -0
- package/fesm2022/hyalo-angular-pagination.mjs.map +1 -0
- package/fesm2022/hyalo-angular-popover.mjs +34 -5
- package/fesm2022/hyalo-angular-popover.mjs.map +1 -1
- package/fesm2022/hyalo-angular-progress.mjs +209 -0
- package/fesm2022/hyalo-angular-progress.mjs.map +1 -0
- package/fesm2022/hyalo-angular-progressive-blur.mjs +73 -0
- package/fesm2022/hyalo-angular-progressive-blur.mjs.map +1 -0
- package/fesm2022/hyalo-angular-refraction-renderer-5ZA-kfsA.mjs +186 -0
- package/fesm2022/hyalo-angular-refraction-renderer-5ZA-kfsA.mjs.map +1 -0
- package/fesm2022/hyalo-angular-refraction.mjs +178 -0
- package/fesm2022/hyalo-angular-refraction.mjs.map +1 -0
- package/fesm2022/hyalo-angular-scroll-area.mjs +93 -0
- package/fesm2022/hyalo-angular-scroll-area.mjs.map +1 -0
- package/fesm2022/hyalo-angular-scroll-to-top.mjs +127 -0
- package/fesm2022/hyalo-angular-scroll-to-top.mjs.map +1 -0
- package/fesm2022/hyalo-angular-segmented.mjs +1 -1
- package/fesm2022/hyalo-angular-segmented.mjs.map +1 -1
- package/fesm2022/hyalo-angular-select.mjs +112 -15
- package/fesm2022/hyalo-angular-select.mjs.map +1 -1
- package/fesm2022/hyalo-angular-sidebar.mjs +241 -0
- package/fesm2022/hyalo-angular-sidebar.mjs.map +1 -0
- package/fesm2022/hyalo-angular-skeleton.mjs +131 -0
- package/fesm2022/hyalo-angular-skeleton.mjs.map +1 -0
- package/fesm2022/hyalo-angular-sparkline.mjs +110 -0
- package/fesm2022/hyalo-angular-sparkline.mjs.map +1 -0
- package/fesm2022/hyalo-angular-split-text.mjs +126 -0
- package/fesm2022/hyalo-angular-split-text.mjs.map +1 -0
- package/fesm2022/hyalo-angular-stat.mjs +193 -0
- package/fesm2022/hyalo-angular-stat.mjs.map +1 -0
- package/fesm2022/hyalo-angular-stepper.mjs +254 -0
- package/fesm2022/hyalo-angular-stepper.mjs.map +1 -0
- package/fesm2022/hyalo-angular-table.mjs +335 -0
- package/fesm2022/hyalo-angular-table.mjs.map +1 -0
- package/fesm2022/hyalo-angular-tabs.mjs +1 -1
- package/fesm2022/hyalo-angular-tabs.mjs.map +1 -1
- package/fesm2022/hyalo-angular-theme.mjs +1 -1
- package/fesm2022/hyalo-angular-theme.mjs.map +1 -1
- package/fesm2022/hyalo-angular-timeline.mjs +157 -0
- package/fesm2022/hyalo-angular-timeline.mjs.map +1 -0
- package/fesm2022/hyalo-angular-toast.mjs +2 -1
- package/fesm2022/hyalo-angular-toast.mjs.map +1 -1
- package/fesm2022/hyalo-angular.mjs +2 -473
- package/package.json +198 -2
- package/styles/parts/field.css +44 -36
- package/styles/parts/glass.css +2 -0
- package/styles/parts/motion.css +19 -0
- package/styles/parts/typography.css +17 -0
- package/types/hyalo-angular-accordion.d.ts +1 -1
- package/types/hyalo-angular-alert.d.ts +47 -0
- package/types/hyalo-angular-aspect-ratio.d.ts +13 -0
- package/types/hyalo-angular-avatar.d.ts +39 -0
- package/types/hyalo-angular-badge.d.ts +82 -0
- package/types/hyalo-angular-bento.d.ts +25 -0
- package/types/hyalo-angular-blocks.d.ts +272 -0
- package/types/hyalo-angular-border-beam.d.ts +15 -0
- package/types/hyalo-angular-breadcrumb.d.ts +22 -0
- package/types/hyalo-angular-button-group.d.ts +19 -0
- package/types/hyalo-angular-button.d.ts +4 -3
- package/types/hyalo-angular-card.d.ts +1 -1
- package/types/hyalo-angular-carousel.d.ts +147 -0
- package/types/hyalo-angular-chapter-nav.d.ts +79 -0
- package/types/hyalo-angular-chart.d.ts +90 -0
- package/types/hyalo-angular-code-block.d.ts +46 -0
- package/types/hyalo-angular-command.d.ts +41 -0
- package/types/hyalo-angular-copy.d.ts +39 -0
- package/types/hyalo-angular-core.d.ts +210 -0
- package/types/hyalo-angular-description-list.d.ts +16 -0
- package/types/hyalo-angular-dialog.d.ts +2 -1
- package/types/hyalo-angular-divider.d.ts +12 -0
- package/types/hyalo-angular-empty-state.d.ts +30 -0
- package/types/hyalo-angular-field.d.ts +10 -4
- package/types/hyalo-angular-filter.d.ts +122 -0
- package/types/hyalo-angular-hotspot.d.ts +70 -0
- package/types/hyalo-angular-hover-card.d.ts +47 -0
- package/types/hyalo-angular-image-compare.d.ts +55 -0
- package/types/hyalo-angular-kbd.d.ts +5 -0
- package/types/hyalo-angular-lightbox.d.ts +67 -0
- package/types/hyalo-angular-link.d.ts +5 -0
- package/types/hyalo-angular-list.d.ts +30 -0
- package/types/hyalo-angular-marquee.d.ts +48 -0
- package/types/hyalo-angular-menu.d.ts +105 -0
- package/types/hyalo-angular-mesh.d.ts +36 -0
- package/types/hyalo-angular-motion.d.ts +218 -0
- package/types/hyalo-angular-navigation-menu.d.ts +47 -0
- package/types/hyalo-angular-number-ticker.d.ts +52 -0
- package/types/hyalo-angular-overlay.d.ts +9 -0
- package/types/hyalo-angular-pagination.d.ts +59 -0
- package/types/hyalo-angular-popover.d.ts +10 -0
- package/types/hyalo-angular-progress.d.ts +46 -0
- package/types/hyalo-angular-progressive-blur.d.ts +14 -0
- package/types/hyalo-angular-refraction.d.ts +46 -0
- package/types/hyalo-angular-scroll-area.d.ts +18 -0
- package/types/hyalo-angular-scroll-to-top.d.ts +31 -0
- package/types/hyalo-angular-segmented.d.ts +1 -1
- package/types/hyalo-angular-select.d.ts +49 -3
- package/types/hyalo-angular-sidebar.d.ts +57 -0
- package/types/hyalo-angular-skeleton.d.ts +34 -0
- package/types/hyalo-angular-sparkline.d.ts +19 -0
- package/types/hyalo-angular-split-text.d.ts +24 -0
- package/types/hyalo-angular-stat.d.ts +56 -0
- package/types/hyalo-angular-stepper.d.ts +63 -0
- package/types/hyalo-angular-table.d.ts +125 -0
- package/types/hyalo-angular-timeline.d.ts +36 -0
- package/types/hyalo-angular.d.ts +2 -345
- package/fesm2022/hyalo-angular.mjs.map +0 -1
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, computed, inject, input } from "@angular/core";
|
|
3
|
+
import { HyMotion } from "@hyalo/angular/motion";
|
|
4
|
+
var HySkeleton = class HySkeleton {
|
|
5
|
+
motion = inject(HyMotion);
|
|
6
|
+
animate = computed(() => this.motion.enabled() && this.animation() !== "none", ...ngDevMode ? [{ debugName: "animate" }] : /* istanbul ignore next */ []);
|
|
7
|
+
animation = input("shimmer", ...ngDevMode ? [{ debugName: "animation" }] : /* istanbul ignore next */ []);
|
|
8
|
+
shape = input("text", ...ngDevMode ? [{ debugName: "shape" }] : /* istanbul ignore next */ []);
|
|
9
|
+
width = input("100%", ...ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []);
|
|
10
|
+
height = input("1em", ...ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []);
|
|
11
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
12
|
+
minVersion: "12.0.0",
|
|
13
|
+
version: "22.2.3",
|
|
14
|
+
ngImport: i0,
|
|
15
|
+
type: HySkeleton,
|
|
16
|
+
deps: [],
|
|
17
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
18
|
+
});
|
|
19
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
20
|
+
minVersion: "17.1.0",
|
|
21
|
+
version: "22.2.3",
|
|
22
|
+
type: HySkeleton,
|
|
23
|
+
isStandalone: true,
|
|
24
|
+
selector: "hy-skeleton",
|
|
25
|
+
inputs: {
|
|
26
|
+
animation: {
|
|
27
|
+
classPropertyName: "animation",
|
|
28
|
+
publicName: "animation",
|
|
29
|
+
isSignal: true,
|
|
30
|
+
isRequired: false,
|
|
31
|
+
transformFunction: null
|
|
32
|
+
},
|
|
33
|
+
shape: {
|
|
34
|
+
classPropertyName: "shape",
|
|
35
|
+
publicName: "shape",
|
|
36
|
+
isSignal: true,
|
|
37
|
+
isRequired: false,
|
|
38
|
+
transformFunction: null
|
|
39
|
+
},
|
|
40
|
+
width: {
|
|
41
|
+
classPropertyName: "width",
|
|
42
|
+
publicName: "width",
|
|
43
|
+
isSignal: true,
|
|
44
|
+
isRequired: false,
|
|
45
|
+
transformFunction: null
|
|
46
|
+
},
|
|
47
|
+
height: {
|
|
48
|
+
classPropertyName: "height",
|
|
49
|
+
publicName: "height",
|
|
50
|
+
isSignal: true,
|
|
51
|
+
isRequired: false,
|
|
52
|
+
transformFunction: null
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
host: {
|
|
56
|
+
attributes: { "aria-hidden": "true" },
|
|
57
|
+
properties: {
|
|
58
|
+
"attr.data-shape": "shape()",
|
|
59
|
+
"attr.data-animate": "animate()",
|
|
60
|
+
"attr.data-animation": "animation()",
|
|
61
|
+
"style.inline-size": "width()",
|
|
62
|
+
"style.block-size": "height()"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
ngImport: i0,
|
|
66
|
+
template: "",
|
|
67
|
+
isInline: true,
|
|
68
|
+
styles: [":host{display:block;position:relative;overflow:clip;border-radius:var(--hy-radius-s);background:var(--hy-surface-3)}:host([data-shape=\"circle\"]){border-radius:50%}:host([data-animate=\"true\"][data-animation=\"shimmer\"]):after{content:\"\";position:absolute;inset:0;background:linear-gradient(90deg,transparent,var(--hy-surface-1),transparent);animation:hy-shimmer 1.8s linear infinite}:host([data-animate=\"true\"][data-animation=\"pulse\"]){animation:hy-pulse 1.8s var(--hy-ease-inout) infinite}@keyframes hy-pulse{50%{opacity:.45}}@keyframes hy-shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}@media(prefers-reduced-motion:reduce){:host,:host:after{animation:none!important}}\n"],
|
|
69
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
73
|
+
minVersion: "12.0.0",
|
|
74
|
+
version: "22.2.3",
|
|
75
|
+
ngImport: i0,
|
|
76
|
+
type: HySkeleton,
|
|
77
|
+
decorators: [{
|
|
78
|
+
type: Component,
|
|
79
|
+
args: [{
|
|
80
|
+
selector: "hy-skeleton",
|
|
81
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
82
|
+
host: {
|
|
83
|
+
"aria-hidden": "true",
|
|
84
|
+
"[attr.data-shape]": "shape()",
|
|
85
|
+
"[attr.data-animate]": "animate()",
|
|
86
|
+
"[attr.data-animation]": "animation()",
|
|
87
|
+
"[style.inline-size]": "width()",
|
|
88
|
+
"[style.block-size]": "height()"
|
|
89
|
+
},
|
|
90
|
+
template: "",
|
|
91
|
+
styles: [":host{display:block;position:relative;overflow:clip;border-radius:var(--hy-radius-s);background:var(--hy-surface-3)}:host([data-shape=\"circle\"]){border-radius:50%}:host([data-animate=\"true\"][data-animation=\"shimmer\"]):after{content:\"\";position:absolute;inset:0;background:linear-gradient(90deg,transparent,var(--hy-surface-1),transparent);animation:hy-shimmer 1.8s linear infinite}:host([data-animate=\"true\"][data-animation=\"pulse\"]){animation:hy-pulse 1.8s var(--hy-ease-inout) infinite}@keyframes hy-pulse{50%{opacity:.45}}@keyframes hy-shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}@media(prefers-reduced-motion:reduce){:host,:host:after{animation:none!important}}\n"]
|
|
92
|
+
}]
|
|
93
|
+
}],
|
|
94
|
+
propDecorators: {
|
|
95
|
+
animation: [{
|
|
96
|
+
type: i0.Input,
|
|
97
|
+
args: [{
|
|
98
|
+
isSignal: true,
|
|
99
|
+
alias: "animation",
|
|
100
|
+
required: false
|
|
101
|
+
}]
|
|
102
|
+
}],
|
|
103
|
+
shape: [{
|
|
104
|
+
type: i0.Input,
|
|
105
|
+
args: [{
|
|
106
|
+
isSignal: true,
|
|
107
|
+
alias: "shape",
|
|
108
|
+
required: false
|
|
109
|
+
}]
|
|
110
|
+
}],
|
|
111
|
+
width: [{
|
|
112
|
+
type: i0.Input,
|
|
113
|
+
args: [{
|
|
114
|
+
isSignal: true,
|
|
115
|
+
alias: "width",
|
|
116
|
+
required: false
|
|
117
|
+
}]
|
|
118
|
+
}],
|
|
119
|
+
height: [{
|
|
120
|
+
type: i0.Input,
|
|
121
|
+
args: [{
|
|
122
|
+
isSignal: true,
|
|
123
|
+
alias: "height",
|
|
124
|
+
required: false
|
|
125
|
+
}]
|
|
126
|
+
}]
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
export { HySkeleton };
|
|
130
|
+
|
|
131
|
+
//# sourceMappingURL=hyalo-angular-skeleton.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hyalo-angular-skeleton.mjs","names":[],"sources":["../../../projects/hyalo/skeleton/skeleton.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\r\nimport { HyMotion } from '@hyalo/angular/motion';\r\nexport type HySkeletonAnimation = 'shimmer' | 'pulse' | 'none';\r\n/** Decorative placeholder. Put aria-busy on the region being loaded. */\r\n@Component({\r\n selector: 'hy-skeleton',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n 'aria-hidden': 'true',\r\n '[attr.data-shape]': 'shape()',\r\n '[attr.data-animate]': 'animate()',\r\n '[attr.data-animation]': 'animation()',\r\n '[style.inline-size]': 'width()',\r\n '[style.block-size]': 'height()',\r\n },\r\n template: '',\r\n styleUrl: './skeleton.css',\r\n})\r\nexport class HySkeleton {\r\n private readonly motion = inject(HyMotion);\r\n protected readonly animate = computed(() => this.motion.enabled() && this.animation() !== 'none');\r\n readonly animation = input<HySkeletonAnimation>('shimmer');\r\n readonly shape = input<'text' | 'circle' | 'rect'>('text');\r\n readonly width = input('100%');\r\n readonly height = input('1em');\r\n}\r\n"],"mappings":";;;AAkBA,IAAa,aAAb,MAAa,WAAU;CACJ,SAAS,OAAO,QAAQ;CACtB,UAAU,eAAe,KAAK,OAAO,QAAO,KAAM,KAAK,UAAS,MAAO,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACxF,YAAY,MAA2B,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CACjD,QAAQ,MAAkC,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;C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AAE,QAAA,CAAA,isBAAA;EAAA,CAAA"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, computed, input } from "@angular/core";
|
|
3
|
+
var HySparkline = class HySparkline {
|
|
4
|
+
data = input.required(...ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []);
|
|
5
|
+
label = input.required(...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
6
|
+
points = computed(() => {
|
|
7
|
+
const values = this.data().filter(Number.isFinite);
|
|
8
|
+
if (!values.length) return "";
|
|
9
|
+
const maximum = values[0] ?? 0;
|
|
10
|
+
let scale = Math.abs(maximum);
|
|
11
|
+
for (const value of values) scale = Math.max(scale, Math.abs(value));
|
|
12
|
+
const normalized = values.map((value) => scale ? value / scale : 0);
|
|
13
|
+
let min = Infinity, max = -Infinity;
|
|
14
|
+
for (const value of normalized) {
|
|
15
|
+
min = Math.min(min, value);
|
|
16
|
+
max = Math.max(max, value);
|
|
17
|
+
}
|
|
18
|
+
const selected = /* @__PURE__ */ new Set([0, values.length - 1]);
|
|
19
|
+
const bucket = Math.max(1, Math.ceil(values.length / 80));
|
|
20
|
+
for (let start = 0; start < values.length; start += bucket) {
|
|
21
|
+
let low = start, high = start;
|
|
22
|
+
for (let i = start; i < Math.min(values.length, start + bucket); i++) {
|
|
23
|
+
if ((normalized[i] ?? 0) < (normalized[low] ?? 0)) low = i;
|
|
24
|
+
if ((normalized[i] ?? 0) > (normalized[high] ?? 0)) high = i;
|
|
25
|
+
}
|
|
26
|
+
selected.add(low);
|
|
27
|
+
selected.add(high);
|
|
28
|
+
}
|
|
29
|
+
return [...selected].sort((a, b) => a - b).map((index) => (values.length === 1 ? 100 : index / (values.length - 1) * 196 + 2).toFixed(2) + "," + (max === min ? 24 : 44 - ((normalized[index] ?? 0) - min) / (max - min) * 40).toFixed(2)).join(" ");
|
|
30
|
+
}, ...ngDevMode ? [{ debugName: "points" }] : /* istanbul ignore next */ []);
|
|
31
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
32
|
+
minVersion: "12.0.0",
|
|
33
|
+
version: "22.2.3",
|
|
34
|
+
ngImport: i0,
|
|
35
|
+
type: HySparkline,
|
|
36
|
+
deps: [],
|
|
37
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
38
|
+
});
|
|
39
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
40
|
+
minVersion: "17.1.0",
|
|
41
|
+
version: "22.2.3",
|
|
42
|
+
type: HySparkline,
|
|
43
|
+
isStandalone: true,
|
|
44
|
+
selector: "hy-sparkline",
|
|
45
|
+
inputs: {
|
|
46
|
+
data: {
|
|
47
|
+
classPropertyName: "data",
|
|
48
|
+
publicName: "data",
|
|
49
|
+
isSignal: true,
|
|
50
|
+
isRequired: true,
|
|
51
|
+
transformFunction: null
|
|
52
|
+
},
|
|
53
|
+
label: {
|
|
54
|
+
classPropertyName: "label",
|
|
55
|
+
publicName: "label",
|
|
56
|
+
isSignal: true,
|
|
57
|
+
isRequired: true,
|
|
58
|
+
transformFunction: null
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
host: {
|
|
62
|
+
attributes: { "role": "img" },
|
|
63
|
+
properties: { "attr.aria-label": "label()" }
|
|
64
|
+
},
|
|
65
|
+
ngImport: i0,
|
|
66
|
+
template: "<svg viewBox=\"0 0 200 48\" preserveAspectRatio=\"none\" aria-hidden=\"true\">\r\n <polyline\r\n [attr.points]=\"points()\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linejoin=\"round\"\r\n stroke-linecap=\"round\"\r\n vector-effect=\"non-scaling-stroke\"\r\n />\r\n</svg>\r\n",
|
|
67
|
+
styles: [":host{display:block;inline-size:100%;block-size:3rem;color:var(--hy-primary)}svg{display:block;inline-size:100%;block-size:100%}\n"],
|
|
68
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
72
|
+
minVersion: "12.0.0",
|
|
73
|
+
version: "22.2.3",
|
|
74
|
+
ngImport: i0,
|
|
75
|
+
type: HySparkline,
|
|
76
|
+
decorators: [{
|
|
77
|
+
type: Component,
|
|
78
|
+
args: [{
|
|
79
|
+
selector: "hy-sparkline",
|
|
80
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
81
|
+
host: {
|
|
82
|
+
role: "img",
|
|
83
|
+
"[attr.aria-label]": "label()"
|
|
84
|
+
},
|
|
85
|
+
template: "<svg viewBox=\"0 0 200 48\" preserveAspectRatio=\"none\" aria-hidden=\"true\">\r\n <polyline\r\n [attr.points]=\"points()\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linejoin=\"round\"\r\n stroke-linecap=\"round\"\r\n vector-effect=\"non-scaling-stroke\"\r\n />\r\n</svg>\r\n",
|
|
86
|
+
styles: [":host{display:block;inline-size:100%;block-size:3rem;color:var(--hy-primary)}svg{display:block;inline-size:100%;block-size:100%}\n"]
|
|
87
|
+
}]
|
|
88
|
+
}],
|
|
89
|
+
propDecorators: {
|
|
90
|
+
data: [{
|
|
91
|
+
type: i0.Input,
|
|
92
|
+
args: [{
|
|
93
|
+
isSignal: true,
|
|
94
|
+
alias: "data",
|
|
95
|
+
required: true
|
|
96
|
+
}]
|
|
97
|
+
}],
|
|
98
|
+
label: [{
|
|
99
|
+
type: i0.Input,
|
|
100
|
+
args: [{
|
|
101
|
+
isSignal: true,
|
|
102
|
+
alias: "label",
|
|
103
|
+
required: true
|
|
104
|
+
}]
|
|
105
|
+
}]
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
export { HySparkline };
|
|
109
|
+
|
|
110
|
+
//# sourceMappingURL=hyalo-angular-sparkline.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hyalo-angular-sparkline.mjs","names":[],"sources":["../../../projects/hyalo/sparkline/sparkline.ts","../../../projects/hyalo/sparkline/sparkline.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\r\n@Component({\r\n selector: 'hy-sparkline',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n templateUrl: './sparkline.html',\r\n styleUrl: './sparkline.css',\r\n host: { role: 'img', '[attr.aria-label]': 'label()' },\r\n})\r\nexport class HySparkline {\r\n readonly data = input.required<readonly number[]>();\r\n readonly label = input.required<string>();\r\n readonly points = computed(() => {\r\n const values = this.data().filter(Number.isFinite);\r\n if (!values.length) return '';\r\n const maximum = values[0] ?? 0;\r\n let scale = Math.abs(maximum);\r\n for (const value of values) scale = Math.max(scale, Math.abs(value));\r\n const normalized = values.map((value) => (scale ? value / scale : 0));\r\n let min = Infinity,\r\n max = -Infinity;\r\n for (const value of normalized) {\r\n min = Math.min(min, value);\r\n max = Math.max(max, value);\r\n }\r\n const selected = new Set([0, values.length - 1]);\r\n const bucket = Math.max(1, Math.ceil(values.length / 80));\r\n for (let start = 0; start < values.length; start += bucket) {\r\n let low = start,\r\n high = start;\r\n for (let i = start; i < Math.min(values.length, start + bucket); i++) {\r\n if ((normalized[i] ?? 0) < (normalized[low] ?? 0)) low = i;\r\n if ((normalized[i] ?? 0) > (normalized[high] ?? 0)) high = i;\r\n }\r\n selected.add(low);\r\n selected.add(high);\r\n }\r\n return [...selected]\r\n .sort((a, b) => a - b)\r\n .map(\r\n (index) =>\r\n (values.length === 1 ? 100 : (index / (values.length - 1)) * 196 + 2).toFixed(2) +\r\n ',' +\r\n (max === min ? 24 : 44 - (((normalized[index] ?? 0) - min) / (max - min)) * 40).toFixed(\r\n 2,\r\n ),\r\n )\r\n .join(' ');\r\n });\r\n}\r\n","<svg viewBox=\"0 0 200 48\" preserveAspectRatio=\"none\" aria-hidden=\"true\">\r\n <polyline\r\n [attr.points]=\"points()\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke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,CAAA"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, afterNextRender, afterRenderEffect, computed, inject, input, signal, viewChild } from "@angular/core";
|
|
3
|
+
import { HyMotion } from "@hyalo/angular/motion";
|
|
4
|
+
var HySplitText = class HySplitText {
|
|
5
|
+
el = inject(ElementRef).nativeElement;
|
|
6
|
+
motion = inject(HyMotion);
|
|
7
|
+
destroyRef = inject(DestroyRef);
|
|
8
|
+
measure = viewChild.required("measure", ...ngDevMode ? [{ debugName: "measure" }] : /* istanbul ignore next */ []);
|
|
9
|
+
text = input.required(...ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []);
|
|
10
|
+
lines = signal([], ...ngDevMode ? [{ debugName: "lines" }] : /* istanbul ignore next */ []);
|
|
11
|
+
entered = signal(false, ...ngDevMode ? [{ debugName: "entered" }] : /* istanbul ignore next */ []);
|
|
12
|
+
ready = signal(false, ...ngDevMode ? [{ debugName: "ready" }] : /* istanbul ignore next */ []);
|
|
13
|
+
remeasure;
|
|
14
|
+
shown = computed(() => this.entered() || !this.motion.enabled(), ...ngDevMode ? [{ debugName: "shown" }] : /* istanbul ignore next */ []);
|
|
15
|
+
words = computed(() => this.text().split(/(\s+)/u), ...ngDevMode ? [{ debugName: "words" }] : /* istanbul ignore next */ []);
|
|
16
|
+
constructor() {
|
|
17
|
+
afterRenderEffect(() => {
|
|
18
|
+
this.text();
|
|
19
|
+
if (this.ready()) this.remeasure?.();
|
|
20
|
+
});
|
|
21
|
+
afterNextRender(() => {
|
|
22
|
+
let alive = true;
|
|
23
|
+
const split = () => {
|
|
24
|
+
const lines = [];
|
|
25
|
+
let top;
|
|
26
|
+
for (const child of Array.from(this.measure().nativeElement.children)) {
|
|
27
|
+
const y = child.getBoundingClientRect().top;
|
|
28
|
+
if (top === void 0 || Math.abs(y - top) > 2) {
|
|
29
|
+
lines.push(child.textContent ?? "");
|
|
30
|
+
top = y;
|
|
31
|
+
} else lines[lines.length - 1] += child.textContent ?? "";
|
|
32
|
+
}
|
|
33
|
+
this.lines.set(lines);
|
|
34
|
+
};
|
|
35
|
+
const resize = typeof ResizeObserver === "function" ? new ResizeObserver(split) : null;
|
|
36
|
+
this.remeasure = split;
|
|
37
|
+
resize?.observe(this.el);
|
|
38
|
+
this.el.ownerDocument.fonts?.ready.then(() => {
|
|
39
|
+
if (alive) split();
|
|
40
|
+
});
|
|
41
|
+
split();
|
|
42
|
+
this.ready.set(true);
|
|
43
|
+
const observer = typeof IntersectionObserver === "function" ? new IntersectionObserver(([entry]) => {
|
|
44
|
+
if (entry?.isIntersecting) {
|
|
45
|
+
this.entered.set(true);
|
|
46
|
+
observer?.disconnect();
|
|
47
|
+
}
|
|
48
|
+
}) : null;
|
|
49
|
+
if (observer) observer.observe(this.el);
|
|
50
|
+
else this.entered.set(true);
|
|
51
|
+
this.destroyRef.onDestroy(() => {
|
|
52
|
+
alive = false;
|
|
53
|
+
resize?.disconnect();
|
|
54
|
+
observer?.disconnect();
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
59
|
+
minVersion: "12.0.0",
|
|
60
|
+
version: "22.2.3",
|
|
61
|
+
ngImport: i0,
|
|
62
|
+
type: HySplitText,
|
|
63
|
+
deps: [],
|
|
64
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
65
|
+
});
|
|
66
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
67
|
+
minVersion: "17.0.0",
|
|
68
|
+
version: "22.2.3",
|
|
69
|
+
type: HySplitText,
|
|
70
|
+
isStandalone: true,
|
|
71
|
+
selector: "hy-split-text",
|
|
72
|
+
inputs: { text: {
|
|
73
|
+
classPropertyName: "text",
|
|
74
|
+
publicName: "text",
|
|
75
|
+
isSignal: true,
|
|
76
|
+
isRequired: true,
|
|
77
|
+
transformFunction: null
|
|
78
|
+
} },
|
|
79
|
+
host: { properties: { "attr.data-shown": "shown()" } },
|
|
80
|
+
viewQueries: [{
|
|
81
|
+
propertyName: "measure",
|
|
82
|
+
first: true,
|
|
83
|
+
predicate: ["measure"],
|
|
84
|
+
descendants: true,
|
|
85
|
+
isSignal: true
|
|
86
|
+
}],
|
|
87
|
+
ngImport: i0,
|
|
88
|
+
template: "<span class=\"accessible\">{{ text() }}</span>\r\n<span #measure class=\"measure\" aria-hidden=\"true\">\r\n @for (word of words(); track $index) {\r\n <span>{{ word }}</span>\r\n }\r\n</span>\r\n<span class=\"visual\" aria-hidden=\"true\">\r\n @for (line of lines(); track $index; let i = $index) {\r\n <span class=\"line\"\r\n ><span [style.transition-delay.ms]=\"i * 60\">{{ line }}</span></span\r\n >\r\n } @empty {\r\n {{ text() }}\r\n }\r\n</span>\r\n",
|
|
89
|
+
styles: [":host{display:block;position:relative}.accessible{position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.measure{position:absolute;inset:0;visibility:hidden;pointer-events:none;white-space:pre-wrap}.line{display:block;overflow:clip}.line>span{display:block;transition:transform var(--hy-dur-scene) var(--hy-ease-out),opacity var(--hy-dur-scene) var(--hy-ease-out)}:host([data-shown=\"false\"]) .line>span{transform:translateY(100%);opacity:0}@media(prefers-reduced-motion:reduce){.line>span{transform:none!important;opacity:1!important;transition:none}}\n"],
|
|
90
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
94
|
+
minVersion: "12.0.0",
|
|
95
|
+
version: "22.2.3",
|
|
96
|
+
ngImport: i0,
|
|
97
|
+
type: HySplitText,
|
|
98
|
+
decorators: [{
|
|
99
|
+
type: Component,
|
|
100
|
+
args: [{
|
|
101
|
+
selector: "hy-split-text",
|
|
102
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
103
|
+
host: { "[attr.data-shown]": "shown()" },
|
|
104
|
+
template: "<span class=\"accessible\">{{ text() }}</span>\r\n<span #measure class=\"measure\" aria-hidden=\"true\">\r\n @for (word of words(); track $index) {\r\n <span>{{ word }}</span>\r\n }\r\n</span>\r\n<span class=\"visual\" aria-hidden=\"true\">\r\n @for (line of lines(); track $index; let i = $index) {\r\n <span class=\"line\"\r\n ><span [style.transition-delay.ms]=\"i * 60\">{{ line }}</span></span\r\n >\r\n } @empty {\r\n {{ text() }}\r\n }\r\n</span>\r\n",
|
|
105
|
+
styles: [":host{display:block;position:relative}.accessible{position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.measure{position:absolute;inset:0;visibility:hidden;pointer-events:none;white-space:pre-wrap}.line{display:block;overflow:clip}.line>span{display:block;transition:transform var(--hy-dur-scene) var(--hy-ease-out),opacity var(--hy-dur-scene) var(--hy-ease-out)}:host([data-shown=\"false\"]) .line>span{transform:translateY(100%);opacity:0}@media(prefers-reduced-motion:reduce){.line>span{transform:none!important;opacity:1!important;transition:none}}\n"]
|
|
106
|
+
}]
|
|
107
|
+
}],
|
|
108
|
+
ctorParameters: () => [],
|
|
109
|
+
propDecorators: {
|
|
110
|
+
measure: [{
|
|
111
|
+
type: i0.ViewChild,
|
|
112
|
+
args: ["measure", { isSignal: true }]
|
|
113
|
+
}],
|
|
114
|
+
text: [{
|
|
115
|
+
type: i0.Input,
|
|
116
|
+
args: [{
|
|
117
|
+
isSignal: true,
|
|
118
|
+
alias: "text",
|
|
119
|
+
required: true
|
|
120
|
+
}]
|
|
121
|
+
}]
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
export { HySplitText };
|
|
125
|
+
|
|
126
|
+
//# sourceMappingURL=hyalo-angular-split-text.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hyalo-angular-split-text.mjs","names":[],"sources":["../../../projects/hyalo/split-text/split-text.ts","../../../projects/hyalo/split-text/split-text.html"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n DestroyRef,\r\n ElementRef,\r\n afterNextRender,\r\n afterRenderEffect,\r\n computed,\r\n inject,\r\n input,\r\n signal,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { HyMotion } from '@hyalo/angular/motion';\r\n/** Splits measured lines after hydration. The accessible text is read once. */\r\n@Component({\r\n selector: 'hy-split-text',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: { '[attr.data-shown]': 'shown()' },\r\n templateUrl: './split-text.html',\r\n styleUrl: './split-text.css',\r\n})\r\nexport class HySplitText {\r\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\r\n private readonly motion = inject(HyMotion);\r\n private readonly destroyRef = inject(DestroyRef);\r\n private readonly measure = viewChild.required<ElementRef<HTMLElement>>('measure');\r\n readonly text = input.required<string>();\r\n protected readonly lines = signal<readonly string[]>([]);\r\n private readonly entered = signal(false);\r\n private readonly ready = signal(false);\r\n private remeasure: (() => void) | undefined;\r\n protected readonly shown = computed(() => this.entered() || !this.motion.enabled());\r\n protected readonly words = computed(() => this.text().split(/(\\s+)/u));\r\n constructor() {\r\n afterRenderEffect(() => {\r\n this.text();\r\n if (this.ready()) this.remeasure?.();\r\n });\r\n afterNextRender(() => {\r\n let alive = true;\r\n const split = (): void => {\r\n const lines: string[] = [];\r\n let top: number | undefined;\r\n for (const child of Array.from(this.measure().nativeElement.children)) {\r\n const y = child.getBoundingClientRect().top;\r\n if (top === undefined || Math.abs(y - top) > 2) {\r\n lines.push(child.textContent ?? '');\r\n top = y;\r\n } else lines[lines.length - 1] += child.textContent ?? '';\r\n }\r\n this.lines.set(lines);\r\n };\r\n const resize = typeof ResizeObserver === 'function' ? new ResizeObserver(split) : null;\r\n this.remeasure = split;\r\n resize?.observe(this.el);\r\n void this.el.ownerDocument.fonts?.ready.then(() => {\r\n if (alive) split();\r\n });\r\n split();\r\n this.ready.set(true);\r\n const observer =\r\n typeof IntersectionObserver === 'function'\r\n ? new IntersectionObserver(([entry]) => {\r\n if (entry?.isIntersecting) {\r\n this.entered.set(true);\r\n observer?.disconnect();\r\n }\r\n })\r\n : null;\r\n if (observer) observer.observe(this.el);\r\n else this.entered.set(true);\r\n this.destroyRef.onDestroy(() => {\r\n alive = false;\r\n resize?.disconnect();\r\n observer?.disconnect();\r\n });\r\n });\r\n }\r\n}\r\n","<span class=\"accessible\">{{ text() }}</span>\r\n<span #measure class=\"measure\" aria-hidden=\"true\">\r\n @for (word of words(); track $index) {\r\n <span>{{ word }}</span>\r\n }\r\n</span>\r\n<span class=\"visual\" aria-hidden=\"true\">\r\n @for (line of lines(); track $index; let i = $index) {\r\n <span class=\"line\"\r\n ><span [style.transition-delay.ms]=\"i * 60\">{{ line }}</span></span\r\n >\r\n } @empty {\r\n {{ text() }}\r\n }\r\n</span>\r\n"],"mappings":";;;AAsBA,IAAa,cAAb,MAAa,YAAW;CACL,KAAK,OAAgC,UAAU,CAAC,CAAC;CACjD,SAAS,OAAO,QAAQ;CACxB,aAAa,OAAO,UAAU;CAC9B,UAAU,UAAU,SAAkC,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACxE,OAAO,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CACrB,QAAQ,OAA0B,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACvC,UAAU,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACvB,QAAQ,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAC9B;CACW,QAAQ,eAAe,KAAK,QAAO,KAAM,CAAC,KAAK,OAAO,QAAO,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAChE,QAAQ,eA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YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAW,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAX,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAW,cAAA;EAAA,UAAA;EAAA,QAAA,EAAA,MAAA;GAAA,mBAAA;GAAA,YAAA;GAAA,UAAA;GAAA,YAAA;GAAA,mBAAA;EAAA,EAAA;EAAA,MAAA,EAAA,YAAA,EAAA,mBAAA,UAAA,EAAA;EAAA,aAAA,CAAA;GAAA,cAAA;GAAA,OAAA;GAAA,WAAA,CAAA,SAAA;GAAA,aAAA;GAAA,UAAA;EAAA,CAAA;EAAA,UAAA;EAAA,UCtBxB;EAeA,QAAA,CAAA,gmBAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;ADOa,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAW,YAAA,CAAA;EAPvB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAe,iBACR,wBAAwB;GAAM,MACzC,EAAE,qBAAqB,UAAS;GAAE,UAAA;GAAA,QAAA,CAAA,gmBAAA;EAAA,CAAA;CAQ+B,CAAA;CAAA,sBAAA,CAAA;CAAA,gBAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,WAAS,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { HyNumberTicker } from "@hyalo/angular/number-ticker";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component, booleanAttribute, computed, input } from "@angular/core";
|
|
4
|
+
var HyStat = class HyStat {
|
|
5
|
+
value = input.required(...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
6
|
+
label = input.required(...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
7
|
+
trend = input("", ...ngDevMode ? [{ debugName: "trend" }] : /* istanbul ignore next */ []);
|
|
8
|
+
locale = input(...ngDevMode ? [void 0, { debugName: "locale" }] : /* istanbul ignore next */ []);
|
|
9
|
+
format = input({ maximumFractionDigits: 0 }, ...ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []);
|
|
10
|
+
animate = input(false, {
|
|
11
|
+
...ngDevMode ? { debugName: "animate" } : /* istanbul ignore next */ {},
|
|
12
|
+
transform: booleanAttribute
|
|
13
|
+
});
|
|
14
|
+
prefix = input("", ...ngDevMode ? [{ debugName: "prefix" }] : /* istanbul ignore next */ []);
|
|
15
|
+
suffix = input("", ...ngDevMode ? [{ debugName: "suffix" }] : /* istanbul ignore next */ []);
|
|
16
|
+
formatted = computed(() => this.prefix() + new Intl.NumberFormat(this.locale(), this.format()).format(Number.isFinite(this.value()) ? this.value() : 0) + this.suffix(), ...ngDevMode ? [{ debugName: "formatted" }] : /* istanbul ignore next */ []);
|
|
17
|
+
accessible = this.formatted;
|
|
18
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
19
|
+
minVersion: "12.0.0",
|
|
20
|
+
version: "22.2.3",
|
|
21
|
+
ngImport: i0,
|
|
22
|
+
type: HyStat,
|
|
23
|
+
deps: [],
|
|
24
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
25
|
+
});
|
|
26
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
27
|
+
minVersion: "17.0.0",
|
|
28
|
+
version: "22.2.3",
|
|
29
|
+
type: HyStat,
|
|
30
|
+
isStandalone: true,
|
|
31
|
+
selector: "hy-stat",
|
|
32
|
+
inputs: {
|
|
33
|
+
value: {
|
|
34
|
+
classPropertyName: "value",
|
|
35
|
+
publicName: "value",
|
|
36
|
+
isSignal: true,
|
|
37
|
+
isRequired: true,
|
|
38
|
+
transformFunction: null
|
|
39
|
+
},
|
|
40
|
+
label: {
|
|
41
|
+
classPropertyName: "label",
|
|
42
|
+
publicName: "label",
|
|
43
|
+
isSignal: true,
|
|
44
|
+
isRequired: true,
|
|
45
|
+
transformFunction: null
|
|
46
|
+
},
|
|
47
|
+
trend: {
|
|
48
|
+
classPropertyName: "trend",
|
|
49
|
+
publicName: "trend",
|
|
50
|
+
isSignal: true,
|
|
51
|
+
isRequired: false,
|
|
52
|
+
transformFunction: null
|
|
53
|
+
},
|
|
54
|
+
locale: {
|
|
55
|
+
classPropertyName: "locale",
|
|
56
|
+
publicName: "locale",
|
|
57
|
+
isSignal: true,
|
|
58
|
+
isRequired: false,
|
|
59
|
+
transformFunction: null
|
|
60
|
+
},
|
|
61
|
+
format: {
|
|
62
|
+
classPropertyName: "format",
|
|
63
|
+
publicName: "format",
|
|
64
|
+
isSignal: true,
|
|
65
|
+
isRequired: false,
|
|
66
|
+
transformFunction: null
|
|
67
|
+
},
|
|
68
|
+
animate: {
|
|
69
|
+
classPropertyName: "animate",
|
|
70
|
+
publicName: "animate",
|
|
71
|
+
isSignal: true,
|
|
72
|
+
isRequired: false,
|
|
73
|
+
transformFunction: null
|
|
74
|
+
},
|
|
75
|
+
prefix: {
|
|
76
|
+
classPropertyName: "prefix",
|
|
77
|
+
publicName: "prefix",
|
|
78
|
+
isSignal: true,
|
|
79
|
+
isRequired: false,
|
|
80
|
+
transformFunction: null
|
|
81
|
+
},
|
|
82
|
+
suffix: {
|
|
83
|
+
classPropertyName: "suffix",
|
|
84
|
+
publicName: "suffix",
|
|
85
|
+
isSignal: true,
|
|
86
|
+
isRequired: false,
|
|
87
|
+
transformFunction: null
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
ngImport: i0,
|
|
91
|
+
template: "<dl>\r\n <dt>{{ label() }}</dt>\r\n <dd>\r\n <hy-number-ticker\r\n [value]=\"value()\"\r\n [locale]=\"locale()\"\r\n [format]=\"format()\"\r\n [animate]=\"animate()\"\r\n [prefix]=\"prefix()\"\r\n [suffix]=\"suffix()\"\r\n />\r\n </dd>\r\n</dl>\r\n@if (trend()) {\r\n <p>{{ trend() }}</p>\r\n}\r\n<ng-content />\r\n",
|
|
92
|
+
styles: [":host{display:block;min-inline-size:0;padding:1.5rem;background:var(--hy-surface-1);border:1px solid var(--hy-line);border-radius:var(--hy-radius-l);color:var(--hy-ink)}dl,p{margin:0}dt{color:var(--hy-ink-2);font-size:.875rem}dd{margin:.5rem 0 0;font-weight:600;font-size:clamp(1.75rem,3vw,2.5rem);letter-spacing:-.04em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}p{color:var(--hy-ink-2);font-size:.8125rem;margin-block-start:.5rem}.sr{position:absolute;inline-size:1px;block-size:1px;clip-path:inset(50%);overflow:hidden}\n"],
|
|
93
|
+
dependencies: [{
|
|
94
|
+
kind: "component",
|
|
95
|
+
type: HyNumberTicker,
|
|
96
|
+
selector: "hy-number-ticker",
|
|
97
|
+
inputs: [
|
|
98
|
+
"value",
|
|
99
|
+
"locale",
|
|
100
|
+
"format",
|
|
101
|
+
"animate",
|
|
102
|
+
"prefix",
|
|
103
|
+
"suffix"
|
|
104
|
+
]
|
|
105
|
+
}],
|
|
106
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
107
|
+
});
|
|
108
|
+
};
|
|
109
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
110
|
+
minVersion: "12.0.0",
|
|
111
|
+
version: "22.2.3",
|
|
112
|
+
ngImport: i0,
|
|
113
|
+
type: HyStat,
|
|
114
|
+
decorators: [{
|
|
115
|
+
type: Component,
|
|
116
|
+
args: [{
|
|
117
|
+
selector: "hy-stat",
|
|
118
|
+
imports: [HyNumberTicker],
|
|
119
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
120
|
+
template: "<dl>\r\n <dt>{{ label() }}</dt>\r\n <dd>\r\n <hy-number-ticker\r\n [value]=\"value()\"\r\n [locale]=\"locale()\"\r\n [format]=\"format()\"\r\n [animate]=\"animate()\"\r\n [prefix]=\"prefix()\"\r\n [suffix]=\"suffix()\"\r\n />\r\n </dd>\r\n</dl>\r\n@if (trend()) {\r\n <p>{{ trend() }}</p>\r\n}\r\n<ng-content />\r\n",
|
|
121
|
+
styles: [":host{display:block;min-inline-size:0;padding:1.5rem;background:var(--hy-surface-1);border:1px solid var(--hy-line);border-radius:var(--hy-radius-l);color:var(--hy-ink)}dl,p{margin:0}dt{color:var(--hy-ink-2);font-size:.875rem}dd{margin:.5rem 0 0;font-weight:600;font-size:clamp(1.75rem,3vw,2.5rem);letter-spacing:-.04em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}p{color:var(--hy-ink-2);font-size:.8125rem;margin-block-start:.5rem}.sr{position:absolute;inline-size:1px;block-size:1px;clip-path:inset(50%);overflow:hidden}\n"]
|
|
122
|
+
}]
|
|
123
|
+
}],
|
|
124
|
+
propDecorators: {
|
|
125
|
+
value: [{
|
|
126
|
+
type: i0.Input,
|
|
127
|
+
args: [{
|
|
128
|
+
isSignal: true,
|
|
129
|
+
alias: "value",
|
|
130
|
+
required: true
|
|
131
|
+
}]
|
|
132
|
+
}],
|
|
133
|
+
label: [{
|
|
134
|
+
type: i0.Input,
|
|
135
|
+
args: [{
|
|
136
|
+
isSignal: true,
|
|
137
|
+
alias: "label",
|
|
138
|
+
required: true
|
|
139
|
+
}]
|
|
140
|
+
}],
|
|
141
|
+
trend: [{
|
|
142
|
+
type: i0.Input,
|
|
143
|
+
args: [{
|
|
144
|
+
isSignal: true,
|
|
145
|
+
alias: "trend",
|
|
146
|
+
required: false
|
|
147
|
+
}]
|
|
148
|
+
}],
|
|
149
|
+
locale: [{
|
|
150
|
+
type: i0.Input,
|
|
151
|
+
args: [{
|
|
152
|
+
isSignal: true,
|
|
153
|
+
alias: "locale",
|
|
154
|
+
required: false
|
|
155
|
+
}]
|
|
156
|
+
}],
|
|
157
|
+
format: [{
|
|
158
|
+
type: i0.Input,
|
|
159
|
+
args: [{
|
|
160
|
+
isSignal: true,
|
|
161
|
+
alias: "format",
|
|
162
|
+
required: false
|
|
163
|
+
}]
|
|
164
|
+
}],
|
|
165
|
+
animate: [{
|
|
166
|
+
type: i0.Input,
|
|
167
|
+
args: [{
|
|
168
|
+
isSignal: true,
|
|
169
|
+
alias: "animate",
|
|
170
|
+
required: false
|
|
171
|
+
}]
|
|
172
|
+
}],
|
|
173
|
+
prefix: [{
|
|
174
|
+
type: i0.Input,
|
|
175
|
+
args: [{
|
|
176
|
+
isSignal: true,
|
|
177
|
+
alias: "prefix",
|
|
178
|
+
required: false
|
|
179
|
+
}]
|
|
180
|
+
}],
|
|
181
|
+
suffix: [{
|
|
182
|
+
type: i0.Input,
|
|
183
|
+
args: [{
|
|
184
|
+
isSignal: true,
|
|
185
|
+
alias: "suffix",
|
|
186
|
+
required: false
|
|
187
|
+
}]
|
|
188
|
+
}]
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
export { HyStat };
|
|
192
|
+
|
|
193
|
+
//# sourceMappingURL=hyalo-angular-stat.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hyalo-angular-stat.mjs","names":[],"sources":["../../../projects/hyalo/stat/stat.ts","../../../projects/hyalo/stat/stat.html"],"sourcesContent":["import { HyNumberTicker } from '@hyalo/angular/number-ticker';\nimport {\n ChangeDetectionStrategy,\n Component,\n booleanAttribute,\n computed,\n input,\n} from '@angular/core';\n@Component({\n selector: 'hy-stat',\n imports: [HyNumberTicker],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './stat.html',\n styleUrl: './stat.css',\n})\nexport class HyStat {\n readonly value = input.required<number>();\n readonly label = input.required<string>();\n readonly trend = input('');\n readonly locale = input<string>();\n readonly format = input<Intl.NumberFormatOptions>({ maximumFractionDigits: 0 });\n readonly animate = input(false, { transform: booleanAttribute });\n readonly prefix = input('');\n readonly suffix = input('');\n readonly formatted = computed(\n () =>\n this.prefix() +\n new Intl.NumberFormat(this.locale(), this.format()).format(\n Number.isFinite(this.value()) ? this.value() : 0,\n ) +\n this.suffix(),\n );\n readonly accessible = this.formatted;\n}\n","<dl>\r\n <dt>{{ label() }}</dt>\r\n <dd>\r\n <hy-number-ticker\r\n [value]=\"value()\"\r\n [locale]=\"locale()\"\r\n [format]=\"format()\"\r\n [animate]=\"animate()\"\r\n [prefix]=\"prefix()\"\r\n [suffix]=\"suffix()\"\r\n />\r\n </dd>\r\n</dl>\r\n@if (trend()) {\r\n <p>{{ trend() }}</p>\r\n}\r\n<ng-content />\r\n"],"mappings":";;;AAeA,IAAa,SAAb,MAAa,OAAM;CACR,QAAQ,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAChC,QAAQ,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAChC,QAAQ,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACjB,SAAS,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CACxB,SAAS,MAAgC,EAAE,uBAAuB,EAAC,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CACtE,UAAU,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,UAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACpD,SAAS,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAClB,SAAS,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAClB,YAAY,eAEjB,KAAK,OAAM,IACX,IAAI,KAAK,aAAa,KAAK,OAAM,GAAI,KAAK,OAAM,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