@redseed/redseed-ui-vue3 4.0.0 → 4.1.0
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 +1 -3
- package/package.json +2 -1
- package/src/components/Button/ButtonTertiary.vue +6 -6
- package/src/components/{PageHeading/PageHeading.vue → Layouts/PageHeader.vue} +16 -16
- package/src/components/Layouts/SectionFooter.vue +44 -0
- package/src/components/Layouts/SectionHeader.vue +136 -0
- package/src/components/Layouts/index.js +13 -0
- package/src/components/ColumnLayout/index.js +0 -7
- package/src/components/PageHeading/index.js +0 -5
- package/src/components/SectionHeading/SectionHeading.vue +0 -18
- package/src/components/SectionHeading/index.js +0 -5
- /package/src/components/{ColumnLayout → Layouts}/SingleColumnLayout.vue +0 -0
- /package/src/components/{ColumnLayout → Layouts}/TwoColumnLayout.vue +0 -0
package/index.js
CHANGED
|
@@ -11,13 +11,13 @@ export * from './src/components/Button'
|
|
|
11
11
|
export * from './src/components/ButtonGroup'
|
|
12
12
|
export * from './src/components/Card'
|
|
13
13
|
export * from './src/components/CardGroup'
|
|
14
|
-
export * from './src/components/ColumnLayout'
|
|
15
14
|
export * from './src/components/DropdownMenu'
|
|
16
15
|
export * from './src/components/Empty'
|
|
17
16
|
export * from './src/components/Form'
|
|
18
17
|
export * from './src/components/FormField'
|
|
19
18
|
export * from './src/components/HTML'
|
|
20
19
|
export * from './src/components/Image'
|
|
20
|
+
export * from './src/components/Layouts'
|
|
21
21
|
export * from './src/components/Link'
|
|
22
22
|
export * from './src/components/LinkedList'
|
|
23
23
|
export * from './src/components/List'
|
|
@@ -26,10 +26,8 @@ export * from './src/components/Logo'
|
|
|
26
26
|
export * from './src/components/MessageBox'
|
|
27
27
|
export * from './src/components/MetaInfo'
|
|
28
28
|
export * from './src/components/Modal'
|
|
29
|
-
export * from './src/components/PageHeading'
|
|
30
29
|
export * from './src/components/Pagination'
|
|
31
30
|
export * from './src/components/Progress'
|
|
32
|
-
export * from './src/components/SectionHeading'
|
|
33
31
|
export * from './src/components/Social'
|
|
34
32
|
export * from './src/components/Sorting'
|
|
35
33
|
export * from './src/components/Switcher'
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redseed/redseed-ui-vue3",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "RedSeed UI Vue 3 components",
|
|
5
5
|
"main": "index.js",
|
|
6
|
+
"repository": "https://github.com/redseedtraining/redseed-ui",
|
|
6
7
|
"scripts": {
|
|
7
8
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
9
|
},
|
|
@@ -9,15 +9,15 @@ import ButtonSlot from './ButtonSlot.vue'
|
|
|
9
9
|
<style lang="scss" scoped>
|
|
10
10
|
.rsui-button-tertiary {
|
|
11
11
|
// default colors
|
|
12
|
-
@apply text-rsui-grey-700 bg-white border-
|
|
12
|
+
@apply text-rsui-grey-700 bg-white border-transparent;
|
|
13
13
|
// default hover state
|
|
14
|
-
@apply hover:text-rsui-grey-900 hover:bg-rsui-grey-200 hover:border-
|
|
14
|
+
@apply hover:text-rsui-grey-900 hover:bg-rsui-grey-200 hover:border-transparent;
|
|
15
15
|
// default focus state
|
|
16
|
-
@apply focus-visible:ring-rsui-grey-400 focus-visible:border-
|
|
16
|
+
@apply focus-visible:ring-rsui-grey-400 focus-visible:border-transparent;
|
|
17
17
|
// default active state
|
|
18
|
-
@apply active:bg-white active:border-
|
|
18
|
+
@apply active:bg-white active:border-transparent;
|
|
19
19
|
// default disabled state
|
|
20
|
-
@apply disabled:bg-white disabled:border-
|
|
21
|
-
@apply disabled:active:bg-white disabled:active:border-
|
|
20
|
+
@apply disabled:bg-white disabled:border-transparent disabled:text-rsui-grey-400;
|
|
21
|
+
@apply disabled:active:bg-white disabled:active:border-transparent;
|
|
22
22
|
}
|
|
23
23
|
</style>
|
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { ref
|
|
2
|
+
import { ref } from 'vue'
|
|
3
3
|
import Modal from '../Modal/Modal.vue'
|
|
4
4
|
import ButtonTertiary from '../Button/ButtonTertiary.vue'
|
|
5
5
|
|
|
6
6
|
const showMetaModal = ref(false)
|
|
7
7
|
</script>
|
|
8
8
|
<template>
|
|
9
|
-
<div class="rsui-page-
|
|
10
|
-
<div class="rsui-page-
|
|
11
|
-
<div v-if="$slots.title" class="rsui-page-
|
|
12
|
-
<div v-if="$slots.avatar" class="rsui-page-
|
|
9
|
+
<div class="rsui-page-header">
|
|
10
|
+
<div class="rsui-page-header__top">
|
|
11
|
+
<div v-if="$slots.title" class="rsui-page-header__title">
|
|
12
|
+
<div v-if="$slots.avatar" class="rsui-page-header__avatar">
|
|
13
13
|
<slot name="avatar"></slot>
|
|
14
14
|
</div>
|
|
15
|
-
<div class="rsui-page-
|
|
15
|
+
<div class="rsui-page-header__title-text">
|
|
16
16
|
<h1>
|
|
17
17
|
<slot name="title"></slot>
|
|
18
18
|
</h1>
|
|
19
|
-
<div v-if="$slots.subtitle" class="rsui-page-
|
|
19
|
+
<div v-if="$slots.subtitle" class="rsui-page-header__subtitle">
|
|
20
20
|
<slot name="subtitle"></slot>
|
|
21
21
|
</div>
|
|
22
22
|
</div>
|
|
23
23
|
</div>
|
|
24
24
|
|
|
25
|
-
<div v-if="$slots.status || $slots.actions" class="rsui-page-
|
|
26
|
-
<div v-if="$slots.status" class="rsui-page-
|
|
25
|
+
<div v-if="$slots.status || $slots.actions" class="rsui-page-header__status-actions">
|
|
26
|
+
<div v-if="$slots.status" class="rsui-page-header__status">
|
|
27
27
|
<slot name="status"></slot>
|
|
28
28
|
</div>
|
|
29
29
|
|
|
30
|
-
<div class="rsui-page-
|
|
31
|
-
<div v-if="$slots['meta-action-label'] && $slots['meta']" class="rsui-page-
|
|
30
|
+
<div class="rsui-page-header__actions">
|
|
31
|
+
<div v-if="$slots['meta-action-label'] && $slots['meta']" class="rsui-page-header__meta-action">
|
|
32
32
|
<ButtonTertiary @click="showMetaModal = true">
|
|
33
33
|
<slot name="meta-action-label"></slot>
|
|
34
34
|
</ButtonTertiary>
|
|
35
35
|
|
|
36
|
-
<Modal sm v-if="$slots['meta']" class="rsui-page-
|
|
36
|
+
<Modal sm v-if="$slots['meta']" class="rsui-page-header__meta-modal" :show="showMetaModal"
|
|
37
37
|
@close="showMetaModal = false">
|
|
38
38
|
<template #header v-if="$slots['meta-modal-header']">
|
|
39
39
|
<slot name="meta-modal-header"></slot>
|
|
40
40
|
</template>
|
|
41
41
|
|
|
42
|
-
<div v-if="$slots.meta" class="rsui-page-
|
|
42
|
+
<div v-if="$slots.meta" class="rsui-page-header__meta-modal__body">
|
|
43
43
|
<slot name="meta"></slot>
|
|
44
44
|
</div>
|
|
45
45
|
|
|
@@ -59,18 +59,18 @@ const showMetaModal = ref(false)
|
|
|
59
59
|
</div>
|
|
60
60
|
</div>
|
|
61
61
|
|
|
62
|
-
<div v-if="$slots.search" class="rsui-page-
|
|
62
|
+
<div v-if="$slots.search" class="rsui-page-header__search">
|
|
63
63
|
<slot name="search"></slot>
|
|
64
64
|
</div>
|
|
65
65
|
</div>
|
|
66
66
|
|
|
67
|
-
<div v-if="$slots['meta']" class="rsui-page-
|
|
67
|
+
<div v-if="$slots['meta']" class="rsui-page-header__meta">
|
|
68
68
|
<slot name="meta"></slot>
|
|
69
69
|
</div>
|
|
70
70
|
</div>
|
|
71
71
|
</template>
|
|
72
72
|
<style lang="scss" scoped>
|
|
73
|
-
.rsui-page-
|
|
73
|
+
.rsui-page-header {
|
|
74
74
|
@apply w-full flex justify-between space-y-4;
|
|
75
75
|
@apply lg:flex-col;
|
|
76
76
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
defineProps({
|
|
3
|
+
showContent: {
|
|
4
|
+
type: Boolean,
|
|
5
|
+
default: true,
|
|
6
|
+
},
|
|
7
|
+
})
|
|
8
|
+
</script>
|
|
9
|
+
<template>
|
|
10
|
+
<div class="rsui-section-footer">
|
|
11
|
+
<div class="rsui-section-footer__content-start"
|
|
12
|
+
v-if="showContent && $slots.content"
|
|
13
|
+
>
|
|
14
|
+
<slot name="content"></slot>
|
|
15
|
+
</div>
|
|
16
|
+
<div :class="[
|
|
17
|
+
'rsui-section-footer__content-end',
|
|
18
|
+
{
|
|
19
|
+
'rsui-section-footer__content-end--full': !showContent || !$slots.content,
|
|
20
|
+
}
|
|
21
|
+
]">
|
|
22
|
+
<slot></slot>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
<style lang="scss" scoped>
|
|
27
|
+
.rsui-section-footer {
|
|
28
|
+
@apply flex flex-col gap-3 overflow-hidden;
|
|
29
|
+
@apply md:flex-row md:justify-between md:items-center;
|
|
30
|
+
@apply border-t border-rsui-grey-400 py-5;
|
|
31
|
+
|
|
32
|
+
&__content-start {
|
|
33
|
+
@apply flex-1 flex flex-wrap items-center gap-3;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&__content-end {
|
|
37
|
+
@apply flex flex-wrap md:justify-end items-center gap-3;
|
|
38
|
+
|
|
39
|
+
&--full {
|
|
40
|
+
@apply flex-1;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
</style>
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
import ButtonTertiary from '../Button/ButtonTertiary.vue'
|
|
4
|
+
import DropdownMenu from '../DropdownMenu/DropdownMenu.vue'
|
|
5
|
+
import { useResponsiveWidth } from '../../helpers/ResponsiveWidth'
|
|
6
|
+
import { EllipsisVerticalIcon } from '@heroicons/vue/24/outline'
|
|
7
|
+
|
|
8
|
+
defineProps({
|
|
9
|
+
showSubtitle: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: true,
|
|
12
|
+
},
|
|
13
|
+
showActions: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: true,
|
|
16
|
+
},
|
|
17
|
+
showDropdown: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: true,
|
|
20
|
+
},
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
const sectionHeaderElement = ref(null)
|
|
24
|
+
|
|
25
|
+
const { responsiveWidth } = useResponsiveWidth(sectionHeaderElement, 768)
|
|
26
|
+
</script>
|
|
27
|
+
<template>
|
|
28
|
+
<div ref="sectionHeaderElement"
|
|
29
|
+
class="rsui-section-header"
|
|
30
|
+
>
|
|
31
|
+
<div class="rsui-section-header__header">
|
|
32
|
+
|
|
33
|
+
<!-- Icon slot, optional -->
|
|
34
|
+
<div class="rsui-section-header__icon"
|
|
35
|
+
v-if="$slots.icon"
|
|
36
|
+
>
|
|
37
|
+
<slot name="icon"></slot>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<div class="rsui-section-header__text">
|
|
41
|
+
|
|
42
|
+
<!-- Title slot, default slot -->
|
|
43
|
+
<div class="rsui-section-header__title"
|
|
44
|
+
:title="$slots.default()[0].children"
|
|
45
|
+
>
|
|
46
|
+
<slot></slot>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<!-- Subtitle slot, optional -->
|
|
50
|
+
<div class="rsui-section-header__subtitle"
|
|
51
|
+
v-if="showSubtitle && $slots.subtitle"
|
|
52
|
+
:title="$slots.subtitle()[0].children"
|
|
53
|
+
>
|
|
54
|
+
<slot name="subtitle"></slot>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<!-- Actions slot, optional -->
|
|
59
|
+
<div class="rsui-section-header__toolbar"
|
|
60
|
+
v-if="showActions"
|
|
61
|
+
>
|
|
62
|
+
<div class="rsui-section-header__actions-desktop"
|
|
63
|
+
v-if="responsiveWidth.specific"
|
|
64
|
+
>
|
|
65
|
+
<slot name="actions"></slot>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<!-- Dropdown menu slot, optional -->
|
|
69
|
+
<DropdownMenu right
|
|
70
|
+
v-if="showDropdown
|
|
71
|
+
&& $slots['dropdown-options']
|
|
72
|
+
&& $slots['dropdown-options']().length
|
|
73
|
+
"
|
|
74
|
+
>
|
|
75
|
+
<template #trigger="{ open }">
|
|
76
|
+
<ButtonTertiary @click="open">
|
|
77
|
+
<EllipsisVerticalIcon class="rsui-section-header__dropdown-icon" />
|
|
78
|
+
</ButtonTertiary>
|
|
79
|
+
</template>
|
|
80
|
+
|
|
81
|
+
<slot name="dropdown-options"></slot>
|
|
82
|
+
</DropdownMenu>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
<div class="rsui-section-header__actions-mobile"
|
|
87
|
+
v-if="!responsiveWidth.specific"
|
|
88
|
+
>
|
|
89
|
+
<slot name="actions"></slot>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
</template>
|
|
93
|
+
<style lang="scss" scoped>
|
|
94
|
+
.rsui-section-header {
|
|
95
|
+
@apply flex flex-col gap-x-3 gap-y-5;
|
|
96
|
+
@apply md:flex-row md:justify-between md:items-center;
|
|
97
|
+
@apply border-b border-rsui-grey-400 pb-5;
|
|
98
|
+
|
|
99
|
+
&__header {
|
|
100
|
+
@apply flex-1 flex justify-between md:items-center gap-x-3;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&__icon {
|
|
104
|
+
@apply size-12 rounded-full overflow-hidden flex items-center justify-center bg-rsui-grey-50;
|
|
105
|
+
@apply mt-2.5 md:mt-0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&__text {
|
|
109
|
+
@apply flex-1 flex flex-col gap-y-0.5 pt-2 md:pt-0;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&__title {
|
|
113
|
+
@apply text-lg leading-7 font-semibold text-rsui-grey-900 line-clamp-2 md:line-clamp-1;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&__subtitle {
|
|
117
|
+
@apply text-sm leading-5 text-rsui-grey-700 line-clamp-3 md:line-clamp-1;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&__toolbar {
|
|
121
|
+
@apply flex gap-3 md:items-center justify-end;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&__actions-desktop {
|
|
125
|
+
@apply hidden md:flex gap-3 items-center;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&__actions-mobile {
|
|
129
|
+
@apply flex flex-wrap md:hidden gap-3 items-center;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&__dropdown-icon {
|
|
133
|
+
@apply size-5 text-rsui-grey-400;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
</style>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import PageHeader from './PageHeader.vue'
|
|
2
|
+
import SectionFooter from './SectionFooter.vue'
|
|
3
|
+
import SectionHeader from './SectionHeader.vue'
|
|
4
|
+
import SingleColumnLayout from './SingleColumnLayout.vue'
|
|
5
|
+
import TwoColumnLayout from './TwoColumnLayout.vue'
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
PageHeader,
|
|
9
|
+
SectionFooter,
|
|
10
|
+
SectionHeader,
|
|
11
|
+
SingleColumnLayout,
|
|
12
|
+
TwoColumnLayout,
|
|
13
|
+
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
</script>
|
|
3
|
-
<template>
|
|
4
|
-
<div class="rsui-section-heading">
|
|
5
|
-
<span class="rsui-section-heading__text">
|
|
6
|
-
<slot></slot>
|
|
7
|
-
</span>
|
|
8
|
-
<div class="rsui-section-heading__actions">
|
|
9
|
-
<slot name="actions"></slot>
|
|
10
|
-
</div>
|
|
11
|
-
|
|
12
|
-
</div>
|
|
13
|
-
</template>
|
|
14
|
-
<style lang="scss">
|
|
15
|
-
.rsui-section-heading {
|
|
16
|
-
@apply text-lg flex justify-between items-center font-semibold text-rsui-grey-900;
|
|
17
|
-
}
|
|
18
|
-
</style>
|
|
File without changes
|
|
File without changes
|