X-Git-Url: https://scripts.mit.edu/gitweb/autoinstallsdev/mediawiki.git/blobdiff_plain/19e297c21b10b1b8a3acad5e73fc71dcb35db44a..6932310fd58ebef145fa01eb76edf7150284d8ea:/vendor/oojs/oojs-ui/demos/pages/widgets.php diff --git a/vendor/oojs/oojs-ui/demos/pages/widgets.php b/vendor/oojs/oojs-ui/demos/pages/widgets.php new file mode 100644 index 00000000..cbfc2404 --- /dev/null +++ b/vendor/oojs/oojs-ui/demos/pages/widgets.php @@ -0,0 +1,1242 @@ + false, + 'padded' => true, + 'framed' => true, +] ); + +$demoContainer->addClasses( [ 'demo-container' ] ); + +$demoContainer->appendContent( new OOUI\FieldsetLayout( [ + 'id' => 'demo-section-buttons', + 'infusable' => true, + 'label' => 'Buttons', + 'items' => [ + new OOUI\FieldLayout( + new OOUI\ButtonWidget( [ 'label' => 'Normal' ] ), + [ + 'label' => "ButtonWidget (normal)\xE2\x80\x8E", + 'align' => 'top' + ] + ), + new OOUI\FieldLayout( + new OOUI\ButtonWidget( [ + 'label' => 'Progressive', + 'flags' => [ 'progressive' ] + ] ), + [ + 'label' => "ButtonWidget (progressive)\xE2\x80\x8E", + 'align' => 'top' + ] + ), + new OOUI\FieldLayout( + new OOUI\ButtonWidget( [ + 'label' => 'Constructive', + 'flags' => [ 'constructive' ] + ] ), + [ + 'label' => "ButtonWidget (constructive, deprecated)\xE2\x80\x8E", + 'align' => 'top' + ] + ), + new OOUI\FieldLayout( + new OOUI\ButtonWidget( [ + 'label' => 'Destructive', + 'flags' => [ 'destructive' ] + ] ), + [ + 'label' => "ButtonWidget (destructive)\xE2\x80\x8E", + 'align' => 'top' + ] + ), + new OOUI\FieldLayout( + new OOUI\ButtonWidget( [ + 'label' => 'Primary progressive', + 'flags' => [ 'primary', 'progressive' ] + ] ), + [ + 'label' => "ButtonWidget (primary, progressive)\xE2\x80\x8E", + 'align' => 'top' + ] + ), + new OOUI\FieldLayout( + new OOUI\ButtonWidget( [ + 'label' => 'Primary constructive', + 'flags' => [ 'primary', 'constructive' ] + ] ), + [ + 'label' => "ButtonWidget (primary, constructive, deprecated)\xE2\x80\x8E", + 'align' => 'top' + ] + ), + new OOUI\FieldLayout( + new OOUI\ButtonWidget( [ + 'label' => 'Primary destructive', + 'flags' => [ 'primary', 'destructive' ] + ] ), + [ + 'label' => "ButtonWidget (primary, destructive)\xE2\x80\x8E", + 'align' => 'top' + ] + ), + new OOUI\FieldLayout( + new OOUI\ButtonWidget( [ + 'label' => 'Disabled', + 'disabled' => true + ] ), + [ + 'label' => "ButtonWidget (disabled)\xE2\x80\x8E", + 'align' => 'top' + ] + ), + new OOUI\FieldLayout( + new OOUI\ButtonWidget( [ + 'label' => 'Progressive', + 'flags' => [ 'progressive' ], + 'disabled' => true + ] ), + [ + 'label' => "ButtonWidget (progressive, disabled)\xE2\x80\x8E", + 'align' => 'top' + ] + ), + new OOUI\FieldLayout( + new OOUI\ButtonWidget( [ + 'label' => 'Progressive', + 'icon' => 'tag', + 'flags' => [ 'progressive' ], + 'disabled' => true + ] ), + [ + 'label' => "ButtonWidget (progressive, icon, disabled)\xE2\x80\x8E", + 'align' => 'top' + ] + ), + new OOUI\FieldLayout( + new OOUI\ButtonWidget( [ + 'label' => 'Icon', + 'icon' => 'tag' + ] ), + [ + 'label' => "ButtonWidget (icon)\xE2\x80\x8E", + 'align' => 'top' + ] + ), + new OOUI\FieldLayout( + new OOUI\ButtonWidget( [ + 'label' => 'Icon', + 'icon' => 'tag', + 'flags' => [ 'progressive' ] + ] ), + [ + 'label' => "ButtonWidget (icon, progressive)\xE2\x80\x8E", + 'align' => 'top' + ] + ), + new OOUI\FieldLayout( + new OOUI\ButtonWidget( [ + 'label' => 'Indicator', + 'indicator' => 'down' + ] ), + [ + 'label' => "ButtonWidget (indicator)\xE2\x80\x8E", + 'align' => 'top' + ] + ), + new OOUI\FieldLayout( + new OOUI\ButtonWidget( [ + 'label' => 'Indicator', + 'indicator' => 'down', + 'flags' => [ 'progressive' ] + ] ), + [ + 'label' => "ButtonWidget (indicator, progressive)\xE2\x80\x8E", + 'align' => 'top' + ] + ), + new OOUI\FieldLayout( + new OOUI\ButtonWidget( [ + 'framed' => false, + 'icon' => 'help', + 'title' => 'Icon only' + ] ), + [ + 'label' => "ButtonWidget (frameless, icon only)\xE2\x80\x8E", + 'align' => 'top' + ] + ), + new OOUI\FieldLayout( + new OOUI\ButtonWidget( [ + 'framed' => false, + 'icon' => 'tag', + 'label' => 'Labeled' + ] ), + [ + 'label' => "ButtonWidget (frameless)\xE2\x80\x8E", + 'align' => 'top' + ] + ), + new OOUI\FieldLayout( + new OOUI\ButtonWidget( [ + 'framed' => false, + 'flags' => [ 'progressive' ], + 'icon' => 'check', + 'label' => 'Progressive' + ] ), + [ + 'label' => "ButtonWidget (frameless, progressive)\xE2\x80\x8E", + 'align' => 'top' + ] + ), + new OOUI\FieldLayout( + new OOUI\ButtonWidget( [ + 'framed' => false, + 'flags' => [ 'destructive' ], + 'icon' => 'trash', + 'label' => 'Destructive' + ] ), + [ + 'label' => "ButtonWidget (frameless, destructive)\xE2\x80\x8E", + 'align' => 'top' + ] + ), + new OOUI\FieldLayout( + new OOUI\ButtonWidget( [ + 'framed' => false, + 'flags' => [ 'constructive' ], + 'icon' => 'add', + 'label' => 'Constructive' + ] ), + [ + 'label' => "ButtonWidget (frameless, constructive)\xE2\x80\x8E", + 'align' => 'top' + ] + ), + new OOUI\FieldLayout( + new OOUI\ButtonWidget( [ + 'framed' => false, + 'flags' => [ 'destructive' ], + 'label' => 'Cancel' + ] ), + [ + 'label' => "ButtonWidget (frameless, label-only, destructive)\xE2\x80\x8E", + 'align' => 'top' + ] + ), + new OOUI\FieldLayout( + new OOUI\ButtonWidget( [ + 'framed' => false, + 'icon' => 'tag', + 'label' => 'Disabled', + 'disabled' => true + ] ), + [ + 'label' => "ButtonWidget (frameless, disabled)\xE2\x80\x8E", + 'align' => 'top' + ] + ), + new OOUI\FieldLayout( + new OOUI\ButtonWidget( [ + 'framed' => false, + 'flags' => [ 'constructive' ], + 'icon' => 'tag', + 'label' => 'Constructive', + 'disabled' => true + ] ), + [ + 'label' => "ButtonWidget (frameless, constructive, disabled)\xE2\x80\x8E", + 'align' => 'top' + ] + ), + new OOUI\FieldLayout( + new OOUI\ButtonInputWidget( [ + 'label' => 'Submit the form', + 'type' => 'submit', + 'flags' => [ 'primary', 'progressive' ], + 'useInputTag' => true + ] ), + [ + 'align' => 'top', + 'label' => "ButtonInputWidget (using )\xE2\x80\x8E" + ] + ), + new OOUI\FieldLayout( + new OOUI\ButtonInputWidget( [ + 'label' => 'Another button', + 'type' => 'button' + ] ), + [ + 'align' => 'top', + 'label' => "ButtonInputWidget (using