From 57efb36acd3d62118bc659d29bba9432facc75f1 Mon Sep 17 00:00:00 2001 From: Seghir Nadir Date: Fri, 24 Jan 2020 13:36:04 +0100 Subject: [PATCH 01/11] add new icons and remove old ones --- .../js/atomic/blocks/product/button/index.js | 4 +- .../js/atomic/blocks/product/image/index.js | 4 +- .../js/atomic/blocks/product/price/index.js | 4 +- .../js/atomic/blocks/product/rating/index.js | 4 +- .../atomic/blocks/product/sale-badge/index.js | 4 +- .../js/atomic/blocks/product/shared-config.js | 4 +- .../components/checkout/no-shipping/index.js | 4 +- assets/js/blocks/active-filters/index.js | 4 +- assets/js/blocks/attribute-filter/edit.js | 9 ++--- assets/js/blocks/attribute-filter/index.js | 4 +- .../cart/full-cart/cart-line-item-row.js | 4 +- assets/js/blocks/cart-checkout/cart/index.js | 3 +- .../js/blocks/cart-checkout/checkout/index.js | 7 ++-- assets/js/blocks/featured-category/block.js | 6 +-- assets/js/blocks/featured-category/index.js | 4 +- assets/js/blocks/featured-product/block.js | 5 ++- assets/js/blocks/featured-product/index.js | 3 +- assets/js/blocks/handpicked-products/block.js | 4 +- assets/js/blocks/handpicked-products/index.js | 4 +- assets/js/blocks/price-filter/edit.js | 6 +-- assets/js/blocks/price-filter/index.js | 4 +- .../js/blocks/product-best-sellers/index.js | 4 +- assets/js/blocks/product-categories/block.js | 4 +- assets/js/blocks/product-categories/index.js | 4 +- assets/js/blocks/product-category/block.js | 5 ++- assets/js/blocks/product-category/index.js | 3 +- assets/js/blocks/product-new/index.js | 4 +- assets/js/blocks/product-on-sale/block.js | 4 +- assets/js/blocks/product-on-sale/index.js | 5 +-- assets/js/blocks/product-search/index.js | 5 +-- assets/js/blocks/product-tag/block.js | 16 ++++++-- assets/js/blocks/product-tag/index.js | 4 +- assets/js/blocks/product-top-rated/index.js | 4 +- .../js/blocks/products-by-attribute/block.js | 4 +- .../js/blocks/products-by-attribute/index.js | 4 +- .../js/blocks/products/all-products/edit.js | 6 +-- .../js/blocks/products/all-products/index.js | 4 +- assets/js/blocks/products/utils.js | 4 +- assets/js/blocks/reviews/all-reviews/edit.js | 9 ++++- assets/js/blocks/reviews/all-reviews/index.js | 4 +- .../all-reviews/no-reviews-placeholder.js | 6 ++- .../reviews/reviews-by-category/edit.js | 6 +-- .../reviews/reviews-by-category/index.js | 4 +- .../no-reviews-placeholder.js | 5 +-- .../blocks/reviews/reviews-by-product/edit.js | 12 ++++-- .../reviews/reviews-by-product/index.js | 5 +-- .../no-reviews-placeholder.js | 4 +- .../js/components/error-placeholder/index.js | 4 +- assets/js/components/icons/all-reviews.js | 25 ------------- .../js/components/icons/checkbox-checked.js | 22 ----------- .../js/components/icons/checkbox-unchecked.js | 22 ----------- assets/js/components/icons/external.js | 34 ----------------- assets/js/components/icons/folder-star.js | 23 ------------ assets/js/components/icons/folder.js | 22 ----------- assets/js/components/icons/index.js | 19 ---------- assets/js/components/icons/money.js | 36 ------------------ assets/js/components/icons/new-releases.js | 21 ----------- assets/js/components/icons/product-on-sale.js | 20 ---------- assets/js/components/icons/product-search.js | 17 --------- assets/js/components/icons/product-tag.js | 28 -------------- assets/js/components/icons/radio-selected.js | 22 ----------- .../js/components/icons/radio-unselected.js | 22 ----------- .../components/icons/reviews-by-category.js | 28 -------------- .../js/components/icons/reviews-by-product.js | 27 -------------- assets/js/components/icons/trash.js | 24 ------------ assets/js/components/icons/widgets.js | 21 ----------- assets/js/components/icons/woo.js | 37 ------------------- assets/js/components/product-control/index.js | 17 +++++---- .../with-feedback-prompt/feedback-prompt.js | 6 +-- assets/js/icons/icon/index.js | 14 +++++++ assets/js/icons/index.js | 31 ++++++++++++++++ assets/js/icons/library/bill.js | 13 +++++++ assets/js/icons/library/card.js | 13 +++++++ assets/js/icons/library/cart.js | 13 +++++++ assets/js/icons/library/comment.js | 13 +++++++ assets/js/icons/library/discussion.js | 13 +++++++ assets/js/icons/library/exclamation.js | 13 +++++++ assets/js/icons/library/external.js | 27 ++++++++++++++ assets/js/icons/library/folder-stared.js | 13 +++++++ assets/js/icons/library/folder.js | 13 +++++++ assets/js/icons/library/grid.js | 13 +++++++ assets/js/icons/library/image.js | 13 +++++++ assets/js/icons/library/list.js | 13 +++++++ assets/js/icons/library/more.js | 16 ++++++++ assets/js/icons/library/notice.js | 12 ++++++ assets/js/icons/library/radio-selected.js | 15 ++++++++ assets/js/icons/library/radio-unselected.js | 15 ++++++++ assets/js/icons/library/review.js | 13 +++++++ assets/js/icons/library/search.js | 13 +++++++ assets/js/icons/library/server.js | 13 +++++++ assets/js/icons/library/star.js | 13 +++++++ assets/js/icons/library/stonks.js | 13 +++++++ assets/js/icons/library/tag.js | 15 ++++++++ assets/js/icons/library/tags.js | 15 ++++++++ assets/js/icons/library/thumb-up.js | 13 +++++++ assets/js/icons/library/toggle.js | 13 +++++++ assets/js/icons/library/trash.js | 16 ++++++++ assets/js/icons/library/truck.js | 13 +++++++ assets/js/icons/library/widgets.js | 13 +++++++ assets/js/icons/library/woo.js | 20 ++++++++++ assets/js/index.js | 11 +++++- bin/webpack-helpers.js | 17 +++++---- 102 files changed, 615 insertions(+), 600 deletions(-) delete mode 100644 assets/js/components/icons/all-reviews.js delete mode 100644 assets/js/components/icons/checkbox-checked.js delete mode 100644 assets/js/components/icons/checkbox-unchecked.js delete mode 100644 assets/js/components/icons/external.js delete mode 100644 assets/js/components/icons/folder-star.js delete mode 100644 assets/js/components/icons/folder.js delete mode 100644 assets/js/components/icons/index.js delete mode 100644 assets/js/components/icons/money.js delete mode 100644 assets/js/components/icons/new-releases.js delete mode 100644 assets/js/components/icons/product-on-sale.js delete mode 100644 assets/js/components/icons/product-search.js delete mode 100644 assets/js/components/icons/product-tag.js delete mode 100644 assets/js/components/icons/radio-selected.js delete mode 100644 assets/js/components/icons/radio-unselected.js delete mode 100644 assets/js/components/icons/reviews-by-category.js delete mode 100644 assets/js/components/icons/reviews-by-product.js delete mode 100644 assets/js/components/icons/trash.js delete mode 100644 assets/js/components/icons/widgets.js delete mode 100644 assets/js/components/icons/woo.js create mode 100644 assets/js/icons/icon/index.js create mode 100644 assets/js/icons/index.js create mode 100644 assets/js/icons/library/bill.js create mode 100644 assets/js/icons/library/card.js create mode 100644 assets/js/icons/library/cart.js create mode 100644 assets/js/icons/library/comment.js create mode 100644 assets/js/icons/library/discussion.js create mode 100644 assets/js/icons/library/exclamation.js create mode 100644 assets/js/icons/library/external.js create mode 100644 assets/js/icons/library/folder-stared.js create mode 100644 assets/js/icons/library/folder.js create mode 100644 assets/js/icons/library/grid.js create mode 100644 assets/js/icons/library/image.js create mode 100644 assets/js/icons/library/list.js create mode 100644 assets/js/icons/library/more.js create mode 100644 assets/js/icons/library/notice.js create mode 100644 assets/js/icons/library/radio-selected.js create mode 100644 assets/js/icons/library/radio-unselected.js create mode 100644 assets/js/icons/library/review.js create mode 100644 assets/js/icons/library/search.js create mode 100644 assets/js/icons/library/server.js create mode 100644 assets/js/icons/library/star.js create mode 100644 assets/js/icons/library/stonks.js create mode 100644 assets/js/icons/library/tag.js create mode 100644 assets/js/icons/library/tags.js create mode 100644 assets/js/icons/library/thumb-up.js create mode 100644 assets/js/icons/library/toggle.js create mode 100644 assets/js/icons/library/trash.js create mode 100644 assets/js/icons/library/truck.js create mode 100644 assets/js/icons/library/widgets.js create mode 100644 assets/js/icons/library/woo.js diff --git a/assets/js/atomic/blocks/product/button/index.js b/assets/js/atomic/blocks/product/button/index.js index a4f55d258d6..486977838a1 100644 --- a/assets/js/atomic/blocks/product/button/index.js +++ b/assets/js/atomic/blocks/product/button/index.js @@ -4,7 +4,7 @@ import { __ } from '@wordpress/i18n'; import { registerBlockType } from '@wordpress/blocks'; import { Disabled } from '@wordpress/components'; -import Gridicon from 'gridicons'; +import { Icon, cart } from '@woocommerce/icons'; import { ProductButton } from '@woocommerce/atomic-components/product'; /** @@ -19,7 +19,7 @@ const blockConfig = { 'woo-gutenberg-products-block' ), icon: { - src: , + src: , foreground: '#96588a', }, edit( props ) { diff --git a/assets/js/atomic/blocks/product/image/index.js b/assets/js/atomic/blocks/product/image/index.js index 8fb3c16acef..b91fbe63840 100644 --- a/assets/js/atomic/blocks/product/image/index.js +++ b/assets/js/atomic/blocks/product/image/index.js @@ -3,7 +3,7 @@ */ import { __ } from '@wordpress/i18n'; import { registerBlockType } from '@wordpress/blocks'; -import Gridicon from 'gridicons'; +import { Icon, image } from '@woocommerce/icons'; import { Fragment } from '@wordpress/element'; import { Disabled, PanelBody, ToggleControl } from '@wordpress/components'; import { InspectorControls } from '@wordpress/block-editor'; @@ -23,7 +23,7 @@ const blockConfig = { 'woo-gutenberg-products-block' ), icon: { - src: , + src: , foreground: '#96588a', }, attributes: { diff --git a/assets/js/atomic/blocks/product/price/index.js b/assets/js/atomic/blocks/product/price/index.js index 0a8393c7751..b75231796f6 100644 --- a/assets/js/atomic/blocks/product/price/index.js +++ b/assets/js/atomic/blocks/product/price/index.js @@ -3,7 +3,7 @@ */ import { __ } from '@wordpress/i18n'; import { registerBlockType } from '@wordpress/blocks'; -import Gridicon from 'gridicons'; +import { Icon, bill } from '@woocommerce/icons'; import { ProductPrice } from '@woocommerce/atomic-components/product'; /** @@ -18,7 +18,7 @@ const blockConfig = { 'woo-gutenberg-products-block' ), icon: { - src: , + src: , foreground: '#96588a', }, diff --git a/assets/js/atomic/blocks/product/rating/index.js b/assets/js/atomic/blocks/product/rating/index.js index 41917aee845..7cc526287f6 100644 --- a/assets/js/atomic/blocks/product/rating/index.js +++ b/assets/js/atomic/blocks/product/rating/index.js @@ -3,7 +3,7 @@ */ import { __ } from '@wordpress/i18n'; import { registerBlockType } from '@wordpress/blocks'; -import Gridicon from 'gridicons'; +import { Icon, star } from '@woocommerce/icons'; import { ProductRating } from '@woocommerce/atomic-components/product'; /** @@ -18,7 +18,7 @@ const blockConfig = { 'woo-gutenberg-products-block' ), icon: { - src: , + src: , foreground: '#96588a', }, diff --git a/assets/js/atomic/blocks/product/sale-badge/index.js b/assets/js/atomic/blocks/product/sale-badge/index.js index d981c0c41c8..d854cac2e92 100644 --- a/assets/js/atomic/blocks/product/sale-badge/index.js +++ b/assets/js/atomic/blocks/product/sale-badge/index.js @@ -4,7 +4,7 @@ import { __ } from '@wordpress/i18n'; import { registerBlockType } from '@wordpress/blocks'; import { ProductSaleBadge } from '@woocommerce/atomic-components/product'; -import { IconProductOnSale } from '@woocommerce/block-components/icons'; +import { Icon, tag } from '@woocommerce/icons'; /** * Internal dependencies @@ -18,7 +18,7 @@ const blockConfig = { 'woo-gutenberg-products-block' ), icon: { - src: , + src: , foreground: '#96588a', }, supports: { diff --git a/assets/js/atomic/blocks/product/shared-config.js b/assets/js/atomic/blocks/product/shared-config.js index c431f6f720b..77da71c1f10 100644 --- a/assets/js/atomic/blocks/product/shared-config.js +++ b/assets/js/atomic/blocks/product/shared-config.js @@ -2,7 +2,7 @@ * External dependencies */ import { __ } from '@wordpress/i18n'; -import Gridicon from 'gridicons'; +import { Icon, grid } from '@woocommerce/icons'; import { previewProducts } from '@woocommerce/resource-previews'; /** @@ -12,7 +12,7 @@ export default { category: 'woocommerce', keywords: [ __( 'WooCommerce', 'woo-gutenberg-products-block' ) ], icon: { - src: , + src: , foreground: '#96588a', }, supports: { diff --git a/assets/js/base/components/checkout/no-shipping/index.js b/assets/js/base/components/checkout/no-shipping/index.js index e8ac523a876..e85e5d4ff27 100644 --- a/assets/js/base/components/checkout/no-shipping/index.js +++ b/assets/js/base/components/checkout/no-shipping/index.js @@ -3,7 +3,7 @@ */ import { __ } from '@wordpress/i18n'; import { Placeholder, Button } from '@wordpress/components'; -import ShippingIcon from 'gridicons/dist/shipping'; +import { Icon, truck } from '@woocommerce/icons'; import { ADMIN_URL } from '@woocommerce/settings'; /** @@ -14,7 +14,7 @@ import './style.scss'; const NoShipping = () => { return ( } + icon={ } label={ __( 'Shipping options', 'woo-gutenberg-products-block' ) } className="wc-block-checkout__no-shipping" > diff --git a/assets/js/blocks/active-filters/index.js b/assets/js/blocks/active-filters/index.js index a86c82f8310..234f47f0812 100644 --- a/assets/js/blocks/active-filters/index.js +++ b/assets/js/blocks/active-filters/index.js @@ -3,7 +3,7 @@ */ import { __ } from '@wordpress/i18n'; import { registerBlockType } from '@wordpress/blocks'; -import Gridicon from 'gridicons'; +import { Icon, toggle } from '@woocommerce/icons'; import classNames from 'classnames'; /** @@ -14,7 +14,7 @@ import edit from './edit.js'; registerBlockType( 'woocommerce/active-filters', { title: __( 'Active Product Filters', 'woo-gutenberg-products-block' ), icon: { - src: , + src: , foreground: '#96588a', }, category: 'woocommerce', diff --git a/assets/js/blocks/attribute-filter/edit.js b/assets/js/blocks/attribute-filter/edit.js index 312e7a29d79..6a48b480b20 100644 --- a/assets/js/blocks/attribute-filter/edit.js +++ b/assets/js/blocks/attribute-filter/edit.js @@ -13,7 +13,7 @@ import { Toolbar, withSpokenMessages, } from '@wordpress/components'; -import Gridicon from 'gridicons'; +import { Icon, server, external } from '@woocommerce/icons'; import { SearchListControl } from '@woocommerce/components'; import { mapValues, toArray, sortBy, find } from 'lodash'; import { ATTRIBUTES } from '@woocommerce/block-settings'; @@ -26,7 +26,6 @@ import BlockTitle from '@woocommerce/block-components/block-title'; */ import Block from './block.js'; import './editor.scss'; -import { IconExternal } from '../../components/icons'; import ToggleButtonControl from '../../components/toggle-button-control'; const Edit = ( { attributes, setAttributes, debouncedSpeak } ) => { @@ -221,7 +220,7 @@ const Edit = ( { attributes, setAttributes, debouncedSpeak } ) => { const noAttributesPlaceholder = () => ( } + icon={ } label={ __( 'Filter Products by Attribute', 'woo-gutenberg-products-block' @@ -247,7 +246,7 @@ const Edit = ( { attributes, setAttributes, debouncedSpeak } ) => { > { __( 'Add new attribute', 'woo-gutenberg-products-block' ) + ' ' } - + diff --git a/assets/js/blocks/cart-checkout/cart/index.js b/assets/js/blocks/cart-checkout/cart/index.js index 03c7a1aaed5..a95eea63030 100644 --- a/assets/js/blocks/cart-checkout/cart/index.js +++ b/assets/js/blocks/cart-checkout/cart/index.js @@ -4,6 +4,7 @@ import { __ } from '@wordpress/i18n'; import { InnerBlocks } from '@wordpress/block-editor'; import { registerBlockType } from '@wordpress/blocks'; +import { Icon, cart } from '@woocommerce/icons'; /** * Internal dependencies @@ -18,7 +19,7 @@ import './style.scss'; registerBlockType( 'woocommerce/cart', { title: __( 'Cart', 'woo-gutenberg-products-block' ), icon: { - src: 'cart', + src: , foreground: '#96588a', }, category: 'woocommerce', diff --git a/assets/js/blocks/cart-checkout/checkout/index.js b/assets/js/blocks/cart-checkout/checkout/index.js index 6012b772efc..383e9644229 100644 --- a/assets/js/blocks/cart-checkout/checkout/index.js +++ b/assets/js/blocks/cart-checkout/checkout/index.js @@ -3,6 +3,7 @@ */ import { __ } from '@wordpress/i18n'; import { registerBlockType } from '@wordpress/blocks'; +import { Icon, card } from '@woocommerce/icons'; /** * Internal dependencies @@ -14,10 +15,8 @@ import './editor.scss'; registerBlockType( 'woocommerce/checkout', { title: __( 'Checkout', 'woo-gutenberg-products-block' ), icon: { - // @todo: Replace this once we have an icon for the checkout - src: 'cart', - // @todo: Revert this to #96588a once we have an icon for the checkout - foreground: '#555d66', + src: , + foreground: '#96588a', }, category: 'woocommerce', keywords: [ __( 'WooCommerce', 'woo-gutenberg-products-block' ) ], diff --git a/assets/js/blocks/featured-category/block.js b/assets/js/blocks/featured-category/block.js index de363605ea4..15db530a5c0 100644 --- a/assets/js/blocks/featured-category/block.js +++ b/assets/js/blocks/featured-category/block.js @@ -31,7 +31,7 @@ import { Fragment } from '@wordpress/element'; import { compose } from '@wordpress/compose'; import PropTypes from 'prop-types'; import { MIN_HEIGHT } from '@woocommerce/block-settings'; -import { IconFolderStar } from '@woocommerce/block-components/icons'; +import { Icon, folderStared } from '@woocommerce/icons'; import ProductCategoryControl from '@woocommerce/block-components/product-category-control'; import ErrorPlaceholder from '@woocommerce/block-components/error-placeholder'; @@ -190,7 +190,7 @@ const FeaturedCategory = ( { return ( } + icon={ } label={ __( 'Featured Category', 'woo-gutenberg-products-block' @@ -337,7 +337,7 @@ const FeaturedCategory = ( { const renderNoCategory = () => ( } + icon={ } label={ __( 'Featured Category', 'woo-gutenberg-products-block' ) } > { isLoading ? ( diff --git a/assets/js/blocks/featured-category/index.js b/assets/js/blocks/featured-category/index.js index 0e593c043dc..1507d3b3dbe 100644 --- a/assets/js/blocks/featured-category/index.js +++ b/assets/js/blocks/featured-category/index.js @@ -5,7 +5,7 @@ import { __ } from '@wordpress/i18n'; import { InnerBlocks } from '@wordpress/editor'; import { registerBlockType } from '@wordpress/blocks'; import { DEFAULT_HEIGHT } from '@woocommerce/block-settings'; -import { IconFolderStar } from '@woocommerce/block-components/icons'; +import { Icon, folderStared } from '@woocommerce/icons'; /** * Internal dependencies @@ -21,7 +21,7 @@ import { example } from './example'; registerBlockType( 'woocommerce/featured-category', { title: __( 'Featured Category', 'woo-gutenberg-products-block' ), icon: { - src: , + src: , foreground: '#96588a', }, category: 'woocommerce', diff --git a/assets/js/blocks/featured-product/block.js b/assets/js/blocks/featured-product/block.js index b323f8d1fd3..86e03bfe892 100644 --- a/assets/js/blocks/featured-product/block.js +++ b/assets/js/blocks/featured-product/block.js @@ -35,6 +35,7 @@ import { MIN_HEIGHT } from '@woocommerce/block-settings'; import ProductControl from '@woocommerce/block-components/product-control'; import ErrorPlaceholder from '@woocommerce/block-components/error-placeholder'; import { withProduct } from '@woocommerce/block-hocs'; +import { Icon, star } from '@woocommerce/icons'; /** * Internal dependencies @@ -84,7 +85,7 @@ const FeaturedProduct = ( { { getBlockControls() } } label={ __( 'Featured Product', 'woo-gutenberg-products-block' @@ -382,7 +383,7 @@ const FeaturedProduct = ( { const renderNoProduct = () => ( } label={ __( 'Featured Product', 'woo-gutenberg-products-block' ) } > { isLoading ? ( diff --git a/assets/js/blocks/featured-product/index.js b/assets/js/blocks/featured-product/index.js index 8c93756bf47..3569302194b 100644 --- a/assets/js/blocks/featured-product/index.js +++ b/assets/js/blocks/featured-product/index.js @@ -5,6 +5,7 @@ import { __ } from '@wordpress/i18n'; import { InnerBlocks } from '@wordpress/editor'; import { registerBlockType } from '@wordpress/blocks'; import { DEFAULT_HEIGHT } from '@woocommerce/block-settings'; +import { Icon, star } from '@woocommerce/icons'; /** * Internal dependencies @@ -20,7 +21,7 @@ import Block from './block'; registerBlockType( 'woocommerce/featured-product', { title: __( 'Featured Product', 'woo-gutenberg-products-block' ), icon: { - src: 'star-filled', + src: , foreground: '#96588a', }, category: 'woocommerce', diff --git a/assets/js/blocks/handpicked-products/block.js b/assets/js/blocks/handpicked-products/block.js index 2a2955226f1..d57c8a2c02b 100644 --- a/assets/js/blocks/handpicked-products/block.js +++ b/assets/js/blocks/handpicked-products/block.js @@ -21,10 +21,10 @@ import { Component, Fragment } from '@wordpress/element'; import PropTypes from 'prop-types'; import { MAX_COLUMNS, MIN_COLUMNS } from '@woocommerce/block-settings'; import GridContentControl from '@woocommerce/block-components/grid-content-control'; -import { IconWidgets } from '@woocommerce/block-components/icons'; import ProductsControl from '@woocommerce/block-components/products-control'; import ProductOrderbyControl from '@woocommerce/block-components/product-orderby-control'; import { gridBlockPreview } from '@woocommerce/resource-previews'; +import { Icon, widgets } from '@woocommerce/icons'; /** * Component to handle edit mode of "Hand-picked Products". @@ -129,7 +129,7 @@ class ProductsBlock extends Component { return ( } + icon={ } label={ __( 'Hand-picked Products', 'woo-gutenberg-products-block' diff --git a/assets/js/blocks/handpicked-products/index.js b/assets/js/blocks/handpicked-products/index.js index 60f1d32f6d9..75454d52bae 100644 --- a/assets/js/blocks/handpicked-products/index.js +++ b/assets/js/blocks/handpicked-products/index.js @@ -4,7 +4,7 @@ import { __ } from '@wordpress/i18n'; import { registerBlockType } from '@wordpress/blocks'; import { DEFAULT_COLUMNS } from '@woocommerce/block-settings'; -import { IconWidgets } from '@woocommerce/block-components/icons'; +import { Icon, widgets } from '@woocommerce/icons'; /** * Internal dependencies @@ -16,7 +16,7 @@ import { deprecatedConvertToShortcode } from '../../utils/deprecations'; registerBlockType( 'woocommerce/handpicked-products', { title: __( 'Hand-picked Products', 'woo-gutenberg-products-block' ), icon: { - src: , + src: , foreground: '#96588a', }, category: 'woocommerce', diff --git a/assets/js/blocks/price-filter/edit.js b/assets/js/blocks/price-filter/edit.js index 6f2444e2f03..76ed8fc0c33 100644 --- a/assets/js/blocks/price-filter/edit.js +++ b/assets/js/blocks/price-filter/edit.js @@ -15,13 +15,13 @@ import { PRODUCT_COUNT } from '@woocommerce/block-settings'; import { getAdminLink } from '@woocommerce/settings'; import HeadingToolbar from '@woocommerce/block-components/heading-toolbar'; import BlockTitle from '@woocommerce/block-components/block-title'; +import { Icon, bill, external } from '@woocommerce/icons'; /** * Internal dependencies */ import Block from './block.js'; import './editor.scss'; -import { IconMoney, IconExternal } from '../../components/icons'; import ToggleButtonControl from '../../components/toggle-button-control'; export default function( { attributes, setAttributes } ) { @@ -116,7 +116,7 @@ export default function( { attributes, setAttributes } ) { const noProductsPlaceholder = () => ( } + icon={ } label={ __( 'Filter Products by Price', 'woo-gutenberg-products-block' @@ -140,7 +140,7 @@ export default function( { attributes, setAttributes } ) { > { __( 'Add new product', 'woo-gutenberg-products-block' ) + ' ' } - + } + icon={ } label={ __( 'Reset layout to default', 'woo-gutenberg-products-block' diff --git a/assets/js/blocks/products/all-products/index.js b/assets/js/blocks/products/all-products/index.js index 62c3859bffe..b971efcf84e 100644 --- a/assets/js/blocks/products/all-products/index.js +++ b/assets/js/blocks/products/all-products/index.js @@ -4,7 +4,7 @@ import { __ } from '@wordpress/i18n'; import { InnerBlocks } from '@wordpress/block-editor'; import { registerBlockType } from '@wordpress/blocks'; -import Gridicon from 'gridicons'; +import { Icon, grid } from '@woocommerce/icons'; /** * Internal dependencies @@ -17,7 +17,7 @@ import '../../../atomic/blocks/product'; const blockSettings = { title: __( 'All Products', 'woo-gutenberg-products-block' ), icon: { - src: , + src: , foreground: '#96588a', }, category: 'woocommerce', diff --git a/assets/js/blocks/products/utils.js b/assets/js/blocks/products/utils.js index 3f2ea04f406..4ac479e506e 100644 --- a/assets/js/blocks/products/utils.js +++ b/assets/js/blocks/products/utils.js @@ -5,7 +5,7 @@ import { __ } from '@wordpress/i18n'; import { Button, Placeholder } from '@wordpress/components'; import classNames from 'classnames'; import { adminUrl } from '@woocommerce/settings'; -import { IconExternal } from '@woocommerce/block-components/icons'; +import { Icon, external } from '@woocommerce/icons'; export const getBlockClassName = ( blockClassName, attributes ) => { const { className, contentVisibility } = attributes; @@ -38,7 +38,7 @@ export const renderNoProductsPlaceholder = ( blockTitle, blockIcon ) => ( href={ adminUrl + 'post-new.php?post_type=product' } > { __( 'Add new product', 'woo-gutenberg-products-block' ) + ' ' } - + diff --git a/assets/js/blocks/cart-checkout/cart/index.js b/assets/js/blocks/cart-checkout/cart/index.js index a95eea63030..7ab8cd6fb55 100644 --- a/assets/js/blocks/cart-checkout/cart/index.js +++ b/assets/js/blocks/cart-checkout/cart/index.js @@ -19,7 +19,7 @@ import './style.scss'; registerBlockType( 'woocommerce/cart', { title: __( 'Cart', 'woo-gutenberg-products-block' ), icon: { - src: , + src: , foreground: '#96588a', }, category: 'woocommerce', diff --git a/assets/js/blocks/cart-checkout/checkout/index.js b/assets/js/blocks/cart-checkout/checkout/index.js index 383e9644229..3e00a9a6183 100644 --- a/assets/js/blocks/cart-checkout/checkout/index.js +++ b/assets/js/blocks/cart-checkout/checkout/index.js @@ -15,7 +15,7 @@ import './editor.scss'; registerBlockType( 'woocommerce/checkout', { title: __( 'Checkout', 'woo-gutenberg-products-block' ), icon: { - src: , + src: , foreground: '#96588a', }, category: 'woocommerce', diff --git a/assets/js/blocks/featured-category/block.js b/assets/js/blocks/featured-category/block.js index 6fea34bb82f..43918456f84 100644 --- a/assets/js/blocks/featured-category/block.js +++ b/assets/js/blocks/featured-category/block.js @@ -190,7 +190,7 @@ const FeaturedCategory = ( { return ( } + icon={ } label={ __( 'Featured Category', 'woo-gutenberg-products-block' @@ -337,7 +337,7 @@ const FeaturedCategory = ( { const renderNoCategory = () => ( } + icon={ } label={ __( 'Featured Category', 'woo-gutenberg-products-block' ) } > { isLoading ? ( diff --git a/assets/js/blocks/featured-category/index.js b/assets/js/blocks/featured-category/index.js index 7930a793db9..fb93f007450 100644 --- a/assets/js/blocks/featured-category/index.js +++ b/assets/js/blocks/featured-category/index.js @@ -21,7 +21,7 @@ import { example } from './example'; registerBlockType( 'woocommerce/featured-category', { title: __( 'Featured Category', 'woo-gutenberg-products-block' ), icon: { - src: , + src: , foreground: '#96588a', }, category: 'woocommerce', diff --git a/assets/js/blocks/featured-product/block.js b/assets/js/blocks/featured-product/block.js index 86e03bfe892..ab96306a1f7 100644 --- a/assets/js/blocks/featured-product/block.js +++ b/assets/js/blocks/featured-product/block.js @@ -85,7 +85,7 @@ const FeaturedProduct = ( { { getBlockControls() } } + icon={ } label={ __( 'Featured Product', 'woo-gutenberg-products-block' @@ -383,7 +383,7 @@ const FeaturedProduct = ( { const renderNoProduct = () => ( } + icon={ } label={ __( 'Featured Product', 'woo-gutenberg-products-block' ) } > { isLoading ? ( diff --git a/assets/js/blocks/featured-product/index.js b/assets/js/blocks/featured-product/index.js index 3569302194b..fc3191123c2 100644 --- a/assets/js/blocks/featured-product/index.js +++ b/assets/js/blocks/featured-product/index.js @@ -21,7 +21,7 @@ import Block from './block'; registerBlockType( 'woocommerce/featured-product', { title: __( 'Featured Product', 'woo-gutenberg-products-block' ), icon: { - src: , + src: , foreground: '#96588a', }, category: 'woocommerce', diff --git a/assets/js/blocks/handpicked-products/block.js b/assets/js/blocks/handpicked-products/block.js index d57c8a2c02b..f339adbb8fb 100644 --- a/assets/js/blocks/handpicked-products/block.js +++ b/assets/js/blocks/handpicked-products/block.js @@ -129,7 +129,7 @@ class ProductsBlock extends Component { return ( } + icon={ } label={ __( 'Hand-picked Products', 'woo-gutenberg-products-block' diff --git a/assets/js/blocks/handpicked-products/index.js b/assets/js/blocks/handpicked-products/index.js index 75454d52bae..1680ef9f729 100644 --- a/assets/js/blocks/handpicked-products/index.js +++ b/assets/js/blocks/handpicked-products/index.js @@ -16,7 +16,7 @@ import { deprecatedConvertToShortcode } from '../../utils/deprecations'; registerBlockType( 'woocommerce/handpicked-products', { title: __( 'Hand-picked Products', 'woo-gutenberg-products-block' ), icon: { - src: , + src: , foreground: '#96588a', }, category: 'woocommerce', diff --git a/assets/js/blocks/price-filter/edit.js b/assets/js/blocks/price-filter/edit.js index 76ed8fc0c33..8959818d233 100644 --- a/assets/js/blocks/price-filter/edit.js +++ b/assets/js/blocks/price-filter/edit.js @@ -116,7 +116,7 @@ export default function( { attributes, setAttributes } ) { const noProductsPlaceholder = () => ( } + icon={ } label={ __( 'Filter Products by Price', 'woo-gutenberg-products-block' @@ -140,7 +140,7 @@ export default function( { attributes, setAttributes } ) { > { __( 'Add new product', 'woo-gutenberg-products-block' ) + ' ' } - + } + icon={ } label={ __( 'Reset layout to default', 'woo-gutenberg-products-block' diff --git a/assets/js/blocks/products/all-products/index.js b/assets/js/blocks/products/all-products/index.js index b971efcf84e..b100205ea75 100644 --- a/assets/js/blocks/products/all-products/index.js +++ b/assets/js/blocks/products/all-products/index.js @@ -17,7 +17,7 @@ import '../../../atomic/blocks/product'; const blockSettings = { title: __( 'All Products', 'woo-gutenberg-products-block' ), icon: { - src: , + src: , foreground: '#96588a', }, category: 'woocommerce', diff --git a/assets/js/blocks/products/utils.js b/assets/js/blocks/products/utils.js index 4ac479e506e..9c1efc2a342 100644 --- a/assets/js/blocks/products/utils.js +++ b/assets/js/blocks/products/utils.js @@ -38,7 +38,7 @@ export const renderNoProductsPlaceholder = ( blockTitle, blockIcon ) => ( href={ adminUrl + 'post-new.php?post_type=product' } > { __( 'Add new product', 'woo-gutenberg-products-block' ) + ' ' } - +