@saasmakers/ui 2.0.15 → 2.0.17

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.
@@ -15,7 +15,6 @@ const props = withDefaults(defineProps<BaseButton>(), {
15
15
  light: false,
16
16
  loading: false,
17
17
  reverse: false,
18
- rounded: 'md',
19
18
  size: 'base',
20
19
  text: '',
21
20
  to: undefined,
@@ -64,12 +63,8 @@ function onClick(event: MouseEvent) {
64
63
  'w-full': fullWidth,
65
64
  'bg-transparent shadow-none': light,
66
65
  'shadow-sm': !light,
67
- 'rounded-none': rounded === 'none' && !circular,
68
- 'rounded-sm': rounded === 'sm' && !circular,
69
- 'rounded': rounded === 'base' && !circular,
70
- 'rounded-md': rounded === 'md' && !circular,
71
- 'rounded-lg': rounded === 'lg' && !circular,
72
- 'rounded-full': rounded === 'full' || circular,
66
+ 'rounded-lg': !circular,
67
+ 'rounded-full': circular,
73
68
  'h-6 w-6': size === '2xs' && circular,
74
69
  'h-8 w-8': size === 'xs' && circular && !confirming,
75
70
  'h-10 w-10': size === 'sm' && circular && !confirming,
@@ -79,21 +74,21 @@ function onClick(event: MouseEvent) {
79
74
  'border-gray-900 dark:border-gray-100 bg-gray-900 dark:bg-gray-100 text-white dark:text-black': color === 'black' && !light,
80
75
  'hover:bg-black dark:hover:bg-white hover:text-white dark:hover:text-black': color === 'black' && !light && !disabled && !loading,
81
76
  'border-gray-900 dark:border-gray-100 text-gray-900 dark:text-gray-100': color === 'black' && light,
82
- 'border-gray-700 dark:border-gray-300 bg-gray-700 dark:bg-gray-300 text-white dark:text-black': color === 'gray' && !light,
83
- 'hover:bg-gray-800 dark:hover:bg-gray-200': color === 'gray' && !light && !disabled && !loading,
84
- 'border-gray-700 dark:border-gray-300 text-gray-700 dark:text-gray-300': color === 'gray' && light,
85
- 'border-green-700 dark:border-green-300 bg-green-700 dark:bg-green-300 text-white dark:text-black': color === 'green' && !light,
86
- 'hover:bg-green-800 dark:hover:bg-green-200': color === 'green' && !light && !disabled && !loading,
87
- 'border-green-700 dark:border-green-300 text-green-700 dark:text-green-300': color === 'green' && light,
88
- 'border-indigo-700 dark:border-indigo-300 bg-indigo-700 dark:bg-indigo-300 text-white dark:text-black': color === 'indigo' && !light,
89
- 'hover:bg-indigo-800 dark:hover:bg-indigo-200': color === 'indigo' && !light && !disabled && !loading,
90
- 'border-indigo-700 dark:border-indigo-300 text-indigo-700 dark:text-indigo-300': color === 'indigo' && light,
91
- 'border-orange-700 dark:border-orange-300 bg-orange-700 dark:bg-orange-300 text-white dark:text-black': color === 'orange' && !light,
92
- 'hover:bg-orange-800 dark:hover:bg-orange-200': color === 'orange' && !light && !disabled && !loading,
93
- 'border-orange-700 dark:border-orange-300 text-orange-700 dark:text-orange-300': color === 'orange' && light,
94
- 'border-red-700 dark:border-red-300 bg-red-700 dark:bg-red-300 text-white dark:text-black': color === 'red' && !light,
95
- 'hover:bg-red-800 dark:hover:bg-red-200': color === 'red' && !light && !disabled && !loading,
96
- 'border-red-700 dark:border-red-300 text-red-700 dark:text-red-300': color === 'red' && light,
77
+ 'border-gray-800 dark:border-gray-200 bg-gray-800 dark:bg-gray-200 text-white dark:text-black': color === 'gray' && !light,
78
+ 'hover:bg-gray-900 dark:hover:bg-gray-100': color === 'gray' && !light && !disabled && !loading,
79
+ 'border-gray-800 dark:border-gray-200 text-gray-800 dark:text-gray-200': color === 'gray' && light,
80
+ 'border-green-800 dark:border-green-200 bg-green-800 dark:bg-green-200 text-white dark:text-black': color === 'green' && !light,
81
+ 'hover:bg-green-900 dark:hover:bg-green-100': color === 'green' && !light && !disabled && !loading,
82
+ 'border-green-800 dark:border-green-200 text-green-800 dark:text-green-200': color === 'green' && light,
83
+ 'border-indigo-800 dark:border-indigo-200 bg-indigo-800 dark:bg-indigo-200 text-white dark:text-black': color === 'indigo' && !light,
84
+ 'hover:bg-indigo-900 dark:hover:bg-indigo-100': color === 'indigo' && !light && !disabled && !loading,
85
+ 'border-indigo-800 dark:border-indigo-200 text-indigo-800 dark:text-indigo-200': color === 'indigo' && light,
86
+ 'border-orange-800 dark:border-orange-200 bg-orange-800 dark:bg-orange-200 text-white dark:text-black': color === 'orange' && !light,
87
+ 'hover:bg-orange-900 dark:hover:bg-orange-100': color === 'orange' && !light && !disabled && !loading,
88
+ 'border-orange-800 dark:border-orange-200 text-orange-800 dark:text-orange-200': color === 'orange' && light,
89
+ 'border-red-800 dark:border-red-200 bg-red-800 dark:bg-red-200 text-white dark:text-black': color === 'red' && !light,
90
+ 'hover:bg-red-900 dark:hover:bg-red-100': color === 'red' && !light && !disabled && !loading,
91
+ 'border-red-800 dark:border-red-200 text-red-800 dark:text-red-200': color === 'red' && light,
97
92
  'border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100': color === 'white' && !light,
98
93
  'hover:bg-white dark:hover:bg-gray-900': color === 'white' && !light && !disabled && !loading,
99
94
  'border-white dark:border-gray-900 text-white dark:text-black': color === 'white' && light,
@@ -111,7 +111,8 @@ function onKeyDown(event: KeyboardEvent) {
111
111
  <div
112
112
  class="flex items-center"
113
113
  :class="{
114
- 'cursor-pointer hover:underline hover:text-gray-900 dark:hover:text-gray-100': isClickable,
114
+ 'group cursor-pointer hover:underline hover:text-black dark:hover:text-white': isClickable && text,
115
+ 'group cursor-pointer': isClickable && !text,
115
116
  'flex-row': !reverse,
116
117
  'flex-row-reverse': reverse,
117
118
  }"
@@ -126,6 +127,7 @@ function onKeyDown(event: KeyboardEvent) {
126
127
  v-if="finalIcon && !loading"
127
128
  class="flex items-center justify-center"
128
129
  :class="{
130
+ 'transition-colors duration-200': isClickable,
129
131
  'text-2xl': shouldSizeIcon && size === '2xl',
130
132
  'text-2xs': shouldSizeIcon && size === '2xs',
131
133
  'text-3xl': shouldSizeIcon && size === '3xl',
@@ -143,6 +145,8 @@ function onKeyDown(event: KeyboardEvent) {
143
145
  'text-indigo-600 dark:text-indigo-400': finalColor === 'indigo',
144
146
  'text-orange-600 dark:text-orange-400': finalColor === 'orange',
145
147
  'text-red-600 dark:text-red-400': finalColor === 'red',
148
+ 'group-hover:text-black dark:group-hover:text-white': isClickable && finalColor && finalColor !== 'white',
149
+ 'group-hover:text-gray-800 dark:group-hover:text-gray-200': isClickable && finalColor === 'white',
146
150
  }"
147
151
  :to="to"
148
152
  >
@@ -125,8 +125,9 @@ function onRemove(event: MouseEvent) {
125
125
  'border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-900 text-gray-800 dark:text-gray-200': color === 'white' && light && !active,
126
126
  'border-white dark:border-gray-900 text-white dark:text-black': color === 'white' && (!light || active),
127
127
  'border-dashed border-gray-400 dark:border-gray-600 bg-white dark:bg-gray-900 text-gray-800 dark:text-gray-200': color === 'white' && light && !active,
128
- 'py-1.5 px-2.5 text-2xs': size === 'sm',
129
- 'py-2 px-3 text-xs': size === 'base',
128
+ 'py-0.5 px-1.5': size === 'xs',
129
+ 'py-1.5 px-2.5': size === 'sm',
130
+ 'py-2 px-3': size === 'base',
130
131
  }"
131
132
  :to="to"
132
133
  >
@@ -142,7 +143,7 @@ function onRemove(event: MouseEvent) {
142
143
  v-if="avatar || circle || icon"
143
144
  class="mr-1 flex items-center text-center"
144
145
  :class="{
145
- 'h-2.5 w-2.5': size === 'sm' || iconSize === 2.5,
146
+ 'h-2.5 w-2.5': size === 'xs' || size === 'sm' || iconSize === 2.5,
146
147
  'h-3 w-3': size === 'base' || iconSize === 3,
147
148
  'h-3.5 w-3.5': iconSize === 3.5,
148
149
  'h-4 w-4': iconSize === 4,
@@ -173,6 +174,7 @@ function onRemove(event: MouseEvent) {
173
174
  v-if="!editable"
174
175
  class="whitespace-nowrap outline-none"
175
176
  :class="{ truncate }"
177
+ :size="size === 'xs' ? '3xs' : size === 'sm' ? '2xs' : 'xs'"
176
178
  :text="text"
177
179
  />
178
180
 
@@ -60,22 +60,12 @@ export interface BaseButton {
60
60
  light?: boolean
61
61
  loading?: boolean
62
62
  reverse?: boolean
63
- rounded?: BaseButtonRounded
64
63
  size?: BaseButtonSize
65
64
  text?: BaseTextText
66
65
  to?: RouteLocationNamedI18n
67
66
  type?: BaseButtonType
68
67
  }
69
68
 
70
- export type BaseButtonRounded
71
- = | 'base'
72
- | 'full'
73
- | 'lg'
74
- | 'md'
75
- | 'none'
76
- | 'sm'
77
- | 'xl'
78
-
79
69
  export type BaseButtonSize
80
70
  = | '2xs'
81
71
  | 'base'
@@ -396,7 +386,7 @@ export interface BaseTags {
396
386
  wrap?: boolean
397
387
  }
398
388
 
399
- export type BaseTagSize = 'base' | 'sm'
389
+ export type BaseTagSize = 'base' | 'sm' | 'xs'
400
390
 
401
391
  export interface BaseText {
402
392
  alignment?: BaseAlignment
@@ -24,7 +24,6 @@ declare global {
24
24
  type BaseBordered = import('./bases').BaseBordered
25
25
  type BaseBorderedColor = import('./bases').BaseBorderedColor
26
26
  type BaseButton = import('./bases').BaseButton
27
- type BaseButtonRounded = import('./bases').BaseButtonRounded
28
27
  type BaseButtonSize = import('./bases').BaseButtonSize
29
28
  type BaseButtonType = import('./bases').BaseButtonType
30
29
  type BaseCard = import('./bases').BaseCard
@@ -29,3 +29,11 @@ export const fadeInUp = {
29
29
  y: 25,
30
30
  },
31
31
  }
32
+
33
+ export const fadeOut = {
34
+ animate: {
35
+ opacity: 0,
36
+ transition: { duration: 0.25 },
37
+ },
38
+ initial: { opacity: 1 },
39
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saasmakers/ui",
3
- "version": "2.0.15",
3
+ "version": "2.0.17",
4
4
  "private": false,
5
5
  "description": "Reusable Nuxt UI components for SaaS Makers projects",
6
6
  "license": "MIT",