@atlaskit/pragmatic-drag-and-drop-react-accessibility 1.1.4 → 1.1.6
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 +12 -0
- package/LICENSE.md +6 -8
- package/constellation/drag-handle-button/about.mdx +7 -9
- package/constellation/index/about.mdx +3 -1
- package/dist/cjs/drag-handle-button-base.js +2 -4
- package/dist/es2019/drag-handle-button-base.js +3 -4
- package/dist/esm/drag-handle-button-base.js +3 -4
- package/package.json +94 -94
- package/report.api.md +3 -2
package/CHANGELOG.md
CHANGED
package/LICENSE.md
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
Copyright 2023 Atlassian Pty Ltd
|
|
2
2
|
|
|
3
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
|
|
5
|
-
You may obtain a copy of the License at
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
|
|
4
|
+
compliance with the License. You may obtain a copy of the License at
|
|
6
5
|
|
|
7
6
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
7
|
|
|
9
|
-
Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
distributed
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
limitations under the License.
|
|
8
|
+
Unless required by applicable law or agreed to in writing, software distributed under the License is
|
|
9
|
+
distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
10
|
+
implied. See the License for the specific language governing permissions and limitations under the
|
|
11
|
+
License.
|
|
@@ -12,10 +12,9 @@ import DragHandleButtonSmallExample from '../../examples/drag-handle-button-smal
|
|
|
12
12
|
import DragHandleDropdownMenuExample from '../../examples/drag-handle-dropdown-menu';
|
|
13
13
|
|
|
14
14
|
<SectionMessage appearance="warning">
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<Code><button></Code> element.
|
|
15
|
+
This component does not use the <Code>@atlaskit/button</Code> component, because{' '}
|
|
16
|
+
<Code>@atlaskit/button</Code> cancels <Code>mousedown</Code> events and prevents dragging from
|
|
17
|
+
occurring. Instead this component uses a native <Code><button></Code> element.
|
|
19
18
|
</SectionMessage>
|
|
20
19
|
|
|
21
20
|
## Default
|
|
@@ -26,8 +25,8 @@ import DragHandleDropdownMenuExample from '../../examples/drag-handle-dropdown-m
|
|
|
26
25
|
|
|
27
26
|
A small variant is available through the `/drag-handle-button-small` entrypoint.
|
|
28
27
|
|
|
29
|
-
It is intended for experiences with very limited space to accomodate a drag handle.
|
|
30
|
-
|
|
28
|
+
It is intended for experiences with very limited space to accomodate a drag handle. It is not
|
|
29
|
+
recommended for general use due to the small target size.
|
|
31
30
|
|
|
32
31
|
<Example Component={DragHandleButtonSmallExample} />
|
|
33
32
|
|
|
@@ -35,8 +34,7 @@ It is not recommended for general use due to the small target size.
|
|
|
35
34
|
|
|
36
35
|
This component can be composed with [Dropdown menu](/components/dropdown-menu).
|
|
37
36
|
|
|
38
|
-
Because the Dropdown menu provides a `triggerRef` you will need to merge it
|
|
39
|
-
|
|
40
|
-
`draggable()` registration.
|
|
37
|
+
Because the Dropdown menu provides a `triggerRef` you will need to merge it with your own ref in
|
|
38
|
+
order to use the trigger as the `dragHandle` in your `draggable()` registration.
|
|
41
39
|
|
|
42
40
|
<Example Component={DragHandleDropdownMenuExample} />
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
order: 0
|
|
3
3
|
title: React accessibility
|
|
4
|
-
description:
|
|
4
|
+
description:
|
|
5
|
+
An optional package for Pragmatic drag and drop containing react components to assist with setting
|
|
6
|
+
up accessible experiences
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
import SectionMessage from '@atlaskit/section-message';
|
|
@@ -12,6 +12,7 @@ var _react2 = require("@emotion/react");
|
|
|
12
12
|
var _focusRing = _interopRequireDefault(require("@atlaskit/focus-ring"));
|
|
13
13
|
var _excluded = ["children", "isSelected", "testId", "appearance", "type"];
|
|
14
14
|
/** @jsx jsx */
|
|
15
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
15
16
|
/**
|
|
16
17
|
* Cannot use `@atlaskit/button` here because it cancels `mousedown` events
|
|
17
18
|
* which prevents dragging.
|
|
@@ -68,10 +69,7 @@ var DragHandleButtonBase = exports.DragHandleButtonBase = /*#__PURE__*/(0, _reac
|
|
|
68
69
|
buttonProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
69
70
|
var appearance = isSelected ? 'selected' : appearanceProp;
|
|
70
71
|
return (0, _react2.jsx)(_focusRing.default, null, (0, _react2.jsx)("button", (0, _extends2.default)({
|
|
71
|
-
ref: ref
|
|
72
|
-
// @ts-ignore - This was added when `@atlaskit/pragmatic-drag-and-drop-react-accessibility` was enrolled into JFE local consumption
|
|
73
|
-
// There seems to be an incompatibility in the `css` prop between jira and platform
|
|
74
|
-
,
|
|
72
|
+
ref: ref,
|
|
75
73
|
css: [buttonStyles, buttonAppearanceStyles[appearance]],
|
|
76
74
|
"data-testid": testId,
|
|
77
75
|
type: type
|
|
@@ -2,6 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
7
|
import { css, jsx } from '@emotion/react';
|
|
6
8
|
import FocusRing from '@atlaskit/focus-ring';
|
|
7
9
|
/**
|
|
@@ -67,10 +69,7 @@ export const DragHandleButtonBase = /*#__PURE__*/forwardRef(function DragHandleB
|
|
|
67
69
|
}, ref) {
|
|
68
70
|
const appearance = isSelected ? 'selected' : appearanceProp;
|
|
69
71
|
return jsx(FocusRing, null, jsx("button", _extends({
|
|
70
|
-
ref: ref
|
|
71
|
-
// @ts-ignore - This was added when `@atlaskit/pragmatic-drag-and-drop-react-accessibility` was enrolled into JFE local consumption
|
|
72
|
-
// There seems to be an incompatibility in the `css` prop between jira and platform
|
|
73
|
-
,
|
|
72
|
+
ref: ref,
|
|
74
73
|
css: [buttonStyles, buttonAppearanceStyles[appearance]],
|
|
75
74
|
"data-testid": testId,
|
|
76
75
|
type: type
|
|
@@ -4,6 +4,8 @@ var _excluded = ["children", "isSelected", "testId", "appearance", "type"];
|
|
|
4
4
|
/** @jsx jsx */
|
|
5
5
|
|
|
6
6
|
import { forwardRef } from 'react';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
9
|
import { css, jsx } from '@emotion/react';
|
|
8
10
|
import FocusRing from '@atlaskit/focus-ring';
|
|
9
11
|
/**
|
|
@@ -62,10 +64,7 @@ export var DragHandleButtonBase = /*#__PURE__*/forwardRef(function DragHandleBut
|
|
|
62
64
|
buttonProps = _objectWithoutProperties(_ref, _excluded);
|
|
63
65
|
var appearance = isSelected ? 'selected' : appearanceProp;
|
|
64
66
|
return jsx(FocusRing, null, jsx("button", _extends({
|
|
65
|
-
ref: ref
|
|
66
|
-
// @ts-ignore - This was added when `@atlaskit/pragmatic-drag-and-drop-react-accessibility` was enrolled into JFE local consumption
|
|
67
|
-
// There seems to be an incompatibility in the `css` prop between jira and platform
|
|
68
|
-
,
|
|
67
|
+
ref: ref,
|
|
69
68
|
css: [buttonStyles, buttonAppearanceStyles[appearance]],
|
|
70
69
|
"data-testid": testId,
|
|
71
70
|
type: type
|
package/package.json
CHANGED
|
@@ -1,95 +1,95 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
2
|
+
"name": "@atlaskit/pragmatic-drag-and-drop-react-accessibility",
|
|
3
|
+
"version": "1.1.6",
|
|
4
|
+
"description": "An optional package for Pragmatic drag and drop containing react components to assist with setting up accessible experiences",
|
|
5
|
+
"author": "Atlassian Pty Ltd",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"registry": "https://registry.npmjs.org/"
|
|
9
|
+
},
|
|
10
|
+
"atlassian": {
|
|
11
|
+
"team": "Design System Team",
|
|
12
|
+
"inPublicMirror": false,
|
|
13
|
+
"releaseModel": "continuous",
|
|
14
|
+
"website": {
|
|
15
|
+
"name": "React accessibility",
|
|
16
|
+
"category": "Libraries"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"repository": "https://github.com/atlassian/pragmatic-drag-and-drop",
|
|
20
|
+
"homepage": "https://atlassian.design/components/pragmatic-drag-and-drop/",
|
|
21
|
+
"main": "dist/cjs/index.js",
|
|
22
|
+
"module": "dist/esm/index.js",
|
|
23
|
+
"module:es2019": "dist/es2019/index.js",
|
|
24
|
+
"types": "dist/types/index.d.ts",
|
|
25
|
+
"typesVersions": {
|
|
26
|
+
">=4.5 <4.9": {
|
|
27
|
+
"*": [
|
|
28
|
+
"dist/types-ts4.5/*",
|
|
29
|
+
"dist/types-ts4.5/index.d.ts"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"sideEffects": false,
|
|
34
|
+
"atlaskit:src": "src/index.tsx",
|
|
35
|
+
"af:exports": {
|
|
36
|
+
"./drag-handle-button": "./src/drag-handle-button.tsx",
|
|
37
|
+
"./drag-handle-button-small": "./src/drag-handle-button-small.tsx"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@atlaskit/focus-ring": "^1.5.0",
|
|
41
|
+
"@atlaskit/icon": "^22.4.0",
|
|
42
|
+
"@atlaskit/primitives": "^8.0.0",
|
|
43
|
+
"@atlaskit/tokens": "^1.51.0",
|
|
44
|
+
"@babel/runtime": "^7.0.0",
|
|
45
|
+
"@emotion/react": "^11.7.1"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@af/visual-regression": "*",
|
|
52
|
+
"@atlaskit/ds-lib": "^2.3.0",
|
|
53
|
+
"@atlaskit/ssr": "*",
|
|
54
|
+
"@atlaskit/visual-regression": "*",
|
|
55
|
+
"@testing-library/react": "^12.1.5",
|
|
56
|
+
"react-dom": "^16.8.0",
|
|
57
|
+
"typescript": "~5.4.2",
|
|
58
|
+
"wait-for-expect": "^1.2.0"
|
|
59
|
+
},
|
|
60
|
+
"techstack": {
|
|
61
|
+
"@atlassian/frontend": {
|
|
62
|
+
"import-structure": [
|
|
63
|
+
"atlassian-conventions"
|
|
64
|
+
],
|
|
65
|
+
"circular-dependencies": [
|
|
66
|
+
"file-and-folder-level"
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
"@repo/internal": {
|
|
70
|
+
"dom-events": "use-bind-event-listener",
|
|
71
|
+
"analytics": [
|
|
72
|
+
"analytics-next"
|
|
73
|
+
],
|
|
74
|
+
"design-tokens": [
|
|
75
|
+
"color"
|
|
76
|
+
],
|
|
77
|
+
"theming": [
|
|
78
|
+
"react-context"
|
|
79
|
+
],
|
|
80
|
+
"ui-components": [
|
|
81
|
+
"lite-mode"
|
|
82
|
+
],
|
|
83
|
+
"deprecation": [
|
|
84
|
+
"no-deprecated-imports"
|
|
85
|
+
],
|
|
86
|
+
"styling": [
|
|
87
|
+
"static",
|
|
88
|
+
"emotion"
|
|
89
|
+
],
|
|
90
|
+
"imports": [
|
|
91
|
+
"import-no-extraneous-disable-for-examples-and-docs"
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
package/report.api.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## API Report File for "@atlaskit/pragmatic-drag-and-drop-react-accessibility"
|
|
4
4
|
|
|
5
|
-
> Do not edit this file. This report is auto-generated using
|
|
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
|
|
@@ -30,7 +31,7 @@ export default _default;
|
|
|
30
31
|
|
|
31
32
|
```json
|
|
32
33
|
{
|
|
33
|
-
|
|
34
|
+
"react": "^16.8.0"
|
|
34
35
|
}
|
|
35
36
|
```
|
|
36
37
|
|