@patternfly/react-drag-drop 6.0.0-alpha.88 → 6.0.0-prerelease.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 +7 -0
- package/dist/cjs.tsbuildinfo +1 -1
- package/dist/esm/components/DragDrop/DragButton.d.ts +5 -1
- package/dist/esm/components/DragDrop/DragButton.d.ts.map +1 -1
- package/dist/esm/components/DragDrop/DragButton.js +4 -5
- package/dist/esm/components/DragDrop/DragButton.js.map +1 -1
- package/dist/esm.tsbuildinfo +1 -1
- package/dist/js/components/DragDrop/DragButton.d.ts +5 -1
- package/dist/js/components/DragDrop/DragButton.d.ts.map +1 -1
- package/dist/js/components/DragDrop/DragButton.js +4 -5
- package/dist/js/components/DragDrop/DragButton.js.map +1 -1
- package/package.json +6 -6
- package/src/components/DragDrop/DragButton.tsx +23 -11
- package/src/components/DragDrop/__tests__/__snapshots__/DragDrop.test.tsx.snap +63 -39
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export interface DragButtonProps extends React.HTMLProps<HTMLButtonElement> {
|
|
2
|
+
export interface DragButtonProps extends Omit<React.HTMLProps<HTMLButtonElement>, 'size'> {
|
|
3
3
|
/** Additional classes added to the drag button */
|
|
4
4
|
className?: string;
|
|
5
5
|
/** Sets button type */
|
|
6
6
|
type?: 'button' | 'submit' | 'reset';
|
|
7
7
|
/** Flag indicating if drag is disabled for the item */
|
|
8
8
|
isDisabled?: boolean;
|
|
9
|
+
/** Accessible name of the drag button. */
|
|
10
|
+
'aria-label'?: string;
|
|
11
|
+
/** Id or list of id's that label the drag button. */
|
|
12
|
+
'aria-labelledby'?: string;
|
|
9
13
|
}
|
|
10
14
|
export declare const DragButton: React.FunctionComponent<DragButtonProps>;
|
|
11
15
|
//# sourceMappingURL=DragButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DragButton.d.ts","sourceRoot":"","sources":["../../../../src/components/DragDrop/DragButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"DragButton.d.ts","sourceRoot":"","sources":["../../../../src/components/DragDrop/DragButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACvF,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB;IACvB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,uDAAuD;IACvD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAkB/D,CAAC"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { css } from '@patternfly/react-styles';
|
|
4
|
+
import { Button } from '@patternfly/react-core';
|
|
4
5
|
import dragButtonStyles from '@patternfly/react-styles/css/components/DataList/data-list.mjs';
|
|
5
|
-
import buttonStyles from '@patternfly/react-styles/css/components/Button/button.mjs';
|
|
6
6
|
import GripVerticalIcon from '@patternfly/react-icons/dist/esm/icons/grip-vertical-icon';
|
|
7
7
|
export const DragButton = (_a) => {
|
|
8
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
9
|
-
return (React.createElement(
|
|
10
|
-
|
|
11
|
-
React.createElement(GripVerticalIcon, null))));
|
|
8
|
+
var { className, 'aria-label': ariaLabel = 'Drag button', 'aria-labelledby': ariaLabelledby } = _a, props = __rest(_a, ["className", 'aria-label', 'aria-labelledby']);
|
|
9
|
+
return (React.createElement(Button, Object.assign({ variant: "plain", className: css(className), "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, icon: React.createElement("span", { className: css(dragButtonStyles.dataListItemDraggableIcon) },
|
|
10
|
+
React.createElement(GripVerticalIcon, null)) }, props)));
|
|
12
11
|
};
|
|
13
12
|
DragButton.displayName = 'DragButton';
|
|
14
13
|
//# sourceMappingURL=DragButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DragButton.js","sourceRoot":"","sources":["../../../../src/components/DragDrop/DragButton.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,
|
|
1
|
+
{"version":3,"file":"DragButton.js","sourceRoot":"","sources":["../../../../src/components/DragDrop/DragButton.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,gBAAgB,uEAAmE;AAC1F,OAAO,gBAAgB,MAAM,2DAA2D,CAAC;AAezF,MAAM,CAAC,MAAM,UAAU,GAA6C,CAAC,EAKnD,EAAE,EAAE;QAL+C,EACnE,SAAS,EACT,YAAY,EAAE,SAAS,GAAG,aAAa,EACvC,iBAAiB,EAAE,cAAc,OAEjB,EADb,KAAK,cAJ2D,8CAKpE,CADS;IACa,OAAA,CACrB,oBAAC,MAAM,kBACL,OAAO,EAAC,OAAO,EACf,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,gBACb,SAAS,qBACJ,cAAc,EAC/B,IAAI,EACF,8BAAM,SAAS,EAAE,GAAG,CAAC,gBAAgB,CAAC,yBAAyB,CAAC;YAC9D,oBAAC,gBAAgB,OAAG,CACf,IAEL,KAAK,EACT,CACH,CAAA;CAAA,CAAC;AACF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC"}
|