PluginProbe
Elementor Website Builder – more than just a page builder / 3.31.4
Elementor Website Builder – more than just a page builder v3.31.4
4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 All 454 releases
← All changes | modules/atomic-widgets/styles/style-schema.php +59 -187 4.2.0-beta2 → 3.31.4 View file →
@@ -6,28 +6,24 @@
6 6 use Elementor\Modules\AtomicWidgets\PropTypes\Background_Image_Overlay_Prop_Type;
7 7 use Elementor\Modules\AtomicWidgets\PropTypes\Background_Overlay_Prop_Type;
8 8 use Elementor\Modules\AtomicWidgets\PropTypes\Background_Prop_Type;
9 9 use Elementor\Modules\AtomicWidgets\PropTypes\Box_Shadow_Prop_Type;
10 +use Elementor\Modules\AtomicWidgets\PropTypes\Filter_Prop_Type;
11 +use Elementor\Modules\AtomicWidgets\PropTypes\Backdrop_Filter_Prop_Type;
10 12 use Elementor\Modules\AtomicWidgets\PropTypes\Border_Radius_Prop_Type;
11 13 use Elementor\Modules\AtomicWidgets\PropTypes\Border_Width_Prop_Type;
12 14 use Elementor\Modules\AtomicWidgets\PropTypes\Color_Prop_Type;
13 15 use Elementor\Modules\AtomicWidgets\PropTypes\Dimensions_Prop_Type;
14 -use Elementor\Modules\AtomicWidgets\PropTypes\Font_Family_Prop_Type;
15 -use Elementor\Modules\AtomicWidgets\PropTypes\Filters\Backdrop_Filter_Prop_Type;
16 -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 -use Elementor\Modules\AtomicWidgets\PropTypes\Transition_Prop_Type;
26 23 use Elementor\Modules\AtomicWidgets\PropTypes\Union_Prop_Type;
27 24 use Elementor\Modules\AtomicWidgets\PropTypes\Flex_Prop_Type;
28 25 use Elementor\Modules\AtomicWidgets\PropDependencies\Manager as Dependency_Manager;
29 -use Elementor\Modules\AtomicWidgets\PropTypes\Span_Prop_Type;
30 26
31 27 if ( ! defined( 'ABSPATH' ) ) {
32 28 exit; // Exit if accessed directly.
33 29 }
@@ -47,26 +43,25 @@
47 43 self::get_background_props(),
48 44 self::get_effects_props(),
49 45 self::get_layout_props(),
50 46 self::get_alignment_props(),
51 - self::get_special_props(),
52 47 );
53 48 }
54 49
55 50 private static function get_size_props() {
56 51 return [
57 - 'width' => Size_Prop_Type::make()->description( 'The width of the element' ),
58 - 'height' => Size_Prop_Type::make()->description( 'The height of the element' ),
59 - 'min-width' => Size_Prop_Type::make()->description( 'The minimum width of the element' ),
60 - 'min-height' => Size_Prop_Type::make()->description( 'The minimum height of the element' ),
61 - 'max-width' => Size_Prop_Type::make()->description( 'The maximum width of the element' ),
62 - 'max-height' => Size_Prop_Type::make()->description( 'The maximum height of the element' ),
52 + 'width' => Size_Prop_Type::make(),
53 + 'height' => Size_Prop_Type::make(),
54 + 'min-width' => Size_Prop_Type::make(),
55 + 'min-height' => Size_Prop_Type::make(),
56 + 'max-width' => Size_Prop_Type::make(),
57 + 'max-height' => Size_Prop_Type::make(),
63 58 'overflow' => String_Prop_Type::make()->enum( [
64 59 'visible',
65 60 'hidden',
66 61 'auto',
67 - ] )->description( 'The overflow CSS property. CSS values: visible, hidden, auto' ),
68 - 'aspect-ratio' => String_Prop_Type::make()->description( 'Equivalent to CSS aspect-ration property' ),
62 + ] ),
63 + 'aspect-ratio' => String_Prop_Type::make(),
69 64 'object-fit' => String_Prop_Type::make()->enum( [
70 65 'fill',
71 66 'cover',
72 67 'contain',
@@ -71,9 +66,9 @@
71 66 'cover',
72 67 'contain',
73 68 'none',
74 69 'scale-down',
75 - ] )->description( 'The object-fit CSS. CSS values: fill, cover, contain, none, scale-down' ),
70 + ] ),
76 71 'object-position' => Union_Prop_Type::make()
77 72 ->add_prop_type( String_Prop_Type::make()->enum( Position_Prop_Type::get_position_enum_values() ) )
78 73 ->add_prop_type( Position_Prop_Type::make() )
79 74 ->set_dependencies(
@@ -92,20 +87,8 @@
92 87 ];
93 88 }
94 89
95 90 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 91 return [
109 92 'position' => String_Prop_Type::make()->enum( [
110 93 'static',
111 94 'relative',
@@ -111,31 +94,21 @@
111 94 'relative',
112 95 'absolute',
113 96 'fixed',
114 97 'sticky',
115 - ] )->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 ),
128 - 'z-index' => Number_Prop_Type::make()
129 - ->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 - 'scroll-margin-top' => Size_Prop_Type::make()->units( Size_Constants::anchor_offset() ),
98 + ] ),
99 + 'inset-block-start' => Size_Prop_Type::make(),
100 + 'inset-inline-end' => Size_Prop_Type::make(),
101 + 'inset-block-end' => Size_Prop_Type::make(),
102 + 'inset-inline-start' => Size_Prop_Type::make(),
103 + 'z-index' => Number_Prop_Type::make(),
104 + 'scroll-margin-top' => Size_Prop_Type::make(),
131 105 ];
132 106 }
133 107
134 108 private static function get_typography_props() {
135 109 return [
136 - 'font-family' => Font_Family_Prop_Type::make()
137 - ->description( 'The font family of the text content.' ),
110 + 'font-family' => String_Prop_Type::make(),
138 111 'font-weight' => String_Prop_Type::make()->enum( [
139 112 '100',
140 113 '200',
141 114 '300',
@@ -148,16 +121,14 @@
148 121 'normal',
149 122 'bold',
150 123 'bolder',
151 124 'lighter',
152 - ] )
153 - ->description( 'The weight (or boldness) of the font. Values should match css font-weight specifications.' ),
154 - 'font-size' => Size_Prop_Type::make()->units( Size_Constants::typography() )->description( 'The font size in Size PropType Format' ),
155 - 'color' => Color_Prop_Type::make()
156 - ->description( 'The text color, specified as a hex code, rgb(a), hsl(a), or a standard css color name.' ),
157 - 'letter-spacing' => Size_Prop_Type::make()->units( Size_Constants::typography() )->description( 'The spacing between letters in Size PropType format' ),
158 - 'word-spacing' => Size_Prop_Type::make()->units( Size_Constants::typography() )->description( 'The spacing between words in Size PropType format' ),
159 - 'column-count' => Number_Prop_Type::make()->description( 'The number of columns the text content should be divided into.' ),
125 + ] ),
126 + 'font-size' => Size_Prop_Type::make(),
127 + 'color' => Color_Prop_Type::make(),
128 + 'letter-spacing' => Size_Prop_Type::make(),
129 + 'word-spacing' => Size_Prop_Type::make(),
130 + 'column-count' => Number_Prop_Type::make(),
160 131 'column-gap' => Size_Prop_Type::make()
161 132 ->set_dependencies(
162 133 Dependency_Manager::make()
163 134 ->where( [
@@ -166,36 +137,32 @@
166 137 'value' => 1,
167 138 ] )
168 139 ->get()
169 140 ),
170 - 'line-height' => Size_Prop_Type::make()->units( Size_Constants::typography() )->description( 'The line height of the text content in Size PropType format' ),
141 + 'line-height' => Size_Prop_Type::make(),
171 142 'text-align' => String_Prop_Type::make()->enum( [
172 143 'start',
173 144 'center',
174 145 'end',
175 146 'justify',
176 - ] )
177 - ->description( 'The horizontal alignment of the text content. Allowed values: start, center, end, justify.' ),
147 + ] ),
178 148 'font-style' => String_Prop_Type::make()->enum( [
179 149 'normal',
180 150 'italic',
181 151 'oblique',
182 - ] )
183 - ->description( 'The font style of the text content. CSS values: normal, italic, oblique' ),
152 + ] ),
184 153 // TODO: validate text-decoration in more specific way [EDS-524]
185 - 'text-decoration' => String_Prop_Type::make()
186 - ->description( 'The text decoration style. CSS values like: none, underline, overline, line-through, blink, etc.' ),
154 + 'text-decoration' => String_Prop_Type::make(),
187 155 'text-transform' => String_Prop_Type::make()->enum( [
188 156 'none',
189 157 'capitalize',
190 158 'uppercase',
191 159 'lowercase',
192 - ] )
193 - ->description( 'Controls the capitalization of text. CSS values: none, capitalize, uppercase, lowercase' ),
160 + ] ),
194 161 'direction' => String_Prop_Type::make()->enum( [
195 162 'ltr',
196 163 'rtl',
197 - ] )->description( 'The text direction. CSS values: ltr (left to right), rtl (right to left)' ),
164 + ] ),
198 165 'stroke' => Stroke_Prop_Type::make(),
199 166 'all' => String_Prop_Type::make()->enum( [
200 167 'initial',
201 168 'inherit',
@@ -201,13 +168,12 @@
201 168 'inherit',
202 169 'unset',
203 170 'revert',
204 171 'revert-layer',
205 - ] )->description( 'The all CSS property. CSS values: initial, inherit, unset, revert, revert-layer' ),
172 + ] ),
206 173 'cursor' => String_Prop_Type::make()->enum( [
207 174 'pointer',
208 - ] )
209 - ->description( 'The type of cursor to be displayed when pointing over the element. E.g., pointer.' ),
175 + ] ),
210 176 ];
211 177 }
212 178
213 179 private static function get_spacing_props() {
@@ -212,21 +178,13 @@
212 178
213 179 private static function get_spacing_props() {
214 180 return [
215 181 'padding' => Union_Prop_Type::make()
216 - ->add_prop_type( Dimensions_Prop_Type::make_with_units( Size_Constants::spacing() ) )
217 - ->add_prop_type(
218 - Size_Prop_Type::make()
219 - ->units( Size_Constants::spacing() )
220 - ->description( 'Padding css in Size PropType format' )
221 - ),
182 + ->add_prop_type( Dimensions_Prop_Type::make() )
183 + ->add_prop_type( Size_Prop_Type::make() ),
222 184 'margin' => Union_Prop_Type::make()
223 - ->add_prop_type( Dimensions_Prop_Type::make_with_units( Size_Constants::spacing_margin() ) )
224 - ->add_prop_type(
225 - Size_Prop_Type::make()
226 - ->units( Size_Constants::spacing_margin() )
227 - ->description( 'Margin css in Size PropType format' )
228 - ),
185 + ->add_prop_type( Dimensions_Prop_Type::make() )
186 + ->add_prop_type( Size_Prop_Type::make() ),
229 187 ];
230 188 }
231 189
232 190 private static function get_border_props() {
@@ -231,14 +189,14 @@
231 189
232 190 private static function get_border_props() {
233 191 return [
234 192 'border-radius' => Union_Prop_Type::make()
235 - ->add_prop_type( Border_Radius_Prop_Type::make() )
236 - ->add_prop_type( Size_Prop_Type::make()->units( Size_Constants::border() ) ),
193 + ->add_prop_type( Size_Prop_Type::make() )
194 + ->add_prop_type( Border_Radius_Prop_Type::make() ),
237 195 'border-width' => Union_Prop_Type::make()
238 - ->add_prop_type( Border_Width_Prop_Type::make() )
239 - ->add_prop_type( Size_Prop_Type::make()->units( Size_Constants::border() ) ),
240 - 'border-color' => Color_Prop_Type::make()->description( 'The border color, specified as a hex code, rgb(a), hsl(a), or a standard css color name.' ),
196 + ->add_prop_type( Size_Prop_Type::make() )
197 + ->add_prop_type( Border_Width_Prop_Type::make() ),
198 + 'border-color' => Color_Prop_Type::make(),
241 199 'border-style' => String_Prop_Type::make()->enum( [
242 200 'none',
243 201 'hidden',
244 202 'dotted',
@@ -248,28 +206,9 @@
248 206 'groove',
249 207 'ridge',
250 208 'inset',
251 209 'outset',
252 - ] )
253 - ->description( 'The border style in CSS values' ),
254 - 'outline-width' => Size_Prop_Type::make()
255 - ->units( Size_Constants::border() )
256 - ->description( 'The width of the outline in Size PropType format' ),
257 - 'outline-color' => Color_Prop_Type::make()->description( 'The color of the outline, specified as a hex code, rgb(a), hsl(a), or a standard css color name.' ),
258 - 'outline-style' => String_Prop_Type::make()->enum( [
259 - 'none',
260 - 'hidden',
261 - 'dotted',
262 - 'dashed',
263 - 'solid',
264 - 'double',
265 - 'groove',
266 - 'ridge',
267 - 'inset',
268 - 'outset',
269 - ] )->description( 'The outline style in CSS values' ),
270 - 'outline-offset' => Size_Prop_Type::make()->units( Size_Constants::border() )->description( 'The offset of the outline, specified as a length in Size PropType format' ),
271 -
210 + ] ),
272 211 ];
273 212 }
274 213
275 214 private static function get_background_props() {
@@ -276,9 +215,9 @@
276 215 // Background image overlay as an exception
277 216 $background_prop_type = Background_Prop_Type::make();
278 217 $bg_overlay_prop_type = $background_prop_type->get_shape_field( Background_Overlay_Prop_Type::get_key() );
279 218 $bg_image_overlay_prop_type = $bg_overlay_prop_type->get_item_type()->get_prop_type( Background_Image_Overlay_Prop_Type::get_key() );
280 - Dynamic_Prop_Types_Mapping::make()->get_extended_schema( $bg_image_overlay_prop_type->get_shape() );
219 + Dynamic_Prop_Types_Mapping::make()->get_modified_prop_types( $bg_image_overlay_prop_type->get_shape() );
281 220 return [
282 221 'background' => $background_prop_type,
283 222 ];
284 223 }
@@ -284,35 +223,13 @@
284 223 }
285 224
286 225 private static function get_effects_props() {
287 226 return [
288 - 'mix-blend-mode' => String_Prop_Type::make()->enum( [
289 - 'normal',
290 - 'multiply',
291 - 'screen',
292 - 'overlay',
293 - 'darken',
294 - 'lighten',
295 - 'color-dodge',
296 - 'saturation',
297 - 'color',
298 - 'difference',
299 - 'exclusion',
300 - 'hue',
301 - 'luminosity',
302 - 'soft-light',
303 - 'hard-light',
304 - 'color-burn',
305 - ] )->description( 'Applied as mix-blend mode css effect.' ),
306 227 'box-shadow' => Box_Shadow_Prop_Type::make(),
307 - 'opacity' => Size_Prop_Type::make()
308 - ->description( 'The opacity of the element, specified as a percentage between 0 (fully transparent) and 100 (fully opaque).' )
309 - ->units( Size_Constants::opacity() )
310 - ->default_unit( Size_Constants::UNIT_PERCENT ),
228 + 'opacity' => Size_Prop_Type::make(),
311 229 'filter' => Filter_Prop_Type::make(),
312 230 'backdrop-filter' => Backdrop_Filter_Prop_Type::make(),
313 231 'transform' => Transform_Prop_Type::make(),
314 - 'transition' => Transition_Prop_Type::make(),
315 232 ];
316 233 }
317 234
318 235 private static function get_layout_props() {
@@ -327,47 +244,24 @@
327 244 'inline-grid',
328 245 'flow-root',
329 246 'none',
330 247 'contents',
331 - ] )->description( 'The CSS display property defines the display behavior (the type of rendering box) of an element.' ),
332 - 'flex-direction' => String_Prop_Type::make()
333 - ->description( 'The direction of the contained items.' )
334 - ->enum( [
335 - 'row',
336 - 'row-reverse',
337 - 'column',
338 - 'column-reverse',
339 - ] ),
248 + ] ),
249 + 'flex-direction' => String_Prop_Type::make()->enum( [
250 + 'row',
251 + 'row-reverse',
252 + 'column',
253 + 'column-reverse',
254 + ] ),
340 255 'gap' => Union_Prop_Type::make()
341 256 ->add_prop_type( Layout_Direction_Prop_Type::make() )
342 - ->add_prop_type( Size_Prop_Type::make()->units( Size_Constants::layout() ) ),
257 + ->add_prop_type( Size_Prop_Type::make() ),
343 258 'flex-wrap' => String_Prop_Type::make()->enum( [
344 259 'wrap',
345 260 'nowrap',
346 261 'wrap-reverse',
347 - ] )->description( 'Specifies whether the flex items should wrap or not. CSS values: wrap, nowrap, wrap-reverse' ),
262 + ] ),
348 263 '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 264 ];
371 265 }
372 266
373 267 private static function get_alignment_props() {
@@ -384,22 +278,9 @@
384 278 'space-between',
385 279 'space-around',
386 280 'space-evenly',
387 281 'stretch',
388 - ] )
389 - ->description( 'Defines how the browser distributes space between and around content items along the main-axis of a flex container. CSS values: center, start, end, flex-start, flex-end, left, right, normal, space-between, space-around, space-evenly, stretch' ),
390 - 'justify-items' => String_Prop_Type::make()->enum( [
391 - 'normal',
392 - 'stretch',
393 - 'center',
394 - 'start',
395 - 'end',
396 - 'flex-start',
397 - 'flex-end',
398 - 'left',
399 - 'right',
400 - 'anchor-center',
401 - ] )->description( 'Defines how the browser distributes space between and around content items along the inline axis of a grid container. CSS values: center, start, end, flex-start, flex-end, left, right' ),
282 + ] ),
402 283 'align-content' => String_Prop_Type::make()->enum( [
403 284 'center',
404 285 'start',
405 286 'end',
@@ -405,10 +286,9 @@
405 286 'end',
406 287 'space-between',
407 288 'space-around',
408 289 'space-evenly',
409 - ] )
410 - ->description( 'Aligns a flex container\'s lines within when there is extra space in the cross-axis. CSS values: center, start, end, space-between, space-around, space-evenly' ),
290 + ] ),
411 291 'align-items' => String_Prop_Type::make()->enum( [
412 292 'normal',
413 293 'stretch',
414 294 'center',
@@ -418,9 +298,9 @@
418 298 'flex-end',
419 299 'self-start',
420 300 'self-end',
421 301 'anchor-center',
422 - ] )->description( 'Defines the default behavior for how flex items are laid out along the cross axis on the current line. CSS values: normal, stretch, center, start, end, flex-start, flex-end, self-start, self-end, anchor-center' ),
302 + ] ),
423 303 'align-self' => String_Prop_Type::make()->enum( [
424 304 'auto',
425 305 'normal',
426 306 'center',
@@ -434,17 +314,9 @@
434 314 'baseline',
435 315 'first baseline',
436 316 'last baseline',
437 317 'stretch',
438 - ] )->description( 'Allows the default alignment (or the one specified by align-items) to be overridden for individual flex items. CSS values: auto, normal, center, start, end, self-start, self-end, flex-start, flex-end, anchor-center, baseline, first baseline, last baseline, stretch' ),
439 - 'order' => Number_Prop_Type::make()->description( 'Specifies the order of the flex items. Items with lower order values are displayed first.' ),
440 - ];
441 - }
442 -
443 - private static function get_special_props() {
444 - return [
445 - 'content' => String_Prop_Type::make()->description( 'The string content for pseudo-element content property' ),
446 - 'appearance' => String_Prop_Type::make()->enum( [ 'none', 'auto' ] )->description( 'The appearance of the element. CSS values: none, auto' ),
447 - 'clip-path' => String_Prop_Type::make()->description( 'The clip-path CSS property defines a shape to be used as clipping region.' ),
318 + ] ),
319 + 'order' => Number_Prop_Type::make(),
448 320 ];
449 321 }
450 322 }