@ark-ui/react 5.14.0 → 5.14.2
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/checkbox/checkbox-indicator.d.cts +1 -1
- package/dist/components/checkbox/checkbox-indicator.d.ts +1 -1
- package/dist/components/checkbox/use-checkbox-group.d.cts +7 -7
- package/dist/components/checkbox/use-checkbox-group.d.ts +7 -7
- package/dist/components/clipboard/clipboard-indicator.d.cts +1 -1
- package/dist/components/clipboard/clipboard-indicator.d.ts +1 -1
- package/dist/components/collapsible/use-collapsible.d.cts +1 -1
- package/dist/components/collapsible/use-collapsible.d.ts +1 -1
- package/dist/components/color-picker/color-picker-value-text.d.cts +1 -1
- package/dist/components/color-picker/color-picker-value-text.d.ts +1 -1
- package/dist/components/date-picker/date-picker-range-text.cjs +6 -1
- package/dist/components/date-picker/date-picker-range-text.js +7 -2
- package/dist/components/dialog/dialog-root-provider.d.cts +1 -1
- package/dist/components/dialog/dialog-root-provider.d.ts +1 -1
- package/dist/components/dialog/dialog-root.d.cts +1 -1
- package/dist/components/dialog/dialog-root.d.ts +1 -1
- package/dist/components/factory.d.cts +1 -1
- package/dist/components/factory.d.ts +1 -1
- package/dist/components/field/field-required-indicator.d.cts +1 -1
- package/dist/components/field/field-required-indicator.d.ts +1 -1
- package/dist/components/field/field-textarea.d.cts +1 -1
- package/dist/components/field/field-textarea.d.ts +1 -1
- package/dist/components/field/use-field.d.cts +11 -11
- package/dist/components/field/use-field.d.ts +11 -11
- package/dist/components/fieldset/use-fieldset.d.cts +3 -3
- package/dist/components/fieldset/use-fieldset.d.ts +3 -3
- package/dist/components/file-upload/file-upload-item-preview.d.cts +1 -1
- package/dist/components/file-upload/file-upload-item-preview.d.ts +1 -1
- package/dist/components/floating-panel/floating-panel-root-provider.d.cts +1 -1
- package/dist/components/floating-panel/floating-panel-root-provider.d.ts +1 -1
- package/dist/components/floating-panel/floating-panel-root.d.cts +1 -1
- package/dist/components/floating-panel/floating-panel-root.d.ts +1 -1
- package/dist/components/focus-trap/focus-trap.d.cts +1 -1
- package/dist/components/focus-trap/focus-trap.d.ts +1 -1
- package/dist/components/format/format-byte.d.cts +2 -2
- package/dist/components/format/format-byte.d.ts +2 -2
- package/dist/components/frame/frame-content.d.cts +3 -3
- package/dist/components/frame/frame-content.d.ts +3 -3
- package/dist/components/frame/frame.d.cts +3 -3
- package/dist/components/frame/frame.d.ts +3 -3
- package/dist/components/hover-card/hover-card-root-provider.d.cts +1 -1
- package/dist/components/hover-card/hover-card-root-provider.d.ts +1 -1
- package/dist/components/hover-card/hover-card-root.d.cts +1 -1
- package/dist/components/hover-card/hover-card-root.d.ts +1 -1
- package/dist/components/index.cjs +2 -0
- package/dist/components/index.js +1 -0
- package/dist/components/listbox/index.cjs +2 -0
- package/dist/components/listbox/index.d.cts +1 -0
- package/dist/components/listbox/index.d.ts +1 -0
- package/dist/components/listbox/index.js +1 -0
- package/dist/components/listbox/listbox-context.cjs +10 -0
- package/dist/components/listbox/listbox-context.js +6 -0
- package/dist/components/listbox/listbox-value-text.d.cts +1 -1
- package/dist/components/listbox/listbox-value-text.d.ts +1 -1
- package/dist/components/listbox/listbox.cjs +2 -0
- package/dist/components/listbox/listbox.d.cts +1 -0
- package/dist/components/listbox/listbox.d.ts +1 -0
- package/dist/components/listbox/listbox.js +1 -0
- package/dist/components/menu/menu-item.d.cts +1 -1
- package/dist/components/menu/menu-item.d.ts +1 -1
- package/dist/components/menu/menu-root-provider.d.cts +1 -1
- package/dist/components/menu/menu-root-provider.d.ts +1 -1
- package/dist/components/menu/menu-root.d.cts +1 -1
- package/dist/components/menu/menu-root.d.ts +1 -1
- package/dist/components/menu/use-menu-item-group-context.d.cts +2 -2
- package/dist/components/menu/use-menu-item-group-context.d.ts +2 -2
- package/dist/components/popover/popover-root-provider.d.cts +1 -1
- package/dist/components/popover/popover-root-provider.d.ts +1 -1
- package/dist/components/popover/popover-root.d.cts +1 -1
- package/dist/components/popover/popover-root.d.ts +1 -1
- package/dist/components/portal/portal.d.cts +2 -2
- package/dist/components/portal/portal.d.ts +2 -2
- package/dist/components/presence/use-presence.d.cts +1 -1
- package/dist/components/presence/use-presence.d.ts +1 -1
- package/dist/components/select/select-value-text.d.cts +1 -1
- package/dist/components/select/select-value-text.d.ts +1 -1
- package/dist/components/toggle/toggle-indicator.d.cts +1 -1
- package/dist/components/toggle/toggle-indicator.d.ts +1 -1
- package/dist/components/tooltip/tooltip-root-provider.d.cts +1 -1
- package/dist/components/tooltip/tooltip-root-provider.d.ts +1 -1
- package/dist/components/tooltip/tooltip-root.d.cts +1 -1
- package/dist/components/tooltip/tooltip-root.d.ts +1 -1
- package/dist/components/tour/tour-root.d.cts +1 -1
- package/dist/components/tour/tour-root.d.ts +1 -1
- package/dist/components/tree-view/index.d.cts +1 -1
- package/dist/components/tree-view/index.d.ts +1 -1
- package/dist/components/tree-view/tree-view-label.cjs +1 -1
- package/dist/components/tree-view/tree-view-label.d.cts +2 -2
- package/dist/components/tree-view/tree-view-label.d.ts +2 -2
- package/dist/components/tree-view/tree-view-label.js +1 -1
- package/dist/components/tree-view/tree-view-node-provider.d.cts +1 -1
- package/dist/components/tree-view/tree-view-node-provider.d.ts +1 -1
- package/dist/components/tree-view/tree-view.d.cts +1 -1
- package/dist/components/tree-view/tree-view.d.ts +1 -1
- package/dist/index.cjs +2 -0
- package/dist/index.js +1 -0
- package/dist/providers/environment/environment-provider.d.cts +2 -2
- package/dist/providers/environment/environment-provider.d.ts +2 -2
- package/dist/utils/create-context.d.cts +6 -6
- package/dist/utils/create-context.d.ts +6 -6
- package/dist/utils/render-strategy.d.cts +2 -2
- package/dist/utils/render-strategy.d.ts +2 -2
- package/dist/utils/use-controllable-state.d.cts +3 -3
- package/dist/utils/use-controllable-state.d.ts +3 -3
- package/dist/utils/use-event.d.cts +1 -1
- package/dist/utils/use-event.d.ts +1 -1
- package/package.json +65 -65
|
@@ -4,6 +4,6 @@ import { UseHoverCardProps } from './use-hover-card';
|
|
|
4
4
|
export interface HoverCardRootBaseProps extends UseHoverCardProps, UsePresenceProps {
|
|
5
5
|
}
|
|
6
6
|
export interface HoverCardRootProps extends HoverCardRootBaseProps {
|
|
7
|
-
children?: ReactNode;
|
|
7
|
+
children?: ReactNode | undefined;
|
|
8
8
|
}
|
|
9
9
|
export declare const HoverCardRoot: (props: HoverCardRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -281,6 +281,7 @@ const hoverCardTrigger = require('./hover-card/hover-card-trigger.cjs');
|
|
|
281
281
|
const useHoverCard = require('./hover-card/use-hover-card.cjs');
|
|
282
282
|
const useHoverCardContext = require('./hover-card/use-hover-card-context.cjs');
|
|
283
283
|
const hoverCard$1 = require('./hover-card/hover-card.cjs');
|
|
284
|
+
const listboxContext = require('./listbox/listbox-context.cjs');
|
|
284
285
|
const listboxContent = require('./listbox/listbox-content.cjs');
|
|
285
286
|
const listboxInput = require('./listbox/listbox-input.cjs');
|
|
286
287
|
const listboxItem = require('./listbox/listbox-item.cjs');
|
|
@@ -996,6 +997,7 @@ exports.HoverCardTrigger = hoverCardTrigger.HoverCardTrigger;
|
|
|
996
997
|
exports.useHoverCard = useHoverCard.useHoverCard;
|
|
997
998
|
exports.useHoverCardContext = useHoverCardContext.useHoverCardContext;
|
|
998
999
|
exports.HoverCard = hoverCard$1;
|
|
1000
|
+
exports.ListboxContext = listboxContext.ListboxContext;
|
|
999
1001
|
exports.ListboxContent = listboxContent.ListboxContent;
|
|
1000
1002
|
exports.ListboxInput = listboxInput.ListboxInput;
|
|
1001
1003
|
exports.ListboxItem = listboxItem.ListboxItem;
|
package/dist/components/index.js
CHANGED
|
@@ -295,6 +295,7 @@ export { useHoverCard } from './hover-card/use-hover-card.js';
|
|
|
295
295
|
export { useHoverCardContext } from './hover-card/use-hover-card-context.js';
|
|
296
296
|
import * as hoverCard from './hover-card/hover-card.js';
|
|
297
297
|
export { hoverCard as HoverCard };
|
|
298
|
+
export { ListboxContext } from './listbox/listbox-context.js';
|
|
298
299
|
export { ListboxContent } from './listbox/listbox-content.js';
|
|
299
300
|
export { ListboxInput } from './listbox/listbox-input.js';
|
|
300
301
|
export { ListboxItem } from './listbox/listbox-item.js';
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const listCollection = require('../collection/list-collection.cjs');
|
|
6
|
+
const listboxContext = require('./listbox-context.cjs');
|
|
6
7
|
const listboxContent = require('./listbox-content.cjs');
|
|
7
8
|
const listboxInput = require('./listbox-input.cjs');
|
|
8
9
|
const listboxItem = require('./listbox-item.cjs');
|
|
@@ -23,6 +24,7 @@ const listbox = require('@zag-js/listbox');
|
|
|
23
24
|
|
|
24
25
|
|
|
25
26
|
exports.createListCollection = listCollection.createListCollection;
|
|
27
|
+
exports.ListboxContext = listboxContext.ListboxContext;
|
|
26
28
|
exports.ListboxContent = listboxContent.ListboxContent;
|
|
27
29
|
exports.ListboxInput = listboxInput.ListboxInput;
|
|
28
30
|
exports.ListboxItem = listboxItem.ListboxItem;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type { HighlightChangeDetails as ListboxHighlightChangeDetails, ScrollToIndexDetails as ListboxScrollToIndexDetails, SelectionDetails as ListboxSelectionDetails, SelectionMode as ListboxSelectionMode, ValueChangeDetails as ListboxValueChangeDetails, } from '@zag-js/listbox';
|
|
2
2
|
export { createListCollection, type CollectionItem, type ListCollection } from '../collection';
|
|
3
|
+
export { ListboxContext, type ListboxContextProps } from './listbox-context';
|
|
3
4
|
export { ListboxContent, type ListboxContentBaseProps, type ListboxContentProps } from './listbox-content';
|
|
4
5
|
export { ListboxInput, type ListboxInputBaseProps, type ListboxInputProps } from './listbox-input';
|
|
5
6
|
export { ListboxItem, type ListboxItemBaseProps, type ListboxItemProps } from './listbox-item';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type { HighlightChangeDetails as ListboxHighlightChangeDetails, ScrollToIndexDetails as ListboxScrollToIndexDetails, SelectionDetails as ListboxSelectionDetails, SelectionMode as ListboxSelectionMode, ValueChangeDetails as ListboxValueChangeDetails, } from '@zag-js/listbox';
|
|
2
2
|
export { createListCollection, type CollectionItem, type ListCollection } from '../collection';
|
|
3
|
+
export { ListboxContext, type ListboxContextProps } from './listbox-context';
|
|
3
4
|
export { ListboxContent, type ListboxContentBaseProps, type ListboxContentProps } from './listbox-content';
|
|
4
5
|
export { ListboxInput, type ListboxInputBaseProps, type ListboxInputProps } from './listbox-input';
|
|
5
6
|
export { ListboxItem, type ListboxItemBaseProps, type ListboxItemProps } from './listbox-item';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { createListCollection } from '../collection/list-collection.js';
|
|
2
|
+
export { ListboxContext } from './listbox-context.js';
|
|
2
3
|
export { ListboxContent } from './listbox-content.js';
|
|
3
4
|
export { ListboxInput } from './listbox-input.js';
|
|
4
5
|
export { ListboxItem } from './listbox-item.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const useListboxContext = require('./use-listbox-context.cjs');
|
|
7
|
+
|
|
8
|
+
const ListboxContext = (props) => props.children(useListboxContext.useListboxContext());
|
|
9
|
+
|
|
10
|
+
exports.ListboxContext = ListboxContext;
|
|
@@ -4,7 +4,7 @@ export interface ListboxValueTextBaseProps extends PolymorphicProps {
|
|
|
4
4
|
/**
|
|
5
5
|
* Text to display when no value is listboxed.
|
|
6
6
|
*/
|
|
7
|
-
placeholder?: string;
|
|
7
|
+
placeholder?: string | undefined;
|
|
8
8
|
}
|
|
9
9
|
export interface ListboxValueTextProps extends HTMLProps<'span'>, ListboxValueTextBaseProps {
|
|
10
10
|
}
|
|
@@ -4,7 +4,7 @@ export interface ListboxValueTextBaseProps extends PolymorphicProps {
|
|
|
4
4
|
/**
|
|
5
5
|
* Text to display when no value is listboxed.
|
|
6
6
|
*/
|
|
7
|
-
placeholder?: string;
|
|
7
|
+
placeholder?: string | undefined;
|
|
8
8
|
}
|
|
9
9
|
export interface ListboxValueTextProps extends HTMLProps<'span'>, ListboxValueTextBaseProps {
|
|
10
10
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
+
const listboxContext = require('./listbox-context.cjs');
|
|
5
6
|
const listboxContent = require('./listbox-content.cjs');
|
|
6
7
|
const listboxInput = require('./listbox-input.cjs');
|
|
7
8
|
const listboxItem = require('./listbox-item.cjs');
|
|
@@ -16,6 +17,7 @@ const listboxValueText = require('./listbox-value-text.cjs');
|
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
|
|
20
|
+
exports.Context = listboxContext.ListboxContext;
|
|
19
21
|
exports.Content = listboxContent.ListboxContent;
|
|
20
22
|
exports.Input = listboxInput.ListboxInput;
|
|
21
23
|
exports.Item = listboxItem.ListboxItem;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type { HighlightChangeDetails, ScrollToIndexDetails, SelectionDetails, SelectionMode, ValueChangeDetails, } from '@zag-js/listbox';
|
|
2
|
+
export { ListboxContext as Context, type ListboxContextProps as ContextProps } from './listbox-context';
|
|
2
3
|
export { ListboxContent as Content, type ListboxContentBaseProps as ContentBaseProps, type ListboxContentProps as ContentProps, } from './listbox-content';
|
|
3
4
|
export { ListboxInput as Input, type ListboxInputBaseProps as InputBaseProps, type ListboxInputProps as InputProps, } from './listbox-input';
|
|
4
5
|
export { ListboxItem as Item, type ListboxItemBaseProps as ItemBaseProps, type ListboxItemProps as ItemProps, } from './listbox-item';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type { HighlightChangeDetails, ScrollToIndexDetails, SelectionDetails, SelectionMode, ValueChangeDetails, } from '@zag-js/listbox';
|
|
2
|
+
export { ListboxContext as Context, type ListboxContextProps as ContextProps } from './listbox-context';
|
|
2
3
|
export { ListboxContent as Content, type ListboxContentBaseProps as ContentBaseProps, type ListboxContentProps as ContentProps, } from './listbox-content';
|
|
3
4
|
export { ListboxInput as Input, type ListboxInputBaseProps as InputBaseProps, type ListboxInputProps as InputProps, } from './listbox-input';
|
|
4
5
|
export { ListboxItem as Item, type ListboxItemBaseProps as ItemBaseProps, type ListboxItemProps as ItemProps, } from './listbox-item';
|
|
@@ -7,7 +7,7 @@ interface RootProviderProps {
|
|
|
7
7
|
export interface MenuRootProviderBaseProps extends RootProviderProps, UsePresenceProps {
|
|
8
8
|
}
|
|
9
9
|
export interface MenuRootProviderProps extends MenuRootProviderBaseProps {
|
|
10
|
-
children?: ReactNode;
|
|
10
|
+
children?: ReactNode | undefined;
|
|
11
11
|
}
|
|
12
12
|
export declare const MenuRootProvider: (props: MenuRootProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -7,7 +7,7 @@ interface RootProviderProps {
|
|
|
7
7
|
export interface MenuRootProviderBaseProps extends RootProviderProps, UsePresenceProps {
|
|
8
8
|
}
|
|
9
9
|
export interface MenuRootProviderProps extends MenuRootProviderBaseProps {
|
|
10
|
-
children?: ReactNode;
|
|
10
|
+
children?: ReactNode | undefined;
|
|
11
11
|
}
|
|
12
12
|
export declare const MenuRootProvider: (props: MenuRootProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -4,6 +4,6 @@ import { UseMenuProps } from './use-menu';
|
|
|
4
4
|
export interface MenuRootBaseProps extends UseMenuProps, UsePresenceProps {
|
|
5
5
|
}
|
|
6
6
|
export interface MenuRootProps extends MenuRootBaseProps {
|
|
7
|
-
children?: ReactNode;
|
|
7
|
+
children?: ReactNode | undefined;
|
|
8
8
|
}
|
|
9
9
|
export declare const MenuRoot: (props: MenuRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,6 +4,6 @@ import { UseMenuProps } from './use-menu';
|
|
|
4
4
|
export interface MenuRootBaseProps extends UseMenuProps, UsePresenceProps {
|
|
5
5
|
}
|
|
6
6
|
export interface MenuRootProps extends MenuRootBaseProps {
|
|
7
|
-
children?: ReactNode;
|
|
7
|
+
children?: ReactNode | undefined;
|
|
8
8
|
}
|
|
9
9
|
export declare const MenuRoot: (props: MenuRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,7 +4,7 @@ export interface ValueChangeDetails {
|
|
|
4
4
|
}
|
|
5
5
|
export interface UseMenuItemGroupContext {
|
|
6
6
|
id: string;
|
|
7
|
-
value?: string;
|
|
8
|
-
onValueChange?: (e: ValueChangeDetails) => void;
|
|
7
|
+
value?: string | undefined;
|
|
8
|
+
onValueChange?: ((e: ValueChangeDetails) => void) | undefined;
|
|
9
9
|
}
|
|
10
10
|
export declare const MenuItemGroupProvider: Provider<UseMenuItemGroupContext>, useMenuItemGroupContext: () => UseMenuItemGroupContext;
|
|
@@ -4,7 +4,7 @@ export interface ValueChangeDetails {
|
|
|
4
4
|
}
|
|
5
5
|
export interface UseMenuItemGroupContext {
|
|
6
6
|
id: string;
|
|
7
|
-
value?: string;
|
|
8
|
-
onValueChange?: (e: ValueChangeDetails) => void;
|
|
7
|
+
value?: string | undefined;
|
|
8
|
+
onValueChange?: ((e: ValueChangeDetails) => void) | undefined;
|
|
9
9
|
}
|
|
10
10
|
export declare const MenuItemGroupProvider: Provider<UseMenuItemGroupContext>, useMenuItemGroupContext: () => UseMenuItemGroupContext;
|
|
@@ -7,7 +7,7 @@ interface RootProviderProps {
|
|
|
7
7
|
export interface PopoverRootProviderBaseProps extends RootProviderProps, UsePresenceProps {
|
|
8
8
|
}
|
|
9
9
|
export interface PopoverRootProviderProps extends PopoverRootProviderBaseProps {
|
|
10
|
-
children?: ReactNode;
|
|
10
|
+
children?: ReactNode | undefined;
|
|
11
11
|
}
|
|
12
12
|
export declare const PopoverRootProvider: (props: PopoverRootProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -7,7 +7,7 @@ interface RootProviderProps {
|
|
|
7
7
|
export interface PopoverRootProviderBaseProps extends RootProviderProps, UsePresenceProps {
|
|
8
8
|
}
|
|
9
9
|
export interface PopoverRootProviderProps extends PopoverRootProviderBaseProps {
|
|
10
|
-
children?: ReactNode;
|
|
10
|
+
children?: ReactNode | undefined;
|
|
11
11
|
}
|
|
12
12
|
export declare const PopoverRootProvider: (props: PopoverRootProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -4,6 +4,6 @@ import { UsePopoverProps } from './use-popover';
|
|
|
4
4
|
export interface PopoverRootBaseProps extends UsePopoverProps, UsePresenceProps {
|
|
5
5
|
}
|
|
6
6
|
export interface PopoverRootProps extends PopoverRootBaseProps {
|
|
7
|
-
children?: ReactNode;
|
|
7
|
+
children?: ReactNode | undefined;
|
|
8
8
|
}
|
|
9
9
|
export declare const PopoverRoot: (props: PopoverRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,6 +4,6 @@ import { UsePopoverProps } from './use-popover';
|
|
|
4
4
|
export interface PopoverRootBaseProps extends UsePopoverProps, UsePresenceProps {
|
|
5
5
|
}
|
|
6
6
|
export interface PopoverRootProps extends PopoverRootBaseProps {
|
|
7
|
-
children?: ReactNode;
|
|
7
|
+
children?: ReactNode | undefined;
|
|
8
8
|
}
|
|
9
9
|
export declare const PopoverRoot: (props: PopoverRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren, RefObject } from 'react';
|
|
2
2
|
export interface PortalProps {
|
|
3
|
-
disabled?: boolean;
|
|
4
|
-
container?: RefObject<HTMLElement | null
|
|
3
|
+
disabled?: boolean | undefined;
|
|
4
|
+
container?: RefObject<HTMLElement | null> | undefined;
|
|
5
5
|
}
|
|
6
6
|
export declare const Portal: (props: PropsWithChildren<PortalProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren, RefObject } from 'react';
|
|
2
2
|
export interface PortalProps {
|
|
3
|
-
disabled?: boolean;
|
|
4
|
-
container?: RefObject<HTMLElement | null
|
|
3
|
+
disabled?: boolean | undefined;
|
|
4
|
+
container?: RefObject<HTMLElement | null> | undefined;
|
|
5
5
|
}
|
|
6
6
|
export declare const Portal: (props: PropsWithChildren<PortalProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,7 +6,7 @@ export interface UsePresenceProps extends Optional<presence.Props, 'present'>, R
|
|
|
6
6
|
* Whether to allow the initial presence animation.
|
|
7
7
|
* @default false
|
|
8
8
|
*/
|
|
9
|
-
skipAnimationOnMount?: boolean;
|
|
9
|
+
skipAnimationOnMount?: boolean | undefined;
|
|
10
10
|
}
|
|
11
11
|
export type UsePresenceReturn = ReturnType<typeof usePresence>;
|
|
12
12
|
export declare const usePresence: (props?: UsePresenceProps) => {
|
|
@@ -6,7 +6,7 @@ export interface UsePresenceProps extends Optional<presence.Props, 'present'>, R
|
|
|
6
6
|
* Whether to allow the initial presence animation.
|
|
7
7
|
* @default false
|
|
8
8
|
*/
|
|
9
|
-
skipAnimationOnMount?: boolean;
|
|
9
|
+
skipAnimationOnMount?: boolean | undefined;
|
|
10
10
|
}
|
|
11
11
|
export type UsePresenceReturn = ReturnType<typeof usePresence>;
|
|
12
12
|
export declare const usePresence: (props?: UsePresenceProps) => {
|
|
@@ -4,7 +4,7 @@ export interface SelectValueTextBaseProps extends PolymorphicProps {
|
|
|
4
4
|
/**
|
|
5
5
|
* Text to display when no value is selected.
|
|
6
6
|
*/
|
|
7
|
-
placeholder?: string;
|
|
7
|
+
placeholder?: string | undefined;
|
|
8
8
|
}
|
|
9
9
|
export interface SelectValueTextProps extends HTMLProps<'span'>, SelectValueTextBaseProps {
|
|
10
10
|
}
|
|
@@ -4,7 +4,7 @@ export interface SelectValueTextBaseProps extends PolymorphicProps {
|
|
|
4
4
|
/**
|
|
5
5
|
* Text to display when no value is selected.
|
|
6
6
|
*/
|
|
7
|
-
placeholder?: string;
|
|
7
|
+
placeholder?: string | undefined;
|
|
8
8
|
}
|
|
9
9
|
export interface SelectValueTextProps extends HTMLProps<'span'>, SelectValueTextBaseProps {
|
|
10
10
|
}
|
|
@@ -4,7 +4,7 @@ export interface ToggleIndicatorBaseProps {
|
|
|
4
4
|
/**
|
|
5
5
|
* The fallback content to render when the toggle is not pressed.
|
|
6
6
|
*/
|
|
7
|
-
fallback?: React.ReactNode;
|
|
7
|
+
fallback?: React.ReactNode | undefined;
|
|
8
8
|
}
|
|
9
9
|
export interface ToggleIndicatorProps extends HTMLArkProps<'div'>, ToggleIndicatorBaseProps {
|
|
10
10
|
}
|
|
@@ -4,7 +4,7 @@ export interface ToggleIndicatorBaseProps {
|
|
|
4
4
|
/**
|
|
5
5
|
* The fallback content to render when the toggle is not pressed.
|
|
6
6
|
*/
|
|
7
|
-
fallback?: React.ReactNode;
|
|
7
|
+
fallback?: React.ReactNode | undefined;
|
|
8
8
|
}
|
|
9
9
|
export interface ToggleIndicatorProps extends HTMLArkProps<'div'>, ToggleIndicatorBaseProps {
|
|
10
10
|
}
|
|
@@ -7,7 +7,7 @@ interface RootProviderProps {
|
|
|
7
7
|
export interface TooltipRootProviderBaseProps extends RootProviderProps, UsePresenceProps {
|
|
8
8
|
}
|
|
9
9
|
export interface TooltipRootProviderProps extends TooltipRootProviderBaseProps {
|
|
10
|
-
children?: ReactNode;
|
|
10
|
+
children?: ReactNode | undefined;
|
|
11
11
|
}
|
|
12
12
|
export declare const TooltipRootProvider: (props: TooltipRootProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -7,7 +7,7 @@ interface RootProviderProps {
|
|
|
7
7
|
export interface TooltipRootProviderBaseProps extends RootProviderProps, UsePresenceProps {
|
|
8
8
|
}
|
|
9
9
|
export interface TooltipRootProviderProps extends TooltipRootProviderBaseProps {
|
|
10
|
-
children?: ReactNode;
|
|
10
|
+
children?: ReactNode | undefined;
|
|
11
11
|
}
|
|
12
12
|
export declare const TooltipRootProvider: (props: TooltipRootProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -4,6 +4,6 @@ import { UseTooltipProps } from './use-tooltip';
|
|
|
4
4
|
export interface TooltipRootBaseProps extends UseTooltipProps, UsePresenceProps {
|
|
5
5
|
}
|
|
6
6
|
export interface TooltipRootProps extends TooltipRootBaseProps {
|
|
7
|
-
children?: ReactNode;
|
|
7
|
+
children?: ReactNode | undefined;
|
|
8
8
|
}
|
|
9
9
|
export declare const TooltipRoot: (props: TooltipRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,6 +4,6 @@ import { UseTooltipProps } from './use-tooltip';
|
|
|
4
4
|
export interface TooltipRootBaseProps extends UseTooltipProps, UsePresenceProps {
|
|
5
5
|
}
|
|
6
6
|
export interface TooltipRootProps extends TooltipRootBaseProps {
|
|
7
|
-
children?: ReactNode;
|
|
7
|
+
children?: ReactNode | undefined;
|
|
8
8
|
}
|
|
9
9
|
export declare const TooltipRoot: (props: TooltipRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,6 +5,6 @@ export interface TourRootBaseProps extends UsePresenceProps {
|
|
|
5
5
|
tour: UseTourReturn;
|
|
6
6
|
}
|
|
7
7
|
export interface TourRootProps extends TourRootBaseProps {
|
|
8
|
-
children?: ReactNode;
|
|
8
|
+
children?: ReactNode | undefined;
|
|
9
9
|
}
|
|
10
10
|
export declare const TourRoot: (props: TourRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,6 +5,6 @@ export interface TourRootBaseProps extends UsePresenceProps {
|
|
|
5
5
|
tour: UseTourReturn;
|
|
6
6
|
}
|
|
7
7
|
export interface TourRootProps extends TourRootBaseProps {
|
|
8
|
-
children?: ReactNode;
|
|
8
|
+
children?: ReactNode | undefined;
|
|
9
9
|
}
|
|
10
10
|
export declare const TourRoot: (props: TourRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { ExpandedChangeDetails as TreeViewExpandedChangeDetails, FocusChangeDetails as TreeViewFocusChangeDetails, SelectionChangeDetails as TreeViewSelectionChangeDetails, LoadChildrenDetails as TreeViewLoadChildrenDetails, LoadChildrenCompleteDetails as TreeViewLoadChildrenCompleteDetails, } from '@zag-js/tree-view';
|
|
1
|
+
export type { ExpandedChangeDetails as TreeViewExpandedChangeDetails, FocusChangeDetails as TreeViewFocusChangeDetails, SelectionChangeDetails as TreeViewSelectionChangeDetails, LoadChildrenDetails as TreeViewLoadChildrenDetails, LoadChildrenCompleteDetails as TreeViewLoadChildrenCompleteDetails, NodeState as TreeViewNodeState, NodeProps as TreeViewNodeProps, } from '@zag-js/tree-view';
|
|
2
2
|
export { createFileTreeCollection, createTreeCollection, type TreeCollection, type TreeNode } from '../collection';
|
|
3
3
|
export { TreeViewBranch, type TreeViewBranchBaseProps, type TreeViewBranchProps } from './tree-view-branch';
|
|
4
4
|
export { TreeViewBranchContent, type TreeViewBranchContentBaseProps, type TreeViewBranchContentProps, } from './tree-view-branch-content';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { ExpandedChangeDetails as TreeViewExpandedChangeDetails, FocusChangeDetails as TreeViewFocusChangeDetails, SelectionChangeDetails as TreeViewSelectionChangeDetails, LoadChildrenDetails as TreeViewLoadChildrenDetails, LoadChildrenCompleteDetails as TreeViewLoadChildrenCompleteDetails, } from '@zag-js/tree-view';
|
|
1
|
+
export type { ExpandedChangeDetails as TreeViewExpandedChangeDetails, FocusChangeDetails as TreeViewFocusChangeDetails, SelectionChangeDetails as TreeViewSelectionChangeDetails, LoadChildrenDetails as TreeViewLoadChildrenDetails, LoadChildrenCompleteDetails as TreeViewLoadChildrenCompleteDetails, NodeState as TreeViewNodeState, NodeProps as TreeViewNodeProps, } from '@zag-js/tree-view';
|
|
2
2
|
export { createFileTreeCollection, createTreeCollection, type TreeCollection, type TreeNode } from '../collection';
|
|
3
3
|
export { TreeViewBranch, type TreeViewBranchBaseProps, type TreeViewBranchProps } from './tree-view-branch';
|
|
4
4
|
export { TreeViewBranchContent, type TreeViewBranchContentBaseProps, type TreeViewBranchContentProps, } from './tree-view-branch-content';
|
|
@@ -12,7 +12,7 @@ const useTreeViewContext = require('./use-tree-view-context.cjs');
|
|
|
12
12
|
const TreeViewLabel = react.forwardRef((props, ref) => {
|
|
13
13
|
const treeView = useTreeViewContext.useTreeViewContext();
|
|
14
14
|
const mergedProps = react$1.mergeProps(treeView.getLabelProps(), props);
|
|
15
|
-
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.h3, { ...mergedProps, ref });
|
|
16
16
|
});
|
|
17
17
|
TreeViewLabel.displayName = "TreeViewLabel";
|
|
18
18
|
|
|
@@ -2,6 +2,6 @@ import { HTMLProps, PolymorphicProps } from '../factory';
|
|
|
2
2
|
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
3
|
export interface TreeViewLabelBaseProps extends PolymorphicProps {
|
|
4
4
|
}
|
|
5
|
-
export interface TreeViewLabelProps extends HTMLProps<'
|
|
5
|
+
export interface TreeViewLabelProps extends HTMLProps<'h3'>, TreeViewLabelBaseProps {
|
|
6
6
|
}
|
|
7
|
-
export declare const TreeViewLabel: ForwardRefExoticComponent<TreeViewLabelProps & RefAttributes<
|
|
7
|
+
export declare const TreeViewLabel: ForwardRefExoticComponent<TreeViewLabelProps & RefAttributes<HTMLHeadingElement>>;
|
|
@@ -2,6 +2,6 @@ import { HTMLProps, PolymorphicProps } from '../factory';
|
|
|
2
2
|
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
3
|
export interface TreeViewLabelBaseProps extends PolymorphicProps {
|
|
4
4
|
}
|
|
5
|
-
export interface TreeViewLabelProps extends HTMLProps<'
|
|
5
|
+
export interface TreeViewLabelProps extends HTMLProps<'h3'>, TreeViewLabelBaseProps {
|
|
6
6
|
}
|
|
7
|
-
export declare const TreeViewLabel: ForwardRefExoticComponent<TreeViewLabelProps & RefAttributes<
|
|
7
|
+
export declare const TreeViewLabel: ForwardRefExoticComponent<TreeViewLabelProps & RefAttributes<HTMLHeadingElement>>;
|
|
@@ -8,7 +8,7 @@ import { useTreeViewContext } from './use-tree-view-context.js';
|
|
|
8
8
|
const TreeViewLabel = forwardRef((props, ref) => {
|
|
9
9
|
const treeView = useTreeViewContext();
|
|
10
10
|
const mergedProps = mergeProps(treeView.getLabelProps(), props);
|
|
11
|
-
return /* @__PURE__ */ jsx(ark.
|
|
11
|
+
return /* @__PURE__ */ jsx(ark.h3, { ...mergedProps, ref });
|
|
12
12
|
});
|
|
13
13
|
TreeViewLabel.displayName = "TreeViewLabel";
|
|
14
14
|
|
|
@@ -3,6 +3,6 @@ export interface TreeViewNodeProviderBaseProps<T> extends NodeProps {
|
|
|
3
3
|
node: T;
|
|
4
4
|
}
|
|
5
5
|
export interface TreeViewNodeProviderProps<T> extends TreeViewNodeProviderBaseProps<T> {
|
|
6
|
-
children?: React.ReactNode;
|
|
6
|
+
children?: React.ReactNode | undefined;
|
|
7
7
|
}
|
|
8
8
|
export declare function TreeViewNodeProvider<T>(props: TreeViewNodeProviderProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,6 +3,6 @@ export interface TreeViewNodeProviderBaseProps<T> extends NodeProps {
|
|
|
3
3
|
node: T;
|
|
4
4
|
}
|
|
5
5
|
export interface TreeViewNodeProviderProps<T> extends TreeViewNodeProviderBaseProps<T> {
|
|
6
|
-
children?: React.ReactNode;
|
|
6
|
+
children?: React.ReactNode | undefined;
|
|
7
7
|
}
|
|
8
8
|
export declare function TreeViewNodeProvider<T>(props: TreeViewNodeProviderProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { ExpandedChangeDetails, FocusChangeDetails, SelectionChangeDetails, LoadChildrenDetails, LoadChildrenCompleteDetails, } from '@zag-js/tree-view';
|
|
1
|
+
export type { ExpandedChangeDetails, FocusChangeDetails, SelectionChangeDetails, LoadChildrenDetails, LoadChildrenCompleteDetails, NodeState, NodeProps, } from '@zag-js/tree-view';
|
|
2
2
|
export { TreeViewBranch as Branch, type TreeViewBranchBaseProps as BranchBaseProps, type TreeViewBranchProps as BranchProps, } from './tree-view-branch';
|
|
3
3
|
export { TreeViewBranchContent as BranchContent, type TreeViewBranchContentBaseProps as BranchContentBaseProps, type TreeViewBranchContentProps as BranchContentProps, } from './tree-view-branch-content';
|
|
4
4
|
export { TreeViewBranchControl as BranchControl, type TreeViewBranchControlBaseProps as BranchControlBaseProps, type TreeViewBranchControlProps as BranchControlProps, } from './tree-view-branch-control';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { ExpandedChangeDetails, FocusChangeDetails, SelectionChangeDetails, LoadChildrenDetails, LoadChildrenCompleteDetails, } from '@zag-js/tree-view';
|
|
1
|
+
export type { ExpandedChangeDetails, FocusChangeDetails, SelectionChangeDetails, LoadChildrenDetails, LoadChildrenCompleteDetails, NodeState, NodeProps, } from '@zag-js/tree-view';
|
|
2
2
|
export { TreeViewBranch as Branch, type TreeViewBranchBaseProps as BranchBaseProps, type TreeViewBranchProps as BranchProps, } from './tree-view-branch';
|
|
3
3
|
export { TreeViewBranchContent as BranchContent, type TreeViewBranchContentBaseProps as BranchContentBaseProps, type TreeViewBranchContentProps as BranchContentProps, } from './tree-view-branch-content';
|
|
4
4
|
export { TreeViewBranchControl as BranchControl, type TreeViewBranchControlBaseProps as BranchControlBaseProps, type TreeViewBranchControlProps as BranchControlProps, } from './tree-view-branch-control';
|
package/dist/index.cjs
CHANGED
|
@@ -281,6 +281,7 @@ const hoverCardTrigger = require('./components/hover-card/hover-card-trigger.cjs
|
|
|
281
281
|
const useHoverCard = require('./components/hover-card/use-hover-card.cjs');
|
|
282
282
|
const useHoverCardContext = require('./components/hover-card/use-hover-card-context.cjs');
|
|
283
283
|
const hoverCard$1 = require('./components/hover-card/hover-card.cjs');
|
|
284
|
+
const listboxContext = require('./components/listbox/listbox-context.cjs');
|
|
284
285
|
const listboxContent = require('./components/listbox/listbox-content.cjs');
|
|
285
286
|
const listboxInput = require('./components/listbox/listbox-input.cjs');
|
|
286
287
|
const listboxItem = require('./components/listbox/listbox-item.cjs');
|
|
@@ -1001,6 +1002,7 @@ exports.HoverCardTrigger = hoverCardTrigger.HoverCardTrigger;
|
|
|
1001
1002
|
exports.useHoverCard = useHoverCard.useHoverCard;
|
|
1002
1003
|
exports.useHoverCardContext = useHoverCardContext.useHoverCardContext;
|
|
1003
1004
|
exports.HoverCard = hoverCard$1;
|
|
1005
|
+
exports.ListboxContext = listboxContext.ListboxContext;
|
|
1004
1006
|
exports.ListboxContent = listboxContent.ListboxContent;
|
|
1005
1007
|
exports.ListboxInput = listboxInput.ListboxInput;
|
|
1006
1008
|
exports.ListboxItem = listboxItem.ListboxItem;
|
package/dist/index.js
CHANGED
|
@@ -295,6 +295,7 @@ export { useHoverCard } from './components/hover-card/use-hover-card.js';
|
|
|
295
295
|
export { useHoverCardContext } from './components/hover-card/use-hover-card-context.js';
|
|
296
296
|
import * as hoverCard from './components/hover-card/hover-card.js';
|
|
297
297
|
export { hoverCard as HoverCard };
|
|
298
|
+
export { ListboxContext } from './components/listbox/listbox-context.js';
|
|
298
299
|
export { ListboxContent } from './components/listbox/listbox-content.js';
|
|
299
300
|
export { ListboxInput } from './components/listbox/listbox-input.js';
|
|
300
301
|
export { ListboxItem } from './components/listbox/listbox-item.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { RootNode } from './use-environment-context';
|
|
3
3
|
export interface EnvironmentProviderProps {
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
value?: RootNode | (() => RootNode);
|
|
4
|
+
children?: ReactNode | undefined;
|
|
5
|
+
value?: RootNode | (() => RootNode) | undefined;
|
|
6
6
|
}
|
|
7
7
|
export declare const EnvironmentProvider: (props: EnvironmentProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { RootNode } from './use-environment-context';
|
|
3
3
|
export interface EnvironmentProviderProps {
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
value?: RootNode | (() => RootNode);
|
|
4
|
+
children?: ReactNode | undefined;
|
|
5
|
+
value?: RootNode | (() => RootNode) | undefined;
|
|
6
6
|
}
|
|
7
7
|
export declare const EnvironmentProvider: (props: EnvironmentProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
interface CreateContextOptions<T> {
|
|
2
|
-
strict?: boolean;
|
|
3
|
-
hookName?: string;
|
|
4
|
-
providerName?: string;
|
|
5
|
-
errorMessage?: string;
|
|
6
|
-
name?: string;
|
|
7
|
-
defaultValue?: T;
|
|
2
|
+
strict?: boolean | undefined;
|
|
3
|
+
hookName?: string | undefined;
|
|
4
|
+
providerName?: string | undefined;
|
|
5
|
+
errorMessage?: string | undefined;
|
|
6
|
+
name?: string | undefined;
|
|
7
|
+
defaultValue?: T | undefined;
|
|
8
8
|
}
|
|
9
9
|
type CreateContextReturn<T> = [React.Provider<T>, () => T, React.Context<T>];
|
|
10
10
|
export declare function createContext<T>(options?: CreateContextOptions<T>): CreateContextReturn<T>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
interface CreateContextOptions<T> {
|
|
2
|
-
strict?: boolean;
|
|
3
|
-
hookName?: string;
|
|
4
|
-
providerName?: string;
|
|
5
|
-
errorMessage?: string;
|
|
6
|
-
name?: string;
|
|
7
|
-
defaultValue?: T;
|
|
2
|
+
strict?: boolean | undefined;
|
|
3
|
+
hookName?: string | undefined;
|
|
4
|
+
providerName?: string | undefined;
|
|
5
|
+
errorMessage?: string | undefined;
|
|
6
|
+
name?: string | undefined;
|
|
7
|
+
defaultValue?: T | undefined;
|
|
8
8
|
}
|
|
9
9
|
type CreateContextReturn<T> = [React.Provider<T>, () => T, React.Context<T>];
|
|
10
10
|
export declare function createContext<T>(options?: CreateContextOptions<T>): CreateContextReturn<T>;
|
|
@@ -4,12 +4,12 @@ export interface RenderStrategyProps {
|
|
|
4
4
|
* Whether to enable lazy mounting
|
|
5
5
|
* @default false
|
|
6
6
|
*/
|
|
7
|
-
lazyMount?: boolean;
|
|
7
|
+
lazyMount?: boolean | undefined;
|
|
8
8
|
/**
|
|
9
9
|
* Whether to unmount on exit.
|
|
10
10
|
* @default false
|
|
11
11
|
*/
|
|
12
|
-
unmountOnExit?: boolean;
|
|
12
|
+
unmountOnExit?: boolean | undefined;
|
|
13
13
|
}
|
|
14
14
|
export declare const RenderStrategyPropsProvider: Provider<RenderStrategyProps>, useRenderStrategyPropsContext: () => RenderStrategyProps;
|
|
15
15
|
export declare const splitRenderStrategyProps: <T extends RenderStrategyProps>(props: T) => [RenderStrategyProps, Omit<T, "lazyMount" | "unmountOnExit">];
|