@patternfly/react-core 4.254.1 → 4.255.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/dist/esm/components/Alert/AlertIcon.js +1 -1
- package/dist/esm/components/Alert/AlertIcon.js.map +1 -1
- package/dist/esm/next/components/Dropdown/Dropdown.d.ts +6 -1
- package/dist/esm/next/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/esm/next/components/Dropdown/Dropdown.js +4 -2
- package/dist/esm/next/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/esm/next/components/Dropdown/DropdownItem.d.ts +6 -1
- package/dist/esm/next/components/Dropdown/DropdownItem.d.ts.map +1 -1
- package/dist/esm/next/components/Dropdown/DropdownItem.js +4 -2
- package/dist/esm/next/components/Dropdown/DropdownItem.js.map +1 -1
- package/dist/js/components/Alert/AlertIcon.js +1 -1
- package/dist/js/components/Alert/AlertIcon.js.map +1 -1
- package/dist/js/next/components/Dropdown/Dropdown.d.ts +6 -1
- package/dist/js/next/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/js/next/components/Dropdown/Dropdown.js +4 -2
- package/dist/js/next/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/js/next/components/Dropdown/DropdownItem.d.ts +6 -1
- package/dist/js/next/components/Dropdown/DropdownItem.d.ts.map +1 -1
- package/dist/js/next/components/Dropdown/DropdownItem.js +4 -2
- package/dist/js/next/components/Dropdown/DropdownItem.js.map +1 -1
- package/dist/umd/react-core.min.css +410 -410
- package/dist/umd/react-core.min.js +1 -1
- package/package.json +2 -2
- package/src/components/Alert/AlertIcon.tsx +2 -2
- package/src/components/Button/__tests__/Button.test.tsx +16 -7
- package/src/components/Button/__tests__/__snapshots__/Button.test.tsx.snap +36 -0
- package/src/components/Button/examples/ButtonProgress.tsx +15 -2
- package/src/next/components/Dropdown/Dropdown.tsx +10 -2
- package/src/next/components/Dropdown/DropdownItem.tsx +16 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.255.1](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@4.255.0...@patternfly/react-core@4.255.1) (2022-10-22)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **Alert:** prevent error being thrown when using invalid variant ([#8229](https://github.com/patternfly/patternfly-react/issues/8229)) ([6d38ec3](https://github.com/patternfly/patternfly-react/commit/6d38ec339fc77212017c855e63ce5571ee677365))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [4.255.0](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@4.254.1...@patternfly/react-core@4.255.0) (2022-10-21)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* add ouia support to dropdown next ([#8135](https://github.com/patternfly/patternfly-react/issues/8135)) ([bc9ea4c](https://github.com/patternfly/patternfly-react/commit/bc9ea4c3c894d38d2fd1290bc32181964c11bc6b))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [4.254.1](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@4.254.0...@patternfly/react-core@4.254.1) (2022-10-21)
|
|
7
29
|
|
|
8
30
|
|
|
@@ -17,6 +17,6 @@ export const variantIcons = {
|
|
|
17
17
|
export const AlertIcon = (_a) => {
|
|
18
18
|
var { variant, customIcon, className = '' } = _a, props = __rest(_a, ["variant", "customIcon", "className"]);
|
|
19
19
|
const Icon = variantIcons[variant];
|
|
20
|
-
return (React.createElement("div", Object.assign({}, props, { className: css(styles.alertIcon, className) }), customIcon || React.createElement(Icon, null)));
|
|
20
|
+
return Icon ? (React.createElement("div", Object.assign({}, props, { className: css(styles.alertIcon, className) }), customIcon || React.createElement(Icon, null))) : null;
|
|
21
21
|
};
|
|
22
22
|
//# sourceMappingURL=AlertIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertIcon.js","sourceRoot":"","sources":["../../../../src/components/Alert/AlertIcon.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,MAAM,MAAM,qDAAqD,CAAC;AACzE,OAAO,eAAe,MAAM,0DAA0D,CAAC;AACvF,OAAO,qBAAqB,MAAM,gEAAgE,CAAC;AACnG,OAAO,uBAAuB,MAAM,kEAAkE,CAAC;AACvG,OAAO,cAAc,MAAM,yDAAyD,CAAC;AACrF,OAAO,QAAQ,MAAM,kDAAkD,CAAC;AAExE,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,OAAO,EAAE,eAAe;IACxB,MAAM,EAAE,qBAAqB;IAC7B,OAAO,EAAE,uBAAuB;IAChC,IAAI,EAAE,cAAc;IACpB,OAAO,EAAE,QAAQ;CAClB,CAAC;AAWF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAiE,EAAE,EAAE;QAArE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,GAAG,EAAE,OAA4B,EAAvB,KAAK,cAA/C,sCAAiD,CAAF;IACvE,MAAM,IAAI,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IACnC,OAAO,
|
|
1
|
+
{"version":3,"file":"AlertIcon.js","sourceRoot":"","sources":["../../../../src/components/Alert/AlertIcon.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,MAAM,MAAM,qDAAqD,CAAC;AACzE,OAAO,eAAe,MAAM,0DAA0D,CAAC;AACvF,OAAO,qBAAqB,MAAM,gEAAgE,CAAC;AACnG,OAAO,uBAAuB,MAAM,kEAAkE,CAAC;AACvG,OAAO,cAAc,MAAM,yDAAyD,CAAC;AACrF,OAAO,QAAQ,MAAM,kDAAkD,CAAC;AAExE,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,OAAO,EAAE,eAAe;IACxB,MAAM,EAAE,qBAAqB;IAC7B,OAAO,EAAE,uBAAuB;IAChC,IAAI,EAAE,cAAc;IACpB,OAAO,EAAE,QAAQ;CAClB,CAAC;AAWF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAiE,EAAE,EAAE;QAArE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,GAAG,EAAE,OAA4B,EAAvB,KAAK,cAA/C,sCAAiD,CAAF;IACvE,MAAM,IAAI,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IACnC,OAAO,IAAI,CAAC,CAAC,CAAC,CACZ,6CAAS,KAAK,IAAE,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,KACxD,UAAU,IAAI,oBAAC,IAAI,OAAG,CACnB,CACP,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MenuProps } from '../../../components/Menu';
|
|
3
|
-
|
|
3
|
+
import { OUIAProps } from '../../../helpers';
|
|
4
|
+
export interface DropdownProps extends MenuProps, OUIAProps {
|
|
4
5
|
/** Anything which can be rendered in a dropdown. */
|
|
5
6
|
children?: React.ReactNode;
|
|
6
7
|
/** Classes applied to root element of dropdown. */
|
|
@@ -22,6 +23,10 @@ export interface DropdownProps extends MenuProps {
|
|
|
22
23
|
minWidth?: string;
|
|
23
24
|
/** @hide Forwarded ref */
|
|
24
25
|
innerRef?: React.Ref<any>;
|
|
26
|
+
/** Value to overwrite the randomly generated data-ouia-component-id.*/
|
|
27
|
+
ouiaId?: number | string;
|
|
28
|
+
/** Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false. */
|
|
29
|
+
ouiaSafe?: boolean;
|
|
25
30
|
}
|
|
26
31
|
export declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<any>>;
|
|
27
32
|
//# sourceMappingURL=Dropdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAqB,SAAS,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAqB,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAExE,OAAO,EAAgB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE3D,MAAM,WAAW,aAAc,SAAQ,SAAS,EAAE,SAAS;IACzD,oDAAoD;IACpD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,MAAM,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IAC7D,yCAAyC;IACzC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;IAC7F;yFACqF;IACrF,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,oEAAoE;IACpE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kDAAkD;IAClD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC1B,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,iLAAiL;IACjL,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA8FD,eAAO,MAAM,QAAQ,2EAEnB,CAAC"}
|
|
@@ -3,11 +3,13 @@ import React from 'react';
|
|
|
3
3
|
import { css } from '@patternfly/react-styles';
|
|
4
4
|
import { Menu, MenuContent } from '../../../components/Menu';
|
|
5
5
|
import { Popper } from '../../../helpers/Popper/Popper';
|
|
6
|
+
import { useOUIAProps } from '../../../helpers';
|
|
6
7
|
const DropdownBase = (_a) => {
|
|
7
|
-
var { children, className, onSelect, isOpen, toggle, onOpenChange, isPlain, isScrollable, minWidth, innerRef } = _a, props = __rest(_a, ["children", "className", "onSelect", "isOpen", "toggle", "onOpenChange", "isPlain", "isScrollable", "minWidth", "innerRef"]);
|
|
8
|
+
var { children, className, onSelect, isOpen, toggle, onOpenChange, isPlain, isScrollable, minWidth, innerRef, ouiaId, ouiaSafe = true } = _a, props = __rest(_a, ["children", "className", "onSelect", "isOpen", "toggle", "onOpenChange", "isPlain", "isScrollable", "minWidth", "innerRef", "ouiaId", "ouiaSafe"]);
|
|
8
9
|
const localMenuRef = React.useRef();
|
|
9
10
|
const toggleRef = React.useRef();
|
|
10
11
|
const containerRef = React.useRef();
|
|
12
|
+
const ouiaProps = useOUIAProps(Dropdown.displayName, ouiaId, ouiaSafe);
|
|
11
13
|
const menuRef = innerRef || localMenuRef;
|
|
12
14
|
React.useEffect(() => {
|
|
13
15
|
const handleMenuKeys = (event) => {
|
|
@@ -52,7 +54,7 @@ const DropdownBase = (_a) => {
|
|
|
52
54
|
}
|
|
53
55
|
}), props),
|
|
54
56
|
React.createElement(MenuContent, null, children)));
|
|
55
|
-
return (React.createElement("div", { ref: containerRef },
|
|
57
|
+
return (React.createElement("div", Object.assign({ ref: containerRef }, ouiaProps),
|
|
56
58
|
React.createElement(Popper, { trigger: toggle(toggleRef), removeFindDomNode: true, popper: menu, appendTo: containerRef.current || undefined, isVisible: isOpen })));
|
|
57
59
|
};
|
|
58
60
|
export const Dropdown = React.forwardRef((props, ref) => (React.createElement(DropdownBase, Object.assign({ innerRef: ref }, props))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.js","sourceRoot":"","sources":["../../../../../src/next/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,WAAW,EAAa,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"Dropdown.js","sourceRoot":"","sources":["../../../../../src/next/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,WAAW,EAAa,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,YAAY,EAAa,MAAM,kBAAkB,CAAC;AA8B3D,MAAM,YAAY,GAA2C,CAAC,EAc9C,EAAE,EAAE;QAd0C,EAC5D,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,MAAM,EACN,MAAM,EACN,YAAY,EACZ,OAAO,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K;QAET,oBAAC,WAAW,QAAE,QAAQ,CAAe,CAChC,CACR,CAAC;IACF,OAAO,CACL,2CAAK,GAAG,EAAE,YAAY,IAAM,SAAS;QACnC,oBAAC,MAAM,IACL,OAAO,EAAE,MAAM,CAAC,SAAS,CAAC,EAC1B,iBAAiB,QACjB,MAAM,EAAE,IAAI,EACZ,QAAQ,EAAE,YAAY,CAAC,OAAO,IAAI,SAAS,EAC3C,SAAS,EAAE,MAAM,GACjB,CACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,KAAoB,EAAE,GAAmB,EAAE,EAAE,CAAC,CACtF,oBAAC,YAAY,kBAAC,QAAQ,EAAE,GAAG,IAAM,KAAK,EAAI,CAC3C,CAAC,CAAC;AACH,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC"}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MenuItemProps } from '../../../components/Menu';
|
|
3
|
-
|
|
3
|
+
import { OUIAProps } from '../../../helpers';
|
|
4
|
+
export interface DropdownItemProps extends Omit<MenuItemProps, 'ref'>, OUIAProps {
|
|
4
5
|
/** Anything which can be rendered in a dropdown item */
|
|
5
6
|
children?: React.ReactNode;
|
|
6
7
|
/** Classes applied to root element of dropdown item */
|
|
7
8
|
className?: string;
|
|
8
9
|
/** Description of the dropdown item */
|
|
9
10
|
description?: React.ReactNode;
|
|
11
|
+
/** Value to overwrite the randomly generated data-ouia-component-id.*/
|
|
12
|
+
ouiaId?: number | string;
|
|
13
|
+
/** Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false. */
|
|
14
|
+
ouiaSafe?: boolean;
|
|
10
15
|
}
|
|
11
16
|
export declare const DropdownItem: React.FunctionComponent<MenuItemProps>;
|
|
12
17
|
//# sourceMappingURL=DropdownItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownItem.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Dropdown/DropdownItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAY,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"DropdownItem.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Dropdown/DropdownItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAY,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAgB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE3D,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,EAAE,SAAS;IAC9E,wDAAwD;IACxD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,iLAAiL;IACjL,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,iBAAiB,CAAC,aAAa,CAc/D,CAAC"}
|
|
@@ -2,9 +2,11 @@ import { __rest } from "tslib";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { css } from '@patternfly/react-styles';
|
|
4
4
|
import { MenuItem } from '../../../components/Menu';
|
|
5
|
+
import { useOUIAProps } from '../../../helpers';
|
|
5
6
|
export const DropdownItem = (_a) => {
|
|
6
|
-
var { children, className, description } = _a, props = __rest(_a, ["children", "className", "description"]);
|
|
7
|
-
|
|
7
|
+
var { children, className, description, ouiaId, ouiaSafe } = _a, props = __rest(_a, ["children", "className", "description", "ouiaId", "ouiaSafe"]);
|
|
8
|
+
const ouiaProps = useOUIAProps(DropdownItem.displayName, ouiaId, ouiaSafe);
|
|
9
|
+
return (React.createElement(MenuItem, Object.assign({ className: css(className), description: description }, ouiaProps, props), children));
|
|
8
10
|
};
|
|
9
11
|
DropdownItem.displayName = 'DropdownItem';
|
|
10
12
|
//# sourceMappingURL=DropdownItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownItem.js","sourceRoot":"","sources":["../../../../../src/next/components/Dropdown/DropdownItem.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAiB,QAAQ,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"DropdownItem.js","sourceRoot":"","sources":["../../../../../src/next/components/Dropdown/DropdownItem.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAiB,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAa,MAAM,kBAAkB,CAAC;AAe3D,MAAM,CAAC,MAAM,YAAY,GAA2C,CAAC,EAOjD,EAAE,EAAE;QAP6C,EACnE,QAAQ,EACR,SAAS,EACT,WAAW,EACX,MAAM,EACN,QAAQ,OAEU,EADf,KAAK,cAN2D,8DAOpE,CADS;IAER,MAAM,SAAS,GAAG,YAAY,CAAC,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC3E,OAAO,CACL,oBAAC,QAAQ,kBAAC,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,WAAW,IAAM,SAAS,EAAM,KAAK,GACpF,QAAQ,CACA,CACZ,CAAC;AACJ,CAAC,CAAC;AACF,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC"}
|
|
@@ -20,7 +20,7 @@ exports.variantIcons = {
|
|
|
20
20
|
const AlertIcon = (_a) => {
|
|
21
21
|
var { variant, customIcon, className = '' } = _a, props = tslib_1.__rest(_a, ["variant", "customIcon", "className"]);
|
|
22
22
|
const Icon = exports.variantIcons[variant];
|
|
23
|
-
return (React.createElement("div", Object.assign({}, props, { className: react_styles_1.css(alert_1.default.alertIcon, className) }), customIcon || React.createElement(Icon, null)));
|
|
23
|
+
return Icon ? (React.createElement("div", Object.assign({}, props, { className: react_styles_1.css(alert_1.default.alertIcon, className) }), customIcon || React.createElement(Icon, null))) : null;
|
|
24
24
|
};
|
|
25
25
|
exports.AlertIcon = AlertIcon;
|
|
26
26
|
//# sourceMappingURL=AlertIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertIcon.js","sourceRoot":"","sources":["../../../../src/components/Alert/AlertIcon.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,2DAA+C;AAC/C,wGAAyE;AACzE,wHAAuF;AACvF,oIAAmG;AACnG,wIAAuG;AACvG,sHAAqF;AACrF,wGAAwE;AAE3D,QAAA,YAAY,GAAG;IAC1B,OAAO,EAAE,2BAAe;IACxB,MAAM,EAAE,iCAAqB;IAC7B,OAAO,EAAE,mCAAuB;IAChC,IAAI,EAAE,0BAAc;IACpB,OAAO,EAAE,mBAAQ;CAClB,CAAC;AAWK,MAAM,SAAS,GAAG,CAAC,EAAiE,EAAE,EAAE;QAArE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,GAAG,EAAE,OAA4B,EAAvB,KAAK,sBAA/C,sCAAiD,CAAF;IACvE,MAAM,IAAI,GAAG,oBAAY,CAAC,OAAO,CAAC,CAAC;IACnC,OAAO,
|
|
1
|
+
{"version":3,"file":"AlertIcon.js","sourceRoot":"","sources":["../../../../src/components/Alert/AlertIcon.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,2DAA+C;AAC/C,wGAAyE;AACzE,wHAAuF;AACvF,oIAAmG;AACnG,wIAAuG;AACvG,sHAAqF;AACrF,wGAAwE;AAE3D,QAAA,YAAY,GAAG;IAC1B,OAAO,EAAE,2BAAe;IACxB,MAAM,EAAE,iCAAqB;IAC7B,OAAO,EAAE,mCAAuB;IAChC,IAAI,EAAE,0BAAc;IACpB,OAAO,EAAE,mBAAQ;CAClB,CAAC;AAWK,MAAM,SAAS,GAAG,CAAC,EAAiE,EAAE,EAAE;QAArE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,GAAG,EAAE,OAA4B,EAAvB,KAAK,sBAA/C,sCAAiD,CAAF;IACvE,MAAM,IAAI,GAAG,oBAAY,CAAC,OAAO,CAAC,CAAC;IACnC,OAAO,IAAI,CAAC,CAAC,CAAC,CACZ,6CAAS,KAAK,IAAE,SAAS,EAAE,kBAAG,CAAC,eAAM,CAAC,SAAS,EAAE,SAAS,CAAC,KACxD,UAAU,IAAI,oBAAC,IAAI,OAAG,CACnB,CACP,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC;AAPW,QAAA,SAAS,aAOpB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MenuProps } from '../../../components/Menu';
|
|
3
|
-
|
|
3
|
+
import { OUIAProps } from '../../../helpers';
|
|
4
|
+
export interface DropdownProps extends MenuProps, OUIAProps {
|
|
4
5
|
/** Anything which can be rendered in a dropdown. */
|
|
5
6
|
children?: React.ReactNode;
|
|
6
7
|
/** Classes applied to root element of dropdown. */
|
|
@@ -22,6 +23,10 @@ export interface DropdownProps extends MenuProps {
|
|
|
22
23
|
minWidth?: string;
|
|
23
24
|
/** @hide Forwarded ref */
|
|
24
25
|
innerRef?: React.Ref<any>;
|
|
26
|
+
/** Value to overwrite the randomly generated data-ouia-component-id.*/
|
|
27
|
+
ouiaId?: number | string;
|
|
28
|
+
/** Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false. */
|
|
29
|
+
ouiaSafe?: boolean;
|
|
25
30
|
}
|
|
26
31
|
export declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<any>>;
|
|
27
32
|
//# sourceMappingURL=Dropdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAqB,SAAS,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAqB,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAExE,OAAO,EAAgB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE3D,MAAM,WAAW,aAAc,SAAQ,SAAS,EAAE,SAAS;IACzD,oDAAoD;IACpD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,MAAM,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IAC7D,yCAAyC;IACzC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;IAC7F;yFACqF;IACrF,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,oEAAoE;IACpE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kDAAkD;IAClD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC1B,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,iLAAiL;IACjL,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA8FD,eAAO,MAAM,QAAQ,2EAEnB,CAAC"}
|
|
@@ -6,11 +6,13 @@ const react_1 = tslib_1.__importDefault(require("react"));
|
|
|
6
6
|
const react_styles_1 = require("@patternfly/react-styles");
|
|
7
7
|
const Menu_1 = require("../../../components/Menu");
|
|
8
8
|
const Popper_1 = require("../../../helpers/Popper/Popper");
|
|
9
|
+
const helpers_1 = require("../../../helpers");
|
|
9
10
|
const DropdownBase = (_a) => {
|
|
10
|
-
var { children, className, onSelect, isOpen, toggle, onOpenChange, isPlain, isScrollable, minWidth, innerRef } = _a, props = tslib_1.__rest(_a, ["children", "className", "onSelect", "isOpen", "toggle", "onOpenChange", "isPlain", "isScrollable", "minWidth", "innerRef"]);
|
|
11
|
+
var { children, className, onSelect, isOpen, toggle, onOpenChange, isPlain, isScrollable, minWidth, innerRef, ouiaId, ouiaSafe = true } = _a, props = tslib_1.__rest(_a, ["children", "className", "onSelect", "isOpen", "toggle", "onOpenChange", "isPlain", "isScrollable", "minWidth", "innerRef", "ouiaId", "ouiaSafe"]);
|
|
11
12
|
const localMenuRef = react_1.default.useRef();
|
|
12
13
|
const toggleRef = react_1.default.useRef();
|
|
13
14
|
const containerRef = react_1.default.useRef();
|
|
15
|
+
const ouiaProps = helpers_1.useOUIAProps(exports.Dropdown.displayName, ouiaId, ouiaSafe);
|
|
14
16
|
const menuRef = innerRef || localMenuRef;
|
|
15
17
|
react_1.default.useEffect(() => {
|
|
16
18
|
const handleMenuKeys = (event) => {
|
|
@@ -55,7 +57,7 @@ const DropdownBase = (_a) => {
|
|
|
55
57
|
}
|
|
56
58
|
}), props),
|
|
57
59
|
react_1.default.createElement(Menu_1.MenuContent, null, children)));
|
|
58
|
-
return (react_1.default.createElement("div", { ref: containerRef },
|
|
60
|
+
return (react_1.default.createElement("div", Object.assign({ ref: containerRef }, ouiaProps),
|
|
59
61
|
react_1.default.createElement(Popper_1.Popper, { trigger: toggle(toggleRef), removeFindDomNode: true, popper: menu, appendTo: containerRef.current || undefined, isVisible: isOpen })));
|
|
60
62
|
};
|
|
61
63
|
exports.Dropdown = react_1.default.forwardRef((props, ref) => (react_1.default.createElement(DropdownBase, Object.assign({ innerRef: ref }, props))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.js","sourceRoot":"","sources":["../../../../../src/next/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,2DAA+C;AAC/C,mDAAwE;AACxE,2DAAwD;
|
|
1
|
+
{"version":3,"file":"Dropdown.js","sourceRoot":"","sources":["../../../../../src/next/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,2DAA+C;AAC/C,mDAAwE;AACxE,2DAAwD;AACxD,8CAA2D;AA8B3D,MAAM,YAAY,GAA2C,CAAC,EAc9C,EAAE,EAAE;QAd0C,EAC5D,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,MAAM,EACN,MAAM,EACN,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,QAAQ,GAAG,IAAI,OAED,EADX,KAAK,sBAboD,kJAc7D,CADS;IAER,MAAM,YAAY,GAAG,eAAK,CAAC,MAAM,EAAkB,CAAC;IACpD,MAAM,SAAS,GAAG,eAAK,CAAC,MAAM,EAAqB,CAAC;IACpD,MAAM,YAAY,GAAG,eAAK,CAAC,MAAM,EAAkB,CA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3C,SAAS,EAAE,MAAM,GACjB,CACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEW,QAAA,QAAQ,GAAG,eAAK,CAAC,UAAU,CAAC,CAAC,KAAoB,EAAE,GAAmB,EAAE,EAAE,CAAC,CACtF,8BAAC,YAAY,kBAAC,QAAQ,EAAE,GAAG,IAAM,KAAK,EAAI,CAC3C,CAAC,CAAC;AACH,gBAAQ,CAAC,WAAW,GAAG,UAAU,CAAC"}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MenuItemProps } from '../../../components/Menu';
|
|
3
|
-
|
|
3
|
+
import { OUIAProps } from '../../../helpers';
|
|
4
|
+
export interface DropdownItemProps extends Omit<MenuItemProps, 'ref'>, OUIAProps {
|
|
4
5
|
/** Anything which can be rendered in a dropdown item */
|
|
5
6
|
children?: React.ReactNode;
|
|
6
7
|
/** Classes applied to root element of dropdown item */
|
|
7
8
|
className?: string;
|
|
8
9
|
/** Description of the dropdown item */
|
|
9
10
|
description?: React.ReactNode;
|
|
11
|
+
/** Value to overwrite the randomly generated data-ouia-component-id.*/
|
|
12
|
+
ouiaId?: number | string;
|
|
13
|
+
/** Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false. */
|
|
14
|
+
ouiaSafe?: boolean;
|
|
10
15
|
}
|
|
11
16
|
export declare const DropdownItem: React.FunctionComponent<MenuItemProps>;
|
|
12
17
|
//# sourceMappingURL=DropdownItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownItem.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Dropdown/DropdownItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAY,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"DropdownItem.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Dropdown/DropdownItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAY,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAgB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE3D,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,EAAE,SAAS;IAC9E,wDAAwD;IACxD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,iLAAiL;IACjL,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,iBAAiB,CAAC,aAAa,CAc/D,CAAC"}
|
|
@@ -5,9 +5,11 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const react_styles_1 = require("@patternfly/react-styles");
|
|
7
7
|
const Menu_1 = require("../../../components/Menu");
|
|
8
|
+
const helpers_1 = require("../../../helpers");
|
|
8
9
|
const DropdownItem = (_a) => {
|
|
9
|
-
var { children, className, description } = _a, props = tslib_1.__rest(_a, ["children", "className", "description"]);
|
|
10
|
-
|
|
10
|
+
var { children, className, description, ouiaId, ouiaSafe } = _a, props = tslib_1.__rest(_a, ["children", "className", "description", "ouiaId", "ouiaSafe"]);
|
|
11
|
+
const ouiaProps = helpers_1.useOUIAProps(exports.DropdownItem.displayName, ouiaId, ouiaSafe);
|
|
12
|
+
return (react_1.default.createElement(Menu_1.MenuItem, Object.assign({ className: react_styles_1.css(className), description: description }, ouiaProps, props), children));
|
|
11
13
|
};
|
|
12
14
|
exports.DropdownItem = DropdownItem;
|
|
13
15
|
exports.DropdownItem.displayName = 'DropdownItem';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownItem.js","sourceRoot":"","sources":["../../../../../src/next/components/Dropdown/DropdownItem.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,2DAA+C;AAC/C,mDAAmE;
|
|
1
|
+
{"version":3,"file":"DropdownItem.js","sourceRoot":"","sources":["../../../../../src/next/components/Dropdown/DropdownItem.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,2DAA+C;AAC/C,mDAAmE;AACnE,8CAA2D;AAepD,MAAM,YAAY,GAA2C,CAAC,EAOjD,EAAE,EAAE;QAP6C,EACnE,QAAQ,EACR,SAAS,EACT,WAAW,EACX,MAAM,EACN,QAAQ,OAEU,EADf,KAAK,sBAN2D,8DAOpE,CADS;IAER,MAAM,SAAS,GAAG,sBAAY,CAAC,oBAAY,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC3E,OAAO,CACL,8BAAC,eAAQ,kBAAC,SAAS,EAAE,kBAAG,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,WAAW,IAAM,SAAS,EAAM,KAAK,GACpF,QAAQ,CACA,CACZ,CAAC;AACJ,CAAC,CAAC;AAdW,QAAA,YAAY,gBAcvB;AACF,oBAAY,CAAC,WAAW,GAAG,cAAc,CAAC"}
|