feat(react): implement timer
Implement Zag's Timer in React as part of #2497
There's one issue still to be solved related to the action trigger, it seems that click handler from timer.getActionTriggerProps() does not modify the machine 🤔 and I couldn't figure out yet.
Demo
https://github.com/chakra-ui/ark/assets/30840709/abe8d26c-751d-4319-a917-9d3d9d476cfb
@jeferson-sb is attempting to deploy a commit to the Chakra UI Team on Vercel.
A member of the Team first needs to authorize it.
It seems the issue from the getActionTriggerProps props might come from the actions on Zag.js
https://github.com/chakra-ui/zag/blob/70e6f64acc997490ef5c035f0995c6e8c9fd59d9/packages/machines/timer/src/timer.connect.ts#L75-L85
I wonder if it's expecting PAUSE, START, RESUME all uppercase instead of lowercase.
@jeferson-sb
I've updated your PR. You were right. A fix in zag-js will be included in the next release.