ud-components
v0.3.21
Published
A shared Angular component library with components, directives, pipes, services, enums, interfaces, and utilities.
Readme
ud-components
A shared Angular component library with components, directives, pipes, services, enums, interfaces, and utilities.
Installation
npm install ud-componentsSetup
1. Fonts
Add the following to your app's index.html <head>. The library uses Sora and DM Sans from Google Fonts:
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap" rel="stylesheet">2. Global styles
Import the library's global stylesheet in your styles.scss (or add it to the styles array in angular.json):
@use 'ud-components/styles/global';Usage
All public symbols are available from the root import:
import { SomeComponent, SomeEnum, SomeInterface } from 'ud-components';What's exported
| Category | Examples |
|---|---|
| Components | CarouselComponent, CustomTableComponent, EditViewComponent, KpiComponent, ModalComponent, ... |
| Directives | EditViewSectionDirective |
| Enums | Role, SnackbarType, ModalInputType, KpiType, ... |
| Interfaces | TableInterface, PageRequest, SummaryField, EditOptions, ... |
| Pipes | CapitalizePipe, PluralizePipe, SafePipe, SingularPipe |
| Services | TranslateWrapperService |
| Utils | CommonUtils, TimeOptionsUtils |
Building & Publishing
Use the build:lib script which builds the library and patches the dist package.json with sub-path exports required by Vite-based Angular projects:
npm run build:libTo publish a new version:
- Bump the version in
projects/ud-components/package.json - Run
npm run build:lib - Publish from the dist folder:
cd dist/ud-components && npm publish
