aui.coffee
jQuery wraps a React ref <div ref="react ref" />
or jQuery selector this.$('react ref')
.
This is the intended way to interact with jQuery to supply utility functionality.
Warning! Use this only in componentDidMount
or event handlers!
Do NOT use jQuery to re-arange the dom or you will run into Invarient erros in React,
use React to arange your dom ahead of time as React is expecting.
(depricated) <Aui/>
tag, use Aui.Mixin instead.
finds all the props that === true or are on the Aui.modules
list,
and merging them with the className prop.
Use this inside the render function like a React helper function.
Example: Aui.classify(<div ui grid><div column>content</div></div>)
returns <div ui grid className="ui grid"><div column className="column">content</div></div>
(internal) AuiOptions defaults options for Aui.classify
A whitelist of jQuery modules.
Aui.modules.push('widget')
to configure Aui to support $.fn.widget
.
By default this includes window.jQuery.site.settings.modules
from Semantic-UI.
When a property is encountered on a ReactElement that matches this whitelist and is an Array,
the corisponding window.jQuery.fn[modulename]
will be called with the property's array value.
This is mostly intended for use with Semantic-UI's javascript,
but in theory could be used to call any $.fn
function.
internal global cache of options passed to module functions.
(internal) <Aui.Module/>
This class provides support for Aui.modules
internally and generally is not used directly.
<Aui.Module/>
handles calling jQuery.fn[module] calls when used inside a React Component's render.
<div ui checkbox={[]}/>
will automatically call $.fn.checkbox()
, and
<form ui form={[{...}]}></form>
will automatically call $.fn.form({...})
JSFiddle around with the examples here!
Aui.Mixin
Aui.Mixin is the main wrapper around React Components it recursively goes through all it's children, finding props that === true or are on the
Aui.modules
list, and merges them into the className of each element.