@atlaskit/checkbox 13.4.0 → 13.5.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.
Files changed (35) hide show
  1. package/CHANGELOG.md +868 -861
  2. package/README.md +2 -1
  3. package/__perf__/checkbox.tsx +54 -72
  4. package/__perf__/default.tsx +7 -7
  5. package/codemods/12.0.0-lite-mode.tsx +12 -16
  6. package/codemods/__tests__/12.0.0-lite-mode.tsx +105 -105
  7. package/codemods/migrations/remove-imports.tsx +3 -3
  8. package/codemods/migrations/remove-props.tsx +9 -13
  9. package/codemods/migrations/rename-import.tsx +10 -10
  10. package/codemods/migrations/rename-input-ref-to-ref.tsx +4 -4
  11. package/codemods/utils.tsx +360 -400
  12. package/dist/cjs/checkbox.js +20 -1
  13. package/dist/cjs/internal/checkbox-icon.js +2 -0
  14. package/dist/cjs/internal/label-text.js +4 -0
  15. package/dist/cjs/internal/label.js +5 -0
  16. package/dist/cjs/internal/required-indicator.js +6 -2
  17. package/dist/es2019/checkbox.js +21 -1
  18. package/dist/es2019/internal/checkbox-icon.js +2 -0
  19. package/dist/es2019/internal/label-text.js +4 -0
  20. package/dist/es2019/internal/label.js +5 -0
  21. package/dist/es2019/internal/required-indicator.js +6 -2
  22. package/dist/esm/checkbox.js +21 -1
  23. package/dist/esm/internal/checkbox-icon.js +2 -0
  24. package/dist/esm/internal/label-text.js +4 -0
  25. package/dist/esm/internal/label.js +5 -0
  26. package/dist/esm/internal/required-indicator.js +6 -2
  27. package/dist/types/internal/label-text.d.ts +3 -0
  28. package/dist/types/internal/label.d.ts +4 -1
  29. package/dist/types/internal/required-indicator.d.ts +3 -0
  30. package/dist/types-ts4.5/internal/label-text.d.ts +3 -0
  31. package/dist/types-ts4.5/internal/label.d.ts +4 -1
  32. package/dist/types-ts4.5/internal/required-indicator.d.ts +3 -0
  33. package/extract-react-types/checkbox-props.tsx +1 -1
  34. package/package.json +93 -95
  35. package/report.api.md +41 -46
package/package.json CHANGED
@@ -1,96 +1,94 @@
1
1
  {
2
- "name": "@atlaskit/checkbox",
3
- "version": "13.4.0",
4
- "description": "A checkbox is an input control that allows a user to select one or more options from a number of choices.",
5
- "publishConfig": {
6
- "registry": "https://registry.npmjs.org/"
7
- },
8
- "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
9
- "author": "Atlassian Pty Ltd",
10
- "license": "Apache-2.0",
11
- "main": "dist/cjs/index.js",
12
- "module": "dist/esm/index.js",
13
- "module:es2019": "dist/es2019/index.js",
14
- "types": "dist/types/index.d.ts",
15
- "typesVersions": {
16
- ">=4.5 <4.9": {
17
- "*": [
18
- "dist/types-ts4.5/*",
19
- "dist/types-ts4.5/index.d.ts"
20
- ]
21
- }
22
- },
23
- "sideEffects": false,
24
- "atlaskit:src": "src/index.tsx",
25
- "atlassian": {
26
- "team": "Design System Team",
27
- "productPushConsumption": [
28
- "jira"
29
- ],
30
- "releaseModel": "continuous",
31
- "website": {
32
- "name": "Checkbox",
33
- "category": "Components"
34
- },
35
- "runReact18": true
36
- },
37
- "af:exports": {
38
- ".": "./src/index.tsx"
39
- },
40
- "dependencies": {
41
- "@atlaskit/analytics-next": "^9.3.0",
42
- "@atlaskit/css": "^0.1.0",
43
- "@atlaskit/ds-lib": "^2.3.0",
44
- "@atlaskit/icon": "^22.3.0",
45
- "@atlaskit/theme": "^12.8.0",
46
- "@atlaskit/tokens": "^1.49.0",
47
- "@babel/runtime": "^7.0.0",
48
- "@emotion/react": "^11.7.1"
49
- },
50
- "peerDependencies": {
51
- "react": "^16.8.0 || ^17.0.0 || ~18.2.0"
52
- },
53
- "devDependencies": {
54
- "@af/accessibility-testing": "*",
55
- "@af/integration-testing": "*",
56
- "@af/visual-regression": "*",
57
- "@atlaskit/primitives": "^6.3.0",
58
- "@atlaskit/ssr": "*",
59
- "@atlaskit/visual-regression": "*",
60
- "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
61
- "@atlassian/feature-flags-test-utils": "*",
62
- "@testing-library/react": "^12.1.5",
63
- "jscodeshift": "^0.13.0",
64
- "react-dom": "^16.8.0",
65
- "storybook-addon-performance": "^0.16.0",
66
- "typescript": "~5.4.2",
67
- "wait-for-expect": "^1.2.0"
68
- },
69
- "keywords": [
70
- "atlaskit",
71
- "react",
72
- "ui"
73
- ],
74
- "techstack": {
75
- "@atlassian/frontend": {
76
- "import-structure": "atlassian-conventions"
77
- },
78
- "@repo/internal": {
79
- "dom-events": "use-bind-event-listener",
80
- "design-system": "v1",
81
- "ui-components": "lite-mode",
82
- "analytics": "analytics-next",
83
- "design-tokens": [
84
- "color",
85
- "spacing"
86
- ],
87
- "deprecation": "no-deprecated-imports",
88
- "styling": [
89
- "emotion",
90
- "static"
91
- ]
92
- }
93
- },
94
- "homepage": "https://atlassian.design/components/checkbox/",
95
- "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
96
- }
2
+ "name": "@atlaskit/checkbox",
3
+ "version": "13.5.0",
4
+ "description": "A checkbox is an input control that allows a user to select one or more options from a number of choices.",
5
+ "publishConfig": {
6
+ "registry": "https://registry.npmjs.org/"
7
+ },
8
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
9
+ "author": "Atlassian Pty Ltd",
10
+ "license": "Apache-2.0",
11
+ "main": "dist/cjs/index.js",
12
+ "module": "dist/esm/index.js",
13
+ "module:es2019": "dist/es2019/index.js",
14
+ "types": "dist/types/index.d.ts",
15
+ "typesVersions": {
16
+ ">=4.5 <4.9": {
17
+ "*": [
18
+ "dist/types-ts4.5/*",
19
+ "dist/types-ts4.5/index.d.ts"
20
+ ]
21
+ }
22
+ },
23
+ "sideEffects": false,
24
+ "atlaskit:src": "src/index.tsx",
25
+ "atlassian": {
26
+ "team": "Design System Team",
27
+ "productPushConsumption": [
28
+ "jira"
29
+ ],
30
+ "releaseModel": "continuous",
31
+ "website": {
32
+ "name": "Checkbox",
33
+ "category": "Components"
34
+ },
35
+ "runReact18": true
36
+ },
37
+ "af:exports": {
38
+ ".": "./src/index.tsx"
39
+ },
40
+ "dependencies": {
41
+ "@atlaskit/analytics-next": "^9.3.0",
42
+ "@atlaskit/css": "^0.2.0",
43
+ "@atlaskit/ds-lib": "^2.3.0",
44
+ "@atlaskit/icon": "^22.4.0",
45
+ "@atlaskit/theme": "^12.10.0",
46
+ "@atlaskit/tokens": "^1.51.0",
47
+ "@babel/runtime": "^7.0.0",
48
+ "@emotion/react": "^11.7.1"
49
+ },
50
+ "peerDependencies": {
51
+ "react": "^16.8.0 || ^17.0.0 || ~18.2.0"
52
+ },
53
+ "devDependencies": {
54
+ "@af/accessibility-testing": "*",
55
+ "@af/integration-testing": "*",
56
+ "@af/visual-regression": "*",
57
+ "@atlaskit/primitives": "^7.4.0",
58
+ "@atlaskit/ssr": "*",
59
+ "@atlaskit/visual-regression": "*",
60
+ "@atlassian/feature-flags-test-utils": "*",
61
+ "@testing-library/react": "^12.1.5",
62
+ "jscodeshift": "^0.13.0",
63
+ "react-dom": "^16.8.0",
64
+ "storybook-addon-performance": "^0.16.0",
65
+ "typescript": "~5.4.2",
66
+ "wait-for-expect": "^1.2.0"
67
+ },
68
+ "keywords": [
69
+ "atlaskit",
70
+ "react",
71
+ "ui"
72
+ ],
73
+ "techstack": {
74
+ "@atlassian/frontend": {
75
+ "import-structure": "atlassian-conventions"
76
+ },
77
+ "@repo/internal": {
78
+ "dom-events": "use-bind-event-listener",
79
+ "design-system": "v1",
80
+ "ui-components": "lite-mode",
81
+ "analytics": "analytics-next",
82
+ "design-tokens": [
83
+ "color",
84
+ "spacing"
85
+ ],
86
+ "deprecation": "no-deprecated-imports",
87
+ "styling": [
88
+ "emotion",
89
+ "static"
90
+ ]
91
+ }
92
+ },
93
+ "homepage": "https://atlassian.design/components/checkbox/"
94
+ }
package/report.api.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  ## API Report File for "@atlaskit/checkbox"
4
4
 
5
- > Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
5
+ > Do not edit this file. This report is auto-generated using
6
+ > [API Extractor](https://api-extractor.com/).
6
7
  > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
7
8
 
8
9
  ### Table of contents
@@ -26,39 +27,36 @@ import type UIAnalyticsEvent from '@atlaskit/analytics-next/UIAnalyticsEvent';
26
27
 
27
28
  // @public
28
29
  const Checkbox: MemoExoticComponent<
29
- ForwardRefExoticComponent<
30
- Omit<
31
- Omit<
32
- InputHTMLAttributes<HTMLInputElement>,
33
- 'checked' | 'css' | 'disabled' | 'required'
34
- >,
35
- keyof OwnProps
36
- > &
37
- OwnProps &
38
- RefAttributes<HTMLInputElement>
39
- >
30
+ ForwardRefExoticComponent<
31
+ Omit<
32
+ Omit<InputHTMLAttributes<HTMLInputElement>, 'checked' | 'css' | 'disabled' | 'required'>,
33
+ keyof OwnProps
34
+ > &
35
+ OwnProps &
36
+ RefAttributes<HTMLInputElement>
37
+ >
40
38
  >;
41
39
  export { Checkbox };
42
40
  export default Checkbox;
43
41
 
44
42
  // @public (undocumented)
45
43
  export type CheckboxProps = Combine<
46
- Omit<
47
- React_2.InputHTMLAttributes<HTMLInputElement>,
48
- /**
49
- * 'disabled', 'required', and 'checked' are omitted so that
50
- * consumers must handle state using our props.
51
- *
52
- * 'css' is added globally to element attributes by emotion.
53
- * This was causing a bug, making the css prop required in
54
- * some cases. We explicitly omit it to avoid that.
55
- *
56
- * Because 'className' (which the css prop uses internally)
57
- * is still available, this should not break existing usage.
58
- */
59
- 'checked' | 'css' | 'disabled' | 'required'
60
- >,
61
- OwnProps
44
+ Omit<
45
+ React_2.InputHTMLAttributes<HTMLInputElement>,
46
+ /**
47
+ * 'disabled', 'required', and 'checked' are omitted so that
48
+ * consumers must handle state using our props.
49
+ *
50
+ * 'css' is added globally to element attributes by emotion.
51
+ * This was causing a bug, making the css prop required in
52
+ * some cases. We explicitly omit it to avoid that.
53
+ *
54
+ * Because 'className' (which the css prop uses internally)
55
+ * is still available, this should not break existing usage.
56
+ */
57
+ 'checked' | 'css' | 'disabled' | 'required'
58
+ >,
59
+ OwnProps
62
60
  >;
63
61
 
64
62
  // @public (undocumented)
@@ -66,23 +64,20 @@ type Combine<First, Second> = Omit<First, keyof Second> & Second;
66
64
 
67
65
  // @public
68
66
  type OwnProps = {
69
- defaultChecked?: boolean;
70
- id?: string;
71
- isChecked?: boolean;
72
- isDisabled?: boolean;
73
- isIndeterminate?: boolean;
74
- isInvalid?: boolean;
75
- isRequired?: boolean;
76
- label?: React_2.ReactChild;
77
- name?: string;
78
- onChange?: (
79
- e: React_2.ChangeEvent<HTMLInputElement>,
80
- analyticsEvent: UIAnalyticsEvent,
81
- ) => void;
82
- value?: number | string;
83
- size?: Size;
84
- testId?: string;
85
- analyticsContext?: Record<string, any>;
67
+ defaultChecked?: boolean;
68
+ id?: string;
69
+ isChecked?: boolean;
70
+ isDisabled?: boolean;
71
+ isIndeterminate?: boolean;
72
+ isInvalid?: boolean;
73
+ isRequired?: boolean;
74
+ label?: React_2.ReactChild;
75
+ name?: string;
76
+ onChange?: (e: React_2.ChangeEvent<HTMLInputElement>, analyticsEvent: UIAnalyticsEvent) => void;
77
+ value?: number | string;
78
+ size?: Size;
79
+ testId?: string;
80
+ analyticsContext?: Record<string, any>;
86
81
  };
87
82
 
88
83
  // @public (undocumented)
@@ -99,7 +94,7 @@ type Size = 'large' | 'medium' | 'small' | 'xlarge';
99
94
 
100
95
  ```json
101
96
  {
102
- "react": "^16.8.0"
97
+ "react": "^16.8.0"
103
98
  }
104
99
  ```
105
100