@npm_leadtech/legal-contracts-ui 0.128.2 → 0.128.7

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,20 +1,20 @@
1
1
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { MobileMenu as o } from "./MobileMenu.js";
4
- import { useScroll as s } from "../shared/hooks/useScroll.js";
5
- import { NavMenu as c } from "./NavMenu.js";
4
+ import { useScroll as c } from "../shared/hooks/useScroll.js";
5
+ import { NavMenu as s } from "./NavMenu.js";
6
6
  import { LanguageSelector as p } from "./LanguageSelector.js";
7
7
  import { ScalatorIcon as x } from "./ScalatorIcon.js";
8
8
  import { SearchBar as f } from "./SearchBar.js";
9
9
  const j = ({
10
10
  logo: l,
11
11
  navMenu: d,
12
- searchBarProps: a,
13
- languageSelectorProps: i,
12
+ searchBarProps: i,
13
+ languageSelectorProps: a,
14
14
  userActions: n,
15
15
  mobileMenu: t
16
16
  }) => {
17
- const m = s(10);
17
+ const m = c(10);
18
18
  return /* @__PURE__ */ r("div", { className: "sticky top-0 z-1000 flex w-full flex-col", children: [
19
19
  /* @__PURE__ */ e(
20
20
  "header",
@@ -23,17 +23,17 @@ const j = ({
23
23
  children: /* @__PURE__ */ r("div", { className: "flex w-full items-center justify-between px-4 py-4 text-neutral-800 md:px-8", children: [
24
24
  /* @__PURE__ */ r("div", { className: "flex flex-1 items-center gap-8", children: [
25
25
  l,
26
- /* @__PURE__ */ e(c, { className: "hidden lg:block", ...d })
26
+ /* @__PURE__ */ e(s, { className: "hidden lg:block", ...d })
27
27
  ] }),
28
28
  /* @__PURE__ */ r("div", { className: "text-medium hidden flex-wrap items-center gap-4 lg:flex xl:gap-6", children: [
29
- /* @__PURE__ */ e(f, { ...a }),
30
- i && /* @__PURE__ */ e("div", { className: "hidden xl:block", children: /* @__PURE__ */ e(p, { ...i }) }),
29
+ /* @__PURE__ */ e(f, { ...i }),
30
+ a && /* @__PURE__ */ e("div", { className: "hidden xl:block", children: /* @__PURE__ */ e(p, { ...a }) }),
31
31
  n
32
32
  ] }),
33
33
  /* @__PURE__ */ r(
34
34
  "button",
35
35
  {
36
- className: "text-small text-primary-500 flex items-center justify-center gap-1 rounded border border-neutral-400 bg-transparent px-2 py-1 lg:hidden",
36
+ className: "text-small text-primary-500 flex items-center justify-center gap-1 rounded border border-neutral-400 bg-white px-2 py-1 lg:hidden",
37
37
  onClick: t.onOpen,
38
38
  "aria-label": "Open menu",
39
39
  "aria-expanded": t.isOpen,
@@ -46,7 +46,7 @@ const j = ({
46
46
  ] })
47
47
  }
48
48
  ),
49
- /* @__PURE__ */ e(o, { ...t, logo: l, userActions: n, searchBarProps: a })
49
+ /* @__PURE__ */ e(o, { ...t, logo: l, userActions: n, searchBarProps: i })
50
50
  ] });
51
51
  };
52
52
  export {
@@ -1,17 +1,17 @@
1
1
  "use client";
2
- import { jsxs as a, jsx as e } from "react/jsx-runtime";
3
- import { useState as n } from "react";
2
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
3
+ import { useState as o } from "react";
4
4
  import { ZoomIcon as c } from "./ZoomIcon.js";
5
5
  import { Modal as m } from "./Modal.js";
6
- const b = ({ small: l, large: s, onZoomClick: r }) => {
7
- const [t, o] = n(!1);
8
- return /* @__PURE__ */ a("div", { className: "relative aspect-3/4 w-75 self-center overflow-hidden border border-neutral-200", children: [
9
- /* @__PURE__ */ e("div", { className: "h-full w-full [&_img]:h-full [&_img]:w-full [&_img]:object-cover", children: l }),
10
- /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e(m, { trigger: /* @__PURE__ */ e(c, { className: "bg-primary-700 size-8 rounded p-2 opacity-80 hover:opacity-100" }), isOpen: t, setIsOpen: (i) => {
11
- o(i), i && r && r();
12
- }, children: s }) })
6
+ const v = ({ small: s, large: t, onZoomClick: r }) => {
7
+ const [l, a] = o(!1);
8
+ return /* @__PURE__ */ n("div", { className: "relative aspect-3/4 w-75 self-center overflow-hidden border border-neutral-200", children: [
9
+ /* @__PURE__ */ e("div", { className: "h-full w-full [&_img]:h-full [&_img]:w-full [&_img]:object-cover", children: s }),
10
+ /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e(m, { trigger: /* @__PURE__ */ e(c, { className: "bg-primary-700 size-8 rounded p-2 opacity-80 hover:opacity-100" }), isOpen: l, setIsOpen: (i) => {
11
+ a(i), i && r && r();
12
+ }, onTrigger: r, children: t }) })
13
13
  ] });
14
14
  };
15
15
  export {
16
- b as ImageWithPreview
16
+ v as ImageWithPreview
17
17
  };
@@ -1,7 +1,7 @@
1
1
  import { JSX } from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
3
 
4
- export declare const Modal: ({ trigger, children, isOpen, setIsOpen, showClose }: ModalProps) => JSX.Element;
4
+ export declare const Modal: ({ trigger, children, isOpen, setIsOpen, showClose, onTrigger }: ModalProps) => JSX.Element;
5
5
 
6
6
  export interface ModalProps {
7
7
  trigger?: ReactNode;
@@ -9,5 +9,6 @@ export interface ModalProps {
9
9
  isOpen: boolean;
10
10
  setIsOpen: (open: boolean) => void;
11
11
  showClose?: boolean;
12
+ onTrigger?: () => void;
12
13
  }
13
14
 
@@ -1,36 +1,36 @@
1
1
  "use client";
2
- import { jsxs as t, Fragment as c, jsx as e } from "react/jsx-runtime";
2
+ import { jsxs as n, Fragment as u, jsx as e } from "react/jsx-runtime";
3
3
  import "react";
4
- import { CloseIcon as u } from "./CloseIcon.js";
5
- const p = ({ trigger: l, children: n, isOpen: r, setIsOpen: a, showClose: i }) => {
4
+ import { CloseIcon as m } from "./CloseIcon.js";
5
+ const h = ({ trigger: l, children: a, isOpen: t, setIsOpen: i, showClose: s, onTrigger: r }) => {
6
6
  const o = () => {
7
- a(!r);
7
+ r && r(), i(!t);
8
8
  };
9
- return /* @__PURE__ */ t(c, { children: [
9
+ return /* @__PURE__ */ n(u, { children: [
10
10
  !!l && /* @__PURE__ */ e("button", { "aria-label": "zoom", onClick: o, className: "flex w-full cursor-pointer justify-center", children: l }),
11
- r && /* @__PURE__ */ e(
11
+ t && /* @__PURE__ */ e(
12
12
  "button",
13
13
  {
14
14
  className: "bg-primary-900/80 fixed inset-0 z-1001 flex items-center justify-center",
15
15
  onClick: o,
16
- children: /* @__PURE__ */ e("div", { className: "relative flex max-h-screen w-full items-start justify-center overflow-y-auto px-6 py-24", children: /* @__PURE__ */ t(
16
+ children: /* @__PURE__ */ e("div", { className: "relative flex max-h-screen w-full items-start justify-center overflow-y-auto px-6 py-24", children: /* @__PURE__ */ n(
17
17
  "div",
18
18
  {
19
19
  className: "relative",
20
- onClick: (s) => {
21
- s.stopPropagation();
20
+ onClick: (c) => {
21
+ c.stopPropagation();
22
22
  },
23
23
  children: [
24
- i && /* @__PURE__ */ e(
24
+ s && /* @__PURE__ */ e(
25
25
  "span",
26
26
  {
27
27
  className: "absolute top-4 right-4 z-10 cursor-pointer rounded-full p-2 transition-colors hover:bg-neutral-100 focus:outline-none",
28
28
  onClick: o,
29
29
  "aria-label": "Close",
30
- children: /* @__PURE__ */ e(u, {})
30
+ children: /* @__PURE__ */ e(m, {})
31
31
  }
32
32
  ),
33
- n
33
+ a
34
34
  ]
35
35
  }
36
36
  ) })
@@ -39,5 +39,5 @@ const p = ({ trigger: l, children: n, isOpen: r, setIsOpen: a, showClose: i }) =
39
39
  ] });
40
40
  };
41
41
  export {
42
- p as Modal
42
+ h as Modal
43
43
  };
@@ -1,5 +1,5 @@
1
1
  import { jsxs as r, Fragment as p, jsx as e } from "react/jsx-runtime";
2
- import { SearchIcon as m } from "./SearchIcon.js";
2
+ import { SearchIcon as b } from "./SearchIcon.js";
3
3
  import { CloseIcon as f } from "./CloseIcon.js";
4
4
  import { LinkWrapper as n } from "./LinkWrapper.js";
5
5
  const N = ({
@@ -23,7 +23,7 @@ const N = ({
23
23
  onClick: c,
24
24
  "aria-expanded": s,
25
25
  "data-qa": "search_button",
26
- children: /* @__PURE__ */ e(m, {})
26
+ children: /* @__PURE__ */ e(b, {})
27
27
  }
28
28
  ),
29
29
  s && /* @__PURE__ */ r(p, { children: [
@@ -38,7 +38,7 @@ const N = ({
38
38
  value: o,
39
39
  onChange: h,
40
40
  placeholder: d,
41
- className: "text-medium w-full text-neutral-800 outline-none placeholder:text-neutral-400",
41
+ className: "flex-1 text-base text-neutral-800 outline-none placeholder:text-neutral-400",
42
42
  autoFocus: !0,
43
43
  "data-qa": "search_input"
44
44
  }
@@ -81,7 +81,7 @@ const N = ({
81
81
  "aria-label": "Clear search",
82
82
  children: /* @__PURE__ */ e(f, { fill: "var(--neutral-400)", width: 20, height: 20 })
83
83
  }
84
- ) : /* @__PURE__ */ e(m, { fill: "var(--neutral-500)", width: 20, height: 20 })
84
+ ) : /* @__PURE__ */ e(b, { fill: "var(--neutral-500)", width: 20, height: 20 })
85
85
  ] }),
86
86
  a && /* @__PURE__ */ e("div", { className: "absolute left-0 mt-2 w-full overflow-x-hidden overflow-y-auto bg-white", children: /* @__PURE__ */ r("ul", { className: "py-4 pl-4", children: [
87
87
  t.length > 0 && t.map((l) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(n, { variant: "tertiary-thin", children: l.link }) }, l.id)),
@@ -870,7 +870,7 @@ export declare interface MobileMenuSection {
870
870
  content?: ReactNode | null;
871
871
  }
872
872
 
873
- export declare const Modal: ({ trigger, children, isOpen, setIsOpen, showClose }: ModalProps) => JSX.Element;
873
+ export declare const Modal: ({ trigger, children, isOpen, setIsOpen, showClose, onTrigger }: ModalProps) => JSX.Element;
874
874
 
875
875
  export interface ModalProps {
876
876
  trigger?: ReactNode;
@@ -878,6 +878,7 @@ export interface ModalProps {
878
878
  isOpen: boolean;
879
879
  setIsOpen: (open: boolean) => void;
880
880
  showClose?: boolean;
881
+ onTrigger?: () => void;
881
882
  }
882
883
 
883
884
  export declare const MoreTemplatesSection: FC<PopularDocumentsProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-contracts-ui",
3
- "version": "0.128.2",
3
+ "version": "0.128.7",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",