@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.
Files changed (41) hide show
  1. package/README.md +1 -1
  2. package/components/accordion/accordion-content.constela.json +20 -0
  3. package/components/accordion/accordion-item.constela.json +20 -0
  4. package/components/accordion/accordion-trigger.constela.json +21 -0
  5. package/components/accordion/accordion.constela.json +18 -0
  6. package/components/accordion/accordion.styles.json +54 -0
  7. package/components/accordion/accordion.test.ts +608 -0
  8. package/components/calendar/calendar.constela.json +195 -0
  9. package/components/calendar/calendar.styles.json +33 -0
  10. package/components/calendar/calendar.test.ts +458 -0
  11. package/components/chart/area-chart.constela.json +482 -0
  12. package/components/chart/bar-chart.constela.json +342 -0
  13. package/components/chart/chart-axis.constela.json +224 -0
  14. package/components/chart/chart-legend.constela.json +82 -0
  15. package/components/chart/chart-tooltip.constela.json +61 -0
  16. package/components/chart/chart.styles.json +183 -0
  17. package/components/chart/chart.test.ts +3260 -0
  18. package/components/chart/donut-chart.constela.json +369 -0
  19. package/components/chart/line-chart.constela.json +380 -0
  20. package/components/chart/pie-chart.constela.json +259 -0
  21. package/components/chart/radar-chart.constela.json +297 -0
  22. package/components/chart/scatter-chart.constela.json +300 -0
  23. package/components/data-table/data-table-cell.constela.json +22 -0
  24. package/components/data-table/data-table-header.constela.json +30 -0
  25. package/components/data-table/data-table-pagination.constela.json +19 -0
  26. package/components/data-table/data-table-row.constela.json +30 -0
  27. package/components/data-table/data-table.constela.json +32 -0
  28. package/components/data-table/data-table.styles.json +84 -0
  29. package/components/data-table/data-table.test.ts +873 -0
  30. package/components/datepicker/datepicker.constela.json +128 -0
  31. package/components/datepicker/datepicker.styles.json +47 -0
  32. package/components/datepicker/datepicker.test.ts +540 -0
  33. package/components/tree/tree-node.constela.json +26 -0
  34. package/components/tree/tree.constela.json +24 -0
  35. package/components/tree/tree.styles.json +50 -0
  36. package/components/tree/tree.test.ts +542 -0
  37. package/components/virtual-scroll/virtual-scroll.constela.json +27 -0
  38. package/components/virtual-scroll/virtual-scroll.styles.json +17 -0
  39. package/components/virtual-scroll/virtual-scroll.test.ts +345 -0
  40. package/dist/index.d.ts +1 -2
  41. package/package.json +3 -3
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @constela/ui
2
2
 
3
- Copy-paste UI components for Constela - a shadcn/ui style component library.
3
+ Copy-paste UI components for Constela.
4
4
 
5
5
  ## Overview
6
6
 
@@ -0,0 +1,20 @@
1
+ {
2
+ "params": {
3
+ "id": { "type": "string", "required": false },
4
+ "triggerId": { "type": "string", "required": false }
5
+ },
6
+ "view": {
7
+ "kind": "element",
8
+ "tag": "div",
9
+ "props": {
10
+ "id": { "expr": "param", "name": "id" },
11
+ "role": { "expr": "lit", "value": "region" },
12
+ "aria-labelledby": { "expr": "param", "name": "triggerId" },
13
+ "className": {
14
+ "expr": "style",
15
+ "preset": "accordionContentStyles"
16
+ }
17
+ },
18
+ "children": [{ "kind": "slot" }]
19
+ }
20
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "params": {
3
+ "value": { "type": "string", "required": true },
4
+ "disabled": { "type": "boolean", "required": false }
5
+ },
6
+ "localState": {
7
+ "isExpanded": { "type": "boolean", "initial": false }
8
+ },
9
+ "view": {
10
+ "kind": "element",
11
+ "tag": "div",
12
+ "props": {
13
+ "className": {
14
+ "expr": "style",
15
+ "preset": "accordionItemStyles"
16
+ }
17
+ },
18
+ "children": [{ "kind": "slot" }]
19
+ }
20
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "params": {
3
+ "contentId": { "type": "string", "required": false },
4
+ "disabled": { "type": "boolean", "required": false }
5
+ },
6
+ "view": {
7
+ "kind": "element",
8
+ "tag": "button",
9
+ "props": {
10
+ "type": { "expr": "lit", "value": "button" },
11
+ "disabled": { "expr": "param", "name": "disabled" },
12
+ "aria-expanded": { "expr": "state", "name": "isExpanded" },
13
+ "aria-controls": { "expr": "param", "name": "contentId" },
14
+ "className": {
15
+ "expr": "style",
16
+ "preset": "accordionTriggerStyles"
17
+ }
18
+ },
19
+ "children": [{ "kind": "slot" }]
20
+ }
21
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "params": {
3
+ "type": { "type": "string", "required": false },
4
+ "collapsible": { "type": "boolean", "required": false },
5
+ "disabled": { "type": "boolean", "required": false }
6
+ },
7
+ "view": {
8
+ "kind": "element",
9
+ "tag": "div",
10
+ "props": {
11
+ "className": {
12
+ "expr": "style",
13
+ "preset": "accordionStyles"
14
+ }
15
+ },
16
+ "children": [{ "kind": "slot" }]
17
+ }
18
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "accordionStyles": {
3
+ "base": "flex flex-col"
4
+ },
5
+ "accordionItemStyles": {
6
+ "base": "border-b",
7
+ "variants": {
8
+ "state": {
9
+ "default": "",
10
+ "disabled": "opacity-50 cursor-not-allowed"
11
+ }
12
+ },
13
+ "defaultVariants": {
14
+ "state": "default"
15
+ }
16
+ },
17
+ "accordionTriggerStyles": {
18
+ "base": "flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline",
19
+ "variants": {
20
+ "state": {
21
+ "default": "",
22
+ "disabled": "opacity-50 cursor-not-allowed pointer-events-none",
23
+ "hover": "underline"
24
+ }
25
+ },
26
+ "defaultVariants": {
27
+ "state": "default"
28
+ }
29
+ },
30
+ "accordionChevronStyles": {
31
+ "base": "h-4 w-4 shrink-0 transition-transform duration-200",
32
+ "variants": {
33
+ "expanded": {
34
+ "true": "rotate-180",
35
+ "false": "rotate-0"
36
+ }
37
+ },
38
+ "defaultVariants": {
39
+ "expanded": "false"
40
+ }
41
+ },
42
+ "accordionContentStyles": {
43
+ "base": "overflow-hidden text-sm transition-all",
44
+ "variants": {
45
+ "state": {
46
+ "open": "animate-accordion-down",
47
+ "closed": "animate-accordion-up"
48
+ }
49
+ },
50
+ "defaultVariants": {
51
+ "state": "closed"
52
+ }
53
+ }
54
+ }