@wordpress/block-library 9.0.4 → 9.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/block/index.js +5 -1
- package/build/block/index.js.map +1 -1
- package/build/image/image.js +11 -13
- package/build/image/image.js.map +1 -1
- package/build/list-item/hooks/use-merge.js +8 -1
- package/build/list-item/hooks/use-merge.js.map +1 -1
- package/build/media-text/edit.js +3 -2
- package/build/media-text/edit.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +3 -2
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/utils/hooks.js +12 -0
- package/build/utils/hooks.js.map +1 -1
- package/build-module/block/index.js +5 -1
- package/build-module/block/index.js.map +1 -1
- package/build-module/image/image.js +6 -8
- package/build-module/image/image.js.map +1 -1
- package/build-module/list-item/hooks/use-merge.js +8 -1
- package/build-module/list-item/hooks/use-merge.js.map +1 -1
- package/build-module/media-text/edit.js +3 -2
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +3 -2
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/utils/hooks.js +11 -0
- package/build-module/utils/hooks.js.map +1 -1
- package/build-style/post-comments-form/style-rtl.css +11 -10
- package/build-style/post-comments-form/style.css +11 -10
- package/build-style/social-links/style-rtl.css +91 -91
- package/build-style/social-links/style.css +91 -91
- package/build-style/style-rtl.css +102 -101
- package/build-style/style.css +102 -101
- package/package.json +6 -6
- package/src/block/block.json +5 -1
- package/src/image/image.js +12 -9
- package/src/image/index.php +26 -5
- package/src/list-item/hooks/use-merge.js +19 -5
- package/src/media-text/edit.js +3 -2
- package/src/post-comments-form/style.scss +15 -12
- package/src/query/edit/inspector-controls/index.js +3 -2
- package/src/social-links/style.scss +2 -2
- package/src/utils/hooks.js +14 -0
- package/build/utils/constants.js +0 -15
- package/build/utils/constants.js.map +0 -1
- package/build-module/utils/constants.js +0 -9
- package/build-module/utils/constants.js.map +0 -1
- package/src/utils/constants.js +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PanelBody","TextControl","SelectControl","RangeControl","ToggleControl","Notice","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","__","privateApis","blockEditorPrivateApis","debounce","useEffect","useState","useCallback","OrderControl","AuthorControl","ParentControl","TaxonomyControls","StickyControl","EnhancedPaginationControl","CreateNewPostLink","unlock","usePostTypes","useIsPostTypeHierarchical","useAllowedControls","isControlAllowed","useTaxonomies","TOOLSPANEL_DROPDOWNMENU_PROPS","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","BlockInfo","QueryInspectorControls","props","attributes","setQuery","setDisplayLayout","setAttributes","clientId","query","displayLayout","enhancedPagination","order","orderBy","author","authorIds","postType","sticky","inherit","taxQuery","parents","allowedControls","showSticky","setShowSticky","postTypesTaxonomiesMap","postTypesSelectOptions","taxonomies","isPostTypeHierarchical","onPostTypeChange","newValue","updateQuery","supportedTaxonomies","updatedTaxQuery","Object","entries","reduce","accumulator","taxonomySlug","terms","includes","keys","length","undefined","querySearch","setQuerySearch","search","onChangeDebounced","cancel","showInheritControl","showPostTypeControl","showColumnsControl","showOrderControl","showStickyControl","showSettingsPanel","showTaxControl","showAuthorControl","showSearchControl","showParentControl","showFiltersPanel","children","title","__nextHasNoMarginBottom","label","help","checked","onChange","value","options","columns","min","max","Math","status","isDismissible","className","resetAll","dropdownMenuProps","hasValue","values","some","onDeselect"],"sources":["@wordpress/block-library/src/query/edit/inspector-controls/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPanelBody,\n\tTextControl,\n\tSelectControl,\n\tRangeControl,\n\tToggleControl,\n\tNotice,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { debounce } from '@wordpress/compose';\nimport { useEffect, useState, useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport OrderControl from './order-control';\nimport AuthorControl from './author-control';\nimport ParentControl from './parent-control';\nimport { TaxonomyControls } from './taxonomy-controls';\nimport StickyControl from './sticky-control';\nimport EnhancedPaginationControl from './enhanced-pagination-control';\nimport CreateNewPostLink from './create-new-post-link';\nimport { unlock } from '../../../lock-unlock';\nimport {\n\tusePostTypes,\n\tuseIsPostTypeHierarchical,\n\tuseAllowedControls,\n\tisControlAllowed,\n\tuseTaxonomies,\n} from '../../utils';\nimport { TOOLSPANEL_DROPDOWNMENU_PROPS } from '../../../utils/constants';\n\nconst { BlockInfo } = unlock( blockEditorPrivateApis );\n\nexport default function QueryInspectorControls( props ) {\n\tconst { attributes, setQuery, setDisplayLayout, setAttributes, clientId } =\n\t\tprops;\n\tconst { query, displayLayout, enhancedPagination } = attributes;\n\tconst {\n\t\torder,\n\t\torderBy,\n\t\tauthor: authorIds,\n\t\tpostType,\n\t\tsticky,\n\t\tinherit,\n\t\ttaxQuery,\n\t\tparents,\n\t} = query;\n\tconst allowedControls = useAllowedControls( attributes );\n\tconst [ showSticky, setShowSticky ] = useState( postType === 'post' );\n\tconst { postTypesTaxonomiesMap, postTypesSelectOptions } = usePostTypes();\n\tconst taxonomies = useTaxonomies( postType );\n\tconst isPostTypeHierarchical = useIsPostTypeHierarchical( postType );\n\tuseEffect( () => {\n\t\tsetShowSticky( postType === 'post' );\n\t}, [ postType ] );\n\tconst onPostTypeChange = ( newValue ) => {\n\t\tconst updateQuery = { postType: newValue };\n\t\t// We need to dynamically update the `taxQuery` property,\n\t\t// by removing any not supported taxonomy from the query.\n\t\tconst supportedTaxonomies = postTypesTaxonomiesMap[ newValue ];\n\t\tconst updatedTaxQuery = Object.entries( taxQuery || {} ).reduce(\n\t\t\t( accumulator, [ taxonomySlug, terms ] ) => {\n\t\t\t\tif ( supportedTaxonomies.includes( taxonomySlug ) ) {\n\t\t\t\t\taccumulator[ taxonomySlug ] = terms;\n\t\t\t\t}\n\t\t\t\treturn accumulator;\n\t\t\t},\n\t\t\t{}\n\t\t);\n\t\tupdateQuery.taxQuery = !! Object.keys( updatedTaxQuery ).length\n\t\t\t? updatedTaxQuery\n\t\t\t: undefined;\n\n\t\tif ( newValue !== 'post' ) {\n\t\t\tupdateQuery.sticky = '';\n\t\t}\n\t\t// We need to reset `parents` because they are tied to each post type.\n\t\tupdateQuery.parents = [];\n\t\tsetQuery( updateQuery );\n\t};\n\tconst [ querySearch, setQuerySearch ] = useState( query.search );\n\tconst onChangeDebounced = useCallback(\n\t\tdebounce( () => {\n\t\t\tif ( query.search !== querySearch ) {\n\t\t\t\tsetQuery( { search: querySearch } );\n\t\t\t}\n\t\t}, 250 ),\n\t\t[ querySearch, query.search ]\n\t);\n\tuseEffect( () => {\n\t\tonChangeDebounced();\n\t\treturn onChangeDebounced.cancel;\n\t}, [ querySearch, onChangeDebounced ] );\n\tconst showInheritControl = isControlAllowed( allowedControls, 'inherit' );\n\tconst showPostTypeControl =\n\t\t! inherit && isControlAllowed( allowedControls, 'postType' );\n\tconst showColumnsControl = false;\n\tconst showOrderControl =\n\t\t! inherit && isControlAllowed( allowedControls, 'order' );\n\tconst showStickyControl =\n\t\t! inherit &&\n\t\tshowSticky &&\n\t\tisControlAllowed( allowedControls, 'sticky' );\n\tconst showSettingsPanel =\n\t\tshowInheritControl ||\n\t\tshowPostTypeControl ||\n\t\tshowColumnsControl ||\n\t\tshowOrderControl ||\n\t\tshowStickyControl;\n\tconst showTaxControl =\n\t\t!! taxonomies?.length &&\n\t\tisControlAllowed( allowedControls, 'taxQuery' );\n\tconst showAuthorControl = isControlAllowed( allowedControls, 'author' );\n\tconst showSearchControl = isControlAllowed( allowedControls, 'search' );\n\tconst showParentControl =\n\t\tisControlAllowed( allowedControls, 'parents' ) &&\n\t\tisPostTypeHierarchical;\n\n\tconst showFiltersPanel =\n\t\tshowTaxControl ||\n\t\tshowAuthorControl ||\n\t\tshowSearchControl ||\n\t\tshowParentControl;\n\n\treturn (\n\t\t<>\n\t\t\t<BlockInfo>\n\t\t\t\t<CreateNewPostLink { ...props } />\n\t\t\t</BlockInfo>\n\t\t\t{ showSettingsPanel && (\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t{ showInheritControl && (\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Inherit query from template' ) }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'Toggle to use the global query context that is set with the current template, such as an archive or search. Disable to customize the settings independently.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tchecked={ !! inherit }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetQuery( { inherit: !! value } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showPostTypeControl && (\n\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\toptions={ postTypesSelectOptions }\n\t\t\t\t\t\t\tvalue={ postType }\n\t\t\t\t\t\t\tlabel={ __( 'Post type' ) }\n\t\t\t\t\t\t\tonChange={ onPostTypeChange }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'WordPress contains different types of content and they are divided into collections called “Post types”. By default there are a few different ones such as blog posts and pages, but plugins could add more.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showColumnsControl && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Columns' ) }\n\t\t\t\t\t\t\t\tvalue={ displayLayout.columns }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\tsetDisplayLayout( {\n\t\t\t\t\t\t\t\t\t\tcolumns: value,\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmin={ 2 }\n\t\t\t\t\t\t\t\tmax={ Math.max( 6, displayLayout.columns ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ displayLayout.columns > 6 && (\n\t\t\t\t\t\t\t\t<Notice\n\t\t\t\t\t\t\t\t\tstatus=\"warning\"\n\t\t\t\t\t\t\t\t\tisDismissible={ false }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t'This column count exceeds the recommended amount and may cause visual breakage.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</Notice>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showOrderControl && (\n\t\t\t\t\t\t<OrderControl\n\t\t\t\t\t\t\t{ ...{ order, orderBy } }\n\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showStickyControl && (\n\t\t\t\t\t\t<StickyControl\n\t\t\t\t\t\t\tvalue={ sticky }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetQuery( { sticky: value } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t<EnhancedPaginationControl\n\t\t\t\t\t\tenhancedPagination={ enhancedPagination }\n\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t) }\n\t\t\t{ ! inherit && showFiltersPanel && (\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tclassName=\"block-library-query-toolspanel__filters\"\n\t\t\t\t\tlabel={ __( 'Filters' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tsetQuery( {\n\t\t\t\t\t\t\tauthor: '',\n\t\t\t\t\t\t\tparents: [],\n\t\t\t\t\t\t\tsearch: '',\n\t\t\t\t\t\t\ttaxQuery: null,\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tsetQuerySearch( '' );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ TOOLSPANEL_DROPDOWNMENU_PROPS }\n\t\t\t\t>\n\t\t\t\t\t{ showTaxControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\tlabel={ __( 'Taxonomies' ) }\n\t\t\t\t\t\t\thasValue={ () =>\n\t\t\t\t\t\t\t\tObject.values( taxQuery || {} ).some(\n\t\t\t\t\t\t\t\t\t( terms ) => !! terms.length\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { taxQuery: null } ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<TaxonomyControls\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t\tquery={ query }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showAuthorControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! authorIds }\n\t\t\t\t\t\t\tlabel={ __( 'Authors' ) }\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { author: '' } ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<AuthorControl\n\t\t\t\t\t\t\t\tvalue={ authorIds }\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showSearchControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! querySearch }\n\t\t\t\t\t\t\tlabel={ __( 'Keyword' ) }\n\t\t\t\t\t\t\tonDeselect={ () => setQuerySearch( '' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Keyword' ) }\n\t\t\t\t\t\t\t\tvalue={ querySearch }\n\t\t\t\t\t\t\t\tonChange={ setQuerySearch }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showParentControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! parents?.length }\n\t\t\t\t\t\t\tlabel={ __( 'Parents' ) }\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { parents: [] } ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ParentControl\n\t\t\t\t\t\t\t\tparents={ parents }\n\t\t\t\t\t\t\t\tpostType={ postType }\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanel>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,SAAS,EACTC,WAAW,EACXC,aAAa,EACbC,YAAY,EACZC,aAAa,EACbC,MAAM,EACNC,wBAAwB,IAAIC,UAAU,EACtCC,4BAA4B,IAAIC,cAAc,QACxC,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;AAC/E,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,SAAS,EAAEC,QAAQ,EAAEC,WAAW,QAAQ,oBAAoB;;AAErE;AACA;AACA;AACA,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,OAAOC,aA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,CAChB;IAAA,CACU,CACZ;EAAA,CACA,CAAC;AAEL","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["PanelBody","TextControl","SelectControl","RangeControl","ToggleControl","Notice","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","__","privateApis","blockEditorPrivateApis","debounce","useEffect","useState","useCallback","OrderControl","AuthorControl","ParentControl","TaxonomyControls","StickyControl","EnhancedPaginationControl","CreateNewPostLink","unlock","usePostTypes","useIsPostTypeHierarchical","useAllowedControls","isControlAllowed","useTaxonomies","useToolsPanelDropdownMenuProps","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","BlockInfo","QueryInspectorControls","props","attributes","setQuery","setDisplayLayout","setAttributes","clientId","query","displayLayout","enhancedPagination","order","orderBy","author","authorIds","postType","sticky","inherit","taxQuery","parents","allowedControls","showSticky","setShowSticky","postTypesTaxonomiesMap","postTypesSelectOptions","taxonomies","isPostTypeHierarchical","onPostTypeChange","newValue","updateQuery","supportedTaxonomies","updatedTaxQuery","Object","entries","reduce","accumulator","taxonomySlug","terms","includes","keys","length","undefined","querySearch","setQuerySearch","search","onChangeDebounced","cancel","showInheritControl","showPostTypeControl","showColumnsControl","showOrderControl","showStickyControl","showSettingsPanel","showTaxControl","showAuthorControl","showSearchControl","showParentControl","showFiltersPanel","dropdownMenuProps","children","title","__nextHasNoMarginBottom","label","help","checked","onChange","value","options","columns","min","max","Math","status","isDismissible","className","resetAll","hasValue","values","some","onDeselect"],"sources":["@wordpress/block-library/src/query/edit/inspector-controls/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPanelBody,\n\tTextControl,\n\tSelectControl,\n\tRangeControl,\n\tToggleControl,\n\tNotice,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { debounce } from '@wordpress/compose';\nimport { useEffect, useState, useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport OrderControl from './order-control';\nimport AuthorControl from './author-control';\nimport ParentControl from './parent-control';\nimport { TaxonomyControls } from './taxonomy-controls';\nimport StickyControl from './sticky-control';\nimport EnhancedPaginationControl from './enhanced-pagination-control';\nimport CreateNewPostLink from './create-new-post-link';\nimport { unlock } from '../../../lock-unlock';\nimport {\n\tusePostTypes,\n\tuseIsPostTypeHierarchical,\n\tuseAllowedControls,\n\tisControlAllowed,\n\tuseTaxonomies,\n} from '../../utils';\nimport { useToolsPanelDropdownMenuProps } from '../../../utils/hooks';\n\nconst { BlockInfo } = unlock( blockEditorPrivateApis );\n\nexport default function QueryInspectorControls( props ) {\n\tconst { attributes, setQuery, setDisplayLayout, setAttributes, clientId } =\n\t\tprops;\n\tconst { query, displayLayout, enhancedPagination } = attributes;\n\tconst {\n\t\torder,\n\t\torderBy,\n\t\tauthor: authorIds,\n\t\tpostType,\n\t\tsticky,\n\t\tinherit,\n\t\ttaxQuery,\n\t\tparents,\n\t} = query;\n\tconst allowedControls = useAllowedControls( attributes );\n\tconst [ showSticky, setShowSticky ] = useState( postType === 'post' );\n\tconst { postTypesTaxonomiesMap, postTypesSelectOptions } = usePostTypes();\n\tconst taxonomies = useTaxonomies( postType );\n\tconst isPostTypeHierarchical = useIsPostTypeHierarchical( postType );\n\tuseEffect( () => {\n\t\tsetShowSticky( postType === 'post' );\n\t}, [ postType ] );\n\tconst onPostTypeChange = ( newValue ) => {\n\t\tconst updateQuery = { postType: newValue };\n\t\t// We need to dynamically update the `taxQuery` property,\n\t\t// by removing any not supported taxonomy from the query.\n\t\tconst supportedTaxonomies = postTypesTaxonomiesMap[ newValue ];\n\t\tconst updatedTaxQuery = Object.entries( taxQuery || {} ).reduce(\n\t\t\t( accumulator, [ taxonomySlug, terms ] ) => {\n\t\t\t\tif ( supportedTaxonomies.includes( taxonomySlug ) ) {\n\t\t\t\t\taccumulator[ taxonomySlug ] = terms;\n\t\t\t\t}\n\t\t\t\treturn accumulator;\n\t\t\t},\n\t\t\t{}\n\t\t);\n\t\tupdateQuery.taxQuery = !! Object.keys( updatedTaxQuery ).length\n\t\t\t? updatedTaxQuery\n\t\t\t: undefined;\n\n\t\tif ( newValue !== 'post' ) {\n\t\t\tupdateQuery.sticky = '';\n\t\t}\n\t\t// We need to reset `parents` because they are tied to each post type.\n\t\tupdateQuery.parents = [];\n\t\tsetQuery( updateQuery );\n\t};\n\tconst [ querySearch, setQuerySearch ] = useState( query.search );\n\tconst onChangeDebounced = useCallback(\n\t\tdebounce( () => {\n\t\t\tif ( query.search !== querySearch ) {\n\t\t\t\tsetQuery( { search: querySearch } );\n\t\t\t}\n\t\t}, 250 ),\n\t\t[ querySearch, query.search ]\n\t);\n\tuseEffect( () => {\n\t\tonChangeDebounced();\n\t\treturn onChangeDebounced.cancel;\n\t}, [ querySearch, onChangeDebounced ] );\n\tconst showInheritControl = isControlAllowed( allowedControls, 'inherit' );\n\tconst showPostTypeControl =\n\t\t! inherit && isControlAllowed( allowedControls, 'postType' );\n\tconst showColumnsControl = false;\n\tconst showOrderControl =\n\t\t! inherit && isControlAllowed( allowedControls, 'order' );\n\tconst showStickyControl =\n\t\t! inherit &&\n\t\tshowSticky &&\n\t\tisControlAllowed( allowedControls, 'sticky' );\n\tconst showSettingsPanel =\n\t\tshowInheritControl ||\n\t\tshowPostTypeControl ||\n\t\tshowColumnsControl ||\n\t\tshowOrderControl ||\n\t\tshowStickyControl;\n\tconst showTaxControl =\n\t\t!! taxonomies?.length &&\n\t\tisControlAllowed( allowedControls, 'taxQuery' );\n\tconst showAuthorControl = isControlAllowed( allowedControls, 'author' );\n\tconst showSearchControl = isControlAllowed( allowedControls, 'search' );\n\tconst showParentControl =\n\t\tisControlAllowed( allowedControls, 'parents' ) &&\n\t\tisPostTypeHierarchical;\n\n\tconst showFiltersPanel =\n\t\tshowTaxControl ||\n\t\tshowAuthorControl ||\n\t\tshowSearchControl ||\n\t\tshowParentControl;\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\treturn (\n\t\t<>\n\t\t\t<BlockInfo>\n\t\t\t\t<CreateNewPostLink { ...props } />\n\t\t\t</BlockInfo>\n\t\t\t{ showSettingsPanel && (\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t{ showInheritControl && (\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Inherit query from template' ) }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'Toggle to use the global query context that is set with the current template, such as an archive or search. Disable to customize the settings independently.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tchecked={ !! inherit }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetQuery( { inherit: !! value } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showPostTypeControl && (\n\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\toptions={ postTypesSelectOptions }\n\t\t\t\t\t\t\tvalue={ postType }\n\t\t\t\t\t\t\tlabel={ __( 'Post type' ) }\n\t\t\t\t\t\t\tonChange={ onPostTypeChange }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'WordPress contains different types of content and they are divided into collections called “Post types”. By default there are a few different ones such as blog posts and pages, but plugins could add more.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showColumnsControl && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Columns' ) }\n\t\t\t\t\t\t\t\tvalue={ displayLayout.columns }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\tsetDisplayLayout( {\n\t\t\t\t\t\t\t\t\t\tcolumns: value,\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmin={ 2 }\n\t\t\t\t\t\t\t\tmax={ Math.max( 6, displayLayout.columns ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ displayLayout.columns > 6 && (\n\t\t\t\t\t\t\t\t<Notice\n\t\t\t\t\t\t\t\t\tstatus=\"warning\"\n\t\t\t\t\t\t\t\t\tisDismissible={ false }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t'This column count exceeds the recommended amount and may cause visual breakage.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</Notice>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showOrderControl && (\n\t\t\t\t\t\t<OrderControl\n\t\t\t\t\t\t\t{ ...{ order, orderBy } }\n\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showStickyControl && (\n\t\t\t\t\t\t<StickyControl\n\t\t\t\t\t\t\tvalue={ sticky }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetQuery( { sticky: value } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t<EnhancedPaginationControl\n\t\t\t\t\t\tenhancedPagination={ enhancedPagination }\n\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t) }\n\t\t\t{ ! inherit && showFiltersPanel && (\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tclassName=\"block-library-query-toolspanel__filters\"\n\t\t\t\t\tlabel={ __( 'Filters' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tsetQuery( {\n\t\t\t\t\t\t\tauthor: '',\n\t\t\t\t\t\t\tparents: [],\n\t\t\t\t\t\t\tsearch: '',\n\t\t\t\t\t\t\ttaxQuery: null,\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tsetQuerySearch( '' );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t{ showTaxControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\tlabel={ __( 'Taxonomies' ) }\n\t\t\t\t\t\t\thasValue={ () =>\n\t\t\t\t\t\t\t\tObject.values( taxQuery || {} ).some(\n\t\t\t\t\t\t\t\t\t( terms ) => !! terms.length\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { taxQuery: null } ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<TaxonomyControls\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t\tquery={ query }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showAuthorControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! authorIds }\n\t\t\t\t\t\t\tlabel={ __( 'Authors' ) }\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { author: '' } ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<AuthorControl\n\t\t\t\t\t\t\t\tvalue={ authorIds }\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showSearchControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! querySearch }\n\t\t\t\t\t\t\tlabel={ __( 'Keyword' ) }\n\t\t\t\t\t\t\tonDeselect={ () => setQuerySearch( '' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Keyword' ) }\n\t\t\t\t\t\t\t\tvalue={ querySearch }\n\t\t\t\t\t\t\t\tonChange={ setQuerySearch }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showParentControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! parents?.length }\n\t\t\t\t\t\t\tlabel={ __( 'Parents' ) }\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { parents: [] } ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ParentControl\n\t\t\t\t\t\t\t\tparents={ parents }\n\t\t\t\t\t\t\t\tpostType={ postType }\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanel>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,SAAS,EACTC,WAAW,EACXC,aAAa,EACbC,YAAY,EACZC,aAAa,EACbC,MAAM,EACNC,wBAAwB,IAAIC,UAAU,EACtCC,4BAA4B,IAAIC,cAAc,QACxC,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;AAC/E,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,SAAS,EAAEC,QAAQ,EAAEC,WAAW,QAAQ,oBAAoB;;AAErE;AACA;AACA;AACA,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,aAAa,MAAM,kBAAkB;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EAAGA,QAAU;UACrBkD,QAAQ,EAAG7D;QAAU,CACrB;MAAC,CACa,CAChB;IAAA,CACU,CACZ;EAAA,CACA,CAAC;AAEL","ignoreList":[]}
|
|
@@ -6,6 +6,7 @@ import { useLayoutEffect, useEffect, useRef } from '@wordpress/element';
|
|
|
6
6
|
import { getBlobByURL, isBlobURL, revokeBlobURL } from '@wordpress/blob';
|
|
7
7
|
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
8
8
|
import { store as coreStore } from '@wordpress/core-data';
|
|
9
|
+
import { useViewportMatch } from '@wordpress/compose';
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* Returns whether the current user can edit the given entity.
|
|
@@ -78,4 +79,14 @@ export function useUploadMediaFromBlobURL(args = {}) {
|
|
|
78
79
|
});
|
|
79
80
|
}, [getSettings]);
|
|
80
81
|
}
|
|
82
|
+
export function useToolsPanelDropdownMenuProps() {
|
|
83
|
+
const isMobile = useViewportMatch('medium', '<');
|
|
84
|
+
return !isMobile ? {
|
|
85
|
+
popoverProps: {
|
|
86
|
+
placement: 'left-start',
|
|
87
|
+
// For non-mobile, inner sidebar width (248px) - button width (24px) - border (1px) + padding (16px) + spacing (20px)
|
|
88
|
+
offset: 259
|
|
89
|
+
}
|
|
90
|
+
} : {};
|
|
91
|
+
}
|
|
81
92
|
//# sourceMappingURL=hooks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useSelect","useLayoutEffect","useEffect","useRef","getBlobByURL","isBlobURL","revokeBlobURL","store","blockEditorStore","coreStore","useCanEditEntity","kind","name","recordId","select","canUserEditEntityRecord","useUploadMediaFromBlobURL","args","latestArgs","hasUploadStarted","getSettings","current","url","file","allowedTypes","onChange","onError","mediaUpload","filesList","onFileChange","media","message"],"sources":["@wordpress/block-library/src/utils/hooks.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useLayoutEffect, useEffect, useRef } from '@wordpress/element';\nimport { getBlobByURL, isBlobURL, revokeBlobURL } from '@wordpress/blob';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Returns whether the current user can edit the given entity.\n *\n * @param {string} kind Entity kind.\n * @param {string} name Entity name.\n * @param {string} recordId Record's id.\n */\nexport function useCanEditEntity( kind, name, recordId ) {\n\treturn useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).canUserEditEntityRecord( kind, name, recordId ),\n\t\t[ kind, name, recordId ]\n\t);\n}\n\n/**\n * Handles uploading a media file from a blob URL on mount.\n *\n * @param {Object} args Upload media arguments.\n * @param {string} args.url Blob URL.\n * @param {?Array} args.allowedTypes Array of allowed media types.\n * @param {Function} args.onChange Function called when the media is uploaded.\n * @param {Function} args.onError Function called when an error happens.\n */\nexport function useUploadMediaFromBlobURL( args = {} ) {\n\tconst latestArgs = useRef( args );\n\tconst hasUploadStarted = useRef( false );\n\tconst { getSettings } = useSelect( blockEditorStore );\n\n\tuseLayoutEffect( () => {\n\t\tlatestArgs.current = args;\n\t} );\n\n\tuseEffect( () => {\n\t\t// Uploading is a special effect that can't be canceled via the cleanup method.\n\t\t// The extra check avoids duplicate uploads in development mode (React.StrictMode).\n\t\tif ( hasUploadStarted.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (\n\t\t\t! latestArgs.current.url ||\n\t\t\t! isBlobURL( latestArgs.current.url )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst file = getBlobByURL( latestArgs.current.url );\n\t\tif ( ! file ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { url, allowedTypes, onChange, onError } = latestArgs.current;\n\t\tconst { mediaUpload } = getSettings();\n\n\t\thasUploadStarted.current = true;\n\n\t\tmediaUpload( {\n\t\t\tfilesList: [ file ],\n\t\t\tallowedTypes,\n\t\t\tonFileChange: ( [ media ] ) => {\n\t\t\t\tif ( isBlobURL( media?.url ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\trevokeBlobURL( url );\n\t\t\t\tonChange( media );\n\t\t\t\thasUploadStarted.current = false;\n\t\t\t},\n\t\t\tonError: ( message ) => {\n\t\t\t\trevokeBlobURL( url );\n\t\t\t\tonError( message );\n\t\t\t\thasUploadStarted.current = false;\n\t\t\t},\n\t\t} );\n\t}, [ getSettings ] );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,eAAe,EAAEC,SAAS,EAAEC,MAAM,QAAQ,oBAAoB;AACvE,SAASC,YAAY,EAAEC,SAAS,EAAEC,aAAa,QAAQ,iBAAiB;AACxE,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,yBAAyB;AACnE,SAASD,KAAK,IAAIE,SAAS,QAAQ,sBAAsB;;
|
|
1
|
+
{"version":3,"names":["useSelect","useLayoutEffect","useEffect","useRef","getBlobByURL","isBlobURL","revokeBlobURL","store","blockEditorStore","coreStore","useViewportMatch","useCanEditEntity","kind","name","recordId","select","canUserEditEntityRecord","useUploadMediaFromBlobURL","args","latestArgs","hasUploadStarted","getSettings","current","url","file","allowedTypes","onChange","onError","mediaUpload","filesList","onFileChange","media","message","useToolsPanelDropdownMenuProps","isMobile","popoverProps","placement","offset"],"sources":["@wordpress/block-library/src/utils/hooks.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useLayoutEffect, useEffect, useRef } from '@wordpress/element';\nimport { getBlobByURL, isBlobURL, revokeBlobURL } from '@wordpress/blob';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useViewportMatch } from '@wordpress/compose';\n\n/**\n * Returns whether the current user can edit the given entity.\n *\n * @param {string} kind Entity kind.\n * @param {string} name Entity name.\n * @param {string} recordId Record's id.\n */\nexport function useCanEditEntity( kind, name, recordId ) {\n\treturn useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).canUserEditEntityRecord( kind, name, recordId ),\n\t\t[ kind, name, recordId ]\n\t);\n}\n\n/**\n * Handles uploading a media file from a blob URL on mount.\n *\n * @param {Object} args Upload media arguments.\n * @param {string} args.url Blob URL.\n * @param {?Array} args.allowedTypes Array of allowed media types.\n * @param {Function} args.onChange Function called when the media is uploaded.\n * @param {Function} args.onError Function called when an error happens.\n */\nexport function useUploadMediaFromBlobURL( args = {} ) {\n\tconst latestArgs = useRef( args );\n\tconst hasUploadStarted = useRef( false );\n\tconst { getSettings } = useSelect( blockEditorStore );\n\n\tuseLayoutEffect( () => {\n\t\tlatestArgs.current = args;\n\t} );\n\n\tuseEffect( () => {\n\t\t// Uploading is a special effect that can't be canceled via the cleanup method.\n\t\t// The extra check avoids duplicate uploads in development mode (React.StrictMode).\n\t\tif ( hasUploadStarted.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (\n\t\t\t! latestArgs.current.url ||\n\t\t\t! isBlobURL( latestArgs.current.url )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst file = getBlobByURL( latestArgs.current.url );\n\t\tif ( ! file ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { url, allowedTypes, onChange, onError } = latestArgs.current;\n\t\tconst { mediaUpload } = getSettings();\n\n\t\thasUploadStarted.current = true;\n\n\t\tmediaUpload( {\n\t\t\tfilesList: [ file ],\n\t\t\tallowedTypes,\n\t\t\tonFileChange: ( [ media ] ) => {\n\t\t\t\tif ( isBlobURL( media?.url ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\trevokeBlobURL( url );\n\t\t\t\tonChange( media );\n\t\t\t\thasUploadStarted.current = false;\n\t\t\t},\n\t\t\tonError: ( message ) => {\n\t\t\t\trevokeBlobURL( url );\n\t\t\t\tonError( message );\n\t\t\t\thasUploadStarted.current = false;\n\t\t\t},\n\t\t} );\n\t}, [ getSettings ] );\n}\n\nexport function useToolsPanelDropdownMenuProps() {\n\tconst isMobile = useViewportMatch( 'medium', '<' );\n\treturn ! isMobile\n\t\t? {\n\t\t\t\tpopoverProps: {\n\t\t\t\t\tplacement: 'left-start',\n\t\t\t\t\t// For non-mobile, inner sidebar width (248px) - button width (24px) - border (1px) + padding (16px) + spacing (20px)\n\t\t\t\t\toffset: 259,\n\t\t\t\t},\n\t\t }\n\t\t: {};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,eAAe,EAAEC,SAAS,EAAEC,MAAM,QAAQ,oBAAoB;AACvE,SAASC,YAAY,EAAEC,SAAS,EAAEC,aAAa,QAAQ,iBAAiB;AACxE,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,yBAAyB;AACnE,SAASD,KAAK,IAAIE,SAAS,QAAQ,sBAAsB;AACzD,SAASC,gBAAgB,QAAQ,oBAAoB;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAAEC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,EAAG;EACxD,OAAOd,SAAS,CACbe,MAAM,IACPA,MAAM,CAAEN,SAAU,CAAC,CAACO,uBAAuB,CAAEJ,IAAI,EAAEC,IAAI,EAAEC,QAAS,CAAC,EACpE,CAAEF,IAAI,EAAEC,IAAI,EAAEC,QAAQ,CACvB,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,yBAAyBA,CAAEC,IAAI,GAAG,CAAC,CAAC,EAAG;EACtD,MAAMC,UAAU,GAAGhB,MAAM,CAAEe,IAAK,CAAC;EACjC,MAAME,gBAAgB,GAAGjB,MAAM,CAAE,KAAM,CAAC;EACxC,MAAM;IAAEkB;EAAY,CAAC,GAAGrB,SAAS,CAAEQ,gBAAiB,CAAC;EAErDP,eAAe,CAAE,MAAM;IACtBkB,UAAU,CAACG,OAAO,GAAGJ,IAAI;EAC1B,CAAE,CAAC;EAEHhB,SAAS,CAAE,MAAM;IAChB;IACA;IACA,IAAKkB,g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C,CAAC;AACN","ignoreList":[]}
|
|
@@ -86,6 +86,17 @@
|
|
|
86
86
|
/**
|
|
87
87
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
88
88
|
*/
|
|
89
|
+
:where(.wp-block-post-comments-form) textarea,
|
|
90
|
+
:where(.wp-block-post-comments-form) input:not([type=submit]) {
|
|
91
|
+
border: 1px solid #949494;
|
|
92
|
+
font-size: 1em;
|
|
93
|
+
font-family: inherit;
|
|
94
|
+
}
|
|
95
|
+
:where(.wp-block-post-comments-form) textarea,
|
|
96
|
+
:where(.wp-block-post-comments-form) input:where(:not([type="submit"]):not([type="checkbox"])) {
|
|
97
|
+
padding: calc(0.667em + 2px);
|
|
98
|
+
}
|
|
99
|
+
|
|
89
100
|
.wp-block-post-comments-form {
|
|
90
101
|
box-sizing: border-box;
|
|
91
102
|
}
|
|
@@ -114,16 +125,6 @@
|
|
|
114
125
|
text-align: center;
|
|
115
126
|
overflow-wrap: break-word;
|
|
116
127
|
}
|
|
117
|
-
.wp-block-post-comments-form textarea,
|
|
118
|
-
.wp-block-post-comments-form input:not([type=submit]) {
|
|
119
|
-
border: 1px solid #949494;
|
|
120
|
-
font-size: 1em;
|
|
121
|
-
font-family: inherit;
|
|
122
|
-
}
|
|
123
|
-
.wp-block-post-comments-form textarea,
|
|
124
|
-
.wp-block-post-comments-form input:not([type=submit]):not([type=checkbox]) {
|
|
125
|
-
padding: calc(0.667em + 2px);
|
|
126
|
-
}
|
|
127
128
|
.wp-block-post-comments-form .comment-form textarea,
|
|
128
129
|
.wp-block-post-comments-form .comment-form input:not([type=submit]):not([type=checkbox]):not([type=hidden]) {
|
|
129
130
|
display: block;
|
|
@@ -86,6 +86,17 @@
|
|
|
86
86
|
/**
|
|
87
87
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
88
88
|
*/
|
|
89
|
+
:where(.wp-block-post-comments-form) textarea,
|
|
90
|
+
:where(.wp-block-post-comments-form) input:not([type=submit]) {
|
|
91
|
+
border: 1px solid #949494;
|
|
92
|
+
font-size: 1em;
|
|
93
|
+
font-family: inherit;
|
|
94
|
+
}
|
|
95
|
+
:where(.wp-block-post-comments-form) textarea,
|
|
96
|
+
:where(.wp-block-post-comments-form) input:where(:not([type="submit"]):not([type="checkbox"])) {
|
|
97
|
+
padding: calc(0.667em + 2px);
|
|
98
|
+
}
|
|
99
|
+
|
|
89
100
|
.wp-block-post-comments-form {
|
|
90
101
|
box-sizing: border-box;
|
|
91
102
|
}
|
|
@@ -114,16 +125,6 @@
|
|
|
114
125
|
text-align: center;
|
|
115
126
|
overflow-wrap: break-word;
|
|
116
127
|
}
|
|
117
|
-
.wp-block-post-comments-form textarea,
|
|
118
|
-
.wp-block-post-comments-form input:not([type=submit]) {
|
|
119
|
-
border: 1px solid #949494;
|
|
120
|
-
font-size: 1em;
|
|
121
|
-
font-family: inherit;
|
|
122
|
-
}
|
|
123
|
-
.wp-block-post-comments-form textarea,
|
|
124
|
-
.wp-block-post-comments-form input:not([type=submit]):not([type=checkbox]) {
|
|
125
|
-
padding: calc(0.667em + 2px);
|
|
126
|
-
}
|
|
127
128
|
.wp-block-post-comments-form .comment-form textarea,
|
|
128
129
|
.wp-block-post-comments-form .comment-form input:not([type=submit]):not([type=checkbox]):not([type=hidden]) {
|
|
129
130
|
display: block;
|
|
@@ -162,326 +162,326 @@
|
|
|
162
162
|
fill: currentColor;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link {
|
|
165
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link {
|
|
166
166
|
background-color: #f0f0f0;
|
|
167
167
|
color: #444;
|
|
168
168
|
}
|
|
169
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-amazon {
|
|
169
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-amazon {
|
|
170
170
|
background-color: #f90;
|
|
171
171
|
color: #fff;
|
|
172
172
|
}
|
|
173
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-bandcamp {
|
|
173
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-bandcamp {
|
|
174
174
|
background-color: #1ea0c3;
|
|
175
175
|
color: #fff;
|
|
176
176
|
}
|
|
177
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-behance {
|
|
177
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-behance {
|
|
178
178
|
background-color: #0757fe;
|
|
179
179
|
color: #fff;
|
|
180
180
|
}
|
|
181
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-bluesky {
|
|
181
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-bluesky {
|
|
182
182
|
background-color: #0a7aff;
|
|
183
183
|
color: #fff;
|
|
184
184
|
}
|
|
185
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-codepen {
|
|
185
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-codepen {
|
|
186
186
|
background-color: #1e1f26;
|
|
187
187
|
color: #fff;
|
|
188
188
|
}
|
|
189
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-deviantart {
|
|
189
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-deviantart {
|
|
190
190
|
background-color: #02e49b;
|
|
191
191
|
color: #fff;
|
|
192
192
|
}
|
|
193
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-dribbble {
|
|
193
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-dribbble {
|
|
194
194
|
background-color: #e94c89;
|
|
195
195
|
color: #fff;
|
|
196
196
|
}
|
|
197
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-dropbox {
|
|
197
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-dropbox {
|
|
198
198
|
background-color: #4280ff;
|
|
199
199
|
color: #fff;
|
|
200
200
|
}
|
|
201
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-etsy {
|
|
201
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-etsy {
|
|
202
202
|
background-color: #f45800;
|
|
203
203
|
color: #fff;
|
|
204
204
|
}
|
|
205
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-facebook {
|
|
205
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-facebook {
|
|
206
206
|
background-color: #1778f2;
|
|
207
207
|
color: #fff;
|
|
208
208
|
}
|
|
209
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-fivehundredpx {
|
|
209
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-fivehundredpx {
|
|
210
210
|
background-color: #000;
|
|
211
211
|
color: #fff;
|
|
212
212
|
}
|
|
213
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-flickr {
|
|
213
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-flickr {
|
|
214
214
|
background-color: #0461dd;
|
|
215
215
|
color: #fff;
|
|
216
216
|
}
|
|
217
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-foursquare {
|
|
217
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-foursquare {
|
|
218
218
|
background-color: #e65678;
|
|
219
219
|
color: #fff;
|
|
220
220
|
}
|
|
221
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-github {
|
|
221
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-github {
|
|
222
222
|
background-color: #24292d;
|
|
223
223
|
color: #fff;
|
|
224
224
|
}
|
|
225
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-goodreads {
|
|
225
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-goodreads {
|
|
226
226
|
background-color: #eceadd;
|
|
227
227
|
color: #382110;
|
|
228
228
|
}
|
|
229
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-google {
|
|
229
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-google {
|
|
230
230
|
background-color: #ea4434;
|
|
231
231
|
color: #fff;
|
|
232
232
|
}
|
|
233
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-gravatar {
|
|
233
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-gravatar {
|
|
234
234
|
background-color: #1d4fc4;
|
|
235
235
|
color: #fff;
|
|
236
236
|
}
|
|
237
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-instagram {
|
|
237
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-instagram {
|
|
238
238
|
background-color: #f00075;
|
|
239
239
|
color: #fff;
|
|
240
240
|
}
|
|
241
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-lastfm {
|
|
241
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-lastfm {
|
|
242
242
|
background-color: #e21b24;
|
|
243
243
|
color: #fff;
|
|
244
244
|
}
|
|
245
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-linkedin {
|
|
245
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-linkedin {
|
|
246
246
|
background-color: #0d66c2;
|
|
247
247
|
color: #fff;
|
|
248
248
|
}
|
|
249
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-mastodon {
|
|
249
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-mastodon {
|
|
250
250
|
background-color: #3288d4;
|
|
251
251
|
color: #fff;
|
|
252
252
|
}
|
|
253
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-medium {
|
|
253
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-medium {
|
|
254
254
|
background-color: #000;
|
|
255
255
|
color: #fff;
|
|
256
256
|
}
|
|
257
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-meetup {
|
|
257
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-meetup {
|
|
258
258
|
background-color: #f6405f;
|
|
259
259
|
color: #fff;
|
|
260
260
|
}
|
|
261
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-patreon {
|
|
261
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-patreon {
|
|
262
262
|
background-color: #000;
|
|
263
263
|
color: #fff;
|
|
264
264
|
}
|
|
265
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-pinterest {
|
|
265
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-pinterest {
|
|
266
266
|
background-color: #e60122;
|
|
267
267
|
color: #fff;
|
|
268
268
|
}
|
|
269
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-pocket {
|
|
269
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-pocket {
|
|
270
270
|
background-color: #ef4155;
|
|
271
271
|
color: #fff;
|
|
272
272
|
}
|
|
273
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-reddit {
|
|
273
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-reddit {
|
|
274
274
|
background-color: #ff4500;
|
|
275
275
|
color: #fff;
|
|
276
276
|
}
|
|
277
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-skype {
|
|
277
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-skype {
|
|
278
278
|
background-color: #0478d7;
|
|
279
279
|
color: #fff;
|
|
280
280
|
}
|
|
281
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-snapchat {
|
|
281
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-snapchat {
|
|
282
282
|
background-color: #fefc00;
|
|
283
283
|
color: #fff;
|
|
284
284
|
stroke: #000;
|
|
285
285
|
}
|
|
286
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-soundcloud {
|
|
286
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-soundcloud {
|
|
287
287
|
background-color: #ff5600;
|
|
288
288
|
color: #fff;
|
|
289
289
|
}
|
|
290
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-spotify {
|
|
290
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-spotify {
|
|
291
291
|
background-color: #1bd760;
|
|
292
292
|
color: #fff;
|
|
293
293
|
}
|
|
294
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-telegram {
|
|
294
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-telegram {
|
|
295
295
|
background-color: #2aabee;
|
|
296
296
|
color: #fff;
|
|
297
297
|
}
|
|
298
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-threads {
|
|
298
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-threads {
|
|
299
299
|
background-color: #000;
|
|
300
300
|
color: #fff;
|
|
301
301
|
}
|
|
302
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-tiktok {
|
|
302
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-tiktok {
|
|
303
303
|
background-color: #000;
|
|
304
304
|
color: #fff;
|
|
305
305
|
}
|
|
306
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-tumblr {
|
|
306
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-tumblr {
|
|
307
307
|
background-color: #011835;
|
|
308
308
|
color: #fff;
|
|
309
309
|
}
|
|
310
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-twitch {
|
|
310
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-twitch {
|
|
311
311
|
background-color: #6440a4;
|
|
312
312
|
color: #fff;
|
|
313
313
|
}
|
|
314
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-twitter {
|
|
314
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-twitter {
|
|
315
315
|
background-color: #1da1f2;
|
|
316
316
|
color: #fff;
|
|
317
317
|
}
|
|
318
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-vimeo {
|
|
318
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-vimeo {
|
|
319
319
|
background-color: #1eb7ea;
|
|
320
320
|
color: #fff;
|
|
321
321
|
}
|
|
322
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-vk {
|
|
322
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-vk {
|
|
323
323
|
background-color: #4680c2;
|
|
324
324
|
color: #fff;
|
|
325
325
|
}
|
|
326
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-wordpress {
|
|
326
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-wordpress {
|
|
327
327
|
background-color: #3499cd;
|
|
328
328
|
color: #fff;
|
|
329
329
|
}
|
|
330
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-whatsapp {
|
|
330
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-whatsapp {
|
|
331
331
|
background-color: #25d366;
|
|
332
332
|
color: #fff;
|
|
333
333
|
}
|
|
334
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-x {
|
|
334
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-x {
|
|
335
335
|
background-color: #000;
|
|
336
336
|
color: #fff;
|
|
337
337
|
}
|
|
338
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-yelp {
|
|
338
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-yelp {
|
|
339
339
|
background-color: #d32422;
|
|
340
340
|
color: #fff;
|
|
341
341
|
}
|
|
342
|
-
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-youtube {
|
|
342
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-youtube {
|
|
343
343
|
background-color: #f00;
|
|
344
344
|
color: #fff;
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link {
|
|
347
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link {
|
|
348
348
|
background: none;
|
|
349
349
|
}
|
|
350
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link svg {
|
|
350
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link svg {
|
|
351
351
|
width: 1.25em;
|
|
352
352
|
height: 1.25em;
|
|
353
353
|
}
|
|
354
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-amazon {
|
|
354
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-amazon {
|
|
355
355
|
color: #f90;
|
|
356
356
|
}
|
|
357
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-bandcamp {
|
|
357
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-bandcamp {
|
|
358
358
|
color: #1ea0c3;
|
|
359
359
|
}
|
|
360
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-behance {
|
|
360
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-behance {
|
|
361
361
|
color: #0757fe;
|
|
362
362
|
}
|
|
363
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-bluesky {
|
|
363
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-bluesky {
|
|
364
364
|
color: #0a7aff;
|
|
365
365
|
}
|
|
366
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-codepen {
|
|
366
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-codepen {
|
|
367
367
|
color: #1e1f26;
|
|
368
368
|
}
|
|
369
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-deviantart {
|
|
369
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-deviantart {
|
|
370
370
|
color: #02e49b;
|
|
371
371
|
}
|
|
372
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-dribbble {
|
|
372
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-dribbble {
|
|
373
373
|
color: #e94c89;
|
|
374
374
|
}
|
|
375
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-dropbox {
|
|
375
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-dropbox {
|
|
376
376
|
color: #4280ff;
|
|
377
377
|
}
|
|
378
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-etsy {
|
|
378
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-etsy {
|
|
379
379
|
color: #f45800;
|
|
380
380
|
}
|
|
381
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-facebook {
|
|
381
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-facebook {
|
|
382
382
|
color: #1778f2;
|
|
383
383
|
}
|
|
384
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-fivehundredpx {
|
|
384
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-fivehundredpx {
|
|
385
385
|
color: #000;
|
|
386
386
|
}
|
|
387
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-flickr {
|
|
387
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-flickr {
|
|
388
388
|
color: #0461dd;
|
|
389
389
|
}
|
|
390
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-foursquare {
|
|
390
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-foursquare {
|
|
391
391
|
color: #e65678;
|
|
392
392
|
}
|
|
393
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-github {
|
|
393
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-github {
|
|
394
394
|
color: #24292d;
|
|
395
395
|
}
|
|
396
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-goodreads {
|
|
396
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-goodreads {
|
|
397
397
|
color: #382110;
|
|
398
398
|
}
|
|
399
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-google {
|
|
399
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-google {
|
|
400
400
|
color: #ea4434;
|
|
401
401
|
}
|
|
402
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-gravatar {
|
|
402
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-gravatar {
|
|
403
403
|
color: #1d4fc4;
|
|
404
404
|
}
|
|
405
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-instagram {
|
|
405
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-instagram {
|
|
406
406
|
color: #f00075;
|
|
407
407
|
}
|
|
408
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-lastfm {
|
|
408
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-lastfm {
|
|
409
409
|
color: #e21b24;
|
|
410
410
|
}
|
|
411
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-linkedin {
|
|
411
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-linkedin {
|
|
412
412
|
color: #0d66c2;
|
|
413
413
|
}
|
|
414
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-mastodon {
|
|
414
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-mastodon {
|
|
415
415
|
color: #3288d4;
|
|
416
416
|
}
|
|
417
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-medium {
|
|
417
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-medium {
|
|
418
418
|
color: #000;
|
|
419
419
|
}
|
|
420
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-meetup {
|
|
420
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-meetup {
|
|
421
421
|
color: #f6405f;
|
|
422
422
|
}
|
|
423
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-patreon {
|
|
423
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-patreon {
|
|
424
424
|
color: #000;
|
|
425
425
|
}
|
|
426
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-pinterest {
|
|
426
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-pinterest {
|
|
427
427
|
color: #e60122;
|
|
428
428
|
}
|
|
429
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-pocket {
|
|
429
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-pocket {
|
|
430
430
|
color: #ef4155;
|
|
431
431
|
}
|
|
432
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-reddit {
|
|
432
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-reddit {
|
|
433
433
|
color: #ff4500;
|
|
434
434
|
}
|
|
435
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-skype {
|
|
435
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-skype {
|
|
436
436
|
color: #0478d7;
|
|
437
437
|
}
|
|
438
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-snapchat {
|
|
438
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-snapchat {
|
|
439
439
|
color: #fff;
|
|
440
440
|
stroke: #000;
|
|
441
441
|
}
|
|
442
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-soundcloud {
|
|
442
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-soundcloud {
|
|
443
443
|
color: #ff5600;
|
|
444
444
|
}
|
|
445
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-spotify {
|
|
445
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-spotify {
|
|
446
446
|
color: #1bd760;
|
|
447
447
|
}
|
|
448
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-telegram {
|
|
448
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-telegram {
|
|
449
449
|
color: #2aabee;
|
|
450
450
|
}
|
|
451
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-threads {
|
|
451
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-threads {
|
|
452
452
|
color: #000;
|
|
453
453
|
}
|
|
454
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-tiktok {
|
|
454
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-tiktok {
|
|
455
455
|
color: #000;
|
|
456
456
|
}
|
|
457
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-tumblr {
|
|
457
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-tumblr {
|
|
458
458
|
color: #011835;
|
|
459
459
|
}
|
|
460
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-twitch {
|
|
460
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-twitch {
|
|
461
461
|
color: #6440a4;
|
|
462
462
|
}
|
|
463
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-twitter {
|
|
463
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-twitter {
|
|
464
464
|
color: #1da1f2;
|
|
465
465
|
}
|
|
466
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-vimeo {
|
|
466
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-vimeo {
|
|
467
467
|
color: #1eb7ea;
|
|
468
468
|
}
|
|
469
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-vk {
|
|
469
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-vk {
|
|
470
470
|
color: #4680c2;
|
|
471
471
|
}
|
|
472
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-whatsapp {
|
|
472
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-whatsapp {
|
|
473
473
|
color: #25d366;
|
|
474
474
|
}
|
|
475
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-wordpress {
|
|
475
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-wordpress {
|
|
476
476
|
color: #3499cd;
|
|
477
477
|
}
|
|
478
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-x {
|
|
478
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-x {
|
|
479
479
|
color: #000;
|
|
480
480
|
}
|
|
481
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-yelp {
|
|
481
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-yelp {
|
|
482
482
|
color: #d32422;
|
|
483
483
|
}
|
|
484
|
-
.wp-block-social-links.is-style-logos-only .wp-social-link-youtube {
|
|
484
|
+
:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-youtube {
|
|
485
485
|
color: #f00;
|
|
486
486
|
}
|
|
487
487
|
|