mirror of
https://github.com/element-hq/element-web
synced 2024-11-29 12:58:53 +03:00
Update dependency typescript to v5.4.5 (#12422)
* Update dependency typescript to v5.4.5 * Fix types Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
dafd9c23b8
commit
1c79bbb1ae
9 changed files with 17 additions and 10 deletions
|
@ -223,7 +223,7 @@
|
||||||
"stylelint-config-standard": "^36.0.0",
|
"stylelint-config-standard": "^36.0.0",
|
||||||
"stylelint-scss": "^6.0.0",
|
"stylelint-scss": "^6.0.0",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "5.4.3"
|
"typescript": "5.4.5"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"postcss": "^8.4.19",
|
"postcss": "^8.4.19",
|
||||||
|
|
|
@ -28,12 +28,13 @@ type Props<T extends keyof JSX.IntrinsicElements> = ComponentProps<typeof Access
|
||||||
|
|
||||||
// Semantic component for representing the AccessibleButton which launches a <ContextMenu />
|
// Semantic component for representing the AccessibleButton which launches a <ContextMenu />
|
||||||
export const ContextMenuButton = forwardRef(function <T extends keyof JSX.IntrinsicElements>(
|
export const ContextMenuButton = forwardRef(function <T extends keyof JSX.IntrinsicElements>(
|
||||||
{ label, isExpanded, children, onClick, onContextMenu, ...props }: Props<T>,
|
{ label, isExpanded, children, onClick, onContextMenu, element, ...props }: Props<T>,
|
||||||
ref: Ref<HTMLElement>,
|
ref: Ref<HTMLElement>,
|
||||||
) {
|
) {
|
||||||
return (
|
return (
|
||||||
<AccessibleButton
|
<AccessibleButton
|
||||||
{...props}
|
{...props}
|
||||||
|
element={element as keyof JSX.IntrinsicElements}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
onContextMenu={onContextMenu ?? onClick ?? undefined}
|
onContextMenu={onContextMenu ?? onClick ?? undefined}
|
||||||
aria-label={label}
|
aria-label={label}
|
||||||
|
|
|
@ -27,12 +27,13 @@ type Props<T extends keyof JSX.IntrinsicElements> = ComponentProps<typeof Access
|
||||||
|
|
||||||
// Semantic component for representing the AccessibleButton which launches a <ContextMenu />
|
// Semantic component for representing the AccessibleButton which launches a <ContextMenu />
|
||||||
export const ContextMenuTooltipButton = forwardRef(function <T extends keyof JSX.IntrinsicElements>(
|
export const ContextMenuTooltipButton = forwardRef(function <T extends keyof JSX.IntrinsicElements>(
|
||||||
{ isExpanded, children, onClick, onContextMenu, ...props }: Props<T>,
|
{ isExpanded, children, onClick, onContextMenu, element, ...props }: Props<T>,
|
||||||
ref: Ref<HTMLElement>,
|
ref: Ref<HTMLElement>,
|
||||||
) {
|
) {
|
||||||
return (
|
return (
|
||||||
<AccessibleTooltipButton
|
<AccessibleTooltipButton
|
||||||
{...props}
|
{...props}
|
||||||
|
element={element as keyof JSX.IntrinsicElements}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
onContextMenu={onContextMenu ?? onClick ?? undefined}
|
onContextMenu={onContextMenu ?? onClick ?? undefined}
|
||||||
aria-haspopup={true}
|
aria-haspopup={true}
|
||||||
|
|
|
@ -34,12 +34,14 @@ export const RovingAccessibleButton = <T extends keyof JSX.IntrinsicElements>({
|
||||||
onFocus,
|
onFocus,
|
||||||
onMouseOver,
|
onMouseOver,
|
||||||
focusOnMouseOver,
|
focusOnMouseOver,
|
||||||
|
element,
|
||||||
...props
|
...props
|
||||||
}: Props<T>): JSX.Element => {
|
}: Props<T>): JSX.Element => {
|
||||||
const [onFocusInternal, isActive, ref] = useRovingTabIndex(inputRef);
|
const [onFocusInternal, isActive, ref] = useRovingTabIndex(inputRef);
|
||||||
return (
|
return (
|
||||||
<AccessibleButton
|
<AccessibleButton
|
||||||
{...props}
|
{...props}
|
||||||
|
element={element as keyof JSX.IntrinsicElements}
|
||||||
onFocus={(event: React.FocusEvent) => {
|
onFocus={(event: React.FocusEvent) => {
|
||||||
onFocusInternal();
|
onFocusInternal();
|
||||||
onFocus?.(event);
|
onFocus?.(event);
|
||||||
|
|
|
@ -28,12 +28,14 @@ type Props<T extends keyof JSX.IntrinsicElements> = Omit<ComponentProps<typeof A
|
||||||
export const RovingAccessibleTooltipButton = <T extends keyof JSX.IntrinsicElements>({
|
export const RovingAccessibleTooltipButton = <T extends keyof JSX.IntrinsicElements>({
|
||||||
inputRef,
|
inputRef,
|
||||||
onFocus,
|
onFocus,
|
||||||
|
element,
|
||||||
...props
|
...props
|
||||||
}: Props<T>): JSX.Element => {
|
}: Props<T>): JSX.Element => {
|
||||||
const [onFocusInternal, isActive, ref] = useRovingTabIndex(inputRef);
|
const [onFocusInternal, isActive, ref] = useRovingTabIndex(inputRef);
|
||||||
return (
|
return (
|
||||||
<AccessibleButton
|
<AccessibleButton
|
||||||
{...props}
|
{...props}
|
||||||
|
element={element as keyof JSX.IntrinsicElements}
|
||||||
onFocus={(event: React.FocusEvent) => {
|
onFocus={(event: React.FocusEvent) => {
|
||||||
onFocusInternal();
|
onFocusInternal();
|
||||||
onFocus?.(event);
|
onFocus?.(event);
|
||||||
|
|
|
@ -64,7 +64,7 @@ type Props<T extends keyof JSX.IntrinsicElements> = ComponentProps<typeof Access
|
||||||
* @deprecated use AccessibleButton with `title` and `caption` instead.
|
* @deprecated use AccessibleButton with `title` and `caption` instead.
|
||||||
*/
|
*/
|
||||||
const AccessibleTooltipButton = forwardRef(function <T extends keyof JSX.IntrinsicElements>(
|
const AccessibleTooltipButton = forwardRef(function <T extends keyof JSX.IntrinsicElements>(
|
||||||
{ title, tooltip, children, forceHide, alignment, onHideTooltip, tooltipClassName, ...props }: Props<T>,
|
{ title, tooltip, children, forceHide, alignment, onHideTooltip, tooltipClassName, element, ...props }: Props<T>,
|
||||||
ref: Ref<HTMLElement>,
|
ref: Ref<HTMLElement>,
|
||||||
) {
|
) {
|
||||||
const [hover, setHover] = useState(false);
|
const [hover, setHover] = useState(false);
|
||||||
|
@ -100,6 +100,7 @@ const AccessibleTooltipButton = forwardRef(function <T extends keyof JSX.Intrins
|
||||||
return (
|
return (
|
||||||
<AccessibleButton
|
<AccessibleButton
|
||||||
{...props}
|
{...props}
|
||||||
|
element={element as keyof JSX.IntrinsicElements}
|
||||||
onMouseOver={showTooltip}
|
onMouseOver={showTooltip}
|
||||||
onMouseLeave={hideTooltip}
|
onMouseLeave={hideTooltip}
|
||||||
onFocus={onFocus}
|
onFocus={onFocus}
|
||||||
|
|
|
@ -23,7 +23,7 @@ import AccessibleTooltipButton from "../../elements/AccessibleTooltipButton";
|
||||||
|
|
||||||
type Props<T extends keyof JSX.IntrinsicElements> = Omit<
|
type Props<T extends keyof JSX.IntrinsicElements> = Omit<
|
||||||
ComponentProps<typeof AccessibleTooltipButton<T>>,
|
ComponentProps<typeof AccessibleTooltipButton<T>>,
|
||||||
"aria-label" | "title" | "kind" | "className" | "onClick"
|
"aria-label" | "title" | "kind" | "className" | "onClick" | "element"
|
||||||
> & {
|
> & {
|
||||||
isExpanded: boolean;
|
isExpanded: boolean;
|
||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
|
|
|
@ -51,7 +51,7 @@ import { KeyBindingAction } from "../../../accessibility/KeyboardShortcuts";
|
||||||
|
|
||||||
type ButtonProps<T extends keyof JSX.IntrinsicElements> = Omit<
|
type ButtonProps<T extends keyof JSX.IntrinsicElements> = Omit<
|
||||||
ComponentProps<typeof AccessibleTooltipButton<T>>,
|
ComponentProps<typeof AccessibleTooltipButton<T>>,
|
||||||
"title" | "onClick" | "size"
|
"title" | "onClick" | "size" | "element"
|
||||||
> & {
|
> & {
|
||||||
space?: Room;
|
space?: Room;
|
||||||
spaceKey?: SpaceKey;
|
spaceKey?: SpaceKey;
|
||||||
|
|
|
@ -9243,10 +9243,10 @@ typed-array-length@^1.0.4, typed-array-length@^1.0.5:
|
||||||
is-typed-array "^1.1.13"
|
is-typed-array "^1.1.13"
|
||||||
possible-typed-array-names "^1.0.0"
|
possible-typed-array-names "^1.0.0"
|
||||||
|
|
||||||
typescript@5.4.3:
|
typescript@5.4.5:
|
||||||
version "5.4.3"
|
version "5.4.5"
|
||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.3.tgz#5c6fedd4c87bee01cd7a528a30145521f8e0feff"
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611"
|
||||||
integrity sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==
|
integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==
|
||||||
|
|
||||||
ua-parser-js@^1.0.2:
|
ua-parser-js@^1.0.2:
|
||||||
version "1.0.37"
|
version "1.0.37"
|
||||||
|
|
Loading…
Reference in a new issue