← All changes
|
modules/atomic-widgets/styles/style-schema.php
+5
-50
4.3.0-beta3
→
4.0.8
View file →
| @@ -10,15 +10,13 @@ | ||
| 10 | 10 | use Elementor\Modules\AtomicWidgets\PropTypes\Border_Radius_Prop_Type; |
| 11 | 11 | use Elementor\Modules\AtomicWidgets\PropTypes\Border_Width_Prop_Type; |
| 12 | 12 | use Elementor\Modules\AtomicWidgets\PropTypes\Color_Prop_Type; |
| 13 | 13 | use Elementor\Modules\AtomicWidgets\PropTypes\Dimensions_Prop_Type; |
| 14 | -use Elementor\Modules\AtomicWidgets\PropTypes\Font_Family_Prop_Type; | |
| 15 | 14 | use Elementor\Modules\AtomicWidgets\PropTypes\Filters\Backdrop_Filter_Prop_Type; |
| 16 | 15 | use Elementor\Modules\AtomicWidgets\PropTypes\Filters\Filter_Prop_Type; |
| 17 | 16 | use Elementor\Modules\AtomicWidgets\PropTypes\Layout_Direction_Prop_Type; |
| 18 | 17 | use Elementor\Modules\AtomicWidgets\PropTypes\Position_Prop_Type; |
| 19 | 18 | use Elementor\Modules\AtomicWidgets\PropTypes\Primitives\Number_Prop_Type; |
| 20 | -use Elementor\Modules\AtomicWidgets\PropTypes\Grid_Track_Size_Prop_Type; | |
| 21 | 19 | use Elementor\Modules\AtomicWidgets\PropTypes\Size_Prop_Type; |
| 22 | 20 | use Elementor\Modules\AtomicWidgets\PropTypes\Primitives\String_Prop_Type; |
| 23 | 21 | use Elementor\Modules\AtomicWidgets\PropTypes\Stroke_Prop_Type; |
| 24 | 22 | use Elementor\Modules\AtomicWidgets\PropTypes\Transform\Transform_Prop_Type; |
| @@ -25,9 +23,8 @@ | ||
| 25 | 23 | use Elementor\Modules\AtomicWidgets\PropTypes\Transition_Prop_Type; |
| 26 | 24 | use Elementor\Modules\AtomicWidgets\PropTypes\Union_Prop_Type; |
| 27 | 25 | use Elementor\Modules\AtomicWidgets\PropTypes\Flex_Prop_Type; |
| 28 | 26 | use Elementor\Modules\AtomicWidgets\PropDependencies\Manager as Dependency_Manager; |
| 29 | -use Elementor\Modules\AtomicWidgets\PropTypes\Span_Prop_Type; | |
| 30 | 27 | |
| 31 | 28 | if ( ! defined( 'ABSPATH' ) ) { |
| 32 | 29 | exit; // Exit if accessed directly. |
| 33 | 30 | } |
| @@ -92,20 +89,8 @@ | ||
| 92 | 89 | ]; |
| 93 | 90 | } |
| 94 | 91 | |
| 95 | 92 | private static function get_position_props() { |
| 96 | - $non_static_dependency = Dependency_Manager::make( Dependency_Manager::RELATION_AND ) | |
| 97 | - ->where( [ | |
| 98 | - 'operator' => 'exists', | |
| 99 | - 'path' => [ 'position' ], | |
| 100 | - ] ) | |
| 101 | - ->where( [ | |
| 102 | - 'operator' => 'ne', | |
| 103 | - 'path' => [ 'position' ], | |
| 104 | - 'value' => 'static', | |
| 105 | - ] ) | |
| 106 | - ->get(); | |
| 107 | - | |
| 108 | 93 | return [ |
| 109 | 94 | 'position' => String_Prop_Type::make()->enum( [ |
| 110 | 95 | 'static', |
| 111 | 96 | 'relative', |
| @@ -112,20 +97,12 @@ | ||
| 112 | 97 | 'absolute', |
| 113 | 98 | 'fixed', |
| 114 | 99 | 'sticky', |
| 115 | 100 | ] )->description( 'The CSS position property specifies the type of positioning method used for an element (static, relative, absolute, fixed, or sticky).' ), |
| 116 | - 'inset-block-start' => Size_Prop_Type::make() | |
| 117 | - ->description( 'Size PropType for the inset-block-start CSS property' ) | |
| 118 | - ->set_dependencies( $non_static_dependency ), | |
| 119 | - 'inset-inline-end' => Size_Prop_Type::make() | |
| 120 | - ->description( 'Size PropType for the inset-inline-end CSS property' ) | |
| 121 | - ->set_dependencies( $non_static_dependency ), | |
| 122 | - 'inset-block-end' => Size_Prop_Type::make() | |
| 123 | - ->description( 'Size PropType for the inset-block-end CSS property' ) | |
| 124 | - ->set_dependencies( $non_static_dependency ), | |
| 125 | - 'inset-inline-start' => Size_Prop_Type::make() | |
| 126 | - ->description( 'Size PropType for the inset-inline-start CSS property' ) | |
| 127 | - ->set_dependencies( $non_static_dependency ), | |
| 101 | + 'inset-block-start' => Size_Prop_Type::make()->description( 'Size PropType for the inset-block-start CSS property' ), | |
| 102 | + 'inset-inline-end' => Size_Prop_Type::make()->description( 'Size PropType for the inset-inline-end CSS property' ), | |
| 103 | + 'inset-block-end' => Size_Prop_Type::make()->description( 'Size PropType for the inset-block-end CSS property' ), | |
| 104 | + 'inset-inline-start' => Size_Prop_Type::make()->description( 'Size PropType for the inset-inline-start CSS property' ), | |
| 128 | 105 | 'z-index' => Number_Prop_Type::make() |
| 129 | 106 | ->description( 'The z-index CSS property sets the z-order of a positioned element and its descendants or flex items. It specifies the stack order of elements.' ), |
| 130 | 107 | 'scroll-margin-top' => Size_Prop_Type::make()->units( Size_Constants::anchor_offset() ), |
| 131 | 108 | ]; |
| @@ -132,10 +109,9 @@ | ||
| 132 | 109 | } |
| 133 | 110 | |
| 134 | 111 | private static function get_typography_props() { |
| 135 | 112 | return [ |
| 136 | - 'font-family' => Font_Family_Prop_Type::make() | |
| 137 | - ->description( 'The font family of the text content.' ), | |
| 113 | + 'font-family' => String_Prop_Type::make()->description( 'The font family of the text content.' ), | |
| 138 | 114 | 'font-weight' => String_Prop_Type::make()->enum( [ |
| 139 | 115 | '100', |
| 140 | 116 | '200', |
| 141 | 117 | '300', |
| @@ -345,29 +321,8 @@ | ||
| 345 | 321 | 'nowrap', |
| 346 | 322 | 'wrap-reverse', |
| 347 | 323 | ] )->description( 'Specifies whether the flex items should wrap or not. CSS values: wrap, nowrap, wrap-reverse' ), |
| 348 | 324 | 'flex' => Flex_Prop_Type::make(), |
| 349 | - 'grid-template-columns' => Union_Prop_Type::make() | |
| 350 | - ->add_prop_type( String_Prop_Type::make() ) | |
| 351 | - ->add_prop_type( Grid_Track_Size_Prop_Type::make()->units( Size_Constants::grid_track() ) ), | |
| 352 | - 'grid-template-rows' => Union_Prop_Type::make() | |
| 353 | - ->add_prop_type( String_Prop_Type::make() ) | |
| 354 | - ->add_prop_type( Grid_Track_Size_Prop_Type::make()->units( Size_Constants::grid_track() ) ), | |
| 355 | - 'grid-auto-flow' => String_Prop_Type::make() | |
| 356 | - ->enum( [ 'row', 'column', 'row dense', 'column dense' ] ) | |
| 357 | - ->description( 'Controls how auto-placed items flow in the grid. CSS values: row, column, row dense, column dense.' ), | |
| 358 | - 'grid-auto-rows' => Size_Prop_Type::make() | |
| 359 | - ->units( Size_Constants::grid_auto_track() ) | |
| 360 | - ->default_unit( Size_Constants::UNIT_FR ), | |
| 361 | - 'grid-auto-columns' => Size_Prop_Type::make() | |
| 362 | - ->units( Size_Constants::grid_auto_track() ) | |
| 363 | - ->default_unit( Size_Constants::UNIT_FR ), | |
| 364 | - 'grid-column' => Span_Prop_Type::make() | |
| 365 | - ->regex( '/^(?!.*https?:\/\/)(?!.*;).*$/' ) | |
| 366 | - ->description( 'Defines a grid item column placement. Accepts values like span N or any valid CSS grid-column value. Disallows URLs and semicolons.' ), | |
| 367 | - 'grid-row' => Span_Prop_Type::make() | |
| 368 | - ->regex( '/^(?!.*https?:\/\/)(?!.*;).*$/' ) | |
| 369 | - ->description( 'Defines a grid item row placement. Accepts values like span N or any valid CSS grid-row value. Disallows URLs and semicolons.' ), | |
| 370 | 325 | ]; |
| 371 | 326 | } |
| 372 | 327 | |
| 373 | 328 | private static function get_alignment_props() { |