term_id] = $menu->name;
}
return $options;
}
protected function register_controls()
{
/**
* Content: General
*/
$this->start_controls_section(
'eael_simple_menu_section_general',
[
'label' => esc_html__('General', 'essential-addons-for-elementor-lite'),
]
);
$simple_menus = $this->get_simple_menus();
if ($simple_menus) {
$this->add_control(
'eael_simple_menu_menu',
[
'label' => esc_html__('Select Menu', 'essential-addons-for-elementor-lite'),
'description' => sprintf(__('Go to the Menu screen to manage your menus.', 'essential-addons-for-elementor-lite'), admin_url('nav-menus.php')),
'type' => Controls_Manager::SELECT,
'label_block' => false,
'options' => $simple_menus,
'default' => array_keys($simple_menus)[0],
]
);
} else {
$this->add_control(
'menu',
[
'type' => Controls_Manager::RAW_HTML,
'raw' => sprintf(__('There are no menus in your site.
Go to the Menus screen to create one.', 'essential-addons-for-elementor-lite'), admin_url('nav-menus.php?action=edit&menu=0')),
'separator' => 'after',
]
);
}
$this->add_control(
'eael_simple_menu_preset',
[
'label' => esc_html__('Preset', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::SELECT,
'default' => 'preset-1',
'options' => [
'preset-1' => esc_html__('Preset 1', 'essential-addons-for-elementor-lite'),
'preset-2' => esc_html__('Preset 2', 'essential-addons-for-elementor-lite'),
'preset-3' => esc_html__('Preset 3', 'essential-addons-for-elementor-lite'),
],
]
);
$this->add_control(
'eael_simple_menu_layout',
[
'label' => esc_html__('Layout', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::SELECT,
'label_block' => false,
'options' => [
'horizontal' => __('Horizontal', 'essential-addons-for-elementor-lite'),
'vertical' => __('Vertical', 'essential-addons-for-elementor-lite'),
],
'default' => 'horizontal',
]
);
$this->end_controls_section();
$this->start_controls_section(
'eael_simple_menu_section_hamburger',
[
'label' => esc_html__('Hamburger Options', 'essential-addons-for-elementor-lite'),
]
);
$this->add_control(
'eael_simple_menu_hamburger_disable_selected_menu',
[
'label' => esc_html__('Disable Selected Menu', 'essential-addons-for-elementor-lite'),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __('Yes', 'essential-addons-for-elementor-lite'),
'label_off' => __('No', 'essential-addons-for-elementor-lite'),
'return_value' => 'hide',
'default' => 'no',
'prefix_class' => 'eael_simple_menu_hamburger_disable_selected_menu_',
]
);
$this->add_control(
'eael_simple_menu_hamburger_alignment',
[
'label' => __('Hamburger Alignment', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::CHOOSE,
'options' => [
'left' => [
'title' => __('Left', 'essential-addons-for-elementor-lite'),
'icon' => 'eicon-text-align-left',
],
'center' => [
'title' => __('Center', 'essential-addons-for-elementor-lite'),
'icon' => 'eicon-text-align-center',
],
'right' => [
'title' => __('Right', 'essential-addons-for-elementor-lite'),
'icon' => 'eicon-text-align-right',
],
],
'default' => 'right',
'prefix_class' => 'eael-simple-menu-hamburger-align-',
// 'condition' => [
// 'eael_simple_menu_hamburger_disable_selected_menu' => 'hide',
// ],
]
);
$this->add_control(
'eael_simple_menu_full_width',
[
'label' => __('Full Width', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::SWITCHER,
'description' => __('Stretch the dropdown of the menu to full width.', 'essential-addons-for-elementor-lite'),
'label_on' => __('Yes', 'essential-addons-for-elementor-lite'),
'label_off' => __('No', 'essential-addons-for-elementor-lite'),
'default' => 'no',
]
);
$this->add_control(
'eael_simple_menu_hamburger_icon',
[
'label' => esc_html__('Icon', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::ICONS,
'default' => [
'value' => 'fas fa-bars',
'library' => 'fa-solid',
],
]
);
$this->add_control(
'eael_simple_menu_heading_mobile_dropdown',
[
'label' => esc_html__( 'Mobile Dropdown', 'essential-addons-for-elementor-lite' ),
'type' => Controls_Manager::HEADING,
'separator' => 'before',
]
);
$default_value = 'tablet';
$this->add_control(
'eael_simple_menu_dropdown',
[
'label' => esc_html__( 'Breakpoint', 'essential-addons-for-elementor-lite' ),
'type' => Controls_Manager::SELECT,
'default' => esc_html( $default_value ),
'options' => $this->get_dropdown_options(),
'prefix_class' => 'eael-hamburger--',
]
);
$this->end_controls_section();
/**
* Style: Main Menu
*/
$this->style_menu();
/**
* Style: Top Level Items
*/
$this->style_top_level_item();
/**
* Style: Mobile Menu
*/
$this->start_controls_section(
'eael_simple_menu_section_style_mobile_menu',
[
'label' => __('Hamburger Menu', 'essential-addons-for-elementor-lite'),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_responsive_control(
'eael_simple_menu_hamburger_min_height',
[
'label' => esc_html__( 'Min Height', 'essential-addons-for-elementor-lite' ),
'type' => Controls_Manager::SLIDER,
// 'devices' => [ 'tablet', 'mobile' ],
// 'devices' => [ 'desktop', 'mobile' ],
'range' => [
'px' => [
'max' => 500,
],
],
'selectors' => [
'{{WRAPPER}} .eael-simple-menu-container.eael-simple-menu-hamburger' => 'min-height: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_control(
'eael_simple_menu_hamburger_bg',
[
'label' => __('Background Color', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::COLOR,
'default' => '#000000',
'selectors' => [
'{{WRAPPER}} .eael-simple-menu-container .eael-simple-menu-toggle' => 'background-color: {{VALUE}}',
],
]
);
$this->add_control(
'eael_simple_menu_hamburger_size',
[
'label' => esc_html__( 'Icon Size', 'essential-addons-for-elementor-lite' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
'max' => 30,
],
],
'selectors' => [
'{{WRAPPER}} .eael-simple-menu-container .eael-simple-menu-toggle i' => 'font-size: {{SIZE}}{{UNIT}};',
'{{WRAPPER}} .eael-simple-menu-container .eael-simple-menu-toggle svg' => 'width: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_control(
'eael_simple_menu_hamburger_icon_color',
[
'label' => __('Icon Color', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::COLOR,
'default' => '#ffffff',
'selectors' => [
'{{WRAPPER}} .eael-simple-menu-container .eael-simple-menu-toggle i' => 'color: {{VALUE}}',
'{{WRAPPER}} .eael-simple-menu-container .eael-simple-menu-toggle svg' => 'fill: {{VALUE}}',
],
]
);
$this->add_responsive_control(
'eael_simple_menu_hamburger_padding',
[
'label' => __('Padding', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em'],
'selectors' => [
'{{WRAPPER}} .eael-simple-menu-container .eael-simple-menu-toggle' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_control(
'eael_simple_menu_hamburger_item_heading',
[
'label' => __('Items', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::HEADING,
'separator' => 'before',
]
);
$this->add_control(
'eael_hamburger_menu_item_alignment',
[
'label' => __('Alignment', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::CHOOSE,
'options' => [
'eael-hamburger-left' => [
'title' => __('Left', 'essential-addons-for-elementor-lite'),
'icon' => 'eicon-text-align-left',
],
'eael-hamburger-center' => [
'title' => __('Center', 'essential-addons-for-elementor-lite'),
'icon' => 'eicon-text-align-center',
],
'eael-hamburger-right' => [
'title' => __('Right', 'essential-addons-for-elementor-lite'),
'icon' => 'eicon-text-align-right',
],
],
'condition' => [
'eael_simple_menu_preset!' => ['preset-2', 'preset-3']
]
]
);
$this->start_controls_tabs('eael_simple_menu_hamburger_top_level_item');
$this->start_controls_tab(
'eael_simple_menu_hamburger_top_level_item_default',
[
'label' => __('Default', 'essential-addons-for-elementor-lite'),
]
);
$this->add_control(
'eael_simple_menu_hamburger_top_level_item_color',
[
'label' => __('Text Color', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::COLOR,
// 'default' => '#ffffff',
'selectors' => [
'{{WRAPPER}} .eael-simple-menu.eael-simple-menu-responsive li > a' => 'color: {{VALUE}}',
'{{WRAPPER}} .eael-simple-menu.eael-simple-menu-responsive li > a > span svg' => 'fill: {{VALUE}}',
],
]
);
$this->add_control(
'eael_simple_menu_hamburger_top_level_item_background',
[
'label' => __('Background Color', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .eael-simple-menu.eael-simple-menu-responsive li > a' => 'background-color: {{VALUE}}',
],
]
);
$this->end_controls_tab();
$this->start_controls_tab(
'eael_simple_menu_hamburger_top_level_item_hover',
[
'label' => __('Hover', 'essential-addons-for-elementor-lite'),
]
);
$this->add_control(
'eael_simple_menu_hamburger_top_level_item_color_hover',
[
'label' => __('Text Color', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::COLOR,
// 'default' => '#ffffff',
'selectors' => [
'{{WRAPPER}} .eael-simple-menu.eael-simple-menu-responsive li:hover > a' => 'color: {{VALUE}}',
'{{WRAPPER}} .eael-simple-menu.eael-simple-menu-responsive li:hover > a > span svg' => 'fill: {{VALUE}}',
],
]
);
$this->add_control(
'eael_simple_menu_hamburger_top_level_item_bg_hover',
[
'label' => __('Background Color', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .eael-simple-menu.eael-simple-menu-responsive li:hover > a' => 'background-color: {{VALUE}}',
],
]
);
$this->end_controls_tab();
$this->start_controls_tab(
'eael_simple_menu_hamburger_top_level_item_active',
[
'label' => __('Active', 'essential-addons-for-elementor-lite'),
]
);
$this->add_control(
'eael_simple_menu_hamburger_top_level_item_color_active',
[
'label' => __('Text Color', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::COLOR,
// 'default' => '#ffffff',
'selectors' => [
'{{WRAPPER}} .eael-simple-menu.eael-simple-menu-responsive li.current-menu-item > a.eael-item-active' => 'color: {{VALUE}}',
'{{WRAPPER}} .eael-simple-menu.eael-simple-menu-responsive li.current-menu-item > a.eael-item-active > span svg' => 'fill: {{VALUE}}',
],
]
);
$this->add_control(
'eael_simple_menu_hamburger_top_level_item_bg_active',
[
'label' => __('Background Color', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .eael-simple-menu.eael-simple-menu-responsive li.current-menu-item > a.eael-item-active' => 'background-color: {{VALUE}}',
],
]
);
$this->end_controls_tab();
$this->end_controls_tabs();
$this->add_control(
'eael_simple_menu_hamburger_dropdown_heading',
[
'label' => __('Dropdown Items', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::HEADING,
'separator' => 'before',
]
);
$this->add_responsive_control(
'eael_simple_menu_hamburger_dropdown_item_padding',
[
'label' => __('Padding', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em'],
'selectors' => [
'{{WRAPPER}} .eael-simple-menu.eael-simple-menu-responsive li ul li a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->start_controls_tabs('eael_simple_menu_hamburger_dropdown_item');
$this->start_controls_tab(
'eael_simple_menu_hamburger_dropdown_item_default',
[
'label' => __('Default', 'essential-addons-for-elementor-lite'),
]
);
$this->add_control(
'eael_simple_menu_hamburger_dropdown_item_color',
[
'label' => __('Text Color', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::COLOR,
// 'default' => '#ffffff',
'selectors' => [
'{{WRAPPER}} .eael-simple-menu.eael-simple-menu-responsive li ul li a' => 'color: {{VALUE}}',
'{{WRAPPER}} .eael-simple-menu.eael-simple-menu-responsive li ul li > span svg' => 'fill: {{VALUE}}',
],
]
);
$this->add_control(
'eael_simple_menu_hamburger_dropdown_item_background',
[
'label' => __('Background Color', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .eael-simple-menu.eael-simple-menu-responsive li ul li a' => 'background-color: {{VALUE}}',
],
]
);
$this->end_controls_tab();
$this->start_controls_tab(
'eael_simple_menu_hamburger_dropdown_item_hover',
[
'label' => __('Hover', 'essential-addons-for-elementor-lite'),
]
);
$this->add_control(
'eael_simple_menu_hamburger_dropdown_item_color_hover',
[
'label' => __('Text Color', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::COLOR,
// 'default' => '#ffffff',
'selectors' => [
'{{WRAPPER}} .eael-simple-menu.eael-simple-menu-responsive li ul li:hover a' => 'color: {{VALUE}}',
'{{WRAPPER}} .eael-simple-menu.eael-simple-menu-responsive li ul li:hover a > span svg' => 'fill: {{VALUE}}',
],
]
);
$this->add_control(
'eael_simple_menu_hamburger_dropdown_item_bg_hover',
[
'label' => __('Background Color', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .eael-simple-menu.eael-simple-menu-responsive li ul li:hover a' => 'background-color: {{VALUE}}',
],
]
);
$this->end_controls_tab();
$this->end_controls_tabs();
$this->add_control(
'eael_simple_menu_hamburger_dropdown_a',
[
'label' => __('Dropdown Indicator', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::HEADING,
'separator' => 'before',
]
);
$this->add_control(
'eael_simple_menu_hamburger_indicator_possition',
[
'label' => esc_html__( 'Top Position', 'essential-addons-for-elementor-lite' ),
'type' => Controls_Manager::SLIDER,
// 'range' => [
// 'px' => [
// 'max' => 30,
// ],
// ],
'size_units' => ['px', '%'],
'selectors' => [
'{{WRAPPER}} .eael-simple-menu.eael-simple-menu-responsive .eael-simple-menu-indicator' => 'top: {{SIZE}}{{UNIT}};',
],
]
);
$this->end_controls_section();
/**
* Style: Dropdown Menu
*/
$this->start_controls_section(
'eael_simple_menu_section_style_dropdown',
[
'label' => __('Dropdown Menu', 'essential-addons-for-elementor-lite'),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_control(
'eael_simple_menu_dropdown_animation',
[
'label' => __('Animation', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::SELECT,
'options' => [
'eael-simple-menu-dropdown-animate-fade' => __('Fade', 'essential-addons-for-elementor-lite'),
'eael-simple-menu-dropdown-animate-to-top' => __('To Top', 'essential-addons-for-elementor-lite'),
'eael-simple-menu-dropdown-animate-zoom-in' => __('ZoomIn', 'essential-addons-for-elementor-lite'),
'eael-simple-menu-dropdown-animate-zoom-out' => __('ZoomOut', 'essential-addons-for-elementor-lite'),
],
'default' => 'eael-simple-menu-dropdown-animate-to-top',
'condition' => [
'eael_simple_menu_layout' => ['horizontal'],
],
]
);
$this->add_control(
'eael_simple_menu_dropdown_background',
[
'label' => __('Background Color', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::COLOR,
// 'default' => '#ffffff',
'selectors' => [
'{{WRAPPER}} .eael-simple-menu li ul' => 'background-color: {{VALUE}}',
],
]
);
$this->add_group_control(
Group_Control_Border::get_type(),
[
'name' => 'eael_simple_menu_dropdown_border',
'label' => __('Border', 'essential-addons-for-elementor-lite'),
'selector' => '{{WRAPPER}} .eael-simple-menu li ul',
]
);
$this->add_responsive_control(
'eael_simple_menu_dropdown_border_radius',
[
'label' => __('Border Radius', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em'],
'selectors' => [
'{{WRAPPER}} .eael-simple-menu li ul' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_responsive_control(
'eael_simple_menu_dropdown_padding',
[
'label' => __('Padding', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em'],
'selectors' => [
'{{WRAPPER}} .eael-simple-menu li ul' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_group_control(
Group_Control_Box_Shadow::get_type(),
[
'name' => 'eael_simple_menu_dropdown_box_shadow',
'label' => __('Shadow', 'essential-addons-for-elementor-lite'),
'selector' => '{{WRAPPER}} .eael-simple-menu li ul',
]
);
$this->end_controls_section();
/**
* Style: Main Menu (Hover)
*/
$this->style_dropdown_item();
}
protected function style_menu()
{
$this->start_controls_section(
'eael_simple_menu_section_style_menu',
[
'label' => __('Main Menu', 'essential-addons-for-elementor-lite'),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_responsive_control(
'eael_simple_menu_background',
[
'label' => __('Background Color', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::COLOR,
// 'default' => '#54595f',
'selectors' => [
'{{WRAPPER}} .eael-simple-menu-container' => 'background-color: {{VALUE}}',
'{{WRAPPER}} .eael-simple-menu-container .eael-simple-menu.eael-simple-menu-horizontal' => 'background-color: {{VALUE}}',
],
]
);
$this->add_group_control(
Group_Control_Border::get_type(),
[
'name' => 'eael_simple_menu_border',
'label' => __('Border', 'essential-addons-for-elementor-lite'),
'selector' => '{{WRAPPER}} .eael-simple-menu-container, {{WRAPPER}} .eael-simple-menu-container .eael-simple-menu-toggle, {{WRAPPER}} .eael-simple-menu.eael-simple-menu-horizontal.eael-simple-menu-responsive',
]
);
$this->add_group_control(
Group_Control_Box_Shadow::get_type(),
[
'name' => 'eael_simple_menu_box_shadow',
'label' => __('Shadow', 'essential-addons-for-elementor-lite'),
'selector' => '{{WRAPPER}} .eael-simple-menu-container',
]
);
$this->end_controls_section();
}
protected function style_top_level_item()
{
$this->start_controls_section(
'eael_simple_menu_section_style_top_level_item',
[
'label' => __('Top Level Item', 'essential-addons-for-elementor-lite'),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_responsive_control(
'eael_simple_menu_item_padding',
[
'label' => __('Item Padding', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em'],
'selectors' => [
'{{WRAPPER}} .eael-simple-menu li a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_control(
'eael_simple_menu_item_alignment',
[
'label' => __('Alignment', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::CHOOSE,
'options' => [
'eael-simple-menu-align-left' => [
'title' => __('Left', 'essential-addons-for-elementor-lite'),
'icon' => 'eicon-text-align-left',
],
'eael-simple-menu-align-center' => [
'title' => __('Center', 'essential-addons-for-elementor-lite'),
'icon' => 'eicon-text-align-center',
],
'eael-simple-menu-align-right' => [
'title' => __('Right', 'essential-addons-for-elementor-lite'),
'icon' => 'eicon-text-align-right',
],
],
'default' => 'eael-simple-menu-align-left',
'condition' => [
'eael_simple_menu_preset!' => ['preset-2', 'preset-3']
]
]
);
$this->add_control(
'eael_simple_menu_item_alignment_right',
[
'label' => __('Alignment', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::CHOOSE,
'options' => [
'eael-simple-menu-align-left' => [
'title' => __('Left', 'essential-addons-for-elementor-lite'),
'icon' => 'eicon-text-align-left',
],
'eael-simple-menu-align-center' => [
'title' => __('Center', 'essential-addons-for-elementor-lite'),
'icon' => 'eicon-text-align-center',
],
'eael-simple-menu-align-right' => [
'title' => __('Right', 'essential-addons-for-elementor-lite'),
'icon' => 'eicon-text-align-right',
],
],
'default' => 'eael-simple-menu-align-right',
'condition' => [
'eael_simple_menu_preset' => ['preset-3']
]
]
);
$this->add_control(
'eael_simple_menu_item_alignment_center',
[
'label' => __('Alignment', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::CHOOSE,
'options' => [
'eael-simple-menu-align-left' => [
'title' => __('Left', 'essential-addons-for-elementor-lite'),
'icon' => 'eicon-text-align-left',
],
'eael-simple-menu-align-center' => [
'title' => __('Center', 'essential-addons-for-elementor-lite'),
'icon' => 'eicon-text-align-center',
],
'eael-simple-menu-align-right' => [
'title' => __('Right', 'essential-addons-for-elementor-lite'),
'icon' => 'eicon-text-align-right',
],
],
'default' => 'eael-simple-menu-align-center',
'condition' => [
'eael_simple_menu_preset' => ['preset-2']
]
]
);
$this->add_control(
'eael_simple_menu_item_divider_color',
[
'label' => __('Divider Color', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .eael-simple-menu.eael-simple-menu-horizontal:not(.eael-simple-menu-responsive) > li > a' => 'border-right: 1px solid {{VALUE}}',
'{{WRAPPER}} .eael-simple-menu-align-center .eael-simple-menu.eael-simple-menu-horizontal:not(.eael-simple-menu-responsive) > li:first-child > a' => 'border-left: 1px solid {{VALUE}}',
'{{WRAPPER}} .eael-simple-menu-align-right .eael-simple-menu.eael-simple-menu-horizontal:not(.eael-simple-menu-responsive) > li:first-child > a' => 'border-left: 1px solid {{VALUE}}',
'{{WRAPPER}} .eael-simple-menu.eael-simple-menu-horizontal.eael-simple-menu-responsive > li:not(:last-child) > a' => 'border-bottom: 1px solid {{VALUE}}',
'{{WRAPPER}} .eael-simple-menu.eael-simple-menu-vertical > li:not(:last-child) > a' => 'border-bottom: 1px solid {{VALUE}}',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'eael_simple_menu_item_typography',
'label' => __('Typography', 'essential-addons-for-elementor-lite'),
'global' => [
'default' => Global_Typography::TYPOGRAPHY_PRIMARY
],
'selector' => '{{WRAPPER}} .eael-simple-menu >li > a, .eael-simple-menu-container .eael-simple-menu-toggle-text',
]
);
$this->start_controls_tabs('eael_simple_menu_top_level_item');
$this->start_controls_tab(
'eael_simple_menu_top_level_item_default',
[
'label' => __('Default', 'essential-addons-for-elementor-lite'),
]
);
$this->add_control(
'eael_simple_menu_item_color',
[
'label' => __('Text Color', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::COLOR,
// 'default' => '#ffffff',
'selectors' => [
'{{WRAPPER}} .eael-simple-menu li > a' => 'color: {{VALUE}}',
'{{WRAPPER}} .eael-simple-menu li > a > span svg' => 'fill: {{VALUE}}',
'{{WRAPPER}} .eael-simple-menu-toggle-text' => 'color: {{VALUE}}',
],
]
);
$this->add_control(
'eael_simple_menu_item_background',
[
'label' => __('Background Color', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .eael-simple-menu li > a' => 'background-color: {{VALUE}}',
],
]
);
$this->add_control(
'eael_simple_menu_item_indicator_heading',
[
'label' => __('Dropdown Indicator', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::HEADING,
'separator' => 'before',
]
);
$this->add_control(
'eael_simple_menu_item_indicator',
[
'label' => __('Icon', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::ICONS,
'recommended' => [
'fa-solid' => [
'fas fa-angle-down',
]
],
'default' => [
'value' => 'fas fa-angle-down',
'library' => 'fa-solid',
],
]
);
$this->add_control(
'eael_simple_menu_item_indicator_size',
[
'label' => esc_html__( 'Icon Size', 'essential-addons-for-elementor-lite' ),
'type' => Controls_Manager::SLIDER,
'default' => [
'size' => '15'
],
'range' => [
'px' => [
'max' => 30,
],
],
'selectors' => [
'{{WRAPPER}} .eael-simple-menu li a span, {{WRAPPER}} .eael-simple-menu li span.eael-simple-menu-indicator' => 'font-size: {{SIZE}}{{UNIT}};',
'{{WRAPPER}} .eael-simple-menu li a span, {{WRAPPER}} .eael-simple-menu li span.eael-simple-menu-indicator i' => 'font-size: {{SIZE}}{{UNIT}};',
'{{WRAPPER}} .eael-simple-menu li span.eael-simple-menu-indicator svg' => 'width: {{SIZE}}{{UNIT}};height:{{SIZE}}{{UNIT}};line-height:{{SIZE}}{{UNIT}};',
],
]
);
$this->add_control(
'eael_simple_menu_item_indicator_note',
[
'label' => __('Important Note', 'essential-addons-for-elementor-lite'),
'show_label' => false,
'type' => Controls_Manager::RAW_HTML,
'raw' => __('