@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,146 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
plugins: [
|
|
3
|
+
'@stylistic/stylelint-plugin'
|
|
4
|
+
],
|
|
5
|
+
extends: [
|
|
6
|
+
'stylelint-config-standard',
|
|
7
|
+
],
|
|
8
|
+
rules: {
|
|
9
|
+
// Stylistic rules.
|
|
10
|
+
'@stylistic/indentation': 'tab',
|
|
11
|
+
|
|
12
|
+
'@stylistic/max-empty-lines': 2,
|
|
13
|
+
'@stylistic/max-line-length': 250,
|
|
14
|
+
|
|
15
|
+
'@stylistic/color-hex-case': 'upper',
|
|
16
|
+
|
|
17
|
+
'@stylistic/no-eol-whitespace': true,
|
|
18
|
+
|
|
19
|
+
'@stylistic/media-feature-colon-space-after': 'always',
|
|
20
|
+
'@stylistic/media-feature-colon-space-before': 'never',
|
|
21
|
+
'@stylistic/media-feature-range-operator-space-after': 'always',
|
|
22
|
+
'@stylistic/media-feature-range-operator-space-before': 'always',
|
|
23
|
+
|
|
24
|
+
'@stylistic/selector-list-comma-newline-after': 'always',
|
|
25
|
+
'@stylistic/selector-list-comma-newline-before': 'never-multi-line',
|
|
26
|
+
|
|
27
|
+
'@stylistic/block-opening-brace-newline-after': 'always',
|
|
28
|
+
'@stylistic/block-opening-brace-newline-before': 'always-single-line',
|
|
29
|
+
'@stylistic/block-opening-brace-space-before': 'always',
|
|
30
|
+
|
|
31
|
+
'@stylistic/declaration-block-semicolon-newline-after': 'always',
|
|
32
|
+
'@stylistic/declaration-block-semicolon-newline-before': 'never-multi-line',
|
|
33
|
+
'@stylistic/declaration-block-semicolon-space-after': 'always-single-line',
|
|
34
|
+
'@stylistic/declaration-block-semicolon-space-before': 'never',
|
|
35
|
+
|
|
36
|
+
'@stylistic/value-list-comma-newline-before': 'never-multi-line',
|
|
37
|
+
'@stylistic/value-list-comma-newline-after': null,
|
|
38
|
+
'@stylistic/value-list-comma-space-before': 'never',
|
|
39
|
+
'@stylistic/value-list-comma-space-after': 'always-single-line',
|
|
40
|
+
|
|
41
|
+
'@stylistic/value-list-max-empty-lines': 1,
|
|
42
|
+
|
|
43
|
+
'@stylistic/selector-combinator-space-after': 'always',
|
|
44
|
+
'@stylistic/selector-combinator-space-before': 'always',
|
|
45
|
+
|
|
46
|
+
'@stylistic/declaration-bang-space-after': 'never',
|
|
47
|
+
'@stylistic/declaration-bang-space-before': 'always',
|
|
48
|
+
'@stylistic/declaration-colon-space-before': 'never',
|
|
49
|
+
'@stylistic/declaration-colon-space-after': 'always-single-line',
|
|
50
|
+
'@stylistic/declaration-colon-newline-after': null,
|
|
51
|
+
|
|
52
|
+
'@stylistic/declaration-block-trailing-semicolon': 'always',
|
|
53
|
+
|
|
54
|
+
'@stylistic/function-comma-space-after': 'always',
|
|
55
|
+
'@stylistic/function-comma-space-before': 'never',
|
|
56
|
+
|
|
57
|
+
'@stylistic/number-leading-zero': 'always',
|
|
58
|
+
'@stylistic/number-no-trailing-zeros': true,
|
|
59
|
+
|
|
60
|
+
'@stylistic/string-quotes': 'single',
|
|
61
|
+
|
|
62
|
+
'@stylistic/block-closing-brace-newline-after': 'always',
|
|
63
|
+
'@stylistic/block-closing-brace-newline-before': 'always',
|
|
64
|
+
|
|
65
|
+
'@stylistic/function-parentheses-newline-inside': 'never-multi-line',
|
|
66
|
+
'@stylistic/function-parentheses-space-inside': 'never',
|
|
67
|
+
|
|
68
|
+
'@stylistic/function-whitespace-after': 'always',
|
|
69
|
+
|
|
70
|
+
// Standard rules.
|
|
71
|
+
'comment-empty-line-before': [
|
|
72
|
+
'always', {
|
|
73
|
+
ignore: ['stylelint-commands', 'after-comment'],
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
|
|
77
|
+
'rule-empty-line-before': [
|
|
78
|
+
'always', {
|
|
79
|
+
except: ['first-nested'],
|
|
80
|
+
ignore: ['after-comment'],
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
'alpha-value-notation': 'number',
|
|
84
|
+
|
|
85
|
+
'color-hex-length': 'long',
|
|
86
|
+
'color-named': null,
|
|
87
|
+
'color-no-invalid-hex': true,
|
|
88
|
+
'color-function-notation': null,
|
|
89
|
+
|
|
90
|
+
'font-family-name-quotes': 'always-unless-keyword',
|
|
91
|
+
|
|
92
|
+
'font-weight-notation': 'named-where-possible',
|
|
93
|
+
|
|
94
|
+
'function-calc-no-unspaced-operator': true,
|
|
95
|
+
'function-linear-gradient-no-nonstandard-direction': true,
|
|
96
|
+
'function-url-quotes': 'always',
|
|
97
|
+
|
|
98
|
+
'number-max-precision': 5,
|
|
99
|
+
'length-zero-no-unit': true,
|
|
100
|
+
|
|
101
|
+
'string-no-newline': true,
|
|
102
|
+
'unit-no-unknown': true,
|
|
103
|
+
|
|
104
|
+
'value-no-vendor-prefix': true,
|
|
105
|
+
'value-keyword-case': null,
|
|
106
|
+
|
|
107
|
+
'property-no-vendor-prefix': true,
|
|
108
|
+
|
|
109
|
+
'declaration-empty-line-before': null,
|
|
110
|
+
'declaration-no-important': true,
|
|
111
|
+
|
|
112
|
+
'declaration-block-no-duplicate-properties': true,
|
|
113
|
+
'declaration-block-no-shorthand-property-overrides': true,
|
|
114
|
+
'declaration-block-single-line-max-declarations': 1,
|
|
115
|
+
"declaration-block-no-redundant-longhand-properties": [
|
|
116
|
+
true,
|
|
117
|
+
{
|
|
118
|
+
"ignoreShorthands": [
|
|
119
|
+
"grid-template"
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
|
|
124
|
+
'block-no-empty': true,
|
|
125
|
+
|
|
126
|
+
'selector-max-specificity': '0,4,0',
|
|
127
|
+
'selector-no-vendor-prefix': true,
|
|
128
|
+
'selector-pseudo-element-colon-notation': 'double',
|
|
129
|
+
|
|
130
|
+
'media-feature-name-no-vendor-prefix': true,
|
|
131
|
+
|
|
132
|
+
'at-rule-no-vendor-prefix': true,
|
|
133
|
+
|
|
134
|
+
'comment-whitespace-inside': 'always',
|
|
135
|
+
|
|
136
|
+
'max-nesting-depth': 3,
|
|
137
|
+
'no-duplicate-selectors': true,
|
|
138
|
+
'no-unknown-animations': true,
|
|
139
|
+
|
|
140
|
+
'keyframes-name-pattern': null,
|
|
141
|
+
'selector-class-pattern': null,
|
|
142
|
+
'no-descending-specificity': null,
|
|
143
|
+
|
|
144
|
+
'import-notation': null,
|
|
145
|
+
},
|
|
146
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@eightshift/frontend-libs-tailwind",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A framework for creating modern Gutenberg themes with styling provided by Tailwind CSS.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Eightshift team",
|
|
7
|
+
"email": "team@eightshift.com",
|
|
8
|
+
"url": "https://eightshift.com/"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/infinum/eightshift-frontend-libs-tailwind.git"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"frontend",
|
|
16
|
+
"css",
|
|
17
|
+
"mixin",
|
|
18
|
+
"js",
|
|
19
|
+
"utility",
|
|
20
|
+
"module",
|
|
21
|
+
"WordPress",
|
|
22
|
+
"tailwind",
|
|
23
|
+
"TailwindCSS"
|
|
24
|
+
],
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/infinum/eightshift-frontend-libs-tailwind/issues"
|
|
27
|
+
},
|
|
28
|
+
"homepage": "https://github.com/infinum/eightshift-frontend-libs-tailwind#readme",
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@eightshift/ui-components": "^1.1.2",
|
|
32
|
+
"@eslint/compat": "^1.1.0",
|
|
33
|
+
"@stylistic/eslint-plugin-js": "^2.3.0",
|
|
34
|
+
"@stylistic/stylelint-plugin": "^2.1.2",
|
|
35
|
+
"@swc/core": "^1.6.5",
|
|
36
|
+
"@wordpress/api-fetch": "^7.2.0",
|
|
37
|
+
"@wordpress/block-editor": "^13.2.0",
|
|
38
|
+
"@wordpress/dependency-extraction-webpack-plugin": "^5.9.0",
|
|
39
|
+
"@wordpress/dom-ready": "^4.2.0",
|
|
40
|
+
"@wordpress/server-side-render": "^5.2.0",
|
|
41
|
+
"browserslist": "^4.23.1",
|
|
42
|
+
"css-loader": "^7.1.2",
|
|
43
|
+
"css-minimizer-webpack-plugin": "^7.0.0",
|
|
44
|
+
"eslint": "^9.6.0",
|
|
45
|
+
"eslint-config-prettier": "^9.1.0",
|
|
46
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
47
|
+
"file-loader": "^6.2.0",
|
|
48
|
+
"globals": "^15.6.0",
|
|
49
|
+
"husky": "^9.0.11",
|
|
50
|
+
"lightningcss": "^1.25.1",
|
|
51
|
+
"mini-css-extract-plugin": "^2.9.0",
|
|
52
|
+
"postcss": "^8.4.38",
|
|
53
|
+
"postcss-loader": "^8.1.1",
|
|
54
|
+
"prettier": "^3.3.2",
|
|
55
|
+
"prettier-plugin-tailwindcss": "^0.6.5",
|
|
56
|
+
"sonner": "^1.5.0",
|
|
57
|
+
"stylelint": "^16.6.1",
|
|
58
|
+
"stylelint-config-standard": "^36.0.1",
|
|
59
|
+
"swc-loader": "^0.2.6",
|
|
60
|
+
"terser-webpack-plugin": "^5.3.10",
|
|
61
|
+
"webpack": "^5.92.1",
|
|
62
|
+
"webpack-cli": "^5.1.4",
|
|
63
|
+
"webpack-manifest-plugin": "^5.0.0",
|
|
64
|
+
"webpack-merge": "^5.10.0"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"embla-carousel": "^8.1.5",
|
|
68
|
+
"fluid-tailwind": "^1.0.2",
|
|
69
|
+
"lint-staged": "^15.2.7",
|
|
70
|
+
"micromodal": "^0.4.10",
|
|
71
|
+
"ol": "^9.2.4",
|
|
72
|
+
"ol-mapbox-style": "^12.3.4",
|
|
73
|
+
"tailwindcss": "^3.4.4",
|
|
74
|
+
"tailwindcss-animate": "^1.0.7"
|
|
75
|
+
},
|
|
76
|
+
"sideEffects": false,
|
|
77
|
+
"lint-staged": {
|
|
78
|
+
"*.css": [
|
|
79
|
+
"npm run lintStyle"
|
|
80
|
+
],
|
|
81
|
+
"*.js": [
|
|
82
|
+
"npm run lintJs --ignore-pattern node_modules"
|
|
83
|
+
],
|
|
84
|
+
"*.php": [
|
|
85
|
+
"composer test"
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
"scripts": {
|
|
89
|
+
"lintStyle": "stylelint **/*.css",
|
|
90
|
+
"lintJs": "npx eslint",
|
|
91
|
+
"lint": "npm run lintJs && npm run lintStyle"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Packages readme
|
|
2
|
+
|
|
3
|
+
This is a document explaining what each `package.json` package is used for.
|
|
4
|
+
|
|
5
|
+
## Dependencies
|
|
6
|
+
|
|
7
|
+
* @babel/cli - Adds terminal commands for babel.
|
|
8
|
+
* @babel/core - Main Babel core package.
|
|
9
|
+
* @babel/eslint-parser - JS Parser for babel.
|
|
10
|
+
* @babel/eslint-plugin - JS Parser for babel plugin.
|
|
11
|
+
* @dnd-kit/core - Modern helper for creating re-orderable react components
|
|
12
|
+
* @dnd-kit/modifiers - Modern helper for creating re-orderable react components
|
|
13
|
+
* @dnd-kit/sortable - Modern helper for creating re-orderable react components
|
|
14
|
+
* @dnd-kit/utilities - Modern helper for creating re-orderable react components
|
|
15
|
+
* @infinumjs/eslint-config-react-js - Adds JS linter config.
|
|
16
|
+
* @swc/core - loader swc for faster build times.
|
|
17
|
+
* @wordpress/api-fetch - WP package for api fetch.
|
|
18
|
+
* @wordpress/dependency-extraction-webpack-plugin - Allows Webpack to read all @wordpress packages as external dependency.
|
|
19
|
+
* @wordpress/dom-ready - WP package to load JS when dom is ready.
|
|
20
|
+
* @wordpress/icons - WP icons package.
|
|
21
|
+
* autoprefixer - Package for adding vendor prefix depending on your browserlist.
|
|
22
|
+
* babel-loader - Loader used for Webpack.
|
|
23
|
+
* browser-sync - Browser sync.
|
|
24
|
+
* browser-sync-webpack-plugin - Browser sync plugin for Webpack.
|
|
25
|
+
* classnames - Classnames package used in view components.
|
|
26
|
+
* clean-webpack-plugin - Webpack plugin used to delete build folder.
|
|
27
|
+
* core-js - Latest core Js to use in babel.
|
|
28
|
+
* css-loader - Webpack loader user for css.
|
|
29
|
+
* css-minimizer-webpack-plugin - Webpack plugin used to minimize output.
|
|
30
|
+
* eslint - Package used for linting JS.
|
|
31
|
+
* eslint-plugin-jsx-a11y - Package used for linting JS.
|
|
32
|
+
* eslint-plugin-react - Package used for linting JS.
|
|
33
|
+
* eslint-plugin-react-hooks - Package used for linting JS.
|
|
34
|
+
* file-loader - Webpack loaded used for images and files.
|
|
35
|
+
* husky - Package used for linting code on git commands.
|
|
36
|
+
* import-glob - Webpack loader used for putting regex in css import.
|
|
37
|
+
* media-blender - Package used for providing media queries.
|
|
38
|
+
* mini-css-extract-plugin - Webpack plugin extracts CSS into separate files.
|
|
39
|
+
* postcss - package for getting postcss options.
|
|
40
|
+
* postcss-loader - Webpack loader used for postcss.
|
|
41
|
+
* postcss-scss - package for parsing scss used for style linter.
|
|
42
|
+
* promisify-child-process - Async child process library used in project setup.
|
|
43
|
+
* raw-loader - Webpack loader used for files.
|
|
44
|
+
* rc-slider - React slider component used in our components.
|
|
45
|
+
* rc-tooltip - React tooltip component used in our components.
|
|
46
|
+
* react-select - Select component for React.
|
|
47
|
+
* regenerator-runtime - Used for Core-js polyfill.
|
|
48
|
+
* sass - A pure JavaScript implementation of Sass
|
|
49
|
+
* sass-loader - Webpack loader used for sass.
|
|
50
|
+
* storybook - Storybook library used in projects.
|
|
51
|
+
* style-loader - Webpack loader used for styles.
|
|
52
|
+
* stylelint - Css linter.
|
|
53
|
+
* stylelint-config-standard-scss - Css linter for scss type.
|
|
54
|
+
* terser-webpack-plugin - Webpack plugin used for minimization.
|
|
55
|
+
* webpack - Webpack library.
|
|
56
|
+
* webpack-cli - Webpack cli library.
|
|
57
|
+
* webpack-manifest-plugin - Webpack plugin used for outputting manifest.json.
|
|
58
|
+
* webpack-merge - Webpack utility for merging multiple webpack files.
|
|
59
|
+
|
|
60
|
+
## Dev dependencies
|
|
61
|
+
|
|
62
|
+
* @babel/preset-env - Is a smart preset that allows you to use the latest JavaScript without needing to micromanage.
|
|
63
|
+
* @babel/preset-react - Babel preset for React.
|
|
64
|
+
* @eightshift/storybook - Our storybook used for frontend libs.
|
|
65
|
+
* chalk - Terminal coloring library. Used in project setup.
|
|
66
|
+
* del - Terminal delete library. Used in project setup.
|
|
67
|
+
* gh-pages - Terminal GH pages lib for deployment to GH pages.
|
|
68
|
+
* micromodal - Modal component used in the project here only for storybook.
|
|
69
|
+
* ol - Map component used in the project here only for storybook.
|
|
70
|
+
* ol-mapbox-style - Map component used in the project here only for storybook.
|
|
71
|
+
* react-test-renderer - This package provides an experimental React renderer that can be used to render React components to pure JavaScript objects.
|
|
72
|
+
* replace-in-file - A simple utility to quickly replace text in one or more files or globs.
|
|
73
|
+
* sassdoc - Sass docs library.
|
|
74
|
+
* swiper - Swiper component used in the project here only for storybook.
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "JSON schema for Eightshift blocks",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"$schema": {
|
|
7
|
+
"type": "string"
|
|
8
|
+
},
|
|
9
|
+
"active": {
|
|
10
|
+
"type": "boolean",
|
|
11
|
+
"description": "Set to 'false' if you don't want the block to be registered.",
|
|
12
|
+
"default": true
|
|
13
|
+
},
|
|
14
|
+
"blockName": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"pattern": "^[^\/][a-z0-9-]*$",
|
|
17
|
+
"description": "Block name. Should be unique!"
|
|
18
|
+
},
|
|
19
|
+
"title": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "Name of the block, shown in the Inserter, Sidebar, ..."
|
|
22
|
+
},
|
|
23
|
+
"category": {
|
|
24
|
+
"description": "To improve user experience, you can categorize blocks. The default category is 'eightshift', more can be added with hooks in 'src/Blocks/Blocks.php'.",
|
|
25
|
+
"anyOf": [
|
|
26
|
+
{
|
|
27
|
+
"type": "string"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"enum": [
|
|
31
|
+
"text",
|
|
32
|
+
"media",
|
|
33
|
+
"design",
|
|
34
|
+
"widgets",
|
|
35
|
+
"theme",
|
|
36
|
+
"embed"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"default": "eightshift"
|
|
41
|
+
},
|
|
42
|
+
"parent": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"description": "If set, this block will only be available within the provided block. For example, if a 'Columns' block can only have 'Column' blocks as children, set 'parent' to '<namespace>/columns' in the 'Column' block manifest.",
|
|
45
|
+
"items": {
|
|
46
|
+
"type": "string"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"icon": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"description": "Icon to identify the block, shown in various places within the Block editor.",
|
|
52
|
+
"properties": {
|
|
53
|
+
"background": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"description": "Block icon background color. If not set, value from Global manifest is used."
|
|
56
|
+
},
|
|
57
|
+
"foreground": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"description": "Block icon color. If not set, value from Global manifest is used."
|
|
60
|
+
},
|
|
61
|
+
"src": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"description": "Icon source, can be either Eightshift icons ('es-' prefix), SVG strings, or Dashicon name."
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"additionalProperties": false
|
|
67
|
+
},
|
|
68
|
+
"description": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"description": "A short description of the block, shown in a couple of places in the Block editor, e.g. options sidebar."
|
|
71
|
+
},
|
|
72
|
+
"keywords": {
|
|
73
|
+
"type": "array",
|
|
74
|
+
"description": "Additional keywords to help users find the block. Keywords are used when searching for blocks.",
|
|
75
|
+
"items": {
|
|
76
|
+
"type": "string"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"attributes": {
|
|
80
|
+
"type": "object",
|
|
81
|
+
"description": "Source of truth for data used within the block. Check https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/ for more details.",
|
|
82
|
+
"patternProperties": {
|
|
83
|
+
"[a-zA-Z]": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"properties": {
|
|
86
|
+
"type": {
|
|
87
|
+
"description": "The type indicates the type of data that is stored by the attribute. It does not indicate where the data is stored, which is defined by the source field.\n\nA type is required, unless an enum is provided. A type can be used with an enum.\n\nNote that the validity of an object is determined by your source. For an example, see the query details below.",
|
|
88
|
+
"oneOf": [
|
|
89
|
+
{
|
|
90
|
+
"type": "string",
|
|
91
|
+
"enum": [
|
|
92
|
+
"null",
|
|
93
|
+
"boolean",
|
|
94
|
+
"object",
|
|
95
|
+
"array",
|
|
96
|
+
"string",
|
|
97
|
+
"integer",
|
|
98
|
+
"number"
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"type": "array",
|
|
103
|
+
"uniqueItems": true,
|
|
104
|
+
"items": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"enum": [
|
|
107
|
+
"null",
|
|
108
|
+
"boolean",
|
|
109
|
+
"object",
|
|
110
|
+
"array",
|
|
111
|
+
"string",
|
|
112
|
+
"integer",
|
|
113
|
+
"number"
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
"enum": {
|
|
120
|
+
"type": "array",
|
|
121
|
+
"description": "An attribute can be defined as one of a fixed set of values. This is specified by an enum, which contains an array of allowed values:",
|
|
122
|
+
"items": {
|
|
123
|
+
"oneOf": [
|
|
124
|
+
{
|
|
125
|
+
"type": "boolean"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"type": "number"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"type": "string"
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"source": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"description": "Attribute sources are used to define how the attribute values are extracted from saved post content. They provide a mechanism to map from the saved markup to a JavaScript representation of a block.",
|
|
139
|
+
"enum": [
|
|
140
|
+
"attribute"
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
"attribute": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"description": "Use an attribute source to extract the value from an attribute in the markup. The attribute is specified by the attribute field, which must be supplied.\n\nExample: Extract the src attribute from an image found in the block's markup."
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"required": [
|
|
149
|
+
"type"
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"additionalProperties": false
|
|
154
|
+
},
|
|
155
|
+
"example": {
|
|
156
|
+
"type": "object",
|
|
157
|
+
"description": "Data for the block preview, shown in the Inserter when hovering over block names.",
|
|
158
|
+
"properties": {
|
|
159
|
+
"attributes": {
|
|
160
|
+
"type": "object",
|
|
161
|
+
"description": "Set the attribues for the block example"
|
|
162
|
+
},
|
|
163
|
+
"innerBlocks": {
|
|
164
|
+
"type": "array",
|
|
165
|
+
"description": "Set the inner blocks that should be used within the block example. The blocks should be defined as a nested array like this: \n\n [ [ 'core/heading', { content: 'This is an Example' }, [] ] ]\n\n Where each block itself is an array that contains the block name, the block attributes, and the blocks inner blocks."
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"hasInnerBlocks": {
|
|
170
|
+
"type": "boolean",
|
|
171
|
+
"description": "Set to 'true' if the block needs to support 'InnerBlocks'. You can then use '$renderContent' in the PHP view file to render the inner blocks.",
|
|
172
|
+
"default": false
|
|
173
|
+
},
|
|
174
|
+
"components": {
|
|
175
|
+
"type": "object",
|
|
176
|
+
"description": "Defines components used within the block. Component attributes can be used with the 'props' function. Check https://eightshift.com/docs/basics/blocks-component-in-block/ for more info."
|
|
177
|
+
},
|
|
178
|
+
"options": {
|
|
179
|
+
"type": "object",
|
|
180
|
+
"description": "Defines common option definitions for attributes. Check https://eightshift.com/docs/basics/blocks-component-in-block/ for more info."
|
|
181
|
+
},
|
|
182
|
+
"tailwind": {
|
|
183
|
+
"type": "object",
|
|
184
|
+
"description": "Defines shared Tailwind configs for the block. 'base' sets the base classes for the main part of the block. The base is augmented by 'options' and 'combinations', if set. 'parts' can be used for static/supporting parts of the block.",
|
|
185
|
+
"properties": {
|
|
186
|
+
"base": {
|
|
187
|
+
"type": "object",
|
|
188
|
+
"description": "Base classes for the main part of the block.",
|
|
189
|
+
"properties": {
|
|
190
|
+
"twClasses": {
|
|
191
|
+
"type": "string",
|
|
192
|
+
"description": "Classnames to apply."
|
|
193
|
+
},
|
|
194
|
+
"twClassesEditor": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"description": "Editor-specific classnames to apply. Overrides 'twClasses'"
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"minProperties": 1
|
|
200
|
+
},
|
|
201
|
+
"options": {
|
|
202
|
+
"type": "object",
|
|
203
|
+
"description": "Per-attribute classes, added to the base class. Key represents the attribute name.",
|
|
204
|
+
"additionalProperties": {
|
|
205
|
+
"$ref": "#/$defs/twOptionsEntry"
|
|
206
|
+
},
|
|
207
|
+
"minProperties": 1
|
|
208
|
+
},
|
|
209
|
+
"parts": {
|
|
210
|
+
"type": "object",
|
|
211
|
+
"description": "Stand-alone parts of the block, not affected by 'options' or 'combinations'. Key represents the part name.",
|
|
212
|
+
"additionalProperties": {
|
|
213
|
+
"$ref": "#/$defs/twPartEntry"
|
|
214
|
+
},
|
|
215
|
+
"minProperties": 1
|
|
216
|
+
},
|
|
217
|
+
"combinations": {
|
|
218
|
+
"type": "array",
|
|
219
|
+
"description": "Conditionally applied classes, depending on the set attribute values. Added to the base class.",
|
|
220
|
+
"items": {
|
|
221
|
+
"type": "object",
|
|
222
|
+
"properties": {
|
|
223
|
+
"attributes": {
|
|
224
|
+
"type": "object",
|
|
225
|
+
"description": "Attributes to check for the condition. Key is the attribute name, value is the attribute value (or an array of possible values) to check for.",
|
|
226
|
+
"patternProperties": {
|
|
227
|
+
"[a-zA-Z]": {
|
|
228
|
+
"anyOf": [
|
|
229
|
+
{
|
|
230
|
+
"type": "string",
|
|
231
|
+
"minLength": 1
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"type": "array",
|
|
235
|
+
"items": {
|
|
236
|
+
"type": "string",
|
|
237
|
+
"minLength": 1
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"twClasses": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"description": "Classnames to apply if all conditions match. Key is the attribute value, value is the classnames to apply."
|
|
247
|
+
},
|
|
248
|
+
"twClassesEditor": {
|
|
249
|
+
"type": "string",
|
|
250
|
+
"description": "Editor-specific classnames to apply if all conditions match. Overrides 'twClasses'. Key is the attribute value, value is the classnames to apply."
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"required": [
|
|
254
|
+
"attributes",
|
|
255
|
+
"twClasses"
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
"minLength": 1
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"minProperties": 1
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"required": [
|
|
265
|
+
"blockName",
|
|
266
|
+
"title"
|
|
267
|
+
],
|
|
268
|
+
"$defs": {
|
|
269
|
+
"twPartEntry": {
|
|
270
|
+
"type": "object",
|
|
271
|
+
"properties": {
|
|
272
|
+
"twClasses": {
|
|
273
|
+
"type": "string",
|
|
274
|
+
"description": "Classnames to apply."
|
|
275
|
+
},
|
|
276
|
+
"twClassesEditor": {
|
|
277
|
+
"type": "string",
|
|
278
|
+
"description": "Editor-specific classnames to apply. Overrides 'twClasses'."
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"twOptionsEntry": {
|
|
283
|
+
"type": "object",
|
|
284
|
+
"properties": {
|
|
285
|
+
"twClasses": {
|
|
286
|
+
"type": "object",
|
|
287
|
+
"description": "Classnames to apply. Key is the attribute value, value is the classnames to apply.",
|
|
288
|
+
"additionalProperties": {
|
|
289
|
+
"type": "string"
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"twClassesEditor": {
|
|
293
|
+
"type": "object",
|
|
294
|
+
"description": "Editor-specific classnames to apply. Overrides 'twClasses'. Key is the attribute value, value is the classnames to apply.",
|
|
295
|
+
"additionalProperties": {
|
|
296
|
+
"type": "string"
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|