@zag-js/collapsible
Advanced tools
Comparing version 0.0.0-dev-20240214184027 to 0.0.0-dev-20240214213151
import * as _zag_js_anatomy from '@zag-js/anatomy'; | ||
import { RequiredBy, DirectionProperty, CommonProperties, Context, PropTypes, NormalizeProps } from '@zag-js/types'; | ||
import { RequiredBy, PropTypes, DirectionProperty, CommonProperties, Context, NormalizeProps } from '@zag-js/types'; | ||
import * as _zag_js_core from '@zag-js/core'; | ||
@@ -48,2 +48,27 @@ import { StateMachine } from '@zag-js/core'; | ||
type Send = StateMachine.Send<StateMachine.AnyEventObject>; | ||
interface MachineApi<T extends PropTypes = PropTypes> { | ||
/** | ||
* Whether the collapsible is open. | ||
*/ | ||
isOpen: boolean; | ||
/** | ||
* Whether the collapsible is disabled | ||
*/ | ||
isDisabled: boolean; | ||
/** | ||
* Whether the checkbox is focused | ||
*/ | ||
isFocused: boolean | undefined; | ||
/** | ||
* Function to open the collapsible. | ||
*/ | ||
open(): void; | ||
/** | ||
* Function to close the collapsible. | ||
*/ | ||
close(): void; | ||
rootProps: T["element"]; | ||
triggerProps: T["button"]; | ||
contentProps: T["element"]; | ||
} | ||
@@ -61,2 +86,2 @@ declare function connect<T extends PropTypes>(state: State, send: Send, normalize: NormalizeProps<T>): { | ||
export { type UserDefinedContext as Context, type OpenChangeDetails, anatomy, connect, machine }; | ||
export { type MachineApi as Api, type UserDefinedContext as Context, type ElementIds, type OpenChangeDetails, anatomy, connect, machine }; |
{ | ||
"name": "@zag-js/collapsible", | ||
"version": "0.0.0-dev-20240214184027", | ||
"version": "0.0.0-dev-20240214213151", | ||
"description": "Core logic for the collapsible widget implemented as a state machine", | ||
@@ -31,7 +31,7 @@ "keywords": [ | ||
"dependencies": { | ||
"@zag-js/anatomy": "0.0.0-dev-20240214184027", | ||
"@zag-js/core": "0.0.0-dev-20240214184027", | ||
"@zag-js/dom-query": "0.0.0-dev-20240214184027", | ||
"@zag-js/utils": "0.0.0-dev-20240214184027", | ||
"@zag-js/types": "0.0.0-dev-20240214184027" | ||
"@zag-js/anatomy": "0.0.0-dev-20240214213151", | ||
"@zag-js/core": "0.0.0-dev-20240214213151", | ||
"@zag-js/dom-query": "0.0.0-dev-20240214213151", | ||
"@zag-js/utils": "0.0.0-dev-20240214213151", | ||
"@zag-js/types": "0.0.0-dev-20240214213151" | ||
}, | ||
@@ -38,0 +38,0 @@ "devDependencies": { |
@@ -16,3 +16,3 @@ import type { StateMachine as S } from "@zag-js/core" | ||
type ElementIds = Partial<{ | ||
export type ElementIds = Partial<{ | ||
root: string | ||
@@ -19,0 +19,0 @@ content: string |
export { anatomy } from "./collapsible.anatomy" | ||
export { connect } from "./collapsible.connect" | ||
export { machine } from "./collapsible.machine" | ||
export type { UserDefinedContext as Context, OpenChangeDetails } from "./collapsible.types" | ||
export type { | ||
MachineApi as Api, | ||
UserDefinedContext as Context, | ||
ElementIds, | ||
OpenChangeDetails, | ||
} from "./collapsible.types" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59003
832
+ Added@zag-js/anatomy@0.0.0-dev-20240214213151(transitive)
+ Added@zag-js/core@0.0.0-dev-20240214213151(transitive)
+ Added@zag-js/dom-query@0.0.0-dev-20240214213151(transitive)
+ Added@zag-js/store@0.0.0-dev-20240214213151(transitive)
+ Added@zag-js/types@0.0.0-dev-20240214213151(transitive)
+ Added@zag-js/utils@0.0.0-dev-20240214213151(transitive)
- Removed@zag-js/anatomy@0.0.0-dev-20240214184027(transitive)
- Removed@zag-js/core@0.0.0-dev-20240214184027(transitive)
- Removed@zag-js/dom-query@0.0.0-dev-20240214184027(transitive)
- Removed@zag-js/store@0.0.0-dev-20240214184027(transitive)
- Removed@zag-js/types@0.0.0-dev-20240214184027(transitive)
- Removed@zag-js/utils@0.0.0-dev-20240214184027(transitive)