@ark-ui/react 5.34.1 → 5.36.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/anatomy.cjs +5 -0
- package/dist/components/anatomy.d.cts +1 -0
- package/dist/components/anatomy.d.ts +1 -0
- package/dist/components/anatomy.js +1 -0
- package/dist/components/clipboard/clipboard-root.cjs +1 -0
- package/dist/components/clipboard/clipboard-root.js +1 -0
- package/dist/components/date-input/date-input-context.cjs +10 -0
- package/dist/components/date-input/date-input-context.d.cts +6 -0
- package/dist/components/date-input/date-input-context.d.ts +6 -0
- package/dist/components/date-input/date-input-context.js +6 -0
- package/dist/components/date-input/date-input-control.cjs +19 -0
- package/dist/components/date-input/date-input-control.d.cts +7 -0
- package/dist/components/date-input/date-input-control.d.ts +7 -0
- package/dist/components/date-input/date-input-control.js +15 -0
- package/dist/components/date-input/date-input-hidden-input.cjs +22 -0
- package/dist/components/date-input/date-input-hidden-input.d.cts +8 -0
- package/dist/components/date-input/date-input-hidden-input.d.ts +8 -0
- package/dist/components/date-input/date-input-hidden-input.js +18 -0
- package/dist/components/date-input/date-input-label.cjs +19 -0
- package/dist/components/date-input/date-input-label.d.cts +7 -0
- package/dist/components/date-input/date-input-label.d.ts +7 -0
- package/dist/components/date-input/date-input-label.js +15 -0
- package/dist/components/date-input/date-input-root-provider.cjs +21 -0
- package/dist/components/date-input/date-input-root-provider.d.cts +12 -0
- package/dist/components/date-input/date-input-root-provider.d.ts +12 -0
- package/dist/components/date-input/date-input-root-provider.js +17 -0
- package/dist/components/date-input/date-input-root.cjs +55 -0
- package/dist/components/date-input/date-input-root.d.cts +9 -0
- package/dist/components/date-input/date-input-root.d.ts +9 -0
- package/dist/components/date-input/date-input-root.js +51 -0
- package/dist/components/date-input/date-input-segment-context.cjs +17 -0
- package/dist/components/date-input/date-input-segment-context.d.cts +6 -0
- package/dist/components/date-input/date-input-segment-context.d.ts +6 -0
- package/dist/components/date-input/date-input-segment-context.js +13 -0
- package/dist/components/date-input/date-input-segment-group.cjs +23 -0
- package/dist/components/date-input/date-input-segment-group.d.cts +8 -0
- package/dist/components/date-input/date-input-segment-group.d.ts +8 -0
- package/dist/components/date-input/date-input-segment-group.js +19 -0
- package/dist/components/date-input/date-input-segment.cjs +27 -0
- package/dist/components/date-input/date-input-segment.d.cts +8 -0
- package/dist/components/date-input/date-input-segment.d.ts +8 -0
- package/dist/components/date-input/date-input-segment.js +23 -0
- package/dist/components/date-input/date-input.anatomy.d.cts +1 -0
- package/dist/components/date-input/date-input.anatomy.d.ts +1 -0
- package/dist/components/date-input/date-input.cjs +25 -0
- package/dist/components/date-input/date-input.d.cts +9 -0
- package/dist/components/date-input/date-input.d.ts +9 -0
- package/dist/components/date-input/date-input.js +9 -0
- package/dist/components/date-input/index.cjs +36 -0
- package/dist/components/date-input/index.d.cts +14 -0
- package/dist/components/date-input/index.d.ts +14 -0
- package/dist/components/date-input/index.js +14 -0
- package/dist/components/date-input/use-date-input-context.cjs +15 -0
- package/dist/components/date-input/use-date-input-context.d.cts +5 -0
- package/dist/components/date-input/use-date-input-context.d.ts +5 -0
- package/dist/components/date-input/use-date-input-context.js +10 -0
- package/dist/components/date-input/use-date-input-segment-group-props-context.cjs +16 -0
- package/dist/components/date-input/use-date-input-segment-group-props-context.d.cts +5 -0
- package/dist/components/date-input/use-date-input-segment-group-props-context.d.ts +5 -0
- package/dist/components/date-input/use-date-input-segment-group-props-context.js +11 -0
- package/dist/components/date-input/use-date-input.cjs +40 -0
- package/dist/components/date-input/use-date-input.d.cts +6 -0
- package/dist/components/date-input/use-date-input.d.ts +6 -0
- package/dist/components/date-input/use-date-input.js +17 -0
- package/dist/components/dialog/dialog-trigger.cjs +7 -3
- package/dist/components/dialog/dialog-trigger.d.cts +4 -2
- package/dist/components/dialog/dialog-trigger.d.ts +4 -2
- package/dist/components/dialog/dialog-trigger.js +7 -3
- package/dist/components/dialog/dialog.d.cts +1 -1
- package/dist/components/dialog/dialog.d.ts +1 -1
- package/dist/components/dialog/index.d.cts +1 -1
- package/dist/components/dialog/index.d.ts +1 -1
- package/dist/components/drawer/drawer-description.cjs +19 -0
- package/dist/components/drawer/drawer-description.d.cts +7 -0
- package/dist/components/drawer/drawer-description.d.ts +7 -0
- package/dist/components/drawer/drawer-description.js +15 -0
- package/dist/components/drawer/drawer-swipe-area.cjs +19 -0
- package/dist/components/drawer/drawer-swipe-area.d.cts +7 -0
- package/dist/components/drawer/drawer-swipe-area.d.ts +7 -0
- package/dist/components/drawer/drawer-swipe-area.js +15 -0
- package/dist/components/drawer/drawer-trigger.cjs +7 -3
- package/dist/components/drawer/drawer-trigger.d.cts +4 -2
- package/dist/components/drawer/drawer-trigger.d.ts +4 -2
- package/dist/components/drawer/drawer-trigger.js +7 -3
- package/dist/components/drawer/drawer.cjs +4 -0
- package/dist/components/drawer/drawer.d.cts +3 -1
- package/dist/components/drawer/drawer.d.ts +3 -1
- package/dist/components/drawer/drawer.js +2 -0
- package/dist/components/drawer/index.cjs +4 -0
- package/dist/components/drawer/index.d.cts +3 -1
- package/dist/components/drawer/index.d.ts +3 -1
- package/dist/components/drawer/index.js +2 -0
- package/dist/components/field/field-item.cjs +54 -0
- package/dist/components/field/field-item.d.cts +10 -0
- package/dist/components/field/field-item.d.ts +10 -0
- package/dist/components/field/field-item.js +50 -0
- package/dist/components/field/field-root.cjs +2 -1
- package/dist/components/field/field-root.js +2 -1
- package/dist/components/field/field.cjs +2 -0
- package/dist/components/field/field.d.cts +1 -0
- package/dist/components/field/field.d.ts +1 -0
- package/dist/components/field/field.js +1 -0
- package/dist/components/field/use-field.cjs +11 -3
- package/dist/components/field/use-field.d.cts +4 -0
- package/dist/components/field/use-field.d.ts +4 -0
- package/dist/components/field/use-field.js +11 -3
- package/dist/components/floating-panel/floating-panel-root.cjs +3 -0
- package/dist/components/floating-panel/floating-panel-root.js +3 -0
- package/dist/components/frame/frame.cjs +1 -1
- package/dist/components/frame/frame.js +1 -1
- package/dist/components/hover-card/hover-card-trigger.cjs +4 -1
- package/dist/components/hover-card/hover-card-trigger.d.cts +4 -2
- package/dist/components/hover-card/hover-card-trigger.d.ts +4 -2
- package/dist/components/hover-card/hover-card-trigger.js +4 -1
- package/dist/components/hover-card/hover-card.d.cts +1 -1
- package/dist/components/hover-card/hover-card.d.ts +1 -1
- 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 +35 -0
- package/dist/components/index.d.cts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +17 -0
- package/dist/components/listbox/listbox-input.cjs +1 -1
- package/dist/components/listbox/listbox-input.js +1 -1
- package/dist/components/menu/index.d.cts +1 -1
- package/dist/components/menu/index.d.ts +1 -1
- package/dist/components/menu/menu-root.cjs +3 -0
- package/dist/components/menu/menu-root.js +3 -0
- package/dist/components/menu/menu-trigger.cjs +7 -3
- package/dist/components/menu/menu-trigger.d.cts +4 -2
- package/dist/components/menu/menu-trigger.d.ts +4 -2
- package/dist/components/menu/menu-trigger.js +7 -3
- package/dist/components/menu/menu.d.cts +1 -1
- package/dist/components/menu/menu.d.ts +1 -1
- package/dist/components/navigation-menu/navigation-menu-root.cjs +1 -0
- package/dist/components/navigation-menu/navigation-menu-root.js +1 -0
- package/dist/components/pin-input/pin-input-root.cjs +2 -0
- package/dist/components/pin-input/pin-input-root.js +2 -0
- package/dist/components/popover/index.d.cts +1 -1
- package/dist/components/popover/index.d.ts +1 -1
- package/dist/components/popover/popover-trigger.cjs +7 -3
- package/dist/components/popover/popover-trigger.d.cts +4 -2
- package/dist/components/popover/popover-trigger.d.ts +4 -2
- package/dist/components/popover/popover-trigger.js +7 -3
- package/dist/components/popover/popover.d.cts +1 -1
- package/dist/components/popover/popover.d.ts +1 -1
- package/dist/components/select/select-root.cjs +1 -0
- package/dist/components/select/select-root.js +1 -0
- package/dist/components/splitter/create-splitter-registry.cjs +31 -0
- package/dist/components/splitter/create-splitter-registry.d.cts +6 -0
- package/dist/components/splitter/create-splitter-registry.d.ts +6 -0
- package/dist/components/splitter/create-splitter-registry.js +8 -0
- package/dist/components/splitter/index.cjs +2 -0
- package/dist/components/splitter/index.d.cts +1 -0
- package/dist/components/splitter/index.d.ts +1 -0
- package/dist/components/splitter/index.js +1 -0
- package/dist/components/splitter/splitter-root.cjs +1 -0
- package/dist/components/splitter/splitter-root.js +1 -0
- package/dist/components/splitter/splitter.cjs +2 -0
- package/dist/components/splitter/splitter.d.cts +1 -0
- package/dist/components/splitter/splitter.d.ts +1 -0
- package/dist/components/splitter/splitter.js +1 -0
- package/dist/components/tags-input/tags-input-root.cjs +2 -0
- package/dist/components/tags-input/tags-input-root.js +2 -0
- package/dist/components/timer/timer-root.cjs +1 -0
- package/dist/components/timer/timer-root.js +1 -0
- package/dist/components/tooltip/index.d.cts +1 -1
- package/dist/components/tooltip/index.d.ts +1 -1
- package/dist/components/tooltip/tooltip-trigger.cjs +4 -1
- package/dist/components/tooltip/tooltip-trigger.d.cts +4 -2
- package/dist/components/tooltip/tooltip-trigger.d.ts +4 -2
- package/dist/components/tooltip/tooltip-trigger.js +4 -1
- package/dist/components/tooltip/tooltip.d.cts +1 -1
- package/dist/components/tooltip/tooltip.d.ts +1 -1
- package/dist/components/tree-view/tree-view-root.cjs +1 -0
- package/dist/components/tree-view/tree-view-root.js +1 -0
- package/dist/index.cjs +39 -0
- package/dist/index.js +19 -0
- package/dist/providers/index.cjs +4 -0
- package/dist/providers/index.d.cts +1 -0
- package/dist/providers/index.d.ts +1 -0
- package/dist/providers/index.js +2 -0
- package/dist/providers/interaction/index.cjs +11 -0
- package/dist/providers/interaction/index.d.cts +2 -0
- package/dist/providers/interaction/index.d.ts +2 -0
- package/dist/providers/interaction/index.js +2 -0
- package/dist/providers/interaction/use-focus-visible.cjs +26 -0
- package/dist/providers/interaction/use-focus-visible.d.cts +5 -0
- package/dist/providers/interaction/use-focus-visible.d.ts +5 -0
- package/dist/providers/interaction/use-focus-visible.js +22 -0
- package/dist/providers/interaction/use-interaction-modality.cjs +19 -0
- package/dist/providers/interaction/use-interaction-modality.d.cts +3 -0
- package/dist/providers/interaction/use-interaction-modality.d.ts +3 -0
- package/dist/providers/interaction/use-interaction-modality.js +15 -0
- package/package.json +77 -75
|
@@ -20,6 +20,7 @@ const angleSlider = require('@zag-js/angle-slider');
|
|
|
20
20
|
const avatar = require('@zag-js/avatar');
|
|
21
21
|
const clipboard = require('@zag-js/clipboard');
|
|
22
22
|
const collapsible = require('@zag-js/collapsible');
|
|
23
|
+
const dateInput = require('@zag-js/date-input');
|
|
23
24
|
const dialog = require('@zag-js/dialog');
|
|
24
25
|
const drawer = require('@zag-js/drawer');
|
|
25
26
|
const editable = require('@zag-js/editable');
|
|
@@ -88,6 +89,10 @@ Object.defineProperty(exports, "collapsibleAnatomy", {
|
|
|
88
89
|
enumerable: true,
|
|
89
90
|
get: () => collapsible.anatomy
|
|
90
91
|
});
|
|
92
|
+
Object.defineProperty(exports, "dateInputAnatomy", {
|
|
93
|
+
enumerable: true,
|
|
94
|
+
get: () => dateInput.anatomy
|
|
95
|
+
});
|
|
91
96
|
Object.defineProperty(exports, "dialogAnatomy", {
|
|
92
97
|
enumerable: true,
|
|
93
98
|
get: () => dialog.anatomy
|
|
@@ -9,6 +9,7 @@ export { clipboardAnatomy } from './clipboard/clipboard.anatomy';
|
|
|
9
9
|
export { collapsibleAnatomy } from './collapsible/collapsible.anatomy';
|
|
10
10
|
export { colorPickerAnatomy } from './color-picker/color-picker.anatomy';
|
|
11
11
|
export { comboboxAnatomy } from './combobox/combobox.anatomy';
|
|
12
|
+
export { dateInputAnatomy } from './date-input/date-input.anatomy';
|
|
12
13
|
export { datePickerAnatomy } from './date-picker/date-picker.anatomy';
|
|
13
14
|
export { dialogAnatomy } from './dialog/dialog.anatomy';
|
|
14
15
|
export { editableAnatomy } from './editable/editable.anatomy';
|
|
@@ -9,6 +9,7 @@ export { clipboardAnatomy } from './clipboard/clipboard.anatomy';
|
|
|
9
9
|
export { collapsibleAnatomy } from './collapsible/collapsible.anatomy';
|
|
10
10
|
export { colorPickerAnatomy } from './color-picker/color-picker.anatomy';
|
|
11
11
|
export { comboboxAnatomy } from './combobox/combobox.anatomy';
|
|
12
|
+
export { dateInputAnatomy } from './date-input/date-input.anatomy';
|
|
12
13
|
export { datePickerAnatomy } from './date-picker/date-picker.anatomy';
|
|
13
14
|
export { dialogAnatomy } from './dialog/dialog.anatomy';
|
|
14
15
|
export { editableAnatomy } from './editable/editable.anatomy';
|
|
@@ -16,6 +16,7 @@ export { anatomy as angleSliderAnatomy } from '@zag-js/angle-slider';
|
|
|
16
16
|
export { anatomy as avatarAnatomy } from '@zag-js/avatar';
|
|
17
17
|
export { anatomy as clipboardAnatomy } from '@zag-js/clipboard';
|
|
18
18
|
export { anatomy as collapsibleAnatomy } from '@zag-js/collapsible';
|
|
19
|
+
export { anatomy as dateInputAnatomy } from '@zag-js/date-input';
|
|
19
20
|
export { anatomy as dialogAnatomy } from '@zag-js/dialog';
|
|
20
21
|
export { anatomy as drawerAnatomy } from '@zag-js/drawer';
|
|
21
22
|
export { anatomy as editableAnatomy } from '@zag-js/editable';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const useDateInputContext = require('./use-date-input-context.cjs');
|
|
7
|
+
|
|
8
|
+
const DateInputContext = (props) => props.children(useDateInputContext.useDateInputContext());
|
|
9
|
+
|
|
10
|
+
exports.DateInputContext = DateInputContext;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { UseDateInputContext } from './use-date-input-context';
|
|
3
|
+
export interface DateInputContextProps {
|
|
4
|
+
children: (context: UseDateInputContext) => ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const DateInputContext: (props: DateInputContextProps) => ReactNode;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { UseDateInputContext } from './use-date-input-context';
|
|
3
|
+
export interface DateInputContextProps {
|
|
4
|
+
children: (context: UseDateInputContext) => ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const DateInputContext: (props: DateInputContextProps) => ReactNode;
|
|
@@ -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 useDateInputContext = require('./use-date-input-context.cjs');
|
|
11
|
+
|
|
12
|
+
const DateInputControl = react.forwardRef((props, ref) => {
|
|
13
|
+
const dateInput = useDateInputContext.useDateInputContext();
|
|
14
|
+
const mergedProps = react$1.mergeProps(dateInput.getControlProps(), props);
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
|
|
16
|
+
});
|
|
17
|
+
DateInputControl.displayName = "DateInputControl";
|
|
18
|
+
|
|
19
|
+
exports.DateInputControl = DateInputControl;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
export interface DateInputControlBaseProps extends PolymorphicProps {
|
|
4
|
+
}
|
|
5
|
+
export interface DateInputControlProps extends HTMLProps<'div'>, DateInputControlBaseProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const DateInputControl: ForwardRefExoticComponent<DateInputControlProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
export interface DateInputControlBaseProps extends PolymorphicProps {
|
|
4
|
+
}
|
|
5
|
+
export interface DateInputControlProps extends HTMLProps<'div'>, DateInputControlBaseProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const DateInputControl: ForwardRefExoticComponent<DateInputControlProps & 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 { useDateInputContext } from './use-date-input-context.js';
|
|
7
|
+
|
|
8
|
+
const DateInputControl = forwardRef((props, ref) => {
|
|
9
|
+
const dateInput = useDateInputContext();
|
|
10
|
+
const mergedProps = mergeProps(dateInput.getControlProps(), props);
|
|
11
|
+
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
|
|
12
|
+
});
|
|
13
|
+
DateInputControl.displayName = "DateInputControl";
|
|
14
|
+
|
|
15
|
+
export { DateInputControl };
|
|
@@ -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 useDateInputContext = require('./use-date-input-context.cjs');
|
|
12
|
+
|
|
13
|
+
const splitHiddenInputProps = createSplitProps.createSplitProps();
|
|
14
|
+
const DateInputHiddenInput = react.forwardRef((props, ref) => {
|
|
15
|
+
const [hiddenInputProps, localProps] = splitHiddenInputProps(props, ["index", "name"]);
|
|
16
|
+
const dateInput = useDateInputContext.useDateInputContext();
|
|
17
|
+
const mergedProps = react$1.mergeProps(dateInput.getHiddenInputProps(hiddenInputProps), localProps);
|
|
18
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.input, { ...mergedProps, ref });
|
|
19
|
+
});
|
|
20
|
+
DateInputHiddenInput.displayName = "DateInputHiddenInput";
|
|
21
|
+
|
|
22
|
+
exports.DateInputHiddenInput = DateInputHiddenInput;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HiddenInputProps } from '@zag-js/date-input';
|
|
2
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
3
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
|
+
export interface DateInputHiddenInputBaseProps extends PolymorphicProps, HiddenInputProps {
|
|
5
|
+
}
|
|
6
|
+
export interface DateInputHiddenInputProps extends HTMLProps<'input'>, DateInputHiddenInputBaseProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const DateInputHiddenInput: ForwardRefExoticComponent<DateInputHiddenInputProps & RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HiddenInputProps } from '@zag-js/date-input';
|
|
2
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
3
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
|
+
export interface DateInputHiddenInputBaseProps extends PolymorphicProps, HiddenInputProps {
|
|
5
|
+
}
|
|
6
|
+
export interface DateInputHiddenInputProps extends HTMLProps<'input'>, DateInputHiddenInputBaseProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const DateInputHiddenInput: ForwardRefExoticComponent<DateInputHiddenInputProps & RefAttributes<HTMLInputElement>>;
|
|
@@ -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 { useDateInputContext } from './use-date-input-context.js';
|
|
8
|
+
|
|
9
|
+
const splitHiddenInputProps = createSplitProps();
|
|
10
|
+
const DateInputHiddenInput = forwardRef((props, ref) => {
|
|
11
|
+
const [hiddenInputProps, localProps] = splitHiddenInputProps(props, ["index", "name"]);
|
|
12
|
+
const dateInput = useDateInputContext();
|
|
13
|
+
const mergedProps = mergeProps(dateInput.getHiddenInputProps(hiddenInputProps), localProps);
|
|
14
|
+
return /* @__PURE__ */ jsx(ark.input, { ...mergedProps, ref });
|
|
15
|
+
});
|
|
16
|
+
DateInputHiddenInput.displayName = "DateInputHiddenInput";
|
|
17
|
+
|
|
18
|
+
export { DateInputHiddenInput };
|
|
@@ -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 useDateInputContext = require('./use-date-input-context.cjs');
|
|
11
|
+
|
|
12
|
+
const DateInputLabel = react.forwardRef((props, ref) => {
|
|
13
|
+
const dateInput = useDateInputContext.useDateInputContext();
|
|
14
|
+
const mergedProps = react$1.mergeProps(dateInput.getLabelProps(), props);
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.label, { ...mergedProps, ref });
|
|
16
|
+
});
|
|
17
|
+
DateInputLabel.displayName = "DateInputLabel";
|
|
18
|
+
|
|
19
|
+
exports.DateInputLabel = DateInputLabel;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
export interface DateInputLabelBaseProps extends PolymorphicProps {
|
|
4
|
+
}
|
|
5
|
+
export interface DateInputLabelProps extends HTMLProps<'label'>, DateInputLabelBaseProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const DateInputLabel: ForwardRefExoticComponent<DateInputLabelProps & RefAttributes<HTMLLabelElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
export interface DateInputLabelBaseProps extends PolymorphicProps {
|
|
4
|
+
}
|
|
5
|
+
export interface DateInputLabelProps extends HTMLProps<'label'>, DateInputLabelBaseProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const DateInputLabel: ForwardRefExoticComponent<DateInputLabelProps & RefAttributes<HTMLLabelElement>>;
|
|
@@ -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 { useDateInputContext } from './use-date-input-context.js';
|
|
7
|
+
|
|
8
|
+
const DateInputLabel = forwardRef((props, ref) => {
|
|
9
|
+
const dateInput = useDateInputContext();
|
|
10
|
+
const mergedProps = mergeProps(dateInput.getLabelProps(), props);
|
|
11
|
+
return /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref });
|
|
12
|
+
});
|
|
13
|
+
DateInputLabel.displayName = "DateInputLabel";
|
|
14
|
+
|
|
15
|
+
export { DateInputLabel };
|
|
@@ -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 createSplitProps = require('../../utils/create-split-props.cjs');
|
|
10
|
+
const factory = require('../factory.cjs');
|
|
11
|
+
const useDateInputContext = require('./use-date-input-context.cjs');
|
|
12
|
+
|
|
13
|
+
const splitRootProviderProps = createSplitProps.createSplitProps();
|
|
14
|
+
const DateInputRootProvider = react.forwardRef((props, ref) => {
|
|
15
|
+
const [{ value: dateInput }, localProps] = splitRootProviderProps(props, ["value"]);
|
|
16
|
+
const mergedProps = react$1.mergeProps(dateInput.getRootProps(), localProps);
|
|
17
|
+
return /* @__PURE__ */ jsxRuntime.jsx(useDateInputContext.DateInputProvider, { value: dateInput, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref }) });
|
|
18
|
+
});
|
|
19
|
+
DateInputRootProvider.displayName = "DateInputRootProvider";
|
|
20
|
+
|
|
21
|
+
exports.DateInputRootProvider = DateInputRootProvider;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { UseDateInputReturn } from './use-date-input';
|
|
3
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
|
+
interface RootProviderProps {
|
|
5
|
+
value: UseDateInputReturn;
|
|
6
|
+
}
|
|
7
|
+
export interface DateInputRootProviderBaseProps extends RootProviderProps, PolymorphicProps {
|
|
8
|
+
}
|
|
9
|
+
export interface DateInputRootProviderProps extends HTMLProps<'div'>, DateInputRootProviderBaseProps {
|
|
10
|
+
}
|
|
11
|
+
export declare const DateInputRootProvider: ForwardRefExoticComponent<DateInputRootProviderProps & RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { UseDateInputReturn } from './use-date-input';
|
|
3
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
|
+
interface RootProviderProps {
|
|
5
|
+
value: UseDateInputReturn;
|
|
6
|
+
}
|
|
7
|
+
export interface DateInputRootProviderBaseProps extends RootProviderProps, PolymorphicProps {
|
|
8
|
+
}
|
|
9
|
+
export interface DateInputRootProviderProps extends HTMLProps<'div'>, DateInputRootProviderBaseProps {
|
|
10
|
+
}
|
|
11
|
+
export declare const DateInputRootProvider: ForwardRefExoticComponent<DateInputRootProviderProps & RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export {};
|
|
@@ -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 { createSplitProps } from '../../utils/create-split-props.js';
|
|
6
|
+
import { ark } from '../factory.js';
|
|
7
|
+
import { DateInputProvider } from './use-date-input-context.js';
|
|
8
|
+
|
|
9
|
+
const splitRootProviderProps = createSplitProps();
|
|
10
|
+
const DateInputRootProvider = forwardRef((props, ref) => {
|
|
11
|
+
const [{ value: dateInput }, localProps] = splitRootProviderProps(props, ["value"]);
|
|
12
|
+
const mergedProps = mergeProps(dateInput.getRootProps(), localProps);
|
|
13
|
+
return /* @__PURE__ */ jsx(DateInputProvider, { value: dateInput, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) });
|
|
14
|
+
});
|
|
15
|
+
DateInputRootProvider.displayName = "DateInputRootProvider";
|
|
16
|
+
|
|
17
|
+
export { DateInputRootProvider };
|
|
@@ -0,0 +1,55 @@
|
|
|
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 useDateInput = require('./use-date-input.cjs');
|
|
12
|
+
const useDateInputContext = require('./use-date-input-context.cjs');
|
|
13
|
+
|
|
14
|
+
const splitRootProps = createSplitProps.createSplitProps();
|
|
15
|
+
const DateInputRoot = react.forwardRef((props, ref) => {
|
|
16
|
+
const [useDateInputProps, localProps] = splitRootProps(props, [
|
|
17
|
+
"dir",
|
|
18
|
+
"disabled",
|
|
19
|
+
"getRootNode",
|
|
20
|
+
"id",
|
|
21
|
+
"ids",
|
|
22
|
+
"invalid",
|
|
23
|
+
"locale",
|
|
24
|
+
"max",
|
|
25
|
+
"min",
|
|
26
|
+
"name",
|
|
27
|
+
"form",
|
|
28
|
+
"onFocusChange",
|
|
29
|
+
"onPlaceholderChange",
|
|
30
|
+
"onValueChange",
|
|
31
|
+
"readOnly",
|
|
32
|
+
"required",
|
|
33
|
+
"selectionMode",
|
|
34
|
+
"timeZone",
|
|
35
|
+
"translations",
|
|
36
|
+
"value",
|
|
37
|
+
"defaultValue",
|
|
38
|
+
"hourCycle",
|
|
39
|
+
"granularity",
|
|
40
|
+
"shouldForceLeadingZeros",
|
|
41
|
+
"allSegments",
|
|
42
|
+
"formatter",
|
|
43
|
+
"placeholderValue",
|
|
44
|
+
"defaultPlaceholderValue",
|
|
45
|
+
"format",
|
|
46
|
+
"createCalendar",
|
|
47
|
+
"isDateUnavailable"
|
|
48
|
+
]);
|
|
49
|
+
const dateInput = useDateInput.useDateInput(useDateInputProps);
|
|
50
|
+
const mergedProps = react$1.mergeProps(dateInput.getRootProps(), localProps);
|
|
51
|
+
return /* @__PURE__ */ jsxRuntime.jsx(useDateInputContext.DateInputProvider, { value: dateInput, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref }) });
|
|
52
|
+
});
|
|
53
|
+
DateInputRoot.displayName = "DateInputRoot";
|
|
54
|
+
|
|
55
|
+
exports.DateInputRoot = DateInputRoot;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { UseDateInputProps } from './use-date-input';
|
|
3
|
+
import { Assign } from '../../types';
|
|
4
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
5
|
+
export interface DateInputRootBaseProps extends UseDateInputProps, PolymorphicProps {
|
|
6
|
+
}
|
|
7
|
+
export interface DateInputRootProps extends Assign<HTMLProps<'div'>, DateInputRootBaseProps> {
|
|
8
|
+
}
|
|
9
|
+
export declare const DateInputRoot: ForwardRefExoticComponent<DateInputRootProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
|
+
import { UseDateInputProps } from './use-date-input';
|
|
3
|
+
import { Assign } from '../../types';
|
|
4
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
5
|
+
export interface DateInputRootBaseProps extends UseDateInputProps, PolymorphicProps {
|
|
6
|
+
}
|
|
7
|
+
export interface DateInputRootProps extends Assign<HTMLProps<'div'>, DateInputRootBaseProps> {
|
|
8
|
+
}
|
|
9
|
+
export declare const DateInputRoot: ForwardRefExoticComponent<DateInputRootProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,51 @@
|
|
|
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 { useDateInput } from './use-date-input.js';
|
|
8
|
+
import { DateInputProvider } from './use-date-input-context.js';
|
|
9
|
+
|
|
10
|
+
const splitRootProps = createSplitProps();
|
|
11
|
+
const DateInputRoot = forwardRef((props, ref) => {
|
|
12
|
+
const [useDateInputProps, localProps] = splitRootProps(props, [
|
|
13
|
+
"dir",
|
|
14
|
+
"disabled",
|
|
15
|
+
"getRootNode",
|
|
16
|
+
"id",
|
|
17
|
+
"ids",
|
|
18
|
+
"invalid",
|
|
19
|
+
"locale",
|
|
20
|
+
"max",
|
|
21
|
+
"min",
|
|
22
|
+
"name",
|
|
23
|
+
"form",
|
|
24
|
+
"onFocusChange",
|
|
25
|
+
"onPlaceholderChange",
|
|
26
|
+
"onValueChange",
|
|
27
|
+
"readOnly",
|
|
28
|
+
"required",
|
|
29
|
+
"selectionMode",
|
|
30
|
+
"timeZone",
|
|
31
|
+
"translations",
|
|
32
|
+
"value",
|
|
33
|
+
"defaultValue",
|
|
34
|
+
"hourCycle",
|
|
35
|
+
"granularity",
|
|
36
|
+
"shouldForceLeadingZeros",
|
|
37
|
+
"allSegments",
|
|
38
|
+
"formatter",
|
|
39
|
+
"placeholderValue",
|
|
40
|
+
"defaultPlaceholderValue",
|
|
41
|
+
"format",
|
|
42
|
+
"createCalendar",
|
|
43
|
+
"isDateUnavailable"
|
|
44
|
+
]);
|
|
45
|
+
const dateInput = useDateInput(useDateInputProps);
|
|
46
|
+
const mergedProps = mergeProps(dateInput.getRootProps(), localProps);
|
|
47
|
+
return /* @__PURE__ */ jsx(DateInputProvider, { value: dateInput, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) });
|
|
48
|
+
});
|
|
49
|
+
DateInputRoot.displayName = "DateInputRoot";
|
|
50
|
+
|
|
51
|
+
export { DateInputRoot };
|
|
@@ -0,0 +1,17 @@
|
|
|
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 useDateInputContext = require('./use-date-input-context.cjs');
|
|
9
|
+
const useDateInputSegmentGroupPropsContext = require('./use-date-input-segment-group-props-context.cjs');
|
|
10
|
+
|
|
11
|
+
const DateInputSegmentContext = (props) => {
|
|
12
|
+
const dateInput = useDateInputContext.useDateInputContext();
|
|
13
|
+
const segmentGroupProps = useDateInputSegmentGroupPropsContext.useDateInputSegmentGroupPropsContext();
|
|
14
|
+
return dateInput.getSegments(segmentGroupProps).map((segment, index) => /* @__PURE__ */ jsxRuntime.jsx(react.Fragment, { children: props.children(segment) }, `${segment.type}-${index}`));
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
exports.DateInputSegmentContext = DateInputSegmentContext;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DateSegment } from '@zag-js/date-input';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export interface DateInputSegmentContextProps {
|
|
4
|
+
children: (segment: DateSegment) => ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const DateInputSegmentContext: (props: DateInputSegmentContextProps) => import("react/jsx-runtime").JSX.Element[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DateSegment } from '@zag-js/date-input';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export interface DateInputSegmentContextProps {
|
|
4
|
+
children: (segment: DateSegment) => ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const DateInputSegmentContext: (props: DateInputSegmentContextProps) => import("react/jsx-runtime").JSX.Element[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { Fragment } from 'react';
|
|
4
|
+
import { useDateInputContext } from './use-date-input-context.js';
|
|
5
|
+
import { useDateInputSegmentGroupPropsContext } from './use-date-input-segment-group-props-context.js';
|
|
6
|
+
|
|
7
|
+
const DateInputSegmentContext = (props) => {
|
|
8
|
+
const dateInput = useDateInputContext();
|
|
9
|
+
const segmentGroupProps = useDateInputSegmentGroupPropsContext();
|
|
10
|
+
return dateInput.getSegments(segmentGroupProps).map((segment, index) => /* @__PURE__ */ jsx(Fragment, { children: props.children(segment) }, `${segment.type}-${index}`));
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { DateInputSegmentContext };
|
|
@@ -0,0 +1,23 @@
|
|
|
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 useDateInputContext = require('./use-date-input-context.cjs');
|
|
12
|
+
const useDateInputSegmentGroupPropsContext = require('./use-date-input-segment-group-props-context.cjs');
|
|
13
|
+
|
|
14
|
+
const splitSegmentGroupProps = createSplitProps.createSplitProps();
|
|
15
|
+
const DateInputSegmentGroup = react.forwardRef((props, ref) => {
|
|
16
|
+
const [segmentGroupProps, localProps] = splitSegmentGroupProps(props, ["index"]);
|
|
17
|
+
const dateInput = useDateInputContext.useDateInputContext();
|
|
18
|
+
const mergedProps = react$1.mergeProps(dateInput.getSegmentGroupProps(segmentGroupProps), localProps);
|
|
19
|
+
return /* @__PURE__ */ jsxRuntime.jsx(useDateInputSegmentGroupPropsContext.DateInputSegmentGroupPropsProvider, { value: segmentGroupProps, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref }) });
|
|
20
|
+
});
|
|
21
|
+
DateInputSegmentGroup.displayName = "DateInputSegmentGroup";
|
|
22
|
+
|
|
23
|
+
exports.DateInputSegmentGroup = DateInputSegmentGroup;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SegmentGroupProps } from '@zag-js/date-input';
|
|
2
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
3
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
|
+
export interface DateInputSegmentGroupBaseProps extends PolymorphicProps, SegmentGroupProps {
|
|
5
|
+
}
|
|
6
|
+
export interface DateInputSegmentGroupProps extends HTMLProps<'div'>, DateInputSegmentGroupBaseProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const DateInputSegmentGroup: ForwardRefExoticComponent<DateInputSegmentGroupProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SegmentGroupProps } from '@zag-js/date-input';
|
|
2
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
3
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
|
+
export interface DateInputSegmentGroupBaseProps extends PolymorphicProps, SegmentGroupProps {
|
|
5
|
+
}
|
|
6
|
+
export interface DateInputSegmentGroupProps extends HTMLProps<'div'>, DateInputSegmentGroupBaseProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const DateInputSegmentGroup: ForwardRefExoticComponent<DateInputSegmentGroupProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
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 { useDateInputContext } from './use-date-input-context.js';
|
|
8
|
+
import { DateInputSegmentGroupPropsProvider } from './use-date-input-segment-group-props-context.js';
|
|
9
|
+
|
|
10
|
+
const splitSegmentGroupProps = createSplitProps();
|
|
11
|
+
const DateInputSegmentGroup = forwardRef((props, ref) => {
|
|
12
|
+
const [segmentGroupProps, localProps] = splitSegmentGroupProps(props, ["index"]);
|
|
13
|
+
const dateInput = useDateInputContext();
|
|
14
|
+
const mergedProps = mergeProps(dateInput.getSegmentGroupProps(segmentGroupProps), localProps);
|
|
15
|
+
return /* @__PURE__ */ jsx(DateInputSegmentGroupPropsProvider, { value: segmentGroupProps, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) });
|
|
16
|
+
});
|
|
17
|
+
DateInputSegmentGroup.displayName = "DateInputSegmentGroup";
|
|
18
|
+
|
|
19
|
+
export { DateInputSegmentGroup };
|
|
@@ -0,0 +1,27 @@
|
|
|
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 useDateInputContext = require('./use-date-input-context.cjs');
|
|
12
|
+
const useDateInputSegmentGroupPropsContext = require('./use-date-input-segment-group-props-context.cjs');
|
|
13
|
+
|
|
14
|
+
const splitSegmentProps = createSplitProps.createSplitProps();
|
|
15
|
+
const DateInputSegment = react.forwardRef((props, ref) => {
|
|
16
|
+
const [segmentProps, localProps] = splitSegmentProps(props, ["segment"]);
|
|
17
|
+
const segmentGroupProps = useDateInputSegmentGroupPropsContext.useDateInputSegmentGroupPropsContext();
|
|
18
|
+
const dateInput = useDateInputContext.useDateInputContext();
|
|
19
|
+
const mergedProps = react$1.mergeProps(
|
|
20
|
+
dateInput.getSegmentProps({ ...segmentProps, index: segmentGroupProps.index }),
|
|
21
|
+
localProps
|
|
22
|
+
);
|
|
23
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.span, { ...mergedProps, ref, children: segmentProps.segment.text });
|
|
24
|
+
});
|
|
25
|
+
DateInputSegment.displayName = "DateInputSegment";
|
|
26
|
+
|
|
27
|
+
exports.DateInputSegment = DateInputSegment;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SegmentProps } from '@zag-js/date-input';
|
|
2
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
3
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
|
+
export interface DateInputSegmentBaseProps extends PolymorphicProps, Pick<SegmentProps, 'segment'> {
|
|
5
|
+
}
|
|
6
|
+
export interface DateInputSegmentProps extends HTMLProps<'span'>, DateInputSegmentBaseProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const DateInputSegment: ForwardRefExoticComponent<DateInputSegmentProps & RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SegmentProps } from '@zag-js/date-input';
|
|
2
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
3
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
|
+
export interface DateInputSegmentBaseProps extends PolymorphicProps, Pick<SegmentProps, 'segment'> {
|
|
5
|
+
}
|
|
6
|
+
export interface DateInputSegmentProps extends HTMLProps<'span'>, DateInputSegmentBaseProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const DateInputSegment: ForwardRefExoticComponent<DateInputSegmentProps & RefAttributes<HTMLSpanElement>>;
|