@nanahoshi/mona-ui 0.18.6 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/README.md +71 -13
  2. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +11 -3
  3. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +17 -9
  4. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +16 -7
  5. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +122 -48
  6. package/fesm2022/nanahoshi-mona-ui-card.mjs +22 -14
  7. package/fesm2022/nanahoshi-mona-ui-chart.mjs +78 -18
  8. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +1 -1
  9. package/fesm2022/nanahoshi-mona-ui-chip.mjs +11 -3
  10. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +1 -2
  11. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +23 -5
  12. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +49 -28
  13. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +42 -26
  14. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +11 -3
  15. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +28 -16
  16. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +74 -51
  17. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +57 -25
  18. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +13 -5
  19. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +17 -6
  20. package/fesm2022/nanahoshi-mona-ui-editor.mjs +178 -59
  21. package/fesm2022/nanahoshi-mona-ui-filter.mjs +137 -54
  22. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-WEDbZ5vy.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-Bg7rckst.mjs} +2 -2
  23. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-ibH5osCg.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-BSSpaCLL.mjs} +2 -2
  24. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-D9AwQFDV.mjs +145 -0
  25. package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-hc-LeIb0.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-Byb9iTes.mjs} +21 -17
  26. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-DYajpOb9.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-CBmdtrXm.mjs} +5 -5
  27. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-Pm8Fbp6M.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-DPmJmCap.mjs} +90 -42
  28. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  29. package/fesm2022/nanahoshi-mona-ui-i18n.mjs +1168 -0
  30. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +12 -4
  31. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +48 -21
  32. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +33 -18
  33. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +10 -10
  34. package/fesm2022/nanahoshi-mona-ui-list.mjs +2 -0
  35. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +29 -16
  36. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +12 -3
  37. package/fesm2022/nanahoshi-mona-ui-notification.mjs +23 -18
  38. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +211 -106
  39. package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +14 -6
  40. package/fesm2022/nanahoshi-mona-ui-pager.mjs +46 -19
  41. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +57 -46
  42. package/fesm2022/nanahoshi-mona-ui-popup.mjs +35 -15
  43. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +38 -17
  44. package/fesm2022/nanahoshi-mona-ui-rating.mjs +25 -7
  45. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +431 -101
  46. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +1 -1
  47. package/fesm2022/nanahoshi-mona-ui-sheet.mjs +26 -8
  48. package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +222 -28
  49. package/fesm2022/nanahoshi-mona-ui-slider.mjs +91 -36
  50. package/fesm2022/nanahoshi-mona-ui-spinner.mjs +34 -15
  51. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +39 -23
  52. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +50 -25
  53. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +32 -14
  54. package/fesm2022/nanahoshi-mona-ui-switch.mjs +9 -9
  55. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +74 -56
  56. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +16 -8
  57. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +33 -19
  58. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +66 -27
  59. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +23 -15
  60. package/fesm2022/nanahoshi-mona-ui-window.mjs +71 -40
  61. package/i18n/package.json +4 -0
  62. package/package.json +5 -1
  63. package/types/nanahoshi-mona-ui-auto-complete.d.ts +6 -1
  64. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +9 -3
  65. package/types/nanahoshi-mona-ui-button-group.d.ts +9 -3
  66. package/types/nanahoshi-mona-ui-calendar.d.ts +13 -3
  67. package/types/nanahoshi-mona-ui-card.d.ts +8 -2
  68. package/types/nanahoshi-mona-ui-chart.d.ts +10 -1
  69. package/types/nanahoshi-mona-ui-chip.d.ts +7 -1
  70. package/types/nanahoshi-mona-ui-color-gradient.d.ts +6 -1
  71. package/types/nanahoshi-mona-ui-color-palette.d.ts +21 -10
  72. package/types/nanahoshi-mona-ui-color-picker.d.ts +30 -20
  73. package/types/nanahoshi-mona-ui-combo-box.d.ts +6 -1
  74. package/types/nanahoshi-mona-ui-date-picker.d.ts +7 -2
  75. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +33 -8
  76. package/types/nanahoshi-mona-ui-dialog.d.ts +16 -7
  77. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +6 -1
  78. package/types/nanahoshi-mona-ui-dropdowns.d.ts +4 -1
  79. package/types/nanahoshi-mona-ui-editor.d.ts +6 -1
  80. package/types/nanahoshi-mona-ui-filter.d.ts +16 -10
  81. package/types/nanahoshi-mona-ui-grid.d.ts +38 -1
  82. package/types/nanahoshi-mona-ui-i18n.d.ts +633 -0
  83. package/types/nanahoshi-mona-ui-internal-list.d.ts +7 -2
  84. package/types/nanahoshi-mona-ui-internal-tree.d.ts +7 -3
  85. package/types/nanahoshi-mona-ui-list-box.d.ts +9 -4
  86. package/types/nanahoshi-mona-ui-list-view.d.ts +6 -6
  87. package/types/nanahoshi-mona-ui-list.d.ts +1 -1
  88. package/types/nanahoshi-mona-ui-menubar.d.ts +59 -58
  89. package/types/nanahoshi-mona-ui-multi-select.d.ts +6 -1
  90. package/types/nanahoshi-mona-ui-notification.d.ts +11 -5
  91. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +24 -15
  92. package/types/nanahoshi-mona-ui-otp-input.d.ts +9 -3
  93. package/types/nanahoshi-mona-ui-pager.d.ts +19 -6
  94. package/types/nanahoshi-mona-ui-popup.d.ts +2 -1
  95. package/types/nanahoshi-mona-ui-progress-bar.d.ts +9 -7
  96. package/types/nanahoshi-mona-ui-rating.d.ts +19 -12
  97. package/types/nanahoshi-mona-ui-scroll-view.d.ts +34 -28
  98. package/types/nanahoshi-mona-ui-sheet.d.ts +8 -2
  99. package/types/nanahoshi-mona-ui-sidebar.d.ts +3 -0
  100. package/types/nanahoshi-mona-ui-slider.d.ts +44 -26
  101. package/types/nanahoshi-mona-ui-spinner.d.ts +13 -4
  102. package/types/nanahoshi-mona-ui-split-button.d.ts +62 -56
  103. package/types/nanahoshi-mona-ui-splitter.d.ts +9 -6
  104. package/types/nanahoshi-mona-ui-stepper.d.ts +9 -3
  105. package/types/nanahoshi-mona-ui-switch.d.ts +1 -1
  106. package/types/nanahoshi-mona-ui-tabs.d.ts +96 -35
  107. package/types/nanahoshi-mona-ui-text-box.d.ts +11 -5
  108. package/types/nanahoshi-mona-ui-time-picker.d.ts +7 -2
  109. package/types/nanahoshi-mona-ui-time-selector.d.ts +16 -5
  110. package/types/nanahoshi-mona-ui-tree-view.d.ts +15 -10
  111. package/types/nanahoshi-mona-ui-window.d.ts +26 -20
  112. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-ZM3CneJ0.mjs +0 -145
@@ -1,11 +1,12 @@
1
- import { NgTemplateOutlet } from '@angular/common';
1
+ import { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { computed, input, Directive, inject, DestroyRef, DOCUMENT, ElementRef, contentChild, TemplateRef, signal, viewChild, model, afterNextRender, Component } from '@angular/core';
3
+ import { computed, input, Directive, inject, DestroyRef, DOCUMENT, ElementRef, PLATFORM_ID, signal, contentChild, TemplateRef, viewChild, model, effect, afterRenderEffect, afterNextRender, Component } from '@angular/core';
4
4
  import { toSignal, toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
5
  import { toCssValue } from '@nanahoshi/mona-ui/internal';
6
6
  import { select } from '@mirei/ts-collections';
7
- import { startWith, pairwise, map, Subject, timer, interval, takeUntil, asyncScheduler, fromEvent, filter, tap } from 'rxjs';
7
+ import { Subject, startWith, pairwise, map, interval, takeUntil, asyncScheduler, fromEvent, filter, tap } from 'rxjs';
8
8
  import { twMerge } from 'tailwind-merge';
9
+ import { injectComponentDirection, MonaI18nService } from '@nanahoshi/mona-ui/i18n';
9
10
  import { cva } from 'class-variance-authority';
10
11
 
11
12
  const scrollViewBaseThemeVariants = cva(`
@@ -47,18 +48,14 @@ const scrollViewArrowThemeVariants = cva(`
47
48
  true: "hidden",
48
49
  false: ""
49
50
  },
50
- left: {
51
- true: "left-0",
52
- false: ""
53
- },
54
- right: {
55
- true: "right-0",
56
- false: ""
51
+ side: {
52
+ left: "left-0",
53
+ right: "right-0"
57
54
  }
58
55
  }
59
56
  });
60
57
  const scrollViewPagerThemeVariants = cva(`
61
- absolute right-0 bottom-0 left-0 flex items-center justify-center
58
+ absolute inset-x-0 bottom-0 flex items-center justify-center
62
59
  `, {
63
60
  variants: {
64
61
  pagerOverlay: {
@@ -136,53 +133,83 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
136
133
  }]
137
134
  }], propDecorators: { active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: true }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: true }] }] } });
138
135
 
136
+ const SCROLL_VIEW_DEFAULT_MESSAGES = {
137
+ carousel: "carousel",
138
+ nextPage: "Next page",
139
+ page: (current) => `Page ${current}`,
140
+ pageOf: (current, total) => `Page ${current} of ${total}`,
141
+ previousPage: "Previous page",
142
+ scrollPagerPrevious: "Scroll pager previous",
143
+ scrollPagerNext: "Scroll pager next",
144
+ slide: "slide"
145
+ };
146
+
147
+ function normalizeScrollViewIndex(rawIndex, itemCount, infinite) {
148
+ if (itemCount <= 0) {
149
+ return 0;
150
+ }
151
+ const finiteIndex = Number.isFinite(rawIndex) ? Math.trunc(rawIndex) : 0;
152
+ if (infinite) {
153
+ return ((finiteIndex % itemCount) + itemCount) % itemCount;
154
+ }
155
+ return Math.max(0, Math.min(itemCount - 1, finiteIndex));
156
+ }
139
157
  class ScrollViewComponent {
140
158
  #destroyRef;
141
- #document;
142
- #viewIndex;
159
+ #direction;
143
160
  #directionFromIndex;
161
+ #document;
144
162
  #hostElementRef;
145
- #resizeObserver;
163
+ #i18n;
164
+ #platformId;
165
+ #pointerCancelHandler;
166
+ #pointerUpHandler;
167
+ #prefersReducedMotion;
168
+ #rejectedPagerPointers;
146
169
  #scroll$;
147
- #scrollMouseUpHandler;
170
+ #suppressedPagerClickPointerIds;
171
+ #viewIndex;
172
+ #activePagerPointerControl;
173
+ #activePagerPointerId;
174
+ #continuousTicked;
175
+ #pagerScrollCompletionCleanup;
176
+ #pagerScrollContext;
177
+ #resizeObserver;
148
178
  constructor() {
149
179
  this.#destroyRef = inject(DestroyRef);
180
+ this.#direction = injectComponentDirection();
150
181
  this.#document = inject(DOCUMENT);
182
+ this.#hostElementRef = inject(ElementRef);
183
+ this.#i18n = inject(MonaI18nService);
184
+ this.#platformId = inject(PLATFORM_ID);
185
+ this.#pointerCancelHandler = (event) => this.#handlePointerEnd(event, false);
186
+ this.#pointerUpHandler = (event) => this.#handlePointerEnd(event, true);
187
+ this.#prefersReducedMotion = signal(false, /* @ts-ignore */
188
+ ...(ngDevMode ? [{ debugName: "#prefersReducedMotion" }] : /* istanbul ignore next */ []));
189
+ this.#rejectedPagerPointers = new Map();
190
+ this.#scroll$ = new Subject();
191
+ this.#suppressedPagerClickPointerIds = new Set();
151
192
  this.#viewIndex = computed(() => {
152
- const infinite = this.infinite();
153
- const index = this.index();
154
- const viewData = this.viewData();
155
- if (viewData.length === 0) {
156
- return 0;
157
- }
158
- return infinite ? index % viewData.length : index;
193
+ return normalizeScrollViewIndex(this.index(), this.itemCount(), this.infinite());
159
194
  }, /* @ts-ignore */
160
195
  ...(ngDevMode ? [{ debugName: "#viewIndex" }] : /* istanbul ignore next */ []));
161
- this.#directionFromIndex = toSignal(toObservable(this.#viewIndex).pipe(startWith(0), pairwise(), map(([prevIndex, index]) => {
162
- const infinite = this.infinite();
163
- const totalItems = this.itemCount();
164
- if (infinite && totalItems > 1) {
165
- const lastIndex = totalItems - 1;
166
- if (prevIndex === lastIndex && index === 0) {
167
- return "right";
168
- }
169
- if (prevIndex === 0 && index === lastIndex) {
170
- return "left";
171
- }
172
- }
173
- return index < prevIndex ? "left" : "right";
174
- })), {
175
- initialValue: "right"
176
- });
177
- this.#hostElementRef = inject(ElementRef);
196
+ this.#activePagerPointerControl = null;
197
+ this.#activePagerPointerId = null;
198
+ this.#continuousTicked = false;
199
+ this.#pagerScrollCompletionCleanup = null;
200
+ this.#pagerScrollContext = null;
178
201
  this.#resizeObserver = null;
179
- this.#scroll$ = new Subject();
180
- this.#scrollMouseUpHandler = () => this.onPagerScrollEnd();
181
202
  this.animationDuration = computed(() => {
182
203
  const animate = this.animate();
183
204
  return typeof animate === "boolean" ? (animate ? 500 : 0) : animate;
184
205
  }, /* @ts-ignore */
185
206
  ...(ngDevMode ? [{ debugName: "animationDuration" }] : /* istanbul ignore next */ []));
207
+ this.ariaLabel = computed(() => {
208
+ const index = this.viewIndex();
209
+ const count = this.itemCount();
210
+ return count > 0 ? this.messages().pageOf(index + 1, count) : undefined;
211
+ }, /* @ts-ignore */
212
+ ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
186
213
  this.baseClass = computed(() => {
187
214
  const rounded = this.rounded();
188
215
  const variantClass = scrollViewBaseThemeVariants({ rounded });
@@ -197,35 +224,48 @@ class ScrollViewComponent {
197
224
  this.contentTemplate = contentChild(TemplateRef, /* @ts-ignore */
198
225
  ...(ngDevMode ? [{ debugName: "contentTemplate" }] : /* istanbul ignore next */ []));
199
226
  this.enterAnimation = computed(() => {
200
- return this.#directionFromIndex() === "right" ? "slide-in-from-right" : "slide-in-from-left";
227
+ const isRtl = this.isRtl();
228
+ const dir = this.#directionFromIndex();
229
+ const effectiveDir = isRtl ? (dir === "right" ? "left" : "right") : dir;
230
+ return effectiveDir === "right" ? "slide-in-from-right" : "slide-in-from-left";
201
231
  }, /* @ts-ignore */
202
232
  ...(ngDevMode ? [{ debugName: "enterAnimation" }] : /* istanbul ignore next */ []));
233
+ this.isRtl = computed(() => this.#direction() === "rtl", /* @ts-ignore */
234
+ ...(ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []));
203
235
  this.itemCount = computed(() => this.viewData().length, /* @ts-ignore */
204
236
  ...(ngDevMode ? [{ debugName: "itemCount" }] : /* istanbul ignore next */ []));
205
237
  this.leaveAnimation = computed(() => {
206
- return this.#directionFromIndex() === "right" ? "slide-out-to-left" : "slide-out-to-right";
238
+ const isRtl = this.isRtl();
239
+ const dir = this.#directionFromIndex();
240
+ const effectiveDir = isRtl ? (dir === "right" ? "left" : "right") : dir;
241
+ return effectiveDir === "right" ? "slide-out-to-left" : "slide-out-to-right";
207
242
  }, /* @ts-ignore */
208
243
  ...(ngDevMode ? [{ debugName: "leaveAnimation" }] : /* istanbul ignore next */ []));
209
244
  this.leftArrowClass = computed(() => {
210
- const hidden = !this.arrows() || !(this.infinite() || this.index() !== 0);
211
- return scrollViewArrowThemeVariants({ left: true, hidden });
245
+ const count = this.itemCount();
246
+ const hidden = !this.arrows() || count <= 1 || !(this.infinite() || this.viewIndex() !== 0);
247
+ const side = this.isRtl() ? "right" : "left";
248
+ return scrollViewArrowThemeVariants({ hidden, side });
212
249
  }, /* @ts-ignore */
213
250
  ...(ngDevMode ? [{ debugName: "leftArrowClass" }] : /* istanbul ignore next */ []));
214
251
  this.listClass = computed(() => {
215
252
  return scrollViewListThemeVariants();
216
253
  }, /* @ts-ignore */
217
254
  ...(ngDevMode ? [{ debugName: "listClass" }] : /* istanbul ignore next */ []));
255
+ this.messages = this.#i18n.componentMessages("scrollView", SCROLL_VIEW_DEFAULT_MESSAGES);
218
256
  this.pagerArrowClass = computed(() => {
219
257
  return scrollViewPagerArrowThemeVariants();
220
258
  }, /* @ts-ignore */
221
259
  ...(ngDevMode ? [{ debugName: "pagerArrowClass" }] : /* istanbul ignore next */ []));
222
- this.pagerArrowVisible = signal(true, /* @ts-ignore */
260
+ this.pagerArrowVisible = signal(false, /* @ts-ignore */
223
261
  ...(ngDevMode ? [{ debugName: "pagerArrowVisible" }] : /* istanbul ignore next */ []));
224
262
  this.pagerClass = computed(() => {
225
263
  const pagerOverlay = this.pagerOverlay();
226
264
  return scrollViewPagerThemeVariants({ pagerOverlay });
227
265
  }, /* @ts-ignore */
228
266
  ...(ngDevMode ? [{ debugName: "pagerClass" }] : /* istanbul ignore next */ []));
267
+ this.pagerElementRef = viewChild("pagerElement", /* @ts-ignore */
268
+ ...(ngDevMode ? [{ debugName: "pagerElementRef" }] : /* istanbul ignore next */ []));
229
269
  this.pagerListClass = computed(() => {
230
270
  return scrollViewPagerListThemeVariants();
231
271
  }, /* @ts-ignore */
@@ -237,10 +277,14 @@ class ScrollViewComponent {
237
277
  this.pagerListElementRef = viewChild("pagerListElement", /* @ts-ignore */
238
278
  ...(ngDevMode ? [{ debugName: "pagerListElementRef" }] : /* istanbul ignore next */ []));
239
279
  this.rightArrowClass = computed(() => {
240
- const hidden = !this.arrows() || !(this.infinite() || this.index() !== this.itemCount() - 1);
241
- return scrollViewArrowThemeVariants({ right: true, hidden });
280
+ const count = this.itemCount();
281
+ const hidden = !this.arrows() || count <= 1 || !(this.infinite() || this.viewIndex() !== count - 1);
282
+ const side = this.isRtl() ? "left" : "right";
283
+ return scrollViewArrowThemeVariants({ hidden, side });
242
284
  }, /* @ts-ignore */
243
285
  ...(ngDevMode ? [{ debugName: "rightArrowClass" }] : /* istanbul ignore next */ []));
286
+ this.scrollBehavior = computed(() => this.#prefersReducedMotion() ? "instant" : "smooth", /* @ts-ignore */
287
+ ...(ngDevMode ? [{ debugName: "scrollBehavior" }] : /* istanbul ignore next */ []));
244
288
  this.scrollViewHeight = computed(() => {
245
289
  const height = this.height();
246
290
  return toCssValue(height);
@@ -257,12 +301,6 @@ class ScrollViewComponent {
257
301
  }, /* @ts-ignore */
258
302
  ...(ngDevMode ? [{ debugName: "viewData" }] : /* istanbul ignore next */ []));
259
303
  this.viewIndex = this.#viewIndex;
260
- this.ariaLabel = computed(() => {
261
- const index = this.viewIndex();
262
- const count = this.itemCount();
263
- return count > 0 ? `Page ${index + 1} of ${count}` : undefined;
264
- }, /* @ts-ignore */
265
- ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
266
304
  /**
267
305
  * @description Sets whether page transitions are animated.
268
306
  * Pass a boolean for default duration (500ms) or a number for custom duration in milliseconds.
@@ -337,13 +375,86 @@ class ScrollViewComponent {
337
375
  */
338
376
  this.width = input.required(/* @ts-ignore */
339
377
  ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
378
+ effect(() => {
379
+ const rawIndex = this.index();
380
+ const count = this.itemCount();
381
+ if (count === 0) {
382
+ return;
383
+ }
384
+ const normalizedIndex = this.#viewIndex();
385
+ if (rawIndex !== normalizedIndex) {
386
+ this.index.set(normalizedIndex);
387
+ }
388
+ });
389
+ this.#directionFromIndex = toSignal(toObservable(this.#viewIndex).pipe(startWith(0), pairwise(), map(([prevIndex, index]) => {
390
+ const infinite = this.infinite();
391
+ const totalItems = this.itemCount();
392
+ if (infinite && totalItems > 1) {
393
+ const lastIndex = totalItems - 1;
394
+ if (prevIndex === lastIndex && index === 0) {
395
+ return "right";
396
+ }
397
+ if (prevIndex === 0 && index === lastIndex) {
398
+ return "left";
399
+ }
400
+ }
401
+ return index < prevIndex ? "left" : "right";
402
+ })), {
403
+ initialValue: "right"
404
+ });
405
+ if (isPlatformBrowser(this.#platformId) &&
406
+ typeof window !== "undefined" &&
407
+ typeof window.matchMedia === "function") {
408
+ const mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)");
409
+ const onPreferenceChange = (event) => this.#prefersReducedMotion.set(event.matches);
410
+ this.#prefersReducedMotion.set(mediaQuery.matches);
411
+ mediaQuery.addEventListener("change", onPreferenceChange);
412
+ this.#destroyRef.onDestroy(() => mediaQuery.removeEventListener("change", onPreferenceChange));
413
+ }
340
414
  this.#destroyRef.onDestroy(() => {
415
+ this.#stopContinuousScroll();
416
+ this.#resetPagerScrollState();
341
417
  this.#scroll$.complete();
342
418
  this.#resizeObserver?.disconnect();
343
- this.#document.removeEventListener("mouseup", this.#scrollMouseUpHandler);
419
+ });
420
+ afterRenderEffect({
421
+ read: onCleanup => {
422
+ const pagerListElementRef = this.pagerListElementRef();
423
+ const pagerElementRef = this.pagerElementRef();
424
+ this.itemCount();
425
+ this.#resizeObserver?.disconnect();
426
+ this.#resizeObserver = null;
427
+ onCleanup(() => {
428
+ this.#resizeObserver?.disconnect();
429
+ this.#resizeObserver = null;
430
+ });
431
+ if (!pagerListElementRef || !pagerElementRef) {
432
+ this.pagerArrowVisible.set(false);
433
+ this.#resetPagerScrollState();
434
+ return;
435
+ }
436
+ const element = pagerListElementRef.nativeElement;
437
+ const pagerElement = pagerElementRef.nativeElement;
438
+ if (this.#pagerScrollContext && this.#pagerScrollContext.element !== element) {
439
+ this.#resetPagerScrollState();
440
+ }
441
+ this.#updatePagerArrowVisibility(element, pagerElement);
442
+ if (typeof ResizeObserver !== "undefined") {
443
+ this.#resizeObserver = new ResizeObserver(() => {
444
+ this.#updatePagerArrowVisibility(element, pagerElement);
445
+ if (this.#pagerScrollContext && this.#pagerScrollContext.element === element) {
446
+ const currentMaxScroll = Math.max(0, element.scrollWidth - element.clientWidth);
447
+ if (this.#pagerScrollContext.maxScroll !== currentMaxScroll) {
448
+ this.#resetPagerScrollState();
449
+ }
450
+ }
451
+ });
452
+ this.#resizeObserver.observe(element);
453
+ this.#resizeObserver.observe(pagerElement);
454
+ }
455
+ }
344
456
  });
345
457
  afterNextRender(() => {
346
- this.setPagerListResizeObserver();
347
458
  this.setSubscriptions();
348
459
  this.scrollActivePageIntoView();
349
460
  });
@@ -352,35 +463,259 @@ class ScrollViewComponent {
352
463
  this.navigate(direction, this.infinite());
353
464
  }
354
465
  onPageClick(index, element) {
466
+ this.#resetPagerScrollState();
355
467
  this.index.set(index);
356
- element.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "center" });
468
+ element.scrollIntoView({ behavior: this.scrollBehavior(), block: "nearest", inline: "center" });
469
+ }
470
+ onPagerClick(event, element, direction) {
471
+ if (event.button !== 0) {
472
+ return;
473
+ }
474
+ const isKeyboardActivation = event.detail === 0;
475
+ if (!isKeyboardActivation) {
476
+ const pointerId = "pointerId" in event && typeof event.pointerId === "number"
477
+ ? event.pointerId
478
+ : null;
479
+ if (pointerId !== null && pointerId !== -1) {
480
+ if (this.#rejectedPagerPointers.has(pointerId)) {
481
+ this.#rejectedPagerPointers.delete(pointerId);
482
+ this.#cleanupDocumentPointerListenersIfNeeded();
483
+ return;
484
+ }
485
+ if (this.#suppressedPagerClickPointerIds.delete(pointerId)) {
486
+ return;
487
+ }
488
+ }
489
+ else {
490
+ if (this.#rejectedPagerPointers.size === 1) {
491
+ const firstKey = this.#rejectedPagerPointers.keys().next().value;
492
+ if (firstKey !== undefined) {
493
+ this.#rejectedPagerPointers.delete(firstKey);
494
+ this.#cleanupDocumentPointerListenersIfNeeded();
495
+ return;
496
+ }
497
+ }
498
+ if (this.#suppressedPagerClickPointerIds.size === 1) {
499
+ const firstId = this.#suppressedPagerClickPointerIds.values().next().value;
500
+ if (firstId !== undefined) {
501
+ this.#suppressedPagerClickPointerIds.delete(firstId);
502
+ return;
503
+ }
504
+ }
505
+ }
506
+ }
507
+ this.#scrollPagerBy(element, direction);
357
508
  }
358
- onPagerScroll(element, direction, type) {
359
- if (type === "continuous") {
360
- this.#document.addEventListener("mouseup", this.#scrollMouseUpHandler, { once: true });
509
+ onPagerPointerDown(event, element, direction) {
510
+ if (!event.isPrimary || event.button !== 0) {
511
+ return;
512
+ }
513
+ const currentTarget = event.currentTarget;
514
+ const target = event.target;
515
+ this.#releasePagerPointerCapture(currentTarget, event.pointerId);
516
+ if (target !== currentTarget) {
517
+ this.#releasePagerPointerCapture(target, event.pointerId);
518
+ }
519
+ const control = (currentTarget ?? target);
520
+ if (this.#activePagerPointerId !== null) {
521
+ this.#rejectedPagerPointers.set(event.pointerId, {
522
+ control,
523
+ phase: "down"
524
+ });
525
+ this.#ensureDocumentPointerListeners();
526
+ return;
361
527
  }
362
- const timeFunction = type === "single" ? timer : interval;
363
- timeFunction(60)
528
+ this.#rejectedPagerPointers.delete(event.pointerId);
529
+ this.#suppressedPagerClickPointerIds.delete(event.pointerId);
530
+ this.#activePagerPointerId = event.pointerId;
531
+ this.#activePagerPointerControl = control;
532
+ this.#continuousTicked = false;
533
+ this.#ensureDocumentPointerListeners();
534
+ interval(60)
364
535
  .pipe(takeUntil(this.#scroll$), takeUntilDestroyed(this.#destroyRef))
365
536
  .subscribe(() => {
366
- let left = 0;
367
- switch (direction) {
368
- case "left":
369
- left = Math.max(element.scrollLeft - 100, 0);
370
- element.scrollTo({ left, behavior: "smooth" });
371
- break;
372
- case "right":
373
- left = Math.min(element.scrollLeft + 100, element.scrollWidth);
374
- element.scrollTo({ left, behavior: "smooth" });
375
- break;
376
- }
537
+ this.#continuousTicked = true;
538
+ this.#scrollPagerBy(element, direction);
377
539
  });
378
540
  }
379
- onPagerScrollEnd() {
380
- this.#document.removeEventListener("mouseup", this.#scrollMouseUpHandler);
541
+ #armPagerScrollCompletion(element) {
542
+ if (this.#pagerScrollCompletionCleanup) {
543
+ this.#pagerScrollCompletionCleanup();
544
+ this.#pagerScrollCompletionCleanup = null;
545
+ }
546
+ const onScrollEnd = () => {
547
+ this.#resetPagerScrollState();
548
+ };
549
+ const supportsScrollEnd = isPlatformBrowser(this.#platformId) &&
550
+ typeof window !== "undefined" &&
551
+ "onscrollend" in element &&
552
+ typeof element.addEventListener === "function";
553
+ if (supportsScrollEnd) {
554
+ element.addEventListener("scrollend", onScrollEnd, { once: true });
555
+ this.#pagerScrollCompletionCleanup = () => {
556
+ element.removeEventListener?.("scrollend", onScrollEnd);
557
+ };
558
+ }
559
+ else {
560
+ let inactivityTimeoutId = null;
561
+ const scheduleInactivityTimeout = () => {
562
+ if (inactivityTimeoutId !== null && typeof window !== "undefined") {
563
+ window.clearTimeout(inactivityTimeoutId);
564
+ }
565
+ if (isPlatformBrowser(this.#platformId) && typeof window !== "undefined") {
566
+ inactivityTimeoutId = window.setTimeout(onScrollEnd, 150);
567
+ }
568
+ };
569
+ const onScroll = () => {
570
+ scheduleInactivityTimeout();
571
+ };
572
+ if (typeof element.addEventListener === "function") {
573
+ element.addEventListener("scroll", onScroll, { passive: true });
574
+ }
575
+ scheduleInactivityTimeout();
576
+ this.#pagerScrollCompletionCleanup = () => {
577
+ if (typeof element.removeEventListener === "function") {
578
+ element.removeEventListener("scroll", onScroll);
579
+ }
580
+ if (inactivityTimeoutId !== null && typeof window !== "undefined") {
581
+ window.clearTimeout(inactivityTimeoutId);
582
+ }
583
+ };
584
+ }
585
+ }
586
+ #cleanupDocumentPointerListenersIfNeeded() {
587
+ let hasDownRejected = false;
588
+ for (const p of this.#rejectedPagerPointers.values()) {
589
+ if (p.phase === "down") {
590
+ hasDownRejected = true;
591
+ break;
592
+ }
593
+ }
594
+ if (this.#activePagerPointerId === null && !hasDownRejected) {
595
+ this.#document.removeEventListener("pointerup", this.#pointerUpHandler);
596
+ this.#document.removeEventListener("pointercancel", this.#pointerCancelHandler);
597
+ }
598
+ }
599
+ #ensureDocumentPointerListeners() {
600
+ this.#document.addEventListener("pointerup", this.#pointerUpHandler);
601
+ this.#document.addEventListener("pointercancel", this.#pointerCancelHandler);
602
+ }
603
+ #handlePointerEnd(event, isUp) {
604
+ if (event.pointerId !== this.#activePagerPointerId) {
605
+ const rejected = this.#rejectedPagerPointers.get(event.pointerId);
606
+ if (rejected) {
607
+ if (!isUp) {
608
+ this.#rejectedPagerPointers.delete(event.pointerId);
609
+ }
610
+ else {
611
+ const isWithinControl = this.#isPointerReleaseWithinControl(event, rejected.control ?? null);
612
+ if (isWithinControl) {
613
+ rejected.phase = "awaiting-click";
614
+ }
615
+ else {
616
+ this.#rejectedPagerPointers.delete(event.pointerId);
617
+ }
618
+ }
619
+ }
620
+ this.#cleanupDocumentPointerListenersIfNeeded();
621
+ return;
622
+ }
381
623
  this.#scroll$.next();
382
- this.#scroll$.complete();
383
- this.#scroll$ = new Subject();
624
+ const shouldSuppressTrailingClick = isUp &&
625
+ this.#continuousTicked &&
626
+ this.#isPointerReleaseWithinControl(event, this.#activePagerPointerControl);
627
+ if (shouldSuppressTrailingClick) {
628
+ this.#suppressedPagerClickPointerIds.add(event.pointerId);
629
+ }
630
+ else {
631
+ this.#suppressedPagerClickPointerIds.delete(event.pointerId);
632
+ }
633
+ this.#continuousTicked = false;
634
+ this.#activePagerPointerId = null;
635
+ this.#activePagerPointerControl = null;
636
+ this.#cleanupDocumentPointerListenersIfNeeded();
637
+ }
638
+ #isPointerReleaseWithinControl(event, control) {
639
+ if (control == null) {
640
+ return true;
641
+ }
642
+ const targetNode = event.target;
643
+ return ((targetNode != null && control.contains(targetNode)) ||
644
+ (typeof event.composedPath === "function" && event.composedPath().includes(control)));
645
+ }
646
+ #releasePagerPointerCapture(control, pointerId) {
647
+ if (control == null ||
648
+ typeof control.hasPointerCapture !== "function" ||
649
+ typeof control.releasePointerCapture !== "function") {
650
+ return;
651
+ }
652
+ try {
653
+ if (control.hasPointerCapture(pointerId)) {
654
+ control.releasePointerCapture(pointerId);
655
+ }
656
+ }
657
+ catch {
658
+ // Do not let an implementation-specific capture race break pager interaction.
659
+ }
660
+ }
661
+ #resetPagerScrollState() {
662
+ if (this.#pagerScrollCompletionCleanup) {
663
+ this.#pagerScrollCompletionCleanup();
664
+ this.#pagerScrollCompletionCleanup = null;
665
+ }
666
+ this.#pagerScrollContext = null;
667
+ }
668
+ #scrollPagerBy(element, direction) {
669
+ const currentDirection = this.isRtl() ? "rtl" : "ltr";
670
+ const maxScroll = Math.max(0, (element.scrollWidth ?? 0) - (element.clientWidth ?? 0));
671
+ const sameContext = this.#pagerScrollContext?.element === element &&
672
+ this.#pagerScrollContext.direction === currentDirection &&
673
+ this.#pagerScrollContext.maxScroll === maxScroll;
674
+ const currentScrollLeft = element.scrollLeft ?? 0;
675
+ const base = sameContext ? this.#pagerScrollContext.target : currentScrollLeft;
676
+ let offset = direction === "left" ? -100 : 100;
677
+ if (currentDirection === "rtl") {
678
+ offset = -offset;
679
+ }
680
+ const target = base + offset;
681
+ const clampedTarget = currentDirection === "ltr"
682
+ ? Math.max(0, Math.min(maxScroll, target))
683
+ : Math.max(-maxScroll, Math.min(0, target));
684
+ if (!sameContext && clampedTarget === currentScrollLeft) {
685
+ this.#resetPagerScrollState();
686
+ return;
687
+ }
688
+ if (sameContext && clampedTarget === this.#pagerScrollContext.target) {
689
+ return;
690
+ }
691
+ this.#pagerScrollContext = {
692
+ direction: currentDirection,
693
+ element,
694
+ maxScroll,
695
+ target: clampedTarget
696
+ };
697
+ if (typeof element.scrollTo === "function") {
698
+ element.scrollTo({ behavior: this.scrollBehavior(), left: clampedTarget });
699
+ }
700
+ else if (typeof element.scrollBy === "function") {
701
+ element.scrollBy({ behavior: this.scrollBehavior(), left: offset });
702
+ }
703
+ this.#armPagerScrollCompletion(element);
704
+ }
705
+ #stopContinuousScroll() {
706
+ this.#document.removeEventListener("pointerup", this.#pointerUpHandler);
707
+ this.#document.removeEventListener("pointercancel", this.#pointerCancelHandler);
708
+ this.#scroll$.next();
709
+ this.#continuousTicked = false;
710
+ this.#activePagerPointerId = null;
711
+ this.#activePagerPointerControl = null;
712
+ this.#suppressedPagerClickPointerIds.clear();
713
+ this.#rejectedPagerPointers.clear();
714
+ }
715
+ #updatePagerArrowVisibility(list, pager) {
716
+ const requiredWidth = list.scrollWidth;
717
+ const arrowFreeAvailableWidth = pager.clientWidth;
718
+ this.pagerArrowVisible.set(requiredWidth > arrowFreeAvailableWidth);
384
719
  }
385
720
  navigate(direction, infinite) {
386
721
  if (direction === "left") {
@@ -392,8 +727,8 @@ class ScrollViewComponent {
392
727
  this.scrollActivePageIntoView();
393
728
  }
394
729
  navigateLeft(infinite) {
395
- const currentIndex = this.index();
396
- const dataLength = this.viewData().length;
730
+ const currentIndex = this.#viewIndex();
731
+ const dataLength = this.itemCount();
397
732
  if (dataLength === 0) {
398
733
  return;
399
734
  }
@@ -405,8 +740,8 @@ class ScrollViewComponent {
405
740
  }
406
741
  }
407
742
  navigateRight(infinite) {
408
- const currentIndex = this.index();
409
- const dataLength = this.viewData().length;
743
+ const currentIndex = this.#viewIndex();
744
+ const dataLength = this.itemCount();
410
745
  if (dataLength === 0) {
411
746
  return;
412
747
  }
@@ -418,36 +753,31 @@ class ScrollViewComponent {
418
753
  }
419
754
  }
420
755
  scrollActivePageIntoView() {
756
+ this.#resetPagerScrollState();
421
757
  asyncScheduler.schedule(() => {
422
758
  const element = this.#hostElementRef.nativeElement.querySelector("button[data-active-page='true']");
423
759
  if (element) {
424
- element.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "center" });
760
+ element.scrollIntoView({ behavior: this.scrollBehavior(), block: "nearest", inline: "center" });
425
761
  }
426
762
  });
427
763
  }
428
- setPagerListResizeObserver() {
429
- const pagerListElementRef = this.pagerListElementRef();
430
- if (pagerListElementRef) {
431
- const element = pagerListElementRef.nativeElement;
432
- this.pagerArrowVisible.set(element.scrollWidth > element.clientWidth);
433
- this.#resizeObserver = new ResizeObserver(() => {
434
- const scrollWidth = element.scrollWidth;
435
- const clientWidth = element.clientWidth;
436
- this.pagerArrowVisible.set(scrollWidth > clientWidth);
437
- });
438
- this.#resizeObserver.observe(element);
439
- }
440
- }
441
764
  setSubscriptions() {
442
765
  fromEvent(this.#hostElementRef.nativeElement, "keydown")
443
766
  .pipe(takeUntilDestroyed(this.#destroyRef), filter(event => event.key === "ArrowLeft" || event.key === "ArrowRight"), tap(event => {
444
- const direction = event.key === "ArrowLeft" ? "left" : "right";
767
+ const isRtl = this.isRtl();
768
+ let direction;
769
+ if (event.key === "ArrowLeft") {
770
+ direction = isRtl ? "right" : "left";
771
+ }
772
+ else {
773
+ direction = isRtl ? "left" : "right";
774
+ }
445
775
  this.navigate(direction, this.infinite());
446
776
  }))
447
777
  .subscribe();
448
778
  }
449
779
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ScrollViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
450
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: ScrollViewComponent, isStandalone: true, selector: "mona-scroll-view", inputs: { animate: { classPropertyName: "animate", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null }, arrows: { classPropertyName: "arrows", publicName: "arrows", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: true, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, infinite: { classPropertyName: "infinite", publicName: "infinite", isSignal: true, isRequired: false, transformFunction: null }, pageable: { classPropertyName: "pageable", publicName: "pageable", isSignal: true, isRequired: false, transformFunction: null }, pagerBlur: { classPropertyName: "pagerBlur", publicName: "pagerBlur", isSignal: true, isRequired: false, transformFunction: null }, pagerOverlay: { classPropertyName: "pagerOverlay", publicName: "pagerOverlay", isSignal: true, isRequired: false, transformFunction: null }, pagerRounded: { classPropertyName: "pagerRounded", publicName: "pagerRounded", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { index: "indexChange" }, host: { properties: { "class": "baseClass()", "attr.tabindex": "0", "style.height": "scrollViewHeight()", "style.width": "scrollViewWidth()", "attr.role": "'region'", "attr.aria-roledescription": "'carousel'", "attr.aria-label": "ariaLabel()" } }, queries: [{ propertyName: "contentTemplate", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "pagerListElementRef", first: true, predicate: ["pagerListElement"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"contentClass()\" #contentElement>\n <ul [class]=\"listClass()\">\n @for (item of viewData(); track $index) {\n @if ($index === viewIndex()) {\n <li\n role=\"group\"\n aria-roledescription=\"slide\"\n [attr.aria-label]=\"$index + 1 + ' of ' + itemCount()\"\n [animate.enter]=\"enterAnimation()\"\n [animate.leave]=\"leaveAnimation()\"\n [style.animation-duration.ms]=\"animationDuration()\">\n @let width = contentElement.clientWidth;\n @let height = contentElement.clientHeight;\n <ng-container\n [ngTemplateOutlet]=\"contentTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item.data, width, height }\"></ng-container>\n </li>\n }\n }\n </ul>\n</div>\n<button\n type=\"button\"\n [class]=\"leftArrowClass()\"\n (click)=\"onArrowClick('left')\"\n [attr.data-navigate-prev]=\"true\"\n aria-label=\"Previous page\">\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"48\"\n height=\"48\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-chevron-left-icon lucide-chevron-left\">\n <path d=\"m15 18-6-6 6-6\" />\n </svg>\n</button>\n<button\n type=\"button\"\n [class]=\"rightArrowClass()\"\n (click)=\"onArrowClick('right')\"\n [attr.data-navigate-next]=\"true\"\n aria-label=\"Next page\">\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"48\"\n height=\"48\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-chevron-right-icon lucide-chevron-right\">\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n</button>\n\n@if (pageable()) {\n <div [class]=\"pagerClass()\" [style.backdrop-filter]=\"'blur(' + pagerBlur() + 'px)'\">\n @if (pagerArrowVisible()) {\n <button\n type=\"button\"\n [class]=\"pagerArrowClass()\"\n aria-label=\"Scroll pager left\"\n (click)=\"onPagerScroll(pagerListElement, 'left', 'single')\"\n (mousedown)=\"onPagerScroll(pagerListElement, 'left', 'continuous')\">\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-chevron-left-icon lucide-chevron-left\">\n <path d=\"m15 18-6-6 6-6\" />\n </svg>\n </button>\n }\n <div [class]=\"pagerListContainerClass()\">\n <ul [class]=\"pagerListClass()\" #pagerListElement>\n @for (_ of viewData(); track $index) {\n <li [attr.data-page-index]=\"$index\" [attr.data-page-item]=\"true\">\n <button\n type=\"button\"\n monaScrollViewActivePage\n [active]=\"$index === viewIndex()\"\n [rounded]=\"pagerRounded()\"\n [attr.data-active-page]=\"$index === viewIndex()\"\n [attr.aria-current]=\"$index === viewIndex() ? true : null\"\n [attr.aria-label]=\"'Page ' + ($index + 1)\"\n (click)=\"onPageClick($index, pagerItemElement)\"\n #pagerItemElement></button>\n </li>\n }\n </ul>\n </div>\n @if (pagerArrowVisible()) {\n <button\n type=\"button\"\n [class]=\"pagerArrowClass()\"\n aria-label=\"Scroll pager right\"\n (click)=\"onPagerScroll(pagerListElement, 'right', 'single')\"\n (mousedown)=\"onPagerScroll(pagerListElement, 'right', 'continuous')\">\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-chevron-right-icon lucide-chevron-right\">\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n }\n </div>\n}\n", styles: ["@keyframes slideInFromRight{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes slideOutToLeft{0%{transform:translate(0)}to{transform:translate(-100%)}}@keyframes slideInFromLeft{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideOutToRight{0%{transform:translate(0)}to{transform:translate(100%)}}.slide-in-from-right{animation:slideInFromRight .5s ease-out both}.slide-out-to-left{animation:slideOutToLeft .5s ease-out both}.slide-in-from-left{animation:slideInFromLeft .5s ease-out both}.slide-out-to-right{animation:slideOutToRight .5s ease-out both}@media(prefers-reduced-motion:reduce){.slide-in-from-right,.slide-out-to-left,.slide-in-from-left,.slide-out-to-right{animation-duration:1ms}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ScrollViewActivePageDirective, selector: "button[monaScrollViewActivePage]", inputs: ["active", "rounded"] }] }); }
780
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: ScrollViewComponent, isStandalone: true, selector: "mona-scroll-view", inputs: { animate: { classPropertyName: "animate", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null }, arrows: { classPropertyName: "arrows", publicName: "arrows", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: true, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, infinite: { classPropertyName: "infinite", publicName: "infinite", isSignal: true, isRequired: false, transformFunction: null }, pageable: { classPropertyName: "pageable", publicName: "pageable", isSignal: true, isRequired: false, transformFunction: null }, pagerBlur: { classPropertyName: "pagerBlur", publicName: "pagerBlur", isSignal: true, isRequired: false, transformFunction: null }, pagerOverlay: { classPropertyName: "pagerOverlay", publicName: "pagerOverlay", isSignal: true, isRequired: false, transformFunction: null }, pagerRounded: { classPropertyName: "pagerRounded", publicName: "pagerRounded", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { index: "indexChange" }, host: { properties: { "class": "baseClass()", "attr.tabindex": "0", "style.height": "scrollViewHeight()", "style.width": "scrollViewWidth()", "attr.role": "'region'", "attr.aria-roledescription": "messages().carousel", "attr.aria-label": "ariaLabel()" } }, queries: [{ propertyName: "contentTemplate", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "pagerElementRef", first: true, predicate: ["pagerElement"], descendants: true, isSignal: true }, { propertyName: "pagerListElementRef", first: true, predicate: ["pagerListElement"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"contentClass()\" #contentElement>\n <ul [class]=\"listClass()\">\n @for (item of viewData(); track $index) {\n @if ($index === viewIndex()) {\n <li\n role=\"group\"\n [attr.aria-roledescription]=\"messages().slide\"\n [attr.aria-label]=\"messages().pageOf($index + 1, itemCount())\"\n [animate.enter]=\"enterAnimation()\"\n [animate.leave]=\"leaveAnimation()\"\n [style.--mona-scroll-view-animation-duration]=\"animationDuration() + 'ms'\">\n @let width = contentElement.clientWidth;\n @let height = contentElement.clientHeight;\n <ng-container\n [ngTemplateOutlet]=\"contentTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item.data, width, height }\"></ng-container>\n </li>\n }\n }\n </ul>\n</div>\n<button\n type=\"button\"\n [class]=\"leftArrowClass()\"\n (click)=\"onArrowClick('left')\"\n [attr.data-navigate-prev]=\"true\"\n [attr.aria-label]=\"messages().previousPage\">\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"48\"\n height=\"48\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-chevron-left-icon lucide-chevron-left rtl:rotate-180\">\n <path d=\"m15 18-6-6 6-6\" />\n </svg>\n</button>\n<button\n type=\"button\"\n [class]=\"rightArrowClass()\"\n (click)=\"onArrowClick('right')\"\n [attr.data-navigate-next]=\"true\"\n [attr.aria-label]=\"messages().nextPage\">\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"48\"\n height=\"48\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-chevron-right-icon lucide-chevron-right rtl:rotate-180\">\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n</button>\n\n@if (pageable()) {\n <div\n #pagerElement\n data-pager-root=\"true\"\n [class]=\"pagerClass()\"\n [style.direction]=\"isRtl() ? 'rtl' : 'ltr'\"\n [style.backdrop-filter]=\"'blur(' + pagerBlur() + 'px)'\">\n @if (pagerArrowVisible()) {\n <button\n type=\"button\"\n [class]=\"pagerArrowClass()\"\n [attr.aria-label]=\"messages().scrollPagerPrevious\"\n (pointerdown)=\"onPagerPointerDown($event, pagerListElement, 'left')\"\n (click)=\"onPagerClick($event, pagerListElement, 'left')\">\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-chevron-left-icon lucide-chevron-left rtl:rotate-180\">\n <path d=\"m15 18-6-6 6-6\" />\n </svg>\n </button>\n }\n <div [class]=\"pagerListContainerClass()\">\n <ul [class]=\"pagerListClass()\" #pagerListElement>\n @for (_ of viewData(); track $index) {\n <li [attr.data-page-index]=\"$index\" [attr.data-page-item]=\"true\">\n <button\n type=\"button\"\n monaScrollViewActivePage\n [active]=\"$index === viewIndex()\"\n [rounded]=\"pagerRounded()\"\n [attr.data-active-page]=\"$index === viewIndex()\"\n [attr.aria-current]=\"$index === viewIndex() ? true : null\"\n [attr.aria-label]=\"messages().page($index + 1)\"\n (click)=\"onPageClick($index, pagerItemElement)\"\n #pagerItemElement></button>\n </li>\n }\n </ul>\n </div>\n @if (pagerArrowVisible()) {\n <button\n type=\"button\"\n [class]=\"pagerArrowClass()\"\n [attr.aria-label]=\"messages().scrollPagerNext\"\n (pointerdown)=\"onPagerPointerDown($event, pagerListElement, 'right')\"\n (click)=\"onPagerClick($event, pagerListElement, 'right')\">\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-chevron-right-icon lucide-chevron-right rtl:rotate-180\">\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n }\n </div>\n}\n", styles: ["@keyframes slideInFromRight{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes slideOutToLeft{0%{transform:translate(0)}to{transform:translate(-100%)}}@keyframes slideInFromLeft{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideOutToRight{0%{transform:translate(0)}to{transform:translate(100%)}}.slide-in-from-right,.slide-out-to-left,.slide-in-from-left,.slide-out-to-right{animation-duration:var(--mona-scroll-view-animation-duration, .5s);animation-timing-function:ease-out;animation-fill-mode:both}.slide-in-from-right{animation-name:slideInFromRight}.slide-out-to-left{animation-name:slideOutToLeft}.slide-in-from-left{animation-name:slideInFromLeft}.slide-out-to-right{animation-name:slideOutToRight}@media(prefers-reduced-motion:reduce){.slide-in-from-right,.slide-out-to-left,.slide-in-from-left,.slide-out-to-right{animation-duration:min(var(--mona-scroll-view-animation-duration, .5s),1ms)}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ScrollViewActivePageDirective, selector: "button[monaScrollViewActivePage]", inputs: ["active", "rounded"] }] }); }
451
781
  }
452
782
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ScrollViewComponent, decorators: [{
453
783
  type: Component,
@@ -457,10 +787,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
457
787
  "[style.height]": "scrollViewHeight()",
458
788
  "[style.width]": "scrollViewWidth()",
459
789
  "[attr.role]": "'region'",
460
- "[attr.aria-roledescription]": "'carousel'",
790
+ "[attr.aria-roledescription]": "messages().carousel",
461
791
  "[attr.aria-label]": "ariaLabel()"
462
- }, template: "<div [class]=\"contentClass()\" #contentElement>\n <ul [class]=\"listClass()\">\n @for (item of viewData(); track $index) {\n @if ($index === viewIndex()) {\n <li\n role=\"group\"\n aria-roledescription=\"slide\"\n [attr.aria-label]=\"$index + 1 + ' of ' + itemCount()\"\n [animate.enter]=\"enterAnimation()\"\n [animate.leave]=\"leaveAnimation()\"\n [style.animation-duration.ms]=\"animationDuration()\">\n @let width = contentElement.clientWidth;\n @let height = contentElement.clientHeight;\n <ng-container\n [ngTemplateOutlet]=\"contentTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item.data, width, height }\"></ng-container>\n </li>\n }\n }\n </ul>\n</div>\n<button\n type=\"button\"\n [class]=\"leftArrowClass()\"\n (click)=\"onArrowClick('left')\"\n [attr.data-navigate-prev]=\"true\"\n aria-label=\"Previous page\">\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"48\"\n height=\"48\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-chevron-left-icon lucide-chevron-left\">\n <path d=\"m15 18-6-6 6-6\" />\n </svg>\n</button>\n<button\n type=\"button\"\n [class]=\"rightArrowClass()\"\n (click)=\"onArrowClick('right')\"\n [attr.data-navigate-next]=\"true\"\n aria-label=\"Next page\">\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"48\"\n height=\"48\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-chevron-right-icon lucide-chevron-right\">\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n</button>\n\n@if (pageable()) {\n <div [class]=\"pagerClass()\" [style.backdrop-filter]=\"'blur(' + pagerBlur() + 'px)'\">\n @if (pagerArrowVisible()) {\n <button\n type=\"button\"\n [class]=\"pagerArrowClass()\"\n aria-label=\"Scroll pager left\"\n (click)=\"onPagerScroll(pagerListElement, 'left', 'single')\"\n (mousedown)=\"onPagerScroll(pagerListElement, 'left', 'continuous')\">\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-chevron-left-icon lucide-chevron-left\">\n <path d=\"m15 18-6-6 6-6\" />\n </svg>\n </button>\n }\n <div [class]=\"pagerListContainerClass()\">\n <ul [class]=\"pagerListClass()\" #pagerListElement>\n @for (_ of viewData(); track $index) {\n <li [attr.data-page-index]=\"$index\" [attr.data-page-item]=\"true\">\n <button\n type=\"button\"\n monaScrollViewActivePage\n [active]=\"$index === viewIndex()\"\n [rounded]=\"pagerRounded()\"\n [attr.data-active-page]=\"$index === viewIndex()\"\n [attr.aria-current]=\"$index === viewIndex() ? true : null\"\n [attr.aria-label]=\"'Page ' + ($index + 1)\"\n (click)=\"onPageClick($index, pagerItemElement)\"\n #pagerItemElement></button>\n </li>\n }\n </ul>\n </div>\n @if (pagerArrowVisible()) {\n <button\n type=\"button\"\n [class]=\"pagerArrowClass()\"\n aria-label=\"Scroll pager right\"\n (click)=\"onPagerScroll(pagerListElement, 'right', 'single')\"\n (mousedown)=\"onPagerScroll(pagerListElement, 'right', 'continuous')\">\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-chevron-right-icon lucide-chevron-right\">\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n }\n </div>\n}\n", styles: ["@keyframes slideInFromRight{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes slideOutToLeft{0%{transform:translate(0)}to{transform:translate(-100%)}}@keyframes slideInFromLeft{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideOutToRight{0%{transform:translate(0)}to{transform:translate(100%)}}.slide-in-from-right{animation:slideInFromRight .5s ease-out both}.slide-out-to-left{animation:slideOutToLeft .5s ease-out both}.slide-in-from-left{animation:slideInFromLeft .5s ease-out both}.slide-out-to-right{animation:slideOutToRight .5s ease-out both}@media(prefers-reduced-motion:reduce){.slide-in-from-right,.slide-out-to-left,.slide-in-from-left,.slide-out-to-right{animation-duration:1ms}}\n"] }]
463
- }], ctorParameters: () => [], propDecorators: { contentTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }], pagerListElementRef: [{ type: i0.ViewChild, args: ["pagerListElement", { isSignal: true }] }], animate: [{ type: i0.Input, args: [{ isSignal: true, alias: "animate", required: false }] }], arrows: [{ type: i0.Input, args: [{ isSignal: true, alias: "arrows", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: true }] }], index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: false }] }, { type: i0.Output, args: ["indexChange"] }], infinite: [{ type: i0.Input, args: [{ isSignal: true, alias: "infinite", required: false }] }], pageable: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageable", required: false }] }], pagerBlur: [{ type: i0.Input, args: [{ isSignal: true, alias: "pagerBlur", required: false }] }], pagerOverlay: [{ type: i0.Input, args: [{ isSignal: true, alias: "pagerOverlay", required: false }] }], pagerRounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "pagerRounded", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: true }] }] } });
792
+ }, template: "<div [class]=\"contentClass()\" #contentElement>\n <ul [class]=\"listClass()\">\n @for (item of viewData(); track $index) {\n @if ($index === viewIndex()) {\n <li\n role=\"group\"\n [attr.aria-roledescription]=\"messages().slide\"\n [attr.aria-label]=\"messages().pageOf($index + 1, itemCount())\"\n [animate.enter]=\"enterAnimation()\"\n [animate.leave]=\"leaveAnimation()\"\n [style.--mona-scroll-view-animation-duration]=\"animationDuration() + 'ms'\">\n @let width = contentElement.clientWidth;\n @let height = contentElement.clientHeight;\n <ng-container\n [ngTemplateOutlet]=\"contentTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item.data, width, height }\"></ng-container>\n </li>\n }\n }\n </ul>\n</div>\n<button\n type=\"button\"\n [class]=\"leftArrowClass()\"\n (click)=\"onArrowClick('left')\"\n [attr.data-navigate-prev]=\"true\"\n [attr.aria-label]=\"messages().previousPage\">\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"48\"\n height=\"48\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-chevron-left-icon lucide-chevron-left rtl:rotate-180\">\n <path d=\"m15 18-6-6 6-6\" />\n </svg>\n</button>\n<button\n type=\"button\"\n [class]=\"rightArrowClass()\"\n (click)=\"onArrowClick('right')\"\n [attr.data-navigate-next]=\"true\"\n [attr.aria-label]=\"messages().nextPage\">\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"48\"\n height=\"48\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-chevron-right-icon lucide-chevron-right rtl:rotate-180\">\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n</button>\n\n@if (pageable()) {\n <div\n #pagerElement\n data-pager-root=\"true\"\n [class]=\"pagerClass()\"\n [style.direction]=\"isRtl() ? 'rtl' : 'ltr'\"\n [style.backdrop-filter]=\"'blur(' + pagerBlur() + 'px)'\">\n @if (pagerArrowVisible()) {\n <button\n type=\"button\"\n [class]=\"pagerArrowClass()\"\n [attr.aria-label]=\"messages().scrollPagerPrevious\"\n (pointerdown)=\"onPagerPointerDown($event, pagerListElement, 'left')\"\n (click)=\"onPagerClick($event, pagerListElement, 'left')\">\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-chevron-left-icon lucide-chevron-left rtl:rotate-180\">\n <path d=\"m15 18-6-6 6-6\" />\n </svg>\n </button>\n }\n <div [class]=\"pagerListContainerClass()\">\n <ul [class]=\"pagerListClass()\" #pagerListElement>\n @for (_ of viewData(); track $index) {\n <li [attr.data-page-index]=\"$index\" [attr.data-page-item]=\"true\">\n <button\n type=\"button\"\n monaScrollViewActivePage\n [active]=\"$index === viewIndex()\"\n [rounded]=\"pagerRounded()\"\n [attr.data-active-page]=\"$index === viewIndex()\"\n [attr.aria-current]=\"$index === viewIndex() ? true : null\"\n [attr.aria-label]=\"messages().page($index + 1)\"\n (click)=\"onPageClick($index, pagerItemElement)\"\n #pagerItemElement></button>\n </li>\n }\n </ul>\n </div>\n @if (pagerArrowVisible()) {\n <button\n type=\"button\"\n [class]=\"pagerArrowClass()\"\n [attr.aria-label]=\"messages().scrollPagerNext\"\n (pointerdown)=\"onPagerPointerDown($event, pagerListElement, 'right')\"\n (click)=\"onPagerClick($event, pagerListElement, 'right')\">\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-chevron-right-icon lucide-chevron-right rtl:rotate-180\">\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n }\n </div>\n}\n", styles: ["@keyframes slideInFromRight{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes slideOutToLeft{0%{transform:translate(0)}to{transform:translate(-100%)}}@keyframes slideInFromLeft{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideOutToRight{0%{transform:translate(0)}to{transform:translate(100%)}}.slide-in-from-right,.slide-out-to-left,.slide-in-from-left,.slide-out-to-right{animation-duration:var(--mona-scroll-view-animation-duration, .5s);animation-timing-function:ease-out;animation-fill-mode:both}.slide-in-from-right{animation-name:slideInFromRight}.slide-out-to-left{animation-name:slideOutToLeft}.slide-in-from-left{animation-name:slideInFromLeft}.slide-out-to-right{animation-name:slideOutToRight}@media(prefers-reduced-motion:reduce){.slide-in-from-right,.slide-out-to-left,.slide-in-from-left,.slide-out-to-right{animation-duration:min(var(--mona-scroll-view-animation-duration, .5s),1ms)}}\n"] }]
793
+ }], ctorParameters: () => [], propDecorators: { contentTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }], pagerElementRef: [{ type: i0.ViewChild, args: ["pagerElement", { isSignal: true }] }], pagerListElementRef: [{ type: i0.ViewChild, args: ["pagerListElement", { isSignal: true }] }], animate: [{ type: i0.Input, args: [{ isSignal: true, alias: "animate", required: false }] }], arrows: [{ type: i0.Input, args: [{ isSignal: true, alias: "arrows", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: true }] }], index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: false }] }, { type: i0.Output, args: ["indexChange"] }], infinite: [{ type: i0.Input, args: [{ isSignal: true, alias: "infinite", required: false }] }], pageable: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageable", required: false }] }], pagerBlur: [{ type: i0.Input, args: [{ isSignal: true, alias: "pagerBlur", required: false }] }], pagerOverlay: [{ type: i0.Input, args: [{ isSignal: true, alias: "pagerOverlay", required: false }] }], pagerRounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "pagerRounded", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: true }] }] } });
464
794
 
465
795
  /*
466
796
  * Public API Surface of @nanahoshi/mona-ui/scroll-view
@@ -470,5 +800,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
470
800
  * Generated bundle index. Do not edit.
471
801
  */
472
802
 
473
- export { ScrollViewActivePageDirective, ScrollViewComponent };
803
+ export { SCROLL_VIEW_DEFAULT_MESSAGES, ScrollViewActivePageDirective, ScrollViewComponent };
474
804
  //# sourceMappingURL=nanahoshi-mona-ui-scroll-view.mjs.map