tailwind.config.js 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. import tokens from "./tokens/tokens";
  2. /** @type {import('tailwindcss').Config} */
  3. module.exports = {
  4. content: [
  5. "./apps/**/*.{js,jsx,ts,tsx}",
  6. "./libs/app-common/src/**/*.{js,jsx,ts,tsx}",
  7. "./libs/core/src/**/*.{js,jsx,ts,tsx}",
  8. "./libs/editor/src/**/*.{js,jsx,ts,tsx}",
  9. "./libs/datamanager/src/**/*.{js,jsx,ts,tsx}",
  10. "./libs/ui/src/**/*.{js,jsx,ts,tsx}",
  11. "./libs/storybook/**/*.{js,jsx,ts,tsx}",
  12. ],
  13. theme: {
  14. extend: {
  15. colors: {
  16. // DO NOT USE THESE COLORS
  17. // Refer to the Figma tokens instead
  18. // These are values from the old tailwind.config.js and Shadcn/UI introduction
  19. current: "currentColor",
  20. transparent: "transparent",
  21. border: "hsl(var(--border))",
  22. input: "hsl(var(--input))",
  23. ring: "hsl(var(--ring))",
  24. background: "hsl(var(--background))",
  25. foreground: "hsl(var(--foreground))",
  26. primary: {
  27. DEFAULT: "hsl(var(--primary))",
  28. foreground: "hsl(var(--primary-foreground))",
  29. },
  30. secondary: {
  31. DEFAULT: "hsl(var(--secondary))",
  32. foreground: "hsl(var(--secondary-foreground))",
  33. },
  34. destructive: {
  35. DEFAULT: "hsl(var(--destructive))",
  36. foreground: "hsl(var(--destructive-foreground))",
  37. },
  38. muted: {
  39. DEFAULT: "hsl(var(--muted))",
  40. foreground: "hsl(var(--muted-foreground))",
  41. },
  42. accent: {
  43. DEFAULT: "hsl(var(--accent))",
  44. foreground: "hsl(var(--accent-foreground))",
  45. },
  46. popover: {
  47. DEFAULT: "hsl(var(--popover))",
  48. foreground: "hsl(var(--popover-foreground))",
  49. },
  50. card: {
  51. DEFAULT: "hsl(var(--card))",
  52. foreground: "hsl(var(--card-foreground))",
  53. },
  54. // Add all colors from tokens
  55. ...tokens.colors,
  56. },
  57. fontSize: {
  58. // Add all font sizes from tokens
  59. ...tokens.typography.fontSize,
  60. },
  61. lineHeight: {
  62. // Add all line heights from tokens
  63. ...tokens.typography.lineHeight,
  64. },
  65. letterSpacing: {
  66. // Add all letter spacings from tokens
  67. ...tokens.typography.letterSpacing,
  68. },
  69. fontFamily: {
  70. // Add all font families from tokens
  71. ...tokens.typography.fontFamily,
  72. },
  73. fontWeight: {
  74. // Add all font weights from tokens
  75. ...tokens.typography.fontWeight,
  76. },
  77. spacing: {
  78. 4.5: "1.125rem",
  79. 5.5: "1.375rem",
  80. 6.5: "1.625rem",
  81. 7.5: "1.875rem",
  82. 8.5: "2.125rem",
  83. 10.5: "2.625rem",
  84. 11.5: "2.875rem",
  85. 12.5: "3.125rem",
  86. 13: "3.25rem",
  87. 13.5: "3.375rem",
  88. 14.5: "3.625rem",
  89. 15: "3.75rem",
  90. 15.5: "3.875rem",
  91. 16: "4rem",
  92. 17: "4.25rem",
  93. 17.5: "4.375rem",
  94. 18: "4.5rem",
  95. 18.5: "4.625rem",
  96. 19: "4.75rem",
  97. 21: "5.25rem",
  98. 21.5: "5.375rem",
  99. 22: "5.5rem",
  100. 22.5: "5.625rem",
  101. 25: "6.25rem",
  102. 27: "6.75rem",
  103. 27.5: "6.875rem",
  104. 29: "7.25rem",
  105. 29.5: "7.375rem",
  106. 30: "7.5rem",
  107. 32.5: "8.125rem",
  108. 35: "8.75rem",
  109. 37.5: "9.375rem",
  110. 40: "10rem",
  111. 42.5: "10.625rem",
  112. 45: "11.25rem",
  113. 46: "11.5rem",
  114. 47.5: "11.875rem",
  115. 50: "12.5rem",
  116. 55: "13.75rem",
  117. 60: "15rem",
  118. 65: "16.25rem",
  119. 67: "16.75rem",
  120. 67.5: "16.875rem",
  121. 90: "22.5rem",
  122. // Add all spacing from tokens
  123. ...tokens.spacing,
  124. },
  125. maxWidth: {
  126. "c-1390": "86.875rem",
  127. "c-1315": "82.188rem",
  128. "c-1280": "80rem",
  129. "c-1235": "77.188rem",
  130. "c-1154": "72.125rem",
  131. "c-1016": "63.5rem",
  132. },
  133. zIndex: {
  134. 99999: "99999",
  135. 999: "999",
  136. 1: "1",
  137. },
  138. opacity: {
  139. 65: ".65",
  140. },
  141. transitionProperty: { width: "width" },
  142. boxShadow: {
  143. "solid-l": "0px 10px 120px 0px rgba(45, 74, 170, 0.1)",
  144. "solid-2": "0px 2px 10px rgba(122, 135, 167, 0.05)",
  145. "solid-3": "0px 6px 90px rgba(8, 14, 40, 0.04)",
  146. "solid-4": "0px 6px 90px rgba(8, 14, 40, 0.1)",
  147. "solid-5": "0px 8px 24px rgba(45, 74, 170, 0.08)",
  148. "solid-6": "0px 8px 24px rgba(10, 16, 35, 0.08)",
  149. "solid-7": "0px 30px 50px rgba(45, 74, 170, 0.1)",
  150. "solid-8": "0px 12px 120px rgba(45, 74, 170, 0.06)",
  151. "solid-9": "0px 12px 30px rgba(45, 74, 170, 0.06)",
  152. "solid-10": "0px 8px 30px rgba(45, 74, 170, 0.06)",
  153. "solid-11": "0px 6px 20px rgba(45, 74, 170, 0.05)",
  154. "solid-12": "0px 2px 10px rgba(0, 0, 0, 0.05)",
  155. "solid-13": "0px 2px 19px rgba(0, 0, 0, 0.05)",
  156. "border-1": "inset 0 0 0 1px rgba(0,0,0,1)",
  157. },
  158. borderRadius: {
  159. lg: "var(--radius)",
  160. md: "calc(var(--radius) - 2px)",
  161. sm: "calc(var(--radius) - 4px)",
  162. // Add all border radii from tokens
  163. ...tokens.cornerRadius,
  164. },
  165. backgroundPosition: {
  166. "shimmer-start": "left -2em top 0",
  167. },
  168. backgroundSize: {
  169. "shimmer-size": "2em 100%",
  170. },
  171. keyframes: {
  172. line: {
  173. "0%, 100%": { transform: "translateY(100%)" },
  174. "50%": { transform: "translateY(0)" },
  175. },
  176. "accordion-down": {
  177. from: { height: "0" },
  178. to: { height: "var(--radix-accordion-content-height)" },
  179. },
  180. "accordion-up": {
  181. from: { height: "var(--radix-accordion-content-height)" },
  182. to: { height: "0" },
  183. },
  184. shimmer: {
  185. from: { "background-position": "left -2em top 0" },
  186. to: { "background-position": "right -2em top 0" },
  187. },
  188. },
  189. animation: {
  190. line1: "line 3s linear infinite",
  191. line2: "line 6s linear infinite",
  192. line3: "line 9s linear infinite",
  193. "accordion-down": "accordion-down 0.2s ease-out",
  194. "accordion-up": "accordion-up 0.2s ease-out",
  195. shimmer: "shimmer 1.3s ease infinite",
  196. },
  197. },
  198. },
  199. corePlugins: {
  200. preflight: true,
  201. },
  202. plugins: [require("tailwindcss-animate"), require("tailwind-scrollbar")],
  203. };