{"_id":"@data-slot/switch","_rev":"11-c4aca70a474ab0d339da13dbd6448516","name":"@data-slot/switch","dist-tags":{"latest":"1.0.0"},"versions":{"0.2.156":{"name":"@data-slot/switch","version":"0.2.156","keywords":["headless","ui","switch","toggle","form","vanilla","data-slot"],"license":"MIT","_id":"@data-slot/switch@0.2.156","maintainers":[{"name":"thomkrupa","email":"thom@bejamas.com"}],"homepage":"https://github.com/bejamas/data-slot#readme","bugs":{"url":"https://github.com/bejamas/data-slot/issues"},"dist":{"shasum":"b739652a4fc6f6dc10d44a8aeef4d054e36c8dda","tarball":"https://registry.npmjs.org/@data-slot/switch/-/switch-0.2.156.tgz","fileCount":6,"integrity":"sha512-5TrSawNSA72Q0FZWFwHp7UjgrVikI/ZZqmLtMoS7LRktWtw4kVF+KcTWNzDB11F+IJt2o8dSwswDdIz096nxHg==","signatures":[{"sig":"MEUCIEfX56FRnnNh+E8ap6f9NgXkcmcXezjDI18B9lmym/9VAiEA9ENwLiWs4C97QYIPVy3hrPaldD1lCFqaIFv1PVKvUA0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@data-slot%2fswitch@0.2.156","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17339},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsdown"},"_npmUser":{"name":"thomkrupa","email":"thom@bejamas.com"},"repository":{"url":"git+https://github.com/bejamas/data-slot.git","type":"git","directory":"packages/switch"},"_npmVersion":"10.8.2","description":"Headless switch component for vanilla JavaScript. Accessible, form-ready, and unstyled.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.1","dependencies":{"@data-slot/core":"0.2.156"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/switch_0.2.156_1773905388255_0.9999278048197215","host":"s3://npm-registry-packages-npm-production"}},"0.2.157":{"name":"@data-slot/switch","version":"0.2.157","keywords":["headless","ui","switch","toggle","form","vanilla","data-slot"],"license":"MIT","_id":"@data-slot/switch@0.2.157","maintainers":[{"name":"thomkrupa","email":"thom@bejamas.com"}],"homepage":"https://github.com/bejamas/data-slot#readme","bugs":{"url":"https://github.com/bejamas/data-slot/issues"},"dist":{"shasum":"a21bdf7ba3a3993cea78f024375c80ec5f385862","tarball":"https://registry.npmjs.org/@data-slot/switch/-/switch-0.2.157.tgz","fileCount":6,"integrity":"sha512-tfO5EgQ4IdLH/y7IV/qIBsLqEwn4bfaitSLybmEFdvdJvC9wszBKUJrLqCPG/mtUmfzwDwXRONmexFXaBjNvWA==","signatures":[{"sig":"MEUCIEl+9fzd9U35lFusUmRbG9/59YwH7zkSAbTDJWgS6awnAiEAojLUYPxmFyiGzQHfGvbMEEVsZA+w+pwD8+MlUS6nmG4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@data-slot%2fswitch@0.2.157","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17339},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsdown"},"_npmUser":{"name":"thomkrupa","email":"thom@bejamas.com"},"repository":{"url":"git+https://github.com/bejamas/data-slot.git","type":"git","directory":"packages/switch"},"_npmVersion":"10.8.2","description":"Headless switch component for vanilla JavaScript. Accessible, form-ready, and unstyled.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.1","dependencies":{"@data-slot/core":"0.2.157"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/switch_0.2.157_1773912088299_0.6574152204032453","host":"s3://npm-registry-packages-npm-production"}},"0.2.158":{"name":"@data-slot/switch","version":"0.2.158","keywords":["headless","ui","switch","toggle","form","vanilla","data-slot"],"license":"MIT","_id":"@data-slot/switch@0.2.158","maintainers":[{"name":"thomkrupa","email":"thom@bejamas.com"}],"homepage":"https://github.com/bejamas/data-slot#readme","bugs":{"url":"https://github.com/bejamas/data-slot/issues"},"dist":{"shasum":"0c9c1ed24345ee387fe98a5feec874042a922136","tarball":"https://registry.npmjs.org/@data-slot/switch/-/switch-0.2.158.tgz","fileCount":6,"integrity":"sha512-sYFx5gm5hXL0Nx1ciacMtQN80Kjq8IPXZdz3tli7gxFEGWcUXppb5dojtzSgFpfkz0ahwN3uZRqxBs+FXLyeOg==","signatures":[{"sig":"MEUCIQCF3KYRdlV8mdc0l64B8GAv6Ku0NZqgqq8HLErJKolz5AIgO4qEdtPG4u/zZXcv0XusYB7Dd7cLU5N8vV9c36OMcVc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@data-slot%2fswitch@0.2.158","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17339},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsdown"},"_npmUser":{"name":"thomkrupa","email":"thom@bejamas.com"},"repository":{"url":"git+https://github.com/bejamas/data-slot.git","type":"git","directory":"packages/switch"},"_npmVersion":"10.8.2","description":"Headless switch component for vanilla JavaScript. Accessible, form-ready, and unstyled.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.1","dependencies":{"@data-slot/core":"0.2.158"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/switch_0.2.158_1773984345350_0.44456260802206127","host":"s3://npm-registry-packages-npm-production"}},"0.2.159":{"name":"@data-slot/switch","version":"0.2.159","keywords":["headless","ui","switch","toggle","form","vanilla","data-slot"],"license":"MIT","_id":"@data-slot/switch@0.2.159","maintainers":[{"name":"thomkrupa","email":"thom@bejamas.com"}],"homepage":"https://github.com/bejamas/data-slot#readme","bugs":{"url":"https://github.com/bejamas/data-slot/issues"},"dist":{"shasum":"128b0060a11aaf44404e33d014c66c5ab478664b","tarball":"https://registry.npmjs.org/@data-slot/switch/-/switch-0.2.159.tgz","fileCount":6,"integrity":"sha512-K9Llnm3jL6gITn/ZTOzy2QhJUwF+IAWeZkvddsDRDr57PDJwdnFdj08kRQ2h3LcpdjKZYEn4vjljZ3pzuaHMPw==","signatures":[{"sig":"MEQCIENivErusH8Z3EJAE4jLMELSAM/Kq7J7tH+dR0orBDQXAiByR6xdxHZ3U6M3Fd2bSmY7XDCBGw934kGsEOzvpRp3HA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@data-slot%2fswitch@0.2.159","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17339},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsdown"},"_npmUser":{"name":"thomkrupa","email":"thom@bejamas.com"},"repository":{"url":"git+https://github.com/bejamas/data-slot.git","type":"git","directory":"packages/switch"},"_npmVersion":"10.8.2","description":"Headless switch component for vanilla JavaScript. Accessible, form-ready, and unstyled.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.1","dependencies":{"@data-slot/core":"0.2.159"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/switch_0.2.159_1773994351005_0.8210633459798191","host":"s3://npm-registry-packages-npm-production"}},"0.2.160":{"name":"@data-slot/switch","version":"0.2.160","keywords":["headless","ui","switch","toggle","form","vanilla","data-slot"],"license":"MIT","_id":"@data-slot/switch@0.2.160","maintainers":[{"name":"thomkrupa","email":"thom@bejamas.com"}],"homepage":"https://github.com/bejamas/data-slot#readme","bugs":{"url":"https://github.com/bejamas/data-slot/issues"},"dist":{"shasum":"790fe1772af26a954ab5ef435414a5d997d5dc00","tarball":"https://registry.npmjs.org/@data-slot/switch/-/switch-0.2.160.tgz","fileCount":6,"integrity":"sha512-1R+fs59KtBzfaBqj9PfZIMRcXYxXFz83k2j6Jx6iugv9Bj3sJML9+SLopLDtnbxJdS3IUehS1h3rzmGAt1+XJg==","signatures":[{"sig":"MEUCIHQQzyVkZIfWfGwZFhzEbpMDAuP7WwX4x3ktyVQTCt4aAiEAxilJ6HLWGB9Xe8Svoekd0o5+VVmMynUG5bAbWQ0kQjc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@data-slot%2fswitch@0.2.160","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17339},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsdown"},"_npmUser":{"name":"thomkrupa","email":"thom@bejamas.com"},"repository":{"url":"git+https://github.com/bejamas/data-slot.git","type":"git","directory":"packages/switch"},"_npmVersion":"10.8.2","description":"Headless switch component for vanilla JavaScript. Accessible, form-ready, and unstyled.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.1","dependencies":{"@data-slot/core":"0.2.160"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/switch_0.2.160_1774009342337_0.8431980395526637","host":"s3://npm-registry-packages-npm-production"}},"0.2.161":{"name":"@data-slot/switch","version":"0.2.161","keywords":["headless","ui","switch","toggle","form","vanilla","data-slot"],"license":"MIT","_id":"@data-slot/switch@0.2.161","maintainers":[{"name":"thomkrupa","email":"thom@bejamas.com"}],"homepage":"https://github.com/bejamas/data-slot#readme","bugs":{"url":"https://github.com/bejamas/data-slot/issues"},"dist":{"shasum":"a8352e915891707b0cd98463206276bd7e80f9b1","tarball":"https://registry.npmjs.org/@data-slot/switch/-/switch-0.2.161.tgz","fileCount":6,"integrity":"sha512-9uz753k1mlryRNIqfBeISE7XwhpLblJ1Ia0LhBodqBOwqqOmcroOjs+qV/Xf4Nk4obBPV0D77md73ToGE3nD6g==","signatures":[{"sig":"MEUCIQC0929irB/j1UB/aoJhySDV5tRsf9LNH/pvS42i/jKDJwIgboVKwfhSynrnYcXM168DwxzWjXnsM/N8FLw+F4uixog=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@data-slot%2fswitch@0.2.161","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17339},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsdown"},"_npmUser":{"name":"thomkrupa","email":"thom@bejamas.com"},"repository":{"url":"git+https://github.com/bejamas/data-slot.git","type":"git","directory":"packages/switch"},"_npmVersion":"10.8.2","description":"Headless switch component for vanilla JavaScript. Accessible, form-ready, and unstyled.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.1","dependencies":{"@data-slot/core":"0.2.161"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/switch_0.2.161_1774022759368_0.7704311021327035","host":"s3://npm-registry-packages-npm-production"}},"0.2.163":{"name":"@data-slot/switch","version":"0.2.163","keywords":["headless","ui","switch","toggle","form","vanilla","data-slot"],"license":"MIT","_id":"@data-slot/switch@0.2.163","maintainers":[{"name":"thomkrupa","email":"thom@bejamas.com"}],"homepage":"https://github.com/bejamas/data-slot#readme","bugs":{"url":"https://github.com/bejamas/data-slot/issues"},"dist":{"shasum":"e8cb7ef10af80270d3f25df3533e170863b10d88","tarball":"https://registry.npmjs.org/@data-slot/switch/-/switch-0.2.163.tgz","fileCount":6,"integrity":"sha512-iG/L/nq4Hk01oCLQgunJAk9YOycRCFUsDVAvSFLjSENSVBcL4Fv9Rb3+0PWWvXTwvwgmH7hcBYmj3vst7aslIA==","signatures":[{"sig":"MEUCIQCne1H4OBuwvPOBEHSNK6Fu7pLEaw0EHJKC7qb6BnJt3AIgNz4VRaVqhG7pVRLtaoWfhUQk3cPA6k4NfSManeavs7Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@data-slot%2fswitch@0.2.163","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17339},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsdown"},"_npmUser":{"name":"thomkrupa","email":"thom@bejamas.com"},"repository":{"url":"git+https://github.com/bejamas/data-slot.git","type":"git","directory":"packages/switch"},"_npmVersion":"10.8.2","description":"Headless switch component for vanilla JavaScript. Accessible, form-ready, and unstyled.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.1","dependencies":{"@data-slot/core":"0.2.163"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/switch_0.2.163_1774365510429_0.10794060924814164","host":"s3://npm-registry-packages-npm-production"}},"0.2.165":{"name":"@data-slot/switch","version":"0.2.165","keywords":["headless","ui","switch","toggle","form","vanilla","data-slot"],"license":"MIT","_id":"@data-slot/switch@0.2.165","maintainers":[{"name":"thomkrupa","email":"thom@bejamas.com"}],"homepage":"https://github.com/bejamas/data-slot#readme","bugs":{"url":"https://github.com/bejamas/data-slot/issues"},"dist":{"shasum":"6e8ce126f3413d9fb167a943f42807920eeaf392","tarball":"https://registry.npmjs.org/@data-slot/switch/-/switch-0.2.165.tgz","fileCount":6,"integrity":"sha512-FUzLSqiMuXThV34ALHa0bXyNeaQqBFyETKaMgmG+R15TNFM5lVvG2OFjsT0+XeZC35BwZHc0OR0PL4gclFn6ww==","signatures":[{"sig":"MEQCICBQcfzO4Tyxj32FgQ7ebd4fGLn8XZycmzqM9nB37m7/AiAimrmtvBeCwLnKvegPmNsrrMTQB+VGsRvrpD7tl05U0g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@data-slot%2fswitch@0.2.165","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17339},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsdown"},"_npmUser":{"name":"thomkrupa","email":"thom@bejamas.com"},"repository":{"url":"git+https://github.com/bejamas/data-slot.git","type":"git","directory":"packages/switch"},"_npmVersion":"10.8.2","description":"Headless switch component for vanilla JavaScript. Accessible, form-ready, and unstyled.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.1","dependencies":{"@data-slot/core":"0.2.165"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/switch_0.2.165_1774864375706_0.40859148076609486","host":"s3://npm-registry-packages-npm-production"}},"0.2.166":{"name":"@data-slot/switch","version":"0.2.166","keywords":["headless","ui","switch","toggle","form","vanilla","data-slot"],"license":"MIT","_id":"@data-slot/switch@0.2.166","maintainers":[{"name":"thomkrupa","email":"thom@bejamas.com"}],"homepage":"https://github.com/bejamas/data-slot#readme","bugs":{"url":"https://github.com/bejamas/data-slot/issues"},"dist":{"shasum":"69620bb593ed9005840efb0d34140096e234fcc5","tarball":"https://registry.npmjs.org/@data-slot/switch/-/switch-0.2.166.tgz","fileCount":6,"integrity":"sha512-2AipHTGEiCfCOCGjKzlo2jAJ9hEN8+YbI90PrLLG8Q71TB8kNRWSdvE6hJhRzLJI0Ymdi89bVvd/DGEN38JVtA==","signatures":[{"sig":"MEUCIQCEGDHN3obCMSHC84sQt+a0O+qsZDge+dOm2YZqzPH3rAIgD7QQZ90DTH6cWr/PHRghkknUOP5InBnu32R3M2Sozf4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@data-slot%2fswitch@0.2.166","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17339},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsdown"},"_npmUser":{"name":"thomkrupa","email":"thom@bejamas.com"},"repository":{"url":"git+https://github.com/bejamas/data-slot.git","type":"git","directory":"packages/switch"},"_npmVersion":"10.8.2","description":"Headless switch component for vanilla JavaScript. Accessible, form-ready, and unstyled.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","dependencies":{"@data-slot/core":"0.2.166"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/switch_0.2.166_1775138899673_0.8257358270601176","host":"s3://npm-registry-packages-npm-production"}},"0.2.167":{"name":"@data-slot/switch","version":"0.2.167","keywords":["headless","ui","switch","toggle","form","vanilla","data-slot"],"license":"MIT","_id":"@data-slot/switch@0.2.167","maintainers":[{"name":"thomkrupa","email":"thom@bejamas.com"}],"homepage":"https://github.com/bejamas/data-slot#readme","bugs":{"url":"https://github.com/bejamas/data-slot/issues"},"dist":{"shasum":"4d861fc7bcb70a69b781e1f18d0cc23bc2746593","tarball":"https://registry.npmjs.org/@data-slot/switch/-/switch-0.2.167.tgz","fileCount":6,"integrity":"sha512-bHlVyp2+ZTlkDGxe84VXMFHBLAGVSfWNh07gT5KFM+fFp1hHyUN5FATsZxW1JGDJeeXzhmQFS6rhN6GXf5tuLA==","signatures":[{"sig":"MEQCIAenUG7hQ2veFb5iiMCeHoQxX5/04HW5c78PpmQd5FeKAiA7uZbbrdVFmKVfZsJUFVOPY3/mYllkreGiieWmwVwjPA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@data-slot%2fswitch@0.2.167","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17305},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsdown"},"_npmUser":{"name":"thomkrupa","email":"thom@bejamas.com"},"repository":{"url":"git+https://github.com/bejamas/data-slot.git","type":"git","directory":"packages/switch"},"_npmVersion":"10.9.8","description":"Headless switch component for vanilla JavaScript. Accessible, form-ready, and unstyled.","directories":{},"sideEffects":false,"_nodeVersion":"22.23.2","dependencies":{"@data-slot/core":"0.2.167"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/switch_0.2.167_1789390160762_0.9399202919634673","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"_id":"@data-slot/switch@1.0.0","bugs":{"url":"https://github.com/bejamas/data-slot/issues"},"dist":{"shasum":"3e3ffd3392992c48633be45536f5528da663bc77","tarball":"https://registry.npmjs.org/@data-slot/switch/-/switch-1.0.0.tgz","fileCount":6,"integrity":"sha512-BZurc5XLdCxHBtd88X0dyPRlAtxQgD9AVcOk3rxFxQ6gDZrwZNANiHAFtzT3R8vi+led1g9oGQYq1kDs5ts8VA==","signatures":[{"sig":"MEUCIQCRlwRZ/CkSih+HZZ6moMRVpkb3dUuHyJToen20cFAlXwIgPyxAb+sKGfvVW4nLMy5jjmVcP45uhiez/xxUYbfdZ+o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDDbcyew/Ua890l3p8NBkyBApTOdx6/YyCeEzElV1vEIAiEAvnJLh5lJkQeoG32NcPnFg5Z2LLsORB8512neUIPNrls="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@data-slot%2fswitch@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17504},"main":"./dist/index.cjs","name":"@data-slot/switch","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.cjs"}},"license":"MIT","scripts":{"build":"tsdown"},"version":"1.0.0","_npmUser":{"name":"thomkrupa","email":"thom@bejamas.com"},"homepage":"https://github.com/bejamas/data-slot#readme","keywords":["headless","ui","switch","toggle","form","vanilla","data-slot"],"repository":{"url":"git+https://github.com/bejamas/data-slot.git","type":"git","directory":"packages/switch"},"_npmVersion":"10.9.8","description":"Headless switch component for vanilla JavaScript. Accessible, form-ready, and unstyled.","directories":{},"maintainers":[{"name":"thomkrupa","email":"thom@bejamas.com"}],"sideEffects":false,"_nodeVersion":"22.23.2","dependencies":{"@data-slot/core":"1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/switch_1.0.0_1790155771130_0.9323697469483889"}}},"time":{"created":"2026-03-19T07:29:48.184Z","modified":"2026-09-23T09:29:31.750Z","0.2.156":"2026-03-19T07:29:48.390Z","0.2.157":"2026-03-19T09:21:28.442Z","0.2.158":"2026-03-20T05:25:45.505Z","0.2.159":"2026-03-20T08:12:31.170Z","0.2.160":"2026-03-20T12:22:22.483Z","0.2.161":"2026-03-20T16:05:59.529Z","0.2.163":"2026-03-24T15:18:31.041Z","0.2.165":"2026-03-30T09:52:55.843Z","0.2.166":"2026-04-02T14:08:19.875Z","0.2.167":"2026-09-14T12:49:20.886Z","1.0.0":"2026-09-23T09:29:31.241Z"},"bugs":{"url":"https://github.com/bejamas/data-slot/issues"},"license":"MIT","homepage":"https://github.com/bejamas/data-slot#readme","keywords":["headless","ui","switch","toggle","form","vanilla","data-slot"],"repository":{"url":"git+https://github.com/bejamas/data-slot.git","type":"git","directory":"packages/switch"},"description":"Headless switch component for vanilla JavaScript. Accessible, form-ready, and unstyled.","maintainers":[{"name":"thomkrupa","email":"thom@bejamas.com"}],"readme":"# @data-slot/switch\n\nHeadless switch component for vanilla JavaScript. Accessible, form-ready, and unstyled.\n\n## Installation\n\n```bash\nnpm install @data-slot/switch\n```\n\n## Quick Start\n\n```html\n<label>\n  <span data-slot=\"switch\" data-name=\"notifications\">\n    <span data-slot=\"switch-thumb\"></span>\n  </span>\n  Notifications\n</label>\n\n<script type=\"module\">\n  import { create } from \"@data-slot/switch\";\n\n  const controllers = create();\n</script>\n```\n\n## API\n\n### Initialization\n\n#### `create(scope?)`\n\nAuto-discover and bind all switch instances in a scope (defaults to `document`).\n\n```typescript\nimport { create } from \"@data-slot/switch\";\n\nconst controllers = create(); // Returns SwitchController[]\n```\n\n#### `createSwitch(root, options?)`\n\nCreate a controller for a specific element.\n\n```typescript\nimport { createSwitch } from \"@data-slot/switch\";\n\nconst controller = createSwitch(element, {\n  defaultChecked: true,\n  name: \"notifications\",\n  uncheckedValue: \"off\",\n  onCheckedChange: (checked) => console.log(checked),\n});\n```\n\n### Slots\n\n#### Runtime Slots\n\n- `switch` - Root control that toggles the checked state and receives switch semantics, keyboard handling, and form integration.\n- `switch-thumb` - Optional visual thumb inside the root; receives checked and disabled state for styling.\n\n#### Markup\n\n```html\n<span data-slot=\"switch\">\n  <span data-slot=\"switch-thumb\"></span>\n</span>\n```\n\nUse a neutral root element (`span` or `div`) when you want Base UI-style label wrapping and shadcn-like composition. The controller injects a visually hidden checkbox next to the root for form submission, label support, and native validation.\n\n### Data Attributes\n\nJS options take precedence over data attributes on the root element.\n\n| Attribute | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `data-default-checked` | `boolean` | `false` | Initial checked state |\n| `data-disabled` | `boolean` | `false` | Disable user interaction and form submission |\n| `data-read-only` / `data-readOnly` | `boolean` | `false` | Prevent user interaction while keeping the field enabled |\n| `data-required` | `boolean` | `false` | Require a checked value |\n| `data-name` | `string` | - | Form field name |\n| `data-value` | `string` | native checkbox `\"on\"` | Submitted value when checked |\n| `data-unchecked-value` / `data-uncheckedValue` | `string` | - | Submitted value when unchecked |\n\n### Options\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `defaultChecked` | `boolean` | `false` | Initial checked state |\n| `disabled` | `boolean` | `false` | Disable user interaction and form submission |\n| `readOnly` | `boolean` | `false` | Prevent user interaction while keeping the field enabled |\n| `required` | `boolean` | `false` | Require the switch to be checked for native form validation |\n| `name` | `string` | - | Form field name |\n| `value` | `string` | native checkbox `\"on\"` | Submitted value when checked |\n| `uncheckedValue` | `string` | - | Submitted value when unchecked |\n| `onCheckedChange` | `(checked: boolean) => void` | `undefined` | Callback when checked state changes |\n\n### Controller\n\n| Method/Property | Description |\n|-----------------|-------------|\n| `checked` | Current checked state (readonly `boolean`) |\n| `toggle()` | Toggle the checked state |\n| `check()` | Set checked to `true` |\n| `uncheck()` | Set checked to `false` |\n| `setChecked(checked)` | Set the checked state explicitly |\n| `destroy()` | Remove listeners and generated inputs |\n\n### Events\n\n#### Outbound Events\n\n```javascript\nelement.addEventListener(\"switch:change\", (event) => {\n  console.log(event.detail.checked);\n});\n```\n\n#### Inbound Events\n\n```javascript\nelement.dispatchEvent(\n  new CustomEvent(\"switch:set\", { detail: { checked: true } })\n);\n```\n\n### Styling\n\n#### State Attributes\n\nThe root and thumb expose presence attributes:\n\n- `data-checked`\n- `data-unchecked`\n- `data-disabled`\n- `data-readonly`\n- `data-required`\n\nThe root also syncs:\n\n- `role=\"switch\"`\n- `aria-checked=\"true|false\"`\n- `aria-disabled=\"true\"` when disabled\n- `aria-readonly=\"true\"` when read-only\n- `aria-required=\"true\"` when required\n\n#### Tailwind Example\n\n```html\n<label class=\"inline-flex items-center gap-3\">\n  <span\n    data-slot=\"switch\"\n    data-size=\"default\"\n    class=\"data-checked:bg-primary data-unchecked:bg-input\n           focus-visible:border-ring focus-visible:ring-ring/50\n           shrink-0 rounded-full p-px\n           focus-visible:ring-3 peer group/switch relative\n           inline-flex items-center transition-all outline-none\n           h-4.5 w-8\"\n  >\n    <span\n      data-slot=\"switch-thumb\"\n      class=\"bg-background rounded-full size-4\n             data-checked:translate-x-3.5\n             data-unchecked:translate-x-0\n             pointer-events-none block transition-transform\"\n    ></span>\n  </span>\n  Notifications\n</label>\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}