@dtsports/design-system 0.2.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 (340) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +156 -0
  3. package/dist/components/accordion.d.ts +19 -0
  4. package/dist/components/accordion.d.ts.map +1 -0
  5. package/dist/components/accordion.js +26 -0
  6. package/dist/components/accordion.js.map +1 -0
  7. package/dist/components/alert.d.ts +26 -0
  8. package/dist/components/alert.d.ts.map +1 -0
  9. package/dist/components/alert.js.map +1 -0
  10. package/dist/components/app-shell.d.ts +21 -0
  11. package/dist/components/app-shell.d.ts.map +1 -0
  12. package/dist/components/app-shell.js +25 -0
  13. package/dist/components/app-shell.js.map +1 -0
  14. package/dist/components/aspect-ratio.d.ts +16 -0
  15. package/dist/components/aspect-ratio.d.ts.map +1 -0
  16. package/dist/components/aspect-ratio.js +17 -0
  17. package/dist/components/aspect-ratio.js.map +1 -0
  18. package/dist/components/avatar-group.d.ts +31 -0
  19. package/dist/components/avatar-group.d.ts.map +1 -0
  20. package/dist/components/avatar.d.ts +15 -0
  21. package/dist/components/avatar.d.ts.map +1 -0
  22. package/dist/components/avatar.js +20 -0
  23. package/dist/components/avatar.js.map +1 -0
  24. package/dist/components/badge.d.ts +27 -0
  25. package/dist/components/badge.d.ts.map +1 -0
  26. package/dist/components/badge.js +51 -0
  27. package/dist/components/badge.js.map +1 -0
  28. package/dist/components/breadcrumb.js.map +1 -0
  29. package/dist/components/button.d.ts +33 -0
  30. package/dist/components/button.d.ts.map +1 -0
  31. package/dist/components/button.js +58 -0
  32. package/dist/components/button.js.map +1 -0
  33. package/dist/components/calendar.d.ts +15 -0
  34. package/dist/components/calendar.d.ts.map +1 -0
  35. package/dist/components/calendar.js +33 -0
  36. package/dist/components/calendar.js.map +1 -0
  37. package/dist/components/capacity-bar.d.ts +32 -0
  38. package/dist/components/capacity-bar.d.ts.map +1 -0
  39. package/dist/components/capacity-bar.js +29 -0
  40. package/dist/components/capacity-bar.js.map +1 -0
  41. package/dist/components/card.d.ts +26 -0
  42. package/dist/components/card.d.ts.map +1 -0
  43. package/dist/components/card.js +20 -0
  44. package/dist/components/checkbox.d.ts +11 -0
  45. package/dist/components/checkbox.d.ts.map +1 -0
  46. package/dist/components/checkbox.js +19 -0
  47. package/dist/components/chip.d.ts +23 -0
  48. package/dist/components/chip.d.ts.map +1 -0
  49. package/dist/components/chip.js +32 -0
  50. package/dist/components/chip.js.map +1 -0
  51. package/dist/components/collapsible.d.ts +16 -0
  52. package/dist/components/collapsible.js +22 -0
  53. package/dist/components/collapsible.js.map +1 -0
  54. package/dist/components/combobox.d.ts +38 -0
  55. package/dist/components/combobox.d.ts.map +1 -0
  56. package/dist/components/combobox.js +17 -0
  57. package/dist/components/combobox.js.map +1 -0
  58. package/dist/components/confirm-action.d.ts +36 -0
  59. package/dist/components/confirm-action.d.ts.map +1 -0
  60. package/dist/components/confirm-action.js +21 -0
  61. package/dist/components/confirm-action.js.map +1 -0
  62. package/dist/components/container.js.map +1 -0
  63. package/dist/components/date-picker.d.ts.map +1 -0
  64. package/dist/components/date-picker.js +22 -0
  65. package/dist/components/date-picker.js.map +1 -0
  66. package/dist/components/dialog.d.ts +28 -0
  67. package/dist/components/dialog.d.ts.map +1 -0
  68. package/dist/components/dialog.js.map +1 -0
  69. package/dist/components/drawer.js +55 -0
  70. package/dist/components/drawer.js.map +1 -0
  71. package/dist/components/dropdown-menu.d.ts +39 -0
  72. package/dist/components/dropdown-menu.d.ts.map +1 -0
  73. package/dist/components/dropdown-menu.js +47 -0
  74. package/dist/components/empty-state.d.ts +15 -0
  75. package/dist/components/empty-state.d.ts.map +1 -0
  76. package/dist/components/empty-state.js +6 -0
  77. package/dist/components/form-field.d.ts +32 -0
  78. package/dist/components/form-field.d.ts.map +1 -0
  79. package/dist/components/form-field.js +31 -0
  80. package/dist/components/form-field.js.map +1 -0
  81. package/dist/components/input.d.ts +10 -0
  82. package/dist/components/input.d.ts.map +1 -0
  83. package/dist/components/input.js +6 -0
  84. package/dist/components/input.js.map +1 -0
  85. package/dist/components/label.d.ts +11 -0
  86. package/dist/components/label.d.ts.map +1 -0
  87. package/dist/components/label.js +13 -0
  88. package/dist/components/label.js.map +1 -0
  89. package/dist/components/live-pill.d.ts +14 -0
  90. package/dist/components/live-pill.js +15 -0
  91. package/dist/components/live-pill.js.map +1 -0
  92. package/dist/components/metric-tile.d.ts +23 -0
  93. package/dist/components/metric-tile.d.ts.map +1 -0
  94. package/dist/components/money-breakdown.d.ts +36 -0
  95. package/dist/components/money-breakdown.d.ts.map +1 -0
  96. package/dist/components/money-breakdown.js +12 -0
  97. package/dist/components/money-breakdown.js.map +1 -0
  98. package/dist/components/number-input.d.ts +16 -0
  99. package/dist/components/number-input.d.ts.map +1 -0
  100. package/dist/components/number-input.js +30 -0
  101. package/dist/components/number-input.js.map +1 -0
  102. package/dist/components/pagination.d.ts +27 -0
  103. package/dist/components/pagination.d.ts.map +1 -0
  104. package/dist/components/pagination.js +52 -0
  105. package/dist/components/pagination.js.map +1 -0
  106. package/dist/components/popover.d.ts +24 -0
  107. package/dist/components/popover.d.ts.map +1 -0
  108. package/dist/components/popover.js +28 -0
  109. package/dist/components/popover.js.map +1 -0
  110. package/dist/components/progress.d.ts +13 -0
  111. package/dist/components/progress.d.ts.map +1 -0
  112. package/dist/components/progress.js +17 -0
  113. package/dist/components/radio-group.d.ts +10 -0
  114. package/dist/components/radio-group.d.ts.map +1 -0
  115. package/dist/components/radio-group.js +17 -0
  116. package/dist/components/radio-group.js.map +1 -0
  117. package/dist/components/scroll-area.d.ts.map +1 -0
  118. package/dist/components/scroll-area.js +22 -0
  119. package/dist/components/scroll-area.js.map +1 -0
  120. package/dist/components/select.d.ts +27 -0
  121. package/dist/components/select.d.ts.map +1 -0
  122. package/dist/components/select.js +40 -0
  123. package/dist/components/select.js.map +1 -0
  124. package/dist/components/separator.d.ts +10 -0
  125. package/dist/components/separator.d.ts.map +1 -0
  126. package/dist/components/separator.js +14 -0
  127. package/dist/components/separator.js.map +1 -0
  128. package/dist/components/sidebar.d.ts.map +1 -0
  129. package/dist/components/sidebar.js +48 -0
  130. package/dist/components/sidebar.js.map +1 -0
  131. package/dist/components/skeleton.d.ts +23 -0
  132. package/dist/components/skeleton.js +25 -0
  133. package/dist/components/skeleton.js.map +1 -0
  134. package/dist/components/slider.d.ts +14 -0
  135. package/dist/components/slider.d.ts.map +1 -0
  136. package/dist/components/slider.js +30 -0
  137. package/dist/components/slider.js.map +1 -0
  138. package/dist/components/spec.d.ts +35 -0
  139. package/dist/components/spec.js +31 -0
  140. package/dist/components/spec.js.map +1 -0
  141. package/dist/components/spinner.d.ts +20 -0
  142. package/dist/components/spinner.d.ts.map +1 -0
  143. package/dist/components/spinner.js +18 -0
  144. package/dist/components/spinner.js.map +1 -0
  145. package/dist/components/stack.d.ts +48 -0
  146. package/dist/components/stack.d.ts.map +1 -0
  147. package/dist/components/stack.js +43 -0
  148. package/dist/components/stack.js.map +1 -0
  149. package/dist/components/status-pill.js +34 -0
  150. package/dist/components/status-pill.js.map +1 -0
  151. package/dist/components/switch.d.ts +9 -0
  152. package/dist/components/switch.d.ts.map +1 -0
  153. package/dist/components/switch.js +15 -0
  154. package/dist/components/switch.js.map +1 -0
  155. package/dist/components/table.d.ts +31 -0
  156. package/dist/components/table.d.ts.map +1 -0
  157. package/dist/components/tabs.d.ts +22 -0
  158. package/dist/components/tabs.d.ts.map +1 -0
  159. package/dist/components/tabs.js +28 -0
  160. package/dist/components/tabs.js.map +1 -0
  161. package/dist/components/textarea.d.ts +8 -0
  162. package/dist/components/textarea.d.ts.map +1 -0
  163. package/dist/components/textarea.js +6 -0
  164. package/dist/components/textarea.js.map +1 -0
  165. package/dist/components/theme-provider.d.ts +35 -0
  166. package/dist/components/theme-provider.d.ts.map +1 -0
  167. package/dist/components/theme-provider.js.map +1 -0
  168. package/dist/components/theme-toggle.d.ts +10 -0
  169. package/dist/components/theme-toggle.d.ts.map +1 -0
  170. package/dist/components/theme-toggle.js.map +1 -0
  171. package/dist/components/three-state.d.ts +39 -0
  172. package/dist/components/three-state.d.ts.map +1 -0
  173. package/dist/components/three-state.js +24 -0
  174. package/dist/components/three-state.js.map +1 -0
  175. package/dist/components/timestamp.d.ts +24 -0
  176. package/dist/components/timestamp.js +64 -0
  177. package/dist/components/timestamp.js.map +1 -0
  178. package/dist/components/toaster.d.ts +27 -0
  179. package/dist/components/toaster.d.ts.map +1 -0
  180. package/dist/components/toaster.js +21 -0
  181. package/dist/components/toaster.js.map +1 -0
  182. package/dist/components/tooltip.d.ts +28 -0
  183. package/dist/components/tooltip.d.ts.map +1 -0
  184. package/dist/components/tooltip.js.map +1 -0
  185. package/dist/components/top-bar.d.ts +13 -0
  186. package/dist/components/top-bar.d.ts.map +1 -0
  187. package/dist/components/top-bar.js +16 -0
  188. package/dist/index.d.ts +76 -0
  189. package/dist/index.d.ts.map +1 -0
  190. package/dist/index.js +86 -0
  191. package/dist/index.js.map +1 -0
  192. package/dist/lib/utils.d.ts +7 -0
  193. package/dist/lib/utils.d.ts.map +1 -0
  194. package/dist/lib/utils.js +10 -0
  195. package/dist/lib/utils.js.map +1 -0
  196. package/dist/marketing/footer.d.ts +31 -0
  197. package/dist/marketing/footer.d.ts.map +1 -0
  198. package/dist/marketing/footer.js +9 -0
  199. package/dist/marketing/footer.js.map +1 -0
  200. package/dist/marketing/hero.d.ts +29 -0
  201. package/dist/marketing/hero.d.ts.map +1 -0
  202. package/dist/marketing/hero.js +7 -0
  203. package/dist/marketing/hero.js.map +1 -0
  204. package/dist/marketing/index.d.ts +21 -0
  205. package/dist/marketing/index.d.ts.map +1 -0
  206. package/dist/marketing/index.js +21 -0
  207. package/dist/marketing/index.js.map +1 -0
  208. package/dist/marketing/logo-cloud.d.ts +15 -0
  209. package/dist/marketing/logo-cloud.d.ts.map +1 -0
  210. package/dist/marketing/logo-cloud.js +6 -0
  211. package/dist/marketing/logo-cloud.js.map +1 -0
  212. package/dist/marketing/nav.d.ts +33 -0
  213. package/dist/marketing/nav.d.ts.map +1 -0
  214. package/dist/marketing/nav.js +14 -0
  215. package/dist/marketing/nav.js.map +1 -0
  216. package/dist/marketing/prose.d.ts +12 -0
  217. package/dist/marketing/prose.d.ts.map +1 -0
  218. package/dist/marketing/prose.js +18 -0
  219. package/dist/marketing/prose.js.map +1 -0
  220. package/dist/marketing/section.d.ts +22 -0
  221. package/dist/marketing/section.d.ts.map +1 -0
  222. package/dist/marketing/section.js +7 -0
  223. package/dist/marketing/section.js.map +1 -0
  224. package/dist/showcase/components/code-block.d.ts +11 -0
  225. package/dist/showcase/components/code-block.d.ts.map +1 -0
  226. package/dist/showcase/components/code-block.js +20 -0
  227. package/dist/showcase/components/code-block.js.map +1 -0
  228. package/dist/showcase/components/example.d.ts +16 -0
  229. package/dist/showcase/components/example.d.ts.map +1 -0
  230. package/dist/showcase/components/example.js +14 -0
  231. package/dist/showcase/components/example.js.map +1 -0
  232. package/dist/showcase/components/section.d.ts +21 -0
  233. package/dist/showcase/components/section.d.ts.map +1 -0
  234. package/dist/showcase/components/section.js +10 -0
  235. package/dist/showcase/components/section.js.map +1 -0
  236. package/dist/showcase/components/swatch.d.ts +17 -0
  237. package/dist/showcase/components/swatch.d.ts.map +1 -0
  238. package/dist/showcase/components/swatch.js +6 -0
  239. package/dist/showcase/components/swatch.js.map +1 -0
  240. package/dist/showcase/index.d.ts +17 -0
  241. package/dist/showcase/index.d.ts.map +1 -0
  242. package/dist/showcase/index.js +17 -0
  243. package/dist/showcase/index.js.map +1 -0
  244. package/dist/showcase/page.d.ts +2 -0
  245. package/dist/showcase/page.d.ts.map +1 -0
  246. package/dist/showcase/page.js +1085 -0
  247. package/dist/showcase/page.js.map +1 -0
  248. package/dist/styles/generated/tokens.d.ts +131 -0
  249. package/dist/styles/generated/tokens.d.ts.map +1 -0
  250. package/dist/styles/generated/tokens.js +107 -0
  251. package/dist/styles/generated/tokens.js.map +1 -0
  252. package/dist/styles/globals.css +131 -0
  253. package/dist/styles/tailwind.preset.d.ts +181 -0
  254. package/dist/styles/tailwind.preset.d.ts.map +1 -0
  255. package/dist/styles/tailwind.preset.js +114 -0
  256. package/dist/styles/tailwind.preset.js.map +1 -0
  257. package/dist/tokens/index.d.ts +176 -0
  258. package/dist/tokens/index.d.ts.map +1 -0
  259. package/dist/tokens/index.js +139 -0
  260. package/dist/tokens/index.js.map +1 -0
  261. package/dist/tokens/tokens.json +154 -0
  262. package/package.json +124 -0
  263. package/src/components/accordion.tsx +76 -0
  264. package/src/components/alert.tsx +113 -0
  265. package/src/components/app-shell.tsx +43 -0
  266. package/src/components/aspect-ratio.tsx +18 -0
  267. package/src/components/avatar-group.tsx +73 -0
  268. package/src/components/avatar.tsx +81 -0
  269. package/src/components/badge.tsx +77 -0
  270. package/src/components/breadcrumb.tsx +121 -0
  271. package/src/components/button.tsx +83 -0
  272. package/src/components/calendar.tsx +85 -0
  273. package/src/components/capacity-bar.tsx +80 -0
  274. package/src/components/card.tsx +104 -0
  275. package/src/components/checkbox.tsx +46 -0
  276. package/src/components/chip.tsx +74 -0
  277. package/src/components/collapsible.tsx +54 -0
  278. package/src/components/combobox.tsx +140 -0
  279. package/src/components/confirm-action.tsx +111 -0
  280. package/src/components/container.tsx +39 -0
  281. package/src/components/date-picker.tsx +98 -0
  282. package/src/components/dialog.tsx +174 -0
  283. package/src/components/drawer.tsx +157 -0
  284. package/src/components/dropdown-menu.tsx +200 -0
  285. package/src/components/empty-state.tsx +46 -0
  286. package/src/components/form-field.tsx +118 -0
  287. package/src/components/input.tsx +29 -0
  288. package/src/components/label.tsx +35 -0
  289. package/src/components/live-pill.tsx +35 -0
  290. package/src/components/metric-tile.tsx +83 -0
  291. package/src/components/money-breakdown.tsx +92 -0
  292. package/src/components/number-input.tsx +113 -0
  293. package/src/components/pagination.tsx +157 -0
  294. package/src/components/popover.tsx +46 -0
  295. package/src/components/progress.tsx +34 -0
  296. package/src/components/radio-group.tsx +46 -0
  297. package/src/components/scroll-area.tsx +55 -0
  298. package/src/components/select.tsx +169 -0
  299. package/src/components/separator.tsx +34 -0
  300. package/src/components/sidebar.tsx +168 -0
  301. package/src/components/skeleton.tsx +85 -0
  302. package/src/components/slider.tsx +58 -0
  303. package/src/components/spec.tsx +59 -0
  304. package/src/components/spinner.tsx +36 -0
  305. package/src/components/stack.tsx +80 -0
  306. package/src/components/status-pill.tsx +100 -0
  307. package/src/components/switch.tsx +37 -0
  308. package/src/components/table.tsx +129 -0
  309. package/src/components/tabs.tsx +72 -0
  310. package/src/components/textarea.tsx +27 -0
  311. package/src/components/theme-provider.tsx +131 -0
  312. package/src/components/theme-toggle.tsx +34 -0
  313. package/src/components/three-state.tsx +90 -0
  314. package/src/components/timestamp.tsx +107 -0
  315. package/src/components/toaster.tsx +55 -0
  316. package/src/components/tooltip.tsx +49 -0
  317. package/src/components/top-bar.tsx +29 -0
  318. package/src/index.ts +221 -0
  319. package/src/lib/utils.ts +10 -0
  320. package/src/marketing/footer.tsx +93 -0
  321. package/src/marketing/hero.tsx +92 -0
  322. package/src/marketing/index.ts +24 -0
  323. package/src/marketing/logo-cloud.tsx +35 -0
  324. package/src/marketing/nav.tsx +122 -0
  325. package/src/marketing/prose.tsx +45 -0
  326. package/src/marketing/section.tsx +77 -0
  327. package/src/showcase/components/code-block.tsx +66 -0
  328. package/src/showcase/components/example.tsx +47 -0
  329. package/src/showcase/components/section.tsx +70 -0
  330. package/src/showcase/components/swatch.tsx +52 -0
  331. package/src/showcase/index.tsx +16 -0
  332. package/src/showcase/page.tsx +4216 -0
  333. package/src/styles/generated/tokens.ts +119 -0
  334. package/src/styles/globals.css +131 -0
  335. package/src/styles/tailwind.preset.ts +134 -0
  336. package/src/test/a11y.test.tsx +638 -0
  337. package/src/test/marketing-a11y.test.tsx +138 -0
  338. package/src/test/setup.ts +47 -0
  339. package/src/tokens/index.ts +154 -0
  340. package/src/tokens/tokens.json +154 -0
@@ -0,0 +1,119 @@
1
+ // GENERATED by scripts/build-tokens.mjs from src/tokens/tokens.json — do not edit (Tailwind preset data)
2
+
3
+ export const colors = {
4
+ "brand-lime": "hsl(var(--brand-lime))",
5
+ "brand-lime-foreground": "hsl(var(--brand-lime-foreground))",
6
+ "brand-forest": "hsl(var(--brand-forest))",
7
+ "brand-forest-foreground": "hsl(var(--brand-forest-foreground))",
8
+ "background": "hsl(var(--background))",
9
+ "bg-subtle": "hsl(var(--bg-subtle))",
10
+ "bg-muted": "hsl(var(--bg-muted))",
11
+ "border": "hsl(var(--border))",
12
+ "border-strong": "hsl(var(--border-strong))",
13
+ "foreground": "hsl(var(--foreground))",
14
+ "text-muted": "hsl(var(--text-muted))",
15
+ "text-subtle": "hsl(var(--text-subtle))",
16
+ "success": "hsl(var(--success))",
17
+ "success-foreground": "hsl(var(--success-foreground))",
18
+ "warning": "hsl(var(--warning))",
19
+ "warning-foreground": "hsl(var(--warning-foreground))",
20
+ "danger": "hsl(var(--danger))",
21
+ "danger-foreground": "hsl(var(--danger-foreground))",
22
+ "info": "hsl(var(--info))",
23
+ "info-foreground": "hsl(var(--info-foreground))",
24
+ "ring": "hsl(var(--ring))",
25
+ } as const;
26
+
27
+ export const fontFamily = {
28
+ sans: ['"Exo 2"', 'system-ui', 'sans-serif'],
29
+ mono: ['ui-monospace', 'SFMono-Regular', '"JetBrains Mono"', 'Menlo', 'monospace'],
30
+ } as const;
31
+
32
+ export const fontSize = {
33
+ "xs": ["11px", { lineHeight: "16px" }],
34
+ "sm": ["13px", { lineHeight: "18px" }],
35
+ "base": ["14px", { lineHeight: "20px" }],
36
+ "md": ["15px", { lineHeight: "22px" }],
37
+ "lg": ["17px", { lineHeight: "24px" }],
38
+ "xl": ["20px", { lineHeight: "28px" }],
39
+ "2xl": ["24px", { lineHeight: "32px" }],
40
+ "3xl": ["30px", { lineHeight: "36px" }],
41
+ } as const;
42
+
43
+ export const fontSizeFluid = {
44
+ "display-sm": ["clamp(32px, 24px + 2.5vw, 44px)", { lineHeight: "1.1", letterSpacing: "-0.02em" }],
45
+ "display": ["clamp(40px, 26px + 4vw, 64px)", { lineHeight: "1.05", letterSpacing: "-0.02em" }],
46
+ "display-lg": ["clamp(48px, 28px + 6vw, 96px)", { lineHeight: "1", letterSpacing: "-0.025em" }],
47
+ } as const;
48
+
49
+ export const backgroundImage = {
50
+ "gradient-brand": "linear-gradient(135deg, hsl(var(--brand-forest)) 0%, hsl(100 55% 38%) 55%, hsl(var(--brand-lime)) 100%)",
51
+ "gradient-forest-fade": "linear-gradient(180deg, hsl(var(--brand-forest) / 0.08) 0%, transparent 100%)",
52
+ } as const;
53
+
54
+ export const fontWeight = {
55
+ normal: "400",
56
+ medium: "500",
57
+ semibold: "600",
58
+ bold: "700",
59
+ } as const;
60
+
61
+ export const spacing = {
62
+ "1": "4px",
63
+ "2": "8px",
64
+ "3": "12px",
65
+ "4": "16px",
66
+ "5": "20px",
67
+ "6": "24px",
68
+ "8": "32px",
69
+ "10": "40px",
70
+ "12": "48px",
71
+ "16": "64px",
72
+ "20": "80px",
73
+ "24": "96px",
74
+ "32": "128px",
75
+ "40": "160px",
76
+ "0.5": "2px",
77
+ "1.5": "6px",
78
+ "2.5": "10px",
79
+ } as const;
80
+
81
+ export const borderRadius = {
82
+ none: "0",
83
+ sm: "var(--radius-sm)",
84
+ DEFAULT: "var(--radius)",
85
+ md: "var(--radius-md)",
86
+ full: "9999px",
87
+ } as const;
88
+
89
+ export const boxShadow = {
90
+ none: "none",
91
+ sm: "0 1px 2px rgba(0,0,0,0.04), 0 1px 1px rgba(0,0,0,0.04)",
92
+ md: "0 4px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.06)",
93
+ lg: "0 12px 32px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.08)",
94
+ } as const;
95
+
96
+ export const transitionDuration = {
97
+ DEFAULT: "150ms",
98
+ "slow": "200ms",
99
+ } as const;
100
+
101
+ export const transitionTimingFunction = {
102
+ out: "cubic-bezier(0.2, 0, 0, 1)",
103
+ } as const;
104
+
105
+ export const zIndex = {
106
+ sticky: "20",
107
+ overlay: "40",
108
+ modal: "50",
109
+ popover: "50",
110
+ toast: "60",
111
+ } as const;
112
+
113
+ export const screens = {
114
+ "sm": "640px",
115
+ "md": "768px",
116
+ "lg": "1024px",
117
+ "xl": "1280px",
118
+ "2xl": "1536px",
119
+ } as const;
@@ -0,0 +1,131 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ @layer base {
6
+ /* ── GENERATED TOKENS — edit src/tokens/tokens.json, then run `npm run build:tokens` ── */
7
+ :root {
8
+ --brand-lime: 72 65% 52%;
9
+ --brand-lime-foreground: 0 0% 4%;
10
+ --brand-forest: 147 66% 26%;
11
+ --brand-forest-foreground: 0 0% 100%;
12
+ --background: 0 0% 100%;
13
+ --bg-subtle: 0 0% 98%;
14
+ --bg-muted: 240 5% 96%;
15
+ --border: 0 0% 90%;
16
+ --border-strong: 0 0% 83%;
17
+ --foreground: 0 0% 4%;
18
+ --text-muted: 0 0% 32%;
19
+ --text-subtle: 0 0% 45%;
20
+ --success: 142 72% 29%;
21
+ --success-foreground: 0 0% 100%;
22
+ --warning: 35 90% 33%;
23
+ --warning-foreground: 0 0% 100%;
24
+ --danger: 0 72% 49%;
25
+ --danger-foreground: 0 0% 100%;
26
+ --info: 217 91% 50%;
27
+ --info-foreground: 0 0% 100%;
28
+ --ring: 147 66% 26%;
29
+
30
+ --radius-sm: 2px;
31
+ --radius: 4px;
32
+ --radius-md: 6px;
33
+ }
34
+
35
+ .dark {
36
+ --background: 0 0% 4%;
37
+ --bg-subtle: 0 0% 8%;
38
+ --bg-muted: 0 0% 12%;
39
+ --border: 0 0% 15%;
40
+ --border-strong: 240 5% 26%;
41
+ --foreground: 0 0% 98%;
42
+ --text-muted: 240 5% 65%;
43
+ --text-subtle: 240 4% 52%;
44
+ --success: 142 60% 45%;
45
+ --success-foreground: 0 0% 4%;
46
+ --warning: 38 92% 50%;
47
+ --warning-foreground: 0 0% 4%;
48
+ --danger: 0 84% 62%;
49
+ --danger-foreground: 0 0% 4%;
50
+ --info: 217 91% 62%;
51
+ --info-foreground: 0 0% 4%;
52
+ --ring: 72 65% 52%;
53
+ }
54
+ /* ── END GENERATED TOKENS ── */
55
+
56
+ * {
57
+ border-color: hsl(var(--border));
58
+ }
59
+
60
+ html {
61
+ font-family:
62
+ "Exo 2",
63
+ system-ui,
64
+ -apple-system,
65
+ sans-serif;
66
+ font-size: 14px;
67
+ -webkit-font-smoothing: antialiased;
68
+ -moz-osx-font-smoothing: grayscale;
69
+ }
70
+
71
+ body {
72
+ background-color: hsl(var(--background));
73
+ color: hsl(var(--foreground));
74
+ font-feature-settings: "cv11", "ss03";
75
+ }
76
+
77
+ /* Numeric rendering */
78
+ .tabular {
79
+ font-variant-numeric: tabular-nums;
80
+ font-feature-settings: "tnum" 1;
81
+ }
82
+
83
+ /* Honor reduced motion */
84
+ @media (prefers-reduced-motion: reduce) {
85
+ *,
86
+ *::before,
87
+ *::after {
88
+ animation-duration: 0.01ms !important;
89
+ animation-iteration-count: 1 !important;
90
+ transition-duration: 0.01ms !important;
91
+ scroll-behavior: auto !important;
92
+ }
93
+ }
94
+
95
+ /* Visible focus ring fallback for any element that opts in.
96
+ Full opacity on purpose — the ring must hit 3:1 non-text contrast. */
97
+ :focus-visible {
98
+ outline: 2px solid hsl(var(--ring));
99
+ outline-offset: 2px;
100
+ }
101
+
102
+ /* Skip link */
103
+ .skip-link {
104
+ position: absolute;
105
+ left: -9999px;
106
+ z-index: 999;
107
+ padding: 8px 12px;
108
+ background: hsl(var(--brand-forest));
109
+ color: hsl(var(--brand-forest-foreground));
110
+ font-size: 13px;
111
+ border-radius: var(--radius);
112
+ }
113
+ .skip-link:focus {
114
+ left: 8px;
115
+ top: 8px;
116
+ }
117
+ }
118
+
119
+ @layer utilities {
120
+ .scrollbar-thin::-webkit-scrollbar {
121
+ width: 8px;
122
+ height: 8px;
123
+ }
124
+ .scrollbar-thin::-webkit-scrollbar-track {
125
+ background: transparent;
126
+ }
127
+ .scrollbar-thin::-webkit-scrollbar-thumb {
128
+ background: hsl(var(--border-strong));
129
+ border-radius: 9999px;
130
+ }
131
+ }
@@ -0,0 +1,134 @@
1
+ import type { Config } from "tailwindcss";
2
+ // Explicit ".js" — Tailwind v3 has no exports map, so strict Node ESM
3
+ // needs the extension (bundlers/jiti accept it too).
4
+ import plugin from "tailwindcss/plugin.js";
5
+ import {
6
+ backgroundImage,
7
+ borderRadius,
8
+ boxShadow,
9
+ colors,
10
+ fontFamily,
11
+ fontSize,
12
+ fontSizeFluid,
13
+ fontWeight,
14
+ screens,
15
+ spacing,
16
+ transitionDuration,
17
+ transitionTimingFunction,
18
+ zIndex,
19
+ } from "./generated/tokens";
20
+
21
+ /**
22
+ * DT Sports — Tailwind preset.
23
+ *
24
+ * All token values come from src/tokens/tokens.json via the generated
25
+ * ./generated/tokens module (run `npm run build:tokens` after editing the
26
+ * JSON). Only Tailwind-specific wiring lives in this file: dark-mode
27
+ * strategy, keyframes/animations, and the pointer-coarse variant.
28
+ *
29
+ * Consume from apps via:
30
+ *
31
+ * import preset from "@dtsports/design-system/tailwind-preset";
32
+ * const config: Config = {
33
+ * presets: [preset],
34
+ * content: [ ...your app + design-system source paths ],
35
+ * };
36
+ */
37
+ const preset = {
38
+ darkMode: ["class"],
39
+ // Empty content here — apps must declare their own paths so Tailwind
40
+ // can scan the design-system source AND the app's own files.
41
+ content: [],
42
+ theme: {
43
+ // Explicit (non-extend) so web and native share one breakpoint source.
44
+ screens,
45
+ extend: {
46
+ colors: {
47
+ brand: {
48
+ lime: colors["brand-lime"],
49
+ "lime-foreground": colors["brand-lime-foreground"],
50
+ forest: colors["brand-forest"],
51
+ "forest-foreground": colors["brand-forest-foreground"],
52
+ },
53
+ background: colors.background,
54
+ "bg-subtle": colors["bg-subtle"],
55
+ "bg-muted": colors["bg-muted"],
56
+ border: colors.border,
57
+ "border-strong": colors["border-strong"],
58
+ foreground: colors.foreground,
59
+ "text-muted": colors["text-muted"],
60
+ "text-subtle": colors["text-subtle"],
61
+ success: colors.success,
62
+ "success-foreground": colors["success-foreground"],
63
+ warning: colors.warning,
64
+ "warning-foreground": colors["warning-foreground"],
65
+ danger: colors.danger,
66
+ "danger-foreground": colors["danger-foreground"],
67
+ info: colors.info,
68
+ "info-foreground": colors["info-foreground"],
69
+ ring: colors.ring,
70
+ },
71
+ fontFamily: {
72
+ sans: [...fontFamily.sans],
73
+ mono: [...fontFamily.mono],
74
+ },
75
+ fontSize: {
76
+ ...Object.fromEntries(
77
+ Object.entries(fontSize).map(([k, [size, opts]]) => [
78
+ k,
79
+ [size, { ...opts }],
80
+ ])
81
+ ),
82
+ // Marketing display scale — fluid clamp(), zero cost unless used.
83
+ ...Object.fromEntries(
84
+ Object.entries(fontSizeFluid).map(([k, [size, opts]]) => [
85
+ k,
86
+ [size, { ...opts }],
87
+ ])
88
+ ),
89
+ },
90
+ fontWeight: { ...fontWeight },
91
+ spacing: { ...spacing },
92
+ borderRadius: { ...borderRadius },
93
+ boxShadow: { ...boxShadow },
94
+ backgroundImage: { ...backgroundImage },
95
+ transitionDuration: { ...transitionDuration },
96
+ transitionTimingFunction: { ...transitionTimingFunction },
97
+ zIndex: { ...zIndex },
98
+ keyframes: {
99
+ "live-pulse": {
100
+ "0%, 100%": { opacity: "1" },
101
+ "50%": { opacity: "0.4" },
102
+ },
103
+ "fade-in": {
104
+ from: { opacity: "0" },
105
+ to: { opacity: "1" },
106
+ },
107
+ // Opacity-only on purpose. A `transform: translateY(...)` here
108
+ // would override Tailwind's `-translate-x-1/2 -translate-y-1/2`
109
+ // centering on the desktop DialogContent (CSS `transform` is a
110
+ // single property — animation wins), shoving the modal off-
111
+ // screen to the bottom-right. Opacity is enough entrance polish
112
+ // and works for both the centered modal and the mobile sheet.
113
+ "fade-in-up": {
114
+ from: { opacity: "0" },
115
+ to: { opacity: "1" },
116
+ },
117
+ },
118
+ animation: {
119
+ "live-pulse": "live-pulse 1.5s ease-in-out infinite",
120
+ "fade-in": "fade-in 150ms cubic-bezier(0.2, 0, 0, 1)",
121
+ "fade-in-up": "fade-in-up 200ms cubic-bezier(0.2, 0, 0, 1)",
122
+ },
123
+ },
124
+ },
125
+ plugins: [
126
+ // `pointer-coarse:` targets touch-primary devices — used to grow tap
127
+ // targets to 44px without loosening the dense pointer/desktop layout.
128
+ plugin(({ addVariant }) => {
129
+ addVariant("pointer-coarse", "@media (pointer: coarse)");
130
+ }),
131
+ ],
132
+ } satisfies Partial<Config>;
133
+
134
+ export default preset;