@ark-ui/react 0.0.0-rc-20230516003041 → 0.0.0-rc-20230516120446
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/checkbox/checkbox-context.d.ts +2 -0
- package/dist/checkbox/use-checkbox.d.ts +1 -0
- package/dist/switch/switch-context.d.ts +4 -4
- package/dist/switch/switch.cjs +0 -3
- package/dist/switch/switch.d.ts +3 -3
- package/dist/switch/switch.mjs +0 -3
- package/dist/switch/use-switch.d.ts +2 -2
- package/dist/tabs/tab-trigger.d.ts +2 -2
- package/dist/tabs/tabs-context.d.ts +5 -9
- package/dist/tabs/use-tabs.d.ts +3 -5
- package/package.json +32 -32
|
@@ -9,6 +9,7 @@ export declare const CheckboxProvider: Provider<{
|
|
|
9
9
|
isFocused: boolean | undefined;
|
|
10
10
|
checkedState: CheckedState;
|
|
11
11
|
setChecked(checked: CheckedState): void;
|
|
12
|
+
toggleChecked(): void;
|
|
12
13
|
rootProps: DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>;
|
|
13
14
|
labelProps: HTMLAttributes<HTMLElement>;
|
|
14
15
|
controlProps: HTMLAttributes<HTMLElement>;
|
|
@@ -20,6 +21,7 @@ export declare const CheckboxProvider: Provider<{
|
|
|
20
21
|
isFocused: boolean | undefined;
|
|
21
22
|
checkedState: CheckedState;
|
|
22
23
|
setChecked(checked: CheckedState): void;
|
|
24
|
+
toggleChecked(): void;
|
|
23
25
|
rootProps: DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>;
|
|
24
26
|
labelProps: HTMLAttributes<HTMLElement>;
|
|
25
27
|
controlProps: HTMLAttributes<HTMLElement>;
|
|
@@ -11,6 +11,7 @@ export declare const useCheckbox: (props: UseCheckboxProps) => {
|
|
|
11
11
|
isFocused: boolean | undefined;
|
|
12
12
|
checkedState: CheckedState;
|
|
13
13
|
setChecked(checked: CheckedState): void;
|
|
14
|
+
toggleChecked(): void;
|
|
14
15
|
rootProps: DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>;
|
|
15
16
|
labelProps: HTMLAttributes<HTMLElement>;
|
|
16
17
|
controlProps: HTMLAttributes<HTMLElement>;
|
|
@@ -5,8 +5,8 @@ export declare const SwitchProvider: Provider<{
|
|
|
5
5
|
isChecked: boolean;
|
|
6
6
|
isDisabled: boolean | undefined;
|
|
7
7
|
isFocused: boolean | undefined;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
setChecked(checked: boolean): void;
|
|
9
|
+
toggleChecked(): void;
|
|
10
10
|
rootProps: DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>;
|
|
11
11
|
labelProps: HTMLAttributes<HTMLElement>;
|
|
12
12
|
thumbProps: HTMLAttributes<HTMLElement>;
|
|
@@ -16,8 +16,8 @@ export declare const SwitchProvider: Provider<{
|
|
|
16
16
|
isChecked: boolean;
|
|
17
17
|
isDisabled: boolean | undefined;
|
|
18
18
|
isFocused: boolean | undefined;
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
setChecked(checked: boolean): void;
|
|
20
|
+
toggleChecked(): void;
|
|
21
21
|
rootProps: DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>;
|
|
22
22
|
labelProps: HTMLAttributes<HTMLElement>;
|
|
23
23
|
thumbProps: HTMLAttributes<HTMLElement>;
|
package/dist/switch/switch.cjs
CHANGED
|
@@ -13,9 +13,6 @@ const useSwitch = require('./use-switch.cjs');
|
|
|
13
13
|
|
|
14
14
|
const Switch = forwardRef.forwardRef((props, ref) => {
|
|
15
15
|
const [switchProps, { children, ...labelProps }] = createSplitProps.createSplitProps()(props, [
|
|
16
|
-
"aria-describedby",
|
|
17
|
-
"aria-label",
|
|
18
|
-
"aria-labelledby",
|
|
19
16
|
"checked",
|
|
20
17
|
"dir",
|
|
21
18
|
"disabled",
|
package/dist/switch/switch.d.ts
CHANGED
|
@@ -72,7 +72,7 @@ export declare const Switch: ForwardRefExoticComponent<{
|
|
|
72
72
|
'aria-colspan'?: number | undefined;
|
|
73
73
|
'aria-controls'?: string | undefined;
|
|
74
74
|
'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
|
|
75
|
-
|
|
75
|
+
'aria-describedby'?: string | undefined;
|
|
76
76
|
'aria-details'?: string | undefined;
|
|
77
77
|
'aria-disabled'?: (boolean | "true" | "false") | undefined;
|
|
78
78
|
'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
|
|
@@ -84,8 +84,8 @@ export declare const Switch: ForwardRefExoticComponent<{
|
|
|
84
84
|
'aria-hidden'?: (boolean | "true" | "false") | undefined;
|
|
85
85
|
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
86
86
|
'aria-keyshortcuts'?: string | undefined;
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
'aria-label'?: string | undefined;
|
|
88
|
+
'aria-labelledby'?: string | undefined;
|
|
89
89
|
'aria-level'?: number | undefined;
|
|
90
90
|
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
91
91
|
'aria-modal'?: (boolean | "true" | "false") | undefined;
|
package/dist/switch/switch.mjs
CHANGED
|
@@ -9,9 +9,6 @@ import { useSwitch } from './use-switch.mjs';
|
|
|
9
9
|
|
|
10
10
|
const Switch = forwardRef((props, ref) => {
|
|
11
11
|
const [switchProps, { children, ...labelProps }] = createSplitProps()(props, [
|
|
12
|
-
"aria-describedby",
|
|
13
|
-
"aria-label",
|
|
14
|
-
"aria-labelledby",
|
|
15
12
|
"checked",
|
|
16
13
|
"dir",
|
|
17
14
|
"disabled",
|
|
@@ -6,8 +6,8 @@ export declare const useSwitch: (props: UseSwitchProps) => {
|
|
|
6
6
|
isChecked: boolean;
|
|
7
7
|
isDisabled: boolean | undefined;
|
|
8
8
|
isFocused: boolean | undefined;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
setChecked(checked: boolean): void;
|
|
10
|
+
toggleChecked(): void;
|
|
11
11
|
rootProps: DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>;
|
|
12
12
|
labelProps: HTMLAttributes<HTMLElement>;
|
|
13
13
|
thumbProps: HTMLAttributes<HTMLElement>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ForwardRefExoticComponent, ReactNode, CSSProperties, LegacyRef, Key, AriaRole, ClipboardEventHandler, CompositionEventHandler, FocusEventHandler, FormEventHandler, ReactEventHandler, KeyboardEventHandler, MouseEventHandler, DragEventHandler, TouchEventHandler, PointerEventHandler, UIEventHandler, WheelEventHandler, AnimationEventHandler, TransitionEventHandler } from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { TriggerProps } from '@zag-js/tabs';
|
|
3
3
|
import { type HTMLArkProps } from '../factory';
|
|
4
4
|
import { type Assign } from '../types';
|
|
5
|
-
export type TabTriggerProps = Assign<HTMLArkProps<'button'>,
|
|
5
|
+
export type TabTriggerProps = Assign<HTMLArkProps<'button'>, TriggerProps>;
|
|
6
6
|
export declare const TabTrigger: ForwardRefExoticComponent<{
|
|
7
7
|
name?: string | undefined;
|
|
8
8
|
children?: ReactNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TriggerProps, ContentProps } from '@zag-js/tabs/dist/tabs.types';
|
|
2
2
|
import type { Provider, HTMLAttributes, DetailedHTMLProps, ButtonHTMLAttributes } from 'react';
|
|
3
3
|
import { type UseTabsReturn } from './use-tabs';
|
|
4
4
|
export type TabsContext = UseTabsReturn;
|
|
@@ -11,11 +11,9 @@ export declare const TabsProvider: Provider<{
|
|
|
11
11
|
setIndicatorRect(id: string | null | undefined): void;
|
|
12
12
|
rootProps: HTMLAttributes<HTMLElement>;
|
|
13
13
|
tablistProps: HTMLAttributes<HTMLElement>;
|
|
14
|
-
getTriggerProps(props:
|
|
14
|
+
getTriggerProps(props: TriggerProps): DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
|
15
15
|
contentGroupProps: HTMLAttributes<HTMLElement>;
|
|
16
|
-
getContentProps({ value }:
|
|
17
|
-
value: string;
|
|
18
|
-
}): HTMLAttributes<HTMLElement>;
|
|
16
|
+
getContentProps({ value }: ContentProps): HTMLAttributes<HTMLElement>;
|
|
19
17
|
indicatorProps: HTMLAttributes<HTMLElement>;
|
|
20
18
|
}>, useTabsContext: () => {
|
|
21
19
|
value: string | null;
|
|
@@ -26,10 +24,8 @@ export declare const TabsProvider: Provider<{
|
|
|
26
24
|
setIndicatorRect(id: string | null | undefined): void;
|
|
27
25
|
rootProps: HTMLAttributes<HTMLElement>;
|
|
28
26
|
tablistProps: HTMLAttributes<HTMLElement>;
|
|
29
|
-
getTriggerProps(props:
|
|
27
|
+
getTriggerProps(props: TriggerProps): DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
|
30
28
|
contentGroupProps: HTMLAttributes<HTMLElement>;
|
|
31
|
-
getContentProps({ value }:
|
|
32
|
-
value: string;
|
|
33
|
-
}): HTMLAttributes<HTMLElement>;
|
|
29
|
+
getContentProps({ value }: ContentProps): HTMLAttributes<HTMLElement>;
|
|
34
30
|
indicatorProps: HTMLAttributes<HTMLElement>;
|
|
35
31
|
};
|
package/dist/tabs/use-tabs.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TriggerProps, ContentProps } from '@zag-js/tabs/dist/tabs.types';
|
|
2
2
|
import type { HTMLAttributes, DetailedHTMLProps, ButtonHTMLAttributes } from 'react';
|
|
3
3
|
import { type Context } from '@zag-js/tabs';
|
|
4
4
|
import { type Optional } from '../types';
|
|
@@ -15,10 +15,8 @@ export declare const useTabs: (props: UseTabsProps) => {
|
|
|
15
15
|
setIndicatorRect(id: string | null | undefined): void;
|
|
16
16
|
rootProps: HTMLAttributes<HTMLElement>;
|
|
17
17
|
tablistProps: HTMLAttributes<HTMLElement>;
|
|
18
|
-
getTriggerProps(props:
|
|
18
|
+
getTriggerProps(props: TriggerProps): DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
|
19
19
|
contentGroupProps: HTMLAttributes<HTMLElement>;
|
|
20
|
-
getContentProps({ value }:
|
|
21
|
-
value: string;
|
|
22
|
-
}): HTMLAttributes<HTMLElement>;
|
|
20
|
+
getContentProps({ value }: ContentProps): HTMLAttributes<HTMLElement>;
|
|
23
21
|
indicatorProps: HTMLAttributes<HTMLElement>;
|
|
24
22
|
};
|
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-20230516120446",
|
|
4
4
|
"description": "A collection of unstyled, accessible UI components for React, utilizing state machines for seamless interaction.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -48,35 +48,35 @@
|
|
|
48
48
|
"url": "https://github.com/chakra-ui/ark/issues"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@zag-js/accordion": "0.
|
|
52
|
-
"@zag-js/anatomy": "0.1
|
|
53
|
-
"@zag-js/carousel": "0.
|
|
54
|
-
"@zag-js/color-picker": "0.
|
|
55
|
-
"@zag-js/checkbox": "0.
|
|
56
|
-
"@zag-js/combobox": "0.
|
|
57
|
-
"@zag-js/dialog": "0.
|
|
58
|
-
"@zag-js/editable": "0.
|
|
59
|
-
"@zag-js/hover-card": "0.
|
|
60
|
-
"@zag-js/menu": "0.
|
|
61
|
-
"@zag-js/number-input": "0.
|
|
62
|
-
"@zag-js/pagination": "0.
|
|
63
|
-
"@zag-js/pin-input": "0.
|
|
64
|
-
"@zag-js/popover": "0.
|
|
65
|
-
"@zag-js/pressable": "0.
|
|
66
|
-
"@zag-js/radio-group": "0.
|
|
67
|
-
"@zag-js/range-slider": "0.
|
|
68
|
-
"@zag-js/rating-group": "0.
|
|
69
|
-
"@zag-js/react": "0.
|
|
70
|
-
"@zag-js/select": "0.
|
|
71
|
-
"@zag-js/slider": "0.
|
|
72
|
-
"@zag-js/splitter": "0.
|
|
73
|
-
"@zag-js/switch": "0.
|
|
74
|
-
"@zag-js/tabs": "0.
|
|
75
|
-
"@zag-js/tags-input": "0.
|
|
76
|
-
"@zag-js/toast": "0.
|
|
77
|
-
"@zag-js/tooltip": "0.
|
|
78
|
-
"@zag-js/transition": "0.
|
|
79
|
-
"@zag-js/types": "0.
|
|
51
|
+
"@zag-js/accordion": "0.9.1",
|
|
52
|
+
"@zag-js/anatomy": "0.9.1",
|
|
53
|
+
"@zag-js/carousel": "0.9.1",
|
|
54
|
+
"@zag-js/color-picker": "0.9.1",
|
|
55
|
+
"@zag-js/checkbox": "0.9.1",
|
|
56
|
+
"@zag-js/combobox": "0.9.1",
|
|
57
|
+
"@zag-js/dialog": "0.9.1",
|
|
58
|
+
"@zag-js/editable": "0.9.1",
|
|
59
|
+
"@zag-js/hover-card": "0.9.1",
|
|
60
|
+
"@zag-js/menu": "0.9.1",
|
|
61
|
+
"@zag-js/number-input": "0.9.1",
|
|
62
|
+
"@zag-js/pagination": "0.9.1",
|
|
63
|
+
"@zag-js/pin-input": "0.9.1",
|
|
64
|
+
"@zag-js/popover": "0.9.1",
|
|
65
|
+
"@zag-js/pressable": "0.9.1",
|
|
66
|
+
"@zag-js/radio-group": "0.9.1",
|
|
67
|
+
"@zag-js/range-slider": "0.9.1",
|
|
68
|
+
"@zag-js/rating-group": "0.9.1",
|
|
69
|
+
"@zag-js/react": "0.9.1",
|
|
70
|
+
"@zag-js/select": "0.9.1",
|
|
71
|
+
"@zag-js/slider": "0.9.1",
|
|
72
|
+
"@zag-js/splitter": "0.9.1",
|
|
73
|
+
"@zag-js/switch": "0.9.1",
|
|
74
|
+
"@zag-js/tabs": "0.9.1",
|
|
75
|
+
"@zag-js/tags-input": "0.9.1",
|
|
76
|
+
"@zag-js/toast": "0.9.1",
|
|
77
|
+
"@zag-js/tooltip": "0.9.1",
|
|
78
|
+
"@zag-js/transition": "0.9.1",
|
|
79
|
+
"@zag-js/types": "0.9.1"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@testing-library/dom": "9.3.0",
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
"@types/react": "18.0.32",
|
|
88
88
|
"@types/react-dom": "18.0.11",
|
|
89
89
|
"@types/testing-library__jest-dom": "5.14.5",
|
|
90
|
-
"@typescript-eslint/eslint-plugin": "5.59.
|
|
91
|
-
"@typescript-eslint/parser": "5.59.
|
|
90
|
+
"@typescript-eslint/eslint-plugin": "5.59.6",
|
|
91
|
+
"@typescript-eslint/parser": "5.59.6",
|
|
92
92
|
"@vitejs/plugin-react": "3.1.0",
|
|
93
93
|
"@vitest/coverage-c8": "0.31.0",
|
|
94
94
|
"clean-package": "2.2.0",
|