tailwind.desktop.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. const formKitTailwind = require('@formkit/themes/tailwindcss')
  3. const path = require('path')
  4. const daisyTailwind = require('daisyui')
  5. const unimportantTailwind = require('tailwindcss-unimportant')
  6. const zammadTailwind = require('../../../build/zammadTailwindPlugin.js')
  7. const desktopDir = path.resolve(__dirname, '..')
  8. const sharedDir = path.resolve(__dirname, '../../../shared')
  9. /** @type {import('tailwindcss').Config} */
  10. module.exports = {
  11. darkMode: ['class', '[data-theme="dark"]'],
  12. content: [
  13. `${desktopDir}/**/*.{js,jsx,ts,tsx,vue,css}`,
  14. `${sharedDir}/**/*.{js,jsx,ts,tsx,vue,css}`,
  15. ],
  16. plugins: [
  17. formKitTailwind,
  18. zammadTailwind,
  19. daisyTailwind,
  20. unimportantTailwind,
  21. ({ addComponents, theme }) => {
  22. addComponents({
  23. // NB: Used by FieldDateTimeInput.vue component, within its style section.
  24. // Since all component styles are processed in isolation, we have to provide the classes below within the
  25. // configuration, otherwise we risk running into build issues since class definitions in imported stylesheets
  26. // might not be available.
  27. '.date-selection': {
  28. borderColor: theme('colors.blue.800'),
  29. backgroundColor: theme('colors.blue.800'),
  30. backgroundImage: 'none',
  31. },
  32. '.date-navigation': {
  33. color: theme('colors.blue.800'),
  34. },
  35. })
  36. },
  37. ],
  38. theme: {
  39. colors: {
  40. alpha: {
  41. 100: '#EDF1F280',
  42. 800: '#33343880',
  43. },
  44. black: '#000000',
  45. white: '#FFFFFF',
  46. gray: {
  47. 100: '#585856',
  48. 200: '#535355',
  49. 300: '#434141',
  50. 400: '#3F3F41',
  51. 500: '#323234',
  52. 600: '#2C2C2D',
  53. 700: '#262627',
  54. 800: '#212122',
  55. 900: '#202021',
  56. },
  57. stone: {
  58. 200: '#A0A3A6',
  59. 400: '#6F7071',
  60. 500: '#4B5058',
  61. 700: '#383B41',
  62. },
  63. blue: {
  64. 50: '#F9FAFB',
  65. 100: '#E5F0F5',
  66. 200: '#EDF1F2',
  67. 300: '#D4E2E9',
  68. 400: '#C9E1EA',
  69. 500: '#C0DDE6',
  70. 600: '#7FD4F1',
  71. 700: '#49A9CA',
  72. 800: '#23A2CD',
  73. 900: '#045972',
  74. 950: '#063849',
  75. },
  76. green: {
  77. 100: '#EFF0F1',
  78. 200: '#BCCED2',
  79. 300: '#BBE0CB',
  80. 400: '#38AD69',
  81. 500: '#36AF6A',
  82. 900: '#07341A',
  83. },
  84. yellow: {
  85. 50: '#FFF6DA',
  86. 200: '#FFD44C',
  87. 300: '#FFCE33',
  88. 500: '#FAAB00',
  89. 600: '#F39804',
  90. 800: '#4A3300',
  91. 900: '#453914',
  92. },
  93. red: {
  94. 50: '#FAEFD6',
  95. 300: '#F35912',
  96. 400: '#E9613A',
  97. 500: '#E54011',
  98. 600: '#86270C',
  99. 900: '#220C06',
  100. },
  101. pink: {
  102. 100: '#EFD9D2',
  103. 300: '#EA4D84',
  104. 500: '#FF006B',
  105. },
  106. },
  107. extend: {
  108. // NB: daisyUI overrides `neutral` color as a last step.
  109. // Here we apply our original theme values by using the same way they were overridden (via full class name).
  110. // https://github.com/saadeghi/daisyui/issues/2368
  111. colors: {
  112. 'neutral-100': '#E5E5E5',
  113. 'neutral-200': '#E3E3E3',
  114. 'neutral-300': '#DCDCDC',
  115. 'neutral-400': '#D1D1D1',
  116. 'neutral-500': '#999999',
  117. 'neutral-950': '#191919',
  118. },
  119. },
  120. },
  121. // XXX: daisyUI is used only in desktop view, so its classes CANNOT be used in "shared" components.
  122. daisyui: {
  123. base: false,
  124. // Do not show info about daisyUI version and used config in the console when building CSS.
  125. logs: false,
  126. // Disable all daisyUI themes which in turn disables all built-in colors.
  127. // https://daisyui.com/docs/themes/#-2
  128. themes: [],
  129. },
  130. }