@vodafone_de/brix-components 3.0.1 → 3.0.3
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-JObp_2xA.js +14 -0
- package/dist/BorderColor-BummoQ1-.js +24 -0
- package/dist/BorderRadius-ClUShVLu.js +10 -0
- package/dist/BorderWidth-DfOlyKK7.js +16 -0
- package/dist/CornerStyle-JEbGNArR.js +6 -0
- package/dist/FontWeight-CR22KTex.js +8 -0
- package/dist/HeadingSize-CfCRn3Lh.js +12 -0
- package/dist/IconColor-CtC9WUgr.js +10 -0
- package/dist/ObjectColor-BZDBuV8H.js +22 -0
- package/dist/Opacity-smkGiwsf.js +6 -0
- package/dist/SizeTypes-Ck_RdzIf.js +8 -0
- package/dist/Spacing-D0HQH9YJ.js +16 -0
- package/dist/TextBodySize-BcZR9mh2.js +6 -0
- package/dist/TextColor-BXiR5Uq9.js +16 -0
- package/dist/colorUtils-uLZF5UIN.js +94 -0
- package/dist/components/Accordion/index.js +195 -0
- package/dist/components/AccordionGroup/index.js +59 -0
- package/dist/components/Badge/index.js +11 -0
- package/dist/components/Body/index.js +72 -6
- package/dist/components/BottomBar/index.js +79 -0
- package/dist/components/Button/index.js +24 -0
- package/dist/components/ButtonAsLink/index.js +7 -0
- package/dist/components/ButtonGroup/index.js +34 -0
- package/dist/components/Card/index.js +18 -0
- package/dist/components/Carousel/index.js +497 -0
- package/dist/components/Checkbox/index.js +218 -0
- package/dist/components/CheckboxGroup/index.js +58 -0
- package/dist/components/Collapsible/index.js +85 -0
- package/dist/components/ColorSwatch/index.js +87 -0
- package/dist/components/ColorSwatchGroup/index.js +43 -0
- package/dist/components/Container/index.js +76 -0
- package/dist/components/DateInput/index.js +86 -0
- package/dist/components/DemoBox/index.js +21 -0
- package/dist/components/Dialog/index.js +172 -0
- package/dist/components/DiscoveryCard/index.js +130 -0
- package/dist/components/DiscoveryCardGroup/index.js +53 -0
- package/dist/components/Divider/index.js +30 -0
- package/dist/components/Fieldset/index.js +41 -0
- package/dist/components/FilterGroup/index.js +148 -0
- package/dist/components/Flex/index.js +17 -0
- package/dist/components/FlexItem/index.js +41 -0
- package/dist/components/FootnoteContent/index.js +39 -0
- package/dist/components/FootnoteLink/index.js +46 -0
- package/dist/components/Form/index.js +20 -0
- package/dist/components/FormElement/index.js +31 -0
- package/dist/components/FormHelperLabel/index.js +21 -0
- package/dist/components/FormHelperMessage/index.js +47 -0
- package/dist/components/FormHelperStatusIcon/index.js +50 -0
- package/dist/components/GoogleMap/index.js +196 -0
- package/dist/components/Grid/index.js +39 -0
- package/dist/components/GridItem/index.js +12 -0
- package/dist/components/Heading/index.js +94 -0
- package/dist/components/HifiIcon/index.js +31 -0
- package/dist/components/Icon/index.js +38 -0
- package/dist/components/IconButton/index.js +85 -0
- package/dist/components/IconSnippet/index.js +112 -0
- package/dist/components/IconSnippet/styled.d.ts +1 -1
- package/dist/components/IconSnippetList/index.js +25 -0
- package/dist/components/Image/index.js +84 -0
- package/dist/components/ImageHeader/index.js +262 -0
- package/dist/components/ImageHeader/styled.d.ts +4 -4
- package/dist/components/InlineLink/index.js +43 -0
- package/dist/components/Input/index.js +55 -0
- package/dist/components/Label/index.js +22 -0
- package/dist/components/Legend/index.js +60 -0
- package/dist/components/Link/index.js +19 -0
- package/dist/components/LinkAsButton/index.js +7 -0
- package/dist/components/LinkList/index.js +64 -0
- package/dist/components/LinkListItem/index.js +316 -0
- package/dist/components/LoadingSpinner/index.js +70 -0
- package/dist/components/Notification/index.js +181 -0
- package/dist/components/Overlay/index.js +33 -0
- package/dist/components/PickerGroup/index.js +282 -0
- package/dist/components/Price/index.js +18 -0
- package/dist/components/ProductCard/index.js +81 -0
- package/dist/components/RadioGroup/index.js +197 -0
- package/dist/components/ResponsiveImage/index.js +89 -0
- package/dist/components/RichText/index.js +7 -0
- package/dist/components/ScreenreaderOnly/index.js +6 -0
- package/dist/components/SearchInput/index.js +140 -0
- package/dist/components/SelectInput/index.js +160 -0
- package/dist/components/Stepper/index.js +205 -0
- package/dist/components/SuggestInput/index.js +387 -0
- package/dist/components/Switch/index.js +169 -0
- package/dist/components/TabularPrice/index.js +8 -0
- package/dist/components/TextList/index.js +10 -0
- package/dist/components/Textarea/index.js +156 -0
- package/dist/components/Tray/index.js +218 -0
- package/dist/easing-Dm-pO8SY.js +6 -0
- package/dist/filterProps-Cewck8OH.js +13 -0
- package/dist/foundations/GlobalStyle/index.js +3 -292
- package/dist/foundations/PatternProps/index.js +1 -0
- package/dist/foundations/media-query/forcedColors/index.js +12 -0
- package/dist/foundations/media-query/reducedMotion/index.js +21 -0
- package/dist/foundations/media-query/viewport/index.js +6 -0
- package/dist/foundations/token/getBackgroundColor/index.js +5 -0
- package/dist/foundations/token/getBodySize/index.js +13 -2
- package/dist/foundations/token/getBorderColor/index.js +5 -0
- package/dist/foundations/token/getBorderRadius/index.js +15 -0
- package/dist/foundations/token/getBorderWidth/index.js +19 -0
- package/dist/foundations/token/getBottomSpacing/index.js +14 -0
- package/dist/foundations/token/getFontWeight/index.js +13 -0
- package/dist/foundations/token/getHeadingSize/index.js +27 -0
- package/dist/foundations/token/getHoverColor/index.js +7 -0
- package/dist/foundations/token/getIconColor/index.js +5 -0
- package/dist/foundations/token/getObjectColor/index.js +5 -0
- package/dist/foundations/token/getOpacity/index.js +11 -0
- package/dist/foundations/token/getPressColor/index.js +7 -0
- package/dist/foundations/token/getSpacing/index.js +5 -0
- package/dist/foundations/token/getTextColor/index.js +5 -0
- package/dist/foundations/token/getTextDecoration/index.js +13 -0
- package/dist/getCssVar-BP6T9pFM.js +6 -0
- package/dist/hooks/useFocusWithin/index.js +36 -0
- package/dist/hooks/useForcedColors/index.js +9 -0
- package/dist/hooks/useMediaQuery/index.js +19 -0
- package/dist/hooks/useReducedMotion/index.js +9 -0
- package/dist/hooks/useThirdPartyConsent/index.js +54 -0
- package/dist/hooks/useViewport/index.js +24 -0
- package/dist/icons/index.js +603 -0
- package/dist/index-B5AxA0A-.js +79 -0
- package/dist/index-C0N671c1.js +79 -0
- package/dist/index-Cbojl4_Q.js +7134 -0
- package/dist/index-CeJsIf3Z.js +208 -0
- package/dist/index-Ck2bCrhT.js +32 -0
- package/dist/index-D6hvbziL.js +167 -0
- package/dist/index-DQhtQZ85.js +24 -0
- package/dist/index-DUnDnTyk.js +61 -0
- package/dist/props-Czq9XX2J.js +6 -0
- package/dist/{index-BaPlSfS3.js → renderInlineRichTextFromOpenText-CA52y1-B.js} +3 -105
- package/dist/shadow-u158mzuN.js +4 -0
- package/dist/styled-BPTa90Cm.js +165 -0
- package/dist/styled-BpvuD699.js +45 -0
- package/dist/styled-CDWclYAa.js +124 -0
- package/dist/styled-CXSdomF5.js +34 -0
- package/dist/styled-CpoX5USb.js +71 -0
- package/dist/styled-DZo6MwrF.js +245 -0
- package/dist/styled-Wlt68LfQ.js +133 -0
- package/dist/styled-ZpQohvyx.js +29 -0
- package/dist/tags-DI6H1biK.js +29 -0
- package/package.json +2 -1
- package/dist/index-BoPDwZgt.js +0 -18
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { C as CardStyled } from "./styled-BpvuD699.js";
|
|
3
|
+
import { D as DemoBoxStyled } from "./styled-CXSdomF5.js";
|
|
4
|
+
import { v as viewport } from "./index-Ck2bCrhT.js";
|
|
5
|
+
import { getSpacing } from "./foundations/token/getSpacing/index.js";
|
|
6
|
+
import { s as spacingMd } from "./Spacing-D0HQH9YJ.js";
|
|
7
|
+
import { getBottomSpacing } from "./foundations/token/getBottomSpacing/index.js";
|
|
8
|
+
import { f as filterProps } from "./filterProps-Cewck8OH.js";
|
|
9
|
+
const getColumnWidth = ({
|
|
10
|
+
sm,
|
|
11
|
+
md,
|
|
12
|
+
lg,
|
|
13
|
+
spacing
|
|
14
|
+
}) => {
|
|
15
|
+
const calculateFlexBasis = (value) => {
|
|
16
|
+
const gap = getSpacing(spacing || spacingMd);
|
|
17
|
+
const columns = 12 / value;
|
|
18
|
+
return `calc(${100 / columns}% - ${gap} * (${columns} - 1) / ${columns})`;
|
|
19
|
+
};
|
|
20
|
+
let style = {};
|
|
21
|
+
if (sm) {
|
|
22
|
+
style = {
|
|
23
|
+
flexBasis: calculateFlexBasis(sm)
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
if (md) {
|
|
27
|
+
style = {
|
|
28
|
+
...style,
|
|
29
|
+
...viewport.md({
|
|
30
|
+
flexBasis: calculateFlexBasis(md)
|
|
31
|
+
})
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
if (lg) {
|
|
35
|
+
style = {
|
|
36
|
+
...style,
|
|
37
|
+
...viewport.lg({
|
|
38
|
+
flexBasis: calculateFlexBasis(lg)
|
|
39
|
+
})
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
return style;
|
|
43
|
+
};
|
|
44
|
+
const getOffset = ({
|
|
45
|
+
sm,
|
|
46
|
+
md,
|
|
47
|
+
lg
|
|
48
|
+
}, spacing) => {
|
|
49
|
+
const calculateMarginLeft = (value) => {
|
|
50
|
+
const gap = getSpacing(spacing);
|
|
51
|
+
const columns = 12 / value;
|
|
52
|
+
return `calc(${100 / columns}% + ${gap} * ${value} / 12)`;
|
|
53
|
+
};
|
|
54
|
+
let style = {};
|
|
55
|
+
if (sm) {
|
|
56
|
+
style = {
|
|
57
|
+
marginLeft: calculateMarginLeft(sm)
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
if (md) {
|
|
61
|
+
style = {
|
|
62
|
+
...style,
|
|
63
|
+
...viewport.md({
|
|
64
|
+
marginLeft: calculateMarginLeft(md)
|
|
65
|
+
})
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
if (lg) {
|
|
69
|
+
style = {
|
|
70
|
+
...style,
|
|
71
|
+
...viewport.lg({
|
|
72
|
+
marginLeft: calculateMarginLeft(lg)
|
|
73
|
+
})
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
return style;
|
|
77
|
+
};
|
|
78
|
+
const getFlexProperty = (align) => {
|
|
79
|
+
if (!align) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
if ("right" === align) {
|
|
83
|
+
return "flex-end";
|
|
84
|
+
}
|
|
85
|
+
if ("center" === align) {
|
|
86
|
+
return "center";
|
|
87
|
+
}
|
|
88
|
+
if ("left" === align) {
|
|
89
|
+
return "flex-start";
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
const getCardAlignment = (align) => {
|
|
93
|
+
const nestedStyles = {};
|
|
94
|
+
const cardSelector = CardStyled.toString();
|
|
95
|
+
const demoBoxSelector = DemoBoxStyled.toString();
|
|
96
|
+
nestedStyles[cardSelector] = {
|
|
97
|
+
alignItems: getFlexProperty(align)
|
|
98
|
+
};
|
|
99
|
+
nestedStyles[demoBoxSelector] = {
|
|
100
|
+
alignItems: getFlexProperty(align)
|
|
101
|
+
};
|
|
102
|
+
return nestedStyles;
|
|
103
|
+
};
|
|
104
|
+
const GridItemStyled = styled.div.withConfig({
|
|
105
|
+
shouldForwardProp: filterProps(),
|
|
106
|
+
displayName: "GridItemStyled",
|
|
107
|
+
componentId: "sc-kv0kb7-0"
|
|
108
|
+
})({
|
|
109
|
+
flexGrow: 0,
|
|
110
|
+
flexShrink: 0,
|
|
111
|
+
display: "flex",
|
|
112
|
+
flexDirection: "column",
|
|
113
|
+
// This is a highly sophisticated solution that prevents GridItems to be bigger than its supposed column width
|
|
114
|
+
minWidth: 0
|
|
115
|
+
}, (props) => getColumnWidth(props), ({
|
|
116
|
+
offset,
|
|
117
|
+
spacing = spacingMd
|
|
118
|
+
}) => {
|
|
119
|
+
if (!offset) return {};
|
|
120
|
+
return {
|
|
121
|
+
...getOffset(offset, spacing)
|
|
122
|
+
};
|
|
123
|
+
}, ({
|
|
124
|
+
align
|
|
125
|
+
}) => ({
|
|
126
|
+
textAlign: align,
|
|
127
|
+
alignItems: getFlexProperty(align)
|
|
128
|
+
}), ({
|
|
129
|
+
align
|
|
130
|
+
}) => getCardAlignment(align), getBottomSpacing);
|
|
131
|
+
export {
|
|
132
|
+
GridItemStyled as G
|
|
133
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { getBottomSpacing } from "./foundations/token/getBottomSpacing/index.js";
|
|
3
|
+
import { getSpacing } from "./foundations/token/getSpacing/index.js";
|
|
4
|
+
import { s as spacingMd } from "./Spacing-D0HQH9YJ.js";
|
|
5
|
+
import { f as filterProps } from "./filterProps-Cewck8OH.js";
|
|
6
|
+
const GridStyled = styled.div.withConfig({
|
|
7
|
+
shouldForwardProp: filterProps(),
|
|
8
|
+
displayName: "GridStyled",
|
|
9
|
+
componentId: "sc-1ydkxh9-0"
|
|
10
|
+
})({
|
|
11
|
+
boxSizing: "border-box",
|
|
12
|
+
display: "flex",
|
|
13
|
+
flexWrap: "wrap"
|
|
14
|
+
}, ({
|
|
15
|
+
align = "left"
|
|
16
|
+
}) => ({
|
|
17
|
+
justifyContent: align
|
|
18
|
+
}), ({
|
|
19
|
+
stretch = false
|
|
20
|
+
}) => ({
|
|
21
|
+
alignItems: stretch ? "stretch" : "flex-start"
|
|
22
|
+
}), ({
|
|
23
|
+
spacing = spacingMd
|
|
24
|
+
}) => ({
|
|
25
|
+
gap: getSpacing(spacing)
|
|
26
|
+
}), getBottomSpacing);
|
|
27
|
+
export {
|
|
28
|
+
GridStyled as G
|
|
29
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const h1TagName = "h1";
|
|
2
|
+
const h2TagName = "h2";
|
|
3
|
+
const h3TagName = "h3";
|
|
4
|
+
const h4TagName = "h4";
|
|
5
|
+
const h5TagName = "h5";
|
|
6
|
+
const h6TagName = "h6";
|
|
7
|
+
const headingHtmlTags = [h1TagName, h2TagName, h3TagName, h4TagName, h5TagName, h6TagName];
|
|
8
|
+
const divTagName = "div";
|
|
9
|
+
const spanTagName = "span";
|
|
10
|
+
const strongTagName = "strong";
|
|
11
|
+
const supTagName = "sup";
|
|
12
|
+
const ulTagName = "ul";
|
|
13
|
+
const olTagName = "ol";
|
|
14
|
+
const liTagName = "li";
|
|
15
|
+
export {
|
|
16
|
+
h4TagName as a,
|
|
17
|
+
h3TagName as b,
|
|
18
|
+
h2TagName as c,
|
|
19
|
+
divTagName as d,
|
|
20
|
+
h1TagName as e,
|
|
21
|
+
headingHtmlTags as f,
|
|
22
|
+
strongTagName as g,
|
|
23
|
+
h5TagName as h,
|
|
24
|
+
supTagName as i,
|
|
25
|
+
liTagName as l,
|
|
26
|
+
olTagName as o,
|
|
27
|
+
spanTagName as s,
|
|
28
|
+
ulTagName as u
|
|
29
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vodafone_de/brix-components",
|
|
3
3
|
"description": "Brix is the digital design system for vodafone.de",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.3",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./components/*": {
|
|
7
7
|
"import": "./dist/components/*/index.js",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@af-utils/scrollend-polyfill": "^0.0.14",
|
|
21
21
|
"@vis.gl/react-google-maps": "^1.5.1",
|
|
22
|
+
"html-react-parser": "^5.2.2",
|
|
22
23
|
"polished": "^4.3.1",
|
|
23
24
|
"react": "^19.0.0",
|
|
24
25
|
"react-dom": "^19.0.0",
|
package/dist/index-BoPDwZgt.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
const getCssVar = (cssVarName) => {
|
|
2
|
-
return `var(--${cssVarName})`;
|
|
3
|
-
};
|
|
4
|
-
const bodySizes = {
|
|
5
|
-
md: {
|
|
6
|
-
fontSize: getCssVar("bodyMdFontSize"),
|
|
7
|
-
lineHeight: getCssVar("bodyMdLineHeight")
|
|
8
|
-
},
|
|
9
|
-
sm: {
|
|
10
|
-
fontSize: getCssVar("bodySmFontSize"),
|
|
11
|
-
lineHeight: getCssVar("bodySmLineHeight")
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
const getBodySize = (size) => bodySizes[size];
|
|
15
|
-
export {
|
|
16
|
-
getBodySize as a,
|
|
17
|
-
getCssVar as g
|
|
18
|
-
};
|