@atlaskit/radio 5.6.2 → 5.6.3

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,11 @@
1
1
  # @atlaskit/radio
2
2
 
3
+ ## 5.6.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`53ffecf71cb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/53ffecf71cb) - Updated selected radio to use `color.background.selected.bold` instead of `color.background.brand.bold`. There's no visual change as these tokens have same hex value in both light and dark mode.
8
+
3
9
  ## 5.6.2
4
10
 
5
11
  ### Patch Changes
@@ -1,4 +1,3 @@
1
- /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
2
1
  import React from 'react';
3
2
 
4
3
  import { fireEvent } from '@testing-library/react';
package/dist/cjs/radio.js CHANGED
@@ -19,7 +19,7 @@ var _styles = _interopRequireDefault(require("./styles"));
19
19
  var _excluded = ["ariaLabel", "isDisabled", "isRequired", "isInvalid", "isChecked", "label", "mode", "name", "onChange", "value", "testId", "analyticsContext"];
20
20
  /** @jsx jsx */
21
21
  var packageName = "@atlaskit/radio";
22
- var packageVersion = "5.6.2";
22
+ var packageVersion = "5.6.3";
23
23
  var fontFamily = (0, _constants.fontFamily)();
24
24
  var noop = _noop.default;
25
25
  var labelPaddingStyles = (0, _react2.css)({
@@ -164,10 +164,7 @@ var RadioWithMode = /*#__PURE__*/(0, _react.forwardRef)(function Radio(props, re
164
164
  // eslint-disable-next-line jsx-a11y/label-has-associated-control,jsx-a11y/label-has-for
165
165
  (0, _react2.jsx)("label", {
166
166
  "data-testid": testId && "".concat(testId, "--radio-label"),
167
- "data-disabled": isDisabled ? 'true' : undefined
168
- // TODO these will no longer be dynamic styles when legacy theming removed
169
- // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
170
- ,
167
+ "data-disabled": isDisabled ? 'true' : undefined,
171
168
  css: [labelStyles, mode === 'light' ? lightLabelStyles : darkLabelStyles]
172
169
  }, (0, _react2.jsx)("input", (0, _extends2.default)({}, rest, {
173
170
  "aria-label": ariaLabel,
@@ -184,7 +181,7 @@ var RadioWithMode = /*#__PURE__*/(0, _react.forwardRef)(function Radio(props, re
184
181
  ,
185
182
  "data-invalid": isInvalid ? 'true' : undefined
186
183
  // TODO radioCustomProperties can be defined at top of file when legacy theming removed
187
- // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
184
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
188
185
  ,
189
186
  css: [radioStyles, radioCustomProperties],
190
187
  ref: ref
@@ -11,9 +11,9 @@ var radioThemeColors = {
11
11
  background: "var(--ds-background-input, ".concat(_colors.N10, ")"),
12
12
  backgroundHover: "var(--ds-background-input-hovered, ".concat(_colors.N30, ")"),
13
13
  backgroundActive: "var(--ds-background-input-pressed, ".concat(_colors.N30, ")"),
14
- backgroundChecked: "var(--ds-background-brand-bold, ".concat(_colors.B400, ")"),
15
- backgroundCheckedHover: "var(--ds-background-brand-bold-hovered, ".concat(_colors.B300, ")"),
16
- backgroundCheckedActive: "var(--ds-background-brand-bold-pressed, ".concat(_colors.B50, ")"),
14
+ backgroundChecked: "var(--ds-background-selected-bold, ".concat(_colors.B400, ")"),
15
+ backgroundCheckedHover: "var(--ds-background-selected-bold-hovered, ".concat(_colors.B300, ")"),
16
+ backgroundCheckedActive: "var(--ds-background-selected-bold-pressed, ".concat(_colors.B50, ")"),
17
17
  backgroundDisabled: "var(--ds-background-disabled, ".concat(_colors.N20, ")"),
18
18
  dotChecked: "var(--ds-icon-inverse, ".concat(_colors.N10, ")"),
19
19
  dotDisabled: "var(--ds-icon-disabled, ".concat(_colors.N70, ")"),
@@ -27,9 +27,9 @@ var radioThemeColors = {
27
27
  background: "var(--ds-background-input, ".concat(_colors.DN10, ")"),
28
28
  backgroundHover: "var(--ds-background-input-hovered, ".concat(_colors.DN30, ")"),
29
29
  backgroundActive: "var(--ds-background-input-pressed, ".concat(_colors.B200, ")"),
30
- backgroundChecked: "var(--ds-background-brand-bold, ".concat(_colors.B400, ")"),
31
- backgroundCheckedHover: "var(--ds-background-brand-bold-hovered, ".concat(_colors.B75, ")"),
32
- backgroundCheckedActive: "var(--ds-background-brand-bold-pressed, ".concat(_colors.B200, ")"),
30
+ backgroundChecked: "var(--ds-background-selected-bold, ".concat(_colors.B400, ")"),
31
+ backgroundCheckedHover: "var(--ds-background-selected-bold-hovered, ".concat(_colors.B75, ")"),
32
+ backgroundCheckedActive: "var(--ds-background-selected-bold-pressed, ".concat(_colors.B200, ")"),
33
33
  backgroundDisabled: "var(--ds-background-disabled, ".concat(_colors.DN10, ")"),
34
34
  dotChecked: "var(--ds-icon-inverse, ".concat(_colors.DN10, ")"),
35
35
  dotDisabled: "var(--ds-icon-disabled, ".concat(_colors.DN90, ")"),
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/radio",
3
- "version": "5.6.2",
3
+ "version": "5.6.3",
4
4
  "sideEffects": false
5
5
  }
@@ -10,7 +10,7 @@ import GlobalTheme from '@atlaskit/theme/components';
10
10
  import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
11
11
  import getRadioCustomProperties from './styles';
12
12
  const packageName = "@atlaskit/radio";
13
- const packageVersion = "5.6.2";
13
+ const packageVersion = "5.6.3";
14
14
  const fontFamily = getFontFamily();
15
15
  const noop = __noop;
16
16
  const labelPaddingStyles = css({
@@ -152,10 +152,7 @@ const RadioWithMode = /*#__PURE__*/forwardRef(function Radio(props, ref) {
152
152
  // eslint-disable-next-line jsx-a11y/label-has-associated-control,jsx-a11y/label-has-for
153
153
  jsx("label", {
154
154
  "data-testid": testId && `${testId}--radio-label`,
155
- "data-disabled": isDisabled ? 'true' : undefined
156
- // TODO these will no longer be dynamic styles when legacy theming removed
157
- // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
158
- ,
155
+ "data-disabled": isDisabled ? 'true' : undefined,
159
156
  css: [labelStyles, mode === 'light' ? lightLabelStyles : darkLabelStyles]
160
157
  }, jsx("input", _extends({}, rest, {
161
158
  "aria-label": ariaLabel,
@@ -172,7 +169,7 @@ const RadioWithMode = /*#__PURE__*/forwardRef(function Radio(props, ref) {
172
169
  ,
173
170
  "data-invalid": isInvalid ? 'true' : undefined
174
171
  // TODO radioCustomProperties can be defined at top of file when legacy theming removed
175
- // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
172
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
176
173
  ,
177
174
  css: [radioStyles, radioCustomProperties],
178
175
  ref: ref
@@ -5,9 +5,9 @@ const radioThemeColors = {
5
5
  background: `var(--ds-background-input, ${N10})`,
6
6
  backgroundHover: `var(--ds-background-input-hovered, ${N30})`,
7
7
  backgroundActive: `var(--ds-background-input-pressed, ${N30})`,
8
- backgroundChecked: `var(--ds-background-brand-bold, ${B400})`,
9
- backgroundCheckedHover: `var(--ds-background-brand-bold-hovered, ${B300})`,
10
- backgroundCheckedActive: `var(--ds-background-brand-bold-pressed, ${B50})`,
8
+ backgroundChecked: `var(--ds-background-selected-bold, ${B400})`,
9
+ backgroundCheckedHover: `var(--ds-background-selected-bold-hovered, ${B300})`,
10
+ backgroundCheckedActive: `var(--ds-background-selected-bold-pressed, ${B50})`,
11
11
  backgroundDisabled: `var(--ds-background-disabled, ${N20})`,
12
12
  dotChecked: `var(--ds-icon-inverse, ${N10})`,
13
13
  dotDisabled: `var(--ds-icon-disabled, ${N70})`,
@@ -21,9 +21,9 @@ const radioThemeColors = {
21
21
  background: `var(--ds-background-input, ${DN10})`,
22
22
  backgroundHover: `var(--ds-background-input-hovered, ${DN30})`,
23
23
  backgroundActive: `var(--ds-background-input-pressed, ${B200})`,
24
- backgroundChecked: `var(--ds-background-brand-bold, ${B400})`,
25
- backgroundCheckedHover: `var(--ds-background-brand-bold-hovered, ${B75})`,
26
- backgroundCheckedActive: `var(--ds-background-brand-bold-pressed, ${B200})`,
24
+ backgroundChecked: `var(--ds-background-selected-bold, ${B400})`,
25
+ backgroundCheckedHover: `var(--ds-background-selected-bold-hovered, ${B75})`,
26
+ backgroundCheckedActive: `var(--ds-background-selected-bold-pressed, ${B200})`,
27
27
  backgroundDisabled: `var(--ds-background-disabled, ${DN10})`,
28
28
  dotChecked: `var(--ds-icon-inverse, ${DN10})`,
29
29
  dotDisabled: `var(--ds-icon-disabled, ${DN90})`,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/radio",
3
- "version": "5.6.2",
3
+ "version": "5.6.3",
4
4
  "sideEffects": false
5
5
  }
package/dist/esm/radio.js CHANGED
@@ -12,7 +12,7 @@ import GlobalTheme from '@atlaskit/theme/components';
12
12
  import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
13
13
  import getRadioCustomProperties from './styles';
14
14
  var packageName = "@atlaskit/radio";
15
- var packageVersion = "5.6.2";
15
+ var packageVersion = "5.6.3";
16
16
  var fontFamily = getFontFamily();
17
17
  var noop = __noop;
18
18
  var labelPaddingStyles = css({
@@ -157,10 +157,7 @@ var RadioWithMode = /*#__PURE__*/forwardRef(function Radio(props, ref) {
157
157
  // eslint-disable-next-line jsx-a11y/label-has-associated-control,jsx-a11y/label-has-for
158
158
  jsx("label", {
159
159
  "data-testid": testId && "".concat(testId, "--radio-label"),
160
- "data-disabled": isDisabled ? 'true' : undefined
161
- // TODO these will no longer be dynamic styles when legacy theming removed
162
- // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
163
- ,
160
+ "data-disabled": isDisabled ? 'true' : undefined,
164
161
  css: [labelStyles, mode === 'light' ? lightLabelStyles : darkLabelStyles]
165
162
  }, jsx("input", _extends({}, rest, {
166
163
  "aria-label": ariaLabel,
@@ -177,7 +174,7 @@ var RadioWithMode = /*#__PURE__*/forwardRef(function Radio(props, ref) {
177
174
  ,
178
175
  "data-invalid": isInvalid ? 'true' : undefined
179
176
  // TODO radioCustomProperties can be defined at top of file when legacy theming removed
180
- // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
177
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
181
178
  ,
182
179
  css: [radioStyles, radioCustomProperties],
183
180
  ref: ref
@@ -5,9 +5,9 @@ var radioThemeColors = {
5
5
  background: "var(--ds-background-input, ".concat(N10, ")"),
6
6
  backgroundHover: "var(--ds-background-input-hovered, ".concat(N30, ")"),
7
7
  backgroundActive: "var(--ds-background-input-pressed, ".concat(N30, ")"),
8
- backgroundChecked: "var(--ds-background-brand-bold, ".concat(B400, ")"),
9
- backgroundCheckedHover: "var(--ds-background-brand-bold-hovered, ".concat(B300, ")"),
10
- backgroundCheckedActive: "var(--ds-background-brand-bold-pressed, ".concat(B50, ")"),
8
+ backgroundChecked: "var(--ds-background-selected-bold, ".concat(B400, ")"),
9
+ backgroundCheckedHover: "var(--ds-background-selected-bold-hovered, ".concat(B300, ")"),
10
+ backgroundCheckedActive: "var(--ds-background-selected-bold-pressed, ".concat(B50, ")"),
11
11
  backgroundDisabled: "var(--ds-background-disabled, ".concat(N20, ")"),
12
12
  dotChecked: "var(--ds-icon-inverse, ".concat(N10, ")"),
13
13
  dotDisabled: "var(--ds-icon-disabled, ".concat(N70, ")"),
@@ -21,9 +21,9 @@ var radioThemeColors = {
21
21
  background: "var(--ds-background-input, ".concat(DN10, ")"),
22
22
  backgroundHover: "var(--ds-background-input-hovered, ".concat(DN30, ")"),
23
23
  backgroundActive: "var(--ds-background-input-pressed, ".concat(B200, ")"),
24
- backgroundChecked: "var(--ds-background-brand-bold, ".concat(B400, ")"),
25
- backgroundCheckedHover: "var(--ds-background-brand-bold-hovered, ".concat(B75, ")"),
26
- backgroundCheckedActive: "var(--ds-background-brand-bold-pressed, ".concat(B200, ")"),
24
+ backgroundChecked: "var(--ds-background-selected-bold, ".concat(B400, ")"),
25
+ backgroundCheckedHover: "var(--ds-background-selected-bold-hovered, ".concat(B75, ")"),
26
+ backgroundCheckedActive: "var(--ds-background-selected-bold-pressed, ".concat(B200, ")"),
27
27
  backgroundDisabled: "var(--ds-background-disabled, ".concat(DN10, ")"),
28
28
  dotChecked: "var(--ds-icon-inverse, ".concat(DN10, ")"),
29
29
  dotDisabled: "var(--ds-icon-disabled, ".concat(DN90, ")"),
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/radio",
3
- "version": "5.6.2",
3
+ "version": "5.6.3",
4
4
  "sideEffects": false
5
5
  }
@@ -2,9 +2,9 @@ import { ThemeModes } from '@atlaskit/theme/types';
2
2
  export default function getRadioCustomProperties(mode: ThemeModes): {
3
3
  '--local-background': "var(--ds-background-input)";
4
4
  '--local-background-active': "var(--ds-background-input-pressed)";
5
- '--local-background-checked': "var(--ds-background-brand-bold)";
6
- '--local-background-checked-active': "var(--ds-background-brand-bold-pressed)";
7
- '--local-background-checked-hover': "var(--ds-background-brand-bold-hovered)";
5
+ '--local-background-checked': "var(--ds-background-selected-bold)";
6
+ '--local-background-checked-active': "var(--ds-background-selected-bold-pressed)";
7
+ '--local-background-checked-hover': "var(--ds-background-selected-bold-hovered)";
8
8
  '--local-background-disabled': "var(--ds-background-disabled)";
9
9
  '--local-background-hover': "var(--ds-background-input-hovered)";
10
10
  '--local-border': "var(--ds-border-input)";
@@ -2,9 +2,9 @@ import { ThemeModes } from '@atlaskit/theme/types';
2
2
  export default function getRadioCustomProperties(mode: ThemeModes): {
3
3
  '--local-background': "var(--ds-background-input)";
4
4
  '--local-background-active': "var(--ds-background-input-pressed)";
5
- '--local-background-checked': "var(--ds-background-brand-bold)";
6
- '--local-background-checked-active': "var(--ds-background-brand-bold-pressed)";
7
- '--local-background-checked-hover': "var(--ds-background-brand-bold-hovered)";
5
+ '--local-background-checked': "var(--ds-background-selected-bold)";
6
+ '--local-background-checked-active': "var(--ds-background-selected-bold-pressed)";
7
+ '--local-background-checked-hover': "var(--ds-background-selected-bold-hovered)";
8
8
  '--local-background-disabled': "var(--ds-background-disabled)";
9
9
  '--local-background-hover': "var(--ds-background-input-hovered)";
10
10
  '--local-border': "var(--ds-border-input)";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/radio",
3
- "version": "5.6.2",
3
+ "version": "5.6.3",
4
4
  "description": "A radio input allows users to select only one option from a number of choices. Radio is generally displayed in a radio group.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -44,7 +44,7 @@
44
44
  "@atlaskit/ds-lib": "^2.2.0",
45
45
  "@atlaskit/platform-feature-flags": "^0.2.0",
46
46
  "@atlaskit/theme": "^12.5.0",
47
- "@atlaskit/tokens": "^1.4.0",
47
+ "@atlaskit/tokens": "^1.5.0",
48
48
  "@babel/runtime": "^7.0.0",
49
49
  "@emotion/react": "^11.7.1"
50
50
  },