From 032d5810ef2ba0468b5311ad5bd1069360b40af9 Mon Sep 17 00:00:00 2001 From: Neil Anderson Date: Thu, 1 Jun 2017 19:40:03 +0100 Subject: [PATCH 001/103] Add contextually aware title block mover (#557) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After thinking about what would be best for the user in terms of accessibility and guidance, I’ve decided that trying to give them the “content” of a block wouldn’t very useful in a lot of contexts – especially non-text blocks. Instead, I’ve opted for telling them where the block is, and where it’ll be moved to. This is also the case for multiple selected blocks, where it will fall back to simpler language. --- editor/block-mover/index.js | 27 +++++- editor/block-mover/mover-label.js | 73 +++++++++++++++ editor/block-mover/test/mover-label.js | 121 +++++++++++++++++++++++++ 3 files changed, 219 insertions(+), 2 deletions(-) create mode 100644 editor/block-mover/mover-label.js create mode 100644 editor/block-mover/test/mover-label.js diff --git a/editor/block-mover/index.js b/editor/block-mover/index.js index f040d2394a67f..8215ae54ed1fe 100644 --- a/editor/block-mover/index.js +++ b/editor/block-mover/index.js @@ -13,13 +13,20 @@ import { IconButton } from 'components'; * Internal dependencies */ import './style.scss'; -import { isFirstBlock, isLastBlock } from '../selectors'; +import { isFirstBlock, isLastBlock, getBlockOrder, getBlock } from '../selectors'; +import { blockMoverLabel } from './mover-label'; +import { getBlockType } from 'blocks'; -function BlockMover( { onMoveUp, onMoveDown, isFirst, isLast } ) { +function BlockMover( { onMoveUp, onMoveDown, isFirst, isLast, uids, block, firstPosition } ) { // We emulate a disabled state because forcefully applying the `disabled` // attribute on the button while it has focus causes the screen to change // to an unfocused state (body as active element) without firing blur on, // the rendering parent, leaving it unable to react to focus out. + let blockType; + + if ( uids.length === 1 && block ) { + blockType = getBlockType( block.name ); + } return (
@@ -27,12 +34,26 @@ function BlockMover( { onMoveUp, onMoveDown, isFirst, isLast } ) { className="editor-block-mover__control" onClick={ isFirst ? null : onMoveUp } icon="arrow-up-alt2" + label={ blockMoverLabel( uids.length, { + type: blockType && blockType.title, + isFirst, + isLast, + firstPosition, + dir: -1, + } ) } aria-disabled={ isFirst } />
@@ -43,6 +64,8 @@ export default connect( ( state, ownProps ) => ( { isFirst: isFirstBlock( state, first( ownProps.uids ) ), isLast: isLastBlock( state, last( ownProps.uids ) ), + firstPosition: getBlockOrder( state, first( ownProps.uids ) ), + block: getBlock( state, first( ownProps.uids ) ), } ), ( dispatch, ownProps ) => ( { onMoveDown() { diff --git a/editor/block-mover/mover-label.js b/editor/block-mover/mover-label.js new file mode 100644 index 0000000000000..42135d349c9ff --- /dev/null +++ b/editor/block-mover/mover-label.js @@ -0,0 +1,73 @@ +import { __, sprintf } from 'i18n'; + +export function blockMoverLabel( selectedCount, { type, firstPosition, isFirst, isLast, dir } ) { + const position = ( firstPosition + 1 ); + + if ( selectedCount > 1 ) { + return multiBlockMoverLabel( selectedCount, { isFirst, isLast, firstPosition, dir } ); + } + + if ( isFirst && isLast ) { + return sprintf( __( 'Block "%s" is the only block, and cannot be moved' ), type ); + } + + if ( dir > 0 && ! isLast ) { + // moving down + return sprintf( + __( 'Move "%s" block from position %s down to position %s' ), + type, + position, + ( position + 1 ) + ); + } + + if ( dir > 0 && isLast ) { + // moving down, and is the last item + return sprintf( __( 'Block "%s" is at the end of the content and can’t be moved down' ), type ); + } + + if ( dir < 0 && ! isFirst ) { + // moving up + return sprintf( + __( 'Move "%s" block from position %s up to position %s' ), + type, + position, + ( position - 1 ) + ); + } + + if ( dir < 0 && isFirst ) { + // moving up, and is the first item + return sprintf( __( 'Block "%s" is at the beginning of the content and can’t be moved up' ), type ); + } + + return ''; +} + +export function multiBlockMoverLabel( selectedCount, { isFirst, isLast, firstPosition, dir } ) { + const position = ( firstPosition + 1 ); + + if ( dir < 0 && isFirst ) { + return __( 'Blocks cannot be moved up as they are already at the top' ); + } + + if ( dir > 0 && isLast ) { + return __( 'Blocks cannot be moved down as they are already at the bottom' ); + } + + if ( dir < 0 && ! isFirst ) { + return sprintf( + __( 'Move %s blocks from position %s up by one place' ), + selectedCount, + position + ); + } + + if ( dir > 0 && ! isLast ) { + return sprintf( + __( 'Move %s blocks from position %s down by one place' ), + selectedCount, + position + ); + } +} diff --git a/editor/block-mover/test/mover-label.js b/editor/block-mover/test/mover-label.js new file mode 100644 index 0000000000000..9a07e45f86a1c --- /dev/null +++ b/editor/block-mover/test/mover-label.js @@ -0,0 +1,121 @@ +/** + * External dependencies + */ +import { expect } from 'chai'; + +/** + * Internal dependencies + */ +import { blockMoverLabel, multiBlockMoverLabel } from '../mover-label'; + +describe( 'block mover', () => { + describe( 'blockMoverLabel', () => { + const type = 'TestType'; + + it( 'Should generate a title for the first item moving up', () => { + expect( blockMoverLabel( 1, { + type, + firstPosition: 0, + isFirst: true, + isLast: false, + dir: -1, + } ) ).to.equal( + `Block "${ type }" is at the beginning of the content and can’t be moved up` + ); + } ); + + it( 'Should generate a title for the last item moving down', () => { + expect( blockMoverLabel( 1, { + type, + firstPosition: 3, + isFirst: false, + isLast: true, + dir: 1, + } ) ).to.equal( + `Block "${ type }" is at the end of the content and can’t be moved down` + ); + } ); + + it( 'Should generate a title for the second item moving up', () => { + expect( blockMoverLabel( 1, { + type, + firstPosition: 1, + isFirst: false, + isLast: false, + dir: -1, + } ) ).to.equal( + `Move "${ type }" block from position 2 up to position 1` + ); + } ); + + it( 'Should generate a title for the second item moving down', () => { + expect( blockMoverLabel( 1, { + type, + firstPosition: 1, + isFirst: false, + isLast: false, + dir: 1, + } ) ).to.equal( + `Move "${ type }" block from position 2 down to position 3` + ); + } ); + + it( 'Should generate a title for the only item in the list', () => { + expect( blockMoverLabel( 1, { + type, + firstPosition: 0, + isFirst: true, + isLast: true, + dir: 1, + } ) ).to.equal( + `Block "${ type }" is the only block, and cannot be moved` + ); + } ); + } ); + + describe( 'multiBlockMoverLabel', () => { + it( 'Should generate a title moving multiple blocks up', () => { + expect( multiBlockMoverLabel( 4, { + firstPosition: 1, + isFirst: false, + isLast: true, + dir: -1, + } ) ).to.equal( + 'Move 4 blocks from position 2 up by one place' + ); + } ); + + it( 'Should generate a title moving multiple blocks down', () => { + expect( multiBlockMoverLabel( 4, { + firstPosition: 0, + isFirst: true, + isLast: false, + dir: 1, + } ) ).to.equal( + 'Move 4 blocks from position 1 down by one place' + ); + } ); + + it( 'Should generate a title for a selection of blocks at the top', () => { + expect( multiBlockMoverLabel( 4, { + firstPosition: 1, + isFirst: true, + isLast: true, + dir: -1, + } ) ).to.equal( + 'Blocks cannot be moved up as they are already at the top' + ); + } ); + + it( 'Should generate a title for a selection of blocks at the bottom', () => { + expect( multiBlockMoverLabel( 4, { + firstPosition: 2, + isFirst: false, + isLast: true, + dir: 1, + } ) ).to.equal( + 'Blocks cannot be moved down as they are already at the bottom' + ); + } ); + } ); +} ); From 8ef303125098812e67994eb9815e30220738749a Mon Sep 17 00:00:00 2001 From: Nicola Heald Date: Fri, 2 Jun 2017 14:23:37 +0100 Subject: [PATCH 002/103] More embed block fixes * Loading the rendered html on loading a saved block moved into componentWillMount * Removed '.includes' usage, as it's not polyfilled * Added a new rendering state for when we're loading a saved block * Replaced string manipulation of urls to extract the host, with url.parse --- blocks/library/embed/index.js | 41 +++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/blocks/library/embed/index.js b/blocks/library/embed/index.js index 25659caaecf83..d260dfbf3a0ed 100644 --- a/blocks/library/embed/index.js +++ b/blocks/library/embed/index.js @@ -10,6 +10,11 @@ import './style.scss'; import { registerBlockType, query } from '../../api'; import Editable from '../../editable'; +/** + * External dependencies + */ +import { parse } from 'url'; + const { attr, children } = query; /** @@ -76,17 +81,25 @@ registerBlockType( 'core/embed', { constructor() { super( ...arguments ); this.doServerSideRender = this.doServerSideRender.bind( this ); + this.isPreviewBlacklisted = this.isPreviewBlacklisted.bind( this ); this.state = { html: '', type: '', error: false, fetching: false, + loadingFromSavedBlock: false, }; this.noPreview = [ 'facebook.com', ]; + } + + componentWillMount() { if ( this.props.attributes.url ) { // if the url is already there, we're loading a saved block, so we need to render + // a different thing, which is why this doesn't use 'fetching', as that + // is for when the user is putting in a new url on the placeholder form + this.setState( { loadingFromSavedBlock: true } ); this.doServerSideRender(); } } @@ -96,6 +109,19 @@ registerBlockType( 'core/embed', { this.unmounting = true; } + isPreviewBlacklisted( host ) { + if ( ! host ) { + return false; + } + host = host.replace( 'www.', '' ); + for ( let i = 0; i < this.noPreview.length; i++ ) { + if ( host === this.noPreview[ i ] ) { + return true; + } + } + return false; + } + doServerSideRender( event ) { if ( event ) { event.preventDefault(); @@ -118,17 +144,24 @@ registerBlockType( 'core/embed', { } else { this.setState( { error: true } ); } - this.setState( { fetching: false } ); + this.setState( { fetching: false, loadingFromSavedBlock: false } ); } ); } ); } render() { - const { html, type, error, fetching } = this.state; + const { html, type, error, fetching, loadingFromSavedBlock } = this.state; const { url, caption } = this.props.attributes; const { setAttributes, focus, setFocus } = this.props; + if ( loadingFromSavedBlock ) { + // we're loading from a saved block, but haven't fetched the HTML yet... + return ( +

{ url }

+ ); + } + if ( ! html ) { return ( @@ -152,8 +185,8 @@ registerBlockType( 'core/embed', { ); } - const domain = url.split( '/' )[ 2 ].replace( /^www\./, '' ); - const cannotPreview = this.noPreview.includes( domain ); + const urlBits = parse( url ); + const cannotPreview = this.isPreviewBlacklisted( urlBits.host ); let typeClassName = 'blocks-embed'; if ( 'video' === type ) { From 8b85043b579dafec6fdd3cb73bfda1465bfccb5b Mon Sep 17 00:00:00 2001 From: Neil Anderson Date: Fri, 2 Jun 2017 18:42:32 +0100 Subject: [PATCH 003/103] Rename firstPosition to firstIndex --- editor/block-mover/index.js | 8 ++++---- editor/block-mover/mover-label.js | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/editor/block-mover/index.js b/editor/block-mover/index.js index 8215ae54ed1fe..05a8f773e9739 100644 --- a/editor/block-mover/index.js +++ b/editor/block-mover/index.js @@ -17,7 +17,7 @@ import { isFirstBlock, isLastBlock, getBlockOrder, getBlock } from '../selectors import { blockMoverLabel } from './mover-label'; import { getBlockType } from 'blocks'; -function BlockMover( { onMoveUp, onMoveDown, isFirst, isLast, uids, block, firstPosition } ) { +function BlockMover( { onMoveUp, onMoveDown, isFirst, isLast, uids, block, firstIndex } ) { // We emulate a disabled state because forcefully applying the `disabled` // attribute on the button while it has focus causes the screen to change // to an unfocused state (body as active element) without firing blur on, @@ -38,7 +38,7 @@ function BlockMover( { onMoveUp, onMoveDown, isFirst, isLast, uids, block, first type: blockType && blockType.title, isFirst, isLast, - firstPosition, + firstIndex, dir: -1, } ) } aria-disabled={ isFirst } @@ -51,7 +51,7 @@ function BlockMover( { onMoveUp, onMoveDown, isFirst, isLast, uids, block, first type: blockType && blockType.title, isFirst, isLast, - firstPosition, + firstIndex, dir: 1, } ) } aria-disabled={ isLast } @@ -64,8 +64,8 @@ export default connect( ( state, ownProps ) => ( { isFirst: isFirstBlock( state, first( ownProps.uids ) ), isLast: isLastBlock( state, last( ownProps.uids ) ), - firstPosition: getBlockOrder( state, first( ownProps.uids ) ), block: getBlock( state, first( ownProps.uids ) ), + firstIndex: getBlockOrder( state, first( ownProps.uids ) ), } ), ( dispatch, ownProps ) => ( { onMoveDown() { diff --git a/editor/block-mover/mover-label.js b/editor/block-mover/mover-label.js index 42135d349c9ff..7f0e05f7c4379 100644 --- a/editor/block-mover/mover-label.js +++ b/editor/block-mover/mover-label.js @@ -1,10 +1,10 @@ import { __, sprintf } from 'i18n'; -export function blockMoverLabel( selectedCount, { type, firstPosition, isFirst, isLast, dir } ) { - const position = ( firstPosition + 1 ); +export function blockMoverLabel( selectedCount, { type, firstIndex, isFirst, isLast, dir } ) { + const position = ( firstIndex + 1 ); if ( selectedCount > 1 ) { - return multiBlockMoverLabel( selectedCount, { isFirst, isLast, firstPosition, dir } ); + return multiBlockMoverLabel( selectedCount, { isFirst, isLast, firstIndex, dir } ); } if ( isFirst && isLast ) { @@ -44,8 +44,8 @@ export function blockMoverLabel( selectedCount, { type, firstPosition, isFirst, return ''; } -export function multiBlockMoverLabel( selectedCount, { isFirst, isLast, firstPosition, dir } ) { - const position = ( firstPosition + 1 ); +export function multiBlockMoverLabel( selectedCount, { isFirst, isLast, firstIndex, dir } ) { + const position = ( firstIndex + 1 ); if ( dir < 0 && isFirst ) { return __( 'Blocks cannot be moved up as they are already at the top' ); From f8e5f208a8c0ae6c34def3d4ffb5a63d0044542e Mon Sep 17 00:00:00 2001 From: Neil Anderson Date: Fri, 2 Jun 2017 18:44:42 +0100 Subject: [PATCH 004/103] Move blockTitle logic into connect --- editor/block-mover/index.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/editor/block-mover/index.js b/editor/block-mover/index.js index 05a8f773e9739..66fe2776669f4 100644 --- a/editor/block-mover/index.js +++ b/editor/block-mover/index.js @@ -17,17 +17,11 @@ import { isFirstBlock, isLastBlock, getBlockOrder, getBlock } from '../selectors import { blockMoverLabel } from './mover-label'; import { getBlockType } from 'blocks'; -function BlockMover( { onMoveUp, onMoveDown, isFirst, isLast, uids, block, firstIndex } ) { +function BlockMover( { onMoveUp, onMoveDown, isFirst, isLast, uids, blockType, firstIndex } ) { // We emulate a disabled state because forcefully applying the `disabled` // attribute on the button while it has focus causes the screen to change // to an unfocused state (body as active element) without firing blur on, // the rendering parent, leaving it unable to react to focus out. - let blockType; - - if ( uids.length === 1 && block ) { - blockType = getBlockType( block.name ); - } - return (
( { isFirst: isFirstBlock( state, first( ownProps.uids ) ), isLast: isLastBlock( state, last( ownProps.uids ) ), - block: getBlock( state, first( ownProps.uids ) ), firstIndex: getBlockOrder( state, first( ownProps.uids ) ), + blockType: getBlockType( getBlock( state, first( ownProps.uids ) ).name ), } ), ( dispatch, ownProps ) => ( { onMoveDown() { From bb865f642315e5ed51883644c5c8d642f907e300 Mon Sep 17 00:00:00 2001 From: Neil Anderson Date: Fri, 2 Jun 2017 18:45:02 +0100 Subject: [PATCH 005/103] Move getBlockType import into correct chunk --- editor/block-mover/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/block-mover/index.js b/editor/block-mover/index.js index 66fe2776669f4..74386d17322b1 100644 --- a/editor/block-mover/index.js +++ b/editor/block-mover/index.js @@ -8,6 +8,7 @@ import { first, last } from 'lodash'; * WordPress dependencies */ import { IconButton } from 'components'; +import { getBlockType } from 'blocks'; /** * Internal dependencies @@ -15,7 +16,6 @@ import { IconButton } from 'components'; import './style.scss'; import { isFirstBlock, isLastBlock, getBlockOrder, getBlock } from '../selectors'; import { blockMoverLabel } from './mover-label'; -import { getBlockType } from 'blocks'; function BlockMover( { onMoveUp, onMoveDown, isFirst, isLast, uids, blockType, firstIndex } ) { // We emulate a disabled state because forcefully applying the `disabled` From 1b47eca6486af509614cfb5a9f7bcb49a968760b Mon Sep 17 00:00:00 2001 From: Neil Anderson Date: Fri, 2 Jun 2017 18:45:23 +0100 Subject: [PATCH 006/103] Add documentation for blockMoverLabel, etc --- editor/block-mover/mover-label.js | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/editor/block-mover/mover-label.js b/editor/block-mover/mover-label.js index 7f0e05f7c4379..0ecee55c92046 100644 --- a/editor/block-mover/mover-label.js +++ b/editor/block-mover/mover-label.js @@ -1,5 +1,35 @@ +/** + * @typedef blockMoverLabelOptions + * @property {string} type Block type - in the case of a single block, should + * define its 'type'. I.e. 'Text', 'Heading', 'Image' etc. + * @property {number} firstIndex The index (position - 1) of the first block selected. + * @property {boolean} isFirst This is the first block. + * @property {boolean} isLast This is the last block. + * @property {number} dir Direction of movement (> 0 is considered to be going + * down, < 0 is up). + */ + +/** + * @typedef multiBlockMoverLabelOptions + * @property {number} firstIndex The index (position - 1) of the first block selected. + * @property {boolean} isFirst This is the first block. + * @property {boolean} isLast This is the last block. + * @property {number} dir Direction of movement (> 0 is considered to be going + * down, < 0 is up). + */ + +/** + * Wordpress dependencies + */ import { __, sprintf } from 'i18n'; +/** + * Return a label for the block movement controls depending on block position. + * + * @param {number} selectedCount Number of blocks selected. + * @param {blockMoverLabelOptions} options Object options. + * @return {string} Label for the block movement controls. + */ export function blockMoverLabel( selectedCount, { type, firstIndex, isFirst, isLast, dir } ) { const position = ( firstIndex + 1 ); @@ -44,6 +74,13 @@ export function blockMoverLabel( selectedCount, { type, firstIndex, isFirst, isL return ''; } +/** + * Return a label for the block movement controls depending on block position. + * + * @param {number} selectedCount Number of blocks selected. + * @param {multiBlockMoverLabelOptions} options Object options. + * @return {string} Label for the block movement controls. + */ export function multiBlockMoverLabel( selectedCount, { isFirst, isLast, firstIndex, dir } ) { const position = ( firstIndex + 1 ); From c5697b987642b57fb7bccd4ded820f6657cdaa8b Mon Sep 17 00:00:00 2001 From: Neil Anderson Date: Fri, 2 Jun 2017 18:50:24 +0100 Subject: [PATCH 007/103] =?UTF-8?q?Update=20multi/blockMoverLabel=20with?= =?UTF-8?q?=20=E2=80=98get=E2=80=99=20prefix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- editor/block-mover/index.js | 6 +++--- editor/block-mover/mover-label.js | 6 +++--- editor/block-mover/test/mover-label.js | 24 ++++++++++++------------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/editor/block-mover/index.js b/editor/block-mover/index.js index 74386d17322b1..a199032ba09ba 100644 --- a/editor/block-mover/index.js +++ b/editor/block-mover/index.js @@ -15,7 +15,7 @@ import { getBlockType } from 'blocks'; */ import './style.scss'; import { isFirstBlock, isLastBlock, getBlockOrder, getBlock } from '../selectors'; -import { blockMoverLabel } from './mover-label'; +import { getBlockMoverLabel } from './mover-label'; function BlockMover( { onMoveUp, onMoveDown, isFirst, isLast, uids, blockType, firstIndex } ) { // We emulate a disabled state because forcefully applying the `disabled` @@ -28,7 +28,7 @@ function BlockMover( { onMoveUp, onMoveDown, isFirst, isLast, uids, blockType, f className="editor-block-mover__control" onClick={ isFirst ? null : onMoveUp } icon="arrow-up-alt2" - label={ blockMoverLabel( uids.length, { + label={ getBlockMoverLabel( uids.length, { type: blockType && blockType.title, isFirst, isLast, @@ -41,7 +41,7 @@ function BlockMover( { onMoveUp, onMoveDown, isFirst, isLast, uids, blockType, f className="editor-block-mover__control" onClick={ isLast ? null : onMoveDown } icon="arrow-down-alt2" - label={ blockMoverLabel( uids.length, { + label={ getBlockMoverLabel( uids.length, { type: blockType && blockType.title, isFirst, isLast, diff --git a/editor/block-mover/mover-label.js b/editor/block-mover/mover-label.js index 0ecee55c92046..8ce648118649e 100644 --- a/editor/block-mover/mover-label.js +++ b/editor/block-mover/mover-label.js @@ -30,11 +30,11 @@ import { __, sprintf } from 'i18n'; * @param {blockMoverLabelOptions} options Object options. * @return {string} Label for the block movement controls. */ -export function blockMoverLabel( selectedCount, { type, firstIndex, isFirst, isLast, dir } ) { +export function getBlockMoverLabel( selectedCount, { type, firstIndex, isFirst, isLast, dir } ) { const position = ( firstIndex + 1 ); if ( selectedCount > 1 ) { - return multiBlockMoverLabel( selectedCount, { isFirst, isLast, firstIndex, dir } ); + return getMultiBlockMoverLabel( selectedCount, { isFirst, isLast, firstIndex, dir } ); } if ( isFirst && isLast ) { @@ -81,7 +81,7 @@ export function blockMoverLabel( selectedCount, { type, firstIndex, isFirst, isL * @param {multiBlockMoverLabelOptions} options Object options. * @return {string} Label for the block movement controls. */ -export function multiBlockMoverLabel( selectedCount, { isFirst, isLast, firstIndex, dir } ) { +export function getMultiBlockMoverLabel( selectedCount, { isFirst, isLast, firstIndex, dir } ) { const position = ( firstIndex + 1 ); if ( dir < 0 && isFirst ) { diff --git a/editor/block-mover/test/mover-label.js b/editor/block-mover/test/mover-label.js index 9a07e45f86a1c..67af43f6194bf 100644 --- a/editor/block-mover/test/mover-label.js +++ b/editor/block-mover/test/mover-label.js @@ -6,14 +6,14 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { blockMoverLabel, multiBlockMoverLabel } from '../mover-label'; +import { getBlockMoverLabel, getMultiBlockMoverLabel } from '../mover-label'; describe( 'block mover', () => { - describe( 'blockMoverLabel', () => { + describe( 'getBlockMoverLabel', () => { const type = 'TestType'; it( 'Should generate a title for the first item moving up', () => { - expect( blockMoverLabel( 1, { + expect( getBlockMoverLabel( 1, { type, firstPosition: 0, isFirst: true, @@ -25,7 +25,7 @@ describe( 'block mover', () => { } ); it( 'Should generate a title for the last item moving down', () => { - expect( blockMoverLabel( 1, { + expect( getBlockMoverLabel( 1, { type, firstPosition: 3, isFirst: false, @@ -37,7 +37,7 @@ describe( 'block mover', () => { } ); it( 'Should generate a title for the second item moving up', () => { - expect( blockMoverLabel( 1, { + expect( getBlockMoverLabel( 1, { type, firstPosition: 1, isFirst: false, @@ -49,7 +49,7 @@ describe( 'block mover', () => { } ); it( 'Should generate a title for the second item moving down', () => { - expect( blockMoverLabel( 1, { + expect( getBlockMoverLabel( 1, { type, firstPosition: 1, isFirst: false, @@ -61,7 +61,7 @@ describe( 'block mover', () => { } ); it( 'Should generate a title for the only item in the list', () => { - expect( blockMoverLabel( 1, { + expect( getBlockMoverLabel( 1, { type, firstPosition: 0, isFirst: true, @@ -73,9 +73,9 @@ describe( 'block mover', () => { } ); } ); - describe( 'multiBlockMoverLabel', () => { + describe( 'getMultiBlockMoverLabel', () => { it( 'Should generate a title moving multiple blocks up', () => { - expect( multiBlockMoverLabel( 4, { + expect( getMultiBlockMoverLabel( 4, { firstPosition: 1, isFirst: false, isLast: true, @@ -86,7 +86,7 @@ describe( 'block mover', () => { } ); it( 'Should generate a title moving multiple blocks down', () => { - expect( multiBlockMoverLabel( 4, { + expect( getMultiBlockMoverLabel( 4, { firstPosition: 0, isFirst: true, isLast: false, @@ -97,7 +97,7 @@ describe( 'block mover', () => { } ); it( 'Should generate a title for a selection of blocks at the top', () => { - expect( multiBlockMoverLabel( 4, { + expect( getMultiBlockMoverLabel( 4, { firstPosition: 1, isFirst: true, isLast: true, @@ -108,7 +108,7 @@ describe( 'block mover', () => { } ); it( 'Should generate a title for a selection of blocks at the bottom', () => { - expect( multiBlockMoverLabel( 4, { + expect( getMultiBlockMoverLabel( 4, { firstPosition: 2, isFirst: false, isLast: true, From 45ef29d89e0477ea3a50dfd7f68531b7950eed32 Mon Sep 17 00:00:00 2001 From: Neil Anderson Date: Fri, 2 Jun 2017 18:50:44 +0100 Subject: [PATCH 008/103] Fix test objects to use updated property --- editor/block-mover/test/mover-label.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/editor/block-mover/test/mover-label.js b/editor/block-mover/test/mover-label.js index 67af43f6194bf..09b16f3933e21 100644 --- a/editor/block-mover/test/mover-label.js +++ b/editor/block-mover/test/mover-label.js @@ -15,7 +15,7 @@ describe( 'block mover', () => { it( 'Should generate a title for the first item moving up', () => { expect( getBlockMoverLabel( 1, { type, - firstPosition: 0, + firstIndex: 0, isFirst: true, isLast: false, dir: -1, @@ -27,7 +27,7 @@ describe( 'block mover', () => { it( 'Should generate a title for the last item moving down', () => { expect( getBlockMoverLabel( 1, { type, - firstPosition: 3, + firstIndex: 3, isFirst: false, isLast: true, dir: 1, @@ -39,7 +39,7 @@ describe( 'block mover', () => { it( 'Should generate a title for the second item moving up', () => { expect( getBlockMoverLabel( 1, { type, - firstPosition: 1, + firstIndex: 1, isFirst: false, isLast: false, dir: -1, @@ -51,7 +51,7 @@ describe( 'block mover', () => { it( 'Should generate a title for the second item moving down', () => { expect( getBlockMoverLabel( 1, { type, - firstPosition: 1, + firstIndex: 1, isFirst: false, isLast: false, dir: 1, @@ -63,7 +63,7 @@ describe( 'block mover', () => { it( 'Should generate a title for the only item in the list', () => { expect( getBlockMoverLabel( 1, { type, - firstPosition: 0, + firstIndex: 0, isFirst: true, isLast: true, dir: 1, @@ -76,7 +76,7 @@ describe( 'block mover', () => { describe( 'getMultiBlockMoverLabel', () => { it( 'Should generate a title moving multiple blocks up', () => { expect( getMultiBlockMoverLabel( 4, { - firstPosition: 1, + firstIndex: 1, isFirst: false, isLast: true, dir: -1, @@ -87,7 +87,7 @@ describe( 'block mover', () => { it( 'Should generate a title moving multiple blocks down', () => { expect( getMultiBlockMoverLabel( 4, { - firstPosition: 0, + firstIndex: 0, isFirst: true, isLast: false, dir: 1, @@ -98,7 +98,7 @@ describe( 'block mover', () => { it( 'Should generate a title for a selection of blocks at the top', () => { expect( getMultiBlockMoverLabel( 4, { - firstPosition: 1, + firstIndex: 1, isFirst: true, isLast: true, dir: -1, @@ -109,7 +109,7 @@ describe( 'block mover', () => { it( 'Should generate a title for a selection of blocks at the bottom', () => { expect( getMultiBlockMoverLabel( 4, { - firstPosition: 2, + firstIndex: 2, isFirst: false, isLast: true, dir: 1, From 19522396f2da7dabc1ed9df7b86517a432b9d3ab Mon Sep 17 00:00:00 2001 From: Joen Asmussen Date: Sat, 3 Jun 2017 12:26:10 +0200 Subject: [PATCH 009/103] Update Dashicons. This removes the title element from the sprite. This should finally fix #528. --- components/dashicon/index.js | 245 +---------------------------------- 1 file changed, 1 insertion(+), 244 deletions(-) diff --git a/components/dashicon/index.js b/components/dashicon/index.js index e000904169baa..4b441ec9a487a 100644 --- a/components/dashicon/index.js +++ b/components/dashicon/index.js @@ -18,975 +18,733 @@ export default class Dashicon extends wp.element.Component { render() { const { icon, className } = this.props; - let path, title; + let path; switch ( icon ) { case 'admin-appearance': - title = 'Admin Appearance'; path = 'M14.48 11.06L7.41 3.99l1.5-1.5c.5-.56 2.3-.47 3.51.32 1.21.8 1.43 1.28 2.91 2.1 1.18.64 2.45 1.26 4.45.85zm-.71.71L6.7 4.7 4.93 6.47c-.39.39-.39 1.02 0 1.41l1.06 1.06c.39.39.39 1.03 0 1.42-.6.6-1.43 1.11-2.21 1.69-.35.26-.7.53-1.01.84C1.43 14.23.4 16.08 1.4 17.07c.99 1 2.84-.03 4.18-1.36.31-.31.58-.66.85-1.02.57-.78 1.08-1.61 1.69-2.21.39-.39 1.02-.39 1.41 0l1.06 1.06c.39.39 1.02.39 1.41 0z'; break; case 'admin-collapse': - title = 'Admin Collapse'; path = 'M10 2.16c4.33 0 7.84 3.51 7.84 7.84s-3.51 7.84-7.84 7.84S2.16 14.33 2.16 10 5.71 2.16 10 2.16zm2 11.72V6.12L6.18 9.97z'; break; case 'admin-comments': - title = 'Admin Comments'; path = 'M5 2h9c1.1 0 2 .9 2 2v7c0 1.1-.9 2-2 2h-2l-5 5v-5H5c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2z'; break; case 'admin-customizer': - title = 'Admin Customizer'; path = 'M18.33 3.57s.27-.8-.31-1.36c-.53-.52-1.22-.24-1.22-.24-.61.3-5.76 3.47-7.67 5.57-.86.96-2.06 3.79-1.09 4.82.92.98 3.96-.17 4.79-1 2.06-2.06 5.21-7.17 5.5-7.79zM1.4 17.65c2.37-1.56 1.46-3.41 3.23-4.64.93-.65 2.22-.62 3.08.29.63.67.8 2.57-.16 3.46-1.57 1.45-4 1.55-6.15.89z'; break; case 'admin-generic': - title = 'Admin Generic'; path = 'M18 12h-2.18c-.17.7-.44 1.35-.81 1.93l1.54 1.54-2.1 2.1-1.54-1.54c-.58.36-1.23.63-1.91.79V19H8v-2.18c-.68-.16-1.33-.43-1.91-.79l-1.54 1.54-2.12-2.12 1.54-1.54c-.36-.58-.63-1.23-.79-1.91H1V9.03h2.17c.16-.7.44-1.35.8-1.94L2.43 5.55l2.1-2.1 1.54 1.54c.58-.37 1.24-.64 1.93-.81V2h3v2.18c.68.16 1.33.43 1.91.79l1.54-1.54 2.12 2.12-1.54 1.54c.36.59.64 1.24.8 1.94H18V12zm-8.5 1.5c1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3 1.34 3 3 3z'; break; case 'admin-home': - title = 'Admin Home'; path = 'M16 8.5l1.53 1.53-1.06 1.06L10 4.62l-6.47 6.47-1.06-1.06L10 2.5l4 4v-2h2v4zm-6-2.46l6 5.99V18H4v-5.97zM12 17v-5H8v5h4z'; break; case 'admin-links': - title = 'Admin Links'; path = 'M17.74 2.76c1.68 1.69 1.68 4.41 0 6.1l-1.53 1.52c-1.12 1.12-2.7 1.47-4.14 1.09l2.62-2.61.76-.77.76-.76c.84-.84.84-2.2 0-3.04-.84-.85-2.2-.85-3.04 0l-.77.76-3.38 3.38c-.37-1.44-.02-3.02 1.1-4.14l1.52-1.53c1.69-1.68 4.42-1.68 6.1 0zM8.59 13.43l5.34-5.34c.42-.42.42-1.1 0-1.52-.44-.43-1.13-.39-1.53 0l-5.33 5.34c-.42.42-.42 1.1 0 1.52.44.43 1.13.39 1.52 0zm-.76 2.29l4.14-4.15c.38 1.44.03 3.02-1.09 4.14l-1.52 1.53c-1.69 1.68-4.41 1.68-6.1 0-1.68-1.68-1.68-4.42 0-6.1l1.53-1.52c1.12-1.12 2.7-1.47 4.14-1.1l-4.14 4.15c-.85.84-.85 2.2 0 3.05.84.84 2.2.84 3.04 0z'; break; case 'admin-media': - title = 'Admin Media'; path = 'M13 11V4c0-.55-.45-1-1-1h-1.67L9 1H5L3.67 3H2c-.55 0-1 .45-1 1v7c0 .55.45 1 1 1h10c.55 0 1-.45 1-1zM7 4.5c1.38 0 2.5 1.12 2.5 2.5S8.38 9.5 7 9.5 4.5 8.38 4.5 7 5.62 4.5 7 4.5zM14 6h5v10.5c0 1.38-1.12 2.5-2.5 2.5S14 17.88 14 16.5s1.12-2.5 2.5-2.5c.17 0 .34.02.5.05V9h-3V6zm-4 8.05V13h2v3.5c0 1.38-1.12 2.5-2.5 2.5S7 17.88 7 16.5 8.12 14 9.5 14c.17 0 .34.02.5.05z'; break; case 'admin-multisite': - title = 'Admin Multisite'; path = 'M14.27 6.87L10 3.14 5.73 6.87 5 6.14l5-4.38 5 4.38zM14 8.42l-4.05 3.43L6 8.38v-.74l4-3.5 4 3.5v.78zM11 9.7V8H9v1.7h2zm-1.73 4.03L5 10 .73 13.73 0 13l5-4.38L10 13zm10 0L15 10l-4.27 3.73L10 13l5-4.38L20 13zM5 11l4 3.5V18H1v-3.5zm10 0l4 3.5V18h-8v-3.5zm-9 6v-2H4v2h2zm10 0v-2h-2v2h2z'; break; case 'admin-network': - title = 'Admin Network'; path = 'M16.95 2.58c1.96 1.95 1.96 5.12 0 7.07-1.51 1.51-3.75 1.84-5.59 1.01l-1.87 3.31-2.99.31L5 18H2l-1-2 7.95-7.69c-.92-1.87-.62-4.18.93-5.73 1.95-1.96 5.12-1.96 7.07 0zm-2.51 3.79c.74 0 1.33-.6 1.33-1.34 0-.73-.59-1.33-1.33-1.33-.73 0-1.33.6-1.33 1.33 0 .74.6 1.34 1.33 1.34z'; break; case 'admin-page': - title = 'Admin Page'; path = 'M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z'; break; case 'admin-plugins': - title = 'Admin Plugins'; path = 'M13.11 4.36L9.87 7.6 8 5.73l3.24-3.24c.35-.34 1.05-.2 1.56.32.52.51.66 1.21.31 1.55zm-8 1.77l.91-1.12 9.01 9.01-1.19.84c-.71.71-2.63 1.16-3.82 1.16H6.14L4.9 17.26c-.59.59-1.54.59-2.12 0-.59-.58-.59-1.53 0-2.12l1.24-1.24v-3.88c0-1.13.4-3.19 1.09-3.89zm7.26 3.97l3.24-3.24c.34-.35 1.04-.21 1.55.31.52.51.66 1.21.31 1.55l-3.24 3.25z'; break; case 'admin-post': - title = 'Admin Post'; path = 'M10.44 3.02l1.82-1.82 6.36 6.35-1.83 1.82c-1.05-.68-2.48-.57-3.41.36l-.75.75c-.92.93-1.04 2.35-.35 3.41l-1.83 1.82-2.41-2.41-2.8 2.79c-.42.42-3.38 2.71-3.8 2.29s1.86-3.39 2.28-3.81l2.79-2.79L4.1 9.36l1.83-1.82c1.05.69 2.48.57 3.4-.36l.75-.75c.93-.92 1.05-2.35.36-3.41z'; break; case 'admin-settings': - title = 'Admin Settings'; path = 'M18 16V4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h13c.55 0 1-.45 1-1zM8 11h1c.55 0 1 .45 1 1s-.45 1-1 1H8v1.5c0 .28-.22.5-.5.5s-.5-.22-.5-.5V13H6c-.55 0-1-.45-1-1s.45-1 1-1h1V5.5c0-.28.22-.5.5-.5s.5.22.5.5V11zm5-2h-1c-.55 0-1-.45-1-1s.45-1 1-1h1V5.5c0-.28.22-.5.5-.5s.5.22.5.5V7h1c.55 0 1 .45 1 1s-.45 1-1 1h-1v5.5c0 .28-.22.5-.5.5s-.5-.22-.5-.5V9z'; break; case 'admin-site': - title = 'Admin Site'; path = 'M19 10c0-4.97-4.03-9-9-9s-9 4.03-9 9 4.03 9 9 9 9-4.03 9-9zm-11 .1c-2.84-.29-4.48-1.17-5.48-2.29.97-3.16 3.8-5.48 7.25-5.63-.84 1.38-1.5 4.13-.03 5.57-1.51.21-2.21-1.86-3.11-1.15-1.43 1.12-.08 2.67 3.2 3.27 3.29.59 3.66 1.58 3.63 3.08-.03 1.47-.8 3.3-4.06 4.7.09-4.18-2.64-3.84-3.2-5.04.2-.87.44-1.78 1.8-2.51zm8.49-4.32c2.15 3.3 1.02 6.08.84 6.68-.77-1.86-2.17-2.29-2.53-3.54-.32-1.11.62-2.23 1.69-3.14z'; break; case 'admin-tools': - title = 'Admin Tools'; path = 'M16.68 9.77c-1.34 1.34-3.3 1.67-4.95.99l-5.41 6.52c-.99.99-2.59.99-3.58 0s-.99-2.59 0-3.57l6.52-5.42c-.68-1.65-.35-3.61.99-4.95 1.28-1.28 3.12-1.62 4.72-1.06l-2.89 2.89 2.82 2.82 2.86-2.87c.53 1.58.18 3.39-1.08 4.65zM3.81 16.21c.4.39 1.04.39 1.43 0 .4-.4.4-1.04 0-1.43-.39-.4-1.03-.4-1.43 0-.39.39-.39 1.03 0 1.43z'; break; case 'admin-users': - title = 'Admin Users'; path = 'M10 9.25c-2.27 0-2.73-3.44-2.73-3.44C7 4.02 7.82 2 9.97 2c2.16 0 2.98 2.02 2.71 3.81 0 0-.41 3.44-2.68 3.44zm0 2.57L12.72 10c2.39 0 4.52 2.33 4.52 4.53v2.49s-3.65 1.13-7.24 1.13c-3.65 0-7.24-1.13-7.24-1.13v-2.49c0-2.25 1.94-4.48 4.47-4.48z'; break; case 'album': - title = 'Album'; path = 'M0 18h10v-.26c1.52.4 3.17.35 4.76-.24 4.14-1.52 6.27-6.12 4.75-10.26-1.43-3.89-5.58-6-9.51-4.98V2H0v16zM9 3v14H1V3h8zm5.45 8.22c-.68 1.35-2.32 1.9-3.67 1.23-.31-.15-.57-.35-.78-.59V8.13c.8-.86 2.11-1.13 3.22-.58 1.35.68 1.9 2.32 1.23 3.67zm-2.75-.82c.22.16.53.12.7-.1.16-.22.12-.53-.1-.7s-.53-.12-.7.1c-.16.21-.12.53.1.7zm3.01 3.67c-1.17.78-2.56.99-3.83.69-.27-.06-.44-.34-.37-.61s.34-.43.62-.36l.17.04c.96.17 1.98-.01 2.86-.59.47-.32.86-.72 1.14-1.18.15-.23.45-.3.69-.16.23.15.3.46.16.69-.36.57-.84 1.08-1.44 1.48zm1.05 1.57c-1.48.99-3.21 1.32-4.84 1.06-.28-.05-.47-.32-.41-.6.05-.27.32-.45.61-.39l.22.04c1.31.15 2.68-.14 3.87-.94.71-.47 1.27-1.07 1.7-1.74.14-.24.45-.31.68-.16.24.14.31.45.16.69-.49.79-1.16 1.49-1.99 2.04z'; break; case 'align-center': - title = 'Align Center'; path = 'M3 5h14V3H3v2zm12 8V7H5v6h10zM3 17h14v-2H3v2z'; break; case 'align-full-width': - title = 'Align Full Width'; path = 'M17 13V3H3v10h14zM5 17h10v-2H5v2z'; break; case 'align-left': - title = 'Align Left'; path = 'M3 5h14V3H3v2zm9 8V7H3v6h9zm2-4h3V7h-3v2zm0 4h3v-2h-3v2zM3 17h14v-2H3v2z'; break; case 'align-none': - title = 'Align None'; path = 'M3 5h14V3H3v2zm10 8V7H3v6h10zM3 17h14v-2H3v2z'; break; case 'align-right': - title = 'Align Right'; path = 'M3 5h14V3H3v2zm0 4h3V7H3v2zm14 4V7H8v6h9zM3 13h3v-2H3v2zm0 4h14v-2H3v2z'; break; case 'align-wide': - title = 'Align Wide'; path = 'M5 5h10V3H5v2zm12 8V7H3v6h14zM5 17h10v-2H5v2z'; break; case 'analytics': - title = 'Analytics'; path = 'M18 18V2H2v16h16zM16 5H4V4h12v1zM7 7v3h3c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3zm1 2V7c1.1 0 2 .9 2 2H8zm8-1h-4V7h4v1zm0 3h-4V9h4v2zm0 2h-4v-1h4v1zm0 3H4v-1h12v1z'; break; case 'archive': - title = 'Archive'; path = 'M19 4v2H1V4h18zM2 7h16v10H2V7zm11 3V9H7v1h6z'; break; case 'arrow-down-alt': - title = 'Arrow Down Alt'; path = 'M9 2h2v12l4-4 2 1-7 7-7-7 2-1 4 4V2z'; break; case 'arrow-down-alt2': - title = 'Arrow Down Alt2'; path = 'M5 6l5 5 5-5 2 1-7 7-7-7z'; break; case 'arrow-down': - title = 'Arrow Down'; path = 'M15 8l-4.03 6L7 8h8z'; break; case 'arrow-left-alt': - title = 'Arrow Left Alt'; path = 'M18 9v2H6l4 4-1 2-7-7 7-7 1 2-4 4h12z'; break; case 'arrow-left-alt2': - title = 'Arrow Left Alt2'; path = 'M14 5l-5 5 5 5-1 2-7-7 7-7z'; break; case 'arrow-left': - title = 'Arrow Left'; path = 'M13 14L7 9.97 13 6v8z'; break; case 'arrow-right-alt': - title = 'Arrow Right Alt'; path = 'M2 11V9h12l-4-4 1-2 7 7-7 7-1-2 4-4H2z'; break; case 'arrow-right-alt2': - title = 'Arrow Right Alt2'; path = 'M6 15l5-5-5-5 1-2 7 7-7 7z'; break; case 'arrow-right': - title = 'Arrow Right'; path = 'M8 6l6 4.03L8 14V6z'; break; case 'arrow-up-alt': - title = 'Arrow Up Alt'; path = 'M11 18H9V6l-4 4-2-1 7-7 7 7-2 1-4-4v12z'; break; case 'arrow-up-alt2': - title = 'Arrow Up Alt2'; path = 'M15 14l-5-5-5 5-2-1 7-7 7 7z'; break; case 'arrow-up': - title = 'Arrow Up'; path = 'M7 13l4.03-6L15 13H7z'; break; case 'art': - title = 'Art'; path = 'M8.55 3.06c1.01.34-1.95 2.01-.1 3.13 1.04.63 3.31-2.22 4.45-2.86.97-.54 2.67-.65 3.53 1.23 1.09 2.38.14 8.57-3.79 11.06-3.97 2.5-8.97 1.23-10.7-2.66-2.01-4.53 3.12-11.09 6.61-9.9zm1.21 6.45c.73 1.64 4.7-.5 3.79-2.8-.59-1.49-4.48 1.25-3.79 2.8z'; break; case 'awards': - title = 'Awards'; path = 'M4.46 5.16L5 7.46l-.54 2.29 2.01 1.24L7.7 13l2.3-.54 2.3.54 1.23-2.01 2.01-1.24L15 7.46l.54-2.3-2-1.24-1.24-2.01-2.3.55-2.29-.54-1.25 2zm5.55 6.34C7.79 11.5 6 9.71 6 7.49c0-2.2 1.79-3.99 4.01-3.99 2.2 0 3.99 1.79 3.99 3.99 0 2.22-1.79 4.01-3.99 4.01zm-.02-1C8.33 10.5 7 9.16 7 7.5c0-1.65 1.33-3 2.99-3S13 5.85 13 7.5c0 1.66-1.35 3-3.01 3zm3.84 1.1l-1.28 2.24-2.08-.47L13 19.2l1.4-2.2h2.5zm-7.7.07l1.25 2.25 2.13-.51L7 19.2 5.6 17H3.1z'; break; case 'backup': - title = 'Backup'; path = 'M13.65 2.88c3.93 2.01 5.48 6.84 3.47 10.77s-6.83 5.48-10.77 3.47c-1.87-.96-3.2-2.56-3.86-4.4l1.64-1.03c.45 1.57 1.52 2.95 3.08 3.76 3.01 1.54 6.69.35 8.23-2.66 1.55-3.01.36-6.69-2.65-8.24C9.78 3.01 6.1 4.2 4.56 7.21l1.88.97-4.95 3.08-.39-5.82 1.78.91C4.9 2.4 9.75.89 13.65 2.88zm-4.36 7.83C9.11 10.53 9 10.28 9 10c0-.07.03-.12.04-.19h-.01L10 5l.97 4.81L14 13l-4.5-2.12.02-.02c-.08-.04-.16-.09-.23-.15z'; break; case 'book-alt': - title = 'Book Alt'; path = 'M5 17h13v2H5c-1.66 0-3-1.34-3-3V4c0-1.66 1.34-3 3-3h13v14H5c-.55 0-1 .45-1 1s.45 1 1 1zm2-3.5v-11c0-.28-.22-.5-.5-.5s-.5.22-.5.5v11c0 .28.22.5.5.5s.5-.22.5-.5z'; break; case 'book': - title = 'Book'; path = 'M16 3h2v16H5c-1.66 0-3-1.34-3-3V4c0-1.66 1.34-3 3-3h9v14H5c-.55 0-1 .45-1 1s.45 1 1 1h11V3z'; break; case 'building': - title = 'Building'; path = 'M3 20h14V0H3v20zM7 3H5V1h2v2zm4 0H9V1h2v2zm4 0h-2V1h2v2zM7 6H5V4h2v2zm4 0H9V4h2v2zm4 0h-2V4h2v2zM7 9H5V7h2v2zm4 0H9V7h2v2zm4 0h-2V7h2v2zm-8 3H5v-2h2v2zm4 0H9v-2h2v2zm4 0h-2v-2h2v2zm-4 7H5v-6h6v6zm4-4h-2v-2h2v2zm0 3h-2v-2h2v2z'; break; case 'businessman': - title = 'Businessman'; path = 'M7.3 6l-.03-.19c-.04-.37-.05-.73-.03-1.08.02-.36.1-.71.25-1.04.14-.32.31-.61.52-.86s.49-.46.83-.6c.34-.15.72-.23 1.13-.23.69 0 1.26.2 1.71.59s.76.87.91 1.44.18 1.16.09 1.78l-.03.19c-.01.09-.05.25-.11.48-.05.24-.12.47-.2.69-.08.21-.19.45-.34.72-.14.27-.3.49-.47.69-.18.19-.4.34-.67.48-.27.13-.55.19-.86.19s-.59-.06-.87-.19c-.26-.13-.49-.29-.67-.5-.18-.2-.34-.42-.49-.66-.15-.25-.26-.49-.34-.73-.09-.25-.16-.47-.21-.67-.06-.21-.1-.37-.12-.5zm9.2 6.24c.41.7.5 1.41.5 2.14v2.49c0 .03-.12.08-.29.13-.18.04-.42.13-.97.27-.55.12-1.1.24-1.65.34s-1.19.19-1.95.27c-.75.08-1.46.12-2.13.12-.68 0-1.39-.04-2.14-.12-.75-.07-1.4-.17-1.98-.27-.58-.11-1.08-.23-1.56-.34-.49-.11-.8-.21-1.06-.29L3 16.87v-2.49c0-.75.07-1.46.46-2.15s.81-1.25 1.5-1.68C5.66 10.12 7.19 10 8 10l1.67 1.67L9 13v3l1.02 1.08L11 16v-3l-.68-1.33L11.97 10c.77 0 2.2.07 2.9.52.71.45 1.21 1.02 1.63 1.72z'; break; case 'button': - title = 'Button'; path = 'M17 5H3c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm1 7c0 .6-.4 1-1 1H3c-.6 0-1-.4-1-1V7c0-.6.4-1 1-1h14c.6 0 1 .4 1 1v5z'; break; case 'calendar-alt': - title = 'Calendar Alt'; path = 'M15 4h3v15H2V4h3V3c0-.41.15-.76.44-1.06.29-.29.65-.44 1.06-.44s.77.15 1.06.44c.29.3.44.65.44 1.06v1h4V3c0-.41.15-.76.44-1.06.29-.29.65-.44 1.06-.44s.77.15 1.06.44c.29.3.44.65.44 1.06v1zM6 3v2.5c0 .14.05.26.15.36.09.09.21.14.35.14s.26-.05.35-.14c.1-.1.15-.22.15-.36V3c0-.14-.05-.26-.15-.35-.09-.1-.21-.15-.35-.15s-.26.05-.35.15c-.1.09-.15.21-.15.35zm7 0v2.5c0 .14.05.26.14.36.1.09.22.14.36.14s.26-.05.36-.14c.09-.1.14-.22.14-.36V3c0-.14-.05-.26-.14-.35-.1-.1-.22-.15-.36-.15s-.26.05-.36.15c-.09.09-.14.21-.14.35zm4 15V8H3v10h14zM7 9v2H5V9h2zm2 0h2v2H9V9zm4 2V9h2v2h-2zm-6 1v2H5v-2h2zm2 0h2v2H9v-2zm4 2v-2h2v2h-2zm-6 1v2H5v-2h2zm4 2H9v-2h2v2zm4 0h-2v-2h2v2z'; break; case 'calendar': - title = 'Calendar'; path = 'M15 4h3v14H2V4h3V3c0-.83.67-1.5 1.5-1.5S8 2.17 8 3v1h4V3c0-.83.67-1.5 1.5-1.5S15 2.17 15 3v1zM6 3v2.5c0 .28.22.5.5.5s.5-.22.5-.5V3c0-.28-.22-.5-.5-.5S6 2.72 6 3zm7 0v2.5c0 .28.22.5.5.5s.5-.22.5-.5V3c0-.28-.22-.5-.5-.5s-.5.22-.5.5zm4 14V8H3v9h14zM7 16V9H5v7h2zm4 0V9H9v7h2zm4 0V9h-2v7h2z'; break; case 'camera': - title = 'Camera'; path = 'M6 5V3H3v2h3zm12 10V4H9L7 6H2v9h16zm-7-8c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3z'; break; case 'carrot': - title = 'Carrot'; path = 'M2 18.43c1.51 1.36 11.64-4.67 13.14-7.21.72-1.22-.13-3.01-1.52-4.44C15.2 5.73 16.59 9 17.91 8.31c.6-.32.99-1.31.7-1.92-.52-1.08-2.25-1.08-3.42-1.21.83-.2 2.82-1.05 2.86-2.25.04-.92-1.13-1.97-2.05-1.86-1.21.14-1.65 1.88-2.06 3-.05-.71-.2-2.27-.98-2.95-1.04-.91-2.29-.05-2.32 1.05-.04 1.33 2.82 2.07 1.92 3.67C11.04 4.67 9.25 4.03 8.1 4.7c-.49.31-1.05.91-1.63 1.69.89.94 2.12 2.07 3.09 2.72.2.14.26.42.11.62-.14.21-.42.26-.62.12-.99-.67-2.2-1.78-3.1-2.71-.45.67-.91 1.43-1.34 2.23.85.86 1.93 1.83 2.79 2.41.2.14.25.42.11.62-.14.21-.42.26-.63.12-.85-.58-1.86-1.48-2.71-2.32C2.4 13.69 1.1 17.63 2 18.43z'; break; case 'cart': - title = 'Cart'; path = 'M6 13h9c.55 0 1 .45 1 1s-.45 1-1 1H5c-.55 0-1-.45-1-1V4H2c-.55 0-1-.45-1-1s.45-1 1-1h3c.55 0 1 .45 1 1v2h13l-4 7H6v1zm-.5 3c.83 0 1.5.67 1.5 1.5S6.33 19 5.5 19 4 18.33 4 17.5 4.67 16 5.5 16zm9 0c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5z'; break; case 'category': - title = 'Category'; path = 'M5 7h13v10H2V4h7l2 2H4v9h1V7z'; break; case 'chart-area': - title = 'Chart Area'; path = 'M18 18l.01-12.28c.59-.35.99-.99.99-1.72 0-1.1-.9-2-2-2s-2 .9-2 2c0 .8.47 1.48 1.14 1.8l-4.13 6.58c-.33-.24-.73-.38-1.16-.38-.84 0-1.55.51-1.85 1.24l-2.14-1.53c.09-.22.14-.46.14-.71 0-1.11-.89-2-2-2-1.1 0-2 .89-2 2 0 .73.4 1.36.98 1.71L1 18h17zM17 3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM5 10c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm5.85 3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1z'; break; case 'chart-bar': - title = 'Chart Bar'; path = 'M18 18V2h-4v16h4zm-6 0V7H8v11h4zm-6 0v-8H2v8h4z'; break; case 'chart-line': - title = 'Chart Line'; path = 'M18 3.5c0 .62-.38 1.16-.92 1.38v13.11H1.99l4.22-6.73c-.13-.23-.21-.48-.21-.76C6 9.67 6.67 9 7.5 9S9 9.67 9 10.5c0 .13-.02.25-.05.37l1.44.63c.27-.3.67-.5 1.11-.5.18 0 .35.04.51.09l3.58-6.41c-.36-.27-.59-.7-.59-1.18 0-.83.67-1.5 1.5-1.5.19 0 .36.04.53.1l.05-.09v.11c.54.22.92.76.92 1.38zm-1.92 13.49V5.85l-3.29 5.89c.13.23.21.48.21.76 0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5l.01-.07-1.63-.72c-.25.18-.55.29-.88.29-.18 0-.35-.04-.51-.1l-3.2 5.09h12.29z'; break; case 'chart-pie': - title = 'Chart Pie'; path = 'M10 10V3c3.87 0 7 3.13 7 7h-7zM9 4v7h7c0 3.87-3.13 7-7 7s-7-3.13-7-7 3.13-7 7-7z'; break; case 'clipboard': - title = 'Clipboard'; path = 'M11.9.39l1.4 1.4c1.61.19 3.5-.74 4.61.37s.18 3 .37 4.61l1.4 1.4c.39.39.39 1.02 0 1.41l-9.19 9.2c-.4.39-1.03.39-1.42 0L1.29 11c-.39-.39-.39-1.02 0-1.42l9.2-9.19c.39-.39 1.02-.39 1.41 0zm.58 2.25l-.58.58 4.95 4.95.58-.58c-.19-.6-.2-1.22-.15-1.82.02-.31.05-.62.09-.92.12-1 .18-1.63-.17-1.98s-.98-.29-1.98-.17c-.3.04-.61.07-.92.09-.6.05-1.22.04-1.82-.15zm4.02.93c.39.39.39 1.03 0 1.42s-1.03.39-1.42 0-.39-1.03 0-1.42 1.03-.39 1.42 0zm-6.72.36l-.71.7L15.44 11l.7-.71zM8.36 5.34l-.7.71 6.36 6.36.71-.7zM6.95 6.76l-.71.7 6.37 6.37.7-.71zM5.54 8.17l-.71.71 6.36 6.36.71-.71zM4.12 9.58l-.71.71 6.37 6.37.71-.71z'; break; case 'clock': - title = 'Clock'; path = 'M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm0 14c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6zm-.71-5.29c.07.05.14.1.23.15l-.02.02L14 13l-3.03-3.19L10 5l-.97 4.81h.01c0 .02-.01.05-.02.09S9 9.97 9 10c0 .28.1.52.29.71z'; break; case 'cloud': - title = 'Cloud'; path = 'M14.85 10.03c1.76.18 3.15 1.66 3.15 3.47 0 1.93-1.57 3.5-3.5 3.5h-10C2.57 17 1 15.43 1 13.5c0-1.79 1.34-3.24 3.06-3.46C4.02 9.87 4 9.69 4 9.5 4 8.12 5.12 7 6.5 7c.34 0 .66.07.95.19C8.11 5.89 9.45 5 11 5c2.21 0 4 1.79 4 4 0 .36-.06.7-.15 1.03z'; break; case 'controls-back': - title = 'Controls Back'; path = 'M2 10l10-6v3.6L18 4v12l-6-3.6V16z'; break; case 'controls-forward': - title = 'Controls Forward'; path = 'M18 10L8 16v-3.6L2 16V4l6 3.6V4z'; break; case 'controls-pause': - title = 'Controls Pause'; path = 'M5 16V4h3v12H5zm7-12h3v12h-3V4z'; break; case 'controls-play': - title = 'Controls Play'; path = 'M5 4l10 6-10 6V4z'; break; case 'controls-repeat': - title = 'Controls Repeat'; path = 'M5 7v3l-2 1.5V5h11V3l4 3.01L14 9V7H5zm10 6v-3l2-1.5V15H6v2l-4-3.01L6 11v2h9z'; break; case 'controls-skipback': - title = 'Controls Skipback'; path = 'M11.98 7.63l6-3.6v12l-6-3.6v3.6l-8-4.8v4.8h-2v-12h2v4.8l8-4.8v3.6z'; break; case 'controls-skipforward': - title = 'Controls Skipforward'; path = 'M8 12.4L2 16V4l6 3.6V4l8 4.8V4h2v12h-2v-4.8L8 16v-3.6z'; break; case 'controls-volumeoff': - title = 'Controls Volumeoff'; path = 'M2 7h4l5-4v14l-5-4H2V7z'; break; case 'controls-volumeon': - title = 'Controls Volumeon'; path = 'M2 7h4l5-4v14l-5-4H2V7zm12.69-2.46C14.82 4.59 18 5.92 18 10s-3.18 5.41-3.31 5.46c-.06.03-.13.04-.19.04-.2 0-.39-.12-.46-.31-.11-.26.02-.55.27-.65.11-.05 2.69-1.15 2.69-4.54 0-3.41-2.66-4.53-2.69-4.54-.25-.1-.38-.39-.27-.65.1-.25.39-.38.65-.27zM16 10c0 2.57-2.23 3.43-2.32 3.47-.06.02-.12.03-.18.03-.2 0-.39-.12-.47-.32-.1-.26.04-.55.29-.65.07-.02 1.68-.67 1.68-2.53s-1.61-2.51-1.68-2.53c-.25-.1-.38-.39-.29-.65.1-.25.39-.39.65-.29.09.04 2.32.9 2.32 3.47z'; break; case 'dashboard': - title = 'Dashboard'; path = 'M3.76 16h12.48c1.1-1.37 1.76-3.11 1.76-5 0-4.42-3.58-8-8-8s-8 3.58-8 8c0 1.89.66 3.63 1.76 5zM10 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM6 6c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm8 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm-5.37 5.55L12 7v6c0 1.1-.9 2-2 2s-2-.9-2-2c0-.57.24-1.08.63-1.45zM4 10c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm12 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm-5 3c0-.55-.45-1-1-1s-1 .45-1 1 .45 1 1 1 1-.45 1-1z'; break; case 'desktop': - title = 'Desktop'; path = 'M3 2h14c.55 0 1 .45 1 1v10c0 .55-.45 1-1 1h-5v2h2c.55 0 1 .45 1 1v1H5v-1c0-.55.45-1 1-1h2v-2H3c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm13 9V4H4v7h12zM5 5h9L5 9V5z'; break; case 'dismiss': - title = 'Dismiss'; path = 'M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm5 11l-3-3 3-3-2-2-3 3-3-3-2 2 3 3-3 3 2 2 3-3 3 3z'; break; case 'download': - title = 'Download'; path = 'M14.01 4v6h2V2H4v8h2.01V4h8zm-2 2v6h3l-5 6-5-6h3V6h4z'; break; case 'edit': - title = 'Edit'; path = 'M13.89 3.39l2.71 2.72c.46.46.42 1.24.03 1.64l-8.01 8.02-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.03c.39-.39 1.22-.39 1.68.07zm-2.73 2.79l-5.59 5.61 1.11 1.11 5.54-5.65zm-2.97 8.23l5.58-5.6-1.07-1.08-5.59 5.6z'; break; case 'editor-aligncenter': - title = 'Editor Aligncenter'; path = 'M14 5V3H6v2h8zm3 4V7H3v2h14zm-3 4v-2H6v2h8zm3 4v-2H3v2h14z'; break; case 'editor-alignleft': - title = 'Editor Alignleft'; path = 'M12 5V3H3v2h9zm5 4V7H3v2h14zm-5 4v-2H3v2h9zm5 4v-2H3v2h14z'; break; case 'editor-alignright': - title = 'Editor Alignright'; path = 'M17 5V3H8v2h9zm0 4V7H3v2h14zm0 4v-2H8v2h9zm0 4v-2H3v2h14z'; break; case 'editor-bold': - title = 'Editor Bold'; path = 'M6 4v13h4.54c1.37 0 2.46-.33 3.26-1 .8-.66 1.2-1.58 1.2-2.77 0-.84-.17-1.51-.51-2.01s-.9-.85-1.67-1.03v-.09c.57-.1 1.02-.4 1.36-.9s.51-1.13.51-1.91c0-1.14-.39-1.98-1.17-2.5C12.75 4.26 11.5 4 9.78 4H6zm2.57 5.15V6.26h1.36c.73 0 1.27.11 1.61.32.34.22.51.58.51 1.07 0 .54-.16.92-.47 1.15s-.82.35-1.51.35h-1.5zm0 2.19h1.6c1.44 0 2.16.53 2.16 1.61 0 .6-.17 1.05-.51 1.34s-.86.43-1.57.43H8.57v-3.38z'; break; case 'editor-break': - title = 'Editor Break'; path = 'M16 4h2v9H7v3l-5-4 5-4v3h9V4z'; break; case 'editor-code': - title = 'Editor Code'; path = 'M9 6l-4 4 4 4-1 2-6-6 6-6zm2 8l4-4-4-4 1-2 6 6-6 6z'; break; case 'editor-contract': - title = 'Editor Contract'; path = 'M15.75 6.75L18 3v14l-2.25-3.75L17 12h-4v4l1.25-1.25L18 17H2l3.75-2.25L7 16v-4H3l1.25 1.25L2 17V3l2.25 3.75L3 8h4V4L5.75 5.25 2 3h16l-3.75 2.25L13 4v4h4z'; break; case 'editor-customchar': - title = 'Editor Customchar'; path = 'M10 5.4c1.27 0 2.24.36 2.91 1.08.66.71 1 1.76 1 3.13 0 1.28-.23 2.37-.69 3.27-.47.89-1.27 1.52-2.22 2.12v2h6v-2h-3.69c.92-.64 1.62-1.34 2.12-2.34.49-1.01.74-2.13.74-3.35 0-1.78-.55-3.19-1.65-4.22S11.92 3.54 10 3.54s-3.43.53-4.52 1.57c-1.1 1.04-1.65 2.44-1.65 4.2 0 1.21.24 2.31.73 3.33.48 1.01 1.19 1.71 2.1 2.36H3v2h6v-2c-.98-.64-1.8-1.28-2.24-2.17-.45-.89-.67-1.96-.67-3.22 0-1.37.33-2.41 1-3.13C7.75 5.76 8.72 5.4 10 5.4z'; break; case 'editor-expand': - title = 'Editor Expand'; path = 'M7 8h6v4H7zm-5 5v4h4l-1.2-1.2L7 12l-3.8 2.2M14 17h4v-4l-1.2 1.2L13 12l2.2 3.8M14 3l1.3 1.3L13 8l3.8-2.2L18 7V3M6 3H2v4l1.2-1.2L7 8 4.7 4.3'; break; case 'editor-help': - title = 'Editor Help'; path = 'M17 10c0-3.87-3.14-7-7-7-3.87 0-7 3.13-7 7s3.13 7 7 7c3.86 0 7-3.13 7-7zm-6.3 1.48H9.14v-.43c0-.38.08-.7.24-.98s.46-.57.88-.89c.41-.29.68-.53.81-.71.14-.18.2-.39.2-.62 0-.25-.09-.44-.28-.58-.19-.13-.45-.19-.79-.19-.58 0-1.25.19-2 .57l-.64-1.28c.87-.49 1.8-.74 2.77-.74.81 0 1.45.2 1.92.58.48.39.71.91.71 1.55 0 .43-.09.8-.29 1.11-.19.32-.57.67-1.11 1.06-.38.28-.61.49-.71.63-.1.15-.15.34-.15.57v.35zm-1.47 2.74c-.18-.17-.27-.42-.27-.73 0-.33.08-.58.26-.75s.43-.25.77-.25c.32 0 .57.09.75.26s.27.42.27.74c0 .3-.09.55-.27.72-.18.18-.43.27-.75.27-.33 0-.58-.09-.76-.26z'; break; case 'editor-indent': - title = 'Editor Indent'; path = 'M3 5V3h9v2H3zm10-1V3h4v1h-4zm0 3h2V5l4 3.5-4 3.5v-2h-2V7zM3 8V6h9v2H3zm2 3V9h7v2H5zm-2 3v-2h9v2H3zm10 0v-1h4v1h-4zm-4 3v-2h3v2H9z'; break; case 'editor-insertmore': - title = 'Editor Insertmore'; path = 'M17 7V3H3v4h14zM6 11V9H3v2h3zm6 0V9H8v2h4zm5 0V9h-3v2h3zm0 6v-4H3v4h14z'; break; case 'editor-italic': - title = 'Editor Italic'; path = 'M14.78 6h-2.13l-2.8 9h2.12l-.62 2H4.6l.62-2h2.14l2.8-9H8.03l.62-2h6.75z'; break; case 'editor-justify': - title = 'Editor Justify'; path = 'M2 3h16v2H2V3zm0 4h16v2H2V7zm0 4h16v2H2v-2zm0 4h16v2H2v-2z'; break; case 'editor-kitchensink': - title = 'Editor Kitchensink'; path = 'M19 2v6H1V2h18zm-1 5V3H2v4h16zM5 4v2H3V4h2zm3 0v2H6V4h2zm3 0v2H9V4h2zm3 0v2h-2V4h2zm3 0v2h-2V4h2zm2 5v9H1V9h18zm-1 8v-7H2v7h16zM5 11v2H3v-2h2zm3 0v2H6v-2h2zm3 0v2H9v-2h2zm6 0v2h-5v-2h5zm-6 3v2H3v-2h8zm3 0v2h-2v-2h2zm3 0v2h-2v-2h2z'; break; case 'editor-ol': - title = 'Editor Ol'; path = 'M6 7V3h-.69L4.02 4.03l.4.51.46-.37c.06-.05.16-.14.3-.28l-.02.42V7H6zm2-2h9v1H8V5zm-1.23 6.95v-.7H5.05v-.04l.51-.48c.33-.31.57-.54.7-.71.14-.17.24-.33.3-.49.07-.16.1-.33.1-.51 0-.21-.05-.4-.16-.56-.1-.16-.25-.28-.44-.37s-.41-.14-.65-.14c-.19 0-.36.02-.51.06-.15.03-.29.09-.42.15-.12.07-.29.19-.48.35l.45.54c.16-.13.31-.23.45-.3.15-.07.3-.1.45-.1.14 0 .26.03.35.11s.13.2.13.36c0 .1-.02.2-.06.3s-.1.21-.19.33c-.09.11-.29.32-.58.62l-.99 1v.58h2.76zM8 10h9v1H8v-1zm-1.29 3.95c0-.3-.12-.54-.37-.71-.24-.17-.58-.26-1-.26-.52 0-.96.13-1.33.4l.4.6c.17-.11.32-.19.46-.23.14-.05.27-.07.41-.07.38 0 .58.15.58.46 0 .2-.07.35-.22.43s-.38.12-.7.12h-.31v.66h.31c.34 0 .59.04.75.12.15.08.23.22.23.41 0 .22-.07.37-.2.47-.14.1-.35.15-.63.15-.19 0-.38-.03-.57-.08s-.36-.12-.52-.2v.74c.34.15.74.22 1.18.22.53 0 .94-.11 1.22-.33.29-.22.43-.52.43-.92 0-.27-.09-.48-.26-.64s-.42-.26-.74-.3v-.02c.27-.06.49-.19.65-.37.15-.18.23-.39.23-.65zM8 15h9v1H8v-1z'; break; case 'editor-outdent': - title = 'Editor Outdent'; path = 'M7 4V3H3v1h4zm10 1V3H8v2h9zM7 7H5V5L1 8.5 5 12v-2h2V7zm10 1V6H8v2h9zm-2 3V9H8v2h7zm2 3v-2H8v2h9zM7 14v-1H3v1h4zm4 3v-2H8v2h3z'; break; case 'editor-paragraph': - title = 'Editor Paragraph'; path = 'M15 2H7.54c-.83 0-1.59.2-2.28.6-.7.41-1.25.96-1.65 1.65C3.2 4.94 3 5.7 3 6.52s.2 1.58.61 2.27c.4.69.95 1.24 1.65 1.64.69.41 1.45.61 2.28.61h.43V17c0 .27.1.51.29.71.2.19.44.29.71.29.28 0 .51-.1.71-.29.2-.2.3-.44.3-.71V5c0-.27.09-.51.29-.71.2-.19.44-.29.71-.29s.51.1.71.29c.19.2.29.44.29.71v12c0 .27.1.51.3.71.2.19.43.29.71.29.27 0 .51-.1.71-.29.19-.2.29-.44.29-.71V4H15c.27 0 .5-.1.7-.3.2-.19.3-.43.3-.7s-.1-.51-.3-.71C15.5 2.1 15.27 2 15 2z'; break; case 'editor-paste-text': - title = 'Editor Paste Text'; path = 'M12.38 2L15 5v1H5V5l2.64-3h4.74zM10 5c.55 0 1-.44 1-1 0-.55-.45-1-1-1s-1 .45-1 1c0 .56.45 1 1 1zm5.45-1H17c.55 0 1 .45 1 1v12c0 .56-.45 1-1 1H3c-.55 0-1-.44-1-1V5c0-.55.45-1 1-1h1.55L4 4.63V7h12V4.63zM14 11V9H6v2h3v5h2v-5h3z'; break; case 'editor-paste-word': - title = 'Editor Paste Word'; path = 'M12.38 2L15 5v1H5V5l2.64-3h4.74zM10 5c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm8 12V5c0-.55-.45-1-1-1h-1.54l.54.63V7H4V4.62L4.55 4H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h14c.55 0 1-.45 1-1zm-3-8l-2 7h-2l-1-5-1 5H6.92L5 9h2l1 5 1-5h2l1 5 1-5h2z'; break; case 'editor-quote': - title = 'Editor Quote'; path = 'M9.49 13.22c0-.74-.2-1.38-.61-1.9-.62-.78-1.83-.88-2.53-.72-.29-1.65 1.11-3.75 2.92-4.65L7.88 4c-2.73 1.3-5.42 4.28-4.96 8.05C3.21 14.43 4.59 16 6.54 16c.85 0 1.56-.25 2.12-.75s.83-1.18.83-2.03zm8.05 0c0-.74-.2-1.38-.61-1.9-.63-.78-1.83-.88-2.53-.72-.29-1.65 1.11-3.75 2.92-4.65L15.93 4c-2.73 1.3-5.41 4.28-4.95 8.05.29 2.38 1.66 3.95 3.61 3.95.85 0 1.56-.25 2.12-.75s.83-1.18.83-2.03z'; break; case 'editor-removeformatting': - title = 'Editor Removeformatting'; path = 'M14.29 4.59l1.1 1.11c.41.4.61.94.61 1.47v2.12c0 .53-.2 1.07-.61 1.47l-6.63 6.63c-.4.41-.94.61-1.47.61s-1.07-.2-1.47-.61l-1.11-1.1-1.1-1.11c-.41-.4-.61-.94-.61-1.47v-2.12c0-.54.2-1.07.61-1.48l6.63-6.62c.4-.41.94-.61 1.47-.61s1.06.2 1.47.61zm-6.21 9.7l6.42-6.42c.39-.39.39-1.03 0-1.43L12.36 4.3c-.19-.19-.45-.29-.72-.29s-.52.1-.71.29l-6.42 6.42c-.39.4-.39 1.04 0 1.43l2.14 2.14c.38.38 1.04.38 1.43 0z'; break; case 'editor-rtl': - title = 'Editor Rtl'; path = 'M5.52 2h7.43c.55 0 1 .45 1 1s-.45 1-1 1h-1v13c0 .55-.45 1-1 1s-1-.45-1-1V5c0-.55-.45-1-1-1s-1 .45-1 1v12c0 .55-.45 1-1 1s-1-.45-1-1v-5.96h-.43C3.02 11.04 1 9.02 1 6.52S3.02 2 5.52 2zM14 14l5-4-5-4v8z'; break; case 'editor-spellcheck': - title = 'Editor Spellcheck'; path = 'M15.84 2.76c.25 0 .49.04.71.11.23.07.44.16.64.25l.35-.81c-.52-.26-1.08-.39-1.69-.39-.58 0-1.09.13-1.52.37-.43.25-.76.61-.99 1.08C13.11 3.83 13 4.38 13 5c0 .99.23 1.75.7 2.28s1.15.79 2.02.79c.6 0 1.13-.09 1.6-.26v-.84c-.26.08-.51.14-.74.19-.24.05-.49.08-.74.08-.59 0-1.04-.19-1.34-.57-.32-.37-.47-.93-.47-1.66 0-.7.16-1.25.48-1.65.33-.4.77-.6 1.33-.6zM6.5 8h1.04L5.3 2H4.24L2 8h1.03l.58-1.66H5.9zM8 2v6h2.17c.67 0 1.19-.15 1.57-.46.38-.3.56-.72.56-1.26 0-.4-.1-.72-.3-.95-.19-.24-.5-.39-.93-.47v-.04c.35-.06.6-.21.78-.44.18-.24.28-.53.28-.88 0-.52-.19-.9-.56-1.14-.36-.24-.96-.36-1.79-.36H8zm.98 2.48V2.82h.85c.44 0 .77.06.97.19.21.12.31.33.31.61 0 .31-.1.53-.29.66-.18.13-.48.2-.89.2h-.95zM5.64 5.5H3.9l.54-1.56c.14-.4.25-.76.32-1.1l.15.52c.07.23.13.4.17.51zm3.34-.23h.99c.44 0 .76.08.98.23.21.15.32.38.32.69 0 .34-.11.59-.32.75s-.52.24-.93.24H8.98V5.27zM4 13l5 5 9-8-1-1-8 6-4-3z'; break; case 'editor-strikethrough': - title = 'Editor Strikethrough'; path = 'M15.82 12.25c.26 0 .5-.02.74-.07.23-.05.48-.12.73-.2v.84c-.46.17-.99.26-1.58.26-.88 0-1.54-.26-2.01-.79-.39-.44-.62-1.04-.68-1.79h-.94c.12.21.18.48.18.79 0 .54-.18.95-.55 1.26-.38.3-.9.45-1.56.45H8v-2.5H6.59l.93 2.5H6.49l-.59-1.67H3.62L3.04 13H2l.93-2.5H2v-1h1.31l.93-2.49H5.3l.92 2.49H8V7h1.77c1 0 1.41.17 1.77.41.37.24.55.62.55 1.13 0 .35-.09.64-.27.87l-.08.09h1.29c.05-.4.15-.77.31-1.1.23-.46.55-.82.98-1.06.43-.25.93-.37 1.51-.37.61 0 1.17.12 1.69.38l-.35.81c-.2-.1-.42-.18-.64-.25s-.46-.11-.71-.11c-.55 0-.99.2-1.31.59-.23.29-.38.66-.44 1.11H17v1h-2.95c.06.5.2.9.44 1.19.3.37.75.56 1.33.56zM4.44 8.96l-.18.54H5.3l-.22-.61c-.04-.11-.09-.28-.17-.51-.07-.24-.12-.41-.14-.51-.08.33-.18.69-.33 1.09zm4.53-1.09V9.5h1.19c.28-.02.49-.09.64-.18.19-.13.28-.35.28-.66 0-.28-.1-.48-.3-.61-.2-.12-.53-.18-.97-.18h-.84zm-3.33 2.64v-.01H3.91v.01h1.73zm5.28.01l-.03-.02H8.97v1.68h1.04c.4 0 .71-.08.92-.23.21-.16.31-.4.31-.74 0-.31-.11-.54-.32-.69z'; break; case 'editor-table': - title = 'Editor Table'; path = 'M18 17V3H2v14h16zM16 7H4V5h12v2zm-7 4H4V9h5v2zm7 0h-5V9h5v2zm-7 4H4v-2h5v2zm7 0h-5v-2h5v2z'; break; case 'editor-textcolor': - title = 'Editor Textcolor'; path = 'M13.23 15h1.9L11 4H9L5 15h1.88l1.07-3h4.18zm-1.53-4.54H8.51L10 5.6z'; break; case 'editor-ul': - title = 'Editor Ul'; path = 'M5.5 7C4.67 7 4 6.33 4 5.5 4 4.68 4.67 4 5.5 4 6.32 4 7 4.68 7 5.5 7 6.33 6.32 7 5.5 7zM8 5h9v1H8V5zm-2.5 7c-.83 0-1.5-.67-1.5-1.5C4 9.68 4.67 9 5.5 9c.82 0 1.5.68 1.5 1.5 0 .83-.68 1.5-1.5 1.5zM8 10h9v1H8v-1zm-2.5 7c-.83 0-1.5-.67-1.5-1.5 0-.82.67-1.5 1.5-1.5.82 0 1.5.68 1.5 1.5 0 .83-.68 1.5-1.5 1.5zM8 15h9v1H8v-1z'; break; case 'editor-underline': - title = 'Editor Underline'; path = 'M14 5h-2v5.71c0 1.99-1.12 2.98-2.45 2.98-1.32 0-2.55-1-2.55-2.96V5H5v5.87c0 1.91 1 4.54 4.48 4.54 3.49 0 4.52-2.58 4.52-4.5V5zm0 13v-2H5v2h9z'; break; case 'editor-unlink': - title = 'Editor Unlink'; path = 'M17.74 2.26c1.68 1.69 1.68 4.41 0 6.1l-1.53 1.52c-.32.33-.69.58-1.08.77L13 10l1.69-1.64.76-.77.76-.76c.84-.84.84-2.2 0-3.04-.84-.85-2.2-.85-3.04 0l-.77.76-.76.76L10 7l-.65-2.14c.19-.38.44-.75.77-1.07l1.52-1.53c1.69-1.68 4.42-1.68 6.1 0zM2 4l8 6-6-8zm4-2l4 8-2-8H6zM2 6l8 4-8-2V6zm7.36 7.69L10 13l.74 2.35-1.38 1.39c-1.69 1.68-4.41 1.68-6.1 0-1.68-1.68-1.68-4.42 0-6.1l1.39-1.38L7 10l-.69.64-1.52 1.53c-.85.84-.85 2.2 0 3.04.84.85 2.2.85 3.04 0zM18 16l-8-6 6 8zm-4 2l-4-8 2 8h2zm4-4l-8-4 8 2v2z'; break; case 'editor-video': - title = 'Editor Video'; path = 'M16 2h-3v1H7V2H4v15h3v-1h6v1h3V2zM6 3v1H5V3h1zm9 0v1h-1V3h1zm-2 1v5H7V4h6zM6 5v1H5V5h1zm9 0v1h-1V5h1zM6 7v1H5V7h1zm9 0v1h-1V7h1zM6 9v1H5V9h1zm9 0v1h-1V9h1zm-2 1v5H7v-5h6zm-7 1v1H5v-1h1zm9 0v1h-1v-1h1zm-9 2v1H5v-1h1zm9 0v1h-1v-1h1zm-9 2v1H5v-1h1zm9 0v1h-1v-1h1z'; break; case 'email-alt': - title = 'Email Alt'; path = 'M19 14.5v-9c0-.83-.67-1.5-1.5-1.5H3.49c-.83 0-1.5.67-1.5 1.5v9c0 .83.67 1.5 1.5 1.5H17.5c.83 0 1.5-.67 1.5-1.5zm-1.31-9.11c.33.33.15.67-.03.84L13.6 9.95l3.9 4.06c.12.14.2.36.06.51-.13.16-.43.15-.56.05l-4.37-3.73-2.14 1.95-2.13-1.95-4.37 3.73c-.13.1-.43.11-.56-.05-.14-.15-.06-.37.06-.51l3.9-4.06-4.06-3.72c-.18-.17-.36-.51-.03-.84s.67-.17.95.07l6.24 5.04 6.25-5.04c.28-.24.62-.4.95-.07z'; break; case 'email-alt2': - title = 'Email Alt2'; path = 'M18.01 11.18V2.51c0-1.19-.9-1.81-2-1.37L4 5.91c-1.1.44-2 1.77-2 2.97v8.66c0 1.2.9 1.81 2 1.37l12.01-4.77c1.1-.44 2-1.76 2-2.96zm-1.43-7.46l-6.04 9.33-6.65-4.6c-.1-.07-.36-.32-.17-.64.21-.36.65-.21.65-.21l6.3 2.32s4.83-6.34 5.11-6.7c.13-.17.43-.34.73-.13.29.2.16.49.07.63z'; break; case 'email': - title = 'Email'; path = 'M3.87 4h13.25C18.37 4 19 4.59 19 5.79v8.42c0 1.19-.63 1.79-1.88 1.79H3.87c-1.25 0-1.88-.6-1.88-1.79V5.79c0-1.2.63-1.79 1.88-1.79zm6.62 8.6l6.74-5.53c.24-.2.43-.66.13-1.07-.29-.41-.82-.42-1.17-.17l-5.7 3.86L4.8 5.83c-.35-.25-.88-.24-1.17.17-.3.41-.11.87.13 1.07z'; break; case 'exerpt-view': - title = 'Exerpt View'; path = 'M19 18V2c0-.55-.45-1-1-1H2c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1h16c.55 0 1-.45 1-1zM4 3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v6H6V3h11zM4 11c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v6H6v-6h11z'; break; case 'external': - title = 'External'; path = 'M9 3h8v8l-2-1V6.92l-5.6 5.59-1.41-1.41L14.08 5H10zm3 12v-3l2-2v7H3V6h8L9 8H5v7h7z'; break; case 'facebook-alt': - title = 'Facebook Alt'; path = 'M8.46 18h2.93v-7.3h2.45l.37-2.84h-2.82V6.04c0-.82.23-1.38 1.41-1.38h1.51V2.11c-.26-.03-1.15-.11-2.19-.11-2.18 0-3.66 1.33-3.66 3.76v2.1H6v2.84h2.46V18z'; break; case 'facebook': - title = 'Facebook'; path = 'M2.89 2h14.23c.49 0 .88.39.88.88v14.24c0 .48-.39.88-.88.88h-4.08v-6.2h2.08l.31-2.41h-2.39V7.85c0-.7.2-1.18 1.2-1.18h1.28V4.51c-.22-.03-.98-.09-1.86-.09-1.85 0-3.11 1.12-3.11 3.19v1.78H8.46v2.41h2.09V18H2.89c-.49 0-.89-.4-.89-.88V2.88c0-.49.4-.88.89-.88z'; break; case 'feedback': - title = 'Feedback'; path = 'M2 2h16c.55 0 1 .45 1 1v14c0 .55-.45 1-1 1H2c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm15 14V7H3v9h14zM4 8v1h3V8H4zm4 0v3h8V8H8zm-4 4v1h3v-1H4zm4 0v3h8v-3H8z'; break; case 'filter': - title = 'Filter'; path = 'M3 4.5v-2s3.34-1 7-1 7 1 7 1v2l-5 7.03v6.97s-1.22-.09-2.25-.59S8 16.5 8 16.5v-4.97z'; break; case 'flag': - title = 'Flag'; path = 'M5 18V3H3v15h2zm1-6V4c3-1 7 1 11 0v8c-3 1.27-8-1-11 0z'; break; case 'format-aside': - title = 'Format Aside'; path = 'M1 1h18v12l-6 6H1V1zm3 3v1h12V4H4zm0 4v1h12V8H4zm6 5v-1H4v1h6zm2 4l5-5h-5v5z'; break; case 'format-audio': - title = 'Format Audio'; path = 'M6.99 3.08l11.02-2c.55-.08.99.45.99 1V14.5c0 1.94-1.57 3.5-3.5 3.5S12 16.44 12 14.5c0-1.93 1.57-3.5 3.5-3.5.54 0 1.04.14 1.5.35V5.08l-9 2V16c-.24 1.7-1.74 3-3.5 3C2.57 19 1 17.44 1 15.5 1 13.57 2.57 12 4.5 12c.54 0 1.04.14 1.5.35V4.08c0-.55.44-.91.99-1z'; break; case 'format-chat': - title = 'Format Chat'; path = 'M11 6h-.82C9.07 6 8 7.2 8 8.16V10l-3 3v-3H3c-1.1 0-2-.9-2-2V3c0-1.1.9-2 2-2h6c1.1 0 2 .9 2 2v3zm0 1h6c1.1 0 2 .9 2 2v5c0 1.1-.9 2-2 2h-2v3l-3-3h-1c-1.1 0-2-.9-2-2V9c0-1.1.9-2 2-2z'; break; case 'format-gallery': - title = 'Format Gallery'; path = 'M16 4h1.96c.57 0 1.04.47 1.04 1.04v12.92c0 .57-.47 1.04-1.04 1.04H5.04C4.47 19 4 18.53 4 17.96V16H2.04C1.47 16 1 15.53 1 14.96V2.04C1 1.47 1.47 1 2.04 1h12.92c.57 0 1.04.47 1.04 1.04V4zM3 14h11V3H3v11zm5-8.5C8 4.67 7.33 4 6.5 4S5 4.67 5 5.5 5.67 7 6.5 7 8 6.33 8 5.5zm2 4.5s1-5 3-5v8H4V7c2 0 2 3 2 3s.33-2 2-2 2 2 2 2zm7 7V6h-1v8.96c0 .57-.47 1.04-1.04 1.04H6v1h11z'; break; case 'format-image': - title = 'Format Image'; path = 'M2.25 1h15.5c.69 0 1.25.56 1.25 1.25v15.5c0 .69-.56 1.25-1.25 1.25H2.25C1.56 19 1 18.44 1 17.75V2.25C1 1.56 1.56 1 2.25 1zM17 17V3H3v14h14zM10 6c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm3 5s0-6 3-6v10c0 .55-.45 1-1 1H5c-.55 0-1-.45-1-1V8c2 0 3 4 3 4s1-3 3-3 3 2 3 2z'; break; case 'format-quote': - title = 'Format Quote'; path = 'M8.54 12.74c0-.87-.24-1.61-.72-2.22-.73-.92-2.14-1.03-2.96-.85-.34-1.93 1.3-4.39 3.42-5.45L6.65 1.94C3.45 3.46.31 6.96.85 11.37 1.19 14.16 2.8 16 5.08 16c1 0 1.83-.29 2.48-.88.66-.59.98-1.38.98-2.38zm9.43 0c0-.87-.24-1.61-.72-2.22-.73-.92-2.14-1.03-2.96-.85-.34-1.93 1.3-4.39 3.42-5.45l-1.63-2.28c-3.2 1.52-6.34 5.02-5.8 9.43.34 2.79 1.95 4.63 4.23 4.63 1 0 1.83-.29 2.48-.88.66-.59.98-1.38.98-2.38z'; break; case 'format-status': - title = 'Format Status'; path = 'M10 1c7 0 9 2.91 9 6.5S17 14 10 14s-9-2.91-9-6.5S3 1 10 1zM5.5 9C6.33 9 7 8.33 7 7.5S6.33 6 5.5 6 4 6.67 4 7.5 4.67 9 5.5 9zM10 9c.83 0 1.5-.67 1.5-1.5S10.83 6 10 6s-1.5.67-1.5 1.5S9.17 9 10 9zm4.5 0c.83 0 1.5-.67 1.5-1.5S15.33 6 14.5 6 13 6.67 13 7.5 13.67 9 14.5 9zM6 14.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5zm-3 2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1z'; break; case 'format-video': - title = 'Format Video'; path = 'M2 1h16c.55 0 1 .45 1 1v16l-18-.02V2c0-.55.45-1 1-1zm4 1L4 5h1l2-3H6zm4 0H9L7 5h1zm3 0h-1l-2 3h1zm3 0h-1l-2 3h1zm1 14V6H3v10h14zM8 7l6 4-6 4V7z'; break; case 'forms': - title = 'Forms'; path = 'M2 2h7v7H2V2zm9 0v7h7V2h-7zM5.5 4.5L7 3H4zM12 8V3h5v5h-5zM4.5 5.5L3 4v3zM8 4L6.5 5.5 8 7V4zM5.5 6.5L4 8h3zM9 18v-7H2v7h7zm9 0h-7v-7h7v7zM8 12v5H3v-5h5zm6.5 1.5L16 12h-3zM12 16l1.5-1.5L12 13v3zm3.5-1.5L17 16v-3zm-1 1L13 17h3z'; break; case 'googleplus': - title = 'Googleplus'; path = 'M6.73 10h5.4c.05.29.09.57.09.95 0 3.27-2.19 5.6-5.49 5.6-3.17 0-5.73-2.57-5.73-5.73 0-3.17 2.56-5.73 5.73-5.73 1.54 0 2.84.57 3.83 1.5l-1.55 1.5c-.43-.41-1.17-.89-2.28-.89-1.96 0-3.55 1.62-3.55 3.62 0 1.99 1.59 3.61 3.55 3.61 2.26 0 3.11-1.62 3.24-2.47H6.73V10zM19 10v1.64h-1.64v1.63h-1.63v-1.63h-1.64V10h1.64V8.36h1.63V10H19z'; break; case 'grid-view': - title = 'Grid View'; path = 'M2 1h16c.55 0 1 .45 1 1v16c0 .55-.45 1-1 1H2c-.55 0-1-.45-1-1V2c0-.55.45-1 1-1zm7.01 7.99v-6H3v6h6.01zm8 0v-6h-6v6h6zm-8 8.01v-6H3v6h6.01zm8 0v-6h-6v6h6z'; break; case 'groups': - title = 'Groups'; path = 'M8.03 4.46c-.29 1.28.55 3.46 1.97 3.46 1.41 0 2.25-2.18 1.96-3.46-.22-.98-1.08-1.63-1.96-1.63-.89 0-1.74.65-1.97 1.63zm-4.13.9c-.25 1.08.47 2.93 1.67 2.93s1.92-1.85 1.67-2.93c-.19-.83-.92-1.39-1.67-1.39s-1.48.56-1.67 1.39zm8.86 0c-.25 1.08.47 2.93 1.66 2.93 1.2 0 1.92-1.85 1.67-2.93-.19-.83-.92-1.39-1.67-1.39-.74 0-1.47.56-1.66 1.39zm-.59 11.43l1.25-4.3C14.2 10 12.71 8.47 10 8.47c-2.72 0-4.21 1.53-3.44 4.02l1.26 4.3C8.05 17.51 9 18 10 18c.98 0 1.94-.49 2.17-1.21zm-6.1-7.63c-.49.67-.96 1.83-.42 3.59l1.12 3.79c-.34.2-.77.31-1.2.31-.85 0-1.65-.41-1.85-1.03l-1.07-3.65c-.65-2.11.61-3.4 2.92-3.4.27 0 .54.02.79.06-.1.1-.2.22-.29.33zm8.35-.39c2.31 0 3.58 1.29 2.92 3.4l-1.07 3.65c-.2.62-1 1.03-1.85 1.03-.43 0-.86-.11-1.2-.31l1.11-3.77c.55-1.78.08-2.94-.42-3.61-.08-.11-.18-.23-.28-.33.25-.04.51-.06.79-.06z'; break; case 'hammer': - title = 'Hammer'; path = 'M17.7 6.32l1.41 1.42-3.47 3.41-1.42-1.42.84-.82c-.32-.76-.81-1.57-1.51-2.31l-4.61 6.59-5.26 4.7c-.39.39-1.02.39-1.42 0l-1.2-1.21c-.39-.39-.39-1.02 0-1.41l10.97-9.92c-1.37-.86-3.21-1.46-5.67-1.48 2.7-.82 4.95-.93 6.58-.3 1.7.66 2.82 2.2 3.91 3.58z'; break; case 'heading': - title = 'Heading'; path = 'M12.5 4v5.2h-5V4H5v13h2.5v-5.2h5V17H15V4'; break; case 'heart': - title = 'Heart'; path = 'M10 17.12c3.33-1.4 5.74-3.79 7.04-6.21 1.28-2.41 1.46-4.81.32-6.25-1.03-1.29-2.37-1.78-3.73-1.74s-2.68.63-3.63 1.46c-.95-.83-2.27-1.42-3.63-1.46s-2.7.45-3.73 1.74c-1.14 1.44-.96 3.84.34 6.25 1.28 2.42 3.69 4.81 7.02 6.21z'; break; case 'hidden': - title = 'Hidden'; path = 'M17.2 3.3l.16.17c.39.39.39 1.02 0 1.41L4.55 17.7c-.39.39-1.03.39-1.41 0l-.17-.17c-.39-.39-.39-1.02 0-1.41l1.59-1.6c-1.57-1-2.76-2.3-3.56-3.93.81-1.65 2.03-2.98 3.64-3.99S8.04 5.09 10 5.09c1.2 0 2.33.21 3.4.6l2.38-2.39c.39-.39 1.03-.39 1.42 0zm-7.09 4.01c-.23.25-.34.54-.34.88 0 .31.12.58.31.81l1.8-1.79c-.13-.12-.28-.21-.45-.26-.11-.01-.28-.03-.49-.04-.33.03-.6.16-.83.4zM2.4 10.59c.69 1.23 1.71 2.25 3.05 3.05l1.28-1.28c-.51-.69-.77-1.47-.77-2.36 0-1.06.36-1.98 1.09-2.76-1.04.27-1.96.7-2.76 1.26-.8.58-1.43 1.27-1.89 2.09zm13.22-2.13l.96-.96c1.02.86 1.83 1.89 2.42 3.09-.81 1.65-2.03 2.98-3.64 3.99s-3.4 1.51-5.36 1.51c-.63 0-1.24-.07-1.83-.18l1.07-1.07c.25.02.5.05.76.05 1.63 0 3.13-.4 4.5-1.21s2.4-1.84 3.1-3.09c-.46-.82-1.09-1.51-1.89-2.09-.03-.01-.06-.03-.09-.04zm-5.58 5.58l4-4c-.01 1.1-.41 2.04-1.18 2.81-.78.78-1.72 1.18-2.82 1.19z'; break; case 'id-alt': - title = 'Id Alt'; path = 'M18 18H2V2h16v16zM8.05 7.53c.13-.07.24-.15.33-.24.09-.1.17-.21.24-.34.07-.14.13-.26.17-.37s.07-.22.1-.34L8.95 6c0-.04.01-.07.01-.09.05-.32.03-.61-.04-.9-.08-.28-.23-.52-.46-.72C8.23 4.1 7.95 4 7.6 4c-.2 0-.39.04-.56.11-.17.08-.31.18-.41.3-.11.13-.2.27-.27.44-.07.16-.11.33-.12.51s0 .36.01.55l.02.09c.01.06.03.15.06.25s.06.21.1.33.1.25.17.37c.08.12.16.23.25.33s.2.19.34.25c.13.06.28.09.43.09s.3-.03.43-.09zM16 5V4h-5v1h5zm0 2V6h-5v1h5zM7.62 8.83l-1.38-.88c-.41 0-.79.11-1.14.32-.35.22-.62.5-.81.85-.19.34-.29.7-.29 1.07v1.25l.2.05c.13.04.31.09.55.14.24.06.51.12.8.17.29.06.62.1 1 .14.37.04.73.06 1.07.06s.69-.02 1.07-.06.7-.09.98-.14c.27-.05.54-.1.82-.17.27-.06.45-.11.54-.13.09-.03.16-.05.21-.06v-1.25c0-.36-.1-.72-.31-1.07s-.49-.64-.84-.86-.72-.33-1.11-.33zM16 9V8h-3v1h3zm0 2v-1h-3v1h3zm0 3v-1H4v1h12zm0 2v-1H4v1h12z'; break; case 'id': - title = 'Id'; path = 'M18 16H2V4h16v12zM7.05 8.53c.13-.07.24-.15.33-.24.09-.1.17-.21.24-.34.07-.14.13-.26.17-.37s.07-.22.1-.34L7.95 7c0-.04.01-.07.01-.09.05-.32.03-.61-.04-.9-.08-.28-.23-.52-.46-.72C7.23 5.1 6.95 5 6.6 5c-.2 0-.39.04-.56.11-.17.08-.31.18-.41.3-.11.13-.2.27-.27.44-.07.16-.11.33-.12.51s0 .36.01.55l.02.09c.01.06.03.15.06.25s.06.21.1.33.1.25.17.37c.08.12.16.23.25.33s.2.19.34.25c.13.06.28.09.43.09s.3-.03.43-.09zM17 9V5h-5v4h5zm-10.38.83l-1.38-.88c-.41 0-.79.11-1.14.32-.35.22-.62.5-.81.85-.19.34-.29.7-.29 1.07v1.25l.2.05c.13.04.31.09.55.14.24.06.51.12.8.17.29.06.62.1 1 .14.37.04.73.06 1.07.06s.69-.02 1.07-.06.7-.09.98-.14c.27-.05.54-.1.82-.17.27-.06.45-.11.54-.13.09-.03.16-.05.21-.06v-1.25c0-.36-.1-.72-.31-1.07s-.49-.64-.84-.86-.72-.33-1.11-.33zM17 11v-1h-5v1h5zm0 2v-1h-5v1h5zm0 2v-1H3v1h14z'; break; case 'image-crop': - title = 'Image Crop'; path = 'M19 12v3h-4v4h-3v-4H4V7H0V4h4V0h3v4h7l3-3 1 1-3 3v7h4zm-8-5H7v4zm-3 5h4V8z'; break; case 'image-filter': - title = 'Image Filter'; path = 'M14 5.87c0-2.2-1.79-4-4-4s-4 1.8-4 4c0 2.21 1.79 4 4 4s4-1.79 4-4zM3.24 10.66c-1.92 1.1-2.57 3.55-1.47 5.46 1.11 1.92 3.55 2.57 5.47 1.47 1.91-1.11 2.57-3.55 1.46-5.47-1.1-1.91-3.55-2.56-5.46-1.46zm9.52 6.93c1.92 1.1 4.36.45 5.47-1.46 1.1-1.92.45-4.36-1.47-5.47-1.91-1.1-4.36-.45-5.46 1.46-1.11 1.92-.45 4.36 1.46 5.47z'; break; case 'image-flip-horizontal': - title = 'Image Flip Horizontal'; path = 'M19 3v14h-8v3H9v-3H1V3h8V0h2v3h8zm-8.5 14V3h-1v14h1zM7 6.5L3 10l4 3.5v-7zM17 10l-4-3.5v7z'; break; case 'image-flip-vertical': - title = 'Image Flip Vertical'; path = 'M20 9v2h-3v8H3v-8H0V9h3V1h14v8h3zM6.5 7h7L10 3zM17 9.5H3v1h14v-1zM13.5 13h-7l3.5 4z'; break; case 'image-rotate-left': - title = 'Image Rotate Left'; path = 'M7 5H5.05c0-1.74.85-2.9 2.95-2.9V0C4.85 0 2.96 2.11 2.96 5H1.18L3.8 8.39zm13-4v14h-5v5H1V10h9V1h10zm-2 2h-6v7h3v3h3V3zm-5 9H3v6h10v-6z'; break; case 'image-rotate-right': - title = 'Image Rotate Right'; path = 'M15.95 5H14l3.2 3.39L19.82 5h-1.78c0-2.89-1.89-5-5.04-5v2.1c2.1 0 2.95 1.16 2.95 2.9zM1 1h10v9h9v10H6v-5H1V1zm2 2v10h3v-3h3V3H3zm5 9v6h10v-6H8z'; break; case 'image-rotate': - title = 'Image Rotate'; path = 'M10.25 1.02c5.1 0 8.75 4.04 8.75 9s-3.65 9-8.75 9c-3.2 0-6.02-1.59-7.68-3.99l2.59-1.52c1.1 1.5 2.86 2.51 4.84 2.51 3.3 0 6-2.79 6-6s-2.7-6-6-6c-1.97 0-3.72 1-4.82 2.49L7 8.02l-6 2v-7L2.89 4.6c1.69-2.17 4.36-3.58 7.36-3.58z'; break; case 'images-alt': - title = 'Images Alt'; path = 'M4 15v-3H2V2h12v3h2v3h2v10H6v-3H4zm7-12c-1.1 0-2 .9-2 2h4c0-1.1-.89-2-2-2zm-7 8V6H3v5h1zm7-3h4c0-1.1-.89-2-2-2-1.1 0-2 .9-2 2zm-5 6V9H5v5h1zm9-1c1.1 0 2-.89 2-2 0-1.1-.9-2-2-2s-2 .9-2 2c0 1.11.9 2 2 2zm2 4v-2c-5 0-5-3-10-3v5h10z'; break; case 'images-alt2': - title = 'Images Alt2'; path = 'M5 3h14v11h-2v2h-2v2H1V7h2V5h2V3zm13 10V4H6v9h12zm-3-4c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm1 6v-1H5V6H4v9h12zM7 6l10 6H7V6zm7 11v-1H3V8H2v9h12z'; break; case 'index-card': - title = 'Index Card'; path = 'M1 3.17V18h18V4H8v-.83c0-.32-.12-.6-.35-.83S7.14 2 6.82 2H2.18c-.33 0-.6.11-.83.34-.24.23-.35.51-.35.83zM10 6v2H3V6h7zm7 0v10h-5V6h5zm-7 4v2H3v-2h7zm0 4v2H3v-2h7z'; break; case 'info': - title = 'Info'; path = 'M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1 4c0-.55-.45-1-1-1s-1 .45-1 1 .45 1 1 1 1-.45 1-1zm0 9V9H9v6h2z'; break; case 'insert': - title = 'Insert'; path = 'M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z'; break; case 'laptop': - title = 'Laptop'; path = 'M3 3h14c.6 0 1 .4 1 1v10c0 .6-.4 1-1 1H3c-.6 0-1-.4-1-1V4c0-.6.4-1 1-1zm13 2H4v8h12V5zm-3 1H5v4zm6 11v-1H1v1c0 .6.5 1 1.1 1h15.8c.6 0 1.1-.4 1.1-1z'; break; case 'layout': - title = 'Layout'; path = 'M2 2h5v11H2V2zm6 0h5v5H8V2zm6 0h4v16h-4V2zM8 8h5v5H8V8zm-6 6h11v4H2v-4z'; break; case 'leftright': - title = 'Leftright'; path = 'M3 10.03L9 6v8zM11 6l6 4.03L11 14V6z'; break; case 'lightbulb': - title = 'Lightbulb'; path = 'M10 1c3.11 0 5.63 2.52 5.63 5.62 0 1.84-2.03 4.58-2.03 4.58-.33.44-.6 1.25-.6 1.8v1c0 .55-.45 1-1 1H8c-.55 0-1-.45-1-1v-1c0-.55-.27-1.36-.6-1.8 0 0-2.02-2.74-2.02-4.58C4.38 3.52 6.89 1 10 1zM7 16.87V16h6v.87c0 .62-.13 1.13-.75 1.13H12c0 .62-.4 1-1.02 1h-2c-.61 0-.98-.38-.98-1h-.25c-.62 0-.75-.51-.75-1.13z'; break; case 'list-view': - title = 'List View'; path = 'M2 19h16c.55 0 1-.45 1-1V2c0-.55-.45-1-1-1H2c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1zM4 3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v2H6V3h11zM4 7c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v2H6V7h11zM4 11c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v2H6v-2h11zM4 15c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v2H6v-2h11z'; break; case 'location-alt': - title = 'Location Alt'; path = 'M13 13.14l1.17-5.94c.79-.43 1.33-1.25 1.33-2.2 0-1.38-1.12-2.5-2.5-2.5S10.5 3.62 10.5 5c0 .95.54 1.77 1.33 2.2zm0-9.64c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5zm1.72 4.8L18 6.97v9L13.12 18 7 15.97l-5 2v-9l5-2 4.27 1.41 1.73 7.3z'; break; case 'location': - title = 'Location'; path = 'M10 2C6.69 2 4 4.69 4 8c0 2.02 1.17 3.71 2.53 4.89.43.37 1.18.96 1.85 1.83.74.97 1.41 2.01 1.62 2.71.21-.7.88-1.74 1.62-2.71.67-.87 1.42-1.46 1.85-1.83C14.83 11.71 16 10.02 16 8c0-3.31-2.69-6-6-6zm0 2.56c1.9 0 3.44 1.54 3.44 3.44S11.9 11.44 10 11.44 6.56 9.9 6.56 8 8.1 4.56 10 4.56z'; break; case 'lock': - title = 'Lock'; path = 'M14 9h1c.55 0 1 .45 1 1v7c0 .55-.45 1-1 1H5c-.55 0-1-.45-1-1v-7c0-.55.45-1 1-1h1V6c0-2.21 1.79-4 4-4s4 1.79 4 4v3zm-2 0V6c0-1.1-.9-2-2-2s-2 .9-2 2v3h4zm-1 7l-.36-2.15c.51-.24.86-.75.86-1.35 0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5c0 .6.35 1.11.86 1.35L9 16h2z'; break; case 'marker': - title = 'Marker'; path = 'M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm0 13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5z'; break; case 'media-archive': - title = 'Media Archive'; path = 'M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3zM8 3.5v2l1.8-1zM11 5L9.2 6 11 7V5zM8 6.5v2l1.8-1zM11 8L9.2 9l1.8 1V8zM8 9.5v2l1.8-1zm3 1.5l-1.8 1 1.8 1v-2zm-1.5 6c.83 0 1.62-.72 1.5-1.63-.05-.38-.49-1.61-.49-1.61l-1.99-1.1s-.45 1.95-.52 2.71c-.07.77.67 1.63 1.5 1.63zm0-2.39c.42 0 .76.34.76.76 0 .43-.34.77-.76.77s-.76-.34-.76-.77c0-.42.34-.76.76-.76z'; break; case 'media-audio': - title = 'Media Audio'; path = 'M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3zm1 7.26V8.09c0-.11-.04-.21-.12-.29-.07-.08-.16-.11-.27-.1 0 0-3.97.71-4.25.78C8.07 8.54 8 8.8 8 9v3.37c-.2-.09-.42-.07-.6-.07-.38 0-.7.13-.96.39-.26.27-.4.58-.4.96 0 .37.14.69.4.95.26.27.58.4.96.4.34 0 .7-.04.96-.26.26-.23.64-.65.64-1.12V10.3l3-.6V12c-.67-.2-1.17.04-1.44.31-.26.26-.39.58-.39.95 0 .38.13.69.39.96.27.26.71.39 1.08.39.38 0 .7-.13.96-.39.26-.27.4-.58.4-.96z'; break; case 'media-code': - title = 'Media Code'; path = 'M12 2l4 4v12H4V2h8zM9 13l-2-2 2-2-1-1-3 3 3 3zm3 1l3-3-3-3-1 1 2 2-2 2z'; break; case 'media-default': - title = 'Media Default'; path = 'M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3z'; break; case 'media-document': - title = 'Media Document'; path = 'M12 2l4 4v12H4V2h8zM5 3v1h6V3H5zm7 3h3l-3-3v3zM5 5v1h6V5H5zm10 3V7H5v1h10zM5 9v1h4V9H5zm10 3V9h-5v3h5zM5 11v1h4v-1H5zm10 3v-1H5v1h10zm-3 2v-1H5v1h7z'; break; case 'media-interactive': - title = 'Media Interactive'; path = 'M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3zm2 8V8H6v6h3l-1 2h1l1-2 1 2h1l-1-2h3zm-6-3c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm5-2v2h-3V9h3zm0 3v1H7v-1h6z'; break; case 'media-spreadsheet': - title = 'Media Spreadsheet'; path = 'M12 2l4 4v12H4V2h8zm-1 4V3H5v3h6zM8 8V7H5v1h3zm3 0V7H9v1h2zm4 0V7h-3v1h3zm-7 2V9H5v1h3zm3 0V9H9v1h2zm4 0V9h-3v1h3zm-7 2v-1H5v1h3zm3 0v-1H9v1h2zm4 0v-1h-3v1h3zm-7 2v-1H5v1h3zm3 0v-1H9v1h2zm4 0v-1h-3v1h3zm-7 2v-1H5v1h3zm3 0v-1H9v1h2z'; break; case 'media-text': - title = 'Media Text'; path = 'M12 2l4 4v12H4V2h8zM5 3v1h6V3H5zm7 3h3l-3-3v3zM5 5v1h6V5H5zm10 3V7H5v1h10zm0 2V9H5v1h10zm0 2v-1H5v1h10zm-4 2v-1H5v1h6z'; break; case 'media-video': - title = 'Media Video'; path = 'M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3zm-1 8v-3c0-.27-.1-.51-.29-.71-.2-.19-.44-.29-.71-.29H7c-.27 0-.51.1-.71.29-.19.2-.29.44-.29.71v3c0 .27.1.51.29.71.2.19.44.29.71.29h3c.27 0 .51-.1.71-.29.19-.2.29-.44.29-.71zm3 1v-5l-2 2v1z'; break; case 'megaphone': - title = 'Megaphone'; path = 'M18.15 5.94c.46 1.62.38 3.22-.02 4.48-.42 1.28-1.26 2.18-2.3 2.48-.16.06-.26.06-.4.06-.06.02-.12.02-.18.02-.06.02-.14.02-.22.02h-6.8l2.22 5.5c.02.14-.06.26-.14.34-.08.1-.24.16-.34.16H6.95c-.1 0-.26-.06-.34-.16-.08-.08-.16-.2-.14-.34l-1-5.5H4.25l-.02-.02c-.5.06-1.08-.18-1.54-.62s-.88-1.08-1.06-1.88c-.24-.8-.2-1.56-.02-2.2.18-.62.58-1.08 1.06-1.3l.02-.02 9-5.4c.1-.06.18-.1.24-.16.06-.04.14-.08.24-.12.16-.08.28-.12.5-.18 1.04-.3 2.24.1 3.22.98s1.84 2.24 2.26 3.86zm-2.58 5.98h-.02c.4-.1.74-.34 1.04-.7.58-.7.86-1.76.86-3.04 0-.64-.1-1.3-.28-1.98-.34-1.36-1.02-2.5-1.78-3.24s-1.68-1.1-2.46-.88c-.82.22-1.4.96-1.7 2-.32 1.04-.28 2.36.06 3.72.38 1.36 1 2.5 1.8 3.24.78.74 1.62 1.1 2.48.88zm-2.54-7.08c.22-.04.42-.02.62.04.38.16.76.48 1.02 1s.42 1.2.42 1.78c0 .3-.04.56-.12.8-.18.48-.44.84-.86.94-.34.1-.8-.06-1.14-.4s-.64-.86-.78-1.5c-.18-.62-.12-1.24.02-1.72s.48-.84.82-.94z'; break; case 'menu-alt': - title = 'Menu Alt'; path = 'M3 4h14v2H3V4zm0 5h14v2H3V9zm0 5h14v2H3v-2z'; break; case 'menu': - title = 'Menu'; path = 'M17 7V5H3v2h14zm0 4V9H3v2h14zm0 4v-2H3v2h14z'; break; case 'microphone': - title = 'Microphone'; path = 'M12 9V3c0-1.1-.89-2-2-2-1.12 0-2 .94-2 2v6c0 1.1.9 2 2 2 1.13 0 2-.94 2-2zm4 0c0 2.97-2.16 5.43-5 5.91V17h2c.56 0 1 .45 1 1s-.44 1-1 1H7c-.55 0-1-.45-1-1s.45-1 1-1h2v-2.09C6.17 14.43 4 11.97 4 9c0-.55.45-1 1-1 .56 0 1 .45 1 1 0 2.21 1.8 4 4 4 2.21 0 4-1.79 4-4 0-.55.45-1 1-1 .56 0 1 .45 1 1z'; break; case 'migrate': - title = 'Migrate'; path = 'M4 6h6V4H2v12.01h8V14H4V6zm2 2h6V5l6 5-6 5v-3H6V8z'; break; case 'minus': - title = 'Minus'; path = 'M4 9h12v2H4V9z'; break; case 'money': - title = 'Money'; path = 'M0 3h20v12h-.75c0-1.79-1.46-3.25-3.25-3.25-1.31 0-2.42.79-2.94 1.91-.25-.1-.52-.16-.81-.16-.98 0-1.8.63-2.11 1.5H0V3zm8.37 3.11c-.06.15-.1.31-.11.47s-.01.33.01.5l.02.08c.01.06.02.14.05.23.02.1.06.2.1.31.03.11.09.22.15.33.07.12.15.22.23.31s.18.17.31.23c.12.06.25.09.4.09.14 0 .27-.03.39-.09s.22-.14.3-.22c.09-.09.16-.2.22-.32.07-.12.12-.23.16-.33s.07-.2.09-.31c.03-.11.04-.18.05-.22s.01-.07.01-.09c.05-.29.03-.56-.04-.82s-.21-.48-.41-.66c-.21-.18-.47-.27-.79-.27-.19 0-.36.03-.52.1-.15.07-.28.16-.38.28-.09.11-.17.25-.24.4zm4.48 6.04v-1.14c0-.33-.1-.66-.29-.98s-.45-.59-.77-.79c-.32-.21-.66-.31-1.02-.31l-1.24.84-1.28-.82c-.37 0-.72.1-1.04.3-.31.2-.56.46-.74.77-.18.32-.27.65-.27.99v1.14l.18.05c.12.04.29.08.51.14.23.05.47.1.74.15.26.05.57.09.91.13.34.03.67.05.99.05.3 0 .63-.02.98-.05.34-.04.64-.08.89-.13.25-.04.5-.1.76-.16l.5-.12c.08-.02.14-.04.19-.06zm3.15.1c1.52 0 2.75 1.23 2.75 2.75s-1.23 2.75-2.75 2.75c-.73 0-1.38-.3-1.87-.77.23-.35.37-.78.37-1.23 0-.77-.39-1.46-.99-1.86.43-.96 1.37-1.64 2.49-1.64zm-5.5 3.5c0-.96.79-1.75 1.75-1.75s1.75.79 1.75 1.75-.79 1.75-1.75 1.75-1.75-.79-1.75-1.75z'; break; case 'move': - title = 'Move'; path = 'M19 10l-4 4v-3h-4v4h3l-4 4-4-4h3v-4H5v3l-4-4 4-4v3h4V5H6l4-4 4 4h-3v4h4V6z'; break; case 'nametag': - title = 'Nametag'; path = 'M12 5V2c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h2c.55 0 1-.45 1-1zm-2-3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm8 13V7c0-1.1-.9-2-2-2h-3v.33C13 6.25 12.25 7 11.33 7H8.67C7.75 7 7 6.25 7 5.33V5H4c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-1-6v6H3V9h14zm-8 2c0-.55-.22-1-.5-1s-.5.45-.5 1 .22 1 .5 1 .5-.45.5-1zm3 0c0-.55-.22-1-.5-1s-.5.45-.5 1 .22 1 .5 1 .5-.45.5-1zm-5.96 1.21c.92.48 2.34.79 3.96.79s3.04-.31 3.96-.79c-.21 1-1.89 1.79-3.96 1.79s-3.75-.79-3.96-1.79z'; break; case 'networking': - title = 'Networking'; path = 'M18 13h1c.55 0 1 .45 1 1.01v2.98c0 .56-.45 1.01-1 1.01h-4c-.55 0-1-.45-1-1.01v-2.98c0-.56.45-1.01 1-1.01h1v-2h-5v2h1c.55 0 1 .45 1 1.01v2.98c0 .56-.45 1.01-1 1.01H8c-.55 0-1-.45-1-1.01v-2.98c0-.56.45-1.01 1-1.01h1v-2H4v2h1c.55 0 1 .45 1 1.01v2.98C6 17.55 5.55 18 5 18H1c-.55 0-1-.45-1-1.01v-2.98C0 13.45.45 13 1 13h1v-2c0-1.1.9-2 2-2h5V7H8c-.55 0-1-.45-1-1.01V3.01C7 2.45 7.45 2 8 2h4c.55 0 1 .45 1 1.01v2.98C13 6.55 12.55 7 12 7h-1v2h5c1.1 0 2 .9 2 2v2z'; break; case 'no-alt': - title = 'No Alt'; path = 'M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z'; break; case 'no': - title = 'No'; path = 'M12.12 10l3.53 3.53-2.12 2.12L10 12.12l-3.54 3.54-2.12-2.12L7.88 10 4.34 6.46l2.12-2.12L10 7.88l3.54-3.53 2.12 2.12z'; break; case 'palmtree': - title = 'Palmtree'; path = 'M8.58 2.39c.32 0 .59.05.81.14 1.25.55 1.69 2.24 1.7 3.97.59-.82 2.15-2.29 3.41-2.29s2.94.73 3.53 3.55c-1.13-.65-2.42-.94-3.65-.94-1.26 0-2.45.32-3.29.89.4-.11.86-.16 1.33-.16 1.39 0 2.9.45 3.4 1.31.68 1.16.47 3.38-.76 4.14-.14-2.1-1.69-4.12-3.47-4.12-.44 0-.88.12-1.33.38C8 10.62 7 14.56 7 19H2c0-5.53 4.21-9.65 7.68-10.79-.56-.09-1.17-.15-1.82-.15C6.1 8.06 4.05 8.5 2 10c.76-2.96 2.78-4.1 4.69-4.1 1.25 0 2.45.5 3.2 1.29-.66-2.24-2.49-2.86-4.08-2.86-.8 0-1.55.16-2.05.35.91-1.29 3.31-2.29 4.82-2.29zM13 11.5c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5.67 1.5 1.5 1.5 1.5-.67 1.5-1.5z'; break; case 'paperclip': - title = 'Paperclip'; path = 'M17.05 2.7c1.93 1.94 1.93 5.13 0 7.07L10 16.84c-1.88 1.89-4.91 1.93-6.86.15-.06-.05-.13-.09-.19-.15-1.93-1.94-1.93-5.12 0-7.07l4.94-4.95c.91-.92 2.28-1.1 3.39-.58.3.15.59.33.83.58 1.17 1.17 1.17 3.07 0 4.24l-4.93 4.95c-.39.39-1.02.39-1.41 0s-.39-1.02 0-1.41l4.93-4.95c.39-.39.39-1.02 0-1.41-.38-.39-1.02-.39-1.4 0l-4.94 4.95c-.91.92-1.1 2.29-.57 3.4.14.3.32.59.57.84s.54.43.84.57c1.11.53 2.47.35 3.39-.57l7.05-7.07c1.16-1.17 1.16-3.08 0-4.25-.56-.55-1.28-.83-2-.86-.08.01-.16.01-.24 0-.22-.03-.43-.11-.6-.27-.39-.4-.38-1.05.02-1.45.16-.16.36-.24.56-.28.14-.02.27-.01.4.02 1.19.06 2.36.52 3.27 1.43z'; break; case 'performance': - title = 'Performance'; path = 'M3.76 17.01h12.48C17.34 15.63 18 13.9 18 12c0-4.41-3.58-8-8-8s-8 3.59-8 8c0 1.9.66 3.63 1.76 5.01zM9 6c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1zM4 8c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1zm4.52 3.4c.84-.83 6.51-3.5 6.51-3.5s-2.66 5.68-3.49 6.51c-.84.84-2.18.84-3.02 0-.83-.83-.83-2.18 0-3.01zM3 13c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1zm6 0c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1zm6 0c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1z'; break; case 'phone': - title = 'Phone'; path = 'M12.06 6l-.21-.2c-.52-.54-.43-.79.08-1.3l2.72-2.75c.81-.82.96-1.21 1.73-.48l.21.2zm.53.45l4.4-4.4c.7.94 2.34 3.47 1.53 5.34-.73 1.67-1.09 1.75-2 3-1.85 2.11-4.18 4.37-6 6.07-1.26.91-1.31 1.33-3 2-1.8.71-4.4-.89-5.38-1.56l4.4-4.4 1.18 1.62c.34.46 1.2-.06 1.8-.66 1.04-1.05 3.18-3.18 4-4.07.59-.59 1.12-1.45.66-1.8zM1.57 16.5l-.21-.21c-.68-.74-.29-.9.52-1.7l2.74-2.72c.51-.49.75-.6 1.27-.11l.2.21z'; break; case 'playlist-audio': - title = 'Playlist Audio'; path = 'M17 3V1H2v2h15zm0 4V5H2v2h15zm-7 4V9H2v2h8zm7.45-1.96l-6 1.12c-.16.02-.19.03-.29.13-.11.09-.16.22-.16.37v4.59c-.29-.13-.66-.14-.93-.14-.54 0-1 .19-1.38.57s-.56.84-.56 1.38c0 .53.18.99.56 1.37s.84.57 1.38.57c.49 0 .92-.16 1.29-.48s.59-.71.65-1.19v-4.95L17 11.27v3.48c-.29-.13-.56-.19-.83-.19-.54 0-1.11.19-1.49.57-.38.37-.57.83-.57 1.37s.19.99.57 1.37.84.57 1.38.57c.53 0 .99-.19 1.37-.57s.57-.83.57-1.37V9.6c0-.16-.05-.3-.16-.41-.11-.12-.24-.17-.39-.15zM8 15v-2H2v2h6zm-2 4v-2H2v2h4z'; break; case 'playlist-video': - title = 'Playlist Video'; path = 'M17 3V1H2v2h15zm0 4V5H2v2h15zM6 11V9H2v2h4zm2-2h9c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1H8c-.55 0-1-.45-1-1v-8c0-.55.45-1 1-1zm3 7l3.33-2L11 12v4zm-5-1v-2H2v2h4zm0 4v-2H2v2h4z'; break; case 'plus-alt': - title = 'Plus Alt'; path = 'M15.8 4.2c3.2 3.21 3.2 8.39 0 11.6-3.21 3.2-8.39 3.2-11.6 0C1 12.59 1 7.41 4.2 4.2 7.41 1 12.59 1 15.8 4.2zm-4.3 11.3v-4h4v-3h-4v-4h-3v4h-4v3h4v4h3z'; break; case 'plus-light': - title = 'Plus Light'; path = 'M17 9v2h-6v6H9v-6H3V9h6V3h2v6h6z'; break; case 'plus': - title = 'Plus'; path = 'M17 7v3h-5v5H9v-5H4V7h5V2h3v5h5z'; break; case 'portfolio': - title = 'Portfolio'; path = 'M4 5H.78c-.37 0-.74.32-.69.84l1.56 9.99S3.5 8.47 3.86 6.7c.11-.53.61-.7.98-.7H10s-.7-2.08-.77-2.31C9.11 3.25 8.89 3 8.45 3H5.14c-.36 0-.7.23-.8.64C4.25 4.04 4 5 4 5zm4.88 0h-4s.42-1 .87-1h2.13c.48 0 1 1 1 1zM2.67 16.25c-.31.47-.76.75-1.26.75h15.73c.54 0 .92-.31 1.03-.83.44-2.19 1.68-8.44 1.68-8.44.07-.5-.3-.73-.62-.73H16V5.53c0-.16-.26-.53-.66-.53h-3.76c-.52 0-.87.58-.87.58L10 7H5.59c-.32 0-.63.19-.69.5 0 0-1.59 6.7-1.72 7.33-.07.37-.22.99-.51 1.42zM15.38 7H11s.58-1 1.13-1h2.29c.71 0 .96 1 .96 1z'; break; case 'post-status': - title = 'Post Status'; path = 'M14 6c0 1.86-1.28 3.41-3 3.86V16c0 1-2 2-2 2V9.86c-1.72-.45-3-2-3-3.86 0-2.21 1.79-4 4-4s4 1.79 4 4zM8 5c0 .55.45 1 1 1s1-.45 1-1-.45-1-1-1-1 .45-1 1z'; break; case 'pressthis': - title = 'Pressthis'; path = 'M14.76 1C16.55 1 18 2.46 18 4.25c0 1.78-1.45 3.24-3.24 3.24-.23 0-.47-.03-.7-.08L13 8.47V19H2V4h9.54c.13-2 1.52-3 3.22-3zm0 5.49C16 6.49 17 5.48 17 4.25 17 3.01 16 2 14.76 2s-2.24 1.01-2.24 2.25c0 .37.1.72.27 1.03L9.57 8.5c-.28.28-1.77 2.22-1.5 2.49.02.03.06.04.1.04.49 0 2.14-1.28 2.39-1.53l3.24-3.24c.29.14.61.23.96.23z'; break; case 'products': - title = 'Products'; path = 'M17 8h1v11H2V8h1V6c0-2.76 2.24-5 5-5 .71 0 1.39.15 2 .42.61-.27 1.29-.42 2-.42 2.76 0 5 2.24 5 5v2zM5 6v2h2V6c0-1.13.39-2.16 1.02-3H8C6.35 3 5 4.35 5 6zm10 2V6c0-1.65-1.35-3-3-3h-.02c.63.84 1.02 1.87 1.02 3v2h2zm-5-4.22C9.39 4.33 9 5.12 9 6v2h2V6c0-.88-.39-1.67-1-2.22z'; break; case 'randomize': - title = 'Randomize'; path = 'M18 6.01L14 9V7h-4l-5 8H2v-2h2l5-8h5V3zM2 5h3l1.15 2.17-1.12 1.8L4 7H2V5zm16 9.01L14 17v-2H9l-1.15-2.17 1.12-1.8L10 13h4v-2z'; break; case 'redo': - title = 'Redo'; path = 'M8 5h5V2l6 4-6 4V7H8c-2.2 0-4 1.8-4 4s1.8 4 4 4h5v2H8c-3.3 0-6-2.7-6-6s2.7-6 6-6z'; break; case 'rss': - title = 'Rss'; path = 'M14.92 18H18C18 9.32 10.82 2.25 2 2.25v3.02c7.12 0 12.92 5.71 12.92 12.73zm-5.44 0h3.08C12.56 12.27 7.82 7.6 2 7.6v3.02c2 0 3.87.77 5.29 2.16C8.7 14.17 9.48 16.03 9.48 18zm-5.35-.02c1.17 0 2.13-.93 2.13-2.09 0-1.15-.96-2.09-2.13-2.09-1.18 0-2.13.94-2.13 2.09 0 1.16.95 2.09 2.13 2.09z'; break; case 'saved': - title = 'Saved'; path = 'M15.3 5.3l-6.8 6.8-2.8-2.8-1.4 1.4 4.2 4.2 8.2-8.2'; break; case 'schedule': - title = 'Schedule'; path = 'M2 2h16v4H2V2zm0 10V8h4v4H2zm6-2V8h4v2H8zm6 3V8h4v5h-4zm-6 5v-6h4v6H8zm-6 0v-4h4v4H2zm12 0v-3h4v3h-4z'; break; case 'screenoptions': - title = 'Screenoptions'; path = 'M9 9V3H3v6h6zm8 0V3h-6v6h6zm-8 8v-6H3v6h6zm8 0v-6h-6v6h6z'; break; case 'search': - title = 'Search'; path = 'M12.14 4.18c1.87 1.87 2.11 4.75.72 6.89.12.1.22.21.36.31.2.16.47.36.81.59.34.24.56.39.66.47.42.31.73.57.94.78.32.32.6.65.84 1 .25.35.44.69.59 1.04.14.35.21.68.18 1-.02.32-.14.59-.36.81s-.49.34-.81.36c-.31.02-.65-.04-.99-.19-.35-.14-.7-.34-1.04-.59-.35-.24-.68-.52-1-.84-.21-.21-.47-.52-.77-.93-.1-.13-.25-.35-.47-.66-.22-.32-.4-.57-.56-.78-.16-.2-.29-.35-.44-.5-2.07 1.09-4.69.76-6.44-.98-2.14-2.15-2.14-5.64 0-7.78 2.15-2.15 5.63-2.15 7.78 0zm-1.41 6.36c1.36-1.37 1.36-3.58 0-4.95-1.37-1.37-3.59-1.37-4.95 0-1.37 1.37-1.37 3.58 0 4.95 1.36 1.37 3.58 1.37 4.95 0z'; break; case 'share-alt': - title = 'Share Alt'; path = 'M16.22 5.8c.47.69.29 1.62-.4 2.08-.69.47-1.62.29-2.08-.4-.16-.24-.35-.46-.55-.67-.21-.2-.43-.39-.67-.55s-.5-.3-.77-.41c-.27-.12-.55-.21-.84-.26-.59-.13-1.23-.13-1.82-.01-.29.06-.57.15-.84.27-.27.11-.53.25-.77.41s-.46.35-.66.55c-.21.21-.4.43-.56.67s-.3.5-.41.76c-.01.02-.01.03-.01.04-.1.24-.17.48-.23.72H1V6h2.66c.04-.07.07-.13.12-.2.27-.4.57-.77.91-1.11s.72-.65 1.11-.91c.4-.27.83-.51 1.28-.7s.93-.34 1.41-.43c.99-.21 2.03-.21 3.02 0 .48.09.96.24 1.41.43s.88.43 1.28.7c.39.26.77.57 1.11.91s.64.71.91 1.11zM12.5 10c0-1.38-1.12-2.5-2.5-2.5S7.5 8.62 7.5 10s1.12 2.5 2.5 2.5 2.5-1.12 2.5-2.5zm-8.72 4.2c-.47-.69-.29-1.62.4-2.09.69-.46 1.62-.28 2.08.41.16.24.35.46.55.67.21.2.43.39.67.55s.5.3.77.41c.27.12.55.2.84.26.59.13 1.23.12 1.82 0 .29-.06.57-.14.84-.26.27-.11.53-.25.77-.41s.46-.35.66-.55c.21-.21.4-.44.56-.67.16-.25.3-.5.41-.76.01-.02.01-.03.01-.04.1-.24.17-.48.23-.72H19v3h-2.66c-.04.06-.07.13-.12.2-.27.4-.57.77-.91 1.11s-.72.65-1.11.91c-.4.27-.83.51-1.28.7s-.93.33-1.41.43c-.99.21-2.03.21-3.02 0-.48-.1-.96-.24-1.41-.43s-.88-.43-1.28-.7c-.39-.26-.77-.57-1.11-.91s-.64-.71-.91-1.11z'; break; case 'share-alt2': - title = 'Share Alt2'; path = 'M18 8l-5 4V9.01c-2.58.06-4.88.45-7 2.99.29-3.57 2.66-5.66 7-5.94V3zM4 14h11v-2l2-1.6V16H2V5h9.43c-1.83.32-3.31 1-4.41 2H4v7z'; break; case 'share': - title = 'Share'; path = 'M14.5 12c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3c0-.24.03-.46.09-.69l-4.38-2.3c-.55.61-1.33.99-2.21.99-1.66 0-3-1.34-3-3s1.34-3 3-3c.88 0 1.66.39 2.21.99l4.38-2.3c-.06-.23-.09-.45-.09-.69 0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3c-.88 0-1.66-.39-2.21-.99l-4.38 2.3c.06.23.09.45.09.69s-.03.46-.09.69l4.38 2.3c.55-.61 1.33-.99 2.21-.99z'; break; case 'shield-alt': - title = 'Shield Alt'; path = 'M10 2s3 2 7 2c0 11-7 14-7 14S3 15 3 4c4 0 7-2 7-2z'; break; case 'shield': - title = 'Shield'; path = 'M10 2s3 2 7 2c0 11-7 14-7 14S3 15 3 4c4 0 7-2 7-2zm0 8h5s1-1 1-5c0 0-5-1-6-2v7H5c1 4 5 7 5 7v-7z'; break; case 'slides': - title = 'Slides'; path = 'M5 14V6h10v8H5zm-3-1V7h2v6H2zm4-6v6h8V7H6zm10 0h2v6h-2V7zm-3 2V8H7v1h6zm0 3v-2H7v2h6z'; break; case 'smartphone': - title = 'Smartphone'; path = 'M6 2h8c.55 0 1 .45 1 1v14c0 .55-.45 1-1 1H6c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm7 12V4H7v10h6zM8 5h4l-4 5V5z'; break; case 'smiley': - title = 'Smiley'; path = 'M7 5.2c1.1 0 2 .89 2 2 0 .37-.11.71-.28 1C8.72 8.2 8 8 7 8s-1.72.2-1.72.2c-.17-.29-.28-.63-.28-1 0-1.11.9-2 2-2zm6 0c1.11 0 2 .89 2 2 0 .37-.11.71-.28 1 0 0-.72-.2-1.72-.2s-1.72.2-1.72.2c-.17-.29-.28-.63-.28-1 0-1.11.89-2 2-2zm-3 13.7c3.72 0 7.03-2.36 8.23-5.88l-1.32-.46C15.9 15.52 13.12 17.5 10 17.5s-5.9-1.98-6.91-4.94l-1.32.46c1.2 3.52 4.51 5.88 8.23 5.88z'; break; case 'sort': - title = 'Sort'; path = 'M11 7H1l5 7zm-2 7h10l-5-7z'; break; case 'sos': - title = 'Sos'; path = 'M18 10c0-4.42-3.58-8-8-8s-8 3.58-8 8 3.58 8 8 8 8-3.58 8-8zM7.23 3.57L8.72 7.3c-.62.29-1.13.8-1.42 1.42L3.57 7.23c.71-1.64 2.02-2.95 3.66-3.66zm9.2 3.66L12.7 8.72c-.29-.62-.8-1.13-1.42-1.42l1.49-3.73c1.64.71 2.95 2.02 3.66 3.66zM10 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm-6.43.77l3.73-1.49c.29.62.8 1.13 1.42 1.42l-1.49 3.73c-1.64-.71-2.95-2.02-3.66-3.66zm9.2 3.66l-1.49-3.73c.62-.29 1.13-.8 1.42-1.42l3.73 1.49c-.71 1.64-2.02 2.95-3.66 3.66z'; break; case 'star-empty': - title = 'Star Empty'; path = 'M10 1L7 7l-6 .75 4.13 4.62L4 19l6-3 6 3-1.12-6.63L19 7.75 13 7zm0 2.24l2.34 4.69 4.65.58-3.18 3.56.87 5.15L10 14.88l-4.68 2.34.87-5.15-3.18-3.56 4.65-.58z'; break; case 'star-filled': - title = 'Star Filled'; path = 'M10 1l3 6 6 .75-4.12 4.62L16 19l-6-3-6 3 1.13-6.63L1 7.75 7 7z'; break; case 'star-half': - title = 'Star Half'; path = 'M10 1L7 7l-6 .75 4.13 4.62L4 19l6-3 6 3-1.12-6.63L19 7.75 13 7zm0 2.24l2.34 4.69 4.65.58-3.18 3.56.87 5.15L10 14.88V3.24z'; break; case 'sticky': - title = 'Sticky'; path = 'M5 3.61V1.04l8.99-.01-.01 2.58c-1.22.26-2.16 1.35-2.16 2.67v.5c.01 1.31.93 2.4 2.17 2.66l-.01 2.58h-3.41l-.01 2.57c0 .6-.47 4.41-1.06 4.41-.6 0-1.08-3.81-1.08-4.41v-2.56L5 12.02l.01-2.58c1.23-.25 2.15-1.35 2.15-2.66v-.5c0-1.31-.92-2.41-2.16-2.67z'; break; case 'store': - title = 'Store'; path = 'M1 10c.41.29.96.43 1.5.43.55 0 1.09-.14 1.5-.43.62-.46 1-1.17 1-2 0 .83.37 1.54 1 2 .41.29.96.43 1.5.43.55 0 1.09-.14 1.5-.43.62-.46 1-1.17 1-2 0 .83.37 1.54 1 2 .41.29.96.43 1.51.43.54 0 1.08-.14 1.49-.43.62-.46 1-1.17 1-2 0 .83.37 1.54 1 2 .41.29.96.43 1.5.43.55 0 1.09-.14 1.5-.43.63-.46 1-1.17 1-2V7l-3-7H4L0 7v1c0 .83.37 1.54 1 2zm2 8.99h5v-5h4v5h5v-7c-.37-.05-.72-.22-1-.43-.63-.45-1-.73-1-1.56 0 .83-.38 1.11-1 1.56-.41.3-.95.43-1.49.44-.55 0-1.1-.14-1.51-.44-.63-.45-1-.73-1-1.56 0 .83-.38 1.11-1 1.56-.41.3-.95.43-1.5.44-.54 0-1.09-.14-1.5-.44-.63-.45-1-.73-1-1.57 0 .84-.38 1.12-1 1.57-.29.21-.63.38-1 .44v6.99z'; break; case 'tablet': - title = 'Tablet'; path = 'M4 2h12c.55 0 1 .45 1 1v14c0 .55-.45 1-1 1H4c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm11 14V4H5v12h10zM6 5h6l-6 5V5z'; break; case 'tag': - title = 'Tag'; path = 'M11 2h7v7L8 19l-7-7zm3 6c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z'; break; case 'tagcloud': - title = 'Tagcloud'; path = 'M11 3v4H1V3h10zm8 0v4h-7V3h7zM7 8v3H1V8h6zm12 0v3H8V8h11zM9 12v2H1v-2h8zm10 0v2h-9v-2h9zM6 15v1H1v-1h5zm5 0v1H7v-1h4zm3 0v1h-2v-1h2zm5 0v1h-4v-1h4z'; break; case 'testimonial': - title = 'Testimonial'; path = 'M4 3h12c.55 0 1.02.2 1.41.59S18 4.45 18 5v7c0 .55-.2 1.02-.59 1.41S16.55 14 16 14h-1l-5 5v-5H4c-.55 0-1.02-.2-1.41-.59S2 12.55 2 12V5c0-.55.2-1.02.59-1.41S3.45 3 4 3zm11 2H4v1h11V5zm1 3H4v1h12V8zm-3 3H4v1h9v-1z'; break; case 'text': - title = 'Text'; path = 'M18 3v2H2V3h16zm-6 4v2H2V7h10zm6 0v2h-4V7h4zM8 11v2H2v-2h6zm10 0v2h-8v-2h8zm-4 4v2H2v-2h12z'; break; case 'thumbs-down': - title = 'Thumbs Down'; path = 'M7.28 18c-.15.02-.26-.02-.41-.07-.56-.19-.83-.79-.66-1.35.17-.55 1-3.04 1-3.58 0-.53-.75-1-1.35-1h-3c-.6 0-1-.4-1-1s2-7 2-7c.17-.39.55-1 1-1H14v9h-2.14c-.41.41-3.3 4.71-3.58 5.27-.21.41-.6.68-1 .73zM18 12h-2V3h2v9z'; break; case 'thumbs-up': - title = 'Thumbs Up'; path = 'M12.72 2c.15-.02.26.02.41.07.56.19.83.79.66 1.35-.17.55-1 3.04-1 3.58 0 .53.75 1 1.35 1h3c.6 0 1 .4 1 1s-2 7-2 7c-.17.39-.55 1-1 1H6V8h2.14c.41-.41 3.3-4.71 3.58-5.27.21-.41.6-.68 1-.73zM2 8h2v9H2V8z'; break; case 'tickets-alt': - title = 'Tickets Alt'; path = 'M20 6.38L18.99 9.2v-.01c-.52-.19-1.03-.16-1.53.08s-.85.62-1.04 1.14-.16 1.03.07 1.53c.24.5.62.84 1.15 1.03v.01l-1.01 2.82-15.06-5.38.99-2.79c.52.19 1.03.16 1.53-.08.5-.23.84-.61 1.03-1.13s.16-1.03-.08-1.53c-.23-.49-.61-.83-1.13-1.02L4.93 1zm-4.97 5.69l1.37-3.76c.12-.31.1-.65-.04-.95s-.39-.53-.7-.65L8.14 3.98c-.64-.23-1.37.12-1.6.74L5.17 8.48c-.24.65.1 1.37.74 1.6l7.52 2.74c.14.05.28.08.43.08.52 0 1-.33 1.17-.83zM7.97 4.45l7.51 2.73c.19.07.34.21.43.39.08.18.09.38.02.57l-1.37 3.76c-.13.38-.58.59-.96.45L6.09 9.61c-.39-.14-.59-.57-.45-.96l1.37-3.76c.1-.29.39-.49.7-.49.09 0 .17.02.26.05zm6.82 12.14c.35.27.75.41 1.2.41H16v3H0v-2.96c.55 0 1.03-.2 1.41-.59.39-.38.59-.86.59-1.41s-.2-1.02-.59-1.41-.86-.59-1.41-.59V10h1.05l-.28.8 2.87 1.02c-.51.16-.89.62-.89 1.18v4c0 .69.56 1.25 1.25 1.25h8c.69 0 1.25-.56 1.25-1.25v-1.75l.83.3c.12.43.36.78.71 1.04zM3.25 17v-4c0-.41.34-.75.75-.75h.83l7.92 2.83V17c0 .41-.34.75-.75.75H4c-.41 0-.75-.34-.75-.75z'; break; case 'tickets': - title = 'Tickets'; path = 'M20 5.38L18.99 8.2v-.01c-1.04-.37-2.19.18-2.57 1.22-.37 1.04.17 2.19 1.22 2.56v.01l-1.01 2.82L1.57 9.42l.99-2.79c1.04.38 2.19-.17 2.56-1.21s-.17-2.18-1.21-2.55L4.93 0zm-5.45 3.37c.74-2.08-.34-4.37-2.42-5.12-2.08-.74-4.37.35-5.11 2.42-.74 2.08.34 4.38 2.42 5.12 2.07.74 4.37-.35 5.11-2.42zm-2.56-4.74c.89.32 1.57.94 1.97 1.71-.01-.01-.02-.01-.04-.02-.33-.12-.67.09-.78.4-.1.28-.03.57.05.91.04.27.09.62-.06 1.04-.1.29-.33.58-.65 1l-.74 1.01.08-4.08.4.11c.19.04.26-.24.08-.29 0 0-.57-.15-.92-.28-.34-.12-.88-.36-.88-.36-.18-.08-.3.19-.12.27 0 0 .16.08.34.16l.01 1.63L9.2 9.18l.08-4.11c.2.06.4.11.4.11.19.04.26-.23.07-.29 0 0-.56-.15-.91-.28-.07-.02-.14-.05-.22-.08.93-.7 2.19-.94 3.37-.52zM7.4 6.19c.17-.49.44-.92.78-1.27l.04 5c-.94-.95-1.3-2.39-.82-3.73zm4.04 4.75l2.1-2.63c.37-.41.57-.77.69-1.12.05-.12.08-.24.11-.35.09.57.04 1.18-.17 1.77-.45 1.25-1.51 2.1-2.73 2.33zm-.7-3.22l.02 3.22c0 .02 0 .04.01.06-.4 0-.8-.07-1.2-.21-.33-.12-.63-.28-.9-.48zm1.24 6.08l2.1.75c.24.84 1 1.45 1.91 1.45H16v3H0v-2.96c1.1 0 2-.89 2-2 0-1.1-.9-2-2-2V9h1.05l-.28.8 4.28 1.52C4.4 12.03 4 12.97 4 14c0 2.21 1.79 4 4 4s4-1.79 4-4c0-.07-.02-.13-.02-.2zm-6.53-2.33l1.48.53c-.14.04-.15.27.03.28 0 0 .18.02.37.03l.56 1.54-.78 2.36-1.31-3.9c.21-.01.41-.03.41-.03.19-.02.17-.31-.02-.3 0 0-.59.05-.96.05-.07 0-.15 0-.23-.01.13-.2.28-.38.45-.55zM4.4 14c0-.52.12-1.02.32-1.46l1.71 4.7C5.23 16.65 4.4 15.42 4.4 14zm4.19-1.41l1.72.62c.07.17.12.37.12.61 0 .31-.12.66-.28 1.16l-.35 1.2zM11.6 14c0 1.33-.72 2.49-1.79 3.11l1.1-3.18c.06-.17.1-.31.14-.46l.52.19c.02.11.03.22.03.34zm-4.62 3.45l1.08-3.14 1.11 3.03c.01.02.01.04.02.05-.37.13-.77.21-1.19.21-.35 0-.69-.06-1.02-.15z'; break; case 'translation': - title = 'Translation'; path = 'M11 7H9.49c-.63 0-1.25.3-1.59.7L7 5H4.13l-2.39 7h1.69l.74-2H7v4H2c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h7c1.1 0 2 .9 2 2v2zM6.51 9H4.49l1-2.93zM10 8h7c1.1 0 2 .9 2 2v7c0 1.1-.9 2-2 2h-7c-1.1 0-2-.9-2-2v-7c0-1.1.9-2 2-2zm7.25 5v-1.08h-3.17V9.75h-1.16v2.17H9.75V13h1.28c.11.85.56 1.85 1.28 2.62-.87.36-1.89.62-2.31.62-.01.02.22.97.2 1.46.84 0 2.21-.5 3.28-1.15 1.09.65 2.48 1.15 3.34 1.15-.02-.49.2-1.44.2-1.46-.43 0-1.49-.27-2.38-.63.7-.77 1.14-1.77 1.25-2.61h1.36zm-3.81 1.93c-.5-.46-.85-1.13-1.01-1.93h2.09c-.17.8-.51 1.47-1 1.93l-.04.03s-.03-.02-.04-.03z'; break; case 'trash': - title = 'Trash'; path = 'M12 4h3c.55 0 1 .45 1 1v1H3V5c0-.55.45-1 1-1h3c.23-1.14 1.29-2 2.5-2s2.27.86 2.5 2zM8 4h3c-.21-.58-.85-1-1.5-1S8.21 3.42 8 4zM4 7h11v10c0 .55-.45 1-1 1H5c-.55 0-1-.45-1-1V7zm3 9V9H6v7h1zm3 0V9H9v7h1zm3 0V9h-1v7h1z'; break; case 'twitter': - title = 'Twitter'; path = 'M18.94 4.46c-.49.73-1.11 1.38-1.83 1.9.01.15.01.31.01.47 0 4.85-3.69 10.44-10.43 10.44-2.07 0-4-.61-5.63-1.65.29.03.58.05.88.05 1.72 0 3.3-.59 4.55-1.57-1.6-.03-2.95-1.09-3.42-2.55.22.04.45.07.69.07.33 0 .66-.05.96-.13-1.67-.34-2.94-1.82-2.94-3.6v-.04c.5.27 1.06.44 1.66.46-.98-.66-1.63-1.78-1.63-3.06 0-.67.18-1.3.5-1.84 1.81 2.22 4.51 3.68 7.56 3.83-.06-.27-.1-.55-.1-.84 0-2.02 1.65-3.66 3.67-3.66 1.06 0 2.01.44 2.68 1.16.83-.17 1.62-.47 2.33-.89-.28.85-.86 1.57-1.62 2.02.75-.08 1.45-.28 2.11-.57z'; break; case 'undo': - title = 'Undo'; path = 'M12 5H7V2L1 6l6 4V7h5c2.2 0 4 1.8 4 4s-1.8 4-4 4H7v2h5c3.3 0 6-2.7 6-6s-2.7-6-6-6z'; break; case 'universal-access-alt': - title = 'Universal Access Alt'; path = 'M19 10c0-4.97-4.03-9-9-9s-9 4.03-9 9 4.03 9 9 9 9-4.03 9-9zm-9-7.4c.83 0 1.5.67 1.5 1.5s-.67 1.51-1.5 1.51c-.82 0-1.5-.68-1.5-1.51s.68-1.5 1.5-1.5zM3.4 7.36c0-.65 6.6-.76 6.6-.76s6.6.11 6.6.76-4.47 1.4-4.47 1.4 1.69 8.14 1.06 8.38c-.62.24-3.19-5.19-3.19-5.19s-2.56 5.43-3.18 5.19c-.63-.24 1.06-8.38 1.06-8.38S3.4 8.01 3.4 7.36z'; break; case 'universal-access': - title = 'Universal Access'; path = 'M10 2.6c.83 0 1.5.67 1.5 1.5s-.67 1.51-1.5 1.51c-.82 0-1.5-.68-1.5-1.51s.68-1.5 1.5-1.5zM3.4 7.36c0-.65 6.6-.76 6.6-.76s6.6.11 6.6.76-4.47 1.4-4.47 1.4 1.69 8.14 1.06 8.38c-.62.24-3.19-5.19-3.19-5.19s-2.56 5.43-3.18 5.19c-.63-.24 1.06-8.38 1.06-8.38S3.4 8.01 3.4 7.36z'; break; case 'unlock': - title = 'Unlock'; path = 'M12 9V6c0-1.1-.9-2-2-2s-2 .9-2 2H6c0-2.21 1.79-4 4-4s4 1.79 4 4v3h1c.55 0 1 .45 1 1v7c0 .55-.45 1-1 1H5c-.55 0-1-.45-1-1v-7c0-.55.45-1 1-1h7zm-1 7l-.36-2.15c.51-.24.86-.75.86-1.35 0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5c0 .6.35 1.11.86 1.35L9 16h2z'; break; case 'update': - title = 'Update'; path = 'M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z'; break; case 'upload': - title = 'Upload'; path = 'M8 14V8H5l5-6 5 6h-3v6H8zm-2 2v-6H4v8h12.01v-8H14v6H6z'; break; case 'vault': - title = 'Vault'; path = 'M18 17V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14c0 .55.45 1 1 1h14c.55 0 1-.45 1-1zm-1 0H3V3h14v14zM4.75 4h10.5c.41 0 .75.34.75.75V6h-1v3h1v2h-1v3h1v1.25c0 .41-.34.75-.75.75H4.75c-.41 0-.75-.34-.75-.75V4.75c0-.41.34-.75.75-.75zM13 10c0-2.21-1.79-4-4-4s-4 1.79-4 4 1.79 4 4 4 4-1.79 4-4zM9 7l.77 1.15C10.49 8.46 11 9.17 11 10c0 1.1-.9 2-2 2s-2-.9-2-2c0-.83.51-1.54 1.23-1.85z'; break; case 'video-alt': - title = 'Video Alt'; path = 'M8 5c0-.55-.45-1-1-1H2c-.55 0-1 .45-1 1 0 .57.49 1 1 1h5c.55 0 1-.45 1-1zm6 5l4-4v10l-4-4v-2zm-1 4V8c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h8c.55 0 1-.45 1-1z'; break; case 'video-alt2': - title = 'Video Alt2'; path = 'M12 13V7c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2zm1-2.5l6 4.5V5l-6 4.5v1z'; break; case 'video-alt3': - title = 'Video Alt3'; path = 'M19 15V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2zM8 14V6l6 4z'; break; case 'visibility': - title = 'Visibility'; path = 'M19.7 9.4C17.7 6 14 3.9 10 3.9S2.3 6 .3 9.4L0 10l.3.6c2 3.4 5.7 5.5 9.7 5.5s7.7-2.1 9.7-5.5l.3-.6-.3-.6zM10 14.1c-3.1 0-6-1.6-7.7-4.1C3.6 8 5.7 6.6 8 6.1c-.9.6-1.5 1.7-1.5 2.9 0 1.9 1.6 3.5 3.5 3.5s3.5-1.6 3.5-3.5c0-1.2-.6-2.3-1.5-2.9 2.3.5 4.4 1.9 5.7 3.9-1.7 2.5-4.6 4.1-7.7 4.1z'; break; case 'warning': - title = 'Warning'; path = 'M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z'; break; case 'welcome-add-page': - title = 'Welcome Add Page'; path = 'M17 7V4h-2V2h-3v1H3v15h11V9h1V7h2zm-1-2v1h-2v2h-1V6h-2V5h2V3h1v2h2z'; break; case 'welcome-comments': - title = 'Welcome Comments'; path = 'M5 2h10c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2h-2l-5 5v-5H5c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2zm8.5 8.5L11 8l2.5-2.5-1-1L10 7 7.5 4.5l-1 1L9 8l-2.5 2.5 1 1L10 9l2.5 2.5z'; break; case 'welcome-learn-more': - title = 'Welcome Learn More'; path = 'M10 10L2.54 7.02 3 18H1l.48-11.41L0 6l10-4 10 4zm0-5c-.55 0-1 .22-1 .5s.45.5 1 .5 1-.22 1-.5-.45-.5-1-.5zm0 6l5.57-2.23c.71.94 1.2 2.07 1.36 3.3-.3-.04-.61-.07-.93-.07-2.55 0-4.78 1.37-6 3.41C8.78 13.37 6.55 12 4 12c-.32 0-.63.03-.93.07.16-1.23.65-2.36 1.36-3.3z'; break; case 'welcome-view-site': - title = 'Welcome View Site'; path = 'M18 14V4c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h14c.55 0 1-.45 1-1zm-8-8c2.3 0 4.4 1.14 6 3-1.6 1.86-3.7 3-6 3s-4.4-1.14-6-3c1.6-1.86 3.7-3 6-3zm2 3c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm2 8h3v1H3v-1h3v-1h8v1z'; break; case 'welcome-widgets-menus': - title = 'Welcome Widgets Menus'; path = 'M19 16V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v13c0 .55.45 1 1 1h15c.55 0 1-.45 1-1zM4 4h13v4H4V4zm1 1v2h3V5H5zm4 0v2h3V5H9zm4 0v2h3V5h-3zm-8.5 5c.28 0 .5.22.5.5s-.22.5-.5.5-.5-.22-.5-.5.22-.5.5-.5zM6 10h4v1H6v-1zm6 0h5v5h-5v-5zm-7.5 2c.28 0 .5.22.5.5s-.22.5-.5.5-.5-.22-.5-.5.22-.5.5-.5zM6 12h4v1H6v-1zm7 0v2h3v-2h-3zm-8.5 2c.28 0 .5.22.5.5s-.22.5-.5.5-.5-.22-.5-.5.22-.5.5-.5zM6 14h4v1H6v-1z'; break; case 'welcome-write-blog': - title = 'Welcome Write Blog'; path = 'M16.89 1.2l1.41 1.41c.39.39.39 1.02 0 1.41L14 8.33V18H3V3h10.67l1.8-1.8c.4-.39 1.03-.4 1.42 0zm-5.66 8.48l5.37-5.36-1.42-1.42-5.36 5.37-.71 2.12z'; break; case 'wordpress-alt': - title = 'WordPress Alt'; path = 'M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z'; break; case 'wordpress': - title = 'WordPress'; path = 'M20 10c0-5.52-4.48-10-10-10S0 4.48 0 10s4.48 10 10 10 10-4.48 10-10zM10 1.01c4.97 0 8.99 4.02 8.99 8.99s-4.02 8.99-8.99 8.99S1.01 14.97 1.01 10 5.03 1.01 10 1.01zM8.01 14.82L4.96 6.61c.49-.03 1.05-.08 1.05-.08.43-.05.38-1.01-.06-.99 0 0-1.29.1-2.13.1-.15 0-.33 0-.52-.01 1.44-2.17 3.9-3.6 6.7-3.6 2.09 0 3.99.79 5.41 2.09-.6-.08-1.45.35-1.45 1.42 0 .66.38 1.22.79 1.88.31.54.5 1.22.5 2.21 0 1.34-1.27 4.48-1.27 4.48l-2.71-7.5c.48-.03.75-.16.75-.16.43-.05.38-1.1-.05-1.08 0 0-1.3.11-2.14.11-.78 0-2.11-.11-2.11-.11-.43-.02-.48 1.06-.05 1.08l.84.08 1.12 3.04zm6.02 2.15L16.64 10s.67-1.69.39-3.81c.63 1.14.94 2.42.94 3.81 0 2.96-1.56 5.58-3.94 6.97zM2.68 6.77L6.5 17.25c-2.67-1.3-4.47-4.08-4.47-7.25 0-1.16.2-2.23.65-3.23zm7.45 4.53l2.29 6.25c-.75.27-1.57.42-2.42.42-.72 0-1.41-.11-2.06-.3z'; break; case 'yes': - title = 'Yes'; path = 'M14.83 4.89l1.34.94-5.81 8.38H9.02L5.78 9.67l1.34-1.25 2.57 2.4z'; break; } @@ -999,7 +757,6 @@ export default class Dashicon extends wp.element.Component { return ( - { title ? { title } : null } ); From 351134de51866ea40b8dbc72cf63c0ffc3890978 Mon Sep 17 00:00:00 2001 From: Neil Anderson Date: Sat, 3 Jun 2017 15:11:09 +0100 Subject: [PATCH 010/103] Remove empty return value to avoid empty prop. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As suggested by @aduth in a previous PR, I’ve removed this (possibly unreachable) return and if none of the above cases are met, undefined will return which React can use to send an non-value prop, avoiding an empty aria-label attribute. --- editor/block-mover/mover-label.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/editor/block-mover/mover-label.js b/editor/block-mover/mover-label.js index 8ce648118649e..855a213af7afb 100644 --- a/editor/block-mover/mover-label.js +++ b/editor/block-mover/mover-label.js @@ -70,8 +70,6 @@ export function getBlockMoverLabel( selectedCount, { type, firstIndex, isFirst, // moving up, and is the first item return sprintf( __( 'Block "%s" is at the beginning of the content and can’t be moved up' ), type ); } - - return ''; } /** From 78f04bfaf5c87d320007dbf5f98e31519cb950b6 Mon Sep 17 00:00:00 2001 From: Joen Asmussen Date: Mon, 5 Jun 2017 12:05:19 +0200 Subject: [PATCH 011/103] Add some loading polish. --- blocks/library/embed/index.js | 5 ++++- blocks/library/embed/style.scss | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/blocks/library/embed/index.js b/blocks/library/embed/index.js index d260dfbf3a0ed..09ee2d1688874 100644 --- a/blocks/library/embed/index.js +++ b/blocks/library/embed/index.js @@ -158,7 +158,10 @@ registerBlockType( 'core/embed', { if ( loadingFromSavedBlock ) { // we're loading from a saved block, but haven't fetched the HTML yet... return ( -

{ url }

+
+ +

{ wp.i18n.__( 'Embedding...' ) }

+
); } diff --git a/blocks/library/embed/style.scss b/blocks/library/embed/style.scss index 7abbf2de16590..eb8c43841371c 100644 --- a/blocks/library/embed/style.scss +++ b/blocks/library/embed/style.scss @@ -18,6 +18,22 @@ height: 100%; } +.blocks-embed__loading { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 1em; + min-height: 200px; + text-align: center; + background: $light-gray-100; + + .blocks-embed__loading-text { + font-family: $default-font; + font-size: $default-font-size; + } +} + div[data-type="core/embed"] { &[data-align="left"], &[data-align="right"] { From a1d57897bdb234bd15f85af8f79f4ece3abcbe99 Mon Sep 17 00:00:00 2001 From: Nicola Heald Date: Mon, 5 Jun 2017 11:36:37 +0100 Subject: [PATCH 012/103] Single "fetching content" UI Use the same UI state for fetching new embedded content and loading saved embed blocks in a post --- blocks/library/embed/index.js | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/blocks/library/embed/index.js b/blocks/library/embed/index.js index 09ee2d1688874..e12e1f351625d 100644 --- a/blocks/library/embed/index.js +++ b/blocks/library/embed/index.js @@ -87,7 +87,6 @@ registerBlockType( 'core/embed', { type: '', error: false, fetching: false, - loadingFromSavedBlock: false, }; this.noPreview = [ 'facebook.com', @@ -99,7 +98,7 @@ registerBlockType( 'core/embed', { // if the url is already there, we're loading a saved block, so we need to render // a different thing, which is why this doesn't use 'fetching', as that // is for when the user is putting in a new url on the placeholder form - this.setState( { loadingFromSavedBlock: true } ); + this.setState( { fetching: true } ); this.doServerSideRender(); } } @@ -144,19 +143,18 @@ registerBlockType( 'core/embed', { } else { this.setState( { error: true } ); } - this.setState( { fetching: false, loadingFromSavedBlock: false } ); + this.setState( { fetching: false } ); } ); } ); } render() { - const { html, type, error, fetching, loadingFromSavedBlock } = this.state; + const { html, type, error, fetching } = this.state; const { url, caption } = this.props.attributes; const { setAttributes, focus, setFocus } = this.props; - if ( loadingFromSavedBlock ) { - // we're loading from a saved block, but haven't fetched the HTML yet... + if ( fetching ) { return (
@@ -174,14 +172,11 @@ registerBlockType( 'core/embed', { className="components-placeholder__input" placeholder={ wp.i18n.__( 'Enter URL to embed here...' ) } onChange={ ( event ) => setAttributes( { url: event.target.value } ) } /> - { ! fetching - ? - : - } + { error &&

{ wp.i18n.__( 'Sorry, we could not embed that content.' ) }

} From 88f7ef08785dd22b4dae50e500cc7180b35d7f7e Mon Sep 17 00:00:00 2001 From: Nicola Heald Date: Mon, 5 Jun 2017 12:52:58 +0100 Subject: [PATCH 013/103] Set the value of the url input so that errors can be corrected if embedding fails --- blocks/library/embed/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/blocks/library/embed/index.js b/blocks/library/embed/index.js index e12e1f351625d..10799cbf2d1a1 100644 --- a/blocks/library/embed/index.js +++ b/blocks/library/embed/index.js @@ -169,6 +169,7 @@ registerBlockType( 'core/embed', {
setAttributes( { url: event.target.value } ) } /> From 2465af528090ddaf2bec098ec35a548ab3a3ab9c Mon Sep 17 00:00:00 2001 From: Neil Anderson Date: Mon, 5 Jun 2017 19:17:18 +0100 Subject: [PATCH 014/103] Convert second argument to named arguments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As suggested by @aduth, I’ve converted the second argument in both functions to separate named arguments. I’m not as keen on this signature but it makes for much tidier documentation (as well as removing the need for custom type definitions). --- editor/block-mover/index.js | 22 ++--- editor/block-mover/mover-label.js | 48 ++++------ editor/block-mover/test/mover-label.js | 120 ++++++++++++++----------- 3 files changed, 97 insertions(+), 93 deletions(-) diff --git a/editor/block-mover/index.js b/editor/block-mover/index.js index a199032ba09ba..5a6ae7c914843 100644 --- a/editor/block-mover/index.js +++ b/editor/block-mover/index.js @@ -28,26 +28,28 @@ function BlockMover( { onMoveUp, onMoveDown, isFirst, isLast, uids, blockType, f className="editor-block-mover__control" onClick={ isFirst ? null : onMoveUp } icon="arrow-up-alt2" - label={ getBlockMoverLabel( uids.length, { - type: blockType && blockType.title, + label={ getBlockMoverLabel( + uids.length, + blockType && blockType.title, + firstIndex, isFirst, isLast, - firstIndex, - dir: -1, - } ) } + -1, + ) } aria-disabled={ isFirst } />
diff --git a/editor/block-mover/mover-label.js b/editor/block-mover/mover-label.js index 855a213af7afb..e44c9c0f97980 100644 --- a/editor/block-mover/mover-label.js +++ b/editor/block-mover/mover-label.js @@ -1,23 +1,3 @@ -/** - * @typedef blockMoverLabelOptions - * @property {string} type Block type - in the case of a single block, should - * define its 'type'. I.e. 'Text', 'Heading', 'Image' etc. - * @property {number} firstIndex The index (position - 1) of the first block selected. - * @property {boolean} isFirst This is the first block. - * @property {boolean} isLast This is the last block. - * @property {number} dir Direction of movement (> 0 is considered to be going - * down, < 0 is up). - */ - -/** - * @typedef multiBlockMoverLabelOptions - * @property {number} firstIndex The index (position - 1) of the first block selected. - * @property {boolean} isFirst This is the first block. - * @property {boolean} isLast This is the last block. - * @property {number} dir Direction of movement (> 0 is considered to be going - * down, < 0 is up). - */ - /** * Wordpress dependencies */ @@ -26,15 +6,21 @@ import { __, sprintf } from 'i18n'; /** * Return a label for the block movement controls depending on block position. * - * @param {number} selectedCount Number of blocks selected. - * @param {blockMoverLabelOptions} options Object options. - * @return {string} Label for the block movement controls. + * @param {number} selectedCount Number of blocks selected. + * @param {string} type Block type - in the case of a single block, should + * define its 'type'. I.e. 'Text', 'Heading', 'Image' etc. + * @param {number} firstIndex The index (position - 1) of the first block selected. + * @param {boolean} isFirst This is the first block. + * @param {boolean} isLast This is the last block. + * @param {number} dir Direction of movement (> 0 is considered to be going + * down, < 0 is up). + * @return {string} Label for the block movement controls. */ -export function getBlockMoverLabel( selectedCount, { type, firstIndex, isFirst, isLast, dir } ) { +export function getBlockMoverLabel( selectedCount, type, firstIndex, isFirst, isLast, dir ) { const position = ( firstIndex + 1 ); if ( selectedCount > 1 ) { - return getMultiBlockMoverLabel( selectedCount, { isFirst, isLast, firstIndex, dir } ); + return getMultiBlockMoverLabel( selectedCount, firstIndex, isFirst, isLast, dir ); } if ( isFirst && isLast ) { @@ -75,11 +61,15 @@ export function getBlockMoverLabel( selectedCount, { type, firstIndex, isFirst, /** * Return a label for the block movement controls depending on block position. * - * @param {number} selectedCount Number of blocks selected. - * @param {multiBlockMoverLabelOptions} options Object options. - * @return {string} Label for the block movement controls. + * @param {number} selectedCount Number of blocks selected. + * @param {number} firstIndex The index (position - 1) of the first block selected. + * @param {boolean} isFirst This is the first block. + * @param {boolean} isLast This is the last block. + * @param {number} dir Direction of movement (> 0 is considered to be going + * down, < 0 is up). + * @return {string} Label for the block movement controls. */ -export function getMultiBlockMoverLabel( selectedCount, { isFirst, isLast, firstIndex, dir } ) { +export function getMultiBlockMoverLabel( selectedCount, firstIndex, isFirst, isLast, dir ) { const position = ( firstIndex + 1 ); if ( dir < 0 && isFirst ) { diff --git a/editor/block-mover/test/mover-label.js b/editor/block-mover/test/mover-label.js index 09b16f3933e21..de33ad35557cb 100644 --- a/editor/block-mover/test/mover-label.js +++ b/editor/block-mover/test/mover-label.js @@ -9,65 +9,73 @@ import { expect } from 'chai'; import { getBlockMoverLabel, getMultiBlockMoverLabel } from '../mover-label'; describe( 'block mover', () => { + const dir_up = -1, + dir_down = 1; + describe( 'getBlockMoverLabel', () => { const type = 'TestType'; it( 'Should generate a title for the first item moving up', () => { - expect( getBlockMoverLabel( 1, { + expect( getBlockMoverLabel( + 1, type, - firstIndex: 0, - isFirst: true, - isLast: false, - dir: -1, - } ) ).to.equal( + 0, + true, + false, + dir_up, + ) ).to.equal( `Block "${ type }" is at the beginning of the content and can’t be moved up` ); } ); it( 'Should generate a title for the last item moving down', () => { - expect( getBlockMoverLabel( 1, { + expect( getBlockMoverLabel( + 1, type, - firstIndex: 3, - isFirst: false, - isLast: true, - dir: 1, - } ) ).to.equal( + 3, + false, + true, + dir_down, + ) ).to.equal( `Block "${ type }" is at the end of the content and can’t be moved down` ); } ); it( 'Should generate a title for the second item moving up', () => { - expect( getBlockMoverLabel( 1, { + expect( getBlockMoverLabel( + 1, type, - firstIndex: 1, - isFirst: false, - isLast: false, - dir: -1, - } ) ).to.equal( + 1, + false, + false, + dir_up, + ) ).to.equal( `Move "${ type }" block from position 2 up to position 1` ); } ); it( 'Should generate a title for the second item moving down', () => { - expect( getBlockMoverLabel( 1, { + expect( getBlockMoverLabel( + 1, type, - firstIndex: 1, - isFirst: false, - isLast: false, - dir: 1, - } ) ).to.equal( + 1, + false, + false, + dir_down, + ) ).to.equal( `Move "${ type }" block from position 2 down to position 3` ); } ); it( 'Should generate a title for the only item in the list', () => { - expect( getBlockMoverLabel( 1, { + expect( getBlockMoverLabel( + 1, type, - firstIndex: 0, - isFirst: true, - isLast: true, - dir: 1, - } ) ).to.equal( + 0, + true, + true, + dir_down, + ) ).to.equal( `Block "${ type }" is the only block, and cannot be moved` ); } ); @@ -75,45 +83,49 @@ describe( 'block mover', () => { describe( 'getMultiBlockMoverLabel', () => { it( 'Should generate a title moving multiple blocks up', () => { - expect( getMultiBlockMoverLabel( 4, { - firstIndex: 1, - isFirst: false, - isLast: true, - dir: -1, - } ) ).to.equal( + expect( getMultiBlockMoverLabel( + 4, + 1, + false, + true, + dir_up, + ) ).to.equal( 'Move 4 blocks from position 2 up by one place' ); } ); it( 'Should generate a title moving multiple blocks down', () => { - expect( getMultiBlockMoverLabel( 4, { - firstIndex: 0, - isFirst: true, - isLast: false, - dir: 1, - } ) ).to.equal( + expect( getMultiBlockMoverLabel( + 4, + 0, + true, + false, + dir_down, + ) ).to.equal( 'Move 4 blocks from position 1 down by one place' ); } ); it( 'Should generate a title for a selection of blocks at the top', () => { - expect( getMultiBlockMoverLabel( 4, { - firstIndex: 1, - isFirst: true, - isLast: true, - dir: -1, - } ) ).to.equal( + expect( getMultiBlockMoverLabel( + 4, + 1, + true, + true, + dir_up, + ) ).to.equal( 'Blocks cannot be moved up as they are already at the top' ); } ); it( 'Should generate a title for a selection of blocks at the bottom', () => { - expect( getMultiBlockMoverLabel( 4, { - firstIndex: 2, - isFirst: false, - isLast: true, - dir: 1, - } ) ).to.equal( + expect( getMultiBlockMoverLabel( + 4, + 2, + false, + true, + dir_down, + ) ).to.equal( 'Blocks cannot be moved down as they are already at the bottom' ); } ); From 73edbd4af067eab5d2730383c63c15e1356ec13e Mon Sep 17 00:00:00 2001 From: Neil Anderson Date: Mon, 5 Jun 2017 20:31:39 +0100 Subject: [PATCH 015/103] Improve translation placeholders, add notes --- editor/block-mover/mover-label.js | 39 ++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/editor/block-mover/mover-label.js b/editor/block-mover/mover-label.js index e44c9c0f97980..65db9b512213a 100644 --- a/editor/block-mover/mover-label.js +++ b/editor/block-mover/mover-label.js @@ -24,36 +24,43 @@ export function getBlockMoverLabel( selectedCount, type, firstIndex, isFirst, is } if ( isFirst && isLast ) { + // translators: %s: Type of block (i.e. Text, Image etc) return sprintf( __( 'Block "%s" is the only block, and cannot be moved' ), type ); } if ( dir > 0 && ! isLast ) { // moving down return sprintf( - __( 'Move "%s" block from position %s down to position %s' ), - type, - position, - ( position + 1 ) + __( 'Move "%(type)s" block from position %(position)d down to position %(newPosition)d' ), + { + type, + position, + newPosition: ( position + 1 ), + } ); } if ( dir > 0 && isLast ) { // moving down, and is the last item + // translators: %s: Type of block (i.e. Text, Image etc) return sprintf( __( 'Block "%s" is at the end of the content and can’t be moved down' ), type ); } if ( dir < 0 && ! isFirst ) { // moving up return sprintf( - __( 'Move "%s" block from position %s up to position %s' ), - type, - position, - ( position - 1 ) + __( 'Move "%(type)s" block from position %(position)d up to position %(newPosition)d' ), + { + type, + position, + newPosition: ( position - 1 ), + } ); } if ( dir < 0 && isFirst ) { // moving up, and is the first item + // translators: %s: Type of block (i.e. Text, Image etc) return sprintf( __( 'Block "%s" is at the beginning of the content and can’t be moved up' ), type ); } } @@ -82,17 +89,21 @@ export function getMultiBlockMoverLabel( selectedCount, firstIndex, isFirst, isL if ( dir < 0 && ! isFirst ) { return sprintf( - __( 'Move %s blocks from position %s up by one place' ), - selectedCount, - position + __( 'Move %(selectedCount)d blocks from position %(position)d up by one place' ), + { + selectedCount, + position, + } ); } if ( dir > 0 && ! isLast ) { return sprintf( - __( 'Move %s blocks from position %s down by one place' ), - selectedCount, - position + __( 'Move %(selectedCount)d blocks from position %(position)s down by one place' ), + { + selectedCount, + position, + } ); } } From 9b21b6fb8a150e262290c27a53b177e61687a95f Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Mon, 5 Jun 2017 16:15:28 -0400 Subject: [PATCH 016/103] Remove title assertion in tests --- components/dashicon/test/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/components/dashicon/test/index.js b/components/dashicon/test/index.js index 331050c3e0fa3..ccb9dd12caa39 100644 --- a/components/dashicon/test/index.js +++ b/components/dashicon/test/index.js @@ -25,7 +25,6 @@ describe( 'Dashicon', () => { it( 'should render a SVG icon element when a matching icon is provided', () => { const dashicon = shallow( ); - expect( dashicon.find( 'title' ).text() ).to.equal( 'WordPress' ); expect( dashicon.hasClass( 'dashicon' ) ).to.be.true(); expect( dashicon.hasClass( 'dashicons-wordpress' ) ).to.be.true(); expect( dashicon.type() ).to.equal( 'svg' ); From ccbb343c7f0861d80131d9f1c8a9d25f2f2e4071 Mon Sep 17 00:00:00 2001 From: Ella Date: Mon, 5 Jun 2017 23:10:15 +0200 Subject: [PATCH 017/103] Disable drag on images to enable multi-select (#1014) --- editor/modes/visual-editor/block.js | 1 + 1 file changed, 1 insertion(+) diff --git a/editor/modes/visual-editor/block.js b/editor/modes/visual-editor/block.js index 1bba881de5602..b12675a45fdf4 100644 --- a/editor/modes/visual-editor/block.js +++ b/editor/modes/visual-editor/block.js @@ -260,6 +260,7 @@ class VisualEditorBlock extends wp.element.Component { onKeyPress={ this.maybeStartTyping } onFocus={ onSelect } onClick={ onSelect } + onDragStart={ ( event ) => event.preventDefault() } > Date: Mon, 5 Jun 2017 22:16:30 -0400 Subject: [PATCH 018/103] Install `phpcs` using Composer (#1022) --- .editorconfig | 2 +- .travis.yml | 5 +- composer.json | 11 ++++ composer.lock | 132 ++++++++++++++++++++++++++++++++++++++ docs/coding-guidelines.md | 29 ++------- vendor/.gitignore | 3 +- 6 files changed, 152 insertions(+), 30 deletions(-) create mode 100644 composer.json create mode 100644 composer.lock diff --git a/.editorconfig b/.editorconfig index 17c30a62d6a66..446a47c3b3982 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,7 +8,7 @@ charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true -[{package.json,.travis.yml}] +[{*.json,*.yml}] indent_style = space indent_size = 2 diff --git a/.travis.yml b/.travis.yml index dae3085e5b875..ed39d172b4c0f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,8 +44,7 @@ before_script: fi - | if [[ "$TRAVISCI" == "phpcs" ]] ; then - composer global require wp-coding-standards/wpcs - phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs + composer install fi script: @@ -58,7 +57,7 @@ script: fi - | if [[ "$TRAVISCI" == "phpcs" ]] ; then - phpcs + ./vendor/bin/phpcs fi - | if [[ "$TRAVISCI" == "js" ]] ; then diff --git a/composer.json b/composer.json new file mode 100644 index 0000000000000..6634332cbd38b --- /dev/null +++ b/composer.json @@ -0,0 +1,11 @@ +{ + "require-dev": { + "squizlabs/php_codesniffer": "2.9.x", + "wp-coding-standards/wpcs": "^0.11.0" + }, + "scripts": { + "post-install-cmd": [ + "phpcs --config-set installed_paths ../../wp-coding-standards/wpcs/" + ] + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000000000..1739cdc97a899 --- /dev/null +++ b/composer.lock @@ -0,0 +1,132 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "content-hash": "1a5dd686e18346fa4dbc564b7b90f4a1", + "packages": [], + "packages-dev": [ + { + "name": "squizlabs/php_codesniffer", + "version": "2.9.1", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dcbed1074f8244661eecddfc2a675430d8d33f62", + "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "bin": [ + "scripts/phpcs", + "scripts/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "classmap": [ + "CodeSniffer.php", + "CodeSniffer/CLI.php", + "CodeSniffer/Exception.php", + "CodeSniffer/File.php", + "CodeSniffer/Fixer.php", + "CodeSniffer/Report.php", + "CodeSniffer/Reporting.php", + "CodeSniffer/Sniff.php", + "CodeSniffer/Tokens.php", + "CodeSniffer/Reports/", + "CodeSniffer/Tokenizers/", + "CodeSniffer/DocGenerators/", + "CodeSniffer/Standards/AbstractPatternSniff.php", + "CodeSniffer/Standards/AbstractScopeSniff.php", + "CodeSniffer/Standards/AbstractVariableSniff.php", + "CodeSniffer/Standards/IncorrectPatternException.php", + "CodeSniffer/Standards/Generic/Sniffs/", + "CodeSniffer/Standards/MySource/Sniffs/", + "CodeSniffer/Standards/PEAR/Sniffs/", + "CodeSniffer/Standards/PSR1/Sniffs/", + "CodeSniffer/Standards/PSR2/Sniffs/", + "CodeSniffer/Standards/Squiz/Sniffs/", + "CodeSniffer/Standards/Zend/Sniffs/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "http://www.squizlabs.com/php-codesniffer", + "keywords": [ + "phpcs", + "standards" + ], + "time": "2017-05-22T02:43:20+00:00" + }, + { + "name": "wp-coding-standards/wpcs", + "version": "0.11.0", + "source": { + "type": "git", + "url": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git", + "reference": "407e4b85f547a5251185f89ceae6599917343388" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/zipball/407e4b85f547a5251185f89ceae6599917343388", + "reference": "407e4b85f547a5251185f89ceae6599917343388", + "shasum": "" + }, + "require": { + "squizlabs/php_codesniffer": "^2.8.1" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Contributors", + "homepage": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions", + "keywords": [ + "phpcs", + "standards", + "wordpress" + ], + "time": "2017-03-20T23:17:58+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/docs/coding-guidelines.md b/docs/coding-guidelines.md index d52c747d43c04..3bc74b444c4ce 100644 --- a/docs/coding-guidelines.md +++ b/docs/coding-guidelines.md @@ -92,28 +92,7 @@ When making any changes to the PHP code in this project, it's recommended to install and run `phpcs` on your computer. This is a step in our Travis CI build as well, but it is better to catch errors locally. -You will need to install `phpcs` version 2.9.x, because the 3.x versions are -not yet compatible with the WordPress coding standards. For more information see -[this issue](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/718). - -The easiest way to get `phpcs` is to download the .phar archive from the latest -2.9.x release on GitHub: -[PHP\_CodeSniffer releases](https://github.com/squizlabs/PHP_CodeSniffer/releases). - -For example: - -```sh -wget \ - https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.1/phpcs.phar \ - -O ~/bin/phpcs -chmod +x ~/bin/phpcs -``` - -(If `~/bin` is not in your `$PATH`, pick another directory that is.) - -Then you must install the `WordPress-Coding-Standards` repository and tell -`phpcs` where it lives. See instructions here: - -https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards#standalone - -You should now be able to run `phpcs` from the root directory of this project. +The easiest way to do this is using `composer`. +[Install `composer`](https://getcomposer.org/download/) +on your computer, then run `composer install`. This will install `phpcs` and +`WordPress-Coding-Standards` which you can the run via `vendor/bin/phpcs`. diff --git a/vendor/.gitignore b/vendor/.gitignore index a6c7c2852d068..d6b7ef32c8478 100644 --- a/vendor/.gitignore +++ b/vendor/.gitignore @@ -1 +1,2 @@ -*.js +* +!.gitignore From 0e0bc757338b0d77ee21b7b8970c506a0e412f5a Mon Sep 17 00:00:00 2001 From: James Johnson Date: Tue, 6 Jun 2017 16:54:31 +1000 Subject: [PATCH 019/103] Implement toolbar dividers --- blocks/library/freeform/freeform-block.js | 1 + components/toolbar/index.js | 1 + components/toolbar/style.scss | 17 +++++++++++++++++ 3 files changed, 19 insertions(+) diff --git a/blocks/library/freeform/freeform-block.js b/blocks/library/freeform/freeform-block.js index 05ad3cae02ab1..d756a8607af71 100644 --- a/blocks/library/freeform/freeform-block.js +++ b/blocks/library/freeform/freeform-block.js @@ -45,6 +45,7 @@ const FREEFORM_CONTROLS = [ title: wp.i18n.__( 'Convert to ordered' ), }, { + showDivider: true, id: 'bold', icon: 'editor-bold', title: wp.i18n.__( 'Bold' ), diff --git a/components/toolbar/index.js b/components/toolbar/index.js index 785c11336b548..25a4ec0b32909 100644 --- a/components/toolbar/index.js +++ b/components/toolbar/index.js @@ -28,6 +28,7 @@ function Toolbar( { controls, focus } ) { } } className={ classNames( 'components-toolbar__control', { 'is-active': control.isActive, + 'show-divider': control.showDivider, } ) } aria-pressed={ control.isActive } focus={ focus && ! index } diff --git a/components/toolbar/style.scss b/components/toolbar/style.scss index b2f35f25e27c1..b4261eb61e661 100644 --- a/components/toolbar/style.scss +++ b/components/toolbar/style.scss @@ -64,6 +64,23 @@ // compensate for making the button hit area include the visual spacing .components-toolbar__control.components-button + .components-toolbar__control.components-button { margin-left: -3px; + + &.show-divider { + margin-left: 0px; + position: relative; + } + + &.show-divider:before { + display: inline-block; + content: ''; + box-sizing: content-box; + background-color: $light-gray-500; + position: absolute; + top: 6px; + left: 0px; + width: 1px; + height: $icon-button-size - 12px; + } } .components-toolbar__control .dashicon { From dc26f4b166f3125b3836b4b9d87f50a5becda29e Mon Sep 17 00:00:00 2001 From: Joen Asmussen Date: Tue, 6 Jun 2017 09:33:29 +0200 Subject: [PATCH 020/103] Add aria-hidden and role to SVGs. This PR adds aria-hidden="true" and role="img" to the SVG files inside the dashicons component, addressing feedback here: https://github.com/WordPress/gutenberg/pull/1012#issuecomment-306137552 Upstream PR: https://github.com/WordPress/dashicons/pull/194 CC: @afercia --- components/dashicon/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/dashicon/index.js b/components/dashicon/index.js index 4b441ec9a487a..f970ba57de325 100644 --- a/components/dashicon/index.js +++ b/components/dashicon/index.js @@ -756,7 +756,7 @@ export default class Dashicon extends wp.element.Component { const iconClass = [ 'dashicon', 'dashicons-' + icon, className ].filter( Boolean ).join( ' ' ); return ( - + ); From debbf3c196508782dc684cb464d836cfc06e1577 Mon Sep 17 00:00:00 2001 From: Joen Asmussen Date: Tue, 6 Jun 2017 10:03:53 +0200 Subject: [PATCH 021/103] Polish the divider a tad. --- components/toolbar/style.scss | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/components/toolbar/style.scss b/components/toolbar/style.scss index b4261eb61e661..493f114c8c6f7 100644 --- a/components/toolbar/style.scss +++ b/components/toolbar/style.scss @@ -66,8 +66,9 @@ margin-left: -3px; &.show-divider { - margin-left: 0px; + margin-left: 6px; position: relative; + overflow: visible; } &.show-divider:before { @@ -76,10 +77,10 @@ box-sizing: content-box; background-color: $light-gray-500; position: absolute; - top: 6px; - left: 0px; + top: 8px; + left: -3px; width: 1px; - height: $icon-button-size - 12px; + height: $icon-button-size - 16px; } } From 89898cb3c35d6a55e0410be9629c63f6281ba5ed Mon Sep 17 00:00:00 2001 From: Joen Asmussen Date: Tue, 6 Jun 2017 11:36:47 +0200 Subject: [PATCH 022/103] Improve responsiveness of block toolbar. This starts work on #724. --- editor/block-switcher/style.scss | 6 +++++- editor/modes/visual-editor/style.scss | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/editor/block-switcher/style.scss b/editor/block-switcher/style.scss index 322a69a66200d..cade93664e0ed 100644 --- a/editor/block-switcher/style.scss +++ b/editor/block-switcher/style.scss @@ -2,10 +2,14 @@ border: 1px solid $light-gray-500; box-shadow: $shadow-popover; background-color: $white; - margin-right: 10px; font-family: $default-font; font-size: $default-font-size; line-height: $default-line-height; + margin-right: -1px; + + @include break-small() { + margin-right: $item-spacing; + } } .editor-block-switcher__toggle { diff --git a/editor/modes/visual-editor/style.scss b/editor/modes/visual-editor/style.scss index ff1a0a3da33d3..02ab04ba784df 100644 --- a/editor/modes/visual-editor/style.scss +++ b/editor/modes/visual-editor/style.scss @@ -114,7 +114,11 @@ .editor-visual-editor__block-controls .components-toolbar { display: inline-flex; - margin-right: $item-spacing; + margin-right: -1px; + + @include break-small() { + margin-right: $item-spacing; + } } .editor-visual-editor__block-controls .editor-block-switcher { From d77ed4a1d31846e51d788fbf27267b177d79618b Mon Sep 17 00:00:00 2001 From: Joen Asmussen Date: Tue, 6 Jun 2017 11:44:40 +0200 Subject: [PATCH 023/103] Sticky the editor header on mobile. --- editor/header/style.scss | 5 ++++- editor/modes/visual-editor/style.scss | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/editor/header/style.scss b/editor/header/style.scss index 3d60028847719..6251ba5dae434 100644 --- a/editor/header/style.scss +++ b/editor/header/style.scss @@ -7,11 +7,14 @@ flex-direction: row; align-items: center; z-index: z-index( '.editor-header' ); - top: $admin-bar-height-big; left: 0; right: 0; + top: 0; + position: sticky; + @include break-small() { + top: $admin-bar-height-big; position: fixed; } diff --git a/editor/modes/visual-editor/style.scss b/editor/modes/visual-editor/style.scss index 02ab04ba784df..a72c49a0fdd0d 100644 --- a/editor/modes/visual-editor/style.scss +++ b/editor/modes/visual-editor/style.scss @@ -90,7 +90,11 @@ width: 0; white-space: nowrap; - top: $header-height + $admin-bar-height-big + $item-spacing; + top: $header-height + $item-spacing; + + @include break-small() { + top: $header-height + $admin-bar-height-big + $item-spacing; + } @include break-medium() { top: $header-height + $admin-bar-height + $item-spacing; From 3f65f3c632646c2cee83639c6efc1455fea217bf Mon Sep 17 00:00:00 2001 From: Ella Date: Tue, 6 Jun 2017 12:01:36 +0200 Subject: [PATCH 024/103] Fix onFocus and onClick handling on block wrapper (#1024) Fixes: * Multi-select flickering. * Horizontal rule selection. * Input and text area that cannot be focussed immediately (fixes #1005). * Tabbing into block without inputs (focus on block wrapper did not select block). --- blocks/editable/index.js | 7 +++-- editor/modes/visual-editor/block.js | 44 +++++++++++++++++++++-------- 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/blocks/editable/index.js b/blocks/editable/index.js index b0645495cec1f..382a466afee7b 100644 --- a/blocks/editable/index.js +++ b/blocks/editable/index.js @@ -137,7 +137,10 @@ export default class Editable extends wp.element.Component { empty: ! content || ! content.length, } ); - if ( this.props.focus.collapsed !== collapsed ) { + if ( + this.props.focus && this.props.onFocus && + this.props.focus.collapsed !== collapsed + ) { this.props.onFocus( { ...this.props.focus, collapsed, @@ -344,7 +347,7 @@ export default class Editable extends wp.element.Component { } componentDidUpdate( prevProps ) { - if ( this.props.focus !== prevProps.focus ) { + if ( ! isEqual( this.props.focus, prevProps.focus ) ) { this.updateFocus(); } diff --git a/editor/modes/visual-editor/block.js b/editor/modes/visual-editor/block.js index b12675a45fdf4..dc8ebad9a62a0 100644 --- a/editor/modes/visual-editor/block.js +++ b/editor/modes/visual-editor/block.js @@ -52,6 +52,10 @@ class VisualEditorBlock extends wp.element.Component { this.maybeStartTyping = this.maybeStartTyping.bind( this ); this.removeOrDeselect = this.removeOrDeselect.bind( this ); this.mergeBlocks = this.mergeBlocks.bind( this ); + this.onFocus = this.onFocus.bind( this ); + this.onPointerDown = this.onPointerDown.bind( this ); + this.onPointerMove = this.onPointerMove.bind( this ); + this.onPointerUp = this.onPointerUp.bind( this ); this.previousOffset = null; } @@ -171,6 +175,26 @@ class VisualEditorBlock extends wp.element.Component { } } + onFocus( event ) { + if ( event.target === this.node ) { + this.props.onSelect(); + } + } + + onPointerDown() { + this.props.onSelect(); + this.props.onSelectionStart(); + } + + onPointerMove() { + this.props.onSelectionChange(); + this.maybeHover(); + } + + onPointerUp() { + this.props.onSelectionEnd(); + } + render() { const { block, selectedBlocks } = this.props; const blockType = wp.blocks.getBlockType( block.name ); @@ -199,7 +223,7 @@ class VisualEditorBlock extends wp.element.Component { 'is-hovered': isHovered, } ); - const { onSelect, onMouseLeave, onFocus, onInsertAfter } = this.props; + const { onMouseLeave, onFocus, onInsertAfter } = this.props; // Determine whether the block has props to apply to the wrapper. let wrapperProps; @@ -213,15 +237,13 @@ class VisualEditorBlock extends wp.element.Component {
{ - this.props.onSelectionChange(); - this.maybeHover(); - } } - onTouchMove={ this.props.onSelectionChange } - onMouseUp={ this.props.onSelectionEnd } - onTouchEnd={ this.props.onSelectionEnd } + onFocus={ this.onFocus } + onMouseDown={ this.onPointerDown } + onTouchStart={ this.onPointerDown } + onMouseMove={ this.onPointerMove } + onTouchMove={ this.onPointerMove } + onMouseUp={ this.onPointerUp } + onTouchEnd={ this.onPointerUp } onMouseEnter={ this.maybeHover } onMouseLeave={ onMouseLeave } className={ className } @@ -258,8 +280,6 @@ class VisualEditorBlock extends wp.element.Component { ) }
event.preventDefault() } > Date: Tue, 6 Jun 2017 12:38:13 +0100 Subject: [PATCH 025/103] More fixes... * Elipsis character instead of ... * Removed cuteness from parsed url variable name * Moved "no preview" list of domains into top level const * Used lodash include * Fixed the www. removing regex * Fixed order of imports --- blocks/library/embed/index.js | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/blocks/library/embed/index.js b/blocks/library/embed/index.js index 10799cbf2d1a1..f64589493cfe6 100644 --- a/blocks/library/embed/index.js +++ b/blocks/library/embed/index.js @@ -1,3 +1,9 @@ +/** + * External dependencies + */ +import { parse } from 'url'; +import { includes } from 'lodash'; + /** * WordPress dependencies */ @@ -10,13 +16,10 @@ import './style.scss'; import { registerBlockType, query } from '../../api'; import Editable from '../../editable'; -/** - * External dependencies - */ -import { parse } from 'url'; - const { attr, children } = query; +const HOSTS_NO_PREVIEWS = [ 'facebook.com' ]; + /** * Returns an attribute setter with behavior that if the target value is * already the assigned attribute value, it will be set to undefined. @@ -81,16 +84,12 @@ registerBlockType( 'core/embed', { constructor() { super( ...arguments ); this.doServerSideRender = this.doServerSideRender.bind( this ); - this.isPreviewBlacklisted = this.isPreviewBlacklisted.bind( this ); this.state = { html: '', type: '', error: false, fetching: false, }; - this.noPreview = [ - 'facebook.com', - ]; } componentWillMount() { @@ -158,7 +157,7 @@ registerBlockType( 'core/embed', { return (
-

{ wp.i18n.__( 'Embedding...' ) }

+

{ wp.i18n.__( 'Embedding…' ) }

); } @@ -171,7 +170,7 @@ registerBlockType( 'core/embed', { type="url" value={ url || '' } className="components-placeholder__input" - placeholder={ wp.i18n.__( 'Enter URL to embed here...' ) } + placeholder={ wp.i18n.__( 'Enter URL to embed here…' ) } onChange={ ( event ) => setAttributes( { url: event.target.value } ) } /> + ); + } +} + +export default ClipboardButton; diff --git a/components/index.js b/components/index.js index 5a7e9876cf3f8..ea4e2e69515ac 100644 --- a/components/index.js +++ b/components/index.js @@ -1,4 +1,5 @@ export { default as Button } from './button'; +export { default as ClipboardButton } from './clipboard-button'; export { default as Dashicon } from './dashicon'; export { default as FormToggle } from './form-toggle'; export { default as FormTokenField } from './form-token-field'; diff --git a/editor/post-permalink/index.js b/editor/post-permalink/index.js new file mode 100644 index 0000000000000..565c1daaffa35 --- /dev/null +++ b/editor/post-permalink/index.js @@ -0,0 +1,42 @@ +/** + * External dependencies + */ +import { connect } from 'react-redux'; + +/** + * WordPress dependencies + */ +import { __ } from 'i18n'; +import { Dashicon, ClipboardButton } from 'components'; + +/** + * Internal Dependencies + */ +import './style.scss'; +import { getEditedPostAttribute } from '../selectors'; + +function PostPermalink( { link } ) { + if ( ! link ) { + return null; + } + + return ( +
+ + { __( 'Permalink:' ) } + { link } + + { __( 'Copy' ) } + +
+ ); +} + +export default connect( + ( state ) => { + return { + link: getEditedPostAttribute( state, 'link' ), + }; + } +)( PostPermalink ); + diff --git a/editor/post-permalink/style.scss b/editor/post-permalink/style.scss new file mode 100644 index 0000000000000..bbc76a22d65e7 --- /dev/null +++ b/editor/post-permalink/style.scss @@ -0,0 +1,31 @@ +.editor-post-permalink { + display: inline-flex; + align-items: center; + position: absolute; + top: -25px; + left: 10px; + box-shadow: $shadow-popover; + border: 1px solid $light-gray-500; + background: $white; + padding: 5px; + font-family: $default-font; + font-size: 13px; +} + +.editor-post-permalink__label { + margin: 0 10px; +} + +.editor-post-permalink__link { + color: $dark-gray-200; + text-decoration: underline; + margin-right: 10px; + width: 300px; + overflow: hidden; + position: relative; + white-space: nowrap; + + &:after { + @include long-content-fade( $size: 20% ); + } +} diff --git a/editor/post-title/index.js b/editor/post-title/index.js index 5cefb34b07d8f..2b49ae74ed445 100644 --- a/editor/post-title/index.js +++ b/editor/post-title/index.js @@ -3,10 +3,12 @@ */ import { connect } from 'react-redux'; import Textarea from 'react-autosize-textarea'; +import clickOutside from 'react-click-outside'; /** * WordPress dependencies */ +import { Component } from 'element'; import { ENTER } from 'utils/keycodes'; /** @@ -15,35 +17,64 @@ import { ENTER } from 'utils/keycodes'; import './style.scss'; import { getEditedPostTitle } from '../selectors'; import { editPost } from '../actions'; +import PostPermalink from '../post-permalink'; /** * Constants */ const REGEXP_NEWLINES = /[\r\n]+/g; -function PostTitle( { title, onUpdate } ) { - const onChange = ( event ) => { +class PostTitle extends Component { + constructor() { + super( ...arguments ); + this.onChange = this.onChange.bind( this ); + this.onFocus = this.onFocus.bind( this ); + this.state = { + isFocused: false, + }; + } + + onChange( event ) { const newTitle = event.target.value.replace( REGEXP_NEWLINES, ' ' ); - onUpdate( newTitle ); - }; + this.props.onUpdate( newTitle ); + } + + onFocus() { + this.setState( { isFocused: true } ); + } - const onKeyDown = ( event ) => { + handleClickOutside() { + this.setState( { isFocused: false } ); + } + + onKeyDown( event ) { if ( event.keyCode === ENTER ) { event.preventDefault(); } - }; - - return ( -

-