From a74c87b2177f0f8bee1779972a66058bfb6cddda Mon Sep 17 00:00:00 2001 From: Ben Newcombe Date: Thu, 6 Dec 2018 16:40:03 +0000 Subject: [PATCH 1/4] Add Copyright component --- .../components/psammead-copyright/README.md | 17 + .../__snapshots__/index.test.jsx.snap | 24 ++ .../components/psammead-copyright/index.jsx | 22 + .../psammead-copyright/index.stories.jsx | 7 + .../psammead-copyright/index.test.jsx | 10 + .../psammead-copyright/package-lock.json | 389 ++++++++++++++++++ .../psammead-copyright/package.json | 34 ++ 7 files changed, 503 insertions(+) create mode 100644 packages/components/psammead-copyright/README.md create mode 100644 packages/components/psammead-copyright/__snapshots__/index.test.jsx.snap create mode 100644 packages/components/psammead-copyright/index.jsx create mode 100644 packages/components/psammead-copyright/index.stories.jsx create mode 100644 packages/components/psammead-copyright/index.test.jsx create mode 100644 packages/components/psammead-copyright/package-lock.json create mode 100644 packages/components/psammead-copyright/package.json diff --git a/packages/components/psammead-copyright/README.md b/packages/components/psammead-copyright/README.md new file mode 100644 index 0000000000..364590df5f --- /dev/null +++ b/packages/components/psammead-copyright/README.md @@ -0,0 +1,17 @@ +# Figure Copyright [![Storybook](https://github.com/storybooks/press/blob/master/badges/storybook.svg)](https://simorghstorybook.now.sh/?selectedKind=Copyright) + +### Description +Displays the source attribution of an image in block capitals in the bottom-right of the parent element. + +### When to use this component +This component is intended to be used alongside images or diagrams contained within a [Figure component](../). + +### When not to use this component +This component should not be used arbitrarily to represent source attribution across the page. As above, it is not intended to be used outside the [Figure component](../). The accessibility text would be incorrect and potentially confusing. + +Do not use this component if you know the source attribution is already covered by another copyright disclosure on the page, such as in the [Footer component](../../Footer). + +### Accessibility notes +The default styling of this component is intended to comply with WCAG colour contrast standards. + +When used with screen-reading assistive technology, the component will read "Image source" before reading the attribution. \ No newline at end of file diff --git a/packages/components/psammead-copyright/__snapshots__/index.test.jsx.snap b/packages/components/psammead-copyright/__snapshots__/index.test.jsx.snap new file mode 100644 index 0000000000..f7d824bffc --- /dev/null +++ b/packages/components/psammead-copyright/__snapshots__/index.test.jsx.snap @@ -0,0 +1,24 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Copyright should render correctly 1`] = ` +.c0 { + font-size: 0.75em; + line-height: 1em; + background-color: rgba(34,34,34,0.75); + text-transform: uppercase; + color: #FFFFFF; + padding: 0.25rem 0.5rem; + font-family: ReithSansNewsRegular,Helvetica,Arial,sans-serif; + position: absolute; + bottom: 0; + right: 0; + margin: 0; +} + +

+ Getty Images +

+`; diff --git a/packages/components/psammead-copyright/index.jsx b/packages/components/psammead-copyright/index.jsx new file mode 100644 index 0000000000..c0efc628d3 --- /dev/null +++ b/packages/components/psammead-copyright/index.jsx @@ -0,0 +1,22 @@ +import styled from 'styled-components'; +import { C_WHITE } from '@bbc/psammead-styles/colours'; +import { FF_NEWS_SANS_REG } from '@bbc/psammead-styles/fonts'; +import { GEL_SPACING, GEL_SPACING_HLF } from '@bbc/gel-constants/spacings'; +import { GEL_MINION } from '@bbc/gel-foundations-styled-components/typography'; + +const Copyright = styled.p.attrs({ + role: 'text', +})` + ${GEL_MINION}; + background-color: rgba(34, 34, 34, 0.75); + text-transform: uppercase; + color: ${C_WHITE}; + padding: ${GEL_SPACING_HLF} ${GEL_SPACING}; + font-family: ${FF_NEWS_SANS_REG}; + position: absolute; + bottom: 0; + right: 0; + margin: 0; +`; + +export default Copyright; diff --git a/packages/components/psammead-copyright/index.stories.jsx b/packages/components/psammead-copyright/index.stories.jsx new file mode 100644 index 0000000000..65229788ca --- /dev/null +++ b/packages/components/psammead-copyright/index.stories.jsx @@ -0,0 +1,7 @@ +import React from 'react'; +import { storiesOf } from '@storybook/react'; // eslint-disable-line import/no-extraneous-dependencies +import Copyright from './index'; + +storiesOf('Copyright', module).add('default', () => ( + Getty Images +)); diff --git a/packages/components/psammead-copyright/index.test.jsx b/packages/components/psammead-copyright/index.test.jsx new file mode 100644 index 0000000000..3d98055649 --- /dev/null +++ b/packages/components/psammead-copyright/index.test.jsx @@ -0,0 +1,10 @@ +import React from 'react'; +import { shouldMatchSnapshot } from '@bbc/psammead-test-helpers'; +import Copyright from './index'; + +describe('Copyright', () => { + shouldMatchSnapshot( + 'should render correctly', + Getty Images, + ); +}); diff --git a/packages/components/psammead-copyright/package-lock.json b/packages/components/psammead-copyright/package-lock.json new file mode 100644 index 0000000000..83db6ade4f --- /dev/null +++ b/packages/components/psammead-copyright/package-lock.json @@ -0,0 +1,389 @@ +{ + "name": "@bbc/psammead-copyright", + "version": "0.1.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/helper-annotate-as-pure": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz", + "integrity": "sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q==", + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/types": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.2.0.tgz", + "integrity": "sha512-b4v7dyfApuKDvmPb+O488UlGuR1WbwMXFsO/cyqMrnfvRAChZKJAYeeglWTjUO1b9UghKKgepAQM5tsvBJca6A==", + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.10", + "to-fast-properties": "^2.0.0" + } + }, + "@bbc/gel-constants": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@bbc/gel-constants/-/gel-constants-0.1.1.tgz", + "integrity": "sha512-12arxbBpW+uIFxebVyvmVHw8KdQQ53X9ZZLXOfp2n5iRBdYr87cg5NrEQLCW6URfy7b2DLet8oPFF6zCoT6ilw==" + }, + "@bbc/gel-foundations-styled-components": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@bbc/gel-foundations-styled-components/-/gel-foundations-styled-components-0.1.0.tgz", + "integrity": "sha512-n0DNLA1ogJ+sQWtyFjcJDDgpbb90iA1P4At7cF32/Ck1jyom0Uelx5WYJ5Pa20+K7xDcmpV38tHWRIR+8CXTIw==", + "requires": { + "@bbc/gel-constants": "^0.1.1", + "styled-components": "^4.1.1" + } + }, + "@bbc/psammead-styles": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@bbc/psammead-styles/-/psammead-styles-0.1.3.tgz", + "integrity": "sha512-+MGZNoGL6lpVk3WBoRu5RNHpMJ+s0/PEUrPVCe6/mY71AJREX1T9qsMLpFOgkaj+n7I4rqt8ByIGD7zJkA91bA==" + }, + "@bbc/psammead-test-helpers": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@bbc/psammead-test-helpers/-/psammead-test-helpers-0.1.0.tgz", + "integrity": "sha512-k8wbEq1MmVY3rm5gTXHeMLlTTNDLywJwsFxMdXk6iSpeeuft+VT8n65RBlQs5KzSM1RH7q8kbZEyph8wz/houA==", + "dev": true, + "requires": { + "jest-styled-components": "^6.3.1", + "react-test-renderer": "^16.6.3" + } + }, + "@emotion/is-prop-valid": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.6.8.tgz", + "integrity": "sha512-IMSL7ekYhmFlILXcouA6ket3vV7u9BqStlXzbKOF9HBtpUPMMlHU+bBxrLOa2NvleVwNIxeq/zL8LafLbeUXcA==", + "requires": { + "@emotion/memoize": "^0.6.6" + } + }, + "@emotion/memoize": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.6.6.tgz", + "integrity": "sha512-h4t4jFjtm1YV7UirAFuSuFGyLa+NNxjdkq6DpFLANNQY5rHueFZHVY+8Cu1HYVP6DrheB0kv4m5xPjo7eKT7yQ==" + }, + "@emotion/unitless": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.3.tgz", + "integrity": "sha512-4zAPlpDEh2VwXswwr/t8xGNDGg8RQiPxtxZ3qQEXyQsBV39ptTdESCjuBvGze1nLMVrxmTIKmnO/nAV8Tqjjzg==" + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "babel-plugin-styled-components": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-1.9.2.tgz", + "integrity": "sha512-McnheW8RkBkur/mQw7rEwQO/oUUruQ/nIIj5LIRpsVL8pzG1oo1Y53xyvAYeOfamIrl4/ta7g1G/kuTR1ekO3A==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.0.0", + "babel-plugin-syntax-jsx": "^6.18.0", + "lodash": "^4.17.10" + } + }, + "babel-plugin-syntax-jsx": { + "version": "6.18.0", + "resolved": "http://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", + "integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY=" + }, + "core-js": { + "version": "1.2.7", + "resolved": "http://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", + "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" + }, + "css": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz", + "integrity": "sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "source-map": "^0.6.1", + "source-map-resolve": "^0.5.2", + "urix": "^0.1.0" + } + }, + "css-color-keywords": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", + "integrity": "sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU=" + }, + "css-to-react-native": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-2.2.2.tgz", + "integrity": "sha512-w99Fzop1FO8XKm0VpbQp3y5mnTnaS+rtCvS+ylSEOK76YXO5zoHQx/QMB1N54Cp+Ya9jB9922EHrh14ld4xmmw==", + "requires": { + "css-color-keywords": "^1.0.0", + "fbjs": "^0.8.5", + "postcss-value-parser": "^3.3.0" + } + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "encoding": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", + "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "requires": { + "iconv-lite": "~0.4.13" + } + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" + }, + "fbjs": { + "version": "0.8.17", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz", + "integrity": "sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90=", + "requires": { + "core-js": "^1.0.0", + "isomorphic-fetch": "^2.1.1", + "loose-envify": "^1.0.0", + "object-assign": "^4.1.0", + "promise": "^7.1.1", + "setimmediate": "^1.0.5", + "ua-parser-js": "^0.7.18" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "isomorphic-fetch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", + "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", + "requires": { + "node-fetch": "^1.0.1", + "whatwg-fetch": ">=0.10.0" + } + }, + "jest-styled-components": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/jest-styled-components/-/jest-styled-components-6.3.1.tgz", + "integrity": "sha512-zie3ajvJbwlbHCAq8/Bv5jdbcYCz0ZMRNNX6adL7wSRpkCVPQtiJigv1140JN1ZOJIODPn8VKrjeFCN+jlPa7w==", + "dev": true, + "requires": { + "css": "^2.2.4" + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "memoize-one": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-4.0.3.tgz", + "integrity": "sha512-QmpUu4KqDmX0plH4u+tf0riMc1KHE1+lw95cMrLlXQAFOx/xnBtwhZ52XJxd9X2O6kwKBqX32kmhbhlobD0cuw==" + }, + "node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "requires": { + "encoding": "^0.1.11", + "is-stream": "^1.0.1" + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" + }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "requires": { + "asap": "~2.0.3" + } + }, + "prop-types": { + "version": "15.6.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz", + "integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==", + "requires": { + "loose-envify": "^1.3.1", + "object-assign": "^4.1.1" + } + }, + "react-is": { + "version": "16.6.3", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.6.3.tgz", + "integrity": "sha512-u7FDWtthB4rWibG/+mFbVd5FvdI20yde86qKGx4lVUTWmPlSWQ4QxbBIrrs+HnXGbxOUlUzTAP/VDmvCwaP2yA==" + }, + "react-test-renderer": { + "version": "16.6.3", + "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-16.6.3.tgz", + "integrity": "sha512-B5bCer+qymrQz/wN03lT0LppbZUDRq6AMfzMKrovzkGzfO81a9T+PWQW6MzkWknbwODQH/qpJno/yFQLX5IWrQ==", + "dev": true, + "requires": { + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "react-is": "^16.6.3", + "scheduler": "^0.11.2" + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "scheduler": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.11.3.tgz", + "integrity": "sha512-i9X9VRRVZDd3xZw10NY5Z2cVMbdYg6gqFecfj79USv1CFN+YrJ3gIPRKf1qlY+Sxly4djoKdfx1T+m9dnRB8kQ==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "styled-components": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-4.1.2.tgz", + "integrity": "sha512-NdvWatJ2WLqZxAvto+oH0k7GAC/TlAUJTrHoXJddjbCrU6U23EmVbb9LXJBF+d6q6hH+g9nQYOWYPUeX/Vlc2w==", + "requires": { + "@emotion/is-prop-valid": "^0.6.8", + "@emotion/unitless": "^0.7.0", + "babel-plugin-styled-components": ">= 1", + "css-to-react-native": "^2.2.2", + "memoize-one": "^4.0.0", + "prop-types": "^15.5.4", + "react-is": "^16.6.0", + "stylis": "^3.5.0", + "stylis-rule-sheet": "^0.0.10", + "supports-color": "^5.5.0" + } + }, + "stylis": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-3.5.4.tgz", + "integrity": "sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q==" + }, + "stylis-rule-sheet": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz", + "integrity": "sha512-nTbZoaqoBnmK+ptANthb10ZRZOGC+EmTLLUxeYIuHNkEKcmKgXX1XWKkUBT2Ac4es3NybooPe0SmvKdhKJZAuw==" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" + }, + "ua-parser-js": { + "version": "0.7.19", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.19.tgz", + "integrity": "sha512-T3PVJ6uz8i0HzPxOF9SWzWAlfN/DavlpQqepn22xgve/5QecC+XMCAtmUNnY7C9StehaV6exjUCI801lOI7QlQ==" + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "whatwg-fetch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz", + "integrity": "sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q==" + } + } +} diff --git a/packages/components/psammead-copyright/package.json b/packages/components/psammead-copyright/package.json new file mode 100644 index 0000000000..89daecf431 --- /dev/null +++ b/packages/components/psammead-copyright/package.json @@ -0,0 +1,34 @@ +{ + "name": "@bbc/psammead-copyright", + "version": "0.1.0", + "main": "dist/index.js", + "description": "React styled component for overlaid copyright or source attribution.", + "repository": { + "type": "git", + "url": "https://github.com/BBC-News/psammead/tree/latest/packages/components/psammead-copyright" + }, + "author": { + "name": "Psammead Maintainers", + "email": "PsammeadMaintainers@bbc.co.uk" + }, + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/bbc/psammead/issues" + }, + "homepage": "https://github.com/BBC-News/psammead/blob/latest/packages/components/psammead-copyright/README.md", + "dependencies": { + "@bbc/gel-constants": "^0.1.1", + "@bbc/gel-foundations-styled-components": "^0.1.0", + "@bbc/psammead-styles": "^0.1.3" + }, + "keywords": [ + "bbc", + "copyright", + "attribution", + "image", + "figure" + ], + "devDependencies": { + "@bbc/psammead-test-helpers": "^0.1.0" + } +} From 4c13a2bdbfac154b0282eb3bccd83c2b93aae46e Mon Sep 17 00:00:00 2001 From: Ben Newcombe Date: Thu, 6 Dec 2018 16:47:33 +0000 Subject: [PATCH 2/4] Add changelog --- packages/components/psammead-copyright/CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 packages/components/psammead-copyright/CHANGELOG.md diff --git a/packages/components/psammead-copyright/CHANGELOG.md b/packages/components/psammead-copyright/CHANGELOG.md new file mode 100644 index 0000000000..bd6bda2aed --- /dev/null +++ b/packages/components/psammead-copyright/CHANGELOG.md @@ -0,0 +1,5 @@ +# Psammead Headings Changelog + +| Version | Description | +|---------|-------------| +| 0.1.0 | [PR#129](https://github.com/BBC-News/psammead/pull/129) Create initial package, pulled in from [simorgh](https://github.com/BBC-News/simorgh). | From d524390ec9d08d05f604be7c0cf0ec4a0c514515 Mon Sep 17 00:00:00 2001 From: Ben Newcombe Date: Mon, 10 Dec 2018 09:52:57 +0000 Subject: [PATCH 3/4] psammead-copyright README fixes --- packages/components/psammead-copyright/README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/components/psammead-copyright/README.md b/packages/components/psammead-copyright/README.md index 364590df5f..d5330c65e1 100644 --- a/packages/components/psammead-copyright/README.md +++ b/packages/components/psammead-copyright/README.md @@ -1,4 +1,4 @@ -# Figure Copyright [![Storybook](https://github.com/storybooks/press/blob/master/badges/storybook.svg)](https://simorghstorybook.now.sh/?selectedKind=Copyright) +# psammead-copyright · [![GitHub license](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/BBC-News/psammead/blob/latest/LICENSE) [![npm version](https://img.shields.io/npm/v/@bbc/psammead-copyright.svg)](https://www.npmjs.com/package/@bbc/psammead-copyright) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://reactjs.org/docs/how-to-contribute.html#your-first-pull-request) ### Description Displays the source attribution of an image in block capitals in the bottom-right of the parent element. @@ -12,6 +12,4 @@ This component should not be used arbitrarily to represent source attribution ac Do not use this component if you know the source attribution is already covered by another copyright disclosure on the page, such as in the [Footer component](../../Footer). ### Accessibility notes -The default styling of this component is intended to comply with WCAG colour contrast standards. - -When used with screen-reading assistive technology, the component will read "Image source" before reading the attribution. \ No newline at end of file +The default styling of this component is intended to comply with WCAG colour contrast standards. \ No newline at end of file From f92fcd375632afdf759001ff2fe4c2221a2a43a5 Mon Sep 17 00:00:00 2001 From: Ben Newcombe Date: Mon, 10 Dec 2018 10:06:12 +0000 Subject: [PATCH 4/4] Update packages/components/psammead-copyright/README.md --- packages/components/psammead-copyright/README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/components/psammead-copyright/README.md b/packages/components/psammead-copyright/README.md index d5330c65e1..5239265ec9 100644 --- a/packages/components/psammead-copyright/README.md +++ b/packages/components/psammead-copyright/README.md @@ -12,4 +12,16 @@ This component should not be used arbitrarily to represent source attribution ac Do not use this component if you know the source attribution is already covered by another copyright disclosure on the page, such as in the [Footer component](../../Footer). ### Accessibility notes -The default styling of this component is intended to comply with WCAG colour contrast standards. \ No newline at end of file +The default styling of this component is intended to comply with WCAG colour contrast standards. + +## Contributing + +Psammead is completely open source. We are grateful for any contributions, whether they be new components, bug fixes or general improvements. Please see our primary contributing guide which can be found at [the root of the Psammead respository](https://github.com/BBC-News/psammead/blob/latest/CONTRIBUTING.md). + +### [Code of Conduct](https://github.com/BBC-News/psammead/blob/latest/CODE_OF_CONDUCT.md) + +We welcome feedback and help on this work. By participating in this project, you agree to abide by the [code of conduct](https://github.com/BBC-News/psammead/blob/latest/CODE_OF_CONDUCT.md). Please take a moment to read it. + +### License + +Psammead is [Apache 2.0 licensed](https://github.com/BBC-News/psammead/blob/latest/LICENSE).