Skip to content

Commit 3d56060

Browse files
committed
[fix]: Add classes option for more widgets, update theming section
1 parent 3668d38 commit 3d56060

File tree

6 files changed

+57
-10
lines changed

6 files changed

+57
-10
lines changed

entries/autocomplete.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
<ul>
3434
<li><code>ui-autocomplete</code>: The <a href="/menu/#theming">menu</a> used to display matches to the user.</li>
35-
<li><code>ui-autocomplete-input</code>: The input element that the Autocomplete widget was instantiated with.</li>
35+
<li><code>ui-autocomplete-input</code>: The input element that the autocomplete widget was instantiated with. While requesting data to display to the user, the <code>ui-autocomplete-loading</code> class is also added to this element.</li>
3636
</ul>
3737

3838
<h3>Dependencies</h3>
@@ -55,6 +55,10 @@
5555
<option name="autoFocus" type="Boolean" default="false" example-value="true">
5656
<desc>If set to <code>true</code> the first item will automatically be focused when the menu is shown.</desc>
5757
</option>
58+
<option name="classes" type="Object" default="{}">
59+
<xi:include href="../includes/classes-option-desc.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
60+
<xi:include href="../includes/classes-option-example.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
61+
</option>
5862
<option name="delay" type="Integer" default="300" example-value="500">
5963
<desc>The delay in milliseconds between when a keystroke occurs and when a search is performed. A zero-delay makes sense for local data (more responsive), but can produce a lot of load for remote data, while being less responsive.</desc>
6064
</option>

entries/button.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@
3939
<note id="functional-css"/>
4040
<added>1.8</added>
4141
<options>
42+
<option name="classes" type="Object">
43+
<default>{
44+
"ui-button": "ui-corner-all",
45+
}</default>
46+
<xi:include href="../includes/classes-option-desc.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
47+
<xi:include href="../includes/classes-option-example.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
48+
</option>
4249
<xi:include href="../includes/widget-option-disabled.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
4350
<option name="icons" default="{ primary: null, secondary: null }" example-value='{ primary: "ui-icon-gear", secondary: "ui-icon-triangle-1-s" }'>
4451
<desc>

entries/dialog.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
<ul>
5757
<li>
58-
<code>ui-dialog</code>: The outer container of the dialog.
58+
<code>ui-dialog</code>: The outer container of the dialog. If the <a href="#option-draggable"><code>draggable</code> option</a> is set, the <code>ui-dialog-dragging</code> class is added during a resize. If the <a href="#option-resizable"><code>resizable</code> option</a> is set, the <code>ui-dialog-resizing</code> class is added during a resize. If the <a href="#option-buttons"><code>buttons</code> option</a> is set, the <code>ui-dialog-buttons</code> class is added.
5959
<ul>
6060
<li>
6161
<code>ui-dialog-titlebar</code>: The title bar containing the dialog's title and close button.
@@ -125,6 +125,14 @@
125125
<desc>Each element of the array must be an object defining the attributes, properties, and event handlers to set on the button. In addition, a key of <code>icons</code> can be used to control <a href="/button/#option-icons">button's <code>icons</code> option</a>, and a key of <code>showText</code> can be used to control <a href="/button/#option-text">button's <code>text</code> option</a>.</desc>
126126
</type>
127127
</option>
128+
<option name="classes" type="Object">
129+
<default>{
130+
"ui-dialog": "ui-corner-all",
131+
"ui-dialog-titlebar": "ui-corner-all",
132+
}</default>
133+
<xi:include href="../includes/classes-option-desc.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
134+
<xi:include href="../includes/classes-option-example.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
135+
</option>
128136
<option name="closeOnEscape" default="true" example-value="false">
129137
<desc>Specifies whether the dialog should close when it has focus and the user presses the escape (ESC) key.</desc>
130138
<type name="Boolean" />

entries/droppable.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
<longdesc>
66
<p>The jQuery UI Droppable plugin makes selected elements droppable (meaning they accept being dropped on by <a href="/draggable/">draggables</a>). You can specify which draggables each will accept.</p>
77

8+
<xi:include href="../includes/widget-theming.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
9+
10+
<ul>
11+
<li><code>ui-droppable</code>: The droppable element. When a draggable that can be dropped on this dropppable is activated, the <code>ui-droppable-active</code> class is added. When dragging a draggable over this droppable, the <code>ui-droppable-hover</code> class is added.</li>
12+
</ul>
13+
814
<h3>Dependencies</h3>
915
<ul>
1016
<li><a href="/category/ui-core/">UI Core</a></li>
@@ -29,6 +35,10 @@
2935
<option name="addClasses" type="Boolean" default="true" example-value="false">
3036
<desc>If set to <code>false</code>, will prevent the <code>ui-droppable</code> class from being added. This may be desired as a performance optimization when calling <code>.droppable()</code> init on hundreds of elements.</desc>
3137
</option>
38+
<option name="classes" type="Object" default="{}">
39+
<xi:include href="../includes/classes-option-desc.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
40+
<xi:include href="../includes/classes-option-example.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
41+
</option>
3242
<xi:include href="../includes/widget-option-disabled.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
3343
<option name="greedy" type="Boolean" default="false" example-value="true">
3444
<desc>By default, when an element is dropped on nested droppables, each droppable will receive the element. However, by setting this option to <code>true</code>, any parent droppables will not receive the element. The <code>drop</code> event will still bubble normally, but the <code>event.target</code> can be checked to see which droppable received the draggable element.</desc>

entries/menu.xml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,17 @@
7171

7272
<ul>
7373
<li>
74-
<code>ui-menu</code>: The outer container of the menu. This element will additionally have a <code>ui-menu-icons</code> class if the menu contains icons.
74+
<code>ui-menu</code>: The outer container of the menu, as well as any nested sub menu. This top-level element will additionally have a <code>ui-menu-icons</code> class if the menu contains icons.
7575
<ul>
7676
<li>
77-
<code>ui-menu-item</code>: The container for individual menu items.
77+
<code>ui-menu-item</code>: The container for individual menu items. This contains the element for the item's text itself as well as the element for sub menus.
7878
<ul>
79-
<li><code>ui-menu-icon</code>: The submenu icons set via the <a href="#option-icons"><code>icons</code></a> option.</li>
79+
<li>
80+
<code>ui-menu-item-wrapper</code>: The text content of the item, along with the icon indicating sub menus.
81+
<ul>
82+
<li><code>ui-menu-icon</code>: The submenu icon set via the <a href="#option-icons"><code>icons</code></a> option.</li>
83+
</ul>
84+
</li>
8085
</ul>
8186
</li>
8287
<li><code>ui-menu-divider</code>: Divider elements between menu items.</li>
@@ -94,13 +99,17 @@
9499
<note id="functional-css"/>
95100
<added>1.9</added>
96101
<options>
102+
<option name="classes" type="Object" default="{}">
103+
<xi:include href="../includes/classes-option-desc.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
104+
<xi:include href="../includes/classes-option-example.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
105+
</option>
97106
<xi:include href="../includes/widget-option-disabled.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
98-
<option name="icons" type="Object" default='{ submenu: "ui-icon-carat-1-e" }' example-value='{ submenu: "ui-icon-circle-triangle-e" }'>
107+
<option name="icons" type="Object" example-value='{ submenu: "ui-icon-circle-triangle-e" }'>
108+
<default>{
109+
submenu: "ui-icon-carat-1-e"
110+
}</default>
99111
<desc>
100112
Icons to use for submenus, matching <a href="/theming/icons/">an icon provided by the jQuery UI CSS Framework</a>.
101-
<ul>
102-
<li>submenu (string, default: "ui-icon-carat-1-e")</li>
103-
</ul>
104113
</desc>
105114
</option>
106115
<option name="items" type="String" default='"> *"' example-value='".custom-item"' init-only="true" added="1.11.0">

entries/progressbar.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<ul>
1616
<li>
17-
<code>ui-progressbar</code>: The outer container of the progressbar. This element will additionally have a class of <code>ui-progressbar-indeterminate</code> for indeterminate progressbars.
17+
<code>ui-progressbar</code>: The outer container of the progressbar. This element will additionally have a class of <code>ui-progressbar-indeterminate</code> for indeterminate progressbars. For determinate progressbars, the <code>ui-progressbar-complete</code> class is added once the maximum value is reached.
1818
<ul>
1919
<li>
2020
<code>ui-progressbar-value</code>: The element that represents the filled portion of the progressbar.
@@ -35,6 +35,15 @@
3535
<note id="functional-css"/>
3636
<added>1.6</added>
3737
<options>
38+
<option name="classes" type="Object">
39+
<default>{
40+
"ui-progressbar": "ui-corner-all",
41+
"ui-progressbar-complete": "ui-corner-right",
42+
"ui-progressbar-value": "ui-corner-left"
43+
}</default>
44+
<xi:include href="../includes/classes-option-desc.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
45+
<xi:include href="../includes/classes-option-example.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
46+
</option>
3847
<xi:include href="../includes/widget-option-disabled.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
3948
<option name="max" default="100" type="Number" example-value="1024">
4049
<desc>The maximum value of the progressbar.</desc>

0 commit comments

Comments
 (0)