@ark-ui/react 5.6.0 → 5.7.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/collection.d.cts +1 -1
- package/dist/components/collection.d.ts +1 -1
- package/dist/components/floating-panel/floating-panel-body.cjs +5 -7
- package/dist/components/floating-panel/floating-panel-body.js +5 -7
- package/dist/components/floating-panel/floating-panel-content.cjs +8 -14
- package/dist/components/floating-panel/floating-panel-content.js +8 -14
- package/dist/components/floating-panel/floating-panel-drag-trigger.cjs +5 -7
- package/dist/components/floating-panel/floating-panel-drag-trigger.js +5 -7
- package/dist/components/floating-panel/floating-panel-header.cjs +5 -7
- package/dist/components/floating-panel/floating-panel-header.js +5 -7
- package/dist/components/floating-panel/floating-panel-positioner.cjs +8 -10
- package/dist/components/floating-panel/floating-panel-positioner.js +8 -10
- package/dist/components/index.cjs +35 -0
- package/dist/components/index.d.cts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +17 -0
- package/dist/components/listbox/index.cjs +44 -0
- package/dist/components/listbox/index.d.cts +18 -0
- package/dist/components/listbox/index.d.ts +18 -0
- package/dist/components/listbox/index.js +18 -0
- package/dist/components/listbox/listbox-content.cjs +19 -0
- package/dist/components/listbox/listbox-content.d.cts +7 -0
- package/dist/components/listbox/listbox-content.d.ts +7 -0
- package/dist/components/listbox/listbox-content.js +15 -0
- package/dist/components/listbox/listbox-context.d.cts +7 -0
- package/dist/components/listbox/listbox-context.d.ts +7 -0
- package/dist/components/listbox/listbox-input.cjs +21 -0
- package/dist/components/listbox/listbox-input.d.cts +8 -0
- package/dist/components/listbox/listbox-input.d.ts +8 -0
- package/dist/components/listbox/listbox-input.js +17 -0
- package/dist/components/listbox/listbox-item-group-label.cjs +21 -0
- package/dist/components/listbox/listbox-item-group-label.d.cts +7 -0
- package/dist/components/listbox/listbox-item-group-label.d.ts +7 -0
- package/dist/components/listbox/listbox-item-group-label.js +17 -0
- package/dist/components/listbox/listbox-item-group.cjs +24 -0
- package/dist/components/listbox/listbox-item-group.d.cts +7 -0
- package/dist/components/listbox/listbox-item-group.d.ts +7 -0
- package/dist/components/listbox/listbox-item-group.js +20 -0
- package/dist/components/listbox/listbox-item-indicator.cjs +21 -0
- package/dist/components/listbox/listbox-item-indicator.d.cts +7 -0
- package/dist/components/listbox/listbox-item-indicator.d.ts +7 -0
- package/dist/components/listbox/listbox-item-indicator.js +17 -0
- package/dist/components/listbox/listbox-item-text.cjs +21 -0
- package/dist/components/listbox/listbox-item-text.d.cts +7 -0
- package/dist/components/listbox/listbox-item-text.d.ts +7 -0
- package/dist/components/listbox/listbox-item-text.js +17 -0
- package/dist/components/listbox/listbox-item.cjs +24 -0
- package/dist/components/listbox/listbox-item.d.cts +8 -0
- package/dist/components/listbox/listbox-item.d.ts +8 -0
- package/dist/components/listbox/listbox-item.js +20 -0
- package/dist/components/listbox/listbox-label.cjs +19 -0
- package/dist/components/listbox/listbox-label.d.cts +7 -0
- package/dist/components/listbox/listbox-label.d.ts +7 -0
- package/dist/components/listbox/listbox-label.js +15 -0
- package/dist/components/listbox/listbox-root-provider.cjs +20 -0
- package/dist/components/listbox/listbox-root-provider.d.cts +14 -0
- package/dist/components/listbox/listbox-root-provider.d.ts +14 -0
- package/dist/components/listbox/listbox-root-provider.js +16 -0
- package/dist/components/listbox/listbox-root.cjs +42 -0
- package/dist/components/listbox/listbox-root.d.cts +11 -0
- package/dist/components/listbox/listbox-root.d.ts +11 -0
- package/dist/components/listbox/listbox-root.js +38 -0
- package/dist/components/listbox/listbox-value-text.cjs +20 -0
- package/dist/components/listbox/listbox-value-text.d.cts +11 -0
- package/dist/components/listbox/listbox-value-text.d.ts +11 -0
- package/dist/components/listbox/listbox-value-text.js +16 -0
- package/dist/components/listbox/listbox.anatomy.d.cts +1 -0
- package/dist/components/listbox/listbox.anatomy.d.ts +1 -0
- package/dist/components/listbox/listbox.cjs +29 -0
- package/dist/components/listbox/listbox.d.cts +12 -0
- package/dist/components/listbox/listbox.d.ts +12 -0
- package/dist/components/listbox/listbox.js +11 -0
- package/dist/components/listbox/use-listbox-context.cjs +15 -0
- package/dist/components/listbox/use-listbox-context.d.cts +6 -0
- package/dist/components/listbox/use-listbox-context.d.ts +6 -0
- package/dist/components/listbox/use-listbox-context.js +10 -0
- package/dist/components/listbox/use-listbox-item-context.cjs +15 -0
- package/dist/components/listbox/use-listbox-item-context.d.cts +5 -0
- package/dist/components/listbox/use-listbox-item-context.d.ts +5 -0
- package/dist/components/listbox/use-listbox-item-context.js +10 -0
- package/dist/components/listbox/use-listbox-item-group-props.cjs +15 -0
- package/dist/components/listbox/use-listbox-item-group-props.d.cts +5 -0
- package/dist/components/listbox/use-listbox-item-group-props.d.ts +5 -0
- package/dist/components/listbox/use-listbox-item-group-props.js +10 -0
- package/dist/components/listbox/use-listbox-item-props-context.cjs +15 -0
- package/dist/components/listbox/use-listbox-item-props-context.d.cts +3 -0
- package/dist/components/listbox/use-listbox-item-props-context.d.ts +3 -0
- package/dist/components/listbox/use-listbox-item-props-context.js +10 -0
- package/dist/components/listbox/use-listbox.cjs +45 -0
- package/dist/components/listbox/use-listbox.d.cts +13 -0
- package/dist/components/listbox/use-listbox.d.ts +13 -0
- package/dist/components/listbox/use-listbox.js +22 -0
- package/dist/components/toast/toaster.cjs +3 -1
- package/dist/components/toast/toaster.js +3 -1
- package/dist/components/toggle-group/toggle-group-root.cjs +1 -0
- package/dist/components/toggle-group/toggle-group-root.js +1 -0
- package/dist/index.cjs +35 -0
- package/dist/index.js +17 -0
- package/package.json +68 -66
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CollectionItem, CollectionOptions, FilePathTreeNode, ListCollection, TreeCollection, TreeCollectionOptions, TreeNode } from '@zag-js/collection';
|
|
2
|
-
export type { CollectionItem, ListCollection } from '@zag-js/collection';
|
|
2
|
+
export type { CollectionItem, ListCollection, SelectionMode } from '@zag-js/collection';
|
|
3
3
|
export declare const createListCollection: <T extends CollectionItem>(options: CollectionOptions<T>) => ListCollection<T>;
|
|
4
4
|
export type { TreeCollection, TreeNode } from '@zag-js/collection';
|
|
5
5
|
export declare const createTreeCollection: <T extends TreeNode>(options: TreeCollectionOptions<T>) => TreeCollection<T>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CollectionItem, CollectionOptions, FilePathTreeNode, ListCollection, TreeCollection, TreeCollectionOptions, TreeNode } from '@zag-js/collection';
|
|
2
|
-
export type { CollectionItem, ListCollection } from '@zag-js/collection';
|
|
2
|
+
export type { CollectionItem, ListCollection, SelectionMode } from '@zag-js/collection';
|
|
3
3
|
export declare const createListCollection: <T extends CollectionItem>(options: CollectionOptions<T>) => ListCollection<T>;
|
|
4
4
|
export type { TreeCollection, TreeNode } from '@zag-js/collection';
|
|
5
5
|
export declare const createTreeCollection: <T extends TreeNode>(options: TreeCollectionOptions<T>) => TreeCollection<T>;
|
|
@@ -9,13 +9,11 @@ const react = require('react');
|
|
|
9
9
|
const factory = require('../factory.cjs');
|
|
10
10
|
const useFloatingPanelContext = require('./use-floating-panel-context.cjs');
|
|
11
11
|
|
|
12
|
-
const FloatingPanelBody = react.forwardRef(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
);
|
|
12
|
+
const FloatingPanelBody = react.forwardRef((props, ref) => {
|
|
13
|
+
const floatingPanel = useFloatingPanelContext.useFloatingPanelContext();
|
|
14
|
+
const mergedProps = react$1.mergeProps(floatingPanel.getBodyProps(), props);
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
|
|
16
|
+
});
|
|
19
17
|
FloatingPanelBody.displayName = "FloatingPanelBody";
|
|
20
18
|
|
|
21
19
|
exports.FloatingPanelBody = FloatingPanelBody;
|
|
@@ -5,13 +5,11 @@ import { forwardRef } from 'react';
|
|
|
5
5
|
import { ark } from '../factory.js';
|
|
6
6
|
import { useFloatingPanelContext } from './use-floating-panel-context.js';
|
|
7
7
|
|
|
8
|
-
const FloatingPanelBody = forwardRef(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
);
|
|
8
|
+
const FloatingPanelBody = forwardRef((props, ref) => {
|
|
9
|
+
const floatingPanel = useFloatingPanelContext();
|
|
10
|
+
const mergedProps = mergeProps(floatingPanel.getBodyProps(), props);
|
|
11
|
+
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
|
|
12
|
+
});
|
|
15
13
|
FloatingPanelBody.displayName = "FloatingPanelBody";
|
|
16
14
|
|
|
17
15
|
export { FloatingPanelBody };
|
|
@@ -11,21 +11,15 @@ const factory = require('../factory.cjs');
|
|
|
11
11
|
const usePresenceContext = require('../presence/use-presence-context.cjs');
|
|
12
12
|
const useFloatingPanelContext = require('./use-floating-panel-context.cjs');
|
|
13
13
|
|
|
14
|
-
const FloatingPanelContent = react.forwardRef(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
presence.getPresenceProps(),
|
|
21
|
-
props
|
|
22
|
-
);
|
|
23
|
-
if (presence.unmounted) {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref: composeRefs.composeRefs(presence.ref, ref) });
|
|
14
|
+
const FloatingPanelContent = react.forwardRef((props, ref) => {
|
|
15
|
+
const floatingPanel = useFloatingPanelContext.useFloatingPanelContext();
|
|
16
|
+
const presence = usePresenceContext.usePresenceContext();
|
|
17
|
+
const mergedProps = react$1.mergeProps(floatingPanel.getContentProps(), presence.getPresenceProps(), props);
|
|
18
|
+
if (presence.unmounted) {
|
|
19
|
+
return null;
|
|
27
20
|
}
|
|
28
|
-
);
|
|
21
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref: composeRefs.composeRefs(presence.ref, ref) });
|
|
22
|
+
});
|
|
29
23
|
FloatingPanelContent.displayName = "FloatingPanelContent";
|
|
30
24
|
|
|
31
25
|
exports.FloatingPanelContent = FloatingPanelContent;
|
|
@@ -7,21 +7,15 @@ import { ark } from '../factory.js';
|
|
|
7
7
|
import { usePresenceContext } from '../presence/use-presence-context.js';
|
|
8
8
|
import { useFloatingPanelContext } from './use-floating-panel-context.js';
|
|
9
9
|
|
|
10
|
-
const FloatingPanelContent = forwardRef(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
presence.getPresenceProps(),
|
|
17
|
-
props
|
|
18
|
-
);
|
|
19
|
-
if (presence.unmounted) {
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
|
-
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref: composeRefs(presence.ref, ref) });
|
|
10
|
+
const FloatingPanelContent = forwardRef((props, ref) => {
|
|
11
|
+
const floatingPanel = useFloatingPanelContext();
|
|
12
|
+
const presence = usePresenceContext();
|
|
13
|
+
const mergedProps = mergeProps(floatingPanel.getContentProps(), presence.getPresenceProps(), props);
|
|
14
|
+
if (presence.unmounted) {
|
|
15
|
+
return null;
|
|
23
16
|
}
|
|
24
|
-
);
|
|
17
|
+
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref: composeRefs(presence.ref, ref) });
|
|
18
|
+
});
|
|
25
19
|
FloatingPanelContent.displayName = "FloatingPanelContent";
|
|
26
20
|
|
|
27
21
|
export { FloatingPanelContent };
|
|
@@ -9,13 +9,11 @@ const react = require('react');
|
|
|
9
9
|
const factory = require('../factory.cjs');
|
|
10
10
|
const useFloatingPanelContext = require('./use-floating-panel-context.cjs');
|
|
11
11
|
|
|
12
|
-
const FloatingPanelDragTrigger = react.forwardRef(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
);
|
|
12
|
+
const FloatingPanelDragTrigger = react.forwardRef((props, ref) => {
|
|
13
|
+
const floatingPanel = useFloatingPanelContext.useFloatingPanelContext();
|
|
14
|
+
const mergedProps = react$1.mergeProps(floatingPanel.getDragTriggerProps(), props);
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
|
|
16
|
+
});
|
|
19
17
|
FloatingPanelDragTrigger.displayName = "FloatingPanelDragTrigger";
|
|
20
18
|
|
|
21
19
|
exports.FloatingPanelDragTrigger = FloatingPanelDragTrigger;
|
|
@@ -5,13 +5,11 @@ import { forwardRef } from 'react';
|
|
|
5
5
|
import { ark } from '../factory.js';
|
|
6
6
|
import { useFloatingPanelContext } from './use-floating-panel-context.js';
|
|
7
7
|
|
|
8
|
-
const FloatingPanelDragTrigger = forwardRef(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
);
|
|
8
|
+
const FloatingPanelDragTrigger = forwardRef((props, ref) => {
|
|
9
|
+
const floatingPanel = useFloatingPanelContext();
|
|
10
|
+
const mergedProps = mergeProps(floatingPanel.getDragTriggerProps(), props);
|
|
11
|
+
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
|
|
12
|
+
});
|
|
15
13
|
FloatingPanelDragTrigger.displayName = "FloatingPanelDragTrigger";
|
|
16
14
|
|
|
17
15
|
export { FloatingPanelDragTrigger };
|
|
@@ -9,13 +9,11 @@ const react = require('react');
|
|
|
9
9
|
const factory = require('../factory.cjs');
|
|
10
10
|
const useFloatingPanelContext = require('./use-floating-panel-context.cjs');
|
|
11
11
|
|
|
12
|
-
const FloatingPanelHeader = react.forwardRef(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
);
|
|
12
|
+
const FloatingPanelHeader = react.forwardRef((props, ref) => {
|
|
13
|
+
const floatingPanel = useFloatingPanelContext.useFloatingPanelContext();
|
|
14
|
+
const mergedProps = react$1.mergeProps(floatingPanel.getHeaderProps(), props);
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
|
|
16
|
+
});
|
|
19
17
|
FloatingPanelHeader.displayName = "FloatingPanelHeader";
|
|
20
18
|
|
|
21
19
|
exports.FloatingPanelHeader = FloatingPanelHeader;
|
|
@@ -5,13 +5,11 @@ import { forwardRef } from 'react';
|
|
|
5
5
|
import { ark } from '../factory.js';
|
|
6
6
|
import { useFloatingPanelContext } from './use-floating-panel-context.js';
|
|
7
7
|
|
|
8
|
-
const FloatingPanelHeader = forwardRef(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
);
|
|
8
|
+
const FloatingPanelHeader = forwardRef((props, ref) => {
|
|
9
|
+
const floatingPanel = useFloatingPanelContext();
|
|
10
|
+
const mergedProps = mergeProps(floatingPanel.getHeaderProps(), props);
|
|
11
|
+
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
|
|
12
|
+
});
|
|
15
13
|
FloatingPanelHeader.displayName = "FloatingPanelHeader";
|
|
16
14
|
|
|
17
15
|
export { FloatingPanelHeader };
|
|
@@ -10,17 +10,15 @@ const factory = require('../factory.cjs');
|
|
|
10
10
|
const usePresenceContext = require('../presence/use-presence-context.cjs');
|
|
11
11
|
const useFloatingPanelContext = require('./use-floating-panel-context.cjs');
|
|
12
12
|
|
|
13
|
-
const FloatingPanelPositioner = react.forwardRef(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
|
|
13
|
+
const FloatingPanelPositioner = react.forwardRef((props, ref) => {
|
|
14
|
+
const floatingPanel = useFloatingPanelContext.useFloatingPanelContext();
|
|
15
|
+
const mergedProps = react$1.mergeProps(floatingPanel.getPositionerProps(), props);
|
|
16
|
+
const presence = usePresenceContext.usePresenceContext();
|
|
17
|
+
if (presence.unmounted) {
|
|
18
|
+
return null;
|
|
22
19
|
}
|
|
23
|
-
);
|
|
20
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
|
|
21
|
+
});
|
|
24
22
|
FloatingPanelPositioner.displayName = "FloatingPanelPositioner";
|
|
25
23
|
|
|
26
24
|
exports.FloatingPanelPositioner = FloatingPanelPositioner;
|
|
@@ -6,17 +6,15 @@ import { ark } from '../factory.js';
|
|
|
6
6
|
import { usePresenceContext } from '../presence/use-presence-context.js';
|
|
7
7
|
import { useFloatingPanelContext } from './use-floating-panel-context.js';
|
|
8
8
|
|
|
9
|
-
const FloatingPanelPositioner = forwardRef(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
|
|
9
|
+
const FloatingPanelPositioner = forwardRef((props, ref) => {
|
|
10
|
+
const floatingPanel = useFloatingPanelContext();
|
|
11
|
+
const mergedProps = mergeProps(floatingPanel.getPositionerProps(), props);
|
|
12
|
+
const presence = usePresenceContext();
|
|
13
|
+
if (presence.unmounted) {
|
|
14
|
+
return null;
|
|
18
15
|
}
|
|
19
|
-
);
|
|
16
|
+
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
|
|
17
|
+
});
|
|
20
18
|
FloatingPanelPositioner.displayName = "FloatingPanelPositioner";
|
|
21
19
|
|
|
22
20
|
export { FloatingPanelPositioner };
|
|
@@ -277,6 +277,21 @@ const hoverCardTrigger = require('./hover-card/hover-card-trigger.cjs');
|
|
|
277
277
|
const useHoverCard = require('./hover-card/use-hover-card.cjs');
|
|
278
278
|
const useHoverCardContext = require('./hover-card/use-hover-card-context.cjs');
|
|
279
279
|
const hoverCard$1 = require('./hover-card/hover-card.cjs');
|
|
280
|
+
const listboxContent = require('./listbox/listbox-content.cjs');
|
|
281
|
+
const listboxInput = require('./listbox/listbox-input.cjs');
|
|
282
|
+
const listboxItem = require('./listbox/listbox-item.cjs');
|
|
283
|
+
const listboxItemGroup = require('./listbox/listbox-item-group.cjs');
|
|
284
|
+
const listboxItemGroupLabel = require('./listbox/listbox-item-group-label.cjs');
|
|
285
|
+
const listboxItemIndicator = require('./listbox/listbox-item-indicator.cjs');
|
|
286
|
+
const listboxItemText = require('./listbox/listbox-item-text.cjs');
|
|
287
|
+
const listboxLabel = require('./listbox/listbox-label.cjs');
|
|
288
|
+
const listboxRoot = require('./listbox/listbox-root.cjs');
|
|
289
|
+
const listboxRootProvider = require('./listbox/listbox-root-provider.cjs');
|
|
290
|
+
const listboxValueText = require('./listbox/listbox-value-text.cjs');
|
|
291
|
+
const useListbox = require('./listbox/use-listbox.cjs');
|
|
292
|
+
const useListboxContext = require('./listbox/use-listbox-context.cjs');
|
|
293
|
+
const useListboxItemContext = require('./listbox/use-listbox-item-context.cjs');
|
|
294
|
+
const listbox$1 = require('./listbox/listbox.cjs');
|
|
280
295
|
const menuArrow = require('./menu/menu-arrow.cjs');
|
|
281
296
|
const menuArrowTip = require('./menu/menu-arrow-tip.cjs');
|
|
282
297
|
const menuCheckboxItem = require('./menu/menu-checkbox-item.cjs');
|
|
@@ -649,6 +664,7 @@ const editable = require('@zag-js/editable');
|
|
|
649
664
|
const fileUpload = require('@zag-js/file-upload');
|
|
650
665
|
const floatingPanel = require('@zag-js/floating-panel');
|
|
651
666
|
const hoverCard = require('@zag-js/hover-card');
|
|
667
|
+
const listbox = require('@zag-js/listbox');
|
|
652
668
|
const menu = require('@zag-js/menu');
|
|
653
669
|
const numberInput = require('@zag-js/number-input');
|
|
654
670
|
const pagination = require('@zag-js/pagination');
|
|
@@ -959,6 +975,21 @@ exports.HoverCardTrigger = hoverCardTrigger.HoverCardTrigger;
|
|
|
959
975
|
exports.useHoverCard = useHoverCard.useHoverCard;
|
|
960
976
|
exports.useHoverCardContext = useHoverCardContext.useHoverCardContext;
|
|
961
977
|
exports.HoverCard = hoverCard$1;
|
|
978
|
+
exports.ListboxContent = listboxContent.ListboxContent;
|
|
979
|
+
exports.ListboxInput = listboxInput.ListboxInput;
|
|
980
|
+
exports.ListboxItem = listboxItem.ListboxItem;
|
|
981
|
+
exports.ListboxItemGroup = listboxItemGroup.ListboxItemGroup;
|
|
982
|
+
exports.ListboxItemGroupLabel = listboxItemGroupLabel.ListboxItemGroupLabel;
|
|
983
|
+
exports.ListboxItemIndicator = listboxItemIndicator.ListboxItemIndicator;
|
|
984
|
+
exports.ListboxItemText = listboxItemText.ListboxItemText;
|
|
985
|
+
exports.ListboxLabel = listboxLabel.ListboxLabel;
|
|
986
|
+
exports.ListboxRoot = listboxRoot.ListboxRoot;
|
|
987
|
+
exports.ListboxRootProvider = listboxRootProvider.ListboxRootProvider;
|
|
988
|
+
exports.ListboxValueText = listboxValueText.ListboxValueText;
|
|
989
|
+
exports.useListbox = useListbox.useListbox;
|
|
990
|
+
exports.useListboxContext = useListboxContext.useListboxContext;
|
|
991
|
+
exports.useListboxItemContext = useListboxItemContext.useListboxItemContext;
|
|
992
|
+
exports.Listbox = listbox$1;
|
|
962
993
|
exports.MenuArrow = menuArrow.MenuArrow;
|
|
963
994
|
exports.MenuArrowTip = menuArrowTip.MenuArrowTip;
|
|
964
995
|
exports.MenuCheckboxItem = menuCheckboxItem.MenuCheckboxItem;
|
|
@@ -1371,6 +1402,10 @@ Object.defineProperty(exports, "hoverCardAnatomy", {
|
|
|
1371
1402
|
enumerable: true,
|
|
1372
1403
|
get: () => hoverCard.anatomy
|
|
1373
1404
|
});
|
|
1405
|
+
Object.defineProperty(exports, "listboxAnatomy", {
|
|
1406
|
+
enumerable: true,
|
|
1407
|
+
get: () => listbox.anatomy
|
|
1408
|
+
});
|
|
1374
1409
|
Object.defineProperty(exports, "menuAnatomy", {
|
|
1375
1410
|
enumerable: true,
|
|
1376
1411
|
get: () => menu.anatomy
|
package/dist/components/index.js
CHANGED
|
@@ -291,6 +291,22 @@ export { useHoverCard } from './hover-card/use-hover-card.js';
|
|
|
291
291
|
export { useHoverCardContext } from './hover-card/use-hover-card-context.js';
|
|
292
292
|
import * as hoverCard from './hover-card/hover-card.js';
|
|
293
293
|
export { hoverCard as HoverCard };
|
|
294
|
+
export { ListboxContent } from './listbox/listbox-content.js';
|
|
295
|
+
export { ListboxInput } from './listbox/listbox-input.js';
|
|
296
|
+
export { ListboxItem } from './listbox/listbox-item.js';
|
|
297
|
+
export { ListboxItemGroup } from './listbox/listbox-item-group.js';
|
|
298
|
+
export { ListboxItemGroupLabel } from './listbox/listbox-item-group-label.js';
|
|
299
|
+
export { ListboxItemIndicator } from './listbox/listbox-item-indicator.js';
|
|
300
|
+
export { ListboxItemText } from './listbox/listbox-item-text.js';
|
|
301
|
+
export { ListboxLabel } from './listbox/listbox-label.js';
|
|
302
|
+
export { ListboxRoot } from './listbox/listbox-root.js';
|
|
303
|
+
export { ListboxRootProvider } from './listbox/listbox-root-provider.js';
|
|
304
|
+
export { ListboxValueText } from './listbox/listbox-value-text.js';
|
|
305
|
+
export { useListbox } from './listbox/use-listbox.js';
|
|
306
|
+
export { useListboxContext } from './listbox/use-listbox-context.js';
|
|
307
|
+
export { useListboxItemContext } from './listbox/use-listbox-item-context.js';
|
|
308
|
+
import * as listbox from './listbox/listbox.js';
|
|
309
|
+
export { listbox as Listbox };
|
|
294
310
|
export { MenuArrow } from './menu/menu-arrow.js';
|
|
295
311
|
export { MenuArrowTip } from './menu/menu-arrow-tip.js';
|
|
296
312
|
export { MenuCheckboxItem } from './menu/menu-checkbox-item.js';
|
|
@@ -689,6 +705,7 @@ export { anatomy as editableAnatomy } from '@zag-js/editable';
|
|
|
689
705
|
export { anatomy as fileUploadAnatomy } from '@zag-js/file-upload';
|
|
690
706
|
export { anatomy as floatingPanelAnatomy } from '@zag-js/floating-panel';
|
|
691
707
|
export { anatomy as hoverCardAnatomy } from '@zag-js/hover-card';
|
|
708
|
+
export { anatomy as listboxAnatomy } from '@zag-js/listbox';
|
|
692
709
|
export { anatomy as menuAnatomy } from '@zag-js/menu';
|
|
693
710
|
export { anatomy as numberInputAnatomy } from '@zag-js/number-input';
|
|
694
711
|
export { anatomy as paginationAnatomy } from '@zag-js/pagination';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const collection = require('../collection.cjs');
|
|
6
|
+
const listboxContent = require('./listbox-content.cjs');
|
|
7
|
+
const listboxInput = require('./listbox-input.cjs');
|
|
8
|
+
const listboxItem = require('./listbox-item.cjs');
|
|
9
|
+
const listboxItemGroup = require('./listbox-item-group.cjs');
|
|
10
|
+
const listboxItemGroupLabel = require('./listbox-item-group-label.cjs');
|
|
11
|
+
const listboxItemIndicator = require('./listbox-item-indicator.cjs');
|
|
12
|
+
const listboxItemText = require('./listbox-item-text.cjs');
|
|
13
|
+
const listboxLabel = require('./listbox-label.cjs');
|
|
14
|
+
const listboxRoot = require('./listbox-root.cjs');
|
|
15
|
+
const listboxRootProvider = require('./listbox-root-provider.cjs');
|
|
16
|
+
const listboxValueText = require('./listbox-value-text.cjs');
|
|
17
|
+
const useListbox = require('./use-listbox.cjs');
|
|
18
|
+
const useListboxContext = require('./use-listbox-context.cjs');
|
|
19
|
+
const useListboxItemContext = require('./use-listbox-item-context.cjs');
|
|
20
|
+
const listbox$1 = require('./listbox.cjs');
|
|
21
|
+
const listbox = require('@zag-js/listbox');
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
exports.createListCollection = collection.createListCollection;
|
|
26
|
+
exports.ListboxContent = listboxContent.ListboxContent;
|
|
27
|
+
exports.ListboxInput = listboxInput.ListboxInput;
|
|
28
|
+
exports.ListboxItem = listboxItem.ListboxItem;
|
|
29
|
+
exports.ListboxItemGroup = listboxItemGroup.ListboxItemGroup;
|
|
30
|
+
exports.ListboxItemGroupLabel = listboxItemGroupLabel.ListboxItemGroupLabel;
|
|
31
|
+
exports.ListboxItemIndicator = listboxItemIndicator.ListboxItemIndicator;
|
|
32
|
+
exports.ListboxItemText = listboxItemText.ListboxItemText;
|
|
33
|
+
exports.ListboxLabel = listboxLabel.ListboxLabel;
|
|
34
|
+
exports.ListboxRoot = listboxRoot.ListboxRoot;
|
|
35
|
+
exports.ListboxRootProvider = listboxRootProvider.ListboxRootProvider;
|
|
36
|
+
exports.ListboxValueText = listboxValueText.ListboxValueText;
|
|
37
|
+
exports.useListbox = useListbox.useListbox;
|
|
38
|
+
exports.useListboxContext = useListboxContext.useListboxContext;
|
|
39
|
+
exports.useListboxItemContext = useListboxItemContext.useListboxItemContext;
|
|
40
|
+
exports.Listbox = listbox$1;
|
|
41
|
+
Object.defineProperty(exports, "listboxAnatomy", {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: () => listbox.anatomy
|
|
44
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type { HighlightChangeDetails as ListboxHighlightChangeDetails, ScrollToIndexDetails as ListboxScrollToIndexDetails, SelectionDetails as ListboxSelectionDetails, SelectionMode as ListboxSelectionMode, ValueChangeDetails as ListboxValueChangeDetails, } from '@zag-js/listbox';
|
|
2
|
+
export { createListCollection, type CollectionItem, type ListCollection } from '../collection';
|
|
3
|
+
export { ListboxContent, type ListboxContentBaseProps, type ListboxContentProps } from './listbox-content';
|
|
4
|
+
export { ListboxInput, type ListboxInputBaseProps, type ListboxInputProps } from './listbox-input';
|
|
5
|
+
export { ListboxItem, type ListboxItemBaseProps, type ListboxItemProps } from './listbox-item';
|
|
6
|
+
export { ListboxItemGroup, type ListboxItemGroupBaseProps, type ListboxItemGroupProps } from './listbox-item-group';
|
|
7
|
+
export { ListboxItemGroupLabel, type ListboxItemGroupLabelBaseProps, type ListboxItemGroupLabelProps, } from './listbox-item-group-label';
|
|
8
|
+
export { ListboxItemIndicator, type ListboxItemIndicatorBaseProps, type ListboxItemIndicatorProps, } from './listbox-item-indicator';
|
|
9
|
+
export { ListboxItemText, type ListboxItemTextBaseProps, type ListboxItemTextProps } from './listbox-item-text';
|
|
10
|
+
export { ListboxLabel, type ListboxLabelBaseProps, type ListboxLabelProps } from './listbox-label';
|
|
11
|
+
export { ListboxRoot, type ListboxRootBaseProps, type ListboxRootProps } from './listbox-root';
|
|
12
|
+
export { ListboxRootProvider, type ListboxRootProviderBaseProps, type ListboxRootProviderProps, } from './listbox-root-provider';
|
|
13
|
+
export { ListboxValueText, type ListboxValueTextBaseProps, type ListboxValueTextProps } from './listbox-value-text';
|
|
14
|
+
export { listboxAnatomy } from './listbox.anatomy';
|
|
15
|
+
export { useListbox, type UseListboxProps, type UseListboxReturn } from './use-listbox';
|
|
16
|
+
export { useListboxContext, type UseListboxContext } from './use-listbox-context';
|
|
17
|
+
export { useListboxItemContext, type UseListboxItemContext } from './use-listbox-item-context';
|
|
18
|
+
export * as Listbox from './listbox';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type { HighlightChangeDetails as ListboxHighlightChangeDetails, ScrollToIndexDetails as ListboxScrollToIndexDetails, SelectionDetails as ListboxSelectionDetails, SelectionMode as ListboxSelectionMode, ValueChangeDetails as ListboxValueChangeDetails, } from '@zag-js/listbox';
|
|
2
|
+
export { createListCollection, type CollectionItem, type ListCollection } from '../collection';
|
|
3
|
+
export { ListboxContent, type ListboxContentBaseProps, type ListboxContentProps } from './listbox-content';
|
|
4
|
+
export { ListboxInput, type ListboxInputBaseProps, type ListboxInputProps } from './listbox-input';
|
|
5
|
+
export { ListboxItem, type ListboxItemBaseProps, type ListboxItemProps } from './listbox-item';
|
|
6
|
+
export { ListboxItemGroup, type ListboxItemGroupBaseProps, type ListboxItemGroupProps } from './listbox-item-group';
|
|
7
|
+
export { ListboxItemGroupLabel, type ListboxItemGroupLabelBaseProps, type ListboxItemGroupLabelProps, } from './listbox-item-group-label';
|
|
8
|
+
export { ListboxItemIndicator, type ListboxItemIndicatorBaseProps, type ListboxItemIndicatorProps, } from './listbox-item-indicator';
|
|
9
|
+
export { ListboxItemText, type ListboxItemTextBaseProps, type ListboxItemTextProps } from './listbox-item-text';
|
|
10
|
+
export { ListboxLabel, type ListboxLabelBaseProps, type ListboxLabelProps } from './listbox-label';
|
|
11
|
+
export { ListboxRoot, type ListboxRootBaseProps, type ListboxRootProps } from './listbox-root';
|
|
12
|
+
export { ListboxRootProvider, type ListboxRootProviderBaseProps, type ListboxRootProviderProps, } from './listbox-root-provider';
|
|
13
|
+
export { ListboxValueText, type ListboxValueTextBaseProps, type ListboxValueTextProps } from './listbox-value-text';
|
|
14
|
+
export { listboxAnatomy } from './listbox.anatomy';
|
|
15
|
+
export { useListbox, type UseListboxProps, type UseListboxReturn } from './use-listbox';
|
|
16
|
+
export { useListboxContext, type UseListboxContext } from './use-listbox-context';
|
|
17
|
+
export { useListboxItemContext, type UseListboxItemContext } from './use-listbox-item-context';
|
|
18
|
+
export * as Listbox from './listbox';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { createListCollection } from '../collection.js';
|
|
2
|
+
export { ListboxContent } from './listbox-content.js';
|
|
3
|
+
export { ListboxInput } from './listbox-input.js';
|
|
4
|
+
export { ListboxItem } from './listbox-item.js';
|
|
5
|
+
export { ListboxItemGroup } from './listbox-item-group.js';
|
|
6
|
+
export { ListboxItemGroupLabel } from './listbox-item-group-label.js';
|
|
7
|
+
export { ListboxItemIndicator } from './listbox-item-indicator.js';
|
|
8
|
+
export { ListboxItemText } from './listbox-item-text.js';
|
|
9
|
+
export { ListboxLabel } from './listbox-label.js';
|
|
10
|
+
export { ListboxRoot } from './listbox-root.js';
|
|
11
|
+
export { ListboxRootProvider } from './listbox-root-provider.js';
|
|
12
|
+
export { ListboxValueText } from './listbox-value-text.js';
|
|
13
|
+
export { useListbox } from './use-listbox.js';
|
|
14
|
+
export { useListboxContext } from './use-listbox-context.js';
|
|
15
|
+
export { useListboxItemContext } from './use-listbox-item-context.js';
|
|
16
|
+
import * as listbox from './listbox.js';
|
|
17
|
+
export { listbox as Listbox };
|
|
18
|
+
export { anatomy as listboxAnatomy } from '@zag-js/listbox';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const react$1 = require('@zag-js/react');
|
|
8
|
+
const react = require('react');
|
|
9
|
+
const factory = require('../factory.cjs');
|
|
10
|
+
const useListboxContext = require('./use-listbox-context.cjs');
|
|
11
|
+
|
|
12
|
+
const ListboxContent = react.forwardRef((props, ref) => {
|
|
13
|
+
const listbox = useListboxContext.useListboxContext();
|
|
14
|
+
const mergedProps = react$1.mergeProps(listbox.getContentProps(), props);
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
|
|
16
|
+
});
|
|
17
|
+
ListboxContent.displayName = "ListboxContent";
|
|
18
|
+
|
|
19
|
+
exports.ListboxContent = ListboxContent;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
export interface ListboxContentBaseProps extends PolymorphicProps {
|
|
4
|
+
}
|
|
5
|
+
export interface ListboxContentProps extends HTMLProps<'div'>, ListboxContentBaseProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const ListboxContent: ForwardRefExoticComponent<ListboxContentProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
export interface ListboxContentBaseProps extends PolymorphicProps {
|
|
4
|
+
}
|
|
5
|
+
export interface ListboxContentProps extends HTMLProps<'div'>, ListboxContentBaseProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const ListboxContent: ForwardRefExoticComponent<ListboxContentProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { mergeProps } from '@zag-js/react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { ark } from '../factory.js';
|
|
6
|
+
import { useListboxContext } from './use-listbox-context.js';
|
|
7
|
+
|
|
8
|
+
const ListboxContent = forwardRef((props, ref) => {
|
|
9
|
+
const listbox = useListboxContext();
|
|
10
|
+
const mergedProps = mergeProps(listbox.getContentProps(), props);
|
|
11
|
+
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
|
|
12
|
+
});
|
|
13
|
+
ListboxContent.displayName = "ListboxContent";
|
|
14
|
+
|
|
15
|
+
export { ListboxContent };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { CollectionItem } from '../collection';
|
|
3
|
+
import { UseListboxContext } from './use-listbox-context';
|
|
4
|
+
export interface ListboxContextProps<T extends CollectionItem> {
|
|
5
|
+
children: (context: UseListboxContext<T>) => ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const ListboxContext: <T extends CollectionItem>(props: ListboxContextProps<T>) => ReactNode;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { CollectionItem } from '../collection';
|
|
3
|
+
import { UseListboxContext } from './use-listbox-context';
|
|
4
|
+
export interface ListboxContextProps<T extends CollectionItem> {
|
|
5
|
+
children: (context: UseListboxContext<T>) => ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const ListboxContext: <T extends CollectionItem>(props: ListboxContextProps<T>) => ReactNode;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const react$1 = require('@zag-js/react');
|
|
8
|
+
const react = require('react');
|
|
9
|
+
const createSplitProps = require('../../utils/create-split-props.cjs');
|
|
10
|
+
const factory = require('../factory.cjs');
|
|
11
|
+
const useListboxContext = require('./use-listbox-context.cjs');
|
|
12
|
+
|
|
13
|
+
const ListboxInput = react.forwardRef((props, ref) => {
|
|
14
|
+
const [inputProps, localProps] = createSplitProps.createSplitProps()(props, ["autoHighlight"]);
|
|
15
|
+
const listbox = useListboxContext.useListboxContext();
|
|
16
|
+
const mergedProps = react$1.mergeProps(listbox.getInputProps(inputProps), localProps);
|
|
17
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.input, { ...mergedProps, ref });
|
|
18
|
+
});
|
|
19
|
+
ListboxInput.displayName = "ListboxInput";
|
|
20
|
+
|
|
21
|
+
exports.ListboxInput = ListboxInput;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InputProps } from '@zag-js/listbox';
|
|
2
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
3
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
|
+
export interface ListboxInputBaseProps extends InputProps, PolymorphicProps {
|
|
5
|
+
}
|
|
6
|
+
export interface ListboxInputProps extends HTMLProps<'input'>, ListboxInputBaseProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const ListboxInput: ForwardRefExoticComponent<ListboxInputProps & RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InputProps } from '@zag-js/listbox';
|
|
2
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
3
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
|
+
export interface ListboxInputBaseProps extends InputProps, PolymorphicProps {
|
|
5
|
+
}
|
|
6
|
+
export interface ListboxInputProps extends HTMLProps<'input'>, ListboxInputBaseProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const ListboxInput: ForwardRefExoticComponent<ListboxInputProps & RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { mergeProps } from '@zag-js/react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { createSplitProps } from '../../utils/create-split-props.js';
|
|
6
|
+
import { ark } from '../factory.js';
|
|
7
|
+
import { useListboxContext } from './use-listbox-context.js';
|
|
8
|
+
|
|
9
|
+
const ListboxInput = forwardRef((props, ref) => {
|
|
10
|
+
const [inputProps, localProps] = createSplitProps()(props, ["autoHighlight"]);
|
|
11
|
+
const listbox = useListboxContext();
|
|
12
|
+
const mergedProps = mergeProps(listbox.getInputProps(inputProps), localProps);
|
|
13
|
+
return /* @__PURE__ */ jsx(ark.input, { ...mergedProps, ref });
|
|
14
|
+
});
|
|
15
|
+
ListboxInput.displayName = "ListboxInput";
|
|
16
|
+
|
|
17
|
+
export { ListboxInput };
|