limestone/ContextualPopupDecorator
A higher-order component to add a Limestone styled popup to a component.
Members
Section titled “Members ”ContextualPopupDecorator Higher-Order Component
Section titled “ContextualPopupDecorator   Higher-Order Component ”Adds support for positioning a limestone/ContextualPopupDecoratorlimestone/ContextualPopupDecorator.ContextualPopup relative to the wrapped component.
ContextualPopupDecorator may be used to show additional settings or actions rendered within a
small floating popup.
Usage:
const ButtonWithPopup = ContextualPopupDecorator(Button);
<ButtonWithPopup
direction="above center"
open={this.state.open}
popupComponent={CustomPopupComponent}
>
Open Popup
</ButtonWithPopup>
Configuration
noArrow
Section titled “noArrow”ContextualPopup without the arrow.
noSkin
Section titled “noSkin”Disables passing the skin prop to the wrapped component.
openProp
Section titled “openProp”The prop in which to pass the value of open state of ContextualPopupDecorator to the
wrapped component.
Properties added to wrapped component
positionContextualPopup
Section titled “positionContextualPopup”Position the popup in relation to the activator.
Position is based on the dimensions of the popup and its activator. If the popup does not fit in the specified direction, it will automatically flip to the opposite direction.
Required Property • popupComponent
Section titled “Required Property • popupComponent”The component rendered within the limestone/ContextualPopupDecoratorlimestone/ContextualPopupDecorator.ContextualPopup.
data-webos-voice-exclusive
Section titled “data-webos-voice-exclusive”Limits the range of voice control to the popup.
Default: truedirection
Section titled “direction”Direction of popup with respect to the wrapped component.
Default: 'below center'noAutoDismiss
Section titled “noAutoDismiss”Disables closing the popup when the user presses the cancel/back (e.g. ESC) key or taps outside the
popup.
Offset from the activator to apply to the position of the popup.
Only applies when noArrow is true.
onClose
Section titled “onClose”Called when the user has attempted to close the popup.
This may occur either when the close button is clicked or when spotlight focus
moves outside the boundary of the popup. Setting spotlightRestrict to 'self-only'
will prevent Spotlight focus from leaving the popup.
onOpen
Section titled “onOpen”Called when the popup is opened.
Displays the contextual popup.
Default: falsepopupClassName
Section titled “popupClassName”CSS class name to pass to the limestone/ContextualPopupDecoratorlimestone/ContextualPopupDecorator.ContextualPopup.
This is commonly used to set width and height of the popup.
popupProps
Section titled “popupProps”An object containing properties to be passed to popup component.
popupSpotlightId
Section titled “popupSpotlightId”The container ID to use with Spotlight.
The spotlight container for the popup isn't created until it is open. To configure
the container using Spotlight.set(), handle the onOpen event which is fired after
the popup has been created and opened.
The current skin for this component.
When noSkin is set on the config object, skin will only be applied to the
limestone/ContextualPopupDecoratorlimestone/ContextualPopupDecorator.ContextualPopup and not
to the popup's activator component.
Restricts or prioritizes spotlight navigation.
Allowed values are:
'none'- Spotlight can move freely within and beyond the popup'self-first'- Spotlight should prefer components within the popup over components beyond the popup, or'self-only'- Spotlight can only be set within the popup
ContextualPopup Component
Section titled “ContextualPopup   Component ”A popup component used by limestone/ContextualPopupDecoratorlimestone/ContextualPopupDecorator.ContextualPopupDecorator to wrap its limestone/ContextualPopupDecoratorlimestone/ContextualPopupDecorator.ContextualPopupDecorator.popupComponent.
ContextualPopup is usually not used directly but is made available for unique application use
cases.
Properties
Required Property • children
Section titled “Required Property • children”The contents of the popup.
arrowPosition
Section titled “arrowPosition”Style object for arrow position.
containerPosition
Section titled “containerPosition”Style object for container position.
Called with the reference to the container node.
direction
Section titled “direction”Direction of ContextualPopup.
Default: 'below'Offset from the activator to apply to the position of the popup.
Default: 'small'showArrow
Section titled “showArrow”Shows the arrow.
Default: false