@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.
- 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/BottomBar/props.d.ts +1 -1
- package/dist/components/Button/index.js +4 -5
- package/dist/components/ButtonAsLink/index.js +2 -3
- package/dist/components/ButtonGroup/index.js +6 -6
- package/dist/components/ButtonGroup/props.d.ts +2 -2
- package/dist/components/ButtonGroup/validate.d.ts +2 -2
- package/dist/components/Calendar/index.js +305 -72
- 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 +19 -5
- package/dist/components/Collapsible/props.d.ts +5 -0
- package/dist/components/Collapsible/styled.d.ts +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 +5 -2
- package/dist/components/Flex/props.d.ts +11 -3
- package/dist/components/Flex/stories/alignCenterArgs.d.ts +2 -0
- package/dist/components/Flex/stories/alignEndArgs.d.ts +2 -0
- package/dist/components/Flex/stories/alignStartArgs.d.ts +2 -0
- package/dist/components/Flex/styled.d.ts +3 -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-ClAH0TNC.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 +213 -212
- package/dist/{mapContentToComponents-C_O2rRrX.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-BxkvYuWW.js → styled-CUp4EbPh.js} +23 -2
- 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
|
@@ -3,8 +3,8 @@ const borderRadiusSm = "borderRadiusSm";
|
|
|
3
3
|
const borderRadiusMd = "borderRadiusMd";
|
|
4
4
|
const borderRadiusFull = "borderRadiusFull";
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
borderRadiusFull as a,
|
|
7
7
|
borderRadiusMd as b,
|
|
8
|
-
|
|
8
|
+
borderRadiusNone as c,
|
|
9
9
|
borderRadiusSm as d
|
|
10
10
|
};
|
|
@@ -21,7 +21,7 @@ import { g as borderWidthNone, b as borderWidthUnselected, a as borderWidthFocus
|
|
|
21
21
|
import { a as fontWeightRegular, f as fontWeightBold } from "../../FontWeight-DEBGHbtO.js";
|
|
22
22
|
import { s as spacingMd, c as spacingNone, a as spacingXs } from "../../Spacing-8v6hcO2x.js";
|
|
23
23
|
import { a as colorTextNeutral, g as colorTextBrand } from "../../TextColor-BXVMXUVE.js";
|
|
24
|
-
import { a as filterProps } from "../../filterProps-
|
|
24
|
+
import { a as filterProps } from "../../filterProps-CxkibNnG.js";
|
|
25
25
|
import { i as isObject, h as hasMatchingComponentName } from "../../isObject-BYBrvoVW.js";
|
|
26
26
|
import { i as isBottomSpacing } from "../../isBottomSpacing-BxfreCZU.js";
|
|
27
27
|
const accordionToggleExpanded = "expanded";
|
|
@@ -5,7 +5,7 @@ import { s as spacingMd, c as spacingNone } from "../../Spacing-8v6hcO2x.js";
|
|
|
5
5
|
import { useState } from "react";
|
|
6
6
|
import styled from "styled-components";
|
|
7
7
|
import { getBottomSpacing } from "../../foundations/token/getBottomSpacing/index.js";
|
|
8
|
-
import { a as filterProps } from "../../filterProps-
|
|
8
|
+
import { a as filterProps } from "../../filterProps-CxkibNnG.js";
|
|
9
9
|
import { i as isObject, h as hasMatchingComponentName } from "../../isObject-BYBrvoVW.js";
|
|
10
10
|
import { i as isBottomSpacing } from "../../isBottomSpacing-BxfreCZU.js";
|
|
11
11
|
const AccordionGroupSingleExpand = ({
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useContext } from "react";
|
|
4
|
+
import { a as ContainerContext } from "../../index-DbG0QL9D.js";
|
|
5
|
+
import { d as GridContext, b as GridItemContext } from "../../index-Bu-7sSif.js";
|
|
6
|
+
import { b as breakpoint_medium, a as breakpoint_large, c as breakpoint_medium_number } from "../../breakpoint-CzBSbbY7.js";
|
|
7
|
+
import { usePictureComponent, filterAspectRatioFromSources, filterImagePropsToPictureComponentImageProps } from "../../hooks/usePictureComponent/index.js";
|
|
8
|
+
import { g as getSizesFromGridConfig } from "../../getSizesFromGridConfig-DKOLupyb.js";
|
|
9
|
+
import styled from "styled-components";
|
|
10
|
+
import viewport from "../../foundations/media-query/viewport/index.js";
|
|
11
|
+
import { a as filterProps } from "../../filterProps-CxkibNnG.js";
|
|
12
|
+
const ArtDirectedImageContainerStyled = styled.div.withConfig({
|
|
13
|
+
shouldForwardProp: filterProps(),
|
|
14
|
+
displayName: "ArtDirectedImageContainerStyled",
|
|
15
|
+
componentId: "sc-1iidohy-0"
|
|
16
|
+
})({
|
|
17
|
+
position: "relative",
|
|
18
|
+
"& picture > img": {
|
|
19
|
+
position: "absolute",
|
|
20
|
+
top: 0,
|
|
21
|
+
left: 0,
|
|
22
|
+
height: "100%",
|
|
23
|
+
objectFit: "cover",
|
|
24
|
+
width: "100%"
|
|
25
|
+
}
|
|
26
|
+
}, ({
|
|
27
|
+
sources
|
|
28
|
+
}) => {
|
|
29
|
+
var _a, _b, _c;
|
|
30
|
+
return {
|
|
31
|
+
aspectRatio: (_a = sources.sm) == null ? void 0 : _a.aspectRatio,
|
|
32
|
+
...viewport.md({
|
|
33
|
+
aspectRatio: (_b = sources.md) == null ? void 0 : _b.aspectRatio
|
|
34
|
+
}),
|
|
35
|
+
...viewport.lg({
|
|
36
|
+
aspectRatio: (_c = sources.lg) == null ? void 0 : _c.aspectRatio
|
|
37
|
+
})
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
const ArtDirectedImage = ({
|
|
41
|
+
...props
|
|
42
|
+
}) => {
|
|
43
|
+
const PictureComponent = usePictureComponent();
|
|
44
|
+
const gridContext = useContext(GridContext);
|
|
45
|
+
const gridItemContext = useContext(GridItemContext);
|
|
46
|
+
const containerContext = useContext(ContainerContext);
|
|
47
|
+
const calculatedSizes = (gridContext == null ? void 0 : gridContext.nestedGridConfig) ? getSizesFromGridConfig(gridContext.nestedGridConfig, containerContext) : gridItemContext.nestedGridConfig ? getSizesFromGridConfig(gridItemContext.nestedGridConfig, containerContext) : getSizesFromGridConfig({
|
|
48
|
+
sm: 12
|
|
49
|
+
}, containerContext);
|
|
50
|
+
const mediaMap = {
|
|
51
|
+
lg: `(min-width: ${breakpoint_large})`,
|
|
52
|
+
md: `(min-width: ${breakpoint_medium})`,
|
|
53
|
+
sm: `(max-width: ${breakpoint_medium_number - 1}px)`
|
|
54
|
+
};
|
|
55
|
+
const order = ["lg", "md", "sm"];
|
|
56
|
+
console.log(props.sources);
|
|
57
|
+
const sources = Object.entries(props.sources).sort(([a], [b]) => order.indexOf(a) - order.indexOf(b)).map(([viewport2, source]) => ({
|
|
58
|
+
...filterAspectRatioFromSources(source),
|
|
59
|
+
media: mediaMap[viewport2],
|
|
60
|
+
sizes: source.sizes || calculatedSizes
|
|
61
|
+
}));
|
|
62
|
+
const image = {
|
|
63
|
+
...filterImagePropsToPictureComponentImageProps(props.image),
|
|
64
|
+
// fallback value is needed because alt is optional in ImageProps but required in PictureComponentProps
|
|
65
|
+
alt: props.image.alt || ""
|
|
66
|
+
};
|
|
67
|
+
const pictureComponentProps = {
|
|
68
|
+
sources,
|
|
69
|
+
image
|
|
70
|
+
};
|
|
71
|
+
return /* @__PURE__ */ jsx(ArtDirectedImageContainerStyled, { ...props, children: /* @__PURE__ */ jsx(PictureComponent, { ...pictureComponentProps }) });
|
|
72
|
+
};
|
|
73
|
+
export {
|
|
74
|
+
ArtDirectedImage as default
|
|
75
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { HTMLAttributes, JSX } from 'react';
|
|
2
|
+
import { AspectRatio, ImageProps } from '../Image';
|
|
3
|
+
import { PatternProps } from '../../foundations/PatternProps';
|
|
4
|
+
import { ViewportName } from '../../foundations/types/Viewport';
|
|
5
|
+
export type ArtDirectedImageSourceType = JSX.IntrinsicElements['source'] & {
|
|
6
|
+
srcSet: string;
|
|
7
|
+
aspectRatio: AspectRatio;
|
|
8
|
+
};
|
|
9
|
+
export type ArtDirectedImageSourcesType = {
|
|
10
|
+
[key in ViewportName]?: ArtDirectedImageSourceType;
|
|
11
|
+
};
|
|
12
|
+
export interface ArtDirectedImageProps extends PatternProps, HTMLAttributes<HTMLPictureElement> {
|
|
13
|
+
/**
|
|
14
|
+
* Pin component's name from string to the concrete name
|
|
15
|
+
*/
|
|
16
|
+
component?: 'ArtDirectedImage';
|
|
17
|
+
sources: ArtDirectedImageSourcesType;
|
|
18
|
+
image: ImageProps & {
|
|
19
|
+
/**
|
|
20
|
+
* aspectRatio is mandatory for image because it is mandatory for the sources that can't take width & height
|
|
21
|
+
*/
|
|
22
|
+
aspectRatio: AspectRatio;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { ArtDirectedImageProps } from './props';
|
|
2
|
+
export declare const ArtDirectedImageContainerStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ArtDirectedImageProps>> & string;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
|
-
import "../../index-
|
|
3
|
+
import "../../index-BsykXBqC.js";
|
|
4
4
|
import "../../IconSize-AJp7xdJi.js";
|
|
5
5
|
import "../../SizeTypes-Ck_RdzIf.js";
|
|
6
6
|
import "../../Spacing-8v6hcO2x.js";
|
|
7
|
-
import "../../
|
|
8
|
-
import { b, c, d, B, i, p, s, a, t, v } from "../../index-j22agtAk.js";
|
|
7
|
+
import { b, c, d, B, i, p, s, a, t, v } from "../../index-DwGcrvTh.js";
|
|
9
8
|
export {
|
|
10
9
|
b as BadgeAppearanceColor,
|
|
11
10
|
c as badgeAppearances,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
-
import { F as FootnoteLink } from "../../index-
|
|
3
|
+
import { F as FootnoteLink } from "../../index-BsykXBqC.js";
|
|
4
4
|
import { b as spacingSm, s as spacingMd } from "../../Spacing-8v6hcO2x.js";
|
|
5
5
|
import { t as textBodyMd, a as textBodySm } from "../../TextBodySize-BcZR9mh2.js";
|
|
6
|
-
import { r as renderInlineRichTextFromOpenText } from "../../renderInlineRichTextFromOpenText-RvOG3QbI.js";
|
|
7
6
|
import styled from "styled-components";
|
|
8
7
|
import { getBodySize } from "../../foundations/token/getBodySize/index.js";
|
|
9
8
|
import { getBottomSpacing } from "../../foundations/token/getBottomSpacing/index.js";
|
|
@@ -11,8 +10,8 @@ import { getFontWeight } from "../../foundations/token/getFontWeight/index.js";
|
|
|
11
10
|
import { getTextColor } from "../../foundations/token/getTextColor/index.js";
|
|
12
11
|
import { f as fontWeightBold, b as fontWeightLight, a as fontWeightRegular } from "../../FontWeight-DEBGHbtO.js";
|
|
13
12
|
import { a as colorTextNeutral } from "../../TextColor-BXVMXUVE.js";
|
|
14
|
-
import { a as filterProps } from "../../filterProps-
|
|
15
|
-
import {
|
|
13
|
+
import { a as filterProps } from "../../filterProps-CxkibNnG.js";
|
|
14
|
+
import { p as pTagName, d as divTagName, c as spanTagName, f as strongTagName, g as supTagName } from "../../tags-Cwgg3Gx2.js";
|
|
16
15
|
const BodyStyled = styled.p.withConfig({
|
|
17
16
|
shouldForwardProp: filterProps(),
|
|
18
17
|
displayName: "BodyStyled",
|
|
@@ -103,7 +102,7 @@ const Body = ({
|
|
|
103
102
|
bottomSpacing = textBodySm === props.size ? spacingSm : spacingMd;
|
|
104
103
|
}
|
|
105
104
|
return /* @__PURE__ */ jsxs(BodyStyled, { ...props, bottomSpacing, as: tag, tag, children: [
|
|
106
|
-
|
|
105
|
+
props.children,
|
|
107
106
|
footnoteLink && /* @__PURE__ */ jsx(FootnoteLink, { ...footnoteLink })
|
|
108
107
|
] });
|
|
109
108
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useRef, useState, useEffect } from "react";
|
|
4
|
-
import Container from "
|
|
4
|
+
import { C as Container } from "../../index-DbG0QL9D.js";
|
|
5
5
|
import { s as spacingMd, c as spacingNone } from "../../Spacing-8v6hcO2x.js";
|
|
6
6
|
import styled from "styled-components";
|
|
7
|
-
import { a as CardStyled } from "../../styled-
|
|
7
|
+
import { a as CardStyled } from "../../styled-rsUoUFyl.js";
|
|
8
8
|
import { getBorderRadius } from "../../foundations/token/getBorderRadius/index.js";
|
|
9
9
|
import { getSpacing } from "../../foundations/token/getSpacing/index.js";
|
|
10
|
-
import {
|
|
11
|
-
import { a as filterProps } from "../../filterProps-
|
|
10
|
+
import { c as borderRadiusNone } from "../../BorderRadius-2LdggXbQ.js";
|
|
11
|
+
import { a as filterProps } from "../../filterProps-CxkibNnG.js";
|
|
12
12
|
const bottomBarExtraPadding = 100;
|
|
13
13
|
const BottomBarStyled = styled(CardStyled).withConfig({
|
|
14
14
|
shouldForwardProp: filterProps(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { Theme } from 'storybook/
|
|
2
|
+
import { Theme } from 'storybook/theming';
|
|
3
3
|
import { PatternProps } from '../../foundations/PatternProps';
|
|
4
4
|
export interface BottomBarProps extends Omit<PatternProps, 'bottomSpacing'>, HTMLAttributes<HTMLDivElement> {
|
|
5
5
|
/**
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { B as ButtonAsLink, g as getButtonIcon } from "../../validate-
|
|
4
|
-
import { c, a, b, d, f, e } from "../../validate-
|
|
5
|
-
import {
|
|
6
|
-
import { B as ButtonStyled } from "../../styled-7vJ7mrAA.js";
|
|
3
|
+
import { B as ButtonAsLink, g as getButtonIcon } from "../../validate-CLBUbscx.js";
|
|
4
|
+
import { c, a, b, d, f, e } from "../../validate-CLBUbscx.js";
|
|
5
|
+
import { B as ButtonStyled } from "../../styled-BKH3egch.js";
|
|
7
6
|
const isButtonAsLinkProp = (props) => {
|
|
8
7
|
return props.href !== void 0;
|
|
9
8
|
};
|
|
@@ -12,7 +11,7 @@ const Button = (props) => {
|
|
|
12
11
|
return /* @__PURE__ */ jsx(ButtonAsLink, { ...props });
|
|
13
12
|
}
|
|
14
13
|
return /* @__PURE__ */ jsxs(ButtonStyled, { ...props, children: [
|
|
15
|
-
|
|
14
|
+
props.children,
|
|
16
15
|
getButtonIcon(props.icon, props.iconPosition)
|
|
17
16
|
] });
|
|
18
17
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
|
-
import { B, i, v } from "../../validate-
|
|
3
|
+
import { B, i, v } from "../../validate-CLBUbscx.js";
|
|
4
4
|
import "../../hooks/useLinkComponent/index.js";
|
|
5
|
-
import "../../filterProps-
|
|
6
|
-
import "../../renderInlineRichTextFromOpenText-RvOG3QbI.js";
|
|
5
|
+
import "../../filterProps-CxkibNnG.js";
|
|
7
6
|
import "../../sanitizeLinkProps-D2Kkovy1.js";
|
|
8
7
|
export {
|
|
9
8
|
B as default,
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import Button from "../Button/index.js";
|
|
4
4
|
import Flex from "../Flex/index.js";
|
|
5
|
-
import { b as flexJustifyStart, c as flexJustifyEnd, d as flexJustifyCenter, e as flexJustifyBetween, f as flexOrientationHorizontal, a as flexOrientationVertical } from "../../styled-
|
|
5
|
+
import { b as flexJustifyStart, c as flexJustifyEnd, d as flexJustifyCenter, e as flexJustifyBetween, f as flexOrientationHorizontal, a as flexOrientationVertical } from "../../styled-CUp4EbPh.js";
|
|
6
6
|
import FlexItem from "../FlexItem/index.js";
|
|
7
7
|
import { b as spacingSm, s as spacingMd } from "../../Spacing-8v6hcO2x.js";
|
|
8
|
-
import { useViewport } from "../../
|
|
9
|
-
import { e as validateButtonProps, v as validateButtonAsLinkProps } from "../../validate-
|
|
8
|
+
import { u as useViewport } from "../../index-DKCzYjXw.js";
|
|
9
|
+
import { e as validateButtonProps, v as validateButtonAsLinkProps } from "../../validate-CLBUbscx.js";
|
|
10
10
|
import { i as isObject, h as hasMatchingComponentName } from "../../isObject-BYBrvoVW.js";
|
|
11
11
|
import { i as isBottomSpacing } from "../../isBottomSpacing-BxfreCZU.js";
|
|
12
|
-
const
|
|
12
|
+
const flexJustifyBehaviours = [flexJustifyStart, flexJustifyEnd, flexJustifyCenter, flexJustifyBetween];
|
|
13
13
|
const flexOrientations = [flexOrientationHorizontal, flexOrientationVertical];
|
|
14
14
|
const validateButtonGroupProps = (props) => {
|
|
15
15
|
if (!isObject(props)) {
|
|
@@ -29,7 +29,7 @@ const validateButtonGroupProps = (props) => {
|
|
|
29
29
|
return false;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
if (buttonGroupProps.justifyHorizontal !== void 0 && !
|
|
32
|
+
if (buttonGroupProps.justifyHorizontal !== void 0 && !flexJustifyBehaviours.includes(buttonGroupProps.justifyHorizontal)) {
|
|
33
33
|
return false;
|
|
34
34
|
}
|
|
35
35
|
if (buttonGroupProps.orientation !== void 0 && !flexOrientations.includes(buttonGroupProps.orientation)) {
|
|
@@ -71,7 +71,7 @@ const ButtonGroup = ({
|
|
|
71
71
|
};
|
|
72
72
|
export {
|
|
73
73
|
ButtonGroup as default,
|
|
74
|
-
|
|
74
|
+
flexJustifyBehaviours,
|
|
75
75
|
flexOrientations,
|
|
76
76
|
isButtonGroupProps,
|
|
77
77
|
validateButtonGroupProps
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { ButtonProps } from '../Button/props';
|
|
3
3
|
import { ButtonAsLinkProps } from '../ButtonAsLink/props';
|
|
4
|
-
import {
|
|
4
|
+
import { FlexJustifyBehaviour, FlexOrientation } from '../Flex/props';
|
|
5
5
|
import { PatternProps } from '../../foundations/PatternProps';
|
|
6
6
|
export interface ButtonGroupProps extends PatternProps, HTMLAttributes<HTMLDivElement> {
|
|
7
7
|
/**
|
|
@@ -13,7 +13,7 @@ export interface ButtonGroupProps extends PatternProps, HTMLAttributes<HTMLDivEl
|
|
|
13
13
|
* passed to flex as justify if viewport is tablet or larger
|
|
14
14
|
* mobile is always rendered with justify-start
|
|
15
15
|
*/
|
|
16
|
-
justifyHorizontal?:
|
|
16
|
+
justifyHorizontal?: FlexJustifyBehaviour;
|
|
17
17
|
/**
|
|
18
18
|
* Accepts Buttons and ButtonsAsLinks as children to render in the group
|
|
19
19
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FlexJustifyBehaviour, FlexOrientation } from '../Flex/props';
|
|
2
2
|
import { ButtonGroupProps } from './props';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const flexJustifyBehaviours: FlexJustifyBehaviour[];
|
|
4
4
|
export declare const flexOrientations: FlexOrientation[];
|
|
5
5
|
export declare const validateButtonGroupProps: (props: unknown) => props is ButtonGroupProps;
|
|
6
6
|
export declare const isButtonGroupProps: (props: unknown) => props is ButtonGroupProps;
|