| 1 |
<?php |
| 2 |
namespace Elementor\Modules\DesignSystemSync\Controls; |
| 3 |
|
| 4 |
use Elementor\Base_UI_Control; |
| 5 |
|
| 6 |
if ( ! defined( 'ABSPATH' ) ) { |
| 7 |
exit; |
| 8 |
} |
| 9 |
|
| 10 |
class V4_Typography_List extends Base_UI_Control { |
| 11 |
|
| 12 |
const TYPE = 'v4_typography_list'; |
| 13 |
|
| 14 |
public function get_type() { |
| 15 |
return self::TYPE; |
| 16 |
} |
| 17 |
|
| 18 |
public function content_template() { |
| 19 |
?> |
| 20 |
<label> |
| 21 |
<span class="elementor-control-title">{{{ data.label }}}</span> |
| 22 |
</label> |
| 23 |
<div class="elementor-repeater-fields-wrapper" role="list"> |
| 24 |
<# _.each( data.items, function( item ) { |
| 25 |
var title = item[ data.title_field ] || ''; |
| 26 |
#> |
| 27 |
<div class="elementor-repeater-fields" role="listitem"> |
| 28 |
<div class="elementor-repeater-row-controls e-v4-typography-list__row"> |
| 29 |
<span class="elementor-control-title e-v4-typography-list__title">{{{ title }}}</span> |
| 30 |
<button class="e-v4-typography-list__edit-btn" disabled> |
| 31 |
<i class="eicon-edit" aria-hidden="true"></i> |
| 32 |
</button> |
| 33 |
</div> |
| 34 |
</div> |
| 35 |
<# } ); #> |
| 36 |
</div> |
| 37 |
<?php |
| 38 |
} |
| 39 |
|
| 40 |
protected function get_default_settings() { |
| 41 |
return [ |
| 42 |
'items' => [], |
| 43 |
'title_field' => 'title', |
| 44 |
]; |
| 45 |
} |
| 46 |
} |
| 47 |
|