sprintify-ui 0.0.28 → 0.0.29

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": "sprintify-ui",
3
- "version": "0.0.28",
3
+ "version": "0.0.29",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build-fast": "rimraf dist && vite build",
@@ -14,7 +14,7 @@ import { BaseIcon } from '.';
14
14
 
15
15
  const props = defineProps({
16
16
  contrast: {
17
- default: 'low',
17
+ default: 'high',
18
18
  type: String as PropType<'low' | 'high'>,
19
19
  },
20
20
  color: {
@@ -1,8 +1,8 @@
1
- import BaseProcessRing from './BaseProcessRing.vue';
1
+ import BaseProgressCircle from './BaseProgressCircle.vue';
2
2
 
3
3
  export default {
4
- title: 'Components/BaseProcessRing',
5
- component: BaseProcessRing,
4
+ title: 'Components/BaseProgressCircle',
5
+ component: BaseProgressCircle,
6
6
  args: {
7
7
  class: 'text-primary-500',
8
8
  radius: 100,
@@ -13,13 +13,13 @@ export default {
13
13
 
14
14
  const Template = (args) => ({
15
15
  components: {
16
- BaseProcessRing,
16
+ BaseProgressCircle,
17
17
  },
18
18
  setup() {
19
19
  return { args };
20
20
  },
21
21
  template: `
22
- <BaseProcessRing v-bind="args"></BaseProcessRing>
22
+ <BaseProgressCircle v-bind="args"></BaseProgressCircle>
23
23
  `,
24
24
  });
25
25
 
@@ -1,5 +1,14 @@
1
1
  <template>
2
2
  <svg :height="radius * 2" :width="radius * 2">
3
+ <circle
4
+ stroke="currentColor"
5
+ class="text-slate-200"
6
+ :stroke-width="stroke"
7
+ fill="transparent"
8
+ :r="normalizedRadius"
9
+ :cx="radius"
10
+ :cy="radius"
11
+ />
3
12
  <circle
4
13
  stroke="currentColor"
5
14
  :stroke-dasharray="`${circumference} ${circumference}`"
@@ -10,6 +19,15 @@
10
19
  :cx="radius"
11
20
  :cy="radius"
12
21
  />
22
+ <text
23
+ text-anchor="middle"
24
+ alignment-baseline="middle"
25
+ :x="radius"
26
+ :y="radius + fontSize / 10"
27
+ :style="{ fontSize: fontSize + 'px', fontWeight: 600 }"
28
+ >
29
+ {{ Math.round(progress * 100) }}%
30
+ </text>
13
31
  </svg>
14
32
  </template>
15
33
 
@@ -43,6 +61,9 @@ export default defineComponent({
43
61
  this.circumference - Math.min(1, this.progress) * this.circumference;
44
62
  return offset;
45
63
  },
64
+ fontSize(): number {
65
+ return Math.min(30, this.radius / 2.7);
66
+ },
46
67
  },
47
68
  });
48
69
  </script>
@@ -44,7 +44,7 @@ import BaseNavbarItemContent from './BaseNavbarItemContent.vue';
44
44
  import BasePagination from './BasePagination.vue';
45
45
  import BasePanel from './BasePanel.vue';
46
46
  import BasePassword from './BasePassword.vue';
47
- import BaseProcessRing from './BaseProcessRing.vue';
47
+ import BaseProgressCircle from './BaseProgressCircle.vue';
48
48
  import BaseReadMore from './BaseReadMore.vue';
49
49
  import BaseSelect from './BaseSelect.vue';
50
50
  import BaseSideNavigation from './BaseSideNavigation.vue';
@@ -113,7 +113,7 @@ export {
113
113
  BasePagination,
114
114
  BasePanel,
115
115
  BasePassword,
116
- BaseProcessRing,
116
+ BaseProgressCircle,
117
117
  BaseReadMore,
118
118
  BaseSelect,
119
119
  BaseSideNavigation,