@ark-ui/react 0.0.0-rc-20230329204449 → 0.0.0-rc-20230402030403
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/combobox/combobox.cjs +2 -1
- package/dist/combobox/combobox.mjs +2 -1
- package/dist/editable/editable.cjs +1 -0
- package/dist/editable/editable.mjs +1 -0
- package/dist/factory.d.ts +1 -1
- package/dist/rating-group/rating-group-context.d.ts +4 -0
- package/dist/rating-group/use-rating-group.d.ts +2 -0
- package/dist/select/select-context.d.ts +0 -2
- package/dist/select/select.cjs +3 -2
- package/dist/select/select.mjs +3 -2
- package/dist/select/use-select.d.ts +0 -1
- package/dist/tags-input/tags-input.cjs +1 -0
- package/dist/tags-input/tags-input.mjs +1 -0
- package/package.json +28 -28
- package/dist/hover-card/hover-card-context.d.ts +0 -22
- package/dist/hover-card/use-hover-card.d.ts +0 -15
- package/dist/popover/popover-context.d.ts +0 -32
- package/dist/popover/use-popover.d.ts +0 -27
- package/dist/tooltip/tooltip-context.d.ts +0 -32
- package/dist/tooltip/use-tooltip.d.ts +0 -20
|
@@ -36,6 +36,7 @@ const Combobox = react.forwardRef((props, ref) => {
|
|
|
36
36
|
"onHighlight",
|
|
37
37
|
"onInputChange",
|
|
38
38
|
"onInputChange",
|
|
39
|
+
"onInteractOutside",
|
|
39
40
|
"onOpen",
|
|
40
41
|
"onSelect",
|
|
41
42
|
"openOnClick",
|
|
@@ -43,9 +44,9 @@ const Combobox = react.forwardRef((props, ref) => {
|
|
|
43
44
|
"positioning",
|
|
44
45
|
"readOnly",
|
|
45
46
|
"selectInputOnFocus",
|
|
46
|
-
"selectOnTab",
|
|
47
47
|
"selectionBehavior",
|
|
48
48
|
"selectionData",
|
|
49
|
+
"selectOnTab",
|
|
49
50
|
"translations"
|
|
50
51
|
]
|
|
51
52
|
);
|
|
@@ -32,6 +32,7 @@ const Combobox = forwardRef((props, ref) => {
|
|
|
32
32
|
"onHighlight",
|
|
33
33
|
"onInputChange",
|
|
34
34
|
"onInputChange",
|
|
35
|
+
"onInteractOutside",
|
|
35
36
|
"onOpen",
|
|
36
37
|
"onSelect",
|
|
37
38
|
"openOnClick",
|
|
@@ -39,9 +40,9 @@ const Combobox = forwardRef((props, ref) => {
|
|
|
39
40
|
"positioning",
|
|
40
41
|
"readOnly",
|
|
41
42
|
"selectInputOnFocus",
|
|
42
|
-
"selectOnTab",
|
|
43
43
|
"selectionBehavior",
|
|
44
44
|
"selectionData",
|
|
45
|
+
"selectOnTab",
|
|
45
46
|
"translations"
|
|
46
47
|
]
|
|
47
48
|
);
|
package/dist/factory.d.ts
CHANGED
|
@@ -9,4 +9,4 @@ export type HTMLArkProps<T extends ElementType> = HTMLPolymorphicProps<T>;
|
|
|
9
9
|
/**
|
|
10
10
|
* The ark factory serves as an object of JSX elements to render React components which accept the `as` prop
|
|
11
11
|
*/
|
|
12
|
-
export declare const ark: (<T extends ElementType<any>, P extends Record<
|
|
12
|
+
export declare const ark: (<T extends ElementType<any>, P extends Record<never, never> = Record<never, never>>(component: T, option?: undefined) => ComponentWithAs<T, P>) & HTMLPolymorphicComponents<Record<never, never>>;
|
|
@@ -2,6 +2,8 @@ import type { Provider, HTMLAttributes, DetailedHTMLProps, InputHTMLAttributes }
|
|
|
2
2
|
import { type UseRatingGroupReturn } from './use-rating-group';
|
|
3
3
|
export type RatingGroupContext = UseRatingGroupReturn;
|
|
4
4
|
export declare const RatingGroupProvider: Provider<{
|
|
5
|
+
setValue(value: number): void;
|
|
6
|
+
clearValue(): void;
|
|
5
7
|
isHovering: boolean;
|
|
6
8
|
value: number;
|
|
7
9
|
hoveredValue: number;
|
|
@@ -22,6 +24,8 @@ export declare const RatingGroupProvider: Provider<{
|
|
|
22
24
|
index: number;
|
|
23
25
|
}): HTMLAttributes<HTMLElement>;
|
|
24
26
|
}>, useRatingGroupContext: () => {
|
|
27
|
+
setValue(value: number): void;
|
|
28
|
+
clearValue(): void;
|
|
25
29
|
isHovering: boolean;
|
|
26
30
|
value: number;
|
|
27
31
|
hoveredValue: number;
|
|
@@ -6,6 +6,8 @@ export type UseRatingGroupProps = Optional<ratingGroup.Context, 'id'> & {
|
|
|
6
6
|
};
|
|
7
7
|
export type UseRatingGroupReturn = ReturnType<typeof useRatingGroup>;
|
|
8
8
|
export declare const useRatingGroup: (props: UseRatingGroupProps) => {
|
|
9
|
+
setValue(value: number): void;
|
|
10
|
+
clearValue(): void;
|
|
9
11
|
isHovering: boolean;
|
|
10
12
|
value: number;
|
|
11
13
|
hoveredValue: number;
|
|
@@ -7,7 +7,6 @@ export declare const SelectProvider: Provider<{
|
|
|
7
7
|
highlightedOption: Option | null;
|
|
8
8
|
selectedOption: Option | null;
|
|
9
9
|
focus(): void;
|
|
10
|
-
blur(): void;
|
|
11
10
|
open(): void;
|
|
12
11
|
close(): void;
|
|
13
12
|
setSelectedOption(value: Option): void;
|
|
@@ -31,7 +30,6 @@ export declare const SelectProvider: Provider<{
|
|
|
31
30
|
highlightedOption: Option | null;
|
|
32
31
|
selectedOption: Option | null;
|
|
33
32
|
focus(): void;
|
|
34
|
-
blur(): void;
|
|
35
33
|
open(): void;
|
|
36
34
|
close(): void;
|
|
37
35
|
setSelectedOption(value: Option): void;
|
package/dist/select/select.cjs
CHANGED
|
@@ -25,11 +25,12 @@ const Select = (props) => {
|
|
|
25
25
|
"onChange",
|
|
26
26
|
"onClose",
|
|
27
27
|
"onHighlight",
|
|
28
|
+
"onInteractOutside",
|
|
28
29
|
"onOpen",
|
|
29
30
|
"positioning",
|
|
30
31
|
"readOnly",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
32
|
+
"selectedOption",
|
|
33
|
+
"selectOnTab"
|
|
33
34
|
]);
|
|
34
35
|
const select = useSelect.useSelect(useSelectProps);
|
|
35
36
|
const view = runIfFn.runIfFn(children, select);
|
package/dist/select/select.mjs
CHANGED
|
@@ -21,11 +21,12 @@ const Select = (props) => {
|
|
|
21
21
|
"onChange",
|
|
22
22
|
"onClose",
|
|
23
23
|
"onHighlight",
|
|
24
|
+
"onInteractOutside",
|
|
24
25
|
"onOpen",
|
|
25
26
|
"positioning",
|
|
26
27
|
"readOnly",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
28
|
+
"selectedOption",
|
|
29
|
+
"selectOnTab"
|
|
29
30
|
]);
|
|
30
31
|
const select = useSelect(useSelectProps);
|
|
31
32
|
const view = runIfFn(children, select);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ark-ui/react",
|
|
3
|
-
"version": "0.0.0-rc-
|
|
3
|
+
"version": "0.0.0-rc-20230402030403",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"homepage": "https://github.com/chakra-ui/ark#readme",
|
|
@@ -22,33 +22,33 @@
|
|
|
22
22
|
"url": "https://github.com/chakra-ui/ark/issues"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@polymorphic-factory/react": "0.
|
|
26
|
-
"@zag-js/accordion": "0.2.
|
|
25
|
+
"@polymorphic-factory/react": "0.4.1",
|
|
26
|
+
"@zag-js/accordion": "0.2.15",
|
|
27
27
|
"@zag-js/anatomy": "0.1.4",
|
|
28
|
-
"@zag-js/carousel": "0.0.
|
|
29
|
-
"@zag-js/checkbox": "0.2.
|
|
30
|
-
"@zag-js/combobox": "0.
|
|
31
|
-
"@zag-js/dialog": "0.2.
|
|
32
|
-
"@zag-js/editable": "0.
|
|
33
|
-
"@zag-js/hover-card": "0.
|
|
34
|
-
"@zag-js/menu": "0.
|
|
35
|
-
"@zag-js/number-input": "0.2.
|
|
36
|
-
"@zag-js/pagination": "0.1.
|
|
37
|
-
"@zag-js/pin-input": "0.2.
|
|
38
|
-
"@zag-js/popover": "0.2.
|
|
39
|
-
"@zag-js/pressable": "0.3.
|
|
40
|
-
"@zag-js/radio-group": "0.2.
|
|
41
|
-
"@zag-js/range-slider": "0.2.
|
|
42
|
-
"@zag-js/rating-group": "0.
|
|
43
|
-
"@zag-js/react": "0.3.
|
|
44
|
-
"@zag-js/select": "0.1
|
|
45
|
-
"@zag-js/slider": "0.2.
|
|
46
|
-
"@zag-js/splitter": "0.2.
|
|
47
|
-
"@zag-js/tabs": "0.2.
|
|
48
|
-
"@zag-js/tags-input": "0.
|
|
49
|
-
"@zag-js/toast": "0.2.
|
|
50
|
-
"@zag-js/tooltip": "0.
|
|
51
|
-
"@zag-js/transition": "0.1.
|
|
28
|
+
"@zag-js/carousel": "0.0.4",
|
|
29
|
+
"@zag-js/checkbox": "0.2.16",
|
|
30
|
+
"@zag-js/combobox": "0.3.1",
|
|
31
|
+
"@zag-js/dialog": "0.2.15",
|
|
32
|
+
"@zag-js/editable": "0.3.1",
|
|
33
|
+
"@zag-js/hover-card": "0.3.0",
|
|
34
|
+
"@zag-js/menu": "0.4.0",
|
|
35
|
+
"@zag-js/number-input": "0.2.16",
|
|
36
|
+
"@zag-js/pagination": "0.1.16",
|
|
37
|
+
"@zag-js/pin-input": "0.2.16",
|
|
38
|
+
"@zag-js/popover": "0.2.15",
|
|
39
|
+
"@zag-js/pressable": "0.3.15",
|
|
40
|
+
"@zag-js/radio-group": "0.2.3",
|
|
41
|
+
"@zag-js/range-slider": "0.2.17",
|
|
42
|
+
"@zag-js/rating-group": "0.3.1",
|
|
43
|
+
"@zag-js/react": "0.3.12",
|
|
44
|
+
"@zag-js/select": "0.2.1",
|
|
45
|
+
"@zag-js/slider": "0.2.17",
|
|
46
|
+
"@zag-js/splitter": "0.2.16",
|
|
47
|
+
"@zag-js/tabs": "0.2.15",
|
|
48
|
+
"@zag-js/tags-input": "0.4.1",
|
|
49
|
+
"@zag-js/toast": "0.2.16",
|
|
50
|
+
"@zag-js/tooltip": "0.3.0",
|
|
51
|
+
"@zag-js/transition": "0.1.6",
|
|
52
52
|
"@zag-js/types": "0.3.4"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"react-dom": "18.2.0",
|
|
75
75
|
"react-frame-component": "5.2.6",
|
|
76
76
|
"resize-observer-polyfill": "1.5.1",
|
|
77
|
-
"typescript": "5.0.
|
|
77
|
+
"typescript": "5.0.3",
|
|
78
78
|
"vite": "4.2.1",
|
|
79
79
|
"vite-plugin-dts": "2.1.0",
|
|
80
80
|
"vitest": "0.29.8"
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Provider, HTMLAttributes } from 'react';
|
|
2
|
-
import { type UseHoverCardReturn } from './use-hover-card';
|
|
3
|
-
export type HoverCardContext = UseHoverCardReturn;
|
|
4
|
-
export declare const HoverCardProvider: Provider<{
|
|
5
|
-
isOpen: boolean;
|
|
6
|
-
open(): void;
|
|
7
|
-
close(): void;
|
|
8
|
-
arrowProps: HTMLAttributes<HTMLElement>;
|
|
9
|
-
arrowTipProps: HTMLAttributes<HTMLElement>;
|
|
10
|
-
triggerProps: HTMLAttributes<HTMLElement>;
|
|
11
|
-
positionerProps: HTMLAttributes<HTMLElement>;
|
|
12
|
-
contentProps: HTMLAttributes<HTMLElement>;
|
|
13
|
-
}>, useHoverCardContext: () => {
|
|
14
|
-
isOpen: boolean;
|
|
15
|
-
open(): void;
|
|
16
|
-
close(): void;
|
|
17
|
-
arrowProps: HTMLAttributes<HTMLElement>;
|
|
18
|
-
arrowTipProps: HTMLAttributes<HTMLElement>;
|
|
19
|
-
triggerProps: HTMLAttributes<HTMLElement>;
|
|
20
|
-
positionerProps: HTMLAttributes<HTMLElement>;
|
|
21
|
-
contentProps: HTMLAttributes<HTMLElement>;
|
|
22
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { HTMLAttributes } from 'react';
|
|
2
|
-
import * as hoverCard from '@zag-js/hover-card';
|
|
3
|
-
import { type Optional } from '../types';
|
|
4
|
-
export type UseHoverCardProps = Optional<hoverCard.Context, 'id'>;
|
|
5
|
-
export declare const useHoverCard: (props: UseHoverCardProps) => {
|
|
6
|
-
isOpen: boolean;
|
|
7
|
-
open(): void;
|
|
8
|
-
close(): void;
|
|
9
|
-
arrowProps: HTMLAttributes<HTMLElement>;
|
|
10
|
-
arrowTipProps: HTMLAttributes<HTMLElement>;
|
|
11
|
-
triggerProps: HTMLAttributes<HTMLElement>;
|
|
12
|
-
positionerProps: HTMLAttributes<HTMLElement>;
|
|
13
|
-
contentProps: HTMLAttributes<HTMLElement>;
|
|
14
|
-
};
|
|
15
|
-
export type UseHoverCardReturn = ReturnType<typeof useHoverCard>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { Provider, HTMLAttributes, DetailedHTMLProps, ButtonHTMLAttributes } from 'react';
|
|
2
|
-
import { type UsePopoverReturn } from './use-popover';
|
|
3
|
-
export type PopoverContext = UsePopoverReturn;
|
|
4
|
-
export declare const PopoverProvider: Provider<{
|
|
5
|
-
portalled: boolean;
|
|
6
|
-
isOpen: boolean;
|
|
7
|
-
open(): void;
|
|
8
|
-
close(): void;
|
|
9
|
-
arrowProps: HTMLAttributes<HTMLElement>;
|
|
10
|
-
arrowTipProps: HTMLAttributes<HTMLElement>;
|
|
11
|
-
anchorProps: HTMLAttributes<HTMLElement>;
|
|
12
|
-
triggerProps: DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
|
13
|
-
positionerProps: HTMLAttributes<HTMLElement>;
|
|
14
|
-
contentProps: HTMLAttributes<HTMLElement>;
|
|
15
|
-
titleProps: HTMLAttributes<HTMLElement>;
|
|
16
|
-
descriptionProps: HTMLAttributes<HTMLElement>;
|
|
17
|
-
closeTriggerProps: DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
|
18
|
-
}>, usePopoverContext: () => {
|
|
19
|
-
portalled: boolean;
|
|
20
|
-
isOpen: boolean;
|
|
21
|
-
open(): void;
|
|
22
|
-
close(): void;
|
|
23
|
-
arrowProps: HTMLAttributes<HTMLElement>;
|
|
24
|
-
arrowTipProps: HTMLAttributes<HTMLElement>;
|
|
25
|
-
anchorProps: HTMLAttributes<HTMLElement>;
|
|
26
|
-
triggerProps: DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
|
27
|
-
positionerProps: HTMLAttributes<HTMLElement>;
|
|
28
|
-
contentProps: HTMLAttributes<HTMLElement>;
|
|
29
|
-
titleProps: HTMLAttributes<HTMLElement>;
|
|
30
|
-
descriptionProps: HTMLAttributes<HTMLElement>;
|
|
31
|
-
closeTriggerProps: DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
|
32
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { HTMLAttributes, DetailedHTMLProps, ButtonHTMLAttributes } from 'react';
|
|
2
|
-
import * as popover from '@zag-js/popover';
|
|
3
|
-
import { type Optional } from '../types';
|
|
4
|
-
export type UsePopoverProps = Optional<popover.Context, 'id'> & {
|
|
5
|
-
/**
|
|
6
|
-
* Control the open state of the popover.
|
|
7
|
-
*
|
|
8
|
-
* @default false
|
|
9
|
-
*/
|
|
10
|
-
isOpen?: boolean;
|
|
11
|
-
};
|
|
12
|
-
export declare const usePopover: (props: UsePopoverProps) => {
|
|
13
|
-
portalled: boolean;
|
|
14
|
-
isOpen: boolean;
|
|
15
|
-
open(): void;
|
|
16
|
-
close(): void;
|
|
17
|
-
arrowProps: HTMLAttributes<HTMLElement>;
|
|
18
|
-
arrowTipProps: HTMLAttributes<HTMLElement>;
|
|
19
|
-
anchorProps: HTMLAttributes<HTMLElement>;
|
|
20
|
-
triggerProps: DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
|
21
|
-
positionerProps: HTMLAttributes<HTMLElement>;
|
|
22
|
-
contentProps: HTMLAttributes<HTMLElement>;
|
|
23
|
-
titleProps: HTMLAttributes<HTMLElement>;
|
|
24
|
-
descriptionProps: HTMLAttributes<HTMLElement>;
|
|
25
|
-
closeTriggerProps: DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
|
26
|
-
};
|
|
27
|
-
export type UsePopoverReturn = ReturnType<typeof usePopover>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { Provider, DetailedHTMLProps, ButtonHTMLAttributes, HTMLAttributes } from 'react';
|
|
2
|
-
import { type UseTooltipReturn } from './use-tooltip';
|
|
3
|
-
export type TooltipContext = UseTooltipReturn;
|
|
4
|
-
export declare const TooltipProvider: Provider<{
|
|
5
|
-
isOpen: boolean;
|
|
6
|
-
open(): void;
|
|
7
|
-
close(): void;
|
|
8
|
-
getAnimationState(): {
|
|
9
|
-
enter: boolean;
|
|
10
|
-
exit: boolean;
|
|
11
|
-
};
|
|
12
|
-
triggerProps: DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
|
13
|
-
arrowProps: HTMLAttributes<HTMLElement>;
|
|
14
|
-
arrowTipProps: HTMLAttributes<HTMLElement>;
|
|
15
|
-
positionerProps: HTMLAttributes<HTMLElement>;
|
|
16
|
-
contentProps: HTMLAttributes<HTMLElement>;
|
|
17
|
-
labelProps: HTMLAttributes<HTMLElement>;
|
|
18
|
-
}>, useTooltipContext: () => {
|
|
19
|
-
isOpen: boolean;
|
|
20
|
-
open(): void;
|
|
21
|
-
close(): void;
|
|
22
|
-
getAnimationState(): {
|
|
23
|
-
enter: boolean;
|
|
24
|
-
exit: boolean;
|
|
25
|
-
};
|
|
26
|
-
triggerProps: DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
|
27
|
-
arrowProps: HTMLAttributes<HTMLElement>;
|
|
28
|
-
arrowTipProps: HTMLAttributes<HTMLElement>;
|
|
29
|
-
positionerProps: HTMLAttributes<HTMLElement>;
|
|
30
|
-
contentProps: HTMLAttributes<HTMLElement>;
|
|
31
|
-
labelProps: HTMLAttributes<HTMLElement>;
|
|
32
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { DetailedHTMLProps, ButtonHTMLAttributes, HTMLAttributes } from 'react';
|
|
2
|
-
import * as tooltip from '@zag-js/tooltip';
|
|
3
|
-
import { type Optional } from '../types';
|
|
4
|
-
export type UseTooltipProps = Optional<tooltip.Context, 'id'>;
|
|
5
|
-
export declare const useTooltip: (props: UseTooltipProps) => {
|
|
6
|
-
isOpen: boolean;
|
|
7
|
-
open(): void;
|
|
8
|
-
close(): void;
|
|
9
|
-
getAnimationState(): {
|
|
10
|
-
enter: boolean;
|
|
11
|
-
exit: boolean;
|
|
12
|
-
};
|
|
13
|
-
triggerProps: DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
|
14
|
-
arrowProps: HTMLAttributes<HTMLElement>;
|
|
15
|
-
arrowTipProps: HTMLAttributes<HTMLElement>;
|
|
16
|
-
positionerProps: HTMLAttributes<HTMLElement>;
|
|
17
|
-
contentProps: HTMLAttributes<HTMLElement>;
|
|
18
|
-
labelProps: HTMLAttributes<HTMLElement>;
|
|
19
|
-
};
|
|
20
|
-
export type UseTooltipReturn = ReturnType<typeof useTooltip>;
|