@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.
- package/dist/components/accordion/accordion.anatomy.js +1 -2
- package/dist/components/angle-slider/angle-slider.anatomy.js +1 -2
- package/dist/components/avatar/avatar.anatomy.js +1 -2
- package/dist/components/client-only/index.js +1 -2
- package/dist/components/clipboard/clipboard.anatomy.js +1 -2
- package/dist/components/collapsible/collapsible.anatomy.js +1 -2
- package/dist/components/color-picker/color-picker-channel-input.cjs +3 -0
- package/dist/components/color-picker/color-picker-channel-input.js +3 -0
- package/dist/components/color-picker/color-picker-trigger.cjs +3 -0
- package/dist/components/color-picker/color-picker-trigger.js +3 -0
- package/dist/components/combobox/combobox-root.cjs +1 -0
- package/dist/components/combobox/combobox-root.js +1 -0
- package/dist/components/date-input/date-input.anatomy.js +1 -2
- package/dist/components/dialog/dialog.anatomy.js +1 -2
- package/dist/components/drawer/drawer.anatomy.js +1 -2
- package/dist/components/editable/editable.anatomy.js +1 -2
- package/dist/components/field/use-field.cjs +8 -7
- package/dist/components/field/use-field.js +8 -7
- package/dist/components/file-upload/file-upload-dropzone.cjs +3 -0
- package/dist/components/file-upload/file-upload-dropzone.js +3 -0
- package/dist/components/file-upload/file-upload-trigger.cjs +3 -0
- package/dist/components/file-upload/file-upload-trigger.js +3 -0
- package/dist/components/file-upload/file-upload.anatomy.js +1 -2
- package/dist/components/file-upload/use-file-upload.cjs +1 -0
- package/dist/components/file-upload/use-file-upload.js +1 -0
- package/dist/components/floating-panel/floating-panel.anatomy.js +1 -2
- package/dist/components/focus-trap/index.js +1 -2
- package/dist/components/frame/index.js +1 -2
- package/dist/components/hover-card/hover-card.anatomy.js +1 -2
- package/dist/components/image-cropper/image-cropper.anatomy.js +1 -2
- package/dist/components/marquee/marquee.anatomy.js +1 -2
- package/dist/components/menu/menu.anatomy.js +1 -2
- package/dist/components/navigation-menu/navigation-menu.anatomy.js +1 -2
- package/dist/components/number-input/number-input.anatomy.js +1 -2
- package/dist/components/pagination/index.d.cts +1 -1
- package/dist/components/pagination/index.d.ts +1 -1
- package/dist/components/pagination/pagination-first-trigger.cjs +4 -0
- package/dist/components/pagination/pagination-first-trigger.d.cts +3 -2
- package/dist/components/pagination/pagination-first-trigger.d.ts +3 -2
- package/dist/components/pagination/pagination-first-trigger.js +4 -0
- package/dist/components/pagination/pagination-item.cjs +4 -0
- package/dist/components/pagination/pagination-item.d.cts +3 -2
- package/dist/components/pagination/pagination-item.d.ts +3 -2
- package/dist/components/pagination/pagination-item.js +4 -0
- package/dist/components/pagination/pagination-last-trigger.cjs +4 -0
- package/dist/components/pagination/pagination-last-trigger.d.cts +3 -2
- package/dist/components/pagination/pagination-last-trigger.d.ts +3 -2
- package/dist/components/pagination/pagination-last-trigger.js +4 -0
- package/dist/components/pagination/pagination-next-trigger.cjs +4 -0
- package/dist/components/pagination/pagination-next-trigger.d.cts +3 -2
- package/dist/components/pagination/pagination-next-trigger.d.ts +3 -2
- package/dist/components/pagination/pagination-next-trigger.js +4 -0
- package/dist/components/pagination/pagination-prev-trigger.cjs +4 -0
- package/dist/components/pagination/pagination-prev-trigger.d.cts +3 -2
- package/dist/components/pagination/pagination-prev-trigger.d.ts +3 -2
- package/dist/components/pagination/pagination-prev-trigger.js +4 -0
- package/dist/components/pagination/pagination.anatomy.js +1 -2
- package/dist/components/pagination/use-pagination.d.cts +5 -0
- package/dist/components/pagination/use-pagination.d.ts +5 -0
- package/dist/components/password-input/password-input.anatomy.js +1 -2
- package/dist/components/pin-input/pin-input-control.cjs +3 -0
- package/dist/components/pin-input/pin-input-control.js +3 -0
- package/dist/components/pin-input/pin-input.anatomy.js +1 -2
- package/dist/components/popover/popover.anatomy.js +1 -2
- package/dist/components/portal/index.js +1 -2
- package/dist/components/progress/progress.anatomy.js +1 -2
- package/dist/components/qr-code/qr-code.anatomy.js +1 -2
- package/dist/components/radio-group/radio-group.anatomy.js +1 -2
- package/dist/components/rating-group/rating-group-control.cjs +3 -0
- package/dist/components/rating-group/rating-group-control.js +3 -0
- package/dist/components/rating-group/rating-group-item.cjs +3 -0
- package/dist/components/rating-group/rating-group-item.js +3 -0
- package/dist/components/rating-group/rating-group.anatomy.js +1 -2
- package/dist/components/scroll-area/scroll-area.anatomy.js +1 -2
- package/dist/components/select/select-trigger.cjs +3 -0
- package/dist/components/select/select-trigger.js +3 -0
- package/dist/components/select/select.anatomy.js +1 -2
- package/dist/components/signature-pad/signature-pad-control.cjs +3 -0
- package/dist/components/signature-pad/signature-pad-control.js +3 -0
- package/dist/components/signature-pad/signature-pad.anatomy.js +1 -2
- package/dist/components/slider/slider.anatomy.js +1 -2
- package/dist/components/splitter/splitter.anatomy.js +1 -2
- package/dist/components/steps/steps.anatomy.js +1 -2
- package/dist/components/switch/switch.anatomy.js +1 -2
- package/dist/components/tabs/tabs.anatomy.js +1 -2
- package/dist/components/tags-input/tags-input-input.cjs +3 -0
- package/dist/components/tags-input/tags-input-input.js +3 -0
- package/dist/components/tags-input/tags-input.anatomy.js +1 -2
- package/dist/components/timer/timer.anatomy.js +1 -2
- package/dist/components/toast/toast-root.cjs +15 -7
- package/dist/components/toast/toast-root.js +17 -9
- package/dist/components/toast/toast.anatomy.js +1 -2
- package/dist/components/toc/toc-nav.cjs +1 -1
- package/dist/components/toc/toc-nav.js +1 -1
- package/dist/components/toc/toc-root-provider.cjs +3 -1
- package/dist/components/toc/toc-root-provider.js +3 -1
- package/dist/components/toc/toc-root.cjs +1 -0
- package/dist/components/toc/toc-root.js +1 -0
- package/dist/components/toc/toc.anatomy.js +1 -2
- package/dist/components/toggle-group/toggle-group.anatomy.js +1 -2
- package/dist/components/tooltip/tooltip.anatomy.js +1 -2
- package/dist/components/tour/index.d.cts +1 -1
- package/dist/components/tour/index.d.ts +1 -1
- package/dist/components/tour/tour.anatomy.d.cts +1 -1
- package/dist/components/tour/tour.anatomy.d.ts +1 -1
- package/dist/components/tour/tour.d.cts +1 -1
- package/dist/components/tour/tour.d.ts +1 -1
- package/dist/components/tree-view/tree-view.anatomy.js +1 -2
- package/dist/providers/hotkeys/use-platform.cjs +1 -2
- package/dist/providers/hotkeys/use-platform.d.cts +2 -1
- package/dist/providers/hotkeys/use-platform.d.ts +2 -1
- package/dist/providers/hotkeys/use-platform.js +1 -2
- package/dist/utils/attr.js +1 -2
- package/dist/utils/react-activity.cjs +1 -1
- package/package.json +80 -80
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { ClientOnly };
|
|
1
|
+
export { ClientOnly } from "./client-only.js";
|
|
@@ -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
|
});
|
|
@@ -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?.
|
|
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::${
|
|
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 ??
|
|
65
|
+
htmlFor: targetControlId ?? controlId
|
|
65
66
|
}), [
|
|
66
67
|
disabled,
|
|
67
68
|
invalid,
|
|
68
69
|
readOnly,
|
|
69
70
|
required,
|
|
70
|
-
|
|
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
|
-
|
|
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:
|
|
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?.
|
|
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::${
|
|
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 ??
|
|
65
|
+
htmlFor: targetControlId ?? controlId
|
|
65
66
|
}), [
|
|
66
67
|
disabled,
|
|
67
68
|
invalid,
|
|
68
69
|
readOnly,
|
|
69
70
|
required,
|
|
70
|
-
|
|
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
|
-
|
|
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:
|
|
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,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { FocusTrap };
|
|
1
|
+
export { FocusTrap } from "./focus-trap.js";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { Frame };
|
|
1
|
+
export { Frame } from "./frame.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';
|
|
@@ -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'
|
|
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'
|
|
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>>;
|