lawgic-dev-kit 0.11.2 → 0.11.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.
@@ -1,4 +1,4 @@
1
- var e = { exports: {} };
1
+ var p = { exports: {} };
2
2
  export {
3
- e as __module
3
+ p as __module
4
4
  };
@@ -1,4 +1,4 @@
1
- var p = { exports: {} };
1
+ var e = { exports: {} };
2
2
  export {
3
- p as __module
3
+ e 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
  };
@@ -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,10 +1,13 @@
1
1
  import { IconProp } from '@fortawesome/fontawesome-svg-core';
2
- declare const SidebarButton: ({ active, icon, label, onClick, expanded, disabled, }: {
2
+ import { Color } from '../../../types/styleValues';
3
+ interface SidebarButtonProps {
3
4
  active: boolean;
4
5
  icon: IconProp;
5
6
  label: string;
6
7
  onClick: () => void;
7
8
  expanded: boolean;
8
9
  disabled?: boolean;
9
- }) => import("react/jsx-runtime").JSX.Element;
10
+ color?: Color;
11
+ }
12
+ declare const SidebarButton: React.FC<SidebarButtonProps>;
10
13
  export default SidebarButton;
@@ -1,49 +1,62 @@
1
- import { j as o } from "../../../_virtual/jsx-runtime.js";
2
- import { FontAwesomeIcon as i } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
3
- const p = ({
4
- active: t,
5
- icon: r,
6
- label: l,
7
- onClick: a,
1
+ import { j as t } from "../../../_virtual/jsx-runtime.js";
2
+ import { FontAwesomeIcon as f } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
3
+ import { resolveSidebarButtonColors as d } from "./SidebarButton.styles.js";
4
+ import { useTheme as h } from "../../../hooks/useTheme.js";
5
+ const y = ({
6
+ active: o,
7
+ icon: l,
8
+ label: n,
9
+ onClick: s,
8
10
  expanded: e,
9
- disabled: n = !1
10
- }) => /* @__PURE__ */ o.jsxs(
11
- "div",
12
- {
13
- onClick: () => a(),
14
- className: `
11
+ disabled: r = !1,
12
+ color: i
13
+ }) => {
14
+ const { defaultColorScheme: c } = h(), m = i || c, {
15
+ activeTextColor: a,
16
+ activeBgColor: p,
17
+ hoverBgColor: u,
18
+ activeIconColor: x
19
+ } = d(m);
20
+ return /* @__PURE__ */ t.jsxs(
21
+ "div",
22
+ {
23
+ onClick: () => !r && s(),
24
+ className: `
15
25
  flex items-center rounded-full text-gray transition-all duration-150 h-[40px] w-full px-[12.3px]
16
- ${!e && "w-fit"} hover:bg-[#ECF1FD] ${n ? "cursor-not-allowed opacity-50" : "cursor-pointer"} ${t ? "text-[#4570EB] bg-[#ECF1FD]" : "bg-transparent"}`,
17
- children: [
18
- /* @__PURE__ */ o.jsx(
19
- i,
20
- {
21
- icon: r,
22
- color: t ? "#4570EB" : "#00000",
23
- style: {
24
- height: "16px"
26
+ ${!e && "w-fit"}
27
+ ${r ? "cursor-not-allowed opacity-50" : `cursor-pointer ${u}`}
28
+ ${o ? `${a} ${p}` : "bg-transparent"}`,
29
+ children: [
30
+ /* @__PURE__ */ t.jsx(
31
+ f,
32
+ {
33
+ icon: l,
34
+ className: o ? x : "text-gray-900",
35
+ style: {
36
+ height: "16px"
37
+ }
25
38
  }
26
- }
27
- ),
28
- /* @__PURE__ */ o.jsx(
29
- "h4",
30
- {
31
- className: `
39
+ ),
40
+ /* @__PURE__ */ t.jsx(
41
+ "h4",
42
+ {
43
+ className: `
32
44
  text-md
33
45
  leading-none
34
- font-600
35
- w-[0px]
36
- text-nowrap
37
- transition-all duration-100 ease-in-out
38
- opacity-0 capitalize
39
- ${e && "translate-x-0 opacity-100 !w-full !h-auto ml-8"}
40
- ${t && "text-lightblue"} `,
41
- children: l
42
- }
43
- )
44
- ]
45
- }
46
- );
46
+ font-600
47
+ w-[0px]
48
+ text-nowrap
49
+ transition-all duration-100 ease-in-out
50
+ opacity-0 capitalize
51
+ ${e && "translate-x-0 opacity-100 !w-full !h-auto ml-8"}
52
+ ${o && a}`,
53
+ children: n
54
+ }
55
+ )
56
+ ]
57
+ }
58
+ );
59
+ };
47
60
  export {
48
- p as default
61
+ y as default
49
62
  };
@@ -0,0 +1,9 @@
1
+ import { Color } from '../../../types/styleValues';
2
+ interface SidebarButtonColorConfig {
3
+ activeTextColor: string;
4
+ activeBgColor: string;
5
+ hoverBgColor: string;
6
+ activeIconColor: string;
7
+ }
8
+ export declare const resolveSidebarButtonColors: (color: Color) => SidebarButtonColorConfig;
9
+ export {};
@@ -0,0 +1,22 @@
1
+ const e = {
2
+ activeTextColor: "text-blue-500",
3
+ activeBgColor: "bg-blue-100",
4
+ hoverBgColor: "hover:bg-blue-100",
5
+ activeIconColor: "text-blue-500"
6
+ }, t = {
7
+ activeTextColor: "text-aqua-500",
8
+ activeBgColor: "bg-aqua-100",
9
+ hoverBgColor: "hover:bg-aqua-100",
10
+ activeIconColor: "text-aqua-500"
11
+ }, a = (o) => {
12
+ switch (o) {
13
+ case "aqua":
14
+ return t;
15
+ case "blue":
16
+ default:
17
+ return e;
18
+ }
19
+ };
20
+ export {
21
+ a as resolveSidebarButtonColors
22
+ };
@@ -1,43 +1,50 @@
1
1
  import { j as e } from "../../../_virtual/jsx-runtime.js";
2
- import { faCheck as h, faClockSix as g } from "../../../node_modules/@fortawesome/pro-light-svg-icons/index.js";
3
- import { FontAwesomeIcon as p } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
4
- import { useState as u, useEffect as F } from "react";
5
- import { useTheme as y } from "../../../hooks/useTheme.js";
6
- import { motion as c } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/render/components/motion/proxy.js";
7
- import { AnimatePresence as v } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/index.js";
8
- const k = ({
2
+ import { faCheck as S, faClockSix as k } from "../../../node_modules/@fortawesome/pro-light-svg-icons/index.js";
3
+ import { FontAwesomeIcon as h } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
4
+ import { useState as y, useEffect as W } from "react";
5
+ import { useTheme as v } from "../../../hooks/useTheme.js";
6
+ import { resolveStepperColors as C } from "./Stepper.styles.js";
7
+ import { motion as d } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/render/components/motion/proxy.js";
8
+ import { AnimatePresence as I } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/index.js";
9
+ const D = ({
9
10
  status: n,
10
- label: m,
11
- shouldAnimate: t
11
+ label: u,
12
+ shouldAnimate: t,
13
+ color: b
12
14
  }) => {
13
- const { t: d } = y(), i = n === "done", a = n === "focus";
15
+ const { t: m } = v(), o = n === "done", r = n === "focus", {
16
+ completedBgColor: p,
17
+ focusBorderColor: c,
18
+ pendingBorderColor: s,
19
+ iconActiveColor: f
20
+ } = C(b);
14
21
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-8 h-fit", children: [
15
22
  /* @__PURE__ */ e.jsx(
16
- c.div,
23
+ d.div,
17
24
  {
18
25
  initial: t ? !1 : {
19
- backgroundColor: i ? "#DDF6F5" : "white",
20
- borderWidth: a ? "1px" : "0px",
21
- borderColor: a ? "#4570EB" : "#ABACAF70"
26
+ backgroundColor: o ? p : "white",
27
+ borderWidth: r ? "1px" : "0px",
28
+ borderColor: r ? c : s
22
29
  },
23
30
  animate: {
24
- backgroundColor: i ? "#DDF6F5" : "white",
25
- borderWidth: a || !i ? "1px" : "0px",
26
- borderColor: a ? "#4570EB" : "#ABACAF70"
31
+ backgroundColor: o ? p : "white",
32
+ borderWidth: r || !o ? "1px" : "0px",
33
+ borderColor: r ? c : s
27
34
  },
28
35
  transition: { duration: t ? 0.3 : 0, ease: "easeOut" },
29
36
  className: "min-w-28 min-h-28 rounded-full flex items-center justify-center text-xl font-bold border-[1px]",
30
37
  children: /* @__PURE__ */ e.jsx(
31
- c.div,
38
+ d.div,
32
39
  {
33
- initial: t ? !1 : { color: i ? "rgb(34, 197, 94)" : "rgb(209, 213, 219)" },
40
+ initial: t ? !1 : { color: o ? "rgb(34, 197, 94)" : "rgb(209, 213, 219)" },
34
41
  animate: {
35
- color: i || a ? "rgb(34, 197, 94)" : "rgb(209, 213, 219)"
42
+ color: o || r ? "rgb(34, 197, 94)" : "rgb(209, 213, 219)"
36
43
  },
37
44
  transition: { duration: t ? 0.2 : 0 },
38
45
  className: "flex items-center justify-center",
39
- children: /* @__PURE__ */ e.jsx(v, { mode: "wait", children: i || a ? /* @__PURE__ */ e.jsx(
40
- c.div,
46
+ children: /* @__PURE__ */ e.jsx(I, { mode: "wait", children: o || r ? /* @__PURE__ */ e.jsx(
47
+ d.div,
41
48
  {
42
49
  initial: t ? { opacity: 0, scale: 0.8, rotate: -180 } : { opacity: 1, scale: 1, rotate: 0 },
43
50
  animate: { opacity: 1, scale: 1, rotate: 0 },
@@ -45,16 +52,16 @@ const k = ({
45
52
  transition: { duration: t ? 0.3 : 0 },
46
53
  className: "flex items-center justify-center",
47
54
  children: /* @__PURE__ */ e.jsx(
48
- p,
55
+ h,
49
56
  {
50
- icon: h,
51
- className: "w-14 h-14 min-w-14 min-h-14 text-blue-500"
57
+ icon: S,
58
+ className: `w-14 h-14 min-w-14 min-h-14 ${f}`
52
59
  }
53
60
  )
54
61
  },
55
62
  "check"
56
63
  ) : /* @__PURE__ */ e.jsx(
57
- c.div,
64
+ d.div,
58
65
  {
59
66
  initial: t ? { opacity: 0, scale: 0.8, rotate: -180 } : { opacity: 1, scale: 1, rotate: 0 },
60
67
  animate: { opacity: 1, scale: 1, rotate: 0 },
@@ -62,9 +69,9 @@ const k = ({
62
69
  transition: { duration: t ? 0.3 : 0 },
63
70
  className: "flex items-center justify-center",
64
71
  children: /* @__PURE__ */ e.jsx(
65
- p,
72
+ h,
66
73
  {
67
- icon: g,
74
+ icon: k,
68
75
  className: "w-14 h-14 min-w-14 min-h-14"
69
76
  }
70
77
  )
@@ -78,46 +85,52 @@ const k = ({
78
85
  /* @__PURE__ */ e.jsx(
79
86
  "span",
80
87
  {
81
- className: `text-body-s font-medium transition-all duration-300 text-center w-full ${i ? "text-black" : "text-gray-400"}`,
82
- children: d(m)
88
+ className: `text-body-s font-medium transition-all duration-300 text-center w-full ${o ? "text-black" : "text-gray-400"}`,
89
+ children: m(u)
83
90
  }
84
91
  )
85
92
  ] });
86
- }, B = ({
93
+ }, E = ({
87
94
  status: n,
88
- label: m,
89
- shouldAnimate: t
95
+ label: u,
96
+ shouldAnimate: t,
97
+ color: b
90
98
  }) => {
91
- const { t: d } = y(), i = n === "done", a = n === "focus";
99
+ const { t: m } = v(), o = n === "done", r = n === "focus", {
100
+ completedBgColor: p,
101
+ focusBorderColor: c,
102
+ pendingBorderColor: s,
103
+ iconActiveColor: f
104
+ } = C(b);
92
105
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-8 h-fit", children: [
93
106
  /* @__PURE__ */ e.jsx(
94
- c.div,
107
+ d.div,
95
108
  {
96
109
  initial: t ? !1 : {
97
- backgroundColor: i ? "#DDF6F5" : "white",
98
- borderWidth: a || !i ? "1px" : "0px",
99
- borderColor: a ? "#4570EB" : "#ABACAF70"
110
+ backgroundColor: o ? p : "white",
111
+ borderWidth: r || !o ? "1px" : "0px",
112
+ borderColor: r ? c : s
100
113
  },
101
114
  animate: {
102
- backgroundColor: i ? "#C7D8FF" : "white",
103
- borderWidth: a || !i ? "1px" : "0px",
104
- borderColor: a ? "#4570EB" : "#ABACAF70"
115
+ backgroundColor: o ? p : "white",
116
+ borderWidth: r || !o ? "1px" : "0px",
117
+ borderColor: r ? c : s
105
118
  },
106
119
  transition: { duration: t ? 0.3 : 0, ease: "easeOut" },
107
120
  className: "min-w-24 min-h-24 rounded-full flex items-center justify-center text-xs font-bold z-10",
108
121
  children: /* @__PURE__ */ e.jsx(
109
- c.div,
122
+ d.div,
110
123
  {
111
124
  initial: t ? !1 : {
112
- color: a || i ? "rgb(34, 197, 94)" : "rgb(209, 213, 219)"
125
+ color: r || o ? "rgb(34, 197, 94)" : "rgb(209, 213, 219)"
113
126
  },
114
127
  animate: {
115
- color: a || i ? "rgb(34, 197, 94)" : "rgb(209, 213, 219)"
128
+ color: r || o ? "rgb(34, 197, 94)" : "rgb(209, 213, 219)"
116
129
  },
117
130
  transition: { duration: t ? 0.2 : 0 },
118
131
  className: "flex items-center justify-center",
119
- children: /* @__PURE__ */ e.jsx(v, { mode: "wait", children: i || a ? /* @__PURE__ */ e.jsx(
120
- c.div,
132
+ children: /* @__PURE__ */ e.jsx(I, { mode: "wait", children: o || r ? /* @__PURE__ */ e.jsx(
133
+ d.div,
121
134
  {
122
135
  initial: t ? { opacity: 0, scale: 0.8, rotate: -180 } : { opacity: 1, scale: 1, rotate: 0 },
123
136
  animate: { opacity: 1, scale: 1, rotate: 0 },
@@ -125,16 +138,16 @@ const k = ({
125
138
  transition: { duration: t ? 0.3 : 0 },
126
139
  className: "flex items-center justify-center",
127
140
  children: /* @__PURE__ */ e.jsx(
128
- p,
141
+ h,
129
142
  {
130
- icon: h,
131
- className: "w-14 h-14 min-w-14 min-h-14 text-blue-500"
143
+ icon: S,
144
+ className: `w-14 h-14 min-w-14 min-h-14 ${f}`
132
145
  }
133
146
  )
134
147
  },
135
148
  "check"
136
149
  ) : /* @__PURE__ */ e.jsx(
137
- c.div,
150
+ d.div,
138
151
  {
139
152
  initial: t ? { opacity: 0, scale: 0.8, rotate: -180 } : { opacity: 1, scale: 1, rotate: 0 },
140
153
  animate: { opacity: 1, scale: 1, rotate: 0 },
@@ -142,9 +155,9 @@ const k = ({
142
155
  transition: { duration: t ? 0.3 : 0 },
143
156
  className: "flex items-center justify-center",
144
157
  children: /* @__PURE__ */ e.jsx(
145
- p,
158
+ h,
146
159
  {
147
- icon: g,
160
+ icon: k,
148
161
  className: "w-14 h-14 min-w-14 min-h-14"
149
162
  }
150
163
  )
@@ -158,68 +171,71 @@ const k = ({
158
171
  /* @__PURE__ */ e.jsx(
159
172
  "span",
160
173
  {
161
- className: `text-body-s font-medium transition-all duration-300 text-center w-full ${i || a ? "text-black" : "text-gray-400"}`,
162
- children: d(m)
174
+ className: `text-body-s font-medium transition-all duration-300 text-center w-full ${o || r ? "text-black" : "text-gray-400"}`,
175
+ children: m(u)
163
176
  }
164
177
  )
165
178
  ] });
166
- }, H = ({
179
+ }, J = ({
167
180
  steps: n,
168
- direction: m = "horizontal"
181
+ direction: u = "horizontal",
182
+ color: t
169
183
  }) => {
170
- const [t, d] = u([]), [i, a] = u(null), [f, w] = u(!1), b = n.findIndex((r) => !r.completed), x = (r) => b === r;
171
- F(() => {
172
- const r = n.map(
173
- (o, s) => x(s) ? "focus" : o.completed ? "done" : "pending"
184
+ const { defaultColorScheme: b } = v(), m = t || b, { lineActiveColor: o, lineGradientFrom: r } = C(m), [p, c] = y([]), [s, f] = y(null), [g, z] = y(!1), w = n.findIndex((a) => !a.completed), j = (a) => w === a;
185
+ W(() => {
186
+ const a = n.map(
187
+ (i, l) => j(l) ? "focus" : i.completed ? "done" : "pending"
174
188
  );
175
- if (!f)
176
- d(r), w(!0), a(null);
189
+ if (!g)
190
+ c(a), z(!0), f(null);
177
191
  else {
178
- const o = r.findIndex(
179
- (s, l) => s !== t[l]
192
+ const i = a.findIndex(
193
+ (l, x) => l !== p[x]
180
194
  );
181
- a(o !== -1 ? o : null), d(r);
195
+ f(i !== -1 ? i : null), c(a);
182
196
  }
183
- }, [n, b]);
184
- const N = () => /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-16 relative", children: n.map((r, o) => {
185
- var j;
186
- const s = x(o - 1) ? "focus" : (j = n[o - 1]) != null && j.completed ? "done" : "pending", l = x(o) ? "focus" : r.completed ? "done" : "pending", C = f && i === o;
197
+ }, [n, w]);
198
+ const B = () => /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-16 relative", children: n.map((a, i) => {
199
+ var N;
200
+ const l = j(i - 1) ? "focus" : (N = n[i - 1]) != null && N.completed ? "done" : "pending", x = j(i) ? "focus" : a.completed ? "done" : "pending", F = g && s === i;
187
201
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-10 relative", children: [
188
- o !== 0 && /* @__PURE__ */ e.jsx(
202
+ i !== 0 && /* @__PURE__ */ e.jsx(
189
203
  "div",
190
204
  {
191
- className: `absolute left-[13px] bottom-[28px] w-[1.5px] h-16 ${l === "done" || l === "focus" ? "bg-blue-500" : s === "done" || s === "focus" ? "bg-gradient-to-b from-blue-500 to-[rgb(243,244,246)]" : "bg-[rgb(243,244,246)]"}`
205
+ className: `absolute left-[13px] bottom-[28px] w-[1.5px] h-16 ${x === "done" || x === "focus" ? o : l === "done" || l === "focus" ? `bg-gradient-to-b ${r} to-[rgb(243,244,246)]` : "bg-[rgb(243,244,246)]"}`
192
206
  }
193
207
  ),
194
208
  /* @__PURE__ */ e.jsx(
195
- k,
209
+ D,
196
210
  {
197
- status: l,
198
- shouldAnimate: C,
199
- label: r.label
211
+ status: x,
212
+ shouldAnimate: F,
213
+ label: a.label,
214
+ color: m
200
215
  }
201
216
  )
202
- ] }, o);
203
- }) }), S = () => /* @__PURE__ */ e.jsx("div", { className: "w-full flex items-center gap-12", children: n.map((r, o) => {
204
- const s = x(o) ? "focus" : r.completed ? "done" : "pending", l = f && i === o;
217
+ ] }, i);
218
+ }) }), $ = () => /* @__PURE__ */ e.jsx("div", { className: "w-full flex items-center gap-12", children: n.map((a, i) => {
219
+ const l = j(i) ? "focus" : a.completed ? "done" : "pending", x = g && s === i;
205
220
  return /* @__PURE__ */ e.jsx(
206
221
  "div",
207
222
  {
208
223
  className: "flex flex-col items-center justify-evenly w-full gap-2 relative col-span-1",
209
224
  children: /* @__PURE__ */ e.jsx(
210
- B,
225
+ E,
211
226
  {
212
- status: s,
213
- shouldAnimate: l,
214
- label: r.label
227
+ status: l,
228
+ shouldAnimate: x,
229
+ label: a.label,
230
+ color: m
215
231
  }
216
232
  )
217
233
  },
218
- o
234
+ i
219
235
  );
220
236
  }) });
221
- return m === "horizontal" ? /* @__PURE__ */ e.jsx(S, {}) : /* @__PURE__ */ e.jsx(N, {});
237
+ return u === "horizontal" ? /* @__PURE__ */ e.jsx($, {}) : /* @__PURE__ */ e.jsx(B, {});
222
238
  };
223
239
  export {
224
- H as default
240
+ J as default
225
241
  };
@@ -0,0 +1,11 @@
1
+ import { Color } from '../../../types/styleValues';
2
+ interface StepperColorConfig {
3
+ completedBgColor: string;
4
+ focusBorderColor: string;
5
+ pendingBorderColor: string;
6
+ iconActiveColor: string;
7
+ lineActiveColor: string;
8
+ lineGradientFrom: string;
9
+ }
10
+ export declare const resolveStepperColors: (color: Color) => StepperColorConfig;
11
+ export {};
@@ -0,0 +1,26 @@
1
+ const e = {
2
+ completedBgColor: "#dae2fb",
3
+ focusBorderColor: "#4570EB",
4
+ pendingBorderColor: "#ABACAF70",
5
+ iconActiveColor: "text-blue-500",
6
+ lineActiveColor: "bg-blue-500",
7
+ lineGradientFrom: "from-blue-500"
8
+ }, r = {
9
+ completedBgColor: "#C7F9F5",
10
+ focusBorderColor: "#1DA696",
11
+ pendingBorderColor: "#ABACAF70",
12
+ iconActiveColor: "text-aqua-500",
13
+ lineActiveColor: "bg-aqua-500",
14
+ lineGradientFrom: "from-aqua-500"
15
+ }, l = (o) => {
16
+ switch (o) {
17
+ case "aqua":
18
+ return r;
19
+ case "blue":
20
+ default:
21
+ return e;
22
+ }
23
+ };
24
+ export {
25
+ l as resolveStepperColors
26
+ };
@@ -1,7 +1,9 @@
1
+ import { Color } from '../../../types/styleValues';
1
2
  export interface StepperProps {
2
3
  steps: {
3
4
  label: string;
4
5
  completed: boolean;
5
6
  }[];
6
7
  direction?: "horizontal" | "vertical";
8
+ color?: Color;
7
9
  }