@scrippsproduct/networks-ui-library 1.1.9 → 1.1.10

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 (120) 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/{chevron-left-DRvpaLmK.mjs → chevron-left-D0UjbrKw.mjs} +1 -1
  6. package/dist/{chevron-right-C8yCnmfx.mjs → chevron-right-0ZF3LruR.mjs} +1 -1
  7. package/dist/components/ActionButton/ActionButton.test.js +209 -0
  8. package/dist/components/AdBlock/AdBlock.test.js +286 -0
  9. package/dist/components/AdjustableTwoColumnGrid/AdjustableTwoColumnGrid.test.js +295 -0
  10. package/dist/components/AirDateFormatter/AirDateFormatter.test.js +192 -0
  11. package/dist/components/AnchorTag/AnchorTag.test.js +463 -0
  12. package/dist/components/BCVideoPlayer/BCVideoPlayer.test.js +295 -0
  13. package/dist/components/BasicGridModule/BasicGridModule.js +41 -37
  14. package/dist/components/BasicGridModule/BasicGridModule.test.js +227 -0
  15. package/dist/components/Button/Button.test.js +434 -0
  16. package/dist/components/Carousel/Carousel.js +2 -2
  17. package/dist/components/Carousel/Carousel.test.js +705 -0
  18. package/dist/components/CarouselSlide/CarouselSlide.test.js +378 -0
  19. package/dist/components/CarouselSlide/slide-layouts/TwoColumn/TwoColumnSlide.js +1 -1
  20. package/dist/components/CastInfoLayout/CastInfoLayout.test.js +294 -0
  21. package/dist/components/ChannelSearch/ChannelSearch.test.js +565 -0
  22. package/dist/components/ChoicesItem/ChoicesItem.test.js +428 -0
  23. package/dist/components/Concat/Concat.js +1 -1
  24. package/dist/components/Concat/Concat.test.js +115 -0
  25. package/dist/components/CtaBlock/CtaBlock.js +1 -1
  26. package/dist/components/CtaBlock/CtaBlock.test.js +226 -0
  27. package/dist/components/CustomDataList/CustomDataList.js +4 -4
  28. package/dist/components/CustomSelect/CustomSelect.js +86 -86
  29. package/dist/components/CustomSelect/CustomSelect.test.js +313 -0
  30. package/dist/components/DateNavigation/DateNavigation.js +10 -10
  31. package/dist/components/DateNavigation/DateNavigation.test.js +370 -0
  32. package/dist/components/DatePicker/DatePicker.js +1 -1
  33. package/dist/components/DeviceAndPlatformLists/DeviceAndPlatformLists.test.js +288 -0
  34. package/dist/components/DrawerNavigation/DrawerNavigation.test.js +316 -0
  35. package/dist/components/EqualSizeFlexRow/EqualSizeFlexRow.test.js +337 -0
  36. package/dist/components/EqualSizeGrid/EqualSizeGrid.test.js +358 -0
  37. package/dist/components/ErrorHandler/ErrorHandler.js +2 -2
  38. package/dist/components/ErrorHandler/ErrorHandler.test.js +158 -0
  39. package/dist/components/FeaturedList/FeaturedList.test.js +353 -0
  40. package/dist/components/Figure/Figure.js +1 -1
  41. package/dist/components/Figure/Figure.test.js +198 -0
  42. package/dist/components/FindUs/FindUs.test.js +499 -0
  43. package/dist/components/FooterNavigation/FooterNavigation.test.js +310 -0
  44. package/dist/components/GenericList/GenericList.js +1 -1
  45. package/dist/components/GenericList/GenericList.test.js +288 -0
  46. package/dist/components/GetAirdateWrapper/GetAirdateWrapper.test.js +689 -0
  47. package/dist/components/GradientButton/GradientButton.d.ts +1 -1
  48. package/dist/components/GradientButton/GradientButton.js +33 -31
  49. package/dist/components/GradientButton/GradientButton.test.js +457 -0
  50. package/dist/components/GridList/GridList.test.js +371 -0
  51. package/dist/components/ImageCard/ImageCard.test.js +668 -0
  52. package/dist/components/ImageCard/ImageCardCore.js +28 -28
  53. package/dist/components/ImageCard/ImageCardCore.test.js +577 -0
  54. package/dist/components/ImageReplacementAnchor/ImageReplacementAnchor.test.js +379 -0
  55. package/dist/components/InfoPanel/InfoPanel.js +1 -1
  56. package/dist/components/InlineNavigation/InlineNavigation.test.js +149 -0
  57. package/dist/components/Input/Input.js +1 -1
  58. package/dist/components/Input/Input.test.js +263 -0
  59. package/dist/components/InstructionsList/InstructionsList.js +11 -11
  60. package/dist/components/InstructionsList/InstructionsList.test.js +181 -0
  61. package/dist/components/LogoListItem/LogoListItem.test.js +303 -0
  62. package/dist/components/LogoNavigation/LogoNavigation.test.js +352 -0
  63. package/dist/components/ModalContainer/ModalContainer.js +2 -2
  64. package/dist/components/NavList/NavList.test.js +332 -0
  65. package/dist/components/Overlay/Overlay.js +24 -23
  66. package/dist/components/Overlay/Overlay.test.js +198 -0
  67. package/dist/components/PageHero/PageHero.test.js +241 -0
  68. package/dist/components/PageHero/page-hero-layouts/IONShow/IONShowHero.js +1 -1
  69. package/dist/components/ProgramAirdate/ProgramAirdate.js +1 -1
  70. package/dist/components/ProgramAirdate/ProgramAirdate.test.js +414 -0
  71. package/dist/components/PromotionBlock/PromotionBlock.test.js +208 -0
  72. package/dist/components/PromotionsRowBlock/PromotionsRowBlock.test.js +221 -0
  73. package/dist/components/PromotionsRowModule/PromotionsRowModule.test.js +349 -0
  74. package/dist/components/RescanInstructions/RescanInstructions.test.js +218 -0
  75. package/dist/components/ResponsiveImage/ResponsiveImage.test.js +264 -0
  76. package/dist/components/ResultsTable/ResultsTable.js +9 -2
  77. package/dist/components/ResultsTable/ResultsTable.test.js +402 -0
  78. package/dist/components/ResultsTableBody/ResultsTableBody.js +1 -1
  79. package/dist/components/ResultsTableBody/ResultsTableBody.test.js +445 -0
  80. package/dist/components/ResultsTableHeader/ResultsTableHeader.js +37 -15
  81. package/dist/components/ResultsTableHeader/ResultsTableHeader.test.js +275 -0
  82. package/dist/components/ScheduleLayout/ScheduleContext.js +654 -626
  83. package/dist/components/ScheduleLayout/ScheduleLayout.js +1 -1
  84. package/dist/components/ScheduleLayout/useScheduleContext.js +5 -10
  85. package/dist/components/ScheduleList/ScheduleList.js +1 -1
  86. package/dist/components/SectionedContent/SectionedContent.js +1 -1
  87. package/dist/components/SectionedContent/SectionedContent.test.js +341 -0
  88. package/dist/components/Select/Select.js +24 -24
  89. package/dist/components/Select/Select.test.js +367 -0
  90. package/dist/components/ShowAboutContent/ShowAboutContent.js +1 -1
  91. package/dist/components/ShowAboutContent/ShowAboutContent.test.js +535 -0
  92. package/dist/components/ShowAboutLayout/ShowAboutLayout.test.js +570 -0
  93. package/dist/components/SocialLinks/SocialLinks.js +1 -1
  94. package/dist/components/StringList/StringList.js +1 -1
  95. package/dist/components/StringList/StringList.test.js +311 -0
  96. package/dist/components/TabContent/TabContent.js +1 -1
  97. package/dist/components/TabContent/TabContent.test.js +274 -0
  98. package/dist/components/TabNavigation/TabNavigation.js +21 -21
  99. package/dist/components/TabNavigation/TabNavigation.test.js +535 -0
  100. package/dist/components/TabbedContent/TabbedContent.test.js +654 -0
  101. package/dist/components/TextArea/TextArea.js +1 -1
  102. package/dist/components/UpcomingList/UpcomingList.test.js +471 -0
  103. package/dist/{index-VjANCDXC.mjs → index-06PEPfBQ.mjs} +1 -1
  104. package/dist/index-BUN4jQ3m.mjs +3098 -0
  105. package/dist/index-BVxBrkZB.mjs +3 -0
  106. package/dist/{index-DC2JJV3a.mjs → index-D3kkcgee.mjs} +1 -1
  107. package/dist/{index-C-kn9Zhn.mjs → index-DzfYkULW.mjs} +2 -1
  108. package/dist/magic-string.es-uPKorP4O.mjs +663 -0
  109. package/dist/matchers-35e4d3bd-BBPNTlen.mjs +2404 -0
  110. package/dist/react.esm-DLSrfVwM.mjs +23410 -0
  111. package/dist/test/setupTests.d.ts +1 -0
  112. package/dist/test/setupTests.js +55 -0
  113. package/dist/{triangle-PcCcGXjr.mjs → triangle-C4z906Wf.mjs} +1 -1
  114. package/dist/useScheduleContext-D7FdzNxe.mjs +17 -0
  115. package/dist/utils/analytics.js +1 -1
  116. package/dist/utils/getOnNowProgram.js +10 -10
  117. package/dist/{x-C-QzJ-qD.mjs → x-Ck9Vk5Fo.mjs} +1 -1
  118. package/package.json +4 -1
  119. package/dist/ResultsTable.module-1zxhXaem.mjs +0 -14
  120. package/dist/_commonjsHelpers-C6fGbg64.mjs +0 -6
@@ -0,0 +1,295 @@
1
+ import { jsxs as u, jsx as e, Fragment as s } from "react/jsx-runtime";
2
+ import { d as a, i as n, r as c, g as o, s as d } from "../../react.esm-DLSrfVwM.mjs";
3
+ import "../../index-BVxBrkZB.mjs";
4
+ import { AdjustableTwoColumnGrid as i } from "./AdjustableTwoColumnGrid.js";
5
+ a("AdjustableTwoColumnGrid", () => {
6
+ a("Basic Rendering", () => {
7
+ n("should render with two child elements", () => {
8
+ const { container: t } = c(
9
+ /* @__PURE__ */ u(i, { children: [
10
+ /* @__PURE__ */ e("div", { children: "Column 1" }),
11
+ /* @__PURE__ */ e("div", { children: "Column 2" })
12
+ ] })
13
+ );
14
+ o(d.getByText("Column 1")).toBeInTheDocument(), o(d.getByText("Column 2")).toBeInTheDocument();
15
+ const l = t.querySelectorAll('[class*="two-column-layout__column"]');
16
+ o(l).toHaveLength(2);
17
+ }), n("should render children in correct columns", () => {
18
+ const { container: t } = c(
19
+ /* @__PURE__ */ u(i, { children: [
20
+ /* @__PURE__ */ e("div", { "data-testid": "first-child", children: "First" }),
21
+ /* @__PURE__ */ e("div", { "data-testid": "second-child", children: "Second" })
22
+ ] })
23
+ ), l = t.querySelector('[class*="two-column-layout__column-one"]'), r = t.querySelector('[class*="two-column-layout__column-two"]');
24
+ o(l).toContainElement(d.getByTestId("first-child")), o(r).toContainElement(d.getByTestId("second-child"));
25
+ }), n("should render with custom element tag", () => {
26
+ const { container: t } = c(
27
+ /* @__PURE__ */ u(i, { children: [
28
+ /* @__PURE__ */ e("div", { children: "Column 1" }),
29
+ /* @__PURE__ */ e("div", { children: "Column 2" })
30
+ ] })
31
+ ), l = t.querySelector("adjustable-two-column-layout");
32
+ o(l).toBeInTheDocument();
33
+ });
34
+ }), a("Default Props", () => {
35
+ n("should apply default gap of 1.5rem", () => {
36
+ const { container: t } = c(
37
+ /* @__PURE__ */ u(i, { children: [
38
+ /* @__PURE__ */ e("div", { children: "Column 1" }),
39
+ /* @__PURE__ */ e("div", { children: "Column 2" })
40
+ ] })
41
+ ), l = t.querySelector("adjustable-two-column-layout");
42
+ o(l).toHaveStyle({ "--atcl-gap-size": "1.5rem" });
43
+ }), n("should apply default firstColumnWidth of 33%", () => {
44
+ const { container: t } = c(
45
+ /* @__PURE__ */ u(i, { children: [
46
+ /* @__PURE__ */ e("div", { children: "Column 1" }),
47
+ /* @__PURE__ */ e("div", { children: "Column 2" })
48
+ ] })
49
+ ), l = t.querySelector("adjustable-two-column-layout");
50
+ o(l).toHaveStyle({ "--atcl-first-column-width": "33%" });
51
+ }), n("should apply empty classname by default", () => {
52
+ const { container: t } = c(
53
+ /* @__PURE__ */ u(i, { children: [
54
+ /* @__PURE__ */ e("div", { children: "Column 1" }),
55
+ /* @__PURE__ */ e("div", { children: "Column 2" })
56
+ ] })
57
+ ), l = t.querySelector("adjustable-two-column-layout");
58
+ o(l).toHaveAttribute("class", "");
59
+ });
60
+ }), a("Custom Gap Prop", () => {
61
+ n("should apply custom gap in rem units", () => {
62
+ const { container: t } = c(
63
+ /* @__PURE__ */ u(i, { gap: "2rem", children: [
64
+ /* @__PURE__ */ e("div", { children: "Column 1" }),
65
+ /* @__PURE__ */ e("div", { children: "Column 2" })
66
+ ] })
67
+ ), l = t.querySelector("adjustable-two-column-layout");
68
+ o(l).toHaveStyle({ "--atcl-gap-size": "2rem" });
69
+ }), n("should apply custom gap in pixel units", () => {
70
+ const { container: t } = c(
71
+ /* @__PURE__ */ u(i, { gap: "24px", children: [
72
+ /* @__PURE__ */ e("div", { children: "Column 1" }),
73
+ /* @__PURE__ */ e("div", { children: "Column 2" })
74
+ ] })
75
+ ), l = t.querySelector("adjustable-two-column-layout");
76
+ o(l).toHaveStyle({ "--atcl-gap-size": "24px" });
77
+ }), n("should apply custom gap with zero value", () => {
78
+ const { container: t } = c(
79
+ /* @__PURE__ */ u(i, { gap: "0", children: [
80
+ /* @__PURE__ */ e("div", { children: "Column 1" }),
81
+ /* @__PURE__ */ e("div", { children: "Column 2" })
82
+ ] })
83
+ ), l = t.querySelector("adjustable-two-column-layout");
84
+ o(l).toHaveStyle({ "--atcl-gap-size": "0" });
85
+ });
86
+ }), a("Custom FirstColumnWidth Prop", () => {
87
+ n("should apply numeric width as percentage", () => {
88
+ const { container: t } = c(
89
+ /* @__PURE__ */ u(i, { firstColumnWidth: 50, children: [
90
+ /* @__PURE__ */ e("div", { children: "Column 1" }),
91
+ /* @__PURE__ */ e("div", { children: "Column 2" })
92
+ ] })
93
+ ), l = t.querySelector("adjustable-two-column-layout");
94
+ o(l).toHaveStyle({ "--atcl-first-column-width": "50%" });
95
+ }), n("should apply string width as-is", () => {
96
+ const { container: t } = c(
97
+ /* @__PURE__ */ u(i, { firstColumnWidth: "300px", children: [
98
+ /* @__PURE__ */ e("div", { children: "Column 1" }),
99
+ /* @__PURE__ */ e("div", { children: "Column 2" })
100
+ ] })
101
+ ), l = t.querySelector("adjustable-two-column-layout");
102
+ o(l).toHaveStyle({ "--atcl-first-column-width": "300px" });
103
+ }), n("should handle zero width", () => {
104
+ const { container: t } = c(
105
+ /* @__PURE__ */ u(i, { firstColumnWidth: 0, children: [
106
+ /* @__PURE__ */ e("div", { children: "Column 1" }),
107
+ /* @__PURE__ */ e("div", { children: "Column 2" })
108
+ ] })
109
+ ), l = t.querySelector("adjustable-two-column-layout");
110
+ o(l).toHaveStyle({ "--atcl-first-column-width": "0%" });
111
+ }), n("should handle 100 percent width", () => {
112
+ const { container: t } = c(
113
+ /* @__PURE__ */ u(i, { firstColumnWidth: 100, children: [
114
+ /* @__PURE__ */ e("div", { children: "Column 1" }),
115
+ /* @__PURE__ */ e("div", { children: "Column 2" })
116
+ ] })
117
+ ), l = t.querySelector("adjustable-two-column-layout");
118
+ o(l).toHaveStyle({ "--atcl-first-column-width": "100%" });
119
+ }), n("should handle string with rem units", () => {
120
+ const { container: t } = c(
121
+ /* @__PURE__ */ u(i, { firstColumnWidth: "20rem", children: [
122
+ /* @__PURE__ */ e("div", { children: "Column 1" }),
123
+ /* @__PURE__ */ e("div", { children: "Column 2" })
124
+ ] })
125
+ ), l = t.querySelector("adjustable-two-column-layout");
126
+ o(l).toHaveStyle({ "--atcl-first-column-width": "20rem" });
127
+ }), n("should handle string with percentage", () => {
128
+ const { container: t } = c(
129
+ /* @__PURE__ */ u(i, { firstColumnWidth: "40%", children: [
130
+ /* @__PURE__ */ e("div", { children: "Column 1" }),
131
+ /* @__PURE__ */ e("div", { children: "Column 2" })
132
+ ] })
133
+ ), l = t.querySelector("adjustable-two-column-layout");
134
+ o(l).toHaveStyle({ "--atcl-first-column-width": "40%" });
135
+ });
136
+ }), a("Custom Classname Prop", () => {
137
+ n("should apply single custom classname", () => {
138
+ const { container: t } = c(
139
+ /* @__PURE__ */ u(i, { classname: "custom-layout", children: [
140
+ /* @__PURE__ */ e("div", { children: "Column 1" }),
141
+ /* @__PURE__ */ e("div", { children: "Column 2" })
142
+ ] })
143
+ ), l = t.querySelector("adjustable-two-column-layout");
144
+ o(l).toHaveClass("custom-layout");
145
+ }), n("should apply multiple custom classnames", () => {
146
+ const { container: t } = c(
147
+ /* @__PURE__ */ u(i, { classname: "custom-layout theme-dark", children: [
148
+ /* @__PURE__ */ e("div", { children: "Column 1" }),
149
+ /* @__PURE__ */ e("div", { children: "Column 2" })
150
+ ] })
151
+ ), l = t.querySelector("adjustable-two-column-layout");
152
+ o(l).toHaveClass("custom-layout"), o(l).toHaveClass("theme-dark");
153
+ });
154
+ }), a("Combined Props", () => {
155
+ n("should apply all custom props together", () => {
156
+ const { container: t } = c(
157
+ /* @__PURE__ */ u(
158
+ i,
159
+ {
160
+ classname: "custom-grid",
161
+ firstColumnWidth: 40,
162
+ gap: "3rem",
163
+ children: [
164
+ /* @__PURE__ */ e("div", { children: "Column 1" }),
165
+ /* @__PURE__ */ e("div", { children: "Column 2" })
166
+ ]
167
+ }
168
+ )
169
+ ), l = t.querySelector("adjustable-two-column-layout");
170
+ o(l).toHaveClass("custom-grid"), o(l).toHaveStyle({ "--atcl-gap-size": "3rem" }), o(l).toHaveStyle({ "--atcl-first-column-width": "40%" });
171
+ });
172
+ }), a("Children Handling", () => {
173
+ n("should handle only first two children when more are provided", () => {
174
+ const { container: t } = c(
175
+ /* @__PURE__ */ u(i, { children: [
176
+ /* @__PURE__ */ e("div", { "data-testid": "child-1", children: "First" }),
177
+ /* @__PURE__ */ e("div", { "data-testid": "child-2", children: "Second" }),
178
+ /* @__PURE__ */ e("div", { "data-testid": "child-3", children: "Third" }),
179
+ /* @__PURE__ */ e("div", { "data-testid": "child-4", children: "Fourth" })
180
+ ] })
181
+ ), l = t.querySelector('[class*="two-column-layout__column-one"]'), r = t.querySelector('[class*="two-column-layout__column-two"]');
182
+ o(l).toContainElement(d.getByTestId("child-1")), o(r).toContainElement(d.getByTestId("child-2")), o(d.queryByTestId("child-3")).not.toBeInTheDocument(), o(d.queryByTestId("child-4")).not.toBeInTheDocument();
183
+ }), n("should handle complex child components", () => {
184
+ const t = ({ text: l }) => /* @__PURE__ */ u("div", { children: [
185
+ /* @__PURE__ */ e("h2", { children: l }),
186
+ /* @__PURE__ */ e("p", { children: "Paragraph" })
187
+ ] });
188
+ c(
189
+ /* @__PURE__ */ u(i, { children: [
190
+ /* @__PURE__ */ e(t, { text: "Left Side" }),
191
+ /* @__PURE__ */ e(t, { text: "Right Side" })
192
+ ] })
193
+ ), o(d.getByText("Left Side")).toBeInTheDocument(), o(d.getByText("Right Side")).toBeInTheDocument(), o(d.getAllByText("Paragraph")).toHaveLength(2);
194
+ }), n("should handle fragment children", () => {
195
+ const { container: t } = c(
196
+ /* @__PURE__ */ u(i, { children: [
197
+ /* @__PURE__ */ e(s, { children: /* @__PURE__ */ e("div", { children: "Fragment Child 1" }) }),
198
+ /* @__PURE__ */ e(s, { children: /* @__PURE__ */ e("div", { children: "Fragment Child 2" }) })
199
+ ] })
200
+ ), l = t.querySelector('[class*="two-column-layout__column-one"]'), r = t.querySelector('[class*="two-column-layout__column-two"]');
201
+ o(l).toContainElement(d.getByText("Fragment Child 1")), o(r).toContainElement(d.getByText("Fragment Child 2"));
202
+ }), n("should handle null or undefined children gracefully", () => {
203
+ const { container: t } = c(
204
+ /* @__PURE__ */ u(i, { children: [
205
+ /* @__PURE__ */ e("div", { children: "First" }),
206
+ null
207
+ ] })
208
+ ), l = t.querySelector('[class*="two-column-layout__column-one"]'), r = t.querySelector('[class*="two-column-layout__column-two"]');
209
+ o(l).toContainElement(d.getByText("First")), o(r).toBeEmptyDOMElement();
210
+ }), n("should handle single child", () => {
211
+ const { container: t } = c(
212
+ /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e("div", { children: "Only Child" }) })
213
+ ), l = t.querySelector('[class*="two-column-layout__column-one"]'), r = t.querySelector('[class*="two-column-layout__column-two"]');
214
+ o(l).toContainElement(d.getByText("Only Child")), o(r).toBeEmptyDOMElement();
215
+ });
216
+ }), a("CSS Custom Properties", () => {
217
+ n("should set CSS custom properties correctly", () => {
218
+ const { container: t } = c(
219
+ /* @__PURE__ */ u(
220
+ i,
221
+ {
222
+ firstColumnWidth: 25,
223
+ gap: "4rem",
224
+ children: [
225
+ /* @__PURE__ */ e("div", { children: "Column 1" }),
226
+ /* @__PURE__ */ e("div", { children: "Column 2" })
227
+ ]
228
+ }
229
+ )
230
+ ), l = t.querySelector("adjustable-two-column-layout");
231
+ o(l).toHaveStyle({
232
+ "--atcl-gap-size": "4rem",
233
+ "--atcl-first-column-width": "25%"
234
+ });
235
+ });
236
+ }), a("Edge Cases", () => {
237
+ n("should handle empty children prop", () => {
238
+ const { container: t } = c(
239
+ /* @__PURE__ */ e(i, { children: [] })
240
+ ), l = t.querySelector("adjustable-two-column-layout");
241
+ o(l).toBeInTheDocument();
242
+ const r = t.querySelectorAll('[class*="two-column-layout__column"]');
243
+ o(r).toHaveLength(2);
244
+ }), n("should handle very large firstColumnWidth values", () => {
245
+ const { container: t } = c(
246
+ /* @__PURE__ */ u(i, { firstColumnWidth: 500, children: [
247
+ /* @__PURE__ */ e("div", { children: "Column 1" }),
248
+ /* @__PURE__ */ e("div", { children: "Column 2" })
249
+ ] })
250
+ ), l = t.querySelector("adjustable-two-column-layout");
251
+ o(l).toHaveStyle({ "--atcl-first-column-width": "500%" });
252
+ }), n("should handle negative firstColumnWidth values", () => {
253
+ const { container: t } = c(
254
+ /* @__PURE__ */ u(i, { firstColumnWidth: -10, children: [
255
+ /* @__PURE__ */ e("div", { children: "Column 1" }),
256
+ /* @__PURE__ */ e("div", { children: "Column 2" })
257
+ ] })
258
+ ), l = t.querySelector("adjustable-two-column-layout");
259
+ o(l).toHaveStyle({ "--atcl-first-column-width": "-10%" });
260
+ }), n("should handle decimal firstColumnWidth values", () => {
261
+ const { container: t } = c(
262
+ /* @__PURE__ */ u(i, { firstColumnWidth: 33.5, children: [
263
+ /* @__PURE__ */ e("div", { children: "Column 1" }),
264
+ /* @__PURE__ */ e("div", { children: "Column 2" })
265
+ ] })
266
+ ), l = t.querySelector("adjustable-two-column-layout");
267
+ o(l).toHaveStyle({ "--atcl-first-column-width": "33.5%" });
268
+ });
269
+ }), a("Type Safety", () => {
270
+ n("should accept React nodes as children", () => {
271
+ c(
272
+ /* @__PURE__ */ u(i, { children: [
273
+ /* @__PURE__ */ e("div", { children: "Text" }),
274
+ /* @__PURE__ */ e("span", { children: "More text" })
275
+ ] })
276
+ ), o(d.getByText("Text")).toBeInTheDocument(), o(d.getByText("More text")).toBeInTheDocument();
277
+ }), n("should accept number for firstColumnWidth", () => {
278
+ const { container: t } = c(
279
+ /* @__PURE__ */ u(i, { firstColumnWidth: 45, children: [
280
+ /* @__PURE__ */ e("div", { children: "Column 1" }),
281
+ /* @__PURE__ */ e("div", { children: "Column 2" })
282
+ ] })
283
+ ), l = t.querySelector("adjustable-two-column-layout");
284
+ o(l).toHaveStyle({ "--atcl-first-column-width": "45%" });
285
+ }), n("should accept string for firstColumnWidth", () => {
286
+ const { container: t } = c(
287
+ /* @__PURE__ */ u(i, { firstColumnWidth: "15rem", children: [
288
+ /* @__PURE__ */ e("div", { children: "Column 1" }),
289
+ /* @__PURE__ */ e("div", { children: "Column 2" })
290
+ ] })
291
+ ), l = t.querySelector("adjustable-two-column-layout");
292
+ o(l).toHaveStyle({ "--atcl-first-column-width": "15rem" });
293
+ });
294
+ });
295
+ });
@@ -0,0 +1,192 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { d as u, b as y, a as p, i as n, r as i, g as e, s as c, v as m } from "../../react.esm-DLSrfVwM.mjs";
3
+ import "../../index-BVxBrkZB.mjs";
4
+ import { AirDateFormatter as s } from "./AirDateFormatter.js";
5
+ u("AirDateFormatter", () => {
6
+ const h = /* @__PURE__ */ new Date("2024-01-15T14:00:00-05:00");
7
+ y(() => {
8
+ m.useFakeTimers(), m.setSystemTime(h);
9
+ }), p(() => {
10
+ m.useRealTimers(), m.clearAllMocks();
11
+ }), u("Null/Empty Handling", () => {
12
+ n("should render empty space when airdateStr is null", () => {
13
+ const { container: o } = i(/* @__PURE__ */ r(s, { airdateStr: null })), a = o.querySelector("airdate-formatter");
14
+ e(a).toBeInTheDocument(), e(a).toHaveAttribute("classname", "no-airdate"), e(a == null ? void 0 : a.textContent).toBe(" ");
15
+ }), n("should render empty space when airdateStr is undefined", () => {
16
+ const { container: o } = i(/* @__PURE__ */ r(s, {})), a = o.querySelector("airdate-formatter");
17
+ e(a).toBeInTheDocument(), e(a).toHaveAttribute("classname", "no-airdate");
18
+ });
19
+ }), u("Today Detection", () => {
20
+ n('should display "Today" when airdate is today', () => {
21
+ i(/* @__PURE__ */ r(s, { airdateStr: "2024-01-15 10:00:00" })), e(c.getByText("Today")).toBeInTheDocument();
22
+ }), n('should display "Today" with correct time format for morning hours', () => {
23
+ i(/* @__PURE__ */ r(s, { airdateStr: "2024-01-15 09:00:00" })), e(c.getByText("Today")).toBeInTheDocument();
24
+ const a = c.getByText("9a");
25
+ e(a).toBeInTheDocument();
26
+ }), n('should display "Today" with correct time format for afternoon hours', () => {
27
+ i(/* @__PURE__ */ r(s, { airdateStr: "2024-01-15 15:30:00" })), e(c.getByText("Today")).toBeInTheDocument();
28
+ const a = c.getByText("3:30");
29
+ e(a).toBeInTheDocument();
30
+ });
31
+ }), u("Tomorrow Detection", () => {
32
+ n('should display "Tomorrow" when airdate is tomorrow', () => {
33
+ i(/* @__PURE__ */ r(s, { airdateStr: "2024-01-16 10:00:00" })), e(c.getByText("Tomorrow")).toBeInTheDocument();
34
+ }), n('should display "Tomorrow" with correct time', () => {
35
+ i(/* @__PURE__ */ r(s, { airdateStr: "2024-01-16 14:45:00" })), e(c.getByText("Tomorrow")).toBeInTheDocument(), e(c.getByText("2:45")).toBeInTheDocument();
36
+ });
37
+ }), u("Future Date Handling", () => {
38
+ n("should display day name and date for future dates", () => {
39
+ i(/* @__PURE__ */ r(s, { airdateStr: "2024-01-20 10:00:00" })), e(c.getByText(/Sat, Jan 20/)).toBeInTheDocument();
40
+ }), n("should display day name and date with time for future dates", () => {
41
+ i(/* @__PURE__ */ r(s, { airdateStr: "2024-02-05 16:00:00" })), e(c.getByText(/Mon, Feb 5/)).toBeInTheDocument(), e(c.getByText("4")).toBeInTheDocument();
42
+ });
43
+ }), u("Time Formatting", () => {
44
+ n("should omit minutes when time is on the hour", () => {
45
+ i(/* @__PURE__ */ r(s, { airdateStr: "2024-01-15 10:00:00" })), e(c.getByText("10a")).toBeInTheDocument();
46
+ }), n("should include minutes when not on the hour", () => {
47
+ i(/* @__PURE__ */ r(s, { airdateStr: "2024-01-15 10:30:00" })), e(c.getByText("10:30a")).toBeInTheDocument();
48
+ }), n('should add "a" suffix for morning times', () => {
49
+ i(/* @__PURE__ */ r(s, { airdateStr: "2024-01-15 08:00:00" })), e(c.getByText("8a")).toBeInTheDocument();
50
+ }), n("should not add suffix for afternoon/evening times", () => {
51
+ const o = "2024-01-15 15:00:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o })), t = a.querySelector(".airdate-formatter__time");
52
+ e(t == null ? void 0 : t.textContent).toBe("3");
53
+ }), n("should handle midnight correctly", () => {
54
+ i(/* @__PURE__ */ r(s, { airdateStr: "2024-01-15 00:00:00" })), e(c.getByText("12a")).toBeInTheDocument();
55
+ }), n("should handle noon correctly", () => {
56
+ const o = "2024-01-15 12:00:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o })), t = a.querySelector(".airdate-formatter__time");
57
+ e(t == null ? void 0 : t.textContent).toBe("12");
58
+ });
59
+ }), u("Central Time Display", () => {
60
+ n("should display central time (1 hour earlier)", () => {
61
+ i(/* @__PURE__ */ r(s, { airdateStr: "2024-01-15 10:00:00" }));
62
+ const a = c.getByText("9");
63
+ e(a).toBeInTheDocument();
64
+ }), n("should display central time with minutes when applicable", () => {
65
+ const o = "2024-01-15 10:30:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o })), t = a.querySelector(".airdate-formatter__central-time");
66
+ e(t == null ? void 0 : t.textContent).toContain("9:30");
67
+ }), n('should include "c" suffix for central time', () => {
68
+ const o = "2024-01-15 10:00:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o })), t = a.querySelector(".airdate-formatter__central-time");
69
+ e(t == null ? void 0 : t.textContent).toContain("c");
70
+ });
71
+ }), u("Separator Type: none (default)", () => {
72
+ n("should render with default separator (none)", () => {
73
+ const o = "2024-01-15 10:00:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o }));
74
+ e(c.getByText("Today")).toBeInTheDocument();
75
+ const t = a.querySelector("span.airdate-formatter__time-wrap");
76
+ e(t).toBeInTheDocument();
77
+ }), n('should display date and time inline with space for "none" separator', () => {
78
+ const o = "2024-01-20 14:30:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o, separatorType: "none" })), t = a.querySelector("airdate-formatter"), d = t == null ? void 0 : t.querySelectorAll("span");
79
+ e(d.length).toBeGreaterThan(0);
80
+ });
81
+ }), u("Separator Type: pipe", () => {
82
+ n("should render with pipe separator", () => {
83
+ const o = "2024-01-15 10:00:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o, separatorType: "pipe" })), t = a.querySelector(".airdate-formatter__pipe");
84
+ e(t).toBeInTheDocument(), e(t == null ? void 0 : t.textContent).toBe(" | ");
85
+ }), n("should render date, pipe, and time separately", () => {
86
+ const o = "2024-01-20 14:30:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o, separatorType: "pipe" }));
87
+ e(c.getByText(/Sat, Jan 20/)).toBeInTheDocument(), e(a.querySelector(".airdate-formatter__pipe")).toBeInTheDocument(), e(c.getByText("2:30")).toBeInTheDocument();
88
+ }), n("should include line break in time when minutes are present", () => {
89
+ const o = "2024-01-15 10:30:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o, separatorType: "pipe" })), t = a.querySelector(".airdate-formatter__time-wrap"), d = t == null ? void 0 : t.querySelector("br");
90
+ e(d).toBeInTheDocument();
91
+ }), n("should not include line break when time is on the hour", () => {
92
+ const o = "2024-01-15 10:00:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o, separatorType: "pipe" })), t = a.querySelector(".airdate-formatter__time-wrap"), d = t == null ? void 0 : t.querySelector("br");
93
+ e(d).not.toBeInTheDocument();
94
+ });
95
+ }), u("Separator Type: line-break", () => {
96
+ n("should render with line breaks between elements", () => {
97
+ const o = "2024-01-20 14:30:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o, separatorType: "line-break" })), t = a.querySelector("airdate-formatter"), d = t == null ? void 0 : t.querySelectorAll("div");
98
+ e(d.length).toBeGreaterThan(0);
99
+ }), n("should render day, date, and time in separate divs", () => {
100
+ const o = "2024-01-20 14:30:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o, separatorType: "line-break" })), t = a.querySelector(".airdate-formatter__day"), d = a.querySelector(".airdate-formatter__date"), l = a.querySelector(".airdate-formatter__time-wrap");
101
+ e(t).toBeInTheDocument(), e(d).toBeInTheDocument(), e(l).toBeInTheDocument(), e(t == null ? void 0 : t.textContent).toBe("Sat"), e(d == null ? void 0 : d.textContent).toBe("Jan 20");
102
+ }), n('should not display date section for "Today"', () => {
103
+ const o = "2024-01-15 10:00:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o, separatorType: "line-break" })), t = a.querySelector(".airdate-formatter__day"), d = a.querySelector(".airdate-formatter__date");
104
+ e(t == null ? void 0 : t.textContent).toBe("Today"), e(d == null ? void 0 : d.textContent).toBe("");
105
+ });
106
+ }), u("Separator Type: single-line-break", () => {
107
+ n("should render day and date on same line with time on separate line", () => {
108
+ const o = "2024-01-20 14:30:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o, separatorType: "single-line-break" })), t = a.querySelector("airdate-formatter"), d = t == null ? void 0 : t.querySelectorAll("div");
109
+ e(d.length).toBe(2);
110
+ }), n("should combine day and date in first div", () => {
111
+ const o = "2024-01-20 14:30:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o, separatorType: "single-line-break" })), t = a.querySelector(".airdate-formatter__day");
112
+ e(t).toBeInTheDocument(), e(t == null ? void 0 : t.textContent).toContain("Sat"), e(t == null ? void 0 : t.textContent).toContain("Jan 20");
113
+ }), n("should have time in separate div", () => {
114
+ const o = "2024-01-20 14:30:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o, separatorType: "single-line-break" })), t = a.querySelector(".airdate-formatter__time-wrap");
115
+ e(t).toBeInTheDocument();
116
+ });
117
+ }), u("Separator Type: comma", () => {
118
+ n("should render with comma separator when specified", () => {
119
+ const o = "2024-01-15 10:00:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o, separatorType: "comma" })), t = a.querySelector("airdate-formatter");
120
+ e(t).toBeInTheDocument();
121
+ });
122
+ }), u("Date String Format Handling", () => {
123
+ n("should handle date strings with space separator", () => {
124
+ i(/* @__PURE__ */ r(s, { airdateStr: "2024-01-15 10:00:00" })), e(c.getByText("Today")).toBeInTheDocument();
125
+ }), n("should convert space to T for proper date parsing", () => {
126
+ i(/* @__PURE__ */ r(s, { airdateStr: "2024-02-20 15:45:00" })), e(c.getByText(/Tue, Feb 20/)).toBeInTheDocument();
127
+ });
128
+ }), u("CSS Classes", () => {
129
+ n("should apply date class", () => {
130
+ const o = "2024-01-15 10:00:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o })), t = a.querySelector(".airdate-formatter__date");
131
+ e(t).toBeInTheDocument();
132
+ }), n("should apply time-wrap class", () => {
133
+ const o = "2024-01-15 10:00:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o })), t = a.querySelector(".airdate-formatter__time-wrap");
134
+ e(t).toBeInTheDocument();
135
+ }), n("should apply time class", () => {
136
+ const o = "2024-01-15 10:00:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o })), t = a.querySelector(".airdate-formatter__time");
137
+ e(t).toBeInTheDocument();
138
+ }), n("should apply central-time class", () => {
139
+ const o = "2024-01-15 10:00:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o })), t = a.querySelector(".airdate-formatter__central-time");
140
+ e(t).toBeInTheDocument();
141
+ });
142
+ }), u("Edge Cases", () => {
143
+ n("should handle past dates", () => {
144
+ i(/* @__PURE__ */ r(s, { airdateStr: "2024-01-10 10:00:00" })), e(c.getByText(/Wed, Jan 10/)).toBeInTheDocument();
145
+ }), n("should handle dates far in the future", () => {
146
+ i(/* @__PURE__ */ r(s, { airdateStr: "2024-12-25 10:00:00" })), e(c.getByText(/Wed, Dec 25/)).toBeInTheDocument();
147
+ }), n("should handle dates in different months", () => {
148
+ i(/* @__PURE__ */ r(s, { airdateStr: "2024-03-15 10:00:00" })), e(c.getByText(/Fri, Mar 15/)).toBeInTheDocument();
149
+ }), n("should handle end of month dates", () => {
150
+ i(/* @__PURE__ */ r(s, { airdateStr: "2024-01-31 10:00:00" })), e(c.getByText(/Wed, Jan 31/)).toBeInTheDocument();
151
+ }), n("should handle leap year dates", () => {
152
+ i(/* @__PURE__ */ r(s, { airdateStr: "2024-02-29 10:00:00" })), e(c.getByText(/Thu, Feb 29/)).toBeInTheDocument();
153
+ }), n("should handle year boundaries", () => {
154
+ i(/* @__PURE__ */ r(s, { airdateStr: "2025-01-01 10:00:00" })), e(c.getByText(/Wed, Jan 1/)).toBeInTheDocument();
155
+ });
156
+ }), u("Custom Element Tag", () => {
157
+ n("should render with airdate-formatter custom element", () => {
158
+ const o = "2024-01-15 10:00:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o })), t = a.querySelector("airdate-formatter");
159
+ e(t).toBeInTheDocument();
160
+ }), n("should contain all content within custom element", () => {
161
+ const o = "2024-01-15 10:00:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o })), t = a.querySelector("airdate-formatter");
162
+ e(t == null ? void 0 : t.querySelector(".airdate-formatter__date")).toBeInTheDocument(), e(t == null ? void 0 : t.querySelector(".airdate-formatter__time")).toBeInTheDocument();
163
+ });
164
+ }), u("Time Display with Different Separator Types", () => {
165
+ n("should show forward slash between times for all separator types", () => {
166
+ const o = "2024-01-15 10:30:00";
167
+ ["none", "pipe", "line-break", "single-line-break"].forEach((t) => {
168
+ const { container: d } = i(/* @__PURE__ */ r(s, { airdateStr: o, separatorType: t })), l = d.querySelector(".airdate-formatter__time-wrap");
169
+ e(l == null ? void 0 : l.textContent).toContain("/");
170
+ });
171
+ });
172
+ }), u("Integration Tests", () => {
173
+ n("should correctly format a complete Today airdate with all elements", () => {
174
+ const o = "2024-01-15 14:30:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o, separatorType: "pipe" }));
175
+ e(c.getByText("Today")).toBeInTheDocument(), e(a.querySelector(".airdate-formatter__pipe")).toBeInTheDocument(), e(c.getByText("2:30")).toBeInTheDocument();
176
+ const t = a.querySelector(".airdate-formatter__central-time");
177
+ e(t == null ? void 0 : t.textContent).toContain("1:30"), e(t == null ? void 0 : t.textContent).toContain("c");
178
+ }), n("should correctly format a complete Tomorrow airdate", () => {
179
+ const o = "2024-01-16 09:00:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o }));
180
+ e(c.getByText("Tomorrow")).toBeInTheDocument(), e(c.getByText("9a")).toBeInTheDocument();
181
+ const t = a.querySelector(".airdate-formatter__central-time");
182
+ e(t == null ? void 0 : t.textContent).toContain("8");
183
+ }), n("should correctly format a complete future date with line-break", () => {
184
+ const o = "2024-02-20 16:45:00", { container: a } = i(/* @__PURE__ */ r(s, { airdateStr: o, separatorType: "line-break" })), t = a.querySelector(".airdate-formatter__day");
185
+ e(t == null ? void 0 : t.textContent).toBe("Tue");
186
+ const d = a.querySelector(".airdate-formatter__date");
187
+ e(d == null ? void 0 : d.textContent).toBe("Feb 20"), e(c.getByText("4:45")).toBeInTheDocument();
188
+ const l = a.querySelector(".airdate-formatter__central-time");
189
+ e(l == null ? void 0 : l.textContent).toContain("3:45"), e(l == null ? void 0 : l.textContent).toContain("c");
190
+ });
191
+ });
192
+ });