@eightshift/frontend-libs-tailwind 1.5.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitattributes +8 -30
- package/.github/workflows/ci.yml +2 -1
- package/CHANGELOG.md +29 -1
- package/bun.lock +1009 -0
- package/package.json +16 -26
- package/schemas/globalManifest.json +5 -0
- package/scripts/components/picker-placeholder.js +1 -1
- package/scripts/editor/colors.js +2 -2
- package/scripts/editor/options.js +1 -1
- package/scripts/editor/registration.js +4 -7
- package/scripts/editor/store.js +19 -0
- package/scripts/helpers/cookies.js +24 -16
- package/scripts/plugins/yoast-seo.js +71 -45
- package/webpack/base.mjs +0 -5
- package/webpack/helpers.mjs +1 -5
- package/webpack/index.mjs +0 -1
- package/webpack/project.mjs +0 -5
- package/blocks/init/assets/application-admin.js +0 -10
- package/blocks/init/assets/application.js +0 -13
- package/blocks/init/assets/fonts/fraunces-italic-latin-extended.woff2 +0 -0
- package/blocks/init/assets/fonts/fraunces-italic-latin.woff2 +0 -0
- package/blocks/init/assets/fonts/fraunces-latin-extended.woff2 +0 -0
- package/blocks/init/assets/fonts/fraunces-latin.woff2 +0 -0
- package/blocks/init/assets/fonts/noto-sans-italic-latin-extended.woff2 +0 -0
- package/blocks/init/assets/fonts/noto-sans-italic-latin.woff2 +0 -0
- package/blocks/init/assets/fonts/noto-sans-latin-extended.woff2 +0 -0
- package/blocks/init/assets/fonts/noto-sans-latin.woff2 +0 -0
- package/blocks/init/assets/images/index.js +0 -5
- package/blocks/init/assets/scripts/application-admin.js +0 -7
- package/blocks/init/assets/scripts/application.js +0 -3
- package/blocks/init/assets/scripts/theme-colors.js +0 -39
- package/blocks/init/assets/styles/application-admin.css +0 -6
- package/blocks/init/assets/styles/application.css +0 -3
- package/blocks/init/src/Blocks/assets/application-blocks-editor.js +0 -14
- package/blocks/init/src/Blocks/assets/application-blocks-frontend.js +0 -13
- package/blocks/init/src/Blocks/assets/application-blocks.js +0 -9
- package/blocks/init/src/Blocks/assets/scripts/application-blocks-editor.js +0 -65
- package/blocks/init/src/Blocks/assets/scripts/application-blocks-frontend.js +0 -24
- package/blocks/init/src/Blocks/assets/scripts/link-section-editor.js +0 -262
- package/blocks/init/src/Blocks/assets/scripts/shared.js +0 -25
- package/blocks/init/src/Blocks/assets/styles/application-blocks-editor.css +0 -15
- package/blocks/init/src/Blocks/assets/styles/application-blocks-frontend.css +0 -9
- package/blocks/init/src/Blocks/assets/styles/application-blocks.css +0 -1
- package/blocks/init/src/Blocks/assets/styles/editor/editor-overrides.css +0 -15
- package/blocks/init/src/Blocks/assets/styles/fonts.css +0 -90
- package/blocks/init/src/Blocks/assets/styles/tailwind.css +0 -30
- package/blocks/init/src/Blocks/components/admin-theme-options/admin-theme-options.php +0 -20
- package/blocks/init/src/Blocks/components/admin-theme-options/assets-admin/index.js +0 -36
- package/blocks/init/src/Blocks/components/admin-theme-options/assets-admin/pages/parts.js +0 -56
- package/blocks/init/src/Blocks/components/admin-theme-options/manifest.json +0 -5
- package/blocks/init/src/Blocks/components/button/assets/index.js +0 -22
- package/blocks/init/src/Blocks/components/button/button.php +0 -88
- package/blocks/init/src/Blocks/components/button/components/button-editor.js +0 -36
- package/blocks/init/src/Blocks/components/button/components/button-options.js +0 -134
- package/blocks/init/src/Blocks/components/button/manifest.json +0 -302
- package/blocks/init/src/Blocks/components/card/card.php +0 -42
- package/blocks/init/src/Blocks/components/card/components/card-editor.js +0 -43
- package/blocks/init/src/Blocks/components/card/components/card-options.js +0 -55
- package/blocks/init/src/Blocks/components/card/manifest.json +0 -111
- package/blocks/init/src/Blocks/components/head/head.php +0 -52
- package/blocks/init/src/Blocks/components/head/manifest.json +0 -17
- package/blocks/init/src/Blocks/components/heading/components/heading-editor.js +0 -26
- package/blocks/init/src/Blocks/components/heading/components/heading-options.js +0 -62
- package/blocks/init/src/Blocks/components/heading/heading.php +0 -45
- package/blocks/init/src/Blocks/components/heading/manifest.json +0 -76
- package/blocks/init/src/Blocks/components/hero/components/hero-editor.js +0 -42
- package/blocks/init/src/Blocks/components/hero/components/hero-options.js +0 -100
- package/blocks/init/src/Blocks/components/hero/hero.php +0 -45
- package/blocks/init/src/Blocks/components/hero/manifest.json +0 -96
- package/blocks/init/src/Blocks/components/icon/components/icon-editor.js +0 -23
- package/blocks/init/src/Blocks/components/icon/components/icon-options.js +0 -65
- package/blocks/init/src/Blocks/components/icon/icon.php +0 -53
- package/blocks/init/src/Blocks/components/icon/manifest.json +0 -1238
- package/blocks/init/src/Blocks/components/image/components/image-editor.js +0 -64
- package/blocks/init/src/Blocks/components/image/components/image-options.js +0 -111
- package/blocks/init/src/Blocks/components/image/image.php +0 -68
- package/blocks/init/src/Blocks/components/image/manifest.json +0 -125
- package/blocks/init/src/Blocks/components/list/components/list-editor.js +0 -30
- package/blocks/init/src/Blocks/components/list/components/list-options.js +0 -62
- package/blocks/init/src/Blocks/components/list/list.php +0 -32
- package/blocks/init/src/Blocks/components/list/manifest.json +0 -127
- package/blocks/init/src/Blocks/components/load-more/assets/index.js +0 -19
- package/blocks/init/src/Blocks/components/load-more/assets/load-more.js +0 -146
- package/blocks/init/src/Blocks/components/load-more/components/load-more-editor.js +0 -14
- package/blocks/init/src/Blocks/components/load-more/components/load-more-options.js +0 -19
- package/blocks/init/src/Blocks/components/load-more/load-more.php +0 -47
- package/blocks/init/src/Blocks/components/load-more/manifest.json +0 -39
- package/blocks/init/src/Blocks/components/modal/assets/index.js +0 -27
- package/blocks/init/src/Blocks/components/modal/manifest.json +0 -48
- package/blocks/init/src/Blocks/components/modal/modal.php +0 -46
- package/blocks/init/src/Blocks/components/paragraph/components/paragraph-editor.js +0 -38
- package/blocks/init/src/Blocks/components/paragraph/components/paragraph-options.js +0 -48
- package/blocks/init/src/Blocks/components/paragraph/manifest.json +0 -81
- package/blocks/init/src/Blocks/components/paragraph/paragraph.php +0 -33
- package/blocks/init/src/Blocks/components/post-header/manifest.json +0 -5
- package/blocks/init/src/Blocks/components/post-header/post-header.php +0 -24
- package/blocks/init/src/Blocks/components/quote/components/quote-editor.js +0 -53
- package/blocks/init/src/Blocks/components/quote/components/quote-options.js +0 -29
- package/blocks/init/src/Blocks/components/quote/manifest.json +0 -47
- package/blocks/init/src/Blocks/components/quote/quote.php +0 -49
- package/blocks/init/src/Blocks/components/share/assets/index.js +0 -39
- package/blocks/init/src/Blocks/components/share/components/share-editor.js +0 -28
- package/blocks/init/src/Blocks/components/share/components/share-options.js +0 -112
- package/blocks/init/src/Blocks/components/share/manifest.json +0 -72
- package/blocks/init/src/Blocks/components/share/share.php +0 -69
- package/blocks/init/src/Blocks/components/tracking-before-body-end/manifest.json +0 -5
- package/blocks/init/src/Blocks/components/tracking-before-body-end/tracking-before-body-end.php +0 -9
- package/blocks/init/src/Blocks/components/tracking-head/manifest.json +0 -5
- package/blocks/init/src/Blocks/components/tracking-head/tracking-head.php +0 -9
- package/blocks/init/src/Blocks/components/video/components/video-editor.js +0 -74
- package/blocks/init/src/Blocks/components/video/components/video-options.js +0 -279
- package/blocks/init/src/Blocks/components/video/manifest.json +0 -120
- package/blocks/init/src/Blocks/components/video/video.php +0 -70
- package/blocks/init/src/Blocks/custom/accordion/accordion-block.js +0 -15
- package/blocks/init/src/Blocks/custom/accordion/accordion.php +0 -28
- package/blocks/init/src/Blocks/custom/accordion/assets/index.js +0 -37
- package/blocks/init/src/Blocks/custom/accordion/components/accordion-editor.js +0 -22
- package/blocks/init/src/Blocks/custom/accordion/components/accordion-options.js +0 -18
- package/blocks/init/src/Blocks/custom/accordion/manifest.json +0 -32
- package/blocks/init/src/Blocks/custom/accordion-item/accordion-item-block.js +0 -19
- package/blocks/init/src/Blocks/custom/accordion-item/accordion-item.php +0 -46
- package/blocks/init/src/Blocks/custom/accordion-item/components/accordion-item-editor.js +0 -60
- package/blocks/init/src/Blocks/custom/accordion-item/manifest.json +0 -69
- package/blocks/init/src/Blocks/custom/button/button-block.js +0 -13
- package/blocks/init/src/Blocks/custom/button/button.php +0 -11
- package/blocks/init/src/Blocks/custom/button/components/button-editor.js +0 -12
- package/blocks/init/src/Blocks/custom/button/components/button-options.js +0 -12
- package/blocks/init/src/Blocks/custom/button/manifest.json +0 -18
- package/blocks/init/src/Blocks/custom/card/card-block.js +0 -13
- package/blocks/init/src/Blocks/custom/card/card.php +0 -11
- package/blocks/init/src/Blocks/custom/card/components/card-editor.js +0 -12
- package/blocks/init/src/Blocks/custom/card/components/card-options.js +0 -15
- package/blocks/init/src/Blocks/custom/card/manifest.json +0 -18
- package/blocks/init/src/Blocks/custom/carousel/assets/index.js +0 -46
- package/blocks/init/src/Blocks/custom/carousel/assets/navigation.js +0 -31
- package/blocks/init/src/Blocks/custom/carousel/assets/pagination.js +0 -40
- package/blocks/init/src/Blocks/custom/carousel/carousel-block.js +0 -21
- package/blocks/init/src/Blocks/custom/carousel/carousel.php +0 -61
- package/blocks/init/src/Blocks/custom/carousel/components/carousel-editor.js +0 -25
- package/blocks/init/src/Blocks/custom/carousel/components/carousel-options.js +0 -47
- package/blocks/init/src/Blocks/custom/carousel/manifest.json +0 -130
- package/blocks/init/src/Blocks/custom/column/column-block.js +0 -21
- package/blocks/init/src/Blocks/custom/column/column-hooks.js +0 -32
- package/blocks/init/src/Blocks/custom/column/column.php +0 -21
- package/blocks/init/src/Blocks/custom/column/components/column-editor.js +0 -22
- package/blocks/init/src/Blocks/custom/column/components/column-options.js +0 -580
- package/blocks/init/src/Blocks/custom/column/manifest.json +0 -625
- package/blocks/init/src/Blocks/custom/columns/columns-block.js +0 -20
- package/blocks/init/src/Blocks/custom/columns/columns.php +0 -21
- package/blocks/init/src/Blocks/custom/columns/components/columns-editor.js +0 -81
- package/blocks/init/src/Blocks/custom/columns/components/columns-options.js +0 -104
- package/blocks/init/src/Blocks/custom/columns/manifest.json +0 -581
- package/blocks/init/src/Blocks/custom/featured-content/components/featured-content-editor.js +0 -28
- package/blocks/init/src/Blocks/custom/featured-content/components/featured-content-options.js +0 -248
- package/blocks/init/src/Blocks/custom/featured-content/featured-content-block.js +0 -13
- package/blocks/init/src/Blocks/custom/featured-content/featured-content.php +0 -139
- package/blocks/init/src/Blocks/custom/featured-content/manifest.json +0 -131
- package/blocks/init/src/Blocks/custom/featured-content/partials/cards.php +0 -39
- package/blocks/init/src/Blocks/custom/group/components/group-editor.js +0 -6
- package/blocks/init/src/Blocks/custom/group/group-block.js +0 -14
- package/blocks/init/src/Blocks/custom/group/group.php +0 -10
- package/blocks/init/src/Blocks/custom/group/manifest.json +0 -32
- package/blocks/init/src/Blocks/custom/heading/components/heading-editor.js +0 -15
- package/blocks/init/src/Blocks/custom/heading/components/heading-options.js +0 -38
- package/blocks/init/src/Blocks/custom/heading/heading-block.js +0 -13
- package/blocks/init/src/Blocks/custom/heading/heading-transforms.js +0 -26
- package/blocks/init/src/Blocks/custom/heading/heading.php +0 -15
- package/blocks/init/src/Blocks/custom/heading/manifest.json +0 -79
- package/blocks/init/src/Blocks/custom/hero/components/hero-editor.js +0 -12
- package/blocks/init/src/Blocks/custom/hero/components/hero-options.js +0 -14
- package/blocks/init/src/Blocks/custom/hero/hero-block.js +0 -13
- package/blocks/init/src/Blocks/custom/hero/hero.php +0 -11
- package/blocks/init/src/Blocks/custom/hero/manifest.json +0 -17
- package/blocks/init/src/Blocks/custom/image/components/image-editor.js +0 -12
- package/blocks/init/src/Blocks/custom/image/components/image-options.js +0 -14
- package/blocks/init/src/Blocks/custom/image/image-block.js +0 -13
- package/blocks/init/src/Blocks/custom/image/image.php +0 -11
- package/blocks/init/src/Blocks/custom/image/manifest.json +0 -33
- package/blocks/init/src/Blocks/custom/list/components/list-editor.js +0 -14
- package/blocks/init/src/Blocks/custom/list/components/list-options.js +0 -39
- package/blocks/init/src/Blocks/custom/list/list-block.js +0 -13
- package/blocks/init/src/Blocks/custom/list/list.php +0 -15
- package/blocks/init/src/Blocks/custom/list/manifest.json +0 -58
- package/blocks/init/src/Blocks/custom/map/assets/index.js +0 -20
- package/blocks/init/src/Blocks/custom/map/assets/map-controller.js +0 -41
- package/blocks/init/src/Blocks/custom/map/assets/utils.js +0 -161
- package/blocks/init/src/Blocks/custom/map/components/map-components.js +0 -403
- package/blocks/init/src/Blocks/custom/map/components/map-editor.js +0 -56
- package/blocks/init/src/Blocks/custom/map/components/map-options.js +0 -550
- package/blocks/init/src/Blocks/custom/map/manifest.json +0 -79
- package/blocks/init/src/Blocks/custom/map/map-block.js +0 -13
- package/blocks/init/src/Blocks/custom/map/map.php +0 -52
- package/blocks/init/src/Blocks/custom/map/styles.css +0 -2
- package/blocks/init/src/Blocks/custom/modal/components/modal-editor.js +0 -90
- package/blocks/init/src/Blocks/custom/modal/manifest.json +0 -51
- package/blocks/init/src/Blocks/custom/modal/modal-block.js +0 -14
- package/blocks/init/src/Blocks/custom/modal/modal.php +0 -20
- package/blocks/init/src/Blocks/custom/paragraph/components/paragraph-editor.js +0 -17
- package/blocks/init/src/Blocks/custom/paragraph/components/paragraph-options.js +0 -38
- package/blocks/init/src/Blocks/custom/paragraph/manifest.json +0 -82
- package/blocks/init/src/Blocks/custom/paragraph/paragraph-block.js +0 -13
- package/blocks/init/src/Blocks/custom/paragraph/paragraph-transforms.js +0 -46
- package/blocks/init/src/Blocks/custom/paragraph/paragraph.php +0 -15
- package/blocks/init/src/Blocks/custom/quote/components/quote-editor.js +0 -12
- package/blocks/init/src/Blocks/custom/quote/components/quote-options.js +0 -14
- package/blocks/init/src/Blocks/custom/quote/manifest.json +0 -17
- package/blocks/init/src/Blocks/custom/quote/quote-block.js +0 -13
- package/blocks/init/src/Blocks/custom/quote/quote.php +0 -13
- package/blocks/init/src/Blocks/custom/share/components/share-editor.js +0 -6
- package/blocks/init/src/Blocks/custom/share/components/share-options.js +0 -12
- package/blocks/init/src/Blocks/custom/share/manifest.json +0 -19
- package/blocks/init/src/Blocks/custom/share/share-block.js +0 -13
- package/blocks/init/src/Blocks/custom/share/share.php +0 -11
- package/blocks/init/src/Blocks/custom/site-footer/components/site-footer-editor.js +0 -57
- package/blocks/init/src/Blocks/custom/site-footer/components/site-footer-options.js +0 -106
- package/blocks/init/src/Blocks/custom/site-footer/manifest.json +0 -73
- package/blocks/init/src/Blocks/custom/site-footer/site-footer-block.js +0 -13
- package/blocks/init/src/Blocks/custom/site-footer/site-footer.php +0 -74
- package/blocks/init/src/Blocks/custom/site-navigation/assets/index.js +0 -9
- package/blocks/init/src/Blocks/custom/site-navigation/components/site-navigation-editor.js +0 -42
- package/blocks/init/src/Blocks/custom/site-navigation/components/site-navigation-options.js +0 -73
- package/blocks/init/src/Blocks/custom/site-navigation/manifest.json +0 -77
- package/blocks/init/src/Blocks/custom/site-navigation/site-navigation-block.js +0 -13
- package/blocks/init/src/Blocks/custom/site-navigation/site-navigation.php +0 -99
- package/blocks/init/src/Blocks/custom/table-of-contents/assets/index.js +0 -58
- package/blocks/init/src/Blocks/custom/table-of-contents/components/table-of-contents-editor.js +0 -38
- package/blocks/init/src/Blocks/custom/table-of-contents/components/table-of-contents-options.js +0 -32
- package/blocks/init/src/Blocks/custom/table-of-contents/manifest.json +0 -48
- package/blocks/init/src/Blocks/custom/table-of-contents/table-of-contents-block.js +0 -13
- package/blocks/init/src/Blocks/custom/table-of-contents/table-of-contents.php +0 -31
- package/blocks/init/src/Blocks/custom/video/components/video-editor.js +0 -6
- package/blocks/init/src/Blocks/custom/video/components/video-options.js +0 -12
- package/blocks/init/src/Blocks/custom/video/manifest.json +0 -29
- package/blocks/init/src/Blocks/custom/video/video-block.js +0 -13
- package/blocks/init/src/Blocks/custom/video/video.php +0 -22
- package/blocks/init/src/Blocks/manifest.json +0 -32
- package/blocks/init/src/Blocks/variations/card-simple/manifest.json +0 -17
- package/blocks/init/src/Blocks/wrapper/components/wrapper-editor.js +0 -12
- package/blocks/init/src/Blocks/wrapper/components/wrapper-options.js +0 -364
- package/blocks/init/src/Blocks/wrapper/manifest.json +0 -459
- package/blocks/init/src/Blocks/wrapper/styles-editor.css +0 -13
- package/blocks/init/src/Blocks/wrapper/styles.css +0 -19
- package/blocks/init/src/Blocks/wrapper/wrapper.js +0 -27
- package/blocks/init/src/Blocks/wrapper/wrapper.php +0 -34
- package/bun.lockb +0 -0
- package/readme/packages.md +0 -74
package/blocks/init/src/Blocks/custom/table-of-contents/components/table-of-contents-editor.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { __, sprintf } from '@wordpress/i18n';
|
|
2
|
-
import { RichText } from '@wordpress/block-editor';
|
|
3
|
-
import { checkAttr, tailwindClasses } from '@eightshift/frontend-libs-tailwind/scripts';
|
|
4
|
-
import { clsx } from '@eightshift/ui-components/utilities';
|
|
5
|
-
import manifest from '../manifest.json';
|
|
6
|
-
|
|
7
|
-
export const TableOfContentsEditor = ({ attributes, setAttributes }) => {
|
|
8
|
-
const tableOfContentsDescription = checkAttr('tableOfContentsDescription', attributes, manifest);
|
|
9
|
-
const tableOfContentsHeadingLevels = checkAttr('tableOfContentsHeadingLevels', attributes, manifest);
|
|
10
|
-
|
|
11
|
-
return (
|
|
12
|
-
<div className={tailwindClasses('container', attributes, manifest)}>
|
|
13
|
-
<RichText
|
|
14
|
-
placeholder={manifest.attributes.tableOfContentsDescription.default}
|
|
15
|
-
value={tableOfContentsDescription}
|
|
16
|
-
onChange={(value) => setAttributes({ [getAttrKey('tableOfContentsDescription', attributes, manifest)]: value })}
|
|
17
|
-
allowedFormats={[]}
|
|
18
|
-
className={tailwindClasses('description', attributes, manifest)}
|
|
19
|
-
/>
|
|
20
|
-
|
|
21
|
-
{Object.entries(tableOfContentsHeadingLevels).map(([tag, enabled = false]) => (
|
|
22
|
-
<DemoTocItem
|
|
23
|
-
level={parseInt(tag.replace('h', ''))}
|
|
24
|
-
disabled={!enabled}
|
|
25
|
-
/>
|
|
26
|
-
))}
|
|
27
|
-
</div>
|
|
28
|
-
);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const DemoTocItem = ({ level, disabled }) => (
|
|
32
|
-
<div class={clsx('group block select-none py-0.5 focus:outline-none', disabled && 'pointer-events-none opacity-25')}>
|
|
33
|
-
{level > 1 && <span class='mr-1.5 tracking-tighter text-gray-300'>{'–'.repeat(level - 1)}</span>}
|
|
34
|
-
<span class='group-focus-visible:text-navy-50px-0.5 group-hover:bg-navy-100 group-hover:text-navy-950 group-hover:ring-navy-100 group-focus-visible:bg-navy-950 group-focus-visible:ring-navy-950 rounded text-sm transition group-hover:ring-4 group-focus-visible:ring-4'>
|
|
35
|
-
{sprintf(__('Heading %d', '%g_textdomain%'), level)}
|
|
36
|
-
</span>
|
|
37
|
-
</div>
|
|
38
|
-
);
|
package/blocks/init/src/Blocks/custom/table-of-contents/components/table-of-contents-options.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { __ } from '@wordpress/i18n';
|
|
2
|
-
import { checkAttr, getAttrKey } from '@eightshift/frontend-libs-tailwind/scripts';
|
|
3
|
-
import { BaseControl, Checkbox } from '@eightshift/ui-components';
|
|
4
|
-
import { icons } from '@eightshift/ui-components/icons';
|
|
5
|
-
import manifest from '../manifest.json';
|
|
6
|
-
|
|
7
|
-
export const TableOfContentsOptions = ({ attributes, setAttributes }) => {
|
|
8
|
-
const tableOfContentsHeadingLevels = checkAttr('tableOfContentsHeadingLevels', attributes, manifest);
|
|
9
|
-
|
|
10
|
-
return (
|
|
11
|
-
<BaseControl
|
|
12
|
-
icon={icons.headingLevelAlt}
|
|
13
|
-
label={__('Include', '%g_textdomain%')}
|
|
14
|
-
>
|
|
15
|
-
{Object.keys(tableOfContentsHeadingLevels).map((level, i, arr) => {
|
|
16
|
-
return (
|
|
17
|
-
<Checkbox
|
|
18
|
-
key={i}
|
|
19
|
-
checked={tableOfContentsHeadingLevels[level]}
|
|
20
|
-
label={level.replace('h', __('Heading', '%g_textdomain%') + ' ')}
|
|
21
|
-
onChange={(value) => {
|
|
22
|
-
const newValue = { ...tableOfContentsHeadingLevels };
|
|
23
|
-
newValue[level] = value;
|
|
24
|
-
|
|
25
|
-
setAttributes({ [getAttrKey('tableOfContentsHeadingLevels', attributes, manifest)]: newValue });
|
|
26
|
-
}}
|
|
27
|
-
/>
|
|
28
|
-
);
|
|
29
|
-
})}
|
|
30
|
-
</BaseControl>
|
|
31
|
-
);
|
|
32
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://raw.githubusercontent.com/infinum/eightshift-frontend-libs-tailwind/main/schemas/block.json",
|
|
3
|
-
"blockName": "table-of-contents",
|
|
4
|
-
"title": "Table of contents",
|
|
5
|
-
"description": "Display the structure of the current post.",
|
|
6
|
-
"category": "eightshift",
|
|
7
|
-
"icon": {
|
|
8
|
-
"src": "es-table-of-contents"
|
|
9
|
-
},
|
|
10
|
-
"keywords": [
|
|
11
|
-
"table",
|
|
12
|
-
"of",
|
|
13
|
-
"contents",
|
|
14
|
-
"toc"
|
|
15
|
-
],
|
|
16
|
-
"example": {
|
|
17
|
-
"attributes": {
|
|
18
|
-
"tableOfContentsParagraphContent": "Contents"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
"attributes": {
|
|
22
|
-
"tableOfContentsHeadingLevels": {
|
|
23
|
-
"type": "object",
|
|
24
|
-
"default": {
|
|
25
|
-
"h1": false,
|
|
26
|
-
"h2": true,
|
|
27
|
-
"h3": true,
|
|
28
|
-
"h4": true,
|
|
29
|
-
"h5": true,
|
|
30
|
-
"h6": true
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"tableOfContentsDescription": {
|
|
34
|
-
"type": "string",
|
|
35
|
-
"default": "In this article"
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"tailwind": {
|
|
39
|
-
"parts": {
|
|
40
|
-
"container": {
|
|
41
|
-
"twClasses": "pl-2 py-2 border-l border-l-gray-300"
|
|
42
|
-
},
|
|
43
|
-
"description": {
|
|
44
|
-
"twClasses": "font-display ~text-xl/2xl text-gray-500 mb-1"
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { TableOfContentsEditor } from './components/table-of-contents-editor';
|
|
2
|
-
import { TableOfContentsOptions } from './components/table-of-contents-options';
|
|
3
|
-
import { GutenbergBlock } from '@eightshift/frontend-libs-tailwind/scripts';
|
|
4
|
-
|
|
5
|
-
export const TableOfContents = (props) => {
|
|
6
|
-
return (
|
|
7
|
-
<GutenbergBlock
|
|
8
|
-
{...props}
|
|
9
|
-
options={TableOfContentsOptions}
|
|
10
|
-
editor={TableOfContentsEditor}
|
|
11
|
-
/>
|
|
12
|
-
);
|
|
13
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Table of contents block template.
|
|
5
|
-
*
|
|
6
|
-
* @package %g_namespace%
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
use %g_namespace_vendor_prefix%\EightshiftLibs\Helpers\Helpers;
|
|
10
|
-
|
|
11
|
-
$manifest = Helpers::getManifestByDir(__DIR__);
|
|
12
|
-
|
|
13
|
-
$blockClass = $attributes['blockClass'] ?? '';
|
|
14
|
-
$blockJsClass = $attributes['blockJsClass'] ?? '';
|
|
15
|
-
|
|
16
|
-
$tocClass = Helpers::classnames([
|
|
17
|
-
Helpers::tailwindClasses('container', $attributes, $manifest),
|
|
18
|
-
$blockJsClass,
|
|
19
|
-
]);
|
|
20
|
-
|
|
21
|
-
$tableOfContentsHeadingLevels = Helpers::checkAttr('tableOfContentsHeadingLevels', $attributes, $manifest);
|
|
22
|
-
$tableOfContentsDescription = Helpers::checkAttr('tableOfContentsDescription', $attributes, $manifest);
|
|
23
|
-
|
|
24
|
-
$headingLevelsToUse = implode(',', array_keys(array_filter($tableOfContentsHeadingLevels, fn($v) => $v)));
|
|
25
|
-
?>
|
|
26
|
-
|
|
27
|
-
<div class="<?php echo esc_attr($tocClass); ?>" data-levels="<?php echo esc_attr($headingLevelsToUse); ?>">
|
|
28
|
-
<p class="<?php echo esc_attr(Helpers::tailwindClasses('description', $attributes, $manifest)); ?>">
|
|
29
|
-
<?php echo esc_attr($tableOfContentsDescription); ?>
|
|
30
|
-
</p>
|
|
31
|
-
</div>
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { props } from '@eightshift/frontend-libs-tailwind/scripts';
|
|
2
|
-
import { VideoEditor as EditorComponent } from '../../../components/video/components/video-editor';
|
|
3
|
-
|
|
4
|
-
export const VideoEditor = ({ attributes, setAttributes }) => {
|
|
5
|
-
return <EditorComponent {...props('video', attributes, { setAttributes })} />;
|
|
6
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { __ } from '@wordpress/i18n';
|
|
2
|
-
import { props } from '@eightshift/frontend-libs-tailwind/scripts';
|
|
3
|
-
import { VideoOptions as OptionsComponent } from '../../../components/video/components/video-options';
|
|
4
|
-
|
|
5
|
-
export const VideoOptions = ({ attributes, setAttributes }) => {
|
|
6
|
-
return (
|
|
7
|
-
<OptionsComponent
|
|
8
|
-
{...props('video', attributes, { setAttributes })}
|
|
9
|
-
controlOnly
|
|
10
|
-
/>
|
|
11
|
-
);
|
|
12
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://raw.githubusercontent.com/infinum/eightshift-frontend-libs-tailwind/main/schemas/block.json",
|
|
3
|
-
"blockName": "video",
|
|
4
|
-
"title": "Video",
|
|
5
|
-
"description" : "Showcase a video from the Media library.",
|
|
6
|
-
"category": "eightshift",
|
|
7
|
-
"icon": {
|
|
8
|
-
"src": "es-video"
|
|
9
|
-
},
|
|
10
|
-
"keywords": [
|
|
11
|
-
"video",
|
|
12
|
-
"picture",
|
|
13
|
-
"img"
|
|
14
|
-
],
|
|
15
|
-
"components": {
|
|
16
|
-
"video": "video"
|
|
17
|
-
},
|
|
18
|
-
"example": {
|
|
19
|
-
"attributes": {
|
|
20
|
-
"videoAlign": "center center"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"attributes": {
|
|
24
|
-
"videoAlign": {
|
|
25
|
-
"type": "string",
|
|
26
|
-
"default": "center center"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { VideoEditor } from './components/video-editor';
|
|
2
|
-
import { VideoOptions } from './components/video-options';
|
|
3
|
-
import { GutenbergBlock } from '@eightshift/frontend-libs-tailwind/scripts';
|
|
4
|
-
|
|
5
|
-
export const Video = (props) => {
|
|
6
|
-
return (
|
|
7
|
-
<GutenbergBlock
|
|
8
|
-
{...props}
|
|
9
|
-
options={VideoOptions}
|
|
10
|
-
editor={VideoEditor}
|
|
11
|
-
/>
|
|
12
|
-
);
|
|
13
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Video block template.
|
|
5
|
-
*
|
|
6
|
-
* @package %g_namespace%
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
use %g_namespace_vendor_prefix%\EightshiftLibs\Helpers\Helpers;
|
|
10
|
-
|
|
11
|
-
$manifest = Helpers::getManifestByDir(__DIR__);
|
|
12
|
-
|
|
13
|
-
$blockClass = $attributes['blockClass'] ?? '';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
?>
|
|
17
|
-
|
|
18
|
-
<div class="<?php echo esc_attr($blockClass); ?>" >
|
|
19
|
-
<?php
|
|
20
|
-
echo Helpers::render('video', Helpers::props('video', $attributes));
|
|
21
|
-
?>
|
|
22
|
-
</div>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://raw.githubusercontent.com/infinum/eightshift-frontend-libs-tailwind/main/schemas/globalManifest.json",
|
|
3
|
-
"namespace": "eightshift-boilerplate",
|
|
4
|
-
"background": "#FFFFFF",
|
|
5
|
-
"foreground": "#0F766E",
|
|
6
|
-
"globalVariables": {
|
|
7
|
-
"breakpoints": {
|
|
8
|
-
"sm": 40,
|
|
9
|
-
"md": 80,
|
|
10
|
-
"lg": 90,
|
|
11
|
-
"xl": 120
|
|
12
|
-
},
|
|
13
|
-
"breakpointData": {
|
|
14
|
-
"sm": {
|
|
15
|
-
"icon": "screenMobile",
|
|
16
|
-
"label": "Mobile"
|
|
17
|
-
},
|
|
18
|
-
"md": {
|
|
19
|
-
"icon": "screenTablet",
|
|
20
|
-
"label": "Tablet"
|
|
21
|
-
},
|
|
22
|
-
"lg": {
|
|
23
|
-
"icon": "screenDesktop",
|
|
24
|
-
"label": "Desktop"
|
|
25
|
-
},
|
|
26
|
-
"xl": {
|
|
27
|
-
"icon": "screenLarge",
|
|
28
|
-
"label": "Large"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://raw.githubusercontent.com/infinum/eightshift-frontend-libs-tailwind/main/schemas/variation.json",
|
|
3
|
-
"parentName": "card",
|
|
4
|
-
"name": "card-simple",
|
|
5
|
-
"title": "Card: Simple",
|
|
6
|
-
"description" : "A simplified version of the Card.",
|
|
7
|
-
"icon": {
|
|
8
|
-
"src": "es-card-simple"
|
|
9
|
-
},
|
|
10
|
-
"attributes": {
|
|
11
|
-
"cardCardParagraphUse": false,
|
|
12
|
-
"cardCardButtonUse": false
|
|
13
|
-
},
|
|
14
|
-
"scope": [
|
|
15
|
-
"inserter"
|
|
16
|
-
]
|
|
17
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { checkAttr, tailwindClasses } from '@eightshift/frontend-libs-tailwind/scripts';
|
|
2
|
-
import manifest from './../manifest.json';
|
|
3
|
-
|
|
4
|
-
export const WrapperEditor = ({ attributes, children }) => {
|
|
5
|
-
const wrapperUse = checkAttr('wrapperUse', attributes, manifest);
|
|
6
|
-
|
|
7
|
-
if (!wrapperUse) {
|
|
8
|
-
return children;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
return <div className={tailwindClasses(attributes, manifest)}>{children}</div>;
|
|
12
|
-
};
|
|
@@ -1,364 +0,0 @@
|
|
|
1
|
-
import { __ } from '@wordpress/i18n';
|
|
2
|
-
import { checkAttr, getAttrKey, getHiddenOptions, getOption } from '@eightshift/frontend-libs-tailwind/scripts';
|
|
3
|
-
import {
|
|
4
|
-
BaseControl,
|
|
5
|
-
ButtonGroup,
|
|
6
|
-
ColorPicker,
|
|
7
|
-
ContainerPanel,
|
|
8
|
-
OptionSelect,
|
|
9
|
-
Spacer,
|
|
10
|
-
Responsive,
|
|
11
|
-
InputField,
|
|
12
|
-
} from '@eightshift/ui-components';
|
|
13
|
-
import { icons } from '@eightshift/ui-components/icons';
|
|
14
|
-
import { clsx } from '@eightshift/ui-components/utilities';
|
|
15
|
-
import { getResponsiveData } from '@eightshift/frontend-libs-tailwind/scripts/helpers/breakpoints';
|
|
16
|
-
import { getColorOption, rotationClassName } from '../../assets/scripts/shared';
|
|
17
|
-
import manifest from './../manifest.json';
|
|
18
|
-
|
|
19
|
-
export const WrapperOptions = ({ attributes, setAttributes }) => {
|
|
20
|
-
const wrapperUse = checkAttr('wrapperUse', attributes, manifest);
|
|
21
|
-
const wrapperNoControls = checkAttr('wrapperNoControls', attributes, manifest);
|
|
22
|
-
const wrapperNoWidthControls = checkAttr('wrapperNoWidthControls', attributes, manifest);
|
|
23
|
-
|
|
24
|
-
const wrapperWidth = checkAttr('wrapperWidth', attributes, manifest);
|
|
25
|
-
const wrapperContentWidth = checkAttr('wrapperContentWidth', attributes, manifest);
|
|
26
|
-
|
|
27
|
-
const wrapperBackground = checkAttr('wrapperBackground', attributes, manifest);
|
|
28
|
-
const wrapperGradientDirection = checkAttr('wrapperGradientDirection', attributes, manifest);
|
|
29
|
-
|
|
30
|
-
const wrapperBorderRadius = checkAttr('wrapperBorderRadius', attributes, manifest);
|
|
31
|
-
|
|
32
|
-
const wrapperMarginTop = checkAttr('wrapperMarginTop', attributes, manifest);
|
|
33
|
-
const wrapperMarginBottom = checkAttr('wrapperMarginBottom', attributes, manifest);
|
|
34
|
-
|
|
35
|
-
const wrapperPaddingTop = checkAttr('wrapperPaddingTop', attributes, manifest);
|
|
36
|
-
const wrapperPaddingBottom = checkAttr('wrapperPaddingBottom', attributes, manifest);
|
|
37
|
-
|
|
38
|
-
const wrapperHide = checkAttr('wrapperHide', attributes, manifest);
|
|
39
|
-
|
|
40
|
-
const wrapperId = checkAttr('wrapperId', attributes, manifest);
|
|
41
|
-
|
|
42
|
-
const wrapperDisabledOptions = checkAttr('wrapperDisabledOptions', attributes, manifest);
|
|
43
|
-
|
|
44
|
-
const hiddenOptions = getHiddenOptions(wrapperDisabledOptions);
|
|
45
|
-
|
|
46
|
-
if (wrapperNoControls || wrapperDisabledOptions === 'all') {
|
|
47
|
-
return null;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
let backgroundType = 'none';
|
|
51
|
-
|
|
52
|
-
if (wrapperBackground?.startsWith('solid-')) {
|
|
53
|
-
backgroundType = 'solid';
|
|
54
|
-
} else if (wrapperBackground?.startsWith('gradient-')) {
|
|
55
|
-
backgroundType = 'gradient';
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const responsiveData = getResponsiveData(true);
|
|
59
|
-
|
|
60
|
-
return (
|
|
61
|
-
<ContainerPanel
|
|
62
|
-
title={__('Wrapper', '%g_textdomain%')}
|
|
63
|
-
use={wrapperUse}
|
|
64
|
-
actions={
|
|
65
|
-
<OptionSelect
|
|
66
|
-
aria-label={__('Width', '%g_textdomain%')}
|
|
67
|
-
value={wrapperWidth}
|
|
68
|
-
onChange={(value) =>
|
|
69
|
-
setAttributes({
|
|
70
|
-
[getAttrKey('wrapperWidth', attributes, manifest)]: value,
|
|
71
|
-
[getAttrKey('wrapperUse', attributes, manifest)]: value !== 'off',
|
|
72
|
-
})
|
|
73
|
-
}
|
|
74
|
-
options={getOption('wrapperWidth', attributes, manifest)}
|
|
75
|
-
hidden={wrapperNoWidthControls}
|
|
76
|
-
type='menu'
|
|
77
|
-
wrapperProps={{
|
|
78
|
-
triggerProps: { size: 'small' },
|
|
79
|
-
}}
|
|
80
|
-
inline
|
|
81
|
-
/>
|
|
82
|
-
}
|
|
83
|
-
closable
|
|
84
|
-
>
|
|
85
|
-
<Responsive
|
|
86
|
-
value={wrapperContentWidth}
|
|
87
|
-
onChange={(value) =>
|
|
88
|
-
setAttributes({
|
|
89
|
-
[getAttrKey('wrapperContentWidth', attributes, manifest)]: value,
|
|
90
|
-
})
|
|
91
|
-
}
|
|
92
|
-
icon={icons.containerWidth}
|
|
93
|
-
label={__('Width', '%g_textdomain%')}
|
|
94
|
-
options={getOption('wrapperContentWidth', attributes, manifest)}
|
|
95
|
-
hidden={wrapperNoWidthControls || hiddenOptions?.width}
|
|
96
|
-
noModeSelect
|
|
97
|
-
inline
|
|
98
|
-
{...responsiveData}
|
|
99
|
-
>
|
|
100
|
-
{({ currentValue, handleChange, options }) => (
|
|
101
|
-
<OptionSelect
|
|
102
|
-
options={options}
|
|
103
|
-
value={currentValue}
|
|
104
|
-
onChange={(value) => handleChange(value)}
|
|
105
|
-
type='menu'
|
|
106
|
-
/>
|
|
107
|
-
)}
|
|
108
|
-
</Responsive>
|
|
109
|
-
|
|
110
|
-
<BaseControl
|
|
111
|
-
icon={icons.backgroundType}
|
|
112
|
-
label={__('Background', '%g_textdomain%')}
|
|
113
|
-
hidden={hiddenOptions?.background}
|
|
114
|
-
inline
|
|
115
|
-
>
|
|
116
|
-
<ButtonGroup>
|
|
117
|
-
<OptionSelect
|
|
118
|
-
options={getOption('wrapperBackground', attributes, manifest)}
|
|
119
|
-
value={backgroundType}
|
|
120
|
-
onChange={(value) => {
|
|
121
|
-
if (value === 'none') {
|
|
122
|
-
setAttributes({ [getAttrKey('wrapperBackground', attributes, manifest)]: undefined });
|
|
123
|
-
} else {
|
|
124
|
-
setAttributes({
|
|
125
|
-
[getAttrKey('wrapperBackground', attributes, manifest)]: Object.keys(
|
|
126
|
-
manifest.tailwind.options.wrapperBackground.twClasses,
|
|
127
|
-
).find((key) => key.startsWith(value)),
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
}}
|
|
131
|
-
aria-label={__('Background type', '%g_textdomain%')}
|
|
132
|
-
type='menu'
|
|
133
|
-
hidden={hiddenOptions?.backgroundType}
|
|
134
|
-
noItemIcon
|
|
135
|
-
/>
|
|
136
|
-
|
|
137
|
-
{backgroundType === 'solid' && (
|
|
138
|
-
<ColorPicker
|
|
139
|
-
colors={getColorOption('wrapperBackgroundSolid', manifest)}
|
|
140
|
-
onChange={(value) =>
|
|
141
|
-
setAttributes({ [getAttrKey('wrapperBackground', attributes, manifest)]: `solid-${value}` })
|
|
142
|
-
}
|
|
143
|
-
value={wrapperBackground?.replace('solid-', '')}
|
|
144
|
-
aria-label={__('Background color', '%g_textdomain%')}
|
|
145
|
-
hidden={hiddenOptions?.backgroundType}
|
|
146
|
-
/>
|
|
147
|
-
)}
|
|
148
|
-
{backgroundType === 'gradient' && (
|
|
149
|
-
<>
|
|
150
|
-
<OptionSelect
|
|
151
|
-
value={wrapperBackground}
|
|
152
|
-
onChange={(value) => setAttributes({ [getAttrKey('wrapperBackground', attributes, manifest)]: value })}
|
|
153
|
-
options={getOption('wrapperBackgroundGradient', attributes, manifest).map((option) => ({
|
|
154
|
-
...option,
|
|
155
|
-
icon: (
|
|
156
|
-
<div
|
|
157
|
-
className={clsx(
|
|
158
|
-
'es-uic-size-5 es-uic-rounded es-uic-border es-uic-border-gray-300 bg-gradient-to-r',
|
|
159
|
-
manifest.tailwind.options.wrapperBackground.twClasses[option.value],
|
|
160
|
-
)}
|
|
161
|
-
/>
|
|
162
|
-
),
|
|
163
|
-
}))}
|
|
164
|
-
wrapperProps={{
|
|
165
|
-
triggerIcon: (
|
|
166
|
-
<div
|
|
167
|
-
className={clsx(
|
|
168
|
-
'es-uic-size-6 es-uic-rounded es-uic-border es-uic-border-gray-300 es-uic-shadow-sm bg-gradient-to-r',
|
|
169
|
-
manifest.tailwind.options.wrapperBackground.twClasses[wrapperBackground],
|
|
170
|
-
)}
|
|
171
|
-
/>
|
|
172
|
-
),
|
|
173
|
-
}}
|
|
174
|
-
aria-label={__('Gradient style', '%g_textdomain%')}
|
|
175
|
-
hidden={hiddenOptions?.backgroundType}
|
|
176
|
-
noTriggerLabel
|
|
177
|
-
type='menu'
|
|
178
|
-
/>
|
|
179
|
-
<OptionSelect
|
|
180
|
-
value={wrapperGradientDirection}
|
|
181
|
-
onChange={(value) =>
|
|
182
|
-
setAttributes({ [getAttrKey('wrapperGradientDirection', attributes, manifest)]: value })
|
|
183
|
-
}
|
|
184
|
-
options={getOption('wrapperGradientDirection', attributes, manifest)}
|
|
185
|
-
wrapperProps={{
|
|
186
|
-
triggerIcon: <div className={rotationClassName[wrapperGradientDirection]}>{icons.arrowUpCircle}</div>,
|
|
187
|
-
}}
|
|
188
|
-
aria-label={__('Gradient angle', '%g_textdomain%')}
|
|
189
|
-
hidden={hiddenOptions?.backgroundType}
|
|
190
|
-
noTriggerLabel
|
|
191
|
-
type='menu'
|
|
192
|
-
/>
|
|
193
|
-
</>
|
|
194
|
-
)}
|
|
195
|
-
</ButtonGroup>
|
|
196
|
-
</BaseControl>
|
|
197
|
-
|
|
198
|
-
<OptionSelect
|
|
199
|
-
icon={icons.roundedCorners}
|
|
200
|
-
label={__('Rounded corners', '%g_textdomain%')}
|
|
201
|
-
value={wrapperBorderRadius}
|
|
202
|
-
onChange={(value) => setAttributes({ [getAttrKey('wrapperBorderRadius', attributes, manifest)]: value })}
|
|
203
|
-
options={getOption('wrapperBorderRadius', attributes, manifest)}
|
|
204
|
-
aria-label={__('Rounded corners', '%g_textdomain%')}
|
|
205
|
-
type='menu'
|
|
206
|
-
hidden={hiddenOptions?.roundedCorners}
|
|
207
|
-
inline
|
|
208
|
-
/>
|
|
209
|
-
|
|
210
|
-
<Spacer />
|
|
211
|
-
<Spacer
|
|
212
|
-
icon={icons.containerSpacingH}
|
|
213
|
-
text={__('Spacing', '%g_textdomain%')}
|
|
214
|
-
border
|
|
215
|
-
/>
|
|
216
|
-
|
|
217
|
-
<Responsive
|
|
218
|
-
value={wrapperMarginTop}
|
|
219
|
-
onChange={(value) =>
|
|
220
|
-
setAttributes({
|
|
221
|
-
[getAttrKey('wrapperMarginTop', attributes, manifest)]: value,
|
|
222
|
-
})
|
|
223
|
-
}
|
|
224
|
-
icon={icons.spacingTop}
|
|
225
|
-
label={__('Top margin', '%g_textdomain%')}
|
|
226
|
-
options={getOption('wrapperSpacing', attributes, manifest)}
|
|
227
|
-
hidden={hiddenOptions?.marginTop}
|
|
228
|
-
noModeSelect
|
|
229
|
-
inline
|
|
230
|
-
{...responsiveData}
|
|
231
|
-
>
|
|
232
|
-
{({ currentValue, handleChange, options }) => (
|
|
233
|
-
<OptionSelect
|
|
234
|
-
options={options}
|
|
235
|
-
value={currentValue}
|
|
236
|
-
onChange={(value) => handleChange(value)}
|
|
237
|
-
type='menu'
|
|
238
|
-
/>
|
|
239
|
-
)}
|
|
240
|
-
</Responsive>
|
|
241
|
-
|
|
242
|
-
<Responsive
|
|
243
|
-
value={wrapperMarginBottom}
|
|
244
|
-
onChange={(value) =>
|
|
245
|
-
setAttributes({
|
|
246
|
-
[getAttrKey('wrapperMarginBottom', attributes, manifest)]: value,
|
|
247
|
-
})
|
|
248
|
-
}
|
|
249
|
-
icon={icons.spacingBottom}
|
|
250
|
-
label={__('Bottom margin', '%g_textdomain%')}
|
|
251
|
-
options={getOption('wrapperSpacing', attributes, manifest)}
|
|
252
|
-
hidden={hiddenOptions?.marginBottom}
|
|
253
|
-
noModeSelect
|
|
254
|
-
inline
|
|
255
|
-
{...responsiveData}
|
|
256
|
-
>
|
|
257
|
-
{({ currentValue, handleChange, options }) => (
|
|
258
|
-
<OptionSelect
|
|
259
|
-
options={options}
|
|
260
|
-
value={currentValue}
|
|
261
|
-
onChange={(value) => handleChange(value)}
|
|
262
|
-
type='menu'
|
|
263
|
-
/>
|
|
264
|
-
)}
|
|
265
|
-
</Responsive>
|
|
266
|
-
|
|
267
|
-
<Spacer />
|
|
268
|
-
|
|
269
|
-
<Responsive
|
|
270
|
-
value={wrapperPaddingTop}
|
|
271
|
-
onChange={(value) =>
|
|
272
|
-
setAttributes({
|
|
273
|
-
[getAttrKey('wrapperPaddingTop', attributes, manifest)]: value,
|
|
274
|
-
})
|
|
275
|
-
}
|
|
276
|
-
icon={icons.spacingTopIn}
|
|
277
|
-
label={__('Top padding', '%g_textdomain%')}
|
|
278
|
-
options={getOption('wrapperSpacing', attributes, manifest)}
|
|
279
|
-
hidden={hiddenOptions?.paddingTop}
|
|
280
|
-
noModeSelect
|
|
281
|
-
inline
|
|
282
|
-
{...responsiveData}
|
|
283
|
-
>
|
|
284
|
-
{({ currentValue, handleChange, options }) => (
|
|
285
|
-
<OptionSelect
|
|
286
|
-
options={options}
|
|
287
|
-
value={currentValue}
|
|
288
|
-
onChange={(value) => handleChange(value)}
|
|
289
|
-
type='menu'
|
|
290
|
-
/>
|
|
291
|
-
)}
|
|
292
|
-
</Responsive>
|
|
293
|
-
|
|
294
|
-
<Responsive
|
|
295
|
-
value={wrapperPaddingBottom}
|
|
296
|
-
onChange={(value) =>
|
|
297
|
-
setAttributes({
|
|
298
|
-
[getAttrKey('wrapperPaddingBottom', attributes, manifest)]: value,
|
|
299
|
-
})
|
|
300
|
-
}
|
|
301
|
-
icon={icons.spacingBottomIn}
|
|
302
|
-
label={__('Bottom padding', '%g_textdomain%')}
|
|
303
|
-
options={getOption('wrapperSpacing', attributes, manifest)}
|
|
304
|
-
hidden={hiddenOptions?.paddingBottom}
|
|
305
|
-
noModeSelect
|
|
306
|
-
inline
|
|
307
|
-
{...responsiveData}
|
|
308
|
-
>
|
|
309
|
-
{({ currentValue, handleChange, options }) => (
|
|
310
|
-
<OptionSelect
|
|
311
|
-
options={options}
|
|
312
|
-
value={currentValue}
|
|
313
|
-
onChange={(value) => handleChange(value)}
|
|
314
|
-
type='menu'
|
|
315
|
-
/>
|
|
316
|
-
)}
|
|
317
|
-
</Responsive>
|
|
318
|
-
|
|
319
|
-
<Spacer />
|
|
320
|
-
<Spacer
|
|
321
|
-
icon={icons.moreHCircle}
|
|
322
|
-
text={__('Advanced', '%g_textdomain%')}
|
|
323
|
-
border
|
|
324
|
-
/>
|
|
325
|
-
|
|
326
|
-
<Responsive
|
|
327
|
-
value={wrapperHide}
|
|
328
|
-
onChange={(value) =>
|
|
329
|
-
setAttributes({
|
|
330
|
-
[getAttrKey('wrapperHide', attributes, manifest)]: value,
|
|
331
|
-
})
|
|
332
|
-
}
|
|
333
|
-
icon={icons.visibility}
|
|
334
|
-
label={__('Visibility', '%g_textdomain%')}
|
|
335
|
-
options={getOption('wrapperHide', attributes, manifest)}
|
|
336
|
-
hidden={hiddenOptions?.hide}
|
|
337
|
-
noModeSelect
|
|
338
|
-
inline
|
|
339
|
-
{...responsiveData}
|
|
340
|
-
>
|
|
341
|
-
{({ currentValue, handleChange, options, isInlineCollapsedView }) => (
|
|
342
|
-
<OptionSelect
|
|
343
|
-
options={options}
|
|
344
|
-
value={String(currentValue)}
|
|
345
|
-
onChange={(value) => handleChange(value)}
|
|
346
|
-
noItemLabel={isInlineCollapsedView}
|
|
347
|
-
noItemIcon={!isInlineCollapsedView}
|
|
348
|
-
/>
|
|
349
|
-
)}
|
|
350
|
-
</Responsive>
|
|
351
|
-
|
|
352
|
-
<Spacer />
|
|
353
|
-
|
|
354
|
-
<InputField
|
|
355
|
-
icon={icons.id}
|
|
356
|
-
label={__('Unique identifier', '%g_textdomain%')}
|
|
357
|
-
value={wrapperId}
|
|
358
|
-
onChange={(value) => setAttributes({ [getAttrKey('wrapperId', attributes, manifest)]: value })}
|
|
359
|
-
className='es-uic-font-mono'
|
|
360
|
-
hidden={hiddenOptions?.id}
|
|
361
|
-
/>
|
|
362
|
-
</ContainerPanel>
|
|
363
|
-
);
|
|
364
|
-
};
|