@appfunnel-dev/sdk 0.11.0 → 0.12.0
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/elements/index.cjs
CHANGED
|
@@ -12084,6 +12084,7 @@ function SingleSelect({
|
|
|
12084
12084
|
renderItem,
|
|
12085
12085
|
autoAdvance = true,
|
|
12086
12086
|
autoAdvanceDelay = 200,
|
|
12087
|
+
clickAnimation = "none",
|
|
12087
12088
|
className
|
|
12088
12089
|
}) {
|
|
12089
12090
|
const [selected, setSelected] = chunkECWTUTEJ_cjs.useResponse(responseKey);
|
|
@@ -12110,7 +12111,16 @@ function SingleSelect({
|
|
|
12110
12111
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: options.map((item, index) => {
|
|
12111
12112
|
const key = getKey(item, index);
|
|
12112
12113
|
const active = selected === key;
|
|
12113
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12114
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12115
|
+
motion.div,
|
|
12116
|
+
{
|
|
12117
|
+
onClick: () => handleSelect(key),
|
|
12118
|
+
style: { cursor: "pointer" },
|
|
12119
|
+
...clickAnimation !== "none" ? { whileTap: { scale: clickAnimation === "shrink" ? 0.95 : 1.05 }, transition: { duration: 0.15 } } : {},
|
|
12120
|
+
children: renderItem({ item, index, active })
|
|
12121
|
+
},
|
|
12122
|
+
key
|
|
12123
|
+
);
|
|
12114
12124
|
}) });
|
|
12115
12125
|
}
|
|
12116
12126
|
function MultiSelect({
|
|
@@ -12120,6 +12130,7 @@ function MultiSelect({
|
|
|
12120
12130
|
renderItem,
|
|
12121
12131
|
min = 0,
|
|
12122
12132
|
max,
|
|
12133
|
+
clickAnimation = "none",
|
|
12123
12134
|
className
|
|
12124
12135
|
}) {
|
|
12125
12136
|
const [selected, setSelected] = chunkECWTUTEJ_cjs.useResponse(responseKey);
|
|
@@ -12152,7 +12163,16 @@ function MultiSelect({
|
|
|
12152
12163
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: options.map((item, index) => {
|
|
12153
12164
|
const key = getKey(item, index);
|
|
12154
12165
|
const active = currentSelection.includes(key);
|
|
12155
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12166
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12167
|
+
motion.div,
|
|
12168
|
+
{
|
|
12169
|
+
onClick: () => handleToggle(key),
|
|
12170
|
+
style: { cursor: "pointer" },
|
|
12171
|
+
...clickAnimation !== "none" ? { whileTap: { scale: clickAnimation === "shrink" ? 0.95 : 1.05 }, transition: { duration: 0.15 } } : {},
|
|
12172
|
+
children: renderItem({ item, index, active })
|
|
12173
|
+
},
|
|
12174
|
+
key
|
|
12175
|
+
);
|
|
12156
12176
|
}) });
|
|
12157
12177
|
}
|
|
12158
12178
|
var SIZE = {
|