@scrippsproduct/networks-ui-library 1.1.8 → 1.1.10-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/dist/{Form.module-Cd8qH2rj.mjs → Form.module-CarfWK5T.mjs} +1 -1
  2. package/dist/ResultsTable.module-wcNUQEKe.mjs +14 -0
  3. package/dist/_commonjsHelpers-DaMA6jEr.mjs +8 -0
  4. package/dist/assets/ResultsTable.css +1 -1
  5. package/dist/assets/ScheduleLayout.css +1 -1
  6. package/dist/{chevron-left-DRvpaLmK.mjs → chevron-left-D0UjbrKw.mjs} +1 -1
  7. package/dist/{chevron-right-C8yCnmfx.mjs → chevron-right-0ZF3LruR.mjs} +1 -1
  8. package/dist/components/ActionButton/ActionButton.test.js +209 -0
  9. package/dist/components/AdBlock/AdBlock.test.js +286 -0
  10. package/dist/components/AdjustableTwoColumnGrid/AdjustableTwoColumnGrid.test.js +295 -0
  11. package/dist/components/AirDateFormatter/AirDateFormatter.test.js +192 -0
  12. package/dist/components/AnchorTag/AnchorTag.test.js +463 -0
  13. package/dist/components/BCVideoPlayer/BCVideoPlayer.test.js +295 -0
  14. package/dist/components/BasicGridModule/BasicGridModule.js +41 -37
  15. package/dist/components/BasicGridModule/BasicGridModule.test.js +227 -0
  16. package/dist/components/Button/Button.test.js +434 -0
  17. package/dist/components/Carousel/Carousel.js +2 -2
  18. package/dist/components/Carousel/Carousel.test.js +705 -0
  19. package/dist/components/CarouselSlide/CarouselSlide.test.js +378 -0
  20. package/dist/components/CarouselSlide/slide-layouts/TwoColumn/TwoColumnSlide.js +1 -1
  21. package/dist/components/CastInfoLayout/CastInfoLayout.test.js +294 -0
  22. package/dist/components/ChannelSearch/ChannelSearch.test.js +565 -0
  23. package/dist/components/ChoicesItem/ChoicesItem.test.js +428 -0
  24. package/dist/components/Concat/Concat.js +1 -1
  25. package/dist/components/Concat/Concat.test.js +115 -0
  26. package/dist/components/CtaBlock/CtaBlock.js +1 -1
  27. package/dist/components/CtaBlock/CtaBlock.test.js +226 -0
  28. package/dist/components/CustomDataList/CustomDataList.js +4 -4
  29. package/dist/components/CustomSelect/CustomSelect.js +86 -86
  30. package/dist/components/CustomSelect/CustomSelect.test.js +313 -0
  31. package/dist/components/DateNavigation/DateNavigation.js +10 -10
  32. package/dist/components/DateNavigation/DateNavigation.test.js +370 -0
  33. package/dist/components/DatePicker/DatePicker.js +1 -1
  34. package/dist/components/DeviceAndPlatformLists/DeviceAndPlatformLists.test.js +288 -0
  35. package/dist/components/DrawerNavigation/DrawerNavigation.test.js +316 -0
  36. package/dist/components/EqualSizeFlexRow/EqualSizeFlexRow.test.js +337 -0
  37. package/dist/components/EqualSizeGrid/EqualSizeGrid.test.js +358 -0
  38. package/dist/components/ErrorHandler/ErrorHandler.js +2 -2
  39. package/dist/components/ErrorHandler/ErrorHandler.test.js +158 -0
  40. package/dist/components/FeaturedList/FeaturedList.test.js +353 -0
  41. package/dist/components/Figure/Figure.js +1 -1
  42. package/dist/components/Figure/Figure.test.js +198 -0
  43. package/dist/components/FindUs/FindUs.test.js +499 -0
  44. package/dist/components/FooterNavigation/FooterNavigation.test.js +310 -0
  45. package/dist/components/GenericList/GenericList.js +1 -1
  46. package/dist/components/GenericList/GenericList.test.js +288 -0
  47. package/dist/components/GetAirdateWrapper/GetAirdateWrapper.test.js +689 -0
  48. package/dist/components/GradientButton/GradientButton.d.ts +1 -1
  49. package/dist/components/GradientButton/GradientButton.js +33 -31
  50. package/dist/components/GradientButton/GradientButton.test.js +457 -0
  51. package/dist/components/GridList/GridList.test.js +371 -0
  52. package/dist/components/ImageCard/ImageCard.test.js +668 -0
  53. package/dist/components/ImageCard/ImageCardCore.js +28 -28
  54. package/dist/components/ImageCard/ImageCardCore.test.js +577 -0
  55. package/dist/components/ImageReplacementAnchor/ImageReplacementAnchor.test.js +379 -0
  56. package/dist/components/InfoPanel/InfoPanel.js +1 -1
  57. package/dist/components/InlineNavigation/InlineNavigation.test.js +149 -0
  58. package/dist/components/Input/Input.js +1 -1
  59. package/dist/components/Input/Input.test.js +263 -0
  60. package/dist/components/InstructionsList/InstructionsList.js +11 -11
  61. package/dist/components/InstructionsList/InstructionsList.test.js +181 -0
  62. package/dist/components/LogoListItem/LogoListItem.test.js +303 -0
  63. package/dist/components/LogoNavigation/LogoNavigation.test.js +352 -0
  64. package/dist/components/ModalContainer/ModalContainer.js +2 -2
  65. package/dist/components/NavList/NavList.test.js +332 -0
  66. package/dist/components/Overlay/Overlay.js +24 -23
  67. package/dist/components/Overlay/Overlay.test.js +198 -0
  68. package/dist/components/PageHero/PageHero.test.js +241 -0
  69. package/dist/components/PageHero/page-hero-layouts/IONShow/IONShowHero.js +1 -1
  70. package/dist/components/ProgramAirdate/ProgramAirdate.js +1 -1
  71. package/dist/components/ProgramAirdate/ProgramAirdate.test.js +414 -0
  72. package/dist/components/PromotionBlock/PromotionBlock.test.js +208 -0
  73. package/dist/components/PromotionsRowBlock/PromotionsRowBlock.test.js +221 -0
  74. package/dist/components/PromotionsRowModule/PromotionsRowModule.test.js +349 -0
  75. package/dist/components/RescanInstructions/RescanInstructions.test.js +218 -0
  76. package/dist/components/ResponsiveImage/ResponsiveImage.test.js +264 -0
  77. package/dist/components/ResultsTable/ResultsTable.js +9 -2
  78. package/dist/components/ResultsTable/ResultsTable.test.js +402 -0
  79. package/dist/components/ResultsTableBody/ResultsTableBody.js +1 -1
  80. package/dist/components/ResultsTableBody/ResultsTableBody.test.js +445 -0
  81. package/dist/components/ResultsTableHeader/ResultsTableHeader.js +37 -15
  82. package/dist/components/ResultsTableHeader/ResultsTableHeader.test.js +275 -0
  83. package/dist/components/ScheduleLayout/ScheduleContext.js +654 -626
  84. package/dist/components/ScheduleLayout/ScheduleLayout.js +1 -1
  85. package/dist/components/ScheduleLayout/useScheduleContext.js +5 -10
  86. package/dist/components/ScheduleList/ScheduleList.js +1 -1
  87. package/dist/components/SectionedContent/SectionedContent.js +1 -1
  88. package/dist/components/SectionedContent/SectionedContent.test.js +341 -0
  89. package/dist/components/Select/Select.js +24 -24
  90. package/dist/components/Select/Select.test.js +367 -0
  91. package/dist/components/ShowAboutContent/ShowAboutContent.js +1 -1
  92. package/dist/components/ShowAboutContent/ShowAboutContent.test.js +535 -0
  93. package/dist/components/ShowAboutLayout/ShowAboutLayout.test.js +570 -0
  94. package/dist/components/SocialLinks/SocialLinks.js +1 -1
  95. package/dist/components/StringList/StringList.js +1 -1
  96. package/dist/components/StringList/StringList.test.js +311 -0
  97. package/dist/components/TabContent/TabContent.js +1 -1
  98. package/dist/components/TabContent/TabContent.test.js +274 -0
  99. package/dist/components/TabNavigation/TabNavigation.js +21 -21
  100. package/dist/components/TabNavigation/TabNavigation.test.js +535 -0
  101. package/dist/components/TabbedContent/TabbedContent.test.js +654 -0
  102. package/dist/components/TextArea/TextArea.js +1 -1
  103. package/dist/components/UpcomingList/UpcomingList.test.js +471 -0
  104. package/dist/{index-VjANCDXC.mjs → index-06PEPfBQ.mjs} +1 -1
  105. package/dist/index-BUN4jQ3m.mjs +3098 -0
  106. package/dist/index-BVxBrkZB.mjs +3 -0
  107. package/dist/{index-DC2JJV3a.mjs → index-D3kkcgee.mjs} +1 -1
  108. package/dist/{index-C-kn9Zhn.mjs → index-DzfYkULW.mjs} +2 -1
  109. package/dist/magic-string.es-uPKorP4O.mjs +663 -0
  110. package/dist/matchers-35e4d3bd-BBPNTlen.mjs +2404 -0
  111. package/dist/react.esm-DLSrfVwM.mjs +23410 -0
  112. package/dist/test/setupTests.d.ts +1 -0
  113. package/dist/test/setupTests.js +55 -0
  114. package/dist/{triangle-PcCcGXjr.mjs → triangle-C4z906Wf.mjs} +1 -1
  115. package/dist/useScheduleContext-D7FdzNxe.mjs +17 -0
  116. package/dist/utils/analytics.js +1 -1
  117. package/dist/utils/getOnNowProgram.js +10 -10
  118. package/dist/{x-C-QzJ-qD.mjs → x-Ck9Vk5Fo.mjs} +1 -1
  119. package/package.json +4 -1
  120. package/dist/ResultsTable.module-1zxhXaem.mjs +0 -14
  121. package/dist/_commonjsHelpers-C6fGbg64.mjs +0 -6
@@ -0,0 +1,264 @@
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { d as c, b as h, i as a, r, g as o, s as m, v as g } from "../../react.esm-DLSrfVwM.mjs";
3
+ import { u as d } from "../../index-BUN4jQ3m.mjs";
4
+ import { ResponsiveImage as l } from "./ResponsiveImage.js";
5
+ c("ResponsiveImage", () => {
6
+ h(() => {
7
+ g.clearAllMocks();
8
+ }), c("Basic Rendering", () => {
9
+ a("should render picture element", () => {
10
+ const { container: e } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/image.jpg" })), t = e.querySelector("picture");
11
+ o(t).toBeInTheDocument();
12
+ }), a("should render img element inside picture", () => {
13
+ const { container: e } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/image.jpg" })), t = e.querySelector("img");
14
+ o(t).toBeInTheDocument();
15
+ }), a("should render img as child of picture", () => {
16
+ const { container: e } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/image.jpg" })), t = e.querySelector("picture"), i = t == null ? void 0 : t.querySelector("img");
17
+ o(i).toBeInTheDocument();
18
+ });
19
+ }), c("FullSizeUrl Prop", () => {
20
+ a("should set src attribute on img element", () => {
21
+ const { container: e } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/test-image.jpg" })), t = e.querySelector("img");
22
+ o(t).toHaveAttribute("src", "/test-image.jpg");
23
+ }), a("should handle absolute URLs", () => {
24
+ const { container: e } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "https://example.com/image.jpg" })), t = e.querySelector("img");
25
+ o(t).toHaveAttribute("src", "https://example.com/image.jpg");
26
+ }), a("should handle URLs with query parameters", () => {
27
+ const { container: e } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/image.jpg?width=800&quality=90" })), t = e.querySelector("img");
28
+ o(t).toHaveAttribute("src", "/image.jpg?width=800&quality=90");
29
+ }), a("should handle very long URLs", () => {
30
+ const e = "/path/to/very/long/directory/structure/image.jpg?param1=value1&param2=value2&param3=value3", { container: t } = r(/* @__PURE__ */ s(l, { fullSizeUrl: e })), i = t.querySelector("img");
31
+ o(i).toHaveAttribute("src", e);
32
+ });
33
+ }), c("Sources Array", () => {
34
+ a("should render default source element when sources not provided", () => {
35
+ const { container: e } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/image.jpg" })), t = e.querySelectorAll("source");
36
+ o(t).toHaveLength(1);
37
+ }), a("should render source element for each item in sources array", () => {
38
+ const e = [
39
+ { media: "min-width: 768px", srcsets: ["/large.jpg"] },
40
+ { media: "min-width: 480px", srcsets: ["/medium.jpg"] }
41
+ ], { container: t } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/small.jpg", sources: e })), i = t.querySelectorAll("source");
42
+ o(i).toHaveLength(2);
43
+ }), a("should render single source element", () => {
44
+ const e = [
45
+ { media: "min-width: 1024px", srcsets: ["/desktop.jpg"] }
46
+ ], { container: t } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/mobile.jpg", sources: e })), i = t.querySelectorAll("source");
47
+ o(i).toHaveLength(1);
48
+ }), a("should render multiple source elements", () => {
49
+ const e = [
50
+ { media: "min-width: 1200px", srcsets: ["/xlarge.jpg"] },
51
+ { media: "min-width: 992px", srcsets: ["/large.jpg"] },
52
+ { media: "min-width: 768px", srcsets: ["/medium.jpg"] },
53
+ { media: "min-width: 576px", srcsets: ["/small.jpg"] }
54
+ ], { container: t } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/mobile.jpg", sources: e })), i = t.querySelectorAll("source");
55
+ o(i).toHaveLength(4);
56
+ }), a("should render sources in order", () => {
57
+ const e = [
58
+ { media: "min-width: 1024px", srcsets: ["/large.jpg"] },
59
+ { media: "min-width: 768px", srcsets: ["/medium.jpg"] }
60
+ ], { container: t } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/small.jpg", sources: e })), i = t.querySelectorAll("source");
61
+ o(i[0]).toHaveAttribute("media", "(min-width: 1024px)"), o(i[1]).toHaveAttribute("media", "(min-width: 768px)");
62
+ });
63
+ }), c("Media Query Formatting", () => {
64
+ a("should wrap media query in parentheses", () => {
65
+ const e = [
66
+ { media: "min-width: 768px", srcsets: ["/large.jpg"] }
67
+ ], { container: t } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/small.jpg", sources: e })), i = t.querySelector("source");
68
+ o(i).toHaveAttribute("media", "(min-width: 768px)");
69
+ }), a("should handle empty media string", () => {
70
+ const e = [
71
+ { media: "", srcsets: ["/image.jpg"] }
72
+ ], { container: t } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/fallback.jpg", sources: e })), i = t.querySelector("source");
73
+ o(i).toHaveAttribute("media", "()");
74
+ }), a("should handle complex media queries", () => {
75
+ const e = [
76
+ { media: "min-width: 768px and max-width: 1024px", srcsets: ["/tablet.jpg"] }
77
+ ], { container: t } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/mobile.jpg", sources: e })), i = t.querySelector("source");
78
+ o(i).toHaveAttribute("media", "(min-width: 768px and max-width: 1024px)");
79
+ }), a("should handle orientation media queries", () => {
80
+ const e = [
81
+ { media: "orientation: landscape", srcsets: ["/landscape.jpg"] }
82
+ ], { container: t } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/portrait.jpg", sources: e })), i = t.querySelector("source");
83
+ o(i).toHaveAttribute("media", "(orientation: landscape)");
84
+ });
85
+ }), c("Srcset Handling", () => {
86
+ a("should join multiple srcsets with comma and space", () => {
87
+ const e = [
88
+ { media: "min-width: 768px", srcsets: ["/large.jpg 1x", "/large-2x.jpg 2x", "/large-3x.jpg 3x"] }
89
+ ], { container: t } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/small.jpg", sources: e })), i = t.querySelector("source");
90
+ o(i).toHaveAttribute("srcset", "/large.jpg 1x, /large-2x.jpg 2x, /large-3x.jpg 3x");
91
+ }), a("should handle single srcset", () => {
92
+ const e = [
93
+ { media: "min-width: 768px", srcsets: ["/large.jpg"] }
94
+ ], { container: t } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/small.jpg", sources: e })), i = t.querySelector("source");
95
+ o(i).toHaveAttribute("srcset", "/large.jpg");
96
+ }), a("should handle empty srcset array", () => {
97
+ const e = [
98
+ { media: "min-width: 768px", srcsets: [] }
99
+ ], { container: t } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/small.jpg", sources: e })), i = t.querySelector("source");
100
+ o(i).toHaveAttribute("srcset", "");
101
+ }), a("should handle srcsets with width descriptors", () => {
102
+ const e = [
103
+ { media: "min-width: 768px", srcsets: ["/small.jpg 480w", "/medium.jpg 768w", "/large.jpg 1200w"] }
104
+ ], { container: t } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/fallback.jpg", sources: e })), i = t.querySelector("source");
105
+ o(i).toHaveAttribute("srcset", "/small.jpg 480w, /medium.jpg 768w, /large.jpg 1200w");
106
+ });
107
+ }), c("AltText Prop", () => {
108
+ a("should set alt attribute when altText provided", () => {
109
+ r(/* @__PURE__ */ s(l, { altText: "Test image description", fullSizeUrl: "/image.jpg" }));
110
+ const e = m.getByRole("img", { name: "Test image description" });
111
+ o(e).toBeInTheDocument();
112
+ }), a("should use empty alt when altText not provided", () => {
113
+ const { container: e } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/image.jpg" })), t = e.querySelector("img");
114
+ o(t).toHaveAttribute("alt", "");
115
+ }), a("should handle empty string altText", () => {
116
+ const { container: e } = r(/* @__PURE__ */ s(l, { altText: "", fullSizeUrl: "/image.jpg" })), t = e.querySelector("img");
117
+ o(t).toHaveAttribute("alt", "");
118
+ }), a("should handle long altText", () => {
119
+ const e = "This is a very long image description that contains many words to describe the image in great detail for accessibility purposes";
120
+ r(/* @__PURE__ */ s(l, { altText: e, fullSizeUrl: "/image.jpg" }));
121
+ const t = m.getByRole("img", { name: e });
122
+ o(t).toBeInTheDocument();
123
+ }), a("should handle special characters in altText", () => {
124
+ r(/* @__PURE__ */ s(l, { altText: "Image with 'quotes' & ampersand", fullSizeUrl: "/image.jpg" }));
125
+ const e = m.getByRole("img", { name: "Image with 'quotes' & ampersand" });
126
+ o(e).toBeInTheDocument();
127
+ });
128
+ }), c("Classname Prop", () => {
129
+ a("should apply classname to picture element", () => {
130
+ const { container: e } = r(/* @__PURE__ */ s(l, { classname: "responsive-image", fullSizeUrl: "/image.jpg" })), t = e.querySelector("picture");
131
+ o(t).toHaveClass("responsive-image");
132
+ }), a("should use empty classname when not provided", () => {
133
+ const { container: e } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/image.jpg" })), t = e.querySelector("picture");
134
+ o(t).toHaveAttribute("class", "");
135
+ }), a("should handle multiple classes", () => {
136
+ const { container: e } = r(/* @__PURE__ */ s(l, { classname: "image-wrapper featured-image", fullSizeUrl: "/image.jpg" })), t = e.querySelector("picture");
137
+ o(t).toHaveClass("image-wrapper", "featured-image");
138
+ }), a("should not apply classname to img element", () => {
139
+ const { container: e } = r(/* @__PURE__ */ s(l, { classname: "picture-class", fullSizeUrl: "/image.jpg" })), t = e.querySelector("img");
140
+ o(t).not.toHaveClass("picture-class");
141
+ });
142
+ }), c("HandleClick Prop", () => {
143
+ a("should call handleClick when img is clicked", async () => {
144
+ const e = d.setup(), t = g.fn(), { container: i } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/image.jpg", handleClick: t })), n = i.querySelector("img");
145
+ n && await e.click(n), o(t).toHaveBeenCalledTimes(1);
146
+ }), a("should pass MouseEvent to handleClick", async () => {
147
+ const e = d.setup(), t = g.fn(), { container: i } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/image.jpg", handleClick: t })), n = i.querySelector("img");
148
+ n && await e.click(n), o(t).toHaveBeenCalledWith(o.any(Object)), o(t.mock.calls[0][0]).toHaveProperty("type", "click");
149
+ }), a("should use default handleClick when not provided", async () => {
150
+ const e = d.setup(), { container: t } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/image.jpg" })), i = t.querySelector("img");
151
+ i && await e.click(i), o(i).toBeInTheDocument();
152
+ }), a("should handle multiple clicks", async () => {
153
+ const e = d.setup(), t = g.fn(), { container: i } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/image.jpg", handleClick: t })), n = i.querySelector("img");
154
+ n && (await e.click(n), await e.click(n), await e.click(n)), o(t).toHaveBeenCalledTimes(3);
155
+ });
156
+ }), c("Loading Prop", () => {
157
+ a("should set loading to lazy by default", () => {
158
+ const { container: e } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/image.jpg" })), t = e.querySelector("img");
159
+ o(t).toHaveAttribute("loading", "lazy");
160
+ }), a("should set loading to eager when provided", () => {
161
+ const { container: e } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/image.jpg", loading: "eager" })), t = e.querySelector("img");
162
+ o(t).toHaveAttribute("loading", "eager");
163
+ }), a("should set loading to lazy when explicitly provided", () => {
164
+ const { container: e } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/image.jpg", loading: "lazy" })), t = e.querySelector("img");
165
+ o(t).toHaveAttribute("loading", "lazy");
166
+ }), a("should handle undefined loading", () => {
167
+ const { container: e } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/image.jpg", loading: void 0 })), t = e.querySelector("img");
168
+ o(t).toHaveAttribute("loading", "lazy");
169
+ });
170
+ }), c("Decoding Prop", () => {
171
+ a("should set decoding to async by default", () => {
172
+ const { container: e } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/image.jpg" })), t = e.querySelector("img");
173
+ o(t).toHaveAttribute("decoding", "async");
174
+ }), a("should set decoding to sync when provided", () => {
175
+ const { container: e } = r(/* @__PURE__ */ s(l, { decoding: "sync", fullSizeUrl: "/image.jpg" })), t = e.querySelector("img");
176
+ o(t).toHaveAttribute("decoding", "sync");
177
+ }), a("should set decoding to async when explicitly provided", () => {
178
+ const { container: e } = r(/* @__PURE__ */ s(l, { decoding: "async", fullSizeUrl: "/image.jpg" })), t = e.querySelector("img");
179
+ o(t).toHaveAttribute("decoding", "async");
180
+ }), a("should set decoding to auto when provided", () => {
181
+ const { container: e } = r(/* @__PURE__ */ s(l, { decoding: "auto", fullSizeUrl: "/image.jpg" })), t = e.querySelector("img");
182
+ o(t).toHaveAttribute("decoding", "auto");
183
+ });
184
+ }), c("Source Element Keys", () => {
185
+ a("should generate unique keys for source elements", () => {
186
+ const e = [
187
+ { media: "min-width: 1024px", srcsets: ["/large.jpg"] },
188
+ { media: "min-width: 768px", srcsets: ["/medium.jpg"] },
189
+ { media: "min-width: 480px", srcsets: ["/small.jpg"] }
190
+ ], { container: t } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/mobile.jpg", sources: e })), i = t.querySelectorAll("source");
191
+ o(i).toHaveLength(3), o(i[0]).toHaveAttribute("media", "(min-width: 1024px)"), o(i[1]).toHaveAttribute("media", "(min-width: 768px)"), o(i[2]).toHaveAttribute("media", "(min-width: 480px)");
192
+ });
193
+ }), c("Edge Cases", () => {
194
+ a("should handle source with very long media query", () => {
195
+ const e = [
196
+ { media: "min-width: 768px and max-width: 1024px and orientation: landscape and prefers-color-scheme: dark", srcsets: ["/image.jpg"] }
197
+ ], { container: t } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/fallback.jpg", sources: e })), i = t.querySelector("source");
198
+ o(i).toHaveAttribute("media", "(min-width: 768px and max-width: 1024px and orientation: landscape and prefers-color-scheme: dark)");
199
+ }), a("should handle many sources", () => {
200
+ const e = Array.from({ length: 10 }, (n, u) => ({
201
+ media: `min-width: ${u * 100}px`,
202
+ srcsets: [`/image-${u}.jpg`]
203
+ })), { container: t } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/fallback.jpg", sources: e })), i = t.querySelectorAll("source");
204
+ o(i).toHaveLength(10);
205
+ }), a("should handle special characters in URLs", () => {
206
+ const { container: e } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/images/photo%20(1).jpg?param=value&other=123" })), t = e.querySelector("img");
207
+ o(t).toHaveAttribute("src", "/images/photo%20(1).jpg?param=value&other=123");
208
+ }), a("should handle data URLs", () => {
209
+ const e = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==", { container: t } = r(/* @__PURE__ */ s(l, { fullSizeUrl: e })), i = t.querySelector("img");
210
+ o(i).toHaveAttribute("src", e);
211
+ });
212
+ }), c("Integration", () => {
213
+ a("should render complete responsive image with all props", () => {
214
+ const e = [
215
+ { media: "min-width: 1024px", srcsets: ["/large.jpg 1x", "/large-2x.jpg 2x"] },
216
+ { media: "min-width: 768px", srcsets: ["/medium.jpg 1x", "/medium-2x.jpg 2x"] }
217
+ ], t = g.fn(), { container: i } = r(
218
+ /* @__PURE__ */ s(
219
+ l,
220
+ {
221
+ altText: "Responsive test image",
222
+ classname: "featured-image",
223
+ decoding: "sync",
224
+ fullSizeUrl: "/small.jpg",
225
+ handleClick: t,
226
+ loading: "eager",
227
+ sources: e
228
+ }
229
+ )
230
+ ), n = i.querySelector("picture");
231
+ o(n).toHaveClass("featured-image");
232
+ const u = i.querySelectorAll("source");
233
+ o(u).toHaveLength(2), o(u[0]).toHaveAttribute("media", "(min-width: 1024px)"), o(u[0]).toHaveAttribute("srcset", "/large.jpg 1x, /large-2x.jpg 2x");
234
+ const p = m.getByRole("img", { name: "Responsive test image" });
235
+ o(p).toHaveAttribute("src", "/small.jpg"), o(p).toHaveAttribute("loading", "eager"), o(p).toHaveAttribute("decoding", "sync");
236
+ }), a("should render minimal responsive image", () => {
237
+ const { container: e } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/image.jpg" })), t = e.querySelector("picture");
238
+ o(t).toBeInTheDocument();
239
+ const i = e.querySelector("img");
240
+ o(i).toHaveAttribute("src", "/image.jpg"), o(i).toHaveAttribute("alt", ""), o(i).toHaveAttribute("loading", "lazy"), o(i).toHaveAttribute("decoding", "async");
241
+ }), a("should properly nest source elements before img", () => {
242
+ const e = [
243
+ { media: "min-width: 768px", srcsets: ["/large.jpg"] }
244
+ ], { container: t } = r(/* @__PURE__ */ s(l, { fullSizeUrl: "/small.jpg", sources: e })), i = t.querySelector("picture"), n = Array.from((i == null ? void 0 : i.children) || []);
245
+ o(n[0].tagName).toBe("SOURCE"), o(n[n.length - 1].tagName).toBe("IMG");
246
+ });
247
+ }), c("Type Safety", () => {
248
+ a("should accept valid sources array", () => {
249
+ const e = [
250
+ { media: "min-width: 768px", srcsets: ["/large.jpg"] }
251
+ ];
252
+ o(() => r(/* @__PURE__ */ s(l, { fullSizeUrl: "/small.jpg", sources: e }))).not.toThrow();
253
+ }), a("should accept valid loading values", () => {
254
+ o(() => r(/* @__PURE__ */ s(l, { fullSizeUrl: "/image.jpg", loading: "eager" }))).not.toThrow(), o(() => r(/* @__PURE__ */ s(l, { fullSizeUrl: "/image.jpg", loading: "lazy" }))).not.toThrow(), o(() => r(/* @__PURE__ */ s(l, { fullSizeUrl: "/image.jpg", loading: void 0 }))).not.toThrow();
255
+ }), a("should accept valid decoding values", () => {
256
+ o(() => r(/* @__PURE__ */ s(l, { decoding: "sync", fullSizeUrl: "/image.jpg" }))).not.toThrow(), o(() => r(/* @__PURE__ */ s(l, { decoding: "async", fullSizeUrl: "/image.jpg" }))).not.toThrow(), o(() => r(/* @__PURE__ */ s(l, { decoding: "auto", fullSizeUrl: "/image.jpg" }))).not.toThrow();
257
+ }), a("should accept handleClick function with correct signature", () => {
258
+ const e = (t) => {
259
+ console.warn("Clicked", t);
260
+ };
261
+ o(() => r(/* @__PURE__ */ s(l, { fullSizeUrl: "/image.jpg", handleClick: e }))).not.toThrow();
262
+ });
263
+ });
264
+ });
@@ -2,7 +2,7 @@ import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
2
  import { classes as m } from "../../utils/helpers.js";
3
3
  import { ResultsTableBody as f } from "../ResultsTableBody/ResultsTableBody.js";
4
4
  import { ResultsTableHeader as i } from "../ResultsTableHeader/ResultsTableHeader.js";
5
- import { s as e } from "../../ResultsTable.module-1zxhXaem.mjs";
5
+ import { s as e } from "../../ResultsTable.module-wcNUQEKe.mjs";
6
6
  function n({
7
7
  columns: s = [],
8
8
  results: l = [],
@@ -20,7 +20,14 @@ function n({
20
20
  ]),
21
21
  children: [
22
22
  /* @__PURE__ */ t(i, { columns: s }),
23
- /* @__PURE__ */ t(f, { columns: s, noResultsMsg: a, results: l })
23
+ /* @__PURE__ */ t(
24
+ f,
25
+ {
26
+ columns: s,
27
+ noResultsMsg: a,
28
+ results: l
29
+ }
30
+ )
24
31
  ]
25
32
  }
26
33
  );