Gathering detailed insights and metrics for @kirbydesign/designsystem
Gathering detailed insights and metrics for @kirbydesign/designsystem
Gathering detailed insights and metrics for @kirbydesign/designsystem
Gathering detailed insights and metrics for @kirbydesign/designsystem
npm install @kirbydesign/designsystem
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
85 Stars
4,116 Commits
23 Forks
21 Watching
125 Branches
84 Contributors
Updated on 26 Nov 2024
TypeScript (74.93%)
HTML (14.54%)
SCSS (9.71%)
JavaScript (0.6%)
Swift (0.11%)
Java (0.05%)
Ruby (0.03%)
Perl (0.02%)
MDX (0.01%)
Cumulative downloads
Total Downloads
Last day
-36.3%
242
Compared to previous day
Last week
-60.5%
1,534
Compared to previous week
Last month
11.8%
15,107
Compared to previous month
Last year
-18.2%
121,139
Compared to previous year
Kirby Design System is a UX Component library implementing the Kirby Design Philosophy.
Kirby Components are built on top of Angular and can be used in Angular projects.
The Kirby Cookbook, containing samples, status of components etc. can be accessed from https://cookbook.kirby.design.
Install through npm:
1npm i @kirbydesign/designsystem
Import the KirbyModule
in your AppModule
:
1import { KirbyModule } from '@kirbydesign/designsystem'; 2 3... 4 5@NgModule({ 6 imports: [ 7 ..., 8 KirbyModule 9 ], 10 ... 11}) 12export class AppModule {}
Import providers from KirbyModule
when bootstrapping your application:
1import { importProvidersFrom } from '@angular/core'; 2import { KirbyModule } from '@kirbydesign/designsystem'; 3 4... 5 6await bootstrapApplication(RootComponent, { 7 providers: [ 8 ..., 9 importProvidersFrom(KirbyModule) 10 ] 11});
Include the Kirby global styles in your app, e.g., in src/styles.scss
:
1@use '@kirbydesign/designsystem/scss/global-styles';
In each .scss
file where you need to access the Sass utility functions from Kirby (e.g. colors or fonts) you must import the scss utilities:
1@use '@kirbydesign/designsystem/scss/utils';
Kirby also provides a generic print stylesheet. It includes the basics. You most likely have to add local print styles specific to your app as well.
Import it into your app, e.g., in src/styles.scss
or in your local print stylesheet if you have one:
1@use '@kirbydesign/designsystem/scss/print';
To unit-test applications using Kirby's Components, we recommend importing one of the following modules:
import { KirbyTestingModule } from '@kirbydesign/designsystem/
testing-jasmine'
;
import { KirbyTestingModule } from '@kirbydesign/designsystem/
testing-jest'
;
Example:
1import { KirbyTestingModule } from '@kirbydesign/designsystem/testing-jasmine'; 2 3describe('AppComponent', () => { 4 beforeEach(async(() => { 5 TestBed.configureTestingModule({ 6 imports: [KirbyTestingModule], 7 declarations: [AppComponent] 8 }).compileComponents(); 9 })); 10 11 ... 12 13});
For unit test performance reasons it's highly recommended to utilize these modules, since they provide a template-less implementation of the Kirby Components, but still translude content through <ng-content></ng-content>
and provide @Input
-decorated properties and @Output
-decorated EventEmitter
s, without
having to reflow the DOM, execute component logic etc.
Kirby comes bundled with a default set of icons. Make sure the .svg
files used by Kirby are copied to your output folder by adding the following to build > options > assets
in angular.json
:
1{ 2 ... 3 "build": { 4 "options": { 5 "assets": [ 6 ..., 7 { 8 "glob": "**/*.svg", 9 "input": "node_modules/@kirbydesign/designsystem/icons/svg", 10 "output": "./assets/kirby/icons/svg" 11 }, 12 { 13 "glob": "close.svg", 14 "input": "node_modules/@kirbydesign/designsystem/icons/svg", 15 "output": "./svg" 16 }, 17 ... 18 ], 19 } 20 } 21}
It is possible to configure the path that the built-in icons are loaded from by providing the BUILT_IN_ICONS_URL
injection token:
1// In app providers: 2{ 3 provide: BUILT_IN_ICONS_URL, 4 useValue: 'https://example.org/1.0.1/kirby/icons/svg/' 5}
For details on migrating from earlier versions of Kirby see our Migration Guides.
The folder structure of the repository is based on Nrwl's NX mono-repository project.
A basic walkthrough is outlined in the structure below:
@kirbydesign/designsystem
├── apps # Contains source code for applications
| └── cookbook # - Cookbook application (showcase and examples)
├── dist # Contains output files when building artifacts (for distribution)
| ├── apps
| └── libs
├── libs # Contains source code for libraries
| └── designsystem # - Actual implementation of library (designsystem)
├── scripts # Scripts for building artifacts
└── tools # Contains various tools
├── generate-mocks # - CLI utility for generating mocks for `@kirbydesign/designsystem/testing-jasmine`
| # and `@kirbydesign/designsystem/testing-jest` entry points.
├── sass-to-ts # - CLI and Webpack plugin for extract global variables from SASS to TS
├── schematics # - Angular schematics
Below is an overview of most widely used scripts, available for this project.
Use them in your terminal like: npm run <script>
:
Command | Description |
---|---|
start | Starts the development server, providing a means of running the cookbook while developing |
start:ios | Builds the flows app and deploys it to an iOS device (real or simulated) using Capacitor |
start:android | Builds the flows app and deploys it to an Android device (real or simulated) using Capacitor |
publish | When run locally it produces a set of npm packages in dist/ that can be installed locally with npm install |
storybook | Opens up Storybook where component states are set up for snapshot testing with Chromatic |
We use nx to run common tasks like building, linting and testing projects.
This is done with npx nx <target name> <project name>
, e.g. npx nx lint designsystem
preferrably from the root of the workspace to ensure config paths are resolved correctly.
If you wish to contribute new features, bug fixes or something third to the project have a look at the contribution guidelines.
No vulnerabilities found.
Reason
30 commit(s) and 22 issue activity found in the last 90 days -- score normalized to 10
Reason
license file detected
Details
Reason
Found 29/30 approved changesets -- score normalized to 9
Reason
binaries present in source code
Details
Reason
2 existing vulnerabilities detected
Details
Reason
dangerous workflow patterns detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More