@saasmakers/ui 2.0.16 → 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.
|
@@ -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-
|
|
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-
|
|
129
|
-
'py-
|
|
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
|
|
|
@@ -46,8 +46,10 @@ 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
|
+
|
|
49
51
|
onMounted(() => {
|
|
50
|
-
if (props.autofocus && input.value) {
|
|
52
|
+
if (props.autofocus && input.value && isDesktopBrowser.value) {
|
|
51
53
|
input.value.focus()
|
|
52
54
|
}
|
|
53
55
|
})
|
|
@@ -30,8 +30,10 @@ 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
|
+
|
|
33
35
|
onMounted(() => {
|
|
34
|
-
if (props.autofocus && textarea.value) {
|
|
36
|
+
if (props.autofocus && textarea.value && isDesktopBrowser.value) {
|
|
35
37
|
textarea.value.focus()
|
|
36
38
|
}
|
|
37
39
|
})
|
package/app/types/bases.d.ts
CHANGED
package/app/utils/animations.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saasmakers/ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.17",
|
|
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/
|
|
64
|
-
"@saasmakers/
|
|
63
|
+
"@saasmakers/apps-helpers": "0.1.0",
|
|
64
|
+
"@saasmakers/shared": "0.2.8"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"@saasmakers/apps-helpers": "^0.1.0",
|