@saasmakers/ui 2.0.64 → 2.0.65
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.
|
@@ -6,7 +6,6 @@ const props = withDefaults(defineProps<BaseRing>(), {
|
|
|
6
6
|
completed: 0,
|
|
7
7
|
dashed: false,
|
|
8
8
|
format: 'count',
|
|
9
|
-
revealLabelOnHover: false,
|
|
10
9
|
size: 'base',
|
|
11
10
|
total: 0,
|
|
12
11
|
transitionColors: false,
|
|
@@ -106,9 +105,9 @@ const ringArcs = computed(() => {
|
|
|
106
105
|
return arcs
|
|
107
106
|
}
|
|
108
107
|
|
|
109
|
-
// Beyond
|
|
108
|
+
// Beyond 20 steps individual segments become too thin, so we collapse them
|
|
110
109
|
// into a single continuous progress arc.
|
|
111
|
-
if (total >
|
|
110
|
+
if (total > 20) {
|
|
112
111
|
const progressLength = (circumference * completed) / total
|
|
113
112
|
|
|
114
113
|
arcs.push(
|
|
@@ -148,7 +147,7 @@ function onClick(event: MouseEvent) {
|
|
|
148
147
|
<template>
|
|
149
148
|
<component
|
|
150
149
|
:is="clickable ? 'button' : 'div'"
|
|
151
|
-
class="
|
|
150
|
+
class="inline-flex"
|
|
152
151
|
:aria-expanded="expanded"
|
|
153
152
|
:aria-label="label"
|
|
154
153
|
:class="{ 'cursor-pointer': clickable }"
|
|
@@ -186,13 +185,11 @@ function onClick(event: MouseEvent) {
|
|
|
186
185
|
/>
|
|
187
186
|
|
|
188
187
|
<text
|
|
189
|
-
v-if="centerLabel"
|
|
188
|
+
v-if="centerLabel && expanded !== false"
|
|
190
189
|
class="fill-gray-600 font-bold tabular-nums dark:fill-gray-400"
|
|
191
190
|
:class="{
|
|
192
191
|
'text-2xs': size === 'base' || size === 'sm',
|
|
193
192
|
'text-3xs': size === 'lg',
|
|
194
|
-
'opacity-0 transition-opacity duration-150 motion-reduce:transition-none group-hover:opacity-100 group-focus-visible:opacity-100': revealLabelOnHover && !expanded,
|
|
195
|
-
'opacity-100': !revealLabelOnHover || expanded,
|
|
196
193
|
}"
|
|
197
194
|
dominant-baseline="central"
|
|
198
195
|
text-anchor="middle"
|
package/app/types/bases.d.ts
CHANGED