@vodafone_de/brix-components 17.1.2 → 18.0.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 (224) hide show
  1. package/dist/{BorderRadius-Co-IV3fn.js → BorderRadius-0jhn76gB.js} +2 -2
  2. package/dist/{BorderWidth-OZWeXaq_.js → BorderWidth-CwrNKc0Q.js} +2 -2
  3. package/dist/ButtonAppearanceHelper-3qIbHGWJ.js +102 -0
  4. package/dist/CornerStyle-n77nckhh.js +7 -0
  5. package/dist/{colorUtils-CfSj2Iqa.js → colorUtils-c9PiZEci.js} +1 -1
  6. package/dist/components/Accordion/index.js +8 -4
  7. package/dist/components/Accordion/validate.d.ts +2 -2
  8. package/dist/components/AccordionGroup/validate.d.ts +2 -2
  9. package/dist/components/ArtDirectedImage/index.js +3 -3
  10. package/dist/components/ArtDirectedImage/validate.d.ts +0 -9
  11. package/dist/components/Badge/index.js +1 -1
  12. package/dist/components/Badge/validate.d.ts +1 -1
  13. package/dist/components/BottomBar/index.js +5 -5
  14. package/dist/components/Button/ButtonAppearanceHelper.test.d.ts +1 -0
  15. package/dist/components/Button/index.js +2 -2
  16. package/dist/components/Button/validate.d.ts +1 -1
  17. package/dist/components/ButtonAsLink/index.js +1 -1
  18. package/dist/components/ButtonGroup/validate.d.ts +1 -1
  19. package/dist/components/Calendar/components/Footer/helpers/getFooterText.test.d.ts +1 -0
  20. package/dist/components/Calendar/index.js +66 -62
  21. package/dist/components/Callout/index.js +1 -1
  22. package/dist/components/Card/index.js +1 -1
  23. package/dist/components/Carousel/index.js +1 -1
  24. package/dist/components/Checkbox/index.js +2 -2
  25. package/dist/components/Collapsible/index.js +1 -1
  26. package/dist/components/ColorSwatch/index.js +2 -2
  27. package/dist/components/ConsentMessage/index.js +1 -1
  28. package/dist/components/Container/index.js +1 -1
  29. package/dist/components/DateInput/index.js +2 -2
  30. package/dist/components/Dialog/index.js +8 -3
  31. package/dist/components/Dialog/validate.d.ts +1 -1
  32. package/dist/components/DiscoveryCard/index.js +5 -5
  33. package/dist/components/DiscoveryCard/validate.d.ts +3 -12
  34. package/dist/components/DiscoveryCardGroup/index.js +2 -2
  35. package/dist/components/DiscoveryCardGroup/validate.d.ts +9 -36
  36. package/dist/components/EnergySnippet/validate.d.ts +1 -1
  37. package/dist/components/FeatureCardGroup/components/FeatureCard/index.js +9 -8
  38. package/dist/components/FeatureCardGroup/components/FeatureCard/validate.d.ts +2 -11
  39. package/dist/components/FeatureCardGroup/index.js +1 -1
  40. package/dist/components/FeatureCardGroup/validate.d.ts +6 -15
  41. package/dist/components/Fieldset/index.js +8 -3
  42. package/dist/components/Fieldset/validate.d.ts +3 -3
  43. package/dist/components/FilterGroup/index.js +2 -2
  44. package/dist/components/FilterGroup/validate.d.ts +5 -5
  45. package/dist/components/Footnote/index.js +1 -1
  46. package/dist/components/FootnoteContent/index.js +1 -1
  47. package/dist/components/FootnoteSection/index.js +1 -1
  48. package/dist/components/FootnoteSection/validate.d.ts +2 -2
  49. package/dist/components/Form/index.js +1 -1
  50. package/dist/components/Form/validate.d.ts +4 -4
  51. package/dist/components/GoogleMap/index.js +31 -19
  52. package/dist/components/GoogleMap/props.d.ts +13 -1
  53. package/dist/components/GoogleMap/styled.d.ts +1 -1
  54. package/dist/components/GoogleMap/validate.d.ts +12 -3
  55. package/dist/components/Grid/index.js +2 -2
  56. package/dist/components/GridItem/index.js +2 -2
  57. package/dist/components/IconButton/index.js +4 -4
  58. package/dist/components/IconButton/validate.d.ts +1 -1
  59. package/dist/components/IconLoader/validate.d.ts +1 -1
  60. package/dist/components/IconSnippet/index.js +14 -24
  61. package/dist/components/IconSnippet/validate.d.ts +3 -3
  62. package/dist/components/IconSnippetList/index.js +1 -1
  63. package/dist/components/IconSnippetList/validate.d.ts +3 -3
  64. package/dist/components/Image/index.js +4 -52
  65. package/dist/components/Image/validate.d.ts +0 -9
  66. package/dist/components/ImageHeader/index.js +25 -19
  67. package/dist/components/ImageHeader/styled.d.ts +17 -0
  68. package/dist/components/ImageHeader/validate.d.ts +3 -12
  69. package/dist/components/InfoBanner/index.js +1 -1
  70. package/dist/components/InfoBanner/validate.d.ts +2 -2
  71. package/dist/components/InlineLink/index.js +1 -1
  72. package/dist/components/Input/index.js +1 -1
  73. package/dist/components/Input/validate.d.ts +1 -0
  74. package/dist/components/Legend/index.d.ts +1 -1
  75. package/dist/components/Legend/index.js +54 -68
  76. package/dist/components/Legend/validate.d.ts +6 -6
  77. package/dist/components/Link/index.js +1 -1
  78. package/dist/components/Link/validate.d.ts +1 -1
  79. package/dist/components/LinkAsButton/index.js +1 -1
  80. package/dist/components/LinkAsButton/validate.d.ts +1 -1
  81. package/dist/components/LinkList/index.js +25 -15
  82. package/dist/components/LinkList/styled.d.ts +1 -1
  83. package/dist/components/LinkListItem/index.js +15 -342
  84. package/dist/components/LinkListItem/props.d.ts +0 -4
  85. package/dist/components/LinkListItem/styled.d.ts +1 -1
  86. package/dist/components/LinkListItem/validate.d.ts +2 -3
  87. package/dist/components/LoadingSpinner/index.js +11 -10
  88. package/dist/components/LocalStyle/index.js +1 -1
  89. package/dist/components/MediaText/index.js +2 -2
  90. package/dist/components/MediaText/validate.d.ts +1 -10
  91. package/dist/components/Notification/index.js +20 -34
  92. package/dist/components/Notification/validate.d.ts +3 -3
  93. package/dist/components/OpenTextFootnoteAdapter/index.js +3 -3
  94. package/dist/components/PasswordInput/index.js +2 -2
  95. package/dist/components/PickerGroup/components/Picker/index.js +2 -2
  96. package/dist/components/PickerGroup/components/Picker/validate.d.ts +1 -1
  97. package/dist/components/PickerGroup/index.js +1 -1
  98. package/dist/components/PickerGroup/validate.d.ts +1 -1
  99. package/dist/components/Price/index.d.ts +0 -1
  100. package/dist/components/Price/index.js +61 -8
  101. package/dist/components/Price/props.d.ts +6 -6
  102. package/dist/components/ProductCard/index.js +4 -4
  103. package/dist/components/ProductCard/validate.d.ts +3 -12
  104. package/dist/components/QuickLinkList/components/QuickLink/index.js +2 -2
  105. package/dist/components/QuickLinkList/index.js +1 -1
  106. package/dist/components/RadioGroup/index.js +2 -2
  107. package/dist/components/Rating/index.js +1 -1
  108. package/dist/components/RichText/index.js +1 -1
  109. package/dist/components/RichText/parseHtml.d.ts +2 -1
  110. package/dist/components/RichTextContentful/getOptions.d.ts +6 -2
  111. package/dist/components/RichTextContentful/helpers/listHelpers.d.ts +1 -0
  112. package/dist/components/RichTextContentful/index.js +1 -1
  113. package/dist/components/RichTextContentful/props.d.ts +2 -1
  114. package/dist/components/RichTextContentful/styled.d.ts +5 -1
  115. package/dist/components/SearchInput/index.js +2 -2
  116. package/dist/components/SelectInput/index.js +1 -1
  117. package/dist/components/SuggestInput/components/SuggestInputList/index.d.ts +1 -1
  118. package/dist/components/SuggestInput/components/SuggestInputList/props.d.ts +0 -2
  119. package/dist/components/SuggestInput/index.js +20 -22
  120. package/dist/components/Switch/index.js +2 -2
  121. package/dist/components/TabGroup/index.js +11 -4
  122. package/dist/components/TabGroup/validate.d.ts +2 -2
  123. package/dist/components/Table/index.js +2 -2
  124. package/dist/components/TabularPrice/index.js +3 -2
  125. package/dist/components/TextList/components/TextListItem/index.js +1 -1
  126. package/dist/components/TextList/index.js +1 -1
  127. package/dist/components/Textarea/index.js +1 -1
  128. package/dist/components/TimeInput/index.js +2 -2
  129. package/dist/components/ToggleButtonProvider/validate.d.ts +8 -8
  130. package/dist/components/Tray/index.d.ts +1 -1
  131. package/dist/components/Tray/index.js +20 -14
  132. package/dist/components/Tray/validate.d.ts +1 -1
  133. package/dist/components/UtilityLink/index.js +1 -18
  134. package/dist/components/Video/componentName.d.ts +1 -0
  135. package/dist/components/Video/i18n.d.ts +42 -0
  136. package/dist/components/Video/index.d.ts +5 -0
  137. package/dist/components/Video/index.js +902 -0
  138. package/dist/components/Video/props.d.ts +52 -0
  139. package/dist/components/Video/styled.d.ts +2 -0
  140. package/dist/components/Video/validate.d.ts +84 -0
  141. package/dist/components/Video/validate.test.d.ts +1 -0
  142. package/dist/components/YouTubeVideo/index.js +1 -1
  143. package/dist/contentful/props/index.d.ts +2 -0
  144. package/dist/contentful/registry/ContentFulComponentName.d.ts +1 -1
  145. package/dist/contentful/registry/SupportedBrixProps.d.ts +2 -2
  146. package/dist/contentful/registry/index.js +1 -1
  147. package/dist/contentful/validation/index.d.ts +1 -0
  148. package/dist/contentful/validation/index.js +38 -9
  149. package/dist/{cssVars-DIZd9rHN.js → cssVars-DKs5LlTN.js} +112 -108
  150. package/dist/foundations/BrixComponentProps/componentNames.d.ts +1 -1
  151. package/dist/foundations/BrixComponentProps/validate.d.ts +3 -0
  152. package/dist/foundations/GlobalStyle/index.js +1 -1
  153. package/dist/foundations/colorMaps.d.ts +18 -0
  154. package/dist/foundations/cssVars.d.ts +1 -7
  155. package/dist/foundations/cssVars.test.d.ts +1 -0
  156. package/dist/foundations/layout/index.js +23 -6
  157. package/dist/foundations/typographyAndIconSizeCssVars.d.ts +7 -0
  158. package/dist/getSizesFromGridConfig-C-GBct4J.js +28 -0
  159. package/dist/{index-XoIBkRyI.js → index-BLp5wi_X.js} +199 -171
  160. package/dist/{index-B7QEcUdq.js → index-BXTweg2t.js} +26 -52
  161. package/dist/{index-BR6u6rvI.js → index-CW-UuGll.js} +2 -2
  162. package/dist/{index-iCvdBgcJ.js → index-C_6tWuWh.js} +1 -1
  163. package/dist/{index-C9M-9a7m.js → index-Cms5ie2I.js} +4 -4
  164. package/dist/{index-DQ_p1dIc.js → index-CpuHeI4h.js} +2 -2
  165. package/dist/{index-BIa9NKUU.js → index-DqdKVD9N.js} +3 -3
  166. package/dist/{index-B0jIyAgf.js → index-E0RMtc9X.js} +1 -1
  167. package/dist/{index-CWByESA7.js → index-h88pZ6zH.js} +2 -2
  168. package/dist/{index-Dn3We7oE.js → index-p9ZTAIzJ.js} +3 -3
  169. package/dist/index-xzvddlgp.js +345 -0
  170. package/dist/index.d.ts +2 -0
  171. package/dist/index.js +227 -222
  172. package/dist/opentext/index.js +1 -1
  173. package/dist/opentext/map/googleMap.d.ts +2 -1
  174. package/dist/{props-BPxy0GPb.js → props-Bod9bL2v.js} +4 -4
  175. package/dist/{props-P3bM0HEk.js → props-E4PNCuS6.js} +1 -4
  176. package/dist/props-n71pckjd.js +5 -0
  177. package/dist/{styled-DRNdxc1V.js → styled-BJ9cE7xy.js} +2 -2
  178. package/dist/styled-BrSdmb0C.js +52 -0
  179. package/dist/{styled-bzTYGIm_.js → styled-DDY0xAl_.js} +1 -1
  180. package/dist/{styled-DhKlciPC.js → styled-Dfbxuq_p.js} +1 -1
  181. package/dist/styled-R9Zq1ahD.js +21 -0
  182. package/dist/{styled-DYgC4qQm.js → styled-ldBsCamo.js} +2 -2
  183. package/dist/{youTubeVideo-BOudL3DM.js → youTubeVideo-CsdIB_iu.js} +30 -56
  184. package/package.json +2 -1
  185. package/dist/ButtonAppearanceHelper-BQUk7S3X.js +0 -92
  186. package/dist/components/AccordionGroup/stories/scrollToViewFixedHeaderStoryObj.d.ts +0 -2
  187. package/dist/components/Carousel/stories/productCards.d.ts +0 -8
  188. package/dist/components/Flex/stories/alignCenterArgs.d.ts +0 -2
  189. package/dist/components/Flex/stories/alignEndArgs.d.ts +0 -2
  190. package/dist/components/Flex/stories/alignStartArgs.d.ts +0 -2
  191. package/dist/components/Flex/stories/autoAndFullItemArgs.d.ts +0 -2
  192. package/dist/components/Flex/stories/autoAndFullItemVerticalArgs.d.ts +0 -2
  193. package/dist/components/Flex/stories/fullAndAutoItemArgs.d.ts +0 -2
  194. package/dist/components/Flex/stories/fullAndAutoItemVerticalArgs.d.ts +0 -2
  195. package/dist/components/Flex/stories/justifyBetweenArgs.d.ts +0 -2
  196. package/dist/components/Flex/stories/justifyBetweenVerticalArgs.d.ts +0 -2
  197. package/dist/components/Flex/stories/justifyCenterArgs.d.ts +0 -2
  198. package/dist/components/Flex/stories/justifyCenterVerticalArgs.d.ts +0 -2
  199. package/dist/components/Flex/stories/justifyEndArgs.d.ts +0 -2
  200. package/dist/components/Flex/stories/justifyEndVerticalArgs.d.ts +0 -2
  201. package/dist/components/Flex/stories/justifyStartArgs.d.ts +0 -2
  202. package/dist/components/Flex/stories/justifyStartVerticalArgs.d.ts +0 -2
  203. package/dist/components/Flex/stories/twoFullItemsArgs.d.ts +0 -2
  204. package/dist/components/Flex/stories/twoFullItemsVerticalArgs.d.ts +0 -2
  205. package/dist/components/Flex/stories/xlGapSpacingArgs.d.ts +0 -2
  206. package/dist/components/Grid/stories/alignGridCenterArgs.d.ts +0 -2
  207. package/dist/components/Grid/stories/alignGridItemArgs.d.ts +0 -2
  208. package/dist/components/Grid/stories/alignGridRightArgs.d.ts +0 -2
  209. package/dist/components/Grid/stories/grid12Args.d.ts +0 -2
  210. package/dist/components/Grid/stories/grid222222Args.d.ts +0 -2
  211. package/dist/components/Grid/stories/grid3333Args.d.ts +0 -2
  212. package/dist/components/Grid/stories/grid363Args.d.ts +0 -2
  213. package/dist/components/Grid/stories/grid444Args.d.ts +0 -2
  214. package/dist/components/Grid/stories/grid64Args.d.ts +0 -2
  215. package/dist/components/Grid/stories/grid66Args.d.ts +0 -2
  216. package/dist/components/Grid/stories/grid75Args.d.ts +0 -2
  217. package/dist/components/Grid/stories/nestingArgs.d.ts +0 -2
  218. package/dist/components/Grid/stories/noSpacingArgs.d.ts +0 -2
  219. package/dist/components/Grid/stories/offsetArgs.d.ts +0 -2
  220. package/dist/components/Grid/stories/responsiveArgs.d.ts +0 -2
  221. package/dist/components/Grid/stories/stretchArgs.d.ts +0 -2
  222. package/dist/components/Grid/stories/tagOrderedListArgs.d.ts +0 -2
  223. package/dist/components/Grid/stories/tagUnorderedListArgs.d.ts +0 -2
  224. package/dist/getSizesFromGridConfig-BqDW79mt.js +0 -48
@@ -83,6 +83,7 @@ export declare const iconSnippetSchema: z.ZodObject<{
83
83
  Filter: "Filter";
84
84
  Grid: "Grid";
85
85
  Notification: "Notification";
86
+ Video: "Video";
86
87
  Focus: "Focus";
87
88
  AbTest: "AbTest";
88
89
  Above28: "Above28";
@@ -637,7 +638,6 @@ export declare const iconSnippetSchema: z.ZodObject<{
637
638
  VfHappyHelpful: "VfHappyHelpful";
638
639
  VfHappy: "VfHappy";
639
640
  VideoFrame: "VideoFrame";
640
- Video: "Video";
641
641
  Virtuoso: "Virtuoso";
642
642
  VirusProtection: "VirusProtection";
643
643
  VocSensor: "VocSensor";
@@ -1124,6 +1124,7 @@ export declare const iconSnippetSchema: z.ZodObject<{
1124
1124
  Filter: "Filter";
1125
1125
  Grid: "Grid";
1126
1126
  Notification: "Notification";
1127
+ Video: "Video";
1127
1128
  Focus: "Focus";
1128
1129
  AbTest: "AbTest";
1129
1130
  Above28: "Above28";
@@ -1678,7 +1679,6 @@ export declare const iconSnippetSchema: z.ZodObject<{
1678
1679
  VfHappyHelpful: "VfHappyHelpful";
1679
1680
  VfHappy: "VfHappy";
1680
1681
  VideoFrame: "VideoFrame";
1681
- Video: "Video";
1682
1682
  Virtuoso: "Virtuoso";
1683
1683
  VirusProtection: "VirusProtection";
1684
1684
  VocSensor: "VocSensor";
@@ -1732,6 +1732,7 @@ export declare const iconSnippetSchema: z.ZodObject<{
1732
1732
  Filter: "Filter";
1733
1733
  Grid: "Grid";
1734
1734
  Notification: "Notification";
1735
+ Video: "Video";
1735
1736
  Focus: "Focus";
1736
1737
  AbTest: "AbTest";
1737
1738
  Above28: "Above28";
@@ -2286,7 +2287,6 @@ export declare const iconSnippetSchema: z.ZodObject<{
2286
2287
  VfHappyHelpful: "VfHappyHelpful";
2287
2288
  VfHappy: "VfHappy";
2288
2289
  VideoFrame: "VideoFrame";
2289
- Video: "Video";
2290
2290
  Virtuoso: "Virtuoso";
2291
2291
  VirusProtection: "VirusProtection";
2292
2292
  VocSensor: "VocSensor";
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { G as Grid, b as GridItem } from "../../index-B0jIyAgf.js";
3
+ import { G as Grid, b as GridItem } from "../../index-E0RMtc9X.js";
4
4
  import IconSnippet from "../IconSnippet/index.js";
5
5
  import { u as ulTagName, l as liTagName } from "../../tags-BeNegJAK.js";
6
6
  import { b as spacingNone } from "../../Spacing-Dj-qX3Z5.js";
@@ -151,6 +151,7 @@ export declare const iconSnippetListSchema: z.ZodObject<{
151
151
  Filter: "Filter";
152
152
  Grid: "Grid";
153
153
  Notification: "Notification";
154
+ Video: "Video";
154
155
  Focus: "Focus";
155
156
  AbTest: "AbTest";
156
157
  Above28: "Above28";
@@ -705,7 +706,6 @@ export declare const iconSnippetListSchema: z.ZodObject<{
705
706
  VfHappyHelpful: "VfHappyHelpful";
706
707
  VfHappy: "VfHappy";
707
708
  VideoFrame: "VideoFrame";
708
- Video: "Video";
709
709
  Virtuoso: "Virtuoso";
710
710
  VirusProtection: "VirusProtection";
711
711
  VocSensor: "VocSensor";
@@ -1192,6 +1192,7 @@ export declare const iconSnippetListSchema: z.ZodObject<{
1192
1192
  Filter: "Filter";
1193
1193
  Grid: "Grid";
1194
1194
  Notification: "Notification";
1195
+ Video: "Video";
1195
1196
  Focus: "Focus";
1196
1197
  AbTest: "AbTest";
1197
1198
  Above28: "Above28";
@@ -1746,7 +1747,6 @@ export declare const iconSnippetListSchema: z.ZodObject<{
1746
1747
  VfHappyHelpful: "VfHappyHelpful";
1747
1748
  VfHappy: "VfHappy";
1748
1749
  VideoFrame: "VideoFrame";
1749
- Video: "Video";
1750
1750
  Virtuoso: "Virtuoso";
1751
1751
  VirusProtection: "VirusProtection";
1752
1752
  VocSensor: "VocSensor";
@@ -1800,6 +1800,7 @@ export declare const iconSnippetListSchema: z.ZodObject<{
1800
1800
  Filter: "Filter";
1801
1801
  Grid: "Grid";
1802
1802
  Notification: "Notification";
1803
+ Video: "Video";
1803
1804
  Focus: "Focus";
1804
1805
  AbTest: "AbTest";
1805
1806
  Above28: "Above28";
@@ -2354,7 +2355,6 @@ export declare const iconSnippetListSchema: z.ZodObject<{
2354
2355
  VfHappyHelpful: "VfHappyHelpful";
2355
2356
  VfHappy: "VfHappy";
2356
2357
  VideoFrame: "VideoFrame";
2357
- Video: "Video";
2358
2358
  Virtuoso: "Virtuoso";
2359
2359
  VirusProtection: "VirusProtection";
2360
2360
  VocSensor: "VocSensor";
@@ -1,61 +1,13 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { useContext } from "react";
4
- import { a as ContainerContext } from "../../index-iCvdBgcJ.js";
5
- import { a as GridContext, c as GridItemContext } from "../../index-B0jIyAgf.js";
4
+ import { a as ContainerContext } from "../../index-C_6tWuWh.js";
5
+ import { a as GridContext, c as GridItemContext } from "../../index-E0RMtc9X.js";
6
6
  import UtilityLink from "../UtilityLink/index.js";
7
7
  import { useImageComponent, filterImagePropsToImageComponentProps } from "../../hooks/useImageComponent/index.js";
8
- import { g as getSizesFromGridConfig } from "../../getSizesFromGridConfig-BqDW79mt.js";
9
- import styled from "styled-components";
10
- import { translateLayoutPropsToCss } from "../../foundations/layout/index.js";
11
- import { getBorderRadius } from "../../foundations/token/getBorderRadius/index.js";
12
- import { getBottomSpacing } from "../../foundations/token/getBottomSpacing/index.js";
13
- import { b as borderRadiusMd, c as borderRadiusNone } from "../../BorderRadius-Co-IV3fn.js";
14
- import { s as spacingMd } from "../../Spacing-Dj-qX3Z5.js";
15
- import { s as shouldForwardProp } from "../../shouldForwardProp-CONMmlMa.js";
8
+ import { g as getSizesFromGridConfig } from "../../getSizesFromGridConfig-C-GBct4J.js";
9
+ import { I as ImageContainerStyled } from "../../styled-BrSdmb0C.js";
16
10
  import { a, b, c, d, e, f, g, h, i, j, k, l, m, o, n, p, q, r, s, t, u, v } from "../../props-CLadRD1u.js";
17
- const ImageContainerStyled = styled.div.withConfig({
18
- shouldForwardProp,
19
- displayName: "ImageContainerStyled",
20
- componentId: "sc-z3qszb-0"
21
- })({
22
- overflow: "hidden",
23
- position: "relative"
24
- }, ({
25
- aspectRatio
26
- }) => ({
27
- aspectRatio
28
- }), ({
29
- roundedCorners
30
- }) => ({
31
- borderRadius: roundedCorners ? getBorderRadius(borderRadiusMd) : getBorderRadius(borderRadiusNone)
32
- }), ({
33
- objectFit = "cover"
34
- }) => ({
35
- "& img": {
36
- objectFit
37
- }
38
- }), ({
39
- width,
40
- height,
41
- aspectRatio
42
- }) => ({
43
- width: width ? width : height ? "auto" : "100%",
44
- height: height ? height : width ? "auto" : aspectRatio ? "auto" : "100%",
45
- "& img": {
46
- position: !width && !height && !aspectRatio ? "relative" : "absolute",
47
- top: 0,
48
- left: 0,
49
- height: "100%",
50
- width: "100%"
51
- }
52
- }), ({
53
- bottomSpacing = spacingMd
54
- }) => getBottomSpacing({
55
- bottomSpacing
56
- }), ({
57
- layout
58
- }) => layout && translateLayoutPropsToCss(layout));
59
11
  const Image = ({
60
12
  link,
61
13
  aspectRatio,
@@ -68,15 +68,6 @@ export declare const imageSchema: z.ZodObject<{
68
68
  contain: "contain";
69
69
  cover: "cover";
70
70
  }>>;
71
- objectPosition: z.ZodOptional<z.ZodEnum<{
72
- center: "center";
73
- "top left": "top left";
74
- "center left": "center left";
75
- "bottom left": "bottom left";
76
- "top right": "top right";
77
- "center right": "center right";
78
- "bottom right": "bottom right";
79
- }>>;
80
71
  roundedCorners: z.ZodOptional<z.ZodBoolean>;
81
72
  src: z.ZodString;
82
73
  alt: z.ZodOptional<z.ZodString>;
@@ -3,15 +3,14 @@ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import Body from "../Body/index.js";
4
4
  import { b as bodyComponentName } from "../../componentName-BoJP6JLf.js";
5
5
  import Button from "../Button/index.js";
6
- import { C as Container } from "../../index-iCvdBgcJ.js";
7
6
  import "../../index-Dgu9iIhb.js";
8
7
  import "../../index-DcEZ9vor.js";
9
8
  import { f as spacing2Xs, b as spacingNone, s as spacingMd, c as spacingSm, d as spacingXl, a as spacingXs } from "../../Spacing-Dj-qX3Z5.js";
10
9
  import Heading from "../Heading/index.js";
11
10
  import { h as headingAlignCenter } from "../../props-GrMT6XLD.js";
12
11
  import { h as headingComponentName } from "../../componentName-C1oXAOj7.js";
13
- import { P as Price } from "../../index-B7QEcUdq.js";
14
- import { a as RichTextContentful, R as RichText } from "../../index-XoIBkRyI.js";
12
+ import Price from "../Price/index.js";
13
+ import { a as RichTextContentful, R as RichText } from "../../index-BLp5wi_X.js";
15
14
  import { r as richTextContentfulComponentName, a as richTextComponentName } from "../../props-B5OwQmNC.js";
16
15
  import { v as viewport, a as breakpoint_large } from "../../index-CG4uiVbZ.js";
17
16
  import { b as fontWeightLight } from "../../FontWeight-C8c-UnWu.js";
@@ -21,24 +20,31 @@ import { c as imageHeaderVariantFull, a as imageHeaderPositionRight, d as imageH
21
20
  import { b, e } from "../../props-BT2CkRl1.js";
22
21
  import styled from "styled-components";
23
22
  import ArtDirectedImage from "../ArtDirectedImage/index.js";
24
- import { B as Badge } from "../../index-CWByESA7.js";
23
+ import { B as Badge } from "../../index-h88pZ6zH.js";
25
24
  import ButtonGroup from "../ButtonGroup/index.js";
25
+ import { C as Container } from "../../index-C_6tWuWh.js";
26
26
  import { k as flexOrientationVertical } from "../../props-BhXFN7yR.js";
27
- import { G as Grid, b as GridItem } from "../../index-B0jIyAgf.js";
27
+ import { G as Grid, b as GridItem } from "../../index-E0RMtc9X.js";
28
28
  import { getBackgroundColor } from "../../foundations/token/getBackgroundColor/index.js";
29
29
  import { getBodySize } from "../../foundations/token/getBodySize/index.js";
30
30
  import { g as getSpacing } from "../../index-l-i-mIeP.js";
31
31
  import { e as colorBackgroundOverlay } from "../../BackgroundColor-Ba4D10TC.js";
32
32
  import { t as textBodyMd } from "../../TextBodySize-CP9q4gRv.js";
33
33
  import { s as shouldForwardProp } from "../../shouldForwardProp-CONMmlMa.js";
34
- import { h as priceSizeSm } from "../../props-P3bM0HEk.js";
34
+ import { h as priceSizeSm } from "../../props-E4PNCuS6.js";
35
35
  const imageHeaderHeight = 450;
36
+ const ImageHeaderContainerStyled = styled(Container).withConfig({
37
+ displayName: "ImageHeaderContainerStyled",
38
+ componentId: "sc-7ig3h-0"
39
+ })({
40
+ containerType: "inline-size"
41
+ });
36
42
  const getBadgeTopPosition = () => {
37
43
  return `calc(-0.5 * (${getSpacing(spacing2Xs)} * 2 + ${getBodySize(textBodyMd).fontSize} * ${getBodySize(textBodyMd).lineHeight}))`;
38
44
  };
39
45
  const ImageHeaderStyled = styled(Grid).withConfig({
40
46
  displayName: "ImageHeaderStyled",
41
- componentId: "sc-7ig3h-0"
47
+ componentId: "sc-7ig3h-1"
42
48
  })({
43
49
  alignItems: "center",
44
50
  position: "relative",
@@ -63,7 +69,7 @@ const ImageHeaderStyled = styled(Grid).withConfig({
63
69
  }));
64
70
  const ImageHeaderImagesContainerStyled = styled(GridItem).withConfig({
65
71
  displayName: "ImageHeaderImagesContainerStyled",
66
- componentId: "sc-7ig3h-1"
72
+ componentId: "sc-7ig3h-2"
67
73
  })({
68
74
  ...viewport.lg({
69
75
  flexGrow: "1",
@@ -77,7 +83,7 @@ const ImageHeaderImagesContainerStyled = styled(GridItem).withConfig({
77
83
  const marginSide = contentPosition === imageHeaderPositionRight ? "marginLeft" : "marginRight";
78
84
  return {
79
85
  ...viewport.lg({
80
- [marginSide]: "calc(-1*(100vw - 100%) / 2)"
86
+ [marginSide]: "calc(-1*(100cqw - 100%) / 2)"
81
87
  })
82
88
  };
83
89
  }
@@ -89,15 +95,15 @@ const ImageHeaderImagesContainerStyled = styled(GridItem).withConfig({
89
95
  ...viewport.lg({
90
96
  flexBasis: "100%",
91
97
  alignItems: "center",
92
- marginRight: "calc(-1 * (100vw - 100%) / 2)",
93
- marginLeft: "calc(-1 * (100vw - 100%) / 2)"
98
+ marginRight: "calc(-1 * (100cqw - 100%) / 2)",
99
+ marginLeft: "calc(-1 * (100cqw - 100%) / 2)"
94
100
  })
95
101
  };
96
102
  }
97
103
  });
98
104
  const ImageHeaderArtDirectedImageStyled = styled(ArtDirectedImage).withConfig({
99
105
  displayName: "ImageHeaderArtDirectedImageStyled",
100
- componentId: "sc-7ig3h-2"
106
+ componentId: "sc-7ig3h-3"
101
107
  })({
102
108
  width: "100%",
103
109
  ...viewport.lg({
@@ -130,7 +136,7 @@ const ImageHeaderArtDirectedImageStyled = styled(ArtDirectedImage).withConfig({
130
136
  });
131
137
  const ImageHeaderContentStyled = styled(GridItem).withConfig({
132
138
  displayName: "ImageHeaderContentStyled",
133
- componentId: "sc-7ig3h-3"
139
+ componentId: "sc-7ig3h-4"
134
140
  })({
135
141
  padding: `${getSpacing(spacingXl)} ${getSpacing(spacingMd)}`,
136
142
  gap: getSpacing(spacingSm),
@@ -170,7 +176,7 @@ const ImageHeaderContentStyled = styled(GridItem).withConfig({
170
176
  });
171
177
  const ImageHeaderBadgeStyled = styled(Badge).withConfig({
172
178
  displayName: "ImageHeaderBadgeStyled",
173
- componentId: "sc-7ig3h-4"
179
+ componentId: "sc-7ig3h-5"
174
180
  })({
175
181
  position: "absolute",
176
182
  top: getBadgeTopPosition(),
@@ -181,7 +187,7 @@ const ImageHeaderBadgeStyled = styled(Badge).withConfig({
181
187
  });
182
188
  const ImageHeaderHeadingStyled = styled(Heading).withConfig({
183
189
  displayName: "ImageHeaderHeadingStyled",
184
- componentId: "sc-7ig3h-5"
190
+ componentId: "sc-7ig3h-6"
185
191
  })({
186
192
  ...viewport.lg({
187
193
  textAlign: "left"
@@ -190,7 +196,7 @@ const ImageHeaderHeadingStyled = styled(Heading).withConfig({
190
196
  const ImageHeaderSublineWrapperStyled = styled.div.withConfig({
191
197
  shouldForwardProp,
192
198
  displayName: "ImageHeaderSublineWrapperStyled",
193
- componentId: "sc-7ig3h-6"
199
+ componentId: "sc-7ig3h-7"
194
200
  })({
195
201
  textAlign: "center",
196
202
  ...viewport.lg({
@@ -199,7 +205,7 @@ const ImageHeaderSublineWrapperStyled = styled.div.withConfig({
199
205
  });
200
206
  const ImageHeaderSublineHeadingStyled = styled(Heading).withConfig({
201
207
  displayName: "ImageHeaderSublineHeadingStyled",
202
- componentId: "sc-7ig3h-7"
208
+ componentId: "sc-7ig3h-8"
203
209
  })({
204
210
  textAlign: "center",
205
211
  ...viewport.lg({
@@ -208,7 +214,7 @@ const ImageHeaderSublineHeadingStyled = styled(Heading).withConfig({
208
214
  });
209
215
  const ImageHeaderButtonGroupStyled = styled(ButtonGroup).withConfig({
210
216
  displayName: "ImageHeaderButtonGroupStyled",
211
- componentId: "sc-7ig3h-8"
217
+ componentId: "sc-7ig3h-9"
212
218
  })({
213
219
  marginTop: getSpacing(spacingXs),
214
220
  width: "100%",
@@ -266,7 +272,7 @@ const ImageHeader = ({
266
272
  ...source,
267
273
  sizes: variant === imageHeaderVariantFull ? `(min-width: 1025px) and (max-width: 1920px) ${imageHeaderHeight * (48 / 9)}px, 100vw` : `(max-width: ${breakpoint_large}) 100vw, (min-width: 1025px) and (max-width: 1920px) ${imageHeaderHeight * (32 / 9)}px, 50vw`
268
274
  }]));
269
- return /* @__PURE__ */ jsx(Container, { padding: spacingNone, className: props.className, theme, children: /* @__PURE__ */ jsxs(ImageHeaderStyled, { ...props, contentPosition, variant, gap: spacingNone, component: "Grid", children: [
275
+ return /* @__PURE__ */ jsx(ImageHeaderContainerStyled, { padding: spacingNone, className: props.className, theme, children: /* @__PURE__ */ jsxs(ImageHeaderStyled, { ...props, contentPosition, variant, gap: spacingNone, component: "Grid", children: [
270
276
  /* @__PURE__ */ jsx(ImageHeaderImagesContainerStyled, { align: "center", variant, contentPosition, lg: 12 - contentColumns, children: /* @__PURE__ */ jsx(ImageHeaderArtDirectedImageStyled, { sources, image: {
271
277
  ...artDirectedImage.image,
272
278
  loading: "eager",
@@ -1,5 +1,22 @@
1
1
  import { ImageHeaderProps } from './props';
2
2
  export declare const imageHeaderHeight = 450;
3
+ /**
4
+ * Establishes an inline-size query container so the full-bleed offsets below can
5
+ * use `cqw` instead of `vw`.
6
+ *
7
+ * `100vw` includes the vertical scrollbar's width, while the space actually
8
+ * available is `documentElement.clientWidth`. Wherever the scrollbar takes up
9
+ * layout space (Firefox/Safari, and any OS set to "always show scrollbars"),
10
+ * `calc(-1 * (100vw - 100%) / 2)` therefore overshoots by half the scrollbar
11
+ * width and pushes the header past the viewport - producing a horizontal
12
+ * scrollbar. `100cqw` resolves against this container's content box, which
13
+ * excludes the scrollbar, so the offset is exact in every engine.
14
+ *
15
+ * Scoped to ImageHeader on purpose: `container-type` creates a new containing
16
+ * block, so applying it to the shared Container would affect every consumer.
17
+ * See SQDE-1109.
18
+ */
19
+ export declare const ImageHeaderContainerStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('../Container').ContainerProps, never> & Partial<Pick<import('../Container').ContainerProps, never>>> & string & Omit<({ className, children, appearance, tag, ...props }: import('../Container').ContainerProps) => import("react/jsx-runtime").JSX.Element, keyof import('react').Component<any, {}, any>>;
3
20
  export declare const getBadgeTopPosition: () => string;
4
21
  export declare const ImageHeaderStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('../Grid').GridProps, "variant" | "contentPosition"> & Pick<ImageHeaderProps, "variant" | "contentPosition">, never> & Partial<Pick<import('styled-components').FastOmit<import('../Grid').GridProps, "variant" | "contentPosition"> & Pick<ImageHeaderProps, "variant" | "contentPosition">, never>>> & string & Omit<({ tag, gap, autoLayout, ...props }: import('../Grid').GridProps) => import("react/jsx-runtime").JSX.Element, keyof import('react').Component<any, {}, any>>;
5
22
  export declare const ImageHeaderImagesContainerStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('../GridItem').GridItemProps, "variant" | "contentPosition"> & Pick<ImageHeaderProps, "variant" | "contentPosition">, never> & Partial<Pick<import('styled-components').FastOmit<import('../GridItem').GridItemProps, "variant" | "contentPosition"> & Pick<ImageHeaderProps, "variant" | "contentPosition">, never>>> & string & Omit<({ sm, tag, ...props }: import('../GridItem').GridItemProps) => import("react/jsx-runtime").JSX.Element, keyof import('react').Component<any, {}, any>>;
@@ -194,15 +194,6 @@ export declare const imageHeaderSchema: z.ZodObject<{
194
194
  contain: "contain";
195
195
  cover: "cover";
196
196
  }>>;
197
- objectPosition: z.ZodOptional<z.ZodEnum<{
198
- center: "center";
199
- "top left": "top left";
200
- "center left": "center left";
201
- "bottom left": "bottom left";
202
- "top right": "top right";
203
- "center right": "center right";
204
- "bottom right": "bottom right";
205
- }>>;
206
197
  roundedCorners: z.ZodOptional<z.ZodBoolean>;
207
198
  src: z.ZodString;
208
199
  alt: z.ZodOptional<z.ZodString>;
@@ -269,6 +260,7 @@ export declare const imageHeaderSchema: z.ZodObject<{
269
260
  Filter: "Filter";
270
261
  Grid: "Grid";
271
262
  Notification: "Notification";
263
+ Video: "Video";
272
264
  Focus: "Focus";
273
265
  AbTest: "AbTest";
274
266
  Above28: "Above28";
@@ -823,7 +815,6 @@ export declare const imageHeaderSchema: z.ZodObject<{
823
815
  VfHappyHelpful: "VfHappyHelpful";
824
816
  VfHappy: "VfHappy";
825
817
  VideoFrame: "VideoFrame";
826
- Video: "Video";
827
818
  Virtuoso: "Virtuoso";
828
819
  VirusProtection: "VirusProtection";
829
820
  VocSensor: "VocSensor";
@@ -1450,6 +1441,7 @@ export declare const imageHeaderSchema: z.ZodObject<{
1450
1441
  Filter: "Filter";
1451
1442
  Grid: "Grid";
1452
1443
  Notification: "Notification";
1444
+ Video: "Video";
1453
1445
  Focus: "Focus";
1454
1446
  AbTest: "AbTest";
1455
1447
  Above28: "Above28";
@@ -2004,7 +1996,6 @@ export declare const imageHeaderSchema: z.ZodObject<{
2004
1996
  VfHappyHelpful: "VfHappyHelpful";
2005
1997
  VfHappy: "VfHappy";
2006
1998
  VideoFrame: "VideoFrame";
2007
- Video: "Video";
2008
1999
  Virtuoso: "Virtuoso";
2009
2000
  VirusProtection: "VirusProtection";
2010
2001
  VocSensor: "VocSensor";
@@ -2228,6 +2219,7 @@ export declare const imageHeaderSchema: z.ZodObject<{
2228
2219
  Filter: "Filter";
2229
2220
  Grid: "Grid";
2230
2221
  Notification: "Notification";
2222
+ Video: "Video";
2231
2223
  Focus: "Focus";
2232
2224
  AbTest: "AbTest";
2233
2225
  Above28: "Above28";
@@ -2782,7 +2774,6 @@ export declare const imageHeaderSchema: z.ZodObject<{
2782
2774
  VfHappyHelpful: "VfHappyHelpful";
2783
2775
  VfHappy: "VfHappy";
2784
2776
  VideoFrame: "VideoFrame";
2785
- Video: "Video";
2786
2777
  Virtuoso: "Virtuoso";
2787
2778
  VirusProtection: "VirusProtection";
2788
2779
  VocSensor: "VocSensor";
@@ -16,7 +16,7 @@ import { getBackgroundColor } from "../../foundations/token/getBackgroundColor/i
16
16
  import { getBottomSpacing } from "../../foundations/token/getBottomSpacing/index.js";
17
17
  import { g as getSpacing } from "../../index-l-i-mIeP.js";
18
18
  import { d as colorBackgroundSubtle, b as colorBackgroundBrand } from "../../BackgroundColor-Ba4D10TC.js";
19
- import { g as getForegroundColor } from "../../colorUtils-CfSj2Iqa.js";
19
+ import { g as getForegroundColor } from "../../colorUtils-c9PiZEci.js";
20
20
  import { s as shouldForwardProp } from "../../shouldForwardProp-CONMmlMa.js";
21
21
  import { i, a, b } from "../../props-CyJ_9lYu.js";
22
22
  import { a as headingAlignLeft } from "../../props-GrMT6XLD.js";
@@ -74,6 +74,7 @@ export declare const infoBannerSchema: z.ZodObject<{
74
74
  Filter: "Filter";
75
75
  Grid: "Grid";
76
76
  Notification: "Notification";
77
+ Video: "Video";
77
78
  Focus: "Focus";
78
79
  AbTest: "AbTest";
79
80
  Above28: "Above28";
@@ -628,7 +629,6 @@ export declare const infoBannerSchema: z.ZodObject<{
628
629
  VfHappyHelpful: "VfHappyHelpful";
629
630
  VfHappy: "VfHappy";
630
631
  VideoFrame: "VideoFrame";
631
- Video: "Video";
632
632
  Virtuoso: "Virtuoso";
633
633
  VirusProtection: "VirusProtection";
634
634
  VocSensor: "VocSensor";
@@ -766,6 +766,7 @@ export declare const infoBannerSchema: z.ZodObject<{
766
766
  Filter: "Filter";
767
767
  Grid: "Grid";
768
768
  Notification: "Notification";
769
+ Video: "Video";
769
770
  Focus: "Focus";
770
771
  AbTest: "AbTest";
771
772
  Above28: "Above28";
@@ -1320,7 +1321,6 @@ export declare const infoBannerSchema: z.ZodObject<{
1320
1321
  VfHappyHelpful: "VfHappyHelpful";
1321
1322
  VfHappy: "VfHappy";
1322
1323
  VideoFrame: "VideoFrame";
1323
- Video: "Video";
1324
1324
  Virtuoso: "Virtuoso";
1325
1325
  VirusProtection: "VirusProtection";
1326
1326
  VocSensor: "VocSensor";
@@ -10,7 +10,7 @@ import { getBorderColor } from "../../foundations/token/getBorderColor/index.js"
10
10
  import { getBorderWidth } from "../../foundations/token/getBorderWidth/index.js";
11
11
  import { getTextColor } from "../../foundations/token/getTextColor/index.js";
12
12
  import { c as colorBorderFocus } from "../../BorderColor-BACbvI20.js";
13
- import { a as borderWidthFocus } from "../../BorderWidth-OZWeXaq_.js";
13
+ import { b as borderWidthFocus } from "../../BorderWidth-CwrNKc0Q.js";
14
14
  import { f as colorTextBrand, a as colorTextNeutral } from "../../TextColor-DsntmDNw.js";
15
15
  const hover = {
16
16
  textDecoration: "none",
@@ -5,7 +5,7 @@ import FormHelperLabel from "../FormHelperLabel/index.js";
5
5
  import FormHelperMessage from "../FormHelperMessage/index.js";
6
6
  import { s as spacingMd, a as spacingXs } from "../../Spacing-Dj-qX3Z5.js";
7
7
  import { i as inputStateError, a as inputStateSuccess } from "../../props-Czq9XX2J.js";
8
- import { I as InputWrapperStyled, a as InputStyled } from "../../styled-DYgC4qQm.js";
8
+ import { I as InputWrapperStyled, a as InputStyled } from "../../styled-ldBsCamo.js";
9
9
  const Input = ({
10
10
  uid,
11
11
  status,
@@ -113,6 +113,7 @@ export declare const inputSharedPropsSchema: z.ZodObject<{
113
113
  ToggleButtonProvider: "ToggleButtonProvider";
114
114
  Tray: "Tray";
115
115
  UtilityLink: "UtilityLink";
116
+ Video: "Video";
116
117
  YouTubeVideo: "YouTubeVideo";
117
118
  }>;
118
119
  sysId: z.ZodString;
@@ -1,4 +1,4 @@
1
1
  import { LegendProps } from './props';
2
- declare const Legend: ({ contents, ...props }: LegendProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const Legend: ({ contents, ...props }: LegendProps) => import("react/jsx-runtime").JSX.Element | null;
3
3
  export default Legend;
4
4
  export * from './props';
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import { jsx, Fragment } from "react/jsx-runtime";
2
+ import { jsx } from "react/jsx-runtime";
3
3
  import Body from "../Body/index.js";
4
4
  import Heading from "../Heading/index.js";
5
5
  import IconSnippet from "../IconSnippet/index.js";
6
6
  import { i as iconSnippetAlignCenter } from "../../props-BCMLpYc6.js";
7
- import { R as RichText, a as RichTextContentful } from "../../index-XoIBkRyI.js";
8
- import { a as richTextComponentName, r as richTextContentfulComponentName } from "../../props-B5OwQmNC.js";
7
+ import { a as RichTextContentful, R as RichText } from "../../index-BLp5wi_X.js";
8
+ import { r as richTextContentfulComponentName, a as richTextComponentName } from "../../props-B5OwQmNC.js";
9
9
  import styled from "styled-components";
10
10
  import { s as shouldForwardProp } from "../../shouldForwardProp-CONMmlMa.js";
11
11
  const LegendStyled = styled.legend.withConfig({
@@ -21,75 +21,61 @@ const LegendStyled = styled.legend.withConfig({
21
21
  display: "-webkit-flex",
22
22
  flexDirection: "column"
23
23
  });
24
+ const forceSpanRichTextTagProps = {
25
+ p: {
26
+ tag: "span"
27
+ }
28
+ };
29
+ const forceSpanRichTextContentfulTagProps = {
30
+ root: {
31
+ tag: "span"
32
+ },
33
+ p: {
34
+ tag: "span"
35
+ }
36
+ };
37
+ const patchNestedContent = (content) => {
38
+ if ("RichText" === content.component) {
39
+ return {
40
+ ...content,
41
+ tagProps: forceSpanRichTextTagProps
42
+ };
43
+ }
44
+ if (richTextContentfulComponentName === content.component) {
45
+ return {
46
+ ...content,
47
+ tagProps: forceSpanRichTextContentfulTagProps
48
+ };
49
+ }
50
+ return content;
51
+ };
52
+ const legendRenderers = {
53
+ Heading: (content) => /* @__PURE__ */ jsx(Heading, { ...content, children: content.children }, content.uid),
54
+ Body: (content) => /* @__PURE__ */ jsx(Body, { ...content, tag: "span", children: content.children }, content.uid),
55
+ [richTextComponentName]: (content) => /* @__PURE__ */ jsx(RichText, { ...content, tagProps: forceSpanRichTextTagProps, html: content.children }, content.uid),
56
+ [richTextContentfulComponentName]: (content) => /* @__PURE__ */ jsx(RichTextContentful, { ...content, tagProps: forceSpanRichTextContentfulTagProps }, content.uid),
57
+ IconSnippet: (content) => {
58
+ var _a;
59
+ const iconSnippet = content;
60
+ const updatedContent = {
61
+ ...iconSnippet,
62
+ contents: (_a = iconSnippet.contents) == null ? void 0 : _a.map(patchNestedContent)
63
+ };
64
+ return /* @__PURE__ */ jsx(IconSnippet, { ...updatedContent, tag: "span", iconAlign: iconSnippetAlignCenter }, content.uid);
65
+ }
66
+ };
67
+ const renderLegendContent = (content) => {
68
+ const renderer = legendRenderers[content.component ?? ""];
69
+ return renderer ? renderer(content) : null;
70
+ };
24
71
  const Legend = ({
25
72
  contents,
26
73
  ...props
27
74
  }) => {
28
- const getLegend = () => {
29
- if (!contents || 0 === contents.length) {
30
- return null;
31
- }
32
- return /* @__PURE__ */ jsx(LegendStyled, { ...props, children: contents.map((legend) => {
33
- var _a;
34
- if ("Heading" === legend.component) {
35
- return /* @__PURE__ */ jsx(Heading, { ...legend, children: legend.children }, legend.uid);
36
- }
37
- if ("Body" === legend.component) {
38
- return /* @__PURE__ */ jsx(Body, { ...legend, tag: "span", children: legend.children }, legend.uid);
39
- }
40
- if (richTextComponentName === legend.component) {
41
- return /* @__PURE__ */ jsx(RichText, { ...legend, tagProps: {
42
- p: {
43
- tag: "span"
44
- }
45
- }, html: legend.children }, legend.uid);
46
- }
47
- if (richTextContentfulComponentName === legend.component) {
48
- return /* @__PURE__ */ jsx(RichTextContentful, { ...legend, tagProps: {
49
- root: {
50
- tag: "span"
51
- },
52
- p: {
53
- tag: "span"
54
- }
55
- } }, legend.uid);
56
- }
57
- if ("IconSnippet" === legend.component) {
58
- const updatedLegend = {
59
- ...legend,
60
- contents: (_a = legend.contents) == null ? void 0 : _a.map((content) => {
61
- if ("RichText" === content.component) {
62
- return {
63
- ...content,
64
- tagProps: {
65
- p: {
66
- tag: "span"
67
- }
68
- }
69
- };
70
- }
71
- if (richTextContentfulComponentName === content.component) {
72
- return {
73
- ...content,
74
- tagProps: {
75
- root: {
76
- tag: "span"
77
- },
78
- p: {
79
- tag: "span"
80
- }
81
- }
82
- };
83
- }
84
- return content;
85
- })
86
- };
87
- return /* @__PURE__ */ jsx(IconSnippet, { ...updatedLegend, tag: "span", iconAlign: iconSnippetAlignCenter }, legend.uid);
88
- }
89
- return null;
90
- }) });
91
- };
92
- return /* @__PURE__ */ jsx(Fragment, { children: getLegend() });
75
+ if (!contents || 0 === contents.length) {
76
+ return null;
77
+ }
78
+ return /* @__PURE__ */ jsx(LegendStyled, { ...props, children: contents.map(renderLegendContent) });
93
79
  };
94
80
  export {
95
81
  Legend as default