@redseed/redseed-ui-vue3 8.9.4 → 8.10.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/package.json
CHANGED
|
@@ -6,6 +6,62 @@ const props = defineProps({
|
|
|
6
6
|
type: Number,
|
|
7
7
|
default: null,
|
|
8
8
|
},
|
|
9
|
+
xs: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false,
|
|
12
|
+
},
|
|
13
|
+
sm: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: false,
|
|
16
|
+
},
|
|
17
|
+
primary: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false,
|
|
20
|
+
},
|
|
21
|
+
secondary: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: false,
|
|
24
|
+
},
|
|
25
|
+
tertiary: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false,
|
|
28
|
+
},
|
|
29
|
+
quaternary: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false,
|
|
32
|
+
},
|
|
33
|
+
disabled: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: false,
|
|
36
|
+
},
|
|
37
|
+
brand: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: false,
|
|
40
|
+
},
|
|
41
|
+
success: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: false,
|
|
44
|
+
},
|
|
45
|
+
warning: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: false,
|
|
48
|
+
},
|
|
49
|
+
error: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: false,
|
|
52
|
+
},
|
|
53
|
+
info: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: false,
|
|
56
|
+
},
|
|
57
|
+
ai: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: false,
|
|
60
|
+
},
|
|
61
|
+
onColor: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: false,
|
|
64
|
+
},
|
|
9
65
|
})
|
|
10
66
|
|
|
11
67
|
const clampClasses = {
|
|
@@ -17,10 +73,36 @@ const clampClasses = {
|
|
|
17
73
|
6: 'rsui-body-text--line-clamp-6',
|
|
18
74
|
}
|
|
19
75
|
|
|
76
|
+
const colorClasses = {
|
|
77
|
+
secondary: 'rsui-body-text--secondary',
|
|
78
|
+
tertiary: 'rsui-body-text--tertiary',
|
|
79
|
+
quaternary: 'rsui-body-text--quaternary',
|
|
80
|
+
disabled: 'rsui-body-text--disabled',
|
|
81
|
+
brand: 'rsui-body-text--brand',
|
|
82
|
+
success: 'rsui-body-text--success',
|
|
83
|
+
warning: 'rsui-body-text--warning',
|
|
84
|
+
error: 'rsui-body-text--error',
|
|
85
|
+
info: 'rsui-body-text--info',
|
|
86
|
+
ai: 'rsui-body-text--ai',
|
|
87
|
+
onColor: 'rsui-body-text--on-color',
|
|
88
|
+
}
|
|
89
|
+
|
|
20
90
|
const clampClass = computed(() => clampClasses[props.lines] || null)
|
|
91
|
+
|
|
92
|
+
const sizeClass = computed(() => {
|
|
93
|
+
if (props.xs) return 'rsui-body-text--xs'
|
|
94
|
+
if (props.sm) return 'rsui-body-text--sm'
|
|
95
|
+
return null
|
|
96
|
+
})
|
|
97
|
+
|
|
98
|
+
const colorClass = computed(() =>
|
|
99
|
+
Object.keys(colorClasses).find((key) => props[key])
|
|
100
|
+
? colorClasses[Object.keys(colorClasses).find((key) => props[key])]
|
|
101
|
+
: null
|
|
102
|
+
)
|
|
21
103
|
</script>
|
|
22
104
|
<template>
|
|
23
|
-
<div :class="['rsui-body-text', clampClass]">
|
|
105
|
+
<div :class="['rsui-body-text', sizeClass, colorClass, clampClass]">
|
|
24
106
|
<slot></slot>
|
|
25
107
|
</div>
|
|
26
108
|
</template>
|
|
@@ -7,6 +7,14 @@ const props = defineProps({
|
|
|
7
7
|
default: 'primary',
|
|
8
8
|
validator: (value) => ['primary', 'secondary', 'brand', 'success', 'info', 'warning', 'error', 'ai'].includes(value)
|
|
9
9
|
},
|
|
10
|
+
bordered: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: true,
|
|
13
|
+
},
|
|
14
|
+
padded: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: true,
|
|
17
|
+
},
|
|
10
18
|
showGap: {
|
|
11
19
|
type: Boolean,
|
|
12
20
|
default: true,
|
|
@@ -30,6 +38,8 @@ watch(() => props.showGap, () => {
|
|
|
30
38
|
const variantClass = computed(() => [
|
|
31
39
|
'rsui-section',
|
|
32
40
|
{
|
|
41
|
+
'rsui-section--bordered': props.bordered,
|
|
42
|
+
'rsui-section--padded': props.padded,
|
|
33
43
|
'rsui-section--show-gap': showGapDelayed.value,
|
|
34
44
|
'rsui-section--primary': props.variant === 'primary',
|
|
35
45
|
'rsui-section--secondary': props.variant === 'secondary',
|