@ark-ui/react 4.7.0 → 4.8.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.
- package/dist/components/accordion/accordion.d.cts +6 -6
- package/dist/components/accordion/accordion.d.ts +6 -6
- package/dist/components/accordion/index.d.cts +2 -2
- package/dist/components/accordion/index.d.ts +2 -2
- package/dist/components/avatar/avatar.d.cts +4 -4
- package/dist/components/avatar/avatar.d.ts +4 -4
- package/dist/components/avatar/index.d.cts +6 -6
- package/dist/components/avatar/index.d.ts +6 -6
- package/dist/components/carousel/carousel.d.cts +1 -1
- package/dist/components/carousel/carousel.d.ts +1 -1
- package/dist/components/carousel/index.d.cts +3 -3
- package/dist/components/carousel/index.d.ts +3 -3
- package/dist/components/checkbox/checkbox.d.cts +7 -7
- package/dist/components/checkbox/checkbox.d.ts +7 -7
- package/dist/components/checkbox/index.d.cts +2 -2
- package/dist/components/checkbox/index.d.ts +2 -2
- package/dist/components/clipboard/clipboard.d.cts +8 -8
- package/dist/components/clipboard/clipboard.d.ts +8 -8
- package/dist/components/collapsible/collapsible.d.cts +4 -4
- package/dist/components/collapsible/collapsible.d.ts +4 -4
- package/dist/components/collapsible/index.d.cts +1 -1
- package/dist/components/collapsible/index.d.ts +1 -1
- package/dist/components/color-picker/index.d.cts +1 -1
- package/dist/components/color-picker/index.d.ts +1 -1
- package/dist/components/combobox/combobox.d.cts +15 -15
- package/dist/components/combobox/combobox.d.ts +15 -15
- package/dist/components/combobox/index.d.cts +5 -5
- package/dist/components/combobox/index.d.ts +5 -5
- package/dist/components/date-picker/index.d.cts +2 -2
- package/dist/components/date-picker/index.d.ts +2 -2
- package/dist/components/dialog/index.d.cts +3 -3
- package/dist/components/dialog/index.d.ts +3 -3
- package/dist/components/editable/editable.d.cts +10 -10
- package/dist/components/editable/editable.d.ts +10 -10
- package/dist/components/editable/index.d.cts +3 -3
- package/dist/components/editable/index.d.ts +3 -3
- package/dist/components/field/index.cjs +2 -2
- package/dist/components/field/index.d.cts +1 -1
- package/dist/components/field/index.d.ts +1 -1
- package/dist/components/field/index.js +1 -1
- package/dist/components/fieldset/fieldset.cjs +8 -8
- package/dist/components/fieldset/fieldset.d.cts +5 -5
- package/dist/components/fieldset/fieldset.d.ts +5 -5
- package/dist/components/fieldset/fieldset.js +4 -4
- package/dist/components/fieldset/use-fieldset.cjs +1 -1
- package/dist/components/fieldset/use-fieldset.js +1 -1
- package/dist/components/file-upload/file-upload-dropzone.cjs +12 -7
- package/dist/components/file-upload/file-upload-dropzone.d.cts +3 -2
- package/dist/components/file-upload/file-upload-dropzone.d.ts +3 -2
- package/dist/components/file-upload/file-upload-dropzone.js +12 -7
- package/dist/components/file-upload/file-upload-item-preview-image.cjs +5 -1
- package/dist/components/file-upload/file-upload-item-preview-image.d.cts +1 -1
- package/dist/components/file-upload/file-upload-item-preview-image.d.ts +1 -1
- package/dist/components/file-upload/file-upload-item-preview-image.js +5 -1
- package/dist/components/focus-trap/focus-trap.cjs +34 -0
- package/dist/components/focus-trap/focus-trap.d.cts +15 -0
- package/dist/components/focus-trap/focus-trap.d.ts +15 -0
- package/dist/components/focus-trap/focus-trap.js +30 -0
- package/dist/components/focus-trap/index.cjs +9 -0
- package/dist/components/focus-trap/index.d.cts +2 -0
- package/dist/components/focus-trap/index.d.ts +2 -0
- package/dist/components/focus-trap/index.js +1 -0
- package/dist/components/format/format.d.cts +2 -2
- package/dist/components/format/format.d.ts +2 -2
- package/dist/components/format/index.d.cts +2 -2
- package/dist/components/format/index.d.ts +2 -2
- package/dist/components/frame/index.d.cts +1 -1
- package/dist/components/frame/index.d.ts +1 -1
- package/dist/components/highlight/index.d.cts +1 -1
- package/dist/components/highlight/index.d.ts +1 -1
- package/dist/components/hover-card/hover-card.d.cts +7 -7
- package/dist/components/hover-card/hover-card.d.ts +7 -7
- package/dist/components/hover-card/index.d.cts +1 -1
- package/dist/components/hover-card/index.d.ts +1 -1
- package/dist/components/index.cjs +42 -4
- package/dist/components/index.d.cts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +23 -3
- package/dist/components/menu/index.d.cts +9 -9
- package/dist/components/menu/index.d.ts +9 -9
- package/dist/components/menu/menu.d.cts +19 -19
- package/dist/components/menu/menu.d.ts +19 -19
- package/dist/components/number-input/index.d.cts +1 -1
- package/dist/components/number-input/index.d.ts +1 -1
- package/dist/components/pagination/index.d.cts +1 -1
- package/dist/components/pagination/index.d.ts +1 -1
- package/dist/components/pagination/pagination.d.cts +7 -7
- package/dist/components/pagination/pagination.d.ts +7 -7
- package/dist/components/pin-input/index.d.cts +2 -2
- package/dist/components/pin-input/index.d.ts +2 -2
- package/dist/components/pin-input/pin-input.d.cts +6 -6
- package/dist/components/pin-input/pin-input.d.ts +6 -6
- package/dist/components/popover/index.d.cts +4 -4
- package/dist/components/popover/index.d.ts +4 -4
- package/dist/components/popover/popover.d.cts +12 -12
- package/dist/components/popover/popover.d.ts +12 -12
- package/dist/components/portal/index.d.cts +1 -1
- package/dist/components/portal/index.d.ts +1 -1
- package/dist/components/presence/index.d.cts +1 -1
- package/dist/components/presence/index.d.ts +1 -1
- package/dist/components/progress/index.d.cts +3 -3
- package/dist/components/progress/index.d.ts +3 -3
- package/dist/components/progress/progress.d.cts +10 -10
- package/dist/components/progress/progress.d.ts +10 -10
- package/dist/components/qr-code/index.d.cts +3 -3
- package/dist/components/qr-code/index.d.ts +3 -3
- package/dist/components/radio-group/index.d.cts +2 -2
- package/dist/components/radio-group/index.d.ts +2 -2
- package/dist/components/radio-group/radio-group.d.cts +8 -8
- package/dist/components/radio-group/radio-group.d.ts +8 -8
- package/dist/components/rating-group/index.d.cts +1 -1
- package/dist/components/rating-group/index.d.ts +1 -1
- package/dist/components/rating-group/rating-group.cjs +2 -2
- package/dist/components/rating-group/rating-group.d.cts +6 -6
- package/dist/components/rating-group/rating-group.d.ts +6 -6
- package/dist/components/rating-group/rating-group.js +1 -1
- package/dist/components/segment-group/index.d.cts +1 -1
- package/dist/components/segment-group/index.d.ts +1 -1
- package/dist/components/select/index.d.cts +6 -6
- package/dist/components/select/index.d.ts +6 -6
- package/dist/components/select/select.d.cts +17 -17
- package/dist/components/select/select.d.ts +17 -17
- package/dist/components/signature-pad/index.d.cts +1 -1
- package/dist/components/signature-pad/index.d.ts +1 -1
- package/dist/components/signature-pad/signature-pad.d.cts +8 -8
- package/dist/components/signature-pad/signature-pad.d.ts +8 -8
- package/dist/components/slider/index.d.cts +7 -7
- package/dist/components/slider/index.d.ts +7 -7
- package/dist/components/splitter/index.d.cts +2 -2
- package/dist/components/splitter/index.d.ts +2 -2
- package/dist/components/splitter/splitter.d.cts +4 -4
- package/dist/components/splitter/splitter.d.ts +4 -4
- package/dist/components/steps/steps.cjs +6 -6
- package/dist/components/steps/steps.d.cts +3 -3
- package/dist/components/steps/steps.d.ts +3 -3
- package/dist/components/steps/steps.js +3 -3
- package/dist/components/switch/index.d.cts +4 -4
- package/dist/components/switch/index.d.ts +4 -4
- package/dist/components/switch/switch.d.cts +6 -6
- package/dist/components/switch/switch.d.ts +6 -6
- package/dist/components/tabs/index.d.cts +6 -6
- package/dist/components/tabs/index.d.ts +6 -6
- package/dist/components/tabs/tabs.d.cts +6 -6
- package/dist/components/tabs/tabs.d.ts +6 -6
- package/dist/components/tags-input/index.d.cts +2 -2
- package/dist/components/tags-input/index.d.ts +2 -2
- package/dist/components/tags-input/tags-input.d.cts +12 -12
- package/dist/components/tags-input/tags-input.d.ts +12 -12
- package/dist/components/time-picker/index.d.cts +1 -1
- package/dist/components/time-picker/index.d.ts +1 -1
- package/dist/components/time-picker/time-picker.d.cts +1 -1
- package/dist/components/time-picker/time-picker.d.ts +1 -1
- package/dist/components/timer/timer.d.cts +1 -1
- package/dist/components/timer/timer.d.ts +1 -1
- package/dist/components/toast/index.d.cts +5 -5
- package/dist/components/toast/index.d.ts +5 -5
- package/dist/components/toggle/index.cjs +2 -2
- package/dist/components/toggle/index.d.cts +2 -2
- package/dist/components/toggle/index.d.ts +2 -2
- package/dist/components/toggle/index.js +2 -2
- package/dist/components/toggle/toggle.d.cts +1 -1
- package/dist/components/toggle/toggle.d.ts +1 -1
- package/dist/components/toggle-group/index.d.cts +1 -1
- package/dist/components/toggle-group/index.d.ts +1 -1
- package/dist/components/tooltip/index.d.cts +3 -3
- package/dist/components/tooltip/index.d.ts +3 -3
- package/dist/components/tooltip/tooltip.d.cts +7 -7
- package/dist/components/tooltip/tooltip.d.ts +7 -7
- package/dist/components/tour/index.cjs +45 -0
- package/dist/components/tour/index.d.cts +20 -0
- package/dist/components/tour/index.d.ts +20 -0
- package/dist/components/tour/index.js +20 -0
- package/dist/components/tour/tour-action-trigger.cjs +25 -0
- package/dist/components/tour/tour-action-trigger.d.cts +8 -0
- package/dist/components/tour/tour-action-trigger.d.ts +8 -0
- package/dist/components/tour/tour-action-trigger.js +21 -0
- package/dist/components/tour/tour-actions.cjs +10 -0
- package/dist/components/tour/tour-actions.d.cts +6 -0
- package/dist/components/tour/tour-actions.d.ts +6 -0
- package/dist/components/tour/tour-actions.js +6 -0
- package/dist/components/tour/tour-arrow-tip.cjs +19 -0
- package/dist/components/tour/tour-arrow-tip.d.cts +7 -0
- package/dist/components/tour/tour-arrow-tip.d.ts +7 -0
- package/dist/components/tour/tour-arrow-tip.js +15 -0
- package/dist/components/tour/tour-arrow.cjs +19 -0
- package/dist/components/tour/tour-arrow.d.cts +7 -0
- package/dist/components/tour/tour-arrow.d.ts +7 -0
- package/dist/components/tour/tour-arrow.js +15 -0
- package/dist/components/tour/tour-backdrop.cjs +30 -0
- package/dist/components/tour/tour-backdrop.d.cts +7 -0
- package/dist/components/tour/tour-backdrop.d.ts +7 -0
- package/dist/components/tour/tour-backdrop.js +26 -0
- package/dist/components/tour/tour-close-trigger.cjs +21 -0
- package/dist/components/tour/tour-close-trigger.d.cts +7 -0
- package/dist/components/tour/tour-close-trigger.d.ts +7 -0
- package/dist/components/tour/tour-close-trigger.js +17 -0
- package/dist/components/tour/tour-content.cjs +25 -0
- package/dist/components/tour/tour-content.d.cts +7 -0
- package/dist/components/tour/tour-content.d.ts +7 -0
- package/dist/components/tour/tour-content.js +21 -0
- package/dist/components/tour/tour-context.cjs +10 -0
- package/dist/components/tour/tour-context.d.cts +6 -0
- package/dist/components/tour/tour-context.d.ts +6 -0
- package/dist/components/tour/tour-context.js +6 -0
- package/dist/components/tour/tour-control.cjs +14 -0
- package/dist/components/tour/tour-control.d.cts +7 -0
- package/dist/components/tour/tour-control.d.ts +7 -0
- package/dist/components/tour/tour-control.js +10 -0
- package/dist/components/tour/tour-description.cjs +19 -0
- package/dist/components/tour/tour-description.d.cts +7 -0
- package/dist/components/tour/tour-description.d.ts +7 -0
- package/dist/components/tour/tour-description.js +15 -0
- package/dist/components/tour/tour-positioner.cjs +24 -0
- package/dist/components/tour/tour-positioner.d.cts +7 -0
- package/dist/components/tour/tour-positioner.d.ts +7 -0
- package/dist/components/tour/tour-positioner.js +20 -0
- package/dist/components/tour/tour-progress-text.cjs +19 -0
- package/dist/components/tour/tour-progress-text.d.cts +7 -0
- package/dist/components/tour/tour-progress-text.d.ts +7 -0
- package/dist/components/tour/tour-progress-text.js +15 -0
- package/dist/components/tour/tour-root.cjs +21 -0
- package/dist/components/tour/tour-root.d.cts +10 -0
- package/dist/components/tour/tour-root.d.ts +10 -0
- package/dist/components/tour/tour-root.js +17 -0
- package/dist/components/tour/tour-spotlight.cjs +31 -0
- package/dist/components/tour/tour-spotlight.d.cts +7 -0
- package/dist/components/tour/tour-spotlight.d.ts +7 -0
- package/dist/components/tour/tour-spotlight.js +27 -0
- package/dist/components/tour/tour-title.cjs +19 -0
- package/dist/components/tour/tour-title.d.cts +7 -0
- package/dist/components/tour/tour-title.d.ts +7 -0
- package/dist/components/tour/tour-title.js +15 -0
- package/dist/components/tour/tour.anatomy.cjs +10 -0
- package/dist/components/tour/tour.anatomy.d.cts +2 -0
- package/dist/components/tour/tour.anatomy.d.ts +2 -0
- package/dist/components/tour/tour.anatomy.js +6 -0
- package/dist/components/tour/tour.cjs +37 -0
- package/dist/components/tour/tour.d.cts +16 -0
- package/dist/components/tour/tour.d.ts +16 -0
- package/dist/components/tour/tour.js +15 -0
- package/dist/components/tour/use-tour-context.cjs +15 -0
- package/dist/components/tour/use-tour-context.d.cts +6 -0
- package/dist/components/tour/use-tour-context.d.ts +6 -0
- package/dist/components/tour/use-tour-context.js +10 -0
- package/dist/components/tour/use-tour.cjs +49 -0
- package/dist/components/tour/use-tour.d.cts +8 -0
- package/dist/components/tour/use-tour.d.ts +8 -0
- package/dist/components/tour/use-tour.js +26 -0
- package/dist/index.cjs +42 -4
- package/dist/index.js +23 -3
- package/dist/providers/environment/index.d.cts +2 -2
- package/dist/providers/environment/index.d.ts +2 -2
- package/package.json +58 -56
|
@@ -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 useTourContext = require('./use-tour-context.cjs');
|
|
11
|
+
|
|
12
|
+
const TourCloseTrigger = react.forwardRef(
|
|
13
|
+
(props, ref) => {
|
|
14
|
+
const tour = useTourContext.useTourContext();
|
|
15
|
+
const mergedProps = react$1.mergeProps(tour.getCloseTriggerProps(), props);
|
|
16
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.button, { ...mergedProps, ref });
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
TourCloseTrigger.displayName = "TourCloseTrigger";
|
|
20
|
+
|
|
21
|
+
exports.TourCloseTrigger = TourCloseTrigger;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
export interface TourCloseTriggerBaseProps extends PolymorphicProps {
|
|
4
|
+
}
|
|
5
|
+
export interface TourCloseTriggerProps extends HTMLProps<'button'>, TourCloseTriggerBaseProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const TourCloseTrigger: ForwardRefExoticComponent<TourCloseTriggerProps & RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
export interface TourCloseTriggerBaseProps extends PolymorphicProps {
|
|
4
|
+
}
|
|
5
|
+
export interface TourCloseTriggerProps extends HTMLProps<'button'>, TourCloseTriggerBaseProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const TourCloseTrigger: ForwardRefExoticComponent<TourCloseTriggerProps & 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 { useTourContext } from './use-tour-context.js';
|
|
7
|
+
|
|
8
|
+
const TourCloseTrigger = forwardRef(
|
|
9
|
+
(props, ref) => {
|
|
10
|
+
const tour = useTourContext();
|
|
11
|
+
const mergedProps = mergeProps(tour.getCloseTriggerProps(), props);
|
|
12
|
+
return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
TourCloseTrigger.displayName = "TourCloseTrigger";
|
|
16
|
+
|
|
17
|
+
export { TourCloseTrigger };
|
|
@@ -0,0 +1,25 @@
|
|
|
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 composeRefs = require('../../utils/compose-refs.cjs');
|
|
10
|
+
const factory = require('../factory.cjs');
|
|
11
|
+
const usePresenceContext = require('../presence/use-presence-context.cjs');
|
|
12
|
+
const useTourContext = require('./use-tour-context.cjs');
|
|
13
|
+
|
|
14
|
+
const TourContent = react.forwardRef((props, ref) => {
|
|
15
|
+
const tour = useTourContext.useTourContext();
|
|
16
|
+
const presence = usePresenceContext.usePresenceContext();
|
|
17
|
+
const mergedProps = react$1.mergeProps(tour.getContentProps(), presence.getPresenceProps(), props);
|
|
18
|
+
if (presence.unmounted) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref: composeRefs.composeRefs(presence.ref, ref) });
|
|
22
|
+
});
|
|
23
|
+
TourContent.displayName = "TourContent";
|
|
24
|
+
|
|
25
|
+
exports.TourContent = TourContent;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
export interface TourContentBaseProps extends PolymorphicProps {
|
|
4
|
+
}
|
|
5
|
+
export interface TourContentProps extends HTMLProps<'div'>, TourContentBaseProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const TourContent: ForwardRefExoticComponent<TourContentProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
export interface TourContentBaseProps extends PolymorphicProps {
|
|
4
|
+
}
|
|
5
|
+
export interface TourContentProps extends HTMLProps<'div'>, TourContentBaseProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const TourContent: ForwardRefExoticComponent<TourContentProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { mergeProps } from '@zag-js/react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { composeRefs } from '../../utils/compose-refs.js';
|
|
6
|
+
import { ark } from '../factory.js';
|
|
7
|
+
import { usePresenceContext } from '../presence/use-presence-context.js';
|
|
8
|
+
import { useTourContext } from './use-tour-context.js';
|
|
9
|
+
|
|
10
|
+
const TourContent = forwardRef((props, ref) => {
|
|
11
|
+
const tour = useTourContext();
|
|
12
|
+
const presence = usePresenceContext();
|
|
13
|
+
const mergedProps = mergeProps(tour.getContentProps(), presence.getPresenceProps(), props);
|
|
14
|
+
if (presence.unmounted) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref: composeRefs(presence.ref, ref) });
|
|
18
|
+
});
|
|
19
|
+
TourContent.displayName = "TourContent";
|
|
20
|
+
|
|
21
|
+
export { TourContent };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const useTourContext = require('./use-tour-context.cjs');
|
|
7
|
+
|
|
8
|
+
const TourContext = (props) => props.children(useTourContext.useTourContext());
|
|
9
|
+
|
|
10
|
+
exports.TourContext = TourContext;
|
|
@@ -0,0 +1,14 @@
|
|
|
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 = require('react');
|
|
8
|
+
const factory = require('../factory.cjs');
|
|
9
|
+
const tour_anatomy = require('./tour.anatomy.cjs');
|
|
10
|
+
|
|
11
|
+
const TourControl = react.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...tour_anatomy.tourAnatomy.build().control.attrs, ...props, ref }));
|
|
12
|
+
TourControl.displayName = "TourControl";
|
|
13
|
+
|
|
14
|
+
exports.TourControl = TourControl;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
export interface TourControlBaseProps extends PolymorphicProps {
|
|
4
|
+
}
|
|
5
|
+
export interface TourControlProps extends HTMLProps<'div'>, TourControlBaseProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const TourControl: ForwardRefExoticComponent<TourControlProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
export interface TourControlBaseProps extends PolymorphicProps {
|
|
4
|
+
}
|
|
5
|
+
export interface TourControlProps extends HTMLProps<'div'>, TourControlBaseProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const TourControl: ForwardRefExoticComponent<TourControlProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { ark } from '../factory.js';
|
|
5
|
+
import { tourAnatomy } from './tour.anatomy.js';
|
|
6
|
+
|
|
7
|
+
const TourControl = forwardRef((props, ref) => /* @__PURE__ */ jsx(ark.div, { ...tourAnatomy.build().control.attrs, ...props, ref }));
|
|
8
|
+
TourControl.displayName = "TourControl";
|
|
9
|
+
|
|
10
|
+
export { TourControl };
|
|
@@ -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 useTourContext = require('./use-tour-context.cjs');
|
|
11
|
+
|
|
12
|
+
const TourDescription = react.forwardRef((props, ref) => {
|
|
13
|
+
const tour = useTourContext.useTourContext();
|
|
14
|
+
const mergedProps = react$1.mergeProps(tour.getDescriptionProps(), props);
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref, children: mergedProps.children || tour.step?.description });
|
|
16
|
+
});
|
|
17
|
+
TourDescription.displayName = "TourDescription";
|
|
18
|
+
|
|
19
|
+
exports.TourDescription = TourDescription;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
export interface TourDescriptionBaseProps extends PolymorphicProps {
|
|
4
|
+
}
|
|
5
|
+
export interface TourDescriptionProps extends HTMLProps<'div'>, TourDescriptionBaseProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const TourDescription: ForwardRefExoticComponent<TourDescriptionProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
export interface TourDescriptionBaseProps extends PolymorphicProps {
|
|
4
|
+
}
|
|
5
|
+
export interface TourDescriptionProps extends HTMLProps<'div'>, TourDescriptionBaseProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const TourDescription: ForwardRefExoticComponent<TourDescriptionProps & 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 { useTourContext } from './use-tour-context.js';
|
|
7
|
+
|
|
8
|
+
const TourDescription = forwardRef((props, ref) => {
|
|
9
|
+
const tour = useTourContext();
|
|
10
|
+
const mergedProps = mergeProps(tour.getDescriptionProps(), props);
|
|
11
|
+
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref, children: mergedProps.children || tour.step?.description });
|
|
12
|
+
});
|
|
13
|
+
TourDescription.displayName = "TourDescription";
|
|
14
|
+
|
|
15
|
+
export { TourDescription };
|
|
@@ -0,0 +1,24 @@
|
|
|
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 usePresenceContext = require('../presence/use-presence-context.cjs');
|
|
11
|
+
const useTourContext = require('./use-tour-context.cjs');
|
|
12
|
+
|
|
13
|
+
const TourPositioner = react.forwardRef((props, ref) => {
|
|
14
|
+
const tour = useTourContext.useTourContext();
|
|
15
|
+
const mergedProps = react$1.mergeProps(tour.getPositionerProps(), props);
|
|
16
|
+
const presence = usePresenceContext.usePresenceContext();
|
|
17
|
+
if (presence.unmounted) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
|
|
21
|
+
});
|
|
22
|
+
TourPositioner.displayName = "TourPositioner";
|
|
23
|
+
|
|
24
|
+
exports.TourPositioner = TourPositioner;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
export interface TourPositionerBaseProps extends PolymorphicProps {
|
|
4
|
+
}
|
|
5
|
+
export interface TourPositionerProps extends HTMLProps<'div'>, TourPositionerBaseProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const TourPositioner: ForwardRefExoticComponent<TourPositionerProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
export interface TourPositionerBaseProps extends PolymorphicProps {
|
|
4
|
+
}
|
|
5
|
+
export interface TourPositionerProps extends HTMLProps<'div'>, TourPositionerBaseProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const TourPositioner: ForwardRefExoticComponent<TourPositionerProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
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 { usePresenceContext } from '../presence/use-presence-context.js';
|
|
7
|
+
import { useTourContext } from './use-tour-context.js';
|
|
8
|
+
|
|
9
|
+
const TourPositioner = forwardRef((props, ref) => {
|
|
10
|
+
const tour = useTourContext();
|
|
11
|
+
const mergedProps = mergeProps(tour.getPositionerProps(), props);
|
|
12
|
+
const presence = usePresenceContext();
|
|
13
|
+
if (presence.unmounted) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
|
|
17
|
+
});
|
|
18
|
+
TourPositioner.displayName = "TourPositioner";
|
|
19
|
+
|
|
20
|
+
export { TourPositioner };
|
|
@@ -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 useTourContext = require('./use-tour-context.cjs');
|
|
11
|
+
|
|
12
|
+
const TourProgressText = react.forwardRef((props, ref) => {
|
|
13
|
+
const tour = useTourContext.useTourContext();
|
|
14
|
+
const mergedProps = react$1.mergeProps(tour.getProgressTextProps(), props);
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref, children: mergedProps.children || tour.getProgressText() });
|
|
16
|
+
});
|
|
17
|
+
TourProgressText.displayName = "TourProgressText";
|
|
18
|
+
|
|
19
|
+
exports.TourProgressText = TourProgressText;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
export interface TourProgressTextBaseProps extends PolymorphicProps {
|
|
4
|
+
}
|
|
5
|
+
export interface TourProgressTextProps extends HTMLProps<"div">, TourProgressTextBaseProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const TourProgressText: ForwardRefExoticComponent<TourProgressTextProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
export interface TourProgressTextBaseProps extends PolymorphicProps {
|
|
4
|
+
}
|
|
5
|
+
export interface TourProgressTextProps extends HTMLProps<"div">, TourProgressTextBaseProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const TourProgressText: ForwardRefExoticComponent<TourProgressTextProps & 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 { useTourContext } from './use-tour-context.js';
|
|
7
|
+
|
|
8
|
+
const TourProgressText = forwardRef((props, ref) => {
|
|
9
|
+
const tour = useTourContext();
|
|
10
|
+
const mergedProps = mergeProps(tour.getProgressTextProps(), props);
|
|
11
|
+
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref, children: mergedProps.children || tour.getProgressText() });
|
|
12
|
+
});
|
|
13
|
+
TourProgressText.displayName = "TourProgressText";
|
|
14
|
+
|
|
15
|
+
export { TourProgressText };
|
|
@@ -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 = require('@zag-js/react');
|
|
8
|
+
const renderStrategy = require('../../utils/render-strategy.cjs');
|
|
9
|
+
const splitPresenceProps = require('../presence/split-presence-props.cjs');
|
|
10
|
+
const usePresence = require('../presence/use-presence.cjs');
|
|
11
|
+
const usePresenceContext = require('../presence/use-presence-context.cjs');
|
|
12
|
+
const useTourContext = require('./use-tour-context.cjs');
|
|
13
|
+
|
|
14
|
+
const TourRoot = (props) => {
|
|
15
|
+
const [presenceProps, { children, tour }] = splitPresenceProps.splitPresenceProps(props);
|
|
16
|
+
const [renderStrategyProps] = renderStrategy.splitRenderStrategyProps(presenceProps);
|
|
17
|
+
const presence = usePresence.usePresence(react.mergeProps({ present: tour.open }, presenceProps));
|
|
18
|
+
return /* @__PURE__ */ jsxRuntime.jsx(useTourContext.TourProvider, { value: tour, children: /* @__PURE__ */ jsxRuntime.jsx(renderStrategy.RenderStrategyPropsProvider, { value: renderStrategyProps, children: /* @__PURE__ */ jsxRuntime.jsx(usePresenceContext.PresenceProvider, { value: presence, children }) }) });
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.TourRoot = TourRoot;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { UsePresenceProps } from '../presence';
|
|
3
|
+
import { UseTourReturn } from './use-tour';
|
|
4
|
+
export interface TourRootBaseProps extends UsePresenceProps {
|
|
5
|
+
tour: UseTourReturn;
|
|
6
|
+
}
|
|
7
|
+
export interface TourRootProps extends TourRootBaseProps {
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const TourRoot: (props: TourRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { UsePresenceProps } from '../presence';
|
|
3
|
+
import { UseTourReturn } from './use-tour';
|
|
4
|
+
export interface TourRootBaseProps extends UsePresenceProps {
|
|
5
|
+
tour: UseTourReturn;
|
|
6
|
+
}
|
|
7
|
+
export interface TourRootProps extends TourRootBaseProps {
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const TourRoot: (props: TourRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { mergeProps } from '@zag-js/react';
|
|
4
|
+
import { splitRenderStrategyProps, RenderStrategyPropsProvider } from '../../utils/render-strategy.js';
|
|
5
|
+
import { splitPresenceProps } from '../presence/split-presence-props.js';
|
|
6
|
+
import { usePresence } from '../presence/use-presence.js';
|
|
7
|
+
import { PresenceProvider } from '../presence/use-presence-context.js';
|
|
8
|
+
import { TourProvider } from './use-tour-context.js';
|
|
9
|
+
|
|
10
|
+
const TourRoot = (props) => {
|
|
11
|
+
const [presenceProps, { children, tour }] = splitPresenceProps(props);
|
|
12
|
+
const [renderStrategyProps] = splitRenderStrategyProps(presenceProps);
|
|
13
|
+
const presence = usePresence(mergeProps({ present: tour.open }, presenceProps));
|
|
14
|
+
return /* @__PURE__ */ jsx(TourProvider, { value: tour, children: /* @__PURE__ */ jsx(RenderStrategyPropsProvider, { value: renderStrategyProps, children: /* @__PURE__ */ jsx(PresenceProvider, { value: presence, children }) }) });
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { TourRoot };
|
|
@@ -0,0 +1,31 @@
|
|
|
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 composeRefs = require('../../utils/compose-refs.cjs');
|
|
10
|
+
const renderStrategy = require('../../utils/render-strategy.cjs');
|
|
11
|
+
const factory = require('../factory.cjs');
|
|
12
|
+
const usePresence = require('../presence/use-presence.cjs');
|
|
13
|
+
const useTourContext = require('./use-tour-context.cjs');
|
|
14
|
+
|
|
15
|
+
const TourSpotlight = react.forwardRef((props, ref) => {
|
|
16
|
+
const tour = useTourContext.useTourContext();
|
|
17
|
+
const renderStrategyProps = renderStrategy.useRenderStrategyPropsContext();
|
|
18
|
+
const presence = usePresence.usePresence({
|
|
19
|
+
...renderStrategyProps,
|
|
20
|
+
present: tour.open
|
|
21
|
+
});
|
|
22
|
+
const mergedProps = react$1.mergeProps(tour.getSpotlightProps(), presence.getPresenceProps(), props);
|
|
23
|
+
const hidden = !tour.open || !tour.step?.target?.();
|
|
24
|
+
if (presence.unmounted) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref: composeRefs.composeRefs(presence.ref, ref), hidden });
|
|
28
|
+
});
|
|
29
|
+
TourSpotlight.displayName = "TourSpotlight";
|
|
30
|
+
|
|
31
|
+
exports.TourSpotlight = TourSpotlight;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
export interface TourSpotlightBaseProps extends PolymorphicProps {
|
|
4
|
+
}
|
|
5
|
+
export interface TourSpotlightProps extends HTMLProps<'div'>, TourSpotlightBaseProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const TourSpotlight: ForwardRefExoticComponent<TourSpotlightProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
export interface TourSpotlightBaseProps extends PolymorphicProps {
|
|
4
|
+
}
|
|
5
|
+
export interface TourSpotlightProps extends HTMLProps<'div'>, TourSpotlightBaseProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const TourSpotlight: ForwardRefExoticComponent<TourSpotlightProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { mergeProps } from '@zag-js/react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { composeRefs } from '../../utils/compose-refs.js';
|
|
6
|
+
import { useRenderStrategyPropsContext } from '../../utils/render-strategy.js';
|
|
7
|
+
import { ark } from '../factory.js';
|
|
8
|
+
import { usePresence } from '../presence/use-presence.js';
|
|
9
|
+
import { useTourContext } from './use-tour-context.js';
|
|
10
|
+
|
|
11
|
+
const TourSpotlight = forwardRef((props, ref) => {
|
|
12
|
+
const tour = useTourContext();
|
|
13
|
+
const renderStrategyProps = useRenderStrategyPropsContext();
|
|
14
|
+
const presence = usePresence({
|
|
15
|
+
...renderStrategyProps,
|
|
16
|
+
present: tour.open
|
|
17
|
+
});
|
|
18
|
+
const mergedProps = mergeProps(tour.getSpotlightProps(), presence.getPresenceProps(), props);
|
|
19
|
+
const hidden = !tour.open || !tour.step?.target?.();
|
|
20
|
+
if (presence.unmounted) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref: composeRefs(presence.ref, ref), hidden });
|
|
24
|
+
});
|
|
25
|
+
TourSpotlight.displayName = "TourSpotlight";
|
|
26
|
+
|
|
27
|
+
export { TourSpotlight };
|
|
@@ -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 useTourContext = require('./use-tour-context.cjs');
|
|
11
|
+
|
|
12
|
+
const TourTitle = react.forwardRef((props, ref) => {
|
|
13
|
+
const tour = useTourContext.useTourContext();
|
|
14
|
+
const mergedProps = react$1.mergeProps(tour.getTitleProps(), props);
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.h2, { ...mergedProps, ref, children: mergedProps.children || tour.step?.title });
|
|
16
|
+
});
|
|
17
|
+
TourTitle.displayName = "TourTitle";
|
|
18
|
+
|
|
19
|
+
exports.TourTitle = TourTitle;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
export interface TourTitleBaseProps extends PolymorphicProps {
|
|
4
|
+
}
|
|
5
|
+
export interface TourTitleProps extends HTMLProps<'h2'>, TourTitleBaseProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const TourTitle: ForwardRefExoticComponent<TourTitleProps & RefAttributes<HTMLHeadingElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
export interface TourTitleBaseProps extends PolymorphicProps {
|
|
4
|
+
}
|
|
5
|
+
export interface TourTitleProps extends HTMLProps<'h2'>, TourTitleBaseProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const TourTitle: ForwardRefExoticComponent<TourTitleProps & RefAttributes<HTMLHeadingElement>>;
|
|
@@ -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 { useTourContext } from './use-tour-context.js';
|
|
7
|
+
|
|
8
|
+
const TourTitle = forwardRef((props, ref) => {
|
|
9
|
+
const tour = useTourContext();
|
|
10
|
+
const mergedProps = mergeProps(tour.getTitleProps(), props);
|
|
11
|
+
return /* @__PURE__ */ jsx(ark.h2, { ...mergedProps, ref, children: mergedProps.children || tour.step?.title });
|
|
12
|
+
});
|
|
13
|
+
TourTitle.displayName = "TourTitle";
|
|
14
|
+
|
|
15
|
+
export { TourTitle };
|