@atlaskit/item
Advanced tools
Comparing version 10.1.6 to 10.2.0
# @atlaskit/item | ||
## 10.2.0 | ||
### Minor Changes | ||
- [minor][24865cfaff](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/24865cfaff): | ||
Allowing support for using with new react-beautiful-dnd 12.x API | ||
### Patch Changes | ||
- Updated dependencies [24865cfaff](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/24865cfaff): | ||
- Updated dependencies [24865cfaff](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/24865cfaff): | ||
- Updated dependencies [24865cfaff](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/24865cfaff): | ||
- @atlaskit/tooltip@15.2.0 | ||
- @atlaskit/avatar@17.1.5 | ||
## 10.1.6 | ||
@@ -4,0 +20,0 @@ |
@@ -95,17 +95,4 @@ "use strict"; | ||
onClick: function onClick(event) { | ||
var original = function original() { | ||
if (!isDisabled && _onClick) { | ||
_onClick(event); | ||
} | ||
}; | ||
if (!dragHandleProps || !dragHandleProps.onClick) { | ||
original(); | ||
return; | ||
} // Drag and drop has its own disabled mechansim | ||
// So not checking for isDisabled | ||
dragHandleProps.onClick(event); // if default is prevent - do not fire the onClick prop | ||
// rbd will use event.preventDefault() to block clicks that are used | ||
// as a part of the drag and drop lifecycle. | ||
if (event.defaultPrevented) { | ||
@@ -115,5 +102,8 @@ return; | ||
original(); | ||
if (!isDisabled && _onClick) { | ||
_onClick(event); | ||
} | ||
}, | ||
onMouseDown: function onMouseDown(event) { | ||
// rbd 11.x support | ||
if (dragHandleProps && dragHandleProps.onMouseDown) { | ||
@@ -127,25 +117,29 @@ dragHandleProps.onMouseDown(event); | ||
onKeyDown: function onKeyDown(event) { | ||
var original = function original() { | ||
if (!isDisabled && _onKeyDown) { | ||
_onKeyDown(event); | ||
} | ||
}; | ||
if (!dragHandleProps || !dragHandleProps.onKeyDown) { | ||
original(); | ||
// swallowing keyboard events on the element while dragging | ||
// rbd should already be doing this - but we are being really clear here | ||
if (isDragging) { | ||
return; | ||
} | ||
} // rbd 11.x support | ||
dragHandleProps.onKeyDown(event); // if default is prevent - do not fire other handlers | ||
if (dragHandleProps && dragHandleProps.onKeyDown) { | ||
dragHandleProps.onKeyDown(event); | ||
} // if default is prevented - do not fire other handlers | ||
// this can happen if the event is used for drag and drop by rbd | ||
if (event.defaultPrevented) { | ||
return; | ||
} // not allowing keyboard events on the element while dragging | ||
} // swallowing event if disabled | ||
if (isDragging) { | ||
if (isDisabled) { | ||
return; | ||
} | ||
original(); | ||
if (!_onKeyDown) { | ||
return; | ||
} | ||
_onKeyDown(event); | ||
} | ||
@@ -155,4 +149,5 @@ }; | ||
var patchedInnerRef = function patchedInnerRef(ref) { | ||
_this2.setRef(ref); | ||
_this2.setRef(ref); // give rbd the inner ref too | ||
if (dnd && dnd.innerRef) { | ||
@@ -159,0 +154,0 @@ dnd.innerRef(ref); |
@@ -14,2 +14,6 @@ "use strict"; | ||
// TEMPORARY | ||
// if you change the themeNamespace below, ensure you also change it | ||
// in @atlaskit/atlassian/navigation/src/theme/_itemTheme.ts | ||
// https://ecosystem.atlassian.net/browse/DS-6794 | ||
var themeNamespace = '@atlaskit-shared-theme/item'; // Used for Group titles and Item descriptions | ||
@@ -16,0 +20,0 @@ |
{ | ||
"name": "@atlaskit/item", | ||
"version": "10.1.6", | ||
"version": "10.2.0", | ||
"sideEffects": false | ||
} |
@@ -79,17 +79,4 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
onClick: function onClick(event) { | ||
var original = function original() { | ||
if (!isDisabled && _onClick) { | ||
_onClick(event); | ||
} | ||
}; | ||
if (!dragHandleProps || !dragHandleProps.onClick) { | ||
original(); | ||
return; | ||
} // Drag and drop has its own disabled mechansim | ||
// So not checking for isDisabled | ||
dragHandleProps.onClick(event); // if default is prevent - do not fire the onClick prop | ||
// rbd will use event.preventDefault() to block clicks that are used | ||
// as a part of the drag and drop lifecycle. | ||
if (event.defaultPrevented) { | ||
@@ -99,5 +86,8 @@ return; | ||
original(); | ||
if (!isDisabled && _onClick) { | ||
_onClick(event); | ||
} | ||
}, | ||
onMouseDown: function onMouseDown(event) { | ||
// rbd 11.x support | ||
if (dragHandleProps && dragHandleProps.onMouseDown) { | ||
@@ -111,25 +101,29 @@ dragHandleProps.onMouseDown(event); | ||
onKeyDown: function onKeyDown(event) { | ||
var original = function original() { | ||
if (!isDisabled && _onKeyDown) { | ||
_onKeyDown(event); | ||
} | ||
}; | ||
if (!dragHandleProps || !dragHandleProps.onKeyDown) { | ||
original(); | ||
// swallowing keyboard events on the element while dragging | ||
// rbd should already be doing this - but we are being really clear here | ||
if (isDragging) { | ||
return; | ||
} | ||
} // rbd 11.x support | ||
dragHandleProps.onKeyDown(event); // if default is prevent - do not fire other handlers | ||
if (dragHandleProps && dragHandleProps.onKeyDown) { | ||
dragHandleProps.onKeyDown(event); | ||
} // if default is prevented - do not fire other handlers | ||
// this can happen if the event is used for drag and drop by rbd | ||
if (event.defaultPrevented) { | ||
return; | ||
} // not allowing keyboard events on the element while dragging | ||
} // swallowing event if disabled | ||
if (isDragging) { | ||
if (isDisabled) { | ||
return; | ||
} | ||
original(); | ||
if (!_onKeyDown) { | ||
return; | ||
} | ||
_onKeyDown(event); | ||
} | ||
@@ -139,4 +133,5 @@ }; | ||
var patchedInnerRef = function patchedInnerRef(ref) { | ||
_this2.setRef(ref); | ||
_this2.setRef(ref); // give rbd the inner ref too | ||
if (dnd && dnd.innerRef) { | ||
@@ -143,0 +138,0 @@ dnd.innerRef(ref); |
import { gridSize as akGridSize, borderRadius } from '@atlaskit/theme/constants'; | ||
import * as colors from '@atlaskit/theme/colors'; | ||
// TEMPORARY | ||
// if you change the themeNamespace below, ensure you also change it | ||
// in @atlaskit/atlassian/navigation/src/theme/_itemTheme.ts | ||
// https://ecosystem.atlassian.net/browse/DS-6794 | ||
export var themeNamespace = '@atlaskit-shared-theme/item'; // Used for Group titles and Item descriptions | ||
@@ -4,0 +8,0 @@ |
{ | ||
"name": "@atlaskit/item", | ||
"version": "10.1.6", | ||
"version": "10.2.0", | ||
"sideEffects": false | ||
} |
{ | ||
"name": "@atlaskit/item", | ||
"version": "10.1.6", | ||
"version": "10.2.0", | ||
"description": "A generic item component to be used within other components", | ||
@@ -31,3 +31,3 @@ "license": "Apache-2.0", | ||
"devDependencies": { | ||
"@atlaskit/avatar": "^17.1.3", | ||
"@atlaskit/avatar": "^17.1.5", | ||
"@atlaskit/build-utils": "^2.2.5", | ||
@@ -38,4 +38,4 @@ "@atlaskit/docs": "^8.1.8", | ||
"@atlaskit/ssr": "^0.1.1", | ||
"@atlaskit/tooltip": "^15.1.1", | ||
"enzyme": "^3.7.0", | ||
"@atlaskit/tooltip": "^15.2.0", | ||
"enzyme": "^3.10.0", | ||
"polished": "1.9.3", | ||
@@ -58,2 +58,2 @@ "react-dom": "^16.8.0", | ||
] | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
152656