Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit f34703f

Browse files
committed
v0.12.0 class files
1 parent 82d1b7e commit f34703f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+9974
-18
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
44

55
## Unreleased
66

7+
## [0.12.0] - 2018-06-01
8+
### Changed
9+
- `dash_html_components/__init__.py` now imports from python class files rather than generating classes at runtime,
10+
adding support for IDE autocomplete ect.
11+
712
## [0.11.0] - 2018-06-01
813
### Added
914
- A `n_clicks_timestamp` property was added to all of the components. This property represents the date that the element was clicked on and can be used to determine _which element was clicked on_ in callbacks with multiple elements. This is considered a stop-gap solution: ultimately we'll want a solution that works for _all_ properties across all components, not just the `n_clicks` property. https://github.com/plotly/dash-html-components/pull/45

dash_html_components/A.py

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
from dash.development.base_component import Component
2+
3+
4+
class A(Component):
5+
"""A A component.
6+
7+
8+
Keyword arguments:
9+
- children (a list of or a singular dash component, string or number; optional): The children of this component
10+
- id (string; optional): The ID of this component, used to identify dash components
11+
in callbacks. The ID needs to be unique across all of the
12+
components in an app.
13+
- n_clicks (optional): An integer that represents the number of times
14+
that this element has been clicked on.
15+
- n_clicks_timestamp (optional): An integer that represents the time (in ms since 1970)
16+
at which n_clicks changed. This can be used to tell
17+
which button was changed most recently.
18+
- key (string; optional): A unique identifier for the component, used to improve
19+
performance by React.js while rendering components
20+
See https://reactjs.org/docs/lists-and-keys.html for more info
21+
- role (string; optional): The ARIA role attribute
22+
- data-* (string; optional): A wildcard data attribute
23+
- aria-* (string; optional): A wildcard aria attribute
24+
- download (string; optional): Indicates that the hyperlink is to be used for downloading a resource.
25+
- href (string; optional): The URL of a linked resource.
26+
- hrefLang (string; optional): Specifies the language of the linked resource.
27+
- media (string; optional): Specifies a hint of the media for which the linked resource was designed.
28+
- rel (string; optional): Specifies the relationship of the target object to the link object.
29+
- shape (string; optional)
30+
- target (string; optional)
31+
- accessKey (string; optional): Defines a keyboard shortcut to activate or add focus to the element.
32+
- className (string; optional): Often used with CSS to style elements with common properties.
33+
- contentEditable (string; optional): Indicates whether the element's content is editable.
34+
- contextMenu (string; optional): Defines the ID of a <menu> element which will serve as the element's context menu.
35+
- dir (string; optional): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
36+
- draggable (string; optional): Defines whether the element can be dragged.
37+
- hidden (string; optional): Prevents rendering of given element, while keeping child elements, e.g. script elements, active.
38+
- lang (string; optional): Defines the language used in the element.
39+
- spellCheck (string; optional): Indicates whether spell checking is allowed for the element.
40+
- style (dict; optional): Defines CSS styles which will override styles previously set.
41+
- tabIndex (string; optional): Overrides the browser's default tab order and follows the one specified instead.
42+
- title (string; optional): Text to be displayed in a tooltip when hovering over the element.
43+
44+
Available events: 'click'"""
45+
def __init__(self, children=None, **kwargs):
46+
self._prop_names = ['children', 'id', 'n_clicks', 'n_clicks_timestamp', 'key', 'role', 'data-*', 'aria-*', 'download', 'href', 'hrefLang', 'media', 'rel', 'shape', 'target', 'accessKey', 'className', 'contentEditable', 'contextMenu', 'dir', 'draggable', 'hidden', 'lang', 'spellCheck', 'style', 'tabIndex', 'title']
47+
self._type = 'A'
48+
self._namespace = 'lib'
49+
self._valid_wildcard_attributes = ['data-', 'aria-']
50+
self.available_events = ['click']
51+
self.available_properties = ['children', 'id', 'n_clicks', 'n_clicks_timestamp', 'key', 'role', 'data-*', 'aria-*', 'download', 'href', 'hrefLang', 'media', 'rel', 'shape', 'target', 'accessKey', 'className', 'contentEditable', 'contextMenu', 'dir', 'draggable', 'hidden', 'lang', 'spellCheck', 'style', 'tabIndex', 'title']
52+
self.available_wildcard_properties = ['data-', 'aria-']
53+
54+
for k in []:
55+
if k not in kwargs:
56+
raise TypeError(
57+
'Required argument `' + k + '` was not specified.')
58+
59+
super(A, self).__init__(children=children, **kwargs)
60+
61+
def __repr__(self):
62+
if(any(getattr(self, c, None) is not None
63+
for c in self._prop_names
64+
if c is not self._prop_names[0])
65+
or any(getattr(self, c, None) is not None
66+
for c in self.__dict__.keys()
67+
if any(c.startswith(wc_attr)
68+
for wc_attr in self._valid_wildcard_attributes))):
69+
props_string = ', '.join([c+'='+repr(getattr(self, c, None))
70+
for c in self._prop_names
71+
if getattr(self, c, None) is not None])
72+
wilds_string = ', '.join([c+'='+repr(getattr(self, c, None))
73+
for c in self.__dict__.keys()
74+
if any([c.startswith(wc_attr)
75+
for wc_attr in
76+
self._valid_wildcard_attributes])])
77+
return ('A(' + props_string +
78+
(', ' + wilds_string if wilds_string != '' else '') + ')')
79+
else:
80+
return (
81+
'A(' +
82+
repr(getattr(self, self._prop_names[0], None)) + ')')

dash_html_components/Abbr.py

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
from dash.development.base_component import Component
2+
3+
4+
class Abbr(Component):
5+
"""A Abbr component.
6+
7+
8+
Keyword arguments:
9+
- children (a list of or a singular dash component, string or number; optional): The children of this component
10+
- id (string; optional): The ID of this component, used to identify dash components
11+
in callbacks. The ID needs to be unique across all of the
12+
components in an app.
13+
- n_clicks (optional): An integer that represents the number of times
14+
that this element has been clicked on.
15+
- n_clicks_timestamp (optional): An integer that represents the time (in ms since 1970)
16+
at which n_clicks changed. This can be used to tell
17+
which button was changed most recently.
18+
- key (string; optional): A unique identifier for the component, used to improve
19+
performance by React.js while rendering components
20+
See https://reactjs.org/docs/lists-and-keys.html for more info
21+
- role (string; optional): The ARIA role attribute
22+
- data-* (string; optional): A wildcard data attribute
23+
- aria-* (string; optional): A wildcard aria attribute
24+
- accessKey (string; optional): Defines a keyboard shortcut to activate or add focus to the element.
25+
- className (string; optional): Often used with CSS to style elements with common properties.
26+
- contentEditable (string; optional): Indicates whether the element's content is editable.
27+
- contextMenu (string; optional): Defines the ID of a <menu> element which will serve as the element's context menu.
28+
- dir (string; optional): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
29+
- draggable (string; optional): Defines whether the element can be dragged.
30+
- hidden (string; optional): Prevents rendering of given element, while keeping child elements, e.g. script elements, active.
31+
- lang (string; optional): Defines the language used in the element.
32+
- spellCheck (string; optional): Indicates whether spell checking is allowed for the element.
33+
- style (dict; optional): Defines CSS styles which will override styles previously set.
34+
- tabIndex (string; optional): Overrides the browser's default tab order and follows the one specified instead.
35+
- title (string; optional): Text to be displayed in a tooltip when hovering over the element.
36+
37+
Available events: 'click'"""
38+
def __init__(self, children=None, **kwargs):
39+
self._prop_names = ['children', 'id', 'n_clicks', 'n_clicks_timestamp', 'key', 'role', 'data-*', 'aria-*', 'accessKey', 'className', 'contentEditable', 'contextMenu', 'dir', 'draggable', 'hidden', 'lang', 'spellCheck', 'style', 'tabIndex', 'title']
40+
self._type = 'Abbr'
41+
self._namespace = 'lib'
42+
self._valid_wildcard_attributes = ['data-', 'aria-']
43+
self.available_events = ['click']
44+
self.available_properties = ['children', 'id', 'n_clicks', 'n_clicks_timestamp', 'key', 'role', 'data-*', 'aria-*', 'accessKey', 'className', 'contentEditable', 'contextMenu', 'dir', 'draggable', 'hidden', 'lang', 'spellCheck', 'style', 'tabIndex', 'title']
45+
self.available_wildcard_properties = ['data-', 'aria-']
46+
47+
for k in []:
48+
if k not in kwargs:
49+
raise TypeError(
50+
'Required argument `' + k + '` was not specified.')
51+
52+
super(Abbr, self).__init__(children=children, **kwargs)
53+
54+
def __repr__(self):
55+
if(any(getattr(self, c, None) is not None
56+
for c in self._prop_names
57+
if c is not self._prop_names[0])
58+
or any(getattr(self, c, None) is not None
59+
for c in self.__dict__.keys()
60+
if any(c.startswith(wc_attr)
61+
for wc_attr in self._valid_wildcard_attributes))):
62+
props_string = ', '.join([c+'='+repr(getattr(self, c, None))
63+
for c in self._prop_names
64+
if getattr(self, c, None) is not None])
65+
wilds_string = ', '.join([c+'='+repr(getattr(self, c, None))
66+
for c in self.__dict__.keys()
67+
if any([c.startswith(wc_attr)
68+
for wc_attr in
69+
self._valid_wildcard_attributes])])
70+
return ('Abbr(' + props_string +
71+
(', ' + wilds_string if wilds_string != '' else '') + ')')
72+
else:
73+
return (
74+
'Abbr(' +
75+
repr(getattr(self, self._prop_names[0], None)) + ')')

dash_html_components/Acronym.py

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
from dash.development.base_component import Component
2+
3+
4+
class Acronym(Component):
5+
"""A Acronym component.
6+
7+
8+
Keyword arguments:
9+
- children (a list of or a singular dash component, string or number; optional): The children of this component
10+
- id (string; optional): The ID of this component, used to identify dash components
11+
in callbacks. The ID needs to be unique across all of the
12+
components in an app.
13+
- n_clicks (optional): An integer that represents the number of times
14+
that this element has been clicked on.
15+
- n_clicks_timestamp (optional): An integer that represents the time (in ms since 1970)
16+
at which n_clicks changed. This can be used to tell
17+
which button was changed most recently.
18+
- key (string; optional): A unique identifier for the component, used to improve
19+
performance by React.js while rendering components
20+
See https://reactjs.org/docs/lists-and-keys.html for more info
21+
- role (string; optional): The ARIA role attribute
22+
- data-* (string; optional): A wildcard data attribute
23+
- aria-* (string; optional): A wildcard aria attribute
24+
- accessKey (string; optional): Defines a keyboard shortcut to activate or add focus to the element.
25+
- className (string; optional): Often used with CSS to style elements with common properties.
26+
- contentEditable (string; optional): Indicates whether the element's content is editable.
27+
- contextMenu (string; optional): Defines the ID of a <menu> element which will serve as the element's context menu.
28+
- dir (string; optional): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
29+
- draggable (string; optional): Defines whether the element can be dragged.
30+
- hidden (string; optional): Prevents rendering of given element, while keeping child elements, e.g. script elements, active.
31+
- lang (string; optional): Defines the language used in the element.
32+
- spellCheck (string; optional): Indicates whether spell checking is allowed for the element.
33+
- style (dict; optional): Defines CSS styles which will override styles previously set.
34+
- tabIndex (string; optional): Overrides the browser's default tab order and follows the one specified instead.
35+
- title (string; optional): Text to be displayed in a tooltip when hovering over the element.
36+
37+
Available events: 'click'"""
38+
def __init__(self, children=None, **kwargs):
39+
self._prop_names = ['children', 'id', 'n_clicks', 'n_clicks_timestamp', 'key', 'role', 'data-*', 'aria-*', 'accessKey', 'className', 'contentEditable', 'contextMenu', 'dir', 'draggable', 'hidden', 'lang', 'spellCheck', 'style', 'tabIndex', 'title']
40+
self._type = 'Acronym'
41+
self._namespace = 'lib'
42+
self._valid_wildcard_attributes = ['data-', 'aria-']
43+
self.available_events = ['click']
44+
self.available_properties = ['children', 'id', 'n_clicks', 'n_clicks_timestamp', 'key', 'role', 'data-*', 'aria-*', 'accessKey', 'className', 'contentEditable', 'contextMenu', 'dir', 'draggable', 'hidden', 'lang', 'spellCheck', 'style', 'tabIndex', 'title']
45+
self.available_wildcard_properties = ['data-', 'aria-']
46+
47+
for k in []:
48+
if k not in kwargs:
49+
raise TypeError(
50+
'Required argument `' + k + '` was not specified.')
51+
52+
super(Acronym, self).__init__(children=children, **kwargs)
53+
54+
def __repr__(self):
55+
if(any(getattr(self, c, None) is not None
56+
for c in self._prop_names
57+
if c is not self._prop_names[0])
58+
or any(getattr(self, c, None) is not None
59+
for c in self.__dict__.keys()
60+
if any(c.startswith(wc_attr)
61+
for wc_attr in self._valid_wildcard_attributes))):
62+
props_string = ', '.join([c+'='+repr(getattr(self, c, None))
63+
for c in self._prop_names
64+
if getattr(self, c, None) is not None])
65+
wilds_string = ', '.join([c+'='+repr(getattr(self, c, None))
66+
for c in self.__dict__.keys()
67+
if any([c.startswith(wc_attr)
68+
for wc_attr in
69+
self._valid_wildcard_attributes])])
70+
return ('Acronym(' + props_string +
71+
(', ' + wilds_string if wilds_string != '' else '') + ')')
72+
else:
73+
return (
74+
'Acronym(' +
75+
repr(getattr(self, self._prop_names[0], None)) + ')')

dash_html_components/Address.py

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
from dash.development.base_component import Component
2+
3+
4+
class Address(Component):
5+
"""A Address component.
6+
7+
8+
Keyword arguments:
9+
- children (a list of or a singular dash component, string or number; optional): The children of this component
10+
- id (string; optional): The ID of this component, used to identify dash components
11+
in callbacks. The ID needs to be unique across all of the
12+
components in an app.
13+
- n_clicks (optional): An integer that represents the number of times
14+
that this element has been clicked on.
15+
- n_clicks_timestamp (optional): An integer that represents the time (in ms since 1970)
16+
at which n_clicks changed. This can be used to tell
17+
which button was changed most recently.
18+
- key (string; optional): A unique identifier for the component, used to improve
19+
performance by React.js while rendering components
20+
See https://reactjs.org/docs/lists-and-keys.html for more info
21+
- role (string; optional): The ARIA role attribute
22+
- data-* (string; optional): A wildcard data attribute
23+
- aria-* (string; optional): A wildcard aria attribute
24+
- accessKey (string; optional): Defines a keyboard shortcut to activate or add focus to the element.
25+
- className (string; optional): Often used with CSS to style elements with common properties.
26+
- contentEditable (string; optional): Indicates whether the element's content is editable.
27+
- contextMenu (string; optional): Defines the ID of a <menu> element which will serve as the element's context menu.
28+
- dir (string; optional): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
29+
- draggable (string; optional): Defines whether the element can be dragged.
30+
- hidden (string; optional): Prevents rendering of given element, while keeping child elements, e.g. script elements, active.
31+
- lang (string; optional): Defines the language used in the element.
32+
- spellCheck (string; optional): Indicates whether spell checking is allowed for the element.
33+
- style (dict; optional): Defines CSS styles which will override styles previously set.
34+
- tabIndex (string; optional): Overrides the browser's default tab order and follows the one specified instead.
35+
- title (string; optional): Text to be displayed in a tooltip when hovering over the element.
36+
37+
Available events: 'click'"""
38+
def __init__(self, children=None, **kwargs):
39+
self._prop_names = ['children', 'id', 'n_clicks', 'n_clicks_timestamp', 'key', 'role', 'data-*', 'aria-*', 'accessKey', 'className', 'contentEditable', 'contextMenu', 'dir', 'draggable', 'hidden', 'lang', 'spellCheck', 'style', 'tabIndex', 'title']
40+
self._type = 'Address'
41+
self._namespace = 'lib'
42+
self._valid_wildcard_attributes = ['data-', 'aria-']
43+
self.available_events = ['click']
44+
self.available_properties = ['children', 'id', 'n_clicks', 'n_clicks_timestamp', 'key', 'role', 'data-*', 'aria-*', 'accessKey', 'className', 'contentEditable', 'contextMenu', 'dir', 'draggable', 'hidden', 'lang', 'spellCheck', 'style', 'tabIndex', 'title']
45+
self.available_wildcard_properties = ['data-', 'aria-']
46+
47+
for k in []:
48+
if k not in kwargs:
49+
raise TypeError(
50+
'Required argument `' + k + '` was not specified.')
51+
52+
super(Address, self).__init__(children=children, **kwargs)
53+
54+
def __repr__(self):
55+
if(any(getattr(self, c, None) is not None
56+
for c in self._prop_names
57+
if c is not self._prop_names[0])
58+
or any(getattr(self, c, None) is not None
59+
for c in self.__dict__.keys()
60+
if any(c.startswith(wc_attr)
61+
for wc_attr in self._valid_wildcard_attributes))):
62+
props_string = ', '.join([c+'='+repr(getattr(self, c, None))
63+
for c in self._prop_names
64+
if getattr(self, c, None) is not None])
65+
wilds_string = ', '.join([c+'='+repr(getattr(self, c, None))
66+
for c in self.__dict__.keys()
67+
if any([c.startswith(wc_attr)
68+
for wc_attr in
69+
self._valid_wildcard_attributes])])
70+
return ('Address(' + props_string +
71+
(', ' + wilds_string if wilds_string != '' else '') + ')')
72+
else:
73+
return (
74+
'Address(' +
75+
repr(getattr(self, self._prop_names[0], None)) + ')')

0 commit comments

Comments
 (0)