@atlaskit/checkbox 12.3.20 → 12.4.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @atlaskit/checkbox
2
2
 
3
+ ## 12.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`0944c0e7eed`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0944c0e7eed) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behavior change.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
3
13
  ## 12.3.20
4
14
 
5
15
  ### Patch Changes
@@ -15,7 +15,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
15
15
 
16
16
  var _react = require("react");
17
17
 
18
- var _core = require("@emotion/core");
18
+ var _react2 = require("@emotion/react");
19
19
 
20
20
  var _usePlatformLeafEventHandler = require("@atlaskit/analytics-next/usePlatformLeafEventHandler");
21
21
 
@@ -26,7 +26,7 @@ var _internal = require("./internal");
26
26
  var _excluded = ["isChecked", "isDisabled", "isInvalid", "defaultChecked", "isIndeterminate", "size", "onChange", "analyticsContext", "label", "name", "value", "isRequired", "testId"];
27
27
 
28
28
  /* eslint-disable @repo/internal/styles/no-nested-styles */
29
- var checkboxStyles = (0, _core.css)({
29
+ var checkboxStyles = (0, _react2.css)({
30
30
  width: '100%',
31
31
  height: '100%',
32
32
  margin: 0,
@@ -174,17 +174,17 @@ var Checkbox = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef
174
174
  analyticsData: analyticsContext,
175
175
  componentName: 'checkbox',
176
176
  packageName: "@atlaskit/checkbox",
177
- packageVersion: "12.3.20"
177
+ packageVersion: "12.4.0"
178
178
  });
179
179
  var internalRef = (0, _react.useRef)(null);
180
180
  var mergedRefs = (0, _mergeRefs.default)([internalRef, ref]); // Use isChecked from the state if it is controlled
181
181
 
182
182
  var isChecked = isCheckedProp === undefined ? isCheckedState : isCheckedProp;
183
- return (0, _core.jsx)(_internal.Label, {
183
+ return (0, _react2.jsx)(_internal.Label, {
184
184
  isDisabled: isDisabled,
185
185
  id: rest.id ? "".concat(rest.id, "-label") : undefined,
186
186
  testId: testId && "".concat(testId, "--checkbox-label")
187
- }, (0, _core.jsx)("input", (0, _extends2.default)({}, rest, {
187
+ }, (0, _react2.jsx)("input", (0, _extends2.default)({}, rest, {
188
188
  type: "checkbox",
189
189
  ref: mergedRefs,
190
190
  disabled: isDisabled,
@@ -198,11 +198,11 @@ var Checkbox = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef
198
198
  "aria-invalid": isInvalid ? 'true' : undefined,
199
199
  "data-testid": testId && "".concat(testId, "--hidden-checkbox"),
200
200
  "data-invalid": isInvalid ? 'true' : undefined
201
- })), (0, _core.jsx)(_internal.CheckboxIcon, {
201
+ })), (0, _react2.jsx)(_internal.CheckboxIcon, {
202
202
  size: size,
203
203
  isIndeterminate: isIndeterminate,
204
204
  isChecked: isChecked
205
- }), label && (0, _core.jsx)(_internal.LabelText, null, label, isRequired && (0, _core.jsx)(_internal.RequiredIndicator, null)));
205
+ }), label && (0, _react2.jsx)(_internal.LabelText, null, label, isRequired && (0, _react2.jsx)(_internal.RequiredIndicator, null)));
206
206
  }));
207
207
  Checkbox.displayName = 'Checkbox';
208
208
  var _default = Checkbox;
@@ -9,14 +9,14 @@ exports.default = void 0;
9
9
 
10
10
  var _react = require("react");
11
11
 
12
- var _core = require("@emotion/core");
12
+ var _react2 = require("@emotion/react");
13
13
 
14
14
  var _svg = _interopRequireDefault(require("@atlaskit/icon/svg"));
15
15
 
16
16
  /** @jsx jsx */
17
17
  function getIcon(isIndeterminate, isChecked) {
18
18
  if (isIndeterminate) {
19
- return (0, _core.jsx)("rect", {
19
+ return (0, _react2.jsx)("rect", {
20
20
  fill: "inherit",
21
21
  x: "8",
22
22
  y: "11",
@@ -27,7 +27,7 @@ function getIcon(isIndeterminate, isChecked) {
27
27
  }
28
28
 
29
29
  if (isChecked) {
30
- return (0, _core.jsx)("path", {
30
+ return (0, _react2.jsx)("path", {
31
31
  d: "M9.707 11.293a1 1 0 1 0-1.414 1.414l2 2a1 1 0 0 0 1.414 0l4-4a1 1 0 1 0-1.414-1.414L11 12.586l-1.293-1.293z",
32
32
  fill: "inherit"
33
33
  });
@@ -53,14 +53,14 @@ var CheckboxIcon = /*#__PURE__*/(0, _react.memo)(function (_ref) {
53
53
  var icon = (0, _react.useMemo)(function () {
54
54
  return getIcon(isIndeterminate, isChecked);
55
55
  }, [isIndeterminate, isChecked]);
56
- return (0, _core.jsx)(_svg.default, {
56
+ return (0, _react2.jsx)(_svg.default, {
57
57
  label: "",
58
58
  size: size,
59
59
  primaryColor: "var(--checkbox-background-color)",
60
60
  secondaryColor: "var(--checkbox-tick-color)"
61
- }, (0, _core.jsx)("g", {
61
+ }, (0, _react2.jsx)("g", {
62
62
  fillRule: "evenodd"
63
- }, (0, _core.jsx)("rect", {
63
+ }, (0, _react2.jsx)("rect", {
64
64
  fill: "currentColor",
65
65
  x: "6",
66
66
  y: "6",
@@ -5,17 +5,17 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = LabelText;
7
7
 
8
- var _core = require("@emotion/core");
8
+ var _react = require("@emotion/react");
9
9
 
10
10
  /** @jsx jsx */
11
- var labelTextStyles = (0, _core.css)({
11
+ var labelTextStyles = (0, _react.css)({
12
12
  alignSelf: 'center',
13
13
  gridArea: '1 / 2 / 2 / 3'
14
14
  });
15
15
 
16
16
  function LabelText(_ref) {
17
17
  var children = _ref.children;
18
- return (0, _core.jsx)("span", {
18
+ return (0, _react.jsx)("span", {
19
19
  css: labelTextStyles
20
20
  }, children);
21
21
  }
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.default = Label;
9
9
 
10
- var _core = require("@emotion/core");
10
+ var _react = require("@emotion/react");
11
11
 
12
12
  var _colors = require("@atlaskit/theme/colors");
13
13
 
@@ -18,7 +18,7 @@ var _constants = require("./constants");
18
18
  var _theme = _interopRequireDefault(require("./theme"));
19
19
 
20
20
  /** @jsx jsx */
21
- var labelStyles = (0, _core.css)({
21
+ var labelStyles = (0, _react.css)({
22
22
  display: 'grid',
23
23
  gap: '0 4px',
24
24
  gridAutoColumns: '1fr',
@@ -28,12 +28,12 @@ var labelStyles = (0, _core.css)({
28
28
  cursor: 'default',
29
29
  fontFamily: _constants.fontFamily
30
30
  });
31
- var disabledStyles = (0, _core.css)({
31
+ var disabledStyles = (0, _react.css)({
32
32
  color: "var(--ds-text-disabled, ".concat(_colors.N80, ")"),
33
33
  cursor: 'not-allowed'
34
34
  });
35
35
  var themeStyles = {
36
- light: (0, _core.css)({
36
+ light: (0, _react.css)({
37
37
  /**
38
38
  * Background
39
39
  */
@@ -65,7 +65,7 @@ var themeStyles = {
65
65
  '--local-tick-disabled': _theme.default.light.tickColor.disabledAndChecked,
66
66
  '--local-tick-rest': 'transparent'
67
67
  }),
68
- dark: (0, _core.css)({
68
+ dark: (0, _react.css)({
69
69
  /**
70
70
  * Background
71
71
  */
@@ -110,7 +110,7 @@ function Label(_ref) {
110
110
  mode = _useGlobalTheme.mode;
111
111
 
112
112
  return (// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
113
- (0, _core.jsx)("label", {
113
+ (0, _react.jsx)("label", {
114
114
  css: [labelStyles, isDisabled && disabledStyles, mode === 'light' && themeStyles.light, mode === 'dark' && themeStyles.dark],
115
115
  "data-testid": testId,
116
116
  "data-disabled": isDisabled || undefined,
@@ -5,20 +5,20 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = RequiredIndicator;
7
7
 
8
- var _core = require("@emotion/core");
8
+ var _react = require("@emotion/react");
9
9
 
10
10
  var _colors = require("@atlaskit/theme/colors");
11
11
 
12
12
  var _constants = require("./constants");
13
13
 
14
14
  /** @jsx jsx */
15
- var requiredIndicatorStyles = (0, _core.css)({
15
+ var requiredIndicatorStyles = (0, _react.css)({
16
16
  paddingLeft: _constants.gridSize * 0.25,
17
17
  color: "var(--ds-text-danger, ".concat(_colors.R500, ")")
18
18
  });
19
19
 
20
20
  function RequiredIndicator() {
21
- return (0, _core.jsx)("span", {
21
+ return (0, _react.jsx)("span", {
22
22
  css: requiredIndicatorStyles,
23
23
  "aria-hidden": true
24
24
  }, "*");
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/checkbox",
3
- "version": "12.3.20",
3
+ "version": "12.4.0",
4
4
  "sideEffects": false
5
5
  }
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
 
3
3
  /** @jsx jsx */
4
4
  import { forwardRef, memo, useCallback, useRef, useState } from 'react';
5
- import { css, jsx } from '@emotion/core';
5
+ import { css, jsx } from '@emotion/react';
6
6
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next/usePlatformLeafEventHandler';
7
7
  import mergeRefs from '@atlaskit/ds-lib/merge-refs';
8
8
  import { CheckboxIcon, Label, LabelText, RequiredIndicator } from './internal';
@@ -148,7 +148,7 @@ const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Checkbox(pr
148
148
  analyticsData: analyticsContext,
149
149
  componentName: 'checkbox',
150
150
  packageName: "@atlaskit/checkbox",
151
- packageVersion: "12.3.20"
151
+ packageVersion: "12.4.0"
152
152
  });
153
153
  const internalRef = useRef(null);
154
154
  const mergedRefs = mergeRefs([internalRef, ref]); // Use isChecked from the state if it is controlled
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { memo, useMemo } from 'react';
3
- import { jsx } from '@emotion/core';
3
+ import { jsx } from '@emotion/react';
4
4
  import PrimitiveSVGIcon from '@atlaskit/icon/svg';
5
5
 
6
6
  function getIcon(isIndeterminate, isChecked) {
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { css, jsx } from '@emotion/core';
2
+ import { css, jsx } from '@emotion/react';
3
3
  const labelTextStyles = css({
4
4
  alignSelf: 'center',
5
5
  gridArea: '1 / 2 / 2 / 3'
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { css, jsx } from '@emotion/core';
2
+ import { css, jsx } from '@emotion/react';
3
3
  import { N80, N900 } from '@atlaskit/theme/colors';
4
4
  import { useGlobalTheme } from '@atlaskit/theme/components';
5
5
  import { fontFamily } from './constants';
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { css, jsx } from '@emotion/core';
2
+ import { css, jsx } from '@emotion/react';
3
3
  import { R500 } from '@atlaskit/theme/colors';
4
4
  import { gridSize } from './constants';
5
5
  const requiredIndicatorStyles = css({
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/checkbox",
3
- "version": "12.3.20",
3
+ "version": "12.4.0",
4
4
  "sideEffects": false
5
5
  }
@@ -5,7 +5,7 @@ var _excluded = ["isChecked", "isDisabled", "isInvalid", "defaultChecked", "isIn
5
5
 
6
6
  /** @jsx jsx */
7
7
  import { forwardRef, memo, useCallback, useRef, useState } from 'react';
8
- import { css, jsx } from '@emotion/core';
8
+ import { css, jsx } from '@emotion/react';
9
9
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next/usePlatformLeafEventHandler';
10
10
  import mergeRefs from '@atlaskit/ds-lib/merge-refs';
11
11
  import { CheckboxIcon, Label, LabelText, RequiredIndicator } from './internal';
@@ -159,7 +159,7 @@ var Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Checkbox(prop
159
159
  analyticsData: analyticsContext,
160
160
  componentName: 'checkbox',
161
161
  packageName: "@atlaskit/checkbox",
162
- packageVersion: "12.3.20"
162
+ packageVersion: "12.4.0"
163
163
  });
164
164
  var internalRef = useRef(null);
165
165
  var mergedRefs = mergeRefs([internalRef, ref]); // Use isChecked from the state if it is controlled
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { memo, useMemo } from 'react';
3
- import { jsx } from '@emotion/core';
3
+ import { jsx } from '@emotion/react';
4
4
  import PrimitiveSVGIcon from '@atlaskit/icon/svg';
5
5
 
6
6
  function getIcon(isIndeterminate, isChecked) {
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { css, jsx } from '@emotion/core';
2
+ import { css, jsx } from '@emotion/react';
3
3
  var labelTextStyles = css({
4
4
  alignSelf: 'center',
5
5
  gridArea: '1 / 2 / 2 / 3'
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { css, jsx } from '@emotion/core';
2
+ import { css, jsx } from '@emotion/react';
3
3
  import { N80, N900 } from '@atlaskit/theme/colors';
4
4
  import { useGlobalTheme } from '@atlaskit/theme/components';
5
5
  import { fontFamily } from './constants';
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { css, jsx } from '@emotion/core';
2
+ import { css, jsx } from '@emotion/react';
3
3
  import { R500 } from '@atlaskit/theme/colors';
4
4
  import { gridSize } from './constants';
5
5
  var requiredIndicatorStyles = css({
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/checkbox",
3
- "version": "12.3.20",
3
+ "version": "12.4.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,3 +1,4 @@
1
- /// <reference types="react" />
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
2
3
  import { LabelTextProps } from '../types';
3
- export default function LabelText({ children }: LabelTextProps): JSX.Element;
4
+ export default function LabelText({ children }: LabelTextProps): jsx.JSX.Element;
@@ -1,3 +1,4 @@
1
- /// <reference types="react" />
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
2
3
  import { LabelProps } from '../types';
3
- export default function Label({ children, isDisabled, testId, onClick, id, }: LabelProps): JSX.Element;
4
+ export default function Label({ children, isDisabled, testId, onClick, id, }: LabelProps): jsx.JSX.Element;
@@ -1,2 +1,3 @@
1
- /// <reference types="react" />
2
- export default function RequiredIndicator(): JSX.Element;
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ export default function RequiredIndicator(): jsx.JSX.Element;
@@ -1,3 +1,4 @@
1
- /// <reference types="react" />
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
2
3
  import { LabelTextProps } from '../types';
3
- export default function LabelText({ children }: LabelTextProps): JSX.Element;
4
+ export default function LabelText({ children }: LabelTextProps): jsx.JSX.Element;
@@ -1,3 +1,4 @@
1
- /// <reference types="react" />
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
2
3
  import { LabelProps } from '../types';
3
- export default function Label({ children, isDisabled, testId, onClick, id, }: LabelProps): JSX.Element;
4
+ export default function Label({ children, isDisabled, testId, onClick, id, }: LabelProps): jsx.JSX.Element;
@@ -1,2 +1,3 @@
1
- /// <reference types="react" />
2
- export default function RequiredIndicator(): JSX.Element;
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ export default function RequiredIndicator(): jsx.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/checkbox",
3
- "version": "12.3.20",
3
+ "version": "12.4.0",
4
4
  "description": "A checkbox is an input control that allows a user to select one or more options from a number of choices.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -35,11 +35,11 @@
35
35
  "dependencies": {
36
36
  "@atlaskit/analytics-next": "^8.2.0",
37
37
  "@atlaskit/ds-lib": "^2.1.0",
38
- "@atlaskit/icon": "^21.10.0",
38
+ "@atlaskit/icon": "^21.11.0",
39
39
  "@atlaskit/theme": "^12.2.0",
40
40
  "@atlaskit/tokens": "^0.10.0",
41
41
  "@babel/runtime": "^7.0.0",
42
- "@emotion/core": "^10.0.9"
42
+ "@emotion/react": "^11.7.1"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": "^16.8.0"
@@ -47,8 +47,8 @@
47
47
  "devDependencies": {
48
48
  "@atlaskit/button": "^16.3.0",
49
49
  "@atlaskit/docs": "*",
50
- "@atlaskit/form": "^8.5.0",
51
- "@atlaskit/section-message": "^6.2.0",
50
+ "@atlaskit/form": "^8.6.0",
51
+ "@atlaskit/section-message": "^6.3.0",
52
52
  "@atlaskit/ssr": "*",
53
53
  "@atlaskit/toggle": "^12.5.0",
54
54
  "@atlaskit/visual-regression": "*",
package/report.api.md CHANGED
@@ -1,6 +1,8 @@
1
- ## API Report File for "@atlaskit/checkbox"
1
+ ## API Report File for "@atlaskit/checkbox".
2
2
 
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
3
+ > Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
4
6
 
5
7
  ```ts
6
8
  /// <reference types="react" />