@vodafone_de/brix-components 3.0.2 → 3.0.4

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.
Files changed (51) hide show
  1. package/dist/components/Accordion/index.js +1 -1
  2. package/dist/components/Badge/index.js +3 -3
  3. package/dist/components/Body/index.js +1 -1
  4. package/dist/components/Button/index.js +3 -3
  5. package/dist/components/ButtonAsLink/index.js +2 -2
  6. package/dist/components/Checkbox/index.js +1 -1
  7. package/dist/components/ColorSwatch/index.js +1 -1
  8. package/dist/components/ColorSwatchGroup/index.js +1 -1
  9. package/dist/components/DateInput/index.js +1 -1
  10. package/dist/components/DemoBox/index.js +1 -1
  11. package/dist/components/DiscoveryCard/index.js +4 -4
  12. package/dist/components/DiscoveryCardGroup/index.js +1 -1
  13. package/dist/components/Fieldset/index.js +1 -1
  14. package/dist/components/FilterGroup/index.js +1 -1
  15. package/dist/components/FormHelperStatusIcon/index.js +1 -1
  16. package/dist/components/GoogleMap/index.js +1 -1
  17. package/dist/components/Heading/index.js +1 -1
  18. package/dist/components/Icon/index.js +1 -1
  19. package/dist/components/IconButton/index.js +2 -2
  20. package/dist/components/IconSnippet/index.js +2 -2
  21. package/dist/components/ImageHeader/index.js +3 -3
  22. package/dist/components/Input/index.js +1 -1
  23. package/dist/components/Label/index.js +1 -1
  24. package/dist/components/Legend/index.js +1 -1
  25. package/dist/components/Link/index.js +2 -2
  26. package/dist/components/LinkAsButton/index.js +2 -2
  27. package/dist/components/LinkListItem/index.js +2 -2
  28. package/dist/components/Notification/index.js +2 -2
  29. package/dist/components/PickerGroup/index.js +3 -3
  30. package/dist/components/Price/index.js +2 -2
  31. package/dist/components/ProductCard/index.js +3 -3
  32. package/dist/components/RichText/index.js +1 -1
  33. package/dist/components/SearchInput/index.js +3 -3
  34. package/dist/components/SelectInput/index.js +2 -2
  35. package/dist/components/Stepper/index.js +1 -1
  36. package/dist/components/SuggestInput/index.js +2 -2
  37. package/dist/components/Switch/index.js +1 -1
  38. package/dist/components/TabularPrice/index.js +2 -2
  39. package/dist/components/TextList/index.js +2 -2
  40. package/dist/components/Textarea/index.js +1 -1
  41. package/dist/icons/index.js +603 -0
  42. package/dist/{index-CeJsIf3Z.js → index-Bm66OyL0.js} +1 -1
  43. package/dist/{index-CzTqNQTT.js → index-Bt1uVtoc.js} +2 -2
  44. package/dist/{index-C4XnzWFL.js → index-BtMpJbZ-.js} +3 -3
  45. package/dist/index-Cbojl4_Q.js +7134 -0
  46. package/dist/{index-D6hvbziL.js → index-Cy-Cg4bU.js} +13 -12
  47. package/dist/{index-BXLT6ke-.js → index-eiZAFM1T.js} +3 -3
  48. package/dist/renderInlineRichTextFromOpenText-RvOG3QbI.js +13 -0
  49. package/dist/{styled-FNJyDkPV.js → styled-BPTa90Cm.js} +1 -1
  50. package/package.json +1 -1
  51. package/dist/renderInlineRichTextFromOpenText-CA52y1-B.js +0 -2383
@@ -1,12 +1,13 @@
1
1
  import { jsx, Fragment } from "react/jsx-runtime";
2
2
  import { cloneElement } from "react";
3
- import { p as parse, l as libExports, r as renderInlineRichTextFromOpenText } from "./renderInlineRichTextFromOpenText-CA52y1-B.js";
3
+ import parse, { Element, domToReact } from "html-react-parser";
4
4
  import Body from "./components/Body/index.js";
5
5
  import FootnoteLink from "./components/FootnoteLink/index.js";
6
6
  import Heading from "./components/Heading/index.js";
7
7
  import InlineLink from "./components/InlineLink/index.js";
8
8
  import { f as headingHtmlTags, o as olTagName, g as strongTagName, i as supTagName, u as ulTagName } from "./tags-DI6H1biK.js";
9
9
  import { s as spacingMd, b as spacingNone } from "./Spacing-D0HQH9YJ.js";
10
+ import { r as renderInlineRichTextFromOpenText } from "./renderInlineRichTextFromOpenText-RvOG3QbI.js";
10
11
  import styled from "styled-components";
11
12
  import { getBodySize } from "./foundations/token/getBodySize/index.js";
12
13
  import { getBottomSpacing } from "./foundations/token/getBottomSpacing/index.js";
@@ -31,40 +32,40 @@ const mapSizeToTag = {
31
32
  const getOptions = (paragraphSpacing, additionalProps = {}) => {
32
33
  const options = {
33
34
  replace(domNode) {
34
- if (domNode instanceof libExports.Element) {
35
+ if (domNode instanceof Element) {
35
36
  if (headingHtmlTags.includes(domNode.name)) {
36
- return /* @__PURE__ */ jsx(Heading, { ...additionalProps.heading, size: mapSizeToTag[domNode.name], bottomSpacing: paragraphSpacing, children: libExports.domToReact(domNode.children, options) });
37
+ return /* @__PURE__ */ jsx(Heading, { ...additionalProps.heading, size: mapSizeToTag[domNode.name], bottomSpacing: paragraphSpacing, children: domToReact(domNode.children, options) });
37
38
  }
38
39
  if ("li" === domNode.name) {
39
- return /* @__PURE__ */ jsx(TextListItem, { ...additionalProps.li, children: libExports.domToReact(domNode.children, options) });
40
+ return /* @__PURE__ */ jsx(TextListItem, { ...additionalProps.li, children: domToReact(domNode.children, options) });
40
41
  }
41
42
  if ("ol" === domNode.name) {
42
- return /* @__PURE__ */ jsx(TextList, { ...additionalProps.ol, tag: olTagName, children: libExports.domToReact(domNode.children, options) });
43
+ return /* @__PURE__ */ jsx(TextList, { ...additionalProps.ol, tag: olTagName, children: domToReact(domNode.children, options) });
43
44
  }
44
45
  if ("ul" === domNode.name) {
45
- return /* @__PURE__ */ jsx(TextList, { ...additionalProps.ul, children: libExports.domToReact(domNode.children, options) });
46
+ return /* @__PURE__ */ jsx(TextList, { ...additionalProps.ul, children: domToReact(domNode.children, options) });
46
47
  }
47
48
  if ("strong" === domNode.name) {
48
- return /* @__PURE__ */ jsx(Body, { ...additionalProps.strong, tag: strongTagName, children: libExports.domToReact(domNode.children, options) });
49
+ return /* @__PURE__ */ jsx(Body, { ...additionalProps.strong, tag: strongTagName, children: domToReact(domNode.children, options) });
49
50
  }
50
51
  if ("small" === domNode.name) {
51
- return /* @__PURE__ */ jsx(Body, { ...additionalProps.small, size: textBodySm, children: libExports.domToReact(domNode.children, options) });
52
+ return /* @__PURE__ */ jsx(Body, { ...additionalProps.small, size: textBodySm, children: domToReact(domNode.children, options) });
52
53
  }
53
54
  if ("sup" === domNode.name) {
54
- return /* @__PURE__ */ jsx(Body, { ...additionalProps.sup, tag: supTagName, children: libExports.domToReact(domNode.children, options) });
55
+ return /* @__PURE__ */ jsx(Body, { ...additionalProps.sup, tag: supTagName, children: domToReact(domNode.children, options) });
55
56
  }
56
57
  if ("p" === domNode.name) {
57
- return /* @__PURE__ */ jsx(Body, { ...additionalProps.p, bottomSpacing: paragraphSpacing, children: libExports.domToReact(domNode.children, options) });
58
+ return /* @__PURE__ */ jsx(Body, { ...additionalProps.p, bottomSpacing: paragraphSpacing, children: domToReact(domNode.children, options) });
58
59
  }
59
60
  if ("a" === domNode.name) {
60
- const linkLabel = libExports.domToReact(domNode.children, options);
61
+ const linkLabel = domToReact(domNode.children, options);
61
62
  const isNumber = parseInt(linkLabel, 10);
62
63
  const href = domNode.attribs.href;
63
64
  const isAnchor = href.indexOf("#") === 0;
64
65
  if (!isNaN(isNumber) && isAnchor) {
65
66
  return /* @__PURE__ */ jsx(FootnoteLink, { uid: getUid(), contentUid: href.replace("#", ""), screenReaderLabel: "Details zur Fußnote", children: linkLabel });
66
67
  }
67
- return /* @__PURE__ */ jsx(InlineLink, { ...additionalProps.a, href: domNode.attribs.href, children: libExports.domToReact(domNode.children, options) });
68
+ return /* @__PURE__ */ jsx(InlineLink, { ...additionalProps.a, href: domNode.attribs.href, children: domToReact(domNode.children, options) });
68
69
  }
69
70
  }
70
71
  }
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { iconSizeSm } from "@vfde-react/inline-icon-library";
3
- import { c as ButtonIconStyled } from "./styled-FNJyDkPV.js";
4
- import { r as renderInlineRichTextFromOpenText } from "./renderInlineRichTextFromOpenText-CA52y1-B.js";
2
+ import { iv as iconSizeSm } from "./index-Cbojl4_Q.js";
3
+ import { c as ButtonIconStyled } from "./styled-BPTa90Cm.js";
4
+ import { r as renderInlineRichTextFromOpenText } from "./renderInlineRichTextFromOpenText-RvOG3QbI.js";
5
5
  import styled from "styled-components";
6
6
  import { getBottomSpacing } from "./foundations/token/getBottomSpacing/index.js";
7
7
  import { s as spacingMd, b as spacingNone, a as spacingXs } from "./Spacing-D0HQH9YJ.js";
@@ -0,0 +1,13 @@
1
+ import parse from "html-react-parser";
2
+ const renderInlineRichTextFromOpenText = (fromCms) => {
3
+ if (typeof fromCms === "string") {
4
+ return parse(fromCms);
5
+ }
6
+ if (Array.isArray(fromCms)) {
7
+ return fromCms.map(renderInlineRichTextFromOpenText);
8
+ }
9
+ return fromCms;
10
+ };
11
+ export {
12
+ renderInlineRichTextFromOpenText as r
13
+ };
@@ -1,4 +1,4 @@
1
- import { IconLoader } from "@vfde-react/inline-icon-library";
1
+ import { df as IconLoader } from "./index-Cbojl4_Q.js";
2
2
  import styled from "styled-components";
3
3
  import forcedColors from "./foundations/media-query/forcedColors/index.js";
4
4
  import { e as ease_in_sine } from "./easing-Dm-pO8SY.js";
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.2",
4
+ "version": "3.0.4",
5
5
  "exports": {
6
6
  "./components/*": {
7
7
  "import": "./dist/components/*/index.js",