@ark-ui/react 0.13.1 → 0.14.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 +19 -2
- package/accordion/accordion-context.d.ts +2 -9
- package/accordion/accordion.cjs +3 -2
- package/accordion/accordion.d.ts +2 -2
- package/accordion/accordion.mjs +3 -2
- package/accordion/index.d.ts +4 -4
- package/accordion/use-accordion.d.ts +2 -7
- package/avatar/avatar-context.d.ts +2 -9
- package/avatar/use-avatar.d.ts +2 -7
- package/carousel/carousel-context.d.ts +2 -9
- package/carousel/carousel.d.ts +3 -3
- package/carousel/index.d.ts +7 -12
- package/carousel/use-carousel.d.ts +2 -7
- package/checkbox/checkbox-context.d.ts +2 -9
- package/checkbox/checkbox.d.ts +3 -3
- package/checkbox/index.d.ts +7 -13
- package/checkbox/use-checkbox.d.ts +2 -7
- package/color-picker/color-picker-context.d.ts +2 -9
- package/color-picker/use-color-picker.d.ts +2 -7
- package/combobox/combobox-context.d.ts +2 -9
- package/combobox/combobox.cjs +0 -1
- package/combobox/combobox.d.ts +1 -1
- package/combobox/combobox.mjs +0 -1
- package/combobox/index.d.ts +7 -12
- package/combobox/use-combobox.d.ts +2 -7
- package/compose-refs.cjs +0 -1
- package/compose-refs.mjs +0 -1
- package/date-picker/date-picker-context.d.ts +2 -9
- package/date-picker/use-date-picker.d.ts +2 -7
- package/dialog/dialog-context.d.ts +2 -9
- package/dialog/use-dialog.d.ts +2 -7
- package/editable/editable-context.d.ts +2 -9
- package/editable/editable.d.ts +3 -3
- package/editable/index.d.ts +7 -12
- package/editable/use-editable.d.ts +2 -7
- package/factory.cjs +2 -2
- package/factory.mjs +1 -1
- package/hover-card/hover-card-context.d.ts +2 -9
- package/hover-card/use-hover-card.d.ts +2 -7
- package/index.cjs +0 -2
- package/index.mjs +0 -1
- package/menu/index.d.ts +2 -2
- package/menu/menu-item.d.ts +5 -8
- package/menu/use-menu.d.ts +1 -1
- package/number-input/index.d.ts +2 -2
- package/number-input/number-input-context.d.ts +2 -9
- package/number-input/number-input.d.ts +1 -1
- package/number-input/use-number-input.d.ts +2 -7
- package/package.json +49 -48
- package/pagination/index.d.ts +5 -11
- package/pagination/pagination-context.d.ts +2 -9
- package/pagination/pagination.d.ts +2 -2
- package/pagination/use-pagination.d.ts +2 -7
- package/pin-input/index.d.ts +2 -2
- package/pin-input/pin-input-context.d.ts +2 -9
- package/pin-input/pin-input.d.ts +1 -1
- package/pin-input/use-pin-input.d.ts +2 -7
- package/popover/popover-context.d.ts +2 -9
- package/popover/use-popover.d.ts +2 -7
- package/presence/use-presence.d.ts +1 -1
- package/pressable/use-pressable.d.ts +2 -7
- package/radio-group/index.d.ts +2 -2
- package/radio-group/radio-group-context.d.ts +2 -9
- package/radio-group/radio-group.d.ts +1 -1
- package/radio-group/use-radio-group.d.ts +2 -7
- package/range-slider/index.d.ts +8 -16
- package/range-slider/range-slider-context.d.ts +2 -9
- package/range-slider/range-slider.cjs +3 -0
- package/range-slider/range-slider.d.ts +1 -1
- package/range-slider/range-slider.mjs +3 -0
- package/range-slider/use-range-slider.d.ts +2 -7
- package/rating-group/index.d.ts +6 -8
- package/rating-group/rating-group-context.d.ts +2 -9
- package/rating-group/rating-group-control.d.ts +2 -2
- package/rating-group/rating-group.d.ts +1 -1
- package/rating-group/use-rating-group.d.ts +2 -7
- package/segment-group/index.d.ts +2 -2
- package/segment-group/segment-group-context.d.ts +2 -9
- package/segment-group/segment-group.d.ts +1 -1
- package/segment-group/use-segment-group.d.ts +2 -7
- package/select/select-context.d.ts +2 -9
- package/select/use-select.d.ts +2 -7
- package/slider/index.d.ts +5 -15
- package/slider/slider-context.d.ts +2 -9
- package/slider/slider.cjs +2 -0
- package/slider/slider.mjs +2 -0
- package/slider/use-slider.d.ts +2 -7
- package/splitter/index.d.ts +7 -12
- package/splitter/splitter-context.d.ts +2 -9
- package/splitter/splitter.d.ts +1 -1
- package/splitter/use-splitter.d.ts +2 -7
- package/switch/index.cjs +0 -3
- package/switch/index.d.ts +6 -19
- package/switch/index.mjs +1 -3
- package/switch/switch-context.d.ts +2 -9
- package/switch/switch-control.cjs +5 -2
- package/switch/switch-control.mjs +6 -3
- package/switch/switch.d.ts +2 -2
- package/switch/use-switch.d.ts +2 -7
- package/tabs/index.d.ts +2 -2
- package/tabs/tabs-context.d.ts +2 -9
- package/tabs/tabs.d.ts +1 -1
- package/tabs/use-tabs.cjs +21 -2
- package/tabs/use-tabs.d.ts +5 -10
- package/tabs/use-tabs.mjs +3 -3
- package/tags-input/index.d.ts +2 -2
- package/tags-input/tags-input-context.d.ts +2 -9
- package/tags-input/tags-input.cjs +1 -2
- package/tags-input/tags-input.d.ts +2 -2
- package/tags-input/tags-input.mjs +1 -2
- package/tags-input/use-tags-input.d.ts +2 -7
- package/toast/index.d.ts +1 -1
- package/toast/toast-group.d.ts +2 -2
- package/toast/toast-item-context.d.ts +2 -9
- package/toast/toast-provider.d.ts +2 -57
- package/toast/use-toast-item.d.ts +2 -7
- package/tooltip/tooltip-context.d.ts +2 -9
- package/tooltip/use-tooltip.d.ts +2 -7
- package/switch/switch-input.cjs +0 -19
- package/switch/switch-input.d.ts +0 -8
- package/switch/switch-input.mjs +0 -15
package/editable/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Context } from '@zag-js/editable';
|
|
2
|
+
import { UseEditableReturn } from './use-editable';
|
|
3
|
+
import { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefObject, ReactNode, RefAttributes, ButtonHTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes } from 'react';
|
|
3
4
|
/// <reference types="react" />
|
|
4
5
|
import { type EditableProps } from './editable';
|
|
5
6
|
import { EditableArea, type EditableAreaProps } from './editable-area';
|
|
@@ -17,11 +18,8 @@ declare const Editable: ForwardRefExoticComponent<Omit<Omit<Omit<Omit<DetailedHT
|
|
|
17
18
|
} & {
|
|
18
19
|
asChild?: boolean | undefined;
|
|
19
20
|
}, "ref">, "children"> & {
|
|
20
|
-
children
|
|
21
|
-
|
|
22
|
-
style: CSSProperties;
|
|
23
|
-
}>) => ReactNode);
|
|
24
|
-
}, "name" | "value" | "getRootNode" | "form" | "id" | "ids" | "disabled" | "onChange" | "onSubmit" | "defaultValue" | "dir" | "placeholder" | "onCancel" | "maxLength" | "readOnly" | "invalid" | "translations" | "onPointerDownOutside" | "onFocusOutside" | "onInteractOutside" | "finalFocusEl" | "autoResize" | "activationMode" | "submitMode" | "startWithEditView" | "selectOnFocus" | "onEdit"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
21
|
+
children?: ReactNode | ((pages: UseEditableReturn) => ReactNode);
|
|
22
|
+
}, "name" | "value" | "getRootNode" | "form" | "id" | "ids" | "disabled" | "defaultValue" | "dir" | "placeholder" | "onChange" | "onSubmit" | "maxLength" | "readOnly" | "onCancel" | "invalid" | "translations" | "onPointerDownOutside" | "onFocusOutside" | "onInteractOutside" | "finalFocusEl" | "autoResize" | "activationMode" | "submitMode" | "startWithEditView" | "selectOnFocus" | "onEdit"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
25
23
|
defaultValue?: string | undefined;
|
|
26
24
|
} & RefAttributes<HTMLDivElement>> & {
|
|
27
25
|
Root: ForwardRefExoticComponent<Omit<Omit<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
@@ -29,11 +27,8 @@ declare const Editable: ForwardRefExoticComponent<Omit<Omit<Omit<Omit<DetailedHT
|
|
|
29
27
|
} & {
|
|
30
28
|
asChild?: boolean | undefined;
|
|
31
29
|
}, "ref">, "children"> & {
|
|
32
|
-
children
|
|
33
|
-
|
|
34
|
-
style: CSSProperties;
|
|
35
|
-
}>) => ReactNode);
|
|
36
|
-
}, "name" | "value" | "getRootNode" | "form" | "id" | "ids" | "disabled" | "onChange" | "onSubmit" | "defaultValue" | "dir" | "placeholder" | "onCancel" | "maxLength" | "readOnly" | "invalid" | "translations" | "onPointerDownOutside" | "onFocusOutside" | "onInteractOutside" | "finalFocusEl" | "autoResize" | "activationMode" | "submitMode" | "startWithEditView" | "selectOnFocus" | "onEdit"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
30
|
+
children?: ReactNode | ((pages: UseEditableReturn) => ReactNode);
|
|
31
|
+
}, "name" | "value" | "getRootNode" | "form" | "id" | "ids" | "disabled" | "defaultValue" | "dir" | "placeholder" | "onChange" | "onSubmit" | "maxLength" | "readOnly" | "onCancel" | "invalid" | "translations" | "onPointerDownOutside" | "onFocusOutside" | "onInteractOutside" | "finalFocusEl" | "autoResize" | "activationMode" | "submitMode" | "startWithEditView" | "selectOnFocus" | "onEdit"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
37
32
|
defaultValue?: string | undefined;
|
|
38
33
|
} & RefAttributes<HTMLDivElement>>;
|
|
39
34
|
Area: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import { HTMLAttributes, CSSProperties } from 'react';
|
|
2
|
-
/// <reference types="react" />
|
|
3
1
|
import * as editable from '@zag-js/editable';
|
|
4
2
|
import { type Optional } from '../types';
|
|
5
3
|
export type UseEditableProps = Optional<editable.Context, 'id'> & {
|
|
6
4
|
defaultValue?: editable.Context['value'];
|
|
7
5
|
};
|
|
8
|
-
export type UseEditableReturn =
|
|
9
|
-
export declare const useEditable: (props: UseEditableProps) =>
|
|
10
|
-
element: HTMLAttributes<HTMLElement>;
|
|
11
|
-
style: CSSProperties;
|
|
12
|
-
}>;
|
|
6
|
+
export type UseEditableReturn = editable.MachineApi;
|
|
7
|
+
export declare const useEditable: (props: UseEditableProps) => UseEditableReturn;
|
package/factory.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
const
|
|
6
|
+
const core = require('@zag-js/core');
|
|
7
7
|
const react = require('react');
|
|
8
8
|
const composeRefs = require('./compose-refs.cjs');
|
|
9
9
|
|
|
@@ -15,7 +15,7 @@ const withAsChild = (Component) => {
|
|
|
15
15
|
}
|
|
16
16
|
const onlyChild = react.Children.only(children);
|
|
17
17
|
return react.isValidElement(onlyChild) ? react.cloneElement(onlyChild, {
|
|
18
|
-
...
|
|
18
|
+
...core.mergeProps(restProps, onlyChild.props),
|
|
19
19
|
ref: ref ? composeRefs.composeRefs(ref, onlyChild.ref) : onlyChild.ref
|
|
20
20
|
}) : null;
|
|
21
21
|
});
|
package/factory.mjs
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Provider, HTMLAttributes, CSSProperties } from 'react';
|
|
1
|
+
import { Provider } from 'react';
|
|
3
2
|
/// <reference types="react" />
|
|
4
3
|
import { type UseHoverCardReturn } from './use-hover-card';
|
|
5
4
|
export type HoverCardContext = UseHoverCardReturn;
|
|
6
|
-
export declare const HoverCardProvider: Provider<
|
|
7
|
-
element: HTMLAttributes<HTMLElement>;
|
|
8
|
-
style: CSSProperties;
|
|
9
|
-
}>>, useHoverCardContext: () => PublicApi<JSX.IntrinsicElements & {
|
|
10
|
-
element: HTMLAttributes<HTMLElement>;
|
|
11
|
-
style: CSSProperties;
|
|
12
|
-
}>;
|
|
5
|
+
export declare const HoverCardProvider: Provider<UseHoverCardReturn>, useHoverCardContext: () => UseHoverCardReturn;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { HTMLAttributes, CSSProperties } from 'react';
|
|
2
|
-
/// <reference types="react" />
|
|
3
1
|
import * as hoverCard from '@zag-js/hover-card';
|
|
4
2
|
import { type Optional } from '../types';
|
|
5
3
|
export type UseHoverCardProps = Optional<hoverCard.Context, 'id'>;
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
style: CSSProperties;
|
|
9
|
-
}>;
|
|
10
|
-
export type UseHoverCardReturn = ReturnType<typeof useHoverCard>;
|
|
4
|
+
export type UseHoverCardReturn = hoverCard.Api;
|
|
5
|
+
export declare const useHoverCard: (props: UseHoverCardProps) => UseHoverCardReturn;
|
package/index.cjs
CHANGED
|
@@ -243,7 +243,6 @@ const splitterResizeTrigger = require('./splitter/splitter-resize-trigger.cjs');
|
|
|
243
243
|
const splitter = require('@zag-js/splitter');
|
|
244
244
|
const splitterContext = require('./splitter/splitter-context.cjs');
|
|
245
245
|
const switchControl = require('./switch/switch-control.cjs');
|
|
246
|
-
const switchInput = require('./switch/switch-input.cjs');
|
|
247
246
|
const switchLabel = require('./switch/switch-label.cjs');
|
|
248
247
|
const switchThumb = require('./switch/switch-thumb.cjs');
|
|
249
248
|
const zagSwitch = require('@zag-js/switch');
|
|
@@ -581,7 +580,6 @@ Object.defineProperty(exports, 'splitterAnatomy', {
|
|
|
581
580
|
});
|
|
582
581
|
exports.useSplitterContext = splitterContext.useSplitterContext;
|
|
583
582
|
exports.SwitchControl = switchControl.SwitchControl;
|
|
584
|
-
exports.SwitchInput = switchInput.SwitchInput;
|
|
585
583
|
exports.SwitchLabel = switchLabel.SwitchLabel;
|
|
586
584
|
exports.SwitchThumb = switchThumb.SwitchThumb;
|
|
587
585
|
Object.defineProperty(exports, 'switchAnatomy', {
|
package/index.mjs
CHANGED
|
@@ -239,7 +239,6 @@ export { SplitterResizeTrigger } from './splitter/splitter-resize-trigger.mjs';
|
|
|
239
239
|
export { anatomy as splitterAnatomy } from '@zag-js/splitter';
|
|
240
240
|
export { useSplitterContext } from './splitter/splitter-context.mjs';
|
|
241
241
|
export { SwitchControl } from './switch/switch-control.mjs';
|
|
242
|
-
export { SwitchInput } from './switch/switch-input.mjs';
|
|
243
242
|
export { SwitchLabel } from './switch/switch-label.mjs';
|
|
244
243
|
export { SwitchThumb } from './switch/switch-thumb.mjs';
|
|
245
244
|
export { anatomy as switchAnatomy } from '@zag-js/switch';
|
package/menu/index.d.ts
CHANGED
|
@@ -39,8 +39,8 @@ declare const Menu: ((props: MenuProps) => JSX.Element) & {
|
|
|
39
39
|
} & {
|
|
40
40
|
asChild?: boolean | undefined;
|
|
41
41
|
}, "ref"> & RefAttributes<HTMLButtonElement>>;
|
|
42
|
-
Item: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<
|
|
43
|
-
ref?: ((instance:
|
|
42
|
+
Item: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
43
|
+
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
44
44
|
} & {
|
|
45
45
|
asChild?: boolean | undefined;
|
|
46
46
|
}, "ref">, keyof ItemProps> & ItemProps & RefAttributes<HTMLDivElement>>;
|
package/menu/menu-item.d.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { ItemProps } from '@zag-js/menu';
|
|
2
|
-
import { ForwardRefExoticComponent, DetailedHTMLProps,
|
|
1
|
+
import type { ItemProps } from '@zag-js/menu';
|
|
2
|
+
import { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
|
|
3
3
|
import { ark } from '../factory';
|
|
4
4
|
import { type Assign } from '../types';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export declare const MenuItem: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
9
|
-
ref?: ((instance: HTMLButtonElement | null) => void) | RefObject<HTMLButtonElement> | null | undefined;
|
|
5
|
+
export type MenuItemProps = Assign<ComponentPropsWithoutRef<typeof ark.div>, ItemProps>;
|
|
6
|
+
export declare const MenuItem: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
7
|
+
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
10
8
|
} & {
|
|
11
9
|
asChild?: boolean | undefined;
|
|
12
10
|
}, "ref">, keyof ItemProps> & ItemProps & RefAttributes<HTMLDivElement>>;
|
|
13
|
-
export {};
|
package/menu/use-menu.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ import { type Optional } from '../types';
|
|
|
3
3
|
export type UseMenuProps = Optional<menu.Context, 'id'>;
|
|
4
4
|
export type UseMenuReturn = {
|
|
5
5
|
machine: ReturnType<typeof menu.machine>;
|
|
6
|
-
api:
|
|
6
|
+
api: menu.Api;
|
|
7
7
|
};
|
|
8
8
|
export declare const useMenu: (props: UseMenuProps) => UseMenuReturn;
|
package/number-input/index.d.ts
CHANGED
|
@@ -14,14 +14,14 @@ declare const NumberInput: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTML
|
|
|
14
14
|
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
15
15
|
} & {
|
|
16
16
|
asChild?: boolean | undefined;
|
|
17
|
-
}, "ref">, "name" | "value" | "getRootNode" | "form" | "pattern" | "id" | "ids" | "disabled" | "
|
|
17
|
+
}, "ref">, "name" | "value" | "getRootNode" | "form" | "pattern" | "id" | "ids" | "disabled" | "defaultValue" | "dir" | "inputMode" | "onFocus" | "onBlur" | "onChange" | "onInvalid" | "max" | "min" | "readOnly" | "step" | "format" | "invalid" | "translations" | "parse" | "allowMouseWheel" | "allowOverflow" | "validateCharacter" | "clampValueOnBlur" | "focusInputOnChange" | "minFractionDigits" | "maxFractionDigits" | "spinOnPress"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
18
18
|
defaultValue?: string | undefined;
|
|
19
19
|
} & RefAttributes<HTMLDivElement>> & {
|
|
20
20
|
Root: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
21
21
|
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
22
22
|
} & {
|
|
23
23
|
asChild?: boolean | undefined;
|
|
24
|
-
}, "ref">, "name" | "value" | "getRootNode" | "form" | "pattern" | "id" | "ids" | "disabled" | "
|
|
24
|
+
}, "ref">, "name" | "value" | "getRootNode" | "form" | "pattern" | "id" | "ids" | "disabled" | "defaultValue" | "dir" | "inputMode" | "onFocus" | "onBlur" | "onChange" | "onInvalid" | "max" | "min" | "readOnly" | "step" | "format" | "invalid" | "translations" | "parse" | "allowMouseWheel" | "allowOverflow" | "validateCharacter" | "clampValueOnBlur" | "focusInputOnChange" | "minFractionDigits" | "maxFractionDigits" | "spinOnPress"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
25
25
|
defaultValue?: string | undefined;
|
|
26
26
|
} & RefAttributes<HTMLDivElement>>;
|
|
27
27
|
Control: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Provider, HTMLAttributes, CSSProperties } from 'react';
|
|
1
|
+
import { Provider } from 'react';
|
|
3
2
|
/// <reference types="react" />
|
|
4
3
|
import { type UseNumberInputReturn } from './use-number-input';
|
|
5
4
|
export type NumberInputContext = UseNumberInputReturn;
|
|
6
|
-
export declare const NumberInputProvider: Provider<
|
|
7
|
-
element: HTMLAttributes<HTMLElement>;
|
|
8
|
-
style: CSSProperties;
|
|
9
|
-
}>>, useNumberInputContext: () => PublicApi<JSX.IntrinsicElements & {
|
|
10
|
-
element: HTMLAttributes<HTMLElement>;
|
|
11
|
-
style: CSSProperties;
|
|
12
|
-
}>;
|
|
5
|
+
export declare const NumberInputProvider: Provider<UseNumberInputReturn>, useNumberInputContext: () => UseNumberInputReturn;
|
|
@@ -8,6 +8,6 @@ export declare const NumberInput: ForwardRefExoticComponent<Omit<Omit<Omit<Detai
|
|
|
8
8
|
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
9
9
|
} & {
|
|
10
10
|
asChild?: boolean | undefined;
|
|
11
|
-
}, "ref">, "name" | "value" | "getRootNode" | "form" | "pattern" | "id" | "ids" | "disabled" | "
|
|
11
|
+
}, "ref">, "name" | "value" | "getRootNode" | "form" | "pattern" | "id" | "ids" | "disabled" | "defaultValue" | "dir" | "inputMode" | "onFocus" | "onBlur" | "onChange" | "onInvalid" | "max" | "min" | "readOnly" | "step" | "format" | "invalid" | "translations" | "parse" | "allowMouseWheel" | "allowOverflow" | "validateCharacter" | "clampValueOnBlur" | "focusInputOnChange" | "minFractionDigits" | "maxFractionDigits" | "spinOnPress"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
12
12
|
defaultValue?: string | undefined;
|
|
13
13
|
} & RefAttributes<HTMLDivElement>>;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import { HTMLAttributes, CSSProperties } from 'react';
|
|
2
|
-
/// <reference types="react" />
|
|
3
1
|
import * as numberInput from '@zag-js/number-input';
|
|
4
2
|
import { type Optional } from '../types';
|
|
5
3
|
export type UseNumberInputProps = Optional<numberInput.Context, 'id'> & {
|
|
6
4
|
defaultValue?: numberInput.Context['value'];
|
|
7
5
|
};
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
style: CSSProperties;
|
|
11
|
-
}>;
|
|
12
|
-
export type UseNumberInputReturn = ReturnType<typeof useNumberInput>;
|
|
6
|
+
export type UseNumberInputReturn = numberInput.Api;
|
|
7
|
+
export declare const useNumberInput: (props: UseNumberInputProps) => UseNumberInputReturn;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ark-ui/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "A collection of unstyled, accessible UI components for React, utilizing state machines for seamless interaction.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accordion",
|
|
@@ -60,74 +60,75 @@
|
|
|
60
60
|
"release-it": "release-it --config ../../release-it.json"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@zag-js/accordion": "0.
|
|
64
|
-
"@zag-js/anatomy": "0.
|
|
65
|
-
"@zag-js/avatar": "0.
|
|
66
|
-
"@zag-js/carousel": "0.
|
|
67
|
-
"@zag-js/checkbox": "0.
|
|
68
|
-
"@zag-js/color-picker": "0.
|
|
69
|
-
"@zag-js/color-utils": "0.
|
|
70
|
-
"@zag-js/combobox": "0.
|
|
71
|
-
"@zag-js/
|
|
72
|
-
"@zag-js/date-
|
|
73
|
-
"@zag-js/
|
|
74
|
-
"@zag-js/
|
|
75
|
-
"@zag-js/
|
|
76
|
-
"@zag-js/
|
|
77
|
-
"@zag-js/
|
|
78
|
-
"@zag-js/
|
|
79
|
-
"@zag-js/
|
|
80
|
-
"@zag-js/
|
|
81
|
-
"@zag-js/
|
|
82
|
-
"@zag-js/
|
|
83
|
-
"@zag-js/
|
|
84
|
-
"@zag-js/
|
|
85
|
-
"@zag-js/
|
|
86
|
-
"@zag-js/
|
|
87
|
-
"@zag-js/
|
|
88
|
-
"@zag-js/
|
|
89
|
-
"@zag-js/
|
|
90
|
-
"@zag-js/
|
|
91
|
-
"@zag-js/
|
|
92
|
-
"@zag-js/
|
|
93
|
-
"@zag-js/
|
|
94
|
-
"@zag-js/
|
|
95
|
-
"@zag-js/
|
|
63
|
+
"@zag-js/accordion": "0.17.0",
|
|
64
|
+
"@zag-js/anatomy": "0.17.0",
|
|
65
|
+
"@zag-js/avatar": "0.17.0",
|
|
66
|
+
"@zag-js/carousel": "0.17.0",
|
|
67
|
+
"@zag-js/checkbox": "0.17.0",
|
|
68
|
+
"@zag-js/color-picker": "0.17.0",
|
|
69
|
+
"@zag-js/color-utils": "0.17.0",
|
|
70
|
+
"@zag-js/combobox": "0.17.0",
|
|
71
|
+
"@zag-js/core": "0.17.0",
|
|
72
|
+
"@zag-js/date-picker": "0.17.0",
|
|
73
|
+
"@zag-js/date-utils": "0.17.0",
|
|
74
|
+
"@zag-js/dialog": "0.17.0",
|
|
75
|
+
"@zag-js/editable": "0.17.0",
|
|
76
|
+
"@zag-js/hover-card": "0.17.0",
|
|
77
|
+
"@zag-js/menu": "0.17.0",
|
|
78
|
+
"@zag-js/number-input": "0.17.0",
|
|
79
|
+
"@zag-js/pagination": "0.17.0",
|
|
80
|
+
"@zag-js/pin-input": "0.17.0",
|
|
81
|
+
"@zag-js/popover": "0.17.0",
|
|
82
|
+
"@zag-js/presence": "0.17.0",
|
|
83
|
+
"@zag-js/pressable": "0.17.0",
|
|
84
|
+
"@zag-js/radio-group": "0.17.0",
|
|
85
|
+
"@zag-js/range-slider": "0.17.0",
|
|
86
|
+
"@zag-js/rating-group": "0.17.0",
|
|
87
|
+
"@zag-js/react": "0.17.0",
|
|
88
|
+
"@zag-js/select": "0.17.0",
|
|
89
|
+
"@zag-js/slider": "0.17.0",
|
|
90
|
+
"@zag-js/splitter": "0.17.0",
|
|
91
|
+
"@zag-js/switch": "0.17.0",
|
|
92
|
+
"@zag-js/tabs": "0.17.0",
|
|
93
|
+
"@zag-js/tags-input": "0.17.0",
|
|
94
|
+
"@zag-js/toast": "0.17.0",
|
|
95
|
+
"@zag-js/tooltip": "0.17.0",
|
|
96
|
+
"@zag-js/types": "0.17.0"
|
|
96
97
|
},
|
|
97
98
|
"devDependencies": {
|
|
98
99
|
"@release-it/keep-a-changelog": "4.0.0",
|
|
99
|
-
"@storybook/addon-a11y": "7.
|
|
100
|
-
"@storybook/addon-essentials": "7.
|
|
101
|
-
"@storybook/addons": "7.
|
|
102
|
-
"@storybook/react": "7.
|
|
103
|
-
"@storybook/react-vite": "7.
|
|
100
|
+
"@storybook/addon-a11y": "7.3.2",
|
|
101
|
+
"@storybook/addon-essentials": "7.3.2",
|
|
102
|
+
"@storybook/addons": "7.3.2",
|
|
103
|
+
"@storybook/react": "7.3.2",
|
|
104
|
+
"@storybook/react-vite": "7.3.2",
|
|
104
105
|
"@testing-library/dom": "9.3.1",
|
|
105
106
|
"@testing-library/jest-dom": "5.17.0",
|
|
106
107
|
"@testing-library/react": "14.0.0",
|
|
107
108
|
"@testing-library/user-event": "14.4.3",
|
|
108
|
-
"@types/jsdom": "21.1.
|
|
109
|
+
"@types/jsdom": "21.1.2",
|
|
109
110
|
"@types/react": "18.2.17",
|
|
110
111
|
"@types/react-dom": "18.2.7",
|
|
111
112
|
"@types/testing-library__jest-dom": "5.14.9",
|
|
112
113
|
"@typescript-eslint/eslint-plugin": "5.62.0",
|
|
113
114
|
"@typescript-eslint/parser": "5.62.0",
|
|
114
115
|
"@vitejs/plugin-react": "4.0.3",
|
|
115
|
-
"@vitest/coverage-v8": "0.34.
|
|
116
|
-
"eslint": "8.
|
|
117
|
-
"eslint-plugin-react": "7.33.
|
|
116
|
+
"@vitest/coverage-v8": "0.34.2",
|
|
117
|
+
"eslint": "8.48.0",
|
|
118
|
+
"eslint-plugin-react": "7.33.2",
|
|
118
119
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
119
120
|
"globby": "13.2.2",
|
|
120
121
|
"jsdom": "22.1.0",
|
|
121
122
|
"react": "18.2.0",
|
|
122
123
|
"react-dom": "18.2.0",
|
|
123
124
|
"react-frame-component": "5.2.6",
|
|
124
|
-
"release-it": "16.1.
|
|
125
|
+
"release-it": "16.1.5",
|
|
125
126
|
"resize-observer-polyfill": "1.5.1",
|
|
126
|
-
"storybook": "7.
|
|
127
|
-
"typescript": "5.
|
|
127
|
+
"storybook": "7.3.2",
|
|
128
|
+
"typescript": "5.2.2",
|
|
128
129
|
"vite": "4.4.9",
|
|
129
|
-
"vite-plugin-dts": "3.5.
|
|
130
|
-
"vitest": "0.34.
|
|
130
|
+
"vite-plugin-dts": "3.5.3",
|
|
131
|
+
"vitest": "0.34.2"
|
|
131
132
|
},
|
|
132
133
|
"peerDependencies": {
|
|
133
134
|
"react": ">=18.0.0",
|
package/pagination/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { UsePaginationProps } from './use-pagination';
|
|
1
|
+
import { EllipsisProps, PageTriggerProps } from '@zag-js/pagination';
|
|
2
|
+
import { UsePaginationProps, UsePaginationReturn } from './use-pagination';
|
|
3
3
|
import { Assign } from '../types';
|
|
4
|
-
import { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefObject, ReactNode,
|
|
4
|
+
import { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefObject, ReactNode, RefAttributes, LiHTMLAttributes, ButtonHTMLAttributes } from 'react';
|
|
5
5
|
/// <reference types="react" />
|
|
6
6
|
import { type PaginationProps } from './pagination';
|
|
7
7
|
import { usePaginationContext } from './pagination-context';
|
|
@@ -17,20 +17,14 @@ declare const Pagination: ForwardRefExoticComponent<Omit<Assign<Omit<Omit<Detail
|
|
|
17
17
|
} & {
|
|
18
18
|
asChild?: boolean | undefined;
|
|
19
19
|
}, "ref">, UsePaginationProps>, "children"> & {
|
|
20
|
-
children
|
|
21
|
-
element: HTMLAttributes<HTMLElement>;
|
|
22
|
-
style: CSSProperties;
|
|
23
|
-
}>) => ReactNode);
|
|
20
|
+
children?: ReactNode | ((pages: UsePaginationReturn) => ReactNode);
|
|
24
21
|
} & RefAttributes<HTMLElement>> & {
|
|
25
22
|
Root: ForwardRefExoticComponent<Omit<Assign<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
26
23
|
ref?: ((instance: HTMLElement | null) => void) | RefObject<HTMLElement> | null | undefined;
|
|
27
24
|
} & {
|
|
28
25
|
asChild?: boolean | undefined;
|
|
29
26
|
}, "ref">, UsePaginationProps>, "children"> & {
|
|
30
|
-
children
|
|
31
|
-
element: HTMLAttributes<HTMLElement>;
|
|
32
|
-
style: CSSProperties;
|
|
33
|
-
}>) => ReactNode);
|
|
27
|
+
children?: ReactNode | ((pages: UsePaginationReturn) => ReactNode);
|
|
34
28
|
} & RefAttributes<HTMLElement>>;
|
|
35
29
|
Ellipsis: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
36
30
|
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Provider, HTMLAttributes, CSSProperties } from 'react';
|
|
1
|
+
import { Provider } from 'react';
|
|
3
2
|
/// <reference types="react" />
|
|
4
3
|
import { type UsePaginationReturn } from './use-pagination';
|
|
5
4
|
export type PaginationContext = UsePaginationReturn;
|
|
6
|
-
export declare const PaginationProvider: Provider<
|
|
7
|
-
element: HTMLAttributes<HTMLElement>;
|
|
8
|
-
style: CSSProperties;
|
|
9
|
-
}>>, usePaginationContext: () => PublicApi<JSX.IntrinsicElements & {
|
|
10
|
-
element: HTMLAttributes<HTMLElement>;
|
|
11
|
-
style: CSSProperties;
|
|
12
|
-
}>;
|
|
5
|
+
export declare const PaginationProvider: Provider<UsePaginationReturn>, usePaginationContext: () => UsePaginationReturn;
|
|
@@ -3,12 +3,12 @@ import { ark } from '../factory';
|
|
|
3
3
|
import { type Assign } from '../types';
|
|
4
4
|
import { type UsePaginationProps, type UsePaginationReturn } from './use-pagination';
|
|
5
5
|
export type PaginationProps = Assign<Assign<ComponentPropsWithoutRef<typeof ark.nav>, UsePaginationProps>, {
|
|
6
|
-
children
|
|
6
|
+
children?: ReactNode | ((pages: UsePaginationReturn) => ReactNode);
|
|
7
7
|
}>;
|
|
8
8
|
export declare const Pagination: ForwardRefExoticComponent<Omit<Assign<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
9
9
|
ref?: ((instance: HTMLElement | null) => void) | RefObject<HTMLElement> | null | undefined;
|
|
10
10
|
} & {
|
|
11
11
|
asChild?: boolean | undefined;
|
|
12
12
|
}, "ref">, UsePaginationProps>, "children"> & {
|
|
13
|
-
children
|
|
13
|
+
children?: ReactNode | ((pages: UsePaginationReturn) => ReactNode);
|
|
14
14
|
} & RefAttributes<HTMLElement>>;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import { HTMLAttributes, CSSProperties } from 'react';
|
|
2
|
-
/// <reference types="react" />
|
|
3
1
|
import * as pagination from '@zag-js/pagination';
|
|
4
2
|
import { type Optional } from '../types';
|
|
5
3
|
export type UsePaginationProps = Optional<pagination.Context, 'id'> & {
|
|
6
4
|
defaultPage?: pagination.Context['page'];
|
|
7
5
|
};
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
style: CSSProperties;
|
|
11
|
-
}>;
|
|
12
|
-
export type UsePaginationReturn = ReturnType<typeof usePagination>;
|
|
6
|
+
export type UsePaginationReturn = pagination.Api;
|
|
7
|
+
export declare const usePagination: (props: UsePaginationProps) => UsePaginationReturn;
|
package/pin-input/index.d.ts
CHANGED
|
@@ -11,14 +11,14 @@ declare const PinInput: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLPro
|
|
|
11
11
|
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
12
12
|
} & {
|
|
13
13
|
asChild?: boolean | undefined;
|
|
14
|
-
}, "ref">, "name" | "value" | "getRootNode" | "form" | "mask" | "pattern" | "id" | "ids" | "disabled" | "type" | "
|
|
14
|
+
}, "ref">, "name" | "value" | "getRootNode" | "form" | "mask" | "pattern" | "id" | "ids" | "disabled" | "type" | "defaultValue" | "autoFocus" | "dir" | "placeholder" | "onChange" | "onInvalid" | "invalid" | "translations" | "selectOnFocus" | "otp" | "onComplete" | "blurOnComplete"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
15
15
|
defaultValue?: string[] | undefined;
|
|
16
16
|
} & RefAttributes<HTMLDivElement>> & {
|
|
17
17
|
Root: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
18
18
|
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
19
19
|
} & {
|
|
20
20
|
asChild?: boolean | undefined;
|
|
21
|
-
}, "ref">, "name" | "value" | "getRootNode" | "form" | "mask" | "pattern" | "id" | "ids" | "disabled" | "type" | "
|
|
21
|
+
}, "ref">, "name" | "value" | "getRootNode" | "form" | "mask" | "pattern" | "id" | "ids" | "disabled" | "type" | "defaultValue" | "autoFocus" | "dir" | "placeholder" | "onChange" | "onInvalid" | "invalid" | "translations" | "selectOnFocus" | "otp" | "onComplete" | "blurOnComplete"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
22
22
|
defaultValue?: string[] | undefined;
|
|
23
23
|
} & RefAttributes<HTMLDivElement>>;
|
|
24
24
|
Control: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Provider, HTMLAttributes, CSSProperties } from 'react';
|
|
1
|
+
import { Provider } from 'react';
|
|
3
2
|
/// <reference types="react" />
|
|
4
3
|
import { type UsePinInputReturn } from './use-pin-input';
|
|
5
4
|
export type PinInputContext = UsePinInputReturn;
|
|
6
|
-
export declare const PinInputProvider: Provider<
|
|
7
|
-
element: HTMLAttributes<HTMLElement>;
|
|
8
|
-
style: CSSProperties;
|
|
9
|
-
}>>, usePinInputContext: () => PublicApi<JSX.IntrinsicElements & {
|
|
10
|
-
element: HTMLAttributes<HTMLElement>;
|
|
11
|
-
style: CSSProperties;
|
|
12
|
-
}>;
|
|
5
|
+
export declare const PinInputProvider: Provider<UsePinInputReturn>, usePinInputContext: () => UsePinInputReturn;
|
package/pin-input/pin-input.d.ts
CHANGED
|
@@ -8,6 +8,6 @@ export declare const PinInput: ForwardRefExoticComponent<Omit<Omit<Omit<Detailed
|
|
|
8
8
|
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
9
9
|
} & {
|
|
10
10
|
asChild?: boolean | undefined;
|
|
11
|
-
}, "ref">, "name" | "value" | "getRootNode" | "form" | "mask" | "pattern" | "id" | "ids" | "disabled" | "type" | "
|
|
11
|
+
}, "ref">, "name" | "value" | "getRootNode" | "form" | "mask" | "pattern" | "id" | "ids" | "disabled" | "type" | "defaultValue" | "autoFocus" | "dir" | "placeholder" | "onChange" | "onInvalid" | "invalid" | "translations" | "selectOnFocus" | "otp" | "onComplete" | "blurOnComplete"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
12
12
|
defaultValue?: string[] | undefined;
|
|
13
13
|
} & RefAttributes<HTMLDivElement>>;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import { HTMLAttributes, CSSProperties } from 'react';
|
|
2
|
-
/// <reference types="react" />
|
|
3
1
|
import * as pinInput from '@zag-js/pin-input';
|
|
4
2
|
import { type Optional } from '../types';
|
|
5
3
|
export type UsePinInputProps = Optional<pinInput.Context, 'id'> & {
|
|
6
4
|
defaultValue?: pinInput.Context['value'];
|
|
7
5
|
};
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
style: CSSProperties;
|
|
11
|
-
}>;
|
|
12
|
-
export type UsePinInputReturn = ReturnType<typeof usePinInput>;
|
|
6
|
+
export type UsePinInputReturn = pinInput.Api;
|
|
7
|
+
export declare const usePinInput: (props: UsePinInputProps) => UsePinInputReturn;
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Provider, HTMLAttributes, CSSProperties } from 'react';
|
|
1
|
+
import { Provider } from 'react';
|
|
3
2
|
/// <reference types="react" />
|
|
4
3
|
import { type UsePopoverReturn } from './use-popover';
|
|
5
4
|
export type PopoverContext = UsePopoverReturn;
|
|
6
|
-
export declare const PopoverProvider: Provider<
|
|
7
|
-
element: HTMLAttributes<HTMLElement>;
|
|
8
|
-
style: CSSProperties;
|
|
9
|
-
}>>, usePopoverContext: () => PublicApi<JSX.IntrinsicElements & {
|
|
10
|
-
element: HTMLAttributes<HTMLElement>;
|
|
11
|
-
style: CSSProperties;
|
|
12
|
-
}>;
|
|
5
|
+
export declare const PopoverProvider: Provider<UsePopoverReturn>, usePopoverContext: () => UsePopoverReturn;
|
package/popover/use-popover.d.ts
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { HTMLAttributes, CSSProperties } from 'react';
|
|
2
|
-
/// <reference types="react" />
|
|
3
1
|
import * as popover from '@zag-js/popover';
|
|
4
2
|
import { type Optional } from '../types';
|
|
5
3
|
export type UsePopoverProps = Optional<popover.Context, 'id'>;
|
|
6
|
-
export type UsePopoverReturn =
|
|
7
|
-
export declare const usePopover: (props: UsePopoverProps) =>
|
|
8
|
-
element: HTMLAttributes<HTMLElement>;
|
|
9
|
-
style: CSSProperties;
|
|
10
|
-
}>;
|
|
4
|
+
export type UsePopoverReturn = popover.Api;
|
|
5
|
+
export declare const usePopover: (props: UsePopoverProps) => UsePopoverReturn;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as presence from '@zag-js/presence';
|
|
2
2
|
import type { Optional } from '../types';
|
|
3
3
|
export type UsePresenceProps = Optional<presence.Context, 'present'>;
|
|
4
|
-
export declare const usePresence: (props: UsePresenceProps) => presence.
|
|
4
|
+
export declare const usePresence: (props: UsePresenceProps) => presence.Api;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { HTMLAttributes, CSSProperties } from 'react';
|
|
2
|
-
/// <reference types="react" />
|
|
3
1
|
import * as pressable from '@zag-js/pressable';
|
|
4
2
|
import { type Optional } from '../types';
|
|
5
3
|
export type UsePressableProps = Optional<pressable.Context, 'id'>;
|
|
6
|
-
export type UsePressableReturn =
|
|
7
|
-
export declare const usePressable: (props?: UsePressableProps) =>
|
|
8
|
-
element: HTMLAttributes<HTMLElement>;
|
|
9
|
-
style: CSSProperties;
|
|
10
|
-
}>;
|
|
4
|
+
export type UsePressableReturn = pressable.Api;
|
|
5
|
+
export declare const usePressable: (props?: UsePressableProps) => UsePressableReturn;
|
package/radio-group/index.d.ts
CHANGED
|
@@ -13,14 +13,14 @@ declare const RadioGroup: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLP
|
|
|
13
13
|
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
14
14
|
} & {
|
|
15
15
|
asChild?: boolean | undefined;
|
|
16
|
-
}, "ref">, "name" | "value" | "getRootNode" | "form" | "id" | "ids" | "disabled" | "
|
|
16
|
+
}, "ref">, "name" | "value" | "getRootNode" | "form" | "id" | "ids" | "disabled" | "defaultValue" | "dir" | "onChange" | "readOnly" | "orientation"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
17
17
|
defaultValue?: string | null | undefined;
|
|
18
18
|
} & RefAttributes<HTMLDivElement>> & {
|
|
19
19
|
Root: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
20
20
|
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
21
21
|
} & {
|
|
22
22
|
asChild?: boolean | undefined;
|
|
23
|
-
}, "ref">, "name" | "value" | "getRootNode" | "form" | "id" | "ids" | "disabled" | "
|
|
23
|
+
}, "ref">, "name" | "value" | "getRootNode" | "form" | "id" | "ids" | "disabled" | "defaultValue" | "dir" | "onChange" | "readOnly" | "orientation"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
24
24
|
defaultValue?: string | null | undefined;
|
|
25
25
|
} & RefAttributes<HTMLDivElement>>;
|
|
26
26
|
Label: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & {
|