lawgic-dev-kit 0.9.3 → 0.9.6

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 (33) hide show
  1. package/dist/_virtual/index.js +2 -5
  2. package/dist/_virtual/index2.js +5 -2
  3. package/dist/_virtual/index3.js +3 -2
  4. package/dist/_virtual/index4.js +3 -3
  5. package/dist/_virtual/index5.js +5 -3
  6. package/dist/_virtual/index6.js +2 -5
  7. package/dist/_virtual/index7.js +2 -2
  8. package/dist/_virtual/index8.js +2 -2
  9. package/dist/components/atoms/Avatar/Avatar.js +5 -4
  10. package/dist/components/atoms/CountrySelectInput/CountryDropdown.js +1 -1
  11. package/dist/components/atoms/ImageProfileInput/ImageProfileInput.js +1 -1
  12. package/dist/components/atoms/PasswordInput/PasswordInput.js +1 -1
  13. package/dist/components/atoms/PhoneInput/PhoneInput.js +1 -1
  14. package/dist/components/atoms/SelectDropdown/SelectDropdown.js +1 -1
  15. package/dist/components/atoms/TextInput/TextInput.js +23 -25
  16. package/dist/components/atoms/UploadContainer/UploadContainer.js +3 -2
  17. package/dist/components/molecules/AlertModal/AlertModal.js +3 -2
  18. package/dist/components/molecules/CalendarSelector/CalendarSelector.js +3 -2
  19. package/dist/components/molecules/DateInput/DateInput.js +1 -1
  20. package/dist/components/molecules/DialogModal/DialogModal.js +3 -2
  21. package/dist/components/molecules/FloatingMenu/FloatingMenu.js +7 -6
  22. package/dist/components/molecules/Tabs/Tabs.js +3 -2
  23. package/dist/lawgic-dev-kit.umd.js +113 -113
  24. package/dist/node_modules/@fortawesome/react-fontawesome/index.es.js +1 -1
  25. package/dist/node_modules/prop-types/index.js +1 -1
  26. package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  27. package/dist/node_modules/scheduler/index.js +1 -1
  28. package/dist/node_modules/toposort/index.js +1 -1
  29. package/dist/node_modules/yup/index.esm.js +3 -3
  30. package/dist/utils/modal.js +21 -20
  31. package/dist/utils/toast.js +16 -15
  32. package/package.json +2 -1
  33. package/dist/node_modules/react-hook-form/dist/index.esm.js +0 -203
@@ -1,7 +1,4 @@
1
- import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
2
- import { __require as o } from "../node_modules/prop-types/index.js";
3
- var p = /* @__PURE__ */ o();
4
- const s = /* @__PURE__ */ r(p);
1
+ var e = { exports: {} };
5
2
  export {
6
- s as default
3
+ e as __module
7
4
  };
@@ -1,4 +1,7 @@
1
- var e = { exports: {} };
1
+ import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
2
+ import { __require as o } from "../node_modules/prop-types/index.js";
3
+ var p = /* @__PURE__ */ o();
4
+ const s = /* @__PURE__ */ r(p);
2
5
  export {
3
- e as __module
6
+ s as default
4
7
  };
@@ -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
  };
@@ -6,11 +6,12 @@ import { stringToColor as h } from "../../../utils/strings.js";
6
6
  import { getImageUrl as E } from "../../../utils/images.js";
7
7
  import "../../../_virtual/lodash.js";
8
8
  import "../../../contexts/themeContext.js";
9
+ import "react-hook-form";
9
10
  import "../ImageProfileInput/ImageProfileInput.validators.js";
10
11
  import "../../../constants/countries.js";
11
12
  import "react-dom";
12
- const V = ({ containerProps: x = {}, imageProps: d = {}, src: m = "", alt: i = "", size: e = 30, user: t = null }) => {
13
- const { className: p = " ", ...g } = x, { className: s = " ", ...v } = d, o = e + "px", n = e * 0.5 + "px", l = e * 0.4 + "px", [j, w] = W(!1), N = () => i ? h(i) : t ? h(t != null && t.first_name || t != null && t.last_name ? ((t == null ? void 0 : t.first_name) || "") + " " + ((t == null ? void 0 : t.last_name) || "") : t == null ? void 0 : t.email) : "#9CA1B6", c = (f) => {
13
+ const $ = ({ containerProps: x = {}, imageProps: p = {}, src: m = "", alt: i = "", size: e = 30, user: t = null }) => {
14
+ const { className: d = " ", ...g } = x, { className: s = " ", ...v } = p, o = e + "px", n = e * 0.5 + "px", l = e * 0.4 + "px", [j, w] = W(!1), N = () => i ? h(i) : t ? h(t != null && t.first_name || t != null && t.last_name ? ((t == null ? void 0 : t.first_name) || "") + " " + ((t == null ? void 0 : t.last_name) || "") : t == null ? void 0 : t.email) : "#9CA1B6", c = (f) => {
14
15
  try {
15
16
  return f ? (new URL(f), !0) : !1;
16
17
  } catch (C) {
@@ -52,7 +53,7 @@ const V = ({ containerProps: x = {}, imageProps: d = {}, src: m = "", alt: i = "
52
53
  return /* @__PURE__ */ a.jsxs(
53
54
  "div",
54
55
  {
55
- className: "flex items-center justify-center rounded-full overflow-hidden h-full relative " + p,
56
+ className: "flex items-center justify-center rounded-full overflow-hidden h-full relative " + d,
56
57
  style: {
57
58
  maxWidth: o,
58
59
  maxHeight: o,
@@ -96,5 +97,5 @@ const V = ({ containerProps: x = {}, imageProps: d = {}, src: m = "", alt: i = "
96
97
  );
97
98
  };
98
99
  export {
99
- V as default
100
+ $ as default
100
101
  };
@@ -1,6 +1,6 @@
1
1
  import { j as t } from "../../../_virtual/jsx-runtime.js";
2
2
  import { useState as S, useRef as z, useEffect as J } from "react";
3
- import { Controller as K } from "../../../node_modules/react-hook-form/dist/index.esm.js";
3
+ import { Controller as K } from "react-hook-form";
4
4
  import { useFloating as Q, useClick as V, useDismiss as Z, useInteractions as ee, useTransitionStyles as te } from "../../../node_modules/@floating-ui/react/dist/floating-ui.react.js";
5
5
  import { useTheme as D } from "../../../hooks/useTheme.js";
6
6
  import { autoUpdate as oe } from "../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.js";
@@ -2,7 +2,7 @@ import { j as n } from "../../../_virtual/jsx-runtime.js";
2
2
  import { faPlus as k } from "../../../node_modules/@fortawesome/pro-solid-svg-icons/index.js";
3
3
  import { FontAwesomeIcon as R } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
4
4
  import { useState as h, useRef as L, useEffect as C } from "react";
5
- import { useController as N } from "../../../node_modules/react-hook-form/dist/index.esm.js";
5
+ import { useController as N } from "react-hook-form";
6
6
  import z from "../Avatar/Avatar.js";
7
7
  function B(i) {
8
8
  return i !== null && typeof i == "object" && "name" in i && "size" in i && "type" in i && typeof i.name == "string" && typeof i.size == "number" && typeof i.type == "string";
@@ -1,6 +1,6 @@
1
1
  import { j as r } from "../../../_virtual/jsx-runtime.js";
2
2
  import { useState as m } from "react";
3
- import { useController as b } from "../../../node_modules/react-hook-form/dist/index.esm.js";
3
+ import { useController as b } from "react-hook-form";
4
4
  import { FontAwesomeIcon as w } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
5
5
  import { faEye as y, faEyeSlash as j } from "../../../node_modules/@fortawesome/pro-light-svg-icons/index.js";
6
6
  import { useTheme as $ } from "../../../hooks/useTheme.js";
@@ -1,6 +1,6 @@
1
1
  import { j as t } from "../../../_virtual/jsx-runtime.js";
2
2
  import { useState as f, useRef as h, useEffect as A } from "react";
3
- import { useController as xe } from "../../../node_modules/react-hook-form/dist/index.esm.js";
3
+ import { useController as xe } from "react-hook-form";
4
4
  import { useFloating as be, useClick as we, useDismiss as Ce, useInteractions as ve, useTransitionStyles as je } from "../../../node_modules/@floating-ui/react/dist/floating-ui.react.js";
5
5
  import { FontAwesomeIcon as Ne } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
6
6
  import { faChevronDown as ye } from "../../../node_modules/@fortawesome/pro-regular-svg-icons/index.js";
@@ -1,7 +1,7 @@
1
1
  import { j as e } from "../../../_virtual/jsx-runtime.js";
2
2
  import { useFloating as B, useClick as H, useDismiss as U, useInteractions as W, useTransitionStyles as Y } from "../../../node_modules/@floating-ui/react/dist/floating-ui.react.js";
3
3
  import { useState as b, useRef as k, useEffect as q } from "react";
4
- import { Controller as G } from "../../../node_modules/react-hook-form/dist/index.esm.js";
4
+ import { Controller as G } from "react-hook-form";
5
5
  import { useTheme as J } from "../../../hooks/useTheme.js";
6
6
  import { autoUpdate as K } from "../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.js";
7
7
  import { offset as Q, flip as V, shift as X, size as Z, arrow as _ } from "../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js";
@@ -1,13 +1,13 @@
1
- import { j as e } from "../../../_virtual/jsx-runtime.js";
2
- import { useController as y } from "../../../node_modules/react-hook-form/dist/index.esm.js";
1
+ import { j as r } from "../../../_virtual/jsx-runtime.js";
2
+ import { useController as j } from "react-hook-form";
3
3
  import { useTheme as w } from "../../../hooks/useTheme.js";
4
4
  const C = ({
5
5
  label: u,
6
6
  control: d,
7
- name: t,
7
+ name: e,
8
8
  placeholder: c,
9
9
  className: g = "",
10
- disabled: l = !1,
10
+ disabled: t = !1,
11
11
  leftSide: a,
12
12
  rightSide: s,
13
13
  translateKey: i = "",
@@ -15,39 +15,37 @@ const C = ({
15
15
  }) => {
16
16
  const {
17
17
  field: { value: n = "", onChange: f, ref: p, onBlur: b },
18
- fieldState: { error: r }
19
- } = y({ name: t, control: d }), { t: o } = w();
20
- if (!o) return /* @__PURE__ */ e.jsx(e.Fragment, {});
21
- const h = o(t), m = o(i);
22
- return /* @__PURE__ */ e.jsxs(
18
+ fieldState: { error: l }
19
+ } = j({ name: e, control: d }), { t: o } = w(), h = o(e), m = o(i);
20
+ return /* @__PURE__ */ r.jsxs(
23
21
  "label",
24
22
  {
25
- className: `flex flex-col group gap-8 select-none ${l && "cursor-not-allowed"} ${g}`,
26
- htmlFor: t,
23
+ className: `flex flex-col group gap-8 select-none ${t && "cursor-not-allowed"} ${g}`,
24
+ htmlFor: e,
27
25
  children: [
28
- /* @__PURE__ */ e.jsx(
26
+ /* @__PURE__ */ r.jsx(
29
27
  "h6",
30
28
  {
31
- className: `text-gray-600 font-600 group ${r && "text-red-500!"} text-label ${l && "text-gray-300"}`,
29
+ className: `text-gray-600 font-600 group ${l && "text-red-500!"} text-label ${t && "text-gray-300"}`,
32
30
  children: u
33
31
  }
34
32
  ),
35
- /* @__PURE__ */ e.jsxs(
33
+ /* @__PURE__ */ r.jsxs(
36
34
  "label",
37
35
  {
38
- htmlFor: t,
36
+ htmlFor: e,
39
37
  className: `
40
38
  flex items-center justify-between gap-8 p-16
41
39
 
42
- ${r && "border-red-500!"}
40
+ ${l && "border-red-500!"}
43
41
 
44
42
  bg-light
45
43
 
46
44
  w-full h-full rounded-full border
47
45
 
48
- ${n && !l ? "border-blue-200" : "border-blue-100"}
49
- ${!l && "group-hover:border-blue-300"}
50
- ${l && "cursor-not-allowed"}
46
+ ${n && !t ? "border-blue-200" : "border-blue-100"}
47
+ ${!t && "group-hover:border-blue-300"}
48
+ ${t && "cursor-not-allowed"}
51
49
 
52
50
  group-focus-within:border-blue-500 transition-colors duration-200 ease-in-out
53
51
 
@@ -55,15 +53,15 @@ const C = ({
55
53
  `,
56
54
  children: [
57
55
  a && a,
58
- /* @__PURE__ */ e.jsx(
56
+ /* @__PURE__ */ r.jsx(
59
57
  "input",
60
58
  {
61
- id: t,
62
- name: t,
63
- disabled: l,
59
+ id: e,
60
+ name: e,
61
+ disabled: t,
64
62
  placeholder: c,
65
63
  value: n,
66
- onChange: (j) => f(j.target.value),
64
+ onChange: (y) => f(y.target.value),
67
65
  onBlur: b,
68
66
  ref: p,
69
67
  className: "group bg-transparent w-full h-full font-600 placeholder:font-600 text-body-m disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-hidden",
@@ -74,7 +72,7 @@ const C = ({
74
72
  ]
75
73
  }
76
74
  ),
77
- /* @__PURE__ */ e.jsx("h4", { className: "font-500 text-label text-red-500 leading-none", children: (r == null ? void 0 : r.message) && o(r.message, { x: m || h }) })
75
+ /* @__PURE__ */ r.jsx("h4", { className: "font-500 text-label text-red-500 leading-none", children: (l == null ? void 0 : l.message) && o(l.message, { x: m || h }) })
78
76
  ]
79
77
  }
80
78
  );
@@ -5,10 +5,11 @@ import { useTheme as B } from "../../../hooks/useTheme.js";
5
5
  import { translateBytes as F } from "../../../utils/files.js";
6
6
  import "../../../_virtual/lodash.js";
7
7
  import "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
8
+ import "react-hook-form";
8
9
  import "../ImageProfileInput/ImageProfileInput.validators.js";
9
10
  import "../../../constants/countries.js";
10
11
  import "react-dom";
11
- const q = ({
12
+ const z = ({
12
13
  title: h = "drag_and_drop_your_files_here",
13
14
  subtitle: d = null,
14
15
  buttonTitle: v = "choose_files",
@@ -112,5 +113,5 @@ const q = ({
112
113
  ] });
113
114
  };
114
115
  export {
115
- q as default
116
+ z as default
116
117
  };
@@ -4,6 +4,7 @@ import { FontAwesomeIcon as y } from "../../../node_modules/@fortawesome/react-f
4
4
  import "react";
5
5
  import "../../../_virtual/lodash.js";
6
6
  import { useTheme as j } from "../../../hooks/useTheme.js";
7
+ import "react-hook-form";
7
8
  import g from "../../atoms/BoxContainer/BoxContainer.js";
8
9
  import "react-dom";
9
10
  import a from "../../atoms/Button/Button.js";
@@ -11,7 +12,7 @@ import "../../atoms/ImageProfileInput/ImageProfileInput.validators.js";
11
12
  import "../../../constants/countries.js";
12
13
  import { AnimatePresence as u } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/index.js";
13
14
  import { motion as n } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/render/components/motion/proxy.js";
14
- const I = ({
15
+ const M = ({
15
16
  title: s,
16
17
  description: r,
17
18
  open: o,
@@ -108,5 +109,5 @@ const I = ({
108
109
  ) }) });
109
110
  };
110
111
  export {
111
- I as default
112
+ M as default
112
113
  };
@@ -9,6 +9,7 @@ import k from "../FloatingMenu/FloatingMenu.js";
9
9
  import Z from "./PeriodToggle.js";
10
10
  import ee from "./TimeDisplay.js";
11
11
  import { faChevronDown as te } from "../../../node_modules/@fortawesome/pro-regular-svg-icons/index.js";
12
+ import "react-hook-form";
12
13
  import "react-dom";
13
14
  import P from "../../atoms/IconButton/IconButton.js";
14
15
  import "../../atoms/ImageProfileInput/ImageProfileInput.validators.js";
@@ -30,7 +31,7 @@ import { setMinutes as H } from "../../../node_modules/date-fns/setMinutes.js";
30
31
  import { setSeconds as T } from "../../../node_modules/date-fns/setSeconds.js";
31
32
  import { formatDate as m } from "../../../node_modules/date-fns/format.js";
32
33
  import { es as j } from "../../../node_modules/date-fns/locale/es.js";
33
- const qe = ({
34
+ const ze = ({
34
35
  date: a,
35
36
  onDateChange: C,
36
37
  showTimeSelector: $ = !0,
@@ -276,5 +277,5 @@ const qe = ({
276
277
  ] });
277
278
  };
278
279
  export {
279
- qe as default
280
+ ze as default
280
281
  };
@@ -1,6 +1,6 @@
1
1
  import { j as t } from "../../../_virtual/jsx-runtime.js";
2
2
  import { useState as x } from "react";
3
- import { useController as C } from "../../../node_modules/react-hook-form/dist/index.esm.js";
3
+ import { useController as C } from "react-hook-form";
4
4
  import g from "../CalendarSelector/CalendarSelector.js";
5
5
  import h from "../../atoms/UncontrolledTextInput/UncontrolledTextInput.js";
6
6
  import j from "../FloatingMenu/FloatingMenu.js";
@@ -4,6 +4,7 @@ import { FontAwesomeIcon as t } from "../../../node_modules/@fortawesome/react-f
4
4
  import "react";
5
5
  import "../../../_virtual/lodash.js";
6
6
  import "../../../contexts/themeContext.js";
7
+ import "react-hook-form";
7
8
  import y from "../../atoms/BoxContainer/BoxContainer.js";
8
9
  import "react-dom";
9
10
  import a from "../../atoms/Button/Button.js";
@@ -11,7 +12,7 @@ import "../../atoms/ImageProfileInput/ImageProfileInput.validators.js";
11
12
  import "../../../constants/countries.js";
12
13
  import { AnimatePresence as u } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/index.js";
13
14
  import { motion as s } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/render/components/motion/proxy.js";
14
- const D = ({
15
+ const E = ({
15
16
  title: n,
16
17
  description: l,
17
18
  open: r,
@@ -121,5 +122,5 @@ const D = ({
121
122
  ) }) });
122
123
  };
123
124
  export {
124
- D as default
125
+ E as default
125
126
  };
@@ -4,20 +4,21 @@ import { useState as k, useEffect as w } 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
+ import "react-hook-form";
7
8
  import P from "../../atoms/BoxContainer/BoxContainer.js";
8
9
  import "react-dom";
9
10
  import "../../atoms/ImageProfileInput/ImageProfileInput.validators.js";
10
11
  import "../../../constants/countries.js";
11
12
  import { autoUpdate as z } from "../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.js";
12
13
  import { offset as B, flip as D, shift as T } from "../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js";
13
- const W = ({
14
+ const X = ({
14
15
  open: e,
15
16
  onClose: s,
16
17
  component: i,
17
18
  children: a,
18
19
  placement: l = "bottom",
19
- className: f = "",
20
- strategy: m = "absolute",
20
+ className: m = "",
21
+ strategy: f = "absolute",
21
22
  offset: p = 8,
22
23
  padding: c = 8
23
24
  }) => {
@@ -28,7 +29,7 @@ const W = ({
28
29
  const u = () => {
29
30
  r(!1), s == null || s();
30
31
  }, { x: g, y: x, strategy: y, refs: n, context: o } = N({
31
- strategy: m,
32
+ strategy: f,
32
33
  open: d,
33
34
  onOpenChange: (M) => {
34
35
  M || u();
@@ -72,11 +73,11 @@ const W = ({
72
73
  },
73
74
  ...F(),
74
75
  className: "floating-element",
75
- children: /* @__PURE__ */ t.jsx(P, { className: f, children: typeof i == "function" ? i() : i })
76
+ children: /* @__PURE__ */ t.jsx(P, { className: m, children: typeof i == "function" ? i() : i })
76
77
  }
77
78
  )
78
79
  ] });
79
80
  };
80
81
  export {
81
- W as default
82
+ X as default
82
83
  };
@@ -3,12 +3,13 @@ import { useRef as m, useState as E, useEffect as u } from "react";
3
3
  import "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
4
4
  import "../../../_virtual/lodash.js";
5
5
  import { useTheme as S } from "../../../hooks/useTheme.js";
6
+ import "react-hook-form";
6
7
  import "react-dom";
7
8
  import "../../atoms/ImageProfileInput/ImageProfileInput.validators.js";
8
9
  import L from "../../atoms/Tab/Tab.js";
9
10
  import "../../../constants/countries.js";
10
11
  import { motion as a } from "../../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
11
- const A = ({
12
+ const D = ({
12
13
  variant: p = "underline",
13
14
  color: h = "blue",
14
15
  tabs: i,
@@ -89,5 +90,5 @@ const A = ({
89
90
  );
90
91
  };
91
92
  export {
92
- A as default
93
+ D as default
93
94
  };