@constela/ui 0.2.0 → 0.3.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/README.md +1 -1
- package/components/accordion/accordion-content.constela.json +20 -0
- package/components/accordion/accordion-item.constela.json +20 -0
- package/components/accordion/accordion-trigger.constela.json +21 -0
- package/components/accordion/accordion.constela.json +18 -0
- package/components/accordion/accordion.styles.json +54 -0
- package/components/accordion/accordion.test.ts +608 -0
- package/components/calendar/calendar.constela.json +195 -0
- package/components/calendar/calendar.styles.json +33 -0
- package/components/calendar/calendar.test.ts +458 -0
- package/components/chart/area-chart.constela.json +482 -0
- package/components/chart/bar-chart.constela.json +342 -0
- package/components/chart/chart-axis.constela.json +224 -0
- package/components/chart/chart-legend.constela.json +82 -0
- package/components/chart/chart-tooltip.constela.json +61 -0
- package/components/chart/chart.styles.json +183 -0
- package/components/chart/chart.test.ts +3260 -0
- package/components/chart/donut-chart.constela.json +369 -0
- package/components/chart/line-chart.constela.json +380 -0
- package/components/chart/pie-chart.constela.json +259 -0
- package/components/chart/radar-chart.constela.json +297 -0
- package/components/chart/scatter-chart.constela.json +300 -0
- package/components/data-table/data-table-cell.constela.json +22 -0
- package/components/data-table/data-table-header.constela.json +30 -0
- package/components/data-table/data-table-pagination.constela.json +19 -0
- package/components/data-table/data-table-row.constela.json +30 -0
- package/components/data-table/data-table.constela.json +32 -0
- package/components/data-table/data-table.styles.json +84 -0
- package/components/data-table/data-table.test.ts +873 -0
- package/components/datepicker/datepicker.constela.json +128 -0
- package/components/datepicker/datepicker.styles.json +47 -0
- package/components/datepicker/datepicker.test.ts +540 -0
- package/components/tree/tree-node.constela.json +26 -0
- package/components/tree/tree.constela.json +24 -0
- package/components/tree/tree.styles.json +50 -0
- package/components/tree/tree.test.ts +542 -0
- package/components/virtual-scroll/virtual-scroll.constela.json +27 -0
- package/components/virtual-scroll/virtual-scroll.styles.json +17 -0
- package/components/virtual-scroll/virtual-scroll.test.ts +345 -0
- package/dist/index.d.ts +1 -2
- package/package.json +3 -3
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"params": {
|
|
3
|
+
"row": { "type": "object", "required": true },
|
|
4
|
+
"rowIndex": { "type": "number", "required": true },
|
|
5
|
+
"selected": { "type": "boolean", "required": false },
|
|
6
|
+
"selectable": { "type": "boolean", "required": false }
|
|
7
|
+
},
|
|
8
|
+
"view": {
|
|
9
|
+
"kind": "element",
|
|
10
|
+
"tag": "tr",
|
|
11
|
+
"props": {
|
|
12
|
+
"role": { "expr": "lit", "value": "row" },
|
|
13
|
+
"aria-rowindex": {
|
|
14
|
+
"expr": "bin",
|
|
15
|
+
"op": "+",
|
|
16
|
+
"left": { "expr": "param", "name": "rowIndex" },
|
|
17
|
+
"right": { "expr": "lit", "value": 1 }
|
|
18
|
+
},
|
|
19
|
+
"aria-selected": { "expr": "param", "name": "selected" },
|
|
20
|
+
"className": {
|
|
21
|
+
"expr": "style",
|
|
22
|
+
"preset": "dataTableRow",
|
|
23
|
+
"variants": {
|
|
24
|
+
"selected": { "expr": "param", "name": "selected" }
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"children": [{ "kind": "slot" }]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"params": {
|
|
3
|
+
"columns": { "type": "list", "required": true },
|
|
4
|
+
"data": { "type": "list", "required": true },
|
|
5
|
+
"pageSize": { "type": "number", "required": false },
|
|
6
|
+
"sortable": { "type": "boolean", "required": false },
|
|
7
|
+
"filterable": { "type": "boolean", "required": false },
|
|
8
|
+
"selectable": { "type": "boolean", "required": false },
|
|
9
|
+
"multiSelect": { "type": "boolean", "required": false },
|
|
10
|
+
"stickyHeader": { "type": "boolean", "required": false }
|
|
11
|
+
},
|
|
12
|
+
"localState": {
|
|
13
|
+
"currentPage": { "type": "number", "initial": 0 },
|
|
14
|
+
"sortColumn": { "type": "string", "initial": "" },
|
|
15
|
+
"sortDirection": { "type": "string", "initial": "asc" },
|
|
16
|
+
"filterText": { "type": "string", "initial": "" },
|
|
17
|
+
"selectedRows": { "type": "list", "initial": [] }
|
|
18
|
+
},
|
|
19
|
+
"view": {
|
|
20
|
+
"kind": "element",
|
|
21
|
+
"tag": "table",
|
|
22
|
+
"props": {
|
|
23
|
+
"role": { "expr": "lit", "value": "table" },
|
|
24
|
+
"aria-rowcount": { "expr": "call", "target": { "expr": "param", "name": "data" }, "method": "length" },
|
|
25
|
+
"className": {
|
|
26
|
+
"expr": "style",
|
|
27
|
+
"preset": "dataTableContainer"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"children": [{ "kind": "slot" }]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"dataTableContainer": {
|
|
3
|
+
"base": "w-full border-collapse"
|
|
4
|
+
},
|
|
5
|
+
"dataTableToolbar": {
|
|
6
|
+
"base": "flex items-center py-4",
|
|
7
|
+
"variants": {
|
|
8
|
+
"filterable": {
|
|
9
|
+
"true": "justify-between",
|
|
10
|
+
"false": "justify-end"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"defaultVariants": {
|
|
14
|
+
"filterable": "false"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"dataTableWrapper": {
|
|
18
|
+
"base": "rounded-md border overflow-hidden"
|
|
19
|
+
},
|
|
20
|
+
"dataTableHeader": {
|
|
21
|
+
"base": "bg-muted/50",
|
|
22
|
+
"variants": {
|
|
23
|
+
"sticky": {
|
|
24
|
+
"true": "sticky top-0 z-10",
|
|
25
|
+
"false": ""
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"defaultVariants": {
|
|
29
|
+
"sticky": "false"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"dataTableHeaderRow": {
|
|
33
|
+
"base": "border-b"
|
|
34
|
+
},
|
|
35
|
+
"dataTableHeaderCell": {
|
|
36
|
+
"base": "h-12 px-4 align-middle font-medium text-muted-foreground",
|
|
37
|
+
"variants": {
|
|
38
|
+
"sortable": {
|
|
39
|
+
"true": "cursor-pointer hover:bg-muted/50 select-none",
|
|
40
|
+
"false": ""
|
|
41
|
+
},
|
|
42
|
+
"align": {
|
|
43
|
+
"left": "text-left",
|
|
44
|
+
"center": "text-center",
|
|
45
|
+
"right": "text-right"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"defaultVariants": {
|
|
49
|
+
"sortable": "false",
|
|
50
|
+
"align": "left"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"dataTableBody": {
|
|
54
|
+
"base": "[&_tr:last-child]:border-0"
|
|
55
|
+
},
|
|
56
|
+
"dataTableRow": {
|
|
57
|
+
"base": "border-b transition-colors hover:bg-muted/50",
|
|
58
|
+
"variants": {
|
|
59
|
+
"selected": {
|
|
60
|
+
"true": "bg-muted",
|
|
61
|
+
"false": ""
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"defaultVariants": {
|
|
65
|
+
"selected": "false"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"dataTableCell": {
|
|
69
|
+
"base": "p-4 align-middle",
|
|
70
|
+
"variants": {
|
|
71
|
+
"align": {
|
|
72
|
+
"left": "text-left",
|
|
73
|
+
"center": "text-center",
|
|
74
|
+
"right": "text-right"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"defaultVariants": {
|
|
78
|
+
"align": "left"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"dataTablePagination": {
|
|
82
|
+
"base": "flex items-center justify-end space-x-2 py-4"
|
|
83
|
+
}
|
|
84
|
+
}
|