@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,207 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import {
|
|
5
|
+
__experimentalHStack as HStack,
|
|
6
|
+
__experimentalVStack as VStack,
|
|
7
|
+
__experimentalItemGroup as ItemGroup,
|
|
8
|
+
Button,
|
|
9
|
+
FlexItem,
|
|
10
|
+
privateApis as componentsPrivateApis,
|
|
11
|
+
} from '@wordpress/components';
|
|
12
|
+
import { __, sprintf, isRTL } from '@wordpress/i18n';
|
|
13
|
+
import {
|
|
14
|
+
plus,
|
|
15
|
+
Icon,
|
|
16
|
+
chevronLeft,
|
|
17
|
+
chevronRight,
|
|
18
|
+
moreVertical,
|
|
19
|
+
} from '@wordpress/icons';
|
|
20
|
+
import { useState } from '@wordpress/element';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Internal dependencies
|
|
24
|
+
*/
|
|
25
|
+
import { Subtitle } from './subtitle';
|
|
26
|
+
import { NavigationButtonAsItem } from './navigation-button';
|
|
27
|
+
import { ScreenHeader } from './screen-header';
|
|
28
|
+
import { getNewIndexFromPresets } from './utils';
|
|
29
|
+
import ConfirmResetShadowDialog from './confirm-reset-shadow-dialog';
|
|
30
|
+
import { useSetting } from './hooks';
|
|
31
|
+
import { unlock } from './lock-unlock';
|
|
32
|
+
|
|
33
|
+
const { Menu } = unlock( componentsPrivateApis );
|
|
34
|
+
|
|
35
|
+
export const defaultShadow = '6px 6px 9px rgba(0, 0, 0, 0.2)';
|
|
36
|
+
|
|
37
|
+
export default function ShadowsPanel() {
|
|
38
|
+
const [ defaultShadows ] = useSetting( 'shadow.presets.default' );
|
|
39
|
+
const [ defaultShadowsEnabled ] = useSetting( 'shadow.defaultPresets' );
|
|
40
|
+
const [ themeShadows ] = useSetting( 'shadow.presets.theme' );
|
|
41
|
+
const [ customShadows, setCustomShadows ] = useSetting(
|
|
42
|
+
'shadow.presets.custom'
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
const onCreateShadow = ( shadow: any ) => {
|
|
46
|
+
setCustomShadows( [ ...( customShadows || [] ), shadow ] );
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const handleResetShadows = () => {
|
|
50
|
+
setCustomShadows( [] );
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const [ isResetDialogOpen, setIsResetDialogOpen ] = useState( false );
|
|
54
|
+
|
|
55
|
+
const toggleResetDialog = () => setIsResetDialogOpen( ! isResetDialogOpen );
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<>
|
|
59
|
+
{ isResetDialogOpen && (
|
|
60
|
+
<ConfirmResetShadowDialog
|
|
61
|
+
text={ __(
|
|
62
|
+
'Are you sure you want to remove all custom shadows?'
|
|
63
|
+
) }
|
|
64
|
+
confirmButtonText={ __( 'Remove' ) }
|
|
65
|
+
isOpen={ isResetDialogOpen }
|
|
66
|
+
toggleOpen={ toggleResetDialog }
|
|
67
|
+
onConfirm={ handleResetShadows }
|
|
68
|
+
/>
|
|
69
|
+
) }
|
|
70
|
+
<ScreenHeader
|
|
71
|
+
title={ __( 'Shadows' ) }
|
|
72
|
+
description={ __(
|
|
73
|
+
'Manage and create shadow styles for use across the site.'
|
|
74
|
+
) }
|
|
75
|
+
/>
|
|
76
|
+
<div className="global-styles-ui-screen">
|
|
77
|
+
<VStack
|
|
78
|
+
className="global-styles-ui__shadows-panel"
|
|
79
|
+
spacing={ 7 }
|
|
80
|
+
>
|
|
81
|
+
{ defaultShadowsEnabled && (
|
|
82
|
+
<ShadowList
|
|
83
|
+
label={ __( 'Default' ) }
|
|
84
|
+
shadows={ defaultShadows || [] }
|
|
85
|
+
category="default"
|
|
86
|
+
/>
|
|
87
|
+
) }
|
|
88
|
+
{ themeShadows && themeShadows.length > 0 && (
|
|
89
|
+
<ShadowList
|
|
90
|
+
label={ __( 'Theme' ) }
|
|
91
|
+
shadows={ themeShadows || [] }
|
|
92
|
+
category="theme"
|
|
93
|
+
/>
|
|
94
|
+
) }
|
|
95
|
+
<ShadowList
|
|
96
|
+
label={ __( 'Custom' ) }
|
|
97
|
+
shadows={ customShadows || [] }
|
|
98
|
+
category="custom"
|
|
99
|
+
canCreate
|
|
100
|
+
onCreate={ onCreateShadow }
|
|
101
|
+
onReset={ toggleResetDialog }
|
|
102
|
+
/>
|
|
103
|
+
</VStack>
|
|
104
|
+
</div>
|
|
105
|
+
</>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
interface ShadowListProps {
|
|
110
|
+
label: string;
|
|
111
|
+
shadows: any[];
|
|
112
|
+
category: string;
|
|
113
|
+
canCreate?: boolean;
|
|
114
|
+
onCreate?: ( shadow: any ) => void;
|
|
115
|
+
onReset?: () => void;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function ShadowList( {
|
|
119
|
+
label,
|
|
120
|
+
shadows,
|
|
121
|
+
category,
|
|
122
|
+
canCreate,
|
|
123
|
+
onCreate,
|
|
124
|
+
onReset,
|
|
125
|
+
}: ShadowListProps ) {
|
|
126
|
+
const handleAddShadow = () => {
|
|
127
|
+
const newIndex = getNewIndexFromPresets( shadows, 'shadow-' );
|
|
128
|
+
onCreate?.( {
|
|
129
|
+
name: sprintf(
|
|
130
|
+
/* translators: %d: is an index for a preset */
|
|
131
|
+
__( 'Shadow %d' ),
|
|
132
|
+
newIndex
|
|
133
|
+
),
|
|
134
|
+
shadow: defaultShadow,
|
|
135
|
+
slug: `shadow-${ newIndex }`,
|
|
136
|
+
} );
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
return (
|
|
140
|
+
<VStack spacing={ 2 }>
|
|
141
|
+
<HStack justify="space-between">
|
|
142
|
+
<Subtitle level={ 3 }>{ label }</Subtitle>
|
|
143
|
+
<FlexItem className="global-styles-ui__shadows-panel__options-container">
|
|
144
|
+
{ canCreate && (
|
|
145
|
+
<Button
|
|
146
|
+
size="small"
|
|
147
|
+
icon={ plus }
|
|
148
|
+
label={ __( 'Add shadow' ) }
|
|
149
|
+
onClick={ () => {
|
|
150
|
+
handleAddShadow();
|
|
151
|
+
} }
|
|
152
|
+
/>
|
|
153
|
+
) }
|
|
154
|
+
{ !! shadows?.length && category === 'custom' && (
|
|
155
|
+
<Menu>
|
|
156
|
+
<Menu.TriggerButton
|
|
157
|
+
render={
|
|
158
|
+
<Button
|
|
159
|
+
size="small"
|
|
160
|
+
icon={ moreVertical }
|
|
161
|
+
label={ __( 'Shadow options' ) }
|
|
162
|
+
/>
|
|
163
|
+
}
|
|
164
|
+
/>
|
|
165
|
+
<Menu.Popover>
|
|
166
|
+
<Menu.Item onClick={ onReset }>
|
|
167
|
+
<Menu.ItemLabel>
|
|
168
|
+
{ __( 'Remove all custom shadows' ) }
|
|
169
|
+
</Menu.ItemLabel>
|
|
170
|
+
</Menu.Item>
|
|
171
|
+
</Menu.Popover>
|
|
172
|
+
</Menu>
|
|
173
|
+
) }
|
|
174
|
+
</FlexItem>
|
|
175
|
+
</HStack>
|
|
176
|
+
{ shadows.length > 0 && (
|
|
177
|
+
<ItemGroup isBordered isSeparated>
|
|
178
|
+
{ shadows.map( ( shadow ) => (
|
|
179
|
+
<ShadowItem
|
|
180
|
+
key={ shadow.slug }
|
|
181
|
+
shadow={ shadow }
|
|
182
|
+
category={ category }
|
|
183
|
+
/>
|
|
184
|
+
) ) }
|
|
185
|
+
</ItemGroup>
|
|
186
|
+
) }
|
|
187
|
+
</VStack>
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
interface ShadowItemProps {
|
|
192
|
+
shadow: any;
|
|
193
|
+
category: string;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
function ShadowItem( { shadow, category }: ShadowItemProps ) {
|
|
197
|
+
return (
|
|
198
|
+
<NavigationButtonAsItem
|
|
199
|
+
path={ `/shadows/edit/${ category }/${ shadow.slug }` }
|
|
200
|
+
>
|
|
201
|
+
<HStack>
|
|
202
|
+
<FlexItem>{ shadow.name }</FlexItem>
|
|
203
|
+
<Icon icon={ isRTL() ? chevronLeft : chevronRight } />
|
|
204
|
+
</HStack>
|
|
205
|
+
</NavigationButtonAsItem>
|
|
206
|
+
);
|
|
207
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import {
|
|
5
|
+
BaseControl,
|
|
6
|
+
RangeControl,
|
|
7
|
+
Flex,
|
|
8
|
+
FlexItem,
|
|
9
|
+
useBaseControlProps,
|
|
10
|
+
__experimentalUseCustomUnits as useCustomUnits,
|
|
11
|
+
__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,
|
|
12
|
+
__experimentalUnitControl as UnitControl,
|
|
13
|
+
__experimentalSpacer as Spacer,
|
|
14
|
+
} from '@wordpress/components';
|
|
15
|
+
|
|
16
|
+
const DEFAULT_UNITS = [ 'px', 'em', 'rem', 'vw', 'vh' ];
|
|
17
|
+
|
|
18
|
+
interface SizeControlProps {
|
|
19
|
+
value?: string;
|
|
20
|
+
onChange?: ( value: string | undefined ) => void;
|
|
21
|
+
fallbackValue?: number;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
label?: string;
|
|
24
|
+
__nextHasNoMarginBottom?: boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function SizeControl( {
|
|
28
|
+
// Do not allow manipulation of margin bottom
|
|
29
|
+
__nextHasNoMarginBottom,
|
|
30
|
+
...props
|
|
31
|
+
}: SizeControlProps ) {
|
|
32
|
+
const { baseControlProps } = useBaseControlProps( props );
|
|
33
|
+
const { value, onChange, fallbackValue, disabled, label } = props;
|
|
34
|
+
|
|
35
|
+
const units = useCustomUnits( {
|
|
36
|
+
availableUnits: DEFAULT_UNITS,
|
|
37
|
+
} );
|
|
38
|
+
|
|
39
|
+
const [ valueQuantity, valueUnit = 'px' ] =
|
|
40
|
+
parseQuantityAndUnitFromRawValue( value, units );
|
|
41
|
+
|
|
42
|
+
const isValueUnitRelative =
|
|
43
|
+
!! valueUnit && [ 'em', 'rem', 'vw', 'vh' ].includes( valueUnit );
|
|
44
|
+
|
|
45
|
+
// Receives the new value from the UnitControl component as a string containing the value and unit.
|
|
46
|
+
const handleUnitControlChange = ( newValue: string | undefined ) => {
|
|
47
|
+
onChange?.( newValue );
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// Receives the new value from the RangeControl component as a number.
|
|
51
|
+
const handleRangeControlChange = ( newValue: number | undefined ) => {
|
|
52
|
+
if ( newValue !== undefined ) {
|
|
53
|
+
onChange?.( newValue + valueUnit );
|
|
54
|
+
} else {
|
|
55
|
+
onChange?.( undefined );
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<BaseControl { ...baseControlProps } __nextHasNoMarginBottom>
|
|
61
|
+
<Flex>
|
|
62
|
+
<FlexItem isBlock>
|
|
63
|
+
<UnitControl
|
|
64
|
+
__next40pxDefaultSize
|
|
65
|
+
label={ label }
|
|
66
|
+
hideLabelFromVision
|
|
67
|
+
value={ value }
|
|
68
|
+
onChange={ handleUnitControlChange }
|
|
69
|
+
units={ units }
|
|
70
|
+
min={ 0 }
|
|
71
|
+
disabled={ disabled }
|
|
72
|
+
/>
|
|
73
|
+
</FlexItem>
|
|
74
|
+
<FlexItem isBlock>
|
|
75
|
+
<Spacer marginX={ 2 } marginBottom={ 0 }>
|
|
76
|
+
<RangeControl
|
|
77
|
+
__next40pxDefaultSize
|
|
78
|
+
__nextHasNoMarginBottom
|
|
79
|
+
label={ label }
|
|
80
|
+
hideLabelFromVision
|
|
81
|
+
value={ valueQuantity }
|
|
82
|
+
initialPosition={ fallbackValue }
|
|
83
|
+
withInputField={ false }
|
|
84
|
+
onChange={ handleRangeControlChange }
|
|
85
|
+
min={ 0 }
|
|
86
|
+
max={ isValueUnitRelative ? 10 : 100 }
|
|
87
|
+
step={ isValueUnitRelative ? 0.1 : 1 }
|
|
88
|
+
disabled={ disabled }
|
|
89
|
+
/>
|
|
90
|
+
</Spacer>
|
|
91
|
+
</FlexItem>
|
|
92
|
+
</Flex>
|
|
93
|
+
</BaseControl>
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export { SizeControl };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
@use "@wordpress/base-styles/variables";
|
|
2
|
+
@use "@wordpress/base-styles/colors";
|
|
3
|
+
@use "@wordpress/base-styles/mixins";
|
|
4
|
+
|
|
5
|
+
// Size control component styling
|
|
6
|
+
// The component relies primarily on WordPress component styling
|
|
7
|
+
// This file is for any custom overrides or additional styling needed
|
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { useState } from '@wordpress/element';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { GlobalStylesUI as GlobalStylesUIComponent } from '../global-styles-ui';
|
|
10
|
+
|
|
11
|
+
export default { title: 'GlobalStylesUI/GlobalStylesUI' };
|
|
12
|
+
|
|
13
|
+
const BASE_SETTINGS = {
|
|
14
|
+
settings: {
|
|
15
|
+
appearanceTools: false,
|
|
16
|
+
useRootPaddingAwareAlignments: true,
|
|
17
|
+
border: {
|
|
18
|
+
color: true,
|
|
19
|
+
radius: true,
|
|
20
|
+
style: true,
|
|
21
|
+
width: true,
|
|
22
|
+
},
|
|
23
|
+
color: {
|
|
24
|
+
background: true,
|
|
25
|
+
custom: true,
|
|
26
|
+
customDuotone: true,
|
|
27
|
+
customGradient: true,
|
|
28
|
+
defaultDuotone: true,
|
|
29
|
+
defaultGradients: true,
|
|
30
|
+
defaultPalette: true,
|
|
31
|
+
duotone: {
|
|
32
|
+
default: [
|
|
33
|
+
{
|
|
34
|
+
name: 'Dark grayscale',
|
|
35
|
+
colors: [ '#000000', '#7f7f7f' ],
|
|
36
|
+
slug: 'dark-grayscale',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'Grayscale',
|
|
40
|
+
colors: [ '#000000', '#ffffff' ],
|
|
41
|
+
slug: 'grayscale',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'Purple and yellow',
|
|
45
|
+
colors: [ '#8c00b7', '#fcff41' ],
|
|
46
|
+
slug: 'purple-yellow',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'Blue and red',
|
|
50
|
+
colors: [ '#000097', '#ff4747' ],
|
|
51
|
+
slug: 'blue-red',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'Midnight',
|
|
55
|
+
colors: [ '#000000', '#00a5ff' ],
|
|
56
|
+
slug: 'midnight',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'Magenta and yellow',
|
|
60
|
+
colors: [ '#c7005a', '#fff278' ],
|
|
61
|
+
slug: 'magenta-yellow',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'Purple and green',
|
|
65
|
+
colors: [ '#a60072', '#67ff66' ],
|
|
66
|
+
slug: 'purple-green',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: 'Blue and orange',
|
|
70
|
+
colors: [ '#1900d8', '#ffa96b' ],
|
|
71
|
+
slug: 'blue-orange',
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
gradients: {
|
|
76
|
+
default: [
|
|
77
|
+
{
|
|
78
|
+
name: 'Vivid cyan blue to vivid purple',
|
|
79
|
+
gradient:
|
|
80
|
+
'linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)',
|
|
81
|
+
slug: 'vivid-cyan-blue-to-vivid-purple',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: 'Light green cyan to vivid green cyan',
|
|
85
|
+
gradient:
|
|
86
|
+
'linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)',
|
|
87
|
+
slug: 'light-green-cyan-to-vivid-green-cyan',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'Luminous vivid amber to luminous vivid orange',
|
|
91
|
+
gradient:
|
|
92
|
+
'linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)',
|
|
93
|
+
slug: 'luminous-vivid-amber-to-luminous-vivid-orange',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: 'Luminous vivid orange to vivid red',
|
|
97
|
+
gradient:
|
|
98
|
+
'linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)',
|
|
99
|
+
slug: 'luminous-vivid-orange-to-vivid-red',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: 'Very light gray to cyan bluish gray',
|
|
103
|
+
gradient:
|
|
104
|
+
'linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)',
|
|
105
|
+
slug: 'very-light-gray-to-cyan-bluish-gray',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: 'Cool to warm spectrum',
|
|
109
|
+
gradient:
|
|
110
|
+
'linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)',
|
|
111
|
+
slug: 'cool-to-warm-spectrum',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: 'Blush light purple',
|
|
115
|
+
gradient:
|
|
116
|
+
'linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)',
|
|
117
|
+
slug: 'blush-light-purple',
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: 'Blush bordeaux',
|
|
121
|
+
gradient:
|
|
122
|
+
'linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)',
|
|
123
|
+
slug: 'blush-bordeaux',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: 'Luminous dusk',
|
|
127
|
+
gradient:
|
|
128
|
+
'linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)',
|
|
129
|
+
slug: 'luminous-dusk',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: 'Pale ocean',
|
|
133
|
+
gradient:
|
|
134
|
+
'linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)',
|
|
135
|
+
slug: 'pale-ocean',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
name: 'Electric grass',
|
|
139
|
+
gradient:
|
|
140
|
+
'linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)',
|
|
141
|
+
slug: 'electric-grass',
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: 'Midnight',
|
|
145
|
+
gradient:
|
|
146
|
+
'linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)',
|
|
147
|
+
slug: 'midnight',
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
},
|
|
151
|
+
link: true,
|
|
152
|
+
palette: {
|
|
153
|
+
default: [
|
|
154
|
+
{
|
|
155
|
+
name: 'Black',
|
|
156
|
+
slug: 'black',
|
|
157
|
+
color: '#000000',
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: 'Cyan bluish gray',
|
|
161
|
+
slug: 'cyan-bluish-gray',
|
|
162
|
+
color: '#abb8c3',
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
name: 'White',
|
|
166
|
+
slug: 'white',
|
|
167
|
+
color: '#ffffff',
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: 'Pale pink',
|
|
171
|
+
slug: 'pale-pink',
|
|
172
|
+
color: '#f78da7',
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: 'Vivid red',
|
|
176
|
+
slug: 'vivid-red',
|
|
177
|
+
color: '#cf2e2e',
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: 'Luminous vivid orange',
|
|
181
|
+
slug: 'luminous-vivid-orange',
|
|
182
|
+
color: '#ff6900',
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: 'Luminous vivid amber',
|
|
186
|
+
slug: 'luminous-vivid-amber',
|
|
187
|
+
color: '#fcb900',
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
name: 'Light green cyan',
|
|
191
|
+
slug: 'light-green-cyan',
|
|
192
|
+
color: '#7bdcb5',
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
name: 'Vivid green cyan',
|
|
196
|
+
slug: 'vivid-green-cyan',
|
|
197
|
+
color: '#00d084',
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
name: 'Pale cyan blue',
|
|
201
|
+
slug: 'pale-cyan-blue',
|
|
202
|
+
color: '#8ed1fc',
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: 'Vivid cyan blue',
|
|
206
|
+
slug: 'vivid-cyan-blue',
|
|
207
|
+
color: '#0693e3',
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
name: 'Vivid purple',
|
|
211
|
+
slug: 'vivid-purple',
|
|
212
|
+
color: '#9b51e0',
|
|
213
|
+
},
|
|
214
|
+
],
|
|
215
|
+
theme: [
|
|
216
|
+
{
|
|
217
|
+
color: '#ffffff',
|
|
218
|
+
name: 'Base',
|
|
219
|
+
slug: 'base',
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
color: '#000000',
|
|
223
|
+
name: 'Contrast',
|
|
224
|
+
slug: 'contrast',
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
color: '#9DFF20',
|
|
228
|
+
name: 'Primary',
|
|
229
|
+
slug: 'primary',
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
color: '#345C00',
|
|
233
|
+
name: 'Secondary',
|
|
234
|
+
slug: 'secondary',
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
color: '#F6F6F6',
|
|
238
|
+
name: 'Tertiary',
|
|
239
|
+
slug: 'tertiary',
|
|
240
|
+
},
|
|
241
|
+
],
|
|
242
|
+
},
|
|
243
|
+
text: true,
|
|
244
|
+
},
|
|
245
|
+
shadow: {
|
|
246
|
+
defaultPresets: true,
|
|
247
|
+
presets: {
|
|
248
|
+
default: [
|
|
249
|
+
{
|
|
250
|
+
name: 'Natural',
|
|
251
|
+
slug: 'natural',
|
|
252
|
+
shadow: '6px 6px 9px rgba(0, 0, 0, 0.2)',
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
name: 'Deep',
|
|
256
|
+
slug: 'deep',
|
|
257
|
+
shadow: '12px 12px 50px rgba(0, 0, 0, 0.4)',
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
name: 'Sharp',
|
|
261
|
+
slug: 'sharp',
|
|
262
|
+
shadow: '6px 6px 0px rgba(0, 0, 0, 0.2)',
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
name: 'Outlined',
|
|
266
|
+
slug: 'outlined',
|
|
267
|
+
shadow: '6px 6px 0px -3px rgba(255, 255, 255, 1), 6px 6px rgba(0, 0, 0, 1)',
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
name: 'Crisp',
|
|
271
|
+
slug: 'crisp',
|
|
272
|
+
shadow: '6px 6px 0px rgba(0, 0, 0, 1)',
|
|
273
|
+
},
|
|
274
|
+
],
|
|
275
|
+
},
|
|
276
|
+
},
|
|
277
|
+
layout: {
|
|
278
|
+
contentSize: '650px',
|
|
279
|
+
wideSize: '1200px',
|
|
280
|
+
},
|
|
281
|
+
spacing: {
|
|
282
|
+
blockGap: true,
|
|
283
|
+
margin: true,
|
|
284
|
+
padding: true,
|
|
285
|
+
customSpacingSize: true,
|
|
286
|
+
units: [ '%', 'px', 'em', 'rem', 'vh', 'vw' ],
|
|
287
|
+
spacingScale: {
|
|
288
|
+
operator: '*',
|
|
289
|
+
increment: 1.5,
|
|
290
|
+
steps: 0,
|
|
291
|
+
mediumStep: 1.5,
|
|
292
|
+
unit: 'rem',
|
|
293
|
+
},
|
|
294
|
+
spacingSizes: {
|
|
295
|
+
theme: [
|
|
296
|
+
{
|
|
297
|
+
size: 'clamp(1.5rem, 5vw, 2rem)',
|
|
298
|
+
slug: '30',
|
|
299
|
+
name: '1',
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
size: 'clamp(1.8rem, 1.8rem + ((1vw - 0.48rem) * 2.885), 3rem)',
|
|
303
|
+
slug: '40',
|
|
304
|
+
name: '2',
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
size: 'clamp(2.5rem, 8vw, 4.5rem)',
|
|
308
|
+
slug: '50',
|
|
309
|
+
name: '3',
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
size: 'clamp(3.75rem, 10vw, 7rem)',
|
|
313
|
+
slug: '60',
|
|
314
|
+
name: '4',
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
size: 'clamp(5rem, 5.25rem + ((1vw - 0.48rem) * 9.096), 8rem)',
|
|
318
|
+
slug: '70',
|
|
319
|
+
name: '5',
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
size: 'clamp(7rem, 14vw, 11rem)',
|
|
323
|
+
slug: '80',
|
|
324
|
+
name: '6',
|
|
325
|
+
},
|
|
326
|
+
],
|
|
327
|
+
},
|
|
328
|
+
},
|
|
329
|
+
typography: {
|
|
330
|
+
customFontSize: true,
|
|
331
|
+
dropCap: false,
|
|
332
|
+
fontSizes: {
|
|
333
|
+
default: [
|
|
334
|
+
{
|
|
335
|
+
name: 'Small',
|
|
336
|
+
slug: 'small',
|
|
337
|
+
size: '13px',
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
name: 'Medium',
|
|
341
|
+
slug: 'medium',
|
|
342
|
+
size: '20px',
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
name: 'Large',
|
|
346
|
+
slug: 'large',
|
|
347
|
+
size: '36px',
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
name: 'Extra Large',
|
|
351
|
+
slug: 'x-large',
|
|
352
|
+
size: '42px',
|
|
353
|
+
},
|
|
354
|
+
],
|
|
355
|
+
},
|
|
356
|
+
fontStyle: true,
|
|
357
|
+
fontWeight: true,
|
|
358
|
+
letterSpacing: true,
|
|
359
|
+
lineHeight: true,
|
|
360
|
+
textColumns: false,
|
|
361
|
+
textDecoration: true,
|
|
362
|
+
textTransform: true,
|
|
363
|
+
writingMode: false,
|
|
364
|
+
fluid: true,
|
|
365
|
+
fontFamilies: {
|
|
366
|
+
theme: [
|
|
367
|
+
{
|
|
368
|
+
fontFamily:
|
|
369
|
+
'-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif',
|
|
370
|
+
name: 'System Font',
|
|
371
|
+
slug: 'system-font',
|
|
372
|
+
},
|
|
373
|
+
],
|
|
374
|
+
},
|
|
375
|
+
},
|
|
376
|
+
dimensions: {
|
|
377
|
+
minHeight: true,
|
|
378
|
+
},
|
|
379
|
+
position: {
|
|
380
|
+
fixed: true,
|
|
381
|
+
sticky: true,
|
|
382
|
+
},
|
|
383
|
+
},
|
|
384
|
+
styles: {
|
|
385
|
+
blocks: {},
|
|
386
|
+
elements: {},
|
|
387
|
+
},
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
export const GlobalStylesUI = () => {
|
|
391
|
+
const [ userGlobalStyles, setUserStyles ] = useState( {
|
|
392
|
+
settings: {},
|
|
393
|
+
styles: {},
|
|
394
|
+
} );
|
|
395
|
+
const wrapperStyle = {
|
|
396
|
+
width: 280,
|
|
397
|
+
};
|
|
398
|
+
return (
|
|
399
|
+
<div style={ wrapperStyle }>
|
|
400
|
+
<GlobalStylesUIComponent
|
|
401
|
+
value={ userGlobalStyles }
|
|
402
|
+
baseValue={ BASE_SETTINGS }
|
|
403
|
+
onChange={ setUserStyles }
|
|
404
|
+
fontLibraryEnabled
|
|
405
|
+
serverCSS={ [] }
|
|
406
|
+
serverSettings={ {} }
|
|
407
|
+
/>
|
|
408
|
+
</div>
|
|
409
|
+
);
|
|
410
|
+
};
|