@dhis2-ui/switch 9.12.0 → 9.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
7
7
  describe('<Switch />', () => {
8
8
  it('should call the onKeyDown callback when provided', () => {
9
9
  const onKeyDown = jest.fn();
10
- (0, _react.render)( /*#__PURE__*/_react2.default.createElement(_switch.Switch, {
10
+ (0, _react.render)(/*#__PURE__*/_react2.default.createElement(_switch.Switch, {
11
11
  name: "foo",
12
12
  value: "bar",
13
13
  checked: false,
@@ -27,7 +27,7 @@ describe('<Switch />', () => {
27
27
  });
28
28
  it('renders the switch with aria label', () => {
29
29
  const ariaLabel = 'test switch';
30
- (0, _react.render)( /*#__PURE__*/_react2.default.createElement(_switch.Switch, {
30
+ (0, _react.render)(/*#__PURE__*/_react2.default.createElement(_switch.Switch, {
31
31
  "aria-label": ariaLabel,
32
32
  name: "foo",
33
33
  value: "bar",
@@ -7,7 +7,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
7
7
  describe('<Switch />', () => {
8
8
  it('should call the onKeyDown callback when provided', () => {
9
9
  const onKeyDown = jest.fn();
10
- (0, _react.render)( /*#__PURE__*/_react2.default.createElement(_switchField.SwitchField, {
10
+ (0, _react.render)(/*#__PURE__*/_react2.default.createElement(_switchField.SwitchField, {
11
11
  label: "label",
12
12
  name: "foo",
13
13
  value: "bar",
@@ -4,7 +4,7 @@ import { Switch } from '../switch.js';
4
4
  describe('<Switch />', () => {
5
5
  it('should call the onKeyDown callback when provided', () => {
6
6
  const onKeyDown = jest.fn();
7
- render( /*#__PURE__*/React.createElement(Switch, {
7
+ render(/*#__PURE__*/React.createElement(Switch, {
8
8
  name: "foo",
9
9
  value: "bar",
10
10
  checked: false,
@@ -24,7 +24,7 @@ describe('<Switch />', () => {
24
24
  });
25
25
  it('renders the switch with aria label', () => {
26
26
  const ariaLabel = 'test switch';
27
- render( /*#__PURE__*/React.createElement(Switch, {
27
+ render(/*#__PURE__*/React.createElement(Switch, {
28
28
  "aria-label": ariaLabel,
29
29
  name: "foo",
30
30
  value: "bar",
@@ -4,7 +4,7 @@ import { SwitchField } from '../switch-field.js';
4
4
  describe('<Switch />', () => {
5
5
  it('should call the onKeyDown callback when provided', () => {
6
6
  const onKeyDown = jest.fn();
7
- render( /*#__PURE__*/React.createElement(SwitchField, {
7
+ render(/*#__PURE__*/React.createElement(SwitchField, {
8
8
  label: "label",
9
9
  name: "foo",
10
10
  value: "bar",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/switch",
3
- "version": "9.12.0",
3
+ "version": "9.14.0",
4
4
  "description": "UI Switch",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,15 +27,15 @@
27
27
  "test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
28
28
  },
29
29
  "peerDependencies": {
30
- "react": "^16.13",
31
- "react-dom": "^16.13",
30
+ "react": "^16.13 || ^18",
31
+ "react-dom": "^16.13 || ^18",
32
32
  "styled-jsx": "^4"
33
33
  },
34
34
  "dependencies": {
35
35
  "@dhis2/prop-types": "^3.1.2",
36
- "@dhis2-ui/field": "9.12.0",
37
- "@dhis2-ui/required": "9.12.0",
38
- "@dhis2/ui-constants": "9.12.0",
36
+ "@dhis2-ui/field": "9.14.0",
37
+ "@dhis2-ui/required": "9.14.0",
38
+ "@dhis2/ui-constants": "9.14.0",
39
39
  "classnames": "^2.3.1",
40
40
  "prop-types": "^15.7.2"
41
41
  },
@@ -44,8 +44,8 @@
44
44
  "types"
45
45
  ],
46
46
  "devDependencies": {
47
- "react": "16.13",
48
- "react-dom": "16.13",
47
+ "react": "^18.3.1",
48
+ "react-dom": "^18.3.1",
49
49
  "styled-jsx": "^4.0.1"
50
50
  },
51
51
  "types": "types"