CommonSkeleton.vue 868 B

1234567891011121314151617181920212223242526272829303132
  1. <!-- Copyright (C) 2012-2025 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. import { computed } from 'vue'
  4. interface Props {
  5. rounded?: boolean
  6. label?: string
  7. }
  8. const props = withDefaults(defineProps<Props>(), {
  9. label: __('Content loader'),
  10. })
  11. const roundedClass = computed(() =>
  12. props.rounded ? 'rounded-full' : 'rounded-lg',
  13. )
  14. </script>
  15. <template>
  16. <div
  17. tabindex="0"
  18. role="progressbar"
  19. aria-busy="true"
  20. aria-valuemin="0"
  21. aria-valuemax="100"
  22. :aria-label="$t(label)"
  23. :aria-valuetext="$t('Please wait until content is loaded')"
  24. class="bg-primary animate-pulse bg-blue-200 focus:outline-none focus-visible:rounded-sm focus-visible:outline-none focus-visible:outline-1 focus-visible:outline-offset-1 focus-visible:outline-blue-800 dark:bg-gray-700"
  25. :class="[roundedClass]"
  26. />
  27. </template>