← All changes
|
modules/atomic-widgets/styles/style-schema.php
+36
-4
4.0.9
→
4.1.0-beta1
View file →
| @@ -23,8 +23,9 @@ | ||
| 23 | 23 | use Elementor\Modules\AtomicWidgets\PropTypes\Transition_Prop_Type; |
| 24 | 24 | use Elementor\Modules\AtomicWidgets\PropTypes\Union_Prop_Type; |
| 25 | 25 | use Elementor\Modules\AtomicWidgets\PropTypes\Flex_Prop_Type; |
| 26 | 26 | use Elementor\Modules\AtomicWidgets\PropDependencies\Manager as Dependency_Manager; |
| 27 | +use Elementor\Modules\AtomicWidgets\PropTypes\Span_Prop_Type; | |
| 27 | 28 | |
| 28 | 29 | if ( ! defined( 'ABSPATH' ) ) { |
| 29 | 30 | exit; // Exit if accessed directly. |
| 30 | 31 | } |
| @@ -89,8 +90,20 @@ | ||
| 89 | 90 | ]; |
| 90 | 91 | } |
| 91 | 92 | |
| 92 | 93 | private static function get_position_props() { |
| 94 | + $non_static_dependency = Dependency_Manager::make( Dependency_Manager::RELATION_AND ) | |
| 95 | + ->where( [ | |
| 96 | + 'operator' => 'exists', | |
| 97 | + 'path' => [ 'position' ], | |
| 98 | + ] ) | |
| 99 | + ->where( [ | |
| 100 | + 'operator' => 'ne', | |
| 101 | + 'path' => [ 'position' ], | |
| 102 | + 'value' => 'static', | |
| 103 | + ] ) | |
| 104 | + ->get(); | |
| 105 | + | |
| 93 | 106 | return [ |
| 94 | 107 | 'position' => String_Prop_Type::make()->enum( [ |
| 95 | 108 | 'static', |
| 96 | 109 | 'relative', |
| @@ -97,12 +110,20 @@ | ||
| 97 | 110 | 'absolute', |
| 98 | 111 | 'fixed', |
| 99 | 112 | 'sticky', |
| 100 | 113 | ] )->description( 'The CSS position property specifies the type of positioning method used for an element (static, relative, absolute, fixed, or sticky).' ), |
| 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' ), | |
| 114 | + 'inset-block-start' => Size_Prop_Type::make() | |
| 115 | + ->description( 'Size PropType for the inset-block-start CSS property' ) | |
| 116 | + ->set_dependencies( $non_static_dependency ), | |
| 117 | + 'inset-inline-end' => Size_Prop_Type::make() | |
| 118 | + ->description( 'Size PropType for the inset-inline-end CSS property' ) | |
| 119 | + ->set_dependencies( $non_static_dependency ), | |
| 120 | + 'inset-block-end' => Size_Prop_Type::make() | |
| 121 | + ->description( 'Size PropType for the inset-block-end CSS property' ) | |
| 122 | + ->set_dependencies( $non_static_dependency ), | |
| 123 | + 'inset-inline-start' => Size_Prop_Type::make() | |
| 124 | + ->description( 'Size PropType for the inset-inline-start CSS property' ) | |
| 125 | + ->set_dependencies( $non_static_dependency ), | |
| 105 | 126 | 'z-index' => Number_Prop_Type::make() |
| 106 | 127 | ->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.' ), |
| 107 | 128 | 'scroll-margin-top' => Size_Prop_Type::make()->units( Size_Constants::anchor_offset() ), |
| 108 | 129 | ]; |
| @@ -321,8 +342,19 @@ | ||
| 321 | 342 | 'nowrap', |
| 322 | 343 | 'wrap-reverse', |
| 323 | 344 | ] )->description( 'Specifies whether the flex items should wrap or not. CSS values: wrap, nowrap, wrap-reverse' ), |
| 324 | 345 | 'flex' => Flex_Prop_Type::make(), |
| 346 | + 'grid-template-columns' => String_Prop_Type::make() | |
| 347 | + ->description( 'Defines the columns of a grid container. Accepts any valid CSS grid-template-columns value, e.g. repeat(3, 1fr) or 100px 200px auto.' ), | |
| 348 | + 'grid-template-rows' => String_Prop_Type::make() | |
| 349 | + ->description( 'Defines the rows of a grid container. Accepts any valid CSS grid-template-rows value, e.g. repeat(3, 1fr) or 100px 200px auto.' ), | |
| 350 | + 'grid-auto-flow' => String_Prop_Type::make() | |
| 351 | + ->enum( [ 'row', 'column', 'row dense', 'column dense' ] ) | |
| 352 | + ->description( 'Controls how auto-placed items flow in the grid. CSS values: row, column, row dense, column dense.' ), | |
| 353 | + 'grid-column' => Span_Prop_Type::make() | |
| 354 | + ->description( 'Defines a grid item column placement. Accepts values like span N or any valid CSS grid-column value.' ), | |
| 355 | + 'grid-row' => Span_Prop_Type::make() | |
| 356 | + ->description( 'Defines a grid item row placement. Accepts values like span N or any valid CSS grid-row value.' ), | |
| 325 | 357 | ]; |
| 326 | 358 | } |
| 327 | 359 | |
| 328 | 360 | private static function get_alignment_props() { |