@algorithm-shift/design-system 1.2.76 → 1.2.78
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.
- package/dist/index.css +21 -3
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +24 -4
- package/dist/index.d.ts +24 -4
- package/dist/index.js +750 -654
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +627 -532
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -217,10 +217,33 @@ function TabGroupComponent({
|
|
|
217
217
|
] });
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
+
// src/components/Layout/Repeater.tsx
|
|
221
|
+
import React3 from "react";
|
|
222
|
+
import { Fragment as Fragment2, jsx as jsx10 } from "react/jsx-runtime";
|
|
223
|
+
function Repeater({
|
|
224
|
+
items = [],
|
|
225
|
+
count,
|
|
226
|
+
render,
|
|
227
|
+
emptyFallback = null,
|
|
228
|
+
wrapper,
|
|
229
|
+
className
|
|
230
|
+
}) {
|
|
231
|
+
const list = React3.useMemo(
|
|
232
|
+
() => typeof count === "number" ? items.slice(0, count) : items,
|
|
233
|
+
[items, count]
|
|
234
|
+
);
|
|
235
|
+
if (!list.length) {
|
|
236
|
+
return emptyFallback ? /* @__PURE__ */ jsx10(Fragment2, { children: emptyFallback }) : null;
|
|
237
|
+
}
|
|
238
|
+
const content = list.map((item, i) => /* @__PURE__ */ jsx10(React3.Fragment, { children: render(item, i, list) }, i));
|
|
239
|
+
return wrapper ? /* @__PURE__ */ jsx10(Fragment2, { children: wrapper(content) }) : /* @__PURE__ */ jsx10("div", { className, children: content });
|
|
240
|
+
}
|
|
241
|
+
var Repeater_default = React3.memo(Repeater);
|
|
242
|
+
|
|
220
243
|
// src/components/ui/button.tsx
|
|
221
244
|
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
222
245
|
import { cva } from "class-variance-authority";
|
|
223
|
-
import { jsx as
|
|
246
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
224
247
|
var buttonVariants = cva(
|
|
225
248
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
226
249
|
{
|
|
@@ -254,7 +277,7 @@ function Button({
|
|
|
254
277
|
...props
|
|
255
278
|
}) {
|
|
256
279
|
const Comp = asChild ? Slot2 : "button";
|
|
257
|
-
return /* @__PURE__ */
|
|
280
|
+
return /* @__PURE__ */ jsx11(
|
|
258
281
|
Comp,
|
|
259
282
|
{
|
|
260
283
|
"data-slot": "button",
|
|
@@ -265,7 +288,7 @@ function Button({
|
|
|
265
288
|
}
|
|
266
289
|
|
|
267
290
|
// src/components/Basic/Button/Button.tsx
|
|
268
|
-
import { jsx as
|
|
291
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
269
292
|
var ButtonWrapper = ({
|
|
270
293
|
className,
|
|
271
294
|
style,
|
|
@@ -274,7 +297,7 @@ var ButtonWrapper = ({
|
|
|
274
297
|
loading = false,
|
|
275
298
|
...props
|
|
276
299
|
}) => {
|
|
277
|
-
return /* @__PURE__ */
|
|
300
|
+
return /* @__PURE__ */ jsx12(
|
|
278
301
|
Button,
|
|
279
302
|
{
|
|
280
303
|
...props,
|
|
@@ -291,7 +314,7 @@ var Button_default = ButtonWrapper;
|
|
|
291
314
|
var image_placeholder_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAD25JREFUeJzt3XfwHGUdx/H3LyEJoQihJVITIEEQBUQHIQEBQaRMwApIyS8UQQREBQUZRaUXUQwwYoShSlWqQ5ci1ZE2YkIgEBIggNQEQgKk+Mf3t/7utt2ze7u35T6vmZ1M7vae57m7/fxu99nd5wERERERERERERERERERERERERERERERERERERERERERERERERERERERERGR7tJTdANiDAIOBDag3O2sm/eBS4Dnim6IxLsAWKKlkOVtYETrr6j+BhTdgBhfL7oBXWwYsH3RjSiDMgdkUNEN6HKDi25AGSxVdAMSeA14q+hG1FQPsFHRjZBk3qV5v/joYptTa0sTPA7pLbJBZVHmXSyRwikgIjEUEJEYCohIDAVEJIYCIhJDARGJoYCIxFBARGIoICIxqnQtVtYGAbsCewCfB9bELtB7G/gPcBdwBTC7qAaKxMnrWqweYC/gRVrfF/ERcB52+Xed6VqsCN22i7U0cBlwJbCOw/qDgMOAp4DP5dguKaluCshg4AZgnxSvXQu4F9sVky7STccgZwE7hTw+D7gFeBKYD4wEdgHG+NZbHrgR2AR4M7dWijjK8hhkLOHHGH8g/PiiB/g2FgT/ay5uox1lpWOQCsoyIHcS3AB+6vC6McB/fa9bDKzfRlvKSAGJkGQXa1ngCGwXJMp04FxggWOZawDfB1YKeW5ogrbFGQns4HvsZuAMh9c+C0zEdsE8PX2PHZ9F40psAvBF32PvAX/EfUigTwBHYl3oacwHLgSedlx/GWwbHRWzzgxgEvBByjZFuh63IWMudyxvCPCCY5nt/IJ8N6SszRK8vgd41Pf6f6VsS1mF/YJELW/g3u0d9suddJkLrO5Y37WOZV7nWF4iixwrn+tY3uaO5bUbkEm+cmalKON4XxkfUq8ewCQBWQLs7FDm0IRlxi3fcXwfCxzLW+hYXqIv2XXdxxzXm457mNqxaki9Sfl3KQYDK6RrTmLjgduws/ojO1RnnI9w2+VZAEzNoL7FWA+ji8cd1xvoWnk73byzsJ/bRtOAnzi+fg72l+gXwCohz29KgjeSQJr3HPaaRe02xMEE4CL6/zhtA2xHupAn9SLBYZbmAGcCLzm8fgmwO3Aabidlw8wDzgGmOK6/F3Zs6e9EWQ07l5Ur/8/UQTnXl1Uv1tm+ct4k+e7Rqb4y3if/8YInEL5b+xLZ96LVvRfrUILvz0md9qOj+H92VybYqxVnIPCtkDKdP+QU/L8cjdYE7qF+Xc2l1A0BuZ3gQdlpuA+teRiwnu+xm9ttVIxeosPhUUg6pBsC8gbW/ddoM2wjbHU8sjN2iUqjBcCl2TQtoBfr9/d/L09hu3WNFJKS+YDmfbi9c64vyzPpY7CuWf9+6MPAFgSPJ1YGTif8GOCkNtoRpzeivkewHrNx2Ik6//Mv035I6n4MMoHm9zYvj0pOb6hgOnaWNE9Z3w9yFMGNwFueBa7BJo65H+vKDFvvcWxjylov8eHw5BWSugdkGM33/5ySRyU92JwRe5N/OCD7gPRgXYZpT1Y9T/pLJuJMxC0cnjxCUveAAKyInXDclprMWJbHHYU9wDHAxyQLx73A8Azq90saDk/WIemGgNROntMffAa7ALFVMGZi53vy6MxIGw5PliFRQCqoE/ODrAv8ALvA8j7gIeAm7MTgl8nnTD60Hw5PViFRQCqorhPoHEA24fCMJTokox3LUEAqqI4BOQC7+C6rcHjaDYkCUkF1C0he4fC0ExIFpILqFJC8w+FJGxIFpILqEpBOhcOTJiQKSAXVISCdDodnLHYzmr/eVwgPiQKSgR7sJv7x2M3xeat6QIoKhydJSLohIMth4zBvkVcFv6b/w5vaV2GeqhyQAyk2HB7XkNQ9ICtgt0177+2EPCqZR/MHuFcelTTIKyDLYVd37o37PSFJlCUcHpeQ1D0g+9P83vy3DmTC/wFW5ZbbRsOxAQe8Mu8n21/CsoXD0yokdQ+Ibrl1MBz4O/Dphse2Bm4lm5AcCEwmeKXoo9iYwHMyqCOtB7Gbv97zPb46diGm6xn3rtMtAfHCsVHIc+NoPyQHUd5weB4Evkp4SO7qfHOqoRsCEhcOzzhs7Kk0ITkIG46zzOHwPER4SFYroC2VUPeADMfu2/aHYyHB/dCxJA9JlcLhiQqJhKhzQLxwbOh7/GNsGJ9DiA7J8g7lVzEcHoUkB1XqxRqOjcbnb/NH2Mkiz8GE9zo9QHxIol5XdG9VUlsR3rulXqwUqhIQ13B4ojb2BwkPSV3C4YkKSW+BbcqaAtInaTg8riGpWzg841BA2lb2gIwgXTg8rUJS13CAThRGqsskniOwrtyoA/IbHcqY3PfvBTQfeG+FTemwPuU4IF+nb/kn7jN5SUp16MXKIhyeyYT3bo2mHOGYiI3PdR82d+Kl2Iy8gzrYBolQxl2suN2q3duoO2p3qsjdqoFE9zi9iXU5b0e6P3raxcpA2QIyArvsPutweMp2zLEUwfGRw5bZ2AiSWyYoWwHJgH9jOSCPShrEBSTvcHj8ISn6gPw6WgekcZmBTfWwaYty6x4Qb7fZWxbnUcndNG+IeV8BGhWQuHCMz6EduwJ/Bk7G7Qx7nr5JsoA0LlOwG4XGhJRb94BsRP/lRUuAO/KoZBVsOrMrsLny8hYWkE6Ho2yGEjwOeR6bJCjJeMNPYHNJrt1Xbt0DAjar2DXA77DpLSrPH5Cz6O5weC6n+f2/j40RsCrwPayHy3XK7sXYdVk/Dnmut0PvR1LyByTsgLnbwgGwG8HPYU/fOmsAP8S6otPukvXm+zakXf6A+JcP6b5wgJ3zeJvmz+L6mPVHAcdh07glCchDwH4Uf9wlEeIC0q3h8PyJ5s9jAW6TGm0I/Ap4BvegzAf+gp10HZrlm5D2RAWk28MBsCPBz2VCwjI2w6bVezGkrKjlPayTZjd09r5wYQFROMxA4HWaP5tb2yhvS+zk4mzcw/I29ku2A/nNoyIx/AFROJqdR/Pn8zHtd18OwC5XuQC7fMU1LK8B52KXzddi/r8q8AfkV8U2p3S2JrihHpJh+UthQwVdgl2Q6RqWWcCZwOYZtkVCVHno0U7oAV6i+TO6J6e6hgBfA64mOMJm3PIscCLBK61rawD5DNcZRgFp7Tc0f0aLsHGu8rQsNmzrjdhur0tQFgNH5NwuF0PI8RaPnbB7EBZi+5t572sqIK19geDGeFQH618Ru0fF5VKXVzvYLr8B2O0Ai7DOjR3zqMT/c55LJQ0UEDfTaf6cHimgDSsCk4gPyLQC2uXxX30w0/WFSX5u1vT9f50Er5X8XO37/xbAyA7VvQp2lfNM4PCY9d6h2F0s/7a7duhaIap0T/qewMZFN6KE1gh5bC/sPpC8jMB+0Q/FjkmivAH8FuuSnptje0rB/5PZ6TsKtbgvT6b4vF2shR1/zm9R/yvYxZKdmInMRS1HNcnlrq8usQnWtTo1o/K8Cx4nEN+LORM4A7gQ6+GqvDKPavJQ0Q2ouKxmANsXO59xMNHhmI7NjzIaOJ+ahAPK/QvSC5yC/SXU5QutbYAdNHv2JJu5+H5J9HYyBfuOrsK6ULtap49BJJmjCX5Hm2VQbuOUdY3LEVTnD5emYBOuJvjF751BuUdjd276HY71Zkkf/YKU3wM0f0cvks1f+fGEX1YyDfhkBuXnTb8gAtixQKN1SDaAXJSbsDsK/b8kY7BJQKsQklQUkHq5luDBsmtv1vLE7zJ1bUhcaRerGu6i+Xt6ldZ/CPen/+TflcSf64ja3XqG8oaklmPzSjoHEfyuto9Zf2XsXvPG9W8k/p7zqoVEAZH/G4btBjV+V5Nj1j+R4Hdbt5AoINLkFpq/q7cI39hXIP6at7qEpCMBmeGrYNs8KpFM7Etwg9g1ZL2fhayXZUjKcp5kJ5rbNj2PSrYBXsDuST6F6pxF7UbLE5xL5DLfOstgl6M3rrOA8JDcQLVD0oMNJPEBFo6xxTZHysA/l8hcbBR3z48IbtBHASeFPF6HkIg0CZtL5Bt9zw0hOEjc6/Tfv6GQSO2FzSVyXd9zhxHciI/1vT7rkExFIZGS8c8l8gGwEsHxeN8ifBT3kwkPyfUoJFIDYXOJ3BHy2AkxZSgkUlthc4n4lznYycU4WYdkCpp3RErCP5eIfznVsZx2QhI2qNyBCd+HSC52IDoc87C5DV2dElHOX4kOSVh38hKC08aJFGIgNj1B2EZ6dorykoQkbHLQJdhcJppTRErjXIIb6QLSXy/lEpKwe+SXALfRfMKyNlbHxju6Gdil4LZIMuMIbqjnt1lmXEiOjXiuyHCMxy7inExOvWiN9zsvpIvmfKiBHqznqPF8iPP4tDFOJTwIZQvHJjRPI35fHpWoF6LaRgGXYrfOfinDcl1CcjvF7lYdEtKmzPkr0P0g4okLSdHhAI1qIgU7jvDR5O8Edsc6BCpJAZGsHEf/BY5gB8TjqXA4oNxj80r1/Byb6mw5shtZvlAKiGTtpaIbkCXtYonEUEBEYiggIjEUEJEYCohIDAVEJIYCIhJDARGJoYCIxEgSkHm+/8/JsiEiOXrf9/+5eVTSOBL4E/QPUylSdsvRPJ31MXlV9FlgR2xsV5EqWRr4CrBx0Q0RERERERERERERERERkZJLMgT9AGAPbNjKWdj4riJVMRzYD1gDeI4chh89j/5rWV7GJoMUqYJVgVfp337PyaMS/1xz++RRiUgOJtK87c53fWGSy90H+/4/NMFrRYrkv7jWeTBt3TAlEkMBEYmhgIjE6Emwrr9b7HXgXd9j04EjgRdalLUWMAn4VIL6Pc/11TGjxXpr99WxQYo6ngWOAGa2WG9kXx2jU9Qxra+OWS3WGwX8PmUdz2CfVas61u2rY/0UdUzF3sfLDnVMAtZLUccU4HBgdov1RmPvY5Tv8WHAar7Hkmz7TlznonvQoay7EpSXto572qzDZR67f7RZx90OdTTODZlXHQ+3WcftDnU80mYdf3Oo47EE5WVuoWPFLjfEN/ZJp1lcBox4o8063nKo450263i9JHW812Ydr3Sgjla/5mCT9biU9bFDWUCyY5BrHde7OsOyolyT0TpVqKMun1Un3odrHVe5VppkP2wINrPtujHrTAMupnVClwL2BzZKUH+aOiaQbrrqqcAl2K9mnEF9daQ5lpqCzTrrUkcv6Y6lktQxERiToo6ngcuARS3WG4y9jzR1/Bu43LGOA4g/lpoOXAR8lKIdIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIrX3Py2wAaYahY2rAAAAAElFTkSuQmCC";
|
|
292
315
|
|
|
293
316
|
// src/components/Basic/Image/Image.tsx
|
|
294
|
-
import { jsx as
|
|
317
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
295
318
|
var ImageControl = ({
|
|
296
319
|
className,
|
|
297
320
|
style,
|
|
@@ -308,26 +331,26 @@ var ImageControl = ({
|
|
|
308
331
|
className
|
|
309
332
|
);
|
|
310
333
|
if (!imageUrl && !imageUrlExternal) {
|
|
311
|
-
return /* @__PURE__ */
|
|
334
|
+
return /* @__PURE__ */ jsx13("div", { className: imageClass, children: /* @__PURE__ */ jsx13("img", { src: image_placeholder_default, alt: altText, className: "opacity-50", width: 50, height: 50 }) });
|
|
312
335
|
}
|
|
313
336
|
const url = imageUrlExternal || imageUrl;
|
|
314
|
-
return /* @__PURE__ */
|
|
337
|
+
return /* @__PURE__ */ jsx13("img", { src: url, alt: altText, className: defaultImgClass, style });
|
|
315
338
|
};
|
|
316
339
|
var Image_default = ImageControl;
|
|
317
340
|
|
|
318
341
|
// src/components/Basic/Shape/Shape.tsx
|
|
319
|
-
import { jsx as
|
|
342
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
320
343
|
var Shape = ({
|
|
321
344
|
children,
|
|
322
345
|
className,
|
|
323
346
|
style
|
|
324
347
|
}) => {
|
|
325
|
-
return /* @__PURE__ */
|
|
348
|
+
return /* @__PURE__ */ jsx14("div", { className, style, children });
|
|
326
349
|
};
|
|
327
350
|
var Shape_default = Shape;
|
|
328
351
|
|
|
329
352
|
// src/components/Basic/Typography/Typography.tsx
|
|
330
|
-
import
|
|
353
|
+
import React4 from "react";
|
|
331
354
|
var Typography = ({
|
|
332
355
|
className,
|
|
333
356
|
style,
|
|
@@ -335,14 +358,14 @@ var Typography = ({
|
|
|
335
358
|
textContent
|
|
336
359
|
}) => {
|
|
337
360
|
const Tag2 = tagName || "h1";
|
|
338
|
-
return
|
|
361
|
+
return React4.createElement(
|
|
339
362
|
Tag2,
|
|
340
363
|
{
|
|
341
364
|
style,
|
|
342
365
|
className: cn(className, "pointer-events-auto")
|
|
343
366
|
},
|
|
344
367
|
[
|
|
345
|
-
|
|
368
|
+
React4.createElement("span", {
|
|
346
369
|
key: "html",
|
|
347
370
|
className: "pointer-events-none",
|
|
348
371
|
dangerouslySetInnerHTML: { __html: textContent }
|
|
@@ -3458,7 +3481,7 @@ __export(lucide_react_exports, {
|
|
|
3458
3481
|
LucideMailX: () => MailX,
|
|
3459
3482
|
LucideMailbox: () => Mailbox,
|
|
3460
3483
|
LucideMails: () => Mails,
|
|
3461
|
-
LucideMap: () =>
|
|
3484
|
+
LucideMap: () => Map2,
|
|
3462
3485
|
LucideMapMinus: () => MapMinus,
|
|
3463
3486
|
LucideMapPin: () => MapPin,
|
|
3464
3487
|
LucideMapPinCheck: () => MapPinCheck,
|
|
@@ -4294,8 +4317,8 @@ __export(lucide_react_exports, {
|
|
|
4294
4317
|
MailboxIcon: () => Mailbox,
|
|
4295
4318
|
Mails: () => Mails,
|
|
4296
4319
|
MailsIcon: () => Mails,
|
|
4297
|
-
Map: () =>
|
|
4298
|
-
MapIcon: () =>
|
|
4320
|
+
Map: () => Map2,
|
|
4321
|
+
MapIcon: () => Map2,
|
|
4299
4322
|
MapMinus: () => MapMinus,
|
|
4300
4323
|
MapMinusIcon: () => MapMinus,
|
|
4301
4324
|
MapPin: () => MapPin,
|
|
@@ -6830,7 +6853,7 @@ __export(icons_exports, {
|
|
|
6830
6853
|
MailX: () => MailX,
|
|
6831
6854
|
Mailbox: () => Mailbox,
|
|
6832
6855
|
Mails: () => Mails,
|
|
6833
|
-
Map: () =>
|
|
6856
|
+
Map: () => Map2,
|
|
6834
6857
|
MapMinus: () => MapMinus,
|
|
6835
6858
|
MapPin: () => MapPin,
|
|
6836
6859
|
MapPinCheck: () => MapPinCheck,
|
|
@@ -18443,7 +18466,7 @@ var __iconNode933 = [
|
|
|
18443
18466
|
["path", { d: "M15 5.764v15", key: "1pn4in" }],
|
|
18444
18467
|
["path", { d: "M9 3.236v15", key: "1uimfh" }]
|
|
18445
18468
|
];
|
|
18446
|
-
var
|
|
18469
|
+
var Map2 = createLucideIcon("map", __iconNode933);
|
|
18447
18470
|
|
|
18448
18471
|
// node_modules/lucide-react/dist/esm/icons/mars-stroke.js
|
|
18449
18472
|
var __iconNode934 = [
|
|
@@ -26660,9 +26683,9 @@ var ZoomOut = createLucideIcon("zoom-out", __iconNode1634);
|
|
|
26660
26683
|
|
|
26661
26684
|
// src/components/Basic/Breadcrumb/Breadcrumb.tsx
|
|
26662
26685
|
import Link3 from "next/link";
|
|
26663
|
-
import { jsx as
|
|
26686
|
+
import { jsx as jsx15, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
26664
26687
|
var Breadcrumb = ({ list = [], className, style }) => {
|
|
26665
|
-
return /* @__PURE__ */
|
|
26688
|
+
return /* @__PURE__ */ jsx15(
|
|
26666
26689
|
"nav",
|
|
26667
26690
|
{
|
|
26668
26691
|
"aria-label": "breadcrumb",
|
|
@@ -26671,15 +26694,15 @@ var Breadcrumb = ({ list = [], className, style }) => {
|
|
|
26671
26694
|
children: list.map((item, index) => {
|
|
26672
26695
|
const isLast = index === list.length - 1;
|
|
26673
26696
|
return /* @__PURE__ */ jsxs4("div", { className: "flex items-center", children: [
|
|
26674
|
-
item.url && !isLast ? /* @__PURE__ */
|
|
26697
|
+
item.url && !isLast ? /* @__PURE__ */ jsx15(
|
|
26675
26698
|
Link3,
|
|
26676
26699
|
{
|
|
26677
26700
|
href: item.url,
|
|
26678
26701
|
className: "hover:text-foreground transition-colors",
|
|
26679
26702
|
children: item.header
|
|
26680
26703
|
}
|
|
26681
|
-
) : /* @__PURE__ */
|
|
26682
|
-
!isLast && /* @__PURE__ */
|
|
26704
|
+
) : /* @__PURE__ */ jsx15("span", { className: "text-foreground font-medium", children: item.header }),
|
|
26705
|
+
!isLast && /* @__PURE__ */ jsx15(ChevronRight, { className: "mx-2 h-4 w-4 text-muted-foreground" })
|
|
26683
26706
|
] }, item.id);
|
|
26684
26707
|
})
|
|
26685
26708
|
}
|
|
@@ -26689,16 +26712,16 @@ var Breadcrumb_default = Breadcrumb;
|
|
|
26689
26712
|
|
|
26690
26713
|
// src/components/ui/dropdown-menu.tsx
|
|
26691
26714
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
26692
|
-
import { jsx as
|
|
26715
|
+
import { jsx as jsx16, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
26693
26716
|
function DropdownMenu({
|
|
26694
26717
|
...props
|
|
26695
26718
|
}) {
|
|
26696
|
-
return /* @__PURE__ */
|
|
26719
|
+
return /* @__PURE__ */ jsx16(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
26697
26720
|
}
|
|
26698
26721
|
function DropdownMenuTrigger({
|
|
26699
26722
|
...props
|
|
26700
26723
|
}) {
|
|
26701
|
-
return /* @__PURE__ */
|
|
26724
|
+
return /* @__PURE__ */ jsx16(
|
|
26702
26725
|
DropdownMenuPrimitive.Trigger,
|
|
26703
26726
|
{
|
|
26704
26727
|
"data-slot": "dropdown-menu-trigger",
|
|
@@ -26711,7 +26734,7 @@ function DropdownMenuContent({
|
|
|
26711
26734
|
sideOffset = 4,
|
|
26712
26735
|
...props
|
|
26713
26736
|
}) {
|
|
26714
|
-
return /* @__PURE__ */
|
|
26737
|
+
return /* @__PURE__ */ jsx16(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx16(
|
|
26715
26738
|
DropdownMenuPrimitive.Content,
|
|
26716
26739
|
{
|
|
26717
26740
|
"data-slot": "dropdown-menu-content",
|
|
@@ -26730,7 +26753,7 @@ function DropdownMenuItem({
|
|
|
26730
26753
|
variant = "default",
|
|
26731
26754
|
...props
|
|
26732
26755
|
}) {
|
|
26733
|
-
return /* @__PURE__ */
|
|
26756
|
+
return /* @__PURE__ */ jsx16(
|
|
26734
26757
|
DropdownMenuPrimitive.Item,
|
|
26735
26758
|
{
|
|
26736
26759
|
"data-slot": "dropdown-menu-item",
|
|
@@ -26747,7 +26770,7 @@ function DropdownMenuItem({
|
|
|
26747
26770
|
function DropdownMenuSub({
|
|
26748
26771
|
...props
|
|
26749
26772
|
}) {
|
|
26750
|
-
return /* @__PURE__ */
|
|
26773
|
+
return /* @__PURE__ */ jsx16(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
26751
26774
|
}
|
|
26752
26775
|
function DropdownMenuSubTrigger({
|
|
26753
26776
|
className,
|
|
@@ -26767,7 +26790,7 @@ function DropdownMenuSubTrigger({
|
|
|
26767
26790
|
...props,
|
|
26768
26791
|
children: [
|
|
26769
26792
|
children,
|
|
26770
|
-
/* @__PURE__ */
|
|
26793
|
+
/* @__PURE__ */ jsx16(ChevronRight, { className: "ml-auto size-4" })
|
|
26771
26794
|
]
|
|
26772
26795
|
}
|
|
26773
26796
|
);
|
|
@@ -26776,7 +26799,7 @@ function DropdownMenuSubContent({
|
|
|
26776
26799
|
className,
|
|
26777
26800
|
...props
|
|
26778
26801
|
}) {
|
|
26779
|
-
return /* @__PURE__ */
|
|
26802
|
+
return /* @__PURE__ */ jsx16(
|
|
26780
26803
|
DropdownMenuPrimitive.SubContent,
|
|
26781
26804
|
{
|
|
26782
26805
|
"data-slot": "dropdown-menu-sub-content",
|
|
@@ -26791,11 +26814,11 @@ function DropdownMenuSubContent({
|
|
|
26791
26814
|
|
|
26792
26815
|
// src/components/Basic/ButtonGroup/ButtonGroup.tsx
|
|
26793
26816
|
import Link4 from "next/link";
|
|
26794
|
-
import { jsx as
|
|
26817
|
+
import { jsx as jsx17, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
26795
26818
|
function SplitButton({ style, textContent, className, list = [] }) {
|
|
26796
26819
|
const bgColor = style?.backgroundColor || "";
|
|
26797
26820
|
return /* @__PURE__ */ jsxs6("div", { className: "inline-flex rounded-md overflow-hidden border border-teal-200 bg-teal-700 items-center focus:ring-0", style: { backgroundColor: bgColor }, children: [
|
|
26798
|
-
/* @__PURE__ */
|
|
26821
|
+
/* @__PURE__ */ jsx17(
|
|
26799
26822
|
Button,
|
|
26800
26823
|
{
|
|
26801
26824
|
className: `rounded-none border-r px-4 py-2 text-whit focus:ring-0 ${className || ""}`,
|
|
@@ -26804,16 +26827,16 @@ function SplitButton({ style, textContent, className, list = [] }) {
|
|
|
26804
26827
|
}
|
|
26805
26828
|
),
|
|
26806
26829
|
/* @__PURE__ */ jsxs6(DropdownMenu, { children: [
|
|
26807
|
-
/* @__PURE__ */
|
|
26830
|
+
/* @__PURE__ */ jsx17(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx17(
|
|
26808
26831
|
Button,
|
|
26809
26832
|
{
|
|
26810
26833
|
className: "rounded-none bg-teal-700 px-4 py-2 text-white ring-0 shadow-none hover:bg-teal-600 focus:ring-0",
|
|
26811
26834
|
"aria-label": "Open Dropdown",
|
|
26812
26835
|
style: { backgroundColor: bgColor },
|
|
26813
|
-
children: /* @__PURE__ */
|
|
26836
|
+
children: /* @__PURE__ */ jsx17(ChevronDown, { className: "w-4 h-4" })
|
|
26814
26837
|
}
|
|
26815
26838
|
) }),
|
|
26816
|
-
/* @__PURE__ */
|
|
26839
|
+
/* @__PURE__ */ jsx17(DropdownMenuContent, { align: "end", className: "bg-white min-w-[120px]", children: list.map((item) => /* @__PURE__ */ jsx17(DropdownMenuItem, { className: "text-black", children: /* @__PURE__ */ jsx17(Link4, { href: item.url || "#", children: item.header }) }, item.id)) })
|
|
26817
26840
|
] })
|
|
26818
26841
|
] });
|
|
26819
26842
|
}
|
|
@@ -26821,7 +26844,7 @@ function SplitButton({ style, textContent, className, list = [] }) {
|
|
|
26821
26844
|
// src/components/Basic/Icon/Icon.tsx
|
|
26822
26845
|
import * as faSolid from "@fortawesome/free-solid-svg-icons";
|
|
26823
26846
|
import { FontAwesomeIcon as FontAwesomeIcon2 } from "@fortawesome/react-fontawesome";
|
|
26824
|
-
import { jsx as
|
|
26847
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
26825
26848
|
var Icon2 = ({ iconType = "fontawesome", name = "Envelope", className, fontSize = 10, style }) => {
|
|
26826
26849
|
let content = null;
|
|
26827
26850
|
if (iconType === "fontawesome") {
|
|
@@ -26830,7 +26853,7 @@ var Icon2 = ({ iconType = "fontawesome", name = "Envelope", className, fontSize
|
|
|
26830
26853
|
if (!faIcon) {
|
|
26831
26854
|
return null;
|
|
26832
26855
|
}
|
|
26833
|
-
content = /* @__PURE__ */
|
|
26856
|
+
content = /* @__PURE__ */ jsx18(
|
|
26834
26857
|
FontAwesomeIcon2,
|
|
26835
26858
|
{
|
|
26836
26859
|
icon: faIcon,
|
|
@@ -26844,9 +26867,9 @@ var Icon2 = ({ iconType = "fontawesome", name = "Envelope", className, fontSize
|
|
|
26844
26867
|
if (!Lucide) {
|
|
26845
26868
|
return null;
|
|
26846
26869
|
}
|
|
26847
|
-
content = /* @__PURE__ */
|
|
26870
|
+
content = /* @__PURE__ */ jsx18(Lucide, { className: cn("w-5 h-5"), size: fontSize, style: { color: style?.color } });
|
|
26848
26871
|
}
|
|
26849
|
-
return /* @__PURE__ */
|
|
26872
|
+
return /* @__PURE__ */ jsx18("div", { style, className, children: content });
|
|
26850
26873
|
};
|
|
26851
26874
|
var Icon_default = Icon2;
|
|
26852
26875
|
|
|
@@ -26854,9 +26877,9 @@ var Icon_default = Icon2;
|
|
|
26854
26877
|
import { useEffect as useEffect3 } from "react";
|
|
26855
26878
|
|
|
26856
26879
|
// src/components/ui/input.tsx
|
|
26857
|
-
import { jsx as
|
|
26880
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
26858
26881
|
function Input({ className, type, ...props }) {
|
|
26859
|
-
return /* @__PURE__ */
|
|
26882
|
+
return /* @__PURE__ */ jsx19(
|
|
26860
26883
|
"input",
|
|
26861
26884
|
{
|
|
26862
26885
|
type,
|
|
@@ -26873,7 +26896,7 @@ function Input({ className, type, ...props }) {
|
|
|
26873
26896
|
}
|
|
26874
26897
|
|
|
26875
26898
|
// src/components/Inputs/TextInput/TextInput.tsx
|
|
26876
|
-
import { Fragment as
|
|
26899
|
+
import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
26877
26900
|
var TextInput = ({ className, style, ...props }) => {
|
|
26878
26901
|
const placeholder = props.placeholder || "Placeholder text";
|
|
26879
26902
|
const isEditable = props.isEditable ?? true;
|
|
@@ -26889,8 +26912,8 @@ var TextInput = ({ className, style, ...props }) => {
|
|
|
26889
26912
|
const handleChange = (e) => {
|
|
26890
26913
|
props.onChange?.(e);
|
|
26891
26914
|
};
|
|
26892
|
-
return /* @__PURE__ */ jsxs7(
|
|
26893
|
-
/* @__PURE__ */
|
|
26915
|
+
return /* @__PURE__ */ jsxs7(Fragment3, { children: [
|
|
26916
|
+
/* @__PURE__ */ jsx20(
|
|
26894
26917
|
Input,
|
|
26895
26918
|
{
|
|
26896
26919
|
type: "text",
|
|
@@ -26908,14 +26931,14 @@ var TextInput = ({ className, style, ...props }) => {
|
|
|
26908
26931
|
readOnly: isReadonly
|
|
26909
26932
|
}
|
|
26910
26933
|
),
|
|
26911
|
-
props.errorMessage && /* @__PURE__ */
|
|
26934
|
+
props.errorMessage && /* @__PURE__ */ jsx20("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
26912
26935
|
] });
|
|
26913
26936
|
};
|
|
26914
26937
|
var TextInput_default = TextInput;
|
|
26915
26938
|
|
|
26916
26939
|
// src/components/Inputs/NumberInput/NumberInput.tsx
|
|
26917
26940
|
import { useEffect as useEffect4 } from "react";
|
|
26918
|
-
import { Fragment as
|
|
26941
|
+
import { Fragment as Fragment4, jsx as jsx21, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
26919
26942
|
var NumberInput = ({ className, style, ...props }) => {
|
|
26920
26943
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
26921
26944
|
const isEditable = props.isEditable ?? true;
|
|
@@ -26931,37 +26954,34 @@ var NumberInput = ({ className, style, ...props }) => {
|
|
|
26931
26954
|
const handleChange = (e) => {
|
|
26932
26955
|
props.onChange?.(e);
|
|
26933
26956
|
};
|
|
26934
|
-
return /* @__PURE__ */ jsxs8(
|
|
26935
|
-
/* @__PURE__ */
|
|
26936
|
-
|
|
26937
|
-
|
|
26938
|
-
|
|
26939
|
-
|
|
26940
|
-
|
|
26941
|
-
|
|
26942
|
-
|
|
26943
|
-
|
|
26944
|
-
|
|
26945
|
-
|
|
26946
|
-
|
|
26947
|
-
|
|
26948
|
-
|
|
26949
|
-
|
|
26950
|
-
|
|
26951
|
-
|
|
26952
|
-
|
|
26953
|
-
|
|
26954
|
-
|
|
26955
|
-
)
|
|
26956
|
-
] }),
|
|
26957
|
-
props.errorMessage && /* @__PURE__ */ jsx20("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
26957
|
+
return /* @__PURE__ */ jsxs8(Fragment4, { children: [
|
|
26958
|
+
/* @__PURE__ */ jsx21("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx21(
|
|
26959
|
+
Input,
|
|
26960
|
+
{
|
|
26961
|
+
type: "number",
|
|
26962
|
+
id: props.name || "number-field",
|
|
26963
|
+
name: props.name,
|
|
26964
|
+
value: props.value || "",
|
|
26965
|
+
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
26966
|
+
style: {
|
|
26967
|
+
...style,
|
|
26968
|
+
borderColor: props.errorMessage ? "#f87171" : style?.borderColor
|
|
26969
|
+
},
|
|
26970
|
+
autoComplete: isAutocomplete ? "on" : "off",
|
|
26971
|
+
placeholder,
|
|
26972
|
+
onChange: handleChange,
|
|
26973
|
+
disabled: isDisabled || !isEditable,
|
|
26974
|
+
readOnly: isReadonly
|
|
26975
|
+
}
|
|
26976
|
+
) }),
|
|
26977
|
+
props.errorMessage && /* @__PURE__ */ jsx21("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
26958
26978
|
] });
|
|
26959
26979
|
};
|
|
26960
26980
|
var NumberInput_default = NumberInput;
|
|
26961
26981
|
|
|
26962
26982
|
// src/components/Inputs/EmailInput/EmailInput.tsx
|
|
26963
26983
|
import { useEffect as useEffect5 } from "react";
|
|
26964
|
-
import { Fragment as
|
|
26984
|
+
import { Fragment as Fragment5, jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
26965
26985
|
var EmailInput = ({ className, style, ...props }) => {
|
|
26966
26986
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
26967
26987
|
const isEditable = props.isEditable ?? true;
|
|
@@ -26977,36 +26997,33 @@ var EmailInput = ({ className, style, ...props }) => {
|
|
|
26977
26997
|
const handleChange = (e) => {
|
|
26978
26998
|
props.onChange?.(e);
|
|
26979
26999
|
};
|
|
26980
|
-
return /* @__PURE__ */ jsxs9(
|
|
26981
|
-
/* @__PURE__ */
|
|
26982
|
-
|
|
26983
|
-
|
|
26984
|
-
|
|
26985
|
-
|
|
26986
|
-
|
|
26987
|
-
|
|
26988
|
-
|
|
26989
|
-
|
|
26990
|
-
|
|
26991
|
-
|
|
26992
|
-
|
|
26993
|
-
|
|
26994
|
-
|
|
26995
|
-
|
|
26996
|
-
|
|
26997
|
-
|
|
26998
|
-
|
|
26999
|
-
|
|
27000
|
-
)
|
|
27001
|
-
] }),
|
|
27002
|
-
props.errorMessage && /* @__PURE__ */ jsx21("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27000
|
+
return /* @__PURE__ */ jsxs9(Fragment5, { children: [
|
|
27001
|
+
/* @__PURE__ */ jsx22("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx22(
|
|
27002
|
+
Input,
|
|
27003
|
+
{
|
|
27004
|
+
type: "email",
|
|
27005
|
+
name: props.name,
|
|
27006
|
+
value: props.value || "",
|
|
27007
|
+
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
27008
|
+
style: {
|
|
27009
|
+
...style,
|
|
27010
|
+
borderColor: props.errorMessage ? "#f87171" : style?.borderColor
|
|
27011
|
+
},
|
|
27012
|
+
autoComplete: isAutocomplete ? "on" : "off",
|
|
27013
|
+
placeholder,
|
|
27014
|
+
onChange: handleChange,
|
|
27015
|
+
disabled: isDisabled || !isEditable,
|
|
27016
|
+
readOnly: isReadonly
|
|
27017
|
+
}
|
|
27018
|
+
) }),
|
|
27019
|
+
props.errorMessage && /* @__PURE__ */ jsx22("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27003
27020
|
] });
|
|
27004
27021
|
};
|
|
27005
27022
|
var EmailInput_default = EmailInput;
|
|
27006
27023
|
|
|
27007
27024
|
// src/components/Inputs/PasswordInput/PasswordInput.tsx
|
|
27008
27025
|
import { useEffect as useEffect6 } from "react";
|
|
27009
|
-
import { Fragment as
|
|
27026
|
+
import { Fragment as Fragment6, jsx as jsx23, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
27010
27027
|
var PasswordInput = ({ className, style, ...props }) => {
|
|
27011
27028
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
27012
27029
|
const isEditable = props.isEditable ?? true;
|
|
@@ -27022,30 +27039,27 @@ var PasswordInput = ({ className, style, ...props }) => {
|
|
|
27022
27039
|
const handleChange = (e) => {
|
|
27023
27040
|
props.onChange?.(e);
|
|
27024
27041
|
};
|
|
27025
|
-
return /* @__PURE__ */ jsxs10(
|
|
27026
|
-
/* @__PURE__ */
|
|
27027
|
-
|
|
27028
|
-
|
|
27029
|
-
|
|
27030
|
-
|
|
27031
|
-
|
|
27032
|
-
|
|
27033
|
-
|
|
27034
|
-
|
|
27035
|
-
|
|
27036
|
-
|
|
27037
|
-
|
|
27038
|
-
|
|
27039
|
-
|
|
27040
|
-
|
|
27041
|
-
|
|
27042
|
-
|
|
27043
|
-
|
|
27044
|
-
|
|
27045
|
-
|
|
27046
|
-
)
|
|
27047
|
-
] }),
|
|
27048
|
-
props.errorMessage && /* @__PURE__ */ jsx22("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27042
|
+
return /* @__PURE__ */ jsxs10(Fragment6, { children: [
|
|
27043
|
+
/* @__PURE__ */ jsx23("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx23(
|
|
27044
|
+
Input,
|
|
27045
|
+
{
|
|
27046
|
+
type: "password",
|
|
27047
|
+
id: props.name || "password-field",
|
|
27048
|
+
name: props.name,
|
|
27049
|
+
value: props.value || "",
|
|
27050
|
+
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
27051
|
+
style: {
|
|
27052
|
+
...style,
|
|
27053
|
+
borderColor: props.errorMessage ? "#f87171" : style?.borderColor
|
|
27054
|
+
},
|
|
27055
|
+
autoComplete: isAutocomplete ? "on" : "off",
|
|
27056
|
+
placeholder,
|
|
27057
|
+
onChange: handleChange,
|
|
27058
|
+
disabled: isDisabled || !isEditable,
|
|
27059
|
+
readOnly: isReadonly
|
|
27060
|
+
}
|
|
27061
|
+
) }),
|
|
27062
|
+
props.errorMessage && /* @__PURE__ */ jsx23("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27049
27063
|
] });
|
|
27050
27064
|
};
|
|
27051
27065
|
var PasswordInput_default = PasswordInput;
|
|
@@ -27054,9 +27068,9 @@ var PasswordInput_default = PasswordInput;
|
|
|
27054
27068
|
import { useEffect as useEffect7 } from "react";
|
|
27055
27069
|
|
|
27056
27070
|
// src/components/ui/textarea.tsx
|
|
27057
|
-
import { jsx as
|
|
27071
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
27058
27072
|
function Textarea({ className, ...props }) {
|
|
27059
|
-
return /* @__PURE__ */
|
|
27073
|
+
return /* @__PURE__ */ jsx24(
|
|
27060
27074
|
"textarea",
|
|
27061
27075
|
{
|
|
27062
27076
|
"data-slot": "textarea",
|
|
@@ -27070,7 +27084,7 @@ function Textarea({ className, ...props }) {
|
|
|
27070
27084
|
}
|
|
27071
27085
|
|
|
27072
27086
|
// src/components/Inputs/Textarea/Textarea.tsx
|
|
27073
|
-
import { Fragment as
|
|
27087
|
+
import { Fragment as Fragment7, jsx as jsx25, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
27074
27088
|
var Textarea2 = ({ className, style, ...props }) => {
|
|
27075
27089
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
27076
27090
|
const isEditable = props.isEditable ?? true;
|
|
@@ -27086,8 +27100,8 @@ var Textarea2 = ({ className, style, ...props }) => {
|
|
|
27086
27100
|
const handleChange = (e) => {
|
|
27087
27101
|
props.onChange?.(e);
|
|
27088
27102
|
};
|
|
27089
|
-
return /* @__PURE__ */ jsxs11(
|
|
27090
|
-
/* @__PURE__ */
|
|
27103
|
+
return /* @__PURE__ */ jsxs11(Fragment7, { children: [
|
|
27104
|
+
/* @__PURE__ */ jsx25(
|
|
27091
27105
|
Textarea,
|
|
27092
27106
|
{
|
|
27093
27107
|
id: "textarea-field",
|
|
@@ -27105,14 +27119,14 @@ var Textarea2 = ({ className, style, ...props }) => {
|
|
|
27105
27119
|
readOnly: isReadonly
|
|
27106
27120
|
}
|
|
27107
27121
|
),
|
|
27108
|
-
props.errorMessage && /* @__PURE__ */
|
|
27122
|
+
props.errorMessage && /* @__PURE__ */ jsx25("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27109
27123
|
] });
|
|
27110
27124
|
};
|
|
27111
27125
|
var Textarea_default = Textarea2;
|
|
27112
27126
|
|
|
27113
27127
|
// src/components/Inputs/UrlInput/UrlInput.tsx
|
|
27114
27128
|
import { useEffect as useEffect8 } from "react";
|
|
27115
|
-
import { Fragment as
|
|
27129
|
+
import { Fragment as Fragment8, jsx as jsx26, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
27116
27130
|
var UrlInput = ({ className, style, ...props }) => {
|
|
27117
27131
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
27118
27132
|
const isEditable = props.isEditable ?? true;
|
|
@@ -27128,10 +27142,10 @@ var UrlInput = ({ className, style, ...props }) => {
|
|
|
27128
27142
|
const handleChange = (e) => {
|
|
27129
27143
|
props.onChange?.(e);
|
|
27130
27144
|
};
|
|
27131
|
-
return /* @__PURE__ */ jsxs12(
|
|
27145
|
+
return /* @__PURE__ */ jsxs12(Fragment8, { children: [
|
|
27132
27146
|
/* @__PURE__ */ jsxs12("div", { className: "flex justify-start items-center relative", children: [
|
|
27133
|
-
/* @__PURE__ */
|
|
27134
|
-
/* @__PURE__ */
|
|
27147
|
+
/* @__PURE__ */ jsx26("div", { className: "bg-[#E9E9E9] absolute px-10 text-center top-1/2 h-full justify-center items-center flex w-10 -translate-y-1/2 text-[#383838] font-[500] text-[12px]", children: "https://" }),
|
|
27148
|
+
/* @__PURE__ */ jsx26(
|
|
27135
27149
|
Input,
|
|
27136
27150
|
{
|
|
27137
27151
|
id: "url-field",
|
|
@@ -27151,7 +27165,7 @@ var UrlInput = ({ className, style, ...props }) => {
|
|
|
27151
27165
|
}
|
|
27152
27166
|
)
|
|
27153
27167
|
] }),
|
|
27154
|
-
props.errorMessage && /* @__PURE__ */
|
|
27168
|
+
props.errorMessage && /* @__PURE__ */ jsx26("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27155
27169
|
] });
|
|
27156
27170
|
};
|
|
27157
27171
|
var UrlInput_default = UrlInput;
|
|
@@ -27161,12 +27175,12 @@ import { useEffect as useEffect9 } from "react";
|
|
|
27161
27175
|
|
|
27162
27176
|
// src/components/ui/checkbox.tsx
|
|
27163
27177
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
27164
|
-
import { jsx as
|
|
27178
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
27165
27179
|
function Checkbox({
|
|
27166
27180
|
className,
|
|
27167
27181
|
...props
|
|
27168
27182
|
}) {
|
|
27169
|
-
return /* @__PURE__ */
|
|
27183
|
+
return /* @__PURE__ */ jsx27(
|
|
27170
27184
|
CheckboxPrimitive.Root,
|
|
27171
27185
|
{
|
|
27172
27186
|
"data-slot": "checkbox",
|
|
@@ -27175,12 +27189,12 @@ function Checkbox({
|
|
|
27175
27189
|
className
|
|
27176
27190
|
),
|
|
27177
27191
|
...props,
|
|
27178
|
-
children: /* @__PURE__ */
|
|
27192
|
+
children: /* @__PURE__ */ jsx27(
|
|
27179
27193
|
CheckboxPrimitive.Indicator,
|
|
27180
27194
|
{
|
|
27181
27195
|
"data-slot": "checkbox-indicator",
|
|
27182
27196
|
className: "flex items-center justify-center text-current transition-none",
|
|
27183
|
-
children: /* @__PURE__ */
|
|
27197
|
+
children: /* @__PURE__ */ jsx27(Check, { className: "size-3.5" })
|
|
27184
27198
|
}
|
|
27185
27199
|
)
|
|
27186
27200
|
}
|
|
@@ -27189,12 +27203,12 @@ function Checkbox({
|
|
|
27189
27203
|
|
|
27190
27204
|
// src/components/ui/label.tsx
|
|
27191
27205
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
27192
|
-
import { jsx as
|
|
27206
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
27193
27207
|
function Label2({
|
|
27194
27208
|
className,
|
|
27195
27209
|
...props
|
|
27196
27210
|
}) {
|
|
27197
|
-
return /* @__PURE__ */
|
|
27211
|
+
return /* @__PURE__ */ jsx28(
|
|
27198
27212
|
LabelPrimitive.Root,
|
|
27199
27213
|
{
|
|
27200
27214
|
"data-slot": "label",
|
|
@@ -27208,7 +27222,7 @@ function Label2({
|
|
|
27208
27222
|
}
|
|
27209
27223
|
|
|
27210
27224
|
// src/components/Inputs/Checkbox/Checkbox.tsx
|
|
27211
|
-
import { Fragment as
|
|
27225
|
+
import { Fragment as Fragment9, jsx as jsx29, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
27212
27226
|
var CheckboxInput = ({ className, style, ...props }) => {
|
|
27213
27227
|
const isEditable = props.isEditable ?? true;
|
|
27214
27228
|
const isDisabled = props.isDisabled ?? false;
|
|
@@ -27221,9 +27235,9 @@ var CheckboxInput = ({ className, style, ...props }) => {
|
|
|
27221
27235
|
const handleChange = (value) => {
|
|
27222
27236
|
props.onChange?.(value);
|
|
27223
27237
|
};
|
|
27224
|
-
return /* @__PURE__ */ jsxs13(
|
|
27225
|
-
/* @__PURE__ */
|
|
27226
|
-
/* @__PURE__ */
|
|
27238
|
+
return /* @__PURE__ */ jsxs13(Fragment9, { children: [
|
|
27239
|
+
/* @__PURE__ */ jsx29("div", { className, style, children: /* @__PURE__ */ jsxs13("div", { className: "flex items-center space-x-2", children: [
|
|
27240
|
+
/* @__PURE__ */ jsx29(
|
|
27227
27241
|
Checkbox,
|
|
27228
27242
|
{
|
|
27229
27243
|
id: props.name || "checkbox",
|
|
@@ -27232,9 +27246,9 @@ var CheckboxInput = ({ className, style, ...props }) => {
|
|
|
27232
27246
|
disabled: !isEditable || isDisabled
|
|
27233
27247
|
}
|
|
27234
27248
|
),
|
|
27235
|
-
/* @__PURE__ */
|
|
27249
|
+
/* @__PURE__ */ jsx29(Label2, { htmlFor: props.name || "checkbox", children: text })
|
|
27236
27250
|
] }) }),
|
|
27237
|
-
props.errorMessage && /* @__PURE__ */
|
|
27251
|
+
props.errorMessage && /* @__PURE__ */ jsx29("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27238
27252
|
] });
|
|
27239
27253
|
};
|
|
27240
27254
|
var Checkbox_default = CheckboxInput;
|
|
@@ -27244,12 +27258,12 @@ import { useEffect as useEffect10 } from "react";
|
|
|
27244
27258
|
|
|
27245
27259
|
// src/components/ui/radio-group.tsx
|
|
27246
27260
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
27247
|
-
import { jsx as
|
|
27261
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
27248
27262
|
function RadioGroup2({
|
|
27249
27263
|
className,
|
|
27250
27264
|
...props
|
|
27251
27265
|
}) {
|
|
27252
|
-
return /* @__PURE__ */
|
|
27266
|
+
return /* @__PURE__ */ jsx30(
|
|
27253
27267
|
RadioGroupPrimitive.Root,
|
|
27254
27268
|
{
|
|
27255
27269
|
"data-slot": "radio-group",
|
|
@@ -27262,7 +27276,7 @@ function RadioGroupItem({
|
|
|
27262
27276
|
className,
|
|
27263
27277
|
...props
|
|
27264
27278
|
}) {
|
|
27265
|
-
return /* @__PURE__ */
|
|
27279
|
+
return /* @__PURE__ */ jsx30(
|
|
27266
27280
|
RadioGroupPrimitive.Item,
|
|
27267
27281
|
{
|
|
27268
27282
|
"data-slot": "radio-group-item",
|
|
@@ -27271,12 +27285,12 @@ function RadioGroupItem({
|
|
|
27271
27285
|
className
|
|
27272
27286
|
),
|
|
27273
27287
|
...props,
|
|
27274
|
-
children: /* @__PURE__ */
|
|
27288
|
+
children: /* @__PURE__ */ jsx30(
|
|
27275
27289
|
RadioGroupPrimitive.Indicator,
|
|
27276
27290
|
{
|
|
27277
27291
|
"data-slot": "radio-group-indicator",
|
|
27278
27292
|
className: "relative flex items-center justify-center",
|
|
27279
|
-
children: /* @__PURE__ */
|
|
27293
|
+
children: /* @__PURE__ */ jsx30(Circle, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
|
|
27280
27294
|
}
|
|
27281
27295
|
)
|
|
27282
27296
|
}
|
|
@@ -27284,7 +27298,7 @@ function RadioGroupItem({
|
|
|
27284
27298
|
}
|
|
27285
27299
|
|
|
27286
27300
|
// src/components/Inputs/RadioInput/RadioInput.tsx
|
|
27287
|
-
import { Fragment as
|
|
27301
|
+
import { Fragment as Fragment10, jsx as jsx31, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
27288
27302
|
var RadioInput = ({
|
|
27289
27303
|
className,
|
|
27290
27304
|
style,
|
|
@@ -27309,29 +27323,29 @@ var RadioInput = ({
|
|
|
27309
27323
|
onChange?.(value);
|
|
27310
27324
|
};
|
|
27311
27325
|
const resolvedDefaultValue = (typeof defaultValue === "string" ? defaultValue : void 0) ?? options[0]?.value;
|
|
27312
|
-
return /* @__PURE__ */ jsxs14(
|
|
27313
|
-
/* @__PURE__ */
|
|
27326
|
+
return /* @__PURE__ */ jsxs14(Fragment10, { children: [
|
|
27327
|
+
/* @__PURE__ */ jsx31("div", { className, style, children: /* @__PURE__ */ jsxs14(
|
|
27314
27328
|
RadioGroup2,
|
|
27315
27329
|
{
|
|
27316
27330
|
defaultValue: resolvedDefaultValue,
|
|
27317
27331
|
onValueChange: handleChange,
|
|
27318
27332
|
children: [
|
|
27319
|
-
options.length === 0 && /* @__PURE__ */
|
|
27333
|
+
options.length === 0 && /* @__PURE__ */ jsx31("div", { className: "text-sm text-gray-500", children: "No options available" }),
|
|
27320
27334
|
options.map((item) => /* @__PURE__ */ jsxs14("div", { className: "flex items-center space-x-2", children: [
|
|
27321
|
-
/* @__PURE__ */
|
|
27322
|
-
/* @__PURE__ */
|
|
27335
|
+
/* @__PURE__ */ jsx31(RadioGroupItem, { value: item.value, id: `radio-${item.value}` }),
|
|
27336
|
+
/* @__PURE__ */ jsx31(Label2, { htmlFor: `radio-${item.value}`, children: item.label })
|
|
27323
27337
|
] }, item.value))
|
|
27324
27338
|
]
|
|
27325
27339
|
}
|
|
27326
27340
|
) }),
|
|
27327
|
-
props.errorMessage && /* @__PURE__ */
|
|
27341
|
+
props.errorMessage && /* @__PURE__ */ jsx31("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27328
27342
|
] });
|
|
27329
27343
|
};
|
|
27330
27344
|
var RadioInput_default = RadioInput;
|
|
27331
27345
|
|
|
27332
27346
|
// src/components/Inputs/MultiCheckbox/MultiCheckbox.tsx
|
|
27333
27347
|
import { useCallback, useEffect as useEffect11, useState as useState3 } from "react";
|
|
27334
|
-
import { jsx as
|
|
27348
|
+
import { jsx as jsx32, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
27335
27349
|
var MultiCheckbox = ({
|
|
27336
27350
|
className,
|
|
27337
27351
|
style,
|
|
@@ -27370,9 +27384,9 @@ var MultiCheckbox = ({
|
|
|
27370
27384
|
className: cn("flex flex-col gap-3", className),
|
|
27371
27385
|
style,
|
|
27372
27386
|
children: [
|
|
27373
|
-
options.length === 0 && /* @__PURE__ */
|
|
27387
|
+
options.length === 0 && /* @__PURE__ */ jsx32("p", { className: "text-sm text-gray-500", children: "No options available." }),
|
|
27374
27388
|
options.map((opt) => /* @__PURE__ */ jsxs15("div", { className: "flex items-center space-x-2", children: [
|
|
27375
|
-
/* @__PURE__ */
|
|
27389
|
+
/* @__PURE__ */ jsx32(
|
|
27376
27390
|
Checkbox,
|
|
27377
27391
|
{
|
|
27378
27392
|
id: opt.value,
|
|
@@ -27381,7 +27395,7 @@ var MultiCheckbox = ({
|
|
|
27381
27395
|
disabled: !isEditable || isDisabled
|
|
27382
27396
|
}
|
|
27383
27397
|
),
|
|
27384
|
-
/* @__PURE__ */
|
|
27398
|
+
/* @__PURE__ */ jsx32(Label2, { htmlFor: opt.value, children: opt.label })
|
|
27385
27399
|
] }, opt.value))
|
|
27386
27400
|
]
|
|
27387
27401
|
}
|
|
@@ -27395,7 +27409,7 @@ import { useEffect as useEffect12 } from "react";
|
|
|
27395
27409
|
// src/components/Global/TinyMceEditor.tsx
|
|
27396
27410
|
import { useMemo as useMemo2, useRef } from "react";
|
|
27397
27411
|
import { Editor } from "@tinymce/tinymce-react";
|
|
27398
|
-
import { jsx as
|
|
27412
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
27399
27413
|
function MyEditor({
|
|
27400
27414
|
value,
|
|
27401
27415
|
onChange,
|
|
@@ -27420,7 +27434,7 @@ function MyEditor({
|
|
|
27420
27434
|
}
|
|
27421
27435
|
return toolbar;
|
|
27422
27436
|
}, [isDefault]);
|
|
27423
|
-
return /* @__PURE__ */
|
|
27437
|
+
return /* @__PURE__ */ jsx33(
|
|
27424
27438
|
Editor,
|
|
27425
27439
|
{
|
|
27426
27440
|
apiKey: process.env.NEXT_PUBLIC_TINYMCE_API_KEY,
|
|
@@ -27464,7 +27478,7 @@ function MyEditor({
|
|
|
27464
27478
|
}
|
|
27465
27479
|
|
|
27466
27480
|
// src/components/Inputs/RichText/RichText.tsx
|
|
27467
|
-
import { jsx as
|
|
27481
|
+
import { jsx as jsx34, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
27468
27482
|
function RichText({ className, style, ...props }) {
|
|
27469
27483
|
useEffect12(() => {
|
|
27470
27484
|
if (props.value !== void 0) {
|
|
@@ -27483,8 +27497,8 @@ function RichText({ className, style, ...props }) {
|
|
|
27483
27497
|
borderColor: props.errorMessage ? "#f87171" : style?.borderColor
|
|
27484
27498
|
},
|
|
27485
27499
|
children: [
|
|
27486
|
-
/* @__PURE__ */
|
|
27487
|
-
props.errorMessage && /* @__PURE__ */
|
|
27500
|
+
/* @__PURE__ */ jsx34(MyEditor, { onChange: handleChange, value: props.value || "", isDefault: true }),
|
|
27501
|
+
props.errorMessage && /* @__PURE__ */ jsx34("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27488
27502
|
]
|
|
27489
27503
|
}
|
|
27490
27504
|
);
|
|
@@ -27495,16 +27509,16 @@ import { useEffect as useEffect13 } from "react";
|
|
|
27495
27509
|
|
|
27496
27510
|
// src/components/ui/select.tsx
|
|
27497
27511
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
27498
|
-
import { jsx as
|
|
27512
|
+
import { jsx as jsx35, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
27499
27513
|
function Select({
|
|
27500
27514
|
...props
|
|
27501
27515
|
}) {
|
|
27502
|
-
return /* @__PURE__ */
|
|
27516
|
+
return /* @__PURE__ */ jsx35(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
27503
27517
|
}
|
|
27504
27518
|
function SelectValue({
|
|
27505
27519
|
...props
|
|
27506
27520
|
}) {
|
|
27507
|
-
return /* @__PURE__ */
|
|
27521
|
+
return /* @__PURE__ */ jsx35(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
27508
27522
|
}
|
|
27509
27523
|
function SelectTrigger({
|
|
27510
27524
|
className,
|
|
@@ -27524,7 +27538,7 @@ function SelectTrigger({
|
|
|
27524
27538
|
...props,
|
|
27525
27539
|
children: [
|
|
27526
27540
|
children,
|
|
27527
|
-
/* @__PURE__ */
|
|
27541
|
+
/* @__PURE__ */ jsx35(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx35(ChevronDown, { className: "size-4 opacity-50" }) })
|
|
27528
27542
|
]
|
|
27529
27543
|
}
|
|
27530
27544
|
);
|
|
@@ -27535,7 +27549,7 @@ function SelectContent({
|
|
|
27535
27549
|
position = "popper",
|
|
27536
27550
|
...props
|
|
27537
27551
|
}) {
|
|
27538
|
-
return /* @__PURE__ */
|
|
27552
|
+
return /* @__PURE__ */ jsx35(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs17(
|
|
27539
27553
|
SelectPrimitive.Content,
|
|
27540
27554
|
{
|
|
27541
27555
|
"data-slot": "select-content",
|
|
@@ -27547,8 +27561,8 @@ function SelectContent({
|
|
|
27547
27561
|
position,
|
|
27548
27562
|
...props,
|
|
27549
27563
|
children: [
|
|
27550
|
-
/* @__PURE__ */
|
|
27551
|
-
/* @__PURE__ */
|
|
27564
|
+
/* @__PURE__ */ jsx35(SelectScrollUpButton, {}),
|
|
27565
|
+
/* @__PURE__ */ jsx35(
|
|
27552
27566
|
SelectPrimitive.Viewport,
|
|
27553
27567
|
{
|
|
27554
27568
|
className: cn(
|
|
@@ -27558,7 +27572,7 @@ function SelectContent({
|
|
|
27558
27572
|
children
|
|
27559
27573
|
}
|
|
27560
27574
|
),
|
|
27561
|
-
/* @__PURE__ */
|
|
27575
|
+
/* @__PURE__ */ jsx35(SelectScrollDownButton, {})
|
|
27562
27576
|
]
|
|
27563
27577
|
}
|
|
27564
27578
|
) });
|
|
@@ -27578,8 +27592,8 @@ function SelectItem({
|
|
|
27578
27592
|
),
|
|
27579
27593
|
...props,
|
|
27580
27594
|
children: [
|
|
27581
|
-
/* @__PURE__ */
|
|
27582
|
-
/* @__PURE__ */
|
|
27595
|
+
/* @__PURE__ */ jsx35("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx35(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx35(Check, { className: "size-4" }) }) }),
|
|
27596
|
+
/* @__PURE__ */ jsx35(SelectPrimitive.ItemText, { children })
|
|
27583
27597
|
]
|
|
27584
27598
|
}
|
|
27585
27599
|
);
|
|
@@ -27588,7 +27602,7 @@ function SelectScrollUpButton({
|
|
|
27588
27602
|
className,
|
|
27589
27603
|
...props
|
|
27590
27604
|
}) {
|
|
27591
|
-
return /* @__PURE__ */
|
|
27605
|
+
return /* @__PURE__ */ jsx35(
|
|
27592
27606
|
SelectPrimitive.ScrollUpButton,
|
|
27593
27607
|
{
|
|
27594
27608
|
"data-slot": "select-scroll-up-button",
|
|
@@ -27597,7 +27611,7 @@ function SelectScrollUpButton({
|
|
|
27597
27611
|
className
|
|
27598
27612
|
),
|
|
27599
27613
|
...props,
|
|
27600
|
-
children: /* @__PURE__ */
|
|
27614
|
+
children: /* @__PURE__ */ jsx35(ChevronUp, { className: "size-4" })
|
|
27601
27615
|
}
|
|
27602
27616
|
);
|
|
27603
27617
|
}
|
|
@@ -27605,7 +27619,7 @@ function SelectScrollDownButton({
|
|
|
27605
27619
|
className,
|
|
27606
27620
|
...props
|
|
27607
27621
|
}) {
|
|
27608
|
-
return /* @__PURE__ */
|
|
27622
|
+
return /* @__PURE__ */ jsx35(
|
|
27609
27623
|
SelectPrimitive.ScrollDownButton,
|
|
27610
27624
|
{
|
|
27611
27625
|
"data-slot": "select-scroll-down-button",
|
|
@@ -27614,13 +27628,13 @@ function SelectScrollDownButton({
|
|
|
27614
27628
|
className
|
|
27615
27629
|
),
|
|
27616
27630
|
...props,
|
|
27617
|
-
children: /* @__PURE__ */
|
|
27631
|
+
children: /* @__PURE__ */ jsx35(ChevronDown, { className: "size-4" })
|
|
27618
27632
|
}
|
|
27619
27633
|
);
|
|
27620
27634
|
}
|
|
27621
27635
|
|
|
27622
27636
|
// src/components/Inputs/Dropdown/Dropdown.tsx
|
|
27623
|
-
import { Fragment as
|
|
27637
|
+
import { Fragment as Fragment11, jsx as jsx36, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
27624
27638
|
var Dropdown = ({ className, style, ...props }) => {
|
|
27625
27639
|
const list = Array.isArray(props?.data) ? props.data : [];
|
|
27626
27640
|
const placeholder = props.placeholder ? props.placeholder : "Placeholder text";
|
|
@@ -27641,9 +27655,9 @@ var Dropdown = ({ className, style, ...props }) => {
|
|
|
27641
27655
|
value: item[dataKey],
|
|
27642
27656
|
label: item[dataLabel]
|
|
27643
27657
|
}));
|
|
27644
|
-
return /* @__PURE__ */ jsxs18(
|
|
27658
|
+
return /* @__PURE__ */ jsxs18(Fragment11, { children: [
|
|
27645
27659
|
/* @__PURE__ */ jsxs18(Select, { name: props.name, value: props.value || "", onValueChange: handleChange, disabled: isDisabled || !isEditable, children: [
|
|
27646
|
-
/* @__PURE__ */
|
|
27660
|
+
/* @__PURE__ */ jsx36(
|
|
27647
27661
|
SelectTrigger,
|
|
27648
27662
|
{
|
|
27649
27663
|
id: props.name || "select-field",
|
|
@@ -27653,16 +27667,16 @@ var Dropdown = ({ className, style, ...props }) => {
|
|
|
27653
27667
|
borderColor: props.errorMessage ? "#f87171" : style?.borderColor
|
|
27654
27668
|
},
|
|
27655
27669
|
"aria-readonly": isReadonly,
|
|
27656
|
-
children: /* @__PURE__ */
|
|
27670
|
+
children: /* @__PURE__ */ jsx36(SelectValue, { placeholder })
|
|
27657
27671
|
}
|
|
27658
27672
|
),
|
|
27659
27673
|
/* @__PURE__ */ jsxs18(SelectContent, { children: [
|
|
27660
|
-
props.dataLoading && /* @__PURE__ */
|
|
27661
|
-
!props.dataLoading && options.length === 0 && /* @__PURE__ */
|
|
27662
|
-
options.map((opt) => /* @__PURE__ */
|
|
27674
|
+
props.dataLoading && /* @__PURE__ */ jsx36(SelectItem, { value: "none", disabled: true, children: "Loading..." }),
|
|
27675
|
+
!props.dataLoading && options.length === 0 && /* @__PURE__ */ jsx36(SelectItem, { value: "none", disabled: true, children: "No options" }),
|
|
27676
|
+
options.map((opt) => /* @__PURE__ */ jsx36(SelectItem, { value: opt.value, children: opt.label }, opt.value))
|
|
27663
27677
|
] })
|
|
27664
27678
|
] }),
|
|
27665
|
-
props.errorMessage && /* @__PURE__ */
|
|
27679
|
+
props.errorMessage && /* @__PURE__ */ jsx36("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27666
27680
|
] });
|
|
27667
27681
|
};
|
|
27668
27682
|
var Dropdown_default = Dropdown;
|
|
@@ -27672,12 +27686,12 @@ import { useEffect as useEffect14 } from "react";
|
|
|
27672
27686
|
|
|
27673
27687
|
// src/components/ui/switch.tsx
|
|
27674
27688
|
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
27675
|
-
import { jsx as
|
|
27689
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
27676
27690
|
function Switch({
|
|
27677
27691
|
className,
|
|
27678
27692
|
...props
|
|
27679
27693
|
}) {
|
|
27680
|
-
return /* @__PURE__ */
|
|
27694
|
+
return /* @__PURE__ */ jsx37(
|
|
27681
27695
|
SwitchPrimitive.Root,
|
|
27682
27696
|
{
|
|
27683
27697
|
"data-slot": "switch",
|
|
@@ -27686,7 +27700,7 @@ function Switch({
|
|
|
27686
27700
|
className
|
|
27687
27701
|
),
|
|
27688
27702
|
...props,
|
|
27689
|
-
children: /* @__PURE__ */
|
|
27703
|
+
children: /* @__PURE__ */ jsx37(
|
|
27690
27704
|
SwitchPrimitive.Thumb,
|
|
27691
27705
|
{
|
|
27692
27706
|
"data-slot": "switch-thumb",
|
|
@@ -27700,7 +27714,7 @@ function Switch({
|
|
|
27700
27714
|
}
|
|
27701
27715
|
|
|
27702
27716
|
// src/components/Inputs/SwitchToggle/SwitchToggle.tsx
|
|
27703
|
-
import { Fragment as
|
|
27717
|
+
import { Fragment as Fragment12, jsx as jsx38, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
27704
27718
|
var SwitchToggle = ({ className, style, ...props }) => {
|
|
27705
27719
|
const isEditable = props.isEditable ?? true;
|
|
27706
27720
|
const isDisabled = props.isDisabled ?? false;
|
|
@@ -27712,9 +27726,9 @@ var SwitchToggle = ({ className, style, ...props }) => {
|
|
|
27712
27726
|
const handleChange = (value) => {
|
|
27713
27727
|
props.onChange?.(value);
|
|
27714
27728
|
};
|
|
27715
|
-
return /* @__PURE__ */ jsxs19(
|
|
27716
|
-
/* @__PURE__ */
|
|
27717
|
-
/* @__PURE__ */
|
|
27729
|
+
return /* @__PURE__ */ jsxs19(Fragment12, { children: [
|
|
27730
|
+
/* @__PURE__ */ jsx38("div", { className, style, children: /* @__PURE__ */ jsxs19("div", { className: "flex items-center space-x-2 mb-2", children: [
|
|
27731
|
+
/* @__PURE__ */ jsx38(
|
|
27718
27732
|
Switch,
|
|
27719
27733
|
{
|
|
27720
27734
|
id: props.name || "switch",
|
|
@@ -27723,9 +27737,9 @@ var SwitchToggle = ({ className, style, ...props }) => {
|
|
|
27723
27737
|
disabled: isDisabled || !isEditable
|
|
27724
27738
|
}
|
|
27725
27739
|
),
|
|
27726
|
-
/* @__PURE__ */
|
|
27740
|
+
/* @__PURE__ */ jsx38(Label2, { htmlFor: props.name || "switch", children: props.text })
|
|
27727
27741
|
] }) }),
|
|
27728
|
-
props.errorMessage && /* @__PURE__ */
|
|
27742
|
+
props.errorMessage && /* @__PURE__ */ jsx38("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27729
27743
|
] });
|
|
27730
27744
|
};
|
|
27731
27745
|
var SwitchToggle_default = SwitchToggle;
|
|
@@ -27734,7 +27748,7 @@ var SwitchToggle_default = SwitchToggle;
|
|
|
27734
27748
|
import { useEffect as useEffect15 } from "react";
|
|
27735
27749
|
import { PhoneInput as PhoneInputField } from "react-international-phone";
|
|
27736
27750
|
import "react-international-phone/style.css";
|
|
27737
|
-
import { Fragment as
|
|
27751
|
+
import { Fragment as Fragment13, jsx as jsx39, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
27738
27752
|
var PhoneInput = ({ className, style, ...props }) => {
|
|
27739
27753
|
const placeholder = props.placeholder ?? "Enter phone number";
|
|
27740
27754
|
const isEditable = props.isEditable ?? true;
|
|
@@ -27747,8 +27761,8 @@ var PhoneInput = ({ className, style, ...props }) => {
|
|
|
27747
27761
|
const handleChange = (val) => {
|
|
27748
27762
|
props.onChange?.(val);
|
|
27749
27763
|
};
|
|
27750
|
-
return /* @__PURE__ */ jsxs20(
|
|
27751
|
-
/* @__PURE__ */
|
|
27764
|
+
return /* @__PURE__ */ jsxs20(Fragment13, { children: [
|
|
27765
|
+
/* @__PURE__ */ jsx39(
|
|
27752
27766
|
PhoneInputField,
|
|
27753
27767
|
{
|
|
27754
27768
|
defaultCountry: "in",
|
|
@@ -27772,14 +27786,14 @@ var PhoneInput = ({ className, style, ...props }) => {
|
|
|
27772
27786
|
disabled: isDisabled || !isEditable
|
|
27773
27787
|
}
|
|
27774
27788
|
),
|
|
27775
|
-
props.errorMessage && /* @__PURE__ */
|
|
27789
|
+
props.errorMessage && /* @__PURE__ */ jsx39("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27776
27790
|
] });
|
|
27777
27791
|
};
|
|
27778
27792
|
var PhoneInput_default = PhoneInput;
|
|
27779
27793
|
|
|
27780
27794
|
// src/components/Inputs/SearchInput/SearchInput.tsx
|
|
27781
27795
|
import { useEffect as useEffect16 } from "react";
|
|
27782
|
-
import { Fragment as
|
|
27796
|
+
import { Fragment as Fragment14, jsx as jsx40, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
27783
27797
|
var SearchInput = ({ className, style, ...props }) => {
|
|
27784
27798
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
27785
27799
|
const isEditable = props.isEditable ?? true;
|
|
@@ -27795,37 +27809,34 @@ var SearchInput = ({ className, style, ...props }) => {
|
|
|
27795
27809
|
const handleChange = (e) => {
|
|
27796
27810
|
props.onChange?.(e);
|
|
27797
27811
|
};
|
|
27798
|
-
return /* @__PURE__ */ jsxs21(
|
|
27799
|
-
/* @__PURE__ */
|
|
27800
|
-
|
|
27801
|
-
|
|
27802
|
-
|
|
27803
|
-
|
|
27804
|
-
|
|
27805
|
-
|
|
27806
|
-
|
|
27807
|
-
|
|
27808
|
-
|
|
27809
|
-
|
|
27810
|
-
|
|
27811
|
-
|
|
27812
|
-
|
|
27813
|
-
|
|
27814
|
-
|
|
27815
|
-
|
|
27816
|
-
|
|
27817
|
-
|
|
27818
|
-
|
|
27819
|
-
)
|
|
27820
|
-
] }),
|
|
27821
|
-
props.errorMessage && /* @__PURE__ */ jsx39("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27812
|
+
return /* @__PURE__ */ jsxs21(Fragment14, { children: [
|
|
27813
|
+
/* @__PURE__ */ jsx40("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx40(
|
|
27814
|
+
Input,
|
|
27815
|
+
{
|
|
27816
|
+
type: "text",
|
|
27817
|
+
id: props.name || "text-field",
|
|
27818
|
+
name: props.name,
|
|
27819
|
+
value: props.value || "",
|
|
27820
|
+
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
27821
|
+
style: {
|
|
27822
|
+
...style,
|
|
27823
|
+
borderColor: props.errorMessage ? "#f87171" : style?.borderColor
|
|
27824
|
+
},
|
|
27825
|
+
autoComplete: isAutocomplete ? "on" : "off",
|
|
27826
|
+
placeholder,
|
|
27827
|
+
onChange: handleChange,
|
|
27828
|
+
disabled: isDisabled || !isEditable,
|
|
27829
|
+
readOnly: isReadonly
|
|
27830
|
+
}
|
|
27831
|
+
) }),
|
|
27832
|
+
props.errorMessage && /* @__PURE__ */ jsx40("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27822
27833
|
] });
|
|
27823
27834
|
};
|
|
27824
27835
|
var SearchInput_default = SearchInput;
|
|
27825
27836
|
|
|
27826
27837
|
// src/components/Inputs/FileInput/FileInput.tsx
|
|
27827
27838
|
import { useEffect as useEffect17 } from "react";
|
|
27828
|
-
import { jsx as
|
|
27839
|
+
import { jsx as jsx41, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
27829
27840
|
var FileInput2 = ({ className, style, ...props }) => {
|
|
27830
27841
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
27831
27842
|
useEffect17(() => {
|
|
@@ -27838,7 +27849,7 @@ var FileInput2 = ({ className, style, ...props }) => {
|
|
|
27838
27849
|
props.onChange?.(e);
|
|
27839
27850
|
};
|
|
27840
27851
|
return /* @__PURE__ */ jsxs22("div", { className: "d-flex items-center relative align-middle", children: [
|
|
27841
|
-
/* @__PURE__ */
|
|
27852
|
+
/* @__PURE__ */ jsx41(
|
|
27842
27853
|
Input,
|
|
27843
27854
|
{
|
|
27844
27855
|
type: "file",
|
|
@@ -27855,14 +27866,14 @@ var FileInput2 = ({ className, style, ...props }) => {
|
|
|
27855
27866
|
onChange: handleChange
|
|
27856
27867
|
}
|
|
27857
27868
|
),
|
|
27858
|
-
props.errorMessage && /* @__PURE__ */
|
|
27869
|
+
props.errorMessage && /* @__PURE__ */ jsx41("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27859
27870
|
] });
|
|
27860
27871
|
};
|
|
27861
27872
|
var FileInput_default = FileInput2;
|
|
27862
27873
|
|
|
27863
27874
|
// src/components/Inputs/DatePicker/DatePicker.tsx
|
|
27864
27875
|
import { useEffect as useEffect18 } from "react";
|
|
27865
|
-
import { Fragment as
|
|
27876
|
+
import { Fragment as Fragment15, jsx as jsx42, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
27866
27877
|
function DatePicker({ className, style, ...props }) {
|
|
27867
27878
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
27868
27879
|
const minimumDate = props.minimumDate ?? "none";
|
|
@@ -27899,47 +27910,44 @@ function DatePicker({ className, style, ...props }) {
|
|
|
27899
27910
|
if (!value) return "";
|
|
27900
27911
|
return new Date(value).toISOString().split("T")[0];
|
|
27901
27912
|
};
|
|
27902
|
-
return /* @__PURE__ */ jsxs23(
|
|
27903
|
-
/* @__PURE__ */
|
|
27904
|
-
|
|
27905
|
-
|
|
27906
|
-
|
|
27907
|
-
|
|
27908
|
-
|
|
27909
|
-
|
|
27910
|
-
|
|
27911
|
-
|
|
27912
|
-
|
|
27913
|
-
|
|
27914
|
-
|
|
27915
|
-
|
|
27916
|
-
|
|
27917
|
-
|
|
27918
|
-
|
|
27919
|
-
|
|
27920
|
-
|
|
27921
|
-
|
|
27922
|
-
|
|
27923
|
-
|
|
27924
|
-
|
|
27925
|
-
|
|
27926
|
-
|
|
27927
|
-
|
|
27928
|
-
|
|
27929
|
-
)
|
|
27930
|
-
] }),
|
|
27931
|
-
props.errorMessage && /* @__PURE__ */ jsx41("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27913
|
+
return /* @__PURE__ */ jsxs23(Fragment15, { children: [
|
|
27914
|
+
/* @__PURE__ */ jsx42("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx42(
|
|
27915
|
+
Input,
|
|
27916
|
+
{
|
|
27917
|
+
type: "date",
|
|
27918
|
+
id: "date",
|
|
27919
|
+
autoComplete: isAutocomplete ? "on" : "off",
|
|
27920
|
+
onChange: handleChange,
|
|
27921
|
+
disabled: isDisabled || !isEditable,
|
|
27922
|
+
name: props.name,
|
|
27923
|
+
value: toDateInputValue(props.value),
|
|
27924
|
+
className: cn(
|
|
27925
|
+
className,
|
|
27926
|
+
props.errorMessage ? "border-red-500" : "",
|
|
27927
|
+
"appearance-auto"
|
|
27928
|
+
),
|
|
27929
|
+
style: {
|
|
27930
|
+
...style,
|
|
27931
|
+
borderColor: props.errorMessage ? "#f87171" : style?.borderColor
|
|
27932
|
+
},
|
|
27933
|
+
readOnly: isReadonly,
|
|
27934
|
+
placeholder,
|
|
27935
|
+
min: minDate,
|
|
27936
|
+
max: maxDate
|
|
27937
|
+
}
|
|
27938
|
+
) }),
|
|
27939
|
+
props.errorMessage && /* @__PURE__ */ jsx42("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27932
27940
|
] });
|
|
27933
27941
|
}
|
|
27934
27942
|
|
|
27935
27943
|
// src/components/Inputs/DateRange/DateRange.tsx
|
|
27936
|
-
import
|
|
27944
|
+
import React7, { useEffect as useEffect20 } from "react";
|
|
27937
27945
|
import { addDays, format } from "date-fns";
|
|
27938
27946
|
|
|
27939
27947
|
// src/components/ui/calendar.tsx
|
|
27940
|
-
import * as
|
|
27948
|
+
import * as React6 from "react";
|
|
27941
27949
|
import { DayPicker, getDefaultClassNames } from "react-day-picker";
|
|
27942
|
-
import { jsx as
|
|
27950
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
27943
27951
|
function Calendar2({
|
|
27944
27952
|
className,
|
|
27945
27953
|
classNames,
|
|
@@ -27951,7 +27959,7 @@ function Calendar2({
|
|
|
27951
27959
|
...props
|
|
27952
27960
|
}) {
|
|
27953
27961
|
const defaultClassNames = getDefaultClassNames();
|
|
27954
|
-
return /* @__PURE__ */
|
|
27962
|
+
return /* @__PURE__ */ jsx43(
|
|
27955
27963
|
DayPicker,
|
|
27956
27964
|
{
|
|
27957
27965
|
showOutsideDays,
|
|
@@ -28050,7 +28058,7 @@ function Calendar2({
|
|
|
28050
28058
|
},
|
|
28051
28059
|
components: {
|
|
28052
28060
|
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
28053
|
-
return /* @__PURE__ */
|
|
28061
|
+
return /* @__PURE__ */ jsx43(
|
|
28054
28062
|
"div",
|
|
28055
28063
|
{
|
|
28056
28064
|
"data-slot": "calendar",
|
|
@@ -28062,10 +28070,10 @@ function Calendar2({
|
|
|
28062
28070
|
},
|
|
28063
28071
|
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
28064
28072
|
if (orientation === "left") {
|
|
28065
|
-
return /* @__PURE__ */
|
|
28073
|
+
return /* @__PURE__ */ jsx43(ChevronLeft, { className: cn("size-4", className2), ...props2 });
|
|
28066
28074
|
}
|
|
28067
28075
|
if (orientation === "right") {
|
|
28068
|
-
return /* @__PURE__ */
|
|
28076
|
+
return /* @__PURE__ */ jsx43(
|
|
28069
28077
|
ChevronRight,
|
|
28070
28078
|
{
|
|
28071
28079
|
className: cn("size-4", className2),
|
|
@@ -28073,11 +28081,11 @@ function Calendar2({
|
|
|
28073
28081
|
}
|
|
28074
28082
|
);
|
|
28075
28083
|
}
|
|
28076
|
-
return /* @__PURE__ */
|
|
28084
|
+
return /* @__PURE__ */ jsx43(ChevronDown, { className: cn("size-4", className2), ...props2 });
|
|
28077
28085
|
},
|
|
28078
28086
|
DayButton: CalendarDayButton,
|
|
28079
28087
|
WeekNumber: ({ children, ...props2 }) => {
|
|
28080
|
-
return /* @__PURE__ */
|
|
28088
|
+
return /* @__PURE__ */ jsx43("td", { ...props2, children: /* @__PURE__ */ jsx43("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
|
|
28081
28089
|
},
|
|
28082
28090
|
...components
|
|
28083
28091
|
},
|
|
@@ -28092,11 +28100,11 @@ function CalendarDayButton({
|
|
|
28092
28100
|
...props
|
|
28093
28101
|
}) {
|
|
28094
28102
|
const defaultClassNames = getDefaultClassNames();
|
|
28095
|
-
const ref =
|
|
28096
|
-
|
|
28103
|
+
const ref = React6.useRef(null);
|
|
28104
|
+
React6.useEffect(() => {
|
|
28097
28105
|
if (modifiers.focused) ref.current?.focus();
|
|
28098
28106
|
}, [modifiers.focused]);
|
|
28099
|
-
return /* @__PURE__ */
|
|
28107
|
+
return /* @__PURE__ */ jsx43(
|
|
28100
28108
|
Button,
|
|
28101
28109
|
{
|
|
28102
28110
|
ref,
|
|
@@ -28119,16 +28127,16 @@ function CalendarDayButton({
|
|
|
28119
28127
|
|
|
28120
28128
|
// src/components/ui/popover.tsx
|
|
28121
28129
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
28122
|
-
import { jsx as
|
|
28130
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
28123
28131
|
function Popover({
|
|
28124
28132
|
...props
|
|
28125
28133
|
}) {
|
|
28126
|
-
return /* @__PURE__ */
|
|
28134
|
+
return /* @__PURE__ */ jsx44(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
28127
28135
|
}
|
|
28128
28136
|
function PopoverTrigger({
|
|
28129
28137
|
...props
|
|
28130
28138
|
}) {
|
|
28131
|
-
return /* @__PURE__ */
|
|
28139
|
+
return /* @__PURE__ */ jsx44(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
28132
28140
|
}
|
|
28133
28141
|
function PopoverContent({
|
|
28134
28142
|
className,
|
|
@@ -28136,7 +28144,7 @@ function PopoverContent({
|
|
|
28136
28144
|
sideOffset = 4,
|
|
28137
28145
|
...props
|
|
28138
28146
|
}) {
|
|
28139
|
-
return /* @__PURE__ */
|
|
28147
|
+
return /* @__PURE__ */ jsx44(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx44(
|
|
28140
28148
|
PopoverPrimitive.Content,
|
|
28141
28149
|
{
|
|
28142
28150
|
"data-slot": "popover-content",
|
|
@@ -28152,10 +28160,10 @@ function PopoverContent({
|
|
|
28152
28160
|
}
|
|
28153
28161
|
|
|
28154
28162
|
// src/components/Inputs/DateRange/DateRange.tsx
|
|
28155
|
-
import { Fragment as
|
|
28163
|
+
import { Fragment as Fragment16, jsx as jsx45, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
28156
28164
|
var DateRange = ({ className, style, ...props }) => {
|
|
28157
28165
|
const isDateRange = (val) => !!val && val.from instanceof Date;
|
|
28158
|
-
const [date, setDate] =
|
|
28166
|
+
const [date, setDate] = React7.useState(
|
|
28159
28167
|
isDateRange(props.value) ? props.value : {
|
|
28160
28168
|
from: /* @__PURE__ */ new Date(),
|
|
28161
28169
|
to: addDays(/* @__PURE__ */ new Date(), 7)
|
|
@@ -28172,9 +28180,9 @@ var DateRange = ({ className, style, ...props }) => {
|
|
|
28172
28180
|
props.onChange?.(value);
|
|
28173
28181
|
}
|
|
28174
28182
|
};
|
|
28175
|
-
return /* @__PURE__ */ jsxs24(
|
|
28176
|
-
/* @__PURE__ */
|
|
28177
|
-
/* @__PURE__ */
|
|
28183
|
+
return /* @__PURE__ */ jsxs24(Fragment16, { children: [
|
|
28184
|
+
/* @__PURE__ */ jsx45("div", { className, style, children: /* @__PURE__ */ jsxs24(Popover, { children: [
|
|
28185
|
+
/* @__PURE__ */ jsx45(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx45(
|
|
28178
28186
|
Button,
|
|
28179
28187
|
{
|
|
28180
28188
|
id: "date",
|
|
@@ -28183,15 +28191,15 @@ var DateRange = ({ className, style, ...props }) => {
|
|
|
28183
28191
|
"w-full justify-start text-left font-normal text-[11px] border-[#BDBDBD]",
|
|
28184
28192
|
!date && "text-muted-foreground"
|
|
28185
28193
|
),
|
|
28186
|
-
children: date?.from ? date.to ? /* @__PURE__ */ jsxs24(
|
|
28194
|
+
children: date?.from ? date.to ? /* @__PURE__ */ jsxs24(Fragment16, { children: [
|
|
28187
28195
|
format(date.from, "LLL dd, y"),
|
|
28188
28196
|
" -",
|
|
28189
28197
|
" ",
|
|
28190
28198
|
format(date.to, "LLL dd, y")
|
|
28191
|
-
] }) : format(date.from, "LLL dd, y") : /* @__PURE__ */
|
|
28199
|
+
] }) : format(date.from, "LLL dd, y") : /* @__PURE__ */ jsx45("span", { children: "Pick a date range" })
|
|
28192
28200
|
}
|
|
28193
28201
|
) }),
|
|
28194
|
-
/* @__PURE__ */
|
|
28202
|
+
/* @__PURE__ */ jsx45(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx45(
|
|
28195
28203
|
Calendar2,
|
|
28196
28204
|
{
|
|
28197
28205
|
mode: "range",
|
|
@@ -28202,14 +28210,14 @@ var DateRange = ({ className, style, ...props }) => {
|
|
|
28202
28210
|
}
|
|
28203
28211
|
) })
|
|
28204
28212
|
] }) }),
|
|
28205
|
-
props.errorMessage && /* @__PURE__ */
|
|
28213
|
+
props.errorMessage && /* @__PURE__ */ jsx45("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
28206
28214
|
] });
|
|
28207
28215
|
};
|
|
28208
28216
|
var DateRange_default = DateRange;
|
|
28209
28217
|
|
|
28210
28218
|
// src/components/Inputs/TextInputGroup/TextInputGroup.tsx
|
|
28211
28219
|
import { useEffect as useEffect21 } from "react";
|
|
28212
|
-
import { Fragment as
|
|
28220
|
+
import { Fragment as Fragment17, jsx as jsx46, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
28213
28221
|
var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
|
|
28214
28222
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
28215
28223
|
const isEditable = props.isEditable ?? true;
|
|
@@ -28225,7 +28233,7 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
|
|
|
28225
28233
|
const handleChange = (e) => {
|
|
28226
28234
|
props.onChange?.(e);
|
|
28227
28235
|
};
|
|
28228
|
-
return /* @__PURE__ */ jsxs25(
|
|
28236
|
+
return /* @__PURE__ */ jsxs25(Fragment17, { children: [
|
|
28229
28237
|
/* @__PURE__ */ jsxs25(
|
|
28230
28238
|
"div",
|
|
28231
28239
|
{
|
|
@@ -28236,8 +28244,8 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
|
|
|
28236
28244
|
props.errorMessage ? "border-red-500" : ""
|
|
28237
28245
|
),
|
|
28238
28246
|
children: [
|
|
28239
|
-
prepend && /* @__PURE__ */
|
|
28240
|
-
/* @__PURE__ */
|
|
28247
|
+
prepend && /* @__PURE__ */ jsx46("div", { className: "px-3 flex items-center bg-gray-500 text-white h-10 rounded-l-md", children: prepend }),
|
|
28248
|
+
/* @__PURE__ */ jsx46(
|
|
28241
28249
|
Input,
|
|
28242
28250
|
{
|
|
28243
28251
|
id: props.name || "prepend-input",
|
|
@@ -28259,39 +28267,39 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
|
|
|
28259
28267
|
readOnly: isReadonly
|
|
28260
28268
|
}
|
|
28261
28269
|
),
|
|
28262
|
-
append && /* @__PURE__ */
|
|
28270
|
+
append && /* @__PURE__ */ jsx46("div", { className: "px-3 flex items-center bg-gray-500 text-white h-10 rounded-r-md", children: append })
|
|
28263
28271
|
]
|
|
28264
28272
|
}
|
|
28265
28273
|
),
|
|
28266
|
-
props.errorMessage && /* @__PURE__ */
|
|
28274
|
+
props.errorMessage && /* @__PURE__ */ jsx46("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
28267
28275
|
] });
|
|
28268
28276
|
};
|
|
28269
28277
|
var TextInputGroup_default = TextInputGroup;
|
|
28270
28278
|
|
|
28271
28279
|
// src/components/Inputs/Multiselect/MultiSelect.tsx
|
|
28272
|
-
import * as
|
|
28280
|
+
import * as React8 from "react";
|
|
28273
28281
|
|
|
28274
28282
|
// src/components/ui/command.tsx
|
|
28275
28283
|
import { Command as CommandPrimitive } from "cmdk";
|
|
28276
28284
|
|
|
28277
28285
|
// src/components/ui/dialog.tsx
|
|
28278
28286
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
28279
|
-
import { jsx as
|
|
28287
|
+
import { jsx as jsx47, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
28280
28288
|
function Dialog({
|
|
28281
28289
|
...props
|
|
28282
28290
|
}) {
|
|
28283
|
-
return /* @__PURE__ */
|
|
28291
|
+
return /* @__PURE__ */ jsx47(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
|
|
28284
28292
|
}
|
|
28285
28293
|
function DialogPortal({
|
|
28286
28294
|
...props
|
|
28287
28295
|
}) {
|
|
28288
|
-
return /* @__PURE__ */
|
|
28296
|
+
return /* @__PURE__ */ jsx47(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
|
|
28289
28297
|
}
|
|
28290
28298
|
function DialogOverlay({
|
|
28291
28299
|
className,
|
|
28292
28300
|
...props
|
|
28293
28301
|
}) {
|
|
28294
|
-
return /* @__PURE__ */
|
|
28302
|
+
return /* @__PURE__ */ jsx47(
|
|
28295
28303
|
DialogPrimitive.Overlay,
|
|
28296
28304
|
{
|
|
28297
28305
|
"data-slot": "dialog-overlay",
|
|
@@ -28310,7 +28318,7 @@ function DialogContent({
|
|
|
28310
28318
|
...props
|
|
28311
28319
|
}) {
|
|
28312
28320
|
return /* @__PURE__ */ jsxs26(DialogPortal, { "data-slot": "dialog-portal", children: [
|
|
28313
|
-
/* @__PURE__ */
|
|
28321
|
+
/* @__PURE__ */ jsx47(DialogOverlay, {}),
|
|
28314
28322
|
/* @__PURE__ */ jsxs26(
|
|
28315
28323
|
DialogPrimitive.Content,
|
|
28316
28324
|
{
|
|
@@ -28328,8 +28336,8 @@ function DialogContent({
|
|
|
28328
28336
|
"data-slot": "dialog-close",
|
|
28329
28337
|
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
28330
28338
|
children: [
|
|
28331
|
-
/* @__PURE__ */
|
|
28332
|
-
/* @__PURE__ */
|
|
28339
|
+
/* @__PURE__ */ jsx47(X, {}),
|
|
28340
|
+
/* @__PURE__ */ jsx47("span", { className: "sr-only", children: "Close" })
|
|
28333
28341
|
]
|
|
28334
28342
|
}
|
|
28335
28343
|
)
|
|
@@ -28339,7 +28347,7 @@ function DialogContent({
|
|
|
28339
28347
|
] });
|
|
28340
28348
|
}
|
|
28341
28349
|
function DialogHeader({ className, ...props }) {
|
|
28342
|
-
return /* @__PURE__ */
|
|
28350
|
+
return /* @__PURE__ */ jsx47(
|
|
28343
28351
|
"div",
|
|
28344
28352
|
{
|
|
28345
28353
|
"data-slot": "dialog-header",
|
|
@@ -28349,7 +28357,7 @@ function DialogHeader({ className, ...props }) {
|
|
|
28349
28357
|
);
|
|
28350
28358
|
}
|
|
28351
28359
|
function DialogFooter({ className, ...props }) {
|
|
28352
|
-
return /* @__PURE__ */
|
|
28360
|
+
return /* @__PURE__ */ jsx47(
|
|
28353
28361
|
"div",
|
|
28354
28362
|
{
|
|
28355
28363
|
"data-slot": "dialog-footer",
|
|
@@ -28365,7 +28373,7 @@ function DialogTitle({
|
|
|
28365
28373
|
className,
|
|
28366
28374
|
...props
|
|
28367
28375
|
}) {
|
|
28368
|
-
return /* @__PURE__ */
|
|
28376
|
+
return /* @__PURE__ */ jsx47(
|
|
28369
28377
|
DialogPrimitive.Title,
|
|
28370
28378
|
{
|
|
28371
28379
|
"data-slot": "dialog-title",
|
|
@@ -28378,7 +28386,7 @@ function DialogDescription({
|
|
|
28378
28386
|
className,
|
|
28379
28387
|
...props
|
|
28380
28388
|
}) {
|
|
28381
|
-
return /* @__PURE__ */
|
|
28389
|
+
return /* @__PURE__ */ jsx47(
|
|
28382
28390
|
DialogPrimitive.Description,
|
|
28383
28391
|
{
|
|
28384
28392
|
"data-slot": "dialog-description",
|
|
@@ -28389,12 +28397,12 @@ function DialogDescription({
|
|
|
28389
28397
|
}
|
|
28390
28398
|
|
|
28391
28399
|
// src/components/ui/command.tsx
|
|
28392
|
-
import { jsx as
|
|
28400
|
+
import { jsx as jsx48, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
28393
28401
|
function Command2({
|
|
28394
28402
|
className,
|
|
28395
28403
|
...props
|
|
28396
28404
|
}) {
|
|
28397
|
-
return /* @__PURE__ */
|
|
28405
|
+
return /* @__PURE__ */ jsx48(
|
|
28398
28406
|
CommandPrimitive,
|
|
28399
28407
|
{
|
|
28400
28408
|
"data-slot": "command",
|
|
@@ -28416,8 +28424,8 @@ function CommandInput({
|
|
|
28416
28424
|
"data-slot": "command-input-wrapper",
|
|
28417
28425
|
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
28418
28426
|
children: [
|
|
28419
|
-
/* @__PURE__ */
|
|
28420
|
-
/* @__PURE__ */
|
|
28427
|
+
/* @__PURE__ */ jsx48(Search, { className: "size-4 shrink-0 opacity-50" }),
|
|
28428
|
+
/* @__PURE__ */ jsx48(
|
|
28421
28429
|
CommandPrimitive.Input,
|
|
28422
28430
|
{
|
|
28423
28431
|
"data-slot": "command-input",
|
|
@@ -28436,7 +28444,7 @@ function CommandList({
|
|
|
28436
28444
|
className,
|
|
28437
28445
|
...props
|
|
28438
28446
|
}) {
|
|
28439
|
-
return /* @__PURE__ */
|
|
28447
|
+
return /* @__PURE__ */ jsx48(
|
|
28440
28448
|
CommandPrimitive.List,
|
|
28441
28449
|
{
|
|
28442
28450
|
"data-slot": "command-list",
|
|
@@ -28451,7 +28459,7 @@ function CommandList({
|
|
|
28451
28459
|
function CommandEmpty({
|
|
28452
28460
|
...props
|
|
28453
28461
|
}) {
|
|
28454
|
-
return /* @__PURE__ */
|
|
28462
|
+
return /* @__PURE__ */ jsx48(
|
|
28455
28463
|
CommandPrimitive.Empty,
|
|
28456
28464
|
{
|
|
28457
28465
|
"data-slot": "command-empty",
|
|
@@ -28464,7 +28472,7 @@ function CommandGroup({
|
|
|
28464
28472
|
className,
|
|
28465
28473
|
...props
|
|
28466
28474
|
}) {
|
|
28467
|
-
return /* @__PURE__ */
|
|
28475
|
+
return /* @__PURE__ */ jsx48(
|
|
28468
28476
|
CommandPrimitive.Group,
|
|
28469
28477
|
{
|
|
28470
28478
|
"data-slot": "command-group",
|
|
@@ -28480,7 +28488,7 @@ function CommandItem({
|
|
|
28480
28488
|
className,
|
|
28481
28489
|
...props
|
|
28482
28490
|
}) {
|
|
28483
|
-
return /* @__PURE__ */
|
|
28491
|
+
return /* @__PURE__ */ jsx48(
|
|
28484
28492
|
CommandPrimitive.Item,
|
|
28485
28493
|
{
|
|
28486
28494
|
"data-slot": "command-item",
|
|
@@ -28494,7 +28502,7 @@ function CommandItem({
|
|
|
28494
28502
|
}
|
|
28495
28503
|
|
|
28496
28504
|
// src/components/Inputs/Multiselect/MultiSelect.tsx
|
|
28497
|
-
import { jsx as
|
|
28505
|
+
import { jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
28498
28506
|
var MultiSelect = ({
|
|
28499
28507
|
value = [],
|
|
28500
28508
|
onChange,
|
|
@@ -28507,8 +28515,8 @@ var MultiSelect = ({
|
|
|
28507
28515
|
dataLabel = "label",
|
|
28508
28516
|
...props
|
|
28509
28517
|
}) => {
|
|
28510
|
-
const [open, setOpen] =
|
|
28511
|
-
|
|
28518
|
+
const [open, setOpen] = React8.useState(false);
|
|
28519
|
+
React8.useEffect(() => {
|
|
28512
28520
|
if (value) {
|
|
28513
28521
|
onChange(value);
|
|
28514
28522
|
}
|
|
@@ -28518,7 +28526,7 @@ var MultiSelect = ({
|
|
|
28518
28526
|
value?.includes(val) ? value.filter((v) => v !== val) : [...value || [], val]
|
|
28519
28527
|
);
|
|
28520
28528
|
};
|
|
28521
|
-
const selectedLabels =
|
|
28529
|
+
const selectedLabels = React8.useMemo(
|
|
28522
28530
|
() => data.filter((opt) => value.includes(opt.value)).map((opt) => opt.label),
|
|
28523
28531
|
[data, value]
|
|
28524
28532
|
);
|
|
@@ -28527,7 +28535,7 @@ var MultiSelect = ({
|
|
|
28527
28535
|
label: item[dataLabel]
|
|
28528
28536
|
}));
|
|
28529
28537
|
return /* @__PURE__ */ jsxs28(Popover, { open, onOpenChange: setOpen, children: [
|
|
28530
|
-
/* @__PURE__ */
|
|
28538
|
+
/* @__PURE__ */ jsx49(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs28(
|
|
28531
28539
|
Button,
|
|
28532
28540
|
{
|
|
28533
28541
|
variant: "outline",
|
|
@@ -28536,12 +28544,12 @@ var MultiSelect = ({
|
|
|
28536
28544
|
disabled,
|
|
28537
28545
|
type: "button",
|
|
28538
28546
|
children: [
|
|
28539
|
-
/* @__PURE__ */
|
|
28540
|
-
/* @__PURE__ */
|
|
28547
|
+
/* @__PURE__ */ jsx49("span", { className: "truncate", children: selectedLabels.length > 0 ? selectedLabels.join(", ") : placeholder }),
|
|
28548
|
+
/* @__PURE__ */ jsx49(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
28541
28549
|
]
|
|
28542
28550
|
}
|
|
28543
28551
|
) }),
|
|
28544
|
-
/* @__PURE__ */
|
|
28552
|
+
/* @__PURE__ */ jsx49(
|
|
28545
28553
|
PopoverContent,
|
|
28546
28554
|
{
|
|
28547
28555
|
align: "start",
|
|
@@ -28551,16 +28559,16 @@ var MultiSelect = ({
|
|
|
28551
28559
|
if (e.target.closest(".keep-open")) e.preventDefault();
|
|
28552
28560
|
},
|
|
28553
28561
|
children: /* @__PURE__ */ jsxs28(Command2, { shouldFilter: searchable, children: [
|
|
28554
|
-
searchable && /* @__PURE__ */
|
|
28562
|
+
searchable && /* @__PURE__ */ jsx49(CommandInput, { placeholder: "Search..." }),
|
|
28555
28563
|
/* @__PURE__ */ jsxs28(CommandList, { children: [
|
|
28556
|
-
/* @__PURE__ */
|
|
28557
|
-
/* @__PURE__ */
|
|
28564
|
+
/* @__PURE__ */ jsx49(CommandEmpty, { children: "No options found." }),
|
|
28565
|
+
/* @__PURE__ */ jsx49(CommandGroup, { children: options.map((opt) => {
|
|
28558
28566
|
const isSelected = value.includes(opt.value);
|
|
28559
|
-
return /* @__PURE__ */
|
|
28567
|
+
return /* @__PURE__ */ jsx49(
|
|
28560
28568
|
"div",
|
|
28561
28569
|
{
|
|
28562
28570
|
className: "keep-open",
|
|
28563
|
-
children: /* @__PURE__ */
|
|
28571
|
+
children: /* @__PURE__ */ jsx49(
|
|
28564
28572
|
CommandItem,
|
|
28565
28573
|
{
|
|
28566
28574
|
onMouseDown: (e) => {
|
|
@@ -28568,8 +28576,8 @@ var MultiSelect = ({
|
|
|
28568
28576
|
toggleOption(opt.value);
|
|
28569
28577
|
},
|
|
28570
28578
|
children: /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-2", children: [
|
|
28571
|
-
/* @__PURE__ */
|
|
28572
|
-
/* @__PURE__ */
|
|
28579
|
+
/* @__PURE__ */ jsx49(Checkbox, { checked: isSelected }),
|
|
28580
|
+
/* @__PURE__ */ jsx49("span", { children: opt.label })
|
|
28573
28581
|
] })
|
|
28574
28582
|
},
|
|
28575
28583
|
opt.value
|
|
@@ -28582,13 +28590,13 @@ var MultiSelect = ({
|
|
|
28582
28590
|
] })
|
|
28583
28591
|
}
|
|
28584
28592
|
),
|
|
28585
|
-
props.errorMessage && /* @__PURE__ */
|
|
28593
|
+
props.errorMessage && /* @__PURE__ */ jsx49("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
28586
28594
|
] });
|
|
28587
28595
|
};
|
|
28588
28596
|
var MultiSelect_default = MultiSelect;
|
|
28589
28597
|
|
|
28590
28598
|
// src/components/ui/data-table.tsx
|
|
28591
|
-
import * as
|
|
28599
|
+
import * as React9 from "react";
|
|
28592
28600
|
import { faEllipsisH } from "@fortawesome/free-solid-svg-icons";
|
|
28593
28601
|
import { FontAwesomeIcon as FontAwesomeIcon3 } from "@fortawesome/react-fontawesome";
|
|
28594
28602
|
import {
|
|
@@ -28600,14 +28608,14 @@ import {
|
|
|
28600
28608
|
} from "@tanstack/react-table";
|
|
28601
28609
|
|
|
28602
28610
|
// src/components/ui/table.tsx
|
|
28603
|
-
import { jsx as
|
|
28611
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
28604
28612
|
function Table3({ className, ...props }) {
|
|
28605
|
-
return /* @__PURE__ */
|
|
28613
|
+
return /* @__PURE__ */ jsx50(
|
|
28606
28614
|
"div",
|
|
28607
28615
|
{
|
|
28608
28616
|
"data-slot": "table-container",
|
|
28609
28617
|
className: "relative w-full overflow-x-auto rounded-md border border-gray-200 bg-white",
|
|
28610
|
-
children: /* @__PURE__ */
|
|
28618
|
+
children: /* @__PURE__ */ jsx50(
|
|
28611
28619
|
"table",
|
|
28612
28620
|
{
|
|
28613
28621
|
"data-slot": "table",
|
|
@@ -28619,7 +28627,7 @@ function Table3({ className, ...props }) {
|
|
|
28619
28627
|
);
|
|
28620
28628
|
}
|
|
28621
28629
|
function TableHeader({ className, ...props }) {
|
|
28622
|
-
return /* @__PURE__ */
|
|
28630
|
+
return /* @__PURE__ */ jsx50(
|
|
28623
28631
|
"thead",
|
|
28624
28632
|
{
|
|
28625
28633
|
"data-slot": "table-header",
|
|
@@ -28632,7 +28640,7 @@ function TableHeader({ className, ...props }) {
|
|
|
28632
28640
|
);
|
|
28633
28641
|
}
|
|
28634
28642
|
function TableBody({ className, ...props }) {
|
|
28635
|
-
return /* @__PURE__ */
|
|
28643
|
+
return /* @__PURE__ */ jsx50(
|
|
28636
28644
|
"tbody",
|
|
28637
28645
|
{
|
|
28638
28646
|
"data-slot": "table-body",
|
|
@@ -28645,7 +28653,7 @@ function TableBody({ className, ...props }) {
|
|
|
28645
28653
|
);
|
|
28646
28654
|
}
|
|
28647
28655
|
function TableRow({ className, ...props }) {
|
|
28648
|
-
return /* @__PURE__ */
|
|
28656
|
+
return /* @__PURE__ */ jsx50(
|
|
28649
28657
|
"tr",
|
|
28650
28658
|
{
|
|
28651
28659
|
"data-slot": "table-row",
|
|
@@ -28658,7 +28666,7 @@ function TableRow({ className, ...props }) {
|
|
|
28658
28666
|
);
|
|
28659
28667
|
}
|
|
28660
28668
|
function TableHead({ className, ...props }) {
|
|
28661
|
-
return /* @__PURE__ */
|
|
28669
|
+
return /* @__PURE__ */ jsx50(
|
|
28662
28670
|
"th",
|
|
28663
28671
|
{
|
|
28664
28672
|
"data-slot": "table-head",
|
|
@@ -28671,7 +28679,7 @@ function TableHead({ className, ...props }) {
|
|
|
28671
28679
|
);
|
|
28672
28680
|
}
|
|
28673
28681
|
function TableCell({ className, ...props }) {
|
|
28674
|
-
return /* @__PURE__ */
|
|
28682
|
+
return /* @__PURE__ */ jsx50(
|
|
28675
28683
|
"td",
|
|
28676
28684
|
{
|
|
28677
28685
|
"data-slot": "table-cell",
|
|
@@ -28685,7 +28693,7 @@ function TableCell({ className, ...props }) {
|
|
|
28685
28693
|
}
|
|
28686
28694
|
|
|
28687
28695
|
// src/components/ui/data-table.tsx
|
|
28688
|
-
import { Fragment as
|
|
28696
|
+
import { Fragment as Fragment18, jsx as jsx51, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
28689
28697
|
function DataTable({
|
|
28690
28698
|
columns,
|
|
28691
28699
|
data,
|
|
@@ -28700,15 +28708,41 @@ function DataTable({
|
|
|
28700
28708
|
onFilterChange,
|
|
28701
28709
|
onGlobalSearch,
|
|
28702
28710
|
globalSearch,
|
|
28703
|
-
onCellClick
|
|
28711
|
+
onCellClick,
|
|
28712
|
+
onDeleteRow,
|
|
28713
|
+
enableDelete
|
|
28704
28714
|
}) {
|
|
28705
|
-
const [columnFilters, setColumnFilters] =
|
|
28706
|
-
const [columnVisibility, setColumnVisibility] =
|
|
28707
|
-
const [manualSort, setManualSort] =
|
|
28708
|
-
const [searchTerm, setSearchTerm] =
|
|
28715
|
+
const [columnFilters, setColumnFilters] = React9.useState([]);
|
|
28716
|
+
const [columnVisibility, setColumnVisibility] = React9.useState({});
|
|
28717
|
+
const [manualSort, setManualSort] = React9.useState(null);
|
|
28718
|
+
const [searchTerm, setSearchTerm] = React9.useState("");
|
|
28719
|
+
const deleteColumn = React9.useMemo(() => ({
|
|
28720
|
+
id: "delete",
|
|
28721
|
+
header: "Actions",
|
|
28722
|
+
cell: ({ row }) => /* @__PURE__ */ jsx51(
|
|
28723
|
+
"button",
|
|
28724
|
+
{
|
|
28725
|
+
className: "px-3 py-1 text-[12px] bg-red-800 text-white rounded hover:bg-neutral-600 cursor-pointer",
|
|
28726
|
+
onClick: (event) => {
|
|
28727
|
+
event.stopPropagation();
|
|
28728
|
+
if (onDeleteRow) {
|
|
28729
|
+
onDeleteRow(row.original, "delete");
|
|
28730
|
+
}
|
|
28731
|
+
},
|
|
28732
|
+
children: "Delete"
|
|
28733
|
+
}
|
|
28734
|
+
),
|
|
28735
|
+
meta: { isClickable: true }
|
|
28736
|
+
}), [onDeleteRow]);
|
|
28737
|
+
const combinedColumns = React9.useMemo(() => {
|
|
28738
|
+
if (enableDelete) {
|
|
28739
|
+
return [...columns, deleteColumn];
|
|
28740
|
+
}
|
|
28741
|
+
return columns;
|
|
28742
|
+
}, [columns, enableDelete, deleteColumn]);
|
|
28709
28743
|
const table = useReactTable({
|
|
28710
28744
|
data,
|
|
28711
|
-
columns,
|
|
28745
|
+
columns: combinedColumns,
|
|
28712
28746
|
state: {
|
|
28713
28747
|
columnFilters,
|
|
28714
28748
|
columnVisibility,
|
|
@@ -28757,7 +28791,7 @@ function DataTable({
|
|
|
28757
28791
|
/* @__PURE__ */ jsxs29("div", { className: `flex ${globalSearch ? "justify-between" : "justify-end"} p-2 bg-gray-50`, children: [
|
|
28758
28792
|
globalSearch && /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2 w-full max-w-sm", children: [
|
|
28759
28793
|
/* @__PURE__ */ jsxs29("div", { className: "relative w-full", children: [
|
|
28760
|
-
/* @__PURE__ */
|
|
28794
|
+
/* @__PURE__ */ jsx51(
|
|
28761
28795
|
"input",
|
|
28762
28796
|
{
|
|
28763
28797
|
type: "text",
|
|
@@ -28772,9 +28806,9 @@ function DataTable({
|
|
|
28772
28806
|
className: "border border-gray-300 rounded-md text-sm px-3 py-2 pl-8 w-full focus:outline-none focus:ring-1 focus:ring-[#12715B]"
|
|
28773
28807
|
}
|
|
28774
28808
|
),
|
|
28775
|
-
/* @__PURE__ */
|
|
28809
|
+
/* @__PURE__ */ jsx51(Search, { className: "absolute left-2 top-2.5 text-gray-400", size: 16 })
|
|
28776
28810
|
] }),
|
|
28777
|
-
/* @__PURE__ */
|
|
28811
|
+
/* @__PURE__ */ jsx51(
|
|
28778
28812
|
Button,
|
|
28779
28813
|
{
|
|
28780
28814
|
size: "sm",
|
|
@@ -28785,7 +28819,7 @@ function DataTable({
|
|
|
28785
28819
|
)
|
|
28786
28820
|
] }),
|
|
28787
28821
|
/* @__PURE__ */ jsxs29(Popover, { children: [
|
|
28788
|
-
/* @__PURE__ */
|
|
28822
|
+
/* @__PURE__ */ jsx51(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx51(
|
|
28789
28823
|
Button,
|
|
28790
28824
|
{
|
|
28791
28825
|
variant: "outline",
|
|
@@ -28795,9 +28829,9 @@ function DataTable({
|
|
|
28795
28829
|
}
|
|
28796
28830
|
) }),
|
|
28797
28831
|
/* @__PURE__ */ jsxs29(PopoverContent, { align: "end", className: "w-48 p-3 space-y-2", children: [
|
|
28798
|
-
/* @__PURE__ */
|
|
28832
|
+
/* @__PURE__ */ jsx51("div", { className: "text-sm font-medium mb-2", children: "Show / Hide Columns" }),
|
|
28799
28833
|
/* @__PURE__ */ jsxs29("label", { className: "flex items-center gap-2 text-sm font-semibold border-b pb-2 mb-2", children: [
|
|
28800
|
-
/* @__PURE__ */
|
|
28834
|
+
/* @__PURE__ */ jsx51(
|
|
28801
28835
|
"input",
|
|
28802
28836
|
{
|
|
28803
28837
|
type: "checkbox",
|
|
@@ -28817,7 +28851,7 @@ function DataTable({
|
|
|
28817
28851
|
"Toggle All"
|
|
28818
28852
|
] }),
|
|
28819
28853
|
table.getAllLeafColumns().map((column) => /* @__PURE__ */ jsxs29("label", { className: "flex items-center gap-2 text-sm", children: [
|
|
28820
|
-
/* @__PURE__ */
|
|
28854
|
+
/* @__PURE__ */ jsx51(
|
|
28821
28855
|
"input",
|
|
28822
28856
|
{
|
|
28823
28857
|
type: "checkbox",
|
|
@@ -28831,11 +28865,11 @@ function DataTable({
|
|
|
28831
28865
|
] })
|
|
28832
28866
|
] }),
|
|
28833
28867
|
/* @__PURE__ */ jsxs29(Table3, { children: [
|
|
28834
|
-
/* @__PURE__ */
|
|
28868
|
+
/* @__PURE__ */ jsx51(TableHeader, { children: table.getHeaderGroups().map((hg) => /* @__PURE__ */ jsx51(TableRow, { children: hg.headers.map((header) => {
|
|
28835
28869
|
const canSort = header.column.getCanSort();
|
|
28836
28870
|
const canFilter = header.column.getCanFilter();
|
|
28837
28871
|
const sortDir = manualSort?.key === header.column.id ? manualSort.dir : null;
|
|
28838
|
-
return /* @__PURE__ */
|
|
28872
|
+
return /* @__PURE__ */ jsx51(TableHead, { className: "relative select-none", children: /* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-between", children: [
|
|
28839
28873
|
/* @__PURE__ */ jsxs29(
|
|
28840
28874
|
"span",
|
|
28841
28875
|
{
|
|
@@ -28848,25 +28882,25 @@ function DataTable({
|
|
|
28848
28882
|
},
|
|
28849
28883
|
children: [
|
|
28850
28884
|
flexRender(header.column.columnDef.header, header.getContext()),
|
|
28851
|
-
canSort && /* @__PURE__ */ jsxs29(
|
|
28852
|
-
sortDir === "asc" && /* @__PURE__ */
|
|
28853
|
-
sortDir === "desc" && /* @__PURE__ */
|
|
28854
|
-
!sortDir && /* @__PURE__ */
|
|
28885
|
+
canSort && /* @__PURE__ */ jsxs29(Fragment18, { children: [
|
|
28886
|
+
sortDir === "asc" && /* @__PURE__ */ jsx51(ArrowUp, { size: 14, className: "text-gray-500" }),
|
|
28887
|
+
sortDir === "desc" && /* @__PURE__ */ jsx51(ArrowDown, { size: 14, className: "text-gray-500" }),
|
|
28888
|
+
!sortDir && /* @__PURE__ */ jsx51(ArrowUpDown, { size: 14, className: "text-gray-400" })
|
|
28855
28889
|
] })
|
|
28856
28890
|
]
|
|
28857
28891
|
}
|
|
28858
28892
|
),
|
|
28859
28893
|
canFilter && /* @__PURE__ */ jsxs29(Popover, { children: [
|
|
28860
|
-
/* @__PURE__ */
|
|
28894
|
+
/* @__PURE__ */ jsx51(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx51(
|
|
28861
28895
|
"span",
|
|
28862
28896
|
{
|
|
28863
28897
|
role: "presentation",
|
|
28864
28898
|
className: "pl-5 cursor-pointer",
|
|
28865
28899
|
onClick: (e) => e.stopPropagation(),
|
|
28866
|
-
children: /* @__PURE__ */
|
|
28900
|
+
children: /* @__PURE__ */ jsx51(FontAwesomeIcon3, { icon: faEllipsisH, className: "w-5 h-5 text-gray-500" })
|
|
28867
28901
|
}
|
|
28868
28902
|
) }),
|
|
28869
|
-
/* @__PURE__ */
|
|
28903
|
+
/* @__PURE__ */ jsx51(
|
|
28870
28904
|
PopoverContent,
|
|
28871
28905
|
{
|
|
28872
28906
|
align: "center",
|
|
@@ -28886,8 +28920,8 @@ function DataTable({
|
|
|
28886
28920
|
},
|
|
28887
28921
|
className: "space-y-2",
|
|
28888
28922
|
children: [
|
|
28889
|
-
/* @__PURE__ */
|
|
28890
|
-
/* @__PURE__ */
|
|
28923
|
+
/* @__PURE__ */ jsx51("label", { htmlFor: "filter", className: "text-xs text-gray-500 font-normal", children: "Filter by value:" }),
|
|
28924
|
+
/* @__PURE__ */ jsx51(
|
|
28891
28925
|
"input",
|
|
28892
28926
|
{
|
|
28893
28927
|
name: "filter",
|
|
@@ -28897,7 +28931,7 @@ function DataTable({
|
|
|
28897
28931
|
autoComplete: "off"
|
|
28898
28932
|
}
|
|
28899
28933
|
),
|
|
28900
|
-
/* @__PURE__ */
|
|
28934
|
+
/* @__PURE__ */ jsx51("div", { className: "justify-end flex", children: /* @__PURE__ */ jsx51(
|
|
28901
28935
|
Button,
|
|
28902
28936
|
{
|
|
28903
28937
|
type: "submit",
|
|
@@ -28913,13 +28947,13 @@ function DataTable({
|
|
|
28913
28947
|
] })
|
|
28914
28948
|
] }) }, header.id);
|
|
28915
28949
|
}) }, hg.id)) }),
|
|
28916
|
-
/* @__PURE__ */
|
|
28950
|
+
/* @__PURE__ */ jsx51(TableBody, { children: loading ? /* @__PURE__ */ jsx51(TableRow, { children: /* @__PURE__ */ jsx51(TableCell, { colSpan: combinedColumns.length, className: "h-24 text-center", children: "Loading..." }) }) : table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx51(TableRow, { children: row.getVisibleCells().map((cell) => {
|
|
28917
28951
|
const meta = cell.column.columnDef.meta || {};
|
|
28918
28952
|
const isClickable = meta?.isClickable;
|
|
28919
|
-
return /* @__PURE__ */
|
|
28953
|
+
return /* @__PURE__ */ jsx51(
|
|
28920
28954
|
TableCell,
|
|
28921
28955
|
{
|
|
28922
|
-
className: `${meta?.cellClass ?? ""} ${isClickable ? "cursor-pointer hover:bg-gray-100
|
|
28956
|
+
className: `${meta?.cellClass ?? ""} ${isClickable ? "cursor-pointer hover:bg-gray-100" : ""}`,
|
|
28923
28957
|
style: meta?.cellStyle,
|
|
28924
28958
|
onClick: () => {
|
|
28925
28959
|
if (isClickable && onCellClick) {
|
|
@@ -28930,7 +28964,7 @@ function DataTable({
|
|
|
28930
28964
|
},
|
|
28931
28965
|
cell.id
|
|
28932
28966
|
);
|
|
28933
|
-
}) }, row.id)) : /* @__PURE__ */
|
|
28967
|
+
}) }, row.id)) : /* @__PURE__ */ jsx51(TableRow, { children: /* @__PURE__ */ jsx51(TableCell, { colSpan: combinedColumns.length, className: "h-24 text-center", children: "No results." }) }) })
|
|
28934
28968
|
] }),
|
|
28935
28969
|
pagination && /* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-between py-3 px-2 text-sm w-full", children: [
|
|
28936
28970
|
/* @__PURE__ */ jsxs29("div", { children: [
|
|
@@ -28940,7 +28974,7 @@ function DataTable({
|
|
|
28940
28974
|
table.getPageCount()
|
|
28941
28975
|
] }),
|
|
28942
28976
|
/* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2", children: [
|
|
28943
|
-
/* @__PURE__ */
|
|
28977
|
+
/* @__PURE__ */ jsx51(
|
|
28944
28978
|
"button",
|
|
28945
28979
|
{
|
|
28946
28980
|
onClick: () => table.previousPage(),
|
|
@@ -28953,7 +28987,7 @@ function DataTable({
|
|
|
28953
28987
|
table.getState().pagination.pageIndex + 1,
|
|
28954
28988
|
table.getPageCount(),
|
|
28955
28989
|
5
|
|
28956
|
-
).map((pageNum, index) => /* @__PURE__ */
|
|
28990
|
+
).map((pageNum, index) => /* @__PURE__ */ jsx51(
|
|
28957
28991
|
"button",
|
|
28958
28992
|
{
|
|
28959
28993
|
disabled: pageNum === "...",
|
|
@@ -28963,7 +28997,7 @@ function DataTable({
|
|
|
28963
28997
|
},
|
|
28964
28998
|
index
|
|
28965
28999
|
)),
|
|
28966
|
-
/* @__PURE__ */
|
|
29000
|
+
/* @__PURE__ */ jsx51(
|
|
28967
29001
|
"button",
|
|
28968
29002
|
{
|
|
28969
29003
|
onClick: () => table.nextPage(),
|
|
@@ -28978,7 +29012,7 @@ function DataTable({
|
|
|
28978
29012
|
}
|
|
28979
29013
|
|
|
28980
29014
|
// src/components/DataDisplay/Table/Table.tsx
|
|
28981
|
-
import { jsx as
|
|
29015
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
28982
29016
|
var Table4 = ({
|
|
28983
29017
|
columns,
|
|
28984
29018
|
data,
|
|
@@ -28996,12 +29030,15 @@ var Table4 = ({
|
|
|
28996
29030
|
loading = false,
|
|
28997
29031
|
totalRecords = 0,
|
|
28998
29032
|
globalSearch = false,
|
|
29033
|
+
onCellClick,
|
|
29034
|
+
enableDelete,
|
|
29035
|
+
onDeleteRow,
|
|
28999
29036
|
...props
|
|
29000
29037
|
}) => {
|
|
29001
29038
|
const rawColumns = Array.isArray(columns) ? columns : [];
|
|
29002
29039
|
const rawData = Array.isArray(data) ? data : [];
|
|
29003
29040
|
const isControlled = typeof page === "number";
|
|
29004
|
-
return /* @__PURE__ */
|
|
29041
|
+
return /* @__PURE__ */ jsx52("div", { className: `${className || ""} space-y-3`, style, children: /* @__PURE__ */ jsx52(
|
|
29005
29042
|
DataTable,
|
|
29006
29043
|
{
|
|
29007
29044
|
...props,
|
|
@@ -29022,17 +29059,21 @@ var Table4 = ({
|
|
|
29022
29059
|
onGlobalSearch: (term) => onGlobalSearch?.({ searchTerm: term }),
|
|
29023
29060
|
globalSearch,
|
|
29024
29061
|
onCellClick: (cell) => {
|
|
29025
|
-
|
|
29026
|
-
}
|
|
29062
|
+
onCellClick?.({ id: cell.id, column: cell });
|
|
29063
|
+
},
|
|
29064
|
+
onDeleteRow: (cell) => {
|
|
29065
|
+
onDeleteRow?.(cell.id);
|
|
29066
|
+
},
|
|
29067
|
+
enableDelete
|
|
29027
29068
|
}
|
|
29028
29069
|
) });
|
|
29029
29070
|
};
|
|
29030
29071
|
var Table_default = Table4;
|
|
29031
29072
|
|
|
29032
29073
|
// src/components/ui/pagination.tsx
|
|
29033
|
-
import { jsx as
|
|
29074
|
+
import { jsx as jsx53, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
29034
29075
|
function Pagination({ className, ...props }) {
|
|
29035
|
-
return /* @__PURE__ */
|
|
29076
|
+
return /* @__PURE__ */ jsx53(
|
|
29036
29077
|
"nav",
|
|
29037
29078
|
{
|
|
29038
29079
|
role: "navigation",
|
|
@@ -29047,7 +29088,7 @@ function PaginationContent({
|
|
|
29047
29088
|
className,
|
|
29048
29089
|
...props
|
|
29049
29090
|
}) {
|
|
29050
|
-
return /* @__PURE__ */
|
|
29091
|
+
return /* @__PURE__ */ jsx53(
|
|
29051
29092
|
"ul",
|
|
29052
29093
|
{
|
|
29053
29094
|
"data-slot": "pagination-content",
|
|
@@ -29057,7 +29098,7 @@ function PaginationContent({
|
|
|
29057
29098
|
);
|
|
29058
29099
|
}
|
|
29059
29100
|
function PaginationItem({ ...props }) {
|
|
29060
|
-
return /* @__PURE__ */
|
|
29101
|
+
return /* @__PURE__ */ jsx53("li", { "data-slot": "pagination-item", ...props });
|
|
29061
29102
|
}
|
|
29062
29103
|
function PaginationLink({
|
|
29063
29104
|
className,
|
|
@@ -29065,7 +29106,7 @@ function PaginationLink({
|
|
|
29065
29106
|
size = "icon",
|
|
29066
29107
|
...props
|
|
29067
29108
|
}) {
|
|
29068
|
-
return /* @__PURE__ */
|
|
29109
|
+
return /* @__PURE__ */ jsx53(
|
|
29069
29110
|
"a",
|
|
29070
29111
|
{
|
|
29071
29112
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -29094,8 +29135,8 @@ function PaginationPrevious({
|
|
|
29094
29135
|
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
29095
29136
|
...props,
|
|
29096
29137
|
children: [
|
|
29097
|
-
/* @__PURE__ */
|
|
29098
|
-
/* @__PURE__ */
|
|
29138
|
+
/* @__PURE__ */ jsx53(ChevronLeft, {}),
|
|
29139
|
+
/* @__PURE__ */ jsx53("span", { className: "hidden sm:block", children: "Previous" })
|
|
29099
29140
|
]
|
|
29100
29141
|
}
|
|
29101
29142
|
);
|
|
@@ -29112,8 +29153,8 @@ function PaginationNext({
|
|
|
29112
29153
|
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
29113
29154
|
...props,
|
|
29114
29155
|
children: [
|
|
29115
|
-
/* @__PURE__ */
|
|
29116
|
-
/* @__PURE__ */
|
|
29156
|
+
/* @__PURE__ */ jsx53("span", { className: "hidden sm:block", children: "Next" }),
|
|
29157
|
+
/* @__PURE__ */ jsx53(ChevronRight, {})
|
|
29117
29158
|
]
|
|
29118
29159
|
}
|
|
29119
29160
|
);
|
|
@@ -29130,15 +29171,15 @@ function PaginationEllipsis({
|
|
|
29130
29171
|
className: cn("flex size-9 items-center justify-center", className),
|
|
29131
29172
|
...props,
|
|
29132
29173
|
children: [
|
|
29133
|
-
/* @__PURE__ */
|
|
29134
|
-
/* @__PURE__ */
|
|
29174
|
+
/* @__PURE__ */ jsx53(Ellipsis, { className: "size-4" }),
|
|
29175
|
+
/* @__PURE__ */ jsx53("span", { className: "sr-only", children: "More pages" })
|
|
29135
29176
|
]
|
|
29136
29177
|
}
|
|
29137
29178
|
);
|
|
29138
29179
|
}
|
|
29139
29180
|
|
|
29140
29181
|
// src/components/DataDisplay/Pagination/Pagination.tsx
|
|
29141
|
-
import { jsx as
|
|
29182
|
+
import { jsx as jsx54, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
29142
29183
|
var CustomPagination = ({
|
|
29143
29184
|
totalPages,
|
|
29144
29185
|
currentPage,
|
|
@@ -29186,7 +29227,7 @@ var CustomPagination = ({
|
|
|
29186
29227
|
const pageNumbers = getPageNumbers();
|
|
29187
29228
|
return /* @__PURE__ */ jsxs31("div", { className: "flex flex-row gap-1 w-full items-center justify-between", children: [
|
|
29188
29229
|
/* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2", children: [
|
|
29189
|
-
/* @__PURE__ */
|
|
29230
|
+
/* @__PURE__ */ jsx54("p", { className: "text-sm text-muted-foreground whitespace-nowrap", children: "Items per page:" }),
|
|
29190
29231
|
/* @__PURE__ */ jsxs31(
|
|
29191
29232
|
Select,
|
|
29192
29233
|
{
|
|
@@ -29195,26 +29236,26 @@ var CustomPagination = ({
|
|
|
29195
29236
|
onPageChange({ page: 1, itemsPerPage: Number(value) });
|
|
29196
29237
|
},
|
|
29197
29238
|
children: [
|
|
29198
|
-
/* @__PURE__ */
|
|
29239
|
+
/* @__PURE__ */ jsx54(SelectTrigger, { className: "w-[100px]", children: /* @__PURE__ */ jsx54(SelectValue, { placeholder: "Select" }) }),
|
|
29199
29240
|
/* @__PURE__ */ jsxs31(SelectContent, { children: [
|
|
29200
|
-
/* @__PURE__ */
|
|
29201
|
-
/* @__PURE__ */
|
|
29202
|
-
/* @__PURE__ */
|
|
29203
|
-
/* @__PURE__ */
|
|
29241
|
+
/* @__PURE__ */ jsx54(SelectItem, { value: "5", children: "5" }),
|
|
29242
|
+
/* @__PURE__ */ jsx54(SelectItem, { value: "10", children: "10" }),
|
|
29243
|
+
/* @__PURE__ */ jsx54(SelectItem, { value: "20", children: "20" }),
|
|
29244
|
+
/* @__PURE__ */ jsx54(SelectItem, { value: "50", children: "50" })
|
|
29204
29245
|
] })
|
|
29205
29246
|
]
|
|
29206
29247
|
}
|
|
29207
29248
|
)
|
|
29208
29249
|
] }),
|
|
29209
|
-
/* @__PURE__ */
|
|
29210
|
-
/* @__PURE__ */
|
|
29250
|
+
/* @__PURE__ */ jsx54(Pagination, { className: "justify-end", children: /* @__PURE__ */ jsxs31(PaginationContent, { children: [
|
|
29251
|
+
/* @__PURE__ */ jsx54(PaginationItem, { children: /* @__PURE__ */ jsx54(
|
|
29211
29252
|
PaginationPrevious,
|
|
29212
29253
|
{
|
|
29213
29254
|
onClick: () => handlePageChange(currentPage - 1),
|
|
29214
29255
|
className: currentPage === 1 ? "pointer-events-none opacity-50" : "cursor-pointer"
|
|
29215
29256
|
}
|
|
29216
29257
|
) }),
|
|
29217
|
-
pageNumbers.map((pageNumber, index) => /* @__PURE__ */
|
|
29258
|
+
pageNumbers.map((pageNumber, index) => /* @__PURE__ */ jsx54(PaginationItem, { children: pageNumber === "..." ? /* @__PURE__ */ jsx54(PaginationEllipsis, {}) : /* @__PURE__ */ jsx54(
|
|
29218
29259
|
PaginationLink,
|
|
29219
29260
|
{
|
|
29220
29261
|
onClick: () => handlePageChange(pageNumber),
|
|
@@ -29223,7 +29264,7 @@ var CustomPagination = ({
|
|
|
29223
29264
|
children: pageNumber
|
|
29224
29265
|
}
|
|
29225
29266
|
) }, index)),
|
|
29226
|
-
/* @__PURE__ */
|
|
29267
|
+
/* @__PURE__ */ jsx54(PaginationItem, { children: /* @__PURE__ */ jsx54(
|
|
29227
29268
|
PaginationNext,
|
|
29228
29269
|
{
|
|
29229
29270
|
onClick: () => handlePageChange(currentPage + 1),
|
|
@@ -29236,12 +29277,48 @@ var CustomPagination = ({
|
|
|
29236
29277
|
var Pagination_default = CustomPagination;
|
|
29237
29278
|
|
|
29238
29279
|
// src/components/Navigation/Tabs/Tabs.tsx
|
|
29280
|
+
import { useCallback as useCallback2, useMemo as useMemo5, useState as useState6 } from "react";
|
|
29239
29281
|
import Link5 from "next/link";
|
|
29240
29282
|
import { useRouter } from "next/navigation";
|
|
29241
|
-
import {
|
|
29242
|
-
|
|
29243
|
-
|
|
29244
|
-
|
|
29283
|
+
import { Fragment as Fragment19, jsx as jsx55, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
29284
|
+
var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuilder = true, source, parentKey, menuNameKey, menuUrlKey, loading }) => {
|
|
29285
|
+
function groupMenus(menus = []) {
|
|
29286
|
+
const menuMap = /* @__PURE__ */ new Map();
|
|
29287
|
+
menus.forEach((menu) => {
|
|
29288
|
+
menuMap.set(menu.menu_id, {
|
|
29289
|
+
...menu,
|
|
29290
|
+
url: menu[menuUrlKey || "url"],
|
|
29291
|
+
header: menu[menuNameKey || "name"],
|
|
29292
|
+
isDropDown: false,
|
|
29293
|
+
children: []
|
|
29294
|
+
});
|
|
29295
|
+
});
|
|
29296
|
+
const rootMenus = [];
|
|
29297
|
+
menus.forEach((menu) => {
|
|
29298
|
+
if (menu[parentKey || "parentId"]) {
|
|
29299
|
+
const parent = menuMap.get(menu[parentKey || "parentId"]);
|
|
29300
|
+
if (parent) {
|
|
29301
|
+
parent.children.push(menuMap.get(menu.menu_id));
|
|
29302
|
+
}
|
|
29303
|
+
} else {
|
|
29304
|
+
rootMenus.push(menuMap.get(menu.menu_id));
|
|
29305
|
+
}
|
|
29306
|
+
});
|
|
29307
|
+
const sortMenus = (list) => list.sort((a, b) => (a.sort_order || 0) - (b.sort_order || 0)).map((menu) => {
|
|
29308
|
+
const sortedChildren = sortMenus(menu.children || []);
|
|
29309
|
+
return {
|
|
29310
|
+
...menu,
|
|
29311
|
+
children: sortedChildren,
|
|
29312
|
+
isDropDown: sortedChildren.length > 0
|
|
29313
|
+
};
|
|
29314
|
+
});
|
|
29315
|
+
return sortMenus(rootMenus);
|
|
29316
|
+
}
|
|
29317
|
+
const rawTabs = useMemo5(() => {
|
|
29318
|
+
if (!Array.isArray(tabs)) return [];
|
|
29319
|
+
if (source === "manual") return Array.isArray(tabs) ? tabs : [];
|
|
29320
|
+
return groupMenus(tabs);
|
|
29321
|
+
}, [tabs, source, parentKey, menuNameKey, menuUrlKey]);
|
|
29245
29322
|
const baseClasses = "text-[12px] text-foreground p-2 text-center rounded-md transition-colors";
|
|
29246
29323
|
const activeClasses = "bg-white/10 text-white";
|
|
29247
29324
|
const hoverClasses = "hover:bg-white/5";
|
|
@@ -29274,20 +29351,28 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
|
|
|
29274
29351
|
return /* @__PURE__ */ jsxs32(DropdownMenu, { children: [
|
|
29275
29352
|
/* @__PURE__ */ jsxs32(DropdownMenuTrigger, { className: `${finalClasses} inline-flex items-center gap-1`, children: [
|
|
29276
29353
|
tab.header,
|
|
29277
|
-
/* @__PURE__ */
|
|
29354
|
+
/* @__PURE__ */ jsx55(ChevronDown, { className: "h-4 w-4 opacity-80" })
|
|
29278
29355
|
] }),
|
|
29279
|
-
/* @__PURE__ */
|
|
29356
|
+
/* @__PURE__ */ jsx55(
|
|
29280
29357
|
DropdownMenuContent,
|
|
29281
29358
|
{
|
|
29282
29359
|
align: "start",
|
|
29283
29360
|
sideOffset: 6,
|
|
29284
29361
|
className: "z-50 min-w-[160px] rounded-md border border-gray-200 bg-white p-1 shadow-lg",
|
|
29285
|
-
children: tab.children.map((item) => /* @__PURE__ */
|
|
29362
|
+
children: tab.children.map((item) => /* @__PURE__ */ jsx55(
|
|
29286
29363
|
DropdownMenuItem,
|
|
29287
29364
|
{
|
|
29288
29365
|
asChild: true,
|
|
29289
29366
|
className: "cursor-pointer rounded-sm px-3 py-2 text-[12px] text-gray-800 hover:bg-gray-100 focus:bg-gray-100",
|
|
29290
|
-
children: /* @__PURE__ */
|
|
29367
|
+
children: /* @__PURE__ */ jsx55(
|
|
29368
|
+
Link5,
|
|
29369
|
+
{
|
|
29370
|
+
href: item.url || "#",
|
|
29371
|
+
target: item.opens_in_new_tab ? "_blank" : "_self",
|
|
29372
|
+
onClick: (e) => handleBuilderExit(e, item.url || "#"),
|
|
29373
|
+
children: item.header
|
|
29374
|
+
}
|
|
29375
|
+
)
|
|
29291
29376
|
},
|
|
29292
29377
|
item.id
|
|
29293
29378
|
))
|
|
@@ -29295,24 +29380,25 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
|
|
|
29295
29380
|
)
|
|
29296
29381
|
] }, index);
|
|
29297
29382
|
}
|
|
29298
|
-
return tab.url ? /* @__PURE__ */
|
|
29383
|
+
return tab.url ? /* @__PURE__ */ jsx55(
|
|
29299
29384
|
Link5,
|
|
29300
29385
|
{
|
|
29301
29386
|
href: tab.url,
|
|
29387
|
+
target: tab.opens_in_new_tab ? "_blank" : "_self",
|
|
29302
29388
|
className: finalClasses,
|
|
29303
29389
|
style: tab.style,
|
|
29304
29390
|
onClick: (e) => handleBuilderExit(e, tab.url || "#"),
|
|
29305
29391
|
children: tab.header
|
|
29306
29392
|
},
|
|
29307
29393
|
index
|
|
29308
|
-
) : /* @__PURE__ */
|
|
29394
|
+
) : /* @__PURE__ */ jsx55("div", { className: finalClasses, style: tab.style, role: "button", tabIndex: 0, children: tab.header }, index);
|
|
29309
29395
|
};
|
|
29310
29396
|
const renderMobileMenu = () => /* @__PURE__ */ jsxs32(DropdownMenu, { children: [
|
|
29311
29397
|
/* @__PURE__ */ jsxs32(DropdownMenuTrigger, { className: "flex items-center gap-2 px-3 py-2 rounded-md bg-white/10 text-white text-sm", children: [
|
|
29312
|
-
/* @__PURE__ */
|
|
29398
|
+
/* @__PURE__ */ jsx55(Menu, { className: "h-4 w-4" }),
|
|
29313
29399
|
"Menu"
|
|
29314
29400
|
] }),
|
|
29315
|
-
/* @__PURE__ */
|
|
29401
|
+
/* @__PURE__ */ jsx55(
|
|
29316
29402
|
DropdownMenuContent,
|
|
29317
29403
|
{
|
|
29318
29404
|
align: "start",
|
|
@@ -29322,24 +29408,24 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
|
|
|
29322
29408
|
const hasChildren = Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown;
|
|
29323
29409
|
if (hasChildren) {
|
|
29324
29410
|
return /* @__PURE__ */ jsxs32(DropdownMenuSub, { children: [
|
|
29325
|
-
/* @__PURE__ */
|
|
29326
|
-
/* @__PURE__ */
|
|
29411
|
+
/* @__PURE__ */ jsx55(DropdownMenuSubTrigger, { className: "flex items-center justify-between cursor-pointer rounded-sm px-3 py-2 text-[13px] text-foreground hover:text-foreground", children: tab.header }),
|
|
29412
|
+
/* @__PURE__ */ jsx55(DropdownMenuSubContent, { className: "bg-white border shadow-lg rounded-md p-1", children: tab.children.map((item) => /* @__PURE__ */ jsx55(
|
|
29327
29413
|
DropdownMenuItem,
|
|
29328
29414
|
{
|
|
29329
29415
|
asChild: true,
|
|
29330
29416
|
className: "cursor-pointer rounded-sm px-3 py-2 text-[12px] text-gray-800 hover:bg-gray-100",
|
|
29331
|
-
children: /* @__PURE__ */
|
|
29417
|
+
children: /* @__PURE__ */ jsx55(Link5, { href: item.url || "#", onClick: (e) => handleBuilderExit(e, item.url || "#"), children: item.header })
|
|
29332
29418
|
},
|
|
29333
29419
|
item.id
|
|
29334
29420
|
)) })
|
|
29335
29421
|
] }, i);
|
|
29336
29422
|
}
|
|
29337
|
-
return /* @__PURE__ */
|
|
29423
|
+
return /* @__PURE__ */ jsx55(
|
|
29338
29424
|
DropdownMenuItem,
|
|
29339
29425
|
{
|
|
29340
29426
|
asChild: true,
|
|
29341
29427
|
className: "cursor-pointer rounded-sm px-3 py-2 text-[13px] text-gray-800 hover:bg-gray-100",
|
|
29342
|
-
children: /* @__PURE__ */
|
|
29428
|
+
children: /* @__PURE__ */ jsx55(Link5, { href: tab.url || "#", onClick: (e) => handleBuilderExit(e, tab.url || "#"), children: tab.header })
|
|
29343
29429
|
},
|
|
29344
29430
|
i
|
|
29345
29431
|
);
|
|
@@ -29349,19 +29435,19 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
|
|
|
29349
29435
|
] });
|
|
29350
29436
|
const forceMobile = canvasMode ? canvasMode === "mobile" || canvasMode === "tablet" : void 0;
|
|
29351
29437
|
const forceDesktop = canvasMode ? canvasMode === "desktop" : void 0;
|
|
29352
|
-
return /* @__PURE__ */ jsxs32(
|
|
29438
|
+
return /* @__PURE__ */ jsxs32(Fragment19, { children: [
|
|
29353
29439
|
/* @__PURE__ */ jsxs32("div", { className, style, children: [
|
|
29354
|
-
forceDesktop !== void 0 ? forceDesktop && /* @__PURE__ */
|
|
29355
|
-
forceMobile !== void 0 ? forceMobile && /* @__PURE__ */
|
|
29440
|
+
forceDesktop !== void 0 ? forceDesktop && /* @__PURE__ */ jsx55("div", { className: "hidden md:flex", children: /* @__PURE__ */ jsx55("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }) : /* @__PURE__ */ jsx55("div", { className: "hidden md:flex", children: /* @__PURE__ */ jsx55("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }),
|
|
29441
|
+
forceMobile !== void 0 ? forceMobile && /* @__PURE__ */ jsx55("div", { children: renderMobileMenu() }) : /* @__PURE__ */ jsx55("div", { className: "flex md:hidden", children: renderMobileMenu() })
|
|
29356
29442
|
] }),
|
|
29357
|
-
/* @__PURE__ */
|
|
29443
|
+
/* @__PURE__ */ jsx55(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ jsxs32(DialogContent, { className: "bg-[#fff]", children: [
|
|
29358
29444
|
/* @__PURE__ */ jsxs32(DialogHeader, { children: [
|
|
29359
|
-
/* @__PURE__ */
|
|
29360
|
-
/* @__PURE__ */
|
|
29445
|
+
/* @__PURE__ */ jsx55(DialogTitle, { children: "Exit Builder?" }),
|
|
29446
|
+
/* @__PURE__ */ jsx55(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
|
|
29361
29447
|
] }),
|
|
29362
29448
|
/* @__PURE__ */ jsxs32(DialogFooter, { children: [
|
|
29363
|
-
/* @__PURE__ */
|
|
29364
|
-
/* @__PURE__ */
|
|
29449
|
+
/* @__PURE__ */ jsx55(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
|
|
29450
|
+
/* @__PURE__ */ jsx55(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
|
|
29365
29451
|
] })
|
|
29366
29452
|
] }) })
|
|
29367
29453
|
] });
|
|
@@ -29369,34 +29455,42 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
|
|
|
29369
29455
|
var Tabs_default = Tabs;
|
|
29370
29456
|
|
|
29371
29457
|
// src/components/Navigation/Stages/Stages.tsx
|
|
29372
|
-
import
|
|
29373
|
-
import { jsx as
|
|
29374
|
-
var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStageChange }) => {
|
|
29375
|
-
return /* @__PURE__ */
|
|
29376
|
-
/* @__PURE__ */
|
|
29377
|
-
/* @__PURE__ */
|
|
29378
|
-
|
|
29379
|
-
|
|
29380
|
-
|
|
29381
|
-
|
|
29382
|
-
|
|
29383
|
-
|
|
29384
|
-
|
|
29385
|
-
|
|
29386
|
-
|
|
29387
|
-
|
|
29388
|
-
|
|
29389
|
-
|
|
29390
|
-
|
|
29391
|
-
|
|
29392
|
-
|
|
29458
|
+
import React10 from "react";
|
|
29459
|
+
import { jsx as jsx56, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
29460
|
+
var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStageChange, currentStage }) => {
|
|
29461
|
+
return /* @__PURE__ */ jsx56("div", { className, style, children: /* @__PURE__ */ jsxs33("div", { className: "flex items-center justify-between bg-red p-2 rounded-lg border border-gray-200 w-full", children: [
|
|
29462
|
+
/* @__PURE__ */ jsx56("div", { className: "flex items-center", children: /* @__PURE__ */ jsx56("button", { className: "p-2 hover:bg-gray-100 rounded", children: /* @__PURE__ */ jsx56("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx56("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
|
|
29463
|
+
/* @__PURE__ */ jsx56("div", { className: "flex items-center flex-1 px-2 flex-wrap gap-2", children: stages?.length > 0 && stages?.map((stage, index) => {
|
|
29464
|
+
const currentIndex = stages.findIndex((s) => s.key === currentStage);
|
|
29465
|
+
const isAllCompleted = currentStage === "completed";
|
|
29466
|
+
const isCompleted = isAllCompleted || index < currentIndex;
|
|
29467
|
+
const isActive = !isAllCompleted && index === currentIndex;
|
|
29468
|
+
return /* @__PURE__ */ jsxs33(React10.Fragment, { children: [
|
|
29469
|
+
/* @__PURE__ */ jsx56(
|
|
29470
|
+
"button",
|
|
29471
|
+
{
|
|
29472
|
+
className: `
|
|
29473
|
+
min-w-[120px] px-4 py-2 rounded-full text-sm font-medium transition-colors duration-200 whitespace-nowrap
|
|
29474
|
+
${isActive ? "bg-[#034486] text-white shadow-md" : isCompleted ? "bg-[#e0f2fe] text-[#034486] border border-[#034486]" : "bg-white text-gray-700 hover:bg-gray-100 border border-gray-200"}`,
|
|
29475
|
+
onClick: () => {
|
|
29476
|
+
if (onStageChange) {
|
|
29477
|
+
onStageChange(stage.key);
|
|
29478
|
+
}
|
|
29479
|
+
},
|
|
29480
|
+
children: stage.header
|
|
29481
|
+
}
|
|
29482
|
+
),
|
|
29483
|
+
index < stages.length - 1 && /* @__PURE__ */ jsx56("div", { className: "flex-shrink-0 w-3 h-px bg-gray-300" })
|
|
29484
|
+
] }, stage.id);
|
|
29485
|
+
}) }),
|
|
29486
|
+
isShowBtn && /* @__PURE__ */ jsx56("div", { className: "flex items-center", children: /* @__PURE__ */ jsx56(
|
|
29393
29487
|
"button",
|
|
29394
29488
|
{
|
|
29395
29489
|
className: "bg-[#034486] text-white px-6 py-2 rounded-lg text-sm font-medium transition-colors duration-200 shadow-sm",
|
|
29396
29490
|
onClick: () => {
|
|
29397
29491
|
const activeStage = stages?.find((stage) => stage.isActive);
|
|
29398
29492
|
if (activeStage && onStageChange) {
|
|
29399
|
-
onStageChange(
|
|
29493
|
+
onStageChange("completed");
|
|
29400
29494
|
}
|
|
29401
29495
|
},
|
|
29402
29496
|
children: buttonText
|
|
@@ -29407,26 +29501,26 @@ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStag
|
|
|
29407
29501
|
var Stages_default = StagesComponent;
|
|
29408
29502
|
|
|
29409
29503
|
// src/components/Navigation/Spacer/Spacer.tsx
|
|
29410
|
-
import { jsx as
|
|
29504
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
29411
29505
|
var Spacer = ({ className, style }) => {
|
|
29412
|
-
return /* @__PURE__ */
|
|
29506
|
+
return /* @__PURE__ */ jsx57("div", { className: `${className}`, style });
|
|
29413
29507
|
};
|
|
29414
29508
|
var Spacer_default = Spacer;
|
|
29415
29509
|
|
|
29416
29510
|
// src/components/Navigation/Profile/Profile.tsx
|
|
29417
|
-
import { jsx as
|
|
29511
|
+
import { jsx as jsx58, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
29418
29512
|
|
|
29419
29513
|
// src/components/Navigation/Notification/Notification.tsx
|
|
29420
|
-
import { jsx as
|
|
29514
|
+
import { jsx as jsx59, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
29421
29515
|
|
|
29422
29516
|
// src/components/Navigation/Logo/Logo.tsx
|
|
29423
|
-
import { jsx as
|
|
29517
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
29424
29518
|
|
|
29425
29519
|
// src/components/ui/avatar.tsx
|
|
29426
|
-
import * as
|
|
29520
|
+
import * as React11 from "react";
|
|
29427
29521
|
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
29428
|
-
import { jsx as
|
|
29429
|
-
var Avatar =
|
|
29522
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
29523
|
+
var Avatar = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx61(
|
|
29430
29524
|
AvatarPrimitive.Root,
|
|
29431
29525
|
{
|
|
29432
29526
|
ref,
|
|
@@ -29438,7 +29532,7 @@ var Avatar = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
29438
29532
|
}
|
|
29439
29533
|
));
|
|
29440
29534
|
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
29441
|
-
var AvatarImage =
|
|
29535
|
+
var AvatarImage = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx61(
|
|
29442
29536
|
AvatarPrimitive.Image,
|
|
29443
29537
|
{
|
|
29444
29538
|
ref,
|
|
@@ -29447,7 +29541,7 @@ var AvatarImage = React10.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
29447
29541
|
}
|
|
29448
29542
|
));
|
|
29449
29543
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
29450
|
-
var AvatarFallback =
|
|
29544
|
+
var AvatarFallback = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx61(
|
|
29451
29545
|
AvatarPrimitive.Fallback,
|
|
29452
29546
|
{
|
|
29453
29547
|
ref,
|
|
@@ -29465,8 +29559,8 @@ import Link6 from "next/link";
|
|
|
29465
29559
|
import Image3 from "next/image";
|
|
29466
29560
|
import { useRouter as useRouter2 } from "next/navigation";
|
|
29467
29561
|
import { DropdownMenuSeparator } from "@radix-ui/react-dropdown-menu";
|
|
29468
|
-
import { useCallback as useCallback3, useMemo as
|
|
29469
|
-
import { Fragment as
|
|
29562
|
+
import { useCallback as useCallback3, useMemo as useMemo6, useState as useState7 } from "react";
|
|
29563
|
+
import { Fragment as Fragment20, jsx as jsx62, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
29470
29564
|
function Navbar({
|
|
29471
29565
|
style,
|
|
29472
29566
|
badgeType,
|
|
@@ -29504,29 +29598,29 @@ function Navbar({
|
|
|
29504
29598
|
router.push(pendingUrl);
|
|
29505
29599
|
}
|
|
29506
29600
|
};
|
|
29507
|
-
const formatedMenu =
|
|
29601
|
+
const formatedMenu = useMemo6(() => {
|
|
29508
29602
|
if (source === "state" && navList && navList.length) {
|
|
29509
29603
|
return navList.map((i) => ({ ...i, header: i.name || "Menu" }));
|
|
29510
29604
|
}
|
|
29511
29605
|
return list || [];
|
|
29512
29606
|
}, [source, navList]);
|
|
29513
|
-
return /* @__PURE__ */ jsxs36(
|
|
29514
|
-
/* @__PURE__ */
|
|
29607
|
+
return /* @__PURE__ */ jsxs36(Fragment20, { children: [
|
|
29608
|
+
/* @__PURE__ */ jsx62(
|
|
29515
29609
|
"nav",
|
|
29516
29610
|
{
|
|
29517
29611
|
className: "w-full border-b border-b-white dark:border-b-gray-800 dark:bg-gray-800 bg-white shadow-sm",
|
|
29518
29612
|
style,
|
|
29519
29613
|
children: /* @__PURE__ */ jsxs36("div", { className: "mx-auto flex max-w-[90%] items-center justify-between px-4 py-4", children: [
|
|
29520
|
-
/* @__PURE__ */
|
|
29614
|
+
/* @__PURE__ */ jsx62(
|
|
29521
29615
|
Link6,
|
|
29522
29616
|
{
|
|
29523
29617
|
href: "/",
|
|
29524
29618
|
onClick: (e) => handleBuilderExit(e, "/"),
|
|
29525
29619
|
className: "flex items-center space-x-2",
|
|
29526
|
-
children: imageUrl ? /* @__PURE__ */
|
|
29620
|
+
children: imageUrl ? /* @__PURE__ */ jsx62(Image3, { src: imageUrl, alt: altText, width: 200, height: 200 }) : /* @__PURE__ */ jsx62("span", { className: "font-semibold text-blue-700", children: "Logo" })
|
|
29527
29621
|
}
|
|
29528
29622
|
),
|
|
29529
|
-
!isMobileView && /* @__PURE__ */
|
|
29623
|
+
!isMobileView && /* @__PURE__ */ jsx62("div", { className: "flex items-center space-x-6 sm:hidden md:flex", children: formatedMenu.map((item) => /* @__PURE__ */ jsx62(
|
|
29530
29624
|
Link6,
|
|
29531
29625
|
{
|
|
29532
29626
|
href: item.url || "#",
|
|
@@ -29537,38 +29631,38 @@ function Navbar({
|
|
|
29537
29631
|
item.id
|
|
29538
29632
|
)) }),
|
|
29539
29633
|
/* @__PURE__ */ jsxs36("div", { className: "flex items-center space-x-3", children: [
|
|
29540
|
-
!isMobileView ? /* @__PURE__ */
|
|
29541
|
-
/* @__PURE__ */
|
|
29542
|
-
/* @__PURE__ */
|
|
29543
|
-
] }) }) : /* @__PURE__ */
|
|
29634
|
+
!isMobileView ? /* @__PURE__ */ jsx62("div", { className: "flex-1 px-6", children: /* @__PURE__ */ jsxs36("div", { className: "relative w-full max-w-md border border-gray-300 rounded-md", children: [
|
|
29635
|
+
/* @__PURE__ */ jsx62(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 dark:text-white text-gray-400" }),
|
|
29636
|
+
/* @__PURE__ */ jsx62(Input, { placeholder: "Search", className: "pl-9 text-gray-400" })
|
|
29637
|
+
] }) }) : /* @__PURE__ */ jsx62(Button, { variant: "ghost", size: "icon", className: "border border-gray-400", children: /* @__PURE__ */ jsx62(Search, { className: "h-5 w-5 text-gray-400" }) }),
|
|
29544
29638
|
/* @__PURE__ */ jsxs36("div", { className: "relative bg-[#E9E9E9] dark:bg-gray-700 rounded-md", children: [
|
|
29545
|
-
/* @__PURE__ */
|
|
29546
|
-
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */
|
|
29639
|
+
/* @__PURE__ */ jsx62(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ jsx62(Bell, { className: "h-5 w-5 text-[#1C1B1F] dark:text-gray-400" }) }),
|
|
29640
|
+
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */ jsx62("span", { className: "absolute -top-1 -right-1 flex h-4 w-4 items-center justify-center rounded-full bg-red-500 text-[10px] text-white leading-8", children: badgeCount }) : /* @__PURE__ */ jsx62("span", { className: "absolute -top-1 -right-1 flex h-2 w-2 items-center justify-center rounded-full bg-red-500" })
|
|
29547
29641
|
] }),
|
|
29548
29642
|
/* @__PURE__ */ jsxs36(DropdownMenu, { children: [
|
|
29549
|
-
/* @__PURE__ */
|
|
29550
|
-
!isMobileView && showName && /* @__PURE__ */
|
|
29551
|
-
!isMobileView ? /* @__PURE__ */ jsxs36(
|
|
29552
|
-
/* @__PURE__ */
|
|
29643
|
+
/* @__PURE__ */ jsx62(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs36("div", { className: "flex items-center space-x-2", children: [
|
|
29644
|
+
!isMobileView && showName && /* @__PURE__ */ jsx62("h4", { className: "text-[#000000] dark:text-gray-300 text-[13px] font-[500] mb-0", children: userName }),
|
|
29645
|
+
!isMobileView ? /* @__PURE__ */ jsxs36(Fragment20, { children: [
|
|
29646
|
+
/* @__PURE__ */ jsx62(Avatar, { className: "cursor-pointer h-8 w-8 text-gray-900", children: profileType === "avatar" ? /* @__PURE__ */ jsx62(
|
|
29553
29647
|
AvatarImage,
|
|
29554
29648
|
{
|
|
29555
29649
|
src: "/images/appbuilder/toolset/profile.svg",
|
|
29556
29650
|
alt: "Profile"
|
|
29557
29651
|
}
|
|
29558
|
-
) : /* @__PURE__ */
|
|
29559
|
-
/* @__PURE__ */
|
|
29652
|
+
) : /* @__PURE__ */ jsx62("div", { className: "w-8 h-8 bg-[#12715b] rounded-full text-[#fff] text-center text-[11px] flex items-center justify-center", children: userName && getInitials(userName) }) }),
|
|
29653
|
+
/* @__PURE__ */ jsx62(
|
|
29560
29654
|
Button,
|
|
29561
29655
|
{
|
|
29562
29656
|
variant: "ghost",
|
|
29563
29657
|
size: "icon",
|
|
29564
29658
|
className: "text-gray-900 md:hidden dark:invert",
|
|
29565
|
-
children: /* @__PURE__ */
|
|
29659
|
+
children: /* @__PURE__ */ jsx62(Menu, { className: "h-6 w-6" })
|
|
29566
29660
|
}
|
|
29567
29661
|
)
|
|
29568
|
-
] }) : /* @__PURE__ */
|
|
29662
|
+
] }) : /* @__PURE__ */ jsx62(Button, { variant: "ghost", size: "icon", className: "text-gray-900 dark:invert", children: /* @__PURE__ */ jsx62(Menu, { className: "h-6 w-6" }) })
|
|
29569
29663
|
] }) }),
|
|
29570
29664
|
/* @__PURE__ */ jsxs36(DropdownMenuContent, { align: "end", className: "bg-white dark:bg-gray-800", children: [
|
|
29571
|
-
profileMenu && profileMenu.length > 0 && /* @__PURE__ */
|
|
29665
|
+
profileMenu && profileMenu.length > 0 && /* @__PURE__ */ jsx62(Fragment20, { children: profileMenu.map((item) => /* @__PURE__ */ jsx62(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ jsx62(
|
|
29572
29666
|
Link6,
|
|
29573
29667
|
{
|
|
29574
29668
|
href: item.url || "#",
|
|
@@ -29577,8 +29671,8 @@ function Navbar({
|
|
|
29577
29671
|
}
|
|
29578
29672
|
) }, item.id)) }),
|
|
29579
29673
|
/* @__PURE__ */ jsxs36("div", { className: "md:hidden", children: [
|
|
29580
|
-
/* @__PURE__ */
|
|
29581
|
-
formatedMenu && formatedMenu.length > 0 && /* @__PURE__ */
|
|
29674
|
+
/* @__PURE__ */ jsx62(DropdownMenuSeparator, {}),
|
|
29675
|
+
formatedMenu && formatedMenu.length > 0 && /* @__PURE__ */ jsx62(Fragment20, { children: formatedMenu.map((item) => /* @__PURE__ */ jsx62(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ jsx62(
|
|
29582
29676
|
Link6,
|
|
29583
29677
|
{
|
|
29584
29678
|
href: item.url || "#",
|
|
@@ -29593,21 +29687,21 @@ function Navbar({
|
|
|
29593
29687
|
] })
|
|
29594
29688
|
}
|
|
29595
29689
|
),
|
|
29596
|
-
/* @__PURE__ */
|
|
29690
|
+
/* @__PURE__ */ jsx62(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ jsxs36(DialogContent, { className: "bg-[#fff]", children: [
|
|
29597
29691
|
/* @__PURE__ */ jsxs36(DialogHeader, { children: [
|
|
29598
|
-
/* @__PURE__ */
|
|
29599
|
-
/* @__PURE__ */
|
|
29692
|
+
/* @__PURE__ */ jsx62(DialogTitle, { children: "Exit Builder?" }),
|
|
29693
|
+
/* @__PURE__ */ jsx62(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
|
|
29600
29694
|
] }),
|
|
29601
29695
|
/* @__PURE__ */ jsxs36(DialogFooter, { children: [
|
|
29602
|
-
/* @__PURE__ */
|
|
29603
|
-
/* @__PURE__ */
|
|
29696
|
+
/* @__PURE__ */ jsx62(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
|
|
29697
|
+
/* @__PURE__ */ jsx62(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
|
|
29604
29698
|
] })
|
|
29605
29699
|
] }) })
|
|
29606
29700
|
] });
|
|
29607
29701
|
}
|
|
29608
29702
|
|
|
29609
29703
|
// src/components/Chart/BarChart.tsx
|
|
29610
|
-
import
|
|
29704
|
+
import React12 from "react";
|
|
29611
29705
|
import {
|
|
29612
29706
|
BarChart,
|
|
29613
29707
|
Bar,
|
|
@@ -29620,35 +29714,35 @@ import {
|
|
|
29620
29714
|
ResponsiveContainer,
|
|
29621
29715
|
Legend
|
|
29622
29716
|
} from "recharts";
|
|
29623
|
-
import { jsx as
|
|
29717
|
+
import { jsx as jsx63, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
29624
29718
|
var ChartComponent = ({ className, style, loading, ...props }) => {
|
|
29625
29719
|
const data = Array.isArray(props.data) ? props.data : [];
|
|
29626
29720
|
const chartType = props.chartType || "bar";
|
|
29627
29721
|
const legendsPosition = props.legendsPosition === "middle" || props.legendsPosition === "bottom" ? props.legendsPosition : "top";
|
|
29628
29722
|
if (loading || data.length === 0) {
|
|
29629
|
-
return /* @__PURE__ */
|
|
29723
|
+
return /* @__PURE__ */ jsx63(
|
|
29630
29724
|
"div",
|
|
29631
29725
|
{
|
|
29632
29726
|
className: `flex items-center justify-center w-full h-[300px] md:h-[400px] bg-gray-50 animate-pulse rounded-lg ${className}`,
|
|
29633
29727
|
style,
|
|
29634
|
-
children: /* @__PURE__ */
|
|
29728
|
+
children: /* @__PURE__ */ jsx63("div", { className: "text-gray-400 text-sm md:text-base", children: loading ? "Loading chart report..." : "No data available to display the chart." })
|
|
29635
29729
|
}
|
|
29636
29730
|
);
|
|
29637
29731
|
}
|
|
29638
|
-
return /* @__PURE__ */
|
|
29639
|
-
/* @__PURE__ */
|
|
29640
|
-
/* @__PURE__ */
|
|
29641
|
-
/* @__PURE__ */
|
|
29642
|
-
/* @__PURE__ */
|
|
29643
|
-
/* @__PURE__ */
|
|
29644
|
-
/* @__PURE__ */
|
|
29732
|
+
return /* @__PURE__ */ jsx63("div", { className: `${className} h-[400px]`, style, children: /* @__PURE__ */ jsx63(ResponsiveContainer, { width: "100%", height: "100%", children: chartType === "bar" ? /* @__PURE__ */ jsxs37(BarChart, { data, title: "Leads", desc: "content", children: [
|
|
29733
|
+
/* @__PURE__ */ jsx63(CartesianGrid, { strokeDasharray: "3 3" }),
|
|
29734
|
+
/* @__PURE__ */ jsx63(XAxis, { dataKey: "name" }),
|
|
29735
|
+
/* @__PURE__ */ jsx63(YAxis, {}),
|
|
29736
|
+
/* @__PURE__ */ jsx63(Tooltip, { formatter: (value) => `${value}k` }),
|
|
29737
|
+
/* @__PURE__ */ jsx63(Legend, { verticalAlign: legendsPosition, align: "center" }),
|
|
29738
|
+
/* @__PURE__ */ jsx63(
|
|
29645
29739
|
Bar,
|
|
29646
29740
|
{
|
|
29647
29741
|
dataKey: "value",
|
|
29648
29742
|
fill: "#00695C",
|
|
29649
29743
|
radius: [6, 6, 0, 0],
|
|
29650
29744
|
isAnimationActive: false,
|
|
29651
|
-
children: data.map((entry, index) => /* @__PURE__ */
|
|
29745
|
+
children: data.map((entry, index) => /* @__PURE__ */ jsx63(
|
|
29652
29746
|
"rect",
|
|
29653
29747
|
{
|
|
29654
29748
|
fill: entry.color || "#00695C"
|
|
@@ -29658,15 +29752,15 @@ var ChartComponent = ({ className, style, loading, ...props }) => {
|
|
|
29658
29752
|
}
|
|
29659
29753
|
)
|
|
29660
29754
|
] }) : /* @__PURE__ */ jsxs37(AreaChart, { data, children: [
|
|
29661
|
-
/* @__PURE__ */
|
|
29662
|
-
/* @__PURE__ */
|
|
29663
|
-
/* @__PURE__ */
|
|
29755
|
+
/* @__PURE__ */ jsx63("defs", { children: /* @__PURE__ */ jsxs37("linearGradient", { id: "colorCount", x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
29756
|
+
/* @__PURE__ */ jsx63("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
|
|
29757
|
+
/* @__PURE__ */ jsx63("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
|
|
29664
29758
|
] }) }),
|
|
29665
|
-
/* @__PURE__ */
|
|
29666
|
-
/* @__PURE__ */
|
|
29667
|
-
/* @__PURE__ */
|
|
29668
|
-
/* @__PURE__ */
|
|
29669
|
-
/* @__PURE__ */
|
|
29759
|
+
/* @__PURE__ */ jsx63(CartesianGrid, { strokeDasharray: "3 3" }),
|
|
29760
|
+
/* @__PURE__ */ jsx63(XAxis, { dataKey: "name" }),
|
|
29761
|
+
/* @__PURE__ */ jsx63(YAxis, {}),
|
|
29762
|
+
/* @__PURE__ */ jsx63(Tooltip, { formatter: (value) => `${value}k` }),
|
|
29763
|
+
/* @__PURE__ */ jsx63(
|
|
29670
29764
|
Area,
|
|
29671
29765
|
{
|
|
29672
29766
|
type: "monotone",
|
|
@@ -29679,10 +29773,10 @@ var ChartComponent = ({ className, style, loading, ...props }) => {
|
|
|
29679
29773
|
)
|
|
29680
29774
|
] }) }) });
|
|
29681
29775
|
};
|
|
29682
|
-
var BarChart_default =
|
|
29776
|
+
var BarChart_default = React12.memo(ChartComponent);
|
|
29683
29777
|
|
|
29684
29778
|
// src/components/Chart/PieChart.tsx
|
|
29685
|
-
import
|
|
29779
|
+
import React13, { useEffect as useEffect23, useMemo as useMemo7, useState as useState8 } from "react";
|
|
29686
29780
|
import {
|
|
29687
29781
|
PieChart,
|
|
29688
29782
|
Pie,
|
|
@@ -29691,7 +29785,7 @@ import {
|
|
|
29691
29785
|
Tooltip as Tooltip2,
|
|
29692
29786
|
LabelList
|
|
29693
29787
|
} from "recharts";
|
|
29694
|
-
import { Fragment as
|
|
29788
|
+
import { Fragment as Fragment21, jsx as jsx64, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
29695
29789
|
var getRandomColor = () => {
|
|
29696
29790
|
const palette = [
|
|
29697
29791
|
"#2563eb",
|
|
@@ -29711,32 +29805,32 @@ var DonutChart = ({ className, style, loading, ...props }) => {
|
|
|
29711
29805
|
const showLegends = props.showLegends ?? true;
|
|
29712
29806
|
const labelType = props.labelType || "inside";
|
|
29713
29807
|
const canvasMode = props.canvasMode;
|
|
29714
|
-
const data =
|
|
29808
|
+
const data = useMemo7(() => {
|
|
29715
29809
|
if (!Array.isArray(props.data)) return [];
|
|
29716
29810
|
return props.data.map((item) => ({ ...item, color: getRandomColor() }));
|
|
29717
29811
|
}, [props.data]);
|
|
29718
|
-
const total =
|
|
29812
|
+
const total = useMemo7(() => data.reduce((sum, d) => sum + d.value, 0), [data]);
|
|
29719
29813
|
const forceMobile = canvasMode === "mobile" || canvasMode === "tablet";
|
|
29720
29814
|
const [mounted, setMounted] = useState8(false);
|
|
29721
29815
|
useEffect23(() => {
|
|
29722
29816
|
const timeout = setTimeout(() => setMounted(true), 100);
|
|
29723
29817
|
return () => clearTimeout(timeout);
|
|
29724
29818
|
}, []);
|
|
29725
|
-
const renderLegends =
|
|
29819
|
+
const renderLegends = useMemo7(() => {
|
|
29726
29820
|
if (!showLegends) return null;
|
|
29727
|
-
return /* @__PURE__ */
|
|
29821
|
+
return /* @__PURE__ */ jsx64(Fragment21, { children: data.map((d) => /* @__PURE__ */ jsxs38(
|
|
29728
29822
|
"div",
|
|
29729
29823
|
{
|
|
29730
29824
|
className: "flex items-center space-x-2 rounded-md border border-gray-200 px-3 py-2 w-[48%] md:w-auto",
|
|
29731
29825
|
children: [
|
|
29732
|
-
/* @__PURE__ */
|
|
29826
|
+
/* @__PURE__ */ jsx64(
|
|
29733
29827
|
"span",
|
|
29734
29828
|
{
|
|
29735
29829
|
className: "inline-block w-[16px] h-[16px] rounded",
|
|
29736
29830
|
style: { backgroundColor: d.color }
|
|
29737
29831
|
}
|
|
29738
29832
|
),
|
|
29739
|
-
/* @__PURE__ */
|
|
29833
|
+
/* @__PURE__ */ jsx64("span", { className: "text-[#000000] text-[12px] md:text-[13px] font-[500]", children: d.name })
|
|
29740
29834
|
]
|
|
29741
29835
|
},
|
|
29742
29836
|
d.name
|
|
@@ -29744,12 +29838,12 @@ var DonutChart = ({ className, style, loading, ...props }) => {
|
|
|
29744
29838
|
}, [data, showLegends]);
|
|
29745
29839
|
if (!mounted) return null;
|
|
29746
29840
|
if (loading || data.length === 0) {
|
|
29747
|
-
return /* @__PURE__ */
|
|
29841
|
+
return /* @__PURE__ */ jsx64(
|
|
29748
29842
|
"div",
|
|
29749
29843
|
{
|
|
29750
29844
|
className: `flex items-center justify-center w-full h-[300px] md:h-[400px] bg-gray-50 animate-pulse rounded-lg ${className}`,
|
|
29751
29845
|
style,
|
|
29752
|
-
children: /* @__PURE__ */
|
|
29846
|
+
children: /* @__PURE__ */ jsx64("div", { className: "text-gray-400 text-sm md:text-base", children: loading ? "Loading chart report..." : "No data available to display the chart." })
|
|
29753
29847
|
}
|
|
29754
29848
|
);
|
|
29755
29849
|
}
|
|
@@ -29760,7 +29854,7 @@ var DonutChart = ({ className, style, loading, ...props }) => {
|
|
|
29760
29854
|
style,
|
|
29761
29855
|
children: [
|
|
29762
29856
|
/* @__PURE__ */ jsxs38("div", { className: "relative w-full md:w-[70%] h-[300px] md:h-[400px] flex items-center justify-center", children: [
|
|
29763
|
-
/* @__PURE__ */
|
|
29857
|
+
/* @__PURE__ */ jsx64(ResponsiveContainer2, { width: "99%", height: "100%", children: /* @__PURE__ */ jsxs38(PieChart, { children: [
|
|
29764
29858
|
/* @__PURE__ */ jsxs38(
|
|
29765
29859
|
Pie,
|
|
29766
29860
|
{
|
|
@@ -29773,8 +29867,8 @@ var DonutChart = ({ className, style, loading, ...props }) => {
|
|
|
29773
29867
|
labelLine: false,
|
|
29774
29868
|
isAnimationActive: false,
|
|
29775
29869
|
children: [
|
|
29776
|
-
data.map((entry, index) => /* @__PURE__ */
|
|
29777
|
-
/* @__PURE__ */
|
|
29870
|
+
data.map((entry, index) => /* @__PURE__ */ jsx64(Cell, { fill: entry.color }, `cell-${index}`)),
|
|
29871
|
+
/* @__PURE__ */ jsx64(
|
|
29778
29872
|
LabelList,
|
|
29779
29873
|
{
|
|
29780
29874
|
dataKey: "value",
|
|
@@ -29787,7 +29881,7 @@ var DonutChart = ({ className, style, loading, ...props }) => {
|
|
|
29787
29881
|
]
|
|
29788
29882
|
}
|
|
29789
29883
|
),
|
|
29790
|
-
/* @__PURE__ */
|
|
29884
|
+
/* @__PURE__ */ jsx64(
|
|
29791
29885
|
Tooltip2,
|
|
29792
29886
|
{
|
|
29793
29887
|
formatter: (value, name) => [`${value}k`, name]
|
|
@@ -29805,18 +29899,18 @@ var DonutChart = ({ className, style, loading, ...props }) => {
|
|
|
29805
29899
|
}
|
|
29806
29900
|
)
|
|
29807
29901
|
] }),
|
|
29808
|
-
/* @__PURE__ */
|
|
29902
|
+
/* @__PURE__ */ jsx64("div", { className: "flex flex-wrap justify-center gap-2 mt-6 w-full md:w-auto", children: renderLegends })
|
|
29809
29903
|
]
|
|
29810
29904
|
}
|
|
29811
29905
|
);
|
|
29812
29906
|
};
|
|
29813
|
-
var PieChart_default =
|
|
29907
|
+
var PieChart_default = React13.memo(DonutChart);
|
|
29814
29908
|
|
|
29815
29909
|
// src/components/Blocks/EmailComposer.tsx
|
|
29816
|
-
import { jsx as
|
|
29910
|
+
import { jsx as jsx65, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
29817
29911
|
function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc, setShowBcc, cc, setCc, bcc, setBcc, subject, setSubject, body, setBody }) {
|
|
29818
|
-
return /* @__PURE__ */
|
|
29819
|
-
/* @__PURE__ */
|
|
29912
|
+
return /* @__PURE__ */ jsx65("div", { className, style, children: /* @__PURE__ */ jsxs39("div", { className: "border rounded-md shadow bg-[#fff] p-4 mx-auto z-[50] relative", children: [
|
|
29913
|
+
/* @__PURE__ */ jsx65("div", { className: "mb-3", children: /* @__PURE__ */ jsx65(
|
|
29820
29914
|
"input",
|
|
29821
29915
|
{
|
|
29822
29916
|
type: "email",
|
|
@@ -29825,8 +29919,8 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
29825
29919
|
required: true
|
|
29826
29920
|
}
|
|
29827
29921
|
) }),
|
|
29828
|
-
/* @__PURE__ */
|
|
29829
|
-
/* @__PURE__ */
|
|
29922
|
+
/* @__PURE__ */ jsx65("div", { className: "mb-3", children: /* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-2", children: [
|
|
29923
|
+
/* @__PURE__ */ jsx65(
|
|
29830
29924
|
"input",
|
|
29831
29925
|
{
|
|
29832
29926
|
type: "email",
|
|
@@ -29837,7 +29931,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
29837
29931
|
required: true
|
|
29838
29932
|
}
|
|
29839
29933
|
),
|
|
29840
|
-
!showCc && /* @__PURE__ */
|
|
29934
|
+
!showCc && /* @__PURE__ */ jsx65(
|
|
29841
29935
|
"button",
|
|
29842
29936
|
{
|
|
29843
29937
|
onClick: () => setShowCc?.(true),
|
|
@@ -29845,7 +29939,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
29845
29939
|
children: "Cc"
|
|
29846
29940
|
}
|
|
29847
29941
|
),
|
|
29848
|
-
!showBcc && /* @__PURE__ */
|
|
29942
|
+
!showBcc && /* @__PURE__ */ jsx65(
|
|
29849
29943
|
"button",
|
|
29850
29944
|
{
|
|
29851
29945
|
onClick: () => setShowBcc?.(true),
|
|
@@ -29854,7 +29948,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
29854
29948
|
}
|
|
29855
29949
|
)
|
|
29856
29950
|
] }) }),
|
|
29857
|
-
showCc && /* @__PURE__ */
|
|
29951
|
+
showCc && /* @__PURE__ */ jsx65("div", { className: "mb-3", children: /* @__PURE__ */ jsx65(
|
|
29858
29952
|
"input",
|
|
29859
29953
|
{
|
|
29860
29954
|
type: "text",
|
|
@@ -29864,7 +29958,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
29864
29958
|
className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
|
|
29865
29959
|
}
|
|
29866
29960
|
) }),
|
|
29867
|
-
showBcc && /* @__PURE__ */
|
|
29961
|
+
showBcc && /* @__PURE__ */ jsx65("div", { className: "mb-3", children: /* @__PURE__ */ jsx65(
|
|
29868
29962
|
"input",
|
|
29869
29963
|
{
|
|
29870
29964
|
type: "text",
|
|
@@ -29874,7 +29968,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
29874
29968
|
className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
|
|
29875
29969
|
}
|
|
29876
29970
|
) }),
|
|
29877
|
-
/* @__PURE__ */
|
|
29971
|
+
/* @__PURE__ */ jsx65("div", { className: "mb-3", children: /* @__PURE__ */ jsx65(
|
|
29878
29972
|
"input",
|
|
29879
29973
|
{
|
|
29880
29974
|
type: "text",
|
|
@@ -29884,11 +29978,11 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
29884
29978
|
className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
|
|
29885
29979
|
}
|
|
29886
29980
|
) }),
|
|
29887
|
-
/* @__PURE__ */
|
|
29981
|
+
/* @__PURE__ */ jsx65("div", { className: "mb-4", children: /* @__PURE__ */ jsx65(MyEditor, { value: body, onChange: setBody }) }),
|
|
29888
29982
|
/* @__PURE__ */ jsxs39("div", { className: "flex justify-end gap-2", children: [
|
|
29889
|
-
/* @__PURE__ */
|
|
29890
|
-
/* @__PURE__ */
|
|
29891
|
-
/* @__PURE__ */
|
|
29983
|
+
/* @__PURE__ */ jsx65("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
|
|
29984
|
+
/* @__PURE__ */ jsx65("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
|
|
29985
|
+
/* @__PURE__ */ jsx65("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
|
|
29892
29986
|
] })
|
|
29893
29987
|
] }) });
|
|
29894
29988
|
}
|
|
@@ -29933,10 +30027,10 @@ function showSonnerToast({
|
|
|
29933
30027
|
// src/components/ui/sonner.tsx
|
|
29934
30028
|
import { useTheme } from "next-themes";
|
|
29935
30029
|
import { Toaster as Sonner } from "sonner";
|
|
29936
|
-
import { jsx as
|
|
30030
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
29937
30031
|
var Toaster = ({ ...props }) => {
|
|
29938
30032
|
const { theme = "system" } = useTheme();
|
|
29939
|
-
return /* @__PURE__ */
|
|
30033
|
+
return /* @__PURE__ */ jsx66(
|
|
29940
30034
|
Sonner,
|
|
29941
30035
|
{
|
|
29942
30036
|
theme,
|
|
@@ -29979,6 +30073,7 @@ export {
|
|
|
29979
30073
|
PhoneInput_default as Phone,
|
|
29980
30074
|
PieChart_default as PieChart,
|
|
29981
30075
|
RadioInput_default as RadioGroup,
|
|
30076
|
+
Repeater_default as Repeater,
|
|
29982
30077
|
RichText,
|
|
29983
30078
|
SearchInput_default as Search,
|
|
29984
30079
|
Shape_default as Shape,
|