get_icon_styles(); $dropdown_icons = []; foreach ( $dropdown_svg as $key => & $dropdown_icon ) { $dropdown_icons[ $key ] = $dropdown_icon['label']; unset( $dropdown_icon['label'] ); } unset( $dropdown_icon ); $controls_default_config = array( 'css_suffix' => ' span', 'css_prefix' => tcb_selection_root() . ' ', ); $components = array( 'dynamic_dropdown' => array( 'config' => array( 'PlaceholderInput' => [ 'config' => [ 'label' => 'Placeholder', ], 'extends' => 'LabelInput', ], 'StyleChange' => array( 'config' => array( 'label' => __( 'Dropdown style', 'thrive-cb' ), 'preview' => [ 'key' => '', 'label' => 'default', ], ), ), 'Width' => array( 'config' => array( 'default' => '0', 'min' => '10', 'max' => '500', 'label' => __( 'Width', 'thrive-cb' ), 'um' => [ '%', 'px' ], 'css' => 'max-width', ), 'extends' => 'Slider', ), 'SelectStylePicker' => array( 'config' => array( 'label' => __( 'Choose dropdown style', 'thrive-cb' ), 'items' => array( 'default' => array( 'label' => __( 'Default', 'thrive-cb' ), ), 'style-1' => array( 'label' => __( 'Style 1', 'thrive-cb' ), ), 'style-2' => array( 'label' => __( 'Style 2', 'thrive-cb' ), ), 'style-3' => array( 'label' => __( 'Style 3', 'thrive-cb' ), ), 'style-4' => array( 'label' => __( 'Style 4', 'thrive-cb' ), ), 'style-5' => array( 'label' => __( 'Style 5', 'thrive-cb' ), ), 'style-6' => array( 'label' => __( 'Style 6', 'thrive-cb' ), ), 'style-7' => array( 'label' => __( 'Style 7', 'thrive-cb' ), ), 'style-8' => array( 'label' => __( 'Style 8', 'thrive-cb' ), ), 'style-9' => array( 'label' => __( 'Style 9', 'thrive-cb' ), ), 'style-10' => array( 'label' => __( 'Style 10', 'thrive-cb' ), ), 'style-11' => array( 'label' => __( 'Style 11', 'thrive-cb' ), ), 'style-12' => array( 'label' => __( 'Style 12', 'thrive-cb' ), ), 'style-13' => array( 'label' => __( 'Style 13', 'thrive-cb' ), ), 'style-14' => array( 'label' => __( 'Style 14', 'thrive-cb' ), ), 'style-15' => array( 'label' => __( 'Style 15', 'thrive-cb' ), ), ), 'default' => 'default', ), ), 'DropdownIcon' => array( 'config' => array( 'name' => __( 'Dropdown icon', 'thrive-cb' ), 'options' => $dropdown_icons, ), 'paths' => $dropdown_svg, ), 'DropdownAnimation' => array( 'config' => array( 'name' => __( 'Dropdown animation', 'thrive-cb' ), 'options' => array( '' => __( 'None (instant)', 'thrive-cb' ), 'da-fade' => __( 'Fade In and Out ', 'thrive-cb' ), 'da-slide' => __( 'Slide Down', 'thrive-cb' ), 'da-fold' => __( 'Fold Out', 'thrive-cb' ), ), ), 'extends' => 'Select', ), ), ), 'typography' => [ 'disabled_controls' => [ 'TextAlign' ], 'config' => [ 'FontSize' => $controls_default_config, 'FontColor' => $controls_default_config, 'FontFace' => $controls_default_config, 'LetterSpacing' => $controls_default_config, 'LineHeight' => $controls_default_config, 'TextAlign' => $controls_default_config, 'TextStyle' => $controls_default_config, 'TextTransform' => $controls_default_config, ], ], 'layout' => [ 'disabled_controls' => [ 'Width', 'Height', 'Alignment', '.tve-advanced-controls', ], ], 'animation' => [ 'hidden' => true, ], 'styles-templates' => [ 'config' => [ 'to' => 'select', ], ], 'responsive' => [ 'hidden' => true, ], 'borders' => array( 'config' => array( 'Borders' => array( 'css_prefix' => tcb_selection_root() . ' ', 'important' => true, ), 'Corners' => array( 'css_prefix' => tcb_selection_root() . ' ', 'important' => true, ), ), ), 'shadow' => array( 'config' => array( 'css_prefix' => tcb_selection_root() . ' ', 'important' => true, ), ), ); return array_merge( $components, $this->group_component() ); } public function get_icon_styles() { return [ 'style_1' => [ 'label' => 'Angle', 'up' => '', 'box' => '0 0 320 512', ], 'style_2' => [ 'label' => 'Chevron', 'up' => '', 'box' => '0 0 448 512', ], 'style_3' => [ 'label' => 'Caret', 'up' => '', 'box' => '0 0 320 512', ], 'style_4' => [ 'label' => 'Triangle', 'up' => '', 'box' => '0 0 320 512', ], ]; } }