@redseed/redseed-ui-vue3 6.3.2 → 6.3.7
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/docs/02-button-components.md +0 -18
- package/package.json +1 -1
- package/src/components/Button/ButtonSlot.vue +2 -5
- package/src/components/Button/index.js +0 -4
- package/src/components/Card/Card.vue +1 -1
- package/src/components/Card/CardHeader.vue +5 -5
- package/src/components/FormField/FormFieldCombobox.vue +17 -6
- package/src/components/Layouts/PageHeader.vue +2 -2
- package/src/components/Layouts/SectionHeader.vue +3 -3
- package/src/components/MetaInfo/MetaInfo.vue +3 -3
- package/src/components/Section/Section.vue +19 -8
- package/src/components/Button/ButtonSecondaryBrand.vue +0 -23
- package/src/components/Button/ButtonSecondaryBrandFull.vue +0 -10
|
@@ -40,24 +40,6 @@ Button components provide interactive elements for user actions. They come in va
|
|
|
40
40
|
</template>
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
### ButtonSecondaryBrand
|
|
44
|
-
**When to use:** For brand-specific secondary actions that need to stand out while still being secondary to the primary action.
|
|
45
|
-
**Implementation:**
|
|
46
|
-
```vue
|
|
47
|
-
<template>
|
|
48
|
-
<ButtonSecondaryBrand @click="handleBrandAction">Brand Action</ButtonSecondaryBrand>
|
|
49
|
-
</template>
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### ButtonSecondaryBrandFull
|
|
53
|
-
**When to use:** Same as ButtonSecondaryBrand but spans the full width of its container.
|
|
54
|
-
**Implementation:**
|
|
55
|
-
```vue
|
|
56
|
-
<template>
|
|
57
|
-
<ButtonSecondaryBrandFull @click="handleBrandAction">Brand Action</ButtonSecondaryBrandFull>
|
|
58
|
-
</template>
|
|
59
|
-
```
|
|
60
|
-
|
|
61
43
|
### ButtonTertiary
|
|
62
44
|
**When to use:** For less prominent actions, such as "Learn More", "View Details", or utility actions.
|
|
63
45
|
**Implementation:**
|
package/package.json
CHANGED
|
@@ -94,7 +94,7 @@ const buttonSlotClass = computed(() => [
|
|
|
94
94
|
// default control
|
|
95
95
|
@apply w-fit h-fit inline-flex shrink-0 items-center justify-center select-none outline-none whitespace-nowrap will-change-transform;
|
|
96
96
|
// default shape
|
|
97
|
-
@apply
|
|
97
|
+
@apply border rounded-lg transition gap-1.5;
|
|
98
98
|
// default font
|
|
99
99
|
@apply font-semibold text-sm;
|
|
100
100
|
// default colors
|
|
@@ -121,10 +121,7 @@ const buttonSlotClass = computed(() => [
|
|
|
121
121
|
|
|
122
122
|
// modifier sm size
|
|
123
123
|
&--sm {
|
|
124
|
-
@apply text-sm px-
|
|
125
|
-
&-icon {
|
|
126
|
-
@apply p-2;
|
|
127
|
-
}
|
|
124
|
+
@apply text-sm px-spacing-lg py-spacing-md gap-spacing-xs;
|
|
128
125
|
}
|
|
129
126
|
|
|
130
127
|
// modifier md size
|
|
@@ -2,8 +2,6 @@ import ButtonPrimary from './ButtonPrimary.vue'
|
|
|
2
2
|
import ButtonPrimaryFull from './ButtonPrimaryFull.vue'
|
|
3
3
|
import ButtonSecondary from './ButtonSecondary.vue'
|
|
4
4
|
import ButtonSecondaryFull from './ButtonSecondaryFull.vue'
|
|
5
|
-
import ButtonSecondaryBrand from './ButtonSecondaryBrand.vue'
|
|
6
|
-
import ButtonSecondaryBrandFull from './ButtonSecondaryBrandFull.vue'
|
|
7
5
|
import ButtonTertiary from './ButtonTertiary.vue'
|
|
8
6
|
import ButtonTertiaryFull from './ButtonTertiaryFull.vue'
|
|
9
7
|
|
|
@@ -12,8 +10,6 @@ export {
|
|
|
12
10
|
ButtonPrimaryFull,
|
|
13
11
|
ButtonSecondary,
|
|
14
12
|
ButtonSecondaryFull,
|
|
15
|
-
ButtonSecondaryBrand,
|
|
16
|
-
ButtonSecondaryBrandFull,
|
|
17
13
|
ButtonTertiary,
|
|
18
14
|
ButtonTertiaryFull,
|
|
19
15
|
}
|
|
@@ -77,7 +77,7 @@ function onClick() {
|
|
|
77
77
|
.rsui-card {
|
|
78
78
|
@apply relative flex flex-col;
|
|
79
79
|
@apply transition duration-200;
|
|
80
|
-
@apply rounded-xl bg-
|
|
80
|
+
@apply rounded-xl bg-background-primary border border-border-primary;
|
|
81
81
|
|
|
82
82
|
&--hoverable {
|
|
83
83
|
@apply hover:shadow-md;
|
|
@@ -146,7 +146,7 @@ function handleMoreActionsClick() {
|
|
|
146
146
|
@apply border-b border-transparent;
|
|
147
147
|
|
|
148
148
|
&--divider {
|
|
149
|
-
@apply border-
|
|
149
|
+
@apply border-border-primary;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
&__header {
|
|
@@ -158,7 +158,7 @@ function handleMoreActionsClick() {
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
&__avatar {
|
|
161
|
-
@apply size-14 rounded-full overflow-hidden flex items-center justify-center bg-
|
|
161
|
+
@apply size-14 rounded-full overflow-hidden flex items-center justify-center bg-background-secondary;
|
|
162
162
|
@apply mt-2.5 md:mt-0;
|
|
163
163
|
}
|
|
164
164
|
|
|
@@ -172,7 +172,7 @@ function handleMoreActionsClick() {
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
&__title {
|
|
175
|
-
@apply text-lg leading-7 font-semibold text-
|
|
175
|
+
@apply text-lg leading-7 font-semibold text-text-primary;
|
|
176
176
|
|
|
177
177
|
&--single-line {
|
|
178
178
|
@apply line-clamp-2 md:line-clamp-1;
|
|
@@ -180,7 +180,7 @@ function handleMoreActionsClick() {
|
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
&__subtitle {
|
|
183
|
-
@apply text-sm leading-5 text-
|
|
183
|
+
@apply text-sm leading-5 text-text-secondary;
|
|
184
184
|
|
|
185
185
|
&--single-line {
|
|
186
186
|
@apply line-clamp-3 md:line-clamp-1;
|
|
@@ -200,7 +200,7 @@ function handleMoreActionsClick() {
|
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
&__more-actions-icon {
|
|
203
|
-
@apply size-5 text-
|
|
203
|
+
@apply size-5 text-text-secondary;
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
</style>
|
|
@@ -101,11 +101,15 @@ const dropdownContent = computed(() => {
|
|
|
101
101
|
|
|
102
102
|
// Get display text for the input
|
|
103
103
|
const displayText = computed(() => {
|
|
104
|
-
if
|
|
105
|
-
|
|
106
|
-
// When closed, show the label of the selected option or the model value
|
|
104
|
+
// Always show the selected option label if there is one, regardless of dropdown state
|
|
107
105
|
const selectedOption = props.options.find(option => option.value === model.value)
|
|
108
|
-
|
|
106
|
+
if (selectedOption) {
|
|
107
|
+
return selectedOption.label
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// If no option is selected, show search text when open or model value when closed
|
|
111
|
+
if (isOpen.value) return searchText.value
|
|
112
|
+
return model.value
|
|
109
113
|
})
|
|
110
114
|
|
|
111
115
|
function toggleDropdown() {
|
|
@@ -140,8 +144,15 @@ function close() {
|
|
|
140
144
|
}
|
|
141
145
|
|
|
142
146
|
function choose(option) {
|
|
143
|
-
|
|
144
|
-
|
|
147
|
+
// If clicking on the currently selected option, deselect it
|
|
148
|
+
if (option.value === model.value) {
|
|
149
|
+
model.value = ''
|
|
150
|
+
emit('change', '')
|
|
151
|
+
} else {
|
|
152
|
+
// Otherwise, select the new option
|
|
153
|
+
model.value = option.value
|
|
154
|
+
emit('change', option.value)
|
|
155
|
+
}
|
|
145
156
|
close()
|
|
146
157
|
}
|
|
147
158
|
|
|
@@ -83,13 +83,13 @@ const showMetaModal = ref(false)
|
|
|
83
83
|
@apply pr-2 flex flex-row items-center space-x-6;
|
|
84
84
|
|
|
85
85
|
h1 {
|
|
86
|
-
@apply text-3xl font-semibold text-
|
|
86
|
+
@apply text-3xl font-semibold text-text-primary;
|
|
87
87
|
@apply lg:mr-4;
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
&__subtitle {
|
|
92
|
-
@apply text-base text-
|
|
92
|
+
@apply text-base text-text-secondary leading-relaxed;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
&__status-actions {
|
|
@@ -128,11 +128,11 @@ function handleMoreActionsClick() {
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
&__title {
|
|
131
|
-
@apply text-lg leading-7 font-semibold line-clamp-2 md:line-clamp-1;
|
|
131
|
+
@apply text-lg leading-7 font-semibold line-clamp-2 md:line-clamp-1 text-text-primary;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
&__subtitle {
|
|
135
|
-
@apply text-sm leading-5 line-clamp-3 md:line-clamp-1;
|
|
135
|
+
@apply text-sm leading-5 line-clamp-3 md:line-clamp-1 text-text-secondary;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
&__toolbar {
|
|
@@ -148,7 +148,7 @@ function handleMoreActionsClick() {
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
&__more-actions-icon {
|
|
151
|
-
@apply size-5 text-
|
|
151
|
+
@apply size-5 text-text-secondary;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
</style>
|
|
@@ -43,16 +43,16 @@ const emit = defineEmits(['click'])
|
|
|
43
43
|
@apply size-4;
|
|
44
44
|
}
|
|
45
45
|
&__label {
|
|
46
|
-
@apply font-semibold text-sm text-
|
|
46
|
+
@apply font-semibold text-sm text-text-primary leading-4;
|
|
47
47
|
}
|
|
48
48
|
&__help {
|
|
49
|
-
@apply text-
|
|
49
|
+
@apply text-text-secondary size-4 cursor-pointer;
|
|
50
50
|
svg {
|
|
51
51
|
@apply size-full;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
&__value {
|
|
55
|
-
@apply text-xs text-
|
|
55
|
+
@apply text-xs text-text-secondary leading-5;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
</style>
|
|
@@ -1,20 +1,31 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
|
|
2
4
|
const props = defineProps({
|
|
3
5
|
variant: {
|
|
4
6
|
type: String,
|
|
5
|
-
default: '
|
|
6
|
-
validator: (value) => ['
|
|
7
|
+
default: 'primary',
|
|
8
|
+
validator: (value) => ['primary', 'secondary', 'brand', 'success', 'warning', 'error'].includes(value)
|
|
7
9
|
}
|
|
8
10
|
})
|
|
11
|
+
|
|
12
|
+
const variantClass = computed(() => [
|
|
13
|
+
'rsui-section',
|
|
14
|
+
{
|
|
15
|
+
'rsui-section--primary': props.variant === 'primary',
|
|
16
|
+
'rsui-section--secondary': props.variant === 'secondary',
|
|
17
|
+
'rsui-section--brand': props.variant === 'brand',
|
|
18
|
+
'rsui-section--success': props.variant === 'success',
|
|
19
|
+
'rsui-section--warning': props.variant === 'warning',
|
|
20
|
+
'rsui-section--error': props.variant === 'error',
|
|
21
|
+
},
|
|
22
|
+
])
|
|
23
|
+
|
|
9
24
|
</script>
|
|
10
25
|
|
|
11
26
|
<template>
|
|
12
27
|
<section
|
|
13
|
-
:class="
|
|
14
|
-
'rsui-section',
|
|
15
|
-
`rsui-section--${variant}`
|
|
16
|
-
]"
|
|
17
|
-
|
|
28
|
+
:class="variantClass"
|
|
18
29
|
>
|
|
19
30
|
<div v-if="$slots.header" class="rsui-section__header">
|
|
20
31
|
<slot name="header"></slot>
|
|
@@ -29,7 +40,7 @@ const props = defineProps({
|
|
|
29
40
|
.rsui-section {
|
|
30
41
|
@apply border border-solid rounded-xl p-6;
|
|
31
42
|
|
|
32
|
-
&--
|
|
43
|
+
&--primary {
|
|
33
44
|
@apply bg-background-primary border-border-primary text-text-primary;
|
|
34
45
|
}
|
|
35
46
|
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import ButtonSlot from './ButtonSlot.vue'
|
|
3
|
-
</script>
|
|
4
|
-
<template>
|
|
5
|
-
<ButtonSlot class="rsui-button-secondary-brand">
|
|
6
|
-
<slot></slot>
|
|
7
|
-
</ButtonSlot>
|
|
8
|
-
</template>
|
|
9
|
-
<style lang="scss" scoped>
|
|
10
|
-
.rsui-button-secondary-brand {
|
|
11
|
-
// default colors
|
|
12
|
-
@apply text-primary-background bg-white border-primary-background;
|
|
13
|
-
// default hover state
|
|
14
|
-
@apply hover:text-primary-background-hover hover:bg-white hover:border-primary-background-hover;
|
|
15
|
-
// default focus state
|
|
16
|
-
@apply focus-visible:ring-primary-background focus-visible:border-primary-background;
|
|
17
|
-
// default active state
|
|
18
|
-
@apply active:bg-white active:border-primary-background;
|
|
19
|
-
// default disabled state
|
|
20
|
-
@apply disabled:bg-white disabled:border-rsui-grey-100 disabled:text-rsui-grey-400;
|
|
21
|
-
@apply disabled:active:bg-white disabled:active:border-rsui-grey-100;
|
|
22
|
-
}
|
|
23
|
-
</style>
|