Happy Addons for Elementor (Mega Menu, Post Grid, Woocommerce Product Grid, Table, Event Calendar, Slider Elementor Widget) - Version 1.0.3

Version Description

  • Update: Offset settings
  • Fix: Offset responsive settings
Download this release

Release Info

Developer thehappymonster
Plugin Icon 128x128 Happy Addons for Elementor (Mega Menu, Post Grid, Woocommerce Product Grid, Table, Event Calendar, Slider Elementor Widget)
Version 1.0.3
Comparing to
See all releases

Code changes from version 1.0.2 to 1.0.3

assets/admin/js/happy-addons.js CHANGED
@@ -10,4 +10,31 @@
10
  }, 100));
11
  });
12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  }(jQuery, window.elementor));
10
  }, 100));
11
  });
12
 
13
+ elementor.hooks.addAction( 'panel/open_editor/widget', function( panel, model, view ) {
14
+ if (model.get('widgetType').indexOf('ha-') === -1) {
15
+ return;
16
+ }
17
+ var controller = panel.currentPageView.$childViewContainer.find('[data-setting="_preset"]');
18
+ controller.on('change.haPresetChange', function(e) {
19
+ e.stopPropagation();
20
+
21
+ view.copy();
22
+
23
+ var d = elementorCommon.storage.get('transfer');
24
+
25
+ console.log(d);
26
+ // $.get(
27
+ // happy.ajax_url,
28
+ // {
29
+ // 'action': 'ha_get_preset',
30
+ // 'name': $(this).val(),
31
+ // 'widget': model.get('widgetType'),
32
+ // 'nonce': happy.nonce
33
+ // }
34
+ // ).done(function(res) {
35
+ // console.log(res);
36
+ // model.setSetting(JSON.parse(res.data));
37
+ // });
38
+ });
39
+ } );
40
  }(jQuery, window.elementor));
assets/admin/js/happy-addons.min.js CHANGED
@@ -1 +1 @@
1
- !function(e,n){"use strict";n.on("panel:init",function(){e("#elementor-panel-elements-search-input").on("keyup",_.debounce(function(){e("#elementor-panel-elements").find(".hm").parents(".elementor-element").addClass("happy-addons-addon")},100))})}(jQuery,window.elementor);
1
+ !function(e,n){"use strict";n.on("panel:init",function(){e("#elementor-panel-elements-search-input").on("keyup",_.debounce(function(){e("#elementor-panel-elements").find(".hm").parents(".elementor-element").addClass("happy-addons-addon")},100))}),n.hooks.addAction("panel/open_editor/widget",function(e,n,t){if(-1!==n.get("widgetType").indexOf("ha-")){e.currentPageView.$childViewContainer.find('[data-setting="_preset"]').on("change.haPresetChange",function(e){e.stopPropagation(),t.copy();var n=elementorCommon.storage.get("transfer");console.log(n)})}})}(jQuery,window.elementor);
base.php CHANGED
@@ -10,7 +10,7 @@ defined( 'ABSPATH' ) || die();
10
 
11
  class Base {
12
 
13
- const VERSION = '1.0.2';
14
 
15
  const MINIMUM_ELEMENTOR_VERSION = '2.0.0';
16
 
10
 
11
  class Base {
12
 
13
+ const VERSION = '1.0.3';
14
 
15
  const MINIMUM_ELEMENTOR_VERSION = '2.0.0';
16
 
classes/asset-manager.php CHANGED
@@ -114,19 +114,10 @@ class Asset_Manager {
114
  Base::VERSION,
115
  true
116
  );
117
-
118
- wp_localize_script(
119
- 'happy-elementor-addons-admin',
120
- 'happy',
121
- [
122
- 'ajax_url' => admin_url( 'admin-ajax.php' ),
123
- 'nonce' => wp_create_nonce( 'ha_get_preset' ),
124
- ]
125
- );
126
  }
127
 
128
  public function enqueue_preview_style() {
129
- if( class_exists( 'WeForms' ) ) {
130
  wp_enqueue_style(
131
  'happy-elementor-weform-preview',
132
  plugins_url( '/weforms/assets/wpuf/css/frontend-forms.css', 'weforms' ),
@@ -134,7 +125,7 @@ class Asset_Manager {
134
  Base::VERSION
135
  );
136
  }
137
- if( class_exists( 'WPForms_Lite' ) ) {
138
  wp_enqueue_style(
139
  'happy-elementor-wpform-preview',
140
  plugins_url( '/wpforms-lite/assets/css/wpforms-full.css', 'wpforms-lite' ),
@@ -142,7 +133,7 @@ class Asset_Manager {
142
  Base::VERSION
143
  );
144
  }
145
- if( class_exists( 'Caldera_Forms' ) ) {
146
  wp_enqueue_style(
147
  'happy-elementor-caldera-preview',
148
  plugins_url( '/caldera-forms/assets/css/caldera-forms-front.css', 'caldera-forms' ),
@@ -150,7 +141,5 @@ class Asset_Manager {
150
  Base::VERSION
151
  );
152
  }
153
-
154
  }
155
-
156
  }
114
  Base::VERSION,
115
  true
116
  );
 
 
 
 
 
 
 
 
 
117
  }
118
 
119
  public function enqueue_preview_style() {
120
+ if ( class_exists( 'WeForms' ) ) {
121
  wp_enqueue_style(
122
  'happy-elementor-weform-preview',
123
  plugins_url( '/weforms/assets/wpuf/css/frontend-forms.css', 'weforms' ),
125
  Base::VERSION
126
  );
127
  }
128
+ if ( class_exists( 'WPForms_Lite' ) ) {
129
  wp_enqueue_style(
130
  'happy-elementor-wpform-preview',
131
  plugins_url( '/wpforms-lite/assets/css/wpforms-full.css', 'wpforms-lite' ),
133
  Base::VERSION
134
  );
135
  }
136
+ if ( class_exists( 'Caldera_Forms' ) ) {
137
  wp_enqueue_style(
138
  'happy-elementor-caldera-preview',
139
  plugins_url( '/caldera-forms/assets/css/caldera-forms-front.css', 'caldera-forms' ),
141
  Base::VERSION
142
  );
143
  }
 
144
  }
 
145
  }
plugin.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
  /**
3
  * Plugin Name: Happy Elementor Addons
4
- * Plugin URI: http://happymonster.me/plugins/happy-addons-elementor
5
- * Description: Best Addons for Elementor
6
- * Version: 1.0.2
7
  * Author: HappyMonster
8
- * Author URI: http://happymonster.me/
9
  * License: GPLv2
10
  * License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
  * Text Domain: happy_addons
1
  <?php
2
  /**
3
  * Plugin Name: Happy Elementor Addons
4
+ * Plugin URI: https://happyaddons.com/
5
+ * Description: <a href="https://happyaddons.com/">HappyAddons</a> is a collection of slick, powerful widgets that works seamlessly with Elementor page builder. It’s trendy look with detail customization features allows to create extraordinary designs instantly. <a href="https://happyaddons.com/">HappyAddons</a> is free, rapidly growing and comes with great support.
6
+ * Version: 1.0.3
7
  * Author: HappyMonster
8
+ * Author URI: https://happymonster.me/
9
  * License: GPLv2
10
  * License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
  * Text Domain: happy_addons
readme.txt CHANGED
@@ -1,37 +1,37 @@
1
  === Happy Elementor Addons ===
2
  Plugin Name: Happy Elementor Addons
3
- Version: 1.0.2
4
  Author: HappyMonster
5
  Author URI: http://happymonster.me/
6
  Contributors: thehappymonster, happyaddons, hasinhayder, obiplabon, sourav926
7
- Tags: elementor, card, blurb, contact form 7, icon box, widget, page builder
8
  Requires at least: 4.5
9
- Tested up to: 5.2.1
10
  Requires PHP: 5.4
11
- Stable tag: 1.0.2
12
  License: GPLv2
13
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
14
 
15
- Most advanced, highly customizable, flexible and easy-to-use widgets for Elementor with lots of options and possibilities.
16
 
17
  == Description ==
18
 
19
  [HappyAddons](https://happyaddons.com/) is a collection of slick, powerful widgets that works seamlessly with Elementor page builder. It’s trendy look with detail customization features allows to create extraordinary designs instantly. [HappyAddons](https://happyaddons.com/) is free, rapidly growing and comes with great support.
20
 
21
- ### Check The Demos
22
-
23
- 1. [Card](https://happyaddons.com/elementor-card-widget-demo/)
24
- 2. [Gradient Heading](https://happyaddons.com/elementor-gradient-heading-widget-demo/)
25
- 3. [Info Box](https://happyaddons.com/elementor-info-box-widget-demo/)
26
- 4. [Icon Box](https://happyaddons.com/elementor-icon-box-widget-demo/)
27
- 5. [Image Compare](https://happyaddons.com/elementor-image-compare-widget-demo/)
28
- 6. [Member](https://happyaddons.com/elementor-team-member-widget-demo/)
29
- 7. [Review](https://happyaddons.com/elementor-review-widget-demo/)
30
- 8. [Skill Bars](https://happyaddons.com/elementor-skill-bars-widget-demo/)
31
- 9. [Contact Form 7](https://happyaddons.com/elementor-contact-form-7-widget-demo/)
32
- 10. [Caldera Form](https://happyaddons.com/elementor-caldera-forms-widget-demo/)
33
- 11. [We Forms](https://happyaddons.com/elementor-we-forms-widget-demo/)
34
- 12. [Ninja Forms](https://happyaddons.com/elementor-ninja-form-widget-demo/)
35
 
36
  ### Features
37
 
@@ -64,6 +64,11 @@ It's really easy and super simple to install **Happy Elementor Addons** plugin b
64
 
65
  == Changelog ==
66
 
 
 
 
 
 
67
  = 1.0.2 =
68
 
69
  * Update: Floating effects settings
1
  === Happy Elementor Addons ===
2
  Plugin Name: Happy Elementor Addons
3
+ Version: 1.0.3
4
  Author: HappyMonster
5
  Author URI: http://happymonster.me/
6
  Contributors: thehappymonster, happyaddons, hasinhayder, obiplabon, sourav926
7
+ Tags: elementor, form, page builder, widget, addon
8
  Requires at least: 4.5
9
+ Tested up to: 5.2.2
10
  Requires PHP: 5.4
11
+ Stable tag: 1.0.3
12
  License: GPLv2
13
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
14
 
15
+ [HappyAddons](https://happyaddons.com/) is a collection of slick, powerful widgets that works seamlessly with Elementor page builder. It’s trendy look with detail customization features allows to create extraordinary designs instantly. [HappyAddons](https://happyaddons.com/) is free, rapidly growing and comes with great support.
16
 
17
  == Description ==
18
 
19
  [HappyAddons](https://happyaddons.com/) is a collection of slick, powerful widgets that works seamlessly with Elementor page builder. It’s trendy look with detail customization features allows to create extraordinary designs instantly. [HappyAddons](https://happyaddons.com/) is free, rapidly growing and comes with great support.
20
 
21
+ ### Included Free Widgets
22
+
23
+ 1. **[Card](https://happyaddons.com/elementor-card-widget-demo/)** - Incredibly powerful widget to demonstrate your products, articles, news, creative posts using a beautiful combination of texts, links, badge and image. Using built in positioning and offset feature you can create eye-candy designs in a twist. [Check demo](https://happyaddons.com/elementor-card-widget-demo/)
24
+ 2. **[Gradient Heading](https://happyaddons.com/elementor-gradient-heading-widget-demo/)** - Another gem to create eye candy headings for your websites. You can apply different gradient styles, angles, opacity, and positions to make them look even better across different device screens. [Check demo](https://happyaddons.com/elementor-gradient-heading-widget-demo/)
25
+ 3. **[Info Box](https://happyaddons.com/elementor-info-box-widget-demo/)** - Create beautiful information boxes using icons, links and texts, and make them slick using the built in positioning features. [Check demo](https://happyaddons.com/elementor-info-box-widget-demo/)
26
+ 4. **[Icon Box](https://happyaddons.com/elementor-icon-box-widget-demo/)** - A simplified version of Info box but comes with powerful display features. Perfect for showcasing interesting information to your users in various styles. [Check demo](https://happyaddons.com/elementor-icon-box-widget-demo/)
27
+ 5. **[Image Compare](https://happyaddons.com/elementor-image-compare-widget-demo/)** - Are you a photo-editor, agency or product designer who often needs to showcase their beautiful works in a form of before and after slider? This widget is perfect for this job. And built in styling options, vertical and horizontal orientation features can help you design these before-after sections with more creativity. [Check demo](https://happyaddons.com/elementor-image-compare-widget-demo/)
28
+ 6. **[Team Member](https://happyaddons.com/elementor-team-member-widget-demo/)** - A perfect widget to showcase your beautiful team in various styles using texts, images, and social links. And just like our other widgets, you will find powerful styling options to make them stand out quite easily. [Check demo](https://happyaddons.com/elementor-team-member-widget-demo/)
29
+ 7. **[Review](https://happyaddons.com/elementor-review-widget-demo/)** - Showcase your user feedback, reviews and rating easily than ever using our review widget. Display user photo, texts and star ratings. Make them stand out using built in offsets and positioning features. [Check demo](https://happyaddons.com/elementor-review-widget-demo/)
30
+ 8. **[Skill Bars](https://happyaddons.com/elementor-skill-bars-widget-demo/)** - An essential building block to showcase user skills, task percentage, required tools and other progressive information in different ways. Comes with incredible customizing options to suit your needs. [Check demo](https://happyaddons.com/elementor-skill-bars-widget-demo/)
31
+ 9. **[Contact Form 7](https://happyaddons.com/elementor-contact-form-7-widget-demo/)** - This utility widget helps you to integrate existing forms built using CF7 plugin across your web pages without spending too much time. [Check demo](https://happyaddons.com/elementor-contact-form-7-widget-demo/)
32
+ 10. **[Caldera Form](https://happyaddons.com/elementor-caldera-forms-widget-demo/)** - This widget can help you to display your caldera forms to display on your web pages designed with Elementor. [Check demo](https://happyaddons.com/elementor-caldera-forms-widget-demo/)
33
+ 11. **[We Forms](https://happyaddons.com/elementor-we-forms-widget-demo/)** - Designed forms using weForms plugin and looking for a way to display those on your Elementor powered pages? This is the answer for that. [Check demo](https://happyaddons.com/elementor-we-forms-widget-demo/)
34
+ 12. **[Ninja Forms](https://happyaddons.com/elementor-ninja-form-widget-demo/)** - Use this widget to embed forms created using Ninja Forms to display seamlessly on your web pages. Various styling options will help you to look at them even better. [Check demo](https://happyaddons.com/elementor-ninja-form-widget-demo/)
35
 
36
  ### Features
37
 
64
 
65
  == Changelog ==
66
 
67
+ = 1.0.3 =
68
+
69
+ * Update: Offset settings
70
+ * Fix: Offset responsive settings
71
+
72
  = 1.0.2 =
73
 
74
  * Update: Floating effects settings
widgets/card/widget.php CHANGED
@@ -31,6 +31,15 @@ class Card extends Base {
31
  return __( 'Card', 'happy_addons' );
32
  }
33
 
 
 
 
 
 
 
 
 
 
34
  /**
35
  * Get widget icon.
36
  *
@@ -365,9 +374,6 @@ class Card extends Base {
365
  'condition' => [
366
  'offset_toggle' => 'yes'
367
  ],
368
- 'default' => [
369
- 'size' => 1
370
- ],
371
  'range' => [
372
  'px' => [
373
  'min' => -1000,
@@ -387,9 +393,6 @@ class Card extends Base {
387
  'condition' => [
388
  'offset_toggle' => 'yes'
389
  ],
390
- 'default' => [
391
- 'size' => 1
392
- ],
393
  'range' => [
394
  'px' => [
395
  'min' => -1000,
@@ -397,16 +400,38 @@ class Card extends Base {
397
  ],
398
  ],
399
  'selectors' => [
400
- '{{WRAPPER}} .ha-card-figure' => '-ms-transform: translate({{image_offset_x.SIZE}}{{UNIT}}, {{SIZE}}{{UNIT}}); -webkit-transform: translate({{image_offset_x.SIZE}}{{UNIT}}, {{SIZE}}{{UNIT}}); transform: translate({{image_offset_x.SIZE}}{{UNIT}}, {{SIZE}}{{UNIT}});',
 
 
 
 
401
  '{{WRAPPER}}.ha-card--top .ha-card-body' => 'margin-top: {{SIZE}}{{UNIT}};',
402
- '{{WRAPPER}}.ha-card--left .ha-card-body' =>
403
- 'margin-left: {{image_offset_x.SIZE}}{{UNIT}};'
404
- . 'flex: 0 0 calc((100% - {{image_width.SIZE}}{{image_width.UNIT}}) + (-1 * {{image_offset_x.SIZE}}{{UNIT}}));'
405
- . 'max-width: calc((100% - {{image_width.SIZE}}{{image_width.UNIT}}) + (-1 * {{image_offset_x.SIZE}}{{UNIT}}));',
406
- '{{WRAPPER}}.ha-card--right .ha-card-body' =>
407
- 'margin-right: calc(-1 * {{image_offset_x.SIZE}}{{UNIT}});'
408
- . 'flex: 0 0 calc((100% - {{image_width.SIZE}}{{image_width.UNIT}}) + {{image_offset_x.SIZE}}{{UNIT}});'
409
- . 'max-width: calc((100% - {{image_width.SIZE}}{{image_width.UNIT}}) + {{image_offset_x.SIZE}}{{UNIT}});',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
410
  ],
411
  ]
412
  );
@@ -507,9 +532,6 @@ class Card extends Base {
507
  'condition' => [
508
  'badge_offset_toggle' => 'yes'
509
  ],
510
- 'default' => [
511
- 'size' => 1
512
- ],
513
  'range' => [
514
  'px' => [
515
  'min' => -1000,
@@ -529,9 +551,6 @@ class Card extends Base {
529
  'condition' => [
530
  'badge_offset_toggle' => 'yes'
531
  ],
532
- 'default' => [
533
- 'size' => 1
534
- ],
535
  'range' => [
536
  'px' => [
537
  'min' => -1000,
@@ -539,7 +558,9 @@ class Card extends Base {
539
  ],
540
  ],
541
  'selectors' => [
542
- '{{WRAPPER}} .ha-badge' => '-ms-transform: translate({{badge_offset_x.SIZE}}{{UNIT}}, {{SIZE}}{{UNIT}}); -webkit-transform: translate({{badge_offset_x.SIZE}}{{UNIT}}, {{SIZE}}{{UNIT}}); transform: translate({{badge_offset_x.SIZE}}{{UNIT}}, {{SIZE}}{{UNIT}});',
 
 
543
  ],
544
  ]
545
  );
31
  return __( 'Card', 'happy_addons' );
32
  }
33
 
34
+ protected function get_presets() {
35
+ return [
36
+ 'design-1' => __( 'Design 1', 'happy_addons' ),
37
+ 'design-2' => __( 'Design 2', 'happy_addons' ),
38
+ 'design-3' => __( 'Design 3', 'happy_addons' ),
39
+ 'design-4' => __( 'Design 4', 'happy_addons' ),
40
+ ];
41
+ }
42
+
43
  /**
44
  * Get widget icon.
45
  *
374
  'condition' => [
375
  'offset_toggle' => 'yes'
376
  ],
 
 
 
377
  'range' => [
378
  'px' => [
379
  'min' => -1000,
393
  'condition' => [
394
  'offset_toggle' => 'yes'
395
  ],
 
 
 
396
  'range' => [
397
  'px' => [
398
  'min' => -1000,
400
  ],
401
  ],
402
  'selectors' => [
403
+ // Image translate styles
404
+ '(desktop){{WRAPPER}} .ha-card-figure' => '-ms-transform: translate({{image_offset_x.SIZE || 0}}{{UNIT}}, {{image_offset_y.SIZE || 0}}{{UNIT}}); -webkit-transform: translate({{image_offset_x.SIZE || 0}}{{UNIT}}, {{image_offset_y.SIZE || 0}}{{UNIT}}); transform: translate({{image_offset_x.SIZE || 0}}{{UNIT}}, {{image_offset_y.SIZE || 0}}{{UNIT}});',
405
+ '(tablet){{WRAPPER}} .ha-card-figure' => '-ms-transform: translate({{image_offset_x_tablet.SIZE || 0}}{{UNIT}}, {{image_offset_y_tablet.SIZE || 0}}{{UNIT}}); -webkit-transform: translate({{image_offset_x_tablet.SIZE || 0}}{{UNIT}}, {{image_offset_y_tablet.SIZE || 0}}{{UNIT}}); transform: translate({{image_offset_x_tablet.SIZE || 0}}{{UNIT}}, {{image_offset_y_tablet.SIZE || 0}}{{UNIT}});',
406
+ '(mobile){{WRAPPER}} .ha-card-figure' => '-ms-transform: translate({{image_offset_x_mobile.SIZE || 0}}{{UNIT}}, {{image_offset_y_mobile.SIZE || 0}}{{UNIT}}); -webkit-transform: translate({{image_offset_x_mobile.SIZE || 0}}{{UNIT}}, {{image_offset_y_mobile.SIZE || 0}}{{UNIT}}); transform: translate({{image_offset_x_mobile.SIZE || 0}}{{UNIT}}, {{image_offset_y_mobile.SIZE || 0}}{{UNIT}});',
407
+ // Card body styles
408
  '{{WRAPPER}}.ha-card--top .ha-card-body' => 'margin-top: {{SIZE}}{{UNIT}};',
409
+ // Left image position styles
410
+ '(desktop){{WRAPPER}}.ha-card--left .ha-card-body' =>
411
+ 'margin-left: {{image_offset_x.SIZE || 0}}{{UNIT}};'
412
+ . 'flex: 0 0 calc((100% - {{image_width.SIZE}}{{image_width.UNIT}}) + (-1 * {{image_offset_x.SIZE || 0}}{{UNIT}}));'
413
+ . 'max-width: calc((100% - {{image_width.SIZE}}{{image_width.UNIT}}) + (-1 * {{image_offset_x.SIZE || 0}}{{UNIT}}));',
414
+ '(tablet){{WRAPPER}}.ha-card--left .ha-card-body' =>
415
+ 'margin-left: {{image_offset_x_tablet.SIZE || 0}}{{UNIT}};'
416
+ . 'flex: 0 0 calc((100% - {{image_width_tablet.SIZE}}{{image_width_tablet.UNIT}}) + (-1 * {{image_offset_x_tablet.SIZE || 0}}{{UNIT}}));'
417
+ . 'max-width: calc((100% - {{image_width_tablet.SIZE}}{{image_width_tablet.UNIT}}) + (-1 * {{image_offset_x_tablet.SIZE || 0}}{{UNIT}}));',
418
+ '(mobile){{WRAPPER}}.ha-card--left .ha-card-body' =>
419
+ 'margin-left: {{image_offset_x_mobile.SIZE || 0}}{{UNIT}};'
420
+ . 'flex: 0 0 calc((100% - {{image_width_mobile.SIZE}}{{image_width_mobile.UNIT}}) + (-1 * {{image_offset_x_mobile.SIZE || 0}}{{UNIT}}));'
421
+ . 'max-width: calc((100% - {{image_width_mobile.SIZE}}{{image_width_mobile.UNIT}}) + (-1 * {{image_offset_x_mobile.SIZE || 0}}{{UNIT}}));',
422
+ // Image right position styles
423
+ '(desktop){{WRAPPER}}.ha-card--right .ha-card-body' =>
424
+ 'margin-right: calc(-1 * {{image_offset_x.SIZE || 0}}{{UNIT}});'
425
+ . 'flex: 0 0 calc((100% - {{image_width.SIZE}}{{image_width.UNIT}}) + {{image_offset_x.SIZE || 0}}{{UNIT}});'
426
+ . 'max-width: calc((100% - {{image_width.SIZE}}{{image_width.UNIT}}) + {{image_offset_x.SIZE || 0}}{{UNIT}});',
427
+ '(tablet){{WRAPPER}}.ha-card--right .ha-card-body' =>
428
+ 'margin-right: calc(-1 * {{image_offset_x_tablet.SIZE || 0}}{{UNIT}});'
429
+ . 'flex: 0 0 calc((100% - {{image_width_tablet.SIZE}}{{image_width_tablet.UNIT}}) + {{image_offset_x_tablet.SIZE || 0}}{{UNIT}});'
430
+ . 'max-width: calc((100% - {{image_width_tablet.SIZE}}{{image_width_tablet.UNIT}}) + {{image_offset_x_tablet.SIZE || 0}}{{UNIT}});',
431
+ '(mobile){{WRAPPER}}.ha-card--right .ha-card-body' =>
432
+ 'margin-right: calc(-1 * {{image_offset_x_mobile.SIZE || 0}}{{UNIT}});'
433
+ . 'flex: 0 0 calc((100% - {{image_width_mobile.SIZE}}{{image_width_mobile.UNIT}}) + {{image_offset_x_mobile.SIZE || 0}}{{UNIT}});'
434
+ . 'max-width: calc((100% - {{image_width_mobile.SIZE}}{{image_width_mobile.UNIT}}) + {{image_offset_x_mobile.SIZE || 0}}{{UNIT}});',
435
  ],
436
  ]
437
  );
532
  'condition' => [
533
  'badge_offset_toggle' => 'yes'
534
  ],
 
 
 
535
  'range' => [
536
  'px' => [
537
  'min' => -1000,
551
  'condition' => [
552
  'badge_offset_toggle' => 'yes'
553
  ],
 
 
 
554
  'range' => [
555
  'px' => [
556
  'min' => -1000,
558
  ],
559
  ],
560
  'selectors' => [
561
+ '(desktop){{WRAPPER}} .ha-badge' => '-ms-transform: translate({{badge_offset_x.SIZE || 0}}{{UNIT}}, {{badge_offset_y.SIZE || 0}}{{UNIT}}); -webkit-transform: translate({{badge_offset_x.SIZE || 0}}{{UNIT}}, {{badge_offset_y.SIZE || 0}}{{UNIT}}); transform: translate({{badge_offset_x.SIZE || 0}}{{UNIT}}, {{badge_offset_y.SIZE || 0}}{{UNIT}});',
562
+ '(tablet){{WRAPPER}} .ha-badge' => '-ms-transform: translate({{badge_offset_x_tablet.SIZE || 0}}{{UNIT}}, {{badge_offset_y_tablet.SIZE || 0}}{{UNIT}}); -webkit-transform: translate({{badge_offset_x_tablet.SIZE || 0}}{{UNIT}}, {{badge_offset_y_tablet.SIZE || 0}}{{UNIT}}); transform: translate({{badge_offset_x_tablet.SIZE || 0}}{{UNIT}}, {{badge_offset_y_tablet.SIZE || 0}}{{UNIT}});',
563
+ '(mobile){{WRAPPER}} .ha-badge' => '-ms-transform: translate({{badge_offset_x_mobile.SIZE || 0}}{{UNIT}}, {{badge_offset_y_mobile.SIZE || 0}}{{UNIT}}); -webkit-transform: translate({{badge_offset_x_mobile.SIZE || 0}}{{UNIT}}, {{badge_offset_y_mobile.SIZE || 0}}{{UNIT}}); transform: translate({{badge_offset_x_mobile.SIZE || 0}}{{UNIT}}, {{badge_offset_y_mobile.SIZE || 0}}{{UNIT}});',
564
  ],
565
  ]
566
  );
widgets/infobox/widget.php CHANGED
@@ -411,9 +411,6 @@ class InfoBox extends Base {
411
  'condition' => [
412
  'offset_toggle' => 'yes'
413
  ],
414
- 'default' => [
415
- 'size' => 1
416
- ],
417
  'range' => [
418
  'px' => [
419
  'min' => -1000,
@@ -433,9 +430,6 @@ class InfoBox extends Base {
433
  'condition' => [
434
  'offset_toggle' => 'yes'
435
  ],
436
- 'default' => [
437
- 'size' => 1
438
- ],
439
  'range' => [
440
  'px' => [
441
  'min' => -1000,
@@ -443,7 +437,11 @@ class InfoBox extends Base {
443
  ],
444
  ],
445
  'selectors' => [
446
- '{{WRAPPER}} .ha-infobox-figure' => '-ms-transform: translate({{media_offset_x.SIZE}}{{UNIT}}, {{SIZE}}{{UNIT}}); -webkit-transform: translate({{media_offset_x.SIZE}}{{UNIT}}, {{SIZE}}{{UNIT}}); transform: translate({{media_offset_x.SIZE}}{{UNIT}}, {{SIZE}}{{UNIT}});',
 
 
 
 
447
  '{{WRAPPER}} .ha-infobox-body' => 'margin-top: {{SIZE}}{{UNIT}};',
448
  ],
449
  ]
@@ -537,34 +535,7 @@ class InfoBox extends Base {
537
  $this->add_control(
538
  'icon_bg_rotate',
539
  [
540
- 'label' => __( 'Rotate Background', 'happy_addons' ),
541
- 'type' => Controls_Manager::SLIDER,
542
- 'size_units' => [ 'deg' ],
543
- 'default' => [
544
- 'unit' => 'deg',
545
- ],
546
- 'range' => [
547
- 'deg' => [
548
- 'min' => 0,
549
- 'max' => 360,
550
- ],
551
- ],
552
- 'selectors' => [
553
- '{{WRAPPER}} .ha-infobox-figure--icon' => '-webkit-transform: rotate({{SIZE}}{{UNIT}}); transform: rotate({{SIZE}}{{UNIT}});',
554
- '{{WRAPPER}} .ha-infobox-figure--icon > i' => '-webkit-transform: rotate(-{{SIZE}}{{UNIT}}); transform: rotate(-{{SIZE}}{{UNIT}});',
555
- ],
556
- 'condition' => [
557
- 'type' => 'icon',
558
- 'icon_bg_color!' => '',
559
- 'offset_toggle!' => 'yes',
560
- ]
561
- ]
562
- );
563
-
564
- $this->add_control(
565
- 'icon_bg_rotate_conditional',
566
- [
567
- 'label' => __( 'Rotate Background', 'happy_addons' ),
568
  'type' => Controls_Manager::SLIDER,
569
  'size_units' => [ 'deg' ],
570
  'default' => [
@@ -577,14 +548,13 @@ class InfoBox extends Base {
577
  ],
578
  ],
579
  'selectors' => [
580
- '{{WRAPPER}} .ha-infobox-figure--icon' => '-ms-transform: translate({{media_offset_x.SIZE}}px, {{media_offset_y.SIZE}}px) rotate({{SIZE}}deg); -webkit-transform: translate({{media_offset_x.SIZE}}px, {{media_offset_y.SIZE}}px) rotate({{SIZE}}deg); transform: translate({{media_offset_x.SIZE}}px, {{media_offset_y.SIZE}}px) rotate({{SIZE}}deg) !important;',
581
- '{{WRAPPER}} .ha-infobox-figure--icon > i' => '-webkit-transform: rotate(-{{SIZE}}{{UNIT}}); transform: rotate(-{{SIZE}}{{UNIT}});',
 
 
 
 
582
  ],
583
- 'condition' => [
584
- 'offset_toggle' => 'yes',
585
- 'type' => 'icon',
586
- 'icon_bg_color!' => '',
587
- ]
588
  ]
589
  );
590
 
@@ -601,7 +571,7 @@ class InfoBox extends Base {
601
  $this->add_responsive_control(
602
  'content_padding',
603
  [
604
- 'label' => __( 'Container Padding', 'happy_addons' ),
605
  'type' => Controls_Manager::DIMENSIONS,
606
  'size_units' => [ 'px', 'em', '%' ],
607
  'selectors' => [
411
  'condition' => [
412
  'offset_toggle' => 'yes'
413
  ],
 
 
 
414
  'range' => [
415
  'px' => [
416
  'min' => -1000,
430
  'condition' => [
431
  'offset_toggle' => 'yes'
432
  ],
 
 
 
433
  'range' => [
434
  'px' => [
435
  'min' => -1000,
437
  ],
438
  ],
439
  'selectors' => [
440
+ // Media translate styles
441
+ '(desktop){{WRAPPER}} .ha-infobox-figure' => '-ms-transform: translate({{media_offset_x.SIZE || 0}}{{UNIT}}, {{media_offset_y.SIZE || 0}}{{UNIT}}); -webkit-transform: translate({{media_offset_x.SIZE || 0}}{{UNIT}}, {{media_offset_y.SIZE || 0}}{{UNIT}}); transform: translate({{media_offset_x.SIZE || 0}}{{UNIT}}, {{media_offset_y.SIZE || 0}}{{UNIT}});',
442
+ '(tablet){{WRAPPER}} .ha-infobox-figure' => '-ms-transform: translate({{media_offset_x_tablet.SIZE || 0}}{{UNIT}}, {{media_offset_y_tablet.SIZE || 0}}{{UNIT}}); -webkit-transform: translate({{media_offset_x_tablet.SIZE || 0}}{{UNIT}}, {{media_offset_y_tablet.SIZE || 0}}{{UNIT}}); transform: translate({{media_offset_x_tablet.SIZE || 0}}{{UNIT}}, {{media_offset_y_tablet.SIZE || 0}}{{UNIT}});',
443
+ '(mobile){{WRAPPER}} .ha-infobox-figure' => '-ms-transform: translate({{media_offset_x_mobile.SIZE || 0}}{{UNIT}}, {{media_offset_y_mobile.SIZE || 0}}{{UNIT}}); -webkit-transform: translate({{media_offset_x_mobile.SIZE || 0}}{{UNIT}}, {{media_offset_y_mobile.SIZE || 0}}{{UNIT}}); transform: translate({{media_offset_x_mobile.SIZE || 0}}{{UNIT}}, {{media_offset_y_mobile.SIZE || 0}}{{UNIT}});',
444
+ // Body text styles
445
  '{{WRAPPER}} .ha-infobox-body' => 'margin-top: {{SIZE}}{{UNIT}};',
446
  ],
447
  ]
535
  $this->add_control(
536
  'icon_bg_rotate',
537
  [
538
+ 'label' => __( 'Background Rotate', 'happy_addons' ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
539
  'type' => Controls_Manager::SLIDER,
540
  'size_units' => [ 'deg' ],
541
  'default' => [
548
  ],
549
  ],
550
  'selectors' => [
551
+ // Icon rotate styles
552
+ '{{WRAPPER}} .ha-infobox-figure--icon > i' => '-ms-transform: rotate(-{{SIZE}}{{UNIT}}); -webkit-transform: rotate(-{{SIZE}}{{UNIT}}); transform: rotate(-{{SIZE}}{{UNIT}});',
553
+ // Icon box transform styles
554
+ '(desktop){{WRAPPER}} .ha-infobox-figure--icon' => '-ms-transform: translate({{media_offset_x.SIZE || 0}}px, {{media_offset_y.SIZE || 0}}px) rotate({{SIZE}}deg); -webkit-transform: translate({{media_offset_x.SIZE || 0}}px, {{media_offset_y.SIZE || 0}}px) rotate({{SIZE}}deg); transform: translate({{media_offset_x.SIZE || 0}}px, {{media_offset_y.SIZE || 0}}px) rotate({{SIZE}}deg);',
555
+ '(tablet){{WRAPPER}} .ha-infobox-figure--icon' => '-ms-transform: translate({{media_offset_x_tablet.SIZE || 0}}px, {{media_offset_y_tablet.SIZE || 0}}px) rotate({{SIZE}}deg); -webkit-transform: translate({{media_offset_x_tablet.SIZE || 0}}px, {{media_offset_y_tablet.SIZE || 0}}px) rotate({{SIZE}}deg); transform: translate({{media_offset_x_tablet.SIZE || 0}}px, {{media_offset_y_tablet.SIZE || 0}}px) rotate({{SIZE}}deg);',
556
+ '(mobile){{WRAPPER}} .ha-infobox-figure--icon' => '-ms-transform: translate({{media_offset_x_mobile.SIZE || 0}}px, {{media_offset_y_mobile.SIZE || 0}}px) rotate({{SIZE}}deg); -webkit-transform: translate({{media_offset_x_mobile.SIZE || 0}}px, {{media_offset_y_mobile.SIZE || 0}}px) rotate({{SIZE}}deg); transform: translate({{media_offset_x_mobile.SIZE || 0}}px, {{media_offset_y_mobile.SIZE || 0}}px) rotate({{SIZE}}deg);',
557
  ],
 
 
 
 
 
558
  ]
559
  );
560
 
571
  $this->add_responsive_control(
572
  'content_padding',
573
  [
574
+ 'label' => __( 'Content Box Padding', 'happy_addons' ),
575
  'type' => Controls_Manager::DIMENSIONS,
576
  'size_units' => [ 'px', 'em', '%' ],
577
  'selectors' => [
widgets/review/widget.php CHANGED
@@ -338,9 +338,6 @@ class Review extends Base {
338
  'condition' => [
339
  'offset_toggle' => 'yes'
340
  ],
341
- 'default' => [
342
- 'size' => 1
343
- ],
344
  'range' => [
345
  'px' => [
346
  'min' => -1000,
@@ -360,9 +357,6 @@ class Review extends Base {
360
  'condition' => [
361
  'offset_toggle' => 'yes'
362
  ],
363
- 'default' => [
364
- 'size' => 1
365
- ],
366
  'range' => [
367
  'px' => [
368
  'min' => -1000,
@@ -370,16 +364,38 @@ class Review extends Base {
370
  ],
371
  ],
372
  'selectors' => [
373
- '{{WRAPPER}} .ha-review-figure' => '-ms-transform: translate({{image_offset_x.SIZE}}{{UNIT}}, {{SIZE}}{{UNIT}}); -webkit-transform: translate({{image_offset_x.SIZE}}{{UNIT}}, {{SIZE}}{{UNIT}}); transform: translate({{image_offset_x.SIZE}}{{UNIT}}, {{SIZE}}{{UNIT}});',
 
 
 
 
374
  '{{WRAPPER}}.ha-review--top .ha-review-body' => 'margin-top: {{SIZE}}{{UNIT}};',
375
- '{{WRAPPER}}.ha-review--left .ha-review-body' =>
376
- 'margin-left: {{image_offset_x.SIZE}}{{UNIT}};'
377
- . 'flex: 0 0 calc((100% - {{image_width.SIZE}}{{image_width.UNIT}}) + (-1 * {{image_offset_x.SIZE}}{{UNIT}}));'
378
- . 'max-width: calc((100% - {{image_width.SIZE}}{{image_width.UNIT}}) + (-1 * {{image_offset_x.SIZE}}{{UNIT}}));',
379
- '{{WRAPPER}}.ha-review--right .ha-review-body' =>
380
- 'margin-right: calc(-1 * {{image_offset_x.SIZE}}{{UNIT}});'
381
- . 'flex: 0 0 calc((100% - {{image_width.SIZE}}{{image_width.UNIT}}) + {{image_offset_x.SIZE}}{{UNIT}});'
382
- . 'max-width: calc((100% - {{image_width.SIZE}}{{image_width.UNIT}}) + {{image_offset_x.SIZE}}{{UNIT}});',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
383
  ],
384
  ]
385
  );
@@ -734,6 +750,7 @@ class Review extends Base {
734
  public function _content_template() {
735
  ?>
736
  <#
 
737
  view.addInlineEditingAttributes( 'title', 'none' );
738
  view.addRenderAttribute( 'title', 'class', 'ha-review-reviewer' );
739
 
338
  'condition' => [
339
  'offset_toggle' => 'yes'
340
  ],
 
 
 
341
  'range' => [
342
  'px' => [
343
  'min' => -1000,
357
  'condition' => [
358
  'offset_toggle' => 'yes'
359
  ],
 
 
 
360
  'range' => [
361
  'px' => [
362
  'min' => -1000,
364
  ],
365
  ],
366
  'selectors' => [
367
+ // Image translate styles
368
+ '(desktop){{WRAPPER}} .ha-review-figure' => '-ms-transform: translate({{image_offset_x.SIZE || 0}}{{UNIT}}, {{image_offset_y.SIZE || 0}}{{UNIT}}); -webkit-transform: translate({{image_offset_x.SIZE || 0}}{{UNIT}}, {{image_offset_y.SIZE || 0}}{{UNIT}}); transform: translate({{image_offset_x.SIZE || 0}}{{UNIT}}, {{image_offset_y.SIZE || 0}}{{UNIT}});',
369
+ '(tablet){{WRAPPER}} .ha-review-figure' => '-ms-transform: translate({{image_offset_x_tablet.SIZE || 0}}{{UNIT}}, {{image_offset_y_tablet.SIZE || 0}}{{UNIT}}); -webkit-transform: translate({{image_offset_x_tablet.SIZE || 0}}{{UNIT}}, {{image_offset_y_tablet.SIZE || 0}}{{UNIT}}); transform: translate({{image_offset_x_tablet.SIZE || 0}}{{UNIT}}, {{image_offset_y_tablet.SIZE || 0}}{{UNIT}});',
370
+ '(mobile){{WRAPPER}} .ha-review-figure' => '-ms-transform: translate({{image_offset_x_mobile.SIZE || 0}}{{UNIT}}, {{image_offset_y_mobile.SIZE || 0}}{{UNIT}}); -webkit-transform: translate({{image_offset_x_mobile.SIZE || 0}}{{UNIT}}, {{image_offset_y_mobile.SIZE || 0}}{{UNIT}}); transform: translate({{image_offset_x_mobile.SIZE || 0}}{{UNIT}}, {{image_offset_y_mobile.SIZE || 0}}{{UNIT}});',
371
+ // Review body styles
372
  '{{WRAPPER}}.ha-review--top .ha-review-body' => 'margin-top: {{SIZE}}{{UNIT}};',
373
+ // Left image position styles
374
+ '(desktop){{WRAPPER}}.ha-review--left .ha-review-body' =>
375
+ 'margin-left: {{image_offset_x.SIZE || 0}}{{UNIT}};'
376
+ . 'flex: 0 0 calc((100% - {{image_width.SIZE}}{{image_width.UNIT}}) + (-1 * {{image_offset_x.SIZE || 0}}{{UNIT}}));'
377
+ . 'max-width: calc((100% - {{image_width.SIZE}}{{image_width.UNIT}}) + (-1 * {{image_offset_x.SIZE || 0}}{{UNIT}}));',
378
+ '(tablet){{WRAPPER}}.ha-review--left .ha-review-body' =>
379
+ 'margin-left: {{image_offset_x_tablet.SIZE || 0}}{{UNIT}};'
380
+ . 'flex: 0 0 calc((100% - {{image_width_tablet.SIZE}}{{image_width_tablet.UNIT}}) + (-1 * {{image_offset_x_tablet.SIZE || 0}}{{UNIT}}));'
381
+ . 'max-width: calc((100% - {{image_width_tablet.SIZE}}{{image_width_tablet.UNIT}}) + (-1 * {{image_offset_x_tablet.SIZE || 0}}{{UNIT}}));',
382
+ '(mobile){{WRAPPER}}.ha-review--left .ha-review-body' =>
383
+ 'margin-left: {{image_offset_x_mobile.SIZE || 0}}{{UNIT}};'
384
+ . 'flex: 0 0 calc((100% - {{image_width_mobile.SIZE}}{{image_width_mobile.UNIT}}) + (-1 * {{image_offset_x_mobile.SIZE || 0}}{{UNIT}}));'
385
+ . 'max-width: calc((100% - {{image_width_mobile.SIZE}}{{image_width_mobile.UNIT}}) + (-1 * {{image_offset_x_mobile.SIZE || 0}}{{UNIT}}));',
386
+ // Image right position styles
387
+ '(desktop){{WRAPPER}}.ha-review--right .ha-review-body' =>
388
+ 'margin-right: calc(-1 * {{image_offset_x.SIZE || 0}}{{UNIT}});'
389
+ . 'flex: 0 0 calc((100% - {{image_width.SIZE}}{{image_width.UNIT}}) + {{image_offset_x.SIZE || 0}}{{UNIT}});'
390
+ . 'max-width: calc((100% - {{image_width.SIZE}}{{image_width.UNIT}}) + {{image_offset_x.SIZE || 0}}{{UNIT}});',
391
+ '(tablet){{WRAPPER}}.ha-review--right .ha-review-body' =>
392
+ 'margin-right: calc(-1 * {{image_offset_x_tablet.SIZE || 0}}{{UNIT}});'
393
+ . 'flex: 0 0 calc((100% - {{image_width_tablet.SIZE}}{{image_width_tablet.UNIT}}) + {{image_offset_x_tablet.SIZE || 0}}{{UNIT}});'
394
+ . 'max-width: calc((100% - {{image_width_tablet.SIZE}}{{image_width_tablet.UNIT}}) + {{image_offset_x_tablet.SIZE || 0}}{{UNIT}});',
395
+ '(mobile){{WRAPPER}}.ha-review--right .ha-review-body' =>
396
+ 'margin-right: calc(-1 * {{image_offset_x_mobile.SIZE || 0}}{{UNIT}});'
397
+ . 'flex: 0 0 calc((100% - {{image_width_mobile.SIZE}}{{image_width_mobile.UNIT}}) + {{image_offset_x_mobile.SIZE || 0}}{{UNIT}});'
398
+ . 'max-width: calc((100% - {{image_width_mobile.SIZE}}{{image_width_mobile.UNIT}}) + {{image_offset_x_mobile.SIZE || 0}}{{UNIT}});',
399
  ],
400
  ]
401
  );
750
  public function _content_template() {
751
  ?>
752
  <#
753
+ console.log(settings)
754
  view.addInlineEditingAttributes( 'title', 'none' );
755
  view.addRenderAttribute( 'title', 'class', 'ha-review-reviewer' );
756