Skip to content

Commit 9f2b597

Browse files
committed
chore: bump zag-js
1 parent a91ed0e commit 9f2b597

13 files changed

Lines changed: 752 additions & 617 deletions

File tree

.changeset/zag-1-43-features.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
'@ark-ui/react': minor
3+
'@ark-ui/solid': minor
4+
'@ark-ui/svelte': minor
5+
'@ark-ui/vue': minor
6+
---
7+
8+
- **Autofocus Control**: Add `data-autofocus` and `data-no-autofocus` to decide what gets focus when an overlay opens.
9+
Mark chrome like the close button with `data-no-autofocus` to skip it, or mark the real target with `data-autofocus`.
10+
11+
```jsx
12+
<Dialog.Content>
13+
<Dialog.CloseTrigger data-no-autofocus>Close</Dialog.CloseTrigger>
14+
<input data-autofocus />
15+
<button>Save</button>
16+
</Dialog.Content>
17+
```
18+
19+
Focus goes to `initialFocusEl`, then `[data-autofocus]`, then the first tabbable element without
20+
`[data-no-autofocus]`, then the content root.
21+
22+
> Supported in Dialog and Drawer.
23+
24+
- **Focus Trap**: Add `persistentElements` to treat portalled content as part of the trap when it isn't reachable via
25+
`aria-controls`/`aria-expanded`. Pass getters so the elements can be resolved lazily.
26+
27+
```jsx
28+
<FocusTrap persistentElements={[() => document.getElementById('toast-region')]} />
29+
```
30+
31+
- **Image Cropper**: `getCropData()` now returns the exact `corners` and `outputSize` of the crop in natural-image
32+
pixels, so you can hand the region straight to a server-side cropper.
33+
34+
- **Image Cropper**: Add `maxSize` to `getCroppedImage()` to cap the output dimensions. The crop keeps its aspect ratio
35+
and scales down to fit.
36+
37+
```jsx
38+
const blob = await imageCropper.getCroppedImage({ maxSize: { width: 512, height: 512 } })
39+
```

.changeset/zag-1-43-fixes.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
'@ark-ui/react': patch
3+
'@ark-ui/solid': patch
4+
'@ark-ui/svelte': patch
5+
'@ark-ui/vue': patch
6+
---
7+
8+
- **Color Picker**: Fix the channel input committing a partial value when you press `Enter` to confirm an IME
9+
composition.
10+
11+
- **Date Input**
12+
- Fix segment text lagging behind while you type over an already committed date.
13+
- Fix in-progress edits being dropped while focus catches up after auto-advance. Fast typing and
14+
`ArrowUp`/`ArrowDown`/`Home`/`End` now land on the segment you're actually editing.
15+
16+
- **Date Picker**
17+
- Fix disabled and read-only pickers still reacting to cell clicks, the clear trigger, and presets. Read-only pickers
18+
keep roving-focus navigation; disabled pickers drop out of the tab order.
19+
- Fix `minView`, `maxView`, and `defaultView` being ignored when resolving the initial view, which was hardcoded to
20+
day through year.
21+
- Fix `defaultOpen` winning over `open`, so a controlled picker could open against its own prop.
22+
- Fix `maxSelectedDates` not being enforced on month and year cells in `multiple` selection mode.
23+
- Fix keyboard range selection drifting from pointer behavior. Picking a third date restarts the range, and the hover
24+
preview updates for `Enter`, `Home`, `End`, and `PageUp`/`PageDown`.
25+
- Fix reopening the calendar with only a start date restarting the range instead of resuming it.
26+
27+
- **Drawer**: Fix the backdrop flickering on a controlled close when the `open` setter is async.
28+
29+
- **Field**: Fix `Field.Textarea` with `autoresize` dispatching a synthetic `input` event when you set `value`
30+
programmatically, which fed the value back into your framework and broke controlled state.
31+
32+
- **Focus Return**: Fix three focus-trap issues you'd hit with overlays.
33+
- Closing an overlay no longer steals focus back from an element your app focused in the meantime, like a second
34+
dialog opened right after closing the first.
35+
- Closing a nested overlay, such as a popover inside a dialog, no longer throws when the outer container has no
36+
connected focusable element at that moment.
37+
- The focus ring now shows on the returned-to element after you close with `Escape`.
38+
39+
> Affects Dialog, Drawer, Popover, and anything else that traps focus.
40+
41+
- **Image Cropper**: Fix `getCroppedImage()` and `getCropData()` returning a different region from the one you see after
42+
rotating or flipping the image.
43+
44+
- **Marquee**: Fix scroll speed depending on content width. The duration now comes from the content size and the actual
45+
translation distance, so `speed` matches real pixel speed even when the content is narrower than the viewport.
46+
47+
- **Popover**: Fix tabbing out of portalled content looping back into the content when the trigger was the last tabbable
48+
element on the page. Focus now moves to the next tabbable element after the trigger.
49+
50+
- **Scroll Lock**: Fix the scroll lock targeting `<body>` on layouts where `<html>` is the real scroll container, which
51+
meant nothing was locked while an overlay was open.
52+
53+
- **Signature Pad**: Fix controlled `paths` drifting out of sync because the in-progress stroke was appended to `paths`.
54+
It now stays in `onDraw.currentPath` until the stroke ends.
55+
56+
- **Splitter**
57+
- Fix collapsed panels sizing to `minSize` instead of `collapsedSize`.
58+
- Fix keyboard resizing breaking when a resize trigger got focus while hovered.
59+
60+
- **Tour**
61+
- Fix dismissing a tour from a step's `effect` skipping cleanup, which could miss firing the `completed` status.
62+
- Fix a tooltip step's position resetting unexpectedly when the tour closed.
63+
- Fix a step action with `action: "skip"` doing nothing when clicked.
64+
65+
- **Solid**: Fix a `value` of `null` being read as uncontrolled, so controlled components fell back to internal state.
66+
67+
- **Solid, Svelte**: Fix machine exit actions running when a component was disposed before the machine started.
68+
69+
- **Vue, Svelte**: Fix `defaultValue` being resolved before `value`, unlike React and Solid.

0 commit comments

Comments
 (0)