@ark-ui/react 1.2.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/CHANGELOG.md +24 -1
  2. package/README.md +1 -0
  3. package/accordion/index.d.ts +2 -1
  4. package/accordion/{accordion.stories.d.ts → stories/accordion.stories.d.ts} +1 -1
  5. package/avatar/index.d.ts +2 -1
  6. package/avatar/{avatar.stories.d.ts → stories/avatar.stories.d.ts} +1 -1
  7. package/carousel/index.d.ts +2 -1
  8. package/carousel/{carousel.stories.d.ts → stories/carousel.stories.d.ts} +1 -1
  9. package/checkbox/index.d.ts +2 -2
  10. package/checkbox/{checkbox.stories.d.ts → stories/checkbox.stories.d.ts} +1 -1
  11. package/color-picker/index.d.ts +2 -2
  12. package/color-picker/{color-picker.stories.d.ts → stories/color-picker.stories.d.ts} +1 -1
  13. package/combobox/index.d.ts +2 -1
  14. package/combobox/{combobox.stories.d.ts → stories/combobox.stories.d.ts} +1 -1
  15. package/date-picker/index.d.ts +2 -1
  16. package/date-picker/{date-picker.stories.d.ts → stories/date-picker.stories.d.ts} +1 -2
  17. package/date-picker/stories/date-range-picker.stories.d.ts +8 -0
  18. package/dialog/index.d.ts +3 -2
  19. package/dialog/{dialog.stories.d.ts → stories/dialog.stories.d.ts} +1 -1
  20. package/editable/index.d.ts +2 -1
  21. package/editable/{editable.stories.d.ts → stories/editable.stories.d.ts} +1 -1
  22. package/environment/{environment.stories.d.ts → stories/environment.stories.d.ts} +1 -1
  23. package/file-upload/index.d.ts +2 -1
  24. package/file-upload/{file-upload.stories.d.ts → stories/file-upload.stories.d.ts} +1 -1
  25. package/hover-card/index.d.ts +2 -1
  26. package/hover-card/{hover-card.stories.d.ts → stories/hover-card.stories.d.ts} +1 -1
  27. package/index.cjs +44 -24
  28. package/index.d.ts +1 -0
  29. package/index.mjs +10 -0
  30. package/menu/index.d.ts +2 -1
  31. package/menu/stories/context-menu.stories.d.ts +7 -0
  32. package/menu/{menu.stories.d.ts → stories/menu.stories.d.ts} +1 -4
  33. package/menu/stories/nested-menu.stories.d.ts +8 -0
  34. package/number-input/index.d.ts +2 -1
  35. package/number-input/{number-input.stories.d.ts → stories/number-input.stories.d.ts} +1 -1
  36. package/package.json +60 -53
  37. package/pagination/index.d.ts +2 -1
  38. package/pagination/{pagination.stories.d.ts → stories/pagination.stories.d.ts} +1 -1
  39. package/pin-input/index.d.ts +2 -1
  40. package/pin-input/{pin-input.stories.d.ts → stories/pin-input.stories.d.ts} +1 -1
  41. package/popover/index.d.ts +2 -1
  42. package/popover/popover-description.d.ts +1 -1
  43. package/popover/{popover.stories.d.ts → stories/popover.stories.d.ts} +1 -1
  44. package/presence/{presence.stories.d.ts → stories/presence.stories.d.ts} +1 -1
  45. package/progress/index.cjs +38 -0
  46. package/progress/index.d.ts +35 -0
  47. package/progress/index.mjs +25 -0
  48. package/progress/progress-circle-range.cjs +18 -0
  49. package/progress/progress-circle-range.d.ts +8 -0
  50. package/progress/progress-circle-range.mjs +14 -0
  51. package/progress/progress-circle-track.cjs +18 -0
  52. package/progress/progress-circle-track.d.ts +8 -0
  53. package/progress/progress-circle-track.mjs +14 -0
  54. package/progress/progress-circle.cjs +18 -0
  55. package/progress/progress-circle.d.ts +8 -0
  56. package/progress/progress-circle.mjs +14 -0
  57. package/progress/progress-context.cjs +15 -0
  58. package/progress/progress-context.d.ts +6 -0
  59. package/progress/progress-context.mjs +10 -0
  60. package/progress/progress-indicator.cjs +22 -0
  61. package/progress/progress-indicator.d.ts +8 -0
  62. package/progress/progress-indicator.mjs +18 -0
  63. package/progress/progress-label.cjs +19 -0
  64. package/progress/progress-label.d.ts +6 -0
  65. package/progress/progress-label.mjs +15 -0
  66. package/progress/progress-range.cjs +19 -0
  67. package/progress/progress-range.d.ts +6 -0
  68. package/progress/progress-range.mjs +15 -0
  69. package/progress/progress-track.cjs +19 -0
  70. package/progress/progress-track.d.ts +6 -0
  71. package/progress/progress-track.mjs +15 -0
  72. package/progress/progress-value-text.cjs +22 -0
  73. package/progress/progress-value-text.d.ts +6 -0
  74. package/progress/progress-value-text.mjs +18 -0
  75. package/progress/progress.cjs +34 -0
  76. package/progress/progress.d.ts +9 -0
  77. package/progress/progress.mjs +30 -0
  78. package/progress/progress.test.d.ts +1 -0
  79. package/progress/stories/circular-progress.stories.d.ts +11 -0
  80. package/progress/stories/linear-progress.stories.d.ts +12 -0
  81. package/progress/use-progress.cjs +46 -0
  82. package/progress/use-progress.d.ts +12 -0
  83. package/progress/use-progress.mjs +23 -0
  84. package/radio-group/index.d.ts +2 -1
  85. package/radio-group/{radio-group.stories.d.ts → stories/radio-group.stories.d.ts} +1 -1
  86. package/rating-group/index.d.ts +2 -1
  87. package/rating-group/{rating-group.stories.d.ts → stories/rating-group.stories.d.ts} +1 -1
  88. package/segment-group/index.d.ts +2 -1
  89. package/segment-group/{segment-group.stories.d.ts → stories/segment-group.stories.d.ts} +1 -1
  90. package/select/index.d.ts +3 -2
  91. package/select/select-value-text.d.ts +4 -0
  92. package/select/{select.stories.d.ts → stories/select.stories.d.ts} +1 -1
  93. package/slider/index.d.ts +2 -1
  94. package/slider/stories/range-slider.stories.d.ts +14 -0
  95. package/slider/{slider.stories.d.ts → stories/slider.stories.d.ts} +1 -2
  96. package/splitter/index.d.ts +2 -1
  97. package/splitter/{splitter.stories.d.ts → stories/splitter.stories.d.ts} +1 -1
  98. package/switch/index.d.ts +2 -1
  99. package/switch/{switch.stories.d.ts → stories/switch.stories.d.ts} +1 -1
  100. package/tabs/index.d.ts +2 -1
  101. package/tabs/{tabs.stories.d.ts → stories/tabs.stories.d.ts} +1 -1
  102. package/tags-input/index.d.ts +2 -1
  103. package/tags-input/{tags-input.stories.d.ts → stories/tags-input.stories.d.ts} +1 -1
  104. package/tags-input/tags-input-input.cjs +2 -2
  105. package/tags-input/tags-input-input.mjs +2 -2
  106. package/toast/{toast.stories.d.ts → stories/toast.stories.d.ts} +1 -1
  107. package/toggle-group/index.d.ts +2 -1
  108. package/toggle-group/{toggle-group.stories.d.ts → stories/toggle-group.stories.d.ts} +1 -1
  109. package/tooltip/index.d.ts +3 -2
  110. package/tooltip/{tooltip.stories.d.ts → stories/tooltip.stories.d.ts} +1 -1
@@ -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 progressContext = require('./progress-context.cjs');
11
+
12
+ const ProgressRange = react.forwardRef((props, ref) => {
13
+ const api = progressContext.useProgressContext();
14
+ const mergedProps = react$1.mergeProps(api.rangeProps, props);
15
+ return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
16
+ });
17
+ ProgressRange.displayName = "ProgressRange";
18
+
19
+ exports.ProgressRange = ProgressRange;
@@ -0,0 +1,6 @@
1
+ import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
+ /// <reference types="react" />
3
+ import { type HTMLArkProps } from '../factory';
4
+ export interface ProgressRangeProps extends HTMLArkProps<'div'> {
5
+ }
6
+ export declare const ProgressRange: ForwardRefExoticComponent<ProgressRangeProps & 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.mjs';
6
+ import { useProgressContext } from './progress-context.mjs';
7
+
8
+ const ProgressRange = forwardRef((props, ref) => {
9
+ const api = useProgressContext();
10
+ const mergedProps = mergeProps(api.rangeProps, props);
11
+ return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
12
+ });
13
+ ProgressRange.displayName = "ProgressRange";
14
+
15
+ export { ProgressRange };
@@ -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 progressContext = require('./progress-context.cjs');
11
+
12
+ const ProgressTrack = react.forwardRef((props, ref) => {
13
+ const api = progressContext.useProgressContext();
14
+ const mergedProps = react$1.mergeProps(api.trackProps, props);
15
+ return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
16
+ });
17
+ ProgressTrack.displayName = "ProgressTrack";
18
+
19
+ exports.ProgressTrack = ProgressTrack;
@@ -0,0 +1,6 @@
1
+ import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
+ /// <reference types="react" />
3
+ import { type HTMLArkProps } from '../factory';
4
+ export interface ProgressTrackProps extends HTMLArkProps<'div'> {
5
+ }
6
+ export declare const ProgressTrack: ForwardRefExoticComponent<ProgressTrackProps & 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.mjs';
6
+ import { useProgressContext } from './progress-context.mjs';
7
+
8
+ const ProgressTrack = forwardRef((props, ref) => {
9
+ const api = useProgressContext();
10
+ const mergedProps = mergeProps(api.trackProps, props);
11
+ return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
12
+ });
13
+ ProgressTrack.displayName = "ProgressTrack";
14
+
15
+ export { ProgressTrack };
@@ -0,0 +1,22 @@
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 progressContext = require('./progress-context.cjs');
11
+
12
+ const ProgressValueText = react.forwardRef(
13
+ (props, ref) => {
14
+ const { children, ...rest } = props;
15
+ const api = progressContext.useProgressContext();
16
+ const mergedProps = react$1.mergeProps(api.valueTextProps, rest);
17
+ return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.span, { ...mergedProps, ref, children: children || api.valueAsString });
18
+ }
19
+ );
20
+ ProgressValueText.displayName = "ProgressValueText";
21
+
22
+ exports.ProgressValueText = ProgressValueText;
@@ -0,0 +1,6 @@
1
+ import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
+ /// <reference types="react" />
3
+ import { type HTMLArkProps } from '../factory';
4
+ export interface ProgressValueTextProps extends HTMLArkProps<'span'> {
5
+ }
6
+ export declare const ProgressValueText: ForwardRefExoticComponent<ProgressValueTextProps & RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1,18 @@
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.mjs';
6
+ import { useProgressContext } from './progress-context.mjs';
7
+
8
+ const ProgressValueText = forwardRef(
9
+ (props, ref) => {
10
+ const { children, ...rest } = props;
11
+ const api = useProgressContext();
12
+ const mergedProps = mergeProps(api.valueTextProps, rest);
13
+ return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref, children: children || api.valueAsString });
14
+ }
15
+ );
16
+ ProgressValueText.displayName = "ProgressValueText";
17
+
18
+ export { ProgressValueText };
@@ -0,0 +1,34 @@
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('../create-split-props.cjs');
10
+ const factory = require('../factory.cjs');
11
+ const runIfFn = require('../run-if-fn.cjs');
12
+ const progressContext = require('./progress-context.cjs');
13
+ const useProgress = require('./use-progress.cjs');
14
+
15
+ const Progress = react.forwardRef((props, ref) => {
16
+ const [progressProps, { children, ...localProps }] = createSplitProps.createSplitProps()(props, [
17
+ "defaultValue",
18
+ "dir",
19
+ "getRootNode",
20
+ "id",
21
+ "max",
22
+ "min",
23
+ "orientation",
24
+ "translations",
25
+ "value"
26
+ ]);
27
+ const api = useProgress.useProgress(progressProps);
28
+ const mergedProps = react$1.mergeProps(api.rootProps, localProps);
29
+ const view = runIfFn.runIfFn(children, api);
30
+ return /* @__PURE__ */ jsxRuntime.jsx(progressContext.ProgressProvider, { value: api, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.nav, { ...mergedProps, ref, children: view }) });
31
+ });
32
+ Progress.displayName = "Progress";
33
+
34
+ exports.Progress = Progress;
@@ -0,0 +1,9 @@
1
+ import { ForwardRefExoticComponent, RefAttributes, type ReactNode } from 'react';
2
+ import { type HTMLArkProps } from '../factory';
3
+ import { type Assign } from '../types';
4
+ import { type UseProgressProps, type UseProgressReturn } from './use-progress';
5
+ export interface ProgressProps extends Assign<Assign<HTMLArkProps<'div'>, {
6
+ children?: ReactNode | ((api: UseProgressReturn) => ReactNode);
7
+ }>, UseProgressProps> {
8
+ }
9
+ export declare const Progress: ForwardRefExoticComponent<ProgressProps & RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,30 @@
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 '../create-split-props.mjs';
6
+ import { ark } from '../factory.mjs';
7
+ import { runIfFn } from '../run-if-fn.mjs';
8
+ import { ProgressProvider } from './progress-context.mjs';
9
+ import { useProgress } from './use-progress.mjs';
10
+
11
+ const Progress = forwardRef((props, ref) => {
12
+ const [progressProps, { children, ...localProps }] = createSplitProps()(props, [
13
+ "defaultValue",
14
+ "dir",
15
+ "getRootNode",
16
+ "id",
17
+ "max",
18
+ "min",
19
+ "orientation",
20
+ "translations",
21
+ "value"
22
+ ]);
23
+ const api = useProgress(progressProps);
24
+ const mergedProps = mergeProps(api.rootProps, localProps);
25
+ const view = runIfFn(children, api);
26
+ return /* @__PURE__ */ jsx(ProgressProvider, { value: api, children: /* @__PURE__ */ jsx(ark.nav, { ...mergedProps, ref, children: view }) });
27
+ });
28
+ Progress.displayName = "Progress";
29
+
30
+ export { Progress };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+ import type { Meta } from '@storybook/react';
3
+ import { Progress } from '../';
4
+ type ProgressType = typeof Progress;
5
+ declare const meta: Meta<ProgressType>;
6
+ export default meta;
7
+ export declare const Basic: () => JSX.Element;
8
+ export declare const InitialValue: () => JSX.Element;
9
+ export declare const MinMax: () => JSX.Element;
10
+ export declare const Indeterminate: () => JSX.Element;
11
+ export declare const ValueText: () => JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+ import type { Meta } from '@storybook/react';
3
+ import { Progress } from '../';
4
+ type ProgressType = typeof Progress;
5
+ declare const meta: Meta<ProgressType>;
6
+ export default meta;
7
+ export declare const Basic: () => JSX.Element;
8
+ export declare const InitialValue: () => JSX.Element;
9
+ export declare const MinMax: () => JSX.Element;
10
+ export declare const Indeterminate: () => JSX.Element;
11
+ export declare const ValueText: () => JSX.Element;
12
+ export declare const Vertical: () => JSX.Element;
@@ -0,0 +1,46 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
+
6
+ const progress = require('@zag-js/progress');
7
+ const react$1 = require('@zag-js/react');
8
+ const react = require('react');
9
+ require('../environment/index.cjs');
10
+ const environmentContext = require('../environment/environment-context.cjs');
11
+
12
+ function _interopNamespaceDefault(e) {
13
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
14
+ if (e) {
15
+ for (const k in e) {
16
+ if (k !== 'default') {
17
+ const d = Object.getOwnPropertyDescriptor(e, k);
18
+ Object.defineProperty(n, k, d.get ? d : {
19
+ enumerable: true,
20
+ get: () => e[k]
21
+ });
22
+ }
23
+ }
24
+ }
25
+ n.default = e;
26
+ return Object.freeze(n);
27
+ }
28
+
29
+ const progress__namespace = /*#__PURE__*/_interopNamespaceDefault(progress);
30
+
31
+ const useProgress = (props) => {
32
+ const initialContext = {
33
+ id: react.useId(),
34
+ getRootNode: environmentContext.useEnvironmentContext(),
35
+ ...props,
36
+ value: props.defaultValue
37
+ };
38
+ const context = {
39
+ ...initialContext,
40
+ value: props.value
41
+ };
42
+ const [state, send] = react$1.useMachine(progress__namespace.machine(initialContext), { context });
43
+ return progress__namespace.connect(state, send, react$1.normalizeProps);
44
+ };
45
+
46
+ exports.useProgress = useProgress;
@@ -0,0 +1,12 @@
1
+ import * as progress from '@zag-js/progress';
2
+ import { type PropTypes } from '@zag-js/react';
3
+ import { type Optional } from '../types';
4
+ export interface UseProgressProps extends Optional<progress.Context, 'id'> {
5
+ /**
6
+ * The initial value of the progress.
7
+ */
8
+ defaultValue?: progress.Context['value'];
9
+ }
10
+ export interface UseProgressReturn extends progress.Api<PropTypes> {
11
+ }
12
+ export declare const useProgress: (props: UseProgressProps) => UseProgressReturn;
@@ -0,0 +1,23 @@
1
+ 'use client';
2
+ import * as progress from '@zag-js/progress';
3
+ import { useMachine, normalizeProps } from '@zag-js/react';
4
+ import { useId } from 'react';
5
+ import '../environment/index.mjs';
6
+ import { useEnvironmentContext } from '../environment/environment-context.mjs';
7
+
8
+ const useProgress = (props) => {
9
+ const initialContext = {
10
+ id: useId(),
11
+ getRootNode: useEnvironmentContext(),
12
+ ...props,
13
+ value: props.defaultValue
14
+ };
15
+ const context = {
16
+ ...initialContext,
17
+ value: props.value
18
+ };
19
+ const [state, send] = useMachine(progress.machine(initialContext), { context });
20
+ return progress.connect(state, send, normalizeProps);
21
+ };
22
+
23
+ export { useProgress };
@@ -1,5 +1,6 @@
1
1
  import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
2
  /// <reference types="react" />
3
+ import type { ValueChangeDetails as RadioGroupValueChangeDetails } from '@zag-js/radio-group';
3
4
  import { type RadioGroupProps } from './radio-group';
4
5
  import { useRadioGroupContext, type RadioGroupContext } from './radio-group-context';
5
6
  import { type RadioGroupIndicatorProps } from './radio-group-indicator';
@@ -17,4 +18,4 @@ declare const RadioGroup: ForwardRefExoticComponent<RadioGroupProps & RefAttribu
17
18
  Label: ForwardRefExoticComponent<RadioGroupLabelProps & RefAttributes<HTMLLabelElement>>;
18
19
  };
19
20
  export { RadioGroup, RadioGroupItem, RadioGroupItemControl, RadioGroupItemText, RadioGroupLabel, useRadioGroupContext, useRadioGroupItemContext, };
20
- export type { RadioGroupContext, RadioGroupIndicatorProps, RadioGroupItemContext, RadioGroupItemControlProps, RadioGroupItemProps, RadioGroupItemTextProps, RadioGroupLabelProps, RadioGroupProps, };
21
+ export type { RadioGroupContext, RadioGroupIndicatorProps, RadioGroupItemContext, RadioGroupItemControlProps, RadioGroupItemProps, RadioGroupItemTextProps, RadioGroupLabelProps, RadioGroupProps, RadioGroupValueChangeDetails, };
@@ -1,6 +1,6 @@
1
1
  import { JSX } from 'react/jsx-runtime';
2
2
  import type { Meta } from '@storybook/react';
3
- import { RadioGroup } from './';
3
+ import { RadioGroup } from '../';
4
4
  type RadioGroupType = typeof RadioGroup;
5
5
  declare const meta: Meta<RadioGroupType>;
6
6
  export default meta;
@@ -1,5 +1,6 @@
1
1
  import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
2
  /// <reference types="react" />
3
+ import type { HoverChangeDetails as RatingGroupHoverChangeDetails, ValueChangeDetails as RatingGroupValueChangeDetails } from '@zag-js/rating-group';
3
4
  import { type RatingGroupProps } from './rating-group';
4
5
  import { useRatingGroupContext, type RatingGroupContext } from './rating-group-context';
5
6
  import { RatingGroupControl, type RatingGroupControlProps } from './rating-group-control';
@@ -13,4 +14,4 @@ declare const RatingGroup: ForwardRefExoticComponent<RatingGroupProps & RefAttri
13
14
  Item: ForwardRefExoticComponent<RatingGroupItemProps & RefAttributes<HTMLSpanElement>>;
14
15
  };
15
16
  export { RatingGroup, RatingGroupControl, RatingGroupItem, RatingGroupLabel, useRatingGroupContext, useRatingGroupItemContext, };
16
- export type { RatingGroupContext, RatingGroupControlProps, RatingGroupItemContext, RatingGroupItemProps, RatingGroupLabelProps, RatingGroupProps, };
17
+ export type { RatingGroupContext, RatingGroupControlProps, RatingGroupHoverChangeDetails, RatingGroupItemContext, RatingGroupItemProps, RatingGroupLabelProps, RatingGroupProps, RatingGroupValueChangeDetails, };
@@ -1,6 +1,6 @@
1
1
  import { JSX } from 'react/jsx-runtime';
2
2
  import type { Meta } from '@storybook/react';
3
- import { RatingGroup } from './';
3
+ import { RatingGroup } from '../';
4
4
  type RatingGroupType = typeof RatingGroup;
5
5
  declare const meta: Meta<RatingGroupType>;
6
6
  export default meta;
@@ -1,5 +1,6 @@
1
1
  import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
2
  /// <reference types="react" />
3
+ import type { ValueChangeDetails as SegmentGroupValueChangeDetails } from '@zag-js/radio-group';
3
4
  import { type SegmentGroupProps } from './segment-group';
4
5
  import { useSegmentGroupContext, type SegmentGroupContext } from './segment-group-context';
5
6
  import { SegmentGroupIndicator, type SegmentGroupIndicatorProps } from './segment-group-indicator';
@@ -17,4 +18,4 @@ declare const SegmentGroup: ForwardRefExoticComponent<SegmentGroupProps & RefAtt
17
18
  Label: ForwardRefExoticComponent<SegmentGroupLabelProps & RefAttributes<HTMLLabelElement>>;
18
19
  };
19
20
  export { SegmentGroup, SegmentGroupIndicator, SegmentGroupItem, SegmentGroupItemControl, SegmentGroupItemText, SegmentGroupLabel, useSegmentGroupContext, useSegmentGroupItemContext, };
20
- export type { SegmentGroupContext, SegmentGroupIndicatorProps, SegmentGroupItemContext, SegmentGroupItemControlProps, SegmentGroupItemProps, SegmentGroupItemTextProps, SegmentGroupLabelProps, SegmentGroupProps, };
21
+ export type { SegmentGroupContext, SegmentGroupIndicatorProps, SegmentGroupItemContext, SegmentGroupItemControlProps, SegmentGroupItemProps, SegmentGroupItemTextProps, SegmentGroupLabelProps, SegmentGroupProps, SegmentGroupValueChangeDetails, };
@@ -1,6 +1,6 @@
1
1
  import { JSX } from 'react/jsx-runtime';
2
2
  import type { Meta } from '@storybook/react';
3
- import { SegmentGroup } from './';
3
+ import { SegmentGroup } from '../';
4
4
  type SegmentGroupType = typeof SegmentGroup;
5
5
  declare const meta: Meta<SegmentGroupType>;
6
6
  export default meta;
package/select/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
2
  /// <reference types="react" />
3
+ import type { HighlightChangeDetails as SelectHighlightChangeDetails, OpenChangeDetails as SelectOpenChangeDetails, ValueChangeDetails as SelectValueChangeDetails } from '@zag-js/select';
3
4
  import type { CollectionItem } from '../types';
4
5
  import { SelectComponent, type SelectProps } from './select';
5
6
  import { SelectClearTrigger, type SelectClearTriggerProps } from './select-clear-trigger';
@@ -33,5 +34,5 @@ declare const Select: SelectComponent & {
33
34
  Trigger: ForwardRefExoticComponent<SelectTriggerProps & RefAttributes<HTMLButtonElement>>;
34
35
  ValueText: ForwardRefExoticComponent<SelectValueTextProps & RefAttributes<HTMLSpanElement>>;
35
36
  };
36
- export { Select, SelectClearTrigger, SelectContent, SelectControl, SelectIndicator, SelectItem, SelectItemGroup, SelectItemGroupLabel, SelectItemIndicator, SelectItemText, SelectLabel, SelectPositioner, SelectTrigger, SelectValueText, useSelectContext, useSelectItemContext, };
37
- export type { CollectionItem, SelectClearTriggerProps, SelectContentProps, SelectContext, SelectControlProps, SelectIndicatorProps, SelectItemContext, SelectItemGroupLabelProps, SelectItemGroupProps, SelectItemIndicatorProps, SelectItemProps, SelectItemTextProps, SelectLabelProps, SelectPositionerProps, SelectProps, SelectTriggerProps, SelectValueTextProps, };
37
+ export { Select, SelectClearTrigger, SelectContent, SelectControl, SelectIndicator, SelectItem, SelectItemGroup, SelectItemGroupLabel, SelectItemIndicator, SelectItemText, SelectLabel, SelectPositioner, SelectTrigger, SelectValueText, useSelectContext, useSelectItemContext };
38
+ export type { CollectionItem, SelectClearTriggerProps, SelectContentProps, SelectContext, SelectControlProps, SelectHighlightChangeDetails, SelectIndicatorProps, SelectItemContext, SelectItemGroupLabelProps, SelectItemGroupProps, SelectItemIndicatorProps, SelectItemProps, SelectItemTextProps, SelectLabelProps, SelectOpenChangeDetails, SelectPositionerProps, SelectProps, SelectTriggerProps, SelectValueChangeDetails, SelectValueTextProps };
@@ -2,5 +2,9 @@ import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
2
  /// <reference types="react" />
3
3
  import { type HTMLArkProps } from '../factory';
4
4
  export interface SelectValueTextProps extends HTMLArkProps<'span'> {
5
+ /**
6
+ * Text to display when no value is selected.
7
+ */
8
+ placeholder?: string;
5
9
  }
6
10
  export declare const SelectValueText: ForwardRefExoticComponent<SelectValueTextProps & RefAttributes<HTMLSpanElement>>;
@@ -1,6 +1,6 @@
1
1
  import { JSX } from 'react/jsx-runtime';
2
2
  import type { Meta } from '@storybook/react';
3
- import { Select } from './';
3
+ import { Select } from '../';
4
4
  type SelectType = typeof Select;
5
5
  declare const meta: Meta<SelectType>;
6
6
  export default meta;
package/slider/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
2
  /// <reference types="react" />
3
+ import type { FocusChangeDetails as SliderFocusChangeDetails, ValueChangeDetails as SliderValueChangeDetails } from '@zag-js/slider';
3
4
  import { type SliderProps } from './slider';
4
5
  import { useSliderContext, type SliderContext } from './slider-context';
5
6
  import { SliderControl, type SliderControlProps } from './slider-control';
@@ -22,4 +23,4 @@ declare const Slider: ForwardRefExoticComponent<SliderProps & RefAttributes<HTML
22
23
  ValueText: ForwardRefExoticComponent<SliderValueTextProps & RefAttributes<HTMLDivElement>>;
23
24
  };
24
25
  export { Slider, SliderControl, SliderLabel, SliderMarker, SliderMarkerGroup, SliderRange, SliderThumb, SliderTrack, SliderValueText, useSliderContext, };
25
- export type { SliderContext, SliderControlProps, SliderLabelProps, SliderMarkerGroupProps, SliderMarkerProps, SliderProps, SliderRangeProps, SliderThumbProps, SliderTrackProps, SliderValueTextProps, };
26
+ export type { SliderContext, SliderControlProps, SliderFocusChangeDetails, SliderLabelProps, SliderMarkerGroupProps, SliderMarkerProps, SliderProps, SliderRangeProps, SliderThumbProps, SliderTrackProps, SliderValueChangeDetails, SliderValueTextProps, };
@@ -0,0 +1,14 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+ import type { Meta } from '@storybook/react';
3
+ import { Slider } from '../';
4
+ type SliderType = typeof Slider;
5
+ declare const meta: Meta<SliderType>;
6
+ export default meta;
7
+ export declare const Basic: () => JSX.Element;
8
+ export declare const WithMarks: () => JSX.Element;
9
+ export declare const InitialValue: () => JSX.Element;
10
+ export declare const MinMax: () => JSX.Element;
11
+ export declare const Step: () => JSX.Element;
12
+ export declare const OnEvent: () => JSX.Element;
13
+ export declare const Vertical: () => JSX.Element;
14
+ export declare const ThumbOverlap: () => JSX.Element;
@@ -1,11 +1,10 @@
1
1
  import { JSX } from 'react/jsx-runtime';
2
2
  import type { Meta } from '@storybook/react';
3
- import { Slider } from './';
3
+ import { Slider } from '../';
4
4
  type SliderType = typeof Slider;
5
5
  declare const meta: Meta<SliderType>;
6
6
  export default meta;
7
7
  export declare const Basic: () => JSX.Element;
8
- export declare const Range: () => JSX.Element;
9
8
  export declare const WithMarks: () => JSX.Element;
10
9
  export declare const InitialValue: () => JSX.Element;
11
10
  export declare const MinMax: () => JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
2
  /// <reference types="react" />
3
+ import type { SizeChangeDetails as SplitterSizeChangeDetails } from '@zag-js/splitter';
3
4
  import { type SplitterProps } from './splitter';
4
5
  import { useSplitterContext, type SplitterContext } from './splitter-context';
5
6
  import { SplitterPanel, type SplitterPanelProps } from './splitter-panel';
@@ -10,4 +11,4 @@ declare const Splitter: ForwardRefExoticComponent<SplitterProps & RefAttributes<
10
11
  ResizeTrigger: ForwardRefExoticComponent<SplitterResizeTriggerProps & RefAttributes<HTMLButtonElement>>;
11
12
  };
12
13
  export { Splitter, SplitterPanel, SplitterResizeTrigger, useSplitterContext };
13
- export type { SplitterContext, SplitterPanelProps, SplitterProps, SplitterResizeTriggerProps };
14
+ export type { SplitterContext, SplitterPanelProps, SplitterProps, SplitterResizeTriggerProps, SplitterSizeChangeDetails, };
@@ -1,6 +1,6 @@
1
1
  import { JSX } from 'react/jsx-runtime';
2
2
  import type { Meta } from '@storybook/react';
3
- import { Splitter } from './';
3
+ import { Splitter } from '../';
4
4
  type SplitterType = typeof Splitter;
5
5
  declare const meta: Meta<SplitterType>;
6
6
  export default meta;
package/switch/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
2
  /// <reference types="react" />
3
+ import type { CheckedChangeDetails as SwitchCheckedChangeDetails } from '@zag-js/switch';
3
4
  import { type SwitchProps } from './switch';
4
5
  import { useSwitchContext, type SwitchContext } from './switch-context';
5
6
  import { SwitchControl, type SwitchControlProps } from './switch-control';
@@ -12,4 +13,4 @@ declare const Switch: ForwardRefExoticComponent<SwitchProps & RefAttributes<HTML
12
13
  Thumb: ForwardRefExoticComponent<SwitchThumbProps & RefAttributes<HTMLSpanElement>>;
13
14
  };
14
15
  export { Switch, SwitchControl, SwitchLabel, SwitchThumb, useSwitchContext };
15
- export type { SwitchContext, SwitchControlProps, SwitchLabelProps, SwitchProps, SwitchThumbProps };
16
+ export type { SwitchCheckedChangeDetails, SwitchContext, SwitchControlProps, SwitchLabelProps, SwitchProps, SwitchThumbProps, };
@@ -1,6 +1,6 @@
1
1
  import { JSX } from 'react/jsx-runtime';
2
2
  import type { Meta } from '@storybook/react';
3
- import { Switch } from './';
3
+ import { Switch } from '../';
4
4
  type SwitchType = typeof Switch;
5
5
  declare const meta: Meta<SwitchType>;
6
6
  export default meta;
package/tabs/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
2
  /// <reference types="react" />
3
+ import type { FocusChangeDetails as TabsFocusChangeDetails, ValueChangeDetails as TabsValueChangeDetails } from '@zag-js/tabs';
3
4
  import { TabContent, type TabContentProps } from './tab-content';
4
5
  import { TabIndicator, type TabIndicatorProps } from './tab-indicator';
5
6
  import { TabList, type TabListProps } from './tab-list';
@@ -14,4 +15,4 @@ declare const Tabs: ForwardRefExoticComponent<TabsProps & RefAttributes<HTMLDivE
14
15
  Trigger: ForwardRefExoticComponent<TabTriggerProps & RefAttributes<HTMLButtonElement>>;
15
16
  };
16
17
  export { TabContent, TabIndicator, TabList, TabTrigger, Tabs, useTabsContext };
17
- export type { TabContentProps, TabIndicatorProps, TabListProps, TabTriggerProps, TabsContext, TabsProps, };
18
+ export type { TabContentProps, TabIndicatorProps, TabListProps, TabTriggerProps, TabsContext, TabsFocusChangeDetails, TabsProps, TabsValueChangeDetails, };
@@ -1,6 +1,6 @@
1
1
  import { JSX } from 'react/jsx-runtime';
2
2
  import type { Meta } from '@storybook/react';
3
- import { Tabs } from './';
3
+ import { Tabs } from '../';
4
4
  type TabsType = typeof Tabs;
5
5
  declare const meta: Meta<TabsType>;
6
6
  export default meta;
@@ -1,5 +1,6 @@
1
1
  import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
2
  /// <reference types="react" />
3
+ import type { HighlightChangeDetails as TagsInputHighlightChangeDetails, ValidityChangeDetails as TagsInputValidityChangeDetails, ValueChangeDetails as TagsInputValueChangeDetails } from '@zag-js/tags-input';
3
4
  import { type TagsInputProps } from './tags-input';
4
5
  import { TagsInputClearTrigger, type TagsInputClearTriggerProps } from './tags-input-clear-trigger';
5
6
  import { useTagsInputContext, type TagsInputContext } from './tags-input-context';
@@ -23,4 +24,4 @@ declare const TagsInput: ForwardRefExoticComponent<TagsInputProps & RefAttribute
23
24
  Label: ForwardRefExoticComponent<TagsInputLabelProps & RefAttributes<HTMLLabelElement>>;
24
25
  };
25
26
  export { TagsInput, TagsInputClearTrigger, TagsInputControl, TagsInputInput, TagsInputItem, TagsInputItemDeleteTrigger, TagsInputItemInput, TagsInputItemText, TagsInputLabel, useTagsInputContext, useTagsInputItemContext, };
26
- export type { TagsInputClearTriggerProps, TagsInputContext, TagsInputControlProps, TagsInputInputProps, TagsInputItemContext, TagsInputItemDeleteTriggerProps, TagsInputItemInputProps, TagsInputItemProps, TagsInputItemTextProps, TagsInputLabelProps, TagsInputProps, };
27
+ export type { TagsInputClearTriggerProps, TagsInputContext, TagsInputControlProps, TagsInputHighlightChangeDetails, TagsInputInputProps, TagsInputItemContext, TagsInputItemDeleteTriggerProps, TagsInputItemInputProps, TagsInputItemProps, TagsInputItemTextProps, TagsInputLabelProps, TagsInputProps, TagsInputValidityChangeDetails, TagsInputValueChangeDetails, };
@@ -1,6 +1,6 @@
1
1
  import { JSX } from 'react/jsx-runtime';
2
2
  import type { Meta } from '@storybook/react';
3
- import { TagsInput } from './';
3
+ import { TagsInput } from '../';
4
4
  type TagsInputType = typeof TagsInput;
5
5
  declare const meta: Meta<TagsInputType>;
6
6
  export default meta;
@@ -10,8 +10,8 @@ const factory = require('../factory.cjs');
10
10
  const tagsInputContext = require('./tags-input-context.cjs');
11
11
 
12
12
  const TagsInputInput = react.forwardRef((props, ref) => {
13
- const { inputProps } = tagsInputContext.useTagsInputContext();
14
- const mergedProps = react$1.mergeProps(inputProps, props);
13
+ const api = tagsInputContext.useTagsInputContext();
14
+ const mergedProps = react$1.mergeProps(api.inputProps, props);
15
15
  return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.input, { ...mergedProps, ref });
16
16
  });
17
17
  TagsInputInput.displayName = "TagsInputInput";
@@ -6,8 +6,8 @@ import { ark } from '../factory.mjs';
6
6
  import { useTagsInputContext } from './tags-input-context.mjs';
7
7
 
8
8
  const TagsInputInput = forwardRef((props, ref) => {
9
- const { inputProps } = useTagsInputContext();
10
- const mergedProps = mergeProps(inputProps, props);
9
+ const api = useTagsInputContext();
10
+ const mergedProps = mergeProps(api.inputProps, props);
11
11
  return /* @__PURE__ */ jsx(ark.input, { ...mergedProps, ref });
12
12
  });
13
13
  TagsInputInput.displayName = "TagsInputInput";
@@ -1,6 +1,6 @@
1
1
  import { JSX } from 'react/jsx-runtime';
2
2
  import type { Meta } from '@storybook/react';
3
- import { Toast } from './';
3
+ import { Toast } from '../';
4
4
  type ToastType = typeof Toast;
5
5
  declare const meta: Meta<ToastType>;
6
6
  export default meta;
@@ -1,5 +1,6 @@
1
1
  import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
2
  /// <reference types="react" />
3
+ import type { ValueChangeDetails as ToggleGroupValueChangeDetails } from '@zag-js/toggle-group';
3
4
  import { type ToggleGroupProps } from './toggle-group';
4
5
  import { useToggleGroupContext, type ToggleGroupContext } from './toggle-group-context';
5
6
  import { ToggleGroupItem, type ToggleGroupItemProps } from './toggle-group-item';
@@ -8,4 +9,4 @@ declare const ToggleGroup: ForwardRefExoticComponent<ToggleGroupProps & RefAttri
8
9
  Item: ForwardRefExoticComponent<ToggleGroupItemProps & RefAttributes<HTMLButtonElement>>;
9
10
  };
10
11
  export { ToggleGroup, ToggleGroupItem, useToggleGroupContext };
11
- export type { ToggleGroupContext, ToggleGroupItemProps, ToggleGroupProps };
12
+ export type { ToggleGroupContext, ToggleGroupItemProps, ToggleGroupProps, ToggleGroupValueChangeDetails, };