@atlaskit/checkbox 15.2.4 → 15.3.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 +20 -0
- package/dist/cjs/checkbox.js +1 -1
- package/dist/es2019/checkbox.js +1 -1
- package/dist/esm/checkbox.js +1 -1
- package/dist/types/checkbox.d.ts +37 -2
- package/dist/types/types.d.ts +1 -1
- package/dist/types-ts4.5/checkbox.d.ts +37 -2
- package/dist/types-ts4.5/types.d.ts +1 -1
- package/package.json +16 -11
- package/__perf__/checkbox.tsx +0 -70
- package/__perf__/default.tsx +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/checkbox
|
|
2
2
|
|
|
3
|
+
## 15.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#109060](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/109060)
|
|
8
|
+
[`4660ec858a305`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4660ec858a305) -
|
|
9
|
+
Update `React` from v16 to v18
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 15.2.5
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#105597](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105597)
|
|
20
|
+
[`8713842724537`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8713842724537) -
|
|
21
|
+
Update dependencies and remove unused internal exports.
|
|
22
|
+
|
|
3
23
|
## 15.2.4
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/dist/cjs/checkbox.js
CHANGED
|
@@ -196,7 +196,7 @@ var Checkbox = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef
|
|
|
196
196
|
analyticsData: analyticsContext,
|
|
197
197
|
componentName: 'checkbox',
|
|
198
198
|
packageName: "@atlaskit/checkbox",
|
|
199
|
-
packageVersion: "15.
|
|
199
|
+
packageVersion: "15.3.0"
|
|
200
200
|
});
|
|
201
201
|
var internalRef = (0, _react.useRef)(null);
|
|
202
202
|
var mergedRefs = (0, _mergeRefs.default)([internalRef, ref]);
|
package/dist/es2019/checkbox.js
CHANGED
|
@@ -182,7 +182,7 @@ const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Checkbox(pr
|
|
|
182
182
|
analyticsData: analyticsContext,
|
|
183
183
|
componentName: 'checkbox',
|
|
184
184
|
packageName: "@atlaskit/checkbox",
|
|
185
|
-
packageVersion: "15.
|
|
185
|
+
packageVersion: "15.3.0"
|
|
186
186
|
});
|
|
187
187
|
const internalRef = useRef(null);
|
|
188
188
|
const mergedRefs = mergeRefs([internalRef, ref]);
|
package/dist/esm/checkbox.js
CHANGED
|
@@ -190,7 +190,7 @@ var Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Checkbox(prop
|
|
|
190
190
|
analyticsData: analyticsContext,
|
|
191
191
|
componentName: 'checkbox',
|
|
192
192
|
packageName: "@atlaskit/checkbox",
|
|
193
|
-
packageVersion: "15.
|
|
193
|
+
packageVersion: "15.3.0"
|
|
194
194
|
});
|
|
195
195
|
var internalRef = useRef(null);
|
|
196
196
|
var mergedRefs = mergeRefs([internalRef, ref]);
|
package/dist/types/checkbox.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { type ChangeEvent } from 'react';
|
|
6
|
+
import type UIAnalyticsEvent from '@atlaskit/analytics-next/UIAnalyticsEvent';
|
|
2
7
|
/**
|
|
3
8
|
* __Checkbox__
|
|
4
9
|
*
|
|
@@ -8,5 +13,35 @@
|
|
|
8
13
|
* - [Code](https://atlassian.design/components/checkbox/code)
|
|
9
14
|
* - [Usage](https://atlassian.design/components/checkbox/usage)
|
|
10
15
|
*/
|
|
11
|
-
declare const Checkbox: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "css" | "disabled" | "required" | "checked">, keyof
|
|
16
|
+
declare const Checkbox: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "css" | "disabled" | "required" | "checked">, keyof {
|
|
17
|
+
defaultChecked?: boolean | undefined;
|
|
18
|
+
id?: string | undefined;
|
|
19
|
+
isChecked?: boolean | undefined;
|
|
20
|
+
isDisabled?: boolean | undefined;
|
|
21
|
+
isIndeterminate?: boolean | undefined;
|
|
22
|
+
isInvalid?: boolean | undefined;
|
|
23
|
+
isRequired?: boolean | undefined;
|
|
24
|
+
label?: import("react").ReactChild | undefined;
|
|
25
|
+
name?: string | undefined;
|
|
26
|
+
onChange?: ((e: ChangeEvent<HTMLInputElement>, analyticsEvent: UIAnalyticsEvent) => void) | undefined;
|
|
27
|
+
value?: string | number | undefined;
|
|
28
|
+
testId?: string | undefined;
|
|
29
|
+
analyticsContext?: Record<string, any> | undefined;
|
|
30
|
+
xcss?: import("@atlaskit/css").StrictXCSSProp<"alignItems", never>;
|
|
31
|
+
}> & {
|
|
32
|
+
defaultChecked?: boolean | undefined;
|
|
33
|
+
id?: string | undefined;
|
|
34
|
+
isChecked?: boolean | undefined;
|
|
35
|
+
isDisabled?: boolean | undefined;
|
|
36
|
+
isIndeterminate?: boolean | undefined;
|
|
37
|
+
isInvalid?: boolean | undefined;
|
|
38
|
+
isRequired?: boolean | undefined;
|
|
39
|
+
label?: import("react").ReactChild | undefined;
|
|
40
|
+
name?: string | undefined;
|
|
41
|
+
onChange?: ((e: ChangeEvent<HTMLInputElement>, analyticsEvent: UIAnalyticsEvent) => void) | undefined;
|
|
42
|
+
value?: string | number | undefined;
|
|
43
|
+
testId?: string | undefined;
|
|
44
|
+
analyticsContext?: Record<string, any> | undefined;
|
|
45
|
+
xcss?: import("@atlaskit/css").StrictXCSSProp<"alignItems", never>;
|
|
46
|
+
} & import("react").RefAttributes<HTMLInputElement>>>;
|
|
12
47
|
export default Checkbox;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { type ChangeEvent } from 'react';
|
|
6
|
+
import type UIAnalyticsEvent from '@atlaskit/analytics-next/UIAnalyticsEvent';
|
|
2
7
|
/**
|
|
3
8
|
* __Checkbox__
|
|
4
9
|
*
|
|
@@ -8,5 +13,35 @@
|
|
|
8
13
|
* - [Code](https://atlassian.design/components/checkbox/code)
|
|
9
14
|
* - [Usage](https://atlassian.design/components/checkbox/usage)
|
|
10
15
|
*/
|
|
11
|
-
declare const Checkbox: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "css" | "disabled" | "required" | "checked">, keyof
|
|
16
|
+
declare const Checkbox: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "css" | "disabled" | "required" | "checked">, keyof {
|
|
17
|
+
defaultChecked?: boolean | undefined;
|
|
18
|
+
id?: string | undefined;
|
|
19
|
+
isChecked?: boolean | undefined;
|
|
20
|
+
isDisabled?: boolean | undefined;
|
|
21
|
+
isIndeterminate?: boolean | undefined;
|
|
22
|
+
isInvalid?: boolean | undefined;
|
|
23
|
+
isRequired?: boolean | undefined;
|
|
24
|
+
label?: import("react").ReactChild | undefined;
|
|
25
|
+
name?: string | undefined;
|
|
26
|
+
onChange?: ((e: ChangeEvent<HTMLInputElement>, analyticsEvent: UIAnalyticsEvent) => void) | undefined;
|
|
27
|
+
value?: string | number | undefined;
|
|
28
|
+
testId?: string | undefined;
|
|
29
|
+
analyticsContext?: Record<string, any> | undefined;
|
|
30
|
+
xcss?: import("@atlaskit/css").StrictXCSSProp<"alignItems", never>;
|
|
31
|
+
}> & {
|
|
32
|
+
defaultChecked?: boolean | undefined;
|
|
33
|
+
id?: string | undefined;
|
|
34
|
+
isChecked?: boolean | undefined;
|
|
35
|
+
isDisabled?: boolean | undefined;
|
|
36
|
+
isIndeterminate?: boolean | undefined;
|
|
37
|
+
isInvalid?: boolean | undefined;
|
|
38
|
+
isRequired?: boolean | undefined;
|
|
39
|
+
label?: import("react").ReactChild | undefined;
|
|
40
|
+
name?: string | undefined;
|
|
41
|
+
onChange?: ((e: ChangeEvent<HTMLInputElement>, analyticsEvent: UIAnalyticsEvent) => void) | undefined;
|
|
42
|
+
value?: string | number | undefined;
|
|
43
|
+
testId?: string | undefined;
|
|
44
|
+
analyticsContext?: Record<string, any> | undefined;
|
|
45
|
+
xcss?: import("@atlaskit/css").StrictXCSSProp<"alignItems", never>;
|
|
46
|
+
} & import("react").RefAttributes<HTMLInputElement>>>;
|
|
12
47
|
export default Checkbox;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/checkbox",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.3.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/"
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
".": "./src/index.tsx"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@atlaskit/analytics-next": "^10.
|
|
40
|
-
"@atlaskit/css": "^0.
|
|
41
|
-
"@atlaskit/ds-lib": "^3.
|
|
42
|
-
"@atlaskit/icon": "^23.
|
|
43
|
-
"@atlaskit/platform-feature-flags": "
|
|
44
|
-
"@atlaskit/theme": "^14.
|
|
45
|
-
"@atlaskit/tokens": "^3.
|
|
39
|
+
"@atlaskit/analytics-next": "^10.3.0",
|
|
40
|
+
"@atlaskit/css": "^0.8.0",
|
|
41
|
+
"@atlaskit/ds-lib": "^3.5.0",
|
|
42
|
+
"@atlaskit/icon": "^23.5.0",
|
|
43
|
+
"@atlaskit/platform-feature-flags": "*",
|
|
44
|
+
"@atlaskit/theme": "^14.1.0",
|
|
45
|
+
"@atlaskit/tokens": "^3.3.0",
|
|
46
46
|
"@babel/runtime": "^7.0.0",
|
|
47
47
|
"@emotion/react": "^11.7.1"
|
|
48
48
|
},
|
|
@@ -53,14 +53,19 @@
|
|
|
53
53
|
"@af/accessibility-testing": "*",
|
|
54
54
|
"@af/integration-testing": "*",
|
|
55
55
|
"@af/visual-regression": "*",
|
|
56
|
-
"@atlaskit/
|
|
56
|
+
"@atlaskit/button": "^20.4.0",
|
|
57
|
+
"@atlaskit/docs": "*",
|
|
58
|
+
"@atlaskit/form": "^11.1.0",
|
|
59
|
+
"@atlaskit/link": "*",
|
|
60
|
+
"@atlaskit/primitives": "^13.4.0",
|
|
61
|
+
"@atlaskit/section-message": "*",
|
|
57
62
|
"@atlaskit/ssr": "*",
|
|
58
63
|
"@atlaskit/visual-regression": "*",
|
|
59
64
|
"@atlassian/feature-flags-test-utils": "*",
|
|
60
65
|
"@compiled/react": "^0.18.1",
|
|
61
|
-
"@testing-library/react": "^
|
|
66
|
+
"@testing-library/react": "^13.4.0",
|
|
62
67
|
"jscodeshift": "^0.13.0",
|
|
63
|
-
"react-dom": "^
|
|
68
|
+
"react-dom": "^18.2.0",
|
|
64
69
|
"storybook-addon-performance": "^0.17.3",
|
|
65
70
|
"typescript": "~5.4.2"
|
|
66
71
|
},
|
package/__perf__/checkbox.tsx
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { fireEvent } from '@testing-library/react';
|
|
4
|
-
import { type InteractionTaskArgs, type PublicInteractionTask } from 'storybook-addon-performance';
|
|
5
|
-
|
|
6
|
-
import { Checkbox } from '../src';
|
|
7
|
-
|
|
8
|
-
const interactionTasks: PublicInteractionTask[] = [
|
|
9
|
-
{
|
|
10
|
-
name: 'Select checkbox',
|
|
11
|
-
description: 'Select checkbox',
|
|
12
|
-
run: async ({ container, controls }: InteractionTaskArgs): Promise<void> => {
|
|
13
|
-
const checkbox: HTMLElement | null = container.querySelector('input[name="checkbox-basic"]');
|
|
14
|
-
if (checkbox == null) {
|
|
15
|
-
throw new Error('Could not find checkbox element');
|
|
16
|
-
}
|
|
17
|
-
await controls.time(async () => {
|
|
18
|
-
fireEvent.click(checkbox);
|
|
19
|
-
});
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
name: 'Hover checkbox',
|
|
24
|
-
description: 'Hover checkbox',
|
|
25
|
-
run: async ({ container, controls }: InteractionTaskArgs): Promise<void> => {
|
|
26
|
-
const checkbox: HTMLElement | null = container.querySelector('input[name="checkbox-basic"]');
|
|
27
|
-
if (checkbox == null) {
|
|
28
|
-
throw new Error('Could not find checkbox element');
|
|
29
|
-
}
|
|
30
|
-
await controls.time(async () => {
|
|
31
|
-
fireEvent.mouseOver(checkbox);
|
|
32
|
-
});
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
name: 'Focus checkbox',
|
|
37
|
-
description: 'Focus checkbox',
|
|
38
|
-
run: async ({ container, controls }: InteractionTaskArgs): Promise<void> => {
|
|
39
|
-
const checkbox: HTMLElement | null = container.querySelector('input[name="checkbox-basic"]');
|
|
40
|
-
if (checkbox == null) {
|
|
41
|
-
throw new Error('Could not find checkbox element');
|
|
42
|
-
}
|
|
43
|
-
await controls.time(async () => {
|
|
44
|
-
fireEvent.focus(checkbox);
|
|
45
|
-
});
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
];
|
|
49
|
-
|
|
50
|
-
function PerformanceComponent() {
|
|
51
|
-
return (
|
|
52
|
-
<Checkbox
|
|
53
|
-
value="Basic checkbox"
|
|
54
|
-
label="Basic checkbox"
|
|
55
|
-
name="checkbox-basic"
|
|
56
|
-
testId="cb-basic"
|
|
57
|
-
/>
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
PerformanceComponent.story = {
|
|
62
|
-
name: 'Performance',
|
|
63
|
-
parameters: {
|
|
64
|
-
performance: {
|
|
65
|
-
interactions: interactionTasks,
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
export default PerformanceComponent;
|
package/__perf__/default.tsx
DELETED