U
    ÛZßf¯  ã                   @   s$   d dl mZmZ G dd„ deƒZdS )é    )Ú	ComponentÚ_explicitize_argsc                       sr   e Zd ZdZg ZdgZdZd Zede	j
e	j
e	j
e	j
e	j
e	j
e	j
e	j
e	j
e	j
e	j
e	j
e	j
e	j
f‡ fdd„	ƒZ‡  ZS )ÚSpinneraØ	  A Spinner component.
Render Bootstrap style loading spinners using only CSS.

This component can be used standalone to render a loading spinner, or it can
be used like `dash_core_components.Loading` by giving it children. In the
latter case the chosen spinner will display while the children are loading.

Keyword arguments:

- children (a list of or a singular dash component, string or number; optional):
    The children of this component.

- id (string; optional):
    The ID of this component, used to identify dash components in
    callbacks. The ID needs to be unique across all of the components
    in an app.

- color (string; optional):
    Sets the color of the Spinner. Main options are Bootstrap
    contextual colors: primary, secondary, success, info, warning,
    danger, light, dark, body, muted, white-50, black-50. You can also
    specify any valid CSS color of your choice (e.g. a hex code, a
    decimal code or a CSS color name)  If not specified will default
    to text colour.

- delay_hide (number; default 0):
    When using the spinner as a loading spinner, add a time delay (in
    ms) to the spinner being removed to prevent flickering.

- delay_show (number; default 0):
    When using the spinner as a loading spinner, add a time delay (in
    ms) to the spinner being shown after the loading_state is set to
    True.

- fullscreen (boolean; optional):
    Boolean that determines if the loading spinner will be displayed
    full-screen or not.

- fullscreenClassName (string; optional):
    **DEPRECATED** - use `fullscreen_class_name` instead.  Often used
    with CSS to style elements with common properties.

- fullscreen_class_name (string; optional):
    Often used with CSS to style elements with common properties.

- fullscreen_style (dict; optional):
    Defines CSS styles for the container when fullscreen=True.

- show_initially (boolean; default True):
    Whether the Spinner should show on app start-up before the loading
    state has been determined. Default True.

- size (string; optional):
    The spinner size. Options are 'sm', and 'md'.

- spinnerClassName (string; optional):
    **DEPRECATED** - use `spinner_class_name` instead.  CSS class
    names to apply to the spinner.

- spinner_class_name (string; optional):
    CSS class names to apply to the spinner.

- spinner_style (dict; optional):
    Inline CSS styles to apply to the spinner.

- type (string; default 'border'):
    The type of spinner. Options 'border' and 'grow'. Default
    'border'.ÚchildrenZdash_bootstrap_componentsNc                    sž   ddddddddd	d
dddddg| _ g | _ddddddddd	d
dddddg| _g | _| d¡}tƒ ‰ ˆ  |¡ ‡ fdd„|D ƒ}tt| ƒj	f d|i|—Ž d S )Nr   ÚidÚcolorÚ
delay_hideÚ
delay_showÚ
fullscreenÚfullscreenClassNameÚfullscreen_class_nameÚfullscreen_styleÚshow_initiallyÚsizeÚspinnerClassNameÚspinner_class_nameÚspinner_styleÚtypeÚ_explicit_argsc                    s   i | ]}|d kr|ˆ | “qS )r   © )Ú.0Úk©Z_localsr   úQ/tmp/pip-unpacked-wheel-gvynaulb/dash_bootstrap_components/_components/Spinner.pyÚ
<dictcomp>X   s       z$Spinner.__init__.<locals>.<dictcomp>)
Z_prop_namesZ_valid_wildcard_attributesZavailable_propertiesZavailable_wildcard_propertiesÚpopÚlocalsÚupdateÚsuperr   Ú__init__)Úselfr   r   r   r   r   r   r   r   r   r   r   r
   r   r	   r   Úkwargsr   Úargs©Ú	__class__r   r   r   O   s    $$

zSpinner.__init__)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Z_children_propsZ_base_nodesÚ
_namespaceÚ_typer   r   Ú	UNDEFINEDr   Ú__classcell__r   r   r#   r   r      s   Dr   N)Zdash.development.base_componentr   r   r   r   r   r   r   Ú<module>   s   