@npm_leadtech/legal-contracts-ui 0.149.0 → 0.150.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.
@@ -1,35 +1,25 @@
1
- import { jsx as h } from "react/jsx-runtime";
2
- import p from "clsx";
3
- const b = ({ children: a, variant: l = "default", className: c = "", ...r }) => {
4
- const t = r.href || "", n = t.toLowerCase(), u = n.startsWith("mailto:"), o = n.startsWith("tel:"), e = "cursor-pointer text-primary-700", s = {
1
+ import { jsx as x } from "react/jsx-runtime";
2
+ import m from "clsx";
3
+ const w = ({ children: o, variant: l = "default", className: c = "", ...t }) => {
4
+ const e = t.href || "", n = e.toLowerCase(), u = n.startsWith("mailto:"), a = n.startsWith("tel:"), r = "cursor-pointer text-primary-700", i = {
5
5
  default: "text-neutral-900 underline",
6
- legal: e,
6
+ legal: r,
7
7
  ratafia: "cursor-pointer text-primary-200 underline decoration-white/40 underline-offset-2 hover:text-white",
8
- "about-us": e,
8
+ "about-us": r,
9
9
  pricing: "cursor-pointer text-neutral-900",
10
- unsubscribe: e,
10
+ unsubscribe: r,
11
11
  cookies: "text-white",
12
12
  story: "text-neutral-800 underline"
13
- }, d = s[l] ?? s.default, i = t.startsWith("http") && !o && !u, f = (() => {
14
- if (!o) return t;
13
+ }, f = i[l] ?? i.default, h = e.startsWith("http"), d = (() => {
14
+ if (!a) return e;
15
15
  try {
16
- return decodeURIComponent(t).replace(/\s/g, "");
16
+ return decodeURIComponent(e).replace(/\s/g, "");
17
17
  } catch {
18
- return t.replace(/%20/g, "").replace(/\s/g, "");
18
+ return e.replace(/%20/g, "").replace(/\s/g, "");
19
19
  }
20
- })();
21
- return /* @__PURE__ */ h(
22
- "a",
23
- {
24
- ...r,
25
- href: f,
26
- className: p(c, d),
27
- target: i ? "_blank" : void 0,
28
- rel: i ? "noopener noreferrer" : void 0,
29
- children: a
30
- }
31
- );
20
+ })(), s = t.target === "_blank" || h && !a && !u ? "_blank" : t.target, g = s === "_blank" ? "noopener noreferrer" : t.rel;
21
+ return /* @__PURE__ */ x("a", { ...t, href: d, className: m(c, f), target: s, rel: g, children: o });
32
22
  };
33
23
  export {
34
- b as Anchor
24
+ w as Anchor
35
25
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-contracts-ui",
3
- "version": "0.149.0",
3
+ "version": "0.150.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",