reblocks-ui2
2025-06-22
A pack of UI components for Reblocks web-framework.
reblocks-ui2 - A pack of UI components for Reblocks web-framework.
REBLOCKS-UI2 ASDF System Details
- Description: A pack of
UI
components 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
Installation
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)
Usage
TODO
: Write a library description. Put some examples here.
API
REBLOCKS-UI2/BUTTONS/BUTTON
package reblocks-ui2/buttons/button
Classes
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)
Functions
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
REBLOCKS-UI2/BUTTONS/VIEW
package reblocks-ui2/buttons/view
Classes
ACTION
class reblocks-ui2/buttons/view:action
(button-view)
BUTTON-VIEW
class reblocks-ui2/buttons/view:button-view
()
NORMAL-DISABLED
class reblocks-ui2/buttons/view:normal-disabled
(normal)
NORMAL
class reblocks-ui2/buttons/view:normal
(button-view)
OUTLINED-ACTION
class reblocks-ui2/buttons/view:outlined-action
(outlined)
OUTLINED-DANGER
class reblocks-ui2/buttons/view:outlined-danger
(outlined)
OUTLINED-INFO
class reblocks-ui2/buttons/view:outlined-info
(outlined)
OUTLINED-SUCCESS
class reblocks-ui2/buttons/view:outlined-success
(outlined)
OUTLINED-UTILITY
class reblocks-ui2/buttons/view:outlined-utility
(outlined)
OUTLINED-WARNING
class reblocks-ui2/buttons/view:outlined-warning
(outlined)
OUTLINED
class reblocks-ui2/buttons/view:outlined
(button-view)
RAISED-DISABLED
class reblocks-ui2/buttons/view:raised-disabled
(raised)
RAISED
class reblocks-ui2/buttons/view:raised
(button-view)
Generics
generic-function reblocks-ui2/buttons/view:get-disabled-button-view
view
Returns an alternative view for a button in disabled state.
Functions
function reblocks-ui2/buttons/view:ensure-view
name
REBLOCKS-UI2/CARD
package reblocks-ui2/card
Classes
CARD-WIDGET
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)
Functions
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)
REBLOCKS-UI2/CONTAINERS/COLUMN
package reblocks-ui2/containers/column
Classes
COLUMN-WIDGET
class reblocks-ui2/containers/column:column-widget
(container-widget)
Functions
function reblocks-ui2/containers/column:column
&rest subwidgets-and-options
REBLOCKS-UI2/CONTAINERS/CONTAINER
package reblocks-ui2/containers/container
Classes
CONTAINER-WIDGET
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)
Generics
generic-function reblocks-ui2/containers/container:gap-css-classes
gap theme
Functions
function reblocks-ui2/containers/container:make-container
default-widget-class &rest subwidgets-and-options
REBLOCKS-UI2/CONTAINERS/CONTROLS-ROW
package reblocks-ui2/containers/controls-row
Classes
CONTROLS-ROW-WIDGET
class reblocks-ui2/containers/controls-row:controls-row-widget
(row-widget)
Macros
macro reblocks-ui2/containers/controls-row:controls-row
&rest subwidgets-and-options
REBLOCKS-UI2/CONTAINERS/ROW
package reblocks-ui2/containers/row
Classes
ROW-WIDGET
class reblocks-ui2/containers/row:row-widget
(container-widget)
Functions
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
REBLOCKS-UI2/CONTAINERS/STACK
package reblocks-ui2/containers/stack
Classes
STACK-WIDGET
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)
Generics
generic-function reblocks-ui2/containers/stack:pop-child
stack-widget
generic-function reblocks-ui2/containers/stack:push-child
stack-widget child
Functions
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.
REBLOCKS-UI2/CONTAINERS/TABS
package reblocks-ui2/containers/tabs
Classes
TABS-CONTROL
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)
TABS-WIDGET
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)
Functions
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)
Types
type reblocks-ui2/containers/tabs:tabs-size
(MEMBER :M :L :XL)
REBLOCKS-UI2/EDITABLE
package reblocks-ui2/editable
Generics
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.
REBLOCKS-UI2/FORM
package reblocks-ui2/form
Classes
FORM-WIDGET
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)
Functions
function reblocks-ui2/form:form
content &key (widget-class 'form-widget) on-submit
REBLOCKS-UI2/FORM/VALIDATION
package reblocks-ui2/form/validation
Classes
FIELD-VALIDATION-ERROR
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)
FORM-VALIDATION-ERROR
condition reblocks-ui2/form/validation:form-validation-error
(validation-error)
Readers
reader reblocks-ui2/form/validation:num-errors
(form-validation-error) (:num-errors)
VALIDATION-ERROR
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 = '"")
Generics
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
.
REBLOCKS-UI2/HTML
package reblocks-ui2/html
Functions
function reblocks-ui2/html:prop
name &optional default
Macros
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)))
REBLOCKS-UI2/ICON
package reblocks-ui2/icon
Classes
ICON-WIDGET
class reblocks-ui2/icon:icon-widget
(ui-widget)
Readers
reader reblocks-ui2/icon:icon-name
(icon-widget) (:name)
Functions
function reblocks-ui2/icon:icon
name
REBLOCKS-UI2/INPUTS/BASE
package reblocks-ui2/inputs/base
Classes
BASE-INPUT-WIDGET
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)
NAMED-INPUT
class reblocks-ui2/inputs/named:named-input
(ui-widget)
Readers
reader reblocks-ui2/inputs/named:input-name
(named-input) (:name = nil)
REBLOCKS-UI2/INPUTS/NAMED
package reblocks-ui2/inputs/named
Classes
NAMED-INPUT
class reblocks-ui2/inputs/named:named-input
(ui-widget)
Readers
reader reblocks-ui2/inputs/named:input-name
(named-input) (:name = nil)
REBLOCKS-UI2/INPUTS/TEXT-INPUT
package reblocks-ui2/inputs/text-input
Classes
INPUT-WIDGET
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)
Functions
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
REBLOCKS-UI2/INPUTS/TEXT-INPUT/VIEW
package reblocks-ui2/inputs/text-input/view
Classes
CLEAR
class reblocks-ui2/inputs/text-input/view:clear
(input-view)
INPUT-VIEW
class reblocks-ui2/inputs/text-input/view:input-view
()
NORMAL
class reblocks-ui2/inputs/text-input/view:normal
(input-view)
Functions
function reblocks-ui2/inputs/text-input/view:ensure-view
name
REBLOCKS-UI2/SIZES
package reblocks-ui2/sizes
Functions
function reblocks-ui2/sizes:ensure-size
name
REBLOCKS-UI2/TABLES/CLICKABLE-ROW
package reblocks-ui2/tables/clickable-row
Classes
CLICKABLE-ROW-WIDGET
class reblocks-ui2/tables/clickable-row:clickable-row-widget
(table-row)
Functions
function reblocks-ui2/tables/clickable-row:make-clickable-row-widget
REBLOCKS-UI2/TABLES/EDITABLE-TABLE
package reblocks-ui2/tables/editable-table
Classes
EDITABLE-COLUMN
class reblocks-ui2/tables/editable-table:editable-column
(column)
Readers
reader reblocks-ui2/tables/editable-table:data-setter
(editable-column) (:setter = #'default-setter)
EDITABLE-TABLE-WIDGET
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.
ROW-NOT-FOUND
condition reblocks-ui2/tables/editable-table:row-not-found
(error)
Generics
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.
Functions
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)
REBLOCKS-UI2/TABLES/TABLE
package reblocks-ui2/tables/table
Classes
COLUMN
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.")))
TABLE-ROW
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.
TABLE-WIDGET
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)
Generics
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
Functions
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
.
REBLOCKS-UI2/THEMES/API
package reblocks-ui2/themes/api
Functions
function reblocks-ui2/themes/api:current-theme
Macros
macro reblocks-ui2/themes/api:deftheme
name bases &rest var-forms
REBLOCKS-UI2/THEMES/BASE
package reblocks-ui2/themes/base
Classes
BASE-THEME
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))
REBLOCKS-UI2/THEMES/COLOR
package reblocks-ui2/themes/color
Classes
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"))
Generics
generic-function reblocks-ui2/themes/color:adjust-base-color
theme base-color adjustment
Functions
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
REBLOCKS-UI2/THEMES/STYLING
package reblocks-ui2/themes/styling
Generics
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
Functions
function reblocks-ui2/themes/styling:join-css-classes
theme &rest classes
function reblocks-ui2/themes/styling:join-css-styles
&rest styles
REBLOCKS-UI2/THEMES/TAILWIND
package reblocks-ui2/themes/tailwind
Classes
TAILWIND-THEME
class reblocks-ui2/themes/tailwind:tailwind-theme
(base-theme)
Generics
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
Macros
macro reblocks-ui2/themes/tailwind:make-tailwind-theme
&rest overriden-var-forms
Creates a theme object.
REBLOCKS-UI2/THEMES/TAILWIND/ARBITRARY
package reblocks-ui2/themes/tailwind/arbitrary
Classes
ARBITRARY-VALUE
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)
Functions
function reblocks-ui2/themes/tailwind/arbitrary:arbitrary-value
prefix &rest args
REBLOCKS-UI2/UTILS/ALIGN
package reblocks-ui2/utils/align
Classes
HORIZONTAL-ALIGN
class reblocks-ui2/utils/align:horizontal-align
()
Readers
reader reblocks-ui2/utils/align:horizontal-align-value
(horizontal-align) (:value)
VERTICAL-ALIGN
class reblocks-ui2/utils/align:vertical-align
()
Readers
reader reblocks-ui2/utils/align:vertical-align-value
(vertical-align) (:value)
Functions
function reblocks-ui2/utils/align:horizontal-align
value
function reblocks-ui2/utils/align:vertical-align
value
Types
type reblocks-ui2/utils/align:horizontal-align-value
(MEMBER :LEFT :CENTER :TOP)
type reblocks-ui2/utils/align:vertical-align-value
(MEMBER :TOP :CENTER :BOTTOM)
REBLOCKS-UI2/UTILS/MARGIN
package reblocks-ui2/utils/margin
Classes
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)
Functions
function reblocks-ui2/utils/margin:margin
value
REBLOCKS-UI2/UTILS/PADDING
package reblocks-ui2/utils/padding
Classes
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)
Functions
function reblocks-ui2/utils/padding:padding
size
Types
type reblocks-ui2/utils/padding:nullable-padding-size
(OR NULL PADDING-SIZE)
type reblocks-ui2/utils/padding:padding-size
(MEMBER :S :M :L :XL)
REBLOCKS-UI2/UTILS/PRIMITIVE-TO
package reblocks-ui2/utils/primitive-to
Functions
function reblocks-ui2/utils/primitive-to:process-primitive-args
keyword-args
REBLOCKS-UI2/UTILS/SIZE
package reblocks-ui2/utils/size
Classes
HEIGHT
class reblocks-ui2/utils/size:height
(size)
RESPONSIVE-HEIGHT
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)
RESPONSIVE-WIDTH
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)
SIZE
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).
WIDTH
class reblocks-ui2/utils/size:width
(size)
Functions
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
Types
type reblocks-ui2/utils/size:some-height
(OR HEIGHT RESPONSIVE-HEIGHT)
type reblocks-ui2/utils/size:some-width
(OR WIDTH RESPONSIVE-WIDTH)
REBLOCKS-UI2/UTILS/WALK
package reblocks-ui2/utils/walk
Generics
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.
REBLOCKS-UI2/WIDGET
package reblocks-ui2/widget
Classes
UI-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)
Generics
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.