@saasmakers/ui 2.0.15 → 2.0.16

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,
@@ -46,10 +46,8 @@ const id = useId()
46
46
  const modelValue = defineModel<FieldInput['modelValue']>({ default: '' })
47
47
  const input = ref<HTMLInputElement>()
48
48
  const showPassword = ref(false)
49
- const { isDesktopBrowser } = useDevice()
50
-
51
49
  onMounted(() => {
52
- if (props.autofocus && input.value && isDesktopBrowser.value) {
50
+ if (props.autofocus && input.value) {
53
51
  input.value.focus()
54
52
  }
55
53
  })
@@ -30,10 +30,8 @@ const emit = defineEmits<{
30
30
  const id = useId()
31
31
  const modelValue = defineModel<FieldTextarea['modelValue']>({ default: '' })
32
32
  const textarea = ref<HTMLTextAreaElement>()
33
- const { isDesktopBrowser } = useDevice()
34
-
35
33
  onMounted(() => {
36
- if (props.autofocus && textarea.value && isDesktopBrowser.value) {
34
+ if (props.autofocus && textarea.value) {
37
35
  textarea.value.focus()
38
36
  }
39
37
  })
@@ -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'
@@ -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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saasmakers/ui",
3
- "version": "2.0.15",
3
+ "version": "2.0.16",
4
4
  "private": false,
5
5
  "description": "Reusable Nuxt UI components for SaaS Makers projects",
6
6
  "license": "MIT",
@@ -60,8 +60,8 @@
60
60
  "devDependencies": {
61
61
  "nuxt": "4.3.1",
62
62
  "typescript": "5.9.3",
63
- "@saasmakers/apps-helpers": "0.1.0",
64
- "@saasmakers/shared": "0.2.8"
63
+ "@saasmakers/shared": "0.2.8",
64
+ "@saasmakers/apps-helpers": "0.1.0"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "@saasmakers/apps-helpers": "^0.1.0",