{"bugs":{"url":"https://github.com/solidjs-community/solid-aria/issues"},"dist":{"shasum":"01550a454a1ad9769a81575cd310c71dcff28f0f","tarball":"https://registry.npmjs.org/@solid-aria/label/-/label-0.0.0-snapshot-20220617074250.tgz","fileCount":4,"integrity":"sha512-a71hpFWSaMVCMJI/inm4/50uX301yfCrQMCx2vQpwfnxm6RE2hDciPPiSEjAHuvKYwyJznvZj9YrAgKPXNThCw==","signatures":[{"sig":"MEYCIQDvmSqxMTSwoVwKTzZnvoPZFr4rPXS+Kh1KSRGsMZ3+dAIhANLP1aa+lXi5LmYteEuTLMvnowORlp2kxuszSACBiSek","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7191,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJirDG7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp/mw//bPcXWP+3/26tvT56701IeHBH3aovig1VcAlgGdye+L1zGbH6\r\nvoYO14cV7BKdToa8e49rutDp1v9SJQVxL8vfLU1OQ/f2IVxB9BW+Z/vi1dMm\r\nyL6YXT79eaxJNyfp/j/CVFUXB0lIroOwMcHgrPiElAYGHkJzhM36L3ILwsnr\r\nSBEqp55ODeMNQlJVu1VBSP7tUkXPTgrfNdTou60jt2B4JaU5hVap2hRwvsQQ\r\ncozhPfn/3lLzBHGt+eNRP3CodDKUmjkt4wig9aliHay/eILe1UvQ+N/QQy1x\r\ndpvIdeW4UehjTVRKoUxMLAQStqF0LgIcsa2Y0AxdPfod9Jk146Su/q/XMx0f\r\nYTIDMm4MMSicowa4N8WpEPTqCxvcOXkyPpVuIJrcbtdGtq+RFHuP+9/VP99o\r\niu6LoIc/IS4evw8nawbGCr7UoRaPpyk93zwa/Er38NqOHK7HRAhOLQpOAd/C\r\n7nZOhABzc/WslJHZABcIPlwMTwjrqlcuV3Y/ySOY781q25VLh1QeAYoKnezZ\r\nHDUVsRNcGonuOR1cjNlQa3HazdgWVl5wbi8mbi67ZPyrikKnYH+7rZr1Q7Fi\r\ndizLmo4Dxpk7WBe+V0VRHoM/8wZWqDHjI/QBlvSawd5izcqW7iIJ9/MO6tep\r\n8eN1x5Ov7BPbsGOIEz0e5vN9ooheZBw8nRU=\r\n=7TpU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.cjs","name":"@solid-aria/label","type":"module","types":"dist/index.d.ts","author":{"name":"Fabien Marie-Louise","email":"fabienml.dev@gmail.com"},"module":"dist/index.js","readme":"<p>\n  <img width=\"100%\" src=\"https://assets.solidjs.com/banner?type=Aria&background=tiles&project=Label\" alt=\"Solid Aria - Label\">\n</p>\n\n# @solid-aria/label\n\n[![pnpm](https://img.shields.io/badge/maintained%20with-pnpm-cc00ff.svg?style=for-the-badge&logo=pnpm)](https://pnpm.io/)\n[![turborepo](https://img.shields.io/badge/built%20with-turborepo-cc00ff.svg?style=for-the-badge&logo=turborepo)](https://turborepo.org/)\n[![size](https://img.shields.io/bundlephobia/minzip/@solid-aria/label?style=for-the-badge&label=size)](https://bundlephobia.com/package/@solid-aria/label)\n[![version](https://img.shields.io/npm/v/@solid-aria/label?style=for-the-badge)](https://www.npmjs.com/package/@solid-aria/label)\n[![stage](https://img.shields.io/endpoint?style=for-the-badge&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-0.json)](https://github.com/solidjs-community/solid-aria#contribution-process)\n\nLabels provide context for user inputs.\n\n## Installation\n\n```bash\nnpm install @solid-aria/label\n# or\nyarn add @solid-aria/label\n# or\npnpm add @solid-aria/label\n```\n\n## `createLabel`\n\nProvides the accessibility implementation for labels and their associated elements. It associates a label with a field and automatically handles creating an id for the field and associates the label with it.\n\n### How to use it\n\n```tsx\nimport { AriaLabelProps, createLabel } from \"@solid-aria/label\";\n\ninterface ColorFieldProps extends AriaLabelProps {\n  // your component specific props\n}\n\nfunction ColorField(props: ColorFieldProps) {\n  const { labelProps, fieldProps } = createLabel(props);\n\n  return (\n    <>\n      <label {...labelProps}>{props.label}</label>\n      <select {...fieldProps}>\n        <option>Indigo</option>\n        <option>Maroon</option>\n        <option>Chartreuse</option>\n      </select>\n    </>\n  );\n}\n\nfunction App() {\n  return <ColorField label=\"Favorite color\" />;\n}\n```\n\nBy default, `createLabel` assumes that the label is a native HTML label element. However, if you are labeling a non-native form element, be sure to use an element other than a `<label>` and set the `labelElementType` prop appropriately.\n\n## Changelog\n\nAll notable changes are described in the [CHANGELOG.md](./CHANGELOG.md) file.\n","gitHead":"53580c26c8f278fd52d4258d2753297c7dd24d92","license":"MIT","private":false,"scripts":{"dev":"vite serve dev --host","test":"jest --passWithNoTests","build":"tsup","clean":"rm -rf .turbo && rm -rf node_modules && rm -rf dist","typecheck":"tsc --noEmit","test:watch":"jest --watch --passWithNoTests"},"_npmUser":{"name":"fabienml","email":"fabienml.dev@gmail.com"},"homepage":"https://github.com/solidjs-community/solid-aria/tree/main/packages/label#readme","keywords":["solid","aria","headless","design","system","components"],"primitive":{"list":[],"name":"label","stage":0,"category":""},"repository":{"url":"git+https://github.com/solidjs-community/solid-aria.git","type":"git"},"_npmVersion":"8.11.0","description":"Primitives that provides the accessibility implementation for labels and their associated elements.","directories":{},"maintainers":[{"name":"fabienml","email":"fabienml.dev@gmail.com"},{"name":"davedbase","email":"dave.dibiase@gmail.com"}],"sideEffects":false,"_nodeVersion":"16.15.1","contributors":[],"dependencies":{"@solid-aria/types":"^0.0.0-snapshot-20220617074250","@solid-aria/utils":"^0.0.0-snapshot-20220617074250","@solid-primitives/props":"^2.1.7","@solid-primitives/utils":"^2.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"solid-js":"^1.4.4"},"peerDependencies":{"solid-js":"^1.4.4"},"_npmOperationalInternal":{"tmp":"tmp/label_0.0.0-snapshot-20220617074250_1655452091753_0.5477499577900817","host":"s3://npm-registry-packages"},"_id":"@solid-aria/label@0.0.0-snapshot-20220617074250","version":"0.0.0-snapshot-20220617074250"}