@chayns-components/swipeable-wrapper 5.0.0-beta.304 → 5.0.0-beta.310
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/lib/components/swipeable-wrapper/SwipeableWrapper.js +7 -11
- package/lib/components/swipeable-wrapper/SwipeableWrapper.js.map +1 -1
- package/lib/components/swipeable-wrapper/SwipeableWrapper.styles.d.ts +540 -2
- package/lib/components/swipeable-wrapper/SwipeableWrapper.styles.js.map +1 -1
- package/lib/components/swipeable-wrapper/swipeable-action/SwipeableAction.js +2 -2
- package/lib/components/swipeable-wrapper/swipeable-action/SwipeableAction.js.map +1 -1
- package/lib/components/swipeable-wrapper/swipeable-action/SwipeableAction.styles.d.ts +269 -3
- package/package.json +14 -14
|
@@ -31,23 +31,22 @@ const SwipeableWrapper = _ref => {
|
|
|
31
31
|
const swipeableWrapperRef = (0, _react.useRef)(null);
|
|
32
32
|
const listItemXOffset = (0, _framerMotion.useMotionValue)(0);
|
|
33
33
|
const close = (0, _react.useCallback)(() => {
|
|
34
|
-
(0, _framerMotion.animate)(listItemXOffset, 0);
|
|
34
|
+
void (0, _framerMotion.animate)(listItemXOffset, 0);
|
|
35
35
|
}, [listItemXOffset]);
|
|
36
36
|
const open = (0, _react.useCallback)(direction => {
|
|
37
37
|
switch (direction) {
|
|
38
38
|
case 'left':
|
|
39
|
-
(0, _framerMotion.animate)(listItemXOffset, _SwipeableAction.SWIPEABLE_ACTION_WIDTH * leftActions.length);
|
|
39
|
+
void (0, _framerMotion.animate)(listItemXOffset, _SwipeableAction.SWIPEABLE_ACTION_WIDTH * leftActions.length);
|
|
40
40
|
break;
|
|
41
41
|
case 'right':
|
|
42
|
-
(0, _framerMotion.animate)(listItemXOffset, -_SwipeableAction.SWIPEABLE_ACTION_WIDTH * rightActions.length);
|
|
42
|
+
void (0, _framerMotion.animate)(listItemXOffset, -_SwipeableAction.SWIPEABLE_ACTION_WIDTH * rightActions.length);
|
|
43
43
|
break;
|
|
44
44
|
default:
|
|
45
45
|
break;
|
|
46
46
|
}
|
|
47
47
|
}, [leftActions.length, listItemXOffset, rightActions.length]);
|
|
48
48
|
(0, _react.useEffect)(() => {
|
|
49
|
-
|
|
50
|
-
const width = (_swipeableWrapperRef$ = swipeableWrapperRef.current) === null || _swipeableWrapperRef$ === void 0 || (_swipeableWrapperRef$ = _swipeableWrapperRef$.parentElement) === null || _swipeableWrapperRef$ === void 0 ? void 0 : _swipeableWrapperRef$.offsetWidth;
|
|
49
|
+
const width = swipeableWrapperRef.current?.parentElement?.offsetWidth;
|
|
51
50
|
|
|
52
51
|
// This check was deliberately chosen because a width of 0 is also not permitted.
|
|
53
52
|
if (width) {
|
|
@@ -67,11 +66,10 @@ const SwipeableWrapper = _ref => {
|
|
|
67
66
|
// Close an opened menu when anything outside it is tapped
|
|
68
67
|
(0, _react.useEffect)(() => {
|
|
69
68
|
function closeCallback(event) {
|
|
70
|
-
var _swipeableWrapperRef$2;
|
|
71
69
|
const eventTarget = event.target;
|
|
72
70
|
|
|
73
71
|
// @ts-expect-error: Pretty sure that the event target is always a Node.
|
|
74
|
-
if (eventTarget && !
|
|
72
|
+
if (eventTarget && !swipeableWrapperRef.current?.contains(eventTarget)) {
|
|
75
73
|
close();
|
|
76
74
|
}
|
|
77
75
|
}
|
|
@@ -105,12 +103,10 @@ const SwipeableWrapper = _ref => {
|
|
|
105
103
|
const handlePanEnd = (0, _react.useCallback)(() => {
|
|
106
104
|
const offset = listItemXOffset.get();
|
|
107
105
|
if (offset > leftThreshold) {
|
|
108
|
-
|
|
109
|
-
(_leftActions$ = leftActions[0]) === null || _leftActions$ === void 0 || _leftActions$.action();
|
|
106
|
+
leftActions[0]?.action();
|
|
110
107
|
close();
|
|
111
108
|
} else if (offset < rightThreshold) {
|
|
112
|
-
|
|
113
|
-
(_rightActions = rightActions[rightActions.length - 1]) === null || _rightActions === void 0 || _rightActions.action();
|
|
109
|
+
rightActions[rightActions.length - 1]?.action();
|
|
114
110
|
close();
|
|
115
111
|
} else {
|
|
116
112
|
let state;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwipeableWrapper.js","names":["_chaynsApi","require","_framerMotion","_react","_interopRequireWildcard","_threshold","_SwipeableAction","_SwipeableWrapper","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","SwipeableWrapper","_ref","children","leftActions","rightActions","leftThreshold","setLeftThreshold","useState","calcThreshold","actionCount","length","direction","width","window","innerWidth","rightThreshold","setRightThreshold","swipeableWrapperRef","useRef","listItemXOffset","useMotionValue","close","useCallback","animate","open","SWIPEABLE_ACTION_WIDTH","useEffect","_swipeableWrapperRef$","current","parentElement","offsetWidth","closeCallback","event","_swipeableWrapperRef$2","eventTarget","target","contains","document","addEventListener","removeEventListener","onChange","newValue","previous","getPrevious","hasCrossedLeftThreshold","hasCrossedRightThreshold","vibrate","iOSFeedbackVibration","pattern","handlePan","_","info","currentXOffset","dampingFactor","offset","x","delta","Math","abs","handlePanEnd","_leftActions$","action","_rightActions","state","leftActionElements","useMemo","Array","from","reverse","map","item","index","createElement","activationThreshold","key","position","totalActionCount","rightActionElements","StyledMotionSwipeableWrapper","onPan","onPanEnd","ref","style","StyledSwipeableWrapperContent","displayName","_default","exports"],"sources":["../../../src/components/swipeable-wrapper/SwipeableWrapper.tsx"],"sourcesContent":["import { vibrate } from 'chayns-api';\nimport { animate, PanInfo, useMotionValue } from 'framer-motion';\nimport React, {\n CSSProperties,\n FC,\n ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { calcThreshold } from '../../utils/threshold';\nimport SwipeableAction, { SWIPEABLE_ACTION_WIDTH } from './swipeable-action/SwipeableAction';\nimport {\n StyledMotionSwipeableWrapper,\n StyledSwipeableWrapperContent,\n} from './SwipeableWrapper.styles';\n\nexport type SwipeableActionItem = {\n action: VoidFunction;\n backgroundColor: CSSProperties['backgroundColor'];\n color: CSSProperties['color'];\n text?: ReactNode;\n icon: ReactNode;\n key: string;\n};\n\nexport type SwipeableWrapperProps = {\n /**\n * The content of the Swipeable item.\n */\n children: ReactNode;\n /**\n * The left-side actions, ordered from the left to the right.\n */\n leftActions?: SwipeableActionItem[];\n /**\n * The right-side actions, ordered from left to the right.\n */\n rightActions?: SwipeableActionItem[];\n};\n\nconst SwipeableWrapper: FC<SwipeableWrapperProps> = ({\n children,\n leftActions = [],\n rightActions = [],\n}) => {\n const [leftThreshold, setLeftThreshold] = useState(\n calcThreshold({\n actionCount: leftActions.length,\n direction: 'left',\n width: window.innerWidth,\n })\n );\n\n const [rightThreshold, setRightThreshold] = useState(\n calcThreshold({\n actionCount: rightActions.length,\n direction: 'right',\n width: window.innerWidth,\n })\n );\n\n const swipeableWrapperRef = useRef<HTMLDivElement | null>(null);\n\n const listItemXOffset = useMotionValue(0);\n\n const close = useCallback(() => {\n animate(listItemXOffset, 0);\n }, [listItemXOffset]);\n\n const open = useCallback(\n (direction: 'left' | 'right') => {\n switch (direction) {\n case 'left':\n animate(listItemXOffset, SWIPEABLE_ACTION_WIDTH * leftActions.length);\n break;\n case 'right':\n animate(listItemXOffset, -SWIPEABLE_ACTION_WIDTH * rightActions.length);\n break;\n default:\n break;\n }\n },\n [leftActions.length, listItemXOffset, rightActions.length]\n );\n\n useEffect(() => {\n const width = swipeableWrapperRef.current?.parentElement?.offsetWidth;\n\n // This check was deliberately chosen because a width of 0 is also not permitted.\n if (width) {\n setLeftThreshold(\n calcThreshold({\n actionCount: leftActions.length,\n direction: 'left',\n width,\n })\n );\n\n setRightThreshold(\n calcThreshold({\n actionCount: rightActions.length,\n direction: 'right',\n width,\n })\n );\n }\n }, [leftActions.length, rightActions.length]);\n\n // Close an opened menu when anything outside it is tapped\n useEffect(() => {\n function closeCallback(event: MouseEvent | TouchEvent) {\n const eventTarget = event.target;\n\n // @ts-expect-error: Pretty sure that the event target is always a Node.\n if (eventTarget && !swipeableWrapperRef.current?.contains(eventTarget)) {\n close();\n }\n }\n\n document.addEventListener('mousedown', closeCallback);\n document.addEventListener('touchstart', closeCallback);\n\n return () => {\n document.removeEventListener('mousedown', closeCallback);\n document.removeEventListener('touchstart', closeCallback);\n };\n }, [close]);\n\n // Vibrate when the threshold is passed\n useEffect(\n () =>\n listItemXOffset.onChange((newValue: number) => {\n const previous = listItemXOffset.getPrevious();\n\n const hasCrossedLeftThreshold =\n (previous < leftThreshold && newValue >= leftThreshold) ||\n (previous > leftThreshold && newValue <= leftThreshold);\n\n const hasCrossedRightThreshold =\n (previous < rightThreshold && newValue >= rightThreshold) ||\n (previous > rightThreshold && newValue <= rightThreshold);\n\n if (hasCrossedLeftThreshold || hasCrossedRightThreshold) {\n void vibrate({ iOSFeedbackVibration: 6, pattern: [150] });\n }\n }),\n [leftThreshold, listItemXOffset, rightThreshold]\n );\n\n const handlePan = useCallback(\n (_: MouseEvent | TouchEvent | PointerEvent, info: PanInfo) => {\n const currentXOffset = listItemXOffset.get();\n\n const dampingFactor =\n (info.offset.x > 0 && leftActions.length > 0) ||\n (info.offset.x < 0 && rightActions.length > 0) ||\n (currentXOffset > 0 && info.delta.x < 0) ||\n (currentXOffset < 0 && info.delta.x > 0)\n ? 1\n : 0.75 / (Math.abs(info.offset.x) / 9);\n\n if (Math.abs(info.offset.x) > 30 || currentXOffset > 0) {\n listItemXOffset.set(currentXOffset + info.delta.x * dampingFactor);\n }\n },\n [leftActions.length, listItemXOffset, rightActions.length]\n );\n\n const handlePanEnd = useCallback(() => {\n const offset = listItemXOffset.get();\n\n if (offset > leftThreshold) {\n leftActions[0]?.action();\n close();\n } else if (offset < rightThreshold) {\n rightActions[rightActions.length - 1]?.action();\n close();\n } else {\n let state: 'left-open' | 'right-open' | 'closed';\n\n if (offset > 2) {\n state = 'left-open';\n } else if (offset < -2) {\n state = 'right-open';\n } else {\n state = 'closed';\n }\n\n // eslint-disable-next-line default-case\n switch (state) {\n case 'left-open':\n if (offset < SWIPEABLE_ACTION_WIDTH) {\n close();\n } else {\n open('left');\n }\n break;\n case 'right-open':\n if (offset > -SWIPEABLE_ACTION_WIDTH) {\n close();\n } else {\n open('right');\n }\n break;\n case 'closed':\n if (offset > SWIPEABLE_ACTION_WIDTH) {\n open('left');\n } else if (offset < -SWIPEABLE_ACTION_WIDTH) {\n open('right');\n } else {\n close();\n }\n }\n }\n }, [close, leftActions, leftThreshold, listItemXOffset, open, rightActions, rightThreshold]);\n\n const leftActionElements = useMemo(\n () =>\n Array.from(leftActions)\n .reverse()\n .map((item, index) => (\n <SwipeableAction\n activationThreshold={leftThreshold}\n close={close}\n index={index}\n item={item}\n key={item.key}\n listItemXOffset={listItemXOffset}\n position=\"left\"\n totalActionCount={leftActions.length}\n />\n )),\n [close, leftActions, leftThreshold, listItemXOffset]\n );\n\n const rightActionElements = useMemo(\n () =>\n rightActions.map((item, index) => (\n <SwipeableAction\n activationThreshold={rightThreshold}\n close={close}\n index={index}\n item={item}\n key={item.key}\n listItemXOffset={listItemXOffset}\n position=\"right\"\n totalActionCount={rightActions.length}\n />\n )),\n [close, rightActions, rightThreshold, listItemXOffset]\n );\n\n return (\n <StyledMotionSwipeableWrapper\n onPan={handlePan}\n onPanEnd={handlePanEnd}\n ref={swipeableWrapperRef}\n style={{ x: listItemXOffset }}\n >\n {leftActionElements}\n <StyledSwipeableWrapperContent>{children}</StyledSwipeableWrapperContent>\n {rightActionElements}\n </StyledMotionSwipeableWrapper>\n );\n};\n\nSwipeableWrapper.displayName = 'SwipeableWrapper';\n\nexport default SwipeableWrapper;\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,uBAAA,CAAAH,OAAA;AAUA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAF,uBAAA,CAAAH,OAAA;AACA,IAAAM,iBAAA,GAAAN,OAAA;AAGmC,SAAAO,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kD,KAAK,EAAEA,KAAM;IACbD,IAAI,EAAEA,IAAK;IACXI,GAAG,EAAEJ,IAAI,CAACI,GAAI;IACdvD,eAAe,EAAEA,eAAgB;IACjCwD,QAAQ,EAAC,OAAO;IAChBC,gBAAgB,EAAExE,YAAY,CAACM;EAAO,CACzC,CACJ,CAAC,EACN,CAACW,KAAK,EAAEjB,YAAY,EAAEW,cAAc,EAAEI,eAAe,CACzD,CAAC;EAED,oBACI7C,MAAA,CAAAW,OAAA,CAAAuF,aAAA,CAAC9F,iBAAA,CAAAoG,4BAA4B;IACzBC,KAAK,EAAE9B,SAAU;IACjB+B,QAAQ,EAAErB,YAAa;IACvBsB,GAAG,EAAEhE,mBAAoB;IACzBiE,KAAK,EAAE;MAAE3B,CAAC,EAAEpC;IAAgB;EAAE,GAE7B6C,kBAAkB,eACnB1F,MAAA,CAAAW,OAAA,CAAAuF,aAAA,CAAC9F,iBAAA,CAAAyG,6BAA6B,QAAEjF,QAAwC,CAAC,EACxE2E,mBACyB,CAAC;AAEvC,CAAC;AAED7E,gBAAgB,CAACoF,WAAW,GAAG,kBAAkB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAArG,OAAA,GAEnCe,gBAAgB"}
|
|
1
|
+
{"version":3,"file":"SwipeableWrapper.js","names":["_chaynsApi","require","_framerMotion","_react","_interopRequireWildcard","_threshold","_SwipeableAction","_SwipeableWrapper","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","SwipeableWrapper","_ref","children","leftActions","rightActions","leftThreshold","setLeftThreshold","useState","calcThreshold","actionCount","length","direction","width","window","innerWidth","rightThreshold","setRightThreshold","swipeableWrapperRef","useRef","listItemXOffset","useMotionValue","close","useCallback","animate","open","SWIPEABLE_ACTION_WIDTH","useEffect","current","parentElement","offsetWidth","closeCallback","event","eventTarget","target","contains","document","addEventListener","removeEventListener","onChange","newValue","previous","getPrevious","hasCrossedLeftThreshold","hasCrossedRightThreshold","vibrate","iOSFeedbackVibration","pattern","handlePan","_","info","currentXOffset","dampingFactor","offset","x","delta","Math","abs","handlePanEnd","action","state","leftActionElements","useMemo","Array","from","reverse","map","item","index","createElement","activationThreshold","key","position","totalActionCount","rightActionElements","StyledMotionSwipeableWrapper","onPan","onPanEnd","ref","style","StyledSwipeableWrapperContent","displayName","_default","exports"],"sources":["../../../src/components/swipeable-wrapper/SwipeableWrapper.tsx"],"sourcesContent":["import { vibrate } from 'chayns-api';\nimport { animate, PanInfo, useMotionValue } from 'framer-motion';\nimport React, {\n CSSProperties,\n FC,\n ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { calcThreshold } from '../../utils/threshold';\nimport SwipeableAction, { SWIPEABLE_ACTION_WIDTH } from './swipeable-action/SwipeableAction';\nimport {\n StyledMotionSwipeableWrapper,\n StyledSwipeableWrapperContent,\n} from './SwipeableWrapper.styles';\n\nexport type SwipeableActionItem = {\n action: VoidFunction;\n backgroundColor: CSSProperties['backgroundColor'];\n color: CSSProperties['color'];\n text?: ReactNode;\n icon: ReactNode;\n key: string;\n};\n\nexport type SwipeableWrapperProps = {\n /**\n * The content of the Swipeable item.\n */\n children: ReactNode;\n /**\n * The left-side actions, ordered from the left to the right.\n */\n leftActions?: SwipeableActionItem[];\n /**\n * The right-side actions, ordered from left to the right.\n */\n rightActions?: SwipeableActionItem[];\n};\n\nconst SwipeableWrapper: FC<SwipeableWrapperProps> = ({\n children,\n leftActions = [],\n rightActions = [],\n}) => {\n const [leftThreshold, setLeftThreshold] = useState(\n calcThreshold({\n actionCount: leftActions.length,\n direction: 'left',\n width: window.innerWidth,\n }),\n );\n\n const [rightThreshold, setRightThreshold] = useState(\n calcThreshold({\n actionCount: rightActions.length,\n direction: 'right',\n width: window.innerWidth,\n }),\n );\n\n const swipeableWrapperRef = useRef<HTMLDivElement | null>(null);\n\n const listItemXOffset = useMotionValue(0);\n\n const close = useCallback(() => {\n void animate(listItemXOffset, 0);\n }, [listItemXOffset]);\n\n const open = useCallback(\n (direction: 'left' | 'right') => {\n switch (direction) {\n case 'left':\n void animate(listItemXOffset, SWIPEABLE_ACTION_WIDTH * leftActions.length);\n break;\n case 'right':\n void animate(listItemXOffset, -SWIPEABLE_ACTION_WIDTH * rightActions.length);\n break;\n default:\n break;\n }\n },\n [leftActions.length, listItemXOffset, rightActions.length],\n );\n\n useEffect(() => {\n const width = swipeableWrapperRef.current?.parentElement?.offsetWidth;\n\n // This check was deliberately chosen because a width of 0 is also not permitted.\n if (width) {\n setLeftThreshold(\n calcThreshold({\n actionCount: leftActions.length,\n direction: 'left',\n width,\n }),\n );\n\n setRightThreshold(\n calcThreshold({\n actionCount: rightActions.length,\n direction: 'right',\n width,\n }),\n );\n }\n }, [leftActions.length, rightActions.length]);\n\n // Close an opened menu when anything outside it is tapped\n useEffect(() => {\n function closeCallback(event: MouseEvent | TouchEvent) {\n const eventTarget = event.target;\n\n // @ts-expect-error: Pretty sure that the event target is always a Node.\n if (eventTarget && !swipeableWrapperRef.current?.contains(eventTarget)) {\n close();\n }\n }\n\n document.addEventListener('mousedown', closeCallback);\n document.addEventListener('touchstart', closeCallback);\n\n return () => {\n document.removeEventListener('mousedown', closeCallback);\n document.removeEventListener('touchstart', closeCallback);\n };\n }, [close]);\n\n // Vibrate when the threshold is passed\n useEffect(\n () =>\n listItemXOffset.onChange((newValue: number) => {\n const previous = listItemXOffset.getPrevious();\n\n const hasCrossedLeftThreshold =\n (previous < leftThreshold && newValue >= leftThreshold) ||\n (previous > leftThreshold && newValue <= leftThreshold);\n\n const hasCrossedRightThreshold =\n (previous < rightThreshold && newValue >= rightThreshold) ||\n (previous > rightThreshold && newValue <= rightThreshold);\n\n if (hasCrossedLeftThreshold || hasCrossedRightThreshold) {\n void vibrate({ iOSFeedbackVibration: 6, pattern: [150] });\n }\n }),\n [leftThreshold, listItemXOffset, rightThreshold],\n );\n\n const handlePan = useCallback(\n (_: MouseEvent | TouchEvent | PointerEvent, info: PanInfo) => {\n const currentXOffset = listItemXOffset.get();\n\n const dampingFactor =\n (info.offset.x > 0 && leftActions.length > 0) ||\n (info.offset.x < 0 && rightActions.length > 0) ||\n (currentXOffset > 0 && info.delta.x < 0) ||\n (currentXOffset < 0 && info.delta.x > 0)\n ? 1\n : 0.75 / (Math.abs(info.offset.x) / 9);\n\n if (Math.abs(info.offset.x) > 30 || currentXOffset > 0) {\n listItemXOffset.set(currentXOffset + info.delta.x * dampingFactor);\n }\n },\n [leftActions.length, listItemXOffset, rightActions.length],\n );\n\n const handlePanEnd = useCallback(() => {\n const offset = listItemXOffset.get();\n\n if (offset > leftThreshold) {\n leftActions[0]?.action();\n close();\n } else if (offset < rightThreshold) {\n rightActions[rightActions.length - 1]?.action();\n close();\n } else {\n let state: 'left-open' | 'right-open' | 'closed';\n\n if (offset > 2) {\n state = 'left-open';\n } else if (offset < -2) {\n state = 'right-open';\n } else {\n state = 'closed';\n }\n\n // eslint-disable-next-line default-case\n switch (state) {\n case 'left-open':\n if (offset < SWIPEABLE_ACTION_WIDTH) {\n close();\n } else {\n open('left');\n }\n break;\n case 'right-open':\n if (offset > -SWIPEABLE_ACTION_WIDTH) {\n close();\n } else {\n open('right');\n }\n break;\n case 'closed':\n if (offset > SWIPEABLE_ACTION_WIDTH) {\n open('left');\n } else if (offset < -SWIPEABLE_ACTION_WIDTH) {\n open('right');\n } else {\n close();\n }\n }\n }\n }, [close, leftActions, leftThreshold, listItemXOffset, open, rightActions, rightThreshold]);\n\n const leftActionElements = useMemo(\n () =>\n Array.from(leftActions)\n .reverse()\n .map((item, index) => (\n <SwipeableAction\n activationThreshold={leftThreshold}\n close={close}\n index={index}\n item={item}\n key={item.key}\n listItemXOffset={listItemXOffset}\n position=\"left\"\n totalActionCount={leftActions.length}\n />\n )),\n [close, leftActions, leftThreshold, listItemXOffset],\n );\n\n const rightActionElements = useMemo(\n () =>\n rightActions.map((item, index) => (\n <SwipeableAction\n activationThreshold={rightThreshold}\n close={close}\n index={index}\n item={item}\n key={item.key}\n listItemXOffset={listItemXOffset}\n position=\"right\"\n totalActionCount={rightActions.length}\n />\n )),\n [close, rightActions, rightThreshold, listItemXOffset],\n );\n\n return (\n <StyledMotionSwipeableWrapper\n onPan={handlePan}\n onPanEnd={handlePanEnd}\n ref={swipeableWrapperRef}\n style={{ x: listItemXOffset }}\n >\n {leftActionElements}\n <StyledSwipeableWrapperContent>{children}</StyledSwipeableWrapperContent>\n {rightActionElements}\n </StyledMotionSwipeableWrapper>\n );\n};\n\nSwipeableWrapper.displayName = 'SwipeableWrapper';\n\nexport default SwipeableWrapper;\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,uBAAA,CAAAH,OAAA;AAUA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAF,uBAAA,CAAAH,OAAA;AACA,IAAAM,iBAAA,GAAAN,OAAA;AAGmC,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAA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MotionSwipeableWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<{
|
|
4
|
+
color?: string | undefined;
|
|
5
|
+
title?: string | undefined;
|
|
6
|
+
slot?: string | undefined;
|
|
7
|
+
defaultChecked?: boolean | undefined;
|
|
8
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
9
|
+
suppressContentEditableWarning?: boolean | undefined;
|
|
10
|
+
suppressHydrationWarning?: boolean | undefined;
|
|
11
|
+
accessKey?: string | undefined;
|
|
12
|
+
autoFocus?: boolean | undefined;
|
|
13
|
+
className?: string | undefined;
|
|
14
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
15
|
+
contextMenu?: string | undefined;
|
|
16
|
+
dir?: string | undefined;
|
|
17
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
18
|
+
hidden?: boolean | undefined;
|
|
19
|
+
id?: string | undefined;
|
|
20
|
+
lang?: string | undefined;
|
|
21
|
+
nonce?: string | undefined;
|
|
22
|
+
placeholder?: string | undefined;
|
|
23
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
24
|
+
tabIndex?: number | undefined;
|
|
25
|
+
translate?: "yes" | "no" | undefined;
|
|
26
|
+
radioGroup?: string | undefined;
|
|
27
|
+
role?: import("react").AriaRole | undefined;
|
|
28
|
+
about?: string | undefined;
|
|
29
|
+
content?: string | undefined;
|
|
30
|
+
datatype?: string | undefined;
|
|
31
|
+
inlist?: any;
|
|
32
|
+
prefix?: string | undefined;
|
|
33
|
+
property?: string | undefined;
|
|
34
|
+
rel?: string | undefined;
|
|
35
|
+
resource?: string | undefined;
|
|
36
|
+
rev?: string | undefined;
|
|
37
|
+
typeof?: string | undefined;
|
|
38
|
+
vocab?: string | undefined;
|
|
39
|
+
autoCapitalize?: string | undefined;
|
|
40
|
+
autoCorrect?: string | undefined;
|
|
41
|
+
autoSave?: string | undefined;
|
|
42
|
+
itemProp?: string | undefined;
|
|
43
|
+
itemScope?: boolean | undefined;
|
|
44
|
+
itemType?: string | undefined;
|
|
45
|
+
itemID?: string | undefined;
|
|
46
|
+
itemRef?: string | undefined;
|
|
47
|
+
results?: number | undefined;
|
|
48
|
+
security?: string | undefined;
|
|
49
|
+
unselectable?: "on" | "off" | undefined;
|
|
50
|
+
inputMode?: "text" | "search" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
51
|
+
is?: string | undefined;
|
|
52
|
+
"aria-activedescendant"?: string | undefined;
|
|
53
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
54
|
+
"aria-autocomplete"?: "list" | "none" | "both" | "inline" | undefined;
|
|
55
|
+
"aria-braillelabel"?: string | undefined;
|
|
56
|
+
"aria-brailleroledescription"?: string | undefined;
|
|
57
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
58
|
+
"aria-checked"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
59
|
+
"aria-colcount"?: number | undefined;
|
|
60
|
+
"aria-colindex"?: number | undefined;
|
|
61
|
+
"aria-colindextext"?: string | undefined;
|
|
62
|
+
"aria-colspan"?: number | undefined;
|
|
63
|
+
"aria-controls"?: string | undefined;
|
|
64
|
+
"aria-current"?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
|
|
65
|
+
"aria-describedby"?: string | undefined;
|
|
66
|
+
"aria-description"?: string | undefined;
|
|
67
|
+
"aria-details"?: string | undefined;
|
|
68
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
69
|
+
"aria-dropeffect"?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
70
|
+
"aria-errormessage"?: string | undefined;
|
|
71
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
72
|
+
"aria-flowto"?: string | undefined;
|
|
73
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
74
|
+
"aria-haspopup"?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
|
|
75
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
76
|
+
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
77
|
+
"aria-keyshortcuts"?: string | undefined;
|
|
78
|
+
"aria-label"?: string | undefined;
|
|
79
|
+
"aria-labelledby"?: string | undefined;
|
|
80
|
+
"aria-level"?: number | undefined;
|
|
81
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
82
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
83
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
84
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
85
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
86
|
+
"aria-owns"?: string | undefined;
|
|
87
|
+
"aria-placeholder"?: string | undefined;
|
|
88
|
+
"aria-posinset"?: number | undefined;
|
|
89
|
+
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
90
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
91
|
+
"aria-relevant"?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
92
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
93
|
+
"aria-roledescription"?: string | undefined;
|
|
94
|
+
"aria-rowcount"?: number | undefined;
|
|
95
|
+
"aria-rowindex"?: number | undefined;
|
|
96
|
+
"aria-rowindextext"?: string | undefined;
|
|
97
|
+
"aria-rowspan"?: number | undefined;
|
|
98
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
99
|
+
"aria-setsize"?: number | undefined;
|
|
100
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
101
|
+
"aria-valuemax"?: number | undefined;
|
|
102
|
+
"aria-valuemin"?: number | undefined;
|
|
103
|
+
"aria-valuenow"?: number | undefined;
|
|
104
|
+
"aria-valuetext"?: string | undefined;
|
|
105
|
+
dangerouslySetInnerHTML?: {
|
|
106
|
+
__html: string | TrustedHTML;
|
|
107
|
+
} | undefined;
|
|
108
|
+
onCopy?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
109
|
+
onCopyCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
110
|
+
onCut?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
111
|
+
onCutCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
112
|
+
onPaste?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
113
|
+
onPasteCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
114
|
+
onCompositionEnd?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
115
|
+
onCompositionEndCapture?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
116
|
+
onCompositionStart?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
117
|
+
onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
118
|
+
onCompositionUpdate?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
119
|
+
onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
120
|
+
onFocus?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
121
|
+
onFocusCapture?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
122
|
+
onBlur?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
123
|
+
onBlurCapture?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
124
|
+
onChange?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
125
|
+
onChangeCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
126
|
+
onBeforeInput?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
127
|
+
onBeforeInputCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
128
|
+
onInput?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
129
|
+
onInputCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
130
|
+
onReset?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
131
|
+
onResetCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
132
|
+
onSubmit?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
133
|
+
onSubmitCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
134
|
+
onInvalid?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
135
|
+
onInvalidCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
136
|
+
onLoad?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
137
|
+
onLoadCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
138
|
+
onError?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
139
|
+
onErrorCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
140
|
+
onKeyDown?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
141
|
+
onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
142
|
+
onKeyPress?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
143
|
+
onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
144
|
+
onKeyUp?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
145
|
+
onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
146
|
+
onAbort?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
147
|
+
onAbortCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
148
|
+
onCanPlay?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
149
|
+
onCanPlayCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
150
|
+
onCanPlayThrough?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
151
|
+
onCanPlayThroughCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
152
|
+
onDurationChange?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
153
|
+
onDurationChangeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
154
|
+
onEmptied?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
155
|
+
onEmptiedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
156
|
+
onEncrypted?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
157
|
+
onEncryptedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
158
|
+
onEnded?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
159
|
+
onEndedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
160
|
+
onLoadedData?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
161
|
+
onLoadedDataCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
162
|
+
onLoadedMetadata?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
163
|
+
onLoadedMetadataCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
164
|
+
onLoadStart?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
165
|
+
onLoadStartCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
166
|
+
onPause?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
167
|
+
onPauseCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
168
|
+
onPlay?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
169
|
+
onPlayCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
170
|
+
onPlaying?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
171
|
+
onPlayingCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
172
|
+
onProgress?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
173
|
+
onProgressCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
174
|
+
onRateChange?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
175
|
+
onRateChangeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
176
|
+
onResize?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
177
|
+
onResizeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
178
|
+
onSeeked?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
179
|
+
onSeekedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
180
|
+
onSeeking?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
181
|
+
onSeekingCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
182
|
+
onStalled?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
183
|
+
onStalledCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
184
|
+
onSuspend?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
185
|
+
onSuspendCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
186
|
+
onTimeUpdate?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
187
|
+
onTimeUpdateCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
188
|
+
onVolumeChange?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
189
|
+
onVolumeChangeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
190
|
+
onWaiting?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
191
|
+
onWaitingCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
192
|
+
onAuxClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
193
|
+
onAuxClickCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
194
|
+
onClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
195
|
+
onClickCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
196
|
+
onContextMenu?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
197
|
+
onContextMenuCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
198
|
+
onDoubleClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
199
|
+
onDoubleClickCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
200
|
+
onDragCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
201
|
+
onDragEndCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
202
|
+
onDragEnter?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
203
|
+
onDragEnterCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
204
|
+
onDragExit?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
205
|
+
onDragExitCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
206
|
+
onDragLeave?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
207
|
+
onDragLeaveCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
208
|
+
onDragOver?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
209
|
+
onDragOverCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
210
|
+
onDragStartCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
211
|
+
onDrop?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
212
|
+
onDropCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
213
|
+
onMouseDown?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
214
|
+
onMouseDownCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
215
|
+
onMouseEnter?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
216
|
+
onMouseLeave?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
217
|
+
onMouseMove?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
218
|
+
onMouseMoveCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
219
|
+
onMouseOut?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
220
|
+
onMouseOutCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
221
|
+
onMouseOver?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
222
|
+
onMouseOverCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
223
|
+
onMouseUp?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
224
|
+
onMouseUpCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
225
|
+
onSelect?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
226
|
+
onSelectCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
227
|
+
onTouchCancel?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
228
|
+
onTouchCancelCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
229
|
+
onTouchEnd?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
230
|
+
onTouchEndCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
231
|
+
onTouchMove?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
232
|
+
onTouchMoveCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
233
|
+
onTouchStart?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
234
|
+
onTouchStartCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
235
|
+
onPointerDown?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
236
|
+
onPointerDownCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
237
|
+
onPointerMove?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
238
|
+
onPointerMoveCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
239
|
+
onPointerUp?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
240
|
+
onPointerUpCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
241
|
+
onPointerCancel?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
242
|
+
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
243
|
+
onPointerEnter?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
244
|
+
onPointerEnterCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
245
|
+
onPointerLeave?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
246
|
+
onPointerLeaveCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
247
|
+
onPointerOver?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
248
|
+
onPointerOverCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
249
|
+
onPointerOut?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
250
|
+
onPointerOutCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
251
|
+
onGotPointerCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
252
|
+
onGotPointerCaptureCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
253
|
+
onLostPointerCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
254
|
+
onLostPointerCaptureCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
255
|
+
onScroll?: import("react").UIEventHandler<HTMLDivElement> | undefined;
|
|
256
|
+
onScrollCapture?: import("react").UIEventHandler<HTMLDivElement> | undefined;
|
|
257
|
+
onWheel?: import("react").WheelEventHandler<HTMLDivElement> | undefined;
|
|
258
|
+
onWheelCapture?: import("react").WheelEventHandler<HTMLDivElement> | undefined;
|
|
259
|
+
onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
260
|
+
onAnimationEnd?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
261
|
+
onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
262
|
+
onAnimationIteration?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
263
|
+
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
264
|
+
onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
265
|
+
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
266
|
+
} & import("framer-motion").MotionProps & import("react").RefAttributes<HTMLDivElement>, {
|
|
267
|
+
theme: import("@chayns-components/core/lib/components/color-scheme-provider/ColorSchemeProvider").Theme;
|
|
268
|
+
}>> & import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>;
|
|
269
|
+
export declare const StyledSwipeableWrapperContent: import("styled-components").IStyledComponent<"web", {
|
|
270
|
+
ref?: import("react").LegacyRef<HTMLDivElement> | undefined;
|
|
271
|
+
key?: import("react").Key | null | undefined;
|
|
272
|
+
defaultChecked?: boolean | undefined;
|
|
273
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
274
|
+
suppressContentEditableWarning?: boolean | undefined;
|
|
275
|
+
suppressHydrationWarning?: boolean | undefined;
|
|
276
|
+
accessKey?: string | undefined;
|
|
277
|
+
autoFocus?: boolean | undefined;
|
|
278
|
+
className?: string | undefined;
|
|
279
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
280
|
+
contextMenu?: string | undefined;
|
|
281
|
+
dir?: string | undefined;
|
|
282
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
283
|
+
hidden?: boolean | undefined;
|
|
284
|
+
id?: string | undefined;
|
|
285
|
+
lang?: string | undefined;
|
|
286
|
+
nonce?: string | undefined;
|
|
287
|
+
placeholder?: string | undefined;
|
|
288
|
+
slot?: string | undefined;
|
|
289
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
290
|
+
style?: import("react").CSSProperties | undefined;
|
|
291
|
+
tabIndex?: number | undefined;
|
|
292
|
+
title?: string | undefined;
|
|
293
|
+
translate?: "yes" | "no" | undefined;
|
|
294
|
+
radioGroup?: string | undefined;
|
|
295
|
+
role?: import("react").AriaRole | undefined;
|
|
296
|
+
about?: string | undefined;
|
|
297
|
+
content?: string | undefined;
|
|
298
|
+
datatype?: string | undefined;
|
|
299
|
+
inlist?: any;
|
|
300
|
+
prefix?: string | undefined;
|
|
301
|
+
property?: string | undefined;
|
|
302
|
+
rel?: string | undefined;
|
|
303
|
+
resource?: string | undefined;
|
|
304
|
+
rev?: string | undefined;
|
|
305
|
+
typeof?: string | undefined;
|
|
306
|
+
vocab?: string | undefined;
|
|
307
|
+
autoCapitalize?: string | undefined;
|
|
308
|
+
autoCorrect?: string | undefined;
|
|
309
|
+
autoSave?: string | undefined;
|
|
310
|
+
color?: string | undefined;
|
|
311
|
+
itemProp?: string | undefined;
|
|
312
|
+
itemScope?: boolean | undefined;
|
|
313
|
+
itemType?: string | undefined;
|
|
314
|
+
itemID?: string | undefined;
|
|
315
|
+
itemRef?: string | undefined;
|
|
316
|
+
results?: number | undefined;
|
|
317
|
+
security?: string | undefined;
|
|
318
|
+
unselectable?: "on" | "off" | undefined;
|
|
319
|
+
inputMode?: "text" | "search" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
320
|
+
is?: string | undefined;
|
|
321
|
+
"aria-activedescendant"?: string | undefined;
|
|
322
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
323
|
+
"aria-autocomplete"?: "list" | "none" | "both" | "inline" | undefined;
|
|
324
|
+
"aria-braillelabel"?: string | undefined;
|
|
325
|
+
"aria-brailleroledescription"?: string | undefined;
|
|
326
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
327
|
+
"aria-checked"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
328
|
+
"aria-colcount"?: number | undefined;
|
|
329
|
+
"aria-colindex"?: number | undefined;
|
|
330
|
+
"aria-colindextext"?: string | undefined;
|
|
331
|
+
"aria-colspan"?: number | undefined;
|
|
332
|
+
"aria-controls"?: string | undefined;
|
|
333
|
+
"aria-current"?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
|
|
334
|
+
"aria-describedby"?: string | undefined;
|
|
335
|
+
"aria-description"?: string | undefined;
|
|
336
|
+
"aria-details"?: string | undefined;
|
|
337
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
338
|
+
"aria-dropeffect"?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
339
|
+
"aria-errormessage"?: string | undefined;
|
|
340
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
341
|
+
"aria-flowto"?: string | undefined;
|
|
342
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
343
|
+
"aria-haspopup"?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
|
|
344
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
345
|
+
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
346
|
+
"aria-keyshortcuts"?: string | undefined;
|
|
347
|
+
"aria-label"?: string | undefined;
|
|
348
|
+
"aria-labelledby"?: string | undefined;
|
|
349
|
+
"aria-level"?: number | undefined;
|
|
350
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
351
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
352
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
353
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
354
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
355
|
+
"aria-owns"?: string | undefined;
|
|
356
|
+
"aria-placeholder"?: string | undefined;
|
|
357
|
+
"aria-posinset"?: number | undefined;
|
|
358
|
+
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
359
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
360
|
+
"aria-relevant"?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
361
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
362
|
+
"aria-roledescription"?: string | undefined;
|
|
363
|
+
"aria-rowcount"?: number | undefined;
|
|
364
|
+
"aria-rowindex"?: number | undefined;
|
|
365
|
+
"aria-rowindextext"?: string | undefined;
|
|
366
|
+
"aria-rowspan"?: number | undefined;
|
|
367
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
368
|
+
"aria-setsize"?: number | undefined;
|
|
369
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
370
|
+
"aria-valuemax"?: number | undefined;
|
|
371
|
+
"aria-valuemin"?: number | undefined;
|
|
372
|
+
"aria-valuenow"?: number | undefined;
|
|
373
|
+
"aria-valuetext"?: string | undefined;
|
|
374
|
+
children?: import("react").ReactNode;
|
|
375
|
+
dangerouslySetInnerHTML?: {
|
|
376
|
+
__html: string | TrustedHTML;
|
|
377
|
+
} | undefined;
|
|
378
|
+
onCopy?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
379
|
+
onCopyCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
380
|
+
onCut?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
381
|
+
onCutCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
382
|
+
onPaste?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
383
|
+
onPasteCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
384
|
+
onCompositionEnd?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
385
|
+
onCompositionEndCapture?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
386
|
+
onCompositionStart?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
387
|
+
onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
388
|
+
onCompositionUpdate?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
389
|
+
onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
390
|
+
onFocus?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
391
|
+
onFocusCapture?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
392
|
+
onBlur?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
393
|
+
onBlurCapture?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
394
|
+
onChange?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
395
|
+
onChangeCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
396
|
+
onBeforeInput?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
397
|
+
onBeforeInputCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
398
|
+
onInput?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
399
|
+
onInputCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
400
|
+
onReset?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
401
|
+
onResetCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
402
|
+
onSubmit?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
403
|
+
onSubmitCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
404
|
+
onInvalid?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
405
|
+
onInvalidCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
406
|
+
onLoad?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
407
|
+
onLoadCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
408
|
+
onError?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
409
|
+
onErrorCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
410
|
+
onKeyDown?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
411
|
+
onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
412
|
+
onKeyPress?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
413
|
+
onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
414
|
+
onKeyUp?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
415
|
+
onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
416
|
+
onAbort?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
417
|
+
onAbortCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
418
|
+
onCanPlay?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
419
|
+
onCanPlayCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
420
|
+
onCanPlayThrough?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
421
|
+
onCanPlayThroughCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
422
|
+
onDurationChange?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
423
|
+
onDurationChangeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
424
|
+
onEmptied?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
425
|
+
onEmptiedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
426
|
+
onEncrypted?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
427
|
+
onEncryptedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
428
|
+
onEnded?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
429
|
+
onEndedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
430
|
+
onLoadedData?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
431
|
+
onLoadedDataCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
432
|
+
onLoadedMetadata?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
433
|
+
onLoadedMetadataCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
434
|
+
onLoadStart?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
435
|
+
onLoadStartCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
436
|
+
onPause?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
437
|
+
onPauseCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
438
|
+
onPlay?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
439
|
+
onPlayCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
440
|
+
onPlaying?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
441
|
+
onPlayingCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
442
|
+
onProgress?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
443
|
+
onProgressCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
444
|
+
onRateChange?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
445
|
+
onRateChangeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
446
|
+
onResize?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
447
|
+
onResizeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
448
|
+
onSeeked?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
449
|
+
onSeekedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
450
|
+
onSeeking?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
451
|
+
onSeekingCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
452
|
+
onStalled?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
453
|
+
onStalledCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
454
|
+
onSuspend?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
455
|
+
onSuspendCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
456
|
+
onTimeUpdate?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
457
|
+
onTimeUpdateCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
458
|
+
onVolumeChange?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
459
|
+
onVolumeChangeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
460
|
+
onWaiting?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
461
|
+
onWaitingCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
462
|
+
onAuxClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
463
|
+
onAuxClickCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
464
|
+
onClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
465
|
+
onClickCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
466
|
+
onContextMenu?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
467
|
+
onContextMenuCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
468
|
+
onDoubleClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
469
|
+
onDoubleClickCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
470
|
+
onDrag?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
471
|
+
onDragCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
472
|
+
onDragEnd?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
473
|
+
onDragEndCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
474
|
+
onDragEnter?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
475
|
+
onDragEnterCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
476
|
+
onDragExit?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
477
|
+
onDragExitCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
478
|
+
onDragLeave?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
479
|
+
onDragLeaveCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
480
|
+
onDragOver?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
481
|
+
onDragOverCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
482
|
+
onDragStart?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
483
|
+
onDragStartCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
484
|
+
onDrop?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
485
|
+
onDropCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
486
|
+
onMouseDown?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
487
|
+
onMouseDownCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
488
|
+
onMouseEnter?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
489
|
+
onMouseLeave?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
490
|
+
onMouseMove?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
491
|
+
onMouseMoveCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
492
|
+
onMouseOut?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
493
|
+
onMouseOutCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
494
|
+
onMouseOver?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
495
|
+
onMouseOverCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
496
|
+
onMouseUp?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
497
|
+
onMouseUpCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
498
|
+
onSelect?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
499
|
+
onSelectCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
500
|
+
onTouchCancel?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
501
|
+
onTouchCancelCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
502
|
+
onTouchEnd?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
503
|
+
onTouchEndCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
504
|
+
onTouchMove?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
505
|
+
onTouchMoveCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
506
|
+
onTouchStart?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
507
|
+
onTouchStartCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
508
|
+
onPointerDown?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
509
|
+
onPointerDownCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
510
|
+
onPointerMove?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
511
|
+
onPointerMoveCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
512
|
+
onPointerUp?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
513
|
+
onPointerUpCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
514
|
+
onPointerCancel?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
515
|
+
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
516
|
+
onPointerEnter?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
517
|
+
onPointerEnterCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
518
|
+
onPointerLeave?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
519
|
+
onPointerLeaveCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
520
|
+
onPointerOver?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
521
|
+
onPointerOverCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
522
|
+
onPointerOut?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
523
|
+
onPointerOutCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
524
|
+
onGotPointerCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
525
|
+
onGotPointerCaptureCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
526
|
+
onLostPointerCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
527
|
+
onLostPointerCaptureCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
528
|
+
onScroll?: import("react").UIEventHandler<HTMLDivElement> | undefined;
|
|
529
|
+
onScrollCapture?: import("react").UIEventHandler<HTMLDivElement> | undefined;
|
|
530
|
+
onWheel?: import("react").WheelEventHandler<HTMLDivElement> | undefined;
|
|
531
|
+
onWheelCapture?: import("react").WheelEventHandler<HTMLDivElement> | undefined;
|
|
532
|
+
onAnimationStart?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
533
|
+
onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
534
|
+
onAnimationEnd?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
535
|
+
onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
536
|
+
onAnimationIteration?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
537
|
+
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
538
|
+
onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
539
|
+
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
540
|
+
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwipeableWrapper.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireDefault","obj","__esModule","default","StyledMotionSwipeableWrapper","exports","styled","motion","div","StyledSwipeableWrapperContent"],"sources":["../../../src/components/swipeable-wrapper/SwipeableWrapper.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled from 'styled-components';\n\nexport const StyledMotionSwipeableWrapper = styled(motion.div)
|
|
1
|
+
{"version":3,"file":"SwipeableWrapper.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireDefault","obj","__esModule","default","StyledMotionSwipeableWrapper","exports","styled","motion","div","StyledSwipeableWrapperContent"],"sources":["../../../src/components/swipeable-wrapper/SwipeableWrapper.styles.ts"],"sourcesContent":["import type { FramerMotionBugFix } from '@chayns-components/core';\nimport { motion } from 'framer-motion';\nimport styled from 'styled-components';\n\nexport const StyledMotionSwipeableWrapper = styled(motion.div)<FramerMotionBugFix>`\n position: relative;\n touch-action: pan-y;\n user-select: none;\n`;\n\nexport const StyledSwipeableWrapperContent = styled.div`\n overflow: hidden;\n width: 100%;\n`;\n"],"mappings":";;;;;;AACA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAuC,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEhC,MAAMG,4BAA4B,GAAAC,OAAA,CAAAD,4BAAA,GAAG,IAAAE,yBAAM,EAACC,oBAAM,CAACC,GAAG,CAAsB;AACnF;AACA;AACA;AACA,CAAC;AAEM,MAAMC,6BAA6B,GAAAJ,OAAA,CAAAI,6BAAA,GAAGH,yBAAM,CAACE,GAAI;AACxD;AACA;AACA,CAAC"}
|
|
@@ -57,9 +57,9 @@ const SwipeableAction = _ref => {
|
|
|
57
57
|
const actionX = (0, _framerMotion.useTransform)([actionOffset, actionOverlayOffset], _ref2 => {
|
|
58
58
|
let [x, y] = _ref2;
|
|
59
59
|
if (position === 'left') {
|
|
60
|
-
return Math.min((x
|
|
60
|
+
return Math.min((x ?? 0) + (y ?? 0), 0);
|
|
61
61
|
}
|
|
62
|
-
return Math.max((x
|
|
62
|
+
return Math.max((x ?? 0) + (y ?? 0), 0);
|
|
63
63
|
});
|
|
64
64
|
|
|
65
65
|
// Animate to the middle after passing threshold if outermost item
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwipeableAction.js","names":["_framerMotion","require","_react","_interopRequireWildcard","_SwipeableAction","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","SWIPEABLE_ACTION_WIDTH","exports","SwipeableAction","_ref","activationThreshold","close","index","item","listItemXOffset","position","totalActionCount","handleButtonClick","action","actionOffset","useTransform","newValue","maxOffset","fractionalOffset","Math","max","min","actionOverlayOffset","useSpring","bounce","actionX","_ref2","x","y","useEffect","isOuterMost","undefined","onChange","lastValue","getPrevious","createElement","StyledMotionSwipeableAction","backgroundColor","style","StyledSwipeableActionButton","color","onClick","width","icon","text","displayName","_default"],"sources":["../../../../src/components/swipeable-wrapper/swipeable-action/SwipeableAction.tsx"],"sourcesContent":["import { MotionValue, useSpring, useTransform } from 'framer-motion';\nimport React, { FC, useEffect } from 'react';\nimport type { SwipeableActionItem } from '../SwipeableWrapper';\nimport { StyledMotionSwipeableAction, StyledSwipeableActionButton } from './SwipeableAction.styles';\n\nexport const SWIPEABLE_ACTION_WIDTH = 72;\n\nexport type SwipeableActionProps = {\n activationThreshold: number;\n close: VoidFunction;\n index: number;\n item: SwipeableActionItem;\n listItemXOffset: MotionValue<number>;\n position: 'left' | 'right';\n totalActionCount: number;\n};\n\nconst SwipeableAction: FC<SwipeableActionProps> = ({\n activationThreshold,\n close,\n index,\n item,\n listItemXOffset,\n position,\n totalActionCount,\n}) => {\n const handleButtonClick = () => {\n item.action();\n close();\n };\n\n /**\n * By default, the action sticks to the content of the swipeable item. This\n * makes it move outwards to reveal the inner items.\n */\n const actionOffset = useTransform(listItemXOffset, (newValue) => {\n const maxOffset = SWIPEABLE_ACTION_WIDTH * index;\n const fractionalOffset = (-newValue / totalActionCount) * index;\n\n switch (position) {\n case 'left':\n return Math.max(-maxOffset, fractionalOffset);\n case 'right':\n return Math.min(maxOffset, fractionalOffset);\n default:\n return 0;\n }\n });\n\n /**\n * Brings the item in again if past the threshold. Only relevant for\n * outermost items.\n */\n const actionOverlayOffset = useSpring(0, {\n bounce: 0,\n }) as MotionValue<number>;\n\n /**\n * Combines the two values above to create the correct X transform that has\n * to be applied to the action.\n */\n const actionX = useTransform<number, number>([actionOffset, actionOverlayOffset], ([x, y]) => {\n if (position === 'left') {\n return Math.min((x ?? 0) + (y ?? 0), 0);\n }\n\n return Math.max((x ?? 0) + (y ?? 0), 0);\n });\n\n // Animate to the middle after passing threshold if outermost item\n useEffect(() => {\n const isOuterMost = index === totalActionCount - 1;\n\n if (!isOuterMost) return undefined;\n\n return listItemXOffset.onChange((newValue) => {\n const lastValue = listItemXOffset.getPrevious();\n\n // eslint-disable-next-line default-case\n switch (position) {\n case 'left':\n if (newValue > activationThreshold && lastValue <= activationThreshold) {\n actionOverlayOffset.set(SWIPEABLE_ACTION_WIDTH * index);\n } else if (newValue < activationThreshold && lastValue >= activationThreshold) {\n actionOverlayOffset.set(0);\n }\n break;\n case 'right':\n if (newValue < activationThreshold && lastValue >= activationThreshold) {\n actionOverlayOffset.set(SWIPEABLE_ACTION_WIDTH * -1 * index);\n } else if (newValue > activationThreshold && lastValue <= activationThreshold) {\n actionOverlayOffset.set(0);\n }\n }\n });\n }, [\n actionOverlayOffset,\n activationThreshold,\n index,\n listItemXOffset,\n position,\n totalActionCount,\n ]);\n\n return (\n <StyledMotionSwipeableAction\n backgroundColor={item.backgroundColor}\n position={position}\n style={{ x: actionX }}\n >\n <StyledSwipeableActionButton\n color={item.color}\n onClick={handleButtonClick}\n width={`${SWIPEABLE_ACTION_WIDTH}px`}\n >\n {item.icon}\n {item.text}\n </StyledSwipeableActionButton>\n </StyledMotionSwipeableAction>\n );\n};\n\nSwipeableAction.displayName = 'SwipeableAction';\n\nexport default SwipeableAction;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAEA,IAAAG,gBAAA,GAAAH,OAAA;AAAoG,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAA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;EAEF;AACJ;AACA;AACA;EACI,MAAMI,mBAAmB,GAAG,IAAAC,uBAAS,EAAC,CAAC,EAAE;IACrCC,MAAM,EAAE;EACZ,CAAC,CAAwB;;EAEzB;AACJ;AACA;AACA;EACI,MAAMC,OAAO,GAAG,IAAAV,0BAAY,EAAiB,CAACD,YAAY,EAAEQ,mBAAmB,CAAC,EAAEI,KAAA,IAAY;IAAA,IAAX,CAACC,CAAC,EAAEC,CAAC,CAAC,GAAAF,KAAA;IACrF,IAAIhB,QAAQ,KAAK,MAAM,EAAE;MACrB,OAAOS,IAAI,CAACE,GAAG,CAAC,CAACM,CAAC,
|
|
1
|
+
{"version":3,"file":"SwipeableAction.js","names":["_framerMotion","require","_react","_interopRequireWildcard","_SwipeableAction","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","SWIPEABLE_ACTION_WIDTH","exports","SwipeableAction","_ref","activationThreshold","close","index","item","listItemXOffset","position","totalActionCount","handleButtonClick","action","actionOffset","useTransform","newValue","maxOffset","fractionalOffset","Math","max","min","actionOverlayOffset","useSpring","bounce","actionX","_ref2","x","y","useEffect","isOuterMost","undefined","onChange","lastValue","getPrevious","createElement","StyledMotionSwipeableAction","backgroundColor","style","StyledSwipeableActionButton","color","onClick","width","icon","text","displayName","_default"],"sources":["../../../../src/components/swipeable-wrapper/swipeable-action/SwipeableAction.tsx"],"sourcesContent":["import { MotionValue, useSpring, useTransform } from 'framer-motion';\nimport React, { FC, useEffect } from 'react';\nimport type { SwipeableActionItem } from '../SwipeableWrapper';\nimport { StyledMotionSwipeableAction, StyledSwipeableActionButton } from './SwipeableAction.styles';\n\nexport const SWIPEABLE_ACTION_WIDTH = 72;\n\nexport type SwipeableActionProps = {\n activationThreshold: number;\n close: VoidFunction;\n index: number;\n item: SwipeableActionItem;\n listItemXOffset: MotionValue<number>;\n position: 'left' | 'right';\n totalActionCount: number;\n};\n\nconst SwipeableAction: FC<SwipeableActionProps> = ({\n activationThreshold,\n close,\n index,\n item,\n listItemXOffset,\n position,\n totalActionCount,\n}) => {\n const handleButtonClick = () => {\n item.action();\n close();\n };\n\n /**\n * By default, the action sticks to the content of the swipeable item. This\n * makes it move outwards to reveal the inner items.\n */\n const actionOffset = useTransform(listItemXOffset, (newValue) => {\n const maxOffset = SWIPEABLE_ACTION_WIDTH * index;\n const fractionalOffset = (-newValue / totalActionCount) * index;\n\n switch (position) {\n case 'left':\n return Math.max(-maxOffset, fractionalOffset);\n case 'right':\n return Math.min(maxOffset, fractionalOffset);\n default:\n return 0;\n }\n });\n\n /**\n * Brings the item in again if past the threshold. Only relevant for\n * outermost items.\n */\n const actionOverlayOffset = useSpring(0, {\n bounce: 0,\n }) as MotionValue<number>;\n\n /**\n * Combines the two values above to create the correct X transform that has\n * to be applied to the action.\n */\n const actionX = useTransform<number, number>([actionOffset, actionOverlayOffset], ([x, y]) => {\n if (position === 'left') {\n return Math.min((x ?? 0) + (y ?? 0), 0);\n }\n\n return Math.max((x ?? 0) + (y ?? 0), 0);\n });\n\n // Animate to the middle after passing threshold if outermost item\n useEffect(() => {\n const isOuterMost = index === totalActionCount - 1;\n\n if (!isOuterMost) return undefined;\n\n return listItemXOffset.onChange((newValue) => {\n const lastValue = listItemXOffset.getPrevious();\n\n // eslint-disable-next-line default-case\n switch (position) {\n case 'left':\n if (newValue > activationThreshold && lastValue <= activationThreshold) {\n actionOverlayOffset.set(SWIPEABLE_ACTION_WIDTH * index);\n } else if (newValue < activationThreshold && lastValue >= activationThreshold) {\n actionOverlayOffset.set(0);\n }\n break;\n case 'right':\n if (newValue < activationThreshold && lastValue >= activationThreshold) {\n actionOverlayOffset.set(SWIPEABLE_ACTION_WIDTH * -1 * index);\n } else if (newValue > activationThreshold && lastValue <= activationThreshold) {\n actionOverlayOffset.set(0);\n }\n }\n });\n }, [\n actionOverlayOffset,\n activationThreshold,\n index,\n listItemXOffset,\n position,\n totalActionCount,\n ]);\n\n return (\n <StyledMotionSwipeableAction\n backgroundColor={item.backgroundColor}\n position={position}\n style={{ x: actionX }}\n >\n <StyledSwipeableActionButton\n color={item.color}\n onClick={handleButtonClick}\n width={`${SWIPEABLE_ACTION_WIDTH}px`}\n >\n {item.icon}\n {item.text}\n </StyledSwipeableActionButton>\n </StyledMotionSwipeableAction>\n );\n};\n\nSwipeableAction.displayName = 'SwipeableAction';\n\nexport default SwipeableAction;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAEA,IAAAG,gBAAA,GAAAH,OAAA;AAAoG,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAc,CAAA,SAAAI,CAAA,GAAAR,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAI,CAAA,KAAAA,CAAA,CAAA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GAAGX,mBAAmB,IAAI4B,SAAS,IAAI5B,mBAAmB,EAAE;YAC3EiB,mBAAmB,CAACtB,GAAG,CAAC,CAAC,CAAC;UAC9B;MACR;IACJ,CAAC,CAAC;EACN,CAAC,EAAE,CACCsB,mBAAmB,EACnBjB,mBAAmB,EACnBE,KAAK,EACLE,eAAe,EACfC,QAAQ,EACRC,gBAAgB,CACnB,CAAC;EAEF,oBACIlC,MAAA,CAAAS,OAAA,CAAAiD,aAAA,CAACxD,gBAAA,CAAAyD,2BAA2B;IACxBC,eAAe,EAAE7B,IAAI,CAAC6B,eAAgB;IACtC3B,QAAQ,EAAEA,QAAS;IACnB4B,KAAK,EAAE;MAAEX,CAAC,EAAEF;IAAQ;EAAE,gBAEtBhD,MAAA,CAAAS,OAAA,CAAAiD,aAAA,CAACxD,gBAAA,CAAA4D,2BAA2B;IACxBC,KAAK,EAAEhC,IAAI,CAACgC,KAAM;IAClBC,OAAO,EAAE7B,iBAAkB;IAC3B8B,KAAK,EAAG,GAAEzC,sBAAuB;EAAI,GAEpCO,IAAI,CAACmC,IAAI,EACTnC,IAAI,CAACoC,IACmB,CACJ,CAAC;AAEtC,CAAC;AAEDzC,eAAe,CAAC0C,WAAW,GAAG,iBAAiB;AAAC,IAAAC,QAAA,GAAA5C,OAAA,CAAAhB,OAAA,GAEjCiB,eAAe"}
|
|
@@ -1,7 +1,273 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
2
|
import type { SwipeableActionItem } from '../SwipeableWrapper';
|
|
3
3
|
import type { SwipeableActionProps } from './SwipeableAction';
|
|
4
|
-
|
|
5
|
-
export declare const
|
|
4
|
+
type StyledSwipeableActionProps = Pick<SwipeableActionProps, 'position'> & Pick<SwipeableActionItem, 'backgroundColor'>;
|
|
5
|
+
export declare const StyledMotionSwipeableAction: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<{
|
|
6
|
+
color?: string | undefined;
|
|
7
|
+
title?: string | undefined;
|
|
8
|
+
slot?: string | undefined;
|
|
9
|
+
defaultChecked?: boolean | undefined;
|
|
10
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
11
|
+
suppressContentEditableWarning?: boolean | undefined;
|
|
12
|
+
suppressHydrationWarning?: boolean | undefined;
|
|
13
|
+
accessKey?: string | undefined;
|
|
14
|
+
autoFocus?: boolean | undefined;
|
|
15
|
+
className?: string | undefined;
|
|
16
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
17
|
+
contextMenu?: string | undefined;
|
|
18
|
+
dir?: string | undefined;
|
|
19
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
20
|
+
hidden?: boolean | undefined;
|
|
21
|
+
id?: string | undefined;
|
|
22
|
+
lang?: string | undefined;
|
|
23
|
+
nonce?: string | undefined;
|
|
24
|
+
placeholder?: string | undefined;
|
|
25
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
26
|
+
tabIndex?: number | undefined;
|
|
27
|
+
translate?: "yes" | "no" | undefined;
|
|
28
|
+
radioGroup?: string | undefined;
|
|
29
|
+
role?: import("react").AriaRole | undefined;
|
|
30
|
+
about?: string | undefined;
|
|
31
|
+
content?: string | undefined;
|
|
32
|
+
datatype?: string | undefined;
|
|
33
|
+
inlist?: any;
|
|
34
|
+
prefix?: string | undefined;
|
|
35
|
+
property?: string | undefined;
|
|
36
|
+
rel?: string | undefined;
|
|
37
|
+
resource?: string | undefined;
|
|
38
|
+
rev?: string | undefined;
|
|
39
|
+
typeof?: string | undefined;
|
|
40
|
+
vocab?: string | undefined;
|
|
41
|
+
autoCapitalize?: string | undefined;
|
|
42
|
+
autoCorrect?: string | undefined;
|
|
43
|
+
autoSave?: string | undefined;
|
|
44
|
+
itemProp?: string | undefined;
|
|
45
|
+
itemScope?: boolean | undefined;
|
|
46
|
+
itemType?: string | undefined;
|
|
47
|
+
itemID?: string | undefined;
|
|
48
|
+
itemRef?: string | undefined;
|
|
49
|
+
results?: number | undefined;
|
|
50
|
+
security?: string | undefined;
|
|
51
|
+
unselectable?: "on" | "off" | undefined;
|
|
52
|
+
inputMode?: "text" | "search" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
53
|
+
is?: string | undefined;
|
|
54
|
+
"aria-activedescendant"?: string | undefined;
|
|
55
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
56
|
+
"aria-autocomplete"?: "list" | "none" | "both" | "inline" | undefined;
|
|
57
|
+
"aria-braillelabel"?: string | undefined;
|
|
58
|
+
"aria-brailleroledescription"?: string | undefined;
|
|
59
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
60
|
+
"aria-checked"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
61
|
+
"aria-colcount"?: number | undefined;
|
|
62
|
+
"aria-colindex"?: number | undefined;
|
|
63
|
+
"aria-colindextext"?: string | undefined;
|
|
64
|
+
"aria-colspan"?: number | undefined;
|
|
65
|
+
"aria-controls"?: string | undefined;
|
|
66
|
+
"aria-current"?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
|
|
67
|
+
"aria-describedby"?: string | undefined;
|
|
68
|
+
"aria-description"?: string | undefined;
|
|
69
|
+
"aria-details"?: string | undefined;
|
|
70
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
71
|
+
"aria-dropeffect"?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
72
|
+
"aria-errormessage"?: string | undefined;
|
|
73
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
74
|
+
"aria-flowto"?: string | undefined;
|
|
75
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
76
|
+
"aria-haspopup"?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
|
|
77
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
78
|
+
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
79
|
+
"aria-keyshortcuts"?: string | undefined;
|
|
80
|
+
"aria-label"?: string | undefined;
|
|
81
|
+
"aria-labelledby"?: string | undefined;
|
|
82
|
+
"aria-level"?: number | undefined;
|
|
83
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
84
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
85
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
86
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
87
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
88
|
+
"aria-owns"?: string | undefined;
|
|
89
|
+
"aria-placeholder"?: string | undefined;
|
|
90
|
+
"aria-posinset"?: number | undefined;
|
|
91
|
+
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
92
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
93
|
+
"aria-relevant"?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
94
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
95
|
+
"aria-roledescription"?: string | undefined;
|
|
96
|
+
"aria-rowcount"?: number | undefined;
|
|
97
|
+
"aria-rowindex"?: number | undefined;
|
|
98
|
+
"aria-rowindextext"?: string | undefined;
|
|
99
|
+
"aria-rowspan"?: number | undefined;
|
|
100
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
101
|
+
"aria-setsize"?: number | undefined;
|
|
102
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
103
|
+
"aria-valuemax"?: number | undefined;
|
|
104
|
+
"aria-valuemin"?: number | undefined;
|
|
105
|
+
"aria-valuenow"?: number | undefined;
|
|
106
|
+
"aria-valuetext"?: string | undefined;
|
|
107
|
+
dangerouslySetInnerHTML?: {
|
|
108
|
+
__html: string | TrustedHTML;
|
|
109
|
+
} | undefined;
|
|
110
|
+
onCopy?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
111
|
+
onCopyCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
112
|
+
onCut?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
113
|
+
onCutCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
114
|
+
onPaste?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
115
|
+
onPasteCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
116
|
+
onCompositionEnd?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
117
|
+
onCompositionEndCapture?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
118
|
+
onCompositionStart?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
119
|
+
onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
120
|
+
onCompositionUpdate?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
121
|
+
onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
122
|
+
onFocus?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
123
|
+
onFocusCapture?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
124
|
+
onBlur?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
125
|
+
onBlurCapture?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
126
|
+
onChange?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
127
|
+
onChangeCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
128
|
+
onBeforeInput?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
129
|
+
onBeforeInputCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
130
|
+
onInput?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
131
|
+
onInputCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
132
|
+
onReset?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
133
|
+
onResetCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
134
|
+
onSubmit?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
135
|
+
onSubmitCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
136
|
+
onInvalid?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
137
|
+
onInvalidCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
138
|
+
onLoad?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
139
|
+
onLoadCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
140
|
+
onError?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
141
|
+
onErrorCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
142
|
+
onKeyDown?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
143
|
+
onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
144
|
+
onKeyPress?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
145
|
+
onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
146
|
+
onKeyUp?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
147
|
+
onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
148
|
+
onAbort?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
149
|
+
onAbortCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
150
|
+
onCanPlay?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
151
|
+
onCanPlayCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
152
|
+
onCanPlayThrough?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
153
|
+
onCanPlayThroughCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
154
|
+
onDurationChange?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
155
|
+
onDurationChangeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
156
|
+
onEmptied?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
157
|
+
onEmptiedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
158
|
+
onEncrypted?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
159
|
+
onEncryptedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
160
|
+
onEnded?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
161
|
+
onEndedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
162
|
+
onLoadedData?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
163
|
+
onLoadedDataCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
164
|
+
onLoadedMetadata?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
165
|
+
onLoadedMetadataCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
166
|
+
onLoadStart?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
167
|
+
onLoadStartCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
168
|
+
onPause?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
169
|
+
onPauseCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
170
|
+
onPlay?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
171
|
+
onPlayCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
172
|
+
onPlaying?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
173
|
+
onPlayingCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
174
|
+
onProgress?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
175
|
+
onProgressCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
176
|
+
onRateChange?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
177
|
+
onRateChangeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
178
|
+
onResize?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
179
|
+
onResizeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
180
|
+
onSeeked?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
181
|
+
onSeekedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
182
|
+
onSeeking?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
183
|
+
onSeekingCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
184
|
+
onStalled?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
185
|
+
onStalledCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
186
|
+
onSuspend?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
187
|
+
onSuspendCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
188
|
+
onTimeUpdate?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
189
|
+
onTimeUpdateCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
190
|
+
onVolumeChange?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
191
|
+
onVolumeChangeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
192
|
+
onWaiting?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
193
|
+
onWaitingCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
194
|
+
onAuxClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
195
|
+
onAuxClickCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
196
|
+
onClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
197
|
+
onClickCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
198
|
+
onContextMenu?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
199
|
+
onContextMenuCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
200
|
+
onDoubleClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
201
|
+
onDoubleClickCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
202
|
+
onDragCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
203
|
+
onDragEndCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
204
|
+
onDragEnter?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
205
|
+
onDragEnterCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
206
|
+
onDragExit?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
207
|
+
onDragExitCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
208
|
+
onDragLeave?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
209
|
+
onDragLeaveCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
210
|
+
onDragOver?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
211
|
+
onDragOverCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
212
|
+
onDragStartCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
213
|
+
onDrop?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
214
|
+
onDropCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
215
|
+
onMouseDown?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
216
|
+
onMouseDownCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
217
|
+
onMouseEnter?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
218
|
+
onMouseLeave?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
219
|
+
onMouseMove?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
220
|
+
onMouseMoveCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
221
|
+
onMouseOut?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
222
|
+
onMouseOutCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
223
|
+
onMouseOver?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
224
|
+
onMouseOverCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
225
|
+
onMouseUp?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
226
|
+
onMouseUpCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
227
|
+
onSelect?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
228
|
+
onSelectCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
229
|
+
onTouchCancel?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
230
|
+
onTouchCancelCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
231
|
+
onTouchEnd?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
232
|
+
onTouchEndCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
233
|
+
onTouchMove?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
234
|
+
onTouchMoveCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
235
|
+
onTouchStart?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
236
|
+
onTouchStartCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
237
|
+
onPointerDown?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
238
|
+
onPointerDownCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
239
|
+
onPointerMove?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
240
|
+
onPointerMoveCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
241
|
+
onPointerUp?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
242
|
+
onPointerUpCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
243
|
+
onPointerCancel?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
244
|
+
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
245
|
+
onPointerEnter?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
246
|
+
onPointerEnterCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
247
|
+
onPointerLeave?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
248
|
+
onPointerLeaveCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
249
|
+
onPointerOver?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
250
|
+
onPointerOverCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
251
|
+
onPointerOut?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
252
|
+
onPointerOutCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
253
|
+
onGotPointerCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
254
|
+
onGotPointerCaptureCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
255
|
+
onLostPointerCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
256
|
+
onLostPointerCaptureCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
257
|
+
onScroll?: import("react").UIEventHandler<HTMLDivElement> | undefined;
|
|
258
|
+
onScrollCapture?: import("react").UIEventHandler<HTMLDivElement> | undefined;
|
|
259
|
+
onWheel?: import("react").WheelEventHandler<HTMLDivElement> | undefined;
|
|
260
|
+
onWheelCapture?: import("react").WheelEventHandler<HTMLDivElement> | undefined;
|
|
261
|
+
onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
262
|
+
onAnimationEnd?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
263
|
+
onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
264
|
+
onAnimationIteration?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
265
|
+
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
266
|
+
onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
267
|
+
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
268
|
+
} & import("framer-motion").MotionProps & import("react").RefAttributes<HTMLDivElement>, StyledSwipeableActionProps>> & import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>;
|
|
269
|
+
type StyledSwipeableActionButtonsProps = Pick<SwipeableActionItem, 'color'> & {
|
|
6
270
|
width: CSSProperties['width'];
|
|
7
|
-
}
|
|
271
|
+
};
|
|
272
|
+
export declare const StyledSwipeableActionButton: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, StyledSwipeableActionButtonsProps>>;
|
|
273
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chayns-components/swipeable-wrapper",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.310",
|
|
4
4
|
"description": "A set of beautiful React components for developing your own applications with chayns.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chayns",
|
|
@@ -33,27 +33,27 @@
|
|
|
33
33
|
"url": "https://github.com/TobitSoftware/chayns-components/issues"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@babel/cli": "^7.23.
|
|
36
|
+
"@babel/cli": "^7.23.4",
|
|
37
37
|
"@babel/core": "^7.23.3",
|
|
38
38
|
"@babel/preset-env": "^7.23.3",
|
|
39
39
|
"@babel/preset-react": "^7.23.3",
|
|
40
40
|
"@babel/preset-typescript": "^7.23.3",
|
|
41
|
-
"@types/react": "^
|
|
42
|
-
"@types/react-dom": "^
|
|
43
|
-
"@types/styled-components": "^5.1.
|
|
41
|
+
"@types/react": "^18.2.38",
|
|
42
|
+
"@types/react-dom": "^18.2.17",
|
|
43
|
+
"@types/styled-components": "^5.1.32",
|
|
44
44
|
"@types/uuid": "^9.0.7",
|
|
45
|
-
"babel-loader": "^
|
|
45
|
+
"babel-loader": "^9.1.3",
|
|
46
46
|
"lerna": "^7.4.2",
|
|
47
|
-
"react": "^
|
|
48
|
-
"react-dom": "^
|
|
49
|
-
"styled-components": "^
|
|
50
|
-
"typescript": "^
|
|
47
|
+
"react": "^18.2.0",
|
|
48
|
+
"react-dom": "^18.2.0",
|
|
49
|
+
"styled-components": "^6.1.1",
|
|
50
|
+
"typescript": "^5.3.2"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@chayns-components/core": "^5.0.0-beta.
|
|
53
|
+
"@chayns-components/core": "^5.0.0-beta.310",
|
|
54
54
|
"chayns-api": "^1.0.40",
|
|
55
|
-
"clsx": "^
|
|
56
|
-
"framer-motion": "^
|
|
55
|
+
"clsx": "^2.0.0",
|
|
56
|
+
"framer-motion": "^10.16.5",
|
|
57
57
|
"uuid": "^9.0.1"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "15f90d1b8de92f8315b62820045c89951c024065"
|
|
68
68
|
}
|