{"_id":"@annoyingmouse/wc-month-year-date","_rev":"5-729fc62a138b2a75ff68c6a62f5ebf12","name":"@annoyingmouse/wc-month-year-date","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.1":{"name":"@annoyingmouse/wc-month-year-date","version":"1.0.1","keywords":["web-component","custom-element","date","month","year","form-associated","accessibility","a11y"],"author":{"name":"Dominic Myers"},"license":"MIT","_id":"@annoyingmouse/wc-month-year-date@1.0.1","maintainers":[{"name":"annoyingmouse","email":"annoyingmouse@gmail.com"}],"homepage":"https://github.com/annoyingmouse/wc-month-year-date#readme","bugs":{"url":"https://github.com/annoyingmouse/wc-month-year-date/issues"},"dist":{"shasum":"2e9ad7aac31076948027e01cdd14fb58ad7a2f26","tarball":"https://registry.npmjs.org/@annoyingmouse/wc-month-year-date/-/wc-month-year-date-1.0.1.tgz","fileCount":6,"integrity":"sha512-TE9lbi94CB4/SZ9fARboxsVfH0ErAsIT+pjNyw96rgJPrtlVfGP8gW4lKNQcUH6t3rT+DvFNInJzGY3UoVyiDg==","signatures":[{"sig":"MEUCIDQ4dufcoqS6qbtm0Q6EN1DQXK4su5wo0MlvtfZW6ERFAiEAqGxW+17gWXvwpglMpH1+barNDGK/V1Dc/su+4YdDUKQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16075},"main":"wc-month-year-date.js","type":"module","gitHead":"d63168c217924eef062fd1e07c6d347fe0e244a4","scripts":{"lint":"biome lint .","test":"web-test-runner","build":"rollup -c","format":"biome format --write .","release":"npm run build && node scripts/sync-version.cjs && git add -A && git commit -m \"chore: release artifacts\" && git push && git push --tags && npm publish --access public","test:dist":"web-test-runner --config web-test-runner.dist.config.mjs","release:major":"npm version major && npm run release","release:minor":"npm version minor && npm run release","release:patch":"npm version patch && npm run release"},"_npmUser":{"name":"annoyingmouse","email":"annoyingmouse@gmail.com"},"prettier":{"semi":false,"singleQuote":true},"repository":{"url":"git+https://github.com/annoyingmouse/wc-month-year-date.git","type":"git"},"_npmVersion":"11.6.2","description":"A form-associated web component for selecting a month and year.","directories":{},"_nodeVersion":"22.12.0","_hasShrinkwrap":false,"devDependencies":{"rollup":"^4.0.0","@biomejs/biome":"^2.4.9","@open-wc/testing":"^3.2.0","@web/test-runner":"^0.18.0","@rollup/plugin-terser":"^1.0.0","@web/test-runner-playwright":"^0.11.0"},"_npmOperationalInternal":{"tmp":"tmp/wc-month-year-date_1.0.1_1778085747146_0.5409578671044724","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@annoyingmouse/wc-month-year-date","version":"1.0.2","keywords":["web-component","custom-element","date","month","year","form-associated","accessibility","a11y"],"author":{"name":"Dominic Myers"},"license":"MIT","_id":"@annoyingmouse/wc-month-year-date@1.0.2","maintainers":[{"name":"annoyingmouse","email":"annoyingmouse@gmail.com"}],"homepage":"https://github.com/annoyingmouse/wc-month-year-date#readme","bugs":{"url":"https://github.com/annoyingmouse/wc-month-year-date/issues"},"np":{"cleanup":false},"dist":{"shasum":"f545b6f11a111883811a08f7f72e6aca8cf2c4e5","tarball":"https://registry.npmjs.org/@annoyingmouse/wc-month-year-date/-/wc-month-year-date-1.0.2.tgz","fileCount":6,"integrity":"sha512-6cMsPmc0Bmm0clzbUrNll+tt7aMV3TJf79pJhsDHGY0VLJg/t6kMo/T+RcakCsIrF88kkd69qRGnokS9bIQ05g==","signatures":[{"sig":"MEQCIHa2+ph5eakmAYwsZrN/MblroD/Kndlq2aB/3fT1sgB9AiATEMZ/x9+97ZUI+0Xl3HNSq+uCCCntY0XP+aSMCyDuoQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31895},"main":"wc-month-year-date.js","type":"module","gitHead":"7a2da82f0dd39ffb991fdb5570722d4f71cd5446","scripts":{"lint":"biome lint .","test":"web-test-runner","build":"rollup -c","format":"biome format --write .","release":"npm run build && node scripts/sync-version.cjs && git add -A && git commit -m \"chore: release artifacts\" && git push && git push --tags && npm publish --access public","test:dist":"web-test-runner --config web-test-runner.dist.config.mjs","release:major":"npm version major && npm run release","release:minor":"npm version minor && npm run release","release:patch":"npm version patch && npm run release"},"_npmUser":{"name":"annoyingmouse","email":"annoyingmouse@gmail.com"},"prettier":{"semi":false,"singleQuote":true},"repository":{"url":"git+https://github.com/annoyingmouse/wc-month-year-date.git","type":"git"},"_npmVersion":"11.6.2","description":"A form-associated web component for selecting a month and year.","directories":{},"_nodeVersion":"22.12.0","_hasShrinkwrap":false,"devDependencies":{"rollup":"^4.0.0","@biomejs/biome":"^2.4.9","@open-wc/testing":"^3.2.0","@web/test-runner":"^0.18.0","@rollup/plugin-terser":"^1.0.0","@web/test-runner-playwright":"^0.11.0"},"_npmOperationalInternal":{"tmp":"tmp/wc-month-year-date_1.0.2_1778123947659_0.8288255720470903","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@annoyingmouse/wc-month-year-date","version":"1.0.3","keywords":["web-component","custom-element","date","month","year","form-associated","accessibility","a11y"],"author":{"name":"Dominic Myers"},"license":"MIT","_id":"@annoyingmouse/wc-month-year-date@1.0.3","maintainers":[{"name":"annoyingmouse","email":"annoyingmouse@gmail.com"}],"homepage":"https://github.com/annoyingmouse/wc-month-year-date#readme","bugs":{"url":"https://github.com/annoyingmouse/wc-month-year-date/issues"},"np":{"cleanup":false},"dist":{"shasum":"addbf006dcb9c4b818e8d4479a2717ae929c14a8","tarball":"https://registry.npmjs.org/@annoyingmouse/wc-month-year-date/-/wc-month-year-date-1.0.3.tgz","fileCount":7,"integrity":"sha512-XZpUvwKPvwU6lwMTWlXHq37HKKCUDkiNLsC8Eb5wZ47jK1cvBkvouYcw+OTj6MF8MAWQOHZe7RRkJzezy/x7/A==","signatures":[{"sig":"MEYCIQDE0KfiIZzuT4NzJDVA8/b7Wxxoz1YZ3XkJlRTAZwL7gwIhALc+tE+Ga7N/WPc/+/QjS+Avj7jnqq2gj3bZFhyzHYrR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44186},"main":"wc-month-year-date.js","type":"module","gitHead":"13a3978d60101f560b95a358ee8f8003b2d42a46","scripts":{"lint":"biome lint .","test":"web-test-runner","build":"rollup -c","format":"biome format --write .","release":"npm run build && node scripts/sync-version.cjs && git add -A && git commit -m \"chore: release artifacts\" && git push && git push --tags && npm publish --access public","test:dist":"web-test-runner --config web-test-runner.dist.config.mjs","release:major":"npm version major && npm run release","release:minor":"npm version minor && npm run release","release:patch":"npm version patch && npm run release"},"_npmUser":{"name":"annoyingmouse","email":"annoyingmouse@gmail.com"},"prettier":{"semi":false,"singleQuote":true},"repository":{"url":"git+https://github.com/annoyingmouse/wc-month-year-date.git","type":"git"},"_npmVersion":"11.6.2","description":"A form-associated web component for selecting a month and year.","directories":{},"_nodeVersion":"22.12.0","_hasShrinkwrap":false,"devDependencies":{"rollup":"^4.0.0","@biomejs/biome":"^2.4.9","@open-wc/testing":"^3.2.0","@web/test-runner":"^0.18.0","@rollup/plugin-terser":"^1.0.0","@web/test-runner-playwright":"^0.11.0"},"_npmOperationalInternal":{"tmp":"tmp/wc-month-year-date_1.0.3_1778294624584_0.1925362811549023","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@annoyingmouse/wc-month-year-date","version":"1.0.4","keywords":["web-component","custom-element","date","month","year","form-associated","accessibility","a11y"],"author":{"name":"Dominic Myers"},"license":"MIT","_id":"@annoyingmouse/wc-month-year-date@1.0.4","maintainers":[{"name":"annoyingmouse","email":"annoyingmouse@gmail.com"}],"homepage":"https://github.com/annoyingmouse/wc-month-year-date#readme","bugs":{"url":"https://github.com/annoyingmouse/wc-month-year-date/issues"},"np":{"cleanup":false},"dist":{"shasum":"b6df280dd071a79693d95516cae8a903661f2897","tarball":"https://registry.npmjs.org/@annoyingmouse/wc-month-year-date/-/wc-month-year-date-1.0.4.tgz","fileCount":7,"integrity":"sha512-B1UXdCFBpjC2G5xv5O8X3cb/PjSZXMn9Rdyf4/RIJNHObz5MRGrnwr552xU1ztt136lKAlRY4XwUNo902w8BiA==","signatures":[{"sig":"MEUCICwK90UfG/EpvGZeARB48oCEz6xZyzuX7V+Blc9TpecRAiEArP3fUOefP259gy82iDjO4SsHX+ugzm/90dPrD5WPUV8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47310},"main":"wc-month-year-date.js","type":"module","gitHead":"905fabb020a951bdf65abb2957028338b67cdbc1","scripts":{"lint":"biome lint .","test":"web-test-runner","build":"rollup -c","format":"biome format --write .","release":"npm run build && node scripts/sync-version.cjs && git add -A && git commit -m \"chore: release artifacts\" && git push && git push --tags && npm publish --access public","test:dist":"web-test-runner --config web-test-runner.dist.config.mjs","release:major":"npm version major && npm run release","release:minor":"npm version minor && npm run release","release:patch":"npm version patch && npm run release"},"_npmUser":{"name":"annoyingmouse","email":"annoyingmouse@gmail.com"},"prettier":{"semi":false,"singleQuote":true},"repository":{"url":"git+https://github.com/annoyingmouse/wc-month-year-date.git","type":"git"},"_npmVersion":"11.6.2","description":"A form-associated web component for selecting a month and year.","directories":{},"_nodeVersion":"22.12.0","_hasShrinkwrap":false,"devDependencies":{"rollup":"^4.0.0","@biomejs/biome":"^2.4.9","@open-wc/testing":"^3.2.0","@web/test-runner":"^0.18.0","@rollup/plugin-terser":"^1.0.0","@web/test-runner-playwright":"^0.11.0"},"_npmOperationalInternal":{"tmp":"tmp/wc-month-year-date_1.0.4_1778296048408_0.1934417480786761","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@annoyingmouse/wc-month-year-date","version":"1.1.0","description":"A form-associated web component for selecting a month and year.","main":"wc-month-year-date.js","type":"module","scripts":{"format":"biome format --write .","lint":"biome lint .","test":"web-test-runner","test:dist":"web-test-runner --config web-test-runner.dist.config.mjs","build":"rollup -c","release":"npm run build && node scripts/sync-version.cjs && git add -A && git commit -m \"chore: release artifacts\" && git push && git push --tags && npm publish --access public","release:patch":"npm version patch && npm run release","release:minor":"npm version minor && npm run release","release:major":"npm version major && npm run release"},"repository":{"type":"git","url":"git+https://github.com/annoyingmouse/wc-month-year-date.git"},"keywords":["web-component","custom-element","date","month","year","form-associated","accessibility","a11y"],"author":{"name":"Dominic Myers"},"license":"MIT","bugs":{"url":"https://github.com/annoyingmouse/wc-month-year-date/issues"},"homepage":"https://github.com/annoyingmouse/wc-month-year-date#readme","np":{"cleanup":false},"prettier":{"singleQuote":true,"semi":false},"devDependencies":{"@biomejs/biome":"^2.4.9","@open-wc/testing":"^3.2.0","@web/test-runner":"^0.18.0","@web/test-runner-playwright":"^0.11.0","@rollup/plugin-terser":"^1.0.0","rollup":"^4.0.0"},"gitHead":"93cb74361828359b2825b06b59aec675497ccaa8","_id":"@annoyingmouse/wc-month-year-date@1.1.0","_nodeVersion":"22.12.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-qjp+1QWLxU3jvcyCd5GAgwZimz0XllFg9myT3d0L2w7QPxp4iQPEdnrnoEmNlh61Nb/FmUu3niDe773gv7Rokg==","shasum":"d306932680207b938446908bdedfeb241b531855","tarball":"https://registry.npmjs.org/@annoyingmouse/wc-month-year-date/-/wc-month-year-date-1.1.0.tgz","fileCount":7,"unpackedSize":63989,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCJE9lXhytmpHvnsqXpA6eKSpozmyVIfOykWdlp/uZaNQIgFdKzBhO1c17rXCKLU7l8m7rpvUqVNkceHYeyPr/1ucM="}]},"_npmUser":{"name":"annoyingmouse","email":"annoyingmouse@gmail.com"},"directories":{},"maintainers":[{"name":"annoyingmouse","email":"annoyingmouse@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/wc-month-year-date_1.1.0_1778575605820_0.23065644363207216"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-06T16:42:27.037Z","modified":"2026-05-12T08:46:46.093Z","1.0.1":"2026-05-06T16:42:27.287Z","1.0.2":"2026-05-07T03:19:07.790Z","1.0.3":"2026-05-09T02:43:44.748Z","1.0.4":"2026-05-09T03:07:28.589Z","1.1.0":"2026-05-12T08:46:45.988Z"},"bugs":{"url":"https://github.com/annoyingmouse/wc-month-year-date/issues"},"author":{"name":"Dominic Myers"},"license":"MIT","homepage":"https://github.com/annoyingmouse/wc-month-year-date#readme","keywords":["web-component","custom-element","date","month","year","form-associated","accessibility","a11y"],"repository":{"type":"git","url":"git+https://github.com/annoyingmouse/wc-month-year-date.git"},"description":"A form-associated web component for selecting a month and year.","maintainers":[{"name":"annoyingmouse","email":"annoyingmouse@gmail.com"}],"readme":"# &lt;month-year-date&gt;\n\n[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/@annoyingmouse/wc-month-year-date)\n\nA form-associated web component for selecting a month and year. Renders a localised month `<select>` and a year `<input type=\"number\">` that participate in HTML forms natively via the ElementInternals API. No framework dependencies.\n\n## Installation\n\n```html\n<script src=\"https://unpkg.com/@annoyingmouse/wc-month-year-date/wc-month-year-date.js\" defer></script>\n```\n\nOr as a module:\n\n```html\n<script type=\"module\" src=\"https://cdn.skypack.dev/@annoyingmouse/wc-month-year-date/wc-month-year-date.js\"></script>\n```\n\n## Usage\n\n```html\n<wc-month-year-date name=\"expiry\"></wc-month-year-date>\n```\n\nWith a pre-filled value:\n\n```html\n<wc-month-year-date name=\"dob\" value=\"1990-06\"></wc-month-year-date>\n```\n\nInside a form:\n\n```html\n<form>\n  <wc-month-year-date name=\"expiry\"></wc-month-year-date>\n  <button type=\"submit\">Submit</button>\n</form>\n```\n\nOn submit, the form data entry for `expiry` will be `YYYY-MM-01` (always the first of the month), or absent if either field is left empty.\n\n## Attributes\n\n| Attribute | Description |\n|---|---|\n| `name` | Form field name submitted with the form |\n| `value` | Initial value in `YYYY-MM` or `YYYY-MM-DD` format; both fields start empty when omitted |\n| `default` | Set to `now` to pre-fill both fields with the current month and year when no `value` is present |\n| `disabled` | Disables both controls; value is excluded from form submission |\n| `readonly` | Prevents changes; value is still submitted with the form |\n| `required` | Marks the field as required; triggers constraint validation on submit |\n\n## Public API\n\n```js\nconst el = document.querySelector('wc-month-year-date')\n\n// Read current value (YYYY-MM-01, or \"\" when incomplete)\nconsole.log(el.value)\n\n// Read form field name\nconsole.log(el.name)\n\n// Always \"month-year-date\"\nconsole.log(el.type)\n\n// The associated <form> element (null if not inside a form)\nconsole.log(el.form)\n```\n\n## Theming\n\nThe component uses a Shadow DOM. The `select` and `input` parts are exposed via the `part` attribute and can be styled with `::part()`:\n\n```css\nmonth-year-date::part(month) {\n  border-radius: 4px;\n}\n\nmonth-year-date::part(year) {\n  width: 6rem;\n}\n```\n\n## Accessibility\n\n- The component has `role=\"group\"` so screen readers announce the month and year controls as a single composite field\n- A default `aria-label=\"Month and year\"` labels the group; override it with your own `aria-label` or `aria-labelledby`\n- The month `<select>` has `aria-label=\"Month\"`\n- The year `<input>` has `aria-label=\"Year\"`\n- Both controls use `font: inherit` so they match the surrounding text size and family\n- `disabled`, `readonly`, and `required` propagate to the internal controls; `required` also sets `aria-required` on each control\n- Constraint validation uses `internals.setValidity()` — the browser reports incomplete or missing values on form submit\n- The component is form-associated and works correctly with `<label>`; `formDisabledCallback` handles disabling via a `<fieldset disabled>` ancestor\n\n## Development\n\nNo build step required. Open `index.html` directly in a browser to develop and test.\n\n```bash\nnpm install\nnpm run format   # format with Biome\nnpm run lint     # lint with Biome\nnpm test         # run tests with Web Test Runner\nnpm run build    # produce dist/wc-month-year-date.min.js via Rollup\n```\n\n## Releasing\n\nBefore releasing for the first time, authenticate with npm:\n\n```bash\nnpm login\n```\n\nThen use one of the release scripts depending on the change:\n\n```bash\nnpm run release:patch   # bug fixes (1.0.0 → 1.0.1)\nnpm run release:minor   # new features (1.0.0 → 1.1.0)\nnpm run release:major   # breaking changes (1.0.0 → 2.0.0)\n```\n\nEach script:\n1. Bumps the version in `package.json` and creates a git commit and tag\n2. Builds the minified dist (`dist/wc-month-year-date.min.js`) via Rollup\n3. Syncs the new version into `bower.json`\n4. Commits the build artifacts, pushes the commit and tags to GitHub\n5. Publishes the package to npm with public access\n\n## Licence\n\nMIT\n","readmeFilename":"README.md"}