@ark-ui/react 5.0.0 → 5.1.0
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.
- package/dist/components/accordion/use-accordion.cjs +1 -1
- package/dist/components/accordion/use-accordion.js +1 -1
- package/dist/components/avatar/use-avatar.cjs +1 -1
- package/dist/components/avatar/use-avatar.js +1 -1
- package/dist/components/clipboard/use-clipboard.cjs +1 -1
- package/dist/components/clipboard/use-clipboard.js +1 -1
- package/dist/components/color-picker/use-color-picker.cjs +1 -1
- package/dist/components/color-picker/use-color-picker.js +1 -1
- package/dist/components/date-picker/use-date-picker.cjs +1 -1
- package/dist/components/date-picker/use-date-picker.js +1 -1
- package/dist/components/dialog/use-dialog.cjs +1 -1
- package/dist/components/dialog/use-dialog.js +1 -1
- package/dist/components/editable/use-editable.cjs +1 -1
- package/dist/components/editable/use-editable.js +1 -1
- package/dist/components/field/index.cjs +2 -0
- package/dist/components/field/index.d.cts +1 -0
- package/dist/components/field/index.d.ts +1 -0
- package/dist/components/field/index.js +1 -0
- package/dist/components/file-upload/use-file-upload.cjs +1 -1
- package/dist/components/file-upload/use-file-upload.js +1 -1
- package/dist/components/hover-card/use-hover-card.cjs +1 -1
- package/dist/components/hover-card/use-hover-card.js +1 -1
- package/dist/components/index.cjs +2 -0
- package/dist/components/index.js +1 -0
- package/dist/components/menu/use-menu.cjs +1 -1
- package/dist/components/menu/use-menu.js +1 -1
- package/dist/components/number-input/use-number-input.cjs +1 -1
- package/dist/components/number-input/use-number-input.js +1 -1
- package/dist/components/pagination/use-pagination.cjs +1 -1
- package/dist/components/pagination/use-pagination.js +1 -1
- package/dist/components/pin-input/use-pin-input.cjs +1 -1
- package/dist/components/pin-input/use-pin-input.js +1 -1
- package/dist/components/popover/use-popover.cjs +1 -1
- package/dist/components/popover/use-popover.js +1 -1
- package/dist/components/presence/use-presence.cjs +1 -1
- package/dist/components/presence/use-presence.d.cts +1 -1
- package/dist/components/presence/use-presence.d.ts +1 -1
- package/dist/components/presence/use-presence.js +1 -1
- package/dist/components/progress/use-progress.cjs +1 -1
- package/dist/components/progress/use-progress.js +1 -1
- package/dist/components/qr-code/use-qr-code.cjs +1 -1
- package/dist/components/qr-code/use-qr-code.js +1 -1
- package/dist/components/radio-group/use-radio-group.cjs +1 -1
- package/dist/components/radio-group/use-radio-group.js +1 -1
- package/dist/components/rating-group/use-rating-group.cjs +1 -1
- package/dist/components/rating-group/use-rating-group.js +1 -1
- package/dist/components/segment-group/use-segment-group.cjs +1 -1
- package/dist/components/segment-group/use-segment-group.js +1 -1
- package/dist/components/signature-pad/use-signature-pad.cjs +1 -1
- package/dist/components/signature-pad/use-signature-pad.js +1 -1
- package/dist/components/slider/use-slider.cjs +1 -1
- package/dist/components/slider/use-slider.js +1 -1
- package/dist/components/splitter/use-splitter.cjs +1 -1
- package/dist/components/splitter/use-splitter.js +1 -1
- package/dist/components/steps/use-steps.cjs +1 -1
- package/dist/components/steps/use-steps.js +1 -1
- package/dist/components/switch/use-switch.cjs +1 -1
- package/dist/components/switch/use-switch.js +1 -1
- package/dist/components/tabs/use-tabs.cjs +1 -1
- package/dist/components/tabs/use-tabs.js +1 -1
- package/dist/components/tags-input/use-tags-input.cjs +1 -1
- package/dist/components/tags-input/use-tags-input.js +1 -1
- package/dist/components/time-picker/use-time-picker.cjs +1 -1
- package/dist/components/time-picker/use-time-picker.js +1 -1
- package/dist/components/timer/use-timer.cjs +1 -1
- package/dist/components/timer/use-timer.js +1 -1
- package/dist/components/toggle/use-toggle.d.cts +1 -1
- package/dist/components/toggle/use-toggle.d.ts +1 -1
- package/dist/components/toggle-group/use-toggle-group.cjs +1 -1
- package/dist/components/toggle-group/use-toggle-group.js +1 -1
- package/dist/components/tooltip/use-tooltip.cjs +1 -1
- package/dist/components/tooltip/use-tooltip.js +1 -1
- package/dist/components/tour/use-tour.cjs +1 -1
- package/dist/components/tour/use-tour.js +1 -1
- package/dist/index.cjs +2 -0
- package/dist/index.js +1 -0
- package/dist/utils/compose-refs.cjs +16 -8
- package/dist/utils/compose-refs.d.cts +2 -1
- package/dist/utils/compose-refs.d.ts +2 -1
- package/dist/utils/compose-refs.js +16 -8
- package/package.json +63 -63
|
@@ -28,7 +28,7 @@ function _interopNamespaceDefault(e) {
|
|
|
28
28
|
|
|
29
29
|
const accordion__namespace = /*#__PURE__*/_interopNamespaceDefault(accordion);
|
|
30
30
|
|
|
31
|
-
const useAccordion = (props
|
|
31
|
+
const useAccordion = (props) => {
|
|
32
32
|
const id = react.useId();
|
|
33
33
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
34
34
|
const { dir } = useLocaleContext.useLocaleContext();
|
|
@@ -5,7 +5,7 @@ import { useId } from 'react';
|
|
|
5
5
|
import { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
|
|
8
|
-
const useAccordion = (props
|
|
8
|
+
const useAccordion = (props) => {
|
|
9
9
|
const id = useId();
|
|
10
10
|
const { getRootNode } = useEnvironmentContext();
|
|
11
11
|
const { dir } = useLocaleContext();
|
|
@@ -28,7 +28,7 @@ function _interopNamespaceDefault(e) {
|
|
|
28
28
|
|
|
29
29
|
const avatar__namespace = /*#__PURE__*/_interopNamespaceDefault(avatar);
|
|
30
30
|
|
|
31
|
-
const useAvatar = (props
|
|
31
|
+
const useAvatar = (props) => {
|
|
32
32
|
const id = react.useId();
|
|
33
33
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
34
34
|
const { dir } = useLocaleContext.useLocaleContext();
|
|
@@ -5,7 +5,7 @@ import { useId } from 'react';
|
|
|
5
5
|
import { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
|
|
8
|
-
const useAvatar = (props
|
|
8
|
+
const useAvatar = (props) => {
|
|
9
9
|
const id = useId();
|
|
10
10
|
const { getRootNode } = useEnvironmentContext();
|
|
11
11
|
const { dir } = useLocaleContext();
|
|
@@ -27,7 +27,7 @@ function _interopNamespaceDefault(e) {
|
|
|
27
27
|
|
|
28
28
|
const clipboard__namespace = /*#__PURE__*/_interopNamespaceDefault(clipboard);
|
|
29
29
|
|
|
30
|
-
const useClipboard = (props
|
|
30
|
+
const useClipboard = (props) => {
|
|
31
31
|
const id = react.useId();
|
|
32
32
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
33
33
|
const machineProps = {
|
|
@@ -4,7 +4,7 @@ import { useMachine, normalizeProps } from '@zag-js/react';
|
|
|
4
4
|
import { useId } from 'react';
|
|
5
5
|
import { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';
|
|
6
6
|
|
|
7
|
-
const useClipboard = (props
|
|
7
|
+
const useClipboard = (props) => {
|
|
8
8
|
const id = useId();
|
|
9
9
|
const { getRootNode } = useEnvironmentContext();
|
|
10
10
|
const machineProps = {
|
|
@@ -29,7 +29,7 @@ function _interopNamespaceDefault(e) {
|
|
|
29
29
|
|
|
30
30
|
const colorPicker__namespace = /*#__PURE__*/_interopNamespaceDefault(colorPicker);
|
|
31
31
|
|
|
32
|
-
const useColorPicker = (props
|
|
32
|
+
const useColorPicker = (props) => {
|
|
33
33
|
const id = react.useId();
|
|
34
34
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
35
35
|
const { dir } = useLocaleContext.useLocaleContext();
|
|
@@ -6,7 +6,7 @@ import { useEnvironmentContext } from '../../providers/environment/use-environme
|
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
import { useFieldContext } from '../field/use-field-context.js';
|
|
8
8
|
|
|
9
|
-
const useColorPicker = (props
|
|
9
|
+
const useColorPicker = (props) => {
|
|
10
10
|
const id = useId();
|
|
11
11
|
const { getRootNode } = useEnvironmentContext();
|
|
12
12
|
const { dir } = useLocaleContext();
|
|
@@ -28,7 +28,7 @@ function _interopNamespaceDefault(e) {
|
|
|
28
28
|
|
|
29
29
|
const datePicker__namespace = /*#__PURE__*/_interopNamespaceDefault(datePicker);
|
|
30
30
|
|
|
31
|
-
const useDatePicker = (props
|
|
31
|
+
const useDatePicker = (props) => {
|
|
32
32
|
const id = react.useId();
|
|
33
33
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
34
34
|
const { dir, locale } = useLocaleContext.useLocaleContext();
|
|
@@ -5,7 +5,7 @@ import { useId } from 'react';
|
|
|
5
5
|
import { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
|
|
8
|
-
const useDatePicker = (props
|
|
8
|
+
const useDatePicker = (props) => {
|
|
9
9
|
const id = useId();
|
|
10
10
|
const { getRootNode } = useEnvironmentContext();
|
|
11
11
|
const { dir, locale } = useLocaleContext();
|
|
@@ -28,7 +28,7 @@ function _interopNamespaceDefault(e) {
|
|
|
28
28
|
|
|
29
29
|
const dialog__namespace = /*#__PURE__*/_interopNamespaceDefault(dialog);
|
|
30
30
|
|
|
31
|
-
const useDialog = (props
|
|
31
|
+
const useDialog = (props) => {
|
|
32
32
|
const id = react.useId();
|
|
33
33
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
34
34
|
const { dir } = useLocaleContext.useLocaleContext();
|
|
@@ -5,7 +5,7 @@ import { useId } from 'react';
|
|
|
5
5
|
import { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
|
|
8
|
-
const useDialog = (props
|
|
8
|
+
const useDialog = (props) => {
|
|
9
9
|
const id = useId();
|
|
10
10
|
const { getRootNode } = useEnvironmentContext();
|
|
11
11
|
const { dir } = useLocaleContext();
|
|
@@ -29,7 +29,7 @@ function _interopNamespaceDefault(e) {
|
|
|
29
29
|
|
|
30
30
|
const editable__namespace = /*#__PURE__*/_interopNamespaceDefault(editable);
|
|
31
31
|
|
|
32
|
-
const useEditable = (props
|
|
32
|
+
const useEditable = (props) => {
|
|
33
33
|
const id = react.useId();
|
|
34
34
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
35
35
|
const { dir } = useLocaleContext.useLocaleContext();
|
|
@@ -6,7 +6,7 @@ import { useEnvironmentContext } from '../../providers/environment/use-environme
|
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
import { useFieldContext } from '../field/use-field-context.js';
|
|
8
8
|
|
|
9
|
-
const useEditable = (props
|
|
9
|
+
const useEditable = (props) => {
|
|
10
10
|
const id = useId();
|
|
11
11
|
const { getRootNode } = useEnvironmentContext();
|
|
12
12
|
const { dir } = useLocaleContext();
|
|
@@ -13,6 +13,7 @@ const fieldRootProvider = require('./field-root-provider.cjs');
|
|
|
13
13
|
const fieldSelect = require('./field-select.cjs');
|
|
14
14
|
const fieldTextarea = require('./field-textarea.cjs');
|
|
15
15
|
const field_anatomy = require('./field.anatomy.cjs');
|
|
16
|
+
const useField = require('./use-field.cjs');
|
|
16
17
|
const useFieldContext = require('./use-field-context.cjs');
|
|
17
18
|
const field = require('./field.cjs');
|
|
18
19
|
|
|
@@ -29,5 +30,6 @@ exports.FieldRootProvider = fieldRootProvider.FieldRootProvider;
|
|
|
29
30
|
exports.FieldSelect = fieldSelect.FieldSelect;
|
|
30
31
|
exports.FieldTextarea = fieldTextarea.FieldTextarea;
|
|
31
32
|
exports.fieldAnatomy = field_anatomy.fieldAnatomy;
|
|
33
|
+
exports.useField = useField.useField;
|
|
32
34
|
exports.useFieldContext = useFieldContext.useFieldContext;
|
|
33
35
|
exports.Field = field;
|
|
@@ -9,5 +9,6 @@ export { FieldRootProvider, type FieldRootProviderBaseProps, type FieldRootProvi
|
|
|
9
9
|
export { FieldSelect, type FieldSelectBaseProps, type FieldSelectProps } from './field-select';
|
|
10
10
|
export { FieldTextarea, type FieldTextareaBaseProps, type FieldTextareaProps } from './field-textarea';
|
|
11
11
|
export { fieldAnatomy } from './field.anatomy';
|
|
12
|
+
export { useField, type UseFieldProps, type UseFieldReturn } from './use-field';
|
|
12
13
|
export { useFieldContext, type UseFieldContext } from './use-field-context';
|
|
13
14
|
export * as Field from './field';
|
|
@@ -9,5 +9,6 @@ export { FieldRootProvider, type FieldRootProviderBaseProps, type FieldRootProvi
|
|
|
9
9
|
export { FieldSelect, type FieldSelectBaseProps, type FieldSelectProps } from './field-select';
|
|
10
10
|
export { FieldTextarea, type FieldTextareaBaseProps, type FieldTextareaProps } from './field-textarea';
|
|
11
11
|
export { fieldAnatomy } from './field.anatomy';
|
|
12
|
+
export { useField, type UseFieldProps, type UseFieldReturn } from './use-field';
|
|
12
13
|
export { useFieldContext, type UseFieldContext } from './use-field-context';
|
|
13
14
|
export * as Field from './field';
|
|
@@ -9,6 +9,7 @@ export { FieldRootProvider } from './field-root-provider.js';
|
|
|
9
9
|
export { FieldSelect } from './field-select.js';
|
|
10
10
|
export { FieldTextarea } from './field-textarea.js';
|
|
11
11
|
export { fieldAnatomy } from './field.anatomy.js';
|
|
12
|
+
export { useField } from './use-field.js';
|
|
12
13
|
export { useFieldContext } from './use-field-context.js';
|
|
13
14
|
import * as field from './field.js';
|
|
14
15
|
export { field as Field };
|
|
@@ -29,7 +29,7 @@ function _interopNamespaceDefault(e) {
|
|
|
29
29
|
|
|
30
30
|
const fileUpload__namespace = /*#__PURE__*/_interopNamespaceDefault(fileUpload);
|
|
31
31
|
|
|
32
|
-
const useFileUpload = (props
|
|
32
|
+
const useFileUpload = (props) => {
|
|
33
33
|
const id = react.useId();
|
|
34
34
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
35
35
|
const { dir, locale } = useLocaleContext.useLocaleContext();
|
|
@@ -6,7 +6,7 @@ import { useEnvironmentContext } from '../../providers/environment/use-environme
|
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
import { useFieldContext } from '../field/use-field-context.js';
|
|
8
8
|
|
|
9
|
-
const useFileUpload = (props
|
|
9
|
+
const useFileUpload = (props) => {
|
|
10
10
|
const id = useId();
|
|
11
11
|
const { getRootNode } = useEnvironmentContext();
|
|
12
12
|
const { dir, locale } = useLocaleContext();
|
|
@@ -28,7 +28,7 @@ function _interopNamespaceDefault(e) {
|
|
|
28
28
|
|
|
29
29
|
const hoverCard__namespace = /*#__PURE__*/_interopNamespaceDefault(hoverCard);
|
|
30
30
|
|
|
31
|
-
const useHoverCard = (props
|
|
31
|
+
const useHoverCard = (props) => {
|
|
32
32
|
const id = react.useId();
|
|
33
33
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
34
34
|
const { dir } = useLocaleContext.useLocaleContext();
|
|
@@ -5,7 +5,7 @@ import { useId } from 'react';
|
|
|
5
5
|
import { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
|
|
8
|
-
const useHoverCard = (props
|
|
8
|
+
const useHoverCard = (props) => {
|
|
9
9
|
const id = useId();
|
|
10
10
|
const { getRootNode } = useEnvironmentContext();
|
|
11
11
|
const { dir } = useLocaleContext();
|
|
@@ -197,6 +197,7 @@ const fieldRootProvider = require('./field/field-root-provider.cjs');
|
|
|
197
197
|
const fieldSelect = require('./field/field-select.cjs');
|
|
198
198
|
const fieldTextarea = require('./field/field-textarea.cjs');
|
|
199
199
|
const field_anatomy = require('./field/field.anatomy.cjs');
|
|
200
|
+
const useField = require('./field/use-field.cjs');
|
|
200
201
|
const useFieldContext = require('./field/use-field-context.cjs');
|
|
201
202
|
const field = require('./field/field.cjs');
|
|
202
203
|
const fieldsetContext = require('./fieldset/fieldset-context.cjs');
|
|
@@ -844,6 +845,7 @@ exports.FieldRootProvider = fieldRootProvider.FieldRootProvider;
|
|
|
844
845
|
exports.FieldSelect = fieldSelect.FieldSelect;
|
|
845
846
|
exports.FieldTextarea = fieldTextarea.FieldTextarea;
|
|
846
847
|
exports.fieldAnatomy = field_anatomy.fieldAnatomy;
|
|
848
|
+
exports.useField = useField.useField;
|
|
847
849
|
exports.useFieldContext = useFieldContext.useFieldContext;
|
|
848
850
|
exports.Field = field;
|
|
849
851
|
exports.FieldsetContext = fieldsetContext.FieldsetContext;
|
package/dist/components/index.js
CHANGED
|
@@ -204,6 +204,7 @@ export { FieldRootProvider } from './field/field-root-provider.js';
|
|
|
204
204
|
export { FieldSelect } from './field/field-select.js';
|
|
205
205
|
export { FieldTextarea } from './field/field-textarea.js';
|
|
206
206
|
export { fieldAnatomy } from './field/field.anatomy.js';
|
|
207
|
+
export { useField } from './field/use-field.js';
|
|
207
208
|
export { useFieldContext } from './field/use-field-context.js';
|
|
208
209
|
import * as field from './field/field.js';
|
|
209
210
|
export { field as Field };
|
|
@@ -28,7 +28,7 @@ function _interopNamespaceDefault(e) {
|
|
|
28
28
|
|
|
29
29
|
const menu__namespace = /*#__PURE__*/_interopNamespaceDefault(menu);
|
|
30
30
|
|
|
31
|
-
const useMenu = (props
|
|
31
|
+
const useMenu = (props) => {
|
|
32
32
|
const id = react.useId();
|
|
33
33
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
34
34
|
const { dir } = useLocaleContext.useLocaleContext();
|
|
@@ -5,7 +5,7 @@ import { useId } from 'react';
|
|
|
5
5
|
import { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
|
|
8
|
-
const useMenu = (props
|
|
8
|
+
const useMenu = (props) => {
|
|
9
9
|
const id = useId();
|
|
10
10
|
const { getRootNode } = useEnvironmentContext();
|
|
11
11
|
const { dir } = useLocaleContext();
|
|
@@ -29,7 +29,7 @@ function _interopNamespaceDefault(e) {
|
|
|
29
29
|
|
|
30
30
|
const numberInput__namespace = /*#__PURE__*/_interopNamespaceDefault(numberInput);
|
|
31
31
|
|
|
32
|
-
const useNumberInput = (props
|
|
32
|
+
const useNumberInput = (props) => {
|
|
33
33
|
const id = react.useId();
|
|
34
34
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
35
35
|
const { dir, locale } = useLocaleContext.useLocaleContext();
|
|
@@ -6,7 +6,7 @@ import { useEnvironmentContext } from '../../providers/environment/use-environme
|
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
import { useFieldContext } from '../field/use-field-context.js';
|
|
8
8
|
|
|
9
|
-
const useNumberInput = (props
|
|
9
|
+
const useNumberInput = (props) => {
|
|
10
10
|
const id = useId();
|
|
11
11
|
const { getRootNode } = useEnvironmentContext();
|
|
12
12
|
const { dir, locale } = useLocaleContext();
|
|
@@ -28,7 +28,7 @@ function _interopNamespaceDefault(e) {
|
|
|
28
28
|
|
|
29
29
|
const pagination__namespace = /*#__PURE__*/_interopNamespaceDefault(pagination);
|
|
30
30
|
|
|
31
|
-
const usePagination = (props
|
|
31
|
+
const usePagination = (props) => {
|
|
32
32
|
const id = react.useId();
|
|
33
33
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
34
34
|
const { dir } = useLocaleContext.useLocaleContext();
|
|
@@ -5,7 +5,7 @@ import { useId } from 'react';
|
|
|
5
5
|
import { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
|
|
8
|
-
const usePagination = (props
|
|
8
|
+
const usePagination = (props) => {
|
|
9
9
|
const id = useId();
|
|
10
10
|
const { getRootNode } = useEnvironmentContext();
|
|
11
11
|
const { dir } = useLocaleContext();
|
|
@@ -29,7 +29,7 @@ function _interopNamespaceDefault(e) {
|
|
|
29
29
|
|
|
30
30
|
const pinInput__namespace = /*#__PURE__*/_interopNamespaceDefault(pinInput);
|
|
31
31
|
|
|
32
|
-
const usePinInput = (props
|
|
32
|
+
const usePinInput = (props) => {
|
|
33
33
|
const id = react.useId();
|
|
34
34
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
35
35
|
const { dir } = useLocaleContext.useLocaleContext();
|
|
@@ -6,7 +6,7 @@ import { useEnvironmentContext } from '../../providers/environment/use-environme
|
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
import { useFieldContext } from '../field/use-field-context.js';
|
|
8
8
|
|
|
9
|
-
const usePinInput = (props
|
|
9
|
+
const usePinInput = (props) => {
|
|
10
10
|
const id = useId();
|
|
11
11
|
const { getRootNode } = useEnvironmentContext();
|
|
12
12
|
const { dir } = useLocaleContext();
|
|
@@ -28,7 +28,7 @@ function _interopNamespaceDefault(e) {
|
|
|
28
28
|
|
|
29
29
|
const popover__namespace = /*#__PURE__*/_interopNamespaceDefault(popover);
|
|
30
30
|
|
|
31
|
-
const usePopover = (props
|
|
31
|
+
const usePopover = (props) => {
|
|
32
32
|
const id = react.useId();
|
|
33
33
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
34
34
|
const { dir } = useLocaleContext.useLocaleContext();
|
|
@@ -5,7 +5,7 @@ import { useId } from 'react';
|
|
|
5
5
|
import { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
|
|
8
|
-
const usePopover = (props
|
|
8
|
+
const usePopover = (props) => {
|
|
9
9
|
const id = useId();
|
|
10
10
|
const { getRootNode } = useEnvironmentContext();
|
|
11
11
|
const { dir } = useLocaleContext();
|
|
@@ -27,7 +27,7 @@ function _interopNamespaceDefault(e) {
|
|
|
27
27
|
|
|
28
28
|
const presence__namespace = /*#__PURE__*/_interopNamespaceDefault(presence);
|
|
29
29
|
|
|
30
|
-
const usePresence = (props) => {
|
|
30
|
+
const usePresence = (props = {}) => {
|
|
31
31
|
const { lazyMount, unmountOnExit, present, ...rest } = props;
|
|
32
32
|
const wasEverPresent = react.useRef(false);
|
|
33
33
|
const machineProps = {
|
|
@@ -4,7 +4,7 @@ import * as presence from '@zag-js/presence';
|
|
|
4
4
|
export interface UsePresenceProps extends Optional<presence.Props, 'present'>, RenderStrategyProps {
|
|
5
5
|
}
|
|
6
6
|
export type UsePresenceReturn = ReturnType<typeof usePresence>;
|
|
7
|
-
export declare const usePresence: (props
|
|
7
|
+
export declare const usePresence: (props?: UsePresenceProps) => {
|
|
8
8
|
ref: (node: HTMLElement | null) => void;
|
|
9
9
|
getPresenceProps: () => {
|
|
10
10
|
'data-state': string;
|
|
@@ -4,7 +4,7 @@ import * as presence from '@zag-js/presence';
|
|
|
4
4
|
export interface UsePresenceProps extends Optional<presence.Props, 'present'>, RenderStrategyProps {
|
|
5
5
|
}
|
|
6
6
|
export type UsePresenceReturn = ReturnType<typeof usePresence>;
|
|
7
|
-
export declare const usePresence: (props
|
|
7
|
+
export declare const usePresence: (props?: UsePresenceProps) => {
|
|
8
8
|
ref: (node: HTMLElement | null) => void;
|
|
9
9
|
getPresenceProps: () => {
|
|
10
10
|
'data-state': string;
|
|
@@ -4,7 +4,7 @@ import { useMachine, normalizeProps } from '@zag-js/react';
|
|
|
4
4
|
import { useRef } from 'react';
|
|
5
5
|
import { useEvent } from '../../utils/use-event.js';
|
|
6
6
|
|
|
7
|
-
const usePresence = (props) => {
|
|
7
|
+
const usePresence = (props = {}) => {
|
|
8
8
|
const { lazyMount, unmountOnExit, present, ...rest } = props;
|
|
9
9
|
const wasEverPresent = useRef(false);
|
|
10
10
|
const machineProps = {
|
|
@@ -28,7 +28,7 @@ function _interopNamespaceDefault(e) {
|
|
|
28
28
|
|
|
29
29
|
const progress__namespace = /*#__PURE__*/_interopNamespaceDefault(progress);
|
|
30
30
|
|
|
31
|
-
const useProgress = (props
|
|
31
|
+
const useProgress = (props) => {
|
|
32
32
|
const id = react.useId();
|
|
33
33
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
34
34
|
const { dir, locale } = useLocaleContext.useLocaleContext();
|
|
@@ -5,7 +5,7 @@ import { useId } from 'react';
|
|
|
5
5
|
import { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
|
|
8
|
-
const useProgress = (props
|
|
8
|
+
const useProgress = (props) => {
|
|
9
9
|
const id = useId();
|
|
10
10
|
const { getRootNode } = useEnvironmentContext();
|
|
11
11
|
const { dir, locale } = useLocaleContext();
|
|
@@ -28,7 +28,7 @@ function _interopNamespaceDefault(e) {
|
|
|
28
28
|
|
|
29
29
|
const qrcode__namespace = /*#__PURE__*/_interopNamespaceDefault(qrcode);
|
|
30
30
|
|
|
31
|
-
const useQrCode = (props
|
|
31
|
+
const useQrCode = (props) => {
|
|
32
32
|
const id = react.useId();
|
|
33
33
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
34
34
|
const { dir } = useLocaleContext.useLocaleContext();
|
|
@@ -5,7 +5,7 @@ import { useId } from 'react';
|
|
|
5
5
|
import { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
|
|
8
|
-
const useQrCode = (props
|
|
8
|
+
const useQrCode = (props) => {
|
|
9
9
|
const id = useId();
|
|
10
10
|
const { getRootNode } = useEnvironmentContext();
|
|
11
11
|
const { dir } = useLocaleContext();
|
|
@@ -28,7 +28,7 @@ function _interopNamespaceDefault(e) {
|
|
|
28
28
|
|
|
29
29
|
const radio__namespace = /*#__PURE__*/_interopNamespaceDefault(radio);
|
|
30
30
|
|
|
31
|
-
const useRadioGroup = (props
|
|
31
|
+
const useRadioGroup = (props) => {
|
|
32
32
|
const id = react.useId();
|
|
33
33
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
34
34
|
const { dir } = useLocaleContext.useLocaleContext();
|
|
@@ -5,7 +5,7 @@ import { useId } from 'react';
|
|
|
5
5
|
import { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
|
|
8
|
-
const useRadioGroup = (props
|
|
8
|
+
const useRadioGroup = (props) => {
|
|
9
9
|
const id = useId();
|
|
10
10
|
const { getRootNode } = useEnvironmentContext();
|
|
11
11
|
const { dir } = useLocaleContext();
|
|
@@ -29,7 +29,7 @@ function _interopNamespaceDefault(e) {
|
|
|
29
29
|
|
|
30
30
|
const rating__namespace = /*#__PURE__*/_interopNamespaceDefault(rating);
|
|
31
31
|
|
|
32
|
-
const useRatingGroup = (props
|
|
32
|
+
const useRatingGroup = (props) => {
|
|
33
33
|
const id = react.useId();
|
|
34
34
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
35
35
|
const { dir } = useLocaleContext.useLocaleContext();
|
|
@@ -6,7 +6,7 @@ import { useEnvironmentContext } from '../../providers/environment/use-environme
|
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
import { useFieldContext } from '../field/use-field-context.js';
|
|
8
8
|
|
|
9
|
-
const useRatingGroup = (props
|
|
9
|
+
const useRatingGroup = (props) => {
|
|
10
10
|
const id = useId();
|
|
11
11
|
const { getRootNode } = useEnvironmentContext();
|
|
12
12
|
const { dir } = useLocaleContext();
|
|
@@ -28,7 +28,7 @@ function _interopNamespaceDefault(e) {
|
|
|
28
28
|
|
|
29
29
|
const radio__namespace = /*#__PURE__*/_interopNamespaceDefault(radio);
|
|
30
30
|
|
|
31
|
-
const useSegmentGroup = (props
|
|
31
|
+
const useSegmentGroup = (props) => {
|
|
32
32
|
const id = react.useId();
|
|
33
33
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
34
34
|
const { dir } = useLocaleContext.useLocaleContext();
|
|
@@ -5,7 +5,7 @@ import { useId } from 'react';
|
|
|
5
5
|
import { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
|
|
8
|
-
const useSegmentGroup = (props
|
|
8
|
+
const useSegmentGroup = (props) => {
|
|
9
9
|
const id = useId();
|
|
10
10
|
const { getRootNode } = useEnvironmentContext();
|
|
11
11
|
const { dir } = useLocaleContext();
|
|
@@ -29,7 +29,7 @@ function _interopNamespaceDefault(e) {
|
|
|
29
29
|
|
|
30
30
|
const signaturePad__namespace = /*#__PURE__*/_interopNamespaceDefault(signaturePad);
|
|
31
31
|
|
|
32
|
-
const useSignaturePad = (props
|
|
32
|
+
const useSignaturePad = (props) => {
|
|
33
33
|
const id = react.useId();
|
|
34
34
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
35
35
|
const { dir } = useLocaleContext.useLocaleContext();
|
|
@@ -6,7 +6,7 @@ import { useEnvironmentContext } from '../../providers/environment/use-environme
|
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
import { useFieldContext } from '../field/use-field-context.js';
|
|
8
8
|
|
|
9
|
-
const useSignaturePad = (props
|
|
9
|
+
const useSignaturePad = (props) => {
|
|
10
10
|
const id = useId();
|
|
11
11
|
const { getRootNode } = useEnvironmentContext();
|
|
12
12
|
const { dir } = useLocaleContext();
|
|
@@ -28,7 +28,7 @@ function _interopNamespaceDefault(e) {
|
|
|
28
28
|
|
|
29
29
|
const slider__namespace = /*#__PURE__*/_interopNamespaceDefault(slider);
|
|
30
30
|
|
|
31
|
-
const useSlider = (props
|
|
31
|
+
const useSlider = (props) => {
|
|
32
32
|
const id = react.useId();
|
|
33
33
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
34
34
|
const { dir } = useLocaleContext.useLocaleContext();
|
|
@@ -5,7 +5,7 @@ import { useId } from 'react';
|
|
|
5
5
|
import { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
|
|
8
|
-
const useSlider = (props
|
|
8
|
+
const useSlider = (props) => {
|
|
9
9
|
const id = useId();
|
|
10
10
|
const { getRootNode } = useEnvironmentContext();
|
|
11
11
|
const { dir } = useLocaleContext();
|
|
@@ -28,7 +28,7 @@ function _interopNamespaceDefault(e) {
|
|
|
28
28
|
|
|
29
29
|
const splitter__namespace = /*#__PURE__*/_interopNamespaceDefault(splitter);
|
|
30
30
|
|
|
31
|
-
const useSplitter = (props
|
|
31
|
+
const useSplitter = (props) => {
|
|
32
32
|
const id = react.useId();
|
|
33
33
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
34
34
|
const { dir } = useLocaleContext.useLocaleContext();
|
|
@@ -5,7 +5,7 @@ import { useId } from 'react';
|
|
|
5
5
|
import { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
|
|
8
|
-
const useSplitter = (props
|
|
8
|
+
const useSplitter = (props) => {
|
|
9
9
|
const id = useId();
|
|
10
10
|
const { getRootNode } = useEnvironmentContext();
|
|
11
11
|
const { dir } = useLocaleContext();
|
|
@@ -28,7 +28,7 @@ function _interopNamespaceDefault(e) {
|
|
|
28
28
|
|
|
29
29
|
const steps__namespace = /*#__PURE__*/_interopNamespaceDefault(steps);
|
|
30
30
|
|
|
31
|
-
function useSteps(props
|
|
31
|
+
function useSteps(props) {
|
|
32
32
|
const id = react.useId();
|
|
33
33
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
34
34
|
const { dir } = useLocaleContext.useLocaleContext();
|
|
@@ -5,7 +5,7 @@ import { useId } from 'react';
|
|
|
5
5
|
import { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
|
|
8
|
-
function useSteps(props
|
|
8
|
+
function useSteps(props) {
|
|
9
9
|
const id = useId();
|
|
10
10
|
const { getRootNode } = useEnvironmentContext();
|
|
11
11
|
const { dir } = useLocaleContext();
|
|
@@ -29,7 +29,7 @@ function _interopNamespaceDefault(e) {
|
|
|
29
29
|
|
|
30
30
|
const zagSwitch__namespace = /*#__PURE__*/_interopNamespaceDefault(zagSwitch);
|
|
31
31
|
|
|
32
|
-
const useSwitch = (props
|
|
32
|
+
const useSwitch = (props) => {
|
|
33
33
|
const id = react.useId();
|
|
34
34
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
35
35
|
const { dir } = useLocaleContext.useLocaleContext();
|
|
@@ -6,7 +6,7 @@ import { useEnvironmentContext } from '../../providers/environment/use-environme
|
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
import { useFieldContext } from '../field/use-field-context.js';
|
|
8
8
|
|
|
9
|
-
const useSwitch = (props
|
|
9
|
+
const useSwitch = (props) => {
|
|
10
10
|
const id = useId();
|
|
11
11
|
const { getRootNode } = useEnvironmentContext();
|
|
12
12
|
const { dir } = useLocaleContext();
|
|
@@ -28,7 +28,7 @@ function _interopNamespaceDefault(e) {
|
|
|
28
28
|
|
|
29
29
|
const tabs__namespace = /*#__PURE__*/_interopNamespaceDefault(tabs);
|
|
30
30
|
|
|
31
|
-
const useTabs = (props
|
|
31
|
+
const useTabs = (props) => {
|
|
32
32
|
const id = react.useId();
|
|
33
33
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
34
34
|
const { dir } = useLocaleContext.useLocaleContext();
|
|
@@ -5,7 +5,7 @@ import { useId } from 'react';
|
|
|
5
5
|
import { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
|
|
8
|
-
const useTabs = (props
|
|
8
|
+
const useTabs = (props) => {
|
|
9
9
|
const id = useId();
|
|
10
10
|
const { getRootNode } = useEnvironmentContext();
|
|
11
11
|
const { dir } = useLocaleContext();
|
|
@@ -29,7 +29,7 @@ function _interopNamespaceDefault(e) {
|
|
|
29
29
|
|
|
30
30
|
const tagsInput__namespace = /*#__PURE__*/_interopNamespaceDefault(tagsInput);
|
|
31
31
|
|
|
32
|
-
const useTagsInput = (props
|
|
32
|
+
const useTagsInput = (props) => {
|
|
33
33
|
const id = react.useId();
|
|
34
34
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
35
35
|
const { dir } = useLocaleContext.useLocaleContext();
|
|
@@ -6,7 +6,7 @@ import { useEnvironmentContext } from '../../providers/environment/use-environme
|
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
import { useFieldContext } from '../field/use-field-context.js';
|
|
8
8
|
|
|
9
|
-
const useTagsInput = (props
|
|
9
|
+
const useTagsInput = (props) => {
|
|
10
10
|
const id = useId();
|
|
11
11
|
const { getRootNode } = useEnvironmentContext();
|
|
12
12
|
const { dir } = useLocaleContext();
|
|
@@ -28,7 +28,7 @@ function _interopNamespaceDefault(e) {
|
|
|
28
28
|
|
|
29
29
|
const timePicker__namespace = /*#__PURE__*/_interopNamespaceDefault(timePicker);
|
|
30
30
|
|
|
31
|
-
const useTimePicker = (props
|
|
31
|
+
const useTimePicker = (props) => {
|
|
32
32
|
const id = react.useId();
|
|
33
33
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
34
34
|
const { dir, locale } = useLocaleContext.useLocaleContext();
|
|
@@ -5,7 +5,7 @@ import { useId } from 'react';
|
|
|
5
5
|
import { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
|
|
8
|
-
const useTimePicker = (props
|
|
8
|
+
const useTimePicker = (props) => {
|
|
9
9
|
const id = useId();
|
|
10
10
|
const { getRootNode } = useEnvironmentContext();
|
|
11
11
|
const { dir, locale } = useLocaleContext();
|
|
@@ -27,7 +27,7 @@ function _interopNamespaceDefault(e) {
|
|
|
27
27
|
|
|
28
28
|
const timer__namespace = /*#__PURE__*/_interopNamespaceDefault(timer);
|
|
29
29
|
|
|
30
|
-
const useTimer = (props
|
|
30
|
+
const useTimer = (props) => {
|
|
31
31
|
const id = react.useId();
|
|
32
32
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
33
33
|
const machineProps = {
|
|
@@ -4,7 +4,7 @@ import * as timer from '@zag-js/timer';
|
|
|
4
4
|
import { useId } from 'react';
|
|
5
5
|
import { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';
|
|
6
6
|
|
|
7
|
-
const useTimer = (props
|
|
7
|
+
const useTimer = (props) => {
|
|
8
8
|
const id = useId();
|
|
9
9
|
const { getRootNode } = useEnvironmentContext();
|
|
10
10
|
const machineProps = {
|
|
@@ -4,4 +4,4 @@ export interface UseToggleProps extends toggle.Props {
|
|
|
4
4
|
}
|
|
5
5
|
export interface UseToggleReturn extends toggle.Api<PropTypes> {
|
|
6
6
|
}
|
|
7
|
-
export declare function useToggle(props
|
|
7
|
+
export declare function useToggle(props?: UseToggleProps): UseToggleReturn;
|
|
@@ -4,4 +4,4 @@ export interface UseToggleProps extends toggle.Props {
|
|
|
4
4
|
}
|
|
5
5
|
export interface UseToggleReturn extends toggle.Api<PropTypes> {
|
|
6
6
|
}
|
|
7
|
-
export declare function useToggle(props
|
|
7
|
+
export declare function useToggle(props?: UseToggleProps): UseToggleReturn;
|
|
@@ -28,7 +28,7 @@ function _interopNamespaceDefault(e) {
|
|
|
28
28
|
|
|
29
29
|
const toggleGroup__namespace = /*#__PURE__*/_interopNamespaceDefault(toggleGroup);
|
|
30
30
|
|
|
31
|
-
const useToggleGroup = (props
|
|
31
|
+
const useToggleGroup = (props) => {
|
|
32
32
|
const id = react.useId();
|
|
33
33
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
34
34
|
const { dir } = useLocaleContext.useLocaleContext();
|
|
@@ -5,7 +5,7 @@ import { useId } from 'react';
|
|
|
5
5
|
import { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
|
|
8
|
-
const useToggleGroup = (props
|
|
8
|
+
const useToggleGroup = (props) => {
|
|
9
9
|
const id = useId();
|
|
10
10
|
const { getRootNode } = useEnvironmentContext();
|
|
11
11
|
const { dir } = useLocaleContext();
|
|
@@ -28,7 +28,7 @@ function _interopNamespaceDefault(e) {
|
|
|
28
28
|
|
|
29
29
|
const tooltip__namespace = /*#__PURE__*/_interopNamespaceDefault(tooltip);
|
|
30
30
|
|
|
31
|
-
const useTooltip = (props
|
|
31
|
+
const useTooltip = (props) => {
|
|
32
32
|
const id = react.useId();
|
|
33
33
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
34
34
|
const { dir } = useLocaleContext.useLocaleContext();
|
|
@@ -5,7 +5,7 @@ import { useId } from 'react';
|
|
|
5
5
|
import { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
|
|
8
|
-
const useTooltip = (props
|
|
8
|
+
const useTooltip = (props) => {
|
|
9
9
|
const id = useId();
|
|
10
10
|
const { getRootNode } = useEnvironmentContext();
|
|
11
11
|
const { dir } = useLocaleContext();
|
|
@@ -28,7 +28,7 @@ function _interopNamespaceDefault(e) {
|
|
|
28
28
|
|
|
29
29
|
const tour__namespace = /*#__PURE__*/_interopNamespaceDefault(tour);
|
|
30
30
|
|
|
31
|
-
const useTour = (props
|
|
31
|
+
const useTour = (props) => {
|
|
32
32
|
const id = react.useId();
|
|
33
33
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
34
34
|
const { dir } = useLocaleContext.useLocaleContext();
|
|
@@ -5,7 +5,7 @@ import { useId } from 'react';
|
|
|
5
5
|
import { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
|
|
8
|
-
const useTour = (props
|
|
8
|
+
const useTour = (props) => {
|
|
9
9
|
const id = useId();
|
|
10
10
|
const { getRootNode } = useEnvironmentContext();
|
|
11
11
|
const { dir } = useLocaleContext();
|
package/dist/index.cjs
CHANGED
|
@@ -197,6 +197,7 @@ const fieldRootProvider = require('./components/field/field-root-provider.cjs');
|
|
|
197
197
|
const fieldSelect = require('./components/field/field-select.cjs');
|
|
198
198
|
const fieldTextarea = require('./components/field/field-textarea.cjs');
|
|
199
199
|
const field_anatomy = require('./components/field/field.anatomy.cjs');
|
|
200
|
+
const useField = require('./components/field/use-field.cjs');
|
|
200
201
|
const useFieldContext = require('./components/field/use-field-context.cjs');
|
|
201
202
|
const field = require('./components/field/field.cjs');
|
|
202
203
|
const fieldsetContext = require('./components/fieldset/fieldset-context.cjs');
|
|
@@ -848,6 +849,7 @@ exports.FieldRootProvider = fieldRootProvider.FieldRootProvider;
|
|
|
848
849
|
exports.FieldSelect = fieldSelect.FieldSelect;
|
|
849
850
|
exports.FieldTextarea = fieldTextarea.FieldTextarea;
|
|
850
851
|
exports.fieldAnatomy = field_anatomy.fieldAnatomy;
|
|
852
|
+
exports.useField = useField.useField;
|
|
851
853
|
exports.useFieldContext = useFieldContext.useFieldContext;
|
|
852
854
|
exports.Field = field;
|
|
853
855
|
exports.FieldsetContext = fieldsetContext.FieldsetContext;
|
package/dist/index.js
CHANGED
|
@@ -204,6 +204,7 @@ export { FieldRootProvider } from './components/field/field-root-provider.js';
|
|
|
204
204
|
export { FieldSelect } from './components/field/field-select.js';
|
|
205
205
|
export { FieldTextarea } from './components/field/field-textarea.js';
|
|
206
206
|
export { fieldAnatomy } from './components/field/field.anatomy.js';
|
|
207
|
+
export { useField } from './components/field/use-field.js';
|
|
207
208
|
export { useFieldContext } from './components/field/use-field-context.js';
|
|
208
209
|
import * as field from './components/field/field.js';
|
|
209
210
|
export { field as Field };
|
|
@@ -2,17 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
function setRef(ref, value) {
|
|
6
|
-
if (typeof ref === "function") {
|
|
7
|
-
ref(value);
|
|
8
|
-
} else if (ref !== null && ref !== void 0) {
|
|
9
|
-
ref.current = value;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
5
|
function composeRefs(...refs) {
|
|
13
6
|
return (node) => {
|
|
7
|
+
const cleanUps = [];
|
|
14
8
|
for (const ref of refs) {
|
|
15
|
-
|
|
9
|
+
if (typeof ref === "function") {
|
|
10
|
+
const cb = ref(node);
|
|
11
|
+
if (typeof cb === "function") {
|
|
12
|
+
cleanUps.push(cb);
|
|
13
|
+
}
|
|
14
|
+
} else if (ref) {
|
|
15
|
+
ref.current = node;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
if (cleanUps.length) {
|
|
19
|
+
return () => {
|
|
20
|
+
for (const cleanUp of cleanUps) {
|
|
21
|
+
cleanUp();
|
|
22
|
+
}
|
|
23
|
+
};
|
|
16
24
|
}
|
|
17
25
|
};
|
|
18
26
|
}
|
|
@@ -1,14 +1,22 @@
|
|
|
1
|
-
function setRef(ref, value) {
|
|
2
|
-
if (typeof ref === "function") {
|
|
3
|
-
ref(value);
|
|
4
|
-
} else if (ref !== null && ref !== void 0) {
|
|
5
|
-
ref.current = value;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
1
|
function composeRefs(...refs) {
|
|
9
2
|
return (node) => {
|
|
3
|
+
const cleanUps = [];
|
|
10
4
|
for (const ref of refs) {
|
|
11
|
-
|
|
5
|
+
if (typeof ref === "function") {
|
|
6
|
+
const cb = ref(node);
|
|
7
|
+
if (typeof cb === "function") {
|
|
8
|
+
cleanUps.push(cb);
|
|
9
|
+
}
|
|
10
|
+
} else if (ref) {
|
|
11
|
+
ref.current = node;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
if (cleanUps.length) {
|
|
15
|
+
return () => {
|
|
16
|
+
for (const cleanUp of cleanUps) {
|
|
17
|
+
cleanUp();
|
|
18
|
+
}
|
|
19
|
+
};
|
|
12
20
|
}
|
|
13
21
|
};
|
|
14
22
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ark-ui/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.1.0",
|
|
5
5
|
"description": "A collection of unstyled, accessible UI components for React, utilizing state machines for seamless interaction.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"accordion",
|
|
@@ -147,66 +147,66 @@
|
|
|
147
147
|
"sideEffects": false,
|
|
148
148
|
"dependencies": {
|
|
149
149
|
"@internationalized/date": "3.7.0",
|
|
150
|
-
"@zag-js/accordion": "1.
|
|
151
|
-
"@zag-js/anatomy": "1.
|
|
152
|
-
"@zag-js/auto-resize": "1.
|
|
153
|
-
"@zag-js/avatar": "1.
|
|
154
|
-
"@zag-js/carousel": "1.
|
|
155
|
-
"@zag-js/checkbox": "1.
|
|
156
|
-
"@zag-js/clipboard": "1.
|
|
157
|
-
"@zag-js/collapsible": "1.
|
|
158
|
-
"@zag-js/collection": "1.
|
|
159
|
-
"@zag-js/color-picker": "1.
|
|
160
|
-
"@zag-js/color-utils": "1.
|
|
161
|
-
"@zag-js/combobox": "1.
|
|
162
|
-
"@zag-js/core": "1.
|
|
163
|
-
"@zag-js/date-picker": "1.
|
|
164
|
-
"@zag-js/date-utils": "1.
|
|
165
|
-
"@zag-js/dialog": "1.
|
|
166
|
-
"@zag-js/dom-query": "1.
|
|
167
|
-
"@zag-js/editable": "1.
|
|
168
|
-
"@zag-js/file-upload": "1.
|
|
169
|
-
"@zag-js/file-utils": "1.
|
|
170
|
-
"@zag-js/focus-trap": "1.
|
|
171
|
-
"@zag-js/highlight-word": "1.
|
|
172
|
-
"@zag-js/hover-card": "1.
|
|
173
|
-
"@zag-js/i18n-utils": "1.
|
|
174
|
-
"@zag-js/menu": "1.
|
|
175
|
-
"@zag-js/number-input": "1.
|
|
176
|
-
"@zag-js/pagination": "1.
|
|
177
|
-
"@zag-js/pin-input": "1.
|
|
178
|
-
"@zag-js/popover": "1.
|
|
179
|
-
"@zag-js/presence": "1.
|
|
180
|
-
"@zag-js/progress": "1.
|
|
181
|
-
"@zag-js/qr-code": "1.
|
|
182
|
-
"@zag-js/radio-group": "1.
|
|
183
|
-
"@zag-js/rating-group": "1.
|
|
184
|
-
"@zag-js/react": "1.
|
|
185
|
-
"@zag-js/select": "1.
|
|
186
|
-
"@zag-js/signature-pad": "1.
|
|
187
|
-
"@zag-js/slider": "1.
|
|
188
|
-
"@zag-js/splitter": "1.
|
|
189
|
-
"@zag-js/steps": "1.
|
|
190
|
-
"@zag-js/switch": "1.
|
|
191
|
-
"@zag-js/tabs": "1.
|
|
192
|
-
"@zag-js/tags-input": "1.
|
|
193
|
-
"@zag-js/time-picker": "1.
|
|
194
|
-
"@zag-js/timer": "1.
|
|
195
|
-
"@zag-js/toast": "1.
|
|
196
|
-
"@zag-js/toggle": "1.
|
|
197
|
-
"@zag-js/toggle-group": "1.
|
|
198
|
-
"@zag-js/tooltip": "1.
|
|
199
|
-
"@zag-js/tour": "1.
|
|
200
|
-
"@zag-js/tree-view": "1.
|
|
201
|
-
"@zag-js/types": "1.
|
|
150
|
+
"@zag-js/accordion": "1.4.1",
|
|
151
|
+
"@zag-js/anatomy": "1.4.1",
|
|
152
|
+
"@zag-js/auto-resize": "1.4.1",
|
|
153
|
+
"@zag-js/avatar": "1.4.1",
|
|
154
|
+
"@zag-js/carousel": "1.4.1",
|
|
155
|
+
"@zag-js/checkbox": "1.4.1",
|
|
156
|
+
"@zag-js/clipboard": "1.4.1",
|
|
157
|
+
"@zag-js/collapsible": "1.4.1",
|
|
158
|
+
"@zag-js/collection": "1.4.1",
|
|
159
|
+
"@zag-js/color-picker": "1.4.1",
|
|
160
|
+
"@zag-js/color-utils": "1.4.1",
|
|
161
|
+
"@zag-js/combobox": "1.4.1",
|
|
162
|
+
"@zag-js/core": "1.4.1",
|
|
163
|
+
"@zag-js/date-picker": "1.4.1",
|
|
164
|
+
"@zag-js/date-utils": "1.4.1",
|
|
165
|
+
"@zag-js/dialog": "1.4.1",
|
|
166
|
+
"@zag-js/dom-query": "1.4.1",
|
|
167
|
+
"@zag-js/editable": "1.4.1",
|
|
168
|
+
"@zag-js/file-upload": "1.4.1",
|
|
169
|
+
"@zag-js/file-utils": "1.4.1",
|
|
170
|
+
"@zag-js/focus-trap": "1.4.1",
|
|
171
|
+
"@zag-js/highlight-word": "1.4.1",
|
|
172
|
+
"@zag-js/hover-card": "1.4.1",
|
|
173
|
+
"@zag-js/i18n-utils": "1.4.1",
|
|
174
|
+
"@zag-js/menu": "1.4.1",
|
|
175
|
+
"@zag-js/number-input": "1.4.1",
|
|
176
|
+
"@zag-js/pagination": "1.4.1",
|
|
177
|
+
"@zag-js/pin-input": "1.4.1",
|
|
178
|
+
"@zag-js/popover": "1.4.1",
|
|
179
|
+
"@zag-js/presence": "1.4.1",
|
|
180
|
+
"@zag-js/progress": "1.4.1",
|
|
181
|
+
"@zag-js/qr-code": "1.4.1",
|
|
182
|
+
"@zag-js/radio-group": "1.4.1",
|
|
183
|
+
"@zag-js/rating-group": "1.4.1",
|
|
184
|
+
"@zag-js/react": "1.4.1",
|
|
185
|
+
"@zag-js/select": "1.4.1",
|
|
186
|
+
"@zag-js/signature-pad": "1.4.1",
|
|
187
|
+
"@zag-js/slider": "1.4.1",
|
|
188
|
+
"@zag-js/splitter": "1.4.1",
|
|
189
|
+
"@zag-js/steps": "1.4.1",
|
|
190
|
+
"@zag-js/switch": "1.4.1",
|
|
191
|
+
"@zag-js/tabs": "1.4.1",
|
|
192
|
+
"@zag-js/tags-input": "1.4.1",
|
|
193
|
+
"@zag-js/time-picker": "1.4.1",
|
|
194
|
+
"@zag-js/timer": "1.4.1",
|
|
195
|
+
"@zag-js/toast": "1.4.1",
|
|
196
|
+
"@zag-js/toggle": "1.4.1",
|
|
197
|
+
"@zag-js/toggle-group": "1.4.1",
|
|
198
|
+
"@zag-js/tooltip": "1.4.1",
|
|
199
|
+
"@zag-js/tour": "1.4.1",
|
|
200
|
+
"@zag-js/tree-view": "1.4.1",
|
|
201
|
+
"@zag-js/types": "1.4.1"
|
|
202
202
|
},
|
|
203
203
|
"devDependencies": {
|
|
204
204
|
"@biomejs/biome": "1.9.4",
|
|
205
205
|
"@release-it/keep-a-changelog": "6.0.0",
|
|
206
|
-
"@storybook/addon-a11y": "8.6.
|
|
207
|
-
"@storybook/addon-essentials": "8.6.
|
|
208
|
-
"@storybook/react": "8.6.
|
|
209
|
-
"@storybook/react-vite": "8.6.
|
|
206
|
+
"@storybook/addon-a11y": "8.6.7",
|
|
207
|
+
"@storybook/addon-essentials": "8.6.7",
|
|
208
|
+
"@storybook/react": "8.6.7",
|
|
209
|
+
"@storybook/react-vite": "8.6.7",
|
|
210
210
|
"@testing-library/dom": "10.4.0",
|
|
211
211
|
"@testing-library/jest-dom": "6.6.3",
|
|
212
212
|
"@testing-library/react": "16.2.0",
|
|
@@ -215,22 +215,22 @@
|
|
|
215
215
|
"@types/react": "19.0.10",
|
|
216
216
|
"@types/react-dom": "19.0.4",
|
|
217
217
|
"@vitejs/plugin-react": "4.3.4",
|
|
218
|
-
"@zag-js/stringify-state": "1.
|
|
218
|
+
"@zag-js/stringify-state": "1.4.1",
|
|
219
219
|
"clean-package": "2.2.0",
|
|
220
220
|
"globby": "14.1.0",
|
|
221
|
-
"happy-dom": "17.
|
|
222
|
-
"lucide-react": "0.
|
|
221
|
+
"happy-dom": "17.4.4",
|
|
222
|
+
"lucide-react": "0.482.0",
|
|
223
223
|
"react": "19.0.0",
|
|
224
224
|
"react-dom": "19.0.0",
|
|
225
225
|
"react-frame-component": "5.2.7",
|
|
226
226
|
"react-hook-form": "7.54.2",
|
|
227
227
|
"release-it": "18.1.2",
|
|
228
228
|
"resize-observer-polyfill": "1.5.1",
|
|
229
|
-
"storybook": "8.6.
|
|
229
|
+
"storybook": "8.6.7",
|
|
230
230
|
"typescript": "5.8.2",
|
|
231
|
-
"vite": "6.2.
|
|
231
|
+
"vite": "6.2.2",
|
|
232
232
|
"vite-plugin-dts": "4.5.3",
|
|
233
|
-
"vitest": "3.0.
|
|
233
|
+
"vitest": "3.0.9",
|
|
234
234
|
"vitest-axe": "1.0.0-pre.5"
|
|
235
235
|
},
|
|
236
236
|
"peerDependencies": {
|