@scrippsproduct/networks-ui-library 1.0.23 → 1.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/dist/{Form.module-DbpB9u1l.mjs → Form.module-Cd8qH2rj.mjs} +1 -1
  2. package/dist/{ResultsTable.module-nTlGw9Lh.mjs → ResultsTable.module-B7M9y7hd.mjs} +1 -5
  3. package/dist/_commonjsHelpers-C6fGbg64.mjs +6 -0
  4. package/dist/{add-FrnMPwwO.mjs → add-UWUc_nrO.mjs} +2 -2
  5. package/dist/{addMonths-BDf46gmB.mjs → addMonths-FatsTLmU.mjs} +1 -1
  6. package/dist/assets/ActionButton.css +1 -1
  7. package/dist/assets/AdBlock.css +1 -1
  8. package/dist/assets/CarouselSlide.css +1 -1
  9. package/dist/assets/ChannelSearch.css +1 -1
  10. package/dist/assets/DateNavigation.css +1 -1
  11. package/dist/assets/DatePicker.css +1 -1
  12. package/dist/assets/DeviceAndPlatformLists.css +1 -1
  13. package/dist/assets/EqualSizeFlexRow.css +1 -1
  14. package/dist/assets/EqualSizeGrid.css +1 -1
  15. package/dist/assets/FeaturedList.css +1 -1
  16. package/dist/assets/Figure.css +1 -1
  17. package/dist/assets/FindUs.css +1 -1
  18. package/dist/assets/Form.css +1 -1
  19. package/dist/assets/GridList.css +1 -1
  20. package/dist/assets/IONShowHero.css +1 -1
  21. package/dist/assets/ImageCard.css +1 -1
  22. package/dist/assets/LogoListItem.css +1 -1
  23. package/dist/assets/ModalContainer.css +1 -1
  24. package/dist/assets/PageHero.css +1 -1
  25. package/dist/assets/ProgramAirdate.css +1 -1
  26. package/dist/assets/PromotionBlock.css +1 -1
  27. package/dist/assets/ResultsTable.css +1 -1
  28. package/dist/{chevron-left-DmvQntvu.mjs → chevron-left-DRvpaLmK.mjs} +1 -1
  29. package/dist/{chevron-right-CaAz6ISN.mjs → chevron-right-C8yCnmfx.mjs} +1 -1
  30. package/dist/components/ActionButton/ActionButton.d.ts +20 -1
  31. package/dist/components/ActionButton/ActionButton.js +36 -36
  32. package/dist/components/ActionButton/index.d.ts +2 -1
  33. package/dist/components/AirDateFormatter/AirDateFormatter.js +3 -3
  34. package/dist/components/BasicGridModule/BasicGridModule.js +25 -25
  35. package/dist/components/Carousel/Carousel.d.ts +7 -24
  36. package/dist/components/Carousel/Carousel.js +109 -109
  37. package/dist/components/Carousel/CarouselUtils.class.d.ts +16 -28
  38. package/dist/components/Carousel/CarouselUtils.class.js +85 -55
  39. package/dist/components/CarouselSlide/CarouselSlide.d.ts +8 -6
  40. package/dist/components/CarouselSlide/CarouselSlide.js +90 -26
  41. package/dist/components/CarouselSlide/index.d.ts +2 -1
  42. package/dist/components/CarouselSlide/slide-layouts/Empty/Empty.d.ts +1 -1
  43. package/dist/components/CarouselSlide/slide-layouts/Empty/Empty.js +3 -4
  44. package/dist/components/CarouselSlide/slide-layouts/Empty/index.d.ts +2 -1
  45. package/dist/components/CarouselSlide/slide-layouts/Figure/Figure.d.ts +2 -2
  46. package/dist/components/CarouselSlide/slide-layouts/Figure/Figure.js +10 -11
  47. package/dist/components/CarouselSlide/slide-layouts/Figure/index.d.ts +2 -1
  48. package/dist/components/CarouselSlide/slide-layouts/Text/TextSlide.d.ts +2 -2
  49. package/dist/components/CarouselSlide/slide-layouts/Text/TextSlide.js +9 -10
  50. package/dist/components/CarouselSlide/slide-layouts/Text/index.d.ts +2 -1
  51. package/dist/components/CarouselSlide/slide-layouts/TwoColumn/TwoColumnSlide.js +1 -1
  52. package/dist/components/CastInfoLayout/CastInfoLayout.js +1 -1
  53. package/dist/components/ChannelSearch/ChannelSearch.js +12 -12
  54. package/dist/components/Concat/Concat.js +1 -1
  55. package/dist/components/CtaBlock/CtaBlock.js +2 -2
  56. package/dist/components/CustomDataList/CustomDataList.js +44 -47
  57. package/dist/components/CustomSelect/CustomSelect.js +5 -5
  58. package/dist/components/DateNavigation/DateNavigation.js +7 -8
  59. package/dist/components/DatePicker/DatePicker.js +2527 -2452
  60. package/dist/components/DeviceAndPlatformLists/DeviceAndPlatformLists.js +1 -1
  61. package/dist/components/DrawerNavigation/DrawerNavigation.js +27 -29
  62. package/dist/components/ErrorHandler/ErrorHandler.js +1 -1
  63. package/dist/components/FeaturedList/FeaturedList.js +7 -7
  64. package/dist/components/Figure/Figure.js +1 -1
  65. package/dist/components/FindUs/FindUs.js +6 -6
  66. package/dist/components/GenericList/GenericList.js +1 -1
  67. package/dist/components/GetAirdateWrapper/GetAirdateWrapper.js +6 -6
  68. package/dist/components/ImageCard/ImageCard.js +6 -6
  69. package/dist/components/ImageCard/ImageCardCore.js +1 -1
  70. package/dist/components/InfoPanel/InfoPanel.js +15 -16
  71. package/dist/components/InlineNavigation/InlineNavigation.js +6 -7
  72. package/dist/components/Input/Input.js +1 -1
  73. package/dist/components/InstructionsList/InstructionsList.js +1 -1
  74. package/dist/components/Loading/Loading.js +5 -8
  75. package/dist/components/ModalContainer/ModalContainer.js +41 -44
  76. package/dist/components/Overlay/Overlay.js +17 -20
  77. package/dist/components/PageHero/page-hero-layouts/IONShow/IONShowHero.js +1 -1
  78. package/dist/components/ProgramAirdate/ProgramAirdate.js +9 -9
  79. package/dist/components/PromotionBlock/PromotionBlock.js +15 -17
  80. package/dist/components/PromotionsRowModule/PromotionsRowModule.js +8 -8
  81. package/dist/components/ResultsTable/ResultsTable.js +7 -7
  82. package/dist/components/ResultsTableBody/ResultsTableBody.js +1 -1
  83. package/dist/components/ResultsTableHeader/ResultsTableHeader.js +1 -1
  84. package/dist/components/ScheduleLayout/ScheduleLayout.js +2 -2
  85. package/dist/components/ScheduleList/ScheduleList.js +17 -17
  86. package/dist/components/ScheduleList/schedule-list-items/MovieItem.js +10 -10
  87. package/dist/components/ScheduleList/schedule-list-items/SeriesItem.js +8 -8
  88. package/dist/components/ScheduleList/schedule-list-items/SportsItem.js +8 -8
  89. package/dist/components/SectionedContent/SectionedContent.js +13 -16
  90. package/dist/components/Select/Select.js +1 -1
  91. package/dist/components/ShowAboutContent/ShowAboutContent.js +1 -1
  92. package/dist/components/ShowAboutLayout/ShowAboutLayout.js +24 -25
  93. package/dist/components/SocialLinks/SocialLinks.js +3 -3
  94. package/dist/components/SocialShareBlock/SocialShareBlock.js +8 -8
  95. package/dist/components/StringList/StringList.js +1 -1
  96. package/dist/components/TabContent/TabContent.js +1 -1
  97. package/dist/components/TextArea/TextArea.js +1 -1
  98. package/dist/components/UpcomingList/UpcomingList.js +8 -8
  99. package/dist/containers/NowPlayingContainer.js +10 -10
  100. package/dist/{facebook-osmzgL7R.mjs → facebook-HCcA1M1m.mjs} +1 -1
  101. package/dist/{format-plq8pBNY.mjs → format-YhWt2D8M.mjs} +78 -12
  102. package/dist/hooks/useGetSchedule.js +3 -3
  103. package/dist/hooks/useGetUpcoming.js +2 -2
  104. package/dist/{index-C8O1hjfH.mjs → index-0wieGV50.mjs} +0 -1
  105. package/dist/{index-DC7FmJPK.mjs → index-C-kn9Zhn.mjs} +7134 -7069
  106. package/dist/{index-CZzwT3Oj.mjs → index-DC2JJV3a.mjs} +246 -241
  107. package/dist/index-VjANCDXC.mjs +1873 -0
  108. package/dist/settings.d.ts +4 -3
  109. package/dist/{sub-CkNH5u-l.mjs → sub-CoUmnfhv.mjs} +2 -2
  110. package/dist/{subMonths-nbU1oDhB.mjs → subMonths-BtMU5A9u.mjs} +1 -1
  111. package/dist/{triangle-D0AHL9lB.mjs → triangle-PcCcGXjr.mjs} +1 -1
  112. package/dist/types.d.js +27 -0
  113. package/dist/utils/analytics.js +434 -423
  114. package/dist/utils/date-helpers.js +4 -4
  115. package/dist/utils/getFeaturedList.js +3 -3
  116. package/dist/utils/getOnNowProgram.js +3 -3
  117. package/dist/utils/getUpcomingPrograms.js +2 -2
  118. package/dist/{x-D8_C2o-U.mjs → x-C-QzJ-qD.mjs} +1 -1
  119. package/package.json +27 -24
  120. package/dist/_commonjsHelpers-DaMA6jEr.mjs +0 -8
  121. package/dist/components/CarouselSlide/slide-layouts/Figure/Figure.stories.d.ts +0 -34
  122. package/dist/components/CarouselSlide/slide-layouts/Figure/Figure.stories.js +0 -105
  123. package/dist/components/CarouselSlide/slide-layouts/Text/TextSlide.stories.d.ts +0 -19
  124. package/dist/components/CarouselSlide/slide-layouts/Text/TextSlide.stories.js +0 -35
  125. package/dist/index-B0ARwqly.mjs +0 -1818
  126. /package/dist/{networks-ui.d.ts → secl-ui.d.ts} +0 -0
@@ -1,34 +1,24 @@
1
+ import { CarouselCell, CarouselOptions, CarouselNavBtnEls, CarouselUtilsConstructorParams } from '../../types';
1
2
  export default class CarouselUtils {
2
- constructor({ carouselEl, scrollerEl, paginationEl, slides, navBtnEls, options }: {
3
- carouselEl: any;
4
- scrollerEl: any;
5
- paginationEl: any;
6
- slides: any;
7
- navBtnEls?: {
8
- next: {};
9
- previous: {};
10
- } | undefined;
11
- options: any;
12
- });
13
- carouselEl: any;
14
- scrollerEl: any;
15
- paginationEl: any;
16
- slides: any;
3
+ #private;
4
+ carouselEl: HTMLElement;
5
+ scrollerEl: HTMLElement;
6
+ paginationEl: HTMLElement;
7
+ cells: CarouselCell[];
17
8
  currentIndex: number;
18
- slideEls: any[];
19
- navBtnEls: {
20
- next: {};
21
- previous: {};
22
- };
23
- currentIntersecting: {};
24
- options: any;
25
- timer: NodeJS.Timeout | null;
26
- timerInterval: any;
27
- slideGutterSize: any;
28
- showPagination: any;
9
+ slideEls: HTMLElement[];
10
+ navBtnEls: CarouselNavBtnEls;
11
+ currentIntersecting: IntersectionObserverEntry | Record<string, never>;
12
+ options: CarouselOptions;
13
+ timer: NodeJS.Timeout | null | undefined;
14
+ timerInterval: number | undefined;
15
+ slideGutterSize: number;
16
+ showPagination: boolean | undefined;
29
17
  isInitialScroll: boolean;
30
18
  totalSlideEls: number;
31
19
  totalSlides: number;
20
+ carouselObserver: IntersectionObserver | undefined;
21
+ constructor({ carouselEl, scrollerEl, paginationEl, cells, navBtnEls, options, }: CarouselUtilsConstructorParams);
32
22
  /**
33
23
  * starts the autoplay timer
34
24
  */
@@ -63,6 +53,4 @@ export default class CarouselUtils {
63
53
  * @returns void
64
54
  */
65
55
  handleScrollEnd(): void;
66
- carouselObserver: IntersectionObserver | undefined;
67
- #private;
68
56
  }
@@ -1,53 +1,82 @@
1
- var g = (r) => {
2
- throw TypeError(r);
1
+ var L = Object.defineProperty;
2
+ var b = (i) => {
3
+ throw TypeError(i);
3
4
  };
4
- var L = (r, t, e) => t.has(r) || g("Cannot " + e);
5
- var b = (r, t, e) => t.has(r) ? g("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, e);
6
- var i = (r, t, e) => (L(r, t, "access private method"), e);
7
- let u = /* @__PURE__ */ new WeakMap();
8
- const B = new Event("scrollend"), p = /* @__PURE__ */ new Set();
9
- function o(r, t, e) {
10
- let l = r[t];
11
- r[t] = function() {
12
- let a = Array.prototype.slice.apply(arguments, [0]);
13
- l.apply(this, a), a.unshift(l), e.apply(this, a);
5
+ var z = (i, t, e) => t in i ? L(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
6
+ var l = (i, t, e) => z(i, typeof t != "symbol" ? t + "" : t, e), O = (i, t, e) => t.has(i) || b("Cannot " + e);
7
+ var x = (i, t, e) => t.has(i) ? b("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, e);
8
+ var r = (i, t, e) => (O(i, t, "access private method"), e);
9
+ let f = /* @__PURE__ */ new WeakMap();
10
+ const P = new Event("scrollend"), I = /* @__PURE__ */ new Set();
11
+ function h(i, t, e) {
12
+ let n = i[t];
13
+ i[t] = function() {
14
+ let c = Array.prototype.slice.apply(arguments, [0]);
15
+ n.apply(this, c), c.unshift(n), e.apply(this, c);
14
16
  };
15
17
  }
16
- function E(r, t) {
18
+ function m(i, t) {
17
19
  if (t !== "scroll" && t !== "scrollend")
18
20
  return;
19
- let e = u.get(this);
21
+ let e = f.get(this);
20
22
  if (e === void 0) {
21
- let l = 0;
23
+ let n = 0;
22
24
  e = {
23
25
  scrollListener: () => {
24
- clearTimeout(l), l = setTimeout(() => {
25
- p.size ? setTimeout(e.scrollListener, 100) : (this.dispatchEvent(B), l = 0);
26
+ clearTimeout(n), n = setTimeout(() => {
27
+ I.size ? setTimeout(e.scrollListener, 100) : (this.dispatchEvent(P), n = 0);
26
28
  }, 100);
27
29
  },
28
30
  listeners: 0
29
31
  // Count of number of listeners.
30
- }, r.apply(this, ["scroll", e.scrollListener]), u.set(this, e);
32
+ }, i.apply(this, ["scroll", e.scrollListener]), f.set(this, e);
31
33
  }
32
34
  e.listeners++;
33
35
  }
34
- function m(r, t) {
36
+ function p(i, t) {
35
37
  if (t !== "scroll" && t !== "scrollend") return;
36
- let e = u.get(this);
37
- e !== void 0 && (e[t]--, !(--e.listeners > 0) && (r.apply(this, ["scroll", e.scrollListener]), u.delete(this)));
38
+ let e = f.get(this);
39
+ e !== void 0 && (e[t]--, !(--e.listeners > 0) && (i.apply(this, ["scroll", e.scrollListener]), f.delete(this)));
38
40
  }
39
- const z = "onscrollend" in window;
40
- var s, d, x, A, w, h, c, y, I, T;
41
- class P {
42
- constructor({ carouselEl: t, scrollerEl: e, paginationEl: l, slides: a, navBtnEls: S = { next: {}, previous: {} }, options: n }) {
43
- b(this, s);
44
- z || (document.addEventListener("touchstart", (f) => {
45
- for (let v of f.changedTouches)
46
- p.add(v.identifier);
47
- }, { passive: !0 }), document.addEventListener("touchend", (f) => {
48
- for (let v of f.changedTouches)
49
- p.delete(v.identifier);
50
- }, { passive: !0 }), o(Element.prototype, "addEventListener", E), o(window, "addEventListener", E), o(document, "addEventListener", E), o(Element.prototype, "removeEventListener", m), o(window, "removeEventListener", m), o(document, "removeEventListener", m)), this.carouselEl = t, this.scrollerEl = e, this.paginationEl = l, this.slides = a, this.currentIndex = 0, this.slideEls = [...e.children], this.navBtnEls = S, this.currentIntersecting = {}, this.options = n, n.autoplay && (this.timer = null, this.timerInterval = (n == null ? void 0 : n.delay) ?? 3500, this.startTimer()), this.slideGutterSize = (n == null ? void 0 : n.slideGutterSize) ?? 25, this.showPagination = n == null ? void 0 : n.showPagination, this.isInitialScroll = !0, this.totalSlideEls = this.slideEls.length, this.totalSlides = Math.ceil(this.slides.length / this.options.cellsPerSlide), i(this, s, x).call(this), i(this, s, w).call(this), i(this, s, A).call(this);
41
+ const G = "onscrollend" in window;
42
+ var s, u, w, A, S, a, d, y, g, T;
43
+ class M {
44
+ constructor({
45
+ carouselEl: t,
46
+ scrollerEl: e,
47
+ paginationEl: n,
48
+ cells: c,
49
+ navBtnEls: B = {
50
+ next: {},
51
+ previous: {}
52
+ },
53
+ options: o
54
+ }) {
55
+ x(this, s);
56
+ l(this, "carouselEl");
57
+ l(this, "scrollerEl");
58
+ l(this, "paginationEl");
59
+ l(this, "cells");
60
+ l(this, "currentIndex");
61
+ l(this, "slideEls");
62
+ l(this, "navBtnEls");
63
+ l(this, "currentIntersecting");
64
+ l(this, "options");
65
+ l(this, "timer");
66
+ l(this, "timerInterval");
67
+ l(this, "slideGutterSize");
68
+ l(this, "showPagination");
69
+ l(this, "isInitialScroll");
70
+ l(this, "totalSlideEls");
71
+ l(this, "totalSlides");
72
+ l(this, "carouselObserver");
73
+ G || (document.addEventListener("touchstart", (v) => {
74
+ for (let E of v.changedTouches)
75
+ I.add(E.identifier);
76
+ }, { passive: !0 }), document.addEventListener("touchend", (v) => {
77
+ for (let E of v.changedTouches)
78
+ I.delete(E.identifier);
79
+ }, { passive: !0 }), h(Element.prototype, "addEventListener", m), h(window, "addEventListener", m), h(document, "addEventListener", m), h(Element.prototype, "removeEventListener", p), h(window, "removeEventListener", p), h(document, "removeEventListener", p)), this.carouselEl = t, this.scrollerEl = e, this.paginationEl = n, this.currentIndex = 0, this.navBtnEls = B, this.currentIntersecting = {}, this.options = o, o.autoplay && (this.timer = null, this.timerInterval = (o == null ? void 0 : o.delay) ?? 3500, this.startTimer()), this.slideGutterSize = (o == null ? void 0 : o.slideGutterSize) ?? 25, this.showPagination = o == null ? void 0 : o.showPagination, this.isInitialScroll = !0, this.cells = c, this.slideEls = [...e.children], this.totalSlideEls = this.slideEls.length, this.totalSlides = Math.ceil(this.cells.length / (this.options.cellsPerSlide ?? 1)), r(this, s, w).call(this), r(this, s, S).call(this), r(this, s, A).call(this);
51
80
  }
52
81
  /**
53
82
  * starts the autoplay timer
@@ -61,7 +90,7 @@ class P {
61
90
  * clears the autoplay timer
62
91
  */
63
92
  clearTimer() {
64
- clearInterval(this.timer), this.timer = null;
93
+ this.timer && clearInterval(this.timer), this.timer = null;
65
94
  }
66
95
  /**
67
96
  * checks to see if the scroller is moving to the
@@ -71,7 +100,7 @@ class P {
71
100
  * @param {number} dir - a number representing the direction of scroll 1 for forward, -1 for backward
72
101
  */
73
102
  determineScrollAction(t) {
74
- this.options.autoplay && this.timer !== null && this.clearTimer(), t === 1 ? this.currentIndex === this.totalSlides - 1 ? this.options.wrapAround && (this.scrollerEl.style.scrollBehavior = "auto", this.scrollerEl.scrollTo(0, 0), i(this, s, h).call(this, t), this.currentIndex = 0) : (i(this, s, h).call(this, t), this.currentIndex += 1) : t === -1 && (this.currentIndex === 0 ? this.options.wrapAround && (this.scrollerEl.style.scrollBehavior = "auto", this.scrollerEl.scrollTo(99999, 0), this.currentIndex = this.totalSlides - 1, i(this, s, h).call(this, t)) : (i(this, s, h).call(this, t), this.currentIndex -= 1)), this.options.autoplay && this.timer === null && this.startTimer();
103
+ this.options.autoplay && this.timer !== null && this.clearTimer(), t === 1 ? this.currentIndex === this.totalSlides - 1 ? this.options.wrapAround && (this.scrollerEl.style.scrollBehavior = "auto", this.scrollerEl.scrollTo(0, 0), r(this, s, a).call(this, t), this.currentIndex = 0) : (r(this, s, a).call(this, t), this.currentIndex += 1) : t === -1 && (this.currentIndex === 0 ? this.options.wrapAround && (this.scrollerEl.style.scrollBehavior = "auto", this.scrollerEl.scrollTo(99999, 0), this.currentIndex = this.totalSlides - 1, r(this, s, a).call(this, t)) : (r(this, s, a).call(this, t), this.currentIndex -= 1)), this.options.autoplay && this.timer === null && this.startTimer();
75
104
  }
76
105
  /**
77
106
  * Navigates the carousel to a specific index
@@ -82,8 +111,8 @@ class P {
82
111
  navigateToIndex(t) {
83
112
  if (t === this.currentIndex) return;
84
113
  this.options.autoplay && this.clearTimer();
85
- let e = t > this.currentIndex ? t - this.currentIndex : this.currentIndex - t, l = t > this.currentIndex ? 1 : -1;
86
- this.currentIndex = t, i(this, s, h).call(this, l, e), this.options.autoplay && this.startTimer(), i(this, s, c).call(this);
114
+ let e = t > this.currentIndex ? t - this.currentIndex : this.currentIndex - t, n = t > this.currentIndex ? 1 : -1;
115
+ this.currentIndex = t, r(this, s, a).call(this, n, e), this.options.autoplay && this.startTimer(), r(this, s, d).call(this);
87
116
  }
88
117
  /**
89
118
  * Returns the current index of the carousel
@@ -99,28 +128,28 @@ class P {
99
128
  */
100
129
  handleScrollEnd() {
101
130
  if (this.timer === null && this.options.autoplay && this.startTimer(), this.currentIntersecting.target) {
102
- const t = Number.parseInt(this.currentIntersecting.target.getAttribute("data-index"), 10);
131
+ const t = Number.parseInt(this.currentIntersecting.target.getAttribute("data-index") ?? "0", 10);
103
132
  if (!this.options.wrapAround) {
104
- this.currentIndex = t, i(this, s, c).call(this);
133
+ this.currentIndex = t, r(this, s, d).call(this);
105
134
  return;
106
135
  }
107
- t === 0 ? (this.currentIndex = this.slides.length - 1, i(this, s, d).call(this, { scrollport: this.scrollerEl, element: this.slideEls[this.totalSlides] })) : t === this.totalSlideEls - 1 ? (this.currentIndex = 0, i(this, s, d).call(this, { scrollport: this.scrollerEl, element: this.slideEls[1] })) : this.currentIndex = t - 1;
136
+ t === 0 ? (this.currentIndex = this.totalSlides - 1, r(this, s, u).call(this, { scrollport: this.scrollerEl, element: this.slideEls[this.totalSlides] })) : t === this.totalSlideEls - 1 ? (this.currentIndex = 0, r(this, s, u).call(this, { scrollport: this.scrollerEl, element: this.slideEls[1] })) : this.currentIndex = t - 1;
108
137
  }
109
- i(this, s, c).call(this);
138
+ r(this, s, d).call(this);
110
139
  }
111
140
  }
112
141
  s = new WeakSet(), /**
113
142
  * Scrolls the carousel to a specific child element
114
143
  * @param {*} param0 - an object containing the scrollport element and the child element to scroll to
115
144
  */
116
- d = function({ scrollport: t, element: e }) {
117
- const l = this.slideGutterSize * 2 / 100;
118
- t.style.scrollBehavior = "auto", t.scrollTo(Math.abs(t.offsetLeft - e.offsetLeft + e.clientWidth * l), 0);
145
+ u = function({ scrollport: t, element: e }) {
146
+ const n = this.slideGutterSize * 2 / 100;
147
+ t.style.scrollBehavior = "auto", t.scrollTo(Math.abs(t.offsetLeft - e.offsetLeft + e.clientWidth * n), 0);
119
148
  }, /**
120
149
  * adds an observer to the scroller element that we can use to
121
150
  * determine which slide is intersecting
122
151
  */
123
- x = function() {
152
+ w = function() {
124
153
  this.carouselObserver = new IntersectionObserver((t) => {
125
154
  for (let e of t)
126
155
  e.isIntersecting && (this.currentIntersecting = e);
@@ -133,19 +162,20 @@ x = function() {
133
162
  */
134
163
  A = function() {
135
164
  for (let t of this.slideEls)
136
- this.carouselObserver.observe(t);
165
+ this.carouselObserver && this.carouselObserver.observe(t);
137
166
  }, /**
138
167
  * sets some intial settings for the carousel based on some of the options
139
168
  */
140
- w = function() {
141
- this.options.wrapAround ? (this.scrollerEl.style.scrollBehavior = "auto", this.scrollerEl.scrollTo(-9999, 0), i(this, s, d).call(this, { scrollport: this.scrollerEl, element: this.scrollerEl.children[1] })) : this.options.showControls ? (this.navBtnEls.previous.setAttribute("disabled", !0), i(this, s, c).call(this)) : i(this, s, I).call(this), this.totalSlides === 1 && this.slideEls[0].removeAttribute("inert");
169
+ S = function() {
170
+ var t, e;
171
+ this.options.wrapAround ? (this.scrollerEl.style.scrollBehavior = "auto", this.scrollerEl.scrollTo(-9999, 0), r(this, s, u).call(this, { scrollport: this.scrollerEl, element: this.scrollerEl.children[1] })) : this.options.showControls ? (this.navBtnEls && ((t = this.navBtnEls) != null && t.previous) && ((e = this.navBtnEls) == null || e.previous.setAttribute("disabled", "disabled")), r(this, s, d).call(this)) : r(this, s, g).call(this), this.totalSlides === 1 && this.slideEls[0].removeAttribute("inert");
142
172
  }, /**
143
173
  * Scrolls the carousel in a specified direction by a specified distance
144
174
  *
145
175
  * @param {number} dir - a number representing the direction of scroll 1 for forward, -1 for backward
146
176
  * @param {number} distance - a number representing the number of slides to scroll
147
177
  */
148
- h = function(t, e = 1) {
178
+ a = function(t, e = 1) {
149
179
  this.scrollerEl.style.scrollBehavior = "smooth", this.scrollerEl.scrollBy({
150
180
  left: this.scrollerEl.clientWidth * ((100 - this.slideGutterSize * 2) / 100) * e * t,
151
181
  top: 0,
@@ -157,8 +187,8 @@ h = function(t, e = 1) {
157
187
  * add methods here to have them sync
158
188
  * when scroller is scrolled
159
189
  */
160
- c = function() {
161
- i(this, s, I).call(this), this.showPagination && i(this, s, T).call(this), this.options.wrapAround || i(this, s, y).call(this);
190
+ d = function() {
191
+ r(this, s, g).call(this), this.showPagination && r(this, s, T).call(this), this.options.wrapAround || r(this, s, y).call(this);
162
192
  }, /**
163
193
  * Sets the control arrow buttons to disabled if the carousel is at the start or end
164
194
  */
@@ -167,10 +197,10 @@ y = function() {
167
197
  }, /**
168
198
  * Sets the inert attribute on all slides that are not the current slide
169
199
  */
170
- I = function() {
200
+ g = function() {
171
201
  const t = this.options.wrapAround ? this.currentIndex + 1 : this.currentIndex;
172
- this.slideEls.length === 1 ? this.slideEls[0].removeAttribute("inert") : this.slideEls.forEach((e, l) => {
173
- e.toggleAttribute("inert", l !== t);
202
+ this.slideEls.length === 1 ? this.slideEls[0].removeAttribute("inert") : this.slideEls.forEach((e, n) => {
203
+ e.toggleAttribute("inert", n !== t);
174
204
  });
175
205
  }, /**
176
206
  * Sets the pagination indicator to the current slide
@@ -181,5 +211,5 @@ T = function() {
181
211
  });
182
212
  };
183
213
  export {
184
- P as default
214
+ M as default
185
215
  };
@@ -1,7 +1,9 @@
1
- export function CarouselSlide({ slide, index, currentIndex, variableHeight }: {
2
- slide: any;
3
- index: any;
4
- currentIndex: any;
5
- variableHeight?: boolean | undefined;
6
- }): import("react/jsx-runtime").JSX.Element;
1
+ import { Slide } from '../../types';
2
+ type CarouselSlideProps = {
3
+ slide: Slide;
4
+ index: number;
5
+ currentIndex: number;
6
+ variableHeight?: boolean;
7
+ };
8
+ export declare function CarouselSlide({ slide, index, currentIndex, variableHeight, }: CarouselSlideProps): JSX.Element;
7
9
  export default CarouselSlide;
@@ -1,37 +1,101 @@
1
- import { jsx as t, Fragment as c } from "react/jsx-runtime";
2
- import { useState as d, useEffect as m, createElement as p } from "react";
3
- import { classes as f } from "../../utils/helpers.js";
4
- import { slideLayoutsMap as h } from "../../settings.js";
5
- import '../../assets/CarouselSlide.css';const g = "_slide_gx8qn_1", i = {
6
- slide: g,
7
- "slide--variable-height": "_slide--variable-height_gx8qn_17"
1
+ import { jsx as i, Fragment as u } from "react/jsx-runtime";
2
+ import { useState as p, useEffect as d, createElement as f } from "react";
3
+ import { classes as C } from "../../utils/helpers.js";
4
+ import { slideLayoutsMap as L } from "../../settings.js";
5
+ import '../../assets/CarouselSlide.css';class k {
6
+ constructor(r = "") {
7
+ this.namespace = "", this.component = "", this.shouldLog = !0, this.backgroundColor = "transparent", this.logLevel = "log", this.LevelColors = {
8
+ log: "#a9a9a9",
9
+ info: "#0061ff",
10
+ warn: "#ff9d00",
11
+ error: "#ff5252"
12
+ }, this.logger = (e, ...o) => {
13
+ if (!this.shouldLog && this.logLevel !== "error" && this.logLevel !== "warn")
14
+ return;
15
+ const l = `color: ${this.LevelColors[this.logLevel]}; background-color: ${this.backgroundColor};`;
16
+ console[this.logLevel](e, "color: #00d68b; font-weight: bold;", l, ...o);
17
+ }, this.log = (e, ...o) => {
18
+ this.logLevel = "log", this.logger(this.formatMessage(e), ...o);
19
+ }, this.info = (e, ...o) => {
20
+ this.logLevel = "info", this.logger(this.formatMessage(e), ...o);
21
+ }, this.error = (e, ...o) => {
22
+ this.logLevel = "error", this.logger(this.formatMessage(e), ...o);
23
+ }, this.warn = (e, ...o) => {
24
+ this.logLevel = "warn", this.logger(this.formatMessage(e), ...o);
25
+ }, this.setNamespace = (e) => {
26
+ this.namespace = e;
27
+ }, this.getNamespace = () => this.namespace, this.clearNamespace = () => {
28
+ this.namespace = "";
29
+ }, this.setComponent = (e) => {
30
+ this.component = e;
31
+ }, this.getComponent = () => this.component, this.clearComponent = () => {
32
+ this.component = "";
33
+ }, this.setShouldLog = (e) => {
34
+ this.shouldLog = e;
35
+ }, this.getShouldLog = () => this.shouldLog, this.setBackgroundColor = (e) => {
36
+ this.backgroundColor = e;
37
+ }, this.getBackgroundColor = () => this.backgroundColor, this.clearBackgroundColor = () => {
38
+ this.backgroundColor = "transparent";
39
+ }, this.formatMessage = (e) => {
40
+ let o = e;
41
+ return this.namespace ? o = `%c[${this.namespace}]${this.component ? ": " + this.component + " : " : " "}%c${e}` : o = `%c${this.component ? ": " + this.component + " : " : ""}%c${e}`, o;
42
+ }, this.namespace = r;
43
+ }
44
+ }
45
+ class a {
46
+ constructor() {
47
+ }
48
+ static getInstance() {
49
+ return a.instance || (a.instance = new k()), a.instance;
50
+ }
51
+ }
52
+ const t = a.getInstance(), h = {
53
+ log: t.log,
54
+ info: t.info,
55
+ warn: t.warn,
56
+ error: t.error,
57
+ setBackgroundColor: t.setBackgroundColor,
58
+ getBackgroundColor: t.getBackgroundColor,
59
+ clearBackgroundColor: t.clearBackgroundColor,
60
+ setComponent: t.setComponent,
61
+ getComponent: t.getComponent,
62
+ clearComponent: t.clearComponent,
63
+ setNamespace: t.setNamespace,
64
+ getNamespace: t.getNamespace,
65
+ clearNamespace: t.clearNamespace,
66
+ setShouldLog: t.setShouldLog,
67
+ getShouldLog: t.getShouldLog
68
+ }, v = "_slide_1echy_2", c = {
69
+ slide: v,
70
+ "slide--variable-height": "_slide--variable-height_1echy_18"
8
71
  };
9
- function v({
10
- slide: e,
11
- index: l,
12
- currentIndex: r,
13
- variableHeight: s = !1
72
+ h.setComponent("CarouselSlide");
73
+ function $({
74
+ slide: s,
75
+ index: r,
76
+ currentIndex: e,
77
+ variableHeight: o = !1
14
78
  }) {
15
- const [a, o] = d(null);
16
- return m(() => {
17
- o(h.get(e.layout));
18
- }, [e]), /* @__PURE__ */ t(c, { children: /* @__PURE__ */ t(
79
+ const [l, n] = p(null);
80
+ return d(() => {
81
+ n(L.get(s.layout) || null);
82
+ }, [s]), h.log("slide", s, "index", r, "currentIndex", e), /* @__PURE__ */ i(u, { children: /* @__PURE__ */ i(
19
83
  "li",
20
84
  {
21
- className: f([
22
- i.slide,
85
+ "aria-label": s.ariaLabel,
86
+ "aria-roledescription": "carousel-item",
87
+ className: C([
88
+ c.slide,
23
89
  "slide",
24
- s ? i["slide--variable-height"] : ""
90
+ o ? c["slide--variable-height"] : ""
25
91
  ]),
26
- "aria-label": e.ariaLabel,
27
- "aria-roledescription": "carousel-item",
28
- inert: r !== l ? "" : null,
29
- "data-index": l,
30
- children: a !== null && e.cells.map((n, u) => /* @__PURE__ */ p(a, { ...n.props, key: `slide${l}-cell${u}` }))
92
+ "data-index": r,
93
+ ...e !== r ? { inert: "" } : {},
94
+ children: l !== null && s.cells.map((g, m) => /* @__PURE__ */ f(l, { ...g.props, key: `slide${r}-cell${m}` }))
31
95
  }
32
96
  ) });
33
97
  }
34
98
  export {
35
- v as CarouselSlide,
36
- v as default
99
+ $ as CarouselSlide,
100
+ $ as default
37
101
  };
@@ -1 +1,2 @@
1
- export { CarouselSlide, CarouselSlide as default } from './CarouselSlide';
1
+ export { CarouselSlide } from './CarouselSlide';
2
+ export { CarouselSlide as default } from './CarouselSlide';
@@ -1,2 +1,2 @@
1
- export function Empty(): import("react/jsx-runtime").JSX.Element;
1
+ export declare function Empty(): JSX.Element;
2
2
  export default Empty;
@@ -1,9 +1,8 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import "react";
3
- function r() {
2
+ function m() {
4
3
  return /* @__PURE__ */ t("div", { className: "empty-slide" });
5
4
  }
6
5
  export {
7
- r as Empty,
8
- r as default
6
+ m as Empty,
7
+ m as default
9
8
  };
@@ -1 +1,2 @@
1
- export { Empty, Empty as default } from './Empty';
1
+ export { Empty } from './Empty';
2
+ export { Empty as default } from './Empty';
@@ -1,9 +1,9 @@
1
- export function FigureSlide({ images, imagesPerSlide }: {
1
+ export declare function FigureSlide({ images, imagesPerSlide }: {
2
2
  images?: {
3
3
  url: string;
4
4
  altText: string;
5
5
  caption: string;
6
6
  }[] | undefined;
7
7
  imagesPerSlide?: number | undefined;
8
- }): import("react/jsx-runtime").JSX.Element;
8
+ }): JSX.Element;
9
9
  export default FigureSlide;
@@ -1,16 +1,15 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
- import "react";
3
- import { classes as s } from "../../../../utils/helpers.js";
2
+ import { classes as u } from "../../../../utils/helpers.js";
4
3
  import '../../../../assets/Figure.css';const r = {
5
- "figure-slide": "_figure-slide_6uaj0_1",
6
- "figure-slide__figure": "_figure-slide__figure_6uaj0_9",
7
- "figure-slide--captioned-image": "_figure-slide--captioned-image_6uaj0_36"
4
+ "figure-slide__figure": "_figure-slide__figure_1140y_2",
5
+ "figure-slide": "_figure-slide_1140y_2",
6
+ "figure-slide--captioned-image": "_figure-slide--captioned-image_1140y_36"
8
7
  };
9
- function n({ images: l = [{ url: "", altText: "", caption: "" }], imagesPerSlide: t = 1 }) {
10
- return /* @__PURE__ */ i("div", { className: r["figure-slide"], children: l.map((e, u) => /* @__PURE__ */ i(
8
+ function c({ images: l = [{ url: "", altText: "", caption: "" }], imagesPerSlide: t = 1 }) {
9
+ return /* @__PURE__ */ i("div", { className: r["figure-slide"], children: l.map((e, s) => /* @__PURE__ */ i(
11
10
  "figure",
12
11
  {
13
- className: s([
12
+ className: u([
14
13
  r["figure-slide__figure"],
15
14
  e != null && e.caption ? r["figure-slide--captioned-image"] : ""
16
15
  ]),
@@ -21,10 +20,10 @@ function n({ images: l = [{ url: "", altText: "", caption: "" }], imagesPerSlide
21
20
  title: e.altText !== "" ? e.altText : "",
22
21
  children: (e == null ? void 0 : e.caption) && /* @__PURE__ */ i("figcaption", { children: e.caption })
23
22
  },
24
- `figure-${u}`
23
+ `figure-${s}`
25
24
  )) });
26
25
  }
27
26
  export {
28
- n as FigureSlide,
29
- n as default
27
+ c as FigureSlide,
28
+ c as default
30
29
  };
@@ -1 +1,2 @@
1
- export { FigureSlide, FigureSlide as default } from './Figure';
1
+ export { FigureSlide } from './Figure';
2
+ export { FigureSlide as default } from './Figure';
@@ -1,7 +1,7 @@
1
- export function TextSlide({ text, backgroundColor, textColor, fontSize }: {
1
+ export declare function TextSlide({ text, backgroundColor, textColor, fontSize, }: {
2
2
  text?: string | undefined;
3
3
  backgroundColor?: string | undefined;
4
4
  textColor?: string | undefined;
5
5
  fontSize?: string | undefined;
6
- }): import("react/jsx-runtime").JSX.Element;
6
+ }): JSX.Element;
7
7
  export default TextSlide;
@@ -1,30 +1,29 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import "react";
3
- import { classes as r } from "../../../../utils/helpers.js";
2
+ import { classes as _ } from "../../../../utils/helpers.js";
4
3
  import '../../../../assets/TextSlide.css';const e = {
5
4
  "text-slide": "_text-slide_1h4rx_1",
6
5
  "text-slide__text": "_text-slide__text_1h4rx_9"
7
6
  };
8
- function c({
7
+ function o({
9
8
  text: s = "",
10
9
  backgroundColor: l = "#fff",
11
- textColor: i = "#444",
12
- fontSize: x = "2.4rem"
10
+ textColor: x = "#444",
11
+ fontSize: i = "2.4rem"
13
12
  }) {
14
13
  return /* @__PURE__ */ t("div", { className: e["text-slide"], children: /* @__PURE__ */ t(
15
14
  "div",
16
15
  {
17
- className: r([e["text-slide__text"], "text-slide__text"]),
16
+ className: _([e["text-slide__text"], "text-slide__text"]),
18
17
  style: {
19
18
  backgroundColor: l,
20
- color: i,
21
- fontSize: x
19
+ color: x,
20
+ fontSize: i
22
21
  },
23
22
  children: s
24
23
  }
25
24
  ) });
26
25
  }
27
26
  export {
28
- c as TextSlide,
29
- c as default
27
+ o as TextSlide,
28
+ o as default
30
29
  };
@@ -1 +1,2 @@
1
- export { TextSlide, TextSlide as default } from './TextSlide';
1
+ export { TextSlide } from './TextSlide';
2
+ export { TextSlide as default } from './TextSlide';
@@ -1,6 +1,6 @@
1
1
  import { jsxs as l, jsx as o } from "react/jsx-runtime";
2
2
  import "react";
3
- import { p as r } from "../../../../index-B0ARwqly.mjs";
3
+ import { p as r } from "../../../../index-VjANCDXC.mjs";
4
4
  import { classes as e } from "../../../../utils/helpers.js";
5
5
  import '../../../../assets/TwoColumnSlide.css';const m = {
6
6
  "two-column-slide": "_two-column-slide_1p3kg_1"
@@ -1,8 +1,8 @@
1
1
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
2
  import { useEffect as l } from "react";
3
+ import { Concat as n } from "../Concat/Concat.js";
3
4
  import { ImageCard as s } from "../ImageCard/ImageCard.js";
4
5
  import { AdjustableTwoColumnGrid as i } from "../AdjustableTwoColumnGrid/AdjustableTwoColumnGrid.js";
5
- import { Concat as n } from "../Concat/Concat.js";
6
6
  import { SectionedContent as c } from "../SectionedContent/SectionedContent.js";
7
7
  function h(a) {
8
8
  const t = a != null && a.castMember ? a.castMember : { ...a };