@vodafone_de/brix-components 9.0.5 → 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.
- package/dist/{BorderRadius-ClUShVLu.js → BorderRadius-2LdggXbQ.js} +2 -2
- package/dist/components/Accordion/index.js +1 -1
- package/dist/components/AccordionGroup/index.js +1 -1
- package/dist/components/ArtDirectedImage/index.d.ts +5 -0
- package/dist/components/ArtDirectedImage/index.js +75 -0
- package/dist/components/ArtDirectedImage/props.d.ts +24 -0
- package/dist/components/ArtDirectedImage/styled.d.ts +2 -0
- package/dist/components/ArtDirectedImage/validate.d.ts +3 -0
- package/dist/components/Badge/index.js +2 -3
- package/dist/components/Body/index.js +4 -5
- package/dist/components/BottomBar/index.js +4 -4
- package/dist/components/Button/index.js +4 -5
- package/dist/components/ButtonAsLink/index.js +2 -3
- package/dist/components/ButtonGroup/index.js +3 -3
- package/dist/components/Calendar/index.js +2 -2
- package/dist/components/Card/index.js +3 -3
- package/dist/components/Carousel/index.js +6 -7
- package/dist/components/Checkbox/index.js +2 -2
- package/dist/components/CheckboxGroup/index.js +2 -2
- package/dist/components/Collapsible/index.js +1 -1
- package/dist/components/ColorSwatch/index.js +1 -1
- package/dist/components/ColorSwatchGroup/index.js +2 -2
- package/dist/components/ConsentMessage/index.js +2 -2
- package/dist/components/Container/index.d.ts +1 -0
- package/dist/components/Container/index.js +10 -105
- package/dist/components/Container/styled.d.ts +2 -0
- package/dist/components/DateInput/index.js +1 -1
- package/dist/components/DemoBox/index.js +1 -1
- package/dist/components/Dialog/index.js +1 -1
- package/dist/components/DiscoveryCard/index.js +14 -11
- package/dist/components/DiscoveryCard/styled.d.ts +1 -1
- package/dist/components/DiscoveryCardGroup/index.js +12 -10
- package/dist/components/Divider/index.js +1 -1
- package/dist/components/EnergySnippet/index.js +2 -2
- package/dist/components/Fieldset/index.js +1 -1
- package/dist/components/FilterGroup/index.js +3 -3
- package/dist/components/Flex/index.js +2 -2
- package/dist/components/FlexItem/index.js +1 -1
- package/dist/components/FootnoteContent/index.js +1 -1
- package/dist/components/FootnoteLink/index.js +2 -2
- package/dist/components/Form/index.js +2 -2
- package/dist/components/FormElement/index.js +1 -1
- package/dist/components/GoogleMap/index.js +2 -2
- package/dist/components/Grid/index.d.ts +3 -1
- package/dist/components/Grid/index.js +16 -91
- package/dist/components/GridItem/index.d.ts +7 -0
- package/dist/components/GridItem/index.js +11 -54
- package/dist/components/Heading/index.js +4 -5
- package/dist/components/HifiIcon/index.js +1 -1
- package/dist/components/IconButton/index.js +3 -3
- package/dist/components/IconSnippet/index.js +3 -3
- package/dist/components/IconSnippetList/index.js +2 -3
- package/dist/components/Image/index.js +111 -52
- package/dist/components/Image/props.d.ts +21 -35
- package/dist/components/Image/styled.d.ts +1 -1
- package/dist/components/Image/validate.d.ts +1 -4
- package/dist/components/ImageHeader/index.js +18 -25
- package/dist/components/ImageHeader/props.d.ts +2 -2
- package/dist/components/ImageHeader/styled.d.ts +1 -1
- package/dist/components/InfoBanner/index.js +1 -1
- package/dist/components/InlineIcon/index.js +1 -1
- package/dist/components/InlineLink/index.js +1 -1
- package/dist/components/Input/index.js +2 -3
- package/dist/components/Label/index.js +2 -3
- package/dist/components/Legend/index.js +1 -1
- package/dist/components/Link/index.js +4 -5
- package/dist/components/LinkAsButton/index.js +1 -2
- package/dist/components/LinkList/index.js +2 -3
- package/dist/components/LinkListItem/index.js +5 -5
- package/dist/components/LoadingSpinner/index.js +2 -2
- package/dist/components/LocalStyle/index.js +2 -2
- package/dist/components/MediaText/index.js +5 -6
- package/dist/components/Notification/index.js +3 -3
- package/dist/components/OpenTextFootnoteAdapter/index.js +3 -3
- package/dist/components/Overlay/index.js +1 -1
- package/dist/components/PickerGroup/index.js +8 -11
- package/dist/components/Price/index.d.ts +1 -1
- package/dist/components/Price/index.js +2 -3
- package/dist/components/ProductCard/index.js +29 -22
- package/dist/components/ProductCard/props.d.ts +11 -14
- package/dist/components/ProductCard/styled.d.ts +1 -0
- package/dist/components/QuickLinkList/index.js +3 -5
- package/dist/components/RadioGroup/index.js +2 -2
- package/dist/components/Rating/index.js +2 -2
- package/dist/components/RichText/index.js +1 -1
- package/dist/components/RichtTextContentful/index.js +2 -2
- package/dist/components/ScreenreaderOnly/index.js +1 -1
- package/dist/components/SearchInput/index.js +4 -5
- package/dist/components/SelectInput/index.js +3 -4
- package/dist/components/Stepper/index.js +3 -4
- package/dist/components/SuggestInput/index.js +4 -5
- package/dist/components/Switch/index.js +2 -2
- package/dist/components/TabGroup/index.js +2 -2
- package/dist/components/TabularPrice/index.js +2 -3
- package/dist/components/TextList/index.js +2 -3
- package/dist/components/Textarea/index.js +3 -4
- package/dist/components/TimeInput/index.js +1 -1
- package/dist/components/Tray/index.js +1 -1
- package/dist/components/UtilityLink/index.js +20 -2
- package/dist/components/UtilityLink/styled.d.ts +1 -0
- package/dist/components/YoutubeVideo/index.js +2 -2
- package/dist/contentful/components.d.ts +1 -1
- package/dist/contentful/live-preview-inspector/index.js +1 -1
- package/dist/contentful/live-preview-renderer/index.js +1 -1
- package/dist/contentful/map/artDirectedImage.d.ts +4 -0
- package/dist/contentful/renderer/index.js +1 -1
- package/dist/{cssVars-ZsZIfkeD.js → cssVars-TmhA1NpG.js} +1 -1
- package/dist/filterProps-CxkibNnG.js +18 -0
- package/dist/foundations/GlobalStyle/index.js +1 -1
- package/dist/getSizesFromGridConfig-DKOLupyb.js +48 -0
- package/dist/hooks/useImageComponent/index.d.ts +37 -0
- package/dist/hooks/useImageComponent/index.js +23 -0
- package/dist/hooks/usePictureComponent/index.d.ts +49 -0
- package/dist/hooks/usePictureComponent/index.js +38 -0
- package/dist/hooks/useViewport/index.js +5 -20
- package/dist/{index-C0tryPFA.js → index-72IFVw5W.js} +14 -12
- package/dist/{index-BJHhIBYl.js → index-BsykXBqC.js} +1 -1
- package/dist/index-Bu-7sSif.js +201 -0
- package/dist/{index-DCE5HNIR.js → index-C2E3JrhF.js} +1 -1
- package/dist/{index-TL0X3rXH.js → index-DCXRnuHz.js} +7 -8
- package/dist/index-DKCzYjXw.js +25 -0
- package/dist/{index-C4eCcl02.js → index-DP6Nlg-a.js} +4 -5
- package/dist/index-DbG0QL9D.js +113 -0
- package/dist/{index-CEotMXpL.js → index-Dd-A7i9Y.js} +3 -4
- package/dist/{index-j22agtAk.js → index-DwGcrvTh.js} +4 -5
- package/dist/index.d.ts +4 -2
- package/dist/index.js +210 -212
- package/dist/{mapContentToComponents-CL3WF8Js.js → mapContentToComponents-DcPjYAXH.js} +155 -140
- package/dist/{styled-Dw5c-xwf.js → styled-BIcsESkS.js} +1 -1
- package/dist/{styled-7vJ7mrAA.js → styled-BKH3egch.js} +2 -2
- package/dist/{styled-KWWOgO_h.js → styled-CUp4EbPh.js} +1 -1
- package/dist/{styled-BBXC0aka.js → styled-D-fzMZNS.js} +1 -1
- package/dist/{styled-0KSRG-Fv.js → styled-DdeOXNN9.js} +26 -4
- package/dist/{styled-xKyZg4q9.js → styled-DmMk0W0J.js} +2 -2
- package/dist/{styled-Dq0NuP5r.js → styled-rsUoUFyl.js} +2 -2
- package/dist/{tags-D7CRQqc1.js → tags-Cwgg3Gx2.js} +7 -7
- package/dist/{validate-Dlzxlfzp.js → validate-CLBUbscx.js} +4 -6
- package/package.json +1 -1
- package/dist/Viewport-C35jx6QE.js +0 -8
- package/dist/components/ResponsiveImage/index.d.ts +0 -6
- package/dist/components/ResponsiveImage/index.js +0 -124
- package/dist/components/ResponsiveImage/props.d.ts +0 -16
- package/dist/components/ResponsiveImage/styled.d.ts +0 -4
- package/dist/components/ResponsiveImage/validate.d.ts +0 -3
- package/dist/components/ResponsiveImage/validate.test.d.ts +0 -1
- package/dist/contentful/map/responsiveImage.d.ts +0 -4
- package/dist/filterProps-BJ5SpbnA.js +0 -17
- package/dist/renderInlineRichTextFromOpenText-RvOG3QbI.js +0 -13
- package/dist/styled-BiCOjvNq.js +0 -29
- package/dist/validate-DYmFz2FF.js +0 -85
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { S as ScreenreaderOnly } from "./index-
|
|
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-
|
|
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:
|
|
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:
|
|
167
|
-
/* @__PURE__ */ jsx(PriceSuffixStyled, { children:
|
|
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:
|
|
214
|
-
/* @__PURE__ */ jsx(PriceStyled, { size: props.size, itemProp: offerProductName ? "price" : void 0, content: offerProductName ? props.price : void 0, children:
|
|
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-
|
|
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-
|
|
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-
|
|
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 }) :
|
|
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-
|
|
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-
|
|
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
|
-
|
|
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-
|
|
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 {
|
|
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-
|
|
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
|
-
|
|
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';
|