initializeGlobalComponentStyles.ts 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import { initializeAlertClasses } from '#shared/initializer/initializeAlertClasses.ts'
  3. import { initializeAvatarClasses } from '#shared/initializer/initializeAvatarClasses.ts'
  4. import { initializeLinkClasses } from '#shared/initializer/initializeLinkClasses.ts'
  5. import { initializeNotificationClasses } from '#shared/initializer/initializeNotificationClasses.ts'
  6. import { initializeOrganizationAvatarClasses } from '#shared/initializer/initializeOrganizationAvatarClasses.ts'
  7. import { initializeUserAvatarClasses } from '#shared/initializer/initializeUserAvatarClasses.ts'
  8. export const initializeGlobalComponentStyles = () => {
  9. initializeLinkClasses({
  10. base: '',
  11. })
  12. initializeAlertClasses({
  13. base: 'grid w-full content-start items-center justify-items-center text-center grid-flow-col grid-cols-[auto_minmax(auto,1fr)] justify-items-start text-start border w-auto text-sm',
  14. success: 'alert-success bg-green text-white',
  15. info: 'alert-info bg-white text-black',
  16. warning: 'alert-warning bg-yellow text-black',
  17. danger: 'alert-error bg-red/60 text-white',
  18. link: 'hover:underline',
  19. })
  20. initializeAvatarClasses({
  21. base: 'text-black',
  22. vipUser: 'text-yellow',
  23. vipOrganization: 'text-gray-100',
  24. })
  25. initializeUserAvatarClasses({
  26. backgroundColors: [
  27. 'bg-gray',
  28. 'bg-red-bright',
  29. 'bg-yellow',
  30. 'bg-blue',
  31. 'bg-green',
  32. 'bg-pink',
  33. 'bg-orange',
  34. ],
  35. })
  36. initializeOrganizationAvatarClasses({
  37. base: 'bg-gray-200 text-black',
  38. inactive: 'opacity-30',
  39. })
  40. initializeNotificationClasses({
  41. base: 'rounded px-4 py-2',
  42. baseContainer: 'ltr:right-0 rtl:left-0',
  43. error: 'bg-red/60 text-white',
  44. info: 'bg-white text-black',
  45. message: 'ltr:ml-2 rtl:mr-2',
  46. success: 'bg-green text-white',
  47. warn: 'bg-yellow text-black',
  48. })
  49. }