warqadui 0.0.21 → 0.0.23

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.d.mts CHANGED
@@ -424,14 +424,19 @@ declare module "@tanstack/react-table" {
424
424
  }
425
425
  interface PostTableActions {
426
426
  focus: (columnId: string) => void;
427
- setError: (columnId: string, hasError: boolean) => void;
427
+ setError: (columnId: string, error: boolean | string) => void;
428
428
  }
429
429
  interface PostTableProps<TData> {
430
430
  columns: (ColumnDef<TData, any> & {
431
431
  key?: string;
432
432
  })[];
433
433
  data?: TData[];
434
- onChange?: (entryData: Partial<TData>, actions: PostTableActions, actionType: "add" | "edit" | "delete", fullData: TData[]) => void | Promise<void | boolean>;
434
+ onChange?: (params: {
435
+ entryData: Partial<TData>;
436
+ actions: PostTableActions;
437
+ actionType: "add" | "edit" | "delete";
438
+ fullData: TData[];
439
+ }) => void | Promise<void | boolean>;
435
440
  isLoading?: boolean;
436
441
  className?: string;
437
442
  verticalLines?: boolean;
package/dist/index.d.ts CHANGED
@@ -424,14 +424,19 @@ declare module "@tanstack/react-table" {
424
424
  }
425
425
  interface PostTableActions {
426
426
  focus: (columnId: string) => void;
427
- setError: (columnId: string, hasError: boolean) => void;
427
+ setError: (columnId: string, error: boolean | string) => void;
428
428
  }
429
429
  interface PostTableProps<TData> {
430
430
  columns: (ColumnDef<TData, any> & {
431
431
  key?: string;
432
432
  })[];
433
433
  data?: TData[];
434
- onChange?: (entryData: Partial<TData>, actions: PostTableActions, actionType: "add" | "edit" | "delete", fullData: TData[]) => void | Promise<void | boolean>;
434
+ onChange?: (params: {
435
+ entryData: Partial<TData>;
436
+ actions: PostTableActions;
437
+ actionType: "add" | "edit" | "delete";
438
+ fullData: TData[];
439
+ }) => void | Promise<void | boolean>;
435
440
  isLoading?: boolean;
436
441
  className?: string;
437
442
  verticalLines?: boolean;
package/dist/index.js CHANGED
@@ -1212,7 +1212,7 @@ var Input = (0, import_react8.forwardRef)(
1212
1212
  }
1213
1213
  )
1214
1214
  ] }),
1215
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "min-h-[20px]", children: message && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-sm text-red-600 dark:text-red-400", children: message }) })
1215
+ message && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-sm text-red-600 dark:text-red-400", children: message })
1216
1216
  ]
1217
1217
  }
1218
1218
  );
@@ -1359,7 +1359,7 @@ var PhoneInput = (0, import_react9.forwardRef)(
1359
1359
  }
1360
1360
  )
1361
1361
  ] }),
1362
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "min-h-[20px]", children: message && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-sm text-red-600 dark:text-red-400", children: message }) })
1362
+ message && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-sm text-red-600 dark:text-red-400", children: message })
1363
1363
  ] });
1364
1364
  if (form && name) {
1365
1365
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
@@ -1571,7 +1571,7 @@ var SelectRoot = ({
1571
1571
  String(opt.value) || index
1572
1572
  )) })
1573
1573
  ] }),
1574
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "min-h-[20px]", children: message && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-sm text-red-600 dark:text-red-400", children: message }) })
1574
+ message && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-sm text-red-600 dark:text-red-400", children: message })
1575
1575
  ]
1576
1576
  }
1577
1577
  ) });
@@ -1847,7 +1847,7 @@ var Textarea = (0, import_react11.forwardRef)(
1847
1847
  ...inputProps
1848
1848
  }
1849
1849
  ) }),
1850
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "min-h-[20px]", children: message && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-sm text-red-600 dark:text-red-400", children: message }) })
1850
+ message && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-sm text-red-600 dark:text-red-400", children: message })
1851
1851
  ] });
1852
1852
  if (form && name) {
1853
1853
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
@@ -2371,8 +2371,7 @@ var SearchApiRoot = ({
2371
2371
  },
2372
2372
  String(getOptionValue(opt)) || index
2373
2373
  )) })
2374
- ] }),
2375
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "min-h-[20px]", children: 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.jsx)(
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: isLoading && options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "p-4 text-center text-sm text-gray-500", children: [
2580
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react8.Loader2, { className: "h-5 w-5 animate-spin mx-auto mb-2" }),
2581
- "Loading options..."
2582
- ] }) : 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: error && options.length === 0 ? error : searchTerm ? `No results for "${searchTerm}"` : "No options available" })
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
@@ -2746,7 +2748,7 @@ var DateInput = (0, import_react14.forwardRef)(
2746
2748
  )
2747
2749
  }
2748
2750
  ) : renderDatePicker(value, onChange, onBlur, ref),
2749
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "min-h-[20px]", children: message && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-sm text-red-600 dark:text-red-400", children: message }) })
2751
+ message && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-sm text-red-600 dark:text-red-400", children: message })
2750
2752
  ] });
2751
2753
  }
2752
2754
  );
@@ -3173,15 +3175,20 @@ function PostTable({
3173
3175
  }
3174
3176
  }
3175
3177
  },
3176
- setError: (columnId, hasError) => {
3178
+ setError: (columnId, error) => {
3177
3179
  setFieldErrors((prev) => ({
3178
3180
  ...prev,
3179
- [columnId]: hasError
3181
+ [columnId]: error
3180
3182
  }));
3181
3183
  }
3182
3184
  };
3183
3185
  const type = editingIndex !== null ? "edit" : "add";
3184
- const result = await onChange(entryData, actions, type, newData);
3186
+ const result = await onChange({
3187
+ entryData,
3188
+ actions,
3189
+ actionType: type,
3190
+ fullData: newData
3191
+ });
3185
3192
  if (result === false) {
3186
3193
  setIsSavingAsync(false);
3187
3194
  return;
@@ -3227,14 +3234,19 @@ function PostTable({
3227
3234
  }
3228
3235
  }
3229
3236
  },
3230
- setError: (columnId, hasError) => {
3237
+ setError: (columnId, error) => {
3231
3238
  setFieldErrors((prev) => ({
3232
3239
  ...prev,
3233
- [columnId]: hasError
3240
+ [columnId]: error
3234
3241
  }));
3235
3242
  }
3236
3243
  };
3237
- onChange?.(data[index2], actions, "delete", newData);
3244
+ onChange?.({
3245
+ entryData: data[index2],
3246
+ actions,
3247
+ actionType: "delete",
3248
+ fullData: newData
3249
+ });
3238
3250
  if (editingIndex === index2) {
3239
3251
  handleCancelEdit();
3240
3252
  } else if (editingIndex !== null && editingIndex > index2) {
@@ -3461,7 +3473,8 @@ function PostTable({
3461
3473
  const fieldRenderer = column.columnDef.meta?.field;
3462
3474
  const accessor = column.columnDef.accessorKey || column.id;
3463
3475
  const value = entryData[accessor] || "";
3464
- const hasError = !!fieldErrors[accessor];
3476
+ const error = fieldErrors[accessor];
3477
+ const hasError = !!error;
3465
3478
  const onChangeValue = (val) => {
3466
3479
  setEntryData((prev) => ({
3467
3480
  ...prev,
@@ -3495,12 +3508,12 @@ function PostTable({
3495
3508
  column.id === "_index" ? "w-px whitespace-nowrap" : "",
3496
3509
  hasError && "ring-1 ring-inset ring-red-500"
3497
3510
  ),
3498
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3511
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
3499
3512
  "div",
3500
3513
  {
3501
3514
  className: cn(
3502
- "flex items-center",
3503
- column.id === "_index" ? "" : "w-full min-w-32 h-9"
3515
+ "flex items-center relative group w-full",
3516
+ column.id === "_index" ? "" : "min-w-32 h-9"
3504
3517
  ),
3505
3518
  onKeyDown: (e) => {
3506
3519
  if (e.key === "Enter") {
@@ -3508,23 +3521,26 @@ function PostTable({
3508
3521
  handleSaveField();
3509
3522
  }
3510
3523
  },
3511
- children: fieldRenderer ? fieldRenderer({
3512
- value,
3513
- onChange: onChangeValue,
3514
- rowData: entryData,
3515
- setRowData: setEntryData
3516
- }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3517
- Fields_default.Input,
3518
- {
3519
- id: `pti-${accessor}`,
3520
- label: "",
3521
- variant: "ghost",
3524
+ children: [
3525
+ fieldRenderer ? fieldRenderer({
3522
3526
  value,
3523
- onChange: (e) => onChangeValue(e.target.value),
3524
- className: "px-0! bg-transparent!",
3525
- placeholder: `${typeof column.columnDef.header === "string" ? column.columnDef.header : column.id}`
3526
- }
3527
- )
3527
+ onChange: onChangeValue,
3528
+ rowData: entryData,
3529
+ setRowData: setEntryData
3530
+ }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3531
+ Fields_default.Input,
3532
+ {
3533
+ id: `pti-${accessor}`,
3534
+ label: "",
3535
+ variant: "ghost",
3536
+ value,
3537
+ onChange: (e) => onChangeValue(e.target.value),
3538
+ className: "px-0! bg-transparent!",
3539
+ placeholder: `${typeof column.columnDef.header === "string" ? column.columnDef.header : column.id}`
3540
+ }
3541
+ ),
3542
+ typeof error === "string" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "absolute left-1/2 -translate-x-1/2 bottom-[100%] 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 })
3543
+ ]
3528
3544
  }
3529
3545
  )
3530
3546
  },
package/dist/index.mjs CHANGED
@@ -1135,7 +1135,7 @@ var Input = forwardRef(
1135
1135
  }
1136
1136
  )
1137
1137
  ] }),
1138
- /* @__PURE__ */ jsx16("div", { className: "min-h-[20px]", children: message && /* @__PURE__ */ jsx16("p", { className: "text-sm text-red-600 dark:text-red-400", children: message }) })
1138
+ message && /* @__PURE__ */ jsx16("p", { className: "text-sm text-red-600 dark:text-red-400", children: message })
1139
1139
  ]
1140
1140
  }
1141
1141
  );
@@ -1284,7 +1284,7 @@ var PhoneInput = forwardRef2(
1284
1284
  }
1285
1285
  )
1286
1286
  ] }),
1287
- /* @__PURE__ */ jsx17("div", { className: "min-h-[20px]", children: message && /* @__PURE__ */ jsx17("p", { className: "text-sm text-red-600 dark:text-red-400", children: message }) })
1287
+ message && /* @__PURE__ */ jsx17("p", { className: "text-sm text-red-600 dark:text-red-400", children: message })
1288
1288
  ] });
1289
1289
  if (form && name) {
1290
1290
  return /* @__PURE__ */ jsx17(
@@ -1503,7 +1503,7 @@ var SelectRoot = ({
1503
1503
  String(opt.value) || index
1504
1504
  )) })
1505
1505
  ] }),
1506
- /* @__PURE__ */ jsx18("div", { className: "min-h-[20px]", children: message && /* @__PURE__ */ jsx18("p", { className: "text-sm text-red-600 dark:text-red-400", children: message }) })
1506
+ message && /* @__PURE__ */ jsx18("p", { className: "text-sm text-red-600 dark:text-red-400", children: message })
1507
1507
  ]
1508
1508
  }
1509
1509
  ) });
@@ -1781,7 +1781,7 @@ var Textarea = forwardRef4(
1781
1781
  ...inputProps
1782
1782
  }
1783
1783
  ) }),
1784
- /* @__PURE__ */ jsx19("div", { className: "min-h-[20px]", children: message && /* @__PURE__ */ jsx19("p", { className: "text-sm text-red-600 dark:text-red-400", children: message }) })
1784
+ message && /* @__PURE__ */ jsx19("p", { className: "text-sm text-red-600 dark:text-red-400", children: message })
1785
1785
  ] });
1786
1786
  if (form && name) {
1787
1787
  return /* @__PURE__ */ jsx19(
@@ -2312,8 +2312,7 @@ var SearchApiRoot = ({
2312
2312
  },
2313
2313
  String(getOptionValue(opt)) || index
2314
2314
  )) })
2315
- ] }),
2316
- /* @__PURE__ */ jsx20("div", { className: "min-h-[20px]", children: 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__ */ jsx20(
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: isLoading && options.length === 0 ? /* @__PURE__ */ jsxs15("div", { className: "p-4 text-center text-sm text-gray-500", children: [
2521
- /* @__PURE__ */ jsx20(Loader22, { className: "h-5 w-5 animate-spin mx-auto mb-2" }),
2522
- "Loading options..."
2523
- ] }) : 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: error && options.length === 0 ? error : searchTerm ? `No results for "${searchTerm}"` : "No options available" })
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
@@ -2689,7 +2691,7 @@ var DateInput = forwardRef6(
2689
2691
  )
2690
2692
  }
2691
2693
  ) : renderDatePicker(value, onChange, onBlur, ref),
2692
- /* @__PURE__ */ jsx21("div", { className: "min-h-[20px]", children: message && /* @__PURE__ */ jsx21("p", { className: "text-sm text-red-600 dark:text-red-400", children: message }) })
2694
+ message && /* @__PURE__ */ jsx21("p", { className: "text-sm text-red-600 dark:text-red-400", children: message })
2693
2695
  ] });
2694
2696
  }
2695
2697
  );
@@ -3131,15 +3133,20 @@ function PostTable({
3131
3133
  }
3132
3134
  }
3133
3135
  },
3134
- setError: (columnId, hasError) => {
3136
+ setError: (columnId, error) => {
3135
3137
  setFieldErrors((prev) => ({
3136
3138
  ...prev,
3137
- [columnId]: hasError
3139
+ [columnId]: error
3138
3140
  }));
3139
3141
  }
3140
3142
  };
3141
3143
  const type = editingIndex !== null ? "edit" : "add";
3142
- const result = await onChange(entryData, actions, type, newData);
3144
+ const result = await onChange({
3145
+ entryData,
3146
+ actions,
3147
+ actionType: type,
3148
+ fullData: newData
3149
+ });
3143
3150
  if (result === false) {
3144
3151
  setIsSavingAsync(false);
3145
3152
  return;
@@ -3185,14 +3192,19 @@ function PostTable({
3185
3192
  }
3186
3193
  }
3187
3194
  },
3188
- setError: (columnId, hasError) => {
3195
+ setError: (columnId, error) => {
3189
3196
  setFieldErrors((prev) => ({
3190
3197
  ...prev,
3191
- [columnId]: hasError
3198
+ [columnId]: error
3192
3199
  }));
3193
3200
  }
3194
3201
  };
3195
- onChange?.(data[index2], actions, "delete", newData);
3202
+ onChange?.({
3203
+ entryData: data[index2],
3204
+ actions,
3205
+ actionType: "delete",
3206
+ fullData: newData
3207
+ });
3196
3208
  if (editingIndex === index2) {
3197
3209
  handleCancelEdit();
3198
3210
  } else if (editingIndex !== null && editingIndex > index2) {
@@ -3419,7 +3431,8 @@ function PostTable({
3419
3431
  const fieldRenderer = column.columnDef.meta?.field;
3420
3432
  const accessor = column.columnDef.accessorKey || column.id;
3421
3433
  const value = entryData[accessor] || "";
3422
- const hasError = !!fieldErrors[accessor];
3434
+ const error = fieldErrors[accessor];
3435
+ const hasError = !!error;
3423
3436
  const onChangeValue = (val) => {
3424
3437
  setEntryData((prev) => ({
3425
3438
  ...prev,
@@ -3453,12 +3466,12 @@ function PostTable({
3453
3466
  column.id === "_index" ? "w-px whitespace-nowrap" : "",
3454
3467
  hasError && "ring-1 ring-inset ring-red-500"
3455
3468
  ),
3456
- children: /* @__PURE__ */ jsx23(
3469
+ children: /* @__PURE__ */ jsxs18(
3457
3470
  "div",
3458
3471
  {
3459
3472
  className: cn(
3460
- "flex items-center",
3461
- column.id === "_index" ? "" : "w-full min-w-32 h-9"
3473
+ "flex items-center relative group w-full",
3474
+ column.id === "_index" ? "" : "min-w-32 h-9"
3462
3475
  ),
3463
3476
  onKeyDown: (e) => {
3464
3477
  if (e.key === "Enter") {
@@ -3466,23 +3479,26 @@ function PostTable({
3466
3479
  handleSaveField();
3467
3480
  }
3468
3481
  },
3469
- children: fieldRenderer ? fieldRenderer({
3470
- value,
3471
- onChange: onChangeValue,
3472
- rowData: entryData,
3473
- setRowData: setEntryData
3474
- }) : /* @__PURE__ */ jsx23(
3475
- Fields_default.Input,
3476
- {
3477
- id: `pti-${accessor}`,
3478
- label: "",
3479
- variant: "ghost",
3482
+ children: [
3483
+ fieldRenderer ? fieldRenderer({
3480
3484
  value,
3481
- onChange: (e) => onChangeValue(e.target.value),
3482
- className: "px-0! bg-transparent!",
3483
- placeholder: `${typeof column.columnDef.header === "string" ? column.columnDef.header : column.id}`
3484
- }
3485
- )
3485
+ onChange: onChangeValue,
3486
+ rowData: entryData,
3487
+ setRowData: setEntryData
3488
+ }) : /* @__PURE__ */ jsx23(
3489
+ Fields_default.Input,
3490
+ {
3491
+ id: `pti-${accessor}`,
3492
+ label: "",
3493
+ variant: "ghost",
3494
+ value,
3495
+ onChange: (e) => onChangeValue(e.target.value),
3496
+ className: "px-0! bg-transparent!",
3497
+ placeholder: `${typeof column.columnDef.header === "string" ? column.columnDef.header : column.id}`
3498
+ }
3499
+ ),
3500
+ typeof error === "string" && /* @__PURE__ */ jsx23("div", { className: "absolute left-1/2 -translate-x-1/2 bottom-[100%] 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 })
3501
+ ]
3486
3502
  }
3487
3503
  )
3488
3504
  },