@redseed/redseed-ui-vue3 8.13.1 → 8.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redseed/redseed-ui-vue3",
3
- "version": "8.13.1",
3
+ "version": "8.13.2",
4
4
  "description": "RedSeed UI Vue 3 components",
5
5
  "main": "index.js",
6
6
  "repository": "https://github.com/redseedtraining/redseed-ui",
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { computed, ref, toRefs } from 'vue'
2
+ import { computed, ref, toRefs, useAttrs } from 'vue'
3
3
  import ButtonTertiary from '../Button/ButtonTertiary.vue'
4
4
  import Icon from '../Icon/Icon.vue'
5
5
  import { useResponsiveWidth } from '../../helpers'
@@ -46,6 +46,10 @@ const props = defineProps({
46
46
 
47
47
  const { showDivider, headerOnlyCard } = toRefs(props)
48
48
 
49
+ const attrs = useAttrs()
50
+
51
+ const isClickable = computed(() => !!attrs.onClick)
52
+
49
53
  const cardHeaderElement = ref(null)
50
54
 
51
55
  const { responsiveWidth } = useResponsiveWidth(cardHeaderElement, 640)
@@ -67,6 +71,7 @@ function handleMoreActionsClick() {
67
71
  {
68
72
  'rsui-card-header--divider': showDivider,
69
73
  'rsui-card-header--padded-bottom': shouldPadBottom,
74
+ 'rsui-card-header--clickable': isClickable,
70
75
  }
71
76
  ]"
72
77
  >
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { ref, computed, useSlots } from 'vue'
2
+ import { ref, computed, useAttrs, useSlots } from 'vue'
3
3
  import ButtonTertiary from '../Button/ButtonTertiary.vue'
4
4
  import Icon from '../Icon/Icon.vue'
5
5
  import { useResponsiveWidth } from '../../helpers'
@@ -38,6 +38,10 @@ function handleMoreActionsClick() {
38
38
  emit('click:more-actions')
39
39
  }
40
40
 
41
+ const attrs = useAttrs()
42
+
43
+ const isClickable = computed(() => !!attrs.onClick)
44
+
41
45
  const slots = useSlots()
42
46
 
43
47
  const showToolbar = computed(() => {
@@ -51,7 +55,10 @@ const showToolbar = computed(() => {
51
55
  <div ref="sectionHeaderElement"
52
56
  :class="[
53
57
  'rsui-section-header',
54
- { 'rsui-section-header--divider': showDivider }
58
+ {
59
+ 'rsui-section-header--divider': showDivider,
60
+ 'rsui-section-header--clickable': isClickable,
61
+ }
55
62
  ]"
56
63
  >
57
64
  <div class="rsui-section-header__header">