@ark-ui/react 3.6.2 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/field/field-root.cjs +1 -0
- package/dist/components/field/field-root.js +1 -0
- package/dist/components/field/use-field.cjs +24 -20
- package/dist/components/field/use-field.d.cts +15 -0
- package/dist/components/field/use-field.d.ts +15 -0
- package/dist/components/field/use-field.js +19 -15
- package/dist/components/progress/progress-value-text.cjs +1 -1
- package/dist/components/progress/progress-value-text.js +1 -1
- package/dist/components/select/use-select.cjs +19 -13
- package/dist/components/select/use-select.js +20 -14
- package/dist/components/steps/index.cjs +37 -0
- package/dist/components/steps/index.d.cts +16 -0
- package/dist/components/steps/index.d.ts +16 -0
- package/dist/components/steps/index.js +16 -0
- package/dist/components/steps/steps-completed-content.cjs +21 -0
- package/dist/components/steps/steps-completed-content.d.cts +8 -0
- package/dist/components/steps/steps-completed-content.d.ts +8 -0
- package/dist/components/steps/steps-completed-content.js +17 -0
- package/dist/components/steps/steps-content.cjs +21 -0
- package/dist/components/steps/steps-content.d.cts +9 -0
- package/dist/components/steps/steps-content.d.ts +9 -0
- package/dist/components/steps/steps-content.js +17 -0
- package/dist/components/steps/steps-context.d.cts +10 -0
- package/dist/components/steps/steps-context.d.ts +10 -0
- package/dist/components/steps/steps-indicator.cjs +21 -0
- package/dist/components/steps/steps-indicator.d.cts +8 -0
- package/dist/components/steps/steps-indicator.d.ts +8 -0
- package/dist/components/steps/steps-indicator.js +17 -0
- package/dist/components/steps/steps-item.cjs +22 -0
- package/dist/components/steps/steps-item.d.cts +9 -0
- package/dist/components/steps/steps-item.d.ts +9 -0
- package/dist/components/steps/steps-item.js +18 -0
- package/dist/components/steps/steps-list.cjs +19 -0
- package/dist/components/steps/steps-list.d.cts +8 -0
- package/dist/components/steps/steps-list.d.ts +8 -0
- package/dist/components/steps/steps-list.js +15 -0
- package/dist/components/steps/steps-next-trigger.cjs +21 -0
- package/dist/components/steps/steps-next-trigger.d.cts +8 -0
- package/dist/components/steps/steps-next-trigger.d.ts +8 -0
- package/dist/components/steps/steps-next-trigger.js +17 -0
- package/dist/components/steps/steps-prev-trigger.cjs +21 -0
- package/dist/components/steps/steps-prev-trigger.d.cts +8 -0
- package/dist/components/steps/steps-prev-trigger.d.ts +8 -0
- package/dist/components/steps/steps-prev-trigger.js +17 -0
- package/dist/components/steps/steps-progress.cjs +19 -0
- package/dist/components/steps/steps-progress.d.cts +8 -0
- package/dist/components/steps/steps-progress.d.ts +8 -0
- package/dist/components/steps/steps-progress.js +15 -0
- package/dist/components/steps/steps-root-provider.cjs +22 -0
- package/dist/components/steps/steps-root-provider.d.cts +13 -0
- package/dist/components/steps/steps-root-provider.d.ts +13 -0
- package/dist/components/steps/steps-root-provider.js +18 -0
- package/dist/components/steps/steps-root.cjs +32 -0
- package/dist/components/steps/steps-root.d.cts +9 -0
- package/dist/components/steps/steps-root.d.ts +9 -0
- package/dist/components/steps/steps-root.js +28 -0
- package/dist/components/steps/steps-separator.cjs +21 -0
- package/dist/components/steps/steps-separator.d.cts +8 -0
- package/dist/components/steps/steps-separator.d.ts +8 -0
- package/dist/components/steps/steps-separator.js +17 -0
- package/dist/components/steps/steps-trigger.cjs +21 -0
- package/dist/components/steps/steps-trigger.d.cts +8 -0
- package/dist/components/steps/steps-trigger.d.ts +8 -0
- package/dist/components/steps/steps-trigger.js +17 -0
- package/dist/components/steps/steps.cjs +31 -0
- package/dist/components/steps/steps.d.cts +13 -0
- package/dist/components/steps/steps.d.ts +13 -0
- package/dist/components/steps/steps.js +12 -0
- package/dist/components/steps/use-steps-context.cjs +15 -0
- package/dist/components/steps/use-steps-context.d.cts +6 -0
- package/dist/components/steps/use-steps-context.d.ts +6 -0
- package/dist/components/steps/use-steps-context.js +10 -0
- package/dist/components/steps/use-steps-item-context.d.cts +7 -0
- package/dist/components/steps/use-steps-item-context.d.ts +7 -0
- package/dist/components/steps/use-steps-item-props-context.cjs +15 -0
- package/dist/components/steps/use-steps-item-props-context.d.cts +6 -0
- package/dist/components/steps/use-steps-item-props-context.d.ts +6 -0
- package/dist/components/steps/use-steps-item-props-context.js +10 -0
- package/dist/components/steps/use-steps.cjs +54 -0
- package/dist/components/steps/use-steps.d.cts +13 -0
- package/dist/components/steps/use-steps.d.ts +13 -0
- package/dist/components/steps/use-steps.js +31 -0
- package/dist/utils/use-safe-layout-effect.cjs +10 -0
- package/dist/utils/use-safe-layout-effect.d.cts +3 -0
- package/dist/utils/use-safe-layout-effect.d.ts +3 -0
- package/dist/utils/use-safe-layout-effect.js +6 -0
- package/package.json +65 -53
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const react$1 = require('@zag-js/react');
|
|
8
|
+
const react = require('react');
|
|
9
|
+
const factory = require('../factory.cjs');
|
|
10
|
+
const useStepsContext = require('./use-steps-context.cjs');
|
|
11
|
+
const useStepsItemPropsContext = require('./use-steps-item-props-context.cjs');
|
|
12
|
+
|
|
13
|
+
const StepsIndicator = react.forwardRef((props, ref) => {
|
|
14
|
+
const steps = useStepsContext.useStepsContext();
|
|
15
|
+
const itemProps = useStepsItemPropsContext.useStepsItemPropsContext();
|
|
16
|
+
const mergedProps = react$1.mergeProps(steps.getIndicatorProps(itemProps), props);
|
|
17
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
|
|
18
|
+
});
|
|
19
|
+
StepsIndicator.displayName = "StepsIndicator";
|
|
20
|
+
|
|
21
|
+
exports.StepsIndicator = StepsIndicator;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
export interface StepsIndicatorBaseProps extends PolymorphicProps {
|
|
5
|
+
}
|
|
6
|
+
export interface StepsIndicatorProps extends HTMLProps<'div'>, StepsIndicatorBaseProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const StepsIndicator: ForwardRefExoticComponent<StepsIndicatorProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
export interface StepsIndicatorBaseProps extends PolymorphicProps {
|
|
5
|
+
}
|
|
6
|
+
export interface StepsIndicatorProps extends HTMLProps<'div'>, StepsIndicatorBaseProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const StepsIndicator: ForwardRefExoticComponent<StepsIndicatorProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { mergeProps } from '@zag-js/react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { ark } from '../factory.js';
|
|
6
|
+
import { useStepsContext } from './use-steps-context.js';
|
|
7
|
+
import { useStepsItemPropsContext } from './use-steps-item-props-context.js';
|
|
8
|
+
|
|
9
|
+
const StepsIndicator = forwardRef((props, ref) => {
|
|
10
|
+
const steps = useStepsContext();
|
|
11
|
+
const itemProps = useStepsItemPropsContext();
|
|
12
|
+
const mergedProps = mergeProps(steps.getIndicatorProps(itemProps), props);
|
|
13
|
+
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
|
|
14
|
+
});
|
|
15
|
+
StepsIndicator.displayName = "StepsIndicator";
|
|
16
|
+
|
|
17
|
+
export { StepsIndicator };
|
|
@@ -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 createSplitProps = require('../../utils/create-split-props.cjs');
|
|
10
|
+
const factory = require('../factory.cjs');
|
|
11
|
+
const useStepsContext = require('./use-steps-context.cjs');
|
|
12
|
+
const useStepsItemPropsContext = require('./use-steps-item-props-context.cjs');
|
|
13
|
+
|
|
14
|
+
const StepsItem = react.forwardRef((props, ref) => {
|
|
15
|
+
const [itemProps, localProps] = createSplitProps.createSplitProps()(props, ["index"]);
|
|
16
|
+
const steps = useStepsContext.useStepsContext();
|
|
17
|
+
const mergedProps = react$1.mergeProps(steps.getItemProps(itemProps), localProps);
|
|
18
|
+
return /* @__PURE__ */ jsxRuntime.jsx(useStepsItemPropsContext.StepsItemPropsProvider, { value: itemProps, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.li, { ...mergedProps, ref }) });
|
|
19
|
+
});
|
|
20
|
+
StepsItem.displayName = "StepsItem";
|
|
21
|
+
|
|
22
|
+
exports.StepsItem = StepsItem;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ItemProps } from '@zag-js/steps';
|
|
2
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
3
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
|
+
|
|
5
|
+
export interface StepsItemBaseProps extends ItemProps, PolymorphicProps {
|
|
6
|
+
}
|
|
7
|
+
export interface StepsItemProps extends HTMLProps<'li'>, StepsItemBaseProps {
|
|
8
|
+
}
|
|
9
|
+
export declare const StepsItem: ForwardRefExoticComponent<StepsItemProps & RefAttributes<HTMLLIElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ItemProps } from '@zag-js/steps';
|
|
2
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
3
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
|
+
|
|
5
|
+
export interface StepsItemBaseProps extends ItemProps, PolymorphicProps {
|
|
6
|
+
}
|
|
7
|
+
export interface StepsItemProps extends HTMLProps<'li'>, StepsItemBaseProps {
|
|
8
|
+
}
|
|
9
|
+
export declare const StepsItem: ForwardRefExoticComponent<StepsItemProps & RefAttributes<HTMLLIElement>>;
|
|
@@ -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 { createSplitProps } from '../../utils/create-split-props.js';
|
|
6
|
+
import { ark } from '../factory.js';
|
|
7
|
+
import { useStepsContext } from './use-steps-context.js';
|
|
8
|
+
import { StepsItemPropsProvider } from './use-steps-item-props-context.js';
|
|
9
|
+
|
|
10
|
+
const StepsItem = forwardRef((props, ref) => {
|
|
11
|
+
const [itemProps, localProps] = createSplitProps()(props, ["index"]);
|
|
12
|
+
const steps = useStepsContext();
|
|
13
|
+
const mergedProps = mergeProps(steps.getItemProps(itemProps), localProps);
|
|
14
|
+
return /* @__PURE__ */ jsx(StepsItemPropsProvider, { value: itemProps, children: /* @__PURE__ */ jsx(ark.li, { ...mergedProps, ref }) });
|
|
15
|
+
});
|
|
16
|
+
StepsItem.displayName = "StepsItem";
|
|
17
|
+
|
|
18
|
+
export { StepsItem };
|
|
@@ -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 useStepsContext = require('./use-steps-context.cjs');
|
|
11
|
+
|
|
12
|
+
const StepsList = react.forwardRef((props, ref) => {
|
|
13
|
+
const steps = useStepsContext.useStepsContext();
|
|
14
|
+
const mergedProps = react$1.mergeProps(steps.getListProps(), props);
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.ol, { ...mergedProps, ref });
|
|
16
|
+
});
|
|
17
|
+
StepsList.displayName = "StepsList";
|
|
18
|
+
|
|
19
|
+
exports.StepsList = StepsList;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
export interface StepsListBaseProps extends PolymorphicProps {
|
|
5
|
+
}
|
|
6
|
+
export interface StepsListProps extends HTMLProps<'ol'>, StepsListBaseProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const StepsList: ForwardRefExoticComponent<StepsListProps & RefAttributes<HTMLOListElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
export interface StepsListBaseProps extends PolymorphicProps {
|
|
5
|
+
}
|
|
6
|
+
export interface StepsListProps extends HTMLProps<'ol'>, StepsListBaseProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const StepsList: ForwardRefExoticComponent<StepsListProps & RefAttributes<HTMLOListElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { mergeProps } from '@zag-js/react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { ark } from '../factory.js';
|
|
6
|
+
import { useStepsContext } from './use-steps-context.js';
|
|
7
|
+
|
|
8
|
+
const StepsList = forwardRef((props, ref) => {
|
|
9
|
+
const steps = useStepsContext();
|
|
10
|
+
const mergedProps = mergeProps(steps.getListProps(), props);
|
|
11
|
+
return /* @__PURE__ */ jsx(ark.ol, { ...mergedProps, ref });
|
|
12
|
+
});
|
|
13
|
+
StepsList.displayName = "StepsList";
|
|
14
|
+
|
|
15
|
+
export { StepsList };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const react$1 = require('@zag-js/react');
|
|
8
|
+
const react = require('react');
|
|
9
|
+
const factory = require('../factory.cjs');
|
|
10
|
+
const useStepsContext = require('./use-steps-context.cjs');
|
|
11
|
+
|
|
12
|
+
const StepsNextTrigger = react.forwardRef(
|
|
13
|
+
(props, ref) => {
|
|
14
|
+
const steps = useStepsContext.useStepsContext();
|
|
15
|
+
const mergedProps = react$1.mergeProps(steps.getNextTriggerProps(), props);
|
|
16
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.button, { ...mergedProps, ref });
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
StepsNextTrigger.displayName = "StepsNextTrigger";
|
|
20
|
+
|
|
21
|
+
exports.StepsNextTrigger = StepsNextTrigger;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
export interface StepsNextTriggerBaseProps extends PolymorphicProps {
|
|
5
|
+
}
|
|
6
|
+
export interface StepsNextTriggerProps extends HTMLProps<'button'>, StepsNextTriggerBaseProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const StepsNextTrigger: ForwardRefExoticComponent<StepsNextTriggerProps & RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
export interface StepsNextTriggerBaseProps extends PolymorphicProps {
|
|
5
|
+
}
|
|
6
|
+
export interface StepsNextTriggerProps extends HTMLProps<'button'>, StepsNextTriggerBaseProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const StepsNextTrigger: ForwardRefExoticComponent<StepsNextTriggerProps & RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { mergeProps } from '@zag-js/react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { ark } from '../factory.js';
|
|
6
|
+
import { useStepsContext } from './use-steps-context.js';
|
|
7
|
+
|
|
8
|
+
const StepsNextTrigger = forwardRef(
|
|
9
|
+
(props, ref) => {
|
|
10
|
+
const steps = useStepsContext();
|
|
11
|
+
const mergedProps = mergeProps(steps.getNextTriggerProps(), props);
|
|
12
|
+
return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
StepsNextTrigger.displayName = "StepsNextTrigger";
|
|
16
|
+
|
|
17
|
+
export { StepsNextTrigger };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const react$1 = require('@zag-js/react');
|
|
8
|
+
const react = require('react');
|
|
9
|
+
const factory = require('../factory.cjs');
|
|
10
|
+
const useStepsContext = require('./use-steps-context.cjs');
|
|
11
|
+
|
|
12
|
+
const StepsPrevTrigger = react.forwardRef(
|
|
13
|
+
(props, ref) => {
|
|
14
|
+
const steps = useStepsContext.useStepsContext();
|
|
15
|
+
const mergedProps = react$1.mergeProps(steps.getPrevTriggerProps(), props);
|
|
16
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.button, { ...mergedProps, ref });
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
StepsPrevTrigger.displayName = "StepsPrevTrigger";
|
|
20
|
+
|
|
21
|
+
exports.StepsPrevTrigger = StepsPrevTrigger;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
export interface StepsPrevTriggerBaseProps extends PolymorphicProps {
|
|
5
|
+
}
|
|
6
|
+
export interface StepsPrevTriggerProps extends HTMLProps<'button'>, StepsPrevTriggerBaseProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const StepsPrevTrigger: ForwardRefExoticComponent<StepsPrevTriggerProps & RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
export interface StepsPrevTriggerBaseProps extends PolymorphicProps {
|
|
5
|
+
}
|
|
6
|
+
export interface StepsPrevTriggerProps extends HTMLProps<'button'>, StepsPrevTriggerBaseProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const StepsPrevTrigger: ForwardRefExoticComponent<StepsPrevTriggerProps & RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { mergeProps } from '@zag-js/react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { ark } from '../factory.js';
|
|
6
|
+
import { useStepsContext } from './use-steps-context.js';
|
|
7
|
+
|
|
8
|
+
const StepsPrevTrigger = forwardRef(
|
|
9
|
+
(props, ref) => {
|
|
10
|
+
const steps = useStepsContext();
|
|
11
|
+
const mergedProps = mergeProps(steps.getPrevTriggerProps(), props);
|
|
12
|
+
return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
StepsPrevTrigger.displayName = "StepsPrevTrigger";
|
|
16
|
+
|
|
17
|
+
export { StepsPrevTrigger };
|
|
@@ -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 useStepsContext = require('./use-steps-context.cjs');
|
|
11
|
+
|
|
12
|
+
const StepsProgress = react.forwardRef((props, ref) => {
|
|
13
|
+
const steps = useStepsContext.useStepsContext();
|
|
14
|
+
const mergedProps = react$1.mergeProps(steps.getProgressProps(), props);
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
|
|
16
|
+
});
|
|
17
|
+
StepsProgress.displayName = "StepsProgress";
|
|
18
|
+
|
|
19
|
+
exports.StepsProgress = StepsProgress;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
export interface StepsProgressBaseProps extends PolymorphicProps {
|
|
5
|
+
}
|
|
6
|
+
export interface StepsProgressProps extends HTMLProps<'div'>, StepsProgressBaseProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const StepsProgress: ForwardRefExoticComponent<StepsProgressProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
export interface StepsProgressBaseProps extends PolymorphicProps {
|
|
5
|
+
}
|
|
6
|
+
export interface StepsProgressProps extends HTMLProps<'div'>, StepsProgressBaseProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const StepsProgress: ForwardRefExoticComponent<StepsProgressProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { mergeProps } from '@zag-js/react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { ark } from '../factory.js';
|
|
6
|
+
import { useStepsContext } from './use-steps-context.js';
|
|
7
|
+
|
|
8
|
+
const StepsProgress = forwardRef((props, ref) => {
|
|
9
|
+
const steps = useStepsContext();
|
|
10
|
+
const mergedProps = mergeProps(steps.getProgressProps(), props);
|
|
11
|
+
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
|
|
12
|
+
});
|
|
13
|
+
StepsProgress.displayName = "StepsProgress";
|
|
14
|
+
|
|
15
|
+
export { StepsProgress };
|
|
@@ -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 createSplitProps = require('../../utils/create-split-props.cjs');
|
|
10
|
+
const factory = require('../factory.cjs');
|
|
11
|
+
const useStepsContext = require('./use-steps-context.cjs');
|
|
12
|
+
|
|
13
|
+
const StepsRootProvider = react.forwardRef(
|
|
14
|
+
(props, ref) => {
|
|
15
|
+
const [{ value: steps }, rootProps] = createSplitProps.createSplitProps()(props, ["value"]);
|
|
16
|
+
const mergedProps = react$1.mergeProps(steps.getRootProps(), rootProps);
|
|
17
|
+
return /* @__PURE__ */ jsxRuntime.jsx(useStepsContext.StepsProvider, { value: steps, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref, children: props.children }) });
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
StepsRootProvider.displayName = "StepsRootProvider";
|
|
21
|
+
|
|
22
|
+
exports.StepsRootProvider = StepsRootProvider;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { UseStepsReturn } from './use-steps';
|
|
3
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
|
+
|
|
5
|
+
interface RootProviderProps {
|
|
6
|
+
value: UseStepsReturn;
|
|
7
|
+
}
|
|
8
|
+
export interface StepsRootProviderBaseProps extends RootProviderProps, PolymorphicProps {
|
|
9
|
+
}
|
|
10
|
+
export interface StepsRootProviderProps extends HTMLProps<'div'>, StepsRootProviderBaseProps {
|
|
11
|
+
}
|
|
12
|
+
export declare const StepsRootProvider: ForwardRefExoticComponent<StepsRootProviderProps & RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { UseStepsReturn } from './use-steps';
|
|
3
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
|
+
|
|
5
|
+
interface RootProviderProps {
|
|
6
|
+
value: UseStepsReturn;
|
|
7
|
+
}
|
|
8
|
+
export interface StepsRootProviderBaseProps extends RootProviderProps, PolymorphicProps {
|
|
9
|
+
}
|
|
10
|
+
export interface StepsRootProviderProps extends HTMLProps<'div'>, StepsRootProviderBaseProps {
|
|
11
|
+
}
|
|
12
|
+
export declare const StepsRootProvider: ForwardRefExoticComponent<StepsRootProviderProps & RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export {};
|
|
@@ -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 { createSplitProps } from '../../utils/create-split-props.js';
|
|
6
|
+
import { ark } from '../factory.js';
|
|
7
|
+
import { StepsProvider } from './use-steps-context.js';
|
|
8
|
+
|
|
9
|
+
const StepsRootProvider = forwardRef(
|
|
10
|
+
(props, ref) => {
|
|
11
|
+
const [{ value: steps }, rootProps] = createSplitProps()(props, ["value"]);
|
|
12
|
+
const mergedProps = mergeProps(steps.getRootProps(), rootProps);
|
|
13
|
+
return /* @__PURE__ */ jsx(StepsProvider, { value: steps, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref, children: props.children }) });
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
StepsRootProvider.displayName = "StepsRootProvider";
|
|
17
|
+
|
|
18
|
+
export { StepsRootProvider };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const react$1 = require('@zag-js/react');
|
|
8
|
+
const react = require('react');
|
|
9
|
+
const createSplitProps = require('../../utils/create-split-props.cjs');
|
|
10
|
+
const factory = require('../factory.cjs');
|
|
11
|
+
const useSteps = require('./use-steps.cjs');
|
|
12
|
+
const useStepsContext = require('./use-steps-context.cjs');
|
|
13
|
+
|
|
14
|
+
const StepsRoot = react.forwardRef((props, ref) => {
|
|
15
|
+
const [useStepsProps, localProps] = createSplitProps.createSplitProps()(props, [
|
|
16
|
+
"defaultStep",
|
|
17
|
+
"id",
|
|
18
|
+
"ids",
|
|
19
|
+
"count",
|
|
20
|
+
"linear",
|
|
21
|
+
"onStepChange",
|
|
22
|
+
"onStepComplete",
|
|
23
|
+
"orientation",
|
|
24
|
+
"step"
|
|
25
|
+
]);
|
|
26
|
+
const steps = useSteps.useSteps(useStepsProps);
|
|
27
|
+
const mergedProps = react$1.mergeProps(steps.getRootProps(), localProps);
|
|
28
|
+
return /* @__PURE__ */ jsxRuntime.jsx(useStepsContext.StepsProvider, { value: steps, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref }) });
|
|
29
|
+
});
|
|
30
|
+
StepsRoot.displayName = "StepsRoot";
|
|
31
|
+
|
|
32
|
+
exports.StepsRoot = StepsRoot;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { UseStepsProps } from './use-steps';
|
|
3
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
|
+
|
|
5
|
+
export interface StepsRootBaseProps extends UseStepsProps, PolymorphicProps {
|
|
6
|
+
}
|
|
7
|
+
export interface StepsRootProps extends HTMLProps<'div'>, StepsRootBaseProps {
|
|
8
|
+
}
|
|
9
|
+
export declare const StepsRoot: ForwardRefExoticComponent<StepsRootProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { UseStepsProps } from './use-steps';
|
|
3
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
|
+
|
|
5
|
+
export interface StepsRootBaseProps extends UseStepsProps, PolymorphicProps {
|
|
6
|
+
}
|
|
7
|
+
export interface StepsRootProps extends HTMLProps<'div'>, StepsRootBaseProps {
|
|
8
|
+
}
|
|
9
|
+
export declare const StepsRoot: ForwardRefExoticComponent<StepsRootProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { mergeProps } from '@zag-js/react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { createSplitProps } from '../../utils/create-split-props.js';
|
|
6
|
+
import { ark } from '../factory.js';
|
|
7
|
+
import { useSteps } from './use-steps.js';
|
|
8
|
+
import { StepsProvider } from './use-steps-context.js';
|
|
9
|
+
|
|
10
|
+
const StepsRoot = forwardRef((props, ref) => {
|
|
11
|
+
const [useStepsProps, localProps] = createSplitProps()(props, [
|
|
12
|
+
"defaultStep",
|
|
13
|
+
"id",
|
|
14
|
+
"ids",
|
|
15
|
+
"count",
|
|
16
|
+
"linear",
|
|
17
|
+
"onStepChange",
|
|
18
|
+
"onStepComplete",
|
|
19
|
+
"orientation",
|
|
20
|
+
"step"
|
|
21
|
+
]);
|
|
22
|
+
const steps = useSteps(useStepsProps);
|
|
23
|
+
const mergedProps = mergeProps(steps.getRootProps(), localProps);
|
|
24
|
+
return /* @__PURE__ */ jsx(StepsProvider, { value: steps, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) });
|
|
25
|
+
});
|
|
26
|
+
StepsRoot.displayName = "StepsRoot";
|
|
27
|
+
|
|
28
|
+
export { StepsRoot };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const react$1 = require('@zag-js/react');
|
|
8
|
+
const react = require('react');
|
|
9
|
+
const factory = require('../factory.cjs');
|
|
10
|
+
const useStepsContext = require('./use-steps-context.cjs');
|
|
11
|
+
const useStepsItemPropsContext = require('./use-steps-item-props-context.cjs');
|
|
12
|
+
|
|
13
|
+
const StepsSeparator = react.forwardRef((props, ref) => {
|
|
14
|
+
const steps = useStepsContext.useStepsContext();
|
|
15
|
+
const itemProps = useStepsItemPropsContext.useStepsItemPropsContext();
|
|
16
|
+
const mergedProps = react$1.mergeProps(steps.getSeparatorProps(itemProps), props);
|
|
17
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
|
|
18
|
+
});
|
|
19
|
+
StepsSeparator.displayName = "StepsSeparator";
|
|
20
|
+
|
|
21
|
+
exports.StepsSeparator = StepsSeparator;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
export interface StepsSeparatorBaseProps extends PolymorphicProps {
|
|
5
|
+
}
|
|
6
|
+
export interface StepsSeparatorProps extends HTMLProps<'div'>, StepsSeparatorBaseProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const StepsSeparator: ForwardRefExoticComponent<StepsSeparatorProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
export interface StepsSeparatorBaseProps extends PolymorphicProps {
|
|
5
|
+
}
|
|
6
|
+
export interface StepsSeparatorProps extends HTMLProps<'div'>, StepsSeparatorBaseProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const StepsSeparator: ForwardRefExoticComponent<StepsSeparatorProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { mergeProps } from '@zag-js/react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { ark } from '../factory.js';
|
|
6
|
+
import { useStepsContext } from './use-steps-context.js';
|
|
7
|
+
import { useStepsItemPropsContext } from './use-steps-item-props-context.js';
|
|
8
|
+
|
|
9
|
+
const StepsSeparator = forwardRef((props, ref) => {
|
|
10
|
+
const steps = useStepsContext();
|
|
11
|
+
const itemProps = useStepsItemPropsContext();
|
|
12
|
+
const mergedProps = mergeProps(steps.getSeparatorProps(itemProps), props);
|
|
13
|
+
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
|
|
14
|
+
});
|
|
15
|
+
StepsSeparator.displayName = "StepsSeparator";
|
|
16
|
+
|
|
17
|
+
export { StepsSeparator };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const react$1 = require('@zag-js/react');
|
|
8
|
+
const react = require('react');
|
|
9
|
+
const factory = require('../factory.cjs');
|
|
10
|
+
const useStepsContext = require('./use-steps-context.cjs');
|
|
11
|
+
const useStepsItemPropsContext = require('./use-steps-item-props-context.cjs');
|
|
12
|
+
|
|
13
|
+
const StepsTrigger = react.forwardRef((props, ref) => {
|
|
14
|
+
const steps = useStepsContext.useStepsContext();
|
|
15
|
+
const itemProps = useStepsItemPropsContext.useStepsItemPropsContext();
|
|
16
|
+
const mergedProps = react$1.mergeProps(steps.getTriggerProps(itemProps), props);
|
|
17
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.button, { ...mergedProps, ref });
|
|
18
|
+
});
|
|
19
|
+
StepsTrigger.displayName = "StepsTrigger";
|
|
20
|
+
|
|
21
|
+
exports.StepsTrigger = StepsTrigger;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
export interface StepsTriggerBaseProps extends PolymorphicProps {
|
|
5
|
+
}
|
|
6
|
+
export interface StepsTriggerProps extends HTMLProps<'button'>, StepsTriggerBaseProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const StepsTrigger: ForwardRefExoticComponent<StepsTriggerProps & RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
export interface StepsTriggerBaseProps extends PolymorphicProps {
|
|
5
|
+
}
|
|
6
|
+
export interface StepsTriggerProps extends HTMLProps<'button'>, StepsTriggerBaseProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const StepsTrigger: ForwardRefExoticComponent<StepsTriggerProps & RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { mergeProps } from '@zag-js/react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { ark } from '../factory.js';
|
|
6
|
+
import { useStepsContext } from './use-steps-context.js';
|
|
7
|
+
import { useStepsItemPropsContext } from './use-steps-item-props-context.js';
|
|
8
|
+
|
|
9
|
+
const StepsTrigger = forwardRef((props, ref) => {
|
|
10
|
+
const steps = useStepsContext();
|
|
11
|
+
const itemProps = useStepsItemPropsContext();
|
|
12
|
+
const mergedProps = mergeProps(steps.getTriggerProps(itemProps), props);
|
|
13
|
+
return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });
|
|
14
|
+
});
|
|
15
|
+
StepsTrigger.displayName = "StepsTrigger";
|
|
16
|
+
|
|
17
|
+
export { StepsTrigger };
|