Caution
Work in progress. The components are not ready for production use yet.
This repository contains a Python package offering custom components for Shiny that are based on the UNDP Design System.
Note
Disclaimer: Posit, RStudio, and Shiny are trademarks of Posit Software, PBC, all rights reserved, and may be registered in the United States Patent and Trademark Office and in other countries. This project is not affiliated with, endorsed by, or directly supported by Posit Software, PBC.
The code structure is as follow:
package.json # Contains the dependencies needed to build the components javascript
srcts/ # Source Typescript files
index.ts # Where we define the components
undp_design_system/
undp_design_system.py # Python functions for the components
__init__.py # Used to define exports for python package.
distjs/ # Where the bundled js files are put
example-app/
app.py # Example app for the custom-input component
... # ...Various other config files needed for python and js projects
This should be run from the root of the repo
pip install -e .Install the dependencies for javascript:
npm installBuild assets into the undp_design_system/distjs folder:
npm run buildOr if you want to watch the files for changes and rebuild on the fly you can run:
npm run watchWith both the python package and the javascript built, you can run the example apps (typically using the Shiny vscode extension).
If you want to run the example app from the command line you can run:
shiny run example-app/app.pyThis project is licensed under the BSD 3-Clause License. However, entities or individuals not affiliated with UNDP are strictly prohibited from using this package or any of its components to create, share, publish, or distribute works that resemble, claim affiliation with, or imply endorsement by UNDP.
UNDP’s name, emblem and its abbreviation are the exclusive property of UNDP and are protected under international law. Their unauthorized use is prohibited, and they may not be reproduced or used in any manner without UNDP’s prior written permission.
If you are facing any issues or would like to make some suggestions, feel free to open an issue.