It contains UI components, brand themes, examples and documentation.
- A unified group of utility functions commonly used, and spread across different projects
- A unified group of reusable UI components commonly used, and spread across different projects
- W3C standards, common tooling, and high quality through CI/CD lifecycle
- Accessibility meeting WCAG 2.1 AA standards
- Faster developments and implementations
- Easy collaboration and Maintenance
- Versioning and changelogs
- Documentation
@dt-dds/react
uses CSS-IN-JS behind the scenes. You'll also need to add Emotion as a project dependency.
yarn add @dt-dds/react @emotion/css @emotion/react @emotion/styled
Import the DT-DDS global styles in the root component.
import '@dt-dds/react/index.css';
And wrap your code in a ThemeProvider
component to make it available to all components.
import { Provider as ThemeProvider, theme } from '@dt-dds/react';
function App() {
return <ThemeProvider theme={theme}>
...
<ThemeProvider/>
}
We provide a default Daimler Truck theme, available under the package react-core/themes
- Node.js >= v18.0.0
- Yarn
- Clone the repo
yarn
for package install
- TypeScript for static type checking
- React β JavaScript library for user interfaces
- Emotion β for writing css styles with JavaScript
- Storybook β UI component environment powered by Vite
- Jest - JavaScript Testing Framework
- React Testing Library - to test UI components in a user-centric way
- ESLint for code linting
- Prettier for code formatting
- Changesets for managing versioning and changelogs
- changeset-conventional-commits (forked - custom package) for automatically generating changesets based on conventional commits
- Tsup β TypeScript bundler powered by esbuild
- Yarn from managing packages
- Turbo-gen/Plop for custom generators
yarn build
- Build all packages, including the Storybook siteyarn dev
- Run all packages locallyyarn lint
- Lint all packagesyarn clean
- Clean up allnode_modules
anddist
folders (runs each package's clean script)yarn format
- Format all TypeScript, TypeScript with JSX, and Markdown files based on prettieryarn test
- Run tests for all packagesyarn changesets:add
- Generates changesets based on conventional commitsyarn changesets:version
- Consumes all changesets, and updates to the most appropriate semver version based on those changesets. It also writes changelog entries for each consumed changesetyarn changesets:tag
- Commits the newly created changelogs with the latest packages version and adds the git-tag as<package-name>@<package-version>
yarn changesets:ci
- Runs the whole changesets flow, useful for pipelines to generate changesets, versioning and tags- π§
yarn release
- Build all packages and run npm publish in each package that is of a later version than the one currently listed on npm
This Turborepo includes the following packages and applications:
apps/docs
: Developer documentation site, built with Storybookpackages/dt-ui-react
: Parent React librarypackages/react-packages
: React componentspackages/tsconfig
: Sharedtsconfig.json
s used throughout the Turborepopackages/eslint-config-custom
: ESLint presetpackages/jest-config
: Shared jest configuration filepackages/changeset-conventional-commits
: Changeset plugin used to automatically generate changesets and tagging versions
See the contributing guidelines.
If you've encountered a bug in our project, please follow these steps to report it:
-
Search Existing Issues: Before creating a new issue, please search the existing issues to check if the bug has already been reported. If you find a similar issue, you can add a comment to provide additional details.
-
Create a New Issue: If you couldn't find an existing issue, create a new issue and use the "Bug Report" template. Provide as much detail as possible, including steps to reproduce, expected behavior, and actual behavior. Screenshots, error messages, and relevant code snippets are highly appreciated.
To propose a new feature:
-
Search Existing Requests: First, search the existing issues to see if the feature has already been suggested. You can upvote and add your insights to existing feature requests.
-
Create a New Issue: If your feature idea hasn't been proposed yet, create a new issue and use the "Feature request" template.
- Be respectful and considerate when commenting on issues.
- Please do not post comments consisting solely of "+1" or ":thumbsup:". Use GitHub's "reactions" feature instead.
- Provide additional information promptly if requested by maintainers.
Licensed under MIT License