lawgic-dev-kit 0.20.4 → 0.20.8

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,4 +1,5 @@
1
- var p = { exports: {} };
1
+ import { __require as r } from "../node_modules/property-expr/index.js";
2
+ var e = r();
2
3
  export {
3
- p as __module
4
+ e as p
4
5
  };
@@ -1,5 +1,5 @@
1
- import { __require as r } from "../node_modules/property-expr/index.js";
2
- var e = r();
1
+ import { __require as r } from "../node_modules/tiny-case/index.js";
2
+ var a = r();
3
3
  export {
4
- e as p
4
+ a as t
5
5
  };
@@ -1,5 +1,7 @@
1
- import { __require as r } from "../node_modules/tiny-case/index.js";
2
- var a = r();
1
+ import { getDefaultExportFromCjs as o } from "./_commonjsHelpers.js";
2
+ import { __require as r } from "../node_modules/toposort/index.js";
3
+ var t = r();
4
+ const s = /* @__PURE__ */ o(t);
3
5
  export {
4
- a as t
6
+ s as default
5
7
  };
@@ -1,7 +1,4 @@
1
- import { getDefaultExportFromCjs as o } from "./_commonjsHelpers.js";
2
- import { __require as r } from "../node_modules/toposort/index.js";
3
- var t = r();
4
- const s = /* @__PURE__ */ o(t);
1
+ var p = { exports: {} };
5
2
  export {
6
- s as default
3
+ p as __module
7
4
  };
@@ -1,4 +1,4 @@
1
- var e = { exports: {} };
1
+ var o = { exports: {} };
2
2
  export {
3
- e as __module
3
+ o as __module
4
4
  };
@@ -1,4 +1,4 @@
1
- var o = { exports: {} };
1
+ var e = { exports: {} };
2
2
  export {
3
- o as __module
3
+ e as __module
4
4
  };
@@ -15,8 +15,8 @@ const j = ({
15
15
  const { defaultColorScheme: c } = h(), m = i || c, {
16
16
  activeTextColor: a,
17
17
  activeBgColor: p,
18
- hoverBgColor: u,
19
- activeIconColor: x
18
+ hoverBgColor: x,
19
+ activeIconColor: u
20
20
  } = d(m);
21
21
  return /* @__PURE__ */ t.jsxs(
22
22
  "div",
@@ -25,14 +25,14 @@ const j = ({
25
25
  className: `
26
26
  flex items-center rounded-full text-gray transition-all duration-150 h-[40px] w-full px-[12.3px]
27
27
  ${!e && "w-fit"}
28
- ${r ? "cursor-not-allowed opacity-50" : `cursor-pointer ${u}`}
28
+ ${r ? "cursor-not-allowed opacity-50" : `cursor-pointer ${x}`}
29
29
  ${o ? `${a} ${p}` : "bg-transparent"}`,
30
30
  children: [
31
31
  /* @__PURE__ */ t.jsx(
32
32
  f,
33
33
  {
34
34
  icon: l,
35
- className: o ? x : "text-gray-900",
35
+ className: o ? u : "text-gray-500",
36
36
  style: {
37
37
  height: "16px"
38
38
  }
@@ -48,6 +48,7 @@ const j = ({
48
48
  w-[0px]
49
49
  text-nowrap
50
50
  transition-all duration-100 ease-in-out
51
+ text-gray-500
51
52
  opacity-0 capitalize
52
53
  ${e && "translate-x-0 opacity-100 !w-full !h-auto ml-8"}
53
54
  ${o && a}`,
@@ -1,55 +1,57 @@
1
- import { j as t } from "../../../_virtual/jsx-runtime.js";
2
- import { useFloating as M, useClick as N, useDismiss as O, useInteractions as S, useTransitionStyles as k } from "../../../node_modules/@floating-ui/react/dist/floating-ui.react.js";
3
- import w, { useState as P, useEffect as _ } from "react";
1
+ import { j as e } from "../../../_virtual/jsx-runtime.js";
2
+ import { useFloating as I, useClick as M, useDismiss as N, useInteractions as O, useTransitionStyles as S } from "../../../node_modules/@floating-ui/react/dist/floating-ui.react.js";
3
+ import A, { useState as C, useEffect as P } from "react";
4
4
  import "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
5
5
  import "../../../_virtual/lodash.js";
6
6
  import "../../../contexts/themeContext.js";
7
7
  import "react-hook-form";
8
8
  import "../InformationContainer/InformationContainer.js";
9
- import z from "../../atoms/BoxContainer/BoxContainer.js";
9
+ import _ from "../../atoms/BoxContainer/BoxContainer.js";
10
10
  import "react-dom";
11
11
  import "../../../constants/countries.js";
12
12
  import "../../atoms/ImageProfileInput/ImageProfileInput.validators.js";
13
13
  import "fuse.js";
14
+ import z from "../../atoms/ClickAwayListener/ClickAwayListener.js";
14
15
  import { autoUpdate as B } from "../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.js";
15
- import { offset as D, flip as T, shift as U } from "../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js";
16
- const ee = ({
17
- open: e,
16
+ import { offset as D, flip as L, shift as T } from "../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js";
17
+ const ie = ({
18
+ open: t,
18
19
  onClose: s,
19
20
  component: i,
20
- children: n,
21
- placement: l = "bottom",
22
- className: m = "",
23
- strategy: f = "absolute",
24
- styles: p = {},
25
- offset: c = 8,
26
- padding: d = 8
21
+ children: m,
22
+ placement: f = "bottom",
23
+ className: c = "",
24
+ strategy: p = "absolute",
25
+ styles: d = {},
26
+ offset: u = 8,
27
+ padding: g = 8,
28
+ handleClickAway: x = !0
27
29
  }) => {
28
- const [u, o] = P(e);
29
- _(() => {
30
- o(e);
31
- }, [e]);
32
- const g = () => {
33
- o(!1), s == null || s();
34
- }, { x, y, strategy: h, refs: a, context: r } = M({
35
- strategy: f,
36
- open: u,
37
- onOpenChange: (I) => {
38
- !I && !e && g();
30
+ const [o, n] = C(t);
31
+ P(() => {
32
+ n(t);
33
+ }, [t]);
34
+ const a = () => {
35
+ n(!1), s == null || s();
36
+ }, { x: y, y: h, strategy: j, refs: l, context: r } = I({
37
+ strategy: p,
38
+ open: o,
39
+ onOpenChange: (R) => {
40
+ !R && !t && a();
39
41
  },
40
- middleware: [D(c), T(), U({ padding: d })],
42
+ middleware: [D(u), L(), T({ padding: g })],
41
43
  whileElementsMounted: B,
42
- placement: l
43
- }), j = N(r, {
44
+ placement: f
45
+ }), b = M(r, {
44
46
  enabled: !1
45
47
  // Deshabilitamos el click interno ya que está controlado externamente
46
- }), b = O(r, {
48
+ }), k = N(r, {
47
49
  enabled: !1
48
50
  // Deshabilitamos dismiss cuando está controlado externamente por props
49
- }), { getReferenceProps: v, getFloatingProps: E } = S([
50
- j,
51
- b
52
- ]), { isMounted: F, styles: R } = k(r, {
51
+ }), { getReferenceProps: v, getFloatingProps: w } = O([
52
+ b,
53
+ k
54
+ ]), { isMounted: E, styles: F } = S(r, {
53
55
  duration: {
54
56
  open: 200,
55
57
  close: 150
@@ -59,35 +61,44 @@ const ee = ({
59
61
  transform: "translateY(-4px) scale(0.95)"
60
62
  }
61
63
  });
62
- return /* @__PURE__ */ t.jsxs("div", { className: "relative", children: [
63
- /* @__PURE__ */ t.jsx(
64
- "div",
65
- {
66
- ref: a.setReference,
67
- ...v(),
68
- className: "reference-element",
69
- children: n
70
- }
71
- ),
72
- F && /* @__PURE__ */ t.jsx(
73
- "div",
74
- {
75
- ref: a.setFloating,
76
- style: {
77
- position: h,
78
- top: y ?? 0,
79
- left: x ?? 0,
80
- ...R,
81
- zIndex: 999,
82
- ...p
83
- },
84
- ...E(),
85
- className: "floating-element",
86
- children: /* @__PURE__ */ t.jsx(z, { className: m, children: typeof i == "function" ? w.createElement(i) : i })
87
- }
88
- )
89
- ] });
64
+ return /* @__PURE__ */ e.jsx(
65
+ z,
66
+ {
67
+ enabled: x,
68
+ onClickAway: () => {
69
+ o && a();
70
+ },
71
+ children: /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
72
+ /* @__PURE__ */ e.jsx(
73
+ "div",
74
+ {
75
+ ref: l.setReference,
76
+ ...v(),
77
+ className: "reference-element",
78
+ children: m
79
+ }
80
+ ),
81
+ E && /* @__PURE__ */ e.jsx(
82
+ "div",
83
+ {
84
+ ref: l.setFloating,
85
+ style: {
86
+ position: j,
87
+ top: h ?? 0,
88
+ left: y ?? 0,
89
+ ...F,
90
+ zIndex: 999,
91
+ ...d
92
+ },
93
+ ...w(),
94
+ className: "floating-element",
95
+ children: /* @__PURE__ */ e.jsx(_, { className: c, children: typeof i == "function" ? A.createElement(i) : i })
96
+ }
97
+ )
98
+ ] })
99
+ }
100
+ );
90
101
  };
91
102
  export {
92
- ee as default
103
+ ie as default
93
104
  };
@@ -9,4 +9,5 @@ export interface FloatingMenuProps {
9
9
  styles?: React.CSSProperties;
10
10
  offset?: number;
11
11
  padding?: number;
12
+ handleClickAway?: boolean;
12
13
  }