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(
'lead_generation_state' => array(
'config' => array(
'DropdownPalettes' => array(
'config' => [],
'extends' => 'Palettes',
'important' => apply_filters( 'tcb_lg_color_inputs_important', true ),
),
'ShowLabel' => array(
'config' => array(
'label' => __( 'Show Label', 'thrive-cb' ),
),
'extends' => 'Switch',
),
'RowsWhenOpen' => array(
'config' => array(
'min' => 2,
'max' => 15,
'label' => __( 'Rows when open', 'thrive-cb' ),
'um' => [],
),
'extends' => 'Slider',
),
'Required' => array(
'config' => array(
'default' => false,
'label' => __( 'Required' ),
),
'extends' => 'Switch',
),
'Placeholder' => array(
'config' => array(
'label' => __( 'Include Placeholder', 'thrive-cb' ),
),
'extends' => 'Switch',
),
'PlaceholderInput' => [
'config' => [
'label' => 'Placeholder',
],
'extends' => 'LabelInput',
],
'OptionsList' => array(
'config' => array(
'sortable' => true,
'settings_icon' => 'pen-light',
'marked' => true,
'marking_text' => __( 'Set as default', 'thrive-cb' ),
'marking_icon' => 'check',
'marked_field' => 'default',
),
),
'StyleChange' => array(
'config' => array(
'label' => __( 'Dropdown Style', 'thrive-cb' ),
'preview' => [
'key' => '',
'label' => 'default',
],
),
),
'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',
),
'AnswerTag' => array(
'config' => array(
'default' => false,
'label' => __( 'Send answer as tag', 'thrive-cb' ),
'info' => true,
),
'extends' => 'Switch',
),
),
),
'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' => [],
'responsive' => [
'hidden' => 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',
],
];
}
}