@kaushverse/pickify 1.2.2 → 1.2.4

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
@@ -753,14 +753,13 @@ var FloatingButton = class extends import_react4.default.Component {
753
753
  translateY = 0;
754
754
  }
755
755
  if (mode === "circle") {
756
- const total = actions.length;
757
- const startAngle = -Math.PI / 2;
758
- const endAngle = -Math.PI;
759
- const angle = startAngle + index / (total - 1 || 1) * (endAngle - startAngle);
760
- const r = radius || 60;
761
- const offset = 30;
762
- translateX = (r + offset) * Math.cos(angle);
763
- translateY = (r + offset) * 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);
764
763
  }
765
764
  const animStyle = {
766
765
  transform: [
@@ -837,7 +836,27 @@ var FloatingButton = class extends import_react4.default.Component {
837
836
  };
838
837
  const mainIcon = mainIconName || "add";
839
838
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native5.View, { style: [defaultStyles4.container, styles2?.container, style], children: [
840
- actions.map((a, i) => this.renderAction(a, i)),
839
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
840
+ import_react_native5.Animated.View,
841
+ {
842
+ style: [
843
+ defaultStyles4.circleContainer,
844
+ styles2?.circleContainer,
845
+ {
846
+ transform: [
847
+ {
848
+ scale: this.animation.interpolate({
849
+ inputRange: [0, 1],
850
+ outputRange: [0, 1]
851
+ })
852
+ }
853
+ ],
854
+ opacity: this.animation
855
+ }
856
+ ],
857
+ children: actions.map(this.renderAction)
858
+ }
859
+ ),
841
860
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native5.TouchableWithoutFeedback, { onPress: this.toggleMenu, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
842
861
  import_react_native5.Animated.View,
843
862
  {
@@ -884,6 +903,15 @@ var defaultStyles4 = import_react_native5.StyleSheet.create({
884
903
  alignItems: "center",
885
904
  justifyContent: "center"
886
905
  },
906
+ circleContainer: {
907
+ position: "absolute",
908
+ width: 200,
909
+ height: 200,
910
+ right: -60,
911
+ bottom: -80,
912
+ alignItems: "center",
913
+ justifyContent: "center"
914
+ },
887
915
  secondary: {
888
916
  position: "absolute",
889
917
  width: 48,
package/dist/index.mjs CHANGED
@@ -737,14 +737,13 @@ var FloatingButton = class extends React4.Component {
737
737
  translateY = 0;
738
738
  }
739
739
  if (mode === "circle") {
740
- const total = actions.length;
741
- const startAngle = -Math.PI / 2;
742
- const endAngle = -Math.PI;
743
- const angle = startAngle + index / (total - 1 || 1) * (endAngle - startAngle);
744
- const r = radius || 60;
745
- const offset = 30;
746
- translateX = (r + offset) * Math.cos(angle);
747
- translateY = (r + offset) * 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);
748
747
  }
749
748
  const animStyle = {
750
749
  transform: [
@@ -821,7 +820,27 @@ var FloatingButton = class extends React4.Component {
821
820
  };
822
821
  const mainIcon = mainIconName || "add";
823
822
  return /* @__PURE__ */ jsxs5(View5, { style: [defaultStyles4.container, styles2?.container, style], children: [
824
- actions.map((a, i) => this.renderAction(a, i)),
823
+ /* @__PURE__ */ jsx5(
824
+ Animated3.View,
825
+ {
826
+ style: [
827
+ defaultStyles4.circleContainer,
828
+ styles2?.circleContainer,
829
+ {
830
+ transform: [
831
+ {
832
+ scale: this.animation.interpolate({
833
+ inputRange: [0, 1],
834
+ outputRange: [0, 1]
835
+ })
836
+ }
837
+ ],
838
+ opacity: this.animation
839
+ }
840
+ ],
841
+ children: actions.map(this.renderAction)
842
+ }
843
+ ),
825
844
  /* @__PURE__ */ jsx5(TouchableWithoutFeedback, { onPress: this.toggleMenu, children: /* @__PURE__ */ jsx5(
826
845
  Animated3.View,
827
846
  {
@@ -868,6 +887,15 @@ var defaultStyles4 = StyleSheet5.create({
868
887
  alignItems: "center",
869
888
  justifyContent: "center"
870
889
  },
890
+ circleContainer: {
891
+ position: "absolute",
892
+ width: 200,
893
+ height: 200,
894
+ right: -60,
895
+ bottom: -80,
896
+ alignItems: "center",
897
+ justifyContent: "center"
898
+ },
871
899
  secondary: {
872
900
  position: "absolute",
873
901
  width: 48,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaushverse/pickify",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
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",