@patternfly/react-core 5.0.0-alpha.16 → 5.0.0-alpha.17
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 +8 -0
- package/components/Drawer/DrawerPanelContent.d.ts +1 -1
- package/components/Drawer/DrawerPanelContent.d.ts.map +1 -1
- package/components/Drawer/DrawerPanelContent.js +5 -5
- package/components/Drawer/DrawerPanelContent.js.map +1 -1
- package/components/Menu/MenuContent.d.ts +1 -1
- package/components/Menu/MenuContent.d.ts.map +1 -1
- package/components/SkipToContent/SkipToContent.d.ts +2 -11
- package/components/SkipToContent/SkipToContent.d.ts.map +1 -1
- package/components/SkipToContent/SkipToContent.js +6 -20
- package/components/SkipToContent/SkipToContent.js.map +1 -1
- package/dist/esm/components/Drawer/DrawerPanelContent.d.ts +1 -1
- package/dist/esm/components/Drawer/DrawerPanelContent.d.ts.map +1 -1
- package/dist/esm/components/Drawer/DrawerPanelContent.js +5 -5
- package/dist/esm/components/Drawer/DrawerPanelContent.js.map +1 -1
- package/dist/esm/components/Menu/MenuContent.d.ts +1 -1
- package/dist/esm/components/Menu/MenuContent.d.ts.map +1 -1
- package/dist/esm/components/SkipToContent/SkipToContent.d.ts +2 -11
- package/dist/esm/components/SkipToContent/SkipToContent.d.ts.map +1 -1
- package/dist/esm/components/SkipToContent/SkipToContent.js +6 -20
- package/dist/esm/components/SkipToContent/SkipToContent.js.map +1 -1
- package/dist/js/components/Drawer/DrawerPanelContent.d.ts +1 -1
- package/dist/js/components/Drawer/DrawerPanelContent.d.ts.map +1 -1
- package/dist/js/components/Drawer/DrawerPanelContent.js +5 -5
- package/dist/js/components/Drawer/DrawerPanelContent.js.map +1 -1
- package/dist/js/components/Menu/MenuContent.d.ts +1 -1
- package/dist/js/components/Menu/MenuContent.d.ts.map +1 -1
- package/dist/js/components/SkipToContent/SkipToContent.d.ts +2 -11
- package/dist/js/components/SkipToContent/SkipToContent.d.ts.map +1 -1
- package/dist/js/components/SkipToContent/SkipToContent.js +7 -21
- package/dist/js/components/SkipToContent/SkipToContent.js.map +1 -1
- package/dist/umd/react-core.min.js +3 -3
- package/package.json +2 -2
- package/src/components/Drawer/DrawerPanelContent.tsx +9 -10
- package/src/components/Drawer/examples/DrawerResizableOnRight.tsx +1 -1
- package/src/components/Menu/MenuContent.tsx +1 -1
- package/src/components/Page/__tests__/__snapshots__/Page.test.tsx.snap +13 -5
- package/src/components/SkipToContent/SkipToContent.tsx +15 -32
- package/src/components/SkipToContent/__tests__/SkipToContent.test.tsx +0 -5
- package/src/components/SkipToContent/__tests__/__snapshots__/SkipToContent.test.tsx.snap +12 -13
|
@@ -4,27 +4,13 @@ exports.SkipToContent = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const skip_to_content_1 = tslib_1.__importDefault(require("@patternfly/react-styles/css/components/SkipToContent/skip-to-content"));
|
|
7
|
-
const button_1 = tslib_1.__importDefault(require("@patternfly/react-styles/css/components/Button/button"));
|
|
8
7
|
const react_styles_1 = require("@patternfly/react-styles");
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
componentDidMount() {
|
|
15
|
-
if (this.props.show && this.componentRef.current) {
|
|
16
|
-
this.componentRef.current.focus();
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
render() {
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
21
|
-
const _a = this.props, { children, className, href, show, type } = _a, rest = tslib_1.__rest(_a, ["children", "className", "href", "show", "type"]);
|
|
22
|
-
return (React.createElement("a", Object.assign({}, rest, { className: (0, react_styles_1.css)(button_1.default.button, button_1.default.modifiers.primary, skip_to_content_1.default.skipToContent, className), ref: this.componentRef, href: href }), children));
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.SkipToContent = SkipToContent;
|
|
26
|
-
SkipToContent.displayName = 'SkipToContent';
|
|
27
|
-
SkipToContent.defaultProps = {
|
|
28
|
-
show: false
|
|
8
|
+
const Button_1 = require("../Button");
|
|
9
|
+
const SkipToContent = (_a) => {
|
|
10
|
+
var { children = null, className = '', href } = _a, props = tslib_1.__rest(_a, ["children", "className", "href"]);
|
|
11
|
+
return (React.createElement("div", Object.assign({ className: (0, react_styles_1.css)(skip_to_content_1.default.skipToContent, className) }, props),
|
|
12
|
+
React.createElement(Button_1.Button, { variant: Button_1.ButtonVariant.primary, component: "a", href: href }, children)));
|
|
29
13
|
};
|
|
14
|
+
exports.SkipToContent = SkipToContent;
|
|
15
|
+
exports.SkipToContent.displayName = 'SkipToContent';
|
|
30
16
|
//# sourceMappingURL=SkipToContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkipToContent.js","sourceRoot":"","sources":["../../../../src/components/SkipToContent/SkipToContent.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,oIAA2F;AAC3F,
|
|
1
|
+
{"version":3,"file":"SkipToContent.js","sourceRoot":"","sources":["../../../../src/components/SkipToContent/SkipToContent.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,oIAA2F;AAC3F,2DAA+C;AAC/C,sCAAkD;AAW3C,MAAM,aAAa,GAAgD,CAAC,EAKtD,EAAE,EAAE;QALkD,EACzE,QAAQ,GAAG,IAAI,EACf,SAAS,GAAG,EAAE,EACd,IAAI,OAEe,EADhB,KAAK,sBAJiE,iCAK1E,CADS;IACgB,OAAA,CACxB,2CAAK,SAAS,EAAE,IAAA,kBAAG,EAAC,yBAAM,CAAC,aAAa,EAAE,SAAS,CAAC,IAAM,KAAK;QAC7D,oBAAC,eAAM,IAAC,OAAO,EAAE,sBAAa,CAAC,OAAO,EAAE,SAAS,EAAC,GAAG,EAAC,IAAI,EAAE,IAAI,IAC7D,QAAQ,CACF,CACL,CACP,CAAA;CAAA,CAAC;AAXW,QAAA,aAAa,iBAWxB;AAEF,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC"}
|