@farmzone/fz-react-ui 1.0.13 → 1.0.14
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.cjs +27 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +27 -12
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -412,7 +412,7 @@ function Input({ className, type, ...props }) {
|
|
|
412
412
|
"data-slot": "input",
|
|
413
413
|
className: cn(
|
|
414
414
|
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input border-gray-300 flex h-8 w-full min-w-0 rounded-sm border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
415
|
-
"focus-visible:border-
|
|
415
|
+
"focus-visible:border-blue-600 focus-visible:ring-blue-600/30 focus-visible:ring-[1px]",
|
|
416
416
|
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
417
417
|
className
|
|
418
418
|
),
|
|
@@ -2528,9 +2528,11 @@ function DatePickerRange(props) {
|
|
|
2528
2528
|
const dateToShow = position === "end" ? endInputValue || startInputValue : startInputValue || endInputValue;
|
|
2529
2529
|
toggleCalendar(dateToShow);
|
|
2530
2530
|
};
|
|
2531
|
-
const handleFieldEnter = () => {
|
|
2532
|
-
onKeyDownEnter?.();
|
|
2531
|
+
const handleFieldEnter = (value) => {
|
|
2533
2532
|
closeCalendar();
|
|
2533
|
+
if (onKeyDownEnter && value.length === 10) {
|
|
2534
|
+
onKeyDownEnter();
|
|
2535
|
+
}
|
|
2534
2536
|
};
|
|
2535
2537
|
const inputClassName = cn(
|
|
2536
2538
|
"w-full px-2 py-1.25 border border-gray-300 shadow-xs outline-none text-sm rounded-sm pr-7 transition-colors",
|
|
@@ -2590,7 +2592,10 @@ function DatePickerRange(props) {
|
|
|
2590
2592
|
className: inputClassName,
|
|
2591
2593
|
maxLength: 10,
|
|
2592
2594
|
onKeyDown: (e) => {
|
|
2593
|
-
if (e.key === "Enter")
|
|
2595
|
+
if (e.key === "Enter") {
|
|
2596
|
+
e.preventDefault();
|
|
2597
|
+
handleFieldEnter(startInputValue);
|
|
2598
|
+
}
|
|
2594
2599
|
}
|
|
2595
2600
|
}
|
|
2596
2601
|
),
|
|
@@ -2618,7 +2623,10 @@ function DatePickerRange(props) {
|
|
|
2618
2623
|
className: inputClassName,
|
|
2619
2624
|
maxLength: 10,
|
|
2620
2625
|
onKeyDown: (e) => {
|
|
2621
|
-
if (e.key === "Enter")
|
|
2626
|
+
if (e.key === "Enter") {
|
|
2627
|
+
e.preventDefault();
|
|
2628
|
+
handleFieldEnter(endInputValue);
|
|
2629
|
+
}
|
|
2622
2630
|
}
|
|
2623
2631
|
}
|
|
2624
2632
|
),
|
|
@@ -2713,9 +2721,11 @@ function DatePickerSingle(props) {
|
|
|
2713
2721
|
onBlur?.(formatted);
|
|
2714
2722
|
closeCalendar();
|
|
2715
2723
|
};
|
|
2716
|
-
const handleFieldEnter = () => {
|
|
2717
|
-
onKeyDownEnter?.();
|
|
2724
|
+
const handleFieldEnter = (value2) => {
|
|
2718
2725
|
closeCalendar();
|
|
2726
|
+
if (onKeyDownEnter && value2.length === 10) {
|
|
2727
|
+
onKeyDownEnter();
|
|
2728
|
+
}
|
|
2719
2729
|
};
|
|
2720
2730
|
const calendarNode = /* @__PURE__ */ jsx(
|
|
2721
2731
|
CalendarPortal,
|
|
@@ -2764,12 +2774,15 @@ function DatePickerSingle(props) {
|
|
|
2764
2774
|
disabled,
|
|
2765
2775
|
className: cn(
|
|
2766
2776
|
"w-full px-2 py-1.25 border text-sm rounded-sm outline-none shadow-xs transition-colors",
|
|
2767
|
-
validation ? "border-red-600 focus:border-
|
|
2777
|
+
validation ? "border-red-600 focus:border-blue-600 focus-visible:border-blue-600 focus-visible:ring-1 focus-visible:ring-blue-600/30 focus-visible:outline-none" : "border-gray-300 focus:border-blue-600 focus-visible:border-blue-600 focus-visible:ring-1 focus-visible:ring-blue-600/30 focus-visible:outline-none",
|
|
2768
2778
|
disabled ? DATE_PICKER_FIELD_DISABLED_CLASS : "bg-white text-gray-900"
|
|
2769
2779
|
),
|
|
2770
2780
|
maxLength: 10,
|
|
2771
2781
|
onKeyDown: (e) => {
|
|
2772
|
-
if (e.key === "Enter")
|
|
2782
|
+
if (e.key === "Enter") {
|
|
2783
|
+
e.preventDefault();
|
|
2784
|
+
handleFieldEnter(inputValue);
|
|
2785
|
+
}
|
|
2773
2786
|
},
|
|
2774
2787
|
"data-date-input": "true"
|
|
2775
2788
|
}
|
|
@@ -4544,7 +4557,7 @@ function TableEmpty(props) {
|
|
|
4544
4557
|
const { columnCount } = props;
|
|
4545
4558
|
return /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: columnCount, className: "border-none bg-white p-0 align-middle", children: /* @__PURE__ */ jsxs(Empty, { className: "flex min-h-72 w-full flex-col items-center justify-center gap-1", children: [
|
|
4546
4559
|
/* @__PURE__ */ jsx(TriangleAlert, { className: "size-8 shrink-0 text-gray-400", strokeWidth: 1.5 }),
|
|
4547
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
4560
|
+
/* @__PURE__ */ jsx("span", { className: "text-md text-gray-500", children: "\uB4F1\uB85D\uB41C \uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4." })
|
|
4548
4561
|
] }) }) });
|
|
4549
4562
|
}
|
|
4550
4563
|
function TableCellContent(props) {
|
|
@@ -7799,7 +7812,8 @@ function PageFilter(props) {
|
|
|
7799
7812
|
{
|
|
7800
7813
|
value: currentValue,
|
|
7801
7814
|
onChange: handleDateChange(optionKey),
|
|
7802
|
-
placeholder: option.placeholder
|
|
7815
|
+
placeholder: option.placeholder,
|
|
7816
|
+
onKeyDownEnter: handleSubmit
|
|
7803
7817
|
}
|
|
7804
7818
|
) }, String(optionKey));
|
|
7805
7819
|
case "date-range":
|
|
@@ -7808,7 +7822,8 @@ function PageFilter(props) {
|
|
|
7808
7822
|
{
|
|
7809
7823
|
startValue: currentValue,
|
|
7810
7824
|
endValue: String(values[option.endKey] ?? ""),
|
|
7811
|
-
onRangeChange: handleRangeChangeCurried(optionKey, option.endKey)
|
|
7825
|
+
onRangeChange: handleRangeChangeCurried(optionKey, option.endKey),
|
|
7826
|
+
onKeyDownEnter: handleSubmit
|
|
7812
7827
|
}
|
|
7813
7828
|
) }, String(optionKey));
|
|
7814
7829
|
case "checkbox":
|