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

@zag-js/form-utils

Package Overview
Dependencies
Maintainers
1
Versions
710
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/form-utils - npm Package Compare versions

Comparing version 0.0.0-dev-20221118143153 to 0.0.0-dev-20221118145623

7

dist/index.d.ts

@@ -13,3 +13,8 @@ declare type DescriptorOptions = {

declare function isNativeDisabled(el: HTMLElement): boolean;
declare type FormControlOptions = {
onFieldsetDisabled: () => void;
onFormReset: () => void;
};
declare function trackFormControl(el: HTMLElement | null, options: FormControlOptions): (() => void) | undefined;
export { dispatchInputCheckedEvent, dispatchInputValueEvent, getClosestForm, isNativeDisabled, setElementValue, trackFieldsetDisabled, trackFormReset };
export { FormControlOptions, dispatchInputCheckedEvent, dispatchInputValueEvent, getClosestForm, isNativeDisabled, setElementValue, trackFieldsetDisabled, trackFormControl, trackFormReset };

@@ -29,2 +29,3 @@ "use strict";

trackFieldsetDisabled: () => trackFieldsetDisabled,
trackFormControl: () => trackFormControl,
trackFormReset: () => trackFormReset

@@ -121,2 +122,17 @@ });

}
function trackFormControl(el, options) {
if (!el)
return;
const { onFieldsetDisabled, onFormReset } = options;
const cleanups = [
trackFormReset(el, onFormReset),
trackFieldsetDisabled(el, (disabled) => {
if (disabled)
onFieldsetDisabled();
})
];
return () => {
cleanups.forEach((cleanup) => cleanup == null ? void 0 : cleanup());
};
}
// Annotate the CommonJS export names for ESM import in node:

@@ -130,3 +146,4 @@ 0 && (module.exports = {

trackFieldsetDisabled,
trackFormControl,
trackFormReset
});

4

package.json
{
"name": "@zag-js/form-utils",
"version": "0.0.0-dev-20221118143153",
"version": "0.0.0-dev-20221118145623",
"description": "",

@@ -22,3 +22,3 @@ "main": "dist/index.js",

"devDependencies": {
"@zag-js/dom-utils": "0.0.0-dev-20221118143153"
"@zag-js/dom-utils": "0.0.0-dev-20221118145623"
},

@@ -25,0 +25,0 @@ "publishConfig": {

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