- Description: A pack of
UIcomponents for Reblocks web-framework. - Licence: Unlicense
- Author: Alexander Artemenko svetlyak.40wt@gmail.com
- Homepage: https://40ants.com/reblocks-ui2/
- Bug tracker: https://github.com/40ants/reblocks-ui2/issues
- Source control: GIT
- Depends on: alexandria, anaphora, closer-mop, moptilities, named-readtables, parenscript, pythonic-string-reader, reblocks, reblocks-lass, serapeum
You can install this library from Quicklisp, but you want to receive updates quickly, then install it from Ultralisp.org:
(ql-dist:install-dist "http://dist.ultralisp.org/"
:prompt nil)
(ql:quickload :reblocks-ui2)
TODO: Write a library description. Put some examples here.
package reblocks-ui2/buttons/button
class reblocks-ui2/buttons/button:button (ui-widget)
Readers
reader reblocks-ui2/buttons/button:button-class (button) (:class)
reader reblocks-ui2/buttons/button:button-content (button) (:content)
reader reblocks-ui2/buttons/button:button-disabled (button) (:disabled = nil)
reader reblocks-ui2/buttons/button:button-pin (button) (:pin)
reader reblocks-ui2/buttons/button:button-size (button) (:size = nil)
reader reblocks-ui2/buttons/button:button-style (button) (:style)
reader reblocks-ui2/buttons/button:button-view (button) (:view = nil)
Accessors
accessor reblocks-ui2/buttons/button:button-class (button) (:class)
accessor reblocks-ui2/buttons/button:button-content (button) (:content)
accessor reblocks-ui2/buttons/button:button-disabled (button) (:disabled = nil)
accessor reblocks-ui2/buttons/button:button-pin (button) (:pin)
accessor reblocks-ui2/buttons/button:button-size (button) (:size = nil)
accessor reblocks-ui2/buttons/button:button-style (button) (:style)
accessor reblocks-ui2/buttons/button:button-view (button) (:view = nil)
function reblocks-ui2/buttons/button:button CONTENT &KEY (WIDGET-CLASS 'BUTTON) ON-CLICK (CLASS "button") DISABLED STYLE (VIEW :NORMAL) (SIZE :L) (PIN :ROUND) (WIDTH :MIN) HEIGHT
package reblocks-ui2/buttons/view
class reblocks-ui2/buttons/view:action (button-view)
class reblocks-ui2/buttons/view:button-view ()
class reblocks-ui2/buttons/view:normal-disabled (normal)
class reblocks-ui2/buttons/view:normal (button-view)
class reblocks-ui2/buttons/view:outlined-action (outlined)
class reblocks-ui2/buttons/view:outlined-danger (outlined)
class reblocks-ui2/buttons/view:outlined-info (outlined)
class reblocks-ui2/buttons/view:outlined-success (outlined)
class reblocks-ui2/buttons/view:outlined-utility (outlined)
class reblocks-ui2/buttons/view:outlined-warning (outlined)
class reblocks-ui2/buttons/view:outlined (button-view)
class reblocks-ui2/buttons/view:raised-disabled (raised)
class reblocks-ui2/buttons/view:raised (button-view)
generic-function reblocks-ui2/buttons/view:get-disabled-button-view view
Returns an alternative view for a button in disabled state.
function reblocks-ui2/buttons/view:ensure-view name
package reblocks-ui2/card
class reblocks-ui2/card:card-widget (ui-widget)
Readers
reader reblocks-ui2/card:card-content (card-widget) (:content)
reader reblocks-ui2/card:card-padding (card-widget) (:padding = nil)
reader reblocks-ui2/card:card-view (card-widget) (:view = nil)
reader reblocks-ui2/card:horizontal-align-of-card-content (card-widget) (:horizontal-align = nil)
reader reblocks-ui2/card:vertical-align-of-card-content (card-widget) (:vertical-align = :center)
function reblocks-ui2/card:card CONTENT &KEY (VIEW :OUTLINED) (WIDTH "full") (HEIGHT '(120)) (PADDING :L) MARGIN (HORIZONTAL-ALIGN :CENTER) (VERTICAL-ALIGN :CENTER) ON-CLICK (WIDGET-CLASS 'CARD-WIDGET)
package reblocks-ui2/containers/column
class reblocks-ui2/containers/column:column-widget (container-widget)
function reblocks-ui2/containers/column:column &rest subwidgets-and-options
package reblocks-ui2/containers/container
class reblocks-ui2/containers/container:container-widget (ui-widget)
Readers
reader reblocks-ui2/containers/container:additional-classes (container-widget) (:css-classes = nil)
reader reblocks-ui2/containers/container:children-gap (container-widget) (:gap = *default-gap*)
reader reblocks-ui2/containers/container:subwidgets (container-widget) (:subwidgets = nil)
Accessors
accessor reblocks-ui2/containers/container:subwidgets (container-widget) (:subwidgets = nil)
generic-function reblocks-ui2/containers/container:gap-css-classes gap theme
function reblocks-ui2/containers/container:make-container default-widget-class &rest subwidgets-and-options
package reblocks-ui2/containers/controls-row
class reblocks-ui2/containers/controls-row:controls-row-widget (row-widget)
macro reblocks-ui2/containers/controls-row:controls-row &rest subwidgets-and-options
package reblocks-ui2/containers/row
class reblocks-ui2/containers/row:row-widget (container-widget)
function reblocks-ui2/containers/row:make-row-widget subwidgets &key (gap *default-gap*) on-click
function reblocks-ui2/containers/row:row &rest subwidgets-and-options
package reblocks-ui2/containers/stack
class reblocks-ui2/containers/stack:stack-widget (ui-widget)
Shows only the top child from the stack. Provides methods to push and pop widgets.
Readers
reader reblocks-ui2/containers/stack:stack-widget-children (stack-widget) (:children)
generic-function reblocks-ui2/containers/stack:pop-child stack-widget
generic-function reblocks-ui2/containers/stack:push-child stack-widget child
function reblocks-ui2/containers/stack:current-stack-widget
function reblocks-ui2/containers/stack:pop-me
Removes current (top) widget from the stack and display the next widget.
function reblocks-ui2/containers/stack:replace-me-with widget
Adds a new widget ontop of the current.
function reblocks-ui2/containers/stack:stack &rest children
Makes a stack widget with given subwidgets.
Only first widget in the list will be visible.
package reblocks-ui2/containers/tabs
class reblocks-ui2/containers/tabs:tabs-control (event-emitter ui-widget)
Readers
reader reblocks-ui2/containers/tabs:current-idx (tabs-control) (:idx = 0)
reader reblocks-ui2/containers/tabs:subwidgets-titles (tabs-control) (:titles)
reader reblocks-ui2/containers/tabs:tabs-size (tabs-control) (:size)
Accessors
accessor reblocks-ui2/containers/tabs:current-idx (tabs-control) (:idx = 0)
class reblocks-ui2/containers/tabs:tabs-widget (ui-widget)
Readers
reader reblocks-ui2/containers/tabs:subwidgets (tabs-widget) (:subwidgets)
reader reblocks-ui2/containers/tabs:tabs-selector (tabs-widget) (:selector)
function reblocks-ui2/containers/tabs:switch-to-idx &key widget-id idx &allow-other-keys
function reblocks-ui2/containers/tabs:tabs titles subwidgets &key (idx 0) (selector-class 'tabs-control) (class 'tabs-widget) (size :l)
type reblocks-ui2/containers/tabs:tabs-size
(MEMBER :M :L :XL)
package reblocks-ui2/editable
generic-function reblocks-ui2/editable:make-editable-widget value callback
Creates a widget which can be used to edit a given value.
Every time when the widget loose focus, it will call CALLBACK argument with a new value.
package reblocks-ui2/form
class reblocks-ui2/form:form-widget (ui-widget)
Readers
reader reblocks-ui2/form:form-content (form-widget) (:content)
reader reblocks-ui2/form:form-inputs (form-widget) (= (make-hash-table :test 'equal))
Internal structure holding references to all form inputs having a name attribute.
reader reblocks-ui2/form:form-on-submit (form-widget) (:on-submit = 'no-action)
function reblocks-ui2/form:form content &key (widget-class 'form-widget) on-submit
package reblocks-ui2/form/validation
condition reblocks-ui2/form/validation:field-validation-error (validation-error)
Readers
reader reblocks-ui2/form/validation:field-name (field-validation-error) (:field-name)
reader reblocks-ui2/form/validation:invalid-value (field-validation-error) (:invalid-value)
condition reblocks-ui2/form/validation:form-validation-error (validation-error)
Readers
reader reblocks-ui2/form/validation:num-errors (form-validation-error) (:num-errors)
condition reblocks-ui2/form/validation:validation-error (error)
Readers
reader reblocks-ui2/form/validation:error-args (validation-error) (:error-args = 'nil)
reader reblocks-ui2/form/validation:error-message (validation-error) (:error-message = '"")
generic-function reblocks-ui2/form/validation:validate-form-data widget form-data
Accepts a form or input widget and a plist of all data sent from the browser.
Should return a plist of validated data. Also, it might change the state of the widgets,
for example, to set an error message saying that entered value is invalid. In the case
when data is invalid, function should signal validation-error.
package reblocks-ui2/html
function reblocks-ui2/html:prop name &optional default
macro reblocks-ui2/html:html (&body body) &key css (html-tag :div) css-classes on-click props width height margin
This macro allows to describe html, state, css and event handlers of the widget.
All in the single form.
Here is an example of the simple widget which keeps the counter value in the state and increment it on click:
(html (:p :class "the-title" (fmt "First paragraph with counter: ~A" (prop :counter))) :props '((:counter . 1)) :css (.the-title :font-size 40px) :on-click (lambda (widget) (incf (prop :counter)) (update widget)))
package reblocks-ui2/icon
class reblocks-ui2/icon:icon-widget (ui-widget)
Readers
reader reblocks-ui2/icon:icon-name (icon-widget) (:name)
function reblocks-ui2/icon:icon name
package reblocks-ui2/inputs/base
class reblocks-ui2/inputs/base:base-input-widget (named-input)
Readers
reader reblocks-ui2/inputs/base:input-error (base-input-widget) (:error = nil)
reader reblocks-ui2/inputs/base:input-validator (base-input-widget) (:validator = nil)
A function of one argument returning a validated value or signaling the field-validation-error.
reader reblocks-ui2/inputs/base:input-value (base-input-widget) (:value = nil)
class reblocks-ui2/inputs/named:named-input (ui-widget)
Readers
reader reblocks-ui2/inputs/named:input-name (named-input) (:name = nil)
package reblocks-ui2/inputs/named
class reblocks-ui2/inputs/named:named-input (ui-widget)
Readers
reader reblocks-ui2/inputs/named:input-name (named-input) (:name = nil)
package reblocks-ui2/inputs/text-input
class reblocks-ui2/inputs/text-input:input-widget (base-input-widget)
Readers
reader reblocks-ui2/inputs/text-input:input-disabled (input-widget) (:disabled = nil)
reader reblocks-ui2/inputs/text-input:input-left-content (input-widget) (:left-content = nil)
reader reblocks-ui2/inputs/text-input:input-pin (input-widget) (:pin)
reader reblocks-ui2/inputs/text-input:input-placeholder (input-widget) (:placeholder = nil)
reader reblocks-ui2/inputs/text-input:input-right-content (input-widget) (:right-content = nil)
reader reblocks-ui2/inputs/text-input:input-size (input-widget) (:size = :m)
reader reblocks-ui2/inputs/text-input:input-type (input-widget) (:type = nil)
reader reblocks-ui2/inputs/text-input:input-view (input-widget) (:view = (make-instance 'normal))
Accessors
accessor reblocks-ui2/inputs/text-input:input-left-content (input-widget) (:left-content = nil)
accessor reblocks-ui2/inputs/text-input:input-right-content (input-widget) (:right-content = nil)
function reblocks-ui2/inputs/text-input:input &key (widget-class 'input-widget) name value (type :text) placeholder (view :normal) (pin :round) (size :m) disabled validator error left-content right-content
package reblocks-ui2/inputs/text-input/view
class reblocks-ui2/inputs/text-input/view:clear (input-view)
class reblocks-ui2/inputs/text-input/view:input-view ()
class reblocks-ui2/inputs/text-input/view:normal (input-view)
function reblocks-ui2/inputs/text-input/view:ensure-view name
package reblocks-ui2/sizes
function reblocks-ui2/sizes:ensure-size name
package reblocks-ui2/tables/clickable-row
class reblocks-ui2/tables/clickable-row:clickable-row-widget (table-row)
function reblocks-ui2/tables/clickable-row:make-clickable-row-widget
package reblocks-ui2/tables/editable-table
class reblocks-ui2/tables/editable-table:editable-column (column)
Readers
reader reblocks-ui2/tables/editable-table:data-setter (editable-column) (:setter = #'default-setter)
class reblocks-ui2/tables/editable-table:editable-table-widget (table-widget)
Readers
reader reblocks-ui2/tables/editable-table:object-creator (editable-table-widget) (:object-creator = nil)
When given, should be a function of zero arguments. Will be called when user adds a new table row. Usually you will want to do create and add an object to a database. Returned object will be bound to a new table row and used to fill cells with new values.
reader reblocks-ui2/tables/editable-table:object-deleter (editable-table-widget) (:object-deleter = nil)
When given, should be a function of one argument. Will be called with object instance to be deleted from the table. Usually you will want to do something like deletion the record from a database.
condition reblocks-ui2/tables/editable-table:row-not-found (error)
generic-function reblocks-ui2/tables/editable-table:delete-row table obj
Deletes row representing given object.
First it calls object-deleter callback and then
removes corresponding row from the table.
function reblocks-ui2/tables/editable-table:editable-column title &key (getter nil getter-given-p) (setter #'default-setter) (cell-maker #'create-widget-from) (align :left)
function reblocks-ui2/tables/editable-table:make-editable-table columns rows &key (table-class 'editable-table-widget) (row-class nil row-class-given-p) (object-deleter nil object-deleter-given-p) (object-creator nil object-creator-given-p)
package reblocks-ui2/tables/table
class reblocks-ui2/tables/table:column (widget)
Readers
reader reblocks-ui2/tables/table:cell-maker (column) (:cell-maker = #'create-widget-from)
reader reblocks-ui2/tables/table:column-align (column) (:align = :left)
reader reblocks-ui2/tables/table:column-classes (column) (:classes = nil)
Additional CSS classes for column cells
reader reblocks-ui2/tables/table:column-idx (column) (= nil)
reader reblocks-ui2/tables/table:column-title (column) (:title)
reader reblocks-ui2/tables/table:data-getter (column) (:GETTER = (LAMBDA (ROW)
(DECLARE (IGNORE ROW)) (ERROR "Real getter should be provided to COLUMN function.")))
class reblocks-ui2/tables/table:table-row (widget)
Readers
reader reblocks-ui2/tables/table:row-cells (table-row) (:cells)
reader reblocks-ui2/tables/table:row-object (table-row) (:object)
Original object, passed as a row to the make-table function.
reader reblocks-ui2/tables/table:row-table (table-row) (:table)
Reference it a table row belong to.
class reblocks-ui2/tables/table:table-widget (ui-widget)
Readers
reader reblocks-ui2/tables/table:table-columns (table-widget) (= nil)
reader reblocks-ui2/tables/table:table-row-class (table-widget) (:row-class = 'table-row)
reader reblocks-ui2/tables/table:table-rows (table-widget) (= nil)
generic-function reblocks-ui2/tables/table:append-data widget data
generic-function reblocks-ui2/tables/table:column-css-classes column theme
generic-function reblocks-ui2/tables/table:header-column-css-classes column theme
function reblocks-ui2/tables/table:column title &key (getter nil getter-given-p) (cell-maker nil cell-maker-p) (align :center) (classes nil clases-given-p)
function reblocks-ui2/tables/table:current-cell
function reblocks-ui2/tables/table:current-column
function reblocks-ui2/tables/table:current-row
function reblocks-ui2/tables/table:current-table
function reblocks-ui2/tables/table:make-table columns rows &key (table-class 'table-widget) (row-class nil row-class-given-p)
function reblocks-ui2/tables/table:recalculate-cells row &key (update t)
Updates cell widgets using base object, stored in the ROW.
package reblocks-ui2/themes/api
function reblocks-ui2/themes/api:current-theme
macro reblocks-ui2/themes/api:deftheme name bases &rest var-forms
package reblocks-ui2/themes/base
class reblocks-ui2/themes/base:base-theme ()
A base theme class for all Reblocks-UI2 themes.
Readers
reader reblocks-ui2/themes/base:overrided-vars (base-theme) (:overridden-vars = (make-hash-table :test 'equal))
package reblocks-ui2/themes/color
class reblocks-ui2/themes/color:color ()
Readers
reader reblocks-ui2/themes/color:color-dark (color) (:dark = nil)
reader reblocks-ui2/themes/color:color-focus (color) (:focus = nil)
If string, then it is a color of element in "focus" state. If integer, then it is intensity change relative to the base color. For light scheme intensity will be changed down if number is positive, for dark scheme intencity will go up. Negative number reverses this behaviour.
reader reblocks-ui2/themes/color:color-hover (color) (:hover = nil)
If string, then it is a color of element in "hover" state. If integer, then it is intensity change relative to the base color. For light scheme intensity will be changed down if number is positive, for dark scheme intencity will go up. Negative number reverses this behaviour.
reader reblocks-ui2/themes/color:color-light (color) (:light = nil)
reader reblocks-ui2/themes/color:color-property (color) (:PROPERTY = (REQUIRED-ARGUMENT "property"))
generic-function reblocks-ui2/themes/color:adjust-base-color theme base-color adjustment
function reblocks-ui2/themes/color:adjust-color theme color &key (light nil light-p) (dark nil dark-p) (hover nil hover-p) (focus nil focus-p)
function reblocks-ui2/themes/color:color property &key light dark hover focus
package reblocks-ui2/themes/styling
generic-function reblocks-ui2/themes/styling:css-classes object theme &key size invalid-state
Returns classes for a widget or it's property.
Result can be a list, string or a keyword.
generic-function reblocks-ui2/themes/styling:css-styles object theme
function reblocks-ui2/themes/styling:join-css-classes theme &rest classes
function reblocks-ui2/themes/styling:join-css-styles &rest styles
package reblocks-ui2/themes/tailwind
class reblocks-ui2/themes/tailwind:tailwind-theme (base-theme)
generic-function reblocks-ui2/themes/tailwind:card-border-radius theme
generic-function reblocks-ui2/themes/tailwind:colors-bg-action theme
generic-function reblocks-ui2/themes/tailwind:colors-bg-danger theme
generic-function reblocks-ui2/themes/tailwind:colors-bg-info theme
generic-function reblocks-ui2/themes/tailwind:colors-bg-normal theme
generic-function reblocks-ui2/themes/tailwind:colors-bg-success theme
generic-function reblocks-ui2/themes/tailwind:colors-bg-utility theme
generic-function reblocks-ui2/themes/tailwind:colors-bg-warning theme
generic-function reblocks-ui2/themes/tailwind:colors-border-action theme
generic-function reblocks-ui2/themes/tailwind:colors-border-danger theme
generic-function reblocks-ui2/themes/tailwind:colors-border-info theme
generic-function reblocks-ui2/themes/tailwind:colors-border-normal theme
generic-function reblocks-ui2/themes/tailwind:colors-border-success theme
generic-function reblocks-ui2/themes/tailwind:colors-border-utility theme
generic-function reblocks-ui2/themes/tailwind:colors-border-warning theme
generic-function reblocks-ui2/themes/tailwind:colors-line-normal theme
generic-function reblocks-ui2/themes/tailwind:colors-text-normal theme
generic-function reblocks-ui2/themes/tailwind:core-margin-sizes theme
generic-function reblocks-ui2/themes/tailwind:core-mode theme
generic-function reblocks-ui2/themes/tailwind:core-padding-sizes theme
generic-function reblocks-ui2/themes/tailwind:tabs-active-color theme
macro reblocks-ui2/themes/tailwind:make-tailwind-theme &rest overriden-var-forms
Creates a theme object.
package reblocks-ui2/themes/tailwind/arbitrary
class reblocks-ui2/themes/tailwind/arbitrary:arbitrary-value ()
Readers
reader reblocks-ui2/themes/tailwind/arbitrary:arbitrary-value-args (arbitrary-value) (:args)
reader reblocks-ui2/themes/tailwind/arbitrary:arbitrary-value-prefix (arbitrary-value) (:prefix)
function reblocks-ui2/themes/tailwind/arbitrary:arbitrary-value prefix &rest args
package reblocks-ui2/utils/align
class reblocks-ui2/utils/align:horizontal-align ()
Readers
reader reblocks-ui2/utils/align:horizontal-align-value (horizontal-align) (:value)
class reblocks-ui2/utils/align:vertical-align ()
Readers
reader reblocks-ui2/utils/align:vertical-align-value (vertical-align) (:value)
function reblocks-ui2/utils/align:horizontal-align value
function reblocks-ui2/utils/align:vertical-align value
type reblocks-ui2/utils/align:horizontal-align-value
(MEMBER :LEFT :CENTER :TOP)
type reblocks-ui2/utils/align:vertical-align-value
(MEMBER :TOP :CENTER :BOTTOM)
package reblocks-ui2/utils/margin
class reblocks-ui2/utils/margin:margin ()
Readers
reader reblocks-ui2/utils/margin:margin-bottom (margin) (:bottom = nil)
reader reblocks-ui2/utils/margin:margin-left (margin) (:left = nil)
reader reblocks-ui2/utils/margin:margin-right (margin) (:right = nil)
reader reblocks-ui2/utils/margin:margin-top (margin) (:top = nil)
function reblocks-ui2/utils/margin:margin value
package reblocks-ui2/utils/padding
class reblocks-ui2/utils/padding:padding ()
Readers
reader reblocks-ui2/utils/padding:padding-horizontal-size (padding) (:horizontal = :l)
reader reblocks-ui2/utils/padding:padding-vertical-size (padding) (:vertical = :l)
function reblocks-ui2/utils/padding:padding size
type reblocks-ui2/utils/padding:nullable-padding-size
(OR NULL PADDING-SIZE)
type reblocks-ui2/utils/padding:padding-size
(MEMBER :S :M :L :XL)
package reblocks-ui2/utils/primitive-to
function reblocks-ui2/utils/primitive-to:process-primitive-args keyword-args
package reblocks-ui2/utils/size
class reblocks-ui2/utils/size:height (size)
class reblocks-ui2/utils/size:responsive-height ()
Readers
reader reblocks-ui2/utils/size:max-height (responsive-height) (:max = nil)
reader reblocks-ui2/utils/size:min-height (responsive-height) (:min = nil)
class reblocks-ui2/utils/size:responsive-width ()
Readers
reader reblocks-ui2/utils/size:max-width (responsive-width) (:max = nil)
reader reblocks-ui2/utils/size:min-width (responsive-width) (:min = nil)
class reblocks-ui2/utils/size:size ()
Readers
reader reblocks-ui2/utils/size:size-value (size) (:value)
If integer, then it will be considered as "px". If string, then will be used as is (meaning depends on current theme).
class reblocks-ui2/utils/size:width (size)
function reblocks-ui2/utils/size:ensure-height value
function reblocks-ui2/utils/size:ensure-width value
function reblocks-ui2/utils/size:height value
function reblocks-ui2/utils/size:responsive-height &key min max
function reblocks-ui2/utils/size:responsive-width &key min max
function reblocks-ui2/utils/size:width value
type reblocks-ui2/utils/size:some-height
(OR HEIGHT RESPONSIVE-HEIGHT)
type reblocks-ui2/utils/size:some-width
(OR WIDTH RESPONSIVE-WIDTH)
package reblocks-ui2/utils/walk
generic-function reblocks-ui2/utils/walk:children widget
generic-function reblocks-ui2/utils/walk:walk widget visitor-func
A protocol to go through widgets tree and to call VISITOR-FUNC on each node.
package reblocks-ui2/widget
class reblocks-ui2/widget:ui-widget (widget)
Readers
reader reblocks-ui2/widget:on-click (ui-widget) (:on-click = nil)
When an on-click action is given, cursor style will be changed to "pointer".
reader reblocks-ui2/widget:widget-height (ui-widget) (:height = nil)
reader reblocks-ui2/widget:widget-margin (ui-widget) (:margin = nil)
reader reblocks-ui2/widget:widget-width (ui-widget) (:width = nil)
generic-function reblocks-ui2/widget:get-dependencies widget theme
Works like reblocks/dependencies:get-dependencies generic-function, but
in context of current theme.
generic-function reblocks-ui2/widget:get-html-tag widget theme
Works like reblocks/widget:get-html-tag generic-function, but
in context of current theme.
generic-function reblocks-ui2/widget:html-attrs widget theme
May return a plist of attributes to add to the main widget's HTML node.
It should not return :ID :CLASS or :ONCLICK attributes.
generic-function reblocks-ui2/widget:render widget theme
Renders widget in given theme. All reblocks-ui2 widgets
should implement this method instead of a method
for reblocks/widget:render generic-function.