lawgic-dev-kit 0.23.2 → 0.23.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,24 +1,24 @@
1
- import { j as o } from "../../../_virtual/jsx-runtime.js";
1
+ import { j as l } from "../../../_virtual/jsx-runtime.js";
2
2
  import { useController as w } from "react-hook-form";
3
3
  import { useTheme as v } from "../../../hooks/useTheme.js";
4
4
  import "react";
5
5
  const S = ({
6
- label: c,
6
+ label: a,
7
7
  control: x,
8
8
  name: e,
9
9
  placeholder: d,
10
10
  className: i = "",
11
11
  disabled: t = !1,
12
- leftSide: a,
13
- rightSide: n,
12
+ leftSide: n,
13
+ rightSide: u,
14
14
  translateKey: p = "",
15
15
  size: g = "md",
16
16
  ...m
17
17
  }) => {
18
18
  const {
19
- field: { value: u = "", onChange: b, ref: f, onBlur: h },
19
+ field: { value: c = "", onChange: f, ref: b, onBlur: h },
20
20
  fieldState: { error: r }
21
- } = w({ name: e, control: x }), { t: s } = v(), l = {
21
+ } = w({ name: e, control: x }), { t: s } = v(), o = {
22
22
  sm: {
23
23
  container: "px-16 py-8",
24
24
  text: "text-sm",
@@ -34,25 +34,25 @@ const S = ({
34
34
  gap: "gap-8"
35
35
  }
36
36
  }[g], $ = s(e), y = s(p);
37
- return /* @__PURE__ */ o.jsxs(
37
+ return /* @__PURE__ */ l.jsxs(
38
38
  "label",
39
39
  {
40
- className: `flex flex-col group select-none ${l.gap} ${t && "cursor-not-allowed"} ${i}`,
40
+ className: `flex flex-col group select-none ${o.gap} ${t && "cursor-not-allowed"} ${i}`,
41
41
  htmlFor: e,
42
42
  children: [
43
- /* @__PURE__ */ o.jsx(
43
+ a && /* @__PURE__ */ l.jsx(
44
44
  "h6",
45
45
  {
46
- className: `text-gray-600 font-600 leading-none group ${r && "text-red-500!"} ${l.label} ${t && "text-gray-300"}`,
47
- children: c
46
+ className: `text-gray-600 font-600 leading-none group ${r && "text-red-500!"} ${o.label} ${t && "text-gray-300"}`,
47
+ children: a
48
48
  }
49
49
  ),
50
- /* @__PURE__ */ o.jsxs(
50
+ /* @__PURE__ */ l.jsxs(
51
51
  "label",
52
52
  {
53
53
  htmlFor: e,
54
54
  className: `
55
- flex items-center justify-between gap-8 ${l.container}
55
+ flex items-center justify-between gap-8 ${o.container}
56
56
 
57
57
  ${r && "border-red-500!"}
58
58
 
@@ -60,7 +60,7 @@ const S = ({
60
60
 
61
61
  rounded-full border
62
62
 
63
- ${u && !t ? "border-blue-200" : "border-blue-100"}
63
+ ${c && !t ? "border-blue-200" : "border-blue-100"}
64
64
  ${!t && "group-hover:border-blue-300"}
65
65
  ${t && "cursor-not-allowed"}
66
66
 
@@ -69,27 +69,27 @@ const S = ({
69
69
  group-disabled:bg-gray-500
70
70
  `,
71
71
  children: [
72
- a && a,
73
- /* @__PURE__ */ o.jsx(
72
+ n && n,
73
+ /* @__PURE__ */ l.jsx(
74
74
  "input",
75
75
  {
76
76
  id: e,
77
77
  name: e,
78
78
  disabled: t,
79
79
  placeholder: d,
80
- value: u,
81
- onChange: (j) => b(j.target.value),
80
+ value: c,
81
+ onChange: (j) => f(j.target.value),
82
82
  onBlur: h,
83
- ref: f,
84
- className: `group bg-transparent w-full h-full font-600 placeholder:font-600 select-text ${l.text} disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-hidden`,
83
+ ref: b,
84
+ className: `group bg-transparent w-full h-full font-600 placeholder:font-600 select-text ${o.text} disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-hidden`,
85
85
  ...m
86
86
  }
87
87
  ),
88
- n && n
88
+ u && u
89
89
  ]
90
90
  }
91
91
  ),
92
- (r == null ? void 0 : r.message) && /* @__PURE__ */ o.jsx("h4", { className: `font-500 text-red-500 leading-none ${l.error}`, children: s(r.message, { x: y || $ }) })
92
+ (r == null ? void 0 : r.message) && /* @__PURE__ */ l.jsx("h4", { className: `font-500 text-red-500 leading-none ${o.error}`, children: s(r.message, { x: y || $ }) })
93
93
  ]
94
94
  }
95
95
  );
@@ -1,5 +1,5 @@
1
1
  import { j as e } from "../../../_virtual/jsx-runtime.js";
2
- import { faXmark as b, faCircleInfo as s, faBell as g, faTriangleExclamation as h, faCircleCheck as y } from "../../../node_modules/@fortawesome/pro-regular-svg-icons/index.js";
2
+ import { faXmark as b, faCircleInfo as s, faTriangleExclamation as g, faHexagonXmark as h, faCircleCheck as y } from "../../../node_modules/@fortawesome/pro-regular-svg-icons/index.js";
3
3
  import { FontAwesomeIcon as x } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
4
4
  import { useState as j, useEffect as f } from "react";
5
5
  import { AnimatePresence as k } from "../../../node_modules/framer-motion/dist/es/components/AnimatePresence/index.js";
@@ -21,13 +21,13 @@ const N = 500, B = ({
21
21
  i = "text-red-500", t = "bg-red-100", a = h;
22
22
  break;
23
23
  case "warning":
24
- i = "text-yellow-500", t = "bg-yellow-100", a = s;
24
+ i = "text-yellow-500", t = "bg-yellow-100", a = g;
25
25
  break;
26
26
  case "loading":
27
- i = "text-gray-500", t = "bg-gray-100", a = s;
27
+ i = "text-blue-500", t = "bg-blue-100", a = s;
28
28
  break;
29
29
  case "notification":
30
- i = "text-blue-500", t = "bg-blue-100", a = g;
30
+ i = "text-blue-500", t = "bg-blue-100", a = s;
31
31
  break;
32
32
  default:
33
33
  i = "text-blue-500", t = "bg-blue-100", a = s;
@@ -93,7 +93,7 @@ const N = 500, B = ({
93
93
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-12", children: [
94
94
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-12", children: [
95
95
  /* @__PURE__ */ e.jsx(x, { icon: a, className: `text-[20px] p-6 rounded-full self-start ${i} ${t}` }),
96
- /* @__PURE__ */ e.jsx("h5", { className: "text-lg font-bold text-blue-900 self-center", children: r.title })
96
+ /* @__PURE__ */ e.jsx("h5", { className: "text-lg font-semibold text-blue-900 self-center", children: r.title })
97
97
  ] }),
98
98
  r.description && /* @__PURE__ */ e.jsx("span", { className: "text-md text-gray-500 leading-[16px]", children: r.description })
99
99
  ] })
@@ -2,21 +2,21 @@ import { j as o } from "../../../_virtual/jsx-runtime.js";
2
2
  import { useTheme as h } from "../../../hooks/useTheme.js";
3
3
  import "react";
4
4
  const w = ({
5
- label: u,
5
+ label: n,
6
6
  onChange: p,
7
- value: n,
7
+ value: s,
8
8
  name: t,
9
9
  error: l,
10
10
  placeholder: i,
11
11
  className: g = "",
12
12
  disabled: e = !1,
13
- disabledInput: s = !1,
13
+ disabledInput: a = !1,
14
14
  size: d = "md",
15
- leftSide: a,
16
- rightSide: c,
15
+ leftSide: c,
16
+ rightSide: x,
17
17
  ...b
18
18
  }) => {
19
- const { t: x } = h(), r = {
19
+ const { t: u } = h(), r = {
20
20
  sm: {
21
21
  container: "px-16 py-8",
22
22
  text: "text-sm",
@@ -38,11 +38,11 @@ const w = ({
38
38
  className: `flex flex-col group select-none ${r.gap} ${e && "cursor-not-allowed"} ${g}`,
39
39
  htmlFor: t,
40
40
  children: [
41
- /* @__PURE__ */ o.jsx(
41
+ n && /* @__PURE__ */ o.jsx(
42
42
  "h6",
43
43
  {
44
44
  className: `text-gray-600 font-600 leading-none group ${l && "!text-red-500"} ${r.label} ${e && "text-gray-300"}`,
45
- children: u
45
+ children: n
46
46
  }
47
47
  ),
48
48
  /* @__PURE__ */ o.jsxs(
@@ -52,16 +52,16 @@ const w = ({
52
52
  className: `
53
53
  flex items-center justify-between gap-8 bg-light
54
54
  ${r.container} ${l && "!border-red-500"} rounded-full border
55
- ${n && !e ? "border-blue-200" : "border-blue-100"}
55
+ ${s && !e ? "border-blue-200" : "border-blue-100"}
56
56
  ${!e && "group-hover:border-blue-300"}
57
57
  ${e && "cursor-not-allowed"}
58
58
 
59
59
  group-focus-within:border-blue-500 transition-colors duration-200 ease-in-out
60
- ${s && "hover:!cursor-pointer"}
60
+ ${a && "hover:!cursor-pointer"}
61
61
  group-disabled:bg-gray-500
62
62
  `,
63
63
  children: [
64
- a && a,
64
+ c && c,
65
65
  /* @__PURE__ */ o.jsx(
66
66
  "input",
67
67
  {
@@ -70,18 +70,18 @@ const w = ({
70
70
  name: t,
71
71
  disabled: e,
72
72
  placeholder: i,
73
- value: n,
73
+ value: s,
74
74
  onChange: (f) => {
75
75
  p(f.target.value);
76
76
  },
77
- className: `group bg-transparent w-full h-full font-600 placeholder:font-600 select-text ${r.text} disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-none ${s && "pointer-events-none !select-none !caret-transparent"}`
77
+ className: `group bg-transparent w-full h-full font-600 placeholder:font-600 select-text ${r.text} disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-none ${a && "pointer-events-none !select-none !caret-transparent"}`
78
78
  }
79
79
  ),
80
- c && c
80
+ x && x
81
81
  ]
82
82
  }
83
83
  ),
84
- l && /* @__PURE__ */ o.jsx("h4", { className: `font-500 text-red-500 leading-none ${r.error}`, children: x(l, { x: x(t) }) })
84
+ l && /* @__PURE__ */ o.jsx("h4", { className: `font-500 text-red-500 leading-none ${r.error}`, children: u(l, { x: u(t) }) })
85
85
  ]
86
86
  }
87
87
  );