PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 3.2.6
ShopBuilder – WooCommerce Builder For Elementor v3.2.6
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
shopbuilder / app / Elementor / Widgets / General / ShopBuilderFaq / Controls.php

Controls.php in ShopBuilder – WooCommerce Builder For Elementor 3.2.6, at app/Elementor/Widgets/General/ShopBuilderFaq/Controls.php

611 lines 21.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Controls class.
4 *
5 * @package RadiusTheme\SB
6 */
7
8 namespace RadiusTheme\SB\Elementor\Widgets\General\ShopBuilderFaq;
9
10 use RadiusTheme\SB\Helpers\Fns;
11 use RadiusTheme\SB\Elementor\Helper\ControlHelper;
12
13 // Do not allow directly accessing this file.
14 if ( ! defined( 'ABSPATH' ) ) {
15 exit( 'This script cannot be accessed directly.' );
16 }
17
18 /**
19 * Settings class.
20 *
21 * @package RadiusTheme\SB
22 */
23 class Controls {
24 /**
25 * Content section
26 *
27 * @param object $obj Reference object.
28 *
29 * @return array
30 */
31 public static function content( $obj ) {
32 return array_merge(
33 self::preset( $obj ),
34 self::general_settings( $obj ),
35 self::tab_icon_settings( $obj )
36 );
37 }
38
39 /**
40 * Style section
41 *
42 * @param object $obj Reference object.
43 *
44 * @return array
45 */
46 public static function style( $obj ) {
47 return array_merge(
48 self::accordion_style( $obj ),
49 self::count_number_style( $obj ),
50 self::title_style( $obj ),
51 self::tab_icon_style( $obj ),
52 self::content_style( $obj )
53 );
54 }
55
56 /**
57 * Preset section
58 *
59 * @param object $obj Reference object.
60 *
61 * @return array
62 */
63 private static function preset( $obj ) {
64 $fields['sb_accordion_preset'] = $obj->start_section(
65 esc_html__( 'Layout', 'shopbuilder' ),
66 'content'
67 );
68 $fields['layout_note'] = $obj->el_heading( esc_html__( 'Predefined Layouts', 'shopbuilder' ) );
69 $fields['layout_style'] = [
70 'type' => 'rtsb-image-selector',
71 'options' => ControlHelper::general_widgets_sb_faq_layouts(),
72 'default' => 'rtsb-sb-faq-layout1',
73 ];
74 $fields['sb_accordion_preset_end'] = $obj->end_section();
75 return $fields;
76 }
77
78
79 /**
80 * General section
81 *
82 * @param object $obj Reference object.
83 *
84 * @return array
85 */
86 private static function general_settings( $obj ) {
87 $fields['general_settings_sec_start'] = $obj->start_section(
88 esc_html__( 'General Settings', 'shopbuilder' ),
89 'content',
90 [],
91 );
92 $fields['sb_faq_type'] = [
93 'type' => 'choose',
94 'label' => esc_html__( 'FAQ Type', 'shopbuilder' ),
95 'options' => [
96 'sb-accordion' => [
97 'title' => esc_html__( 'Accordion', 'shopbuilder' ),
98 'icon' => 'eicon-accordion',
99 ],
100 'sb-toggle' => [
101 'title' => esc_html__( 'Toggle', 'shopbuilder' ),
102 'icon' => 'eicon-toggle',
103 ],
104
105 ],
106 'toggle' => true,
107 'default' => 'sb-accordion',
108 'condition' => [
109 'layout_style' => [ 'rtsb-sb-faq-layout2', 'rtsb-sb-faq-layout4','rtsb-sb-faq-layout6' ],
110 ],
111 ];
112 $fields['display_count'] = [
113 'label' => esc_html__( 'Display Count', 'shopbuilder' ),
114 'description' => esc_html__( 'Switch on to show count number.', 'shopbuilder' ),
115 'label_on' => esc_html__( 'On', 'shopbuilder' ),
116 'label_off' => esc_html__( 'Off', 'shopbuilder' ),
117 'type' => 'switch',
118 'default' => 'yes',
119 'condition' => [
120 'layout_style!' => [ 'rtsb-sb-faq-layout2', 'rtsb-sb-faq-layout4','rtsb-sb-faq-layout6' ],
121 ],
122 ];
123 $fields['sb_faq_items'] = [
124 'type' => 'repeater',
125 'label' => esc_html__( 'Add Faq Item', 'shopbuilder' ),
126 'mode' => 'repeater',
127 'title_field' => '{{{ sb_faq_title }}}',
128 'separator' => 'after',
129 'fields' => [
130 'sb_faq_title' => [
131 'label' => esc_html__( 'Faq Title', 'shopbuilder' ),
132 'type' => 'text',
133 'label_block' => true,
134 'default' => __( 'Faq Item', 'shopbuilder' ),
135 ],
136 'sb_faq_content' => [
137 'label' => esc_html__( 'Faq Content', 'shopbuilder' ),
138 'type' => 'wysiwyg',
139 'label_block' => true,
140 'default' => __( 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy', 'shopbuilder' ),
141 ],
142 'sb_faq_count' => [
143 'label' => esc_html__( 'Faq Count', 'shopbuilder' ),
144 'type' => 'text',
145 'label_block' => true,
146 ],
147 'count_note' => [
148 'type' => 'html',
149 'raw' => sprintf(
150 '<span style="display: block; background: #fffbf1; padding: 10px; font-weight: 500; line-height: 1.4; color: #bd3a3a;border: 1px solid #bd3a3a;">%s</span>',
151 __( 'This count value will not show on accordion type FAQ.', 'shopbuilder' )
152 ),
153 ],
154
155 ],
156 'default' => [
157 [
158 'sb_faq_title' => esc_html__( 'FAQ Item', 'shopbuilder' ),
159 'sb_faq_content' => __( 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy', 'shopbuilder' ),
160
161 ],
162 [
163 'sb_faq_title' => esc_html__( 'FAQ Item', 'shopbuilder' ),
164 'sb_faq_content' => __( 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy', 'shopbuilder' ),
165
166 ],
167 [
168 'sb_faq_title' => esc_html__( 'FAQ Item', 'shopbuilder' ),
169 'sb_faq_content' => __( 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy', 'shopbuilder' ),
170
171 ],
172
173 ],
174
175 ];
176 $fields['sb_faq_title_html_tag'] = [
177 'label' => esc_html__( 'Faq Title Tag', 'shopbuilder' ),
178 'description' => esc_html__( 'Please select the title tag.', 'shopbuilder' ),
179 'type' => 'select',
180 'options' => ControlHelper::heading_tags(),
181 'default' => 'h2',
182 'label_block' => true,
183 ];
184 $fields['general_settings_sec_end'] = $obj->end_section();
185
186 return $fields;
187 }
188
189 /**
190 * Tab Icon section
191 *
192 * @param object $obj Reference object.
193 *
194 * @return array
195 */
196 private static function tab_icon_settings( $obj ) {
197 $condition = [
198 'layout_style' => [ 'rtsb-sb-faq-layout2','rtsb-sb-faq-layout4','rtsb-sb-faq-layout6' ],
199 ];
200 $fields['tab_icon_sec_start'] = $obj->start_section(
201 esc_html__( 'Tab Icon', 'shopbuilder' ),
202 'content',
203 [],
204 $condition
205 );
206 $fields['display_tab_icon'] = [
207 'label' => esc_html__( 'Tab Icon', 'shopbuilder' ),
208 'description' => esc_html__( 'Switch on to show title icon.', 'shopbuilder' ),
209 'label_on' => esc_html__( 'On', 'shopbuilder' ),
210 'label_off' => esc_html__( 'Off', 'shopbuilder' ),
211 'type' => 'switch',
212 'default' => 'yes',
213 ];
214 $fields['sb_tab_icon'] = [
215 'label' => esc_html__( 'Tab Icon', 'shopbuilder' ),
216 'type' => 'icons',
217 'default' => [
218 'value' => 'fas fa-chevron-down',
219 'library' => 'fa-solid',
220 ],
221 'condition' => [
222 'display_tab_icon' => 'yes',
223 ],
224 ];
225 $fields['sb_expanded_icon'] = [
226 'label' => esc_html__( 'Expanded Icon', 'shopbuilder' ),
227 'type' => 'icons',
228 'default' => [
229 'value' => 'fas fa-chevron-up',
230 'library' => 'fa-solid',
231 ],
232 'condition' => [
233 'display_tab_icon' => 'yes',
234 ],
235 ];
236 $fields['tab_icon_position'] = [
237 'mode' => 'responsive',
238 'type' => 'choose',
239 'label' => esc_html__( 'Icon Position', 'shopbuilder' ),
240 'options' => [
241 'left' => [
242 'title' => esc_html__( 'Left', 'shopbuilder' ),
243 'icon' => 'eicon-h-align-left',
244 ],
245 'right' => [
246 'title' => esc_html__( 'Right', 'shopbuilder' ),
247 'icon' => 'eicon-h-align-right',
248 ],
249
250 ],
251 'toggle' => true,
252 'default' => 'left',
253 'condition' => [
254 'display_tab_icon' => 'yes',
255 ],
256 ];
257
258 $fields['tab_icon_sec_end'] = $obj->end_section();
259
260 return $fields;
261 }
262 /**
263 * Content Box style section
264 *
265 * @param object $obj Reference object.
266 *
267 * @return array
268 */
269 private static function accordion_style( $obj ) {
270 $condition = [
271 'layout_style!' => [ 'rtsb-sb-faq-layout1' ],
272 ];
273 $css_selectors = $obj->selectors['accordion_style'];
274 $title = esc_html__( 'FAQ Item', 'shopbuilder' );
275 $selectors = [
276 'box_shadow' => $css_selectors['box_shadow'],
277 'gradient_bg' => $css_selectors['gradient_bg'],
278 'active_gradient_bg' => $css_selectors['active_gradient_bg'],
279 'border' => $css_selectors['border'],
280 'padding' => [ $css_selectors['padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;' ],
281 'border_radius' => [ $css_selectors['border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;' ],
282 ];
283
284 $fields = ControlHelper::general_elementor_style( 'accordion_style', $title, $obj, $condition, $selectors );
285
286 unset(
287 $fields['accordion_style_typo_note'],
288 $fields['rtsb_el_accordion_style_typography'],
289 $fields['accordion_style_color'],
290 $fields['accordion_style_bg_color'],
291 $fields['accordion_style_alignment'],
292 $fields['accordion_style_color_tabs'],
293 $fields['accordion_style_color_tab'],
294 $fields['accordion_style_color_tab_end'],
295 $fields['accordion_style_hover_color_tab'],
296 $fields['accordion_style_hover_color'],
297 $fields['accordion_style_hover_bg_color'],
298 $fields['accordion_style_hover_color_tab_end'],
299 $fields['accordion_style_color_tabs_end'],
300 $fields['accordion_style_border_hover_color'],
301 $fields['accordion_style_margin']
302 );
303 $fields['accordion_style_border_note']['separator'] = 'default';
304 $fields['accordion_style_color_note']['separator'] = 'default';
305 $extra_controls['accordion_style_border_radius'] = [
306 'label' => esc_html__( 'Border Radius', 'shopbuilder' ),
307 'type' => 'dimensions',
308 'mode' => 'responsive',
309 'size_units' => [ 'px' ],
310 'selectors' => $selectors['border_radius'],
311 ];
312 $fields = Fns::insert_controls( 'accordion_style_spacing_note', $fields, $extra_controls );
313 $extra_controls2['accordion_style_gradient_bg'] = [
314 'label' => esc_html__( 'Background', 'shopbuilder' ),
315 'type' => 'background',
316 'mode' => 'group',
317 'selector' => $selectors['gradient_bg'],
318 ];
319 $extra_controls2['accordion_style_active_gradient_bg'] = [
320 'label' => esc_html__( 'Active Background Type', 'shopbuilder' ),
321 'type' => 'background',
322 'mode' => 'group',
323 'selector' => $selectors['active_gradient_bg'],
324 'fields_options' => [
325 'background' => [
326 'label' => esc_html__( 'Active Background Type', 'shopbuilder' ),
327 ],
328 ],
329 'condition' => [
330 'layout_style!' => [ 'rtsb-sb-faq-layout3', 'rtsb-sb-faq-layout5' ],
331 ],
332 ];
333 $extra_controls2['accordion_style_box_shadow'] = [
334 'type' => 'box-shadow',
335 'mode' => 'group',
336 'label' => esc_html__( 'Wrapper Box Shadow', 'shopbuilder' ),
337 'selector' => $selectors['box_shadow'],
338 'condition' => [
339 'layout_style' => [ 'rtsb-sb-faq-layout3', 'rtsb-sb-faq-layout5' ],
340 ],
341 ];
342 $fields = Fns::insert_controls( 'accordion_style_color_note', $fields, $extra_controls2, true );
343 return $fields;
344 }
345 /**
346 * Count Number style section
347 *
348 * @param object $obj Reference object.
349 *
350 * @return array
351 */
352 private static function count_number_style( $obj ) {
353 $condition = [
354 'display_count' => 'yes',
355 'layout_style!' => [ 'rtsb-sb-faq-layout2','rtsb-sb-faq-layout4','rtsb-sb-faq-layout6' ],
356 ];
357 $css_selectors = $obj->selectors['count_number_style'];
358 $title = esc_html__( 'Count', 'shopbuilder' );
359 $selectors = [
360 'box_shadow' => $css_selectors['box_shadow'],
361 'typography' => $css_selectors['typography'],
362 'color' => [ $css_selectors['color'] => 'color: {{VALUE}};' ],
363 'hover_color' => [ $css_selectors['hover_color'] => 'color: {{VALUE}};' ],
364 'border_hover_color' => [ $css_selectors['border_hover_color'] => 'border-color: {{VALUE}};' ],
365 'bg_color' => [ $css_selectors['bg_color'] => 'background-color: {{VALUE}};' ],
366 'border' => $css_selectors['border'],
367 'hover_bg_color' => [ $css_selectors['hover_bg_color'] => 'background-color: {{VALUE}};' ],
368 'margin' => [ $css_selectors['margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important;' ],
369 'padding' => [ $css_selectors['padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important;' ],
370 'border_radius' => [ $css_selectors['border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;' ],
371 ];
372
373 $fields = ControlHelper::general_elementor_style( 'count_number_style', $title, $obj, $condition, $selectors );
374 unset(
375 $fields['count_number_style_alignment'],
376 );
377 $fields['count_number_style_border_note']['separator'] = 'default';
378 $fields['count_number_style_color_note']['separator'] = 'default';
379 $extra_controls['count_number_style_border_radius'] = [
380 'label' => esc_html__( 'Border Radius', 'shopbuilder' ),
381 'type' => 'dimensions',
382 'mode' => 'responsive',
383 'size_units' => [ 'px' ],
384 'selectors' => $selectors['border_radius'],
385 ];
386 $fields = Fns::insert_controls( 'count_number_style_spacing_note', $fields, $extra_controls );
387 $extra_controls2['count_number_style_box_shadow'] = [
388 'type' => 'box-shadow',
389 'mode' => 'group',
390 'label' => esc_html__( 'Box Shadow', 'shopbuilder' ),
391 'selector' => $selectors['box_shadow'],
392 'condition' => [
393 'layout_style' => [ 'rtsb-sb-faq-layout5' ],
394 ],
395 ];
396 $fields = Fns::insert_controls( 'count_number_style_border_note', $fields, $extra_controls2 );
397 return $fields;
398 }
399 /**
400 * Title style section
401 *
402 * @param object $obj Reference object.
403 *
404 * @return array
405 */
406 private static function title_style( $obj ) {
407 $css_selectors = $obj->selectors['title_style'];
408 $title = esc_html__( 'Title', 'shopbuilder' );
409 $selectors = [
410 'typography' => $css_selectors['typography'],
411 'color' => [ $css_selectors['color'] => 'color: {{VALUE}};' ],
412 'hover_color' => [ $css_selectors['hover_color'] => 'color: {{VALUE}};' ],
413 'margin' => [ $css_selectors['margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important;' ],
414 ];
415
416 $fields = ControlHelper::general_elementor_style( 'title_style', $title, $obj, [], $selectors );
417 unset(
418 $fields['title_style_alignment'],
419 $fields['rtsb_el_title_style_border'],
420 $fields['title_style_border_note'],
421 $fields['title_style_bg_color'],
422 $fields['title_style_hover_bg_color'],
423 $fields['title_style_border_hover_color'],
424 $fields['title_style_padding']
425 );
426 $fields['title_style_hover_color_tab']['label'] = esc_html__( 'Active', 'shopbuilder' );
427 $fields['title_style_hover_color']['label'] = esc_html__( 'Active Color', 'shopbuilder' );
428 $fields['title_style_color_tabs']['condition'] = [
429 'layout_style!' => [ 'rtsb-sb-faq-layout1', 'rtsb-sb-faq-layout3','rtsb-sb-faq-layout5' ],
430 ];
431 $fields['title_style_color_tab']['condition'] = [
432 'layout_style!' => [ 'rtsb-sb-faq-layout1', 'rtsb-sb-faq-layout3','rtsb-sb-faq-layout5' ],
433 ];
434 $fields['title_style_color_tab_end']['condition'] = [
435 'layout_style!' => [ 'rtsb-sb-faq-layout1', 'rtsb-sb-faq-layout3','rtsb-sb-faq-layout5' ],
436 ];
437 $fields['title_style_hover_color_tab']['condition'] = [
438 'layout_style!' => [ 'rtsb-sb-faq-layout1', 'rtsb-sb-faq-layout3','rtsb-sb-faq-layout5' ],
439 ];
440 $fields['title_style_hover_color']['condition'] = [
441 'layout_style!' => [ 'rtsb-sb-faq-layout1', 'rtsb-sb-faq-layout3','rtsb-sb-faq-layout5' ],
442 ];
443 $fields['title_style_hover_color_tab_end']['condition'] = [
444 'layout_style!' => [ 'rtsb-sb-faq-layout1', 'rtsb-sb-faq-layout3','rtsb-sb-faq-layout5' ],
445 ];
446 $fields['title_style_color_tabs_end']['condition'] = [
447 'layout_style!' => [ 'rtsb-sb-faq-layout1', 'rtsb-sb-faq-layout3','rtsb-sb-faq-layout5' ],
448 ];
449 return $fields;
450 }
451
452 /**
453 * Content style section
454 *
455 * @param object $obj Reference object.
456 *
457 * @return array
458 */
459 private static function content_style( $obj ) {
460 $css_selectors = $obj->selectors['content_style'];
461 $title = esc_html__( 'Content', 'shopbuilder' );
462 $selectors = [
463 'typography' => $css_selectors['typography'],
464 'color' => [ $css_selectors['color'] => 'color: {{VALUE}};' ],
465 'gradient_bg' => $css_selectors['gradient_bg'],
466 'margin' => [ $css_selectors['margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important;' ],
467 'padding' => [ $css_selectors['padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important;' ],
468 ];
469
470 $fields = ControlHelper::general_elementor_style( 'content_style', $title, $obj, [], $selectors );
471 unset(
472 $fields['content_style_alignment'],
473 $fields['rtsb_el_content_style_border'],
474 $fields['content_style_color_tabs'],
475 $fields['content_style_color_tab'],
476 $fields['content_style_color_tab_end'],
477 $fields['content_style_border_note'],
478 $fields['content_style_hover_color_tab'],
479 $fields['content_style_hover_color'],
480 $fields['content_style_bg_color'],
481 $fields['content_style_hover_bg_color'],
482 $fields['content_style_hover_color_tab_end'],
483 $fields['content_style_color_tabs_end'],
484 $fields['content_style_border_hover_color'],
485 );
486 $fields['content_style_padding']['condition'] = [
487 'layout_style' => [ 'rtsb-sb-faq-layout2','rtsb-sb-faq-layout4','rtsb-sb-faq-layout6' ],
488 ];
489 $extra_controls['content_style_gradient_bg'] = [
490 'label' => esc_html__( 'Background', 'shopbuilder' ),
491 'type' => 'background',
492 'mode' => 'group',
493 'selector' => $selectors['gradient_bg'],
494 ];
495 $fields = Fns::insert_controls( 'content_style_color', $fields, $extra_controls, true );
496 return $fields;
497 }
498 /**
499 * Tab Icon style section
500 *
501 * @param object $obj Reference object.
502 *
503 * @return array
504 */
505 private static function tab_icon_style( $obj ) {
506 $condition = [
507 'display_tab_icon' => 'yes',
508 'layout_style' => [ 'rtsb-sb-faq-layout2','rtsb-sb-faq-layout4','rtsb-sb-faq-layout6' ],
509 ];
510 $css_selectors = $obj->selectors['tab_icon_style'];
511 $title = esc_html__( 'Tab Icon', 'shopbuilder' );
512 $selectors = [
513 'tab_icon_size' => [
514 $css_selectors['tab_icon_size']['font_size'] => 'font-size: {{SIZE}}{{UNIT}};',
515 $css_selectors['tab_icon_size']['svg'] => 'height: {{SIZE}}{{UNIT}};width: {{SIZE}}{{UNIT}};',
516 ],
517 'color' => [ $css_selectors['color'] => 'color: {{VALUE}};' ],
518 'bg_color' => [ $css_selectors['bg_color'] => 'background-color: {{VALUE}};' ],
519 'hover_bg_color' => [ $css_selectors['hover_bg_color'] => 'background-color: {{VALUE}};' ],
520 'tab_icon_gap' => [ $css_selectors['tab_icon_gap'] => 'gap: {{SIZE}}{{UNIT}};' ],
521 'icon_width' => [ $css_selectors['icon_width'] => 'width: {{SIZE}}{{UNIT}};' ],
522 'icon_height' => [ $css_selectors['icon_height'] => 'height: {{SIZE}}{{UNIT}};' ],
523 'hover_color' => [ $css_selectors['hover_color'] => 'color: {{VALUE}};' ],
524 'border' => $css_selectors['border'],
525 'active_border_color' => [ $css_selectors['active_border_color'] => 'border-color: {{VALUE}};' ],
526 'border_radius' => [ $css_selectors['border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;' ],
527
528 ];
529
530 $fields = ControlHelper::general_elementor_style( 'tab_icon_style', $title, $obj, $condition, $selectors );
531 unset(
532 $fields['tab_icon_style_alignment'],
533 $fields['rtsb_el_tab_icon_style_typography'],
534 $fields['tab_icon_style_border_hover_color'],
535 $fields['tab_icon_style_padding'],
536 $fields['tab_icon_style_margin']
537 );
538 $fields['tab_icon_style_hover_color_tab']['label'] = esc_html__( 'Active', 'shopbuilder' );
539 $fields['tab_icon_style_hover_color']['label'] = esc_html__( 'Active Color', 'shopbuilder' );
540 $fields['tab_icon_style_hover_bg_color']['label'] = esc_html__( 'Active Background', 'shopbuilder' );
541 $extra_controls['tab_icon_size'] = [
542 'type' => 'slider',
543 'mode' => 'responsive',
544 'label' => esc_html__( 'Icon Size', 'shopbuilder' ),
545 'size_units' => [ 'px' ],
546 'range' => [
547 'px' => [
548 'min' => 0,
549 'max' => 100,
550 ],
551 ],
552 'selectors' => $selectors['tab_icon_size'],
553 ];
554 $fields = Fns::insert_controls( 'tab_icon_style_color_note', $fields, $extra_controls );
555 $extra_controls2['tab_icon_gap'] = [
556 'type' => 'slider',
557 'mode' => 'responsive',
558 'label' => esc_html__( 'Icon Gap', 'shopbuilder' ),
559 'size_units' => [ 'px' ],
560 'range' => [
561 'px' => [
562 'min' => 0,
563 'max' => 100,
564 ],
565 ],
566 'selectors' => $selectors['tab_icon_gap'],
567 ];
568 $extra_controls2['tab_icon_width'] = [
569 'type' => 'slider',
570 'mode' => 'responsive',
571 'label' => esc_html__( 'Icon Width', 'shopbuilder' ),
572 'size_units' => [ 'px' ],
573 'range' => [
574 'px' => [
575 'min' => 30,
576 'max' => 200,
577 ],
578 ],
579 'selectors' => $selectors['icon_width'],
580 ];
581 $extra_controls2['tab_icon_height'] = [
582 'type' => 'slider',
583 'mode' => 'responsive',
584 'label' => esc_html__( 'Icon Height', 'shopbuilder' ),
585 'size_units' => [ 'px' ],
586 'range' => [
587 'px' => [
588 'min' => 30,
589 'max' => 200,
590 ],
591 ],
592 'selectors' => $selectors['icon_height'],
593 ];
594 $fields = Fns::insert_controls( 'tab_icon_style_spacing_note', $fields, $extra_controls2, true );
595 $extra_controls3['tab_icon_active_border_color'] = [
596 'type' => 'color',
597 'label' => esc_html__( 'Active Border Color', 'shopbuilder' ),
598 'selectors' => $selectors['active_border_color'],
599 ];
600 $extra_controls3['tab_icon_border_radius'] = [
601 'label' => esc_html__( 'Border Radius', 'shopbuilder' ),
602 'type' => 'dimensions',
603 'mode' => 'responsive',
604 'size_units' => [ 'px' ],
605 'selectors' => $selectors['border_radius'],
606 ];
607 $fields = Fns::insert_controls( 'tab_icon_style_spacing_note', $fields, $extra_controls3 );
608 return $fields;
609 }
610 }
611