@actabldesign/bellhop-angular 0.0.4 → 0.0.12
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 +202 -0
- package/dist/package.json +4 -3
- package/llms.txt +2969 -0
- package/package.json +3 -2
package/README.md
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# @actabldesign/bellhop-angular
|
|
2
|
+
|
|
3
|
+
Angular wrapper components for the Bellhop design system. Provides Angular-friendly wrappers around the Stencil web components from `@actabldesign/bellhop-core`.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @actabldesign/bellhop-angular @actabldesign/bellhop-core @actabldesign/bellhop-styles
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Setup
|
|
12
|
+
|
|
13
|
+
### 1. Register Custom Elements
|
|
14
|
+
|
|
15
|
+
In your `main.ts`:
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { defineCustomElements } from '@actabldesign/bellhop-core/loader';
|
|
19
|
+
|
|
20
|
+
defineCustomElements();
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### 2. Import Styles
|
|
24
|
+
|
|
25
|
+
In your `src/styles.css`:
|
|
26
|
+
|
|
27
|
+
```css
|
|
28
|
+
@import '@actabldesign/bellhop-styles';
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### 3. Add Schema to Module/Component
|
|
32
|
+
|
|
33
|
+
For standalone components:
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
import { Component } from '@angular/core';
|
|
37
|
+
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
38
|
+
|
|
39
|
+
@Component({
|
|
40
|
+
selector: 'app-example',
|
|
41
|
+
standalone: true,
|
|
42
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
43
|
+
template: `<bh-button label="Click Me" hierarchy="primary"></bh-button>`,
|
|
44
|
+
})
|
|
45
|
+
export class ExampleComponent {}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
For NgModule-based apps:
|
|
49
|
+
|
|
50
|
+
```typescript
|
|
51
|
+
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
52
|
+
|
|
53
|
+
@NgModule({
|
|
54
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
55
|
+
})
|
|
56
|
+
export class AppModule {}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Usage
|
|
60
|
+
|
|
61
|
+
### Basic Example
|
|
62
|
+
|
|
63
|
+
```html
|
|
64
|
+
<bh-button
|
|
65
|
+
label="Primary Button"
|
|
66
|
+
hierarchy="primary"
|
|
67
|
+
(bhClick)="handleClick($event)"
|
|
68
|
+
></bh-button>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Form Inputs
|
|
72
|
+
|
|
73
|
+
```html
|
|
74
|
+
<bh-input-text
|
|
75
|
+
label="Email"
|
|
76
|
+
placeholder="Enter your email"
|
|
77
|
+
[value]="email"
|
|
78
|
+
(bhInput)="onEmailChange($event)"
|
|
79
|
+
></bh-input-text>
|
|
80
|
+
|
|
81
|
+
<bh-dropdown
|
|
82
|
+
label="Select an option"
|
|
83
|
+
[options]="options"
|
|
84
|
+
(bhChange)="onOptionSelect($event)"
|
|
85
|
+
></bh-dropdown>
|
|
86
|
+
|
|
87
|
+
<bh-checkbox
|
|
88
|
+
label="Accept terms"
|
|
89
|
+
[checked]="accepted"
|
|
90
|
+
(bhChange)="onAcceptChange($event)"
|
|
91
|
+
></bh-checkbox>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Cards and Layout
|
|
95
|
+
|
|
96
|
+
```html
|
|
97
|
+
<bh-card>
|
|
98
|
+
<bh-card-header>
|
|
99
|
+
<span slot="title">Card Title</span>
|
|
100
|
+
<span slot="subtitle">Card subtitle</span>
|
|
101
|
+
</bh-card-header>
|
|
102
|
+
|
|
103
|
+
<p>Card content goes here</p>
|
|
104
|
+
|
|
105
|
+
<bh-card-footer>
|
|
106
|
+
<bh-button label="Cancel" hierarchy="tertiary"></bh-button>
|
|
107
|
+
<bh-button label="Save" hierarchy="primary"></bh-button>
|
|
108
|
+
</bh-card-footer>
|
|
109
|
+
</bh-card>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Modal Dialog
|
|
113
|
+
|
|
114
|
+
```html
|
|
115
|
+
<bh-modal [open]="isModalOpen" (bhClose)="closeModal()">
|
|
116
|
+
<bh-modal-header>
|
|
117
|
+
<span slot="title">Confirm Action</span>
|
|
118
|
+
</bh-modal-header>
|
|
119
|
+
|
|
120
|
+
<p>Are you sure you want to proceed?</p>
|
|
121
|
+
|
|
122
|
+
<bh-modal-actions>
|
|
123
|
+
<bh-button
|
|
124
|
+
label="Cancel"
|
|
125
|
+
hierarchy="secondary"
|
|
126
|
+
(bhClick)="closeModal()"
|
|
127
|
+
></bh-button>
|
|
128
|
+
<bh-button
|
|
129
|
+
label="Confirm"
|
|
130
|
+
hierarchy="primary"
|
|
131
|
+
(bhClick)="confirm()"
|
|
132
|
+
></bh-button>
|
|
133
|
+
</bh-modal-actions>
|
|
134
|
+
</bh-modal>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Data Display
|
|
138
|
+
|
|
139
|
+
```html
|
|
140
|
+
<bh-badge label="New" color="primary"></bh-badge>
|
|
141
|
+
|
|
142
|
+
<bh-tag label="Category" [removable]="true" (bhRemove)="removeTag()"></bh-tag>
|
|
143
|
+
|
|
144
|
+
<bh-avatar name="John Doe" size="md"></bh-avatar>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Event Handling
|
|
148
|
+
|
|
149
|
+
All Bellhop events use the `bh` prefix. In Angular templates, bind to these using the standard event syntax:
|
|
150
|
+
|
|
151
|
+
```html
|
|
152
|
+
<!-- Button click -->
|
|
153
|
+
<bh-button (bhClick)="handleClick($event)"></bh-button>
|
|
154
|
+
|
|
155
|
+
<!-- Input change -->
|
|
156
|
+
<bh-input-text
|
|
157
|
+
(bhInput)="handleInput($event)"
|
|
158
|
+
(bhChange)="handleChange($event)"
|
|
159
|
+
></bh-input-text>
|
|
160
|
+
|
|
161
|
+
<!-- Dropdown selection -->
|
|
162
|
+
<bh-dropdown (bhChange)="handleSelect($event)"></bh-dropdown>
|
|
163
|
+
|
|
164
|
+
<!-- Modal close -->
|
|
165
|
+
<bh-modal (bhClose)="handleClose()"></bh-modal>
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Available Components
|
|
169
|
+
|
|
170
|
+
All components from `@actabldesign/bellhop-core` are available. Key components include:
|
|
171
|
+
|
|
172
|
+
**Layout**: `bh-appbar`, `bh-sidebar`, `bh-card`, `bh-modal`, `bh-accordion`, `bh-tabs`
|
|
173
|
+
|
|
174
|
+
**Forms**: `bh-button`, `bh-input-text`, `bh-input-password`, `bh-input-number`, `bh-textarea`, `bh-checkbox`, `bh-radio-button`, `bh-toggle`, `bh-dropdown`
|
|
175
|
+
|
|
176
|
+
**Date/Time**: `bh-date-picker`, `bh-date-range-picker`, `bh-month-picker`
|
|
177
|
+
|
|
178
|
+
**Data Display**: `bh-data-grid`, `bh-badge`, `bh-tag`, `bh-avatar`, `bh-tooltip`
|
|
179
|
+
|
|
180
|
+
**Feedback**: `bh-notification`, `bh-loader-spinner`, `bh-empty-state`, `bh-skeleton-loader`
|
|
181
|
+
|
|
182
|
+
**Navigation**: `bh-breadcrumbs`, `bh-page-navigation`, `bh-pagination`
|
|
183
|
+
|
|
184
|
+
**Charts**: `bh-bar-chart`, `bh-pie-chart`, `bh-trend-chart`
|
|
185
|
+
|
|
186
|
+
See the [bellhop-core README](../bellhop-core/README.md) for the complete component list.
|
|
187
|
+
|
|
188
|
+
## Compatibility
|
|
189
|
+
|
|
190
|
+
- Angular 19+
|
|
191
|
+
- Works with both standalone components and NgModule-based apps
|
|
192
|
+
|
|
193
|
+
## Related Packages
|
|
194
|
+
|
|
195
|
+
- `@actabldesign/bellhop-core` - Web Components (StencilJS)
|
|
196
|
+
- `@actabldesign/bellhop-react` - React component wrappers
|
|
197
|
+
- `@actabldesign/bellhop-styles` - CSS styles and design tokens
|
|
198
|
+
- `@actabldesign/bellhop-assets` - SVG icons, illustrations, logos
|
|
199
|
+
|
|
200
|
+
## License
|
|
201
|
+
|
|
202
|
+
MIT
|
package/dist/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@actabldesign/bellhop-angular",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Angular wrapper components for Bellhop Stencil web components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "https://github.com/actabldesign/bellhop.git",
|
|
10
|
+
"url": "git+https://github.com/actabldesign/bellhop.git",
|
|
11
11
|
"directory": "packages/bellhop-angular"
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"license": "MIT",
|
|
36
36
|
"publishConfig": {
|
|
37
|
-
"registry": "https://
|
|
37
|
+
"registry": "https://registry.npmjs.org/",
|
|
38
|
+
"access": "public"
|
|
38
39
|
}
|
|
39
40
|
}
|