dep
5 years ago
premium-banner.php
5 years ago
premium-blog.php
5 years ago
premium-button.php
5 years ago
premium-carousel.php
5 years ago
premium-contactform.php
5 years ago
premium-countdown.php
5 years ago
premium-counter.php
5 years ago
premium-dual-header.php
5 years ago
premium-fancytext.php
5 years ago
premium-grid.php
5 years ago
premium-icon-list.php
5 years ago
premium-image-button.php
5 years ago
premium-image-scroll.php
5 years ago
premium-image-separator.php
5 years ago
premium-lottie.php
5 years ago
premium-maps.php
5 years ago
premium-modalbox.php
5 years ago
premium-person.php
5 years ago
premium-pricing-table.php
5 years ago
premium-progressbar.php
5 years ago
premium-testimonials.php
5 years ago
premium-title.php
5 years ago
premium-videobox.php
5 years ago
premium-vscroll.php
5 years ago
premium-icon-list.php
2211 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Class: Premium_Icon_list |
| 5 | * Name: Bullet List |
| 6 | * Slug: premium-addon-icon-list |
| 7 | */ |
| 8 | |
| 9 | namespace PremiumAddons\Widgets; |
| 10 | |
| 11 | // Elementor Classes. |
| 12 | use Elementor\Icons_Manager; |
| 13 | use Elementor\Control_Media; |
| 14 | use Elementor\Widget_Base; |
| 15 | use Elementor\Utils; |
| 16 | use Elementor\Controls_Manager; |
| 17 | use Elementor\Repeater; |
| 18 | use Elementor\Scheme_Color; |
| 19 | use Elementor\Scheme_Typography; |
| 20 | use Elementor\Group_Control_Background; |
| 21 | use Elementor\Group_Control_Box_Shadow; |
| 22 | use Elementor\Group_Control_Text_Shadow; |
| 23 | use Elementor\Group_Control_Border; |
| 24 | use Elementor\Group_Control_Typography; |
| 25 | |
| 26 | |
| 27 | // PremiumAddons Classes. |
| 28 | use PremiumAddons\Includes\Helper_Functions; |
| 29 | use PremiumAddons\Includes\Premium_Template_Tags; |
| 30 | |
| 31 | |
| 32 | if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort. |
| 33 | |
| 34 | /** |
| 35 | * Class Premium_Icon_List |
| 36 | */ |
| 37 | class Premium_Icon_List extends Widget_Base { |
| 38 | |
| 39 | public function getTemplateInstance() { |
| 40 | return $this->templateInstance = Premium_Template_Tags::getInstance(); |
| 41 | } |
| 42 | |
| 43 | public function get_name() { |
| 44 | return 'premium-icon-list'; |
| 45 | } |
| 46 | |
| 47 | public function get_title() { |
| 48 | return sprintf( '%1$s %2$s', Helper_Functions::get_prefix(), __('Bullet list', 'premium-addons-for-elementor') ); |
| 49 | } |
| 50 | |
| 51 | public function get_style_depends() { |
| 52 | return [ |
| 53 | 'premium-addons' |
| 54 | ]; |
| 55 | } |
| 56 | |
| 57 | public function get_script_depends() { |
| 58 | return [ |
| 59 | 'elementor-waypoints', |
| 60 | 'lottie-js', |
| 61 | 'premium-addons' |
| 62 | ]; |
| 63 | } |
| 64 | |
| 65 | public function get_icon() { |
| 66 | return 'pa-icon-list'; |
| 67 | } |
| 68 | |
| 69 | public function get_categories() { |
| 70 | return [ 'premium-elements' ]; |
| 71 | } |
| 72 | |
| 73 | public function get_custom_help_url() { |
| 74 | return 'https://premiumaddons.com/support/'; |
| 75 | } |
| 76 | |
| 77 | public function _register_controls() { |
| 78 | |
| 79 | // Content Tab |
| 80 | // List Items Content |
| 81 | $this->start_controls_section( |
| 82 | 'list_items_section', |
| 83 | [ |
| 84 | 'label' => __( 'List Items', 'premium-addons-for-elementor' ), |
| 85 | 'tab' => Controls_Manager::TAB_CONTENT, |
| 86 | ] |
| 87 | ); |
| 88 | |
| 89 | // Title control |
| 90 | $repeater_list = new REPEATER(); |
| 91 | |
| 92 | $repeater_list->add_control( |
| 93 | 'list_title', |
| 94 | [ |
| 95 | 'label' => __( 'Title', 'premium-addons-for-elementor' ), |
| 96 | 'type' => Controls_Manager::TEXT, |
| 97 | 'default' => __( 'List Title' , 'premium-addons-for-elementor' ), |
| 98 | 'label_block' => true, |
| 99 | ] |
| 100 | ); |
| 101 | |
| 102 | // Show and Hide icons from view |
| 103 | $repeater_list->add_control( |
| 104 | 'show_icon', |
| 105 | [ |
| 106 | 'label' => __( 'Show Bullet', 'premium-addons-for-elementor' ), |
| 107 | 'type' => Controls_Manager::SWITCHER, |
| 108 | 'return_value' => 'yes', |
| 109 | 'default' => 'yes', |
| 110 | ] |
| 111 | ); |
| 112 | |
| 113 | // Check icon type |
| 114 | $repeater_list->add_control( |
| 115 | 'icon_type', |
| 116 | [ |
| 117 | 'label' => __( 'Bullet Type', 'premium-addons-for-elementor' ), |
| 118 | 'type' => Controls_Manager::SELECT, |
| 119 | 'default' => 'icon', |
| 120 | 'render_type' => 'template', |
| 121 | 'options' => [ |
| 122 | 'icon' => __( 'Icon', 'premium-addons-for-elementor' ), |
| 123 | 'image' => __( 'Image', 'premium-addons-for-elementor' ), |
| 124 | 'lottie' => __( 'Lottie Animation', 'premium-addons-for-elementor' ), |
| 125 | 'text' => __( 'Text', 'premium-addons-for-elementor' ), |
| 126 | ], |
| 127 | 'condition' => [ |
| 128 | 'show_icon' => 'yes' |
| 129 | ] |
| 130 | ] |
| 131 | ); |
| 132 | |
| 133 | // If Icon Type is selected |
| 134 | $repeater_list->add_control( |
| 135 | 'premium_icon_list_font_updated', |
| 136 | [ |
| 137 | 'label' => __('Icon','premium-addons-for-elementor'), |
| 138 | 'type' => Controls_Manager::ICONS, |
| 139 | 'default' => [ |
| 140 | 'value' => 'fas fa-star', |
| 141 | 'library' => 'fa-solid', |
| 142 | ], |
| 143 | 'condition' => [ |
| 144 | 'show_icon' => 'yes', |
| 145 | 'icon_type' => 'icon' |
| 146 | ] |
| 147 | ] |
| 148 | ); |
| 149 | |
| 150 | // If Media Type is selected |
| 151 | $repeater_list->add_control( |
| 152 | 'custom_image', |
| 153 | [ |
| 154 | 'label' => __('Custom Image','premium-addons-for-elementor'), |
| 155 | 'type' => Controls_Manager::MEDIA, |
| 156 | 'dynamic' => [ 'active' => true ], |
| 157 | 'default' => [ |
| 158 | 'url' => Utils::get_placeholder_image_src(), |
| 159 | ], |
| 160 | 'condition' => [ |
| 161 | 'show_icon' => 'yes', |
| 162 | 'icon_type' => 'image' |
| 163 | ] |
| 164 | ] |
| 165 | ); |
| 166 | |
| 167 | // If Text Type is selected |
| 168 | $repeater_list->add_control( |
| 169 | 'list_text_icon', |
| 170 | [ |
| 171 | 'label' => __('Text', 'premium-addons-for-elementor'), |
| 172 | 'type' => Controls_Manager::TEXT, |
| 173 | 'default' => __( 'New' , 'premium-addons-for-elementor' ), |
| 174 | 'condition' => [ |
| 175 | 'show_icon' => 'yes', |
| 176 | 'icon_type' => 'text' |
| 177 | ] |
| 178 | ] |
| 179 | ); |
| 180 | |
| 181 | // If Animation Type is selected |
| 182 | $repeater_list->add_control( |
| 183 | 'lottie_url', |
| 184 | [ |
| 185 | 'label' => __( 'Animation JSON URL', 'premium-addons-for-elementor' ), |
| 186 | 'type' => Controls_Manager::TEXT, |
| 187 | 'dynamic' => [ 'active' => true ], |
| 188 | 'description' => 'Get JSON code URL from <a href="https://lottiefiles.com/" target="_blank">here</a>', |
| 189 | 'label_block' => true, |
| 190 | 'render_type' => 'template', |
| 191 | 'condition' => [ |
| 192 | 'show_icon' => 'yes', |
| 193 | 'icon_type' => 'lottie' |
| 194 | ] |
| 195 | ] |
| 196 | ); |
| 197 | |
| 198 | $repeater_list->add_control( |
| 199 | 'lottie_loop', |
| 200 | [ |
| 201 | 'label' => __('Loop','premium-addons-for-elementor'), |
| 202 | 'type' => Controls_Manager::SWITCHER, |
| 203 | 'return_value' => 'true', |
| 204 | 'default' => 'true', |
| 205 | 'render_type' => 'template', |
| 206 | 'condition' => [ |
| 207 | 'show_icon' => 'yes', |
| 208 | 'icon_type' => 'lottie' |
| 209 | ] |
| 210 | ] |
| 211 | ); |
| 212 | |
| 213 | $repeater_list->add_control( |
| 214 | 'lottie_reverse', |
| 215 | [ |
| 216 | 'label' => __('Reverse','premium-addons-for-elementor'), |
| 217 | 'type' => Controls_Manager::SWITCHER, |
| 218 | 'return_value' => 'true', |
| 219 | 'render_type' => 'template', |
| 220 | 'condition' => [ |
| 221 | 'show_icon' => 'yes', |
| 222 | 'icon_type' => 'lottie' |
| 223 | ] |
| 224 | ] |
| 225 | ); |
| 226 | |
| 227 | // Show list link |
| 228 | $repeater_list->add_control( |
| 229 | 'show_list_link', |
| 230 | [ |
| 231 | 'label' => __( 'Link', 'premium-addons-for-elementor' ), |
| 232 | 'type' => Controls_Manager::SWITCHER, |
| 233 | 'return_value' => 'yes', |
| 234 | ] |
| 235 | ); |
| 236 | |
| 237 | // URL/Existing Page Control |
| 238 | $repeater_list->add_control( |
| 239 | 'link_select', |
| 240 | [ |
| 241 | 'label' => __('Link/URL', 'premium-addons-for-elementor'), |
| 242 | 'type' => Controls_Manager::SELECT, |
| 243 | 'options' => [ |
| 244 | 'url' => __('URL', 'premium-addons-for-elementor'), |
| 245 | 'existing_page' => __('Existing Page', 'premium-addons-for-elementor'), |
| 246 | ], |
| 247 | 'default' => 'url', |
| 248 | 'label_block' => true, |
| 249 | 'condition' => [ |
| 250 | 'show_list_link' => 'yes' |
| 251 | ] |
| 252 | ] |
| 253 | ); |
| 254 | |
| 255 | $repeater_list->add_control( |
| 256 | 'link', |
| 257 | [ |
| 258 | 'label' => __('URL', 'premium-addons-for-elementor'), |
| 259 | 'type' => Controls_Manager::URL, |
| 260 | 'dynamic' => [ 'active' => true ], |
| 261 | 'placeholder' => 'https://premiumaddons.com/', |
| 262 | 'label_block' => true, |
| 263 | 'condition' => [ |
| 264 | 'link_select' => 'url', |
| 265 | 'show_list_link' => 'yes' |
| 266 | ] |
| 267 | ] |
| 268 | ); |
| 269 | |
| 270 | $repeater_list->add_control( |
| 271 | 'existing_page', |
| 272 | [ |
| 273 | 'label' => __('Existing Page', 'premium-addons-for-elementor'), |
| 274 | 'type' => Controls_Manager::SELECT2, |
| 275 | 'options' => $this->getTemplateInstance()->get_all_posts(), |
| 276 | 'condition' => [ |
| 277 | 'link_select' => 'existing_page', |
| 278 | 'show_list_link' => 'yes' |
| 279 | ], |
| 280 | 'label_block' => true, |
| 281 | ] |
| 282 | ); |
| 283 | |
| 284 | $repeater_list->add_control( |
| 285 | 'link_title', |
| 286 | [ |
| 287 | 'label' => __('Link Title', 'premium-addons-for-elementor'), |
| 288 | 'type' => Controls_Manager::TEXT, |
| 289 | 'condition' => [ |
| 290 | 'link_select' => 'yes', |
| 291 | 'show_list_link' => 'yes' |
| 292 | ], |
| 293 | 'label_block' => true |
| 294 | ] |
| 295 | ); |
| 296 | |
| 297 | // Show Badge |
| 298 | $repeater_list->add_control( |
| 299 | 'show_badge', |
| 300 | [ |
| 301 | 'label' => __( 'Badge', 'premium-addons-for-elementor' ), |
| 302 | 'type' => Controls_Manager::SWITCHER, |
| 303 | 'return_value' => 'yes', |
| 304 | 'separator' => 'before' |
| 305 | ] |
| 306 | ); |
| 307 | |
| 308 | $repeater_list->add_control( |
| 309 | 'badge_title', |
| 310 | [ |
| 311 | 'label' => __('Badge Text', 'premium-addons-for-elementor'), |
| 312 | 'type' => Controls_Manager::TEXT, |
| 313 | 'default' => __( 'New' , 'premium-addons-for-elementor' ), |
| 314 | 'condition' => [ |
| 315 | 'show_badge' => 'yes', |
| 316 | ], |
| 317 | ] |
| 318 | ); |
| 319 | |
| 320 | // badge color if selected |
| 321 | $repeater_list->add_control( |
| 322 | 'badge_text_color', |
| 323 | [ |
| 324 | 'label' => __( 'Text Color', 'premium-addons-for-elementor' ), |
| 325 | 'type' => Controls_Manager::COLOR, |
| 326 | 'selectors' => [ |
| 327 | '{{WRAPPER}} {{CURRENT_ITEM}} .premium-icon-list-badge span' => 'color: {{VALUE}}', |
| 328 | ], |
| 329 | 'condition' => [ |
| 330 | 'show_badge' => 'yes', |
| 331 | ] |
| 332 | ] |
| 333 | ); |
| 334 | |
| 335 | // Badge Back ground color |
| 336 | $repeater_list->add_control( |
| 337 | 'badge_background_color', |
| 338 | [ |
| 339 | 'label' => __( 'Background', 'premium-addons-for-elementor' ), |
| 340 | 'type' => Controls_Manager::COLOR, |
| 341 | 'selectors' => [ |
| 342 | '{{WRAPPER}} {{CURRENT_ITEM}} .premium-icon-list-badge span' => 'background-color: {{VALUE}}', |
| 343 | ], |
| 344 | 'condition' => [ |
| 345 | 'show_badge' => 'yes', |
| 346 | ] |
| 347 | ] |
| 348 | ); |
| 349 | |
| 350 | // Show global style switcher |
| 351 | $repeater_list->add_control( |
| 352 | 'show_global_style', |
| 353 | [ |
| 354 | 'label' => __( 'Override Global Style', 'premium-addons-for-elementor' ), |
| 355 | 'type' => Controls_Manager::SWITCHER, |
| 356 | 'return_value' => 'yes', |
| 357 | 'default' => 'yes', |
| 358 | 'separator' => 'before' |
| 359 | ] |
| 360 | ); |
| 361 | |
| 362 | // List box Size |
| 363 | $repeater_list->add_control( |
| 364 | 'list_box_size', |
| 365 | [ |
| 366 | 'label' => __('Size', 'premium-addons-for-elementor'), |
| 367 | 'type' => Controls_Manager::SLIDER, |
| 368 | 'size_units' => ['px','em','%'], |
| 369 | 'range' => [ |
| 370 | 'px' => [ |
| 371 | 'min' => 5, |
| 372 | 'max' => 200 |
| 373 | ], |
| 374 | 'em' => [ |
| 375 | 'min' => 5, |
| 376 | 'max' => 30 |
| 377 | ], |
| 378 | ], |
| 379 | 'selectors' => [ |
| 380 | '{{WRAPPER}} {{CURRENT_ITEM}} .premium-icon-list-text span ,{{WRAPPER}} {{CURRENT_ITEM}} .premium-icon-list-wrapper i ,{{WRAPPER}} {{CURRENT_ITEM}} .premium-icon-list-wrapper .premium-icon-list-icon-text p' => 'font-size: {{SIZE}}{{UNIT}} ', |
| 381 | '{{WRAPPER}} {{CURRENT_ITEM}} .premium-icon-list-wrapper .premium-lottie-animation svg , {{WRAPPER}} {{CURRENT_ITEM}} .premium-icon-list-wrapper img' => 'width: {{SIZE}}{{UNIT}} !important; height: {{SIZE}}{{UNIT}} !important;', |
| 382 | ], |
| 383 | 'condition' => [ |
| 384 | 'show_global_style' => 'yes', |
| 385 | ] |
| 386 | ] |
| 387 | ); |
| 388 | |
| 389 | // Colors Tabs |
| 390 | $repeater_list->start_controls_tabs( |
| 391 | 'colors_style_tabs' |
| 392 | ); |
| 393 | |
| 394 | // Normal State |
| 395 | $repeater_list->start_controls_tab( |
| 396 | 'color_normal_state', |
| 397 | [ |
| 398 | 'label' => __( 'Normal', 'premium-addons-for-elementor' ), |
| 399 | 'condition' => [ |
| 400 | 'show_global_style' => 'yes' |
| 401 | ] |
| 402 | ] |
| 403 | ); |
| 404 | |
| 405 | // Icon color if selected |
| 406 | $repeater_list->add_control( |
| 407 | 'icon_color', |
| 408 | [ |
| 409 | 'label' => __( 'Icon/Text Color', 'premium-addons-for-elementor' ), |
| 410 | 'type' => Controls_Manager::COLOR, |
| 411 | 'scheme' => [ |
| 412 | 'type' => Scheme_Color::get_type(), |
| 413 | 'value' => Scheme_Color::COLOR_1, |
| 414 | ], |
| 415 | 'selectors' => [ |
| 416 | '{{WRAPPER}} {{CURRENT_ITEM}} .premium-icon-list-wrapper i' => 'color: {{VALUE}}', |
| 417 | '{{WRAPPER}} .premium-icon-list-blur:hover {{CURRENT_ITEM}} .premium-icon-list-wrapper i ' => 'text-shadow: 0 0 3px {{VALUE}};' |
| 418 | |
| 419 | ], |
| 420 | 'condition' => [ |
| 421 | 'show_icon' => 'yes', |
| 422 | 'icon_type' => 'icon', |
| 423 | 'show_global_style' => 'yes', |
| 424 | ] |
| 425 | ] |
| 426 | ); |
| 427 | |
| 428 | // Text color if selected |
| 429 | $repeater_list->add_control( |
| 430 | 'text_icon_color', |
| 431 | [ |
| 432 | 'label' => __( 'Icon/Text Color', 'premium-addons-for-elementor' ), |
| 433 | 'type' => Controls_Manager::COLOR, |
| 434 | 'scheme' => [ |
| 435 | 'type' => Scheme_Color::get_type(), |
| 436 | 'value' => Scheme_Color::COLOR_1, |
| 437 | ], |
| 438 | 'selectors' => [ |
| 439 | '{{WRAPPER}} {{CURRENT_ITEM}} .premium-icon-list-icon-text p' => 'color: {{VALUE}}', |
| 440 | '{{WRAPPER}} .premium-icon-list-blur:hover {{CURRENT_ITEM}} .premium-icon-list-icon-text p' => 'text-shadow: 0 0 3px {{VALUE}};' |
| 441 | ], |
| 442 | 'condition' => [ |
| 443 | 'show_icon' => 'yes', |
| 444 | 'icon_type' => 'text', |
| 445 | 'show_global_style' => 'yes', |
| 446 | ] |
| 447 | ] |
| 448 | ); |
| 449 | |
| 450 | // background text icon color if selected |
| 451 | $repeater_list->add_control( |
| 452 | 'background_text_icon_color', |
| 453 | [ |
| 454 | 'label' => __( 'Icon/Text Background', 'premium-addons-for-elementor' ), |
| 455 | 'type' => Controls_Manager::COLOR, |
| 456 | 'scheme' => [ |
| 457 | 'type' => Scheme_Color::get_type(), |
| 458 | 'value' => Scheme_Color::COLOR_1, |
| 459 | ], |
| 460 | 'selectors' => [ |
| 461 | '{{WRAPPER}} {{CURRENT_ITEM}} .premium-icon-list-icon-text p' => 'background-color: {{VALUE}}', |
| 462 | ], |
| 463 | 'condition' => [ |
| 464 | 'show_icon' => 'yes', |
| 465 | 'icon_type' => 'text', |
| 466 | 'show_global_style' => 'yes', |
| 467 | ], |
| 468 | ] |
| 469 | ); |
| 470 | |
| 471 | // Title color |
| 472 | $repeater_list->add_control( |
| 473 | 'title_list_color', |
| 474 | [ |
| 475 | 'label' => __( 'Title Color', 'premium-addons-for-elementor' ), |
| 476 | 'type' => Controls_Manager::COLOR, |
| 477 | 'scheme' => [ |
| 478 | 'type' => Scheme_Color::get_type(), |
| 479 | 'value' => Scheme_Color::COLOR_1, |
| 480 | ], |
| 481 | 'selectors' => [ |
| 482 | '{{WRAPPER}} {{CURRENT_ITEM}} .premium-icon-list-text span' => 'color: {{VALUE}}', |
| 483 | '{{WRAPPER}} .premium-icon-list-blur:hover {{CURRENT_ITEM}} .premium-icon-list-text span' => 'text-shadow: 0 0 3px {{VALUE}};' |
| 484 | ], |
| 485 | 'condition' => [ |
| 486 | 'show_global_style' => 'yes' |
| 487 | ] |
| 488 | ] |
| 489 | ); |
| 490 | |
| 491 | // Back ground color |
| 492 | $repeater_list->add_control( |
| 493 | 'background_color', |
| 494 | [ |
| 495 | 'label' => __( 'Background', 'premium-addons-for-elementor' ), |
| 496 | 'type' => Controls_Manager::COLOR, |
| 497 | 'selectors' => [ |
| 498 | '{{WRAPPER}} {{CURRENT_ITEM}}.premium-icon-list-content' => 'background-color: {{VALUE}}', |
| 499 | ], |
| 500 | 'condition' => [ |
| 501 | 'show_global_style' => 'yes', |
| 502 | ] |
| 503 | ] |
| 504 | ); |
| 505 | |
| 506 | $repeater_list->end_controls_tab(); |
| 507 | // Hover State |
| 508 | $repeater_list->start_controls_tab( |
| 509 | 'color_hover_state', |
| 510 | [ |
| 511 | 'label' => __( 'Hover', 'premium-addons-for-elementor' ), |
| 512 | 'condition' => [ |
| 513 | 'show_global_style' => 'yes' |
| 514 | ] |
| 515 | ] |
| 516 | ); |
| 517 | |
| 518 | // Icon hover color |
| 519 | $repeater_list->add_control( |
| 520 | 'icon_hover_color', |
| 521 | [ |
| 522 | 'label' => __( 'Icon/Text Color', 'premium-addons-for-elementor' ), |
| 523 | 'type' => Controls_Manager::COLOR, |
| 524 | 'selectors' => [ |
| 525 | '{{WRAPPER}} {{CURRENT_ITEM}}.premium-icon-list-content:hover .premium-icon-list-wrapper i' => 'color: {{VALUE}}', |
| 526 | '{{WRAPPER}} .premium-icon-list-blur {{CURRENT_ITEM}}.premium-icon-list-content:hover .premium-icon-list-wrapper i' => 'text-shadow: none !important; color: {{VALUE}} !important;' |
| 527 | ], |
| 528 | 'condition' => [ |
| 529 | 'show_icon' => 'yes', |
| 530 | 'icon_type' => 'icon', |
| 531 | 'show_global_style' => 'yes', |
| 532 | ] |
| 533 | ] |
| 534 | ); |
| 535 | |
| 536 | // Text hover color if selected |
| 537 | $repeater_list->add_control( |
| 538 | 'text_icon_hover_color', |
| 539 | [ |
| 540 | 'label' => __( 'Icon/Text Color', 'premium-addons-for-elementor' ), |
| 541 | 'type' => Controls_Manager::COLOR, |
| 542 | 'selectors' => [ |
| 543 | '{{WRAPPER}} {{CURRENT_ITEM}}.premium-icon-list-content:hover .premium-icon-list-icon-text p' => 'color: {{VALUE}}', |
| 544 | '{{WRAPPER}} .premium-icon-list-blur {{CURRENT_ITEM}}.premium-icon-list-content:hover .premium-icon-list-icon-text p' => 'text-shadow: none !important; color: {{VALUE}} !important;' |
| 545 | ], |
| 546 | 'condition' => [ |
| 547 | 'show_icon' => 'yes', |
| 548 | 'icon_type' => 'text', |
| 549 | 'show_global_style' => 'yes', |
| 550 | ] |
| 551 | ] |
| 552 | ); |
| 553 | |
| 554 | // background text icon color if selected |
| 555 | $repeater_list->add_control( |
| 556 | 'background_text_icon_hover_color', |
| 557 | [ |
| 558 | 'label' => __( 'Icon/Text Background ', 'premium-addons-for-elementor' ), |
| 559 | 'type' => Controls_Manager::COLOR, |
| 560 | 'scheme' => [ |
| 561 | 'type' => Scheme_Color::get_type(), |
| 562 | 'value' => Scheme_Color::COLOR_1, |
| 563 | ], |
| 564 | 'selectors' => [ |
| 565 | '{{WRAPPER}} {{CURRENT_ITEM}}.premium-icon-list-content:hover .premium-icon-list-icon-text p' => 'background-color: {{VALUE}}', |
| 566 | ], |
| 567 | 'condition' => [ |
| 568 | 'show_icon' => 'yes', |
| 569 | 'icon_type' => 'text', |
| 570 | 'show_global_style' => 'yes', |
| 571 | ], |
| 572 | ] |
| 573 | ); |
| 574 | |
| 575 | // Text hover color |
| 576 | $repeater_list->add_control( |
| 577 | 'title_hover_color', |
| 578 | [ |
| 579 | 'label' => __( 'Title Color', 'premium-addons-for-elementor' ), |
| 580 | 'type' => Controls_Manager::COLOR, |
| 581 | 'selectors' => [ |
| 582 | '{{WRAPPER}} {{CURRENT_ITEM}}.premium-icon-list-content:hover .premium-icon-list-text span' => 'color: {{VALUE}}', |
| 583 | '{{WRAPPER}} .premium-icon-list-blur {{CURRENT_ITEM}}.premium-icon-list-content:hover .premium-icon-list-text span' => 'text-shadow: none !important; color: {{VALUE}} !important;' |
| 584 | ], |
| 585 | 'condition' => [ |
| 586 | 'show_global_style' => 'yes', |
| 587 | ] |
| 588 | ] |
| 589 | ); |
| 590 | |
| 591 | // Back ground hover color |
| 592 | $repeater_list->add_control( |
| 593 | 'background_hover_color', |
| 594 | [ |
| 595 | 'label' => __( 'Background', 'premium-addons-for-elementor' ), |
| 596 | 'type' => Controls_Manager::COLOR, |
| 597 | 'selectors' => [ |
| 598 | '{{WRAPPER}} {{CURRENT_ITEM}}.premium-icon-list-content:hover' => 'background-color: {{VALUE}}', |
| 599 | ], |
| 600 | 'condition' => [ |
| 601 | 'show_global_style' => 'yes', |
| 602 | ] |
| 603 | ] |
| 604 | ); |
| 605 | |
| 606 | $repeater_list->end_controls_tab(); |
| 607 | $repeater_list->end_controls_tabs(); |
| 608 | |
| 609 | //Reapeter control for items |
| 610 | $this->add_control( |
| 611 | 'list', |
| 612 | [ |
| 613 | 'label' => __( 'List Items', 'premium-addons-for-elementor' ), |
| 614 | 'type' => Controls_Manager::REPEATER, |
| 615 | 'fields' => $repeater_list->get_controls(), |
| 616 | 'render_type' => 'template', |
| 617 | 'default' => [ |
| 618 | [ |
| 619 | 'list_title' => 'List Title #1', |
| 620 | 'premium_icon_list_font_updated' => [ |
| 621 | 'value' => 'fas fa-star', |
| 622 | 'library' => 'fa-solid', |
| 623 | ], |
| 624 | ], |
| 625 | [ |
| 626 | 'list_title' => 'List Title #2', |
| 627 | 'premium_icon_list_font_updated' => [ |
| 628 | 'value' => 'far fa-smile', |
| 629 | 'library' => 'fa-regular', |
| 630 | ], |
| 631 | |
| 632 | ], |
| 633 | [ |
| 634 | 'list_title' => 'List Title #3', |
| 635 | 'premium_icon_list_font_updated' => [ |
| 636 | 'value' => 'fa fa-check', |
| 637 | 'library' => 'fa-solid', |
| 638 | ], |
| 639 | ], |
| 640 | ], |
| 641 | 'title_field' => '<# if ( "icon" === icon_type ) { #> {{{ elementor.helpers.renderIcon( this, premium_icon_list_font_updated, {}, "i", "panel" ) }}}<#} else if( "text" === icon_type ) { #> {{list_text_icon}} <# } else if( "image" === icon_type) {#> <img class="editor-pa-img" width="20px" height="20px" src="{{custom_image.url}}"><# } #> {{{ list_title }}}' |
| 642 | ] |
| 643 | ); |
| 644 | |
| 645 | $this->end_controls_section(); |
| 646 | //End of List items tab |
| 647 | |
| 648 | // Display Options Content |
| 649 | $this->start_controls_section( |
| 650 | 'display_options_section', |
| 651 | [ |
| 652 | 'label' => __( 'Display Options', 'premium-addons-for-elementor' ), |
| 653 | 'tab' => Controls_Manager::TAB_CONTENT, |
| 654 | ] |
| 655 | ); |
| 656 | |
| 657 | // over flow Style |
| 658 | $this->add_control( |
| 659 | 'list_overflow', |
| 660 | [ |
| 661 | 'label' => __( 'List Overflow', 'premium-addons-for-elementor' ), |
| 662 | 'type' => Controls_Manager::SELECT, |
| 663 | 'options' => [ |
| 664 | 'visible' => __( 'Visible', 'premium-addons-for-elementor' ), |
| 665 | 'hidden' => __( 'Hidden', 'premium-addons-for-elementor' ), |
| 666 | ], |
| 667 | 'default' =>'hidden', |
| 668 | 'render_type' => 'template', |
| 669 | 'selectors' => [ |
| 670 | '{{WRAPPER}} .premium-icon-list-content' => 'overflow: {{VALUE}};', |
| 671 | ], |
| 672 | ] |
| 673 | ); |
| 674 | |
| 675 | $this->add_control( |
| 676 | 'overflow_render_notice', |
| 677 | [ |
| 678 | 'raw' => __("Please note that bullet connector option only appears when overflow set to visible.", 'premium-addons-for-elementor'), |
| 679 | 'type' => Controls_Manager::RAW_HTML, |
| 680 | 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info', |
| 681 | ] |
| 682 | ); |
| 683 | |
| 684 | // Check Layout inline/block |
| 685 | $this->add_responsive_control( |
| 686 | 'layout_type', |
| 687 | [ |
| 688 | 'label' => __( 'Layout Type', 'premium-addons-for-elementor' ), |
| 689 | 'type' => Controls_Manager::SELECT, |
| 690 | 'options' => [ |
| 691 | 'row' => __( 'Inline', 'premium-addons-for-elementor' ), |
| 692 | 'column' => __( 'Block', 'premium-addons-for-elementor' ), |
| 693 | |
| 694 | ], |
| 695 | 'render_type' => 'template', |
| 696 | 'default' => 'column', |
| 697 | 'selectors' => [ |
| 698 | '{{WRAPPER}} .premium-icon-list-box ' => 'flex-direction: {{VALUE}};', |
| 699 | ], |
| 700 | ] |
| 701 | ); |
| 702 | |
| 703 | // Display Alignments |
| 704 | $this->add_responsive_control( |
| 705 | 'premium_icon_list_align', |
| 706 | [ |
| 707 | 'label' => __( 'Alignment', 'premium-addons-for-elementor' ), |
| 708 | 'type' => Controls_Manager::CHOOSE, |
| 709 | 'render_type' => 'template', |
| 710 | 'options' => [ |
| 711 | 'flex-start' => [ |
| 712 | 'title'=> __( 'Left', 'premium-addons-for-elementor' ), |
| 713 | 'icon' => 'fa fa-align-left', |
| 714 | ], |
| 715 | 'center' => [ |
| 716 | 'title'=> __( 'Center', 'premium-addons-for-elementor' ), |
| 717 | 'icon' => 'fa fa-align-center', |
| 718 | ], |
| 719 | 'flex-end' => [ |
| 720 | 'title'=> __( 'Right', 'premium-addons-for-elementor' ), |
| 721 | 'icon' => 'fa fa-align-right', |
| 722 | ], |
| 723 | ], |
| 724 | 'selectors' => [ |
| 725 | '{{WRAPPER}} .premium-icon-list-content , {{WRAPPER}} .premium-icon-list-box ' => 'justify-content:{{VALUE}};', |
| 726 | '{{WRAPPER}} .premium-icon-list-divider , {{WRAPPER}} .premium-icon-list-wrapper-top ' => 'align-self:{{VALUE}};', |
| 727 | ], |
| 728 | 'default' => 'flex-start', |
| 729 | ] |
| 730 | ); |
| 731 | |
| 732 | // Icon postion select |
| 733 | $this->add_control( |
| 734 | 'icon_postion', |
| 735 | [ |
| 736 | 'label' => __( 'Bullet Position', 'premium-addons-for-elementor' ), |
| 737 | 'type' => Controls_Manager::SELECT, |
| 738 | 'options' => [ |
| 739 | 'row' => __( 'Before', 'premium-addons-for-elementor' ), |
| 740 | 'column' => __( 'Top', 'premium-addons-for-elementor' ), |
| 741 | 'row-reverse' => __( 'After', 'premium-addons-for-elementor' ), |
| 742 | ], |
| 743 | 'render_type' => 'template', |
| 744 | 'default' => 'row', |
| 745 | 'selectors' => [ |
| 746 | '{{WRAPPER}} .premium-icon-list-text' => 'display:flex;flex-direction: {{VALUE}};', |
| 747 | ], |
| 748 | ] |
| 749 | ); |
| 750 | |
| 751 | $this->add_responsive_control('top_icon_align', |
| 752 | [ |
| 753 | 'label' => __( 'Bullet Alignment', 'premium-addons-for-elementor' ), |
| 754 | 'type' => Controls_Manager::CHOOSE, |
| 755 | 'options' => [ |
| 756 | 'flex-start' => [ |
| 757 | 'title'=> __( 'Left', 'premium-addons-for-elementor' ), |
| 758 | 'icon' => 'fa fa-align-left', |
| 759 | ], |
| 760 | 'center' => [ |
| 761 | 'title'=> __( 'Center', 'premium-addons-for-elementor' ), |
| 762 | 'icon' => 'fa fa-align-center', |
| 763 | ], |
| 764 | 'flex-end' => [ |
| 765 | 'title'=> __( 'Right', 'premium-addons-for-elementor' ), |
| 766 | 'icon' => 'fa fa-align-right', |
| 767 | ], |
| 768 | ], |
| 769 | 'toggle' => false, |
| 770 | 'selectors' => [ |
| 771 | '{{WRAPPER}} .premium-icon-list-wrapper-top ' => 'align-self: {{VALUE}} !important', |
| 772 | ], |
| 773 | 'condition' => [ |
| 774 | 'icon_postion' => 'column', |
| 775 | ] |
| 776 | ] |
| 777 | ); |
| 778 | |
| 779 | // badge align Horizontal Style |
| 780 | $this->add_responsive_control( |
| 781 | 'badge_align_h', |
| 782 | [ |
| 783 | 'label' => __( 'Badge Alignment ', 'premium-addons-for-elementor' ), |
| 784 | 'type' => Controls_Manager::CHOOSE, |
| 785 | 'options' => [ |
| 786 | '8' => [ |
| 787 | 'title'=> __( 'Right', 'premium-addons-for-elementor' ), |
| 788 | 'icon' => 'fas fa-long-arrow-alt-right', |
| 789 | ], |
| 790 | '3' => [ |
| 791 | 'title'=> __( 'Left', 'premium-addons-for-elementor' ), |
| 792 | 'icon' => 'fas fa-long-arrow-alt-left', |
| 793 | ], |
| 794 | ], |
| 795 | 'default' => '8', |
| 796 | 'selectors' => [ |
| 797 | '{{WRAPPER}} .premium-icon-list-text' => 'order:5 ;', |
| 798 | '{{WRAPPER}} .premium-icon-list-badge' => 'order:{{VALUE}} ;' |
| 799 | ], |
| 800 | 'separator' => 'after' |
| 801 | ] |
| 802 | ); |
| 803 | |
| 804 | // Show Divider |
| 805 | $this->add_control( |
| 806 | 'show_divider', |
| 807 | [ |
| 808 | 'label' => __( 'Divider', 'premium-addons-for-elementor' ), |
| 809 | 'type' => Controls_Manager::SWITCHER, |
| 810 | 'return_value' => 'yes', |
| 811 | ] |
| 812 | ); |
| 813 | |
| 814 | // Show Connector |
| 815 | $this->add_control( |
| 816 | 'show_connector', |
| 817 | [ |
| 818 | 'label' => __( 'Bullet Connector', 'premium-addons-for-elementor' ), |
| 819 | 'type' => Controls_Manager::SWITCHER, |
| 820 | 'return_value' => 'yes', |
| 821 | 'condition' => [ |
| 822 | 'layout_type' => 'column', |
| 823 | 'icon_postion!' => 'column', |
| 824 | 'hover_effect_type!' => 'grow', |
| 825 | 'list_overflow' => 'visible', |
| 826 | ], |
| 827 | ] |
| 828 | ); |
| 829 | |
| 830 | $this->add_control('premium_icon_list_animation_switcher', |
| 831 | [ |
| 832 | 'label' => __('Animation','premium-addons-for-elementor'), |
| 833 | 'type' => Controls_Manager::SWITCHER, |
| 834 | ] |
| 835 | ); |
| 836 | |
| 837 | $this->add_control('premium_icon_list_animation', |
| 838 | [ |
| 839 | 'label' => __( 'Entrance Animation', 'premium-addons-for-elementor' ), |
| 840 | 'type' => Controls_Manager::ANIMATION, |
| 841 | 'default' => '', |
| 842 | 'label_block' => true, |
| 843 | 'frontend_available' => true, |
| 844 | 'render_type' => 'template', |
| 845 | 'condition' => [ |
| 846 | 'premium_icon_list_animation_switcher' => 'yes' |
| 847 | ], |
| 848 | ] |
| 849 | ); |
| 850 | |
| 851 | $this->add_control('premium_icon_list_animation_duration', |
| 852 | [ |
| 853 | 'label' => __( 'Animation Duration', 'premium-addons-for-elementor' ), |
| 854 | 'type' => Controls_Manager::SELECT, |
| 855 | 'default' => '', |
| 856 | 'options' => [ |
| 857 | 'slow' => __( 'Slow', 'premium-addons-for-elementor' ), |
| 858 | '' => __( 'Normal', 'premium-addons-for-elementor' ), |
| 859 | 'fast' => __( 'Fast', 'premium-addons-for-elementor' ), |
| 860 | ], |
| 861 | 'condition' => [ |
| 862 | 'premium_icon_list_animation_switcher' => 'yes', |
| 863 | 'premium_icon_list_animation!' => '', |
| 864 | ], |
| 865 | ] |
| 866 | ); |
| 867 | |
| 868 | $this->add_control('premium_icon_list_animation_delay', |
| 869 | [ |
| 870 | 'label' => __( 'Animation Delay in Between (s)', 'premium-addons-for-elementor' ) , |
| 871 | 'type' => Controls_Manager::NUMBER, |
| 872 | 'default' => 0, |
| 873 | 'step' => 0.1, |
| 874 | 'condition' => [ |
| 875 | 'premium_icon_list_animation_switcher' => 'yes', |
| 876 | 'premium_icon_list_animation!' => '', |
| 877 | ], |
| 878 | 'frontend_available' => true, |
| 879 | ] |
| 880 | ); |
| 881 | |
| 882 | // select hover type |
| 883 | $this->add_control( |
| 884 | 'hover_effect_type', |
| 885 | [ |
| 886 | 'label' => __( 'Hover Effect', 'premium-addons-for-elementor' ), |
| 887 | 'type' => Controls_Manager::SELECT, |
| 888 | 'options' => [ |
| 889 | 'none' => __( 'None', 'premium-addons-for-elementor' ), |
| 890 | 'blur' => __( 'Blur', 'premium-addons-for-elementor' ), |
| 891 | 'grow' => __( 'Grow', 'premium-addons-for-elementor' ), |
| 892 | 'linear gradient' => __( 'Text Gradient', 'premium-addons-for-elementor' ), |
| 893 | ], |
| 894 | 'render_type' => 'template', |
| 895 | 'default' => 'none', |
| 896 | ] |
| 897 | ); |
| 898 | |
| 899 | $this->add_group_control( |
| 900 | Group_Control_Background::get_type(), |
| 901 | [ |
| 902 | 'name' => 'gradient_color', |
| 903 | 'types' => [ 'gradient' ], |
| 904 | 'condition' => [ |
| 905 | 'hover_effect_type' => 'linear gradient' |
| 906 | ], |
| 907 | 'selector' => '{{WRAPPER}} a[data-text]::before ,{{WRAPPER}} .premium-icon-list-gradient-effect::before' |
| 908 | ] |
| 909 | ); |
| 910 | |
| 911 | $this->end_controls_section(); |
| 912 | //End of display options tab |
| 913 | |
| 914 | $this->start_controls_section('section_pa_docs', |
| 915 | [ |
| 916 | 'label' => __('Helpful Documentations', 'premium-addons-for-elementor'), |
| 917 | ] |
| 918 | ); |
| 919 | |
| 920 | $doc1_url = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/docs/icon-list-widget-tutorial/', 'editor-page', 'wp-editor', 'get-support' ); |
| 921 | |
| 922 | $this->add_control('doc_1', |
| 923 | [ |
| 924 | 'type' => Controls_Manager::RAW_HTML, |
| 925 | 'raw' => sprintf( '<a href="%s" target="_blank">%s</a>', $doc1_url ,__( 'Gettings started »', 'premium-addons-for-elementor' ) ), |
| 926 | 'content_classes' => 'editor-pa-doc', |
| 927 | ] |
| 928 | ); |
| 929 | |
| 930 | $this->end_controls_section(); |
| 931 | |
| 932 | // Style Tab |
| 933 | $this->style_tab(); |
| 934 | } |
| 935 | |
| 936 | private function style_tab() { |
| 937 | |
| 938 | // List Style Settings |
| 939 | $this->start_controls_section( |
| 940 | 'list_style_section', |
| 941 | [ |
| 942 | 'label' => __( ' General ', 'premium-addons-for-elementor' ), |
| 943 | 'tab' => Controls_Manager::TAB_STYLE, |
| 944 | ] |
| 945 | ); |
| 946 | |
| 947 | //list items back ground color |
| 948 | $this->add_control( |
| 949 | 'list_items_color', |
| 950 | [ |
| 951 | 'label' => __( 'Background Color', 'premium-addons-for-elementor' ), |
| 952 | 'type' => Controls_Manager::COLOR, |
| 953 | 'selectors' => [ |
| 954 | ' {{WRAPPER}} .premium-icon-list-content' => 'background-color: {{VALUE}}', |
| 955 | ], |
| 956 | ] |
| 957 | ); |
| 958 | |
| 959 | //List items hover style color |
| 960 | $this->add_control( |
| 961 | 'list_items_hover_color', |
| 962 | [ |
| 963 | 'label' => __( 'Hover Background Color', 'premium-addons-for-elementor' ), |
| 964 | 'type' => Controls_Manager::COLOR, |
| 965 | 'selectors' => [ |
| 966 | '{{WRAPPER}} .premium-icon-list-content:hover ' => 'background-color: {{VALUE}}', |
| 967 | ], |
| 968 | ] |
| 969 | ); |
| 970 | |
| 971 | // List items Shadow |
| 972 | $this->add_group_control( |
| 973 | Group_Control_Box_Shadow::get_type(), |
| 974 | [ |
| 975 | 'name' => 'list_items_shadow', |
| 976 | 'selector' => '{{WRAPPER}} .premium-icon-list-content', |
| 977 | ] |
| 978 | ); |
| 979 | |
| 980 | // List items Shadow Hover |
| 981 | $this->add_group_control( |
| 982 | Group_Control_Box_Shadow::get_type(), |
| 983 | [ |
| 984 | 'name' => 'list_items_shadow_hover', |
| 985 | 'label' => 'Hover Box Shadow', |
| 986 | 'selector' => '{{WRAPPER}} .premium-icon-list-content:hover', |
| 987 | ] |
| 988 | ); |
| 989 | |
| 990 | // list item Border |
| 991 | $this->add_group_control( |
| 992 | Group_Control_Border::get_type(), |
| 993 | [ |
| 994 | 'name' => 'list_item_border', |
| 995 | 'label' => __( 'Border', 'premium-addons-for-elementor' ), |
| 996 | 'selector' => '{{WRAPPER}} .premium-icon-list-content ', |
| 997 | ] |
| 998 | ); |
| 999 | |
| 1000 | // list item Border Radius |
| 1001 | $this->add_responsive_control( |
| 1002 | 'list_item_border_radius', |
| 1003 | [ |
| 1004 | 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), |
| 1005 | 'type' => Controls_Manager::DIMENSIONS, |
| 1006 | 'size_units' => [ 'px', '%', 'em' ], |
| 1007 | 'default' => [ |
| 1008 | 'top' => 0, |
| 1009 | 'right' => 0, |
| 1010 | 'bottom' => 0, |
| 1011 | 'left' => 0, |
| 1012 | ], |
| 1013 | 'selectors' => [ |
| 1014 | '{{WRAPPER}} .premium-icon-list-content ' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1015 | ], |
| 1016 | ] |
| 1017 | ); |
| 1018 | |
| 1019 | // List Items Margin |
| 1020 | $this->add_responsive_control( |
| 1021 | 'list_item_margin', |
| 1022 | [ |
| 1023 | 'label' => __( 'Margin', 'premium-addons-for-elementor' ), |
| 1024 | 'type' => Controls_Manager::DIMENSIONS, |
| 1025 | 'size_units' => [ 'px', '%', 'em' ], |
| 1026 | 'selectors' => [ |
| 1027 | '{{WRAPPER}} .premium-icon-list-content ' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1028 | ], |
| 1029 | ] |
| 1030 | ); |
| 1031 | |
| 1032 | // List Items Padding |
| 1033 | $this->add_responsive_control( |
| 1034 | 'list_items_padding', |
| 1035 | [ |
| 1036 | 'label' => __( 'Padding', 'premium-addons-for-elementor' ), |
| 1037 | 'type' => Controls_Manager::DIMENSIONS, |
| 1038 | 'size_units' => [ 'px', '%', 'em' ], |
| 1039 | 'selectors' => [ |
| 1040 | '{{WRAPPER}} .premium-icon-list-content ' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1041 | ], |
| 1042 | ] |
| 1043 | ); |
| 1044 | |
| 1045 | $this->end_controls_section(); |
| 1046 | //End of list style settings |
| 1047 | |
| 1048 | // Icon Style Settings |
| 1049 | $this->start_controls_section( |
| 1050 | 'icon_style_section', |
| 1051 | [ |
| 1052 | 'label' => __( 'Bullet', 'premium-addons-for-elementor' ), |
| 1053 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1054 | ] |
| 1055 | ); |
| 1056 | |
| 1057 | $this->add_control( |
| 1058 | 'icon_render_notice', |
| 1059 | [ |
| 1060 | 'raw' => __("Options below will be applied on items with no style options set individually from the repeater.", 'premium-addons-for-elementor'), |
| 1061 | 'type' => Controls_Manager::RAW_HTML, |
| 1062 | ] |
| 1063 | ); |
| 1064 | |
| 1065 | // Icon Style Size |
| 1066 | $this->add_responsive_control( |
| 1067 | 'icon_size', |
| 1068 | [ |
| 1069 | 'label' => __( 'Size', 'premium-addons-for-elementor' ), |
| 1070 | 'type' => Controls_Manager::SLIDER, |
| 1071 | 'size_units' => ['px', 'em'], |
| 1072 | 'range' => [ |
| 1073 | 'px' => [ |
| 1074 | 'min' => 1, |
| 1075 | 'max' => 200, |
| 1076 | ], |
| 1077 | 'em' => [ |
| 1078 | 'min' => 1, |
| 1079 | 'max' => 30, |
| 1080 | ], |
| 1081 | ], |
| 1082 | 'selectors' => [ |
| 1083 | '{{WRAPPER}} .premium-icon-list-wrapper i , {{WRAPPER}} .premium-icon-list-wrapper .premium-icon-list-icon-text p' => 'font-size: {{SIZE}}{{UNIT}} ', |
| 1084 | '{{WRAPPER}} .premium-icon-list-wrapper .premium-lottie-animation svg , {{WRAPPER}} .premium-icon-list-wrapper img' => 'width: {{SIZE}}{{UNIT}} !important; height: {{SIZE}}{{UNIT}} !important', |
| 1085 | ], |
| 1086 | ] |
| 1087 | ); |
| 1088 | |
| 1089 | $this->add_control( |
| 1090 | 'icon_color_render_notice', |
| 1091 | [ |
| 1092 | 'raw' => __('Color options below will be applied on Font Awesome and Text.', 'premium-addons-for-elementor'), |
| 1093 | 'type' => Controls_Manager::RAW_HTML, |
| 1094 | "separator" => "before" |
| 1095 | ] |
| 1096 | ); |
| 1097 | |
| 1098 | //Icon style color |
| 1099 | $this->add_control( |
| 1100 | 'icon_color', |
| 1101 | [ |
| 1102 | 'label' => __( 'Color', 'premium-addons-for-elementor' ), |
| 1103 | 'type' => Controls_Manager::COLOR, |
| 1104 | 'scheme' => [ |
| 1105 | 'type' => Scheme_Color::get_type(), |
| 1106 | 'value' => Scheme_Color::COLOR_1, |
| 1107 | ], |
| 1108 | 'selectors' => [ |
| 1109 | '{{WRAPPER}} .premium-icon-list-wrapper i , {{WRAPPER}} .premium-icon-list-icon-text p' => 'color: {{VALUE}}', |
| 1110 | '{{WRAPPER}} .premium-icon-list-blur:hover .premium-icon-list-wrapper i , {{WRAPPER}} .premium-icon-list-blur:hover .premium-icon-list-wrapper .premium-icon-list-icon-text p' => 'text-shadow: 0 0 3px {{VALUE}};' |
| 1111 | ], |
| 1112 | ] |
| 1113 | ); |
| 1114 | |
| 1115 | //Icon hover style color |
| 1116 | $this->add_control( |
| 1117 | 'icon_hover_color', |
| 1118 | [ |
| 1119 | 'label' => __( 'Hover Color', 'premium-addons-for-elementor' ), |
| 1120 | 'type' => Controls_Manager::COLOR, |
| 1121 | 'scheme' => [ |
| 1122 | 'type' => Scheme_Color::get_type(), |
| 1123 | 'value' => Scheme_Color::COLOR_1, |
| 1124 | ], |
| 1125 | 'selectors' => [ |
| 1126 | '{{WRAPPER}} .premium-icon-list-content:hover .premium-icon-list-wrapper i ,{{WRAPPER}} .premium-icon-list-content:hover .premium-icon-list-icon-text p' => 'color: {{VALUE}}', |
| 1127 | '{{WRAPPER}} .premium-icon-list-blur .premium-icon-list-content:hover .premium-icon-list-wrapper i , {{WRAPPER}} .premium-icon-list-blur .premium-icon-list-content:hover .premium-icon-list-icon-text p' => 'text-shadow: none !important; color: {{VALUE}} !important;' |
| 1128 | ], |
| 1129 | ] |
| 1130 | ); |
| 1131 | |
| 1132 | $this->add_control( |
| 1133 | 'background_render_notice', |
| 1134 | [ |
| 1135 | 'raw' => __('Background Color options below will be applied on all bullet types.', 'premium-addons-for-elementor'), |
| 1136 | 'type' => Controls_Manager::RAW_HTML, |
| 1137 | 'separator' => 'before' |
| 1138 | ] |
| 1139 | ); |
| 1140 | |
| 1141 | //Icon Background style color |
| 1142 | $this->add_control( |
| 1143 | 'icon_background_color', |
| 1144 | [ |
| 1145 | 'label' => __( 'Background', 'premium-addons-for-elementor' ), |
| 1146 | 'type' => Controls_Manager::COLOR, |
| 1147 | 'selectors' => [ |
| 1148 | '{{WRAPPER}} .premium-icon-list-wrapper i , {{WRAPPER}} .premium-icon-list-wrapper svg ,{{WRAPPER}} .premium-icon-list-wrapper img , {{WRAPPER}} .premium-icon-list-icon-text p' => 'background-color: {{VALUE}}', |
| 1149 | ], |
| 1150 | ] |
| 1151 | ); |
| 1152 | |
| 1153 | //Icon Background Hover style color |
| 1154 | $this->add_control( |
| 1155 | 'icon_background_hover_color', |
| 1156 | [ |
| 1157 | 'label' => __( ' Hover Background', 'premium-addons-for-elementor' ), |
| 1158 | 'type' => Controls_Manager::COLOR, |
| 1159 | 'selectors' => [ |
| 1160 | '{{WRAPPER}} .premium-icon-list-content:hover .premium-icon-list-wrapper i,{{WRAPPER}} .premium-icon-list-content:hover .premium-icon-list-wrapper svg ,{{WRAPPER}} .premium-icon-list-content:hover .premium-icon-list-wrapper img , {{WRAPPER}} .premium-icon-list-content:hover .premium-icon-list-icon-text p' => 'background-color: {{VALUE}}', |
| 1161 | ], |
| 1162 | ] |
| 1163 | ); |
| 1164 | |
| 1165 | $this->add_control( |
| 1166 | 'typo_text_render_notice', |
| 1167 | [ |
| 1168 | 'raw' => __('Typography option below will be applied on text.', 'premium-addons-for-elementor'), |
| 1169 | 'type' => Controls_Manager::RAW_HTML, |
| 1170 | 'separator' => 'before' |
| 1171 | ] |
| 1172 | ); |
| 1173 | |
| 1174 | // Text icon Typography Style |
| 1175 | $this->add_group_control( |
| 1176 | Group_Control_Typography::get_type(), |
| 1177 | [ |
| 1178 | 'name' => 'text_icon_typography', |
| 1179 | 'label' => __( 'Typography', 'premium-addons-for-elementor' ), |
| 1180 | 'selector' => ' {{WRAPPER}} .premium-icon-list-icon-text p', |
| 1181 | 'scheme' => Scheme_Typography::TYPOGRAPHY_3, |
| 1182 | ] |
| 1183 | ); |
| 1184 | |
| 1185 | // Icon Border |
| 1186 | $this->add_group_control( |
| 1187 | Group_Control_Border::get_type(), |
| 1188 | [ |
| 1189 | 'name' => 'border', |
| 1190 | 'label' => __( 'Border', 'premium-addons-for-elementor' ), |
| 1191 | 'selector' => '{{WRAPPER}} .premium-icon-list-content .premium-icon-list-wrapper i , {{WRAPPER}} .premium-icon-list-content .premium-icon-list-wrapper svg , {{WRAPPER}} .premium-icon-list-content .premium-icon-list-wrapper img ,{{WRAPPER}} .premium-icon-list-content .premium-icon-list-wrapper .premium-icon-list-icon-text p', |
| 1192 | 'separator' => 'before' |
| 1193 | ] |
| 1194 | ); |
| 1195 | |
| 1196 | // Icon Border Radius |
| 1197 | $this->add_responsive_control( |
| 1198 | 'icon_border_radius', |
| 1199 | [ |
| 1200 | 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), |
| 1201 | 'type' => Controls_Manager::DIMENSIONS, |
| 1202 | 'size_units' => [ 'px', '%', 'em' ], |
| 1203 | 'selectors' => [ |
| 1204 | '{{WRAPPER}} .premium-icon-list-content .premium-icon-list-wrapper i ,{{WRAPPER}} .premium-icon-list-content .premium-icon-list-wrapper .premium-icon-list-icon-text p, {{WRAPPER}} .premium-icon-list-content .premium-icon-list-wrapper svg , {{WRAPPER}} .premium-icon-list-content .premium-icon-list-wrapper img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1205 | ], |
| 1206 | ] |
| 1207 | ); |
| 1208 | |
| 1209 | // Icon Margin |
| 1210 | $this->add_responsive_control( |
| 1211 | 'icon_margin', |
| 1212 | [ |
| 1213 | 'label' => __( 'Margin', 'premium-addons-for-elementor' ), |
| 1214 | 'type' => Controls_Manager::DIMENSIONS, |
| 1215 | 'size_units' => [ 'px', '%', 'em' ], |
| 1216 | 'selectors' => [ |
| 1217 | '{{WRAPPER}} .premium-icon-list-wrapper ' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1218 | ], |
| 1219 | 'separator' => 'before' |
| 1220 | ] |
| 1221 | ); |
| 1222 | |
| 1223 | // Icon Padding |
| 1224 | $this->add_responsive_control( |
| 1225 | 'icon_padding', |
| 1226 | [ |
| 1227 | 'label' => __( 'Padding', 'premium-addons-for-elementor' ), |
| 1228 | 'type' => Controls_Manager::DIMENSIONS, |
| 1229 | 'size_units' => [ 'px', '%', 'em' ], |
| 1230 | 'selectors' => [ |
| 1231 | '{{WRAPPER}} .premium-icon-list-content .premium-icon-list-wrapper i,{{WRAPPER}} .premium-icon-list-content .premium-icon-list-wrapper .premium-icon-list-icon-text p , {{WRAPPER}} .premium-icon-list-content .premium-icon-list-wrapper svg , {{WRAPPER}} .premium-icon-list-content .premium-icon-list-wrapper img' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1232 | ], |
| 1233 | ] |
| 1234 | ); |
| 1235 | |
| 1236 | $this->end_controls_section(); |
| 1237 | //End of icon style settings |
| 1238 | |
| 1239 | // Title Style Settings |
| 1240 | $this->start_controls_section( |
| 1241 | 'title_style_section', |
| 1242 | [ |
| 1243 | 'label' => __( 'Title', 'premium-addons-for-elementor' ), |
| 1244 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1245 | ] |
| 1246 | ); |
| 1247 | |
| 1248 | $this->add_control( |
| 1249 | 'title_render_notice', |
| 1250 | [ |
| 1251 | 'raw' => __("Options below will be applied on items with no style options set individually from the repeater.", 'premium-addons-for-elementor'), |
| 1252 | 'type' => Controls_Manager::RAW_HTML, |
| 1253 | ] |
| 1254 | ); |
| 1255 | |
| 1256 | // Title Typography |
| 1257 | $this->add_group_control( |
| 1258 | Group_Control_Typography::get_type(), |
| 1259 | [ |
| 1260 | 'name' => 'list_title_typography', |
| 1261 | 'label' => __( 'Typography', 'premium-addons-for-elementor' ), |
| 1262 | 'selector' => ' {{WRAPPER}} .premium-icon-list-text span ', |
| 1263 | 'scheme' => Scheme_Typography::TYPOGRAPHY_3, |
| 1264 | |
| 1265 | ] |
| 1266 | ); |
| 1267 | |
| 1268 | //Title style color |
| 1269 | $this->add_control( |
| 1270 | 'title_color', |
| 1271 | [ |
| 1272 | 'label' => __( 'Color', 'premium-addons-for-elementor' ), |
| 1273 | 'type' => Controls_Manager::COLOR, |
| 1274 | 'scheme' => [ |
| 1275 | 'type' => Scheme_Color::get_type(), |
| 1276 | 'value' => Scheme_Color::COLOR_1, |
| 1277 | ], |
| 1278 | 'selectors' => [ |
| 1279 | ' {{WRAPPER}} .premium-icon-list-text span' => 'color: {{VALUE}}', |
| 1280 | ' {{WRAPPER}} .premium-icon-list-blur:hover .premium-icon-list-text span' => 'text-shadow: 0 0 3px {{VALUE}};' |
| 1281 | ], |
| 1282 | ] |
| 1283 | ); |
| 1284 | |
| 1285 | //Title hover style color |
| 1286 | $this->add_control( |
| 1287 | 'title_hover_color', |
| 1288 | [ |
| 1289 | 'label' => __( 'Hover Color', 'premium-addons-for-elementor' ), |
| 1290 | 'type' => Controls_Manager::COLOR, |
| 1291 | 'scheme' => [ |
| 1292 | 'type' => Scheme_Color::get_type(), |
| 1293 | 'value' => Scheme_Color::COLOR_1, |
| 1294 | ], |
| 1295 | 'selectors' => [ |
| 1296 | '{{WRAPPER}} .premium-icon-list-content:hover .premium-icon-list-text span' => 'color: {{VALUE}}', |
| 1297 | '{{WRAPPER}} .premium-icon-list-blur .premium-icon-list-content:hover .premium-icon-list-text span' => 'text-shadow: none !important; color: {{VALUE}} !important;' |
| 1298 | ], |
| 1299 | ] |
| 1300 | ); |
| 1301 | |
| 1302 | // Title Shadow |
| 1303 | $this->add_group_control( |
| 1304 | Group_Control_text_Shadow::get_type(), |
| 1305 | [ |
| 1306 | 'name' => 'list_title_shadow', |
| 1307 | 'selector' => '{{WRAPPER}} .premium-icon-list-text span', |
| 1308 | ] |
| 1309 | ); |
| 1310 | |
| 1311 | |
| 1312 | // Title Margin |
| 1313 | $this->add_responsive_control( |
| 1314 | 'list_title_margin', |
| 1315 | [ |
| 1316 | 'label' => __( 'Margin', 'premium-addons-for-elementor' ), |
| 1317 | 'type' => Controls_Manager::DIMENSIONS, |
| 1318 | 'size_units' => [ 'px', '%', 'em' ], |
| 1319 | 'selectors' => [ |
| 1320 | '{{WRAPPER}} .premium-icon-list-text ' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1321 | ], |
| 1322 | ] |
| 1323 | ); |
| 1324 | |
| 1325 | $this->end_controls_section(); |
| 1326 | //End of title style settings |
| 1327 | |
| 1328 | // badge Style Settings |
| 1329 | $this->start_controls_section( |
| 1330 | 'badge_style_section', |
| 1331 | [ |
| 1332 | 'label' => __( ' Badge ', 'premium-addons-for-elementor' ), |
| 1333 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1334 | ] |
| 1335 | ); |
| 1336 | |
| 1337 | // badge text Style |
| 1338 | $this->add_group_control( |
| 1339 | Group_Control_Typography::get_type(), |
| 1340 | [ |
| 1341 | 'name' => 'badge_title_typography', |
| 1342 | 'label' => __( 'Typography', 'premium-addons-for-elementor' ), |
| 1343 | 'selector' => ' {{WRAPPER}} .premium-icon-list-badge span', |
| 1344 | 'scheme' => Scheme_Typography::TYPOGRAPHY_3, |
| 1345 | ] |
| 1346 | ); |
| 1347 | |
| 1348 | $this->add_control( |
| 1349 | 'badge_color_render_notice', |
| 1350 | [ |
| 1351 | 'raw' => __('Color options below will be applied on badge with no style options set individually from the repeater.', 'premium-addons-for-elementor'), |
| 1352 | 'type' => Controls_Manager::RAW_HTML, |
| 1353 | 'separator' => 'before' |
| 1354 | ] |
| 1355 | ); |
| 1356 | |
| 1357 | // badge color |
| 1358 | $this->add_control( |
| 1359 | 'badge_text_style_color', |
| 1360 | [ |
| 1361 | 'label' => __( 'Text Color', 'premium-addons-for-elementor' ), |
| 1362 | 'type' => Controls_Manager::COLOR, |
| 1363 | 'scheme' => [ |
| 1364 | 'type' => Scheme_Color::get_type(), |
| 1365 | 'value' => Scheme_Color::COLOR_1, |
| 1366 | ], |
| 1367 | 'selectors' => [ |
| 1368 | '{{WRAPPER}} .premium-icon-list-badge span' => 'color: {{VALUE}}', |
| 1369 | ], |
| 1370 | 'default' => '#fff', |
| 1371 | ] |
| 1372 | ); |
| 1373 | |
| 1374 | // Badge Back ground color |
| 1375 | $this->add_control( |
| 1376 | 'badge_background_style_color', |
| 1377 | [ |
| 1378 | 'label' => __( 'Background', 'premium-addons-for-elementor' ), |
| 1379 | 'type' => Controls_Manager::COLOR, |
| 1380 | 'scheme' => [ |
| 1381 | 'type' => Scheme_Color::get_type(), |
| 1382 | 'value' => Scheme_Color::COLOR_1, |
| 1383 | ], |
| 1384 | 'default' => '#6ec1e4', |
| 1385 | 'selectors' => [ |
| 1386 | '{{WRAPPER}} .premium-icon-list-badge span' => 'background-color: {{VALUE}}', |
| 1387 | ], |
| 1388 | 'separator' => 'after' |
| 1389 | ] |
| 1390 | ); |
| 1391 | |
| 1392 | // Badge Border Radius |
| 1393 | $this->add_responsive_control( |
| 1394 | 'badge_border_radius', |
| 1395 | [ |
| 1396 | 'label' => __( 'Badge Radius', 'premium-addons-for-elementor' ), |
| 1397 | 'type' => Controls_Manager::DIMENSIONS, |
| 1398 | 'size_units' => [ 'px', '%', 'em' ], |
| 1399 | 'default' => [ |
| 1400 | 'top' => 2, |
| 1401 | 'right' => 2, |
| 1402 | 'bottom' => 2, |
| 1403 | 'left' => 2, |
| 1404 | ], |
| 1405 | 'selectors' => [ |
| 1406 | '{{WRAPPER}} .premium-icon-list-badge span ' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1407 | ], |
| 1408 | ] |
| 1409 | ); |
| 1410 | |
| 1411 | // Badge text Shadow |
| 1412 | $this->add_group_control( |
| 1413 | Group_Control_text_Shadow::get_type(), |
| 1414 | [ |
| 1415 | 'name' => 'Badge_text_shadow', |
| 1416 | 'selector' => '{{WRAPPER}} .premium-icon-list-badge span', |
| 1417 | ] |
| 1418 | ); |
| 1419 | |
| 1420 | // Badge box Shadow |
| 1421 | $this->add_group_control( |
| 1422 | Group_Control_Box_Shadow::get_type(), |
| 1423 | [ |
| 1424 | 'name' => 'Badge_box_shadow', |
| 1425 | 'selector' => '{{WRAPPER}} .premium-icon-list-badge span', |
| 1426 | ] |
| 1427 | ); |
| 1428 | |
| 1429 | // Badge Margin |
| 1430 | $this->add_responsive_control( |
| 1431 | 'Badge_margin', |
| 1432 | [ |
| 1433 | 'label' => __( 'Margin', 'premium-addons-for-elementor' ), |
| 1434 | 'type' => Controls_Manager::DIMENSIONS, |
| 1435 | 'size_units' => [ 'px', '%', 'em' ], |
| 1436 | 'default' => [ |
| 1437 | 'top' => 0, |
| 1438 | 'right' => 0, |
| 1439 | 'bottom' => 0, |
| 1440 | 'left' => 5, |
| 1441 | ], |
| 1442 | 'selectors' => [ |
| 1443 | '{{WRAPPER}} .premium-icon-list-badge ' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1444 | ], |
| 1445 | ] |
| 1446 | ); |
| 1447 | |
| 1448 | // Badge Padding |
| 1449 | $this->add_responsive_control( |
| 1450 | 'Badge_padding', |
| 1451 | [ |
| 1452 | 'label' => __( 'Padding', 'premium-addons-for-elementor' ), |
| 1453 | 'type' => Controls_Manager::DIMENSIONS, |
| 1454 | 'size_units' => [ 'px', '%', 'em' ], |
| 1455 | 'default' => [ |
| 1456 | 'top' => 2, |
| 1457 | 'right' => 5, |
| 1458 | 'bottom' => 2, |
| 1459 | 'left' => 5, |
| 1460 | ], |
| 1461 | 'selectors' => [ |
| 1462 | '{{WRAPPER}} .premium-icon-list-badge span ' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1463 | ], |
| 1464 | ] |
| 1465 | ); |
| 1466 | |
| 1467 | $this->end_controls_section(); |
| 1468 | //End of badge style settings |
| 1469 | |
| 1470 | // Divider Style Settings |
| 1471 | $this->start_controls_section( |
| 1472 | 'divider_style_section', |
| 1473 | [ |
| 1474 | 'label' => __( ' Divider ', 'premium-addons-for-elementor' ), |
| 1475 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1476 | 'condition' =>[ |
| 1477 | 'show_divider' => 'yes' |
| 1478 | ] |
| 1479 | ] |
| 1480 | ); |
| 1481 | |
| 1482 | // Divider Style |
| 1483 | $this->add_control( |
| 1484 | 'list_divider_type', |
| 1485 | [ |
| 1486 | 'label' => __( 'Divider Style', 'premium-addons-for-elementor' ), |
| 1487 | 'type' => Controls_Manager::SELECT, |
| 1488 | 'options' => [ |
| 1489 | 'solid' => __( 'Solid', 'premium-addons-for-elementor' ), |
| 1490 | 'double' => __( 'Double', 'premium-addons-for-elementor' ), |
| 1491 | 'dotted' => __( 'Dotted', 'premium-addons-for-elementor' ), |
| 1492 | 'dashed' => __( 'Dashed', 'premium-addons-for-elementor' ), |
| 1493 | 'groove' => __( 'Groove', 'premium-addons-for-elementor' ), |
| 1494 | ], |
| 1495 | 'default' =>'solid', |
| 1496 | 'selectors' => [ |
| 1497 | '{{WRAPPER}} .premium-icon-list-divider:not(:last-child):after' => 'border-top-style: {{VALUE}};', |
| 1498 | '{{WRAPPER}} .premium-icon-list-divider-inline:not(:last-child):after' => 'border-left-style: {{VALUE}};' |
| 1499 | ], |
| 1500 | 'condition' => [ |
| 1501 | 'show_divider' => 'yes' |
| 1502 | ] |
| 1503 | ] |
| 1504 | ); |
| 1505 | |
| 1506 | // Divider Width |
| 1507 | $this->add_responsive_control( |
| 1508 | 'list_divider_width', |
| 1509 | [ |
| 1510 | 'label' => __(' Width', 'premium-addons-for-elementor'), |
| 1511 | 'type' => Controls_Manager::SLIDER, |
| 1512 | 'size_units' => ['px', 'em' ], |
| 1513 | 'range' => [ |
| 1514 | 'px' => [ |
| 1515 | 'min' => 0, |
| 1516 | 'max' => 600 |
| 1517 | ], |
| 1518 | 'em' => [ |
| 1519 | 'min' => 0, |
| 1520 | 'max' => 30 |
| 1521 | ] |
| 1522 | ], |
| 1523 | 'label_block' => true, |
| 1524 | 'selectors' => [ |
| 1525 | '{{WRAPPER}} .premium-icon-list-divider:not(:last-child):after' => 'width:{{SIZE}}{{UNIT}};', |
| 1526 | '{{WRAPPER}} .premium-icon-list-divider-inline:not(:last-child):after ' => 'border-left-width: {{SIZE}}{{UNIT}};', |
| 1527 | ], |
| 1528 | 'condition' => [ |
| 1529 | 'show_divider' => 'yes' |
| 1530 | ] |
| 1531 | ] |
| 1532 | ); |
| 1533 | |
| 1534 | // Divider Height |
| 1535 | $this->add_responsive_control( |
| 1536 | 'list_divider_height', |
| 1537 | [ |
| 1538 | 'label' => __(' Height', 'premium-addons-for-elementor'), |
| 1539 | 'type' => Controls_Manager::SLIDER, |
| 1540 | 'size_units' => ['px', 'em' ], |
| 1541 | 'range' => [ |
| 1542 | 'px' => [ |
| 1543 | 'min' => 0, |
| 1544 | 'max' => 600 |
| 1545 | ], |
| 1546 | 'em' => [ |
| 1547 | 'min' => 0, |
| 1548 | 'max' => 30 |
| 1549 | ] |
| 1550 | ], |
| 1551 | 'label_block' => true, |
| 1552 | 'selectors' => [ |
| 1553 | '{{WRAPPER}} .premium-icon-list-divider:not(:last-child):after ' => 'border-top-width: {{SIZE}}{{UNIT}};', |
| 1554 | '{{WRAPPER}} .premium-icon-list-divider-inline:not(:last-child):after' => 'height: {{SIZE}}{{UNIT}};' |
| 1555 | ], |
| 1556 | 'condition' => [ |
| 1557 | 'show_divider' => 'yes' |
| 1558 | ] |
| 1559 | ] |
| 1560 | ); |
| 1561 | |
| 1562 | // Divider Color |
| 1563 | $this->add_control( |
| 1564 | 'list_divider_color', |
| 1565 | [ |
| 1566 | 'label' => __('Color', 'premium-addons-for-elementor'), |
| 1567 | 'type' => Controls_Manager::COLOR, |
| 1568 | 'scheme' => [ |
| 1569 | 'type' => Scheme_Color::get_type(), |
| 1570 | 'value' => Scheme_Color::COLOR_2, |
| 1571 | ], |
| 1572 | 'default' => '#ddd', |
| 1573 | 'selectors' => [ |
| 1574 | '{{WRAPPER}} .premium-icon-list-divider:not(:last-child):after ' => 'border-top-color: {{VALUE}};', |
| 1575 | '{{WRAPPER}} .premium-icon-list-divider-inline:not(:last-child):after ' => 'border-left-color: {{VALUE}};' |
| 1576 | ], |
| 1577 | 'condition' => [ |
| 1578 | 'show_divider' => 'yes' |
| 1579 | ] |
| 1580 | ] |
| 1581 | ); |
| 1582 | |
| 1583 | $this->end_controls_section(); |
| 1584 | //End of divider style settings |
| 1585 | |
| 1586 | // Connector Style Settings |
| 1587 | $this->start_controls_section( |
| 1588 | 'connector_style_section', |
| 1589 | [ |
| 1590 | 'label' => __( ' Connector ', 'premium-addons-for-elementor' ), |
| 1591 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1592 | 'condition' => [ |
| 1593 | 'layout_type' => 'column', |
| 1594 | 'icon_postion!' => 'column', |
| 1595 | 'show_connector' => 'yes', |
| 1596 | 'hover_effect_type!' => 'grow', |
| 1597 | 'list_overflow' => 'visible', |
| 1598 | ] |
| 1599 | ] |
| 1600 | ); |
| 1601 | |
| 1602 | // Connector Style |
| 1603 | $this->add_control( |
| 1604 | 'icon_connector_type', |
| 1605 | [ |
| 1606 | 'label' => __( 'Style', 'premium-addons-for-elementor' ), |
| 1607 | 'type' => Controls_Manager::SELECT, |
| 1608 | 'options' => [ |
| 1609 | 'solid' => __( 'Solid', 'premium-addons-for-elementor' ), |
| 1610 | 'double' => __( 'Double', 'premium-addons-for-elementor' ), |
| 1611 | 'dashed' => __( 'Dashed', 'premium-addons-for-elementor' ), |
| 1612 | 'dotted' => __( 'Dotted', 'premium-addons-for-elementor' ), |
| 1613 | 'dashed' => __( 'Dashed', 'premium-addons-for-elementor' ), |
| 1614 | 'groove' => __( 'Groove', 'premium-addons-for-elementor' ), |
| 1615 | ], |
| 1616 | 'default' =>'solid', |
| 1617 | 'selectors' => [ |
| 1618 | '{{WRAPPER}} li.premium-icon-list-content:not(:last-of-type) .premium-icon-list-connector .premium-icon-connector-content:after ' => 'border-right-style: {{VALUE}};' |
| 1619 | ], |
| 1620 | 'condition' => [ |
| 1621 | 'show_connector' => 'yes' |
| 1622 | ] |
| 1623 | ] |
| 1624 | ); |
| 1625 | |
| 1626 | // Connector Width |
| 1627 | $this->add_responsive_control( |
| 1628 | 'icon_connector_width', |
| 1629 | [ |
| 1630 | 'label' => __(' Width', 'premium-addons-for-elementor'), |
| 1631 | 'type' => Controls_Manager::SLIDER, |
| 1632 | 'size_units' => ['px', 'em' ], |
| 1633 | 'range' => [ |
| 1634 | 'px' => [ |
| 1635 | 'min' => 0, |
| 1636 | 'max' => 600 |
| 1637 | ], |
| 1638 | 'em' => [ |
| 1639 | 'min' => 0, |
| 1640 | 'max' => 30 |
| 1641 | ] |
| 1642 | ], |
| 1643 | 'label_block' => true, |
| 1644 | 'selectors' => [ |
| 1645 | '{{WRAPPER}} li.premium-icon-list-content:not(:last-of-type) .premium-icon-list-connector .premium-icon-connector-content:after' => 'border-right-width: {{SIZE}}{{UNIT}};', |
| 1646 | ], |
| 1647 | 'condition' => [ |
| 1648 | 'show_connector' => 'yes' |
| 1649 | ] |
| 1650 | ] |
| 1651 | ); |
| 1652 | |
| 1653 | // Connector Height |
| 1654 | $this->add_responsive_control( |
| 1655 | 'icon_connector_height', |
| 1656 | [ |
| 1657 | 'label' => __(' Height', 'premium-addons-for-elementor'), |
| 1658 | 'type' => Controls_Manager::SLIDER, |
| 1659 | 'size_units' => ['px', 'em' ], |
| 1660 | 'default' => [ |
| 1661 | 'unit' => 'px', |
| 1662 | 'size' => 28, |
| 1663 | ], |
| 1664 | 'range' => [ |
| 1665 | 'px' => [ |
| 1666 | 'min' => 0, |
| 1667 | 'max' => 600 |
| 1668 | ], |
| 1669 | 'em' => [ |
| 1670 | 'min' => 0, |
| 1671 | 'max' => 30 |
| 1672 | ] |
| 1673 | ], |
| 1674 | 'label_block' => true, |
| 1675 | 'selectors' => [ |
| 1676 | '{{WRAPPER}} li.premium-icon-list-content:not(:last-of-type) .premium-icon-list-connector .premium-icon-connector-content:after' => 'height: {{SIZE}}{{UNIT}};' |
| 1677 | ], |
| 1678 | 'condition' => [ |
| 1679 | 'show_connector' => 'yes' |
| 1680 | ] |
| 1681 | ] |
| 1682 | ); |
| 1683 | |
| 1684 | // Connector Color |
| 1685 | $this->add_control( |
| 1686 | 'icon_connector_color', |
| 1687 | [ |
| 1688 | 'label' => __('Color', 'premium-addons-for-elementor'), |
| 1689 | 'type' => Controls_Manager::COLOR, |
| 1690 | 'scheme' => [ |
| 1691 | 'type' => Scheme_Color::get_type(), |
| 1692 | 'value' => Scheme_Color::COLOR_2, |
| 1693 | ], |
| 1694 | 'default' => '#ddd', |
| 1695 | 'selectors' => [ |
| 1696 | '{{WRAPPER}} li.premium-icon-list-content:not(:last-of-type) .premium-icon-list-connector .premium-icon-connector-content:after' => 'border-color: {{VALUE}};', |
| 1697 | ], |
| 1698 | 'condition' => [ |
| 1699 | 'show_connector' => 'yes' |
| 1700 | ] |
| 1701 | ] |
| 1702 | ); |
| 1703 | |
| 1704 | $this->end_controls_section(); |
| 1705 | //End of connector style settings |
| 1706 | |
| 1707 | } |
| 1708 | |
| 1709 | /** |
| 1710 | * Render Bullet List output on the frontend. |
| 1711 | * |
| 1712 | * Written in PHP and used to generate the final HTML. |
| 1713 | * |
| 1714 | * @since 3.21.2 |
| 1715 | * @access protected |
| 1716 | */ |
| 1717 | protected function render() { |
| 1718 | |
| 1719 | $settings = $this->get_settings_for_display(); |
| 1720 | |
| 1721 | $this->add_render_attribute('box', 'class', 'premium-icon-list-box'); |
| 1722 | |
| 1723 | if( $settings['hover_effect_type'] === 'blur'){ |
| 1724 | |
| 1725 | $this->add_render_attribute('box', 'class', 'premium-icon-list-blur'); |
| 1726 | |
| 1727 | } |
| 1728 | |
| 1729 | $animation_switch = $settings['premium_icon_list_animation_switcher'] ; |
| 1730 | |
| 1731 | if( 'yes' == $animation_switch) { |
| 1732 | |
| 1733 | $animation_class = $settings['premium_icon_list_animation']; |
| 1734 | |
| 1735 | if( '' != $settings['premium_icon_list_animation_duration'] ) { |
| 1736 | $animation_dur = 'animated-' . $settings['premium_icon_list_animation_duration']; |
| 1737 | } |
| 1738 | else { |
| 1739 | $animation_dur = 'animated-'; |
| 1740 | } |
| 1741 | |
| 1742 | $this->add_render_attribute( 'box', 'data-list-animation', |
| 1743 | [ |
| 1744 | $animation_class, |
| 1745 | $animation_dur, |
| 1746 | ] |
| 1747 | ); |
| 1748 | } |
| 1749 | |
| 1750 | ?> |
| 1751 | <ul <?php echo $this->get_render_attribute_string('box');?>> |
| 1752 | <?php |
| 1753 | |
| 1754 | $delay = 0; |
| 1755 | |
| 1756 | if ( $settings['list'] ) { |
| 1757 | foreach ( $settings['list'] as $index => $item ) { |
| 1758 | |
| 1759 | $textIcon = $this->get_repeater_setting_key('list_text_icon','list', $index); |
| 1760 | |
| 1761 | $textBadge = $this->get_repeater_setting_key('badge_title','list', $index); |
| 1762 | |
| 1763 | $this->add_inline_editing_attributes($textIcon, 'basic'); |
| 1764 | |
| 1765 | $this->add_inline_editing_attributes($textBadge, 'basic'); |
| 1766 | |
| 1767 | $item_link = 'link_' . $index; |
| 1768 | |
| 1769 | $separator_link_type = $item['link_select']; |
| 1770 | |
| 1771 | $link_url = ( 'url' === $separator_link_type ) ? $item['link']['url'] : get_permalink( $item['existing_page'] ); |
| 1772 | |
| 1773 | if ( $item['show_list_link'] === 'yes' ) { |
| 1774 | |
| 1775 | if( ! empty( $item['link']['is_external'] ) ) { |
| 1776 | $this->add_render_attribute( $item_link, 'target', "_blank" ); |
| 1777 | } |
| 1778 | |
| 1779 | if( ! empty( $item['link']['nofollow'] ) ) { |
| 1780 | $this->add_render_attribute( $item_link, 'rel', "nofollow" ); |
| 1781 | } |
| 1782 | |
| 1783 | if( ! empty( $item['link']['url'] ) || ! empty( $item['existing_page'] ) ) { |
| 1784 | $this->add_render_attribute( $item_link, 'href', $link_url ); |
| 1785 | } |
| 1786 | } |
| 1787 | |
| 1788 | $lottie_key = 'icon_lottie_' . $index; |
| 1789 | |
| 1790 | if('lottie' === $item['icon_type']){ |
| 1791 | |
| 1792 | $this->add_render_attribute( $lottie_key, [ |
| 1793 | 'class' => 'premium-lottie-animation', |
| 1794 | 'data-lottie-url' => $item['lottie_url'], |
| 1795 | 'data-lottie-loop' => $item['lottie_loop'], |
| 1796 | 'data-lottie-reverse' => $item['lottie_reverse'] |
| 1797 | ]); |
| 1798 | } |
| 1799 | |
| 1800 | $list_content_key = 'content_index_' . $index; |
| 1801 | |
| 1802 | $this->add_render_attribute( $list_content_key, 'class', |
| 1803 | [ |
| 1804 | 'premium-icon-list-content', |
| 1805 | 'elementor-repeater-item-' . $item['_id'] |
| 1806 | ] |
| 1807 | ); |
| 1808 | if( 'yes' == $animation_switch) { |
| 1809 | |
| 1810 | $this->add_render_attribute( $list_content_key, 'data-delay', |
| 1811 | [ |
| 1812 | $delay |
| 1813 | ] |
| 1814 | ); |
| 1815 | |
| 1816 | $delay+=$settings['premium_icon_list_animation_delay']*1000; |
| 1817 | } |
| 1818 | if ( 'row' === $settings['layout_type'] ) { |
| 1819 | $this->add_render_attribute( $list_content_key, 'class', |
| 1820 | [ |
| 1821 | 'premium-icon-list-content-inline', |
| 1822 | ] |
| 1823 | ); |
| 1824 | } |
| 1825 | |
| 1826 | if ( 'grow' === $settings['hover_effect_type'] ) { |
| 1827 | |
| 1828 | $this->add_render_attribute( $list_content_key, 'class', |
| 1829 | [ |
| 1830 | 'premium-icon-list-content-grow-effect', |
| 1831 | ] |
| 1832 | ); |
| 1833 | } |
| 1834 | if ( 'column' === $settings['layout_type']) { |
| 1835 | |
| 1836 | if('flex-start' === $settings['premium_icon_list_align'] ) { |
| 1837 | $this->add_render_attribute( $list_content_key, 'class', |
| 1838 | [ |
| 1839 | 'premium-icon-list-content-grow-lc', |
| 1840 | ] |
| 1841 | ); |
| 1842 | } |
| 1843 | else if( 'flex-end' === $settings['premium_icon_list_align'] ) { |
| 1844 | $this->add_render_attribute( $list_content_key, 'class', |
| 1845 | [ |
| 1846 | 'premium-icon-list-content-grow-rc', |
| 1847 | ] |
| 1848 | ); |
| 1849 | } |
| 1850 | else { |
| 1851 | $this->add_render_attribute( $list_content_key, 'class', |
| 1852 | [ |
| 1853 | 'premium-icon-list-content-grow-cc', |
| 1854 | ] |
| 1855 | ); |
| 1856 | } |
| 1857 | } |
| 1858 | ?> |
| 1859 | |
| 1860 | <li <?php echo $this->get_render_attribute_string( $list_content_key ); ?> > |
| 1861 | <?php |
| 1862 | if ( 'yes' === $item['show_icon'] ) { |
| 1863 | |
| 1864 | $wrapper_class = 'premium-icon-list-wrapper'; |
| 1865 | |
| 1866 | $this->add_render_attribute( 'wrapper', 'class', $wrapper_class ); |
| 1867 | |
| 1868 | if('column' === $settings['icon_postion']){ |
| 1869 | |
| 1870 | $wrapper_top_class = 'premium-icon-list-wrapper-top '; |
| 1871 | |
| 1872 | $this->add_render_attribute( 'wrapper', 'class', $wrapper_top_class ); |
| 1873 | |
| 1874 | } |
| 1875 | |
| 1876 | $gradient_effect_class = 'premium-icon-list-gradient-effect'; |
| 1877 | |
| 1878 | if ( $settings['hover_effect_type'] === 'linear gradient' ) { |
| 1879 | $this->add_render_attribute( 'title', 'class', |
| 1880 | [ |
| 1881 | $gradient_effect_class, |
| 1882 | ] |
| 1883 | ); |
| 1884 | } |
| 1885 | |
| 1886 | ?> |
| 1887 | <div class="premium-icon-list-text"> |
| 1888 | <div <?php echo $this->get_render_attribute_string('wrapper'); ?>> |
| 1889 | <?php |
| 1890 | if ('yes' === $settings['show_connector'] && 'column' === $settings['layout_type'] && 'column' !== $settings['icon_postion'] && 'grow' !== $settings['hover_effect_type'] && 'visible' === $settings['list_overflow']) { |
| 1891 | ?> |
| 1892 | <div class="premium-icon-list-connector" > |
| 1893 | <div class="premium-icon-connector-content"></div> |
| 1894 | </div> |
| 1895 | <?php |
| 1896 | } |
| 1897 | if ('icon' === $item['icon_type']) { |
| 1898 | Icons_Manager::render_icon( $item['premium_icon_list_font_updated'], [ 'aria-hidden' => 'true' ]); |
| 1899 | } |
| 1900 | else if('text' === $item['icon_type']){ ?> |
| 1901 | <div class="premium-icon-list-icon-text" > |
| 1902 | <p <?php echo $this->get_render_attribute_string( $textIcon ) ?> ><?php echo $item['list_text_icon'] ;?></p> |
| 1903 | </div> |
| 1904 | <?php |
| 1905 | } |
| 1906 | else if('image' === $item['icon_type']){ |
| 1907 | |
| 1908 | if( ! empty( $item['custom_image']['url'] ) ) { |
| 1909 | echo '<img src="' . $item['custom_image']['url'] . '">'; |
| 1910 | } |
| 1911 | } |
| 1912 | else { |
| 1913 | echo '<div '.$this->get_render_attribute_string( $lottie_key ).'></div>'; |
| 1914 | } |
| 1915 | echo '</div>' ; |
| 1916 | } |
| 1917 | ?> |
| 1918 | <?php |
| 1919 | echo '<span ' . $this->get_render_attribute_string( 'title' ) . ' data-text="'.strip_tags($item['list_title']) .'" > '.$item['list_title'] .' </span>'; |
| 1920 | ?> |
| 1921 | </div> |
| 1922 | <?php |
| 1923 | if('yes' === $item['show_badge']){ |
| 1924 | ?> |
| 1925 | <div class="premium-icon-list-badge"> |
| 1926 | <span <?php echo $this->get_render_attribute_string( $textBadge ) ?>><?php echo $item['badge_title'] ?></span> |
| 1927 | </div> |
| 1928 | <?php |
| 1929 | } |
| 1930 | ?> |
| 1931 | <?php |
| 1932 | if('yes' === $item['show_list_link']){ |
| 1933 | ?> |
| 1934 | <a class="premium-icon-list-link" <?php echo $this->get_render_attribute_string( $item_link ) ?> ></a> |
| 1935 | <?php } ?> |
| 1936 | </li> |
| 1937 | <?php |
| 1938 | if( 'yes' === $settings[ 'show_divider' ] ) { |
| 1939 | $layout = $settings['layout_type']; |
| 1940 | $divider_class = 'premium-icon-list-divider'; |
| 1941 | if( 'row' === $layout ) |
| 1942 | $divider_class .='-inline'; |
| 1943 | |
| 1944 | $this->add_render_attribute( 'divider', 'class', $divider_class ); |
| 1945 | ?> |
| 1946 | <div <?php echo $this->get_render_attribute_string('divider'); ?>></div> |
| 1947 | <?php |
| 1948 | } |
| 1949 | } |
| 1950 | } |
| 1951 | ?> |
| 1952 | </ul> |
| 1953 | <?php |
| 1954 | } |
| 1955 | |
| 1956 | /** |
| 1957 | * Render Bullet List widget output in the editor. |
| 1958 | * |
| 1959 | * Written as a Backbone JavaScript template and used to generate the live preview. |
| 1960 | * |
| 1961 | * @since 3.21.2 |
| 1962 | * @access protected |
| 1963 | */ |
| 1964 | protected function content_template() { |
| 1965 | ?> |
| 1966 | <# |
| 1967 | view.addRenderAttribute( 'box', 'class', 'premium-icon-list-box'); |
| 1968 | |
| 1969 | if( 'blur' === settings.hover_effect_type){ |
| 1970 | |
| 1971 | view.addRenderAttribute( 'box', 'class', 'premium-icon-list-blur'); |
| 1972 | |
| 1973 | } |
| 1974 | |
| 1975 | animationSwitch = settings.premium_icon_list_animation_switcher ; |
| 1976 | |
| 1977 | if( 'yes' == animationSwitch ) { |
| 1978 | |
| 1979 | animationClass = settings.premium_icon_list_animation; |
| 1980 | |
| 1981 | if( '' != settings.premium_icon_list_animation_duration ) { |
| 1982 | |
| 1983 | animationDur = 'animated-' + settings.premium_icon_list_animation_duration; |
| 1984 | |
| 1985 | } else { |
| 1986 | animationDur = 'animated-'; |
| 1987 | } |
| 1988 | view.addRenderAttribute( 'box', 'data-list-animation', |
| 1989 | [ |
| 1990 | animationClass, |
| 1991 | animationDur, |
| 1992 | ] |
| 1993 | ); |
| 1994 | } |
| 1995 | #> |
| 1996 | |
| 1997 | <ul {{{ view.getRenderAttributeString('box') }}}> |
| 1998 | |
| 1999 | <# |
| 2000 | var delay=0; |
| 2001 | |
| 2002 | _.each( settings.list, function( item ,index ) { |
| 2003 | |
| 2004 | var textIcon = view.getRepeaterSettingKey( 'list_text_icon', 'list', index ); |
| 2005 | var textBadge = view.getRepeaterSettingKey( 'badge_title', 'list', index ); |
| 2006 | |
| 2007 | view.addInlineEditingAttributes( textIcon, 'basic' ); |
| 2008 | view.addInlineEditingAttributes( textBadge, 'basic' ); |
| 2009 | |
| 2010 | var itemLink = 'link_' + index; |
| 2011 | |
| 2012 | var separatorLinkType, linkUrl, linkTitle; |
| 2013 | |
| 2014 | separatorLinkType = item.link_select; |
| 2015 | |
| 2016 | linkUrl= 'url' === separatorLinkType ? item.link.url : item.existing_page; |
| 2017 | |
| 2018 | if( 'yes' === item.show_list_link ) { |
| 2019 | if( '' != item.link.is_external ) { |
| 2020 | view.addRenderAttribute(itemLink, 'target', '_blank'); |
| 2021 | } |
| 2022 | if( '' != item.link.nofollow ) { |
| 2023 | view.addRenderAttribute(itemLink, 'rel', 'nofollow'); |
| 2024 | } |
| 2025 | if( ('' != item.link.url) || ('' != item.existing_page) ) { |
| 2026 | view.addRenderAttribute(itemLink, 'href', linkUrl); |
| 2027 | } |
| 2028 | } |
| 2029 | |
| 2030 | var lottieKey = 'icon_lottie_' + index; |
| 2031 | |
| 2032 | if( 'lottie' === item.icon_type ) { |
| 2033 | view.addRenderAttribute( lottieKey, { |
| 2034 | 'class': 'premium-lottie-animation', |
| 2035 | 'data-lottie-url': item.lottie_url, |
| 2036 | 'data-lottie-loop': item.lottie_loop, |
| 2037 | 'data-lottie-reverse': item.lottie_reverse |
| 2038 | }); |
| 2039 | |
| 2040 | } |
| 2041 | |
| 2042 | var listContentKey = 'content_index_' + index; |
| 2043 | |
| 2044 | view.addRenderAttribute( listContentKey, 'class', |
| 2045 | [ |
| 2046 | 'premium-icon-list-content' , |
| 2047 | 'elementor-repeater-item-' + item._id |
| 2048 | ] |
| 2049 | ); |
| 2050 | if( 'yes' == animationSwitch ) { |
| 2051 | |
| 2052 | view.addRenderAttribute( listContentKey, 'data-delay', |
| 2053 | [ |
| 2054 | delay |
| 2055 | ] |
| 2056 | ); |
| 2057 | |
| 2058 | delay+=settings.premium_icon_list_animation_delay*1000; |
| 2059 | } |
| 2060 | |
| 2061 | if ( 'row' === settings.layout_type ) { |
| 2062 | |
| 2063 | view.addRenderAttribute( listContentKey, 'class', |
| 2064 | [ |
| 2065 | 'premium-icon-list-content-inline' |
| 2066 | ] |
| 2067 | ); |
| 2068 | |
| 2069 | } |
| 2070 | |
| 2071 | if ( 'grow' === settings.hover_effect_type ){ |
| 2072 | |
| 2073 | view.addRenderAttribute( listContentKey, 'class', |
| 2074 | [ |
| 2075 | 'premium-icon-list-content-grow-effect' |
| 2076 | ] |
| 2077 | ); |
| 2078 | |
| 2079 | } |
| 2080 | if ( 'column' === settings.layout_type ) { |
| 2081 | if('flex-start' === settings.premium_icon_list_align) { |
| 2082 | view.addRenderAttribute( listContentKey, 'class', |
| 2083 | [ |
| 2084 | 'premium-icon-list-content-grow-lc' |
| 2085 | ] |
| 2086 | ); |
| 2087 | } |
| 2088 | else if( 'flex-end' === settings.premium_icon_list_align ) { |
| 2089 | view.addRenderAttribute( listContentKey, 'class', |
| 2090 | [ |
| 2091 | 'premium-icon-list-content-grow-rc' |
| 2092 | ] |
| 2093 | ); |
| 2094 | } |
| 2095 | else { |
| 2096 | view.addRenderAttribute( listContentKey, 'class', |
| 2097 | [ |
| 2098 | 'premium-icon-list-content-grow-cc' |
| 2099 | ] |
| 2100 | ); |
| 2101 | } |
| 2102 | } |
| 2103 | |
| 2104 | var gradient_effect_class =''; |
| 2105 | |
| 2106 | if (settings.hover_effect_type === 'linear gradient'){ |
| 2107 | |
| 2108 | gradient_effect_class = 'premium-icon-list-gradient-effect'; |
| 2109 | |
| 2110 | } |
| 2111 | #> |
| 2112 | <li {{{ view.getRenderAttributeString( listContentKey ) }}}> |
| 2113 | |
| 2114 | <div class="premium-icon-list-text"> |
| 2115 | <# if ( 'yes' === item.show_icon ) { |
| 2116 | var wrapper_top_class ; |
| 2117 | |
| 2118 | if('column' === settings.icon_postion){ |
| 2119 | wrapper_top_class = 'premium-icon-list-wrapper-top'; |
| 2120 | } |
| 2121 | #> |
| 2122 | <div class="premium-icon-list-wrapper {{wrapper_top_class}}"> |
| 2123 | <# |
| 2124 | if ('yes' === settings.show_connector && 'column' === settings.layout_type && 'column' !== settings.icon_postion && 'grow' !== settings.hover_effect_type && 'visible' === settings.list_overflow) { |
| 2125 | #> |
| 2126 | <div class="premium-icon-list-connector" > |
| 2127 | <div class="premium-icon-connector-content"></div> |
| 2128 | </div> |
| 2129 | <# } |
| 2130 | if ( 'icon' == item.icon_type ) { |
| 2131 | |
| 2132 | var iconHTML = elementor.helpers.renderIcon( view, item.premium_icon_list_font_updated, { |
| 2133 | 'aria-hidden': true |
| 2134 | }, 'i' , 'object' ); |
| 2135 | |
| 2136 | if ( iconHTML && iconHTML.rendered ) { #> |
| 2137 | {{{ iconHTML.value }}} |
| 2138 | <# |
| 2139 | } |
| 2140 | else { |
| 2141 | #> |
| 2142 | <i class =" {{ item.premium_icon_list_font }} "></i> |
| 2143 | <# } |
| 2144 | } |
| 2145 | else if ( 'image' === item.icon_type ) { |
| 2146 | if ( item.custom_image.url ) { |
| 2147 | |
| 2148 | var image = { |
| 2149 | id: item.custom_image.id, |
| 2150 | url: item.custom_image.url, |
| 2151 | size: item.thumbnail_size, |
| 2152 | dimension: item.thumbnail_custom_dimension, |
| 2153 | model: view.getEditModel() |
| 2154 | }; |
| 2155 | |
| 2156 | var image_url = elementor.imagesManager.getImageUrl( image ); |
| 2157 | #> |
| 2158 | <img src="{{ image_url }}"/> |
| 2159 | <# |
| 2160 | } |
| 2161 | } |
| 2162 | else if ( 'text' === item.icon_type) { |
| 2163 | #> |
| 2164 | <div class="premium-icon-list-icon-text"> |
| 2165 | <p {{{ view.getRenderAttributeString( textIcon ) }}}>{{{item.list_text_icon}}}</p> |
| 2166 | </div> |
| 2167 | <# |
| 2168 | } |
| 2169 | else { |
| 2170 | #> |
| 2171 | <div {{{ view.getRenderAttributeString( lottieKey) }}}></div> |
| 2172 | <# |
| 2173 | } |
| 2174 | #> |
| 2175 | </div> |
| 2176 | <# |
| 2177 | } |
| 2178 | #> |
| 2179 | <span class="{{{ gradient_effect_class }}}" data-text="{{{ item.list_title }}}" >{{{ item.list_title }}}</span> |
| 2180 | </div> |
| 2181 | <# if ( 'yes' === item.show_badge ){ #> |
| 2182 | <div class="premium-icon-list-badge"> |
| 2183 | <span {{{ view.getRenderAttributeString( textBadge ) }}} >{{{ item.badge_title }}}</span> |
| 2184 | </div> |
| 2185 | <# } #> |
| 2186 | <# |
| 2187 | if ( 'yes' === item.show_list_link ) { |
| 2188 | linkType=item.link_select; |
| 2189 | |
| 2190 | url = 'url' === linkType ? item.link.url : item.existing_page; |
| 2191 | #> |
| 2192 | <a class="premium-icon-list-link" {{{ view.getRenderAttributeString( itemLink ) }}} ></a> |
| 2193 | <# } #> |
| 2194 | </li> |
| 2195 | <# |
| 2196 | if( 'yes' === settings.show_divider ) { |
| 2197 | var dividerClass ='premium-icon-list-divider'; |
| 2198 | if( 'row' === settings.layout_type ) { |
| 2199 | dividerClass += '-inline'; |
| 2200 | } |
| 2201 | #> |
| 2202 | <div class=" {{dividerClass}}"></div> |
| 2203 | <# } |
| 2204 | }); |
| 2205 | #> |
| 2206 | </ul> |
| 2207 | |
| 2208 | <?php |
| 2209 | } |
| 2210 | |
| 2211 | } |