25.15.0 • Published 30 days ago

@infineon/infineon-design-system-stencil v25.15.0

Weekly downloads
-
License
MIT
Repository
-
Last release
30 days ago

Infineon Design System Stencil Web Components (MVP)

GitHub Repo Issues GitHub Pull Requests GitHub Repo Version GitHub Master Branch Weekly Commits GitHub Repo Contributors GitHub Repo Discussions

About The Project

As part of the Infineon brand guidelines, the Infineon Digital Design System supports designers, developers and project managers to build user interfaces faster and better – with the ultimate goal to create a coherent and optimal user journey across all internal and external Infineon digital touchpoints.

This repository contains an implementation of Infineons Digital Design System and it's Storybook sourcecode using Stencil web components.

Use it to build & run storybook and distribute the Stencil web components.

Built With

Stencil web components

Example applications demonstrating the usage of IFX Web Components

Project structure

Overall structure

The repository has a monorepo architecture using Lerna. It contains not only our Stencil Web Components, but also framework integrations for Vue and React as well as example applications demonstrating component usage (not included in the Lerna workspaces)

Wrapper components

Stencil Web Components can be used with any JavaScript framework or with no framework at all, just like any other HTML elements. This is because they are built on Web APIs that are native to the browser. They are self-contained and encapsulate their functionality in a way that makes them portable and easy to drop into any project.

To bridge the gap between Stencil components and specific frameworks, it can be useful to create wrapper components

A Stencil Wrapper Component is a component that wraps around a Stencil Web Component and translates the properties, events, and methods to work seamlessly within the specific framework context.

Our Wrapper Components are built automatically every time npm run stencil:build is executed.


Getting Started

Prerequisites

Installation of the component libraray


Angular

1.

  • with NPM

npm install --save @infineon/infineon-design-system-stencil

  • with Yarn

yarn add @infineon/infineon-design-system-stencil

2. Installation of SASS

npm install sass

3. Import the module inside your entry point file

#main.ts
import { defineCustomElements } from "@infineon/infineon-design-system-stencil/loader";

defineCustomElements(window);

4. Additional steps only for Angular

Inside app.modules.ts file:

import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';

@NgModule({
 ...
  schemas: [
    CUSTOM_ELEMENTS_SCHEMA
  ],
 ...
})

React

React Wrappers: Similarly to Vue, a React wrapper provides a React interface to a Stencil web component, making the web component feel more like a typical React component. This includes proper handling of props, state, and events within the context of a React application.

1. Installation

- with NPM

npm install @infineon/infineon-design-system-react

- with Yarn

yarn add @infineon/infineon-design-system-react

2. Installation of SASS

npm install sass

3. Import the module inside your entry point file

import { defineCustomElements } from '@infineon/infineon-design-system-react';
//...

defineCustomElements(window)

In React, there isn't a built-in mechanism to globally register components like in Vue. Therefore, components need to be imported in the file that they are being used in.

4. Usage

import { IfxProgressBar, IfxSearchBar, IfxButton } from '@infineon/infineon-design-system-react';
//...
<IfxSearchBar onIfxChange={handleSearch} show-close-button="true"></IfxSearchBar>

React + Javascript specific

It may be necessary to add the following to your .env file at project root:

GENERATE_SOURCEMAP=false

This can also be achieved by updating your start script in the package.json accordingly.


Vanilla

Include the following script tag in your index.html

<script type="module" src="https://cdn.jsdelivr.net/npm/@infineon/infineon-design-system-stencil/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js"></script>'

Vue

1. Installation

- with NPM

npm install @infineon/infineon-design-system-vue

- with Yarn

yarn add @infineon/infineon-design-system-vue

2. Installation of SASS

npm install sass

3. Import the module inside your entry point file

//main.js/main.ts
import { ComponentLibrary } from '@infineon/infineon-design-system-vue';
//...

createApp(App).use(ComponentLibrary).mount('#app');

In Vue, this registers the components globally.

4. Register the components globally

//vite.config.js
...
plugins: [
    vue({
      template: {
        compilerOptions: {
          // treat all tags with a dash as custom elements
          isCustomElement: (tag) => tag.includes('ifx-'),
        },
      },
    }),
  ],
//vue.config.js
module.exports = {
  transpileDependencies: true,
  ...
  chainWebpack: config => {
    config.module
      .rule('vue')
      .use('vue-loader')
      .loader('vue-loader')
      .tap(options => {
        return {
          ...options,
          compilerOptions: {
            isCustomElement: (tag) => tag.includes('ifx-'),
          },
        };
      });
  }
};

5. Usage

<ifx-progress-bar v-model="progress" size="m" show-label="true"></ifx-progress-bar>

General usage of IFX web components

Explore our currently available web components in Storybook. You will also find the code snippets needed to include them in your application.

https://infineon.github.io/infineon-design-system-stencil


Using only the Icons

For the case in which you only want to use our icons, please follow these steps:

  1. install the package by following the instructions for the respective framework
  2. Import only the ifx-icon component inside your entry point file as explained below;

For React: index.js/index.ts For Vue: main.js/main.ts For Angular: main.ts

import { defineCustomElement as defineCustomElementIfxIcon } from "@infineon/infineon-design-system-stencil/dist/components/ifx-icon";

defineCustomElementIfxIcon(window);

Local development

Installation

git clone https://github.com/Infineon/infineon-design-system-stencil.git

Install all the modules and dependencies listed on the package.json file with:

yarn/npm install

Build Storybook

To run Storybook to view and test our Stencil Web Components, we first need to export it as a static web app.

For building the application for the first time (to load fonts, assets and stylesheets) run:

yarn/npm run build:components

Start Storybook

To run storybook locally (automatically rebuilds on changes), run:

yarn/npm run storybook

Example applications

To test the standard Stencil components within our example applicatons, navigate to

cd examples/stencil-components

and go to the folder for Vue, React, Angular or VanillaJs. Follow the instructions described in the readme.md in each of these folders.

To test the Wrapper components within React or Vue applicatons, navigate to

cd examples/wrapper-components

and go to the application folder you want to use for testing. (React-Ts, React-Js, Vue-Ts, Vue-Js). Again, follow the instructions described in the readme.md in each of these folders.


Contributing

  • Clone the repository
  • Create an issue with a proper description (Naming convention: 'name-of-component: feature/bug')
  • Create a pull request with a proper description
  • Request a review (tishoyanchev || verena-ifx)

Email

dds@infineon.com

25.15.0

1 month ago

25.12.0

1 month ago

25.13.0

1 month ago

25.14.0

1 month ago

25.11.0

1 month ago

25.10.0

1 month ago

25.2.0

2 months ago

25.2.2

2 months ago

25.2.1

2 months ago

25.6.0

2 months ago

25.6.2

2 months ago

25.6.1

2 months ago

25.6.4

2 months ago

25.6.3

2 months ago

25.5.1

2 months ago

25.5.0

2 months ago

25.9.0

2 months ago

25.4.1

2 months ago

25.4.0

2 months ago

25.8.0

2 months ago

25.3.0

2 months ago

25.7.1

2 months ago

25.7.0

2 months ago

25.7.3

2 months ago

25.7.2

2 months ago

25.7.4

2 months ago

25.1.0

2 months ago

24.7.1

3 months ago

24.7.0

3 months ago

25.0.1

3 months ago

25.0.0

3 months ago

24.6.4

3 months ago

24.6.3

3 months ago

24.6.2

3 months ago

23.6.0

4 months ago

20.40.0

11 months ago

20.53.0

9 months ago

20.53.1

9 months ago

24.4.1

4 months ago

24.4.0

4 months ago

20.39.3

11 months ago

20.39.2

11 months ago

20.39.1

11 months ago

20.39.0

11 months ago

21.1.0

7 months ago

20.48.0

9 months ago

21.11.2

6 months ago

21.11.1

6 months ago

21.11.0

6 months ago

21.11.3

6 months ago

23.1.0

5 months ago

21.5.0

7 months ago

20.44.3

10 months ago

20.44.2

10 months ago

20.44.1

10 months ago

20.44.0

10 months ago

20.57.2

8 months ago

20.57.3

8 months ago

20.57.0

8 months ago

20.57.1

8 months ago

24.3.2

4 months ago

24.3.1

4 months ago

24.3.0

4 months ago

23.5.0

4 months ago

20.43.8

10 months ago

20.43.7

10 months ago

20.43.6

10 months ago

20.43.5

10 months ago

20.43.4

10 months ago

20.43.3

10 months ago

20.43.2

10 months ago

20.43.1

10 months ago

20.43.0

10 months ago

21.9.1

6 months ago

21.9.0

6 months ago

21.9.2

6 months ago

20.52.0

9 months ago

21.14.1

5 months ago

21.14.0

5 months ago

21.0.2

8 months ago

21.0.1

8 months ago

21.0.4

8 months ago

21.0.3

8 months ago

21.0.0

8 months ago

21.0.6

8 months ago

21.0.5

8 months ago

21.0.8

7 months ago

21.0.7

8 months ago

21.10.1

6 months ago

21.10.0

6 months ago

20.38.8

11 months ago

20.38.7

11 months ago

20.38.6

11 months ago

20.38.5

11 months ago

20.38.4

11 months ago

20.38.3

11 months ago

20.38.2

11 months ago

20.38.1

11 months ago

20.38.0

11 months ago

23.0.0

5 months ago

21.4.0

7 months ago

20.47.0

9 months ago

20.56.1

8 months ago

20.56.0

8 months ago

23.4.0

4 months ago

23.4.2

4 months ago

23.4.1

4 months ago

20.42.0

10 months ago

21.8.2

7 months ago

21.8.1

7 months ago

21.8.3

7 months ago

21.8.0

7 months ago

20.55.0

9 months ago

24.2.3

4 months ago

24.2.2

4 months ago

24.2.1

4 months ago

24.2.0

4 months ago

20.51.0

9 months ago

24.6.1

3 months ago

24.6.0

3 months ago

21.13.0

5 months ago

21.13.1

5 months ago

20.37.4

11 months ago

20.37.3

11 months ago

20.37.2

11 months ago

22.1.0

5 months ago

21.3.1

7 months ago

21.3.0

7 months ago

21.3.2

7 months ago

20.46.2

10 months ago

20.46.1

10 months ago

20.46.0

10 months ago

24.1.2

4 months ago

24.1.1

4 months ago

24.1.0

4 months ago

23.3.0

5 months ago

21.7.3

7 months ago

21.7.2

7 months ago

21.7.4

7 months ago

21.7.1

7 months ago

21.7.0

7 months ago

20.54.0

9 months ago

24.5.0

3 months ago

20.41.0

11 months ago

20.50.3

9 months ago

20.50.1

9 months ago

20.50.2

9 months ago

20.50.0

9 months ago

21.12.0

6 months ago

22.0.0

5 months ago

21.2.0

7 months ago

20.49.0

9 months ago

23.2.1

5 months ago

23.2.0

5 months ago

21.6.0

7 months ago

20.45.0

10 months ago

24.0.2

4 months ago

24.0.1

4 months ago

24.0.0

4 months ago

20.37.1

11 months ago

20.37.0

11 months ago

20.36.5

11 months ago

20.36.4

12 months ago

20.36.3

12 months ago

20.36.2

12 months ago

20.36.1

12 months ago

20.35.0

12 months ago

20.36.0

12 months ago

20.31.0

1 year ago

20.20.0

1 year ago

20.20.1

1 year ago

18.5.6

1 year ago

18.5.5

1 year ago

18.5.4

1 year ago

18.5.3

1 year ago

18.5.2

1 year ago

18.5.1

1 year ago

18.5.0

1 year ago

20.18.0

1 year ago

20.29.0

1 year ago

20.29.1

1 year ago

19.1.0

1 year ago

19.1.2

1 year ago

18.3.3

1 year ago

19.1.1

1 year ago

18.3.2

1 year ago

19.1.4

1 year ago

18.3.1

1 year ago

19.1.3

1 year ago

18.3.0

1 year ago

19.1.6

1 year ago

19.1.5

1 year ago

19.1.8

1 year ago

19.1.7

1 year ago

19.1.9

1 year ago

20.1.0

1 year ago

20.15.0

1 year ago

20.15.1

1 year ago

20.15.2

1 year ago

20.15.3

1 year ago

20.15.4

1 year ago

20.26.0

1 year ago

20.26.1

1 year ago

20.3.0

1 year ago

20.17.0

1 year ago

20.17.1

1 year ago

20.17.2

1 year ago

20.17.3

1 year ago

20.17.4

1 year ago

20.17.5

1 year ago

20.28.0

1 year ago

20.5.0

1 year ago

20.11.0

1 year ago

20.11.1

1 year ago

20.22.0

1 year ago

20.22.1

1 year ago

20.22.2

1 year ago

20.22.3

1 year ago

20.7.0

1 year ago

20.13.0

1 year ago

20.33.0

1 year ago

20.24.0

1 year ago

20.24.1

1 year ago

20.9.0

1 year ago

20.9.2

1 year ago

20.9.1

1 year ago

18.2.9

1 year ago

19.0.0

1 year ago

20.32.0

1 year ago

20.23.12

1 year ago

20.23.13

1 year ago

20.23.10

1 year ago

20.23.11

1 year ago

20.23.16

1 year ago

20.23.17

1 year ago

20.23.14

1 year ago

20.23.15

1 year ago

20.23.18

1 year ago

20.23.19

1 year ago

20.30.1

1 year ago

20.30.0

1 year ago

18.6.0

1 year ago

20.19.0

1 year ago

20.19.1

1 year ago

20.19.2

1 year ago

20.19.3

1 year ago

20.19.4

1 year ago

20.19.5

1 year ago

20.19.6

1 year ago

18.2.19

1 year ago

18.2.18

1 year ago

18.2.17

1 year ago

18.2.16

1 year ago

18.2.15

1 year ago

18.2.14

1 year ago

18.2.13

1 year ago

18.2.12

1 year ago

18.2.11

1 year ago

18.2.10

1 year ago

18.4.1

1 year ago

18.4.0

1 year ago

20.0.1

1 year ago

20.0.0

1 year ago

20.0.4

1 year ago

20.0.3

1 year ago

20.0.2

1 year ago

20.2.1

1 year ago

20.2.0

1 year ago

20.14.0

1 year ago

20.25.0

1 year ago

20.25.1

1 year ago

20.25.2

1 year ago

20.4.0

1 year ago

18.7.1

1 year ago

18.7.0

1 year ago

20.16.0

1 year ago

20.16.1

1 year ago

20.16.2

1 year ago

20.16.3

1 year ago

20.16.4

1 year ago

20.16.5

1 year ago

20.16.6

1 year ago

20.16.7

1 year ago

20.16.8

1 year ago

20.27.0

1 year ago

20.6.0

1 year ago

20.10.0

1 year ago

20.21.0

1 year ago

20.21.1

1 year ago

20.21.2

1 year ago

20.21.3

1 year ago

20.21.4

1 year ago

20.8.0

1 year ago

20.12.0

1 year ago

20.34.6

12 months ago

20.34.5

1 year ago

20.34.4

1 year ago

20.34.3

1 year ago

20.34.2

1 year ago

20.34.1

1 year ago

20.34.0

1 year ago

20.23.0

1 year ago

20.23.1

1 year ago

20.23.2

1 year ago

20.23.3

1 year ago

20.23.4

1 year ago

20.23.5

1 year ago

20.23.6

1 year ago

20.23.7

1 year ago

20.23.8

1 year ago

20.23.9

1 year ago

18.2.8

1 year ago

18.2.7

1 year ago

18.2.6

1 year ago

18.2.5

1 year ago

18.2.4

1 year ago

18.2.3

1 year ago

18.2.2

1 year ago

18.2.1

1 year ago

18.2.0

1 year ago

18.1.1

1 year ago

18.1.0

1 year ago

18.0.9

2 years ago

18.0.10

2 years ago

18.0.11

2 years ago

18.0.12

2 years ago

18.0.13

2 years ago

18.0.14

2 years ago

18.0.15

2 years ago

18.0.16

2 years ago

18.0.17

2 years ago

18.0.18

2 years ago

18.0.19

2 years ago

18.0.20

2 years ago

18.0.21

2 years ago

18.0.1-canary.6

2 years ago

18.0.1-canary.5

2 years ago

1.0.0

2 years ago

18.0.8

2 years ago

18.0.7

2 years ago

18.0.6

2 years ago

18.0.5

2 years ago

0.0.68-canary.7

2 years ago

0.0.68-canary.8

2 years ago

0.0.68-canary.9

2 years ago

0.0.68-canary.10

2 years ago

0.0.68-canary.11

2 years ago

0.0.68-canary.0

2 years ago

0.0.68-canary.50

2 years ago

0.0.68-canary.51

2 years ago

0.0.68-canary.2

2 years ago

18.0.4

2 years ago

0.0.68-canary.16

2 years ago

18.0.3

2 years ago

0.0.68-canary.17

2 years ago

18.0.2

2 years ago

0.0.68-canary.18

2 years ago

18.0.1

2 years ago

0.0.68-canary.19

2 years ago

18.0.0

2 years ago

0.0.68-canary.12

2 years ago

0.0.68-canary.13

2 years ago

0.0.68-canary.14

2 years ago

0.0.68-canary.15

2 years ago

0.0.68-canary.41

2 years ago

0.0.68-canary.42

2 years ago

0.0.68-canary.43

2 years ago

0.0.68-canary.44

2 years ago

0.0.68-canary.40

2 years ago

0.0.68-canary.49

2 years ago

18.0.1-canary.0

2 years ago

18.0.1-canary.2

2 years ago

0.0.68-canary.45

2 years ago

18.0.1-canary.1

2 years ago

0.0.68-canary.46

2 years ago

18.0.1-canary.4

2 years ago

0.0.68-canary.47

2 years ago

18.0.1-canary.3

2 years ago

0.0.68-canary.48

2 years ago

0.0.64

2 years ago

0.0.65

2 years ago

0.0.66

2 years ago

0.0.67

2 years ago

0.0.68

2 years ago

0.0.68-canary.30

2 years ago

0.0.68-canary.31

2 years ago

0.0.68-canary.32

2 years ago

0.0.68-canary.33

2 years ago

0.0.68-canary.38

2 years ago

0.0.68-canary.39

2 years ago

0.0.68-canary.34

2 years ago

0.0.68-canary.35

2 years ago

0.0.68-canary.36

2 years ago

0.0.68-canary.37

2 years ago

0.0.68-canary.20

2 years ago

0.0.68-canary.21

2 years ago

0.0.68-canary.22

2 years ago

0.0.68-canary.27

2 years ago

0.0.68-canary.28

2 years ago

0.0.68-canary.29

2 years ago

0.0.68-canary.23

2 years ago

0.0.68-canary.24

2 years ago

0.0.68-canary.25

2 years ago

0.0.68-canary.26

2 years ago

0.0.63

2 years ago

0.0.62

2 years ago

0.0.60

2 years ago

0.0.52

2 years ago

0.0.51

2 years ago

0.0.50

2 years ago

0.0.49

2 years ago

0.0.48

2 years ago

0.0.47

2 years ago

0.0.46

2 years ago

0.0.45

2 years ago

0.0.44

2 years ago

0.0.43

2 years ago

0.0.42

2 years ago

0.0.41

2 years ago

0.0.40

2 years ago

0.0.39

2 years ago

0.0.38

2 years ago

0.0.37

2 years ago

0.0.36

2 years ago

0.0.35

2 years ago

0.0.34

2 years ago