{"name":"@inquirer/checkbox","version":"0.0.7-alpha.0","keywords":["cli","prompt","command-line","input","inquirer"],"author":{"name":"Simon Boudrias"},"license":"MIT","_id":"@inquirer/checkbox@0.0.7-alpha.0","maintainers":[{"name":"danielchatfield","email":"chatfielddaniel@gmail.com"},{"name":"mischah","email":"mail@michael-kuehnel.de"},{"name":"sboudrias","email":"admin@simonboudrias.com"}],"homepage":"https://github.com/SBoudrias/Inquirer.js#readme","bugs":{"url":"https://github.com/SBoudrias/Inquirer.js/issues"},"dist":{"shasum":"ee170f823a1e4c235a074c14a0208e0ab0ea32d4","tarball":"http://registry-npm.ywwl.com/@inquirer/checkbox/download/@inquirer/checkbox-0.0.7-alpha.0.tgz","fileCount":4,"integrity":"sha512-78RZvjMjBJzsEAQwpv6qTMRmpi+OFQtGC2T5BwMsDwB9VYrVudy2FdkxCXFr/iFEegL5AWIgl7CYIq10EgTLbA==","signatures":[{"sig":"MEYCIQCXtc5BvNQViw5yrf4GTI2nR+bofHTsX7ImgwN7PzcGDAIhAIGCngaSqIveCRglYxdO1nTFQD2wiB+qHwvjTskisS/G","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdUEZjCRA9TVsSAnZWagAAAY8P+wagqvttJ4x60EinxrSk\nHZFuXcV1KO6rp7d0l/lc9p7Kyyj2T+dGS7gOuzxl5Ea3RH9t0YtA8XQjEq/s\nzuhkUa/nT6ZAVxYxpanu+f8BbDih6VkDqV3XsZbuAWsOE7vXsUxqVeqInLnd\ncEdNp6YX5zfqc3UjEhk154cvCTlWyymDfvTr4s9YjYrT/kgjgtaa0fg7GzP9\nUzISloKSuhb1MVK1JuXTI+NqtGOgW9zv2pckJFIJPNci5ChgSulruzolby0r\nbPub5irwh+raS+KtG2Z2H/egovttqb2uKg9wOcMofCShqt3oWxfsHfcL/miH\nW09wvaJGvOWi6pZv6m4BP4wtYrrEunmvVXok/zt5Y0YlAuu/MIgMwKrKDIHQ\nZJvfgU10Z/ErmD6VoYIM8PgQOaR+e1n9zFAjKJeWBfO82v7Z1b+GohzwkKv1\nOnHaR8mHCV+G9q6m4ucgPz7d2c8dP68Bbz1a/u/yBgyB0cPb2n/ANiFn7HHz\nEJtpDIwC8kQvJVLddXqbC3tksYDnW3QvaE7tZk8rEOqCL8WYC8kwDG5Cpqjg\nfSTxZ6qRjdkSgEogsnp5m49h1cdKWG9QJoCNChE05Q3soRDajTvq7RgFNs3x\nPh+C9VFoeKNYgSz3tj4vesOsm3WP2EGPQF4toVtmWBgPLAtjqQWwGt9xVHzD\nUNCt\r\n=YiZ6\r\n-----END PGP SIGNATURE-----\r\n","size":2476,"noattachment":false,"key":"/@inquirer/checkbox/-/@inquirer/checkbox-0.0.7-alpha.0.tgz"},"main":"index.js","gitHead":"54285c75bc7986e0e2c7bcd2bc8ae4ddd6f05929","_npmUser":{"name":"sboudrias","email":"admin@simonboudrias.com"},"repository":{"url":"git+https://github.com/SBoudrias/Inquirer.js.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v12.8.0+x64 (darwin)","description":"Inquirer checkbox prompt","directories":{},"_nodeVersion":"12.8.0","dependencies":{"chalk":"^2.4.1","figures":"^3.0.0","@inquirer/core":"^0.0.7-alpha.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/checkbox_0.0.7-alpha.0_1565541987229_0.11566193168861894","host":"s3://npm-registry-packages"},"readme":"# `@inquirer/checkbox`\n\nSimple interactive command line prompt to display a list of checkboxes (multi select).\n\n![Checkbox prompt](https://cdn.rawgit.com/SBoudrias/Inquirer.js/28ae8337ba51d93e359ef4f7ee24e79b69898962/assets/screenshots/checkbox.svg)\n\n# Installation\n\n```sh\nnpm install @inquirer/checkbox\n\nyarn add @inquirer/checkbox\n```\n\n# Usage\n\n```js\nimport checkbox, { Separator } from '@inquirer/checkbox';\n\nconst answer = await checkbox({\n  message: 'Select a package manager',\n  choices: [\n    { name: 'npm', value: 'npm' },\n    { name: 'yarn', value: 'yarn' },\n    new Separator(),\n    { name: 'pnpm', value: 'pnpm', disabled: true },\n    {\n      name: 'pnpm',\n      value: 'pnpm',\n      disabled: '(pnpm is not available)',\n    },\n  ],\n});\n```\n\n## Options\n\n| Property | Type                                                                                                    | Required | Description                                                                                                                                                                                           |\n| -------- | ------------------------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| message  | `string`                                                                                                | yes      | The question to ask                                                                                                                                                                                   |\n| choices  | `Array<{ value: string, name?: string, disabled?: boolean \\| string, checked?: boolean } \\| Separator>` | yes      | List of the available choices. The `value` will be returned as the answer, and used as display if no `name` is defined. Choices who're `disabled` will be displayed, but not selectable.              |\n| pageSize | `number`                                                                                                | no       | By default, lists of choice longer than 7 will be paginated. Use this option to control how many choices will appear on the screen at once.                                                           |\n| loop     | `boolean`                                                                                               | no       | Defaults to `true`. When set to `false`, the cursor will be constrained to the top and bottom of the choice list without looping.                                                                     |\n| required | `boolean`                                                                                               | no       | When set to `true`, ensures at least one choice must be selected.                                                                                                                                     |\n| validate | `string\\[\\] => boolean \\| string \\| Promise<string \\| boolean>`                                         | no       | On submit, validate the choices. When returning a string, it'll be used as the error message displayed to the user. Note: returning a rejected promise, we'll assume a code error happened and crash. |\n| theme    | [See Theming](#Theming)                                                                                 | no       | Customize look of the prompt.                                                                                                                                                                         |\n\nThe `Separator` object can be used to render non-selectable lines in the choice list. By default it'll render a line, but you can provide the text as argument (`new Separator('-- Dependencies --')`). This option is often used to add labels to groups within long list of options.\n\n## Theming\n\nYou can theme a prompt by passing a `theme` object option. The theme object only need to includes the keys you wish to modify, we'll fallback on the defaults for the rest.\n\n```ts\ntype Theme = {\n  prefix: string;\n  spinner: {\n    interval: number;\n    frames: string[];\n  };\n  style: {\n    answer: (text: string) => string;\n    message: (text: string) => string;\n    error: (text: string) => string;\n    defaultAnswer: (text: string) => string;\n    help: (text: string) => string;\n    highlight: (text: string) => string;\n    key: (text: string) => string;\n    disabledChoice: (text: string) => string;\n    renderSelectedChoices: <T>(\n      selectedChoices: ReadonlyArray<Choice<T>>,\n      allChoices: ReadonlyArray<Choice<T> | Separator>,\n    ) => string;\n  };\n  icon: {\n    checked: string;\n    unchecked: string;\n    cursor: string;\n  };\n  helpMode: 'always' | 'never' | 'auto';\n};\n```\n\n### `theme.helpMode`\n\n- `auto` (default): Hide the help tips after an interaction occurs. The scroll tip will hide after any interactions, the selection tip will hide as soon as a first selection is done.\n- `always`: The help tips will always show and never hide.\n- `never`: The help tips will never show.\n\n# License\n\nCopyright (c) 2023 Simon Boudrias (twitter: [@vaxilart](https://twitter.com/Vaxilart))<br/>\nLicensed under the MIT license.\n","publish_time":1565541987375,"_cnpm_publish_time":1565541987375,"dist-tags":{"latest":"5.3.0"}}