| 1 |
"use strict"; |
| 2 |
Object.defineProperty(exports, "__esModule", { value: true }); |
| 3 |
exports.CompassNavHome = void 0; |
| 4 |
const tslib_1 = require("tslib"); |
| 5 |
const jsx_runtime_1 = require("react/jsx-runtime"); |
| 6 |
const react_1 = require("react"); |
| 7 |
const compass_1 = tslib_1.__importDefault(require("@patternfly/react-styles/css/components/Compass/compass")); |
| 8 |
const react_styles_1 = require("@patternfly/react-styles"); |
| 9 |
const Button_1 = require("../Button"); |
| 10 |
const Tooltip_1 = require("../Tooltip"); |
| 11 |
const CompassHomeIcon = () => ((0, jsx_runtime_1.jsxs)("svg", { width: "1em", height: "1em", className: "pf-v6-svg", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [(0, jsx_runtime_1.jsx)("path", { d: "M8.33268 13.334H11.666", stroke: "currentcolor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), (0, jsx_runtime_1.jsx)("path", { d: "M1.66602 6.66602L9.73102 2.63351C9.89994 2.54905 10.0988 2.54905 10.2677 2.63351L18.3327 6.66602", stroke: "currentcolor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), (0, jsx_runtime_1.jsx)("path", { d: "M16.6673 9.16602V15.4993C16.6673 16.6039 15.7719 17.4993 14.6673 17.4993H5.33398C4.22941 17.4993 3.33398 16.6039 3.33398 15.4993V9.16602", stroke: "currentcolor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })] })); |
| 12 |
const CompassNavHome = (_a) => { |
| 13 |
var { 'aria-label': ariaLabel = 'Home', tooltipContent = 'Home', className, onClick } = _a, props = tslib_1.__rest(_a, ['aria-label', "tooltipContent", "className", "onClick"]); |
| 14 |
const buttonRef = (0, react_1.useRef)(null); |
| 15 |
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: (0, react_styles_1.css)(compass_1.default.compassNav + '-home', className) }, props, { children: (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { content: tooltipContent, position: "left", aria: "none", "aria-live": "off", triggerRef: buttonRef, children: (0, jsx_runtime_1.jsx)(Button_1.Button, { isCircle: true, variant: "plain", icon: (0, jsx_runtime_1.jsx)(CompassHomeIcon, {}), "aria-label": ariaLabel, onClick: onClick, ref: buttonRef }) }) }))); |
| 16 |
}; |
| 17 |
exports.CompassNavHome = CompassNavHome; |
| 18 |
exports.CompassNavHome.displayName = 'CompassNavHome'; |
| 19 |
//# sourceMappingURL=CompassNavHome.js.map |