@dative-gpi/foundation-shared-components 1.1.20-progress-bar-2 → 1.1.21

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.
@@ -12,7 +12,16 @@
12
12
  <div
13
13
  v-if="$props.cursor && isValueInRange"
14
14
  class="fs-progress-bar-cursor"
15
- ></div>
15
+ >
16
+ <FSText
17
+ v-if="$props.showValue"
18
+ class="fs-progress-bar-cursor-label"
19
+ font="text-overline"
20
+ :ellipsis="false"
21
+ >
22
+ {{ displayValue }}
23
+ </FSText>
24
+ </div>
16
25
  <div
17
26
  v-if="!$props.cursor"
18
27
  class="fs-progress-bar-fill"
@@ -41,7 +50,7 @@
41
50
  </div>
42
51
  </div>
43
52
  <FSText
44
- v-if="$props.showValue"
53
+ v-if="$props.showValue && !$props.cursor"
45
54
  font="text-button"
46
55
  >
47
56
  {{ displayValue }}
@@ -158,12 +167,6 @@ export default defineComponent({
158
167
  return `${((100 - fillLeft.value) / fillWidth.value) * 100}%`;
159
168
  });
160
169
 
161
- const fillColor = computed(() => {
162
- return clampedValue.value >= 0
163
- ? (props.endColor ?? successColors.base)
164
- : (props.startColor ?? errorColors.base);
165
- });
166
-
167
170
  const positionedLabels = computed(() => {
168
171
  return props.labels.map(label => {
169
172
  const percent = isValid.value
@@ -189,7 +192,6 @@ export default defineComponent({
189
192
  "--progress-bar-gradient-start-stop": gradientStartStop.value,
190
193
  "--progress-bar-gradient-end": props.endColor ?? successColors.base,
191
194
  "--progress-bar-gradient-end-stop": gradientEndStop.value,
192
- "--progress-bar-fill-color": fillColor.value,
193
195
  "--progress-bar-fill-left": `${fillLeft.value}%`,
194
196
  "--progress-bar-fill-width": `${fillWidth.value}%`,
195
197
  "--progress-bar-cursor-position": `${valuePercent.value}%`
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "url": "https://github.com/Dative-GPI/foundation-shared-ui.git"
5
5
  },
6
6
  "sideEffects": false,
7
- "version": "1.1.20-progress-bar-2",
7
+ "version": "1.1.21",
8
8
  "description": "",
9
9
  "publishConfig": {
10
10
  "access": "public"
@@ -13,8 +13,8 @@
13
13
  "author": "",
14
14
  "license": "ISC",
15
15
  "dependencies": {
16
- "@dative-gpi/foundation-shared-domain": "1.1.20-progress-bar-2",
17
- "@dative-gpi/foundation-shared-services": "1.1.20-progress-bar-2"
16
+ "@dative-gpi/foundation-shared-domain": "1.1.21",
17
+ "@dative-gpi/foundation-shared-services": "1.1.21"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "@dative-gpi/bones-ui": "^1.0.0",
@@ -38,5 +38,5 @@
38
38
  "sass": "1.71.1",
39
39
  "sass-loader": "13.3.2"
40
40
  },
41
- "gitHead": "1bf7de326389a2bb6cee7baa796033b0fd2c22f9"
41
+ "gitHead": "7f473e2f3278860868e8120cc7417155145cdd07"
42
42
  }
@@ -16,21 +16,38 @@
16
16
  height: 100%;
17
17
  left: var(--progress-bar-fill-left);
18
18
  width: var(--progress-bar-fill-width);
19
- background-color: var(--progress-bar-fill-color);
19
+ background: linear-gradient(
20
+ to right,
21
+ var(--progress-bar-gradient-start) var(--progress-bar-gradient-start-stop),
22
+ var(--progress-bar-gradient-end) var(--progress-bar-gradient-end-stop)
23
+ );
20
24
  border-radius: 4px;
21
25
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
22
26
  }
23
27
 
24
28
  .fs-progress-bar-cursor {
25
29
  position: absolute;
26
- top: 0;
27
- height: 100%;
28
- width: 12px;
29
- border-radius: 4px;
30
- background-color: var(--progress-bar-fill-color);
30
+ top: 50%;
31
31
  left: var(--progress-bar-cursor-position);
32
- transform: translateX(-50%);
32
+ width: 14px;
33
+ height: 14px;
34
+ border-radius: 50%;
35
+ background: linear-gradient(
36
+ to right,
37
+ var(--progress-bar-gradient-start),
38
+ var(--progress-bar-gradient-end)
39
+ );
40
+ transform: translate(-50%, -50%);
33
41
  transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
42
+
43
+ .fs-progress-bar-cursor-label {
44
+ position: absolute;
45
+ top: calc(100% + 4px);
46
+ left: 50%;
47
+ transform: translateX(-50%);
48
+ white-space: nowrap;
49
+ pointer-events: none;
50
+ }
34
51
  }
35
52
  }
36
53