@constela/ui 0.3.0 → 0.3.2
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 +174 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -68,17 +68,25 @@ components/
|
|
|
68
68
|
- **Tooltip** - Hover tooltip
|
|
69
69
|
- **Popover** - Click-triggered popover
|
|
70
70
|
|
|
71
|
-
### Data Display (
|
|
72
|
-
- **Table** - Data table
|
|
71
|
+
### Data Display (8)
|
|
73
72
|
- **Card** - Card container
|
|
74
73
|
- **Badge** - Inline badge
|
|
75
74
|
- **Avatar** - User avatar
|
|
76
75
|
- **Skeleton** - Loading placeholder
|
|
76
|
+
- **DataTable** - Advanced data table with sorting, filtering, and pagination
|
|
77
|
+
- **VirtualScroll** - Virtualized list for large datasets
|
|
78
|
+
- **Chart** - 12 chart types (line, bar, pie, area, scatter, radar, doughnut, polar, bubble, histogram, candlestick, treemap)
|
|
77
79
|
|
|
78
|
-
###
|
|
80
|
+
### Date & Time (2)
|
|
81
|
+
- **DatePicker** - Date selection with calendar popup
|
|
82
|
+
- **Calendar** - Calendar view for date display and selection
|
|
83
|
+
|
|
84
|
+
### Navigation (5)
|
|
79
85
|
- **Tabs** - Tab navigation
|
|
80
86
|
- **Breadcrumb** - Breadcrumb navigation
|
|
81
87
|
- **Pagination** - Page pagination
|
|
88
|
+
- **Tree** - Hierarchical tree view with expand/collapse
|
|
89
|
+
- **Accordion** - Collapsible content sections
|
|
82
90
|
|
|
83
91
|
### Layout (3)
|
|
84
92
|
- **Container** - Max-width container
|
|
@@ -123,6 +131,169 @@ Each component uses the CVA-like style system with:
|
|
|
123
131
|
}
|
|
124
132
|
```
|
|
125
133
|
|
|
134
|
+
## New Components (2026.02)
|
|
135
|
+
|
|
136
|
+
### DatePicker
|
|
137
|
+
|
|
138
|
+
Date selection with calendar popup:
|
|
139
|
+
|
|
140
|
+
```json
|
|
141
|
+
{
|
|
142
|
+
"kind": "component",
|
|
143
|
+
"name": "DatePicker",
|
|
144
|
+
"props": {
|
|
145
|
+
"value": { "expr": "state", "name": "selectedDate" },
|
|
146
|
+
"onChange": { "event": "change", "action": "updateDate" },
|
|
147
|
+
"format": { "expr": "lit", "value": "yyyy-MM-dd" },
|
|
148
|
+
"minDate": { "expr": "lit", "value": "2024-01-01" },
|
|
149
|
+
"maxDate": { "expr": "lit", "value": "2025-12-31" },
|
|
150
|
+
"locale": { "expr": "lit", "value": "ja-JP" }
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Calendar
|
|
156
|
+
|
|
157
|
+
Calendar view for date display:
|
|
158
|
+
|
|
159
|
+
```json
|
|
160
|
+
{
|
|
161
|
+
"kind": "component",
|
|
162
|
+
"name": "Calendar",
|
|
163
|
+
"props": {
|
|
164
|
+
"value": { "expr": "state", "name": "selectedDate" },
|
|
165
|
+
"onSelect": { "event": "select", "action": "handleDateSelect" },
|
|
166
|
+
"highlightedDates": { "expr": "state", "name": "events" },
|
|
167
|
+
"weekStartsOn": { "expr": "lit", "value": 1 }
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Tree
|
|
173
|
+
|
|
174
|
+
Hierarchical tree view:
|
|
175
|
+
|
|
176
|
+
```json
|
|
177
|
+
{
|
|
178
|
+
"kind": "component",
|
|
179
|
+
"name": "Tree",
|
|
180
|
+
"props": {
|
|
181
|
+
"items": { "expr": "state", "name": "treeData" },
|
|
182
|
+
"onSelect": { "event": "select", "action": "handleNodeSelect" },
|
|
183
|
+
"expandedKeys": { "expr": "state", "name": "expanded" },
|
|
184
|
+
"selectedKey": { "expr": "state", "name": "selected" },
|
|
185
|
+
"showIcons": { "expr": "lit", "value": true }
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Accordion
|
|
191
|
+
|
|
192
|
+
Collapsible content sections:
|
|
193
|
+
|
|
194
|
+
```json
|
|
195
|
+
{
|
|
196
|
+
"kind": "component",
|
|
197
|
+
"name": "Accordion",
|
|
198
|
+
"props": {
|
|
199
|
+
"items": { "expr": "state", "name": "accordionItems" },
|
|
200
|
+
"type": { "expr": "lit", "value": "single" },
|
|
201
|
+
"collapsible": { "expr": "lit", "value": true },
|
|
202
|
+
"defaultValue": { "expr": "lit", "value": "item-1" }
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### DataTable
|
|
208
|
+
|
|
209
|
+
Advanced data table with sorting, filtering, and pagination:
|
|
210
|
+
|
|
211
|
+
```json
|
|
212
|
+
{
|
|
213
|
+
"kind": "component",
|
|
214
|
+
"name": "DataTable",
|
|
215
|
+
"props": {
|
|
216
|
+
"data": { "expr": "state", "name": "tableData" },
|
|
217
|
+
"columns": { "expr": "lit", "value": [
|
|
218
|
+
{ "key": "name", "title": "Name", "sortable": true },
|
|
219
|
+
{ "key": "email", "title": "Email", "sortable": true, "filterable": true },
|
|
220
|
+
{ "key": "status", "title": "Status", "sortable": true }
|
|
221
|
+
]},
|
|
222
|
+
"pageSize": { "expr": "lit", "value": 10 },
|
|
223
|
+
"sortable": { "expr": "lit", "value": true },
|
|
224
|
+
"filterable": { "expr": "lit", "value": true },
|
|
225
|
+
"selectable": { "expr": "lit", "value": true },
|
|
226
|
+
"onSort": { "event": "sort", "action": "handleSort" },
|
|
227
|
+
"onFilter": { "event": "filter", "action": "handleFilter" },
|
|
228
|
+
"onPageChange": { "event": "pageChange", "action": "handlePageChange" }
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### VirtualScroll
|
|
234
|
+
|
|
235
|
+
Virtualized list for large datasets:
|
|
236
|
+
|
|
237
|
+
```json
|
|
238
|
+
{
|
|
239
|
+
"kind": "component",
|
|
240
|
+
"name": "VirtualScroll",
|
|
241
|
+
"props": {
|
|
242
|
+
"items": { "expr": "state", "name": "largeList" },
|
|
243
|
+
"itemHeight": { "expr": "lit", "value": 50 },
|
|
244
|
+
"containerHeight": { "expr": "lit", "value": 400 },
|
|
245
|
+
"overscan": { "expr": "lit", "value": 5 },
|
|
246
|
+
"renderItem": { "expr": "param", "name": "itemTemplate" }
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Chart
|
|
252
|
+
|
|
253
|
+
12 chart types with animations:
|
|
254
|
+
|
|
255
|
+
```json
|
|
256
|
+
{
|
|
257
|
+
"kind": "component",
|
|
258
|
+
"name": "Chart",
|
|
259
|
+
"props": {
|
|
260
|
+
"type": { "expr": "lit", "value": "line" },
|
|
261
|
+
"data": { "expr": "state", "name": "chartData" },
|
|
262
|
+
"options": { "expr": "lit", "value": {
|
|
263
|
+
"responsive": true,
|
|
264
|
+
"animation": { "duration": 750, "easing": "easeOutQuart" },
|
|
265
|
+
"scales": {
|
|
266
|
+
"y": { "beginAtZero": true }
|
|
267
|
+
},
|
|
268
|
+
"plugins": {
|
|
269
|
+
"legend": { "position": "top" },
|
|
270
|
+
"tooltip": { "enabled": true }
|
|
271
|
+
}
|
|
272
|
+
}},
|
|
273
|
+
"width": { "expr": "lit", "value": 600 },
|
|
274
|
+
"height": { "expr": "lit", "value": 400 }
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
**Supported Chart Types:**
|
|
280
|
+
|
|
281
|
+
| Type | Description |
|
|
282
|
+
|------|-------------|
|
|
283
|
+
| `line` | Line chart with optional curved paths |
|
|
284
|
+
| `bar` | Vertical bar chart |
|
|
285
|
+
| `horizontalBar` | Horizontal bar chart |
|
|
286
|
+
| `pie` | Pie chart |
|
|
287
|
+
| `doughnut` | Doughnut chart |
|
|
288
|
+
| `area` | Area chart with fill |
|
|
289
|
+
| `scatter` | Scatter plot |
|
|
290
|
+
| `radar` | Radar/spider chart |
|
|
291
|
+
| `polar` | Polar area chart |
|
|
292
|
+
| `bubble` | Bubble chart |
|
|
293
|
+
| `histogram` | Histogram |
|
|
294
|
+
| `candlestick` | Candlestick chart for financial data |
|
|
295
|
+
| `treemap` | Treemap visualization |
|
|
296
|
+
|
|
126
297
|
## Accessibility
|
|
127
298
|
|
|
128
299
|
All components include proper ARIA attributes:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constela/ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Copy-paste UI components for Constela",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"components"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@constela/core": "0.17.
|
|
19
|
+
"@constela/core": "0.17.2"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/node": "^20.10.0",
|