@atlaskit/checkbox 12.6.6 → 12.6.7

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/checkbox
2
2
 
3
+ ## 12.6.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [`9cc3b8d1902`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9cc3b8d1902) - chore(checkbox): use new feature flag for border contrast
8
+
3
9
  ## 12.6.6
4
10
 
5
11
  ### Patch Changes
@@ -16,7 +16,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
16
  var _internal = require("./internal");
17
17
  var _excluded = ["isChecked", "isDisabled", "isInvalid", "defaultChecked", "isIndeterminate", "size", "onChange", "analyticsContext", "label", "name", "value", "isRequired", "testId"];
18
18
  /** @jsx jsx */
19
- /* eslint-disable @repo/internal/styles/no-nested-styles */
19
+ /* eslint-disable @atlaskit/design-system/no-nested-styles */
20
20
  var checkboxStyles = (0, _react2.css)({
21
21
  width: '100%',
22
22
  height: '100%',
@@ -43,7 +43,7 @@ var checkboxStyles = (0, _react2.css)({
43
43
  transition: 'color 0.2s ease-in-out, fill 0.2s ease-in-out',
44
44
  'rect:first-of-type': {
45
45
  stroke: 'var(--checkbox-border-color)',
46
- strokeWidth: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.border-checkbox_nyoiu') ? "var(--ds-border-width, 1px)" : 2,
46
+ strokeWidth: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.update-border-radio-checkbox_7askv') ? "var(--ds-border-width, 1px)" : 2,
47
47
  transition: 'stroke 0.2s ease-in-out'
48
48
  }
49
49
  },
@@ -114,7 +114,7 @@ var checkboxStyles = (0, _react2.css)({
114
114
  }
115
115
  }
116
116
  });
117
- /* eslint-enable @repo/internal/styles/no-nested-styles */
117
+ /* eslint-enable @atlaskit/design-system/no-nested-styles */
118
118
 
119
119
  /**
120
120
  * __Checkbox__
@@ -161,7 +161,7 @@ var Checkbox = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef
161
161
  analyticsData: analyticsContext,
162
162
  componentName: 'checkbox',
163
163
  packageName: "@atlaskit/checkbox",
164
- packageVersion: "12.6.6"
164
+ packageVersion: "12.6.7"
165
165
  });
166
166
  var internalRef = (0, _react.useRef)(null);
167
167
  var mergedRefs = (0, _mergeRefs.default)([internalRef, ref]);
@@ -100,6 +100,7 @@ function Label(_ref) {
100
100
  var _useGlobalTheme = (0, _components.useGlobalTheme)(),
101
101
  mode = _useGlobalTheme.mode;
102
102
  return (
103
+ // TODO: Labels should not have click handlers (DSP-11750)
103
104
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
104
105
  (0, _react.jsx)("label", {
105
106
  css: [labelStyles, label && textLabelLayoutStyles, isDisabled && disabledStyles, mode === 'light' && themeStyles.light, mode === 'dark' && themeStyles.dark],
@@ -9,8 +9,8 @@ var _colors = require("@atlaskit/theme/colors");
9
9
  var theme = {
10
10
  light: {
11
11
  borderColor: {
12
- rest: "var(--ds-border-input, ".concat((0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.border-checkbox_nyoiu') ? _colors.N100 : _colors.N40, ")"),
13
- hovered: "var(--ds-border-input, ".concat((0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.border-checkbox_nyoiu') ? _colors.N100 : _colors.N40, ")"),
12
+ rest: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.update-border-radio-checkbox_7askv') ? "var(--ds-border-bold, ".concat(_colors.N100, ")") : "var(--ds-border-input, ".concat(_colors.N40, ")"),
13
+ hovered: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.update-border-radio-checkbox_7askv') ? "var(--ds-border-bold, ".concat(_colors.N100, ")") : "var(--ds-border-input, ".concat(_colors.N40, ")"),
14
14
  disabled: "var(--ds-background-disabled, ".concat(_colors.N20, ")"),
15
15
  checked: "var(--ds-background-selected-bold, ".concat(_colors.B400, ")"),
16
16
  active: "var(--ds-border, ".concat(_colors.B50, ")"),
@@ -35,7 +35,7 @@ var theme = {
35
35
  },
36
36
  dark: {
37
37
  borderColor: {
38
- rest: "var(--ds-border-input, ".concat((0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.border-checkbox_nyoiu') ? _colors.DN200 : _colors.DN80, ")"),
38
+ rest: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.update-border-radio-checkbox_7askv') ? "var(--ds-border-bold, ".concat(_colors.DN200, ")") : "var(--ds-border-input, ".concat(_colors.DN80, ")"),
39
39
  hovered: "var(--ds-border-input, ".concat(_colors.DN200, ")"),
40
40
  disabled: "var(--ds-background-disabled, ".concat(_colors.DN10, ")"),
41
41
  checked: "var(--ds-background-selected-bold, ".concat(_colors.B400, ")"),
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/checkbox",
3
- "version": "12.6.6",
3
+ "version": "12.6.7",
4
4
  "sideEffects": false
5
5
  }
@@ -6,7 +6,7 @@ import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next/usePlatfor
6
6
  import mergeRefs from '@atlaskit/ds-lib/merge-refs';
7
7
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
8
8
  import { CheckboxIcon, Label, LabelText, RequiredIndicator } from './internal';
9
- /* eslint-disable @repo/internal/styles/no-nested-styles */
9
+ /* eslint-disable @atlaskit/design-system/no-nested-styles */
10
10
  const checkboxStyles = css({
11
11
  width: '100%',
12
12
  height: '100%',
@@ -33,7 +33,7 @@ const checkboxStyles = css({
33
33
  transition: 'color 0.2s ease-in-out, fill 0.2s ease-in-out',
34
34
  'rect:first-of-type': {
35
35
  stroke: 'var(--checkbox-border-color)',
36
- strokeWidth: getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') ? "var(--ds-border-width, 1px)" : 2,
36
+ strokeWidth: getBooleanFF('platform.design-system-team.update-border-radio-checkbox_7askv') ? "var(--ds-border-width, 1px)" : 2,
37
37
  transition: 'stroke 0.2s ease-in-out'
38
38
  }
39
39
  },
@@ -104,7 +104,7 @@ const checkboxStyles = css({
104
104
  }
105
105
  }
106
106
  });
107
- /* eslint-enable @repo/internal/styles/no-nested-styles */
107
+ /* eslint-enable @atlaskit/design-system/no-nested-styles */
108
108
 
109
109
  /**
110
110
  * __Checkbox__
@@ -145,7 +145,7 @@ const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Checkbox(pr
145
145
  analyticsData: analyticsContext,
146
146
  componentName: 'checkbox',
147
147
  packageName: "@atlaskit/checkbox",
148
- packageVersion: "12.6.6"
148
+ packageVersion: "12.6.7"
149
149
  });
150
150
  const internalRef = useRef(null);
151
151
  const mergedRefs = mergeRefs([internalRef, ref]);
@@ -94,6 +94,7 @@ export default function Label({
94
94
  mode
95
95
  } = useGlobalTheme();
96
96
  return (
97
+ // TODO: Labels should not have click handlers (DSP-11750)
97
98
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
98
99
  jsx("label", {
99
100
  css: [labelStyles, label && textLabelLayoutStyles, isDisabled && disabledStyles, mode === 'light' && themeStyles.light, mode === 'dark' && themeStyles.dark],
@@ -3,8 +3,8 @@ import { B100, B200, B300, B400, B50, B75, DN10, DN200, DN30, DN80, DN90, N10, N
3
3
  const theme = {
4
4
  light: {
5
5
  borderColor: {
6
- rest: `var(--ds-border-input, ${getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') ? N100 : N40})`,
7
- hovered: `var(--ds-border-input, ${getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') ? N100 : N40})`,
6
+ rest: getBooleanFF('platform.design-system-team.update-border-radio-checkbox_7askv') ? `var(--ds-border-bold, ${N100})` : `var(--ds-border-input, ${N40})`,
7
+ hovered: getBooleanFF('platform.design-system-team.update-border-radio-checkbox_7askv') ? `var(--ds-border-bold, ${N100})` : `var(--ds-border-input, ${N40})`,
8
8
  disabled: `var(--ds-background-disabled, ${N20})`,
9
9
  checked: `var(--ds-background-selected-bold, ${B400})`,
10
10
  active: `var(--ds-border, ${B50})`,
@@ -29,7 +29,7 @@ const theme = {
29
29
  },
30
30
  dark: {
31
31
  borderColor: {
32
- rest: `var(--ds-border-input, ${getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') ? DN200 : DN80})`,
32
+ rest: getBooleanFF('platform.design-system-team.update-border-radio-checkbox_7askv') ? `var(--ds-border-bold, ${DN200})` : `var(--ds-border-input, ${DN80})`,
33
33
  hovered: `var(--ds-border-input, ${DN200})`,
34
34
  disabled: `var(--ds-background-disabled, ${DN10})`,
35
35
  checked: `var(--ds-background-selected-bold, ${B400})`,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/checkbox",
3
- "version": "12.6.6",
3
+ "version": "12.6.7",
4
4
  "sideEffects": false
5
5
  }
@@ -9,7 +9,7 @@ import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next/usePlatfor
9
9
  import mergeRefs from '@atlaskit/ds-lib/merge-refs';
10
10
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
11
11
  import { CheckboxIcon, Label, LabelText, RequiredIndicator } from './internal';
12
- /* eslint-disable @repo/internal/styles/no-nested-styles */
12
+ /* eslint-disable @atlaskit/design-system/no-nested-styles */
13
13
  var checkboxStyles = css({
14
14
  width: '100%',
15
15
  height: '100%',
@@ -36,7 +36,7 @@ var checkboxStyles = css({
36
36
  transition: 'color 0.2s ease-in-out, fill 0.2s ease-in-out',
37
37
  'rect:first-of-type': {
38
38
  stroke: 'var(--checkbox-border-color)',
39
- strokeWidth: getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') ? "var(--ds-border-width, 1px)" : 2,
39
+ strokeWidth: getBooleanFF('platform.design-system-team.update-border-radio-checkbox_7askv') ? "var(--ds-border-width, 1px)" : 2,
40
40
  transition: 'stroke 0.2s ease-in-out'
41
41
  }
42
42
  },
@@ -107,7 +107,7 @@ var checkboxStyles = css({
107
107
  }
108
108
  }
109
109
  });
110
- /* eslint-enable @repo/internal/styles/no-nested-styles */
110
+ /* eslint-enable @atlaskit/design-system/no-nested-styles */
111
111
 
112
112
  /**
113
113
  * __Checkbox__
@@ -154,7 +154,7 @@ var Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Checkbox(prop
154
154
  analyticsData: analyticsContext,
155
155
  componentName: 'checkbox',
156
156
  packageName: "@atlaskit/checkbox",
157
- packageVersion: "12.6.6"
157
+ packageVersion: "12.6.7"
158
158
  });
159
159
  var internalRef = useRef(null);
160
160
  var mergedRefs = mergeRefs([internalRef, ref]);
@@ -92,6 +92,7 @@ export default function Label(_ref) {
92
92
  var _useGlobalTheme = useGlobalTheme(),
93
93
  mode = _useGlobalTheme.mode;
94
94
  return (
95
+ // TODO: Labels should not have click handlers (DSP-11750)
95
96
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
96
97
  jsx("label", {
97
98
  css: [labelStyles, label && textLabelLayoutStyles, isDisabled && disabledStyles, mode === 'light' && themeStyles.light, mode === 'dark' && themeStyles.dark],
@@ -3,8 +3,8 @@ import { B100, B200, B300, B400, B50, B75, DN10, DN200, DN30, DN80, DN90, N10, N
3
3
  var theme = {
4
4
  light: {
5
5
  borderColor: {
6
- rest: "var(--ds-border-input, ".concat(getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') ? N100 : N40, ")"),
7
- hovered: "var(--ds-border-input, ".concat(getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') ? N100 : N40, ")"),
6
+ rest: getBooleanFF('platform.design-system-team.update-border-radio-checkbox_7askv') ? "var(--ds-border-bold, ".concat(N100, ")") : "var(--ds-border-input, ".concat(N40, ")"),
7
+ hovered: getBooleanFF('platform.design-system-team.update-border-radio-checkbox_7askv') ? "var(--ds-border-bold, ".concat(N100, ")") : "var(--ds-border-input, ".concat(N40, ")"),
8
8
  disabled: "var(--ds-background-disabled, ".concat(N20, ")"),
9
9
  checked: "var(--ds-background-selected-bold, ".concat(B400, ")"),
10
10
  active: "var(--ds-border, ".concat(B50, ")"),
@@ -29,7 +29,7 @@ var theme = {
29
29
  },
30
30
  dark: {
31
31
  borderColor: {
32
- rest: "var(--ds-border-input, ".concat(getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') ? DN200 : DN80, ")"),
32
+ rest: getBooleanFF('platform.design-system-team.update-border-radio-checkbox_7askv') ? "var(--ds-border-bold, ".concat(DN200, ")") : "var(--ds-border-input, ".concat(DN80, ")"),
33
33
  hovered: "var(--ds-border-input, ".concat(DN200, ")"),
34
34
  disabled: "var(--ds-background-disabled, ".concat(DN10, ")"),
35
35
  checked: "var(--ds-background-selected-bold, ".concat(B400, ")"),
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/checkbox",
3
- "version": "12.6.6",
3
+ "version": "12.6.7",
4
4
  "sideEffects": false
5
5
  }
@@ -1,8 +1,8 @@
1
1
  declare const theme: {
2
2
  light: {
3
3
  borderColor: {
4
- rest: "var(--ds-border-input)";
5
- hovered: "var(--ds-border-input)";
4
+ rest: "var(--ds-border-bold)" | "var(--ds-border-input)";
5
+ hovered: "var(--ds-border-bold)" | "var(--ds-border-input)";
6
6
  disabled: "var(--ds-background-disabled)";
7
7
  checked: "var(--ds-background-selected-bold)";
8
8
  active: "var(--ds-border)";
@@ -27,7 +27,7 @@ declare const theme: {
27
27
  };
28
28
  dark: {
29
29
  borderColor: {
30
- rest: "var(--ds-border-input)";
30
+ rest: "var(--ds-border-bold)" | "var(--ds-border-input)";
31
31
  hovered: "var(--ds-border-input)";
32
32
  disabled: "var(--ds-background-disabled)";
33
33
  checked: "var(--ds-background-selected-bold)";
@@ -1,8 +1,8 @@
1
1
  declare const theme: {
2
2
  light: {
3
3
  borderColor: {
4
- rest: "var(--ds-border-input)";
5
- hovered: "var(--ds-border-input)";
4
+ rest: "var(--ds-border-bold)" | "var(--ds-border-input)";
5
+ hovered: "var(--ds-border-bold)" | "var(--ds-border-input)";
6
6
  disabled: "var(--ds-background-disabled)";
7
7
  checked: "var(--ds-background-selected-bold)";
8
8
  active: "var(--ds-border)";
@@ -27,7 +27,7 @@ declare const theme: {
27
27
  };
28
28
  dark: {
29
29
  borderColor: {
30
- rest: "var(--ds-border-input)";
30
+ rest: "var(--ds-border-bold)" | "var(--ds-border-input)";
31
31
  hovered: "var(--ds-border-input)";
32
32
  disabled: "var(--ds-background-disabled)";
33
33
  checked: "var(--ds-background-selected-bold)";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/checkbox",
3
- "version": "12.6.6",
3
+ "version": "12.6.7",
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/"
@@ -23,7 +23,7 @@
23
23
  "sideEffects": false,
24
24
  "atlaskit:src": "src/index.tsx",
25
25
  "atlassian": {
26
- "team": "Design System Team",
26
+ "team": "Design System Maker Experience",
27
27
  "releaseModel": "continuous",
28
28
  "website": {
29
29
  "name": "Checkbox",
@@ -39,7 +39,7 @@
39
39
  "@atlaskit/icon": "^21.12.0",
40
40
  "@atlaskit/platform-feature-flags": "^0.2.0",
41
41
  "@atlaskit/theme": "^12.5.0",
42
- "@atlaskit/tokens": "^1.11.0",
42
+ "@atlaskit/tokens": "^1.13.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "@emotion/react": "^11.7.1"
45
45
  },
@@ -86,7 +86,7 @@
86
86
  }
87
87
  },
88
88
  "platform-feature-flags": {
89
- "platform.design-system-team.border-checkbox_nyoiu": {
89
+ "platform.design-system-team.update-border-radio-checkbox_7askv": {
90
90
  "type": "boolean"
91
91
  }
92
92
  },
@@ -0,0 +1,62 @@
1
+ ## API Report File for "@atlaskit/checkbox"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ /// <reference types="react" />
8
+
9
+ import { ForwardRefExoticComponent } from 'react';
10
+ import { InputHTMLAttributes } from 'react';
11
+ import { MemoExoticComponent } from 'react';
12
+ import { default as React_2 } from 'react';
13
+ import { RefAttributes } from 'react';
14
+ import type UIAnalyticsEvent from '@atlaskit/analytics-next/UIAnalyticsEvent';
15
+
16
+ // @public
17
+ const Checkbox: MemoExoticComponent<ForwardRefExoticComponent<Omit<Omit<InputHTMLAttributes<HTMLInputElement>, "checked" | "css" | "disabled" | "required">, keyof OwnProps> & OwnProps & RefAttributes<HTMLInputElement>>>;
18
+ export { Checkbox }
19
+ export default Checkbox;
20
+
21
+ // @public (undocumented)
22
+ export type CheckboxProps = Combine<Omit<React_2.InputHTMLAttributes<HTMLInputElement>,
23
+ /**
24
+ * 'disabled', 'required', and 'checked' are omitted so that
25
+ * consumers must handle state using our props.
26
+ *
27
+ * 'css' is added globally to element attributes by emotion.
28
+ * This was causing a bug, making the css prop required in
29
+ * some cases. We explicitly omit it to avoid that.
30
+ *
31
+ * Because 'className' (which the css prop uses internally)
32
+ * is still available, this should not break existing usage.
33
+ */
34
+ 'checked' | 'css' | 'disabled' | 'required'>, OwnProps>;
35
+
36
+ // @public (undocumented)
37
+ type Combine<First, Second> = Omit<First, keyof Second> & Second;
38
+
39
+ // @public
40
+ type OwnProps = {
41
+ defaultChecked?: boolean;
42
+ id?: string;
43
+ isChecked?: boolean;
44
+ isDisabled?: boolean;
45
+ isIndeterminate?: boolean;
46
+ isInvalid?: boolean;
47
+ isRequired?: boolean;
48
+ label?: React_2.ReactChild;
49
+ name?: string;
50
+ onChange?: (e: React_2.ChangeEvent<HTMLInputElement>, analyticsEvent: UIAnalyticsEvent) => void;
51
+ value?: number | string;
52
+ size?: Size;
53
+ testId?: string;
54
+ analyticsContext?: Record<string, any>;
55
+ };
56
+
57
+ // @public (undocumented)
58
+ type Size = 'large' | 'medium' | 'small' | 'xlarge';
59
+
60
+ // (No @packageDocumentation comment for this package)
61
+
62
+ ```