@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,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"params": {
|
|
3
|
+
"content": { "type": "string", "required": true },
|
|
4
|
+
"x": { "type": "number", "required": false },
|
|
5
|
+
"y": { "type": "number", "required": false },
|
|
6
|
+
"visible": { "type": "boolean", "required": false }
|
|
7
|
+
},
|
|
8
|
+
"view": {
|
|
9
|
+
"kind": "element",
|
|
10
|
+
"tag": "div",
|
|
11
|
+
"props": {
|
|
12
|
+
"role": { "expr": "lit", "value": "tooltip" },
|
|
13
|
+
"aria-hidden": {
|
|
14
|
+
"expr": "cond",
|
|
15
|
+
"test": { "expr": "param", "name": "visible" },
|
|
16
|
+
"then": { "expr": "lit", "value": "false" },
|
|
17
|
+
"else": { "expr": "lit", "value": "true" }
|
|
18
|
+
},
|
|
19
|
+
"style": {
|
|
20
|
+
"expr": "call",
|
|
21
|
+
"target": null,
|
|
22
|
+
"method": "concat",
|
|
23
|
+
"args": [
|
|
24
|
+
{ "expr": "lit", "value": "left: " },
|
|
25
|
+
{
|
|
26
|
+
"expr": "cond",
|
|
27
|
+
"test": { "expr": "param", "name": "x" },
|
|
28
|
+
"then": { "expr": "param", "name": "x" },
|
|
29
|
+
"else": { "expr": "lit", "value": 0 }
|
|
30
|
+
},
|
|
31
|
+
{ "expr": "lit", "value": "px; top: " },
|
|
32
|
+
{
|
|
33
|
+
"expr": "cond",
|
|
34
|
+
"test": { "expr": "param", "name": "y" },
|
|
35
|
+
"then": { "expr": "param", "name": "y" },
|
|
36
|
+
"else": { "expr": "lit", "value": 0 }
|
|
37
|
+
},
|
|
38
|
+
{ "expr": "lit", "value": "px;" }
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"className": {
|
|
42
|
+
"expr": "style",
|
|
43
|
+
"preset": "chartTooltip",
|
|
44
|
+
"props": {
|
|
45
|
+
"visible": {
|
|
46
|
+
"expr": "cond",
|
|
47
|
+
"test": { "expr": "param", "name": "visible" },
|
|
48
|
+
"then": { "expr": "lit", "value": "true" },
|
|
49
|
+
"else": { "expr": "lit", "value": "false" }
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"children": [
|
|
55
|
+
{
|
|
56
|
+
"kind": "text",
|
|
57
|
+
"content": { "expr": "param", "name": "content" }
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
{
|
|
2
|
+
"chartContainer": {
|
|
3
|
+
"base": "relative w-full"
|
|
4
|
+
},
|
|
5
|
+
"chartSvg": {
|
|
6
|
+
"base": "overflow-visible",
|
|
7
|
+
"variants": {
|
|
8
|
+
"size": {
|
|
9
|
+
"sm": "w-64 h-48",
|
|
10
|
+
"default": "w-96 h-72",
|
|
11
|
+
"lg": "w-[32rem] h-96"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"defaultVariants": {
|
|
15
|
+
"size": "default"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"chartBar": {
|
|
19
|
+
"base": "transition-all duration-200",
|
|
20
|
+
"variants": {
|
|
21
|
+
"state": {
|
|
22
|
+
"default": "opacity-100",
|
|
23
|
+
"hover": "opacity-80",
|
|
24
|
+
"active": "opacity-60"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"defaultVariants": {
|
|
28
|
+
"state": "default"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"chartLine": {
|
|
32
|
+
"base": "fill-none stroke-2 stroke-current"
|
|
33
|
+
},
|
|
34
|
+
"chartArea": {
|
|
35
|
+
"base": "stroke-none",
|
|
36
|
+
"variants": {
|
|
37
|
+
"opacity": {
|
|
38
|
+
"light": "opacity-20",
|
|
39
|
+
"default": "opacity-30",
|
|
40
|
+
"dark": "opacity-50"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"defaultVariants": {
|
|
44
|
+
"opacity": "default"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"chartPoint": {
|
|
48
|
+
"base": "transition-transform duration-200",
|
|
49
|
+
"variants": {
|
|
50
|
+
"size": {
|
|
51
|
+
"sm": "",
|
|
52
|
+
"default": "",
|
|
53
|
+
"lg": ""
|
|
54
|
+
},
|
|
55
|
+
"state": {
|
|
56
|
+
"default": "scale-100",
|
|
57
|
+
"hover": "scale-150"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"defaultVariants": {
|
|
61
|
+
"size": "default",
|
|
62
|
+
"state": "default"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"chartGrid": {
|
|
66
|
+
"base": "stroke-gray-200 stroke-1",
|
|
67
|
+
"variants": {
|
|
68
|
+
"axis": {
|
|
69
|
+
"x": "",
|
|
70
|
+
"y": "",
|
|
71
|
+
"both": ""
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"defaultVariants": {
|
|
75
|
+
"axis": "both"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"chartAxis": {
|
|
79
|
+
"base": "stroke-gray-400 stroke-1",
|
|
80
|
+
"variants": {
|
|
81
|
+
"position": {
|
|
82
|
+
"top": "",
|
|
83
|
+
"right": "",
|
|
84
|
+
"bottom": "",
|
|
85
|
+
"left": ""
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"defaultVariants": {
|
|
89
|
+
"position": "bottom"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"chartLabel": {
|
|
93
|
+
"base": "text-xs fill-gray-600",
|
|
94
|
+
"variants": {
|
|
95
|
+
"type": {
|
|
96
|
+
"axis": "font-normal",
|
|
97
|
+
"data": "font-medium",
|
|
98
|
+
"title": "font-semibold"
|
|
99
|
+
},
|
|
100
|
+
"size": {
|
|
101
|
+
"sm": "text-[10px]",
|
|
102
|
+
"default": "text-xs",
|
|
103
|
+
"lg": "text-sm"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"defaultVariants": {
|
|
107
|
+
"type": "axis",
|
|
108
|
+
"size": "default"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"chartSlice": {
|
|
112
|
+
"base": "transition-all duration-200 cursor-pointer",
|
|
113
|
+
"variants": {
|
|
114
|
+
"state": {
|
|
115
|
+
"default": "opacity-100",
|
|
116
|
+
"hover": "opacity-80 scale-105 origin-center",
|
|
117
|
+
"active": "opacity-60 scale-95 origin-center"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"defaultVariants": {
|
|
121
|
+
"state": "default"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"chartRadar": {
|
|
125
|
+
"base": "stroke-current transition-all duration-200",
|
|
126
|
+
"variants": {
|
|
127
|
+
"opacity": {
|
|
128
|
+
"light": "fill-opacity-20",
|
|
129
|
+
"default": "fill-opacity-30",
|
|
130
|
+
"dark": "fill-opacity-50"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"defaultVariants": {
|
|
134
|
+
"opacity": "default"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"chartLegend": {
|
|
138
|
+
"base": "flex gap-4 text-sm",
|
|
139
|
+
"variants": {
|
|
140
|
+
"orientation": {
|
|
141
|
+
"horizontal": "flex-row flex-wrap",
|
|
142
|
+
"vertical": "flex-col"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"defaultVariants": {
|
|
146
|
+
"orientation": "horizontal"
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"chartLegendItem": {
|
|
150
|
+
"base": "flex items-center gap-2 cursor-pointer transition-opacity duration-200",
|
|
151
|
+
"variants": {
|
|
152
|
+
"state": {
|
|
153
|
+
"default": "opacity-100",
|
|
154
|
+
"hover": "opacity-80",
|
|
155
|
+
"disabled": "opacity-40"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"defaultVariants": {
|
|
159
|
+
"state": "default"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"chartTooltip": {
|
|
163
|
+
"base": "absolute z-50 px-3 py-2 bg-gray-900 text-white text-sm rounded-md shadow-lg pointer-events-none transition-opacity duration-150",
|
|
164
|
+
"variants": {
|
|
165
|
+
"visible": {
|
|
166
|
+
"true": "opacity-100",
|
|
167
|
+
"false": "opacity-0 invisible"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"defaultVariants": {
|
|
171
|
+
"visible": "false"
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"chartBarAnimated": {
|
|
175
|
+
"base": "origin-bottom animate-[bar-grow_0.5s_ease-out_forwards]"
|
|
176
|
+
},
|
|
177
|
+
"chartLineAnimated": {
|
|
178
|
+
"base": "animate-[line-draw_1s_ease-out_forwards]"
|
|
179
|
+
},
|
|
180
|
+
"chartSliceAnimated": {
|
|
181
|
+
"base": "origin-center animate-[slice-rotate_0.5s_ease-out_forwards]"
|
|
182
|
+
}
|
|
183
|
+
}
|