@pitchfork-ui/elements-angular 0.0.0-stage → 0.2.1
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/LICENSE +21 -0
- package/README.md +58 -2
- package/dist/LICENSE +21 -0
- package/dist/README.md +59 -0
- package/dist/fesm2022/pitchfork-ui-elements-angular.mjs +3741 -0
- package/dist/fesm2022/pitchfork-ui-elements-angular.mjs.map +1 -0
- package/dist/types/pitchfork-ui-elements-angular.d.ts +1623 -0
- package/package.json +67 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Leland Rangel
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,59 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @pitchfork-ui/elements-angular
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Angular bindings for [`@pitchfork-ui/elements`](https://www.npmjs.com/package/@pitchfork-ui/elements) —
|
|
4
|
+
standalone components and `ControlValueAccessor` directives generated from the
|
|
5
|
+
Pitchfork UI custom elements.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @pitchfork-ui/elements-angular @pitchfork-ui/tokens
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Use
|
|
14
|
+
|
|
15
|
+
The components are standalone, so import them where you need them:
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { Component } from '@angular/core';
|
|
19
|
+
import { ReactiveFormsModule, FormControl } from '@angular/forms';
|
|
20
|
+
import { PfButton, PfInput, TextValueAccessor } from '@pitchfork-ui/elements-angular';
|
|
21
|
+
|
|
22
|
+
@Component({
|
|
23
|
+
standalone: true,
|
|
24
|
+
imports: [ReactiveFormsModule, PfInput, TextValueAccessor, PfButton],
|
|
25
|
+
template: `
|
|
26
|
+
<pf-input label="Email" [formControl]="email"></pf-input>
|
|
27
|
+
<pf-button variant="primary">Save</pf-button>
|
|
28
|
+
`,
|
|
29
|
+
})
|
|
30
|
+
export class SignUpComponent {
|
|
31
|
+
email = new FormControl('');
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Load the token stylesheet once, at the root of your application:
|
|
36
|
+
|
|
37
|
+
```css
|
|
38
|
+
@import '@pitchfork-ui/tokens/css';
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Forms
|
|
42
|
+
|
|
43
|
+
Form controls ship a `ControlValueAccessor`, so `formControlName`, `[formControl]`
|
|
44
|
+
and `[(ngModel)]` all work. Import the accessor directive alongside the
|
|
45
|
+
component — `TextValueAccessor` for text-like controls.
|
|
46
|
+
|
|
47
|
+
The elements are form-associated at the platform level too, so they take part
|
|
48
|
+
in native `FormData`, constraint validation and form reset whether or not
|
|
49
|
+
Angular is involved.
|
|
50
|
+
|
|
51
|
+
## Generated, not hand-written
|
|
52
|
+
|
|
53
|
+
Everything under `src/lib/` is produced by the Stencil Angular output target
|
|
54
|
+
when `@pitchfork-ui/elements` builds. Fix anything wrong with a wrapper in the
|
|
55
|
+
element it comes from, not here.
|
|
56
|
+
|
|
57
|
+
## Licence
|
|
58
|
+
|
|
59
|
+
MIT
|
package/dist/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Leland Rangel
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# @pitchfork-ui/elements-angular
|
|
2
|
+
|
|
3
|
+
Angular bindings for [`@pitchfork-ui/elements`](https://www.npmjs.com/package/@pitchfork-ui/elements) —
|
|
4
|
+
standalone components and `ControlValueAccessor` directives generated from the
|
|
5
|
+
Pitchfork UI custom elements.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @pitchfork-ui/elements-angular @pitchfork-ui/tokens
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Use
|
|
14
|
+
|
|
15
|
+
The components are standalone, so import them where you need them:
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { Component } from '@angular/core';
|
|
19
|
+
import { ReactiveFormsModule, FormControl } from '@angular/forms';
|
|
20
|
+
import { PfButton, PfInput, TextValueAccessor } from '@pitchfork-ui/elements-angular';
|
|
21
|
+
|
|
22
|
+
@Component({
|
|
23
|
+
standalone: true,
|
|
24
|
+
imports: [ReactiveFormsModule, PfInput, TextValueAccessor, PfButton],
|
|
25
|
+
template: `
|
|
26
|
+
<pf-input label="Email" [formControl]="email"></pf-input>
|
|
27
|
+
<pf-button variant="primary">Save</pf-button>
|
|
28
|
+
`,
|
|
29
|
+
})
|
|
30
|
+
export class SignUpComponent {
|
|
31
|
+
email = new FormControl('');
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Load the token stylesheet once, at the root of your application:
|
|
36
|
+
|
|
37
|
+
```css
|
|
38
|
+
@import '@pitchfork-ui/tokens/css';
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Forms
|
|
42
|
+
|
|
43
|
+
Form controls ship a `ControlValueAccessor`, so `formControlName`, `[formControl]`
|
|
44
|
+
and `[(ngModel)]` all work. Import the accessor directive alongside the
|
|
45
|
+
component — `TextValueAccessor` for text-like controls.
|
|
46
|
+
|
|
47
|
+
The elements are form-associated at the platform level too, so they take part
|
|
48
|
+
in native `FormData`, constraint validation and form reset whether or not
|
|
49
|
+
Angular is involved.
|
|
50
|
+
|
|
51
|
+
## Generated, not hand-written
|
|
52
|
+
|
|
53
|
+
Everything under `src/lib/` is produced by the Stencil Angular output target
|
|
54
|
+
when `@pitchfork-ui/elements` builds. Fix anything wrong with a wrapper in the
|
|
55
|
+
element it comes from, not here.
|
|
56
|
+
|
|
57
|
+
## Licence
|
|
58
|
+
|
|
59
|
+
MIT
|