@ark-ui/react 0.10.0-beta.1 → 0.11.0-beta.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/CHANGELOG.md +18 -8
- package/carousel/carousel-next-slide-trigger.cjs +2 -2
- package/carousel/carousel-next-slide-trigger.mjs +2 -2
- package/carousel/carousel-prev-slide-trigger.cjs +2 -2
- package/carousel/carousel-prev-slide-trigger.mjs +2 -2
- package/carousel/carousel.anatomy.d.ts +2 -2
- package/checkbox/checkbox-control.cjs +5 -2
- package/checkbox/checkbox-control.mjs +6 -3
- package/checkbox/index.cjs +0 -2
- package/checkbox/index.d.ts +0 -1
- package/checkbox/index.mjs +0 -1
- package/color-picker/color-picker.anatomy.d.ts +2 -2
- package/combobox/combobox-clear-trigger.cjs +21 -0
- package/combobox/combobox-clear-trigger.d.ts +8 -0
- package/combobox/combobox-clear-trigger.mjs +17 -0
- package/combobox/combobox-option-group-label.cjs +23 -0
- package/combobox/combobox-option-group-label.d.ts +10 -0
- package/combobox/combobox-option-group-label.mjs +19 -0
- package/combobox/combobox-option-group.cjs +23 -0
- package/combobox/combobox-option-group.d.ts +10 -0
- package/combobox/combobox-option-group.mjs +19 -0
- package/combobox/combobox.cjs +2 -0
- package/combobox/combobox.d.ts +1 -1
- package/combobox/combobox.mjs +2 -0
- package/combobox/index.cjs +8 -2
- package/combobox/index.d.ts +3 -0
- package/combobox/index.mjs +3 -0
- package/date-picker/date-picker-positioner.cjs +21 -0
- package/date-picker/date-picker-positioner.d.ts +8 -0
- package/date-picker/date-picker-positioner.mjs +17 -0
- package/date-picker/date-picker.anatomy.d.ts +2 -2
- package/date-picker/index.cjs +2 -0
- package/date-picker/index.d.ts +1 -0
- package/date-picker/index.mjs +1 -0
- package/editable/editable.cjs +2 -0
- package/editable/editable.d.ts +1 -1
- package/editable/editable.mjs +2 -0
- package/index.cjs +8 -2
- package/index.mjs +4 -1
- package/menu/menu.cjs +3 -0
- package/menu/menu.mjs +3 -0
- package/package.json +44 -44
- package/pin-input/pin-input-control.cjs +3 -3
- package/pin-input/pin-input-control.mjs +4 -4
- package/range-slider/range-slider-thumb.cjs +4 -13
- package/range-slider/range-slider-thumb.mjs +5 -14
- package/rating-group/rating-group-control.cjs +4 -1
- package/rating-group/rating-group-control.mjs +5 -2
- package/rating-group/rating-group.cjs +1 -4
- package/rating-group/rating-group.d.ts +5 -5
- package/rating-group/rating-group.mjs +2 -5
- package/select/select-option-group.cjs +3 -2
- package/select/select-option-group.d.ts +3 -6
- package/select/select-option-group.mjs +3 -2
- package/select/select.cjs +2 -0
- package/select/select.mjs +2 -0
- package/slider/slider-thumb.cjs +4 -12
- package/slider/slider-thumb.mjs +5 -13
- package/tags-input/tags-input-control.cjs +2 -2
- package/tags-input/tags-input-control.mjs +3 -3
- package/tags-input/tags-input.cjs +3 -1
- package/tags-input/tags-input.mjs +3 -1
- package/checkbox/checkbox-input.cjs +0 -19
- package/checkbox/checkbox-input.d.ts +0 -8
- package/checkbox/checkbox-input.mjs +0 -15
package/CHANGELOG.md
CHANGED
|
@@ -6,17 +6,27 @@ description: All notable changes to this project will be documented in this file
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
-
## [0.
|
|
9
|
+
## [0.11.0-beta.0] - 2023-08-07
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### Added
|
|
12
12
|
|
|
13
|
-
-
|
|
13
|
+
- Added `ComboboxOptionGroup` and `ComboboxClearTrigger` components to the `Combobox` component.
|
|
14
|
+
- Added `DatePickerPositioner` component to the `DatePicker` component to help with positioning the calendar.
|
|
15
|
+
- Added `ComboboxOptionGroupLabel` to the `Combobox` component. This component can be used to render a label for a group of options in the `ComboboxOptionGroup` component.
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
### Removed
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
- BREAKING: Removed `CheckboxInput`. This component is no longer required.
|
|
20
|
+
|
|
21
|
+
## [0.10.0] - 2023-08-02
|
|
18
22
|
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- Developers can now set default options for all `Toast` components in their application, ensuring a consistent look and feel across the board.
|
|
19
26
|
- Updated number input `onChange` handler to allow synchronous updates to the value when using the scrubber.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
20
30
|
- Improved TypeScript typings in our factory functions. The changes allow for more accurate type inference for the `ref` property when dealing with both intrinsic HTML elements and custom React components.
|
|
21
31
|
|
|
22
32
|
## [0.9.0] - 2023-07-21
|
|
@@ -146,7 +156,7 @@ description: All notable changes to this project will be documented in this file
|
|
|
146
156
|
- Add `Toast`
|
|
147
157
|
- Add `Tooltip`
|
|
148
158
|
|
|
149
|
-
[unreleased]: https://github.com/chakra-ui/ark/compare/@ark-ui/react@0.
|
|
159
|
+
[unreleased]: https://github.com/chakra-ui/ark/compare/@ark-ui/react@0.11.0-beta.0...HEAD
|
|
150
160
|
[0.1.0]: https://github.com/chakra-ui/ark/releases/tag/@ark-ui/react@0.1.0
|
|
151
161
|
[0.2.0]: https://github.com/chakra-ui/ark/releases/tag/@ark-ui/react@0.2.0
|
|
152
162
|
[0.3.0]: https://github.com/chakra-ui/ark/releases/tag/@ark-ui/react@0.3.0
|
|
@@ -160,6 +170,6 @@ description: All notable changes to this project will be documented in this file
|
|
|
160
170
|
[0.8.0]: https://github.com/chakra-ui/ark/releases/tag/@ark-ui/react@0.8.0
|
|
161
171
|
[0.8.1]: https://github.com/chakra-ui/ark/releases/tag/@ark-ui/react@0.8.1
|
|
162
172
|
[0.9.0]: https://github.com/chakra-ui/ark/releases/tag/@ark-ui/react@0.9.0
|
|
163
|
-
[0.10.0
|
|
173
|
+
[0.10.0]: https://github.com/chakra-ui/ark/releases/tag/@ark-ui/react@0.10.0
|
|
164
174
|
|
|
165
|
-
[0.
|
|
175
|
+
[0.11.0-beta.0]: https://github.com/chakra-ui/ark/releases/tag/@ark-ui/react@0.11.0-beta.0
|
|
@@ -10,8 +10,8 @@ const factory = require('../factory.cjs');
|
|
|
10
10
|
const carouselContext = require('./carousel-context.cjs');
|
|
11
11
|
|
|
12
12
|
const CarouselNextSlideTrigger = react.forwardRef((props, ref) => {
|
|
13
|
-
const {
|
|
14
|
-
const mergedProps = react$1.mergeProps(
|
|
13
|
+
const { nextSlideTriggerProps } = carouselContext.useCarouselContext();
|
|
14
|
+
const mergedProps = react$1.mergeProps(nextSlideTriggerProps, props);
|
|
15
15
|
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.button, { ...mergedProps, ref });
|
|
16
16
|
});
|
|
17
17
|
CarouselNextSlideTrigger.displayName = "CarouselNextSlideTrigger";
|
|
@@ -6,8 +6,8 @@ import { ark } from '../factory.mjs';
|
|
|
6
6
|
import { useCarouselContext } from './carousel-context.mjs';
|
|
7
7
|
|
|
8
8
|
const CarouselNextSlideTrigger = forwardRef((props, ref) => {
|
|
9
|
-
const {
|
|
10
|
-
const mergedProps = mergeProps(
|
|
9
|
+
const { nextSlideTriggerProps } = useCarouselContext();
|
|
10
|
+
const mergedProps = mergeProps(nextSlideTriggerProps, props);
|
|
11
11
|
return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });
|
|
12
12
|
});
|
|
13
13
|
CarouselNextSlideTrigger.displayName = "CarouselNextSlideTrigger";
|
|
@@ -10,8 +10,8 @@ const factory = require('../factory.cjs');
|
|
|
10
10
|
const carouselContext = require('./carousel-context.cjs');
|
|
11
11
|
|
|
12
12
|
const CarouselPrevSlideTrigger = react.forwardRef((props, ref) => {
|
|
13
|
-
const {
|
|
14
|
-
const mergedProps = react$1.mergeProps(
|
|
13
|
+
const { prevSlideTriggerProps } = carouselContext.useCarouselContext();
|
|
14
|
+
const mergedProps = react$1.mergeProps(prevSlideTriggerProps, props);
|
|
15
15
|
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.button, { ...mergedProps, ref });
|
|
16
16
|
});
|
|
17
17
|
CarouselPrevSlideTrigger.displayName = "CarouselPrevSlideTrigger";
|
|
@@ -6,8 +6,8 @@ import { ark } from '../factory.mjs';
|
|
|
6
6
|
import { useCarouselContext } from './carousel-context.mjs';
|
|
7
7
|
|
|
8
8
|
const CarouselPrevSlideTrigger = forwardRef((props, ref) => {
|
|
9
|
-
const {
|
|
10
|
-
const mergedProps = mergeProps(
|
|
9
|
+
const { prevSlideTriggerProps } = useCarouselContext();
|
|
10
|
+
const mergedProps = mergeProps(prevSlideTriggerProps, props);
|
|
11
11
|
return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });
|
|
12
12
|
});
|
|
13
13
|
CarouselPrevSlideTrigger.displayName = "CarouselPrevSlideTrigger";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { AnatomyInstance, AnatomyPart } from '@zag-js/anatomy';
|
|
2
|
-
export declare const carouselAnatomy: AnatomyInstance<"root" | "viewport" | "slideGroup" | "slide" | "
|
|
3
|
-
export declare const parts: Record<"root" | "viewport" | "slideGroup" | "slide" | "
|
|
2
|
+
export declare const carouselAnatomy: AnatomyInstance<"root" | "viewport" | "slideGroup" | "slide" | "nextSlideTrigger" | "prevSlideTrigger" | "indicatorGroup" | "indicator" | "control">;
|
|
3
|
+
export declare const parts: Record<"root" | "viewport" | "slideGroup" | "slide" | "nextSlideTrigger" | "prevSlideTrigger" | "indicatorGroup" | "indicator" | "control", AnatomyPart>;
|
|
@@ -10,9 +10,12 @@ const factory = require('../factory.cjs');
|
|
|
10
10
|
const checkboxContext = require('./checkbox-context.cjs');
|
|
11
11
|
|
|
12
12
|
const CheckboxControl = react.forwardRef((props, ref) => {
|
|
13
|
-
const { controlProps } = checkboxContext.useCheckboxContext();
|
|
13
|
+
const { controlProps, hiddenInputProps } = checkboxContext.useCheckboxContext();
|
|
14
14
|
const mergedProps = react$1.mergeProps(controlProps, props);
|
|
15
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
16
|
+
/* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref }),
|
|
17
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...hiddenInputProps })
|
|
18
|
+
] });
|
|
16
19
|
});
|
|
17
20
|
CheckboxControl.displayName = "CheckboxControl";
|
|
18
21
|
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { mergeProps } from '@zag-js/react';
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
5
|
import { ark } from '../factory.mjs';
|
|
6
6
|
import { useCheckboxContext } from './checkbox-context.mjs';
|
|
7
7
|
|
|
8
8
|
const CheckboxControl = forwardRef((props, ref) => {
|
|
9
|
-
const { controlProps } = useCheckboxContext();
|
|
9
|
+
const { controlProps, hiddenInputProps } = useCheckboxContext();
|
|
10
10
|
const mergedProps = mergeProps(controlProps, props);
|
|
11
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12
|
+
/* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }),
|
|
13
|
+
/* @__PURE__ */ jsx("input", { ...hiddenInputProps })
|
|
14
|
+
] });
|
|
12
15
|
});
|
|
13
16
|
CheckboxControl.displayName = "CheckboxControl";
|
|
14
17
|
|
package/checkbox/index.cjs
CHANGED
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5
5
|
const checkbox = require('./checkbox.cjs');
|
|
6
6
|
const checkboxContext = require('./checkbox-context.cjs');
|
|
7
7
|
const checkboxControl = require('./checkbox-control.cjs');
|
|
8
|
-
const checkboxInput = require('./checkbox-input.cjs');
|
|
9
8
|
const checkboxLabel = require('./checkbox-label.cjs');
|
|
10
9
|
const checkbox$1 = require('@zag-js/checkbox');
|
|
11
10
|
|
|
@@ -14,7 +13,6 @@ const checkbox$1 = require('@zag-js/checkbox');
|
|
|
14
13
|
exports.Checkbox = checkbox.Checkbox;
|
|
15
14
|
exports.useCheckboxContext = checkboxContext.useCheckboxContext;
|
|
16
15
|
exports.CheckboxControl = checkboxControl.CheckboxControl;
|
|
17
|
-
exports.CheckboxInput = checkboxInput.CheckboxInput;
|
|
18
16
|
exports.CheckboxLabel = checkboxLabel.CheckboxLabel;
|
|
19
17
|
Object.defineProperty(exports, 'checkboxAnatomy', {
|
|
20
18
|
enumerable: true,
|
package/checkbox/index.d.ts
CHANGED
|
@@ -2,6 +2,5 @@ export type { CheckedState } from '@zag-js/checkbox';
|
|
|
2
2
|
export { Checkbox, type CheckboxProps } from './checkbox';
|
|
3
3
|
export { useCheckboxContext } from './checkbox-context';
|
|
4
4
|
export { CheckboxControl, type CheckboxControlProps } from './checkbox-control';
|
|
5
|
-
export { CheckboxInput, type CheckboxInputProps } from './checkbox-input';
|
|
6
5
|
export { CheckboxLabel, type CheckboxLabelProps } from './checkbox-label';
|
|
7
6
|
export { checkboxAnatomy } from './checkbox.anatomy';
|
package/checkbox/index.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { Checkbox } from './checkbox.mjs';
|
|
2
2
|
export { useCheckboxContext } from './checkbox-context.mjs';
|
|
3
3
|
export { CheckboxControl } from './checkbox-control.mjs';
|
|
4
|
-
export { CheckboxInput } from './checkbox-input.mjs';
|
|
5
4
|
export { CheckboxLabel } from './checkbox-label.mjs';
|
|
6
5
|
export { anatomy as checkboxAnatomy } from '@zag-js/checkbox';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { AnatomyInstance, AnatomyPart } from '@zag-js/anatomy';
|
|
2
|
-
export declare const colorPickerAnatomy: AnatomyInstance<"area" | "label" | "content" | "areaThumb" | "areaGradient" | "channelSliderTrack" | "
|
|
3
|
-
export declare const parts: Record<"area" | "label" | "content" | "areaThumb" | "areaGradient" | "channelSliderTrack" | "
|
|
2
|
+
export declare const colorPickerAnatomy: AnatomyInstance<"area" | "label" | "content" | "areaThumb" | "areaGradient" | "channelSliderTrack" | "channelSliderTrackBackground" | "channelSliderThumb" | "channelInput" | "swatch" | "swatchBackground" | "eyeDropperTrigger" | "swatchGroup">;
|
|
3
|
+
export declare const parts: Record<"area" | "label" | "content" | "areaThumb" | "areaGradient" | "channelSliderTrack" | "channelSliderTrackBackground" | "channelSliderThumb" | "channelInput" | "swatch" | "swatchBackground" | "eyeDropperTrigger" | "swatchGroup", AnatomyPart>;
|
|
@@ -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 comboboxContext = require('./combobox-context.cjs');
|
|
11
|
+
|
|
12
|
+
const ComboboxClearTrigger = react.forwardRef(
|
|
13
|
+
(props, ref) => {
|
|
14
|
+
const { clearTriggerProps } = comboboxContext.useComboboxContext();
|
|
15
|
+
const mergedProps = react$1.mergeProps(clearTriggerProps, props);
|
|
16
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.button, { ...mergedProps, ref });
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
ComboboxClearTrigger.displayName = "ComboboxClearTrigger";
|
|
20
|
+
|
|
21
|
+
exports.ComboboxClearTrigger = ComboboxClearTrigger;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ForwardRefExoticComponent, DetailedHTMLProps, ButtonHTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { ark } from '../factory';
|
|
3
|
+
export type ComboboxClearTriggerProps = ComponentPropsWithoutRef<typeof ark.button>;
|
|
4
|
+
export declare const ComboboxClearTrigger: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
5
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | RefObject<HTMLButtonElement> | null | undefined;
|
|
6
|
+
} & {
|
|
7
|
+
asChild?: boolean | undefined;
|
|
8
|
+
}, "ref"> & 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.mjs';
|
|
6
|
+
import { useComboboxContext } from './combobox-context.mjs';
|
|
7
|
+
|
|
8
|
+
const ComboboxClearTrigger = forwardRef(
|
|
9
|
+
(props, ref) => {
|
|
10
|
+
const { clearTriggerProps } = useComboboxContext();
|
|
11
|
+
const mergedProps = mergeProps(clearTriggerProps, props);
|
|
12
|
+
return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
ComboboxClearTrigger.displayName = "ComboboxClearTrigger";
|
|
16
|
+
|
|
17
|
+
export { ComboboxClearTrigger };
|
|
@@ -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('../create-split-props.cjs');
|
|
10
|
+
const factory = require('../factory.cjs');
|
|
11
|
+
const comboboxContext = require('./combobox-context.cjs');
|
|
12
|
+
|
|
13
|
+
const ComboboxOptionGroupLabel = react.forwardRef(
|
|
14
|
+
(props, ref) => {
|
|
15
|
+
const [optionProps, labelProps] = createSplitProps.createSplitProps()(props, ["htmlFor"]);
|
|
16
|
+
const { getOptionGroupLabelProps } = comboboxContext.useComboboxContext();
|
|
17
|
+
const mergedProps = react$1.mergeProps(getOptionGroupLabelProps(optionProps), labelProps);
|
|
18
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.label, { ...mergedProps, ref });
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
ComboboxOptionGroupLabel.displayName = "ComboboxOptionGroupLabel";
|
|
22
|
+
|
|
23
|
+
exports.ComboboxOptionGroupLabel = ComboboxOptionGroupLabel;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { OptionGroupLabelProps } from '@zag-js/combobox';
|
|
2
|
+
import type { ForwardRefExoticComponent, DetailedHTMLProps, LabelHTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
import { ark } from '../factory';
|
|
4
|
+
import { type Assign } from '../types';
|
|
5
|
+
export type ComboboxOptionGroupLabelProps = Assign<ComponentPropsWithoutRef<typeof ark.label>, OptionGroupLabelProps>;
|
|
6
|
+
export declare const ComboboxOptionGroupLabel: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & {
|
|
7
|
+
ref?: ((instance: HTMLLabelElement | null) => void) | RefObject<HTMLLabelElement> | null | undefined;
|
|
8
|
+
} & {
|
|
9
|
+
asChild?: boolean | undefined;
|
|
10
|
+
}, "ref">, "htmlFor"> & OptionGroupLabelProps & RefAttributes<HTMLLabelElement>>;
|
|
@@ -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 '../create-split-props.mjs';
|
|
6
|
+
import { ark } from '../factory.mjs';
|
|
7
|
+
import { useComboboxContext } from './combobox-context.mjs';
|
|
8
|
+
|
|
9
|
+
const ComboboxOptionGroupLabel = forwardRef(
|
|
10
|
+
(props, ref) => {
|
|
11
|
+
const [optionProps, labelProps] = createSplitProps()(props, ["htmlFor"]);
|
|
12
|
+
const { getOptionGroupLabelProps } = useComboboxContext();
|
|
13
|
+
const mergedProps = mergeProps(getOptionGroupLabelProps(optionProps), labelProps);
|
|
14
|
+
return /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref });
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
ComboboxOptionGroupLabel.displayName = "ComboboxOptionGroupLabel";
|
|
18
|
+
|
|
19
|
+
export { ComboboxOptionGroupLabel };
|
|
@@ -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('../create-split-props.cjs');
|
|
10
|
+
const factory = require('../factory.cjs');
|
|
11
|
+
const comboboxContext = require('./combobox-context.cjs');
|
|
12
|
+
|
|
13
|
+
const ComboboxOptionGroup = react.forwardRef(
|
|
14
|
+
(props, ref) => {
|
|
15
|
+
const [optionProps, localProps] = createSplitProps.createSplitProps()(props, ["id"]);
|
|
16
|
+
const { getOptionGroupProps } = comboboxContext.useComboboxContext();
|
|
17
|
+
const mergedProps = react$1.mergeProps(getOptionGroupProps(optionProps), localProps);
|
|
18
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
ComboboxOptionGroup.displayName = "ComboboxOptionGroup";
|
|
22
|
+
|
|
23
|
+
exports.ComboboxOptionGroup = ComboboxOptionGroup;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { OptionGroupProps } from '@zag-js/combobox';
|
|
2
|
+
import type { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
import { ark } from '../factory';
|
|
4
|
+
import type { Assign } from '../types';
|
|
5
|
+
export type ComboboxOptionGroupProps = Assign<ComponentPropsWithoutRef<typeof ark.div>, OptionGroupProps>;
|
|
6
|
+
export declare const ComboboxOptionGroup: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
7
|
+
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
8
|
+
} & {
|
|
9
|
+
asChild?: boolean | undefined;
|
|
10
|
+
}, "ref">, "id"> & OptionGroupProps & 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 '../create-split-props.mjs';
|
|
6
|
+
import { ark } from '../factory.mjs';
|
|
7
|
+
import { useComboboxContext } from './combobox-context.mjs';
|
|
8
|
+
|
|
9
|
+
const ComboboxOptionGroup = forwardRef(
|
|
10
|
+
(props, ref) => {
|
|
11
|
+
const [optionProps, localProps] = createSplitProps()(props, ["id"]);
|
|
12
|
+
const { getOptionGroupProps } = useComboboxContext();
|
|
13
|
+
const mergedProps = mergeProps(getOptionGroupProps(optionProps), localProps);
|
|
14
|
+
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
ComboboxOptionGroup.displayName = "ComboboxOptionGroup";
|
|
18
|
+
|
|
19
|
+
export { ComboboxOptionGroup };
|
package/combobox/combobox.cjs
CHANGED
|
@@ -34,11 +34,13 @@ const Combobox = react.forwardRef((props, ref) => {
|
|
|
34
34
|
"loop",
|
|
35
35
|
"name",
|
|
36
36
|
"onClose",
|
|
37
|
+
"onFocusOutside",
|
|
37
38
|
"onHighlight",
|
|
38
39
|
"onInputChange",
|
|
39
40
|
"onInputChange",
|
|
40
41
|
"onInteractOutside",
|
|
41
42
|
"onOpen",
|
|
43
|
+
"onPointerDownOutside",
|
|
42
44
|
"onSelect",
|
|
43
45
|
"openOnClick",
|
|
44
46
|
"placeholder",
|
package/combobox/combobox.d.ts
CHANGED
|
@@ -10,6 +10,6 @@ export declare const Combobox: ForwardRefExoticComponent<Omit<Omit<Omit<Omit<Det
|
|
|
10
10
|
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
11
11
|
} & {
|
|
12
12
|
asChild?: boolean | undefined;
|
|
13
|
-
}, "ref">, "children">, "name" | "form" | "id" | "onSelect" | "autoFocus" | "dir" | "placeholder" | "loop" | "disabled" | "onClose" | "readOnly" | "getRootNode" | "ids" | "invalid" | "inputValue" | "selectionData" | "inputBehavior" | "blurOnSelect" | "selectionBehavior" | "selectOnTab" | "selectInputOnFocus" | "focusOnClear" | "openOnClick" | "allowCustomValue" | "ariaHidden" | "isCustomValue" | "positioning" | "onInputChange" | "onHighlight" | "onOpen" | "
|
|
13
|
+
}, "ref">, "children">, "name" | "form" | "id" | "onSelect" | "autoFocus" | "dir" | "placeholder" | "loop" | "disabled" | "onClose" | "readOnly" | "getRootNode" | "ids" | "invalid" | "inputValue" | "selectionData" | "inputBehavior" | "blurOnSelect" | "selectionBehavior" | "selectOnTab" | "selectInputOnFocus" | "focusOnClear" | "openOnClick" | "allowCustomValue" | "ariaHidden" | "isCustomValue" | "positioning" | "onInputChange" | "onHighlight" | "onOpen" | "translations" | "onPointerDownOutside" | "onFocusOutside" | "onInteractOutside"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
14
14
|
children?: ReactNode | ((props: UseComboboxReturn) => React.ReactNode);
|
|
15
15
|
} & RefAttributes<HTMLDivElement>>;
|
package/combobox/combobox.mjs
CHANGED
|
@@ -30,11 +30,13 @@ const Combobox = forwardRef((props, ref) => {
|
|
|
30
30
|
"loop",
|
|
31
31
|
"name",
|
|
32
32
|
"onClose",
|
|
33
|
+
"onFocusOutside",
|
|
33
34
|
"onHighlight",
|
|
34
35
|
"onInputChange",
|
|
35
36
|
"onInputChange",
|
|
36
37
|
"onInteractOutside",
|
|
37
38
|
"onOpen",
|
|
39
|
+
"onPointerDownOutside",
|
|
38
40
|
"onSelect",
|
|
39
41
|
"openOnClick",
|
|
40
42
|
"placeholder",
|
package/combobox/index.cjs
CHANGED
|
@@ -3,12 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const combobox = require('./combobox.cjs');
|
|
6
|
+
const comboboxClearTrigger = require('./combobox-clear-trigger.cjs');
|
|
6
7
|
const comboboxContent = require('./combobox-content.cjs');
|
|
7
8
|
const comboboxContext = require('./combobox-context.cjs');
|
|
8
9
|
const comboboxControl = require('./combobox-control.cjs');
|
|
9
10
|
const comboboxInput = require('./combobox-input.cjs');
|
|
10
11
|
const comboboxLabel = require('./combobox-label.cjs');
|
|
11
12
|
const comboboxOption = require('./combobox-option.cjs');
|
|
13
|
+
const comboboxOptionGroup = require('./combobox-option-group.cjs');
|
|
14
|
+
const comboboxOptionGroupLabel = require('./combobox-option-group-label.cjs');
|
|
12
15
|
const comboboxPositioner = require('./combobox-positioner.cjs');
|
|
13
16
|
const comboboxTrigger = require('./combobox-trigger.cjs');
|
|
14
17
|
const combobox$1 = require('@zag-js/combobox');
|
|
@@ -16,15 +19,18 @@ const combobox$1 = require('@zag-js/combobox');
|
|
|
16
19
|
|
|
17
20
|
|
|
18
21
|
exports.Combobox = combobox.Combobox;
|
|
22
|
+
exports.ComboboxClearTrigger = comboboxClearTrigger.ComboboxClearTrigger;
|
|
19
23
|
exports.ComboboxContent = comboboxContent.ComboboxContent;
|
|
20
24
|
exports.useComboboxContext = comboboxContext.useComboboxContext;
|
|
21
25
|
exports.ComboboxControl = comboboxControl.ComboboxControl;
|
|
22
26
|
exports.ComboboxInput = comboboxInput.ComboboxInput;
|
|
23
27
|
exports.ComboboxLabel = comboboxLabel.ComboboxLabel;
|
|
24
28
|
exports.ComboboxOption = comboboxOption.ComboboxOption;
|
|
29
|
+
exports.ComboboxOptionGroup = comboboxOptionGroup.ComboboxOptionGroup;
|
|
30
|
+
exports.ComboboxOptionGroupLabel = comboboxOptionGroupLabel.ComboboxOptionGroupLabel;
|
|
25
31
|
exports.ComboboxPositioner = comboboxPositioner.ComboboxPositioner;
|
|
26
32
|
exports.ComboboxTrigger = comboboxTrigger.ComboboxTrigger;
|
|
27
33
|
Object.defineProperty(exports, 'comboboxAnatomy', {
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: () => combobox$1.anatomy
|
|
30
36
|
});
|
package/combobox/index.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
export { Combobox, type ComboboxProps } from './combobox';
|
|
2
|
+
export { ComboboxClearTrigger, type ComboboxClearTriggerProps } from './combobox-clear-trigger';
|
|
2
3
|
export { ComboboxContent, type ComboboxContentProps } from './combobox-content';
|
|
3
4
|
export { useComboboxContext } from './combobox-context';
|
|
4
5
|
export { ComboboxControl, type ComboboxControlProps } from './combobox-control';
|
|
5
6
|
export { ComboboxInput, type ComboboxInputProps } from './combobox-input';
|
|
6
7
|
export { ComboboxLabel, type ComboboxLabelProps } from './combobox-label';
|
|
7
8
|
export { ComboboxOption, type ComboboxOptionProps } from './combobox-option';
|
|
9
|
+
export { ComboboxOptionGroup, type ComboboxOptionGroupProps } from './combobox-option-group';
|
|
10
|
+
export { ComboboxOptionGroupLabel, type ComboboxOptionGroupLabelProps, } from './combobox-option-group-label';
|
|
8
11
|
export { ComboboxPositioner, type ComboboxPositionerProps } from './combobox-positioner';
|
|
9
12
|
export { ComboboxTrigger, type ComboboxTriggerProps } from './combobox-trigger';
|
|
10
13
|
export { comboboxAnatomy } from './combobox.anatomy';
|
package/combobox/index.mjs
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
export { Combobox } from './combobox.mjs';
|
|
2
|
+
export { ComboboxClearTrigger } from './combobox-clear-trigger.mjs';
|
|
2
3
|
export { ComboboxContent } from './combobox-content.mjs';
|
|
3
4
|
export { useComboboxContext } from './combobox-context.mjs';
|
|
4
5
|
export { ComboboxControl } from './combobox-control.mjs';
|
|
5
6
|
export { ComboboxInput } from './combobox-input.mjs';
|
|
6
7
|
export { ComboboxLabel } from './combobox-label.mjs';
|
|
7
8
|
export { ComboboxOption } from './combobox-option.mjs';
|
|
9
|
+
export { ComboboxOptionGroup } from './combobox-option-group.mjs';
|
|
10
|
+
export { ComboboxOptionGroupLabel } from './combobox-option-group-label.mjs';
|
|
8
11
|
export { ComboboxPositioner } from './combobox-positioner.mjs';
|
|
9
12
|
export { ComboboxTrigger } from './combobox-trigger.mjs';
|
|
10
13
|
export { anatomy as comboboxAnatomy } from '@zag-js/combobox';
|
|
@@ -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 datePickerContext = require('./date-picker-context.cjs');
|
|
11
|
+
|
|
12
|
+
const DatePickerPositioner = react.forwardRef(
|
|
13
|
+
(props, ref) => {
|
|
14
|
+
const { positionerProps } = datePickerContext.useDatePickerContext();
|
|
15
|
+
const mergedProps = react$1.mergeProps(positionerProps, props);
|
|
16
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
DatePickerPositioner.displayName = "DatePickerPositioner";
|
|
20
|
+
|
|
21
|
+
exports.DatePickerPositioner = DatePickerPositioner;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { ark } from '../factory';
|
|
3
|
+
export type DatePickerPositionerProps = ComponentPropsWithoutRef<typeof ark.div>;
|
|
4
|
+
export declare const DatePickerPositioner: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
5
|
+
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
6
|
+
} & {
|
|
7
|
+
asChild?: boolean | undefined;
|
|
8
|
+
}, "ref"> & 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.mjs';
|
|
6
|
+
import { useDatePickerContext } from './date-picker-context.mjs';
|
|
7
|
+
|
|
8
|
+
const DatePickerPositioner = forwardRef(
|
|
9
|
+
(props, ref) => {
|
|
10
|
+
const { positionerProps } = useDatePickerContext();
|
|
11
|
+
const mergedProps = mergeProps(positionerProps, props);
|
|
12
|
+
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
DatePickerPositioner.displayName = "DatePickerPositioner";
|
|
16
|
+
|
|
17
|
+
export { DatePickerPositioner };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { AnatomyInstance, AnatomyPart } from '@zag-js/anatomy';
|
|
2
|
-
export declare const datePickerAnatomy: AnatomyInstance<"
|
|
3
|
-
export declare const parts: Record<"
|
|
2
|
+
export declare const datePickerAnatomy: AnatomyInstance<"input" | "content" | "grid" | "row" | "control" | "cellTrigger" | "clearTrigger" | "monthSelect" | "nextTrigger" | "positioner" | "prevTrigger" | "rowHeader" | "trigger" | "viewTrigger" | "yearSelect" | "rowGroup" | "columnHeader">;
|
|
3
|
+
export declare const parts: Record<"input" | "content" | "grid" | "row" | "control" | "cellTrigger" | "clearTrigger" | "monthSelect" | "nextTrigger" | "positioner" | "prevTrigger" | "rowHeader" | "trigger" | "viewTrigger" | "yearSelect" | "rowGroup" | "columnHeader", AnatomyPart>;
|
package/date-picker/index.cjs
CHANGED
|
@@ -18,6 +18,7 @@ const datePickerMonthCell = require('./date-picker-month-cell.cjs');
|
|
|
18
18
|
const datePickerMonthCellTrigger = require('./date-picker-month-cell-trigger.cjs');
|
|
19
19
|
const datePickerMonthSelect = require('./date-picker-month-select.cjs');
|
|
20
20
|
const datePickerNextTrigger = require('./date-picker-next-trigger.cjs');
|
|
21
|
+
const datePickerPositioner = require('./date-picker-positioner.cjs');
|
|
21
22
|
const datePickerPrevTrigger = require('./date-picker-prev-trigger.cjs');
|
|
22
23
|
const datePickerRow = require('./date-picker-row.cjs');
|
|
23
24
|
const datePickerRowGroup = require('./date-picker-row-group.cjs');
|
|
@@ -47,6 +48,7 @@ exports.DatePickerMonthCell = datePickerMonthCell.DatePickerMonthCell;
|
|
|
47
48
|
exports.DatePickerMonthCellTrigger = datePickerMonthCellTrigger.DatePickerMonthCellTrigger;
|
|
48
49
|
exports.DatePickerMonthSelect = datePickerMonthSelect.DatePickerMonthSelect;
|
|
49
50
|
exports.DatePickerNextTrigger = datePickerNextTrigger.DatePickerNextTrigger;
|
|
51
|
+
exports.DatePickerPositioner = datePickerPositioner.DatePickerPositioner;
|
|
50
52
|
exports.DatePickerPrevTrigger = datePickerPrevTrigger.DatePickerPrevTrigger;
|
|
51
53
|
exports.DatePickerRow = datePickerRow.DatePickerRow;
|
|
52
54
|
exports.DatePickerRowGroup = datePickerRowGroup.DatePickerRowGroup;
|
package/date-picker/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export { DatePickerMonthCell, type DatePickerMonthCellProps } from './date-picke
|
|
|
14
14
|
export { DatePickerMonthCellTrigger, type DatePickerMonthCellTriggerProps, } from './date-picker-month-cell-trigger';
|
|
15
15
|
export { DatePickerMonthSelect, type DatePickerMonthSelectProps } from './date-picker-month-select';
|
|
16
16
|
export { DatePickerNextTrigger, type DatePickerNextTriggerProps } from './date-picker-next-trigger';
|
|
17
|
+
export { DatePickerPositioner, type DatePickerPositionerProps } from './date-picker-positioner';
|
|
17
18
|
export { DatePickerPrevTrigger, type DatePickerPrevTriggerProps } from './date-picker-prev-trigger';
|
|
18
19
|
export { DatePickerRow, type DatePickerRowProps } from './date-picker-row';
|
|
19
20
|
export { DatePickerRowGroup, type DatePickerRowGroupProps } from './date-picker-row-group';
|
package/date-picker/index.mjs
CHANGED
|
@@ -14,6 +14,7 @@ export { DatePickerMonthCell } from './date-picker-month-cell.mjs';
|
|
|
14
14
|
export { DatePickerMonthCellTrigger } from './date-picker-month-cell-trigger.mjs';
|
|
15
15
|
export { DatePickerMonthSelect } from './date-picker-month-select.mjs';
|
|
16
16
|
export { DatePickerNextTrigger } from './date-picker-next-trigger.mjs';
|
|
17
|
+
export { DatePickerPositioner } from './date-picker-positioner.mjs';
|
|
17
18
|
export { DatePickerPrevTrigger } from './date-picker-prev-trigger.mjs';
|
|
18
19
|
export { DatePickerRow } from './date-picker-row.mjs';
|
|
19
20
|
export { DatePickerRowGroup } from './date-picker-row-group.mjs';
|
package/editable/editable.cjs
CHANGED
package/editable/editable.d.ts
CHANGED
|
@@ -13,6 +13,6 @@ export declare const Editable: ForwardRefExoticComponent<Omit<Omit<Omit<Omit<Det
|
|
|
13
13
|
asChild?: boolean | undefined;
|
|
14
14
|
}, "ref">, "children"> & {
|
|
15
15
|
children: ReactNode | ((pages: EditableContext) => ReactNode);
|
|
16
|
-
}, "name" | "value" | "form" | "id" | "onChange" | "onSubmit" | "defaultValue" | "dir" | "placeholder" | "disabled" | "onCancel" | "maxLength" | "readOnly" | "getRootNode" | "ids" | "invalid" | "
|
|
16
|
+
}, "name" | "value" | "form" | "id" | "onChange" | "onSubmit" | "defaultValue" | "dir" | "placeholder" | "disabled" | "onCancel" | "maxLength" | "readOnly" | "getRootNode" | "ids" | "invalid" | "translations" | "onPointerDownOutside" | "onFocusOutside" | "onInteractOutside" | "finalFocusEl" | "autoResize" | "activationMode" | "submitMode" | "startWithEditView" | "selectOnFocus" | "onEdit"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
17
17
|
defaultValue?: string | undefined;
|
|
18
18
|
} & RefAttributes<HTMLDivElement>>;
|