index.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. import type { FormThemeClasses } from '@shared/types/form'
  3. const defaultTextInput: Record<string, string> = {
  4. input: 'block focus:outline-none focus:ring-0',
  5. }
  6. const classes: FormThemeClasses = {
  7. global: {
  8. wrapper: 'formkit-disabled:opacity-30',
  9. label: 'formkit-label-hidden:sr-only',
  10. help: 'mt-0.5 text-xs',
  11. messages: 'list-none',
  12. message: 'text-red-bright pb-1 text-xs',
  13. },
  14. text: defaultTextInput,
  15. email: defaultTextInput,
  16. url: defaultTextInput,
  17. number: defaultTextInput,
  18. search: defaultTextInput,
  19. tel: defaultTextInput,
  20. time: defaultTextInput,
  21. date: defaultTextInput,
  22. datetime: defaultTextInput,
  23. textarea: defaultTextInput,
  24. password: defaultTextInput,
  25. checkbox: {
  26. wrapper: 'inline-flex items-center cursor-pointer',
  27. inner: 'mr-2',
  28. input:
  29. 'appearance-none focus:outline-none focus:ring-0 focus:ring-offset-0',
  30. },
  31. radio: {
  32. wrapper: 'inline-flex items-center cursor-pointer',
  33. input:
  34. 'appearance-none focus:outline-none focus:ring-0 focus:ring-offset-0',
  35. },
  36. }
  37. export default classes