initializeGlobalComponentStyles.ts 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import { initializeAlertClasses } from '#shared/initializer/initializeAlertClasses.ts'
  3. import { initializeBadgeClasses } from '#shared/initializer/initializeBadgeClasses.ts'
  4. import { initializeLinkClasses } from '#shared/initializer/initializeLinkClasses.ts'
  5. import { initializeNotificationClasses } from '#shared/initializer/initializeNotificationClasses.ts'
  6. export const initializeGlobalComponentStyles = () => {
  7. initializeBadgeClasses({
  8. base: 'badge border-0',
  9. success:
  10. 'badge-success bg-green-300 text-green-500 dark:bg-green-900 dark:text-green-500',
  11. info: 'badge-info bg-blue-500 text-blue-800 dark:bg-blue-950 dark:text-blue-800',
  12. warning:
  13. 'badge-warning bg-yellow-50 text-yellow-600 dark:bg-yellow-900 dark:text-yellow-600',
  14. danger:
  15. 'badge-error bg-pink-100 text-red-500 dark:bg-red-900 dark:text-red-500',
  16. neutral:
  17. 'badge-neutral bg-blue-200 text-stone-200 dark:bg-gray-700 dark:text-neutral-500',
  18. custom: 'badge-custom',
  19. })
  20. initializeAlertClasses({
  21. base: 'alert w-auto text-sm',
  22. success: 'alert-success bg-green-300 dark:bg-green-900 text-green-500',
  23. info: 'alert-info bg-blue-500 dark:bg-blue-950 text-blue-800',
  24. warning: 'alert-warning bg-yellow-50 dark:bg-yellow-900 text-yellow-600',
  25. danger: 'alert-error bg-pink-100 dark:bg-red-900 text-red-500',
  26. link: 'hover:underline',
  27. })
  28. initializeLinkClasses({
  29. base: 'link link-hover text-blue-800 focus-visible:rounded-sm focus-visible:outline-1 focus-visible:outline-offset-1 focus-visible:outline-blue-800',
  30. })
  31. initializeNotificationClasses({
  32. base: 'alert rounded-lg gap-1.5 p-2 border-transparent',
  33. baseContainer: 'mx-auto',
  34. error: 'alert-error bg-pink-100 dark:bg-red-900 text-red-500',
  35. info: 'alert-info bg-blue-500 dark:bg-blue-950 text-blue-800',
  36. message: '',
  37. success: 'alert-success bg-green-300 dark:bg-green-900 text-green-500',
  38. warn: 'alert-warning bg-yellow-50 dark:bg-yellow-900 text-yellow-600',
  39. })
  40. }