{"_id":"@dz8540/custom-radio","_rev":"1-690c8442d78a8eb7b1e6567e974cce2b","name":"@dz8540/custom-radio","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@dz8540/custom-radio","version":"1.0.0","description":"DZ's custom radio component library.","main":"/Dist/JS/CustomRadio.min.js","types":"customRadio.d.ts","devDependencies":{"sass":"^1.44.0","typescript":"^4.5.2"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/DZ8540/Custom-radio.git"},"author":{"name":"DZ"},"license":"MIT","bugs":{"url":"https://github.com/DZ8540/Custom-radio/issues"},"homepage":"https://github.com/DZ8540/Custom-radio#readme","gitHead":"0c6d35564d5692752107c4e192abcafc4b8efcbb","_id":"@dz8540/custom-radio@1.0.0","_nodeVersion":"16.13.0","_npmVersion":"8.2.0","dist":{"integrity":"sha512-7kyjguV5SFn6QuiNJlOhSTWkqi6xmejYsxg4irE9z9d48EcvbKa9yh7eAz+AVy4hx5b5hCOK0gPjJxH/8sGdfg==","shasum":"2761ae1d95617d078b490356c3069274c0c099ed","tarball":"https://registry.npmjs.org/@dz8540/custom-radio/-/custom-radio-1.0.0.tgz","fileCount":76,"unpackedSize":798013,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhvL8hCRA9TVsSAnZWagAAEkMP/AvbLa7+o9wKS5uDqsvn\nb4Nq3y66OC0C7XfOHXOICa2ay3agOECLIU1NRYPiFE8fs28lo+E2P8ai3kQh\nE+R7sAZTq1JczSZ3YLXGlgPzapCy/TQdvz9XGZov6feWfnnB1OxQ+yWr935K\naCtHLXOJSGIlKiMQpVdzsCdpSJu0oLNayIF4d8kp9JidZShA0eL/ed2a6/RU\nqStM6I7x7YoLeSOA6avbOXzGZ47CTKp6AVIbYIJ/C8EmATtVgG6OVq4lCVvb\ntC+qsUJOWWGs7yF4P4okyDRyQFf+kz5cZcXJdibQu90TPgb5hPhZW23N+lyv\nwu6AY9lXrP+pBJZO7pQDmTJvFYygp+yLfQzaryF8flXMlol/k3qgD0UMhHM4\neLFKDbWWrcxR02nyW/TMkBPHJz9vGqCKgPFZ8jjiIABOqvZ3n0J9ghdCZjbV\nfFUZzayBmhTGLFhptPFNGE3cLcMECpR908h2KBzLEg45mXdXXeHPuCPgidq+\nJJnMV8beiCrPhzwqNwzh1mKv7qZL3Y2frcsh8OB6TDm9m8VxacWaNmnT/6+9\nwvhsanN3O3CERVmIIwpCgOZdott3UNpUHw0MZZDgc0YrL/5BQicNVm4aHl9e\n6GhUr/3RPo2C/7N0m1ry69KZnJUJQYNsWiir1EobMEwjSfk0gd70Q4iamz6L\nZK2x\r\n=+en4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA/dTEYlQQdzuizDclV/h6M0CtoIXRPq6RkR479EEMd0AiEA1MhDJAFPUoYNA6myVKhcl8mzhZHwM6vpJkHA+44Xjkg="}]},"_npmUser":{"name":"dz8540","email":"d.z.2021@inbox.ru"},"directories":{},"maintainers":[{"name":"dz8540","email":"d.z.2021@inbox.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/custom-radio_1.0.0_1639759649781_0.6509042026022567"},"_hasShrinkwrap":false}},"time":{"created":"2021-12-17T16:47:29.714Z","1.0.0":"2021-12-17T16:47:29.950Z","modified":"2022-04-05T06:19:27.324Z"},"maintainers":[{"name":"dz8540","email":"d.z.2021@inbox.ru"}],"description":"DZ's custom radio component library.","homepage":"https://github.com/DZ8540/Custom-radio#readme","repository":{"type":"git","url":"git+https://github.com/DZ8540/Custom-radio.git"},"author":{"name":"DZ"},"bugs":{"url":"https://github.com/DZ8540/Custom-radio/issues"},"license":"MIT","readme":"# DZ Custom-radio\r\n\r\nTo use it, you just need to find all the elements you need, and then pass it to the class.\r\n\r\n## Installation\r\n1. Via npm\r\n```cmd\r\nnpm i @dz8540/custom-radio\r\n```\r\n2. Manually - all you need is in the \"Dist\" folder.\r\n```html\r\n<link href=\"/Your-path/customRadio.min.css\" rel=\"stylesheet\">\r\n<script src=\"/Your-path/CustomRadio.min.js\"></script>\r\n```\r\n\r\n## Example\r\n\r\n### HTML\r\n```html\r\n<label class=\"Radio\" data-name=\"First Radio\">\r\n  <input type=\"radio\" class=\"Radio__input\" name=\"radio\" data-id=\"dz-input\" />\r\n\r\n  <div class=\"Radio__radio\">\r\n    <div class=\"Radio__fill\" data-id=\"dz-radioInput\"></div>\r\n  </div>\r\n\r\n  <span class=\"Radio__text\">Radio button</span>\r\n</label>\r\n```\r\n\r\n### JS\r\n```js\r\nlet elements = document.querySelectorAll(elements);\r\nnew Radio(elements);\r\n```\r\n\r\n## Instruction:\r\n1. Text value print in last span in the component.\r\n2. No id attribute required for input.\r\n3. Input maintains checked attribute.\r\n4. Input maintains disabled attribute.\r\n5. Component maintains data-name attribute, for you can set component name.\r\n6. Attention!!! Radio buttons must have the same value in the name attribute in the input tag.\r\n7. Attention!!! Parent for input element must be an element with class \"Radio\".\r\n8. Component maintains event subscribes with instance's 'on' method.\r\n\r\n## Methods\r\n* action - Set checked or disabled action for parent's input element.\r\n  ```js\r\n  new Radio(elmnts).action(elmnts, 'checked');\r\n  ```\r\n* on - event subscribe for input element into component.\r\n  ```js\r\n  new Radio(elmnts).on(elmnts, eventName, your callBack);\r\n  ```\r\n\r\n## End\r\nThat's all! Enjoy this ( ͡°( ͡° ͜ʖ( ͡° ͜ʖ ͡°)ʖ ͡°) ͡°)\r\n","readmeFilename":"README.md"}