@kaushverse/pickify 1.1.16 → 1.2.1

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.js CHANGED
@@ -737,8 +737,7 @@ var FloatingButton = class extends import_react4.default.Component {
737
737
  renderAction = (action, index) => {
738
738
  const {
739
739
  mode = "vertical",
740
- radius = 65,
741
- // ✅ FIXED (was 100)
740
+ radius = 100,
742
741
  actions,
743
742
  renderItemIcon,
744
743
  styles: styles2
@@ -746,18 +745,21 @@ var FloatingButton = class extends import_react4.default.Component {
746
745
  let translateX = 0;
747
746
  let translateY = 0;
748
747
  if (mode === "vertical") {
749
- translateY = -60 * (index + 1);
748
+ translateY = -70 * (index + 1);
749
+ translateX = 0;
750
750
  }
751
751
  if (mode === "horizontal") {
752
- translateX = -60 * (index + 1);
752
+ translateX = -70 * (index + 1);
753
+ translateY = 0;
753
754
  }
754
755
  if (mode === "circle") {
755
- const total = actions.length;
756
- const spread = Math.PI / 2.5;
757
- const start = -spread;
758
- const angle = start + index / (total - 1 || 1) * spread;
759
- translateX = radius * Math.cos(angle);
760
- translateY = radius * Math.sin(angle);
756
+ const totalActions = actions.length;
757
+ const startAngle = -Math.PI / 3;
758
+ const endAngle = -Math.PI * 0.8;
759
+ const angle = startAngle + index / (totalActions - 1 || 1) * (endAngle - startAngle);
760
+ const adjustedRadius = radius * 0.65;
761
+ translateX = adjustedRadius * Math.cos(angle);
762
+ translateY = adjustedRadius * Math.sin(angle);
761
763
  }
762
764
  const animStyle = {
763
765
  transform: [
@@ -776,7 +778,7 @@ var FloatingButton = class extends import_react4.default.Component {
776
778
  {
777
779
  scale: this.animation.interpolate({
778
780
  inputRange: [0, 0.5, 1],
779
- outputRange: [0, 1.1, 1]
781
+ outputRange: [0, 1.2, 1]
780
782
  })
781
783
  }
782
784
  ],
@@ -822,6 +824,16 @@ var FloatingButton = class extends import_react4.default.Component {
822
824
  }
823
825
  ]
824
826
  };
827
+ const scale = {
828
+ transform: [
829
+ {
830
+ scale: this.animation.interpolate({
831
+ inputRange: [0, 0.5, 1],
832
+ outputRange: [1, 1.1, 1]
833
+ })
834
+ }
835
+ ]
836
+ };
825
837
  const mainIcon = mainIconName || "add";
826
838
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native5.View, { style: [defaultStyles4.container, styles2?.container, style], children: [
827
839
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
@@ -842,14 +854,20 @@ var FloatingButton = class extends import_react4.default.Component {
842
854
  opacity: this.animation
843
855
  }
844
856
  ],
845
- children: actions.map((a, i) => this.renderAction(a, i))
857
+ children: actions.map(this.renderAction)
846
858
  }
847
859
  ),
848
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native5.TouchableWithoutFeedback, { onPress: this.toggleMenu, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native5.Animated.View, { style: [defaultStyles4.mainButtonWrapper, rotation], children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native5.View, { style: [defaultStyles4.button, styles2?.mainButton], children: renderMainIcon?.({
849
- name: mainIcon,
850
- size: 26,
851
- color: "#FFF"
852
- }) }) }) })
860
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native5.TouchableWithoutFeedback, { onPress: this.toggleMenu, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
861
+ import_react_native5.Animated.View,
862
+ {
863
+ style: [defaultStyles4.mainButtonWrapper, rotation, scale],
864
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native5.View, { style: [defaultStyles4.button, styles2?.mainButton], children: renderMainIcon?.({
865
+ name: mainIcon,
866
+ size: 26,
867
+ color: "#FFF"
868
+ }) })
869
+ }
870
+ ) })
853
871
  ] });
854
872
  }
855
873
  };
@@ -868,6 +886,13 @@ var defaultStyles4 = import_react_native5.StyleSheet.create({
868
886
  backgroundColor: "#F02A4B",
869
887
  alignItems: "center",
870
888
  justifyContent: "center",
889
+ shadowColor: "#000",
890
+ shadowOffset: {
891
+ width: 0,
892
+ height: 2
893
+ },
894
+ shadowOpacity: 0.25,
895
+ shadowRadius: 3.84,
871
896
  elevation: 5
872
897
  },
873
898
  button: {
@@ -880,10 +905,10 @@ var defaultStyles4 = import_react_native5.StyleSheet.create({
880
905
  },
881
906
  circleContainer: {
882
907
  position: "absolute",
883
- width: 140,
884
- height: 140,
885
- right: -40,
886
- bottom: -40,
908
+ width: 200,
909
+ height: 200,
910
+ right: -60,
911
+ bottom: -60,
887
912
  alignItems: "center",
888
913
  justifyContent: "center"
889
914
  },
@@ -892,8 +917,16 @@ var defaultStyles4 = import_react_native5.StyleSheet.create({
892
917
  width: 48,
893
918
  height: 48,
894
919
  borderRadius: 24,
920
+ backgroundColor: "#F02A4B",
895
921
  alignItems: "center",
896
922
  justifyContent: "center",
923
+ shadowColor: "#000",
924
+ shadowOffset: {
925
+ width: 0,
926
+ height: 2
927
+ },
928
+ shadowOpacity: 0.25,
929
+ shadowRadius: 3.84,
897
930
  elevation: 5
898
931
  }
899
932
  });
package/dist/index.mjs CHANGED
@@ -721,8 +721,7 @@ var FloatingButton = class extends React4.Component {
721
721
  renderAction = (action, index) => {
722
722
  const {
723
723
  mode = "vertical",
724
- radius = 65,
725
- // ✅ FIXED (was 100)
724
+ radius = 100,
726
725
  actions,
727
726
  renderItemIcon,
728
727
  styles: styles2
@@ -730,18 +729,21 @@ var FloatingButton = class extends React4.Component {
730
729
  let translateX = 0;
731
730
  let translateY = 0;
732
731
  if (mode === "vertical") {
733
- translateY = -60 * (index + 1);
732
+ translateY = -70 * (index + 1);
733
+ translateX = 0;
734
734
  }
735
735
  if (mode === "horizontal") {
736
- translateX = -60 * (index + 1);
736
+ translateX = -70 * (index + 1);
737
+ translateY = 0;
737
738
  }
738
739
  if (mode === "circle") {
739
- const total = actions.length;
740
- const spread = Math.PI / 2.5;
741
- const start = -spread;
742
- const angle = start + index / (total - 1 || 1) * spread;
743
- translateX = radius * Math.cos(angle);
744
- translateY = radius * Math.sin(angle);
740
+ const totalActions = actions.length;
741
+ const startAngle = -Math.PI / 3;
742
+ const endAngle = -Math.PI * 0.8;
743
+ const angle = startAngle + index / (totalActions - 1 || 1) * (endAngle - startAngle);
744
+ const adjustedRadius = radius * 0.65;
745
+ translateX = adjustedRadius * Math.cos(angle);
746
+ translateY = adjustedRadius * Math.sin(angle);
745
747
  }
746
748
  const animStyle = {
747
749
  transform: [
@@ -760,7 +762,7 @@ var FloatingButton = class extends React4.Component {
760
762
  {
761
763
  scale: this.animation.interpolate({
762
764
  inputRange: [0, 0.5, 1],
763
- outputRange: [0, 1.1, 1]
765
+ outputRange: [0, 1.2, 1]
764
766
  })
765
767
  }
766
768
  ],
@@ -806,6 +808,16 @@ var FloatingButton = class extends React4.Component {
806
808
  }
807
809
  ]
808
810
  };
811
+ const scale = {
812
+ transform: [
813
+ {
814
+ scale: this.animation.interpolate({
815
+ inputRange: [0, 0.5, 1],
816
+ outputRange: [1, 1.1, 1]
817
+ })
818
+ }
819
+ ]
820
+ };
809
821
  const mainIcon = mainIconName || "add";
810
822
  return /* @__PURE__ */ jsxs5(View5, { style: [defaultStyles4.container, styles2?.container, style], children: [
811
823
  /* @__PURE__ */ jsx5(
@@ -826,14 +838,20 @@ var FloatingButton = class extends React4.Component {
826
838
  opacity: this.animation
827
839
  }
828
840
  ],
829
- children: actions.map((a, i) => this.renderAction(a, i))
841
+ children: actions.map(this.renderAction)
830
842
  }
831
843
  ),
832
- /* @__PURE__ */ jsx5(TouchableWithoutFeedback, { onPress: this.toggleMenu, children: /* @__PURE__ */ jsx5(Animated3.View, { style: [defaultStyles4.mainButtonWrapper, rotation], children: /* @__PURE__ */ jsx5(View5, { style: [defaultStyles4.button, styles2?.mainButton], children: renderMainIcon?.({
833
- name: mainIcon,
834
- size: 26,
835
- color: "#FFF"
836
- }) }) }) })
844
+ /* @__PURE__ */ jsx5(TouchableWithoutFeedback, { onPress: this.toggleMenu, children: /* @__PURE__ */ jsx5(
845
+ Animated3.View,
846
+ {
847
+ style: [defaultStyles4.mainButtonWrapper, rotation, scale],
848
+ children: /* @__PURE__ */ jsx5(View5, { style: [defaultStyles4.button, styles2?.mainButton], children: renderMainIcon?.({
849
+ name: mainIcon,
850
+ size: 26,
851
+ color: "#FFF"
852
+ }) })
853
+ }
854
+ ) })
837
855
  ] });
838
856
  }
839
857
  };
@@ -852,6 +870,13 @@ var defaultStyles4 = StyleSheet5.create({
852
870
  backgroundColor: "#F02A4B",
853
871
  alignItems: "center",
854
872
  justifyContent: "center",
873
+ shadowColor: "#000",
874
+ shadowOffset: {
875
+ width: 0,
876
+ height: 2
877
+ },
878
+ shadowOpacity: 0.25,
879
+ shadowRadius: 3.84,
855
880
  elevation: 5
856
881
  },
857
882
  button: {
@@ -864,10 +889,10 @@ var defaultStyles4 = StyleSheet5.create({
864
889
  },
865
890
  circleContainer: {
866
891
  position: "absolute",
867
- width: 140,
868
- height: 140,
869
- right: -40,
870
- bottom: -40,
892
+ width: 200,
893
+ height: 200,
894
+ right: -60,
895
+ bottom: -60,
871
896
  alignItems: "center",
872
897
  justifyContent: "center"
873
898
  },
@@ -876,8 +901,16 @@ var defaultStyles4 = StyleSheet5.create({
876
901
  width: 48,
877
902
  height: 48,
878
903
  borderRadius: 24,
904
+ backgroundColor: "#F02A4B",
879
905
  alignItems: "center",
880
906
  justifyContent: "center",
907
+ shadowColor: "#000",
908
+ shadowOffset: {
909
+ width: 0,
910
+ height: 2
911
+ },
912
+ shadowOpacity: 0.25,
913
+ shadowRadius: 3.84,
881
914
  elevation: 5
882
915
  }
883
916
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaushverse/pickify",
3
- "version": "1.1.16",
3
+ "version": "1.2.1",
4
4
  "description": "A fully customizable React Native picker with search, multi-select, grouping, and async support.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",