@breadstone/mosaik-elements-foundation 0.0.134 → 0.0.136

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 (74) hide show
  1. package/Controls/Behaviors/Slottable.d.ts +6 -0
  2. package/Controls/Behaviors/Slottable.d.ts.map +1 -1
  3. package/Controls/Behaviors/Slottable.js +6 -0
  4. package/Controls/Behaviors/Slottable.js.map +1 -1
  5. package/Controls/Components/Grouping/Banner/BannerElement.d.ts +3 -2
  6. package/Controls/Components/Grouping/Banner/BannerElement.d.ts.map +1 -1
  7. package/Controls/Components/Grouping/Banner/BannerElement.js +3 -4
  8. package/Controls/Components/Grouping/Banner/BannerElement.js.map +1 -1
  9. package/Controls/Components/Grouping/Banner/BannerElementTemplate.d.ts.map +1 -1
  10. package/Controls/Components/Grouping/Banner/BannerElementTemplate.js +4 -0
  11. package/Controls/Components/Grouping/Banner/BannerElementTemplate.js.map +1 -1
  12. package/Controls/Components/Grouping/Banner/IBannerElementProps.d.ts +2 -1
  13. package/Controls/Components/Grouping/Banner/IBannerElementProps.d.ts.map +1 -1
  14. package/Controls/Components/Grouping/Banner/Themes/BannerElement.Cosmopolitan.d.ts.map +1 -1
  15. package/Controls/Components/Grouping/Banner/Themes/BannerElement.Cosmopolitan.js +0 -1
  16. package/Controls/Components/Grouping/Banner/Themes/BannerElement.Cosmopolitan.js.map +1 -1
  17. package/Controls/Components/Grouping/Banner/Themes/BannerElement.Joy.d.ts.map +1 -1
  18. package/Controls/Components/Grouping/Banner/Themes/BannerElement.Joy.js +1 -2
  19. package/Controls/Components/Grouping/Banner/Themes/BannerElement.Joy.js.map +1 -1
  20. package/Controls/Components/Grouping/Banner/Themes/BannerElement.Retro.d.ts.map +1 -1
  21. package/Controls/Components/Grouping/Banner/Themes/BannerElement.Retro.js +0 -1
  22. package/Controls/Components/Grouping/Banner/Themes/BannerElement.Retro.js.map +1 -1
  23. package/Controls/Components/Grouping/BannerGroup/BannerGroupDismissBehavior.d.ts +7 -0
  24. package/Controls/Components/Grouping/BannerGroup/BannerGroupDismissBehavior.d.ts.map +1 -0
  25. package/Controls/Components/Grouping/BannerGroup/BannerGroupDismissBehavior.js +6 -0
  26. package/Controls/Components/Grouping/BannerGroup/BannerGroupDismissBehavior.js.map +1 -0
  27. package/Controls/Components/Grouping/BannerGroup/BannerGroupElement.d.ts +227 -0
  28. package/Controls/Components/Grouping/BannerGroup/BannerGroupElement.d.ts.map +1 -0
  29. package/Controls/Components/Grouping/BannerGroup/BannerGroupElement.js +548 -0
  30. package/Controls/Components/Grouping/BannerGroup/BannerGroupElement.js.map +1 -0
  31. package/Controls/Components/Grouping/BannerGroup/BannerGroupElementTemplate.d.ts +9 -0
  32. package/Controls/Components/Grouping/BannerGroup/BannerGroupElementTemplate.d.ts.map +1 -0
  33. package/Controls/Components/Grouping/BannerGroup/BannerGroupElementTemplate.js +43 -0
  34. package/Controls/Components/Grouping/BannerGroup/BannerGroupElementTemplate.js.map +1 -0
  35. package/Controls/Components/Grouping/BannerGroup/BannerGroupStacking.d.ts +6 -0
  36. package/Controls/Components/Grouping/BannerGroup/BannerGroupStacking.d.ts.map +1 -0
  37. package/Controls/Components/Grouping/BannerGroup/BannerGroupStacking.js +5 -0
  38. package/Controls/Components/Grouping/BannerGroup/BannerGroupStacking.js.map +1 -0
  39. package/Controls/Components/Grouping/BannerGroup/IBannerGroupElementProps.d.ts +36 -0
  40. package/Controls/Components/Grouping/BannerGroup/IBannerGroupElementProps.d.ts.map +1 -0
  41. package/Controls/Components/Grouping/BannerGroup/IBannerGroupElementProps.js +3 -0
  42. package/Controls/Components/Grouping/BannerGroup/IBannerGroupElementProps.js.map +1 -0
  43. package/Controls/Components/Grouping/BannerGroup/Themes/BannerGroupElement.Cosmopolitan.d.ts +6 -0
  44. package/Controls/Components/Grouping/BannerGroup/Themes/BannerGroupElement.Cosmopolitan.d.ts.map +1 -0
  45. package/Controls/Components/Grouping/BannerGroup/Themes/BannerGroupElement.Cosmopolitan.js +179 -0
  46. package/Controls/Components/Grouping/BannerGroup/Themes/BannerGroupElement.Cosmopolitan.js.map +1 -0
  47. package/Controls/Components/Grouping/BannerGroup/Themes/BannerGroupElement.Joy.d.ts +6 -0
  48. package/Controls/Components/Grouping/BannerGroup/Themes/BannerGroupElement.Joy.d.ts.map +1 -0
  49. package/Controls/Components/Grouping/BannerGroup/Themes/BannerGroupElement.Joy.js +179 -0
  50. package/Controls/Components/Grouping/BannerGroup/Themes/BannerGroupElement.Joy.js.map +1 -0
  51. package/Controls/Components/Grouping/BannerGroup/Themes/BannerGroupElement.Retro.d.ts +6 -0
  52. package/Controls/Components/Grouping/BannerGroup/Themes/BannerGroupElement.Retro.d.ts.map +1 -0
  53. package/Controls/Components/Grouping/BannerGroup/Themes/BannerGroupElement.Retro.js +179 -0
  54. package/Controls/Components/Grouping/BannerGroup/Themes/BannerGroupElement.Retro.js.map +1 -0
  55. package/Controls/Components/Layouts/Absolute/AbsoluteElement.d.ts.map +1 -1
  56. package/Controls/Components/Layouts/Absolute/AbsoluteItemElement.d.ts.map +1 -1
  57. package/Controls/Components/States/Empty/EmptyStateElementTemplate.d.ts.map +1 -1
  58. package/Controls/Components/States/Empty/EmptyStateElementTemplate.js +2 -3
  59. package/Controls/Components/States/Empty/EmptyStateElementTemplate.js.map +1 -1
  60. package/Controls/Types/BannerGroupDismissBehavior.d.ts +7 -0
  61. package/Controls/Types/BannerGroupDismissBehavior.d.ts.map +1 -0
  62. package/Controls/Types/BannerGroupDismissBehavior.js +6 -0
  63. package/Controls/Types/BannerGroupDismissBehavior.js.map +1 -0
  64. package/Controls/Types/BannerGroupStacking.d.ts +6 -0
  65. package/Controls/Types/BannerGroupStacking.d.ts.map +1 -0
  66. package/Controls/Types/BannerGroupStacking.js +5 -0
  67. package/Controls/Types/BannerGroupStacking.js.map +1 -0
  68. package/Index.d.ts +3 -0
  69. package/Index.d.ts.map +1 -1
  70. package/Index.js +3 -0
  71. package/Index.js.map +1 -1
  72. package/Routing/PathToRegexp.d.ts +1 -1
  73. package/custom-elements.json +798 -0
  74. package/package.json +3 -3
@@ -0,0 +1,548 @@
1
+ // #region Imports
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ import { Themeable } from '../../../Behaviors/Themeable';
12
+ import { Appearanceable } from '../../../Behaviors/Appearanceable';
13
+ import { Disableable } from '../../../Behaviors/Disableable';
14
+ import { Orientable } from '../../../Behaviors/Orientable';
15
+ import { Slottable } from '../../../Behaviors/Slottable';
16
+ import { Variantable } from '../../../Behaviors/Variantable';
17
+ import { Attribute } from '../../../Decorators/AttributeDecorator';
18
+ import { Component } from '../../../Decorators/ComponentDecorator';
19
+ import { Watch } from '../../../Decorators/WatchDecorator';
20
+ import { CustomElement } from '../../Abstracts/CustomElement';
21
+ import { BannerElement } from '../Banner/BannerElement';
22
+ import { bannerGroupElementTemplate } from './BannerGroupElementTemplate';
23
+ import { bannerGroupElementJoyStyle } from './Themes/BannerGroupElement.Joy';
24
+ import { bannerGroupElementRetroStyle } from './Themes/BannerGroupElement.Retro';
25
+ import { bannerGroupElementCosmopolitanStyle } from './Themes/BannerGroupElement.Cosmopolitan';
26
+ import { Emit } from '../../../../Events/Decorators/EmitDecorator';
27
+ import { HTMLElementEventEmitter } from '@breadstone/mosaik-elements';
28
+ import { KeyboardController } from '../../../Controllers/KeyboardController';
29
+ import { Key } from '../../../Types/Key';
30
+ import { BannerGroupDismissBehavior } from '../../../Types/BannerGroupDismissBehavior';
31
+ import { BannerGroupStacking } from '../../../Types/BannerGroupStacking';
32
+ import { RendererServiceLocator } from '../../../../Dom/Renderer';
33
+ /**
34
+ * BannerGroup - A container component for managing and presenting multiple `Banner` instances.
35
+ *
36
+ * @description
37
+ * The `BannerGroup` component arranges several `<mosaik-banner>` elements either as a stack or a simple paged
38
+ * (carousel‑like) sequence. When `maxLength` equals `1`, only a single banner is shown and keyboard navigation
39
+ * allows users to move between items. When `maxLength` is greater than `1`, banners are presented in a stacked
40
+ * layout. Looping navigation can be enabled via the `loop` property. (Persistence, dismissal strategies and depth
41
+ * stacking enhancements can be incorporated in future iterations.)
42
+ *
43
+ * @name BannerGroup
44
+ * @element mosaik-banner-group
45
+ * @category Notifications
46
+ *
47
+ * @fires change - Fired when the active index changes.
48
+ *
49
+ * @slot - The default slot for banner items.
50
+ * @slot prev - Slot for a custom previous control.
51
+ * @slot next - Slot for a custom next control.
52
+ *
53
+ * @csspart root - The root wrapper part.
54
+ * @csspart viewport - The viewport that contains the banners.
55
+ * @csspart control-prev - The previous control wrapper.
56
+ * @csspart control-next - The next control wrapper.
57
+ *
58
+ * @cssprop {unknown} --banner-group-gap - Gap between stacked banners.
59
+ * @cssprop {unknown} --banner-group-transition-duration - Transition duration for paging.
60
+ *
61
+ * @dependency {BannerElement} - The Banner element.
62
+ *
63
+ * @example
64
+ * ```html
65
+ * <mosaik-banner-group max-visible="1" loop>
66
+ * <mosaik-banner header="Update 1"></mosaik-banner>
67
+ * <mosaik-banner header="Update 2"></mosaik-banner>
68
+ * <mosaik-banner header="Update 3"></mosaik-banner>
69
+ * </mosaik-banner-group>
70
+ * ```
71
+ *
72
+ * @public
73
+ */
74
+ let BannerGroupElement = class BannerGroupElement extends Themeable(Orientable(Disableable(Appearanceable(Variantable(Slottable(CustomElement)))))) {
75
+ // #region Fields
76
+ _change;
77
+ _keyboardController;
78
+ _eventSubscriptions;
79
+ _index;
80
+ _loop;
81
+ _maxLength;
82
+ _dismissBehavior;
83
+ _stacking;
84
+ _reverse;
85
+ _previousIndex;
86
+ // #endregion
87
+ // #region Ctor
88
+ /**
89
+ * @public
90
+ */
91
+ constructor() {
92
+ super();
93
+ this._change = new HTMLElementEventEmitter(this, 'change');
94
+ this._keyboardController = new KeyboardController(this, { capture: true });
95
+ this._eventSubscriptions = [];
96
+ this._index = 0;
97
+ this._loop = false;
98
+ this._maxLength = 5;
99
+ this._dismissBehavior = BannerGroupDismissBehavior.Remove;
100
+ this._stacking = BannerGroupStacking.Vertical;
101
+ this._reverse = false;
102
+ this._previousIndex = 0;
103
+ }
104
+ // #endregion
105
+ // #region Properties
106
+ /**
107
+ * Returns the `{@link is}` property.
108
+ * The `{@link is}` property represents the natural name of this element.
109
+ *
110
+ * @public
111
+ * @static
112
+ * @readonly
113
+ */
114
+ static get is() { return 'mosaik-banner-group'; }
115
+ /**
116
+ * Gets or sets the `index` property representing the current active (start) index.
117
+ *
118
+ * @public
119
+ * @attr
120
+ */
121
+ get index() { return this._index; }
122
+ set index(value) {
123
+ const banners = this.getSlotAssignmentsOf('', BannerElement);
124
+ const clamped = banners.length === 0 ? 0 : Math.max(0, Math.min(value, banners.length - 1));
125
+ if (clamped !== this._index) {
126
+ const prev = this._index;
127
+ this._previousIndex = prev;
128
+ this._index = clamped;
129
+ this.requestUpdate('index');
130
+ this.emitChange(prev);
131
+ }
132
+ }
133
+ /**
134
+ * Gets or sets the `loop` property enabling circular navigation.
135
+ *
136
+ * @public
137
+ * @attr
138
+ */
139
+ get loop() { return this._loop; }
140
+ set loop(value) {
141
+ if (this._loop !== value) {
142
+ this._loop = value;
143
+ this.requestUpdate('loop');
144
+ }
145
+ }
146
+ /**
147
+ * Gets or sets the `maxLength` property (1 = pager/carousel mode).
148
+ *
149
+ * @public
150
+ * @attr
151
+ */
152
+ get maxLength() { return this._maxLength; }
153
+ set maxLength(value) {
154
+ if (this._maxLength !== value) {
155
+ this._maxLength = value;
156
+ this.requestUpdate('maxLength');
157
+ }
158
+ }
159
+ /**
160
+ * Gets or sets the `dismissBehavior` property defining how dismissed banners are handled.
161
+ * (Future extension point.)
162
+ *
163
+ * @public
164
+ * @attr
165
+ */
166
+ get dismissBehavior() { return this._dismissBehavior; }
167
+ set dismissBehavior(value) {
168
+ if (this._dismissBehavior !== value) {
169
+ this._dismissBehavior = value;
170
+ this.requestUpdate('dismissBehavior');
171
+ }
172
+ }
173
+ /**
174
+ * Gets or sets the `stacking` property controlling vertical or depth stacking.
175
+ *
176
+ * @public
177
+ * @attr
178
+ */
179
+ get stacking() { return this._stacking; }
180
+ set stacking(value) {
181
+ if (this._stacking !== value) {
182
+ this._stacking = value;
183
+ this.requestUpdate('stacking');
184
+ }
185
+ }
186
+ /**
187
+ * Gets or sets the `reverse` property displaying newest banners first when true.
188
+ *
189
+ * @public
190
+ * @attr
191
+ */
192
+ get reverse() { return this._reverse; }
193
+ set reverse(value) {
194
+ if (this._reverse !== value) {
195
+ this._reverse = value;
196
+ this.requestUpdate('reverse');
197
+ }
198
+ }
199
+ /**
200
+ * Returns the total number of banners.
201
+ *
202
+ * @public
203
+ * @readonly
204
+ */
205
+ get length() {
206
+ return this.getSlotAssignmentsOf('', BannerElement).length;
207
+ }
208
+ /**
209
+ * Returns whether previous navigation is possible.
210
+ *
211
+ * @public
212
+ * @readonly
213
+ */
214
+ get canPrev() {
215
+ return this.length > 1 && (this.loop || this.index > 0);
216
+ }
217
+ /**
218
+ * Returns whether next navigation is possible.
219
+ *
220
+ * @public
221
+ * @readonly
222
+ */
223
+ get canNext() {
224
+ return this.length > 1 && (this.loop || this.index < this.length - 1);
225
+ }
226
+ /**
227
+ * Fired when the active index changes.
228
+ *
229
+ * @public
230
+ */
231
+ get change() {
232
+ return this._change;
233
+ }
234
+ // #endregion
235
+ // #region Methods
236
+ /**
237
+ * @protected
238
+ * @override
239
+ */
240
+ onSlotChanges() {
241
+ this.clearSubscriptions();
242
+ this.getSlotAssignmentsOf('', BannerElement).forEach((b) => b.classList.add('banner-group-item'));
243
+ this.index = this._index; // clamp to valid range
244
+ this.updateLayout();
245
+ }
246
+ /**
247
+ * @public
248
+ * @override
249
+ */
250
+ connectedCallback() {
251
+ super.connectedCallback();
252
+ this._keyboardController
253
+ .add([Key.LeftArrow, Key.UpArrow], () => this.previous(), () => !this.disabled && this.canPrev, { preventDefault: true })
254
+ .add([Key.RightArrow, Key.DownArrow], () => this.next(), () => !this.disabled && this.canNext, { preventDefault: true })
255
+ .add(Key.Home, () => this.first(), () => !this.disabled && this.length > 0, { preventDefault: true })
256
+ .add(Key.End, () => this.last(), () => !this.disabled && this.length > 0, { preventDefault: true });
257
+ }
258
+ /**
259
+ * Navigates to the previous banner.
260
+ *
261
+ * @public
262
+ */
263
+ previous() {
264
+ this.navigate(-1);
265
+ }
266
+ /**
267
+ * Navigates to the next banner.
268
+ *
269
+ * @public
270
+ */
271
+ next() {
272
+ this.navigate(1);
273
+ }
274
+ /**
275
+ * Navigates to the first banner.
276
+ *
277
+ * @public
278
+ */
279
+ first() {
280
+ this.index = 0;
281
+ }
282
+ /**
283
+ * Navigates to the last banner.
284
+ *
285
+ * @public
286
+ */
287
+ last() {
288
+ this.index = Math.max(0, this.length - 1);
289
+ }
290
+ /**
291
+ * Navigates to a specific index.
292
+ *
293
+ * @public
294
+ */
295
+ goTo(i) {
296
+ this.index = i;
297
+ }
298
+ onIndexPropertyChanged() {
299
+ this.updateLayout();
300
+ }
301
+ onMaxLengthPropertyChanged() {
302
+ this.updateLayout();
303
+ }
304
+ onReversePropertyChanged() {
305
+ this.updateLayout();
306
+ }
307
+ onStackingPropertyChanged() {
308
+ this.updateLayout();
309
+ }
310
+ // @Watch('appearance')
311
+ // protected onAppearancePropertyChanged(_prev?: Appearance, next?: Appearance): void {
312
+ // this.getSlotAssignmentsOf('', BannerElement)
313
+ // .filter((x) => x.appearance !== 'default')
314
+ // .forEach((b) => b.appearance = next ?? this.appearance);
315
+ // }
316
+ // @Watch('variant')
317
+ // protected onVariantPropertyChanged(_prev?: Variant, next?: Variant): void {
318
+ // this.getSlotAssignmentsOf('', BannerElement)
319
+ // .filter((x) => x.variant !== 'default')
320
+ // .forEach((b) => b.variant = next ?? this.variant);
321
+ // }
322
+ onDirPropertyChanged() {
323
+ this.getSlotAssignmentsOf('', BannerElement)
324
+ .forEach((b) => b.dir = this.dir);
325
+ }
326
+ onDisabledPropertyChanged(_prev, next) {
327
+ if (next !== undefined) {
328
+ this.getSlotAssignmentsOf('', BannerElement)
329
+ .forEach((b) => b.disabled = next);
330
+ }
331
+ }
332
+ navigate(delta) {
333
+ if (this.disabled || this.length === 0) {
334
+ return;
335
+ }
336
+ let next = this.index + delta;
337
+ if (this.loop && this.length > 0) {
338
+ next = (next + this.length) % this.length;
339
+ }
340
+ this.index = next;
341
+ }
342
+ emitChange(previousIndex) {
343
+ this._change.emit({
344
+ index: this._index,
345
+ previousIndex,
346
+ length: this.length
347
+ });
348
+ }
349
+ clearSubscriptions() {
350
+ this._eventSubscriptions.forEach((x) => x.dispose());
351
+ this._eventSubscriptions = [];
352
+ }
353
+ /**
354
+ * Updates banner visibility, ordering and (optional) depth stacking transforms.
355
+ *
356
+ * @private
357
+ */
358
+ updateLayout() {
359
+ const banners = this.getSlotAssignmentsOf('', BannerElement);
360
+ if (banners.length === 0) {
361
+ return;
362
+ }
363
+ const maxLength = Math.max(1, this.maxLength);
364
+ const isPager = maxLength === 1;
365
+ const start = this.index;
366
+ const endExclusive = isPager ? start + 1 : Math.min(banners.length, start + maxLength);
367
+ const ordered = this._reverse ? [...banners].reverse() : banners;
368
+ // For depth stacking we need the number of visible banners to compute layering order via CSS vars
369
+ if (!isPager && this._stacking === BannerGroupStacking.Depth) {
370
+ RendererServiceLocator.current.setStyle(this, '--banner-group-visible-count', Math.min(maxLength, banners.length));
371
+ }
372
+ else {
373
+ RendererServiceLocator.current.setStyle(this, '--banner-group-visible-count', '');
374
+ }
375
+ ordered.forEach((banner) => {
376
+ const dataIndex = banners.indexOf(banner);
377
+ // Expose the absolute item index as CSS variable (independent of visibility)
378
+ RendererServiceLocator.current.setStyle(banner, '--banner-group-item-index', dataIndex);
379
+ if (isPager) {
380
+ const isActive = dataIndex === start;
381
+ const wasActive = dataIndex === this._previousIndex;
382
+ // Clear any previous depth offsets in pager mode
383
+ RendererServiceLocator.current.setStyle(banner, '--banner-group-item-depth-offset', '');
384
+ // Ensure banner participates in animation lifecycle
385
+ banner.removeAttribute('hidden');
386
+ banner.removeAttribute('inert');
387
+ banner.toggleAttribute('data-active', isActive);
388
+ if (isActive) {
389
+ banner.setAttribute('aria-hidden', 'false');
390
+ banner.removeAttribute('data-leaving');
391
+ }
392
+ else if (wasActive) {
393
+ // Leaving state: keep visible for transition, then hide after transition end
394
+ banner.setAttribute('data-leaving', 'true');
395
+ banner.setAttribute('aria-hidden', 'true');
396
+ this.attachLeavingTransitionHandler(banner);
397
+ }
398
+ else {
399
+ // Inactive & not part of current transition: hide immediately
400
+ banner.setAttribute('aria-hidden', 'true');
401
+ banner.setAttribute('hidden', '');
402
+ banner.removeAttribute('data-leaving');
403
+ banner.removeAttribute('data-active');
404
+ }
405
+ return; // skip non‑pager logic
406
+ }
407
+ // Non‑pager (stack / depth) logic
408
+ const visible = dataIndex >= start && dataIndex < endExclusive;
409
+ banner.toggleAttribute('hidden', !visible);
410
+ if (!visible) {
411
+ banner.setAttribute('aria-hidden', 'true');
412
+ banner.setAttribute('inert', '');
413
+ banner.removeAttribute('data-active');
414
+ RendererServiceLocator.current.setStyle(banner, '--banner-group-item-depth-offset', '');
415
+ }
416
+ else {
417
+ banner.setAttribute('aria-hidden', 'false');
418
+ banner.removeAttribute('inert');
419
+ const offset = dataIndex - start;
420
+ if (this._stacking === BannerGroupStacking.Depth) {
421
+ RendererServiceLocator.current.setStyle(banner, '--banner-group-item-depth-offset', offset);
422
+ }
423
+ else {
424
+ RendererServiceLocator.current.setStyle(banner, '--banner-group-item-depth-offset', 0);
425
+ }
426
+ if (offset === 0) {
427
+ banner.setAttribute('data-active', 'true');
428
+ }
429
+ else {
430
+ banner.removeAttribute('data-active');
431
+ }
432
+ }
433
+ });
434
+ }
435
+ /**
436
+ * Attaches a one‑time transition end handler to a leaving banner (pager mode) to finalize its hidden state.
437
+ * @private
438
+ */
439
+ attachLeavingTransitionHandler(banner) {
440
+ const handler = (ev) => {
441
+ if (ev.target !== banner) {
442
+ return;
443
+ }
444
+ banner.setAttribute('hidden', '');
445
+ banner.removeAttribute('data-leaving');
446
+ banner.removeEventListener('transitionend', handler);
447
+ banner.removeEventListener('animationend', handler);
448
+ };
449
+ // Re-attach (idempotent) by removing prior handlers first
450
+ banner.removeEventListener('transitionend', handler);
451
+ banner.removeEventListener('animationend', handler);
452
+ banner.addEventListener('transitionend', handler, { once: true });
453
+ banner.addEventListener('animationend', handler, { once: true });
454
+ }
455
+ };
456
+ __decorate([
457
+ Attribute({ type: Number }),
458
+ __metadata("design:type", Number),
459
+ __metadata("design:paramtypes", [Number])
460
+ ], BannerGroupElement.prototype, "index", null);
461
+ __decorate([
462
+ Attribute({
463
+ type: Boolean,
464
+ useDefault: true
465
+ }),
466
+ __metadata("design:type", Boolean),
467
+ __metadata("design:paramtypes", [Boolean])
468
+ ], BannerGroupElement.prototype, "loop", null);
469
+ __decorate([
470
+ Attribute({ type: Number }),
471
+ __metadata("design:type", Number),
472
+ __metadata("design:paramtypes", [Number])
473
+ ], BannerGroupElement.prototype, "maxLength", null);
474
+ __decorate([
475
+ Attribute({ type: String }),
476
+ __metadata("design:type", String),
477
+ __metadata("design:paramtypes", [String])
478
+ ], BannerGroupElement.prototype, "dismissBehavior", null);
479
+ __decorate([
480
+ Attribute({ type: String }),
481
+ __metadata("design:type", String),
482
+ __metadata("design:paramtypes", [String])
483
+ ], BannerGroupElement.prototype, "stacking", null);
484
+ __decorate([
485
+ Attribute({
486
+ type: Boolean,
487
+ useDefault: true
488
+ }),
489
+ __metadata("design:type", Boolean),
490
+ __metadata("design:paramtypes", [Boolean])
491
+ ], BannerGroupElement.prototype, "reverse", null);
492
+ __decorate([
493
+ Emit({ eventName: 'change' }),
494
+ __metadata("design:type", Object),
495
+ __metadata("design:paramtypes", [])
496
+ ], BannerGroupElement.prototype, "change", null);
497
+ __decorate([
498
+ Watch('index'),
499
+ __metadata("design:type", Function),
500
+ __metadata("design:paramtypes", []),
501
+ __metadata("design:returntype", void 0)
502
+ ], BannerGroupElement.prototype, "onIndexPropertyChanged", null);
503
+ __decorate([
504
+ Watch('maxLength'),
505
+ __metadata("design:type", Function),
506
+ __metadata("design:paramtypes", []),
507
+ __metadata("design:returntype", void 0)
508
+ ], BannerGroupElement.prototype, "onMaxLengthPropertyChanged", null);
509
+ __decorate([
510
+ Watch('reverse'),
511
+ __metadata("design:type", Function),
512
+ __metadata("design:paramtypes", []),
513
+ __metadata("design:returntype", void 0)
514
+ ], BannerGroupElement.prototype, "onReversePropertyChanged", null);
515
+ __decorate([
516
+ Watch('stacking'),
517
+ __metadata("design:type", Function),
518
+ __metadata("design:paramtypes", []),
519
+ __metadata("design:returntype", void 0)
520
+ ], BannerGroupElement.prototype, "onStackingPropertyChanged", null);
521
+ __decorate([
522
+ Watch('dir'),
523
+ __metadata("design:type", Function),
524
+ __metadata("design:paramtypes", []),
525
+ __metadata("design:returntype", void 0)
526
+ ], BannerGroupElement.prototype, "onDirPropertyChanged", null);
527
+ __decorate([
528
+ Watch('disabled'),
529
+ __metadata("design:type", Function),
530
+ __metadata("design:paramtypes", [Boolean, Boolean]),
531
+ __metadata("design:returntype", void 0)
532
+ ], BannerGroupElement.prototype, "onDisabledPropertyChanged", null);
533
+ BannerGroupElement = __decorate([
534
+ Component({
535
+ selector: 'mosaik-banner-group',
536
+ template: bannerGroupElementTemplate,
537
+ themes: {
538
+ joy: bannerGroupElementJoyStyle,
539
+ retro: bannerGroupElementRetroStyle,
540
+ cosmopolitan: bannerGroupElementCosmopolitanStyle
541
+ },
542
+ host: { role: 'region' },
543
+ imports: [BannerElement]
544
+ }),
545
+ __metadata("design:paramtypes", [])
546
+ ], BannerGroupElement);
547
+ export { BannerGroupElement };
548
+ //# sourceMappingURL=BannerGroupElement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerGroupElement.js","sourceRoot":"","sources":["../../../../../src/Controls/Components/Grouping/BannerGroup/BannerGroupElement.ts"],"names":[],"mappings":"AAAA,kBAAkB;;;;;;;;;;AAElB,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAmB,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,oCAAoC,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,mCAAmC,EAAE,MAAM,0CAA0C,CAAC;AAC/F,OAAO,EAAE,IAAI,EAAE,MAAM,6CAA6C,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAA0E,MAAM,6BAA6B,CAAC;AAC9I,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,C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kDACyC;AAcrE;IAAC,SAAS,CAAC;QACP,IAAI,EAAE,OAAO;QACb,UAAU,EAAE,IAAI;KACnB,CAAC;;;iDACqD;AA2CvD;IAAC,IAAI,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;;;gDAG7B;AA0ES;IADT,KAAK,CAAC,OAAO,CAAC;;;;gEAGd;AAGS;IADT,KAAK,CAAC,WAAW,CAAC;;;;oEAGlB;AAGS;IADT,KAAK,CAAC,SAAS,CAAC;;;;kEAGhB;AAGS;IADT,KAAK,CAAC,UAAU,CAAC;;;;mEAGjB;AAiBS;IADT,KAAK,CAAC,KAAK,CAAC;;;;8DAIZ;AAGS;IADT,KAAK,CAAC,UAAU,CAAC;;;;mEAMjB;AArTQ,kBAAkB;IAZ9B,SAAS,CAAC;QACP,QAAQ,EAAE,qBAAqB;QAC/B,QAAQ,EAAE,0BAA0B;QACpC,MAAM,EAAE;YACJ,GAAG,EAAE,0BAA0B;YAC/B,KAAK,EAAE,4BAA4B;YACnC,YAAY,EAAE,mCAAmC;SACpD;QACD,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACxB,OAAO,EAAE,CAAC,aAAa,CAAC;KAC3B,CAAC;;GAEW,kBAAkB,CAsb9B"}
@@ -0,0 +1,9 @@
1
+ import { type TemplateResult } from '../../../../Dom/Html';
2
+ import type { BannerGroupElement } from './BannerGroupElement';
3
+ /**
4
+ * The template of the {@link BannerGroupElement}.
5
+ *
6
+ * @public
7
+ */
8
+ export declare function bannerGroupElementTemplate<T extends BannerGroupElement>(e: T): TemplateResult;
9
+ //# sourceMappingURL=BannerGroupElementTemplate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerGroupElementTemplate.d.ts","sourceRoot":"","sources":["../../../../../src/Controls/Components/Grouping/BannerGroup/BannerGroupElementTemplate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAQ,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAI/D;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,kBAAkB,EAAE,CAAC,EAAE,CAAC,GAAG,cAAc,CAiC7F"}
@@ -0,0 +1,43 @@
1
+ // #region Imports
2
+ import { html } from '../../../../Dom/Html';
3
+ import { when } from '../../../Directives/Directives';
4
+ // #endregion
5
+ /**
6
+ * The template of the {@link BannerGroupElement}.
7
+ *
8
+ * @public
9
+ */
10
+ export function bannerGroupElementTemplate(e) {
11
+ // Using public API instead of private collection access
12
+ const length = e.length;
13
+ const isPager = e.maxLength === 1;
14
+ return html `
15
+ <div part="root"
16
+ role="region"
17
+ aria-roledescription="${isPager ? 'carousel' : 'stack'}"
18
+ tabindex="0">
19
+ <div part="viewport" class="viewport ${e.orientation}">
20
+ <slot></slot>
21
+ </div>
22
+ ${when(isPager && length > 1, () => html `
23
+ <div part="control-prev" class="controls prev">
24
+ <slot name="prev">
25
+ <button type="button"
26
+ ?disabled="${e.disabled || !e.canPrev}"
27
+ aria-label="Previous banner"
28
+ @click="${() => e.previous()}">◀</button>
29
+ </slot>
30
+ </div>
31
+ <div part="control-next" class="controls next">
32
+ <slot name="next">
33
+ <button type="button"
34
+ ?disabled="${e.disabled || !e.canNext}"
35
+ aria-label="Next banner"
36
+ @click="${() => e.next()}">▶</button>
37
+ </slot>
38
+ </div>
39
+ `)}
40
+ </div>
41
+ `;
42
+ }
43
+ //# sourceMappingURL=BannerGroupElementTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerGroupElementTemplate.js","sourceRoot":"","sources":["../../../../../src/Controls/Components/Grouping/BannerGroup/BannerGroupElementTemplate.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAElB,OAAO,EAAE,IAAI,EAAuB,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AAGtD,aAAa;AAEb;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAA+B,CAAI;IACzE,wDAAwD;IACxD,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACxB,MAAM,OAAO,GAAG,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC;IAElC,OAAO,IAAI,CAAA;;;iCAGkB,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO;;mDAEZ,CAAC,CAAC,WAAW;;;cAGlD,IAAI,CAAC,OAAO,IAAI,MAAM,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;;yCAIX,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC,OAAO;;sCAE3B,GAAG,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;;;;;;yCAMf,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC,OAAO;;sCAE3B,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE;;;aAGvC,CAAC;;KAET,CAAC;AACN,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const BannerGroupStacking: {
2
+ readonly Vertical: "vertical";
3
+ readonly Depth: "depth";
4
+ };
5
+ export type BannerGroupStacking = typeof BannerGroupStacking[keyof typeof BannerGroupStacking];
6
+ //# sourceMappingURL=BannerGroupStacking.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerGroupStacking.d.ts","sourceRoot":"","sources":["../../../../../src/Controls/Components/Grouping/BannerGroup/BannerGroupStacking.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,mBAAmB;;;CAGtB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export const BannerGroupStacking = {
2
+ Vertical: 'vertical',
3
+ Depth: 'depth'
4
+ };
5
+ //# sourceMappingURL=BannerGroupStacking.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerGroupStacking.js","sourceRoot":"","sources":["../../../../../src/Controls/Components/Grouping/BannerGroup/BannerGroupStacking.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAC/B,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;CACR,CAAC"}