Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate the package-lock.json file #2821

Merged
merged 3 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59,173 changes: 16,273 additions & 42,900 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/circuit-ui/components/Button/base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export function createButtonComponent<Props>(
as,
locale,
...sharedProps
} = useI18n(mapProps(props), translations);
} = useI18n(mapProps(props as Props), translations);

const components = useComponents();
const Link = components.Link as AsPropType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,9 @@ export const Dialog = forwardRef<HTMLDialogElement, DialogProps>(

return (
<>
{/* @ts-expect-error "Expression produces a union type that is too complex to represent" */}
<dialog
ref={applyMultipleRefs(ref, dialogRef)}
className={clsx(classes.dialog, className)}
// @ts-expect-error z-index can be a string
style={{
...style,
zIndex: zIndex || 'var(--cui-z-index-modal)',
Expand All @@ -155,7 +153,6 @@ export const Dialog = forwardRef<HTMLDialogElement, DialogProps>(
<div
className={classes.backdrop}
style={{
// @ts-expect-error z-index can be a string
zIndex: `calc(${zIndex?.toString() || 'var(--cui-z-index-modal)'} - 1)`,
}}
/>
Expand Down
2 changes: 0 additions & 2 deletions packages/circuit-ui/components/Popover/Popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -332,14 +332,12 @@ export const Popover = ({
<Portal>
<div
className={clsx(classes.overlay, isOpen && classes.open)}
// @ts-expect-error z-index can be a string
style={{ zIndex: zIndex || 'var(--cui-z-index-popover)' }}
/>
<div
{...props}
ref={refs.setFloating}
className={clsx(classes.wrapper, isOpen && classes.open, className)}
// @ts-expect-error z-index can be a string
style={
isMobile
? mobileStyles
Expand Down
3 changes: 0 additions & 3 deletions packages/circuit-ui/components/Toggletip/Toggletip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ export const Toggletip = forwardRef<HTMLDialogElement, ToggletipProps>(
onClick={handleReferenceClick}
/>
{/* eslint-disable jsx-a11y/no-autofocus */}
{/* @ts-expect-error "Expression produces a union type that is too complex to represent" */}
<dialog
{...rest}
open={defaultOpen}
Expand All @@ -260,7 +259,6 @@ export const Toggletip = forwardRef<HTMLDialogElement, ToggletipProps>(
aria-labelledby={headline ? headlineId : bodyId}
aria-describedby={headline ? bodyId : undefined}
className={clsx(classes.base, className)}
// @ts-expect-error z-index can be a string
style={{
...style,
...dialogStyles,
Expand Down Expand Up @@ -314,7 +312,6 @@ export const Toggletip = forwardRef<HTMLDialogElement, ToggletipProps>(
<div
className={classes.backdrop}
style={{
// @ts-expect-error z-index can be a string
zIndex: `calc(${zIndex?.toString() || 'var(--cui-z-index-modal)'} - 1)`,
}}
/>
Expand Down
17 changes: 9 additions & 8 deletions packages/circuit-ui/components/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,15 @@ export const Tooltip = forwardRef<HTMLDivElement, TooltipProps>(

const handleFocus: FocusEventHandler = useCallback(
(event) => {
// Vitest and Jest use nwsapi to mock the `Element.matches` API.
// Unfortunately, it doesn't support the `:focus-visible` selector yet.
// See https://github.com/dperini/nwsapi/issues/54
try {
if (event.currentTarget.matches(':focus-visible')) {
handleOpen();
}
} catch (_error) {
if (
event.currentTarget.matches(':focus-visible') ||
// Vitest and Jest use nwsapi to mock the `Element.matches` API.
// It has a bug where `:focus-visible` is not matched unless
// the element has the `autofocus` property set.
// https://github.com/dperini/nwsapi/issues/122
(process.env.NODE_ENV === 'test' &&
event.currentTarget.matches(':focus'))
) {
handleOpen();
}
},
Expand Down
2 changes: 2 additions & 0 deletions templates/nextjs/template/app/preload-resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import ReactDOM from 'react-dom';

export function PreloadResources() {
// @ts-expect-error This API is available in the React canary used by Next.js
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
ReactDOM.preload(
'https://static.sumup.com/fonts/Inter/Inter-normal-latin.woff2',
{ as: 'font' },
Expand Down
Loading