Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@zag-js/collapsible

Package Overview
Dependencies
Maintainers
1
Versions
309
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/collapsible - npm Package Compare versions

Comparing version 0.0.0-dev-20240214184027 to 0.0.0-dev-20240214213151

29

dist/index.d.ts
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 };

12

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc