{"_id":"@astrouxds/rux-switch","_rev":"19-a1f098265a40e64cdeb0f309c9ef2aa6","name":"@astrouxds/rux-switch","dist-tags":{"latest":"5.3.0"},"versions":{"5.0.1":{"name":"@astrouxds/rux-switch","version":"5.0.1","author":{"name":"Rocket Communications","email":"uxsupport@rocketcom.com"},"license":"SEE LICENSE IN LICENSE.md","_id":"@astrouxds/rux-switch@5.0.1","maintainers":[{"name":"rocketmark","email":"mark.cianfrani@rocketcom.com"},{"name":"joel_perez","email":"joel.perez@rocketcom.com"},{"name":"dmcalester","email":"duncan@rocketcom.com"},{"name":"cskerbo","email":"chris.kerbo@rocketcom.com"}],"homepage":"https://www.astrouxds.com","bugs":{"url":"https://github.com/RocketCommunicationsInc/astro-components/issues","email":"uxsupport@rocketcom.com"},"dist":{"shasum":"e708e0a8b91a0b4fba29fe32d24f72849e4c4375","tarball":"https://registry.npmjs.org/@astrouxds/rux-switch/-/rux-switch-5.0.1.tgz","fileCount":4,"integrity":"sha512-sDQDk+a3ylkqMtMG37KVO3o2fbfWnAnYGicZvq6R064YffUJsaXu1dYw7v9oLHu+a/Kk/xb5I0fqfucZZ55//A==","signatures":[{"sig":"MEUCIQCd5XOA5UZ2aBg2iwNhfpOaB/Fq0SPRQtemM3PMbBAKkwIgXxLsRn3mUcqQkNm2x/Ni5CwpAA8UjiqXSsLOht3lI4M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12433,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2en1CRA9TVsSAnZWagAA4gwP/A/Vu7KxEWe2QH4uWWaw\nAFDSPbi8/Ow/MtOstwlk3W2WlVEsxvOSfy54rRpGHaBhKlXA+TYTH4dlnCnP\nuZXc8Hg5Y7GdodoPxGG91aFtieSkCdKxom85J0sqj2ppMYU8wCai8udibuYc\n9SSm1jHeFBL0Ok8gQWnhwK3e8zjR2cQsh26UnA8eWI2sKO09VD6BQGrPBfr4\nvsD2IUD/WWj2KFHQ09ld5cG67g3T863q3/pVCDdKqOdtccqmeFmhMZ60iN4e\nTeMdGXAQX6dWXSo+qyRdaWFQPqH9PRl20derUQmC38XyB/Gm/3eUIYJs4EOV\nhdJwqpXgPOOlE5nOdl6wnmQVnkAmGAtsJfHpFKuAdhK1bTi0H47Oh2zIfFBR\nIoWVcDDjAEk1MlQhZLz139AR+ALzKBQ9jsTSROz+CxIofQh162h3dUzjCYgs\nF3yQ2EjqNWIYaU6wgkq9JHIn66DiKNkwF6a5m75oAlIPKtbB8XKhHwSVAJaF\nikeKMhOJfzoigd8vf4umff3L5Edcx/JKdcJWhFI31/09N9sYs0Q5cwklhb8S\nEUU+NYE2wl5EI7VXZGb0+8qjKXh4t7IaczJmGXdhv44yflBsRCp2jQDVzoz+\nrMGjlSOPSPtCn1RjGKDgVL1ruBGNba4ClTmuICsC6JTZJD4SEWFuUu66QSB+\nRCbC\r\n=3rDn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"rux-switch.js","module":"rux-switch.js","gitHead":"1baa15908593f0e6452e8283be1e279a05862079","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"dmcalester","email":"duncan@rocketcom.com"},"deprecated":"This package has been deprecated. Please use https://www.npmjs.com/package/@astrouxds/astro-web-components instead.","repository":{"url":"https://github.com/RocketCommunicationsInc/astro-components/src/master","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Astro Web Component for toggles","directories":{},"_nodeVersion":"14.16.1","dependencies":{"lit-element":"^2.1.0","@webcomponents/webcomponentsjs":"^2.2.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/rux-switch_5.0.1_1624893940861_0.20780544208326068","host":"s3://npm-registry-packages"}},"5.3.0":{"name":"@astrouxds/rux-switch","version":"5.3.0","author":{"name":"Rocket Communications","email":"uxsupport@rocketcom.com"},"license":"SEE LICENSE IN LICENSE.md","_id":"@astrouxds/rux-switch@5.3.0","maintainers":[{"name":"jacob-rocket","email":"jacob.norton@rocketcom.com"},{"name":"dmcalester","email":"duncan@rocketcom.com"},{"name":"joel_perez","email":"joel.perez@rocketcom.com"},{"name":"rocketmark","email":"mark.cianfrani@rocketcom.com"},{"name":"sasha-rocket","email":"aleksandr.antonov@rocketcom.com"}],"homepage":"https://www.astrouxds.com","bugs":{"url":"https://github.com/RocketCommunicationsInc/astro-components/issues","email":"uxsupport@rocketcom.com"},"dist":{"shasum":"f64a1ffaabc5a425ea5973cae252e9817b7d84b3","tarball":"https://registry.npmjs.org/@astrouxds/rux-switch/-/rux-switch-5.3.0.tgz","fileCount":3,"integrity":"sha512-W+LyppEkoyKnCCzdKDY9Ys9EqkBnICxBoxGf3/hssZZMa55W5rtgbWcbzpywN7GZzy8cR0B7bU4egrUehM//JA==","signatures":[{"sig":"MEYCIQDhS4aB4kIkOdgxl/7fwxACghcYrCzBBqMK4YuhFta1zAIhANX+Qb3awjmHK9OiG+EHDSUeML74KbdpuoSrGaMzfS4l","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11878,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzGUYCRA9TVsSAnZWagAAac8P/jzmiVI7Pc30ekq3Rut6\nfeM2sJH8XRZ7fnS8ABlr+BcuLnNzVLxT7TShfwXzkgTjukix+nZa536Ty4X7\nrnKMGgUooMxCEoq5JOq5yAzUp0TUaixC5fI3qN3ac6qQRWETedUjdk717lYh\nSJmIucW4E1EMb016Czy//N1GoWdsqbIbQE5Cbe602gloXRPmqXeS9HdQnULV\nPVDDwCFvQGOQwfurvUfWC20wyc2LtpRcCc8VKCEbI1hwUXJpwb36FqUWz7i2\nTpiq58nvutDE7CW2U15cg2mremMFZ9tTSwmjZf4xwEdcBrPxciZepmo7kdF0\nJldbVbZEb4egYeVwrWe9ScUV1O9WQyxCWH4/43oniJ9kfcL+hTyfM5/qfS9U\nSm+nv1HcpZUazrL8uvtcvXQd7abbWJUVxfhPVexEqhVPS69GYcWhY8Mm2+7d\nctthdprdtbd6JF+uTsgnbOypdb+qThRnl0eYIBOnfJ7wx42JIpHewN6IlMZU\nzoRo8Ia9rltNIYO3bPrdhrx3lNLQ8C/2ROv24RVTsle6D/SkDME8Sauta8nC\nYQCtnZ9+440qcgwR0ZjdkqUcXeLs2fXJLACwZi/TE5oizJOPuKM+EaD7ild0\nJzDeYSVVy+55JgldazRwRqSs7IsTGUU8jb3YmVBmkvp61bzINyBQ1FVZqLCE\nMUck\r\n=TfVc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"rux-switch.js","module":"rux-switch.js","gitHead":"4bba0d8002ae689eae718e188328d4e564aa94b0","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"dmcalester","email":"duncan@rocketcom.com"},"deprecated":"This package has been deprecated. Please use https://www.npmjs.com/package/@astrouxds/astro-web-components instead.","repository":{"url":"https://github.com/RocketCommunicationsInc/astro-components/src/master","type":"git"},"_npmVersion":"6.14.12","description":"Astro Web Component for toggles","directories":{},"_nodeVersion":"14.16.1","dependencies":{"lit-element":"^2.1.0","@webcomponents/webcomponentsjs":"^2.2.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/rux-switch_5.3.0_1634850648072_0.7068127510319666","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-06-28T15:25:40.550Z","modified":"2026-06-23T21:42:13.570Z","5.0.1":"2021-06-28T15:25:41.015Z","5.3.0":"2021-10-21T21:10:48.273Z"},"bugs":{"url":"https://github.com/RocketCommunicationsInc/astro-components/issues","email":"uxsupport@rocketcom.com"},"author":{"name":"Rocket Communications","email":"uxsupport@rocketcom.com"},"license":"SEE LICENSE IN LICENSE.md","homepage":"https://www.astrouxds.com","repository":{"url":"https://github.com/RocketCommunicationsInc/astro-components/src/master","type":"git"},"description":"Astro Web Component for toggles","maintainers":[{"email":"chrisk@rocketcom.com","name":"ck_rocket"},{"email":"micah.jones@rocketcom.com","name":"rocket_micah"},{"email":"jacob.norton@rocketcom.com","name":"jacob-rocket"},{"email":"frances.morrison@rocketcom.com","name":"rocket_frances"}],"readme":"# Switch\n\nA Switch toggles between two mutually exclusive states such as \"On\" or \"Off.\" Unlike a checkbox, a switch initiates an action with immediate effect without requiring a \"Save\" or \"Submit\" action.\n\n## Guidelines\n\n-   [Astro UXDS: Switch](http://www.astrouxds.com/ui-components/switch)\n\n## Web Components Usage\n\n### 1. Installation\n\n#### ** Install the Astro UXDS Switch package via Command Line** (Preferred Method)\n\n```sh\nnpm i --save @astrouxds/rux-switch\n```\n\nYou may use Yarn, NPM, or your Node package manager of choice. The `--save` flag adds this component as a dependency in your `package.json` file.\n\n#### **Alternatively**, download the [Astro UXDS Component Library](https://bitbucket.org/rocketcom/astro-components/src/master/) source to your project.\n\nVia CLI:\n\n```sh\ngit clone https://bitbucket.org/rocketcom/astro-components.git\n```\n\nOr, [download the Astro UXDS Components as a .zip](https://bitbucket.org/rocketcom/astro-components/get/master.zip)\n\n### 2. Import the Astro Switch Web Component\n\nThis example assumes you're using the NPM package in `node_modules`. Otherwise, import the component using the path to the Astro Components directory in your project.\n\n```javascript\nimport { RuxSwitch } from '@astro-components/rux-switch/rux-switch.js'\n```\n\n### 3. Render the Astro Switch Web Component\n\nPass properties as attributes of the Astro Switch custom element:\n\n```xml\n<rux-switch disabled=\"false\" checked=\"false\"></rux-switch>\n```\n\n### Properties\n\n| Property   | Type    | Default | Required | Description                                                                                                                                                                                 |\n| ---------- | ------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `disabled` | Boolean | `false` | No       | Disables the button via HTML `disabled` attribute. Button takes on a distinct visual state. Cursor uses the `not-allowed` system replacement and all keyboard and mouse events are ignored. |\n| `checked`  | Boolean | `false` | No       | Checks the button via HTML `checked` attribute. Button takes on a distinct \"enabled\" or \"selected\" visual state.                                                                            |\n\n---\n\n## Basic HTML Usage\n\n### 1. Include the Astro UXDS CSS file\n\nLatest release is available in [Astro UXDS Styles repo](https://bitbucket.org/rocketcom/astro-styles/src/master/).\n\n```xml\n<link rel=\"stylesheet\" href=\"/your-project/path/astro.css\" />\n```\n\n### 2. Markup the component using HTML and the Astro CSS classes\n\nAstro CSS classes follow the [BEM-style](http://getbem.com/introduction/) naming convention.\n\nConfigure the component using native HTML attributes.\n\n```xml\n <div class=\"rux-switch\">\n    <input class=\"rux-switch__input\" disabled id=\"switch1\" type=\"checkbox\">\n    <label class=\"rux-switch__button\" for=\"switch1\"></label>\n</div>\n```\n\n### Attributes\n\n| Attribute  | Type    | Default | Required | Description                                                                                                                                                                                 |\n| ---------- | ------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `disabled` | Boolean | `false` | No       | Disables the button via HTML `disabled` attribute. Button takes on a distinct visual state. Cursor uses the `not-allowed` system replacement and all keyboard and mouse events are ignored. |\n| `checked`  | Boolean | `false` | No       | Checks the button via HTML `checked` attribute. Button takes on a distinct \"enabled\" or \"selected\" visual state.                                                                            |\n\nFor more information about AstroUXDS usage outside of a Web Component environment, please see [Astro UXDS Stylesheets](https://bitbucket.org/rocketcom/astro-styles)\n\n## Revision History\n\n##### **4.1**\n\n-   Replaced [Polymer 3](https://www.polymer-project.org) implementation with [LitElement](https://lit-element.polymer-project.org/) for improved speed and interoperability with JS Frameworks as well as simpler template declaration now available in vanilla JavaScript.\n\n##### **3.0**\n\n-   Breaking change to markup of switch button\n\n##### **2.1**\n\n-   Moved Pushbuttons to its own style sheet\n\n##### **1.4**\n\n-   Added `rux_` prefixes and BEM-compatible classes to all `satcom_`-prefixed elements. NOTE: `satcom_` will be removed in a future version\n-   Removed prefixed linear gradients\n-   Removed prefixed transition\n-   Fixed added colon to checked pseudo class (e.g., checked became :checked)\n-   Alignment issue fixed on switch button label\n-   Updated to WCAG colors\n-   Updated transition speed\n","readmeFilename":"README.md"}