@redseed/redseed-ui-vue3 8.47.0 → 8.49.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redseed/redseed-ui-vue3",
3
- "version": "8.47.0",
3
+ "version": "8.49.0",
4
4
  "description": "RedSeed UI Vue 3 components",
5
5
  "main": "index.js",
6
6
  "repository": "https://github.com/redseedtraining/redseed-ui",
@@ -55,6 +55,7 @@ defineExpose({
55
55
  :required="$attrs.required"
56
56
  :showAsterisk="$attrs.showAsterisk"
57
57
  :compact="$attrs.compact"
58
+ :lg="$attrs.lg"
58
59
  >
59
60
  <template #label v-if="$slots.label">
60
61
  <slot name="label"></slot>
@@ -19,6 +19,11 @@ const props = defineProps({
19
19
  type: Boolean,
20
20
  default: true,
21
21
  },
22
+ // fills the connector line leading into the active step by this percentage (0-100)
23
+ activeStepProgress: {
24
+ type: Number,
25
+ default: null,
26
+ },
22
27
  sm: {
23
28
  type: Boolean,
24
29
  default: false,
@@ -93,6 +98,7 @@ const componentClass = computed(() => [
93
98
  :step="step"
94
99
  :completed="!!step.completed"
95
100
  :active="index === activeStepIndex"
101
+ :progress="index === activeStepIndex ? activeStepProgress : null"
96
102
  :clickable="clickable"
97
103
  :skippable="skippable || index === activeStepIndex + 1"
98
104
  :sm="isSmall"
@@ -14,6 +14,11 @@ const props = defineProps({
14
14
  type: Boolean,
15
15
  default: false,
16
16
  },
17
+ // fills the connector line leading into this step by this percentage (0-100)
18
+ progress: {
19
+ type: Number,
20
+ default: null,
21
+ },
17
22
  clickable: {
18
23
  type: Boolean,
19
24
  default: false,
@@ -48,11 +53,14 @@ const emit = defineEmits(['click'])
48
53
 
49
54
  const defaultSize = computed(() => !props.sm && !props.md && !props.lg)
50
55
 
56
+ const hasProgress = computed(() => props.active && props.progress !== null)
57
+
51
58
  const componentClass = computed(() => [
52
59
  'rsui-progress-tracker-step',
53
60
  {
54
61
  'rsui-progress-tracker-step--completed': props.completed,
55
62
  'rsui-progress-tracker-step--active': props.active,
63
+ 'rsui-progress-tracker-step--progress': hasProgress.value,
56
64
  'rsui-progress-tracker-step--clickable': canClick.value,
57
65
  'rsui-progress-tracker-step--sm': props.sm,
58
66
  'rsui-progress-tracker-step--md': props.md,
@@ -60,6 +68,10 @@ const componentClass = computed(() => [
60
68
  }
61
69
  ])
62
70
 
71
+ const connectorStyle = computed(() => hasProgress.value
72
+ ? { '--rsui-progress-tracker-connector-progress': `${Math.min(100, Math.max(0, props.progress))}%` }
73
+ : undefined)
74
+
63
75
  const indicatorClass = computed(() => [
64
76
  'rsui-progress-tracker-step__indicator',
65
77
  {
@@ -84,6 +96,7 @@ function handleClick() {
84
96
  </script>
85
97
  <template>
86
98
  <div :class="componentClass"
99
+ :style="connectorStyle"
87
100
  :tabindex="canClick ? 0 : undefined"
88
101
  :role="canClick ? 'button' : undefined"
89
102
  :aria-current="active ? 'step' : undefined"