diff --git a/packages/strapi-plugin-content-manager/README.md b/packages/strapi-plugin-content-manager/README.md index 3e997ac1f5..17d69c6216 100644 --- a/packages/strapi-plugin-content-manager/README.md +++ b/packages/strapi-plugin-content-manager/README.md @@ -4,15 +4,6 @@ This plugin allows you to manage your data through a UI. -## Contributing +## Changing the plugin logo -NB: Please refers to the contributing section of the [monorepo](https://github.com/strapi/strapi) - -1. Create a new Strapi application: `strapi new myApp`. -2. Go to your new Strapi app `cd myApp`. -3. Create a symlink to the monorepo plugin's folder `ln -s /path/to/strapi/monorepo/packages/strapi-plugin-content-manager ./plugins/content-manager` -3. Copy the layout SASS variables folder into your project from `admin/public/app/styles/variables` to `plugins/content-manager/public/app/styles/variables` -4. Start your app `strapi start` (Don't forget to return to the root of your app's directory). - - -ln -s -f ./admin/public/app/styles/variables/variables.scss ./plugins/content-manager/public/app/styles/variables/variables.scss +The plugin's logo is located in `./admin/src/assets/logo.svg` it is displayed in the marketplace (`/admin/list-plugins`) diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_barred.svg b/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_barred.svg deleted file mode 100644 index 2f3c7b9111..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_barred.svg +++ /dev/null @@ -1 +0,0 @@ -abc \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_bold.svg b/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_bold.svg deleted file mode 100644 index cee3cf4011..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_bold.svg +++ /dev/null @@ -1 +0,0 @@ -B \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_bullet-list.svg b/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_bullet-list.svg deleted file mode 100644 index 6e060c39f5..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_bullet-list.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_code-block.svg b/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_code-block.svg deleted file mode 100644 index a47ca10058..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_code-block.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_italic.svg b/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_italic.svg deleted file mode 100644 index 6181979e31..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_italic.svg +++ /dev/null @@ -1 +0,0 @@ -I \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_link.svg b/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_link.svg deleted file mode 100644 index 53b6125367..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_link.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_media.svg b/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_media.svg deleted file mode 100644 index d7401730c7..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_media.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_numbered-list.svg b/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_numbered-list.svg deleted file mode 100644 index 79c8091f86..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_numbered-list.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_quote-block.svg b/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_quote-block.svg deleted file mode 100644 index 62a7990e92..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_quote-block.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_underline.svg b/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_underline.svg deleted file mode 100644 index 7a9b8da4e1..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/icons/icon_underline.svg +++ /dev/null @@ -1 +0,0 @@ -U \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/images/background_empty.svg b/packages/strapi-plugin-content-manager/admin/src/assets/images/background_empty.svg deleted file mode 100644 index fb4851a98d..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/images/background_empty.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/images/background_input.svg b/packages/strapi-plugin-content-manager/admin/src/assets/images/background_input.svg deleted file mode 100644 index 761aafc4e3..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/images/background_input.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - Group - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/images/caret_top.svg b/packages/strapi-plugin-content-manager/admin/src/assets/images/caret_top.svg deleted file mode 100644 index cc8e6bb21f..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/images/caret_top.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/images/caret_top_error.svg b/packages/strapi-plugin-content-manager/admin/src/assets/images/caret_top_error.svg deleted file mode 100644 index a373e320f1..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/images/caret_top_error.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/images/caret_top_grey.svg b/packages/strapi-plugin-content-manager/admin/src/assets/images/caret_top_grey.svg deleted file mode 100644 index 6342bfe05e..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/images/caret_top_grey.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/images/grab_icon.svg b/packages/strapi-plugin-content-manager/admin/src/assets/images/grab_icon.svg deleted file mode 100644 index 35b54085fd..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/images/grab_icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/images/grab_icon_blue.svg b/packages/strapi-plugin-content-manager/admin/src/assets/images/grab_icon_blue.svg deleted file mode 100644 index 7890e9cf3f..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/images/grab_icon_blue.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/images/grab_icon_error.svg b/packages/strapi-plugin-content-manager/admin/src/assets/images/grab_icon_error.svg deleted file mode 100644 index cc026772b7..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/images/grab_icon_error.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/images/icon-cross.svg b/packages/strapi-plugin-content-manager/admin/src/assets/images/icon-cross.svg deleted file mode 100644 index d627d9bdac..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/images/icon-cross.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/images/icon-edit-blue.svg b/packages/strapi-plugin-content-manager/admin/src/assets/images/icon-edit-blue.svg deleted file mode 100644 index 0da67b8b3b..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/images/icon-edit-blue.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/images/icon-search.svg b/packages/strapi-plugin-content-manager/admin/src/assets/images/icon-search.svg deleted file mode 100644 index 83bc565249..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/images/icon-search.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - icon-search - Created with Sketch. - - - - - - - - - \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/images/icon_filter.png b/packages/strapi-plugin-content-manager/admin/src/assets/images/icon_filter.png deleted file mode 100644 index 24bee7b8dd..0000000000 Binary files a/packages/strapi-plugin-content-manager/admin/src/assets/images/icon_filter.png and /dev/null differ diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/images/icon_filter_blue.svg b/packages/strapi-plugin-content-manager/admin/src/assets/images/icon_filter_blue.svg deleted file mode 100644 index a973227a84..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/images/icon_filter_blue.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - Icon filter - Created with Sketch. - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/images/icon_grab.svg b/packages/strapi-plugin-content-manager/admin/src/assets/images/icon_grab.svg deleted file mode 100644 index b0d911b651..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/images/icon_grab.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/images/icon_grab_blue.svg b/packages/strapi-plugin-content-manager/admin/src/assets/images/icon_grab_blue.svg deleted file mode 100644 index 5abdac71c3..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/images/icon_grab_blue.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/assets/images/media/na.svg b/packages/strapi-plugin-content-manager/admin/src/assets/images/media/na.svg deleted file mode 100644 index 1aac4ca4b5..0000000000 --- a/packages/strapi-plugin-content-manager/admin/src/assets/images/media/na.svg +++ /dev/null @@ -1 +0,0 @@ -N/A \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/components/FilterPickerOption/components.js b/packages/strapi-plugin-content-manager/admin/src/components/FilterPickerOption/components.js index ff2186850f..4d028d5924 100644 --- a/packages/strapi-plugin-content-manager/admin/src/components/FilterPickerOption/components.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/FilterPickerOption/components.js @@ -1,5 +1,4 @@ import styled, { css } from 'styled-components'; -import Bckg from '../../assets/images/background_input.svg'; const Wrapper = styled.div` min-height: 38px; @@ -105,22 +104,4 @@ const Input = styled.input` box-shadow: 0px 1px 1px rgba(104, 118, 142, 0.05); `; -const Select = styled.select` - min-height: 3.4rem; - margin-top: 0.9rem; - padding-top: 0rem; - padding-left: 1rem; - background-position: right -1px center; - background-repeat: no-repeat; - background-image: url(${Bckg}); - border: 1px solid #e3e9f3; - border-radius: 0.25rem; - line-height: 3.2rem; - font-size: 1.3rem; - font-family: 'Lato' !important; - -moz-appearance: none; - -webkit-appearance: none; - box-shadow: 0px 1px 1px rgba(104, 118, 142, 0.05); -`; - -export { Button, InputWrapper, Wrapper, InputWrapperDate, Input, Select }; +export { Button, InputWrapper, Wrapper, InputWrapperDate, Input }; diff --git a/packages/strapi-plugin-content-manager/admin/src/components/MediaPreviewList/index.js b/packages/strapi-plugin-content-manager/admin/src/components/MediaPreviewList/index.js index 447b10874a..8324f7c8f2 100644 --- a/packages/strapi-plugin-content-manager/admin/src/components/MediaPreviewList/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/MediaPreviewList/index.js @@ -1,9 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { isArray, includes, isEmpty } from 'lodash'; - -import DefaultIcon from '../../assets/images/media/na.svg'; - +import DefaultIcon from '../../icons/Na'; import { StyledMediaPreviewList, MediaPreviewFile, @@ -90,7 +88,8 @@ function MediaPreviewList({ hoverable, files }) { ) : ( - default + {/* default */} + ); } diff --git a/packages/strapi-plugin-content-manager/admin/src/components/Search/components.js b/packages/strapi-plugin-content-manager/admin/src/components/Search/components.js index afd8479b15..f4dd44cf02 100644 --- a/packages/strapi-plugin-content-manager/admin/src/components/Search/components.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/Search/components.js @@ -1,6 +1,4 @@ import styled from 'styled-components'; -import Cross from '../../assets/images/icon-cross.svg'; -import Search from '../../assets/images/icon-search.svg'; const Wrapper = styled.div` position: fixed; @@ -18,14 +16,14 @@ const Wrapper = styled.div` line-height: 6rem; letter-spacing: 0; - &:before { - content: ''; - width: 16px; - height: 16px; - background-image: url(${Search}); + > div:first-child { + height: 100%; + margin-right: 10px; - color: #b3b5b9; - vertical-align: middle; + > svg { + color: #b3b5b9; + vertical-align: middle; + } } input { @@ -39,7 +37,7 @@ const Wrapper = styled.div` } } - > div:first-child { + > div:nth-child(2) { display: flex; flex: 2; } @@ -62,7 +60,7 @@ const Infos = styled.div` font-weight: 400; line-height: 20px; -webkit-font-smoothing: antialiased; - > img { + > svg { position: absolute; top: 1px; margin: auto; @@ -76,19 +74,10 @@ const Clear = styled.div` display: flex; flex-direction: column; justify-content: center; - width: 13px; height: 13px; margin: 25px auto 0; border-radius: 50%; cursor: pointer; - - &:after { - content: ''; - width: 8px; - height: 8px; - margin: auto; - background-image: url(${Cross}); - } `; export { Clear, Wrapper, Infos }; diff --git a/packages/strapi-plugin-content-manager/admin/src/components/Search/index.js b/packages/strapi-plugin-content-manager/admin/src/components/Search/index.js index 0979ac9052..0a958ff2c5 100644 --- a/packages/strapi-plugin-content-manager/admin/src/components/Search/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/Search/index.js @@ -8,9 +8,10 @@ import React, { memo } from 'react'; import { isEmpty, upperFirst } from 'lodash'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; +import Cross from '../../icons/Cross'; +import Filter from '../../icons/Filter'; +import SearchIcon from '../../icons/Search'; import { Wrapper, Infos, Clear } from './components'; -import Logo from '../../assets/images/icon_filter_blue.svg'; - const WAIT = 400; class Search extends React.Component { @@ -56,6 +57,9 @@ class Search extends React.Component { return ( +
+ +
{message => ( @@ -67,10 +71,14 @@ class Search extends React.Component { /> )} - {value !== '' && } + {value !== '' && ( + + + + )}
- filter_logo + {upperFirst(model)}
diff --git a/packages/strapi-plugin-content-manager/admin/src/components/Wysiwyg/previewWysiwyg.js b/packages/strapi-plugin-content-manager/admin/src/components/Wysiwyg/previewWysiwyg.js index 3db7d48c60..e3edcb35b5 100644 --- a/packages/strapi-plugin-content-manager/admin/src/components/Wysiwyg/previewWysiwyg.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/Wysiwyg/previewWysiwyg.js @@ -18,7 +18,7 @@ import { } from 'draft-js'; import { List, OrderedSet, Repeat, fromJS } from 'immutable'; import { isEmpty, toArray } from 'lodash'; -import { WysiwygContext } from '../../contexts/Wysiwyg'; +import WysiwygContext from '../../contexts/Wysiwyg'; import WysiwygEditor from '../WysiwygEditor'; import converter from './converter'; import { diff --git a/packages/strapi-plugin-content-manager/admin/src/components/WysiwygInlineControls/Button.js b/packages/strapi-plugin-content-manager/admin/src/components/WysiwygInlineControls/Button.js index d0f3895887..aad2b640d2 100644 --- a/packages/strapi-plugin-content-manager/admin/src/components/WysiwygInlineControls/Button.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/WysiwygInlineControls/Button.js @@ -1,98 +1,82 @@ -import styled, { css } from 'styled-components'; +import React from 'react'; +import PropTypes from 'prop-types'; +import Bold from '../../icons/Bold'; +import Code from '../../icons/Code'; +import Media from '../../icons/Media'; +import Italic from '../../icons/Italic'; +import Link from '../../icons/Link'; +import Ol from '../../icons/Ol'; +import Quote from '../../icons/Quote'; +import Striked from '../../icons/Striked'; +import Ul from '../../icons/Ul'; +import Underline from '../../icons/Underline'; +import StyledButton from './StyledButton'; -import Bold from '../../assets/icons/icon_bold.svg'; -import Italic from '../../assets/icons/icon_italic.svg'; -import Underline from '../../assets/icons/icon_underline.svg'; -import Ul from '../../assets/icons/icon_bullet-list.svg'; -import Ol from '../../assets/icons/icon_numbered-list.svg'; -import Quote from '../../assets/icons/icon_quote-block.svg'; -import Code from '../../assets/icons/icon_code-block.svg'; -import Link from '../../assets/icons/icon_link.svg'; -import Striked from '../../assets/icons/icon_barred.svg'; -import Img from '../../assets/icons/icon_media.svg'; +const icons = { + bold: Bold, + italic: Italic, + underline: Underline, + ul: Ul, + ol: Ol, + link: Link, + quote: Quote, + code: Code, + striked: Striked, + img: Media, +}; -const Button = styled.div` - height: 32px; - min-width: 32px; - background-color: #ffffff; - border: 1px solid rgba(16, 22, 34, 0.1); - font-size: 13px; - font-weight: 500; - line-height: 32px; - text-align: center; - cursor: pointer; +const Button = ({ + active, + disabled, + className: type, + handler, + handlers, + hideLabel, + label, + style, + text, +}) => { + const handleClick = e => { + e.preventDefault(); - &:hover { - background-color: #f3f4f4; - } + handlers[handler](text, style); + }; - ${({ active, disabled }) => { - if (active) { - return css` - border: 0; - background: rgba(16, 22, 34, 0); - box-shadow: inset 0 -1px 0 0 rgba(16, 22, 34, 0.04), - inset 0 1px 0 0 rgba(16, 22, 34, 0.04); - `; - } + const Icon = icons[type]; - if (disabled) { - return css` - opacity: 0.7; - cursor: not-allowed; - `; - } - }} + return ( + + {icons[type] && } + {!hideLabel && label} + + ); +}; - ${({ type }) => { - switch (type) { - case 'bold': - return css` - background-image: url(${Bold}); - `; - case 'italic': - return css` - background-image: url(${Italic}); - `; - case 'underline': - return css` - background-image: url(${Underline}); - `; - case 'ul': - return css` - background-image: url(${Ul}); - `; - case 'ol': - return css` - background-image: url(${Ol}); - `; - case 'link': - return css` - background-image: url(${Link}); - `; - case 'quote': - return css` - background-image: url(${Quote}); - `; - case 'code': - return css` - background-image: url(${Code}); - `; - case 'striked': - return css` - background-image: url(${Striked}); - `; - case 'img': - return css` - background-image: url(${Img}); - `; - default: - return css``; - } - }} +Button.defaultProps = { + active: false, + className: '', + disabled: false, + hideLabel: false, + label: '', + style: '', + text: '', +}; - background-position: center; - background-repeat: no-repeat; -`; +Button.propTypes = { + active: PropTypes.bool, + className: PropTypes.string, + disabled: PropTypes.bool, + handler: PropTypes.string.isRequired, + handlers: PropTypes.object.isRequired, + hideLabel: PropTypes.bool, + label: PropTypes.string, + style: PropTypes.string, + text: PropTypes.string, +}; export default Button; diff --git a/packages/strapi-plugin-content-manager/admin/src/components/WysiwygInlineControls/StyledButton.js b/packages/strapi-plugin-content-manager/admin/src/components/WysiwygInlineControls/StyledButton.js new file mode 100644 index 0000000000..fd08cb8c3d --- /dev/null +++ b/packages/strapi-plugin-content-manager/admin/src/components/WysiwygInlineControls/StyledButton.js @@ -0,0 +1,52 @@ +import styled, { css } from 'styled-components'; + +const Button = styled.button` + display: flex; + height: 32px; + min-width: 32px; + background-color: #ffffff; + border: 1px solid rgba(16, 22, 34, 0.1); + font-size: 13px; + font-weight: 500; + line-height: 32px; + text-align: center; + cursor: pointer; + + &:hover { + background-color: #f3f4f4; + } + &:active, + :focus { + outline: 0; + } + + ${({ active, disabled }) => { + if (active) { + return css` + border: 0; + background: rgba(16, 22, 34, 0); + box-shadow: inset 0 -1px 0 0 rgba(16, 22, 34, 0.04), + inset 0 1px 0 0 rgba(16, 22, 34, 0.04); + `; + } + + if (disabled) { + return css` + opacity: 0.7; + cursor: not-allowed; + `; + } + }} + + > svg { + margin: auto; + > text { + font-family: Baskerville-SemiBoldItalic, Baskerville; + } + } + + background-position: center; + background-repeat: no-repeat; +`; + +export default Button; diff --git a/packages/strapi-plugin-content-manager/admin/src/components/WysiwygInlineControls/Wrapper.js b/packages/strapi-plugin-content-manager/admin/src/components/WysiwygInlineControls/Wrapper.js index 11762f6a0d..055a6961df 100644 --- a/packages/strapi-plugin-content-manager/admin/src/components/WysiwygInlineControls/Wrapper.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/WysiwygInlineControls/Wrapper.js @@ -6,16 +6,16 @@ const Wrapper = styled.div` padding: 8px 3px 0 10px; background-color: #f3f4f4; user-select: none; - overflow-x: scroll; - > div:nth-child(even) { + overflow-x: auto; + > button:nth-child(even) { border-left: 0; border-right: 0; } - > div:first-child { + > button:first-child { border-top-left-radius: 3px; border-bottom-left-radius: 3px; } - > div:last-child { + > button:last-child { border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-right: 1px solid rgba(16, 22, 34, 0.1); diff --git a/packages/strapi-plugin-content-manager/admin/src/components/WysiwygInlineControls/index.js b/packages/strapi-plugin-content-manager/admin/src/components/WysiwygInlineControls/index.js index 2a40dd5de8..1a42d90a62 100644 --- a/packages/strapi-plugin-content-manager/admin/src/components/WysiwygInlineControls/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/WysiwygInlineControls/index.js @@ -9,34 +9,6 @@ import PropTypes from 'prop-types'; import Button from './Button'; import Wrapper from './Wrapper'; -class StyleButton extends React.Component { - handleClick = e => { - e.preventDefault(); - - if (!this.props.disabled) { - this.props.handlers[this.props.handler]( - this.props.text, - this.props.style - ); - } - }; - - render() { - const { active, className: type, disabled } = this.props; - - return ( - - ); - } -} - const WysiwygInlineControls = ({ buttons, disabled, @@ -56,7 +28,7 @@ const WysiwygInlineControls = ({ return ( {buttons.map(type => ( - {}, - onToggleBlock: () => {}, - style: '', - text: '', -}; - -StyleButton.propTypes = { - active: PropTypes.bool, - className: PropTypes.string, - disabled: PropTypes.bool, - handler: PropTypes.string.isRequired, - handlers: PropTypes.object.isRequired, - hideLabel: PropTypes.bool, - label: PropTypes.string, - style: PropTypes.string, - text: PropTypes.string, -}; - WysiwygInlineControls.defaultProps = { buttons: [], disabled: false, diff --git a/packages/strapi-plugin-content-manager/admin/src/containers/ListView/components.js b/packages/strapi-plugin-content-manager/admin/src/containers/ListView/components.js index b327bd5fef..75cafedc97 100644 --- a/packages/strapi-plugin-content-manager/admin/src/containers/ListView/components.js +++ b/packages/strapi-plugin-content-manager/admin/src/containers/ListView/components.js @@ -1,12 +1,20 @@ import styled from 'styled-components'; import { Button } from 'strapi-helper-plugin'; - +import Filter from '../../icons/Filter'; import RemoveIcon from '../../assets/images/icon-cross-blue.svg'; const Wrapper = styled.div` padding-top: 1px; `; +const FilterIcon = styled(Filter)` + padding: 0 !important; + margin: auto !important; + > g { + stroke: #282b2c; + } +`; + const AddFilterCta = styled(Button)` display: flex; height: 30px; @@ -119,6 +127,7 @@ const Remove = styled.span` export { AddFilterCta, + FilterIcon, FooterWrapper, Img, Label, diff --git a/packages/strapi-plugin-content-manager/admin/src/containers/ListView/index.js b/packages/strapi-plugin-content-manager/admin/src/containers/ListView/index.js index 4f4e2c9f89..e773b3529e 100644 --- a/packages/strapi-plugin-content-manager/admin/src/containers/ListView/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/containers/ListView/index.js @@ -13,7 +13,6 @@ import { import pluginId from '../../pluginId'; import DisplayedFieldsDropdown from '../../components/DisplayedFieldsDropdown'; -import FilterLogo from '../../assets/images/icon_filter.png'; import Container from '../../components/Container'; import CustomTable from '../../components/CustomTable'; import FilterPicker from '../../components/FilterPicker'; @@ -24,7 +23,7 @@ import { } from '../../utils/search'; import ListViewProvider from '../ListViewProvider'; import { onChangeListLabels, resetListLabels } from '../Main/actions'; -import { AddFilterCta, Img, Wrapper } from './components'; +import { AddFilterCta, FilterIcon, Wrapper } from './components'; import Filter from './Filter'; import Footer from './Footer'; import { @@ -326,7 +325,7 @@ function ListView({ type="button" onClick={toggleFilterPickerState} > - filter_logo + diff --git a/packages/strapi-plugin-content-manager/admin/src/icons/Bold/index.js b/packages/strapi-plugin-content-manager/admin/src/icons/Bold/index.js new file mode 100644 index 0000000000..b55992e6e2 --- /dev/null +++ b/packages/strapi-plugin-content-manager/admin/src/icons/Bold/index.js @@ -0,0 +1,22 @@ +import React from 'react'; + +const Bold = () => { + return ( + + + + B + + + + ); +}; + +export default Bold; diff --git a/packages/strapi-plugin-content-manager/admin/src/icons/Code/index.js b/packages/strapi-plugin-content-manager/admin/src/icons/Code/index.js new file mode 100644 index 0000000000..4837b6fd2a --- /dev/null +++ b/packages/strapi-plugin-content-manager/admin/src/icons/Code/index.js @@ -0,0 +1,13 @@ +import React from 'react'; + +const Code = () => { + return ( + + + + + + ); +}; + +export default Code; diff --git a/packages/strapi-plugin-content-manager/admin/src/icons/Cross/index.js b/packages/strapi-plugin-content-manager/admin/src/icons/Cross/index.js new file mode 100644 index 0000000000..1977c55a13 --- /dev/null +++ b/packages/strapi-plugin-content-manager/admin/src/icons/Cross/index.js @@ -0,0 +1,33 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +const Cross = ({ fill, height, width, ...rest }) => { + return ( + + + + ); +}; + +Cross.defaultProps = { + fill: '#b3b5b9', + height: '8', + width: '8', +}; + +Cross.propTypes = { + fill: PropTypes.string, + height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), + width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), +}; + +export default Cross; diff --git a/packages/strapi-plugin-content-manager/admin/src/icons/Filter/index.js b/packages/strapi-plugin-content-manager/admin/src/icons/Filter/index.js new file mode 100644 index 0000000000..b0bfdba3b3 --- /dev/null +++ b/packages/strapi-plugin-content-manager/admin/src/icons/Filter/index.js @@ -0,0 +1,31 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +const Filter = ({ fill, height, width, ...rest }) => { + return ( + + + + + + ); +}; + +Filter.defaultProps = { + fill: '#007EFF', + height: '7', + width: '9', +}; + +Filter.propTypes = { + fill: PropTypes.string, + height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), + width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), +}; + +export default Filter; diff --git a/packages/strapi-plugin-content-manager/admin/src/icons/Italic/index.js b/packages/strapi-plugin-content-manager/admin/src/icons/Italic/index.js new file mode 100644 index 0000000000..9295a7f5ab --- /dev/null +++ b/packages/strapi-plugin-content-manager/admin/src/icons/Italic/index.js @@ -0,0 +1,23 @@ +import React from 'react'; + +const Italic = () => { + return ( + + + + I + + + + ); +}; + +export default Italic; diff --git a/packages/strapi-plugin-content-manager/admin/src/icons/Link/index.js b/packages/strapi-plugin-content-manager/admin/src/icons/Link/index.js new file mode 100644 index 0000000000..79b461a819 --- /dev/null +++ b/packages/strapi-plugin-content-manager/admin/src/icons/Link/index.js @@ -0,0 +1,21 @@ +import React from 'react'; + +const Link = () => { + return ( + + + + + + + + ); +}; + +export default Link; diff --git a/packages/strapi-plugin-content-manager/admin/src/icons/Media/index.js b/packages/strapi-plugin-content-manager/admin/src/icons/Media/index.js new file mode 100644 index 0000000000..80841145a7 --- /dev/null +++ b/packages/strapi-plugin-content-manager/admin/src/icons/Media/index.js @@ -0,0 +1,14 @@ +import React from 'react'; + +const Media = () => { + return ( + + + + + + + ); +}; + +export default Media; diff --git a/packages/strapi-plugin-content-manager/admin/src/icons/Na/index.js b/packages/strapi-plugin-content-manager/admin/src/icons/Na/index.js new file mode 100644 index 0000000000..3095927664 --- /dev/null +++ b/packages/strapi-plugin-content-manager/admin/src/icons/Na/index.js @@ -0,0 +1,58 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +const Na = ({ + fill, + fontFamily, + fontSize, + fontWeight, + height, + textFill, + width, + ...rest +}) => { + return ( + + + + + + N/A + + + + + ); +}; + +Na.defaultProps = { + fill: '#fafafb', + fontFamily: 'Lato-Medium, Lato', + fontSize: '12', + fontWeight: '400', + height: '35', + textFill: '#838383', + width: '35', +}; + +Na.propTypes = { + fill: PropTypes.string, + fontFamily: PropTypes.string, + fontSize: PropTypes.string, + fontWeight: PropTypes.string, + height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), + textFill: PropTypes.string, + width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), +}; + +export default Na; diff --git a/packages/strapi-plugin-content-manager/admin/src/icons/Ol/index.js b/packages/strapi-plugin-content-manager/admin/src/icons/Ol/index.js new file mode 100644 index 0000000000..1fe01741ae --- /dev/null +++ b/packages/strapi-plugin-content-manager/admin/src/icons/Ol/index.js @@ -0,0 +1,13 @@ +import React from 'react'; + +const Ol = () => { + return ( + + + + + + ); +}; + +export default Ol; diff --git a/packages/strapi-plugin-content-manager/admin/src/icons/Quote/index.js b/packages/strapi-plugin-content-manager/admin/src/icons/Quote/index.js new file mode 100644 index 0000000000..830f5a75c6 --- /dev/null +++ b/packages/strapi-plugin-content-manager/admin/src/icons/Quote/index.js @@ -0,0 +1,13 @@ +import React from 'react'; + +const Quote = () => { + return ( + + + + + + ); +}; + +export default Quote; diff --git a/packages/strapi-plugin-content-manager/admin/src/icons/Search/index.js b/packages/strapi-plugin-content-manager/admin/src/icons/Search/index.js new file mode 100644 index 0000000000..abd567ca79 --- /dev/null +++ b/packages/strapi-plugin-content-manager/admin/src/icons/Search/index.js @@ -0,0 +1,33 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +const Search = ({ fill, height, width, ...rest }) => { + return ( + + + + ); +}; + +Search.defaultProps = { + fill: '#b3b5b9', + height: '16', + width: '16', +}; + +Search.propTypes = { + fill: PropTypes.string, + height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), + width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), +}; + +export default Search; diff --git a/packages/strapi-plugin-content-manager/admin/src/icons/Striked/index.js b/packages/strapi-plugin-content-manager/admin/src/icons/Striked/index.js new file mode 100644 index 0000000000..534e61cfc9 --- /dev/null +++ b/packages/strapi-plugin-content-manager/admin/src/icons/Striked/index.js @@ -0,0 +1,24 @@ +import React from 'react'; + +const Striked = () => { + return ( + + + + + abc + + + + + + ); +}; + +export default Striked; diff --git a/packages/strapi-plugin-content-manager/admin/src/icons/Ul/index.js b/packages/strapi-plugin-content-manager/admin/src/icons/Ul/index.js new file mode 100644 index 0000000000..6a3284b2a2 --- /dev/null +++ b/packages/strapi-plugin-content-manager/admin/src/icons/Ul/index.js @@ -0,0 +1,15 @@ +import React from 'react'; + +const Ul = () => { + return ( + + + + + + + + ); +}; + +export default Ul; diff --git a/packages/strapi-plugin-content-manager/admin/src/icons/Underline/index.js b/packages/strapi-plugin-content-manager/admin/src/icons/Underline/index.js new file mode 100644 index 0000000000..ac02a6306e --- /dev/null +++ b/packages/strapi-plugin-content-manager/admin/src/icons/Underline/index.js @@ -0,0 +1,22 @@ +import React from 'react'; + +const Underline = () => { + return ( + + + + U + + + + ); +}; + +export default Underline;