'label' => __('Box Shadow', 'essential-addons-for-elementor-lite'), 'selector' => '{{WRAPPER}} .eael-toc:not(.collapsed)', 'condition' => [ 'eael_ext_table_of_content' => 'yes', ], ] ); $element->add_control( 'eael_ext_toc_box_border_radius', [ 'label' => __('Border Radius', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 50, 'step' => 1, ], ], 'default' => [ 'unit' => 'px', 'size' => 5, ], 'selectors' => [ '{{WRAPPER}} .eael-toc:not(.eael-toc-right)' => 'border-top-right-radius: {{SIZE}}{{UNIT}}; border-bottom-right-radius: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .eael-toc:not(.eael-toc-right) .eael-toc-header' => 'border-top-right-radius: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .eael-toc:not(.eael-toc-right) .eael-toc-body' => 'border-bottom-right-radius: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .eael-toc.eael-toc-right' => 'border-top-left-radius: {{SIZE}}{{UNIT}}; border-bottom-left-radius: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .eael-toc.eael-toc-right .eael-toc-header' => 'border-top-left-radius: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .eael-toc.eael-toc-right .eael-toc-body' => 'border-bottom-left-radius: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'eael_ext_table_of_content' => 'yes', ], ] ); $element->end_controls_section(); $element->start_controls_section( 'eael_ext_table_of_content_header_style', [ 'label' => esc_html__('EA TOC Header', 'essential-addons-for-elementor-lite'), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'eael_ext_table_of_content' => 'yes', ], ] ); $element->add_control( 'eael_ext_table_of_content_header_bg', [ 'label' => __('Background Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#ff7d50', 'selectors' => [ '{{WRAPPER}} .eael-toc .eael-toc-header' => 'background-color: {{VALUE}}', '{{WRAPPER}} .eael-toc.collapsed .eael-toc-button' => 'background-color: {{VALUE}}', ], ] ); $element->add_control( 'eael_ext_table_of_content_header_text_color', [ 'label' => __('Text Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .eael-toc .eael-toc-header .eael-toc-title' => 'color: {{VALUE}}', '{{WRAPPER}} .eael-toc.collapsed .eael-toc-button' => 'color: {{VALUE}}', ], ] ); $element->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'eael_ext_table_of_content_header_typography', 'selector' => '{{WRAPPER}} .eael-toc-header .eael-toc-title,{{WRAPPER}} .eael-toc.collapsed .eael-toc-button', 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_SECONDARY ], ] ); $element->add_control( 'eael_ext_toc_header_padding', [ 'label' => esc_html__('Padding', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px'], 'selectors' => [ '{{WRAPPER}} .eael-toc .eael-toc-header' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $element->add_control( 'eael_ext_toc_header_collapse_close_button', [ 'label' => __('Collapse', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $element->add_control( 'eael_ext_table_of_content_header_icon', [ 'label' => __('Icon', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::ICONS, 'label_block' => true, 'default' => [ 'value' => 'fas fa-list', 'library' => 'fa-solid', ], 'fa4compatibility' => 'icon', ] ); $element->add_control( 'eael_ext_toc_close_button_text_style', [ 'label' => __('Text Orientation', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::SELECT, 'default' => 'top_to_bottom', 'options' => [ 'top_to_bottom' => __('Top to Bottom', 'essential-addons-for-elementor-lite'), 'bottom_to_top' => __('Bottom to Top', 'essential-addons-for-elementor-lite'), ], ] ); $element->add_control( 'eael_ext_table_of_content_close_button', [ 'label' => __('Close Button', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $element->add_control( 'eael_ext_table_of_content_close_button_icon_size', [ 'label' => __('Icon Size', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .eael-toc .eael-toc-close' => 'font-size: {{SIZE}}{{UNIT}};', ], ] ); $element->add_control( 'eael_ext_table_of_content_close_button_size', [ 'label' => __('Button Size', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .eael-toc .eael-toc-close' => 'height: {{SIZE}}{{UNIT}};width: {{SIZE}}{{UNIT}};', ], ] ); $element->add_control( 'eael_ext_table_of_content_close_button_line_height', [ 'label' => __('Line Height', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .eael-toc .eael-toc-close' => 'line-height: {{SIZE}}{{UNIT}};', ], ] ); $element->add_control( 'eael_ext_table_of_content_close_button_bg', [ 'label' => __('Background Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .eael-toc .eael-toc-close' => 'background-color: {{VALUE}}', ], ] ); $element->add_control( 'eael_ext_table_of_content_close_button_text_color', [ 'label' => __('Close Button Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#ff7d50', 'selectors' => [ '{{WRAPPER}} .eael-toc .eael-toc-close' => 'color: {{VALUE}}', ], ] ); $element->add_control( 'eael_ext_table_of_content_close_button_border_radius', [ 'label' => __('Border Radius', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .eael-toc .eael-toc-close' => 'border-radius: {{SIZE}}{{UNIT}};', ], ] ); $element->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'eael_ext_table_of_content_close_button_box_shadow', 'label' => __('Box Shadow', 'essential-addons-for-elementor-lite'), 'selector' => '{{WRAPPER}} .eael-toc .eael-toc-close', ] ); $element->end_controls_section(); $element->start_controls_section( 'eael_ext_table_of_content_list_style_section', [ 'label' => esc_html__('EA TOC Body', 'essential-addons-for-elementor-lite'), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'eael_ext_table_of_content' => 'yes', ], ] ); $element->add_control( 'eael_ext_table_of_content_body_bg', [ 'label' => __('Background Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#fff6f3', 'selectors' => [ '{{WRAPPER}} .eael-toc .eael-toc-body' => 'background-color: {{VALUE}}', ], ] ); $element->add_control( 'eael_ext_toc_body_padding', [ 'label' => esc_html__('Padding', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px'], 'selectors' => [ '{{WRAPPER}} .eael-toc .eael-toc-body' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $element->add_control( 'eael_ext_table_of_content_list_style_separator', [ 'label' => __('List', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $element->add_control( 'eael_ext_table_of_content_list_style', [ 'label' => __('Indicator Style', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::SELECT, 'default' => 'none', 'options' => [ 'none' => __('None', 'essential-addons-for-elementor-lite'), 'arrow' => __('Arrow', 'essential-addons-for-elementor-lite'), 'bar' => __('Bar', 'essential-addons-for-elementor-lite'), ], ] ); $element->add_control( 'eael_ext_toc_indicator_size', [ 'label' => __('Indicator Size', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], ], 'default' => [ 'unit' => 'px', 'size' => 20, ], 'selectors' => [ '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list.eael-toc-list-bar li.eael-highlight-active > a:after' => 'height: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'eael_ext_table_of_content_list_style' => 'bar', ], ] ); $element->add_control( 'eael_ext_toc_indicator_position', [ 'label' => __('Indicator Position', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => -100, 'max' => 100, 'step' => 1, ], ], 'default' => [ 'unit' => 'px', 'size' => 0, ], 'selectors' => [ '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list.eael-toc-list-arrow li.eael-highlight-active > a:before' => 'margin-top: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list.eael-toc-list-bar li.eael-highlight-active > a:after' => 'margin-top: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'eael_ext_table_of_content_list_style!' => 'none', ], ] ); $element->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'eael_ext_table_of_content_list_typography_normal', 'selector' => '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list', 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_SECONDARY ], ] ); $element->start_controls_tabs('ea_toc_list_style'); $element->start_controls_tab('normal', [ 'label' => __('Normal', 'essential-addons-for-elementor-lite'), ] ); $element->add_control( 'eael_ext_table_of_content_list_text_color', [ 'label' => __('Text Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#707070', 'selectors' => [ '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list li' => 'color: {{VALUE}}', '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list.eael-toc-number li:before' => 'color: {{VALUE}}', '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list.eael-toc-bullet li:before' => 'background-color: {{VALUE}}', '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list li a' => 'color: {{VALUE}}', ], ] ); $element->end_controls_tab(); $element->start_controls_tab('hover', [ 'label' => __('Hover', 'essential-addons-for-elementor-lite'), ] ); $element->add_control( 'eael_ext_table_of_list_hover_color', [ 'label' => __('Text Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#ff7d50', 'selectors' => [ '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list li:hover' => 'color: {{VALUE}}', '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list.eael-toc-number li:hover:before' => 'color: {{VALUE}}', '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list.eael-toc-bullet li:hover:before' => 'background-color: {{VALUE}}', '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list li:hover > a' => 'color: {{VALUE}}', '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list li:hover > a:before' => 'border-bottom-color: {{VALUE}}', '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list li:hover > a:after' => 'background-color: {{VALUE}}', ], ] ); $element->end_controls_tab(); // hover $element->start_controls_tab('active', [ 'label' => __('Active', 'essential-addons-for-elementor-lite'), ] ); $element->add_control( 'eael_ext_table_of_content_list_text_color_active', [ 'label' => __('Text Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#ff7d50', 'selectors' => [ '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list li.eael-highlight-active' => 'color: {{VALUE}}', '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list.eael-toc-number li.eael-highlight-active:before' => 'color: {{VALUE}}', '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list.eael-toc-bullet li.eael-highlight-active:before' => 'background-color: {{VALUE}}', '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list li.eael-highlight-active > a' => 'color: {{VALUE}}', '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list li.eael-highlight-active > a:before' => 'border-bottom-color: {{VALUE}}', '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list li.eael-highlight-active > a:after' => 'background-color: {{VALUE}}', '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list li.eael-highlight-parent' => 'color: {{VALUE}}', '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list.eael-toc-number li.eael-highlight-parent:before' => 'color: {{VALUE}}', '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list.eael-toc-bullet li.eael-highlight-parent:before' => 'background-color: {{VALUE}}', '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list li.eael-highlight-parent > a' => 'color: {{VALUE}}', ], ] ); $element->end_controls_tab(); // active $element->end_controls_tabs(); $element->add_control( 'eael_ext_toc_top_level_space', [ 'label' => __('Top Level Space', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 50, 'step' => 1, ], ], 'default' => [ 'unit' => 'px', 'size' => 8, ], 'selectors' => [ '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list li' => 'padding-top: {{SIZE}}{{UNIT}}; padding-bottom: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'eael_ext_table_of_content' => 'yes', ], ] ); $element->add_control( 'eael_ext_toc_subitem_level_space', [ 'label' => __('Sub Item Space', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 20, 'step' => 1, ], ], 'default' => [ 'unit' => 'px', 'size' => 1, ], 'selectors' => [ '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list li ul li' => 'padding-top: {{SIZE}}{{UNIT}}; padding-bottom: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'eael_ext_table_of_content' => 'yes', ], ] ); $element->add_control( 'eael_ext_table_of_content_list_separator', [ 'label' => __('Separator', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $element->add_control( 'eael_ext_table_of_content_list_separator_style', [ 'label' => __('Style', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::SELECT, 'default' => 'dashed', 'options' => [ 'solid' => __('Solid', 'essential-addons-for-elementor-lite'), 'dashed' => __('Dashed', 'essential-addons-for-elementor-lite'), 'dotted' => __('Dotted', 'essential-addons-for-elementor-lite'), 'none' => __('None', 'essential-addons-for-elementor-lite'), ], 'selectors' => [ '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list > li:not(:last-child)' => 'border-bottom: 0.5px {{VALUE}}', ], ] ); $element->add_control( 'eael_ext_table_of_content_list_separator_color', [ 'label' => __('Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-toc .eael-toc-body .eael-toc-list > li:not(:last-child)' => 'border-bottom-color: {{VALUE}}', ], 'default' => '#c6c4cf', 'condition' => [ 'eael_ext_table_of_content_list_separator_style!' => 'none', ], ] ); $element->end_controls_section(); } }