Skip to content
This repository was archived by the owner on Dec 1, 2025. It is now read-only.
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"docz": "^2.3.1",
"gatsby-plugin-sass": "^3.2.0",
"gatsby-theme-docz": "^2.3.1",
"govuk-frontend": "^3.14.0",
"govuk-frontend": "4.0.1",
"husky": "^4.3.8",
"identity-obj-proxy": "^3.0.0",
"immutability-helper": "^3.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"clean": "rimraf lib"
},
"peerDependencies": {
"@tpr/theming": "^2.4.0",
"@tpr/theming": "^3.0.0",
"react": "^16.14.0",
"react-dom": "^16.14.0"
},
Expand Down
132 changes: 66 additions & 66 deletions packages/forms/package.json
Original file line number Diff line number Diff line change
@@ -1,68 +1,68 @@
{
"name": "@tpr/forms",
"version": "5.0.0",
"description": "TPR Forms components",
"author": "David Alekna <david.alekna@tpr.gov.uk>",
"license": "MIT",
"main": "./lib/index.cjs.js",
"module": "./lib/index.js",
"typings": "./lib/index.d.ts",
"sideEffects": false,
"files": [
"lib/*"
],
"repository": {
"type": "git",
"url": "https://dev.azure.com/thepensionsregulator/TPR/_git/react-components.git"
},
"bugs": {
"url": "https://dev.azure.com/thepensionsregulator/TPR/_git/react-components/issues"
},
"homepage": "https://dev.azure.com/thepensionsregulator/TPR/_git/react-components#readme",
"keywords": [
"tpr"
],
"scripts": {
"prepare": "yarn build",
"copycss": "copyfiles -u 1 \"./src/**/*.{css,scss}\" \"./lib/\" && echo @tpr/forms css files copied.",
"bundle": "cross-env-shell \"../../node_modules/.bin/rollup\" -c rollup.config.js",
"build": "tsc -b && yarn copycss",
"clean": "rimraf lib"
},
"peerDependencies": {
"@tpr/core": "^3.0.0",
"@tpr/icons": "^3.1.10",
"@tpr/theming": "^2.4.0",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"react-helmet": "^6.1.0"
},
"dependencies": {
"@financial-times/accessible-autocomplete": "^2.2.1",
"@tpr/govuk-react-jsx": "^6.2.1",
"@types/lodash.isequal": "^4.5.5",
"@types/lodash.merge": "^4.6.6",
"@types/qs": "^6.9.5",
"date-fns": "^2.17.0",
"final-form": "^4.20.1",
"govuk-frontend": "^3.14.0",
"lodash.isequal": "^4.5.0",
"lodash.merge": "^4.6.2",
"qs": "^6.9.6",
"react-final-form": "^6.5.2",
"tslib": "^2.1.0"
},
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@tpr/core": "file:../core",
"@tpr/icons": "file:../icons",
"@tpr/theming": "file:../theming",
"cross-env": "^7.0.3",
"node-sass": "^5.0.0",
"react": "file:../../node_modules/react",
"react-dom": "file:../../node_modules/react-dom"
},
"gitHead": "57aec9c9de22596d6343bae07eb6b198322a0bee"
"name": "@tpr/forms",
"version": "5.0.0",
"description": "TPR Forms components",
"author": "David Alekna <david.alekna@tpr.gov.uk>",
"license": "MIT",
"main": "./lib/index.cjs.js",
"module": "./lib/index.js",
"typings": "./lib/index.d.ts",
"sideEffects": false,
"files": [
"lib/*"
],
"repository": {
"type": "git",
"url": "https://dev.azure.com/thepensionsregulator/TPR/_git/react-components.git"
},
"bugs": {
"url": "https://dev.azure.com/thepensionsregulator/TPR/_git/react-components/issues"
},
"homepage": "https://dev.azure.com/thepensionsregulator/TPR/_git/react-components#readme",
"keywords": [
"tpr"
],
"scripts": {
"prepare": "yarn build",
"copycss": "copyfiles -u 1 \"./src/**/*.{css,scss}\" \"./lib/\" && echo @tpr/forms css files copied.",
"bundle": "cross-env-shell \"../../node_modules/.bin/rollup\" -c rollup.config.js",
"build": "tsc -b && yarn copycss",
"clean": "rimraf lib"
},
"peerDependencies": {
"@tpr/core": "^4.0.0",
"@tpr/icons": "^4.0.0",
"@tpr/theming": "^3.0.0",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"react-helmet": "^6.1.0"
},
"dependencies": {
"@financial-times/accessible-autocomplete": "^2.2.1",
"@tpr/govuk-react-jsx": "^7.0.1",
"@types/lodash.isequal": "^4.5.5",
"@types/lodash.merge": "^4.6.6",
"@types/qs": "^6.9.5",
"date-fns": "^2.17.0",
"final-form": "^4.20.1",
"govuk-frontend": "^4.0.1",
"lodash.isequal": "^4.5.0",
"lodash.merge": "^4.6.2",
"qs": "^6.9.6",
"react-final-form": "^6.5.2",
"tslib": "^2.1.0"
},
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@tpr/core": "file:../core",
"@tpr/icons": "file:../icons",
"@tpr/theming": "file:../theming",
"cross-env": "^7.0.3",
"node-sass": "^5.0.0",
"react": "file:../../node_modules/react",
"react-dom": "file:../../node_modules/react-dom"
},
"gitHead": "57aec9c9de22596d6343bae07eb6b198322a0bee"
}
4 changes: 2 additions & 2 deletions packages/icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"clean": "rimraf lib"
},
"peerDependencies": {
"@tpr/core": "^3.0.0",
"@tpr/theming": "^2.4.0",
"@tpr/core": "^4.0.0",
"@tpr/theming": "^3.0.0",
"react": "^16.14.0",
"react-dom": "^16.14.0"
},
Expand Down
29 changes: 1 addition & 28 deletions packages/icons/src/__tests__/icons.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ import {
ArrowLeft,
ArrowRight,
} from '../components/arrows/arrows';
import {
CheckedCircle,
ErrorCircle,
WarningCircle,
} from '../components/circle/circle';
import { CheckedCircle, ErrorCircle } from '../components/circle/circle';
import { Cross } from '../components/cross/cross';
import {
CheckboxChecked,
Expand Down Expand Up @@ -103,29 +99,6 @@ describe('Icons', () => {
expect(icon).toContainElement(title);
expect(icon).not.toHaveAttribute('aria-hidden');
});

test('Warning Circle to render without error', () => {
const { getByTestId } = render(<WarningCircle />);
expect(getByTestId('warning-circle')).toBeDefined();
});

test('Warning Circle to be aria-hidden by default', () => {
const { getByTestId } = render(<WarningCircle />);
expect(getByTestId('warning-circle')).toHaveAttribute(
'aria-hidden',
'true',
);
});

test('Warning Circle to not be aria-hidden if there is alternative text', () => {
const { getByTestId, getByText } = render(
<WarningCircle alternativeText="Test label" />,
);
const icon = getByTestId('warning-circle');
const title = getByText('Test label');
expect(icon).toContainElement(title);
expect(icon).not.toHaveAttribute('aria-hidden');
});
});

describe('Cross', () => {
Expand Down
11 changes: 0 additions & 11 deletions packages/icons/src/components/circle/circle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,3 @@ export const ErrorCircle: React.FC<SVGProps> = (props) => {
</SVG>
);
};

export const WarningCircle: React.FC<SVGProps> = (props) => {
return (
<SVG testId="warning-circle" width="22" viewBox="0 0 22 22" {...props}>
<path
d="M241.259,11476.006a11,11,0,1,0,11,11A11,11,0,0,0,241.259,11476.006Zm1.181,17.4a1.6,1.6,0,0,1-1.172.416,1.642,1.642,0,0,1-1.19-.408,1.81,1.81,0,0,1-.009-2.311,1.671,1.671,0,0,1,1.2-.4,1.624,1.624,0,0,1,1.177.4,1.78,1.78,0,0,1,0,2.294Zm-.046-4.778h-2.234l-.467-8.439h3.168Z"
transform="translate(-230.259 -11476.006)"
/>
</SVG>
);
};
8 changes: 0 additions & 8 deletions packages/icons/src/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
RadioButtonUnchecked,
CheckedCircle,
ErrorCircle,
WarningCircle,
ArrowUp,
ArrowDown,
ArrowLeft,
Expand Down Expand Up @@ -40,7 +39,6 @@ import { CheckboxChecked, CheckboxBlank } from '@tpr/icons';
| RadioButtonUnchecked |
| CheckedCircle |
| ErrorCircle |
| WarningCircle |
| ArrowUp |
| ArrowDown |
| ArrowLeft |
Expand Down Expand Up @@ -75,12 +73,6 @@ import { CheckboxChecked, CheckboxBlank } from '@tpr/icons';
<ErrorCircle fill="#a91717" />
</Playground>

## Warning Circle

<Playground>
<WarningCircle fill="#0b0030" />
</Playground>

## Arrow Up

<Playground>
Expand Down
133 changes: 67 additions & 66 deletions packages/layout/package.json
Original file line number Diff line number Diff line change
@@ -1,68 +1,69 @@
{
"name": "@tpr/layout",
"version": "5.0.0",
"description": "TPR Layout components",
"author": "David Alekna <david.alekna@tpr.gov.uk>",
"license": "MIT",
"main": "./lib/index.cjs.js",
"module": "./lib/index.js",
"typings": "./lib/index.d.ts",
"sideEffects": false,
"files": [
"lib/*"
],
"repository": {
"type": "git",
"url": "https://github.com/thepensionsregulator/react-components.git"
},
"bugs": {
"url": "https://github.com/thepensionsregulator/react-components/issues"
},
"homepage": "https://github.com/thepensionsregulator/react-components#readme",
"keywords": [
"tpr"
],
"scripts": {
"prepare": "yarn build",
"test": "jest --coverage",
"test:watch": "jest --watch",
"copycss": "copyfiles -u 1 \"./src/**/*.{css,scss}\" \"./lib/\" && echo @tpr/layout css files copied.",
"bundle": "cross-env-shell \"../../node_modules/.bin/rollup\" -c rollup.config.js",
"build": "tsc -b && yarn copycss",
"clean": "rimraf lib"
},
"peerDependencies": {
"@tpr/core": "^3.0.0",
"@tpr/forms": "^4.0.8",
"@tpr/icons": "^3.1.10",
"@tpr/theming": "^2.4.0",
"react": "^16.14.0",
"react-dom": "^16.14.0"
},
"dependencies": {
"@types/lodash.merge": "^4.6.6",
"@xstate/react": "^1.2.2",
"date-fns": "^2.17.0",
"final-form": "^4.20.1",
"lodash.merge": "^4.6.2",
"qs": "^6.9.6",
"react-collapsible": "^2.8.3",
"react-final-form": "^6.5.2",
"tslib": "^2.1.0",
"xstate": "^4.16.2"
},
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@tpr/core": "file:../core",
"@tpr/forms": "file:../forms",
"@tpr/icons": "file:../icons",
"@tpr/theming": "file:../theming",
"cross-env": "^7.0.3",
"node-sass": "^5.0.0",
"react": "file:../../node_modules/react",
"react-dom": "file:../../node_modules/react-dom"
},
"gitHead": "5c43a52eaf98d8e7e9e29581196655397b2d15d9"
"name": "@tpr/layout",
"version": "5.0.0",
"description": "TPR Layout components",
"author": "David Alekna <david.alekna@tpr.gov.uk>",
"license": "MIT",
"main": "./lib/index.cjs.js",
"module": "./lib/index.js",
"typings": "./lib/index.d.ts",
"sideEffects": false,
"files": [
"lib/*"
],
"repository": {
"type": "git",
"url": "https://github.com/thepensionsregulator/react-components.git"
},
"bugs": {
"url": "https://github.com/thepensionsregulator/react-components/issues"
},
"homepage": "https://github.com/thepensionsregulator/react-components#readme",
"keywords": [
"tpr"
],
"scripts": {
"prepare": "yarn build",
"test": "jest --coverage",
"test:watch": "jest --watch",
"copycss": "copyfiles -u 1 \"./src/**/*.{css,scss}\" \"./lib/\" && echo @tpr/layout css files copied.",
"bundle": "cross-env-shell \"../../node_modules/.bin/rollup\" -c rollup.config.js",
"build": "tsc -b && yarn copycss",
"clean": "rimraf lib"
},
"peerDependencies": {
"@tpr/core": "^4.0.0",
"@tpr/forms": "^5.0.0",
"@tpr/icons": "^4.0.0",
"@tpr/theming": "^3.0.0",
"react": "^16.14.0",
"react-dom": "^16.14.0"
},
"dependencies": {
"@tpr/govuk-react-jsx": "^7.0.1",
"@types/lodash.merge": "^4.6.6",
"@xstate/react": "^1.2.2",
"date-fns": "^2.17.0",
"final-form": "^4.20.1",
"lodash.merge": "^4.6.2",
"qs": "^6.9.6",
"react-collapsible": "^2.8.3",
"react-final-form": "^6.5.2",
"tslib": "^2.1.0",
"xstate": "^4.16.2"
},
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@tpr/core": "file:../core",
"@tpr/forms": "file:../forms",
"@tpr/icons": "file:../icons",
"@tpr/theming": "file:../theming",
"cross-env": "^7.0.3",
"node-sass": "^5.0.0",
"react": "file:../../node_modules/react",
"react-dom": "file:../../node_modules/react-dom"
},
"gitHead": "5c43a52eaf98d8e7e9e29581196655397b2d15d9"
}
1 change: 1 addition & 0 deletions packages/layout/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default rollup({
'@tpr/forms',
'@tpr/icons',
'@tpr/theming',
'@tpr/govuk-react-jsx',
'@types/lodash.merge',
'@xstate/react',
'final-form',
Expand Down
Loading