@saasmakers/ui 2.0.7 → 2.0.9
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.
- package/app/assets/styles/base.css +5 -0
- package/app/components/auth/AuthSocialConnect.vue +4 -1
- package/app/components/fields/FieldAvatar.vue +1 -0
- package/app/components/fields/FieldInput.vue +4 -4
- package/app/components/fields/FieldTextarea.vue +4 -4
- package/app/utils/errors.ts +11 -0
- package/package.json +5 -1
|
@@ -131,6 +131,7 @@ function onOpenFilePicker() {
|
|
|
131
131
|
|
|
132
132
|
<BaseText
|
|
133
133
|
class="min-w-0 flex-1 text-gray-900 dark:text-gray-100"
|
|
134
|
+
:size="({ base: 'sm', lg: 'base', sm: 'xs', xs: '2xs' } as const)[size]"
|
|
134
135
|
:text="loading ? t('actionLoading') : (action || t('action'))"
|
|
135
136
|
/>
|
|
136
137
|
</div>
|
|
@@ -200,10 +200,10 @@ defineExpose({ focus })
|
|
|
200
200
|
'px-10': border === 'bottom' && type !== 'password',
|
|
201
201
|
'border-0 p-0': border === 'none' && type !== 'password',
|
|
202
202
|
'border-0 pr-9': border === 'none' && type === 'password',
|
|
203
|
-
'text-
|
|
204
|
-
'text-
|
|
205
|
-
'text-
|
|
206
|
-
'text-
|
|
203
|
+
'text-2xs': size === 'xs',
|
|
204
|
+
'text-xs': size === 'sm',
|
|
205
|
+
'text-sm': size === 'base',
|
|
206
|
+
'text-base': size === 'lg',
|
|
207
207
|
}"
|
|
208
208
|
:disabled="disabled"
|
|
209
209
|
:max="max"
|
|
@@ -81,10 +81,10 @@ function onFieldClick(event: MouseEvent) {
|
|
|
81
81
|
'border shadow-sm border-gray-200 dark:border-gray-800': border,
|
|
82
82
|
'hover:border-gray-300 dark:hover:border-gray-700 focus:border-gray-400 dark:focus:border-gray-600': border && !disabled,
|
|
83
83
|
'border-0': !border,
|
|
84
|
-
'text-
|
|
85
|
-
'text-
|
|
86
|
-
'text-
|
|
87
|
-
'text-
|
|
84
|
+
'text-2xs': size === 'xs',
|
|
85
|
+
'text-xs': size === 'sm',
|
|
86
|
+
'text-sm': size === 'base',
|
|
87
|
+
'text-base': size === 'lg',
|
|
88
88
|
}"
|
|
89
89
|
:disabled="disabled"
|
|
90
90
|
:placeholder="placeholder"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function isUserCancellation(error: unknown): boolean {
|
|
2
|
+
if (!error || typeof error !== 'object') {
|
|
3
|
+
return false
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
const candidate = error as { code?: string, name?: string }
|
|
7
|
+
|
|
8
|
+
// Capacitor social-login rejects cancellations with this code on both iOS and Android.
|
|
9
|
+
// The message is localized, so never match on it.
|
|
10
|
+
return candidate.code === 'USER_CANCELLED' || candidate.name === 'AbortError'
|
|
11
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saasmakers/ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Reusable Nuxt UI components for SaaS Makers projects",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
".": {
|
|
12
12
|
"types": "./app/types/global.d.ts",
|
|
13
13
|
"default": "./nuxt.config.ts"
|
|
14
|
+
},
|
|
15
|
+
"./app/utils/errors": {
|
|
16
|
+
"types": "./app/utils/errors.ts",
|
|
17
|
+
"default": "./app/utils/errors.ts"
|
|
14
18
|
}
|
|
15
19
|
},
|
|
16
20
|
"main": "nuxt.config.ts",
|