@wealthx/shadcn 1.0.2 → 1.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.
Files changed (36) hide show
  1. package/.turbo/turbo-build.log +154 -138
  2. package/CHANGELOG.md +6 -0
  3. package/README.md +82 -0
  4. package/dist/chunk-3EQP72AW.mjs +58 -0
  5. package/dist/chunk-5JGQAAQV.mjs +212 -0
  6. package/dist/chunk-GLW2UO6O.mjs +212 -0
  7. package/dist/chunk-RN67642N.mjs +171 -0
  8. package/dist/chunk-UEL4RD5P.mjs +272 -0
  9. package/dist/chunk-YBXCIF5Q.mjs +198 -0
  10. package/dist/components/ui/cashflow-bar-chart.js +596 -0
  11. package/dist/components/ui/cashflow-bar-chart.mjs +16 -0
  12. package/dist/components/ui/combobox.js +261 -0
  13. package/dist/components/ui/combobox.mjs +28 -0
  14. package/dist/components/ui/data-table.mjs +3 -3
  15. package/dist/components/ui/expense-bar-chart.js +543 -0
  16. package/dist/components/ui/expense-bar-chart.mjs +16 -0
  17. package/dist/components/ui/field.mjs +2 -2
  18. package/dist/components/ui/income-bar-chart.js +543 -0
  19. package/dist/components/ui/income-bar-chart.mjs +16 -0
  20. package/dist/components/ui/transactions-income-expense-bar-chart.js +478 -0
  21. package/dist/components/ui/transactions-income-expense-bar-chart.mjs +16 -0
  22. package/dist/index.js +1685 -725
  23. package/dist/index.mjs +152 -111
  24. package/dist/styles.css +1 -1
  25. package/package.json +30 -2
  26. package/src/components/index.tsx +56 -0
  27. package/src/components/ui/cashflow-bar-chart.tsx +336 -0
  28. package/src/components/ui/chart-shared.tsx +100 -0
  29. package/src/components/ui/combobox.tsx +217 -0
  30. package/src/components/ui/expense-bar-chart.tsx +278 -0
  31. package/src/components/ui/income-bar-chart.tsx +278 -0
  32. package/src/components/ui/transactions-income-expense-bar-chart.tsx +198 -0
  33. package/src/styles/styles-css.ts +1 -1
  34. package/tsup.config.ts +5 -0
  35. package/dist/{chunk-K76E2TQU.mjs → chunk-CJ46PDXE.mjs} +5 -5
  36. package/dist/{chunk-HUVTPUV2.mjs → chunk-NLLKTU4B.mjs} +3 -3
@@ -14,150 +14,166 @@ npm warn Unknown project config "auto-install-peers". This will stop working in
14
14
  npm warn Unknown project config "public-hoist-pattern". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
15
15
  ≈ tailwindcss v4.2.2
16
16
 
17
- Done in 521ms
17
+ Done in 539ms
18
18
  Built dist/styles.css and src/styles/styles-css.ts
19
19
  warning package.json: No license field
20
20
  $ tsup
21
- CLI Building entry: src/index.ts, src/lib/colors.ts, src/lib/theme-provider.tsx, src/lib/typography.ts, src/lib/utils.ts, src/components/ui/accordion.tsx, src/components/ui/alert-dialog.tsx, src/components/ui/alert.tsx, src/components/ui/avatar.tsx, src/components/ui/badge.tsx, src/components/ui/button.tsx, src/components/ui/calendar.tsx, src/components/ui/card.tsx, src/components/ui/checkbox.tsx, src/components/ui/chip.tsx, src/components/ui/data-table.tsx, src/components/ui/date-picker.tsx, src/components/ui/dialog.tsx, src/components/ui/drawer.tsx, src/components/ui/dropdown-menu.tsx, src/components/ui/empty.tsx, src/components/ui/field.tsx, src/components/ui/input-group.tsx, src/components/ui/input-otp.tsx, src/components/ui/input.tsx, src/components/ui/label.tsx, src/components/ui/pagination.tsx, src/components/ui/popover.tsx, src/components/ui/progress.tsx, src/components/ui/radio-group.tsx, src/components/ui/select.tsx, src/components/ui/separator.tsx, src/components/ui/sheet.tsx, src/components/ui/skeleton.tsx, src/components/ui/slider.tsx, src/components/ui/sonner.tsx, src/components/ui/spinner.tsx, src/components/ui/switch.tsx, src/components/ui/table.tsx, src/components/ui/tabs.tsx, src/components/ui/textarea.tsx, src/components/ui/toggle-group.tsx, src/components/ui/toggle.tsx, src/components/ui/tooltip.tsx
21
+ CLI Building entry: src/index.ts, src/lib/colors.ts, src/lib/theme-provider.tsx, src/lib/typography.ts, src/lib/utils.ts, src/components/ui/accordion.tsx, src/components/ui/alert-dialog.tsx, src/components/ui/alert.tsx, src/components/ui/avatar.tsx, src/components/ui/badge.tsx, src/components/ui/button.tsx, src/components/ui/calendar.tsx, src/components/ui/card.tsx, src/components/ui/cashflow-bar-chart.tsx, src/components/ui/checkbox.tsx, src/components/ui/chip.tsx, src/components/ui/combobox.tsx, src/components/ui/data-table.tsx, src/components/ui/date-picker.tsx, src/components/ui/dialog.tsx, src/components/ui/drawer.tsx, src/components/ui/dropdown-menu.tsx, src/components/ui/empty.tsx, src/components/ui/expense-bar-chart.tsx, src/components/ui/field.tsx, src/components/ui/income-bar-chart.tsx, src/components/ui/input-group.tsx, src/components/ui/input-otp.tsx, src/components/ui/input.tsx, src/components/ui/label.tsx, src/components/ui/pagination.tsx, src/components/ui/popover.tsx, src/components/ui/progress.tsx, src/components/ui/radio-group.tsx, src/components/ui/select.tsx, src/components/ui/separator.tsx, src/components/ui/sheet.tsx, src/components/ui/skeleton.tsx, src/components/ui/slider.tsx, src/components/ui/sonner.tsx, src/components/ui/spinner.tsx, src/components/ui/switch.tsx, src/components/ui/table.tsx, src/components/ui/tabs.tsx, src/components/ui/textarea.tsx, src/components/ui/toggle-group.tsx, src/components/ui/toggle.tsx, src/components/ui/tooltip.tsx, src/components/ui/transactions-income-expense-bar-chart.tsx
22
22
  CLI Using tsconfig: tsconfig.json
23
23
  CLI tsup v8.5.1
24
24
  CLI Using tsup config: /home/runner/work/wealthx-ui/wealthx-ui/packages/shadcn/tsup.config.ts
25
25
  CLI Target: es6
26
26
  CJS Build start
27
27
  ESM Build start
28
- ESM dist/lib/colors.mjs 205.00 B
29
- ESM dist/index.mjs 7.89 KB
30
- ESM dist/chunk-DDPA2XXS.mjs 2.45 KB
31
- ESM dist/chunk-3U7SD3MS.mjs 1.74 KB
32
- ESM dist/chunk-CGOKTPXU.mjs 2.24 KB
33
- ESM dist/chunk-PMKODV6M.mjs 4.88 KB
34
- ESM dist/chunk-K74JRTJR.mjs 2.75 KB
35
- ESM dist/chunk-2Y7YJKPE.mjs 1.24 KB
36
- ESM dist/chunk-BMFN37JH.mjs 865.00 B
37
- ESM dist/chunk-VYMHBV6D.mjs 3.78 KB
38
- ESM dist/chunk-RL772EH7.mjs 4.04 KB
39
- ESM dist/chunk-I64K754C.mjs 3.51 KB
40
- ESM dist/chunk-BBJBJSXQ.mjs 995.00 B
41
- ESM dist/chunk-JU2RUWHF.mjs 3.88 KB
42
- ESM dist/chunk-FHNT55I5.mjs 3.58 KB
43
- ESM dist/chunk-MQ72DIBH.mjs 3.01 KB
44
- ESM dist/chunk-DKZRJOMF.mjs 5.28 KB
45
- ESM dist/chunk-6AFMNC42.mjs 4.84 KB
46
- ESM dist/chunk-YN5SYTOO.mjs 2.81 KB
47
- ESM dist/chunk-HUVTPUV2.mjs 6.89 KB
48
- ESM dist/chunk-55CEW76V.mjs 840.00 B
49
- ESM dist/chunk-ZZV5JVNW.mjs 835.00 B
50
- ESM dist/chunk-46OFHMQA.mjs 5.71 KB
51
- ESM dist/chunk-GPRJQ24C.mjs 1005.00 B
52
- ESM dist/chunk-Z3MK2KKZ.mjs 2.66 KB
53
- ESM dist/chunk-6OJF6XRN.mjs 3.27 KB
54
- ESM dist/chunk-3NQGYJEZ.mjs 7.72 KB
55
- ESM dist/chunk-SLWCCURD.mjs 2.45 KB
56
- ESM dist/chunk-VG6UF6UT.mjs 1.63 KB
57
- ESM dist/chunk-E3K6O4FZ.mjs 1.87 KB
58
- ESM dist/chunk-K76E2TQU.mjs 12.35 KB
59
- ESM dist/chunk-HS7TFG7V.mjs 483.00 B
60
- ESM dist/chunk-BGP2N52Z.mjs 3.07 KB
61
- ESM dist/chunk-VZ2NR7L3.mjs 6.68 KB
62
- ESM dist/chunk-MJIEMGRD.mjs 9.04 KB
63
- ESM dist/chunk-DS2AMHN2.mjs 1.12 KB
64
- ESM dist/chunk-JF4PHPD5.mjs 3.93 KB
65
- ESM dist/lib/theme-provider.mjs 237.00 B
66
- ESM dist/lib/typography.mjs 527.00 B
67
- ESM dist/chunk-3VQNJ235.mjs 3.52 KB
68
- ESM dist/lib/utils.mjs 95.00 B
69
- ESM dist/chunk-KKHTJNMM.mjs 2.51 KB
70
- ESM dist/chunk-KQDD5MU3.mjs 6.31 KB
71
- ESM dist/chunk-4AJ5HWHD.mjs 3.52 KB
72
- ESM dist/chunk-DBHJ5KC3.mjs 1.56 KB
73
- ESM dist/chunk-OXQQNQZI.mjs 2.93 KB
74
- ESM dist/chunk-QOJ2DQD6.mjs 2.06 KB
75
- ESM dist/chunk-V7CNWJT3.mjs 168.00 B
76
- ESM dist/chunk-CZ3BW5GL.mjs 2.25 KB
77
- ESM dist/chunk-FWCSY2DS.mjs 1.30 KB
78
- ESM dist/components/ui/textarea.mjs 148.00 B
79
- ESM dist/components/ui/toggle-group.mjs 241.00 B
80
- ESM dist/components/ui/toggle.mjs 194.00 B
81
- ESM dist/components/ui/sheet.mjs 462.00 B
82
- ESM dist/components/ui/tooltip.mjs 326.00 B
83
- ESM dist/components/ui/skeleton.mjs 148.00 B
84
- ESM dist/components/ui/slider.mjs 144.00 B
85
- ESM dist/components/ui/sonner.mjs 111.00 B
86
- ESM dist/components/ui/spinner.mjs 184.00 B
87
- ESM dist/components/ui/switch.mjs 186.00 B
88
- ESM dist/components/ui/table.mjs 336.00 B
89
- ESM dist/components/ui/tabs.mjs 264.00 B
90
- ESM dist/components/ui/input.mjs 142.00 B
91
- ESM dist/components/ui/label.mjs 142.00 B
92
- ESM dist/components/ui/pagination.mjs 460.00 B
93
- ESM dist/components/ui/popover.mjs 432.00 B
94
- ESM dist/components/ui/progress.mjs 148.00 B
95
- ESM dist/components/ui/radio-group.mjs 224.00 B
96
- ESM dist/components/ui/select.mjs 538.00 B
97
- ESM dist/components/ui/separator.mjs 150.00 B
98
- ESM dist/components/ui/date-picker.mjs 376.00 B
99
- ESM dist/components/ui/dialog.mjs 584.00 B
100
- ESM dist/components/ui/drawer.mjs 514.00 B
101
- ESM dist/components/ui/dropdown-menu.mjs 884.00 B
102
- ESM dist/components/ui/empty.mjs 300.00 B
103
- ESM dist/components/ui/field.mjs 486.00 B
104
- ESM dist/components/ui/input-group.mjs 488.00 B
105
- ESM dist/components/ui/input-otp.mjs 256.00 B
106
- ESM dist/components/ui/avatar.mjs 310.00 B
107
- ESM dist/components/ui/badge.mjs 211.00 B
108
- ESM dist/components/ui/button.mjs 215.00 B
109
- ESM dist/components/ui/calendar.mjs 260.00 B
110
- ESM dist/components/ui/card.mjs 318.00 B
111
- ESM dist/components/ui/checkbox.mjs 194.00 B
112
- ESM dist/components/ui/chip.mjs 210.00 B
113
- ESM dist/components/ui/data-table.mjs 736.00 B
114
- ESM dist/components/ui/accordion.mjs 264.00 B
115
- ESM dist/components/ui/alert-dialog.mjs 768.00 B
116
- ESM dist/components/ui/alert.mjs 210.00 B
117
- ESM ⚡️ Build success in 317ms
118
- CJS dist/index.js 157.47 KB
119
- CJS dist/lib/colors.js 3.15 KB
120
- CJS dist/lib/theme-provider.js 6.09 KB
121
- CJS dist/lib/typography.js 5.49 KB
122
- CJS dist/lib/utils.js 1.20 KB
123
- CJS dist/components/ui/accordion.js 5.11 KB
124
- CJS dist/components/ui/alert-dialog.js 15.30 KB
125
- CJS dist/components/ui/alert.js 4.57 KB
126
- CJS dist/components/ui/avatar.js 5.71 KB
127
- CJS dist/components/ui/badge.js 6.12 KB
128
- CJS dist/components/ui/button.js 8.02 KB
129
- CJS dist/components/ui/calendar.js 15.88 KB
130
- CJS dist/components/ui/card.js 4.91 KB
131
- CJS dist/components/ui/checkbox.js 6.51 KB
132
- CJS dist/components/ui/chip.js 7.36 KB
133
- CJS dist/components/ui/date-picker.js 21.48 KB
134
- CJS dist/components/ui/data-table.js 37.88 KB
135
- CJS dist/components/ui/drawer.js 7.96 KB
136
- CJS dist/components/ui/dialog.js 14.09 KB
137
- CJS dist/components/ui/dropdown-menu.js 12.97 KB
138
- CJS dist/components/ui/empty.js 5.30 KB
139
- CJS dist/components/ui/field.js 11.19 KB
140
- CJS dist/components/ui/input-group.js 15.85 KB
141
- CJS dist/components/ui/input-otp.js 5.86 KB
142
- CJS dist/components/ui/input.js 3.26 KB
143
- CJS dist/components/ui/label.js 2.92 KB
144
- CJS dist/components/ui/pagination.js 11.93 KB
145
- CJS dist/components/ui/popover.js 5.81 KB
146
- CJS dist/components/ui/progress.js 3.32 KB
147
- CJS dist/components/ui/radio-group.js 6.54 KB
148
- CJS dist/components/ui/select.js 10.14 KB
149
- CJS dist/components/ui/separator.js 2.97 KB
150
- CJS dist/components/ui/sheet.js 8.05 KB
151
- CJS dist/components/ui/skeleton.js 2.62 KB
152
- CJS dist/components/ui/slider.js 5.56 KB
153
- CJS dist/components/ui/sonner.js 3.35 KB
154
- CJS dist/components/ui/spinner.js 3.12 KB
155
- CJS dist/components/ui/switch.js 6.34 KB
156
- CJS dist/components/ui/table.js 5.60 KB
157
- CJS dist/components/ui/tabs.js 6.44 KB
158
- CJS dist/components/ui/textarea.js 3.13 KB
159
- CJS dist/components/ui/toggle-group.js 6.71 KB
160
- CJS dist/components/ui/toggle.js 3.99 KB
161
- CJS dist/components/ui/tooltip.js 5.03 KB
162
- CJS ⚡️ Build success in 329ms
163
- Done in 6.77s.
28
+ ESM dist/lib/colors.mjs 205.00 B
29
+ ESM dist/index.mjs 8.68 KB
30
+ ESM dist/chunk-RN67642N.mjs 5.41 KB
31
+ ESM dist/chunk-BMFN37JH.mjs 865.00 B
32
+ ESM dist/chunk-VYMHBV6D.mjs 3.78 KB
33
+ ESM dist/chunk-RL772EH7.mjs 4.04 KB
34
+ ESM dist/chunk-DDPA2XXS.mjs 2.45 KB
35
+ ESM dist/chunk-3U7SD3MS.mjs 1.74 KB
36
+ ESM dist/chunk-CGOKTPXU.mjs 2.24 KB
37
+ ESM dist/chunk-BBJBJSXQ.mjs 995.00 B
38
+ ESM dist/chunk-JU2RUWHF.mjs 3.88 KB
39
+ ESM dist/chunk-PMKODV6M.mjs 4.88 KB
40
+ ESM dist/chunk-K74JRTJR.mjs 2.75 KB
41
+ ESM dist/chunk-2Y7YJKPE.mjs 1.24 KB
42
+ ESM dist/chunk-NLLKTU4B.mjs 6.89 KB
43
+ ESM dist/chunk-55CEW76V.mjs 840.00 B
44
+ ESM dist/chunk-GLW2UO6O.mjs 6.90 KB
45
+ ESM dist/chunk-46OFHMQA.mjs 5.71 KB
46
+ ESM dist/chunk-GPRJQ24C.mjs 1005.00 B
47
+ ESM dist/chunk-Z3MK2KKZ.mjs 2.66 KB
48
+ ESM dist/chunk-ZZV5JVNW.mjs 835.00 B
49
+ ESM dist/chunk-I64K754C.mjs 3.51 KB
50
+ ESM dist/chunk-YBXCIF5Q.mjs 6.79 KB
51
+ ESM dist/chunk-CJ46PDXE.mjs 12.35 KB
52
+ ESM dist/chunk-BGP2N52Z.mjs 3.07 KB
53
+ ESM dist/chunk-VZ2NR7L3.mjs 6.68 KB
54
+ ESM dist/chunk-DS2AMHN2.mjs 1.12 KB
55
+ ESM dist/chunk-FHNT55I5.mjs 3.58 KB
56
+ ESM dist/chunk-MQ72DIBH.mjs 3.01 KB
57
+ ESM dist/chunk-DKZRJOMF.mjs 5.28 KB
58
+ ESM dist/chunk-6AFMNC42.mjs 4.84 KB
59
+ ESM dist/chunk-MJIEMGRD.mjs 9.04 KB
60
+ ESM dist/chunk-5JGQAAQV.mjs 6.93 KB
61
+ ESM dist/chunk-6OJF6XRN.mjs 3.27 KB
62
+ ESM dist/chunk-3NQGYJEZ.mjs 7.72 KB
63
+ ESM dist/chunk-UEL4RD5P.mjs 8.50 KB
64
+ ESM dist/chunk-3EQP72AW.mjs 1.68 KB
65
+ ESM dist/chunk-HS7TFG7V.mjs 483.00 B
66
+ ESM dist/chunk-YN5SYTOO.mjs 2.81 KB
67
+ ESM dist/chunk-SLWCCURD.mjs 2.45 KB
68
+ ESM dist/chunk-JF4PHPD5.mjs 3.93 KB
69
+ ESM dist/chunk-VG6UF6UT.mjs 1.63 KB
70
+ ESM dist/chunk-E3K6O4FZ.mjs 1.87 KB
71
+ ESM dist/lib/theme-provider.mjs 237.00 B
72
+ ESM dist/lib/typography.mjs 527.00 B
73
+ ESM dist/chunk-3VQNJ235.mjs 3.52 KB
74
+ ESM dist/lib/utils.mjs 95.00 B
75
+ ESM dist/chunk-KKHTJNMM.mjs 2.51 KB
76
+ ESM dist/chunk-KQDD5MU3.mjs 6.31 KB
77
+ ESM dist/chunk-4AJ5HWHD.mjs 3.52 KB
78
+ ESM dist/chunk-DBHJ5KC3.mjs 1.56 KB
79
+ ESM dist/chunk-OXQQNQZI.mjs 2.93 KB
80
+ ESM dist/chunk-QOJ2DQD6.mjs 2.06 KB
81
+ ESM dist/chunk-CZ3BW5GL.mjs 2.25 KB
82
+ ESM dist/chunk-V7CNWJT3.mjs 168.00 B
83
+ ESM dist/chunk-FWCSY2DS.mjs 1.30 KB
84
+ ESM dist/components/ui/transactions-income-expense-bar-chart.mjs 478.00 B
85
+ ESM dist/components/ui/switch.mjs 186.00 B
86
+ ESM dist/components/ui/table.mjs 336.00 B
87
+ ESM dist/components/ui/tabs.mjs 264.00 B
88
+ ESM dist/components/ui/textarea.mjs 148.00 B
89
+ ESM dist/components/ui/toggle-group.mjs 241.00 B
90
+ ESM dist/components/ui/toggle.mjs 194.00 B
91
+ ESM dist/components/ui/progress.mjs 148.00 B
92
+ ESM dist/components/ui/tooltip.mjs 326.00 B
93
+ ESM dist/components/ui/radio-group.mjs 224.00 B
94
+ ESM dist/components/ui/separator.mjs 150.00 B
95
+ ESM dist/components/ui/select.mjs 538.00 B
96
+ ESM dist/components/ui/sheet.mjs 462.00 B
97
+ ESM dist/components/ui/skeleton.mjs 148.00 B
98
+ ESM dist/components/ui/slider.mjs 144.00 B
99
+ ESM dist/components/ui/sonner.mjs 111.00 B
100
+ ESM dist/components/ui/field.mjs 486.00 B
101
+ ESM dist/components/ui/income-bar-chart.mjs 440.00 B
102
+ ESM dist/components/ui/input-group.mjs 488.00 B
103
+ ESM dist/components/ui/input-otp.mjs 256.00 B
104
+ ESM dist/components/ui/input.mjs 142.00 B
105
+ ESM dist/components/ui/label.mjs 142.00 B
106
+ ESM dist/components/ui/pagination.mjs 460.00 B
107
+ ESM dist/components/ui/popover.mjs 432.00 B
108
+ ESM dist/components/ui/combobox.mjs 510.00 B
109
+ ESM dist/components/ui/data-table.mjs 736.00 B
110
+ ESM dist/components/ui/date-picker.mjs 376.00 B
111
+ ESM dist/components/ui/dialog.mjs 584.00 B
112
+ ESM dist/components/ui/drawer.mjs 514.00 B
113
+ ESM dist/components/ui/dropdown-menu.mjs 884.00 B
114
+ ESM dist/components/ui/empty.mjs 300.00 B
115
+ ESM dist/components/ui/expense-bar-chart.mjs 442.00 B
116
+ ESM dist/components/ui/avatar.mjs 310.00 B
117
+ ESM dist/components/ui/badge.mjs 211.00 B
118
+ ESM dist/components/ui/button.mjs 215.00 B
119
+ ESM dist/components/ui/calendar.mjs 260.00 B
120
+ ESM dist/components/ui/card.mjs 318.00 B
121
+ ESM dist/components/ui/cashflow-bar-chart.mjs 444.00 B
122
+ ESM dist/components/ui/checkbox.mjs 194.00 B
123
+ ESM dist/components/ui/chip.mjs 210.00 B
124
+ ESM dist/components/ui/accordion.mjs 264.00 B
125
+ ESM dist/components/ui/alert-dialog.mjs 768.00 B
126
+ ESM dist/components/ui/alert.mjs 210.00 B
127
+ ESM dist/components/ui/spinner.mjs 184.00 B
128
+ ESM ⚡️ Build success in 415ms
129
+ CJS dist/index.js 195.14 KB
130
+ CJS dist/lib/colors.js 3.15 KB
131
+ CJS dist/lib/theme-provider.js 6.09 KB
132
+ CJS dist/lib/typography.js 5.49 KB
133
+ CJS dist/lib/utils.js 1.20 KB
134
+ CJS dist/components/ui/accordion.js 5.11 KB
135
+ CJS dist/components/ui/alert-dialog.js 15.30 KB
136
+ CJS dist/components/ui/alert.js 4.57 KB
137
+ CJS dist/components/ui/avatar.js 5.71 KB
138
+ CJS dist/components/ui/badge.js 6.12 KB
139
+ CJS dist/components/ui/button.js 8.02 KB
140
+ CJS dist/components/ui/calendar.js 15.88 KB
141
+ CJS dist/components/ui/card.js 4.91 KB
142
+ CJS dist/components/ui/cashflow-bar-chart.js 21.59 KB
143
+ CJS dist/components/ui/checkbox.js 6.51 KB
144
+ CJS dist/components/ui/chip.js 7.36 KB
145
+ CJS dist/components/ui/combobox.js 10.04 KB
146
+ CJS dist/components/ui/data-table.js 37.88 KB
147
+ CJS dist/components/ui/date-picker.js 21.48 KB
148
+ CJS dist/components/ui/dialog.js 14.09 KB
149
+ CJS dist/components/ui/drawer.js 7.96 KB
150
+ CJS dist/components/ui/dropdown-menu.js 12.97 KB
151
+ CJS dist/components/ui/empty.js 5.30 KB
152
+ CJS dist/components/ui/expense-bar-chart.js 20.43 KB
153
+ CJS dist/components/ui/field.js 11.19 KB
154
+ CJS dist/components/ui/income-bar-chart.js 20.39 KB
155
+ CJS dist/components/ui/input-group.js 15.85 KB
156
+ CJS dist/components/ui/input-otp.js 5.86 KB
157
+ CJS dist/components/ui/input.js 3.26 KB
158
+ CJS dist/components/ui/label.js 2.92 KB
159
+ CJS dist/components/ui/pagination.js 11.93 KB
160
+ CJS dist/components/ui/popover.js 5.81 KB
161
+ CJS dist/components/ui/progress.js 3.32 KB
162
+ CJS dist/components/ui/radio-group.js 6.54 KB
163
+ CJS dist/components/ui/select.js 10.14 KB
164
+ CJS dist/components/ui/separator.js 2.97 KB
165
+ CJS dist/components/ui/sheet.js 8.05 KB
166
+ CJS dist/components/ui/skeleton.js 2.62 KB
167
+ CJS dist/components/ui/slider.js 5.56 KB
168
+ CJS dist/components/ui/sonner.js 3.35 KB
169
+ CJS dist/components/ui/spinner.js 3.12 KB
170
+ CJS dist/components/ui/switch.js 6.34 KB
171
+ CJS dist/components/ui/table.js 5.60 KB
172
+ CJS dist/components/ui/tabs.js 6.44 KB
173
+ CJS dist/components/ui/textarea.js 3.13 KB
174
+ CJS dist/components/ui/toggle-group.js 6.71 KB
175
+ CJS dist/components/ui/toggle.js 3.99 KB
176
+ CJS dist/components/ui/tooltip.js 5.03 KB
177
+ CJS dist/components/ui/transactions-income-expense-bar-chart.js 17.68 KB
178
+ CJS ⚡️ Build success in 421ms
179
+ Done in 7.38s.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @wealthx/shadcn
2
2
 
3
+ ## 1.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 9ee7e7f: Add chart components
8
+
3
9
  ## 1.0.2
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -84,6 +84,87 @@ import { Card } from "@wealthx/shadcn/card";
84
84
  | ToggleGroup | `./toggle-group` | Grouped toggles |
85
85
  | Tooltip | `./tooltip` | Hover hint |
86
86
 
87
+ ## Charts
88
+
89
+ Chart components built on [Chart.js](https://www.chartjs.org/) and [react-chartjs-2](https://react-chartjs-2.js.org/). All charts read brand colors from `ThemeProvider` and render inside a `Card` wrapper.
90
+
91
+ | Component | Import path | Description |
92
+ |-----------|------------|-------------|
93
+ | CashflowBarChart | `./cashflow-bar-chart` | Grouped bars showing income, expenses, and surplus/overspending per month |
94
+ | ExpenseBarChart | `./expense-bar-chart` | Stacked bar chart of expenses by category with period toggle |
95
+ | IncomeBarChart | `./income-bar-chart` | Stacked bar chart of income by source with period toggle |
96
+ | TransactionsIncomeExpenseBarChart | `./transactions-income-expense-bar-chart` | Horizontal bar comparing total income vs total expense |
97
+
98
+ ### TransactionsIncomeExpenseBarChart
99
+
100
+ Simplest chart — just two numbers:
101
+
102
+ ```tsx
103
+ import { TransactionsIncomeExpenseBarChart } from "@wealthx/shadcn";
104
+
105
+ <TransactionsIncomeExpenseBarChart
106
+ totalIncome={12450.75}
107
+ totalExpense={-8320.50}
108
+ title="Transactions — Income vs Expense"
109
+ />
110
+ ```
111
+
112
+ ### IncomeBarChart / ExpenseBarChart
113
+
114
+ Stacked bars broken down by source or category. Supports `"monthly"` and `"daily"` granularity with a period toggle (3M / 6M / 12M).
115
+
116
+ ```tsx
117
+ import { IncomeBarChart } from "@wealthx/shadcn";
118
+
119
+ <IncomeBarChart
120
+ incomeData={{
121
+ months: ["Jul", "Aug", "Sep"],
122
+ dates: ["2024-07-01", "2024-08-01", "2024-09-01"],
123
+ datasets: [
124
+ { label: "Employment", data: [7500, 7500, 7500] },
125
+ { label: "Rental", data: [1200, 1200, 1400] },
126
+ ],
127
+ }}
128
+ defaultPeriod={6}
129
+ granularity="monthly"
130
+ />
131
+ ```
132
+
133
+ `ExpenseBarChart` has the same API — swap `incomeData` for `expenseData`. Income bars use the primary color; expense bars use the secondary color.
134
+
135
+ ### CashflowBarChart
136
+
137
+ Grouped bars showing income, expenses, and surplus/overspending. Period toggle is 3M / 6M / 12M (monthly only).
138
+
139
+ ```tsx
140
+ import { CashflowBarChart } from "@wealthx/shadcn";
141
+
142
+ <CashflowBarChart
143
+ cashflowData={{
144
+ months: ["Jul", "Aug", "Sep"],
145
+ data: [
146
+ { date: "2024-07-01", income: 9200, expenses: 6800, surplus: 2400, overspending: 0 },
147
+ { date: "2024-08-01", income: 7500, expenses: 8100, surplus: 0, overspending: 600 },
148
+ { date: "2024-09-01", income: 8800, expenses: 7200, surplus: 1600, overspending: 0 },
149
+ ],
150
+ }}
151
+ defaultPeriod={6}
152
+ />
153
+ ```
154
+
155
+ ### Shared chart props
156
+
157
+ | Prop | Default | Description |
158
+ |------|---------|-------------|
159
+ | `title` | Varies | Card heading |
160
+ | `height` | 280 (120 for Transactions) | Canvas height in px |
161
+ | `width` | `"100%"` | Card width |
162
+ | `isLoading` | `false` | Shows skeleton placeholder |
163
+ | `showLegend` | `true` | Toggle legend visibility |
164
+ | `showXAxis` / `showYAxis` | `true` | Toggle axis visibility |
165
+ | `legendPosition` | `"top"` | `"top"` or `"bottom"` |
166
+ | `className` | — | Class applied to the Card wrapper |
167
+
87
168
  ## Utilities
88
169
 
89
170
  | Export | Import path | Description |
@@ -122,6 +203,7 @@ yarn workspace @wealthx/shadcn lint
122
203
  - [shadcn/ui](https://ui.shadcn.com) — Component primitives
123
204
  - [Tailwind CSS v4](https://tailwindcss.com) — Utility-first styles
124
205
  - [Radix Primitives](https://www.radix-ui.com) via `@base-ui/react` — Accessible headless components
206
+ - [Chart.js](https://www.chartjs.org/) + [react-chartjs-2](https://react-chartjs-2.js.org/) — Chart components
125
207
  - [TanStack Table](https://tanstack.com/table) — DataTable
126
208
  - [Lucide](https://lucide.dev) — Icons
127
209
  - [tsup](https://tsup.egoist.dev) — Build tooling (CJS + ESM)
@@ -0,0 +1,58 @@
1
+ import {
2
+ Button
3
+ } from "./chunk-4AJ5HWHD.mjs";
4
+
5
+ // src/components/ui/chart-shared.tsx
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ var CHART_SLICE_COUNT = {
8
+ monthly: { 1: 1, 3: 3, 6: 6, 12: 12 },
9
+ daily: { 1: 30, 3: 90, 6: 180, 12: 365 }
10
+ };
11
+ var CHART_PERIODS = {
12
+ monthly: [3, 6, 12],
13
+ daily: [1, 3, 6, 12]
14
+ };
15
+ function hexToRgba(hex, alpha) {
16
+ const clean = hex.replace("#", "");
17
+ const full = clean.length === 3 ? clean.split("").map((c) => c + c).join("") : clean;
18
+ const r = parseInt(full.slice(0, 2), 16);
19
+ const g = parseInt(full.slice(2, 4), 16);
20
+ const b = parseInt(full.slice(4, 6), 16);
21
+ return `rgba(${r},${g},${b},${alpha})`;
22
+ }
23
+ var DATASET_ALPHAS = [1, 0.72, 0.52, 0.36, 0.24, 0.15];
24
+ var FALLBACK_TICK = "#9EAAB5";
25
+ function formatTooltipDate(iso, granularity) {
26
+ const d = new Date(iso);
27
+ return d.toLocaleDateString(
28
+ "en-US",
29
+ granularity === "daily" ? { month: "short", day: "numeric", year: "numeric" } : { month: "short", year: "numeric" }
30
+ );
31
+ }
32
+ function ChartLegendItem({ label, color }) {
33
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
34
+ /* @__PURE__ */ jsx("div", { style: { width: 10, height: 10, backgroundColor: color, flexShrink: 0 } }),
35
+ /* @__PURE__ */ jsx("span", { className: "text-[11px] text-muted-foreground leading-none", children: label })
36
+ ] });
37
+ }
38
+ function ChartPeriodButton({
39
+ period,
40
+ active,
41
+ onClick
42
+ }) {
43
+ return /* @__PURE__ */ jsxs(Button, { variant: active ? "default" : "outline", size: "xs", onClick, children: [
44
+ period,
45
+ "M"
46
+ ] });
47
+ }
48
+
49
+ export {
50
+ CHART_SLICE_COUNT,
51
+ CHART_PERIODS,
52
+ hexToRgba,
53
+ DATASET_ALPHAS,
54
+ FALLBACK_TICK,
55
+ formatTooltipDate,
56
+ ChartLegendItem,
57
+ ChartPeriodButton
58
+ };