@saasmakers/ui 1.5.2 → 1.5.3

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.
@@ -4,6 +4,7 @@ import type { BaseProgress } from '../../types/bases'
4
4
  const props = withDefaults(defineProps<BaseProgress>(), {
5
5
  max: 100,
6
6
  showLabel: false,
7
+ size: 'base',
7
8
  value: 0,
8
9
  })
9
10
 
@@ -20,15 +21,19 @@ const label = computed(() => {
20
21
  return `${Math.round(percent.value)} %`
21
22
  }
22
23
 
23
- return `${props.value}/${props.max}`
24
+ return `${props.value} / ${props.max}`
24
25
  })
25
26
  </script>
26
27
 
27
28
  <template>
28
- <div class="w-full flex items-center gap-2">
29
+ <div
30
+ class="flex items-center"
31
+ :class="size === 'base' ? 'gap-2.5' : 'gap-2'"
32
+ >
29
33
  <div
30
34
  role="progressbar"
31
- class="h-1 min-w-0 flex-1 overflow-hidden rounded-full bg-gray-200 dark:bg-gray-800"
35
+ class="min-w-0 flex-1 overflow-hidden rounded-full bg-gray-200 dark:bg-gray-800"
36
+ :class="size === 'base' ? 'h-1.5' : 'h-1'"
32
37
  :aria-label="label"
33
38
  :aria-valuemax="max"
34
39
  :aria-valuemin="0"
@@ -43,7 +48,7 @@ const label = computed(() => {
43
48
  <BaseText
44
49
  v-if="showLabel"
45
50
  class="shrink-0 text-indigo-700 dark:text-indigo-300"
46
- size="2xs"
51
+ :size="size === 'base' ? 'xs' : '2xs'"
47
52
  :text="label"
48
53
  />
49
54
  </div>
@@ -284,9 +284,12 @@ export type BasePowerSize = 'base' | 'lg' | 'sm' | 'xs'
284
284
  export interface BaseProgress {
285
285
  max?: number
286
286
  showLabel?: boolean
287
+ size?: BaseProgressSize
287
288
  value?: number
288
289
  }
289
290
 
291
+ export type BaseProgressSize = 'base' | 'sm'
292
+
290
293
  export interface BaseQuote {
291
294
  background?: BaseQuoteBackground
292
295
  character?: BaseCharacterCharacter
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saasmakers/ui",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "private": false,
5
5
  "description": "Reusable Nuxt UI components for SaaS Makers projects",
6
6
  "license": "MIT",