@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,709 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, DestroyRef, Directive, TemplateRef, afterNextRender, afterRenderEffect, booleanAttribute, computed, contentChild, contentChildren, inject, input, model, signal, viewChild } from "@angular/core";
3
+ import { NgTemplateOutlet } from "@angular/common";
4
+ import { ɵinjectIsBrowser } from "@hyalo/angular/core";
5
+ import { HyMotion } from "@hyalo/angular/motion";
6
+ import { HyButton } from "@hyalo/angular/button";
7
+ import { HyIcon } from "@hyalo/angular/icon";
8
+ var HyCarouselNavigation = class HyCarouselNavigation {
9
+ template = inject(TemplateRef);
10
+ static ɵfac = i0.ɵɵngDeclareFactory({
11
+ minVersion: "12.0.0",
12
+ version: "22.2.3",
13
+ ngImport: i0,
14
+ type: HyCarouselNavigation,
15
+ deps: [],
16
+ target: i0.ɵɵFactoryTarget.Directive
17
+ });
18
+ static ɵdir = i0.ɵɵngDeclareDirective({
19
+ minVersion: "14.0.0",
20
+ version: "22.2.3",
21
+ type: HyCarouselNavigation,
22
+ isStandalone: true,
23
+ selector: "ng-template[hyCarouselNavigation]",
24
+ ngImport: i0
25
+ });
26
+ };
27
+ i0.ɵɵngDeclareClassMetadata({
28
+ minVersion: "12.0.0",
29
+ version: "22.2.3",
30
+ ngImport: i0,
31
+ type: HyCarouselNavigation,
32
+ decorators: [{
33
+ type: Directive,
34
+ args: [{ selector: "ng-template[hyCarouselNavigation]" }]
35
+ }]
36
+ });
37
+ var HySlide = class HySlide {
38
+ carousel = inject(HyCarousel, { optional: true });
39
+ label = input.required(...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
40
+ active = computed(() => this.carousel?.slides()[this.carousel.current()] === this, ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
41
+ inactive = computed(() => this.carousel?.mode() === "fade" && !this.active(), ...ngDevMode ? [{ debugName: "inactive" }] : /* istanbul ignore next */ []);
42
+ static ɵfac = i0.ɵɵngDeclareFactory({
43
+ minVersion: "12.0.0",
44
+ version: "22.2.3",
45
+ ngImport: i0,
46
+ type: HySlide,
47
+ deps: [],
48
+ target: i0.ɵɵFactoryTarget.Component
49
+ });
50
+ static ɵcmp = i0.ɵɵngDeclareComponent({
51
+ minVersion: "17.1.0",
52
+ version: "22.2.3",
53
+ type: HySlide,
54
+ isStandalone: true,
55
+ selector: "hy-slide",
56
+ inputs: { label: {
57
+ classPropertyName: "label",
58
+ publicName: "label",
59
+ isSignal: true,
60
+ isRequired: true,
61
+ transformFunction: null
62
+ } },
63
+ host: {
64
+ attributes: {
65
+ "role": "group",
66
+ "aria-roledescription": "slide"
67
+ },
68
+ properties: {
69
+ "attr.aria-label": "label()",
70
+ "attr.data-mode": "carousel?.mode()",
71
+ "attr.data-active": "active()",
72
+ "attr.inert": "inactive() ? \"\" : null",
73
+ "attr.aria-hidden": "inactive() ? true : null"
74
+ }
75
+ },
76
+ ngImport: i0,
77
+ template: "<ng-content />",
78
+ isInline: true,
79
+ styles: [":host{display:block;flex:0 0 100%;min-inline-size:0;scroll-snap-align:start;scroll-snap-stop:always}:host([data-mode=\"fade\"]){grid-area:1 / 1;opacity:0;pointer-events:none;transition:opacity var(--hy-carousel-duration) var(--hy-ease-out)}:host([data-mode=\"fade\"][data-active=\"true\"]){opacity:1;pointer-events:auto}\n"],
80
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
81
+ });
82
+ };
83
+ i0.ɵɵngDeclareClassMetadata({
84
+ minVersion: "12.0.0",
85
+ version: "22.2.3",
86
+ ngImport: i0,
87
+ type: HySlide,
88
+ decorators: [{
89
+ type: Component,
90
+ args: [{
91
+ selector: "hy-slide",
92
+ changeDetection: ChangeDetectionStrategy.OnPush,
93
+ host: {
94
+ role: "group",
95
+ "aria-roledescription": "slide",
96
+ "[attr.aria-label]": "label()",
97
+ "[attr.data-mode]": "carousel?.mode()",
98
+ "[attr.data-active]": "active()",
99
+ "[attr.inert]": "inactive() ? \"\" : null",
100
+ "[attr.aria-hidden]": "inactive() ? true : null"
101
+ },
102
+ template: "<ng-content />",
103
+ styles: [":host{display:block;flex:0 0 100%;min-inline-size:0;scroll-snap-align:start;scroll-snap-stop:always}:host([data-mode=\"fade\"]){grid-area:1 / 1;opacity:0;pointer-events:none;transition:opacity var(--hy-carousel-duration) var(--hy-ease-out)}:host([data-mode=\"fade\"][data-active=\"true\"]){opacity:1;pointer-events:auto}\n"]
104
+ }]
105
+ }],
106
+ propDecorators: { label: [{
107
+ type: i0.Input,
108
+ args: [{
109
+ isSignal: true,
110
+ alias: "label",
111
+ required: true
112
+ }]
113
+ }] }
114
+ });
115
+ var HyCarousel = class HyCarousel {
116
+ motion = inject(HyMotion);
117
+ browser = ɵinjectIsBrowser();
118
+ destroyRef = inject(DestroyRef);
119
+ viewport = viewChild.required("viewport", ...ngDevMode ? [{ debugName: "viewport" }] : /* istanbul ignore next */ []);
120
+ label = input("Gallery", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
121
+ previousLabel = input("Previous slide", ...ngDevMode ? [{ debugName: "previousLabel" }] : /* istanbul ignore next */ []);
122
+ nextLabel = input("Next slide", ...ngDevMode ? [{ debugName: "nextLabel" }] : /* istanbul ignore next */ []);
123
+ index = model(0, ...ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []);
124
+ mode = input("slide", ...ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []);
125
+ pagination = input("dots", ...ngDevMode ? [{ debugName: "pagination" }] : /* istanbul ignore next */ []);
126
+ paginationLabel = input("Choose slide", ...ngDevMode ? [{ debugName: "paginationLabel" }] : /* istanbul ignore next */ []);
127
+ loop = input(false, {
128
+ ...ngDevMode ? { debugName: "loop" } : /* istanbul ignore next */ {},
129
+ transform: booleanAttribute
130
+ });
131
+ scrollbar = input(false, {
132
+ ...ngDevMode ? { debugName: "scrollbar" } : /* istanbul ignore next */ {},
133
+ transform: booleanAttribute
134
+ });
135
+ navigation = input("text", ...ngDevMode ? [{ debugName: "navigation" }] : /* istanbul ignore next */ []);
136
+ navPosition = input("below", ...ngDevMode ? [{ debugName: "navPosition" }] : /* istanbul ignore next */ []);
137
+ customNavigation = contentChild(HyCarouselNavigation, ...ngDevMode ? [{ debugName: "customNavigation" }] : /* istanbul ignore next */ []);
138
+ navigationContext = { $implicit: this };
139
+ slides = contentChildren(HySlide, ...ngDevMode ? [{ debugName: "slides" }] : /* istanbul ignore next */ []);
140
+ current = computed(() => Math.max(0, Math.min(this.slides().length - 1, Math.trunc(this.index()) || 0)), ...ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []);
141
+ drag = null;
142
+ suppressClick = false;
143
+ ready = signal(false, ...ngDevMode ? [{ debugName: "ready" }] : /* istanbul ignore next */ []);
144
+ syncedIndex = -1;
145
+ syncedMode = null;
146
+ animated = signal(false, ...ngDevMode ? [{ debugName: "animated" }] : /* istanbul ignore next */ []);
147
+ viewportWidth = 0;
148
+ scrollFrame = 0;
149
+ scrollTarget = null;
150
+ settleTimer;
151
+ constructor() {
152
+ afterRenderEffect(() => {
153
+ const current = this.current();
154
+ const mode = this.mode();
155
+ if (this.ready() && (current !== this.syncedIndex || mode !== this.syncedMode)) {
156
+ this.syncedIndex = current;
157
+ this.syncedMode = mode;
158
+ this.animated.set(false);
159
+ this.scrollToSlide(false);
160
+ }
161
+ });
162
+ afterNextRender(() => {
163
+ const viewport = this.viewport().nativeElement;
164
+ this.viewportWidth = viewport.clientWidth;
165
+ const resize = typeof ResizeObserver === "function" ? new ResizeObserver(([entry]) => {
166
+ this.viewportWidth = entry?.contentRect.width ?? viewport.clientWidth;
167
+ this.scrollToSlide(false);
168
+ }) : null;
169
+ resize?.observe(viewport);
170
+ const onClick = (event) => {
171
+ if (!this.suppressClick) return;
172
+ event.preventDefault();
173
+ event.stopImmediatePropagation();
174
+ this.suppressClick = false;
175
+ };
176
+ viewport.addEventListener("click", onClick, true);
177
+ this.ready.set(true);
178
+ this.goTo(this.current(), false);
179
+ this.destroyRef.onDestroy(() => {
180
+ viewport.removeEventListener("click", onClick, true);
181
+ viewport.ownerDocument.defaultView?.cancelAnimationFrame(this.scrollFrame);
182
+ resize?.disconnect();
183
+ clearTimeout(this.settleTimer);
184
+ });
185
+ });
186
+ }
187
+ goTo(index, smooth = true) {
188
+ const count = this.slides().length;
189
+ const requested = Number.isFinite(index) ? Math.trunc(index) : 0;
190
+ this.index.set(this.loop() && count ? (requested % count + count) % count : Math.max(0, Math.min(count - 1, requested)));
191
+ this.syncedIndex = this.current();
192
+ this.animated.set(smooth);
193
+ this.scrollToSlide(smooth);
194
+ }
195
+ scrollToSlide(smooth) {
196
+ if (!this.browser || this.mode() !== "slide") return;
197
+ const viewport = this.viewport().nativeElement;
198
+ const slide = viewport.children[this.current()];
199
+ if (!slide) return;
200
+ const delta = slide.getBoundingClientRect().x - viewport.getBoundingClientRect().x;
201
+ clearTimeout(this.settleTimer);
202
+ this.scrollTarget = smooth && this.motion.enabled() && Math.abs(delta) > 1 ? this.current() : null;
203
+ if (this.scrollTarget !== null) this.settleTimer = setTimeout(() => {
204
+ this.scrollToSlide(false);
205
+ }, 800);
206
+ viewport.scrollBy?.({
207
+ left: delta,
208
+ behavior: smooth && this.motion.enabled() ? "smooth" : "instant"
209
+ });
210
+ }
211
+ onScroll() {
212
+ if (this.drag || this.scrollTarget !== null || this.mode() !== "slide" || this.scrollFrame) return;
213
+ const viewport = this.viewport().nativeElement;
214
+ this.scrollFrame = viewport.ownerDocument.defaultView?.requestAnimationFrame(() => {
215
+ this.scrollFrame = 0;
216
+ if (this.drag || this.scrollTarget !== null || this.mode() !== "slide") return;
217
+ const width = this.viewportWidth || viewport.clientWidth;
218
+ if (!width) return;
219
+ const closest = Math.max(0, Math.min(this.slides().length - 1, Math.round(Math.abs(viewport.scrollLeft) / width)));
220
+ this.syncedIndex = closest;
221
+ this.index.set(closest);
222
+ }) ?? 0;
223
+ }
224
+ onScrollEnd() {
225
+ if (this.scrollTarget === null) return;
226
+ const viewport = this.viewport().nativeElement;
227
+ const slide = viewport.children[this.scrollTarget];
228
+ if (slide && Math.abs(slide.getBoundingClientRect().x - viewport.getBoundingClientRect().x) > 1) return;
229
+ this.scrollTarget = null;
230
+ clearTimeout(this.settleTimer);
231
+ }
232
+ onKey(event) {
233
+ if (event.target !== this.viewport().nativeElement) return;
234
+ const rtl = this.viewport().nativeElement.ownerDocument.defaultView?.getComputedStyle(this.viewport().nativeElement).direction === "rtl";
235
+ let next = this.current();
236
+ if (event.key === "ArrowRight") next += rtl ? -1 : 1;
237
+ else if (event.key === "ArrowLeft") next += rtl ? 1 : -1;
238
+ else if (event.key === "Home") next = 0;
239
+ else if (event.key === "End") next = this.slides().length - 1;
240
+ else return;
241
+ event.preventDefault();
242
+ this.goTo(next, false);
243
+ }
244
+ pointerDown(event) {
245
+ this.suppressClick = false;
246
+ this.scrollTarget = null;
247
+ clearTimeout(this.settleTimer);
248
+ if (event.pointerType !== "mouse" && this.mode() !== "fade" || event.button !== 0 || event.target.closest("button, a, input, textarea, select")) return;
249
+ this.viewport().nativeElement.style.scrollSnapType = "none";
250
+ this.drag = {
251
+ x: event.clientX,
252
+ scroll: this.viewport().nativeElement.scrollLeft,
253
+ time: event.timeStamp,
254
+ moved: false
255
+ };
256
+ this.viewport().nativeElement.setPointerCapture?.(event.pointerId);
257
+ }
258
+ pointerMove(event) {
259
+ if (!this.drag) return;
260
+ if (event.buttons === 0) {
261
+ this.pointerCancel();
262
+ return;
263
+ }
264
+ const distance = event.clientX - this.drag.x;
265
+ if (Math.abs(distance) < 6 && !this.drag.moved) return;
266
+ this.drag.moved = true;
267
+ const viewport = this.viewport().nativeElement;
268
+ viewport.setPointerCapture?.(event.pointerId);
269
+ if (this.mode() === "slide") viewport.scrollLeft = this.drag.scroll - distance;
270
+ event.preventDefault();
271
+ }
272
+ pointerUp(event) {
273
+ if (!this.drag) return;
274
+ const drag = this.drag;
275
+ this.drag = null;
276
+ const viewport = this.viewport().nativeElement;
277
+ if (viewport.hasPointerCapture?.(event.pointerId)) viewport.releasePointerCapture(event.pointerId);
278
+ viewport.style.removeProperty("scroll-snap-type");
279
+ if (!drag.moved) return;
280
+ this.suppressClick = true;
281
+ const rtl = viewport.ownerDocument.defaultView?.getComputedStyle(viewport).direction === "rtl";
282
+ const distance = (event.clientX - drag.x) * (rtl ? -1 : 1);
283
+ const projected = distance + distance / Math.max(1, event.timeStamp - drag.time) * 180;
284
+ const shift = Math.round(-projected / Math.max(1, viewport.clientWidth));
285
+ this.goTo(this.current() + shift);
286
+ }
287
+ pointerCancel() {
288
+ this.drag = null;
289
+ this.viewport().nativeElement.style.removeProperty("scroll-snap-type");
290
+ this.goTo(this.current(), false);
291
+ }
292
+ preventNativeDrag(event) {
293
+ if (this.drag) event.preventDefault();
294
+ }
295
+ static ɵfac = i0.ɵɵngDeclareFactory({
296
+ minVersion: "12.0.0",
297
+ version: "22.2.3",
298
+ ngImport: i0,
299
+ type: HyCarousel,
300
+ deps: [],
301
+ target: i0.ɵɵFactoryTarget.Component
302
+ });
303
+ static ɵcmp = i0.ɵɵngDeclareComponent({
304
+ minVersion: "17.0.0",
305
+ version: "22.2.3",
306
+ type: HyCarousel,
307
+ isStandalone: true,
308
+ selector: "hy-carousel",
309
+ inputs: {
310
+ label: {
311
+ classPropertyName: "label",
312
+ publicName: "label",
313
+ isSignal: true,
314
+ isRequired: false,
315
+ transformFunction: null
316
+ },
317
+ previousLabel: {
318
+ classPropertyName: "previousLabel",
319
+ publicName: "previousLabel",
320
+ isSignal: true,
321
+ isRequired: false,
322
+ transformFunction: null
323
+ },
324
+ nextLabel: {
325
+ classPropertyName: "nextLabel",
326
+ publicName: "nextLabel",
327
+ isSignal: true,
328
+ isRequired: false,
329
+ transformFunction: null
330
+ },
331
+ index: {
332
+ classPropertyName: "index",
333
+ publicName: "index",
334
+ isSignal: true,
335
+ isRequired: false,
336
+ transformFunction: null
337
+ },
338
+ mode: {
339
+ classPropertyName: "mode",
340
+ publicName: "mode",
341
+ isSignal: true,
342
+ isRequired: false,
343
+ transformFunction: null
344
+ },
345
+ pagination: {
346
+ classPropertyName: "pagination",
347
+ publicName: "pagination",
348
+ isSignal: true,
349
+ isRequired: false,
350
+ transformFunction: null
351
+ },
352
+ paginationLabel: {
353
+ classPropertyName: "paginationLabel",
354
+ publicName: "paginationLabel",
355
+ isSignal: true,
356
+ isRequired: false,
357
+ transformFunction: null
358
+ },
359
+ loop: {
360
+ classPropertyName: "loop",
361
+ publicName: "loop",
362
+ isSignal: true,
363
+ isRequired: false,
364
+ transformFunction: null
365
+ },
366
+ scrollbar: {
367
+ classPropertyName: "scrollbar",
368
+ publicName: "scrollbar",
369
+ isSignal: true,
370
+ isRequired: false,
371
+ transformFunction: null
372
+ },
373
+ navigation: {
374
+ classPropertyName: "navigation",
375
+ publicName: "navigation",
376
+ isSignal: true,
377
+ isRequired: false,
378
+ transformFunction: null
379
+ },
380
+ navPosition: {
381
+ classPropertyName: "navPosition",
382
+ publicName: "navPosition",
383
+ isSignal: true,
384
+ isRequired: false,
385
+ transformFunction: null
386
+ }
387
+ },
388
+ outputs: { index: "indexChange" },
389
+ host: {
390
+ attributes: {
391
+ "role": "region",
392
+ "aria-roledescription": "carousel"
393
+ },
394
+ properties: {
395
+ "attr.aria-label": "label()",
396
+ "attr.data-mode": "mode()",
397
+ "attr.data-scrollbar": "scrollbar()",
398
+ "attr.data-navigation-position": "navPosition()",
399
+ "style.--hy-carousel-duration": "animated() && motion.enabled() ? \"var(--hy-dur-quick)\" : \"0ms\""
400
+ }
401
+ },
402
+ queries: [{
403
+ propertyName: "customNavigation",
404
+ first: true,
405
+ predicate: HyCarouselNavigation,
406
+ descendants: true,
407
+ isSignal: true
408
+ }, {
409
+ propertyName: "slides",
410
+ predicate: HySlide,
411
+ isSignal: true
412
+ }],
413
+ viewQueries: [{
414
+ propertyName: "viewport",
415
+ first: true,
416
+ predicate: ["viewport"],
417
+ descendants: true,
418
+ isSignal: true
419
+ }],
420
+ ngImport: i0,
421
+ template: "<div class=\"frame\">\r\n <div\r\n #viewport\r\n class=\"viewport\"\r\n tabindex=\"0\"\r\n role=\"group\"\r\n [attr.aria-label]=\"label()\"\r\n (scroll)=\"onScroll()\"\r\n (scrollend)=\"onScrollEnd()\"\r\n (keydown)=\"onKey($event)\"\r\n (pointerdown)=\"pointerDown($event)\"\r\n (pointermove)=\"pointerMove($event)\"\r\n (pointerup)=\"pointerUp($event)\"\r\n (pointercancel)=\"pointerCancel()\"\r\n (dragstart)=\"preventNativeDrag($event)\"\r\n >\r\n <ng-content select=\"hy-slide\" />\r\n </div>\r\n <div\r\n class=\"controls\"\r\n [class.controls--custom]=\"!!customNavigation()\"\r\n [class.controls--no-buttons]=\"navigation() === 'none'\"\r\n >\r\n @if (navigation() !== 'none') {\r\n @if (customNavigation(); as custom) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"custom.template\"\r\n [ngTemplateOutletContext]=\"navigationContext\"\r\n />\r\n } @else {\r\n <button\r\n class=\"nav-prev\"\r\n hyButton\r\n type=\"button\"\r\n [variant]=\"navPosition() === 'below' ? 'glass' : 'solid'\"\r\n [iconOnly]=\"navigation() === 'icons'\"\r\n [attr.aria-label]=\"previousLabel()\"\r\n [disabled]=\"!slides().length || (!loop() && current() === 0)\"\r\n (click)=\"goTo(current() - 1)\"\r\n >\r\n @if (navigation() === 'icons') {\r\n <hy-icon class=\"previous-icon\" name=\"chevron-end\" />\r\n } @else {\r\n {{ previousLabel() }}\r\n }\r\n </button>\r\n }\r\n }\r\n @if (pagination() === 'dots') {\r\n <div class=\"dots\" role=\"group\" [attr.aria-label]=\"paginationLabel()\">\r\n @for (slide of slides(); track slide; let i = $index) {\r\n <button\r\n type=\"button\"\r\n [attr.aria-label]=\"slide.label()\"\r\n [attr.aria-current]=\"current() === i ? 'true' : null\"\r\n (click)=\"goTo(i)\"\r\n >\r\n <span></span>\r\n </button>\r\n }\r\n </div>\r\n }\r\n <span [class.sr-only]=\"pagination() !== 'counter'\" aria-live=\"polite\" aria-atomic=\"true\"\r\n >{{ slides().length ? current() + 1 : 0 }} / {{ slides().length }}</span\r\n >\r\n @if (navigation() !== 'none' && !customNavigation()) {\r\n <button\r\n class=\"nav-next\"\r\n hyButton\r\n type=\"button\"\r\n [variant]=\"navPosition() === 'below' ? 'glass' : 'solid'\"\r\n [iconOnly]=\"navigation() === 'icons'\"\r\n [attr.aria-label]=\"nextLabel()\"\r\n [disabled]=\"!slides().length || (!loop() && current() >= slides().length - 1)\"\r\n (click)=\"goTo(current() + 1)\"\r\n >\r\n @if (navigation() === 'icons') {\r\n <hy-icon name=\"chevron-end\" />\r\n } @else {\r\n {{ nextLabel() }}\r\n }\r\n </button>\r\n }\r\n </div>\r\n <ng-content select=\"ng-template[hyCarouselNavigation]\" />\r\n</div>\r\n",
422
+ styles: [":host{display:block;min-inline-size:0;container-type:inline-size}.frame{position:relative}.previous-icon{rotate:180deg}.controls--custom{flex-wrap:wrap}.controls--custom .dots{flex-basis:100%;order:2}.controls--no-buttons{justify-content:center}:host([data-navigation-position=\"inside-bottom\"]) .dots,:host([data-navigation-position=\"sides\"]) .dots{background:var(--hy-surface-1);border-radius:var(--hy-radius-pill);padding-inline:var(--hy-space-2)}:host([data-navigation-position=\"inside-bottom\"]) .controls{position:absolute;inset-inline:var(--hy-space-4);inset-block-end:var(--hy-space-4);margin:0}:host([data-navigation-position=\"sides\"]) .controls{position:absolute;inset:0;margin:0;pointer-events:none}:host([data-navigation-position=\"sides\"]) .controls>button{position:absolute;inset-block-start:50%;transform:translateY(-50%);pointer-events:auto}:host([data-navigation-position=\"sides\"]) .controls>.nav-prev{inset-inline-start:var(--hy-space-4)}:host([data-navigation-position=\"sides\"]) .controls>.nav-next{inset-inline-end:var(--hy-space-4)}:host([data-navigation-position=\"sides\"]) .dots,:host([data-navigation-position=\"sides\"]) .controls>span:not(.sr-only){position:absolute;inset-inline:0;inset-block-end:var(--hy-space-3);justify-content:center;text-align:center;pointer-events:auto}.viewport{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-inline:contain;scrollbar-width:none;border-radius:var(--hy-radius-l);touch-action:pan-x pan-y}.viewport::-webkit-scrollbar{display:none}:host([data-scrollbar=\"true\"]) .viewport{scrollbar-width:thin}:host([data-scrollbar=\"true\"]) .viewport::-webkit-scrollbar{display:initial}:host([data-mode=\"fade\"]) .viewport{display:grid;overflow:clip;scroll-snap-type:none;touch-action:pan-y}.dots{display:flex;flex-wrap:wrap;justify-content:center}.dots button{display:grid;place-items:center;inline-size:2rem;block-size:2rem;padding:0;border:0;background:transparent;border-radius:var(--hy-radius-pill);cursor:pointer}.dots span{inline-size:.4rem;block-size:.4rem;border-radius:var(--hy-radius-pill);background:var(--hy-ink-3);transition:transform var(--hy-carousel-duration) var(--hy-ease-out),background-color var(--hy-carousel-duration) ease}.dots button[aria-current] span{background:var(--hy-primary);transform:scaleX(2.5)}.dots button:focus-visible{outline:2px solid var(--hy-primary);outline-offset:-2px}.sr-only{position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.viewport:focus-visible{outline:2px solid var(--hy-primary);outline-offset:4px}.controls{display:flex;align-items:center;justify-content:space-between;gap:var(--hy-space-3);margin-block-start:var(--hy-space-3);color:var(--hy-ink-2)}@container (max-width:25rem){.controls{display:grid;grid-template-columns:1fr 1fr}.dots,.controls>span:not(.sr-only){grid-column:1 / -1;grid-row:2;justify-self:center}.controls>button:first-child{justify-self:start}.controls>button:last-child{justify-self:end}}\n"],
423
+ dependencies: [
424
+ {
425
+ kind: "component",
426
+ type: HyButton,
427
+ selector: "button[hyButton], a[hyButton]",
428
+ inputs: [
429
+ "variant",
430
+ "size",
431
+ "tone",
432
+ "iconOnly",
433
+ "loading",
434
+ "disabled"
435
+ ]
436
+ },
437
+ {
438
+ kind: "component",
439
+ type: HyIcon,
440
+ selector: "hy-icon",
441
+ inputs: [
442
+ "name",
443
+ "icon",
444
+ "label",
445
+ "size",
446
+ "strokeWidth"
447
+ ]
448
+ },
449
+ {
450
+ kind: "directive",
451
+ type: NgTemplateOutlet,
452
+ selector: "[ngTemplateOutlet]",
453
+ inputs: [
454
+ "ngTemplateOutletContext",
455
+ "ngTemplateOutlet",
456
+ "ngTemplateOutletInjector"
457
+ ]
458
+ }
459
+ ],
460
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
461
+ });
462
+ };
463
+ i0.ɵɵngDeclareClassMetadata({
464
+ minVersion: "12.0.0",
465
+ version: "22.2.3",
466
+ ngImport: i0,
467
+ type: HyCarousel,
468
+ decorators: [{
469
+ type: Component,
470
+ args: [{
471
+ selector: "hy-carousel",
472
+ imports: [
473
+ HyButton,
474
+ HyIcon,
475
+ NgTemplateOutlet
476
+ ],
477
+ changeDetection: ChangeDetectionStrategy.OnPush,
478
+ host: {
479
+ role: "region",
480
+ "aria-roledescription": "carousel",
481
+ "[attr.aria-label]": "label()",
482
+ "[attr.data-mode]": "mode()",
483
+ "[attr.data-scrollbar]": "scrollbar()",
484
+ "[attr.data-navigation-position]": "navPosition()",
485
+ "[style.--hy-carousel-duration]": "animated() && motion.enabled() ? \"var(--hy-dur-quick)\" : \"0ms\""
486
+ },
487
+ template: "<div class=\"frame\">\r\n <div\r\n #viewport\r\n class=\"viewport\"\r\n tabindex=\"0\"\r\n role=\"group\"\r\n [attr.aria-label]=\"label()\"\r\n (scroll)=\"onScroll()\"\r\n (scrollend)=\"onScrollEnd()\"\r\n (keydown)=\"onKey($event)\"\r\n (pointerdown)=\"pointerDown($event)\"\r\n (pointermove)=\"pointerMove($event)\"\r\n (pointerup)=\"pointerUp($event)\"\r\n (pointercancel)=\"pointerCancel()\"\r\n (dragstart)=\"preventNativeDrag($event)\"\r\n >\r\n <ng-content select=\"hy-slide\" />\r\n </div>\r\n <div\r\n class=\"controls\"\r\n [class.controls--custom]=\"!!customNavigation()\"\r\n [class.controls--no-buttons]=\"navigation() === 'none'\"\r\n >\r\n @if (navigation() !== 'none') {\r\n @if (customNavigation(); as custom) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"custom.template\"\r\n [ngTemplateOutletContext]=\"navigationContext\"\r\n />\r\n } @else {\r\n <button\r\n class=\"nav-prev\"\r\n hyButton\r\n type=\"button\"\r\n [variant]=\"navPosition() === 'below' ? 'glass' : 'solid'\"\r\n [iconOnly]=\"navigation() === 'icons'\"\r\n [attr.aria-label]=\"previousLabel()\"\r\n [disabled]=\"!slides().length || (!loop() && current() === 0)\"\r\n (click)=\"goTo(current() - 1)\"\r\n >\r\n @if (navigation() === 'icons') {\r\n <hy-icon class=\"previous-icon\" name=\"chevron-end\" />\r\n } @else {\r\n {{ previousLabel() }}\r\n }\r\n </button>\r\n }\r\n }\r\n @if (pagination() === 'dots') {\r\n <div class=\"dots\" role=\"group\" [attr.aria-label]=\"paginationLabel()\">\r\n @for (slide of slides(); track slide; let i = $index) {\r\n <button\r\n type=\"button\"\r\n [attr.aria-label]=\"slide.label()\"\r\n [attr.aria-current]=\"current() === i ? 'true' : null\"\r\n (click)=\"goTo(i)\"\r\n >\r\n <span></span>\r\n </button>\r\n }\r\n </div>\r\n }\r\n <span [class.sr-only]=\"pagination() !== 'counter'\" aria-live=\"polite\" aria-atomic=\"true\"\r\n >{{ slides().length ? current() + 1 : 0 }} / {{ slides().length }}</span\r\n >\r\n @if (navigation() !== 'none' && !customNavigation()) {\r\n <button\r\n class=\"nav-next\"\r\n hyButton\r\n type=\"button\"\r\n [variant]=\"navPosition() === 'below' ? 'glass' : 'solid'\"\r\n [iconOnly]=\"navigation() === 'icons'\"\r\n [attr.aria-label]=\"nextLabel()\"\r\n [disabled]=\"!slides().length || (!loop() && current() >= slides().length - 1)\"\r\n (click)=\"goTo(current() + 1)\"\r\n >\r\n @if (navigation() === 'icons') {\r\n <hy-icon name=\"chevron-end\" />\r\n } @else {\r\n {{ nextLabel() }}\r\n }\r\n </button>\r\n }\r\n </div>\r\n <ng-content select=\"ng-template[hyCarouselNavigation]\" />\r\n</div>\r\n",
488
+ styles: [":host{display:block;min-inline-size:0;container-type:inline-size}.frame{position:relative}.previous-icon{rotate:180deg}.controls--custom{flex-wrap:wrap}.controls--custom .dots{flex-basis:100%;order:2}.controls--no-buttons{justify-content:center}:host([data-navigation-position=\"inside-bottom\"]) .dots,:host([data-navigation-position=\"sides\"]) .dots{background:var(--hy-surface-1);border-radius:var(--hy-radius-pill);padding-inline:var(--hy-space-2)}:host([data-navigation-position=\"inside-bottom\"]) .controls{position:absolute;inset-inline:var(--hy-space-4);inset-block-end:var(--hy-space-4);margin:0}:host([data-navigation-position=\"sides\"]) .controls{position:absolute;inset:0;margin:0;pointer-events:none}:host([data-navigation-position=\"sides\"]) .controls>button{position:absolute;inset-block-start:50%;transform:translateY(-50%);pointer-events:auto}:host([data-navigation-position=\"sides\"]) .controls>.nav-prev{inset-inline-start:var(--hy-space-4)}:host([data-navigation-position=\"sides\"]) .controls>.nav-next{inset-inline-end:var(--hy-space-4)}:host([data-navigation-position=\"sides\"]) .dots,:host([data-navigation-position=\"sides\"]) .controls>span:not(.sr-only){position:absolute;inset-inline:0;inset-block-end:var(--hy-space-3);justify-content:center;text-align:center;pointer-events:auto}.viewport{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-inline:contain;scrollbar-width:none;border-radius:var(--hy-radius-l);touch-action:pan-x pan-y}.viewport::-webkit-scrollbar{display:none}:host([data-scrollbar=\"true\"]) .viewport{scrollbar-width:thin}:host([data-scrollbar=\"true\"]) .viewport::-webkit-scrollbar{display:initial}:host([data-mode=\"fade\"]) .viewport{display:grid;overflow:clip;scroll-snap-type:none;touch-action:pan-y}.dots{display:flex;flex-wrap:wrap;justify-content:center}.dots button{display:grid;place-items:center;inline-size:2rem;block-size:2rem;padding:0;border:0;background:transparent;border-radius:var(--hy-radius-pill);cursor:pointer}.dots span{inline-size:.4rem;block-size:.4rem;border-radius:var(--hy-radius-pill);background:var(--hy-ink-3);transition:transform var(--hy-carousel-duration) var(--hy-ease-out),background-color var(--hy-carousel-duration) ease}.dots button[aria-current] span{background:var(--hy-primary);transform:scaleX(2.5)}.dots button:focus-visible{outline:2px solid var(--hy-primary);outline-offset:-2px}.sr-only{position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.viewport:focus-visible{outline:2px solid var(--hy-primary);outline-offset:4px}.controls{display:flex;align-items:center;justify-content:space-between;gap:var(--hy-space-3);margin-block-start:var(--hy-space-3);color:var(--hy-ink-2)}@container (max-width:25rem){.controls{display:grid;grid-template-columns:1fr 1fr}.dots,.controls>span:not(.sr-only){grid-column:1 / -1;grid-row:2;justify-self:center}.controls>button:first-child{justify-self:start}.controls>button:last-child{justify-self:end}}\n"]
489
+ }]
490
+ }],
491
+ ctorParameters: () => [],
492
+ propDecorators: {
493
+ viewport: [{
494
+ type: i0.ViewChild,
495
+ args: ["viewport", { isSignal: true }]
496
+ }],
497
+ label: [{
498
+ type: i0.Input,
499
+ args: [{
500
+ isSignal: true,
501
+ alias: "label",
502
+ required: false
503
+ }]
504
+ }],
505
+ previousLabel: [{
506
+ type: i0.Input,
507
+ args: [{
508
+ isSignal: true,
509
+ alias: "previousLabel",
510
+ required: false
511
+ }]
512
+ }],
513
+ nextLabel: [{
514
+ type: i0.Input,
515
+ args: [{
516
+ isSignal: true,
517
+ alias: "nextLabel",
518
+ required: false
519
+ }]
520
+ }],
521
+ index: [{
522
+ type: i0.Input,
523
+ args: [{
524
+ isSignal: true,
525
+ alias: "index",
526
+ required: false
527
+ }]
528
+ }, {
529
+ type: i0.Output,
530
+ args: ["indexChange"]
531
+ }],
532
+ mode: [{
533
+ type: i0.Input,
534
+ args: [{
535
+ isSignal: true,
536
+ alias: "mode",
537
+ required: false
538
+ }]
539
+ }],
540
+ pagination: [{
541
+ type: i0.Input,
542
+ args: [{
543
+ isSignal: true,
544
+ alias: "pagination",
545
+ required: false
546
+ }]
547
+ }],
548
+ paginationLabel: [{
549
+ type: i0.Input,
550
+ args: [{
551
+ isSignal: true,
552
+ alias: "paginationLabel",
553
+ required: false
554
+ }]
555
+ }],
556
+ loop: [{
557
+ type: i0.Input,
558
+ args: [{
559
+ isSignal: true,
560
+ alias: "loop",
561
+ required: false
562
+ }]
563
+ }],
564
+ scrollbar: [{
565
+ type: i0.Input,
566
+ args: [{
567
+ isSignal: true,
568
+ alias: "scrollbar",
569
+ required: false
570
+ }]
571
+ }],
572
+ navigation: [{
573
+ type: i0.Input,
574
+ args: [{
575
+ isSignal: true,
576
+ alias: "navigation",
577
+ required: false
578
+ }]
579
+ }],
580
+ navPosition: [{
581
+ type: i0.Input,
582
+ args: [{
583
+ isSignal: true,
584
+ alias: "navPosition",
585
+ required: false
586
+ }]
587
+ }],
588
+ customNavigation: [{
589
+ type: i0.ContentChild,
590
+ args: [i0.forwardRef(() => HyCarouselNavigation), { isSignal: true }]
591
+ }],
592
+ slides: [{
593
+ type: i0.ContentChildren,
594
+ args: [i0.forwardRef(() => HySlide), { isSignal: true }]
595
+ }]
596
+ }
597
+ });
598
+ var HyCarouselPrevious = class HyCarouselPrevious {
599
+ carousel = inject(HyCarousel);
600
+ blocked = computed(() => !this.carousel.slides().length || !this.carousel.loop() && this.carousel.current() === 0, ...ngDevMode ? [{ debugName: "blocked" }] : /* istanbul ignore next */ []);
601
+ previous() {
602
+ if (!this.blocked()) this.carousel.goTo(this.carousel.current() - 1);
603
+ }
604
+ static ɵfac = i0.ɵɵngDeclareFactory({
605
+ minVersion: "12.0.0",
606
+ version: "22.2.3",
607
+ ngImport: i0,
608
+ type: HyCarouselPrevious,
609
+ deps: [],
610
+ target: i0.ɵɵFactoryTarget.Directive
611
+ });
612
+ static ɵdir = i0.ɵɵngDeclareDirective({
613
+ minVersion: "14.0.0",
614
+ version: "22.2.3",
615
+ type: HyCarouselPrevious,
616
+ isStandalone: true,
617
+ selector: "button[hyCarouselPrevious]",
618
+ host: {
619
+ attributes: { "type": "button" },
620
+ listeners: { "click": "previous()" },
621
+ properties: {
622
+ "disabled": "blocked()",
623
+ "attr.aria-label": "carousel.previousLabel()"
624
+ },
625
+ classAttribute: "nav-prev"
626
+ },
627
+ ngImport: i0
628
+ });
629
+ };
630
+ i0.ɵɵngDeclareClassMetadata({
631
+ minVersion: "12.0.0",
632
+ version: "22.2.3",
633
+ ngImport: i0,
634
+ type: HyCarouselPrevious,
635
+ decorators: [{
636
+ type: Directive,
637
+ args: [{
638
+ selector: "button[hyCarouselPrevious]",
639
+ host: {
640
+ class: "nav-prev",
641
+ type: "button",
642
+ "[disabled]": "blocked()",
643
+ "[attr.aria-label]": "carousel.previousLabel()",
644
+ "(click)": "previous()"
645
+ }
646
+ }]
647
+ }]
648
+ });
649
+ var HyCarouselNext = class HyCarouselNext {
650
+ carousel = inject(HyCarousel);
651
+ blocked = computed(() => !this.carousel.slides().length || !this.carousel.loop() && this.carousel.current() >= this.carousel.slides().length - 1, ...ngDevMode ? [{ debugName: "blocked" }] : /* istanbul ignore next */ []);
652
+ next() {
653
+ if (!this.blocked()) this.carousel.goTo(this.carousel.current() + 1);
654
+ }
655
+ static ɵfac = i0.ɵɵngDeclareFactory({
656
+ minVersion: "12.0.0",
657
+ version: "22.2.3",
658
+ ngImport: i0,
659
+ type: HyCarouselNext,
660
+ deps: [],
661
+ target: i0.ɵɵFactoryTarget.Directive
662
+ });
663
+ static ɵdir = i0.ɵɵngDeclareDirective({
664
+ minVersion: "14.0.0",
665
+ version: "22.2.3",
666
+ type: HyCarouselNext,
667
+ isStandalone: true,
668
+ selector: "button[hyCarouselNext]",
669
+ host: {
670
+ attributes: { "type": "button" },
671
+ listeners: { "click": "next()" },
672
+ properties: {
673
+ "disabled": "blocked()",
674
+ "attr.aria-label": "carousel.nextLabel()"
675
+ },
676
+ classAttribute: "nav-next"
677
+ },
678
+ ngImport: i0
679
+ });
680
+ };
681
+ i0.ɵɵngDeclareClassMetadata({
682
+ minVersion: "12.0.0",
683
+ version: "22.2.3",
684
+ ngImport: i0,
685
+ type: HyCarouselNext,
686
+ decorators: [{
687
+ type: Directive,
688
+ args: [{
689
+ selector: "button[hyCarouselNext]",
690
+ host: {
691
+ class: "nav-next",
692
+ type: "button",
693
+ "[disabled]": "blocked()",
694
+ "[attr.aria-label]": "carousel.nextLabel()",
695
+ "(click)": "next()"
696
+ }
697
+ }]
698
+ }]
699
+ });
700
+ const HY_CAROUSEL = [
701
+ HyCarousel,
702
+ HySlide,
703
+ HyCarouselNavigation,
704
+ HyCarouselPrevious,
705
+ HyCarouselNext
706
+ ];
707
+ export { HY_CAROUSEL, HyCarousel, HyCarouselNavigation, HyCarouselNext, HyCarouselPrevious, HySlide };
708
+
709
+ //# sourceMappingURL=hyalo-angular-carousel.mjs.map