diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-18 04:18:43 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-18 04:18:43 +0000 |
commit | 1585ded4692606c04563eb2467af56d93ec511ca (patch) | |
tree | fd6bccd8dc0cca14eb52dd2a816afd1e8e17e74f | |
parent | cad1ab821f271a0c3dafba4e6148a68de6adf9b2 (diff) |
automatic import of python-dash-bootstrap-templates
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-dash-bootstrap-templates.spec | 307 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 309 insertions, 0 deletions
@@ -0,0 +1 @@ +/dash-bootstrap-templates-1.0.8.tar.gz diff --git a/python-dash-bootstrap-templates.spec b/python-dash-bootstrap-templates.spec new file mode 100644 index 0000000..29ece19 --- /dev/null +++ b/python-dash-bootstrap-templates.spec @@ -0,0 +1,307 @@ +%global _empty_manifest_terminate_build 0 +Name: python-dash-bootstrap-templates +Version: 1.0.8 +Release: 1 +Summary: A collection of Plotly figure templates with a Bootstrap theme +License: MIT +URL: https://github.com/AnnMarieW/dash-bootstrap-templates +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/24/a6/c8cbfc594c08115406107e9000c9cc961a42aa82da9168f0ae69eb1e79ad/dash-bootstrap-templates-1.0.8.tar.gz +BuildArch: noarch + +Requires: python3-dash +Requires: python3-dash-bootstrap-components +Requires: python3-numpy +Requires: python3-importlib-resources +Requires: python3-importlib-metadata +Requires: python3-tinycss2 +Requires: python3-spectra + +%description +```python +``` +Here is the same app, but using a the `ThemeSwitchAIO` component to toggle between two themes. +See the [(code here)](https://github.com/AnnMarieW/dash-bootstrap-templates/blob/main/examples/demo_toggle.py). +It's also possible to change the icons. See an example of using Bootstrap icons instead of the default FontAwesome +icons [here](https://github.com/AnnMarieW/dash-bootstrap-templates/blob/main/examples/demo_toggle_icons.py). + +## Background +[Dash Labs](https://community.plotly.com/t/introducing-dash-labs/52087) is Plotly library that explores new features for future releases of Dash. +In Dash Labs V0.4.0, there was a cool feature where Bootstrap themed figure templates were created "on the fly". This was a +part of the layout templates project that is no longer being developed. +Even though these Bootstrap themed figure templates will not be included in Dash, the `dash-bootstrap-templates` makes +them available to you. The figure templates are created using the Dash Labs' algorithms and saved in json format. When +you use `load_figure_template()` in your app, it loads the json file, adds it to `plotly.io` and sets it as the default figure template for an app. See more +information about Plotly figure templates [here](https://plotly.com/python/templates/). +## Available Themes +This library provides a figure template for the following Bootstrap/Bootswatch themes: +templates = [ +"bootstrap", +"cerulean", +"cosmo", +"cyborg", +"darkly", +"flatly", +"journal", +"litera", +"lumen", +"lux", +"materia", +"minty", +"morph", +"pulse", +"quartz", +"sandstone", +"simplex", +"sketchy", +"slate", +"solar", +"spacelab", +"superhero", +"united", +"vapor", +"yeti", +"zephyr" +] +## ThemeChangerAIO Reference +**ThemeChangerAIO** is an All-in-One component composed of a parent `html.Div` with +the following components as children: +- `dbc.Button` ("`switch`") Opens the Offcanvas component for user to select a theme. +- `dbc.Offcanvas` ("`offcanvas`") +- `dbc.RadioItems` ("`radio`"). The themes are displayed as RadioItems inside the `dbc.Offcanvas` component. + The `value` is a url for the theme +- `html.Div` is used as the `Output` of the clientside callbacks. +The ThemeChangerAIO component updates the stylesheet when the `value` of radio changes. (ie the user selects a new theme) +- param: `radio_props` A dictionary of properties passed into the dbc.RadioItems component. The default `value` is `dbc.themes.BOOTSTRAP` +- param: `button_props` A dictionary of properties passed into the dbc.Button component. +- param: `offcanvas_props`. A dictionary of properties passed into the dbc.Offcanvas component +- param: `aio_id` The All-in-One component ID used to generate components' dictionary IDs. +The All-in-One component dictionary IDs are available as: +- ThemeChangerAIO.ids.radio(aio_id) +- ThemeChangerAIO.ids.offcanvas(aio_id) +- ThemeChangerAIO.ids.button(aio_id) +## ThemeSwitchAIO Reference +**ThemeSwitchAIO** is an All-in-One component composed of a parent `html.Div` with the following components as children: +- `dbc.Switch` ("`switch`") with icons to the left and right of the switch. +- `dcc.Store` ("`store`") The `themes` are stored in the `data` prop. +- `html.Div` is used as the `Output` of the clientside callbacks. +The ThemeSwitchAIO component updates the stylesheet when triggered by changes to the `value` of `switch` or when +the themes are updated in the "`store`" component. The themes in the switch may be updated in a callback +by changing the theme urls in the "`store`" component. +- param: `switch_props` A dictionary of properties passed into the dbc.Switch component. +- param: `themes` A list of two urls for the external stylesheets or pathnames to files. +- param: `icons` A dict of the icons to the left and right of the switch. The default is + `{"left" :"fa fa-moon", "right" :"fa fa-sun"}`. +- param: `aio_id` The All-in-One component ID used to generate component's dictionary IDs. +The All-in-One component dictionary IDs are available as +- ThemeSwitchAIO.ids.switch(aio_id) + +%package -n python3-dash-bootstrap-templates +Summary: A collection of Plotly figure templates with a Bootstrap theme +Provides: python-dash-bootstrap-templates +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-dash-bootstrap-templates +```python +``` +Here is the same app, but using a the `ThemeSwitchAIO` component to toggle between two themes. +See the [(code here)](https://github.com/AnnMarieW/dash-bootstrap-templates/blob/main/examples/demo_toggle.py). +It's also possible to change the icons. See an example of using Bootstrap icons instead of the default FontAwesome +icons [here](https://github.com/AnnMarieW/dash-bootstrap-templates/blob/main/examples/demo_toggle_icons.py). + +## Background +[Dash Labs](https://community.plotly.com/t/introducing-dash-labs/52087) is Plotly library that explores new features for future releases of Dash. +In Dash Labs V0.4.0, there was a cool feature where Bootstrap themed figure templates were created "on the fly". This was a +part of the layout templates project that is no longer being developed. +Even though these Bootstrap themed figure templates will not be included in Dash, the `dash-bootstrap-templates` makes +them available to you. The figure templates are created using the Dash Labs' algorithms and saved in json format. When +you use `load_figure_template()` in your app, it loads the json file, adds it to `plotly.io` and sets it as the default figure template for an app. See more +information about Plotly figure templates [here](https://plotly.com/python/templates/). +## Available Themes +This library provides a figure template for the following Bootstrap/Bootswatch themes: +templates = [ +"bootstrap", +"cerulean", +"cosmo", +"cyborg", +"darkly", +"flatly", +"journal", +"litera", +"lumen", +"lux", +"materia", +"minty", +"morph", +"pulse", +"quartz", +"sandstone", +"simplex", +"sketchy", +"slate", +"solar", +"spacelab", +"superhero", +"united", +"vapor", +"yeti", +"zephyr" +] +## ThemeChangerAIO Reference +**ThemeChangerAIO** is an All-in-One component composed of a parent `html.Div` with +the following components as children: +- `dbc.Button` ("`switch`") Opens the Offcanvas component for user to select a theme. +- `dbc.Offcanvas` ("`offcanvas`") +- `dbc.RadioItems` ("`radio`"). The themes are displayed as RadioItems inside the `dbc.Offcanvas` component. + The `value` is a url for the theme +- `html.Div` is used as the `Output` of the clientside callbacks. +The ThemeChangerAIO component updates the stylesheet when the `value` of radio changes. (ie the user selects a new theme) +- param: `radio_props` A dictionary of properties passed into the dbc.RadioItems component. The default `value` is `dbc.themes.BOOTSTRAP` +- param: `button_props` A dictionary of properties passed into the dbc.Button component. +- param: `offcanvas_props`. A dictionary of properties passed into the dbc.Offcanvas component +- param: `aio_id` The All-in-One component ID used to generate components' dictionary IDs. +The All-in-One component dictionary IDs are available as: +- ThemeChangerAIO.ids.radio(aio_id) +- ThemeChangerAIO.ids.offcanvas(aio_id) +- ThemeChangerAIO.ids.button(aio_id) +## ThemeSwitchAIO Reference +**ThemeSwitchAIO** is an All-in-One component composed of a parent `html.Div` with the following components as children: +- `dbc.Switch` ("`switch`") with icons to the left and right of the switch. +- `dcc.Store` ("`store`") The `themes` are stored in the `data` prop. +- `html.Div` is used as the `Output` of the clientside callbacks. +The ThemeSwitchAIO component updates the stylesheet when triggered by changes to the `value` of `switch` or when +the themes are updated in the "`store`" component. The themes in the switch may be updated in a callback +by changing the theme urls in the "`store`" component. +- param: `switch_props` A dictionary of properties passed into the dbc.Switch component. +- param: `themes` A list of two urls for the external stylesheets or pathnames to files. +- param: `icons` A dict of the icons to the left and right of the switch. The default is + `{"left" :"fa fa-moon", "right" :"fa fa-sun"}`. +- param: `aio_id` The All-in-One component ID used to generate component's dictionary IDs. +The All-in-One component dictionary IDs are available as +- ThemeSwitchAIO.ids.switch(aio_id) + +%package help +Summary: Development documents and examples for dash-bootstrap-templates +Provides: python3-dash-bootstrap-templates-doc +%description help +```python +``` +Here is the same app, but using a the `ThemeSwitchAIO` component to toggle between two themes. +See the [(code here)](https://github.com/AnnMarieW/dash-bootstrap-templates/blob/main/examples/demo_toggle.py). +It's also possible to change the icons. See an example of using Bootstrap icons instead of the default FontAwesome +icons [here](https://github.com/AnnMarieW/dash-bootstrap-templates/blob/main/examples/demo_toggle_icons.py). + +## Background +[Dash Labs](https://community.plotly.com/t/introducing-dash-labs/52087) is Plotly library that explores new features for future releases of Dash. +In Dash Labs V0.4.0, there was a cool feature where Bootstrap themed figure templates were created "on the fly". This was a +part of the layout templates project that is no longer being developed. +Even though these Bootstrap themed figure templates will not be included in Dash, the `dash-bootstrap-templates` makes +them available to you. The figure templates are created using the Dash Labs' algorithms and saved in json format. When +you use `load_figure_template()` in your app, it loads the json file, adds it to `plotly.io` and sets it as the default figure template for an app. See more +information about Plotly figure templates [here](https://plotly.com/python/templates/). +## Available Themes +This library provides a figure template for the following Bootstrap/Bootswatch themes: +templates = [ +"bootstrap", +"cerulean", +"cosmo", +"cyborg", +"darkly", +"flatly", +"journal", +"litera", +"lumen", +"lux", +"materia", +"minty", +"morph", +"pulse", +"quartz", +"sandstone", +"simplex", +"sketchy", +"slate", +"solar", +"spacelab", +"superhero", +"united", +"vapor", +"yeti", +"zephyr" +] +## ThemeChangerAIO Reference +**ThemeChangerAIO** is an All-in-One component composed of a parent `html.Div` with +the following components as children: +- `dbc.Button` ("`switch`") Opens the Offcanvas component for user to select a theme. +- `dbc.Offcanvas` ("`offcanvas`") +- `dbc.RadioItems` ("`radio`"). The themes are displayed as RadioItems inside the `dbc.Offcanvas` component. + The `value` is a url for the theme +- `html.Div` is used as the `Output` of the clientside callbacks. +The ThemeChangerAIO component updates the stylesheet when the `value` of radio changes. (ie the user selects a new theme) +- param: `radio_props` A dictionary of properties passed into the dbc.RadioItems component. The default `value` is `dbc.themes.BOOTSTRAP` +- param: `button_props` A dictionary of properties passed into the dbc.Button component. +- param: `offcanvas_props`. A dictionary of properties passed into the dbc.Offcanvas component +- param: `aio_id` The All-in-One component ID used to generate components' dictionary IDs. +The All-in-One component dictionary IDs are available as: +- ThemeChangerAIO.ids.radio(aio_id) +- ThemeChangerAIO.ids.offcanvas(aio_id) +- ThemeChangerAIO.ids.button(aio_id) +## ThemeSwitchAIO Reference +**ThemeSwitchAIO** is an All-in-One component composed of a parent `html.Div` with the following components as children: +- `dbc.Switch` ("`switch`") with icons to the left and right of the switch. +- `dcc.Store` ("`store`") The `themes` are stored in the `data` prop. +- `html.Div` is used as the `Output` of the clientside callbacks. +The ThemeSwitchAIO component updates the stylesheet when triggered by changes to the `value` of `switch` or when +the themes are updated in the "`store`" component. The themes in the switch may be updated in a callback +by changing the theme urls in the "`store`" component. +- param: `switch_props` A dictionary of properties passed into the dbc.Switch component. +- param: `themes` A list of two urls for the external stylesheets or pathnames to files. +- param: `icons` A dict of the icons to the left and right of the switch. The default is + `{"left" :"fa fa-moon", "right" :"fa fa-sun"}`. +- param: `aio_id` The All-in-One component ID used to generate component's dictionary IDs. +The All-in-One component dictionary IDs are available as +- ThemeSwitchAIO.ids.switch(aio_id) + +%prep +%autosetup -n dash-bootstrap-templates-1.0.8 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-dash-bootstrap-templates -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu May 18 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.8-1 +- Package Spec generated @@ -0,0 +1 @@ +cb9de0ef6a71797790f981b243b31ae3 dash-bootstrap-templates-1.0.8.tar.gz |