controller-config.php
504 lines
| 1 | <?php |
| 2 | |
| 3 | return array ( |
| 4 | 'text' => array( |
| 5 | 'title' => __('Text', 'so-css'), |
| 6 | 'icon' => 'align-left', |
| 7 | 'controllers' => array( |
| 8 | array( |
| 9 | 'title' => __('Text Color', 'so-css'), |
| 10 | 'type' => 'color', |
| 11 | 'args' => array( |
| 12 | 'property' => 'color' |
| 13 | ) |
| 14 | ), |
| 15 | array( |
| 16 | 'title' => __('Font Size', 'so-css'), |
| 17 | 'type' => 'measurement', |
| 18 | 'args' => array( |
| 19 | 'property' => 'font-size', |
| 20 | 'defaultUnit' => 'px', |
| 21 | ) |
| 22 | ), |
| 23 | array( |
| 24 | 'title' => __('Line Height', 'so-css'), |
| 25 | 'type' => 'measurement', |
| 26 | 'args' => array( |
| 27 | 'property' => 'line-height', |
| 28 | 'defaultUnit' => 'em', |
| 29 | ) |
| 30 | ), |
| 31 | array( |
| 32 | 'title' => __('Font Weight', 'so-css'), |
| 33 | 'type' => 'select', |
| 34 | 'args' => array( |
| 35 | 'property' => 'font-weight', |
| 36 | 'options' => array( |
| 37 | 'normal' => __('Normal', 'so-css'), |
| 38 | 'bold' => __('Bold', 'so-css'), |
| 39 | 'bolder' => __('Bolder', 'so-css'), |
| 40 | 'lighter' => __('Lighter', 'so-css'), |
| 41 | '100' => '100', |
| 42 | '200' => '200', |
| 43 | '300' => '300', |
| 44 | '400' => '400', |
| 45 | '500' => '500', |
| 46 | '600' => '600', |
| 47 | '700' => '700', |
| 48 | '800' => '800', |
| 49 | '900' => '900', |
| 50 | ) |
| 51 | ) |
| 52 | ), |
| 53 | array( |
| 54 | 'title' => __('Font Style', 'so-css'), |
| 55 | 'type' => 'select', |
| 56 | 'args' => array( |
| 57 | 'property' => 'font-style', |
| 58 | 'options' => array( |
| 59 | 'none' => __('None', 'so-css'), |
| 60 | 'normal' => __('Normal', 'so-css'), |
| 61 | 'italic' => __('Italic', 'so-css'), |
| 62 | ), |
| 63 | 'option_icons' => array( |
| 64 | 'normal' => 'font', |
| 65 | 'italic' => 'italic', |
| 66 | ) |
| 67 | ) |
| 68 | ), |
| 69 | array( |
| 70 | 'title' => __('Text Decoration', 'so-css'), |
| 71 | 'type' => 'select', |
| 72 | 'args' => array( |
| 73 | 'property' => 'text-decoration', |
| 74 | 'options' => array( |
| 75 | 'none' => __('None', 'so-css'), |
| 76 | 'underline' => __('Underline', 'so-css'), |
| 77 | 'overline' => __('Overline', 'so-css'), |
| 78 | 'line-through' => __('Line Through', 'so-css'), |
| 79 | ), |
| 80 | 'option_icons' => array( |
| 81 | 'none' => 'font', |
| 82 | 'underline' => 'underline', |
| 83 | 'line-through' => 'strikethrough', |
| 84 | ) |
| 85 | ) |
| 86 | ), |
| 87 | array( |
| 88 | 'title' => __('Font Variant', 'so-css'), |
| 89 | 'type' => 'select', |
| 90 | 'args' => array( |
| 91 | 'property' => 'font-variant', |
| 92 | 'options' => array( |
| 93 | 'normal' => __('Normal', 'so-css'), |
| 94 | 'small-caps' => __('Small Caps', 'so-css'), |
| 95 | ) |
| 96 | ) |
| 97 | ), |
| 98 | array( |
| 99 | 'title' => __('Text Transform', 'so-css'), |
| 100 | 'type' => 'select', |
| 101 | 'args' => array( |
| 102 | 'property' => 'text-transform', |
| 103 | 'options' => array( |
| 104 | 'none' => __('None', 'so-css'), |
| 105 | 'capitalize' => __('Capitalize', 'so-css'), |
| 106 | 'uppercase' => __('Uppercase', 'so-css'), |
| 107 | 'lowercase' => __('Lowercase', 'so-css'), |
| 108 | ) |
| 109 | ) |
| 110 | ), |
| 111 | array( |
| 112 | 'title' => __('Font Family', 'so-css'), |
| 113 | 'type' => 'font-select', |
| 114 | 'args' => array( |
| 115 | 'property' => 'font-family', |
| 116 | ) |
| 117 | ), |
| 118 | array( |
| 119 | 'title' => __('Text Align', 'so-css'), |
| 120 | 'type' => 'select', |
| 121 | 'args' => array( |
| 122 | 'property' => 'text-align', |
| 123 | 'options' => array( |
| 124 | 'left' => __('Left', 'so-css'), |
| 125 | 'right' => __('Right', 'so-css'), |
| 126 | 'center' => __('Center', 'so-css'), |
| 127 | 'justify' => __('Justify', 'so-css'), |
| 128 | ), |
| 129 | 'option_icons' => array( |
| 130 | 'left' => 'align-left', |
| 131 | 'right' => 'align-right', |
| 132 | 'center' => 'align-center', |
| 133 | 'justify' => 'align-justify', |
| 134 | ) |
| 135 | ) |
| 136 | ), |
| 137 | array( |
| 138 | 'title' => __('Text Indent', 'so-css'), |
| 139 | 'type' => 'measurement', |
| 140 | 'args' => array( |
| 141 | 'property' => 'text-indent' |
| 142 | ) |
| 143 | ), |
| 144 | array( |
| 145 | 'title' => __('Letter Spacing', 'so-css'), |
| 146 | 'type' => 'measurement', |
| 147 | 'args' => array( |
| 148 | 'property' => 'letter-spacing' |
| 149 | ) |
| 150 | ), |
| 151 | array( |
| 152 | 'title' => __('Word Spacing', 'so-css'), |
| 153 | 'type' => 'measurement', |
| 154 | 'args' => array( |
| 155 | 'property' => 'word-spacing' |
| 156 | ) |
| 157 | ), |
| 158 | array( |
| 159 | 'title' => __('White Space', 'so-css'), |
| 160 | 'type' => 'select', |
| 161 | 'args' => array( |
| 162 | 'property' => 'white-space', |
| 163 | 'options' => array( |
| 164 | 'normal' => __('Normal', 'so-css'), |
| 165 | 'encountered' => __('Encountered', 'so-css'), |
| 166 | 'pre' => __('Pre', 'so-css'), |
| 167 | 'pre-line' => __('Pre Line', 'so-css'), |
| 168 | 'pre-wrap' => __('Pre Wrap', 'so-css'), |
| 169 | ) |
| 170 | ) |
| 171 | ), |
| 172 | array( |
| 173 | 'title' => __('Text Shadow', 'so-css'), |
| 174 | 'type' => 'shadow', |
| 175 | 'args' => array( |
| 176 | 'property' => 'text-shadow', |
| 177 | ) |
| 178 | ), |
| 179 | ) |
| 180 | ), |
| 181 | |
| 182 | ////////////////////////////////////////////////////////////////////// |
| 183 | |
| 184 | 'decoration' => array( |
| 185 | 'title' => __('Decoration', 'so-css'), |
| 186 | 'icon' => 'eyedropper', |
| 187 | 'controllers' => array( |
| 188 | array( |
| 189 | 'title' => __('Background Color', 'so-css'), |
| 190 | 'type' => 'color', |
| 191 | 'args' => array( |
| 192 | 'property' => 'background-color' |
| 193 | ) |
| 194 | ), |
| 195 | array( |
| 196 | 'title' => __('Background image', 'so-css'), |
| 197 | 'type' => 'image', |
| 198 | 'args' => array( |
| 199 | 'property' => 'background-image', |
| 200 | 'value' => 'url("{{url}}")', |
| 201 | ) |
| 202 | ), |
| 203 | array( |
| 204 | 'title' => __('Background Position', 'so-css'), |
| 205 | 'type' => 'position', |
| 206 | 'args' => array( |
| 207 | 'property' => 'background-position' |
| 208 | ) |
| 209 | ), |
| 210 | array( |
| 211 | 'title' => __('Background Repeat', 'so-css'), |
| 212 | 'type' => 'select', |
| 213 | 'args' => array( |
| 214 | 'property' => 'background-repeat', |
| 215 | 'options' => array( |
| 216 | 'repeat' => __( 'repeat', 'so-css' ), |
| 217 | 'repeat-x' => __( 'repeat-x', 'so-css' ), |
| 218 | 'repeat-y' => __( 'repeat-y', 'so-css' ), |
| 219 | 'no-repeat' => __( 'no-repeat', 'so-css' ), |
| 220 | ) |
| 221 | ) |
| 222 | ), |
| 223 | array( |
| 224 | 'title' => __('Background Size', 'so-css'), |
| 225 | 'type' => 'select', |
| 226 | 'args' => array( |
| 227 | 'property' => 'background-size', |
| 228 | 'options' => array( |
| 229 | 'auto' => __( 'auto', 'so-css' ), |
| 230 | 'length' => __( 'length', 'so-css' ), |
| 231 | 'percentage' => __( 'percentage', 'so-css' ), |
| 232 | 'cover' => __( 'cover', 'so-css' ), |
| 233 | 'contain' => __( 'contain', 'so-css' ), |
| 234 | ) |
| 235 | ) |
| 236 | ), |
| 237 | |
| 238 | array( |
| 239 | 'title' => __('Box Shadow', 'so-css'), |
| 240 | 'type' => 'shadow', |
| 241 | 'args' => array( |
| 242 | 'property' => 'box-shadow', |
| 243 | ) |
| 244 | ), |
| 245 | |
| 246 | array( |
| 247 | 'title' => __('Opacity', 'so-css'), |
| 248 | 'type' => 'number', |
| 249 | 'args' => array( |
| 250 | 'property' => 'opacity', |
| 251 | 'default' => 1, |
| 252 | 'min' => 0, |
| 253 | 'max' => 1, |
| 254 | 'increment' => 0.05, |
| 255 | 'decrement' => -0.05, |
| 256 | ) |
| 257 | ), |
| 258 | |
| 259 | array( |
| 260 | 'title' => __('Borders', 'so-css'), |
| 261 | 'type' => 'sides', |
| 262 | 'args' => array( |
| 263 | 'controllers' => array( |
| 264 | array( |
| 265 | 'type' => 'measurement', |
| 266 | 'args' => array( |
| 267 | 'property' => 'border-{dir}-width', |
| 268 | 'propertyAll' => 'border-width', |
| 269 | 'defaultUnit' => 'px' |
| 270 | ) |
| 271 | ), |
| 272 | array( |
| 273 | 'type' => 'select', |
| 274 | 'args' => array( |
| 275 | 'property' => 'border-{dir}-style', |
| 276 | 'propertyAll' => 'border-style', |
| 277 | 'options' => array( |
| 278 | 'hidden' => 'Hidden', |
| 279 | 'dotted' => 'Dotted', |
| 280 | 'dashed' => 'Dashed', |
| 281 | 'solid' => 'Solid', |
| 282 | 'double' => 'Double', |
| 283 | 'groove' => 'Groove', |
| 284 | 'ridge' => 'Ridge', |
| 285 | 'inset' => 'Inset', |
| 286 | 'outset' => 'Outset', |
| 287 | ) |
| 288 | ) |
| 289 | ), |
| 290 | array( |
| 291 | 'type' => 'color', |
| 292 | 'args' => array( |
| 293 | 'property' => 'border-{dir}-color', |
| 294 | 'propertyAll' => 'border-color', |
| 295 | ) |
| 296 | ), |
| 297 | ), |
| 298 | 'hasAll' => true |
| 299 | ) |
| 300 | ), |
| 301 | |
| 302 | ) |
| 303 | ), |
| 304 | |
| 305 | ////////////////////////////////////////////////////////////////////// |
| 306 | |
| 307 | 'layout' => array( |
| 308 | 'title' => __('Layout', 'so-css'), |
| 309 | 'icon' => 'columns', |
| 310 | 'controllers' => array( |
| 311 | array( |
| 312 | 'title' => __('Margin', 'so-css'), |
| 313 | 'type' => 'sides', |
| 314 | 'args' => array( |
| 315 | 'controllers' => array( |
| 316 | array( |
| 317 | 'type' => 'measurement', |
| 318 | 'args' => array( |
| 319 | 'property' => 'margin-{dir}', |
| 320 | 'propertyAll' => 'margin', |
| 321 | 'defaultUnit' => 'px' |
| 322 | ) |
| 323 | ) |
| 324 | ), |
| 325 | 'hasAll' => true |
| 326 | ) |
| 327 | ), |
| 328 | array( |
| 329 | 'title' => __('Padding', 'so-css'), |
| 330 | 'type' => 'sides', |
| 331 | 'args' => array( |
| 332 | 'controllers' => array( |
| 333 | array( |
| 334 | 'type' => 'measurement', |
| 335 | 'args' => array( |
| 336 | 'property' => 'padding-{dir}', |
| 337 | 'propertyAll' => 'padding', |
| 338 | 'defaultUnit' => 'px' |
| 339 | ) |
| 340 | ) |
| 341 | ), |
| 342 | 'hasAll' => true |
| 343 | ) |
| 344 | ), |
| 345 | array( |
| 346 | 'title' => __('Position', 'so-css'), |
| 347 | 'type' => 'select', |
| 348 | 'args' => array( |
| 349 | 'property' => 'position', |
| 350 | 'options' => array( |
| 351 | 'absolute' => __( 'Absolute', 'so-css' ), |
| 352 | 'fixed' => __( 'Fixed', 'so-css' ), |
| 353 | 'relative' => __( 'Relative', 'so-css' ), |
| 354 | 'static' => __( 'Static', 'so-css' ), |
| 355 | 'inherit' => __( 'Inherit', 'so-css' ), |
| 356 | ) |
| 357 | ) |
| 358 | ), |
| 359 | array( |
| 360 | 'title' => __('Absolute Position', 'so-css'), |
| 361 | 'type' => 'sides', |
| 362 | 'args' => array( |
| 363 | 'controllers' => array( |
| 364 | array( |
| 365 | 'type' => 'measurement', |
| 366 | 'args' => array( |
| 367 | 'property' => '{dir}', |
| 368 | 'defaultUnit' => 'px' |
| 369 | ) |
| 370 | ) |
| 371 | ), |
| 372 | 'hasAll' => false |
| 373 | ) |
| 374 | ), |
| 375 | array( |
| 376 | 'title' => __('Width', 'so-css'), |
| 377 | 'type' => 'measurement', |
| 378 | 'args' => array( |
| 379 | 'property' => 'width', |
| 380 | 'defaultUnit' => 'px', |
| 381 | ) |
| 382 | ), |
| 383 | array( |
| 384 | 'title' => __('Height', 'so-css'), |
| 385 | 'type' => 'measurement', |
| 386 | 'args' => array( |
| 387 | 'property' => 'height', |
| 388 | 'defaultUnit' => '%', |
| 389 | ) |
| 390 | ), |
| 391 | array( |
| 392 | 'title' => __('Display', 'so-css'), |
| 393 | 'type' => 'select', |
| 394 | 'args' => array( |
| 395 | 'property' => 'display', |
| 396 | 'options' => array( |
| 397 | 'none' => __( 'None', 'so-css'), |
| 398 | 'inline' => __( 'Inline', 'so-css'), |
| 399 | 'block' => __( 'Block', 'so-css'), |
| 400 | 'flex' => __( 'Flex', 'so-css'), |
| 401 | 'inline-block' => __( 'Inline Block', 'so-css'), |
| 402 | 'inline-flex' => __( 'Inline Flex', 'so-css'), |
| 403 | 'inline-table' => __( 'Inline Table', 'so-css'), |
| 404 | 'list-item' => __( 'List Item', 'so-css'), |
| 405 | 'run-in' => __( 'Run In', 'so-css'), |
| 406 | 'table' => __( 'Table', 'so-css'), |
| 407 | 'table-caption' => __( 'Table Caption', 'so-css'), |
| 408 | 'table-column-group' => __( 'Table Column Group', 'so-css'), |
| 409 | 'table-header-group' => __( 'Table Header Group', 'so-css'), |
| 410 | 'table-footer-group' => __( 'Table Footer Group', 'so-css'), |
| 411 | 'table-row-group' => __( 'Table Row Group', 'so-css'), |
| 412 | 'table-cell' => __( 'Table Cell', 'so-css'), |
| 413 | 'table-column' => __( 'Table Column', 'so-css'), |
| 414 | 'table-row' => __( 'Table Row', 'so-css'), |
| 415 | ) |
| 416 | ) |
| 417 | ), |
| 418 | array( |
| 419 | 'title' => __('Float', 'so-css'), |
| 420 | 'type' => 'select', |
| 421 | 'args' => array( |
| 422 | 'property' => 'float', |
| 423 | 'options' => array( |
| 424 | 'none' => __( 'None', 'so-css'), |
| 425 | 'left' => __( 'Left', 'so-css'), |
| 426 | 'right' => __( 'Right', 'so-css'), |
| 427 | ) |
| 428 | ) |
| 429 | ), |
| 430 | array( |
| 431 | 'title' => __('Clear', 'so-css'), |
| 432 | 'type' => 'select', |
| 433 | 'args' => array( |
| 434 | 'property' => 'clear', |
| 435 | 'options' => array( |
| 436 | 'none' => __( 'None', 'so-css'), |
| 437 | 'left' => __( 'Left', 'so-css'), |
| 438 | 'right' => __( 'Right', 'so-css'), |
| 439 | 'both' => __( 'Both', 'so-css'), |
| 440 | ) |
| 441 | ) |
| 442 | ), |
| 443 | array( |
| 444 | 'title' => __('Visibility', 'so-css'), |
| 445 | 'type' => 'select', |
| 446 | 'args' => array( |
| 447 | 'property' => 'visibility', |
| 448 | 'options' => array( |
| 449 | 'visible' => __( 'Visible', 'so-css'), |
| 450 | 'hidden' => __( 'Hidden', 'so-css'), |
| 451 | 'collapse' => __( 'Collapse', 'so-css'), |
| 452 | ) |
| 453 | ) |
| 454 | ), |
| 455 | array( |
| 456 | 'title' => __('Overflow', 'so-css'), |
| 457 | 'type' => 'select', |
| 458 | 'args' => array( |
| 459 | 'property' => 'overflow', |
| 460 | 'options' => array( |
| 461 | 'visible' => __( 'Visible', 'so-css'), |
| 462 | 'hidden' => __( 'Hidden', 'so-css'), |
| 463 | 'scroll' => __( 'Scroll', 'so-css'), |
| 464 | 'auto' => __( 'Auto', 'so-css'), |
| 465 | ) |
| 466 | ) |
| 467 | ), |
| 468 | array( |
| 469 | 'title' => __('Overflow X', 'so-css'), |
| 470 | 'type' => 'select', |
| 471 | 'args' => array( |
| 472 | 'property' => 'overflow-x', |
| 473 | 'options' => array( |
| 474 | 'visible' => __( 'Visible', 'so-css'), |
| 475 | 'hidden' => __( 'Hidden', 'so-css'), |
| 476 | 'scroll' => __( 'Scroll', 'so-css'), |
| 477 | 'auto' => __( 'Auto', 'so-css'), |
| 478 | ) |
| 479 | ) |
| 480 | ), |
| 481 | array( |
| 482 | 'title' => __('Overflow Y', 'so-css'), |
| 483 | 'type' => 'select', |
| 484 | 'args' => array( |
| 485 | 'property' => 'overflow-y', |
| 486 | 'options' => array( |
| 487 | 'visible' => __( 'Visible', 'so-css'), |
| 488 | 'hidden' => __( 'Hidden', 'so-css'), |
| 489 | 'scroll' => __( 'Scroll', 'so-css'), |
| 490 | 'auto' => __( 'Auto', 'so-css'), |
| 491 | ) |
| 492 | ) |
| 493 | ), |
| 494 | array( |
| 495 | 'title' => __('Z-Index', 'so-css'), |
| 496 | 'type' => 'number', |
| 497 | 'args' => array( |
| 498 | 'property' => 'z-index', |
| 499 | ) |
| 500 | ), |
| 501 | ) |
| 502 | ), |
| 503 | |
| 504 | ); |