@hyalo/angular 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/LICENSE +21 -0
- package/README.md +32 -3
- package/fesm2022/hyalo-angular-accordion.mjs +230 -0
- package/fesm2022/hyalo-angular-accordion.mjs.map +1 -0
- package/fesm2022/hyalo-angular-button.mjs +203 -0
- package/fesm2022/hyalo-angular-button.mjs.map +1 -0
- package/fesm2022/hyalo-angular-card.mjs +221 -0
- package/fesm2022/hyalo-angular-card.mjs.map +1 -0
- package/fesm2022/hyalo-angular-choice.mjs +788 -0
- package/fesm2022/hyalo-angular-choice.mjs.map +1 -0
- package/fesm2022/hyalo-angular-dialog.mjs +571 -0
- package/fesm2022/hyalo-angular-dialog.mjs.map +1 -0
- package/fesm2022/hyalo-angular-field.mjs +312 -0
- package/fesm2022/hyalo-angular-field.mjs.map +1 -0
- package/fesm2022/hyalo-angular-icon.mjs +343 -0
- package/fesm2022/hyalo-angular-icon.mjs.map +1 -0
- package/fesm2022/hyalo-angular-interaction.mjs +455 -0
- package/fesm2022/hyalo-angular-interaction.mjs.map +1 -0
- package/fesm2022/hyalo-angular-navbar.mjs +343 -0
- package/fesm2022/hyalo-angular-navbar.mjs.map +1 -0
- package/fesm2022/hyalo-angular-overlay.mjs +94 -0
- package/fesm2022/hyalo-angular-overlay.mjs.map +1 -0
- package/fesm2022/hyalo-angular-popover-overlay-kit-6wPwnxln.mjs +3 -0
- package/fesm2022/hyalo-angular-popover.mjs +487 -0
- package/fesm2022/hyalo-angular-popover.mjs.map +1 -0
- package/fesm2022/hyalo-angular-segmented.mjs +223 -0
- package/fesm2022/hyalo-angular-segmented.mjs.map +1 -0
- package/fesm2022/hyalo-angular-select.mjs +464 -0
- package/fesm2022/hyalo-angular-select.mjs.map +1 -0
- package/fesm2022/hyalo-angular-tabs.mjs +324 -0
- package/fesm2022/hyalo-angular-tabs.mjs.map +1 -0
- package/fesm2022/hyalo-angular-theme.mjs +94 -0
- package/fesm2022/hyalo-angular-theme.mjs.map +1 -0
- package/fesm2022/hyalo-angular-toast.mjs +322 -0
- package/fesm2022/hyalo-angular-toast.mjs.map +1 -0
- package/fesm2022/hyalo-angular.mjs +473 -0
- package/fesm2022/hyalo-angular.mjs.map +1 -0
- package/package.json +133 -3
- package/styles/hyalo-core.css +25 -0
- package/styles/hyalo.css +17 -0
- package/styles/overlays/dialog.css +9 -0
- package/styles/overlays/popover.css +9 -0
- package/styles/overlays/select.css +9 -0
- package/styles/overlays/toast.css +8 -0
- package/styles/palettes/aurora.css +47 -0
- package/styles/palettes/ember.css +47 -0
- package/styles/palettes/graphite.css +47 -0
- package/styles/palettes/ocean.css +47 -0
- package/styles/palettes/orchid.css +47 -0
- package/styles/palettes/rose.css +47 -0
- package/styles/parts/card.css +49 -0
- package/styles/parts/dialog.css +116 -0
- package/styles/parts/drawer.css +124 -0
- package/styles/parts/field.css +36 -0
- package/styles/parts/glass.css +137 -0
- package/styles/parts/motion.css +82 -0
- package/styles/parts/navbar.css +55 -0
- package/styles/parts/popover.css +27 -0
- package/styles/parts/presence.css +55 -0
- package/styles/parts/reset.css +42 -0
- package/styles/parts/select.css +46 -0
- package/styles/parts/themes.css +105 -0
- package/styles/parts/toast.css +128 -0
- package/styles/parts/tokens.css +151 -0
- package/styles/parts/typography.css +64 -0
- package/types/hyalo-angular-accordion.d.ts +74 -0
- package/types/hyalo-angular-button.d.ts +88 -0
- package/types/hyalo-angular-card.d.ts +61 -0
- package/types/hyalo-angular-choice.d.ts +259 -0
- package/types/hyalo-angular-dialog.d.ts +170 -0
- package/types/hyalo-angular-field.d.ts +135 -0
- package/types/hyalo-angular-icon.d.ts +122 -0
- package/types/hyalo-angular-interaction.d.ts +131 -0
- package/types/hyalo-angular-navbar.d.ts +110 -0
- package/types/hyalo-angular-overlay.d.ts +31 -0
- package/types/hyalo-angular-popover.d.ts +142 -0
- package/types/hyalo-angular-segmented.d.ts +79 -0
- package/types/hyalo-angular-select.d.ts +130 -0
- package/types/hyalo-angular-tabs.d.ts +102 -0
- package/types/hyalo-angular-theme.d.ts +46 -0
- package/types/hyalo-angular-toast.d.ts +79 -0
- package/types/hyalo-angular.d.ts +345 -0
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { DOCUMENT, DestroyRef, Directive, ElementRef, Injectable, InjectionToken, PLATFORM_ID, afterNextRender, afterRenderEffect, computed, effect, inject, input, signal } from "@angular/core";
|
|
3
|
+
import { FocusMonitor, _IdGenerator } from "@angular/cdk/a11y";
|
|
4
|
+
import { isPlatformBrowser } from "@angular/common";
|
|
5
|
+
const DEFAULTS = {
|
|
6
|
+
material: "frosted",
|
|
7
|
+
size: "md",
|
|
8
|
+
tone: "primary"
|
|
9
|
+
};
|
|
10
|
+
const HY_CONFIG = new InjectionToken("HY_CONFIG", {
|
|
11
|
+
providedIn: "root",
|
|
12
|
+
factory: () => DEFAULTS
|
|
13
|
+
});
|
|
14
|
+
function provideHyalo(config = {}) {
|
|
15
|
+
return {
|
|
16
|
+
provide: HY_CONFIG,
|
|
17
|
+
useFactory: () => {
|
|
18
|
+
return {
|
|
19
|
+
...inject(HY_CONFIG, {
|
|
20
|
+
skipSelf: true,
|
|
21
|
+
optional: true
|
|
22
|
+
}) ?? DEFAULTS,
|
|
23
|
+
...config
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function injectId(prefix) {
|
|
29
|
+
return inject(_IdGenerator).getId(`hy-${prefix}-`);
|
|
30
|
+
}
|
|
31
|
+
function injectIsBrowser() {
|
|
32
|
+
return isPlatformBrowser(inject(PLATFORM_ID));
|
|
33
|
+
}
|
|
34
|
+
function matchesMedia(query) {
|
|
35
|
+
return typeof matchMedia === "function" && matchMedia(query).matches;
|
|
36
|
+
}
|
|
37
|
+
function detectFidelity(nav) {
|
|
38
|
+
if (nav.connection?.saveData) return "low";
|
|
39
|
+
const memory = nav.deviceMemory ?? 8;
|
|
40
|
+
const cores = nav.hardwareConcurrency ?? 8;
|
|
41
|
+
if (memory <= 2 || cores <= 2) return "low";
|
|
42
|
+
if (memory <= 4 || cores <= 4 || matchesMedia("(pointer: coarse)")) return "medium";
|
|
43
|
+
return "high";
|
|
44
|
+
}
|
|
45
|
+
var HyFidelity = class HyFidelity {
|
|
46
|
+
config = inject(HY_CONFIG);
|
|
47
|
+
document = inject(DOCUMENT);
|
|
48
|
+
_tier = signal(this.config.fidelity ?? "medium", ...ngDevMode ? [{ debugName: "_tier" }] : /* istanbul ignore next */ []);
|
|
49
|
+
overridden = !!this.config.fidelity;
|
|
50
|
+
tier = this._tier.asReadonly();
|
|
51
|
+
constructor() {
|
|
52
|
+
if (!injectIsBrowser()) return;
|
|
53
|
+
afterNextRender(() => {
|
|
54
|
+
if (!this.overridden) this._tier.set(detectFidelity(navigator));
|
|
55
|
+
});
|
|
56
|
+
effect(() => this.document.documentElement.setAttribute("data-hy-fidelity", this._tier()));
|
|
57
|
+
}
|
|
58
|
+
setTier(tier) {
|
|
59
|
+
this.overridden = true;
|
|
60
|
+
this._tier.set(tier);
|
|
61
|
+
}
|
|
62
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
63
|
+
minVersion: "12.0.0",
|
|
64
|
+
version: "22.2.3",
|
|
65
|
+
ngImport: i0,
|
|
66
|
+
type: HyFidelity,
|
|
67
|
+
deps: [],
|
|
68
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
69
|
+
});
|
|
70
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
71
|
+
minVersion: "12.0.0",
|
|
72
|
+
version: "22.2.3",
|
|
73
|
+
ngImport: i0,
|
|
74
|
+
type: HyFidelity,
|
|
75
|
+
providedIn: "root"
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
79
|
+
minVersion: "12.0.0",
|
|
80
|
+
version: "22.2.3",
|
|
81
|
+
ngImport: i0,
|
|
82
|
+
type: HyFidelity,
|
|
83
|
+
decorators: [{
|
|
84
|
+
type: Injectable,
|
|
85
|
+
args: [{ providedIn: "root" }]
|
|
86
|
+
}],
|
|
87
|
+
ctorParameters: () => []
|
|
88
|
+
});
|
|
89
|
+
const MOTION = {
|
|
90
|
+
settle: {
|
|
91
|
+
duration: .44,
|
|
92
|
+
ease: "power3.out",
|
|
93
|
+
css: "cubic-bezier(0.215, 0.61, 0.355, 1)"
|
|
94
|
+
},
|
|
95
|
+
pop: {
|
|
96
|
+
duration: .5,
|
|
97
|
+
ease: "back.out(1.5)",
|
|
98
|
+
css: "cubic-bezier(0.34, 1.56, 0.64, 1)"
|
|
99
|
+
},
|
|
100
|
+
quick: {
|
|
101
|
+
duration: .22,
|
|
102
|
+
ease: "power2.out",
|
|
103
|
+
css: "cubic-bezier(0.25, 0.46, 0.45, 0.94)"
|
|
104
|
+
},
|
|
105
|
+
scene: {
|
|
106
|
+
duration: .9,
|
|
107
|
+
ease: "expo.out",
|
|
108
|
+
css: "cubic-bezier(0.16, 1, 0.3, 1)"
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
var HyMotion = class HyMotion {
|
|
112
|
+
config = inject(HY_CONFIG);
|
|
113
|
+
fidelity = inject(HyFidelity);
|
|
114
|
+
document = inject(DOCUMENT);
|
|
115
|
+
isBrowser = injectIsBrowser();
|
|
116
|
+
_reduced = signal(false, ...ngDevMode ? [{ debugName: "_reduced" }] : /* istanbul ignore next */ []);
|
|
117
|
+
gsapPromise;
|
|
118
|
+
reduced = this._reduced.asReadonly();
|
|
119
|
+
enabled = computed(() => !this._reduced() && this.fidelity.tier() !== "low", ...ngDevMode ? [{ debugName: "enabled" }] : /* istanbul ignore next */ []);
|
|
120
|
+
constructor() {
|
|
121
|
+
if (!this.isBrowser || typeof matchMedia !== "function") return;
|
|
122
|
+
const query = matchMedia("(prefers-reduced-motion: reduce)");
|
|
123
|
+
const forced = this.document.documentElement.getAttribute("data-hy-motion");
|
|
124
|
+
this._reduced.set(forced ? forced === "reduced" : query.matches);
|
|
125
|
+
query.addEventListener("change", (event) => {
|
|
126
|
+
if (!this.document.documentElement.hasAttribute("data-hy-motion")) this._reduced.set(event.matches);
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
setReduced(reduced) {
|
|
130
|
+
const root = this.document.documentElement;
|
|
131
|
+
if (reduced === null) {
|
|
132
|
+
root.removeAttribute("data-hy-motion");
|
|
133
|
+
this._reduced.set(matchesMedia("(prefers-reduced-motion: reduce)"));
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
root.setAttribute("data-hy-motion", reduced ? "reduced" : "full");
|
|
137
|
+
this._reduced.set(reduced);
|
|
138
|
+
}
|
|
139
|
+
gsap() {
|
|
140
|
+
const loader = this.config.gsap;
|
|
141
|
+
if (!this.isBrowser || !loader) return Promise.resolve(null);
|
|
142
|
+
this.gsapPromise ??= loader().catch(() => null);
|
|
143
|
+
return this.gsapPromise;
|
|
144
|
+
}
|
|
145
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
146
|
+
minVersion: "12.0.0",
|
|
147
|
+
version: "22.2.3",
|
|
148
|
+
ngImport: i0,
|
|
149
|
+
type: HyMotion,
|
|
150
|
+
deps: [],
|
|
151
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
152
|
+
});
|
|
153
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
154
|
+
minVersion: "12.0.0",
|
|
155
|
+
version: "22.2.3",
|
|
156
|
+
ngImport: i0,
|
|
157
|
+
type: HyMotion,
|
|
158
|
+
providedIn: "root"
|
|
159
|
+
});
|
|
160
|
+
};
|
|
161
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
162
|
+
minVersion: "12.0.0",
|
|
163
|
+
version: "22.2.3",
|
|
164
|
+
ngImport: i0,
|
|
165
|
+
type: HyMotion,
|
|
166
|
+
decorators: [{
|
|
167
|
+
type: Injectable,
|
|
168
|
+
args: [{ providedIn: "root" }]
|
|
169
|
+
}],
|
|
170
|
+
ctorParameters: () => []
|
|
171
|
+
});
|
|
172
|
+
const SPRINGS = {
|
|
173
|
+
settle: {
|
|
174
|
+
damping: 1,
|
|
175
|
+
response: .4
|
|
176
|
+
},
|
|
177
|
+
momentum: {
|
|
178
|
+
damping: .8,
|
|
179
|
+
response: .3
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
const STEP = 1 / 240;
|
|
183
|
+
const REST_DELTA = .1;
|
|
184
|
+
const REST_VELOCITY = 2;
|
|
185
|
+
var HySpring = class {
|
|
186
|
+
onUpdate;
|
|
187
|
+
value;
|
|
188
|
+
velocity = 0;
|
|
189
|
+
target = 0;
|
|
190
|
+
config = SPRINGS.settle;
|
|
191
|
+
onRest = null;
|
|
192
|
+
frame = 0;
|
|
193
|
+
last = 0;
|
|
194
|
+
constructor(initial, onUpdate) {
|
|
195
|
+
this.onUpdate = onUpdate;
|
|
196
|
+
this.value = initial;
|
|
197
|
+
}
|
|
198
|
+
get running() {
|
|
199
|
+
return this.frame !== 0;
|
|
200
|
+
}
|
|
201
|
+
to(target, options = {}) {
|
|
202
|
+
this.target = target;
|
|
203
|
+
this.config = {
|
|
204
|
+
damping: options.damping ?? SPRINGS.settle.damping,
|
|
205
|
+
response: options.response ?? SPRINGS.settle.response
|
|
206
|
+
};
|
|
207
|
+
if (options.velocity !== void 0) this.velocity = options.velocity;
|
|
208
|
+
this.onRest = options.onRest ?? null;
|
|
209
|
+
if (this.frame) return;
|
|
210
|
+
this.last = performance.now();
|
|
211
|
+
this.frame = requestAnimationFrame(this.tick);
|
|
212
|
+
}
|
|
213
|
+
set(value) {
|
|
214
|
+
this.stop();
|
|
215
|
+
this.value = value;
|
|
216
|
+
this.velocity = 0;
|
|
217
|
+
this.onUpdate(value);
|
|
218
|
+
}
|
|
219
|
+
stop() {
|
|
220
|
+
cancelAnimationFrame(this.frame);
|
|
221
|
+
this.frame = 0;
|
|
222
|
+
this.onRest = null;
|
|
223
|
+
}
|
|
224
|
+
tick = (now) => {
|
|
225
|
+
const dt = Math.max(0, Math.min((now - this.last) / 1e3, 1 / 15));
|
|
226
|
+
this.last = Math.max(now, this.last);
|
|
227
|
+
const stiffness = (2 * Math.PI / this.config.response) ** 2;
|
|
228
|
+
const friction = 4 * Math.PI * this.config.damping / this.config.response;
|
|
229
|
+
const steps = Math.ceil(dt / Math.min(STEP, this.config.response / 60));
|
|
230
|
+
const h = dt / steps;
|
|
231
|
+
for (let i = 0; i < steps; i++) {
|
|
232
|
+
this.velocity += (-stiffness * (this.value - this.target) - friction * this.velocity) * h;
|
|
233
|
+
this.value += this.velocity * h;
|
|
234
|
+
}
|
|
235
|
+
if (Math.abs(this.velocity) < REST_VELOCITY && Math.abs(this.value - this.target) < REST_DELTA) {
|
|
236
|
+
this.value = this.target;
|
|
237
|
+
this.velocity = 0;
|
|
238
|
+
this.frame = 0;
|
|
239
|
+
const done = this.onRest;
|
|
240
|
+
this.onRest = null;
|
|
241
|
+
this.onUpdate(this.value);
|
|
242
|
+
done?.();
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
this.onUpdate(this.value);
|
|
246
|
+
this.frame = requestAnimationFrame(this.tick);
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
function project(velocity, decelerationRate = .998) {
|
|
250
|
+
return velocity / 1e3 * decelerationRate / (1 - decelerationRate);
|
|
251
|
+
}
|
|
252
|
+
function rubberband(overshoot, dimension, constant = .55) {
|
|
253
|
+
if (dimension <= 0) return 0;
|
|
254
|
+
const x = Math.abs(overshoot);
|
|
255
|
+
return Math.sign(overshoot) * (x * dimension * constant) / (dimension + constant * x);
|
|
256
|
+
}
|
|
257
|
+
var HyVelocityTracker = class {
|
|
258
|
+
samples = [];
|
|
259
|
+
add(value, time = performance.now()) {
|
|
260
|
+
this.samples.push({
|
|
261
|
+
t: time,
|
|
262
|
+
v: value
|
|
263
|
+
});
|
|
264
|
+
while (this.samples.length > 2 && time - (this.samples[0]?.t ?? time) > 100) this.samples.shift();
|
|
265
|
+
}
|
|
266
|
+
reset() {
|
|
267
|
+
this.samples = [];
|
|
268
|
+
}
|
|
269
|
+
velocity(now = performance.now()) {
|
|
270
|
+
const recent = this.samples.filter((s) => now - s.t <= 100);
|
|
271
|
+
const first = recent[0];
|
|
272
|
+
const last = recent[recent.length - 1];
|
|
273
|
+
if (!first || !last || last.t === first.t) return 0;
|
|
274
|
+
return (last.v - first.v) / (last.t - first.t) * 1e3;
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
var HyMaterialDirective = class HyMaterialDirective {
|
|
278
|
+
config = inject(HY_CONFIG);
|
|
279
|
+
fidelity = inject(HyFidelity);
|
|
280
|
+
material = input(void 0, {
|
|
281
|
+
...ngDevMode ? { debugName: "material" } : /* istanbul ignore next */ {},
|
|
282
|
+
alias: "hyMaterial"
|
|
283
|
+
});
|
|
284
|
+
thickness = input("regular", ...ngDevMode ? [{ debugName: "thickness" }] : /* istanbul ignore next */ []);
|
|
285
|
+
resolved = computed(() => {
|
|
286
|
+
if (this.fidelity.tier() === "low") return "solid";
|
|
287
|
+
return this.material() || this.config.material;
|
|
288
|
+
}, ...ngDevMode ? [{ debugName: "resolved" }] : /* istanbul ignore next */ []);
|
|
289
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
290
|
+
minVersion: "12.0.0",
|
|
291
|
+
version: "22.2.3",
|
|
292
|
+
ngImport: i0,
|
|
293
|
+
type: HyMaterialDirective,
|
|
294
|
+
deps: [],
|
|
295
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
296
|
+
});
|
|
297
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
298
|
+
minVersion: "17.1.0",
|
|
299
|
+
version: "22.2.3",
|
|
300
|
+
type: HyMaterialDirective,
|
|
301
|
+
isStandalone: true,
|
|
302
|
+
selector: "[hyMaterial]",
|
|
303
|
+
inputs: {
|
|
304
|
+
material: {
|
|
305
|
+
classPropertyName: "material",
|
|
306
|
+
publicName: "hyMaterial",
|
|
307
|
+
isSignal: true,
|
|
308
|
+
isRequired: false,
|
|
309
|
+
transformFunction: null
|
|
310
|
+
},
|
|
311
|
+
thickness: {
|
|
312
|
+
classPropertyName: "thickness",
|
|
313
|
+
publicName: "thickness",
|
|
314
|
+
isSignal: true,
|
|
315
|
+
isRequired: false,
|
|
316
|
+
transformFunction: null
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
host: {
|
|
320
|
+
properties: {
|
|
321
|
+
"attr.data-material": "resolved()",
|
|
322
|
+
"attr.data-thickness": "thickness() === \"regular\" ? null : thickness()"
|
|
323
|
+
},
|
|
324
|
+
classAttribute: "hy-glass"
|
|
325
|
+
},
|
|
326
|
+
ngImport: i0
|
|
327
|
+
});
|
|
328
|
+
};
|
|
329
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
330
|
+
minVersion: "12.0.0",
|
|
331
|
+
version: "22.2.3",
|
|
332
|
+
ngImport: i0,
|
|
333
|
+
type: HyMaterialDirective,
|
|
334
|
+
decorators: [{
|
|
335
|
+
type: Directive,
|
|
336
|
+
args: [{
|
|
337
|
+
selector: "[hyMaterial]",
|
|
338
|
+
host: {
|
|
339
|
+
class: "hy-glass",
|
|
340
|
+
"[attr.data-material]": "resolved()",
|
|
341
|
+
"[attr.data-thickness]": "thickness() === \"regular\" ? null : thickness()"
|
|
342
|
+
}
|
|
343
|
+
}]
|
|
344
|
+
}],
|
|
345
|
+
propDecorators: {
|
|
346
|
+
material: [{
|
|
347
|
+
type: i0.Input,
|
|
348
|
+
args: [{
|
|
349
|
+
isSignal: true,
|
|
350
|
+
alias: "hyMaterial",
|
|
351
|
+
required: false
|
|
352
|
+
}]
|
|
353
|
+
}],
|
|
354
|
+
thickness: [{
|
|
355
|
+
type: i0.Input,
|
|
356
|
+
args: [{
|
|
357
|
+
isSignal: true,
|
|
358
|
+
alias: "thickness",
|
|
359
|
+
required: false
|
|
360
|
+
}]
|
|
361
|
+
}]
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
var HyInteractive = class HyInteractive {
|
|
365
|
+
host = inject(ElementRef);
|
|
366
|
+
focusMonitor = inject(FocusMonitor);
|
|
367
|
+
hovered = signal(false, ...ngDevMode ? [{ debugName: "hovered" }] : /* istanbul ignore next */ []);
|
|
368
|
+
pressed = signal(false, ...ngDevMode ? [{ debugName: "pressed" }] : /* istanbul ignore next */ []);
|
|
369
|
+
focusVisible = signal(false, ...ngDevMode ? [{ debugName: "focusVisible" }] : /* istanbul ignore next */ []);
|
|
370
|
+
constructor() {
|
|
371
|
+
afterNextRender(() => {
|
|
372
|
+
this.focusMonitor.monitor(this.host).subscribe((origin) => {
|
|
373
|
+
this.focusVisible.set(origin === "keyboard");
|
|
374
|
+
});
|
|
375
|
+
});
|
|
376
|
+
inject(DestroyRef).onDestroy(() => this.focusMonitor.stopMonitoring(this.host));
|
|
377
|
+
}
|
|
378
|
+
onEnter(event) {
|
|
379
|
+
if (event.pointerType !== "touch") this.hovered.set(true);
|
|
380
|
+
}
|
|
381
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
382
|
+
minVersion: "12.0.0",
|
|
383
|
+
version: "22.2.3",
|
|
384
|
+
ngImport: i0,
|
|
385
|
+
type: HyInteractive,
|
|
386
|
+
deps: [],
|
|
387
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
388
|
+
});
|
|
389
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
390
|
+
minVersion: "14.0.0",
|
|
391
|
+
version: "22.2.3",
|
|
392
|
+
type: HyInteractive,
|
|
393
|
+
isStandalone: true,
|
|
394
|
+
selector: "[hyInteractive]",
|
|
395
|
+
host: {
|
|
396
|
+
listeners: {
|
|
397
|
+
"pointerenter": "onEnter($event)",
|
|
398
|
+
"pointerleave": "hovered.set(false); pressed.set(false)",
|
|
399
|
+
"pointerdown": "pressed.set(true)",
|
|
400
|
+
"pointerup": "pressed.set(false)",
|
|
401
|
+
"pointercancel": "pressed.set(false)"
|
|
402
|
+
},
|
|
403
|
+
properties: {
|
|
404
|
+
"attr.data-hover": "hovered() || null",
|
|
405
|
+
"attr.data-press": "pressed() || null",
|
|
406
|
+
"attr.data-focus-visible": "focusVisible() || null"
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
ngImport: i0
|
|
410
|
+
});
|
|
411
|
+
};
|
|
412
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
413
|
+
minVersion: "12.0.0",
|
|
414
|
+
version: "22.2.3",
|
|
415
|
+
ngImport: i0,
|
|
416
|
+
type: HyInteractive,
|
|
417
|
+
decorators: [{
|
|
418
|
+
type: Directive,
|
|
419
|
+
args: [{
|
|
420
|
+
selector: "[hyInteractive]",
|
|
421
|
+
host: {
|
|
422
|
+
"[attr.data-hover]": "hovered() || null",
|
|
423
|
+
"[attr.data-press]": "pressed() || null",
|
|
424
|
+
"[attr.data-focus-visible]": "focusVisible() || null",
|
|
425
|
+
"(pointerenter)": "onEnter($event)",
|
|
426
|
+
"(pointerleave)": "hovered.set(false); pressed.set(false)",
|
|
427
|
+
"(pointerdown)": "pressed.set(true)",
|
|
428
|
+
"(pointerup)": "pressed.set(false)",
|
|
429
|
+
"(pointercancel)": "pressed.set(false)"
|
|
430
|
+
}
|
|
431
|
+
}]
|
|
432
|
+
}],
|
|
433
|
+
ctorParameters: () => []
|
|
434
|
+
});
|
|
435
|
+
function trackIndicator(container, selected) {
|
|
436
|
+
const ready = signal(false, ...ngDevMode ? [{ debugName: "ready" }] : /* istanbul ignore next */ []);
|
|
437
|
+
const size = signal(0, ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
438
|
+
const destroyRef = inject(DestroyRef);
|
|
439
|
+
afterNextRender(() => {
|
|
440
|
+
const row = container()?.nativeElement;
|
|
441
|
+
if (!row || typeof ResizeObserver !== "function") return;
|
|
442
|
+
const observer = new ResizeObserver(() => size.update((v) => v + 1));
|
|
443
|
+
observer.observe(row);
|
|
444
|
+
destroyRef.onDestroy(() => observer.disconnect());
|
|
445
|
+
});
|
|
446
|
+
afterRenderEffect({
|
|
447
|
+
earlyRead: () => {
|
|
448
|
+
size();
|
|
449
|
+
const row = container()?.nativeElement;
|
|
450
|
+
const item = selected();
|
|
451
|
+
if (!row || !item) return null;
|
|
452
|
+
const rowRect = row.getBoundingClientRect();
|
|
453
|
+
const rect = item.getBoundingClientRect();
|
|
454
|
+
const scale = row.offsetWidth ? rowRect.width / row.offsetWidth : 1;
|
|
455
|
+
return {
|
|
456
|
+
row,
|
|
457
|
+
x: (rect.left - rowRect.left) / scale + row.scrollLeft,
|
|
458
|
+
size: rect.width / scale
|
|
459
|
+
};
|
|
460
|
+
},
|
|
461
|
+
write: (measured) => {
|
|
462
|
+
const m = measured();
|
|
463
|
+
if (!m) return;
|
|
464
|
+
m.row.style.setProperty("--hy-ind-x", `${m.x}px`);
|
|
465
|
+
m.row.style.setProperty("--hy-ind-size", `${m.size}px`);
|
|
466
|
+
if (!ready()) requestAnimationFrame(() => ready.set(true));
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
return ready.asReadonly();
|
|
470
|
+
}
|
|
471
|
+
export { HY_CONFIG, HyFidelity, HyInteractive, HyMaterialDirective, HyMotion, HySpring, HyVelocityTracker, MOTION, SPRINGS, detectFidelity, injectId, project, provideHyalo, rubberband, injectIsBrowser as ɵinjectIsBrowser, matchesMedia as ɵmatchesMedia, trackIndicator as ɵtrackIndicator };
|
|
472
|
+
|
|
473
|
+
//# sourceMappingURL=hyalo-angular.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hyalo-angular.mjs","names":[],"sources":["../../../projects/hyalo/src/lib/core/config.ts","../../../projects/hyalo/src/lib/core/ids.ts","../../../projects/hyalo/src/lib/core/platform.ts","../../../projects/hyalo/src/lib/fidelity/fidelity.ts","../../../projects/hyalo/src/lib/motion/motion.ts","../../../projects/hyalo/src/lib/motion/spring.ts","../../../projects/hyalo/src/lib/material/material.ts","../../../projects/hyalo/src/lib/interaction/state.ts","../../../projects/hyalo/src/lib/core/indicator.ts"],"sourcesContent":["import { InjectionToken, Provider, inject } from '@angular/core';\nimport type { HyFidelityTier, HyMaterial, HySize, HyTone } from './axes';\nimport type { HyGsapLoader } from './gsap';\n\n/** Global defaults read by every Hyalo component. */\nexport interface HyConfig {\n /** Default material for glass surfaces. */\n readonly material: HyMaterial;\n /** Default control size. */\n readonly size: HySize;\n /** Default tone for buttons and other coloured controls. */\n readonly tone: HyTone;\n /**\n * Forces a fidelity tier instead of detecting it. Handy for tests,\n * screenshots and low-end kiosks.\n */\n readonly fidelity?: HyFidelityTier;\n /**\n * Loads GSAP on demand. Without it, Hyalo falls back to CSS transitions,\n * so GSAP stays an optional dependency.\n *\n * ```ts\n * provideHyalo({ gsap: () => import('gsap').then((m) => m.gsap) })\n * ```\n */\n readonly gsap?: HyGsapLoader;\n /**\n * Maps a palette name to its stylesheet URL for HyPalette. Defaults to\n * `palette-<name>.css`, which is what a non-injected `bundleName` entry\n * in angular.json produces.\n */\n readonly paletteHref?: (name: string) => string;\n}\n\nconst DEFAULTS: HyConfig = {\n material: 'frosted',\n size: 'md',\n tone: 'primary',\n};\n\n/** Resolved Hyalo configuration. Use {@link provideHyalo} to change it. */\nexport const HY_CONFIG = new InjectionToken<HyConfig>('HY_CONFIG', {\n providedIn: 'root',\n factory: () => DEFAULTS,\n});\n\n/**\n * Sets Hyalo defaults. Works in `app.config.ts` and in a component's\n * `providers`, where it merges with whatever the parent injector provides.\n * That makes it easy to switch one section of a page to `solid`, for example.\n */\nexport function provideHyalo(config: Partial<HyConfig> = {}): Provider {\n return {\n provide: HY_CONFIG,\n useFactory: (): HyConfig => {\n const parent = inject(HY_CONFIG, { skipSelf: true, optional: true }) ?? DEFAULTS;\n return { ...parent, ...config };\n },\n };\n}\n","import { inject } from '@angular/core';\nimport { _IdGenerator } from '@angular/cdk/a11y';\n\n/**\n * Returns a unique id with the given prefix. The counter is per application,\n * so the server and the client produce the same ids during hydration.\n */\nexport function injectId(prefix: string): string {\n return inject(_IdGenerator).getId(`hy-${prefix}-`);\n}\n","import { PLATFORM_ID, inject } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\n/** True in the browser, false during server rendering. Call in an injection context. */\nexport function injectIsBrowser(): boolean {\n return isPlatformBrowser(inject(PLATFORM_ID));\n}\n\n/** Reads a media query once. Always false on the server. */\nexport function matchesMedia(query: string): boolean {\n return typeof matchMedia === 'function' && matchMedia(query).matches;\n}\n","import { DOCUMENT, Injectable, afterNextRender, effect, inject, signal } from '@angular/core';\nimport { HY_CONFIG } from '../core/config';\nimport type { HyFidelityTier } from '../core/axes';\nimport { injectIsBrowser, matchesMedia } from '../core/platform';\n\nexport type { HyFidelityTier };\n\ninterface NavigatorHints {\n readonly deviceMemory?: number;\n readonly hardwareConcurrency?: number;\n readonly connection?: { readonly saveData?: boolean };\n}\n\n/**\n * Picks a tier from what the browser reports. Exported for tests and for\n * apps that want to run the same check themselves.\n *\n * Reduced motion is not a reason to drop a tier: it asks for less movement,\n * not for less glass. HyMotion already turns off decorative motion for it,\n * and reduced transparency is handled in CSS.\n */\nexport function detectFidelity(nav: NavigatorHints): HyFidelityTier {\n if (nav.connection?.saveData) return 'low';\n const memory = nav.deviceMemory ?? 8;\n const cores = nav.hardwareConcurrency ?? 8;\n if (memory <= 2 || cores <= 2) return 'low';\n if (memory <= 4 || cores <= 4 || matchesMedia('(pointer: coarse)')) return 'medium';\n return 'high';\n}\n\n/**\n * Holds the current fidelity tier. Every effect in Hyalo reads it.\n *\n * The server and the first client render always use `medium`, so hydration\n * sees the same markup. The real tier is detected right after the first\n * render. The tier is also written to `data-hy-fidelity` on `<html>` for\n * CSS that needs it.\n */\n@Injectable({ providedIn: 'root' })\nexport class HyFidelity {\n private readonly config = inject(HY_CONFIG);\n private readonly document = inject(DOCUMENT);\n private readonly _tier = signal<HyFidelityTier>(this.config.fidelity ?? 'medium');\n private overridden = !!this.config.fidelity;\n\n /** The active tier. */\n readonly tier = this._tier.asReadonly();\n\n constructor() {\n if (!injectIsBrowser()) return;\n afterNextRender(() => {\n if (!this.overridden) {\n this._tier.set(detectFidelity(navigator as NavigatorHints));\n }\n });\n effect(() => this.document.documentElement.setAttribute('data-hy-fidelity', this._tier()));\n }\n\n /** Overrides the detected tier, for example from a settings toggle. */\n setTier(tier: HyFidelityTier): void {\n this.overridden = true;\n this._tier.set(tier);\n }\n}\n","import { DOCUMENT, Injectable, computed, inject, signal } from '@angular/core';\nimport { HY_CONFIG } from '../core/config';\nimport { injectIsBrowser, matchesMedia } from '../core/platform';\nimport { HyFidelity } from '../fidelity/fidelity';\nimport type { HyGsap } from '../core/gsap';\n\n/** One named motion: duration in seconds plus matching GSAP and CSS easings. */\nexport interface HyMotionPreset {\n readonly duration: number;\n readonly ease: string;\n readonly css: string;\n}\n\n/**\n * The shared motion vocabulary. CSS has the same values as `--hy-dur-*` and\n * `--hy-ease-*` tokens.\n *\n * - `settle`: the default for anything that moves into place.\n * - `pop`: a small overshoot. Only for motion the user caused, such as a\n * toggle they just pressed. Never for things that appear on their own.\n * - `quick`: acknowledgements, like a press or a hover.\n * - `scene`: large, slow movements such as section reveals.\n */\nexport const MOTION = {\n settle: { duration: 0.44, ease: 'power3.out', css: 'cubic-bezier(0.215, 0.61, 0.355, 1)' },\n pop: { duration: 0.5, ease: 'back.out(1.5)', css: 'cubic-bezier(0.34, 1.56, 0.64, 1)' },\n quick: { duration: 0.22, ease: 'power2.out', css: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)' },\n scene: { duration: 0.9, ease: 'expo.out', css: 'cubic-bezier(0.16, 1, 0.3, 1)' },\n} as const satisfies Record<string, HyMotionPreset>;\n\n/**\n * Motion state for the whole app: whether the user prefers reduced motion,\n * whether effects may run at all, and lazy access to GSAP.\n */\n@Injectable({ providedIn: 'root' })\nexport class HyMotion {\n private readonly config = inject(HY_CONFIG);\n private readonly fidelity = inject(HyFidelity);\n private readonly document = inject(DOCUMENT);\n private readonly isBrowser = injectIsBrowser();\n private readonly _reduced = signal(false);\n private gsapPromise: Promise<HyGsap | null> | undefined;\n\n /** True when the OS asks for reduced motion, or the app forced it. */\n readonly reduced = this._reduced.asReadonly();\n\n /** True when decorative motion (tilt, magnetic, reveal) may run. */\n readonly enabled = computed(() => !this._reduced() && this.fidelity.tier() !== 'low');\n\n constructor() {\n if (!this.isBrowser || typeof matchMedia !== 'function') return;\n const query = matchMedia('(prefers-reduced-motion: reduce)');\n const forced = this.document.documentElement.getAttribute('data-hy-motion');\n this._reduced.set(forced ? forced === 'reduced' : query.matches);\n query.addEventListener('change', (event) => {\n if (!this.document.documentElement.hasAttribute('data-hy-motion')) {\n this._reduced.set(event.matches);\n }\n });\n }\n\n /**\n * Forces reduced or full motion regardless of the OS setting, and mirrors\n * the choice to `data-hy-motion` so CSS tokens follow. Pass `null` to go\n * back to the OS setting.\n */\n setReduced(reduced: boolean | null): void {\n const root = this.document.documentElement;\n if (reduced === null) {\n root.removeAttribute('data-hy-motion');\n this._reduced.set(matchesMedia('(prefers-reduced-motion: reduce)'));\n return;\n }\n root.setAttribute('data-hy-motion', reduced ? 'reduced' : 'full');\n this._reduced.set(reduced);\n }\n\n /**\n * Loads GSAP once, if the app provided a loader. Resolves to `null` on the\n * server, without a loader, or if loading fails, so callers can fall back\n * to CSS.\n */\n gsap(): Promise<HyGsap | null> {\n const loader = this.config.gsap;\n if (!this.isBrowser || !loader) return Promise.resolve(null);\n this.gsapPromise ??= loader().catch(() => null);\n return this.gsapPromise;\n }\n}\n","/**\n * A spring in the two numbers Apple designs with.\n *\n * - `damping`: 1 settles without overshoot, lower values bounce.\n * - `response`: roughly how many seconds it takes to get there. Not a\n * duration; the settle time falls out of the physics.\n */\nexport interface HySpringConfig {\n readonly damping: number;\n readonly response: number;\n}\n\n/**\n * The shared springs.\n *\n * - `settle`: the default. No bounce.\n * - `momentum`: after a flick or a drag, when the gesture carried speed.\n */\nexport const SPRINGS = {\n settle: { damping: 1, response: 0.4 },\n momentum: { damping: 0.8, response: 0.3 },\n} as const satisfies Record<string, HySpringConfig>;\n\n/** Options for {@link HySpring.to}. */\nexport interface HySpringTarget extends Partial<HySpringConfig> {\n /** Starting velocity in units per second. Defaults to the current one. */\n readonly velocity?: number;\n /** Runs once the value comes to rest on the target. */\n readonly onRest?: () => void;\n}\n\nconst STEP = 1 / 240;\nconst REST_DELTA = 0.1;\nconst REST_VELOCITY = 2;\n\n/**\n * Animates one number on `requestAnimationFrame`. Every `to()` starts from\n * the live value and keeps its velocity, so the motion can be grabbed and\n * redirected at any moment without a jump or a sudden stop.\n */\nexport class HySpring {\n /** The value on screen right now. */\n value: number;\n /** Units per second. */\n velocity = 0;\n private target = 0;\n private config: HySpringConfig = SPRINGS.settle;\n private onRest: (() => void) | null = null;\n private frame = 0;\n private last = 0;\n\n constructor(\n initial: number,\n private readonly onUpdate: (value: number) => void,\n ) {\n this.value = initial;\n }\n\n /** True while the spring is moving. */\n get running(): boolean {\n return this.frame !== 0;\n }\n\n /** Springs toward `target`, from wherever it is now. */\n to(target: number, options: HySpringTarget = {}): void {\n this.target = target;\n this.config = {\n damping: options.damping ?? SPRINGS.settle.damping,\n response: options.response ?? SPRINGS.settle.response,\n };\n if (options.velocity !== undefined) this.velocity = options.velocity;\n this.onRest = options.onRest ?? null;\n if (this.frame) return;\n this.last = performance.now();\n this.frame = requestAnimationFrame(this.tick);\n }\n\n /** Jumps to a value and stops, as when a finger holds it. */\n set(value: number): void {\n this.stop();\n this.value = value;\n this.velocity = 0;\n this.onUpdate(value);\n }\n\n /** Stops where it is. A pending `onRest` is dropped. */\n stop(): void {\n cancelAnimationFrame(this.frame);\n this.frame = 0;\n this.onRest = null;\n }\n\n private readonly tick = (now: number): void => {\n // A long frame (a background tab, a busy main thread) is capped, so the\n // spring slows down instead of jumping. The first frame's timestamp can\n // be older than the call to to(), which would make dt negative.\n const dt = Math.max(0, Math.min((now - this.last) / 1000, 1 / 15));\n this.last = Math.max(now, this.last);\n const stiffness = ((2 * Math.PI) / this.config.response) ** 2;\n const friction = (4 * Math.PI * this.config.damping) / this.config.response;\n // Stiffer springs need finer steps to stay stable.\n const steps = Math.ceil(dt / Math.min(STEP, this.config.response / 60));\n const h = dt / steps;\n for (let i = 0; i < steps; i++) {\n this.velocity += (-stiffness * (this.value - this.target) - friction * this.velocity) * h;\n this.value += this.velocity * h;\n }\n if (\n Math.abs(this.velocity) < REST_VELOCITY &&\n Math.abs(this.value - this.target) < REST_DELTA\n ) {\n this.value = this.target;\n this.velocity = 0;\n this.frame = 0;\n const done = this.onRest;\n this.onRest = null;\n this.onUpdate(this.value);\n done?.();\n return;\n }\n this.onUpdate(this.value);\n this.frame = requestAnimationFrame(this.tick);\n };\n}\n\n/**\n * How far a flick travels before it stops, from the velocity in px per\n * second. This is the deceleration curve of scrolling, so a target picked\n * from `position + project(velocity)` lands where the gesture was going.\n */\nexport function project(velocity: number, decelerationRate = 0.998): number {\n return ((velocity / 1000) * decelerationRate) / (1 - decelerationRate);\n}\n\n/**\n * Resistance past a boundary. The further the overshoot, the less the\n * element follows, so an edge feels soft instead of frozen.\n */\nexport function rubberband(overshoot: number, dimension: number, constant = 0.55): number {\n if (dimension <= 0) return 0;\n const x = Math.abs(overshoot);\n return (Math.sign(overshoot) * (x * dimension * constant)) / (dimension + constant * x);\n}\n\n/** Velocity of a pointer from its last 100ms of movement. */\nexport class HyVelocityTracker {\n private samples: { t: number; v: number }[] = [];\n\n add(value: number, time = performance.now()): void {\n this.samples.push({ t: time, v: value });\n while (this.samples.length > 2 && time - (this.samples[0]?.t ?? time) > 100) {\n this.samples.shift();\n }\n }\n\n reset(): void {\n this.samples = [];\n }\n\n /** Units per second. Zero if the pointer has been still for 100ms. */\n velocity(now = performance.now()): number {\n const recent = this.samples.filter((s) => now - s.t <= 100);\n const first = recent[0];\n const last = recent[recent.length - 1];\n if (!first || !last || last.t === first.t) return 0;\n return ((last.v - first.v) / (last.t - first.t)) * 1000;\n }\n}\n","import { Directive, computed, inject, input } from '@angular/core';\nimport { HY_CONFIG } from '../core/config';\nimport type { HyMaterial, HyThickness } from '../core/axes';\nimport { HyFidelity } from '../fidelity/fidelity';\n\n/**\n * Turns any element into a glass surface.\n *\n * ```html\n * <aside hyMaterial=\"clear\">...</aside>\n * <section hyMaterial thickness=\"thick\">...</section>\n * ```\n *\n * The look lives in CSS (`.hy-glass[data-material]`), so effects stay cheap\n * and themeable. On the low fidelity tier every material renders as `solid`,\n * because backdrop blur is the most expensive thing on the page.\n */\n@Directive({\n selector: '[hyMaterial]',\n host: {\n class: 'hy-glass',\n '[attr.data-material]': 'resolved()',\n '[attr.data-thickness]': 'thickness() === \"regular\" ? null : thickness()',\n },\n})\nexport class HyMaterialDirective {\n private readonly config = inject(HY_CONFIG);\n private readonly fidelity = inject(HyFidelity);\n\n /** The material. An empty attribute uses the configured default. */\n readonly material = input<HyMaterial | '' | undefined>(undefined, { alias: 'hyMaterial' });\n /** How heavy the glass reads. Use `thick` for large surfaces. */\n readonly thickness = input<HyThickness>('regular');\n\n /** The material that is actually rendered after fidelity is applied. */\n readonly resolved = computed<HyMaterial>(() => {\n if (this.fidelity.tier() === 'low') return 'solid';\n return this.material() || this.config.material;\n });\n}\n","import { Directive, DestroyRef, ElementRef, afterNextRender, inject, signal } from '@angular/core';\nimport { FocusMonitor } from '@angular/cdk/a11y';\n\n/**\n * Mirrors interaction state to data attributes so glass effects can stay in\n * CSS: `data-hover`, `data-press` and `data-focus-visible`.\n *\n * Hover is only reported for mouse and pen, so touch screens never get a\n * stuck hover state.\n */\n@Directive({\n selector: '[hyInteractive]',\n host: {\n '[attr.data-hover]': 'hovered() || null',\n '[attr.data-press]': 'pressed() || null',\n '[attr.data-focus-visible]': 'focusVisible() || null',\n '(pointerenter)': 'onEnter($event)',\n '(pointerleave)': 'hovered.set(false); pressed.set(false)',\n '(pointerdown)': 'pressed.set(true)',\n '(pointerup)': 'pressed.set(false)',\n '(pointercancel)': 'pressed.set(false)',\n },\n})\nexport class HyInteractive {\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly focusMonitor = inject(FocusMonitor);\n\n protected readonly hovered = signal(false);\n protected readonly pressed = signal(false);\n protected readonly focusVisible = signal(false);\n\n constructor() {\n afterNextRender(() => {\n this.focusMonitor.monitor(this.host).subscribe((origin) => {\n this.focusVisible.set(origin === 'keyboard');\n });\n });\n inject(DestroyRef).onDestroy(() => this.focusMonitor.stopMonitoring(this.host));\n }\n\n protected onEnter(event: PointerEvent): void {\n if (event.pointerType !== 'touch') this.hovered.set(true);\n }\n}\n","import {\r\n DestroyRef,\r\n ElementRef,\r\n afterNextRender,\r\n afterRenderEffect,\r\n inject,\r\n signal,\r\n type Signal,\r\n} from '@angular/core';\r\n\r\n/**\r\n * Keeps a sliding indicator under the selected item of a row by writing\r\n * `--hy-ind-x` and `--hy-ind-size` on the row. The offset is physical (from\r\n * the left edge) and the indicator is placed physically too, so the same\r\n * numbers work in both directions.\r\n *\r\n * Returns a signal that turns true after the first placement, so CSS can\r\n * enable the transition only from then on.\r\n */\r\nexport function trackIndicator(\r\n container: Signal<ElementRef<HTMLElement> | undefined>,\r\n selected: () => HTMLElement | null,\r\n): Signal<boolean> {\r\n const ready = signal(false);\r\n // Bumped when the row resizes, for example after web fonts load.\r\n const size = signal(0);\r\n const destroyRef = inject(DestroyRef);\r\n\r\n afterNextRender(() => {\r\n const row = container()?.nativeElement;\r\n if (!row || typeof ResizeObserver !== 'function') return;\r\n const observer = new ResizeObserver(() => size.update((v) => v + 1));\r\n observer.observe(row);\r\n destroyRef.onDestroy(() => observer.disconnect());\r\n });\r\n\r\n afterRenderEffect({\r\n earlyRead: () => {\r\n size();\r\n const row = container()?.nativeElement;\r\n const item = selected();\r\n if (!row || !item) return null;\r\n const rowRect = row.getBoundingClientRect();\r\n const rect = item.getBoundingClientRect();\r\n // Rects are in screen pixels, after any zoom or scale on an ancestor,\r\n // but the custom properties are read in the row's own pixels.\r\n const scale = row.offsetWidth ? rowRect.width / row.offsetWidth : 1;\r\n return {\r\n row,\r\n x: (rect.left - rowRect.left) / scale + row.scrollLeft,\r\n size: rect.width / scale,\r\n };\r\n },\r\n write: (measured) => {\r\n const m = measured();\r\n if (!m) return;\r\n m.row.style.setProperty('--hy-ind-x', `${m.x}px`);\r\n m.row.style.setProperty('--hy-ind-size', `${m.size}px`);\r\n if (!ready()) requestAnimationFrame(() => ready.set(true));\r\n },\r\n });\r\n\r\n return ready.asReadonly();\r\n}\r\n"],"mappings":";;;;AAkCA,MAAM,WAAqB;CACzB,UAAU;CACV,MAAM;CACN,MAAM;AACP;AAGD,MAAa,YAAY,IAAI,eAAyB,aAAa;CACjE,YAAY;CACZ,eAAe;AAChB,CAAA;AAOD,SAAgB,aAAa,SAA4B,CAAA,GAAE;CACzD,OAAO;EACL,SAAS;EACT,kBAA2B;GAEzB,OAAO;IAAE,GADM,OAAO,WAAW;KAAE,UAAU;KAAM,UAAU;IAAI,CAAE,KAAK;IACpD,GAAG;GAAM;EAC/B;CACD;AACH;ACpDA,SAAgB,SAAS,QAAc;CACrC,OAAO,OAAO,YAAY,CAAC,CAAC,MAAM,MAAM,OAAM,EAAG;AACnD;ACLA,SAAgB,kBAAe;CAC7B,OAAO,kBAAkB,OAAO,WAAW,CAAC;AAC9C;AAGA,SAAgB,aAAa,OAAa;CACxC,OAAO,OAAO,eAAe,cAAc,WAAW,KAAK,CAAC,CAAC;AAC/D;ACUA,SAAgB,eAAe,KAAmB;CAChD,IAAI,IAAI,YAAY,UAAU,OAAO;CACrC,MAAM,SAAS,IAAI,gBAAgB;CACnC,MAAM,QAAQ,IAAI,uBAAuB;CACzC,IAAI,UAAU,KAAK,SAAS,GAAG,OAAO;CACtC,IAAI,UAAU,KAAK,SAAS,KAAK,aAAa,mBAAmB,GAAG,OAAO;CAC3E,OAAO;AACT;AAWA,IAAa,aAAb,MAAa,WAAU;CACJ,SAAS,OAAO,SAAS;CACzB,WAAW,OAAO,QAAQ;CAC1B,QAAQ,OAAuB,KAAK,O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,OAAO,QAAQ,QAAQ,QAAQ,IAAI;IAC5C,MAAM,KAAK,QAAQ;GACpB;EACH;EACA,QAAQ,aAAY;GAClB,MAAM,IAAI,SAAQ;GAClB,IAAI,CAAC,GAAG;GACR,EAAE,IAAI,MAAM,YAAY,cAAc,GAAG,EAAE,EAAC,GAAI;GAChD,EAAE,IAAI,MAAM,YAAY,iBAAiB,GAAG,EAAE,KAAI,GAAI;GACtD,IAAI,CAAC,MAAK,GAAI,4BAA4B,MAAM,IAAI,IAAI,CAAC;EAC3D;CACD,CAAA;CAED,OAAO,MAAM,WAAU;AACzB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,136 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyalo/angular",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Liquid glass components for Angular. Signals, zoneless, SSR-safe, accessible, RTL-ready.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "HamedRsl",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/HamedRsl/Hyalo.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/HamedRsl/Hyalo#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/HamedRsl/Hyalo/issues"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"angular",
|
|
17
|
+
"ui",
|
|
18
|
+
"components",
|
|
19
|
+
"glass",
|
|
20
|
+
"glassmorphism",
|
|
21
|
+
"liquid-glass",
|
|
22
|
+
"rtl",
|
|
23
|
+
"signals"
|
|
24
|
+
],
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"@angular/aria": "^22.2.0",
|
|
27
|
+
"@angular/cdk": "^22.2.0",
|
|
28
|
+
"@angular/common": "^22.2.0",
|
|
29
|
+
"@angular/core": "^22.2.0",
|
|
30
|
+
"@angular/forms": "^22.2.0",
|
|
31
|
+
"gsap": "^3.12.0",
|
|
32
|
+
"rxjs": "^7.4.0"
|
|
33
|
+
},
|
|
34
|
+
"peerDependenciesMeta": {
|
|
35
|
+
"gsap": {
|
|
36
|
+
"optional": true
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"tslib": "^2.3.0"
|
|
41
|
+
},
|
|
42
|
+
"sideEffects": [
|
|
43
|
+
"*.css"
|
|
44
|
+
],
|
|
45
|
+
"exports": {
|
|
46
|
+
"./styles/hyalo.css": {
|
|
47
|
+
"default": "./styles/hyalo.css"
|
|
48
|
+
},
|
|
49
|
+
"./styles/hyalo-core.css": {
|
|
50
|
+
"default": "./styles/hyalo-core.css"
|
|
51
|
+
},
|
|
52
|
+
"./styles/overlays/*": {
|
|
53
|
+
"default": "./styles/overlays/*"
|
|
54
|
+
},
|
|
55
|
+
"./styles/palettes/*": {
|
|
56
|
+
"default": "./styles/palettes/*"
|
|
57
|
+
},
|
|
58
|
+
"./package.json": {
|
|
59
|
+
"default": "./package.json"
|
|
60
|
+
},
|
|
61
|
+
".": {
|
|
62
|
+
"types": "./types/hyalo-angular.d.ts",
|
|
63
|
+
"default": "./fesm2022/hyalo-angular.mjs"
|
|
64
|
+
},
|
|
65
|
+
"./accordion": {
|
|
66
|
+
"types": "./types/hyalo-angular-accordion.d.ts",
|
|
67
|
+
"default": "./fesm2022/hyalo-angular-accordion.mjs"
|
|
68
|
+
},
|
|
69
|
+
"./button": {
|
|
70
|
+
"types": "./types/hyalo-angular-button.d.ts",
|
|
71
|
+
"default": "./fesm2022/hyalo-angular-button.mjs"
|
|
72
|
+
},
|
|
73
|
+
"./card": {
|
|
74
|
+
"types": "./types/hyalo-angular-card.d.ts",
|
|
75
|
+
"default": "./fesm2022/hyalo-angular-card.mjs"
|
|
76
|
+
},
|
|
77
|
+
"./choice": {
|
|
78
|
+
"types": "./types/hyalo-angular-choice.d.ts",
|
|
79
|
+
"default": "./fesm2022/hyalo-angular-choice.mjs"
|
|
80
|
+
},
|
|
81
|
+
"./dialog": {
|
|
82
|
+
"types": "./types/hyalo-angular-dialog.d.ts",
|
|
83
|
+
"default": "./fesm2022/hyalo-angular-dialog.mjs"
|
|
84
|
+
},
|
|
85
|
+
"./field": {
|
|
86
|
+
"types": "./types/hyalo-angular-field.d.ts",
|
|
87
|
+
"default": "./fesm2022/hyalo-angular-field.mjs"
|
|
88
|
+
},
|
|
89
|
+
"./icon": {
|
|
90
|
+
"types": "./types/hyalo-angular-icon.d.ts",
|
|
91
|
+
"default": "./fesm2022/hyalo-angular-icon.mjs"
|
|
92
|
+
},
|
|
93
|
+
"./interaction": {
|
|
94
|
+
"types": "./types/hyalo-angular-interaction.d.ts",
|
|
95
|
+
"default": "./fesm2022/hyalo-angular-interaction.mjs"
|
|
96
|
+
},
|
|
97
|
+
"./navbar": {
|
|
98
|
+
"types": "./types/hyalo-angular-navbar.d.ts",
|
|
99
|
+
"default": "./fesm2022/hyalo-angular-navbar.mjs"
|
|
100
|
+
},
|
|
101
|
+
"./overlay": {
|
|
102
|
+
"types": "./types/hyalo-angular-overlay.d.ts",
|
|
103
|
+
"default": "./fesm2022/hyalo-angular-overlay.mjs"
|
|
104
|
+
},
|
|
105
|
+
"./popover": {
|
|
106
|
+
"types": "./types/hyalo-angular-popover.d.ts",
|
|
107
|
+
"default": "./fesm2022/hyalo-angular-popover.mjs"
|
|
108
|
+
},
|
|
109
|
+
"./segmented": {
|
|
110
|
+
"types": "./types/hyalo-angular-segmented.d.ts",
|
|
111
|
+
"default": "./fesm2022/hyalo-angular-segmented.mjs"
|
|
112
|
+
},
|
|
113
|
+
"./select": {
|
|
114
|
+
"types": "./types/hyalo-angular-select.d.ts",
|
|
115
|
+
"default": "./fesm2022/hyalo-angular-select.mjs"
|
|
116
|
+
},
|
|
117
|
+
"./tabs": {
|
|
118
|
+
"types": "./types/hyalo-angular-tabs.d.ts",
|
|
119
|
+
"default": "./fesm2022/hyalo-angular-tabs.mjs"
|
|
120
|
+
},
|
|
121
|
+
"./theme": {
|
|
122
|
+
"types": "./types/hyalo-angular-theme.d.ts",
|
|
123
|
+
"default": "./fesm2022/hyalo-angular-theme.mjs"
|
|
124
|
+
},
|
|
125
|
+
"./toast": {
|
|
126
|
+
"types": "./types/hyalo-angular-toast.d.ts",
|
|
127
|
+
"default": "./fesm2022/hyalo-angular-toast.mjs"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"publishConfig": {
|
|
131
|
+
"access": "public"
|
|
132
|
+
},
|
|
133
|
+
"module": "fesm2022/hyalo-angular.mjs",
|
|
134
|
+
"typings": "types/hyalo-angular.d.ts",
|
|
135
|
+
"type": "module"
|
|
6
136
|
}
|