Releases: atomicojs/hooks
Releases · atomicojs/hooks
avoid blocking the use of the template tag in use-dollars
3.20.2 avoid blocking the use of the template tag in use-dollars
fix use-dollars
delay the use of dollar within a useEffect
create hook to use dollars.js
use-dollars
The purpose of this hook is to allow communication between the webcomponent and the lightDOM without knowing the DOM, achieving with this hook:
- expose the webcomponent's api to the lightDOM and react to it.
- data binding between the state of the webcomponent and the lightDOM.
module
import { useDollars } from "@atomico/hooks/use-dollars";
Syntax
useDollars(ref: Ref<HTMLSlotElement>);
fix id
fix getSizes capture
Fix improves comma detection
add the hook useReflectEvent
the useReflectEvent hook reflects the event from the reference origin to the reference destination, the captured event will be canceled
One of the possibilities of this hook is to reflect the events inside shadowDOM to lightDOM, example when using forms
Module
import { useReflectEvent } from "@atomico/hooks/use-reflect-event";
Syntax
useReflectEvent(
refFrom: Ref<Element>,
refTo: Ref<Element>,
event: string,
filter?: (event:Event)=>boolean
);
Add the hook useKeyboard
This hook allows you to capture the use of the keyboard, allowing the capture of the event by pressing one or more keys, evaluating the order and combination.
module
import { useKeyboard } from "@atomico/hooks/use-keyboard";
Syntax
useKeyboard(
ref: Ref<Element>,
keysCode: string[],
callback: (event: KeyboardEvent)=>void
);
use-controller now resolves ReactiveController interface as peerDependencies
3.17.0 use-controller now resolves ReactiveController interface as peerDepen…
fix use-click-coordinates
remove the detection of the touch event
internal improvements and fix use-click-coordinates
fix use-click-coordinates when creating the offset on touch devices