@payex-ds/angular 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -2
- package/esm2022/generated/all.mjs +7 -0
- package/esm2022/generated/components.mjs +2175 -0
- package/esm2022/generated/value-accessor.mjs +37 -0
- package/esm2022/index.mjs +8 -0
- package/esm2022/lib/component-base.mjs +34 -0
- package/esm2022/lib/provide-design-system.mjs +15 -0
- package/esm2022/lib/value-accessor.mjs +45 -0
- package/esm2022/payex-ds-angular.mjs +5 -0
- package/fesm2022/payex-ds-angular.mjs +2311 -0
- package/fesm2022/payex-ds-angular.mjs.map +1 -0
- package/generated/all.d.ts +3 -0
- package/generated/components.d.ts +711 -0
- package/generated/value-accessor.d.ts +10 -0
- package/index.d.ts +7 -0
- package/lib/component-base.d.ts +12 -0
- package/lib/provide-design-system.d.ts +10 -0
- package/lib/value-accessor.d.ts +21 -0
- package/package.json +29 -3
package/README.md
CHANGED
|
@@ -1,3 +1,52 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @payex-ds/angular
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Angular (>= 18) standalone components for the PayEx design system web components (`@payex-ds/core`). The components are **generated** from the Custom Elements Manifest — see `tools/wrapper-gen`.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pnpm add @payex-ds/angular @payex-ds/core
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
// app.config.ts
|
|
15
|
+
import { provideDesignSystem } from '@payex-ds/angular';
|
|
16
|
+
|
|
17
|
+
export const appConfig = {
|
|
18
|
+
providers: [provideDesignSystem({ design: 'payex' })], // awaits ds.init before bootstrap
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import { Component } from '@angular/core';
|
|
24
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
25
|
+
import { PDS_COMPONENTS } from '@payex-ds/angular';
|
|
26
|
+
|
|
27
|
+
@Component({
|
|
28
|
+
standalone: true,
|
|
29
|
+
imports: [...PDS_COMPONENTS, ReactiveFormsModule],
|
|
30
|
+
template: `
|
|
31
|
+
<pds-input label="Name" [formControl]="name"></pds-input>
|
|
32
|
+
<pds-button variant="secondary" disabled (pdsClick)="save()">Save</pds-button>
|
|
33
|
+
`,
|
|
34
|
+
})
|
|
35
|
+
export class FormComponent {}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Import single components (`PdsButtonComponent`, …) or the whole `PDS_COMPONENTS` list (all components plus the form value accessor). There is no NgModule.
|
|
39
|
+
|
|
40
|
+
- The selector is the tag name; the Angular component **is** the custom element.
|
|
41
|
+
- Inputs mirror element properties (`[variant]`, `disabled`, `[fullWidth]`); boolean/number inputs accept plain attributes.
|
|
42
|
+
- Events `pds-<name>` are outputs `(pds<Name>)`: `pds-change` → `(pdsChange)`, `pds-menu-toggle` → `(pdsMenuToggle)`. They emit inside the Angular zone; property writes and listeners run outside it.
|
|
43
|
+
- Form controls work with `formControlName`, `[formControl]` and `[(ngModel)]` (value property for inputs/selects, `checked` for checkboxes and toggles).
|
|
44
|
+
- `provideDesignSystem({ design, ...InitOptions })`; use `inlineDesign` instead of `InitOptions.design` to pass an inline design object.
|
|
45
|
+
|
|
46
|
+
## Building and publishing
|
|
47
|
+
|
|
48
|
+
`pnpm --filter @payex-ds/angular build` runs ng-packagr (partial Ivy compilation) and writes a publishable package to `dist/` (FESM2022 + `package.json`). `publishConfig.directory` is `dist`, so `pnpm publish` publishes the built directory. Build `@payex-ds/core` first (`pnpm -r build` does this in order). Note: `dist/package.json` keeps `"@payex-ds/core": "workspace:*"`; verify pnpm rewrites it on publish (changesets does).
|
|
49
|
+
|
|
50
|
+
## Regenerating
|
|
51
|
+
|
|
52
|
+
`src/generated/*` is generated; do not edit. From the repo root: `pnpm generate:wrappers`.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// AUTO-GENERATED by @payex-ds/wrapper-gen from the @payex-ds/core Custom Elements Manifest.
|
|
2
|
+
// Do not edit by hand. Regenerate with `pnpm generate:wrappers`.
|
|
3
|
+
import { PDS_ELEMENT_COMPONENTS } from './components';
|
|
4
|
+
import { PdsValueAccessor } from './value-accessor';
|
|
5
|
+
/** Every component plus the form value accessor; use as `imports: [...PDS_COMPONENTS]`. */
|
|
6
|
+
export const PDS_COMPONENTS = [...PDS_ELEMENT_COMPONENTS, PdsValueAccessor];
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2dlbmVyYXRlZC9hbGwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsNEZBQTRGO0FBQzVGLGlFQUFpRTtBQUVqRSxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSxjQUFjLENBQUM7QUFDdEQsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFFcEQsMkZBQTJGO0FBQzNGLE1BQU0sQ0FBQyxNQUFNLGNBQWMsR0FBRyxDQUFDLEdBQUcsc0JBQXNCLEVBQUUsZ0JBQWdCLENBQVUsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8vIEFVVE8tR0VORVJBVEVEIGJ5IEBwYXlleC1kcy93cmFwcGVyLWdlbiBmcm9tIHRoZSBAcGF5ZXgtZHMvY29yZSBDdXN0b20gRWxlbWVudHMgTWFuaWZlc3QuXG4vLyBEbyBub3QgZWRpdCBieSBoYW5kLiBSZWdlbmVyYXRlIHdpdGggYHBucG0gZ2VuZXJhdGU6d3JhcHBlcnNgLlxuXG5pbXBvcnQgeyBQRFNfRUxFTUVOVF9DT01QT05FTlRTIH0gZnJvbSAnLi9jb21wb25lbnRzJztcbmltcG9ydCB7IFBkc1ZhbHVlQWNjZXNzb3IgfSBmcm9tICcuL3ZhbHVlLWFjY2Vzc29yJztcblxuLyoqIEV2ZXJ5IGNvbXBvbmVudCBwbHVzIHRoZSBmb3JtIHZhbHVlIGFjY2Vzc29yOyB1c2UgYXMgYGltcG9ydHM6IFsuLi5QRFNfQ09NUE9ORU5UU11gLiAqL1xuZXhwb3J0IGNvbnN0IFBEU19DT01QT05FTlRTID0gWy4uLlBEU19FTEVNRU5UX0NPTVBPTkVOVFMsIFBkc1ZhbHVlQWNjZXNzb3JdIGFzIGNvbnN0O1xuIl19
|