get_name(); } public function get_icon(): string { return 'eicon-call-to-action'; } public function get_categories(): array { return [ 'addronix-addons-for-elementor' ]; } public function get_keywords(): array { return [ 'showcase', 'hero', 'split', 'features', 'content', 'image' ]; } public function get_style_depends(): array { return [ 'aafe-content-showcase-style' ]; } public function get_script_depends(): array { return [ 'aafe-content-showcase-script' ]; } /** * @return array */ private function heading_tag_options(): array { return [ 'h1' => 'H1', 'h2' => 'H2', 'h3' => 'H3', 'h4' => 'H4', 'h5' => 'H5', 'h6' => 'H6', 'div' => 'div', 'span' => 'span', 'p' => 'p', ]; } protected function register_controls(): void { /* ── CONTENT ───────────────────────────────────────── */ $this->start_controls_section( 'section_content', [ 'label' => esc_html__( 'Content', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'eyebrow', [ 'label' => esc_html__( 'Eyebrow Label', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true, 'categories' => [ \Elementor\Modules\DynamicTags\Module::TEXT_CATEGORY ], ], 'default' => esc_html__( 'SUSTAINABLE SAVINGS', 'addronix-addons-for-elementor' ), 'label_block' => true, ] ); $this->add_control( 'heading', [ 'label' => esc_html__( 'Heading', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::TEXTAREA, 'dynamic' => [ 'active' => true, 'categories' => [ \Elementor\Modules\DynamicTags\Module::TEXT_CATEGORY ], ], 'default' => esc_html__( 'We make distributed water reuse simple, sustainable and cost effective.', 'addronix-addons-for-elementor' ), 'label_block' => true, ] ); $this->add_control( 'heading_tag', [ 'label' => esc_html__( 'HTML Tag', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'default' => 'h2', 'options' => $this->heading_tag_options(), ] ); $this->add_control( 'description', [ 'label' => esc_html__( 'Description', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::TEXTAREA, 'dynamic' => [ 'active' => true, 'categories' => [ \Elementor\Modules\DynamicTags\Module::TEXT_CATEGORY ], ], 'default' => esc_html__( 'We view industry as an ecosystem where waste streams are assets for sustainable growth. Our modular solutions deliver cost savings with no capital investment required.', 'addronix-addons-for-elementor' ), 'rows' => 4, ] ); $this->end_controls_section(); $this->start_controls_section( 'section_features', [ 'label' => esc_html__( 'Features', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $repeater = new Repeater(); $repeater->add_control( 'feature_title', [ 'label' => esc_html__( 'Title', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true, 'categories' => [ \Elementor\Modules\DynamicTags\Module::TEXT_CATEGORY ], ], 'default' => esc_html__( 'Cost savings', 'addronix-addons-for-elementor' ), ] ); $repeater->add_control( 'show_description', [ 'label' => esc_html__( 'Show Description', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => esc_html__( 'Yes', 'addronix-addons-for-elementor' ), 'label_off' => esc_html__( 'No', 'addronix-addons-for-elementor' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $repeater->add_control( 'feature_desc', [ 'label' => esc_html__( 'Description', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::TEXTAREA, 'dynamic' => [ 'active' => true, 'categories' => [ \Elementor\Modules\DynamicTags\Module::TEXT_CATEGORY ], ], 'default' => esc_html__( 'Instantly see savings on your clean water and energy bills with a pay-per-gallon model.', 'addronix-addons-for-elementor' ), 'rows' => 3, 'condition' => [ 'show_description' => 'yes' ], ] ); $repeater->add_control( 'feature_link', [ 'label' => esc_html__( 'Link', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::URL, 'dynamic' => [ 'active' => true, 'categories' => [ \Elementor\Modules\DynamicTags\Module::URL_CATEGORY ], ], ] ); $repeater->add_control( 'feature_image', [ 'label' => esc_html__( 'Feature Image (overrides main image on hover)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::MEDIA, 'default' => [ 'url' => \Elementor\Utils::get_placeholder_image_src() ], 'dynamic' => [ 'active' => true, 'categories' => [ \Elementor\Modules\DynamicTags\Module::IMAGE_CATEGORY ], ], ] ); $this->add_control( 'features', [ 'label' => esc_html__( 'Feature Items', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'default' => [ [ 'feature_title' => esc_html__( 'Cost savings', 'addronix-addons-for-elementor' ), 'show_description' => 'yes', 'feature_desc' => esc_html__( 'Instantly see savings on your clean water and energy bills with a pay-per-gallon model that\'s often cheaper than standard utility rates.', 'addronix-addons-for-elementor' ), ], [ 'feature_title' => esc_html__( 'Zero CapEx required', 'addronix-addons-for-elementor' ), 'show_description' => 'yes', 'feature_desc' => esc_html__( 'We handle the system design, installation, and operation. You only pay for performance.', 'addronix-addons-for-elementor' ), ], [ 'feature_title' => esc_html__( 'Sustainable & modular', 'addronix-addons-for-elementor' ), 'show_description' => 'yes', 'feature_desc' => esc_html__( 'Reduce your carbon footprint with a modular solution that grows with your business.', 'addronix-addons-for-elementor' ), ], ], 'title_field' => '{{{ feature_title }}}', ] ); $this->end_controls_section(); $this->start_controls_section( 'section_image', [ 'label' => esc_html__( 'Image', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'image', [ 'label' => esc_html__( 'Image', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::MEDIA, 'dynamic' => [ 'active' => true, 'categories' => [ \Elementor\Modules\DynamicTags\Module::IMAGE_CATEGORY ], ], 'default' => [ 'url' => \Elementor\Utils::get_placeholder_image_src(), ], ] ); $this->add_group_control( Group_Control_Image_Size::get_type(), [ 'name' => 'image', 'default' => 'large', ] ); $this->add_control( 'image_position', [ 'label' => esc_html__( 'Image Position', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'default' => 'right', 'options' => [ 'right' => esc_html__( 'Right', 'addronix-addons-for-elementor' ), 'left' => esc_html__( 'Left', 'addronix-addons-for-elementor' ), ], ] ); $this->end_controls_section(); // AAFE IMPROVEMENT: Entrance Animation section $this->start_controls_section( 'section_entrance_animation', [ 'label' => esc_html__( 'Entrance Animation', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'animation_type', [ 'label' => esc_html__( 'Animation Type', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__( 'None', 'addronix-addons-for-elementor' ), 'fadeIn' => esc_html__( 'Fade In', 'addronix-addons-for-elementor' ), 'fadeInUp' => esc_html__( 'Fade In Up', 'addronix-addons-for-elementor' ), 'fadeInDown' => esc_html__( 'Fade In Down', 'addronix-addons-for-elementor' ), 'fadeInLeft' => esc_html__( 'Fade In Left', 'addronix-addons-for-elementor' ), 'fadeInRight' => esc_html__( 'Fade In Right', 'addronix-addons-for-elementor' ), 'zoomIn' => esc_html__( 'Zoom In', 'addronix-addons-for-elementor' ), ], 'default' => 'none', ] ); $this->add_control( 'animation_duration', [ 'label' => esc_html__( 'Animation Duration (ms)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::NUMBER, 'default' => 600, 'condition' => [ 'animation_type!' => 'none', ], ] ); $this->add_control( 'animation_delay', [ 'label' => esc_html__( 'Animation Delay (ms)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::NUMBER, 'default' => 0, 'condition' => [ 'animation_type!' => 'none', ], ] ); $this->end_controls_section(); /* ── STYLE: WRAPPER ──────────────────────────────────── */ $this->start_controls_section( 'style_wrapper', [ 'label' => esc_html__( 'Wrapper', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'wrapper_bg', 'selector' => '{{WRAPPER}} .aafe-content-showcase-wrapper', ] ); $this->add_responsive_control( 'wrapper_padding', [ 'label' => esc_html__( 'Padding', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%', 'vw' ], 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'wrapper_border_radius', [ 'label' => esc_html__( 'Border Radius', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase-wrapper' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'columns_gap', [ 'label' => esc_html__( 'Columns Gap', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 120 ] ], 'default' => [ 'unit' => 'px', 'size' => 60 ], 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase-wrapper' => 'gap: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'content_column_width', [ 'label' => esc_html__( 'Content Column Width (%)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ '%' ], 'range' => [ '%' => [ 'min' => 20, 'max' => 80 ] ], 'default' => [ 'unit' => '%', 'size' => 55 ], 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase__content' => 'flex: 0 0 {{SIZE}}%;', ], ] ); $this->add_control( 'vertical_align', [ 'label' => esc_html__( 'Vertical Alignment', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'default' => 'center', 'options' => [ 'flex-start' => esc_html__( 'Top', 'addronix-addons-for-elementor' ), 'center' => esc_html__( 'Middle', 'addronix-addons-for-elementor' ), 'flex-end' => esc_html__( 'Bottom', 'addronix-addons-for-elementor' ), ], 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase-wrapper' => 'align-items: {{VALUE}};', ], ] ); $this->end_controls_section(); /* ── STYLE: EYEBROW ───────────────────────────────────── */ $this->start_controls_section( 'style_eyebrow', [ 'label' => esc_html__( 'Eyebrow', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'eyebrow_color', [ 'label' => esc_html__( 'Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'dynamic' => [ 'active' => true ], 'default' => '#0D2137', 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase__eyebrow' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'eyebrow_hover_color', [ 'label' => esc_html__( 'Hover Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'dynamic' => [ 'active' => true ], 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase__eyebrow:hover' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'eyebrow_typography', 'selector' => '{{WRAPPER}} .aafe-content-showcase__eyebrow', 'fields_options' => [ 'typography' => [ 'default' => 'custom' ], 'font_family' => [ 'default' => 'Inter' ], 'font_size' => [ 'default' => [ 'unit' => 'px', 'size' => 12 ], 'tablet_default' => [ 'unit' => 'px', 'size' => 12 ], 'mobile_default' => [ 'unit' => 'px', 'size' => 11 ], ], ], ] ); $this->add_responsive_control( 'eyebrow_margin', [ 'label' => esc_html__( 'Margin Bottom', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'default' => [ 'unit' => 'px', 'size' => 16 ], 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase__eyebrow' => 'margin-bottom: {{SIZE}}{{UNIT}};', ], ] ); $this->end_controls_section(); /* ── STYLE: HEADING ───────────────────────────────────── */ $this->start_controls_section( 'style_heading', [ 'label' => esc_html__( 'Heading', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'heading_color', [ 'label' => esc_html__( 'Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'dynamic' => [ 'active' => true ], 'default' => '#0D2137', 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase__heading' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'heading_hover_color', [ 'label' => esc_html__( 'Hover Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'dynamic' => [ 'active' => true ], 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase__heading:hover' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'heading_typography', 'selector' => '{{WRAPPER}} .aafe-content-showcase__heading', 'fields_options' => [ 'typography' => [ 'default' => 'custom' ], 'font_family' => [ 'default' => 'Sora' ], 'font_size' => [ 'default' => [ 'unit' => 'px', 'size' => 40 ], 'tablet_default' => [ 'unit' => 'px', 'size' => 32 ], 'mobile_default' => [ 'unit' => 'px', 'size' => 26 ], ], ], ] ); $this->add_responsive_control( 'heading_margin', [ 'label' => esc_html__( 'Margin Bottom', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'default' => [ 'unit' => 'px', 'size' => 24 ], 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase__heading' => 'margin-bottom: {{SIZE}}{{UNIT}};', ], ] ); $this->end_controls_section(); /* ── STYLE: DESCRIPTION ───────────────────────────────── */ $this->start_controls_section( 'style_description', [ 'label' => esc_html__( 'Description', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'desc_color', [ 'label' => esc_html__( 'Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'dynamic' => [ 'active' => true ], 'default' => '#3B4A5A', 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase__description' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'desc_hover_color', [ 'label' => esc_html__( 'Hover Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'dynamic' => [ 'active' => true ], 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase__description:hover' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'desc_typography', 'selector' => '{{WRAPPER}} .aafe-content-showcase__description', 'fields_options' => [ 'typography' => [ 'default' => 'custom' ], 'font_family' => [ 'default' => 'Inter' ], 'font_size' => [ 'default' => [ 'unit' => 'px', 'size' => 15 ], 'tablet_default' => [ 'unit' => 'px', 'size' => 14 ], 'mobile_default' => [ 'unit' => 'px', 'size' => 14 ], ], ], ] ); $this->add_responsive_control( 'desc_margin', [ 'label' => esc_html__( 'Margin Bottom', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'default' => [ 'unit' => 'px', 'size' => 40 ], 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase__description' => 'margin-bottom: {{SIZE}}{{UNIT}};', ], ] ); $this->end_controls_section(); /* ── STYLE: FEATURES ──────────────────────────────────── */ $this->start_controls_section( 'style_features', [ 'label' => esc_html__( 'Features', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'features_gap', [ 'label' => esc_html__( 'Gap Between Items', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'default' => [ 'unit' => 'px', 'size' => 32 ], 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase__features' => 'gap: {{SIZE}}{{UNIT}};', ], ] ); $this->start_controls_tabs( 'feature_item_tabs' ); $this->start_controls_tab( 'feature_item_normal', [ 'label' => esc_html__( 'Normal', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'feature_border_color', [ 'label' => esc_html__( 'Border Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'dynamic' => [ 'active' => true ], 'default' => '#0D2137', 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase__feature' => 'border-inline-start-color: {{VALUE}};', ], ] ); $this->add_control( 'feature_title_color', [ 'label' => esc_html__( 'Title Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'dynamic' => [ 'active' => true ], 'default' => '#0D2137', 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase__feature-title' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'feature_desc_color', [ 'label' => esc_html__( 'Description Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'dynamic' => [ 'active' => true ], 'default' => '#3B4A5A', 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase__feature-desc' => 'color: {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'feature_item_hover', [ 'label' => esc_html__( 'Hover', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'feature_border_color_hover', [ 'label' => esc_html__( 'Border Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'dynamic' => [ 'active' => true ], 'default' => '#4F46E5', 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase__feature:hover' => 'border-inline-start-color: {{VALUE}};', ], ] ); $this->add_control( 'feature_bg_hover', [ 'label' => esc_html__( 'Background', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'dynamic' => [ 'active' => true ], 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase__feature:hover' => 'background: {{VALUE}};', ], ] ); $this->add_control( 'feature_title_color_hover', [ 'label' => esc_html__( 'Title Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'dynamic' => [ 'active' => true ], 'default' => '#4F46E5', 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase__feature:hover .aafe-content-showcase__feature-title' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'feature_desc_color_hover', [ 'label' => esc_html__( 'Description Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'dynamic' => [ 'active' => true ], 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase__feature:hover .aafe-content-showcase__feature-desc' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'feature_hover_transform', [ 'label' => esc_html__( 'Hover Transform', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'default' => 'none', 'options' => [ 'none' => esc_html__( 'None', 'addronix-addons-for-elementor' ), 'translate-y' => esc_html__( 'Translate Y (-4px)', 'addronix-addons-for-elementor' ), 'scale' => esc_html__( 'Scale (1.02)', 'addronix-addons-for-elementor' ), ], 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase__feature:hover' => 'transform: {{VALUE}};', ], 'selectors_dictionary' => [ 'none' => 'none', 'translate-y' => 'translateY(-4px)', 'scale' => 'scale(1.02)', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_control( 'feature_border_width', [ 'label' => esc_html__( 'Border Width', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 1, 'max' => 10 ] ], 'default' => [ 'unit' => 'px', 'size' => 3 ], 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase__feature' => 'border-inline-start-width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'feature_padding', [ 'label' => esc_html__( 'Item Padding', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => '0', 'right' => '0', 'bottom' => '0', 'left' => '20', 'unit' => 'px', 'isLinked' => false, ], 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase__feature' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'feature_title_typography', 'label' => esc_html__( 'Title Typography', 'addronix-addons-for-elementor' ), 'selector' => '{{WRAPPER}} .aafe-content-showcase__feature-title', 'fields_options' => [ 'typography' => [ 'default' => 'custom' ], 'font_family' => [ 'default' => 'Sora' ], ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'feature_desc_typography', 'label' => esc_html__( 'Description Typography', 'addronix-addons-for-elementor' ), 'selector' => '{{WRAPPER}} .aafe-content-showcase__feature-desc', 'fields_options' => [ 'typography' => [ 'default' => 'custom' ], 'font_family' => [ 'default' => 'Inter' ], ], ] ); $this->end_controls_section(); /* ── STYLE: IMAGE ─────────────────────────────────────── */ $this->start_controls_section( 'style_image', [ 'label' => esc_html__( 'Image', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'image_border_radius', [ 'label' => esc_html__( 'Border Radius', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => '14', 'right' => '14', 'bottom' => '14', 'left' => '14', 'unit' => 'px', 'isLinked' => true, ], 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase__image img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'image_height', [ 'label' => esc_html__( 'Image Height', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', 'vh', '%' ], 'range' => [ 'px' => [ 'min' => 100, 'max' => 1000 ] ], 'default' => [ 'unit' => 'px', 'size' => 560 ], 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase__image img' => 'height: {{SIZE}}{{UNIT}}; object-fit: cover;', ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'image_shadow', 'selector' => '{{WRAPPER}} .aafe-content-showcase__image img', ] ); $this->add_control( 'image_hover_opacity', [ 'label' => esc_html__( 'Hover Opacity', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 1, 'step' => 0.01 ] ], 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase__image:hover img' => 'opacity: {{SIZE}};', ], ] ); $this->end_controls_section(); /* ── STYLE: HOVER EFFECTS ─────────────────────────────── */ $this->start_controls_section( 'style_hover_effects', [ 'label' => esc_html__( 'Hover Effects', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'hover_effect_type', [ 'label' => esc_html__( 'Hover Effect Type', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'default' => 'none', 'options' => [ 'none' => esc_html__( 'None', 'addronix-addons-for-elementor' ), 'lift' => esc_html__( 'Lift', 'addronix-addons-for-elementor' ), 'glow' => esc_html__( 'Glow', 'addronix-addons-for-elementor' ), 'scale' => esc_html__( 'Scale', 'addronix-addons-for-elementor' ), 'border-pop' => esc_html__( 'Border Pop', 'addronix-addons-for-elementor' ), 'overlay' => esc_html__( 'Overlay', 'addronix-addons-for-elementor' ), 'shine' => esc_html__( 'Shine', 'addronix-addons-for-elementor' ), ], ] ); $this->add_control( 'hover_duration', [ 'label' => esc_html__( 'Transition Duration (ms)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 100, 'max' => 800 ] ], 'default' => [ 'size' => 300 ], 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase-wrapper *' => 'transition-duration: {{SIZE}}ms;', ], ] ); $this->add_control( 'hover_easing', [ 'label' => esc_html__( 'Transition Easing', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'default' => 'ease', 'options' => [ 'ease' => 'ease', 'ease-in' => 'ease-in', 'ease-out' => 'ease-out', 'ease-in-out' => 'ease-in-out', 'linear' => 'linear', ], 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase-wrapper *' => 'transition-timing-function: {{VALUE}};', ], ] ); $this->add_control( 'hover_overlay_color', [ 'label' => esc_html__( 'Overlay Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'dynamic' => [ 'active' => true ], 'default' => 'rgba(0,0,0,0.5)', 'condition' => [ 'hover_effect_type' => 'overlay' ], 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase-wrapper' => '--aafe-hover-overlay: {{VALUE}};', ], ] ); $this->add_control( 'hover_overlay_opacity', [ 'label' => esc_html__( 'Overlay Opacity', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 1, 'step' => 0.01 ] ], 'default' => [ 'size' => 0.5 ], 'condition' => [ 'hover_effect_type' => 'overlay' ], 'selectors' => [ '{{WRAPPER}} .aafe-content-showcase-wrapper' => '--aafe-hover-overlay-opacity: {{SIZE}};', ], ] ); $this->add_control( 'hover_scale', [ 'label' => esc_html__( 'Scale Amount', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 1.00, 'max' => 1.20, 'step' => 0.01 ] ], 'default' => [ 'size' => 1.03 ], 'condition' => [ 'hover_effect_type' => [ 'scale', 'lift', 'border-pop' ], ], ] ); $this->end_controls_section(); } protected function render(): void { $s = $this->get_settings_for_display(); $image_pos_class = 'right' === ( $s['image_position'] ?? 'right' ) ? '' : ' aafe-content-showcase-wrapper--img-left'; $default_img_url = ! empty( $s['image']['url'] ) ? $s['image']['url'] : ''; $default_img_id = absint( $s['image']['id'] ?? 0 ); $img_size = ! empty( $s['image_size'] ) ? $s['image_size'] : 'large'; $hover_type = $s['hover_effect_type'] ?? 'none'; $hover_scale = isset( $s['hover_scale']['size'] ) ? $s['hover_scale']['size'] : 1.03; $hover_duration = isset( $s['hover_duration']['size'] ) ? $s['hover_duration']['size'] : 300; $allowed_tags = array_keys( $this->heading_tag_options() ); $heading_tag = in_array( $s['heading_tag'] ?? '', $allowed_tags, true ) ? $s['heading_tag'] : 'h2'; $feature_images = []; if ( ! empty( $s['features'] ) && is_array( $s['features'] ) ) { foreach ( $s['features'] as $feat_index => $feat ) { if ( ! empty( $feat['feature_image']['url'] ) ) { $feature_images[] = [ 'id' => absint( $feat['feature_image']['id'] ?? 0 ), 'url' => $feat['feature_image']['url'], 'key' => ! empty( $feat['_id'] ) ? $feat['_id'] : 'f' . $feat_index, ]; } } } // AAFE IMPROVEMENT: Entrance Animation section $this->add_render_attribute( 'wrapper', [ 'class' => 'aafe-content-showcase-wrapper' . $image_pos_class, 'data-hover' => $hover_type, 'style' => '--aafe-hover-scale: ' . esc_attr( $hover_scale ) . '; --aafe-transition: ' . esc_attr( $hover_duration ) . 'ms;', ] ); if ( ! empty( $s['animation_type'] ) && 'none' !== $s['animation_type'] ) { $this->add_render_attribute( 'wrapper', [ 'data-aafe-animation' => $s['animation_type'], 'data-aafe-duration' => $s['animation_duration'] ?? 600, 'data-aafe-delay' => $s['animation_delay'] ?? 0, ] ); } ?>
print_render_attribute_string( 'wrapper' ); ?>>
%2$s', $heading_tag, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Tag name is sanitized. wp_kses_post( $s['heading'] ) ); ?>

$feature ) : $has_img = ! empty( $feature['feature_image']['url'] ); $has_link = ! empty( $feature['feature_link']['url'] ); $feat_key = esc_attr( ! empty( $feature['_id'] ) ? $feature['_id'] : 'f' . $feature_index ); $aria = $has_img ? ' tabindex="0" role="button" aria-expanded="false" aria-label="' . esc_attr( $feature['feature_title'] ) . '"' : ''; ?>
>

%4$s', esc_url( $feature['feature_link']['url'] ), esc_attr( $target ), esc_attr( $nofollow ), esc_html( $feature['feature_title'] ) ); else : echo esc_html( $feature['feature_title'] ); endif; ?>

'aafe-content-showcase__img aafe-cs-img--default aafe-cs-img--active', 'loading' => 'lazy', 'alt' => '', 'data-img-key' => 'default', ] ); } else { printf( '', esc_url( $default_img_url ) ); } foreach ( $feature_images as $fi ) { if ( $fi['id'] ) { echo wp_get_attachment_image( $fi['id'], $img_size, false, [ 'class' => 'aafe-content-showcase__img aafe-cs-img--feature', 'loading' => 'lazy', 'alt' => '', 'data-img-key' => esc_attr( $fi['key'] ), ] ); } else { printf( '', esc_url( $fi['url'] ), esc_attr( $fi['key'] ) ); } } ?>
<# var imgPos = settings.image_position === 'left' ? ' aafe-content-showcase-wrapper--img-left' : ''; var hoverType = settings.hover_effect_type || 'none'; var hoverScale = settings.hover_scale && settings.hover_scale.size ? settings.hover_scale.size : 1.03; var hoverDuration = settings.hover_duration && settings.hover_duration.size ? settings.hover_duration.size : 300; var headingTag = settings.heading_tag || 'h2'; #>
<# if ( settings.eyebrow ) { #> {{{ settings.eyebrow }}} <# } #> <# if ( settings.heading ) { #> <{{{ headingTag }}} class="aafe-content-showcase__heading">{{{ settings.heading }}} <# } #> <# if ( settings.description ) { #>

{{{ settings.description }}}

<# } #> <# if ( settings.features && settings.features.length ) { #>
<# _.each( settings.features, function( item ) { var hasImg = item.feature_image && item.feature_image.url; var ariaAttr = hasImg ? ' tabindex="0" role="button" aria-expanded="false" aria-label="' + _.escape(item.feature_title) + '"' : ''; #>
data-feature-key="{{ item._id }}"<# } #>{{{ ariaAttr }}}> <# if ( item.feature_title ) { #>

<# if ( item.feature_link && item.feature_link.url ) { #> {{{ item.feature_title }}} <# } else { #> {{{ item.feature_title }}} <# } #>

<# } #> <# if ( item.show_description === 'yes' && item.feature_desc ) { #>

{{{ item.feature_desc }}}

<# } #>
<# }); #>
<# } #>
<# if ( settings.image && settings.image.url ) { #>
<# _.each( settings.features, function( item ) { if ( item.feature_image && item.feature_image.url ) { #> <# } }); #>
<# } #>