0.0.46 • Published 3 months ago

@lendai-us/design-system v0.0.46

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

DesignSystem

This library was generated with Angular CLI version 15.2.0.

Connecting @lendai-us/design-system to your app

  1. make sure all dependencies on package.json are align to the design-system package.
  2. run npm i lodash
  3. run npm i -D @types/lodash
  4. run npm i @lendai-us/cdk
  5. run npm i @lendai-us/design-system
  6. add this code to the style.scss in your app to define your app colors:
   @use '@angular/material' as mat;
   @use '@lendai-us/design-system' as lai;
   @use 'sass:map';

      $design-system-theme: (
        'primary': lai.$prebuilt-purple,
        'info': lai.$prebuilt-blue,
        'error': lai.$prebuilt-red,
        'warning': lai.$prebuilt-orange,
        'success': lai.$prebuilt-green,
      );

      :root {
      @include lai.applyTheme($design-system-theme);
      }

      $mat-primary: lai.createPalette(map.get(lai.$prebuilt-purple, 500));
      $mat-warn: lai.createPalette(map.get(lai.$prebuilt-red, 500));
      $mat-theme: mat.define-light-theme(
        (
          color: (
            primary: mat.define-palette($mat-primary),
            accent: mat.define-palette($mat-primary),
            warn: mat.define-palette($mat-warn),
          ),
        )
      );

      @include mat.all-component-themes($mat-theme);
      @include mat.all-component-typographies();
      @include mat.core();
  1. add this code to the index.html in your app to add fonts:
  <link rel="preconnect" href="https://fonts.gstatic.com" />
  <link
      href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap"
      rel="stylesheet"/>
  1. add assets to angular.json:
  • under architect -> assets add: "input": "node_modules/@lendai-us/design-system/assets", "output": "/assets/"
  • under architect -> styles add: "node_modules/flag-icons/css/flag-icons.min.css"

Code scaffolding

Run ng generate component component-name --project design-system to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project design-system.

Note: Don't forget to add --project design-system or else it will be added to the default project in your angular.json file.

Build

Run ng build design-system to build the project. The build artifacts will be stored in the dist/ directory.

Publishing

After building your library with ng build design-system, go to the dist folder cd dist/design-system and run npm publish.

Running unit tests

Run ng test design-system to execute the unit tests via Karma.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.

0.0.45

3 months ago

0.0.46

3 months ago

0.0.44

5 months ago

0.0.43

5 months ago

0.0.42

5 months ago

0.0.41

5 months ago

0.0.40

5 months ago

0.0.39

7 months ago

0.0.38

7 months ago

0.0.37

7 months ago

0.0.36

7 months ago

0.0.35

7 months ago

0.0.33

7 months ago

0.0.32

7 months ago

0.0.31

7 months ago

0.0.30

8 months ago

0.0.29

8 months ago

0.0.28

8 months ago

0.0.27

8 months ago

0.0.26

8 months ago

0.0.25

8 months ago

0.0.24

8 months ago

0.0.23

8 months ago

0.0.22

8 months ago

0.0.21

8 months ago

0.0.20

8 months ago

0.0.19

8 months ago

0.0.18

8 months ago

0.0.17

8 months ago

0.0.16

8 months ago

0.0.15

8 months ago

0.0.14

8 months ago

0.0.13

8 months ago

0.0.12

8 months ago

0.0.11

8 months ago

0.0.10

8 months ago

0.0.9

8 months ago

0.0.8

9 months ago

0.0.7

9 months ago

0.0.6

9 months ago

0.0.5

9 months ago

0.0.4

9 months ago

0.0.3

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago