@yamada-ui/ripple
Advanced tools
Comparing version 0.0.0-dev-20231215145256 to 0.0.0-dev-20231215152304
@@ -84,3 +84,3 @@ "use strict"; | ||
const [ripples, setRipples] = (0, import_react.useState)([]); | ||
const onClick = (0, import_react.useCallback)((ev) => { | ||
const onPointerDown = (0, import_react.useCallback)((ev) => { | ||
const trigger = ev.currentTarget; | ||
@@ -102,3 +102,7 @@ const size = Math.max(trigger.clientWidth, trigger.clientHeight); | ||
}, []); | ||
return { ripples, onClick: (0, import_utils2.handlerAll)(onClick, props.onClick), onClear }; | ||
return { | ||
ripples, | ||
onPointerDown: (0, import_utils2.handlerAll)(onPointerDown, props.onPointerDown), | ||
onClear | ||
}; | ||
}; | ||
@@ -105,0 +109,0 @@ // Annotate the CommonJS export names for ESM import in node: |
@@ -1,2 +0,2 @@ | ||
import React, { MouseEventHandler, Key } from 'react'; | ||
import React, { PointerEventHandler, Key } from 'react'; | ||
@@ -10,7 +10,7 @@ type RippleOptions = { | ||
type UseRippleProps<T extends any = HTMLElement> = { | ||
onClick?: MouseEventHandler<T>; | ||
onPointerDown?: PointerEventHandler<T>; | ||
}; | ||
declare const useRipple: <T extends unknown = HTMLElement>(props: UseRippleProps<T>) => { | ||
ripples: RippleOptions[]; | ||
onClick: (event: React.MouseEvent<T, MouseEvent>) => void; | ||
onPointerDown: (event: React.PointerEvent<T>) => void; | ||
onClear: (key: Key) => void; | ||
@@ -17,0 +17,0 @@ }; |
@@ -30,3 +30,3 @@ "use strict"; | ||
const [ripples, setRipples] = (0, import_react.useState)([]); | ||
const onClick = (0, import_react.useCallback)((ev) => { | ||
const onPointerDown = (0, import_react.useCallback)((ev) => { | ||
const trigger = ev.currentTarget; | ||
@@ -48,3 +48,7 @@ const size = Math.max(trigger.clientWidth, trigger.clientHeight); | ||
}, []); | ||
return { ripples, onClick: (0, import_utils.handlerAll)(onClick, props.onClick), onClear }; | ||
return { | ||
ripples, | ||
onPointerDown: (0, import_utils.handlerAll)(onPointerDown, props.onPointerDown), | ||
onClear | ||
}; | ||
}; | ||
@@ -51,0 +55,0 @@ // Annotate the CommonJS export names for ESM import in node: |
{ | ||
"name": "@yamada-ui/ripple", | ||
"version": "0.0.0-dev-20231215145256", | ||
"version": "0.0.0-dev-20231215152304", | ||
"description": "Yamada UI ripple component", | ||
@@ -25,5 +25,5 @@ "keywords": [], | ||
"dependencies": { | ||
"@yamada-ui/core": "0.0.0-dev-20231215145256", | ||
"@yamada-ui/core": "0.0.0-dev-20231215152304", | ||
"@yamada-ui/utils": "0.5.0", | ||
"@yamada-ui/motion": "0.0.0-dev-20231215145256" | ||
"@yamada-ui/motion": "0.0.0-dev-20231215152304" | ||
}, | ||
@@ -30,0 +30,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32763
382
+ Added@yamada-ui/core@0.0.0-dev-20231215152304(transitive)
+ Added@yamada-ui/motion@0.0.0-dev-20231215152304(transitive)
- Removed@yamada-ui/core@0.0.0-dev-20231215145256(transitive)
- Removed@yamada-ui/motion@0.0.0-dev-20231215145256(transitive)