Skip to content

Commit ea4a1cb

Browse files
authored
Regenerate the package-lock.json file (#2821)
* Regenerate the package-lock.json file * Remove obsolete type directives * Work around new nwsapi bug
1 parent 6e5cbe1 commit ea4a1cb

File tree

7 files changed

+16285
-42917
lines changed

7 files changed

+16285
-42917
lines changed

package-lock.json

+16,273-42,900
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/circuit-ui/components/Button/base.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export function createButtonComponent<Props>(
153153
as,
154154
locale,
155155
...sharedProps
156-
} = useI18n(mapProps(props), translations);
156+
} = useI18n(mapProps(props as Props), translations);
157157

158158
const components = useComponents();
159159
const Link = components.Link as AsPropType;

packages/circuit-ui/components/DateInput/components/Dialog.tsx

-3
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,9 @@ export const Dialog = forwardRef<HTMLDialogElement, DialogProps>(
139139

140140
return (
141141
<>
142-
{/* @ts-expect-error "Expression produces a union type that is too complex to represent" */}
143142
<dialog
144143
ref={applyMultipleRefs(ref, dialogRef)}
145144
className={clsx(classes.dialog, className)}
146-
// @ts-expect-error z-index can be a string
147145
style={{
148146
...style,
149147
zIndex: zIndex || 'var(--cui-z-index-modal)',
@@ -155,7 +153,6 @@ export const Dialog = forwardRef<HTMLDialogElement, DialogProps>(
155153
<div
156154
className={classes.backdrop}
157155
style={{
158-
// @ts-expect-error z-index can be a string
159156
zIndex: `calc(${zIndex?.toString() || 'var(--cui-z-index-modal)'} - 1)`,
160157
}}
161158
/>

packages/circuit-ui/components/Popover/Popover.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -332,14 +332,12 @@ export const Popover = ({
332332
<Portal>
333333
<div
334334
className={clsx(classes.overlay, isOpen && classes.open)}
335-
// @ts-expect-error z-index can be a string
336335
style={{ zIndex: zIndex || 'var(--cui-z-index-popover)' }}
337336
/>
338337
<div
339338
{...props}
340339
ref={refs.setFloating}
341340
className={clsx(classes.wrapper, isOpen && classes.open, className)}
342-
// @ts-expect-error z-index can be a string
343341
style={
344342
isMobile
345343
? mobileStyles

packages/circuit-ui/components/Toggletip/Toggletip.tsx

-3
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ export const Toggletip = forwardRef<HTMLDialogElement, ToggletipProps>(
251251
onClick={handleReferenceClick}
252252
/>
253253
{/* eslint-disable jsx-a11y/no-autofocus */}
254-
{/* @ts-expect-error "Expression produces a union type that is too complex to represent" */}
255254
<dialog
256255
{...rest}
257256
open={defaultOpen}
@@ -260,7 +259,6 @@ export const Toggletip = forwardRef<HTMLDialogElement, ToggletipProps>(
260259
aria-labelledby={headline ? headlineId : bodyId}
261260
aria-describedby={headline ? bodyId : undefined}
262261
className={clsx(classes.base, className)}
263-
// @ts-expect-error z-index can be a string
264262
style={{
265263
...style,
266264
...dialogStyles,
@@ -314,7 +312,6 @@ export const Toggletip = forwardRef<HTMLDialogElement, ToggletipProps>(
314312
<div
315313
className={classes.backdrop}
316314
style={{
317-
// @ts-expect-error z-index can be a string
318315
zIndex: `calc(${zIndex?.toString() || 'var(--cui-z-index-modal)'} - 1)`,
319316
}}
320317
/>

packages/circuit-ui/components/Tooltip/Tooltip.tsx

+9-8
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,15 @@ export const Tooltip = forwardRef<HTMLDivElement, TooltipProps>(
136136

137137
const handleFocus: FocusEventHandler = useCallback(
138138
(event) => {
139-
// Vitest and Jest use nwsapi to mock the `Element.matches` API.
140-
// Unfortunately, it doesn't support the `:focus-visible` selector yet.
141-
// See https://github.com/dperini/nwsapi/issues/54
142-
try {
143-
if (event.currentTarget.matches(':focus-visible')) {
144-
handleOpen();
145-
}
146-
} catch (_error) {
139+
if (
140+
event.currentTarget.matches(':focus-visible') ||
141+
// Vitest and Jest use nwsapi to mock the `Element.matches` API.
142+
// It has a bug where `:focus-visible` is not matched unless
143+
// the element has the `autofocus` property set.
144+
// https://github.com/dperini/nwsapi/issues/122
145+
(process.env.NODE_ENV === 'test' &&
146+
event.currentTarget.matches(':focus'))
147+
) {
147148
handleOpen();
148149
}
149150
},

templates/nextjs/template/app/preload-resources.ts

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import ReactDOM from 'react-dom';
44

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

0 commit comments

Comments
 (0)