@redseed/redseed-ui-vue3 2.10.1 → 2.10.3
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 +1 -1
- package/src/components/Badge/Badge.vue +87 -0
- package/src/components/Badge/BadgeDanger.vue +10 -0
- package/src/components/Badge/BadgeInfo.vue +10 -0
- package/src/components/Badge/BadgeNeutral.vue +10 -0
- package/src/components/Badge/BadgeSuccess.vue +3 -6
- package/src/components/Badge/BadgeWarning.vue +10 -0
- package/src/components/Badge/index.js +10 -2
- package/src/components/CardGroup/CardGroup.vue +1 -1
- package/src/components/Empty/Empty.vue +1 -1
- package/src/components/List/ListControl.vue +1 -1
- package/src/components/List/ListItem.vue +1 -1
- package/src/components/Badge/BadgeSlot.vue +0 -51
package/package.json
CHANGED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
sm: {
|
|
6
|
+
type: Boolean,
|
|
7
|
+
default: false,
|
|
8
|
+
},
|
|
9
|
+
md: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false,
|
|
12
|
+
},
|
|
13
|
+
neutral: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: false,
|
|
16
|
+
},
|
|
17
|
+
info: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false,
|
|
20
|
+
},
|
|
21
|
+
success: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: false,
|
|
24
|
+
},
|
|
25
|
+
warning: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false,
|
|
28
|
+
},
|
|
29
|
+
danger: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false,
|
|
32
|
+
},
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
const defaultSize = computed(() => !props.sm && !props.md)
|
|
36
|
+
|
|
37
|
+
const badgeClass = computed(() => [
|
|
38
|
+
'rsui-badge',
|
|
39
|
+
{
|
|
40
|
+
'rsui-badge--sm': props.sm || defaultSize.value,
|
|
41
|
+
'rsui-badge--md': props.md,
|
|
42
|
+
'rsui-badge--neutral': props.neutral,
|
|
43
|
+
'rsui-badge--info': props.info,
|
|
44
|
+
'rsui-badge--success': props.success,
|
|
45
|
+
'rsui-badge--warning': props.warning,
|
|
46
|
+
'rsui-badge--danger': props.danger,
|
|
47
|
+
},
|
|
48
|
+
])
|
|
49
|
+
|
|
50
|
+
</script>
|
|
51
|
+
<template>
|
|
52
|
+
<div :class="badgeClass">
|
|
53
|
+
<slot></slot>
|
|
54
|
+
</div>
|
|
55
|
+
</template>
|
|
56
|
+
<style lang="scss" scoped>
|
|
57
|
+
.rsui-badge {
|
|
58
|
+
@apply inline-flex items-center justify-center gap-x-1;
|
|
59
|
+
@apply w-fit h-fit rounded-full;
|
|
60
|
+
@apply text-xs font-semibold leading-3;
|
|
61
|
+
&--sm {
|
|
62
|
+
@apply px-2 py-1;
|
|
63
|
+
}
|
|
64
|
+
&--md {
|
|
65
|
+
@apply px-2 py-2;
|
|
66
|
+
}
|
|
67
|
+
&--neutral {
|
|
68
|
+
@apply text-rsui-default bg-rsui-grey-200;
|
|
69
|
+
}
|
|
70
|
+
&--info {
|
|
71
|
+
@apply text-info-content bg-info;
|
|
72
|
+
}
|
|
73
|
+
&--success {
|
|
74
|
+
@apply text-success-content bg-success;
|
|
75
|
+
}
|
|
76
|
+
&--warning {
|
|
77
|
+
@apply text-warning-content bg-warning;
|
|
78
|
+
}
|
|
79
|
+
&--danger {
|
|
80
|
+
@apply text-danger-content bg-danger;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:deep(svg) {
|
|
84
|
+
@apply size-3;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
</style>
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import
|
|
2
|
+
import Badge from './Badge.vue'
|
|
3
3
|
</script>
|
|
4
4
|
<template>
|
|
5
|
-
<
|
|
5
|
+
<Badge success>
|
|
6
6
|
<slot></slot>
|
|
7
|
-
</
|
|
7
|
+
</Badge>
|
|
8
8
|
</template>
|
|
9
9
|
<style lang="scss" scoped>
|
|
10
|
-
.rsui-badge-success {
|
|
11
|
-
@apply text-white bg-success;
|
|
12
|
-
}
|
|
13
10
|
</style>
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Badge from './Badge.vue'
|
|
2
|
+
import BadgeDanger from './BadgeDanger.vue'
|
|
3
|
+
import BadgeInfo from './BadgeInfo.vue'
|
|
4
|
+
import BadgeNeutral from './BadgeNeutral.vue'
|
|
2
5
|
import BadgeSuccess from './BadgeSuccess.vue'
|
|
6
|
+
import BadgeWarning from './BadgeWarning.vue'
|
|
3
7
|
|
|
4
8
|
export {
|
|
5
|
-
|
|
9
|
+
Badge,
|
|
10
|
+
BadgeDanger,
|
|
11
|
+
BadgeInfo,
|
|
12
|
+
BadgeNeutral,
|
|
6
13
|
BadgeSuccess,
|
|
14
|
+
BadgeWarning,
|
|
7
15
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ref, computed } from 'vue'
|
|
3
3
|
import Empty from '../Empty/Empty.vue'
|
|
4
4
|
import Pagination from '../Pagination/Pagination.vue'
|
|
5
|
-
import { useResponsiveWidth } from '../../helpers/
|
|
5
|
+
import { useResponsiveWidth } from '../../helpers/ResponsiveWidth'
|
|
6
6
|
|
|
7
7
|
const props = defineProps({
|
|
8
8
|
controlApplied: {
|
|
@@ -5,7 +5,7 @@ import ButtonSecondary from '../Button/ButtonSecondary.vue'
|
|
|
5
5
|
import ButtonTertiary from '../Button/ButtonTertiary.vue'
|
|
6
6
|
import BodyText from '../BodyText/BodyText.vue'
|
|
7
7
|
import { ExclamationCircleIcon } from '@heroicons/vue/24/outline'
|
|
8
|
-
import { useResponsiveWidth } from '../../helpers/
|
|
8
|
+
import { useResponsiveWidth } from '../../helpers/ResponsiveWidth'
|
|
9
9
|
|
|
10
10
|
const emit = defineEmits(['clickPrimaryAction', 'clickSecondaryAction', 'clickTertiaryAction'])
|
|
11
11
|
|
|
@@ -4,7 +4,7 @@ import FormFieldSearch from '../FormField/FormFieldSearch.vue'
|
|
|
4
4
|
import FormFieldSelect from '../FormField/FormFieldSelect.vue'
|
|
5
5
|
import Sorting from '../Sorting/Sorting.vue'
|
|
6
6
|
import Pagination from '../Pagination/Pagination.vue'
|
|
7
|
-
import { useResponsiveWidth } from '../../helpers/
|
|
7
|
+
import { useResponsiveWidth } from '../../helpers/ResponsiveWidth'
|
|
8
8
|
|
|
9
9
|
const props = defineProps({
|
|
10
10
|
searchable: {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ref, computed, useSlots } from 'vue'
|
|
3
3
|
import { UserIcon } from '@heroicons/vue/24/solid'
|
|
4
4
|
import ButtonTertiary from '../Button/ButtonTertiary.vue'
|
|
5
|
-
import { useResponsiveWidth } from '../../helpers/
|
|
5
|
+
import { useResponsiveWidth } from '../../helpers/ResponsiveWidth'
|
|
6
6
|
|
|
7
7
|
const props = defineProps({
|
|
8
8
|
avatar: {
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props = defineProps({
|
|
5
|
-
sm: {
|
|
6
|
-
type: Boolean,
|
|
7
|
-
default: false,
|
|
8
|
-
},
|
|
9
|
-
md: {
|
|
10
|
-
type: Boolean,
|
|
11
|
-
default: false,
|
|
12
|
-
},
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
const defaultSize = computed(() => !props.sm && !props.md)
|
|
16
|
-
|
|
17
|
-
const badgeClass = computed(() => [
|
|
18
|
-
'rsui-badge',
|
|
19
|
-
{
|
|
20
|
-
'rsui-badge--sm': props.sm || defaultSize.value,
|
|
21
|
-
'rsui-badge--md': props.md,
|
|
22
|
-
},
|
|
23
|
-
])
|
|
24
|
-
|
|
25
|
-
</script>
|
|
26
|
-
<template>
|
|
27
|
-
<div :class="badgeClass">
|
|
28
|
-
<slot></slot>
|
|
29
|
-
</div>
|
|
30
|
-
</template>
|
|
31
|
-
<style lang="scss" scoped>
|
|
32
|
-
.rsui-badge {
|
|
33
|
-
@apply inline-flex items-center justify-center gap-x-1;
|
|
34
|
-
@apply w-fit h-fit rounded-full;
|
|
35
|
-
@apply text-xs font-semibold leading-3;
|
|
36
|
-
@apply text-white bg-black;
|
|
37
|
-
&--sm {
|
|
38
|
-
@apply px-2 py-1;
|
|
39
|
-
}
|
|
40
|
-
&--md {
|
|
41
|
-
@apply px-2 py-2;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
</style>
|
|
45
|
-
<style lang="scss">
|
|
46
|
-
.rsui-badge {
|
|
47
|
-
svg {
|
|
48
|
-
@apply w-3 h-3;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
</style>
|