You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

144 lines
5.0 KiB

4 weeks ago
  1. function withOpacity(variableName) {
  2. return ({ opacityValue }) => {
  3. if (opacityValue !== undefined) {
  4. return `rgba(var(${variableName}), ${opacityValue})`;
  5. } else {
  6. return `rgb(var(${variableName}))`;
  7. }
  8. };
  9. }
  10. module.exports = {
  11. content: ['./src/**/*.{js,ts,jsx,tsx}'],
  12. theme: {
  13. extend: {
  14. screens: {
  15. '3xl': '1900px',
  16. },
  17. fontFamily: {
  18. // body: ['Open Sans', 'system-ui', 'sans-serif'],
  19. // heading: ['Open Sans', 'system-ui', 'sans-serif'],
  20. body: [`Inter, sans-serif`],
  21. heading: [`Inter, sans-serif`],
  22. },
  23. colors: {
  24. light: withOpacity('--color-light'),
  25. dark: withOpacity('--color-dark'),
  26. accent: withOpacity('--color-accent'),
  27. 'muted-black': withOpacity('--color-muted-black'),
  28. 'base-dark': withOpacity('--text-base-dark'),
  29. 'accent-hover': withOpacity('--color-accent-hover'),
  30. 'accent-300': withOpacity('--color-accent-300'),
  31. 'accent-400': withOpacity('--color-accent-400'),
  32. 'accent-500': withOpacity('--color-accent-500'),
  33. 'accent-600': withOpacity('--color-accent-600'),
  34. 'accent-700': withOpacity('--color-accent-700'),
  35. 'border-50': withOpacity('--color-border-50'),
  36. 'border-100': withOpacity('--color-border-100'),
  37. 'border-200': withOpacity('--color-border-200'),
  38. 'border-base': withOpacity('--color-border-base'),
  39. 'border-400': withOpacity('--color-border-400'),
  40. 'gray-50': withOpacity('--color-gray-50'),
  41. 'gray-100': withOpacity('--color-gray-100'),
  42. 'gray-200': withOpacity('--color-gray-200'),
  43. 'gray-300': withOpacity('--color-gray-300'),
  44. 'gray-400': withOpacity('--color-gray-400'),
  45. 'gray-500': withOpacity('--color-gray-500'),
  46. 'gray-600': withOpacity('--color-gray-600'),
  47. 'gray-700': withOpacity('--color-gray-700'),
  48. 'gray-800': withOpacity('--color-gray-800'),
  49. 'gray-900': withOpacity('--color-gray-900'),
  50. 'orange-50': withOpacity('--color-orange-50'),
  51. 'orange-100': withOpacity('--color-orange-100'),
  52. 'orange-200': withOpacity('--color-orange-200'),
  53. 'orange-300': withOpacity('--color-orange-300'),
  54. 'orange-400': withOpacity('--color-orange-400'),
  55. 'orange-500': withOpacity('--color-orange-500'),
  56. 'orange-600': withOpacity('--color-orange-600'),
  57. 'orange-700': withOpacity('--color-orange-700'),
  58. 'orange-800': withOpacity('--color-orange-800'),
  59. 'orange-900': withOpacity('--color-orange-900'),
  60. social: {
  61. facebook: '#3b5998',
  62. 'facebook-hover': '#35508a',
  63. twitter: '#1da1f2',
  64. instagram: '#e1306c',
  65. youtube: '#ff0000',
  66. google: '#4285f4',
  67. 'google-hover': '#3574de',
  68. },
  69. status: {
  70. pending: withOpacity('--color-pending'),
  71. processing: withOpacity('--color-processing'),
  72. complete: withOpacity('--color-complete'),
  73. canceled: withOpacity('--color-canceled'),
  74. failed: withOpacity('--color-failed'),
  75. 'out-for-delivery': withOpacity('--color-out-for-delivery'),
  76. },
  77. },
  78. textColor: {
  79. body: withOpacity('--text-base'),
  80. 'body-dark': withOpacity('--text-base-dark'),
  81. muted: withOpacity('--text-muted'),
  82. 'muted-light': withOpacity('--text-muted-light'),
  83. heading: withOpacity('--text-heading'),
  84. 'sub-heading': withOpacity('--text-sub-heading'),
  85. bolder: withOpacity('--text-text-bolder'),
  86. },
  87. height: {
  88. 13: '3.125rem',
  89. double: '200%',
  90. },
  91. maxWidth: {
  92. 5: '1.25rem',
  93. },
  94. maxHeight: {
  95. 5: '1.25rem',
  96. },
  97. spacing: {
  98. 22: '5.5rem',
  99. },
  100. borderRadius: {
  101. DEFAULT: '5px',
  102. },
  103. boxShadow: {
  104. base: 'rgba(0, 0, 0, 0.16) 0px 4px 16px',
  105. translatePanel: '0px 15px 50px rgba(71, 92, 111, 0.15)',
  106. chatBox:
  107. '0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px -1px rgba(0, 0, 0, 0.1)',
  108. cardAction:
  109. '0 0 0 1px #8898aa1a, 0 15px 35px #31315d1a, 0 5px 15px #00000014',
  110. chat: '0px 1px 2px rgba(0, 0, 0, 0.08)',
  111. box: '0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05)',
  112. promptSuggestion: '0px 2px 6px rgba(59, 74, 92, 0.1)',
  113. avatar: '0px 1px 2px rgba(0, 0, 0, 0.12)',
  114. shopLogo: '2px 4px 16px rgba(0, 0, 0, 0.08)',
  115. shopTransferCard: '0px 2px 6px 0px rgba(75, 85, 99, 0.04)',
  116. shopTransferTable: '0px 2px 4px 0px rgba(75, 85, 99, 0.05)',
  117. },
  118. dropShadow: {
  119. shopLogo: '2px 4px 16px rgba(0, 0, 0, 0.08)',
  120. },
  121. gridTemplateColumns: {
  122. fit: 'repeat(auto-fit, minmax(0, 1fr))',
  123. },
  124. fontSize: {
  125. h1: 'var(--h1)',
  126. h2: 'var(--h2)',
  127. h3: 'var(--h3)',
  128. h4: 'var(--h4)',
  129. h5: 'var(--h5)',
  130. h6: 'var(--h6)',
  131. },
  132. },
  133. },
  134. plugins: [
  135. require('@tailwindcss/typography'),
  136. require('@tailwindcss/forms'),
  137. require('tailwindcss-rtl'),
  138. ],
  139. };