Skip to content
Open
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
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
"@types/react": "^17.0.37",
"@types/react-dom": "^17.0.11",
"@types/react-test-renderer": "^17.0.1",
"@types/styled-components": "^5.1.1",
"@types/styled-system": "^5.1.10",
"@typescript-eslint/eslint-plugin": "^5.6.0",
"@typescript-eslint/parser": "^5.6.0",
Expand Down Expand Up @@ -117,7 +116,6 @@
"react-is": "^17.0.2",
"react-test-renderer": "^17.0.2",
"start-server-and-test": "^1.15.2",
"styled-components": "^5.1.1",
"stylelint": "^10.0.1",
"stylelint-config-recommended": "^2.2.0",
"stylelint-config-styled-components": "^0.1.1",
Expand All @@ -135,13 +133,14 @@
"moment": "^2.24.0",
"polaris-glints": "^15.12.0",
"react-id-generator": "^3.0.1",
"styled-system": "^5.1.5"
"styled-components": "^6.0.3",
"styled-system": "^5.1.5",
"stylis": "^4.3.0"
},
"peerDependencies": {
"lodash-es": "^4.0.0",
"react": "^16.3.0 || ^17",
"react-dom": "^16.3.0 || ^17",
"styled-components": "^4.0.0 || ^5.0.0"
"react-dom": "^16.3.0 || ^17"
},
"jest": {
"moduleNameMapper": {
Expand Down
5 changes: 3 additions & 2 deletions src/@next/ActionList/ActionItem.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { MouseEvent } from 'react';
import { Typography } from '../Typography';
import { Neutral } from '../utilities/colors';
import { Item } from './ActionList';
Expand All @@ -10,11 +10,12 @@ import {

export const ActionItem = ({ content, description, icon, action }: Item) => {
const hasDescription = !!description;

return (
<StyledActionListItemWrapper
tabIndex={0}
role="button"
onMouseUp={e => e.currentTarget.blur()}
onMouseUp={(e: MouseEvent<HTMLDivElement>) => e.currentTarget.blur()}
onClick={() => action?.()}
>
<StyledActionListItem>
Expand Down
4 changes: 2 additions & 2 deletions src/@next/Button/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { MouseEvent } from 'react';
import { Spinner } from '../Spinner/Spinner';
import { Typography } from '../Typography';
import { StyledButton } from './ButtonStyle';
Expand Down Expand Up @@ -53,7 +53,7 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
data-loading={loading}
data-icon={!!icon}
{...otherProps}
onMouseUp={e => e.currentTarget.blur()}
onMouseUp={(e: MouseEvent<HTMLButtonElement>) => e.currentTarget.blur()}
>
{loading && <Spinner />}
{renderIcon('left')}
Expand Down
4 changes: 2 additions & 2 deletions src/@next/Modal/Modal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect } from 'react';
import React, { MouseEvent, useEffect } from 'react';
import { ComponentAction } from '../../types/componentAction';
import { Button, PrimaryButton } from '../Button';
import { ButtonGroup } from '../ButtonGroup';
Expand Down Expand Up @@ -124,7 +124,7 @@ export const Modal = React.forwardRef<HTMLDivElement, ModalProps>(
>
<StyledModalContainer
ref={ref}
onClick={e => e.stopPropagation()}
onClick={(e: MouseEvent<HTMLDivElement>) => e.stopPropagation()}
{...props}
>
{header && (
Expand Down
12 changes: 6 additions & 6 deletions src/@next/Pagination/SimplePagination.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import React, { useState } from 'react';
import React, { ChangeEvent, useState } from 'react';
import { Typography } from '../Typography';
import {
SimplePaginationStyledNav,
StyledActiveSimplePaginationButton,
StyledSimplePaginationInput,
StyledSimplePaginationButton,
SimplePaginationStyledNav,
StyledSimplePaginationInput,
} from './PaginationStyle';
import { NextStepper, PreviousStepper } from './Stepper';
import {
PaginationProps,
defaultPageSize,
getAllPages,
PaginationProps,
} from './paginationUtils';
import { NextStepper, PreviousStepper } from './Stepper';

export const SimplePagination = React.forwardRef<HTMLElement, PaginationProps>(
function SimplePagination(
Expand Down Expand Up @@ -76,7 +76,7 @@ export const SimplePagination = React.forwardRef<HTMLElement, PaginationProps>(
data-testid="current-page-input"
autoFocus
onFocus={handleFocus}
onChange={e => {
onChange={(e: ChangeEvent<HTMLInputElement>) => {
handlePageNumberChange(Number(e.currentTarget.value));
}}
onBlur={() => setEditMode(false)}
Expand Down
8 changes: 4 additions & 4 deletions src/@next/RadioButton/RadioButton.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import React, { MouseEvent } from 'react';
import { Colors } from '..';
import { Typography } from '../Typography';
import {
LabelWrapper,
RadioButtonInput,
RadioButtonWrapper,
} from './RadioButtonStyle';
import { Typography } from '../Typography';
import { Colors } from '..';

export interface RadioButtonProps
extends Omit<React.HTMLAttributes<HTMLInputElement>, 'onChange'> {
Expand Down Expand Up @@ -45,7 +45,7 @@ export const RadioButton = React.forwardRef<HTMLInputElement, RadioButtonProps>(
value={value}
type="radio"
onChange={onChange}
onMouseDown={e => e.preventDefault()}
onMouseDown={(e: MouseEvent<HTMLInputElement>) => e.preventDefault()}
{...props}
/>
<LabelWrapper data-disabled={disabled}>
Expand Down
6 changes: 4 additions & 2 deletions src/@next/Select/components/Activator/ActivatorTextInput.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useRef, useState } from 'react';
import React, { ChangeEvent, useEffect, useRef, useState } from 'react';

import { Icon } from '../../../Icon';
import { Option } from '../../../Menu';
Expand Down Expand Up @@ -80,7 +80,9 @@ export const ActivatorTextInput = ({
className="select-input"
ref={activatorRef}
prefix={prefix}
onChange={value => handleChange({ value })}
onChange={(value: ChangeEvent<HTMLInputElement>) =>
handleChange({ value })
}
onFocus={onFocus}
error={hasError}
disabled={disabled}
Expand Down
4 changes: 2 additions & 2 deletions src/@next/SideSheet/SideSheet.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useState, useRef } from 'react';
import React, { useEffect, useState, useRef, MouseEvent } from 'react';
import { Button, PrimaryButton } from '../Button';
import { ButtonGroup } from '../ButtonGroup';
import { ComponentAction } from '../../types/componentAction';
Expand Down Expand Up @@ -91,7 +91,7 @@ const SideSheet = React.forwardRef<HTMLDivElement, SideSheetProps>(
<StyledSideSheetContainer
className={`${isClosedAnimation ? 'closed' : ''}`}
ref={ref}
onClick={e => e.stopPropagation()}
onClick={(e: MouseEvent<HTMLDivElement>) => e.stopPropagation()}
{...props}
>
<StyledSideSheetHeader>
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"compilerOptions": {
"alwaysStrict": true,
"skipLibCheck": true,
"declaration": true,
"emitDeclarationOnly": true,
"jsx": "preserve",
Expand All @@ -18,7 +19,6 @@
"node",
"react",
"react-dom",
// "storybook__react",
"styled-components"
]
},
Expand Down
Loading