@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
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
@use "@wordpress/base-styles/colors" as *;
|
|
2
|
+
@use "@wordpress/base-styles/mixins" as *;
|
|
3
|
+
@use "@wordpress/base-styles/variables" as *;
|
|
4
|
+
|
|
5
|
+
.global-styles-ui-screen-revisions__revisions-list {
|
|
6
|
+
list-style: none;
|
|
7
|
+
margin: 0 $grid-unit-20 $grid-unit-20 $grid-unit-20;
|
|
8
|
+
// Forces subsequent flex items to the bottom.
|
|
9
|
+
flex-grow: 1;
|
|
10
|
+
li {
|
|
11
|
+
margin-bottom: 0;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.global-styles-ui-screen-revisions__revision-item {
|
|
16
|
+
position: relative;
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
|
|
21
|
+
&[role="option"]:active,
|
|
22
|
+
&[role="option"]:focus {
|
|
23
|
+
@include button-style__focus();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:hover {
|
|
27
|
+
background: rgba(var(--wp-admin-theme-color--rgb), 0.04);
|
|
28
|
+
.global-styles-ui-screen-revisions__date {
|
|
29
|
+
color: var(--wp-admin-theme-color);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&::before,
|
|
34
|
+
&::after {
|
|
35
|
+
position: absolute;
|
|
36
|
+
content: "\a";
|
|
37
|
+
display: block;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&::before {
|
|
41
|
+
background: $gray-300;
|
|
42
|
+
border-radius: 50%;
|
|
43
|
+
height: $grid-unit-10;
|
|
44
|
+
width: $grid-unit-10;
|
|
45
|
+
top: $grid-unit-20 + 2;
|
|
46
|
+
left: $grid-unit-20 + 1; // So the circle is centered on the line.
|
|
47
|
+
transform: translate(-50%, -50%);
|
|
48
|
+
z-index: 1;
|
|
49
|
+
|
|
50
|
+
// This border serves as a background color in Windows High Contrast mode.
|
|
51
|
+
border: 4px solid transparent;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&[aria-selected="true"] {
|
|
55
|
+
border-radius: $radius-small;
|
|
56
|
+
|
|
57
|
+
// Only visible in Windows High Contrast mode.
|
|
58
|
+
outline: 3px solid transparent;
|
|
59
|
+
outline-offset: -2px;
|
|
60
|
+
|
|
61
|
+
color: var(--wp-admin-theme-color);
|
|
62
|
+
background: rgba(var(--wp-admin-theme-color--rgb), 0.04);
|
|
63
|
+
|
|
64
|
+
.global-styles-ui-screen-revisions__date {
|
|
65
|
+
color: var(--wp-admin-theme-color);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&::before {
|
|
69
|
+
background: var(--wp-admin-theme-color);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.global-styles-ui-screen-revisions__changes > li,
|
|
73
|
+
.global-styles-ui-screen-revisions__meta,
|
|
74
|
+
.global-styles-ui-screen-revisions__applied-text {
|
|
75
|
+
color: $gray-900;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&::after {
|
|
80
|
+
height: 100%;
|
|
81
|
+
left: $grid-unit-20;
|
|
82
|
+
top: 0;
|
|
83
|
+
width: 0;
|
|
84
|
+
border: 0.5px solid $gray-300;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&:first-child::after {
|
|
88
|
+
top: $grid-unit-20 + 2;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&:last-child::after {
|
|
92
|
+
height: $grid-unit-20 + 2;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
.global-styles-ui-screen-revisions__revision-item-wrapper {
|
|
96
|
+
display: block;
|
|
97
|
+
padding: $grid-unit-15 $grid-unit-15 $grid-unit-05 $grid-unit-50;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.global-styles-ui-screen-revisions__apply-button.is-primary,
|
|
101
|
+
.global-styles-ui-screen-revisions__applied-text {
|
|
102
|
+
align-self: flex-start;
|
|
103
|
+
// Left margin = left padding of .global-styles-ui-screen-revisions__revision-item-wrapper.
|
|
104
|
+
margin: $grid-unit-05 $grid-unit-15 $grid-unit-15 $grid-unit-50;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.global-styles-ui-screen-revisions__changes,
|
|
108
|
+
.global-styles-ui-screen-revisions__meta,
|
|
109
|
+
.global-styles-ui-screen-revisions__applied-text {
|
|
110
|
+
color: $gray-700;
|
|
111
|
+
font-size: 12px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.global-styles-ui-screen-revisions__description {
|
|
115
|
+
display: flex;
|
|
116
|
+
flex-direction: column;
|
|
117
|
+
align-items: flex-start;
|
|
118
|
+
gap: $grid-unit-10;
|
|
119
|
+
.global-styles-ui-screen-revisions__date {
|
|
120
|
+
text-transform: uppercase;
|
|
121
|
+
font-weight: 600;
|
|
122
|
+
font-size: 12px;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.global-styles-ui-screen-revisions__meta {
|
|
127
|
+
display: flex;
|
|
128
|
+
justify-content: start;
|
|
129
|
+
width: 100%;
|
|
130
|
+
align-items: flex-start;
|
|
131
|
+
text-align: left;
|
|
132
|
+
margin-bottom: $grid-unit-05;
|
|
133
|
+
|
|
134
|
+
img {
|
|
135
|
+
width: $grid-unit-20;
|
|
136
|
+
height: $grid-unit-20;
|
|
137
|
+
border-radius: 100%;
|
|
138
|
+
margin-right: $grid-unit-10;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.global-styles-ui-screen-revisions__loading {
|
|
143
|
+
margin: $grid-unit-30 auto !important;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.global-styles-ui-screen-revisions__changes {
|
|
147
|
+
text-align: left;
|
|
148
|
+
line-height: $default-line-height;
|
|
149
|
+
margin-left: $grid-unit-15;
|
|
150
|
+
list-style: disc;
|
|
151
|
+
|
|
152
|
+
li {
|
|
153
|
+
margin-bottom: $grid-unit-05;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination {
|
|
158
|
+
justify-content: space-between;
|
|
159
|
+
gap: 2px;
|
|
160
|
+
.edit-site-pagination__total {
|
|
161
|
+
position: absolute;
|
|
162
|
+
left: -1000px;
|
|
163
|
+
height: 1px;
|
|
164
|
+
margin: -1px;
|
|
165
|
+
overflow: hidden;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.components-text {
|
|
169
|
+
font-size: 12px;
|
|
170
|
+
// `will-change` is required because something about flex props prevents
|
|
171
|
+
// Safari from rendering the page / total text.
|
|
172
|
+
will-change: opacity;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.components-button.is-tertiary {
|
|
176
|
+
color: $gray-900;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.components-button.is-tertiary:disabled,
|
|
180
|
+
.components-button.is-tertiary[aria-disabled="true"] {
|
|
181
|
+
color: $gray-600;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.global-styles-ui-screen-revisions__footer {
|
|
186
|
+
height: $grid-unit-70;
|
|
187
|
+
z-index: 1;
|
|
188
|
+
position: sticky;
|
|
189
|
+
min-width: 100%;
|
|
190
|
+
bottom: 0;
|
|
191
|
+
background: $white;
|
|
192
|
+
padding: $grid-unit-15;
|
|
193
|
+
border-top: $border-width solid $gray-300;
|
|
194
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { GlobalStylesConfig } from '@wordpress/global-styles-engine';
|
|
5
|
+
|
|
6
|
+
export interface User {
|
|
7
|
+
id: number;
|
|
8
|
+
name: string;
|
|
9
|
+
avatar_urls: Record< string, string >;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface Revision extends GlobalStylesConfig {
|
|
13
|
+
id: string | number;
|
|
14
|
+
author?: User;
|
|
15
|
+
modified?: string | Date;
|
|
16
|
+
isLatest?: boolean;
|
|
17
|
+
_links?: any;
|
|
18
|
+
}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { useSelect } from '@wordpress/data';
|
|
5
|
+
import {
|
|
6
|
+
store as coreStore,
|
|
7
|
+
type GlobalStylesRevision,
|
|
8
|
+
} from '@wordpress/core-data';
|
|
9
|
+
import { useContext, useMemo } from '@wordpress/element';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Internal dependencies
|
|
13
|
+
*/
|
|
14
|
+
import { GlobalStylesContext } from '../context';
|
|
15
|
+
import type { Revision, User } from './types';
|
|
16
|
+
|
|
17
|
+
interface RawRevision extends Omit< Revision, 'author' > {
|
|
18
|
+
author?: number;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface Query {
|
|
22
|
+
per_page?: number;
|
|
23
|
+
page?: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface UseGlobalStylesRevisionsParams {
|
|
27
|
+
query?: Query;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface UseGlobalStylesRevisionsReturn {
|
|
31
|
+
revisions: Revision[];
|
|
32
|
+
hasUnsavedChanges: boolean;
|
|
33
|
+
isLoading: boolean;
|
|
34
|
+
revisionsCount: number;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const SITE_EDITOR_AUTHORS_QUERY = {
|
|
38
|
+
per_page: -1,
|
|
39
|
+
_fields: 'id,name,avatar_urls',
|
|
40
|
+
context: 'view',
|
|
41
|
+
capabilities: [ 'edit_theme_options' ],
|
|
42
|
+
};
|
|
43
|
+
const DEFAULT_QUERY = { per_page: 100, page: 1 };
|
|
44
|
+
const EMPTY_ARRAY: RawRevision[] = [];
|
|
45
|
+
|
|
46
|
+
export default function useGlobalStylesRevisions( {
|
|
47
|
+
query,
|
|
48
|
+
}: UseGlobalStylesRevisionsParams = {} ): UseGlobalStylesRevisionsReturn {
|
|
49
|
+
const { user: userConfig } = useContext( GlobalStylesContext );
|
|
50
|
+
const _query: Query = useMemo(
|
|
51
|
+
() => ( { ...DEFAULT_QUERY, ...query } ),
|
|
52
|
+
[ query ]
|
|
53
|
+
);
|
|
54
|
+
const {
|
|
55
|
+
authors,
|
|
56
|
+
currentUser,
|
|
57
|
+
isDirty,
|
|
58
|
+
revisions,
|
|
59
|
+
isLoadingGlobalStylesRevisions,
|
|
60
|
+
revisionsCount,
|
|
61
|
+
} = useSelect(
|
|
62
|
+
( select ) => {
|
|
63
|
+
const {
|
|
64
|
+
__experimentalGetDirtyEntityRecords,
|
|
65
|
+
getCurrentUser,
|
|
66
|
+
getUsers,
|
|
67
|
+
getRevisions,
|
|
68
|
+
__experimentalGetCurrentGlobalStylesId,
|
|
69
|
+
getEntityRecord,
|
|
70
|
+
// @ts-expect-error
|
|
71
|
+
isResolving,
|
|
72
|
+
} = select( coreStore );
|
|
73
|
+
const dirtyEntityRecords =
|
|
74
|
+
__experimentalGetDirtyEntityRecords() || [];
|
|
75
|
+
const _currentUser = getCurrentUser();
|
|
76
|
+
const _isDirty = dirtyEntityRecords.length > 0;
|
|
77
|
+
const globalStylesId = __experimentalGetCurrentGlobalStylesId();
|
|
78
|
+
const globalStyles = globalStylesId
|
|
79
|
+
? getEntityRecord< GlobalStylesRevision >(
|
|
80
|
+
'root',
|
|
81
|
+
'globalStyles',
|
|
82
|
+
globalStylesId
|
|
83
|
+
)
|
|
84
|
+
: undefined;
|
|
85
|
+
const _revisionsCount: number =
|
|
86
|
+
// @ts-expect-error - _links is not typed in GlobalStylesRevision
|
|
87
|
+
globalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0;
|
|
88
|
+
// @ts-expect-error - getRevisions is not fully typed
|
|
89
|
+
const globalStylesRevisions: RawRevision[] = globalStylesId
|
|
90
|
+
? getRevisions(
|
|
91
|
+
'root',
|
|
92
|
+
'globalStyles',
|
|
93
|
+
globalStylesId,
|
|
94
|
+
_query
|
|
95
|
+
) || EMPTY_ARRAY
|
|
96
|
+
: EMPTY_ARRAY;
|
|
97
|
+
// @ts-expect-error - getUsers is not fully typed
|
|
98
|
+
const _authors: User[] =
|
|
99
|
+
getUsers( SITE_EDITOR_AUTHORS_QUERY ) || [];
|
|
100
|
+
const _isResolving = globalStylesId
|
|
101
|
+
? isResolving( 'getRevisions', [
|
|
102
|
+
'root',
|
|
103
|
+
'globalStyles',
|
|
104
|
+
globalStylesId,
|
|
105
|
+
_query,
|
|
106
|
+
] )
|
|
107
|
+
: false;
|
|
108
|
+
return {
|
|
109
|
+
authors: _authors,
|
|
110
|
+
currentUser: _currentUser,
|
|
111
|
+
isDirty: _isDirty,
|
|
112
|
+
revisions: globalStylesRevisions,
|
|
113
|
+
isLoadingGlobalStylesRevisions: _isResolving,
|
|
114
|
+
revisionsCount: _revisionsCount,
|
|
115
|
+
};
|
|
116
|
+
},
|
|
117
|
+
[ _query ]
|
|
118
|
+
);
|
|
119
|
+
return useMemo( (): UseGlobalStylesRevisionsReturn => {
|
|
120
|
+
if ( ! authors.length || isLoadingGlobalStylesRevisions ) {
|
|
121
|
+
return {
|
|
122
|
+
revisions: EMPTY_ARRAY as Revision[],
|
|
123
|
+
hasUnsavedChanges: isDirty,
|
|
124
|
+
isLoading: true,
|
|
125
|
+
revisionsCount,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Adds author details to each revision.
|
|
130
|
+
const _modifiedRevisions: Revision[] = revisions.map( ( revision ) => {
|
|
131
|
+
return {
|
|
132
|
+
...revision,
|
|
133
|
+
author: authors.find(
|
|
134
|
+
( author ) => author.id === revision.author
|
|
135
|
+
),
|
|
136
|
+
};
|
|
137
|
+
} );
|
|
138
|
+
|
|
139
|
+
const fetchedRevisionsCount = revisions.length;
|
|
140
|
+
|
|
141
|
+
if ( fetchedRevisionsCount ) {
|
|
142
|
+
// Flags the most current saved revision.
|
|
143
|
+
if (
|
|
144
|
+
_modifiedRevisions[ 0 ].id !== 'unsaved' &&
|
|
145
|
+
_query.page === 1
|
|
146
|
+
) {
|
|
147
|
+
_modifiedRevisions[ 0 ].isLatest = true;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Adds an item for unsaved changes.
|
|
151
|
+
if (
|
|
152
|
+
isDirty &&
|
|
153
|
+
userConfig &&
|
|
154
|
+
Object.keys( userConfig ).length > 0 &&
|
|
155
|
+
currentUser &&
|
|
156
|
+
_query.page === 1
|
|
157
|
+
) {
|
|
158
|
+
const unsavedRevision: Revision = {
|
|
159
|
+
id: 'unsaved',
|
|
160
|
+
styles: userConfig?.styles,
|
|
161
|
+
settings: userConfig?.settings,
|
|
162
|
+
_links: userConfig?._links,
|
|
163
|
+
author: {
|
|
164
|
+
name: currentUser?.name || '',
|
|
165
|
+
// @ts-expect-error - avatar_urls is not typed in User
|
|
166
|
+
avatar_urls: currentUser?.avatar_urls || {},
|
|
167
|
+
},
|
|
168
|
+
modified: new Date(),
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
_modifiedRevisions.unshift( unsavedRevision );
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
if (
|
|
175
|
+
_query.per_page &&
|
|
176
|
+
_query.page === Math.ceil( revisionsCount / _query.per_page )
|
|
177
|
+
) {
|
|
178
|
+
// Adds an item for the default theme styles.
|
|
179
|
+
_modifiedRevisions.push( {
|
|
180
|
+
id: 'parent',
|
|
181
|
+
styles: {},
|
|
182
|
+
settings: {},
|
|
183
|
+
} );
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
return {
|
|
188
|
+
revisions: _modifiedRevisions,
|
|
189
|
+
hasUnsavedChanges: isDirty,
|
|
190
|
+
isLoading: false,
|
|
191
|
+
revisionsCount,
|
|
192
|
+
};
|
|
193
|
+
}, [
|
|
194
|
+
isDirty,
|
|
195
|
+
revisions,
|
|
196
|
+
currentUser,
|
|
197
|
+
authors,
|
|
198
|
+
userConfig,
|
|
199
|
+
isLoadingGlobalStylesRevisions,
|
|
200
|
+
revisionsCount,
|
|
201
|
+
_query.page,
|
|
202
|
+
_query.per_page,
|
|
203
|
+
] );
|
|
204
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import {
|
|
5
|
+
__experimentalItemGroup as ItemGroup,
|
|
6
|
+
__experimentalHStack as HStack,
|
|
7
|
+
__experimentalSpacer as Spacer,
|
|
8
|
+
__experimentalVStack as VStack,
|
|
9
|
+
FlexItem,
|
|
10
|
+
CardBody,
|
|
11
|
+
Card,
|
|
12
|
+
CardDivider,
|
|
13
|
+
CardMedia,
|
|
14
|
+
} from '@wordpress/components';
|
|
15
|
+
import { isRTL, __ } from '@wordpress/i18n';
|
|
16
|
+
import { chevronLeft, chevronRight } from '@wordpress/icons';
|
|
17
|
+
import { useSelect } from '@wordpress/data';
|
|
18
|
+
import { store as coreStore } from '@wordpress/core-data';
|
|
19
|
+
import type { GlobalStylesConfig } from '@wordpress/global-styles-engine';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Internal dependencies
|
|
23
|
+
*/
|
|
24
|
+
import { IconWithCurrentColor } from './icon-with-current-color';
|
|
25
|
+
import { NavigationButtonAsItem } from './navigation-button';
|
|
26
|
+
import RootMenu from './root-menu';
|
|
27
|
+
import PreviewStyles from './preview-styles';
|
|
28
|
+
|
|
29
|
+
function ScreenRoot() {
|
|
30
|
+
const { hasVariations, canEditCSS } = useSelect( ( select ) => {
|
|
31
|
+
const {
|
|
32
|
+
__experimentalGetCurrentThemeGlobalStylesVariations,
|
|
33
|
+
__experimentalGetCurrentGlobalStylesId,
|
|
34
|
+
getEntityRecord,
|
|
35
|
+
} = select( coreStore );
|
|
36
|
+
|
|
37
|
+
const globalStylesId = __experimentalGetCurrentGlobalStylesId();
|
|
38
|
+
const globalStyles = globalStylesId
|
|
39
|
+
? getEntityRecord( 'root', 'globalStyles', globalStylesId )
|
|
40
|
+
: undefined;
|
|
41
|
+
|
|
42
|
+
return {
|
|
43
|
+
hasVariations:
|
|
44
|
+
!! __experimentalGetCurrentThemeGlobalStylesVariations()
|
|
45
|
+
?.length,
|
|
46
|
+
canEditCSS: !! ( globalStyles as GlobalStylesConfig )?._links?.[
|
|
47
|
+
'wp:action-edit-css'
|
|
48
|
+
],
|
|
49
|
+
};
|
|
50
|
+
}, [] );
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<Card
|
|
54
|
+
size="small"
|
|
55
|
+
isBorderless
|
|
56
|
+
className="global-styles-ui-screen-root"
|
|
57
|
+
isRounded={ false }
|
|
58
|
+
>
|
|
59
|
+
<CardBody>
|
|
60
|
+
<VStack spacing={ 4 }>
|
|
61
|
+
<Card className="global-styles-ui-screen-root__active-style-tile">
|
|
62
|
+
<CardMedia className="global-styles-ui-screen-root__active-style-tile-preview">
|
|
63
|
+
<PreviewStyles />
|
|
64
|
+
</CardMedia>
|
|
65
|
+
</Card>
|
|
66
|
+
{ hasVariations && (
|
|
67
|
+
<ItemGroup>
|
|
68
|
+
<NavigationButtonAsItem path="/variations">
|
|
69
|
+
<HStack justify="space-between">
|
|
70
|
+
<FlexItem>
|
|
71
|
+
{ __( 'Browse styles' ) }
|
|
72
|
+
</FlexItem>
|
|
73
|
+
<IconWithCurrentColor
|
|
74
|
+
icon={
|
|
75
|
+
isRTL() ? chevronLeft : chevronRight
|
|
76
|
+
}
|
|
77
|
+
/>
|
|
78
|
+
</HStack>
|
|
79
|
+
</NavigationButtonAsItem>
|
|
80
|
+
</ItemGroup>
|
|
81
|
+
) }
|
|
82
|
+
<RootMenu />
|
|
83
|
+
</VStack>
|
|
84
|
+
</CardBody>
|
|
85
|
+
|
|
86
|
+
<CardDivider />
|
|
87
|
+
|
|
88
|
+
<CardBody>
|
|
89
|
+
<Spacer
|
|
90
|
+
as="p"
|
|
91
|
+
paddingTop={ 2 }
|
|
92
|
+
paddingX="13px"
|
|
93
|
+
marginBottom={ 4 }
|
|
94
|
+
>
|
|
95
|
+
{ __(
|
|
96
|
+
'Customize the appearance of specific blocks for the whole site.'
|
|
97
|
+
) }
|
|
98
|
+
</Spacer>
|
|
99
|
+
<ItemGroup>
|
|
100
|
+
<NavigationButtonAsItem path="/blocks">
|
|
101
|
+
<HStack justify="space-between">
|
|
102
|
+
<FlexItem>{ __( 'Blocks' ) }</FlexItem>
|
|
103
|
+
<IconWithCurrentColor
|
|
104
|
+
icon={ isRTL() ? chevronLeft : chevronRight }
|
|
105
|
+
/>
|
|
106
|
+
</HStack>
|
|
107
|
+
</NavigationButtonAsItem>
|
|
108
|
+
</ItemGroup>
|
|
109
|
+
</CardBody>
|
|
110
|
+
|
|
111
|
+
{ canEditCSS && (
|
|
112
|
+
<>
|
|
113
|
+
<CardDivider />
|
|
114
|
+
<CardBody>
|
|
115
|
+
<Spacer
|
|
116
|
+
as="p"
|
|
117
|
+
paddingTop={ 2 }
|
|
118
|
+
paddingX="13px"
|
|
119
|
+
marginBottom={ 4 }
|
|
120
|
+
>
|
|
121
|
+
{ __(
|
|
122
|
+
'Add your own CSS to customize the appearance and layout of your site.'
|
|
123
|
+
) }
|
|
124
|
+
</Spacer>
|
|
125
|
+
<ItemGroup>
|
|
126
|
+
<NavigationButtonAsItem path="/css">
|
|
127
|
+
<HStack justify="space-between">
|
|
128
|
+
<FlexItem>
|
|
129
|
+
{ __( 'Additional CSS' ) }
|
|
130
|
+
</FlexItem>
|
|
131
|
+
<IconWithCurrentColor
|
|
132
|
+
icon={
|
|
133
|
+
isRTL() ? chevronLeft : chevronRight
|
|
134
|
+
}
|
|
135
|
+
/>
|
|
136
|
+
</HStack>
|
|
137
|
+
</NavigationButtonAsItem>
|
|
138
|
+
</ItemGroup>
|
|
139
|
+
</CardBody>
|
|
140
|
+
</>
|
|
141
|
+
) }
|
|
142
|
+
</Card>
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export default ScreenRoot;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import ShadowsPanel from './shadows-panel';
|
|
5
|
+
import ShadowsEditPanel from './shadows-edit-panel';
|
|
6
|
+
|
|
7
|
+
export function ScreenShadows() {
|
|
8
|
+
return <ShadowsPanel />;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function ScreenShadowsEdit() {
|
|
12
|
+
return <ShadowsEditPanel />;
|
|
13
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { Card, CardBody } from '@wordpress/components';
|
|
5
|
+
import { __ } from '@wordpress/i18n';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Internal dependencies
|
|
9
|
+
*/
|
|
10
|
+
import { ScreenHeader } from './screen-header';
|
|
11
|
+
import { StyleVariationsContent } from './style-variations-content';
|
|
12
|
+
|
|
13
|
+
function ScreenStyleVariations() {
|
|
14
|
+
return (
|
|
15
|
+
<>
|
|
16
|
+
<ScreenHeader
|
|
17
|
+
title={ __( 'Browse styles' ) }
|
|
18
|
+
description={ __(
|
|
19
|
+
'Choose a variation to change the look of the site.'
|
|
20
|
+
) }
|
|
21
|
+
/>
|
|
22
|
+
|
|
23
|
+
<Card
|
|
24
|
+
size="small"
|
|
25
|
+
isBorderless
|
|
26
|
+
className="global-styles-ui-screen-style-variations"
|
|
27
|
+
>
|
|
28
|
+
<CardBody>
|
|
29
|
+
<StyleVariationsContent />
|
|
30
|
+
</CardBody>
|
|
31
|
+
</Card>
|
|
32
|
+
</>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export default ScreenStyleVariations;
|