@algorithm-shift/design-system 1.2.75 → 1.2.77
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 +20 -3
- package/dist/index.d.ts +20 -3
- package/dist/index.js +704 -647
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +580 -524
- 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 }
|
|
@@ -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,
|
|
@@ -28503,10 +28511,12 @@ var MultiSelect = ({
|
|
|
28503
28511
|
disabled,
|
|
28504
28512
|
searchable = true,
|
|
28505
28513
|
className = "",
|
|
28514
|
+
dataKey = "value",
|
|
28515
|
+
dataLabel = "label",
|
|
28506
28516
|
...props
|
|
28507
28517
|
}) => {
|
|
28508
|
-
const [open, setOpen] =
|
|
28509
|
-
|
|
28518
|
+
const [open, setOpen] = React8.useState(false);
|
|
28519
|
+
React8.useEffect(() => {
|
|
28510
28520
|
if (value) {
|
|
28511
28521
|
onChange(value);
|
|
28512
28522
|
}
|
|
@@ -28516,12 +28526,16 @@ var MultiSelect = ({
|
|
|
28516
28526
|
value?.includes(val) ? value.filter((v) => v !== val) : [...value || [], val]
|
|
28517
28527
|
);
|
|
28518
28528
|
};
|
|
28519
|
-
const selectedLabels =
|
|
28529
|
+
const selectedLabels = React8.useMemo(
|
|
28520
28530
|
() => data.filter((opt) => value.includes(opt.value)).map((opt) => opt.label),
|
|
28521
28531
|
[data, value]
|
|
28522
28532
|
);
|
|
28533
|
+
const options = data.map((item) => ({
|
|
28534
|
+
value: item[dataKey],
|
|
28535
|
+
label: item[dataLabel]
|
|
28536
|
+
}));
|
|
28523
28537
|
return /* @__PURE__ */ jsxs28(Popover, { open, onOpenChange: setOpen, children: [
|
|
28524
|
-
/* @__PURE__ */
|
|
28538
|
+
/* @__PURE__ */ jsx49(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs28(
|
|
28525
28539
|
Button,
|
|
28526
28540
|
{
|
|
28527
28541
|
variant: "outline",
|
|
@@ -28530,12 +28544,12 @@ var MultiSelect = ({
|
|
|
28530
28544
|
disabled,
|
|
28531
28545
|
type: "button",
|
|
28532
28546
|
children: [
|
|
28533
|
-
/* @__PURE__ */
|
|
28534
|
-
/* @__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" })
|
|
28535
28549
|
]
|
|
28536
28550
|
}
|
|
28537
28551
|
) }),
|
|
28538
|
-
/* @__PURE__ */
|
|
28552
|
+
/* @__PURE__ */ jsx49(
|
|
28539
28553
|
PopoverContent,
|
|
28540
28554
|
{
|
|
28541
28555
|
align: "start",
|
|
@@ -28545,16 +28559,16 @@ var MultiSelect = ({
|
|
|
28545
28559
|
if (e.target.closest(".keep-open")) e.preventDefault();
|
|
28546
28560
|
},
|
|
28547
28561
|
children: /* @__PURE__ */ jsxs28(Command2, { shouldFilter: searchable, children: [
|
|
28548
|
-
searchable && /* @__PURE__ */
|
|
28562
|
+
searchable && /* @__PURE__ */ jsx49(CommandInput, { placeholder: "Search..." }),
|
|
28549
28563
|
/* @__PURE__ */ jsxs28(CommandList, { children: [
|
|
28550
|
-
/* @__PURE__ */
|
|
28551
|
-
/* @__PURE__ */
|
|
28564
|
+
/* @__PURE__ */ jsx49(CommandEmpty, { children: "No options found." }),
|
|
28565
|
+
/* @__PURE__ */ jsx49(CommandGroup, { children: options.map((opt) => {
|
|
28552
28566
|
const isSelected = value.includes(opt.value);
|
|
28553
|
-
return /* @__PURE__ */
|
|
28567
|
+
return /* @__PURE__ */ jsx49(
|
|
28554
28568
|
"div",
|
|
28555
28569
|
{
|
|
28556
28570
|
className: "keep-open",
|
|
28557
|
-
children: /* @__PURE__ */
|
|
28571
|
+
children: /* @__PURE__ */ jsx49(
|
|
28558
28572
|
CommandItem,
|
|
28559
28573
|
{
|
|
28560
28574
|
onMouseDown: (e) => {
|
|
@@ -28562,8 +28576,8 @@ var MultiSelect = ({
|
|
|
28562
28576
|
toggleOption(opt.value);
|
|
28563
28577
|
},
|
|
28564
28578
|
children: /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-2", children: [
|
|
28565
|
-
/* @__PURE__ */
|
|
28566
|
-
/* @__PURE__ */
|
|
28579
|
+
/* @__PURE__ */ jsx49(Checkbox, { checked: isSelected }),
|
|
28580
|
+
/* @__PURE__ */ jsx49("span", { children: opt.label })
|
|
28567
28581
|
] })
|
|
28568
28582
|
},
|
|
28569
28583
|
opt.value
|
|
@@ -28576,13 +28590,13 @@ var MultiSelect = ({
|
|
|
28576
28590
|
] })
|
|
28577
28591
|
}
|
|
28578
28592
|
),
|
|
28579
|
-
props.errorMessage && /* @__PURE__ */
|
|
28593
|
+
props.errorMessage && /* @__PURE__ */ jsx49("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
28580
28594
|
] });
|
|
28581
28595
|
};
|
|
28582
28596
|
var MultiSelect_default = MultiSelect;
|
|
28583
28597
|
|
|
28584
28598
|
// src/components/ui/data-table.tsx
|
|
28585
|
-
import * as
|
|
28599
|
+
import * as React9 from "react";
|
|
28586
28600
|
import { faEllipsisH } from "@fortawesome/free-solid-svg-icons";
|
|
28587
28601
|
import { FontAwesomeIcon as FontAwesomeIcon3 } from "@fortawesome/react-fontawesome";
|
|
28588
28602
|
import {
|
|
@@ -28594,14 +28608,14 @@ import {
|
|
|
28594
28608
|
} from "@tanstack/react-table";
|
|
28595
28609
|
|
|
28596
28610
|
// src/components/ui/table.tsx
|
|
28597
|
-
import { jsx as
|
|
28611
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
28598
28612
|
function Table3({ className, ...props }) {
|
|
28599
|
-
return /* @__PURE__ */
|
|
28613
|
+
return /* @__PURE__ */ jsx50(
|
|
28600
28614
|
"div",
|
|
28601
28615
|
{
|
|
28602
28616
|
"data-slot": "table-container",
|
|
28603
28617
|
className: "relative w-full overflow-x-auto rounded-md border border-gray-200 bg-white",
|
|
28604
|
-
children: /* @__PURE__ */
|
|
28618
|
+
children: /* @__PURE__ */ jsx50(
|
|
28605
28619
|
"table",
|
|
28606
28620
|
{
|
|
28607
28621
|
"data-slot": "table",
|
|
@@ -28613,7 +28627,7 @@ function Table3({ className, ...props }) {
|
|
|
28613
28627
|
);
|
|
28614
28628
|
}
|
|
28615
28629
|
function TableHeader({ className, ...props }) {
|
|
28616
|
-
return /* @__PURE__ */
|
|
28630
|
+
return /* @__PURE__ */ jsx50(
|
|
28617
28631
|
"thead",
|
|
28618
28632
|
{
|
|
28619
28633
|
"data-slot": "table-header",
|
|
@@ -28626,7 +28640,7 @@ function TableHeader({ className, ...props }) {
|
|
|
28626
28640
|
);
|
|
28627
28641
|
}
|
|
28628
28642
|
function TableBody({ className, ...props }) {
|
|
28629
|
-
return /* @__PURE__ */
|
|
28643
|
+
return /* @__PURE__ */ jsx50(
|
|
28630
28644
|
"tbody",
|
|
28631
28645
|
{
|
|
28632
28646
|
"data-slot": "table-body",
|
|
@@ -28639,7 +28653,7 @@ function TableBody({ className, ...props }) {
|
|
|
28639
28653
|
);
|
|
28640
28654
|
}
|
|
28641
28655
|
function TableRow({ className, ...props }) {
|
|
28642
|
-
return /* @__PURE__ */
|
|
28656
|
+
return /* @__PURE__ */ jsx50(
|
|
28643
28657
|
"tr",
|
|
28644
28658
|
{
|
|
28645
28659
|
"data-slot": "table-row",
|
|
@@ -28652,7 +28666,7 @@ function TableRow({ className, ...props }) {
|
|
|
28652
28666
|
);
|
|
28653
28667
|
}
|
|
28654
28668
|
function TableHead({ className, ...props }) {
|
|
28655
|
-
return /* @__PURE__ */
|
|
28669
|
+
return /* @__PURE__ */ jsx50(
|
|
28656
28670
|
"th",
|
|
28657
28671
|
{
|
|
28658
28672
|
"data-slot": "table-head",
|
|
@@ -28665,7 +28679,7 @@ function TableHead({ className, ...props }) {
|
|
|
28665
28679
|
);
|
|
28666
28680
|
}
|
|
28667
28681
|
function TableCell({ className, ...props }) {
|
|
28668
|
-
return /* @__PURE__ */
|
|
28682
|
+
return /* @__PURE__ */ jsx50(
|
|
28669
28683
|
"td",
|
|
28670
28684
|
{
|
|
28671
28685
|
"data-slot": "table-cell",
|
|
@@ -28679,7 +28693,7 @@ function TableCell({ className, ...props }) {
|
|
|
28679
28693
|
}
|
|
28680
28694
|
|
|
28681
28695
|
// src/components/ui/data-table.tsx
|
|
28682
|
-
import { Fragment as
|
|
28696
|
+
import { Fragment as Fragment18, jsx as jsx51, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
28683
28697
|
function DataTable({
|
|
28684
28698
|
columns,
|
|
28685
28699
|
data,
|
|
@@ -28694,15 +28708,41 @@ function DataTable({
|
|
|
28694
28708
|
onFilterChange,
|
|
28695
28709
|
onGlobalSearch,
|
|
28696
28710
|
globalSearch,
|
|
28697
|
-
onCellClick
|
|
28711
|
+
onCellClick,
|
|
28712
|
+
onDeleteRow,
|
|
28713
|
+
enableDelete
|
|
28698
28714
|
}) {
|
|
28699
|
-
const [columnFilters, setColumnFilters] =
|
|
28700
|
-
const [columnVisibility, setColumnVisibility] =
|
|
28701
|
-
const [manualSort, setManualSort] =
|
|
28702
|
-
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]);
|
|
28703
28743
|
const table = useReactTable({
|
|
28704
28744
|
data,
|
|
28705
|
-
columns,
|
|
28745
|
+
columns: combinedColumns,
|
|
28706
28746
|
state: {
|
|
28707
28747
|
columnFilters,
|
|
28708
28748
|
columnVisibility,
|
|
@@ -28751,7 +28791,7 @@ function DataTable({
|
|
|
28751
28791
|
/* @__PURE__ */ jsxs29("div", { className: `flex ${globalSearch ? "justify-between" : "justify-end"} p-2 bg-gray-50`, children: [
|
|
28752
28792
|
globalSearch && /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2 w-full max-w-sm", children: [
|
|
28753
28793
|
/* @__PURE__ */ jsxs29("div", { className: "relative w-full", children: [
|
|
28754
|
-
/* @__PURE__ */
|
|
28794
|
+
/* @__PURE__ */ jsx51(
|
|
28755
28795
|
"input",
|
|
28756
28796
|
{
|
|
28757
28797
|
type: "text",
|
|
@@ -28766,9 +28806,9 @@ function DataTable({
|
|
|
28766
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]"
|
|
28767
28807
|
}
|
|
28768
28808
|
),
|
|
28769
|
-
/* @__PURE__ */
|
|
28809
|
+
/* @__PURE__ */ jsx51(Search, { className: "absolute left-2 top-2.5 text-gray-400", size: 16 })
|
|
28770
28810
|
] }),
|
|
28771
|
-
/* @__PURE__ */
|
|
28811
|
+
/* @__PURE__ */ jsx51(
|
|
28772
28812
|
Button,
|
|
28773
28813
|
{
|
|
28774
28814
|
size: "sm",
|
|
@@ -28779,7 +28819,7 @@ function DataTable({
|
|
|
28779
28819
|
)
|
|
28780
28820
|
] }),
|
|
28781
28821
|
/* @__PURE__ */ jsxs29(Popover, { children: [
|
|
28782
|
-
/* @__PURE__ */
|
|
28822
|
+
/* @__PURE__ */ jsx51(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx51(
|
|
28783
28823
|
Button,
|
|
28784
28824
|
{
|
|
28785
28825
|
variant: "outline",
|
|
@@ -28789,9 +28829,9 @@ function DataTable({
|
|
|
28789
28829
|
}
|
|
28790
28830
|
) }),
|
|
28791
28831
|
/* @__PURE__ */ jsxs29(PopoverContent, { align: "end", className: "w-48 p-3 space-y-2", children: [
|
|
28792
|
-
/* @__PURE__ */
|
|
28832
|
+
/* @__PURE__ */ jsx51("div", { className: "text-sm font-medium mb-2", children: "Show / Hide Columns" }),
|
|
28793
28833
|
/* @__PURE__ */ jsxs29("label", { className: "flex items-center gap-2 text-sm font-semibold border-b pb-2 mb-2", children: [
|
|
28794
|
-
/* @__PURE__ */
|
|
28834
|
+
/* @__PURE__ */ jsx51(
|
|
28795
28835
|
"input",
|
|
28796
28836
|
{
|
|
28797
28837
|
type: "checkbox",
|
|
@@ -28811,7 +28851,7 @@ function DataTable({
|
|
|
28811
28851
|
"Toggle All"
|
|
28812
28852
|
] }),
|
|
28813
28853
|
table.getAllLeafColumns().map((column) => /* @__PURE__ */ jsxs29("label", { className: "flex items-center gap-2 text-sm", children: [
|
|
28814
|
-
/* @__PURE__ */
|
|
28854
|
+
/* @__PURE__ */ jsx51(
|
|
28815
28855
|
"input",
|
|
28816
28856
|
{
|
|
28817
28857
|
type: "checkbox",
|
|
@@ -28825,11 +28865,11 @@ function DataTable({
|
|
|
28825
28865
|
] })
|
|
28826
28866
|
] }),
|
|
28827
28867
|
/* @__PURE__ */ jsxs29(Table3, { children: [
|
|
28828
|
-
/* @__PURE__ */
|
|
28868
|
+
/* @__PURE__ */ jsx51(TableHeader, { children: table.getHeaderGroups().map((hg) => /* @__PURE__ */ jsx51(TableRow, { children: hg.headers.map((header) => {
|
|
28829
28869
|
const canSort = header.column.getCanSort();
|
|
28830
28870
|
const canFilter = header.column.getCanFilter();
|
|
28831
28871
|
const sortDir = manualSort?.key === header.column.id ? manualSort.dir : null;
|
|
28832
|
-
return /* @__PURE__ */
|
|
28872
|
+
return /* @__PURE__ */ jsx51(TableHead, { className: "relative select-none", children: /* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-between", children: [
|
|
28833
28873
|
/* @__PURE__ */ jsxs29(
|
|
28834
28874
|
"span",
|
|
28835
28875
|
{
|
|
@@ -28842,25 +28882,25 @@ function DataTable({
|
|
|
28842
28882
|
},
|
|
28843
28883
|
children: [
|
|
28844
28884
|
flexRender(header.column.columnDef.header, header.getContext()),
|
|
28845
|
-
canSort && /* @__PURE__ */ jsxs29(
|
|
28846
|
-
sortDir === "asc" && /* @__PURE__ */
|
|
28847
|
-
sortDir === "desc" && /* @__PURE__ */
|
|
28848
|
-
!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" })
|
|
28849
28889
|
] })
|
|
28850
28890
|
]
|
|
28851
28891
|
}
|
|
28852
28892
|
),
|
|
28853
28893
|
canFilter && /* @__PURE__ */ jsxs29(Popover, { children: [
|
|
28854
|
-
/* @__PURE__ */
|
|
28894
|
+
/* @__PURE__ */ jsx51(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx51(
|
|
28855
28895
|
"span",
|
|
28856
28896
|
{
|
|
28857
28897
|
role: "presentation",
|
|
28858
28898
|
className: "pl-5 cursor-pointer",
|
|
28859
28899
|
onClick: (e) => e.stopPropagation(),
|
|
28860
|
-
children: /* @__PURE__ */
|
|
28900
|
+
children: /* @__PURE__ */ jsx51(FontAwesomeIcon3, { icon: faEllipsisH, className: "w-5 h-5 text-gray-500" })
|
|
28861
28901
|
}
|
|
28862
28902
|
) }),
|
|
28863
|
-
/* @__PURE__ */
|
|
28903
|
+
/* @__PURE__ */ jsx51(
|
|
28864
28904
|
PopoverContent,
|
|
28865
28905
|
{
|
|
28866
28906
|
align: "center",
|
|
@@ -28880,8 +28920,8 @@ function DataTable({
|
|
|
28880
28920
|
},
|
|
28881
28921
|
className: "space-y-2",
|
|
28882
28922
|
children: [
|
|
28883
|
-
/* @__PURE__ */
|
|
28884
|
-
/* @__PURE__ */
|
|
28923
|
+
/* @__PURE__ */ jsx51("label", { htmlFor: "filter", className: "text-xs text-gray-500 font-normal", children: "Filter by value:" }),
|
|
28924
|
+
/* @__PURE__ */ jsx51(
|
|
28885
28925
|
"input",
|
|
28886
28926
|
{
|
|
28887
28927
|
name: "filter",
|
|
@@ -28891,7 +28931,7 @@ function DataTable({
|
|
|
28891
28931
|
autoComplete: "off"
|
|
28892
28932
|
}
|
|
28893
28933
|
),
|
|
28894
|
-
/* @__PURE__ */
|
|
28934
|
+
/* @__PURE__ */ jsx51("div", { className: "justify-end flex", children: /* @__PURE__ */ jsx51(
|
|
28895
28935
|
Button,
|
|
28896
28936
|
{
|
|
28897
28937
|
type: "submit",
|
|
@@ -28907,13 +28947,13 @@ function DataTable({
|
|
|
28907
28947
|
] })
|
|
28908
28948
|
] }) }, header.id);
|
|
28909
28949
|
}) }, hg.id)) }),
|
|
28910
|
-
/* @__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) => {
|
|
28911
28951
|
const meta = cell.column.columnDef.meta || {};
|
|
28912
28952
|
const isClickable = meta?.isClickable;
|
|
28913
|
-
return /* @__PURE__ */
|
|
28953
|
+
return /* @__PURE__ */ jsx51(
|
|
28914
28954
|
TableCell,
|
|
28915
28955
|
{
|
|
28916
|
-
className: `${meta?.cellClass ?? ""} ${isClickable ? "cursor-pointer hover:bg-gray-100
|
|
28956
|
+
className: `${meta?.cellClass ?? ""} ${isClickable ? "cursor-pointer hover:bg-gray-100" : ""}`,
|
|
28917
28957
|
style: meta?.cellStyle,
|
|
28918
28958
|
onClick: () => {
|
|
28919
28959
|
if (isClickable && onCellClick) {
|
|
@@ -28924,7 +28964,7 @@ function DataTable({
|
|
|
28924
28964
|
},
|
|
28925
28965
|
cell.id
|
|
28926
28966
|
);
|
|
28927
|
-
}) }, row.id)) : /* @__PURE__ */
|
|
28967
|
+
}) }, row.id)) : /* @__PURE__ */ jsx51(TableRow, { children: /* @__PURE__ */ jsx51(TableCell, { colSpan: combinedColumns.length, className: "h-24 text-center", children: "No results." }) }) })
|
|
28928
28968
|
] }),
|
|
28929
28969
|
pagination && /* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-between py-3 px-2 text-sm w-full", children: [
|
|
28930
28970
|
/* @__PURE__ */ jsxs29("div", { children: [
|
|
@@ -28934,7 +28974,7 @@ function DataTable({
|
|
|
28934
28974
|
table.getPageCount()
|
|
28935
28975
|
] }),
|
|
28936
28976
|
/* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2", children: [
|
|
28937
|
-
/* @__PURE__ */
|
|
28977
|
+
/* @__PURE__ */ jsx51(
|
|
28938
28978
|
"button",
|
|
28939
28979
|
{
|
|
28940
28980
|
onClick: () => table.previousPage(),
|
|
@@ -28947,7 +28987,7 @@ function DataTable({
|
|
|
28947
28987
|
table.getState().pagination.pageIndex + 1,
|
|
28948
28988
|
table.getPageCount(),
|
|
28949
28989
|
5
|
|
28950
|
-
).map((pageNum, index) => /* @__PURE__ */
|
|
28990
|
+
).map((pageNum, index) => /* @__PURE__ */ jsx51(
|
|
28951
28991
|
"button",
|
|
28952
28992
|
{
|
|
28953
28993
|
disabled: pageNum === "...",
|
|
@@ -28957,7 +28997,7 @@ function DataTable({
|
|
|
28957
28997
|
},
|
|
28958
28998
|
index
|
|
28959
28999
|
)),
|
|
28960
|
-
/* @__PURE__ */
|
|
29000
|
+
/* @__PURE__ */ jsx51(
|
|
28961
29001
|
"button",
|
|
28962
29002
|
{
|
|
28963
29003
|
onClick: () => table.nextPage(),
|
|
@@ -28972,7 +29012,7 @@ function DataTable({
|
|
|
28972
29012
|
}
|
|
28973
29013
|
|
|
28974
29014
|
// src/components/DataDisplay/Table/Table.tsx
|
|
28975
|
-
import { jsx as
|
|
29015
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
28976
29016
|
var Table4 = ({
|
|
28977
29017
|
columns,
|
|
28978
29018
|
data,
|
|
@@ -28990,12 +29030,15 @@ var Table4 = ({
|
|
|
28990
29030
|
loading = false,
|
|
28991
29031
|
totalRecords = 0,
|
|
28992
29032
|
globalSearch = false,
|
|
29033
|
+
onCellClick,
|
|
29034
|
+
enableDelete,
|
|
29035
|
+
onDeleteRow,
|
|
28993
29036
|
...props
|
|
28994
29037
|
}) => {
|
|
28995
29038
|
const rawColumns = Array.isArray(columns) ? columns : [];
|
|
28996
29039
|
const rawData = Array.isArray(data) ? data : [];
|
|
28997
29040
|
const isControlled = typeof page === "number";
|
|
28998
|
-
return /* @__PURE__ */
|
|
29041
|
+
return /* @__PURE__ */ jsx52("div", { className: `${className || ""} space-y-3`, style, children: /* @__PURE__ */ jsx52(
|
|
28999
29042
|
DataTable,
|
|
29000
29043
|
{
|
|
29001
29044
|
...props,
|
|
@@ -29016,17 +29059,21 @@ var Table4 = ({
|
|
|
29016
29059
|
onGlobalSearch: (term) => onGlobalSearch?.({ searchTerm: term }),
|
|
29017
29060
|
globalSearch,
|
|
29018
29061
|
onCellClick: (cell) => {
|
|
29019
|
-
|
|
29020
|
-
}
|
|
29062
|
+
onCellClick?.({ id: cell.id, column: cell });
|
|
29063
|
+
},
|
|
29064
|
+
onDeleteRow: (cell) => {
|
|
29065
|
+
onDeleteRow?.(cell.id);
|
|
29066
|
+
},
|
|
29067
|
+
enableDelete
|
|
29021
29068
|
}
|
|
29022
29069
|
) });
|
|
29023
29070
|
};
|
|
29024
29071
|
var Table_default = Table4;
|
|
29025
29072
|
|
|
29026
29073
|
// src/components/ui/pagination.tsx
|
|
29027
|
-
import { jsx as
|
|
29074
|
+
import { jsx as jsx53, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
29028
29075
|
function Pagination({ className, ...props }) {
|
|
29029
|
-
return /* @__PURE__ */
|
|
29076
|
+
return /* @__PURE__ */ jsx53(
|
|
29030
29077
|
"nav",
|
|
29031
29078
|
{
|
|
29032
29079
|
role: "navigation",
|
|
@@ -29041,7 +29088,7 @@ function PaginationContent({
|
|
|
29041
29088
|
className,
|
|
29042
29089
|
...props
|
|
29043
29090
|
}) {
|
|
29044
|
-
return /* @__PURE__ */
|
|
29091
|
+
return /* @__PURE__ */ jsx53(
|
|
29045
29092
|
"ul",
|
|
29046
29093
|
{
|
|
29047
29094
|
"data-slot": "pagination-content",
|
|
@@ -29051,7 +29098,7 @@ function PaginationContent({
|
|
|
29051
29098
|
);
|
|
29052
29099
|
}
|
|
29053
29100
|
function PaginationItem({ ...props }) {
|
|
29054
|
-
return /* @__PURE__ */
|
|
29101
|
+
return /* @__PURE__ */ jsx53("li", { "data-slot": "pagination-item", ...props });
|
|
29055
29102
|
}
|
|
29056
29103
|
function PaginationLink({
|
|
29057
29104
|
className,
|
|
@@ -29059,7 +29106,7 @@ function PaginationLink({
|
|
|
29059
29106
|
size = "icon",
|
|
29060
29107
|
...props
|
|
29061
29108
|
}) {
|
|
29062
|
-
return /* @__PURE__ */
|
|
29109
|
+
return /* @__PURE__ */ jsx53(
|
|
29063
29110
|
"a",
|
|
29064
29111
|
{
|
|
29065
29112
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -29088,8 +29135,8 @@ function PaginationPrevious({
|
|
|
29088
29135
|
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
29089
29136
|
...props,
|
|
29090
29137
|
children: [
|
|
29091
|
-
/* @__PURE__ */
|
|
29092
|
-
/* @__PURE__ */
|
|
29138
|
+
/* @__PURE__ */ jsx53(ChevronLeft, {}),
|
|
29139
|
+
/* @__PURE__ */ jsx53("span", { className: "hidden sm:block", children: "Previous" })
|
|
29093
29140
|
]
|
|
29094
29141
|
}
|
|
29095
29142
|
);
|
|
@@ -29106,8 +29153,8 @@ function PaginationNext({
|
|
|
29106
29153
|
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
29107
29154
|
...props,
|
|
29108
29155
|
children: [
|
|
29109
|
-
/* @__PURE__ */
|
|
29110
|
-
/* @__PURE__ */
|
|
29156
|
+
/* @__PURE__ */ jsx53("span", { className: "hidden sm:block", children: "Next" }),
|
|
29157
|
+
/* @__PURE__ */ jsx53(ChevronRight, {})
|
|
29111
29158
|
]
|
|
29112
29159
|
}
|
|
29113
29160
|
);
|
|
@@ -29124,15 +29171,15 @@ function PaginationEllipsis({
|
|
|
29124
29171
|
className: cn("flex size-9 items-center justify-center", className),
|
|
29125
29172
|
...props,
|
|
29126
29173
|
children: [
|
|
29127
|
-
/* @__PURE__ */
|
|
29128
|
-
/* @__PURE__ */
|
|
29174
|
+
/* @__PURE__ */ jsx53(Ellipsis, { className: "size-4" }),
|
|
29175
|
+
/* @__PURE__ */ jsx53("span", { className: "sr-only", children: "More pages" })
|
|
29129
29176
|
]
|
|
29130
29177
|
}
|
|
29131
29178
|
);
|
|
29132
29179
|
}
|
|
29133
29180
|
|
|
29134
29181
|
// src/components/DataDisplay/Pagination/Pagination.tsx
|
|
29135
|
-
import { jsx as
|
|
29182
|
+
import { jsx as jsx54, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
29136
29183
|
var CustomPagination = ({
|
|
29137
29184
|
totalPages,
|
|
29138
29185
|
currentPage,
|
|
@@ -29180,7 +29227,7 @@ var CustomPagination = ({
|
|
|
29180
29227
|
const pageNumbers = getPageNumbers();
|
|
29181
29228
|
return /* @__PURE__ */ jsxs31("div", { className: "flex flex-row gap-1 w-full items-center justify-between", children: [
|
|
29182
29229
|
/* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2", children: [
|
|
29183
|
-
/* @__PURE__ */
|
|
29230
|
+
/* @__PURE__ */ jsx54("p", { className: "text-sm text-muted-foreground whitespace-nowrap", children: "Items per page:" }),
|
|
29184
29231
|
/* @__PURE__ */ jsxs31(
|
|
29185
29232
|
Select,
|
|
29186
29233
|
{
|
|
@@ -29189,26 +29236,26 @@ var CustomPagination = ({
|
|
|
29189
29236
|
onPageChange({ page: 1, itemsPerPage: Number(value) });
|
|
29190
29237
|
},
|
|
29191
29238
|
children: [
|
|
29192
|
-
/* @__PURE__ */
|
|
29239
|
+
/* @__PURE__ */ jsx54(SelectTrigger, { className: "w-[100px]", children: /* @__PURE__ */ jsx54(SelectValue, { placeholder: "Select" }) }),
|
|
29193
29240
|
/* @__PURE__ */ jsxs31(SelectContent, { children: [
|
|
29194
|
-
/* @__PURE__ */
|
|
29195
|
-
/* @__PURE__ */
|
|
29196
|
-
/* @__PURE__ */
|
|
29197
|
-
/* @__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" })
|
|
29198
29245
|
] })
|
|
29199
29246
|
]
|
|
29200
29247
|
}
|
|
29201
29248
|
)
|
|
29202
29249
|
] }),
|
|
29203
|
-
/* @__PURE__ */
|
|
29204
|
-
/* @__PURE__ */
|
|
29250
|
+
/* @__PURE__ */ jsx54(Pagination, { className: "justify-end", children: /* @__PURE__ */ jsxs31(PaginationContent, { children: [
|
|
29251
|
+
/* @__PURE__ */ jsx54(PaginationItem, { children: /* @__PURE__ */ jsx54(
|
|
29205
29252
|
PaginationPrevious,
|
|
29206
29253
|
{
|
|
29207
29254
|
onClick: () => handlePageChange(currentPage - 1),
|
|
29208
29255
|
className: currentPage === 1 ? "pointer-events-none opacity-50" : "cursor-pointer"
|
|
29209
29256
|
}
|
|
29210
29257
|
) }),
|
|
29211
|
-
pageNumbers.map((pageNumber, index) => /* @__PURE__ */
|
|
29258
|
+
pageNumbers.map((pageNumber, index) => /* @__PURE__ */ jsx54(PaginationItem, { children: pageNumber === "..." ? /* @__PURE__ */ jsx54(PaginationEllipsis, {}) : /* @__PURE__ */ jsx54(
|
|
29212
29259
|
PaginationLink,
|
|
29213
29260
|
{
|
|
29214
29261
|
onClick: () => handlePageChange(pageNumber),
|
|
@@ -29217,7 +29264,7 @@ var CustomPagination = ({
|
|
|
29217
29264
|
children: pageNumber
|
|
29218
29265
|
}
|
|
29219
29266
|
) }, index)),
|
|
29220
|
-
/* @__PURE__ */
|
|
29267
|
+
/* @__PURE__ */ jsx54(PaginationItem, { children: /* @__PURE__ */ jsx54(
|
|
29221
29268
|
PaginationNext,
|
|
29222
29269
|
{
|
|
29223
29270
|
onClick: () => handlePageChange(currentPage + 1),
|
|
@@ -29233,7 +29280,7 @@ var Pagination_default = CustomPagination;
|
|
|
29233
29280
|
import Link5 from "next/link";
|
|
29234
29281
|
import { useRouter } from "next/navigation";
|
|
29235
29282
|
import { useCallback as useCallback2, useState as useState6 } from "react";
|
|
29236
|
-
import { Fragment as
|
|
29283
|
+
import { Fragment as Fragment19, jsx as jsx55, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
29237
29284
|
var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuilder = true }) => {
|
|
29238
29285
|
const rawTabs = Array.isArray(tabs) ? tabs : [];
|
|
29239
29286
|
const baseClasses = "text-[12px] text-foreground p-2 text-center rounded-md transition-colors";
|
|
@@ -29268,20 +29315,20 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
|
|
|
29268
29315
|
return /* @__PURE__ */ jsxs32(DropdownMenu, { children: [
|
|
29269
29316
|
/* @__PURE__ */ jsxs32(DropdownMenuTrigger, { className: `${finalClasses} inline-flex items-center gap-1`, children: [
|
|
29270
29317
|
tab.header,
|
|
29271
|
-
/* @__PURE__ */
|
|
29318
|
+
/* @__PURE__ */ jsx55(ChevronDown, { className: "h-4 w-4 opacity-80" })
|
|
29272
29319
|
] }),
|
|
29273
|
-
/* @__PURE__ */
|
|
29320
|
+
/* @__PURE__ */ jsx55(
|
|
29274
29321
|
DropdownMenuContent,
|
|
29275
29322
|
{
|
|
29276
29323
|
align: "start",
|
|
29277
29324
|
sideOffset: 6,
|
|
29278
29325
|
className: "z-50 min-w-[160px] rounded-md border border-gray-200 bg-white p-1 shadow-lg",
|
|
29279
|
-
children: tab.children.map((item) => /* @__PURE__ */
|
|
29326
|
+
children: tab.children.map((item) => /* @__PURE__ */ jsx55(
|
|
29280
29327
|
DropdownMenuItem,
|
|
29281
29328
|
{
|
|
29282
29329
|
asChild: true,
|
|
29283
29330
|
className: "cursor-pointer rounded-sm px-3 py-2 text-[12px] text-gray-800 hover:bg-gray-100 focus:bg-gray-100",
|
|
29284
|
-
children: /* @__PURE__ */
|
|
29331
|
+
children: /* @__PURE__ */ jsx55(Link5, { href: item.url || "#", onClick: (e) => handleBuilderExit(e, item.url || "#"), children: item.header })
|
|
29285
29332
|
},
|
|
29286
29333
|
item.id
|
|
29287
29334
|
))
|
|
@@ -29289,7 +29336,7 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
|
|
|
29289
29336
|
)
|
|
29290
29337
|
] }, index);
|
|
29291
29338
|
}
|
|
29292
|
-
return tab.url ? /* @__PURE__ */
|
|
29339
|
+
return tab.url ? /* @__PURE__ */ jsx55(
|
|
29293
29340
|
Link5,
|
|
29294
29341
|
{
|
|
29295
29342
|
href: tab.url,
|
|
@@ -29299,14 +29346,14 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
|
|
|
29299
29346
|
children: tab.header
|
|
29300
29347
|
},
|
|
29301
29348
|
index
|
|
29302
|
-
) : /* @__PURE__ */
|
|
29349
|
+
) : /* @__PURE__ */ jsx55("div", { className: finalClasses, style: tab.style, role: "button", tabIndex: 0, children: tab.header }, index);
|
|
29303
29350
|
};
|
|
29304
29351
|
const renderMobileMenu = () => /* @__PURE__ */ jsxs32(DropdownMenu, { children: [
|
|
29305
29352
|
/* @__PURE__ */ jsxs32(DropdownMenuTrigger, { className: "flex items-center gap-2 px-3 py-2 rounded-md bg-white/10 text-white text-sm", children: [
|
|
29306
|
-
/* @__PURE__ */
|
|
29353
|
+
/* @__PURE__ */ jsx55(Menu, { className: "h-4 w-4" }),
|
|
29307
29354
|
"Menu"
|
|
29308
29355
|
] }),
|
|
29309
|
-
/* @__PURE__ */
|
|
29356
|
+
/* @__PURE__ */ jsx55(
|
|
29310
29357
|
DropdownMenuContent,
|
|
29311
29358
|
{
|
|
29312
29359
|
align: "start",
|
|
@@ -29316,24 +29363,24 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
|
|
|
29316
29363
|
const hasChildren = Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown;
|
|
29317
29364
|
if (hasChildren) {
|
|
29318
29365
|
return /* @__PURE__ */ jsxs32(DropdownMenuSub, { children: [
|
|
29319
|
-
/* @__PURE__ */
|
|
29320
|
-
/* @__PURE__ */
|
|
29366
|
+
/* @__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 }),
|
|
29367
|
+
/* @__PURE__ */ jsx55(DropdownMenuSubContent, { className: "bg-white border shadow-lg rounded-md p-1", children: tab.children.map((item) => /* @__PURE__ */ jsx55(
|
|
29321
29368
|
DropdownMenuItem,
|
|
29322
29369
|
{
|
|
29323
29370
|
asChild: true,
|
|
29324
29371
|
className: "cursor-pointer rounded-sm px-3 py-2 text-[12px] text-gray-800 hover:bg-gray-100",
|
|
29325
|
-
children: /* @__PURE__ */
|
|
29372
|
+
children: /* @__PURE__ */ jsx55(Link5, { href: item.url || "#", onClick: (e) => handleBuilderExit(e, item.url || "#"), children: item.header })
|
|
29326
29373
|
},
|
|
29327
29374
|
item.id
|
|
29328
29375
|
)) })
|
|
29329
29376
|
] }, i);
|
|
29330
29377
|
}
|
|
29331
|
-
return /* @__PURE__ */
|
|
29378
|
+
return /* @__PURE__ */ jsx55(
|
|
29332
29379
|
DropdownMenuItem,
|
|
29333
29380
|
{
|
|
29334
29381
|
asChild: true,
|
|
29335
29382
|
className: "cursor-pointer rounded-sm px-3 py-2 text-[13px] text-gray-800 hover:bg-gray-100",
|
|
29336
|
-
children: /* @__PURE__ */
|
|
29383
|
+
children: /* @__PURE__ */ jsx55(Link5, { href: tab.url || "#", onClick: (e) => handleBuilderExit(e, tab.url || "#"), children: tab.header })
|
|
29337
29384
|
},
|
|
29338
29385
|
i
|
|
29339
29386
|
);
|
|
@@ -29343,19 +29390,19 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
|
|
|
29343
29390
|
] });
|
|
29344
29391
|
const forceMobile = canvasMode ? canvasMode === "mobile" || canvasMode === "tablet" : void 0;
|
|
29345
29392
|
const forceDesktop = canvasMode ? canvasMode === "desktop" : void 0;
|
|
29346
|
-
return /* @__PURE__ */ jsxs32(
|
|
29393
|
+
return /* @__PURE__ */ jsxs32(Fragment19, { children: [
|
|
29347
29394
|
/* @__PURE__ */ jsxs32("div", { className, style, children: [
|
|
29348
|
-
forceDesktop !== void 0 ? forceDesktop && /* @__PURE__ */
|
|
29349
|
-
forceMobile !== void 0 ? forceMobile && /* @__PURE__ */
|
|
29395
|
+
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) }) }),
|
|
29396
|
+
forceMobile !== void 0 ? forceMobile && /* @__PURE__ */ jsx55("div", { children: renderMobileMenu() }) : /* @__PURE__ */ jsx55("div", { className: "flex md:hidden", children: renderMobileMenu() })
|
|
29350
29397
|
] }),
|
|
29351
|
-
/* @__PURE__ */
|
|
29398
|
+
/* @__PURE__ */ jsx55(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ jsxs32(DialogContent, { className: "bg-[#fff]", children: [
|
|
29352
29399
|
/* @__PURE__ */ jsxs32(DialogHeader, { children: [
|
|
29353
|
-
/* @__PURE__ */
|
|
29354
|
-
/* @__PURE__ */
|
|
29400
|
+
/* @__PURE__ */ jsx55(DialogTitle, { children: "Exit Builder?" }),
|
|
29401
|
+
/* @__PURE__ */ jsx55(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
|
|
29355
29402
|
] }),
|
|
29356
29403
|
/* @__PURE__ */ jsxs32(DialogFooter, { children: [
|
|
29357
|
-
/* @__PURE__ */
|
|
29358
|
-
/* @__PURE__ */
|
|
29404
|
+
/* @__PURE__ */ jsx55(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
|
|
29405
|
+
/* @__PURE__ */ jsx55(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
|
|
29359
29406
|
] })
|
|
29360
29407
|
] }) })
|
|
29361
29408
|
] });
|
|
@@ -29363,34 +29410,42 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
|
|
|
29363
29410
|
var Tabs_default = Tabs;
|
|
29364
29411
|
|
|
29365
29412
|
// src/components/Navigation/Stages/Stages.tsx
|
|
29366
|
-
import
|
|
29367
|
-
import { jsx as
|
|
29368
|
-
var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStageChange }) => {
|
|
29369
|
-
return /* @__PURE__ */
|
|
29370
|
-
/* @__PURE__ */
|
|
29371
|
-
/* @__PURE__ */
|
|
29372
|
-
|
|
29373
|
-
|
|
29374
|
-
|
|
29375
|
-
|
|
29376
|
-
|
|
29377
|
-
|
|
29378
|
-
|
|
29379
|
-
|
|
29380
|
-
|
|
29381
|
-
|
|
29382
|
-
|
|
29383
|
-
|
|
29384
|
-
|
|
29385
|
-
|
|
29386
|
-
|
|
29413
|
+
import React10 from "react";
|
|
29414
|
+
import { jsx as jsx56, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
29415
|
+
var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStageChange, currentStage }) => {
|
|
29416
|
+
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: [
|
|
29417
|
+
/* @__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" }) }) }) }),
|
|
29418
|
+
/* @__PURE__ */ jsx56("div", { className: "flex items-center flex-1 px-2 flex-wrap gap-2", children: stages?.length > 0 && stages?.map((stage, index) => {
|
|
29419
|
+
const currentIndex = stages.findIndex((s) => s.key === currentStage);
|
|
29420
|
+
const isAllCompleted = currentStage === "completed";
|
|
29421
|
+
const isCompleted = isAllCompleted || index < currentIndex;
|
|
29422
|
+
const isActive = !isAllCompleted && index === currentIndex;
|
|
29423
|
+
return /* @__PURE__ */ jsxs33(React10.Fragment, { children: [
|
|
29424
|
+
/* @__PURE__ */ jsx56(
|
|
29425
|
+
"button",
|
|
29426
|
+
{
|
|
29427
|
+
className: `
|
|
29428
|
+
min-w-[120px] px-4 py-2 rounded-full text-sm font-medium transition-colors duration-200 whitespace-nowrap
|
|
29429
|
+
${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"}`,
|
|
29430
|
+
onClick: () => {
|
|
29431
|
+
if (onStageChange) {
|
|
29432
|
+
onStageChange(stage.key);
|
|
29433
|
+
}
|
|
29434
|
+
},
|
|
29435
|
+
children: stage.header
|
|
29436
|
+
}
|
|
29437
|
+
),
|
|
29438
|
+
index < stages.length - 1 && /* @__PURE__ */ jsx56("div", { className: "flex-shrink-0 w-3 h-px bg-gray-300" })
|
|
29439
|
+
] }, stage.id);
|
|
29440
|
+
}) }),
|
|
29441
|
+
isShowBtn && /* @__PURE__ */ jsx56("div", { className: "flex items-center", children: /* @__PURE__ */ jsx56(
|
|
29387
29442
|
"button",
|
|
29388
29443
|
{
|
|
29389
29444
|
className: "bg-[#034486] text-white px-6 py-2 rounded-lg text-sm font-medium transition-colors duration-200 shadow-sm",
|
|
29390
29445
|
onClick: () => {
|
|
29391
29446
|
const activeStage = stages?.find((stage) => stage.isActive);
|
|
29392
29447
|
if (activeStage && onStageChange) {
|
|
29393
|
-
onStageChange(
|
|
29448
|
+
onStageChange("completed");
|
|
29394
29449
|
}
|
|
29395
29450
|
},
|
|
29396
29451
|
children: buttonText
|
|
@@ -29401,26 +29456,26 @@ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStag
|
|
|
29401
29456
|
var Stages_default = StagesComponent;
|
|
29402
29457
|
|
|
29403
29458
|
// src/components/Navigation/Spacer/Spacer.tsx
|
|
29404
|
-
import { jsx as
|
|
29459
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
29405
29460
|
var Spacer = ({ className, style }) => {
|
|
29406
|
-
return /* @__PURE__ */
|
|
29461
|
+
return /* @__PURE__ */ jsx57("div", { className: `${className}`, style });
|
|
29407
29462
|
};
|
|
29408
29463
|
var Spacer_default = Spacer;
|
|
29409
29464
|
|
|
29410
29465
|
// src/components/Navigation/Profile/Profile.tsx
|
|
29411
|
-
import { jsx as
|
|
29466
|
+
import { jsx as jsx58, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
29412
29467
|
|
|
29413
29468
|
// src/components/Navigation/Notification/Notification.tsx
|
|
29414
|
-
import { jsx as
|
|
29469
|
+
import { jsx as jsx59, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
29415
29470
|
|
|
29416
29471
|
// src/components/Navigation/Logo/Logo.tsx
|
|
29417
|
-
import { jsx as
|
|
29472
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
29418
29473
|
|
|
29419
29474
|
// src/components/ui/avatar.tsx
|
|
29420
|
-
import * as
|
|
29475
|
+
import * as React11 from "react";
|
|
29421
29476
|
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
29422
|
-
import { jsx as
|
|
29423
|
-
var Avatar =
|
|
29477
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
29478
|
+
var Avatar = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx61(
|
|
29424
29479
|
AvatarPrimitive.Root,
|
|
29425
29480
|
{
|
|
29426
29481
|
ref,
|
|
@@ -29432,7 +29487,7 @@ var Avatar = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
29432
29487
|
}
|
|
29433
29488
|
));
|
|
29434
29489
|
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
29435
|
-
var AvatarImage =
|
|
29490
|
+
var AvatarImage = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx61(
|
|
29436
29491
|
AvatarPrimitive.Image,
|
|
29437
29492
|
{
|
|
29438
29493
|
ref,
|
|
@@ -29441,7 +29496,7 @@ var AvatarImage = React10.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
29441
29496
|
}
|
|
29442
29497
|
));
|
|
29443
29498
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
29444
|
-
var AvatarFallback =
|
|
29499
|
+
var AvatarFallback = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx61(
|
|
29445
29500
|
AvatarPrimitive.Fallback,
|
|
29446
29501
|
{
|
|
29447
29502
|
ref,
|
|
@@ -29459,8 +29514,8 @@ import Link6 from "next/link";
|
|
|
29459
29514
|
import Image3 from "next/image";
|
|
29460
29515
|
import { useRouter as useRouter2 } from "next/navigation";
|
|
29461
29516
|
import { DropdownMenuSeparator } from "@radix-ui/react-dropdown-menu";
|
|
29462
|
-
import { useCallback as useCallback3, useMemo as
|
|
29463
|
-
import { Fragment as
|
|
29517
|
+
import { useCallback as useCallback3, useMemo as useMemo5, useState as useState7 } from "react";
|
|
29518
|
+
import { Fragment as Fragment20, jsx as jsx62, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
29464
29519
|
function Navbar({
|
|
29465
29520
|
style,
|
|
29466
29521
|
badgeType,
|
|
@@ -29498,29 +29553,29 @@ function Navbar({
|
|
|
29498
29553
|
router.push(pendingUrl);
|
|
29499
29554
|
}
|
|
29500
29555
|
};
|
|
29501
|
-
const formatedMenu =
|
|
29556
|
+
const formatedMenu = useMemo5(() => {
|
|
29502
29557
|
if (source === "state" && navList && navList.length) {
|
|
29503
29558
|
return navList.map((i) => ({ ...i, header: i.name || "Menu" }));
|
|
29504
29559
|
}
|
|
29505
29560
|
return list || [];
|
|
29506
29561
|
}, [source, navList]);
|
|
29507
|
-
return /* @__PURE__ */ jsxs36(
|
|
29508
|
-
/* @__PURE__ */
|
|
29562
|
+
return /* @__PURE__ */ jsxs36(Fragment20, { children: [
|
|
29563
|
+
/* @__PURE__ */ jsx62(
|
|
29509
29564
|
"nav",
|
|
29510
29565
|
{
|
|
29511
29566
|
className: "w-full border-b border-b-white dark:border-b-gray-800 dark:bg-gray-800 bg-white shadow-sm",
|
|
29512
29567
|
style,
|
|
29513
29568
|
children: /* @__PURE__ */ jsxs36("div", { className: "mx-auto flex max-w-[90%] items-center justify-between px-4 py-4", children: [
|
|
29514
|
-
/* @__PURE__ */
|
|
29569
|
+
/* @__PURE__ */ jsx62(
|
|
29515
29570
|
Link6,
|
|
29516
29571
|
{
|
|
29517
29572
|
href: "/",
|
|
29518
29573
|
onClick: (e) => handleBuilderExit(e, "/"),
|
|
29519
29574
|
className: "flex items-center space-x-2",
|
|
29520
|
-
children: imageUrl ? /* @__PURE__ */
|
|
29575
|
+
children: imageUrl ? /* @__PURE__ */ jsx62(Image3, { src: imageUrl, alt: altText, width: 200, height: 200 }) : /* @__PURE__ */ jsx62("span", { className: "font-semibold text-blue-700", children: "Logo" })
|
|
29521
29576
|
}
|
|
29522
29577
|
),
|
|
29523
|
-
!isMobileView && /* @__PURE__ */
|
|
29578
|
+
!isMobileView && /* @__PURE__ */ jsx62("div", { className: "flex items-center space-x-6 sm:hidden md:flex", children: formatedMenu.map((item) => /* @__PURE__ */ jsx62(
|
|
29524
29579
|
Link6,
|
|
29525
29580
|
{
|
|
29526
29581
|
href: item.url || "#",
|
|
@@ -29531,38 +29586,38 @@ function Navbar({
|
|
|
29531
29586
|
item.id
|
|
29532
29587
|
)) }),
|
|
29533
29588
|
/* @__PURE__ */ jsxs36("div", { className: "flex items-center space-x-3", children: [
|
|
29534
|
-
!isMobileView ? /* @__PURE__ */
|
|
29535
|
-
/* @__PURE__ */
|
|
29536
|
-
/* @__PURE__ */
|
|
29537
|
-
] }) }) : /* @__PURE__ */
|
|
29589
|
+
!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: [
|
|
29590
|
+
/* @__PURE__ */ jsx62(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 dark:text-white text-gray-400" }),
|
|
29591
|
+
/* @__PURE__ */ jsx62(Input, { placeholder: "Search", className: "pl-9 text-gray-400" })
|
|
29592
|
+
] }) }) : /* @__PURE__ */ jsx62(Button, { variant: "ghost", size: "icon", className: "border border-gray-400", children: /* @__PURE__ */ jsx62(Search, { className: "h-5 w-5 text-gray-400" }) }),
|
|
29538
29593
|
/* @__PURE__ */ jsxs36("div", { className: "relative bg-[#E9E9E9] dark:bg-gray-700 rounded-md", children: [
|
|
29539
|
-
/* @__PURE__ */
|
|
29540
|
-
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */
|
|
29594
|
+
/* @__PURE__ */ jsx62(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ jsx62(Bell, { className: "h-5 w-5 text-[#1C1B1F] dark:text-gray-400" }) }),
|
|
29595
|
+
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" })
|
|
29541
29596
|
] }),
|
|
29542
29597
|
/* @__PURE__ */ jsxs36(DropdownMenu, { children: [
|
|
29543
|
-
/* @__PURE__ */
|
|
29544
|
-
!isMobileView && showName && /* @__PURE__ */
|
|
29545
|
-
!isMobileView ? /* @__PURE__ */ jsxs36(
|
|
29546
|
-
/* @__PURE__ */
|
|
29598
|
+
/* @__PURE__ */ jsx62(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs36("div", { className: "flex items-center space-x-2", children: [
|
|
29599
|
+
!isMobileView && showName && /* @__PURE__ */ jsx62("h4", { className: "text-[#000000] dark:text-gray-300 text-[13px] font-[500] mb-0", children: userName }),
|
|
29600
|
+
!isMobileView ? /* @__PURE__ */ jsxs36(Fragment20, { children: [
|
|
29601
|
+
/* @__PURE__ */ jsx62(Avatar, { className: "cursor-pointer h-8 w-8 text-gray-900", children: profileType === "avatar" ? /* @__PURE__ */ jsx62(
|
|
29547
29602
|
AvatarImage,
|
|
29548
29603
|
{
|
|
29549
29604
|
src: "/images/appbuilder/toolset/profile.svg",
|
|
29550
29605
|
alt: "Profile"
|
|
29551
29606
|
}
|
|
29552
|
-
) : /* @__PURE__ */
|
|
29553
|
-
/* @__PURE__ */
|
|
29607
|
+
) : /* @__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) }) }),
|
|
29608
|
+
/* @__PURE__ */ jsx62(
|
|
29554
29609
|
Button,
|
|
29555
29610
|
{
|
|
29556
29611
|
variant: "ghost",
|
|
29557
29612
|
size: "icon",
|
|
29558
29613
|
className: "text-gray-900 md:hidden dark:invert",
|
|
29559
|
-
children: /* @__PURE__ */
|
|
29614
|
+
children: /* @__PURE__ */ jsx62(Menu, { className: "h-6 w-6" })
|
|
29560
29615
|
}
|
|
29561
29616
|
)
|
|
29562
|
-
] }) : /* @__PURE__ */
|
|
29617
|
+
] }) : /* @__PURE__ */ jsx62(Button, { variant: "ghost", size: "icon", className: "text-gray-900 dark:invert", children: /* @__PURE__ */ jsx62(Menu, { className: "h-6 w-6" }) })
|
|
29563
29618
|
] }) }),
|
|
29564
29619
|
/* @__PURE__ */ jsxs36(DropdownMenuContent, { align: "end", className: "bg-white dark:bg-gray-800", children: [
|
|
29565
|
-
profileMenu && profileMenu.length > 0 && /* @__PURE__ */
|
|
29620
|
+
profileMenu && profileMenu.length > 0 && /* @__PURE__ */ jsx62(Fragment20, { children: profileMenu.map((item) => /* @__PURE__ */ jsx62(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ jsx62(
|
|
29566
29621
|
Link6,
|
|
29567
29622
|
{
|
|
29568
29623
|
href: item.url || "#",
|
|
@@ -29571,8 +29626,8 @@ function Navbar({
|
|
|
29571
29626
|
}
|
|
29572
29627
|
) }, item.id)) }),
|
|
29573
29628
|
/* @__PURE__ */ jsxs36("div", { className: "md:hidden", children: [
|
|
29574
|
-
/* @__PURE__ */
|
|
29575
|
-
formatedMenu && formatedMenu.length > 0 && /* @__PURE__ */
|
|
29629
|
+
/* @__PURE__ */ jsx62(DropdownMenuSeparator, {}),
|
|
29630
|
+
formatedMenu && formatedMenu.length > 0 && /* @__PURE__ */ jsx62(Fragment20, { children: formatedMenu.map((item) => /* @__PURE__ */ jsx62(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ jsx62(
|
|
29576
29631
|
Link6,
|
|
29577
29632
|
{
|
|
29578
29633
|
href: item.url || "#",
|
|
@@ -29587,21 +29642,21 @@ function Navbar({
|
|
|
29587
29642
|
] })
|
|
29588
29643
|
}
|
|
29589
29644
|
),
|
|
29590
|
-
/* @__PURE__ */
|
|
29645
|
+
/* @__PURE__ */ jsx62(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ jsxs36(DialogContent, { className: "bg-[#fff]", children: [
|
|
29591
29646
|
/* @__PURE__ */ jsxs36(DialogHeader, { children: [
|
|
29592
|
-
/* @__PURE__ */
|
|
29593
|
-
/* @__PURE__ */
|
|
29647
|
+
/* @__PURE__ */ jsx62(DialogTitle, { children: "Exit Builder?" }),
|
|
29648
|
+
/* @__PURE__ */ jsx62(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
|
|
29594
29649
|
] }),
|
|
29595
29650
|
/* @__PURE__ */ jsxs36(DialogFooter, { children: [
|
|
29596
|
-
/* @__PURE__ */
|
|
29597
|
-
/* @__PURE__ */
|
|
29651
|
+
/* @__PURE__ */ jsx62(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
|
|
29652
|
+
/* @__PURE__ */ jsx62(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
|
|
29598
29653
|
] })
|
|
29599
29654
|
] }) })
|
|
29600
29655
|
] });
|
|
29601
29656
|
}
|
|
29602
29657
|
|
|
29603
29658
|
// src/components/Chart/BarChart.tsx
|
|
29604
|
-
import
|
|
29659
|
+
import React12 from "react";
|
|
29605
29660
|
import {
|
|
29606
29661
|
BarChart,
|
|
29607
29662
|
Bar,
|
|
@@ -29614,35 +29669,35 @@ import {
|
|
|
29614
29669
|
ResponsiveContainer,
|
|
29615
29670
|
Legend
|
|
29616
29671
|
} from "recharts";
|
|
29617
|
-
import { jsx as
|
|
29672
|
+
import { jsx as jsx63, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
29618
29673
|
var ChartComponent = ({ className, style, loading, ...props }) => {
|
|
29619
29674
|
const data = Array.isArray(props.data) ? props.data : [];
|
|
29620
29675
|
const chartType = props.chartType || "bar";
|
|
29621
29676
|
const legendsPosition = props.legendsPosition === "middle" || props.legendsPosition === "bottom" ? props.legendsPosition : "top";
|
|
29622
29677
|
if (loading || data.length === 0) {
|
|
29623
|
-
return /* @__PURE__ */
|
|
29678
|
+
return /* @__PURE__ */ jsx63(
|
|
29624
29679
|
"div",
|
|
29625
29680
|
{
|
|
29626
29681
|
className: `flex items-center justify-center w-full h-[300px] md:h-[400px] bg-gray-50 animate-pulse rounded-lg ${className}`,
|
|
29627
29682
|
style,
|
|
29628
|
-
children: /* @__PURE__ */
|
|
29683
|
+
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." })
|
|
29629
29684
|
}
|
|
29630
29685
|
);
|
|
29631
29686
|
}
|
|
29632
|
-
return /* @__PURE__ */
|
|
29633
|
-
/* @__PURE__ */
|
|
29634
|
-
/* @__PURE__ */
|
|
29635
|
-
/* @__PURE__ */
|
|
29636
|
-
/* @__PURE__ */
|
|
29637
|
-
/* @__PURE__ */
|
|
29638
|
-
/* @__PURE__ */
|
|
29687
|
+
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: [
|
|
29688
|
+
/* @__PURE__ */ jsx63(CartesianGrid, { strokeDasharray: "3 3" }),
|
|
29689
|
+
/* @__PURE__ */ jsx63(XAxis, { dataKey: "name" }),
|
|
29690
|
+
/* @__PURE__ */ jsx63(YAxis, {}),
|
|
29691
|
+
/* @__PURE__ */ jsx63(Tooltip, { formatter: (value) => `${value}k` }),
|
|
29692
|
+
/* @__PURE__ */ jsx63(Legend, { verticalAlign: legendsPosition, align: "center" }),
|
|
29693
|
+
/* @__PURE__ */ jsx63(
|
|
29639
29694
|
Bar,
|
|
29640
29695
|
{
|
|
29641
29696
|
dataKey: "value",
|
|
29642
29697
|
fill: "#00695C",
|
|
29643
29698
|
radius: [6, 6, 0, 0],
|
|
29644
29699
|
isAnimationActive: false,
|
|
29645
|
-
children: data.map((entry, index) => /* @__PURE__ */
|
|
29700
|
+
children: data.map((entry, index) => /* @__PURE__ */ jsx63(
|
|
29646
29701
|
"rect",
|
|
29647
29702
|
{
|
|
29648
29703
|
fill: entry.color || "#00695C"
|
|
@@ -29652,15 +29707,15 @@ var ChartComponent = ({ className, style, loading, ...props }) => {
|
|
|
29652
29707
|
}
|
|
29653
29708
|
)
|
|
29654
29709
|
] }) : /* @__PURE__ */ jsxs37(AreaChart, { data, children: [
|
|
29655
|
-
/* @__PURE__ */
|
|
29656
|
-
/* @__PURE__ */
|
|
29657
|
-
/* @__PURE__ */
|
|
29710
|
+
/* @__PURE__ */ jsx63("defs", { children: /* @__PURE__ */ jsxs37("linearGradient", { id: "colorCount", x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
29711
|
+
/* @__PURE__ */ jsx63("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
|
|
29712
|
+
/* @__PURE__ */ jsx63("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
|
|
29658
29713
|
] }) }),
|
|
29659
|
-
/* @__PURE__ */
|
|
29660
|
-
/* @__PURE__ */
|
|
29661
|
-
/* @__PURE__ */
|
|
29662
|
-
/* @__PURE__ */
|
|
29663
|
-
/* @__PURE__ */
|
|
29714
|
+
/* @__PURE__ */ jsx63(CartesianGrid, { strokeDasharray: "3 3" }),
|
|
29715
|
+
/* @__PURE__ */ jsx63(XAxis, { dataKey: "name" }),
|
|
29716
|
+
/* @__PURE__ */ jsx63(YAxis, {}),
|
|
29717
|
+
/* @__PURE__ */ jsx63(Tooltip, { formatter: (value) => `${value}k` }),
|
|
29718
|
+
/* @__PURE__ */ jsx63(
|
|
29664
29719
|
Area,
|
|
29665
29720
|
{
|
|
29666
29721
|
type: "monotone",
|
|
@@ -29673,10 +29728,10 @@ var ChartComponent = ({ className, style, loading, ...props }) => {
|
|
|
29673
29728
|
)
|
|
29674
29729
|
] }) }) });
|
|
29675
29730
|
};
|
|
29676
|
-
var BarChart_default =
|
|
29731
|
+
var BarChart_default = React12.memo(ChartComponent);
|
|
29677
29732
|
|
|
29678
29733
|
// src/components/Chart/PieChart.tsx
|
|
29679
|
-
import
|
|
29734
|
+
import React13, { useEffect as useEffect23, useMemo as useMemo6, useState as useState8 } from "react";
|
|
29680
29735
|
import {
|
|
29681
29736
|
PieChart,
|
|
29682
29737
|
Pie,
|
|
@@ -29685,7 +29740,7 @@ import {
|
|
|
29685
29740
|
Tooltip as Tooltip2,
|
|
29686
29741
|
LabelList
|
|
29687
29742
|
} from "recharts";
|
|
29688
|
-
import { Fragment as
|
|
29743
|
+
import { Fragment as Fragment21, jsx as jsx64, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
29689
29744
|
var getRandomColor = () => {
|
|
29690
29745
|
const palette = [
|
|
29691
29746
|
"#2563eb",
|
|
@@ -29705,32 +29760,32 @@ var DonutChart = ({ className, style, loading, ...props }) => {
|
|
|
29705
29760
|
const showLegends = props.showLegends ?? true;
|
|
29706
29761
|
const labelType = props.labelType || "inside";
|
|
29707
29762
|
const canvasMode = props.canvasMode;
|
|
29708
|
-
const data =
|
|
29763
|
+
const data = useMemo6(() => {
|
|
29709
29764
|
if (!Array.isArray(props.data)) return [];
|
|
29710
29765
|
return props.data.map((item) => ({ ...item, color: getRandomColor() }));
|
|
29711
29766
|
}, [props.data]);
|
|
29712
|
-
const total =
|
|
29767
|
+
const total = useMemo6(() => data.reduce((sum, d) => sum + d.value, 0), [data]);
|
|
29713
29768
|
const forceMobile = canvasMode === "mobile" || canvasMode === "tablet";
|
|
29714
29769
|
const [mounted, setMounted] = useState8(false);
|
|
29715
29770
|
useEffect23(() => {
|
|
29716
29771
|
const timeout = setTimeout(() => setMounted(true), 100);
|
|
29717
29772
|
return () => clearTimeout(timeout);
|
|
29718
29773
|
}, []);
|
|
29719
|
-
const renderLegends =
|
|
29774
|
+
const renderLegends = useMemo6(() => {
|
|
29720
29775
|
if (!showLegends) return null;
|
|
29721
|
-
return /* @__PURE__ */
|
|
29776
|
+
return /* @__PURE__ */ jsx64(Fragment21, { children: data.map((d) => /* @__PURE__ */ jsxs38(
|
|
29722
29777
|
"div",
|
|
29723
29778
|
{
|
|
29724
29779
|
className: "flex items-center space-x-2 rounded-md border border-gray-200 px-3 py-2 w-[48%] md:w-auto",
|
|
29725
29780
|
children: [
|
|
29726
|
-
/* @__PURE__ */
|
|
29781
|
+
/* @__PURE__ */ jsx64(
|
|
29727
29782
|
"span",
|
|
29728
29783
|
{
|
|
29729
29784
|
className: "inline-block w-[16px] h-[16px] rounded",
|
|
29730
29785
|
style: { backgroundColor: d.color }
|
|
29731
29786
|
}
|
|
29732
29787
|
),
|
|
29733
|
-
/* @__PURE__ */
|
|
29788
|
+
/* @__PURE__ */ jsx64("span", { className: "text-[#000000] text-[12px] md:text-[13px] font-[500]", children: d.name })
|
|
29734
29789
|
]
|
|
29735
29790
|
},
|
|
29736
29791
|
d.name
|
|
@@ -29738,12 +29793,12 @@ var DonutChart = ({ className, style, loading, ...props }) => {
|
|
|
29738
29793
|
}, [data, showLegends]);
|
|
29739
29794
|
if (!mounted) return null;
|
|
29740
29795
|
if (loading || data.length === 0) {
|
|
29741
|
-
return /* @__PURE__ */
|
|
29796
|
+
return /* @__PURE__ */ jsx64(
|
|
29742
29797
|
"div",
|
|
29743
29798
|
{
|
|
29744
29799
|
className: `flex items-center justify-center w-full h-[300px] md:h-[400px] bg-gray-50 animate-pulse rounded-lg ${className}`,
|
|
29745
29800
|
style,
|
|
29746
|
-
children: /* @__PURE__ */
|
|
29801
|
+
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." })
|
|
29747
29802
|
}
|
|
29748
29803
|
);
|
|
29749
29804
|
}
|
|
@@ -29754,7 +29809,7 @@ var DonutChart = ({ className, style, loading, ...props }) => {
|
|
|
29754
29809
|
style,
|
|
29755
29810
|
children: [
|
|
29756
29811
|
/* @__PURE__ */ jsxs38("div", { className: "relative w-full md:w-[70%] h-[300px] md:h-[400px] flex items-center justify-center", children: [
|
|
29757
|
-
/* @__PURE__ */
|
|
29812
|
+
/* @__PURE__ */ jsx64(ResponsiveContainer2, { width: "99%", height: "100%", children: /* @__PURE__ */ jsxs38(PieChart, { children: [
|
|
29758
29813
|
/* @__PURE__ */ jsxs38(
|
|
29759
29814
|
Pie,
|
|
29760
29815
|
{
|
|
@@ -29767,8 +29822,8 @@ var DonutChart = ({ className, style, loading, ...props }) => {
|
|
|
29767
29822
|
labelLine: false,
|
|
29768
29823
|
isAnimationActive: false,
|
|
29769
29824
|
children: [
|
|
29770
|
-
data.map((entry, index) => /* @__PURE__ */
|
|
29771
|
-
/* @__PURE__ */
|
|
29825
|
+
data.map((entry, index) => /* @__PURE__ */ jsx64(Cell, { fill: entry.color }, `cell-${index}`)),
|
|
29826
|
+
/* @__PURE__ */ jsx64(
|
|
29772
29827
|
LabelList,
|
|
29773
29828
|
{
|
|
29774
29829
|
dataKey: "value",
|
|
@@ -29781,7 +29836,7 @@ var DonutChart = ({ className, style, loading, ...props }) => {
|
|
|
29781
29836
|
]
|
|
29782
29837
|
}
|
|
29783
29838
|
),
|
|
29784
|
-
/* @__PURE__ */
|
|
29839
|
+
/* @__PURE__ */ jsx64(
|
|
29785
29840
|
Tooltip2,
|
|
29786
29841
|
{
|
|
29787
29842
|
formatter: (value, name) => [`${value}k`, name]
|
|
@@ -29799,18 +29854,18 @@ var DonutChart = ({ className, style, loading, ...props }) => {
|
|
|
29799
29854
|
}
|
|
29800
29855
|
)
|
|
29801
29856
|
] }),
|
|
29802
|
-
/* @__PURE__ */
|
|
29857
|
+
/* @__PURE__ */ jsx64("div", { className: "flex flex-wrap justify-center gap-2 mt-6 w-full md:w-auto", children: renderLegends })
|
|
29803
29858
|
]
|
|
29804
29859
|
}
|
|
29805
29860
|
);
|
|
29806
29861
|
};
|
|
29807
|
-
var PieChart_default =
|
|
29862
|
+
var PieChart_default = React13.memo(DonutChart);
|
|
29808
29863
|
|
|
29809
29864
|
// src/components/Blocks/EmailComposer.tsx
|
|
29810
|
-
import { jsx as
|
|
29865
|
+
import { jsx as jsx65, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
29811
29866
|
function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc, setShowBcc, cc, setCc, bcc, setBcc, subject, setSubject, body, setBody }) {
|
|
29812
|
-
return /* @__PURE__ */
|
|
29813
|
-
/* @__PURE__ */
|
|
29867
|
+
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: [
|
|
29868
|
+
/* @__PURE__ */ jsx65("div", { className: "mb-3", children: /* @__PURE__ */ jsx65(
|
|
29814
29869
|
"input",
|
|
29815
29870
|
{
|
|
29816
29871
|
type: "email",
|
|
@@ -29819,8 +29874,8 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
29819
29874
|
required: true
|
|
29820
29875
|
}
|
|
29821
29876
|
) }),
|
|
29822
|
-
/* @__PURE__ */
|
|
29823
|
-
/* @__PURE__ */
|
|
29877
|
+
/* @__PURE__ */ jsx65("div", { className: "mb-3", children: /* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-2", children: [
|
|
29878
|
+
/* @__PURE__ */ jsx65(
|
|
29824
29879
|
"input",
|
|
29825
29880
|
{
|
|
29826
29881
|
type: "email",
|
|
@@ -29831,7 +29886,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
29831
29886
|
required: true
|
|
29832
29887
|
}
|
|
29833
29888
|
),
|
|
29834
|
-
!showCc && /* @__PURE__ */
|
|
29889
|
+
!showCc && /* @__PURE__ */ jsx65(
|
|
29835
29890
|
"button",
|
|
29836
29891
|
{
|
|
29837
29892
|
onClick: () => setShowCc?.(true),
|
|
@@ -29839,7 +29894,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
29839
29894
|
children: "Cc"
|
|
29840
29895
|
}
|
|
29841
29896
|
),
|
|
29842
|
-
!showBcc && /* @__PURE__ */
|
|
29897
|
+
!showBcc && /* @__PURE__ */ jsx65(
|
|
29843
29898
|
"button",
|
|
29844
29899
|
{
|
|
29845
29900
|
onClick: () => setShowBcc?.(true),
|
|
@@ -29848,7 +29903,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
29848
29903
|
}
|
|
29849
29904
|
)
|
|
29850
29905
|
] }) }),
|
|
29851
|
-
showCc && /* @__PURE__ */
|
|
29906
|
+
showCc && /* @__PURE__ */ jsx65("div", { className: "mb-3", children: /* @__PURE__ */ jsx65(
|
|
29852
29907
|
"input",
|
|
29853
29908
|
{
|
|
29854
29909
|
type: "text",
|
|
@@ -29858,7 +29913,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
29858
29913
|
className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
|
|
29859
29914
|
}
|
|
29860
29915
|
) }),
|
|
29861
|
-
showBcc && /* @__PURE__ */
|
|
29916
|
+
showBcc && /* @__PURE__ */ jsx65("div", { className: "mb-3", children: /* @__PURE__ */ jsx65(
|
|
29862
29917
|
"input",
|
|
29863
29918
|
{
|
|
29864
29919
|
type: "text",
|
|
@@ -29868,7 +29923,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
29868
29923
|
className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
|
|
29869
29924
|
}
|
|
29870
29925
|
) }),
|
|
29871
|
-
/* @__PURE__ */
|
|
29926
|
+
/* @__PURE__ */ jsx65("div", { className: "mb-3", children: /* @__PURE__ */ jsx65(
|
|
29872
29927
|
"input",
|
|
29873
29928
|
{
|
|
29874
29929
|
type: "text",
|
|
@@ -29878,11 +29933,11 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
29878
29933
|
className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
|
|
29879
29934
|
}
|
|
29880
29935
|
) }),
|
|
29881
|
-
/* @__PURE__ */
|
|
29936
|
+
/* @__PURE__ */ jsx65("div", { className: "mb-4", children: /* @__PURE__ */ jsx65(MyEditor, { value: body, onChange: setBody }) }),
|
|
29882
29937
|
/* @__PURE__ */ jsxs39("div", { className: "flex justify-end gap-2", children: [
|
|
29883
|
-
/* @__PURE__ */
|
|
29884
|
-
/* @__PURE__ */
|
|
29885
|
-
/* @__PURE__ */
|
|
29938
|
+
/* @__PURE__ */ jsx65("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
|
|
29939
|
+
/* @__PURE__ */ jsx65("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
|
|
29940
|
+
/* @__PURE__ */ jsx65("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
|
|
29886
29941
|
] })
|
|
29887
29942
|
] }) });
|
|
29888
29943
|
}
|
|
@@ -29927,10 +29982,10 @@ function showSonnerToast({
|
|
|
29927
29982
|
// src/components/ui/sonner.tsx
|
|
29928
29983
|
import { useTheme } from "next-themes";
|
|
29929
29984
|
import { Toaster as Sonner } from "sonner";
|
|
29930
|
-
import { jsx as
|
|
29985
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
29931
29986
|
var Toaster = ({ ...props }) => {
|
|
29932
29987
|
const { theme = "system" } = useTheme();
|
|
29933
|
-
return /* @__PURE__ */
|
|
29988
|
+
return /* @__PURE__ */ jsx66(
|
|
29934
29989
|
Sonner,
|
|
29935
29990
|
{
|
|
29936
29991
|
theme,
|
|
@@ -29973,6 +30028,7 @@ export {
|
|
|
29973
30028
|
PhoneInput_default as Phone,
|
|
29974
30029
|
PieChart_default as PieChart,
|
|
29975
30030
|
RadioInput_default as RadioGroup,
|
|
30031
|
+
Repeater_default as Repeater,
|
|
29976
30032
|
RichText,
|
|
29977
30033
|
SearchInput_default as Search,
|
|
29978
30034
|
Shape_default as Shape,
|