@brilo/base-blocks 0.1.42 → 0.1.44
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/build/.tsbuildinfo +1 -1
- package/build/blocks/compare/compare-group/constants.d.ts +27 -0
- package/build/blocks/compare/compare-group/constants.d.ts.map +1 -1
- package/build/blocks/compare/compare-group/constants.js +23 -0
- package/build/blocks/compare/compare-group/edit.d.ts.map +1 -1
- package/build/blocks/compare/compare-group/edit.js +12 -7
- package/build/blocks/compare/compare-group/factory.d.ts.map +1 -1
- package/build/blocks/compare/compare-group/factory.js +10 -1
- package/build/blocks/compare/compare-group/index.d.ts +1 -1
- package/build/blocks/compare/compare-group/index.d.ts.map +1 -1
- package/build/blocks/compare/compare-group/types.d.ts +7 -1
- package/build/blocks/compare/compare-group/types.d.ts.map +1 -1
- package/build/blocks/compare/compare-item/edit.d.ts.map +1 -1
- package/build/blocks/compare/compare-item/edit.js +6 -4
- package/build/blocks/compare/compare-item/factory.d.ts.map +1 -1
- package/build/blocks/compare/compare-item/factory.js +4 -0
- package/build/blocks/compare/compare-item/types.d.ts +2 -0
- package/build/blocks/compare/compare-item/types.d.ts.map +1 -1
- package/build/blocks/compare/compare-option/types.d.ts +1 -1
- package/build/blocks/compare/compare-option/types.d.ts.map +1 -1
- package/build/blocks/core/basic-icon/buildPreviewStyle.d.ts +8 -0
- package/build/blocks/core/basic-icon/buildPreviewStyle.d.ts.map +1 -0
- package/build/blocks/core/basic-icon/buildPreviewStyle.js +22 -0
- package/build/blocks/core/basic-icon/constants.d.ts +84 -0
- package/build/blocks/core/basic-icon/constants.d.ts.map +1 -0
- package/build/blocks/core/basic-icon/constants.js +41 -0
- package/build/blocks/core/basic-icon/edit.d.ts +6 -0
- package/build/blocks/core/basic-icon/edit.d.ts.map +1 -0
- package/build/blocks/core/basic-icon/edit.js +22 -0
- package/build/blocks/core/basic-icon/factory.d.ts +5 -0
- package/build/blocks/core/basic-icon/factory.d.ts.map +1 -0
- package/build/blocks/core/basic-icon/factory.js +38 -0
- package/build/blocks/core/basic-icon/index.d.ts +5 -0
- package/build/blocks/core/basic-icon/index.d.ts.map +1 -0
- package/build/blocks/core/basic-icon/index.js +7 -0
- package/build/blocks/core/basic-icon/types.d.ts +30 -0
- package/build/blocks/core/basic-icon/types.d.ts.map +1 -0
- package/build/blocks/core/basic-icon/types.js +1 -0
- package/build/blocks/core/basic-overline/edit.d.ts.map +1 -1
- package/build/blocks/core/basic-overline/edit.js +6 -1
- package/build/blocks/core/basic-overline/factory.d.ts.map +1 -1
- package/build/blocks/core/basic-overline/factory.js +2 -0
- package/build/blocks/core/basic-overline/types.d.ts +3 -1
- package/build/blocks/core/basic-overline/types.d.ts.map +1 -1
- package/build/blocks/faq/faq-group/constants.d.ts +29 -0
- package/build/blocks/faq/faq-group/constants.d.ts.map +1 -1
- package/build/blocks/faq/faq-group/constants.js +15 -0
- package/build/blocks/faq/faq-group/edit.d.ts.map +1 -1
- package/build/blocks/faq/faq-group/edit.js +12 -5
- package/build/blocks/faq/faq-group/factory.d.ts.map +1 -1
- package/build/blocks/faq/faq-group/factory.js +35 -17
- package/build/blocks/faq/faq-group/index.d.ts +1 -1
- package/build/blocks/faq/faq-group/index.d.ts.map +1 -1
- package/build/blocks/faq/faq-group/types.d.ts +20 -1
- package/build/blocks/faq/faq-group/types.d.ts.map +1 -1
- package/build/blocks/form/form-field/edit.d.ts +1 -1
- package/build/blocks/form/form-field/edit.d.ts.map +1 -1
- package/build/blocks/form/form-field/types.d.ts +1 -1
- package/build/blocks/form/form-field/types.d.ts.map +1 -1
- package/build/blocks/gallery/gallery-item/index.d.ts +1 -1
- package/build/blocks/gallery/gallery-item/index.d.ts.map +1 -1
- package/build/blocks/groups/banner-group/index.d.ts +1 -1
- package/build/blocks/groups/banner-group/index.d.ts.map +1 -1
- package/build/blocks/groups/banner-group/types.d.ts +2 -2
- package/build/blocks/groups/banner-group/types.d.ts.map +1 -1
- package/build/blocks/groups/basic-header-group/edit.d.ts.map +1 -1
- package/build/blocks/groups/basic-header-group/edit.js +8 -3
- package/build/blocks/groups/basic-header-group/factory.js +1 -1
- package/build/blocks/groups/basic-header-group/types.d.ts +2 -0
- package/build/blocks/groups/basic-header-group/types.d.ts.map +1 -1
- package/build/blocks/groups/text-and-media-group/constants.d.ts +25 -0
- package/build/blocks/groups/text-and-media-group/constants.d.ts.map +1 -1
- package/build/blocks/groups/text-and-media-group/constants.js +10 -0
- package/build/blocks/groups/text-and-media-group/edit.d.ts.map +1 -1
- package/build/blocks/groups/text-and-media-group/edit.js +16 -9
- package/build/blocks/groups/text-and-media-group/factory.d.ts +2 -2
- package/build/blocks/groups/text-and-media-group/factory.d.ts.map +1 -1
- package/build/blocks/groups/text-and-media-group/factory.js +12 -10
- package/build/blocks/groups/text-and-media-group/types.d.ts +8 -3
- package/build/blocks/groups/text-and-media-group/types.d.ts.map +1 -1
- package/build/blocks/hero/hero-group/constants.d.ts +16 -0
- package/build/blocks/hero/hero-group/constants.d.ts.map +1 -1
- package/build/blocks/hero/hero-group/constants.js +7 -0
- package/build/blocks/hero/hero-group/edit.d.ts.map +1 -1
- package/build/blocks/hero/hero-group/edit.js +6 -5
- package/build/blocks/hero/hero-group/factory.d.ts +2 -2
- package/build/blocks/hero/hero-group/factory.d.ts.map +1 -1
- package/build/blocks/hero/hero-group/factory.js +11 -5
- package/build/blocks/hero/hero-group/types.d.ts +7 -4
- package/build/blocks/hero/hero-group/types.d.ts.map +1 -1
- package/build/blocks/hero/hero-item/edit.d.ts.map +1 -1
- package/build/blocks/hero/hero-item/edit.js +7 -2
- package/build/blocks/hero/hero-item/factory.d.ts.map +1 -1
- package/build/blocks/hero/hero-item/factory.js +1 -0
- package/build/blocks/hero/hero-item/types.d.ts +12 -2
- package/build/blocks/hero/hero-item/types.d.ts.map +1 -1
- package/build/blocks/link/link-item/factory.d.ts +1 -1
- package/build/blocks/link/link-item/factory.d.ts.map +1 -1
- package/build/blocks/map/map-group/types.d.ts +3 -3
- package/build/blocks/map/map-group/types.d.ts.map +1 -1
- package/build/blocks/newsletter/newsletter-form/types.d.ts +1 -1
- package/build/blocks/newsletter/newsletter-form/types.d.ts.map +1 -1
- package/build/blocks/person/person-group/types.d.ts +1 -1
- package/build/blocks/person/person-group/types.d.ts.map +1 -1
- package/build/blocks/person/person-item/constants.d.ts.map +1 -1
- package/build/blocks/person/person-item/types.d.ts +2 -2
- package/build/blocks/person/person-item/types.d.ts.map +1 -1
- package/build/blocks/priceplan/priceplan-group/constants.d.ts +2 -0
- package/build/blocks/priceplan/priceplan-group/constants.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-group/constants.js +1 -0
- package/build/blocks/priceplan/priceplan-group/edit.d.ts +3 -0
- package/build/blocks/priceplan/priceplan-group/edit.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-group/edit.js +16 -0
- package/build/blocks/priceplan/priceplan-group/factory.d.ts +5 -0
- package/build/blocks/priceplan/priceplan-group/factory.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-group/factory.js +20 -0
- package/build/blocks/priceplan/priceplan-group/icon.d.ts +2 -0
- package/build/blocks/priceplan/priceplan-group/icon.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-group/icon.js +2 -0
- package/build/blocks/priceplan/priceplan-group/index.d.ts +5 -0
- package/build/blocks/priceplan/priceplan-group/index.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-group/index.js +11 -0
- package/build/blocks/priceplan/priceplan-group/types.d.ts +7 -0
- package/build/blocks/priceplan/priceplan-group/types.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-group/types.js +1 -0
- package/build/blocks/priceplan/priceplan-item/constants.d.ts +15 -0
- package/build/blocks/priceplan/priceplan-item/constants.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-item/constants.js +9 -0
- package/build/blocks/priceplan/priceplan-item/edit.d.ts +6 -0
- package/build/blocks/priceplan/priceplan-item/edit.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-item/edit.js +30 -0
- package/build/blocks/priceplan/priceplan-item/factory.d.ts +7 -0
- package/build/blocks/priceplan/priceplan-item/factory.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-item/factory.js +70 -0
- package/build/blocks/priceplan/priceplan-item/icon.d.ts +2 -0
- package/build/blocks/priceplan/priceplan-item/icon.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-item/icon.js +2 -0
- package/build/blocks/priceplan/priceplan-item/index.d.ts +5 -0
- package/build/blocks/priceplan/priceplan-item/index.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-item/index.js +12 -0
- package/build/blocks/priceplan/priceplan-item/types.d.ts +28 -0
- package/build/blocks/priceplan/priceplan-item/types.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-item/types.js +1 -0
- package/build/blocks/priceplan/priceplan-list-item/constants.d.ts +8 -0
- package/build/blocks/priceplan/priceplan-list-item/constants.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-list-item/constants.js +5 -0
- package/build/blocks/priceplan/priceplan-list-item/edit.d.ts +6 -0
- package/build/blocks/priceplan/priceplan-list-item/edit.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-list-item/edit.js +17 -0
- package/build/blocks/priceplan/priceplan-list-item/factory.d.ts +7 -0
- package/build/blocks/priceplan/priceplan-list-item/factory.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-list-item/factory.js +30 -0
- package/build/blocks/priceplan/priceplan-list-item/icon.d.ts +2 -0
- package/build/blocks/priceplan/priceplan-list-item/icon.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-list-item/icon.js +2 -0
- package/build/blocks/priceplan/priceplan-list-item/index.d.ts +5 -0
- package/build/blocks/priceplan/priceplan-list-item/index.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-list-item/index.js +5 -0
- package/build/blocks/priceplan/priceplan-list-item/types.d.ts +11 -0
- package/build/blocks/priceplan/priceplan-list-item/types.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-list-item/types.js +1 -0
- package/build/blocks/review/review-group/constants.d.ts +26 -0
- package/build/blocks/review/review-group/constants.d.ts.map +1 -0
- package/build/blocks/review/review-group/constants.js +21 -0
- package/build/blocks/review/review-group/edit.d.ts +4 -0
- package/build/blocks/review/review-group/edit.d.ts.map +1 -0
- package/build/blocks/review/review-group/edit.js +31 -0
- package/build/blocks/review/review-group/factory.d.ts +7 -0
- package/build/blocks/review/review-group/factory.d.ts.map +1 -0
- package/build/blocks/review/review-group/factory.js +49 -0
- package/build/blocks/review/review-group/icon.d.ts +2 -0
- package/build/blocks/review/review-group/icon.d.ts.map +1 -0
- package/build/blocks/review/review-group/icon.js +2 -0
- package/build/blocks/review/review-group/index.d.ts +5 -0
- package/build/blocks/review/review-group/index.d.ts.map +1 -0
- package/build/blocks/review/review-group/index.js +6 -0
- package/build/blocks/review/review-group/types.d.ts +24 -0
- package/build/blocks/review/review-group/types.d.ts.map +1 -0
- package/build/blocks/review/review-group/types.js +1 -0
- package/build/blocks/review/review-item/constants.d.ts +2 -0
- package/build/blocks/review/review-item/constants.d.ts.map +1 -0
- package/build/blocks/review/review-item/constants.js +1 -0
- package/build/blocks/review/review-item/edit.d.ts +4 -0
- package/build/blocks/review/review-item/edit.d.ts.map +1 -0
- package/build/blocks/review/review-item/edit.js +29 -0
- package/build/blocks/review/review-item/factory.d.ts +5 -0
- package/build/blocks/review/review-item/factory.d.ts.map +1 -0
- package/build/blocks/review/review-item/factory.js +36 -0
- package/build/blocks/review/review-item/icon.d.ts +2 -0
- package/build/blocks/review/review-item/icon.d.ts.map +1 -0
- package/build/blocks/review/review-item/icon.js +2 -0
- package/build/blocks/review/review-item/index.d.ts +5 -0
- package/build/blocks/review/review-item/index.d.ts.map +1 -0
- package/build/blocks/review/review-item/index.js +5 -0
- package/build/blocks/review/review-item/types.d.ts +17 -0
- package/build/blocks/review/review-item/types.d.ts.map +1 -0
- package/build/blocks/review/review-item/types.js +1 -0
- package/build/blocks/sections/base-section/attributes.d.ts +25 -0
- package/build/blocks/sections/base-section/attributes.d.ts.map +1 -1
- package/build/blocks/sections/base-section/attributes.js +9 -0
- package/build/blocks/sections/base-section/controls.d.ts.map +1 -1
- package/build/blocks/sections/base-section/controls.js +46 -2
- package/build/blocks/sections/base-section/types.d.ts +24 -1
- package/build/blocks/sections/base-section/types.d.ts.map +1 -1
- package/build/blocks/share/share/index.d.ts.map +1 -1
- package/build/blocks/share/share/index.js +1 -0
- package/build/blocks/signpost/signpost-group/constants.d.ts +26 -0
- package/build/blocks/signpost/signpost-group/constants.d.ts.map +1 -1
- package/build/blocks/signpost/signpost-group/constants.js +21 -0
- package/build/blocks/signpost/signpost-group/edit.d.ts.map +1 -1
- package/build/blocks/signpost/signpost-group/edit.js +13 -8
- package/build/blocks/signpost/signpost-group/factory.d.ts.map +1 -1
- package/build/blocks/signpost/signpost-group/factory.js +5 -1
- package/build/blocks/signpost/signpost-group/types.d.ts +5 -1
- package/build/blocks/signpost/signpost-group/types.d.ts.map +1 -1
- package/build/blocks/step/step-group/edit.d.ts +1 -1
- package/build/blocks/step/step-group/edit.d.ts.map +1 -1
- package/build/blocks/step/step-group/factory.d.ts +1 -1
- package/build/blocks/step/step-group/factory.d.ts.map +1 -1
- package/build/blocks/step/step-group/types.d.ts +2 -2
- package/build/blocks/step/step-group/types.d.ts.map +1 -1
- package/build/blocks/step/step-item/types.d.ts +1 -1
- package/build/blocks/step/step-item/types.d.ts.map +1 -1
- package/build/blocks/testimonial/testimonial-group/index.d.ts +1 -1
- package/build/blocks/testimonial/testimonial-group/index.d.ts.map +1 -1
- package/build/blocks/testimonial/testimonial-group/types.d.ts +1 -1
- package/build/blocks/testimonial/testimonial-group/types.d.ts.map +1 -1
- package/build/blocks/text-and-form/text-and-form-text-column/edit.d.ts.map +1 -1
- package/build/blocks/text-and-form/text-and-form-text-column/edit.js +9 -2
- package/build/blocks/text-and-form/text-and-form-text-column/factory.js +1 -1
- package/build/blocks/text-and-form/text-and-form-text-column/types.d.ts +2 -0
- package/build/blocks/text-and-form/text-and-form-text-column/types.d.ts.map +1 -1
- package/build/blocks/usp/usp-item/types.d.ts +1 -1
- package/build/blocks/usp/usp-item/types.d.ts.map +1 -1
- package/build/blocks/video/video-group/constants.d.ts +15 -0
- package/build/blocks/video/video-group/constants.d.ts.map +1 -0
- package/build/blocks/video/video-group/constants.js +9 -0
- package/build/blocks/video/video-group/edit.d.ts +4 -0
- package/build/blocks/video/video-group/edit.d.ts.map +1 -0
- package/build/blocks/video/video-group/edit.js +23 -0
- package/build/blocks/video/video-group/factory.d.ts +5 -0
- package/build/blocks/video/video-group/factory.d.ts.map +1 -0
- package/build/blocks/video/video-group/factory.js +51 -0
- package/build/blocks/video/video-group/icon.d.ts +2 -0
- package/build/blocks/video/video-group/icon.d.ts.map +1 -0
- package/build/blocks/video/video-group/icon.js +2 -0
- package/build/blocks/video/video-group/index.d.ts +5 -0
- package/build/blocks/video/video-group/index.d.ts.map +1 -0
- package/build/blocks/video/video-group/index.js +5 -0
- package/build/blocks/video/video-group/types.d.ts +20 -0
- package/build/blocks/video/video-group/types.d.ts.map +1 -0
- package/build/blocks/video/video-group/types.js +1 -0
- package/build/components/Document/DocumentTermSelectModal.js +1 -1
- package/build/components/EntitySelectModal/EntitySelectModal.d.ts.map +1 -0
- package/build/components/Event/EventSelectModal.js +1 -1
- package/build/components/Event/EventTermSelectModal.js +1 -1
- package/build/components/Post/PostSelectModal.js +1 -1
- package/build/components/Post/PostTermSelectModal.js +1 -1
- package/build/index.d.ts +14 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +7 -0
- package/build/types.d.ts +1 -1
- package/build/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/blocks/compare/compare-group/constants.ts +27 -0
- package/src/blocks/compare/compare-group/edit.tsx +27 -4
- package/src/blocks/compare/compare-group/factory.tsx +10 -1
- package/src/blocks/compare/compare-group/index.ts +7 -1
- package/src/blocks/compare/compare-group/types.ts +5 -1
- package/src/blocks/compare/compare-item/edit.tsx +32 -13
- package/src/blocks/compare/compare-item/editor.scss +16 -0
- package/src/blocks/compare/compare-item/factory.tsx +4 -0
- package/src/blocks/compare/compare-item/types.ts +2 -0
- package/src/blocks/compare/compare-option/types.ts +1 -1
- package/src/blocks/core/basic-icon/buildPreviewStyle.ts +40 -0
- package/src/blocks/core/basic-icon/constants.ts +48 -0
- package/src/blocks/core/basic-icon/edit.tsx +170 -0
- package/src/blocks/core/basic-icon/editor.scss +119 -0
- package/src/blocks/core/basic-icon/factory.tsx +42 -0
- package/src/blocks/core/basic-icon/index.ts +17 -0
- package/src/blocks/core/basic-icon/types.ts +34 -0
- package/src/blocks/core/basic-overline/edit.tsx +8 -0
- package/src/blocks/core/basic-overline/factory.tsx +2 -0
- package/src/blocks/core/basic-overline/types.ts +3 -1
- package/src/blocks/faq/faq-group/constants.ts +18 -0
- package/src/blocks/faq/faq-group/edit.tsx +118 -4
- package/src/blocks/faq/faq-group/factory.tsx +33 -13
- package/src/blocks/faq/faq-group/index.ts +9 -1
- package/src/blocks/faq/faq-group/types.ts +22 -1
- package/src/blocks/form/form-field/edit.tsx +1 -1
- package/src/blocks/form/form-field/types.ts +4 -4
- package/src/blocks/form/form-group/editor.scss +1 -0
- package/src/blocks/gallery/gallery-item/index.ts +1 -1
- package/src/blocks/groups/banner-group/index.ts +1 -1
- package/src/blocks/groups/banner-group/types.ts +2 -2
- package/src/blocks/groups/basic-header-group/edit.tsx +25 -1
- package/src/blocks/groups/basic-header-group/factory.tsx +1 -1
- package/src/blocks/groups/basic-header-group/types.ts +1 -1
- package/src/blocks/groups/text-and-media-group/constants.ts +11 -0
- package/src/blocks/groups/text-and-media-group/edit.tsx +37 -2
- package/src/blocks/groups/text-and-media-group/editor.scss +50 -4
- package/src/blocks/groups/text-and-media-group/factory.tsx +10 -4
- package/src/blocks/groups/text-and-media-group/types.ts +7 -1
- package/src/blocks/hero/hero-group/constants.ts +8 -0
- package/src/blocks/hero/hero-group/edit.tsx +16 -4
- package/src/blocks/hero/hero-group/factory.tsx +13 -4
- package/src/blocks/hero/hero-group/types.ts +15 -3
- package/src/blocks/hero/hero-item/edit.tsx +42 -2
- package/src/blocks/hero/hero-item/editor.scss +13 -0
- package/src/blocks/hero/hero-item/factory.tsx +1 -0
- package/src/blocks/hero/hero-item/types.ts +4 -2
- package/src/blocks/link/link-item/factory.tsx +1 -1
- package/src/blocks/map/map-group/types.ts +3 -3
- package/src/blocks/newsletter/newsletter-form/types.ts +1 -1
- package/src/blocks/person/person-group/types.ts +1 -1
- package/src/blocks/person/person-item/constants.ts +0 -3
- package/src/blocks/person/person-item/types.ts +2 -2
- package/src/blocks/priceplan/priceplan-group/constants.ts +1 -0
- package/src/blocks/priceplan/priceplan-group/edit.tsx +21 -0
- package/src/blocks/priceplan/priceplan-group/editor.scss +3 -0
- package/src/blocks/priceplan/priceplan-group/factory.tsx +23 -0
- package/src/blocks/priceplan/priceplan-group/icon.tsx +36 -0
- package/src/blocks/priceplan/priceplan-group/index.ts +15 -0
- package/src/blocks/priceplan/priceplan-group/types.ts +7 -0
- package/src/blocks/priceplan/priceplan-item/constants.ts +11 -0
- package/src/blocks/priceplan/priceplan-item/edit.tsx +158 -0
- package/src/blocks/priceplan/priceplan-item/editor.scss +131 -0
- package/src/blocks/priceplan/priceplan-item/factory.tsx +80 -0
- package/src/blocks/priceplan/priceplan-item/icon.tsx +9 -0
- package/src/blocks/priceplan/priceplan-item/index.ts +16 -0
- package/src/blocks/priceplan/priceplan-item/types.ts +34 -0
- package/src/blocks/priceplan/priceplan-list-item/constants.ts +6 -0
- package/src/blocks/priceplan/priceplan-list-item/edit.tsx +59 -0
- package/src/blocks/priceplan/priceplan-list-item/editor.scss +21 -0
- package/src/blocks/priceplan/priceplan-list-item/factory.tsx +38 -0
- package/src/blocks/priceplan/priceplan-list-item/icon.tsx +9 -0
- package/src/blocks/priceplan/priceplan-list-item/index.ts +9 -0
- package/src/blocks/priceplan/priceplan-list-item/types.ts +13 -0
- package/src/blocks/review/review-group/constants.ts +25 -0
- package/src/blocks/review/review-group/edit.tsx +116 -0
- package/src/blocks/review/review-group/editor.scss +10 -0
- package/src/blocks/review/review-group/factory.tsx +58 -0
- package/src/blocks/review/review-group/icon.tsx +12 -0
- package/src/blocks/review/review-group/index.ts +19 -0
- package/src/blocks/review/review-group/types.ts +27 -0
- package/src/blocks/review/review-item/constants.ts +1 -0
- package/src/blocks/review/review-item/edit.tsx +126 -0
- package/src/blocks/review/review-item/editor.scss +96 -0
- package/src/blocks/review/review-item/factory.tsx +40 -0
- package/src/blocks/review/review-item/icon.tsx +9 -0
- package/src/blocks/review/review-item/index.ts +9 -0
- package/src/blocks/review/review-item/types.ts +19 -0
- package/src/blocks/sections/base-section/attributes.ts +9 -0
- package/src/blocks/sections/base-section/controls.tsx +97 -1
- package/src/blocks/sections/base-section/types.ts +9 -1
- package/src/blocks/share/share/index.ts +1 -0
- package/src/blocks/signpost/signpost-group/constants.ts +23 -0
- package/src/blocks/signpost/signpost-group/edit.tsx +25 -4
- package/src/blocks/signpost/signpost-group/factory.tsx +5 -1
- package/src/blocks/signpost/signpost-group/types.ts +4 -1
- package/src/blocks/signpost/signpost-item/editor.scss +5 -0
- package/src/blocks/step/step-group/edit.tsx +1 -1
- package/src/blocks/step/step-group/factory.tsx +1 -1
- package/src/blocks/step/step-group/types.ts +2 -2
- package/src/blocks/step/step-item/types.ts +1 -1
- package/src/blocks/testimonial/testimonial-group/index.ts +1 -1
- package/src/blocks/testimonial/testimonial-group/types.ts +1 -1
- package/src/blocks/text-and-form/text-and-form-text-column/edit.tsx +31 -0
- package/src/blocks/text-and-form/text-and-form-text-column/editor.scss +8 -4
- package/src/blocks/text-and-form/text-and-form-text-column/factory.tsx +1 -1
- package/src/blocks/text-and-form/text-and-form-text-column/types.ts +1 -1
- package/src/blocks/usp/usp-item/types.ts +1 -1
- package/src/blocks/video/video-group/constants.ts +11 -0
- package/src/blocks/video/video-group/edit.tsx +165 -0
- package/src/blocks/video/video-group/editor.scss +105 -0
- package/src/blocks/video/video-group/factory.tsx +55 -0
- package/src/blocks/video/video-group/icon.tsx +17 -0
- package/src/blocks/video/video-group/index.ts +9 -0
- package/src/blocks/video/video-group/types.ts +22 -0
- package/src/components/Document/DocumentTermSelectModal.tsx +1 -1
- package/src/components/Event/EventSelectModal.tsx +1 -1
- package/src/components/Event/EventTermSelectModal.tsx +1 -1
- package/src/components/ImagePicker/ImagePicker.tsx +1 -1
- package/src/components/Post/PostSelectModal.tsx +1 -1
- package/src/components/Post/PostTermSelectModal.tsx +1 -1
- package/src/editor.scss +7 -0
- package/src/index.ts +19 -0
- package/src/types.ts +1 -1
- package/build/components/Event/EntitySelectModal.d.ts.map +0 -1
- /package/build/components/{Event → EntitySelectModal}/EntitySelectModal.d.ts +0 -0
- /package/build/components/{Event → EntitySelectModal}/EntitySelectModal.js +0 -0
- /package/src/components/{Event → EntitySelectModal}/EntitySelectModal.tsx +0 -0
|
@@ -51,6 +51,48 @@
|
|
|
51
51
|
.c-image-picker-body__preview img {
|
|
52
52
|
aspect-ratio: var(--ratio);
|
|
53
53
|
object-fit: cover;
|
|
54
|
+
clip-path: var(--image-clip-path, none);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&.--clip-path-circle {
|
|
58
|
+
--image-clip-path: circle(50% at 50% 50%);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&.--clip-path-triangle {
|
|
62
|
+
--image-clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&.--clip-path-rhombus {
|
|
66
|
+
--image-clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&.--clip-path-octagon {
|
|
70
|
+
--image-clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&.--clip-path-bevel {
|
|
74
|
+
--image-clip-path: polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 20%);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&.--clip-path-rabbet {
|
|
78
|
+
--image-clip-path: polygon(
|
|
79
|
+
0% 15%,
|
|
80
|
+
15% 15%,
|
|
81
|
+
15% 0%,
|
|
82
|
+
85% 0%,
|
|
83
|
+
85% 15%,
|
|
84
|
+
100% 15%,
|
|
85
|
+
100% 85%,
|
|
86
|
+
85% 85%,
|
|
87
|
+
85% 100%,
|
|
88
|
+
15% 100%,
|
|
89
|
+
15% 85%,
|
|
90
|
+
0% 85%
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&.--clip-path-parallelogram {
|
|
95
|
+
--image-clip-path: polygon(25% 0%, 100% 0%, 75% 100%, 0% 100%);
|
|
54
96
|
}
|
|
55
97
|
|
|
56
98
|
.c-image-picker-body__placeholder {
|
|
@@ -65,12 +107,16 @@
|
|
|
65
107
|
}
|
|
66
108
|
|
|
67
109
|
.g-text-and-media__overline {
|
|
68
|
-
display:
|
|
69
|
-
font-size:
|
|
110
|
+
display: inline-flex;
|
|
111
|
+
font-size: 11px;
|
|
70
112
|
font-weight: 600;
|
|
71
113
|
text-transform: uppercase;
|
|
72
|
-
letter-spacing:
|
|
73
|
-
color: #
|
|
114
|
+
letter-spacing: 1.5px;
|
|
115
|
+
color: #555;
|
|
116
|
+
background-color: #f0f0f0;
|
|
117
|
+
border-radius: 100px;
|
|
118
|
+
padding: 3px 10px;
|
|
119
|
+
margin-bottom: 8px;
|
|
74
120
|
}
|
|
75
121
|
|
|
76
122
|
.g-text-and-media__heading {
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
DEFAULT_CONTENT_SIZES,
|
|
8
8
|
DEFAULT_GRID_STYLES,
|
|
9
9
|
DEFAULT_HEADING_STYLES,
|
|
10
|
+
DEFAULT_IMAGE_CLIP_PATHS,
|
|
10
11
|
DEFAULT_MEDIA_POSITIONS,
|
|
11
12
|
DEFAULT_RATIOS,
|
|
12
13
|
HEADING_LEVELS,
|
|
@@ -24,8 +25,9 @@ export function createTextAndMediaGroupBlock<
|
|
|
24
25
|
THeadingStyles extends OptionArray = typeof DEFAULT_HEADING_STYLES,
|
|
25
26
|
TContentSizes extends OptionArray = typeof DEFAULT_CONTENT_SIZES,
|
|
26
27
|
TChipVariants extends OptionArray = typeof DEFAULT_CHIP_VARIANTS,
|
|
28
|
+
TImageClipPaths extends OptionArray = typeof DEFAULT_IMAGE_CLIP_PATHS,
|
|
27
29
|
>(
|
|
28
|
-
options: TextAndMediaGroupOptions<TRatios, TMediaPositions, TGridStyles, THeadingStyles, TContentSizes, TChipVariants>,
|
|
30
|
+
options: TextAndMediaGroupOptions<TRatios, TMediaPositions, TGridStyles, THeadingStyles, TContentSizes, TChipVariants, TImageClipPaths>,
|
|
29
31
|
): BlockConfiguration<
|
|
30
32
|
TextAndMediaGroupAttributes<
|
|
31
33
|
TRatios[number]['value'],
|
|
@@ -33,7 +35,8 @@ export function createTextAndMediaGroupBlock<
|
|
|
33
35
|
TGridStyles[number]['value'],
|
|
34
36
|
THeadingStyles[number]['value'],
|
|
35
37
|
TContentSizes[number]['value'],
|
|
36
|
-
TChipVariants[number]['value']
|
|
38
|
+
TChipVariants[number]['value'],
|
|
39
|
+
TImageClipPaths[number]['value']
|
|
37
40
|
>
|
|
38
41
|
> {
|
|
39
42
|
const ratios = options.ratios ?? DEFAULT_RATIOS
|
|
@@ -42,6 +45,7 @@ export function createTextAndMediaGroupBlock<
|
|
|
42
45
|
const headingStyles = options.headingStyles ?? DEFAULT_HEADING_STYLES
|
|
43
46
|
const contentSizes = options.contentSizes ?? DEFAULT_CONTENT_SIZES
|
|
44
47
|
const chipVariants = options.chipVariants ?? DEFAULT_CHIP_VARIANTS
|
|
48
|
+
const imageClipPaths = options.imageClipPaths ?? DEFAULT_IMAGE_CLIP_PATHS
|
|
45
49
|
|
|
46
50
|
return {
|
|
47
51
|
name: options.name,
|
|
@@ -56,7 +60,7 @@ export function createTextAndMediaGroupBlock<
|
|
|
56
60
|
type: 'object',
|
|
57
61
|
default: {
|
|
58
62
|
heading: {title: '', level: HEADING_LEVELS[1], style: headingStyles[1]?.value ?? headingStyles[0].value, color: ''},
|
|
59
|
-
overline: {title: ''},
|
|
63
|
+
overline: {title: '', color: '', background: ''},
|
|
60
64
|
},
|
|
61
65
|
},
|
|
62
66
|
mediaPosition: {
|
|
@@ -70,6 +74,7 @@ export function createTextAndMediaGroupBlock<
|
|
|
70
74
|
id: 0,
|
|
71
75
|
alt: '',
|
|
72
76
|
video: {src: ''},
|
|
77
|
+
clipPath: imageClipPaths[0].value,
|
|
73
78
|
chip: {title: '', position: 'bottom-right', variant: chipVariants[0].value},
|
|
74
79
|
},
|
|
75
80
|
},
|
|
@@ -94,7 +99,8 @@ export function createTextAndMediaGroupBlock<
|
|
|
94
99
|
TGridStyles[number]['value'],
|
|
95
100
|
THeadingStyles[number]['value'],
|
|
96
101
|
TContentSizes[number]['value'],
|
|
97
|
-
TChipVariants[number]['value']
|
|
102
|
+
TChipVariants[number]['value'],
|
|
103
|
+
TImageClipPaths[number]['value']
|
|
98
104
|
>
|
|
99
105
|
>
|
|
100
106
|
}
|
|
@@ -5,6 +5,7 @@ import type {
|
|
|
5
5
|
DEFAULT_CONTENT_SIZES,
|
|
6
6
|
DEFAULT_GRID_STYLES,
|
|
7
7
|
DEFAULT_HEADING_STYLES,
|
|
8
|
+
DEFAULT_IMAGE_CLIP_PATHS,
|
|
8
9
|
DEFAULT_MEDIA_POSITIONS,
|
|
9
10
|
DEFAULT_RATIOS,
|
|
10
11
|
HEADING_LEVELS,
|
|
@@ -18,6 +19,7 @@ export type HeadingLevels = (typeof HEADING_LEVELS)[number]
|
|
|
18
19
|
export type ContentSizes = (typeof DEFAULT_CONTENT_SIZES)[number]['value']
|
|
19
20
|
export type ChipPositions = (typeof CHIP_POSITIONS)[number]['value']
|
|
20
21
|
export type ChipVariants = (typeof DEFAULT_CHIP_VARIANTS)[number]['value']
|
|
22
|
+
export type ImageClipPaths = (typeof DEFAULT_IMAGE_CLIP_PATHS)[number]['value']
|
|
21
23
|
|
|
22
24
|
export interface TextAndMediaGroupAttributes<
|
|
23
25
|
TRatio extends string = Ratios,
|
|
@@ -26,16 +28,18 @@ export interface TextAndMediaGroupAttributes<
|
|
|
26
28
|
THeadingStyle extends string = HeadingStyles,
|
|
27
29
|
TContentSize extends string = ContentSizes,
|
|
28
30
|
TChipVariant extends string = ChipVariants,
|
|
31
|
+
TImageClipPath extends string = ImageClipPaths,
|
|
29
32
|
> extends Record<string, unknown> {
|
|
30
33
|
header: {
|
|
31
34
|
heading: {title: string; level: HeadingLevels; style: THeadingStyle; color?: string}
|
|
32
|
-
overline: {title: string}
|
|
35
|
+
overline: {title: string; color?: string; background?: string}
|
|
33
36
|
}
|
|
34
37
|
mediaPosition: TMediaPosition
|
|
35
38
|
img: {
|
|
36
39
|
id: number
|
|
37
40
|
alt: string
|
|
38
41
|
video: {src: string}
|
|
42
|
+
clipPath: TImageClipPath
|
|
39
43
|
chip: {title: string; position: ChipPositions; variant: TChipVariant}
|
|
40
44
|
}
|
|
41
45
|
ratio: TRatio
|
|
@@ -50,6 +54,7 @@ export interface TextAndMediaGroupOptions<
|
|
|
50
54
|
THeadingStyles extends OptionArray = typeof DEFAULT_HEADING_STYLES,
|
|
51
55
|
TContentSizes extends OptionArray = typeof DEFAULT_CONTENT_SIZES,
|
|
52
56
|
TChipVariants extends OptionArray = typeof DEFAULT_CHIP_VARIANTS,
|
|
57
|
+
TImageClipPaths extends OptionArray = typeof DEFAULT_IMAGE_CLIP_PATHS,
|
|
53
58
|
> extends BriloBlockType {
|
|
54
59
|
ratios?: TRatios
|
|
55
60
|
mediaPositions?: TMediaPositions
|
|
@@ -57,4 +62,5 @@ export interface TextAndMediaGroupOptions<
|
|
|
57
62
|
headingStyles?: THeadingStyles
|
|
58
63
|
contentSizes?: TContentSizes
|
|
59
64
|
chipVariants?: TChipVariants
|
|
65
|
+
imageClipPaths?: TImageClipPaths
|
|
60
66
|
}
|
|
@@ -21,3 +21,11 @@ export const EFFECTS = [
|
|
|
21
21
|
label: __('Fade', 'brilo-blocks'),
|
|
22
22
|
},
|
|
23
23
|
] as const
|
|
24
|
+
|
|
25
|
+
export const DEFAULT_ASPECT_RATIOS = [
|
|
26
|
+
{value: '5/3', label: __('5:3', 'brilo-blocks')},
|
|
27
|
+
{value: '8/3', label: __('8:3', 'brilo-blocks')},
|
|
28
|
+
{value: '16/9', label: __('16:9', 'brilo-blocks')},
|
|
29
|
+
{value: '21/9', label: __('21:9', 'brilo-blocks')},
|
|
30
|
+
{value: 'full-height', label: __('Plná výška', 'brilo-blocks')},
|
|
31
|
+
] as const
|
|
@@ -11,19 +11,25 @@ import {
|
|
|
11
11
|
import {__} from '@wordpress/i18n'
|
|
12
12
|
import clsx from 'clsx'
|
|
13
13
|
import {useGroupBlock} from '~/hooks/useGroupBlock'
|
|
14
|
-
import {EFFECTS, VARIANTS} from './constants'
|
|
15
|
-
import type {Effect, HeroGroupAttributes, HeroGroupOptions, Variant} from './types'
|
|
14
|
+
import {DEFAULT_ASPECT_RATIOS, EFFECTS, VARIANTS} from './constants'
|
|
15
|
+
import type {AspectRatio, Effect, HeroGroupAttributes, HeroGroupOptions, Variant} from './types'
|
|
16
16
|
|
|
17
17
|
export function createHeroGroupEdit(options: HeroGroupOptions) {
|
|
18
18
|
const VARIANTS_OPTIONS = options.variants ?? VARIANTS
|
|
19
19
|
const EFFECTS_OPTIONS = options.effects ?? EFFECTS
|
|
20
|
+
const ASPECT_RATIOS_OPTIONS = options.aspectRatios ?? DEFAULT_ASPECT_RATIOS
|
|
20
21
|
|
|
21
22
|
return function Edit(props: BlockEditProps<HeroGroupAttributes>) {
|
|
22
23
|
const {attributes, setAttributes} = props
|
|
23
|
-
const {variant, effect, autoplay, autoplaySpeed, pauseOnHover} = attributes
|
|
24
|
+
const {variant, effect, autoplay, autoplaySpeed, pauseOnHover, aspectRatio} = attributes
|
|
24
25
|
|
|
25
26
|
const {blockProps, innerBlocksProps} = useGroupBlock({
|
|
26
|
-
blockClassName: clsx(
|
|
27
|
+
blockClassName: clsx(
|
|
28
|
+
options.blockClassName ?? 'g-hero wp-block-section',
|
|
29
|
+
`--variant-${variant}`,
|
|
30
|
+
`--effect-${effect}`,
|
|
31
|
+
`--aspect-ratio-${aspectRatio}`,
|
|
32
|
+
),
|
|
27
33
|
containerClassName: [options.containerClassName ?? 'g-hero__container'],
|
|
28
34
|
allowedBlocks: options.allowedBlocks,
|
|
29
35
|
orientation: 'horizontal',
|
|
@@ -51,6 +57,12 @@ export function createHeroGroupEdit(options: HeroGroupOptions) {
|
|
|
51
57
|
options={EFFECTS_OPTIONS as any}
|
|
52
58
|
onChange={(v) => setAttributes({effect: v as Effect})}
|
|
53
59
|
/>
|
|
60
|
+
<SelectControl
|
|
61
|
+
label={__('Poměr stran', 'brilo-blocks')}
|
|
62
|
+
value={aspectRatio}
|
|
63
|
+
options={ASPECT_RATIOS_OPTIONS as any}
|
|
64
|
+
onChange={(v) => setAttributes({aspectRatio: v as AspectRatio})}
|
|
65
|
+
/>
|
|
54
66
|
</PanelBody>
|
|
55
67
|
<PanelBody title={__('Nastavení slideru', 'brilo-blocks')}>
|
|
56
68
|
<ToggleControl
|
|
@@ -2,7 +2,7 @@ import {InnerBlocks} from '@wordpress/block-editor'
|
|
|
2
2
|
import type {BlockConfiguration} from '@wordpress/blocks'
|
|
3
3
|
import {__} from '@wordpress/i18n'
|
|
4
4
|
import type {OptionArray} from '~/types'
|
|
5
|
-
import {EFFECTS, VARIANTS} from './constants'
|
|
5
|
+
import {DEFAULT_ASPECT_RATIOS, EFFECTS, VARIANTS} from './constants'
|
|
6
6
|
import {createHeroGroupEdit} from './edit'
|
|
7
7
|
import type {HeroGroupAttributes, HeroGroupOptions} from './types'
|
|
8
8
|
import {icon} from './icon'
|
|
@@ -12,12 +12,14 @@ export type {HeroGroupAttributes, HeroGroupOptions}
|
|
|
12
12
|
export function createHeroGroupBlock<
|
|
13
13
|
TVariants extends OptionArray = typeof VARIANTS,
|
|
14
14
|
TEffects extends OptionArray = typeof EFFECTS,
|
|
15
|
+
TAspectRatio extends OptionArray = typeof DEFAULT_ASPECT_RATIOS,
|
|
15
16
|
TExtra extends Record<string, unknown> = Record<string, never>,
|
|
16
17
|
>(
|
|
17
|
-
options: HeroGroupOptions<TVariants, TEffects, TExtra>,
|
|
18
|
-
): BlockConfiguration<HeroGroupAttributes<TVariants[number]['value'], TEffects[number]['value']> & TExtra> {
|
|
18
|
+
options: HeroGroupOptions<TVariants, TEffects, TAspectRatio, TExtra>,
|
|
19
|
+
): BlockConfiguration<HeroGroupAttributes<TVariants[number]['value'], TEffects[number]['value'], TAspectRatio[number]['value']> & TExtra> {
|
|
19
20
|
const variants = options.variants ?? VARIANTS
|
|
20
21
|
const effects = options.effects ?? EFFECTS
|
|
22
|
+
const aspectRatios = options.aspectRatios ?? DEFAULT_ASPECT_RATIOS
|
|
21
23
|
|
|
22
24
|
return {
|
|
23
25
|
name: options.name,
|
|
@@ -42,9 +44,16 @@ export function createHeroGroupBlock<
|
|
|
42
44
|
default: effects[0].value,
|
|
43
45
|
enum: effects.map((e) => e.value),
|
|
44
46
|
},
|
|
47
|
+
aspectRatio: {
|
|
48
|
+
type: 'string',
|
|
49
|
+
default: aspectRatios[1].value,
|
|
50
|
+
enum: aspectRatios.map((a) => a.value),
|
|
51
|
+
},
|
|
45
52
|
...options.extraAttributes,
|
|
46
53
|
},
|
|
47
54
|
edit: createHeroGroupEdit(options as unknown as HeroGroupOptions),
|
|
48
55
|
save: () => <InnerBlocks.Content />,
|
|
49
|
-
} as unknown as BlockConfiguration<
|
|
56
|
+
} as unknown as BlockConfiguration<
|
|
57
|
+
HeroGroupAttributes<TVariants[number]['value'], TEffects[number]['value'], TAspectRatio[number]['value']> & TExtra
|
|
58
|
+
>
|
|
50
59
|
}
|
|
@@ -2,33 +2,45 @@ import type {BlockEditProps} from '@wordpress/blocks'
|
|
|
2
2
|
import type {ReactNode} from 'react'
|
|
3
3
|
import type {BriloBlockType, OptionArray} from '~/types'
|
|
4
4
|
import type {HeroSliderItem} from '../hero-item/types'
|
|
5
|
-
import
|
|
5
|
+
import {DEFAULT_ASPECT_RATIOS, EFFECTS, VARIANTS} from './constants'
|
|
6
6
|
|
|
7
7
|
export type Variant = (typeof VARIANTS)[number]['value']
|
|
8
8
|
export type Effect = (typeof EFFECTS)[number]['value']
|
|
9
|
+
export type AspectRatio = (typeof DEFAULT_ASPECT_RATIOS)[number]['value']
|
|
9
10
|
|
|
10
|
-
export interface HeroGroupAttributes<
|
|
11
|
+
export interface HeroGroupAttributes<
|
|
12
|
+
TVariant extends string = Variant,
|
|
13
|
+
TEffect extends string = Effect,
|
|
14
|
+
TAspectRatio extends string = AspectRatio,
|
|
15
|
+
> extends Record<string, unknown> {
|
|
11
16
|
items: HeroSliderItem[]
|
|
12
17
|
variant: TVariant
|
|
13
18
|
autoplay: boolean
|
|
14
19
|
autoplaySpeed: number
|
|
15
20
|
pauseOnHover: boolean
|
|
16
21
|
effect: TEffect
|
|
22
|
+
aspectRatio: TAspectRatio
|
|
17
23
|
}
|
|
18
24
|
|
|
19
25
|
export interface HeroGroupOptions<
|
|
20
26
|
TVariants extends OptionArray = typeof VARIANTS,
|
|
21
27
|
TEffects extends OptionArray = typeof EFFECTS,
|
|
28
|
+
TAspectRatio extends OptionArray = typeof DEFAULT_ASPECT_RATIOS,
|
|
22
29
|
TExtra extends Record<string, unknown> = Record<string, never>,
|
|
23
30
|
> extends BriloBlockType {
|
|
24
31
|
allowedBlocks: string[]
|
|
25
32
|
variants?: TVariants
|
|
26
33
|
effects?: TEffects
|
|
34
|
+
aspectRatios?: TAspectRatio
|
|
27
35
|
extraAttributes?: {
|
|
28
36
|
[K in keyof TExtra]: {
|
|
29
37
|
type: string
|
|
30
38
|
default: TExtra[K]
|
|
31
39
|
}
|
|
32
40
|
}
|
|
33
|
-
extraControls?: (
|
|
41
|
+
extraControls?: (
|
|
42
|
+
props: BlockEditProps<
|
|
43
|
+
HeroGroupAttributes<TVariants[number]['value'], TEffects[number]['value'], TAspectRatio[number]['value']> & TExtra
|
|
44
|
+
>,
|
|
45
|
+
) => ReactNode
|
|
34
46
|
}
|
|
@@ -25,7 +25,7 @@ export function createHeroItemEdit(options: HeroItemOptions) {
|
|
|
25
25
|
attributes: HeroItemAttributes
|
|
26
26
|
setAttributes: (a: Partial<HeroItemAttributes>) => void
|
|
27
27
|
}) {
|
|
28
|
-
const {title, titleColor, img, headingLevel, contentPosition, url, focalPoint} = attributes
|
|
28
|
+
const {title, titleColor, img, headingLevel, contentPosition, url, focalPoint, overline} = attributes
|
|
29
29
|
const {paletteColors} = useTenantColorPalette()
|
|
30
30
|
|
|
31
31
|
const {blockProps, innerBlocksProps} = useGroupBlock({
|
|
@@ -40,7 +40,7 @@ export function createHeroItemEdit(options: HeroItemOptions) {
|
|
|
40
40
|
return (
|
|
41
41
|
<>
|
|
42
42
|
<InspectorControls>
|
|
43
|
-
<PanelBody title={__('
|
|
43
|
+
<PanelBody title={__('Obrázek', 'brilo-blocks')}>
|
|
44
44
|
<ImagePickerControl value={{id: img.id, alt: img.alt}} onChange={(v) => setAttributes({img: {...img, ...v}})} />
|
|
45
45
|
|
|
46
46
|
<BaseControl label={__('Focal point (desktop)', 'brilo-blocks')}>
|
|
@@ -56,7 +56,26 @@ export function createHeroItemEdit(options: HeroItemOptions) {
|
|
|
56
56
|
onChange={(v) => setAttributes({focalPoint: {...focalPoint, sm: {point: (v ?? 'center center') as ContentPosition}}})}
|
|
57
57
|
/>
|
|
58
58
|
</BaseControl>
|
|
59
|
+
</PanelBody>
|
|
60
|
+
|
|
61
|
+
<PanelBody title={__('Overline', 'brilo-blocks')}>
|
|
62
|
+
<BaseControl label={__('Barva overline pozadí', 'brilo-blocks')}>
|
|
63
|
+
<ColorPalette
|
|
64
|
+
colors={paletteColors}
|
|
65
|
+
value={overline.background || undefined}
|
|
66
|
+
onChange={(value) => setAttributes({overline: {...overline, background: value ?? ''}})}
|
|
67
|
+
/>
|
|
68
|
+
</BaseControl>
|
|
69
|
+
<BaseControl label={__('Barva overline textu', 'brilo-blocks')}>
|
|
70
|
+
<ColorPalette
|
|
71
|
+
colors={paletteColors}
|
|
72
|
+
value={overline.color || undefined}
|
|
73
|
+
onChange={(value) => setAttributes({overline: {...overline, color: value ?? ''}})}
|
|
74
|
+
/>
|
|
75
|
+
</BaseControl>
|
|
76
|
+
</PanelBody>
|
|
59
77
|
|
|
78
|
+
<PanelBody title={__('Nadpis', 'brilo-blocks')}>
|
|
60
79
|
<BaseControl label={__('Barva nadpisu', 'brilo-blocks')}>
|
|
61
80
|
<ColorPalette colors={paletteColors} value={titleColor || undefined} onChange={(v) => setAttributes({titleColor: v ?? ''})} />
|
|
62
81
|
</BaseControl>
|
|
@@ -71,11 +90,15 @@ export function createHeroItemEdit(options: HeroItemOptions) {
|
|
|
71
90
|
<ToggleGroupControlOption key={l} value={String(l)} label={`H${l}`} />
|
|
72
91
|
))}
|
|
73
92
|
</ToggleGroupControl>
|
|
93
|
+
</PanelBody>
|
|
74
94
|
|
|
95
|
+
<PanelBody title={__('Rozložení', 'brilo-blocks')}>
|
|
75
96
|
<BaseControl label={__('Pozice obsahu', 'brilo-blocks')}>
|
|
76
97
|
<AlignmentMatrixControl value={contentPosition} onChange={(v) => setAttributes({contentPosition: v as ContentPosition})} />
|
|
77
98
|
</BaseControl>
|
|
99
|
+
</PanelBody>
|
|
78
100
|
|
|
101
|
+
<PanelBody title={__('Odkaz', 'brilo-blocks')}>
|
|
79
102
|
<TextControl
|
|
80
103
|
label={__('URL odkazu', 'brilo-blocks')}
|
|
81
104
|
value={url.src}
|
|
@@ -98,6 +121,23 @@ export function createHeroItemEdit(options: HeroItemOptions) {
|
|
|
98
121
|
/>
|
|
99
122
|
</div>
|
|
100
123
|
<div className={`i-hero__overlay --${contentPosition.replace(' ', '-')}`}>
|
|
124
|
+
<RichText
|
|
125
|
+
tagName="span"
|
|
126
|
+
className="i-hero__overline u-text-editable"
|
|
127
|
+
style={
|
|
128
|
+
overline.color || overline.background
|
|
129
|
+
? {
|
|
130
|
+
...(overline.color ? {color: overline.color} : {}),
|
|
131
|
+
...(overline.background ? {backgroundColor: overline.background} : {}),
|
|
132
|
+
}
|
|
133
|
+
: undefined
|
|
134
|
+
}
|
|
135
|
+
value={overline.title}
|
|
136
|
+
onChange={(value) => setAttributes({overline: {...overline, title: value}})}
|
|
137
|
+
placeholder={__('Overline...', 'brilo-blocks')}
|
|
138
|
+
allowedFormats={[]}
|
|
139
|
+
/>
|
|
140
|
+
|
|
101
141
|
<RichText
|
|
102
142
|
tagName={`h${headingLevel}` as any}
|
|
103
143
|
className="i-hero__title u-text-editable"
|
|
@@ -7,6 +7,19 @@
|
|
|
7
7
|
margin-top: 0;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
.i-hero__overline {
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
font-size: 11px;
|
|
13
|
+
font-weight: 600;
|
|
14
|
+
text-transform: uppercase;
|
|
15
|
+
letter-spacing: 1.5px;
|
|
16
|
+
color: #555;
|
|
17
|
+
background-color: #f0f0f0;
|
|
18
|
+
border-radius: 100px;
|
|
19
|
+
padding: 3px 10px;
|
|
20
|
+
margin-bottom: 8px;
|
|
21
|
+
}
|
|
22
|
+
|
|
10
23
|
.i-hero__overlay {
|
|
11
24
|
position: absolute;
|
|
12
25
|
padding: 2rem;
|
|
@@ -21,6 +21,7 @@ export function createHeroItemBlock(options: HeroItemOptions): BlockConfiguratio
|
|
|
21
21
|
attributes: {
|
|
22
22
|
title: {type: 'string', default: ''},
|
|
23
23
|
titleColor: {type: 'string', default: ''},
|
|
24
|
+
overline: {type: 'object', default: {title: '', color: '', background: ''}},
|
|
24
25
|
img: {
|
|
25
26
|
type: 'object',
|
|
26
27
|
default: {id: 0, url: '', alt: ''},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {BriloBlockType, Media, OptionArray} from '~/types'
|
|
2
|
-
import {CONTENT_POSITIONS, HEADING_LEVELS} from './constants'
|
|
1
|
+
import type {BriloBlockType, Media, OptionArray} from '~/types'
|
|
2
|
+
import type {CONTENT_POSITIONS, HEADING_LEVELS} from './constants'
|
|
3
3
|
|
|
4
4
|
export type ContentPosition = (typeof CONTENT_POSITIONS)[number]['value']
|
|
5
5
|
export type HeadingLevel = (typeof HEADING_LEVELS)[number]
|
|
@@ -11,6 +11,7 @@ export type HeroItemUrl = {
|
|
|
11
11
|
|
|
12
12
|
export type HeroSliderItem = {
|
|
13
13
|
title: string
|
|
14
|
+
overline: {title: string; color?: string; background?: string}
|
|
14
15
|
img: Media
|
|
15
16
|
headingLevel: number
|
|
16
17
|
contentPosition: ContentPosition
|
|
@@ -27,6 +28,7 @@ export type HeroItemFocalPoint = {
|
|
|
27
28
|
export interface HeroItemAttributes extends Record<string, unknown> {
|
|
28
29
|
title: string
|
|
29
30
|
titleColor: string
|
|
31
|
+
overline: {title: string; color?: string; background?: string}
|
|
30
32
|
img: Media
|
|
31
33
|
headingLevel: number
|
|
32
34
|
contentPosition: ContentPosition
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {BriloBlockType, Media,
|
|
2
|
-
import {DEFAULT_HEADING_STYLES, MAP_TYPES} from './constants'
|
|
3
|
-
import {HEADING_LEVELS} from '~/constants'
|
|
1
|
+
import type {BriloBlockType, Media, OptionArray, StringArray} from '~/types'
|
|
2
|
+
import type {DEFAULT_HEADING_STYLES, MAP_TYPES} from './constants'
|
|
3
|
+
import type {HEADING_LEVELS} from '~/constants'
|
|
4
4
|
|
|
5
5
|
export type MapType = (typeof MAP_TYPES)[number]['value']
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type {BriloBlockType, Icon, StringArray} from '~/types'
|
|
2
2
|
import type {IconType} from '~/components/IconControl'
|
|
3
|
-
import {DEFAULT_HEADING_STYLES, NEWSLETTER_LEVELS} from './constants'
|
|
3
|
+
import type {DEFAULT_HEADING_STYLES, NEWSLETTER_LEVELS} from './constants'
|
|
4
4
|
|
|
5
5
|
export type HeadingLevels = (typeof NEWSLETTER_LEVELS)[number]
|
|
6
6
|
export type HeadingStyles = (typeof DEFAULT_HEADING_STYLES)[number]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {BriloBlockType} from '~/types'
|
|
2
|
-
import {ImageValue} from '~/components/ImagePicker/ImagePicker'
|
|
1
|
+
import type {BriloBlockType} from '~/types'
|
|
2
|
+
import type {ImageValue} from '~/components/ImagePicker/ImagePicker'
|
|
3
3
|
|
|
4
4
|
export interface PersonItemAttributes extends Record<string, unknown> {
|
|
5
5
|
title: string
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const PRICEPLAN_GROUP_DEFAULTS = {} as const
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {useGroupBlock} from '~/hooks/useGroupBlock'
|
|
2
|
+
import type {PriceplanGroupOptions} from './types'
|
|
3
|
+
|
|
4
|
+
export function createPriceplanGroupEdit(options: PriceplanGroupOptions) {
|
|
5
|
+
return function Edit() {
|
|
6
|
+
const {blockProps, innerBlocksProps} = useGroupBlock({
|
|
7
|
+
blockClassName: options.blockClassName ?? 'g-priceplan wp-block-section',
|
|
8
|
+
containerClassName: [options.containerClassName ?? 'u-grid-responsive-blocks-list --cols-3'],
|
|
9
|
+
allowedBlocks: options.allowedBlocks,
|
|
10
|
+
orientation: 'horizontal',
|
|
11
|
+
template: options.template,
|
|
12
|
+
layout: {type: 'default'},
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<div {...blockProps}>
|
|
17
|
+
<div {...innerBlocksProps} />
|
|
18
|
+
</div>
|
|
19
|
+
)
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {InnerBlocks} from '@wordpress/block-editor'
|
|
2
|
+
import type {BlockConfiguration} from '@wordpress/blocks'
|
|
3
|
+
import {__} from '@wordpress/i18n'
|
|
4
|
+
import {createPriceplanGroupEdit} from './edit'
|
|
5
|
+
import {icon as defaultIcon} from './icon'
|
|
6
|
+
import type {PriceplanGroupAttributes, PriceplanGroupOptions} from './types'
|
|
7
|
+
|
|
8
|
+
export type {PriceplanGroupAttributes, PriceplanGroupOptions}
|
|
9
|
+
|
|
10
|
+
export function createPriceplanGroupBlock(options: PriceplanGroupOptions): BlockConfiguration<PriceplanGroupAttributes> {
|
|
11
|
+
return {
|
|
12
|
+
name: options.name,
|
|
13
|
+
title: options.title ?? __('Ceník skupina', 'brilo-blocks'),
|
|
14
|
+
description: options.description ?? __('Skupina ceníkových karet (max 3 položky)', 'brilo-blocks'),
|
|
15
|
+
category: options.category ?? 'layout',
|
|
16
|
+
...(options.parent && {parent: options.parent}),
|
|
17
|
+
icon: options.icon ?? {src: defaultIcon},
|
|
18
|
+
supports: {html: false, customClassName: false},
|
|
19
|
+
attributes: {},
|
|
20
|
+
edit: createPriceplanGroupEdit(options),
|
|
21
|
+
save: () => <InnerBlocks.Content />,
|
|
22
|
+
} as unknown as BlockConfiguration<PriceplanGroupAttributes>
|
|
23
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export const icon = (
|
|
2
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<title>Priceplan Group</title>
|
|
4
|
+
<path d="M4 4H8V5H4V4Z" fill="currentColor" />
|
|
5
|
+
<path d="M9 4H16V5H9V4Z" fill="currentColor" />
|
|
6
|
+
<path
|
|
7
|
+
d="M12 2C12 1.44772 12.4477 1 13 1H14C14.5523 1 15 1.44772 15 2C15 2.55228 14.5523 3 14 3H13C12.4477 3 12 2.55228 12 2Z"
|
|
8
|
+
fill="currentColor"
|
|
9
|
+
/>
|
|
10
|
+
<path
|
|
11
|
+
d="M5 2C5 1.44772 5.44772 1 6 1H10C10.5523 1 11 1.44772 11 2C11 2.55228 10.5523 3 10 3H6C5.44772 3 5 2.55228 5 2Z"
|
|
12
|
+
fill="currentColor"
|
|
13
|
+
/>
|
|
14
|
+
<rect x="13.5" y="8.5" width="6" height="10" stroke="currentColor" fill="none" />
|
|
15
|
+
<path
|
|
16
|
+
d="M15 11.5C15 10.6716 15.6716 10 16.5 10C17.3284 10 18 10.6716 18 11.5C18 12.3284 17.3284 13 16.5 13C15.6716 13 15 12.3284 15 11.5Z"
|
|
17
|
+
fill="#357AB5"
|
|
18
|
+
/>
|
|
19
|
+
<rect x="0.5" y="8.5" width="6" height="10" stroke="currentColor" fill="none" />
|
|
20
|
+
<path
|
|
21
|
+
d="M2 11.5C2 10.6716 2.67157 10 3.5 10C4.32843 10 5 10.6716 5 11.5C5 12.3284 4.32843 13 3.5 13C2.67157 13 2 12.3284 2 11.5Z"
|
|
22
|
+
fill="#357AB5"
|
|
23
|
+
/>
|
|
24
|
+
<path d="M2 14H5V15H2V14Z" fill="currentColor" />
|
|
25
|
+
<path d="M2 16H5V17H2V16Z" fill="currentColor" />
|
|
26
|
+
<rect x="6.5" y="7.5" width="7" height="12" stroke="currentColor" fill="none" />
|
|
27
|
+
<path
|
|
28
|
+
d="M8 11C8 9.89543 8.89543 9 10 9C11.1046 9 12 9.89543 12 11C12 12.1046 11.1046 13 10 13C8.89543 13 8 12.1046 8 11Z"
|
|
29
|
+
fill="#357AB5"
|
|
30
|
+
/>
|
|
31
|
+
<path d="M8 14H12V15H8V14Z" fill="currentColor" />
|
|
32
|
+
<path d="M8 16H12V17H8V16Z" fill="currentColor" />
|
|
33
|
+
<path d="M15 14H18V15H15V14Z" fill="currentColor" />
|
|
34
|
+
<path d="M15 16H18V17H15V16Z" fill="currentColor" />
|
|
35
|
+
</svg>
|
|
36
|
+
)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type {PriceplanGroupOptions} from './types'
|
|
2
|
+
|
|
3
|
+
export type {PriceplanGroupAttributes, PriceplanGroupOptions} from './types'
|
|
4
|
+
export {createPriceplanGroupBlock} from './factory'
|
|
5
|
+
|
|
6
|
+
export const priceplanGroupDefaults: PriceplanGroupOptions = {
|
|
7
|
+
name: 'brilo/priceplan-group',
|
|
8
|
+
parent: ['brilo/base-section'],
|
|
9
|
+
allowedBlocks: ['brilo/priceplan-item'],
|
|
10
|
+
template: [
|
|
11
|
+
['brilo/priceplan-item', {}],
|
|
12
|
+
['brilo/priceplan-item', {}],
|
|
13
|
+
['brilo/priceplan-item', {}],
|
|
14
|
+
],
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {__} from '@wordpress/i18n'
|
|
2
|
+
|
|
3
|
+
export const ALIGNMENTS = [
|
|
4
|
+
{value: 'left', label: __('Vlevo', 'brilo-blocks')},
|
|
5
|
+
{value: 'center', label: __('Na střed', 'brilo-blocks')},
|
|
6
|
+
] as const
|
|
7
|
+
|
|
8
|
+
export const CHIP_VARIANTS = [
|
|
9
|
+
{value: 'primary', label: __('Primární', 'brilo-blocks')},
|
|
10
|
+
{value: 'secondary', label: __('Sekundární', 'brilo-blocks')},
|
|
11
|
+
] as const
|