@redseed/redseed-ui-vue3 7.2.6 → 7.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redseed/redseed-ui-vue3",
3
- "version": "7.2.6",
3
+ "version": "7.2.7",
4
4
  "description": "RedSeed UI Vue 3 components",
5
5
  "main": "index.js",
6
6
  "repository": "https://github.com/redseedtraining/redseed-ui",
@@ -1,17 +1,36 @@
1
1
  <script setup>
2
- import { computed } from 'vue'
2
+ import { ref, computed, watch } from 'vue'
3
3
 
4
4
  const props = defineProps({
5
5
  variant: {
6
6
  type: String,
7
7
  default: 'primary',
8
8
  validator: (value) => ['primary', 'secondary', 'brand', 'success', 'info', 'warning', 'error', 'ai'].includes(value)
9
+ },
10
+ showGap: {
11
+ type: Boolean,
12
+ default: true,
9
13
  }
10
14
  })
11
15
 
16
+ const showGapDelayed = ref(props.showGap)
17
+
18
+ watch(() => props.showGap, () => {
19
+ if (!props.showGap) {
20
+ setTimeout(() => {
21
+ showGapDelayed.value = props.showGap
22
+ }, 100)
23
+
24
+ return
25
+ }
26
+
27
+ showGapDelayed.value = props.showGap
28
+ })
29
+
12
30
  const variantClass = computed(() => [
13
31
  'rsui-section',
14
32
  {
33
+ 'rsui-section--show-gap': showGapDelayed.value,
15
34
  'rsui-section--primary': props.variant === 'primary',
16
35
  'rsui-section--secondary': props.variant === 'secondary',
17
36
  'rsui-section--brand': props.variant === 'brand',
@@ -36,10 +55,7 @@ const variantClass = computed(() => [
36
55
  </div>
37
56
 
38
57
  <div v-if="$slots.default"
39
- :class="{
40
- 'rsui-section__content': true,
41
- 'rsui-section__content--no-header': !$slots.header,
42
- }"
58
+ class="rsui-section__content"
43
59
  >
44
60
  <slot></slot>
45
61
  </div>