@vodafone_de/brix-components 7.0.7 → 7.0.8-renderer-7f7c8f4cc4dca34d63016c96d7cffbd763fed2dd
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/{BackgroundColor-e0N9tdDR.js → BackgroundColor-DSOSZvNi.js} +2 -2
- package/dist/{BorderColor-BummoQ1-.js → BorderColor-CYdSW9dg.js} +5 -5
- package/dist/{BorderWidth-DfOlyKK7.js → BorderWidth-CTOda7Cp.js} +5 -5
- package/dist/{FontWeight-DEBGHbtO.js → FontWeight-C2pGs7aR.js} +2 -2
- package/dist/{HeadingSize-CfCRn3Lh.js → HeadingSize-BoyxJlpz.js} +2 -2
- package/dist/NotificationErrorIcon-DMnAJgPN.js +83 -0
- package/dist/{ObjectColor-BZDBuV8H.js → ObjectColor-DSUXMO7l.js} +6 -6
- package/dist/Spacing-BzNNxYMI.js +25 -0
- package/dist/{TextColor-DsntmDNw.js → TextColor-BXVMXUVE.js} +2 -2
- package/dist/{colorUtils-BSfFfgbi.js → colorUtils-t7G6Q5ev.js} +1 -1
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/Accordion/index.js +52 -9
- package/dist/components/Accordion/props.d.ts +1 -1
- package/dist/components/Accordion/styled.d.ts +1 -1
- package/dist/components/Accordion/validate.d.ts +3 -0
- package/dist/components/Accordion/validate.test.d.ts +1 -0
- package/dist/components/AccordionGroup/index.d.ts +1 -0
- package/dist/components/AccordionGroup/index.js +41 -4
- package/dist/components/AccordionGroup/validate.d.ts +3 -0
- package/dist/components/AccordionGroup/validate.test.d.ts +1 -0
- package/dist/components/Badge/index.d.ts +1 -0
- package/dist/components/Badge/index.js +15 -5
- package/dist/components/Badge/props.d.ts +13 -9
- package/dist/components/Badge/validate.d.ts +5 -0
- package/dist/components/Badge/validate.test.d.ts +1 -0
- package/dist/components/Body/index.d.ts +1 -0
- package/dist/components/Body/index.js +44 -5
- package/dist/components/Body/props.d.ts +3 -3
- package/dist/components/Body/validate.d.ts +8 -0
- package/dist/components/Body/validate.test.d.ts +1 -0
- package/dist/components/BottomBar/index.js +3 -3
- package/dist/components/Button/ButtonAppearanceHelper.d.ts +1 -1
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/Button/index.js +10 -7
- package/dist/components/Button/props.d.ts +0 -5
- package/dist/components/Button/styled.d.ts +1 -1
- package/dist/components/Button/validate.d.ts +6 -0
- package/dist/components/Button/validate.test.d.ts +1 -0
- package/dist/components/ButtonAsLink/index.d.ts +1 -0
- package/dist/components/ButtonAsLink/index.js +6 -2
- package/dist/components/ButtonAsLink/validate.d.ts +4 -0
- package/dist/components/ButtonAsLink/validate.test.d.ts +1 -0
- package/dist/components/ButtonGroup/index.d.ts +1 -0
- package/dist/components/ButtonGroup/index.js +49 -5
- package/dist/components/ButtonGroup/validate.d.ts +6 -0
- package/dist/components/ButtonGroup/validate.test.d.ts +1 -0
- package/dist/components/Card/index.d.ts +1 -0
- package/dist/components/Card/index.js +35 -4
- package/dist/components/Card/props.d.ts +3 -3
- package/dist/components/Card/validate.d.ts +5 -0
- package/dist/components/Card/validate.test.d.ts +1 -0
- package/dist/components/Carousel/components/CarouselNavigation.d.ts +0 -2
- package/dist/components/Carousel/index.js +8 -8
- package/dist/components/Checkbox/index.js +7 -5
- package/dist/components/CheckboxGroup/index.js +3 -3
- package/dist/components/Collapsible/index.js +4 -4
- package/dist/components/ColorSwatch/index.d.ts +1 -0
- package/dist/components/ColorSwatch/index.js +31 -6
- package/dist/components/ColorSwatch/validate.d.ts +4 -0
- package/dist/components/ColorSwatch/validate.test.d.ts +1 -0
- package/dist/components/ColorSwatchGroup/index.d.ts +1 -0
- package/dist/components/ColorSwatchGroup/index.js +35 -6
- package/dist/components/ColorSwatchGroup/props.d.ts +1 -1
- package/dist/components/ColorSwatchGroup/validate.d.ts +4 -0
- package/dist/components/ColorSwatchGroup/validate.test.d.ts +1 -0
- package/dist/components/ConsentMessage/index.d.ts +1 -0
- package/dist/components/ConsentMessage/index.js +6 -5
- package/dist/components/Container/index.d.ts +1 -0
- package/dist/components/Container/index.js +36 -65
- package/dist/components/Container/props.d.ts +14 -3
- package/dist/components/Container/validate.d.ts +5 -0
- package/dist/components/Container/validate.test.d.ts +1 -0
- package/dist/components/DateInput/index.js +5 -3
- package/dist/components/DateInput/styled.d.ts +1 -2
- package/dist/components/DemoBox/index.js +3 -3
- package/dist/components/Dialog/index.js +7 -7
- package/dist/components/DiscoveryCard/components/DiscoveryCardLinkedImage.d.ts +1 -1
- package/dist/components/DiscoveryCard/index.d.ts +1 -0
- package/dist/components/DiscoveryCard/index.js +72 -15
- package/dist/components/DiscoveryCard/props.d.ts +3 -3
- package/dist/components/DiscoveryCard/styled.d.ts +1 -1
- package/dist/components/DiscoveryCard/validate.d.ts +3 -0
- package/dist/components/DiscoveryCard/validate.test.d.ts +1 -0
- package/dist/components/DiscoveryCardGroup/index.d.ts +1 -0
- package/dist/components/DiscoveryCardGroup/index.js +52 -37
- package/dist/components/DiscoveryCardGroup/validate.d.ts +3 -0
- package/dist/components/DiscoveryCardGroup/validate.test.d.ts +1 -0
- package/dist/components/Divider/index.d.ts +1 -0
- package/dist/components/Divider/index.js +17 -25
- package/dist/components/Divider/validate.d.ts +3 -0
- package/dist/components/Divider/validate.test.d.ts +1 -0
- package/dist/components/Fieldset/index.js +3 -3
- package/dist/components/FilterGroup/index.js +11 -9
- package/dist/components/FilterGroup/props.d.ts +1 -1
- package/dist/components/FilterGroup/styled.d.ts +1 -1
- package/dist/components/Flex/index.js +2 -2
- package/dist/components/Flex/props.d.ts +1 -1
- package/dist/components/FlexItem/index.js +2 -2
- package/dist/components/FootnoteContent/index.js +3 -3
- 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/FormHelperLabel/index.js +1 -1
- package/dist/components/FormHelperMessage/index.js +2 -2
- package/dist/components/FormHelperStatusIcon/index.d.ts +1 -1
- package/dist/components/FormHelperStatusIcon/index.js +3 -1
- package/dist/components/FormHelperStatusIcon/styled.d.ts +1 -1
- package/dist/components/GoogleMap/components/Map/props.d.ts +1 -1
- package/dist/components/GoogleMap/index.js +5 -5
- package/dist/components/Grid/index.d.ts +1 -0
- package/dist/components/Grid/index.js +39 -4
- package/dist/components/Grid/props.d.ts +5 -5
- package/dist/components/Grid/validate.d.ts +6 -0
- package/dist/components/Grid/validate.test.d.ts +1 -0
- package/dist/components/GridItem/index.d.ts +1 -0
- package/dist/components/GridItem/index.js +32 -3
- package/dist/components/GridItem/props.d.ts +2 -2
- package/dist/components/GridItem/validate.d.ts +5 -0
- package/dist/components/GridItem/validate.test.d.ts +1 -0
- package/dist/components/Heading/index.d.ts +1 -0
- package/dist/components/Heading/index.js +50 -13
- package/dist/components/Heading/props.d.ts +5 -11
- package/dist/components/Heading/styled.d.ts +2 -2
- package/dist/components/Heading/validate.d.ts +9 -0
- package/dist/components/Heading/validate.test.d.ts +1 -0
- package/dist/components/HifiIcon/index.js +2 -2
- package/dist/components/HifiIcon/props.d.ts +2 -1
- package/dist/components/Icon/index.d.ts +2 -2
- package/dist/components/Icon/index.js +1 -3
- package/dist/components/Icon/props.d.ts +1 -4
- package/dist/components/IconButton/index.js +7 -5
- package/dist/components/IconButton/props.d.ts +1 -1
- package/dist/components/IconLoader/index.d.ts +10 -0
- package/dist/components/IconLoader/index.js +9 -0
- package/dist/components/IconLoader/props.d.ts +23 -0
- package/dist/components/IconLoader/validate.d.ts +4 -0
- package/dist/components/IconLoader/validate.test.d.ts +1 -0
- package/dist/components/IconSnippet/index.js +7 -5
- package/dist/components/IconSnippet/props.d.ts +1 -1
- package/dist/components/IconSnippet/styled.d.ts +1 -1
- package/dist/components/IconSnippetList/index.js +2 -2
- package/dist/components/Image/index.d.ts +1 -0
- package/dist/components/Image/index.js +47 -3
- package/dist/components/Image/validate.d.ts +8 -0
- package/dist/components/Image/validate.test.d.ts +1 -0
- package/dist/components/ImageHeader/index.js +8 -8
- package/dist/components/ImageHeader/props.d.ts +3 -3
- package/dist/components/InlineIcon/index.d.ts +6 -0
- package/dist/components/InlineIcon/index.js +36 -0
- package/dist/components/InlineIcon/props.d.ts +42 -0
- package/dist/components/InlineIcon/styled.d.ts +4 -0
- package/dist/components/InlineIcon/validate.d.ts +4 -0
- package/dist/components/InlineLink/index.d.ts +1 -0
- package/dist/components/InlineLink/index.js +28 -6
- package/dist/components/InlineLink/validate.d.ts +3 -0
- package/dist/components/InlineLink/validate.test.d.ts +1 -0
- package/dist/components/Input/index.js +2 -2
- package/dist/components/Label/index.js +1 -1
- package/dist/components/Legend/index.js +1 -1
- package/dist/components/Link/index.d.ts +1 -0
- package/dist/components/Link/index.js +35 -2
- package/dist/components/Link/validate.d.ts +3 -0
- package/dist/components/Link/validate.test.d.ts +1 -0
- package/dist/components/LinkAsButton/index.d.ts +1 -0
- package/dist/components/LinkAsButton/index.js +4 -2
- package/dist/components/LinkAsButton/validate.d.ts +3 -0
- package/dist/components/LinkAsButton/validate.test.d.ts +1 -0
- package/dist/components/LinkList/index.js +4 -4
- package/dist/components/LinkListItem/index.js +16 -14
- package/dist/components/LinkListItem/props.d.ts +2 -2
- package/dist/components/LinkListItem/styled.d.ts +2 -2
- package/dist/components/LoadingSpinner/index.js +12 -5
- package/dist/components/LoadingSpinner/styled.d.ts +1 -1
- package/dist/components/MediaText/index.js +7 -7
- package/dist/components/MediaText/props.d.ts +1 -1
- package/dist/components/Notification/index.js +10 -8
- package/dist/components/Notification/notificationStatusVariants.d.ts +1 -1
- package/dist/components/Overlay/index.js +2 -2
- package/dist/components/PickerGroup/components/Picker/props.d.ts +6 -4
- package/dist/components/PickerGroup/components/PickerElementIcon/index.d.ts +1 -1
- package/dist/components/PickerGroup/components/PickerElementIcon/styled.d.ts +1 -1
- package/dist/components/PickerGroup/index.js +12 -10
- package/dist/components/Price/index.d.ts +1 -0
- package/dist/components/Price/index.js +8 -5
- package/dist/components/Price/props.d.ts +2 -9
- package/dist/components/Price/styled.d.ts +1 -1
- package/dist/components/Price/validate.d.ts +6 -0
- package/dist/components/Price/validate.test.d.ts +1 -0
- package/dist/components/ProductCard/index.js +9 -8
- package/dist/components/ProductCard/styled.d.ts +1 -1
- package/dist/components/RadioGroup/index.js +5 -5
- package/dist/components/Rating/index.js +5 -5
- package/dist/components/ResponsiveImage/index.js +2 -2
- package/dist/components/ResponsiveImage/props.d.ts +1 -1
- package/dist/components/RichText/index.js +1 -1
- package/dist/components/RichText/parseHtml.d.ts +1 -1
- package/dist/components/RichText/props.d.ts +1 -1
- package/dist/components/ScreenreaderOnly/index.js +1 -1
- package/dist/components/SearchInput/index.d.ts +2 -1
- package/dist/components/SearchInput/index.js +27 -26
- package/dist/components/SearchInput/props.d.ts +2 -1
- package/dist/components/SearchInput/styled.d.ts +2 -5
- package/dist/components/SelectInput/index.js +8 -6
- package/dist/components/Stepper/index.js +5 -5
- package/dist/components/SuggestInput/index.js +10 -8
- package/dist/components/SuggestInput/props.d.ts +1 -1
- package/dist/components/SuggestInput/styled.d.ts +2 -2
- package/dist/components/Switch/index.js +10 -8
- package/dist/components/TabularPrice/index.js +2 -2
- package/dist/components/TabularPrice/props.d.ts +1 -1
- package/dist/components/TextList/index.js +3 -3
- package/dist/components/TextList/props.d.ts +3 -3
- package/dist/components/Textarea/index.js +6 -6
- package/dist/components/TimeInput/index.js +7 -5
- package/dist/components/TimeInput/styled.d.ts +1 -4
- package/dist/components/Tray/index.js +6 -6
- package/dist/components/Tray/props.d.ts +1 -1
- package/dist/components/YoutubeVideo/index.js +2 -2
- package/dist/components/YoutubeVideo/props.d.ts +1 -1
- package/dist/contentful/LegibleContent.d.ts +20 -0
- package/dist/contentful/componentInspectorField.d.ts +5 -0
- package/dist/contentful/componentNameToComponent.d.ts +6 -0
- package/dist/contentful/index.d.ts +1 -0
- package/dist/contentful/index.js +25 -0
- package/dist/contentful/live-preview-inspector/index.d.ts +2 -0
- package/dist/contentful/live-preview-inspector/index.js +65 -0
- package/dist/contentful/live-preview-inspector/props.d.ts +1 -0
- package/dist/contentful/live-preview-renderer/index.d.ts +5 -0
- package/dist/contentful/live-preview-renderer/index.js +7 -0
- package/dist/contentful/live-preview-renderer/props.d.ts +3 -0
- package/dist/contentful/map/MapFunction.d.ts +4 -0
- package/dist/contentful/map/badge.d.ts +4 -0
- package/dist/contentful/map/body.d.ts +4 -0
- package/dist/contentful/map/button.d.ts +5 -0
- package/dist/contentful/map/card.d.ts +5 -0
- package/dist/contentful/map/container.d.ts +7 -0
- package/dist/contentful/map/discovery-card-group.d.ts +5 -0
- package/dist/contentful/map/discovery-card.d.ts +5 -0
- package/dist/contentful/map/divider.d.ts +4 -0
- package/dist/contentful/map/heading.d.ts +5 -0
- package/dist/contentful/map/icon-loader.d.ts +5 -0
- package/dist/contentful/map/image.d.ts +4 -0
- package/dist/contentful/map/link.d.ts +5 -0
- package/dist/contentful/map/mapContentToComponents.d.ts +20 -0
- package/dist/contentful/map/price.d.ts +4 -0
- package/dist/contentful/map/richtext.d.ts +8 -0
- package/dist/contentful/renderer/index.d.ts +5 -0
- package/dist/contentful/renderer/index.js +17 -0
- package/dist/contentful/renderer/props.d.ts +7 -0
- package/dist/contentful/transform/transformBottomSpacing.d.ts +2 -0
- package/dist/contentful/transform/transformIconSize.d.ts +2 -0
- package/dist/{easing-Dm-pO8SY.js → easing-CDd2rVn6.js} +2 -2
- package/dist/filterProps-C73Li8Na.js +13 -0
- package/dist/foundations/GlobalStyle/index.js +1 -1
- package/dist/foundations/PatternProps/index.d.ts +1 -1
- package/dist/foundations/cssVars.d.ts +2 -2
- package/dist/foundations/tags.d.ts +2 -0
- package/dist/foundations/token/getBackgroundColor/index.d.ts +1 -1
- package/dist/foundations/token/getBodySize/index.d.ts +1 -1
- package/dist/foundations/token/getBorderColor/index.d.ts +1 -1
- package/dist/foundations/token/getBorderRadius/index.d.ts +1 -1
- package/dist/foundations/token/getBorderWidth/index.d.ts +1 -1
- package/dist/foundations/token/getFontWeight/index.d.ts +1 -1
- package/dist/foundations/token/getHeadingSize/index.d.ts +1 -1
- package/dist/foundations/token/getHoverColor/index.d.ts +2 -2
- package/dist/foundations/token/getIconColor/index.d.ts +1 -1
- package/dist/foundations/token/getObjectColor/index.d.ts +1 -1
- package/dist/foundations/token/getOpacity/index.d.ts +1 -1
- package/dist/foundations/token/getPressColor/index.d.ts +2 -2
- package/dist/foundations/token/getSpacing/index.d.ts +1 -1
- package/dist/foundations/token/getTextColor/index.d.ts +1 -1
- package/dist/foundations/token/getTextDecoration/index.d.ts +1 -1
- package/dist/foundations/types/PositionedIconInterface.d.ts +1 -1
- package/dist/foundations/{token/types → types}/Spacing.d.ts +1 -0
- package/dist/foundations/types/SystemIconWithPosition.d.ts +1 -1
- package/dist/hooks/useViewport/index.d.ts +1 -1
- package/dist/icons/index.d.ts +0 -1
- package/dist/icons/index.js +1 -603
- package/dist/{index-DQhtQZ85.js → index-BI5Xlys3.js} +1 -1
- package/dist/{index-CKvLGUdD.js → index-BUCDNHMw.js} +49 -8
- package/dist/index-CN-gxxgB.js +99 -0
- package/dist/{index-WLBo71sp.js → index-CiBLxGmR.js} +55 -29
- package/dist/index-DEYEyjbU.js +20136 -0
- package/dist/index-Dv7RoWED.js +600 -0
- package/dist/{index-DrySIh-D.js → index-E8AZ8kiW.js} +38 -8
- package/dist/{index-D2J2U7wz.js → index-nyF1sqYr.js} +5 -5
- package/dist/index.d.ts +8 -0
- package/dist/index.js +217 -114
- package/dist/isBottomSpacing-DSLyqm7h.js +10 -0
- package/dist/isObject-BYBrvoVW.js +19 -0
- package/dist/props-7dcsjRUx.js +28 -0
- package/dist/{styled-CYugcGtx.js → styled-8Td4Oj0t.js} +4 -4
- package/dist/{styled-03irSJOQ.js → styled-9UD_-g7q.js} +6 -6
- package/dist/{styled-ODPFCF1a.js → styled-AUfIpwZf.js} +4 -4
- package/dist/styled-COXTMhJ1.js +27 -0
- package/dist/styled-DSAEfZJQ.js +69 -0
- package/dist/{styled-B0YKfXTz.js → styled-DTFUPagl.js} +2 -2
- package/dist/{styled-DLS1p_AJ.js → styled-D_wUvoV0.js} +13 -9
- package/dist/{styled-ZpQohvyx.js → styled-DrQft35m.js} +2 -2
- package/dist/{styled-DMUiOi24.js → styled-DtJ7ZhhG.js} +4 -4
- package/dist/{index-57IF0yrd.js → styled-DwtGn2if.js} +5 -20
- package/dist/styled-HZzB_zPP.js +53 -0
- package/dist/styled-Lkb8cDS-.js +42 -0
- package/dist/{styled-Cqp2oSjW.js → styled-oOq50bDL.js} +4 -4
- package/dist/{tags-Bz98Tkqt.js → tags-CixnzWW0.js} +15 -8
- package/package.json +5 -1
- package/dist/Spacing-D0HQH9YJ.js +0 -16
- package/dist/filterProps-Cewck8OH.js +0 -13
- package/dist/index-Cbojl4_Q.js +0 -7134
- /package/dist/foundations/{token/types → types}/BackgroundColor.d.ts +0 -0
- /package/dist/foundations/{token/types → types}/BorderColor.d.ts +0 -0
- /package/dist/foundations/{token/types → types}/BorderRadius.d.ts +0 -0
- /package/dist/foundations/{token/types → types}/BorderWidth.d.ts +0 -0
- /package/dist/foundations/{token/types → types}/FontWeight.d.ts +0 -0
- /package/dist/foundations/{token/types → types}/HeadingSize.d.ts +0 -0
- /package/dist/foundations/{token/types → types}/IconColor.d.ts +0 -0
- /package/dist/foundations/{token/types → types}/ObjectColor.d.ts +0 -0
- /package/dist/foundations/{token/types → types}/Opacity.d.ts +0 -0
- /package/dist/foundations/{token/types → types}/TextBodySize.d.ts +0 -0
- /package/dist/foundations/{token/types → types}/TextColor.d.ts +0 -0
- /package/dist/foundations/{token/types → types}/TextDecoration.d.ts +0 -0
- /package/dist/foundations/{token/types → types}/Viewport.d.ts +0 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { b as iconSizeSm } from "./props-7dcsjRUx.js";
|
|
3
|
+
import "./styled-HZzB_zPP.js";
|
|
4
|
+
import { l as leftPosition, c as ButtonIconStyled, p as primaryAppearance, s as secondaryAppearance, t as tertiaryAppearance, r as rightPosition } from "./styled-D_wUvoV0.js";
|
|
5
|
+
import { r as renderInlineRichTextFromOpenText } from "./renderInlineRichTextFromOpenText-RvOG3QbI.js";
|
|
6
|
+
import { B as ButtonAsLinkStyled } from "./styled-DwtGn2if.js";
|
|
7
|
+
import { i as isObject, h as hasMatchingComponentName } from "./isObject-BYBrvoVW.js";
|
|
8
|
+
import { i as isBottomSpacing } from "./isBottomSpacing-DSLyqm7h.js";
|
|
9
|
+
import { d as iconNames } from "./index-DEYEyjbU.js";
|
|
10
|
+
const getButtonIcon = (icon) => {
|
|
11
|
+
if (!icon || !icon.name) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
const position = icon.position || leftPosition;
|
|
15
|
+
return /* @__PURE__ */ jsx(ButtonIconStyled, { iconPosition: position, size: iconSizeSm, name: icon.name });
|
|
16
|
+
};
|
|
17
|
+
const buttonFullWidth = "full";
|
|
18
|
+
const buttonAutoWidth = "auto";
|
|
19
|
+
const buttonAppearances = [primaryAppearance, secondaryAppearance, tertiaryAppearance];
|
|
20
|
+
const buttonWidthBehaviors$1 = [buttonFullWidth, buttonAutoWidth];
|
|
21
|
+
const validateButtonProps = (props) => {
|
|
22
|
+
if (!isObject(props)) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
const buttonProps = props;
|
|
26
|
+
if (!hasMatchingComponentName(buttonProps.component, "Button")) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
if (buttonProps.appearance !== void 0 && !buttonAppearances.includes(buttonProps.appearance)) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
if (buttonProps.width !== void 0 && !buttonWidthBehaviors$1.includes(buttonProps.width)) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
if (buttonProps.icon !== void 0) {
|
|
36
|
+
if (buttonProps.icon.name === void 0 || !iconNames.includes(buttonProps.icon.name)) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
if (buttonProps.icon.position === void 0 || ![leftPosition, rightPosition].includes(buttonProps.icon.position)) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (buttonProps.disabled !== void 0 && "boolean" !== typeof buttonProps.disabled) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
if (buttonProps.bottomSpacing && !isBottomSpacing(buttonProps.bottomSpacing)) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
return true;
|
|
50
|
+
};
|
|
51
|
+
const isButtonProps = (props) => {
|
|
52
|
+
return validateButtonProps(props);
|
|
53
|
+
};
|
|
54
|
+
const buttonWidthBehaviors = [buttonFullWidth, buttonAutoWidth];
|
|
55
|
+
const validateButtonAsLinkProps = (props) => {
|
|
56
|
+
if (!isObject(props)) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
const buttonAsLinkProps = props;
|
|
60
|
+
if (!hasMatchingComponentName(buttonAsLinkProps.component, "ButtonAsLink")) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
if (!buttonAsLinkProps.href || typeof buttonAsLinkProps.href !== "string") {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
if (buttonAsLinkProps.appearance !== void 0 && !buttonAppearances.includes(buttonAsLinkProps.appearance)) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
if (buttonAsLinkProps.width !== void 0 && !buttonWidthBehaviors.includes(buttonAsLinkProps.width)) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
if (buttonAsLinkProps.icon !== void 0 && typeof buttonAsLinkProps.icon !== "object") {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
if (buttonAsLinkProps.bottomSpacing && !isBottomSpacing(buttonAsLinkProps.bottomSpacing)) {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
return true;
|
|
79
|
+
};
|
|
80
|
+
const isButtonAsLinkProps = (props) => {
|
|
81
|
+
return validateButtonAsLinkProps(props);
|
|
82
|
+
};
|
|
83
|
+
const ButtonAsLink = (props) => /* @__PURE__ */ jsxs(ButtonAsLinkStyled, { ...props, children: [
|
|
84
|
+
renderInlineRichTextFromOpenText(props.children),
|
|
85
|
+
getButtonIcon(props == null ? void 0 : props.icon)
|
|
86
|
+
] });
|
|
87
|
+
export {
|
|
88
|
+
ButtonAsLink as B,
|
|
89
|
+
buttonAutoWidth as a,
|
|
90
|
+
buttonFullWidth as b,
|
|
91
|
+
buttonAppearances as c,
|
|
92
|
+
validateButtonProps as d,
|
|
93
|
+
isButtonProps as e,
|
|
94
|
+
buttonWidthBehaviors$1 as f,
|
|
95
|
+
getButtonIcon as g,
|
|
96
|
+
buttonWidthBehaviors as h,
|
|
97
|
+
isButtonAsLinkProps as i,
|
|
98
|
+
validateButtonAsLinkProps as v
|
|
99
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { S as ScreenreaderOnly } from "./index-
|
|
3
|
-
import { r as renderInlineRichTextFromOpenText } from "./renderInlineRichTextFromOpenText-RvOG3QbI.js";
|
|
2
|
+
import { S as ScreenreaderOnly } from "./index-BI5Xlys3.js";
|
|
4
3
|
import styled from "styled-components";
|
|
5
4
|
import { getBottomSpacing } from "./foundations/token/getBottomSpacing/index.js";
|
|
6
5
|
import { getFontWeight } from "./foundations/token/getFontWeight/index.js";
|
|
@@ -8,10 +7,13 @@ import { getHeadingSize } from "./foundations/token/getHeadingSize/index.js";
|
|
|
8
7
|
import { getSpacing } from "./foundations/token/getSpacing/index.js";
|
|
9
8
|
import { getTextColor } from "./foundations/token/getTextColor/index.js";
|
|
10
9
|
import { getTextDecoration } from "./foundations/token/getTextDecoration/index.js";
|
|
11
|
-
import {
|
|
12
|
-
import { s as spacingMd, b as spacingNone, a as spacingXs } from "./Spacing-
|
|
13
|
-
import {
|
|
14
|
-
import { f as filterProps } from "./filterProps-
|
|
10
|
+
import { a as fontWeightBold, f as fontWeightRegular } from "./FontWeight-C2pGs7aR.js";
|
|
11
|
+
import { s as spacingMd, b as spacingNone, a as spacingXs } from "./Spacing-BzNNxYMI.js";
|
|
12
|
+
import { f as colorTextCritical, a as colorTextNeutral } from "./TextColor-BXVMXUVE.js";
|
|
13
|
+
import { f as filterProps } from "./filterProps-C73Li8Na.js";
|
|
14
|
+
import { r as renderInlineRichTextFromOpenText } from "./renderInlineRichTextFromOpenText-RvOG3QbI.js";
|
|
15
|
+
import { i as isObject, h as hasMatchingComponentName } from "./isObject-BYBrvoVW.js";
|
|
16
|
+
import { i as isBottomSpacing } from "./isBottomSpacing-DSLyqm7h.js";
|
|
15
17
|
const priceOrientationHorizontal = "horizontal";
|
|
16
18
|
const priceOrientationVertical = "vertical";
|
|
17
19
|
const priceSizeSm = "sm";
|
|
@@ -19,25 +21,6 @@ const priceSizeMd = "md";
|
|
|
19
21
|
const priceSizeLg = "lg";
|
|
20
22
|
const priceAlignLeft = "left";
|
|
21
23
|
const priceAlignCenter = "center";
|
|
22
|
-
const priceDefaultProps = {
|
|
23
|
-
bottomSpacing: spacingMd,
|
|
24
|
-
orientation: priceOrientationVertical,
|
|
25
|
-
align: priceAlignLeft
|
|
26
|
-
};
|
|
27
|
-
const internalizePriceProps = (props) => {
|
|
28
|
-
const {
|
|
29
|
-
orientation,
|
|
30
|
-
align,
|
|
31
|
-
bottomSpacing,
|
|
32
|
-
...rest
|
|
33
|
-
} = props;
|
|
34
|
-
return {
|
|
35
|
-
...rest,
|
|
36
|
-
align,
|
|
37
|
-
bottomSpacing,
|
|
38
|
-
$orientation: orientation
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
24
|
const textDecorationStrikethrough = "Strikethrough";
|
|
42
25
|
const PriceOuterWrapperStyled = styled.div.withConfig({
|
|
43
26
|
displayName: "PriceOuterWrapperStyled",
|
|
@@ -107,6 +90,46 @@ const PriceSuffixStyled = styled.div.withConfig({
|
|
|
107
90
|
})(getHeadingSize("xs"), {
|
|
108
91
|
color: getTextColor(colorTextNeutral)
|
|
109
92
|
});
|
|
93
|
+
const priceSizes = [priceSizeSm, priceSizeMd, priceSizeLg];
|
|
94
|
+
const priceOrientations = [priceOrientationHorizontal, priceOrientationVertical];
|
|
95
|
+
const priceAligns = [priceAlignLeft, priceAlignCenter];
|
|
96
|
+
const validatePriceProps = (props) => {
|
|
97
|
+
if (!isObject(props)) {
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
const p = props;
|
|
101
|
+
if (!hasMatchingComponentName(p.component, "Price")) {
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
if (p.orientation !== void 0 && !priceOrientations.includes(p.orientation)) {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
if (typeof p.suffix !== "string" || !p.suffix) {
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
if (typeof p.prefix !== "string" && p.prefix) {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
if (p.align !== void 0 && !priceAligns.includes(p.align)) {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
if (!p.size || !priceSizes.includes(p.size)) {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
if (typeof p.price !== "string" && p.price) {
|
|
120
|
+
return false;
|
|
121
|
+
}
|
|
122
|
+
if (typeof p.offerProductName !== "string" && p.offerProductName) {
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
if (p.bottomSpacing !== void 0 && !isBottomSpacing(p.bottomSpacing)) {
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
return true;
|
|
129
|
+
};
|
|
130
|
+
const isPriceProps = (props) => {
|
|
131
|
+
return validatePriceProps(props);
|
|
132
|
+
};
|
|
110
133
|
const isTabularPriceProp = (props) => {
|
|
111
134
|
return props.component === "TabularPrice";
|
|
112
135
|
};
|
|
@@ -134,7 +157,7 @@ const Price = (props) => {
|
|
|
134
157
|
}, children: [
|
|
135
158
|
offerProductName && /* @__PURE__ */ jsx("meta", { itemProp: "name", content: offerProductName }),
|
|
136
159
|
/* @__PURE__ */ jsx(ScreenreaderOnly, { children: createScreenReaderText(props.price, props.strikePrice, props.suffix) }),
|
|
137
|
-
/* @__PURE__ */ jsxs(PriceInnerWrapperStyled, { ...priceProps, orientation, align, ...{
|
|
160
|
+
/* @__PURE__ */ jsxs(PriceInnerWrapperStyled, { ...priceProps, price, orientation, align, ...{
|
|
138
161
|
"aria-hidden": true
|
|
139
162
|
}, itemProp: offerProductName ? "offers" : void 0, itemType: offerProductName ? "https://schema.org/Offer" : void 0, itemScope: offerProductName ? true : void 0, children: [
|
|
140
163
|
offerProductName && /* @__PURE__ */ jsx("meta", { itemProp: "priceCurrency", content: "EUR" }),
|
|
@@ -202,7 +225,10 @@ export {
|
|
|
202
225
|
priceSizeLg as e,
|
|
203
226
|
priceAlignLeft as f,
|
|
204
227
|
priceAlignCenter as g,
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
228
|
+
priceSizes as h,
|
|
229
|
+
priceOrientations as i,
|
|
230
|
+
priceAligns as j,
|
|
231
|
+
isPriceProps as k,
|
|
232
|
+
priceOrientationHorizontal as p,
|
|
233
|
+
validatePriceProps as v
|
|
208
234
|
};
|