Skip to content

Commit 5a59083

Browse files
committed
Responsive Table
1 parent 9d17972 commit 5a59083

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+734
-347
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nhsuk-react-components",
3-
"version": "1.2.8",
3+
"version": "2.0.0-test.1",
44
"author": {
55
"email": "[email protected]",
66
"name": "Thomas Judd-Cooper",
@@ -83,7 +83,7 @@
8383
"test": "jest",
8484
"test:ci": "jest --coverage",
8585
"test:watch": "jest --watch",
86-
"lint": "eslint --fix -c .eslintrc.js --ext .ts --ext .tsx src/*.ts src/components/**/*.ts src/util/*.ts",
86+
"lint": "eslint --fix -c .eslintrc.js --ext .ts --ext .tsx src/*.ts src/components/**/*.ts src/components/**/*.tsx src/util/*.ts src/util/*.tsx",
8787
"prebuild": "yarn lint && yarn test --coverage",
8888
"build-storybook": "build-storybook",
8989
"prepare": "yarn build"

src/components/back-link/BackLink.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ import classNames from 'classnames';
33
import { ChevronLeft } from '../icons';
44
import type { AsElementLink } from '../../util/types/LinkTypes';
55

6-
const BackLink: React.FC<AsElementLink<HTMLAnchorElement>> = ({
7-
children,
8-
className,
6+
const BackLink: React.FC<AsElementLink<HTMLAnchorElement>> = ({
7+
children,
8+
className,
99
asElement: Component = 'a',
1010
...rest }) => (
11-
<div className="nhsuk-back-link">
12-
<Component className={classNames('nhsuk-back-link__link', className)} {...rest}>
13-
<ChevronLeft />
14-
{children}
15-
</Component>
16-
</div>
11+
<div className="nhsuk-back-link">
12+
<Component className={classNames('nhsuk-back-link__link', className)} {...rest}>
13+
<ChevronLeft />
14+
{children}
15+
</Component>
16+
</div>
1717
);
1818

1919
export default BackLink;

src/components/breadcrumb/Breadcrumb.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { AsElementLink } from '../../util/types/LinkTypes';
66

77
type Item = React.FC<AsElementLink<HTMLAnchorElement>>;
88

9-
const Item: Item = ({ className, children, asElement: Component = 'a', ...rest }) => (
9+
const Item: Item = ({ className, children, asElement: Component = 'a', ...rest }) => (
1010
<li className="nhsuk-breadcrumb__item">
1111
<Component className={classNames('nhsuk-breadcrumb__link', className)} {...rest}>
1212
{children}

src/components/button/Button.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ interface ButtonLinkProps extends HTMLProps<HTMLAnchorElement> {
1818

1919
export const Button: React.FC<ButtonProps> = ({
2020
className,
21-
type,
2221
disabled,
2322
secondary,
2423
reverse,
@@ -35,7 +34,6 @@ export const Button: React.FC<ButtonProps> = ({
3534
)}
3635
disabled={disabled}
3736
aria-disabled={disabled ? 'true' : 'false'}
38-
type={type}
3937
{...rest}
4038
/>
4139
);

src/components/checkboxes/Checkboxes.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ type CheckboxesState = {
1515
};
1616

1717
class Checkboxes extends PureComponent<CheckboxesProps, CheckboxesState> {
18+
static Box = Box;
19+
1820
private boxCount: number = 0;
1921

2022
private boxReferences: Array<string> = [];
@@ -75,8 +77,6 @@ class Checkboxes extends PureComponent<CheckboxesProps, CheckboxesState> {
7577
this.boxIds = {};
7678
};
7779

78-
static Box = Box;
79-
8080
render() {
8181
const { children, ...rest } = this.props;
8282
return (

src/components/date-input/DateInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type DateInputChangeEvent = ChangeEvent<HTMLInputElement> & {
1717

1818
interface DateInputProps
1919
extends Omit<HTMLProps<HTMLDivElement>, 'value' | 'defaultValue'>,
20-
FormElementProps {
20+
FormElementProps {
2121
autoSelectNext?: boolean;
2222
value?: Partial<DateInputValue>;
2323
defaultValue?: Partial<DateInputValue>;

src/components/fieldset/Fieldset.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ interface FieldsetProps extends HTMLProps<HTMLFieldSetElement> {
5050
type FieldsetState = { registeredComponents: Array<string>; erroredComponents: Array<string> };
5151

5252
class Fieldset extends PureComponent<FieldsetProps, FieldsetState> {
53+
static Legend = Legend;
54+
5355
constructor(props: FieldsetProps) {
5456
super(props);
5557
this.state = {
@@ -92,8 +94,6 @@ class Fieldset extends PureComponent<FieldsetProps, FieldsetState> {
9294
});
9395
};
9496

95-
static Legend = Legend;
96-
9797
render() {
9898
const { className, disableErrorLine, ...rest } = this.props;
9999
const contextValue: IFieldsetContext = {

src/components/images/Images.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ interface ImageProps extends HTMLProps<HTMLImageElement> {
1010

1111
const Images: React.FC<ImageProps> = ({ className, src, caption, ...rest }) => (
1212
<figure className="nhsuk-image">
13+
{/* eslint-disable-next-line jsx-a11y/alt-text */}
1314
<img className={classNames('nhsuk-image__img', className)} {...rest} />
1415
{caption ? <figcaption className="nhsuk-image__caption">{caption}</figcaption> : null}
1516
</figure>

src/components/label/Label.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export interface LabelProps extends Omit<HTMLProps<HTMLLabelElement>, 'size'> {
99
}
1010

1111
const BaseLabel: React.FC<LabelProps> = ({ className, bold, size, isPageHeading, ...rest }) => (
12+
// eslint-disable-next-line jsx-a11y/label-has-associated-control
1213
<label
1314
className={classNames(
1415
'nhsuk-label',

src/components/list-panel/ListPanel.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import React, { HTMLProps } from 'react';
22
import classNames from 'classnames';
33
import type { AsElementLink } from '../../util/types/LinkTypes';
44

5-
65
interface PanelProps extends HTMLProps<HTMLDivElement> {
76
labelProps?: HTMLProps<HTMLHeadingElement>;
87
backToTop?: boolean;

0 commit comments

Comments
 (0)