@wordpress/global-styles-ui 1.1.0
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/LICENSE.md +788 -0
- package/README.md +48 -0
- package/build/background-panel.js +62 -0
- package/build/background-panel.js.map +7 -0
- package/build/block-preview-panel.js +90 -0
- package/build/block-preview-panel.js.map +7 -0
- package/build/color-indicator-wrapper.js +55 -0
- package/build/color-indicator-wrapper.js.map +7 -0
- package/build/color-palette-panel.js +123 -0
- package/build/color-palette-panel.js.map +7 -0
- package/build/color-preview.js +94 -0
- package/build/color-preview.js.map +7 -0
- package/build/color-variations.js +41 -0
- package/build/color-variations.js.map +7 -0
- package/build/confirm-reset-shadow-dialog.js +55 -0
- package/build/confirm-reset-shadow-dialog.js.map +7 -0
- package/build/context.js +37 -0
- package/build/context.js.map +7 -0
- package/build/dimensions-panel.js +89 -0
- package/build/dimensions-panel.js.map +7 -0
- package/build/font-families.js +114 -0
- package/build/font-families.js.map +7 -0
- package/build/font-family-item.js +48 -0
- package/build/font-family-item.js.map +7 -0
- package/build/font-library-modal/collection-font-variant.js +75 -0
- package/build/font-library-modal/collection-font-variant.js.map +7 -0
- package/build/font-library-modal/context.js +386 -0
- package/build/font-library-modal/context.js.map +7 -0
- package/build/font-library-modal/font-card.js +81 -0
- package/build/font-library-modal/font-card.js.map +7 -0
- package/build/font-library-modal/font-collection.js +510 -0
- package/build/font-library-modal/font-collection.js.map +7 -0
- package/build/font-library-modal/font-demo.js +111 -0
- package/build/font-library-modal/font-demo.js.map +7 -0
- package/build/font-library-modal/google-fonts-confirm-dialog.js +58 -0
- package/build/font-library-modal/google-fonts-confirm-dialog.js.map +7 -0
- package/build/font-library-modal/index.js +110 -0
- package/build/font-library-modal/index.js.map +7 -0
- package/build/font-library-modal/installed-fonts.js +453 -0
- package/build/font-library-modal/installed-fonts.js.map +7 -0
- package/build/font-library-modal/lib/inflate.js +2628 -0
- package/build/font-library-modal/lib/inflate.js.map +7 -0
- package/build/font-library-modal/lib/lib-font.browser.d.js +33 -0
- package/build/font-library-modal/lib/lib-font.browser.d.js.map +7 -0
- package/build/font-library-modal/lib/lib-font.browser.js +3788 -0
- package/build/font-library-modal/lib/lib-font.browser.js.map +7 -0
- package/build/font-library-modal/lib/unbrotli.js +3678 -0
- package/build/font-library-modal/lib/unbrotli.js.map +7 -0
- package/build/font-library-modal/library-font-details.js +63 -0
- package/build/font-library-modal/library-font-details.js.map +7 -0
- package/build/font-library-modal/library-font-variant.js +81 -0
- package/build/font-library-modal/library-font-variant.js.map +7 -0
- package/build/font-library-modal/resolvers.js +115 -0
- package/build/font-library-modal/resolvers.js.map +7 -0
- package/build/font-library-modal/types.js +17 -0
- package/build/font-library-modal/types.js.map +7 -0
- package/build/font-library-modal/upload-fonts.js +207 -0
- package/build/font-library-modal/upload-fonts.js.map +7 -0
- package/build/font-library-modal/utils/constants.js +49 -0
- package/build/font-library-modal/utils/constants.js.map +7 -0
- package/build/font-library-modal/utils/filter-fonts.js +39 -0
- package/build/font-library-modal/utils/filter-fonts.js.map +7 -0
- package/build/font-library-modal/utils/fonts-outline.js +51 -0
- package/build/font-library-modal/utils/fonts-outline.js.map +7 -0
- package/build/font-library-modal/utils/index.js +274 -0
- package/build/font-library-modal/utils/index.js.map +7 -0
- package/build/font-library-modal/utils/make-families-from-faces.js +45 -0
- package/build/font-library-modal/utils/make-families-from-faces.js.map +7 -0
- package/build/font-library-modal/utils/preview-styles.js +119 -0
- package/build/font-library-modal/utils/preview-styles.js.map +7 -0
- package/build/font-library-modal/utils/set-immutably.js +40 -0
- package/build/font-library-modal/utils/set-immutably.js.map +7 -0
- package/build/font-library-modal/utils/sort-font-faces.js +59 -0
- package/build/font-library-modal/utils/sort-font-faces.js.map +7 -0
- package/build/font-library-modal/utils/toggleFont.js +67 -0
- package/build/font-library-modal/utils/toggleFont.js.map +7 -0
- package/build/font-sizes/confirm-delete-font-size-dialog.js +60 -0
- package/build/font-sizes/confirm-delete-font-size-dialog.js.map +7 -0
- package/build/font-sizes/confirm-reset-font-sizes-dialog.js +55 -0
- package/build/font-sizes/confirm-reset-font-sizes-dialog.js.map +7 -0
- package/build/font-sizes/font-size-preview.js +50 -0
- package/build/font-sizes/font-size-preview.js.map +7 -0
- package/build/font-sizes/font-size.js +261 -0
- package/build/font-sizes/font-size.js.map +7 -0
- package/build/font-sizes/font-sizes-count.js +40 -0
- package/build/font-sizes/font-sizes-count.js.map +7 -0
- package/build/font-sizes/font-sizes.js +215 -0
- package/build/font-sizes/font-sizes.js.map +7 -0
- package/build/font-sizes/rename-font-size-dialog.js +96 -0
- package/build/font-sizes/rename-font-size-dialog.js.map +7 -0
- package/build/global-styles-ui.js +213 -0
- package/build/global-styles-ui.js.map +7 -0
- package/build/gradients-palette-panel.js +133 -0
- package/build/gradients-palette-panel.js.map +7 -0
- package/build/highlighted-colors.js +57 -0
- package/build/highlighted-colors.js.map +7 -0
- package/build/hooks.js +176 -0
- package/build/hooks.js.map +7 -0
- package/build/icon-with-current-color.js +56 -0
- package/build/icon-with-current-color.js.map +7 -0
- package/build/index.js +51 -0
- package/build/index.js.map +7 -0
- package/build/lock-unlock.js +35 -0
- package/build/lock-unlock.js.map +7 -0
- package/build/navigation-button.js +52 -0
- package/build/navigation-button.js.map +7 -0
- package/build/pagination/index.js +133 -0
- package/build/pagination/index.js.map +7 -0
- package/build/palette.js +93 -0
- package/build/palette.js.map +7 -0
- package/build/preset-colors.js +40 -0
- package/build/preset-colors.js.map +7 -0
- package/build/preview-colors.js +86 -0
- package/build/preview-colors.js.map +7 -0
- package/build/preview-hooks.js +60 -0
- package/build/preview-hooks.js.map +7 -0
- package/build/preview-styles.js +219 -0
- package/build/preview-styles.js.map +7 -0
- package/build/preview-typography.js +72 -0
- package/build/preview-typography.js.map +7 -0
- package/build/preview-wrapper.js +102 -0
- package/build/preview-wrapper.js.map +7 -0
- package/build/provider.js +54 -0
- package/build/provider.js.map +7 -0
- package/build/root-menu.js +72 -0
- package/build/root-menu.js.map +7 -0
- package/build/screen-background.js +58 -0
- package/build/screen-background.js.map +7 -0
- package/build/screen-block-list.js +160 -0
- package/build/screen-block-list.js.map +7 -0
- package/build/screen-block.js +316 -0
- package/build/screen-block.js.map +7 -0
- package/build/screen-color-palette.js +64 -0
- package/build/screen-color-palette.js.map +7 -0
- package/build/screen-colors.js +85 -0
- package/build/screen-colors.js.map +7 -0
- package/build/screen-css.js +68 -0
- package/build/screen-css.js.map +7 -0
- package/build/screen-header.js +61 -0
- package/build/screen-header.js.map +7 -0
- package/build/screen-layout.js +54 -0
- package/build/screen-layout.js.map +7 -0
- package/build/screen-revisions/index.js +147 -0
- package/build/screen-revisions/index.js.map +7 -0
- package/build/screen-revisions/revisions-buttons.js +198 -0
- package/build/screen-revisions/revisions-buttons.js.map +7 -0
- package/build/screen-revisions/types.js +17 -0
- package/build/screen-revisions/types.js.map +7 -0
- package/build/screen-revisions/use-global-styles-revisions.js +163 -0
- package/build/screen-revisions/use-global-styles-revisions.js.map +7 -0
- package/build/screen-root.js +134 -0
- package/build/screen-root.js.map +7 -0
- package/build/screen-shadows.js +49 -0
- package/build/screen-shadows.js.map +7 -0
- package/build/screen-style-variations.js +52 -0
- package/build/screen-style-variations.js.map +7 -0
- package/build/screen-typography-element.js +167 -0
- package/build/screen-typography-element.js.map +7 -0
- package/build/screen-typography.js +65 -0
- package/build/screen-typography.js.map +7 -0
- package/build/shadow-utils.js +125 -0
- package/build/shadow-utils.js.map +7 -0
- package/build/shadows-edit-panel.js +503 -0
- package/build/shadows-edit-panel.js.map +7 -0
- package/build/shadows-panel.js +203 -0
- package/build/shadows-panel.js.map +7 -0
- package/build/size-control/index.js +86 -0
- package/build/size-control/index.js.map +7 -0
- package/build/style-variations-container.js +130 -0
- package/build/style-variations-container.js.map +7 -0
- package/build/style-variations-content.js +52 -0
- package/build/style-variations-content.js.map +7 -0
- package/build/style-variations.js +41 -0
- package/build/style-variations.js.map +7 -0
- package/build/subtitle.js +33 -0
- package/build/subtitle.js.map +7 -0
- package/build/typography-elements.js +117 -0
- package/build/typography-elements.js.map +7 -0
- package/build/typography-example.js +79 -0
- package/build/typography-example.js.map +7 -0
- package/build/typography-panel.js +64 -0
- package/build/typography-panel.js.map +7 -0
- package/build/typography-preview.js +70 -0
- package/build/typography-preview.js.map +7 -0
- package/build/typography-variations.js +41 -0
- package/build/typography-variations.js.map +7 -0
- package/build/utils.js +210 -0
- package/build/utils.js.map +7 -0
- package/build/variations/variation.js +116 -0
- package/build/variations/variation.js.map +7 -0
- package/build/variations/variations-color.js +64 -0
- package/build/variations/variations-color.js.map +7 -0
- package/build/variations/variations-panel.js +69 -0
- package/build/variations/variations-panel.js.map +7 -0
- package/build/variations/variations-typography.js +80 -0
- package/build/variations/variations-typography.js.map +7 -0
- package/build/with-global-styles-provider.js +48 -0
- package/build/with-global-styles-provider.js.map +7 -0
- package/build-module/background-panel.js +38 -0
- package/build-module/background-panel.js.map +7 -0
- package/build-module/block-preview-panel.js +70 -0
- package/build-module/block-preview-panel.js.map +7 -0
- package/build-module/color-indicator-wrapper.js +25 -0
- package/build-module/color-indicator-wrapper.js.map +7 -0
- package/build-module/color-palette-panel.js +97 -0
- package/build-module/color-palette-panel.js.map +7 -0
- package/build-module/color-preview.js +70 -0
- package/build-module/color-preview.js.map +7 -0
- package/build-module/color-variations.js +7 -0
- package/build-module/color-variations.js.map +7 -0
- package/build-module/confirm-reset-shadow-dialog.js +35 -0
- package/build-module/confirm-reset-shadow-dialog.js.map +7 -0
- package/build-module/context.js +13 -0
- package/build-module/context.js.map +7 -0
- package/build-module/dimensions-panel.js +69 -0
- package/build-module/dimensions-panel.js.map +7 -0
- package/build-module/font-families.js +92 -0
- package/build-module/font-families.js.map +7 -0
- package/build-module/font-family-item.js +32 -0
- package/build-module/font-family-item.js.map +7 -0
- package/build-module/font-library-modal/collection-font-variant.js +45 -0
- package/build-module/font-library-modal/collection-font-variant.js.map +7 -0
- package/build-module/font-library-modal/context.js +382 -0
- package/build-module/font-library-modal/context.js.map +7 -0
- package/build-module/font-library-modal/font-card.js +57 -0
- package/build-module/font-library-modal/font-card.js.map +7 -0
- package/build-module/font-library-modal/font-collection.js +510 -0
- package/build-module/font-library-modal/font-collection.js.map +7 -0
- package/build-module/font-library-modal/font-demo.js +94 -0
- package/build-module/font-library-modal/font-demo.js.map +7 -0
- package/build-module/font-library-modal/google-fonts-confirm-dialog.js +45 -0
- package/build-module/font-library-modal/google-fonts-confirm-dialog.js.map +7 -0
- package/build-module/font-library-modal/index.js +83 -0
- package/build-module/font-library-modal/index.js.map +7 -0
- package/build-module/font-library-modal/installed-fonts.js +442 -0
- package/build-module/font-library-modal/installed-fonts.js.map +7 -0
- package/build-module/font-library-modal/lib/inflate.js +2636 -0
- package/build-module/font-library-modal/lib/inflate.js.map +7 -0
- package/build-module/font-library-modal/lib/lib-font.browser.d.js +9 -0
- package/build-module/font-library-modal/lib/lib-font.browser.d.js.map +7 -0
- package/build-module/font-library-modal/lib/lib-font.browser.js +3754 -0
- package/build-module/font-library-modal/lib/lib-font.browser.js.map +7 -0
- package/build-module/font-library-modal/lib/unbrotli.js +3686 -0
- package/build-module/font-library-modal/lib/unbrotli.js.map +7 -0
- package/build-module/font-library-modal/library-font-details.js +36 -0
- package/build-module/font-library-modal/library-font-details.js.map +7 -0
- package/build-module/font-library-modal/library-font-variant.js +51 -0
- package/build-module/font-library-modal/library-font-variant.js.map +7 -0
- package/build-module/font-library-modal/resolvers.js +76 -0
- package/build-module/font-library-modal/resolvers.js.map +7 -0
- package/build-module/font-library-modal/types.js +1 -0
- package/build-module/font-library-modal/types.js.map +7 -0
- package/build-module/font-library-modal/upload-fonts.js +187 -0
- package/build-module/font-library-modal/upload-fonts.js.map +7 -0
- package/build-module/font-library-modal/utils/constants.js +23 -0
- package/build-module/font-library-modal/utils/constants.js.map +7 -0
- package/build-module/font-library-modal/utils/filter-fonts.js +19 -0
- package/build-module/font-library-modal/utils/filter-fonts.js.map +7 -0
- package/build-module/font-library-modal/utils/fonts-outline.js +26 -0
- package/build-module/font-library-modal/utils/fonts-outline.js.map +7 -0
- package/build-module/font-library-modal/utils/index.js +238 -0
- package/build-module/font-library-modal/utils/index.js.map +7 -0
- package/build-module/font-library-modal/utils/make-families-from-faces.js +25 -0
- package/build-module/font-library-modal/utils/make-families-from-faces.js.map +7 -0
- package/build-module/font-library-modal/utils/preview-styles.js +92 -0
- package/build-module/font-library-modal/utils/preview-styles.js.map +7 -0
- package/build-module/font-library-modal/utils/set-immutably.js +16 -0
- package/build-module/font-library-modal/utils/set-immutably.js.map +7 -0
- package/build-module/font-library-modal/utils/sort-font-faces.js +35 -0
- package/build-module/font-library-modal/utils/sort-font-faces.js.map +7 -0
- package/build-module/font-library-modal/utils/toggleFont.js +43 -0
- package/build-module/font-library-modal/utils/toggleFont.js.map +7 -0
- package/build-module/font-sizes/confirm-delete-font-size-dialog.js +40 -0
- package/build-module/font-sizes/confirm-delete-font-size-dialog.js.map +7 -0
- package/build-module/font-sizes/confirm-reset-font-sizes-dialog.js +35 -0
- package/build-module/font-sizes/confirm-reset-font-sizes-dialog.js.map +7 -0
- package/build-module/font-sizes/font-size-preview.js +30 -0
- package/build-module/font-sizes/font-size-preview.js.map +7 -0
- package/build-module/font-sizes/font-size.js +241 -0
- package/build-module/font-sizes/font-size.js.map +7 -0
- package/build-module/font-sizes/font-sizes-count.js +25 -0
- package/build-module/font-sizes/font-sizes-count.js.map +7 -0
- package/build-module/font-sizes/font-sizes.js +200 -0
- package/build-module/font-sizes/font-sizes.js.map +7 -0
- package/build-module/font-sizes/rename-font-size-dialog.js +82 -0
- package/build-module/font-sizes/rename-font-size-dialog.js.map +7 -0
- package/build-module/global-styles-ui.js +182 -0
- package/build-module/global-styles-ui.js.map +7 -0
- package/build-module/gradients-palette-panel.js +118 -0
- package/build-module/gradients-palette-panel.js.map +7 -0
- package/build-module/highlighted-colors.js +37 -0
- package/build-module/highlighted-colors.js.map +7 -0
- package/build-module/hooks.js +144 -0
- package/build-module/hooks.js.map +7 -0
- package/build-module/icon-with-current-color.js +22 -0
- package/build-module/icon-with-current-color.js.map +7 -0
- package/build-module/index.js +13 -0
- package/build-module/index.js.map +7 -0
- package/build-module/lock-unlock.js +10 -0
- package/build-module/lock-unlock.js.map +7 -0
- package/build-module/navigation-button.js +32 -0
- package/build-module/navigation-button.js.map +7 -0
- package/build-module/pagination/index.js +107 -0
- package/build-module/pagination/index.js.map +7 -0
- package/build-module/palette.js +70 -0
- package/build-module/palette.js.map +7 -0
- package/build-module/preset-colors.js +20 -0
- package/build-module/preset-colors.js.map +7 -0
- package/build-module/preview-colors.js +59 -0
- package/build-module/preview-colors.js.map +7 -0
- package/build-module/preview-hooks.js +36 -0
- package/build-module/preview-hooks.js.map +7 -0
- package/build-module/preview-styles.js +193 -0
- package/build-module/preview-styles.js.map +7 -0
- package/build-module/preview-typography.js +42 -0
- package/build-module/preview-typography.js.map +7 -0
- package/build-module/preview-wrapper.js +86 -0
- package/build-module/preview-wrapper.js.map +7 -0
- package/build-module/provider.js +30 -0
- package/build-module/provider.js.map +7 -0
- package/build-module/root-menu.js +58 -0
- package/build-module/root-menu.js.map +7 -0
- package/build-module/screen-background.js +28 -0
- package/build-module/screen-background.js.map +7 -0
- package/build-module/screen-block-list.js +150 -0
- package/build-module/screen-block-list.js.map +7 -0
- package/build-module/screen-block.js +293 -0
- package/build-module/screen-block.js.map +7 -0
- package/build-module/screen-color-palette.js +34 -0
- package/build-module/screen-color-palette.js.map +7 -0
- package/build-module/screen-colors.js +55 -0
- package/build-module/screen-colors.js.map +7 -0
- package/build-module/screen-css.js +48 -0
- package/build-module/screen-css.js.map +7 -0
- package/build-module/screen-header.js +44 -0
- package/build-module/screen-header.js.map +7 -0
- package/build-module/screen-layout.js +24 -0
- package/build-module/screen-layout.js.map +7 -0
- package/build-module/screen-revisions/index.js +121 -0
- package/build-module/screen-revisions/index.js.map +7 -0
- package/build-module/screen-revisions/revisions-buttons.js +178 -0
- package/build-module/screen-revisions/revisions-buttons.js.map +7 -0
- package/build-module/screen-revisions/types.js +1 -0
- package/build-module/screen-revisions/types.js.map +7 -0
- package/build-module/screen-revisions/use-global-styles-revisions.js +145 -0
- package/build-module/screen-revisions/use-global-styles-revisions.js.map +7 -0
- package/build-module/screen-root.js +114 -0
- package/build-module/screen-root.js.map +7 -0
- package/build-module/screen-shadows.js +14 -0
- package/build-module/screen-shadows.js.map +7 -0
- package/build-module/screen-style-variations.js +32 -0
- package/build-module/screen-style-variations.js.map +7 -0
- package/build-module/screen-typography-element.js +141 -0
- package/build-module/screen-typography-element.js.map +7 -0
- package/build-module/screen-typography.js +35 -0
- package/build-module/screen-typography.js.map +7 -0
- package/build-module/shadow-utils.js +98 -0
- package/build-module/shadow-utils.js.map +7 -0
- package/build-module/shadows-edit-panel.js +502 -0
- package/build-module/shadows-edit-panel.js.map +7 -0
- package/build-module/shadows-panel.js +182 -0
- package/build-module/shadows-panel.js.map +7 -0
- package/build-module/size-control/index.js +72 -0
- package/build-module/size-control/index.js.map +7 -0
- package/build-module/style-variations-container.js +100 -0
- package/build-module/style-variations-container.js.map +7 -0
- package/build-module/style-variations-content.js +18 -0
- package/build-module/style-variations-content.js.map +7 -0
- package/build-module/style-variations.js +7 -0
- package/build-module/style-variations.js.map +7 -0
- package/build-module/subtitle.js +9 -0
- package/build-module/subtitle.js.map +7 -0
- package/build-module/typography-elements.js +102 -0
- package/build-module/typography-elements.js.map +7 -0
- package/build-module/typography-example.js +59 -0
- package/build-module/typography-example.js.map +7 -0
- package/build-module/typography-panel.js +44 -0
- package/build-module/typography-panel.js.map +7 -0
- package/build-module/typography-preview.js +50 -0
- package/build-module/typography-preview.js.map +7 -0
- package/build-module/typography-variations.js +7 -0
- package/build-module/typography-variations.js.map +7 -0
- package/build-module/utils.js +179 -0
- package/build-module/utils.js.map +7 -0
- package/build-module/variations/variation.js +86 -0
- package/build-module/variations/variation.js.map +7 -0
- package/build-module/variations/variations-color.js +37 -0
- package/build-module/variations/variations-color.js.map +7 -0
- package/build-module/variations/variations-panel.js +44 -0
- package/build-module/variations/variations-panel.js.map +7 -0
- package/build-module/variations/variations-typography.js +53 -0
- package/build-module/variations/variations-typography.js.map +7 -0
- package/build-module/with-global-styles-provider.js +24 -0
- package/build-module/with-global-styles-provider.js.map +7 -0
- package/build-style/style-rtl.css +717 -0
- package/build-style/style.css +718 -0
- package/build-types/background-panel.d.ts +10 -0
- package/build-types/background-panel.d.ts.map +1 -0
- package/build-types/block-preview-panel.d.ts +7 -0
- package/build-types/block-preview-panel.d.ts.map +1 -0
- package/build-types/color-indicator-wrapper.d.ts +7 -0
- package/build-types/color-indicator-wrapper.d.ts.map +1 -0
- package/build-types/color-palette-panel.d.ts +6 -0
- package/build-types/color-palette-panel.d.ts.map +1 -0
- package/build-types/color-preview.d.ts +2 -0
- package/build-types/color-preview.d.ts.map +1 -0
- package/build-types/color-variations.d.ts +27 -0
- package/build-types/color-variations.d.ts.map +1 -0
- package/build-types/confirm-reset-shadow-dialog.d.ts +10 -0
- package/build-types/confirm-reset-shadow-dialog.d.ts.map +1 -0
- package/build-types/context.d.ts +10 -0
- package/build-types/context.d.ts.map +1 -0
- package/build-types/dimensions-panel.d.ts +2 -0
- package/build-types/dimensions-panel.d.ts.map +1 -0
- package/build-types/font-families.d.ts +4 -0
- package/build-types/font-families.d.ts.map +1 -0
- package/build-types/font-family-item.d.ts +7 -0
- package/build-types/font-family-item.d.ts.map +1 -0
- package/build-types/font-library-modal/collection-font-variant.d.ts +4 -0
- package/build-types/font-library-modal/collection-font-variant.d.ts.map +1 -0
- package/build-types/font-library-modal/context.d.ts +7 -0
- package/build-types/font-library-modal/context.d.ts.map +1 -0
- package/build-types/font-library-modal/font-card.d.ts +9 -0
- package/build-types/font-library-modal/font-card.d.ts.map +1 -0
- package/build-types/font-library-modal/font-collection.d.ts +5 -0
- package/build-types/font-library-modal/font-collection.d.ts.map +1 -0
- package/build-types/font-library-modal/font-demo.d.ts +4 -0
- package/build-types/font-library-modal/font-demo.d.ts.map +1 -0
- package/build-types/font-library-modal/google-fonts-confirm-dialog.d.ts +3 -0
- package/build-types/font-library-modal/google-fonts-confirm-dialog.d.ts.map +1 -0
- package/build-types/font-library-modal/index.d.ts +6 -0
- package/build-types/font-library-modal/index.d.ts.map +1 -0
- package/build-types/font-library-modal/installed-fonts.d.ts +3 -0
- package/build-types/font-library-modal/installed-fonts.d.ts.map +1 -0
- package/build-types/font-library-modal/library-font-details.d.ts +6 -0
- package/build-types/font-library-modal/library-font-details.d.ts.map +1 -0
- package/build-types/font-library-modal/library-font-variant.d.ts +7 -0
- package/build-types/font-library-modal/library-font-variant.d.ts.map +1 -0
- package/build-types/font-library-modal/resolvers.d.ts +43 -0
- package/build-types/font-library-modal/resolvers.d.ts.map +1 -0
- package/build-types/font-library-modal/types.d.ts +133 -0
- package/build-types/font-library-modal/types.d.ts.map +1 -0
- package/build-types/font-library-modal/upload-fonts.d.ts +3 -0
- package/build-types/font-library-modal/upload-fonts.d.ts.map +1 -0
- package/build-types/font-library-modal/utils/constants.d.ts +4 -0
- package/build-types/font-library-modal/utils/constants.d.ts.map +1 -0
- package/build-types/font-library-modal/utils/filter-fonts.d.ts +25 -0
- package/build-types/font-library-modal/utils/filter-fonts.d.ts.map +1 -0
- package/build-types/font-library-modal/utils/fonts-outline.d.ts +7 -0
- package/build-types/font-library-modal/utils/fonts-outline.d.ts.map +1 -0
- package/build-types/font-library-modal/utils/index.d.ts +21 -0
- package/build-types/font-library-modal/utils/index.d.ts.map +1 -0
- package/build-types/font-library-modal/utils/make-families-from-faces.d.ts +6 -0
- package/build-types/font-library-modal/utils/make-families-from-faces.d.ts.map +1 -0
- package/build-types/font-library-modal/utils/preview-styles.d.ts +13 -0
- package/build-types/font-library-modal/utils/preview-styles.d.ts.map +1 -0
- package/build-types/font-library-modal/utils/set-immutably.d.ts +13 -0
- package/build-types/font-library-modal/utils/set-immutably.d.ts.map +1 -0
- package/build-types/font-library-modal/utils/sort-font-faces.d.ts +6 -0
- package/build-types/font-library-modal/utils/sort-font-faces.d.ts.map +1 -0
- package/build-types/font-library-modal/utils/toggleFont.d.ts +38 -0
- package/build-types/font-library-modal/utils/toggleFont.d.ts.map +1 -0
- package/build-types/font-sizes/confirm-delete-font-size-dialog.d.ts +10 -0
- package/build-types/font-sizes/confirm-delete-font-size-dialog.d.ts.map +1 -0
- package/build-types/font-sizes/confirm-reset-font-sizes-dialog.d.ts +10 -0
- package/build-types/font-sizes/confirm-reset-font-sizes-dialog.d.ts.map +1 -0
- package/build-types/font-sizes/font-size-preview.d.ts +7 -0
- package/build-types/font-sizes/font-size-preview.d.ts.map +1 -0
- package/build-types/font-sizes/font-size.d.ts +4 -0
- package/build-types/font-sizes/font-size.d.ts.map +1 -0
- package/build-types/font-sizes/font-sizes-count.d.ts +3 -0
- package/build-types/font-sizes/font-sizes-count.d.ts.map +1 -0
- package/build-types/font-sizes/font-sizes.d.ts +3 -0
- package/build-types/font-sizes/font-sizes.d.ts.map +1 -0
- package/build-types/font-sizes/rename-font-size-dialog.d.ts +9 -0
- package/build-types/font-sizes/rename-font-size-dialog.d.ts.map +1 -0
- package/build-types/global-styles-ui.d.ts +26 -0
- package/build-types/global-styles-ui.d.ts.map +1 -0
- package/build-types/gradients-palette-panel.d.ts +6 -0
- package/build-types/gradients-palette-panel.d.ts.map +1 -0
- package/build-types/highlighted-colors.d.ts +7 -0
- package/build-types/highlighted-colors.d.ts.map +1 -0
- package/build-types/hooks.d.ts +46 -0
- package/build-types/hooks.d.ts.map +1 -0
- package/build-types/icon-with-current-color.d.ts +9 -0
- package/build-types/icon-with-current-color.d.ts.map +1 -0
- package/build-types/index.d.ts +6 -0
- package/build-types/index.d.ts.map +1 -0
- package/build-types/lock-unlock.d.ts +2 -0
- package/build-types/lock-unlock.d.ts.map +1 -0
- package/build-types/navigation-button.d.ts +10 -0
- package/build-types/navigation-button.d.ts.map +1 -0
- package/build-types/pagination/index.d.ts +13 -0
- package/build-types/pagination/index.d.ts.map +1 -0
- package/build-types/palette.d.ts +6 -0
- package/build-types/palette.d.ts.map +1 -0
- package/build-types/preset-colors.d.ts +2 -0
- package/build-types/preset-colors.d.ts.map +1 -0
- package/build-types/preview-colors.d.ts +8 -0
- package/build-types/preview-colors.d.ts.map +1 -0
- package/build-types/preview-hooks.d.ts +9 -0
- package/build-types/preview-hooks.d.ts.map +1 -0
- package/build-types/preview-styles.d.ts +9 -0
- package/build-types/preview-styles.d.ts.map +1 -0
- package/build-types/preview-typography.d.ts +8 -0
- package/build-types/preview-typography.d.ts.map +1 -0
- package/build-types/preview-wrapper.d.ts +15 -0
- package/build-types/preview-wrapper.d.ts.map +1 -0
- package/build-types/provider.d.ts +15 -0
- package/build-types/provider.d.ts.map +1 -0
- package/build-types/root-menu.d.ts +3 -0
- package/build-types/root-menu.d.ts.map +1 -0
- package/build-types/screen-background.d.ts +3 -0
- package/build-types/screen-background.d.ts.map +1 -0
- package/build-types/screen-block-list.d.ts +4 -0
- package/build-types/screen-block-list.d.ts.map +1 -0
- package/build-types/screen-block.d.ts +7 -0
- package/build-types/screen-block.d.ts.map +1 -0
- package/build-types/screen-color-palette.d.ts +5 -0
- package/build-types/screen-color-palette.d.ts.map +1 -0
- package/build-types/screen-colors.d.ts +3 -0
- package/build-types/screen-colors.d.ts.map +1 -0
- package/build-types/screen-css.d.ts +3 -0
- package/build-types/screen-css.d.ts.map +1 -0
- package/build-types/screen-header.d.ts +8 -0
- package/build-types/screen-header.d.ts.map +1 -0
- package/build-types/screen-layout.d.ts +3 -0
- package/build-types/screen-layout.d.ts.map +1 -0
- package/build-types/screen-revisions/index.d.ts +6 -0
- package/build-types/screen-revisions/index.d.ts.map +1 -0
- package/build-types/screen-revisions/revisions-buttons.d.ts +23 -0
- package/build-types/screen-revisions/revisions-buttons.d.ts.map +1 -0
- package/build-types/screen-revisions/types.d.ts +17 -0
- package/build-types/screen-revisions/types.d.ts.map +1 -0
- package/build-types/screen-revisions/use-global-styles-revisions.d.ts +17 -0
- package/build-types/screen-revisions/use-global-styles-revisions.d.ts.map +1 -0
- package/build-types/screen-root.d.ts +3 -0
- package/build-types/screen-root.d.ts.map +1 -0
- package/build-types/screen-shadows.d.ts +3 -0
- package/build-types/screen-shadows.d.ts.map +1 -0
- package/build-types/screen-style-variations.d.ts +3 -0
- package/build-types/screen-style-variations.d.ts.map +1 -0
- package/build-types/screen-typography-element.d.ts +28 -0
- package/build-types/screen-typography-element.d.ts.map +1 -0
- package/build-types/screen-typography.d.ts +3 -0
- package/build-types/screen-typography.d.ts.map +1 -0
- package/build-types/shadow-utils.d.ts +126 -0
- package/build-types/shadow-utils.d.ts.map +1 -0
- package/build-types/shadows-edit-panel.d.ts +2 -0
- package/build-types/shadows-edit-panel.d.ts.map +1 -0
- package/build-types/shadows-panel.d.ts +3 -0
- package/build-types/shadows-panel.d.ts.map +1 -0
- package/build-types/size-control/index.d.ts +11 -0
- package/build-types/size-control/index.d.ts.map +1 -0
- package/build-types/stories/index.story.d.ts +6 -0
- package/build-types/stories/index.story.d.ts.map +1 -0
- package/build-types/style-variations-container.d.ts +6 -0
- package/build-types/style-variations-container.d.ts.map +1 -0
- package/build-types/style-variations-content.d.ts +2 -0
- package/build-types/style-variations-content.d.ts.map +1 -0
- package/build-types/style-variations.d.ts +25 -0
- package/build-types/style-variations.d.ts.map +1 -0
- package/build-types/subtitle.d.ts +7 -0
- package/build-types/subtitle.d.ts.map +1 -0
- package/build-types/test/shadow-utils.spec.d.ts +2 -0
- package/build-types/test/shadow-utils.spec.d.ts.map +1 -0
- package/build-types/test/utils.spec.d.ts +2 -0
- package/build-types/test/utils.spec.d.ts.map +1 -0
- package/build-types/typography-elements.d.ts +3 -0
- package/build-types/typography-elements.d.ts.map +1 -0
- package/build-types/typography-example.d.ts +7 -0
- package/build-types/typography-example.d.ts.map +1 -0
- package/build-types/typography-panel.d.ts +7 -0
- package/build-types/typography-panel.d.ts.map +1 -0
- package/build-types/typography-preview.d.ts +8 -0
- package/build-types/typography-preview.d.ts.map +1 -0
- package/build-types/typography-variations.d.ts +27 -0
- package/build-types/typography-variations.d.ts.map +1 -0
- package/build-types/utils.d.ts +63 -0
- package/build-types/utils.d.ts.map +1 -0
- package/build-types/variations/variation.d.ts +10 -0
- package/build-types/variations/variation.d.ts.map +1 -0
- package/build-types/variations/variations-color.d.ts +7 -0
- package/build-types/variations/variations-color.d.ts.map +1 -0
- package/build-types/variations/variations-panel.d.ts +13 -0
- package/build-types/variations/variations-panel.d.ts.map +1 -0
- package/build-types/variations/variations-typography.d.ts +7 -0
- package/build-types/variations/variations-typography.d.ts.map +1 -0
- package/build-types/with-global-styles-provider.d.ts +20 -0
- package/build-types/with-global-styles-provider.d.ts.map +1 -0
- package/package.json +67 -0
- package/src/README.md +99 -0
- package/src/background-panel.tsx +56 -0
- package/src/block-preview-panel.tsx +91 -0
- package/src/color-indicator-wrapper.tsx +34 -0
- package/src/color-palette-panel.tsx +111 -0
- package/src/color-preview.tsx +78 -0
- package/src/color-variations.tsx +35 -0
- package/src/confirm-reset-shadow-dialog.tsx +45 -0
- package/src/context.ts +21 -0
- package/src/dimensions-panel.tsx +85 -0
- package/src/font-families.tsx +127 -0
- package/src/font-family-item.tsx +52 -0
- package/src/font-library-modal/collection-font-variant.tsx +52 -0
- package/src/font-library-modal/context.tsx +591 -0
- package/src/font-library-modal/font-card.tsx +77 -0
- package/src/font-library-modal/font-collection.tsx +592 -0
- package/src/font-library-modal/font-demo.tsx +123 -0
- package/src/font-library-modal/google-fonts-confirm-dialog.tsx +57 -0
- package/src/font-library-modal/index.tsx +110 -0
- package/src/font-library-modal/installed-fonts.tsx +547 -0
- package/src/font-library-modal/lib/inflate.js +4112 -0
- package/src/font-library-modal/lib/lib-font.browser.d.ts +11 -0
- package/src/font-library-modal/lib/lib-font.browser.js +3861 -0
- package/src/font-library-modal/lib/unbrotli.js +2706 -0
- package/src/font-library-modal/library-font-details.tsx +46 -0
- package/src/font-library-modal/library-font-variant.tsx +67 -0
- package/src/font-library-modal/resolvers.tsx +100 -0
- package/src/font-library-modal/style.scss +222 -0
- package/src/font-library-modal/types.ts +176 -0
- package/src/font-library-modal/upload-fonts.tsx +269 -0
- package/src/font-library-modal/utils/constants.ts +23 -0
- package/src/font-library-modal/utils/filter-fonts.ts +47 -0
- package/src/font-library-modal/utils/fonts-outline.ts +33 -0
- package/src/font-library-modal/utils/index.ts +368 -0
- package/src/font-library-modal/utils/make-families-from-faces.ts +34 -0
- package/src/font-library-modal/utils/preview-styles.ts +167 -0
- package/src/font-library-modal/utils/set-immutably.ts +37 -0
- package/src/font-library-modal/utils/sort-font-faces.ts +46 -0
- package/src/font-library-modal/utils/toggleFont.ts +109 -0
- package/src/font-sizes/confirm-delete-font-size-dialog.tsx +51 -0
- package/src/font-sizes/confirm-reset-font-sizes-dialog.tsx +45 -0
- package/src/font-sizes/font-size-preview.tsx +47 -0
- package/src/font-sizes/font-size.tsx +289 -0
- package/src/font-sizes/font-sizes-count.tsx +37 -0
- package/src/font-sizes/font-sizes.tsx +265 -0
- package/src/font-sizes/rename-font-size-dialog.tsx +83 -0
- package/src/global-styles-ui.tsx +292 -0
- package/src/gradients-palette-panel.tsx +126 -0
- package/src/highlighted-colors.tsx +44 -0
- package/src/hooks.ts +251 -0
- package/src/icon-with-current-color.tsx +31 -0
- package/src/index.ts +7 -0
- package/src/lock-unlock.ts +10 -0
- package/src/navigation-button.tsx +53 -0
- package/src/pagination/index.tsx +107 -0
- package/src/pagination/style.scss +7 -0
- package/src/palette.tsx +101 -0
- package/src/preset-colors.tsx +18 -0
- package/src/preview-colors.tsx +68 -0
- package/src/preview-hooks.tsx +58 -0
- package/src/preview-styles.tsx +196 -0
- package/src/preview-typography.tsx +49 -0
- package/src/preview-wrapper.tsx +137 -0
- package/src/provider.tsx +54 -0
- package/src/root-menu.tsx +87 -0
- package/src/screen-background.tsx +37 -0
- package/src/screen-block-list.tsx +198 -0
- package/src/screen-block.tsx +370 -0
- package/src/screen-color-palette.tsx +47 -0
- package/src/screen-colors.tsx +67 -0
- package/src/screen-css.tsx +56 -0
- package/src/screen-header.tsx +56 -0
- package/src/screen-layout.tsx +34 -0
- package/src/screen-revisions/index.tsx +158 -0
- package/src/screen-revisions/revisions-buttons.tsx +259 -0
- package/src/screen-revisions/style.scss +194 -0
- package/src/screen-revisions/types.ts +18 -0
- package/src/screen-revisions/use-global-styles-revisions.tsx +204 -0
- package/src/screen-root.tsx +146 -0
- package/src/screen-shadows.tsx +13 -0
- package/src/screen-style-variations.tsx +36 -0
- package/src/screen-typography-element.tsx +127 -0
- package/src/screen-typography.tsx +41 -0
- package/src/shadow-utils.ts +167 -0
- package/src/shadows-edit-panel.tsx +559 -0
- package/src/shadows-panel.tsx +207 -0
- package/src/size-control/index.tsx +97 -0
- package/src/size-control/style.scss +7 -0
- package/src/stories/index.story.js +410 -0
- package/src/style-variations-container.tsx +153 -0
- package/src/style-variations-content.tsx +24 -0
- package/src/style-variations.tsx +33 -0
- package/src/style.scss +287 -0
- package/src/subtitle.tsx +17 -0
- package/src/test/shadow-utils.spec.js +251 -0
- package/src/test/utils.spec.js +59 -0
- package/src/typography-elements.tsx +113 -0
- package/src/typography-example.tsx +78 -0
- package/src/typography-panel.tsx +56 -0
- package/src/typography-preview.tsx +61 -0
- package/src/typography-variations.tsx +35 -0
- package/src/utils.ts +301 -0
- package/src/variations/style.scss +43 -0
- package/src/variations/variation.tsx +113 -0
- package/src/variations/variations-color.tsx +54 -0
- package/src/variations/variations-panel.tsx +79 -0
- package/src/variations/variations-typography.tsx +65 -0
- package/src/with-global-styles-provider.tsx +44 -0
- package/tsconfig.json +26 -0
- package/tsconfig.tsbuildinfo +1 -0
package/src/README.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Global Styles UI
|
|
2
|
+
|
|
3
|
+
React component for editing global styles with a familiar interface inspired by WordPress Gutenberg.
|
|
4
|
+
|
|
5
|
+
## Public API
|
|
6
|
+
|
|
7
|
+
### GlobalStylesUI
|
|
8
|
+
|
|
9
|
+
The main component for rendering a global styles editing interface.
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import { GlobalStylesUI } from '@wordpress/global-styles-ui';
|
|
13
|
+
|
|
14
|
+
<GlobalStylesUI
|
|
15
|
+
value={userGlobalStyles}
|
|
16
|
+
inheritedValue={mergedGlobalStyles}
|
|
17
|
+
onChange={setGlobalStyles}
|
|
18
|
+
path="/colors"
|
|
19
|
+
onPathChange={setPath}
|
|
20
|
+
onReset={() => resetStyles()}
|
|
21
|
+
onExportCSS={() => exportCSS()}
|
|
22
|
+
fontLibraryEnabled={true}
|
|
23
|
+
serverCSS={serverCSS}
|
|
24
|
+
serverSettings={serverSettings}
|
|
25
|
+
/>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
#### Props
|
|
29
|
+
|
|
30
|
+
- **`value`** (`GlobalStylesConfig`): The user global styles object (what gets edited)
|
|
31
|
+
- **`inheritedValue`** (`GlobalStylesConfig`): The merged global styles object (base + user, for display/inheritance)
|
|
32
|
+
- **`onChange`** (`(newValue: GlobalStylesConfig) => void`): Callback when styles change
|
|
33
|
+
- **`path`** (`string`, optional): Current navigation path (e.g., "/colors", "/typography")
|
|
34
|
+
- **`onPathChange`** (`(newPath: string) => void`, optional): Callback when navigation changes
|
|
35
|
+
- **`onReset`** (`() => void`, optional): Callback for reset action
|
|
36
|
+
- **`onExportCSS`** (`() => void`, optional): Callback for CSS export action
|
|
37
|
+
- **`fontLibraryEnabled`** (`boolean`, optional): Whether font library is enabled (default: false)
|
|
38
|
+
- **`serverCSS`** (`{ isGlobalStyles?: boolean }[]`, optional): Server CSS styles for BlockEditorProvider
|
|
39
|
+
- **`serverSettings`** (`{ __unstableResolvedAssets: Record<string, unknown> }`, optional): Server settings for BlockEditorProvider
|
|
40
|
+
|
|
41
|
+
## Dependencies
|
|
42
|
+
|
|
43
|
+
This component has the following external dependencies:
|
|
44
|
+
|
|
45
|
+
### WordPress Dependencies
|
|
46
|
+
|
|
47
|
+
- **`@wordpress/core-data`** - Used internally for fetching:
|
|
48
|
+
|
|
49
|
+
- Style variations (`useEntityRecords('root', 'globalStyles')`)
|
|
50
|
+
- Font collections and families (`useEntityRecords('postType', 'wp_font_family')`)
|
|
51
|
+
- User capabilities (`useSelect(select => select('core').canUser(...))`)
|
|
52
|
+
|
|
53
|
+
- **`@wordpress/components`** - UI components (Navigator, Button, Panel, etc.)
|
|
54
|
+
- **`@wordpress/blocks`** - Block type information and supports
|
|
55
|
+
- **`@wordpress/element`** - React utilities
|
|
56
|
+
- **`@wordpress/i18n`** - Internationalization
|
|
57
|
+
|
|
58
|
+
### Internal Dependencies
|
|
59
|
+
|
|
60
|
+
- **`../global-styles-engine`** - Generic global styles utilities (framework-agnostic)
|
|
61
|
+
|
|
62
|
+
## Architecture
|
|
63
|
+
|
|
64
|
+
### Internal Structure
|
|
65
|
+
|
|
66
|
+
The component is internally generic and framework-agnostic, with WordPress dependencies only used for:
|
|
67
|
+
|
|
68
|
+
1. **Data Fetching**: Font collections, style variations, and user capabilities
|
|
69
|
+
2. **UI Components**: WordPress design system components
|
|
70
|
+
3. **Block Information**: Block type support detection
|
|
71
|
+
|
|
72
|
+
### Data Flow
|
|
73
|
+
|
|
74
|
+
1. Parent provides `value` (global styles) and `onChange` callback
|
|
75
|
+
2. Component uses WordPress stores for additional data (fonts, variations, capabilities)
|
|
76
|
+
3. Internal context manages state and provides hooks to child components
|
|
77
|
+
4. Changes flow back through `onChange` callback
|
|
78
|
+
|
|
79
|
+
## Usage Example
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
function MyStylesPage() {
|
|
83
|
+
const [globalStyles, setGlobalStyles] = useState(initialStyles);
|
|
84
|
+
const [currentPath, setCurrentPath] = useState('/');
|
|
85
|
+
|
|
86
|
+
return (
|
|
87
|
+
<GlobalStylesUI
|
|
88
|
+
value={globalStyles}
|
|
89
|
+
onChange={setGlobalStyles}
|
|
90
|
+
path={currentPath}
|
|
91
|
+
onPathChange={setCurrentPath}
|
|
92
|
+
onReset={() => setGlobalStyles(defaultStyles)}
|
|
93
|
+
onExportCSS={() => downloadCSS(globalStyles)}
|
|
94
|
+
/>
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
This component provides a complete global styles editing experience while maintaining a clean, controlled API.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
// @ts-expect-error: Not typed yet.
|
|
5
|
+
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Internal dependencies
|
|
9
|
+
*/
|
|
10
|
+
import { useStyle, useSetting } from './hooks';
|
|
11
|
+
import { unlock } from './lock-unlock';
|
|
12
|
+
|
|
13
|
+
// Initial control values where no block style is set.
|
|
14
|
+
const BACKGROUND_DEFAULT_VALUES = {
|
|
15
|
+
backgroundSize: 'auto',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const { BackgroundPanel: StylesBackgroundPanel } = unlock(
|
|
19
|
+
blockEditorPrivateApis
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Checks if there is a current value in the background image block support
|
|
24
|
+
* attributes.
|
|
25
|
+
*
|
|
26
|
+
* @param style Style attribute.
|
|
27
|
+
* @return Whether the block has a background image value set.
|
|
28
|
+
*/
|
|
29
|
+
export function hasBackgroundImageValue( style: any ): boolean {
|
|
30
|
+
return (
|
|
31
|
+
!! style?.background?.backgroundImage?.id ||
|
|
32
|
+
!! style?.background?.backgroundImage?.url ||
|
|
33
|
+
typeof style?.background?.backgroundImage === 'string'
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export default function BackgroundPanel() {
|
|
38
|
+
const [ style ] = useStyle( '', undefined, 'user', false );
|
|
39
|
+
const [ inheritedStyle, setStyle ] = useStyle(
|
|
40
|
+
'',
|
|
41
|
+
undefined,
|
|
42
|
+
'merged',
|
|
43
|
+
false
|
|
44
|
+
);
|
|
45
|
+
const [ settings ] = useSetting( '' );
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<StylesBackgroundPanel
|
|
49
|
+
inheritedValue={ inheritedStyle }
|
|
50
|
+
value={ style }
|
|
51
|
+
onChange={ setStyle }
|
|
52
|
+
settings={ settings }
|
|
53
|
+
defaultValues={ BACKGROUND_DEFAULT_VALUES }
|
|
54
|
+
/>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
// @ts-expect-error: Not typed yet.
|
|
5
|
+
import { BlockPreview } from '@wordpress/block-editor';
|
|
6
|
+
// @ts-expect-error: Not typed yet.
|
|
7
|
+
import { getBlockType, getBlockFromExample } from '@wordpress/blocks';
|
|
8
|
+
import { __experimentalSpacer as Spacer } from '@wordpress/components';
|
|
9
|
+
import { useMemo } from '@wordpress/element';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Internal dependencies
|
|
13
|
+
*/
|
|
14
|
+
import { getVariationClassName } from './utils';
|
|
15
|
+
|
|
16
|
+
interface BlockPreviewPanelProps {
|
|
17
|
+
name: string;
|
|
18
|
+
variation?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const BlockPreviewPanel = ( {
|
|
22
|
+
name,
|
|
23
|
+
variation = '',
|
|
24
|
+
}: BlockPreviewPanelProps ) => {
|
|
25
|
+
const blockExample = getBlockType( name )?.example;
|
|
26
|
+
const blocks = useMemo( () => {
|
|
27
|
+
if ( ! blockExample ) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const example = {
|
|
32
|
+
...blockExample,
|
|
33
|
+
attributes: {
|
|
34
|
+
...blockExample.attributes,
|
|
35
|
+
style: undefined,
|
|
36
|
+
className: variation
|
|
37
|
+
? getVariationClassName( variation )
|
|
38
|
+
: blockExample.attributes?.className,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
return getBlockFromExample( name, example );
|
|
43
|
+
}, [ name, blockExample, variation ] );
|
|
44
|
+
|
|
45
|
+
const viewportWidth = blockExample?.viewportWidth ?? 500;
|
|
46
|
+
// Same as height of InserterPreviewPanel.
|
|
47
|
+
const previewHeight = 144;
|
|
48
|
+
const sidebarWidth = 235;
|
|
49
|
+
const scale = sidebarWidth / viewportWidth;
|
|
50
|
+
const minHeight =
|
|
51
|
+
scale !== 0 && scale < 1 && previewHeight
|
|
52
|
+
? previewHeight / scale
|
|
53
|
+
: previewHeight;
|
|
54
|
+
|
|
55
|
+
if ( ! blockExample ) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<Spacer marginX={ 4 } marginBottom={ 4 }>
|
|
61
|
+
<div
|
|
62
|
+
className="global-styles-ui__block-preview-panel"
|
|
63
|
+
style={ { maxHeight: previewHeight, boxSizing: 'initial' } }
|
|
64
|
+
>
|
|
65
|
+
<BlockPreview
|
|
66
|
+
blocks={ blocks }
|
|
67
|
+
viewportWidth={ viewportWidth }
|
|
68
|
+
minHeight={ previewHeight }
|
|
69
|
+
additionalStyles={
|
|
70
|
+
//We want this CSS to be in sync with the one in InserterPreviewPanel.
|
|
71
|
+
[
|
|
72
|
+
{
|
|
73
|
+
css: `
|
|
74
|
+
body{
|
|
75
|
+
padding: 24px;
|
|
76
|
+
min-height:${ Math.round( minHeight ) }px;
|
|
77
|
+
display:flex;
|
|
78
|
+
align-items:center;
|
|
79
|
+
}
|
|
80
|
+
.is-root-container { width: 100%; }
|
|
81
|
+
`,
|
|
82
|
+
},
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
/>
|
|
86
|
+
</div>
|
|
87
|
+
</Spacer>
|
|
88
|
+
);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export default BlockPreviewPanel;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* WordPress dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { Flex } from '@wordpress/components';
|
|
10
|
+
|
|
11
|
+
interface ColorIndicatorWrapperProps {
|
|
12
|
+
className?: string;
|
|
13
|
+
[ key: string ]: any;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function ColorIndicatorWrapper( {
|
|
17
|
+
className,
|
|
18
|
+
children,
|
|
19
|
+
...props
|
|
20
|
+
}: ColorIndicatorWrapperProps ) {
|
|
21
|
+
return (
|
|
22
|
+
<Flex
|
|
23
|
+
className={ clsx(
|
|
24
|
+
'global-styles-ui__color-indicator-wrapper',
|
|
25
|
+
className
|
|
26
|
+
) }
|
|
27
|
+
{ ...props }
|
|
28
|
+
>
|
|
29
|
+
{ children }
|
|
30
|
+
</Flex>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default ColorIndicatorWrapper;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { Color } from '@wordpress/global-styles-engine';
|
|
5
|
+
import { useViewportMatch } from '@wordpress/compose';
|
|
6
|
+
import {
|
|
7
|
+
__experimentalPaletteEdit as PaletteEdit,
|
|
8
|
+
__experimentalVStack as VStack,
|
|
9
|
+
Button,
|
|
10
|
+
} from '@wordpress/components';
|
|
11
|
+
import { __ } from '@wordpress/i18n';
|
|
12
|
+
import { shuffle } from '@wordpress/icons';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Internal dependencies
|
|
16
|
+
*/
|
|
17
|
+
import { useSetting, useColorRandomizer } from './hooks';
|
|
18
|
+
import ColorVariations from './variations/variations-color';
|
|
19
|
+
|
|
20
|
+
const mobilePopoverProps = { placement: 'bottom-start' as const, offset: 8 };
|
|
21
|
+
|
|
22
|
+
interface ColorPalettePanelProps {
|
|
23
|
+
name?: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default function ColorPalettePanel( { name }: ColorPalettePanelProps ) {
|
|
27
|
+
const [ themeColors, setThemeColors ] = useSetting< Color[] >(
|
|
28
|
+
'color.palette.theme',
|
|
29
|
+
name
|
|
30
|
+
);
|
|
31
|
+
const [ baseThemeColors ] = useSetting< Color[] >(
|
|
32
|
+
'color.palette.theme',
|
|
33
|
+
name,
|
|
34
|
+
'base'
|
|
35
|
+
);
|
|
36
|
+
const [ defaultColors, setDefaultColors ] = useSetting< Color[] >(
|
|
37
|
+
'color.palette.default',
|
|
38
|
+
name
|
|
39
|
+
);
|
|
40
|
+
const [ baseDefaultColors ] = useSetting< Color[] >(
|
|
41
|
+
'color.palette.default',
|
|
42
|
+
name,
|
|
43
|
+
'base'
|
|
44
|
+
);
|
|
45
|
+
const [ customColors, setCustomColors ] = useSetting< Color[] >(
|
|
46
|
+
'color.palette.custom',
|
|
47
|
+
name
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
const [ defaultPaletteEnabled ] = useSetting< boolean >(
|
|
51
|
+
'color.defaultPalette',
|
|
52
|
+
name
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
const isMobileViewport = useViewportMatch( 'small', '<' );
|
|
56
|
+
const popoverProps = isMobileViewport ? mobilePopoverProps : undefined;
|
|
57
|
+
|
|
58
|
+
const [ randomizeThemeColors ] = useColorRandomizer( name );
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<VStack className="global-styles-ui-color-palette-panel" spacing={ 8 }>
|
|
62
|
+
<VStack spacing={ 4 }>
|
|
63
|
+
{ !! themeColors && !! themeColors.length && (
|
|
64
|
+
<PaletteEdit
|
|
65
|
+
canReset={ themeColors !== baseThemeColors }
|
|
66
|
+
canOnlyChangeValues
|
|
67
|
+
colors={ themeColors }
|
|
68
|
+
onChange={ setThemeColors }
|
|
69
|
+
paletteLabel={ __( 'Theme' ) }
|
|
70
|
+
paletteLabelHeadingLevel={ 3 }
|
|
71
|
+
popoverProps={ popoverProps }
|
|
72
|
+
/>
|
|
73
|
+
) }
|
|
74
|
+
{ ( window as any ).__experimentalEnableColorRandomizer &&
|
|
75
|
+
themeColors?.length > 0 &&
|
|
76
|
+
randomizeThemeColors && (
|
|
77
|
+
<Button
|
|
78
|
+
__next40pxDefaultSize
|
|
79
|
+
variant="secondary"
|
|
80
|
+
icon={ shuffle }
|
|
81
|
+
onClick={ randomizeThemeColors }
|
|
82
|
+
>
|
|
83
|
+
{ __( 'Randomize colors' ) }
|
|
84
|
+
</Button>
|
|
85
|
+
) }
|
|
86
|
+
</VStack>
|
|
87
|
+
{ !! defaultColors &&
|
|
88
|
+
!! defaultColors.length &&
|
|
89
|
+
!! defaultPaletteEnabled && (
|
|
90
|
+
<PaletteEdit
|
|
91
|
+
canReset={ defaultColors !== baseDefaultColors }
|
|
92
|
+
canOnlyChangeValues
|
|
93
|
+
colors={ defaultColors }
|
|
94
|
+
onChange={ setDefaultColors }
|
|
95
|
+
paletteLabel={ __( 'Default' ) }
|
|
96
|
+
paletteLabelHeadingLevel={ 3 }
|
|
97
|
+
popoverProps={ popoverProps }
|
|
98
|
+
/>
|
|
99
|
+
) }
|
|
100
|
+
<PaletteEdit
|
|
101
|
+
colors={ customColors }
|
|
102
|
+
onChange={ setCustomColors }
|
|
103
|
+
paletteLabel={ __( 'Custom' ) }
|
|
104
|
+
paletteLabelHeadingLevel={ 3 }
|
|
105
|
+
slugPrefix="custom-"
|
|
106
|
+
popoverProps={ popoverProps }
|
|
107
|
+
/>
|
|
108
|
+
<ColorVariations title={ __( 'Palettes' ) } />
|
|
109
|
+
</VStack>
|
|
110
|
+
);
|
|
111
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { __experimentalHStack as HStack } from '@wordpress/components';
|
|
5
|
+
import { useContext } from '@wordpress/element';
|
|
6
|
+
import { getStyle } from '@wordpress/global-styles-engine';
|
|
7
|
+
import type { Color } from '@wordpress/global-styles-engine';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Internal dependencies
|
|
11
|
+
*/
|
|
12
|
+
import { GlobalStylesContext } from './context';
|
|
13
|
+
|
|
14
|
+
export function ColorPreview() {
|
|
15
|
+
const { merged } = useContext( GlobalStylesContext );
|
|
16
|
+
|
|
17
|
+
// Extract main colors from the global styles
|
|
18
|
+
const backgroundColor = getStyle( merged, 'color.background' ) || '#ffffff';
|
|
19
|
+
const textColor = getStyle( merged, 'color.text' ) || '#000000';
|
|
20
|
+
|
|
21
|
+
// Get color palette - handle both array and object formats
|
|
22
|
+
const palette = merged?.settings?.color?.palette;
|
|
23
|
+
let paletteColors: Color[] = [];
|
|
24
|
+
|
|
25
|
+
if ( Array.isArray( palette ) ) {
|
|
26
|
+
paletteColors = palette;
|
|
27
|
+
} else if ( palette && typeof palette === 'object' ) {
|
|
28
|
+
paletteColors = palette.theme || palette.custom || [];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Get first few colors from palette for preview
|
|
32
|
+
const previewColors = paletteColors.slice( 0, 4 );
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<HStack
|
|
36
|
+
spacing={ 0 }
|
|
37
|
+
justify="center"
|
|
38
|
+
style={ {
|
|
39
|
+
height: '100%',
|
|
40
|
+
overflow: 'hidden',
|
|
41
|
+
minHeight: '40px',
|
|
42
|
+
} }
|
|
43
|
+
>
|
|
44
|
+
{ /* Background color swatch */ }
|
|
45
|
+
<div
|
|
46
|
+
style={ {
|
|
47
|
+
backgroundColor,
|
|
48
|
+
width: '25%',
|
|
49
|
+
height: '100%',
|
|
50
|
+
minHeight: '40px',
|
|
51
|
+
} }
|
|
52
|
+
/>
|
|
53
|
+
{ /* Text color swatch */ }
|
|
54
|
+
<div
|
|
55
|
+
style={ {
|
|
56
|
+
backgroundColor: textColor,
|
|
57
|
+
width: '25%',
|
|
58
|
+
height: '100%',
|
|
59
|
+
minHeight: '40px',
|
|
60
|
+
} }
|
|
61
|
+
/>
|
|
62
|
+
{ /* Palette colors */ }
|
|
63
|
+
{ previewColors
|
|
64
|
+
.slice( 0, 2 )
|
|
65
|
+
.map( ( color: Color, index: number ) => (
|
|
66
|
+
<div
|
|
67
|
+
key={ index }
|
|
68
|
+
style={ {
|
|
69
|
+
backgroundColor: color.color,
|
|
70
|
+
width: '25%',
|
|
71
|
+
height: '100%',
|
|
72
|
+
minHeight: '40px',
|
|
73
|
+
} }
|
|
74
|
+
/>
|
|
75
|
+
) ) }
|
|
76
|
+
</HStack>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { GlobalStylesConfig } from '@wordpress/global-styles-engine';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import ColorVariationsInternal from './variations/variations-color';
|
|
10
|
+
import { withGlobalStylesProvider } from './with-global-styles-provider';
|
|
11
|
+
|
|
12
|
+
export interface ColorVariationsProps {
|
|
13
|
+
value: GlobalStylesConfig;
|
|
14
|
+
baseValue: GlobalStylesConfig;
|
|
15
|
+
onChange: ( config: GlobalStylesConfig ) => void;
|
|
16
|
+
title?: string;
|
|
17
|
+
gap?: number;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Render Global Styles Color Variations.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* <ColorVariations
|
|
26
|
+
* value={userConfig}
|
|
27
|
+
* baseValue={baseConfig}
|
|
28
|
+
* onChange={setUserConfig}
|
|
29
|
+
* title="Palettes"
|
|
30
|
+
* gap={3}
|
|
31
|
+
* />
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export const ColorVariations: React.ComponentType< ColorVariationsProps > =
|
|
35
|
+
withGlobalStylesProvider( ColorVariationsInternal );
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';
|
|
5
|
+
import { __ } from '@wordpress/i18n';
|
|
6
|
+
|
|
7
|
+
interface ConfirmResetShadowDialogProps {
|
|
8
|
+
text: string;
|
|
9
|
+
confirmButtonText: string;
|
|
10
|
+
isOpen: boolean;
|
|
11
|
+
toggleOpen: () => void;
|
|
12
|
+
onConfirm: () => void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function ConfirmResetShadowDialog( {
|
|
16
|
+
text,
|
|
17
|
+
confirmButtonText,
|
|
18
|
+
isOpen,
|
|
19
|
+
toggleOpen,
|
|
20
|
+
onConfirm,
|
|
21
|
+
}: ConfirmResetShadowDialogProps ) {
|
|
22
|
+
const handleConfirm = async () => {
|
|
23
|
+
toggleOpen();
|
|
24
|
+
onConfirm();
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const handleCancel = () => {
|
|
28
|
+
toggleOpen();
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<ConfirmDialog
|
|
33
|
+
isOpen={ isOpen }
|
|
34
|
+
cancelButtonText={ __( 'Cancel' ) }
|
|
35
|
+
confirmButtonText={ confirmButtonText }
|
|
36
|
+
onCancel={ handleCancel }
|
|
37
|
+
onConfirm={ handleConfirm }
|
|
38
|
+
size="medium"
|
|
39
|
+
>
|
|
40
|
+
{ text }
|
|
41
|
+
</ConfirmDialog>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export default ConfirmResetShadowDialog;
|
package/src/context.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { createContext } from '@wordpress/element';
|
|
5
|
+
import type { GlobalStylesConfig } from '@wordpress/global-styles-engine';
|
|
6
|
+
|
|
7
|
+
export interface GlobalStylesContextType {
|
|
8
|
+
user: GlobalStylesConfig;
|
|
9
|
+
base: GlobalStylesConfig;
|
|
10
|
+
merged: GlobalStylesConfig;
|
|
11
|
+
onChange: ( newValue: GlobalStylesConfig ) => void;
|
|
12
|
+
fontLibraryEnabled?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const GlobalStylesContext = createContext< GlobalStylesContextType >( {
|
|
16
|
+
user: { styles: {}, settings: {} },
|
|
17
|
+
base: { styles: {}, settings: {} },
|
|
18
|
+
merged: { styles: {}, settings: {} },
|
|
19
|
+
onChange: () => {},
|
|
20
|
+
fontLibraryEnabled: false,
|
|
21
|
+
} );
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
// @ts-expect-error: Not typed yet.
|
|
5
|
+
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
6
|
+
import { useMemo } from '@wordpress/element';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Internal dependencies
|
|
10
|
+
*/
|
|
11
|
+
import { useStyle, useSetting } from './hooks';
|
|
12
|
+
import { unlock } from './lock-unlock';
|
|
13
|
+
|
|
14
|
+
const { useSettingsForBlockElement, DimensionsPanel: StylesDimensionsPanel } =
|
|
15
|
+
unlock( blockEditorPrivateApis );
|
|
16
|
+
|
|
17
|
+
const DEFAULT_CONTROLS = {
|
|
18
|
+
contentSize: true,
|
|
19
|
+
wideSize: true,
|
|
20
|
+
padding: true,
|
|
21
|
+
margin: true,
|
|
22
|
+
blockGap: true,
|
|
23
|
+
minHeight: true,
|
|
24
|
+
childLayout: false,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default function DimensionsPanel() {
|
|
28
|
+
const [ style ] = useStyle( '', undefined, 'user', false );
|
|
29
|
+
const [ inheritedStyle, setStyle ] = useStyle(
|
|
30
|
+
'',
|
|
31
|
+
undefined,
|
|
32
|
+
'merged',
|
|
33
|
+
false
|
|
34
|
+
);
|
|
35
|
+
const [ userSettings ] = useSetting( '', undefined, 'user' );
|
|
36
|
+
const [ rawSettings, setSettings ] = useSetting( '' );
|
|
37
|
+
const settings = useSettingsForBlockElement( rawSettings );
|
|
38
|
+
|
|
39
|
+
// These intermediary objects are needed because the "layout" property is stored
|
|
40
|
+
// in settings rather than styles.
|
|
41
|
+
const inheritedStyleWithLayout = useMemo( () => {
|
|
42
|
+
return {
|
|
43
|
+
...inheritedStyle,
|
|
44
|
+
layout: settings.layout,
|
|
45
|
+
};
|
|
46
|
+
}, [ inheritedStyle, settings.layout ] );
|
|
47
|
+
|
|
48
|
+
const styleWithLayout = useMemo( () => {
|
|
49
|
+
return {
|
|
50
|
+
...style,
|
|
51
|
+
layout: userSettings.layout,
|
|
52
|
+
};
|
|
53
|
+
}, [ style, userSettings.layout ] );
|
|
54
|
+
|
|
55
|
+
const onChange = ( newStyle: any ) => {
|
|
56
|
+
const updatedStyle = { ...newStyle };
|
|
57
|
+
delete updatedStyle.layout;
|
|
58
|
+
setStyle( updatedStyle );
|
|
59
|
+
|
|
60
|
+
if ( newStyle.layout !== userSettings.layout ) {
|
|
61
|
+
const updatedSettings = {
|
|
62
|
+
...userSettings,
|
|
63
|
+
layout: newStyle.layout,
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
// Ensure any changes to layout definitions are not persisted.
|
|
67
|
+
if ( updatedSettings.layout?.definitions ) {
|
|
68
|
+
delete updatedSettings.layout.definitions;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
setSettings( updatedSettings );
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<StylesDimensionsPanel
|
|
77
|
+
inheritedValue={ inheritedStyleWithLayout }
|
|
78
|
+
value={ styleWithLayout }
|
|
79
|
+
onChange={ onChange }
|
|
80
|
+
settings={ settings }
|
|
81
|
+
includeLayoutControls
|
|
82
|
+
defaultControls={ DEFAULT_CONTROLS }
|
|
83
|
+
/>
|
|
84
|
+
);
|
|
85
|
+
}
|