← All changes
|
app/Elementor/Widgets/Controls/CheckoutInfoBoxSettings.php
+262
-326
2.1.11
→
1.1.4
View file →
| @@ -1,326 +1,262 @@ | ||
| 1 | -<?php | |
| 2 | -/** | |
| 3 | - * Main ProductDescription class. | |
| 4 | - * | |
| 5 | - * @package RadiusTheme\SB | |
| 6 | - */ | |
| 7 | - | |
| 8 | -namespace RadiusTheme\SB\Elementor\Widgets\Controls; | |
| 9 | - | |
| 10 | -use Elementor\Controls_Manager; | |
| 11 | -use RadiusTheme\SB\Helpers\Fns; | |
| 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 | - * Product Description class | |
| 20 | - */ | |
| 21 | -class CheckoutInfoBoxSettings { | |
| 22 | - | |
| 23 | - /** | |
| 24 | - * Widget Control Selectors | |
| 25 | - * | |
| 26 | - * @var object | |
| 27 | - */ | |
| 28 | - private static $widget = []; | |
| 29 | - /** | |
| 30 | - * Widget Control Selectors | |
| 31 | - * | |
| 32 | - * @var array | |
| 33 | - */ | |
| 34 | - private static $selectors = []; | |
| 35 | - | |
| 36 | - /** | |
| 37 | - * Controls Settings | |
| 38 | - * | |
| 39 | - * @param object $widget widget object. | |
| 40 | - * @return array | |
| 41 | - */ | |
| 42 | - public static function widget_fields( $widget ) { | |
| 43 | - self::$widget = $widget; | |
| 44 | - self::$selectors = self::$widget->selectors; | |
| 45 | - return array_merge( | |
| 46 | - self::general_settings(), | |
| 47 | - InfoboxSettings::style_settings( $widget ), | |
| 48 | - self::text_style_settings(), | |
| 49 | - self::fields_settings(), | |
| 50 | - ButtonSettings::style_settings( $widget ) | |
| 51 | - ); | |
| 52 | - } | |
| 53 | - | |
| 54 | - /** | |
| 55 | - * Widget Field | |
| 56 | - * | |
| 57 | - * @return array | |
| 58 | - */ | |
| 59 | - public static function text_style_settings() { | |
| 60 | - $fields = TextStyleSettings::widget_fields( self::$widget ); | |
| 61 | - $fields['section_style']['label'] = esc_html__( 'Description Style', 'shopbuilder' ); | |
| 62 | - $fields['section_style']['tab'] = 'style'; | |
| 63 | - $fields['section_style']['condition'] = [ | |
| 64 | - 'show_description!' => '', | |
| 65 | - ]; | |
| 66 | - | |
| 67 | - $extra_controls['text_margin'] = [ | |
| 68 | - 'label' => esc_html__( 'Margin (px)', 'shopbuilder' ), | |
| 69 | - 'type' => 'dimensions', | |
| 70 | - 'mode' => 'responsive', | |
| 71 | - 'size_units' => [ 'px' ], | |
| 72 | - 'selectors' => [ | |
| 73 | - self::$selectors['text_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} ;', | |
| 74 | - ], | |
| 75 | - ]; | |
| 76 | - | |
| 77 | - $fields = Fns::insert_controls( 'section_style_end', $fields, $extra_controls ); | |
| 78 | - | |
| 79 | - return $fields; | |
| 80 | - } | |
| 81 | - | |
| 82 | - /** | |
| 83 | - * Widget Field | |
| 84 | - * | |
| 85 | - * @return array | |
| 86 | - */ | |
| 87 | - public static function general_settings() { | |
| 88 | - $fields = [ | |
| 89 | - 'section_general' => [ | |
| 90 | - 'mode' => 'section_start', | |
| 91 | - 'label' => esc_html__( 'General', 'shopbuilder' ), | |
| 92 | - ], | |
| 93 | - 'show_info_icon' => [ | |
| 94 | - 'label' => esc_html__( 'Show Custom Icon?', 'shopbuilder' ), | |
| 95 | - 'type' => 'switch', | |
| 96 | - 'description' => esc_html__( 'Switch on to show Custom Icon.', 'shopbuilder' ), | |
| 97 | - 'default' => 'yes', | |
| 98 | - ], | |
| 99 | - 'info_icon' => [ | |
| 100 | - 'label' => esc_html__( 'Icon', 'shopbuilder' ), | |
| 101 | - 'type' => 'icons', | |
| 102 | - 'description' => esc_html__( 'Change Icons.', 'shopbuilder' ), | |
| 103 | - 'condition' => [ | |
| 104 | - 'show_info_icon' => 'yes', | |
| 105 | - ], | |
| 106 | - ], | |
| 107 | - 'show_description' => [ | |
| 108 | - 'label' => esc_html__( 'Show Description?', 'shopbuilder' ), | |
| 109 | - 'type' => 'switch', | |
| 110 | - 'description' => esc_html__( 'Switch on to show Description.', 'shopbuilder' ), | |
| 111 | - 'default' => 'yes', | |
| 112 | - ], | |
| 113 | - 'description_text' => [ | |
| 114 | - 'label' => esc_html__( 'Description Text', 'shopbuilder' ), | |
| 115 | - 'type' => 'textarea', | |
| 116 | - 'description' => esc_html__( 'Write Description Text. Leave Empty for default text.', 'shopbuilder' ), | |
| 117 | - 'condition' => [ | |
| 118 | - 'show_description' => 'yes', | |
| 119 | - ], | |
| 120 | - ], | |
| 121 | - 'section_general_end' => [ | |
| 122 | - 'mode' => 'section_end', | |
| 123 | - ], | |
| 124 | - ]; | |
| 125 | - return $fields; | |
| 126 | - } | |
| 127 | - | |
| 128 | - /** | |
| 129 | - * Widget Field | |
| 130 | - * | |
| 131 | - * @return array | |
| 132 | - */ | |
| 133 | - public static function fields_settings() { | |
| 134 | - $fields = [ | |
| 135 | - 'fields_style_start' => [ | |
| 136 | - 'mode' => 'section_start', | |
| 137 | - 'tab' => 'style', | |
| 138 | - 'label' => esc_html__( 'Form Area', 'shopbuilder' ), | |
| 139 | - ], | |
| 140 | - 'fields_height' => [ | |
| 141 | - 'label' => esc_html__( 'Fields Height', 'shopbuilder' ), | |
| 142 | - 'type' => 'slider', | |
| 143 | - 'separator' => 'default', | |
| 144 | - 'range' => [ | |
| 145 | - 'px' => [ | |
| 146 | - 'min' => 10, | |
| 147 | - 'max' => 200, | |
| 148 | - ], | |
| 149 | - ], | |
| 150 | - 'selectors' => [ | |
| 151 | - self::$selectors['fields_height'] => 'height: {{SIZE}}{{UNIT}};', | |
| 152 | - ], | |
| 153 | - ], | |
| 154 | - 'fields_tabs_start' => [ | |
| 155 | - 'mode' => 'tabs_start', | |
| 156 | - ], | |
| 157 | - // Tab For normal view. | |
| 158 | - 'fields_normal' => [ | |
| 159 | - 'mode' => 'tab_start', | |
| 160 | - 'label' => esc_html__( 'Normal', 'shopbuilder' ), | |
| 161 | - ], | |
| 162 | - 'fields_border' => [ | |
| 163 | - 'mode' => 'group', | |
| 164 | - 'type' => 'border', | |
| 165 | - 'fields_options' => [ | |
| 166 | - 'border' => [ | |
| 167 | - 'label' => esc_html__( 'Field Border', 'shopbuilder' ), | |
| 168 | - ], | |
| 169 | - 'color' => [ | |
| 170 | - 'label' => esc_html__( 'Border Color', 'shopbuilder' ), | |
| 171 | - ], | |
| 172 | - ], | |
| 173 | - 'selector' => self::$selectors['fields_border'], | |
| 174 | - 'size_units' => [ 'px' ], | |
| 175 | - ], | |
| 176 | - 'form_fields_border_radius' => [ | |
| 177 | - 'label' => esc_html__( 'Border Radius (px)', 'shopbuilder' ), | |
| 178 | - 'type' => 'dimensions', | |
| 179 | - 'size_units' => [ 'px' ], | |
| 180 | - 'selectors' => [ | |
| 181 | - self::$selectors['form_fields_border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', | |
| 182 | - ], | |
| 183 | - ], | |
| 184 | - 'fields_text_color' => [ | |
| 185 | - 'label' => esc_html__( 'Text Color', 'shopbuilder' ), | |
| 186 | - 'type' => 'color', | |
| 187 | - | |
| 188 | - 'selectors' => [ | |
| 189 | - self::$selectors['fields_text_color'] => 'color: {{VALUE}};', | |
| 190 | - ], | |
| 191 | - ], | |
| 192 | - 'fields_bg_color' => [ | |
| 193 | - 'label' => esc_html__( 'Background Color', 'shopbuilder' ), | |
| 194 | - 'type' => 'color', | |
| 195 | - 'alpha' => true, | |
| 196 | - 'selectors' => [ | |
| 197 | - self::$selectors['fields_bg_color'] => 'background-color: {{VALUE}};', | |
| 198 | - ], | |
| 199 | - ], | |
| 200 | - 'fields_normal_end' => [ | |
| 201 | - 'mode' => 'tab_end', | |
| 202 | - ], | |
| 203 | - 'fields_hover' => [ | |
| 204 | - 'mode' => 'tab_start', | |
| 205 | - 'label' => esc_html__( 'Hover & Focus', 'shopbuilder' ), | |
| 206 | - ], | |
| 207 | - 'fields_hover_border' => [ | |
| 208 | - 'mode' => 'group', | |
| 209 | - 'type' => 'border', | |
| 210 | - 'selector' => self::$selectors['fields_hover_border'], | |
| 211 | - 'size_units' => [ 'px' ], | |
| 212 | - ], | |
| 213 | - 'form_fields_border_radius_hover' => [ | |
| 214 | - 'label' => esc_html__( 'Border Radius (px)', 'shopbuilder' ), | |
| 215 | - 'type' => 'dimensions', | |
| 216 | - 'size_units' => [ 'px' ], | |
| 217 | - 'selectors' => [ | |
| 218 | - self::$selectors['form_fields_border_radius_hover'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', | |
| 219 | - ], | |
| 220 | - ], | |
| 221 | - 'fields_hover_text_color' => [ | |
| 222 | - 'label' => esc_html__( 'Text Color', 'shopbuilder' ), | |
| 223 | - 'type' => 'color', | |
| 224 | - 'selectors' => [ | |
| 225 | - self::$selectors['fields_hover_text_color'] => 'color: {{VALUE}};', | |
| 226 | - ], | |
| 227 | - ], | |
| 228 | - 'fields_hover_bg_color' => [ | |
| 229 | - 'label' => esc_html__( 'Background Color', 'shopbuilder' ), | |
| 230 | - 'type' => 'color', | |
| 231 | - 'alpha' => true, | |
| 232 | - 'selectors' => [ | |
| 233 | - self::$selectors['fields_hover_bg_color'] => 'background-color: {{VALUE}};', | |
| 234 | - ], | |
| 235 | - ], | |
| 236 | - 'fields_hover_end' => [ | |
| 237 | - 'mode' => 'tab_end', | |
| 238 | - ], | |
| 239 | - 'fields_tabs_end' => [ | |
| 240 | - 'mode' => 'tabs_end', | |
| 241 | - ], | |
| 242 | - | |
| 243 | - 'fields_padding' => [ | |
| 244 | - 'label' => esc_html__( 'Fields Padding (px)', 'shopbuilder' ), | |
| 245 | - 'type' => 'dimensions', | |
| 246 | - 'mode' => 'responsive', | |
| 247 | - 'size_units' => [ 'px' ], | |
| 248 | - 'selectors' => [ | |
| 249 | - self::$selectors['fields_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', | |
| 250 | - ], | |
| 251 | - ], | |
| 252 | - 'fields_gap' => [ | |
| 253 | - 'label' => esc_html__( 'Fields Gap', 'shopbuilder' ), | |
| 254 | - 'type' => 'slider', | |
| 255 | - 'separator' => 'default', | |
| 256 | - 'range' => [ | |
| 257 | - 'px' => [ | |
| 258 | - 'min' => 0, | |
| 259 | - 'max' => 100, | |
| 260 | - ], | |
| 261 | - ], | |
| 262 | - 'selectors' => [ | |
| 263 | - self::$selectors['fields_gap'] => 'gap: {{SIZE}}{{UNIT}};', | |
| 264 | - ], | |
| 265 | - ], | |
| 266 | - 'form_margin' => [ | |
| 267 | - 'label' => esc_html__( 'Form Margin (px)', 'shopbuilder' ), | |
| 268 | - 'mode' => 'responsive', | |
| 269 | - 'type' => 'dimensions', | |
| 270 | - 'size_units' => [ 'px' ], | |
| 271 | - 'selectors' => [ | |
| 272 | - self::$selectors['form_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', | |
| 273 | - ], | |
| 274 | - ], | |
| 275 | - | |
| 276 | - 'form_area_wrapper_border' => [ | |
| 277 | - 'mode' => 'group', | |
| 278 | - 'type' => 'border', | |
| 279 | - 'fields_options' => [ | |
| 280 | - 'border' => [ | |
| 281 | - 'label' => esc_html__( 'Form Area Border', 'shopbuilder' ), | |
| 282 | - ], | |
| 283 | - 'color' => [ | |
| 284 | - 'label' => esc_html__( 'Border Color', 'shopbuilder' ), | |
| 285 | - ], | |
| 286 | - ], | |
| 287 | - 'selector' => self::$selectors['form_area_wrapper_border'], | |
| 288 | - 'size_units' => [ 'px' ], | |
| 289 | - ], | |
| 290 | - | |
| 291 | - 'form_area_padding' => [ | |
| 292 | - 'label' => esc_html__( 'Form Area Padding (px)', 'shopbuilder' ), | |
| 293 | - 'mode' => 'responsive', | |
| 294 | - 'type' => 'dimensions', | |
| 295 | - 'size_units' => [ 'px' ], | |
| 296 | - 'selectors' => [ | |
| 297 | - self::$selectors['form_area_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', | |
| 298 | - ], | |
| 299 | - ], | |
| 300 | - | |
| 301 | - 'form_area_margin' => [ | |
| 302 | - 'label' => esc_html__( 'Form Area Margin (px)', 'shopbuilder' ), | |
| 303 | - 'mode' => 'responsive', | |
| 304 | - 'type' => 'dimensions', | |
| 305 | - 'size_units' => [ 'px' ], | |
| 306 | - 'selectors' => [ | |
| 307 | - self::$selectors['form_area_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', | |
| 308 | - ], | |
| 309 | - ], | |
| 310 | - | |
| 311 | - 'form_area_border_radius' => [ | |
| 312 | - 'label' => esc_html__( 'Border Radius (px)', 'shopbuilder' ), | |
| 313 | - 'type' => 'dimensions', | |
| 314 | - 'size_units' => [ 'px' ], | |
| 315 | - 'selectors' => [ | |
| 316 | - self::$selectors['form_area_border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', | |
| 317 | - ], | |
| 318 | - ], | |
| 319 | - | |
| 320 | - 'fields_style_end' => [ | |
| 321 | - 'mode' => 'section_end', | |
| 322 | - ], | |
| 323 | - ]; | |
| 324 | - return $fields; | |
| 325 | - } | |
| 326 | -} | |
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * Main ProductDescription class. | |
| 4 | + * | |
| 5 | + * @package RadiusTheme\SB | |
| 6 | + */ | |
| 7 | + | |
| 8 | +namespace RadiusTheme\SB\Elementor\Widgets\Controls; | |
| 9 | + | |
| 10 | +use Elementor\Controls_Manager; | |
| 11 | +use RadiusTheme\SB\Helpers\Fns; | |
| 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 | + * Product Description class | |
| 20 | + */ | |
| 21 | +class CheckoutInfoBoxSettings | |
| 22 | +{ | |
| 23 | + /** | |
| 24 | + * Widget Control Selectors | |
| 25 | + * | |
| 26 | + * @var object | |
| 27 | + */ | |
| 28 | + private static $widget = []; | |
| 29 | + /** | |
| 30 | + * Widget Control Selectors | |
| 31 | + * | |
| 32 | + * @var array | |
| 33 | + */ | |
| 34 | + private static $selectors = []; | |
| 35 | + | |
| 36 | + /** | |
| 37 | + * Controls Settings | |
| 38 | + * | |
| 39 | + * @param object $widget widget object. | |
| 40 | + * @return array | |
| 41 | + */ | |
| 42 | + public static function widget_fields($widget) | |
| 43 | + { | |
| 44 | + self::$widget = $widget; | |
| 45 | + self::$selectors = self::$widget->selectors; | |
| 46 | + $fields = self::general_settings() | |
| 47 | + + InfoboxSettings::style_settings($widget) | |
| 48 | + + self::text_style_settings() | |
| 49 | + + self::fields_settings() | |
| 50 | + + ButtonSettings::style_settings($widget); | |
| 51 | + return $fields; | |
| 52 | + } | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * Widget Field | |
| 56 | + * | |
| 57 | + * @return array | |
| 58 | + */ | |
| 59 | + public static function text_style_settings() | |
| 60 | + { | |
| 61 | + $fields = TextStyleSettings::widget_fields(self::$widget); | |
| 62 | + $fields['section_style']['label'] = esc_html__('Description Style', 'shopbuilder'); | |
| 63 | + $fields['section_style']['tab'] = 'style'; | |
| 64 | + $fields['section_style']['condition'] = [ | |
| 65 | + 'show_description!' => '', | |
| 66 | + ]; | |
| 67 | + | |
| 68 | + $extra_controls['text_margin'] = [ | |
| 69 | + 'label' => esc_html__('Margin (px)', 'shopbuilder'), | |
| 70 | + 'type' => 'dimensions', | |
| 71 | + 'size_units' => ['px'], | |
| 72 | + 'selectors' => [ | |
| 73 | + self::$selectors['text_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', | |
| 74 | + ], | |
| 75 | + ]; | |
| 76 | + | |
| 77 | + $fields = Fns::insert_controls('section_style_end', $fields, $extra_controls); | |
| 78 | + | |
| 79 | + return $fields; | |
| 80 | + } | |
| 81 | + | |
| 82 | + /** | |
| 83 | + * Widget Field | |
| 84 | + * | |
| 85 | + * @return array | |
| 86 | + */ | |
| 87 | + public static function general_settings() | |
| 88 | + { | |
| 89 | + $fields = [ | |
| 90 | + 'section_general' => [ | |
| 91 | + 'mode' => 'section_start', | |
| 92 | + 'label' => esc_html__('General', 'shopbuilder'), | |
| 93 | + ], | |
| 94 | + 'show_description' => [ | |
| 95 | + 'label' => esc_html__('Show Description?', 'shopbuilder'), | |
| 96 | + 'type' => 'switch', | |
| 97 | + 'description' => esc_html__('Switch on to show Description.', 'shopbuilder'), | |
| 98 | + 'separator' => 'default', | |
| 99 | + 'default' => 'yes' | |
| 100 | + ], | |
| 101 | + 'description_text' => [ | |
| 102 | + 'label' => esc_html__('Description Text', 'shopbuilder'), | |
| 103 | + 'type' => 'textarea', | |
| 104 | + 'description' => esc_html__('Write Description Text. Leave Empty for default text.', 'shopbuilder'), | |
| 105 | + 'condition' => [ | |
| 106 | + 'show_description' => 'yes', | |
| 107 | + ], | |
| 108 | + ], | |
| 109 | + 'section_general_end' => [ | |
| 110 | + 'mode' => 'section_end', | |
| 111 | + ], | |
| 112 | + ]; | |
| 113 | + return $fields; | |
| 114 | + } | |
| 115 | + | |
| 116 | + /** | |
| 117 | + * Widget Field | |
| 118 | + * | |
| 119 | + * @return array | |
| 120 | + */ | |
| 121 | + public static function fields_settings() | |
| 122 | + { | |
| 123 | + $fields = [ | |
| 124 | + 'fields_style_start' => [ | |
| 125 | + 'mode' => 'section_start', | |
| 126 | + 'tab' => 'style', | |
| 127 | + 'label' => esc_html__('Form', 'shopbuilder'), | |
| 128 | + ], | |
| 129 | + 'fields_height' => [ | |
| 130 | + 'label' => esc_html__('Fields Height', 'shopbuilder'), | |
| 131 | + 'type' => 'slider', | |
| 132 | + 'separator' => 'default', | |
| 133 | + 'range' => [ | |
| 134 | + 'px' => [ | |
| 135 | + 'min' => 10, | |
| 136 | + 'max' => 200, | |
| 137 | + ], | |
| 138 | + ], | |
| 139 | + 'selectors' => [ | |
| 140 | + self::$selectors['fields_height'] => 'height: {{SIZE}}{{UNIT}};', | |
| 141 | + ], | |
| 142 | + ], | |
| 143 | + 'fields_tabs_start' => [ | |
| 144 | + 'mode' => 'tabs_start', | |
| 145 | + ], | |
| 146 | + // Tab For normal view. | |
| 147 | + 'fields_normal' => [ | |
| 148 | + 'mode' => 'tab_start', | |
| 149 | + 'label' => esc_html__('Normal', 'shopbuilder'), | |
| 150 | + ], | |
| 151 | + 'fields_border' => [ | |
| 152 | + 'mode' => 'group', | |
| 153 | + 'type' => 'border', | |
| 154 | + 'selector' => self::$selectors['fields_border'], | |
| 155 | + 'size_units' => ['px'], | |
| 156 | + ], | |
| 157 | + 'form_fields_border_radius' => [ | |
| 158 | + 'label' => esc_html__('Border Radius (px)', 'shopbuilder'), | |
| 159 | + 'type' => 'dimensions', | |
| 160 | + 'size_units' => ['px'], | |
| 161 | + 'selectors' => [ | |
| 162 | + self::$selectors['form_fields_border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', | |
| 163 | + ], | |
| 164 | + ], | |
| 165 | + 'fields_text_color' => [ | |
| 166 | + 'label' => esc_html__('Text Color', 'shopbuilder'), | |
| 167 | + 'type' => 'color', | |
| 168 | + | |
| 169 | + 'selectors' => [ | |
| 170 | + self::$selectors['fields_text_color'] => 'color: {{VALUE}};', | |
| 171 | + ], | |
| 172 | + ], | |
| 173 | + 'fields_bg_color' => [ | |
| 174 | + 'label' => esc_html__('Background Color', 'shopbuilder'), | |
| 175 | + 'type' => 'color', | |
| 176 | + 'alpha' => true, | |
| 177 | + 'selectors' => [ | |
| 178 | + self::$selectors['fields_bg_color'] => 'background-color: {{VALUE}};', | |
| 179 | + ], | |
| 180 | + ], | |
| 181 | + 'fields_normal_end' => [ | |
| 182 | + 'mode' => 'tab_end', | |
| 183 | + ], | |
| 184 | + 'fields_hover' => [ | |
| 185 | + 'mode' => 'tab_start', | |
| 186 | + 'label' => esc_html__('Hover & Focus', 'shopbuilder'), | |
| 187 | + ], | |
| 188 | + 'fields_hover_border' => [ | |
| 189 | + 'mode' => 'group', | |
| 190 | + 'type' => 'border', | |
| 191 | + 'selector' => self::$selectors['fields_hover_border'], | |
| 192 | + 'size_units' => ['px'], | |
| 193 | + ], | |
| 194 | + 'form_fields_border_radius_hover' => [ | |
| 195 | + 'label' => esc_html__('Border Radius (px)', 'shopbuilder'), | |
| 196 | + 'type' => 'dimensions', | |
| 197 | + 'size_units' => ['px'], | |
| 198 | + 'selectors' => [ | |
| 199 | + self::$selectors['form_fields_border_radius_hover'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', | |
| 200 | + ], | |
| 201 | + ], | |
| 202 | + 'fields_hover_text_color' => [ | |
| 203 | + 'label' => esc_html__('Text Color', 'shopbuilder'), | |
| 204 | + 'type' => 'color', | |
| 205 | + 'selectors' => [ | |
| 206 | + self::$selectors['fields_hover_text_color'] => 'color: {{VALUE}};', | |
| 207 | + ], | |
| 208 | + ], | |
| 209 | + 'fields_hover_bg_color' => [ | |
| 210 | + 'label' => esc_html__('Background Color', 'shopbuilder'), | |
| 211 | + 'type' => 'color', | |
| 212 | + 'alpha' => true, | |
| 213 | + 'selectors' => [ | |
| 214 | + self::$selectors['fields_hover_bg_color'] => 'background-color: {{VALUE}};', | |
| 215 | + ], | |
| 216 | + ], | |
| 217 | + 'fields_hover_end' => [ | |
| 218 | + 'mode' => 'tab_end', | |
| 219 | + ], | |
| 220 | + 'fields_tabs_end' => [ | |
| 221 | + 'mode' => 'tabs_end', | |
| 222 | + ], | |
| 223 | + 'fields_padding' => [ | |
| 224 | + 'label' => esc_html__('Fields Padding (px)', 'shopbuilder'), | |
| 225 | + 'type' => 'dimensions', | |
| 226 | + 'mode' => 'responsive', | |
| 227 | + 'size_units' => ['px'], | |
| 228 | + 'selectors' => [ | |
| 229 | + self::$selectors['fields_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', | |
| 230 | + ], | |
| 231 | + ], | |
| 232 | + 'fields_gap' => [ | |
| 233 | + 'label' => esc_html__('Fields Gap', 'shopbuilder'), | |
| 234 | + 'type' => 'slider', | |
| 235 | + 'separator' => 'default', | |
| 236 | + 'range' => [ | |
| 237 | + 'px' => [ | |
| 238 | + 'min' => 0, | |
| 239 | + 'max' => 100, | |
| 240 | + ], | |
| 241 | + ], | |
| 242 | + 'selectors' => [ | |
| 243 | + self::$selectors['fields_gap'] => 'gap: {{SIZE}}{{UNIT}};', | |
| 244 | + ], | |
| 245 | + ], | |
| 246 | + 'form_margin' => [ | |
| 247 | + 'label' => esc_html__('Form Margin (px)', 'shopbuilder'), | |
| 248 | + 'mode' => 'responsive', | |
| 249 | + 'type' => 'dimensions', | |
| 250 | + 'size_units' => ['px'], | |
| 251 | + 'selectors' => [ | |
| 252 | + self::$selectors['form_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', | |
| 253 | + ], | |
| 254 | + ], | |
| 255 | + | |
| 256 | + 'fields_style_end' => [ | |
| 257 | + 'mode' => 'section_end', | |
| 258 | + ], | |
| 259 | + ]; | |
| 260 | + return $fields; | |
| 261 | + } | |
| 262 | +} | |