pl-fe: update dep

Signed-off-by: Nicole Mikołajczyk <git@mkljczk.pl>
This commit is contained in:
Nicole Mikołajczyk
2025-03-27 20:24:36 +01:00
parent 3ae25feddc
commit 787143ec34
7 changed files with 17 additions and 13 deletions

View File

@ -54,7 +54,7 @@
"@lexical/rich-text": "^0.29.0",
"@lexical/selection": "^0.29.0",
"@lexical/utils": "^0.29.0",
"@mkljczk/react-hotkeys": "^1.2.2",
"@mkljczk/react-hotkeys": "^1.3.0",
"@mkljczk/url-purify": "^0.0.2",
"@reach/combobox": "^0.18.0",
"@reach/rect": "^0.18.0",

View File

@ -311,7 +311,7 @@ const Status: React.FC<IStatus> = (props) => {
};
return (
<HotKeys handlers={minHandlers} attach={node.current || undefined}>
<HotKeys handlers={minHandlers} attachRef={node}>
<div className={clsx('status__wrapper text-center', { focusable })} tabIndex={focusable ? 0 : undefined} ref={node}>
<Text theme='muted'>
<FormattedMessage id='status.filtered' defaultMessage='Filtered' />: {status.filtered.join(', ')}.
@ -348,7 +348,7 @@ const Status: React.FC<IStatus> = (props) => {
};
return (
<HotKeys handlers={handlers} data-testid='status' attach={node.current || undefined}>
<HotKeys handlers={handlers} data-testid='status' attachRef={node}>
<div
className={clsx('status cursor-pointer', { focusable })}
tabIndex={focusable && !muted ? 0 : undefined}

View File

@ -1,4 +1,4 @@
import React from 'react';
import React, { useRef } from 'react';
import { FormattedMessage } from 'react-intl';
import Text from 'pl-fe/components/ui/text';
@ -13,13 +13,15 @@ interface ITombstone {
/** Represents a deleted item. */
const Tombstone: React.FC<ITombstone> = ({ id, onMoveUp, onMoveDown, deleted }) => {
const node = useRef<HTMLDivElement>(null);
const handlers = {
moveUp: () => onMoveUp?.(id),
moveDown: () => onMoveDown?.(id),
};
return (
<HotKeys handlers={handlers}>
<HotKeys handlers={handlers} attachRef={node}>
<div className='h-16'>
<div
className='focusable flex h-[42px] items-center justify-center rounded-lg border-2 border-gray-200 text-center dark:border-gray-800'

View File

@ -1,5 +1,5 @@
import clsx from 'clsx';
import React from 'react';
import React, { useRef } from 'react';
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
import { Link } from 'react-router-dom';
@ -96,6 +96,8 @@ const InteractionRequest: React.FC<IInteractionRequest> = ({
const { account: ownAccount } = useOwnAccount();
const { account } = useAccount(interactionRequest.account_id);
const node = useRef<HTMLDivElement>(null);
const { mutate: authorize } = useAuthorizeInteractionRequestMutation(interactionRequest.id);
const { mutate: reject } = useRejectInteractionRequestMutation(interactionRequest.id);
@ -173,7 +175,7 @@ const InteractionRequest: React.FC<IInteractionRequest> = ({
};
return (
<HotKeys handlers={handlers}>
<HotKeys handlers={handlers} attachRef={node}>
<div className='notification focusable' tabIndex={0}>
<div className='focusable p-4'>
<Stack space={2}>

View File

@ -411,7 +411,7 @@ const Notification: React.FC<INotification> = (props) => {
);
return (
<HotKeys handlers={handlers} data-testid='notification' attach={node.current || undefined}>
<HotKeys handlers={handlers} data-testid='notification' attachRef={node}>
<div
className='notification focusable'
tabIndex={0}

View File

@ -346,7 +346,7 @@ const Thread: React.FC<IThread> = ({
{status.deleted ? (
<Tombstone id={status.id} onMoveUp={handleMoveUp} onMoveDown={handleMoveDown} deleted />
) : (
<HotKeys handlers={handlers} attach={statusRef.current || undefined}>
<HotKeys handlers={handlers} attachRef={statusRef}>
<div
ref={statusRef}
className='focusable relative'

View File

@ -1642,10 +1642,10 @@
resolved "https://registry.yarnpkg.com/@mdn/browser-compat-data/-/browser-compat-data-5.6.26.tgz#0d1a64cf0a04a29f4283bbc1f5a313f355f9c73d"
integrity sha512-7NdgdOR7lkzrN70zGSULmrcvKyi/aJjpTJRCbuy8IZuHiLkPTvsr10jW0MJgWzK2l2wTmhdQvegTw6yNU5AVNQ==
"@mkljczk/react-hotkeys@^1.2.2":
version "1.2.2"
resolved "https://registry.yarnpkg.com/@mkljczk/react-hotkeys/-/react-hotkeys-1.2.2.tgz#9e27d1f54f6fcc96657643d07534cf71987eba09"
integrity sha512-BGGdSdPtpu+XbqvfO3gxzUNHzMJN0ztmQoIuqEEPBsogH6oAzlGdFnfy5VDxExJ+8LufmLHHr3yZ7eiqYqGvog==
"@mkljczk/react-hotkeys@^1.3.0":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@mkljczk/react-hotkeys/-/react-hotkeys-1.3.0.tgz#936069e8462c56dfac7a8e1e4db4ae8d23c1dc69"
integrity sha512-xfcYZ/J2YCpakRDEZd0ZdCQ2wx75Pmub9JksyBWX+W56UGDeMbmI8nPedG6V89JhUlgFsijZVVlVeDHIuzG6Hw==
dependencies:
lodash "^4.17.21"
mousetrap "^1.6.5"