ÿØÿà JPEG ÿþ;
| Server IP : 68.65.120.201 / Your IP : 216.73.216.126 Web Server : LiteSpeed System : Linux server179.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64 User : taxhyuvu ( 2294) PHP Version : 8.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/./taxhyuvu/nodevenv/public_html/dp_taxhelplines/14/lib/node_modules/@restart/ui/esm/ |
Upload File : |
const _excluded = ["onKeyDown"];
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
/* eslint-disable jsx-a11y/no-static-element-interactions */
/* eslint-disable jsx-a11y/anchor-has-content */
import * as React from 'react';
import { useEventCallback } from '@restart/hooks';
import { useButtonProps } from './Button';
import { jsx as _jsx } from "react/jsx-runtime";
export function isTrivialHref(href) {
return !href || href.trim() === '#';
}
/**
* An generic `<a>` component that covers a few A11y cases, ensuring that
* cases where the `href` is missing or trivial like "#" are treated like buttons.
*/
const Anchor = /*#__PURE__*/React.forwardRef((_ref, ref) => {
let {
onKeyDown
} = _ref,
props = _objectWithoutPropertiesLoose(_ref, _excluded);
const [buttonProps] = useButtonProps(Object.assign({
tagName: 'a'
}, props));
const handleKeyDown = useEventCallback(e => {
buttonProps.onKeyDown(e);
onKeyDown == null ? void 0 : onKeyDown(e);
});
if (isTrivialHref(props.href) || props.role === 'button') {
return /*#__PURE__*/_jsx("a", Object.assign({
ref: ref
}, props, buttonProps, {
onKeyDown: handleKeyDown
}));
}
return /*#__PURE__*/_jsx("a", Object.assign({
ref: ref
}, props, {
onKeyDown: onKeyDown
}));
});
Anchor.displayName = 'Anchor';
export default Anchor;