@wealthx/shadcn 0.0.1 → 1.0.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 (186) hide show
  1. package/.turbo/turbo-build.log +160 -0
  2. package/CHANGELOG.md +13 -0
  3. package/CHANGES.md +345 -0
  4. package/dist/chunk-2WZVSBAY.mjs +232 -0
  5. package/dist/chunk-2Y7YJKPE.mjs +47 -0
  6. package/dist/chunk-3U7SD3MS.mjs +55 -0
  7. package/dist/chunk-3VQNJ235.mjs +114 -0
  8. package/dist/chunk-55CEW76V.mjs +35 -0
  9. package/dist/chunk-6AFMNC42.mjs +146 -0
  10. package/dist/chunk-6OJF6XRN.mjs +117 -0
  11. package/dist/chunk-7LDIMXGM.mjs +181 -0
  12. package/dist/chunk-AMJ23O53.mjs +122 -0
  13. package/dist/chunk-BBJBJSXQ.mjs +44 -0
  14. package/dist/chunk-BGP2N52Z.mjs +126 -0
  15. package/dist/chunk-BMFN37JH.mjs +41 -0
  16. package/dist/chunk-CGOKTPXU.mjs +79 -0
  17. package/dist/chunk-CZ3BW5GL.mjs +81 -0
  18. package/dist/chunk-DBHJ5KC3.mjs +55 -0
  19. package/dist/chunk-DDPA2XXS.mjs +97 -0
  20. package/dist/chunk-DS2AMHN2.mjs +30 -0
  21. package/dist/chunk-E3K6O4FZ.mjs +57 -0
  22. package/dist/chunk-FWCSY2DS.mjs +37 -0
  23. package/dist/chunk-GPRJQ24C.mjs +28 -0
  24. package/dist/chunk-HS7TFG7V.mjs +24 -0
  25. package/dist/chunk-HUVTPUV2.mjs +256 -0
  26. package/dist/chunk-IAOOZCUY.mjs +90 -0
  27. package/dist/chunk-JF4PHPD5.mjs +111 -0
  28. package/dist/chunk-JU2RUWHF.mjs +123 -0
  29. package/dist/chunk-KKHTJNMM.mjs +86 -0
  30. package/dist/chunk-MJIEMGRD.mjs +266 -0
  31. package/dist/chunk-MKFL5MNH.mjs +372 -0
  32. package/dist/chunk-MQ72DIBH.mjs +105 -0
  33. package/dist/chunk-NGYG2EA6.mjs +148 -0
  34. package/dist/chunk-NWZ46DJL.mjs +213 -0
  35. package/dist/chunk-OXQQNQZI.mjs +75 -0
  36. package/dist/chunk-PMKODV6M.mjs +161 -0
  37. package/dist/chunk-QOJ2DQD6.mjs +57 -0
  38. package/dist/chunk-RL772EH7.mjs +126 -0
  39. package/dist/chunk-SLWCCURD.mjs +99 -0
  40. package/dist/chunk-V7CNWJT3.mjs +10 -0
  41. package/dist/chunk-VG6UF6UT.mjs +68 -0
  42. package/dist/chunk-VYMHBV6D.mjs +123 -0
  43. package/dist/chunk-VZ2NR7L3.mjs +195 -0
  44. package/dist/chunk-YN5SYTOO.mjs +117 -0
  45. package/dist/chunk-Z3MK2KKZ.mjs +83 -0
  46. package/dist/chunk-ZN2QKLF6.mjs +187 -0
  47. package/dist/chunk-ZZV5JVNW.mjs +34 -0
  48. package/dist/components/ui/accordion.js +142 -0
  49. package/dist/components/ui/accordion.mjs +14 -0
  50. package/dist/components/ui/alert-dialog.js +413 -0
  51. package/dist/components/ui/alert-dialog.mjs +34 -0
  52. package/dist/components/ui/alert.js +134 -0
  53. package/dist/components/ui/alert.mjs +12 -0
  54. package/dist/components/ui/avatar.js +173 -0
  55. package/dist/components/ui/avatar.mjs +18 -0
  56. package/dist/components/ui/badge.js +163 -0
  57. package/dist/components/ui/badge.mjs +11 -0
  58. package/dist/components/ui/button.js +198 -0
  59. package/dist/components/ui/button.mjs +11 -0
  60. package/dist/components/ui/calendar.js +408 -0
  61. package/dist/components/ui/calendar.mjs +12 -0
  62. package/dist/components/ui/card.js +156 -0
  63. package/dist/components/ui/card.mjs +20 -0
  64. package/dist/components/ui/checkbox.js +166 -0
  65. package/dist/components/ui/checkbox.mjs +11 -0
  66. package/dist/components/ui/chip.js +199 -0
  67. package/dist/components/ui/chip.mjs +10 -0
  68. package/dist/components/ui/data-table.js +925 -0
  69. package/dist/components/ui/data-table.mjs +29 -0
  70. package/dist/components/ui/date-picker.js +561 -0
  71. package/dist/components/ui/date-picker.mjs +15 -0
  72. package/dist/components/ui/dialog.js +378 -0
  73. package/dist/components/ui/dialog.mjs +30 -0
  74. package/dist/components/ui/drawer.js +213 -0
  75. package/dist/components/ui/drawer.mjs +28 -0
  76. package/dist/components/ui/dropdown-menu.js +338 -0
  77. package/dist/components/ui/dropdown-menu.mjs +38 -0
  78. package/dist/components/ui/empty.js +173 -0
  79. package/dist/components/ui/empty.mjs +18 -0
  80. package/dist/components/ui/field.js +359 -0
  81. package/dist/components/ui/field.mjs +28 -0
  82. package/dist/components/ui/input-group.js +406 -0
  83. package/dist/components/ui/input-group.mjs +22 -0
  84. package/dist/components/ui/input-otp.js +149 -0
  85. package/dist/components/ui/input-otp.mjs +14 -0
  86. package/dist/components/ui/input.js +81 -0
  87. package/dist/components/ui/input.mjs +8 -0
  88. package/dist/components/ui/label.js +85 -0
  89. package/dist/components/ui/label.mjs +8 -0
  90. package/dist/components/ui/pagination.js +333 -0
  91. package/dist/components/ui/pagination.mjs +22 -0
  92. package/dist/components/ui/popover.js +167 -0
  93. package/dist/components/ui/popover.mjs +22 -0
  94. package/dist/components/ui/progress.js +97 -0
  95. package/dist/components/ui/progress.mjs +8 -0
  96. package/dist/components/ui/radio-group.js +178 -0
  97. package/dist/components/ui/radio-group.mjs +12 -0
  98. package/dist/components/ui/select.js +262 -0
  99. package/dist/components/ui/select.mjs +28 -0
  100. package/dist/components/ui/separator.js +86 -0
  101. package/dist/components/ui/separator.mjs +8 -0
  102. package/dist/components/ui/sheet.js +227 -0
  103. package/dist/components/ui/sheet.mjs +26 -0
  104. package/dist/components/ui/skeleton.js +75 -0
  105. package/dist/components/ui/skeleton.mjs +8 -0
  106. package/dist/components/ui/sonner.js +86 -0
  107. package/dist/components/ui/sonner.mjs +7 -0
  108. package/dist/components/ui/spinner.js +93 -0
  109. package/dist/components/ui/spinner.mjs +10 -0
  110. package/dist/components/ui/switch.js +178 -0
  111. package/dist/components/ui/switch.mjs +11 -0
  112. package/dist/components/ui/table.js +184 -0
  113. package/dist/components/ui/table.mjs +22 -0
  114. package/dist/components/ui/tabs.js +181 -0
  115. package/dist/components/ui/tabs.mjs +16 -0
  116. package/dist/components/ui/textarea.js +79 -0
  117. package/dist/components/ui/textarea.mjs +8 -0
  118. package/dist/components/ui/toggle-group.js +184 -0
  119. package/dist/components/ui/toggle-group.mjs +12 -0
  120. package/dist/components/ui/toggle.js +108 -0
  121. package/dist/components/ui/toggle.mjs +11 -0
  122. package/dist/components/ui/tooltip.js +140 -0
  123. package/dist/components/ui/tooltip.mjs +16 -0
  124. package/dist/index.js +4409 -0
  125. package/dist/index.mjs +462 -0
  126. package/dist/lib/colors.js +84 -0
  127. package/dist/lib/colors.mjs +13 -0
  128. package/dist/lib/theme-provider.js +150 -0
  129. package/dist/lib/theme-provider.mjs +13 -0
  130. package/dist/lib/typography.js +157 -0
  131. package/dist/lib/typography.mjs +25 -0
  132. package/dist/lib/utils.js +34 -0
  133. package/dist/lib/utils.mjs +7 -0
  134. package/dist/styles.css +2 -0
  135. package/package.json +228 -11
  136. package/scripts/build-css.ts +15 -9
  137. package/src/components/index.tsx +443 -0
  138. package/src/components/ui/accordion.tsx +99 -0
  139. package/src/components/ui/alert-dialog.tsx +239 -0
  140. package/src/components/ui/alert.tsx +81 -0
  141. package/src/components/ui/avatar.tsx +130 -0
  142. package/src/components/ui/badge.tsx +57 -0
  143. package/src/components/ui/button.tsx +69 -37
  144. package/src/components/ui/calendar.tsx +252 -0
  145. package/src/components/ui/card.tsx +106 -0
  146. package/src/components/ui/checkbox.tsx +111 -0
  147. package/src/components/ui/chip.tsx +65 -0
  148. package/src/components/ui/data-table.tsx +490 -0
  149. package/src/components/ui/date-picker.tsx +133 -0
  150. package/src/components/ui/dialog.tsx +195 -0
  151. package/src/components/ui/drawer.tsx +169 -0
  152. package/src/components/ui/dropdown-menu.tsx +315 -0
  153. package/src/components/ui/empty.tsx +128 -0
  154. package/src/components/ui/field.tsx +273 -0
  155. package/src/components/ui/input-group.tsx +190 -0
  156. package/src/components/ui/input-otp.tsx +90 -0
  157. package/src/components/ui/input.tsx +28 -0
  158. package/src/components/ui/label.tsx +24 -0
  159. package/src/components/ui/pagination.tsx +148 -0
  160. package/src/components/ui/popover.tsx +112 -0
  161. package/src/components/ui/progress.tsx +40 -0
  162. package/src/components/ui/radio-group.tsx +129 -0
  163. package/src/components/ui/select.tsx +201 -0
  164. package/src/components/ui/separator.tsx +26 -0
  165. package/src/components/ui/sheet.tsx +182 -0
  166. package/src/components/ui/skeleton.tsx +22 -0
  167. package/src/components/ui/sonner.tsx +48 -0
  168. package/src/components/ui/spinner.tsx +41 -0
  169. package/src/components/ui/switch.tsx +126 -0
  170. package/src/components/ui/table.tsx +143 -0
  171. package/src/components/ui/tabs.tsx +119 -0
  172. package/src/components/ui/textarea.tsx +28 -0
  173. package/src/components/ui/toggle-group.tsx +94 -0
  174. package/src/components/ui/toggle.tsx +59 -0
  175. package/src/components/ui/tooltip.tsx +80 -0
  176. package/src/index.ts +15 -3
  177. package/src/lib/colors.ts +74 -0
  178. package/src/lib/slot.tsx +68 -0
  179. package/src/lib/theme-provider.tsx +134 -0
  180. package/src/lib/typography.ts +153 -0
  181. package/src/lib/utils.ts +1 -1
  182. package/src/styles/globals.css +377 -107
  183. package/src/styles/styles-css.ts +1 -1
  184. package/tsup.config.ts +48 -2
  185. package/src/provider/ShadcnProvider.tsx +0 -89
  186. package/src/provider/index.ts +0 -2
@@ -0,0 +1,153 @@
1
+ // WealthX Design System — Typography (rem-based, Figtree)
2
+ //
3
+ // Ported from packages/ui/src/theme/typography.ts.
4
+ // Font updated: Proxima Nova → Figtree (WealthX shadcn design system).
5
+ // Base: 16px (1rem). All values match Figma design spec.
6
+ //
7
+ // Usage:
8
+ // import { TYPOGRAPHY, getTypographyCssVars } from "@wealthx/shadcn/typography"
9
+ //
10
+ // CSS classes (applied via globals.css @layer utilities):
11
+ // .text-display-large, .text-display-medium, .text-display-small
12
+ // .text-h1 … .text-h6
13
+ // .text-body-large, .text-body-medium, .text-body-small
14
+ // .text-label-large, .text-label-medium, .text-label-small
15
+ // .text-caption, .text-overline, .text-code
16
+
17
+ export const FONT_FAMILY_SANS =
18
+ '"Figtree", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"';
19
+
20
+ export interface TypographyStyle {
21
+ fontWeight: number;
22
+ fontSize: string;
23
+ lineHeight: string;
24
+ letterSpacing?: string;
25
+ textTransform?: "uppercase" | "none";
26
+ }
27
+
28
+ function style(
29
+ weight: number,
30
+ size: string,
31
+ lineHeight: string,
32
+ extra?: Partial<Pick<TypographyStyle, "letterSpacing" | "textTransform">>,
33
+ ): TypographyStyle {
34
+ return { fontWeight: weight, fontSize: size, lineHeight, ...extra };
35
+ }
36
+
37
+ /** Display — hero and major titles */
38
+ export const TYPOGRAPHY_DISPLAY = {
39
+ large: style(700, "4rem", "4.5rem", { letterSpacing: "-0.03125rem" }),
40
+ medium: style(700, "3rem", "3.5rem"),
41
+ small: style(600, "2.125rem", "2.625rem"),
42
+ } as const;
43
+
44
+ /** Headings H1–H6 */
45
+ export const TYPOGRAPHY_HEADING = {
46
+ h1: style(700, "2rem", "2.5rem"),
47
+ h2: style(600, "1.75rem", "2.25rem"),
48
+ h3: style(600, "1.5rem", "2rem"),
49
+ h4: style(600, "1.3125rem", "1.75rem"),
50
+ h5: style(600, "1.125rem", "1.5rem"),
51
+ h6: style(600, "1rem", "1.375rem"),
52
+ } as const;
53
+
54
+ /** Body text */
55
+ export const TYPOGRAPHY_BODY = {
56
+ large: style(400, "1.125rem", "1.75rem"),
57
+ medium: style(400, "1rem", "1.5rem"),
58
+ small: style(400, "0.875rem", "1.25rem"),
59
+ } as const;
60
+
61
+ /** Labels — buttons, form labels, badges */
62
+ export const TYPOGRAPHY_LABEL = {
63
+ large: style(600, "1rem", "1.25rem"),
64
+ medium: style(600, "0.875rem", "1.125rem"),
65
+ small: style(600, "0.75rem", "1rem", { letterSpacing: "0.03125rem" }),
66
+ } as const;
67
+
68
+ /** Utility — caption, overline, code */
69
+ export const TYPOGRAPHY_UTILITY = {
70
+ caption: style(400, "0.75rem", "1rem"),
71
+ overline: style(600, "0.625rem", "0.875rem", {
72
+ letterSpacing: "0.09375rem",
73
+ textTransform: "uppercase",
74
+ }),
75
+ code: style(400, "0.875rem", "1.25rem"),
76
+ } as const;
77
+
78
+ export const TYPOGRAPHY = {
79
+ display: TYPOGRAPHY_DISPLAY,
80
+ heading: TYPOGRAPHY_HEADING,
81
+ body: TYPOGRAPHY_BODY,
82
+ label: TYPOGRAPHY_LABEL,
83
+ utility: TYPOGRAPHY_UTILITY,
84
+ } as const;
85
+
86
+ /** Responsive overrides — Desktop (default), Tablet (≤1024px), Mobile (≤768px) */
87
+ export const TYPOGRAPHY_RESPONSIVE = {
88
+ tablet: {
89
+ "display-large": style(700, "3.6rem", "4.05rem", {
90
+ letterSpacing: "-0.03125rem",
91
+ }),
92
+ "display-medium": style(700, "2.7rem", "3.15rem"),
93
+ "display-small": style(600, "1.9125rem", "2.3625rem"),
94
+ },
95
+ mobile: {
96
+ "display-large": style(700, "2.5rem", "2.8125rem", {
97
+ letterSpacing: "-0.03125rem",
98
+ }),
99
+ "display-medium": style(700, "2rem", "2.334rem"),
100
+ h1: style(700, "1.75rem", "2.1875rem"),
101
+ h2: style(600, "1.5rem", "1.93rem"),
102
+ },
103
+ } as const;
104
+
105
+ /** Build all typography CSS variables as a flat Record for :root injection */
106
+ export function getTypographyCssVars(
107
+ fontFamily = FONT_FAMILY_SANS,
108
+ ): Record<string, string> {
109
+ const vars: Record<string, string> = {};
110
+
111
+ // Font family
112
+ vars["--font-family-sans"] = fontFamily;
113
+
114
+ const allGroups: [string, Record<string, TypographyStyle>][] = [
115
+ [
116
+ "display",
117
+ TYPOGRAPHY_DISPLAY as unknown as Record<string, TypographyStyle>,
118
+ ],
119
+ ["", TYPOGRAPHY_HEADING as unknown as Record<string, TypographyStyle>],
120
+ ["body", TYPOGRAPHY_BODY as unknown as Record<string, TypographyStyle>],
121
+ ["label", TYPOGRAPHY_LABEL as unknown as Record<string, TypographyStyle>],
122
+ ["", TYPOGRAPHY_UTILITY as unknown as Record<string, TypographyStyle>],
123
+ ];
124
+
125
+ for (const [prefix, group] of allGroups) {
126
+ for (const [key, s] of Object.entries(group)) {
127
+ const token = prefix ? `${prefix}-${key}` : key;
128
+ vars[`--typography-${token}-size`] = s.fontSize;
129
+ vars[`--typography-${token}-leading`] = s.lineHeight;
130
+ vars[`--typography-${token}-weight`] = String(s.fontWeight);
131
+ if (s.letterSpacing)
132
+ vars[`--typography-${token}-tracking`] = s.letterSpacing;
133
+ if (s.textTransform)
134
+ vars[`--typography-${token}-transform`] = s.textTransform;
135
+ }
136
+ }
137
+
138
+ return vars;
139
+ }
140
+
141
+ /** Build responsive CSS variable overrides for a given breakpoint */
142
+ export function getResponsiveTypographyCssVars(
143
+ breakpoint: "tablet" | "mobile",
144
+ ): Record<string, string> {
145
+ const vars: Record<string, string> = {};
146
+ for (const [key, s] of Object.entries(TYPOGRAPHY_RESPONSIVE[breakpoint])) {
147
+ vars[`--typography-${key}-size`] = s.fontSize;
148
+ vars[`--typography-${key}-leading`] = s.lineHeight;
149
+ vars[`--typography-${key}-weight`] = String(s.fontWeight);
150
+ if (s.letterSpacing) vars[`--typography-${key}-tracking`] = s.letterSpacing;
151
+ }
152
+ return vars;
153
+ }
package/src/lib/utils.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { clsx, type ClassValue } from "clsx"
2
2
  import { twMerge } from "tailwind-merge"
3
3
 
4
- export function cn(...inputs: ClassValue[]) {
4
+ export function cn(...inputs: ClassValue[]): string {
5
5
  return twMerge(clsx(inputs))
6
6
  }