@farmzone/fz-react-ui 1.0.9 → 1.0.10
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 +25 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +25 -3
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3454,8 +3454,8 @@ var VARIANT_CONFIG = {
|
|
|
3454
3454
|
closeBtn: "text-gray-400 group-hover:text-gray-600"
|
|
3455
3455
|
},
|
|
3456
3456
|
"system-light": {
|
|
3457
|
-
container: "bg-
|
|
3458
|
-
iconBg: "bg-white border border-gray-200 shadow-
|
|
3457
|
+
container: "bg-[#ededed] border-gray-200",
|
|
3458
|
+
iconBg: "bg-white border border-gray-200 shadow-xs rounded-lg",
|
|
3459
3459
|
iconColor: "text-slate-600",
|
|
3460
3460
|
titleColor: "text-gray-900",
|
|
3461
3461
|
descColor: "text-gray-500",
|
|
@@ -7756,7 +7756,7 @@ function PageFilter(props) {
|
|
|
7756
7756
|
value: currentValue,
|
|
7757
7757
|
onChange: handleSelectChange(optionKey),
|
|
7758
7758
|
options: option.options,
|
|
7759
|
-
placeholder: "\uC120\uD0DD",
|
|
7759
|
+
placeholder: option.placeholder || "\uC120\uD0DD",
|
|
7760
7760
|
canReset: option.canReset ?? true,
|
|
7761
7761
|
containerClassName: option.containerClassName ?? "w-30"
|
|
7762
7762
|
}
|
|
@@ -7977,6 +7977,7 @@ function MultiTabBar(props) {
|
|
|
7977
7977
|
};
|
|
7978
7978
|
const handleDrop = (e, targetTabId) => {
|
|
7979
7979
|
e.preventDefault();
|
|
7980
|
+
e.stopPropagation();
|
|
7980
7981
|
if (!draggingId || draggingId === targetTabId) {
|
|
7981
7982
|
setDraggingId(null);
|
|
7982
7983
|
setDropTargetId(null);
|
|
@@ -7998,6 +7999,23 @@ function MultiTabBar(props) {
|
|
|
7998
7999
|
setDraggingId(null);
|
|
7999
8000
|
setDropTargetId(null);
|
|
8000
8001
|
};
|
|
8002
|
+
const handleContainerDrop = (e) => {
|
|
8003
|
+
e.preventDefault();
|
|
8004
|
+
if (!draggingId || !onTabsReorder) {
|
|
8005
|
+
setDraggingId(null);
|
|
8006
|
+
setDropTargetId(null);
|
|
8007
|
+
return;
|
|
8008
|
+
}
|
|
8009
|
+
const fromIdx = tabs.findIndex((t) => t.id === draggingId);
|
|
8010
|
+
if (fromIdx !== -1 && fromIdx < tabs.length - 1) {
|
|
8011
|
+
const newTabs = [...tabs];
|
|
8012
|
+
const moved = newTabs.splice(fromIdx, 1)[0];
|
|
8013
|
+
newTabs.push(moved);
|
|
8014
|
+
onTabsReorder(newTabs);
|
|
8015
|
+
}
|
|
8016
|
+
setDraggingId(null);
|
|
8017
|
+
setDropTargetId(null);
|
|
8018
|
+
};
|
|
8001
8019
|
const handleDragEnd = () => {
|
|
8002
8020
|
setDraggingId(null);
|
|
8003
8021
|
setDropTargetId(null);
|
|
@@ -8029,6 +8047,10 @@ function MultiTabBar(props) {
|
|
|
8029
8047
|
className: `flex-1 min-w-0 flex items-end gap-0.5 ${s.scrollPadding} overflow-x-auto [&::-webkit-scrollbar]:hidden`,
|
|
8030
8048
|
style: { scrollbarWidth: "none" },
|
|
8031
8049
|
onScroll: updateFades,
|
|
8050
|
+
onDragOver: (e) => {
|
|
8051
|
+
if (draggingId) e.preventDefault();
|
|
8052
|
+
},
|
|
8053
|
+
onDrop: handleContainerDrop,
|
|
8032
8054
|
children: tabs.map((tab) => {
|
|
8033
8055
|
const isActive = tab.id === activeTabId;
|
|
8034
8056
|
const isDraggingThis = tab.id === draggingId;
|