PluginProbe
Borderless – Addons and Templates for Elementor / trunk
Borderless – Addons and Templates for Elementor vtrunk
trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.2 1.2.3 All 78 releases
borderless / modules / elementor / widgets / slider.php

slider.php in Borderless – Addons and Templates for Elementor trunk, at modules/elementor/widgets/slider.php

1,755 lines 54.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Borderless\Widgets;
4
5 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
6
7 use Elementor\Widget_Base;
8 use Elementor\Controls_Manager;
9 use Elementor\Group_Control_Border;
10 use Elementor\Group_Control_Box_Shadow;
11 use Elementor\Group_Control_Image_Size;
12 use \Elementor\Group_Control_Typography;
13 use \Elementor\Core\Kits\Documents\Tabs\Global_Typography;
14 use \Elementor\Group_Control_Background;
15 use \Elementor\Group_Control_Css_Filter;
16 use \Elementor\Repeater;
17 use Elementor\Utils;
18
19 class Slider extends Widget_Base {
20
21 public function get_name() {
22 return 'borderless-elementor-slider';
23 }
24
25 public function get_title() {
26 return esc_html__('Slider', 'borderless');
27 }
28
29 public function get_icon() {
30 return 'borderless-icon-slider';
31 }
32
33 public function get_categories() {
34 return [ 'borderless' ];
35 }
36
37 public function get_keywords()
38 {
39 return [
40 'slide',
41 'slider',
42 'slides',
43 'borderless slide',
44 'borderless slider',
45 'borderless slides',
46 'borderless'
47 ];
48 }
49
50 public function get_style_depends() {
51 return
52 [
53 'elementor-widget-slider',
54 'borderless-elementor-flickity-style',
55 'borderless-elementor-flickity-fullscreen-style',
56 'borderless-elementor-flickity-fade-style'
57 ];
58 }
59
60 public function get_script_depends() {
61 return
62 [
63 'borderless-elementor-flickity-script',
64 'borderless-elementor-flickity-fullscreen-script',
65 'borderless-elementor-flickity-fade-script',
66 'borderless-elementor-flickity-as-nav-for-script'
67 ];
68 }
69
70 protected function _register_controls() {
71
72
73 /*-----------------------------------------------------------------------------------*/
74 /* *. Slider/Slides - Content
75 /*-----------------------------------------------------------------------------------*/
76
77 $this->start_controls_section(
78 'borderless_elementor_section_slider_slides',
79 [
80 'label' => esc_html__( 'Slides', 'borderless' ),
81 'tab' => Controls_Manager::TAB_CONTENT,
82 ]
83 );
84
85 $repeater = new Repeater();
86
87 $repeater->start_controls_tabs( 'slides_repeater' );
88
89 $repeater->start_controls_tab( 'borderless_elementor_slider_background_tab', [ 'label' => __( 'Background', 'borderless' ) ] );
90
91 $repeater->add_responsive_control(
92 'borderless_elementor_slider_slide_background_color',
93 [
94 'label' => __( 'Color', 'borderless' ),
95 'type' => Controls_Manager::COLOR,
96 'default' => '#0000FF',
97 'selectors' => [
98 '{{WRAPPER}} {{CURRENT_ITEM}}' => 'background-color: {{VALUE}}',
99 ],
100 ]
101 );
102
103 $repeater->add_responsive_control(
104 'borderless_elementor_slider_slide_background_image',
105 [
106 'label' => __( 'Image', 'Background Control', 'borderless' ),
107 'type' => Controls_Manager::MEDIA,
108 'selectors' => [
109 '{{WRAPPER}} {{CURRENT_ITEM}}' => 'background-image: url({{URL}})',
110 ],
111 ]
112 );
113
114 $repeater->add_responsive_control(
115 'borderless_elementor_slider_slide_background_image_position',
116 [
117 'label' => __( 'Position', 'Background Control', 'borderless' ),
118 'type' => Controls_Manager::SELECT,
119 'default' => 'center center',
120 'options' => [
121 '' => __( 'Default', 'Background Control', 'borderless' ),
122 'center top' => __( 'Center Top', 'Background Control', 'borderless' ),
123 'center center' => __( 'Center Center', 'Background Control', 'borderless' ),
124 'center bottom' => __( 'Center Bottom', 'Background Control', 'borderless' ),
125 'left top' => __( 'Left Top', 'Background Control', 'borderless' ),
126 'left center' => __( 'Left Center', 'Background Control', 'borderless' ),
127 'left bottom' => __( 'Left Bottom', 'Background Control', 'borderless' ),
128 'right top' => __( 'Right Top', 'Background Control', 'borderless' ),
129 'right center' => __( 'Right Center', 'Background Control', 'borderless' ),
130 'right bottom' => __( 'Right Bottom', 'Background Control', 'borderless' ),
131 ],
132 'selectors' => [
133 '{{WRAPPER}} {{CURRENT_ITEM}}' => 'background-position: {{VALUE}}',
134 ],
135 'conditions' => [
136 'terms' => [
137 [
138 'name' => 'borderless_elementor_slider_slide_background_image[url]',
139 'operator' => '!=',
140 'value' => '',
141 ],
142 ],
143 ],
144 ]
145 );
146
147 $repeater->add_responsive_control(
148 'borderless_elementor_slider_slide_background_image_attachment',
149 [
150 'label' => __( 'Attachment', 'Background Control', 'borderless' ),
151 'type' => Controls_Manager::SELECT,
152 'default' => 'no-repeat',
153 'options' => [
154 '' => __( 'Default', 'Background Control', 'borderless' ),
155 'no-repeat' => __( 'No Repeat', 'Background Control', 'borderless' ),
156 'repeat' => __( 'Default', 'Background Control', 'borderless' ),
157 'scroll' => __( 'Scroll', 'Background Control', 'borderless' ),
158 'fixed' => __( 'Fixed', 'Background Control', 'borderless' ),
159 ],
160 'selectors' => [
161 '{{WRAPPER}} {{CURRENT_ITEM}}' => 'background-attachment: {{VALUE}}',
162 ],
163 'conditions' => [
164 'terms' => [
165 [
166 'name' => 'borderless_elementor_slider_slide_background_image[url]',
167 'operator' => '!=',
168 'value' => '',
169 ],
170 ],
171 ],
172 ]
173 );
174
175 $repeater->add_responsive_control(
176 'borderless_elementor_slider_slide_background_image_repeat',
177 [
178 'label' => __( 'Repeat', 'Background Control', 'borderless' ),
179 'type' => Controls_Manager::SELECT,
180 'default' => 'no-repeat',
181 'options' => [
182 '' => __( 'Default', 'Background Control', 'borderless' ),
183 'no-repeat' => __( 'No Repeat', 'Background Control', 'borderless' ),
184 'repeat' => __( 'Repeat', 'Background Control', 'borderless' ),
185 'repeat-x' => __( 'Repeat-x', 'Background Control', 'borderless' ),
186 'repeat-y' => __( 'Repeat-y', 'Background Control', 'borderless' ),
187 ],
188 'selectors' => [
189 '{{WRAPPER}} {{CURRENT_ITEM}}' => 'background-repeat: {{VALUE}}',
190 ],
191 'conditions' => [
192 'terms' => [
193 [
194 'name' => 'borderless_elementor_slider_slide_background_image[url]',
195 'operator' => '!=',
196 'value' => '',
197 ],
198 ],
199 ],
200 ]
201 );
202
203 $repeater->add_responsive_control(
204 'borderless_elementor_slider_slide_background_image_size',
205 [
206 'label' => __( 'Size', 'Background Control', 'borderless' ),
207 'type' => Controls_Manager::SELECT,
208 'default' => 'cover',
209 'options' => [
210 '' => __( 'Default', 'Background Control', 'borderless' ),
211 'cover' => __( 'Cover', 'Background Control', 'borderless' ),
212 'contain' => __( 'Contain', 'Background Control', 'borderless' ),
213 'auto' => __( 'Auto', 'Background Control', 'borderless' ),
214 ],
215 'selectors' => [
216 '{{WRAPPER}} {{CURRENT_ITEM}}' => 'background-size: {{VALUE}}',
217 ],
218 'conditions' => [
219 'terms' => [
220 [
221 'name' => 'borderless_elementor_slider_slide_background_image[url]',
222 'operator' => '!=',
223 'value' => '',
224 ],
225 ],
226 ],
227 ]
228 );
229
230 $repeater->add_group_control(
231 Group_Control_Css_Filter::get_type(),
232 [
233 'name' => 'borderless_elementor_slider_slide_background_image_css_filters',
234 'selector' => '{{WRAPPER}} {{CURRENT_ITEM}}',
235 'conditions' => [
236 'terms' => [
237 [
238 'name' => 'borderless_elementor_slider_slide_background_image[url]',
239 'operator' => '!=',
240 'value' => '',
241 ],
242 ],
243 ],
244 ]
245 );
246
247 $repeater->add_control(
248 'borderless_elementor_slider_slide_background_image_ken_burns',
249 [
250 'label' => __( 'Ken Burns Effect', 'borderless' ),
251 'type' => Controls_Manager::SWITCHER,
252 'default' => '',
253 'conditions' => [
254 'terms' => [
255 [
256 'name' => 'borderless_elementor_slider_slide_background_image[url]',
257 'operator' => '!=',
258 'value' => '',
259 ],
260 ],
261 ],
262 ]
263 );
264
265 $repeater->add_control(
266 'borderless_elementor_slider_slide_background_image_zoom_direction',
267 [
268 'label' => __( 'Zoom Direction', 'borderless' ),
269 'type' => Controls_Manager::SELECT,
270 'default' => 'in',
271 'options' => [
272 'in' => __( 'In', 'borderless' ),
273 'out' => __( 'Out', 'borderless' ),
274 ],
275 'conditions' => [
276 'terms' => [
277 [
278 'name' => 'borderless_elementor_slider_slide_background_image_ken_burns',
279 'operator' => '!=',
280 'value' => '',
281 ],
282 ],
283 ],
284 ]
285 );
286
287 $repeater->add_control(
288 'borderless_elementor_slider_slide_background_overlay',
289 [
290 'label' => __( 'Background Overlay', 'borderless' ),
291 'type' => Controls_Manager::SWITCHER,
292 'default' => '',
293 'separator' => 'before',
294 ]
295 );
296
297 $repeater->add_responsive_control(
298 'borderless_elementor_slider_slide_background_color_overlay',
299 [
300 'label' => __( 'Color', 'borderless' ),
301 'type' => Controls_Manager::COLOR,
302 'default' => '#00000030',
303 'selectors' => [
304 '{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-slide-background-overlay' => 'background-color: {{VALUE}}',
305 ],
306 'conditions' => [
307 'terms' => [
308 [
309 'name' => 'borderless_elementor_slider_slide_background_overlay',
310 'value' => 'yes',
311 ],
312 ],
313 ],
314 ]
315 );
316
317 $repeater->add_responsive_control(
318 'borderless_elementor_slider_slide_background_image_overlay',
319 [
320 'label' => __( 'Image', 'Background Control', 'borderless' ),
321 'type' => Controls_Manager::MEDIA,
322 'selectors' => [
323 '{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-slide-background-overlay' => 'background-image: url({{URL}})',
324 ],
325 'conditions' => [
326 'terms' => [
327 [
328 'name' => 'borderless_elementor_slider_slide_background_overlay',
329 'value' => 'yes',
330 ],
331 ],
332 ],
333 ]
334 );
335
336 $repeater->add_responsive_control(
337 'borderless_elementor_slider_slide_background_image_overlay_opacity',
338 [
339 'label' => esc_html__( 'Opacity', 'borderless' ),
340 'type' => Controls_Manager::SLIDER,
341 'default' => [
342 'size' => .5,
343 ],
344 'range' => [
345 'px' => [
346 'max' => 1,
347 'step' => 0.01,
348 ],
349 ],
350 'selectors' => [
351 '{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-slide-background-overlay' => 'opacity: {{SIZE}};',
352 ],
353 'conditions' => [
354 'terms' => [
355 [
356 'name' => 'borderless_elementor_slider_slide_background_image_overlay[url]',
357 'operator' => '!=',
358 'value' => '',
359 ],
360 ],
361 ],
362 ]
363 );
364
365 $repeater->add_responsive_control(
366 'borderless_elementor_slider_slide_background_image_position_overlay',
367 [
368 'label' => __( 'Position', 'Background Control', 'borderless' ),
369 'type' => Controls_Manager::SELECT,
370 'default' => 'center center',
371 'options' => [
372 '' => __( 'Default', 'Background Control', 'borderless' ),
373 'center top' => __( 'Center Top', 'Background Control', 'borderless' ),
374 'center center' => __( 'Center Center', 'Background Control', 'borderless' ),
375 'center bottom' => __( 'Center Bottom', 'Background Control', 'borderless' ),
376 'left top' => __( 'Left Top', 'Background Control', 'borderless' ),
377 'left center' => __( 'Left Center', 'Background Control', 'borderless' ),
378 'left bottom' => __( 'Left Bottom', 'Background Control', 'borderless' ),
379 'right top' => __( 'Right Top', 'Background Control', 'borderless' ),
380 'right center' => __( 'Right Center', 'Background Control', 'borderless' ),
381 'right bottom' => __( 'Right Bottom', 'Background Control', 'borderless' ),
382 ],
383 'selectors' => [
384 '{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-slide-background-overlay' => 'background-position: {{VALUE}}',
385 ],
386 'conditions' => [
387 'terms' => [
388 [
389 'name' => 'borderless_elementor_slider_slide_background_image_overlay[url]',
390 'operator' => '!=',
391 'value' => '',
392 ],
393 ],
394 ],
395 ]
396 );
397
398 $repeater->add_responsive_control(
399 'borderless_elementor_slider_slide_background_image_attachment_overlay',
400 [
401 'label' => __( 'Attachment', 'Background Control', 'borderless' ),
402 'type' => Controls_Manager::SELECT,
403 'default' => 'no-repeat',
404 'options' => [
405 '' => __( 'Default', 'Background Control', 'borderless' ),
406 'no-repeat' => __( 'No Repeat', 'Background Control', 'borderless' ),
407 'repeat' => __( 'Default', 'Background Control', 'borderless' ),
408 'scroll' => __( 'Scroll', 'Background Control', 'borderless' ),
409 'fixed' => __( 'Fixed', 'Background Control', 'borderless' ),
410 ],
411 'selectors' => [
412 '{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-slide-background-overlay' => 'background-attachment: {{VALUE}}',
413 ],
414 'conditions' => [
415 'terms' => [
416 [
417 'name' => 'borderless_elementor_slider_slide_background_image_overlay[url]',
418 'operator' => '!=',
419 'value' => '',
420 ],
421 ],
422 ],
423 ]
424 );
425
426 $repeater->add_responsive_control(
427 'borderless_elementor_slider_slide_background_image_repeat_overlay',
428 [
429 'label' => __( 'Repeat', 'Background Control', 'borderless' ),
430 'type' => Controls_Manager::SELECT,
431 'default' => 'no-repeat',
432 'options' => [
433 '' => __( 'Default', 'Background Control', 'borderless' ),
434 'no-repeat' => __( 'No Repeat', 'Background Control', 'borderless' ),
435 'repeat' => __( 'Repeat', 'Background Control', 'borderless' ),
436 'repeat-x' => __( 'Repeat-x', 'Background Control', 'borderless' ),
437 'repeat-y' => __( 'Repeat-y', 'Background Control', 'borderless' ),
438 ],
439 'selectors' => [
440 '{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-slide-background-overlay' => 'background-repeat: {{VALUE}}',
441 ],
442 'conditions' => [
443 'terms' => [
444 [
445 'name' => 'borderless_elementor_slider_slide_background_image_overlay[url]',
446 'operator' => '!=',
447 'value' => '',
448 ],
449 ],
450 ],
451 ]
452 );
453
454 $repeater->add_responsive_control(
455 'borderless_elementor_slider_slide_background_image_size_overlay',
456 [
457 'label' => __( 'Size', 'Background Control', 'borderless' ),
458 'type' => Controls_Manager::SELECT,
459 'default' => 'cover',
460 'options' => [
461 '' => __( 'Default', 'Background Control', 'borderless' ),
462 'cover' => __( 'Cover', 'Background Control', 'borderless' ),
463 'contain' => __( 'Contain', 'Background Control', 'borderless' ),
464 'auto' => __( 'Auto', 'Background Control', 'borderless' ),
465 ],
466 'selectors' => [
467 '{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-slide-background-overlay' => 'background-size: {{VALUE}}',
468 ],
469 'conditions' => [
470 'terms' => [
471 [
472 'name' => 'borderless_elementor_slider_slide_background_image_overlay[url]',
473 'operator' => '!=',
474 'value' => '',
475 ],
476 ],
477 ],
478 ]
479 );
480
481 $repeater->add_group_control(
482 Group_Control_Css_Filter::get_type(),
483 [
484 'name' => 'borderless_elementor_slider_slide_background_image_css_filters_overlay',
485 'selector' => '{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-slide-background-overlay',
486 'conditions' => [
487 'terms' => [
488 [
489 'name' => 'borderless_elementor_slider_slide_background_image_overlay[url]',
490 'operator' => '!=',
491 'value' => '',
492 ],
493 ],
494 ],
495 ]
496 );
497
498 $repeater->add_control(
499 'borderless_elementor_slider_slide_background_image_overlay_blend_mode',
500 [
501 'label' => __( 'Blend Mode', 'borderless' ),
502 'type' => Controls_Manager::SELECT,
503 'options' => [
504 '' => __( 'Normal', 'borderless' ),
505 'multiply' => 'Multiply',
506 'screen' => 'Screen',
507 'overlay' => 'Overlay',
508 'darken' => 'Darken',
509 'lighten' => 'Lighten',
510 'color-dodge' => 'Color Dodge',
511 'color-burn' => 'Color Burn',
512 'hue' => 'Hue',
513 'saturation' => 'Saturation',
514 'color' => 'Color',
515 'exclusion' => 'Exclusion',
516 'luminosity' => 'Luminosity',
517 ],
518 'conditions' => [
519 'terms' => [
520 [
521 'name' => 'borderless_elementor_slider_slide_background_image_overlay[url]',
522 'operator' => '!=',
523 'value' => '',
524 ],
525 ],
526 ],
527 'selectors' => [
528 '{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-slide-background-overlay' => 'mix-blend-mode: {{VALUE}}',
529 ],
530 ]
531 );
532
533 $repeater->end_controls_tab();
534
535 $repeater->start_controls_tab( 'borderless_elementor_slider_content_tab', [ 'label' => __( 'Content', 'borderless' ) ] );
536
537 $repeater->add_control(
538 'borderless_elementor_slider_slide_title',
539 [
540 'label' => __( 'Title', 'borderless' ),
541 'type' => Controls_Manager::TEXT,
542 'default' => __( 'Slide', 'borderless' ),
543 ]
544 );
545
546 $repeater->add_control(
547 'borderless_elementor_slider_slide_description',
548 [
549 'label' => __( 'Description', 'borderless' ),
550 'type' => Controls_Manager::TEXTAREA,
551 'default' => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'borderless' ),
552 ]
553 );
554
555 $repeater->add_control(
556 'borderless_elementor_slider_slide_button_text',
557 [
558 'label' => esc_html__( 'Button Text', 'borderless'),
559 'type' => Controls_Manager::TEXT,
560 'default' => esc_html__( 'View More', 'borderless' ),
561 'dynamic' => [ 'active' => true ],
562 'separator' => 'before',
563 ]
564 );
565
566 $repeater->add_control(
567 'borderless_elementor_slider_slide_button_link',
568 array(
569 'label' => esc_html__( 'Button Link', 'borderless' ),
570 'type' => Controls_Manager::URL,
571 'placeholder' => 'https://your-link.com',
572 'default' => array(
573 'url' => '',
574 ),
575 'dynamic' => array( 'active' => true ),
576 )
577 );
578
579 $repeater->add_control(
580 'borderless_elementor_slider_slide_id',
581 [
582 'label' => __( 'CSS ID', 'borderless' ),
583 'type' => Controls_Manager::TEXT,
584 'dynamic' => [ 'active' => true ],
585 'title' => esc_html__( 'Add your custom id WITHOUT the Pound key. e.g: my-id', 'borderless' ),
586 'style_transfer' => false,
587 'separator' => 'before',
588 ]
589 );
590
591 $repeater->add_control(
592 'borderless_elementor_slider_slide_classes',
593 [
594 'label' => __( 'CSS Classes', 'borderless' ),
595 'type' => Controls_Manager::TEXT,
596 'dynamic' => [ 'active' => true ],
597 'title' => esc_html__( 'Add your custom class WITHOUT the dot. e.g: my-class', 'borderless' ),
598 ]
599 );
600
601 $repeater->end_controls_tab();
602
603 $repeater->start_controls_tab( 'borderless_elementor_slider_style_tab', [ 'label' => __( 'Style', 'borderless' ) ] );
604
605 $repeater->add_control(
606 'borderless_elementor_slider_slide_custom_style',
607 [
608 'label' => __( 'Custom', 'borderless' ),
609 'type' => Controls_Manager::SWITCHER,
610 'description' => __( 'Set custom style that will only affect this specific slide.', 'borderless' ),
611 ]
612 );
613
614 $repeater->add_control(
615 'borderless_elementor_slider_slides_horizontal_position_custom',
616 [
617 'label' => __( 'Horizontal Position', 'borderless' ),
618 'type' => Controls_Manager::CHOOSE,
619 'default' => 'center',
620 'options' => [
621 'flex-start' => [
622 'title' => __( 'Left', 'borderless' ),
623 'icon' => 'eicon-h-align-left',
624 ],
625 'center' => [
626 'title' => __( 'Center', 'borderless' ),
627 'icon' => 'eicon-h-align-center',
628 ],
629 'flex-end' => [
630 'title' => __( 'Right', 'borderless' ),
631 'icon' => 'eicon-h-align-right',
632 ],
633 ],
634 'default' => 'center',
635 'selectors' => [
636 '{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-slide-content' => 'align-items: {{VALUE}}',
637 ],
638 'conditions' => [
639 'terms' => [
640 [
641 'name' => 'borderless_elementor_slider_slide_custom_style',
642 'value' => 'yes',
643 ],
644 ],
645 ],
646 ]
647 );
648
649 $repeater->add_control(
650 'borderless_elementor_slider_slides_vertical_position_custom',
651 [
652 'label' => __( 'Vertical Position', 'borderless' ),
653 'type' => Controls_Manager::CHOOSE,
654 'default' => 'middle',
655 'options' => [
656 'flex-start' => [
657 'title' => __( 'Top', 'borderless' ),
658 'icon' => 'eicon-v-align-top',
659 ],
660 'center' => [
661 'title' => __( 'Middle', 'borderless' ),
662 'icon' => 'eicon-v-align-middle',
663 ],
664 'flex-end' => [
665 'title' => __( 'Bottom', 'borderless' ),
666 'icon' => 'eicon-v-align-bottom',
667 ],
668 ],
669 'default' => 'center',
670 'selectors' => [
671 '{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-slide-content' => 'justify-content: {{VALUE}}',
672 ],
673 'conditions' => [
674 'terms' => [
675 [
676 'name' => 'borderless_elementor_slider_slide_custom_style',
677 'value' => 'yes',
678 ],
679 ],
680 ],
681 ]
682 );
683
684 $repeater->add_control(
685 'borderless_elementor_slider_slides_text_align_custom',
686 [
687 'label' => __( 'Text Align', 'borderless' ),
688 'type' => Controls_Manager::CHOOSE,
689 'options' => [
690 'left' => [
691 'title' => __( 'Left', 'borderless' ),
692 'icon' => 'eicon-text-align-left',
693 ],
694 'center' => [
695 'title' => __( 'Center', 'borderless' ),
696 'icon' => 'eicon-text-align-center',
697 ],
698 'right' => [
699 'title' => __( 'Right', 'borderless' ),
700 'icon' => 'eicon-text-align-right',
701 ],
702 ],
703 'default' => 'center',
704 'selectors' => [
705 '{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-slide-content' => 'text-align: {{VALUE}}',
706 ],
707 'conditions' => [
708 'terms' => [
709 [
710 'name' => 'borderless_elementor_slider_slide_custom_style',
711 'value' => 'yes',
712 ],
713 ],
714 ],
715 ]
716 );
717
718 $repeater->end_controls_tab();
719
720 $repeater->end_controls_tabs();
721
722 $this->add_control(
723 'borderless_elementor_slider_slide_strings',
724 [
725 'label' => __( 'Slides', 'borderless' ),
726 'type' => Controls_Manager::REPEATER,
727 'show_label' => true,
728 'fields' => $repeater->get_controls(),
729 'default' => [
730 [
731 'borderless_elementor_slider_slide_title' => __( 'Slide #1', 'borderless' ),
732 'description' => __( 'Lorem ipsum dolor sit amet consectetur adipiscing elit dolor', 'borderless' ),
733 'button_text' => __( 'Click Here', 'borderless' ),
734 'background_color' => '#833ca3',
735 ],
736 [
737 'borderless_elementor_slider_slide_title' => __( 'Slide #2', 'borderless' ),
738 'description' => __( 'Lorem ipsum dolor sit amet consectetur adipiscing elit dolor', 'borderless' ),
739 'button_text' => __( 'Click Here', 'borderless' ),
740 'background_color' => '#4054b2',
741 ],
742 [
743 'borderless_elementor_slider_slide_title' => __( 'Slide #3', 'borderless' ),
744 'description' => __( 'Lorem ipsum dolor sit amet consectetur adipiscing elit dolor', 'borderless' ),
745 'button_text' => __( 'Click Here', 'borderless' ),
746 'background_color' => '#1abc9c',
747 ],
748 ],
749 'title_field' => '{{{ borderless_elementor_slider_slide_title }}}',
750 ]
751 );
752
753 $this->end_controls_section();
754
755
756 /*-----------------------------------------------------------------------------------*/
757 /* *. Slider/Slider Layout - Content
758 /*-----------------------------------------------------------------------------------*/
759
760 $this->start_controls_section(
761 'borderless_elementor_section_slider_layout',
762 [
763 'label' => esc_html__( 'Slider Layout', 'borderless' ),
764 'tab' => Controls_Manager::TAB_CONTENT,
765 ]
766 );
767
768 $this->add_responsive_control(
769 'borderless_elementor_slider_height',
770 [
771 'label' => __( 'Height', 'borderless' ),
772 'type' => Controls_Manager::SLIDER,
773 'size_units' => [ 'px', 'vh', 'em' ],
774 'range' => [
775 'px' => [
776 'min' => 300,
777 'max' => 9999,
778 'step' => 1,
779 ],
780 'vh' => [
781 'min' => 10,
782 'max' => 100,
783 ],
784 'em' => [
785 'min' => 10,
786 'max' => 999,
787 ],
788 ],
789 'default' => [
790 'unit' => 'px',
791 'size' => 600,
792 ],
793 'selectors' => [
794 '{{WRAPPER}} .borderless-elementor-slide-background-overlay' => 'height: {{SIZE}}{{UNIT}};',
795 ],
796 ]
797 );
798
799 $this->add_control(
800 'borderless_elementor_slider_options_show_title',
801 [
802 'label' => __( 'Show Title', 'borderless' ),
803 'type' => \Elementor\Controls_Manager::SWITCHER,
804 'default' => 'yes',
805 ]
806 );
807
808 $this->add_control(
809 'borderless_elementor_slider_options_show_description',
810 [
811 'label' => __( 'Show Description', 'borderless' ),
812 'type' => \Elementor\Controls_Manager::SWITCHER,
813 'default' => 'yes',
814 ]
815 );
816
817 $this->add_control(
818 'borderless_elementor_slider_options_show_button',
819 [
820 'label' => __( 'Show Button', 'borderless' ),
821 'type' => \Elementor\Controls_Manager::SWITCHER,
822 'default' => 'yes',
823 ]
824 );
825
826 $this->add_control(
827 'borderless_elementor_slider_options_title_html_tag',
828 [
829 'label' => esc_html__( 'Title HTML Tag', 'borderless' ),
830 'type' => Controls_Manager::SELECT,
831 'options' => [
832 'h1' => 'H1',
833 'h2' => 'H2',
834 'h3' => 'H3',
835 'h4' => 'H4',
836 'h5' => 'H5',
837 'h6' => 'H6',
838 'div' => 'div',
839 'span' => 'span',
840 'p' => 'p',
841 ],
842 'default' => 'h2',
843 'conditions' => [
844 'terms' => [
845 [
846 'name' => 'borderless_elementor_slider_options_show_title',
847 'operator' => '!=',
848 'value' => '',
849 ],
850 ],
851 ],
852 ]
853 );
854
855 $this->add_control(
856 'borderless_elementor_slider_options_description_html_tag',
857 [
858 'label' => esc_html__( 'Description HTML Tag', 'borderless' ),
859 'type' => Controls_Manager::SELECT,
860 'options' => [
861 'h1' => 'H1',
862 'h2' => 'H2',
863 'h3' => 'H3',
864 'h4' => 'H4',
865 'h5' => 'H5',
866 'h6' => 'H6',
867 'div' => 'div',
868 'span' => 'span',
869 'p' => 'p',
870 ],
871 'default' => 'span',
872 'conditions' => [
873 'terms' => [
874 [
875 'name' => 'borderless_elementor_slider_options_show_description',
876 'operator' => '!=',
877 'value' => '',
878 ],
879 ],
880 ],
881 ]
882 );
883
884 $this->end_controls_section();
885
886
887 /*-----------------------------------------------------------------------------------*/
888 /* *. Slider/Slider Options - Content
889 /*-----------------------------------------------------------------------------------*/
890
891 $this->start_controls_section(
892 'borderless_elementor_section_slider_options',
893 [
894 'label' => esc_html__( 'Slider Options', 'borderless' ),
895 'tab' => Controls_Manager::TAB_CONTENT,
896 ]
897 );
898
899 $this->add_control(
900 'borderless_elementor_slider_options_autoplay',
901 [
902 'label' => __( 'Autoplay', 'borderless' ),
903 'type' => \Elementor\Controls_Manager::SWITCHER,
904 'default' => 'yes',
905 ]
906 );
907
908 $this->add_control(
909 'borderless_elementor_slider_options_autoplay_pause_on_hover',
910 [
911 'label' => __( 'Pause On Hover', 'borderless' ),
912 'type' => \Elementor\Controls_Manager::SWITCHER,
913 'condition' => [
914 'borderless_elementor_slider_options_autoplay' => 'yes',
915 ],
916 'default' => 'yes',
917 ]
918 );
919
920 $this->add_control(
921 'borderless_elementor_slider_options_autoplay_speed',
922 [
923 'label' => __( 'Autoplay Speed', 'borderless' ),
924 'type' => Controls_Manager::NUMBER,
925 'default' => 3000,
926 'condition' => [
927 'borderless_elementor_slider_options_autoplay' => 'yes',
928 ],
929 'render_type' => 'none',
930 'frontend_available' => true,
931 ]
932 );
933
934 $this->add_control(
935 'borderless_elementor_slider_options_draggable',
936 [
937 'label' => __( 'Draggable', 'borderless' ),
938 'type' => \Elementor\Controls_Manager::SWITCHER,
939 'default' => 'yes',
940 ]
941 );
942
943 $this->add_control(
944 'borderless_elementor_slider_options_infinite_scroll',
945 [
946 'label' => __( 'Infinite Scroll', 'borderless' ),
947 'type' => \Elementor\Controls_Manager::SWITCHER,
948 'default' => 'yes',
949 ]
950 );
951
952 $this->add_control(
953 'borderless_elementor_slider_options_adaptive_height',
954 [
955 'label' => __( 'Adaptive Height', 'borderless' ),
956 'type' => \Elementor\Controls_Manager::SWITCHER,
957 ]
958 );
959
960 $this->add_control(
961 'borderless_elementor_slider_options_fullscreen',
962 [
963 'label' => __( 'Fullscreen', 'borderless' ),
964 'type' => \Elementor\Controls_Manager::SWITCHER,
965 ]
966 );
967
968 $this->add_control(
969 'borderless_elementor_slider_options_fade',
970 [
971 'label' => __( 'Fade', 'borderless' ),
972 'type' => \Elementor\Controls_Manager::SWITCHER,
973 ]
974 );
975
976 $this->add_control(
977 'borderless_elementor_slider_options_thumbs_navigation',
978 [
979 'label' => __( 'Thumbs Navigation', 'borderless' ),
980 'type' => \Elementor\Controls_Manager::SWITCHER,
981 ]
982 );
983
984 $this->end_controls_section();
985
986 /*-----------------------------------------------------------------------------------*/
987 /* *. Slider/Slides - Style
988 /*-----------------------------------------------------------------------------------*/
989
990 $this->start_controls_section(
991 'borderless_elementor_section_slider_slides_style',
992 [
993 'label' => esc_html__( 'Slides', 'borderless'),
994 'tab' => Controls_Manager::TAB_STYLE
995 ]
996 );
997
998 $this->add_responsive_control(
999 'borderless_elementor_slider_slides_max_width',
1000 [
1001 'label' => __( 'Content Width', 'borderless' ),
1002 'type' => Controls_Manager::SLIDER,
1003 'range' => [
1004 'px' => [
1005 'min' => 0,
1006 'max' => 1000,
1007 ],
1008 '%' => [
1009 'min' => 0,
1010 'max' => 100,
1011 ],
1012 ],
1013 'size_units' => [ '%', 'px' ],
1014 'default' => [
1015 'size' => '66',
1016 'unit' => '%',
1017 ],
1018 'tablet_default' => [
1019 'unit' => '%',
1020 ],
1021 'mobile_default' => [
1022 'unit' => '%',
1023 ],
1024 'selectors' => [
1025 '{{WRAPPER}} .borderless-elementor-slide-content-inner' => 'max-width: {{SIZE}}{{UNIT}};',
1026 ],
1027 ]
1028 );
1029
1030 $this->add_responsive_control(
1031 'borderless_elementor_slider_slides_padding',
1032 [
1033 'label' => __( 'Padding', 'borderless' ),
1034 'type' => Controls_Manager::DIMENSIONS,
1035 'size_units' => [ 'px', '%', 'em' ],
1036 'selectors' => [
1037 '{{WRAPPER}} .borderless-elementor-slide-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1038 ],
1039 ]
1040 );
1041
1042 $this->add_control(
1043 'borderless_elementor_slider_slides_horizontal_position',
1044 [
1045 'label' => __( 'Horizontal Position', 'borderless' ),
1046 'type' => Controls_Manager::CHOOSE,
1047 'default' => 'center',
1048 'options' => [
1049 'flex-start' => [
1050 'title' => __( 'Left', 'borderless' ),
1051 'icon' => 'eicon-h-align-left',
1052 ],
1053 'center' => [
1054 'title' => __( 'Center', 'borderless' ),
1055 'icon' => 'eicon-h-align-center',
1056 ],
1057 'flex-end' => [
1058 'title' => __( 'Right', 'borderless' ),
1059 'icon' => 'eicon-h-align-right',
1060 ],
1061 ],
1062 'default' => 'center',
1063 'selectors' => [
1064 '{{WRAPPER}} .borderless-elementor-slide-content' => 'align-items: {{VALUE}}',
1065 ],
1066 ]
1067 );
1068
1069 $this->add_control(
1070 'borderless_elementor_slider_slides_vertical_position',
1071 [
1072 'label' => __( 'Vertical Position', 'borderless' ),
1073 'type' => Controls_Manager::CHOOSE,
1074 'default' => 'middle',
1075 'options' => [
1076 'flex-start' => [
1077 'title' => __( 'Top', 'borderless' ),
1078 'icon' => 'eicon-v-align-top',
1079 ],
1080 'center' => [
1081 'title' => __( 'Middle', 'borderless' ),
1082 'icon' => 'eicon-v-align-middle',
1083 ],
1084 'flex-end' => [
1085 'title' => __( 'Bottom', 'borderless' ),
1086 'icon' => 'eicon-v-align-bottom',
1087 ],
1088 ],
1089 'default' => 'center',
1090 'selectors' => [
1091 '{{WRAPPER}} .borderless-elementor-slide-content' => 'justify-content: {{VALUE}}',
1092 ],
1093 ]
1094 );
1095
1096 $this->add_control(
1097 'borderless_elementor_slider_slides_text_align',
1098 [
1099 'label' => __( 'Text Align', 'borderless' ),
1100 'type' => Controls_Manager::CHOOSE,
1101 'options' => [
1102 'left' => [
1103 'title' => __( 'Left', 'borderless' ),
1104 'icon' => 'eicon-text-align-left',
1105 ],
1106 'center' => [
1107 'title' => __( 'Center', 'borderless' ),
1108 'icon' => 'eicon-text-align-center',
1109 ],
1110 'right' => [
1111 'title' => __( 'Right', 'borderless' ),
1112 'icon' => 'eicon-text-align-right',
1113 ],
1114 ],
1115 'default' => 'center',
1116 'selectors' => [
1117 '{{WRAPPER}} .borderless-elementor-slide-content' => 'text-align: {{VALUE}}',
1118 ],
1119 ]
1120 );
1121
1122 $this->end_controls_section();
1123
1124
1125 /*-----------------------------------------------------------------------------------*/
1126 /* *. Slider/Title - Style
1127 /*-----------------------------------------------------------------------------------*/
1128
1129 $this->start_controls_section(
1130 'borderless_elementor_section_slider_title_style',
1131 [
1132 'label' => esc_html__( 'Title', 'borderless'),
1133 'tab' => Controls_Manager::TAB_STYLE
1134 ]
1135 );
1136
1137 $this->add_control(
1138 'borderless_elementor_section_slider_title_color',
1139 [
1140 'label' => __( 'Text Color', 'borderless' ),
1141 'type' => Controls_Manager::COLOR,
1142 'selectors' => [
1143 '{{WRAPPER}} .borderless-elementor-slide-title' => 'color: {{VALUE}}',
1144
1145 ],
1146 ]
1147 );
1148
1149 $this->add_group_control(
1150 Group_Control_Typography::get_type(),
1151 [
1152 'name' => 'borderless_elementor_section_slider_title_typography',
1153 'global' => [
1154 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1155 ],
1156 'selector' => '{{WRAPPER}} .borderless-elementor-slide-title',
1157 ]
1158 );
1159
1160 $this->add_responsive_control(
1161 'borderless_elementor_section_slider_title_padding',
1162 [
1163 'label' => __( 'Padding', 'borderless' ),
1164 'type' => Controls_Manager::DIMENSIONS,
1165 'size_units' => [ 'px', '%', 'em' ],
1166 'selectors' => [
1167 '{{WRAPPER}} .borderless-elementor-slide-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1168 ],
1169 ]
1170 );
1171
1172 $this->add_responsive_control(
1173 'borderless_elementor_section_slider_title_margin',
1174 [
1175 'label' => __( 'Margin', 'borderless' ),
1176 'type' => Controls_Manager::DIMENSIONS,
1177 'size_units' => [ 'px', '%', 'em' ],
1178 'selectors' => [
1179 '{{WRAPPER}} .borderless-elementor-slide-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1180 ],
1181 ]
1182 );
1183
1184 $this->end_controls_section();
1185
1186
1187 /*-----------------------------------------------------------------------------------*/
1188 /* *. Slider/Description - Style
1189 /*-----------------------------------------------------------------------------------*/
1190
1191 $this->start_controls_section(
1192 'borderless_elementor_section_slider_description_style',
1193 [
1194 'label' => esc_html__( 'Description', 'borderless'),
1195 'tab' => Controls_Manager::TAB_STYLE
1196 ]
1197 );
1198
1199 $this->add_control(
1200 'borderless_elementor_section_slider_description_color',
1201 [
1202 'label' => __( 'Text Color', 'borderless' ),
1203 'type' => Controls_Manager::COLOR,
1204 'selectors' => [
1205 '{{WRAPPER}} .borderless-elementor-slide-description' => 'color: {{VALUE}}',
1206
1207 ],
1208 ]
1209 );
1210
1211 $this->add_group_control(
1212 Group_Control_Typography::get_type(),
1213 [
1214 'name' => 'borderless_elementor_section_slider_description_typography',
1215 'global' => [
1216 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1217 ],
1218 'selector' => '{{WRAPPER}} .borderless-elementor-slide-description',
1219 ]
1220 );
1221
1222 $this->add_responsive_control(
1223 'borderless_elementor_section_slider_description_padding',
1224 [
1225 'label' => __( 'Padding', 'borderless' ),
1226 'type' => Controls_Manager::DIMENSIONS,
1227 'size_units' => [ 'px', '%', 'em' ],
1228 'selectors' => [
1229 '{{WRAPPER}} .borderless-elementor-slide-description' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1230 ],
1231 ]
1232 );
1233
1234 $this->add_responsive_control(
1235 'borderless_elementor_section_slider_description_margin',
1236 [
1237 'label' => __( 'Margin', 'borderless' ),
1238 'type' => Controls_Manager::DIMENSIONS,
1239 'size_units' => [ 'px', '%', 'em' ],
1240 'selectors' => [
1241 '{{WRAPPER}} .borderless-elementor-slide-description' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1242 ],
1243 ]
1244 );
1245
1246 $this->end_controls_section();
1247
1248
1249 /*-----------------------------------------------------------------------------------*/
1250 /* *. Slider/Button - Style
1251 /*-----------------------------------------------------------------------------------*/
1252
1253 $this->start_controls_section(
1254 'borderless_elementor_section_slider_button_style',
1255 [
1256 'label' => esc_html__( 'Button', 'borderless'),
1257 'tab' => Controls_Manager::TAB_STYLE
1258 ]
1259 );
1260
1261 $this->add_group_control(
1262 Group_Control_Typography::get_type(),
1263 [
1264 'name' => 'borderless_elementor_slider_button_typography',
1265 'global' => [
1266 'default' => Global_Typography::TYPOGRAPHY_ACCENT,
1267 ],
1268 'selector' => '{{WRAPPER}} .borderless-elementor-slide-button',
1269 ]
1270 );
1271
1272 $this->start_controls_tabs( 'borderless_elementor_slider_button_tabs' );
1273
1274 $this->start_controls_tab( 'borderless_elementor_slider_button_tab_normal', [ 'label' => __( 'Normal', 'borderless' ) ] );
1275
1276 $this->add_control(
1277 'borderless_elementor_slider_button_text_color',
1278 [
1279 'label' => __( 'Text Color', 'borderless' ),
1280 'type' => Controls_Manager::COLOR,
1281 'default' => '',
1282 'selectors' => [
1283 '{{WRAPPER}} .borderless-elementor-slide-button' => 'fill: {{VALUE}}; color: {{VALUE}};',
1284 ],
1285 ]
1286 );
1287
1288 $this->add_group_control(
1289 Group_Control_Background::get_type(),
1290 [
1291 'name' => 'borderless_elementor_slider_button_background',
1292 'label' => esc_html__( 'Background', 'borderless' ),
1293 'types' => [ 'classic', 'gradient' ],
1294 'exclude' => [ 'image' ],
1295 'selector' => '{{WRAPPER}} .borderless-elementor-slide-button',
1296 'fields_options' => [
1297 'background' => [
1298 'default' => 'classic',
1299 ],
1300 ],
1301 ]
1302 );
1303
1304 $this->end_controls_tab();
1305
1306 $this->start_controls_tab( 'borderless_elementor_slider_button_tab_hover', [ 'label' => __( 'Hover', 'borderless' ) ] );
1307
1308 $this->add_control(
1309 'borderless_elementor_slider_button_text_color_hover',
1310 [
1311 'label' => __( 'Text Color', 'borderless' ),
1312 'type' => Controls_Manager::COLOR,
1313 'default' => '',
1314 'selectors' => [
1315 '{{WRAPPER}} .borderless-elementor-slide-button:hover' => 'fill: {{VALUE}}; color: {{VALUE}};',
1316 ],
1317 ]
1318 );
1319
1320 $this->add_group_control(
1321 Group_Control_Background::get_type(),
1322 [
1323 'name' => 'borderless_elementor_slider_button_background_hover',
1324 'label' => esc_html__( 'Background', 'borderless' ),
1325 'types' => [ 'classic', 'gradient' ],
1326 'exclude' => [ 'image' ],
1327 'selector' => '{{WRAPPER}} .borderless-elementor-slide-button:hover',
1328 'fields_options' => [
1329 'background' => [
1330 'default' => 'classic',
1331 ],
1332 ],
1333 ]
1334 );
1335
1336 $this->end_controls_tab();
1337
1338 $this->end_controls_tabs();
1339
1340 $this->add_group_control(
1341 Group_Control_Border::get_type(),
1342 [
1343 'name' => 'borderless_elementor_slider_button_border',
1344 'selector' => '{{WRAPPER}} .borderless-elementor-slide-button',
1345 'separator' => 'before',
1346 ]
1347 );
1348
1349 $this->add_responsive_control(
1350 'borderless_elementor_slider_button_border_radius',
1351 [
1352 'label' => __( 'Border Radius', 'borderless' ),
1353 'type' => Controls_Manager::DIMENSIONS,
1354 'size_units' => [ 'px', '%' ],
1355 'selectors' => [
1356 '{{WRAPPER}} .borderless-elementor-slide-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1357 ],
1358 ]
1359 );
1360
1361 $this->add_group_control(
1362 Group_Control_Box_Shadow::get_type(),
1363 [
1364 'name' => 'borderless_elementor_slider_button_box_shadow',
1365 'exclude' => [
1366 'box_shadow_position',
1367 ],
1368 'selector' => '{{WRAPPER}} .borderless-elementor-slide-button',
1369 ]
1370 );
1371
1372 $this->add_responsive_control(
1373 'borderless_elementor_slider_button_padding',
1374 [
1375 'label' => __( 'Padding', 'borderless' ),
1376 'type' => Controls_Manager::DIMENSIONS,
1377 'size_units' => [ 'px', '%', 'em' ],
1378 'separator' => 'before',
1379 'selectors' => [
1380 '{{WRAPPER}} .borderless-elementor-slide-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1381 ],
1382 ]
1383 );
1384
1385 $this->end_controls_section();
1386
1387 /*-----------------------------------------------------------------------------------*/
1388 /* *. Slider/Arrows - Style
1389 /*-----------------------------------------------------------------------------------*/
1390
1391 $this->start_controls_section(
1392 'borderless_elementor_section_slider_arrows_style',
1393 [
1394 'label' => esc_html__( 'Arrows', 'borderless'),
1395 'tab' => Controls_Manager::TAB_STYLE
1396 ]
1397 );
1398
1399 $this->add_control(
1400 'borderless_elementor_slider_navigation_arrows_position',
1401 [
1402 'label' => __( 'Arrows Position', 'borderless' ),
1403 'type' => Controls_Manager::SELECT,
1404 'default' => 'borderless-elementor-arrows-position-inside',
1405 'options' => [
1406 'borderless-elementor-arrows-position-inside' => __( 'Inside', 'borderless' ),
1407 'borderless-elementor-arrows-position-outside' => __( 'Outside', 'borderless' ),
1408 ],
1409 ]
1410 );
1411
1412 $this->add_responsive_control(
1413 'borderless_elementor_slider_navigation_arrows_size',
1414 [
1415 'label' => __( 'Arrows Size', 'borderless' ),
1416 'type' => Controls_Manager::SLIDER,
1417 'range' => [
1418 'px' => [
1419 'min' => 20,
1420 'max' => 100,
1421 ],
1422 ],
1423 'selectors' => [
1424 '{{WRAPPER}} .flickity-prev-next-button' => 'height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}}',
1425 '{{WRAPPER}} .flickity-prev-next-button .flickity-button-icon' => 'height: calc( {{SIZE}}{{UNIT}} - 20px ); width: calc( {{SIZE}}{{UNIT}} - 20px )',
1426 '{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-arrows-position-outside:not(.is-fullscreen)' => 'width: calc( 100% - 20px - ( {{SIZE}}{{UNIT}} * 2 ) )',
1427 '{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-arrows-position-outside:not(.is-fullscreen) .flickity-prev-next-button.previous' => 'left: calc( -1 * ({{SIZE}}{{UNIT}} + 10px) )',
1428 '{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-arrows-position-outside:not(.is-fullscreen) .flickity-prev-next-button.next' => 'right: calc( -1 * ({{SIZE}}{{UNIT}} + 10px) )',
1429
1430
1431 ],
1432 ]
1433 );
1434
1435 $this->start_controls_tabs( 'borderless_elementor_slider_navigation_arrows_tabs' );
1436
1437 $this->start_controls_tab( 'borderless_elementor_slider_navigation_arrows_tab_normal', [ 'label' => __( 'Normal', 'borderless' ) ] );
1438
1439 $this->add_control(
1440 'borderless_elementor_slider_navigation_arrows_color',
1441 [
1442 'label' => __( 'Arrows Color', 'borderless' ),
1443 'type' => Controls_Manager::COLOR,
1444 'selectors' => [
1445 '{{WRAPPER}} {{CURRENT_ITEM}} .flickity-prev-next-button .flickity-button-icon' => 'fill: {{VALUE}}',
1446 ],
1447 ]
1448 );
1449
1450 $this->add_group_control(
1451 Group_Control_Background::get_type(),
1452 [
1453 'name' => 'borderless_elementor_slider_navigation_arrows_background_color',
1454 'label' => esc_html__( 'Arrows Background Color', 'borderless' ),
1455 'types' => [ 'classic', 'gradient' ],
1456 'exclude' => [ 'image' ],
1457 'selector' => '{{WRAPPER}} .flickity-prev-next-button',
1458 'fields_options' => [
1459 'background' => [
1460 'default' => 'classic',
1461 ],
1462 'color' => [
1463 'default' => '#02010130',
1464 ],
1465 ],
1466 ]
1467 );
1468
1469 $this->end_controls_tab();
1470
1471 $this->start_controls_tab( 'borderless_elementor_slider_navigation_arrows_tab_hover', [ 'label' => __( 'Hover', 'borderless' ) ] );
1472
1473 $this->add_control(
1474 'borderless_elementor_slider_navigation_arrows_color_hover',
1475 [
1476 'label' => __( 'Arrows Color', 'borderless' ),
1477 'type' => Controls_Manager::COLOR,
1478 'selectors' => [
1479 '{{WRAPPER}} {{CURRENT_ITEM}} .flickity-prev-next-button .flickity-button-icon:hover' => 'fill: {{VALUE}}',
1480 ],
1481 ]
1482 );
1483
1484 $this->add_group_control(
1485 Group_Control_Background::get_type(),
1486 [
1487 'name' => 'borderless_elementor_slider_navigation_arrows_background_color_hover',
1488 'label' => esc_html__( 'Arrows Background Color', 'borderless' ),
1489 'types' => [ 'classic', 'gradient' ],
1490 'exclude' => [ 'image' ],
1491 'selector' => '{{WRAPPER}} .flickity-prev-next-button:hover',
1492 'fields_options' => [
1493 'background' => [
1494 'default' => 'classic',
1495 ],
1496 'color' => [
1497 'default' => '#000000',
1498 ],
1499 ],
1500 ]
1501 );
1502
1503 $this->end_controls_tab();
1504
1505 $this->end_controls_tabs();
1506
1507 $this->add_group_control(
1508 Group_Control_Border::get_type(),
1509 [
1510 'name' => 'borderless_elementor_slider_navigation_arrows_border',
1511 'selector' => '{{WRAPPER}} .flickity-prev-next-button',
1512 'separator' => 'before',
1513 ]
1514 );
1515
1516 $this->add_responsive_control(
1517 'borderless_elementor_slider_navigation_arrows_border_radius',
1518 [
1519 'label' => __( 'Border Radius', 'borderless' ),
1520 'type' => Controls_Manager::DIMENSIONS,
1521 'size_units' => [ 'px', '%' ],
1522 'selectors' => [
1523 '{{WRAPPER}} .flickity-prev-next-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1524 ],
1525 ]
1526 );
1527
1528 $this->add_group_control(
1529 Group_Control_Box_Shadow::get_type(),
1530 [
1531 'name' => 'borderless_elementor_slider_navigation_arrows_box_shadow',
1532 'exclude' => [
1533 'box_shadow_position',
1534 ],
1535 'selector' => '{{WRAPPER}} .flickity-prev-next-button',
1536 ]
1537 );
1538
1539 $this->add_responsive_control(
1540 'borderless_elementor_slider_navigation_arrows_padding',
1541 [
1542 'label' => __( 'Padding', 'borderless' ),
1543 'type' => Controls_Manager::DIMENSIONS,
1544 'size_units' => [ 'px', '%', 'em' ],
1545 'separator' => 'before',
1546 'selectors' => [
1547 '{{WRAPPER}} .flickity-prev-next-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1548 ],
1549 ]
1550 );
1551
1552 $this->end_controls_section();
1553
1554 /*-----------------------------------------------------------------------------------*/
1555 /* *. Slider/Dots - Style
1556 /*-----------------------------------------------------------------------------------*/
1557
1558 $this->start_controls_section(
1559 'borderless_elementor_section_slider_dots_style',
1560 [
1561 'label' => esc_html__( 'Dots', 'borderless'),
1562 'tab' => Controls_Manager::TAB_STYLE
1563 ]
1564 );
1565
1566 $this->add_control(
1567 'borderless_elementor_slider_navigation_dots_position',
1568 [
1569 'label' => __( 'Dots Position', 'borderless' ),
1570 'type' => Controls_Manager::SELECT,
1571 'default' => 'borderless-elementor-dots-position-inside',
1572 'options' => [
1573 'borderless-elementor-dots-position-inside' => __( 'Inside', 'borderless' ),
1574 'borderless-elementor-dots-position-outside' => __( 'Outside', 'borderless' ),
1575 ],
1576 ]
1577 );
1578
1579 $this->add_responsive_control(
1580 'borderless_elementor_slider_navigation_dots_size',
1581 [
1582 'label' => __( 'Dots Size', 'borderless' ),
1583 'type' => Controls_Manager::SLIDER,
1584 'range' => [
1585 'px' => [
1586 'min' => 20,
1587 'max' => 100,
1588 ],
1589 ],
1590 'selectors' => [
1591 '{{WRAPPER}} .flickity-page-dots .dot' => 'height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}}',
1592
1593
1594 ],
1595 ]
1596 );
1597
1598 $this->start_controls_tabs( 'borderless_elementor_slider_dots_tabs' );
1599
1600 $this->start_controls_tab( 'borderless_elementor_slider_navigation_dots_tab_normal', [ 'label' => __( 'Normal', 'borderless' ) ] );
1601
1602 $this->add_group_control(
1603 Group_Control_Background::get_type(),
1604 [
1605 'name' => 'borderless_elementor_slider_navigation_dots_background_color_normal',
1606 'label' => esc_html__( 'Dots Color', 'borderless' ),
1607 'types' => [ 'classic', 'gradient' ],
1608 'exclude' => [ 'image' ],
1609 'selector' => '{{WRAPPER}} .borderless-elementor-slider .flickity-page-dots .dot',
1610 ]
1611 );
1612
1613 $this->end_controls_tab();
1614
1615 $this->start_controls_tab( 'borderless_elementor_slider_navigation_dots_tab_hover', [ 'label' => __( 'Hover', 'borderless' ) ] );
1616
1617 $this->add_group_control(
1618 Group_Control_Background::get_type(),
1619 [
1620 'name' => 'borderless_elementor_slider_navigation_dots_background_color_hover',
1621 'label' => esc_html__( 'Dots Color', 'borderless' ),
1622 'types' => [ 'classic', 'gradient' ],
1623 'exclude' => [ 'image' ],
1624 'selector' => '{{WRAPPER}} .borderless-elementor-slider .flickity-page-dots .dot:hover',
1625 ]
1626 );
1627
1628 $this->end_controls_tab();
1629
1630 $this->start_controls_tab( 'borderless_elementor_slider_navigation_dots_tab_active', [ 'label' => __( 'Active', 'borderless' ) ] );
1631
1632 $this->add_group_control(
1633 Group_Control_Background::get_type(),
1634 [
1635 'name' => 'borderless_elementor_slider_navigation_dots_background_color_active',
1636 'label' => esc_html__( 'Dots Color', 'borderless' ),
1637 'types' => [ 'classic', 'gradient' ],
1638 'exclude' => [ 'image' ],
1639 'selector' => '{{WRAPPER}} .borderless-elementor-slider .flickity-page-dots .dot.is-selected',
1640 ]
1641 );
1642
1643 $this->end_controls_tab();
1644
1645 $this->end_controls_tabs();
1646
1647 $this->end_controls_section();
1648
1649 }
1650
1651 /*-----------------------------------------------------------------------------------*/
1652 /* *. Render
1653 /*-----------------------------------------------------------------------------------*/
1654
1655 protected function render() {
1656
1657 $settings = $this->get_settings_for_display();
1658
1659 $target = $settings['borderless_elementor_slider_slide_button_link']['is_external'] ? ' target="_blank"' : '';
1660 $nofollow = $settings['borderless_elementor_slider_slide_button_link']['nofollow'] ? ' rel="nofollow"' : '';
1661
1662 $this->add_render_attribute( 'slider', 'data-slider-autoplay', $settings['borderless_elementor_slider_options_autoplay'] );
1663 $this->add_render_attribute( 'slider', 'data-slider-autoplay-pause-on-hover', $settings['borderless_elementor_slider_options_autoplay_pause_on_hover'] );
1664 $this->add_render_attribute( 'slider', 'data-slider-autoplay-speed', $settings['borderless_elementor_slider_options_autoplay_speed'] );
1665 $this->add_render_attribute( 'slider', 'data-slider-draggable', $settings['borderless_elementor_slider_options_draggable'] );
1666 $this->add_render_attribute( 'slider', 'data-slider-infinite-scroll', $settings['borderless_elementor_slider_options_infinite_scroll'] );
1667 $this->add_render_attribute( 'slider', 'data-slider-adaptative-height', $settings['borderless_elementor_slider_options_adaptive_height'] );
1668 $this->add_render_attribute( 'slider', 'data-slider-fullscreen', $settings['borderless_elementor_slider_options_fullscreen'] );
1669 $this->add_render_attribute( 'slider', 'data-slider-fade', $settings['borderless_elementor_slider_options_fade'] );
1670 $this->add_render_attribute( 'slider', 'data-slider-as-nav-for', $settings['borderless_elementor_slider_options_thumbs_navigation'] );
1671
1672 ?>
1673
1674 <div class="borderless-elementor-slider-widget" <?php echo $this->get_render_attribute_string( 'slider' ) ?>>
1675
1676 <div class="borderless-elementor-slider <?php echo wp_kses( ( $settings['borderless_elementor_slider_navigation_arrows_position'] ), true ) .' '. wp_kses( ( $settings['borderless_elementor_slider_navigation_dots_position'] ), true ); ?>">
1677
1678 <?php if ( $settings['borderless_elementor_slider_slide_strings'] ) {
1679 foreach ( $settings['borderless_elementor_slider_slide_strings'] as $slider_string ) {
1680
1681 $ken_burns = '';
1682
1683 if ( $slider_string['borderless_elementor_slider_slide_background_image_ken_burns'] ) {
1684 $ken_burns = ' elementor-ken-burns elementor-ken-burns--' . $slider_string['borderless_elementor_slider_slide_background_image_zoom_direction'];
1685 }
1686
1687 ?>
1688
1689 <div class="borderless-elementor-slide <?php echo $ken_burns; ?> elementor-repeater-item-<?php echo $slider_string['_id']; ?> ">
1690
1691 <div class="borderless-elementor-slide-background-overlay">
1692
1693 <div class="borderless-elementor-slide-content">
1694
1695 <div class="borderless-elementor-slide-content-inner">
1696
1697 <?php if ( $settings['borderless_elementor_slider_options_show_title'] ) { ?>
1698 <<?php echo wp_kses( ( $settings['borderless_elementor_slider_options_title_html_tag'] ), true ); ?> class="borderless-elementor-slide-title"><?php echo wp_kses( ( $slider_string['borderless_elementor_slider_slide_title'] ), true ); ?></<?php echo wp_kses( ( $settings['borderless_elementor_slider_options_title_html_tag'] ), true ); ?>>
1699 <?php } ?>
1700
1701 <?php if ( $settings['borderless_elementor_slider_options_show_description'] ) { ?>
1702 <<?php echo wp_kses( ( $settings['borderless_elementor_slider_options_description_html_tag'] ), true ); ?> class="borderless-elementor-slide-description"><?php echo wp_kses( ( $slider_string['borderless_elementor_slider_slide_description'] ), true ); ?></<?php echo wp_kses( ( $settings['borderless_elementor_slider_options_description_html_tag'] ), true ); ?>>
1703 <?php } ?>
1704
1705 <?php if ( $settings['borderless_elementor_slider_options_show_button'] ) { ?>
1706 <div class="borderless-elementor-slide-button-container">
1707 <a class="borderless-elementor-slide-button borderless-btn borderless-btn--primary" href="<?php echo wp_kses( ( $slider_string['borderless_elementor_slider_slide_button_link']['url'] ), true ); ?>" <?php echo $target . $nofollow; ?>><?php echo wp_kses( ( $slider_string['borderless_elementor_slider_slide_button_text'] ), true ); ?></a>
1708 </div>
1709 <?php } ?>
1710
1711 </div>
1712
1713 </div>
1714
1715 </div>
1716
1717 </div>
1718
1719 <?php } ?>
1720
1721 <?php } ?>
1722
1723 </div>
1724
1725 <?php if( $settings['borderless_elementor_slider_options_thumbs_navigation'] ) { ?>
1726
1727 <div class="borderless-elementor-slider-nav">
1728
1729 <?php if ( $settings['borderless_elementor_slider_slide_strings'] ) {
1730 foreach ( $settings['borderless_elementor_slider_slide_strings'] as $slider_string ) {
1731
1732 ?>
1733
1734 <div class="borderless-elementor-slide elementor-repeater-item-<?php echo $slider_string['_id']; ?> ">
1735
1736 <div class="borderless-elementor-slide-background-overlay">
1737 </div>
1738
1739 </div>
1740
1741 <?php } ?>
1742
1743 <?php } ?>
1744
1745 </div>
1746
1747 <?php } ?>
1748
1749 </div>
1750
1751 <?php
1752
1753 }
1754
1755 }