@redseed/redseed-ui-vue3 7.0.0 → 7.0.2

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.
@@ -126,6 +126,7 @@ Text components provide consistent typography and text formatting across the app
126
126
 
127
127
  ### MetaInfo
128
128
  **When to use:** For displaying metadata information such as dates, authors, categories, or other contextual information.
129
+ **Variants:** Use the `inline` prop to render the label and value on one line when horizontal space allows.
129
130
  **Implementation:**
130
131
  ```vue
131
132
  <template>
@@ -206,4 +207,4 @@ Text components provide consistent typography and text formatting across the app
206
207
  - Screen readers can navigate through text content
207
208
  - Color contrast meets accessibility standards
208
209
  - Focus states are clearly visible for interactive elements
209
- - ARIA labels and roles are included where appropriate
210
+ - ARIA labels and roles are included where appropriate
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redseed/redseed-ui-vue3",
3
- "version": "7.0.0",
3
+ "version": "7.0.2",
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,29 @@
1
1
  <script setup>
2
+ import { computed } from 'vue'
2
3
  import { QuestionMarkCircleIcon } from '@heroicons/vue/24/outline'
3
4
 
4
5
  const props = defineProps({
5
6
  help: {
6
7
  type: Boolean,
7
8
  default: false
9
+ },
10
+ inline: {
11
+ type: Boolean,
12
+ default: false
8
13
  }
9
14
  })
10
15
 
16
+ const metaInfoClass = computed(() => [
17
+ 'rsui-meta-info',
18
+ {
19
+ 'rsui-meta-info--inline': props.inline
20
+ }
21
+ ])
22
+
11
23
  const emit = defineEmits(['click'])
12
24
  </script>
13
25
  <template>
14
- <div class="rsui-meta-info">
26
+ <div :class="metaInfoClass">
15
27
  <div class="rsui-meta-info__top">
16
28
  <div v-if="$slots['label-icon']" class="rsui-meta-info__label-icon">
17
29
  <slot name="label-icon"></slot>
@@ -32,6 +32,7 @@ function setActiveItem(item) {
32
32
  <SwitcherItem v-for="item in items"
33
33
  :key="item.id"
34
34
  :active="activeItem.id == item.id"
35
+ :disabled="item.disabled"
35
36
  @click="setActiveItem(item)"
36
37
  >
37
38
  <component v-if="item.icon"
@@ -3,17 +3,28 @@ const props = defineProps({
3
3
  active: {
4
4
  type: Boolean,
5
5
  default: false,
6
- }
6
+ },
7
+ disabled: {
8
+ type: Boolean,
9
+ default: false,
10
+ },
7
11
  })
8
12
 
9
- defineEmits(['click'])
13
+ const emit = defineEmits(['click'])
14
+
15
+ function handleClick() {
16
+ if (props.disabled) return
17
+
18
+ emit('click')
19
+ }
10
20
  </script>
11
21
  <template>
12
22
  <div class="rsui-switcher-item"
13
23
  :class="{
14
- 'rsui-switcher-item--active': props.active,
24
+ 'rsui-switcher-item--active': props.active && !props.disabled,
25
+ 'rsui-switcher-item--disabled': props.disabled,
15
26
  }"
16
- @click="$emit('click')"
27
+ @click="handleClick"
17
28
  >
18
29
  <slot></slot>
19
30
  </div>