@eightshift/frontend-libs-tailwind 1.0.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/.gitattributes +37 -0
- package/.github/CODEOWNERS +1 -0
- package/.github/CONTRIBUTING.md +17 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +10 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +10 -0
- package/.github/ISSUE_TEMPLATE/question.md +10 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +11 -0
- package/.github/workflows/ci.yml +31 -0
- package/.husky/pre-commit +1 -0
- package/.prettierrc +14 -0
- package/.stylelintrc +4 -0
- package/CHANGELOG.md +13 -0
- package/CODE_OF_CONDUCT.md +76 -0
- package/LICENSE +21 -0
- package/README.md +24 -0
- package/blocks/init/assets/application-admin.js +10 -0
- package/blocks/init/assets/application.js +13 -0
- package/blocks/init/assets/images/index.js +5 -0
- package/blocks/init/assets/scripts/application-admin.js +7 -0
- package/blocks/init/assets/scripts/application.js +3 -0
- package/blocks/init/assets/scripts/theme-colors.js +39 -0
- package/blocks/init/assets/styles/application-admin.css +6 -0
- package/blocks/init/assets/styles/application.css +3 -0
- package/blocks/init/src/Blocks/assets/application-blocks-editor.js +14 -0
- package/blocks/init/src/Blocks/assets/application-blocks-frontend.js +13 -0
- package/blocks/init/src/Blocks/assets/application-blocks.js +9 -0
- package/blocks/init/src/Blocks/assets/scripts/application-blocks-editor.js +65 -0
- package/blocks/init/src/Blocks/assets/scripts/application-blocks-frontend.js +24 -0
- package/blocks/init/src/Blocks/assets/scripts/link-section-editor.js +258 -0
- package/blocks/init/src/Blocks/assets/scripts/shared.js +25 -0
- package/blocks/init/src/Blocks/assets/styles/application-blocks-editor.css +15 -0
- package/blocks/init/src/Blocks/assets/styles/application-blocks-frontend.css +12 -0
- package/blocks/init/src/Blocks/assets/styles/application-blocks.css +0 -0
- package/blocks/init/src/Blocks/assets/styles/editor/editor-overrides.css +15 -0
- package/blocks/init/src/Blocks/assets/styles/tailwind.css +34 -0
- package/blocks/init/src/Blocks/components/admin-theme-options/admin-theme-options.php +20 -0
- package/blocks/init/src/Blocks/components/admin-theme-options/assets-admin/index.js +36 -0
- package/blocks/init/src/Blocks/components/admin-theme-options/assets-admin/pages/parts.js +55 -0
- package/blocks/init/src/Blocks/components/admin-theme-options/manifest.json +5 -0
- package/blocks/init/src/Blocks/components/button/assets/index.js +22 -0
- package/blocks/init/src/Blocks/components/button/button.php +77 -0
- package/blocks/init/src/Blocks/components/button/components/button-editor.js +40 -0
- package/blocks/init/src/Blocks/components/button/components/button-options.js +135 -0
- package/blocks/init/src/Blocks/components/button/manifest.json +299 -0
- package/blocks/init/src/Blocks/components/card/card.php +42 -0
- package/blocks/init/src/Blocks/components/card/components/card-editor.js +39 -0
- package/blocks/init/src/Blocks/components/card/components/card-options.js +56 -0
- package/blocks/init/src/Blocks/components/card/manifest.json +111 -0
- package/blocks/init/src/Blocks/components/head/head.php +52 -0
- package/blocks/init/src/Blocks/components/head/manifest.json +17 -0
- package/blocks/init/src/Blocks/components/heading/components/heading-editor.js +30 -0
- package/blocks/init/src/Blocks/components/heading/components/heading-options.js +62 -0
- package/blocks/init/src/Blocks/components/heading/heading.php +45 -0
- package/blocks/init/src/Blocks/components/heading/manifest.json +76 -0
- package/blocks/init/src/Blocks/components/hero/components/hero-editor.js +42 -0
- package/blocks/init/src/Blocks/components/hero/components/hero-options.js +100 -0
- package/blocks/init/src/Blocks/components/hero/hero.php +45 -0
- package/blocks/init/src/Blocks/components/hero/manifest.json +96 -0
- package/blocks/init/src/Blocks/components/icon/components/icon-editor.js +23 -0
- package/blocks/init/src/Blocks/components/icon/components/icon-options.js +65 -0
- package/blocks/init/src/Blocks/components/icon/icon.php +34 -0
- package/blocks/init/src/Blocks/components/icon/manifest.json +1234 -0
- package/blocks/init/src/Blocks/components/image/components/image-editor.js +65 -0
- package/blocks/init/src/Blocks/components/image/components/image-options.js +111 -0
- package/blocks/init/src/Blocks/components/image/image.php +62 -0
- package/blocks/init/src/Blocks/components/image/manifest.json +125 -0
- package/blocks/init/src/Blocks/components/list/components/list-editor.js +30 -0
- package/blocks/init/src/Blocks/components/list/components/list-options.js +62 -0
- package/blocks/init/src/Blocks/components/list/list.php +32 -0
- package/blocks/init/src/Blocks/components/list/manifest.json +127 -0
- package/blocks/init/src/Blocks/components/load-more/assets/index.js +19 -0
- package/blocks/init/src/Blocks/components/load-more/assets/load-more.js +147 -0
- package/blocks/init/src/Blocks/components/load-more/components/load-more-editor.js +14 -0
- package/blocks/init/src/Blocks/components/load-more/components/load-more-options.js +18 -0
- package/blocks/init/src/Blocks/components/load-more/load-more.php +47 -0
- package/blocks/init/src/Blocks/components/load-more/manifest.json +39 -0
- package/blocks/init/src/Blocks/components/modal/assets/index.js +27 -0
- package/blocks/init/src/Blocks/components/modal/manifest.json +48 -0
- package/blocks/init/src/Blocks/components/modal/modal.php +46 -0
- package/blocks/init/src/Blocks/components/paragraph/components/paragraph-editor.js +40 -0
- package/blocks/init/src/Blocks/components/paragraph/components/paragraph-options.js +48 -0
- package/blocks/init/src/Blocks/components/paragraph/manifest.json +83 -0
- package/blocks/init/src/Blocks/components/paragraph/paragraph.php +33 -0
- package/blocks/init/src/Blocks/components/post-header/manifest.json +5 -0
- package/blocks/init/src/Blocks/components/post-header/post-header.php +24 -0
- package/blocks/init/src/Blocks/components/quote/components/quote-editor.js +53 -0
- package/blocks/init/src/Blocks/components/quote/components/quote-options.js +29 -0
- package/blocks/init/src/Blocks/components/quote/manifest.json +47 -0
- package/blocks/init/src/Blocks/components/quote/quote.php +49 -0
- package/blocks/init/src/Blocks/components/share/assets/index.js +39 -0
- package/blocks/init/src/Blocks/components/share/components/share-editor.js +25 -0
- package/blocks/init/src/Blocks/components/share/components/share-options.js +112 -0
- package/blocks/init/src/Blocks/components/share/manifest.json +72 -0
- package/blocks/init/src/Blocks/components/share/share.php +66 -0
- package/blocks/init/src/Blocks/components/tracking-before-body-end/manifest.json +5 -0
- package/blocks/init/src/Blocks/components/tracking-before-body-end/tracking-before-body-end.php +9 -0
- package/blocks/init/src/Blocks/components/tracking-head/manifest.json +5 -0
- package/blocks/init/src/Blocks/components/tracking-head/tracking-head.php +9 -0
- package/blocks/init/src/Blocks/components/video/components/video-editor.js +74 -0
- package/blocks/init/src/Blocks/components/video/components/video-options.js +280 -0
- package/blocks/init/src/Blocks/components/video/manifest.json +116 -0
- package/blocks/init/src/Blocks/components/video/video.php +72 -0
- package/blocks/init/src/Blocks/custom/accordion/accordion-block.js +15 -0
- package/blocks/init/src/Blocks/custom/accordion/accordion.php +28 -0
- package/blocks/init/src/Blocks/custom/accordion/assets/index.js +37 -0
- package/blocks/init/src/Blocks/custom/accordion/components/accordion-editor.js +17 -0
- package/blocks/init/src/Blocks/custom/accordion/components/accordion-options.js +18 -0
- package/blocks/init/src/Blocks/custom/accordion/manifest.json +32 -0
- package/blocks/init/src/Blocks/custom/accordion-item/accordion-item-block.js +19 -0
- package/blocks/init/src/Blocks/custom/accordion-item/accordion-item.php +46 -0
- package/blocks/init/src/Blocks/custom/accordion-item/components/accordion-item-editor.js +60 -0
- package/blocks/init/src/Blocks/custom/accordion-item/manifest.json +69 -0
- package/blocks/init/src/Blocks/custom/button/button-block.js +13 -0
- package/blocks/init/src/Blocks/custom/button/button.php +11 -0
- package/blocks/init/src/Blocks/custom/button/components/button-editor.js +12 -0
- package/blocks/init/src/Blocks/custom/button/components/button-options.js +12 -0
- package/blocks/init/src/Blocks/custom/button/manifest.json +18 -0
- package/blocks/init/src/Blocks/custom/card/card-block.js +13 -0
- package/blocks/init/src/Blocks/custom/card/card.php +11 -0
- package/blocks/init/src/Blocks/custom/card/components/card-editor.js +12 -0
- package/blocks/init/src/Blocks/custom/card/components/card-options.js +15 -0
- package/blocks/init/src/Blocks/custom/card/manifest.json +18 -0
- package/blocks/init/src/Blocks/custom/carousel/assets/index.js +46 -0
- package/blocks/init/src/Blocks/custom/carousel/assets/navigation.js +31 -0
- package/blocks/init/src/Blocks/custom/carousel/assets/pagination.js +39 -0
- package/blocks/init/src/Blocks/custom/carousel/carousel-block.js +21 -0
- package/blocks/init/src/Blocks/custom/carousel/carousel.php +61 -0
- package/blocks/init/src/Blocks/custom/carousel/components/carousel-editor.js +25 -0
- package/blocks/init/src/Blocks/custom/carousel/components/carousel-options.js +47 -0
- package/blocks/init/src/Blocks/custom/carousel/manifest.json +130 -0
- package/blocks/init/src/Blocks/custom/column/column-block.js +21 -0
- package/blocks/init/src/Blocks/custom/column/column-hooks.js +32 -0
- package/blocks/init/src/Blocks/custom/column/column.php +21 -0
- package/blocks/init/src/Blocks/custom/column/components/column-editor.js +19 -0
- package/blocks/init/src/Blocks/custom/column/components/column-options.js +579 -0
- package/blocks/init/src/Blocks/custom/column/manifest.json +625 -0
- package/blocks/init/src/Blocks/custom/columns/columns-block.js +20 -0
- package/blocks/init/src/Blocks/custom/columns/columns.php +21 -0
- package/blocks/init/src/Blocks/custom/columns/components/columns-editor.js +81 -0
- package/blocks/init/src/Blocks/custom/columns/components/columns-options.js +104 -0
- package/blocks/init/src/Blocks/custom/columns/manifest.json +555 -0
- package/blocks/init/src/Blocks/custom/featured-content/components/featured-content-editor.js +28 -0
- package/blocks/init/src/Blocks/custom/featured-content/components/featured-content-options.js +239 -0
- package/blocks/init/src/Blocks/custom/featured-content/featured-content-block.js +13 -0
- package/blocks/init/src/Blocks/custom/featured-content/featured-content.php +139 -0
- package/blocks/init/src/Blocks/custom/featured-content/manifest.json +131 -0
- package/blocks/init/src/Blocks/custom/featured-content/partials/cards.php +39 -0
- package/blocks/init/src/Blocks/custom/group/components/group-editor.js +8 -0
- package/blocks/init/src/Blocks/custom/group/group-block.js +14 -0
- package/blocks/init/src/Blocks/custom/group/group.php +10 -0
- package/blocks/init/src/Blocks/custom/group/manifest.json +32 -0
- package/blocks/init/src/Blocks/custom/heading/components/heading-editor.js +15 -0
- package/blocks/init/src/Blocks/custom/heading/components/heading-options.js +38 -0
- package/blocks/init/src/Blocks/custom/heading/heading-block.js +13 -0
- package/blocks/init/src/Blocks/custom/heading/heading-transforms.js +25 -0
- package/blocks/init/src/Blocks/custom/heading/heading.php +15 -0
- package/blocks/init/src/Blocks/custom/heading/manifest.json +79 -0
- package/blocks/init/src/Blocks/custom/hero/components/hero-editor.js +12 -0
- package/blocks/init/src/Blocks/custom/hero/components/hero-options.js +14 -0
- package/blocks/init/src/Blocks/custom/hero/hero-block.js +13 -0
- package/blocks/init/src/Blocks/custom/hero/hero.php +11 -0
- package/blocks/init/src/Blocks/custom/hero/manifest.json +17 -0
- package/blocks/init/src/Blocks/custom/image/components/image-editor.js +12 -0
- package/blocks/init/src/Blocks/custom/image/components/image-options.js +14 -0
- package/blocks/init/src/Blocks/custom/image/image-block.js +13 -0
- package/blocks/init/src/Blocks/custom/image/image.php +11 -0
- package/blocks/init/src/Blocks/custom/image/manifest.json +105 -0
- package/blocks/init/src/Blocks/custom/list/components/list-editor.js +14 -0
- package/blocks/init/src/Blocks/custom/list/components/list-options.js +39 -0
- package/blocks/init/src/Blocks/custom/list/list-block.js +13 -0
- package/blocks/init/src/Blocks/custom/list/list.php +15 -0
- package/blocks/init/src/Blocks/custom/list/manifest.json +58 -0
- package/blocks/init/src/Blocks/custom/map/assets/index.js +20 -0
- package/blocks/init/src/Blocks/custom/map/assets/map-controller.js +42 -0
- package/blocks/init/src/Blocks/custom/map/assets/utils.js +161 -0
- package/blocks/init/src/Blocks/custom/map/components/map-components.js +403 -0
- package/blocks/init/src/Blocks/custom/map/components/map-editor.js +56 -0
- package/blocks/init/src/Blocks/custom/map/components/map-options.js +557 -0
- package/blocks/init/src/Blocks/custom/map/manifest.json +79 -0
- package/blocks/init/src/Blocks/custom/map/map-block.js +13 -0
- package/blocks/init/src/Blocks/custom/map/map.php +52 -0
- package/blocks/init/src/Blocks/custom/map/styles.css +2 -0
- package/blocks/init/src/Blocks/custom/modal/components/modal-editor.js +90 -0
- package/blocks/init/src/Blocks/custom/modal/manifest.json +51 -0
- package/blocks/init/src/Blocks/custom/modal/modal-block.js +14 -0
- package/blocks/init/src/Blocks/custom/modal/modal.php +20 -0
- package/blocks/init/src/Blocks/custom/paragraph/components/paragraph-editor.js +41 -0
- package/blocks/init/src/Blocks/custom/paragraph/components/paragraph-options.js +38 -0
- package/blocks/init/src/Blocks/custom/paragraph/manifest.json +79 -0
- package/blocks/init/src/Blocks/custom/paragraph/paragraph-block.js +13 -0
- package/blocks/init/src/Blocks/custom/paragraph/paragraph-transforms.js +45 -0
- package/blocks/init/src/Blocks/custom/paragraph/paragraph.php +15 -0
- package/blocks/init/src/Blocks/custom/quote/components/quote-editor.js +12 -0
- package/blocks/init/src/Blocks/custom/quote/components/quote-options.js +14 -0
- package/blocks/init/src/Blocks/custom/quote/manifest.json +17 -0
- package/blocks/init/src/Blocks/custom/quote/quote-block.js +13 -0
- package/blocks/init/src/Blocks/custom/quote/quote.php +13 -0
- package/blocks/init/src/Blocks/custom/share/components/share-editor.js +6 -0
- package/blocks/init/src/Blocks/custom/share/components/share-options.js +12 -0
- package/blocks/init/src/Blocks/custom/share/manifest.json +19 -0
- package/blocks/init/src/Blocks/custom/share/share-block.js +13 -0
- package/blocks/init/src/Blocks/custom/share/share.php +11 -0
- package/blocks/init/src/Blocks/custom/site-footer/components/site-footer-editor.js +57 -0
- package/blocks/init/src/Blocks/custom/site-footer/components/site-footer-options.js +106 -0
- package/blocks/init/src/Blocks/custom/site-footer/manifest.json +73 -0
- package/blocks/init/src/Blocks/custom/site-footer/site-footer-block.js +13 -0
- package/blocks/init/src/Blocks/custom/site-footer/site-footer.php +72 -0
- package/blocks/init/src/Blocks/custom/site-navigation/assets/index.js +9 -0
- package/blocks/init/src/Blocks/custom/site-navigation/components/site-navigation-editor.js +42 -0
- package/blocks/init/src/Blocks/custom/site-navigation/components/site-navigation-options.js +73 -0
- package/blocks/init/src/Blocks/custom/site-navigation/manifest.json +77 -0
- package/blocks/init/src/Blocks/custom/site-navigation/site-navigation-block.js +13 -0
- package/blocks/init/src/Blocks/custom/site-navigation/site-navigation.php +99 -0
- package/blocks/init/src/Blocks/custom/table-of-contents/assets/index.js +58 -0
- package/blocks/init/src/Blocks/custom/table-of-contents/components/table-of-contents-editor.js +38 -0
- package/blocks/init/src/Blocks/custom/table-of-contents/components/table-of-contents-options.js +32 -0
- package/blocks/init/src/Blocks/custom/table-of-contents/manifest.json +48 -0
- package/blocks/init/src/Blocks/custom/table-of-contents/table-of-contents-block.js +13 -0
- package/blocks/init/src/Blocks/custom/table-of-contents/table-of-contents.php +31 -0
- package/blocks/init/src/Blocks/custom/video/components/video-editor.js +6 -0
- package/blocks/init/src/Blocks/custom/video/components/video-options.js +12 -0
- package/blocks/init/src/Blocks/custom/video/manifest.json +105 -0
- package/blocks/init/src/Blocks/custom/video/video-block.js +13 -0
- package/blocks/init/src/Blocks/custom/video/video.php +22 -0
- package/blocks/init/src/Blocks/manifest.json +14 -0
- package/blocks/init/src/Blocks/variations/card-simple/manifest.json +17 -0
- package/blocks/init/src/Blocks/wrapper/components/wrapper-editor.js +12 -0
- package/blocks/init/src/Blocks/wrapper/components/wrapper-options.js +348 -0
- package/blocks/init/src/Blocks/wrapper/manifest.json +450 -0
- package/blocks/init/src/Blocks/wrapper/styles-editor.css +13 -0
- package/blocks/init/src/Blocks/wrapper/styles.css +19 -0
- package/blocks/init/src/Blocks/wrapper/wrapper.js +30 -0
- package/blocks/init/src/Blocks/wrapper/wrapper.php +34 -0
- package/eslint.config.mjs +3 -0
- package/linters/base.config.mjs +81 -0
- package/linters/eslint.config.mjs +4 -0
- package/linters/ignore-gitignored.mjs +9 -0
- package/linters/stylelint.config.js +146 -0
- package/package.json +93 -0
- package/readme/packages.md +74 -0
- package/schemas/block.json +302 -0
- package/schemas/component.json +240 -0
- package/schemas/globalManifest.json +73 -0
- package/schemas/variation.json +83 -0
- package/scripts/components/block-inserter.js +70 -0
- package/scripts/components/file-picker.js +243 -0
- package/scripts/components/index.js +6 -0
- package/scripts/components/link-section-editor.js +319 -0
- package/scripts/components/media-picker.js +86 -0
- package/scripts/components/server-side-render.js +37 -0
- package/scripts/components/settings/settings.js +48 -0
- package/scripts/components/settings/use-theme-options.js +52 -0
- package/scripts/editor/attributes.js +304 -0
- package/scripts/editor/colors.js +64 -0
- package/scripts/editor/editor.js +139 -0
- package/scripts/editor/fetch.js +102 -0
- package/scripts/editor/hooks.js +44 -0
- package/scripts/editor/index.js +11 -0
- package/scripts/editor/options.js +152 -0
- package/scripts/editor/registration.js +901 -0
- package/scripts/editor/store.js +213 -0
- package/scripts/editor/tailwindcss.js +224 -0
- package/scripts/editor/utility.js +47 -0
- package/scripts/helpers/breakpoints.js +48 -0
- package/scripts/helpers/cookies.js +65 -0
- package/scripts/helpers/dynamic-import.js +19 -0
- package/scripts/helpers/index.js +11 -0
- package/scripts/index.js +22 -0
- package/scripts/plugins/index.js +3 -0
- package/scripts/plugins/yoast-seo.js +70 -0
- package/webpack/base.mjs +138 -0
- package/webpack/helpers.mjs +67 -0
- package/webpack/index.mjs +52 -0
- package/webpack/production.mjs +60 -0
- package/webpack/project.mjs +55 -0
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/infinum/eightshift-frontend-libs-tailwind/main/schemas/component.json",
|
|
3
|
+
"componentName": "wrapper",
|
|
4
|
+
"title": "Wrapper",
|
|
5
|
+
"componentClass": "wrapper",
|
|
6
|
+
"example": {
|
|
7
|
+
"attributes": {
|
|
8
|
+
"wrapperId": "This a custom ID",
|
|
9
|
+
"wrapperBgColorType": "project",
|
|
10
|
+
"wrapperBgColorProject": "white",
|
|
11
|
+
"wrapperUse": true,
|
|
12
|
+
"wrapperSimple": false,
|
|
13
|
+
"wrapperUseShowControl": true,
|
|
14
|
+
"wrapperNoControls": false,
|
|
15
|
+
"wrapperParentClass": "",
|
|
16
|
+
"wrapperWidthLarge": 12,
|
|
17
|
+
"wrapperOffsetLarge": 1,
|
|
18
|
+
"wrapperHideLarge": false,
|
|
19
|
+
"wrapperIsFullWidthLarge": true,
|
|
20
|
+
"wrapperSpacingTopLarge": 1,
|
|
21
|
+
"wrapperSpacingBottomLarge": 1,
|
|
22
|
+
"wrapperSpacingTopInLarge": 1,
|
|
23
|
+
"wrapperDividerTopLarge": true,
|
|
24
|
+
"wrapperDividerColor": "black"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"attributes": {
|
|
28
|
+
"wrapperUse": {
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"default": true
|
|
31
|
+
},
|
|
32
|
+
"wrapperNoControls": {
|
|
33
|
+
"type": "boolean",
|
|
34
|
+
"default": false
|
|
35
|
+
},
|
|
36
|
+
"wrapperNoWidthControls": {
|
|
37
|
+
"type": "boolean",
|
|
38
|
+
"default": false
|
|
39
|
+
},
|
|
40
|
+
"wrapperWidth": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"default": "contained"
|
|
43
|
+
},
|
|
44
|
+
"wrapperBackground": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"default": "none"
|
|
47
|
+
},
|
|
48
|
+
"wrapperGradientDirection": {
|
|
49
|
+
"type": "string"
|
|
50
|
+
},
|
|
51
|
+
"wrapperBorderRadius": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"default": "none"
|
|
54
|
+
},
|
|
55
|
+
"wrapperHide": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"default": {
|
|
58
|
+
"_default": false,
|
|
59
|
+
"_desktopFirst": true
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"wrapperMarginTop": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"default": {
|
|
65
|
+
"_default": "none",
|
|
66
|
+
"_desktopFirst": true
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"wrapperMarginBottom": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"default": {
|
|
72
|
+
"_default": "sm",
|
|
73
|
+
"_desktopFirst": true
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"wrapperPaddingTop": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"default": {
|
|
79
|
+
"_default": "none",
|
|
80
|
+
"_desktopFirst": true
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"wrapperPaddingBottom": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"default": {
|
|
86
|
+
"_default": "none",
|
|
87
|
+
"_desktopFirst": true
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"wrapperContentWidth": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"default": {
|
|
93
|
+
"_default": "full",
|
|
94
|
+
"_desktopFirst": true
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"wrapperId": {
|
|
98
|
+
"type": "string"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"options": {
|
|
102
|
+
"wrapperWidth": [
|
|
103
|
+
{
|
|
104
|
+
"value": "off",
|
|
105
|
+
"label": "Off",
|
|
106
|
+
"endIcon": "none",
|
|
107
|
+
"separator": "below"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"value": "contained",
|
|
111
|
+
"label": "Contained",
|
|
112
|
+
"endIcon": "wrapperSimple"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"value": "contained-wide-bg",
|
|
116
|
+
"label": "Contained",
|
|
117
|
+
"subtitle": "Full-width background",
|
|
118
|
+
"endIcon": "wrapper",
|
|
119
|
+
"separator": "below"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"value": "full",
|
|
123
|
+
"label": "Full-width",
|
|
124
|
+
"endIcon": "width"
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"wrapperBackground": [
|
|
128
|
+
{
|
|
129
|
+
"value": "none",
|
|
130
|
+
"label": "None",
|
|
131
|
+
"icon": "none"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"value": "solid",
|
|
135
|
+
"label": "Color",
|
|
136
|
+
"icon": "color"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"value": "gradient",
|
|
140
|
+
"label": "Gradient",
|
|
141
|
+
"icon": "gradient"
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
"wrapperBackgroundSolid": [
|
|
145
|
+
"red-50",
|
|
146
|
+
"red-500",
|
|
147
|
+
"red-950",
|
|
148
|
+
"navy-50",
|
|
149
|
+
"navy-500",
|
|
150
|
+
"navy-950",
|
|
151
|
+
"gray-50",
|
|
152
|
+
"gray-500",
|
|
153
|
+
"gray-950"
|
|
154
|
+
],
|
|
155
|
+
"wrapperBackgroundGradient": [
|
|
156
|
+
{
|
|
157
|
+
"label": "Light gray",
|
|
158
|
+
"value": "gradient-light-gray"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"label": "Dark gray",
|
|
162
|
+
"value": "gradient-dark-gray"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"label": "Light navy",
|
|
166
|
+
"value": "gradient-light-navy"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"label": "Dark navy",
|
|
170
|
+
"value": "gradient-dark-navy"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"label": "Light red",
|
|
174
|
+
"value": "gradient-light-red"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"label": "Dark red",
|
|
178
|
+
"value": "gradient-dark-red"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"label": "Navy to red (light)",
|
|
182
|
+
"value": "gradient-navy-red-light"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"label": "Navy to red (dark)",
|
|
186
|
+
"value": "gradient-navy-red-dark"
|
|
187
|
+
}
|
|
188
|
+
],
|
|
189
|
+
"wrapperGradientDirection": [
|
|
190
|
+
{
|
|
191
|
+
"label": "To top",
|
|
192
|
+
"value": "to-t"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"label": "To top-right",
|
|
196
|
+
"value": "to-tr"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"label": "To right",
|
|
200
|
+
"value": "to-r"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"label": "To bottom-right",
|
|
204
|
+
"value": "to-br"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"label": "To bottom",
|
|
208
|
+
"value": "to-b"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"label": "To bottom-left",
|
|
212
|
+
"value": "to-bl"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"label": "To left",
|
|
216
|
+
"value": "to-l"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"label": "To top-left",
|
|
220
|
+
"value": "to-tl"
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
"wrapperBorderRadius": [
|
|
224
|
+
{
|
|
225
|
+
"label": "Square",
|
|
226
|
+
"value": "none",
|
|
227
|
+
"separator": "below"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"label": "Small",
|
|
231
|
+
"value": "sm"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"label": "Medium",
|
|
235
|
+
"value": "md"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"label": "Large",
|
|
239
|
+
"value": "lg"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"label": "Very large",
|
|
243
|
+
"value": "xl"
|
|
244
|
+
}
|
|
245
|
+
],
|
|
246
|
+
"wrapperSpacing": [
|
|
247
|
+
{
|
|
248
|
+
"label": "0",
|
|
249
|
+
"value": "none"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"label": "8",
|
|
253
|
+
"value": "xs"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"label": "16",
|
|
257
|
+
"value": "sm"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"label": "32",
|
|
261
|
+
"value": "md"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"label": "48",
|
|
265
|
+
"value": "lg"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"label": "64",
|
|
269
|
+
"value": "xl"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"label": "80",
|
|
273
|
+
"value": "2xl"
|
|
274
|
+
}
|
|
275
|
+
],
|
|
276
|
+
"wrapperHide": [
|
|
277
|
+
{
|
|
278
|
+
"label": "Visible",
|
|
279
|
+
"value": "false",
|
|
280
|
+
"icon": "visible"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"label": "Hidden",
|
|
284
|
+
"value": "true",
|
|
285
|
+
"icon": "hide"
|
|
286
|
+
}
|
|
287
|
+
],
|
|
288
|
+
"wrapperContentWidth": [
|
|
289
|
+
{
|
|
290
|
+
"label": "Full",
|
|
291
|
+
"value": "full",
|
|
292
|
+
"separator": "below"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"label": "1/2",
|
|
296
|
+
"value": "half",
|
|
297
|
+
"separator": "below"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"label": "1/3",
|
|
301
|
+
"value": "one-third"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"label": "2/3",
|
|
305
|
+
"value": "two-thirds",
|
|
306
|
+
"separator": "below"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"label": "1/4",
|
|
310
|
+
"value": "one-quarter"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"label": "3/4",
|
|
314
|
+
"value": "three-quarters",
|
|
315
|
+
"separator": "below"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"label": "Reading-optimized",
|
|
319
|
+
"value": "prose",
|
|
320
|
+
"subtitle": "65 characters per line"
|
|
321
|
+
}
|
|
322
|
+
]
|
|
323
|
+
},
|
|
324
|
+
"tailwind": {
|
|
325
|
+
"base": {
|
|
326
|
+
"twClasses": "scroll-my-24",
|
|
327
|
+
"twClassesEditor": "flow-root"
|
|
328
|
+
},
|
|
329
|
+
"options": {
|
|
330
|
+
"wrapperBackground": {
|
|
331
|
+
"twClasses": {
|
|
332
|
+
"solid-red-50": "bg-red-50",
|
|
333
|
+
"solid-red-500": "bg-red-500",
|
|
334
|
+
"solid-red-950": "bg-red-950",
|
|
335
|
+
"solid-navy-50": "bg-navy-50",
|
|
336
|
+
"solid-navy-500": "bg-navy-500",
|
|
337
|
+
"solid-navy-950": "bg-navy-950",
|
|
338
|
+
"solid-gray-50": "bg-gray-50",
|
|
339
|
+
"solid-gray-500": "bg-gray-500",
|
|
340
|
+
"solid-gray-950": "bg-gray-950",
|
|
341
|
+
"gradient-light-gray": "from-gray-50 to-gray-100",
|
|
342
|
+
"gradient-dark-gray": "from-gray-800 to-gray-950",
|
|
343
|
+
"gradient-light-navy": "from-navy-50 to-navy-100",
|
|
344
|
+
"gradient-dark-navy": "from-navy-800 to-navy-950",
|
|
345
|
+
"gradient-light-red": "from-red-50 to-red-100",
|
|
346
|
+
"gradient-dark-red": "from-red-800 to-red-950",
|
|
347
|
+
"gradient-navy-red-light": "from-red-200 to-navy-300",
|
|
348
|
+
"gradient-navy-red-dark": "from-red-700 to-navy-800"
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
"wrapperGradientDirection": {
|
|
352
|
+
"twClasses": {
|
|
353
|
+
"to-t": "bg-gradient-to-r",
|
|
354
|
+
"to-tr": "bg-gradient-to-tr",
|
|
355
|
+
"to-r": "bg-gradient-to-r",
|
|
356
|
+
"to-br": "bg-gradient-to-br",
|
|
357
|
+
"to-b": "bg-gradient-to-b",
|
|
358
|
+
"to-bl": "bg-gradient-to-bl",
|
|
359
|
+
"to-l": "bg-gradient-to-l",
|
|
360
|
+
"to-tl": "bg-gradient-to-tl"
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
"wrapperWidth": {
|
|
364
|
+
"twClasses": {
|
|
365
|
+
"contained": "wrapper-contained",
|
|
366
|
+
"contained-wide-bg": "wrapper-contained-wide",
|
|
367
|
+
"full": "wrapper-full"
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
"wrapperBorderRadius": {
|
|
371
|
+
"twClasses": {
|
|
372
|
+
"sm": "rounded",
|
|
373
|
+
"md": "rounded-md",
|
|
374
|
+
"lg": "rounded-lg",
|
|
375
|
+
"xl": "rounded-xl"
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
"wrapperHide": {
|
|
379
|
+
"responsive": true,
|
|
380
|
+
"twClasses": {
|
|
381
|
+
"true": "hidden",
|
|
382
|
+
"false": "block"
|
|
383
|
+
},
|
|
384
|
+
"twClassesEditor": {
|
|
385
|
+
"true": "opacity-25"
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
"wrapperMarginTop": {
|
|
389
|
+
"responsive": true,
|
|
390
|
+
"twClasses": {
|
|
391
|
+
"none": "mt-0",
|
|
392
|
+
"xs": "mt-2",
|
|
393
|
+
"sm": "mt-4",
|
|
394
|
+
"md": "mt-8",
|
|
395
|
+
"lg": "mt-12",
|
|
396
|
+
"xl": "mt-16",
|
|
397
|
+
"2xl": "mt-20"
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
"wrapperMarginBottom": {
|
|
401
|
+
"responsive": true,
|
|
402
|
+
"twClasses": {
|
|
403
|
+
"none": "mb-0",
|
|
404
|
+
"xs": "mb-2",
|
|
405
|
+
"sm": "mb-4",
|
|
406
|
+
"md": "mb-8",
|
|
407
|
+
"lg": "mb-12",
|
|
408
|
+
"xl": "mb-16",
|
|
409
|
+
"2xl": "mb-20"
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
"wrapperPaddingTop": {
|
|
413
|
+
"responsive": true,
|
|
414
|
+
"twClasses": {
|
|
415
|
+
"none": "pt-0",
|
|
416
|
+
"xs": "pt-2",
|
|
417
|
+
"sm": "pt-4",
|
|
418
|
+
"md": "pt-8",
|
|
419
|
+
"lg": "pt-12",
|
|
420
|
+
"xl": "pt-16",
|
|
421
|
+
"2xl": "pt-20"
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
"wrapperPaddingBottom": {
|
|
425
|
+
"responsive": true,
|
|
426
|
+
"twClasses": {
|
|
427
|
+
"none": "pb-0",
|
|
428
|
+
"xs": "pb-2",
|
|
429
|
+
"sm": "pb-4",
|
|
430
|
+
"md": "pb-8",
|
|
431
|
+
"lg": "pb-12",
|
|
432
|
+
"xl": "pb-16",
|
|
433
|
+
"2xl": "pb-20"
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
"wrapperContentWidth": {
|
|
437
|
+
"responsive": true,
|
|
438
|
+
"twClasses": {
|
|
439
|
+
"full": "w-full",
|
|
440
|
+
"half": "w-1/2",
|
|
441
|
+
"one-third": "w-1/3",
|
|
442
|
+
"two-thirds": "w-3/4",
|
|
443
|
+
"one-quarter": "w-1/4",
|
|
444
|
+
"three-quarters": "w-3/4",
|
|
445
|
+
"prose": "w-full max-w-4xl"
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.is-root-container.wp-block-post-content.block-editor-block-list__layout {
|
|
2
|
+
@apply pt-10;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
/* stylelint-disable-next-line selector-max-specificity */
|
|
6
|
+
.is-root-container.wp-block-post-content.block-editor-block-list__layout > .block-editor-block-list__block.wp-block {
|
|
7
|
+
@apply !mx-0 !mt-0 [&:not(.is-selected)]:!mb-0 sm:grid sm:grid-cols-[minmax(0,_1fr)_minmax(0,_80rem)_minmax(0,_1fr)];
|
|
8
|
+
|
|
9
|
+
/* stylelint-disable-next-line selector-max-specificity */
|
|
10
|
+
& > *:not(.wrapper-contained, .wrapper-contained-wide, .wrapper-full) {
|
|
11
|
+
@apply sm:col-start-2 col-span-1;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.wrapper-contained {
|
|
2
|
+
@apply col-start-2 col-span-1 ~sm/md:~px-8/20;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.wrapper-contained-wide {
|
|
6
|
+
@apply col-span-full ~sm/md:~px-8/20 ~sm/md:~gap-x-16/40 sm:grid sm:grid-cols-subgrid sm:*:col-start-2 sm:*:col-span-1;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.wrapper-full {
|
|
10
|
+
@apply col-span-full;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.layout-base {
|
|
14
|
+
@apply sm:grid sm:grid-cols-[minmax(0,_1fr)_minmax(0,_80rem)_minmax(0,_1fr)];
|
|
15
|
+
|
|
16
|
+
& > *:not(.wrapper-contained, .wrapper-contained-wide, .wrapper-full) {
|
|
17
|
+
@apply sm:col-start-2 col-span-1;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { InspectorControls } from '@wordpress/block-editor';
|
|
2
|
+
import { WrapperEditor } from './components/wrapper-editor';
|
|
3
|
+
import { WrapperOptions } from './components/wrapper-options';
|
|
4
|
+
|
|
5
|
+
export const Wrapper = (props) => {
|
|
6
|
+
const {
|
|
7
|
+
props: {
|
|
8
|
+
setAttributes,
|
|
9
|
+
attributes,
|
|
10
|
+
},
|
|
11
|
+
children,
|
|
12
|
+
} = props;
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<>
|
|
16
|
+
<InspectorControls>
|
|
17
|
+
<WrapperOptions
|
|
18
|
+
attributes={attributes}
|
|
19
|
+
setAttributes={setAttributes}
|
|
20
|
+
/>
|
|
21
|
+
</InspectorControls>
|
|
22
|
+
|
|
23
|
+
<WrapperEditor
|
|
24
|
+
attributes={attributes}
|
|
25
|
+
children={children}
|
|
26
|
+
setAttributes={setAttributes}
|
|
27
|
+
/>
|
|
28
|
+
</>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Wrapper 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
|
+
$wrapperUse = Helpers::checkAttr('wrapperUse', $attributes, $manifest);
|
|
14
|
+
|
|
15
|
+
if (!$wrapperUse) {
|
|
16
|
+
// phpcs:ignore Eightshift.Security.HelpersEscape.OutputNotEscaped
|
|
17
|
+
echo $renderContent;
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
$wrapperId = Helpers::checkAttr('wrapperId', $attributes, $manifest);
|
|
22
|
+
?>
|
|
23
|
+
|
|
24
|
+
<div
|
|
25
|
+
class="<?php echo esc_attr(Helpers::getTwClasses($attributes, $manifest)); ?>"
|
|
26
|
+
<?php if (!empty($wrapperId)) { ?>
|
|
27
|
+
id="<?php echo esc_attr($wrapperId); ?>"
|
|
28
|
+
<?php } ?>
|
|
29
|
+
>
|
|
30
|
+
<?php
|
|
31
|
+
// phpcs:ignore Eightshift.Security.HelpersEscape.OutputNotEscaped
|
|
32
|
+
echo $renderContent;
|
|
33
|
+
?>
|
|
34
|
+
</div>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// import react from 'eslint-plugin-react';
|
|
2
|
+
// import reactHooks from 'eslint-plugin-react-hooks';
|
|
3
|
+
import stylistic from '@stylistic/eslint-plugin-js';
|
|
4
|
+
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
|
|
5
|
+
import globals from 'globals';
|
|
6
|
+
|
|
7
|
+
export default [
|
|
8
|
+
{
|
|
9
|
+
ignores: ['**/dist/', 'public/'],
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
files: ['**/*.js', '**/*.jsx'],
|
|
13
|
+
languageOptions: {
|
|
14
|
+
parserOptions: {
|
|
15
|
+
ecmaFeatures: {
|
|
16
|
+
jsx: true,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
globals: {
|
|
20
|
+
wp: true,
|
|
21
|
+
...globals.serviceworker,
|
|
22
|
+
...globals.browser,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
plugins: {
|
|
26
|
+
// react,
|
|
27
|
+
// 'react-hooks': reactHooks,
|
|
28
|
+
'@stylistic/js': stylistic,
|
|
29
|
+
},
|
|
30
|
+
rules: {
|
|
31
|
+
'newline-before-return': 'error',
|
|
32
|
+
'no-constant-binary-expression': 'error',
|
|
33
|
+
'no-implicit-coercion': 'error',
|
|
34
|
+
'no-mixed-spaces-and-tabs': ['error', 'smart-tabs'],
|
|
35
|
+
'no-nested-ternary': 'error',
|
|
36
|
+
'no-underscore-dangle': ['error', { allowAfterThis: true }],
|
|
37
|
+
'no-void': 'error',
|
|
38
|
+
'@stylistic/js/semi': 'error',
|
|
39
|
+
'max-len': [
|
|
40
|
+
'error',
|
|
41
|
+
{
|
|
42
|
+
code: 180,
|
|
43
|
+
comments: 500,
|
|
44
|
+
ignorePattern: '^import .*',
|
|
45
|
+
ignoreStrings: true,
|
|
46
|
+
ignoreTemplateLiterals: true,
|
|
47
|
+
ignoreTrailingComments: true,
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
'padding-line-between-statements': [
|
|
51
|
+
'error',
|
|
52
|
+
{
|
|
53
|
+
blankLine: 'always',
|
|
54
|
+
prev: '*',
|
|
55
|
+
next: ['return', 'if', 'switch', 'for', 'while', 'try', 'throw'],
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
blankLine: 'any',
|
|
59
|
+
prev: ['const', 'let', 'var', 'import'],
|
|
60
|
+
next: ['const', 'let', 'var', 'import'],
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
// React-specific.
|
|
64
|
+
// Note: React rules are temporarily disabled until the plugin gets full compatibility with ESLint 9.
|
|
65
|
+
// 'consistent-return': 'warn',
|
|
66
|
+
// 'no-param-reassign': 'warn',
|
|
67
|
+
// 'react-hooks/rules-of-hooks': 'error',
|
|
68
|
+
// // 'react-hooks/exhaustive-deps': ['error', { additionalHooks: '(useSafeLayoutEffect|useUpdateEffect)' }],
|
|
69
|
+
// 'react/prop-types': ['error', { skipUndeclared: true }],
|
|
70
|
+
// 'react/react-in-jsx-scope': 'off',
|
|
71
|
+
// 'react/self-closing-comp': ['warn', { component: true, html: true }],
|
|
72
|
+
// 'react/no-unknown-property': ['error', { ignore: ['css'] }],
|
|
73
|
+
},
|
|
74
|
+
// settings: {
|
|
75
|
+
// react: {
|
|
76
|
+
// version: '18',
|
|
77
|
+
// },
|
|
78
|
+
// },
|
|
79
|
+
},
|
|
80
|
+
eslintPluginPrettierRecommended,
|
|
81
|
+
];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { includeIgnoreFile } from '@eslint/compat';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
|
|
5
|
+
const filename = fileURLToPath(import.meta.url);
|
|
6
|
+
const dirname = path.dirname(filename);
|
|
7
|
+
const gitignorePath = path.resolve(dirname, '.gitignore');
|
|
8
|
+
|
|
9
|
+
export default [includeIgnoreFile(gitignorePath)];
|