Macaw.Builtin.Drawer (macaw v0.6.0)

Copy Markdown View Source

The built-in drawer (spec/05 §5.7), "macaw.drawer": one pane behind a toggle, of kind :container, :pure: a disclosure, or a non-modal dialog.

  • parameters: label (text, "Details"), the drawer's name and its toggle's text; open (text, "", bindable), the pane's name when open, "" when closed; as ("disclosure" or "dialog"), its pattern;
  • declarations: no slots; the event "open" with its default action setting open from the event's value (spec/05 §5.3); it observes :activate;
  • panes: exactly one; it shows it when open names it;
  • markup: a toggle button, aria-expanded whether the pane shows and aria-controls its panel, emitting open with the pane when closed and "" when open, or, given a link for it, an <a href> to that view; the panel a named region (a disclosure) or a <dialog> named by the toggle with a close button first in it, holding the pane's markup when shown and empty and hidden when not;
  • stylesheet: stylesheet/0, served at stylesheet_path/0, its content address.

Summary

Functions

The drawer's one static stylesheet: the toggle, the panel and the dialog's close button, every color a theme custom property with the default theme's value as its fallback. It loads and imports nothing.

The stylesheet's path, its content address (Macaw.Component.Stylesheet.path/1).

Functions

stylesheet()

@spec stylesheet() :: String.t()

The drawer's one static stylesheet: the toggle, the panel and the dialog's close button, every color a theme custom property with the default theme's value as its fallback. It loads and imports nothing.

stylesheet_path()

@spec stylesheet_path() :: String.t()

The stylesheet's path, its content address (Macaw.Component.Stylesheet.path/1).