@atlaskit/ds-explorations 4.2.0 → 4.3.1
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 +22 -0
- package/afm-jira/tsconfig.json +2 -3
- package/dist/cjs/components/interaction-surface.partial.js +1 -1
- package/dist/es2019/components/interaction-surface.partial.js +1 -1
- package/dist/esm/components/interaction-surface.partial.js +1 -1
- package/dist/types/components/interaction-surface.partial.d.ts +1 -1
- package/dist/types-ts4.5/components/interaction-surface.partial.d.ts +1 -1
- package/examples/99-interactions.tsx +1 -1
- package/package.json +5 -7
- package/src/components/__tests__/unit/interaction-suface.test.tsx +21 -27
- package/src/components/interaction-surface.partial.tsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/ds-explorations
|
|
2
2
|
|
|
3
|
+
## 4.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 4.3.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#127511](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/127511)
|
|
14
|
+
[`db30e29344013`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/db30e29344013) -
|
|
15
|
+
Widening range of `react` and `react-dom` peer dependencies from `^16.8.0 || ^17.0.0 || ~18.2.0`
|
|
16
|
+
to the wider range of ``^16.8.0 || ^17.0.0 || ^18.0.0` (where applicable).
|
|
17
|
+
|
|
18
|
+
This change has been done to enable usage of `react@18.3` as well as to have a consistent peer
|
|
19
|
+
dependency range for `react` and `react-dom` for `/platform` packages.
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 4.2.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/afm-jira/tsconfig.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "../../../../tsconfig.
|
|
2
|
+
"extends": "../../../../tsconfig.entry-points.jira.json",
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"target": "es5",
|
|
5
5
|
"outDir": "../../../../../tsDist/@atlaskit__ds-explorations/app",
|
|
6
6
|
"composite": true,
|
|
7
|
-
"rootDir": "../"
|
|
8
|
-
"baseUrl": "../"
|
|
7
|
+
"rootDir": "../"
|
|
9
8
|
},
|
|
10
9
|
"include": [
|
|
11
10
|
"../src/**/*.tsx"
|
|
@@ -9,8 +9,8 @@ var _react2 = require("@emotion/react");
|
|
|
9
9
|
var _surfaceProvider = require("./surface-provider");
|
|
10
10
|
/**
|
|
11
11
|
* @jsxRuntime classic
|
|
12
|
+
* @jsx jsx
|
|
12
13
|
*/
|
|
13
|
-
/** @jsx jsx */
|
|
14
14
|
|
|
15
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
16
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/ds-explorations",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.1",
|
|
4
4
|
"description": "DEPRECATED. Use @atlaskit/primitives. An experimental package for exploration and validation of spacing / typography foundations.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -16,8 +16,6 @@
|
|
|
16
16
|
"atlaskit:src": "src/index.tsx",
|
|
17
17
|
"atlassian": {
|
|
18
18
|
"team": "Design System Team",
|
|
19
|
-
"inPublicMirror": false,
|
|
20
|
-
"releaseModel": "continuous",
|
|
21
19
|
"runReact18": true
|
|
22
20
|
},
|
|
23
21
|
"scripts": {
|
|
@@ -26,18 +24,18 @@
|
|
|
26
24
|
"prepare": "yarn ak-postbuild"
|
|
27
25
|
},
|
|
28
26
|
"dependencies": {
|
|
29
|
-
"@atlaskit/tokens": "^
|
|
27
|
+
"@atlaskit/tokens": "^2.0.0",
|
|
30
28
|
"@babel/runtime": "^7.0.0",
|
|
31
29
|
"@emotion/react": "^11.7.1"
|
|
32
30
|
},
|
|
33
31
|
"peerDependencies": {
|
|
34
|
-
"react": "^16.8.0 || ^17.0.0 ||
|
|
32
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
|
35
33
|
},
|
|
36
34
|
"devDependencies": {
|
|
37
35
|
"@af/formatting": "*",
|
|
38
36
|
"@atlaskit/ds-lib": "*",
|
|
39
|
-
"@atlaskit/primitives": "^
|
|
40
|
-
"@atlaskit/textfield": "^6.
|
|
37
|
+
"@atlaskit/primitives": "^12.2.0",
|
|
38
|
+
"@atlaskit/textfield": "^6.5.0",
|
|
41
39
|
"@atlaskit/visual-regression": "*",
|
|
42
40
|
"@atlassian/codegen": "^0.1.0",
|
|
43
41
|
"@testing-library/react": "^12.1.5",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { fireEvent, render, screen } from '@testing-library/react';
|
|
4
4
|
|
|
5
5
|
import { Box, Text } from '@atlaskit/primitives';
|
|
6
6
|
import { token } from '@atlaskit/tokens';
|
|
@@ -9,33 +9,31 @@ import { UNSAFE_InteractionSurface as InteractionSurface } from '../../../index'
|
|
|
9
9
|
|
|
10
10
|
describe('InteractionSurface component', () => {
|
|
11
11
|
it('should render by itself', () => {
|
|
12
|
-
|
|
12
|
+
render(
|
|
13
13
|
<InteractionSurface testId="basic">
|
|
14
14
|
<></>
|
|
15
15
|
</InteractionSurface>,
|
|
16
16
|
);
|
|
17
|
-
expect(getByTestId('basic')).toBeInTheDocument();
|
|
17
|
+
expect(screen.getByTestId('basic')).toBeInTheDocument();
|
|
18
18
|
});
|
|
19
19
|
it('should render given a neutral hover interaction by default', () => {
|
|
20
|
-
|
|
20
|
+
render(
|
|
21
21
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
22
22
|
<div style={{ position: 'relative' }}>
|
|
23
23
|
<InteractionSurface testId="surface">hello</InteractionSurface>
|
|
24
24
|
</div>,
|
|
25
25
|
);
|
|
26
26
|
|
|
27
|
-
const surfaceElement = getByTestId('surface');
|
|
27
|
+
const surfaceElement = screen.getByTestId('surface');
|
|
28
28
|
expect(getComputedStyle(surfaceElement).backgroundColor).toBe('');
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
);
|
|
34
|
-
});
|
|
29
|
+
fireEvent.mouseOver(surfaceElement);
|
|
30
|
+
expect(surfaceElement).toHaveStyle(
|
|
31
|
+
`background-color: ${token('color.background.neutral.bold.hovered')}`,
|
|
32
|
+
);
|
|
35
33
|
});
|
|
36
34
|
|
|
37
35
|
it('should render given a brand hover interaction by if set as brand', () => {
|
|
38
|
-
|
|
36
|
+
render(
|
|
39
37
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
40
38
|
<div style={{ position: 'relative' }}>
|
|
41
39
|
<InteractionSurface appearance="brand.bold" testId="surface">
|
|
@@ -44,18 +42,16 @@ describe('InteractionSurface component', () => {
|
|
|
44
42
|
</div>,
|
|
45
43
|
);
|
|
46
44
|
|
|
47
|
-
const surfaceElement = getByTestId('surface');
|
|
45
|
+
const surfaceElement = screen.getByTestId('surface');
|
|
48
46
|
expect(getComputedStyle(surfaceElement).backgroundColor).toBe('');
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
);
|
|
54
|
-
});
|
|
47
|
+
fireEvent.mouseOver(surfaceElement);
|
|
48
|
+
expect(surfaceElement).toHaveStyle(
|
|
49
|
+
`background-color: ${token('color.background.brand.bold.hovered')}`,
|
|
50
|
+
);
|
|
55
51
|
});
|
|
56
52
|
|
|
57
53
|
it('should render an inherited hover state if a Box context is present', () => {
|
|
58
|
-
|
|
54
|
+
render(
|
|
59
55
|
<Box backgroundColor="color.background.brand.bold">
|
|
60
56
|
<InteractionSurface testId="surface">
|
|
61
57
|
<Text>hello</Text>
|
|
@@ -63,13 +59,11 @@ describe('InteractionSurface component', () => {
|
|
|
63
59
|
</Box>,
|
|
64
60
|
);
|
|
65
61
|
|
|
66
|
-
const surfaceElement = getByTestId('surface');
|
|
62
|
+
const surfaceElement = screen.getByTestId('surface');
|
|
67
63
|
expect(getComputedStyle(surfaceElement).backgroundColor).toBe('');
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
);
|
|
73
|
-
});
|
|
64
|
+
fireEvent.mouseOver(surfaceElement);
|
|
65
|
+
expect(surfaceElement).toHaveStyle(
|
|
66
|
+
`background-color: ${token('color.background.brand.bold.hovered')}`,
|
|
67
|
+
);
|
|
74
68
|
});
|
|
75
69
|
});
|