• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

atomicpages / pretty-checkbox-react / 8391372180

22 Mar 2024 01:52PM UTC coverage: 100.0%. Remained the same
8391372180

Pull #1074

github

web-flow
build(deps): bump webpack-dev-middleware and webpack-dev-server

Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) to 7.1.1 and updates ancestor dependency [webpack-dev-server](https://github.com/webpack/webpack-dev-server). These dependencies need to be updated together.


Updates `webpack-dev-middleware` from 3.7.3 to 7.1.1
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v3.7.3...v7.1.1)

Updates `webpack-dev-server` from 3.11.2 to 5.0.4
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v3.11.2...v5.0.4)

---
updated-dependencies:
- dependency-name: webpack-dev-middleware
  dependency-type: indirect
- dependency-name: webpack-dev-server
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #1074: build(deps): bump webpack-dev-middleware and webpack-dev-server in /playground

67 of 67 branches covered (100.0%)

Branch coverage included in aggregate %.

172 of 172 relevant lines covered (100.0%)

9.99 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/components/checkbox/useIndeterminate.ts
1
import * as React from 'react';
3✔
2
import { UseCheckboxState } from './useCheckboxState';
3

4
export type UseIndeterminateOptions = {
5
  checked?: boolean;
6
  state?: UseCheckboxState['state'];
7
  indeterminate?: boolean;
8
};
9

10
export const useIndeterminate = ({
3✔
11
  checked,
12
  state,
13
  indeterminate: indeterminateFromProps,
14
}: UseIndeterminateOptions): {
15
  ref: React.MutableRefObject<HTMLInputElement>;
16
  'aria-checked': React.AriaAttributes['aria-checked'];
17
} => {
18
  const [indeterminate, setStatus] = React.useState(false);
28✔
19
  const ref = React.useRef<HTMLInputElement>(
28✔
20
    null
21
  ) as React.MutableRefObject<HTMLInputElement>;
22

23
  React.useEffect(() => {
28✔
24
    if (state !== undefined && ref.current) {
24✔
25
      setStatus(state === 'indeterminate');
19✔
26
    }
27
  }, [state]);
28

29
  // if a prop is passed mark the indeterminate state
30
  // we should check to ensure state isn't set to indeterminate
31
  // since we don't want ot clobber the state value if
32
  // it is defined.
33
  React.useEffect(() => {
28✔
34
    if (
25✔
35
      state !== 'indeterminate' &&
69✔
36
      ref.current &&
37
      typeof indeterminateFromProps !== 'undefined'
38
    ) {
39
      ref.current.checked = indeterminateFromProps;
1✔
40

41
      // fix needs to come from pretty-checkbox
42
      // ref.current.indeterminate = indeterminateFromProps;
43

44
      setStatus(indeterminateFromProps);
1✔
45
    }
46
  }, [indeterminateFromProps, state]);
47

48
  return {
28✔
49
    ref,
50
    'aria-checked': indeterminate ? 'mixed' : checked,
28✔
51
  };
52
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc