@ark-ui/react 5.13.0 → 5.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/components/date-picker/date-picker-range-text.cjs +6 -1
  2. package/dist/components/date-picker/date-picker-range-text.js +7 -2
  3. package/dist/components/index.cjs +2 -0
  4. package/dist/components/index.js +1 -0
  5. package/dist/components/listbox/index.cjs +2 -0
  6. package/dist/components/listbox/index.d.cts +1 -0
  7. package/dist/components/listbox/index.d.ts +1 -0
  8. package/dist/components/listbox/index.js +1 -0
  9. package/dist/components/listbox/listbox-context.cjs +10 -0
  10. package/dist/components/listbox/listbox-context.js +6 -0
  11. package/dist/components/listbox/listbox.cjs +2 -0
  12. package/dist/components/listbox/listbox.d.cts +1 -0
  13. package/dist/components/listbox/listbox.d.ts +1 -0
  14. package/dist/components/listbox/listbox.js +1 -0
  15. package/dist/components/menu/menu-checkbox-item.cjs +1 -1
  16. package/dist/components/menu/menu-checkbox-item.js +2 -2
  17. package/dist/components/menu/menu-item-indicator.cjs +2 -2
  18. package/dist/components/menu/menu-item-indicator.js +3 -3
  19. package/dist/components/menu/menu-item-text.cjs +2 -2
  20. package/dist/components/menu/menu-item-text.js +3 -3
  21. package/dist/components/menu/menu-item.cjs +2 -1
  22. package/dist/components/menu/menu-item.js +2 -1
  23. package/dist/components/menu/menu-radio-item.cjs +1 -1
  24. package/dist/components/menu/menu-radio-item.js +2 -2
  25. package/dist/components/menu/use-menu-option-item-props-context.cjs +6 -6
  26. package/dist/components/menu/use-menu-option-item-props-context.d.cts +2 -2
  27. package/dist/components/menu/use-menu-option-item-props-context.d.ts +2 -2
  28. package/dist/components/menu/use-menu-option-item-props-context.js +5 -5
  29. package/dist/components/tree-view/tree-view-label.cjs +1 -1
  30. package/dist/components/tree-view/tree-view-label.d.cts +2 -2
  31. package/dist/components/tree-view/tree-view-label.d.ts +2 -2
  32. package/dist/components/tree-view/tree-view-label.js +1 -1
  33. package/dist/index.cjs +2 -0
  34. package/dist/index.js +1 -0
  35. package/package.json +72 -84
@@ -5,6 +5,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
5
 
6
6
  const jsxRuntime = require('react/jsx-runtime');
7
7
  const react$1 = require('@zag-js/react');
8
+ const utils = require('@zag-js/utils');
8
9
  const react = require('react');
9
10
  const factory = require('../factory.cjs');
10
11
  const useDatePickerContext = require('./use-date-picker-context.cjs');
@@ -12,7 +13,11 @@ const useDatePickerContext = require('./use-date-picker-context.cjs');
12
13
  const DatePickerRangeText = react.forwardRef((props, ref) => {
13
14
  const datePicker = useDatePickerContext.useDatePickerContext();
14
15
  const mergedProps = react$1.mergeProps(datePicker.getRangeTextProps(), props);
15
- return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref, children: datePicker.visibleRangeText.start });
16
+ const visibleRangeText = react.useMemo(() => {
17
+ const { start, end } = datePicker.visibleRangeText;
18
+ return utils.uniq([start, end]).filter(Boolean).join(" - ");
19
+ }, [datePicker.visibleRangeText]);
20
+ return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref, children: visibleRangeText });
16
21
  });
17
22
  DatePickerRangeText.displayName = "DatePickerRangeText";
18
23
 
@@ -1,14 +1,19 @@
1
1
  'use client';
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
  import { mergeProps } from '@zag-js/react';
4
- import { forwardRef } from 'react';
4
+ import { uniq } from '@zag-js/utils';
5
+ import { forwardRef, useMemo } from 'react';
5
6
  import { ark } from '../factory.js';
6
7
  import { useDatePickerContext } from './use-date-picker-context.js';
7
8
 
8
9
  const DatePickerRangeText = forwardRef((props, ref) => {
9
10
  const datePicker = useDatePickerContext();
10
11
  const mergedProps = mergeProps(datePicker.getRangeTextProps(), props);
11
- return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref, children: datePicker.visibleRangeText.start });
12
+ const visibleRangeText = useMemo(() => {
13
+ const { start, end } = datePicker.visibleRangeText;
14
+ return uniq([start, end]).filter(Boolean).join(" - ");
15
+ }, [datePicker.visibleRangeText]);
16
+ return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref, children: visibleRangeText });
12
17
  });
13
18
  DatePickerRangeText.displayName = "DatePickerRangeText";
14
19
 
@@ -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;
@@ -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;
@@ -0,0 +1,6 @@
1
+ 'use client';
2
+ import { useListboxContext } from './use-listbox-context.js';
3
+
4
+ const ListboxContext = (props) => props.children(useListboxContext());
5
+
6
+ export { ListboxContext };
@@ -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';
@@ -1,3 +1,4 @@
1
+ export { ListboxContext as Context } from './listbox-context.js';
1
2
  export { ListboxContent as Content } from './listbox-content.js';
2
3
  export { ListboxInput as Input } from './listbox-input.js';
3
4
  export { ListboxItem as Item } from './listbox-item.js';
@@ -28,7 +28,7 @@ const MenuCheckboxItem = react.forwardRef((props, ref) => {
28
28
  const menu = useMenuContext.useMenuContext();
29
29
  const mergedProps = react$1.mergeProps(menu.getOptionItemProps(optionItemProps), localProps);
30
30
  const optionItemState = menu.getOptionItemState(optionItemProps);
31
- return /* @__PURE__ */ jsxRuntime.jsx(useMenuOptionItemPropsContext.MenuOptionItemPropsProvider, { value: optionItemProps, children: /* @__PURE__ */ jsxRuntime.jsx(useMenuItemContext.MenuItemProvider, { value: optionItemState, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref }) }) });
31
+ return /* @__PURE__ */ jsxRuntime.jsx(useMenuOptionItemPropsContext.MenuItemPropsProvider, { value: optionItemProps, children: /* @__PURE__ */ jsxRuntime.jsx(useMenuItemContext.MenuItemProvider, { value: optionItemState, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref }) }) });
32
32
  });
33
33
  MenuCheckboxItem.displayName = "MenuCheckboxItem";
34
34
 
@@ -6,7 +6,7 @@ import { createSplitProps } from '../../utils/create-split-props.js';
6
6
  import { ark } from '../factory.js';
7
7
  import { useMenuContext } from './use-menu-context.js';
8
8
  import { MenuItemProvider } from './use-menu-item-context.js';
9
- import { MenuOptionItemPropsProvider } from './use-menu-option-item-props-context.js';
9
+ import { MenuItemPropsProvider } from './use-menu-option-item-props-context.js';
10
10
 
11
11
  const MenuCheckboxItem = forwardRef((props, ref) => {
12
12
  const [partialOptionItemProps, localProps] = createSplitProps()(props, [
@@ -24,7 +24,7 @@ const MenuCheckboxItem = forwardRef((props, ref) => {
24
24
  const menu = useMenuContext();
25
25
  const mergedProps = mergeProps(menu.getOptionItemProps(optionItemProps), localProps);
26
26
  const optionItemState = menu.getOptionItemState(optionItemProps);
27
- return /* @__PURE__ */ jsx(MenuOptionItemPropsProvider, { value: optionItemProps, children: /* @__PURE__ */ jsx(MenuItemProvider, { value: optionItemState, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) }) });
27
+ return /* @__PURE__ */ jsx(MenuItemPropsProvider, { value: optionItemProps, children: /* @__PURE__ */ jsx(MenuItemProvider, { value: optionItemState, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) }) });
28
28
  });
29
29
  MenuCheckboxItem.displayName = "MenuCheckboxItem";
30
30
 
@@ -12,8 +12,8 @@ const useMenuOptionItemPropsContext = require('./use-menu-option-item-props-cont
12
12
 
13
13
  const MenuItemIndicator = react.forwardRef((props, ref) => {
14
14
  const menu = useMenuContext.useMenuContext();
15
- const optionItemProps = useMenuOptionItemPropsContext.useMenuOptionItemPropsContext();
16
- const mergedProps = react$1.mergeProps(menu.getItemIndicatorProps(optionItemProps), props);
15
+ const itemProps = useMenuOptionItemPropsContext.useMenuItemPropsContext();
16
+ const mergedProps = react$1.mergeProps(menu.getItemIndicatorProps(itemProps), props);
17
17
  return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
18
18
  });
19
19
  MenuItemIndicator.displayName = "MenuItemIndicator";
@@ -4,12 +4,12 @@ import { mergeProps } from '@zag-js/react';
4
4
  import { forwardRef } from 'react';
5
5
  import { ark } from '../factory.js';
6
6
  import { useMenuContext } from './use-menu-context.js';
7
- import { useMenuOptionItemPropsContext } from './use-menu-option-item-props-context.js';
7
+ import { useMenuItemPropsContext } from './use-menu-option-item-props-context.js';
8
8
 
9
9
  const MenuItemIndicator = forwardRef((props, ref) => {
10
10
  const menu = useMenuContext();
11
- const optionItemProps = useMenuOptionItemPropsContext();
12
- const mergedProps = mergeProps(menu.getItemIndicatorProps(optionItemProps), props);
11
+ const itemProps = useMenuItemPropsContext();
12
+ const mergedProps = mergeProps(menu.getItemIndicatorProps(itemProps), props);
13
13
  return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
14
14
  });
15
15
  MenuItemIndicator.displayName = "MenuItemIndicator";
@@ -12,8 +12,8 @@ const useMenuOptionItemPropsContext = require('./use-menu-option-item-props-cont
12
12
 
13
13
  const MenuItemText = react.forwardRef((props, ref) => {
14
14
  const menu = useMenuContext.useMenuContext();
15
- const optionItemProps = useMenuOptionItemPropsContext.useMenuOptionItemPropsContext();
16
- const mergedProps = react$1.mergeProps(menu.getItemTextProps(optionItemProps), props);
15
+ const itemProps = useMenuOptionItemPropsContext.useMenuItemPropsContext();
16
+ const mergedProps = react$1.mergeProps(menu.getItemTextProps(itemProps), props);
17
17
  return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
18
18
  });
19
19
  MenuItemText.displayName = "MenuItemText";
@@ -4,12 +4,12 @@ import { mergeProps } from '@zag-js/react';
4
4
  import { forwardRef } from 'react';
5
5
  import { ark } from '../factory.js';
6
6
  import { useMenuContext } from './use-menu-context.js';
7
- import { useMenuOptionItemPropsContext } from './use-menu-option-item-props-context.js';
7
+ import { useMenuItemPropsContext } from './use-menu-option-item-props-context.js';
8
8
 
9
9
  const MenuItemText = forwardRef((props, ref) => {
10
10
  const menu = useMenuContext();
11
- const optionItemProps = useMenuOptionItemPropsContext();
12
- const mergedProps = mergeProps(menu.getItemTextProps(optionItemProps), props);
11
+ const itemProps = useMenuItemPropsContext();
12
+ const mergedProps = mergeProps(menu.getItemTextProps(itemProps), props);
13
13
  return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
14
14
  });
15
15
  MenuItemText.displayName = "MenuItemText";
@@ -10,6 +10,7 @@ const createSplitProps = require('../../utils/create-split-props.cjs');
10
10
  const factory = require('../factory.cjs');
11
11
  const useMenuContext = require('./use-menu-context.cjs');
12
12
  const useMenuItemContext = require('./use-menu-item-context.cjs');
13
+ const useMenuOptionItemPropsContext = require('./use-menu-option-item-props-context.cjs');
13
14
 
14
15
  const MenuItem = react.forwardRef((props, ref) => {
15
16
  const [itemProps, localProps] = createSplitProps.createSplitProps()(props, [
@@ -25,7 +26,7 @@ const MenuItem = react.forwardRef((props, ref) => {
25
26
  react.useEffect(() => {
26
27
  return menu.addItemListener({ id: itemState.id, onSelect: itemProps.onSelect });
27
28
  }, [itemState.id, itemProps.onSelect]);
28
- return /* @__PURE__ */ jsxRuntime.jsx(useMenuItemContext.MenuItemProvider, { value: itemState, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref }) });
29
+ return /* @__PURE__ */ jsxRuntime.jsx(useMenuOptionItemPropsContext.MenuItemPropsProvider, { value: itemProps, children: /* @__PURE__ */ jsxRuntime.jsx(useMenuItemContext.MenuItemProvider, { value: itemState, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref }) }) });
29
30
  });
30
31
  MenuItem.displayName = "MenuItem";
31
32
 
@@ -6,6 +6,7 @@ import { createSplitProps } from '../../utils/create-split-props.js';
6
6
  import { ark } from '../factory.js';
7
7
  import { useMenuContext } from './use-menu-context.js';
8
8
  import { MenuItemProvider } from './use-menu-item-context.js';
9
+ import { MenuItemPropsProvider } from './use-menu-option-item-props-context.js';
9
10
 
10
11
  const MenuItem = forwardRef((props, ref) => {
11
12
  const [itemProps, localProps] = createSplitProps()(props, [
@@ -21,7 +22,7 @@ const MenuItem = forwardRef((props, ref) => {
21
22
  useEffect(() => {
22
23
  return menu.addItemListener({ id: itemState.id, onSelect: itemProps.onSelect });
23
24
  }, [itemState.id, itemProps.onSelect]);
24
- return /* @__PURE__ */ jsx(MenuItemProvider, { value: itemState, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) });
25
+ return /* @__PURE__ */ jsx(MenuItemPropsProvider, { value: itemProps, children: /* @__PURE__ */ jsx(MenuItemProvider, { value: itemState, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) }) });
25
26
  });
26
27
  MenuItem.displayName = "MenuItem";
27
28
 
@@ -30,7 +30,7 @@ const MenuRadioItem = react.forwardRef((props, ref) => {
30
30
  };
31
31
  const mergedProps = react$1.mergeProps(menu.getOptionItemProps(optionItemProps), localProps);
32
32
  const optionItemState = menu.getOptionItemState(optionItemProps);
33
- return /* @__PURE__ */ jsxRuntime.jsx(useMenuOptionItemPropsContext.MenuOptionItemPropsProvider, { value: optionItemProps, children: /* @__PURE__ */ jsxRuntime.jsx(useMenuItemContext.MenuItemProvider, { value: optionItemState, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref }) }) });
33
+ return /* @__PURE__ */ jsxRuntime.jsx(useMenuOptionItemPropsContext.MenuItemPropsProvider, { value: optionItemProps, children: /* @__PURE__ */ jsxRuntime.jsx(useMenuItemContext.MenuItemProvider, { value: optionItemState, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref }) }) });
34
34
  });
35
35
  MenuRadioItem.displayName = "MenuRadioItem";
36
36
 
@@ -7,7 +7,7 @@ import { ark } from '../factory.js';
7
7
  import { useMenuContext } from './use-menu-context.js';
8
8
  import { MenuItemProvider } from './use-menu-item-context.js';
9
9
  import { useMenuItemGroupContext } from './use-menu-item-group-context.js';
10
- import { MenuOptionItemPropsProvider } from './use-menu-option-item-props-context.js';
10
+ import { MenuItemPropsProvider } from './use-menu-option-item-props-context.js';
11
11
 
12
12
  const MenuRadioItem = forwardRef((props, ref) => {
13
13
  const [partialItemProps, localProps] = createSplitProps()(props, [
@@ -26,7 +26,7 @@ const MenuRadioItem = forwardRef((props, ref) => {
26
26
  };
27
27
  const mergedProps = mergeProps(menu.getOptionItemProps(optionItemProps), localProps);
28
28
  const optionItemState = menu.getOptionItemState(optionItemProps);
29
- return /* @__PURE__ */ jsx(MenuOptionItemPropsProvider, { value: optionItemProps, children: /* @__PURE__ */ jsx(MenuItemProvider, { value: optionItemState, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) }) });
29
+ return /* @__PURE__ */ jsx(MenuItemPropsProvider, { value: optionItemProps, children: /* @__PURE__ */ jsx(MenuItemProvider, { value: optionItemState, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) }) });
30
30
  });
31
31
  MenuRadioItem.displayName = "MenuRadioItem";
32
32
 
@@ -5,11 +5,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
5
 
6
6
  const createContext = require('../../utils/create-context.cjs');
7
7
 
8
- const [MenuOptionItemPropsProvider, useMenuOptionItemPropsContext] = createContext.createContext({
9
- name: "MenuOptionItemPropsContext",
10
- hookName: "useMenuOptionItemPropsContext",
11
- providerName: "<MenuOptionItemPropsProvider />"
8
+ const [MenuItemPropsProvider, useMenuItemPropsContext] = createContext.createContext({
9
+ name: "MenuItemPropsContext",
10
+ hookName: "useMenuItemPropsContext",
11
+ providerName: "<MenuItemPropsProvider />"
12
12
  });
13
13
 
14
- exports.MenuOptionItemPropsProvider = MenuOptionItemPropsProvider;
15
- exports.useMenuOptionItemPropsContext = useMenuOptionItemPropsContext;
14
+ exports.MenuItemPropsProvider = MenuItemPropsProvider;
15
+ exports.useMenuItemPropsContext = useMenuItemPropsContext;
@@ -1,3 +1,3 @@
1
- import { OptionItemProps } from '@zag-js/menu';
1
+ import { ItemBaseProps } from '@zag-js/menu';
2
2
  import { Provider } from 'react';
3
- export declare const MenuOptionItemPropsProvider: Provider<OptionItemProps>, useMenuOptionItemPropsContext: () => OptionItemProps;
3
+ export declare const MenuItemPropsProvider: Provider<ItemBaseProps>, useMenuItemPropsContext: () => ItemBaseProps;
@@ -1,3 +1,3 @@
1
- import { OptionItemProps } from '@zag-js/menu';
1
+ import { ItemBaseProps } from '@zag-js/menu';
2
2
  import { Provider } from 'react';
3
- export declare const MenuOptionItemPropsProvider: Provider<OptionItemProps>, useMenuOptionItemPropsContext: () => OptionItemProps;
3
+ export declare const MenuItemPropsProvider: Provider<ItemBaseProps>, useMenuItemPropsContext: () => ItemBaseProps;
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
  import { createContext } from '../../utils/create-context.js';
3
3
 
4
- const [MenuOptionItemPropsProvider, useMenuOptionItemPropsContext] = createContext({
5
- name: "MenuOptionItemPropsContext",
6
- hookName: "useMenuOptionItemPropsContext",
7
- providerName: "<MenuOptionItemPropsProvider />"
4
+ const [MenuItemPropsProvider, useMenuItemPropsContext] = createContext({
5
+ name: "MenuItemPropsContext",
6
+ hookName: "useMenuItemPropsContext",
7
+ providerName: "<MenuItemPropsProvider />"
8
8
  });
9
9
 
10
- export { MenuOptionItemPropsProvider, useMenuOptionItemPropsContext };
10
+ export { MenuItemPropsProvider, useMenuItemPropsContext };
@@ -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.label, { ...mergedProps, ref });
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<'label'>, TreeViewLabelBaseProps {
5
+ export interface TreeViewLabelProps extends HTMLProps<'h3'>, TreeViewLabelBaseProps {
6
6
  }
7
- export declare const TreeViewLabel: ForwardRefExoticComponent<TreeViewLabelProps & RefAttributes<HTMLLabelElement>>;
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<'label'>, TreeViewLabelBaseProps {
5
+ export interface TreeViewLabelProps extends HTMLProps<'h3'>, TreeViewLabelBaseProps {
6
6
  }
7
- export declare const TreeViewLabel: ForwardRefExoticComponent<TreeViewLabelProps & RefAttributes<HTMLLabelElement>>;
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.label, { ...mergedProps, ref });
11
+ return /* @__PURE__ */ jsx(ark.h3, { ...mergedProps, ref });
12
12
  });
13
13
  TreeViewLabel.displayName = "TreeViewLabel";
14
14
 
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';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ark-ui/react",
3
3
  "type": "module",
4
- "version": "5.13.0",
4
+ "version": "5.14.1",
5
5
  "description": "A collection of unstyled, accessible UI components for React, utilizing state machines for seamless interaction.",
6
6
  "keywords": [
7
7
  "accordion",
@@ -80,16 +80,6 @@
80
80
  "default": "./dist/components/anatomy.cjs"
81
81
  }
82
82
  },
83
- "./collection": {
84
- "import": {
85
- "types": "./dist/components/collection.d.ts",
86
- "default": "./dist/components/collection.js"
87
- },
88
- "require": {
89
- "types": "./dist/components/collection.d.cts",
90
- "default": "./dist/components/collection.cjs"
91
- }
92
- },
93
83
  "./factory": {
94
84
  "import": {
95
85
  "types": "./dist/components/factory.d.ts",
@@ -150,96 +140,94 @@
150
140
  },
151
141
  "sideEffects": false,
152
142
  "dependencies": {
153
- "@internationalized/date": "3.8.1",
154
- "@zag-js/accordion": "1.15.0",
155
- "@zag-js/angle-slider": "1.15.0",
156
- "@zag-js/anatomy": "1.15.0",
157
- "@zag-js/auto-resize": "1.15.0",
158
- "@zag-js/avatar": "1.15.0",
159
- "@zag-js/carousel": "1.15.0",
160
- "@zag-js/checkbox": "1.15.0",
161
- "@zag-js/clipboard": "1.15.0",
162
- "@zag-js/collapsible": "1.15.0",
163
- "@zag-js/collection": "1.15.0",
164
- "@zag-js/color-picker": "1.15.0",
165
- "@zag-js/color-utils": "1.15.0",
166
- "@zag-js/combobox": "1.15.0",
167
- "@zag-js/core": "1.15.0",
168
- "@zag-js/date-picker": "1.15.0",
169
- "@zag-js/date-utils": "1.15.0",
170
- "@zag-js/dialog": "1.15.0",
171
- "@zag-js/dom-query": "1.15.0",
172
- "@zag-js/editable": "1.15.0",
173
- "@zag-js/file-upload": "1.15.0",
174
- "@zag-js/file-utils": "1.15.0",
175
- "@zag-js/focus-trap": "1.15.0",
176
- "@zag-js/floating-panel": "1.15.0",
177
- "@zag-js/highlight-word": "1.15.0",
178
- "@zag-js/hover-card": "1.15.0",
179
- "@zag-js/i18n-utils": "1.15.0",
180
- "@zag-js/listbox": "1.15.0",
181
- "@zag-js/menu": "1.15.0",
182
- "@zag-js/number-input": "1.15.0",
183
- "@zag-js/pagination": "1.15.0",
184
- "@zag-js/password-input": "1.15.0",
185
- "@zag-js/pin-input": "1.15.0",
186
- "@zag-js/popover": "1.15.0",
187
- "@zag-js/presence": "1.15.0",
188
- "@zag-js/progress": "1.15.0",
189
- "@zag-js/qr-code": "1.15.0",
190
- "@zag-js/radio-group": "1.15.0",
191
- "@zag-js/rating-group": "1.15.0",
192
- "@zag-js/react": "1.15.0",
193
- "@zag-js/select": "1.15.0",
194
- "@zag-js/signature-pad": "1.15.0",
195
- "@zag-js/slider": "1.15.0",
196
- "@zag-js/splitter": "1.15.0",
197
- "@zag-js/steps": "1.15.0",
198
- "@zag-js/switch": "1.15.0",
199
- "@zag-js/tabs": "1.15.0",
200
- "@zag-js/tags-input": "1.15.0",
201
- "@zag-js/time-picker": "1.15.0",
202
- "@zag-js/timer": "1.15.0",
203
- "@zag-js/toast": "1.15.0",
204
- "@zag-js/toggle": "1.15.0",
205
- "@zag-js/toggle-group": "1.15.0",
206
- "@zag-js/tooltip": "1.15.0",
207
- "@zag-js/tour": "1.15.0",
208
- "@zag-js/tree-view": "1.15.0",
209
- "@zag-js/types": "1.15.0",
210
- "@zag-js/utils": "1.15.0"
143
+ "@internationalized/date": "3.8.2",
144
+ "@zag-js/accordion": "1.15.5",
145
+ "@zag-js/angle-slider": "1.15.5",
146
+ "@zag-js/anatomy": "1.15.5",
147
+ "@zag-js/auto-resize": "1.15.5",
148
+ "@zag-js/avatar": "1.15.5",
149
+ "@zag-js/carousel": "1.15.5",
150
+ "@zag-js/checkbox": "1.15.5",
151
+ "@zag-js/clipboard": "1.15.5",
152
+ "@zag-js/collapsible": "1.15.5",
153
+ "@zag-js/collection": "1.15.5",
154
+ "@zag-js/color-picker": "1.15.5",
155
+ "@zag-js/color-utils": "1.15.5",
156
+ "@zag-js/combobox": "1.15.5",
157
+ "@zag-js/core": "1.15.5",
158
+ "@zag-js/date-picker": "1.15.5",
159
+ "@zag-js/date-utils": "1.15.5",
160
+ "@zag-js/dialog": "1.15.5",
161
+ "@zag-js/dom-query": "1.15.5",
162
+ "@zag-js/editable": "1.15.5",
163
+ "@zag-js/file-upload": "1.15.5",
164
+ "@zag-js/file-utils": "1.15.5",
165
+ "@zag-js/focus-trap": "1.15.5",
166
+ "@zag-js/floating-panel": "1.15.5",
167
+ "@zag-js/highlight-word": "1.15.5",
168
+ "@zag-js/hover-card": "1.15.5",
169
+ "@zag-js/i18n-utils": "1.15.5",
170
+ "@zag-js/listbox": "1.15.5",
171
+ "@zag-js/menu": "1.15.5",
172
+ "@zag-js/number-input": "1.15.5",
173
+ "@zag-js/pagination": "1.15.5",
174
+ "@zag-js/password-input": "1.15.5",
175
+ "@zag-js/pin-input": "1.15.5",
176
+ "@zag-js/popover": "1.15.5",
177
+ "@zag-js/presence": "1.15.5",
178
+ "@zag-js/progress": "1.15.5",
179
+ "@zag-js/qr-code": "1.15.5",
180
+ "@zag-js/radio-group": "1.15.5",
181
+ "@zag-js/rating-group": "1.15.5",
182
+ "@zag-js/react": "1.15.5",
183
+ "@zag-js/select": "1.15.5",
184
+ "@zag-js/signature-pad": "1.15.5",
185
+ "@zag-js/slider": "1.15.5",
186
+ "@zag-js/splitter": "1.15.5",
187
+ "@zag-js/steps": "1.15.5",
188
+ "@zag-js/switch": "1.15.5",
189
+ "@zag-js/tabs": "1.15.5",
190
+ "@zag-js/tags-input": "1.15.5",
191
+ "@zag-js/time-picker": "1.15.5",
192
+ "@zag-js/timer": "1.15.5",
193
+ "@zag-js/toast": "1.15.5",
194
+ "@zag-js/toggle": "1.15.5",
195
+ "@zag-js/toggle-group": "1.15.5",
196
+ "@zag-js/tooltip": "1.15.5",
197
+ "@zag-js/tour": "1.15.5",
198
+ "@zag-js/tree-view": "1.15.5",
199
+ "@zag-js/types": "1.15.5",
200
+ "@zag-js/utils": "1.15.5"
211
201
  },
212
202
  "devDependencies": {
213
203
  "@biomejs/biome": "1.9.4",
214
- "@storybook/addon-a11y": "8.6.12",
215
- "@storybook/addon-essentials": "8.6.12",
216
- "@storybook/react": "8.6.12",
217
- "@storybook/react-vite": "8.6.12",
204
+ "@storybook/addon-a11y": "9.0.10",
205
+ "@storybook/react-vite": "9.0.10",
218
206
  "@testing-library/dom": "10.4.0",
219
207
  "@testing-library/jest-dom": "6.6.3",
220
208
  "@testing-library/react": "16.3.0",
221
209
  "@testing-library/user-event": "14.6.1",
222
210
  "@types/jsdom": "21.1.7",
223
- "@types/react": "19.1.6",
224
- "@types/react-dom": "19.1.5",
225
- "@vitejs/plugin-react": "4.5.0",
226
- "@zag-js/stringify-state": "1.15.0",
211
+ "@types/react": "19.1.8",
212
+ "@types/react-dom": "19.1.6",
213
+ "@vitejs/plugin-react": "4.5.2",
214
+ "@zag-js/stringify-state": "1.15.5",
227
215
  "clean-package": "2.2.0",
228
216
  "globby": "14.1.0",
229
- "happy-dom": "17.4.6",
230
- "lucide-react": "0.507.0",
217
+ "happy-dom": "18.0.1",
218
+ "lucide-react": "0.515.0",
231
219
  "react": "19.1.0",
232
220
  "react-dom": "19.1.0",
233
221
  "react-shadow": "20.6.0",
234
222
  "react-frame-component": "5.2.7",
235
- "react-hook-form": "7.56.2",
223
+ "react-hook-form": "7.57.0",
236
224
  "resize-observer-polyfill": "1.5.1",
237
- "storybook": "8.6.12",
225
+ "storybook": "9.0.10",
238
226
  "typescript": "5.8.3",
239
227
  "vite": "6.3.5",
240
- "vite-plugin-dts": "4.5.3",
241
- "vitest": "3.1.2",
242
- "@vitest/coverage-v8": "3.1.2",
228
+ "vite-plugin-dts": "4.5.4",
229
+ "vitest": "3.2.3",
230
+ "@vitest/coverage-v8": "3.2.3",
243
231
  "vitest-axe": "1.0.0-pre.5"
244
232
  },
245
233
  "peerDependencies": {