@goodhood-web/ui 4.7.0 → 4.8.0-development.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/index.mjs CHANGED
@@ -6804,25 +6804,31 @@ const v7 = /* @__PURE__ */ z1(m7), C7 = "_markdown_1ek7s_146", i3 = {
6804
6804
  };
6805
6805
  function w7({
6806
6806
  className: t,
6807
- elementTag: e = "span",
6808
- inline: n = !1,
6809
- isExternalLinksIcon: r,
6810
- text: a
6807
+ disableAutolinks: e = !1,
6808
+ elementTag: n = "span",
6809
+ inline: r = !1,
6810
+ isExternalLinksIcon: a,
6811
+ text: o
6811
6812
  }) {
6812
- const o = v7(a, b7);
6813
+ const s = n, l = e ? (f) => {
6814
+ const h = f.raw, p = f.type === "link" ? f.href : "", g = /\[.*\]\(.*\)/.test(h);
6815
+ if (!(f.type === "autolink" || f.type === "link" && p && /^(?:mailto:|https?:|www\.)/.test(p) && !g)) return;
6816
+ const v = String(
6817
+ f.text ?? (p ? p.replace(/^mailto:/, "") : h.replace(/^<|>$/g, ""))
6818
+ );
6819
+ f.type = "text", f.raw = v, f.text = v, delete f.href, delete f.title, delete f.tokens;
6820
+ } : void 0, c = { breaks: !0, ...l && { walkTokens: l } }, u = r ? oe.parseInline(o, c) : oe.parse(o, c), d = v7(u, b7);
6813
6821
  return /* @__PURE__ */ m(
6814
- e,
6822
+ s,
6815
6823
  {
6816
6824
  className: R(
6817
6825
  i3.markdown,
6818
6826
  {
6819
- [i3["markdown--external-links"]]: r
6827
+ [i3["markdown--external-links"]]: a
6820
6828
  },
6821
6829
  t
6822
6830
  ),
6823
- dangerouslySetInnerHTML: {
6824
- __html: n ? oe.parseInline(o, { breaks: !0 }) : oe.parse(o, { breaks: !0 })
6825
- }
6831
+ dangerouslySetInnerHTML: { __html: d }
6826
6832
  }
6827
6833
  );
6828
6834
  }
@@ -6906,22 +6912,24 @@ const D = (t) => {
6906
6912
  fontSet: a = "product",
6907
6913
  markdown: o = a === "landing",
6908
6914
  markdownInline: s = !0,
6909
- type: l
6910
- } = t, c = e || y7(l), u = R(
6915
+ disableAutolinks: l,
6916
+ type: c
6917
+ } = t, u = e || y7(c), d = R(
6911
6918
  a3[`typography-${a}`],
6912
- a3[`typography-${a}--${l}`],
6919
+ a3[`typography-${a}--${c}`],
6913
6920
  r
6914
6921
  );
6915
6922
  return /* @__PURE__ */ m(Pt, { children: typeof n == "string" && o ? /* @__PURE__ */ m(
6916
6923
  w7,
6917
6924
  {
6918
- className: u,
6925
+ className: d,
6919
6926
  text: n,
6920
6927
  inline: s,
6921
- elementTag: c,
6922
- isExternalLinksIcon: a === "landing"
6928
+ elementTag: u,
6929
+ isExternalLinksIcon: a === "landing",
6930
+ disableAutolinks: l
6923
6931
  }
6924
- ) : /* @__PURE__ */ m(c, { className: u, "data-testid": t["data-testid"], children: n }) });
6932
+ ) : /* @__PURE__ */ m(u, { className: d, "data-testid": t["data-testid"], children: n }) });
6925
6933
  }, k7 = "_heading_q3ile_146", x7 = "_title_q3ile_160", E7 = "_icon_q3ile_176", M7 = "_iconExpanded_q3ile_183", L7 = "_panel_q3ile_192", $t = {
6926
6934
  "react-datepicker": "_react-datepicker_q3ile_116",
6927
6935
  "react-datepicker__day-names": "_react-datepicker__day-names_q3ile_119",
@@ -4,6 +4,7 @@ export type TypographyTypeProduct = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'h
4
4
  type AsProp<C extends ElementType> = {
5
5
  as?: C;
6
6
  'data-testid'?: string;
7
+ disableAutolinks?: boolean;
7
8
  markdown?: boolean;
8
9
  markdownInline?: boolean;
9
10
  };
@@ -1,3 +1,3 @@
1
1
  import { MarkdownProps } from './Markdown.types';
2
- declare function Markdown({ className, elementTag, inline, isExternalLinksIcon, text, }: MarkdownProps): import("react/jsx-runtime").JSX.Element;
2
+ declare function Markdown({ className, disableAutolinks, elementTag, inline, isExternalLinksIcon, text, }: MarkdownProps): import("react/jsx-runtime").JSX.Element;
3
3
  export default Markdown;
@@ -1,6 +1,7 @@
1
1
  import { AllowedHTMLElements } from '../../Base/Typography/Typography.types';
2
2
  export type MarkdownProps = {
3
3
  className?: string;
4
+ disableAutolinks?: boolean;
4
5
  elementTag?: AllowedHTMLElements;
5
6
  inline?: boolean;
6
7
  isExternalLinksIcon?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodhood-web/ui",
3
- "version": "4.7.0",
3
+ "version": "4.8.0-development.1",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "repository": "https://github.com/good-hood-gmbh/goodhood-web",