@hyalo/angular 0.0.0-stage → 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 (229) hide show
  1. package/CHANGELOG.md +95 -0
  2. package/LICENSE +21 -0
  3. package/README.md +45 -2
  4. package/fesm2022/hyalo-angular-accordion.mjs +230 -0
  5. package/fesm2022/hyalo-angular-accordion.mjs.map +1 -0
  6. package/fesm2022/hyalo-angular-alert.mjs +171 -0
  7. package/fesm2022/hyalo-angular-alert.mjs.map +1 -0
  8. package/fesm2022/hyalo-angular-aspect-ratio.mjs +64 -0
  9. package/fesm2022/hyalo-angular-aspect-ratio.mjs.map +1 -0
  10. package/fesm2022/hyalo-angular-avatar.mjs +169 -0
  11. package/fesm2022/hyalo-angular-avatar.mjs.map +1 -0
  12. package/fesm2022/hyalo-angular-badge.mjs +268 -0
  13. package/fesm2022/hyalo-angular-badge.mjs.map +1 -0
  14. package/fesm2022/hyalo-angular-bento.mjs +132 -0
  15. package/fesm2022/hyalo-angular-bento.mjs.map +1 -0
  16. package/fesm2022/hyalo-angular-blocks.mjs +985 -0
  17. package/fesm2022/hyalo-angular-blocks.mjs.map +1 -0
  18. package/fesm2022/hyalo-angular-border-beam.mjs +73 -0
  19. package/fesm2022/hyalo-angular-border-beam.mjs.map +1 -0
  20. package/fesm2022/hyalo-angular-breadcrumb.mjs +77 -0
  21. package/fesm2022/hyalo-angular-breadcrumb.mjs.map +1 -0
  22. package/fesm2022/hyalo-angular-button-group.mjs +90 -0
  23. package/fesm2022/hyalo-angular-button-group.mjs.map +1 -0
  24. package/fesm2022/hyalo-angular-button.mjs +204 -0
  25. package/fesm2022/hyalo-angular-button.mjs.map +1 -0
  26. package/fesm2022/hyalo-angular-card.mjs +221 -0
  27. package/fesm2022/hyalo-angular-card.mjs.map +1 -0
  28. package/fesm2022/hyalo-angular-carousel.mjs +709 -0
  29. package/fesm2022/hyalo-angular-carousel.mjs.map +1 -0
  30. package/fesm2022/hyalo-angular-chapter-nav.mjs +336 -0
  31. package/fesm2022/hyalo-angular-chapter-nav.mjs.map +1 -0
  32. package/fesm2022/hyalo-angular-chart-engine-DSJop6He.mjs +5 -0
  33. package/fesm2022/hyalo-angular-chart-engine-DSJop6He.mjs.map +1 -0
  34. package/fesm2022/hyalo-angular-chart.mjs +391 -0
  35. package/fesm2022/hyalo-angular-chart.mjs.map +1 -0
  36. package/fesm2022/hyalo-angular-choice.mjs +789 -0
  37. package/fesm2022/hyalo-angular-choice.mjs.map +1 -0
  38. package/fesm2022/hyalo-angular-code-block-highlight-B20d5C76.mjs +40 -0
  39. package/fesm2022/hyalo-angular-code-block-highlight-B20d5C76.mjs.map +1 -0
  40. package/fesm2022/hyalo-angular-code-block.mjs +161 -0
  41. package/fesm2022/hyalo-angular-code-block.mjs.map +1 -0
  42. package/fesm2022/hyalo-angular-command.mjs +193 -0
  43. package/fesm2022/hyalo-angular-command.mjs.map +1 -0
  44. package/fesm2022/hyalo-angular-copy.mjs +138 -0
  45. package/fesm2022/hyalo-angular-copy.mjs.map +1 -0
  46. package/fesm2022/hyalo-angular-core.mjs +424 -0
  47. package/fesm2022/hyalo-angular-core.mjs.map +1 -0
  48. package/fesm2022/hyalo-angular-description-list.mjs +57 -0
  49. package/fesm2022/hyalo-angular-description-list.mjs.map +1 -0
  50. package/fesm2022/hyalo-angular-dialog.mjs +600 -0
  51. package/fesm2022/hyalo-angular-dialog.mjs.map +1 -0
  52. package/fesm2022/hyalo-angular-divider.mjs +66 -0
  53. package/fesm2022/hyalo-angular-divider.mjs.map +1 -0
  54. package/fesm2022/hyalo-angular-empty-state.mjs +123 -0
  55. package/fesm2022/hyalo-angular-empty-state.mjs.map +1 -0
  56. package/fesm2022/hyalo-angular-field.mjs +344 -0
  57. package/fesm2022/hyalo-angular-field.mjs.map +1 -0
  58. package/fesm2022/hyalo-angular-filter.mjs +309 -0
  59. package/fesm2022/hyalo-angular-filter.mjs.map +1 -0
  60. package/fesm2022/hyalo-angular-hotspot.mjs +225 -0
  61. package/fesm2022/hyalo-angular-hotspot.mjs.map +1 -0
  62. package/fesm2022/hyalo-angular-hover-card.mjs +233 -0
  63. package/fesm2022/hyalo-angular-hover-card.mjs.map +1 -0
  64. package/fesm2022/hyalo-angular-icon.mjs +385 -0
  65. package/fesm2022/hyalo-angular-icon.mjs.map +1 -0
  66. package/fesm2022/hyalo-angular-image-compare.mjs +168 -0
  67. package/fesm2022/hyalo-angular-image-compare.mjs.map +1 -0
  68. package/fesm2022/hyalo-angular-interaction.mjs +446 -0
  69. package/fesm2022/hyalo-angular-interaction.mjs.map +1 -0
  70. package/fesm2022/hyalo-angular-kbd.mjs +41 -0
  71. package/fesm2022/hyalo-angular-kbd.mjs.map +1 -0
  72. package/fesm2022/hyalo-angular-lightbox.mjs +228 -0
  73. package/fesm2022/hyalo-angular-lightbox.mjs.map +1 -0
  74. package/fesm2022/hyalo-angular-link.mjs +42 -0
  75. package/fesm2022/hyalo-angular-link.mjs.map +1 -0
  76. package/fesm2022/hyalo-angular-list.mjs +131 -0
  77. package/fesm2022/hyalo-angular-list.mjs.map +1 -0
  78. package/fesm2022/hyalo-angular-marquee.mjs +197 -0
  79. package/fesm2022/hyalo-angular-marquee.mjs.map +1 -0
  80. package/fesm2022/hyalo-angular-menu.mjs +423 -0
  81. package/fesm2022/hyalo-angular-menu.mjs.map +1 -0
  82. package/fesm2022/hyalo-angular-mesh.mjs +126 -0
  83. package/fesm2022/hyalo-angular-mesh.mjs.map +1 -0
  84. package/fesm2022/hyalo-angular-motion.mjs +620 -0
  85. package/fesm2022/hyalo-angular-motion.mjs.map +1 -0
  86. package/fesm2022/hyalo-angular-navbar.mjs +343 -0
  87. package/fesm2022/hyalo-angular-navbar.mjs.map +1 -0
  88. package/fesm2022/hyalo-angular-navigation-menu.mjs +222 -0
  89. package/fesm2022/hyalo-angular-navigation-menu.mjs.map +1 -0
  90. package/fesm2022/hyalo-angular-number-ticker.mjs +174 -0
  91. package/fesm2022/hyalo-angular-number-ticker.mjs.map +1 -0
  92. package/fesm2022/hyalo-angular-overlay.mjs +163 -0
  93. package/fesm2022/hyalo-angular-overlay.mjs.map +1 -0
  94. package/fesm2022/hyalo-angular-pagination.mjs +187 -0
  95. package/fesm2022/hyalo-angular-pagination.mjs.map +1 -0
  96. package/fesm2022/hyalo-angular-popover-overlay-kit-6wPwnxln.mjs +3 -0
  97. package/fesm2022/hyalo-angular-popover.mjs +516 -0
  98. package/fesm2022/hyalo-angular-popover.mjs.map +1 -0
  99. package/fesm2022/hyalo-angular-progress.mjs +209 -0
  100. package/fesm2022/hyalo-angular-progress.mjs.map +1 -0
  101. package/fesm2022/hyalo-angular-progressive-blur.mjs +73 -0
  102. package/fesm2022/hyalo-angular-progressive-blur.mjs.map +1 -0
  103. package/fesm2022/hyalo-angular-refraction-renderer-5ZA-kfsA.mjs +186 -0
  104. package/fesm2022/hyalo-angular-refraction-renderer-5ZA-kfsA.mjs.map +1 -0
  105. package/fesm2022/hyalo-angular-refraction.mjs +178 -0
  106. package/fesm2022/hyalo-angular-refraction.mjs.map +1 -0
  107. package/fesm2022/hyalo-angular-scroll-area.mjs +93 -0
  108. package/fesm2022/hyalo-angular-scroll-area.mjs.map +1 -0
  109. package/fesm2022/hyalo-angular-scroll-to-top.mjs +127 -0
  110. package/fesm2022/hyalo-angular-scroll-to-top.mjs.map +1 -0
  111. package/fesm2022/hyalo-angular-segmented.mjs +223 -0
  112. package/fesm2022/hyalo-angular-segmented.mjs.map +1 -0
  113. package/fesm2022/hyalo-angular-select.mjs +561 -0
  114. package/fesm2022/hyalo-angular-select.mjs.map +1 -0
  115. package/fesm2022/hyalo-angular-sidebar.mjs +241 -0
  116. package/fesm2022/hyalo-angular-sidebar.mjs.map +1 -0
  117. package/fesm2022/hyalo-angular-skeleton.mjs +131 -0
  118. package/fesm2022/hyalo-angular-skeleton.mjs.map +1 -0
  119. package/fesm2022/hyalo-angular-sparkline.mjs +110 -0
  120. package/fesm2022/hyalo-angular-sparkline.mjs.map +1 -0
  121. package/fesm2022/hyalo-angular-split-text.mjs +126 -0
  122. package/fesm2022/hyalo-angular-split-text.mjs.map +1 -0
  123. package/fesm2022/hyalo-angular-stat.mjs +193 -0
  124. package/fesm2022/hyalo-angular-stat.mjs.map +1 -0
  125. package/fesm2022/hyalo-angular-stepper.mjs +254 -0
  126. package/fesm2022/hyalo-angular-stepper.mjs.map +1 -0
  127. package/fesm2022/hyalo-angular-table.mjs +335 -0
  128. package/fesm2022/hyalo-angular-table.mjs.map +1 -0
  129. package/fesm2022/hyalo-angular-tabs.mjs +324 -0
  130. package/fesm2022/hyalo-angular-tabs.mjs.map +1 -0
  131. package/fesm2022/hyalo-angular-theme.mjs +94 -0
  132. package/fesm2022/hyalo-angular-theme.mjs.map +1 -0
  133. package/fesm2022/hyalo-angular-timeline.mjs +157 -0
  134. package/fesm2022/hyalo-angular-timeline.mjs.map +1 -0
  135. package/fesm2022/hyalo-angular-toast.mjs +323 -0
  136. package/fesm2022/hyalo-angular-toast.mjs.map +1 -0
  137. package/fesm2022/hyalo-angular.mjs +2 -0
  138. package/package.json +329 -3
  139. package/styles/hyalo-core.css +25 -0
  140. package/styles/hyalo.css +17 -0
  141. package/styles/overlays/dialog.css +9 -0
  142. package/styles/overlays/popover.css +9 -0
  143. package/styles/overlays/select.css +9 -0
  144. package/styles/overlays/toast.css +8 -0
  145. package/styles/palettes/aurora.css +47 -0
  146. package/styles/palettes/ember.css +47 -0
  147. package/styles/palettes/graphite.css +47 -0
  148. package/styles/palettes/ocean.css +47 -0
  149. package/styles/palettes/orchid.css +47 -0
  150. package/styles/palettes/rose.css +47 -0
  151. package/styles/parts/card.css +49 -0
  152. package/styles/parts/dialog.css +116 -0
  153. package/styles/parts/drawer.css +124 -0
  154. package/styles/parts/field.css +44 -0
  155. package/styles/parts/glass.css +139 -0
  156. package/styles/parts/motion.css +101 -0
  157. package/styles/parts/navbar.css +55 -0
  158. package/styles/parts/popover.css +27 -0
  159. package/styles/parts/presence.css +55 -0
  160. package/styles/parts/reset.css +42 -0
  161. package/styles/parts/select.css +46 -0
  162. package/styles/parts/themes.css +105 -0
  163. package/styles/parts/toast.css +128 -0
  164. package/styles/parts/tokens.css +151 -0
  165. package/styles/parts/typography.css +81 -0
  166. package/types/hyalo-angular-accordion.d.ts +74 -0
  167. package/types/hyalo-angular-alert.d.ts +47 -0
  168. package/types/hyalo-angular-aspect-ratio.d.ts +13 -0
  169. package/types/hyalo-angular-avatar.d.ts +39 -0
  170. package/types/hyalo-angular-badge.d.ts +82 -0
  171. package/types/hyalo-angular-bento.d.ts +25 -0
  172. package/types/hyalo-angular-blocks.d.ts +272 -0
  173. package/types/hyalo-angular-border-beam.d.ts +15 -0
  174. package/types/hyalo-angular-breadcrumb.d.ts +22 -0
  175. package/types/hyalo-angular-button-group.d.ts +19 -0
  176. package/types/hyalo-angular-button.d.ts +89 -0
  177. package/types/hyalo-angular-card.d.ts +61 -0
  178. package/types/hyalo-angular-carousel.d.ts +147 -0
  179. package/types/hyalo-angular-chapter-nav.d.ts +79 -0
  180. package/types/hyalo-angular-chart.d.ts +90 -0
  181. package/types/hyalo-angular-choice.d.ts +259 -0
  182. package/types/hyalo-angular-code-block.d.ts +46 -0
  183. package/types/hyalo-angular-command.d.ts +41 -0
  184. package/types/hyalo-angular-copy.d.ts +39 -0
  185. package/types/hyalo-angular-core.d.ts +210 -0
  186. package/types/hyalo-angular-description-list.d.ts +16 -0
  187. package/types/hyalo-angular-dialog.d.ts +171 -0
  188. package/types/hyalo-angular-divider.d.ts +12 -0
  189. package/types/hyalo-angular-empty-state.d.ts +30 -0
  190. package/types/hyalo-angular-field.d.ts +141 -0
  191. package/types/hyalo-angular-filter.d.ts +122 -0
  192. package/types/hyalo-angular-hotspot.d.ts +70 -0
  193. package/types/hyalo-angular-hover-card.d.ts +47 -0
  194. package/types/hyalo-angular-icon.d.ts +122 -0
  195. package/types/hyalo-angular-image-compare.d.ts +55 -0
  196. package/types/hyalo-angular-interaction.d.ts +131 -0
  197. package/types/hyalo-angular-kbd.d.ts +5 -0
  198. package/types/hyalo-angular-lightbox.d.ts +67 -0
  199. package/types/hyalo-angular-link.d.ts +5 -0
  200. package/types/hyalo-angular-list.d.ts +30 -0
  201. package/types/hyalo-angular-marquee.d.ts +48 -0
  202. package/types/hyalo-angular-menu.d.ts +105 -0
  203. package/types/hyalo-angular-mesh.d.ts +36 -0
  204. package/types/hyalo-angular-motion.d.ts +218 -0
  205. package/types/hyalo-angular-navbar.d.ts +110 -0
  206. package/types/hyalo-angular-navigation-menu.d.ts +47 -0
  207. package/types/hyalo-angular-number-ticker.d.ts +52 -0
  208. package/types/hyalo-angular-overlay.d.ts +40 -0
  209. package/types/hyalo-angular-pagination.d.ts +59 -0
  210. package/types/hyalo-angular-popover.d.ts +152 -0
  211. package/types/hyalo-angular-progress.d.ts +46 -0
  212. package/types/hyalo-angular-progressive-blur.d.ts +14 -0
  213. package/types/hyalo-angular-refraction.d.ts +46 -0
  214. package/types/hyalo-angular-scroll-area.d.ts +18 -0
  215. package/types/hyalo-angular-scroll-to-top.d.ts +31 -0
  216. package/types/hyalo-angular-segmented.d.ts +79 -0
  217. package/types/hyalo-angular-select.d.ts +176 -0
  218. package/types/hyalo-angular-sidebar.d.ts +57 -0
  219. package/types/hyalo-angular-skeleton.d.ts +34 -0
  220. package/types/hyalo-angular-sparkline.d.ts +19 -0
  221. package/types/hyalo-angular-split-text.d.ts +24 -0
  222. package/types/hyalo-angular-stat.d.ts +56 -0
  223. package/types/hyalo-angular-stepper.d.ts +63 -0
  224. package/types/hyalo-angular-table.d.ts +125 -0
  225. package/types/hyalo-angular-tabs.d.ts +102 -0
  226. package/types/hyalo-angular-theme.d.ts +46 -0
  227. package/types/hyalo-angular-timeline.d.ts +36 -0
  228. package/types/hyalo-angular-toast.d.ts +79 -0
  229. package/types/hyalo-angular.d.ts +2 -0
@@ -0,0 +1,233 @@
1
+ import { DOCUMENT } from "@angular/common";
2
+ import { createFlexibleConnectedPositionStrategy, createOverlayRef, createRepositionScrollStrategy } from "@angular/cdk/overlay";
3
+ import { TemplatePortal } from "@angular/cdk/portal";
4
+ import * as i0 from "@angular/core";
5
+ import { DestroyRef, Directive, ElementRef, Injector, ViewContainerRef, inject, input, signal } from "@angular/core";
6
+ import { HyFidelity, injectId } from "@hyalo/angular/core";
7
+ import { HyHoverIntent, hyConnectedPositions } from "@hyalo/angular/overlay";
8
+ import { take } from "rxjs";
9
+ var HyHoverCard = class HyHoverCard {
10
+ content = input.required({
11
+ ...ngDevMode ? { debugName: "content" } : /* istanbul ignore next */ {},
12
+ alias: "hyHoverCard"
13
+ });
14
+ hoverCardLabel = input.required(...ngDevMode ? [{ debugName: "hoverCardLabel" }] : /* istanbul ignore next */ []);
15
+ placement = input("top", ...ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []);
16
+ open = signal(false, ...ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []);
17
+ id = injectId("hover-card");
18
+ injector = inject(Injector);
19
+ host = inject(ElementRef);
20
+ container = inject(ViewContainerRef);
21
+ fidelity = inject(HyFidelity);
22
+ document = inject(DOCUMENT);
23
+ intent = new HyHoverIntent(this.document);
24
+ ref;
25
+ timer;
26
+ disposed = false;
27
+ suppressFocus = false;
28
+ focusTrigger() {
29
+ if (!this.suppressFocus) this.show();
30
+ }
31
+ constructor() {
32
+ inject(DestroyRef).onDestroy(() => {
33
+ this.disposed = true;
34
+ clearTimeout(this.timer);
35
+ this.intent.cancel();
36
+ this.ref?.dispose();
37
+ });
38
+ }
39
+ enter(event) {
40
+ this.intent.cancel();
41
+ if (event.pointerType === "touch") return;
42
+ clearTimeout(this.timer);
43
+ this.timer = setTimeout(() => this.show(), 250);
44
+ }
45
+ leave(event) {
46
+ clearTimeout(this.timer);
47
+ this.intent.leave(event, this.ref?.overlayElement, () => {
48
+ if (this.ref?.overlayElement.contains(this.document.activeElement) || this.host.nativeElement.contains(this.document.activeElement)) return;
49
+ this.hide();
50
+ });
51
+ }
52
+ focusOut(event) {
53
+ if (event.relatedTarget && this.ref?.overlayElement.contains(event.relatedTarget)) return;
54
+ this.leave();
55
+ }
56
+ escape(event) {
57
+ if (this.open()) {
58
+ event.preventDefault();
59
+ event.stopPropagation();
60
+ this.hide();
61
+ this.suppressFocus = true;
62
+ this.host.nativeElement.focus();
63
+ this.suppressFocus = false;
64
+ }
65
+ }
66
+ focusCard(event) {
67
+ event.preventDefault();
68
+ this.show();
69
+ const pane = this.ref?.overlayElement;
70
+ if (!pane) return;
71
+ const focusable = pane.querySelector("a[href],button:not([disabled]),input:not([disabled]),[tabindex=\"0\"]");
72
+ pane.tabIndex = -1;
73
+ (focusable ?? pane).focus();
74
+ }
75
+ show() {
76
+ clearTimeout(this.timer);
77
+ if (this.disposed || this.open()) return;
78
+ if (!this.ref) {
79
+ const position = createFlexibleConnectedPositionStrategy(this.injector, this.host).withPositions(hyConnectedPositions(this.placement(), 8)).withViewportMargin(12).withPush(true);
80
+ this.ref = createOverlayRef(this.injector, {
81
+ positionStrategy: position,
82
+ scrollStrategy: createRepositionScrollStrategy(this.injector),
83
+ panelClass: "hy-hover-card-pane"
84
+ });
85
+ const pane = this.ref.overlayElement;
86
+ pane.classList.add("hy-glass");
87
+ pane.style.cssText = "max-inline-size:min(22rem,calc(100vw - 2rem));max-block-size:70dvh;overflow:auto;padding:1.25rem;border-radius:var(--hy-radius-m);border:1px solid var(--hy-line-strong);color:var(--hy-ink)";
88
+ pane.id = this.id;
89
+ pane.setAttribute("role", "dialog");
90
+ pane.addEventListener("pointerenter", () => {
91
+ clearTimeout(this.timer);
92
+ this.intent.cancel();
93
+ });
94
+ pane.addEventListener("pointerleave", () => this.leave());
95
+ pane.addEventListener("focusout", (event) => {
96
+ const next = event.relatedTarget;
97
+ if (!next || !pane.contains(next) && !this.host.nativeElement.contains(next)) this.leave();
98
+ });
99
+ this.ref.keydownEvents().subscribe((event) => {
100
+ if (event.key === "Escape") this.escape(event);
101
+ });
102
+ this.ref.outsidePointerEvents().subscribe((event) => {
103
+ if (!this.host.nativeElement.contains(event.target)) this.hide();
104
+ });
105
+ }
106
+ const pane = this.ref.overlayElement;
107
+ pane.setAttribute("aria-label", this.hoverCardLabel());
108
+ pane.dataset["material"] = this.fidelity.tier() === "low" ? "solid" : "frosted";
109
+ pane.style.visibility = "hidden";
110
+ const strategy = this.ref.getConfig().positionStrategy;
111
+ strategy.withPositions(hyConnectedPositions(this.placement(), 8));
112
+ strategy.positionChanges.pipe(take(1)).subscribe(() => pane.style.removeProperty("visibility"));
113
+ this.open.set(true);
114
+ this.ref.attach(new TemplatePortal(this.content(), this.container));
115
+ }
116
+ hide() {
117
+ clearTimeout(this.timer);
118
+ this.intent.cancel();
119
+ this.open.set(false);
120
+ this.ref?.detach();
121
+ }
122
+ static ɵfac = i0.ɵɵngDeclareFactory({
123
+ minVersion: "12.0.0",
124
+ version: "22.2.3",
125
+ ngImport: i0,
126
+ type: HyHoverCard,
127
+ deps: [],
128
+ target: i0.ɵɵFactoryTarget.Directive
129
+ });
130
+ static ɵdir = i0.ɵɵngDeclareDirective({
131
+ minVersion: "17.1.0",
132
+ version: "22.2.3",
133
+ type: HyHoverCard,
134
+ isStandalone: true,
135
+ selector: "[hyHoverCard]",
136
+ inputs: {
137
+ content: {
138
+ classPropertyName: "content",
139
+ publicName: "hyHoverCard",
140
+ isSignal: true,
141
+ isRequired: true,
142
+ transformFunction: null
143
+ },
144
+ hoverCardLabel: {
145
+ classPropertyName: "hoverCardLabel",
146
+ publicName: "hoverCardLabel",
147
+ isSignal: true,
148
+ isRequired: true,
149
+ transformFunction: null
150
+ },
151
+ placement: {
152
+ classPropertyName: "placement",
153
+ publicName: "placement",
154
+ isSignal: true,
155
+ isRequired: false,
156
+ transformFunction: null
157
+ }
158
+ },
159
+ host: {
160
+ attributes: { "aria-haspopup": "dialog" },
161
+ listeners: {
162
+ "pointerenter": "enter($event)",
163
+ "pointerleave": "leave($event)",
164
+ "focusin": "focusTrigger()",
165
+ "focusout": "focusOut($event)",
166
+ "keydown.escape": "escape($event)",
167
+ "keydown.arrowdown": "focusCard($event)",
168
+ "click": "show()"
169
+ },
170
+ properties: {
171
+ "attr.aria-expanded": "open()",
172
+ "attr.aria-controls": "open()?id:null"
173
+ }
174
+ },
175
+ exportAs: ["hyHoverCard"],
176
+ ngImport: i0
177
+ });
178
+ };
179
+ i0.ɵɵngDeclareClassMetadata({
180
+ minVersion: "12.0.0",
181
+ version: "22.2.3",
182
+ ngImport: i0,
183
+ type: HyHoverCard,
184
+ decorators: [{
185
+ type: Directive,
186
+ args: [{
187
+ selector: "[hyHoverCard]",
188
+ exportAs: "hyHoverCard",
189
+ host: {
190
+ "(pointerenter)": "enter($event)",
191
+ "(pointerleave)": "leave($event)",
192
+ "(focusin)": "focusTrigger()",
193
+ "(focusout)": "focusOut($event)",
194
+ "(keydown.escape)": "escape($event)",
195
+ "(keydown.arrowdown)": "focusCard($event)",
196
+ "(click)": "show()",
197
+ "aria-haspopup": "dialog",
198
+ "[attr.aria-expanded]": "open()",
199
+ "[attr.aria-controls]": "open()?id:null"
200
+ }
201
+ }]
202
+ }],
203
+ ctorParameters: () => [],
204
+ propDecorators: {
205
+ content: [{
206
+ type: i0.Input,
207
+ args: [{
208
+ isSignal: true,
209
+ alias: "hyHoverCard",
210
+ required: true
211
+ }]
212
+ }],
213
+ hoverCardLabel: [{
214
+ type: i0.Input,
215
+ args: [{
216
+ isSignal: true,
217
+ alias: "hoverCardLabel",
218
+ required: true
219
+ }]
220
+ }],
221
+ placement: [{
222
+ type: i0.Input,
223
+ args: [{
224
+ isSignal: true,
225
+ alias: "placement",
226
+ required: false
227
+ }]
228
+ }]
229
+ }
230
+ });
231
+ export { HyHoverCard };
232
+
233
+ //# sourceMappingURL=hyalo-angular-hover-card.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hyalo-angular-hover-card.mjs","names":[],"sources":["../../../projects/hyalo/hover-card/hover-card.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\r\nimport {\r\n createFlexibleConnectedPositionStrategy,\r\n createOverlayRef,\r\n createRepositionScrollStrategy,\r\n type OverlayRef,\r\n} from '@angular/cdk/overlay';\r\nimport { TemplatePortal } from '@angular/cdk/portal';\r\nimport {\r\n DestroyRef,\r\n Directive,\r\n ElementRef,\r\n Injector,\r\n TemplateRef,\r\n ViewContainerRef,\r\n inject,\r\n input,\r\n signal,\r\n} from '@angular/core';\r\nimport { HyFidelity, injectId } from '@hyalo/angular/core';\r\nimport { HyHoverIntent, hyConnectedPositions, type HyPlacement } from '@hyalo/angular/overlay';\r\nimport { take } from 'rxjs';\r\n@Directive({\r\n selector: '[hyHoverCard]',\r\n exportAs: 'hyHoverCard',\r\n host: {\r\n '(pointerenter)': 'enter($event)',\r\n '(pointerleave)': 'leave($event)',\r\n '(focusin)': 'focusTrigger()',\r\n '(focusout)': 'focusOut($event)',\r\n '(keydown.escape)': 'escape($event)',\r\n '(keydown.arrowdown)': 'focusCard($event)',\r\n '(click)': 'show()',\r\n 'aria-haspopup': 'dialog',\r\n '[attr.aria-expanded]': 'open()',\r\n '[attr.aria-controls]': 'open()?id:null',\r\n },\r\n})\r\nexport class HyHoverCard {\r\n readonly content = input.required<TemplateRef<unknown>>({ alias: 'hyHoverCard' });\r\n readonly hoverCardLabel = input.required<string>();\r\n readonly placement = input<HyPlacement>('top');\r\n readonly open = signal(false);\r\n protected readonly id = injectId('hover-card');\r\n private readonly injector = inject(Injector);\r\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\r\n private readonly container = inject(ViewContainerRef);\r\n private readonly fidelity = inject(HyFidelity);\r\n private readonly document = inject(DOCUMENT);\r\n private readonly intent = new HyHoverIntent(this.document);\r\n private ref: OverlayRef | undefined;\r\n private timer: ReturnType<typeof setTimeout> | undefined;\r\n private disposed = false;\r\n private suppressFocus = false;\r\n protected focusTrigger(): void {\r\n if (!this.suppressFocus) this.show();\r\n }\r\n constructor() {\r\n inject(DestroyRef).onDestroy(() => {\r\n this.disposed = true;\r\n clearTimeout(this.timer);\r\n this.intent.cancel();\r\n this.ref?.dispose();\r\n });\r\n }\r\n protected enter(event: PointerEvent): void {\r\n this.intent.cancel();\r\n if (event.pointerType === 'touch') return;\r\n clearTimeout(this.timer);\r\n this.timer = setTimeout(() => this.show(), 250);\r\n }\r\n protected leave(event?: PointerEvent): void {\r\n clearTimeout(this.timer);\r\n this.intent.leave(event, this.ref?.overlayElement, () => {\r\n if (\r\n this.ref?.overlayElement.contains(this.document.activeElement) ||\r\n this.host.nativeElement.contains(this.document.activeElement)\r\n )\r\n return;\r\n this.hide();\r\n });\r\n }\r\n protected focusOut(event: FocusEvent): void {\r\n if (event.relatedTarget && this.ref?.overlayElement.contains(event.relatedTarget as Node))\r\n return;\r\n this.leave();\r\n }\r\n protected escape(event: Event): void {\r\n if (this.open()) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this.hide();\r\n this.suppressFocus = true;\r\n this.host.nativeElement.focus();\r\n this.suppressFocus = false;\r\n }\r\n }\r\n protected focusCard(event: Event): void {\r\n event.preventDefault();\r\n this.show();\r\n const pane = this.ref?.overlayElement;\r\n if (!pane) return;\r\n const focusable = pane.querySelector<HTMLElement>(\r\n 'a[href],button:not([disabled]),input:not([disabled]),[tabindex=\"0\"]',\r\n );\r\n pane.tabIndex = -1;\r\n (focusable ?? pane).focus();\r\n }\r\n show(): void {\r\n clearTimeout(this.timer);\r\n if (this.disposed || this.open()) return;\r\n if (!this.ref) {\r\n const position = createFlexibleConnectedPositionStrategy(this.injector, this.host)\r\n .withPositions(hyConnectedPositions(this.placement(), 8))\r\n .withViewportMargin(12)\r\n .withPush(true);\r\n this.ref = createOverlayRef(this.injector, {\r\n positionStrategy: position,\r\n scrollStrategy: createRepositionScrollStrategy(this.injector),\r\n panelClass: 'hy-hover-card-pane',\r\n });\r\n const pane = this.ref.overlayElement;\r\n pane.classList.add('hy-glass');\r\n pane.style.cssText =\r\n 'max-inline-size:min(22rem,calc(100vw - 2rem));max-block-size:70dvh;overflow:auto;padding:1.25rem;border-radius:var(--hy-radius-m);border:1px solid var(--hy-line-strong);color:var(--hy-ink)';\r\n pane.id = this.id;\r\n pane.setAttribute('role', 'dialog');\r\n pane.addEventListener('pointerenter', () => {\r\n clearTimeout(this.timer);\r\n this.intent.cancel();\r\n });\r\n pane.addEventListener('pointerleave', () => this.leave());\r\n pane.addEventListener('focusout', (event) => {\r\n const next = event.relatedTarget as Node | null;\r\n if (!next || (!pane.contains(next) && !this.host.nativeElement.contains(next)))\r\n this.leave();\r\n });\r\n this.ref.keydownEvents().subscribe((event) => {\r\n if (event.key === 'Escape') this.escape(event);\r\n });\r\n this.ref.outsidePointerEvents().subscribe((event) => {\r\n if (!this.host.nativeElement.contains(event.target as Node)) this.hide();\r\n });\r\n }\r\n const pane = this.ref.overlayElement;\r\n pane.setAttribute('aria-label', this.hoverCardLabel());\r\n pane.dataset['material'] = this.fidelity.tier() === 'low' ? 'solid' : 'frosted';\r\n pane.style.visibility = 'hidden';\r\n const strategy = this.ref.getConfig().positionStrategy as ReturnType<\r\n typeof createFlexibleConnectedPositionStrategy\r\n >;\r\n strategy.withPositions(hyConnectedPositions(this.placement(), 8));\r\n strategy.positionChanges.pipe(take(1)).subscribe(() => pane.style.removeProperty('visibility'));\r\n this.open.set(true);\r\n this.ref.attach(new TemplatePortal(this.content(), this.container));\r\n }\r\n hide(): void {\r\n clearTimeout(this.timer);\r\n this.intent.cancel();\r\n this.open.set(false);\r\n this.ref?.detach();\r\n }\r\n}\r\n"],"mappings":";;;;;;;;AAsCA,IAAa,cAAb,MAAa,YAAW;CACb,UAAU,MAAM,SAAQ;EAAA,GAAA,YAAA,EAAA,WAAA,UAAA,+BAAA,CAAA;EAAyB,OAAO;CAAa,CAAA;CACrE,iBAAiB,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,iBAAA,CAAA,+BAAA,CAAA,CAAA;CACzC,YAAY,MAAmB,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA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AA,qBAAA;IAAA,SAAA;GAAA;GAAA,YAAA;IAAA,sBAAA;IAAA,sBAAA;GAAA;EAAA;EAAA,UAAA,CAAA,aAAA;EAAA,UAAA;CAAA,CAAA;;AAAX,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAW,YAAA,CAAA;EAhBvB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,UAAU;GACV,MAAM;IACJ,kBAAkB;IAClB,kBAAkB;IAClB,aAAa;IACb,cAAc;IACd,oBAAoB;IACpB,uBAAuB;IACvB,WAAW;IACX,iBAAiB;IACjB,wBAAwB;IACxB,wBAAwB;GACzB;EACF,CAAA"}
@@ -0,0 +1,385 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, Directive, ElementRef, Injectable, InjectionToken, Renderer2, computed, effect, inject, input, isDevMode } from "@angular/core";
3
+ const HY_BUILTIN_ICONS = {
4
+ home: { node: [["path", { d: "m3 10 9-7 9 7v10a1 1 0 0 1-1 1h-5v-7H9v7H4a1 1 0 0 1-1-1Z" }]] },
5
+ grid: { node: [
6
+ ["rect", {
7
+ x: 3,
8
+ y: 3,
9
+ width: 7,
10
+ height: 7,
11
+ rx: 1
12
+ }],
13
+ ["rect", {
14
+ x: 14,
15
+ y: 3,
16
+ width: 7,
17
+ height: 7,
18
+ rx: 1
19
+ }],
20
+ ["rect", {
21
+ x: 3,
22
+ y: 14,
23
+ width: 7,
24
+ height: 7,
25
+ rx: 1
26
+ }],
27
+ ["rect", {
28
+ x: 14,
29
+ y: 14,
30
+ width: 7,
31
+ height: 7,
32
+ rx: 1
33
+ }]
34
+ ] },
35
+ user: { node: [["circle", {
36
+ cx: 12,
37
+ cy: 8,
38
+ r: 4
39
+ }], ["path", { d: "M4 21v-2a7 7 0 0 1 7-7h2a7 7 0 0 1 7 7v2" }]] },
40
+ search: { node: [["circle", {
41
+ cx: 11,
42
+ cy: 11,
43
+ r: 8
44
+ }], ["path", { d: "m21 21-4.35-4.35" }]] },
45
+ settings: { node: [["path", { d: "M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z" }], ["path", { d: "M9 3h6l1 3 3 1 2 5-2 5-3 1-1 3H9l-1-3-3-1-2-5 2-5 3-1Z" }]] },
46
+ x: { node: [["path", { d: "M18 6 6 18" }], ["path", { d: "m6 6 12 12" }]] },
47
+ check: { node: [["path", { d: "M20 6 9 17l-5-5" }]] },
48
+ minus: { node: [["path", { d: "M5 12h14" }]] },
49
+ "chevron-down": { node: [["path", { d: "m6 9 6 6 6-6" }]] },
50
+ "chevron-end": {
51
+ node: [["path", { d: "m9 18 6-6-6-6" }]],
52
+ mirrorRtl: true
53
+ },
54
+ menu: { node: [
55
+ ["path", { d: "M4 5h16" }],
56
+ ["path", { d: "M4 12h16" }],
57
+ ["path", { d: "M4 19h16" }]
58
+ ] },
59
+ info: { node: [
60
+ ["circle", {
61
+ cx: 12,
62
+ cy: 12,
63
+ r: 10
64
+ }],
65
+ ["path", { d: "M12 16v-4" }],
66
+ ["path", { d: "M12 8h.01" }]
67
+ ] },
68
+ success: { node: [["circle", {
69
+ cx: 12,
70
+ cy: 12,
71
+ r: 10
72
+ }], ["path", { d: "m16 9-5.5 5.5L8 12" }]] },
73
+ warning: { node: [
74
+ ["path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }],
75
+ ["path", { d: "M12 9v4" }],
76
+ ["path", { d: "M12 17h.01" }]
77
+ ] },
78
+ danger: { node: [
79
+ ["circle", {
80
+ cx: 12,
81
+ cy: 12,
82
+ r: 10
83
+ }],
84
+ ["path", { d: "M12 8v4" }],
85
+ ["path", { d: "M12 16h.01" }]
86
+ ] },
87
+ spinner: { node: [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }]] }
88
+ };
89
+ const HY_ICONS = new InjectionToken("HY_ICONS");
90
+ function provideHyaloIcons(icons) {
91
+ return {
92
+ provide: HY_ICONS,
93
+ multi: true,
94
+ useValue: icons
95
+ };
96
+ }
97
+ function isDef(value) {
98
+ return !Array.isArray(value);
99
+ }
100
+ var HyIconRegistry = class HyIconRegistry {
101
+ icons = new Map(Object.entries(HY_BUILTIN_ICONS));
102
+ sets = inject(HY_ICONS, { optional: true }) ?? [];
103
+ constructor() {
104
+ for (const set of this.sets) for (const [name, icon] of Object.entries(set)) this.register(name, icon);
105
+ }
106
+ register(name, icon) {
107
+ this.icons.set(name, isDef(icon) ? icon : { node: icon });
108
+ }
109
+ get(name) {
110
+ return this.icons.get(name);
111
+ }
112
+ lookup(name, sets) {
113
+ if (sets && sets !== this.sets) for (const set of [...sets].reverse()) {
114
+ const icon = Object.hasOwn(set, name) ? set[name] : void 0;
115
+ if (icon) return isDef(icon) ? icon : { node: icon };
116
+ }
117
+ return this.get(name);
118
+ }
119
+ static ɵfac = i0.ɵɵngDeclareFactory({
120
+ minVersion: "12.0.0",
121
+ version: "22.2.3",
122
+ ngImport: i0,
123
+ type: HyIconRegistry,
124
+ deps: [],
125
+ target: i0.ɵɵFactoryTarget.Injectable
126
+ });
127
+ static ɵprov = i0.ɵɵngDeclareInjectable({
128
+ minVersion: "12.0.0",
129
+ version: "22.2.3",
130
+ ngImport: i0,
131
+ type: HyIconRegistry,
132
+ providedIn: "root"
133
+ });
134
+ };
135
+ i0.ɵɵngDeclareClassMetadata({
136
+ minVersion: "12.0.0",
137
+ version: "22.2.3",
138
+ ngImport: i0,
139
+ type: HyIconRegistry,
140
+ decorators: [{
141
+ type: Injectable,
142
+ args: [{ providedIn: "root" }]
143
+ }],
144
+ ctorParameters: () => []
145
+ });
146
+ const SAFE_ATTRS = /* @__PURE__ */ new Set([
147
+ "d",
148
+ "cx",
149
+ "cy",
150
+ "r",
151
+ "rx",
152
+ "ry",
153
+ "x",
154
+ "y",
155
+ "x1",
156
+ "x2",
157
+ "y1",
158
+ "y2",
159
+ "width",
160
+ "height",
161
+ "points",
162
+ "fill",
163
+ "stroke",
164
+ "stroke-width",
165
+ "opacity",
166
+ "transform"
167
+ ]);
168
+ var HyIconAttrs = class HyIconAttrs {
169
+ el = inject(ElementRef).nativeElement;
170
+ renderer = inject(Renderer2);
171
+ hyIconAttrs = input.required(...ngDevMode ? [{ debugName: "hyIconAttrs" }] : /* istanbul ignore next */ []);
172
+ constructor() {
173
+ let applied = /* @__PURE__ */ new Set();
174
+ effect(() => {
175
+ const next = /* @__PURE__ */ new Set();
176
+ for (const [name, value] of Object.entries(this.hyIconAttrs())) {
177
+ if (!SAFE_ATTRS.has(name)) continue;
178
+ this.renderer.setAttribute(this.el, name, String(value));
179
+ next.add(name);
180
+ }
181
+ for (const name of applied) if (!next.has(name)) this.renderer.removeAttribute(this.el, name);
182
+ applied = next;
183
+ });
184
+ }
185
+ static ɵfac = i0.ɵɵngDeclareFactory({
186
+ minVersion: "12.0.0",
187
+ version: "22.2.3",
188
+ ngImport: i0,
189
+ type: HyIconAttrs,
190
+ deps: [],
191
+ target: i0.ɵɵFactoryTarget.Directive
192
+ });
193
+ static ɵdir = i0.ɵɵngDeclareDirective({
194
+ minVersion: "17.1.0",
195
+ version: "22.2.3",
196
+ type: HyIconAttrs,
197
+ isStandalone: true,
198
+ selector: "[hyIconAttrs]",
199
+ inputs: { hyIconAttrs: {
200
+ classPropertyName: "hyIconAttrs",
201
+ publicName: "hyIconAttrs",
202
+ isSignal: true,
203
+ isRequired: true,
204
+ transformFunction: null
205
+ } },
206
+ ngImport: i0
207
+ });
208
+ };
209
+ i0.ɵɵngDeclareClassMetadata({
210
+ minVersion: "12.0.0",
211
+ version: "22.2.3",
212
+ ngImport: i0,
213
+ type: HyIconAttrs,
214
+ decorators: [{
215
+ type: Directive,
216
+ args: [{ selector: "[hyIconAttrs]" }]
217
+ }],
218
+ ctorParameters: () => [],
219
+ propDecorators: { hyIconAttrs: [{
220
+ type: i0.Input,
221
+ args: [{
222
+ isSignal: true,
223
+ alias: "hyIconAttrs",
224
+ required: true
225
+ }]
226
+ }] }
227
+ });
228
+ var HyIcon = class HyIcon {
229
+ registry = inject(HyIconRegistry);
230
+ sets = inject(HY_ICONS, { optional: true });
231
+ name = input(...ngDevMode ? [void 0, { debugName: "name" }] : /* istanbul ignore next */ []);
232
+ icon = input(...ngDevMode ? [void 0, { debugName: "icon" }] : /* istanbul ignore next */ []);
233
+ label = input(...ngDevMode ? [void 0, { debugName: "label" }] : /* istanbul ignore next */ []);
234
+ size = input(...ngDevMode ? [void 0, { debugName: "size" }] : /* istanbul ignore next */ []);
235
+ strokeWidth = input(1.75, ...ngDevMode ? [{ debugName: "strokeWidth" }] : /* istanbul ignore next */ []);
236
+ def = computed(() => {
237
+ const icon = this.icon();
238
+ if (icon) return Array.isArray(icon) ? { node: icon } : icon;
239
+ const name = this.name();
240
+ const found = name ? this.registry.lookup(name, this.sets) : void 0;
241
+ if (name && !found && isDevMode()) console.warn(`[hyalo] Unknown icon "${name}". Register it with provideHyaloIcons().`);
242
+ return found;
243
+ }, ...ngDevMode ? [{ debugName: "def" }] : /* istanbul ignore next */ []);
244
+ static ɵfac = i0.ɵɵngDeclareFactory({
245
+ minVersion: "12.0.0",
246
+ version: "22.2.3",
247
+ ngImport: i0,
248
+ type: HyIcon,
249
+ deps: [],
250
+ target: i0.ɵɵFactoryTarget.Component
251
+ });
252
+ static ɵcmp = i0.ɵɵngDeclareComponent({
253
+ minVersion: "17.0.0",
254
+ version: "22.2.3",
255
+ type: HyIcon,
256
+ isStandalone: true,
257
+ selector: "hy-icon",
258
+ inputs: {
259
+ name: {
260
+ classPropertyName: "name",
261
+ publicName: "name",
262
+ isSignal: true,
263
+ isRequired: false,
264
+ transformFunction: null
265
+ },
266
+ icon: {
267
+ classPropertyName: "icon",
268
+ publicName: "icon",
269
+ isSignal: true,
270
+ isRequired: false,
271
+ transformFunction: null
272
+ },
273
+ label: {
274
+ classPropertyName: "label",
275
+ publicName: "label",
276
+ isSignal: true,
277
+ isRequired: false,
278
+ transformFunction: null
279
+ },
280
+ size: {
281
+ classPropertyName: "size",
282
+ publicName: "size",
283
+ isSignal: true,
284
+ isRequired: false,
285
+ transformFunction: null
286
+ },
287
+ strokeWidth: {
288
+ classPropertyName: "strokeWidth",
289
+ publicName: "strokeWidth",
290
+ isSignal: true,
291
+ isRequired: false,
292
+ transformFunction: null
293
+ }
294
+ },
295
+ host: {
296
+ properties: {
297
+ "attr.role": "label() ? \"img\" : null",
298
+ "attr.aria-label": "label() || null",
299
+ "attr.aria-hidden": "label() ? null : \"true\"",
300
+ "attr.data-mirror-rtl": "def()?.mirrorRtl || null",
301
+ "style.--hy-icon-size": "size()"
302
+ },
303
+ classAttribute: "hy-icon"
304
+ },
305
+ ngImport: i0,
306
+ template: "<svg\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n [attr.stroke-width]=\"strokeWidth()\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n focusable=\"false\"\r\n>\r\n @for (child of def()?.node; track $index) {\r\n @switch (child[0]) {\r\n @case ('path') {\r\n <svg:path [hyIconAttrs]=\"child[1]\" />\r\n }\r\n @case ('circle') {\r\n <svg:circle [hyIconAttrs]=\"child[1]\" />\r\n }\r\n @case ('line') {\r\n <svg:line [hyIconAttrs]=\"child[1]\" />\r\n }\r\n @case ('rect') {\r\n <svg:rect [hyIconAttrs]=\"child[1]\" />\r\n }\r\n @case ('polyline') {\r\n <svg:polyline [hyIconAttrs]=\"child[1]\" />\r\n }\r\n @case ('polygon') {\r\n <svg:polygon [hyIconAttrs]=\"child[1]\" />\r\n }\r\n @case ('ellipse') {\r\n <svg:ellipse [hyIconAttrs]=\"child[1]\" />\r\n }\r\n }\r\n }\r\n</svg>\r\n",
307
+ styles: [":host{display:inline-flex;flex:none;inline-size:var(--hy-icon-size, 1.25em);block-size:var(--hy-icon-size, 1.25em);vertical-align:middle}svg{inline-size:100%;block-size:100%}:host-context([dir=\"rtl\"])[data-mirror-rtl] svg{transform:scaleX(-1)}\n"],
308
+ dependencies: [{
309
+ kind: "directive",
310
+ type: HyIconAttrs,
311
+ selector: "[hyIconAttrs]",
312
+ inputs: ["hyIconAttrs"]
313
+ }],
314
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
315
+ });
316
+ };
317
+ i0.ɵɵngDeclareClassMetadata({
318
+ minVersion: "12.0.0",
319
+ version: "22.2.3",
320
+ ngImport: i0,
321
+ type: HyIcon,
322
+ decorators: [{
323
+ type: Component,
324
+ args: [{
325
+ selector: "hy-icon",
326
+ imports: [HyIconAttrs],
327
+ changeDetection: ChangeDetectionStrategy.OnPush,
328
+ host: {
329
+ class: "hy-icon",
330
+ "[attr.role]": "label() ? \"img\" : null",
331
+ "[attr.aria-label]": "label() || null",
332
+ "[attr.aria-hidden]": "label() ? null : \"true\"",
333
+ "[attr.data-mirror-rtl]": "def()?.mirrorRtl || null",
334
+ "[style.--hy-icon-size]": "size()"
335
+ },
336
+ template: "<svg\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n [attr.stroke-width]=\"strokeWidth()\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n focusable=\"false\"\r\n>\r\n @for (child of def()?.node; track $index) {\r\n @switch (child[0]) {\r\n @case ('path') {\r\n <svg:path [hyIconAttrs]=\"child[1]\" />\r\n }\r\n @case ('circle') {\r\n <svg:circle [hyIconAttrs]=\"child[1]\" />\r\n }\r\n @case ('line') {\r\n <svg:line [hyIconAttrs]=\"child[1]\" />\r\n }\r\n @case ('rect') {\r\n <svg:rect [hyIconAttrs]=\"child[1]\" />\r\n }\r\n @case ('polyline') {\r\n <svg:polyline [hyIconAttrs]=\"child[1]\" />\r\n }\r\n @case ('polygon') {\r\n <svg:polygon [hyIconAttrs]=\"child[1]\" />\r\n }\r\n @case ('ellipse') {\r\n <svg:ellipse [hyIconAttrs]=\"child[1]\" />\r\n }\r\n }\r\n }\r\n</svg>\r\n",
337
+ styles: [":host{display:inline-flex;flex:none;inline-size:var(--hy-icon-size, 1.25em);block-size:var(--hy-icon-size, 1.25em);vertical-align:middle}svg{inline-size:100%;block-size:100%}:host-context([dir=\"rtl\"])[data-mirror-rtl] svg{transform:scaleX(-1)}\n"]
338
+ }]
339
+ }],
340
+ propDecorators: {
341
+ name: [{
342
+ type: i0.Input,
343
+ args: [{
344
+ isSignal: true,
345
+ alias: "name",
346
+ required: false
347
+ }]
348
+ }],
349
+ icon: [{
350
+ type: i0.Input,
351
+ args: [{
352
+ isSignal: true,
353
+ alias: "icon",
354
+ required: false
355
+ }]
356
+ }],
357
+ label: [{
358
+ type: i0.Input,
359
+ args: [{
360
+ isSignal: true,
361
+ alias: "label",
362
+ required: false
363
+ }]
364
+ }],
365
+ size: [{
366
+ type: i0.Input,
367
+ args: [{
368
+ isSignal: true,
369
+ alias: "size",
370
+ required: false
371
+ }]
372
+ }],
373
+ strokeWidth: [{
374
+ type: i0.Input,
375
+ args: [{
376
+ isSignal: true,
377
+ alias: "strokeWidth",
378
+ required: false
379
+ }]
380
+ }]
381
+ }
382
+ });
383
+ export { HY_BUILTIN_ICONS, HY_ICONS, HyIcon, HyIconAttrs, HyIconRegistry, provideHyaloIcons };
384
+
385
+ //# sourceMappingURL=hyalo-angular-icon.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hyalo-angular-icon.mjs","names":[],"sources":["../../../projects/hyalo/icon/icons.ts","../../../projects/hyalo/icon/registry.ts","../../../projects/hyalo/icon/icon.ts","../../../projects/hyalo/icon/icon.html"],"sourcesContent":["/**\r\n * Icon data in the same shape Lucide uses (`IconNode`), so any Lucide icon\r\n * can be registered as is:\r\n *\r\n * ```ts\r\n * import { ArrowRight } from 'lucide';\r\n * provideHyaloIcons({ 'arrow-right': ArrowRight })\r\n * ```\r\n *\r\n * Icons are data, not SVG strings, so nothing is ever parsed as HTML.\r\n */\r\nexport type HyIconNode = readonly (readonly [string, Readonly<Record<string, string | number>>])[];\r\n\r\n/** An icon plus how it behaves in right-to-left layouts. */\r\nexport interface HyIconDef {\r\n readonly node: HyIconNode;\r\n /** Mirror the icon in RTL. Set it for icons that point somewhere, like arrows. */\r\n readonly mirrorRtl?: boolean;\r\n}\r\n\r\n/*\r\n * The few icons the kit uses itself. Paths are from Lucide (ISC license,\r\n * Copyright (c) Lucide Icons and Contributors), https://lucide.dev.\r\n */\r\nexport const HY_BUILTIN_ICONS: Readonly<Record<string, HyIconDef>> = {\r\n home: { node: [['path', { d: 'm3 10 9-7 9 7v10a1 1 0 0 1-1 1h-5v-7H9v7H4a1 1 0 0 1-1-1Z' }]] },\r\n grid: {\r\n node: [\r\n ['rect', { x: 3, y: 3, width: 7, height: 7, rx: 1 }],\r\n ['rect', { x: 14, y: 3, width: 7, height: 7, rx: 1 }],\r\n ['rect', { x: 3, y: 14, width: 7, height: 7, rx: 1 }],\r\n ['rect', { x: 14, y: 14, width: 7, height: 7, rx: 1 }],\r\n ],\r\n },\r\n user: {\r\n node: [\r\n ['circle', { cx: 12, cy: 8, r: 4 }],\r\n ['path', { d: 'M4 21v-2a7 7 0 0 1 7-7h2a7 7 0 0 1 7 7v2' }],\r\n ],\r\n },\r\n search: {\r\n node: [\r\n ['circle', { cx: 11, cy: 11, r: 8 }],\r\n ['path', { d: 'm21 21-4.35-4.35' }],\r\n ],\r\n },\r\n settings: {\r\n node: [\r\n ['path', { d: 'M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z' }],\r\n ['path', { d: 'M9 3h6l1 3 3 1 2 5-2 5-3 1-1 3H9l-1-3-3-1-2-5 2-5 3-1Z' }],\r\n ],\r\n },\r\n x: {\r\n node: [\r\n ['path', { d: 'M18 6 6 18' }],\r\n ['path', { d: 'm6 6 12 12' }],\r\n ],\r\n },\r\n check: { node: [['path', { d: 'M20 6 9 17l-5-5' }]] },\r\n minus: { node: [['path', { d: 'M5 12h14' }]] },\r\n 'chevron-down': { node: [['path', { d: 'm6 9 6 6 6-6' }]] },\r\n 'chevron-end': { node: [['path', { d: 'm9 18 6-6-6-6' }]], mirrorRtl: true },\r\n menu: {\r\n node: [\r\n ['path', { d: 'M4 5h16' }],\r\n ['path', { d: 'M4 12h16' }],\r\n ['path', { d: 'M4 19h16' }],\r\n ],\r\n },\r\n info: {\r\n node: [\r\n ['circle', { cx: 12, cy: 12, r: 10 }],\r\n ['path', { d: 'M12 16v-4' }],\r\n ['path', { d: 'M12 8h.01' }],\r\n ],\r\n },\r\n success: {\r\n node: [\r\n ['circle', { cx: 12, cy: 12, r: 10 }],\r\n ['path', { d: 'm16 9-5.5 5.5L8 12' }],\r\n ],\r\n },\r\n warning: {\r\n node: [\r\n ['path', { d: 'm21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3' }],\r\n ['path', { d: 'M12 9v4' }],\r\n ['path', { d: 'M12 17h.01' }],\r\n ],\r\n },\r\n danger: {\r\n node: [\r\n ['circle', { cx: 12, cy: 12, r: 10 }],\r\n ['path', { d: 'M12 8v4' }],\r\n ['path', { d: 'M12 16h.01' }],\r\n ],\r\n },\r\n spinner: { node: [['path', { d: 'M21 12a9 9 0 1 1-6.219-8.56' }]] },\r\n};\r\n","import { Injectable, InjectionToken, Provider, inject } from '@angular/core';\r\nimport { HY_BUILTIN_ICONS, type HyIconDef, type HyIconNode } from './icons';\r\n\r\ntype HyIconSet = Readonly<Record<string, HyIconDef | HyIconNode>>;\r\n\r\n/** Icons added with {@link provideHyaloIcons}. Collected from every provider. */\r\nexport const HY_ICONS = new InjectionToken<readonly HyIconSet[]>('HY_ICONS');\r\n\r\n/**\r\n * Registers icons by name. Only the icons you import end up in the bundle.\r\n *\r\n * ```ts\r\n * provideHyaloIcons({ search: Search, 'arrow-end': { node: ArrowRight, mirrorRtl: true } })\r\n * ```\r\n *\r\n * Works in `app.config.ts` and in a route's or component's `providers`.\r\n * Icons from the nearest provider win over app-wide ones.\r\n */\r\nexport function provideHyaloIcons(\r\n icons: Readonly<Record<string, HyIconDef | HyIconNode>>,\r\n): Provider {\r\n return { provide: HY_ICONS, multi: true, useValue: icons };\r\n}\r\n\r\nfunction isDef(value: HyIconDef | HyIconNode): value is HyIconDef {\r\n return !Array.isArray(value);\r\n}\r\n\r\n/** Looks up icons by name: built-ins first, then registered sets in order. */\r\n@Injectable({ providedIn: 'root' })\r\nexport class HyIconRegistry {\r\n private readonly icons = new Map<string, HyIconDef>(Object.entries(HY_BUILTIN_ICONS));\r\n private readonly sets = inject(HY_ICONS, { optional: true }) ?? [];\r\n\r\n constructor() {\r\n for (const set of this.sets) {\r\n for (const [name, icon] of Object.entries(set)) this.register(name, icon);\r\n }\r\n }\r\n\r\n /** Adds or replaces an icon at runtime. */\r\n register(name: string, icon: HyIconDef | HyIconNode): void {\r\n this.icons.set(name, isDef(icon) ? icon : { node: icon });\r\n }\r\n\r\n /** Returns the icon, or undefined when the name is unknown. */\r\n get(name: string): HyIconDef | undefined {\r\n return this.icons.get(name);\r\n }\r\n\r\n /**\r\n * @internal Looks in sets from a route or component injector first. This\r\n * registry lives in the root injector, so it never sees those itself.\r\n */\r\n lookup(name: string, sets: readonly HyIconSet[] | null): HyIconDef | undefined {\r\n if (sets && sets !== this.sets) {\r\n for (const set of [...sets].reverse()) {\r\n const icon = Object.hasOwn(set, name) ? set[name] : undefined;\r\n if (icon) return isDef(icon) ? icon : { node: icon };\r\n }\r\n }\r\n return this.get(name);\r\n }\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n Directive,\r\n ElementRef,\r\n Renderer2,\r\n computed,\r\n effect,\r\n inject,\r\n input,\r\n isDevMode,\r\n} from '@angular/core';\r\nimport type { HyIconDef, HyIconNode } from './icons';\r\nimport { HY_ICONS, HyIconRegistry } from './registry';\r\n\r\nconst SAFE_ATTRS = new Set([\r\n 'd',\r\n 'cx',\r\n 'cy',\r\n 'r',\r\n 'rx',\r\n 'ry',\r\n 'x',\r\n 'y',\r\n 'x1',\r\n 'x2',\r\n 'y1',\r\n 'y2',\r\n 'width',\r\n 'height',\r\n 'points',\r\n 'fill',\r\n 'stroke',\r\n 'stroke-width',\r\n 'opacity',\r\n 'transform',\r\n]);\r\n\r\n/** Copies whitelisted geometry attributes onto an SVG child element. */\r\n@Directive({ selector: '[hyIconAttrs]' })\r\nexport class HyIconAttrs {\r\n private readonly el = inject(ElementRef).nativeElement as SVGElement;\r\n private readonly renderer = inject(Renderer2);\r\n readonly hyIconAttrs = input.required<Readonly<Record<string, string | number>>>();\r\n\r\n constructor() {\r\n let applied = new Set<string>();\r\n effect(() => {\r\n const next = new Set<string>();\r\n for (const [name, value] of Object.entries(this.hyIconAttrs())) {\r\n if (!SAFE_ATTRS.has(name)) continue;\r\n this.renderer.setAttribute(this.el, name, String(value));\r\n next.add(name);\r\n }\r\n // A swapped icon may not use every attribute the previous one did.\r\n for (const name of applied) {\r\n if (!next.has(name)) this.renderer.removeAttribute(this.el, name);\r\n }\r\n applied = next;\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * An SVG icon from the registry, or passed in directly.\r\n *\r\n * ```html\r\n * <hy-icon name=\"check\" />\r\n * <hy-icon [icon]=\"ArrowRight\" label=\"Next\" />\r\n * ```\r\n *\r\n * Icons are decorative (`aria-hidden`) unless `label` is set, in which case\r\n * they get `role=\"img\"` and that label. The size follows the font size.\r\n */\r\n@Component({\r\n selector: 'hy-icon',\r\n imports: [HyIconAttrs],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'hy-icon',\r\n '[attr.role]': 'label() ? \"img\" : null',\r\n '[attr.aria-label]': 'label() || null',\r\n '[attr.aria-hidden]': 'label() ? null : \"true\"',\r\n '[attr.data-mirror-rtl]': 'def()?.mirrorRtl || null',\r\n '[style.--hy-icon-size]': 'size()',\r\n },\r\n templateUrl: './icon.html',\r\n styleUrl: './icon.css',\r\n})\r\nexport class HyIcon {\r\n private readonly registry = inject(HyIconRegistry);\r\n private readonly sets = inject(HY_ICONS, { optional: true });\r\n\r\n /** Registered icon name. */\r\n readonly name = input<string>();\r\n /** Icon data, used instead of `name`. */\r\n readonly icon = input<HyIconDef | HyIconNode>();\r\n /** Accessible name. Leave empty for decorative icons. */\r\n readonly label = input<string>();\r\n /** Any CSS length. Defaults to 1.25em. */\r\n readonly size = input<string>();\r\n /** Stroke width in viewBox units. */\r\n readonly strokeWidth = input(1.75);\r\n\r\n protected readonly def = computed<HyIconDef | undefined>(() => {\r\n const icon = this.icon();\r\n if (icon) return Array.isArray(icon) ? { node: icon as HyIconNode } : (icon as HyIconDef);\r\n const name = this.name();\r\n const found = name ? this.registry.lookup(name, this.sets) : undefined;\r\n if (name && !found && isDevMode()) {\r\n console.warn(`[hyalo] Unknown icon \"${name}\". Register it with provideHyaloIcons().`); // eslint-disable-line no-console\r\n }\r\n return found;\r\n });\r\n}\r\n","<svg\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n [attr.stroke-width]=\"strokeWidth()\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n focusable=\"false\"\r\n>\r\n @for (child of def()?.node; track $index) {\r\n @switch (child[0]) {\r\n @case ('path') {\r\n <svg:path [hyIconAttrs]=\"child[1]\" />\r\n }\r\n @case ('circle') {\r\n <svg:circle [hyIconAttrs]=\"child[1]\" />\r\n }\r\n @case ('line') {\r\n <svg:line [hyIconAttrs]=\"child[1]\" />\r\n }\r\n @case ('rect') {\r\n <svg:rect [hyIconAttrs]=\"child[1]\" />\r\n }\r\n @case ('polyline') {\r\n <svg:polyline [hyIconAttrs]=\"child[1]\" />\r\n }\r\n @case ('polygon') {\r\n <svg:polygon [hyIconAttrs]=\"child[1]\" />\r\n }\r\n @case ('ellipse') {\r\n <svg:ellipse [hyIconAttrs]=\"child[1]\" />\r\n }\r\n }\r\n }\r\n</svg>\r\n"],"mappings":";;AAwBA,MAAa,mBAAwD;CACnE,MAAM,EAAE,MAAM,CAAC,CAAC,QAAQ,EAAE,GAAG,4DAA2D,CAAE,CAAC,EAAC;CAC5F,MAA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