@ark-ui/react 5.39.3 → 5.40.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.
Files changed (115) hide show
  1. package/dist/components/accordion/accordion.anatomy.js +1 -2
  2. package/dist/components/angle-slider/angle-slider.anatomy.js +1 -2
  3. package/dist/components/avatar/avatar.anatomy.js +1 -2
  4. package/dist/components/client-only/index.js +1 -2
  5. package/dist/components/clipboard/clipboard.anatomy.js +1 -2
  6. package/dist/components/collapsible/collapsible.anatomy.js +1 -2
  7. package/dist/components/color-picker/color-picker-channel-input.cjs +3 -0
  8. package/dist/components/color-picker/color-picker-channel-input.js +3 -0
  9. package/dist/components/color-picker/color-picker-trigger.cjs +3 -0
  10. package/dist/components/color-picker/color-picker-trigger.js +3 -0
  11. package/dist/components/combobox/combobox-root.cjs +1 -0
  12. package/dist/components/combobox/combobox-root.js +1 -0
  13. package/dist/components/date-input/date-input.anatomy.js +1 -2
  14. package/dist/components/dialog/dialog.anatomy.js +1 -2
  15. package/dist/components/drawer/drawer.anatomy.js +1 -2
  16. package/dist/components/editable/editable.anatomy.js +1 -2
  17. package/dist/components/field/use-field.cjs +8 -7
  18. package/dist/components/field/use-field.js +8 -7
  19. package/dist/components/file-upload/file-upload-dropzone.cjs +3 -0
  20. package/dist/components/file-upload/file-upload-dropzone.js +3 -0
  21. package/dist/components/file-upload/file-upload-trigger.cjs +3 -0
  22. package/dist/components/file-upload/file-upload-trigger.js +3 -0
  23. package/dist/components/file-upload/file-upload.anatomy.js +1 -2
  24. package/dist/components/file-upload/use-file-upload.cjs +1 -0
  25. package/dist/components/file-upload/use-file-upload.js +1 -0
  26. package/dist/components/floating-panel/floating-panel.anatomy.js +1 -2
  27. package/dist/components/focus-trap/index.js +1 -2
  28. package/dist/components/frame/index.js +1 -2
  29. package/dist/components/hover-card/hover-card.anatomy.js +1 -2
  30. package/dist/components/image-cropper/image-cropper.anatomy.js +1 -2
  31. package/dist/components/marquee/marquee.anatomy.js +1 -2
  32. package/dist/components/menu/menu.anatomy.js +1 -2
  33. package/dist/components/navigation-menu/navigation-menu.anatomy.js +1 -2
  34. package/dist/components/number-input/number-input.anatomy.js +1 -2
  35. package/dist/components/pagination/index.d.cts +1 -1
  36. package/dist/components/pagination/index.d.ts +1 -1
  37. package/dist/components/pagination/pagination-first-trigger.cjs +4 -0
  38. package/dist/components/pagination/pagination-first-trigger.d.cts +3 -2
  39. package/dist/components/pagination/pagination-first-trigger.d.ts +3 -2
  40. package/dist/components/pagination/pagination-first-trigger.js +4 -0
  41. package/dist/components/pagination/pagination-item.cjs +4 -0
  42. package/dist/components/pagination/pagination-item.d.cts +3 -2
  43. package/dist/components/pagination/pagination-item.d.ts +3 -2
  44. package/dist/components/pagination/pagination-item.js +4 -0
  45. package/dist/components/pagination/pagination-last-trigger.cjs +4 -0
  46. package/dist/components/pagination/pagination-last-trigger.d.cts +3 -2
  47. package/dist/components/pagination/pagination-last-trigger.d.ts +3 -2
  48. package/dist/components/pagination/pagination-last-trigger.js +4 -0
  49. package/dist/components/pagination/pagination-next-trigger.cjs +4 -0
  50. package/dist/components/pagination/pagination-next-trigger.d.cts +3 -2
  51. package/dist/components/pagination/pagination-next-trigger.d.ts +3 -2
  52. package/dist/components/pagination/pagination-next-trigger.js +4 -0
  53. package/dist/components/pagination/pagination-prev-trigger.cjs +4 -0
  54. package/dist/components/pagination/pagination-prev-trigger.d.cts +3 -2
  55. package/dist/components/pagination/pagination-prev-trigger.d.ts +3 -2
  56. package/dist/components/pagination/pagination-prev-trigger.js +4 -0
  57. package/dist/components/pagination/pagination.anatomy.js +1 -2
  58. package/dist/components/pagination/use-pagination.d.cts +5 -0
  59. package/dist/components/pagination/use-pagination.d.ts +5 -0
  60. package/dist/components/password-input/password-input.anatomy.js +1 -2
  61. package/dist/components/pin-input/pin-input-control.cjs +3 -0
  62. package/dist/components/pin-input/pin-input-control.js +3 -0
  63. package/dist/components/pin-input/pin-input.anatomy.js +1 -2
  64. package/dist/components/popover/popover.anatomy.js +1 -2
  65. package/dist/components/portal/index.js +1 -2
  66. package/dist/components/progress/progress.anatomy.js +1 -2
  67. package/dist/components/qr-code/qr-code.anatomy.js +1 -2
  68. package/dist/components/radio-group/radio-group.anatomy.js +1 -2
  69. package/dist/components/rating-group/rating-group-control.cjs +3 -0
  70. package/dist/components/rating-group/rating-group-control.js +3 -0
  71. package/dist/components/rating-group/rating-group-item.cjs +3 -0
  72. package/dist/components/rating-group/rating-group-item.js +3 -0
  73. package/dist/components/rating-group/rating-group.anatomy.js +1 -2
  74. package/dist/components/scroll-area/scroll-area.anatomy.js +1 -2
  75. package/dist/components/select/select-trigger.cjs +3 -0
  76. package/dist/components/select/select-trigger.js +3 -0
  77. package/dist/components/select/select.anatomy.js +1 -2
  78. package/dist/components/signature-pad/signature-pad-control.cjs +3 -0
  79. package/dist/components/signature-pad/signature-pad-control.js +3 -0
  80. package/dist/components/signature-pad/signature-pad.anatomy.js +1 -2
  81. package/dist/components/slider/slider.anatomy.js +1 -2
  82. package/dist/components/splitter/splitter.anatomy.js +1 -2
  83. package/dist/components/steps/steps.anatomy.js +1 -2
  84. package/dist/components/switch/switch.anatomy.js +1 -2
  85. package/dist/components/tabs/tabs.anatomy.js +1 -2
  86. package/dist/components/tags-input/tags-input-input.cjs +3 -0
  87. package/dist/components/tags-input/tags-input-input.js +3 -0
  88. package/dist/components/tags-input/tags-input.anatomy.js +1 -2
  89. package/dist/components/timer/timer.anatomy.js +1 -2
  90. package/dist/components/toast/toast-root.cjs +15 -7
  91. package/dist/components/toast/toast-root.js +17 -9
  92. package/dist/components/toast/toast.anatomy.js +1 -2
  93. package/dist/components/toc/toc-nav.cjs +1 -1
  94. package/dist/components/toc/toc-nav.js +1 -1
  95. package/dist/components/toc/toc-root-provider.cjs +3 -1
  96. package/dist/components/toc/toc-root-provider.js +3 -1
  97. package/dist/components/toc/toc-root.cjs +1 -0
  98. package/dist/components/toc/toc-root.js +1 -0
  99. package/dist/components/toc/toc.anatomy.js +1 -2
  100. package/dist/components/toggle-group/toggle-group.anatomy.js +1 -2
  101. package/dist/components/tooltip/tooltip.anatomy.js +1 -2
  102. package/dist/components/tour/index.d.cts +1 -1
  103. package/dist/components/tour/index.d.ts +1 -1
  104. package/dist/components/tour/tour.anatomy.d.cts +1 -1
  105. package/dist/components/tour/tour.anatomy.d.ts +1 -1
  106. package/dist/components/tour/tour.d.cts +1 -1
  107. package/dist/components/tour/tour.d.ts +1 -1
  108. package/dist/components/tree-view/tree-view.anatomy.js +1 -2
  109. package/dist/providers/hotkeys/use-platform.cjs +1 -2
  110. package/dist/providers/hotkeys/use-platform.d.cts +2 -1
  111. package/dist/providers/hotkeys/use-platform.d.ts +2 -1
  112. package/dist/providers/hotkeys/use-platform.js +1 -2
  113. package/dist/utils/attr.js +1 -2
  114. package/dist/utils/react-activity.cjs +1 -1
  115. package/package.json +80 -80
@@ -1,3 +1,2 @@
1
1
  "use client";
2
- import { anatomy as accordionAnatomy } from "@zag-js/accordion";
3
- export { accordionAnatomy };
2
+ export { anatomy as accordionAnatomy } from "@zag-js/accordion";
@@ -1,3 +1,2 @@
1
1
  "use client";
2
- import { anatomy as angleSliderAnatomy } from "@zag-js/angle-slider";
3
- export { angleSliderAnatomy };
2
+ export { anatomy as angleSliderAnatomy } from "@zag-js/angle-slider";
@@ -1,3 +1,2 @@
1
1
  "use client";
2
- import { anatomy as avatarAnatomy } from "@zag-js/avatar";
3
- export { avatarAnatomy };
2
+ export { anatomy as avatarAnatomy } from "@zag-js/avatar";
@@ -1,2 +1 @@
1
- import { ClientOnly } from "./client-only.js";
2
- export { ClientOnly };
1
+ export { ClientOnly } from "./client-only.js";
@@ -1,3 +1,2 @@
1
1
  "use client";
2
- import { anatomy as clipboardAnatomy } from "@zag-js/clipboard";
3
- export { clipboardAnatomy };
2
+ export { anatomy as clipboardAnatomy } from "@zag-js/clipboard";
@@ -1,3 +1,2 @@
1
1
  "use client";
2
- import { anatomy as collapsibleAnatomy } from "@zag-js/collapsible";
3
- export { collapsibleAnatomy };
2
+ export { anatomy as collapsibleAnatomy } from "@zag-js/collapsible";
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  const require_create_split_props = require("../../utils/create-split-props.cjs");
3
3
  const require_factory = require("../factory.cjs");
4
+ const require_use_field_context = require("../field/use-field-context.cjs");
4
5
  const require_use_color_picker_context = require("./use-color-picker-context.cjs");
5
6
  let react = require("react");
6
7
  let _zag_js_react = require("@zag-js/react");
@@ -11,7 +12,9 @@ var ColorPickerChannelInput = (0, react.forwardRef)((props, ref) => {
11
12
  const [channelProps, localProps] = splitChannelInputProps(props, ["channel", "orientation"]);
12
13
  const colorPicker = require_use_color_picker_context.useColorPickerContext();
13
14
  const mergedProps = (0, _zag_js_react.mergeProps)(colorPicker.getChannelInputProps(channelProps), localProps);
15
+ const field = require_use_field_context.useFieldContext();
14
16
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.ark.input, {
17
+ "aria-describedby": field?.ariaDescribedby,
15
18
  ...mergedProps,
16
19
  ref
17
20
  });
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { createSplitProps } from "../../utils/create-split-props.js";
3
3
  import { ark } from "../factory.js";
4
+ import { useFieldContext } from "../field/use-field-context.js";
4
5
  import { useColorPickerContext } from "./use-color-picker-context.js";
5
6
  import { forwardRef } from "react";
6
7
  import { mergeProps } from "@zag-js/react";
@@ -11,7 +12,9 @@ var ColorPickerChannelInput = forwardRef((props, ref) => {
11
12
  const [channelProps, localProps] = splitChannelInputProps(props, ["channel", "orientation"]);
12
13
  const colorPicker = useColorPickerContext();
13
14
  const mergedProps = mergeProps(colorPicker.getChannelInputProps(channelProps), localProps);
15
+ const field = useFieldContext();
14
16
  return /* @__PURE__ */ jsx(ark.input, {
17
+ "aria-describedby": field?.ariaDescribedby,
15
18
  ...mergedProps,
16
19
  ref
17
20
  });
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  const require_factory = require("../factory.cjs");
3
+ const require_use_field_context = require("../field/use-field-context.cjs");
3
4
  const require_use_color_picker_context = require("./use-color-picker-context.cjs");
4
5
  let react = require("react");
5
6
  let _zag_js_react = require("@zag-js/react");
@@ -8,7 +9,9 @@ let react_jsx_runtime = require("react/jsx-runtime");
8
9
  var ColorPickerTrigger = (0, react.forwardRef)((props, ref) => {
9
10
  const colorPicker = require_use_color_picker_context.useColorPickerContext();
10
11
  const mergedProps = (0, _zag_js_react.mergeProps)(colorPicker.getTriggerProps(), props);
12
+ const field = require_use_field_context.useFieldContext();
11
13
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.ark.button, {
14
+ "aria-describedby": field?.ariaDescribedby,
12
15
  ...mergedProps,
13
16
  ref
14
17
  });
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import { ark } from "../factory.js";
3
+ import { useFieldContext } from "../field/use-field-context.js";
3
4
  import { useColorPickerContext } from "./use-color-picker-context.js";
4
5
  import { forwardRef } from "react";
5
6
  import { mergeProps } from "@zag-js/react";
@@ -8,7 +9,9 @@ import { jsx } from "react/jsx-runtime";
8
9
  var ColorPickerTrigger = forwardRef((props, ref) => {
9
10
  const colorPicker = useColorPickerContext();
10
11
  const mergedProps = mergeProps(colorPicker.getTriggerProps(), props);
12
+ const field = useFieldContext();
11
13
  return /* @__PURE__ */ jsx(ark.button, {
14
+ "aria-describedby": field?.ariaDescribedby,
12
15
  ...mergedProps,
13
16
  ref
14
17
  });
@@ -31,6 +31,7 @@ var ComboboxImpl = (props, ref) => {
31
31
  "ids",
32
32
  "inputBehavior",
33
33
  "inputValue",
34
+ "loading",
34
35
  "invalid",
35
36
  "loopFocus",
36
37
  "multiple",
@@ -31,6 +31,7 @@ var ComboboxImpl = (props, ref) => {
31
31
  "ids",
32
32
  "inputBehavior",
33
33
  "inputValue",
34
+ "loading",
34
35
  "invalid",
35
36
  "loopFocus",
36
37
  "multiple",
@@ -1,3 +1,2 @@
1
1
  "use client";
2
- import { anatomy as dateInputAnatomy } from "@zag-js/date-input";
3
- export { dateInputAnatomy };
2
+ export { anatomy as dateInputAnatomy } from "@zag-js/date-input";
@@ -1,3 +1,2 @@
1
1
  "use client";
2
- import { anatomy as dialogAnatomy } from "@zag-js/dialog";
3
- export { dialogAnatomy };
2
+ export { anatomy as dialogAnatomy } from "@zag-js/dialog";
@@ -1,3 +1,2 @@
1
1
  "use client";
2
- import { anatomy as drawerAnatomy } from "@zag-js/drawer";
3
- export { drawerAnatomy };
2
+ export { anatomy as drawerAnatomy } from "@zag-js/drawer";
@@ -1,3 +1,2 @@
1
1
  "use client";
2
- import { anatomy as editableAnatomy } from "@zag-js/editable";
3
- export { editableAnatomy };
2
+ export { anatomy as editableAnatomy } from "@zag-js/editable";
@@ -15,7 +15,8 @@ var useField = (props = {}) => {
15
15
  const uid = (0, react.useId)();
16
16
  const id = props.id ?? uid;
17
17
  const rootRef = (0, react.useRef)(null);
18
- const rootId = ids?.control ?? `field::${id}`;
18
+ const rootId = ids?.root ?? `field::${id}`;
19
+ const controlId = ids?.control ?? id;
19
20
  const errorTextId = ids?.errorText ?? `field::${id}::error-text`;
20
21
  const helperTextId = ids?.helperText ?? `field::${id}::helper-text`;
21
22
  const labelId = ids?.label ?? `field::${id}::label`;
@@ -53,7 +54,7 @@ var useField = (props = {}) => {
53
54
  readOnly,
54
55
  rootId
55
56
  ]);
56
- const targetControlId = target ? `field::${id}::item::${target}` : void 0;
57
+ const targetControlId = target ? `field::${controlId}::item::${target}` : void 0;
57
58
  const getLabelProps = (0, react.useMemo)(() => () => ({
58
59
  ...require_field_anatomy.parts.label.attrs,
59
60
  id: labelId,
@@ -61,13 +62,13 @@ var useField = (props = {}) => {
61
62
  "data-invalid": (0, _zag_js_dom_query.dataAttr)(invalid),
62
63
  "data-readonly": (0, _zag_js_dom_query.dataAttr)(readOnly),
63
64
  "data-required": (0, _zag_js_dom_query.dataAttr)(required),
64
- htmlFor: targetControlId ?? id
65
+ htmlFor: targetControlId ?? controlId
65
66
  }), [
66
67
  disabled,
67
68
  invalid,
68
69
  readOnly,
69
70
  required,
70
- id,
71
+ controlId,
71
72
  labelId,
72
73
  targetControlId
73
74
  ]);
@@ -78,7 +79,7 @@ var useField = (props = {}) => {
78
79
  "data-invalid": (0, _zag_js_dom_query.dataAttr)(invalid),
79
80
  "data-required": (0, _zag_js_dom_query.dataAttr)(required),
80
81
  "data-readonly": (0, _zag_js_dom_query.dataAttr)(readOnly),
81
- id,
82
+ id: controlId,
82
83
  required,
83
84
  disabled,
84
85
  readOnly
@@ -87,7 +88,7 @@ var useField = (props = {}) => {
87
88
  invalid,
88
89
  required,
89
90
  readOnly,
90
- id,
91
+ controlId,
91
92
  disabled
92
93
  ]);
93
94
  const getInputProps = (0, react.useMemo)(() => () => ({
@@ -120,7 +121,7 @@ var useField = (props = {}) => {
120
121
  ariaDescribedby: describedById,
121
122
  ids: {
122
123
  root: rootId,
123
- control: id,
124
+ control: controlId,
124
125
  label: labelId,
125
126
  errorText: errorTextId,
126
127
  helperText: helperTextId
@@ -15,7 +15,8 @@ var useField = (props = {}) => {
15
15
  const uid = useId();
16
16
  const id = props.id ?? uid;
17
17
  const rootRef = useRef(null);
18
- const rootId = ids?.control ?? `field::${id}`;
18
+ const rootId = ids?.root ?? `field::${id}`;
19
+ const controlId = ids?.control ?? id;
19
20
  const errorTextId = ids?.errorText ?? `field::${id}::error-text`;
20
21
  const helperTextId = ids?.helperText ?? `field::${id}::helper-text`;
21
22
  const labelId = ids?.label ?? `field::${id}::label`;
@@ -53,7 +54,7 @@ var useField = (props = {}) => {
53
54
  readOnly,
54
55
  rootId
55
56
  ]);
56
- const targetControlId = target ? `field::${id}::item::${target}` : void 0;
57
+ const targetControlId = target ? `field::${controlId}::item::${target}` : void 0;
57
58
  const getLabelProps = useMemo(() => () => ({
58
59
  ...parts.label.attrs,
59
60
  id: labelId,
@@ -61,13 +62,13 @@ var useField = (props = {}) => {
61
62
  "data-invalid": dataAttr(invalid),
62
63
  "data-readonly": dataAttr(readOnly),
63
64
  "data-required": dataAttr(required),
64
- htmlFor: targetControlId ?? id
65
+ htmlFor: targetControlId ?? controlId
65
66
  }), [
66
67
  disabled,
67
68
  invalid,
68
69
  readOnly,
69
70
  required,
70
- id,
71
+ controlId,
71
72
  labelId,
72
73
  targetControlId
73
74
  ]);
@@ -78,7 +79,7 @@ var useField = (props = {}) => {
78
79
  "data-invalid": dataAttr(invalid),
79
80
  "data-required": dataAttr(required),
80
81
  "data-readonly": dataAttr(readOnly),
81
- id,
82
+ id: controlId,
82
83
  required,
83
84
  disabled,
84
85
  readOnly
@@ -87,7 +88,7 @@ var useField = (props = {}) => {
87
88
  invalid,
88
89
  required,
89
90
  readOnly,
90
- id,
91
+ controlId,
91
92
  disabled
92
93
  ]);
93
94
  const getInputProps = useMemo(() => () => ({
@@ -120,7 +121,7 @@ var useField = (props = {}) => {
120
121
  ariaDescribedby: describedById,
121
122
  ids: {
122
123
  root: rootId,
123
- control: id,
124
+ control: controlId,
124
125
  label: labelId,
125
126
  errorText: errorTextId,
126
127
  helperText: helperTextId
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  const require_create_split_props = require("../../utils/create-split-props.cjs");
3
3
  const require_factory = require("../factory.cjs");
4
+ const require_use_field_context = require("../field/use-field-context.cjs");
4
5
  const require_use_file_upload_context = require("./use-file-upload-context.cjs");
5
6
  let react = require("react");
6
7
  let _zag_js_react = require("@zag-js/react");
@@ -11,7 +12,9 @@ var FileUploadDropzone = (0, react.forwardRef)((props, ref) => {
11
12
  const [dropzoneProps, localProps] = splitDropzoneProps(props, ["disableClick"]);
12
13
  const fileUpload = require_use_file_upload_context.useFileUploadContext();
13
14
  const mergedProps = (0, _zag_js_react.mergeProps)(fileUpload.getDropzoneProps(dropzoneProps), localProps);
15
+ const field = require_use_field_context.useFieldContext();
14
16
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.ark.div, {
17
+ "aria-describedby": field?.ariaDescribedby,
15
18
  ...mergedProps,
16
19
  ref
17
20
  });
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { createSplitProps } from "../../utils/create-split-props.js";
3
3
  import { ark } from "../factory.js";
4
+ import { useFieldContext } from "../field/use-field-context.js";
4
5
  import { useFileUploadContext } from "./use-file-upload-context.js";
5
6
  import { forwardRef } from "react";
6
7
  import { mergeProps } from "@zag-js/react";
@@ -11,7 +12,9 @@ var FileUploadDropzone = forwardRef((props, ref) => {
11
12
  const [dropzoneProps, localProps] = splitDropzoneProps(props, ["disableClick"]);
12
13
  const fileUpload = useFileUploadContext();
13
14
  const mergedProps = mergeProps(fileUpload.getDropzoneProps(dropzoneProps), localProps);
15
+ const field = useFieldContext();
14
16
  return /* @__PURE__ */ jsx(ark.div, {
17
+ "aria-describedby": field?.ariaDescribedby,
15
18
  ...mergedProps,
16
19
  ref
17
20
  });
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  const require_factory = require("../factory.cjs");
3
+ const require_use_field_context = require("../field/use-field-context.cjs");
3
4
  const require_use_file_upload_context = require("./use-file-upload-context.cjs");
4
5
  let react = require("react");
5
6
  let _zag_js_react = require("@zag-js/react");
@@ -8,7 +9,9 @@ let react_jsx_runtime = require("react/jsx-runtime");
8
9
  var FileUploadTrigger = (0, react.forwardRef)((props, ref) => {
9
10
  const fileUpload = require_use_file_upload_context.useFileUploadContext();
10
11
  const mergedProps = (0, _zag_js_react.mergeProps)(fileUpload.getTriggerProps(), props);
12
+ const field = require_use_field_context.useFieldContext();
11
13
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.ark.button, {
14
+ "aria-describedby": field?.ariaDescribedby,
12
15
  ...mergedProps,
13
16
  ref
14
17
  });
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import { ark } from "../factory.js";
3
+ import { useFieldContext } from "../field/use-field-context.js";
3
4
  import { useFileUploadContext } from "./use-file-upload-context.js";
4
5
  import { forwardRef } from "react";
5
6
  import { mergeProps } from "@zag-js/react";
@@ -8,7 +9,9 @@ import { jsx } from "react/jsx-runtime";
8
9
  var FileUploadTrigger = forwardRef((props, ref) => {
9
10
  const fileUpload = useFileUploadContext();
10
11
  const mergedProps = mergeProps(fileUpload.getTriggerProps(), props);
12
+ const field = useFieldContext();
11
13
  return /* @__PURE__ */ jsx(ark.button, {
14
+ "aria-describedby": field?.ariaDescribedby,
12
15
  ...mergedProps,
13
16
  ref
14
17
  });
@@ -1,3 +1,2 @@
1
1
  "use client";
2
- import { anatomy as fileUploadAnatomy } from "@zag-js/file-upload";
3
- export { fileUploadAnatomy };
2
+ export { anatomy as fileUploadAnatomy } from "@zag-js/file-upload";
@@ -22,6 +22,7 @@ var useFileUpload = (props) => {
22
22
  dir,
23
23
  disabled: field?.disabled,
24
24
  locale,
25
+ readOnly: field?.readOnly,
25
26
  required: field?.required,
26
27
  invalid: field?.invalid,
27
28
  getRootNode,
@@ -20,6 +20,7 @@ var useFileUpload = (props) => {
20
20
  dir,
21
21
  disabled: field?.disabled,
22
22
  locale,
23
+ readOnly: field?.readOnly,
23
24
  required: field?.required,
24
25
  invalid: field?.invalid,
25
26
  getRootNode,
@@ -1,3 +1,2 @@
1
1
  "use client";
2
- import { anatomy as floatingPanelAnatomy } from "@zag-js/floating-panel";
3
- export { floatingPanelAnatomy };
2
+ export { anatomy as floatingPanelAnatomy } from "@zag-js/floating-panel";
@@ -1,2 +1 @@
1
- import { FocusTrap } from "./focus-trap.js";
2
- export { FocusTrap };
1
+ export { FocusTrap } from "./focus-trap.js";
@@ -1,2 +1 @@
1
- import { Frame } from "./frame.js";
2
- export { Frame };
1
+ export { Frame } from "./frame.js";
@@ -1,3 +1,2 @@
1
1
  "use client";
2
- import { anatomy as hoverCardAnatomy } from "@zag-js/hover-card";
3
- export { hoverCardAnatomy };
2
+ export { anatomy as hoverCardAnatomy } from "@zag-js/hover-card";
@@ -1,3 +1,2 @@
1
1
  "use client";
2
- import { anatomy as imageCropperAnatomy } from "@zag-js/image-cropper";
3
- export { imageCropperAnatomy };
2
+ export { anatomy as imageCropperAnatomy } from "@zag-js/image-cropper";
@@ -1,3 +1,2 @@
1
1
  "use client";
2
- import { anatomy as marqueeAnatomy } from "@zag-js/marquee";
3
- export { marqueeAnatomy };
2
+ export { anatomy as marqueeAnatomy } from "@zag-js/marquee";
@@ -1,3 +1,2 @@
1
1
  "use client";
2
- import { anatomy as menuAnatomy } from "@zag-js/menu";
3
- export { menuAnatomy };
2
+ export { anatomy as menuAnatomy } from "@zag-js/menu";
@@ -1,3 +1,2 @@
1
1
  "use client";
2
- import { anatomy as navigationMenuAnatomy } from "@zag-js/navigation-menu";
3
- export { navigationMenuAnatomy };
2
+ export { anatomy as navigationMenuAnatomy } from "@zag-js/navigation-menu";
@@ -1,3 +1,2 @@
1
1
  "use client";
2
- import { anatomy as numberInputAnatomy } from "@zag-js/number-input";
3
- export { numberInputAnatomy };
2
+ export { anatomy as numberInputAnatomy } from "@zag-js/number-input";
@@ -9,6 +9,6 @@ export { PaginationPrevTrigger, type PaginationPrevTriggerBaseProps, type Pagina
9
9
  export { PaginationRoot, type PaginationRootBaseProps, type PaginationRootProps } from './pagination-root.js';
10
10
  export { PaginationRootProvider, type PaginationRootProviderBaseProps, type PaginationRootProviderProps, } from './pagination-root-provider.js';
11
11
  export { paginationAnatomy } from './pagination.anatomy.js';
12
- export { usePagination, type UsePaginationProps, type UsePaginationReturn } from './use-pagination.js';
12
+ export { usePagination, type PaginationAnchorProps, type UsePaginationProps, type UsePaginationReturn, } from './use-pagination.js';
13
13
  export { usePaginationContext, type UsePaginationContext } from './use-pagination-context.js';
14
14
  export * as Pagination from './pagination.js';
@@ -9,6 +9,6 @@ export { PaginationPrevTrigger, type PaginationPrevTriggerBaseProps, type Pagina
9
9
  export { PaginationRoot, type PaginationRootBaseProps, type PaginationRootProps } from './pagination-root.js';
10
10
  export { PaginationRootProvider, type PaginationRootProviderBaseProps, type PaginationRootProviderProps, } from './pagination-root-provider.js';
11
11
  export { paginationAnatomy } from './pagination.anatomy.js';
12
- export { usePagination, type UsePaginationProps, type UsePaginationReturn } from './use-pagination.js';
12
+ export { usePagination, type PaginationAnchorProps, type UsePaginationProps, type UsePaginationReturn, } from './use-pagination.js';
13
13
  export { usePaginationContext, type UsePaginationContext } from './use-pagination-context.js';
14
14
  export * as Pagination from './pagination.js';
@@ -8,6 +8,10 @@ let react_jsx_runtime = require("react/jsx-runtime");
8
8
  var PaginationFirstTrigger = (0, react.forwardRef)((props, ref) => {
9
9
  const pagination = require_use_pagination_context.usePaginationContext();
10
10
  const mergedProps = (0, _zag_js_react.mergeProps)(pagination.getFirstTriggerProps(), props);
11
+ if (pagination.type === "link") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.ark.a, {
12
+ ...mergedProps,
13
+ ref
14
+ });
11
15
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.ark.button, {
12
16
  ...mergedProps,
13
17
  ref
@@ -1,7 +1,8 @@
1
1
  import { HTMLProps, PolymorphicProps } from '../factory.js';
2
+ import { PaginationAnchorProps } from './use-pagination.js';
2
3
  import { ForwardRefExoticComponent, RefAttributes } from 'react';
3
4
  export interface PaginationFirstTriggerBaseProps extends PolymorphicProps {
4
5
  }
5
- export interface PaginationFirstTriggerProps extends HTMLProps<'button'>, PaginationFirstTriggerBaseProps {
6
+ export interface PaginationFirstTriggerProps extends HTMLProps<'button'>, PaginationAnchorProps, PaginationFirstTriggerBaseProps {
6
7
  }
7
- export declare const PaginationFirstTrigger: ForwardRefExoticComponent<PaginationFirstTriggerProps & RefAttributes<HTMLButtonElement>>;
8
+ export declare const PaginationFirstTrigger: ForwardRefExoticComponent<PaginationFirstTriggerProps & RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
@@ -1,7 +1,8 @@
1
1
  import { HTMLProps, PolymorphicProps } from '../factory.js';
2
+ import { PaginationAnchorProps } from './use-pagination.js';
2
3
  import { ForwardRefExoticComponent, RefAttributes } from 'react';
3
4
  export interface PaginationFirstTriggerBaseProps extends PolymorphicProps {
4
5
  }
5
- export interface PaginationFirstTriggerProps extends HTMLProps<'button'>, PaginationFirstTriggerBaseProps {
6
+ export interface PaginationFirstTriggerProps extends HTMLProps<'button'>, PaginationAnchorProps, PaginationFirstTriggerBaseProps {
6
7
  }
7
- export declare const PaginationFirstTrigger: ForwardRefExoticComponent<PaginationFirstTriggerProps & RefAttributes<HTMLButtonElement>>;
8
+ export declare const PaginationFirstTrigger: ForwardRefExoticComponent<PaginationFirstTriggerProps & RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
@@ -8,6 +8,10 @@ import { jsx } from "react/jsx-runtime";
8
8
  var PaginationFirstTrigger = forwardRef((props, ref) => {
9
9
  const pagination = usePaginationContext();
10
10
  const mergedProps = mergeProps(pagination.getFirstTriggerProps(), props);
11
+ if (pagination.type === "link") return /* @__PURE__ */ jsx(ark.a, {
12
+ ...mergedProps,
13
+ ref
14
+ });
11
15
  return /* @__PURE__ */ jsx(ark.button, {
12
16
  ...mergedProps,
13
17
  ref
@@ -11,6 +11,10 @@ var PaginationItem = (0, react.forwardRef)((props, ref) => {
11
11
  const [itemProps, localProps] = splitItemProps(props, ["value", "type"]);
12
12
  const pagination = require_use_pagination_context.usePaginationContext();
13
13
  const mergedProps = (0, _zag_js_react.mergeProps)(pagination.getItemProps(itemProps), localProps);
14
+ if (pagination.type === "link") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.ark.a, {
15
+ ...mergedProps,
16
+ ref
17
+ });
14
18
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.ark.button, {
15
19
  ...mergedProps,
16
20
  ref
@@ -1,9 +1,10 @@
1
1
  import { ItemProps } from '@zag-js/pagination';
2
2
  import { Assign } from '../../types.js';
3
3
  import { HTMLProps, PolymorphicProps } from '../factory.js';
4
+ import { PaginationAnchorProps } from './use-pagination.js';
4
5
  import { ForwardRefExoticComponent, RefAttributes } from 'react';
5
6
  export interface PaginationItemBaseProps extends ItemProps, PolymorphicProps {
6
7
  }
7
- export interface PaginationItemProps extends Assign<HTMLProps<'button'>, PaginationItemBaseProps> {
8
+ export interface PaginationItemProps extends Assign<HTMLProps<'button'> & PaginationAnchorProps, PaginationItemBaseProps> {
8
9
  }
9
- export declare const PaginationItem: ForwardRefExoticComponent<PaginationItemProps & RefAttributes<HTMLButtonElement>>;
10
+ export declare const PaginationItem: ForwardRefExoticComponent<PaginationItemProps & RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
@@ -1,9 +1,10 @@
1
1
  import { ItemProps } from '@zag-js/pagination';
2
2
  import { Assign } from '../../types.js';
3
3
  import { HTMLProps, PolymorphicProps } from '../factory.js';
4
+ import { PaginationAnchorProps } from './use-pagination.js';
4
5
  import { ForwardRefExoticComponent, RefAttributes } from 'react';
5
6
  export interface PaginationItemBaseProps extends ItemProps, PolymorphicProps {
6
7
  }
7
- export interface PaginationItemProps extends Assign<HTMLProps<'button'>, PaginationItemBaseProps> {
8
+ export interface PaginationItemProps extends Assign<HTMLProps<'button'> & PaginationAnchorProps, PaginationItemBaseProps> {
8
9
  }
9
- export declare const PaginationItem: ForwardRefExoticComponent<PaginationItemProps & RefAttributes<HTMLButtonElement>>;
10
+ export declare const PaginationItem: ForwardRefExoticComponent<PaginationItemProps & RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
@@ -11,6 +11,10 @@ var PaginationItem = forwardRef((props, ref) => {
11
11
  const [itemProps, localProps] = splitItemProps(props, ["value", "type"]);
12
12
  const pagination = usePaginationContext();
13
13
  const mergedProps = mergeProps(pagination.getItemProps(itemProps), localProps);
14
+ if (pagination.type === "link") return /* @__PURE__ */ jsx(ark.a, {
15
+ ...mergedProps,
16
+ ref
17
+ });
14
18
  return /* @__PURE__ */ jsx(ark.button, {
15
19
  ...mergedProps,
16
20
  ref
@@ -8,6 +8,10 @@ let react_jsx_runtime = require("react/jsx-runtime");
8
8
  var PaginationLastTrigger = (0, react.forwardRef)((props, ref) => {
9
9
  const pagination = require_use_pagination_context.usePaginationContext();
10
10
  const mergedProps = (0, _zag_js_react.mergeProps)(pagination.getLastTriggerProps(), props);
11
+ if (pagination.type === "link") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.ark.a, {
12
+ ...mergedProps,
13
+ ref
14
+ });
11
15
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.ark.button, {
12
16
  ...mergedProps,
13
17
  ref
@@ -1,7 +1,8 @@
1
1
  import { HTMLProps, PolymorphicProps } from '../factory.js';
2
+ import { PaginationAnchorProps } from './use-pagination.js';
2
3
  import { ForwardRefExoticComponent, RefAttributes } from 'react';
3
4
  export interface PaginationLastTriggerBaseProps extends PolymorphicProps {
4
5
  }
5
- export interface PaginationLastTriggerProps extends HTMLProps<'button'>, PaginationLastTriggerBaseProps {
6
+ export interface PaginationLastTriggerProps extends HTMLProps<'button'>, PaginationAnchorProps, PaginationLastTriggerBaseProps {
6
7
  }
7
- export declare const PaginationLastTrigger: ForwardRefExoticComponent<PaginationLastTriggerProps & RefAttributes<HTMLButtonElement>>;
8
+ export declare const PaginationLastTrigger: ForwardRefExoticComponent<PaginationLastTriggerProps & RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
@@ -1,7 +1,8 @@
1
1
  import { HTMLProps, PolymorphicProps } from '../factory.js';
2
+ import { PaginationAnchorProps } from './use-pagination.js';
2
3
  import { ForwardRefExoticComponent, RefAttributes } from 'react';
3
4
  export interface PaginationLastTriggerBaseProps extends PolymorphicProps {
4
5
  }
5
- export interface PaginationLastTriggerProps extends HTMLProps<'button'>, PaginationLastTriggerBaseProps {
6
+ export interface PaginationLastTriggerProps extends HTMLProps<'button'>, PaginationAnchorProps, PaginationLastTriggerBaseProps {
6
7
  }
7
- export declare const PaginationLastTrigger: ForwardRefExoticComponent<PaginationLastTriggerProps & RefAttributes<HTMLButtonElement>>;
8
+ export declare const PaginationLastTrigger: ForwardRefExoticComponent<PaginationLastTriggerProps & RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
@@ -8,6 +8,10 @@ import { jsx } from "react/jsx-runtime";
8
8
  var PaginationLastTrigger = forwardRef((props, ref) => {
9
9
  const pagination = usePaginationContext();
10
10
  const mergedProps = mergeProps(pagination.getLastTriggerProps(), props);
11
+ if (pagination.type === "link") return /* @__PURE__ */ jsx(ark.a, {
12
+ ...mergedProps,
13
+ ref
14
+ });
11
15
  return /* @__PURE__ */ jsx(ark.button, {
12
16
  ...mergedProps,
13
17
  ref
@@ -8,6 +8,10 @@ let react_jsx_runtime = require("react/jsx-runtime");
8
8
  var PaginationNextTrigger = (0, react.forwardRef)((props, ref) => {
9
9
  const pagination = require_use_pagination_context.usePaginationContext();
10
10
  const mergedProps = (0, _zag_js_react.mergeProps)(pagination.getNextTriggerProps(), props);
11
+ if (pagination.type === "link") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.ark.a, {
12
+ ...mergedProps,
13
+ ref
14
+ });
11
15
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.ark.button, {
12
16
  ...mergedProps,
13
17
  ref
@@ -1,7 +1,8 @@
1
1
  import { HTMLProps, PolymorphicProps } from '../factory.js';
2
+ import { PaginationAnchorProps } from './use-pagination.js';
2
3
  import { ForwardRefExoticComponent, RefAttributes } from 'react';
3
4
  export interface PaginationNextTriggerBaseProps extends PolymorphicProps {
4
5
  }
5
- export interface PaginationNextTriggerProps extends HTMLProps<'button'>, PaginationNextTriggerBaseProps {
6
+ export interface PaginationNextTriggerProps extends HTMLProps<'button'>, PaginationAnchorProps, PaginationNextTriggerBaseProps {
6
7
  }
7
- export declare const PaginationNextTrigger: ForwardRefExoticComponent<PaginationNextTriggerProps & RefAttributes<HTMLButtonElement>>;
8
+ export declare const PaginationNextTrigger: ForwardRefExoticComponent<PaginationNextTriggerProps & RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;