Browse Source

Fix dropdown docs, new in 2.0

intro
jlukic 9 years ago
parent
commit
aef28ff8f3
  1. 2
      server/documents/introduction/layout.html.eco
  2. 54
      server/documents/introduction/new.html.eco
  3. 197
      server/documents/modules/dropdown.html.eco
  4. 1
      server/files/javascript/docs.js
  5. 17
      server/files/stylesheets/docs.css

2
server/documents/introduction/layout.html.eco

@ -50,7 +50,7 @@ type : 'Introduction'
<h2 class="ui dividing header">Pages</h2>
<p>Starter page templates</p>
<div class="ui three doubling cards">
<div class="ui three doubling stackable cards">
<a class="ui card" href="/examples/homepage.html">
<div class="image">
<img src="/images/examples/homepage.png">

54
server/documents/introduction/new.html.eco

@ -3,8 +3,8 @@ layout : 'default'
css : 'new'
standalone : true
title : 'New In 2.0'
description : 'An introduction to new features in 2.0'
title : 'New in 2.0'
description : 'An introduction to new features found in the latest release'
type : 'Introduction'
---
@ -17,7 +17,7 @@ type : 'Introduction'
<div class="no example">
<h4 class="ui header">Fix All The Bugs</h4>
<h4 class="ui header">The Devil is in the Details</h4>
<p style="margin-bottom:0em;padding-bottom:0em;">2.0 brings a whopping set of changes to the project:
<div class="ui large bulleted list">
<div class="item"><b>98</b> enhancements</div>
@ -30,9 +30,12 @@ type : 'Introduction'
<p>To see the full list of what's changed check out the project's release notes.</p>
<a href="https://github.com/Semantic-Org/Semantic-UI/blob/master/RELEASE-NOTES.md" target="_blank" class="ui compact button">View Release Notes</a>
<a href="https://github.com/Semantic-Org/Semantic-UI/blob/master/RELEASE-NOTES.md" target="_blank" class="ui button">View Release Notes</a>
</div>
<h2 class="ui dividing header">Global Changes</h2>
<div class="no example">
<h4 class="ui header">Flexbox All The Things</h4>
<p><a href="https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Flexible_boxes" target="_blank">Flexbox</a> allows for elements to intuitively resize to fill available space, making many complex layouts much simpler.</p>
@ -40,15 +43,48 @@ type : 'Introduction'
</div>
<div class="no example">
<h4 class="ui header">Color All The Things</h4>
<p>2.0
<div class="colored example">
<h4 class="ui header">New Colors</h4>
<p><code>2.0</code> includes additional named colors olive, violet, brown and grey which help provide more expressiveness with color variations.</p>
<a class="ui red pointing label">Red</a>
<a class="ui orange tag label">Orange</a>
<a class="ui yellow bottom pointing label">Yellow</a>
<a class="ui olive label">
<i class="mail icon"></i>
Olive
</a>
<a class="ui green right pointing label">Green</a>
<a class="ui teal label">
Teal
<div class="detail">Detail</div>
</a>
<a class="ui blue image label">
<img src="/images/avatar2/small/elyse.png">
Blue
</a>
<a class="ui violet label">
Violet
</a>
<a class="ui purple label">
Purple
<i class="close icon"></i>
</a>
<div class="ui horizontal segments">
<div class="ui segment">
<div class="ui pink top left ribbon label">Pink</div>
<img src="/images/wireframe/paragraph.png" class="ui wireframe image">
</div>
<div class="ui segment">
<div class="ui brown right ribbon label">Brown</div>
<img src="/images/wireframe/paragraph.png" class="ui wireframe image">
</div>
</div>
</div>
<h2 class="ui dividing header">Grids</h2>
<div class="example">
<h4 class="ui header">Equal Height by Default</h4>
<h4 class="ui header">Flexbox Grid</h4>
<p>Grids in 2.0 now use <a href="https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Flexible_boxes" target="_blank"><code>flexbox</code></a> and are equal height across rows by default.</p>
<div class="ui three column divided grid">
<div class="row">
@ -81,7 +117,7 @@ type : 'Introduction'
</div>
<div class="highlighted example">
<h4 class="ui header">Automatic Columns</h4>
<p>The new <a href="/collections/grid.html#equal-width"><code>equal width</code></a> grid variation adjusts column widths automatically to split their container evenly without having to manually specify a column count.</p>
<p>The new <a href="/collections/grid.html#equal-width"><code>equal width</code></a> grid variation adjusts column widths automatically to evenly split their container without having to manually specify a column count.</p>
<div class="ui equal width grid">
<div class="column"></div>
<div class="column"></div>

197
server/documents/modules/dropdown.html.eco

@ -2214,8 +2214,10 @@ themes : ['Default', 'Material']
Dropdown
</h2>
<div class="no example">
<h4 class="ui header">
Dropdown Settings
Frequently Used Settings
</h4>
<table class="ui celled sortable definition table segment">
<thead>
@ -2231,10 +2233,16 @@ themes : ['Default', 'Material']
<td>click</td>
<td>Event used to trigger dropdown (Hover, Click, Custom Event)</td>
</tr>
<tr>
<td>allowAdditions</td>
<td>false</td>
<td>Whether search selection should allow users to add their own selections, works for single or multiselect.</td>
</tr>
<tr>
<td>action</td>
<td>auto</td>
<td>Sets a default action to occur. (See usage guide)
<td>
<p>Sets a default action to occur. (See usage guide)</p>
<div class="ui vertical divided list">
<div class="item">
<div class="header">activate (default)</div>
@ -2262,11 +2270,6 @@ themes : ['Default', 'Material']
</div>
</div>
</tr>
<tr>
<td>direction</td>
<td>'auto'</td>
<td>When set to <code>auto</code> determines direction based on whether dropdown can fit on screen. Set to <code>upward</code> or <code>downward</code> to always force a direction.</td>
</tr>
<tr>
<td>match</td>
<td>both</td>
@ -2287,9 +2290,14 @@ themes : ['Default', 'Material']
</div>
</tr>
<tr>
<td>fullTextSearch</td>
<td>forceSelection</td>
<td>true</td>
<td>Whether search selection will force currently selected choice when element is blurred.</td>
</tr>
<tr>
<td>allowCategorySelection</td>
<td>false</td>
<td>Whether search selections should look for string match anywhere in string</td>
<td>Whether menu items with sub-menus (categories) should be selectable</td>
</tr>
<tr>
<td>placeholder</td>
@ -2298,7 +2306,7 @@ themes : ['Default', 'Material']
<div class="ui vertical divided list">
<div class="item">
<div class="header">auto</div>
<div class="description">Convert blank string option "" to placeholder text</div>
<div class="description">Convert option with "" (blank string) value to placeholder text</div>
</div>
<div class="item">
<div class="header">value</div>
@ -2311,12 +2319,25 @@ themes : ['Default', 'Material']
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="no example">
<h4 class="ui header">
Remote Settings
</h4>
<table class="ui celled sortable definition table segment">
<thead>
<tr>
<td>preserveHTML</td>
<td>true</td>
<td>Whether html included in dropdown values should be preserved. (Allows icons to show up in selected value)</td>
<th>Setting</th>
<th class="four wide">Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>apiSettings</td>
<td>false</td>
@ -2327,66 +2348,11 @@ themes : ['Default', 'Material']
<td>true</td>
<td>When enabled will automatically store selected name/value pairs in <code>sessionStorage</code> to preserve user selection on page refresh. Disabling will clear remote dropdown values on refresh.</td>
</tr>
<tr>
<td>sortSelect</td>
<td>false</td>
<td>Whether to sort values when creating a dropdown automatically from a select element.</td>
</tr>
<tr>
<td>forceSelection</td>
<td>true</td>
<td>Whether search selection will force currently selected choice when element is blurred.</td>
</tr>
<tr>
<td>allowAdditions</td>
<td>false</td>
<td>Whether search selection should allow users to add their own selections, works for single or multiselect.</td>
</tr>
<tr>
<td>showOnFocus</td>
<td>true</td>
<td>Whether to show dropdown menu automatically on element focus.</td>
</tr>
<tr>
<td>allowTab</td>
<td>true</td>
<td>Whether to allow a <code>tabindex</code> to be created for this element </td>
</tr>
<tr>
<td>allowCategorySelection</td>
<td>false</td>
<td>Whether menu items with sub-menus (categories) should be selectable</td>
</tr>
<tr>
<td>transition</td>
<td>
auto (slide down / slide up)
</td>
<td>Named transition to use when animating menu in and out. Defaults to <code>slide down</code> or <code>slide up</code> depending on dropdown direction. Fade and slide down are available without including <a href="/modules/transition.html">ui transitions</a></td>
</tr>
<tr>
<td>duration</td>
<td>
200
</td>
<td>Duration of animation events</td>
</tr>
<tr>
<td>delay</td>
<td>
<div class="code">
delay : {
hide : 300,
show : 200,
search : 50,
touch : 50
}
</div>
</td>
<td>Time in milliseconds to debounce show or hide behavior when <code>on: hover</code> is used, or when touch is used.</td>
</tr>
</tbody>
</table>
</div>
<div class="no example">
<h4 class="ui header">
Multiple Select Settings
@ -2437,6 +2403,93 @@ themes : ['Default', 'Material']
</tr>
</tbody>
</table>
</div>
<div class="no example">
<h4 class="ui header">
Additional Settings
</h4>
<table class="ui celled sortable definition table segment">
<thead>
<tr>
<th>Setting</th>
<th class="four wide">Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>direction</td>
<td>'auto'</td>
<td>When set to <code>auto</code> determines direction based on whether dropdown can fit on screen. Set to <code>upward</code> or <code>downward</code> to always force a direction.</td>
</tr>
<tr>
<td>keepOnScreen</td>
<td>true</td>
<td>Whether dropdown should try to keep itself on screen by checking whether menus display position in its <code>context</code> (Default context is page).</td>
</tr>
<tr>
<td>context</td>
<td>window</td>
<td>Element context to use when checking whether can show when <code>keepOnScreen: true</code></td>
</tr>
<tr>
<td>fullTextSearch</td>
<td>false</td>
<td>Whether search selections should look for string match anywhere in string</td>
</tr>
<tr>
<td>preserveHTML</td>
<td>true</td>
<td>Whether html included in dropdown values should be preserved. (Allows icons to show up in selected value)</td>
</tr>
<tr>
<td>sortSelect</td>
<td>false</td>
<td>Whether to sort values when creating a dropdown automatically from a select element.</td>
</tr>
<tr>
<td>showOnFocus</td>
<td>true</td>
<td>Whether to show dropdown menu automatically on element focus.</td>
</tr>
<tr>
<td>allowTab</td>
<td>true</td>
<td>Whether to allow the element to be navigable by keyboard, by automatically creating a <code>tabindex</code></td>
</tr>
<tr>
<td>transition</td>
<td>
auto (slide down / slide up)
</td>
<td>Named transition to use when animating menu in and out. Defaults to <code>slide down</code> or <code>slide up</code> depending on dropdown direction. Fade and slide down are available without including <a href="/modules/transition.html">ui transitions</a></td>
</tr>
<tr>
<td>duration</td>
<td>
200
</td>
<td>Duration of animation events</td>
</tr>
<tr>
<td>delay</td>
<td>
<div class="code">
delay : {
hide : 300,
show : 200,
search : 50,
touch : 50
}
</div>
</td>
<td>Time in milliseconds to debounce show or hide behavior when <code>on: hover</code> is used, or when touch is used.</td>
</tr>
</tbody>
</table>
</div>
<h4 class="ui header">
Callbacks
@ -2445,7 +2498,7 @@ themes : ['Default', 'Material']
<table class="ui celled sortable definition table segment">
<thead>
<tr>
<th class="four wide"></th>
<th class="six wide"></th>
<th>Context</th>
<th>Description</th>
</tr>

1
server/files/javascript/docs.js

@ -730,6 +730,7 @@ semantic.ready = function() {
})
;
}
console.log(code);
$example.data('code', code);
return code;
},

17
server/files/stylesheets/docs.css

@ -957,6 +957,23 @@ blockquote .author {
overflow: auto;
}
/*--------------
Colored
---------------*/
#example .colored.example .label,
#example .colored.example .button,
#example .colored.example .menu {
margin-bottom: 0.5em;
}
#example .colored.example .menu {
margin-right: 0.5em;
}
#example .colored.example .attached.label {
margin-bottom: 0em;
}
/*--------------
Grid
---------------*/

Loading…
Cancel
Save