@koobiq/react-primitives 0.24.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;
|
|
@@ -3,8 +3,9 @@ import type { ValidationResult } from '@koobiq/react-core';
|
|
|
3
3
|
import type { AriaListBoxOptions } from '@react-aria/listbox';
|
|
4
4
|
import type { AriaSelectProps, AriaButtonProps } from '../index';
|
|
5
5
|
import type { MultiSelectProps as MultiSelectStateProps, MultiSelectState } from './useMultiSelectState';
|
|
6
|
-
type MultiSelectProps<T> = Omit<AriaSelectProps<T>, 'onSelectionChange'> & {
|
|
6
|
+
type MultiSelectProps<T> = Omit<AriaSelectProps<T>, 'onSelectionChange' | 'selectionMode'> & {
|
|
7
7
|
disallowEmptySelection?: boolean;
|
|
8
|
+
selectionMode?: 'single' | 'multiple';
|
|
8
9
|
onSelectionChange?: MultiSelectStateProps<T>['onSelectionChange'];
|
|
9
10
|
};
|
|
10
11
|
interface MultiSelectAria<T> extends ValidationResult {
|
|
@@ -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/dist/index.d.ts
CHANGED
|
@@ -12,10 +12,13 @@ export * from '@react-aria/listbox';
|
|
|
12
12
|
export * from '@react-stately/list';
|
|
13
13
|
export * from '@react-aria/select';
|
|
14
14
|
export * from '@react-stately/select';
|
|
15
|
+
export * from '@react-aria/collections';
|
|
15
16
|
export * from '@react-aria/menu';
|
|
16
17
|
export * from '@react-stately/menu';
|
|
17
18
|
export * from '@react-aria/toggle';
|
|
18
19
|
export * from '@react-stately/toggle';
|
|
20
|
+
export { type AriaAutocompleteProps, type AutocompleteAria, useAutocomplete, } from '@react-aria/autocomplete';
|
|
21
|
+
export { type AutocompleteState, useAutocompleteState, } from '@react-stately/autocomplete';
|
|
19
22
|
export { useCheckboxGroup } from '@react-aria/checkbox';
|
|
20
23
|
export type { AriaCheckboxGroupItemProps, AriaCheckboxGroupProps, AriaCheckboxProps, } from '@react-aria/checkbox';
|
|
21
24
|
export * from '@react-stately/checkbox';
|
|
@@ -32,7 +35,7 @@ export * from '@react-aria/searchfield';
|
|
|
32
35
|
export * from '@react-stately/searchfield';
|
|
33
36
|
export * from '@react-aria/progress';
|
|
34
37
|
export * from '@react-aria/combobox';
|
|
35
|
-
export
|
|
38
|
+
export { type ComboBoxStateOptions, type ComboBoxState, useComboBoxState, } from '@react-stately/combobox';
|
|
36
39
|
export * from '@react-aria/toast';
|
|
37
40
|
export * from '@react-stately/toast';
|
|
38
41
|
export * from '@react-aria/breadcrumbs';
|
package/dist/index.js
CHANGED
|
@@ -12,10 +12,13 @@ export * from "@react-aria/listbox";
|
|
|
12
12
|
export * from "@react-stately/list";
|
|
13
13
|
export * from "@react-aria/select";
|
|
14
14
|
export * from "@react-stately/select";
|
|
15
|
+
export * from "@react-aria/collections";
|
|
15
16
|
export * from "@react-aria/menu";
|
|
16
17
|
export * from "@react-stately/menu";
|
|
17
18
|
export * from "@react-aria/toggle";
|
|
18
19
|
export * from "@react-stately/toggle";
|
|
20
|
+
import { useAutocomplete } from "@react-aria/autocomplete";
|
|
21
|
+
import { useAutocompleteState } from "@react-stately/autocomplete";
|
|
19
22
|
import { useCheckboxGroup } from "@react-aria/checkbox";
|
|
20
23
|
export * from "@react-stately/checkbox";
|
|
21
24
|
export * from "@react-aria/tag";
|
|
@@ -31,7 +34,7 @@ export * from "@react-aria/searchfield";
|
|
|
31
34
|
export * from "@react-stately/searchfield";
|
|
32
35
|
export * from "@react-aria/progress";
|
|
33
36
|
export * from "@react-aria/combobox";
|
|
34
|
-
|
|
37
|
+
import { useComboBoxState } from "@react-stately/combobox";
|
|
35
38
|
export * from "@react-aria/toast";
|
|
36
39
|
export * from "@react-stately/toast";
|
|
37
40
|
export * from "@react-aria/breadcrumbs";
|
|
@@ -110,6 +113,8 @@ export {
|
|
|
110
113
|
Textarea,
|
|
111
114
|
TextareaContext,
|
|
112
115
|
removeDataAttributes,
|
|
116
|
+
useAutocomplete,
|
|
117
|
+
useAutocompleteState,
|
|
113
118
|
useButton,
|
|
114
119
|
useCalendar,
|
|
115
120
|
useCalendarCell,
|
|
@@ -117,6 +122,7 @@ export {
|
|
|
117
122
|
useCheckbox,
|
|
118
123
|
useCheckboxGroup,
|
|
119
124
|
useCheckboxGroupItem,
|
|
125
|
+
useComboBoxState,
|
|
120
126
|
useContextProps,
|
|
121
127
|
useGroupContext,
|
|
122
128
|
useInputContext,
|
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",
|
|
@@ -24,24 +24,26 @@
|
|
|
24
24
|
},
|
|
25
25
|
"sideEffects": false,
|
|
26
26
|
"dependencies": {
|
|
27
|
+
"@react-aria/autocomplete": "^3.0.0-rc.5",
|
|
27
28
|
"@react-aria/breadcrumbs": "^3.5.29",
|
|
28
|
-
"@react-aria/button": "^3.
|
|
29
|
+
"@react-aria/button": "^3.14.4",
|
|
29
30
|
"@react-aria/calendar": "^3.8.3",
|
|
30
31
|
"@react-aria/checkbox": "^3.16.2",
|
|
32
|
+
"@react-aria/collections": "^3.0.2",
|
|
31
33
|
"@react-aria/combobox": "^3.14.0",
|
|
32
34
|
"@react-aria/datepicker": "^3.15.2",
|
|
33
35
|
"@react-aria/dialog": "^3.5.19",
|
|
34
36
|
"@react-aria/disclosure": "^3.1.1",
|
|
35
37
|
"@react-aria/label": "^3.7.20",
|
|
36
38
|
"@react-aria/link": "^3.8.3",
|
|
37
|
-
"@react-aria/listbox": "^3.
|
|
39
|
+
"@react-aria/listbox": "^3.15.2",
|
|
38
40
|
"@react-aria/menu": "^3.18.2",
|
|
39
41
|
"@react-aria/numberfield": "^3.12.2",
|
|
40
42
|
"@react-aria/overlays": "^3.27.3",
|
|
41
43
|
"@react-aria/progress": "^3.4.17",
|
|
42
44
|
"@react-aria/radio": "^3.10.9",
|
|
43
45
|
"@react-aria/searchfield": "^3.8.7",
|
|
44
|
-
"@react-aria/select": "^3.
|
|
46
|
+
"@react-aria/select": "^3.17.2",
|
|
45
47
|
"@react-aria/selection": "^3.25.0",
|
|
46
48
|
"@react-aria/separator": "^3.4.8",
|
|
47
49
|
"@react-aria/switch": "^3.7.5",
|
|
@@ -54,6 +56,7 @@
|
|
|
54
56
|
"@react-aria/toolbar": "3.0.0-beta.22",
|
|
55
57
|
"@react-aria/tooltip": "^3.8.5",
|
|
56
58
|
"@react-aria/visually-hidden": "^3.8.0",
|
|
59
|
+
"@react-stately/autocomplete": "^3.0.0-beta.4",
|
|
57
60
|
"@react-stately/calendar": "^3.8.2",
|
|
58
61
|
"@react-stately/collections": "^3.12.5",
|
|
59
62
|
"@react-stately/combobox": "^3.12.0",
|
|
@@ -61,21 +64,21 @@
|
|
|
61
64
|
"@react-stately/datepicker": "^3.15.2",
|
|
62
65
|
"@react-stately/disclosure": "^3.0.9",
|
|
63
66
|
"@react-stately/form": "^3.2.0",
|
|
64
|
-
"@react-stately/list": "^3.
|
|
67
|
+
"@react-stately/list": "^3.13.3",
|
|
65
68
|
"@react-stately/menu": "^3.9.3",
|
|
66
69
|
"@react-stately/numberfield": "^3.10.2",
|
|
67
70
|
"@react-stately/overlays": "^3.6.17",
|
|
68
71
|
"@react-stately/radio": "^3.10.8",
|
|
69
72
|
"@react-stately/searchfield": "^3.5.14",
|
|
70
|
-
"@react-stately/select": "3.
|
|
73
|
+
"@react-stately/select": "^3.9.1",
|
|
71
74
|
"@react-stately/table": "^3.14.3",
|
|
72
75
|
"@react-stately/tabs": "^3.8.6",
|
|
73
76
|
"@react-stately/toast": "^3.1.2",
|
|
74
77
|
"@react-stately/toggle": "^3.9.2",
|
|
75
78
|
"@react-stately/tooltip": "^3.5.5",
|
|
76
79
|
"@react-stately/tree": "^3.8.9",
|
|
77
|
-
"@koobiq/logger": "0.
|
|
78
|
-
"@koobiq/react-core": "0.
|
|
80
|
+
"@koobiq/logger": "0.26.0",
|
|
81
|
+
"@koobiq/react-core": "0.26.0"
|
|
79
82
|
},
|
|
80
83
|
"peerDependencies": {
|
|
81
84
|
"react": "18.x || 19.x",
|