No description
  • JavaScript 49.2%
  • TypeScript 40.6%
  • Dockerfile 10.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Marie Lucca f867af52f9
Merge pull request #70 from github/dependabot/npm_and_yarn/npm_and_yarn-b448f38fe0
Bump ws from 8.17.1 to 8.21.1 in the npm_and_yarn group across 1 directory
2026-07-16 11:59:51 -04:00
.devcontainer Add a .devcontainer 2022-02-28 17:03:58 +00:00
.github/workflows Update Node.js version and modify publish step 2026-05-08 13:15:06 -07:00
examples fix axe violations in example page 2023-08-15 11:44:12 +01:00
src Fix check all behavior with disabled inputs 2024-05-16 00:55:22 +03:00
test Fix check all behavior with disabled inputs 2024-05-16 00:55:22 +03:00
.eslintrc.json Convert to TypeScript 2020-05-26 14:09:30 -04:00
.gitignore Initial commit 2018-08-30 14:31:58 -04:00
CODEOWNERS move AOR to primer 2022-09-23 17:52:24 +01:00
karma.config.cjs Fix ChromeHeadless --no-sandbox for Windows CI in karma.config.cjs 2026-07-16 14:32:16 +00:00
LICENSE Update development dependencies 2020-04-09 17:04:37 -06:00
package-lock.json Bump ws in the npm_and_yarn group across 1 directory 2026-07-16 00:39:57 +00:00
package.json Fix CI failures: downgrade ESLint to v8 and fix plugin resolution 2026-06-18 21:09:59 +00:00
README.md Update readme with stolen text from Josh 2018-08-31 15:07:45 -04:00
tsconfig.json Add skipLibCheck to tsconfig.json to fix @types/ws TS compatibility 2026-07-16 01:56:28 +00:00

Check All

  • Check/uncheck [data-check-all] to check/uncheck all checkboxes in a container.
  • Shift click on [data-check-all-item] to select all checkboxes between the last checked checkbox and the target checkbox.
  • Auto-update [data-check-all-count] to count of checked items.

Installation

$ npm install @github/check-all

Usage

JS

import checkAll from '@github/check-all'
checkAll(document.querySelector('[data-check-all-container]'))

Using a library like selector-observer, the behavior can automatically be applied to any container matching a selector.

import {observe} from 'selector-observer'
import checkAll from '@github/check-all'

observe('[data-check-all-container]', { subscribe: checkAll })

HTML

<div data-check-all-container>
  Count: <span data-check-all-count>0</span>
  <label><input type="checkbox" data-check-all> Check All</label>
  <label><input type="checkbox" data-check-all-item> github/fetch</label>
  <label><input type="checkbox" data-check-all-item> github/textarea-autosize</label>
  <label><input type="checkbox" data-check-all-item> github/eventlistener-polyfill</label>
  <label><input type="checkbox" data-check-all-item> github/quote-selection</label>
</div>

Development

npm install
npm test

License

Distributed under the MIT license. See LICENSE for details.