@scrippsproduct/networks-ui-library 2.0.5-aplha.1 → 2.0.5

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.
@@ -117,12 +117,12 @@ c("AnchorTag", () => {
117
117
  };
118
118
  n("should render image when image prop is provided", () => {
119
119
  i(/* @__PURE__ */ a(o, { href: "/", image: l, label: "Image Link" }));
120
- const e = s.getByRole("img");
120
+ const e = s.getByRole("presentation");
121
121
  t(e).toBeInTheDocument(), t(e).toHaveAttribute("src", "https://example.com/image.jpg");
122
- }), n("should use label as alt text for image", () => {
122
+ }), n("should not use label as alt text for image", () => {
123
123
  i(/* @__PURE__ */ a(o, { href: "/", image: l, label: "Test Label" }));
124
- const e = s.getByRole("img");
125
- t(e).toHaveAttribute("alt", "Test Label");
124
+ const e = s.getByRole("presentation");
125
+ t(e).toHaveAttribute("alt", "");
126
126
  }), n("should render label in sr-only span when image is present", () => {
127
127
  const { container: e } = i(/* @__PURE__ */ a(o, { href: "/", image: l, label: "Screen Reader Text" })), r = e.querySelector(".sr-only");
128
128
  t(r).toBeInTheDocument(), t(r == null ? void 0 : r.textContent).toBe("Screen Reader Text");
@@ -349,16 +349,6 @@ c("AnchorTag", () => {
349
349
  height: 200
350
350
  }, { container: e } = i(/* @__PURE__ */ a(o, { image: l, label: "Accessible Text" })), r = e.querySelector(".sr-only");
351
351
  t(r).toHaveTextContent("Accessible Text");
352
- }), n("should have proper alt text on image", () => {
353
- i(/* @__PURE__ */ a(o, { image: {
354
- url: "https://example.com/image.jpg",
355
- altText: "Test",
356
- aspectRatio: 1.5,
357
- width: 300,
358
- height: 200
359
- }, label: "Alt Text Here" }));
360
- const e = s.getByRole("img");
361
- t(e).toHaveAttribute("alt", "Alt Text Here");
362
352
  }), n("should properly indicate external links with rel noreferrer", () => {
363
353
  i(/* @__PURE__ */ a(o, { href: "https://example.com", label: "External", type: "external-link" }));
364
354
  const l = s.getByRole("link");
@@ -379,7 +369,7 @@ c("AnchorTag", () => {
379
369
  }
380
370
  ]
381
371
  }, label: "Image with Sources" }));
382
- const e = s.getByRole("img");
372
+ const e = s.getByRole("presentation");
383
373
  t(e).toHaveAttribute("src", "https://example.com/image.jpg");
384
374
  }), n("should handle image with caption", () => {
385
375
  i(/* @__PURE__ */ a(o, { image: {
@@ -390,7 +380,7 @@ c("AnchorTag", () => {
390
380
  height: 200,
391
381
  caption: "This is a caption"
392
382
  }, label: "Captioned Image" }));
393
- const e = s.getByRole("img");
383
+ const e = s.getByRole("presentation");
394
384
  t(e).toBeInTheDocument();
395
385
  }), n("should handle image with text property", () => {
396
386
  i(/* @__PURE__ */ a(o, { image: {
@@ -401,7 +391,7 @@ c("AnchorTag", () => {
401
391
  height: 200,
402
392
  text: "Additional text"
403
393
  }, label: "Image with Text" }));
404
- const e = s.getByRole("img");
394
+ const e = s.getByRole("presentation");
405
395
  t(e).toBeInTheDocument();
406
396
  });
407
397
  }), c("Integration Tests", () => {
@@ -456,8 +446,8 @@ c("AnchorTag", () => {
456
446
  );
457
447
  const e = s.getByRole("link");
458
448
  t(e).toHaveClass("logo-link"), t(e).toHaveClass("anchor-tag--image"), t(e).toHaveAttribute("href", "/"), t(e).toHaveAttribute("target", "_self"), t(e).toHaveStyle({ "--anchor-tag-image-ratio": "2" });
459
- const r = s.getByRole("img");
460
- t(r).toHaveAttribute("src", "https://example.com/logo.png"), t(r).toHaveAttribute("alt", "Home");
449
+ const r = s.getByRole("presentation");
450
+ t(r).toHaveAttribute("src", "https://example.com/logo.png"), t(r).toHaveAttribute("alt", "");
461
451
  });
462
452
  });
463
453
  });
@@ -20,8 +20,8 @@ d("BCVideoPlayer", () => {
20
20
  r(o).toBeInTheDocument();
21
21
  }), a("should render wrapper with correct id", () => {
22
22
  c(/* @__PURE__ */ t(n, { bcId: "123456" }));
23
- const e = document.getElementById("video-player-wrapper");
24
- r(e).toHaveAttribute("id", "video-player-wrapper");
23
+ const e = document.getElementById("video-player-wrapper-bc-player");
24
+ r(e).toHaveAttribute("id", "video-player-wrapper-bc-player");
25
25
  }), a("should render wrapper with correct class", () => {
26
26
  const { container: e } = c(/* @__PURE__ */ t(n, { bcId: "123456" })), o = e.querySelector(".video-player__wrapper");
27
27
  r(o).toHaveClass("video-player__wrapper");
@@ -222,7 +222,7 @@ d("BCVideoPlayer", () => {
222
222
  }
223
223
  )
224
224
  ), p = o.querySelector(".video-player__wrapper");
225
- r(p).toBeInTheDocument(), r(p).toHaveAttribute("id", "video-player-wrapper");
225
+ r(p).toBeInTheDocument(), r(p).toHaveAttribute("id", "video-player-wrapper-custom-player");
226
226
  }), a("should handle keyboard events with all props", () => {
227
227
  const e = l.fn(), { container: o } = c(
228
228
  /* @__PURE__ */ t(
@@ -1,5 +1,5 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
- import { v as y, d, b as p, i as r, r as a, g as i, w as u, s as c } from "../../react.esm-S2Q_NbYC.mjs";
2
+ import { v as y, d, b as p, i as r, r as a, w as u, g as i, s as c } from "../../react.esm-S2Q_NbYC.mjs";
3
3
  import "../../index-BZQHStQa.mjs";
4
4
  import { CarouselSlide as n } from "./CarouselSlide.js";
5
5
  y.mock("@scrippsproduct/console-logger", () => ({
@@ -36,51 +36,52 @@ d("CarouselSlide", () => {
36
36
  }), d("Basic Rendering", () => {
37
37
  r("should render slide with basic props", async () => {
38
38
  const { container: t } = a(
39
- /* @__PURE__ */ l(n, { slide: s, index: 0, currentIndex: 0 })
40
- ), e = t.querySelector("li");
41
- i(e).toBeInTheDocument(), await u(() => {
39
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: s })
40
+ );
41
+ await u(() => {
42
+ const e = t.querySelector("li");
42
43
  i(e).toBeInTheDocument();
43
44
  });
44
45
  }), r("should render with correct aria-label", () => {
45
46
  const { container: t } = a(
46
- /* @__PURE__ */ l(n, { slide: s, index: 0, currentIndex: 0 })
47
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: s })
47
48
  ), e = t.querySelector("li");
48
49
  i(e).toHaveAttribute("aria-label", "1 of 3");
49
50
  }), r("should render with aria-roledescription", () => {
50
51
  const { container: t } = a(
51
- /* @__PURE__ */ l(n, { slide: s, index: 0, currentIndex: 0 })
52
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: s })
52
53
  ), e = t.querySelector("li");
53
54
  i(e).toHaveAttribute("aria-roledescription", "carousel-item");
54
55
  }), r("should render with data-index attribute", () => {
55
56
  const { container: t } = a(
56
- /* @__PURE__ */ l(n, { slide: s, index: 2, currentIndex: 0 })
57
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: 2, slide: s })
57
58
  ), e = t.querySelector("li");
58
59
  i(e).toHaveAttribute("data-index", "2");
59
60
  }), r("should render with correct index for different positions", () => {
60
61
  const { container: t } = a(
61
- /* @__PURE__ */ l(n, { slide: s, index: 5, currentIndex: 0 })
62
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: 5, slide: s })
62
63
  ), e = t.querySelector("li");
63
64
  i(e).toHaveAttribute("data-index", "5");
64
65
  });
65
66
  }), d("Inert Attribute", () => {
66
67
  r("should not have inert attribute when slide is current", () => {
67
68
  const { container: t } = a(
68
- /* @__PURE__ */ l(n, { slide: s, index: 0, currentIndex: 0 })
69
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: s })
69
70
  ), e = t.querySelector("li");
70
71
  i(e).not.toHaveAttribute("inert");
71
72
  }), r("should have inert attribute when slide is not current", () => {
72
73
  const { container: t } = a(
73
- /* @__PURE__ */ l(n, { slide: s, index: 1, currentIndex: 0 })
74
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: 1, slide: s })
74
75
  ), e = t.querySelector("li");
75
76
  i(e).toHaveAttribute("inert");
76
77
  }), r("should have inert attribute when currentIndex is greater than index", () => {
77
78
  const { container: t } = a(
78
- /* @__PURE__ */ l(n, { slide: s, index: 0, currentIndex: 2 })
79
+ /* @__PURE__ */ l(n, { currentIndex: 2, index: 0, slide: s })
79
80
  ), e = t.querySelector("li");
80
81
  i(e).toHaveAttribute("inert");
81
82
  }), r("should not have inert when indices match at higher values", () => {
82
83
  const { container: t } = a(
83
- /* @__PURE__ */ l(n, { slide: s, index: 5, currentIndex: 5 })
84
+ /* @__PURE__ */ l(n, { currentIndex: 5, index: 5, slide: s })
84
85
  ), e = t.querySelector("li");
85
86
  i(e).not.toHaveAttribute("inert");
86
87
  });
@@ -90,10 +91,10 @@ d("CarouselSlide", () => {
90
91
  /* @__PURE__ */ l(
91
92
  n,
92
93
  {
93
- slide: s,
94
- index: 0,
94
+ variableHeight: !0,
95
95
  currentIndex: 0,
96
- variableHeight: !0
96
+ index: 0,
97
+ slide: s
97
98
  }
98
99
  )
99
100
  ), e = t.querySelector("li");
@@ -103,9 +104,9 @@ d("CarouselSlide", () => {
103
104
  /* @__PURE__ */ l(
104
105
  n,
105
106
  {
106
- slide: s,
107
- index: 0,
108
107
  currentIndex: 0,
108
+ index: 0,
109
+ slide: s,
109
110
  variableHeight: !1
110
111
  }
111
112
  )
@@ -113,14 +114,14 @@ d("CarouselSlide", () => {
113
114
  i(e).not.toHaveClass("slide--variable-height");
114
115
  }), r("should not apply variable height class by default", () => {
115
116
  const { container: t } = a(
116
- /* @__PURE__ */ l(n, { slide: s, index: 0, currentIndex: 0 })
117
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: s })
117
118
  ), e = t.querySelector("li");
118
119
  i(e).not.toHaveClass("slide--variable-height");
119
120
  });
120
121
  }), d("CSS Classes", () => {
121
122
  r("should always have slide class", () => {
122
123
  const { container: t } = a(
123
- /* @__PURE__ */ l(n, { slide: s, index: 0, currentIndex: 0 })
124
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: s })
124
125
  ), e = t.querySelector("li");
125
126
  i(e).toHaveClass("slide");
126
127
  }), r("should have multiple classes when variableHeight is true", () => {
@@ -128,10 +129,10 @@ d("CarouselSlide", () => {
128
129
  /* @__PURE__ */ l(
129
130
  n,
130
131
  {
131
- slide: s,
132
- index: 0,
132
+ variableHeight: !0,
133
133
  currentIndex: 0,
134
- variableHeight: !0
134
+ index: 0,
135
+ slide: s
135
136
  }
136
137
  )
137
138
  ), e = t.querySelector("li");
@@ -139,29 +140,29 @@ d("CarouselSlide", () => {
139
140
  });
140
141
  }), d("Layout Loading", () => {
141
142
  r("should render layout component when layout is found", async () => {
142
- a(/* @__PURE__ */ l(n, { slide: {
143
+ a(/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: {
143
144
  ariaLabel: "1 of 3",
144
145
  cells: [{ id: 1, props: { title: "Figure Title" }, layout: "Figure" }],
145
146
  layout: "Figure"
146
- }, index: 0, currentIndex: 0 })), await u(() => {
147
+ } })), await u(() => {
147
148
  const e = c.getByTestId("figure-layout");
148
149
  i(e).toBeInTheDocument(), i(e).toHaveTextContent("Figure Title");
149
150
  });
150
151
  }), r("should render text layout when layout is Text", async () => {
151
- a(/* @__PURE__ */ l(n, { slide: {
152
+ a(/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: {
152
153
  ariaLabel: "1 of 3",
153
154
  cells: [{ id: 1, props: { content: "Text Content" }, layout: "Text" }],
154
155
  layout: "Text"
155
- }, index: 0, currentIndex: 0 })), await u(() => {
156
+ } })), await u(() => {
156
157
  const e = c.getByTestId("text-layout");
157
158
  i(e).toBeInTheDocument(), i(e).toHaveTextContent("Text Content");
158
159
  });
159
160
  }), r("should render video layout when layout is Video", async () => {
160
- a(/* @__PURE__ */ l(n, { slide: {
161
+ a(/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: {
161
162
  ariaLabel: "1 of 3",
162
163
  cells: [{ id: 1, props: { videoId: "video-123" }, layout: "Video" }],
163
164
  layout: "Video"
164
- }, index: 0, currentIndex: 0 })), await u(() => {
165
+ } })), await u(() => {
165
166
  const e = c.getByTestId("video-layout");
166
167
  i(e).toBeInTheDocument(), i(e).toHaveTextContent("video-123");
167
168
  });
@@ -171,14 +172,14 @@ d("CarouselSlide", () => {
171
172
  cells: [{ id: 1, props: { title: "Test" }, layout: "Unknown" }],
172
173
  layout: "Unknown"
173
174
  }, { container: e } = a(
174
- /* @__PURE__ */ l(n, { slide: t, index: 0, currentIndex: 0 })
175
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: t })
175
176
  ), o = e.querySelector("li");
176
177
  i(o).toBeInTheDocument(), i(o == null ? void 0 : o.children.length).toBe(0);
177
178
  });
178
179
  }), d("Multiple Cells", () => {
179
180
  r("should render multiple cells", async () => {
180
181
  a(
181
- /* @__PURE__ */ l(n, { slide: {
182
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: {
182
183
  ariaLabel: "1 of 3",
183
184
  cells: [
184
185
  { id: 1, props: { title: "Cell 1" }, layout: "Figure" },
@@ -186,35 +187,35 @@ d("CarouselSlide", () => {
186
187
  { id: 3, props: { title: "Cell 3" }, layout: "Figure" }
187
188
  ],
188
189
  layout: "Figure"
189
- }, index: 0, currentIndex: 0 })
190
+ } })
190
191
  ), await u(() => {
191
192
  const e = c.getAllByTestId("figure-layout");
192
193
  i(e).toHaveLength(3), i(e[0]).toHaveTextContent("Cell 1"), i(e[1]).toHaveTextContent("Cell 2"), i(e[2]).toHaveTextContent("Cell 3");
193
194
  });
194
195
  }), r("should render cells with unique keys", async () => {
195
196
  a(
196
- /* @__PURE__ */ l(n, { slide: {
197
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: 2, slide: {
197
198
  ariaLabel: "1 of 3",
198
199
  cells: [
199
200
  { id: 1, props: { title: "Cell A" }, layout: "Figure" },
200
201
  { id: 2, props: { title: "Cell B" }, layout: "Figure" }
201
202
  ],
202
203
  layout: "Figure"
203
- }, index: 2, currentIndex: 0 })
204
+ } })
204
205
  ), await u(() => {
205
206
  const e = c.getAllByTestId("figure-layout");
206
207
  i(e).toHaveLength(2);
207
208
  });
208
209
  }), r("should use slide layout for all cells in the slide", async () => {
209
210
  a(
210
- /* @__PURE__ */ l(n, { slide: {
211
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: {
211
212
  ariaLabel: "1 of 3",
212
213
  cells: [
213
214
  { id: 1, props: { title: "Figure Cell 1" }, layout: "Figure" },
214
215
  { id: 2, props: { title: "Figure Cell 2" }, layout: "Figure" }
215
216
  ],
216
217
  layout: "Figure"
217
- }, index: 0, currentIndex: 0 })
218
+ } })
218
219
  ), await u(() => {
219
220
  const e = c.getAllByTestId("figure-layout");
220
221
  i(e).toHaveLength(2), i(e[0]).toHaveTextContent("Figure Cell 1"), i(e[1]).toHaveTextContent("Figure Cell 2");
@@ -227,7 +228,7 @@ d("CarouselSlide", () => {
227
228
  cells: [],
228
229
  layout: "Figure"
229
230
  }, { container: e } = a(
230
- /* @__PURE__ */ l(n, { slide: t, index: 0, currentIndex: 0 })
231
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: t })
231
232
  ), o = e.querySelector("li");
232
233
  i(o).toBeInTheDocument(), i(o == null ? void 0 : o.children.length).toBe(0);
233
234
  }), r("should handle missing layout in cell", async () => {
@@ -236,7 +237,7 @@ d("CarouselSlide", () => {
236
237
  cells: [{ id: 1, props: { title: "Test" } }],
237
238
  layout: ""
238
239
  }, { container: e } = a(
239
- /* @__PURE__ */ l(n, { slide: t, index: 0, currentIndex: 0 })
240
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: t })
240
241
  ), o = e.querySelector("li");
241
242
  i(o).toBeInTheDocument();
242
243
  }), r("should handle empty aria-label", () => {
@@ -245,24 +246,24 @@ d("CarouselSlide", () => {
245
246
  cells: [h],
246
247
  layout: "Figure"
247
248
  }, { container: e } = a(
248
- /* @__PURE__ */ l(n, { slide: t, index: 0, currentIndex: 0 })
249
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: t })
249
250
  ), o = e.querySelector("li");
250
251
  i(o).toHaveAttribute("aria-label", "");
251
252
  }), r("should handle negative indices gracefully", () => {
252
253
  const { container: t } = a(
253
- /* @__PURE__ */ l(n, { slide: s, index: -1, currentIndex: 0 })
254
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: -1, slide: s })
254
255
  ), e = t.querySelector("li");
255
256
  i(e).toHaveAttribute("data-index", "-1"), i(e).toHaveAttribute("inert");
256
257
  }), r("should handle large index values", () => {
257
258
  const { container: t } = a(
258
- /* @__PURE__ */ l(n, { slide: s, index: 999, currentIndex: 999 })
259
+ /* @__PURE__ */ l(n, { currentIndex: 999, index: 999, slide: s })
259
260
  ), e = t.querySelector("li");
260
261
  i(e).toHaveAttribute("data-index", "999"), i(e).not.toHaveAttribute("inert");
261
262
  });
262
263
  }), d("Props Passing to Layout", () => {
263
264
  r("should pass all cell props to layout component", async () => {
264
265
  a(
265
- /* @__PURE__ */ l(n, { slide: {
266
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: {
266
267
  ariaLabel: "1 of 1",
267
268
  cells: [
268
269
  {
@@ -277,17 +278,17 @@ d("CarouselSlide", () => {
277
278
  }
278
279
  ],
279
280
  layout: "Figure"
280
- }, index: 0, currentIndex: 0 })
281
+ } })
281
282
  ), await u(() => {
282
283
  const e = c.getByTestId("figure-layout");
283
284
  i(e).toBeInTheDocument();
284
285
  });
285
286
  }), r("should handle cells without id", async () => {
286
- a(/* @__PURE__ */ l(n, { slide: {
287
+ a(/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: {
287
288
  ariaLabel: "1 of 1",
288
289
  cells: [{ props: { title: "No ID Cell" }, layout: "Figure" }],
289
290
  layout: "Figure"
290
- }, index: 0, currentIndex: 0 })), await u(() => {
291
+ } })), await u(() => {
291
292
  const e = c.getByTestId("figure-layout");
292
293
  i(e).toBeInTheDocument();
293
294
  });
@@ -303,30 +304,30 @@ d("CarouselSlide", () => {
303
304
  cells: [{ id: 2, props: { title: "Updated" }, layout: "Figure" }],
304
305
  layout: "Figure"
305
306
  }, { rerender: o } = a(
306
- /* @__PURE__ */ l(n, { slide: t, index: 0, currentIndex: 0 })
307
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: t })
307
308
  );
308
309
  await u(() => {
309
310
  i(c.getByText("Initial")).toBeInTheDocument();
310
- }), o(/* @__PURE__ */ l(n, { slide: e, index: 0, currentIndex: 0 })), await u(() => {
311
+ }), o(/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: e })), await u(() => {
311
312
  i(c.getByText("Updated")).toBeInTheDocument();
312
313
  });
313
314
  }), r("should update inert attribute when currentIndex changes", () => {
314
315
  const { container: t, rerender: e } = a(
315
- /* @__PURE__ */ l(n, { slide: s, index: 1, currentIndex: 0 })
316
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: 1, slide: s })
316
317
  );
317
318
  let o = t.querySelector("li");
318
- i(o).toHaveAttribute("inert"), e(/* @__PURE__ */ l(n, { slide: s, index: 1, currentIndex: 1 })), o = t.querySelector("li"), i(o).not.toHaveAttribute("inert");
319
+ i(o).toHaveAttribute("inert"), e(/* @__PURE__ */ l(n, { currentIndex: 1, index: 1, slide: s })), o = t.querySelector("li"), i(o).not.toHaveAttribute("inert");
319
320
  }), r("should update data-index when index changes", () => {
320
321
  const { container: t, rerender: e } = a(
321
- /* @__PURE__ */ l(n, { slide: s, index: 0, currentIndex: 0 })
322
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: s })
322
323
  );
323
324
  let o = t.querySelector("li");
324
- i(o).toHaveAttribute("data-index", "0"), e(/* @__PURE__ */ l(n, { slide: s, index: 3, currentIndex: 0 })), o = t.querySelector("li"), i(o).toHaveAttribute("data-index", "3");
325
+ i(o).toHaveAttribute("data-index", "0"), e(/* @__PURE__ */ l(n, { currentIndex: 0, index: 3, slide: s })), o = t.querySelector("li"), i(o).toHaveAttribute("data-index", "3");
325
326
  });
326
327
  }), d("Accessibility", () => {
327
328
  r("should have proper role description for screen readers", () => {
328
329
  const { container: t } = a(
329
- /* @__PURE__ */ l(n, { slide: s, index: 0, currentIndex: 0 })
330
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: s })
330
331
  ), e = t.querySelector('li[aria-roledescription="carousel-item"]');
331
332
  i(e).toBeInTheDocument();
332
333
  }), r("should provide context with aria-label", () => {
@@ -335,17 +336,17 @@ d("CarouselSlide", () => {
335
336
  cells: [h],
336
337
  layout: "Figure"
337
338
  }, { container: e } = a(
338
- /* @__PURE__ */ l(n, { slide: t, index: 2, currentIndex: 0 })
339
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: 2, slide: t })
339
340
  ), o = e.querySelector("li");
340
341
  i(o).toHaveAttribute("aria-label", "Slide 3 of 10");
341
342
  }), r("should be inert when not focused to prevent tab navigation", () => {
342
343
  const { container: t } = a(
343
- /* @__PURE__ */ l(n, { slide: s, index: 2, currentIndex: 0 })
344
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: 2, slide: s })
344
345
  ), e = t.querySelector("li");
345
346
  i(e).toHaveAttribute("inert");
346
347
  }), r("should not be inert when focused to allow tab navigation", () => {
347
348
  const { container: t } = a(
348
- /* @__PURE__ */ l(n, { slide: s, index: 0, currentIndex: 0 })
349
+ /* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: s })
349
350
  ), e = t.querySelector("li");
350
351
  i(e).not.toHaveAttribute("inert");
351
352
  });
@@ -362,10 +363,10 @@ d("CarouselSlide", () => {
362
363
  /* @__PURE__ */ l(
363
364
  n,
364
365
  {
365
- slide: t,
366
- index: 4,
366
+ variableHeight: !0,
367
367
  currentIndex: 4,
368
- variableHeight: !0
368
+ index: 4,
369
+ slide: t
369
370
  }
370
371
  )
371
372
  ), o = e.querySelector("li");
@@ -1,25 +1,26 @@
1
- import { jsxs as s, jsx as e, Fragment as M } from "react/jsx-runtime";
2
- import { useState as m, useEffect as b } from "react";
3
- import { getViewingPlatforms as W } from "../../utils/getViewingPlatforms.js";
4
- import { ChannelSearch as j } from "../ChannelSearch/ChannelSearch.js";
5
- import { RescanInstructions as q } from "../RescanInstructions/RescanInstructions.js";
6
- import { DeviceAndPlatformLists as O } from "../DeviceAndPlatformLists/DeviceAndPlatformLists.js";
7
- import { GeneralErrorBoundary as f } from "../../error-boundries/GeneralErrorBoundry.js";
8
- import '../../assets/FindUs.css';const z = "_findus__column_jx1qh_8", h = {
1
+ import { jsxs as s, jsx as e, Fragment as W } from "react/jsx-runtime";
2
+ import { useState as d, useEffect as P } from "react";
3
+ import { getViewingPlatforms as q } from "../../utils/getViewingPlatforms.js";
4
+ import { classes as f } from "../../utils/helpers.js";
5
+ import { ChannelSearch as I } from "../ChannelSearch/ChannelSearch.js";
6
+ import { RescanInstructions as O } from "../RescanInstructions/RescanInstructions.js";
7
+ import { DeviceAndPlatformLists as z } from "../DeviceAndPlatformLists/DeviceAndPlatformLists.js";
8
+ import { GeneralErrorBoundary as h } from "../../error-boundries/GeneralErrorBoundry.js";
9
+ import '../../assets/FindUs.css';const E = "_findus__column_jx1qh_8", p = {
9
10
  "grid-wrapper": "_grid-wrapper_jx1qh_1",
10
- findus__column: z
11
+ findus__column: E
11
12
  };
12
- function G({
13
+ function V({
13
14
  network: n,
14
- baseApiUrl: p,
15
- platformsApiUrl: _ = "https://api.scrippscloud.com/viewing-platforms/v1",
16
- allowStateSearch: g = !0,
17
- allowZipcodeSearch: v = !0,
15
+ baseApiUrl: _,
16
+ platformsApiUrl: g = "https://api.scrippscloud.com/viewing-platforms/v1",
17
+ allowStateSearch: v = !0,
18
+ allowZipcodeSearch: y = !0,
18
19
  allowAutoScroll: o = !0,
19
20
  autoScrollOffset: a = 25,
20
21
  compactLayout: t = !0,
21
22
  showChannelSearchAndRescan: c = !0,
22
- numberOfColumns: y,
23
+ numberOfColumns: N,
23
24
  ad: l = {
24
25
  campaign: "",
25
26
  source: "",
@@ -27,101 +28,129 @@ function G({
27
28
  content: "learn_more"
28
29
  }
29
30
  }) {
30
- const [r, N] = m(null), [w, P] = m(o ? a : 0), [u, I] = m(null);
31
- return b(() => {
31
+ const [r, w] = d(null), [b, j] = d(o ? a : 0), [u, x] = d(null);
32
+ return P(() => {
32
33
  r === null && (async () => {
33
- const i = await W({ network: n.platformsSlug, platformsApiUrl: _ });
34
+ const i = await q({ network: n.platformsSlug, platformsApiUrl: g });
34
35
  if (Object.prototype.hasOwnProperty.call(i, "error")) {
35
- I("An error occured while fetching the platforms."), console.error("An error occured while fetching the platforms:", i), N(/* @__PURE__ */ new Map());
36
+ x("An error occured while fetching the platforms."), console.error("An error occured while fetching the platforms:", i), w(/* @__PURE__ */ new Map());
36
37
  return;
37
38
  }
38
- N(i);
39
+ w(i);
39
40
  })();
40
- }, [r, n.platformsSlug, _]), b(() => {
41
+ }, [r, n.platformsSlug, g]), P(() => {
41
42
  if (window.innerWidth <= 960) {
42
43
  const i = setInterval(() => {
43
44
  if (document.querySelector(".mobile-nav")) {
44
45
  clearInterval(i);
45
- const d = document.querySelector(".mobile-nav"), x = (d == null ? void 0 : d.offsetHeight) ?? 0;
46
- P(x + a);
46
+ const m = document.querySelector(".mobile-nav"), M = (m == null ? void 0 : m.offsetHeight) ?? 0;
47
+ j(M + a);
47
48
  }
48
49
  }, 100);
49
50
  }
50
- }, [a]), /* @__PURE__ */ s("section", { className: [h["find-us"], t ? "find-us--compact" : ""].join(" "), children: [
51
- c && !t && /* @__PURE__ */ e(
52
- f,
53
- {
54
- errorMessage: "Please try again later. If the problem persists please use the <strong>contact us</strong> link below to report the issue.",
55
- errorTitle: "We're sorry, there's currently an issue with our channel search.",
56
- children: /* @__PURE__ */ e("div", { className: "find-us__channel-search-section", children: /* @__PURE__ */ e(
57
- j,
51
+ }, [a]), /* @__PURE__ */ s(
52
+ "section",
53
+ {
54
+ className: f([
55
+ p["find-us"],
56
+ t ? "find-us--compact" : ""
57
+ ]),
58
+ children: [
59
+ c && !t && /* @__PURE__ */ e(
60
+ h,
58
61
  {
59
- ad: {
60
- campaign: l.campaign ?? "",
61
- source: l.source ?? "",
62
- medium: l.medium ?? "referral",
63
- content: l.content ?? "learn_more"
64
- },
65
- allowAutoScroll: o,
66
- allowStateSearch: g,
67
- allowZipcodeSearch: v,
68
- autoScrollOffset: w,
69
- baseApiUrl: p,
70
- compactLayout: t,
71
- network: n
62
+ errorMessage: "Please try again later. If the problem persists please use the <strong>contact us</strong> link below to report the issue.",
63
+ errorTitle: "We're sorry, there's currently an issue with our channel search.",
64
+ children: /* @__PURE__ */ e("div", { className: "find-us__channel-search-section", children: /* @__PURE__ */ e(
65
+ I,
66
+ {
67
+ ad: {
68
+ campaign: l.campaign ?? "",
69
+ source: l.source ?? "",
70
+ medium: l.medium ?? "referral",
71
+ content: l.content ?? "learn_more"
72
+ },
73
+ allowAutoScroll: o,
74
+ allowStateSearch: v,
75
+ allowZipcodeSearch: y,
76
+ autoScrollOffset: b,
77
+ baseApiUrl: _,
78
+ compactLayout: t,
79
+ network: n
80
+ }
81
+ ) })
72
82
  }
73
- ) })
74
- }
75
- ),
76
- /* @__PURE__ */ e("div", { className: "find-us__rescan-platform-section", children: /* @__PURE__ */ s("div", { className: [h["grid-wrapper"], "findus__grid-wrapper", c ? "" : "findus__grid-wrapper--full-width"].join(" "), children: [
77
- c && /* @__PURE__ */ s("div", { className: [h.findus__column, "findus__column"].join(" "), children: [
78
- t && /* @__PURE__ */ s(M, { children: [
79
- /* @__PURE__ */ s("h4", { className: "channel-search__header", children: [
80
- "Digital Antenna ",
81
- /* @__PURE__ */ e("span", { className: "channel-search__header--lighter", children: "(Over-the-Air Broadcast)" })
82
- ] }),
83
- /* @__PURE__ */ e(
84
- f,
85
- {
86
- errorMessage: "Please try again later. If the problem persists please use the <strong>contact us</strong> link below to report the issue.",
87
- errorTitle: "We're sorry, there's currently an issue with our channel search.",
88
- children: /* @__PURE__ */ e(
89
- j,
83
+ ),
84
+ /* @__PURE__ */ e("div", { className: "find-us__rescan-platform-section", children: /* @__PURE__ */ s(
85
+ "div",
86
+ {
87
+ className: f([
88
+ p["grid-wrapper"],
89
+ "findus__grid-wrapper",
90
+ c ? "" : "findus__grid-wrapper--full-width"
91
+ ]),
92
+ children: [
93
+ c && /* @__PURE__ */ s(
94
+ "div",
95
+ {
96
+ className: f([
97
+ p.findus__column,
98
+ "findus__column"
99
+ ]),
100
+ children: [
101
+ t && /* @__PURE__ */ s(W, { children: [
102
+ /* @__PURE__ */ s("h4", { className: "channel-search__header", children: [
103
+ "Digital Antenna ",
104
+ /* @__PURE__ */ e("span", { className: "channel-search__header--lighter", children: "(Over-the-Air Broadcast)" })
105
+ ] }),
106
+ /* @__PURE__ */ e(
107
+ h,
108
+ {
109
+ errorMessage: "Please try again later. If the problem persists please use the <strong>contact us</strong> link below to report the issue.",
110
+ errorTitle: "We're sorry, there's currently an issue with our channel search.",
111
+ children: /* @__PURE__ */ e(
112
+ I,
113
+ {
114
+ allowAutoScroll: o,
115
+ allowStateSearch: v,
116
+ allowZipcodeSearch: y,
117
+ autoScrollOffset: b,
118
+ baseApiUrl: _,
119
+ compactLayout: t,
120
+ network: n
121
+ }
122
+ )
123
+ }
124
+ )
125
+ ] }),
126
+ /* @__PURE__ */ e(O, { brandName: n.brand_name })
127
+ ]
128
+ }
129
+ ),
130
+ /* @__PURE__ */ s(
131
+ h,
90
132
  {
91
- allowAutoScroll: o,
92
- allowStateSearch: g,
93
- allowZipcodeSearch: v,
94
- autoScrollOffset: w,
95
- baseApiUrl: p,
96
- compactLayout: t,
97
- network: n
133
+ errorMessage: "Please try again later. If the problem persists please use the <strong>contact us</strong> link below to report the issue.",
134
+ errorTitle: "We're sorry, there's currently an issue with our device and platform lists.",
135
+ children: [
136
+ r !== null && r.size > 0 && u === null && /* @__PURE__ */ e(z, { platformResources: r, ...N && { numberOfColumns: N } }),
137
+ r !== null && r.size > 0 && u !== null && /* @__PURE__ */ e("div", { className: "find-us__error", children: /* @__PURE__ */ e("p", { className: "find-us__error-message", children: u }) }),
138
+ r !== null && r.size === 0 && /* @__PURE__ */ e("div", { className: "find-us__error", children: /* @__PURE__ */ s("p", { className: "find-us__error-message", children: [
139
+ "We couldn't find any viewing platforms for ",
140
+ n.brand_name,
141
+ "."
142
+ ] }) })
143
+ ]
98
144
  }
99
145
  )
100
- }
101
- )
102
- ] }),
103
- /* @__PURE__ */ e(q, { brandName: n.brand_name })
104
- ] }),
105
- /* @__PURE__ */ s(
106
- f,
107
- {
108
- errorMessage: "Please try again later. If the problem persists please use the <strong>contact us</strong> link below to report the issue.",
109
- errorTitle: "We're sorry, there's currently an issue with our device and platform lists.",
110
- children: [
111
- r !== null && r.size > 0 && u === null && /* @__PURE__ */ e(O, { platformResources: r, ...y && { numberOfColumns: y } }),
112
- r !== null && r.size > 0 && u !== null && /* @__PURE__ */ e("div", { className: "find-us__error", children: /* @__PURE__ */ e("p", { className: "find-us__error-message", children: u }) }),
113
- r !== null && r.size === 0 && /* @__PURE__ */ e("div", { className: "find-us__error", children: /* @__PURE__ */ s("p", { className: "find-us__error-message", children: [
114
- "We couldn't find any viewing platforms for ",
115
- n.brand_name,
116
- "."
117
- ] }) })
118
- ]
119
- }
120
- )
121
- ] }) })
122
- ] });
146
+ ]
147
+ }
148
+ ) })
149
+ ]
150
+ }
151
+ );
123
152
  }
124
153
  export {
125
- G as FindUs,
126
- G as default
154
+ V as FindUs,
155
+ V as default
127
156
  };
@@ -483,9 +483,9 @@ p("ImageCardCore", () => {
483
483
  t(e).not.toBeInTheDocument();
484
484
  });
485
485
  }), p("Default CTA Labels", () => {
486
- l('should use "View Promo" for play-video when no label', () => {
486
+ l('should use "View Video" for play-video when no label', () => {
487
487
  const e = r({ type: "play-video", label: "" });
488
- a(/* @__PURE__ */ n(i, { cta: e, styles: o })), t(c.getByText("View Promo")).toBeInTheDocument();
488
+ a(/* @__PURE__ */ n(i, { cta: e, styles: o })), t(c.getByText("View Video")).toBeInTheDocument();
489
489
  }), l('should use "View More" for internal-link when no label', () => {
490
490
  const e = r({ type: "internal-link", label: "" });
491
491
  a(/* @__PURE__ */ n(i, { cta: e, styles: o })), t(c.getByText("View More")).toBeInTheDocument();
@@ -1,16 +1,16 @@
1
- import { jsx as s, jsxs as B } from "react/jsx-runtime";
2
- import { v as h, d as m, b as C, a as v, i as l, r as c, g as a, s as n, w as u } from "../../react.esm-S2Q_NbYC.mjs";
1
+ import { jsx as a, jsxs as B } from "react/jsx-runtime";
2
+ import { v as h, d as m, b as I, a as v, i as r, r as l, g as n, s as c, w as u } from "../../react.esm-S2Q_NbYC.mjs";
3
3
  import "../../index-BZQHStQa.mjs";
4
- import { PromotionsRowModule as r } from "./PromotionsRowModule.js";
4
+ import { PromotionsRowModule as s } from "./PromotionsRowModule.js";
5
5
  h.mock("../PromotionsRowBlock", () => ({
6
- default: ({ children: o, gap: e }) => /* @__PURE__ */ s("div", { "data-gap": e, "data-testid": "promotions-row-block", children: o })
6
+ default: ({ children: o, gap: e }) => /* @__PURE__ */ a("div", { "data-gap": e, "data-testid": "promotions-row-block", children: o })
7
7
  }));
8
8
  h.mock("../ImageCard", () => ({
9
- default: ({ image: o, title: e, content: i, cta: p, relatedResourceId: y, classname: T, overlayContent: I }) => /* @__PURE__ */ B(
9
+ default: ({ image: o, title: e, content: i, cta: p, relatedResourceId: y, classname: T, overlayContent: C }) => /* @__PURE__ */ B(
10
10
  "div",
11
11
  {
12
12
  "data-classname": T,
13
- "data-content": i,
13
+ "data-content": typeof i == "string" ? i : void 0,
14
14
  "data-cta-text": p == null ? void 0 : p.label,
15
15
  "data-image-url": o.url,
16
16
  "data-related-id": y,
@@ -19,7 +19,8 @@ h.mock("../ImageCard", () => ({
19
19
  children: [
20
20
  "ImageCard: ",
21
21
  e,
22
- I
22
+ i,
23
+ C
23
24
  ]
24
25
  }
25
26
  )
@@ -58,62 +59,62 @@ const g = {
58
59
  ...e
59
60
  });
60
61
  m("PromotionsRowModule", () => {
61
- C(() => {
62
+ I(() => {
62
63
  h.clearAllMocks();
63
64
  }), v(() => {
64
65
  h.clearAllMocks();
65
66
  }), m("Basic Rendering", () => {
66
- l("should render section with promotions-row class", () => {
67
- const o = [t("1")], { container: e } = c(/* @__PURE__ */ s(r, { promos: o })), i = e.querySelector("section.promotions-row");
68
- a(i).toBeInTheDocument();
69
- }), l("should render title when provided", () => {
67
+ r("should render section with promotions-row class", () => {
68
+ const o = [t("1")], { container: e } = l(/* @__PURE__ */ a(s, { promos: o })), i = e.querySelector("section.promotions-row");
69
+ n(i).toBeInTheDocument();
70
+ }), r("should render title when provided", () => {
70
71
  const o = [t("1")];
71
- c(/* @__PURE__ */ s(r, { promos: o, title: "Special Offers" })), a(n.getByRole("heading", { name: "Special Offers" })).toBeInTheDocument();
72
- }), l("should render title as h2 element", () => {
72
+ l(/* @__PURE__ */ a(s, { promos: o, title: "Special Offers" })), n(c.getByRole("heading", { name: "Special Offers" })).toBeInTheDocument();
73
+ }), r("should render title as h2 element", () => {
73
74
  const o = [t("1")];
74
- c(/* @__PURE__ */ s(r, { promos: o, title: "Special Offers" }));
75
- const e = n.getByRole("heading", { name: "Special Offers", level: 2 });
76
- a(e).toBeInTheDocument();
77
- }), l("should apply correct classes to title", () => {
75
+ l(/* @__PURE__ */ a(s, { promos: o, title: "Special Offers" }));
76
+ const e = c.getByRole("heading", { name: "Special Offers", level: 2 });
77
+ n(e).toBeInTheDocument();
78
+ }), r("should apply correct classes to title", () => {
78
79
  const o = [t("1")];
79
- c(/* @__PURE__ */ s(r, { promos: o, title: "Special Offers" }));
80
- const e = n.getByRole("heading", { name: "Special Offers" });
81
- a(e).toHaveClass("h2", "promotions-row__header");
82
- }), l("should render empty title when not provided", () => {
83
- const o = [t("1")], { container: e } = c(/* @__PURE__ */ s(r, { promos: o })), i = e.querySelector("h2");
84
- a(i).toHaveTextContent("");
80
+ l(/* @__PURE__ */ a(s, { promos: o, title: "Special Offers" }));
81
+ const e = c.getByRole("heading", { name: "Special Offers" });
82
+ n(e).toHaveClass("h2", "promotions-row__header");
83
+ }), r("should render empty title when not provided", () => {
84
+ const o = [t("1")], { container: e } = l(/* @__PURE__ */ a(s, { promos: o })), i = e.querySelector("h2");
85
+ n(i).toHaveTextContent("");
85
86
  });
86
87
  }), m("PromotionsRowBlock Rendering (≤4 promos)", () => {
87
- l("should render PromotionsRowBlock with single promo", () => {
88
+ r("should render PromotionsRowBlock with single promo", () => {
88
89
  const o = [t("1")];
89
- c(/* @__PURE__ */ s(r, { promos: o })), a(n.getByTestId("promotions-row-block")).toBeInTheDocument();
90
- }), l("should render PromotionsRowBlock with 2 promos", () => {
90
+ l(/* @__PURE__ */ a(s, { promos: o })), n(c.getByTestId("promotions-row-block")).toBeInTheDocument();
91
+ }), r("should render PromotionsRowBlock with 2 promos", () => {
91
92
  const o = [t("1"), t("2")];
92
- c(/* @__PURE__ */ s(r, { promos: o })), a(n.getByTestId("promotions-row-block")).toBeInTheDocument();
93
- }), l("should render PromotionsRowBlock with exactly 4 promos", () => {
93
+ l(/* @__PURE__ */ a(s, { promos: o })), n(c.getByTestId("promotions-row-block")).toBeInTheDocument();
94
+ }), r("should render PromotionsRowBlock with exactly 4 promos", () => {
94
95
  const o = [
95
96
  t("1"),
96
97
  t("2"),
97
98
  t("3"),
98
99
  t("4")
99
100
  ];
100
- c(/* @__PURE__ */ s(r, { promos: o })), a(n.getByTestId("promotions-row-block")).toBeInTheDocument();
101
- }), l("should apply 2rem gap to PromotionsRowBlock", () => {
101
+ l(/* @__PURE__ */ a(s, { promos: o })), n(c.getByTestId("promotions-row-block")).toBeInTheDocument();
102
+ }), r("should apply 2rem gap to PromotionsRowBlock", () => {
102
103
  const o = [t("1")];
103
- c(/* @__PURE__ */ s(r, { promos: o }));
104
- const e = n.getByTestId("promotions-row-block");
105
- a(e).toHaveAttribute("data-gap", "2rem");
106
- }), l("should not render Carousel when promos ≤ 4", () => {
104
+ l(/* @__PURE__ */ a(s, { promos: o }));
105
+ const e = c.getByTestId("promotions-row-block");
106
+ n(e).toHaveAttribute("data-gap", "2rem");
107
+ }), r("should not render Carousel when promos ≤ 4", () => {
107
108
  const o = [
108
109
  t("1"),
109
110
  t("2"),
110
111
  t("3"),
111
112
  t("4")
112
113
  ];
113
- c(/* @__PURE__ */ s(r, { promos: o })), a(n.queryByTestId("carousel")).not.toBeInTheDocument();
114
+ l(/* @__PURE__ */ a(s, { promos: o })), n(c.queryByTestId("carousel")).not.toBeInTheDocument();
114
115
  });
115
116
  }), m("Carousel Rendering (>4 promos)", () => {
116
- l("should render Carousel when promos > 4", async () => {
117
+ r("should render Carousel when promos > 4", async () => {
117
118
  const o = [
118
119
  t("1"),
119
120
  t("2"),
@@ -121,79 +122,92 @@ m("PromotionsRowModule", () => {
121
122
  t("4"),
122
123
  t("5")
123
124
  ];
124
- c(/* @__PURE__ */ s(r, { promos: o })), await u(() => {
125
- a(n.getByTestId("carousel")).toBeInTheDocument();
125
+ l(/* @__PURE__ */ a(s, { promos: o })), await u(() => {
126
+ n(c.getByTestId("carousel")).toBeInTheDocument();
126
127
  });
127
- }), l("should render h1 title for carousel view", async () => {
128
+ }), r("should render h1 title for carousel view", async () => {
128
129
  const o = Array.from({ length: 5 }, (e, i) => t(`${i + 1}`));
129
- c(/* @__PURE__ */ s(r, { promos: o, title: "Carousel Title" })), await u(() => {
130
- const e = n.getByRole("heading", { name: "Carousel Title", level: 1 });
131
- a(e).toBeInTheDocument();
130
+ l(/* @__PURE__ */ a(s, { promos: o, title: "Carousel Title" })), await u(() => {
131
+ const e = c.getByRole("heading", { name: "Carousel Title", level: 1 });
132
+ n(e).toBeInTheDocument();
132
133
  });
133
- }), l("should apply h3 class to carousel title", async () => {
134
+ }), r("should apply h3 class to carousel title", async () => {
134
135
  const o = Array.from({ length: 5 }, (e, i) => t(`${i + 1}`));
135
- c(/* @__PURE__ */ s(r, { promos: o, title: "Carousel Title" })), await u(() => {
136
- const e = n.getByRole("heading", { name: "Carousel Title" });
137
- a(e).toHaveClass("h3", "promotions-row__header");
136
+ l(/* @__PURE__ */ a(s, { promos: o, title: "Carousel Title" })), await u(() => {
137
+ const e = c.getByRole("heading", { name: "Carousel Title" });
138
+ n(e).toHaveClass("h3", "promotions-row__header");
138
139
  });
139
- }), l("should not render PromotionsRowBlock when carousel is shown", async () => {
140
+ }), r("should not render PromotionsRowBlock when carousel is shown", async () => {
140
141
  const o = Array.from({ length: 5 }, (e, i) => t(`${i + 1}`));
141
- c(/* @__PURE__ */ s(r, { promos: o })), await u(() => {
142
- a(n.getByTestId("carousel")).toBeInTheDocument();
143
- }), a(n.queryByTestId("promotions-row-block")).not.toBeInTheDocument();
144
- }), l("should pass correct number of cells to Carousel", async () => {
142
+ l(/* @__PURE__ */ a(s, { promos: o })), await u(() => {
143
+ n(c.getByTestId("carousel")).toBeInTheDocument();
144
+ }), n(c.queryByTestId("promotions-row-block")).not.toBeInTheDocument();
145
+ }), r("should pass correct number of cells to Carousel", async () => {
145
146
  const o = Array.from({ length: 6 }, (e, i) => t(`${i + 1}`));
146
- c(/* @__PURE__ */ s(r, { promos: o })), await u(() => {
147
- const e = n.getByTestId("carousel");
148
- a(e).toHaveAttribute("data-cells-count", "6");
147
+ l(/* @__PURE__ */ a(s, { promos: o })), await u(() => {
148
+ const e = c.getByTestId("carousel");
149
+ n(e).toHaveAttribute("data-cells-count", "6");
149
150
  });
150
151
  });
151
152
  }), m("ImageCard Rendering", () => {
152
- l("should render ImageCard for each promo", () => {
153
+ r("should render ImageCard for each promo", () => {
153
154
  const o = [
154
155
  t("1"),
155
156
  t("2"),
156
157
  t("3")
157
158
  ];
158
- c(/* @__PURE__ */ s(r, { promos: o }));
159
- const e = n.getAllByTestId("image-card");
160
- a(e).toHaveLength(3);
161
- }), l("should pass image prop to ImageCard", () => {
159
+ l(/* @__PURE__ */ a(s, { promos: o }));
160
+ const e = c.getAllByTestId("image-card");
161
+ n(e).toHaveLength(3);
162
+ }), r("should pass image prop to ImageCard", () => {
162
163
  const o = [t("1")];
163
- c(/* @__PURE__ */ s(r, { promos: o }));
164
- const e = n.getByTestId("image-card");
165
- a(e).toHaveAttribute("data-image-url", g.url);
166
- }), l("should pass title prop to ImageCard", () => {
164
+ l(/* @__PURE__ */ a(s, { promos: o }));
165
+ const e = c.getByTestId("image-card");
166
+ n(e).toHaveAttribute("data-image-url", g.url);
167
+ }), r("should pass title prop to ImageCard", () => {
167
168
  const o = [t("1", { title: "Special Promo" })];
168
- c(/* @__PURE__ */ s(r, { promos: o }));
169
- const e = n.getByTestId("image-card");
170
- a(e).toHaveAttribute("data-title", "Special Promo");
171
- }), l("should pass content prop to ImageCard", () => {
169
+ l(/* @__PURE__ */ a(s, { promos: o }));
170
+ const e = c.getByTestId("image-card");
171
+ n(e).toHaveAttribute("data-title", "Special Promo");
172
+ }), r("should pass content prop to ImageCard", () => {
172
173
  const o = [t("1", { content: "Special content" })];
173
- c(/* @__PURE__ */ s(r, { promos: o }));
174
- const e = n.getByTestId("image-card");
175
- a(e).toHaveAttribute("data-content", "Special content");
176
- }), l("should pass cta prop to ImageCard", () => {
174
+ l(/* @__PURE__ */ a(s, { promos: o, shouldClampContent: !1 }));
175
+ const e = c.getByTestId("image-card");
176
+ n(e).toHaveAttribute("data-content", "Special content");
177
+ }), r("should wrap content in a clamped-content div when shouldClampContent is true", () => {
178
+ const o = [t("1", { content: "Special content" })], { container: e } = l(
179
+ /* @__PURE__ */ a(s, { shouldClampContent: !0, promos: o })
180
+ ), i = e.querySelector(".promotions-row__clamped-content");
181
+ n(i).toBeInTheDocument(), n(i).toHaveTextContent("Special content");
182
+ }), r("should wrap content in a clamped-content div by default", () => {
183
+ const o = [t("1", { content: "Special content" })], { container: e } = l(/* @__PURE__ */ a(s, { promos: o })), i = e.querySelector(".promotions-row__clamped-content");
184
+ n(i).toBeInTheDocument(), n(i).toHaveTextContent("Special content");
185
+ }), r("should not wrap content when shouldClampContent is false", () => {
186
+ const o = [t("1", { content: "Special content" })], { container: e } = l(
187
+ /* @__PURE__ */ a(s, { promos: o, shouldClampContent: !1 })
188
+ ), i = e.querySelector(".promotions-row__clamped-content");
189
+ n(i).not.toBeInTheDocument();
190
+ }), r("should pass cta prop to ImageCard", () => {
177
191
  const o = [t("1")];
178
- c(/* @__PURE__ */ s(r, { promos: o }));
179
- const e = n.getByTestId("image-card");
180
- a(e).toHaveAttribute("data-cta-text", d.label);
181
- }), l("should pass relatedResourceId to ImageCard", () => {
192
+ l(/* @__PURE__ */ a(s, { promos: o }));
193
+ const e = c.getByTestId("image-card");
194
+ n(e).toHaveAttribute("data-cta-text", d.label);
195
+ }), r("should pass relatedResourceId to ImageCard", () => {
182
196
  const o = [t("test-id-123")];
183
- c(/* @__PURE__ */ s(r, { promos: o }));
184
- const e = n.getByTestId("image-card");
185
- a(e).toHaveAttribute("data-related-id", "test-id-123");
186
- }), l("should pass classname to ImageCard when provided", () => {
197
+ l(/* @__PURE__ */ a(s, { promos: o }));
198
+ const e = c.getByTestId("image-card");
199
+ n(e).toHaveAttribute("data-related-id", "test-id-123");
200
+ }), r("should pass classname to ImageCard when provided", () => {
187
201
  const o = [t("1", { classname: "custom-class" })];
188
- c(/* @__PURE__ */ s(r, { promos: o }));
189
- const e = n.getByTestId("image-card");
190
- a(e).toHaveAttribute("data-classname", "custom-class");
202
+ l(/* @__PURE__ */ a(s, { promos: o }));
203
+ const e = c.getByTestId("image-card");
204
+ n(e).toHaveAttribute("data-classname", "custom-class");
191
205
  });
192
206
  }), m("CtaBlock Overlay Content", () => {
193
- l("should not render CtaBlock when overlayContent is not provided", () => {
207
+ r("should not render CtaBlock when overlayContent is not provided", () => {
194
208
  const o = [t("1")];
195
- c(/* @__PURE__ */ s(r, { promos: o })), a(n.queryByTestId("cta-block")).not.toBeInTheDocument();
196
- }), l("should render CtaBlock when overlayContent is provided", () => {
209
+ l(/* @__PURE__ */ a(s, { promos: o })), n(c.queryByTestId("cta-block")).not.toBeInTheDocument();
210
+ }), r("should render CtaBlock when overlayContent is provided", () => {
197
211
  const o = [t("1", {
198
212
  overlayContent: {
199
213
  title: "Overlay Title",
@@ -201,69 +215,69 @@ m("PromotionsRowModule", () => {
201
215
  cta: d
202
216
  }
203
217
  })];
204
- c(/* @__PURE__ */ s(r, { promos: o })), a(n.getByTestId("cta-block")).toBeInTheDocument();
205
- }), l("should pass overlayContent title to CtaBlock", () => {
218
+ l(/* @__PURE__ */ a(s, { promos: o })), n(c.getByTestId("cta-block")).toBeInTheDocument();
219
+ }), r("should pass overlayContent title to CtaBlock", () => {
206
220
  const o = [t("1", {
207
221
  overlayContent: {
208
222
  title: "Overlay Title",
209
223
  cta: d
210
224
  }
211
225
  })];
212
- c(/* @__PURE__ */ s(r, { promos: o }));
213
- const e = n.getByTestId("cta-block");
214
- a(e).toHaveAttribute("data-title", "Overlay Title");
215
- }), l("should pass overlayContent cta to CtaBlock", () => {
226
+ l(/* @__PURE__ */ a(s, { promos: o }));
227
+ const e = c.getByTestId("cta-block");
228
+ n(e).toHaveAttribute("data-title", "Overlay Title");
229
+ }), r("should pass overlayContent cta to CtaBlock", () => {
216
230
  const o = [t("1", {
217
231
  overlayContent: {
218
232
  cta: d
219
233
  }
220
234
  })];
221
- c(/* @__PURE__ */ s(r, { promos: o }));
222
- const e = n.getByTestId("cta-block");
223
- a(e).toHaveAttribute("data-cta-text", d.label);
224
- }), l("should render multiple CtaBlocks for multiple promos with overlayContent", () => {
235
+ l(/* @__PURE__ */ a(s, { promos: o }));
236
+ const e = c.getByTestId("cta-block");
237
+ n(e).toHaveAttribute("data-cta-text", d.label);
238
+ }), r("should render multiple CtaBlocks for multiple promos with overlayContent", () => {
225
239
  const o = [
226
240
  t("1", { overlayContent: { title: "Overlay 1", cta: d } }),
227
241
  t("2", { overlayContent: { title: "Overlay 2", cta: d } }),
228
242
  t("3", { overlayContent: { title: "Overlay 3", cta: d } })
229
243
  ];
230
- c(/* @__PURE__ */ s(r, { promos: o }));
231
- const e = n.getAllByTestId("cta-block");
232
- a(e).toHaveLength(3);
244
+ l(/* @__PURE__ */ a(s, { promos: o }));
245
+ const e = c.getAllByTestId("cta-block");
246
+ n(e).toHaveLength(3);
233
247
  });
234
248
  }), m("HandleClicks Prop", () => {
235
- l("should use provided handleClicks function", () => {
249
+ r("should use provided handleClicks function", () => {
236
250
  const o = h.fn(), e = [t("1")];
237
- c(/* @__PURE__ */ s(r, { handleClicks: o, promos: e })), a(n.getByTestId("image-card")).toBeInTheDocument();
238
- }), l("should use default handleClicks when not provided", () => {
251
+ l(/* @__PURE__ */ a(s, { handleClicks: o, promos: e })), n(c.getByTestId("image-card")).toBeInTheDocument();
252
+ }), r("should use default handleClicks when not provided", () => {
239
253
  const o = [t("1")];
240
- c(/* @__PURE__ */ s(r, { promos: o })), a(n.getByTestId("image-card")).toBeInTheDocument();
241
- }), l("should use default handleClicks when null", () => {
254
+ l(/* @__PURE__ */ a(s, { promos: o })), n(c.getByTestId("image-card")).toBeInTheDocument();
255
+ }), r("should use default handleClicks when null", () => {
242
256
  const o = [t("1")];
243
- c(/* @__PURE__ */ s(r, { handleClicks: null, promos: o })), a(n.getByTestId("image-card")).toBeInTheDocument();
257
+ l(/* @__PURE__ */ a(s, { handleClicks: null, promos: o })), n(c.getByTestId("image-card")).toBeInTheDocument();
244
258
  });
245
259
  }), m("Edge Cases", () => {
246
- l("should handle empty promos array", () => {
247
- const { container: o } = c(/* @__PURE__ */ s(r, { promos: [] })), e = o.querySelector("section.promotions-row");
248
- a(e).toBeInTheDocument();
249
- }), l("should handle promos without optional fields", () => {
250
- c(/* @__PURE__ */ s(r, { promos: [{
260
+ r("should handle empty promos array", () => {
261
+ const { container: o } = l(/* @__PURE__ */ a(s, { promos: [] })), e = o.querySelector("section.promotions-row");
262
+ n(e).toBeInTheDocument();
263
+ }), r("should handle promos without optional fields", () => {
264
+ l(/* @__PURE__ */ a(s, { promos: [{
251
265
  id: "1",
252
266
  image: g
253
- }] })), a(n.getByTestId("image-card")).toBeInTheDocument();
254
- }), l("should handle very long title", () => {
255
- const o = "This is a very long title ".repeat(10).trim(), e = [t("1")], { container: i } = c(/* @__PURE__ */ s(r, { promos: e, title: o })), p = i.querySelector("h2");
256
- a(p).toHaveTextContent(o);
257
- }), l("should handle special characters in title", () => {
267
+ }] })), n(c.getByTestId("image-card")).toBeInTheDocument();
268
+ }), r("should handle very long title", () => {
269
+ const o = "This is a very long title ".repeat(10).trim(), e = [t("1")], { container: i } = l(/* @__PURE__ */ a(s, { promos: e, title: o })), p = i.querySelector("h2");
270
+ n(p).toHaveTextContent(o);
271
+ }), r("should handle special characters in title", () => {
258
272
  const o = 'Special & "Quoted" Title <test>', e = [t("1")];
259
- c(/* @__PURE__ */ s(r, { promos: e, title: o })), a(n.getByRole("heading", { name: o })).toBeInTheDocument();
260
- }), l("should handle many promos (>10)", async () => {
273
+ l(/* @__PURE__ */ a(s, { promos: e, title: o })), n(c.getByRole("heading", { name: o })).toBeInTheDocument();
274
+ }), r("should handle many promos (>10)", async () => {
261
275
  const o = Array.from({ length: 15 }, (e, i) => t(`${i + 1}`));
262
- c(/* @__PURE__ */ s(r, { promos: o })), await u(() => {
263
- const e = n.getByTestId("carousel");
264
- a(e).toHaveAttribute("data-cells-count", "15");
276
+ l(/* @__PURE__ */ a(s, { promos: o })), await u(() => {
277
+ const e = c.getByTestId("carousel");
278
+ n(e).toHaveAttribute("data-cells-count", "15");
265
279
  });
266
- }), l("should handle promos with undefined overlayContent properties", () => {
280
+ }), r("should handle promos with undefined overlayContent properties", () => {
267
281
  const o = [t("1", {
268
282
  overlayContent: {
269
283
  title: void 0,
@@ -271,29 +285,29 @@ m("PromotionsRowModule", () => {
271
285
  cta: void 0
272
286
  }
273
287
  })];
274
- c(/* @__PURE__ */ s(r, { promos: o })), a(n.getByTestId("cta-block")).toBeInTheDocument();
288
+ l(/* @__PURE__ */ a(s, { promos: o })), n(c.getByTestId("cta-block")).toBeInTheDocument();
275
289
  });
276
290
  }), m("Conditional Rendering Logic", () => {
277
- l("should switch from PromotionsRowBlock to Carousel when promos increase", async () => {
278
- const { rerender: o } = c(/* @__PURE__ */ s(r, { promos: [t("1")] }));
279
- a(n.getByTestId("promotions-row-block")).toBeInTheDocument();
291
+ r("should switch from PromotionsRowBlock to Carousel when promos increase", async () => {
292
+ const { rerender: o } = l(/* @__PURE__ */ a(s, { promos: [t("1")] }));
293
+ n(c.getByTestId("promotions-row-block")).toBeInTheDocument();
280
294
  const e = Array.from({ length: 5 }, (i, p) => t(`${p + 1}`));
281
- o(/* @__PURE__ */ s(r, { promos: e })), await u(() => {
282
- a(n.getByTestId("carousel")).toBeInTheDocument();
283
- }), a(n.queryByTestId("promotions-row-block")).not.toBeInTheDocument();
284
- }), l("should render section element for PromotionsRowBlock view", () => {
285
- const o = [t("1")], { container: e } = c(/* @__PURE__ */ s(r, { promos: o })), i = e.querySelector("section");
286
- a(i).toBeInTheDocument();
287
- }), l("should not render section element for Carousel view", async () => {
288
- const o = Array.from({ length: 5 }, (p, y) => t(`${y + 1}`)), { container: e } = c(/* @__PURE__ */ s(r, { promos: o }));
295
+ o(/* @__PURE__ */ a(s, { promos: e })), await u(() => {
296
+ n(c.getByTestId("carousel")).toBeInTheDocument();
297
+ }), n(c.queryByTestId("promotions-row-block")).not.toBeInTheDocument();
298
+ }), r("should render section element for PromotionsRowBlock view", () => {
299
+ const o = [t("1")], { container: e } = l(/* @__PURE__ */ a(s, { promos: o })), i = e.querySelector("section");
300
+ n(i).toBeInTheDocument();
301
+ }), r("should not render section element for Carousel view", async () => {
302
+ const o = Array.from({ length: 5 }, (p, y) => t(`${y + 1}`)), { container: e } = l(/* @__PURE__ */ a(s, { promos: o }));
289
303
  await u(() => {
290
- a(n.getByTestId("carousel")).toBeInTheDocument();
304
+ n(c.getByTestId("carousel")).toBeInTheDocument();
291
305
  });
292
306
  const i = e.querySelector("section");
293
- a(i).not.toBeInTheDocument();
307
+ n(i).not.toBeInTheDocument();
294
308
  });
295
309
  }), m("Integration", () => {
296
- l("should render complete module with all elements", () => {
310
+ r("should render complete module with all elements", () => {
297
311
  const o = [
298
312
  t("1", {
299
313
  title: "Promo 1",
@@ -305,28 +319,28 @@ m("PromotionsRowModule", () => {
305
319
  content: "Content 2"
306
320
  })
307
321
  ];
308
- c(/* @__PURE__ */ s(r, { promos: o, title: "Test Module" })), a(n.getByRole("heading", { name: "Test Module" })).toBeInTheDocument(), a(n.getByTestId("promotions-row-block")).toBeInTheDocument(), a(n.getAllByTestId("image-card")).toHaveLength(2), a(n.getByTestId("cta-block")).toBeInTheDocument();
309
- }), l("should render carousel with all promos when count > 4", async () => {
322
+ l(/* @__PURE__ */ a(s, { promos: o, title: "Test Module" })), n(c.getByRole("heading", { name: "Test Module" })).toBeInTheDocument(), n(c.getByTestId("promotions-row-block")).toBeInTheDocument(), n(c.getAllByTestId("image-card")).toHaveLength(2), n(c.getByTestId("cta-block")).toBeInTheDocument();
323
+ }), r("should render carousel with all promos when count > 4", async () => {
310
324
  const o = Array.from(
311
325
  { length: 8 },
312
326
  (e, i) => t(`${i + 1}`, { title: `Promo ${i + 1}` })
313
327
  );
314
- c(/* @__PURE__ */ s(r, { promos: o, title: "Carousel Module" })), await u(() => {
315
- a(n.getByRole("heading", { name: "Carousel Module", level: 1 })).toBeInTheDocument();
316
- const e = n.getByTestId("carousel");
317
- a(e).toHaveAttribute("data-cells-count", "8");
328
+ l(/* @__PURE__ */ a(s, { promos: o, title: "Carousel Module" })), await u(() => {
329
+ n(c.getByRole("heading", { name: "Carousel Module", level: 1 })).toBeInTheDocument();
330
+ const e = c.getByTestId("carousel");
331
+ n(e).toHaveAttribute("data-cells-count", "8");
318
332
  });
319
- }), l("should handle mix of promos with and without overlayContent", () => {
333
+ }), r("should handle mix of promos with and without overlayContent", () => {
320
334
  const o = [
321
335
  t("1", { overlayContent: { title: "Overlay 1", cta: d } }),
322
336
  t("2"),
323
337
  t("3", { overlayContent: { title: "Overlay 3", cta: d } })
324
338
  ];
325
- c(/* @__PURE__ */ s(r, { promos: o })), a(n.getAllByTestId("image-card")).toHaveLength(3), a(n.getAllByTestId("cta-block")).toHaveLength(2);
339
+ l(/* @__PURE__ */ a(s, { promos: o })), n(c.getAllByTestId("image-card")).toHaveLength(3), n(c.getAllByTestId("cta-block")).toHaveLength(2);
326
340
  });
327
341
  }), m("Type Safety", () => {
328
- l("should accept valid Promo array", () => {
329
- c(/* @__PURE__ */ s(r, { promos: [
342
+ r("should accept valid Promo array", () => {
343
+ l(/* @__PURE__ */ a(s, { promos: [
330
344
  {
331
345
  id: "1",
332
346
  title: "Promo 1",
@@ -338,12 +352,12 @@ m("PromotionsRowModule", () => {
338
352
  id: "2",
339
353
  image: g
340
354
  }
341
- ] })), a(n.getAllByTestId("image-card")).toHaveLength(2);
342
- }), l("should accept handleClicks function with correct signature", () => {
355
+ ] })), n(c.getAllByTestId("image-card")).toHaveLength(2);
356
+ }), r("should accept handleClicks function with correct signature", () => {
343
357
  const o = (i) => {
344
358
  console.warn(i);
345
359
  }, e = [t("1")];
346
- c(/* @__PURE__ */ s(r, { handleClicks: o, promos: e })), a(n.getByTestId("image-card")).toBeInTheDocument();
360
+ l(/* @__PURE__ */ a(s, { handleClicks: o, promos: e })), n(c.getByTestId("image-card")).toBeInTheDocument();
347
361
  });
348
362
  });
349
363
  });
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.5-aplha.1",
2
+ "version": "2.0.5",
3
3
  "name": "@scrippsproduct/networks-ui-library",
4
4
  "description": "React Component Library for use in Scripps Networks external applications",
5
5
  "author": {