corvée(dépendances) ajoute Carbon Fields

This commit is contained in:
gcch 2024-08-09 18:45:01 +02:00
commit 62368587e5
459 changed files with 72750 additions and 26 deletions

View file

@ -0,0 +1,21 @@
/**
* External dependencies.
*/
import { addFilter } from '@wordpress/hooks';
import { __ } from '@wordpress/i18n';
/**
* Internal dependencies.
*/
import './style.scss';
addFilter( 'carbon-fields.media_gallery.block', 'carbon-fields/blocks', ( OriginalMediaGalleryField ) => ( props ) => {
return (
<OriginalMediaGalleryField
buttonLabel={ __( 'Select Attachments', 'carbon-fields-ui' ) }
mediaLibraryButtonLabel={ __( 'Use Attachments', 'carbon-fields-ui' ) }
mediaLibraryTitle={ __( 'Select Attachments', 'carbon-fields-ui' ) }
{ ...props }
/>
);
} );

View file

@ -0,0 +1,69 @@
/* ==========================================================================
Media Gallery
========================================================================== */
.cf-media-gallery__item {
.block-editor & {
@media (min-width: 1440px) {
flex-basis: 16.6667%;
}
@media (min-width: 1680px) {
flex-basis: 16.6667%;
}
}
.edit-post-sidebar & {
flex-basis: 50%;
}
}
.cf-media-gallery__inner {
.wp-block & {
border: 1px solid $wp-color-gray-light-500;
}
.edit-post-sidebar & {
border: 1px solid $gb-dark-gray-150;
}
}
.cf-media-gallery__actions {
.wp-block & {
border-top: 1px solid $wp-color-gray-light-500;
}
.edit-post-sidebar & {
border-top: 1px solid $gb-dark-gray-150;
}
}
.cf-media-gallery__item-inner {
.wp-block & {
border: 1px solid $wp-color-gray-light-500;
}
.edit-post-sidebar & {
border: 1px solid $gb-dark-gray-150;
}
}
.cf-media-gallery__item-preview {
.block-editor & {
background-color: $wp-color-gray-light-200;
}
}
.cf-media-gallery__item-name {
.block-editor & {
background-color: $wp-color-gray-light-200;
}
.wp-block & {
border-top: 1px solid $wp-color-gray-light-500;
}
.edit-post-sidebar & {
border-top: 1px solid $gb-dark-gray-150;
}
}