], 'em' => [ 'min' => -100, 'max' => 100, ], '%' => [ 'min' => -100, 'max' => 100, ], 'vw' => [ 'min' => -100, 'max' => 100, ], ], 'default' => [ 'unit' => '%', 'size' => 0, ], 'selectors' => $this->get_mask_selectors( '-webkit-mask-position-x: {{SIZE}}{{UNIT}};' ), 'condition' => [ '_mask_switch!' => '', '_mask_position' => 'custom', ], ] ); $this->add_responsive_control( '_mask_position_y', [ 'label' => esc_html__( 'Y Position', 'elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', 'em', '%', 'vw' ], 'range' => [ 'px' => [ 'min' => -500, 'max' => 500, ], 'em' => [ 'min' => -100, 'max' => 100, ], '%' => [ 'min' => -100, 'max' => 100, ], 'vw' => [ 'min' => -100, 'max' => 100, ], ], 'default' => [ 'unit' => '%', 'size' => 0, ], 'selectors' => $this->get_mask_selectors( '-webkit-mask-position-y: {{SIZE}}{{UNIT}};' ), 'condition' => [ '_mask_switch!' => '', '_mask_position' => 'custom', ], ] ); $this->add_responsive_control( '_mask_repeat', [ 'label' => esc_html__( 'Repeat', 'elementor' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'no-repeat' => esc_html__( 'No-Repeat', 'elementor' ), 'repeat' => esc_html__( 'Repeat', 'elementor' ), 'repeat-x' => esc_html__( 'Repeat-X', 'elementor' ), 'repeat-Y' => esc_html__( 'Repeat-Y', 'elementor' ), 'round' => esc_html__( 'Round', 'elementor' ), 'space' => esc_html__( 'Space', 'elementor' ), ], 'default' => 'no-repeat', 'selectors' => $this->get_mask_selectors( '-webkit-mask-repeat: {{VALUE}};' ), 'condition' => [ '_mask_switch!' => '', '_mask_size!' => 'cover', ], ] ); $this->end_controls_section(); $this->start_controls_section( '_section_position', [ 'label' => esc_html__( 'Positioning', 'elementor' ), 'tab' => Controls_Manager::TAB_ADVANCED, ] ); $this->add_responsive_control( '_element_width', [ 'label' => esc_html__( 'Width', 'elementor' ), 'type' => Controls_Manager::SELECT, 'default' => '', 'options' => [ '' => esc_html__( 'Default', 'elementor' ), 'inherit' => esc_html__( 'Full Width', 'elementor' ) . ' (100%)', 'auto' => esc_html__( 'Inline', 'elementor' ) . ' (auto)', 'initial' => esc_html__( 'Custom', 'elementor' ), ], 'selectors_dictionary' => [ 'inherit' => '100%', ], 'prefix_class' => 'elementor-widget%s__width-', 'selectors' => [ '{{WRAPPER}}' => 'width: {{VALUE}}; max-width: {{VALUE}}', ], ] ); $this->add_responsive_control( '_element_custom_width', [ 'label' => esc_html__( 'Custom Width', 'elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'max' => 1000, 'step' => 1, ], '%' => [ 'max' => 100, 'step' => 1, ], ], 'condition' => [ '_element_width' => 'initial', ], 'device_args' => $this->get_responsive_device_args( [ 'condition' => [ '_element_width_{{DEVICE}}' => [ 'initial' ], ], ] ), 'size_units' => [ 'px', '%', 'vw' ], 'selectors' => [ '{{WRAPPER}}' => 'width: {{SIZE}}{{UNIT}}; max-width: {{SIZE}}{{UNIT}}', ], ] ); $this->add_responsive_control( '_element_vertical_align', [ 'label' => esc_html__( 'Vertical Align', 'elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'flex-start' => [ 'title' => esc_html__( 'Start', 'elementor' ), 'icon' => 'eicon-v-align-top', ], 'center' => [ 'title' => esc_html__( 'Center', 'elementor' ), 'icon' => 'eicon-v-align-middle', ], 'flex-end' => [ 'title' => esc_html__( 'End', 'elementor' ), 'icon' => 'eicon-v-align-bottom', ], ], 'condition' => [ '_element_width!' => '', '_position' => '', ], 'selectors' => [ '{{WRAPPER}}' => 'align-self: {{VALUE}}', ], ] ); $this->add_control( '_position_description', [ 'raw' => '' . esc_html__( 'Please note!', 'elementor' ) . ' ' . esc_html__( 'Custom positioning is not considered best practice for responsive web design and should not be used too frequently.', 'elementor' ), 'type' => Controls_Manager::RAW_HTML, 'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning', 'render_type' => 'ui', 'condition' => [ '_position!' => '', ], ] ); $this->add_control( '_position', [ 'label' => esc_html__( 'Position', 'elementor' ), 'type' => Controls_Manager::SELECT, 'default' => '', 'options' => [ '' => esc_html__( 'Default', 'elementor' ), 'absolute' => esc_html__( 'Absolute', 'elementor' ), 'fixed' => esc_html__( 'Fixed', 'elementor' ), ], 'prefix_class' => 'elementor-', 'frontend_available' => true, ] ); $start = is_rtl() ? esc_html__( 'Right', 'elementor' ) : esc_html__( 'Left', 'elementor' ); $end = ! is_rtl() ? esc_html__( 'Right', 'elementor' ) : esc_html__( 'Left', 'elementor' ); $this->add_control( '_offset_orientation_h', [ 'label' => esc_html__( 'Horizontal Orientation', 'elementor' ), 'type' => Controls_Manager::CHOOSE, 'toggle' => false, 'default' => 'start', 'options' => [ 'start' => [ 'title' => $start, 'icon' => 'eicon-h-align-left', ], 'end' => [ 'title' => $end, 'icon' => 'eicon-h-align-right', ], ], 'classes' => 'elementor-control-start-end', 'render_type' => 'ui', 'condition' => [ '_position!' => '', ], ] ); $this->add_responsive_control( '_offset_x', [ 'label' => esc_html__( 'Offset', 'elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => -1000, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => -200, 'max' => 200, ], 'vw' => [ 'min' => -200, 'max' => 200, ], 'vh' => [ 'min' => -200, 'max' => 200, ], ], 'default' => [ 'size' => '0', ], 'size_units' => [ 'px', '%', 'vw', 'vh' ], 'selectors' => [ 'body:not(.rtl) {{WRAPPER}}' => 'left: {{SIZE}}{{UNIT}}', 'body.rtl {{WRAPPER}}' => 'right: {{SIZE}}{{UNIT}}', ], 'condition' => [ '_offset_orientation_h!' => 'end', '_position!' => '', ], ] ); $this->add_responsive_control( '_offset_x_end', [ 'label' => esc_html__( 'Offset', 'elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => -1000, 'max' => 1000, 'step' => 0.1, ], '%' => [ 'min' => -200, 'max' => 200, ], 'vw' => [ 'min' => -200, 'max' => 200, ], 'vh' => [ 'min' => -200, 'max' => 200, ], ], 'default' => [ 'size' => '0', ], 'size_units' => [ 'px', '%', 'vw', 'vh' ], 'selectors' => [ 'body:not(.rtl) {{WRAPPER}}' => 'right: {{SIZE}}{{UNIT}}', 'body.rtl {{WRAPPER}}' => 'left: {{SIZE}}{{UNIT}}', ], 'condition' => [ '_offset_orientation_h' => 'end', '_position!' => '', ], ] ); $this->add_control( '_offset_orientation_v', [ 'label' => esc_html__( 'Vertical Orientation', 'elementor' ), 'type' => Controls_Manager::CHOOSE, 'toggle' => false, 'default' => 'start', 'options' => [ 'start' => [ 'title' => esc_html__( 'Top', 'elementor' ), 'icon' => 'eicon-v-align-top', ], 'end' => [ 'title' => esc_html__( 'Bottom', 'elementor' ), 'icon' => 'eicon-v-align-bottom', ], ], 'render_type' => 'ui', 'condition' => [ '_position!' => '', ], ] ); $this->add_responsive_control( '_offset_y', [ 'label' => esc_html__( 'Offset', 'elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => -1000, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => -200, 'max' => 200, ], 'vh' => [ 'min' => -200, 'max' => 200, ], 'vw' => [ 'min' => -200, 'max' => 200, ], ], 'size_units' => [ 'px', '%', 'vh', 'vw' ], 'default' => [ 'size' => '0', ], 'selectors' => [ '{{WRAPPER}}' => 'top: {{SIZE}}{{UNIT}}', ], 'condition' => [ '_offset_orientation_v!' => 'end', '_position!' => '', ], ] ); $this->add_responsive_control( '_offset_y_end', [ 'label' => esc_html__( 'Offset', 'elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => -1000, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => -200, 'max' => 200, ], 'vh' => [ 'min' => -200, 'max' => 200, ], 'vw' => [ 'min' => -200, 'max' => 200, ], ], 'size_units' => [ 'px', '%', 'vh', 'vw' ], 'default' => [ 'size' => '0', ], 'selectors' => [ '{{WRAPPER}}' => 'bottom: {{SIZE}}{{UNIT}}', ], 'condition' => [ '_offset_orientation_v' => 'end', '_position!' => '', ], ] ); $this->end_controls_section(); $this->start_controls_section( '_section_responsive', [ 'label' => esc_html__( 'Responsive', 'elementor' ), 'tab' => Controls_Manager::TAB_ADVANCED, ] ); $this->add_control( 'responsive_description', [ 'raw' => esc_html__( 'Responsive visibility will take effect only on preview or live page, and not while editing in Elementor.', 'elementor' ), 'type' => Controls_Manager::RAW_HTML, 'content_classes' => 'elementor-descriptor', ] ); $this->add_hidden_device_controls(); $this->end_controls_section(); Plugin::$instance->controls_manager->add_custom_attributes_controls( $this ); Plugin::$instance->controls_manager->add_custom_css_controls( $this ); } }