warqadui 0.0.20 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +20 -15
- package/dist/index.mjs +20 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1156,7 +1156,7 @@ var Input = (0, import_react8.forwardRef)(
|
|
|
1156
1156
|
const renderInput = (inputProps, localType = type || "text") => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1157
1157
|
"div",
|
|
1158
1158
|
{
|
|
1159
|
-
className: `${label ? "space-y-2" : ""} group
|
|
1159
|
+
className: `${label ? "space-y-2" : ""} group relative ${containerClassName} `,
|
|
1160
1160
|
children: [
|
|
1161
1161
|
label && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1162
1162
|
"label",
|
|
@@ -1316,7 +1316,7 @@ var PhoneInput = (0, import_react9.forwardRef)(
|
|
|
1316
1316
|
}
|
|
1317
1317
|
message = currentError?.message || message;
|
|
1318
1318
|
}
|
|
1319
|
-
const renderInput = (onChangeHandler, currentValue) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: `space-y-2 group ${containerClassName}`, children: [
|
|
1319
|
+
const renderInput = (onChangeHandler, currentValue) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: `space-y-2 group relative ${containerClassName}`, children: [
|
|
1320
1320
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1321
1321
|
"label",
|
|
1322
1322
|
{
|
|
@@ -1536,7 +1536,7 @@ var SelectRoot = ({
|
|
|
1536
1536
|
"div",
|
|
1537
1537
|
{
|
|
1538
1538
|
ref: containerRef,
|
|
1539
|
-
className: `${label ? "space-y-2" : ""} group ${containerClassName}`,
|
|
1539
|
+
className: `${label ? "space-y-2" : ""} group relative ${containerClassName}`,
|
|
1540
1540
|
children: [
|
|
1541
1541
|
label && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1542
1542
|
"label",
|
|
@@ -1813,7 +1813,7 @@ var Textarea = (0, import_react11.forwardRef)(
|
|
|
1813
1813
|
const errorObj = name.split(".").reduce((acc, current) => acc?.[current], errors);
|
|
1814
1814
|
message = errorObj?.message;
|
|
1815
1815
|
}
|
|
1816
|
-
const renderInput = (inputProps, ref2) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: `space-y-2 group w-full! ${containerClassName}`, children: [
|
|
1816
|
+
const renderInput = (inputProps, ref2) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: `space-y-2 group w-full! relative ${containerClassName}`, children: [
|
|
1817
1817
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1818
1818
|
"label",
|
|
1819
1819
|
{
|
|
@@ -2348,7 +2348,7 @@ var SearchApiRoot = ({
|
|
|
2348
2348
|
"div",
|
|
2349
2349
|
{
|
|
2350
2350
|
ref: containerRef,
|
|
2351
|
-
className: `${label ? "space-y-2" : ""} group ${containerClassName}`,
|
|
2351
|
+
className: `${label ? "space-y-2" : ""} group relative ${containerClassName}`,
|
|
2352
2352
|
children: [
|
|
2353
2353
|
label && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2354
2354
|
"label",
|
|
@@ -2371,8 +2371,7 @@ var SearchApiRoot = ({
|
|
|
2371
2371
|
},
|
|
2372
2372
|
String(getOptionValue(opt)) || index
|
|
2373
2373
|
)) })
|
|
2374
|
-
] })
|
|
2375
|
-
message && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-sm text-red-600 dark:text-red-400", children: message })
|
|
2374
|
+
] })
|
|
2376
2375
|
]
|
|
2377
2376
|
}
|
|
2378
2377
|
) });
|
|
@@ -2568,7 +2567,7 @@ var SearchApiContent = (0, import_react13.forwardRef)(
|
|
|
2568
2567
|
}, [isOpen]);
|
|
2569
2568
|
if (!isOpen || typeof document === "undefined") return null;
|
|
2570
2569
|
return (0, import_react_dom2.createPortal)(
|
|
2571
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.
|
|
2570
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2572
2571
|
"div",
|
|
2573
2572
|
{
|
|
2574
2573
|
ref: dropdownContentRef,
|
|
@@ -2576,10 +2575,13 @@ var SearchApiContent = (0, import_react13.forwardRef)(
|
|
|
2576
2575
|
style: { ...dropdownStyle, ...style },
|
|
2577
2576
|
onMouseDown: (e) => e.stopPropagation(),
|
|
2578
2577
|
...props,
|
|
2579
|
-
children:
|
|
2580
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2581
|
-
|
|
2582
|
-
|
|
2578
|
+
children: [
|
|
2579
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "px-3 py-2 text-sm text-red-600 dark:text-red-400 border-b border-gray-100 dark:border-zinc-800", children: error }),
|
|
2580
|
+
isLoading && options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "p-4 text-center text-sm text-gray-500", children: [
|
|
2581
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react8.Loader2, { className: "h-5 w-5 animate-spin mx-auto mb-2" }),
|
|
2582
|
+
"Loading options..."
|
|
2583
|
+
] }) : import_react13.default.Children.count(children) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "py-1", children }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "p-4 text-center text-sm text-gray-500", children: searchTerm ? `No results for "${searchTerm}"` : "No options available" })
|
|
2584
|
+
]
|
|
2583
2585
|
}
|
|
2584
2586
|
),
|
|
2585
2587
|
document.body
|
|
@@ -2719,15 +2721,18 @@ var DateInput = (0, import_react14.forwardRef)(
|
|
|
2719
2721
|
}
|
|
2720
2722
|
);
|
|
2721
2723
|
};
|
|
2722
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: `space-y-2 group ${containerClassName}`, children: [
|
|
2723
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime21.
|
|
2724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: `space-y-2 group relative ${containerClassName}`, children: [
|
|
2725
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2724
2726
|
"label",
|
|
2725
2727
|
{
|
|
2726
2728
|
className: "block text-xs font-medium transition-colors duration-200",
|
|
2727
2729
|
style: {
|
|
2728
2730
|
color: message ? "#ef4444" : isFocused ? primaryColor : void 0
|
|
2729
2731
|
},
|
|
2730
|
-
children:
|
|
2732
|
+
children: [
|
|
2733
|
+
label,
|
|
2734
|
+
props.required && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-red-500 ml-1", children: "*" })
|
|
2735
|
+
]
|
|
2731
2736
|
}
|
|
2732
2737
|
),
|
|
2733
2738
|
form && name ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
package/dist/index.mjs
CHANGED
|
@@ -1079,7 +1079,7 @@ var Input = forwardRef(
|
|
|
1079
1079
|
const renderInput = (inputProps, localType = type || "text") => /* @__PURE__ */ jsxs11(
|
|
1080
1080
|
"div",
|
|
1081
1081
|
{
|
|
1082
|
-
className: `${label ? "space-y-2" : ""} group
|
|
1082
|
+
className: `${label ? "space-y-2" : ""} group relative ${containerClassName} `,
|
|
1083
1083
|
children: [
|
|
1084
1084
|
label && /* @__PURE__ */ jsxs11(
|
|
1085
1085
|
"label",
|
|
@@ -1241,7 +1241,7 @@ var PhoneInput = forwardRef2(
|
|
|
1241
1241
|
}
|
|
1242
1242
|
message = currentError?.message || message;
|
|
1243
1243
|
}
|
|
1244
|
-
const renderInput = (onChangeHandler, currentValue) => /* @__PURE__ */ jsxs12("div", { className: `space-y-2 group ${containerClassName}`, children: [
|
|
1244
|
+
const renderInput = (onChangeHandler, currentValue) => /* @__PURE__ */ jsxs12("div", { className: `space-y-2 group relative ${containerClassName}`, children: [
|
|
1245
1245
|
/* @__PURE__ */ jsxs12(
|
|
1246
1246
|
"label",
|
|
1247
1247
|
{
|
|
@@ -1468,7 +1468,7 @@ var SelectRoot = ({
|
|
|
1468
1468
|
"div",
|
|
1469
1469
|
{
|
|
1470
1470
|
ref: containerRef,
|
|
1471
|
-
className: `${label ? "space-y-2" : ""} group ${containerClassName}`,
|
|
1471
|
+
className: `${label ? "space-y-2" : ""} group relative ${containerClassName}`,
|
|
1472
1472
|
children: [
|
|
1473
1473
|
label && /* @__PURE__ */ jsxs13(
|
|
1474
1474
|
"label",
|
|
@@ -1747,7 +1747,7 @@ var Textarea = forwardRef4(
|
|
|
1747
1747
|
const errorObj = name.split(".").reduce((acc, current) => acc?.[current], errors);
|
|
1748
1748
|
message = errorObj?.message;
|
|
1749
1749
|
}
|
|
1750
|
-
const renderInput = (inputProps, ref2) => /* @__PURE__ */ jsxs14("div", { className: `space-y-2 group w-full! ${containerClassName}`, children: [
|
|
1750
|
+
const renderInput = (inputProps, ref2) => /* @__PURE__ */ jsxs14("div", { className: `space-y-2 group w-full! relative ${containerClassName}`, children: [
|
|
1751
1751
|
/* @__PURE__ */ jsxs14(
|
|
1752
1752
|
"label",
|
|
1753
1753
|
{
|
|
@@ -2289,7 +2289,7 @@ var SearchApiRoot = ({
|
|
|
2289
2289
|
"div",
|
|
2290
2290
|
{
|
|
2291
2291
|
ref: containerRef,
|
|
2292
|
-
className: `${label ? "space-y-2" : ""} group ${containerClassName}`,
|
|
2292
|
+
className: `${label ? "space-y-2" : ""} group relative ${containerClassName}`,
|
|
2293
2293
|
children: [
|
|
2294
2294
|
label && /* @__PURE__ */ jsxs15(
|
|
2295
2295
|
"label",
|
|
@@ -2312,8 +2312,7 @@ var SearchApiRoot = ({
|
|
|
2312
2312
|
},
|
|
2313
2313
|
String(getOptionValue(opt)) || index
|
|
2314
2314
|
)) })
|
|
2315
|
-
] })
|
|
2316
|
-
message && /* @__PURE__ */ jsx20("p", { className: "text-sm text-red-600 dark:text-red-400", children: message })
|
|
2315
|
+
] })
|
|
2317
2316
|
]
|
|
2318
2317
|
}
|
|
2319
2318
|
) });
|
|
@@ -2509,7 +2508,7 @@ var SearchApiContent = forwardRef5(
|
|
|
2509
2508
|
}, [isOpen]);
|
|
2510
2509
|
if (!isOpen || typeof document === "undefined") return null;
|
|
2511
2510
|
return createPortal2(
|
|
2512
|
-
/* @__PURE__ */
|
|
2511
|
+
/* @__PURE__ */ jsxs15(
|
|
2513
2512
|
"div",
|
|
2514
2513
|
{
|
|
2515
2514
|
ref: dropdownContentRef,
|
|
@@ -2517,10 +2516,13 @@ var SearchApiContent = forwardRef5(
|
|
|
2517
2516
|
style: { ...dropdownStyle, ...style },
|
|
2518
2517
|
onMouseDown: (e) => e.stopPropagation(),
|
|
2519
2518
|
...props,
|
|
2520
|
-
children:
|
|
2521
|
-
/* @__PURE__ */ jsx20(
|
|
2522
|
-
|
|
2523
|
-
|
|
2519
|
+
children: [
|
|
2520
|
+
error && /* @__PURE__ */ jsx20("div", { className: "px-3 py-2 text-sm text-red-600 dark:text-red-400 border-b border-gray-100 dark:border-zinc-800", children: error }),
|
|
2521
|
+
isLoading && options.length === 0 ? /* @__PURE__ */ jsxs15("div", { className: "p-4 text-center text-sm text-gray-500", children: [
|
|
2522
|
+
/* @__PURE__ */ jsx20(Loader22, { className: "h-5 w-5 animate-spin mx-auto mb-2" }),
|
|
2523
|
+
"Loading options..."
|
|
2524
|
+
] }) : React7.Children.count(children) > 0 ? /* @__PURE__ */ jsx20("div", { className: "py-1", children }) : /* @__PURE__ */ jsx20("div", { className: "p-4 text-center text-sm text-gray-500", children: searchTerm ? `No results for "${searchTerm}"` : "No options available" })
|
|
2525
|
+
]
|
|
2524
2526
|
}
|
|
2525
2527
|
),
|
|
2526
2528
|
document.body
|
|
@@ -2662,15 +2664,18 @@ var DateInput = forwardRef6(
|
|
|
2662
2664
|
}
|
|
2663
2665
|
);
|
|
2664
2666
|
};
|
|
2665
|
-
return /* @__PURE__ */ jsxs16("div", { className: `space-y-2 group ${containerClassName}`, children: [
|
|
2666
|
-
label && /* @__PURE__ */
|
|
2667
|
+
return /* @__PURE__ */ jsxs16("div", { className: `space-y-2 group relative ${containerClassName}`, children: [
|
|
2668
|
+
label && /* @__PURE__ */ jsxs16(
|
|
2667
2669
|
"label",
|
|
2668
2670
|
{
|
|
2669
2671
|
className: "block text-xs font-medium transition-colors duration-200",
|
|
2670
2672
|
style: {
|
|
2671
2673
|
color: message ? "#ef4444" : isFocused ? primaryColor : void 0
|
|
2672
2674
|
},
|
|
2673
|
-
children:
|
|
2675
|
+
children: [
|
|
2676
|
+
label,
|
|
2677
|
+
props.required && /* @__PURE__ */ jsx21("span", { className: "text-red-500 ml-1", children: "*" })
|
|
2678
|
+
]
|
|
2674
2679
|
}
|
|
2675
2680
|
),
|
|
2676
2681
|
form && name ? /* @__PURE__ */ jsx21(
|