@vodafone_de/brix-components 3.0.0 → 3.0.1

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/package.json CHANGED
@@ -1,8 +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.0",
5
- "private": false,
4
+ "version": "3.0.1",
6
5
  "exports": {
7
6
  "./components/*": {
8
7
  "import": "./dist/components/*/index.js",
@@ -20,7 +19,6 @@
20
19
  "peerDependencies": {
21
20
  "@af-utils/scrollend-polyfill": "^0.0.14",
22
21
  "@vis.gl/react-google-maps": "^1.5.1",
23
- "html-react-parser": "^5.2.2",
24
22
  "polished": "^4.3.1",
25
23
  "react": "^19.0.0",
26
24
  "react-dom": "^19.0.0",
@@ -1,117 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import parse from "html-react-parser";
3
- import styled from "styled-components";
4
- import { g as getCssVar, a as getBodySize } from "./index-BoPDwZgt.js";
5
- const spacingNone = "None";
6
- const spacingSm = "Sm";
7
- const spacingMd = "Md";
8
- const textBodyMd = "md";
9
- const textBodySm = "sm";
10
- const renderInlineRichTextFromOpenText = (fromCms) => {
11
- if (typeof fromCms === "string") {
12
- return parse(fromCms);
13
- }
14
- if (Array.isArray(fromCms)) {
15
- return fromCms.map(renderInlineRichTextFromOpenText);
16
- }
17
- return fromCms;
18
- };
19
- const getSpacing = (spacing) => getCssVar(`spacing${spacing}`);
20
- const getBottomSpacing = ({
21
- bottomSpacing
22
- }) => {
23
- if (!bottomSpacing) {
24
- return {};
25
- }
26
- return {
27
- marginBottom: getSpacing(bottomSpacing)
28
- };
29
- };
30
- const baseWeight300 = "fontWeightLight";
31
- const baseWeight400 = "fontWeightRegular";
32
- const baseWeight700 = "fontWeightBold";
33
- const fontWeights = {
34
- light: baseWeight300,
35
- regular: baseWeight400,
36
- bold: baseWeight700
37
- };
38
- const getFontWeight = (weight) => getCssVar(fontWeights[weight]);
39
- const fontWeightBold = "bold";
40
- const propsNotPassToDomDefault = ["accordionType", "activeId", "activeIndex", "setActiveId", "align", "animated", "appearance", "aspectRatio", "autoLayout", "apiKey", "badge", "borderBottom", "bottomSpacing", "buttonLink", "buttons", "coloringMode", "colorSwatch", "component", "corners", "description", "expanded", "filterItems", "gapSpacing", "grow", "handleOnClick", "handleOnToogle", "hasOverlay", "heading", "heightSm", "heightMd", "heightLg", "horizontalAlignment", "icon", "iconAlign", "iconName", "iconPosition", "images", "isActive", "isChecked", "isDisabled", "isFullscreen", "isOpen", "isOrdered", "isSelected", "isTransparentBackground", "items", "jumpToClickedItem", "justify", "justifyHorizontal", "lg", "loadingSpinnerChild", "mapId", "md", "message", "more", "nextAriaLabel", "notificationType", "objectFit", "objectPosition", "offset", "onUpdate", "openMultiple", "orientation", "padding", "prefix", "prefixWeight", "prevAriaLabel", "price", "productId", "promoPrice", "screenReaderInstruction", "showList", "size", "sm", "spacing", "spinnerType", "status", "stretch", "strikePrice", "suffix", "tag", "textContent", "uid", "variant", "verticalPadding", "viewportHeight", "weight", "width"];
41
- const filterProps = (propsNotPassToDom = []) => {
42
- const shouldForwardProp = (prop) => {
43
- if ("string" !== typeof prop) {
44
- return false;
45
- }
46
- return ![...propsNotPassToDom, ...propsNotPassToDomDefault].includes(prop);
47
- };
48
- return shouldForwardProp;
49
- };
50
- const BodyStyled = styled.p.withConfig({
51
- shouldForwardProp: filterProps(),
52
- displayName: "BodyStyled",
53
- componentId: "sc-1n7n7pv-0"
54
- })({
55
- outline: "none",
56
- color: "inherit",
57
- verticalAlign: "baseline"
58
- }, ({
59
- size = textBodyMd
60
- }) => getBodySize(size), ({
61
- weight,
62
- tag
63
- }) => {
64
- if ("strong" === tag) {
65
- return {
66
- fontWeight: getFontWeight(fontWeightBold)
67
- };
68
- }
69
- if (!weight) {
70
- return {};
71
- }
72
- return {
73
- fontWeight: getFontWeight(weight)
74
- };
75
- }, ({
76
- tag
77
- }) => {
78
- if ("sup" === tag) {
79
- return {
80
- verticalAlign: "super",
81
- fontSize: "smaller"
82
- };
83
- }
84
- if ("span" === tag) {
85
- return {
86
- display: "inline-block"
87
- };
88
- }
89
- return {};
90
- }, ({
91
- align
92
- }) => ({
93
- textAlign: align
94
- }), getBottomSpacing);
95
- const bodyAlignLeft = "left";
96
- const bodyAlignCenter = "center";
97
- const bodyAlignRight = "right";
98
- const Body = ({
99
- tag = "p",
100
- bottomSpacing,
101
- ...props
102
- }) => {
103
- if (!bottomSpacing) {
104
- bottomSpacing = textBodySm === props.size ? spacingSm : spacingMd;
105
- }
106
- return /* @__PURE__ */ jsx(BodyStyled, { ...props, bottomSpacing, as: tag, tag, children: renderInlineRichTextFromOpenText(props.children) });
107
- };
108
- export {
109
- Body as B,
110
- getSpacing as a,
111
- bodyAlignLeft as b,
112
- bodyAlignCenter as c,
113
- bodyAlignRight as d,
114
- filterProps as f,
115
- getBottomSpacing as g,
116
- spacingNone as s
117
- };