@koobiq/react-primitives 0.25.0 → 0.26.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.
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { ElementType, RefObject } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { DOMAttributes, HoverEvents } from '@koobiq/react-core';
|
|
3
|
+
import type { AriaButtonOptions, ButtonAria } from '@react-aria/button';
|
|
4
4
|
export type UseButtonProps<E extends ElementType> = AriaButtonOptions<E> & HoverEvents;
|
|
5
5
|
export type ButtonOptions = AriaButtonOptions<ElementType>;
|
|
6
|
-
export
|
|
6
|
+
export type UseButtonReturn = {
|
|
7
7
|
isPressed: boolean;
|
|
8
8
|
isHovered: boolean;
|
|
9
9
|
isFocused: boolean;
|
|
10
|
-
isDisabled
|
|
11
|
-
buttonProps: import("@react-types/shared").DOMAttributes<import("@react-types/shared").FocusableElement>;
|
|
10
|
+
isDisabled?: boolean;
|
|
12
11
|
isFocusVisible: boolean;
|
|
12
|
+
buttonProps: ButtonAria<DOMAttributes>['buttonProps'];
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export declare function useButton<E extends ElementType>(props: UseButtonProps<E>, ref: RefObject<Element | null>): UseButtonReturn;
|
|
@@ -9,28 +9,6 @@ export type ButtonRenderProps = {
|
|
|
9
9
|
isFocusVisible: boolean;
|
|
10
10
|
};
|
|
11
11
|
export type ButtonBaseProps = RenderProps<ButtonRenderProps> & {
|
|
12
|
-
/** Submitted as a pair with the button's value as part of the form data. */
|
|
13
|
-
name?: string;
|
|
14
|
-
/** The value associated with the button's name when it's submitted with the form data. */
|
|
15
|
-
value?: string;
|
|
16
|
-
/**
|
|
17
|
-
* The `<form>` element to associate the button with.
|
|
18
|
-
* The value of this attribute must be the id of a `<form>` in the same document.
|
|
19
|
-
*/
|
|
20
|
-
form?: string;
|
|
21
|
-
/**
|
|
22
|
-
* The URL that processes the information submitted by the button.
|
|
23
|
-
* Overrides the action attribute of the button's form owner.
|
|
24
|
-
*/
|
|
25
|
-
formAction?: string;
|
|
26
|
-
/** Indicates how to encode the form data that is submitted. */
|
|
27
|
-
formEncType?: string;
|
|
28
|
-
/** Indicates the HTTP method used to submit the form. */
|
|
29
|
-
formMethod?: string;
|
|
30
|
-
/** Indicates that the form is not to be validated when it is submitted. */
|
|
31
|
-
formNoValidate?: boolean;
|
|
32
|
-
/** Overrides the target attribute of the button's form owner. */
|
|
33
|
-
formTarget?: string;
|
|
34
12
|
tabIndex?: number;
|
|
35
13
|
slot?: string;
|
|
36
14
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koobiq/react-primitives",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@react-aria/autocomplete": "^3.0.0-rc.5",
|
|
28
28
|
"@react-aria/breadcrumbs": "^3.5.29",
|
|
29
|
-
"@react-aria/button": "^3.
|
|
29
|
+
"@react-aria/button": "^3.14.4",
|
|
30
30
|
"@react-aria/calendar": "^3.8.3",
|
|
31
31
|
"@react-aria/checkbox": "^3.16.2",
|
|
32
32
|
"@react-aria/collections": "^3.0.2",
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
"@react-stately/toggle": "^3.9.2",
|
|
78
78
|
"@react-stately/tooltip": "^3.5.5",
|
|
79
79
|
"@react-stately/tree": "^3.8.9",
|
|
80
|
-
"@koobiq/
|
|
81
|
-
"@koobiq/
|
|
80
|
+
"@koobiq/logger": "0.26.0",
|
|
81
|
+
"@koobiq/react-core": "0.26.0"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
84
|
"react": "18.x || 19.x",
|