@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
package/.gitattributes
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Exclude these files from release archives.
|
|
3
|
+
# This will also make them unavailable when using Composer with `--prefer-dist`.
|
|
4
|
+
# If you develop for WPCS using Composer, use `--prefer-source`.
|
|
5
|
+
# https://blog.madewithlove.be/post/gitattributes/
|
|
6
|
+
#
|
|
7
|
+
/.github export-ignore
|
|
8
|
+
/.storybook export-ignore
|
|
9
|
+
/docs export-ignore
|
|
10
|
+
/documentation export-ignore
|
|
11
|
+
/package export-ignore
|
|
12
|
+
/setup export-ignore
|
|
13
|
+
/CODE_OF_CONDUCT.md export-ignore
|
|
14
|
+
/CHANGELOG.md export-ignore=
|
|
15
|
+
/readme export-ignore
|
|
16
|
+
|
|
17
|
+
/.eslintignore export-ignore
|
|
18
|
+
/.eslintrc export-ignore
|
|
19
|
+
/.gitattributes export-ignore
|
|
20
|
+
/.gitignore export-ignore
|
|
21
|
+
/.stylelintrc export-ignore
|
|
22
|
+
/composer.json export-ignore
|
|
23
|
+
/phpcs.xml.dist export-ignore
|
|
24
|
+
|
|
25
|
+
#
|
|
26
|
+
# Auto detect text files and perform LF normalization
|
|
27
|
+
# http://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/
|
|
28
|
+
#
|
|
29
|
+
* text=auto
|
|
30
|
+
|
|
31
|
+
#
|
|
32
|
+
# The above will handle all files NOT found below
|
|
33
|
+
#
|
|
34
|
+
*.md text
|
|
35
|
+
*.php text
|
|
36
|
+
*.inc text
|
|
37
|
+
*.js text
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@infinum/wordpress-team
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Hi there! Thanks for helping out to improve Eightshift Frontend Libs Tailwind.
|
|
2
|
+
|
|
3
|
+
## Reporting an issue
|
|
4
|
+
|
|
5
|
+
If you are not sure how something works be sure to read our [documentation](https://eightshift.com/). If you found a bug in the code, please [open an issue](https://github.com/infinum/eightshift-frontend-libs-tailwind/issues) and follow the instructions in the issue template.
|
|
6
|
+
|
|
7
|
+
## Contributing patches and new features
|
|
8
|
+
|
|
9
|
+
If you found a bug and want to fix it, or you want to add some new and cool feature, [fork](https://github.com/infinum/eightshift-frontend-libs-tailwind) our repository, then create a `feature` branch from the `main` branch. For instance `feature/some-bug-fix` or `feature/some-cool-new-feature`.
|
|
10
|
+
|
|
11
|
+
Once you've coded things up, be sure you check that your code is following our [coding standards](https://github.com/infinum/eightshift-coding-standards). Also test that your code isn't breaking anything :)
|
|
12
|
+
|
|
13
|
+
Then submit a pull request to `develop` branch. Once we check everything we'll merge the changes into `main` with correct version correction (noted by the milestone flag and `future release` tag).
|
|
14
|
+
|
|
15
|
+
## Integration testing
|
|
16
|
+
|
|
17
|
+
If you want to create integration tests for your code that would be great. We will add some in due time, and they are not necessary for a PR.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: "[BUG] - "
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: iruzevic
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
Thank you for your interest in our project! If you've encountered a bug, please provide a link to a live example or a clear set of steps to reproduce it. It would also be helpful to include any relevant code or screenshots.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: "[FEATURE] - "
|
|
5
|
+
labels: feature request
|
|
6
|
+
assignees: iruzevic
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
Thank you for your interest in our project! We value your ideas and feedback. Please provide detailed information regarding your feature request.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Question
|
|
3
|
+
about: Ask us a question
|
|
4
|
+
title: "[QUESTION] - "
|
|
5
|
+
labels: question
|
|
6
|
+
assignees: iruzevic
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
Thank you for showing interest in our project. Please feel free to ask us any questions you may have. To help us assist you better, please provide a clear and concise question. For example, "How do I make this happen?”
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Description
|
|
2
|
+
|
|
3
|
+
<!--- Write in detail what you did and what issue did you fix with this PR. -->
|
|
4
|
+
|
|
5
|
+
# Screenshots / Videos
|
|
6
|
+
|
|
7
|
+
<!--- Show us what you did. -->
|
|
8
|
+
|
|
9
|
+
# Linked documentation PR
|
|
10
|
+
|
|
11
|
+
<!--- If this PR has documentation please put the link here. -->
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Continuous Integration
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- develop
|
|
7
|
+
- master
|
|
8
|
+
paths-ignore:
|
|
9
|
+
- '**.md'
|
|
10
|
+
pull_request:
|
|
11
|
+
paths-ignore:
|
|
12
|
+
- '**.md'
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
16
|
+
cancel-in-progress: true
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
lint:
|
|
20
|
+
name: Lint assets JS and CSS using Node version - ${{ matrix.node }}
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
strategy:
|
|
23
|
+
fail-fast: false
|
|
24
|
+
matrix:
|
|
25
|
+
node: [ 'latest' ]
|
|
26
|
+
steps:
|
|
27
|
+
- name: Lint assets
|
|
28
|
+
uses: infinum/eightshift-deploy-actions-public/.github/actions/lint-assets@main
|
|
29
|
+
with:
|
|
30
|
+
NODE_VERSION: ${{ matrix.node }}
|
|
31
|
+
PROJECT_PATH: '/'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
npx lint-staged
|
package/.prettierrc
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"plugins": [
|
|
3
|
+
"prettier-plugin-tailwindcss"
|
|
4
|
+
],
|
|
5
|
+
"useTabs": true,
|
|
6
|
+
"jsxSingleQuote": true,
|
|
7
|
+
"singleQuote": true,
|
|
8
|
+
"singleAttributePerLine": true,
|
|
9
|
+
"printWidth": 180,
|
|
10
|
+
"arrowParens": "always",
|
|
11
|
+
"bracketSpacing": true,
|
|
12
|
+
"semi": true,
|
|
13
|
+
"trailingComma": "all"
|
|
14
|
+
}
|
package/.stylelintrc
ADDED
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
# Change Log for the Eightshift Frontend Libs Tailwind
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/).
|
|
6
|
+
|
|
7
|
+
## [1.0.0] - 2024-06
|
|
8
|
+
|
|
9
|
+
- Initial release.
|
|
10
|
+
|
|
11
|
+
[Unreleased]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/master...HEAD
|
|
12
|
+
|
|
13
|
+
[1.0.0]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/0.0.1...1.0.0
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
|
8
|
+
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
|
9
|
+
level of experience, education, socio-economic status, nationality, personal
|
|
10
|
+
appearance, race, religion, or sexual identity and orientation.
|
|
11
|
+
|
|
12
|
+
## Our Standards
|
|
13
|
+
|
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
|
15
|
+
include:
|
|
16
|
+
|
|
17
|
+
* Using welcoming and inclusive language
|
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
|
19
|
+
* Gracefully accepting constructive criticism
|
|
20
|
+
* Focusing on what is best for the community
|
|
21
|
+
* Showing empathy towards other community members
|
|
22
|
+
|
|
23
|
+
Examples of unacceptable behavior by participants include:
|
|
24
|
+
|
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
|
26
|
+
advances
|
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
28
|
+
* Public or private harassment
|
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
|
30
|
+
address, without explicit permission
|
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
32
|
+
professional setting
|
|
33
|
+
|
|
34
|
+
## Our Responsibilities
|
|
35
|
+
|
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
|
38
|
+
response to any instances of unacceptable behavior.
|
|
39
|
+
|
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
|
44
|
+
threatening, offensive, or harmful.
|
|
45
|
+
|
|
46
|
+
## Scope
|
|
47
|
+
|
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
|
49
|
+
when an individual is representing the project or its community. Examples of
|
|
50
|
+
representing a project or community include using an official project e-mail
|
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
|
53
|
+
further defined and clarified by project maintainers.
|
|
54
|
+
|
|
55
|
+
## Enforcement
|
|
56
|
+
|
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
58
|
+
reported by contacting the project team at team@eightshift.com. All
|
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
|
63
|
+
|
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
|
66
|
+
members of the project's leadership.
|
|
67
|
+
|
|
68
|
+
## Attribution
|
|
69
|
+
|
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
|
71
|
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
|
72
|
+
|
|
73
|
+
[homepage]: https://www.contributor-covenant.org
|
|
74
|
+
|
|
75
|
+
For answers to common questions about this code of conduct, see
|
|
76
|
+
https://www.contributor-covenant.org/faq
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright Infinum
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
[](https://github.com/infinum/eightshift-frontend-libs-tailwind/)
|
|
4
|
+
[](https://github.com/infinum/eightshift-frontend-libs-tailwind/)
|
|
5
|
+
[](https://github.com/infinum/eightshift-frontend-libs-tailwind/)
|
|
6
|
+
<!-- [](https://codecov.io/gh/infinum/eightshift-frontend-libs-tailwind/) -->
|
|
7
|
+
|
|
8
|
+
# Eightshift Frontend Libs Tailwind
|
|
9
|
+
|
|
10
|
+
This library is meant to bring you the modern front-end development tools to the [Eightshift Boilerplate](https://github.com/infinum/eightshift-boilerplate) or [Eightshift Boilerplate Plugin](https://github.com/infinum/eightshift-boilerplate-plugin), but you can use it on any WordPress project.
|
|
11
|
+
|
|
12
|
+
## Documentation
|
|
13
|
+
**For the full documentation please check this [link](https://eightshift.com).**
|
|
14
|
+
|
|
15
|
+
## Who do I talk to?
|
|
16
|
+
|
|
17
|
+
If you have any questions or problems, please [open an issue](https://github.com/infinum/eightshift-frontend-libs/issues) on GitHub and we will do our best to give you a timely answer.
|
|
18
|
+
|
|
19
|
+
## Maintainers
|
|
20
|
+
Eightshift Frontend Libs Tailwind is maintained and sponsored by
|
|
21
|
+
[Eightshift](https://eightshift.com) and [Infinum](https://infinum.com).
|
|
22
|
+
|
|
23
|
+
## License
|
|
24
|
+
Eightshift Frontend Libs Tailwind [Eightshift](https://eightshift.com) and [Infinum](https://infinum.com). This is free software, and may be redistributed under the terms specified in the LICENSE file.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Main entry point for styles, scripts, and other assets used in the site frontend.
|
|
3
|
+
* Don't load Block editor-related assets here!
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// Styles.
|
|
7
|
+
import './styles/application.css';
|
|
8
|
+
|
|
9
|
+
// Scripts.
|
|
10
|
+
import './scripts/application';
|
|
11
|
+
|
|
12
|
+
// Images.
|
|
13
|
+
import './images';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme color definitions, used in the Tailwind configuration file and during registration.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import colors from 'tailwindcss/colors';
|
|
6
|
+
|
|
7
|
+
export const themeColors = {
|
|
8
|
+
transparent: 'transparent',
|
|
9
|
+
current: 'currentColor',
|
|
10
|
+
black: colors.black,
|
|
11
|
+
white: colors.white,
|
|
12
|
+
gray: colors.stone,
|
|
13
|
+
navy: {
|
|
14
|
+
50: '#eef8ff',
|
|
15
|
+
100: '#dcf0ff',
|
|
16
|
+
200: '#b2e3ff',
|
|
17
|
+
300: '#6dceff',
|
|
18
|
+
400: '#20b5ff',
|
|
19
|
+
500: '#009cff',
|
|
20
|
+
600: '#007bdf',
|
|
21
|
+
700: '#0061b4',
|
|
22
|
+
800: '#005395',
|
|
23
|
+
900: '#00447a',
|
|
24
|
+
950: '#002c54',
|
|
25
|
+
},
|
|
26
|
+
red: {
|
|
27
|
+
50: '#fff0f2',
|
|
28
|
+
100: '#ffdde1',
|
|
29
|
+
200: '#ffc1c9',
|
|
30
|
+
300: '#ff95a3',
|
|
31
|
+
400: '#ff596f',
|
|
32
|
+
500: '#ff2643',
|
|
33
|
+
600: '#fc0626',
|
|
34
|
+
700: '#c5001a',
|
|
35
|
+
800: '#af051b',
|
|
36
|
+
900: '#900c1d',
|
|
37
|
+
950: '#50000b',
|
|
38
|
+
},
|
|
39
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is the main entry point for Block Editor blocks used for the `WordPress admin editor`.
|
|
3
|
+
* This file registers styles and scripts.
|
|
4
|
+
*
|
|
5
|
+
* Usage: `WordPress admin editor`.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// Styles.
|
|
9
|
+
import './styles/tailwind.css';
|
|
10
|
+
import './styles/application-blocks-editor.css';
|
|
11
|
+
import './styles/editor/editor-overrides.css';
|
|
12
|
+
|
|
13
|
+
// Scripts.
|
|
14
|
+
import './scripts/application-blocks-editor';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is the main entry point for Block Editor blocks used for the `WordPress frontend screen`.
|
|
3
|
+
* This file registers styles and scripts.
|
|
4
|
+
*
|
|
5
|
+
* Usage: `WordPress frontend screen`.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// Styles.
|
|
9
|
+
import './styles/tailwind.css';
|
|
10
|
+
import './styles/application-blocks-frontend.css';
|
|
11
|
+
|
|
12
|
+
// Scripts.
|
|
13
|
+
import './scripts/application-blocks-frontend';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is the main entry point for Block Editor blocks used for the `WordPress frontend screen` and `WordPress admin editor`.
|
|
3
|
+
* This file registers styles and scripts.
|
|
4
|
+
*
|
|
5
|
+
* Usage: `WordPress frontend screen` and `WordPress admin editor`.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// Styles.
|
|
9
|
+
import './styles/application-blocks.css';
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is the main entry point for Block Editor blocks scripts used for the `WordPress admin editor`.
|
|
3
|
+
* This file registers blocks dynamically using `registerBlocks` helper method.
|
|
4
|
+
* File names must follow the naming convention to be able to run dynamically.
|
|
5
|
+
*
|
|
6
|
+
* `src/blocks/custom/block_name/manifest.json`.
|
|
7
|
+
* `src/blocks/custom/block_name/block_name.js`.
|
|
8
|
+
*
|
|
9
|
+
* Usage: `WordPress admin editor`.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import domReady from '@wordpress/dom-ready';
|
|
13
|
+
import { setDefaultBlockName } from '@wordpress/blocks';
|
|
14
|
+
import { select } from '@wordpress/data';
|
|
15
|
+
import { registerBlocks, registerVariations, STORE_NAME } from '@eightshift/frontend-libs-tailwind/scripts/editor';
|
|
16
|
+
import { Wrapper } from '../../wrapper/wrapper';
|
|
17
|
+
import WrapperManifest from '../../wrapper/manifest.json';
|
|
18
|
+
import globalSettingsRaw from '../../manifest.json';
|
|
19
|
+
import { themeColors } from '../../../../assets/scripts/theme-colors';
|
|
20
|
+
import { getColorData } from '@eightshift/frontend-libs-tailwind/scripts/editor/colors';
|
|
21
|
+
import { dynamicImport } from '@eightshift/frontend-libs-tailwind/scripts';
|
|
22
|
+
|
|
23
|
+
const globalSettings = {
|
|
24
|
+
...globalSettingsRaw,
|
|
25
|
+
globalVariables: {
|
|
26
|
+
...globalSettingsRaw.globalVariables,
|
|
27
|
+
colors: getColorData(themeColors),
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
registerBlocks(
|
|
32
|
+
globalSettings,
|
|
33
|
+
Wrapper,
|
|
34
|
+
WrapperManifest,
|
|
35
|
+
require.context('./../../components', true, /manifest\.json$/),
|
|
36
|
+
require.context('./../../custom', true, /manifest\.json$/),
|
|
37
|
+
require.context('./../../custom', true, /-block.js$/),
|
|
38
|
+
require.context('./../../custom', true, /-hooks.js$/),
|
|
39
|
+
require.context('./../../custom', true, /-transforms.js$/),
|
|
40
|
+
require.context('./../../custom', true, /-deprecations.js$/),
|
|
41
|
+
require.context('./../../custom', true, /-overrides.js$/),
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
registerVariations(
|
|
45
|
+
globalSettings,
|
|
46
|
+
require.context('./../../variations', true, /manifest.json$/),
|
|
47
|
+
require.context('./../../custom', true, /manifest.json$/),
|
|
48
|
+
require.context('./../../variations', true, /overrides.json$/),
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
// Import styles.
|
|
52
|
+
dynamicImport(require.context('./../../components', true, /styles.css$/));
|
|
53
|
+
dynamicImport(require.context('./../../custom', true, /styles.css$/));
|
|
54
|
+
dynamicImport(require.context('./../../wrapper', true, /styles.css$/));
|
|
55
|
+
|
|
56
|
+
dynamicImport(require.context('./../../components', true, /styles-editor.css$/));
|
|
57
|
+
dynamicImport(require.context('./../../custom', true, /styles-editor.css$/));
|
|
58
|
+
dynamicImport(require.context('./../../wrapper', true, /styles-editor.css$/));
|
|
59
|
+
|
|
60
|
+
// Change the default block to the custom paragraph.
|
|
61
|
+
// If changing this block update the blocks filter method in Blocks.php.
|
|
62
|
+
domReady(() => {
|
|
63
|
+
const namespace = select(STORE_NAME).getSettingsNamespace();
|
|
64
|
+
setDefaultBlockName(`${namespace}/paragraph`);
|
|
65
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is the main entry point for Block Editor blocks scripts used for the `WordPress frontend screen`.
|
|
3
|
+
* This file registers all blocks additional scripts dynamically using `dynamicImport` helper method.
|
|
4
|
+
* File names must follow naming convention to be able run dynamically.
|
|
5
|
+
*
|
|
6
|
+
* `src/blocks/custom/block_name/assets/index.js`.
|
|
7
|
+
*
|
|
8
|
+
* Usage: `WordPress frontend screen`.
|
|
9
|
+
*/
|
|
10
|
+
import { dynamicImport } from '@eightshift/frontend-libs-tailwind/scripts/helpers';
|
|
11
|
+
|
|
12
|
+
// Find all blocks and require assets index.js inside it.
|
|
13
|
+
dynamicImport(require.context('./../../components', true, /assets\/index\.js$/));
|
|
14
|
+
dynamicImport(require.context('./../../custom', true, /assets\/index\.js$/));
|
|
15
|
+
|
|
16
|
+
// Output all styles.
|
|
17
|
+
dynamicImport(require.context('./../../components', true, /styles.css$/));
|
|
18
|
+
dynamicImport(require.context('./../../custom', true, /styles.css$/));
|
|
19
|
+
dynamicImport(require.context('./../../wrapper', true, /styles.css$/));
|
|
20
|
+
|
|
21
|
+
// Output all frontend-only styles.
|
|
22
|
+
dynamicImport(require.context('./../../components', true, /styles-frontend.css$/));
|
|
23
|
+
dynamicImport(require.context('./../../custom', true, /styles-frontend.css$/));
|
|
24
|
+
dynamicImport(require.context('./../../wrapper', true, /styles-frontend.css$/));
|