@wordpress/edit-site 5.27.0 → 5.27.1
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/components/global-styles/font-library-modal/tab-panel-layout.js +6 -2
- package/build/components/global-styles/font-library-modal/tab-panel-layout.js.map +1 -1
- package/build/components/global-styles/screen-block.js +10 -0
- package/build/components/global-styles/screen-block.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/tab-panel-layout.js +6 -2
- package/build-module/components/global-styles/font-library-modal/tab-panel-layout.js.map +1 -1
- package/build-module/components/global-styles/screen-block.js +10 -0
- package/build-module/components/global-styles/screen-block.js.map +1 -1
- package/build-style/style-rtl.css +14 -27
- package/build-style/style.css +14 -27
- package/package.json +12 -12
- package/src/components/global-styles/font-library-modal/style.scss +22 -35
- package/src/components/global-styles/font-library-modal/tab-panel-layout.js +30 -26
- package/src/components/global-styles/screen-block.js +10 -0
|
@@ -25,7 +25,7 @@ function TabPanelLayout({
|
|
|
25
25
|
}), (0, _react.createElement)(_components.__experimentalVStack, {
|
|
26
26
|
spacing: 4,
|
|
27
27
|
justify: "space-between"
|
|
28
|
-
}, (0, _react.createElement)(
|
|
28
|
+
}, (0, _react.createElement)(_components.__experimentalVStack, {
|
|
29
29
|
spacing: 2
|
|
30
30
|
}, (0, _react.createElement)(_components.__experimentalHStack, {
|
|
31
31
|
justify: "flex-start"
|
|
@@ -38,7 +38,11 @@ function TabPanelLayout({
|
|
|
38
38
|
level: 2,
|
|
39
39
|
size: 13,
|
|
40
40
|
className: "edit-site-global-styles-header"
|
|
41
|
-
}, title)), description && (0, _react.createElement)(_components.__experimentalText, null, description))
|
|
41
|
+
}, title)), description && (0, _react.createElement)(_components.__experimentalText, null, description)), (0, _react.createElement)("div", {
|
|
42
|
+
className: "font-library-modal__tabpanel-layout__main"
|
|
43
|
+
}, children), footer && (0, _react.createElement)("div", {
|
|
44
|
+
className: "font-library-modal__tabpanel-layout__footer"
|
|
45
|
+
}, footer)));
|
|
42
46
|
}
|
|
43
47
|
var _default = TabPanelLayout;
|
|
44
48
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_icons","TabPanelLayout","title","description","handleBack","children","footer","_react","createElement","className","__experimentalSpacer","margin","__experimentalVStack","spacing","justify","__experimentalHStack","Button","variant","onClick","icon","chevronLeft","size","__experimentalHeading","level","__experimentalText","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/global-styles/font-library-modal/tab-panel-layout.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalText as Text,\n\t__experimentalHeading as Heading,\n\t__experimentalVStack as VStack,\n\t__experimentalSpacer as Spacer,\n\t__experimentalHStack as HStack,\n\tButton,\n} from '@wordpress/components';\nimport { chevronLeft } from '@wordpress/icons';\n\nfunction TabPanelLayout( {\n\ttitle,\n\tdescription,\n\thandleBack,\n\tchildren,\n\tfooter,\n} ) {\n\treturn (\n\t\t<div className=\"font-library-modal__tabpanel-layout\">\n\t\t\t<Spacer margin={ 4 } />\n\t\t\t<VStack spacing={ 4 } justify=\"space-between\">\n\t\t\t\t<
|
|
1
|
+
{"version":3,"names":["_components","require","_icons","TabPanelLayout","title","description","handleBack","children","footer","_react","createElement","className","__experimentalSpacer","margin","__experimentalVStack","spacing","justify","__experimentalHStack","Button","variant","onClick","icon","chevronLeft","size","__experimentalHeading","level","__experimentalText","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/global-styles/font-library-modal/tab-panel-layout.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalText as Text,\n\t__experimentalHeading as Heading,\n\t__experimentalVStack as VStack,\n\t__experimentalSpacer as Spacer,\n\t__experimentalHStack as HStack,\n\tButton,\n} from '@wordpress/components';\nimport { chevronLeft } from '@wordpress/icons';\n\nfunction TabPanelLayout( {\n\ttitle,\n\tdescription,\n\thandleBack,\n\tchildren,\n\tfooter,\n} ) {\n\treturn (\n\t\t<div className=\"font-library-modal__tabpanel-layout\">\n\t\t\t<Spacer margin={ 4 } />\n\t\t\t<VStack spacing={ 4 } justify=\"space-between\">\n\t\t\t\t<VStack spacing={ 2 }>\n\t\t\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t\t\t{ !! handleBack && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\tonClick={ handleBack }\n\t\t\t\t\t\t\t\ticon={ chevronLeft }\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ title && (\n\t\t\t\t\t\t\t<Heading\n\t\t\t\t\t\t\t\tlevel={ 2 }\n\t\t\t\t\t\t\t\tsize={ 13 }\n\t\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-header\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</HStack>\n\t\t\t\t\t{ description && <Text>{ description }</Text> }\n\t\t\t\t</VStack>\n\t\t\t\t<div className=\"font-library-modal__tabpanel-layout__main\">\n\t\t\t\t\t{ children }\n\t\t\t\t</div>\n\t\t\t\t{ footer && (\n\t\t\t\t\t<div className=\"font-library-modal__tabpanel-layout__footer\">\n\t\t\t\t\t\t{ footer }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</VStack>\n\t\t</div>\n\t);\n}\n\nexport default TabPanelLayout;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAQA,IAAAC,MAAA,GAAAD,OAAA;AAXA;AACA;AACA;;AAWA,SAASE,cAAcA,CAAE;EACxBC,KAAK;EACLC,WAAW;EACXC,UAAU;EACVC,QAAQ;EACRC;AACD,CAAC,EAAG;EACH,OACC,IAAAC,MAAA,CAAAC,aAAA;IAAKC,SAAS,EAAC;EAAqC,GACnD,IAAAF,MAAA,CAAAC,aAAA,EAACV,WAAA,CAAAY,oBAAM;IAACC,MAAM,EAAG;EAAG,CAAE,CAAC,EACvB,IAAAJ,MAAA,CAAAC,aAAA,EAACV,WAAA,CAAAc,oBAAM;IAACC,OAAO,EAAG,CAAG;IAACC,OAAO,EAAC;EAAe,GAC5C,IAAAP,MAAA,CAAAC,aAAA,EAACV,WAAA,CAAAc,oBAAM;IAACC,OAAO,EAAG;EAAG,GACpB,IAAAN,MAAA,CAAAC,aAAA,EAACV,WAAA,CAAAiB,oBAAM;IAACD,OAAO,EAAC;EAAY,GACzB,CAAC,CAAEV,UAAU,IACd,IAAAG,MAAA,CAAAC,aAAA,EAACV,WAAA,CAAAkB,MAAM;IACNC,OAAO,EAAC,UAAU;IAClBC,OAAO,EAAGd,UAAY;IACtBe,IAAI,EAAGC,kBAAa;IACpBC,IAAI,EAAC;EAAO,CACZ,CACD,EACCnB,KAAK,IACN,IAAAK,MAAA,CAAAC,aAAA,EAACV,WAAA,CAAAwB,qBAAO;IACPC,KAAK,EAAG,CAAG;IACXF,IAAI,EAAG,EAAI;IACXZ,SAAS,EAAC;EAAgC,GAExCP,KACM,CAEH,CAAC,EACPC,WAAW,IAAI,IAAAI,MAAA,CAAAC,aAAA,EAACV,WAAA,CAAA0B,kBAAI,QAAGrB,WAAmB,CACrC,CAAC,EACT,IAAAI,MAAA,CAAAC,aAAA;IAAKC,SAAS,EAAC;EAA2C,GACvDJ,QACE,CAAC,EACJC,MAAM,IACP,IAAAC,MAAA,CAAAC,aAAA;IAAKC,SAAS,EAAC;EAA6C,GACzDH,MACE,CAEC,CACJ,CAAC;AAER;AAAC,IAAAmB,QAAA,GAEcxB,cAAc;AAAAyB,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
|
@@ -100,6 +100,16 @@ function ScreenBlock({
|
|
|
100
100
|
if (settings?.spacing?.blockGap && blockType?.supports?.spacing?.blockGap && (blockType?.supports?.spacing?.__experimentalSkipSerialization === true || blockType?.supports?.spacing?.__experimentalSkipSerialization?.some?.(spacingType => spacingType === 'blockGap'))) {
|
|
101
101
|
settings.spacing.blockGap = false;
|
|
102
102
|
}
|
|
103
|
+
|
|
104
|
+
// Only allow `aspectRatio` support if the block is not the grouping block.
|
|
105
|
+
// The grouping block allows the user to use Group, Row and Stack variations,
|
|
106
|
+
// and it is highly likely that the user will not want to set an aspect ratio
|
|
107
|
+
// for all three at once. Until there is the ability to set a different aspect
|
|
108
|
+
// ratio for each variation, we disable the aspect ratio controls for the
|
|
109
|
+
// grouping block in global styles.
|
|
110
|
+
if (settings?.dimensions?.aspectRatio && name === 'core/group') {
|
|
111
|
+
settings.dimensions.aspectRatio = false;
|
|
112
|
+
}
|
|
103
113
|
const blockVariations = (0, _variationsPanel.useBlockVariations)(name);
|
|
104
114
|
const hasTypographyPanel = useHasTypographyPanel(settings);
|
|
105
115
|
const hasColorPanel = useHasColorPanel(settings);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_blocks","require","_blockEditor","_element","_data","_coreData","_components","_i18n","_header","_interopRequireDefault","_blockPreviewPanel","_lockUnlock","_subtitle","_variationsPanel","applyFallbackStyle","border","hasColorOrWidth","color","width","style","undefined","applyAllFallbackStyles","hasSplitBorders","top","right","bottom","left","useHasDimensionsPanel","useHasTypographyPanel","useHasBorderPanel","useGlobalSetting","useSettingsForBlockElement","useHasColorPanel","useHasEffectsPanel","useHasFiltersPanel","useHasImageSettingsPanel","useGlobalStyle","BorderPanel","StylesBorderPanel","ColorPanel","StylesColorPanel","TypographyPanel","StylesTypographyPanel","DimensionsPanel","StylesDimensionsPanel","EffectsPanel","StylesEffectsPanel","FiltersPanel","StylesFiltersPanel","ImageSettingsPanel","AdvancedPanel","StylesAdvancedPanel","unlock","blockEditorPrivateApis","ScreenBlock","name","variation","prefixParts","concat","prefix","join","shouldDecodeEncode","inheritedStyle","setStyle","userSettings","rawSettings","setSettings","settings","blockType","getBlockType","spacing","blockGap","supports","__experimentalSkipSerialization","some","spacingType","blockVariations","useBlockVariations","hasTypographyPanel","hasColorPanel","hasBorderPanel","hasDimensionsPanel","hasEffectsPanel","hasFiltersPanel","hasImageSettingsPanel","hasVariationsPanel","length","canEditCSS","useSelect","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","coreStore","globalStylesId","globalStyles","_links","currentBlockStyle","find","s","inheritedStyleWithLayout","useMemo","layout","styleWithLayout","onChangeDimensions","newStyle","updatedStyle","onChangeLightbox","newSetting","lightbox","onChangeBorders","radius","newBorder","updatedBorder","_react","createElement","Fragment","default","title","label","className","__experimentalVStack","__","VariationsPanel","inheritedValue","value","onChange","includeLayoutControls","PanelBody","initialOpen","sprintf","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-block.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tPanelBody,\n\t__experimentalVStack as VStack,\n\t__experimentalHasSplitBorders as hasSplitBorders,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../lock-unlock';\nimport Subtitle from './subtitle';\nimport { useBlockVariations, VariationsPanel } from './variations-panel';\n\nfunction applyFallbackStyle( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tconst hasColorOrWidth = border.color || border.width;\n\n\tif ( ! border.style && hasColorOrWidth ) {\n\t\treturn { ...border, style: 'solid' };\n\t}\n\n\tif ( border.style && ! hasColorOrWidth ) {\n\t\treturn undefined;\n\t}\n\n\treturn border;\n}\n\nfunction applyAllFallbackStyles( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tif ( hasSplitBorders( border ) ) {\n\t\treturn {\n\t\t\ttop: applyFallbackStyle( border.top ),\n\t\t\tright: applyFallbackStyle( border.right ),\n\t\t\tbottom: applyFallbackStyle( border.bottom ),\n\t\t\tleft: applyFallbackStyle( border.left ),\n\t\t};\n\t}\n\n\treturn applyFallbackStyle( border );\n}\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasBorderPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tuseHasColorPanel,\n\tuseHasEffectsPanel,\n\tuseHasFiltersPanel,\n\tuseHasImageSettingsPanel,\n\tuseGlobalStyle,\n\tBorderPanel: StylesBorderPanel,\n\tColorPanel: StylesColorPanel,\n\tTypographyPanel: StylesTypographyPanel,\n\tDimensionsPanel: StylesDimensionsPanel,\n\tEffectsPanel: StylesEffectsPanel,\n\tFiltersPanel: StylesFiltersPanel,\n\tImageSettingsPanel,\n\tAdvancedPanel: StylesAdvancedPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction ScreenBlock( { name, variation } ) {\n\tlet prefixParts = [];\n\tif ( variation ) {\n\t\tprefixParts = [ 'variations', variation ].concat( prefixParts );\n\t}\n\tconst prefix = prefixParts.join( '.' );\n\n\tconst [ style ] = useGlobalStyle( prefix, name, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( prefix, name, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ userSettings ] = useGlobalSetting( '', name, 'user' );\n\tconst [ rawSettings, setSettings ] = useGlobalSetting( '', name );\n\tconst settings = useSettingsForBlockElement( rawSettings, name );\n\tconst blockType = getBlockType( name );\n\n\t// Only allow `blockGap` support if serialization has not been skipped, to be sure global spacing can be applied.\n\tif (\n\t\tsettings?.spacing?.blockGap &&\n\t\tblockType?.supports?.spacing?.blockGap &&\n\t\t( blockType?.supports?.spacing?.__experimentalSkipSerialization ===\n\t\t\ttrue ||\n\t\t\tblockType?.supports?.spacing?.__experimentalSkipSerialization?.some?.(\n\t\t\t\t( spacingType ) => spacingType === 'blockGap'\n\t\t\t) )\n\t) {\n\t\tsettings.spacing.blockGap = false;\n\t}\n\n\tconst blockVariations = useBlockVariations( name );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasBorderPanel = useHasBorderPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasEffectsPanel = useHasEffectsPanel( settings );\n\tconst hasFiltersPanel = useHasFiltersPanel( settings );\n\tconst hasImageSettingsPanel = useHasImageSettingsPanel(\n\t\tname,\n\t\tuserSettings,\n\t\tsettings\n\t);\n\tconst hasVariationsPanel = !! blockVariations?.length && ! variation;\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\tconst currentBlockStyle = variation\n\t\t? blockVariations.find( ( s ) => s.name === variation )\n\t\t: null;\n\n\t// These intermediary objects are needed because the \"layout\" property is stored\n\t// in settings rather than styles.\n\tconst inheritedStyleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...inheritedStyle,\n\t\t\tlayout: settings.layout,\n\t\t};\n\t}, [ inheritedStyle, settings.layout ] );\n\tconst styleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...style,\n\t\t\tlayout: userSettings.layout,\n\t\t};\n\t}, [ style, userSettings.layout ] );\n\tconst onChangeDimensions = ( newStyle ) => {\n\t\tconst updatedStyle = { ...newStyle };\n\t\tdelete updatedStyle.layout;\n\t\tsetStyle( updatedStyle );\n\n\t\tif ( newStyle.layout !== userSettings.layout ) {\n\t\t\tsetSettings( {\n\t\t\t\t...userSettings,\n\t\t\t\tlayout: newStyle.layout,\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeLightbox = ( newSetting ) => {\n\t\t// If the newSetting is undefined, this means that the user has deselected\n\t\t// (reset) the lightbox setting.\n\t\tif ( newSetting === undefined ) {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlightbox: undefined,\n\t\t\t} );\n\n\t\t\t// Otherwise, we simply set the lightbox setting to the new value but\n\t\t\t// taking care of not overriding the other lightbox settings.\n\t\t} else {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlightbox: {\n\t\t\t\t\t...rawSettings.lightbox,\n\t\t\t\t\t...newSetting,\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeBorders = ( newStyle ) => {\n\t\tif ( ! newStyle?.border ) {\n\t\t\tsetStyle( newStyle );\n\t\t\treturn;\n\t\t}\n\n\t\t// As Global Styles can't conditionally generate styles based on if\n\t\t// other style properties have been set, we need to force split\n\t\t// border definitions for user set global border styles. Border\n\t\t// radius is derived from the same property i.e. `border.radius` if\n\t\t// it is a string that is used. The longhand border radii styles are\n\t\t// only generated if that property is an object.\n\t\t//\n\t\t// For borders (color, style, and width) those are all properties on\n\t\t// the `border` style property. This means if the theme.json defined\n\t\t// split borders and the user condenses them into a flat border or\n\t\t// vice-versa we'd get both sets of styles which would conflict.\n\t\tconst { radius, ...newBorder } = newStyle.border;\n\t\tconst border = applyAllFallbackStyles( newBorder );\n\t\tconst updatedBorder = ! hasSplitBorders( border )\n\t\t\t? {\n\t\t\t\t\ttop: border,\n\t\t\t\t\tright: border,\n\t\t\t\t\tbottom: border,\n\t\t\t\t\tleft: border,\n\t\t\t }\n\t\t\t: {\n\t\t\t\t\tcolor: null,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twidth: null,\n\t\t\t\t\t...border,\n\t\t\t };\n\n\t\tsetStyle( { ...newStyle, border: { ...updatedBorder, radius } } );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ variation ? currentBlockStyle.label : blockType.title }\n\t\t\t/>\n\t\t\t<BlockPreviewPanel name={ name } variation={ variation } />\n\t\t\t{ hasVariationsPanel && (\n\t\t\t\t<div className=\"edit-site-global-styles-screen-variations\">\n\t\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t\t<Subtitle>{ __( 'Style Variations' ) }</Subtitle>\n\t\t\t\t\t\t<VariationsPanel name={ name } />\n\t\t\t\t\t</VStack>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ hasColorPanel && (\n\t\t\t\t<StylesColorPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasTypographyPanel && (\n\t\t\t\t<StylesTypographyPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasDimensionsPanel && (\n\t\t\t\t<StylesDimensionsPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ onChangeDimensions }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasBorderPanel && (\n\t\t\t\t<StylesBorderPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ onChangeBorders }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasEffectsPanel && (\n\t\t\t\t<StylesEffectsPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasFiltersPanel && (\n\t\t\t\t<StylesFiltersPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasImageSettingsPanel && (\n\t\t\t\t<ImageSettingsPanel\n\t\t\t\t\tonChange={ onChangeLightbox }\n\t\t\t\t\tvalue={ userSettings }\n\t\t\t\t\tinheritedValue={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t{ canEditCSS && (\n\t\t\t\t<PanelBody title={ __( 'Advanced' ) } initialOpen={ false }>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: %s: is the name of a block e.g., 'Image' or 'Table'.\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tblockType?.title\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ScreenBlock;\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,G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EAACpE,kBAAkB;IAClB6E,cAAc,EAAGxB,wBAA0B;IAC3CyB,KAAK,EAAGtB,eAAiB;IACzBuB,QAAQ,EAAG9D,QAAU;IACrBI,QAAQ,EAAGA,QAAU;IACrB2D,qBAAqB;EAAA,CACrB,CACD,EACC3C,eAAe,IAChB,IAAA8B,MAAA,CAAAC,aAAA,EAAClE,kBAAkB;IAClB2E,cAAc,EAAGxB,wBAA0B;IAC3CyB,KAAK,EAAGtB,eAAiB;IACzBuB,QAAQ,EAAG9D,QAAU;IACrBI,QAAQ,EAAGA,QAAU;IACrB2D,qBAAqB;EAAA,CACrB,CACD,EACC1C,qBAAqB,IACtB,IAAA6B,MAAA,CAAAC,aAAA,EAACjE,kBAAkB;IAClB4E,QAAQ,EAAGnB,gBAAkB;IAC7BkB,KAAK,EAAG5D,YAAc;IACtB2D,cAAc,EAAGxD;EAAU,CAC3B,CACD,EAECoB,UAAU,IACX,IAAA0B,MAAA,CAAAC,aAAA,EAAC5G,WAAA,CAAAyH,SAAS;IAACV,KAAK,EAAG,IAAAI,QAAE,EAAE,UAAW,CAAG;IAACO,WAAW,EAAG;EAAO,GAC1D,IAAAf,MAAA,CAAAC,aAAA,aACG,IAAAe,aAAO;EACR;EACA,IAAAR,QAAE,EACD,2IACD,CAAC,EACDrD,SAAS,EAAEiD,KACZ,CACE,CAAC,EACJ,IAAAJ,MAAA,CAAAC,aAAA,EAAC/D,mBAAmB;IACnByE,KAAK,EAAGzG,KAAO;IACf0G,QAAQ,EAAG9D,QAAU;IACrB4D,cAAc,EAAG7D;EAAgB,CACjC,CACS,CAEX,CAAC;AAEL;AAAC,IAAAoE,QAAA,GAEc5E,WAAW;AAAA6E,OAAA,CAAAf,OAAA,GAAAc,QAAA"}
|
|
1
|
+
{"version":3,"names":["_blocks","require","_blockEditor","_element","_data","_coreData","_components","_i18n","_header","_interopRequireDefault","_blockPreviewPanel","_lockUnlock","_subtitle","_variationsPanel","applyFallbackStyle","border","hasColorOrWidth","color","width","style","undefined","applyAllFallbackStyles","hasSplitBorders","top","right","bottom","left","useHasDimensionsPanel","useHasTypographyPanel","useHasBorderPanel","useGlobalSetting","useSettingsForBlockElement","useHasColorPanel","useHasEffectsPanel","useHasFiltersPanel","useHasImageSettingsPanel","useGlobalStyle","BorderPanel","StylesBorderPanel","ColorPanel","StylesColorPanel","TypographyPanel","StylesTypographyPanel","DimensionsPanel","StylesDimensionsPanel","EffectsPanel","StylesEffectsPanel","FiltersPanel","StylesFiltersPanel","ImageSettingsPanel","AdvancedPanel","StylesAdvancedPanel","unlock","blockEditorPrivateApis","ScreenBlock","name","variation","prefixParts","concat","prefix","join","shouldDecodeEncode","inheritedStyle","setStyle","userSettings","rawSettings","setSettings","settings","blockType","getBlockType","spacing","blockGap","supports","__experimentalSkipSerialization","some","spacingType","dimensions","aspectRatio","blockVariations","useBlockVariations","hasTypographyPanel","hasColorPanel","hasBorderPanel","hasDimensionsPanel","hasEffectsPanel","hasFiltersPanel","hasImageSettingsPanel","hasVariationsPanel","length","canEditCSS","useSelect","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","coreStore","globalStylesId","globalStyles","_links","currentBlockStyle","find","s","inheritedStyleWithLayout","useMemo","layout","styleWithLayout","onChangeDimensions","newStyle","updatedStyle","onChangeLightbox","newSetting","lightbox","onChangeBorders","radius","newBorder","updatedBorder","_react","createElement","Fragment","default","title","label","className","__experimentalVStack","__","VariationsPanel","inheritedValue","value","onChange","includeLayoutControls","PanelBody","initialOpen","sprintf","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-block.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tPanelBody,\n\t__experimentalVStack as VStack,\n\t__experimentalHasSplitBorders as hasSplitBorders,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../lock-unlock';\nimport Subtitle from './subtitle';\nimport { useBlockVariations, VariationsPanel } from './variations-panel';\n\nfunction applyFallbackStyle( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tconst hasColorOrWidth = border.color || border.width;\n\n\tif ( ! border.style && hasColorOrWidth ) {\n\t\treturn { ...border, style: 'solid' };\n\t}\n\n\tif ( border.style && ! hasColorOrWidth ) {\n\t\treturn undefined;\n\t}\n\n\treturn border;\n}\n\nfunction applyAllFallbackStyles( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tif ( hasSplitBorders( border ) ) {\n\t\treturn {\n\t\t\ttop: applyFallbackStyle( border.top ),\n\t\t\tright: applyFallbackStyle( border.right ),\n\t\t\tbottom: applyFallbackStyle( border.bottom ),\n\t\t\tleft: applyFallbackStyle( border.left ),\n\t\t};\n\t}\n\n\treturn applyFallbackStyle( border );\n}\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasBorderPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tuseHasColorPanel,\n\tuseHasEffectsPanel,\n\tuseHasFiltersPanel,\n\tuseHasImageSettingsPanel,\n\tuseGlobalStyle,\n\tBorderPanel: StylesBorderPanel,\n\tColorPanel: StylesColorPanel,\n\tTypographyPanel: StylesTypographyPanel,\n\tDimensionsPanel: StylesDimensionsPanel,\n\tEffectsPanel: StylesEffectsPanel,\n\tFiltersPanel: StylesFiltersPanel,\n\tImageSettingsPanel,\n\tAdvancedPanel: StylesAdvancedPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction ScreenBlock( { name, variation } ) {\n\tlet prefixParts = [];\n\tif ( variation ) {\n\t\tprefixParts = [ 'variations', variation ].concat( prefixParts );\n\t}\n\tconst prefix = prefixParts.join( '.' );\n\n\tconst [ style ] = useGlobalStyle( prefix, name, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( prefix, name, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ userSettings ] = useGlobalSetting( '', name, 'user' );\n\tconst [ rawSettings, setSettings ] = useGlobalSetting( '', name );\n\tconst settings = useSettingsForBlockElement( rawSettings, name );\n\tconst blockType = getBlockType( name );\n\n\t// Only allow `blockGap` support if serialization has not been skipped, to be sure global spacing can be applied.\n\tif (\n\t\tsettings?.spacing?.blockGap &&\n\t\tblockType?.supports?.spacing?.blockGap &&\n\t\t( blockType?.supports?.spacing?.__experimentalSkipSerialization ===\n\t\t\ttrue ||\n\t\t\tblockType?.supports?.spacing?.__experimentalSkipSerialization?.some?.(\n\t\t\t\t( spacingType ) => spacingType === 'blockGap'\n\t\t\t) )\n\t) {\n\t\tsettings.spacing.blockGap = false;\n\t}\n\n\t// Only allow `aspectRatio` support if the block is not the grouping block.\n\t// The grouping block allows the user to use Group, Row and Stack variations,\n\t// and it is highly likely that the user will not want to set an aspect ratio\n\t// for all three at once. Until there is the ability to set a different aspect\n\t// ratio for each variation, we disable the aspect ratio controls for the\n\t// grouping block in global styles.\n\tif ( settings?.dimensions?.aspectRatio && name === 'core/group' ) {\n\t\tsettings.dimensions.aspectRatio = false;\n\t}\n\n\tconst blockVariations = useBlockVariations( name );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasBorderPanel = useHasBorderPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasEffectsPanel = useHasEffectsPanel( settings );\n\tconst hasFiltersPanel = useHasFiltersPanel( settings );\n\tconst hasImageSettingsPanel = useHasImageSettingsPanel(\n\t\tname,\n\t\tuserSettings,\n\t\tsettings\n\t);\n\tconst hasVariationsPanel = !! blockVariations?.length && ! variation;\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\tconst currentBlockStyle = variation\n\t\t? blockVariations.find( ( s ) => s.name === variation )\n\t\t: null;\n\n\t// These intermediary objects are needed because the \"layout\" property is stored\n\t// in settings rather than styles.\n\tconst inheritedStyleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...inheritedStyle,\n\t\t\tlayout: settings.layout,\n\t\t};\n\t}, [ inheritedStyle, settings.layout ] );\n\tconst styleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...style,\n\t\t\tlayout: userSettings.layout,\n\t\t};\n\t}, [ style, userSettings.layout ] );\n\tconst onChangeDimensions = ( newStyle ) => {\n\t\tconst updatedStyle = { ...newStyle };\n\t\tdelete updatedStyle.layout;\n\t\tsetStyle( updatedStyle );\n\n\t\tif ( newStyle.layout !== userSettings.layout ) {\n\t\t\tsetSettings( {\n\t\t\t\t...userSettings,\n\t\t\t\tlayout: newStyle.layout,\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeLightbox = ( newSetting ) => {\n\t\t// If the newSetting is undefined, this means that the user has deselected\n\t\t// (reset) the lightbox setting.\n\t\tif ( newSetting === undefined ) {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlightbox: undefined,\n\t\t\t} );\n\n\t\t\t// Otherwise, we simply set the lightbox setting to the new value but\n\t\t\t// taking care of not overriding the other lightbox settings.\n\t\t} else {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlightbox: {\n\t\t\t\t\t...rawSettings.lightbox,\n\t\t\t\t\t...newSetting,\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeBorders = ( newStyle ) => {\n\t\tif ( ! newStyle?.border ) {\n\t\t\tsetStyle( newStyle );\n\t\t\treturn;\n\t\t}\n\n\t\t// As Global Styles can't conditionally generate styles based on if\n\t\t// other style properties have been set, we need to force split\n\t\t// border definitions for user set global border styles. Border\n\t\t// radius is derived from the same property i.e. `border.radius` if\n\t\t// it is a string that is used. The longhand border radii styles are\n\t\t// only generated if that property is an object.\n\t\t//\n\t\t// For borders (color, style, and width) those are all properties on\n\t\t// the `border` style property. This means if the theme.json defined\n\t\t// split borders and the user condenses them into a flat border or\n\t\t// vice-versa we'd get both sets of styles which would conflict.\n\t\tconst { radius, ...newBorder } = newStyle.border;\n\t\tconst border = applyAllFallbackStyles( newBorder );\n\t\tconst updatedBorder = ! hasSplitBorders( border )\n\t\t\t? {\n\t\t\t\t\ttop: border,\n\t\t\t\t\tright: border,\n\t\t\t\t\tbottom: border,\n\t\t\t\t\tleft: border,\n\t\t\t }\n\t\t\t: {\n\t\t\t\t\tcolor: null,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twidth: null,\n\t\t\t\t\t...border,\n\t\t\t };\n\n\t\tsetStyle( { ...newStyle, border: { ...updatedBorder, radius } } );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ variation ? currentBlockStyle.label : blockType.title }\n\t\t\t/>\n\t\t\t<BlockPreviewPanel name={ name } variation={ variation } />\n\t\t\t{ hasVariationsPanel && (\n\t\t\t\t<div className=\"edit-site-global-styles-screen-variations\">\n\t\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t\t<Subtitle>{ __( 'Style Variations' ) }</Subtitle>\n\t\t\t\t\t\t<VariationsPanel name={ name } />\n\t\t\t\t\t</VStack>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ hasColorPanel && (\n\t\t\t\t<StylesColorPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasTypographyPanel && (\n\t\t\t\t<StylesTypographyPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasDimensionsPanel && (\n\t\t\t\t<StylesDimensionsPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ onChangeDimensions }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasBorderPanel && (\n\t\t\t\t<StylesBorderPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ onChangeBorders }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasEffectsPanel && (\n\t\t\t\t<StylesEffectsPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasFiltersPanel && (\n\t\t\t\t<StylesFiltersPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasImageSettingsPanel && (\n\t\t\t\t<ImageSettingsPanel\n\t\t\t\t\tonChange={ onChangeLightbox }\n\t\t\t\t\tvalue={ userSettings }\n\t\t\t\t\tinheritedValue={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t{ canEditCSS && (\n\t\t\t\t<PanelBody title={ __( 'Advanced' ) } initialOpen={ false }>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: %s: is the name of a block e.g., 'Image' or 'Table'.\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tblockType?.title\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ScreenBlock;\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAKA,IAAAM,KAAA,GAAAN,OAAA;AAKA,IAAAO,OAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,kBAAA,GAAAD,sBAAA,CAAAR,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AACA,IAAAW,SAAA,GAAAH,sBAAA,CAAAR,OAAA;AACA,IAAAY,gBAAA,GAAAZ,OAAA;AAtBA;AACA;AACA;;AAaA;AACA;AACA;;AAOA,SAASa,kBAAkBA,CAAEC,MAAM,EAAG;EACrC,IAAK,CAAEA,MAAM,EAAG;IACf,OAAOA,MAAM;EACd;EAEA,MA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AK,EAAGtB,eAAiB;IACzBuB,QAAQ,EAAGhE,QAAU;IACrBI,QAAQ,EAAGA,QAAU;IACrB6D,qBAAqB;EAAA,CACrB,CACD,EACC1C,qBAAqB,IACtB,IAAA6B,MAAA,CAAAC,aAAA,EAACnE,kBAAkB;IAClB8E,QAAQ,EAAGnB,gBAAkB;IAC7BkB,KAAK,EAAG9D,YAAc;IACtB6D,cAAc,EAAG1D;EAAU,CAC3B,CACD,EAECsB,UAAU,IACX,IAAA0B,MAAA,CAAAC,aAAA,EAAC9G,WAAA,CAAA2H,SAAS;IAACV,KAAK,EAAG,IAAAI,QAAE,EAAE,UAAW,CAAG;IAACO,WAAW,EAAG;EAAO,GAC1D,IAAAf,MAAA,CAAAC,aAAA,aACG,IAAAe,aAAO;EACR;EACA,IAAAR,QAAE,EACD,2IACD,CAAC,EACDvD,SAAS,EAAEmD,KACZ,CACE,CAAC,EACJ,IAAAJ,MAAA,CAAAC,aAAA,EAACjE,mBAAmB;IACnB2E,KAAK,EAAG3G,KAAO;IACf4G,QAAQ,EAAGhE,QAAU;IACrB8D,cAAc,EAAG/D;EAAgB,CACjC,CACS,CAEX,CAAC;AAEL;AAAC,IAAAsE,QAAA,GAEc9E,WAAW;AAAA+E,OAAA,CAAAf,OAAA,GAAAc,QAAA"}
|
|
@@ -18,7 +18,7 @@ function TabPanelLayout({
|
|
|
18
18
|
}), createElement(VStack, {
|
|
19
19
|
spacing: 4,
|
|
20
20
|
justify: "space-between"
|
|
21
|
-
}, createElement(
|
|
21
|
+
}, createElement(VStack, {
|
|
22
22
|
spacing: 2
|
|
23
23
|
}, createElement(HStack, {
|
|
24
24
|
justify: "flex-start"
|
|
@@ -31,7 +31,11 @@ function TabPanelLayout({
|
|
|
31
31
|
level: 2,
|
|
32
32
|
size: 13,
|
|
33
33
|
className: "edit-site-global-styles-header"
|
|
34
|
-
}, title)), description && createElement(Text, null, description))
|
|
34
|
+
}, title)), description && createElement(Text, null, description)), createElement("div", {
|
|
35
|
+
className: "font-library-modal__tabpanel-layout__main"
|
|
36
|
+
}, children), footer && createElement("div", {
|
|
37
|
+
className: "font-library-modal__tabpanel-layout__footer"
|
|
38
|
+
}, footer)));
|
|
35
39
|
}
|
|
36
40
|
export default TabPanelLayout;
|
|
37
41
|
//# sourceMappingURL=tab-panel-layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__experimentalText","Text","__experimentalHeading","Heading","__experimentalVStack","VStack","__experimentalSpacer","Spacer","__experimentalHStack","HStack","Button","chevronLeft","TabPanelLayout","title","description","handleBack","children","footer","createElement","className","margin","spacing","justify","variant","onClick","icon","size","level"],"sources":["@wordpress/edit-site/src/components/global-styles/font-library-modal/tab-panel-layout.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalText as Text,\n\t__experimentalHeading as Heading,\n\t__experimentalVStack as VStack,\n\t__experimentalSpacer as Spacer,\n\t__experimentalHStack as HStack,\n\tButton,\n} from '@wordpress/components';\nimport { chevronLeft } from '@wordpress/icons';\n\nfunction TabPanelLayout( {\n\ttitle,\n\tdescription,\n\thandleBack,\n\tchildren,\n\tfooter,\n} ) {\n\treturn (\n\t\t<div className=\"font-library-modal__tabpanel-layout\">\n\t\t\t<Spacer margin={ 4 } />\n\t\t\t<VStack spacing={ 4 } justify=\"space-between\">\n\t\t\t\t<
|
|
1
|
+
{"version":3,"names":["__experimentalText","Text","__experimentalHeading","Heading","__experimentalVStack","VStack","__experimentalSpacer","Spacer","__experimentalHStack","HStack","Button","chevronLeft","TabPanelLayout","title","description","handleBack","children","footer","createElement","className","margin","spacing","justify","variant","onClick","icon","size","level"],"sources":["@wordpress/edit-site/src/components/global-styles/font-library-modal/tab-panel-layout.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalText as Text,\n\t__experimentalHeading as Heading,\n\t__experimentalVStack as VStack,\n\t__experimentalSpacer as Spacer,\n\t__experimentalHStack as HStack,\n\tButton,\n} from '@wordpress/components';\nimport { chevronLeft } from '@wordpress/icons';\n\nfunction TabPanelLayout( {\n\ttitle,\n\tdescription,\n\thandleBack,\n\tchildren,\n\tfooter,\n} ) {\n\treturn (\n\t\t<div className=\"font-library-modal__tabpanel-layout\">\n\t\t\t<Spacer margin={ 4 } />\n\t\t\t<VStack spacing={ 4 } justify=\"space-between\">\n\t\t\t\t<VStack spacing={ 2 }>\n\t\t\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t\t\t{ !! handleBack && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\tonClick={ handleBack }\n\t\t\t\t\t\t\t\ticon={ chevronLeft }\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ title && (\n\t\t\t\t\t\t\t<Heading\n\t\t\t\t\t\t\t\tlevel={ 2 }\n\t\t\t\t\t\t\t\tsize={ 13 }\n\t\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-header\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</HStack>\n\t\t\t\t\t{ description && <Text>{ description }</Text> }\n\t\t\t\t</VStack>\n\t\t\t\t<div className=\"font-library-modal__tabpanel-layout__main\">\n\t\t\t\t\t{ children }\n\t\t\t\t</div>\n\t\t\t\t{ footer && (\n\t\t\t\t\t<div className=\"font-library-modal__tabpanel-layout__footer\">\n\t\t\t\t\t\t{ footer }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</VStack>\n\t\t</div>\n\t);\n}\n\nexport default TabPanelLayout;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,kBAAkB,IAAIC,IAAI,EAC1BC,qBAAqB,IAAIC,OAAO,EAChCC,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,EAC9BC,MAAM,QACA,uBAAuB;AAC9B,SAASC,WAAW,QAAQ,kBAAkB;AAE9C,SAASC,cAAcA,CAAE;EACxBC,KAAK;EACLC,WAAW;EACXC,UAAU;EACVC,QAAQ;EACRC;AACD,CAAC,EAAG;EACH,OACCC,aAAA;IAAKC,SAAS,EAAC;EAAqC,GACnDD,aAAA,CAACX,MAAM;IAACa,MAAM,EAAG;EAAG,CAAE,CAAC,EACvBF,aAAA,CAACb,MAAM;IAACgB,OAAO,EAAG,CAAG;IAACC,OAAO,EAAC;EAAe,GAC5CJ,aAAA,CAACb,MAAM;IAACgB,OAAO,EAAG;EAAG,GACpBH,aAAA,CAACT,MAAM;IAACa,OAAO,EAAC;EAAY,GACzB,CAAC,CAAEP,UAAU,IACdG,aAAA,CAACR,MAAM;IACNa,OAAO,EAAC,UAAU;IAClBC,OAAO,EAAGT,UAAY;IACtBU,IAAI,EAAGd,WAAa;IACpBe,IAAI,EAAC;EAAO,CACZ,CACD,EACCb,KAAK,IACNK,aAAA,CAACf,OAAO;IACPwB,KAAK,EAAG,CAAG;IACXD,IAAI,EAAG,EAAI;IACXP,SAAS,EAAC;EAAgC,GAExCN,KACM,CAEH,CAAC,EACPC,WAAW,IAAII,aAAA,CAACjB,IAAI,QAAGa,WAAmB,CACrC,CAAC,EACTI,aAAA;IAAKC,SAAS,EAAC;EAA2C,GACvDH,QACE,CAAC,EACJC,MAAM,IACPC,aAAA;IAAKC,SAAS,EAAC;EAA6C,GACzDF,MACE,CAEC,CACJ,CAAC;AAER;AAEA,eAAeL,cAAc"}
|
|
@@ -92,6 +92,16 @@ function ScreenBlock({
|
|
|
92
92
|
if (settings?.spacing?.blockGap && blockType?.supports?.spacing?.blockGap && (blockType?.supports?.spacing?.__experimentalSkipSerialization === true || blockType?.supports?.spacing?.__experimentalSkipSerialization?.some?.(spacingType => spacingType === 'blockGap'))) {
|
|
93
93
|
settings.spacing.blockGap = false;
|
|
94
94
|
}
|
|
95
|
+
|
|
96
|
+
// Only allow `aspectRatio` support if the block is not the grouping block.
|
|
97
|
+
// The grouping block allows the user to use Group, Row and Stack variations,
|
|
98
|
+
// and it is highly likely that the user will not want to set an aspect ratio
|
|
99
|
+
// for all three at once. Until there is the ability to set a different aspect
|
|
100
|
+
// ratio for each variation, we disable the aspect ratio controls for the
|
|
101
|
+
// grouping block in global styles.
|
|
102
|
+
if (settings?.dimensions?.aspectRatio && name === 'core/group') {
|
|
103
|
+
settings.dimensions.aspectRatio = false;
|
|
104
|
+
}
|
|
95
105
|
const blockVariations = useBlockVariations(name);
|
|
96
106
|
const hasTypographyPanel = useHasTypographyPanel(settings);
|
|
97
107
|
const hasColorPanel = useHasColorPanel(settings);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getBlockType","privateApis","blockEditorPrivateApis","useMemo","useSelect","store","coreStore","PanelBody","__experimentalVStack","VStack","__experimentalHasSplitBorders","hasSplitBorders","__","sprintf","ScreenHeader","BlockPreviewPanel","unlock","Subtitle","useBlockVariations","VariationsPanel","applyFallbackStyle","border","hasColorOrWidth","color","width","style","undefined","applyAllFallbackStyles","top","right","bottom","left","useHasDimensionsPanel","useHasTypographyPanel","useHasBorderPanel","useGlobalSetting","useSettingsForBlockElement","useHasColorPanel","useHasEffectsPanel","useHasFiltersPanel","useHasImageSettingsPanel","useGlobalStyle","BorderPanel","StylesBorderPanel","ColorPanel","StylesColorPanel","TypographyPanel","StylesTypographyPanel","DimensionsPanel","StylesDimensionsPanel","EffectsPanel","StylesEffectsPanel","FiltersPanel","StylesFiltersPanel","ImageSettingsPanel","AdvancedPanel","StylesAdvancedPanel","ScreenBlock","name","variation","prefixParts","concat","prefix","join","shouldDecodeEncode","inheritedStyle","setStyle","userSettings","rawSettings","setSettings","settings","blockType","spacing","blockGap","supports","__experimentalSkipSerialization","some","spacingType","blockVariations","hasTypographyPanel","hasColorPanel","hasBorderPanel","hasDimensionsPanel","hasEffectsPanel","hasFiltersPanel","hasImageSettingsPanel","hasVariationsPanel","length","canEditCSS","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","_links","currentBlockStyle","find","s","inheritedStyleWithLayout","layout","styleWithLayout","onChangeDimensions","newStyle","updatedStyle","onChangeLightbox","newSetting","lightbox","onChangeBorders","radius","newBorder","updatedBorder","createElement","Fragment","title","label","className","inheritedValue","value","onChange","includeLayoutControls","initialOpen"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-block.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tPanelBody,\n\t__experimentalVStack as VStack,\n\t__experimentalHasSplitBorders as hasSplitBorders,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../lock-unlock';\nimport Subtitle from './subtitle';\nimport { useBlockVariations, VariationsPanel } from './variations-panel';\n\nfunction applyFallbackStyle( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tconst hasColorOrWidth = border.color || border.width;\n\n\tif ( ! border.style && hasColorOrWidth ) {\n\t\treturn { ...border, style: 'solid' };\n\t}\n\n\tif ( border.style && ! hasColorOrWidth ) {\n\t\treturn undefined;\n\t}\n\n\treturn border;\n}\n\nfunction applyAllFallbackStyles( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tif ( hasSplitBorders( border ) ) {\n\t\treturn {\n\t\t\ttop: applyFallbackStyle( border.top ),\n\t\t\tright: applyFallbackStyle( border.right ),\n\t\t\tbottom: applyFallbackStyle( border.bottom ),\n\t\t\tleft: applyFallbackStyle( border.left ),\n\t\t};\n\t}\n\n\treturn applyFallbackStyle( border );\n}\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasBorderPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tuseHasColorPanel,\n\tuseHasEffectsPanel,\n\tuseHasFiltersPanel,\n\tuseHasImageSettingsPanel,\n\tuseGlobalStyle,\n\tBorderPanel: StylesBorderPanel,\n\tColorPanel: StylesColorPanel,\n\tTypographyPanel: StylesTypographyPanel,\n\tDimensionsPanel: StylesDimensionsPanel,\n\tEffectsPanel: StylesEffectsPanel,\n\tFiltersPanel: StylesFiltersPanel,\n\tImageSettingsPanel,\n\tAdvancedPanel: StylesAdvancedPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction ScreenBlock( { name, variation } ) {\n\tlet prefixParts = [];\n\tif ( variation ) {\n\t\tprefixParts = [ 'variations', variation ].concat( prefixParts );\n\t}\n\tconst prefix = prefixParts.join( '.' );\n\n\tconst [ style ] = useGlobalStyle( prefix, name, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( prefix, name, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ userSettings ] = useGlobalSetting( '', name, 'user' );\n\tconst [ rawSettings, setSettings ] = useGlobalSetting( '', name );\n\tconst settings = useSettingsForBlockElement( rawSettings, name );\n\tconst blockType = getBlockType( name );\n\n\t// Only allow `blockGap` support if serialization has not been skipped, to be sure global spacing can be applied.\n\tif (\n\t\tsettings?.spacing?.blockGap &&\n\t\tblockType?.supports?.spacing?.blockGap &&\n\t\t( blockType?.supports?.spacing?.__experimentalSkipSerialization ===\n\t\t\ttrue ||\n\t\t\tblockType?.supports?.spacing?.__experimentalSkipSerialization?.some?.(\n\t\t\t\t( spacingType ) => spacingType === 'blockGap'\n\t\t\t) )\n\t) {\n\t\tsettings.spacing.blockGap = false;\n\t}\n\n\tconst blockVariations = useBlockVariations( name );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasBorderPanel = useHasBorderPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasEffectsPanel = useHasEffectsPanel( settings );\n\tconst hasFiltersPanel = useHasFiltersPanel( settings );\n\tconst hasImageSettingsPanel = useHasImageSettingsPanel(\n\t\tname,\n\t\tuserSettings,\n\t\tsettings\n\t);\n\tconst hasVariationsPanel = !! blockVariations?.length && ! variation;\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\tconst currentBlockStyle = variation\n\t\t? blockVariations.find( ( s ) => s.name === variation )\n\t\t: null;\n\n\t// These intermediary objects are needed because the \"layout\" property is stored\n\t// in settings rather than styles.\n\tconst inheritedStyleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...inheritedStyle,\n\t\t\tlayout: settings.layout,\n\t\t};\n\t}, [ inheritedStyle, settings.layout ] );\n\tconst styleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...style,\n\t\t\tlayout: userSettings.layout,\n\t\t};\n\t}, [ style, userSettings.layout ] );\n\tconst onChangeDimensions = ( newStyle ) => {\n\t\tconst updatedStyle = { ...newStyle };\n\t\tdelete updatedStyle.layout;\n\t\tsetStyle( updatedStyle );\n\n\t\tif ( newStyle.layout !== userSettings.layout ) {\n\t\t\tsetSettings( {\n\t\t\t\t...userSettings,\n\t\t\t\tlayout: newStyle.layout,\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeLightbox = ( newSetting ) => {\n\t\t// If the newSetting is undefined, this means that the user has deselected\n\t\t// (reset) the lightbox setting.\n\t\tif ( newSetting === undefined ) {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlightbox: undefined,\n\t\t\t} );\n\n\t\t\t// Otherwise, we simply set the lightbox setting to the new value but\n\t\t\t// taking care of not overriding the other lightbox settings.\n\t\t} else {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlightbox: {\n\t\t\t\t\t...rawSettings.lightbox,\n\t\t\t\t\t...newSetting,\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeBorders = ( newStyle ) => {\n\t\tif ( ! newStyle?.border ) {\n\t\t\tsetStyle( newStyle );\n\t\t\treturn;\n\t\t}\n\n\t\t// As Global Styles can't conditionally generate styles based on if\n\t\t// other style properties have been set, we need to force split\n\t\t// border definitions for user set global border styles. Border\n\t\t// radius is derived from the same property i.e. `border.radius` if\n\t\t// it is a string that is used. The longhand border radii styles are\n\t\t// only generated if that property is an object.\n\t\t//\n\t\t// For borders (color, style, and width) those are all properties on\n\t\t// the `border` style property. This means if the theme.json defined\n\t\t// split borders and the user condenses them into a flat border or\n\t\t// vice-versa we'd get both sets of styles which would conflict.\n\t\tconst { radius, ...newBorder } = newStyle.border;\n\t\tconst border = applyAllFallbackStyles( newBorder );\n\t\tconst updatedBorder = ! hasSplitBorders( border )\n\t\t\t? {\n\t\t\t\t\ttop: border,\n\t\t\t\t\tright: border,\n\t\t\t\t\tbottom: border,\n\t\t\t\t\tleft: border,\n\t\t\t }\n\t\t\t: {\n\t\t\t\t\tcolor: null,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twidth: null,\n\t\t\t\t\t...border,\n\t\t\t };\n\n\t\tsetStyle( { ...newStyle, border: { ...updatedBorder, radius } } );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ variation ? currentBlockStyle.label : blockType.title }\n\t\t\t/>\n\t\t\t<BlockPreviewPanel name={ name } variation={ variation } />\n\t\t\t{ hasVariationsPanel && (\n\t\t\t\t<div className=\"edit-site-global-styles-screen-variations\">\n\t\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t\t<Subtitle>{ __( 'Style Variations' ) }</Subtitle>\n\t\t\t\t\t\t<VariationsPanel name={ name } />\n\t\t\t\t\t</VStack>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ hasColorPanel && (\n\t\t\t\t<StylesColorPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasTypographyPanel && (\n\t\t\t\t<StylesTypographyPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasDimensionsPanel && (\n\t\t\t\t<StylesDimensionsPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ onChangeDimensions }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasBorderPanel && (\n\t\t\t\t<StylesBorderPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ onChangeBorders }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasEffectsPanel && (\n\t\t\t\t<StylesEffectsPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasFiltersPanel && (\n\t\t\t\t<StylesFiltersPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasImageSettingsPanel && (\n\t\t\t\t<ImageSettingsPanel\n\t\t\t\t\tonChange={ onChangeLightbox }\n\t\t\t\t\tvalue={ userSettings }\n\t\t\t\t\tinheritedValue={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t{ canEditCSS && (\n\t\t\t\t<PanelBody title={ __( 'Advanced' ) } initialOpen={ false }>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: %s: is the name of a block e.g., 'Image' or 'Table'.\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tblockType?.title\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ScreenBlock;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,mBAAmB;AAChD,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;AAC/E,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SACCC,SAAS,EACTC,oBAAoB,IAAIC,MAAM,EAC9BC,6BA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,gBAAkB;IAC7Ba,KAAK,EAAGlD,YAAc;IACtBiD,cAAc,EAAG9C;EAAU,CAC3B,CACD,EAECkB,UAAU,IACXuB,aAAA,CAACxG,SAAS;IAAC0G,KAAK,EAAGrG,EAAE,CAAE,UAAW,CAAG;IAAC4G,WAAW,EAAG;EAAO,GAC1DT,aAAA,YACGlG,OAAO;EACR;EACAD,EAAE,CACD,2IACD,CAAC,EACD2D,SAAS,EAAE0C,KACZ,CACE,CAAC,EACJF,aAAA,CAACvD,mBAAmB;IACnB6D,KAAK,EAAG5F,KAAO;IACf6F,QAAQ,EAAGpD,QAAU;IACrBkD,cAAc,EAAGnD;EAAgB,CACjC,CACS,CAEX,CAAC;AAEL;AAEA,eAAeR,WAAW"}
|
|
1
|
+
{"version":3,"names":["getBlockType","privateApis","blockEditorPrivateApis","useMemo","useSelect","store","coreStore","PanelBody","__experimentalVStack","VStack","__experimentalHasSplitBorders","hasSplitBorders","__","sprintf","ScreenHeader","BlockPreviewPanel","unlock","Subtitle","useBlockVariations","VariationsPanel","applyFallbackStyle","border","hasColorOrWidth","color","width","style","undefined","applyAllFallbackStyles","top","right","bottom","left","useHasDimensionsPanel","useHasTypographyPanel","useHasBorderPanel","useGlobalSetting","useSettingsForBlockElement","useHasColorPanel","useHasEffectsPanel","useHasFiltersPanel","useHasImageSettingsPanel","useGlobalStyle","BorderPanel","StylesBorderPanel","ColorPanel","StylesColorPanel","TypographyPanel","StylesTypographyPanel","DimensionsPanel","StylesDimensionsPanel","EffectsPanel","StylesEffectsPanel","FiltersPanel","StylesFiltersPanel","ImageSettingsPanel","AdvancedPanel","StylesAdvancedPanel","ScreenBlock","name","variation","prefixParts","concat","prefix","join","shouldDecodeEncode","inheritedStyle","setStyle","userSettings","rawSettings","setSettings","settings","blockType","spacing","blockGap","supports","__experimentalSkipSerialization","some","spacingType","dimensions","aspectRatio","blockVariations","hasTypographyPanel","hasColorPanel","hasBorderPanel","hasDimensionsPanel","hasEffectsPanel","hasFiltersPanel","hasImageSettingsPanel","hasVariationsPanel","length","canEditCSS","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","_links","currentBlockStyle","find","s","inheritedStyleWithLayout","layout","styleWithLayout","onChangeDimensions","newStyle","updatedStyle","onChangeLightbox","newSetting","lightbox","onChangeBorders","radius","newBorder","updatedBorder","createElement","Fragment","title","label","className","inheritedValue","value","onChange","includeLayoutControls","initialOpen"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-block.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tPanelBody,\n\t__experimentalVStack as VStack,\n\t__experimentalHasSplitBorders as hasSplitBorders,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../lock-unlock';\nimport Subtitle from './subtitle';\nimport { useBlockVariations, VariationsPanel } from './variations-panel';\n\nfunction applyFallbackStyle( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tconst hasColorOrWidth = border.color || border.width;\n\n\tif ( ! border.style && hasColorOrWidth ) {\n\t\treturn { ...border, style: 'solid' };\n\t}\n\n\tif ( border.style && ! hasColorOrWidth ) {\n\t\treturn undefined;\n\t}\n\n\treturn border;\n}\n\nfunction applyAllFallbackStyles( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tif ( hasSplitBorders( border ) ) {\n\t\treturn {\n\t\t\ttop: applyFallbackStyle( border.top ),\n\t\t\tright: applyFallbackStyle( border.right ),\n\t\t\tbottom: applyFallbackStyle( border.bottom ),\n\t\t\tleft: applyFallbackStyle( border.left ),\n\t\t};\n\t}\n\n\treturn applyFallbackStyle( border );\n}\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasBorderPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tuseHasColorPanel,\n\tuseHasEffectsPanel,\n\tuseHasFiltersPanel,\n\tuseHasImageSettingsPanel,\n\tuseGlobalStyle,\n\tBorderPanel: StylesBorderPanel,\n\tColorPanel: StylesColorPanel,\n\tTypographyPanel: StylesTypographyPanel,\n\tDimensionsPanel: StylesDimensionsPanel,\n\tEffectsPanel: StylesEffectsPanel,\n\tFiltersPanel: StylesFiltersPanel,\n\tImageSettingsPanel,\n\tAdvancedPanel: StylesAdvancedPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction ScreenBlock( { name, variation } ) {\n\tlet prefixParts = [];\n\tif ( variation ) {\n\t\tprefixParts = [ 'variations', variation ].concat( prefixParts );\n\t}\n\tconst prefix = prefixParts.join( '.' );\n\n\tconst [ style ] = useGlobalStyle( prefix, name, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( prefix, name, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ userSettings ] = useGlobalSetting( '', name, 'user' );\n\tconst [ rawSettings, setSettings ] = useGlobalSetting( '', name );\n\tconst settings = useSettingsForBlockElement( rawSettings, name );\n\tconst blockType = getBlockType( name );\n\n\t// Only allow `blockGap` support if serialization has not been skipped, to be sure global spacing can be applied.\n\tif (\n\t\tsettings?.spacing?.blockGap &&\n\t\tblockType?.supports?.spacing?.blockGap &&\n\t\t( blockType?.supports?.spacing?.__experimentalSkipSerialization ===\n\t\t\ttrue ||\n\t\t\tblockType?.supports?.spacing?.__experimentalSkipSerialization?.some?.(\n\t\t\t\t( spacingType ) => spacingType === 'blockGap'\n\t\t\t) )\n\t) {\n\t\tsettings.spacing.blockGap = false;\n\t}\n\n\t// Only allow `aspectRatio` support if the block is not the grouping block.\n\t// The grouping block allows the user to use Group, Row and Stack variations,\n\t// and it is highly likely that the user will not want to set an aspect ratio\n\t// for all three at once. Until there is the ability to set a different aspect\n\t// ratio for each variation, we disable the aspect ratio controls for the\n\t// grouping block in global styles.\n\tif ( settings?.dimensions?.aspectRatio && name === 'core/group' ) {\n\t\tsettings.dimensions.aspectRatio = false;\n\t}\n\n\tconst blockVariations = useBlockVariations( name );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasBorderPanel = useHasBorderPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasEffectsPanel = useHasEffectsPanel( settings );\n\tconst hasFiltersPanel = useHasFiltersPanel( settings );\n\tconst hasImageSettingsPanel = useHasImageSettingsPanel(\n\t\tname,\n\t\tuserSettings,\n\t\tsettings\n\t);\n\tconst hasVariationsPanel = !! blockVariations?.length && ! variation;\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\tconst currentBlockStyle = variation\n\t\t? blockVariations.find( ( s ) => s.name === variation )\n\t\t: null;\n\n\t// These intermediary objects are needed because the \"layout\" property is stored\n\t// in settings rather than styles.\n\tconst inheritedStyleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...inheritedStyle,\n\t\t\tlayout: settings.layout,\n\t\t};\n\t}, [ inheritedStyle, settings.layout ] );\n\tconst styleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...style,\n\t\t\tlayout: userSettings.layout,\n\t\t};\n\t}, [ style, userSettings.layout ] );\n\tconst onChangeDimensions = ( newStyle ) => {\n\t\tconst updatedStyle = { ...newStyle };\n\t\tdelete updatedStyle.layout;\n\t\tsetStyle( updatedStyle );\n\n\t\tif ( newStyle.layout !== userSettings.layout ) {\n\t\t\tsetSettings( {\n\t\t\t\t...userSettings,\n\t\t\t\tlayout: newStyle.layout,\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeLightbox = ( newSetting ) => {\n\t\t// If the newSetting is undefined, this means that the user has deselected\n\t\t// (reset) the lightbox setting.\n\t\tif ( newSetting === undefined ) {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlightbox: undefined,\n\t\t\t} );\n\n\t\t\t// Otherwise, we simply set the lightbox setting to the new value but\n\t\t\t// taking care of not overriding the other lightbox settings.\n\t\t} else {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlightbox: {\n\t\t\t\t\t...rawSettings.lightbox,\n\t\t\t\t\t...newSetting,\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeBorders = ( newStyle ) => {\n\t\tif ( ! newStyle?.border ) {\n\t\t\tsetStyle( newStyle );\n\t\t\treturn;\n\t\t}\n\n\t\t// As Global Styles can't conditionally generate styles based on if\n\t\t// other style properties have been set, we need to force split\n\t\t// border definitions for user set global border styles. Border\n\t\t// radius is derived from the same property i.e. `border.radius` if\n\t\t// it is a string that is used. The longhand border radii styles are\n\t\t// only generated if that property is an object.\n\t\t//\n\t\t// For borders (color, style, and width) those are all properties on\n\t\t// the `border` style property. This means if the theme.json defined\n\t\t// split borders and the user condenses them into a flat border or\n\t\t// vice-versa we'd get both sets of styles which would conflict.\n\t\tconst { radius, ...newBorder } = newStyle.border;\n\t\tconst border = applyAllFallbackStyles( newBorder );\n\t\tconst updatedBorder = ! hasSplitBorders( border )\n\t\t\t? {\n\t\t\t\t\ttop: border,\n\t\t\t\t\tright: border,\n\t\t\t\t\tbottom: border,\n\t\t\t\t\tleft: border,\n\t\t\t }\n\t\t\t: {\n\t\t\t\t\tcolor: null,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twidth: null,\n\t\t\t\t\t...border,\n\t\t\t };\n\n\t\tsetStyle( { ...newStyle, border: { ...updatedBorder, radius } } );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ variation ? currentBlockStyle.label : blockType.title }\n\t\t\t/>\n\t\t\t<BlockPreviewPanel name={ name } variation={ variation } />\n\t\t\t{ hasVariationsPanel && (\n\t\t\t\t<div className=\"edit-site-global-styles-screen-variations\">\n\t\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t\t<Subtitle>{ __( 'Style Variations' ) }</Subtitle>\n\t\t\t\t\t\t<VariationsPanel name={ name } />\n\t\t\t\t\t</VStack>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ hasColorPanel && (\n\t\t\t\t<StylesColorPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasTypographyPanel && (\n\t\t\t\t<StylesTypographyPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasDimensionsPanel && (\n\t\t\t\t<StylesDimensionsPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ onChangeDimensions }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasBorderPanel && (\n\t\t\t\t<StylesBorderPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ onChangeBorders }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasEffectsPanel && (\n\t\t\t\t<StylesEffectsPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasFiltersPanel && (\n\t\t\t\t<StylesFiltersPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasImageSettingsPanel && (\n\t\t\t\t<ImageSettingsPanel\n\t\t\t\t\tonChange={ onChangeLightbox }\n\t\t\t\t\tvalue={ userSettings }\n\t\t\t\t\tinheritedValue={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t{ canEditCSS && (\n\t\t\t\t<PanelBody title={ __( 'Advanced' ) } initialOpen={ false }>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: %s: is the name of a block e.g., 'Image' or 'Table'.\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tblockType?.title\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ScreenBlock;\n"],"mappings":";AAAA;A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D,kBAAkB;IAClBmE,cAAc,EAAGlB,wBAA0B;IAC3CmB,KAAK,EAAGjB,eAAiB;IACzBkB,QAAQ,EAAGtD,QAAU;IACrBI,QAAQ,EAAGA,QAAU;IACrBmD,qBAAqB;EAAA,CACrB,CACD,EACCnC,eAAe,IAChB2B,aAAA,CAAC5D,kBAAkB;IAClBiE,cAAc,EAAGlB,wBAA0B;IAC3CmB,KAAK,EAAGjB,eAAiB;IACzBkB,QAAQ,EAAGtD,QAAU;IACrBI,QAAQ,EAAGA,QAAU;IACrBmD,qBAAqB;EAAA,CACrB,CACD,EACClC,qBAAqB,IACtB0B,aAAA,CAAC3D,kBAAkB;IAClBkE,QAAQ,EAAGd,gBAAkB;IAC7Ba,KAAK,EAAGpD,YAAc;IACtBmD,cAAc,EAAGhD;EAAU,CAC3B,CACD,EAECoB,UAAU,IACXuB,aAAA,CAAC1G,SAAS;IAAC4G,KAAK,EAAGvG,EAAE,CAAE,UAAW,CAAG;IAAC8G,WAAW,EAAG;EAAO,GAC1DT,aAAA,YACGpG,OAAO;EACR;EACAD,EAAE,CACD,2IACD,CAAC,EACD2D,SAAS,EAAE4C,KACZ,CACE,CAAC,EACJF,aAAA,CAACzD,mBAAmB;IACnB+D,KAAK,EAAG9F,KAAO;IACf+F,QAAQ,EAAGtD,QAAU;IACrBoD,cAAc,EAAGrD;EAAgB,CACjC,CACS,CAEX,CAAC;AAEL;AAEA,eAAeR,WAAW"}
|
|
@@ -4106,11 +4106,11 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
|
|
|
4106
4106
|
font-size: 11px;
|
|
4107
4107
|
}
|
|
4108
4108
|
|
|
4109
|
-
.font-library-modal__tabpanel-layout
|
|
4110
|
-
padding-bottom:
|
|
4109
|
+
.font-library-modal__tabpanel-layout .font-library-modal__tabpanel-layout__main {
|
|
4110
|
+
padding-bottom: 64px;
|
|
4111
4111
|
}
|
|
4112
|
-
.font-library-modal__tabpanel-layout
|
|
4113
|
-
border-top: 1px solid #
|
|
4112
|
+
.font-library-modal__tabpanel-layout .font-library-modal__tabpanel-layout__footer {
|
|
4113
|
+
border-top: 1px solid #ddd;
|
|
4114
4114
|
margin: 0 -32px -32px;
|
|
4115
4115
|
padding: 16px 32px;
|
|
4116
4116
|
position: absolute;
|
|
@@ -4125,10 +4125,10 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
|
|
|
4125
4125
|
}
|
|
4126
4126
|
|
|
4127
4127
|
.font-library-modal__font-card {
|
|
4128
|
-
border: 1px solid #
|
|
4128
|
+
border: 1px solid #e0e0e0;
|
|
4129
4129
|
width: 100%;
|
|
4130
4130
|
height: auto;
|
|
4131
|
-
padding:
|
|
4131
|
+
padding: 16px;
|
|
4132
4132
|
margin-top: -1px;
|
|
4133
4133
|
/* To collapse the margin with the previous element */
|
|
4134
4134
|
}
|
|
@@ -4136,26 +4136,25 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
|
|
|
4136
4136
|
font-weight: bold;
|
|
4137
4137
|
}
|
|
4138
4138
|
.font-library-modal__font-card .font-library-modal__font-card__count {
|
|
4139
|
-
color: #
|
|
4139
|
+
color: #757575;
|
|
4140
4140
|
}
|
|
4141
4141
|
|
|
4142
4142
|
.font-library-modal__library-font-variant {
|
|
4143
|
-
border: 1px solid #
|
|
4144
|
-
padding:
|
|
4143
|
+
border: 1px solid #e0e0e0;
|
|
4144
|
+
padding: 16px;
|
|
4145
4145
|
margin-top: -1px;
|
|
4146
4146
|
/* To collapse the margin with the previous element */
|
|
4147
4147
|
}
|
|
4148
4148
|
|
|
4149
4149
|
.font-library-modal__font-variant {
|
|
4150
|
-
border-bottom: 1px solid #
|
|
4151
|
-
padding-bottom:
|
|
4150
|
+
border-bottom: 1px solid #e0e0e0;
|
|
4151
|
+
padding-bottom: 16px;
|
|
4152
4152
|
}
|
|
4153
4153
|
|
|
4154
4154
|
.font-library-modal__tabs [role=tablist] {
|
|
4155
4155
|
position: sticky;
|
|
4156
4156
|
top: 0;
|
|
4157
|
-
|
|
4158
|
-
border-bottom: 1px solid #e6e6e6;
|
|
4157
|
+
border-bottom: 1px solid #ddd;
|
|
4159
4158
|
background: #fff;
|
|
4160
4159
|
margin: 0 -32px;
|
|
4161
4160
|
padding: 0 16px;
|
|
@@ -4166,7 +4165,7 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
|
|
|
4166
4165
|
align-items: center;
|
|
4167
4166
|
display: flex;
|
|
4168
4167
|
justify-content: center;
|
|
4169
|
-
height:
|
|
4168
|
+
height: 256px;
|
|
4170
4169
|
width: 100%;
|
|
4171
4170
|
}
|
|
4172
4171
|
|
|
@@ -4179,20 +4178,12 @@ button.font-library-modal__upload-area {
|
|
|
4179
4178
|
width: 80%;
|
|
4180
4179
|
}
|
|
4181
4180
|
.font-library-modal__local-fonts .font-library-modal__upload-area__text {
|
|
4182
|
-
color: #
|
|
4181
|
+
color: #757575;
|
|
4183
4182
|
}
|
|
4184
4183
|
.font-library-modal__local-fonts .font-library-modal__upload-area__notice {
|
|
4185
4184
|
margin: 0;
|
|
4186
4185
|
}
|
|
4187
4186
|
|
|
4188
|
-
.font-library-modal__font-name {
|
|
4189
|
-
font-weight: bold;
|
|
4190
|
-
}
|
|
4191
|
-
|
|
4192
|
-
.font-library-modal__font-filename {
|
|
4193
|
-
color: #6e6e6e;
|
|
4194
|
-
}
|
|
4195
|
-
|
|
4196
4187
|
.font-library-modal__font-variant_demo-wrapper {
|
|
4197
4188
|
white-space: nowrap;
|
|
4198
4189
|
overflow: hidden;
|
|
@@ -4223,10 +4214,6 @@ button.font-library-modal__upload-area {
|
|
|
4223
4214
|
max-width: 350px;
|
|
4224
4215
|
}
|
|
4225
4216
|
|
|
4226
|
-
.font-library-modal__font-collection__notice {
|
|
4227
|
-
margin: 0;
|
|
4228
|
-
}
|
|
4229
|
-
|
|
4230
4217
|
.edit-site-pagination .components-button.is-tertiary {
|
|
4231
4218
|
width: 32px;
|
|
4232
4219
|
height: 32px;
|
package/build-style/style.css
CHANGED
|
@@ -4107,11 +4107,11 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
|
|
|
4107
4107
|
font-size: 11px;
|
|
4108
4108
|
}
|
|
4109
4109
|
|
|
4110
|
-
.font-library-modal__tabpanel-layout
|
|
4111
|
-
padding-bottom:
|
|
4110
|
+
.font-library-modal__tabpanel-layout .font-library-modal__tabpanel-layout__main {
|
|
4111
|
+
padding-bottom: 64px;
|
|
4112
4112
|
}
|
|
4113
|
-
.font-library-modal__tabpanel-layout
|
|
4114
|
-
border-top: 1px solid #
|
|
4113
|
+
.font-library-modal__tabpanel-layout .font-library-modal__tabpanel-layout__footer {
|
|
4114
|
+
border-top: 1px solid #ddd;
|
|
4115
4115
|
margin: 0 -32px -32px;
|
|
4116
4116
|
padding: 16px 32px;
|
|
4117
4117
|
position: absolute;
|
|
@@ -4126,10 +4126,10 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
|
|
|
4126
4126
|
}
|
|
4127
4127
|
|
|
4128
4128
|
.font-library-modal__font-card {
|
|
4129
|
-
border: 1px solid #
|
|
4129
|
+
border: 1px solid #e0e0e0;
|
|
4130
4130
|
width: 100%;
|
|
4131
4131
|
height: auto;
|
|
4132
|
-
padding:
|
|
4132
|
+
padding: 16px;
|
|
4133
4133
|
margin-top: -1px;
|
|
4134
4134
|
/* To collapse the margin with the previous element */
|
|
4135
4135
|
}
|
|
@@ -4137,26 +4137,25 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
|
|
|
4137
4137
|
font-weight: bold;
|
|
4138
4138
|
}
|
|
4139
4139
|
.font-library-modal__font-card .font-library-modal__font-card__count {
|
|
4140
|
-
color: #
|
|
4140
|
+
color: #757575;
|
|
4141
4141
|
}
|
|
4142
4142
|
|
|
4143
4143
|
.font-library-modal__library-font-variant {
|
|
4144
|
-
border: 1px solid #
|
|
4145
|
-
padding:
|
|
4144
|
+
border: 1px solid #e0e0e0;
|
|
4145
|
+
padding: 16px;
|
|
4146
4146
|
margin-top: -1px;
|
|
4147
4147
|
/* To collapse the margin with the previous element */
|
|
4148
4148
|
}
|
|
4149
4149
|
|
|
4150
4150
|
.font-library-modal__font-variant {
|
|
4151
|
-
border-bottom: 1px solid #
|
|
4152
|
-
padding-bottom:
|
|
4151
|
+
border-bottom: 1px solid #e0e0e0;
|
|
4152
|
+
padding-bottom: 16px;
|
|
4153
4153
|
}
|
|
4154
4154
|
|
|
4155
4155
|
.font-library-modal__tabs [role=tablist] {
|
|
4156
4156
|
position: sticky;
|
|
4157
4157
|
top: 0;
|
|
4158
|
-
|
|
4159
|
-
border-bottom: 1px solid #e6e6e6;
|
|
4158
|
+
border-bottom: 1px solid #ddd;
|
|
4160
4159
|
background: #fff;
|
|
4161
4160
|
margin: 0 -32px;
|
|
4162
4161
|
padding: 0 16px;
|
|
@@ -4167,7 +4166,7 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
|
|
|
4167
4166
|
align-items: center;
|
|
4168
4167
|
display: flex;
|
|
4169
4168
|
justify-content: center;
|
|
4170
|
-
height:
|
|
4169
|
+
height: 256px;
|
|
4171
4170
|
width: 100%;
|
|
4172
4171
|
}
|
|
4173
4172
|
|
|
@@ -4180,20 +4179,12 @@ button.font-library-modal__upload-area {
|
|
|
4180
4179
|
width: 80%;
|
|
4181
4180
|
}
|
|
4182
4181
|
.font-library-modal__local-fonts .font-library-modal__upload-area__text {
|
|
4183
|
-
color: #
|
|
4182
|
+
color: #757575;
|
|
4184
4183
|
}
|
|
4185
4184
|
.font-library-modal__local-fonts .font-library-modal__upload-area__notice {
|
|
4186
4185
|
margin: 0;
|
|
4187
4186
|
}
|
|
4188
4187
|
|
|
4189
|
-
.font-library-modal__font-name {
|
|
4190
|
-
font-weight: bold;
|
|
4191
|
-
}
|
|
4192
|
-
|
|
4193
|
-
.font-library-modal__font-filename {
|
|
4194
|
-
color: #6e6e6e;
|
|
4195
|
-
}
|
|
4196
|
-
|
|
4197
4188
|
.font-library-modal__font-variant_demo-wrapper {
|
|
4198
4189
|
white-space: nowrap;
|
|
4199
4190
|
overflow: hidden;
|
|
@@ -4224,10 +4215,6 @@ button.font-library-modal__upload-area {
|
|
|
4224
4215
|
max-width: 350px;
|
|
4225
4216
|
}
|
|
4226
4217
|
|
|
4227
|
-
.font-library-modal__font-collection__notice {
|
|
4228
|
-
margin: 0;
|
|
4229
|
-
}
|
|
4230
|
-
|
|
4231
4218
|
.edit-site-pagination .components-button.is-tertiary {
|
|
4232
4219
|
width: 32px;
|
|
4233
4220
|
height: 32px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-site",
|
|
3
|
-
"version": "5.27.
|
|
3
|
+
"version": "5.27.1",
|
|
4
4
|
"description": "Edit Site Page module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -30,20 +30,20 @@
|
|
|
30
30
|
"@wordpress/a11y": "^3.50.0",
|
|
31
31
|
"@wordpress/api-fetch": "^6.47.0",
|
|
32
32
|
"@wordpress/blob": "^3.50.0",
|
|
33
|
-
"@wordpress/block-editor": "^12.18.
|
|
34
|
-
"@wordpress/block-library": "^8.27.
|
|
35
|
-
"@wordpress/blocks": "^12.27.
|
|
33
|
+
"@wordpress/block-editor": "^12.18.1",
|
|
34
|
+
"@wordpress/block-library": "^8.27.1",
|
|
35
|
+
"@wordpress/blocks": "^12.27.1",
|
|
36
36
|
"@wordpress/commands": "^0.21.0",
|
|
37
37
|
"@wordpress/components": "^25.16.0",
|
|
38
38
|
"@wordpress/compose": "^6.27.0",
|
|
39
|
-
"@wordpress/core-commands": "^0.19.
|
|
40
|
-
"@wordpress/core-data": "^6.27.
|
|
39
|
+
"@wordpress/core-commands": "^0.19.1",
|
|
40
|
+
"@wordpress/core-data": "^6.27.1",
|
|
41
41
|
"@wordpress/data": "^9.20.0",
|
|
42
42
|
"@wordpress/dataviews": "^0.4.0",
|
|
43
43
|
"@wordpress/date": "^4.50.0",
|
|
44
44
|
"@wordpress/deprecated": "^3.50.0",
|
|
45
45
|
"@wordpress/dom": "^3.50.0",
|
|
46
|
-
"@wordpress/editor": "^13.27.
|
|
46
|
+
"@wordpress/editor": "^13.27.1",
|
|
47
47
|
"@wordpress/element": "^5.27.0",
|
|
48
48
|
"@wordpress/escape-html": "^2.50.0",
|
|
49
49
|
"@wordpress/hooks": "^3.50.0",
|
|
@@ -55,17 +55,17 @@
|
|
|
55
55
|
"@wordpress/keycodes": "^3.50.0",
|
|
56
56
|
"@wordpress/media-utils": "^4.41.0",
|
|
57
57
|
"@wordpress/notices": "^4.18.0",
|
|
58
|
-
"@wordpress/patterns": "^1.11.
|
|
58
|
+
"@wordpress/patterns": "^1.11.1",
|
|
59
59
|
"@wordpress/plugins": "^6.18.0",
|
|
60
60
|
"@wordpress/preferences": "^3.27.0",
|
|
61
61
|
"@wordpress/primitives": "^3.48.0",
|
|
62
62
|
"@wordpress/private-apis": "^0.32.0",
|
|
63
|
-
"@wordpress/reusable-blocks": "^4.27.
|
|
63
|
+
"@wordpress/reusable-blocks": "^4.27.1",
|
|
64
64
|
"@wordpress/router": "^0.19.0",
|
|
65
|
-
"@wordpress/style-engine": "^1.33.
|
|
65
|
+
"@wordpress/style-engine": "^1.33.1",
|
|
66
66
|
"@wordpress/url": "^3.51.0",
|
|
67
67
|
"@wordpress/viewport": "^5.27.0",
|
|
68
|
-
"@wordpress/widgets": "^3.27.
|
|
68
|
+
"@wordpress/widgets": "^3.27.1",
|
|
69
69
|
"@wordpress/wordcount": "^3.50.0",
|
|
70
70
|
"change-case": "^4.1.2",
|
|
71
71
|
"classnames": "^2.3.1",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"publishConfig": {
|
|
86
86
|
"access": "public"
|
|
87
87
|
},
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "c2f6d07ffab7d68b9ac3c423ce7e11af91f6e45e"
|
|
89
89
|
}
|
|
@@ -26,18 +26,18 @@
|
|
|
26
26
|
|
|
27
27
|
.font-library-modal__tabpanel-layout {
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
padding-bottom:
|
|
29
|
+
.font-library-modal__tabpanel-layout__main {
|
|
30
|
+
padding-bottom: $grid-unit-80;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
border-top: 1px solid
|
|
35
|
-
margin: 0 -
|
|
36
|
-
padding:
|
|
33
|
+
.font-library-modal__tabpanel-layout__footer {
|
|
34
|
+
border-top: 1px solid $gray-300;
|
|
35
|
+
margin: 0 #{$grid-unit-40 * -1} #{$grid-unit-40 * -1};
|
|
36
|
+
padding: $grid-unit-20 $grid-unit-40;
|
|
37
37
|
position: absolute;
|
|
38
|
-
bottom:
|
|
38
|
+
bottom: $grid-unit-40;
|
|
39
39
|
width: 100%;
|
|
40
|
-
background-color:
|
|
40
|
+
background-color: $white;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
}
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
.font-library-modal__font-card {
|
|
53
|
-
border: 1px solid
|
|
53
|
+
border: 1px solid $gray-200;
|
|
54
54
|
width: 100%;
|
|
55
55
|
height: auto;
|
|
56
|
-
padding:
|
|
56
|
+
padding: $grid-unit-20;
|
|
57
57
|
margin-top: -1px; /* To collapse the margin with the previous element */
|
|
58
58
|
|
|
59
59
|
.font-library-modal__font-card__name {
|
|
@@ -61,30 +61,29 @@
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
.font-library-modal__font-card__count {
|
|
64
|
-
color:
|
|
64
|
+
color: $gray-700;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
.font-library-modal__library-font-variant {
|
|
69
|
-
border: 1px solid
|
|
70
|
-
padding:
|
|
69
|
+
border: 1px solid $gray-200;
|
|
70
|
+
padding: $grid-unit-20;
|
|
71
71
|
margin-top: -1px; /* To collapse the margin with the previous element */
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
.font-library-modal__font-variant {
|
|
75
|
-
border-bottom: 1px solid
|
|
76
|
-
padding-bottom:
|
|
75
|
+
border-bottom: 1px solid $gray-200;
|
|
76
|
+
padding-bottom: $grid-unit-20;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
.font-library-modal__tabs {
|
|
80
80
|
[role="tablist"] {
|
|
81
81
|
position: sticky;
|
|
82
82
|
top: 0;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
padding: 0 16px;
|
|
83
|
+
border-bottom: 1px solid $gray-300;
|
|
84
|
+
background: $white;
|
|
85
|
+
margin: 0 #{$grid-unit-40 * -1};
|
|
86
|
+
padding: 0 $grid-unit-20;
|
|
88
87
|
z-index: 1;
|
|
89
88
|
}
|
|
90
89
|
}
|
|
@@ -93,12 +92,12 @@
|
|
|
93
92
|
align-items: center;
|
|
94
93
|
display: flex;
|
|
95
94
|
justify-content: center;
|
|
96
|
-
height:
|
|
95
|
+
height: $grid-unit-80 * 4; // 256px
|
|
97
96
|
width: 100%;
|
|
98
97
|
}
|
|
99
98
|
|
|
100
99
|
button.font-library-modal__upload-area {
|
|
101
|
-
background-color:
|
|
100
|
+
background-color: $gray-100;
|
|
102
101
|
}
|
|
103
102
|
|
|
104
103
|
.font-library-modal__local-fonts {
|
|
@@ -106,7 +105,7 @@ button.font-library-modal__upload-area {
|
|
|
106
105
|
width: 80%;
|
|
107
106
|
|
|
108
107
|
.font-library-modal__upload-area__text {
|
|
109
|
-
color:
|
|
108
|
+
color: $gray-700;
|
|
110
109
|
}
|
|
111
110
|
|
|
112
111
|
.font-library-modal__upload-area__notice {
|
|
@@ -114,14 +113,6 @@ button.font-library-modal__upload-area {
|
|
|
114
113
|
}
|
|
115
114
|
}
|
|
116
115
|
|
|
117
|
-
.font-library-modal__font-name {
|
|
118
|
-
font-weight: bold;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.font-library-modal__font-filename {
|
|
122
|
-
color: #6e6e6e;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
116
|
.font-library-modal__font-variant_demo-wrapper {
|
|
126
117
|
white-space: nowrap;
|
|
127
118
|
overflow: hidden;
|
|
@@ -154,7 +145,3 @@ button.font-library-modal__upload-area {
|
|
|
154
145
|
max-width: 350px;
|
|
155
146
|
}
|
|
156
147
|
}
|
|
157
|
-
|
|
158
|
-
.font-library-modal__font-collection__notice {
|
|
159
|
-
margin: 0;
|
|
160
|
-
}
|
|
@@ -22,32 +22,36 @@ function TabPanelLayout( {
|
|
|
22
22
|
<div className="font-library-modal__tabpanel-layout">
|
|
23
23
|
<Spacer margin={ 4 } />
|
|
24
24
|
<VStack spacing={ 4 } justify="space-between">
|
|
25
|
-
<
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
{ footer &&
|
|
25
|
+
<VStack spacing={ 2 }>
|
|
26
|
+
<HStack justify="flex-start">
|
|
27
|
+
{ !! handleBack && (
|
|
28
|
+
<Button
|
|
29
|
+
variant="tertiary"
|
|
30
|
+
onClick={ handleBack }
|
|
31
|
+
icon={ chevronLeft }
|
|
32
|
+
size="small"
|
|
33
|
+
/>
|
|
34
|
+
) }
|
|
35
|
+
{ title && (
|
|
36
|
+
<Heading
|
|
37
|
+
level={ 2 }
|
|
38
|
+
size={ 13 }
|
|
39
|
+
className="edit-site-global-styles-header"
|
|
40
|
+
>
|
|
41
|
+
{ title }
|
|
42
|
+
</Heading>
|
|
43
|
+
) }
|
|
44
|
+
</HStack>
|
|
45
|
+
{ description && <Text>{ description }</Text> }
|
|
46
|
+
</VStack>
|
|
47
|
+
<div className="font-library-modal__tabpanel-layout__main">
|
|
48
|
+
{ children }
|
|
49
|
+
</div>
|
|
50
|
+
{ footer && (
|
|
51
|
+
<div className="font-library-modal__tabpanel-layout__footer">
|
|
52
|
+
{ footer }
|
|
53
|
+
</div>
|
|
54
|
+
) }
|
|
51
55
|
</VStack>
|
|
52
56
|
</div>
|
|
53
57
|
);
|
|
@@ -109,6 +109,16 @@ function ScreenBlock( { name, variation } ) {
|
|
|
109
109
|
settings.spacing.blockGap = false;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
// Only allow `aspectRatio` support if the block is not the grouping block.
|
|
113
|
+
// The grouping block allows the user to use Group, Row and Stack variations,
|
|
114
|
+
// and it is highly likely that the user will not want to set an aspect ratio
|
|
115
|
+
// for all three at once. Until there is the ability to set a different aspect
|
|
116
|
+
// ratio for each variation, we disable the aspect ratio controls for the
|
|
117
|
+
// grouping block in global styles.
|
|
118
|
+
if ( settings?.dimensions?.aspectRatio && name === 'core/group' ) {
|
|
119
|
+
settings.dimensions.aspectRatio = false;
|
|
120
|
+
}
|
|
121
|
+
|
|
112
122
|
const blockVariations = useBlockVariations( name );
|
|
113
123
|
const hasTypographyPanel = useHasTypographyPanel( settings );
|
|
114
124
|
const hasColorPanel = useHasColorPanel( settings );
|