warqadui 0.0.25 → 0.0.26
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 +18 -2
- package/dist/index.mjs +18 -2
- package/dist/styles.js +1 -4
- package/dist/styles.mjs +1 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2480,7 +2480,10 @@ var SearchApiInput = (0, import_react13.forwardRef)(
|
|
|
2480
2480
|
options,
|
|
2481
2481
|
handleSelect,
|
|
2482
2482
|
inputRef,
|
|
2483
|
-
fieldInternalProps
|
|
2483
|
+
fieldInternalProps,
|
|
2484
|
+
form,
|
|
2485
|
+
name,
|
|
2486
|
+
obj
|
|
2484
2487
|
} = useSearchApiContext();
|
|
2485
2488
|
const setInternalInputRef = (element) => {
|
|
2486
2489
|
inputRef.current = element;
|
|
@@ -2542,6 +2545,10 @@ var SearchApiInput = (0, import_react13.forwardRef)(
|
|
|
2542
2545
|
} else {
|
|
2543
2546
|
setIsOpen(false);
|
|
2544
2547
|
}
|
|
2548
|
+
if (form) {
|
|
2549
|
+
if (name) form.clearErrors(name);
|
|
2550
|
+
if (obj) form.clearErrors(obj);
|
|
2551
|
+
}
|
|
2545
2552
|
},
|
|
2546
2553
|
onFocus: () => {
|
|
2547
2554
|
setIsFocused(true);
|
|
@@ -3555,6 +3562,15 @@ function PostTable({
|
|
|
3555
3562
|
handleSaveField();
|
|
3556
3563
|
}
|
|
3557
3564
|
},
|
|
3565
|
+
onInput: () => {
|
|
3566
|
+
if (fieldErrors[accessor]) {
|
|
3567
|
+
setFieldErrors((prev) => {
|
|
3568
|
+
const next = { ...prev };
|
|
3569
|
+
delete next[accessor];
|
|
3570
|
+
return next;
|
|
3571
|
+
});
|
|
3572
|
+
}
|
|
3573
|
+
},
|
|
3558
3574
|
children: [
|
|
3559
3575
|
fieldRenderer ? fieldRenderer({
|
|
3560
3576
|
value,
|
|
@@ -3573,7 +3589,7 @@ function PostTable({
|
|
|
3573
3589
|
placeholder: `${typeof column.columnDef.header === "string" ? column.columnDef.header : column.id}`
|
|
3574
3590
|
}
|
|
3575
3591
|
),
|
|
3576
|
-
typeof error === "string" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "absolute left-1/2 -translate-x-1/2 bottom-
|
|
3592
|
+
typeof error === "string" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "absolute left-1/2 -translate-x-1/2 bottom-full mb-2 z-9999 pointer-events-none opacity-0 group-hover:opacity-100 focus-within:opacity-100 group-focus-within:opacity-100 transition-opacity whitespace-nowrap bg-red-500 text-white text-xs px-2.5 py-1.5 rounded shadow-lg before:content-[''] before:absolute before:top-full before:left-1/2 before:-translate-x-1/2 before:border-4 before:border-transparent before:border-t-red-500", children: error })
|
|
3577
3593
|
]
|
|
3578
3594
|
}
|
|
3579
3595
|
)
|
package/dist/index.mjs
CHANGED
|
@@ -2421,7 +2421,10 @@ var SearchApiInput = forwardRef5(
|
|
|
2421
2421
|
options,
|
|
2422
2422
|
handleSelect,
|
|
2423
2423
|
inputRef,
|
|
2424
|
-
fieldInternalProps
|
|
2424
|
+
fieldInternalProps,
|
|
2425
|
+
form,
|
|
2426
|
+
name,
|
|
2427
|
+
obj
|
|
2425
2428
|
} = useSearchApiContext();
|
|
2426
2429
|
const setInternalInputRef = (element) => {
|
|
2427
2430
|
inputRef.current = element;
|
|
@@ -2483,6 +2486,10 @@ var SearchApiInput = forwardRef5(
|
|
|
2483
2486
|
} else {
|
|
2484
2487
|
setIsOpen(false);
|
|
2485
2488
|
}
|
|
2489
|
+
if (form) {
|
|
2490
|
+
if (name) form.clearErrors(name);
|
|
2491
|
+
if (obj) form.clearErrors(obj);
|
|
2492
|
+
}
|
|
2486
2493
|
},
|
|
2487
2494
|
onFocus: () => {
|
|
2488
2495
|
setIsFocused(true);
|
|
@@ -3513,6 +3520,15 @@ function PostTable({
|
|
|
3513
3520
|
handleSaveField();
|
|
3514
3521
|
}
|
|
3515
3522
|
},
|
|
3523
|
+
onInput: () => {
|
|
3524
|
+
if (fieldErrors[accessor]) {
|
|
3525
|
+
setFieldErrors((prev) => {
|
|
3526
|
+
const next = { ...prev };
|
|
3527
|
+
delete next[accessor];
|
|
3528
|
+
return next;
|
|
3529
|
+
});
|
|
3530
|
+
}
|
|
3531
|
+
},
|
|
3516
3532
|
children: [
|
|
3517
3533
|
fieldRenderer ? fieldRenderer({
|
|
3518
3534
|
value,
|
|
@@ -3531,7 +3547,7 @@ function PostTable({
|
|
|
3531
3547
|
placeholder: `${typeof column.columnDef.header === "string" ? column.columnDef.header : column.id}`
|
|
3532
3548
|
}
|
|
3533
3549
|
),
|
|
3534
|
-
typeof error === "string" && /* @__PURE__ */ jsx24("div", { className: "absolute left-1/2 -translate-x-1/2 bottom-
|
|
3550
|
+
typeof error === "string" && /* @__PURE__ */ jsx24("div", { className: "absolute left-1/2 -translate-x-1/2 bottom-full mb-2 z-9999 pointer-events-none opacity-0 group-hover:opacity-100 focus-within:opacity-100 group-focus-within:opacity-100 transition-opacity whitespace-nowrap bg-red-500 text-white text-xs px-2.5 py-1.5 rounded shadow-lg before:content-[''] before:absolute before:top-full before:left-1/2 before:-translate-x-1/2 before:border-4 before:border-transparent before:border-t-red-500", children: error })
|
|
3535
3551
|
]
|
|
3536
3552
|
}
|
|
3537
3553
|
)
|
package/dist/styles.js
CHANGED
|
@@ -472,7 +472,7 @@ select:-webkit-autofill:focus {
|
|
|
472
472
|
.bottom-2 {
|
|
473
473
|
bottom: 0.5rem;
|
|
474
474
|
}
|
|
475
|
-
.bottom
|
|
475
|
+
.bottom-full {
|
|
476
476
|
bottom: 100%;
|
|
477
477
|
}
|
|
478
478
|
.left-0 {
|
|
@@ -511,9 +511,6 @@ select:-webkit-autofill:focus {
|
|
|
511
511
|
.z-50 {
|
|
512
512
|
z-index: 50;
|
|
513
513
|
}
|
|
514
|
-
.z-\\[9999\\] {
|
|
515
|
-
z-index: 9999;
|
|
516
|
-
}
|
|
517
514
|
.mx-2 {
|
|
518
515
|
margin-left: 0.5rem;
|
|
519
516
|
margin-right: 0.5rem;
|
package/dist/styles.mjs
CHANGED
|
@@ -470,7 +470,7 @@ select:-webkit-autofill:focus {
|
|
|
470
470
|
.bottom-2 {
|
|
471
471
|
bottom: 0.5rem;
|
|
472
472
|
}
|
|
473
|
-
.bottom
|
|
473
|
+
.bottom-full {
|
|
474
474
|
bottom: 100%;
|
|
475
475
|
}
|
|
476
476
|
.left-0 {
|
|
@@ -509,9 +509,6 @@ select:-webkit-autofill:focus {
|
|
|
509
509
|
.z-50 {
|
|
510
510
|
z-index: 50;
|
|
511
511
|
}
|
|
512
|
-
.z-\\[9999\\] {
|
|
513
|
-
z-index: 9999;
|
|
514
|
-
}
|
|
515
512
|
.mx-2 {
|
|
516
513
|
margin-left: 0.5rem;
|
|
517
514
|
margin-right: 0.5rem;
|