@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.
Files changed (198) hide show
  1. package/CHANGELOG.md +95 -41
  2. package/README.md +46 -32
  3. package/fesm2022/hyalo-angular-accordion.mjs +6 -6
  4. package/fesm2022/hyalo-angular-accordion.mjs.map +1 -1
  5. package/fesm2022/hyalo-angular-alert.mjs +171 -0
  6. package/fesm2022/hyalo-angular-alert.mjs.map +1 -0
  7. package/fesm2022/hyalo-angular-aspect-ratio.mjs +64 -0
  8. package/fesm2022/hyalo-angular-aspect-ratio.mjs.map +1 -0
  9. package/fesm2022/hyalo-angular-avatar.mjs +169 -0
  10. package/fesm2022/hyalo-angular-avatar.mjs.map +1 -0
  11. package/fesm2022/hyalo-angular-badge.mjs +268 -0
  12. package/fesm2022/hyalo-angular-badge.mjs.map +1 -0
  13. package/fesm2022/hyalo-angular-bento.mjs +132 -0
  14. package/fesm2022/hyalo-angular-bento.mjs.map +1 -0
  15. package/fesm2022/hyalo-angular-blocks.mjs +985 -0
  16. package/fesm2022/hyalo-angular-blocks.mjs.map +1 -0
  17. package/fesm2022/hyalo-angular-border-beam.mjs +73 -0
  18. package/fesm2022/hyalo-angular-border-beam.mjs.map +1 -0
  19. package/fesm2022/hyalo-angular-breadcrumb.mjs +77 -0
  20. package/fesm2022/hyalo-angular-breadcrumb.mjs.map +1 -0
  21. package/fesm2022/hyalo-angular-button-group.mjs +90 -0
  22. package/fesm2022/hyalo-angular-button-group.mjs.map +1 -0
  23. package/fesm2022/hyalo-angular-button.mjs +4 -3
  24. package/fesm2022/hyalo-angular-button.mjs.map +1 -1
  25. package/fesm2022/hyalo-angular-card.mjs +2 -2
  26. package/fesm2022/hyalo-angular-card.mjs.map +1 -1
  27. package/fesm2022/hyalo-angular-carousel.mjs +709 -0
  28. package/fesm2022/hyalo-angular-carousel.mjs.map +1 -0
  29. package/fesm2022/hyalo-angular-chapter-nav.mjs +336 -0
  30. package/fesm2022/hyalo-angular-chapter-nav.mjs.map +1 -0
  31. package/fesm2022/hyalo-angular-chart-engine-DSJop6He.mjs +5 -0
  32. package/fesm2022/hyalo-angular-chart-engine-DSJop6He.mjs.map +1 -0
  33. package/fesm2022/hyalo-angular-chart.mjs +391 -0
  34. package/fesm2022/hyalo-angular-chart.mjs.map +1 -0
  35. package/fesm2022/hyalo-angular-choice.mjs +2 -1
  36. package/fesm2022/hyalo-angular-choice.mjs.map +1 -1
  37. package/fesm2022/hyalo-angular-code-block-highlight-B20d5C76.mjs +40 -0
  38. package/fesm2022/hyalo-angular-code-block-highlight-B20d5C76.mjs.map +1 -0
  39. package/fesm2022/hyalo-angular-code-block.mjs +161 -0
  40. package/fesm2022/hyalo-angular-code-block.mjs.map +1 -0
  41. package/fesm2022/hyalo-angular-command.mjs +193 -0
  42. package/fesm2022/hyalo-angular-command.mjs.map +1 -0
  43. package/fesm2022/hyalo-angular-copy.mjs +138 -0
  44. package/fesm2022/hyalo-angular-copy.mjs.map +1 -0
  45. package/fesm2022/hyalo-angular-core.mjs +424 -0
  46. package/fesm2022/hyalo-angular-core.mjs.map +1 -0
  47. package/fesm2022/hyalo-angular-description-list.mjs +57 -0
  48. package/fesm2022/hyalo-angular-description-list.mjs.map +1 -0
  49. package/fesm2022/hyalo-angular-dialog.mjs +51 -22
  50. package/fesm2022/hyalo-angular-dialog.mjs.map +1 -1
  51. package/fesm2022/hyalo-angular-divider.mjs +66 -0
  52. package/fesm2022/hyalo-angular-divider.mjs.map +1 -0
  53. package/fesm2022/hyalo-angular-empty-state.mjs +123 -0
  54. package/fesm2022/hyalo-angular-empty-state.mjs.map +1 -0
  55. package/fesm2022/hyalo-angular-field.mjs +41 -9
  56. package/fesm2022/hyalo-angular-field.mjs.map +1 -1
  57. package/fesm2022/hyalo-angular-filter.mjs +309 -0
  58. package/fesm2022/hyalo-angular-filter.mjs.map +1 -0
  59. package/fesm2022/hyalo-angular-hotspot.mjs +225 -0
  60. package/fesm2022/hyalo-angular-hotspot.mjs.map +1 -0
  61. package/fesm2022/hyalo-angular-hover-card.mjs +233 -0
  62. package/fesm2022/hyalo-angular-hover-card.mjs.map +1 -0
  63. package/fesm2022/hyalo-angular-icon.mjs +42 -0
  64. package/fesm2022/hyalo-angular-icon.mjs.map +1 -1
  65. package/fesm2022/hyalo-angular-image-compare.mjs +168 -0
  66. package/fesm2022/hyalo-angular-image-compare.mjs.map +1 -0
  67. package/fesm2022/hyalo-angular-interaction.mjs +32 -41
  68. package/fesm2022/hyalo-angular-interaction.mjs.map +1 -1
  69. package/fesm2022/hyalo-angular-kbd.mjs +41 -0
  70. package/fesm2022/hyalo-angular-kbd.mjs.map +1 -0
  71. package/fesm2022/hyalo-angular-lightbox.mjs +228 -0
  72. package/fesm2022/hyalo-angular-lightbox.mjs.map +1 -0
  73. package/fesm2022/hyalo-angular-link.mjs +42 -0
  74. package/fesm2022/hyalo-angular-link.mjs.map +1 -0
  75. package/fesm2022/hyalo-angular-list.mjs +131 -0
  76. package/fesm2022/hyalo-angular-list.mjs.map +1 -0
  77. package/fesm2022/hyalo-angular-marquee.mjs +197 -0
  78. package/fesm2022/hyalo-angular-marquee.mjs.map +1 -0
  79. package/fesm2022/hyalo-angular-menu.mjs +423 -0
  80. package/fesm2022/hyalo-angular-menu.mjs.map +1 -0
  81. package/fesm2022/hyalo-angular-mesh.mjs +126 -0
  82. package/fesm2022/hyalo-angular-mesh.mjs.map +1 -0
  83. package/fesm2022/hyalo-angular-motion.mjs +620 -0
  84. package/fesm2022/hyalo-angular-motion.mjs.map +1 -0
  85. package/fesm2022/hyalo-angular-navbar.mjs +1 -1
  86. package/fesm2022/hyalo-angular-navbar.mjs.map +1 -1
  87. package/fesm2022/hyalo-angular-navigation-menu.mjs +222 -0
  88. package/fesm2022/hyalo-angular-navigation-menu.mjs.map +1 -0
  89. package/fesm2022/hyalo-angular-number-ticker.mjs +174 -0
  90. package/fesm2022/hyalo-angular-number-ticker.mjs.map +1 -0
  91. package/fesm2022/hyalo-angular-overlay.mjs +71 -2
  92. package/fesm2022/hyalo-angular-overlay.mjs.map +1 -1
  93. package/fesm2022/hyalo-angular-pagination.mjs +187 -0
  94. package/fesm2022/hyalo-angular-pagination.mjs.map +1 -0
  95. package/fesm2022/hyalo-angular-popover.mjs +34 -5
  96. package/fesm2022/hyalo-angular-popover.mjs.map +1 -1
  97. package/fesm2022/hyalo-angular-progress.mjs +209 -0
  98. package/fesm2022/hyalo-angular-progress.mjs.map +1 -0
  99. package/fesm2022/hyalo-angular-progressive-blur.mjs +73 -0
  100. package/fesm2022/hyalo-angular-progressive-blur.mjs.map +1 -0
  101. package/fesm2022/hyalo-angular-refraction-renderer-5ZA-kfsA.mjs +186 -0
  102. package/fesm2022/hyalo-angular-refraction-renderer-5ZA-kfsA.mjs.map +1 -0
  103. package/fesm2022/hyalo-angular-refraction.mjs +178 -0
  104. package/fesm2022/hyalo-angular-refraction.mjs.map +1 -0
  105. package/fesm2022/hyalo-angular-scroll-area.mjs +93 -0
  106. package/fesm2022/hyalo-angular-scroll-area.mjs.map +1 -0
  107. package/fesm2022/hyalo-angular-scroll-to-top.mjs +127 -0
  108. package/fesm2022/hyalo-angular-scroll-to-top.mjs.map +1 -0
  109. package/fesm2022/hyalo-angular-segmented.mjs +1 -1
  110. package/fesm2022/hyalo-angular-segmented.mjs.map +1 -1
  111. package/fesm2022/hyalo-angular-select.mjs +112 -15
  112. package/fesm2022/hyalo-angular-select.mjs.map +1 -1
  113. package/fesm2022/hyalo-angular-sidebar.mjs +241 -0
  114. package/fesm2022/hyalo-angular-sidebar.mjs.map +1 -0
  115. package/fesm2022/hyalo-angular-skeleton.mjs +131 -0
  116. package/fesm2022/hyalo-angular-skeleton.mjs.map +1 -0
  117. package/fesm2022/hyalo-angular-sparkline.mjs +110 -0
  118. package/fesm2022/hyalo-angular-sparkline.mjs.map +1 -0
  119. package/fesm2022/hyalo-angular-split-text.mjs +126 -0
  120. package/fesm2022/hyalo-angular-split-text.mjs.map +1 -0
  121. package/fesm2022/hyalo-angular-stat.mjs +193 -0
  122. package/fesm2022/hyalo-angular-stat.mjs.map +1 -0
  123. package/fesm2022/hyalo-angular-stepper.mjs +254 -0
  124. package/fesm2022/hyalo-angular-stepper.mjs.map +1 -0
  125. package/fesm2022/hyalo-angular-table.mjs +335 -0
  126. package/fesm2022/hyalo-angular-table.mjs.map +1 -0
  127. package/fesm2022/hyalo-angular-tabs.mjs +1 -1
  128. package/fesm2022/hyalo-angular-tabs.mjs.map +1 -1
  129. package/fesm2022/hyalo-angular-theme.mjs +1 -1
  130. package/fesm2022/hyalo-angular-theme.mjs.map +1 -1
  131. package/fesm2022/hyalo-angular-timeline.mjs +157 -0
  132. package/fesm2022/hyalo-angular-timeline.mjs.map +1 -0
  133. package/fesm2022/hyalo-angular-toast.mjs +2 -1
  134. package/fesm2022/hyalo-angular-toast.mjs.map +1 -1
  135. package/fesm2022/hyalo-angular.mjs +2 -473
  136. package/package.json +198 -2
  137. package/styles/parts/field.css +44 -36
  138. package/styles/parts/glass.css +2 -0
  139. package/styles/parts/motion.css +19 -0
  140. package/styles/parts/typography.css +17 -0
  141. package/types/hyalo-angular-accordion.d.ts +1 -1
  142. package/types/hyalo-angular-alert.d.ts +47 -0
  143. package/types/hyalo-angular-aspect-ratio.d.ts +13 -0
  144. package/types/hyalo-angular-avatar.d.ts +39 -0
  145. package/types/hyalo-angular-badge.d.ts +82 -0
  146. package/types/hyalo-angular-bento.d.ts +25 -0
  147. package/types/hyalo-angular-blocks.d.ts +272 -0
  148. package/types/hyalo-angular-border-beam.d.ts +15 -0
  149. package/types/hyalo-angular-breadcrumb.d.ts +22 -0
  150. package/types/hyalo-angular-button-group.d.ts +19 -0
  151. package/types/hyalo-angular-button.d.ts +4 -3
  152. package/types/hyalo-angular-card.d.ts +1 -1
  153. package/types/hyalo-angular-carousel.d.ts +147 -0
  154. package/types/hyalo-angular-chapter-nav.d.ts +79 -0
  155. package/types/hyalo-angular-chart.d.ts +90 -0
  156. package/types/hyalo-angular-code-block.d.ts +46 -0
  157. package/types/hyalo-angular-command.d.ts +41 -0
  158. package/types/hyalo-angular-copy.d.ts +39 -0
  159. package/types/hyalo-angular-core.d.ts +210 -0
  160. package/types/hyalo-angular-description-list.d.ts +16 -0
  161. package/types/hyalo-angular-dialog.d.ts +2 -1
  162. package/types/hyalo-angular-divider.d.ts +12 -0
  163. package/types/hyalo-angular-empty-state.d.ts +30 -0
  164. package/types/hyalo-angular-field.d.ts +10 -4
  165. package/types/hyalo-angular-filter.d.ts +122 -0
  166. package/types/hyalo-angular-hotspot.d.ts +70 -0
  167. package/types/hyalo-angular-hover-card.d.ts +47 -0
  168. package/types/hyalo-angular-image-compare.d.ts +55 -0
  169. package/types/hyalo-angular-kbd.d.ts +5 -0
  170. package/types/hyalo-angular-lightbox.d.ts +67 -0
  171. package/types/hyalo-angular-link.d.ts +5 -0
  172. package/types/hyalo-angular-list.d.ts +30 -0
  173. package/types/hyalo-angular-marquee.d.ts +48 -0
  174. package/types/hyalo-angular-menu.d.ts +105 -0
  175. package/types/hyalo-angular-mesh.d.ts +36 -0
  176. package/types/hyalo-angular-motion.d.ts +218 -0
  177. package/types/hyalo-angular-navigation-menu.d.ts +47 -0
  178. package/types/hyalo-angular-number-ticker.d.ts +52 -0
  179. package/types/hyalo-angular-overlay.d.ts +9 -0
  180. package/types/hyalo-angular-pagination.d.ts +59 -0
  181. package/types/hyalo-angular-popover.d.ts +10 -0
  182. package/types/hyalo-angular-progress.d.ts +46 -0
  183. package/types/hyalo-angular-progressive-blur.d.ts +14 -0
  184. package/types/hyalo-angular-refraction.d.ts +46 -0
  185. package/types/hyalo-angular-scroll-area.d.ts +18 -0
  186. package/types/hyalo-angular-scroll-to-top.d.ts +31 -0
  187. package/types/hyalo-angular-segmented.d.ts +1 -1
  188. package/types/hyalo-angular-select.d.ts +49 -3
  189. package/types/hyalo-angular-sidebar.d.ts +57 -0
  190. package/types/hyalo-angular-skeleton.d.ts +34 -0
  191. package/types/hyalo-angular-sparkline.d.ts +19 -0
  192. package/types/hyalo-angular-split-text.d.ts +24 -0
  193. package/types/hyalo-angular-stat.d.ts +56 -0
  194. package/types/hyalo-angular-stepper.d.ts +63 -0
  195. package/types/hyalo-angular-table.d.ts +125 -0
  196. package/types/hyalo-angular-timeline.d.ts +36 -0
  197. package/types/hyalo-angular.d.ts +2 -345
  198. package/fesm2022/hyalo-angular.mjs.map +0 -1
@@ -0,0 +1,46 @@
1
+ import * as i0 from "@angular/core";
2
+ export interface HyCodeSample {
3
+ readonly code: string;
4
+ readonly language: string;
5
+ readonly label: string;
6
+ }
7
+ export declare class HyCodeBlock {
8
+ readonly code: import("@angular/core").InputSignal<string>;
9
+ readonly language: import("@angular/core").InputSignal<string>;
10
+ readonly label: import("@angular/core").InputSignal<string>;
11
+ readonly copyable: import("@angular/core").InputSignal<boolean>;
12
+ readonly samples: import("@angular/core").InputSignal<readonly HyCodeSample[]>;
13
+ protected readonly selected: import("@angular/core").WritableSignal<number>;
14
+ protected readonly active: import("@angular/core").Signal<HyCodeSample>;
15
+ protected readonly highlighted: import("@angular/core").WritableSignal<string | null>;
16
+ private readonly ready;
17
+ constructor();
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<HyCodeBlock, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<HyCodeBlock, "hy-code-block", never, {
20
+ "code": {
21
+ "alias": "code";
22
+ "required": true;
23
+ "isSignal": true;
24
+ };
25
+ "language": {
26
+ "alias": "language";
27
+ "required": false;
28
+ "isSignal": true;
29
+ };
30
+ "label": {
31
+ "alias": "label";
32
+ "required": false;
33
+ "isSignal": true;
34
+ };
35
+ "copyable": {
36
+ "alias": "copyable";
37
+ "required": false;
38
+ "isSignal": true;
39
+ };
40
+ "samples": {
41
+ "alias": "samples";
42
+ "required": false;
43
+ "isSignal": true;
44
+ };
45
+ }, {}, never, never, true, never>;
46
+ }
@@ -0,0 +1,41 @@
1
+ import { DialogRef } from "@angular/cdk/dialog";
2
+ import * as i0 from "@angular/core";
3
+ export interface HyCommandItem<T = unknown> {
4
+ readonly id: string;
5
+ readonly label: string;
6
+ readonly value: T;
7
+ readonly description?: string;
8
+ readonly keywords?: readonly string[];
9
+ readonly group?: string;
10
+ readonly shortcut?: string;
11
+ readonly disabled?: boolean;
12
+ }
13
+ export interface HyCommandConfig<T = unknown> {
14
+ readonly items: readonly HyCommandItem<T>[];
15
+ readonly label?: string;
16
+ readonly placeholder?: string;
17
+ readonly emptyLabel?: string;
18
+ }
19
+ export declare class HyCommandPanel {
20
+ protected readonly data: HyCommandConfig;
21
+ private readonly ref;
22
+ protected readonly id: string;
23
+ protected readonly query: import("@angular/core").WritableSignal<string>;
24
+ private readonly indexed;
25
+ protected readonly matches: import("@angular/core").Signal<HyCommandItem<unknown>[]>;
26
+ protected readonly results: import("@angular/core").Signal<HyCommandItem<unknown>[]>;
27
+ protected readonly selected: import("@angular/core").WritableSignal<HyCommandItem<unknown>[]>;
28
+ protected pick(values: readonly HyCommandItem[]): void;
29
+ protected search(event: Event): void;
30
+ protected choose(item: HyCommandItem): void;
31
+ protected dismiss(event: Event): void;
32
+ protected close(): void;
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<HyCommandPanel, never>;
34
+ static ɵcmp: i0.ɵɵComponentDeclaration<HyCommandPanel, "hy-command-panel", never, {}, {}, never, never, true, never>;
35
+ }
36
+ export declare class HyCommand {
37
+ private readonly dialog;
38
+ open<T>(config: HyCommandConfig<T>): DialogRef<HyCommandItem<T>>;
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<HyCommand, never>;
40
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
41
+ }
@@ -0,0 +1,39 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class HyCopy {
3
+ readonly text: import("@angular/core").InputSignal<string>;
4
+ readonly label: import("@angular/core").InputSignal<string>;
5
+ readonly copiedLabel: import("@angular/core").InputSignal<string>;
6
+ readonly failedLabel: import("@angular/core").InputSignal<string>;
7
+ readonly completed: import("@angular/core").OutputEmitterRef<boolean>;
8
+ protected readonly status: import("@angular/core").WritableSignal<string>;
9
+ private readonly clipboard;
10
+ private timer?;
11
+ protected readonly copied: import("@angular/core").Signal<boolean>;
12
+ constructor();
13
+ copy(): void;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<HyCopy, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<HyCopy, "hy-copy", never, {
16
+ "text": {
17
+ "alias": "text";
18
+ "required": true;
19
+ "isSignal": true;
20
+ };
21
+ "label": {
22
+ "alias": "label";
23
+ "required": false;
24
+ "isSignal": true;
25
+ };
26
+ "copiedLabel": {
27
+ "alias": "copiedLabel";
28
+ "required": false;
29
+ "isSignal": true;
30
+ };
31
+ "failedLabel": {
32
+ "alias": "failedLabel";
33
+ "required": false;
34
+ "isSignal": true;
35
+ };
36
+ }, {
37
+ "completed": "completed";
38
+ }, never, ["*"], true, never>;
39
+ }
@@ -0,0 +1,210 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ElementRef, InjectionToken, Provider, Signal } from "@angular/core";
3
+ /**
4
+ * How see-through a surface is.
5
+ *
6
+ * - `clear`: a light veil, most of the background shows through.
7
+ * - `frosted`: the default glass, blurred and saturated.
8
+ * - `tinted`: primary-coloured surface without live backdrop blur.
9
+ * - `solid`: opaque. Used automatically when the browser cannot blur, when
10
+ * the user asks for reduced transparency, and on the low fidelity tier.
11
+ */
12
+ export type HyMaterial = 'clear' | 'frosted' | 'tinted' | 'solid';
13
+ /**
14
+ * How heavy a glass surface reads. Bigger surfaces should be thicker: more
15
+ * blur and a deeper shadow.
16
+ *
17
+ * - `thin`: chips and buttons.
18
+ * - `regular`: the default, for cards, bars, popovers and toasts.
19
+ * - `thick`: dialogs, drawers and sheets.
20
+ */
21
+ export type HyThickness = 'thin' | 'regular' | 'thick';
22
+ /** Control size. All sizes keep a touch target of at least 32px. */
23
+ export type HySize = 'sm' | 'md' | 'lg';
24
+ /**
25
+ * Colour role of a control. `secondary` uses --hy-secondary when the theme sets
26
+ * it and falls back to the primary colour when it does not.
27
+ */
28
+ export type HyTone = 'primary' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger';
29
+ /**
30
+ * How much visual effort the device can afford.
31
+ *
32
+ * - `high`: everything, including cursor physics and (from v0.2) WebGL.
33
+ * - `medium`: GSAP tilt and reveals, no WebGL.
34
+ * - `low`: CSS only. Glass turns solid and nothing waits on JavaScript to
35
+ * become visible.
36
+ */
37
+ export type HyFidelityTier = 'high' | 'medium' | 'low';
38
+ /**
39
+ * The small part of GSAP that Hyalo uses. Declared here so the kit compiles
40
+ * without GSAP installed. The real `gsap` object satisfies it.
41
+ */
42
+ export interface HyGsap {
43
+ to(target: Element | Element[], vars: Record<string, unknown>): unknown;
44
+ set(target: Element | Element[], vars: Record<string, unknown>): unknown;
45
+ quickTo(target: Element, property: string, vars?: Record<string, unknown>): (value: number) => unknown;
46
+ killTweensOf(target: Element | Element[]): void;
47
+ }
48
+ /** Returns GSAP, usually through a dynamic import so it lands in its own chunk. */
49
+ export type HyGsapLoader = () => Promise<HyGsap>;
50
+ /** Global defaults read by every Hyalo component. */
51
+ export interface HyConfig {
52
+ readonly locale?: string;
53
+ /** Default material for glass surfaces. */
54
+ readonly material: HyMaterial;
55
+ /** Default control size. */
56
+ readonly size: HySize;
57
+ /** Default tone for buttons and other coloured controls. */
58
+ readonly tone: HyTone;
59
+ /**
60
+ * Forces a fidelity tier instead of detecting it. Handy for tests,
61
+ * screenshots and low-end kiosks.
62
+ */
63
+ readonly fidelity?: HyFidelityTier;
64
+ /**
65
+ * Loads GSAP on demand. Without it, Hyalo falls back to CSS transitions,
66
+ * so GSAP stays an optional dependency.
67
+ *
68
+ * ```ts
69
+ * provideHyalo({ gsap: () => import('gsap').then((m) => m.gsap) })
70
+ * ```
71
+ */
72
+ readonly gsap?: HyGsapLoader;
73
+ /**
74
+ * Maps a palette name to its stylesheet URL for HyPalette. Defaults to
75
+ * `palette-<name>.css`, which is what a non-injected `bundleName` entry
76
+ * in angular.json produces.
77
+ */
78
+ readonly paletteHref?: (name: string) => string;
79
+ }
80
+ /** Resolved Hyalo configuration. Use {@link provideHyalo} to change it. */
81
+ export declare const HY_CONFIG: InjectionToken<HyConfig>;
82
+ /**
83
+ * Sets Hyalo defaults. Works in `app.config.ts` and in a component's
84
+ * `providers`, where it merges with whatever the parent injector provides.
85
+ * That makes it easy to switch one section of a page to `solid`, for example.
86
+ */
87
+ export declare function provideHyalo(config?: Partial<HyConfig>): Provider;
88
+ /**
89
+ * Returns a unique id with the given prefix. The counter is per application,
90
+ * so the server and the client produce the same ids during hydration.
91
+ */
92
+ export declare function injectId(prefix: string): string;
93
+ interface NavigatorHints {
94
+ readonly deviceMemory?: number;
95
+ readonly hardwareConcurrency?: number;
96
+ readonly connection?: {
97
+ readonly saveData?: boolean;
98
+ };
99
+ }
100
+ export declare function detectFidelity(nav: NavigatorHints): HyFidelityTier;
101
+ export declare class HyFidelity {
102
+ private readonly config;
103
+ private readonly document;
104
+ private readonly detectedTier;
105
+ private readonly selectedTier;
106
+ readonly detected: import("@angular/core").Signal<HyFidelityTier>;
107
+ readonly override: import("@angular/core").Signal<HyFidelityTier | null>;
108
+ readonly tier: import("@angular/core").Signal<HyFidelityTier>;
109
+ constructor();
110
+ setTier(tier: HyFidelityTier | null): void;
111
+ static ɵfac: i0.ɵɵFactoryDeclaration<HyFidelity, never>;
112
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
113
+ }
114
+ /**
115
+ * Turns any element into a glass surface.
116
+ *
117
+ * ```html
118
+ * <aside hyMaterial="clear">...</aside>
119
+ * <section hyMaterial thickness="thick">...</section>
120
+ * ```
121
+ *
122
+ * The look lives in CSS (`.hy-glass[data-material]`), so effects stay cheap
123
+ * and themeable. On the low fidelity tier every material renders as `solid`,
124
+ * because backdrop blur is the most expensive thing on the page.
125
+ */
126
+ export declare class HyMaterialDirective {
127
+ private readonly config;
128
+ private readonly appearance;
129
+ private readonly fidelity;
130
+ /** The material. An empty attribute uses the configured default. */
131
+ readonly material: import("@angular/core").InputSignal<"" | HyMaterial | undefined>;
132
+ /** How heavy the glass reads. Use `thick` for large surfaces. */
133
+ readonly thickness: import("@angular/core").InputSignal<HyThickness>;
134
+ /** The material that is actually rendered after fidelity is applied. */
135
+ readonly resolved: import("@angular/core").Signal<HyMaterial>;
136
+ static ɵfac: i0.ɵɵFactoryDeclaration<HyMaterialDirective, never>;
137
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HyMaterialDirective, "[hyMaterial]", never, {
138
+ "material": {
139
+ "alias": "hyMaterial";
140
+ "required": false;
141
+ "isSignal": true;
142
+ };
143
+ "thickness": {
144
+ "alias": "thickness";
145
+ "required": false;
146
+ "isSignal": true;
147
+ };
148
+ }, {}, never, never, true, never>;
149
+ }
150
+ /**
151
+ * Mirrors interaction state to data attributes so glass effects can stay in
152
+ * CSS: `data-hover`, `data-press` and `data-focus-visible`.
153
+ *
154
+ * Hover is only reported for mouse and pen, so touch screens never get a
155
+ * stuck hover state.
156
+ */
157
+ export declare class HyInteractive {
158
+ private readonly host;
159
+ private readonly focusMonitor;
160
+ protected readonly hovered: import("@angular/core").WritableSignal<boolean>;
161
+ protected readonly pressed: import("@angular/core").WritableSignal<boolean>;
162
+ protected readonly focusVisible: import("@angular/core").WritableSignal<boolean>;
163
+ constructor();
164
+ protected onEnter(event: PointerEvent): void;
165
+ static ɵfac: i0.ɵɵFactoryDeclaration<HyInteractive, never>;
166
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HyInteractive, "[hyInteractive]", never, {}, {}, never, never, true, never>;
167
+ }
168
+ /** True in the browser, false during server rendering. Call in an injection context. */
169
+ declare function injectIsBrowser(): boolean;
170
+ /** Reads a media query once. Always false on the server. */
171
+ declare function matchesMedia(query: string): boolean;
172
+ /**
173
+ * Keeps a sliding indicator under the selected item of a row by writing
174
+ * `--hy-ind-x` and `--hy-ind-size` on the row. The offset is physical (from
175
+ * the left edge) and the indicator is placed physically too, so the same
176
+ * numbers work in both directions.
177
+ *
178
+ * Returns a signal that turns true after the first placement, so CSS can
179
+ * enable the transition only from then on.
180
+ */
181
+ declare function trackIndicator(container: Signal<ElementRef<HTMLElement> | undefined>, selected: () => HTMLElement | null): Signal<boolean>;
182
+ /** Scoped preview override; null preserves each component's own material choice. */
183
+ export declare class HyAppearance {
184
+ readonly material: import("@angular/core").WritableSignal<HyMaterial | null>;
185
+ static ɵfac: i0.ɵɵFactoryDeclaration<HyAppearance, never>;
186
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
187
+ }
188
+ export declare class HyLocale {
189
+ readonly locale: import("@angular/core").WritableSignal<string>;
190
+ setLocale(value: string): void;
191
+ static ɵfac: i0.ɵɵFactoryDeclaration<HyLocale, never>;
192
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
193
+ }
194
+ export declare function normalizeDigits(value: string): string;
195
+ /** Keeps identifier strings intact, including leading zeros; it does not parse numbers. */
196
+ export declare class HyDigits {
197
+ readonly hyDigits: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
198
+ private readonly el;
199
+ protected normalize(event: Event): void;
200
+ static ɵfac: i0.ɵɵFactoryDeclaration<HyDigits, never>;
201
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HyDigits, "input[hyDigits],textarea[hyDigits]", never, {
202
+ "hyDigits": {
203
+ "alias": "hyDigits";
204
+ "required": false;
205
+ "isSignal": true;
206
+ };
207
+ }, {}, never, never, true, never>;
208
+ }
209
+ export declare function normalizeSearch(value: string, locale?: string): string;
210
+ export { injectIsBrowser as ɵinjectIsBrowser, matchesMedia as ɵmatchesMedia, trackIndicator as ɵtrackIndicator };
@@ -0,0 +1,16 @@
1
+ import * as i0 from "@angular/core";
2
+ export interface HyDescription {
3
+ readonly term: string;
4
+ readonly detail: string;
5
+ }
6
+ export declare class HyDescriptionList {
7
+ readonly items: import("@angular/core").InputSignal<readonly HyDescription[]>;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<HyDescriptionList, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<HyDescriptionList, "hy-description-list", never, {
10
+ "items": {
11
+ "alias": "items";
12
+ "required": true;
13
+ "isSignal": true;
14
+ };
15
+ }, {}, never, never, true, never>;
16
+ }
@@ -2,8 +2,9 @@ import { DialogConfig, DialogRef } from "@angular/cdk/dialog";
2
2
  import * as i0 from "@angular/core";
3
3
  import { InjectionToken, TemplateRef } from "@angular/core";
4
4
  import { ComponentType } from "@angular/cdk/portal";
5
- import { HyMaterial, HyTone } from "@hyalo/angular";
5
+ import { HyMaterial, HyTone } from "@hyalo/angular/core";
6
6
  import "@angular/cdk/overlay";
7
+ import "@hyalo/angular/motion";
7
8
  /** Data passed to a dialog or drawer through `open(..., { data })`. */
8
9
  export declare const HY_DIALOG_DATA: InjectionToken<unknown>;
9
10
  /**
@@ -0,0 +1,12 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class HyDivider {
3
+ readonly orientation: import("@angular/core").InputSignal<"horizontal" | "vertical">;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<HyDivider, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<HyDivider, "hy-divider", never, {
6
+ "orientation": {
7
+ "alias": "orientation";
8
+ "required": false;
9
+ "isSignal": true;
10
+ };
11
+ }, {}, never, never, true, never>;
12
+ }
@@ -0,0 +1,30 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class HyEmptyState {
3
+ readonly heading: import("@angular/core").InputSignal<string>;
4
+ readonly headingLevel: import("@angular/core").InputSignal<2 | 3 | 4 | 5 | 6>;
5
+ readonly description: import("@angular/core").InputSignal<string>;
6
+ readonly icon: import("@angular/core").InputSignal<string | undefined>;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<HyEmptyState, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<HyEmptyState, "hy-empty-state", never, {
9
+ "heading": {
10
+ "alias": "heading";
11
+ "required": true;
12
+ "isSignal": true;
13
+ };
14
+ "headingLevel": {
15
+ "alias": "headingLevel";
16
+ "required": false;
17
+ "isSignal": true;
18
+ };
19
+ "description": {
20
+ "alias": "description";
21
+ "required": false;
22
+ "isSignal": true;
23
+ };
24
+ "icon": {
25
+ "alias": "icon";
26
+ "required": false;
27
+ "isSignal": true;
28
+ };
29
+ }, {}, never, ["*"], true, never>;
30
+ }
@@ -1,6 +1,6 @@
1
1
  import * as i0 from "@angular/core";
2
- import { InjectionToken, Signal } from "@angular/core";
3
- import { HySize } from "@hyalo/angular";
2
+ import { DoCheck, InjectionToken, Signal } from "@angular/core";
3
+ import { HySize } from "@hyalo/angular/core";
4
4
  /**
5
5
  * What a control tells the field around it. Implemented by `hyInput` and
6
6
  * `hy-select`. Custom controls can implement it too, so `hy-field` can
@@ -43,9 +43,16 @@ export declare const HY_FIELD: InjectionToken<HyFieldContext>;
43
43
  * The element stays native, so Signal Forms, `ngModel`, autofill and
44
44
  * mobile keyboards all work as usual.
45
45
  */
46
- export declare class HyInput implements HyFieldControl {
46
+ export declare class HyInput implements HyFieldControl, DoCheck {
47
47
  protected readonly field: import("@hyalo/angular/field").HyFieldContext | null;
48
48
  private readonly formField;
49
+ private readonly ngControl;
50
+ private readonly destroy;
51
+ private readonly revision;
52
+ private control;
53
+ private subscription?;
54
+ constructor();
55
+ ngDoCheck(): void;
49
56
  readonly labelable = true;
50
57
  /** The element's own static `id` attribute, or a generated one. */
51
58
  readonly id: import("@angular/core").Signal<string>;
@@ -54,7 +61,6 @@ export declare class HyInput implements HyFieldControl {
54
61
  protected readonly showsError: import("@angular/core").Signal<boolean>;
55
62
  readonly required: import("@angular/core").Signal<boolean>;
56
63
  readonly disabled: import("@angular/core").Signal<boolean>;
57
- constructor();
58
64
  static ɵfac: i0.ɵɵFactoryDeclaration<HyInput, never>;
59
65
  static ɵdir: i0.ɵɵDirectiveDeclaration<HyInput, "input[hyInput], textarea[hyInput]", never, {}, {}, never, never, true, never>;
60
66
  }
@@ -0,0 +1,122 @@
1
+ import * as i0 from "@angular/core";
2
+ import { TemplateRef } from "@angular/core";
3
+ import { HySelectOption } from "@hyalo/angular/select";
4
+ export type HyFilterScalar = string | number | boolean;
5
+ export type HyDatePreset = '24H' | '7D' | '30D' | '1Y';
6
+ export type HyDateRangeValue = {
7
+ readonly kind: 'preset';
8
+ readonly preset: HyDatePreset;
9
+ readonly timeZone: string;
10
+ } | {
11
+ readonly kind: 'absolute';
12
+ readonly start: string;
13
+ readonly end: string;
14
+ readonly timeZone: string;
15
+ };
16
+ export type HyFilterRule = {
17
+ readonly operator: 'eq';
18
+ readonly value: HyFilterScalar;
19
+ } | {
20
+ readonly operator: 'in';
21
+ readonly value: readonly HyFilterScalar[];
22
+ } | {
23
+ readonly operator: 'contains';
24
+ readonly value: string;
25
+ } | {
26
+ readonly operator: 'between';
27
+ readonly value: readonly [number, number] | HyDateRangeValue;
28
+ };
29
+ export type HyFilterClause<S> = { [K in keyof S]: {
30
+ readonly id: string;
31
+ readonly field: K;
32
+ } & S[K]; }[keyof S];
33
+ export type HyFilterToken = {
34
+ readonly id: string;
35
+ readonly field: string;
36
+ } & HyFilterRule;
37
+ export interface HyFilterCodec<C extends HyFilterToken> {
38
+ readonly accepts: (value: unknown) => value is C;
39
+ }
40
+ export declare function encodeFilters<C extends HyFilterToken>(clauses: readonly C[]): string;
41
+ export declare function decodeFilters<C extends HyFilterToken>(text: string, codec: HyFilterCodec<C>): readonly C[];
42
+ export declare function isFilterToken(value: unknown): value is HyFilterToken;
43
+ /** Presets are rolling elapsed intervals; both editors use start-inclusive/end-exclusive instants. */
44
+ export declare function resolveDateRange(value: HyDateRangeValue, now: Date): {
45
+ readonly start: string;
46
+ readonly end: string;
47
+ };
48
+ export interface HyFilterEditorContext<C> {
49
+ readonly $implicit: C;
50
+ readonly update: (clause: C) => void;
51
+ }
52
+ export interface HyFilterField<C extends HyFilterToken> {
53
+ readonly field: C['field'];
54
+ readonly label: string;
55
+ readonly options?: readonly HySelectOption<string>[];
56
+ readonly create: (id: string, value: string) => C | null;
57
+ readonly editor?: TemplateRef<HyFilterEditorContext<C>>;
58
+ readonly format?: (clause: C) => string;
59
+ }
60
+ export declare class HyFilterBar<C extends HyFilterToken> {
61
+ readonly fields: import("@angular/core").InputSignal<readonly HyFilterField<C>[]>;
62
+ readonly clauses: import("@angular/core").ModelSignal<readonly C[]>;
63
+ readonly label: import("@angular/core").InputSignal<string>;
64
+ readonly clearLabel: import("@angular/core").InputSignal<string>;
65
+ readonly removeLabel: import("@angular/core").InputSignal<string>;
66
+ readonly anyLabel: import("@angular/core").InputSignal<string>;
67
+ readonly activeLabel: import("@angular/core").InputSignal<string>;
68
+ protected readonly view: import("@angular/core").Signal<{
69
+ clause: C;
70
+ label: string;
71
+ text: string;
72
+ editor: TemplateRef<HyFilterEditorContext<C>> | undefined;
73
+ context: {
74
+ $implicit: C;
75
+ update: (next: C) => void;
76
+ };
77
+ }[]>;
78
+ protected raw(field: string): string;
79
+ protected change(field: HyFilterField<C>, raw: string): void;
80
+ protected remove(id: string): void;
81
+ private update;
82
+ static ɵfac: i0.ɵɵFactoryDeclaration<HyFilterBar<any>, never>;
83
+ static ɵcmp: i0.ɵɵComponentDeclaration<HyFilterBar<any>, "hy-filter-bar", never, {
84
+ "fields": {
85
+ "alias": "fields";
86
+ "required": true;
87
+ "isSignal": true;
88
+ };
89
+ "clauses": {
90
+ "alias": "clauses";
91
+ "required": false;
92
+ "isSignal": true;
93
+ };
94
+ "label": {
95
+ "alias": "label";
96
+ "required": false;
97
+ "isSignal": true;
98
+ };
99
+ "clearLabel": {
100
+ "alias": "clearLabel";
101
+ "required": false;
102
+ "isSignal": true;
103
+ };
104
+ "removeLabel": {
105
+ "alias": "removeLabel";
106
+ "required": false;
107
+ "isSignal": true;
108
+ };
109
+ "anyLabel": {
110
+ "alias": "anyLabel";
111
+ "required": false;
112
+ "isSignal": true;
113
+ };
114
+ "activeLabel": {
115
+ "alias": "activeLabel";
116
+ "required": false;
117
+ "isSignal": true;
118
+ };
119
+ }, {
120
+ "clauses": "clausesChange";
121
+ }, never, ["*"], true, never>;
122
+ }
@@ -0,0 +1,70 @@
1
+ import { HyMotion } from "@hyalo/angular/motion";
2
+ import { HyPlacement } from "@hyalo/angular/overlay";
3
+ import * as i0 from "@angular/core";
4
+ export type HyHotspotMode = 'label' | 'pin';
5
+ export interface HyHotspotPosition {
6
+ readonly x: number;
7
+ readonly y: number;
8
+ readonly visible?: boolean;
9
+ }
10
+ /** Pass screen coordinates from your scene's projection. Position is relative to its frame. */
11
+ export declare class HyHotspot {
12
+ protected readonly motion: HyMotion;
13
+ readonly label: import("@angular/core").InputSignal<string>;
14
+ readonly position: import("@angular/core").InputSignal<HyHotspotPosition>;
15
+ readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
16
+ /** Optional detail panel. Without a description this stays a plain action button. */
17
+ readonly description: import("@angular/core").InputSignal<string>;
18
+ readonly mode: import("@angular/core").InputSignal<HyHotspotMode>;
19
+ readonly open: import("@angular/core").ModelSignal<boolean>;
20
+ readonly placement: import("@angular/core").InputSignal<HyPlacement>;
21
+ readonly closeLabel: import("@angular/core").InputSignal<string>;
22
+ readonly activated: import("@angular/core").OutputEmitterRef<void>;
23
+ protected readonly visible: import("@angular/core").Signal<boolean>;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<HyHotspot, never>;
25
+ static ɵcmp: i0.ɵɵComponentDeclaration<HyHotspot, "hy-hotspot", never, {
26
+ "label": {
27
+ "alias": "label";
28
+ "required": true;
29
+ "isSignal": true;
30
+ };
31
+ "position": {
32
+ "alias": "position";
33
+ "required": true;
34
+ "isSignal": true;
35
+ };
36
+ "disabled": {
37
+ "alias": "disabled";
38
+ "required": false;
39
+ "isSignal": true;
40
+ };
41
+ "description": {
42
+ "alias": "description";
43
+ "required": false;
44
+ "isSignal": true;
45
+ };
46
+ "mode": {
47
+ "alias": "mode";
48
+ "required": false;
49
+ "isSignal": true;
50
+ };
51
+ "open": {
52
+ "alias": "open";
53
+ "required": false;
54
+ "isSignal": true;
55
+ };
56
+ "placement": {
57
+ "alias": "placement";
58
+ "required": false;
59
+ "isSignal": true;
60
+ };
61
+ "closeLabel": {
62
+ "alias": "closeLabel";
63
+ "required": false;
64
+ "isSignal": true;
65
+ };
66
+ }, {
67
+ "open": "openChange";
68
+ "activated": "activated";
69
+ }, never, never, true, never>;
70
+ }