Skip to content

daimlertruck/DT-DDS


Component library for Daimler Truck Digital Design System.
It contains UI components, brand themes, examples and documentation.

DT-DDS provides:

  • 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

Documentation via:

πŸ“¦ Installation

@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

Package Release Status

Package Version
@dt-dds/react 1.0.0-beta.209
@dt-dds/icons 1.0.0-beta.4
@dt-dds/react-accordion 1.0.0-beta.41
@dt-dds/react-avatar 1.0.0-beta.50
@dt-dds/react-backdrop 1.0.0-beta.43
@dt-dds/react-box 1.0.0-beta.10
@dt-dds/react-breadcrumb 1.0.0-beta.51
@dt-dds/react-button 1.0.0-beta.39
@dt-dds/react-card 1.0.0-beta.24
@dt-dds/react-checkbox 1.0.0-beta.40
@dt-dds/react-core 1.0.0-beta.41
@dt-dds/react-date-picker 1.0.0-beta.32
@dt-dds/react-divider 1.0.0-beta.40
@dt-dds/react-drawer 1.0.0-beta.47
@dt-dds/react-dropdown 1.0.0-beta.31
@dt-dds/react-empty-state 1.0.0-beta.59
@dt-dds/react-form 1.0.0-beta.27
@dt-dds/react-icon 1.0.0-beta.42
@dt-dds/react-icon-button 1.0.0-beta.9
@dt-dds/react-label-field 1.0.0-beta.37
@dt-dds/react-link 1.0.0-beta.16
@dt-dds/react-message 1.0.0-beta.55
@dt-dds/react-modal 1.0.0-beta.39
@dt-dds/react-pagination 1.0.0-beta.21
@dt-dds/react-progress-bar 1.0.0-beta.35
@dt-dds/react-radio 1.0.0-beta.26
@dt-dds/react-segmented-control 1.0.0-beta.29
@dt-dds/react-select 1.0.0-beta.46
@dt-dds/react-spinner 1.0.0-beta.44
@dt-dds/react-stepper 1.0.0-beta.31
@dt-dds/react-table 1.0.0-beta.36
@dt-dds/react-tabs 1.0.0-beta.39
@dt-dds/react-tag 1.0.0-beta.43
@dt-dds/react-text-area 1.0.0-beta.23
@dt-dds/react-text-field 1.0.0-beta.49
@dt-dds/react-toast 1.0.0-beta.56
@dt-dds/react-toggle 1.0.0-beta.20
@dt-dds/react-tooltip 1.0.0-beta.49
@dt-dds/react-typography 1.0.0-beta.32

πŸ”¨ Usage

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

⌨️ Development

Prerequisites

  • Node.js >= v18.0.0
  • Yarn

πŸ““ Installation

  • Clone the repo
  • yarn for package install

βš™οΈ DT-DDS current stack

Useful Commands

  • yarn build - Build all packages, including the Storybook site
  • yarn dev - Run all packages locally
  • yarn lint - Lint all packages
  • yarn clean - Clean up all node_modules and dist folders (runs each package's clean script)
  • yarn format - Format all TypeScript, TypeScript with JSX, and Markdown files based on prettier
  • yarn test - Run tests for all packages
  • yarn changesets:add - Generates changesets based on conventional commits
  • yarn 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 changeset
  • yarn 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

Apps & Packages

This Turborepo includes the following packages and applications:

  • apps/docs: Developer documentation site, built with Storybook
  • packages/dt-ui-react: Parent React library
  • packages/react-packages: React components
  • packages/tsconfig: Shared tsconfig.jsons used throughout the Turborepo
  • packages/eslint-config-custom: ESLint preset
  • packages/jest-config: Shared jest configuration file
  • packages/changeset-conventional-commits: Changeset plugin used to automatically generate changesets and tagging versions

Contributing

See the contributing guidelines.

Bug Reports

If you've encountered a bug in our project, please follow these steps to report it:

  1. 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.

  2. 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.

Feature Requests

To propose a new feature:

  1. 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.

  2. Create a New Issue: If your feature idea hasn't been proposed yet, create a new issue and use the "Feature request" template.

Issue Etiquette

  • 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.

Β© License

Licensed under MIT License

About

Daimler Truck Digital Design System

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages