@redseed/redseed-ui-vue3 7.2.4 → 7.2.6
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/index.js
CHANGED
|
@@ -30,7 +30,6 @@ export * from './src/components/MetaInfo'
|
|
|
30
30
|
export * from './src/components/Modal'
|
|
31
31
|
export * from './src/components/Pagination'
|
|
32
32
|
export * from './src/components/Progress'
|
|
33
|
-
export * from './src/components/Section'
|
|
34
33
|
export * from './src/components/Social'
|
|
35
34
|
export * from './src/components/Sorting'
|
|
36
35
|
export * from './src/components/Switcher'
|
package/package.json
CHANGED
|
@@ -26,13 +26,21 @@ const variantClass = computed(() => [
|
|
|
26
26
|
</script>
|
|
27
27
|
|
|
28
28
|
<template>
|
|
29
|
-
<section
|
|
29
|
+
<section
|
|
30
30
|
:class="variantClass"
|
|
31
31
|
>
|
|
32
|
-
<div v-if="$slots.header"
|
|
32
|
+
<div v-if="$slots.header"
|
|
33
|
+
class="rsui-section__header"
|
|
34
|
+
>
|
|
33
35
|
<slot name="header"></slot>
|
|
34
36
|
</div>
|
|
35
|
-
|
|
37
|
+
|
|
38
|
+
<div v-if="$slots.default"
|
|
39
|
+
:class="{
|
|
40
|
+
'rsui-section__content': true,
|
|
41
|
+
'rsui-section__content--no-header': !$slots.header,
|
|
42
|
+
}"
|
|
43
|
+
>
|
|
36
44
|
<slot></slot>
|
|
37
45
|
</div>
|
|
38
46
|
</section>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { ref } from 'vue'
|
|
2
|
+
import { ref, computed, useSlots } from 'vue'
|
|
3
3
|
import ButtonTertiary from '../Button/ButtonTertiary.vue'
|
|
4
4
|
import { useResponsiveWidth } from '../../helpers'
|
|
5
5
|
import { EllipsisVerticalIcon } from '@heroicons/vue/24/outline'
|
|
6
6
|
|
|
7
|
-
defineProps({
|
|
7
|
+
const props = defineProps({
|
|
8
8
|
showSubtitle: {
|
|
9
9
|
type: Boolean,
|
|
10
10
|
default: true,
|
|
@@ -36,6 +36,15 @@ const emit = defineEmits(['click:more-actions'])
|
|
|
36
36
|
function handleMoreActionsClick() {
|
|
37
37
|
emit('click:more-actions')
|
|
38
38
|
}
|
|
39
|
+
|
|
40
|
+
const slots = useSlots()
|
|
41
|
+
|
|
42
|
+
const showToolbar = computed(() => {
|
|
43
|
+
const showMoreActions = props.showMoreActions && slots['more-actions']
|
|
44
|
+
|
|
45
|
+
return props.showActions
|
|
46
|
+
&& (slots.actions || showMoreActions)
|
|
47
|
+
})
|
|
39
48
|
</script>
|
|
40
49
|
<template>
|
|
41
50
|
<div ref="sectionHeaderElement"
|
|
@@ -53,7 +62,10 @@ function handleMoreActionsClick() {
|
|
|
53
62
|
<slot name="icon"></slot>
|
|
54
63
|
</div>
|
|
55
64
|
|
|
56
|
-
<div class="
|
|
65
|
+
<div :class="{
|
|
66
|
+
'rsui-section-header__text': true,
|
|
67
|
+
'rsui-section-header__text--with-toolbar': showToolbar || $slots.icon,
|
|
68
|
+
}">
|
|
57
69
|
|
|
58
70
|
<!-- Title slot, default slot -->
|
|
59
71
|
<div class="rsui-section-header__title">
|
|
@@ -70,7 +82,7 @@ function handleMoreActionsClick() {
|
|
|
70
82
|
|
|
71
83
|
<!-- Actions slot, optional -->
|
|
72
84
|
<div class="rsui-section-header__toolbar"
|
|
73
|
-
v-if="
|
|
85
|
+
v-if="showToolbar"
|
|
74
86
|
>
|
|
75
87
|
<!-- Desktop actions slot, optional -->
|
|
76
88
|
<div class="rsui-section-header__actions-desktop"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import HeroSection from './HeroSection.vue'
|
|
2
2
|
import PageHeader from './PageHeader.vue'
|
|
3
|
+
import Section from './Section.vue'
|
|
3
4
|
import SectionFooter from './SectionFooter.vue'
|
|
4
5
|
import SectionHeader from './SectionHeader.vue'
|
|
5
6
|
import SingleColumnLayout from './SingleColumnLayout.vue'
|
|
@@ -8,6 +9,7 @@ import TwoColumnLayout from './TwoColumnLayout.vue'
|
|
|
8
9
|
export {
|
|
9
10
|
HeroSection,
|
|
10
11
|
PageHeader,
|
|
12
|
+
Section,
|
|
11
13
|
SectionFooter,
|
|
12
14
|
SectionHeader,
|
|
13
15
|
SingleColumnLayout,
|