Skip to content

Releases: atomicojs/hooks

avoid blocking the use of the template tag in use-dollars

26 Oct 22:44
Compare
Choose a tag to compare
3.20.2

avoid blocking the use of the template tag in use-dollars

fix use-dollars

26 Oct 22:24
Compare
Choose a tag to compare

delay the use of dollar within a useEffect

create hook to use dollars.js

26 Oct 04:22
Compare
Choose a tag to compare

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:

  1. expose the webcomponent's api to the lightDOM and react to it.
  2. 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

19 Oct 02:57
Compare
Choose a tag to compare
3.19.2

fix id

fix getSizes capture

19 Oct 00:12
Compare
Choose a tag to compare

Fix improves comma detection

add the hook useReflectEvent

15 Oct 13:37
Compare
Choose a tag to compare

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

11 Oct 14:04
Compare
Choose a tag to compare

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

04 Oct 06:01
Compare
Choose a tag to compare
3.17.0

use-controller now resolves ReactiveController interface as peerDepen…

fix use-click-coordinates

03 Oct 05:21
Compare
Choose a tag to compare

remove the detection of the touch event

internal improvements and fix use-click-coordinates

03 Oct 04:54
Compare
Choose a tag to compare

fix use-click-coordinates when creating the offset on touch devices