Skip to content

Commit 20ef906

Browse files
committed
chore: upgrade zag-js to latest
1 parent 82e8852 commit 20ef906

File tree

11 files changed

+751
-721
lines changed

11 files changed

+751
-721
lines changed

Diff for: packages/react/CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ description: All notable changes will be documented in this file.
66

77
## [Unreleased]
88

9+
## [4.8.1] - 2025-01-13
10+
11+
### Fixed
12+
13+
- **FileUpload**
14+
15+
- Fixed issue where the preview image shows a brief warning when a new image file is added.
16+
- Improve click detection for dropzone and add support for `disableClick` prop on dropzone.
17+
18+
- **General**: Don't reset form-related components if reset event is cancelled
19+
920
## [4.8.0] - 2025-01-11
1021

1122
### Added

Diff for: packages/react/package.json

+52-52
Original file line numberDiff line numberDiff line change
@@ -166,57 +166,57 @@
166166
"sideEffects": false,
167167
"dependencies": {
168168
"@internationalized/date": "3.6.0",
169-
"@zag-js/accordion": "0.81.1",
170-
"@zag-js/anatomy": "0.81.1",
171-
"@zag-js/auto-resize": "0.81.1",
172-
"@zag-js/avatar": "0.81.1",
173-
"@zag-js/carousel": "0.81.1",
174-
"@zag-js/checkbox": "0.81.1",
175-
"@zag-js/clipboard": "0.81.1",
176-
"@zag-js/collapsible": "0.81.1",
177-
"@zag-js/collection": "0.81.1",
178-
"@zag-js/color-picker": "0.81.1",
179-
"@zag-js/color-utils": "0.81.1",
180-
"@zag-js/combobox": "0.81.1",
181-
"@zag-js/core": "0.81.1",
182-
"@zag-js/date-picker": "0.81.1",
183-
"@zag-js/date-utils": "0.81.1",
184-
"@zag-js/dialog": "0.81.1",
185-
"@zag-js/dom-query": "0.81.1",
186-
"@zag-js/editable": "0.81.1",
187-
"@zag-js/file-upload": "0.81.1",
188-
"@zag-js/file-utils": "0.81.1",
189-
"@zag-js/focus-trap": "0.81.1",
190-
"@zag-js/highlight-word": "0.81.1",
191-
"@zag-js/hover-card": "0.81.1",
192-
"@zag-js/i18n-utils": "0.81.1",
193-
"@zag-js/menu": "0.81.1",
194-
"@zag-js/number-input": "0.81.1",
195-
"@zag-js/pagination": "0.81.1",
196-
"@zag-js/pin-input": "0.81.1",
197-
"@zag-js/popover": "0.81.1",
198-
"@zag-js/presence": "0.81.1",
199-
"@zag-js/progress": "0.81.1",
200-
"@zag-js/qr-code": "0.81.1",
201-
"@zag-js/radio-group": "0.81.1",
202-
"@zag-js/rating-group": "0.81.1",
203-
"@zag-js/react": "0.81.1",
204-
"@zag-js/select": "0.81.1",
205-
"@zag-js/signature-pad": "0.81.1",
206-
"@zag-js/slider": "0.81.1",
207-
"@zag-js/splitter": "0.81.1",
208-
"@zag-js/steps": "0.81.1",
209-
"@zag-js/switch": "0.81.1",
210-
"@zag-js/tabs": "0.81.1",
211-
"@zag-js/tags-input": "0.81.1",
212-
"@zag-js/time-picker": "0.81.1",
213-
"@zag-js/timer": "0.81.1",
214-
"@zag-js/toast": "0.81.1",
215-
"@zag-js/toggle-group": "0.81.1",
216-
"@zag-js/tooltip": "0.81.1",
217-
"@zag-js/tour": "0.81.1",
218-
"@zag-js/tree-view": "0.81.1",
219-
"@zag-js/types": "0.81.1"
169+
"@zag-js/accordion": "0.81.2",
170+
"@zag-js/anatomy": "0.81.2",
171+
"@zag-js/auto-resize": "0.81.2",
172+
"@zag-js/avatar": "0.81.2",
173+
"@zag-js/carousel": "0.81.2",
174+
"@zag-js/checkbox": "0.81.2",
175+
"@zag-js/clipboard": "0.81.2",
176+
"@zag-js/collapsible": "0.81.2",
177+
"@zag-js/collection": "0.81.2",
178+
"@zag-js/color-picker": "0.81.2",
179+
"@zag-js/color-utils": "0.81.2",
180+
"@zag-js/combobox": "0.81.2",
181+
"@zag-js/core": "0.81.2",
182+
"@zag-js/date-picker": "0.81.2",
183+
"@zag-js/date-utils": "0.81.2",
184+
"@zag-js/dialog": "0.81.2",
185+
"@zag-js/dom-query": "0.81.2",
186+
"@zag-js/editable": "0.81.2",
187+
"@zag-js/file-upload": "0.81.2",
188+
"@zag-js/file-utils": "0.81.2",
189+
"@zag-js/focus-trap": "0.81.2",
190+
"@zag-js/highlight-word": "0.81.2",
191+
"@zag-js/hover-card": "0.81.2",
192+
"@zag-js/i18n-utils": "0.81.2",
193+
"@zag-js/menu": "0.81.2",
194+
"@zag-js/number-input": "0.81.2",
195+
"@zag-js/pagination": "0.81.2",
196+
"@zag-js/pin-input": "0.81.2",
197+
"@zag-js/popover": "0.81.2",
198+
"@zag-js/presence": "0.81.2",
199+
"@zag-js/progress": "0.81.2",
200+
"@zag-js/qr-code": "0.81.2",
201+
"@zag-js/radio-group": "0.81.2",
202+
"@zag-js/rating-group": "0.81.2",
203+
"@zag-js/react": "0.81.2",
204+
"@zag-js/select": "0.81.2",
205+
"@zag-js/signature-pad": "0.81.2",
206+
"@zag-js/slider": "0.81.2",
207+
"@zag-js/splitter": "0.81.2",
208+
"@zag-js/steps": "0.81.2",
209+
"@zag-js/switch": "0.81.2",
210+
"@zag-js/tabs": "0.81.2",
211+
"@zag-js/tags-input": "0.81.2",
212+
"@zag-js/time-picker": "0.81.2",
213+
"@zag-js/timer": "0.81.2",
214+
"@zag-js/toast": "0.81.2",
215+
"@zag-js/toggle-group": "0.81.2",
216+
"@zag-js/tooltip": "0.81.2",
217+
"@zag-js/tour": "0.81.2",
218+
"@zag-js/tree-view": "0.81.2",
219+
"@zag-js/types": "0.81.2"
220220
},
221221
"devDependencies": {
222222
"@biomejs/biome": "1.9.4",
@@ -233,7 +233,7 @@
233233
"@types/react": "19.0.6",
234234
"@types/react-dom": "19.0.3",
235235
"@vitejs/plugin-react": "4.3.4",
236-
"@zag-js/stringify-state": "0.81.1",
236+
"@zag-js/stringify-state": "0.81.2",
237237
"clean-package": "2.2.0",
238238
"globby": "14.0.2",
239239
"jsdom": "25.0.1",
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,33 @@
1-
import { mergeProps } from '@zag-js/react'
2-
import { forwardRef, useEffect, useState } from 'react'
3-
import { type HTMLProps, type PolymorphicProps, ark } from '../factory'
4-
import { useFileUploadContext } from './use-file-upload-context'
5-
import { useFileUploadItemPropsContext } from './use-file-upload-item-props-context'
1+
import { mergeProps } from "@zag-js/react";
2+
import { forwardRef, useEffect, useState } from "react";
3+
import { type HTMLProps, type PolymorphicProps, ark } from "../factory";
4+
import { useFileUploadContext } from "./use-file-upload-context";
5+
import { useFileUploadItemPropsContext } from "./use-file-upload-item-props-context";
66

77
export interface FileUploadItemPreviewImageBaseProps extends PolymorphicProps {}
88
export interface FileUploadItemPreviewImageProps
9-
extends HTMLProps<'img'>,
10-
FileUploadItemPreviewImageBaseProps {}
9+
extends HTMLProps<"img">,
10+
FileUploadItemPreviewImageBaseProps {}
1111

1212
export const FileUploadItemPreviewImage = forwardRef<
13-
HTMLImageElement,
14-
FileUploadItemPreviewImageProps
13+
HTMLImageElement,
14+
FileUploadItemPreviewImageProps
1515
>((props, ref) => {
16-
const [url, setUrl] = useState<string>('')
17-
const fileUpload = useFileUploadContext()
18-
const itemProps = useFileUploadItemPropsContext()
19-
const mergedProps = mergeProps(fileUpload.getItemPreviewImageProps({ ...itemProps, url }), props)
16+
const [url, setUrl] = useState<string>("");
17+
const fileUpload = useFileUploadContext();
18+
const itemProps = useFileUploadItemPropsContext();
19+
const mergedProps = mergeProps(
20+
fileUpload.getItemPreviewImageProps({ ...itemProps, url }),
21+
props,
22+
);
2023

21-
useEffect(() => {
22-
return fileUpload.createFileUrl(itemProps.file, (url) => setUrl(url))
23-
}, [itemProps, fileUpload])
24+
useEffect(() => {
25+
return fileUpload.createFileUrl(itemProps.file, (url) => setUrl(url));
26+
}, [itemProps, fileUpload]);
2427

25-
return <ark.img {...mergedProps} ref={ref} />
26-
})
28+
if (!url) return null;
2729

28-
FileUploadItemPreviewImage.displayName = 'FileUploadItemPreviewImage'
30+
return <ark.img {...mergedProps} ref={ref} />;
31+
});
32+
33+
FileUploadItemPreviewImage.displayName = "FileUploadItemPreviewImage";

Diff for: packages/solid/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ description: All notable changes will be documented in this file.
1717

1818
- **HoverCard, Tooltip**: Resolved an issue where the controlled open state could become
1919
inconsistent during the `opening` or `closing` phases.
20+
- **FileUpload**
21+
22+
- Fixed issue where the preview image shows a brief warning when a new image file is added.
23+
- Improve click detection for dropzone and add support for `disableClick` prop on dropzone.
24+
25+
- **General**: Don't reset form-related components if reset event is cancelled
2026

2127
## [4.8.0] - 2025-01-08
2228

0 commit comments

Comments
 (0)