@esrf/daiquiri-lib
A variety of the daiquiri-ui components are exported into a shared package published as @esrf/daiquiri-lib. This allows for a consistent look and feel in other projects.
Features available in the library are marked throughout the documentation with the daiquiri-lib badge
Layout Manager
The YAML layout language and associated render are available in @esrf/daiquiri-lib. See the Layout Manager for more information.
The library exports:
YAMLLayout
- The main rendererYAMLErrorBoundary
- To catch YAML related parsing / syntax errors at run timerenderYamlNode
- Render a single noderegisterYamlComponent
- To register components into the available listYamlComponent
,YamlNode
- Types
Monitor Panel
A monitor panel that can be used in the application header and provides an overview of object statuses at a glance.
The library exports:
MonitorPanel
- The main panelMonitorPanelItem
- ACol
wrapper for an itemregisterMonitorComponent
- Register other monitor typesregisterRuntimeHook
- Register auseHardware
hook to actually retrieve the object of interestdynamicOp
- A helper to determine whether a value isvalid
MonitorPanelProps
andMonitor
- types
Hardware Components
Currently the following hardware components are available in the shared library:
FrontEnd
Info
MotorDefault
Multiposition
Property
ShutterDefault
Custom Components
Custom hardware components can also be constructed using the HardwareTemplate
. See
Developers > Hardware Components for more information.
Exported components / properties / types:
HardwareTemplate
TypeIcon
HardwareVariant
HardwareInputNumber
HardwareNumericStep
HardwareState.HardwareState
- To render a consistent stateHardwareTypes
- Related typesHardwareSchema
- Schema for each hardware object (properties, callables)
CSS / SASS
Styles are exported through src/styles.scss
. This requires that custom-colors
map is defined before importing, for example:
$primary: #272a7c;
$secondary: #9395be;
$info: #46ac32;
$gray: #ddd;
$custom-colors: (
't-purple': $primary,
't-cyan': $info
);
@import '@esrf/daiquiri-lib/src/styles.scss';