@saasmakers/ui 2.0.64 → 2.0.66

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,
@@ -72,8 +71,11 @@ const centerLabel = computed(() => {
72
71
  return String(clampedCompleted.value)
73
72
  })
74
73
 
75
- // Visual gap (in viewBox units) between segments, widened for fewer steps.
76
74
  function gapForTotal(total: number) {
75
+ if (total <= 1) {
76
+ return 0
77
+ }
78
+
77
79
  if (total <= 4) {
78
80
  return 3
79
81
  }
@@ -106,9 +108,9 @@ const ringArcs = computed(() => {
106
108
  return arcs
107
109
  }
108
110
 
109
- // Beyond 8 steps individual segments become too thin, so we collapse them
111
+ // Beyond 20 steps individual segments become too thin, so we collapse them
110
112
  // into a single continuous progress arc.
111
- if (total > 8) {
113
+ if (total > 20) {
112
114
  const progressLength = (circumference * completed) / total
113
115
 
114
116
  arcs.push(
@@ -148,8 +150,7 @@ function onClick(event: MouseEvent) {
148
150
  <template>
149
151
  <component
150
152
  :is="clickable ? 'button' : 'div'"
151
- class="group inline-flex"
152
- :aria-expanded="expanded"
153
+ class="inline-flex"
153
154
  :aria-label="label"
154
155
  :class="{ 'cursor-pointer': clickable }"
155
156
  :type="clickable ? 'button' : undefined"
@@ -191,8 +192,6 @@ function onClick(event: MouseEvent) {
191
192
  :class="{
192
193
  'text-2xs': size === 'base' || size === 'sm',
193
194
  '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
195
  }"
197
196
  dominant-baseline="central"
198
197
  text-anchor="middle"
@@ -300,10 +300,8 @@ export interface BaseRing {
300
300
  clickable?: boolean
301
301
  completed?: number
302
302
  dashed?: boolean
303
- expanded?: boolean
304
303
  format?: BaseRingFormat
305
304
  label?: string
306
- revealLabelOnHover?: boolean
307
305
  size?: BaseRingSize
308
306
  total?: number
309
307
  transitionColors?: boolean
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saasmakers/ui",
3
- "version": "2.0.64",
3
+ "version": "2.0.66",
4
4
  "private": false,
5
5
  "description": "Reusable Nuxt UI components for SaaS Makers projects",
6
6
  "license": "MIT",