@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.cjs
CHANGED
|
@@ -446,7 +446,7 @@ function Input({ className, type, ...props }) {
|
|
|
446
446
|
"data-slot": "input",
|
|
447
447
|
className: cn(
|
|
448
448
|
"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",
|
|
449
|
-
"focus-visible:border-
|
|
449
|
+
"focus-visible:border-blue-600 focus-visible:ring-blue-600/30 focus-visible:ring-[1px]",
|
|
450
450
|
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
451
451
|
className
|
|
452
452
|
),
|
|
@@ -2562,9 +2562,11 @@ function DatePickerRange(props) {
|
|
|
2562
2562
|
const dateToShow = position === "end" ? endInputValue || startInputValue : startInputValue || endInputValue;
|
|
2563
2563
|
toggleCalendar(dateToShow);
|
|
2564
2564
|
};
|
|
2565
|
-
const handleFieldEnter = () => {
|
|
2566
|
-
onKeyDownEnter?.();
|
|
2565
|
+
const handleFieldEnter = (value) => {
|
|
2567
2566
|
closeCalendar();
|
|
2567
|
+
if (onKeyDownEnter && value.length === 10) {
|
|
2568
|
+
onKeyDownEnter();
|
|
2569
|
+
}
|
|
2568
2570
|
};
|
|
2569
2571
|
const inputClassName = cn(
|
|
2570
2572
|
"w-full px-2 py-1.25 border border-gray-300 shadow-xs outline-none text-sm rounded-sm pr-7 transition-colors",
|
|
@@ -2624,7 +2626,10 @@ function DatePickerRange(props) {
|
|
|
2624
2626
|
className: inputClassName,
|
|
2625
2627
|
maxLength: 10,
|
|
2626
2628
|
onKeyDown: (e) => {
|
|
2627
|
-
if (e.key === "Enter")
|
|
2629
|
+
if (e.key === "Enter") {
|
|
2630
|
+
e.preventDefault();
|
|
2631
|
+
handleFieldEnter(startInputValue);
|
|
2632
|
+
}
|
|
2628
2633
|
}
|
|
2629
2634
|
}
|
|
2630
2635
|
),
|
|
@@ -2652,7 +2657,10 @@ function DatePickerRange(props) {
|
|
|
2652
2657
|
className: inputClassName,
|
|
2653
2658
|
maxLength: 10,
|
|
2654
2659
|
onKeyDown: (e) => {
|
|
2655
|
-
if (e.key === "Enter")
|
|
2660
|
+
if (e.key === "Enter") {
|
|
2661
|
+
e.preventDefault();
|
|
2662
|
+
handleFieldEnter(endInputValue);
|
|
2663
|
+
}
|
|
2656
2664
|
}
|
|
2657
2665
|
}
|
|
2658
2666
|
),
|
|
@@ -2747,9 +2755,11 @@ function DatePickerSingle(props) {
|
|
|
2747
2755
|
onBlur?.(formatted);
|
|
2748
2756
|
closeCalendar();
|
|
2749
2757
|
};
|
|
2750
|
-
const handleFieldEnter = () => {
|
|
2751
|
-
onKeyDownEnter?.();
|
|
2758
|
+
const handleFieldEnter = (value2) => {
|
|
2752
2759
|
closeCalendar();
|
|
2760
|
+
if (onKeyDownEnter && value2.length === 10) {
|
|
2761
|
+
onKeyDownEnter();
|
|
2762
|
+
}
|
|
2753
2763
|
};
|
|
2754
2764
|
const calendarNode = /* @__PURE__ */ jsxRuntime.jsx(
|
|
2755
2765
|
CalendarPortal,
|
|
@@ -2798,12 +2808,15 @@ function DatePickerSingle(props) {
|
|
|
2798
2808
|
disabled,
|
|
2799
2809
|
className: cn(
|
|
2800
2810
|
"w-full px-2 py-1.25 border text-sm rounded-sm outline-none shadow-xs transition-colors",
|
|
2801
|
-
validation ? "border-red-600 focus:border-
|
|
2811
|
+
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",
|
|
2802
2812
|
disabled ? DATE_PICKER_FIELD_DISABLED_CLASS : "bg-white text-gray-900"
|
|
2803
2813
|
),
|
|
2804
2814
|
maxLength: 10,
|
|
2805
2815
|
onKeyDown: (e) => {
|
|
2806
|
-
if (e.key === "Enter")
|
|
2816
|
+
if (e.key === "Enter") {
|
|
2817
|
+
e.preventDefault();
|
|
2818
|
+
handleFieldEnter(inputValue);
|
|
2819
|
+
}
|
|
2807
2820
|
},
|
|
2808
2821
|
"data-date-input": "true"
|
|
2809
2822
|
}
|
|
@@ -4578,7 +4591,7 @@ function TableEmpty(props) {
|
|
|
4578
4591
|
const { columnCount } = props;
|
|
4579
4592
|
return /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: columnCount, className: "border-none bg-white p-0 align-middle", children: /* @__PURE__ */ jsxRuntime.jsxs(Empty, { className: "flex min-h-72 w-full flex-col items-center justify-center gap-1", children: [
|
|
4580
4593
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.TriangleAlert, { className: "size-8 shrink-0 text-gray-400", strokeWidth: 1.5 }),
|
|
4581
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
4594
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-md text-gray-500", children: "\uB4F1\uB85D\uB41C \uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4." })
|
|
4582
4595
|
] }) }) });
|
|
4583
4596
|
}
|
|
4584
4597
|
function TableCellContent(props) {
|
|
@@ -7833,7 +7846,8 @@ function PageFilter(props) {
|
|
|
7833
7846
|
{
|
|
7834
7847
|
value: currentValue,
|
|
7835
7848
|
onChange: handleDateChange(optionKey),
|
|
7836
|
-
placeholder: option.placeholder
|
|
7849
|
+
placeholder: option.placeholder,
|
|
7850
|
+
onKeyDownEnter: handleSubmit
|
|
7837
7851
|
}
|
|
7838
7852
|
) }, String(optionKey));
|
|
7839
7853
|
case "date-range":
|
|
@@ -7842,7 +7856,8 @@ function PageFilter(props) {
|
|
|
7842
7856
|
{
|
|
7843
7857
|
startValue: currentValue,
|
|
7844
7858
|
endValue: String(values[option.endKey] ?? ""),
|
|
7845
|
-
onRangeChange: handleRangeChangeCurried(optionKey, option.endKey)
|
|
7859
|
+
onRangeChange: handleRangeChangeCurried(optionKey, option.endKey),
|
|
7860
|
+
onKeyDownEnter: handleSubmit
|
|
7846
7861
|
}
|
|
7847
7862
|
) }, String(optionKey));
|
|
7848
7863
|
case "checkbox":
|