@krollins/blueprint 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/LICENSE +21 -0
- package/README.md +407 -0
- package/dist/components/accordion/accordion.d.ts +113 -0
- package/dist/components/accordion/accordion.d.ts.map +1 -0
- package/dist/components/accordion/accordion.style.d.ts +2 -0
- package/dist/components/accordion/accordion.style.d.ts.map +1 -0
- package/dist/components/alert/alert.d.ts +37 -0
- package/dist/components/alert/alert.d.ts.map +1 -0
- package/dist/components/alert/alert.style.d.ts +2 -0
- package/dist/components/alert/alert.style.d.ts.map +1 -0
- package/dist/components/avatar/avatar.d.ts +75 -0
- package/dist/components/avatar/avatar.d.ts.map +1 -0
- package/dist/components/avatar/avatar.style.d.ts +2 -0
- package/dist/components/avatar/avatar.style.d.ts.map +1 -0
- package/dist/components/badge/badge.d.ts +46 -0
- package/dist/components/badge/badge.d.ts.map +1 -0
- package/dist/components/badge/badge.style.d.ts +2 -0
- package/dist/components/badge/badge.style.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +110 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.style.d.ts +2 -0
- package/dist/components/breadcrumb/breadcrumb.style.d.ts.map +1 -0
- package/dist/components/button/button.d.ts +19 -0
- package/dist/components/button/button.d.ts.map +1 -0
- package/dist/components/button/button.style.d.ts +2 -0
- package/dist/components/button/button.style.d.ts.map +1 -0
- package/dist/components/card/card.d.ts +62 -0
- package/dist/components/card/card.d.ts.map +1 -0
- package/dist/components/card/card.style.d.ts +2 -0
- package/dist/components/card/card.style.d.ts.map +1 -0
- package/dist/components/checkbox/checkbox.d.ts +89 -0
- package/dist/components/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/checkbox.style.d.ts +2 -0
- package/dist/components/checkbox/checkbox.style.d.ts.map +1 -0
- package/dist/components/color-picker/color-picker.d.ts +366 -0
- package/dist/components/color-picker/color-picker.d.ts.map +1 -0
- package/dist/components/color-picker/color-picker.style.d.ts +14 -0
- package/dist/components/color-picker/color-picker.style.d.ts.map +1 -0
- package/dist/components/color-picker/color-picker.utils.d.ts +100 -0
- package/dist/components/color-picker/color-picker.utils.d.ts.map +1 -0
- package/dist/components/combobox/combobox.d.ts +74 -0
- package/dist/components/combobox/combobox.d.ts.map +1 -0
- package/dist/components/combobox/combobox.style.d.ts +2 -0
- package/dist/components/combobox/combobox.style.d.ts.map +1 -0
- package/dist/components/date-picker/date-picker.d.ts +65 -0
- package/dist/components/date-picker/date-picker.d.ts.map +1 -0
- package/dist/components/date-picker/date-picker.style.d.ts +2 -0
- package/dist/components/date-picker/date-picker.style.d.ts.map +1 -0
- package/dist/components/divider/divider.d.ts +54 -0
- package/dist/components/divider/divider.d.ts.map +1 -0
- package/dist/components/divider/divider.style.d.ts +2 -0
- package/dist/components/divider/divider.style.d.ts.map +1 -0
- package/dist/components/drawer/drawer.d.ts +113 -0
- package/dist/components/drawer/drawer.d.ts.map +1 -0
- package/dist/components/drawer/drawer.style.d.ts +2 -0
- package/dist/components/drawer/drawer.style.d.ts.map +1 -0
- package/dist/components/dropdown/dropdown.d.ts +80 -0
- package/dist/components/dropdown/dropdown.d.ts.map +1 -0
- package/dist/components/dropdown/dropdown.style.d.ts +2 -0
- package/dist/components/dropdown/dropdown.style.d.ts.map +1 -0
- package/dist/components/file-upload/file-upload.d.ts +116 -0
- package/dist/components/file-upload/file-upload.d.ts.map +1 -0
- package/dist/components/file-upload/file-upload.style.d.ts +2 -0
- package/dist/components/file-upload/file-upload.style.d.ts.map +1 -0
- package/dist/components/heading/heading.d.ts +46 -0
- package/dist/components/heading/heading.d.ts.map +1 -0
- package/dist/components/heading/heading.style.d.ts +2 -0
- package/dist/components/heading/heading.style.d.ts.map +1 -0
- package/dist/components/icon/icon.d.ts +57 -0
- package/dist/components/icon/icon.d.ts.map +1 -0
- package/dist/components/icon/icon.style.d.ts +2 -0
- package/dist/components/icon/icon.style.d.ts.map +1 -0
- package/dist/components/icon/icons/registry.generated.d.ts +25 -0
- package/dist/components/icon/icons/registry.generated.d.ts.map +1 -0
- package/dist/components/index.d.ts +45 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/input/input.d.ts +56 -0
- package/dist/components/input/input.d.ts.map +1 -0
- package/dist/components/input/input.style.d.ts +2 -0
- package/dist/components/input/input.style.d.ts.map +1 -0
- package/dist/components/link/link.d.ts +62 -0
- package/dist/components/link/link.d.ts.map +1 -0
- package/dist/components/link/link.style.d.ts +2 -0
- package/dist/components/link/link.style.d.ts.map +1 -0
- package/dist/components/menu/menu.d.ts +86 -0
- package/dist/components/menu/menu.d.ts.map +1 -0
- package/dist/components/menu/menu.style.d.ts +2 -0
- package/dist/components/menu/menu.style.d.ts.map +1 -0
- package/dist/components/modal/modal.d.ts +40 -0
- package/dist/components/modal/modal.d.ts.map +1 -0
- package/dist/components/modal/modal.style.d.ts +2 -0
- package/dist/components/modal/modal.style.d.ts.map +1 -0
- package/dist/components/multi-select/multi-select.d.ts +69 -0
- package/dist/components/multi-select/multi-select.d.ts.map +1 -0
- package/dist/components/multi-select/multi-select.style.d.ts +2 -0
- package/dist/components/multi-select/multi-select.style.d.ts.map +1 -0
- package/dist/components/notification/notification.d.ts +102 -0
- package/dist/components/notification/notification.d.ts.map +1 -0
- package/dist/components/notification/notification.style.d.ts +2 -0
- package/dist/components/notification/notification.style.d.ts.map +1 -0
- package/dist/components/number-input/number-input.d.ts +139 -0
- package/dist/components/number-input/number-input.d.ts.map +1 -0
- package/dist/components/number-input/number-input.style.d.ts +2 -0
- package/dist/components/number-input/number-input.style.d.ts.map +1 -0
- package/dist/components/pagination/pagination.d.ts +49 -0
- package/dist/components/pagination/pagination.d.ts.map +1 -0
- package/dist/components/pagination/pagination.style.d.ts +2 -0
- package/dist/components/pagination/pagination.style.d.ts.map +1 -0
- package/dist/components/popover/popover.d.ts +153 -0
- package/dist/components/popover/popover.d.ts.map +1 -0
- package/dist/components/popover/popover.style.d.ts +2 -0
- package/dist/components/popover/popover.style.d.ts.map +1 -0
- package/dist/components/progress/progress.d.ts +50 -0
- package/dist/components/progress/progress.d.ts.map +1 -0
- package/dist/components/progress/progress.style.d.ts +2 -0
- package/dist/components/progress/progress.style.d.ts.map +1 -0
- package/dist/components/radio/radio.d.ts +95 -0
- package/dist/components/radio/radio.d.ts.map +1 -0
- package/dist/components/radio/radio.style.d.ts +2 -0
- package/dist/components/radio/radio.style.d.ts.map +1 -0
- package/dist/components/select/select.d.ts +49 -0
- package/dist/components/select/select.d.ts.map +1 -0
- package/dist/components/select/select.style.d.ts +2 -0
- package/dist/components/select/select.style.d.ts.map +1 -0
- package/dist/components/skeleton/skeleton.d.ts +50 -0
- package/dist/components/skeleton/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton/skeleton.style.d.ts +2 -0
- package/dist/components/skeleton/skeleton.style.d.ts.map +1 -0
- package/dist/components/slider/slider.d.ts +115 -0
- package/dist/components/slider/slider.d.ts.map +1 -0
- package/dist/components/slider/slider.style.d.ts +2 -0
- package/dist/components/slider/slider.style.d.ts.map +1 -0
- package/dist/components/spinner/spinner.d.ts +36 -0
- package/dist/components/spinner/spinner.d.ts.map +1 -0
- package/dist/components/spinner/spinner.style.d.ts +2 -0
- package/dist/components/spinner/spinner.style.d.ts.map +1 -0
- package/dist/components/stepper/stepper.d.ts +228 -0
- package/dist/components/stepper/stepper.d.ts.map +1 -0
- package/dist/components/stepper/stepper.style.d.ts +2 -0
- package/dist/components/stepper/stepper.style.d.ts.map +1 -0
- package/dist/components/switch/switch.d.ts +90 -0
- package/dist/components/switch/switch.d.ts.map +1 -0
- package/dist/components/switch/switch.style.d.ts +2 -0
- package/dist/components/switch/switch.style.d.ts.map +1 -0
- package/dist/components/table/table.d.ts +176 -0
- package/dist/components/table/table.d.ts.map +1 -0
- package/dist/components/table/table.style.d.ts +2 -0
- package/dist/components/table/table.style.d.ts.map +1 -0
- package/dist/components/tabs/tabs.d.ts +124 -0
- package/dist/components/tabs/tabs.d.ts.map +1 -0
- package/dist/components/tabs/tabs.style.d.ts +2 -0
- package/dist/components/tabs/tabs.style.d.ts.map +1 -0
- package/dist/components/tag/tag.d.ts +64 -0
- package/dist/components/tag/tag.d.ts.map +1 -0
- package/dist/components/tag/tag.style.d.ts +2 -0
- package/dist/components/tag/tag.style.d.ts.map +1 -0
- package/dist/components/text/text.d.ts +86 -0
- package/dist/components/text/text.d.ts.map +1 -0
- package/dist/components/text/text.style.d.ts +2 -0
- package/dist/components/text/text.style.d.ts.map +1 -0
- package/dist/components/textarea/textarea.d.ts +94 -0
- package/dist/components/textarea/textarea.d.ts.map +1 -0
- package/dist/components/textarea/textarea.style.d.ts +2 -0
- package/dist/components/textarea/textarea.style.d.ts.map +1 -0
- package/dist/components/time-picker/time-picker.d.ts +51 -0
- package/dist/components/time-picker/time-picker.d.ts.map +1 -0
- package/dist/components/time-picker/time-picker.style.d.ts +2 -0
- package/dist/components/time-picker/time-picker.style.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.d.ts +52 -0
- package/dist/components/tooltip/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.style.d.ts +2 -0
- package/dist/components/tooltip/tooltip.style.d.ts.map +1 -0
- package/dist/components/tree/tree.d.ts +188 -0
- package/dist/components/tree/tree.d.ts.map +1 -0
- package/dist/components/tree/tree.style.d.ts +2 -0
- package/dist/components/tree/tree.style.d.ts.map +1 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17802 -0
- package/dist/index.js.map +1 -0
- package/dist/utilities/boolean-converter.d.ts +23 -0
- package/dist/utilities/boolean-converter.d.ts.map +1 -0
- package/dist/utilities/debounce.d.ts +12 -0
- package/dist/utilities/debounce.d.ts.map +1 -0
- package/dist/utilities/index.d.ts +5 -0
- package/dist/utilities/index.d.ts.map +1 -0
- package/dist/utilities/memoize.d.ts +7 -0
- package/dist/utilities/memoize.d.ts.map +1 -0
- package/dist/utilities/throttle.d.ts +12 -0
- package/dist/utilities/throttle.d.ts.map +1 -0
- package/package.json +93 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Kyle Rollins
|
|
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
ADDED
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
# Blueprint Component Library
|
|
2
|
+
|
|
3
|
+
Blueprint is a highly portable and customizable component library built on top of Lit.
|
|
4
|
+
|
|
5
|
+
## Why use Lit?
|
|
6
|
+
|
|
7
|
+
Lit is a lightweight library (~5KB minified/compressed) from Google that builds on top of web components, adding a reactive rendering system. There are many pros to using Lit:
|
|
8
|
+
|
|
9
|
+
- Excellent developer experience with declarative templates using tagged template literals (`html\`...\``)
|
|
10
|
+
- Tiny footprint — adds minimal overhead to native web components
|
|
11
|
+
- Reactive properties automatically trigger efficient re-renders
|
|
12
|
+
- Scoped styles via Shadow DOM with easy opt-out
|
|
13
|
+
- First-class TypeScript support with decorators (`@customElement`, `@property`, `@state`)
|
|
14
|
+
- Strong ecosystem — used by Adobe, Google, IBM, Cisco, SAP, Red Hat, and many others
|
|
15
|
+
- Great documentation and active community
|
|
16
|
+
- Outputs standard web components — no lock-in
|
|
17
|
+
|
|
18
|
+
The only real downsides are introducing a dependency and complicating build tooling.
|
|
19
|
+
|
|
20
|
+
## Project Status
|
|
21
|
+
|
|
22
|
+
🚧 **Early Development** - Blueprint is currently in the initial setup phase. The development infrastructure is complete and ready for component development, but **no components have been built yet**.
|
|
23
|
+
|
|
24
|
+
**What's Ready:**
|
|
25
|
+
|
|
26
|
+
- ✅ Lit + TypeScript + Vite build system
|
|
27
|
+
- ✅ ESLint and Prettier configuration
|
|
28
|
+
- ✅ Design token foundation (CSS custom properties)
|
|
29
|
+
- ✅ Development server with Storybook
|
|
30
|
+
- ✅ Project structure and conventions
|
|
31
|
+
|
|
32
|
+
**What's Next:**
|
|
33
|
+
|
|
34
|
+
- 🔜 First component (Button recommended)
|
|
35
|
+
- 🔜 Component documentation patterns
|
|
36
|
+
- 🔜 Testing infrastructure
|
|
37
|
+
- 🔜 Additional design system features
|
|
38
|
+
|
|
39
|
+
## Getting Started
|
|
40
|
+
|
|
41
|
+
### Prerequisites
|
|
42
|
+
|
|
43
|
+
- Node.js 18+
|
|
44
|
+
- npm or yarn
|
|
45
|
+
|
|
46
|
+
### Development Setup
|
|
47
|
+
|
|
48
|
+
1. Clone the repository and install dependencies:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
git clone <repository-url>
|
|
52
|
+
cd blueprint
|
|
53
|
+
npm install
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
2. Start the development server:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
npm run dev
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
3. Run Storybook for component development: `npm run storybook`
|
|
63
|
+
|
|
64
|
+
### Available Scripts
|
|
65
|
+
|
|
66
|
+
| Script | Description |
|
|
67
|
+
| ---------------------- | ------------------------------------------------- |
|
|
68
|
+
| `npm run dev` | Start development server with hot reload |
|
|
69
|
+
| `npm run build` | Build library for production (outputs to `dist/`) |
|
|
70
|
+
| `npm run preview` | Preview the built library |
|
|
71
|
+
| `npm run lint` | Run ESLint on source code |
|
|
72
|
+
| `npm run lint:fix` | Fix auto-fixable ESLint issues |
|
|
73
|
+
| `npm run format` | Format code with Prettier |
|
|
74
|
+
| `npm run format:check` | Check if code is properly formatted |
|
|
75
|
+
|
|
76
|
+
## Component Development Workflow
|
|
77
|
+
|
|
78
|
+
Blueprint uses a multi-agent workflow orchestrated by the `bp agent` CLI command. This workflow ensures components follow best practices, pass quality gates, and maintain consistency across the library.
|
|
79
|
+
|
|
80
|
+
### Quick Start
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# Start creating a new component
|
|
84
|
+
bp agent create modal
|
|
85
|
+
|
|
86
|
+
# Review code quality
|
|
87
|
+
bp agent review modal
|
|
88
|
+
|
|
89
|
+
# Advance to next phase (runs quality gates automatically)
|
|
90
|
+
bp agent next
|
|
91
|
+
|
|
92
|
+
# Check status anytime
|
|
93
|
+
bp agent status
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Workflow Phases
|
|
97
|
+
|
|
98
|
+
Each component progresses through three phases with automated quality enforcement:
|
|
99
|
+
|
|
100
|
+
#### 1. **Create** — Component Implementation
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
bp agent create <component-name>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**What happens:**
|
|
107
|
+
|
|
108
|
+
- ✅ Loads component definition from `.blueprint/features.toml`:
|
|
109
|
+
- Description, category, complexity, priority
|
|
110
|
+
- Dependencies (e.g., modal depends on button, icon)
|
|
111
|
+
- ✅ Creates session in `.blueprint/agent-state.json`
|
|
112
|
+
- ✅ Opens VS Code with component-creator agent context
|
|
113
|
+
- ✅ Agent creates required files:
|
|
114
|
+
- `component-name.ts` - Component logic with @customElement
|
|
115
|
+
- `component-name.style.ts` - Styles using design tokens
|
|
116
|
+
- `component-name.test.ts` - 10+ test cases
|
|
117
|
+
- `component-name.stories.ts` - Storybook documentation
|
|
118
|
+
- `README.md` - API documentation
|
|
119
|
+
|
|
120
|
+
#### 2. **Code Review** — Quality Verification
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
bp agent review <component-name>
|
|
124
|
+
# or automatically triggered by: bp agent next
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
**What happens:**
|
|
128
|
+
|
|
129
|
+
- ✅ Code-review agent checks:
|
|
130
|
+
- Blueprint patterns adherence
|
|
131
|
+
- TypeScript usage
|
|
132
|
+
- Test coverage and quality
|
|
133
|
+
- Documentation completeness
|
|
134
|
+
- Accessibility implementation
|
|
135
|
+
- ✅ Increments `iterations_taken` counter
|
|
136
|
+
- ✅ Suggests specific improvements with file paths and line numbers
|
|
137
|
+
|
|
138
|
+
#### 3. **Design Review** — Visual & UX Polish
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
bp agent next # (advances from code-review)
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**What happens:**
|
|
145
|
+
|
|
146
|
+
- ✅ Designer agent reviews:
|
|
147
|
+
- Design token usage (colors, spacing, typography)
|
|
148
|
+
- Visual consistency with existing components
|
|
149
|
+
- Responsive behavior
|
|
150
|
+
- UX patterns and interaction feedback
|
|
151
|
+
- Accessibility from user experience perspective
|
|
152
|
+
|
|
153
|
+
### Quality Gates
|
|
154
|
+
|
|
155
|
+
Before advancing between phases, **4 automated quality gates** must pass:
|
|
156
|
+
|
|
157
|
+
| Gate | Command | Blocking? |
|
|
158
|
+
| ---------------------- | ---------------------- | ------------- |
|
|
159
|
+
| 1️⃣ **Code Formatting** | `npm run format:check` | ⚠️ Warning |
|
|
160
|
+
| 2️⃣ **Linting** | `npm run lint` | 🚫 **BLOCKS** |
|
|
161
|
+
| 3️⃣ **Type Checking** | `npm run typecheck` | 🚫 **BLOCKS** |
|
|
162
|
+
| 4️⃣ **Test Suite** | `npm test` | 🚫 **BLOCKS** |
|
|
163
|
+
|
|
164
|
+
**Quality gates run automatically** when you execute `bp agent next` to advance phases. If any blocking gate fails, the component status becomes `blocked` and you must fix the issues before advancing.
|
|
165
|
+
|
|
166
|
+
Run quality gates manually without advancing:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
bp agent verify <component-name>
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Dependency Tracking
|
|
173
|
+
|
|
174
|
+
Components can declare dependencies in `.blueprint/features.toml`:
|
|
175
|
+
|
|
176
|
+
```toml
|
|
177
|
+
[[component]]
|
|
178
|
+
name = "modal"
|
|
179
|
+
description = "Dialog overlay"
|
|
180
|
+
depends_on = ["button", "icon"] # Won't start until these are complete
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
The workflow automatically checks dependencies before allowing components to advance.
|
|
184
|
+
|
|
185
|
+
### Example: Creating a Modal Component
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# Step 1: Start creation
|
|
189
|
+
bp agent create modal
|
|
190
|
+
|
|
191
|
+
# Output shows feature metadata:
|
|
192
|
+
# 🏗️ Starting component creation for: bp-modal
|
|
193
|
+
# 📋 Feature: Dialog overlay
|
|
194
|
+
# 📊 Category: composite | Complexity: large | Priority: 4
|
|
195
|
+
# 🔗 Dependencies: button, icon
|
|
196
|
+
# 💡 Instructions sent to VS Code Copilot...
|
|
197
|
+
|
|
198
|
+
# Step 2: Component-creator builds files
|
|
199
|
+
# (agent creates modal.ts, modal.style.ts, modal.test.ts, etc.)
|
|
200
|
+
|
|
201
|
+
# Step 3: Advance to code review
|
|
202
|
+
bp agent next
|
|
203
|
+
|
|
204
|
+
# Quality gates run automatically:
|
|
205
|
+
# 🔍 Verifying quality gates...
|
|
206
|
+
# 📐 Quality Gate 1/4: Code Formatting
|
|
207
|
+
# ✅ Formatting check passed
|
|
208
|
+
# 🔎 Quality Gate 2/4: Linting (BLOCKING)
|
|
209
|
+
# ✅ Linting passed
|
|
210
|
+
# 🔤 Quality Gate 3/4: Type Checking (BLOCKING)
|
|
211
|
+
# ✅ Type checking passed
|
|
212
|
+
# 🧪 Quality Gate 4/4: Test Suite (BLOCKING)
|
|
213
|
+
# ✅ All tests passed
|
|
214
|
+
# ✅ ALL QUALITY GATES PASSED
|
|
215
|
+
# ✅ Component creation phase complete
|
|
216
|
+
# 🔍 Starting code review phase...
|
|
217
|
+
|
|
218
|
+
# Step 4: Code review suggests improvements
|
|
219
|
+
# (make changes based on feedback)
|
|
220
|
+
|
|
221
|
+
# Step 5: Advance to design review
|
|
222
|
+
bp agent next
|
|
223
|
+
|
|
224
|
+
# Step 6: Complete component
|
|
225
|
+
bp agent next
|
|
226
|
+
# 🎉 Component bp-modal is complete!
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Agent Commands Reference
|
|
230
|
+
|
|
231
|
+
| Command | Description |
|
|
232
|
+
| ---------------------------------------------- | ------------------------------------------ |
|
|
233
|
+
| `bp agent create <name>` | Start component creation workflow |
|
|
234
|
+
| `bp agent review <name> [--type code\|design]` | Start code or design review |
|
|
235
|
+
| `bp agent next` | Advance to next phase (runs quality gates) |
|
|
236
|
+
| `bp agent verify [name]` | Run quality gates without advancing |
|
|
237
|
+
| `bp agent status [name]` | Show component development status |
|
|
238
|
+
|
|
239
|
+
### Workflow State Files
|
|
240
|
+
|
|
241
|
+
The workflow maintains state in `.blueprint/`:
|
|
242
|
+
|
|
243
|
+
- **`features.toml`** - Component definitions (name, description, category, complexity, priority, dependencies)
|
|
244
|
+
- **`agent-state.json`** - Current sessions and phase status
|
|
245
|
+
- **`progress.txt`** - Append-only log of all workflow events
|
|
246
|
+
|
|
247
|
+
### Project Structure
|
|
248
|
+
|
|
249
|
+
```
|
|
250
|
+
blueprint/
|
|
251
|
+
├── source/
|
|
252
|
+
│ ├── components/ # Individual components (Button, Input, etc.)
|
|
253
|
+
│ ├── themes/
|
|
254
|
+
│ │ ├── light.css # Design tokens and CSS variables
|
|
255
|
+
│ │ └── index.ts # Theme utilities
|
|
256
|
+
│ └── index.ts # Main library export
|
|
257
|
+
├── docs/ # Documentation site (Astro)
|
|
258
|
+
├── dist/ # Built library output (ESM only)
|
|
259
|
+
├── meta/ # Documentation and architecture notes
|
|
260
|
+
└── [configuration files] # TypeScript, ESLint, Prettier, Vite config
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### Technology Stack
|
|
264
|
+
|
|
265
|
+
- **Lit 3.3** — Web component library with reactive properties
|
|
266
|
+
- **TypeScript** — Type safety and developer experience
|
|
267
|
+
- **Vite** — Fast development server and build tool
|
|
268
|
+
- **ESLint + Prettier** — Code quality and formatting
|
|
269
|
+
- **CSS Custom Properties** — Design token system
|
|
270
|
+
|
|
271
|
+
## Roadmap
|
|
272
|
+
|
|
273
|
+
### Implemented Features
|
|
274
|
+
|
|
275
|
+
- ✅ **Theming system** — CSS custom properties (design tokens) for colors, spacing, typography, shadows, transitions, and z-index
|
|
276
|
+
- ✅ **Development environment** — Vite dev server with hot reload
|
|
277
|
+
- ✅ **Code quality** — ESLint and Prettier integration
|
|
278
|
+
- ✅ **TypeScript** — Full type safety with decorators support
|
|
279
|
+
|
|
280
|
+
### Planned Features
|
|
281
|
+
|
|
282
|
+
- 🔜 **Component library** — Starting with Phase 1 foundation components
|
|
283
|
+
- 🔜 **Testing infrastructure** — Unit tests, visual regression tests, accessibility audits
|
|
284
|
+
- 🔜 **Dark mode support** — Theme switching capability
|
|
285
|
+
- 🔜 **Accessibility (a11y)** — ARIA attributes, keyboard navigation, focus management
|
|
286
|
+
- 🔜 **Localization (i18n)** — RTL support, translatable strings
|
|
287
|
+
- 🔜 **Documentation** — Interactive examples, API references, usage guidelines
|
|
288
|
+
|
|
289
|
+
### Design Tokens
|
|
290
|
+
|
|
291
|
+
A well-structured token system typically includes:
|
|
292
|
+
|
|
293
|
+
| Category | Examples |
|
|
294
|
+
| ----------- | -------------------------------------------------------------------------- |
|
|
295
|
+
| Colors | `--bp-color-primary`, `--bp-color-danger`, `--bp-color-neutral-100` |
|
|
296
|
+
| Spacing | `--bp-spacing-xs`, `--bp-spacing-sm`, `--bp-spacing-md`, `--bp-spacing-lg` |
|
|
297
|
+
| Typography | `--bp-font-size-sm`, `--bp-font-weight-bold`, `--bp-line-height-normal` |
|
|
298
|
+
| Borders | `--bp-border-radius-sm`, `--bp-border-width` |
|
|
299
|
+
| Shadows | `--bp-shadow-sm`, `--bp-shadow-md`, `--bp-shadow-lg` |
|
|
300
|
+
| Transitions | `--bp-transition-fast`, `--bp-transition-slow` |
|
|
301
|
+
|
|
302
|
+
All design tokens are defined in [`source/themes/light.css`](source/themes/light.css) and follow the `--bp-*` naming convention.
|
|
303
|
+
|
|
304
|
+
## Planned Components
|
|
305
|
+
|
|
306
|
+
Based on analysis of popular design systems (Shoelace, Carbon, Spectrum, Material, Fluent, Chakra, Radix, Open UI research), here are the components we plan to build, organized by priority:
|
|
307
|
+
|
|
308
|
+
> **Note:** No components have been implemented yet. The infrastructure is ready for development to begin.
|
|
309
|
+
|
|
310
|
+
### Phase 1: Foundation (Essential)
|
|
311
|
+
|
|
312
|
+
These components cover 80% of common UI patterns:
|
|
313
|
+
|
|
314
|
+
| Component | Status | Description |
|
|
315
|
+
| ------------------- | ------ | ------------------------------------------------------------------------ |
|
|
316
|
+
| **Button** | ✅ | Primary, secondary, outline, ghost, danger, loading states, icon support |
|
|
317
|
+
| **Input** | ✅ | Text input with labels, validation, help text, prefix/suffix slots |
|
|
318
|
+
| **Textarea** | ✅ | Multi-line text input with auto-resize option |
|
|
319
|
+
| **Checkbox** | ✅ | Standard and indeterminate states |
|
|
320
|
+
| **Radio** | ✅ | Radio buttons and radio groups |
|
|
321
|
+
| **Switch / Toggle** | ✅ | Boolean toggle control |
|
|
322
|
+
| **Select** | ✅ | Dropdown selection (single) |
|
|
323
|
+
| **Icon** | ✅ | SVG icon wrapper with sizing |
|
|
324
|
+
| **Spinner** | ✅ | Loading indicator |
|
|
325
|
+
| **Badge** | ✅ | Status indicators and counts |
|
|
326
|
+
| **Alert** | ✅ | Informational, success, warning, error messages |
|
|
327
|
+
| **Card** | ✅ | Content container with header, body, footer slots |
|
|
328
|
+
| **Dialog / Modal** | ✅ | Overlay dialogs with focus trapping |
|
|
329
|
+
| **Tooltip** | ✅ | Hover/focus information popups |
|
|
330
|
+
|
|
331
|
+
### Phase 2: Enhanced Inputs & Navigation
|
|
332
|
+
|
|
333
|
+
| Component | Status | Description |
|
|
334
|
+
| --------------------------- | ------ | ----------------------------------------- |
|
|
335
|
+
| **Multi-select** | ✅ | Dropdown with multiple selection and tags |
|
|
336
|
+
| **Combobox / Autocomplete** | ✅ | Searchable dropdown |
|
|
337
|
+
| **Date Picker** | ✅ | Calendar-based date selection |
|
|
338
|
+
| **Time Picker** | ✅ | Time input with dropdown |
|
|
339
|
+
| **Slider / Range** | ✅ | Numeric range selection |
|
|
340
|
+
| **Number Input** | ✅ | Increment/decrement numeric input |
|
|
341
|
+
| **File Upload** | ✅ | Drag-and-drop file selection |
|
|
342
|
+
| **Tabs** | ✅ | Tabbed content navigation |
|
|
343
|
+
| **Breadcrumb** | ✅ | Navigation path indicator |
|
|
344
|
+
| **Pagination** | ✅ | Page navigation controls |
|
|
345
|
+
| **Menu** | ✅ | Dropdown and context menus |
|
|
346
|
+
| **Dropdown** | ✅ | Generic popover trigger |
|
|
347
|
+
|
|
348
|
+
### Phase 3: Layout & Data Display
|
|
349
|
+
|
|
350
|
+
| Component | Status | Description |
|
|
351
|
+
| ------------------------ | ------ | ------------------------------------------------------- |
|
|
352
|
+
| **Avatar** | ✅ | User/entity image with fallback initials |
|
|
353
|
+
| **Tag / Chip** | ✅ | Removable labels and filters |
|
|
354
|
+
| **Progress Bar** | ✅ | Determinate and indeterminate progress |
|
|
355
|
+
| **Divider** | ✅ | Visual separator |
|
|
356
|
+
| **Heading** | ✅ | Typography component for headings |
|
|
357
|
+
| **Link** | ✅ | Hyperlink component |
|
|
358
|
+
| **Text** | ✅ | Text/paragraph component |
|
|
359
|
+
| **Skeleton** | ✅ | Loading placeholders |
|
|
360
|
+
| **Toast / Notification** | ✅ | Non-blocking alerts |
|
|
361
|
+
| **Accordion** | ✅ | Collapsible content sections |
|
|
362
|
+
| **Table** | ✅ | Data tables with sorting, selection (consider headless) |
|
|
363
|
+
| **Tree** | ✅ | Hierarchical data display |
|
|
364
|
+
|
|
365
|
+
### Phase 4: Advanced Components
|
|
366
|
+
|
|
367
|
+
| Component | Status | Description |
|
|
368
|
+
| -------------------- | ------ | -------------------------- |
|
|
369
|
+
| **Drawer / Sidebar** | ✅ | Slide-in panels |
|
|
370
|
+
| **Popover** | ✅ | Rich content popovers |
|
|
371
|
+
| **Color Picker** | ✅ | Color selection tool |
|
|
372
|
+
| **Stepper / Wizard** | ✅ | Multi-step form navigation |
|
|
373
|
+
|
|
374
|
+
## Reference Design Systems
|
|
375
|
+
|
|
376
|
+
These are excellent resources for API design, accessibility patterns, and component structure:
|
|
377
|
+
|
|
378
|
+
| Library | Technology | Notes |
|
|
379
|
+
| ------------------------------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------------ |
|
|
380
|
+
| [Shoelace](https://shoelace.style) | Lit | Excellent reference for Lit-based components, now part of Font Awesome (Web Awesome) |
|
|
381
|
+
| [Carbon Web Components](https://carbondesignsystem.com) | Lit | IBM's design system, enterprise-grade |
|
|
382
|
+
| [Spectrum Web Components](https://opensource.adobe.com/spectrum-web-components) | Lit | Adobe's design system |
|
|
383
|
+
| [Lion](https://lion.js.org) | Lit | ING Bank's white-label components |
|
|
384
|
+
| [Ionic](https://ionicframework.com) | Stencil | Mobile-first components |
|
|
385
|
+
| [Radix UI](https://radix-ui.com) | React | Headless primitives, great a11y patterns |
|
|
386
|
+
| [Open UI](https://open-ui.org) | Research | W3C community group defining component standards |
|
|
387
|
+
|
|
388
|
+
## Contributing
|
|
389
|
+
|
|
390
|
+
### Creating a Component
|
|
391
|
+
|
|
392
|
+
1. Create a new folder in `source/components/[component-name]/`
|
|
393
|
+
2. Add the component implementation with proper TypeScript types
|
|
394
|
+
3. Export the component from `source/components/index.ts`
|
|
395
|
+
4. Create documentation page with `bp docs add <name>`
|
|
396
|
+
5. Ensure accessibility and responsive design
|
|
397
|
+
|
|
398
|
+
### Code Quality
|
|
399
|
+
|
|
400
|
+
- All code must pass ESLint and Prettier checks
|
|
401
|
+
- Components should use design tokens from the theme system
|
|
402
|
+
- Follow semantic HTML and ARIA best practices
|
|
403
|
+
- Include TypeScript types for all public APIs
|
|
404
|
+
|
|
405
|
+
## License
|
|
406
|
+
|
|
407
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '../icon/icon.js';
|
|
3
|
+
/**
|
|
4
|
+
* A container component that groups accordion items.
|
|
5
|
+
* Controls single or multiple expansion behavior.
|
|
6
|
+
*
|
|
7
|
+
* @element bp-accordion
|
|
8
|
+
*
|
|
9
|
+
* @property {boolean} multiple - Whether multiple items can be expanded simultaneously
|
|
10
|
+
* @property {string[]} expandedItems - Array of expanded item IDs
|
|
11
|
+
* @property {boolean} disabled - Whether all items are disabled
|
|
12
|
+
*
|
|
13
|
+
* @fires bp-expand - Fired when an item is expanded
|
|
14
|
+
* @fires bp-collapse - Fired when an item is collapsed
|
|
15
|
+
*
|
|
16
|
+
* @slot - Default slot for bp-accordion-item elements
|
|
17
|
+
*
|
|
18
|
+
* @csspart accordion - The main accordion container
|
|
19
|
+
*/
|
|
20
|
+
export declare class BpAccordion extends LitElement {
|
|
21
|
+
/** Whether multiple items can be expanded simultaneously */
|
|
22
|
+
multiple: boolean;
|
|
23
|
+
/** Array of expanded item IDs */
|
|
24
|
+
expandedItems: string[];
|
|
25
|
+
/** Whether all items are disabled */
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
static styles: import("lit").CSSResult[];
|
|
28
|
+
constructor();
|
|
29
|
+
connectedCallback(): void;
|
|
30
|
+
disconnectedCallback(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Handles item toggle events from child accordion items.
|
|
33
|
+
* Updates expandedItems array based on multiple mode and dispatches expand/collapse events.
|
|
34
|
+
*/
|
|
35
|
+
private handleItemToggle;
|
|
36
|
+
/**
|
|
37
|
+
* Synchronizes child accordion items with the expandedItems state.
|
|
38
|
+
* Also applies disabled state to all items when accordion is disabled.
|
|
39
|
+
*/
|
|
40
|
+
private updateChildItems;
|
|
41
|
+
/**
|
|
42
|
+
* Initializes expandedItems array from children with expanded attribute.
|
|
43
|
+
* Called on first render to respect items marked as expanded in HTML.
|
|
44
|
+
*/
|
|
45
|
+
private initializeExpandedItems;
|
|
46
|
+
firstUpdated(): void;
|
|
47
|
+
updated(changedProperties: Map<string, unknown>): void;
|
|
48
|
+
/** Expand an item by ID */
|
|
49
|
+
expand(id: string): void;
|
|
50
|
+
/** Collapse an item by ID */
|
|
51
|
+
collapse(id: string): void;
|
|
52
|
+
/** Expand all items (only works in multiple mode) */
|
|
53
|
+
expandAll(): void;
|
|
54
|
+
/** Collapse all items */
|
|
55
|
+
collapseAll(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Handles slot changes - when children are added or removed.
|
|
58
|
+
* Initializes expanded state from new children.
|
|
59
|
+
*/
|
|
60
|
+
private handleSlotChange;
|
|
61
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* An individual accordion item with header and collapsible content.
|
|
65
|
+
*
|
|
66
|
+
* @element bp-accordion-item
|
|
67
|
+
*
|
|
68
|
+
* @property {string} itemId - Unique identifier for this item
|
|
69
|
+
* @property {string} header - Header text displayed in the trigger button
|
|
70
|
+
* @property {boolean} expanded - Whether the content is expanded
|
|
71
|
+
* @property {boolean} disabled - Whether this item is disabled
|
|
72
|
+
*
|
|
73
|
+
* @slot - Default slot for the collapsible content
|
|
74
|
+
* @slot header - Custom header content (overrides header property)
|
|
75
|
+
* @slot icon - Custom icon for the header
|
|
76
|
+
*
|
|
77
|
+
* @csspart item - The accordion item container
|
|
78
|
+
* @csspart header - The header/trigger button
|
|
79
|
+
* @csspart icon - The expand/collapse icon
|
|
80
|
+
* @csspart content - The collapsible content wrapper
|
|
81
|
+
* @csspart body - The inner content container
|
|
82
|
+
*/
|
|
83
|
+
export declare class BpAccordionItem extends LitElement {
|
|
84
|
+
/** Unique identifier for this item */
|
|
85
|
+
itemId: string;
|
|
86
|
+
/** Header text displayed in the trigger button */
|
|
87
|
+
header: string;
|
|
88
|
+
/** Whether the content is expanded */
|
|
89
|
+
expanded: boolean;
|
|
90
|
+
/** Whether this item is disabled */
|
|
91
|
+
disabled: boolean;
|
|
92
|
+
static styles: import("lit").CSSResult[];
|
|
93
|
+
constructor();
|
|
94
|
+
connectedCallback(): void;
|
|
95
|
+
/**
|
|
96
|
+
* Handles toggle action and dispatches bp-item-toggle event.
|
|
97
|
+
* Also manages focus on the header button after expansion.
|
|
98
|
+
*/
|
|
99
|
+
private handleToggle;
|
|
100
|
+
/**
|
|
101
|
+
* Handles keyboard navigation.
|
|
102
|
+
* Triggers toggle on Enter or Space key press.
|
|
103
|
+
*/
|
|
104
|
+
private handleKeyDown;
|
|
105
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
106
|
+
}
|
|
107
|
+
declare global {
|
|
108
|
+
interface HTMLElementTagNameMap {
|
|
109
|
+
'bp-accordion': BpAccordion;
|
|
110
|
+
'bp-accordion-item': BpAccordionItem;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../source/components/accordion/accordion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAIvC,OAAO,iBAAiB,CAAC;AAEzB;;;;;;;;;;;;;;;;GAgBG;AACH,qBACa,WAAY,SAAQ,UAAU;IACzC,4DAA4D;IACR,QAAQ,EAAE,OAAO,CAAC;IAEtE,iCAAiC;IACE,aAAa,EAAE,MAAM,EAAE,CAAC;IAE3D,qCAAqC;IACe,QAAQ,EAAE,OAAO,CAAC;IAEtE,MAAM,CAAC,MAAM,4BAAqB;;IASlC,iBAAiB,IAAI,IAAI;IAKzB,oBAAoB,IAAI,IAAI;IAK5B;;;OAGG;IACH,OAAO,CAAC,gBAAgB,CA8BtB;IAEF;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAYxB;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IAiB/B,YAAY,IAAI,IAAI;IAMpB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAStD,2BAA2B;IAC3B,MAAM,CAAC,EAAE,EAAE,MAAM;IAkBjB,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM;IAcnB,qDAAqD;IACrD,SAAS;IAcT,yBAAyB;IACzB,WAAW;IAKX;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IASxB,MAAM;CAYP;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBACa,eAAgB,SAAQ,UAAU;IAC7C,sCAAsC;IAE9B,MAAM,EAAE,MAAM,CAAC;IAEvB,kDAAkD;IACd,MAAM,EAAE,MAAM,CAAC;IAEnD,sCAAsC;IACc,QAAQ,EAAE,OAAO,CAAC;IAEtE,oCAAoC;IACgB,QAAQ,EAAE,OAAO,CAAC;IAEtE,MAAM,CAAC,MAAM,4BAAqB;;IAUlC,iBAAiB,IAAI,IAAI;IAQzB;;;OAGG;IACH,OAAO,CAAC,YAAY;IAoBpB;;;OAGG;IACH,OAAO,CAAC,aAAa;IASrB,MAAM;CA6CP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;QAC5B,mBAAmB,EAAE,eAAe,CAAC;KACtC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.style.d.ts","sourceRoot":"","sources":["../../../source/components/accordion/accordion.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,yBA6K3B,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '../icon/icon.js';
|
|
3
|
+
export type AlertVariant = 'info' | 'success' | 'warning' | 'error';
|
|
4
|
+
/**
|
|
5
|
+
* An alert component for displaying notification messages to users.
|
|
6
|
+
*
|
|
7
|
+
* @slot - Message content
|
|
8
|
+
* @slot title - Optional title/heading for the alert
|
|
9
|
+
* @slot icon - Optional custom icon (replaces default icon)
|
|
10
|
+
*
|
|
11
|
+
* @fires bp-close - Fired when the alert is dismissed (cancelable)
|
|
12
|
+
*/
|
|
13
|
+
export declare class BpAlert extends LitElement {
|
|
14
|
+
/**
|
|
15
|
+
* Visual variant indicating the type of alert
|
|
16
|
+
*/
|
|
17
|
+
variant: AlertVariant;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the alert can be dismissed by the user
|
|
20
|
+
*/
|
|
21
|
+
dismissible: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Whether to show a default icon for the variant
|
|
24
|
+
*/
|
|
25
|
+
showIcon: boolean;
|
|
26
|
+
static styles: import("lit").CSSResult[];
|
|
27
|
+
constructor();
|
|
28
|
+
private handleClose;
|
|
29
|
+
private getIconName;
|
|
30
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
31
|
+
}
|
|
32
|
+
declare global {
|
|
33
|
+
interface HTMLElementTagNameMap {
|
|
34
|
+
'bp-alert': BpAlert;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../source/components/alert/alert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAIvC,OAAO,iBAAiB,CAAC;AAEzB,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAQpE;;;;;;;;GAQG;AACH,qBACa,OAAQ,SAAQ,UAAU;IACrC;;OAEG;IACgD,OAAO,EAAE,YAAY,CAAC;IAEzE;;OAEG;IACiD,WAAW,EAAE,OAAO,CAAC;IAEzE;;OAEG;IACiD,QAAQ,EAAE,OAAO,CAAC;IAEtE,MAAM,CAAC,MAAM,4BAAiB;;IAS9B,OAAO,CAAC,WAAW;IAmBnB,OAAO,CAAC,WAAW;IAUnB,MAAM;CAsCP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,OAAO,CAAC;KACrB;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.style.d.ts","sourceRoot":"","sources":["../../../source/components/alert/alert.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,yBAiIvB,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '../icon/icon.js';
|
|
3
|
+
export type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
+
export type AvatarShape = 'circle' | 'square';
|
|
5
|
+
export type AvatarStatus = 'online' | 'offline' | 'busy' | 'away';
|
|
6
|
+
/**
|
|
7
|
+
* An avatar component that displays user profile images with fallback to initials.
|
|
8
|
+
* Supports multiple sizes, shapes, status indicators, and interactive states.
|
|
9
|
+
*/
|
|
10
|
+
export declare class BpAvatar extends LitElement {
|
|
11
|
+
/**
|
|
12
|
+
* Image source URL for the avatar.
|
|
13
|
+
* @type {string}
|
|
14
|
+
* @default ''
|
|
15
|
+
*/
|
|
16
|
+
src: string;
|
|
17
|
+
/**
|
|
18
|
+
* Alt text for the avatar image (accessibility).
|
|
19
|
+
* @type {string}
|
|
20
|
+
* @default ''
|
|
21
|
+
*/
|
|
22
|
+
alt: string;
|
|
23
|
+
/**
|
|
24
|
+
* Initials to display when no image is provided.
|
|
25
|
+
* @type {string}
|
|
26
|
+
* @default ''
|
|
27
|
+
*/
|
|
28
|
+
initials: string;
|
|
29
|
+
/**
|
|
30
|
+
* Size of the avatar.
|
|
31
|
+
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl'}
|
|
32
|
+
* @default 'md'
|
|
33
|
+
*/
|
|
34
|
+
size: AvatarSize;
|
|
35
|
+
/**
|
|
36
|
+
* Shape of the avatar.
|
|
37
|
+
* @type {'circle' | 'square'}
|
|
38
|
+
* @default 'circle'
|
|
39
|
+
*/
|
|
40
|
+
shape: AvatarShape;
|
|
41
|
+
/**
|
|
42
|
+
* Status indicator for the avatar.
|
|
43
|
+
* @type {'online' | 'offline' | 'busy' | 'away' | undefined}
|
|
44
|
+
* @default undefined
|
|
45
|
+
*/
|
|
46
|
+
status?: AvatarStatus;
|
|
47
|
+
/**
|
|
48
|
+
* Makes the avatar interactive with hover/focus states.
|
|
49
|
+
* @type {boolean}
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
clickable: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Name for tooltip display on hover.
|
|
55
|
+
* @type {string}
|
|
56
|
+
* @default ''
|
|
57
|
+
*/
|
|
58
|
+
name: string;
|
|
59
|
+
/**
|
|
60
|
+
* Internal state to track if image failed to load.
|
|
61
|
+
* @private
|
|
62
|
+
*/
|
|
63
|
+
private imageError;
|
|
64
|
+
static styles: import("lit").CSSResult[];
|
|
65
|
+
constructor();
|
|
66
|
+
private handleImageError;
|
|
67
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
68
|
+
updated(changedProperties: Map<string, unknown>): void;
|
|
69
|
+
}
|
|
70
|
+
declare global {
|
|
71
|
+
interface HTMLElementTagNameMap {
|
|
72
|
+
'bp-avatar': BpAvatar;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=avatar.d.ts.map
|