@saasmakers/ui 2.0.63 → 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.
@@ -143,7 +143,7 @@ function processGoogleCallback(event: MessageEvent) {
143
143
  :alt="t('appleLogo')"
144
144
  class="dark:invert"
145
145
  :class="{
146
- 'mr-2 w-4': size === 'xs' || size === 'sm',
146
+ 'mr-2 w-4': size === 'sm',
147
147
  'mr-2.5 w-4.5': size === 'base',
148
148
  'mr-2.5 w-5': size === 'lg',
149
149
  }"
@@ -154,7 +154,7 @@ function processGoogleCallback(event: MessageEvent) {
154
154
  v-else-if="provider === 'google'"
155
155
  :alt="t('googleLogo')"
156
156
  :class="{
157
- 'mr-2 w-4': size === 'xs' || size === 'sm',
157
+ 'mr-2 w-4': size === 'sm',
158
158
  'mr-2.5 w-4.5': size === 'base',
159
159
  'mr-2.5 w-5': size === 'lg',
160
160
  }"
@@ -90,7 +90,7 @@ async function onClose(event: MouseEvent) {
90
90
  :color="buttonColor"
91
91
  :icon="getLayerIcon('closeCircle')"
92
92
  light
93
- size="xs"
93
+ size="sm"
94
94
  :text="t('closeThisMessage')"
95
95
  @click="onClose"
96
96
  />
@@ -45,9 +45,6 @@ const contentSize = computed((): BaseSize => {
45
45
  case 'sm': {
46
46
  return 'xs'
47
47
  }
48
- case 'xs': {
49
- return '2xs'
50
- }
51
48
  default: {
52
49
  return 'sm'
53
50
  }
@@ -86,7 +83,6 @@ function onClick(event: MouseEvent) {
86
83
  'shadow-sm': !light,
87
84
  'rounded-lg': shape !== 'circle',
88
85
  'rounded-full': shape === 'circle',
89
- 'h-8 w-8': size === 'xs' && hasFixedSize && !confirming,
90
86
  'h-10 w-10': size === 'sm' && hasFixedSize && !confirming,
91
87
  'h-12 w-12': size === 'base' && hasFixedSize && !confirming,
92
88
  'h-14 w-14': size === 'lg' && hasFixedSize && !confirming,
@@ -113,7 +109,6 @@ function onClick(event: MouseEvent) {
113
109
  'border-white dark:border-gray-900 text-white dark:text-black': color === 'white' && light,
114
110
  'hover:border-black dark:hover:border-white hover:text-black dark:hover:text-white': color !== 'white' && light && !disabled && !loading,
115
111
  'hover:bg-white dark:hover:bg-gray-900 hover:text-gray-800 dark:hover:text-gray-200': color === 'white' && light && !disabled && !loading,
116
- 'h-8 px-4': size === 'xs' && (!hasFixedSize || confirming),
117
112
  'h-10 px-5': size === 'sm' && (!hasFixedSize || confirming),
118
113
  'h-12 px-6': size === 'base' && (!hasFixedSize || confirming),
119
114
  'h-14 px-6.5': size === 'lg' && (!hasFixedSize || confirming),
@@ -18,7 +18,7 @@ const emit = defineEmits<{
18
18
  const sizes = {
19
19
  base: {
20
20
  inset: 1,
21
- size: 28,
21
+ size: 30,
22
22
  strokeWidth: 3,
23
23
  },
24
24
  lg: {
@@ -26,6 +26,11 @@ const sizes = {
26
26
  size: 36,
27
27
  strokeWidth: 4,
28
28
  },
29
+ sm: {
30
+ inset: 1,
31
+ size: 24,
32
+ strokeWidth: 2.5,
33
+ },
29
34
  } as const
30
35
 
31
36
  const geometry = computed(() => {
@@ -66,28 +71,6 @@ const centerLabel = computed(() => {
66
71
  return String(clampedCompleted.value)
67
72
  })
68
73
 
69
- const progressColor = computed(() => {
70
- const progressPercentage = percentage.value
71
-
72
- if (progressPercentage === 100) {
73
- return 'var(--indigo-800)'
74
- }
75
-
76
- if (progressPercentage >= 75) {
77
- return 'var(--indigo-700)'
78
- }
79
-
80
- if (progressPercentage >= 50) {
81
- return 'var(--indigo-500)'
82
- }
83
-
84
- if (progressPercentage >= 25) {
85
- return 'var(--indigo-400)'
86
- }
87
-
88
- return 'var(--indigo-300)'
89
- })
90
-
91
74
  // Visual gap (in viewBox units) between segments, widened for fewer steps.
92
75
  function gapForTotal(total: number) {
93
76
  if (total <= 4) {
@@ -122,9 +105,9 @@ const ringArcs = computed(() => {
122
105
  return arcs
123
106
  }
124
107
 
125
- // Beyond 8 steps individual segments become too thin, so we collapse them
108
+ // Beyond 20 steps individual segments become too thin, so we collapse them
126
109
  // into a single continuous progress arc.
127
- if (total > 8) {
110
+ if (total > 20) {
128
111
  const progressLength = (circumference * completed) / total
129
112
 
130
113
  arcs.push(
@@ -183,14 +166,17 @@ function onClick(event: MouseEvent) {
183
166
  v-for="(arc, index) in ringArcs"
184
167
  :key="index"
185
168
  :class="{
186
- 'stroke-gray-300 dark:stroke-gray-700': !arc.filled,
169
+ 'stroke-gray-200 dark:stroke-gray-800': !arc.filled,
170
+ 'stroke-indigo-400 dark:stroke-indigo-600': arc.filled && percentage < 25,
171
+ 'stroke-indigo-500 dark:stroke-indigo-500': arc.filled && percentage >= 25 && percentage < 50,
172
+ 'stroke-indigo-600 dark:stroke-indigo-400': arc.filled && percentage >= 50 && percentage < 75,
173
+ 'stroke-indigo-700 dark:stroke-indigo-300': arc.filled && percentage >= 75,
187
174
  'transition-[stroke] duration-150 motion-reduce:transition-none': transitionColors,
188
175
  }"
189
176
  :cx="geometry.center"
190
177
  :cy="geometry.center"
191
178
  fill="none"
192
179
  :r="geometry.radius"
193
- :stroke="arc.filled ? progressColor : undefined"
194
180
  :stroke-dasharray="arc.dashArray"
195
181
  :stroke-dashoffset="arc.dashOffset"
196
182
  stroke-linecap="butt"
@@ -199,10 +185,10 @@ function onClick(event: MouseEvent) {
199
185
  />
200
186
 
201
187
  <text
202
- v-if="centerLabel"
188
+ v-if="centerLabel && expanded !== false"
203
189
  class="fill-gray-600 font-bold tabular-nums dark:fill-gray-400"
204
190
  :class="{
205
- 'text-2xs': size === 'base',
191
+ 'text-2xs': size === 'base' || size === 'sm',
206
192
  'text-3xs': size === 'lg',
207
193
  }"
208
194
  dominant-baseline="central"
@@ -74,7 +74,6 @@ export type BaseButtonSize
74
74
  = | 'base'
75
75
  | 'lg'
76
76
  | 'sm'
77
- | 'xs'
78
77
 
79
78
  export type BaseButtonType = 'button' | 'reset' | 'submit'
80
79
 
@@ -317,7 +316,7 @@ export interface BaseRingArc {
317
316
 
318
317
  export type BaseRingFormat = 'count' | 'none' | 'percent'
319
318
 
320
- export type BaseRingSize = 'base' | 'lg'
319
+ export type BaseRingSize = 'base' | 'lg' | 'sm'
321
320
 
322
321
  export interface BaseShortcut {
323
322
  active?: boolean
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saasmakers/ui",
3
- "version": "2.0.63",
3
+ "version": "2.0.65",
4
4
  "private": false,
5
5
  "description": "Reusable Nuxt UI components for SaaS Makers projects",
6
6
  "license": "MIT",