{"_id":"@ah3nry/theme-switch","_rev":"2-883268fb65f8cbed5994130fb1fb1c73","name":"@ah3nry/theme-switch","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@ah3nry/theme-switch","description":"Webcomponent theme-switch following open-wc recommendations","license":"MIT","author":{"name":"ah3nry"},"version":"1.0.0","type":"module","main":"index.js","module":"index.js","exports":{".":"./index.js","./theme-switch.js":"./theme-switch.js"},"scripts":{"analyze":"cem analyze --litelement","start":"web-dev-server","lint":"eslint --ext .js,.html . --ignore-path .gitignore && prettier \"**/*.js\" --check --ignore-path .gitignore","format":"eslint --ext .js,.html . --fix --ignore-path .gitignore && prettier \"**/*.js\" --write --ignore-path .gitignore","test":"web-test-runner --coverage","test:watch":"web-test-runner --watch"},"dependencies":{"lit":"^2.0.2"},"devDependencies":{"@babel/core":"^7.23.2","@babel/eslint-parser":"^7.22.15","@custom-elements-manifest/analyzer":"^0.4.17","@open-wc/eslint-config":"^12.0.1","@open-wc/testing":"^3.1.6","@web/dev-server":"^0.1.34","@web/test-runner":"^0.14.0","eslint":"^8.52.0","eslint-config-prettier":"^9.0.0","husky":"^4.3.8","lint-staged":"^10.5.4","postcss-lit":"^1.1.0","prettier":"^3.0.3"},"customElements":"custom-elements.json","eslintConfig":{"extends":["@open-wc","prettier"]},"prettier":{"singleQuote":true,"arrowParens":"avoid"},"husky":{"hooks":{"pre-commit":"lint-staged","pre-push":"yarn test"}},"lint-staged":{"*.js":["eslint --fix","prettier --write"]},"gitHead":"5ce84b956d09c466ee5d194b8647c26a0e5086af","_id":"@ah3nry/theme-switch@1.0.0","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-S8K5B6wgAsQRvqrjumdIzZJnbvsXE/r4gNIJuX5XcDZFqUpyvnFHq+FvaWUETx+v87loYOMqaLaxLkeVEGwKvw==","shasum":"5e0c296ab420849ee9ef15d8084c88be9e8823e5","tarball":"https://registry.npmjs.org/@ah3nry/theme-switch/-/theme-switch-1.0.0.tgz","fileCount":11,"unpackedSize":16521,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDd8Ti57uxkYIpWpXxwr0BzJ4maXDnAv83xDV5Vz4MpuAIgX7s2CCzdNKKF2o+M0vz0svPWT73S13AurClO/Pli+yc="}]},"_npmUser":{"name":"ah3nry","email":"and.henry@gmail.com"},"directories":{},"maintainers":[{"name":"ah3nry","email":"and.henry@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/theme-switch_1.0.0_1698397993659_0.7459087043089105"},"_hasShrinkwrap":false},"1.0.1":{"name":"@ah3nry/theme-switch","description":"Webcomponent theme-switch following open-wc recommendations","license":"MIT","author":{"name":"ah3nry"},"version":"1.0.1","type":"module","main":"index.js","module":"index.js","exports":{".":"./index.js","./theme-switch.js":"./theme-switch.js"},"scripts":{"analyze":"cem analyze --litelement","start":"web-dev-server","lint":"eslint --ext .js,.html . --ignore-path .gitignore && prettier \"**/*.js\" --check --ignore-path .gitignore","format":"eslint --ext .js,.html . --fix --ignore-path .gitignore && prettier \"**/*.js\" --write --ignore-path .gitignore","test":"web-test-runner --coverage","test:watch":"web-test-runner --watch"},"dependencies":{"lit":"^2.0.2"},"devDependencies":{"@babel/core":"^7.23.2","@babel/eslint-parser":"^7.22.15","@custom-elements-manifest/analyzer":"^0.4.17","@open-wc/eslint-config":"^12.0.1","@open-wc/testing":"^3.1.6","@web/dev-server":"^0.1.34","@web/test-runner":"^0.14.0","eslint":"^8.52.0","eslint-config-prettier":"^9.0.0","husky":"^4.3.8","lint-staged":"^10.5.4","postcss-lit":"^1.1.0","prettier":"^3.0.3"},"customElements":"custom-elements.json","eslintConfig":{"extends":["@open-wc","prettier"]},"prettier":{"singleQuote":true,"arrowParens":"avoid"},"husky":{"hooks":{"pre-commit":"lint-staged","pre-push":"yarn test"}},"lint-staged":{"*.js":["eslint --fix","prettier --write"]},"homepage":"https://github.com/ah3nry/theme-switch","keywords":["webcomponents","lit-element","theme-switch"],"gitHead":"c76cd580fdf8127c9b48a8d97722130ff1f7094f","_id":"@ah3nry/theme-switch@1.0.1","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-Ge3GkGASwuEODBIz4kus++7qDG/ECh2WnmwGqQqvmueSzloJljeFNc6lmxP9WX51DEenh1ceg0r7H9Mve2ZWvQ==","shasum":"4b46e4ccdc1beae58d11243e01adb736b4ccb6d8","tarball":"https://registry.npmjs.org/@ah3nry/theme-switch/-/theme-switch-1.0.1.tgz","fileCount":11,"unpackedSize":16641,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICyhMCDjdw6xplLehbCwJF9r14JGO+cA0g535P7HjXu/AiBKzs5IAlS3CTSGH+zSPtFdr6hjQ9IG7UF1mes8MRYo/Q=="}]},"_npmUser":{"name":"ah3nry","email":"and.henry@gmail.com"},"directories":{},"maintainers":[{"name":"ah3nry","email":"and.henry@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/theme-switch_1.0.1_1698399303977_0.6664833502943146"},"_hasShrinkwrap":false},"1.1.0":{"name":"@ah3nry/theme-switch","description":"Webcomponent theme-switch following open-wc recommendations","license":"MIT","author":{"name":"ah3nry"},"version":"1.1.0","type":"module","main":"index.js","module":"index.js","exports":{".":"./index.js","./theme-switch.js":"./theme-switch.js"},"scripts":{"analyze":"cem analyze --litelement","start":"web-dev-server","lint":"eslint --ext .js,.html . --ignore-path .gitignore && prettier \"**/*.js\" --check --ignore-path .gitignore","format":"eslint --ext .js,.html . --fix --ignore-path .gitignore && prettier \"**/*.js\" --write --ignore-path .gitignore","test":"web-test-runner --coverage","test:watch":"web-test-runner --watch"},"dependencies":{"lit":"^2.0.2"},"devDependencies":{"@babel/core":"^7.23.2","@babel/eslint-parser":"^7.22.15","@custom-elements-manifest/analyzer":"^0.4.17","@open-wc/eslint-config":"^12.0.1","@open-wc/testing":"^3.1.6","@web/dev-server":"^0.1.34","@web/test-runner":"^0.14.0","eslint":"^8.52.0","eslint-config-prettier":"^9.0.0","husky":"^4.3.8","lint-staged":"^10.5.4","postcss-lit":"^1.1.0","prettier":"^3.0.3"},"customElements":"custom-elements.json","eslintConfig":{"extends":["@open-wc","prettier"]},"prettier":{"singleQuote":true,"arrowParens":"avoid"},"husky":{"hooks":{"pre-commit":"lint-staged","pre-push":"yarn test"}},"lint-staged":{"*.js":["eslint --fix","prettier --write"]},"homepage":"https://github.com/ah3nry/theme-switch","keywords":["webcomponents","lit-element","theme-switch"],"volta":{"node":"18.18.2","yarn":"3.6.4"},"_id":"@ah3nry/theme-switch@1.1.0","gitHead":"ed79083e5230c6efd02c741d3ea53f6d3c3feafa","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-++EvYVZPbANy+1mjQajWhYgaB4vyxyxxwPA4f3L6wxSkIYGumuX0RJ+WqOe4cHym4AQZoNncJLlKDnjiD5DqkQ==","shasum":"4f1ee65003d08545bd860903254872500fcdbed0","tarball":"https://registry.npmjs.org/@ah3nry/theme-switch/-/theme-switch-1.1.0.tgz","fileCount":12,"unpackedSize":16683,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH9ZCa6NkWURVyqnc513JUKRTNBJ8BTkG/MuBJhDZpcnAiEAoOUANgmLLgW9jA1mmOErRMbD1WACl1JSksKJinqYi7o="}]},"_npmUser":{"name":"ah3nry","email":"and.henry@gmail.com"},"directories":{},"maintainers":[{"name":"ah3nry","email":"and.henry@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/theme-switch_1.1.0_1700497151911_0.8660905713376654"},"_hasShrinkwrap":false}},"time":{"created":"2023-10-27T09:13:13.552Z","1.0.0":"2023-10-27T09:13:13.957Z","modified":"2023-11-20T16:19:12.259Z","1.0.1":"2023-10-27T09:35:04.173Z","1.1.0":"2023-11-20T16:19:12.080Z"},"maintainers":[{"name":"ah3nry","email":"and.henry@gmail.com"}],"description":"Webcomponent theme-switch following open-wc recommendations","author":{"name":"ah3nry"},"license":"MIT","readme":"# \\<theme-switch>\n\nA webcomponent to toggle between light & dark modes.\nThe switch supports users system preferences but also\ngives them the ability to override the system preference.\n\nRun the local demo to see it in action.\n\n```bash\nnpm start\n```\n\nThis runs a local development server that serves the basic demo located in `demo/index.html`\n\n## Features\nThe switch sets the `data-theme` attribute on the `html` element to `light` or `dark` depending on the mode.\nLight and dark stlyes can be conditionally applied to elements based on the `data-theme` attribute.\n\n## Styling example\nIn your project you could have styles that look something\nlike this:\n\n```css\nhtml {\n  --background-color: var(--background-color-light);\n  --text-color: var(--text-color-light);\n\n  &[data-theme=\"dark\"] {\n    --background-color: var(--background-color-dark);\n    --text-color: var(--text-color-dark);\n  }\n}\n```\n\n\nThis webcomponent follows the [open-wc](https://github.com/open-wc/open-wc) recommendation.\n\n## Installation\n\n```bash\nnpm i theme-switch\nOr\nyarn add theme-switch\n```\n\n## Usage\n\n```html\n<script type=\"module\">\n  import 'theme-switch/theme-switch.js';\n</script>\n\n<theme-switch \n  style=\"\n    --size: 2rem;\n    --icon-fill-dark: #801515;\n    --icon-fill-dark-hover: #AA3939;\n    --icon-fill-light: #D46A6A;\n    --icon-fill-light-hover: #FFAAAA;\n    \"\n/>\n            \n```\n\n## Linting and formatting\n\nTo scan the project for linting and formatting errors, run\n\n```bash\nnpm run lint\n```\n\nTo automatically fix linting and formatting errors, run\n\n```bash\nnpm run format\n```\n\n## Testing with Web Test Runner\n\nTo execute a single test run:\n\n```bash\nnpm run test\n```\n\nTo run the tests in interactive watch mode run:\n\n```bash\nnpm run test:watch\n```\n\n\n## Tooling configs\n\nFor most of the tools, the configuration is in the `package.json` to minimize the amount of files in your project.\n\nIf you customize the configuration a lot, you can consider moving them to individual files.\n\n\n","readmeFilename":"README.md","homepage":"https://github.com/ah3nry/theme-switch","keywords":["webcomponents","lit-element","theme-switch"]}