@algorithm-shift/design-system 1.2.59 → 1.2.61
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/client.js +6 -0
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +7 -1
- package/dist/client.mjs.map +1 -1
- package/dist/index.css +13 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +25 -5
- package/dist/index.d.ts +25 -5
- package/dist/index.js +597 -381
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +580 -366
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -65,6 +65,8 @@ __export(src_exports, {
|
|
|
65
65
|
Spacer: () => Spacer_default,
|
|
66
66
|
Stages: () => Stages_default,
|
|
67
67
|
SwitchToggle: () => SwitchToggle_default,
|
|
68
|
+
TabGroup: () => TabGroupComponent,
|
|
69
|
+
TabList: () => TabList,
|
|
68
70
|
Table: () => Table_default,
|
|
69
71
|
Tabs: () => Tabs_default,
|
|
70
72
|
Text: () => TextInput_default,
|
|
@@ -79,15 +81,30 @@ __export(src_exports, {
|
|
|
79
81
|
module.exports = __toCommonJS(src_exports);
|
|
80
82
|
|
|
81
83
|
// src/components/Layout/Modal.tsx
|
|
84
|
+
var import_react = require("react");
|
|
82
85
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
83
86
|
var Modal = ({
|
|
84
87
|
children,
|
|
85
|
-
onClose,
|
|
86
|
-
label,
|
|
87
88
|
className,
|
|
88
|
-
style
|
|
89
|
+
style,
|
|
90
|
+
showModal,
|
|
91
|
+
onModalClose,
|
|
92
|
+
label
|
|
89
93
|
}) => {
|
|
90
|
-
|
|
94
|
+
(0, import_react.useEffect)(() => {
|
|
95
|
+
if (showModal) {
|
|
96
|
+
const wrapper = document.getElementById("canvas-wrapper") || document.getElementById("canvas-preview");
|
|
97
|
+
if (!wrapper) return;
|
|
98
|
+
const overlay = document.createElement("div");
|
|
99
|
+
overlay.className = "absolute flex inset-0 bg-black opacity-50 z-10 w-full h-full";
|
|
100
|
+
wrapper.appendChild(overlay);
|
|
101
|
+
return () => {
|
|
102
|
+
if (wrapper.contains(overlay)) wrapper.removeChild(overlay);
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
}, [showModal]);
|
|
106
|
+
if (!showModal) return null;
|
|
107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${className} top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 shadow-lg rounded-md z-90 bg-[#fff] `, style: { position: "fixed", ...style }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-h-80", children: [
|
|
91
108
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex justify-between items-center p-4 border-b border-gray-300 bg-gray-100", children: [
|
|
92
109
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { className: "text-[#000]", children: label || "Modal Title" }),
|
|
93
110
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -95,7 +112,7 @@ var Modal = ({
|
|
|
95
112
|
{
|
|
96
113
|
className: "cursor-pointer text-[#000]",
|
|
97
114
|
role: "presentation",
|
|
98
|
-
onClick:
|
|
115
|
+
onClick: () => onModalClose && onModalClose(false),
|
|
99
116
|
children: "X"
|
|
100
117
|
}
|
|
101
118
|
)
|
|
@@ -142,7 +159,7 @@ var Container = ({
|
|
|
142
159
|
var Container_default = Container;
|
|
143
160
|
|
|
144
161
|
// src/components/Layout/Accordion.tsx
|
|
145
|
-
var
|
|
162
|
+
var import_react2 = require("react");
|
|
146
163
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
147
164
|
var Accordion = ({
|
|
148
165
|
children,
|
|
@@ -150,7 +167,7 @@ var Accordion = ({
|
|
|
150
167
|
style,
|
|
151
168
|
className
|
|
152
169
|
}) => {
|
|
153
|
-
const [isOpen, setIsOpen] = (0,
|
|
170
|
+
const [isOpen, setIsOpen] = (0, import_react2.useState)(false);
|
|
154
171
|
const onToggleCollapse = () => {
|
|
155
172
|
setIsOpen((prev) => !prev);
|
|
156
173
|
};
|
|
@@ -195,6 +212,55 @@ var AccordionGroup = ({ children, style, className }) => {
|
|
|
195
212
|
};
|
|
196
213
|
var AccordionGroup_default = AccordionGroup;
|
|
197
214
|
|
|
215
|
+
// src/components/Layout/TabList.tsx
|
|
216
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
217
|
+
function TabList({
|
|
218
|
+
children,
|
|
219
|
+
style,
|
|
220
|
+
className,
|
|
221
|
+
activeTab,
|
|
222
|
+
tabId
|
|
223
|
+
}) {
|
|
224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
225
|
+
"div",
|
|
226
|
+
{
|
|
227
|
+
className: `min-h-30 ${className} ${activeTab === tabId ? "visible" : "hidden"}`,
|
|
228
|
+
style,
|
|
229
|
+
children
|
|
230
|
+
}
|
|
231
|
+
);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// src/components/Layout/TabGroup.tsx
|
|
235
|
+
var import_react3 = require("react");
|
|
236
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
237
|
+
function TabGroupComponent({
|
|
238
|
+
children,
|
|
239
|
+
style,
|
|
240
|
+
className,
|
|
241
|
+
list,
|
|
242
|
+
activeTab,
|
|
243
|
+
onTabChange
|
|
244
|
+
}) {
|
|
245
|
+
const formatedList = (0, import_react3.useMemo)(
|
|
246
|
+
() => Array.isArray(list) ? [...list].sort((a, b) => (a.orderNumber ?? 0) - (b.orderNumber ?? 0)) : [],
|
|
247
|
+
[list]
|
|
248
|
+
);
|
|
249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className, style, children: [
|
|
250
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex border-b border-gray-200 gap-1", children: formatedList.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
251
|
+
"button",
|
|
252
|
+
{
|
|
253
|
+
"data-id": tab.tabId,
|
|
254
|
+
className: `px-4 py-2 text-sm border-b-2 font-medium transition-colors cursor-pointer ${activeTab === tab.tabId ? " bg-blue-500 text-white" : "bg-gray-100 "}`,
|
|
255
|
+
onClick: () => onTabChange && onTabChange(tab.tabId),
|
|
256
|
+
children: tab.name || "Tab List"
|
|
257
|
+
},
|
|
258
|
+
tab.tabId
|
|
259
|
+
)) }),
|
|
260
|
+
children
|
|
261
|
+
] });
|
|
262
|
+
}
|
|
263
|
+
|
|
198
264
|
// src/components/ui/button.tsx
|
|
199
265
|
var import_react_slot = require("@radix-ui/react-slot");
|
|
200
266
|
var import_class_variance_authority = require("class-variance-authority");
|
|
@@ -217,7 +283,7 @@ function getInitials(name) {
|
|
|
217
283
|
}
|
|
218
284
|
|
|
219
285
|
// src/components/ui/button.tsx
|
|
220
|
-
var
|
|
286
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
221
287
|
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
222
288
|
"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",
|
|
223
289
|
{
|
|
@@ -251,7 +317,7 @@ function Button({
|
|
|
251
317
|
...props
|
|
252
318
|
}) {
|
|
253
319
|
const Comp = asChild ? import_react_slot.Slot : "button";
|
|
254
|
-
return /* @__PURE__ */ (0,
|
|
320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
255
321
|
Comp,
|
|
256
322
|
{
|
|
257
323
|
"data-slot": "button",
|
|
@@ -262,20 +328,23 @@ function Button({
|
|
|
262
328
|
}
|
|
263
329
|
|
|
264
330
|
// src/components/Basic/Button/Button.tsx
|
|
265
|
-
var
|
|
331
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
266
332
|
var ButtonWrapper = ({
|
|
267
333
|
className,
|
|
268
334
|
style,
|
|
269
335
|
textContent = "Button",
|
|
336
|
+
loadingText = "Loading...",
|
|
337
|
+
loading = false,
|
|
270
338
|
...props
|
|
271
339
|
}) => {
|
|
272
|
-
return /* @__PURE__ */ (0,
|
|
340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
273
341
|
Button,
|
|
274
342
|
{
|
|
275
343
|
...props,
|
|
276
344
|
className,
|
|
277
345
|
style,
|
|
278
|
-
|
|
346
|
+
disabled: props.disabled || loading,
|
|
347
|
+
children: loading ? loadingText : textContent
|
|
279
348
|
}
|
|
280
349
|
);
|
|
281
350
|
};
|
|
@@ -285,7 +354,7 @@ var Button_default = ButtonWrapper;
|
|
|
285
354
|
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";
|
|
286
355
|
|
|
287
356
|
// src/components/Basic/Image/Image.tsx
|
|
288
|
-
var
|
|
357
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
289
358
|
var ImageControl = ({
|
|
290
359
|
className,
|
|
291
360
|
style,
|
|
@@ -302,26 +371,26 @@ var ImageControl = ({
|
|
|
302
371
|
className
|
|
303
372
|
);
|
|
304
373
|
if (!imageUrl && !imageUrlExternal) {
|
|
305
|
-
return /* @__PURE__ */ (0,
|
|
374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: imageClass, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("img", { src: image_placeholder_default, alt: altText, className: "opacity-50", width: 50, height: 50 }) });
|
|
306
375
|
}
|
|
307
376
|
const url = imageUrlExternal || imageUrl;
|
|
308
|
-
return /* @__PURE__ */ (0,
|
|
377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("img", { src: url, alt: altText, className: defaultImgClass, style });
|
|
309
378
|
};
|
|
310
379
|
var Image_default = ImageControl;
|
|
311
380
|
|
|
312
381
|
// src/components/Basic/Shape/Shape.tsx
|
|
313
|
-
var
|
|
382
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
314
383
|
var Shape = ({
|
|
315
384
|
children,
|
|
316
385
|
className,
|
|
317
386
|
style
|
|
318
387
|
}) => {
|
|
319
|
-
return /* @__PURE__ */ (0,
|
|
388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className, style, children });
|
|
320
389
|
};
|
|
321
390
|
var Shape_default = Shape;
|
|
322
391
|
|
|
323
392
|
// src/components/Basic/Typography/Typography.tsx
|
|
324
|
-
var
|
|
393
|
+
var import_react4 = __toESM(require("react"));
|
|
325
394
|
var Typography = ({
|
|
326
395
|
className,
|
|
327
396
|
style,
|
|
@@ -329,14 +398,14 @@ var Typography = ({
|
|
|
329
398
|
textContent
|
|
330
399
|
}) => {
|
|
331
400
|
const Tag2 = tagName || "h1";
|
|
332
|
-
return
|
|
401
|
+
return import_react4.default.createElement(
|
|
333
402
|
Tag2,
|
|
334
403
|
{
|
|
335
404
|
style,
|
|
336
405
|
className: cn(className, "pointer-events-auto")
|
|
337
406
|
},
|
|
338
407
|
[
|
|
339
|
-
|
|
408
|
+
import_react4.default.createElement("span", {
|
|
340
409
|
key: "html",
|
|
341
410
|
className: "pointer-events-none",
|
|
342
411
|
dangerouslySetInnerHTML: { __html: textContent }
|
|
@@ -7544,7 +7613,7 @@ __export(icons_exports, {
|
|
|
7544
7613
|
});
|
|
7545
7614
|
|
|
7546
7615
|
// node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
7547
|
-
var
|
|
7616
|
+
var import_react6 = require("react");
|
|
7548
7617
|
|
|
7549
7618
|
// node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
7550
7619
|
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
@@ -7568,7 +7637,7 @@ var hasA11yProp = (props) => {
|
|
|
7568
7637
|
};
|
|
7569
7638
|
|
|
7570
7639
|
// node_modules/lucide-react/dist/esm/Icon.js
|
|
7571
|
-
var
|
|
7640
|
+
var import_react5 = require("react");
|
|
7572
7641
|
|
|
7573
7642
|
// node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
7574
7643
|
var defaultAttributes = {
|
|
@@ -7584,7 +7653,7 @@ var defaultAttributes = {
|
|
|
7584
7653
|
};
|
|
7585
7654
|
|
|
7586
7655
|
// node_modules/lucide-react/dist/esm/Icon.js
|
|
7587
|
-
var Icon = (0,
|
|
7656
|
+
var Icon = (0, import_react5.forwardRef)(
|
|
7588
7657
|
({
|
|
7589
7658
|
color = "currentColor",
|
|
7590
7659
|
size = 24,
|
|
@@ -7594,7 +7663,7 @@ var Icon = (0, import_react3.forwardRef)(
|
|
|
7594
7663
|
children,
|
|
7595
7664
|
iconNode,
|
|
7596
7665
|
...rest
|
|
7597
|
-
}, ref) => (0,
|
|
7666
|
+
}, ref) => (0, import_react5.createElement)(
|
|
7598
7667
|
"svg",
|
|
7599
7668
|
{
|
|
7600
7669
|
ref,
|
|
@@ -7608,7 +7677,7 @@ var Icon = (0, import_react3.forwardRef)(
|
|
|
7608
7677
|
...rest
|
|
7609
7678
|
},
|
|
7610
7679
|
[
|
|
7611
|
-
...iconNode.map(([tag, attrs]) => (0,
|
|
7680
|
+
...iconNode.map(([tag, attrs]) => (0, import_react5.createElement)(tag, attrs)),
|
|
7612
7681
|
...Array.isArray(children) ? children : [children]
|
|
7613
7682
|
]
|
|
7614
7683
|
)
|
|
@@ -7616,8 +7685,8 @@ var Icon = (0, import_react3.forwardRef)(
|
|
|
7616
7685
|
|
|
7617
7686
|
// node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
7618
7687
|
var createLucideIcon = (iconName, iconNode) => {
|
|
7619
|
-
const Component2 = (0,
|
|
7620
|
-
({ className, ...props }, ref) => (0,
|
|
7688
|
+
const Component2 = (0, import_react6.forwardRef)(
|
|
7689
|
+
({ className, ...props }, ref) => (0, import_react6.createElement)(Icon, {
|
|
7621
7690
|
ref,
|
|
7622
7691
|
iconNode,
|
|
7623
7692
|
className: mergeClasses(
|
|
@@ -26654,9 +26723,9 @@ var ZoomOut = createLucideIcon("zoom-out", __iconNode1634);
|
|
|
26654
26723
|
|
|
26655
26724
|
// src/components/Basic/Breadcrumb/Breadcrumb.tsx
|
|
26656
26725
|
var import_link3 = __toESM(require("next/link"));
|
|
26657
|
-
var
|
|
26726
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
26658
26727
|
var Breadcrumb = ({ list = [], className, style }) => {
|
|
26659
|
-
return /* @__PURE__ */ (0,
|
|
26728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
26660
26729
|
"nav",
|
|
26661
26730
|
{
|
|
26662
26731
|
"aria-label": "breadcrumb",
|
|
@@ -26664,16 +26733,16 @@ var Breadcrumb = ({ list = [], className, style }) => {
|
|
|
26664
26733
|
style,
|
|
26665
26734
|
children: list.map((item, index) => {
|
|
26666
26735
|
const isLast = index === list.length - 1;
|
|
26667
|
-
return /* @__PURE__ */ (0,
|
|
26668
|
-
item.url && !isLast ? /* @__PURE__ */ (0,
|
|
26736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center", children: [
|
|
26737
|
+
item.url && !isLast ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
26669
26738
|
import_link3.default,
|
|
26670
26739
|
{
|
|
26671
26740
|
href: item.url,
|
|
26672
26741
|
className: "hover:text-foreground transition-colors",
|
|
26673
26742
|
children: item.header
|
|
26674
26743
|
}
|
|
26675
|
-
) : /* @__PURE__ */ (0,
|
|
26676
|
-
!isLast && /* @__PURE__ */ (0,
|
|
26744
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-foreground font-medium", children: item.header }),
|
|
26745
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ChevronRight, { className: "mx-2 h-4 w-4 text-muted-foreground" })
|
|
26677
26746
|
] }, item.id);
|
|
26678
26747
|
})
|
|
26679
26748
|
}
|
|
@@ -26683,16 +26752,16 @@ var Breadcrumb_default = Breadcrumb;
|
|
|
26683
26752
|
|
|
26684
26753
|
// src/components/ui/dropdown-menu.tsx
|
|
26685
26754
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
26686
|
-
var
|
|
26755
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
26687
26756
|
function DropdownMenu({
|
|
26688
26757
|
...props
|
|
26689
26758
|
}) {
|
|
26690
|
-
return /* @__PURE__ */ (0,
|
|
26759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
26691
26760
|
}
|
|
26692
26761
|
function DropdownMenuTrigger({
|
|
26693
26762
|
...props
|
|
26694
26763
|
}) {
|
|
26695
|
-
return /* @__PURE__ */ (0,
|
|
26764
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
26696
26765
|
DropdownMenuPrimitive.Trigger,
|
|
26697
26766
|
{
|
|
26698
26767
|
"data-slot": "dropdown-menu-trigger",
|
|
@@ -26705,7 +26774,7 @@ function DropdownMenuContent({
|
|
|
26705
26774
|
sideOffset = 4,
|
|
26706
26775
|
...props
|
|
26707
26776
|
}) {
|
|
26708
|
-
return /* @__PURE__ */ (0,
|
|
26777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
26709
26778
|
DropdownMenuPrimitive.Content,
|
|
26710
26779
|
{
|
|
26711
26780
|
"data-slot": "dropdown-menu-content",
|
|
@@ -26724,7 +26793,7 @@ function DropdownMenuItem({
|
|
|
26724
26793
|
variant = "default",
|
|
26725
26794
|
...props
|
|
26726
26795
|
}) {
|
|
26727
|
-
return /* @__PURE__ */ (0,
|
|
26796
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
26728
26797
|
DropdownMenuPrimitive.Item,
|
|
26729
26798
|
{
|
|
26730
26799
|
"data-slot": "dropdown-menu-item",
|
|
@@ -26741,7 +26810,7 @@ function DropdownMenuItem({
|
|
|
26741
26810
|
function DropdownMenuSub({
|
|
26742
26811
|
...props
|
|
26743
26812
|
}) {
|
|
26744
|
-
return /* @__PURE__ */ (0,
|
|
26813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
26745
26814
|
}
|
|
26746
26815
|
function DropdownMenuSubTrigger({
|
|
26747
26816
|
className,
|
|
@@ -26749,7 +26818,7 @@ function DropdownMenuSubTrigger({
|
|
|
26749
26818
|
children,
|
|
26750
26819
|
...props
|
|
26751
26820
|
}) {
|
|
26752
|
-
return /* @__PURE__ */ (0,
|
|
26821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
26753
26822
|
DropdownMenuPrimitive.SubTrigger,
|
|
26754
26823
|
{
|
|
26755
26824
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
@@ -26761,7 +26830,7 @@ function DropdownMenuSubTrigger({
|
|
|
26761
26830
|
...props,
|
|
26762
26831
|
children: [
|
|
26763
26832
|
children,
|
|
26764
|
-
/* @__PURE__ */ (0,
|
|
26833
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ChevronRight, { className: "ml-auto size-4" })
|
|
26765
26834
|
]
|
|
26766
26835
|
}
|
|
26767
26836
|
);
|
|
@@ -26770,7 +26839,7 @@ function DropdownMenuSubContent({
|
|
|
26770
26839
|
className,
|
|
26771
26840
|
...props
|
|
26772
26841
|
}) {
|
|
26773
|
-
return /* @__PURE__ */ (0,
|
|
26842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
26774
26843
|
DropdownMenuPrimitive.SubContent,
|
|
26775
26844
|
{
|
|
26776
26845
|
"data-slot": "dropdown-menu-sub-content",
|
|
@@ -26785,11 +26854,11 @@ function DropdownMenuSubContent({
|
|
|
26785
26854
|
|
|
26786
26855
|
// src/components/Basic/ButtonGroup/ButtonGroup.tsx
|
|
26787
26856
|
var import_link4 = __toESM(require("next/link"));
|
|
26788
|
-
var
|
|
26857
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
26789
26858
|
function SplitButton({ style, textContent, className, list = [] }) {
|
|
26790
26859
|
const bgColor = style?.backgroundColor || "";
|
|
26791
|
-
return /* @__PURE__ */ (0,
|
|
26792
|
-
/* @__PURE__ */ (0,
|
|
26860
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "inline-flex rounded-md overflow-hidden border border-teal-200 bg-teal-700 items-center focus:ring-0", style: { backgroundColor: bgColor }, children: [
|
|
26861
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
26793
26862
|
Button,
|
|
26794
26863
|
{
|
|
26795
26864
|
className: `rounded-none border-r px-4 py-2 text-whit focus:ring-0 ${className || ""}`,
|
|
@@ -26797,17 +26866,17 @@ function SplitButton({ style, textContent, className, list = [] }) {
|
|
|
26797
26866
|
children: textContent || "Button"
|
|
26798
26867
|
}
|
|
26799
26868
|
),
|
|
26800
|
-
/* @__PURE__ */ (0,
|
|
26801
|
-
/* @__PURE__ */ (0,
|
|
26869
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(DropdownMenu, { children: [
|
|
26870
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
26802
26871
|
Button,
|
|
26803
26872
|
{
|
|
26804
26873
|
className: "rounded-none bg-teal-700 px-4 py-2 text-white ring-0 shadow-none hover:bg-teal-600 focus:ring-0",
|
|
26805
26874
|
"aria-label": "Open Dropdown",
|
|
26806
26875
|
style: { backgroundColor: bgColor },
|
|
26807
|
-
children: /* @__PURE__ */ (0,
|
|
26876
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ChevronDown, { className: "w-4 h-4" })
|
|
26808
26877
|
}
|
|
26809
26878
|
) }),
|
|
26810
|
-
/* @__PURE__ */ (0,
|
|
26879
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DropdownMenuContent, { align: "end", className: "bg-white min-w-[120px]", children: list.map((item) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DropdownMenuItem, { className: "text-black", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_link4.default, { href: item.url || "#", children: item.header }) }, item.id)) })
|
|
26811
26880
|
] })
|
|
26812
26881
|
] });
|
|
26813
26882
|
}
|
|
@@ -26815,7 +26884,7 @@ function SplitButton({ style, textContent, className, list = [] }) {
|
|
|
26815
26884
|
// src/components/Basic/Icon/Icon.tsx
|
|
26816
26885
|
var faSolid = __toESM(require("@fortawesome/free-solid-svg-icons"));
|
|
26817
26886
|
var import_react_fontawesome = require("@fortawesome/react-fontawesome");
|
|
26818
|
-
var
|
|
26887
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
26819
26888
|
var Icon2 = ({ iconType = "fontawesome", name = "Envelope", className, fontSize = 10, style }) => {
|
|
26820
26889
|
let content = null;
|
|
26821
26890
|
if (iconType === "fontawesome") {
|
|
@@ -26824,7 +26893,7 @@ var Icon2 = ({ iconType = "fontawesome", name = "Envelope", className, fontSize
|
|
|
26824
26893
|
if (!faIcon) {
|
|
26825
26894
|
return null;
|
|
26826
26895
|
}
|
|
26827
|
-
content = /* @__PURE__ */ (0,
|
|
26896
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
26828
26897
|
import_react_fontawesome.FontAwesomeIcon,
|
|
26829
26898
|
{
|
|
26830
26899
|
icon: faIcon,
|
|
@@ -26838,16 +26907,19 @@ var Icon2 = ({ iconType = "fontawesome", name = "Envelope", className, fontSize
|
|
|
26838
26907
|
if (!Lucide) {
|
|
26839
26908
|
return null;
|
|
26840
26909
|
}
|
|
26841
|
-
content = /* @__PURE__ */ (0,
|
|
26910
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Lucide, { className: cn("w-5 h-5"), size: fontSize, style: { color: style?.color } });
|
|
26842
26911
|
}
|
|
26843
|
-
return /* @__PURE__ */ (0,
|
|
26912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style, className, children: content });
|
|
26844
26913
|
};
|
|
26845
26914
|
var Icon_default = Icon2;
|
|
26846
26915
|
|
|
26916
|
+
// src/components/Inputs/TextInput/TextInput.tsx
|
|
26917
|
+
var import_react7 = require("react");
|
|
26918
|
+
|
|
26847
26919
|
// src/components/ui/input.tsx
|
|
26848
|
-
var
|
|
26920
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
26849
26921
|
function Input({ className, type, ...props }) {
|
|
26850
|
-
return /* @__PURE__ */ (0,
|
|
26922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
26851
26923
|
"input",
|
|
26852
26924
|
{
|
|
26853
26925
|
type,
|
|
@@ -26864,18 +26936,24 @@ function Input({ className, type, ...props }) {
|
|
|
26864
26936
|
}
|
|
26865
26937
|
|
|
26866
26938
|
// src/components/Inputs/TextInput/TextInput.tsx
|
|
26867
|
-
var
|
|
26939
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
26868
26940
|
var TextInput = ({ className, style, ...props }) => {
|
|
26869
26941
|
const placeholder = props.placeholder || "Placeholder text";
|
|
26870
26942
|
const isEditable = props.isEditable ?? true;
|
|
26871
26943
|
const isDisabled = props.isDisabled ?? false;
|
|
26872
26944
|
const isReadonly = props.isReadonly ?? false;
|
|
26873
26945
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
26946
|
+
(0, import_react7.useEffect)(() => {
|
|
26947
|
+
if (props.value !== void 0) {
|
|
26948
|
+
const e = { target: { value: props.value } };
|
|
26949
|
+
handleChange?.(e);
|
|
26950
|
+
}
|
|
26951
|
+
}, []);
|
|
26874
26952
|
const handleChange = (e) => {
|
|
26875
26953
|
props.onChange?.(e);
|
|
26876
26954
|
};
|
|
26877
|
-
return /* @__PURE__ */ (0,
|
|
26878
|
-
/* @__PURE__ */ (0,
|
|
26955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
26956
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
26879
26957
|
Input,
|
|
26880
26958
|
{
|
|
26881
26959
|
type: "text",
|
|
@@ -26893,26 +26971,33 @@ var TextInput = ({ className, style, ...props }) => {
|
|
|
26893
26971
|
readOnly: isReadonly
|
|
26894
26972
|
}
|
|
26895
26973
|
),
|
|
26896
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
26974
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
26897
26975
|
] });
|
|
26898
26976
|
};
|
|
26899
26977
|
var TextInput_default = TextInput;
|
|
26900
26978
|
|
|
26901
26979
|
// src/components/Inputs/NumberInput/NumberInput.tsx
|
|
26902
|
-
var
|
|
26980
|
+
var import_react8 = require("react");
|
|
26981
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
26903
26982
|
var NumberInput = ({ className, style, ...props }) => {
|
|
26904
26983
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
26905
26984
|
const isEditable = props.isEditable ?? true;
|
|
26906
26985
|
const isDisabled = props.isDisabled ?? false;
|
|
26907
26986
|
const isReadonly = props.isReadonly ?? false;
|
|
26908
26987
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
26988
|
+
(0, import_react8.useEffect)(() => {
|
|
26989
|
+
if (props.value !== void 0) {
|
|
26990
|
+
const e = { target: { value: props.value } };
|
|
26991
|
+
handleChange?.(e);
|
|
26992
|
+
}
|
|
26993
|
+
}, []);
|
|
26909
26994
|
const handleChange = (e) => {
|
|
26910
26995
|
props.onChange?.(e);
|
|
26911
26996
|
};
|
|
26912
|
-
return /* @__PURE__ */ (0,
|
|
26913
|
-
/* @__PURE__ */ (0,
|
|
26914
|
-
/* @__PURE__ */ (0,
|
|
26915
|
-
/* @__PURE__ */ (0,
|
|
26997
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
26998
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
26999
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Calculator, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
27000
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
26916
27001
|
Input,
|
|
26917
27002
|
{
|
|
26918
27003
|
type: "number",
|
|
@@ -26932,26 +27017,33 @@ var NumberInput = ({ className, style, ...props }) => {
|
|
|
26932
27017
|
}
|
|
26933
27018
|
)
|
|
26934
27019
|
] }),
|
|
26935
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27020
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
26936
27021
|
] });
|
|
26937
27022
|
};
|
|
26938
27023
|
var NumberInput_default = NumberInput;
|
|
26939
27024
|
|
|
26940
27025
|
// src/components/Inputs/EmailInput/EmailInput.tsx
|
|
26941
|
-
var
|
|
27026
|
+
var import_react9 = require("react");
|
|
27027
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
26942
27028
|
var EmailInput = ({ className, style, ...props }) => {
|
|
26943
27029
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
26944
27030
|
const isEditable = props.isEditable ?? true;
|
|
26945
27031
|
const isDisabled = props.isDisabled ?? false;
|
|
26946
27032
|
const isReadonly = props.isReadonly ?? false;
|
|
26947
27033
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
27034
|
+
(0, import_react9.useEffect)(() => {
|
|
27035
|
+
if (props.value !== void 0) {
|
|
27036
|
+
const e = { target: { value: props.value } };
|
|
27037
|
+
handleChange?.(e);
|
|
27038
|
+
}
|
|
27039
|
+
}, []);
|
|
26948
27040
|
const handleChange = (e) => {
|
|
26949
27041
|
props.onChange?.(e);
|
|
26950
27042
|
};
|
|
26951
|
-
return /* @__PURE__ */ (0,
|
|
26952
|
-
/* @__PURE__ */ (0,
|
|
26953
|
-
/* @__PURE__ */ (0,
|
|
26954
|
-
/* @__PURE__ */ (0,
|
|
27043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
27044
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
27045
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Mail, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
27046
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
26955
27047
|
Input,
|
|
26956
27048
|
{
|
|
26957
27049
|
type: "email",
|
|
@@ -26970,26 +27062,33 @@ var EmailInput = ({ className, style, ...props }) => {
|
|
|
26970
27062
|
}
|
|
26971
27063
|
)
|
|
26972
27064
|
] }),
|
|
26973
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27065
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
26974
27066
|
] });
|
|
26975
27067
|
};
|
|
26976
27068
|
var EmailInput_default = EmailInput;
|
|
26977
27069
|
|
|
26978
27070
|
// src/components/Inputs/PasswordInput/PasswordInput.tsx
|
|
26979
|
-
var
|
|
27071
|
+
var import_react10 = require("react");
|
|
27072
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
26980
27073
|
var PasswordInput = ({ className, style, ...props }) => {
|
|
26981
27074
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
26982
27075
|
const isEditable = props.isEditable ?? true;
|
|
26983
27076
|
const isDisabled = props.isDisabled ?? false;
|
|
26984
27077
|
const isReadonly = props.isReadonly ?? false;
|
|
26985
27078
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
27079
|
+
(0, import_react10.useEffect)(() => {
|
|
27080
|
+
if (props.value !== void 0) {
|
|
27081
|
+
const e = { target: { value: props.value } };
|
|
27082
|
+
handleChange?.(e);
|
|
27083
|
+
}
|
|
27084
|
+
}, []);
|
|
26986
27085
|
const handleChange = (e) => {
|
|
26987
27086
|
props.onChange?.(e);
|
|
26988
27087
|
};
|
|
26989
|
-
return /* @__PURE__ */ (0,
|
|
26990
|
-
/* @__PURE__ */ (0,
|
|
26991
|
-
/* @__PURE__ */ (0,
|
|
26992
|
-
/* @__PURE__ */ (0,
|
|
27088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
|
27089
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
27090
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ScanEye, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
27091
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
26993
27092
|
Input,
|
|
26994
27093
|
{
|
|
26995
27094
|
type: "password",
|
|
@@ -27009,15 +27108,18 @@ var PasswordInput = ({ className, style, ...props }) => {
|
|
|
27009
27108
|
}
|
|
27010
27109
|
)
|
|
27011
27110
|
] }),
|
|
27012
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27111
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27013
27112
|
] });
|
|
27014
27113
|
};
|
|
27015
27114
|
var PasswordInput_default = PasswordInput;
|
|
27016
27115
|
|
|
27116
|
+
// src/components/Inputs/Textarea/Textarea.tsx
|
|
27117
|
+
var import_react11 = require("react");
|
|
27118
|
+
|
|
27017
27119
|
// src/components/ui/textarea.tsx
|
|
27018
|
-
var
|
|
27120
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
27019
27121
|
function Textarea({ className, ...props }) {
|
|
27020
|
-
return /* @__PURE__ */ (0,
|
|
27122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
27021
27123
|
"textarea",
|
|
27022
27124
|
{
|
|
27023
27125
|
"data-slot": "textarea",
|
|
@@ -27031,18 +27133,24 @@ function Textarea({ className, ...props }) {
|
|
|
27031
27133
|
}
|
|
27032
27134
|
|
|
27033
27135
|
// src/components/Inputs/Textarea/Textarea.tsx
|
|
27034
|
-
var
|
|
27136
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
27035
27137
|
var Textarea2 = ({ className, style, ...props }) => {
|
|
27036
27138
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
27037
27139
|
const isEditable = props.isEditable ?? true;
|
|
27038
27140
|
const isDisabled = props.isDisabled ?? false;
|
|
27039
27141
|
const isReadonly = props.isReadonly ?? false;
|
|
27040
27142
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
27143
|
+
(0, import_react11.useEffect)(() => {
|
|
27144
|
+
if (props.value !== void 0) {
|
|
27145
|
+
const e = { target: { value: props.value } };
|
|
27146
|
+
handleChange?.(e);
|
|
27147
|
+
}
|
|
27148
|
+
}, []);
|
|
27041
27149
|
const handleChange = (e) => {
|
|
27042
27150
|
props.onChange?.(e);
|
|
27043
27151
|
};
|
|
27044
|
-
return /* @__PURE__ */ (0,
|
|
27045
|
-
/* @__PURE__ */ (0,
|
|
27152
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
27153
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
27046
27154
|
Textarea,
|
|
27047
27155
|
{
|
|
27048
27156
|
id: "textarea-field",
|
|
@@ -27060,26 +27168,33 @@ var Textarea2 = ({ className, style, ...props }) => {
|
|
|
27060
27168
|
readOnly: isReadonly
|
|
27061
27169
|
}
|
|
27062
27170
|
),
|
|
27063
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27171
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27064
27172
|
] });
|
|
27065
27173
|
};
|
|
27066
27174
|
var Textarea_default = Textarea2;
|
|
27067
27175
|
|
|
27068
27176
|
// src/components/Inputs/UrlInput/UrlInput.tsx
|
|
27069
|
-
var
|
|
27177
|
+
var import_react12 = require("react");
|
|
27178
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
27070
27179
|
var UrlInput = ({ className, style, ...props }) => {
|
|
27071
27180
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
27072
27181
|
const isEditable = props.isEditable ?? true;
|
|
27073
27182
|
const isDisabled = props.isDisabled ?? false;
|
|
27074
27183
|
const isReadonly = props.isReadonly ?? false;
|
|
27075
27184
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
27185
|
+
(0, import_react12.useEffect)(() => {
|
|
27186
|
+
if (props.value !== void 0) {
|
|
27187
|
+
const e = { target: { value: props.value } };
|
|
27188
|
+
handleChange?.(e);
|
|
27189
|
+
}
|
|
27190
|
+
}, []);
|
|
27076
27191
|
const handleChange = (e) => {
|
|
27077
27192
|
props.onChange?.(e);
|
|
27078
27193
|
};
|
|
27079
|
-
return /* @__PURE__ */ (0,
|
|
27080
|
-
/* @__PURE__ */ (0,
|
|
27081
|
-
/* @__PURE__ */ (0,
|
|
27082
|
-
/* @__PURE__ */ (0,
|
|
27194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
27195
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
27196
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("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://" }),
|
|
27197
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
27083
27198
|
Input,
|
|
27084
27199
|
{
|
|
27085
27200
|
id: "url-field",
|
|
@@ -27099,19 +27214,22 @@ var UrlInput = ({ className, style, ...props }) => {
|
|
|
27099
27214
|
}
|
|
27100
27215
|
)
|
|
27101
27216
|
] }),
|
|
27102
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27217
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27103
27218
|
] });
|
|
27104
27219
|
};
|
|
27105
27220
|
var UrlInput_default = UrlInput;
|
|
27106
27221
|
|
|
27222
|
+
// src/components/Inputs/Checkbox/Checkbox.tsx
|
|
27223
|
+
var import_react13 = require("react");
|
|
27224
|
+
|
|
27107
27225
|
// src/components/ui/checkbox.tsx
|
|
27108
27226
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
|
|
27109
|
-
var
|
|
27227
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
27110
27228
|
function Checkbox({
|
|
27111
27229
|
className,
|
|
27112
27230
|
...props
|
|
27113
27231
|
}) {
|
|
27114
|
-
return /* @__PURE__ */ (0,
|
|
27232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
27115
27233
|
CheckboxPrimitive.Root,
|
|
27116
27234
|
{
|
|
27117
27235
|
"data-slot": "checkbox",
|
|
@@ -27120,12 +27238,12 @@ function Checkbox({
|
|
|
27120
27238
|
className
|
|
27121
27239
|
),
|
|
27122
27240
|
...props,
|
|
27123
|
-
children: /* @__PURE__ */ (0,
|
|
27241
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
27124
27242
|
CheckboxPrimitive.Indicator,
|
|
27125
27243
|
{
|
|
27126
27244
|
"data-slot": "checkbox-indicator",
|
|
27127
27245
|
className: "flex items-center justify-center text-current transition-none",
|
|
27128
|
-
children: /* @__PURE__ */ (0,
|
|
27246
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Check, { className: "size-3.5" })
|
|
27129
27247
|
}
|
|
27130
27248
|
)
|
|
27131
27249
|
}
|
|
@@ -27134,12 +27252,12 @@ function Checkbox({
|
|
|
27134
27252
|
|
|
27135
27253
|
// src/components/ui/label.tsx
|
|
27136
27254
|
var LabelPrimitive = __toESM(require("@radix-ui/react-label"));
|
|
27137
|
-
var
|
|
27255
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
27138
27256
|
function Label2({
|
|
27139
27257
|
className,
|
|
27140
27258
|
...props
|
|
27141
27259
|
}) {
|
|
27142
|
-
return /* @__PURE__ */ (0,
|
|
27260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
27143
27261
|
LabelPrimitive.Root,
|
|
27144
27262
|
{
|
|
27145
27263
|
"data-slot": "label",
|
|
@@ -27153,17 +27271,22 @@ function Label2({
|
|
|
27153
27271
|
}
|
|
27154
27272
|
|
|
27155
27273
|
// src/components/Inputs/Checkbox/Checkbox.tsx
|
|
27156
|
-
var
|
|
27274
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
27157
27275
|
var CheckboxInput = ({ className, style, ...props }) => {
|
|
27158
27276
|
const isEditable = props.isEditable ?? true;
|
|
27159
27277
|
const isDisabled = props.isDisabled ?? false;
|
|
27160
27278
|
const text = props.text ? props.text : "Subscribe";
|
|
27279
|
+
(0, import_react13.useEffect)(() => {
|
|
27280
|
+
if (props.value) {
|
|
27281
|
+
handleChange(props.value);
|
|
27282
|
+
}
|
|
27283
|
+
}, []);
|
|
27161
27284
|
const handleChange = (value) => {
|
|
27162
27285
|
props.onChange?.(value);
|
|
27163
27286
|
};
|
|
27164
|
-
return /* @__PURE__ */ (0,
|
|
27165
|
-
/* @__PURE__ */ (0,
|
|
27166
|
-
/* @__PURE__ */ (0,
|
|
27287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
|
|
27288
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
27289
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
27167
27290
|
Checkbox,
|
|
27168
27291
|
{
|
|
27169
27292
|
id: props.name || "checkbox",
|
|
@@ -27172,21 +27295,24 @@ var CheckboxInput = ({ className, style, ...props }) => {
|
|
|
27172
27295
|
disabled: !isEditable || isDisabled
|
|
27173
27296
|
}
|
|
27174
27297
|
),
|
|
27175
|
-
/* @__PURE__ */ (0,
|
|
27298
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Label2, { htmlFor: props.name || "checkbox", children: text })
|
|
27176
27299
|
] }) }),
|
|
27177
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27300
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27178
27301
|
] });
|
|
27179
27302
|
};
|
|
27180
27303
|
var Checkbox_default = CheckboxInput;
|
|
27181
27304
|
|
|
27305
|
+
// src/components/Inputs/RadioInput/RadioInput.tsx
|
|
27306
|
+
var import_react14 = require("react");
|
|
27307
|
+
|
|
27182
27308
|
// src/components/ui/radio-group.tsx
|
|
27183
27309
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"));
|
|
27184
|
-
var
|
|
27310
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
27185
27311
|
function RadioGroup2({
|
|
27186
27312
|
className,
|
|
27187
27313
|
...props
|
|
27188
27314
|
}) {
|
|
27189
|
-
return /* @__PURE__ */ (0,
|
|
27315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
27190
27316
|
RadioGroupPrimitive.Root,
|
|
27191
27317
|
{
|
|
27192
27318
|
"data-slot": "radio-group",
|
|
@@ -27199,7 +27325,7 @@ function RadioGroupItem({
|
|
|
27199
27325
|
className,
|
|
27200
27326
|
...props
|
|
27201
27327
|
}) {
|
|
27202
|
-
return /* @__PURE__ */ (0,
|
|
27328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
27203
27329
|
RadioGroupPrimitive.Item,
|
|
27204
27330
|
{
|
|
27205
27331
|
"data-slot": "radio-group-item",
|
|
@@ -27208,12 +27334,12 @@ function RadioGroupItem({
|
|
|
27208
27334
|
className
|
|
27209
27335
|
),
|
|
27210
27336
|
...props,
|
|
27211
|
-
children: /* @__PURE__ */ (0,
|
|
27337
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
27212
27338
|
RadioGroupPrimitive.Indicator,
|
|
27213
27339
|
{
|
|
27214
27340
|
"data-slot": "radio-group-indicator",
|
|
27215
27341
|
className: "relative flex items-center justify-center",
|
|
27216
|
-
children: /* @__PURE__ */ (0,
|
|
27342
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Circle, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
|
|
27217
27343
|
}
|
|
27218
27344
|
)
|
|
27219
27345
|
}
|
|
@@ -27221,7 +27347,7 @@ function RadioGroupItem({
|
|
|
27221
27347
|
}
|
|
27222
27348
|
|
|
27223
27349
|
// src/components/Inputs/RadioInput/RadioInput.tsx
|
|
27224
|
-
var
|
|
27350
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
27225
27351
|
var RadioInput = ({
|
|
27226
27352
|
className,
|
|
27227
27353
|
style,
|
|
@@ -27237,33 +27363,38 @@ var RadioInput = ({
|
|
|
27237
27363
|
value: item[dataKey || "value"],
|
|
27238
27364
|
label: item[dataLabel || "label"]
|
|
27239
27365
|
}));
|
|
27366
|
+
(0, import_react14.useEffect)(() => {
|
|
27367
|
+
if (props.value !== void 0) {
|
|
27368
|
+
handleChange?.(props.value);
|
|
27369
|
+
}
|
|
27370
|
+
}, []);
|
|
27240
27371
|
const handleChange = (value) => {
|
|
27241
27372
|
onChange?.(value);
|
|
27242
27373
|
};
|
|
27243
27374
|
const resolvedDefaultValue = (typeof defaultValue === "string" ? defaultValue : void 0) ?? options[0]?.value;
|
|
27244
|
-
return /* @__PURE__ */ (0,
|
|
27245
|
-
/* @__PURE__ */ (0,
|
|
27375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
27376
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
27246
27377
|
RadioGroup2,
|
|
27247
27378
|
{
|
|
27248
27379
|
defaultValue: resolvedDefaultValue,
|
|
27249
27380
|
onValueChange: handleChange,
|
|
27250
27381
|
children: [
|
|
27251
|
-
options.length === 0 && /* @__PURE__ */ (0,
|
|
27252
|
-
options.map((item) => /* @__PURE__ */ (0,
|
|
27253
|
-
/* @__PURE__ */ (0,
|
|
27254
|
-
/* @__PURE__ */ (0,
|
|
27382
|
+
options.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "text-sm text-gray-500", children: "No options available" }),
|
|
27383
|
+
options.map((item) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
27384
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(RadioGroupItem, { value: item.value, id: `radio-${item.value}` }),
|
|
27385
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Label2, { htmlFor: `radio-${item.value}`, children: item.label })
|
|
27255
27386
|
] }, item.value))
|
|
27256
27387
|
]
|
|
27257
27388
|
}
|
|
27258
27389
|
) }),
|
|
27259
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27390
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27260
27391
|
] });
|
|
27261
27392
|
};
|
|
27262
27393
|
var RadioInput_default = RadioInput;
|
|
27263
27394
|
|
|
27264
27395
|
// src/components/Inputs/MultiCheckbox/MultiCheckbox.tsx
|
|
27265
|
-
var
|
|
27266
|
-
var
|
|
27396
|
+
var import_react15 = require("react");
|
|
27397
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
27267
27398
|
var MultiCheckbox = ({
|
|
27268
27399
|
className,
|
|
27269
27400
|
style,
|
|
@@ -27276,12 +27407,17 @@ var MultiCheckbox = ({
|
|
|
27276
27407
|
isDisabled = false
|
|
27277
27408
|
}) => {
|
|
27278
27409
|
const list = Array.isArray(data) ? data : [];
|
|
27279
|
-
const [value, setValue] = (0,
|
|
27410
|
+
const [value, setValue] = (0, import_react15.useState)(propValue);
|
|
27280
27411
|
const options = (list || []).map((item) => ({
|
|
27281
27412
|
value: item[dataKey || "value"],
|
|
27282
27413
|
label: item[dataLabel || "label"]
|
|
27283
27414
|
}));
|
|
27284
|
-
|
|
27415
|
+
(0, import_react15.useEffect)(() => {
|
|
27416
|
+
if (propValue !== void 0) {
|
|
27417
|
+
onChange?.(propValue);
|
|
27418
|
+
}
|
|
27419
|
+
}, []);
|
|
27420
|
+
const handleChange = (0, import_react15.useCallback)(
|
|
27285
27421
|
(key, checked) => {
|
|
27286
27422
|
setValue((prev) => {
|
|
27287
27423
|
const newValue = { ...prev, [key]: checked };
|
|
@@ -27291,15 +27427,15 @@ var MultiCheckbox = ({
|
|
|
27291
27427
|
},
|
|
27292
27428
|
[onChange]
|
|
27293
27429
|
);
|
|
27294
|
-
return /* @__PURE__ */ (0,
|
|
27430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
27295
27431
|
"div",
|
|
27296
27432
|
{
|
|
27297
27433
|
className: cn("flex flex-col gap-3", className),
|
|
27298
27434
|
style,
|
|
27299
27435
|
children: [
|
|
27300
|
-
options.length === 0 && /* @__PURE__ */ (0,
|
|
27301
|
-
options.map((opt) => /* @__PURE__ */ (0,
|
|
27302
|
-
/* @__PURE__ */ (0,
|
|
27436
|
+
options.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-sm text-gray-500", children: "No options available." }),
|
|
27437
|
+
options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
27438
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
27303
27439
|
Checkbox,
|
|
27304
27440
|
{
|
|
27305
27441
|
id: opt.value,
|
|
@@ -27308,7 +27444,7 @@ var MultiCheckbox = ({
|
|
|
27308
27444
|
disabled: !isEditable || isDisabled
|
|
27309
27445
|
}
|
|
27310
27446
|
),
|
|
27311
|
-
/* @__PURE__ */ (0,
|
|
27447
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Label2, { htmlFor: opt.value, children: opt.label })
|
|
27312
27448
|
] }, opt.value))
|
|
27313
27449
|
]
|
|
27314
27450
|
}
|
|
@@ -27316,16 +27452,19 @@ var MultiCheckbox = ({
|
|
|
27316
27452
|
};
|
|
27317
27453
|
var MultiCheckbox_default = MultiCheckbox;
|
|
27318
27454
|
|
|
27455
|
+
// src/components/Inputs/RichText/RichText.tsx
|
|
27456
|
+
var import_react17 = require("react");
|
|
27457
|
+
|
|
27319
27458
|
// src/components/Global/TinyMceEditor.tsx
|
|
27320
|
-
var
|
|
27459
|
+
var import_react16 = require("react");
|
|
27321
27460
|
var import_tinymce_react = require("@tinymce/tinymce-react");
|
|
27322
|
-
var
|
|
27461
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
27323
27462
|
function MyEditor({
|
|
27324
27463
|
value,
|
|
27325
27464
|
onChange,
|
|
27326
27465
|
isDefault
|
|
27327
27466
|
}) {
|
|
27328
|
-
const editorRef = (0,
|
|
27467
|
+
const editorRef = (0, import_react16.useRef)(null);
|
|
27329
27468
|
function stripOuterP(html) {
|
|
27330
27469
|
const trimmedHtml = html.trim();
|
|
27331
27470
|
if (!trimmedHtml) return "";
|
|
@@ -27337,14 +27476,14 @@ function MyEditor({
|
|
|
27337
27476
|
}
|
|
27338
27477
|
return trimmedHtml;
|
|
27339
27478
|
}
|
|
27340
|
-
const isDefaultToolbar = (0,
|
|
27479
|
+
const isDefaultToolbar = (0, import_react16.useMemo)(() => {
|
|
27341
27480
|
let toolbar = "undo redo | formatselect | bold italic forecolor";
|
|
27342
27481
|
if (isDefault) {
|
|
27343
27482
|
toolbar = "undo redo | blocks | bold italic forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help";
|
|
27344
27483
|
}
|
|
27345
27484
|
return toolbar;
|
|
27346
27485
|
}, [isDefault]);
|
|
27347
|
-
return /* @__PURE__ */ (0,
|
|
27486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
27348
27487
|
import_tinymce_react.Editor,
|
|
27349
27488
|
{
|
|
27350
27489
|
apiKey: process.env.NEXT_PUBLIC_TINYMCE_API_KEY,
|
|
@@ -27388,9 +27527,17 @@ function MyEditor({
|
|
|
27388
27527
|
}
|
|
27389
27528
|
|
|
27390
27529
|
// src/components/Inputs/RichText/RichText.tsx
|
|
27391
|
-
var
|
|
27530
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
27392
27531
|
function RichText({ className, style, ...props }) {
|
|
27393
|
-
|
|
27532
|
+
(0, import_react17.useEffect)(() => {
|
|
27533
|
+
if (props.value !== void 0) {
|
|
27534
|
+
handleChange?.(props.value);
|
|
27535
|
+
}
|
|
27536
|
+
}, []);
|
|
27537
|
+
const handleChange = (content) => {
|
|
27538
|
+
props.onChange?.(content);
|
|
27539
|
+
};
|
|
27540
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
27394
27541
|
"div",
|
|
27395
27542
|
{
|
|
27396
27543
|
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
@@ -27399,25 +27546,28 @@ function RichText({ className, style, ...props }) {
|
|
|
27399
27546
|
borderColor: props.errorMessage ? "#f87171" : style?.borderColor
|
|
27400
27547
|
},
|
|
27401
27548
|
children: [
|
|
27402
|
-
/* @__PURE__ */ (0,
|
|
27403
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27549
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(MyEditor, { onChange: handleChange, value: props.value || "", isDefault: true }),
|
|
27550
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27404
27551
|
]
|
|
27405
27552
|
}
|
|
27406
27553
|
);
|
|
27407
27554
|
}
|
|
27408
27555
|
|
|
27556
|
+
// src/components/Inputs/Dropdown/Dropdown.tsx
|
|
27557
|
+
var import_react18 = require("react");
|
|
27558
|
+
|
|
27409
27559
|
// src/components/ui/select.tsx
|
|
27410
27560
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"));
|
|
27411
|
-
var
|
|
27561
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
27412
27562
|
function Select({
|
|
27413
27563
|
...props
|
|
27414
27564
|
}) {
|
|
27415
|
-
return /* @__PURE__ */ (0,
|
|
27565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
27416
27566
|
}
|
|
27417
27567
|
function SelectValue({
|
|
27418
27568
|
...props
|
|
27419
27569
|
}) {
|
|
27420
|
-
return /* @__PURE__ */ (0,
|
|
27570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
27421
27571
|
}
|
|
27422
27572
|
function SelectTrigger({
|
|
27423
27573
|
className,
|
|
@@ -27425,7 +27575,7 @@ function SelectTrigger({
|
|
|
27425
27575
|
children,
|
|
27426
27576
|
...props
|
|
27427
27577
|
}) {
|
|
27428
|
-
return /* @__PURE__ */ (0,
|
|
27578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
27429
27579
|
SelectPrimitive.Trigger,
|
|
27430
27580
|
{
|
|
27431
27581
|
"data-slot": "select-trigger",
|
|
@@ -27437,7 +27587,7 @@ function SelectTrigger({
|
|
|
27437
27587
|
...props,
|
|
27438
27588
|
children: [
|
|
27439
27589
|
children,
|
|
27440
|
-
/* @__PURE__ */ (0,
|
|
27590
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ChevronDown, { className: "size-4 opacity-50" }) })
|
|
27441
27591
|
]
|
|
27442
27592
|
}
|
|
27443
27593
|
);
|
|
@@ -27448,7 +27598,7 @@ function SelectContent({
|
|
|
27448
27598
|
position = "popper",
|
|
27449
27599
|
...props
|
|
27450
27600
|
}) {
|
|
27451
|
-
return /* @__PURE__ */ (0,
|
|
27601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
27452
27602
|
SelectPrimitive.Content,
|
|
27453
27603
|
{
|
|
27454
27604
|
"data-slot": "select-content",
|
|
@@ -27460,8 +27610,8 @@ function SelectContent({
|
|
|
27460
27610
|
position,
|
|
27461
27611
|
...props,
|
|
27462
27612
|
children: [
|
|
27463
|
-
/* @__PURE__ */ (0,
|
|
27464
|
-
/* @__PURE__ */ (0,
|
|
27613
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SelectScrollUpButton, {}),
|
|
27614
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
27465
27615
|
SelectPrimitive.Viewport,
|
|
27466
27616
|
{
|
|
27467
27617
|
className: cn(
|
|
@@ -27471,7 +27621,7 @@ function SelectContent({
|
|
|
27471
27621
|
children
|
|
27472
27622
|
}
|
|
27473
27623
|
),
|
|
27474
|
-
/* @__PURE__ */ (0,
|
|
27624
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SelectScrollDownButton, {})
|
|
27475
27625
|
]
|
|
27476
27626
|
}
|
|
27477
27627
|
) });
|
|
@@ -27481,7 +27631,7 @@ function SelectItem({
|
|
|
27481
27631
|
children,
|
|
27482
27632
|
...props
|
|
27483
27633
|
}) {
|
|
27484
|
-
return /* @__PURE__ */ (0,
|
|
27634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
27485
27635
|
SelectPrimitive.Item,
|
|
27486
27636
|
{
|
|
27487
27637
|
"data-slot": "select-item",
|
|
@@ -27491,8 +27641,8 @@ function SelectItem({
|
|
|
27491
27641
|
),
|
|
27492
27642
|
...props,
|
|
27493
27643
|
children: [
|
|
27494
|
-
/* @__PURE__ */ (0,
|
|
27495
|
-
/* @__PURE__ */ (0,
|
|
27644
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Check, { className: "size-4" }) }) }),
|
|
27645
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SelectPrimitive.ItemText, { children })
|
|
27496
27646
|
]
|
|
27497
27647
|
}
|
|
27498
27648
|
);
|
|
@@ -27501,7 +27651,7 @@ function SelectScrollUpButton({
|
|
|
27501
27651
|
className,
|
|
27502
27652
|
...props
|
|
27503
27653
|
}) {
|
|
27504
|
-
return /* @__PURE__ */ (0,
|
|
27654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
27505
27655
|
SelectPrimitive.ScrollUpButton,
|
|
27506
27656
|
{
|
|
27507
27657
|
"data-slot": "select-scroll-up-button",
|
|
@@ -27510,7 +27660,7 @@ function SelectScrollUpButton({
|
|
|
27510
27660
|
className
|
|
27511
27661
|
),
|
|
27512
27662
|
...props,
|
|
27513
|
-
children: /* @__PURE__ */ (0,
|
|
27663
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ChevronUp, { className: "size-4" })
|
|
27514
27664
|
}
|
|
27515
27665
|
);
|
|
27516
27666
|
}
|
|
@@ -27518,7 +27668,7 @@ function SelectScrollDownButton({
|
|
|
27518
27668
|
className,
|
|
27519
27669
|
...props
|
|
27520
27670
|
}) {
|
|
27521
|
-
return /* @__PURE__ */ (0,
|
|
27671
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
27522
27672
|
SelectPrimitive.ScrollDownButton,
|
|
27523
27673
|
{
|
|
27524
27674
|
"data-slot": "select-scroll-down-button",
|
|
@@ -27527,19 +27677,24 @@ function SelectScrollDownButton({
|
|
|
27527
27677
|
className
|
|
27528
27678
|
),
|
|
27529
27679
|
...props,
|
|
27530
|
-
children: /* @__PURE__ */ (0,
|
|
27680
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ChevronDown, { className: "size-4" })
|
|
27531
27681
|
}
|
|
27532
27682
|
);
|
|
27533
27683
|
}
|
|
27534
27684
|
|
|
27535
27685
|
// src/components/Inputs/Dropdown/Dropdown.tsx
|
|
27536
|
-
var
|
|
27686
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
27537
27687
|
var Dropdown = ({ className, style, ...props }) => {
|
|
27538
27688
|
const list = Array.isArray(props?.data) ? props.data : [];
|
|
27539
27689
|
const placeholder = props.placeholder ? props.placeholder : "Placeholder text";
|
|
27540
27690
|
const isEditable = props.isEditable ?? true;
|
|
27541
27691
|
const isDisabled = props.isDisabled ?? false;
|
|
27542
27692
|
const isReadonly = props.isReadonly ?? false;
|
|
27693
|
+
(0, import_react18.useEffect)(() => {
|
|
27694
|
+
if (props.value !== void 0) {
|
|
27695
|
+
handleChange(props.value);
|
|
27696
|
+
}
|
|
27697
|
+
}, []);
|
|
27543
27698
|
const handleChange = (value) => {
|
|
27544
27699
|
props.onChange?.(value);
|
|
27545
27700
|
};
|
|
@@ -27549,9 +27704,9 @@ var Dropdown = ({ className, style, ...props }) => {
|
|
|
27549
27704
|
value: item[dataKey],
|
|
27550
27705
|
label: item[dataLabel]
|
|
27551
27706
|
}));
|
|
27552
|
-
return /* @__PURE__ */ (0,
|
|
27553
|
-
/* @__PURE__ */ (0,
|
|
27554
|
-
/* @__PURE__ */ (0,
|
|
27707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
27708
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Select, { name: props.name, value: props.value || "", onValueChange: handleChange, disabled: isDisabled || !isEditable, children: [
|
|
27709
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
27555
27710
|
SelectTrigger,
|
|
27556
27711
|
{
|
|
27557
27712
|
id: props.name || "select-field",
|
|
@@ -27561,24 +27716,31 @@ var Dropdown = ({ className, style, ...props }) => {
|
|
|
27561
27716
|
borderColor: props.errorMessage ? "#f87171" : style?.borderColor
|
|
27562
27717
|
},
|
|
27563
27718
|
"aria-readonly": isReadonly,
|
|
27564
|
-
children: /* @__PURE__ */ (0,
|
|
27719
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SelectValue, { placeholder })
|
|
27565
27720
|
}
|
|
27566
27721
|
),
|
|
27567
|
-
/* @__PURE__ */ (0,
|
|
27722
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(SelectContent, { children: [
|
|
27723
|
+
props.dataLoading && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SelectItem, { value: "none", disabled: true, children: "Loading..." }),
|
|
27724
|
+
!props.dataLoading && options.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SelectItem, { value: "none", disabled: true, children: "No options" }),
|
|
27725
|
+
options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SelectItem, { value: opt.value, children: opt.label }, opt.value))
|
|
27726
|
+
] })
|
|
27568
27727
|
] }),
|
|
27569
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27728
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27570
27729
|
] });
|
|
27571
27730
|
};
|
|
27572
27731
|
var Dropdown_default = Dropdown;
|
|
27573
27732
|
|
|
27733
|
+
// src/components/Inputs/SwitchToggle/SwitchToggle.tsx
|
|
27734
|
+
var import_react19 = require("react");
|
|
27735
|
+
|
|
27574
27736
|
// src/components/ui/switch.tsx
|
|
27575
27737
|
var SwitchPrimitive = __toESM(require("@radix-ui/react-switch"));
|
|
27576
|
-
var
|
|
27738
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
27577
27739
|
function Switch({
|
|
27578
27740
|
className,
|
|
27579
27741
|
...props
|
|
27580
27742
|
}) {
|
|
27581
|
-
return /* @__PURE__ */ (0,
|
|
27743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
27582
27744
|
SwitchPrimitive.Root,
|
|
27583
27745
|
{
|
|
27584
27746
|
"data-slot": "switch",
|
|
@@ -27587,7 +27749,7 @@ function Switch({
|
|
|
27587
27749
|
className
|
|
27588
27750
|
),
|
|
27589
27751
|
...props,
|
|
27590
|
-
children: /* @__PURE__ */ (0,
|
|
27752
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
27591
27753
|
SwitchPrimitive.Thumb,
|
|
27592
27754
|
{
|
|
27593
27755
|
"data-slot": "switch-thumb",
|
|
@@ -27601,16 +27763,21 @@ function Switch({
|
|
|
27601
27763
|
}
|
|
27602
27764
|
|
|
27603
27765
|
// src/components/Inputs/SwitchToggle/SwitchToggle.tsx
|
|
27604
|
-
var
|
|
27766
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
27605
27767
|
var SwitchToggle = ({ className, style, ...props }) => {
|
|
27606
27768
|
const isEditable = props.isEditable ?? true;
|
|
27607
27769
|
const isDisabled = props.isDisabled ?? false;
|
|
27770
|
+
(0, import_react19.useEffect)(() => {
|
|
27771
|
+
if (props.value !== void 0) {
|
|
27772
|
+
handleChange?.(props.value);
|
|
27773
|
+
}
|
|
27774
|
+
}, []);
|
|
27608
27775
|
const handleChange = (value) => {
|
|
27609
27776
|
props.onChange?.(value);
|
|
27610
27777
|
};
|
|
27611
|
-
return /* @__PURE__ */ (0,
|
|
27612
|
-
/* @__PURE__ */ (0,
|
|
27613
|
-
/* @__PURE__ */ (0,
|
|
27778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
|
|
27779
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center space-x-2 mb-2", children: [
|
|
27780
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
27614
27781
|
Switch,
|
|
27615
27782
|
{
|
|
27616
27783
|
id: props.name || "switch",
|
|
@@ -27619,26 +27786,32 @@ var SwitchToggle = ({ className, style, ...props }) => {
|
|
|
27619
27786
|
disabled: isDisabled || !isEditable
|
|
27620
27787
|
}
|
|
27621
27788
|
),
|
|
27622
|
-
/* @__PURE__ */ (0,
|
|
27789
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Label2, { htmlFor: props.name || "switch", children: props.text })
|
|
27623
27790
|
] }) }),
|
|
27624
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27791
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27625
27792
|
] });
|
|
27626
27793
|
};
|
|
27627
27794
|
var SwitchToggle_default = SwitchToggle;
|
|
27628
27795
|
|
|
27629
27796
|
// src/components/Inputs/PhoneInput/PhoneInput.tsx
|
|
27797
|
+
var import_react20 = require("react");
|
|
27630
27798
|
var import_react_international_phone = require("react-international-phone");
|
|
27631
27799
|
var import_style = require("react-international-phone/style.css");
|
|
27632
|
-
var
|
|
27800
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
27633
27801
|
var PhoneInput = ({ className, style, ...props }) => {
|
|
27634
27802
|
const placeholder = props.placeholder ?? "Enter phone number";
|
|
27635
27803
|
const isEditable = props.isEditable ?? true;
|
|
27636
27804
|
const isDisabled = props.isDisabled ?? false;
|
|
27805
|
+
(0, import_react20.useEffect)(() => {
|
|
27806
|
+
if (props.value !== void 0) {
|
|
27807
|
+
handleChange?.(props.value);
|
|
27808
|
+
}
|
|
27809
|
+
}, []);
|
|
27637
27810
|
const handleChange = (val) => {
|
|
27638
27811
|
props.onChange?.(val);
|
|
27639
27812
|
};
|
|
27640
|
-
return /* @__PURE__ */ (0,
|
|
27641
|
-
/* @__PURE__ */ (0,
|
|
27813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
27814
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
27642
27815
|
import_react_international_phone.PhoneInput,
|
|
27643
27816
|
{
|
|
27644
27817
|
defaultCountry: "in",
|
|
@@ -27662,26 +27835,33 @@ var PhoneInput = ({ className, style, ...props }) => {
|
|
|
27662
27835
|
disabled: isDisabled || !isEditable
|
|
27663
27836
|
}
|
|
27664
27837
|
),
|
|
27665
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27838
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27666
27839
|
] });
|
|
27667
27840
|
};
|
|
27668
27841
|
var PhoneInput_default = PhoneInput;
|
|
27669
27842
|
|
|
27670
27843
|
// src/components/Inputs/SearchInput/SearchInput.tsx
|
|
27671
|
-
var
|
|
27844
|
+
var import_react21 = require("react");
|
|
27845
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
27672
27846
|
var SearchInput = ({ className, style, ...props }) => {
|
|
27673
27847
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
27674
27848
|
const isEditable = props.isEditable ?? true;
|
|
27675
27849
|
const isDisabled = props.isDisabled ?? false;
|
|
27676
27850
|
const isReadonly = props.isReadonly ?? false;
|
|
27677
27851
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
27852
|
+
(0, import_react21.useEffect)(() => {
|
|
27853
|
+
if (props.value !== void 0) {
|
|
27854
|
+
const e = { target: { value: props.value } };
|
|
27855
|
+
handleChange?.(e);
|
|
27856
|
+
}
|
|
27857
|
+
}, []);
|
|
27678
27858
|
const handleChange = (e) => {
|
|
27679
27859
|
props.onChange?.(e);
|
|
27680
27860
|
};
|
|
27681
|
-
return /* @__PURE__ */ (0,
|
|
27682
|
-
/* @__PURE__ */ (0,
|
|
27683
|
-
/* @__PURE__ */ (0,
|
|
27684
|
-
/* @__PURE__ */ (0,
|
|
27861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
27862
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
27863
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Search, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
27864
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
27685
27865
|
Input,
|
|
27686
27866
|
{
|
|
27687
27867
|
type: "text",
|
|
@@ -27701,17 +27881,27 @@ var SearchInput = ({ className, style, ...props }) => {
|
|
|
27701
27881
|
}
|
|
27702
27882
|
)
|
|
27703
27883
|
] }),
|
|
27704
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27884
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27705
27885
|
] });
|
|
27706
27886
|
};
|
|
27707
27887
|
var SearchInput_default = SearchInput;
|
|
27708
27888
|
|
|
27709
27889
|
// src/components/Inputs/FileInput/FileInput.tsx
|
|
27710
|
-
var
|
|
27890
|
+
var import_react22 = require("react");
|
|
27891
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
27711
27892
|
var FileInput2 = ({ className, style, ...props }) => {
|
|
27712
27893
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
27713
|
-
|
|
27714
|
-
|
|
27894
|
+
(0, import_react22.useEffect)(() => {
|
|
27895
|
+
if (props.value !== void 0) {
|
|
27896
|
+
const e = { target: { value: props.value } };
|
|
27897
|
+
handleChange?.(e);
|
|
27898
|
+
}
|
|
27899
|
+
}, []);
|
|
27900
|
+
const handleChange = (e) => {
|
|
27901
|
+
props.onChange?.(e);
|
|
27902
|
+
};
|
|
27903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "d-flex items-center relative align-middle", children: [
|
|
27904
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
27715
27905
|
Input,
|
|
27716
27906
|
{
|
|
27717
27907
|
type: "file",
|
|
@@ -27725,18 +27915,17 @@ var FileInput2 = ({ className, style, ...props }) => {
|
|
|
27725
27915
|
},
|
|
27726
27916
|
autoComplete: "off",
|
|
27727
27917
|
placeholder,
|
|
27728
|
-
onChange:
|
|
27729
|
-
props.onChange?.(e);
|
|
27730
|
-
}
|
|
27918
|
+
onChange: handleChange
|
|
27731
27919
|
}
|
|
27732
27920
|
),
|
|
27733
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27921
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27734
27922
|
] });
|
|
27735
27923
|
};
|
|
27736
27924
|
var FileInput_default = FileInput2;
|
|
27737
27925
|
|
|
27738
27926
|
// src/components/Inputs/DatePicker/DatePicker.tsx
|
|
27739
|
-
var
|
|
27927
|
+
var import_react23 = require("react");
|
|
27928
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
27740
27929
|
function DatePicker({ className, style, ...props }) {
|
|
27741
27930
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
27742
27931
|
const minimumDate = props.minimumDate ?? "none";
|
|
@@ -27761,13 +27950,18 @@ function DatePicker({ className, style, ...props }) {
|
|
|
27761
27950
|
};
|
|
27762
27951
|
const minDate = resolveDate(minimumDate, customMinimumDate);
|
|
27763
27952
|
const maxDate = resolveDate(maximumDate, customMaximumDate);
|
|
27953
|
+
(0, import_react23.useEffect)(() => {
|
|
27954
|
+
if (props.value !== void 0) {
|
|
27955
|
+
handleChange(props.value);
|
|
27956
|
+
}
|
|
27957
|
+
}, []);
|
|
27764
27958
|
const handleChange = (e) => {
|
|
27765
27959
|
props.onChange?.(e);
|
|
27766
27960
|
};
|
|
27767
|
-
return /* @__PURE__ */ (0,
|
|
27768
|
-
/* @__PURE__ */ (0,
|
|
27769
|
-
/* @__PURE__ */ (0,
|
|
27770
|
-
/* @__PURE__ */ (0,
|
|
27961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
27962
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
27963
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Calendar, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
27964
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
27771
27965
|
Input,
|
|
27772
27966
|
{
|
|
27773
27967
|
type: "date",
|
|
@@ -27793,18 +27987,18 @@ function DatePicker({ className, style, ...props }) {
|
|
|
27793
27987
|
}
|
|
27794
27988
|
)
|
|
27795
27989
|
] }),
|
|
27796
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27990
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27797
27991
|
] });
|
|
27798
27992
|
}
|
|
27799
27993
|
|
|
27800
27994
|
// src/components/Inputs/DateRange/DateRange.tsx
|
|
27801
|
-
var
|
|
27995
|
+
var import_react24 = __toESM(require("react"));
|
|
27802
27996
|
var import_date_fns = require("date-fns");
|
|
27803
27997
|
|
|
27804
27998
|
// src/components/ui/calendar.tsx
|
|
27805
|
-
var
|
|
27999
|
+
var React4 = __toESM(require("react"));
|
|
27806
28000
|
var import_react_day_picker = require("react-day-picker");
|
|
27807
|
-
var
|
|
28001
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
27808
28002
|
function Calendar2({
|
|
27809
28003
|
className,
|
|
27810
28004
|
classNames,
|
|
@@ -27816,7 +28010,7 @@ function Calendar2({
|
|
|
27816
28010
|
...props
|
|
27817
28011
|
}) {
|
|
27818
28012
|
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
27819
|
-
return /* @__PURE__ */ (0,
|
|
28013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
27820
28014
|
import_react_day_picker.DayPicker,
|
|
27821
28015
|
{
|
|
27822
28016
|
showOutsideDays,
|
|
@@ -27915,7 +28109,7 @@ function Calendar2({
|
|
|
27915
28109
|
},
|
|
27916
28110
|
components: {
|
|
27917
28111
|
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
27918
|
-
return /* @__PURE__ */ (0,
|
|
28112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
27919
28113
|
"div",
|
|
27920
28114
|
{
|
|
27921
28115
|
"data-slot": "calendar",
|
|
@@ -27927,10 +28121,10 @@ function Calendar2({
|
|
|
27927
28121
|
},
|
|
27928
28122
|
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
27929
28123
|
if (orientation === "left") {
|
|
27930
|
-
return /* @__PURE__ */ (0,
|
|
28124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ChevronLeft, { className: cn("size-4", className2), ...props2 });
|
|
27931
28125
|
}
|
|
27932
28126
|
if (orientation === "right") {
|
|
27933
|
-
return /* @__PURE__ */ (0,
|
|
28127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
27934
28128
|
ChevronRight,
|
|
27935
28129
|
{
|
|
27936
28130
|
className: cn("size-4", className2),
|
|
@@ -27938,11 +28132,11 @@ function Calendar2({
|
|
|
27938
28132
|
}
|
|
27939
28133
|
);
|
|
27940
28134
|
}
|
|
27941
|
-
return /* @__PURE__ */ (0,
|
|
28135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ChevronDown, { className: cn("size-4", className2), ...props2 });
|
|
27942
28136
|
},
|
|
27943
28137
|
DayButton: CalendarDayButton,
|
|
27944
28138
|
WeekNumber: ({ children, ...props2 }) => {
|
|
27945
|
-
return /* @__PURE__ */ (0,
|
|
28139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("td", { ...props2, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
|
|
27946
28140
|
},
|
|
27947
28141
|
...components
|
|
27948
28142
|
},
|
|
@@ -27957,11 +28151,11 @@ function CalendarDayButton({
|
|
|
27957
28151
|
...props
|
|
27958
28152
|
}) {
|
|
27959
28153
|
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
27960
|
-
const ref =
|
|
27961
|
-
|
|
28154
|
+
const ref = React4.useRef(null);
|
|
28155
|
+
React4.useEffect(() => {
|
|
27962
28156
|
if (modifiers.focused) ref.current?.focus();
|
|
27963
28157
|
}, [modifiers.focused]);
|
|
27964
|
-
return /* @__PURE__ */ (0,
|
|
28158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
27965
28159
|
Button,
|
|
27966
28160
|
{
|
|
27967
28161
|
ref,
|
|
@@ -27984,16 +28178,16 @@ function CalendarDayButton({
|
|
|
27984
28178
|
|
|
27985
28179
|
// src/components/ui/popover.tsx
|
|
27986
28180
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
|
27987
|
-
var
|
|
28181
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
27988
28182
|
function Popover({
|
|
27989
28183
|
...props
|
|
27990
28184
|
}) {
|
|
27991
|
-
return /* @__PURE__ */ (0,
|
|
28185
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
27992
28186
|
}
|
|
27993
28187
|
function PopoverTrigger({
|
|
27994
28188
|
...props
|
|
27995
28189
|
}) {
|
|
27996
|
-
return /* @__PURE__ */ (0,
|
|
28190
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
27997
28191
|
}
|
|
27998
28192
|
function PopoverContent({
|
|
27999
28193
|
className,
|
|
@@ -28001,7 +28195,7 @@ function PopoverContent({
|
|
|
28001
28195
|
sideOffset = 4,
|
|
28002
28196
|
...props
|
|
28003
28197
|
}) {
|
|
28004
|
-
return /* @__PURE__ */ (0,
|
|
28198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
28005
28199
|
PopoverPrimitive.Content,
|
|
28006
28200
|
{
|
|
28007
28201
|
"data-slot": "popover-content",
|
|
@@ -28017,24 +28211,29 @@ function PopoverContent({
|
|
|
28017
28211
|
}
|
|
28018
28212
|
|
|
28019
28213
|
// src/components/Inputs/DateRange/DateRange.tsx
|
|
28020
|
-
var
|
|
28214
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
28021
28215
|
var DateRange = ({ className, style, ...props }) => {
|
|
28022
28216
|
const isDateRange = (val) => !!val && val.from instanceof Date;
|
|
28023
|
-
const [date, setDate] =
|
|
28217
|
+
const [date, setDate] = import_react24.default.useState(
|
|
28024
28218
|
isDateRange(props.value) ? props.value : {
|
|
28025
28219
|
from: /* @__PURE__ */ new Date(),
|
|
28026
28220
|
to: (0, import_date_fns.addDays)(/* @__PURE__ */ new Date(), 7)
|
|
28027
28221
|
}
|
|
28028
28222
|
);
|
|
28223
|
+
(0, import_react24.useEffect)(() => {
|
|
28224
|
+
if (props.value && isDateRange(props.value)) {
|
|
28225
|
+
handleChange?.(props.value);
|
|
28226
|
+
}
|
|
28227
|
+
}, []);
|
|
28029
28228
|
const handleChange = (value) => {
|
|
28030
28229
|
setDate(value);
|
|
28031
28230
|
if (value) {
|
|
28032
28231
|
props.onChange?.(value);
|
|
28033
28232
|
}
|
|
28034
28233
|
};
|
|
28035
|
-
return /* @__PURE__ */ (0,
|
|
28036
|
-
/* @__PURE__ */ (0,
|
|
28037
|
-
/* @__PURE__ */ (0,
|
|
28234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
|
|
28235
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Popover, { children: [
|
|
28236
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
28038
28237
|
Button,
|
|
28039
28238
|
{
|
|
28040
28239
|
id: "date",
|
|
@@ -28043,15 +28242,15 @@ var DateRange = ({ className, style, ...props }) => {
|
|
|
28043
28242
|
"w-full justify-start text-left font-normal text-[11px] border-[#BDBDBD]",
|
|
28044
28243
|
!date && "text-muted-foreground"
|
|
28045
28244
|
),
|
|
28046
|
-
children: date?.from ? date.to ? /* @__PURE__ */ (0,
|
|
28245
|
+
children: date?.from ? date.to ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
|
|
28047
28246
|
(0, import_date_fns.format)(date.from, "LLL dd, y"),
|
|
28048
28247
|
" -",
|
|
28049
28248
|
" ",
|
|
28050
28249
|
(0, import_date_fns.format)(date.to, "LLL dd, y")
|
|
28051
|
-
] }) : (0, import_date_fns.format)(date.from, "LLL dd, y") : /* @__PURE__ */ (0,
|
|
28250
|
+
] }) : (0, import_date_fns.format)(date.from, "LLL dd, y") : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { children: "Pick a date range" })
|
|
28052
28251
|
}
|
|
28053
28252
|
) }),
|
|
28054
|
-
/* @__PURE__ */ (0,
|
|
28253
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
28055
28254
|
Calendar2,
|
|
28056
28255
|
{
|
|
28057
28256
|
mode: "range",
|
|
@@ -28062,24 +28261,31 @@ var DateRange = ({ className, style, ...props }) => {
|
|
|
28062
28261
|
}
|
|
28063
28262
|
) })
|
|
28064
28263
|
] }) }),
|
|
28065
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
28264
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
28066
28265
|
] });
|
|
28067
28266
|
};
|
|
28068
28267
|
var DateRange_default = DateRange;
|
|
28069
28268
|
|
|
28070
28269
|
// src/components/Inputs/TextInputGroup/TextInputGroup.tsx
|
|
28071
|
-
var
|
|
28270
|
+
var import_react25 = require("react");
|
|
28271
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
28072
28272
|
var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
|
|
28073
28273
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
28074
28274
|
const isEditable = props.isEditable ?? true;
|
|
28075
28275
|
const isDisabled = props.isDisabled ?? false;
|
|
28076
28276
|
const isReadonly = props.isReadonly ?? false;
|
|
28077
28277
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
28278
|
+
(0, import_react25.useEffect)(() => {
|
|
28279
|
+
if (props.value !== void 0) {
|
|
28280
|
+
const e = { target: { value: props.value } };
|
|
28281
|
+
handleChange?.(e);
|
|
28282
|
+
}
|
|
28283
|
+
}, []);
|
|
28078
28284
|
const handleChange = (e) => {
|
|
28079
28285
|
props.onChange?.(e);
|
|
28080
28286
|
};
|
|
28081
|
-
return /* @__PURE__ */ (0,
|
|
28082
|
-
/* @__PURE__ */ (0,
|
|
28287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
|
|
28288
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
28083
28289
|
"div",
|
|
28084
28290
|
{
|
|
28085
28291
|
className: cn(
|
|
@@ -28089,8 +28295,8 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
|
|
|
28089
28295
|
props.errorMessage ? "border-red-500" : ""
|
|
28090
28296
|
),
|
|
28091
28297
|
children: [
|
|
28092
|
-
prepend && /* @__PURE__ */ (0,
|
|
28093
|
-
/* @__PURE__ */ (0,
|
|
28298
|
+
prepend && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "px-3 flex items-center bg-gray-500 text-white h-10 rounded-l-md", children: prepend }),
|
|
28299
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
28094
28300
|
Input,
|
|
28095
28301
|
{
|
|
28096
28302
|
id: props.name || "prepend-input",
|
|
@@ -28112,30 +28318,30 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
|
|
|
28112
28318
|
readOnly: isReadonly
|
|
28113
28319
|
}
|
|
28114
28320
|
),
|
|
28115
|
-
append && /* @__PURE__ */ (0,
|
|
28321
|
+
append && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "px-3 flex items-center bg-gray-500 text-white h-10 rounded-r-md", children: append })
|
|
28116
28322
|
]
|
|
28117
28323
|
}
|
|
28118
28324
|
),
|
|
28119
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
28325
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
28120
28326
|
] });
|
|
28121
28327
|
};
|
|
28122
28328
|
var TextInputGroup_default = TextInputGroup;
|
|
28123
28329
|
|
|
28124
28330
|
// src/components/DataDisplay/Table/Table.tsx
|
|
28125
|
-
var
|
|
28331
|
+
var import_react26 = require("react");
|
|
28126
28332
|
|
|
28127
28333
|
// src/components/ui/data-table.tsx
|
|
28128
28334
|
var import_react_table = require("@tanstack/react-table");
|
|
28129
28335
|
|
|
28130
28336
|
// src/components/ui/table.tsx
|
|
28131
|
-
var
|
|
28337
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
28132
28338
|
function Table3({ className, ...props }) {
|
|
28133
|
-
return /* @__PURE__ */ (0,
|
|
28339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
28134
28340
|
"div",
|
|
28135
28341
|
{
|
|
28136
28342
|
"data-slot": "table-container",
|
|
28137
28343
|
className: "relative w-full overflow-x-auto rounded-md border border-gray-200 bg-white",
|
|
28138
|
-
children: /* @__PURE__ */ (0,
|
|
28344
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
28139
28345
|
"table",
|
|
28140
28346
|
{
|
|
28141
28347
|
"data-slot": "table",
|
|
@@ -28147,7 +28353,7 @@ function Table3({ className, ...props }) {
|
|
|
28147
28353
|
);
|
|
28148
28354
|
}
|
|
28149
28355
|
function TableHeader({ className, ...props }) {
|
|
28150
|
-
return /* @__PURE__ */ (0,
|
|
28356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
28151
28357
|
"thead",
|
|
28152
28358
|
{
|
|
28153
28359
|
"data-slot": "table-header",
|
|
@@ -28160,7 +28366,7 @@ function TableHeader({ className, ...props }) {
|
|
|
28160
28366
|
);
|
|
28161
28367
|
}
|
|
28162
28368
|
function TableBody({ className, ...props }) {
|
|
28163
|
-
return /* @__PURE__ */ (0,
|
|
28369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
28164
28370
|
"tbody",
|
|
28165
28371
|
{
|
|
28166
28372
|
"data-slot": "table-body",
|
|
@@ -28173,7 +28379,7 @@ function TableBody({ className, ...props }) {
|
|
|
28173
28379
|
);
|
|
28174
28380
|
}
|
|
28175
28381
|
function TableRow({ className, ...props }) {
|
|
28176
|
-
return /* @__PURE__ */ (0,
|
|
28382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
28177
28383
|
"tr",
|
|
28178
28384
|
{
|
|
28179
28385
|
"data-slot": "table-row",
|
|
@@ -28186,7 +28392,7 @@ function TableRow({ className, ...props }) {
|
|
|
28186
28392
|
);
|
|
28187
28393
|
}
|
|
28188
28394
|
function TableHead({ className, ...props }) {
|
|
28189
|
-
return /* @__PURE__ */ (0,
|
|
28395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
28190
28396
|
"th",
|
|
28191
28397
|
{
|
|
28192
28398
|
"data-slot": "table-head",
|
|
@@ -28199,7 +28405,7 @@ function TableHead({ className, ...props }) {
|
|
|
28199
28405
|
);
|
|
28200
28406
|
}
|
|
28201
28407
|
function TableCell({ className, ...props }) {
|
|
28202
|
-
return /* @__PURE__ */ (0,
|
|
28408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
28203
28409
|
"td",
|
|
28204
28410
|
{
|
|
28205
28411
|
"data-slot": "table-cell",
|
|
@@ -28213,7 +28419,7 @@ function TableCell({ className, ...props }) {
|
|
|
28213
28419
|
}
|
|
28214
28420
|
|
|
28215
28421
|
// src/components/ui/data-table.tsx
|
|
28216
|
-
var
|
|
28422
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
28217
28423
|
function DataTable({
|
|
28218
28424
|
columns,
|
|
28219
28425
|
rowActions,
|
|
@@ -28238,14 +28444,14 @@ function DataTable({
|
|
|
28238
28444
|
onCellClick(rowData, columnId);
|
|
28239
28445
|
}
|
|
28240
28446
|
};
|
|
28241
|
-
return /* @__PURE__ */ (0,
|
|
28242
|
-
/* @__PURE__ */ (0,
|
|
28243
|
-
return /* @__PURE__ */ (0,
|
|
28447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "overflow-hidden rounded-md border w-full", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Table3, { children: [
|
|
28448
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableRow, { children: headerGroup.headers.map((header) => {
|
|
28449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableHead, { children: header.isPlaceholder ? null : (0, import_react_table.flexRender)(
|
|
28244
28450
|
header.column.columnDef.header,
|
|
28245
28451
|
header.getContext()
|
|
28246
28452
|
) }, header.id);
|
|
28247
28453
|
}) }, headerGroup.id)) }),
|
|
28248
|
-
/* @__PURE__ */ (0,
|
|
28454
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableBody, { children: loading ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "Loading..." }) }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
28249
28455
|
TableRow,
|
|
28250
28456
|
{
|
|
28251
28457
|
"data-state": row.getIsSelected() && "selected",
|
|
@@ -28255,7 +28461,7 @@ function DataTable({
|
|
|
28255
28461
|
const isCellClickable = cellClickEnabled(row.original, cell.column.id);
|
|
28256
28462
|
const dynamicClass = cell.column.columnDef.meta?.cellClass || "";
|
|
28257
28463
|
const dynamicStyle = cell.column.columnDef.meta?.cellStyle || {};
|
|
28258
|
-
return /* @__PURE__ */ (0,
|
|
28464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28259
28465
|
TableCell,
|
|
28260
28466
|
{
|
|
28261
28467
|
className: `${dynamicClass} ${isCellClickable ? "underline cursor-pointer" : ""}`,
|
|
@@ -28270,18 +28476,18 @@ function DataTable({
|
|
|
28270
28476
|
cell.id
|
|
28271
28477
|
);
|
|
28272
28478
|
}),
|
|
28273
|
-
rowActions.length > 0 && /* @__PURE__ */ (0,
|
|
28479
|
+
rowActions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "absolute top-0 right-0 bg-white py-3 min-w-[100px] z-50 shadow-md flex items-center justify-center gap-3 p-2 opacity-0 group-hover:opacity-100 duration-300 h-full", children: rowActions.map((action, index) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-[#383838] text-[12px] cursor-pointer font-[400]", children: action.header }, index)) })
|
|
28274
28480
|
]
|
|
28275
28481
|
},
|
|
28276
28482
|
row.id
|
|
28277
|
-
)) : /* @__PURE__ */ (0,
|
|
28483
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "No results." }) }) }) })
|
|
28278
28484
|
] }) });
|
|
28279
28485
|
}
|
|
28280
28486
|
|
|
28281
28487
|
// src/components/ui/pagination.tsx
|
|
28282
|
-
var
|
|
28488
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
28283
28489
|
function Pagination({ className, ...props }) {
|
|
28284
|
-
return /* @__PURE__ */ (0,
|
|
28490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
28285
28491
|
"nav",
|
|
28286
28492
|
{
|
|
28287
28493
|
role: "navigation",
|
|
@@ -28296,7 +28502,7 @@ function PaginationContent({
|
|
|
28296
28502
|
className,
|
|
28297
28503
|
...props
|
|
28298
28504
|
}) {
|
|
28299
|
-
return /* @__PURE__ */ (0,
|
|
28505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
28300
28506
|
"ul",
|
|
28301
28507
|
{
|
|
28302
28508
|
"data-slot": "pagination-content",
|
|
@@ -28306,7 +28512,7 @@ function PaginationContent({
|
|
|
28306
28512
|
);
|
|
28307
28513
|
}
|
|
28308
28514
|
function PaginationItem({ ...props }) {
|
|
28309
|
-
return /* @__PURE__ */ (0,
|
|
28515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("li", { "data-slot": "pagination-item", ...props });
|
|
28310
28516
|
}
|
|
28311
28517
|
function PaginationLink({
|
|
28312
28518
|
className,
|
|
@@ -28314,7 +28520,7 @@ function PaginationLink({
|
|
|
28314
28520
|
size = "icon",
|
|
28315
28521
|
...props
|
|
28316
28522
|
}) {
|
|
28317
|
-
return /* @__PURE__ */ (0,
|
|
28523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
28318
28524
|
"a",
|
|
28319
28525
|
{
|
|
28320
28526
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -28335,7 +28541,7 @@ function PaginationPrevious({
|
|
|
28335
28541
|
className,
|
|
28336
28542
|
...props
|
|
28337
28543
|
}) {
|
|
28338
|
-
return /* @__PURE__ */ (0,
|
|
28544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
28339
28545
|
PaginationLink,
|
|
28340
28546
|
{
|
|
28341
28547
|
"aria-label": "Go to previous page",
|
|
@@ -28343,8 +28549,8 @@ function PaginationPrevious({
|
|
|
28343
28549
|
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
28344
28550
|
...props,
|
|
28345
28551
|
children: [
|
|
28346
|
-
/* @__PURE__ */ (0,
|
|
28347
|
-
/* @__PURE__ */ (0,
|
|
28552
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ChevronLeft, {}),
|
|
28553
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "hidden sm:block", children: "Previous" })
|
|
28348
28554
|
]
|
|
28349
28555
|
}
|
|
28350
28556
|
);
|
|
@@ -28353,7 +28559,7 @@ function PaginationNext({
|
|
|
28353
28559
|
className,
|
|
28354
28560
|
...props
|
|
28355
28561
|
}) {
|
|
28356
|
-
return /* @__PURE__ */ (0,
|
|
28562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
28357
28563
|
PaginationLink,
|
|
28358
28564
|
{
|
|
28359
28565
|
"aria-label": "Go to next page",
|
|
@@ -28361,8 +28567,8 @@ function PaginationNext({
|
|
|
28361
28567
|
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
28362
28568
|
...props,
|
|
28363
28569
|
children: [
|
|
28364
|
-
/* @__PURE__ */ (0,
|
|
28365
|
-
/* @__PURE__ */ (0,
|
|
28570
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "hidden sm:block", children: "Next" }),
|
|
28571
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ChevronRight, {})
|
|
28366
28572
|
]
|
|
28367
28573
|
}
|
|
28368
28574
|
);
|
|
@@ -28371,7 +28577,7 @@ function PaginationEllipsis({
|
|
|
28371
28577
|
className,
|
|
28372
28578
|
...props
|
|
28373
28579
|
}) {
|
|
28374
|
-
return /* @__PURE__ */ (0,
|
|
28580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
28375
28581
|
"span",
|
|
28376
28582
|
{
|
|
28377
28583
|
"aria-hidden": true,
|
|
@@ -28379,15 +28585,15 @@ function PaginationEllipsis({
|
|
|
28379
28585
|
className: cn("flex size-9 items-center justify-center", className),
|
|
28380
28586
|
...props,
|
|
28381
28587
|
children: [
|
|
28382
|
-
/* @__PURE__ */ (0,
|
|
28383
|
-
/* @__PURE__ */ (0,
|
|
28588
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Ellipsis, { className: "size-4" }),
|
|
28589
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "sr-only", children: "More pages" })
|
|
28384
28590
|
]
|
|
28385
28591
|
}
|
|
28386
28592
|
);
|
|
28387
28593
|
}
|
|
28388
28594
|
|
|
28389
28595
|
// src/components/DataDisplay/Pagination/Pagination.tsx
|
|
28390
|
-
var
|
|
28596
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
28391
28597
|
var CustomPagination = ({
|
|
28392
28598
|
totalPages,
|
|
28393
28599
|
currentPage,
|
|
@@ -28433,10 +28639,10 @@ var CustomPagination = ({
|
|
|
28433
28639
|
}
|
|
28434
28640
|
};
|
|
28435
28641
|
const pageNumbers = getPageNumbers();
|
|
28436
|
-
return /* @__PURE__ */ (0,
|
|
28437
|
-
/* @__PURE__ */ (0,
|
|
28438
|
-
/* @__PURE__ */ (0,
|
|
28439
|
-
/* @__PURE__ */ (0,
|
|
28642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-row gap-1 w-full items-center justify-between", children: [
|
|
28643
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
28644
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-sm text-muted-foreground whitespace-nowrap", children: "Items per page:" }),
|
|
28645
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
28440
28646
|
Select,
|
|
28441
28647
|
{
|
|
28442
28648
|
defaultValue: String(perPage),
|
|
@@ -28444,26 +28650,26 @@ var CustomPagination = ({
|
|
|
28444
28650
|
onPageChange({ page: 1, itemsPerPage: Number(value) });
|
|
28445
28651
|
},
|
|
28446
28652
|
children: [
|
|
28447
|
-
/* @__PURE__ */ (0,
|
|
28448
|
-
/* @__PURE__ */ (0,
|
|
28449
|
-
/* @__PURE__ */ (0,
|
|
28450
|
-
/* @__PURE__ */ (0,
|
|
28451
|
-
/* @__PURE__ */ (0,
|
|
28452
|
-
/* @__PURE__ */ (0,
|
|
28653
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectTrigger, { className: "w-[100px]", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectValue, { placeholder: "Select" }) }),
|
|
28654
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(SelectContent, { children: [
|
|
28655
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectItem, { value: "5", children: "5" }),
|
|
28656
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectItem, { value: "10", children: "10" }),
|
|
28657
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectItem, { value: "20", children: "20" }),
|
|
28658
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectItem, { value: "50", children: "50" })
|
|
28453
28659
|
] })
|
|
28454
28660
|
]
|
|
28455
28661
|
}
|
|
28456
28662
|
)
|
|
28457
28663
|
] }),
|
|
28458
|
-
/* @__PURE__ */ (0,
|
|
28459
|
-
/* @__PURE__ */ (0,
|
|
28664
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Pagination, { className: "justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(PaginationContent, { children: [
|
|
28665
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
28460
28666
|
PaginationPrevious,
|
|
28461
28667
|
{
|
|
28462
28668
|
onClick: () => handlePageChange(currentPage - 1),
|
|
28463
28669
|
className: currentPage === 1 ? "pointer-events-none opacity-50" : "cursor-pointer"
|
|
28464
28670
|
}
|
|
28465
28671
|
) }),
|
|
28466
|
-
pageNumbers.map((pageNumber, index) => /* @__PURE__ */ (0,
|
|
28672
|
+
pageNumbers.map((pageNumber, index) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PaginationItem, { children: pageNumber === "..." ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PaginationEllipsis, {}) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
28467
28673
|
PaginationLink,
|
|
28468
28674
|
{
|
|
28469
28675
|
onClick: () => handlePageChange(pageNumber),
|
|
@@ -28472,7 +28678,7 @@ var CustomPagination = ({
|
|
|
28472
28678
|
children: pageNumber
|
|
28473
28679
|
}
|
|
28474
28680
|
) }, index)),
|
|
28475
|
-
/* @__PURE__ */ (0,
|
|
28681
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
28476
28682
|
PaginationNext,
|
|
28477
28683
|
{
|
|
28478
28684
|
onClick: () => handlePageChange(currentPage + 1),
|
|
@@ -28485,7 +28691,7 @@ var CustomPagination = ({
|
|
|
28485
28691
|
var Pagination_default = CustomPagination;
|
|
28486
28692
|
|
|
28487
28693
|
// src/components/DataDisplay/Table/Table.tsx
|
|
28488
|
-
var
|
|
28694
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
28489
28695
|
var Table4 = ({
|
|
28490
28696
|
columns,
|
|
28491
28697
|
data,
|
|
@@ -28505,9 +28711,9 @@ var Table4 = ({
|
|
|
28505
28711
|
const rawData = Array.isArray(data) ? data : [];
|
|
28506
28712
|
const rawRowActions = Array.isArray(rowActions) ? rowActions : [];
|
|
28507
28713
|
const isControlled = typeof page === "number";
|
|
28508
|
-
const [internalPage, setInternalPage] = (0,
|
|
28714
|
+
const [internalPage, setInternalPage] = (0, import_react26.useState)(1);
|
|
28509
28715
|
const currentPage = isControlled ? page : internalPage;
|
|
28510
|
-
(0,
|
|
28716
|
+
(0, import_react26.useEffect)(() => {
|
|
28511
28717
|
if (isControlled) return;
|
|
28512
28718
|
if (currentPage > 1 && !pagination) setInternalPage(1);
|
|
28513
28719
|
}, [pagination, isControlled]);
|
|
@@ -28531,8 +28737,8 @@ var Table4 = ({
|
|
|
28531
28737
|
if (!selectedColumn) return false;
|
|
28532
28738
|
return selectedColumn.isClickable ?? false;
|
|
28533
28739
|
};
|
|
28534
|
-
return /* @__PURE__ */ (0,
|
|
28535
|
-
/* @__PURE__ */ (0,
|
|
28740
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: `${className || ""} space-y-3`, style, children: [
|
|
28741
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
28536
28742
|
DataTable,
|
|
28537
28743
|
{
|
|
28538
28744
|
...props,
|
|
@@ -28543,7 +28749,7 @@ var Table4 = ({
|
|
|
28543
28749
|
cellClickEnabled: isCellClickEnabled
|
|
28544
28750
|
}
|
|
28545
28751
|
),
|
|
28546
|
-
enablePagination && /* @__PURE__ */ (0,
|
|
28752
|
+
enablePagination && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
28547
28753
|
Pagination_default,
|
|
28548
28754
|
{
|
|
28549
28755
|
perPage: itemsPerPage,
|
|
@@ -28558,7 +28764,7 @@ var Table_default = Table4;
|
|
|
28558
28764
|
|
|
28559
28765
|
// src/components/Navigation/Tabs/Tabs.tsx
|
|
28560
28766
|
var import_link5 = __toESM(require("next/link"));
|
|
28561
|
-
var
|
|
28767
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
28562
28768
|
var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode }) => {
|
|
28563
28769
|
const rawTabs = Array.isArray(tabs) ? tabs : [];
|
|
28564
28770
|
const baseClasses = "text-[12px] text-foreground p-2 text-center rounded-md transition-colors";
|
|
@@ -28571,23 +28777,23 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode }) => {
|
|
|
28571
28777
|
const renderDesktopTab = (tab, index) => {
|
|
28572
28778
|
const finalClasses = [baseClasses, isActive(tab.url) ? activeClasses : hoverClasses, tab.className || ""].join(" ");
|
|
28573
28779
|
if (Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown) {
|
|
28574
|
-
return /* @__PURE__ */ (0,
|
|
28575
|
-
/* @__PURE__ */ (0,
|
|
28780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DropdownMenu, { children: [
|
|
28781
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DropdownMenuTrigger, { className: `${finalClasses} inline-flex items-center gap-1`, children: [
|
|
28576
28782
|
tab.header,
|
|
28577
|
-
/* @__PURE__ */ (0,
|
|
28783
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ChevronDown, { className: "h-4 w-4 opacity-80" })
|
|
28578
28784
|
] }),
|
|
28579
|
-
/* @__PURE__ */ (0,
|
|
28785
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
28580
28786
|
DropdownMenuContent,
|
|
28581
28787
|
{
|
|
28582
28788
|
align: "start",
|
|
28583
28789
|
sideOffset: 6,
|
|
28584
28790
|
className: "z-50 min-w-[160px] rounded-md border border-gray-200 bg-white p-1 shadow-lg",
|
|
28585
|
-
children: tab.children.map((item) => /* @__PURE__ */ (0,
|
|
28791
|
+
children: tab.children.map((item) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
28586
28792
|
DropdownMenuItem,
|
|
28587
28793
|
{
|
|
28588
28794
|
asChild: true,
|
|
28589
28795
|
className: "cursor-pointer rounded-sm px-3 py-2 text-[12px] text-gray-800 hover:bg-gray-100 focus:bg-gray-100",
|
|
28590
|
-
children: /* @__PURE__ */ (0,
|
|
28796
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_link5.default, { href: item.url || "#", children: item.header })
|
|
28591
28797
|
},
|
|
28592
28798
|
item.id
|
|
28593
28799
|
))
|
|
@@ -28595,14 +28801,14 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode }) => {
|
|
|
28595
28801
|
)
|
|
28596
28802
|
] }, index);
|
|
28597
28803
|
}
|
|
28598
|
-
return tab.url ? /* @__PURE__ */ (0,
|
|
28804
|
+
return tab.url ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_link5.default, { href: tab.url, className: finalClasses, style: tab.style, children: tab.header }, index) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: finalClasses, style: tab.style, role: "button", tabIndex: 0, children: tab.header }, index);
|
|
28599
28805
|
};
|
|
28600
|
-
const renderMobileMenu = () => /* @__PURE__ */ (0,
|
|
28601
|
-
/* @__PURE__ */ (0,
|
|
28602
|
-
/* @__PURE__ */ (0,
|
|
28806
|
+
const renderMobileMenu = () => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DropdownMenu, { children: [
|
|
28807
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DropdownMenuTrigger, { className: "flex items-center gap-2 px-3 py-2 rounded-md bg-white/10 text-white text-sm", children: [
|
|
28808
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Menu, { className: "h-4 w-4" }),
|
|
28603
28809
|
"Menu"
|
|
28604
28810
|
] }),
|
|
28605
|
-
/* @__PURE__ */ (0,
|
|
28811
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
28606
28812
|
DropdownMenuContent,
|
|
28607
28813
|
{
|
|
28608
28814
|
align: "start",
|
|
@@ -28611,25 +28817,25 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode }) => {
|
|
|
28611
28817
|
children: rawTabs.map((tab, i) => {
|
|
28612
28818
|
const hasChildren = Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown;
|
|
28613
28819
|
if (hasChildren) {
|
|
28614
|
-
return /* @__PURE__ */ (0,
|
|
28615
|
-
/* @__PURE__ */ (0,
|
|
28616
|
-
/* @__PURE__ */ (0,
|
|
28820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DropdownMenuSub, { children: [
|
|
28821
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(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 }),
|
|
28822
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DropdownMenuSubContent, { className: "bg-white border shadow-lg rounded-md p-1", children: tab.children.map((item) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
28617
28823
|
DropdownMenuItem,
|
|
28618
28824
|
{
|
|
28619
28825
|
asChild: true,
|
|
28620
28826
|
className: "cursor-pointer rounded-sm px-3 py-2 text-[12px] text-gray-800 hover:bg-gray-100",
|
|
28621
|
-
children: /* @__PURE__ */ (0,
|
|
28827
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_link5.default, { href: item.url || "#", children: item.header })
|
|
28622
28828
|
},
|
|
28623
28829
|
item.id
|
|
28624
28830
|
)) })
|
|
28625
28831
|
] }, i);
|
|
28626
28832
|
}
|
|
28627
|
-
return /* @__PURE__ */ (0,
|
|
28833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
28628
28834
|
DropdownMenuItem,
|
|
28629
28835
|
{
|
|
28630
28836
|
asChild: true,
|
|
28631
28837
|
className: "cursor-pointer rounded-sm px-3 py-2 text-[13px] text-gray-800 hover:bg-gray-100",
|
|
28632
|
-
children: /* @__PURE__ */ (0,
|
|
28838
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_link5.default, { href: tab.url || "#", children: tab.header })
|
|
28633
28839
|
},
|
|
28634
28840
|
i
|
|
28635
28841
|
);
|
|
@@ -28639,56 +28845,56 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode }) => {
|
|
|
28639
28845
|
] });
|
|
28640
28846
|
const forceMobile = canvasMode === "mobile" || canvasMode === "tablet";
|
|
28641
28847
|
const forceDesktop = canvasMode === "desktop";
|
|
28642
|
-
return /* @__PURE__ */ (0,
|
|
28643
|
-
forceDesktop && /* @__PURE__ */ (0,
|
|
28644
|
-
forceMobile && /* @__PURE__ */ (0,
|
|
28645
|
-
/* @__PURE__ */ (0,
|
|
28848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className, style, children: [
|
|
28849
|
+
forceDesktop && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "hidden md:flex", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }),
|
|
28850
|
+
forceMobile && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { children: renderMobileMenu() }),
|
|
28851
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "md:hidden", children: renderMobileMenu() })
|
|
28646
28852
|
] });
|
|
28647
28853
|
};
|
|
28648
28854
|
var Tabs_default = Tabs;
|
|
28649
28855
|
|
|
28650
28856
|
// src/components/Navigation/Stages/Stages.tsx
|
|
28651
|
-
var
|
|
28652
|
-
var
|
|
28857
|
+
var import_react27 = __toESM(require("react"));
|
|
28858
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
28653
28859
|
var StagesComponent = ({ stages, isShowBtn, buttonText, className, style }) => {
|
|
28654
|
-
return /* @__PURE__ */ (0,
|
|
28655
|
-
/* @__PURE__ */ (0,
|
|
28656
|
-
/* @__PURE__ */ (0,
|
|
28657
|
-
/* @__PURE__ */ (0,
|
|
28860
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-center justify-between bg-red p-2 rounded-lg border border-gray-200 w-full", children: [
|
|
28861
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { className: "p-2 hover:bg-gray-100 rounded", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
|
|
28862
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex items-center flex-1 px-2 flex-wrap gap-2", children: stages?.length > 0 && stages?.map((stage, index) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_react27.default.Fragment, { children: [
|
|
28863
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
28658
28864
|
"button",
|
|
28659
28865
|
{
|
|
28660
28866
|
className: `min-w-[120px] px-4 py-2 rounded-full text-sm font-medium transition-colors duration-200 whitespace-nowrap ${stage.isActive ? "bg-[#034486] text-white shadow-md" : "bg-white text-gray-700 hover:bg-gray-100 border border-gray-200"}`,
|
|
28661
28867
|
children: stage.header
|
|
28662
28868
|
}
|
|
28663
28869
|
),
|
|
28664
|
-
index < stages.length - 1 && /* @__PURE__ */ (0,
|
|
28870
|
+
index < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex-shrink-0 w-3 h-px bg-gray-300" })
|
|
28665
28871
|
] }, stage.id)) }),
|
|
28666
|
-
isShowBtn && /* @__PURE__ */ (0,
|
|
28872
|
+
isShowBtn && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { className: "bg-[#034486] text-white px-6 py-2 rounded-lg text-sm font-medium transition-colors duration-200 shadow-sm", children: buttonText }) })
|
|
28667
28873
|
] }) });
|
|
28668
28874
|
};
|
|
28669
28875
|
var Stages_default = StagesComponent;
|
|
28670
28876
|
|
|
28671
28877
|
// src/components/Navigation/Spacer/Spacer.tsx
|
|
28672
|
-
var
|
|
28878
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
28673
28879
|
var Spacer = ({ className, style }) => {
|
|
28674
|
-
return /* @__PURE__ */ (0,
|
|
28880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: `${className}`, style });
|
|
28675
28881
|
};
|
|
28676
28882
|
var Spacer_default = Spacer;
|
|
28677
28883
|
|
|
28678
28884
|
// src/components/Navigation/Profile/Profile.tsx
|
|
28679
|
-
var
|
|
28885
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
28680
28886
|
|
|
28681
28887
|
// src/components/Navigation/Notification/Notification.tsx
|
|
28682
|
-
var
|
|
28888
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
28683
28889
|
|
|
28684
28890
|
// src/components/Navigation/Logo/Logo.tsx
|
|
28685
|
-
var
|
|
28891
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
28686
28892
|
|
|
28687
28893
|
// src/components/ui/avatar.tsx
|
|
28688
|
-
var
|
|
28894
|
+
var React7 = __toESM(require("react"));
|
|
28689
28895
|
var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"));
|
|
28690
|
-
var
|
|
28691
|
-
var Avatar =
|
|
28896
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
28897
|
+
var Avatar = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
28692
28898
|
AvatarPrimitive.Root,
|
|
28693
28899
|
{
|
|
28694
28900
|
ref,
|
|
@@ -28700,7 +28906,7 @@ var Avatar = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
28700
28906
|
}
|
|
28701
28907
|
));
|
|
28702
28908
|
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
28703
|
-
var AvatarImage =
|
|
28909
|
+
var AvatarImage = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
28704
28910
|
AvatarPrimitive.Image,
|
|
28705
28911
|
{
|
|
28706
28912
|
ref,
|
|
@@ -28709,7 +28915,7 @@ var AvatarImage = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
28709
28915
|
}
|
|
28710
28916
|
));
|
|
28711
28917
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
28712
|
-
var AvatarFallback =
|
|
28918
|
+
var AvatarFallback = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
28713
28919
|
AvatarPrimitive.Fallback,
|
|
28714
28920
|
{
|
|
28715
28921
|
ref,
|
|
@@ -28725,7 +28931,8 @@ AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
|
28725
28931
|
// src/components/Navigation/Navbar/Navbar.tsx
|
|
28726
28932
|
var import_link6 = __toESM(require("next/link"));
|
|
28727
28933
|
var import_image3 = __toESM(require("next/image"));
|
|
28728
|
-
var
|
|
28934
|
+
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
28935
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
28729
28936
|
function Navbar({
|
|
28730
28937
|
style,
|
|
28731
28938
|
badgeType,
|
|
@@ -28737,12 +28944,13 @@ function Navbar({
|
|
|
28737
28944
|
altText = "Logo",
|
|
28738
28945
|
canvasMode = "desktop",
|
|
28739
28946
|
list = [],
|
|
28947
|
+
profileMenu = [],
|
|
28740
28948
|
userName = "Guest User"
|
|
28741
28949
|
}) {
|
|
28742
28950
|
const isMobileView = canvasMode === "mobile" || canvasMode === "tablet";
|
|
28743
|
-
return /* @__PURE__ */ (0,
|
|
28744
|
-
/* @__PURE__ */ (0,
|
|
28745
|
-
!isMobileView && /* @__PURE__ */ (0,
|
|
28951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("nav", { className: "w-full border-b bg-white shadow-sm", style, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "mx-auto flex max-w-7xl items-center justify-between px-4 py-4", children: [
|
|
28952
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_link6.default, { href: "/", className: "flex items-center space-x-2", children: imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_image3.default, { src: imageUrl, alt: altText, width: 200, height: 200 }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "font-semibold text-blue-700", children: "Logo" }) }),
|
|
28953
|
+
!isMobileView && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex items-center space-x-6 sm:hidden md:flex", children: list.map((item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
28746
28954
|
import_link6.default,
|
|
28747
28955
|
{
|
|
28748
28956
|
href: item.url || "#",
|
|
@@ -28751,54 +28959,60 @@ function Navbar({
|
|
|
28751
28959
|
},
|
|
28752
28960
|
item.id
|
|
28753
28961
|
)) }),
|
|
28754
|
-
/* @__PURE__ */ (0,
|
|
28755
|
-
!isMobileView ? /* @__PURE__ */ (0,
|
|
28756
|
-
/* @__PURE__ */ (0,
|
|
28757
|
-
/* @__PURE__ */ (0,
|
|
28758
|
-
] }) }) : /* @__PURE__ */ (0,
|
|
28962
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center space-x-3", children: [
|
|
28963
|
+
!isMobileView ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex-1 px-6", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "relative w-full max-w-md border border-gray-300 rounded-md", children: [
|
|
28964
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }),
|
|
28965
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Input, { placeholder: "Search", className: "pl-9 text-gray-400" })
|
|
28966
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
28759
28967
|
Button,
|
|
28760
28968
|
{
|
|
28761
28969
|
variant: "ghost",
|
|
28762
28970
|
size: "icon",
|
|
28763
28971
|
className: "border border-gray-400",
|
|
28764
|
-
children: /* @__PURE__ */ (0,
|
|
28972
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Search, { className: "h-5 w-5 text-gray-400" })
|
|
28765
28973
|
}
|
|
28766
28974
|
),
|
|
28767
|
-
/* @__PURE__ */ (0,
|
|
28768
|
-
/* @__PURE__ */ (0,
|
|
28769
|
-
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */ (0,
|
|
28975
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "relative bg-[#E9E9E9] rounded-md", children: [
|
|
28976
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Bell, { className: "h-5 w-5 text-[#1C1B1F]" }) }),
|
|
28977
|
+
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("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__ */ (0, import_jsx_runtime58.jsx)("span", { className: "absolute -top-1 -right-1 flex h-2 w-2 items-center justify-center rounded-full bg-red-500" })
|
|
28770
28978
|
] }),
|
|
28771
|
-
/* @__PURE__ */ (0,
|
|
28772
|
-
/* @__PURE__ */ (0,
|
|
28773
|
-
!isMobileView && showName && /* @__PURE__ */ (0,
|
|
28774
|
-
!isMobileView ? /* @__PURE__ */ (0,
|
|
28775
|
-
/* @__PURE__ */ (0,
|
|
28979
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(DropdownMenu, { children: [
|
|
28980
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
28981
|
+
!isMobileView && showName && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h4", { className: "text-[#000000] text-[13px] font-[500] mb-0", children: userName }),
|
|
28982
|
+
!isMobileView ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
|
|
28983
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Avatar, { className: "cursor-pointer h-8 w-8 text-gray-900", children: profileType === "avatar" ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
28776
28984
|
AvatarImage,
|
|
28777
28985
|
{
|
|
28778
28986
|
src: "/images/appbuilder/toolset/profile.svg",
|
|
28779
28987
|
alt: "Profile"
|
|
28780
28988
|
}
|
|
28781
|
-
) : /* @__PURE__ */ (0,
|
|
28782
|
-
/* @__PURE__ */ (0,
|
|
28989
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("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) }) }),
|
|
28990
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
28783
28991
|
Button,
|
|
28784
28992
|
{
|
|
28785
28993
|
variant: "ghost",
|
|
28786
28994
|
size: "icon",
|
|
28787
28995
|
className: "text-gray-900 md:hidden",
|
|
28788
|
-
children: /* @__PURE__ */ (0,
|
|
28996
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Menu, { className: "h-6 w-6" })
|
|
28789
28997
|
}
|
|
28790
28998
|
)
|
|
28791
|
-
] }) : /* @__PURE__ */ (0,
|
|
28999
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
28792
29000
|
Button,
|
|
28793
29001
|
{
|
|
28794
29002
|
variant: "ghost",
|
|
28795
29003
|
size: "icon",
|
|
28796
29004
|
className: "text-gray-900",
|
|
28797
|
-
children: /* @__PURE__ */ (0,
|
|
29005
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Menu, { className: "h-6 w-6" })
|
|
28798
29006
|
}
|
|
28799
29007
|
)
|
|
28800
29008
|
] }) }),
|
|
28801
|
-
/* @__PURE__ */ (0,
|
|
29009
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(DropdownMenuContent, { align: "end", className: "bg-white", children: [
|
|
29010
|
+
profileMenu && profileMenu.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: profileMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DropdownMenuItem, { className: "text-black", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_link6.default, { href: item.url || "#", children: item.header }) }, item.id)) }),
|
|
29011
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "md:hidden", children: [
|
|
29012
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react_dropdown_menu.DropdownMenuSeparator, {}),
|
|
29013
|
+
list && list.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: list.map((item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DropdownMenuItem, { className: "text-black", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_link6.default, { href: item.url || "#", children: item.header }) }, item.id)) })
|
|
29014
|
+
] })
|
|
29015
|
+
] })
|
|
28802
29016
|
] })
|
|
28803
29017
|
] })
|
|
28804
29018
|
] }) });
|
|
@@ -28806,28 +29020,28 @@ function Navbar({
|
|
|
28806
29020
|
|
|
28807
29021
|
// src/components/Chart/BarChart.tsx
|
|
28808
29022
|
var import_recharts = require("recharts");
|
|
28809
|
-
var
|
|
29023
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
28810
29024
|
var ChartComponent = ({ className, style, ...props }) => {
|
|
28811
29025
|
const data = Array.isArray(props?.data) ? props.data : [];
|
|
28812
29026
|
const chartType = props.chartType || "bar";
|
|
28813
29027
|
const legendsPosition = props.legendsPosition === "middle" || props.legendsPosition === "bottom" ? props.legendsPosition : "top";
|
|
28814
|
-
return /* @__PURE__ */ (0,
|
|
28815
|
-
/* @__PURE__ */ (0,
|
|
28816
|
-
/* @__PURE__ */ (0,
|
|
28817
|
-
/* @__PURE__ */ (0,
|
|
28818
|
-
/* @__PURE__ */ (0,
|
|
28819
|
-
/* @__PURE__ */ (0,
|
|
28820
|
-
/* @__PURE__ */ (0,
|
|
28821
|
-
] }) : /* @__PURE__ */ (0,
|
|
28822
|
-
/* @__PURE__ */ (0,
|
|
28823
|
-
/* @__PURE__ */ (0,
|
|
28824
|
-
/* @__PURE__ */ (0,
|
|
29028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: `${className} h-[400px]`, style, children: data.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.ResponsiveContainer, { width: "100%", height: "100%", children: chartType === "bar" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_recharts.BarChart, { data, children: [
|
|
29029
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3" }),
|
|
29030
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.XAxis, { dataKey: "name" }),
|
|
29031
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.YAxis, {}),
|
|
29032
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.Tooltip, {}),
|
|
29033
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.Legend, { verticalAlign: legendsPosition, align: "center" }),
|
|
29034
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.Bar, { dataKey: "value", fill: "#00695C" })
|
|
29035
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_recharts.AreaChart, { data, children: [
|
|
29036
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("linearGradient", { id: "colorCount", x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
29037
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
|
|
29038
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
|
|
28825
29039
|
] }) }),
|
|
28826
|
-
/* @__PURE__ */ (0,
|
|
28827
|
-
/* @__PURE__ */ (0,
|
|
28828
|
-
/* @__PURE__ */ (0,
|
|
28829
|
-
/* @__PURE__ */ (0,
|
|
28830
|
-
/* @__PURE__ */ (0,
|
|
29040
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3" }),
|
|
29041
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.XAxis, { dataKey: "name" }),
|
|
29042
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.YAxis, {}),
|
|
29043
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.Tooltip, {}),
|
|
29044
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
28831
29045
|
import_recharts.Area,
|
|
28832
29046
|
{
|
|
28833
29047
|
type: "monotone",
|
|
@@ -28843,7 +29057,7 @@ var BarChart_default = ChartComponent;
|
|
|
28843
29057
|
|
|
28844
29058
|
// src/components/Chart/PieChart.tsx
|
|
28845
29059
|
var import_recharts2 = require("recharts");
|
|
28846
|
-
var
|
|
29060
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
28847
29061
|
var DonutChart = ({ className, style, ...props }) => {
|
|
28848
29062
|
const data = Array.isArray(props?.data) ? props.data : [];
|
|
28849
29063
|
const total = data.reduce((sum, d) => sum + d.value, 0);
|
|
@@ -28854,7 +29068,7 @@ var DonutChart = ({ className, style, ...props }) => {
|
|
|
28854
29068
|
const renderLabel = ({ value, x, y }) => {
|
|
28855
29069
|
if (value == null) return null;
|
|
28856
29070
|
const percentage = (Number(value) / total * 100).toFixed(0);
|
|
28857
|
-
return /* @__PURE__ */ (0,
|
|
29071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
28858
29072
|
"text",
|
|
28859
29073
|
{
|
|
28860
29074
|
x,
|
|
@@ -28876,33 +29090,33 @@ var DonutChart = ({ className, style, ...props }) => {
|
|
|
28876
29090
|
const wrapperClass = canvasMode ? forceDesktop ? "flex-row" : "flex-col" : "flex-col md:flex-row";
|
|
28877
29091
|
const renderLegends = () => {
|
|
28878
29092
|
if (!showLegends) return null;
|
|
28879
|
-
return /* @__PURE__ */ (0,
|
|
29093
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_jsx_runtime60.Fragment, { children: data.map((d) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
28880
29094
|
"div",
|
|
28881
29095
|
{
|
|
28882
29096
|
className: "flex items-center space-x-2 rounded-md border border-gray-200 px-3 py-2 w-[48%] md:w-auto",
|
|
28883
29097
|
children: [
|
|
28884
|
-
/* @__PURE__ */ (0,
|
|
29098
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
28885
29099
|
"span",
|
|
28886
29100
|
{
|
|
28887
29101
|
className: "inline-block w-[16px] h-[16px] rounded",
|
|
28888
29102
|
style: { backgroundColor: d.color }
|
|
28889
29103
|
}
|
|
28890
29104
|
),
|
|
28891
|
-
/* @__PURE__ */ (0,
|
|
29105
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "text-[#000000] text-[12px] md:text-[13px] font-[500]", children: d.name })
|
|
28892
29106
|
]
|
|
28893
29107
|
},
|
|
28894
29108
|
d.name
|
|
28895
29109
|
)) });
|
|
28896
29110
|
};
|
|
28897
|
-
return /* @__PURE__ */ (0,
|
|
29111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
28898
29112
|
"div",
|
|
28899
29113
|
{
|
|
28900
29114
|
className: `relative flex items-center ${wrapperClass} ${className}`,
|
|
28901
29115
|
style,
|
|
28902
29116
|
children: [
|
|
28903
|
-
/* @__PURE__ */ (0,
|
|
28904
|
-
data.length > 0 && /* @__PURE__ */ (0,
|
|
28905
|
-
/* @__PURE__ */ (0,
|
|
29117
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "relative w-full md:w-[70%] h-[300px] md:h-[400px] flex items-center justify-center", children: [
|
|
29118
|
+
data.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts2.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_recharts2.PieChart, { children: [
|
|
29119
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
28906
29120
|
import_recharts2.Pie,
|
|
28907
29121
|
{
|
|
28908
29122
|
data,
|
|
@@ -28914,8 +29128,8 @@ var DonutChart = ({ className, style, ...props }) => {
|
|
|
28914
29128
|
labelLine: false,
|
|
28915
29129
|
isAnimationActive: false,
|
|
28916
29130
|
children: [
|
|
28917
|
-
data.map((entry, index) => /* @__PURE__ */ (0,
|
|
28918
|
-
/* @__PURE__ */ (0,
|
|
29131
|
+
data.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts2.Cell, { fill: entry.color }, `cell-${index}`)),
|
|
29132
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
28919
29133
|
import_recharts2.LabelList,
|
|
28920
29134
|
{
|
|
28921
29135
|
dataKey: "value",
|
|
@@ -28926,14 +29140,14 @@ var DonutChart = ({ className, style, ...props }) => {
|
|
|
28926
29140
|
]
|
|
28927
29141
|
}
|
|
28928
29142
|
),
|
|
28929
|
-
/* @__PURE__ */ (0,
|
|
29143
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts2.Tooltip, { formatter: (value, name) => [`${value}k`, name] })
|
|
28930
29144
|
] }) }),
|
|
28931
|
-
/* @__PURE__ */ (0,
|
|
29145
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-2xl md:text-4xl font-bold text-[#000]", children: [
|
|
28932
29146
|
total,
|
|
28933
29147
|
"k"
|
|
28934
29148
|
] })
|
|
28935
29149
|
] }),
|
|
28936
|
-
/* @__PURE__ */ (0,
|
|
29150
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: `flex ${forceDesktop ? "flex-col ml-auto space-y-3" : "flex-wrap justify-center gap-2 mt-4"}
|
|
28937
29151
|
w-full md:w-auto`, children: renderLegends() })
|
|
28938
29152
|
]
|
|
28939
29153
|
}
|
|
@@ -28942,10 +29156,10 @@ var DonutChart = ({ className, style, ...props }) => {
|
|
|
28942
29156
|
var PieChart_default = DonutChart;
|
|
28943
29157
|
|
|
28944
29158
|
// src/components/Blocks/EmailComposer.tsx
|
|
28945
|
-
var
|
|
29159
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
28946
29160
|
function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc, setShowBcc, cc, setCc, bcc, setBcc, subject, setSubject, body, setBody }) {
|
|
28947
|
-
return /* @__PURE__ */ (0,
|
|
28948
|
-
/* @__PURE__ */ (0,
|
|
29161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "border rounded-md shadow bg-[#fff] p-4 mx-auto z-[50] relative", children: [
|
|
29162
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
28949
29163
|
"input",
|
|
28950
29164
|
{
|
|
28951
29165
|
type: "email",
|
|
@@ -28954,8 +29168,8 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
28954
29168
|
required: true
|
|
28955
29169
|
}
|
|
28956
29170
|
) }),
|
|
28957
|
-
/* @__PURE__ */ (0,
|
|
28958
|
-
/* @__PURE__ */ (0,
|
|
29171
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
29172
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
28959
29173
|
"input",
|
|
28960
29174
|
{
|
|
28961
29175
|
type: "email",
|
|
@@ -28966,7 +29180,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
28966
29180
|
required: true
|
|
28967
29181
|
}
|
|
28968
29182
|
),
|
|
28969
|
-
!showCc && /* @__PURE__ */ (0,
|
|
29183
|
+
!showCc && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
28970
29184
|
"button",
|
|
28971
29185
|
{
|
|
28972
29186
|
onClick: () => setShowCc?.(true),
|
|
@@ -28974,7 +29188,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
28974
29188
|
children: "Cc"
|
|
28975
29189
|
}
|
|
28976
29190
|
),
|
|
28977
|
-
!showBcc && /* @__PURE__ */ (0,
|
|
29191
|
+
!showBcc && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
28978
29192
|
"button",
|
|
28979
29193
|
{
|
|
28980
29194
|
onClick: () => setShowBcc?.(true),
|
|
@@ -28983,7 +29197,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
28983
29197
|
}
|
|
28984
29198
|
)
|
|
28985
29199
|
] }) }),
|
|
28986
|
-
showCc && /* @__PURE__ */ (0,
|
|
29200
|
+
showCc && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
28987
29201
|
"input",
|
|
28988
29202
|
{
|
|
28989
29203
|
type: "text",
|
|
@@ -28993,7 +29207,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
28993
29207
|
className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
|
|
28994
29208
|
}
|
|
28995
29209
|
) }),
|
|
28996
|
-
showBcc && /* @__PURE__ */ (0,
|
|
29210
|
+
showBcc && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
28997
29211
|
"input",
|
|
28998
29212
|
{
|
|
28999
29213
|
type: "text",
|
|
@@ -29003,7 +29217,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
29003
29217
|
className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
|
|
29004
29218
|
}
|
|
29005
29219
|
) }),
|
|
29006
|
-
/* @__PURE__ */ (0,
|
|
29220
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
29007
29221
|
"input",
|
|
29008
29222
|
{
|
|
29009
29223
|
type: "text",
|
|
@@ -29013,11 +29227,11 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
29013
29227
|
className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
|
|
29014
29228
|
}
|
|
29015
29229
|
) }),
|
|
29016
|
-
/* @__PURE__ */ (0,
|
|
29017
|
-
/* @__PURE__ */ (0,
|
|
29018
|
-
/* @__PURE__ */ (0,
|
|
29019
|
-
/* @__PURE__ */ (0,
|
|
29020
|
-
/* @__PURE__ */ (0,
|
|
29230
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(MyEditor, { value: body, onChange: setBody }) }),
|
|
29231
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex justify-end gap-2", children: [
|
|
29232
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
|
|
29233
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
|
|
29234
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
|
|
29021
29235
|
] })
|
|
29022
29236
|
] }) });
|
|
29023
29237
|
}
|
|
@@ -29094,6 +29308,8 @@ function showSonnerToast({
|
|
|
29094
29308
|
Spacer,
|
|
29095
29309
|
Stages,
|
|
29096
29310
|
SwitchToggle,
|
|
29311
|
+
TabGroup,
|
|
29312
|
+
TabList,
|
|
29097
29313
|
Table,
|
|
29098
29314
|
Tabs,
|
|
29099
29315
|
Text,
|