-
Notifications
You must be signed in to change notification settings - Fork 15
docs: add missing README files to element-ng, element-theme, and element-translate-cli #1645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
vineethwilson15
wants to merge
2
commits into
siemens:main
Choose a base branch
from
vineethwilson15:docs/add-package-readmes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # Element Angular | ||
|
|
||
| The core Angular component library implementing the Siemens Design Language for Smart | ||
| Infrastructure applications. Provides 80+ production-ready UI components built with | ||
| Angular signals, standalone components, and OnPush change detection. | ||
|
|
||
| ## Usage | ||
|
|
||
| Add the library to your project dependencies: | ||
|
|
||
| ```sh | ||
| npm install --save @siemens/element-ng | ||
| ``` | ||
|
|
||
| Also install the required peer dependencies: | ||
|
|
||
| ```sh | ||
| npm install --save @siemens/element-theme @siemens/element-icons @siemens/element-translate-ng @angular/cdk | ||
| ``` | ||
|
|
||
| Apply the global theme in your main stylesheet: | ||
|
|
||
| ```scss | ||
| @use '@siemens/element-theme/theme'; | ||
| ``` | ||
|
|
||
| Import individual components directly in your standalone components: | ||
|
|
||
| ```ts | ||
| import { SiAccordionComponent } from '@siemens/element-ng/accordion'; | ||
| import { SiButtonComponent } from '@siemens/element-ng/button'; | ||
| import { SiModalService } from '@siemens/element-ng/modal'; | ||
|
|
||
| @Component({ | ||
| selector: 'app-example', | ||
| imports: [SiAccordionComponent, SiButtonComponent], | ||
| templateUrl: './example.component.html' | ||
| }) | ||
| export class ExampleComponent {} | ||
| ``` | ||
|
|
||
| Each component is available as a separate entry point under `@siemens/element-ng/<component>`. | ||
| Browse the full component catalog at [element.siemens.io](https://element.siemens.io). | ||
|
|
||
| ### Running unit tests | ||
|
|
||
| Run `npm run lib:test` to run the unit tests via | ||
| [Karma](https://karma-runner.github.io). | ||
|
|
||
| ## License | ||
|
|
||
| The following applies for code and documentation of the git repository, | ||
| unless explicitly mentioned. | ||
|
|
||
| Copyright (c) Siemens 2016 - 2026 | ||
|
|
||
| MIT, see [LICENSE.md](LICENSE.md). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # Element Theme | ||
|
|
||
| The CSS/SCSS theme package for Siemens Element, implementing the Siemens Design Language. | ||
|
|
||
| ## Usage | ||
|
|
||
| To use the Element Theme in your project, add it to your dependencies by running: | ||
|
|
||
| ```sh | ||
| npm install --save @siemens/element-theme | ||
| ``` | ||
|
|
||
| ### Add the theme to your Angular application | ||
|
|
||
| Import the theme in your application's global stylesheet (e.g. `src/styles.scss`): | ||
|
|
||
| ```scss | ||
| @use '@siemens/element-theme/theme'; | ||
| ``` | ||
|
|
||
| This imports Bootstrap-based layout utilities, all component styles, and the default | ||
| Siemens Element color theme. | ||
|
|
||
| ### Using SCSS variables and mixins | ||
|
|
||
| The package also exports SCSS variables and mixins that you can use in your own styles: | ||
|
|
||
| ```scss | ||
| @use '@siemens/element-theme/src/styles/variables'; | ||
|
|
||
| .my-component { | ||
| color: variables.$element-text-primary; | ||
| background-color: variables.$element-base-1; | ||
| } | ||
| ``` | ||
|
|
||
| ### Custom theming | ||
|
|
||
| To apply a different theme variant, configure the theme before importing: | ||
|
|
||
| ```scss | ||
| @use '@siemens/element-theme/theme' with ( | ||
| $element-theme-default: 'element-dark' | ||
| ); | ||
| ``` | ||
|
|
||
| ## License | ||
|
|
||
| The following applies for code and documentation of the git repository, | ||
| unless explicitly mentioned. | ||
|
|
||
| Copyright (c) Siemens 2016 - 2026 | ||
|
|
||
| MIT, see [LICENSE.md](LICENSE.md). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| # Element Translate CLI | ||
|
|
||
| The CLI tool for the Siemens Element translation abstraction layer. It extracts | ||
| translatable keys from compiled Element library files and generates a TypeScript | ||
| keys interface and a default translations JSON file. | ||
|
|
||
| ## Usage | ||
|
|
||
| Install the CLI as part of the `@siemens/element-translate-ng` workflow: | ||
|
|
||
| ```sh | ||
| npm install --save-dev @siemens/element-translate-cli | ||
| ``` | ||
|
|
||
| ### Extract translatable keys | ||
|
|
||
| Run the extraction after building your library: | ||
|
|
||
| ```sh | ||
| npx update-translatable-keys | ||
| ``` | ||
|
|
||
| By default this reads the configuration from `element-translate.conf.json`. To use a | ||
| different config file, pass its path as the first argument: | ||
|
|
||
| ```sh | ||
| npx update-translatable-keys path/to/my-config.json | ||
| ``` | ||
|
|
||
| ### Configuration | ||
|
|
||
| Create an `element-translate.conf.json` file in your project root: | ||
|
|
||
| ```json | ||
| { | ||
| "files": "dist/@siemens/**/fesm2022/**/*.mjs", | ||
| "configs": [ | ||
| { | ||
| "name": "element", | ||
| "locationPrefix": "projects/element-ng", | ||
| "keysFile": "projects/element-ng/translate/si-translatable-keys.interface.ts", | ||
| "keysInterfaceName": "SiTranslatableKeys", | ||
| "messagesFile": "dist/@siemens/element-ng/template-i18n.json" | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| | Field | Description | | ||
| | ------------------- | ------------------------------------------------------- | | ||
| | `files` | Glob pattern for compiled library files to scan | | ||
| | `name` | Identifier for this config entry | | ||
| | `locationPrefix` | Source path prefix used to match extraction locations | | ||
| | `keysFile` | Output path for the generated TypeScript keys interface | | ||
| | `keysInterfaceName` | Name of the generated TypeScript interface | | ||
| | `messagesFile` | Output path for the generated default translations JSON | | ||
|
|
||
| ## License | ||
|
|
||
| The following applies for code and documentation of the git repository, | ||
| unless explicitly mentioned. | ||
|
|
||
| Copyright (c) Siemens 2016 - 2026 | ||
|
|
||
| MIT, see [LICENSE.md](LICENSE.md). |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.