@farmzone/fz-react-ui 1.0.18 → 1.0.19
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 +18 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +18 -14
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -751,7 +751,7 @@ function Slider(props) {
|
|
|
751
751
|
RadixSlider__namespace.Track,
|
|
752
752
|
{
|
|
753
753
|
className: cn(
|
|
754
|
-
"relative h-[3px] grow rounded-full bg-
|
|
754
|
+
"relative h-[3px] grow rounded-full bg-gray-200",
|
|
755
755
|
orientation === "vertical" && "w-[3px] h-full",
|
|
756
756
|
trackClassName
|
|
757
757
|
),
|
|
@@ -759,7 +759,7 @@ function Slider(props) {
|
|
|
759
759
|
RadixSlider__namespace.Range,
|
|
760
760
|
{
|
|
761
761
|
className: cn(
|
|
762
|
-
"absolute h-full rounded-full bg-
|
|
762
|
+
"absolute h-full rounded-full bg-[#009fe3]",
|
|
763
763
|
orientation === "vertical" && "w-full",
|
|
764
764
|
rangeClassName
|
|
765
765
|
)
|
|
@@ -767,17 +767,18 @@ function Slider(props) {
|
|
|
767
767
|
)
|
|
768
768
|
}
|
|
769
769
|
),
|
|
770
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
770
|
+
(value ?? defaultValue).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
771
771
|
RadixSlider__namespace.Thumb,
|
|
772
772
|
{
|
|
773
773
|
className: cn(
|
|
774
|
-
"block size-
|
|
774
|
+
"block size-4 rounded-full bg-white border-2 border-[#009fe3] shadow-md hover:border-[#0090cf] focus:outline-none focus:ring-2 focus:ring-[#009fe3]/40 focus:ring-offset-1",
|
|
775
775
|
disabled && "cursor-not-allowed opacity-50",
|
|
776
776
|
thumbClassName
|
|
777
777
|
),
|
|
778
|
-
"aria-label": ariaLabel
|
|
779
|
-
}
|
|
780
|
-
|
|
778
|
+
"aria-label": index === 0 ? ariaLabel : `${ariaLabel} max`
|
|
779
|
+
},
|
|
780
|
+
index
|
|
781
|
+
))
|
|
781
782
|
]
|
|
782
783
|
}
|
|
783
784
|
);
|
|
@@ -6148,7 +6149,7 @@ function FilePreviewViewerSession(props) {
|
|
|
6148
6149
|
React6.useEffect(() => {
|
|
6149
6150
|
if (!showNavigation) return;
|
|
6150
6151
|
const [prevIndex, nextIndex] = getAdjacentIndexes(currentIndex, fileArray.length);
|
|
6151
|
-
const urlsToPreload = [prevIndex, nextIndex].filter((idx) => idx !== currentIndex).map((idx) => fileArray[idx]);
|
|
6152
|
+
const urlsToPreload = [prevIndex, nextIndex].filter((idx) => idx !== currentIndex).map((idx) => fileArray[idx]).filter((url) => url !== void 0);
|
|
6152
6153
|
preloadPreviewImages(urlsToPreload);
|
|
6153
6154
|
}, [showNavigation, currentIndex, fileArray]);
|
|
6154
6155
|
React6.useEffect(() => {
|
|
@@ -7784,7 +7785,7 @@ var SubmitForm = Object.assign(SubmitFormRoot, {
|
|
|
7784
7785
|
function LabeledFilterOption(props) {
|
|
7785
7786
|
const { label, children, gap } = props;
|
|
7786
7787
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginLeft: gap }, className: "flex flex-row items-center gap-4", children: [
|
|
7787
|
-
label && /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium text-gray-60 shrink-0", children: label }),
|
|
7788
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium text-gray-60 shrink-0 select-none", children: label }),
|
|
7788
7789
|
children
|
|
7789
7790
|
] });
|
|
7790
7791
|
}
|
|
@@ -7820,8 +7821,9 @@ function PageFilter(props) {
|
|
|
7820
7821
|
onChange({ [key]: value });
|
|
7821
7822
|
if (autoSubmit) pendingAutoSubmitRef.current = { key, value };
|
|
7822
7823
|
};
|
|
7823
|
-
const handleRadioChange = (key) => (value) => {
|
|
7824
|
+
const handleRadioChange = (key, autoSubmit) => (value) => {
|
|
7824
7825
|
onChange({ [key]: value });
|
|
7826
|
+
if (autoSubmit) pendingAutoSubmitRef.current = { key, value };
|
|
7825
7827
|
};
|
|
7826
7828
|
const handleDateChange = (key) => (date) => {
|
|
7827
7829
|
onChange({ [key]: date });
|
|
@@ -7829,8 +7831,10 @@ function PageFilter(props) {
|
|
|
7829
7831
|
const handleRangeChangeCurried = (startKey, endKey) => (start, end) => {
|
|
7830
7832
|
onChange({ [startKey]: start, [endKey]: end });
|
|
7831
7833
|
};
|
|
7832
|
-
const handleCheckboxChange = (key) => (checked) => {
|
|
7833
|
-
|
|
7834
|
+
const handleCheckboxChange = (key, autoSubmit) => (checked) => {
|
|
7835
|
+
const value = checked ? "true" : "false";
|
|
7836
|
+
onChange({ [key]: value });
|
|
7837
|
+
if (autoSubmit) pendingAutoSubmitRef.current = { key, value };
|
|
7834
7838
|
};
|
|
7835
7839
|
const handleSubmit = () => {
|
|
7836
7840
|
pendingAutoSubmitRef.current = null;
|
|
@@ -7876,7 +7880,7 @@ function PageFilter(props) {
|
|
|
7876
7880
|
{
|
|
7877
7881
|
name: String(optionKey),
|
|
7878
7882
|
value: currentValue,
|
|
7879
|
-
onChange: handleRadioChange(optionKey),
|
|
7883
|
+
onChange: handleRadioChange(optionKey, option.autoSubmit),
|
|
7880
7884
|
options: option.options,
|
|
7881
7885
|
direction: "horizontal"
|
|
7882
7886
|
}
|
|
@@ -7908,7 +7912,7 @@ function PageFilter(props) {
|
|
|
7908
7912
|
checked: currentValue === "true",
|
|
7909
7913
|
name: String(optionKey),
|
|
7910
7914
|
value: currentValue,
|
|
7911
|
-
onChange: handleCheckboxChange(optionKey)
|
|
7915
|
+
onChange: handleCheckboxChange(optionKey, option.autoSubmit)
|
|
7912
7916
|
}
|
|
7913
7917
|
) }, String(optionKey));
|
|
7914
7918
|
default: {
|