@saasmakers/ui 2.0.8 → 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.
@@ -10,3 +10,8 @@ html.light body {
10
10
  html.dark body {
11
11
  background-color: var(--gray-900);
12
12
  }
13
+
14
+ input[type='date']::-webkit-date-and-time-value,
15
+ input[type='datetime-local']::-webkit-date-and-time-value {
16
+ text-align: inherit;
17
+ }
@@ -89,8 +89,11 @@ async function onStartAuthentication() {
89
89
  }
90
90
  }
91
91
  catch (error) {
92
- emit('error', error)
92
+ if (isUserCancellation(error)) {
93
+ return
94
+ }
93
95
 
96
+ emit('error', error)
94
97
  console.error(error)
95
98
  }
96
99
  finally {
@@ -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>
@@ -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.8",
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",