@appfunnel-dev/sdk 0.10.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/{chunk-EVUYCLVY.cjs → chunk-5E6WNNU4.cjs} +7 -3
- package/dist/chunk-5E6WNNU4.cjs.map +1 -0
- package/dist/{chunk-H3KHXZSI.js → chunk-DAHMOQ63.js} +8 -4
- package/dist/chunk-DAHMOQ63.js.map +1 -0
- package/dist/{chunk-XP44I2MU.cjs → chunk-ECWTUTEJ.cjs} +6 -6
- package/dist/{chunk-XP44I2MU.cjs.map → chunk-ECWTUTEJ.cjs.map} +1 -1
- package/dist/{chunk-P4SLDMWY.js → chunk-GZKA33W2.js} +3 -3
- package/dist/{chunk-P4SLDMWY.js.map → chunk-GZKA33W2.js.map} +1 -1
- package/dist/elements/index.cjs +28 -8
- package/dist/elements/index.cjs.map +1 -1
- package/dist/elements/index.d.cts +6 -2
- package/dist/elements/index.d.ts +6 -2
- package/dist/elements/index.js +24 -4
- package/dist/elements/index.js.map +1 -1
- package/dist/index.cjs +50 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +26 -8
- package/dist/index.js.map +1 -1
- package/dist/{internal-C9MOEdND.d.cts → internal-BuotLNwa.d.cts} +2 -0
- package/dist/{internal-C9MOEdND.d.ts → internal-BuotLNwa.d.ts} +2 -0
- package/dist/internal.cjs +2 -2
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/package.json +3 -2
- package/dist/chunk-EVUYCLVY.cjs.map +0 -1
- package/dist/chunk-H3KHXZSI.js.map +0 -1
|
@@ -572,10 +572,12 @@ interface SingleSelectProps<T> {
|
|
|
572
572
|
autoAdvance?: boolean;
|
|
573
573
|
/** Delay in ms before auto-advancing (default: 200) */
|
|
574
574
|
autoAdvanceDelay?: number;
|
|
575
|
+
/** Tap/click animation style (default: "none") */
|
|
576
|
+
clickAnimation?: 'none' | 'shrink' | 'grow';
|
|
575
577
|
/** Container className */
|
|
576
578
|
className?: string;
|
|
577
579
|
}
|
|
578
|
-
declare function SingleSelect<T>({ responseKey, options, keyExtractor, renderItem, autoAdvance, autoAdvanceDelay, className, }: SingleSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
580
|
+
declare function SingleSelect<T>({ responseKey, options, keyExtractor, renderItem, autoAdvance, autoAdvanceDelay, clickAnimation, className, }: SingleSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
579
581
|
|
|
580
582
|
interface MultiSelectProps<T> {
|
|
581
583
|
/** The response key to store the selected values under (in answers.*) */
|
|
@@ -594,10 +596,12 @@ interface MultiSelectProps<T> {
|
|
|
594
596
|
min?: number;
|
|
595
597
|
/** Maximum number of selections allowed (default: unlimited) */
|
|
596
598
|
max?: number;
|
|
599
|
+
/** Tap/click animation style (default: "none") */
|
|
600
|
+
clickAnimation?: 'none' | 'shrink' | 'grow';
|
|
597
601
|
/** Container className */
|
|
598
602
|
className?: string;
|
|
599
603
|
}
|
|
600
|
-
declare function MultiSelect<T>({ responseKey, options, keyExtractor, renderItem, min, max, className, }: MultiSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
604
|
+
declare function MultiSelect<T>({ responseKey, options, keyExtractor, renderItem, min, max, clickAnimation, className, }: MultiSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
601
605
|
|
|
602
606
|
interface LoadingProps {
|
|
603
607
|
/** Spinner color (default: currentColor, inherits from parent) */
|
package/dist/elements/index.d.ts
CHANGED
|
@@ -572,10 +572,12 @@ interface SingleSelectProps<T> {
|
|
|
572
572
|
autoAdvance?: boolean;
|
|
573
573
|
/** Delay in ms before auto-advancing (default: 200) */
|
|
574
574
|
autoAdvanceDelay?: number;
|
|
575
|
+
/** Tap/click animation style (default: "none") */
|
|
576
|
+
clickAnimation?: 'none' | 'shrink' | 'grow';
|
|
575
577
|
/** Container className */
|
|
576
578
|
className?: string;
|
|
577
579
|
}
|
|
578
|
-
declare function SingleSelect<T>({ responseKey, options, keyExtractor, renderItem, autoAdvance, autoAdvanceDelay, className, }: SingleSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
580
|
+
declare function SingleSelect<T>({ responseKey, options, keyExtractor, renderItem, autoAdvance, autoAdvanceDelay, clickAnimation, className, }: SingleSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
579
581
|
|
|
580
582
|
interface MultiSelectProps<T> {
|
|
581
583
|
/** The response key to store the selected values under (in answers.*) */
|
|
@@ -594,10 +596,12 @@ interface MultiSelectProps<T> {
|
|
|
594
596
|
min?: number;
|
|
595
597
|
/** Maximum number of selections allowed (default: unlimited) */
|
|
596
598
|
max?: number;
|
|
599
|
+
/** Tap/click animation style (default: "none") */
|
|
600
|
+
clickAnimation?: 'none' | 'shrink' | 'grow';
|
|
597
601
|
/** Container className */
|
|
598
602
|
className?: string;
|
|
599
603
|
}
|
|
600
|
-
declare function MultiSelect<T>({ responseKey, options, keyExtractor, renderItem, min, max, className, }: MultiSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
604
|
+
declare function MultiSelect<T>({ responseKey, options, keyExtractor, renderItem, min, max, clickAnimation, className, }: MultiSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
601
605
|
|
|
602
606
|
interface LoadingProps {
|
|
603
607
|
/** Spinner color (default: currentColor, inherits from parent) */
|
package/dist/elements/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useResponse, useNavigation } from '../chunk-
|
|
2
|
-
import { __require } from '../chunk-
|
|
1
|
+
import { useResponse, useNavigation } from '../chunk-GZKA33W2.js';
|
|
2
|
+
import { __require } from '../chunk-DAHMOQ63.js';
|
|
3
3
|
import * as React27 from 'react';
|
|
4
4
|
import { forwardRef, useRef, useMemo, useCallback, useImperativeHandle, useEffect, useState, createContext, useId, useContext, useInsertionEffect, Children, isValidElement, useLayoutEffect, Fragment as Fragment$1, createElement, Component } from 'react';
|
|
5
5
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
@@ -12059,6 +12059,7 @@ function SingleSelect({
|
|
|
12059
12059
|
renderItem,
|
|
12060
12060
|
autoAdvance = true,
|
|
12061
12061
|
autoAdvanceDelay = 200,
|
|
12062
|
+
clickAnimation = "none",
|
|
12062
12063
|
className
|
|
12063
12064
|
}) {
|
|
12064
12065
|
const [selected, setSelected] = useResponse(responseKey);
|
|
@@ -12085,7 +12086,16 @@ function SingleSelect({
|
|
|
12085
12086
|
return /* @__PURE__ */ jsx("div", { className, children: options.map((item, index) => {
|
|
12086
12087
|
const key = getKey(item, index);
|
|
12087
12088
|
const active = selected === key;
|
|
12088
|
-
return /* @__PURE__ */ jsx(
|
|
12089
|
+
return /* @__PURE__ */ jsx(
|
|
12090
|
+
motion.div,
|
|
12091
|
+
{
|
|
12092
|
+
onClick: () => handleSelect(key),
|
|
12093
|
+
style: { cursor: "pointer" },
|
|
12094
|
+
...clickAnimation !== "none" ? { whileTap: { scale: clickAnimation === "shrink" ? 0.95 : 1.05 }, transition: { duration: 0.15 } } : {},
|
|
12095
|
+
children: renderItem({ item, index, active })
|
|
12096
|
+
},
|
|
12097
|
+
key
|
|
12098
|
+
);
|
|
12089
12099
|
}) });
|
|
12090
12100
|
}
|
|
12091
12101
|
function MultiSelect({
|
|
@@ -12095,6 +12105,7 @@ function MultiSelect({
|
|
|
12095
12105
|
renderItem,
|
|
12096
12106
|
min = 0,
|
|
12097
12107
|
max,
|
|
12108
|
+
clickAnimation = "none",
|
|
12098
12109
|
className
|
|
12099
12110
|
}) {
|
|
12100
12111
|
const [selected, setSelected] = useResponse(responseKey);
|
|
@@ -12127,7 +12138,16 @@ function MultiSelect({
|
|
|
12127
12138
|
return /* @__PURE__ */ jsx("div", { className, children: options.map((item, index) => {
|
|
12128
12139
|
const key = getKey(item, index);
|
|
12129
12140
|
const active = currentSelection.includes(key);
|
|
12130
|
-
return /* @__PURE__ */ jsx(
|
|
12141
|
+
return /* @__PURE__ */ jsx(
|
|
12142
|
+
motion.div,
|
|
12143
|
+
{
|
|
12144
|
+
onClick: () => handleToggle(key),
|
|
12145
|
+
style: { cursor: "pointer" },
|
|
12146
|
+
...clickAnimation !== "none" ? { whileTap: { scale: clickAnimation === "shrink" ? 0.95 : 1.05 }, transition: { duration: 0.15 } } : {},
|
|
12147
|
+
children: renderItem({ item, index, active })
|
|
12148
|
+
},
|
|
12149
|
+
key
|
|
12150
|
+
);
|
|
12131
12151
|
}) });
|
|
12132
12152
|
}
|
|
12133
12153
|
var SIZE = {
|