@bfrs/agentic-components 0.1.8 → 0.2.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/BFRS_AGENTIC_COMPONENTS.md +19 -1
- package/README.md +18 -0
- package/dist/custom-elements.d.ts +7 -0
- package/dist/custom-elements.js +414 -363
- package/dist/custom-elements.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -44,6 +44,17 @@ import "@bfrs/agentic-components/custom-elements";
|
|
|
44
44
|
@import "@bfrs/agentic-components/styles";
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
+
If Angular does not resolve the package style export, add the built CSS file in `angular.json`:
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"styles": [
|
|
52
|
+
"node_modules/@bfrs/agentic-components/dist/style.css",
|
|
53
|
+
"src/styles.scss"
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
47
58
|
Add `CUSTOM_ELEMENTS_SCHEMA` where the tags are rendered:
|
|
48
59
|
|
|
49
60
|
```ts
|
|
@@ -64,11 +75,18 @@ export class AgenticExampleComponent {
|
|
|
64
75
|
}
|
|
65
76
|
```
|
|
66
77
|
|
|
78
|
+
Use native Angular DOM event bindings for interactions. Do not pass React-style `onClick` in Angular templates:
|
|
79
|
+
|
|
80
|
+
```html
|
|
81
|
+
<bfrs-button variant="primary" (click)="continue()">Continue</bfrs-button>
|
|
82
|
+
<bfrs-paper (click)="openDetails()">Open details</bfrs-paper>
|
|
83
|
+
```
|
|
84
|
+
|
|
67
85
|
Registered tags cover the documented component surface: `bfrs-box`, `bfrs-container`, `bfrs-paper`, `bfrs-stack`, `bfrs-grid`, `bfrs-text`, `bfrs-icon`, `bfrs-button`, `bfrs-icon-button`, `bfrs-form-field`, `bfrs-label`, `bfrs-input`, `bfrs-textarea`, `bfrs-select`, `bfrs-date-range-picker`, `bfrs-searchable-select`, `bfrs-checkbox`, `bfrs-radio`, `bfrs-switch`, `bfrs-badge`, `bfrs-chip`, `bfrs-alert`, `bfrs-toast-manager`, `bfrs-spinner`, `bfrs-skeleton`, `bfrs-empty-state`, `bfrs-error-state`, `bfrs-loading-state`, `bfrs-modal`, `bfrs-drawer`, `bfrs-confirm-dialog`, `bfrs-dropdown`, `bfrs-tooltip`, `bfrs-popover`, `bfrs-avatar`, `bfrs-metric-card`, `bfrs-table-pagination`, `bfrs-data-table`, `bfrs-tabs`, `bfrs-breadcrumbs`, `bfrs-action-menu`, `bfrs-page-header`, `bfrs-section-header`, `bfrs-layout-shell`, `bfrs-form-section`, `bfrs-filter-bar`, `bfrs-filter-drawer`, `bfrs-chat-bubble`, `bfrs-chat-composer`, `bfrs-full-page-loader`, `bfrs-business-info-display-card`, and `bfrs-step-progress-card`.
|
|
68
86
|
|
|
69
87
|
Use attributes for simple props: `variant`, `size`, `tone`, `label`, `loading`, `disabled`, `required`, `error-message`, `helper-text`, `prefix`, `suffix`. Use `[props]` or the `props` JSON attribute for structured props like `options`, `items`, `columns`, `data`, `sections`, `steps`, and `toasts`.
|
|
70
88
|
|
|
71
|
-
Common
|
|
89
|
+
Common component events: `(value-change)`, `(checked-change)`, `(open-change)`, `(close)`, `(confirm)`, `(cancel)`, `(row-click)`, `(sort-change)`, `(page-change)`, `(page-size-change)`, `(action-select)`, `(dropdown-select)`, `(date-range-change)`, `(search-change)`, `(open-filters)`, `(apply)`, `(reset)`, and `(submit)`. Payloads are available on `$event.detail`.
|
|
72
90
|
|
|
73
91
|
```html
|
|
74
92
|
<bfrs-select
|
package/README.md
CHANGED
|
@@ -56,6 +56,17 @@ import "@bfrs/agentic-components/custom-elements";
|
|
|
56
56
|
@import "@bfrs/agentic-components/styles";
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
+
If Angular does not resolve the package style export, add the built CSS file in `angular.json`:
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"styles": [
|
|
64
|
+
"node_modules/@bfrs/agentic-components/dist/style.css",
|
|
65
|
+
"src/styles.scss"
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
59
70
|
Add `CUSTOM_ELEMENTS_SCHEMA` to the module or standalone component that renders the tags:
|
|
60
71
|
|
|
61
72
|
```ts
|
|
@@ -76,6 +87,13 @@ export class ExampleComponent {
|
|
|
76
87
|
}
|
|
77
88
|
```
|
|
78
89
|
|
|
90
|
+
Use native Angular DOM event bindings for interactions. Do not pass React-style `onClick` in Angular templates:
|
|
91
|
+
|
|
92
|
+
```html
|
|
93
|
+
<bfrs-button variant="primary" (click)="continue()">Continue</bfrs-button>
|
|
94
|
+
<bfrs-paper (click)="openDetails()">Open details</bfrs-paper>
|
|
95
|
+
```
|
|
96
|
+
|
|
79
97
|
The custom-elements entrypoint registers Angular-friendly tags for the documented component surface, including layout, forms, feedback, overlays, filters, data display, navigation, and agentic pattern components.
|
|
80
98
|
|
|
81
99
|
Use simple attributes for primitive values and `[props]` for structured values or callback-capable advanced props:
|
|
@@ -5,8 +5,11 @@ export type BfrsCustomElementRegistryOptions = {
|
|
|
5
5
|
};
|
|
6
6
|
declare abstract class ReactCustomElement extends HTMLElement {
|
|
7
7
|
private root;
|
|
8
|
+
private mountNode;
|
|
8
9
|
private initialText;
|
|
9
10
|
private initialHtml;
|
|
11
|
+
private hasCapturedInitialContent;
|
|
12
|
+
private initialRenderQueued;
|
|
10
13
|
private propertyProps;
|
|
11
14
|
get props(): UnknownProps;
|
|
12
15
|
set props(value: UnknownProps);
|
|
@@ -31,6 +34,9 @@ declare abstract class ReactCustomElement extends HTMLElement {
|
|
|
31
34
|
protected objectValue<Value extends UnknownProps>(name: string, fallback: Value): Value;
|
|
32
35
|
protected emit(name: string, detail?: unknown): void;
|
|
33
36
|
private applyDefaultDisplay;
|
|
37
|
+
private ensureMountNode;
|
|
38
|
+
private scheduleInitialUpdate;
|
|
39
|
+
private captureInitialContent;
|
|
34
40
|
}
|
|
35
41
|
declare abstract class ComponentCustomElement extends ReactCustomElement {
|
|
36
42
|
protected abstract component(): unknown;
|
|
@@ -352,6 +358,7 @@ export declare class BfrsFilterBarElement extends ReactCustomElement {
|
|
|
352
358
|
static readonly tagName = "filter-bar";
|
|
353
359
|
static get observedAttributes(): string[];
|
|
354
360
|
private searchValue;
|
|
361
|
+
attributeChangedCallback(name?: string, oldValue?: string | null, newValue?: string | null): void;
|
|
355
362
|
protected defaultDisplay(): string;
|
|
356
363
|
protected renderElement(): unknown;
|
|
357
364
|
}
|