@ark-ui/react 5.18.1 → 5.18.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -26,10 +26,10 @@ const withAsChild = (Component) => {
|
|
|
26
26
|
if (!asChild) {
|
|
27
27
|
return react.createElement(Component, { ...restProps, ref }, children);
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
if (!react.isValidElement(onlyChild)) {
|
|
29
|
+
if (!react.isValidElement(children)) {
|
|
31
30
|
return null;
|
|
32
31
|
}
|
|
32
|
+
const onlyChild = react.Children.only(children);
|
|
33
33
|
const childRef = getRef(onlyChild);
|
|
34
34
|
return react.cloneElement(onlyChild, {
|
|
35
35
|
...core.mergeProps(restProps, onlyChild.props),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mergeProps } from '@zag-js/core';
|
|
2
|
-
import { memo, forwardRef, createElement,
|
|
2
|
+
import { memo, forwardRef, createElement, isValidElement, Children, cloneElement } from 'react';
|
|
3
3
|
import { composeRefs } from '../utils/compose-refs.js';
|
|
4
4
|
|
|
5
5
|
function getRef(element) {
|
|
@@ -22,10 +22,10 @@ const withAsChild = (Component) => {
|
|
|
22
22
|
if (!asChild) {
|
|
23
23
|
return createElement(Component, { ...restProps, ref }, children);
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
if (!isValidElement(onlyChild)) {
|
|
25
|
+
if (!isValidElement(children)) {
|
|
27
26
|
return null;
|
|
28
27
|
}
|
|
28
|
+
const onlyChild = Children.only(children);
|
|
29
29
|
const childRef = getRef(onlyChild);
|
|
30
30
|
return cloneElement(onlyChild, {
|
|
31
31
|
...mergeProps(restProps, onlyChild.props),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export type {
|
|
1
|
+
export type { WaitForOptions as WaitOptions } from '@zag-js/dom-query';
|
|
2
|
+
export type { Point, ProgressTextDetails, StatusChangeDetails, StepAction, StepActionMap, StepActionTriggerProps, StepBaseDetails, StepChangeDetails, StepDetails, StepEffectArgs, StepPlacement, StepStatus, StepType, } from '@zag-js/tour';
|
|
2
3
|
export { TourActionTrigger as ActionTrigger, type TourActionTriggerBaseProps as ActionTriggerBaseProps, type TourActionTriggerProps as ActionTriggerProps, } from './tour-action-trigger';
|
|
3
4
|
export { TourActions as Actions, type TourActionsProps as ActionsProps } from './tour-actions';
|
|
4
5
|
export { TourArrow as Arrow, type TourArrowBaseProps as ArrowBaseProps, type TourArrowProps as ArrowProps, } from './tour-arrow';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export type {
|
|
1
|
+
export type { WaitForOptions as WaitOptions } from '@zag-js/dom-query';
|
|
2
|
+
export type { Point, ProgressTextDetails, StatusChangeDetails, StepAction, StepActionMap, StepActionTriggerProps, StepBaseDetails, StepChangeDetails, StepDetails, StepEffectArgs, StepPlacement, StepStatus, StepType, } from '@zag-js/tour';
|
|
2
3
|
export { TourActionTrigger as ActionTrigger, type TourActionTriggerBaseProps as ActionTriggerBaseProps, type TourActionTriggerProps as ActionTriggerProps, } from './tour-action-trigger';
|
|
3
4
|
export { TourActions as Actions, type TourActionsProps as ActionsProps } from './tour-actions';
|
|
4
5
|
export { TourArrow as Arrow, type TourArrowBaseProps as ArrowBaseProps, type TourArrowProps as ArrowProps, } from './tour-arrow';
|
package/dist/utils/use-event.cjs
CHANGED
|
@@ -9,7 +9,6 @@ function useEvent(callback, opts = {}) {
|
|
|
9
9
|
const { sync = false } = opts;
|
|
10
10
|
const callbackRef = useLatestRef(callback);
|
|
11
11
|
return react.useCallback(
|
|
12
|
-
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
13
12
|
(...args) => {
|
|
14
13
|
if (sync) return queueMicrotask(() => callbackRef.current?.(...args));
|
|
15
14
|
return callbackRef.current?.(...args);
|
package/dist/utils/use-event.js
CHANGED
|
@@ -5,7 +5,6 @@ function useEvent(callback, opts = {}) {
|
|
|
5
5
|
const { sync = false } = opts;
|
|
6
6
|
const callbackRef = useLatestRef(callback);
|
|
7
7
|
return useCallback(
|
|
8
|
-
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
9
8
|
(...args) => {
|
|
10
9
|
if (sync) return queueMicrotask(() => callbackRef.current?.(...args));
|
|
11
10
|
return callbackRef.current?.(...args);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ark-ui/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.18.
|
|
4
|
+
"version": "5.18.3",
|
|
5
5
|
"description": "A collection of unstyled, accessible UI components for React, utilizing state machines for seamless interaction.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"accordion",
|
|
@@ -141,64 +141,64 @@
|
|
|
141
141
|
"sideEffects": false,
|
|
142
142
|
"dependencies": {
|
|
143
143
|
"@internationalized/date": "3.8.2",
|
|
144
|
-
"@zag-js/accordion": "1.
|
|
145
|
-
"@zag-js/angle-slider": "1.
|
|
146
|
-
"@zag-js/anatomy": "1.
|
|
147
|
-
"@zag-js/auto-resize": "1.
|
|
148
|
-
"@zag-js/avatar": "1.
|
|
149
|
-
"@zag-js/carousel": "1.
|
|
150
|
-
"@zag-js/checkbox": "1.
|
|
151
|
-
"@zag-js/clipboard": "1.
|
|
152
|
-
"@zag-js/collapsible": "1.
|
|
153
|
-
"@zag-js/collection": "1.
|
|
154
|
-
"@zag-js/color-picker": "1.
|
|
155
|
-
"@zag-js/color-utils": "1.
|
|
156
|
-
"@zag-js/combobox": "1.
|
|
157
|
-
"@zag-js/core": "1.
|
|
158
|
-
"@zag-js/date-picker": "1.
|
|
159
|
-
"@zag-js/date-utils": "1.
|
|
160
|
-
"@zag-js/dialog": "1.
|
|
161
|
-
"@zag-js/dom-query": "1.
|
|
162
|
-
"@zag-js/editable": "1.
|
|
163
|
-
"@zag-js/file-upload": "1.
|
|
164
|
-
"@zag-js/file-utils": "1.
|
|
165
|
-
"@zag-js/focus-trap": "1.
|
|
166
|
-
"@zag-js/floating-panel": "1.
|
|
167
|
-
"@zag-js/highlight-word": "1.
|
|
168
|
-
"@zag-js/hover-card": "1.
|
|
169
|
-
"@zag-js/i18n-utils": "1.
|
|
170
|
-
"@zag-js/json-tree-utils": "1.
|
|
171
|
-
"@zag-js/listbox": "1.
|
|
172
|
-
"@zag-js/menu": "1.
|
|
173
|
-
"@zag-js/number-input": "1.
|
|
174
|
-
"@zag-js/pagination": "1.
|
|
175
|
-
"@zag-js/password-input": "1.
|
|
176
|
-
"@zag-js/pin-input": "1.
|
|
177
|
-
"@zag-js/popover": "1.
|
|
178
|
-
"@zag-js/presence": "1.
|
|
179
|
-
"@zag-js/progress": "1.
|
|
180
|
-
"@zag-js/qr-code": "1.
|
|
181
|
-
"@zag-js/radio-group": "1.
|
|
182
|
-
"@zag-js/rating-group": "1.
|
|
183
|
-
"@zag-js/react": "1.
|
|
184
|
-
"@zag-js/select": "1.
|
|
185
|
-
"@zag-js/signature-pad": "1.
|
|
186
|
-
"@zag-js/slider": "1.
|
|
187
|
-
"@zag-js/splitter": "1.
|
|
188
|
-
"@zag-js/steps": "1.
|
|
189
|
-
"@zag-js/switch": "1.
|
|
190
|
-
"@zag-js/tabs": "1.
|
|
191
|
-
"@zag-js/tags-input": "1.
|
|
192
|
-
"@zag-js/time-picker": "1.
|
|
193
|
-
"@zag-js/timer": "1.
|
|
194
|
-
"@zag-js/toast": "1.
|
|
195
|
-
"@zag-js/toggle": "1.
|
|
196
|
-
"@zag-js/toggle-group": "1.
|
|
197
|
-
"@zag-js/tooltip": "1.
|
|
198
|
-
"@zag-js/tour": "1.
|
|
199
|
-
"@zag-js/tree-view": "1.
|
|
200
|
-
"@zag-js/types": "1.
|
|
201
|
-
"@zag-js/utils": "1.
|
|
144
|
+
"@zag-js/accordion": "1.21.1",
|
|
145
|
+
"@zag-js/angle-slider": "1.21.1",
|
|
146
|
+
"@zag-js/anatomy": "1.21.1",
|
|
147
|
+
"@zag-js/auto-resize": "1.21.1",
|
|
148
|
+
"@zag-js/avatar": "1.21.1",
|
|
149
|
+
"@zag-js/carousel": "1.21.1",
|
|
150
|
+
"@zag-js/checkbox": "1.21.1",
|
|
151
|
+
"@zag-js/clipboard": "1.21.1",
|
|
152
|
+
"@zag-js/collapsible": "1.21.1",
|
|
153
|
+
"@zag-js/collection": "1.21.1",
|
|
154
|
+
"@zag-js/color-picker": "1.21.1",
|
|
155
|
+
"@zag-js/color-utils": "1.21.1",
|
|
156
|
+
"@zag-js/combobox": "1.21.1",
|
|
157
|
+
"@zag-js/core": "1.21.1",
|
|
158
|
+
"@zag-js/date-picker": "1.21.1",
|
|
159
|
+
"@zag-js/date-utils": "1.21.1",
|
|
160
|
+
"@zag-js/dialog": "1.21.1",
|
|
161
|
+
"@zag-js/dom-query": "1.21.1",
|
|
162
|
+
"@zag-js/editable": "1.21.1",
|
|
163
|
+
"@zag-js/file-upload": "1.21.1",
|
|
164
|
+
"@zag-js/file-utils": "1.21.1",
|
|
165
|
+
"@zag-js/focus-trap": "1.21.1",
|
|
166
|
+
"@zag-js/floating-panel": "1.21.1",
|
|
167
|
+
"@zag-js/highlight-word": "1.21.1",
|
|
168
|
+
"@zag-js/hover-card": "1.21.1",
|
|
169
|
+
"@zag-js/i18n-utils": "1.21.1",
|
|
170
|
+
"@zag-js/json-tree-utils": "1.21.1",
|
|
171
|
+
"@zag-js/listbox": "1.21.1",
|
|
172
|
+
"@zag-js/menu": "1.21.1",
|
|
173
|
+
"@zag-js/number-input": "1.21.1",
|
|
174
|
+
"@zag-js/pagination": "1.21.1",
|
|
175
|
+
"@zag-js/password-input": "1.21.1",
|
|
176
|
+
"@zag-js/pin-input": "1.21.1",
|
|
177
|
+
"@zag-js/popover": "1.21.1",
|
|
178
|
+
"@zag-js/presence": "1.21.1",
|
|
179
|
+
"@zag-js/progress": "1.21.1",
|
|
180
|
+
"@zag-js/qr-code": "1.21.1",
|
|
181
|
+
"@zag-js/radio-group": "1.21.1",
|
|
182
|
+
"@zag-js/rating-group": "1.21.1",
|
|
183
|
+
"@zag-js/react": "1.21.1",
|
|
184
|
+
"@zag-js/select": "1.21.1",
|
|
185
|
+
"@zag-js/signature-pad": "1.21.1",
|
|
186
|
+
"@zag-js/slider": "1.21.1",
|
|
187
|
+
"@zag-js/splitter": "1.21.1",
|
|
188
|
+
"@zag-js/steps": "1.21.1",
|
|
189
|
+
"@zag-js/switch": "1.21.1",
|
|
190
|
+
"@zag-js/tabs": "1.21.1",
|
|
191
|
+
"@zag-js/tags-input": "1.21.1",
|
|
192
|
+
"@zag-js/time-picker": "1.21.1",
|
|
193
|
+
"@zag-js/timer": "1.21.1",
|
|
194
|
+
"@zag-js/toast": "1.21.1",
|
|
195
|
+
"@zag-js/toggle": "1.21.1",
|
|
196
|
+
"@zag-js/toggle-group": "1.21.1",
|
|
197
|
+
"@zag-js/tooltip": "1.21.1",
|
|
198
|
+
"@zag-js/tour": "1.21.1",
|
|
199
|
+
"@zag-js/tree-view": "1.21.1",
|
|
200
|
+
"@zag-js/types": "1.21.1",
|
|
201
|
+
"@zag-js/utils": "1.21.1"
|
|
202
202
|
},
|
|
203
203
|
"devDependencies": {
|
|
204
204
|
"@biomejs/biome": "1.9.4",
|
|
@@ -213,6 +213,7 @@
|
|
|
213
213
|
"@types/react-dom": "19.1.6",
|
|
214
214
|
"@vitejs/plugin-react": "4.7.0",
|
|
215
215
|
"clean-package": "2.2.0",
|
|
216
|
+
"image-conversion": "2.1.1",
|
|
216
217
|
"globby": "14.1.0",
|
|
217
218
|
"happy-dom": "18.0.1",
|
|
218
219
|
"lucide-react": "0.525.0",
|