@vodafone_de/brix-components 9.0.4 → 10.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 (160) hide show
  1. package/dist/{BorderRadius-ClUShVLu.js → BorderRadius-2LdggXbQ.js} +2 -2
  2. package/dist/components/Accordion/index.js +1 -1
  3. package/dist/components/AccordionGroup/index.js +1 -1
  4. package/dist/components/ArtDirectedImage/index.d.ts +5 -0
  5. package/dist/components/ArtDirectedImage/index.js +75 -0
  6. package/dist/components/ArtDirectedImage/props.d.ts +24 -0
  7. package/dist/components/ArtDirectedImage/styled.d.ts +2 -0
  8. package/dist/components/ArtDirectedImage/validate.d.ts +3 -0
  9. package/dist/components/Badge/index.js +2 -3
  10. package/dist/components/Body/index.js +4 -5
  11. package/dist/components/BottomBar/index.js +4 -4
  12. package/dist/components/BottomBar/props.d.ts +1 -1
  13. package/dist/components/Button/index.js +4 -5
  14. package/dist/components/ButtonAsLink/index.js +2 -3
  15. package/dist/components/ButtonGroup/index.js +6 -6
  16. package/dist/components/ButtonGroup/props.d.ts +2 -2
  17. package/dist/components/ButtonGroup/validate.d.ts +2 -2
  18. package/dist/components/Calendar/index.js +305 -72
  19. package/dist/components/Card/index.js +3 -3
  20. package/dist/components/Carousel/index.js +6 -7
  21. package/dist/components/Checkbox/index.js +2 -2
  22. package/dist/components/CheckboxGroup/index.js +2 -2
  23. package/dist/components/Collapsible/index.js +19 -5
  24. package/dist/components/Collapsible/props.d.ts +5 -0
  25. package/dist/components/Collapsible/styled.d.ts +1 -1
  26. package/dist/components/ColorSwatch/index.js +1 -1
  27. package/dist/components/ColorSwatchGroup/index.js +2 -2
  28. package/dist/components/ConsentMessage/index.js +2 -2
  29. package/dist/components/Container/index.d.ts +1 -0
  30. package/dist/components/Container/index.js +10 -105
  31. package/dist/components/Container/styled.d.ts +2 -0
  32. package/dist/components/DateInput/index.js +1 -1
  33. package/dist/components/DemoBox/index.js +1 -1
  34. package/dist/components/Dialog/index.js +1 -1
  35. package/dist/components/DiscoveryCard/index.js +14 -11
  36. package/dist/components/DiscoveryCard/styled.d.ts +1 -1
  37. package/dist/components/DiscoveryCardGroup/index.js +12 -10
  38. package/dist/components/Divider/index.js +1 -1
  39. package/dist/components/EnergySnippet/index.js +2 -2
  40. package/dist/components/Fieldset/index.js +1 -1
  41. package/dist/components/FilterGroup/index.js +3 -3
  42. package/dist/components/Flex/index.js +5 -2
  43. package/dist/components/Flex/props.d.ts +11 -3
  44. package/dist/components/Flex/stories/alignCenterArgs.d.ts +2 -0
  45. package/dist/components/Flex/stories/alignEndArgs.d.ts +2 -0
  46. package/dist/components/Flex/stories/alignStartArgs.d.ts +2 -0
  47. package/dist/components/Flex/styled.d.ts +3 -2
  48. package/dist/components/FlexItem/index.js +1 -1
  49. package/dist/components/FootnoteContent/index.js +1 -1
  50. package/dist/components/FootnoteLink/index.js +2 -2
  51. package/dist/components/Form/index.js +2 -2
  52. package/dist/components/FormElement/index.js +1 -1
  53. package/dist/components/GoogleMap/index.js +2 -2
  54. package/dist/components/Grid/index.d.ts +3 -1
  55. package/dist/components/Grid/index.js +16 -91
  56. package/dist/components/GridItem/index.d.ts +7 -0
  57. package/dist/components/GridItem/index.js +11 -54
  58. package/dist/components/Heading/index.js +4 -5
  59. package/dist/components/HifiIcon/index.js +1 -1
  60. package/dist/components/IconButton/index.js +3 -3
  61. package/dist/components/IconSnippet/index.js +3 -3
  62. package/dist/components/IconSnippetList/index.js +2 -3
  63. package/dist/components/Image/index.js +111 -52
  64. package/dist/components/Image/props.d.ts +21 -35
  65. package/dist/components/Image/styled.d.ts +1 -1
  66. package/dist/components/Image/validate.d.ts +1 -4
  67. package/dist/components/ImageHeader/index.js +18 -25
  68. package/dist/components/ImageHeader/props.d.ts +2 -2
  69. package/dist/components/ImageHeader/styled.d.ts +1 -1
  70. package/dist/components/InfoBanner/index.js +1 -1
  71. package/dist/components/InlineIcon/index.js +1 -1
  72. package/dist/components/InlineLink/index.js +1 -1
  73. package/dist/components/Input/index.js +2 -3
  74. package/dist/components/Label/index.js +2 -3
  75. package/dist/components/Legend/index.js +1 -1
  76. package/dist/components/Link/index.js +4 -5
  77. package/dist/components/LinkAsButton/index.js +1 -2
  78. package/dist/components/LinkList/index.js +2 -3
  79. package/dist/components/LinkListItem/index.js +5 -5
  80. package/dist/components/LoadingSpinner/index.js +2 -2
  81. package/dist/components/LocalStyle/index.js +2 -2
  82. package/dist/components/MediaText/index.js +5 -6
  83. package/dist/components/Notification/index.js +3 -3
  84. package/dist/components/OpenTextFootnoteAdapter/index.js +3 -3
  85. package/dist/components/Overlay/index.js +1 -1
  86. package/dist/components/PickerGroup/index.js +8 -11
  87. package/dist/components/Price/index.d.ts +1 -1
  88. package/dist/components/Price/index.js +2 -3
  89. package/dist/components/ProductCard/index.js +29 -22
  90. package/dist/components/ProductCard/props.d.ts +11 -14
  91. package/dist/components/ProductCard/styled.d.ts +1 -0
  92. package/dist/components/QuickLinkList/index.js +3 -5
  93. package/dist/components/RadioGroup/index.js +2 -2
  94. package/dist/components/Rating/index.js +2 -2
  95. package/dist/components/RichText/index.js +1 -1
  96. package/dist/components/RichtTextContentful/index.js +2 -2
  97. package/dist/components/ScreenreaderOnly/index.js +1 -1
  98. package/dist/components/SearchInput/index.js +4 -5
  99. package/dist/components/SelectInput/index.js +3 -4
  100. package/dist/components/Stepper/index.js +3 -4
  101. package/dist/components/SuggestInput/index.js +4 -5
  102. package/dist/components/Switch/index.js +2 -2
  103. package/dist/components/TabGroup/index.js +2 -2
  104. package/dist/components/TabularPrice/index.js +2 -3
  105. package/dist/components/TextList/index.js +2 -3
  106. package/dist/components/Textarea/index.js +3 -4
  107. package/dist/components/TimeInput/index.js +1 -1
  108. package/dist/components/Tray/index.js +1 -1
  109. package/dist/components/UtilityLink/index.js +20 -2
  110. package/dist/components/UtilityLink/styled.d.ts +1 -0
  111. package/dist/components/YoutubeVideo/index.js +2 -2
  112. package/dist/contentful/components.d.ts +1 -1
  113. package/dist/contentful/live-preview-inspector/index.js +1 -1
  114. package/dist/contentful/live-preview-renderer/index.js +1 -1
  115. package/dist/contentful/map/artDirectedImage.d.ts +4 -0
  116. package/dist/contentful/renderer/index.js +1 -1
  117. package/dist/{cssVars-ZsZIfkeD.js → cssVars-TmhA1NpG.js} +1 -1
  118. package/dist/filterProps-CxkibNnG.js +18 -0
  119. package/dist/foundations/GlobalStyle/index.js +1 -1
  120. package/dist/getSizesFromGridConfig-DKOLupyb.js +48 -0
  121. package/dist/hooks/useImageComponent/index.d.ts +37 -0
  122. package/dist/hooks/useImageComponent/index.js +23 -0
  123. package/dist/hooks/usePictureComponent/index.d.ts +49 -0
  124. package/dist/hooks/usePictureComponent/index.js +38 -0
  125. package/dist/hooks/useViewport/index.js +5 -20
  126. package/dist/{index-ClAH0TNC.js → index-72IFVw5W.js} +14 -12
  127. package/dist/{index-BJHhIBYl.js → index-BsykXBqC.js} +1 -1
  128. package/dist/index-Bu-7sSif.js +201 -0
  129. package/dist/{index-DCE5HNIR.js → index-C2E3JrhF.js} +1 -1
  130. package/dist/{index-TL0X3rXH.js → index-DCXRnuHz.js} +7 -8
  131. package/dist/index-DKCzYjXw.js +25 -0
  132. package/dist/{index-C4eCcl02.js → index-DP6Nlg-a.js} +4 -5
  133. package/dist/index-DbG0QL9D.js +113 -0
  134. package/dist/{index-CEotMXpL.js → index-Dd-A7i9Y.js} +3 -4
  135. package/dist/{index-j22agtAk.js → index-DwGcrvTh.js} +4 -5
  136. package/dist/index.d.ts +4 -2
  137. package/dist/index.js +213 -212
  138. package/dist/{mapContentToComponents-C_O2rRrX.js → mapContentToComponents-DcPjYAXH.js} +155 -140
  139. package/dist/{styled-Dw5c-xwf.js → styled-BIcsESkS.js} +1 -1
  140. package/dist/{styled-7vJ7mrAA.js → styled-BKH3egch.js} +2 -2
  141. package/dist/{styled-BxkvYuWW.js → styled-CUp4EbPh.js} +23 -2
  142. package/dist/{styled-BBXC0aka.js → styled-D-fzMZNS.js} +1 -1
  143. package/dist/{styled-0KSRG-Fv.js → styled-DdeOXNN9.js} +26 -4
  144. package/dist/{styled-xKyZg4q9.js → styled-DmMk0W0J.js} +2 -2
  145. package/dist/{styled-Dq0NuP5r.js → styled-rsUoUFyl.js} +2 -2
  146. package/dist/{tags-D7CRQqc1.js → tags-Cwgg3Gx2.js} +7 -7
  147. package/dist/{validate-Dlzxlfzp.js → validate-CLBUbscx.js} +4 -6
  148. package/package.json +1 -1
  149. package/dist/Viewport-C35jx6QE.js +0 -8
  150. package/dist/components/ResponsiveImage/index.d.ts +0 -6
  151. package/dist/components/ResponsiveImage/index.js +0 -124
  152. package/dist/components/ResponsiveImage/props.d.ts +0 -16
  153. package/dist/components/ResponsiveImage/styled.d.ts +0 -4
  154. package/dist/components/ResponsiveImage/validate.d.ts +0 -3
  155. package/dist/components/ResponsiveImage/validate.test.d.ts +0 -1
  156. package/dist/contentful/map/responsiveImage.d.ts +0 -4
  157. package/dist/filterProps-BJ5SpbnA.js +0 -17
  158. package/dist/renderInlineRichTextFromOpenText-RvOG3QbI.js +0 -13
  159. package/dist/styled-BiCOjvNq.js +0 -29
  160. package/dist/validate-DYmFz2FF.js +0 -85
@@ -0,0 +1,201 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { createContext, useContext } from "react";
3
+ import { d as divTagName, u as ulTagName, o as olTagName, q as navTagName, r as mainTagName, s as sectionTagName, b as asideTagName, a as articleTagName, l as liTagName } from "./tags-Cwgg3Gx2.js";
4
+ import { s as spacingMd } from "./Spacing-8v6hcO2x.js";
5
+ import { G as GridItemStyled, a as GridStyled } from "./styled-DdeOXNN9.js";
6
+ import { i as isObject, h as hasMatchingComponentName } from "./isObject-BYBrvoVW.js";
7
+ import { i as isBottomSpacing } from "./isBottomSpacing-BxfreCZU.js";
8
+ const resolveBreakpoints = (config) => {
9
+ const sm = config.sm ?? 12;
10
+ const md = config.md ?? sm;
11
+ const lg = config.lg ?? md;
12
+ return {
13
+ sm,
14
+ md,
15
+ lg
16
+ };
17
+ };
18
+ const calculateNestedGridConfig = (parentGridConfig, currentGridConfig) => {
19
+ const parent = resolveBreakpoints(parentGridConfig);
20
+ const current = resolveBreakpoints(currentGridConfig);
21
+ return {
22
+ sm: parent.sm * (current.sm / 12),
23
+ md: parent.md * (current.md / 12),
24
+ lg: parent.lg * (current.lg / 12)
25
+ };
26
+ };
27
+ const gridTags = [divTagName, ulTagName, olTagName, navTagName, mainTagName, sectionTagName, asideTagName, articleTagName];
28
+ const gridAligns = ["left", "center", "right"];
29
+ const gridSpacings = ["None", "Md"];
30
+ const gridColSpan = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
31
+ const validateGridColSpan = (colSpan) => {
32
+ if (!Number.isInteger(colSpan)) {
33
+ return false;
34
+ }
35
+ if (!gridColSpan.includes(colSpan)) {
36
+ return false;
37
+ }
38
+ return true;
39
+ };
40
+ const validateGridConfig = (config) => {
41
+ if (!isObject(config)) {
42
+ return false;
43
+ }
44
+ const gridConfig = config;
45
+ if (!gridConfig.sm || false === validateGridColSpan(gridConfig.sm)) {
46
+ return false;
47
+ }
48
+ if (gridConfig.md && false === validateGridColSpan(gridConfig.md)) {
49
+ return false;
50
+ }
51
+ if (gridConfig.lg && false === validateGridColSpan(gridConfig.lg)) {
52
+ return false;
53
+ }
54
+ return true;
55
+ };
56
+ const isGridConfig = (config) => validateGridConfig(config);
57
+ const validateGridProps = (props) => {
58
+ if (!isObject(props)) {
59
+ return false;
60
+ }
61
+ const gridProps = props;
62
+ if (!hasMatchingComponentName(gridProps.component, "Grid")) {
63
+ return false;
64
+ }
65
+ if (gridProps.align !== void 0 && !gridAligns.includes(gridProps.align)) {
66
+ return false;
67
+ }
68
+ if (gridProps.tag !== void 0 && !gridTags.includes(gridProps.tag)) {
69
+ return false;
70
+ }
71
+ if (gridProps.spacing !== void 0 && !gridSpacings.includes(gridProps.spacing)) {
72
+ return false;
73
+ }
74
+ if (gridProps.bottomSpacing && !isBottomSpacing(gridProps.bottomSpacing)) {
75
+ return false;
76
+ }
77
+ return true;
78
+ };
79
+ const isGridProps = (props) => {
80
+ return validateGridProps(props);
81
+ };
82
+ const gridItemTags = [divTagName, liTagName, navTagName, mainTagName, sectionTagName, asideTagName, articleTagName];
83
+ const gridItemAligns = ["left", "center", "right"];
84
+ const validateGridItemProps = (props) => {
85
+ if (!isObject(props)) {
86
+ return false;
87
+ }
88
+ const itemProps = props;
89
+ if (!hasMatchingComponentName(itemProps.component, "GridItem")) {
90
+ return false;
91
+ }
92
+ if (itemProps.sm && false === validateGridColSpan(itemProps.sm)) {
93
+ return false;
94
+ }
95
+ if (itemProps.md && false === validateGridColSpan(itemProps.md)) {
96
+ return false;
97
+ }
98
+ if (itemProps.lg && false === validateGridColSpan(itemProps.lg)) {
99
+ return false;
100
+ }
101
+ if (itemProps.align !== void 0 && !gridItemAligns.includes(itemProps.align)) {
102
+ return false;
103
+ }
104
+ if (itemProps.tag !== void 0 && !gridItemTags.includes(itemProps.tag)) {
105
+ return false;
106
+ }
107
+ if (itemProps.children === void 0) {
108
+ return false;
109
+ }
110
+ return true;
111
+ };
112
+ const isGridItemProps = (props) => {
113
+ return validateGridItemProps(props);
114
+ };
115
+ const GridItemContext = createContext({
116
+ gridConfig: {
117
+ sm: 12
118
+ }
119
+ });
120
+ const GridItem = ({
121
+ sm = 12,
122
+ tag = divTagName,
123
+ ...props
124
+ }) => {
125
+ const gridContext = useContext(GridContext);
126
+ const gridItemContext = useContext(GridItemContext);
127
+ const gridTag = gridContext == null ? void 0 : gridContext.tag;
128
+ const gridSpacing = gridContext == null ? void 0 : gridContext.spacing;
129
+ const gridAutoLayout = gridContext == null ? void 0 : gridContext.autoLayout;
130
+ const gridItemGridConfig = {
131
+ sm,
132
+ md: props.md,
133
+ lg: props.lg
134
+ };
135
+ let nestedGridConfig;
136
+ if (gridContext && gridContext.nestedGridConfig) {
137
+ nestedGridConfig = calculateNestedGridConfig(gridContext.nestedGridConfig, gridItemGridConfig);
138
+ } else if (gridContext && gridContext.autoLayout) {
139
+ nestedGridConfig = calculateNestedGridConfig(gridContext.autoLayout, gridItemGridConfig);
140
+ } else if (gridItemContext && gridItemContext.nestedGridConfig) {
141
+ nestedGridConfig = calculateNestedGridConfig(gridItemContext.nestedGridConfig, gridItemGridConfig);
142
+ } else if (gridItemContext && gridItemContext.gridConfig) {
143
+ nestedGridConfig = calculateNestedGridConfig(gridItemContext.gridConfig, gridItemGridConfig);
144
+ }
145
+ const gridItem = /* @__PURE__ */ jsx(GridItemStyled, { ...props, as: gridTag === ulTagName || gridTag === olTagName ? liTagName : tag, spacing: gridSpacing, sm, ...gridAutoLayout, children: props.children });
146
+ if (gridAutoLayout) {
147
+ return gridItem;
148
+ }
149
+ return /* @__PURE__ */ jsx(GridItemContext, { value: {
150
+ gridConfig: {
151
+ sm,
152
+ md: props.md,
153
+ lg: props.lg
154
+ },
155
+ nestedGridConfig
156
+ }, children: gridItem });
157
+ };
158
+ const GridContext = createContext(void 0);
159
+ const Grid = ({
160
+ tag = divTagName,
161
+ spacing = spacingMd,
162
+ autoLayout,
163
+ ...props
164
+ }) => {
165
+ const gridContext = useContext(GridContext);
166
+ const gridItemContext = useContext(GridItemContext);
167
+ let nestedGridConfig;
168
+ if (gridContext && gridContext.nestedGridConfig && autoLayout) {
169
+ nestedGridConfig = calculateNestedGridConfig(gridContext.nestedGridConfig, autoLayout);
170
+ } else if (gridContext && gridContext.autoLayout && autoLayout) {
171
+ nestedGridConfig = calculateNestedGridConfig(gridContext.autoLayout, autoLayout);
172
+ } else if (gridItemContext && gridItemContext.nestedGridConfig && autoLayout) {
173
+ nestedGridConfig = calculateNestedGridConfig(gridItemContext.nestedGridConfig, autoLayout);
174
+ } else if (gridItemContext && gridItemContext.gridConfig && autoLayout) {
175
+ nestedGridConfig = calculateNestedGridConfig(gridItemContext.gridConfig, autoLayout);
176
+ }
177
+ return /* @__PURE__ */ jsx(GridContext, { value: {
178
+ tag,
179
+ spacing,
180
+ autoLayout,
181
+ nestedGridConfig
182
+ }, children: /* @__PURE__ */ jsx(GridStyled, { ...props, as: tag, spacing, children: props.children }) });
183
+ };
184
+ export {
185
+ GridItem as G,
186
+ Grid as a,
187
+ GridItemContext as b,
188
+ gridItemAligns as c,
189
+ GridContext as d,
190
+ gridTags as e,
191
+ gridAligns as f,
192
+ gridItemTags as g,
193
+ gridSpacings as h,
194
+ isGridItemProps as i,
195
+ validateGridColSpan as j,
196
+ validateGridConfig as k,
197
+ isGridConfig as l,
198
+ validateGridProps as m,
199
+ isGridProps as n,
200
+ validateGridItemProps as v
201
+ };
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import styled from "styled-components";
3
- import { a as filterProps } from "./filterProps-BJ5SpbnA.js";
3
+ import { a as filterProps } from "./filterProps-CxkibNnG.js";
4
4
  const screenreaderOnly = {
5
5
  position: "absolute",
6
6
  width: "1px",
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { S as ScreenreaderOnly } from "./index-DCE5HNIR.js";
2
+ import { S as ScreenreaderOnly } from "./index-C2E3JrhF.js";
3
3
  import styled from "styled-components";
4
4
  import { getBottomSpacing } from "./foundations/token/getBottomSpacing/index.js";
5
5
  import { getFontWeight } from "./foundations/token/getFontWeight/index.js";
@@ -10,8 +10,7 @@ import { getTextDecoration } from "./foundations/token/getTextDecoration/index.j
10
10
  import { f as fontWeightBold, a as fontWeightRegular } from "./FontWeight-DEBGHbtO.js";
11
11
  import { s as spacingMd, c as spacingNone, a as spacingXs } from "./Spacing-8v6hcO2x.js";
12
12
  import { f as colorTextCritical, a as colorTextNeutral } from "./TextColor-BXVMXUVE.js";
13
- import { a as filterProps } from "./filterProps-BJ5SpbnA.js";
14
- import { r as renderInlineRichTextFromOpenText } from "./renderInlineRichTextFromOpenText-RvOG3QbI.js";
13
+ import { a as filterProps } from "./filterProps-CxkibNnG.js";
15
14
  import { i as isObject, h as hasMatchingComponentName } from "./isObject-BYBrvoVW.js";
16
15
  import { i as isBottomSpacing } from "./isBottomSpacing-BxfreCZU.js";
17
16
  const priceOrientationHorizontal = "horizontal";
@@ -161,10 +160,10 @@ const Price = (props) => {
161
160
  "aria-hidden": true
162
161
  }, itemProp: offerProductName ? "offers" : void 0, itemType: offerProductName ? "https://schema.org/Offer" : void 0, itemScope: offerProductName ? true : void 0, children: [
163
162
  offerProductName && /* @__PURE__ */ jsx("meta", { itemProp: "priceCurrency", content: "EUR" }),
164
- props.strikePrice ? /* @__PURE__ */ jsx(StrikePriceStyled, { children: renderInlineRichTextFromOpenText(priceProps.strikePrice) }) : null,
163
+ props.strikePrice ? /* @__PURE__ */ jsx(StrikePriceStyled, { children: priceProps.strikePrice }) : null,
165
164
  /* @__PURE__ */ jsxs(PriceOrientationStyled, { orientation, align, itemProp: offerProductName ? "price" : void 0, content: offerProductName ? price : void 0, children: [
166
- /* @__PURE__ */ jsx(PriceStyled, { size: priceProps.size, children: renderInlineRichTextFromOpenText(priceToRender) }),
167
- /* @__PURE__ */ jsx(PriceSuffixStyled, { children: renderInlineRichTextFromOpenText(priceProps.suffix) })
165
+ /* @__PURE__ */ jsx(PriceStyled, { size: priceProps.size, children: priceToRender }),
166
+ /* @__PURE__ */ jsx(PriceSuffixStyled, { children: priceProps.suffix })
168
167
  ] })
169
168
  ] })
170
169
  ] });
@@ -210,8 +209,8 @@ const TabularPrice = ({
210
209
  }, itemProp: offerProductName ? "offers" : void 0, itemType: offerProductName ? "https://schema.org/Offer" : void 0, itemScope: offerProductName ? true : void 0, children: [
211
210
  offerProductName && /* @__PURE__ */ jsx("meta", { itemProp: "priceCurrency", content: "EUR" }),
212
211
  /* @__PURE__ */ jsx(TabularPricePrefixStyled, { prefixWeight, children: props.prefix }),
213
- props.strikePrice ? /* @__PURE__ */ jsx(StrikePriceStyled, { children: renderInlineRichTextFromOpenText(props.strikePrice) }) : null,
214
- /* @__PURE__ */ jsx(PriceStyled, { size: props.size, itemProp: offerProductName ? "price" : void 0, content: offerProductName ? props.price : void 0, children: renderInlineRichTextFromOpenText(props.price) })
212
+ props.strikePrice ? /* @__PURE__ */ jsx(StrikePriceStyled, { children: props.strikePrice }) : null,
213
+ /* @__PURE__ */ jsx(PriceStyled, { size: props.size, itemProp: offerProductName ? "price" : void 0, content: offerProductName ? props.price : void 0, children: props.price })
215
214
  ] })
216
215
  ] });
217
216
  };
@@ -0,0 +1,25 @@
1
+ import { useState, useEffect } from "react";
2
+ import { largeMediaQuery, mediumMediaQuery } from "./foundations/media-query/viewport/index.js";
3
+ import { useMediaQuery } from "./hooks/useMediaQuery/index.js";
4
+ const viewportSm = "sm";
5
+ const viewportMd = "md";
6
+ const viewportLg = "lg";
7
+ const useViewport = () => {
8
+ const tablet = useMediaQuery(mediumMediaQuery);
9
+ const desktop = useMediaQuery(largeMediaQuery);
10
+ const [viewportState, setViewportState] = useState(viewportSm);
11
+ useEffect(() => {
12
+ if (desktop) {
13
+ setViewportState(viewportLg);
14
+ } else if (tablet) {
15
+ setViewportState(viewportMd);
16
+ } else {
17
+ setViewportState(viewportSm);
18
+ }
19
+ }, [tablet, desktop]);
20
+ return viewportState;
21
+ };
22
+ export {
23
+ useViewport as u,
24
+ viewportLg as v
25
+ };
@@ -2,13 +2,12 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { cloneElement } from "react";
3
3
  import parse, { Element, domToReact } from "html-react-parser";
4
4
  import Body from "./components/Body/index.js";
5
- import { F as FootnoteLink } from "./index-BJHhIBYl.js";
5
+ import { F as FootnoteLink } from "./index-BsykXBqC.js";
6
6
  import Heading from "./components/Heading/index.js";
7
7
  import InlineLink from "./components/InlineLink/index.js";
8
8
  import { T as TableWrapper, e as TableHead, a as TableBody, d as TableFoot } from "./TableWrapper-Do9KCTGV.js";
9
- import { e as headingHtmlTags, o as olTagName, f as strongTagName, g as supTagName, u as ulTagName } from "./tags-D7CRQqc1.js";
9
+ import { e as headingHtmlTags, o as olTagName, f as strongTagName, g as supTagName, u as ulTagName } from "./tags-Cwgg3Gx2.js";
10
10
  import { c as spacingNone, s as spacingMd } from "./Spacing-8v6hcO2x.js";
11
- import { r as renderInlineRichTextFromOpenText } from "./renderInlineRichTextFromOpenText-RvOG3QbI.js";
12
11
  import styled from "styled-components";
13
12
  import { getBodySize } from "./foundations/token/getBodySize/index.js";
14
13
  import { getBottomSpacing } from "./foundations/token/getBottomSpacing/index.js";
@@ -16,7 +15,7 @@ import { getFontWeight } from "./foundations/token/getFontWeight/index.js";
16
15
  import { getSpacing } from "./foundations/token/getSpacing/index.js";
17
16
  import { a as fontWeightRegular } from "./FontWeight-DEBGHbtO.js";
18
17
  import { a as textBodySm, t as textBodyMd } from "./TextBodySize-BcZR9mh2.js";
19
- import { a as filterProps } from "./filterProps-BJ5SpbnA.js";
18
+ import { a as filterProps } from "./filterProps-CxkibNnG.js";
20
19
  import { t as textHeadingXs, b as textHeadingSm, a as textHeadingMd, c as textHeadingLg, d as textHeadingXl } from "./HeadingSize-CfCRn3Lh.js";
21
20
  const mapSizeToTag = {
22
21
  h1: textHeadingXl,
@@ -226,7 +225,7 @@ const TextList = ({
226
225
  const getContent = (items2, children2) => {
227
226
  if (items2) {
228
227
  return items2.map(function(item) {
229
- return /* @__PURE__ */ jsx(TextListItem, { bottomSpacing: itemSpacing || item.bottomSpacing, children: "string" === typeof item.children ? /* @__PURE__ */ jsx(RichText, { html: item.children }) : renderInlineRichTextFromOpenText(item.children) }, item.uid);
228
+ return /* @__PURE__ */ jsx(TextListItem, { bottomSpacing: itemSpacing || item.bottomSpacing, children: "string" === typeof item.children ? /* @__PURE__ */ jsx(RichText, { html: item.children }) : item.children }, item.uid);
230
229
  });
231
230
  } else if (children2) {
232
231
  return children2;
@@ -0,0 +1,113 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { createContext } from "react";
3
+ import styled from "styled-components";
4
+ import { getBackgroundColor } from "./foundations/token/getBackgroundColor/index.js";
5
+ import { getBorderColor } from "./foundations/token/getBorderColor/index.js";
6
+ import { getBorderWidth } from "./foundations/token/getBorderWidth/index.js";
7
+ import { getSpacing } from "./foundations/token/getSpacing/index.js";
8
+ import { getTextColor } from "./foundations/token/getTextColor/index.js";
9
+ import { j as colorBorderSubtle } from "./BorderColor-BummoQ1-.js";
10
+ import { f as borderWidthDivider } from "./BorderWidth-BjXpOdM5.js";
11
+ import { e as spacingXl, s as spacingMd, c as spacingNone, h as spacing5Xl } from "./Spacing-8v6hcO2x.js";
12
+ import { a as colorTextNeutral } from "./TextColor-BXVMXUVE.js";
13
+ import { a as filterProps } from "./filterProps-CxkibNnG.js";
14
+ import { f as colorBackgroundBrand, e as colorBackgroundBrandGradient, a as colorBackgroundSubtle, c as colorBackgroundNeutral } from "./BackgroundColor-e0N9tdDR.js";
15
+ const ContainerAppearanceColor = {
16
+ primary: colorBackgroundNeutral,
17
+ secondary: colorBackgroundSubtle,
18
+ tertiary: colorBackgroundBrandGradient,
19
+ alternative: colorBackgroundBrand
20
+ };
21
+ const ContainerBackgroundStyled = styled.div.withConfig({
22
+ shouldForwardProp: filterProps(),
23
+ displayName: "ContainerBackgroundStyled",
24
+ componentId: "sc-a9r652-0"
25
+ })({
26
+ color: getTextColor(colorTextNeutral)
27
+ }, ({
28
+ padding = spacingXl
29
+ }) => ({
30
+ paddingTop: getSpacing(padding),
31
+ paddingBottom: getSpacing(padding)
32
+ }), ({
33
+ appearance = "primary"
34
+ }) => {
35
+ return {
36
+ background: getBackgroundColor(ContainerAppearanceColor[appearance])
37
+ };
38
+ }, ({
39
+ border = false
40
+ }) => {
41
+ if (!border) {
42
+ return {};
43
+ }
44
+ return {
45
+ borderBottom: `${getBorderWidth(borderWidthDivider)} solid ${getBorderColor(colorBorderSubtle)}`
46
+ };
47
+ });
48
+ const maxWidthBreakpoint = 1280;
49
+ const containerMaxWidth = 1240;
50
+ const maxWidthViewport = (stylesInViewport) => {
51
+ return {
52
+ [`@media screen and (min-width: ${maxWidthBreakpoint}px)`]: {
53
+ ...stylesInViewport
54
+ }
55
+ };
56
+ };
57
+ const ContainerCenterStyled = styled.div.withConfig({
58
+ displayName: "ContainerCenterStyled",
59
+ componentId: "sc-a9r652-1"
60
+ })({
61
+ marginLeft: getSpacing(spacingMd),
62
+ marginRight: getSpacing(spacingMd)
63
+ }, maxWidthViewport({
64
+ maxWidth: `${containerMaxWidth}px`,
65
+ marginLeft: "auto",
66
+ marginRight: "auto"
67
+ }));
68
+ const containerAppearances = ["primary", "secondary", "tertiary", "alternative"];
69
+ const containerPaddings = [spacingNone, spacingXl, spacing5Xl];
70
+ const validateContainerProps = (props) => {
71
+ if (!props || typeof props !== "object") {
72
+ return false;
73
+ }
74
+ const containerProps = props;
75
+ if (!containerProps.component || containerProps.component !== "Container") {
76
+ return false;
77
+ }
78
+ if (containerProps.appearance !== void 0 && !containerAppearances.includes(containerProps.appearance)) {
79
+ return false;
80
+ }
81
+ if (containerProps.border !== void 0 && typeof containerProps.border !== "boolean") {
82
+ return false;
83
+ }
84
+ if (containerProps.padding !== void 0 && !containerPaddings.includes(containerProps.padding)) {
85
+ return false;
86
+ }
87
+ if (containerProps.children === void 0) {
88
+ return false;
89
+ }
90
+ return true;
91
+ };
92
+ const isContainerProps = (props) => {
93
+ return validateContainerProps(props);
94
+ };
95
+ const ContainerContext = createContext(false);
96
+ const Container = ({
97
+ className,
98
+ children,
99
+ appearance = "primary",
100
+ tag = "div",
101
+ ...props
102
+ }) => /* @__PURE__ */ jsx(ContainerContext, { value: true, children: /* @__PURE__ */ jsx(ContainerBackgroundStyled, { className: `${className ? className : ""} ${["tertiary", "alternative"].indexOf(appearance) > -1 ? "Dark" : props.theme}`, appearance, as: tag, ...props, children: /* @__PURE__ */ jsx(ContainerCenterStyled, { children }) }) });
103
+ export {
104
+ Container as C,
105
+ ContainerContext as a,
106
+ ContainerAppearanceColor as b,
107
+ containerAppearances as c,
108
+ containerPaddings as d,
109
+ containerMaxWidth as e,
110
+ isContainerProps as i,
111
+ maxWidthBreakpoint as m,
112
+ validateContainerProps as v
113
+ };
@@ -1,11 +1,10 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { a as ButtonIconStyled, l as leftPosition, r as rightPosition } from "./styled-7vJ7mrAA.js";
2
+ import { a as ButtonIconStyled, l as leftPosition, r as rightPosition } from "./styled-BKH3egch.js";
3
3
  import { i as iconSizeSm } from "./IconSize-AJp7xdJi.js";
4
- import { r as renderInlineRichTextFromOpenText } from "./renderInlineRichTextFromOpenText-RvOG3QbI.js";
5
4
  import styled from "styled-components";
6
5
  import { getBottomSpacing } from "./foundations/token/getBottomSpacing/index.js";
7
6
  import { c as spacingNone, a as spacingXs, s as spacingMd } from "./Spacing-8v6hcO2x.js";
8
- import { a as filterProps } from "./filterProps-BJ5SpbnA.js";
7
+ import { a as filterProps } from "./filterProps-CxkibNnG.js";
9
8
  import forcedColors from "./foundations/media-query/forcedColors/index.js";
10
9
  import { getBodySize } from "./foundations/token/getBodySize/index.js";
11
10
  import { getBorderColor } from "./foundations/token/getBorderColor/index.js";
@@ -115,7 +114,7 @@ const isLinkAsButtonProps = (props) => {
115
114
  return validateLinkAsButtonProps(props);
116
115
  };
117
116
  const LinkAsButton = (props) => /* @__PURE__ */ jsxs(LinkAsButtonStyled, { ...props, children: [
118
- renderInlineRichTextFromOpenText(props.children),
117
+ props.children,
119
118
  getLinkIcon(props.icon, props.iconPosition)
120
119
  ] });
121
120
  export {
@@ -1,9 +1,8 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { a as FootnoteLinkStyled, F as FootnoteLink } from "./index-BJHhIBYl.js";
2
+ import { a as FootnoteLinkStyled, F as FootnoteLink } from "./index-BsykXBqC.js";
3
3
  import { n as iconSizeXs, i as iconSizeSm } from "./IconSize-AJp7xdJi.js";
4
4
  import { s as smallSize, m as mediumSize } from "./SizeTypes-Ck_RdzIf.js";
5
5
  import { f as spacing2Xs, b as spacingSm, s as spacingMd, a as spacingXs } from "./Spacing-8v6hcO2x.js";
6
- import { r as renderInlineRichTextFromOpenText } from "./renderInlineRichTextFromOpenText-RvOG3QbI.js";
7
6
  import styled from "styled-components";
8
7
  import { I as IconLoader, b as iconNames } from "./index--RjkzZm0.js";
9
8
  import forcedColors from "./foundations/media-query/forcedColors/index.js";
@@ -13,11 +12,11 @@ import { getBottomSpacing } from "./foundations/token/getBottomSpacing/index.js"
13
12
  import { getFontWeight } from "./foundations/token/getFontWeight/index.js";
14
13
  import { getObjectColor } from "./foundations/token/getObjectColor/index.js";
15
14
  import { getSpacing } from "./foundations/token/getSpacing/index.js";
16
- import { c as borderRadiusFull } from "./BorderRadius-ClUShVLu.js";
15
+ import { a as borderRadiusFull } from "./BorderRadius-2LdggXbQ.js";
17
16
  import { f as fontWeightBold } from "./FontWeight-DEBGHbtO.js";
18
17
  import { a as textBodySm, t as textBodyMd } from "./TextBodySize-BcZR9mh2.js";
19
18
  import { g as getForegroundColor } from "./colorUtils-oJmiUVBK.js";
20
- import { a as filterProps } from "./filterProps-BJ5SpbnA.js";
19
+ import { a as filterProps } from "./filterProps-CxkibNnG.js";
21
20
  import { h as colorObjectSuccess, c as colorObjectNeutral, j as colorObjectAccent, a as colorObjectBrand } from "./ObjectColor-DxgEnOBM.js";
22
21
  import { h as hasMatchingComponentName } from "./isObject-BYBrvoVW.js";
23
22
  const primaryBadgeAppearance = "primary";
@@ -130,7 +129,7 @@ const Badge = ({
130
129
  ...props
131
130
  }) => /* @__PURE__ */ jsxs(BadgeStyled, { ...props, footnoteLink, bottomSpacing, children: [
132
131
  icon ? /* @__PURE__ */ jsx(BadgeIconStyled, { name: icon, size: props.size === smallSize ? iconSizeXs : iconSizeSm }) : null,
133
- renderInlineRichTextFromOpenText(children),
132
+ children,
134
133
  footnoteLink && /* @__PURE__ */ jsx(FootnoteLink, { ...footnoteLink })
135
134
  ] });
136
135
  export {
package/dist/index.d.ts CHANGED
@@ -38,8 +38,6 @@ export * from './components/RichtTextContentful';
38
38
  export { default as RichtTextContentful } from './components/RichtTextContentful';
39
39
  export * from './components/RichText';
40
40
  export { default as RichText } from './components/RichText';
41
- export * from './components/ResponsiveImage';
42
- export { default as ResponsiveImage } from './components/ResponsiveImage';
43
41
  export * from './components/Rating';
44
42
  export { default as Rating } from './components/Rating';
45
43
  export * from './components/RadioGroup';
@@ -176,6 +174,8 @@ export * from './components/Body';
176
174
  export { default as Body } from './components/Body';
177
175
  export * from './components/Badge';
178
176
  export { default as Badge } from './components/Badge';
177
+ export * from './components/ArtDirectedImage';
178
+ export { default as ArtDirectedImage } from './components/ArtDirectedImage';
179
179
  export * from './components/AccordionGroup';
180
180
  export { default as AccordionGroup } from './components/AccordionGroup';
181
181
  export * from './components/Accordion';
@@ -204,8 +204,10 @@ export * from './foundations/GlobalStyle';
204
204
  export * from './hooks/useViewport';
205
205
  export * from './hooks/useThirdPartyConsent';
206
206
  export * from './hooks/useReducedMotion';
207
+ export * from './hooks/usePictureComponent';
207
208
  export * from './hooks/useMediaQuery';
208
209
  export * from './hooks/useLinkComponent';
210
+ export * from './hooks/useImageComponent';
209
211
  export * from './hooks/useForcedColors';
210
212
  export * from './hooks/useFocusWithin';
211
213
  export * from './contentful/renderer';