{"name":"@inquirer/checkbox","version":"0.0.22-alpha.0","keywords":["cli","prompt","command-line","input","inquirer"],"author":{"name":"Simon Boudrias","email":"admin@simonboudrias.com"},"license":"MIT","_id":"@inquirer/checkbox@0.0.22-alpha.0","maintainers":[{"name":"sboudrias","email":"admin@simonboudrias.com"},{"name":"danielchatfield","email":"chatfielddaniel@gmail.com"},{"name":"mischah","email":"mail@michael-kuehnel.de"}],"homepage":"https://github.com/SBoudrias/Inquirer.js/blob/master/packages/checkbox/README.md","bugs":{"url":"https://github.com/SBoudrias/Inquirer.js/issues"},"dist":{"shasum":"53426bfa9fffd20424883d94a5769ae10a311270","tarball":"http://registry-npm.ywwl.com/@inquirer/checkbox/download/@inquirer/checkbox-0.0.22-alpha.0.tgz","fileCount":5,"integrity":"sha512-aX7/iegnZzzkIaD7y0XN6EVYQOmEEd/54753nZKv8rAdQK4AE8ee6Qo8waoLha+cQoTYFCgoUeNe/AKtWEWnRQ==","signatures":[{"sig":"MEYCIQCsW83zMWByi+i3Rg+xdG9K8f7utN05gKukbFbmoPshBQIhAKGkelGVkWKujfhPOiqdf7qZcUtZBHzAM8LvJ0IzSHog","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7682,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJizzDpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoABA/+LcabltnDrlxdYVxAbHflrLOb93mLbupUAsYAN0kBPPyPMGW6\r\nvUyxJqlrZ6x+3i5qEfo6HKOApo+g2wXN3hiRqeK460UUkuLqFtLhjJZ5JV1L\r\nI2P+buaZwTCkxGpRNqiRwp8b5xPlYxvlgAAddnBPDmA3FEz2S88JsRNzF8GE\r\n9bVta3MO/cHo43qCeCoGPI8pJG5HN/DpFYPK4YMn8DC1mUpaYxDIGmYcYgkc\r\nj7vIcW2e2GY7FemLI0JniaslMZ3G8JQaZsjZerhqmLGeRZ2Du1irauKZkjMe\r\nUmSObHE4CJiM/zKKJMGLkveD8T0I+9vpzeQztQIbISNKggHg9MFq4c2foSW4\r\nf/ETvh8G+vtTezau9jQ/Ypm7tZbDIt7LlIRrnDQzkIkYcgoahLBEjG+NQ75K\r\nB8u1dhuLbAXxAjwPqUkZoWzgx40G+OD39DBFELQpBfE/o3U7j3FqdztoN5Pe\r\nywQWYONa7NRTg/5GnNONdgitPtof7Q1MpEzjVxmRf6GxfdifwSPcMISbdYcy\r\n42QKjT07LIARVrgzc7QlEX0IqCYw+qYuSc4318XGS2prnnsfMNxijf508Uj7\r\nkHq72wftbqKX9it8KNCMRcagLqkh2+jHBnwB+3cJcICULoHGz7QoOICVDkvT\r\nWoB2qUTpiuDCizMKDiRRDz8rswZwApZUsz0=\r\n=1qYR\r\n-----END PGP SIGNATURE-----\r\n","size":3130,"noattachment":false,"key":"/@inquirer/checkbox/-/@inquirer/checkbox-0.0.22-alpha.0.tgz"},"main":"dist/index.js","type":"module","gitHead":"1d5e7e3d15c86851f2e5df2bb9f55084ba231c54","scripts":{"tsc":"tsc"},"typings":"dist/index.d.ts","_npmUser":{"name":"sboudrias","email":"admin@simonboudrias.com"},"repository":{"url":"git+https://github.com/SBoudrias/Inquirer.js.git","type":"git"},"_npmVersion":"lerna/5.1.8/node@v18.4.0+x64 (darwin)","description":"Inquirer checkbox prompt","directories":{},"_nodeVersion":"18.4.0","dependencies":{"chalk":"^5.0.1","figures":"^4.0.1","ansi-escapes":"^5.0.0","@inquirer/core":"^0.0.22-alpha.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/checkbox_0.0.22-alpha.0_1657745641334_0.5405043698781737","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":1657745641509,"_cnpm_publish_time":1657745641509,"dist-tags":{"latest":"5.3.0"}}