@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,311 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { v as m, d as c, b as C, i as o, r as s, g as e, s as h } from "../../react.esm-DLSrfVwM.mjs";
3
+ import { StringList as i } from "./StringList.js";
4
+ const p = m.fn((t) => t.filter(Boolean).join(" "));
5
+ m.mock("./../../utils/helpers", () => ({
6
+ classes: (t) => p(t)
7
+ }));
8
+ const r = m.fn((t) => t);
9
+ m.mock("html-react-parser", () => ({
10
+ default: (t) => r(t)
11
+ }));
12
+ m.mock("./StringList.module.scss", () => ({
13
+ default: {
14
+ "string-list__pipe": "string-list__pipe",
15
+ "string-list--block": "string-list--block"
16
+ }
17
+ }));
18
+ c("StringList Component", () => {
19
+ C(() => {
20
+ p.mockClear(), r.mockClear();
21
+ }), c("Basic Rendering", () => {
22
+ o("renders a span element with string-list class", () => {
23
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["Item 1", "Item 2"] })), a = t.querySelector("span.string-list");
24
+ e(a).toBeInTheDocument();
25
+ }), o("calls classes helper with appropriate array", () => {
26
+ s(/* @__PURE__ */ n(i, { list: ["Item 1"] })), e(p).toHaveBeenCalledWith(["string-list", ""]);
27
+ }), o("renders with default separatorType of comma", () => {
28
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["A", "B"] }));
29
+ e(t.textContent).toContain(",");
30
+ }), o("renders with default makeBlock of false", () => {
31
+ s(/* @__PURE__ */ n(i, { list: ["A"] })), e(p).toHaveBeenCalledWith(["string-list", ""]);
32
+ });
33
+ }), c("List Filtering", () => {
34
+ o("filters out empty string values", () => {
35
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["Item 1", "", "Item 2"] }));
36
+ e(t.textContent).toBe("Item 1, Item 2");
37
+ }), o("filters out undefined values", () => {
38
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["Item 1", void 0, "Item 2"] }));
39
+ e(t.textContent).toBe("Item 1, Item 2");
40
+ }), o("filters out null values", () => {
41
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["Item 1", null, "Item 2"] }));
42
+ e(t.textContent).toBe("Item 1, Item 2");
43
+ }), o("filters out multiple falsy values", () => {
44
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["A", "", null, void 0, "B", "", "C"] }));
45
+ e(t.textContent).toBe("A, B, C");
46
+ }), o("returns empty fragment when list is empty", () => {
47
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: [] }));
48
+ e(t.firstChild).toBeNull();
49
+ }), o("returns empty fragment when all items are filtered out", () => {
50
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["", null, void 0] }));
51
+ e(t.firstChild).toBeNull();
52
+ }), o("does not filter out 0 (falsy but valid number)", () => {
53
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: [0, 1, 2] }));
54
+ e(t.textContent).toBe("0, 1, 2");
55
+ }), o("does not filter out false (not in filter condition)", () => {
56
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["Item 1", "Item 2"] }));
57
+ e(t.textContent).toBe("Item 1, Item 2");
58
+ });
59
+ }), c("Separator Type - Comma", () => {
60
+ o("renders items separated by comma with space", () => {
61
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["A", "B", "C"], separatorType: "comma" }));
62
+ e(t.textContent).toBe("A, B, C");
63
+ }), o("renders first item without leading comma", () => {
64
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["First", "Second"], separatorType: "comma" }));
65
+ e(t.textContent).toMatch(/^First,/);
66
+ }), o("renders single item without comma", () => {
67
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["Only"], separatorType: "comma" }));
68
+ e(t.textContent).toBe("Only"), e(t.textContent).not.toContain(",");
69
+ }), o("renders two items with one comma", () => {
70
+ var l;
71
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["A", "B"], separatorType: "comma" })), a = (((l = t.textContent) == null ? void 0 : l.match(/,/g)) || []).length;
72
+ e(a).toBe(1);
73
+ }), o("renders multiple items with correct number of commas", () => {
74
+ var l;
75
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["A", "B", "C", "D", "E"], separatorType: "comma" })), a = (((l = t.textContent) == null ? void 0 : l.match(/,/g)) || []).length;
76
+ e(a).toBe(4);
77
+ }), o("does not render pipe separator with comma type", () => {
78
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["A", "B"], separatorType: "comma" }));
79
+ e(t.textContent).not.toContain("|");
80
+ });
81
+ }), c("Separator Type - Pipe", () => {
82
+ o("renders items separated by pipe", () => {
83
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["A", "B", "C"], separatorType: "pipe" }));
84
+ e(t.textContent).toContain("|");
85
+ }), o("renders first item without leading pipe", () => {
86
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["First", "Second"], separatorType: "pipe" }));
87
+ e(t.textContent).toMatch(/^First/);
88
+ }), o("renders single item without pipe", () => {
89
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["Only"], separatorType: "pipe" }));
90
+ e(t.textContent).toBe("Only"), e(t.textContent).not.toContain("|");
91
+ }), o("renders pipe with spaces around it", () => {
92
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["A", "B"], separatorType: "pipe" }));
93
+ e(t.textContent).toContain(" | ");
94
+ }), o("applies string-list__pipe class to pipe separator span", () => {
95
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["A", "B"], separatorType: "pipe" })), a = t.querySelector(".string-list__pipe");
96
+ e(a).toBeInTheDocument(), e(a == null ? void 0 : a.textContent).toBe(" | ");
97
+ }), o("renders correct number of pipe separators", () => {
98
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["A", "B", "C", "D"], separatorType: "pipe" })), a = t.querySelectorAll(".string-list__pipe");
99
+ e(a.length).toBe(3);
100
+ }), o("does not render comma with pipe type", () => {
101
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["A", "B"], separatorType: "pipe" }));
102
+ e(t.textContent).not.toContain(",");
103
+ }), o("calls classes helper for each pipe separator", () => {
104
+ p.mockClear(), s(/* @__PURE__ */ n(i, { list: ["A", "B", "C"], separatorType: "pipe" })), e(p).toHaveBeenCalledTimes(3);
105
+ });
106
+ }), c("MakeBlock Prop", () => {
107
+ o("applies string-list--block class when makeBlock is true", () => {
108
+ s(/* @__PURE__ */ n(i, { makeBlock: !0, list: ["Item"] })), e(p).toHaveBeenCalledWith(["string-list", "string-list--block"]);
109
+ }), o("does not apply string-list--block class when makeBlock is false", () => {
110
+ s(/* @__PURE__ */ n(i, { list: ["Item"], makeBlock: !1 })), e(p).toHaveBeenCalledWith(["string-list", ""]);
111
+ }), o("does not apply string-list--block class when makeBlock is undefined (default)", () => {
112
+ s(/* @__PURE__ */ n(i, { list: ["Item"] })), e(p).toHaveBeenCalledWith(["string-list", ""]);
113
+ }), o("applies block class with comma separator", () => {
114
+ const { container: t } = s(/* @__PURE__ */ n(i, { makeBlock: !0, list: ["A", "B"], separatorType: "comma" })), a = t.querySelector("span.string-list");
115
+ e(a == null ? void 0 : a.className).toContain("string-list--block");
116
+ }), o("applies block class with pipe separator", () => {
117
+ const { container: t } = s(/* @__PURE__ */ n(i, { makeBlock: !0, list: ["A", "B"], separatorType: "pipe" })), a = t.querySelector("span.string-list");
118
+ e(a == null ? void 0 : a.className).toContain("string-list--block");
119
+ });
120
+ }), c("String Items with HTML", () => {
121
+ o("parses string items using html-react-parser", () => {
122
+ s(/* @__PURE__ */ n(i, { list: ["<b>Bold</b>", "Normal"] })), e(r).toHaveBeenCalledWith("<b>Bold</b>"), e(r).toHaveBeenCalledWith("Normal");
123
+ }), o("parses all string items in the list", () => {
124
+ r.mockClear(), s(/* @__PURE__ */ n(i, { list: ["A", "B", "C"] })), e(r).toHaveBeenCalledTimes(3);
125
+ }), o("parses first string item without separator", () => {
126
+ r.mockClear(), s(/* @__PURE__ */ n(i, { list: ["First", "Second"] })), e(r).toHaveBeenNthCalledWith(1, "First");
127
+ }), o("parses subsequent string items after separator", () => {
128
+ r.mockClear(), s(/* @__PURE__ */ n(i, { list: ["First", "Second"] })), e(r).toHaveBeenNthCalledWith(2, "Second");
129
+ }), o("handles special HTML characters in strings", () => {
130
+ s(/* @__PURE__ */ n(i, { list: ["<div>HTML</div>", "<span>More</span>"] })), e(r).toHaveBeenCalledWith("<div>HTML</div>"), e(r).toHaveBeenCalledWith("<span>More</span>");
131
+ });
132
+ }), c("JSX.Element Items", () => {
133
+ o("renders JSX elements without parsing", () => {
134
+ r.mockClear(), s(/* @__PURE__ */ n(i, { list: [/* @__PURE__ */ n("strong", { children: "Bold" })] })), e(r).not.toHaveBeenCalled();
135
+ }), o("renders JSX elements with comma separator", () => {
136
+ const t = /* @__PURE__ */ n("em", { children: "Italic" }), a = /* @__PURE__ */ n("strong", { children: "Bold" }), { container: l } = s(/* @__PURE__ */ n(i, { list: [t, a], separatorType: "comma" }));
137
+ e(l.querySelector("em")).toBeInTheDocument(), e(l.querySelector("strong")).toBeInTheDocument(), e(l.textContent).toContain(",");
138
+ }), o("renders JSX elements with pipe separator", () => {
139
+ const t = /* @__PURE__ */ n("span", { children: "One" }), a = /* @__PURE__ */ n("span", { children: "Two" }), { container: l } = s(/* @__PURE__ */ n(i, { list: [t, a], separatorType: "pipe" }));
140
+ e(l.querySelectorAll("span").length).toBeGreaterThan(2), e(l.textContent).toContain("|");
141
+ }), o("mixes string and JSX elements", () => {
142
+ r.mockClear(), s(/* @__PURE__ */ n(i, { list: ["String", /* @__PURE__ */ n("strong", { children: "Bold" }), "Another"] })), e(r).toHaveBeenCalledWith("String"), e(r).toHaveBeenCalledWith("Another"), e(r).toHaveBeenCalledTimes(2);
143
+ }), o("renders first item as JSX without separator", () => {
144
+ s(/* @__PURE__ */ n(i, { list: [/* @__PURE__ */ n("span", { "data-testid": "first", children: "First" }), "Second"] })), e(h.getByTestId("first")).toBeInTheDocument();
145
+ });
146
+ }), c("Number Items", () => {
147
+ o("renders number items directly without parsing", () => {
148
+ r.mockClear();
149
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: [1, 2, 3] }));
150
+ e(r).not.toHaveBeenCalled(), e(t.textContent).toBe("1, 2, 3");
151
+ }), o("renders 0 as a valid number", () => {
152
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: [0] }));
153
+ e(t.textContent).toBe("0");
154
+ }), o("renders negative numbers", () => {
155
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: [-1, -5, -10] }));
156
+ e(t.textContent).toBe("-1, -5, -10");
157
+ }), o("renders decimal numbers", () => {
158
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: [1.5, 2.75, 3.14] }));
159
+ e(t.textContent).toBe("1.5, 2.75, 3.14");
160
+ }), o("mixes numbers and strings with comma separator", () => {
161
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: [1, "Two", 3, "Four"], separatorType: "comma" }));
162
+ e(t.textContent).toBe("1, Two, 3, Four");
163
+ }), o("mixes numbers and strings with pipe separator", () => {
164
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: [1, "Two", 3], separatorType: "pipe" }));
165
+ e(t.textContent).toContain("1"), e(t.textContent).toContain("Two"), e(t.textContent).toContain("3"), e(t.textContent).toContain("|");
166
+ }), o("renders large numbers", () => {
167
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: [1e6, 999999999] }));
168
+ e(t.textContent).toBe("1000000, 999999999");
169
+ });
170
+ }), c("Mixed Content Types", () => {
171
+ o("renders strings, numbers, and JSX together with comma", () => {
172
+ const t = /* @__PURE__ */ n("strong", { children: "Bold" }), { container: a } = s(/* @__PURE__ */ n(i, { list: ["String", 42, t], separatorType: "comma" }));
173
+ e(a.textContent).toContain("String"), e(a.textContent).toContain("42"), e(a.querySelector("strong")).toBeInTheDocument();
174
+ }), o("renders strings, numbers, and JSX together with pipe", () => {
175
+ const t = /* @__PURE__ */ n("em", { children: "Italic" }), { container: a } = s(/* @__PURE__ */ n(i, { list: [100, t, "Text"], separatorType: "pipe" }));
176
+ e(a.textContent).toContain("100"), e(a.querySelector("em")).toBeInTheDocument(), e(a.textContent).toContain("Text");
177
+ }), o("filters falsy values from mixed content", () => {
178
+ const t = /* @__PURE__ */ n("span", { children: "Elem" }), { container: a } = s(/* @__PURE__ */ n(i, { list: ["A", null, 1, void 0, t, "", 2] }));
179
+ e(a.textContent).toContain("A"), e(a.textContent).toContain("1"), e(a.querySelector("span")).toBeInTheDocument(), e(a.textContent).toContain("2");
180
+ }), o("parses only string items in mixed list", () => {
181
+ r.mockClear(), s(/* @__PURE__ */ n(i, { list: ["String1", 5, /* @__PURE__ */ n("div", { children: "Div" }), "String2"] })), e(r).toHaveBeenCalledWith("String1"), e(r).toHaveBeenCalledWith("String2"), e(r).toHaveBeenCalledTimes(2);
182
+ });
183
+ }), c("Fragment Keys", () => {
184
+ o("renders items within Fragment elements", () => {
185
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["A", "B", "C"] }));
186
+ e(t.textContent).toBe("A, B, C");
187
+ }), o("generates unique keys for fragments (via random)", () => {
188
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["A", "B", "C", "D", "E"] }));
189
+ e(t.textContent).toBe("A, B, C, D, E");
190
+ });
191
+ }), c("Edge Cases", () => {
192
+ o("handles very long list", () => {
193
+ const t = Array.from({ length: 100 }, (l, d) => `Item ${d + 1}`), { container: a } = s(/* @__PURE__ */ n(i, { list: t }));
194
+ e(a.textContent).toContain("Item 1"), e(a.textContent).toContain("Item 100");
195
+ }), o("handles list with single item", () => {
196
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["Single"] }));
197
+ e(t.textContent).toBe("Single");
198
+ }), o("handles empty strings mixed with valid strings", () => {
199
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["A", "", "B", "", "", "C"] }));
200
+ e(t.textContent).toBe("A, B, C");
201
+ }), o("handles special characters in strings", () => {
202
+ s(/* @__PURE__ */ n(i, { list: ["<special>", '"quotes"', "&amp;"] })), e(r).toHaveBeenCalledWith("<special>"), e(r).toHaveBeenCalledWith('"quotes"'), e(r).toHaveBeenCalledWith("&amp;");
203
+ }), o("handles unicode characters", () => {
204
+ s(/* @__PURE__ */ n(i, { list: ["😀", "你好", "Привет"] })), e(r).toHaveBeenCalledWith("😀"), e(r).toHaveBeenCalledWith("你好"), e(r).toHaveBeenCalledWith("Привет");
205
+ }), o("handles very long strings", () => {
206
+ const t = "A".repeat(1e3), { container: a } = s(/* @__PURE__ */ n(i, { list: [t] }));
207
+ e(a.textContent).toBe(t);
208
+ }), o("handles numbers with scientific notation", () => {
209
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: [1e5, 2500] }));
210
+ e(t.textContent).toContain("100000"), e(t.textContent).toContain("2500");
211
+ }), o("returns empty fragment for list with only filtered items", () => {
212
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: [null, void 0, "", null] }));
213
+ e(t.firstChild).toBeNull();
214
+ });
215
+ }), c("CSS Classes", () => {
216
+ o("always applies string-list base class", () => {
217
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["A"] }));
218
+ e(t.querySelector(".string-list")).toBeInTheDocument();
219
+ }), o("applies both base and block classes when makeBlock is true", () => {
220
+ p.mockClear(), s(/* @__PURE__ */ n(i, { makeBlock: !0, list: ["A"] })), e(p).toHaveBeenCalledWith(["string-list", "string-list--block"]);
221
+ }), o("pipe separator has correct classes", () => {
222
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["A", "B"], separatorType: "pipe" })), a = t.querySelector(".string-list__pipe");
223
+ e(a).toHaveAttribute("class", "string-list__pipe string-list__pipe");
224
+ }), o("calls classes helper for pipe separators", () => {
225
+ p.mockClear(), s(/* @__PURE__ */ n(i, { list: ["A", "B"], separatorType: "pipe" })), e(p).toHaveBeenCalledWith(["string-list__pipe", "string-list__pipe"]);
226
+ });
227
+ }), c("Type Safety", () => {
228
+ o("accepts array of strings", () => {
229
+ const t = ["A", "B", "C"], { container: a } = s(/* @__PURE__ */ n(i, { list: t }));
230
+ e(a.textContent).toBe("A, B, C");
231
+ }), o("accepts array of numbers", () => {
232
+ const t = [1, 2, 3], { container: a } = s(/* @__PURE__ */ n(i, { list: t }));
233
+ e(a.textContent).toBe("1, 2, 3");
234
+ }), o("accepts array of JSX elements", () => {
235
+ const t = [/* @__PURE__ */ n("span", { children: "A" }, "1"), /* @__PURE__ */ n("span", { children: "B" }, "2")], { container: a } = s(/* @__PURE__ */ n(i, { list: t }));
236
+ e(a.querySelectorAll("span").length).toBeGreaterThan(0);
237
+ }), o("accepts array with mixed types", () => {
238
+ const t = ["A", 1, /* @__PURE__ */ n("em", { children: "B" }, "1"), null], { container: a } = s(/* @__PURE__ */ n(i, { list: t }));
239
+ e(a.textContent).toContain("A"), e(a.textContent).toContain("1");
240
+ }), o('accepts separatorType as "comma"', () => {
241
+ const t = "comma", { container: a } = s(/* @__PURE__ */ n(i, { list: ["A", "B"], separatorType: t }));
242
+ e(a.textContent).toContain(",");
243
+ }), o('accepts separatorType as "pipe"', () => {
244
+ const t = "pipe", { container: a } = s(/* @__PURE__ */ n(i, { list: ["A", "B"], separatorType: t }));
245
+ e(a.textContent).toContain("|");
246
+ }), o("accepts makeBlock as boolean", () => {
247
+ s(/* @__PURE__ */ n(i, { list: ["A"], makeBlock: !0 })), e(p).toHaveBeenCalledWith(["string-list", "string-list--block"]);
248
+ });
249
+ }), c("Default Values", () => {
250
+ o("uses comma separator by default", () => {
251
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["A", "B"] }));
252
+ e(t.textContent).toBe("A, B");
253
+ }), o("uses makeBlock false by default", () => {
254
+ s(/* @__PURE__ */ n(i, { list: ["A"] })), e(p).toHaveBeenCalledWith(["string-list", ""]);
255
+ }), o("works with only required list prop", () => {
256
+ const { container: t } = s(/* @__PURE__ */ n(i, { list: ["Item"] }));
257
+ e(t.textContent).toBe("Item");
258
+ });
259
+ }), c("Integration Tests", () => {
260
+ o("renders complete comma-separated list with block styling", () => {
261
+ const { container: t } = s(
262
+ /* @__PURE__ */ n(
263
+ i,
264
+ {
265
+ makeBlock: !0,
266
+ list: ["Drama", "Comedy", "Action"],
267
+ separatorType: "comma"
268
+ }
269
+ )
270
+ );
271
+ e(t.textContent).toBe("Drama, Comedy, Action"), e(t.querySelector(".string-list--block")).toBeInTheDocument();
272
+ }), o("renders complete pipe-separated list with mixed content", () => {
273
+ const { container: t } = s(
274
+ /* @__PURE__ */ n(
275
+ i,
276
+ {
277
+ list: ["TV Series", "PG-13", /* @__PURE__ */ n("strong", { children: "120 min" }, "1")],
278
+ separatorType: "pipe"
279
+ }
280
+ )
281
+ );
282
+ e(t.textContent).toContain("TV Series"), e(t.textContent).toContain("PG-13"), e(t.querySelector("strong")).toBeInTheDocument(), e(t.querySelectorAll(".string-list__pipe").length).toBe(2);
283
+ }), o("filters and renders mixed content with comma separator", () => {
284
+ var l;
285
+ const { container: t } = s(
286
+ /* @__PURE__ */ n(
287
+ i,
288
+ {
289
+ list: ["Item 1", null, 2, void 0, /* @__PURE__ */ n("span", { children: "Elem" }, "1"), ""],
290
+ separatorType: "comma"
291
+ }
292
+ )
293
+ );
294
+ e(t.textContent).toContain("Item 1"), e(t.textContent).toContain("2"), e(t.querySelector("span")).toBeInTheDocument();
295
+ const a = (((l = t.textContent) == null ? void 0 : l.match(/,/g)) || []).length;
296
+ e(a).toBe(2);
297
+ }), o("handles complete real-world scenario: rating and time", () => {
298
+ const t = [2020, "PG-13", "2h 5m"], { container: a } = s(
299
+ /* @__PURE__ */ n(
300
+ i,
301
+ {
302
+ makeBlock: !0,
303
+ list: t,
304
+ separatorType: "pipe"
305
+ }
306
+ )
307
+ );
308
+ e(a.textContent).toContain("2020"), e(a.textContent).toContain("PG-13"), e(a.textContent).toContain("2h 5m"), e(a.querySelector(".string-list--block")).toBeInTheDocument();
309
+ });
310
+ });
311
+ });
@@ -1,5 +1,5 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import { p as o } from "../../index-VjANCDXC.mjs";
2
+ import { p as o } from "../../index-06PEPfBQ.mjs";
3
3
  function p({
4
4
  content: r,
5
5
  classname: t
@@ -0,0 +1,274 @@
1
+ import { jsx as e, jsxs as m, Fragment as p } from "react/jsx-runtime";
2
+ import { v as h, d as i, b as u, i as a, r as s, g as n } from "../../react.esm-DLSrfVwM.mjs";
3
+ import { TabContent as c } from "./TabContent.js";
4
+ const l = h.fn((t) => t);
5
+ h.mock("html-react-parser", () => ({
6
+ default: (t) => l(t)
7
+ }));
8
+ i("TabContent Component", () => {
9
+ u(() => {
10
+ l.mockClear();
11
+ }), i("Basic Rendering", () => {
12
+ a("renders tab-content custom element", () => {
13
+ const { container: t } = s(/* @__PURE__ */ e(c, { content: "Test content" }));
14
+ n(t.querySelector("tab-content")).toBeInTheDocument();
15
+ }), a("renders content inside tab-content element", () => {
16
+ const { container: t } = s(/* @__PURE__ */ e(c, { content: "Test content" })), o = t.querySelector("tab-content");
17
+ n(o == null ? void 0 : o.textContent).toContain("Test content");
18
+ }), a("returns JSX.Element", () => {
19
+ const t = s(/* @__PURE__ */ e(c, { content: "Test" }));
20
+ n(t.container.firstChild).toBeInstanceOf(HTMLElement);
21
+ });
22
+ }), i("String Content", () => {
23
+ a("parses string content using html-react-parser", () => {
24
+ s(/* @__PURE__ */ e(c, { content: "Plain text" })), n(l).toHaveBeenCalledWith("Plain text");
25
+ }), a("parses HTML string content", () => {
26
+ s(/* @__PURE__ */ e(c, { content: "<b>Bold text</b>" })), n(l).toHaveBeenCalledWith("<b>Bold text</b>");
27
+ }), a("parses complex HTML strings", () => {
28
+ const t = "<div><p>Paragraph</p><span>Span</span></div>";
29
+ s(/* @__PURE__ */ e(c, { content: t })), n(l).toHaveBeenCalledWith(t);
30
+ }), a("parses strings with special characters", () => {
31
+ const t = `Special & characters < > " '`;
32
+ s(/* @__PURE__ */ e(c, { content: t })), n(l).toHaveBeenCalledWith(t);
33
+ }), a("parses empty string", () => {
34
+ s(/* @__PURE__ */ e(c, { content: "" })), n(l).toHaveBeenCalledWith("");
35
+ }), a("parses strings with HTML entities", () => {
36
+ const t = "&amp; &lt; &gt; &copy;";
37
+ s(/* @__PURE__ */ e(c, { content: t })), n(l).toHaveBeenCalledWith(t);
38
+ }), a("parses very long strings", () => {
39
+ const t = "A".repeat(1e3);
40
+ s(/* @__PURE__ */ e(c, { content: t })), n(l).toHaveBeenCalledWith(t);
41
+ }), a("parses strings with newlines", () => {
42
+ const t = `Line 1
43
+ Line 2
44
+ Line 3`;
45
+ s(/* @__PURE__ */ e(c, { content: t })), n(l).toHaveBeenCalledWith(t);
46
+ });
47
+ }), i("JSX.Element Content", () => {
48
+ a("does not parse JSX.Element content", () => {
49
+ l.mockClear(), s(/* @__PURE__ */ e(c, { content: /* @__PURE__ */ e("div", { children: "JSX Element" }) })), n(l).not.toHaveBeenCalled();
50
+ }), a("renders JSX.Element content directly", () => {
51
+ const t = /* @__PURE__ */ e("div", { "data-testid": "jsx-content", children: "JSX Content" }), { container: o } = s(/* @__PURE__ */ e(c, { content: t })), r = o.querySelector("tab-content");
52
+ n(r == null ? void 0 : r.querySelector('[data-testid="jsx-content"]')).toBeInTheDocument();
53
+ }), a("renders complex JSX structures", () => {
54
+ const t = /* @__PURE__ */ m("div", { children: [
55
+ /* @__PURE__ */ e("h1", { children: "Title" }),
56
+ /* @__PURE__ */ e("p", { children: "Paragraph" }),
57
+ /* @__PURE__ */ m("ul", { children: [
58
+ /* @__PURE__ */ e("li", { children: "Item 1" }),
59
+ /* @__PURE__ */ e("li", { children: "Item 2" })
60
+ ] })
61
+ ] }), { container: o } = s(/* @__PURE__ */ e(c, { content: t })), r = o.querySelector("tab-content");
62
+ n(r == null ? void 0 : r.querySelector("h1")).toBeInTheDocument(), n(r == null ? void 0 : r.querySelector("ul")).toBeInTheDocument();
63
+ }), a("renders JSX with props", () => {
64
+ const t = /* @__PURE__ */ e("button", { disabled: !0, onClick: () => {
65
+ }, children: "Click me" }), { container: o } = s(/* @__PURE__ */ e(c, { content: t })), r = o.querySelector("button");
66
+ n(r).toBeDisabled();
67
+ }), a("renders nested JSX components", () => {
68
+ const o = /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(() => /* @__PURE__ */ e("span", { children: "Nested" }), {}) }), { container: r } = s(/* @__PURE__ */ e(c, { content: o }));
69
+ n(r.textContent).toContain("Nested");
70
+ });
71
+ }), i("Number Content", () => {
72
+ a("does not parse number content", () => {
73
+ l.mockClear(), s(/* @__PURE__ */ e(c, { content: 42 })), n(l).not.toHaveBeenCalled();
74
+ }), a("renders number content directly", () => {
75
+ const { container: t } = s(/* @__PURE__ */ e(c, { content: 42 })), o = t.querySelector("tab-content");
76
+ n(o == null ? void 0 : o.textContent).toBe("42");
77
+ }), a("renders zero", () => {
78
+ const { container: t } = s(/* @__PURE__ */ e(c, { content: 0 })), o = t.querySelector("tab-content");
79
+ n(o == null ? void 0 : o.textContent).toBe("0");
80
+ }), a("renders negative numbers", () => {
81
+ const { container: t } = s(/* @__PURE__ */ e(c, { content: -100 })), o = t.querySelector("tab-content");
82
+ n(o == null ? void 0 : o.textContent).toBe("-100");
83
+ }), a("renders decimal numbers", () => {
84
+ const { container: t } = s(/* @__PURE__ */ e(c, { content: 3.14159 })), o = t.querySelector("tab-content");
85
+ n(o == null ? void 0 : o.textContent).toBe("3.14159");
86
+ });
87
+ }), i("Boolean Content", () => {
88
+ a("does not parse boolean true", () => {
89
+ l.mockClear(), s(/* @__PURE__ */ e(c, { content: !0 })), n(l).not.toHaveBeenCalled();
90
+ }), a("does not parse boolean false", () => {
91
+ l.mockClear(), s(/* @__PURE__ */ e(c, { content: !1 })), n(l).not.toHaveBeenCalled();
92
+ }), a("renders boolean true as empty", () => {
93
+ const { container: t } = s(/* @__PURE__ */ e(c, { content: !0 })), o = t.querySelector("tab-content");
94
+ n(o == null ? void 0 : o.textContent).toBe("");
95
+ }), a("renders boolean false as empty", () => {
96
+ const { container: t } = s(/* @__PURE__ */ e(c, { content: !1 })), o = t.querySelector("tab-content");
97
+ n(o == null ? void 0 : o.textContent).toBe("");
98
+ });
99
+ }), i("Null and Undefined Content", () => {
100
+ a("does not parse null content", () => {
101
+ l.mockClear(), s(/* @__PURE__ */ e(c, { content: null })), n(l).not.toHaveBeenCalled();
102
+ }), a("does not parse undefined content", () => {
103
+ l.mockClear(), s(/* @__PURE__ */ e(c, { content: void 0 })), n(l).not.toHaveBeenCalled();
104
+ }), a("renders null content as empty", () => {
105
+ const { container: t } = s(/* @__PURE__ */ e(c, { content: null })), o = t.querySelector("tab-content");
106
+ n(o == null ? void 0 : o.textContent).toBe("");
107
+ }), a("renders undefined content as empty", () => {
108
+ const { container: t } = s(/* @__PURE__ */ e(c, { content: void 0 })), o = t.querySelector("tab-content");
109
+ n(o == null ? void 0 : o.textContent).toBe("");
110
+ });
111
+ }), i("Array Content", () => {
112
+ a("does not parse array content", () => {
113
+ l.mockClear(), s(/* @__PURE__ */ e(c, { content: [/* @__PURE__ */ e("div", { children: "Item 1" }, "1"), /* @__PURE__ */ e("div", { children: "Item 2" }, "2")] })), n(l).not.toHaveBeenCalled();
114
+ }), a("renders array of JSX elements", () => {
115
+ const t = [
116
+ /* @__PURE__ */ e("div", { "data-testid": "item-1", children: "Item 1" }, "1"),
117
+ /* @__PURE__ */ e("div", { "data-testid": "item-2", children: "Item 2" }, "2")
118
+ ], { container: o } = s(/* @__PURE__ */ e(c, { content: t })), r = o.querySelector("tab-content");
119
+ n(r == null ? void 0 : r.querySelector('[data-testid="item-1"]')).toBeInTheDocument(), n(r == null ? void 0 : r.querySelector('[data-testid="item-2"]')).toBeInTheDocument();
120
+ }), a("renders mixed array content", () => {
121
+ const t = [
122
+ "String",
123
+ /* @__PURE__ */ e("span", { children: "Element" }, "1"),
124
+ 42
125
+ ], { container: o } = s(/* @__PURE__ */ e(c, { content: t })), r = o.querySelector("tab-content");
126
+ n(r == null ? void 0 : r.textContent).toContain("String"), n(r == null ? void 0 : r.textContent).toContain("Element"), n(r == null ? void 0 : r.textContent).toContain("42");
127
+ });
128
+ }), i("Classname Prop", () => {
129
+ a("applies classname when provided", () => {
130
+ const { container: t } = s(/* @__PURE__ */ e(c, { classname: "custom-class", content: "Test" })), o = t.querySelector("tab-content");
131
+ n(o).toHaveAttribute("class", "custom-class");
132
+ }), a("does not render class attribute when classname is undefined", () => {
133
+ const { container: t } = s(/* @__PURE__ */ e(c, { content: "Test" })), o = t.querySelector("tab-content");
134
+ n(o).not.toHaveAttribute("class");
135
+ }), a("applies empty string as classname", () => {
136
+ const { container: t } = s(/* @__PURE__ */ e(c, { classname: "", content: "Test" })), o = t.querySelector("tab-content");
137
+ n(o).toHaveAttribute("class", "");
138
+ }), a("applies multiple classes", () => {
139
+ const { container: t } = s(/* @__PURE__ */ e(c, { classname: "class-one class-two", content: "Test" })), o = t.querySelector("tab-content");
140
+ n(o).toHaveAttribute("class", "class-one class-two");
141
+ }), a("applies classname with special characters", () => {
142
+ const { container: t } = s(/* @__PURE__ */ e(c, { classname: "my-class_123", content: "Test" })), o = t.querySelector("tab-content");
143
+ n(o).toHaveAttribute("class", "my-class_123");
144
+ }), a("applies classname with hyphen and underscore", () => {
145
+ const { container: t } = s(/* @__PURE__ */ e(c, { classname: "btn-primary_active", content: "Test" })), o = t.querySelector("tab-content");
146
+ n(o).toHaveAttribute("class", "btn-primary_active");
147
+ });
148
+ }), i("Type Checking", () => {
149
+ a("uses typeof to check for string content", () => {
150
+ const { container: t } = s(/* @__PURE__ */ e(c, { content: "string" })), o = t.querySelector("tab-content");
151
+ n(o).toBeInTheDocument(), n(l).toHaveBeenCalledWith("string");
152
+ }), a("correctly identifies non-string React.ReactNode", () => {
153
+ l.mockClear(), s(/* @__PURE__ */ e(c, { content: /* @__PURE__ */ e("div", { children: "Not a string" }) })), n(l).not.toHaveBeenCalled();
154
+ }), a("handles content type changes", () => {
155
+ const { rerender: t } = s(/* @__PURE__ */ e(c, { content: "string content" }));
156
+ n(l).toHaveBeenCalledWith("string content"), l.mockClear(), t(/* @__PURE__ */ e(c, { content: /* @__PURE__ */ e("div", { children: "JSX content" }) })), n(l).not.toHaveBeenCalled();
157
+ });
158
+ }), i("Edge Cases", () => {
159
+ a("handles whitespace-only strings", () => {
160
+ s(/* @__PURE__ */ e(c, { content: " " })), n(l).toHaveBeenCalledWith(" ");
161
+ }), a("handles strings with only newlines", () => {
162
+ s(/* @__PURE__ */ e(c, { content: `
163
+
164
+
165
+ ` })), n(l).toHaveBeenCalledWith(`
166
+
167
+
168
+ `);
169
+ }), a("handles strings with tabs", () => {
170
+ const t = " Tabbed ";
171
+ s(/* @__PURE__ */ e(c, { content: t })), n(l).toHaveBeenCalledWith(t);
172
+ }), a("handles unicode content", () => {
173
+ const t = "😀 Hello 世界 Привет";
174
+ s(/* @__PURE__ */ e(c, { content: t })), n(l).toHaveBeenCalledWith(t);
175
+ }), a("handles malformed HTML in strings", () => {
176
+ const t = "<div><p>Unclosed tags";
177
+ s(/* @__PURE__ */ e(c, { content: t })), n(l).toHaveBeenCalledWith(t);
178
+ }), a("handles self-closing tags in strings", () => {
179
+ const t = '<img src="test.jpg" /><br />';
180
+ s(/* @__PURE__ */ e(c, { content: t })), n(l).toHaveBeenCalledWith(t);
181
+ }), a("handles script tags in strings", () => {
182
+ const t = '<script>alert("test")<\/script>';
183
+ s(/* @__PURE__ */ e(c, { content: t })), n(l).toHaveBeenCalledWith(t);
184
+ }), a("handles inline styles in HTML strings", () => {
185
+ const t = '<div style="color: red;">Styled</div>';
186
+ s(/* @__PURE__ */ e(c, { content: t })), n(l).toHaveBeenCalledWith(t);
187
+ }), a("handles data attributes in HTML strings", () => {
188
+ const t = '<div data-test="value" data-id="123">Test</div>';
189
+ s(/* @__PURE__ */ e(c, { content: t })), n(l).toHaveBeenCalledWith(t);
190
+ });
191
+ }), i("Type Safety", () => {
192
+ a("accepts string as React.ReactNode", () => {
193
+ const t = "String content";
194
+ n(() => s(/* @__PURE__ */ e(c, { content: t }))).not.toThrow();
195
+ }), a("accepts JSX.Element as React.ReactNode", () => {
196
+ const t = /* @__PURE__ */ e("div", { children: "Element" });
197
+ n(() => s(/* @__PURE__ */ e(c, { content: t }))).not.toThrow();
198
+ }), a("accepts number as React.ReactNode", () => {
199
+ n(() => s(/* @__PURE__ */ e(c, { content: 42 }))).not.toThrow();
200
+ }), a("accepts null as React.ReactNode", () => {
201
+ n(() => s(/* @__PURE__ */ e(c, { content: null }))).not.toThrow();
202
+ }), a("accepts undefined as React.ReactNode", () => {
203
+ n(() => s(/* @__PURE__ */ e(c, { content: void 0 }))).not.toThrow();
204
+ }), a("accepts array as React.ReactNode", () => {
205
+ const t = [/* @__PURE__ */ e("div", { children: "Item" }, "1")];
206
+ n(() => s(/* @__PURE__ */ e(c, { content: t }))).not.toThrow();
207
+ }), a("accepts optional classname prop", () => {
208
+ n(() => s(/* @__PURE__ */ e(c, { content: "Test" }))).not.toThrow(), n(() => s(/* @__PURE__ */ e(c, { classname: "class", content: "Test" }))).not.toThrow();
209
+ }), a("accepts empty string as classname", () => {
210
+ n(() => s(/* @__PURE__ */ e(c, { classname: "", content: "Test" }))).not.toThrow();
211
+ }), a("accepts string as classname", () => {
212
+ const t = "my-class";
213
+ n(() => s(/* @__PURE__ */ e(c, { classname: t, content: "Test" }))).not.toThrow();
214
+ });
215
+ }), i("Integration Tests", () => {
216
+ a("renders string content with classname", () => {
217
+ const { container: t } = s(
218
+ /* @__PURE__ */ e(c, { classname: "tab-panel", content: "<p>Parsed HTML</p>" })
219
+ ), o = t.querySelector("tab-content");
220
+ n(o).toHaveAttribute("class", "tab-panel"), n(l).toHaveBeenCalledWith("<p>Parsed HTML</p>");
221
+ }), a("renders JSX content with classname", () => {
222
+ const t = /* @__PURE__ */ e("div", { "data-testid": "content", children: "JSX Content" }), { container: o } = s(
223
+ /* @__PURE__ */ e(c, { classname: "active-tab", content: t })
224
+ ), r = o.querySelector("tab-content");
225
+ n(r).toHaveAttribute("class", "active-tab"), n(r == null ? void 0 : r.querySelector('[data-testid="content"]')).toBeInTheDocument(), n(l).not.toHaveBeenCalled();
226
+ }), a("switches between string and JSX content", () => {
227
+ const { container: t, rerender: o } = s(
228
+ /* @__PURE__ */ e(c, { classname: "panel", content: "String" })
229
+ );
230
+ let r = t.querySelector("tab-content");
231
+ n(r == null ? void 0 : r.textContent).toContain("String"), n(l).toHaveBeenCalledWith("String"), l.mockClear(), o(/* @__PURE__ */ e(c, { classname: "panel", content: /* @__PURE__ */ e("span", { children: "JSX" }) })), r = t.querySelector("tab-content"), n(r == null ? void 0 : r.querySelector("span")).toBeInTheDocument(), n(l).not.toHaveBeenCalled();
232
+ }), a("handles real-world HTML content", () => {
233
+ const t = `
234
+ <div class="article">
235
+ <h1>Title</h1>
236
+ <p>This is a <strong>bold</strong> paragraph.</p>
237
+ <ul>
238
+ <li>Item 1</li>
239
+ <li>Item 2</li>
240
+ </ul>
241
+ </div>
242
+ `;
243
+ s(/* @__PURE__ */ e(c, { classname: "article-tab", content: t })), n(l).toHaveBeenCalledWith(t);
244
+ }), a("handles real-world JSX content", () => {
245
+ const t = () => /* @__PURE__ */ m("div", { className: "video-list", children: [
246
+ /* @__PURE__ */ e("div", { className: "video-item", children: "Video 1" }),
247
+ /* @__PURE__ */ e("div", { className: "video-item", children: "Video 2" })
248
+ ] }), { container: o } = s(
249
+ /* @__PURE__ */ e(c, { classname: "videos-tab", content: /* @__PURE__ */ e(t, {}) })
250
+ ), r = o.querySelector("tab-content");
251
+ n(r).toHaveAttribute("class", "videos-tab"), n(r == null ? void 0 : r.querySelectorAll(".video-item").length).toBe(2);
252
+ }), a("preserves classname across content changes", () => {
253
+ const { container: t, rerender: o } = s(
254
+ /* @__PURE__ */ e(c, { classname: "persistent-class", content: "Content 1" })
255
+ );
256
+ let r = t.querySelector("tab-content");
257
+ n(r).toHaveAttribute("class", "persistent-class"), o(/* @__PURE__ */ e(c, { classname: "persistent-class", content: "Content 2" })), r = t.querySelector("tab-content"), n(r).toHaveAttribute("class", "persistent-class");
258
+ });
259
+ }), i("Content Type Combinations", () => {
260
+ a("handles Fragment content", () => {
261
+ const t = /* @__PURE__ */ m(p, { children: [
262
+ /* @__PURE__ */ e("div", { children: "Part 1" }),
263
+ /* @__PURE__ */ e("div", { children: "Part 2" })
264
+ ] }), { container: o } = s(/* @__PURE__ */ e(c, { content: t })), r = o.querySelector("tab-content");
265
+ n(r == null ? void 0 : r.textContent).toContain("Part 1"), n(r == null ? void 0 : r.textContent).toContain("Part 2");
266
+ }), a("handles component as content", () => {
267
+ const t = () => /* @__PURE__ */ e("div", { children: "Component Content" }), { container: o } = s(/* @__PURE__ */ e(c, { content: /* @__PURE__ */ e(t, {}) })), r = o.querySelector("tab-content");
268
+ n(r == null ? void 0 : r.textContent).toContain("Component Content");
269
+ }), a("handles content with event handlers", () => {
270
+ const t = h.fn(), o = /* @__PURE__ */ e("button", { onClick: t, children: "Click" }), { container: r } = s(/* @__PURE__ */ e(c, { content: o })), d = r.querySelector("button");
271
+ n(d).toBeInTheDocument(), d == null || d.click(), n(t).toHaveBeenCalled();
272
+ });
273
+ });
274
+ });