@sparkvault/sdk-js 8.6.0 → 8.7.0
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/dist/products/identity/popup-launcher.d.ts +4 -3
- package/dist/products/identity/styles.d.ts +5 -5
- package/dist/products/identity/views/icons.d.ts +7 -6
- package/dist/sparkvault.cjs.js +186 -192
- package/dist/sparkvault.cjs.js.map +1 -1
- package/dist/sparkvault.esm.js +186 -192
- package/dist/sparkvault.esm.js.map +1 -1
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/package.json +1 -1
package/dist/sparkvault.cjs.js
CHANGED
|
@@ -1351,14 +1351,25 @@ class VerificationState {
|
|
|
1351
1351
|
*
|
|
1352
1352
|
* The single transfer path: synchronous `window.open` inside the user gesture
|
|
1353
1353
|
* (so the browser never blocks it), strict `event.origin` + `data.type`
|
|
1354
|
-
* validation against the caller-supplied trusted origin, a
|
|
1355
|
-
* `window.closed` poll that surfaces a manual
|
|
1354
|
+
* validation against the caller-supplied trusted origin, a 30-minute
|
|
1355
|
+
* abandoned-window backstop, and a `window.closed` poll that surfaces a manual
|
|
1356
|
+
* close as a cancellation.
|
|
1356
1357
|
*/
|
|
1357
1358
|
/** Default popup dimensions — a centered login/ceremony window. */
|
|
1358
1359
|
const DEFAULT_WIDTH = 480;
|
|
1359
1360
|
const DEFAULT_HEIGHT = 640;
|
|
1360
|
-
/**
|
|
1361
|
-
|
|
1361
|
+
/**
|
|
1362
|
+
* Default timeout for popup operations: 30 minutes. This is an
|
|
1363
|
+
* abandoned-window backstop — never a liveness gate. A person mid-login is
|
|
1364
|
+
* often slow for legitimate reasons (waiting out an OTP resend backoff,
|
|
1365
|
+
* fetching their phone for a cross-device passkey, hunting for an alternative
|
|
1366
|
+
* method), and yanking the window away from them mid-flow is far worse than
|
|
1367
|
+
* letting an orphaned promise linger. Active cancellation is handled
|
|
1368
|
+
* elsewhere: the `window.closed` poll catches a manual close within 500ms and
|
|
1369
|
+
* an explicit in-popup cancel posts back immediately; server-side challenge
|
|
1370
|
+
* TTLs (OTP expiry, auth-request lifetime) bound how stale a completion can be.
|
|
1371
|
+
*/
|
|
1372
|
+
const DEFAULT_TIMEOUT_MS = 30 * 60 * 1000;
|
|
1362
1373
|
/** How often to check whether the user closed the popup manually. */
|
|
1363
1374
|
const CLOSED_POLL_INTERVAL_MS = 500;
|
|
1364
1375
|
/**
|
|
@@ -1948,12 +1959,12 @@ class SparkLinkHandler {
|
|
|
1948
1959
|
/**
|
|
1949
1960
|
* Identity Modal Styles
|
|
1950
1961
|
*
|
|
1951
|
-
*
|
|
1952
|
-
* -
|
|
1962
|
+
* SparkVault design system, product register:
|
|
1963
|
+
* - Quiet slate neutrals; Action Blue carries all interactivity
|
|
1953
1964
|
* - 4px base spacing unit for consistency
|
|
1954
|
-
* -
|
|
1955
|
-
* -
|
|
1956
|
-
* -
|
|
1965
|
+
* - Hairline borders over shadows; shadows minimal and DS-weighted
|
|
1966
|
+
* - Restrained motion: 120-280ms, standard/decelerate curves only
|
|
1967
|
+
* - One accent per surface; tenant-tintable via --sv-primary
|
|
1957
1968
|
*/
|
|
1958
1969
|
const STYLE_ID$1 = 'sparkvault-identity-styles';
|
|
1959
1970
|
/**
|
|
@@ -2016,56 +2027,69 @@ function getStyles(options) {
|
|
|
2016
2027
|
// The brand accent is driven by the `--sv-primary` / `--sv-primary-hover`
|
|
2017
2028
|
// CSS custom properties so a host page (e.g. the SparkVault sign-in page) can
|
|
2018
2029
|
// tint the whole flow to the tenant's brand color by setting them on `:root`.
|
|
2019
|
-
// The literals are the fallback - when no host sets the variables the
|
|
2020
|
-
//
|
|
2021
|
-
// via color-mix so
|
|
2022
|
-
|
|
2030
|
+
// The literals are the fallback - when no host sets the variables the flow
|
|
2031
|
+
// renders in SparkVault Action Blue. The soft focus glow and the two-tone
|
|
2032
|
+
// focus ring are both derived from the same accent via color-mix so they
|
|
2033
|
+
// track the tenant tint too.
|
|
2034
|
+
const accent = 'var(--sv-primary, #216bde)';
|
|
2035
|
+
const surface = isDark ? '#030712' : '#ffffff';
|
|
2036
|
+
// Lightened accent for the outer ring of the two-tone focus indicator
|
|
2037
|
+
// (lands on the design system's #4383eb at the default accent).
|
|
2038
|
+
const focusRingColor = `color-mix(in srgb, ${accent} 80%, white)`;
|
|
2023
2039
|
const tokens = {
|
|
2024
2040
|
// Colors
|
|
2025
2041
|
primary: accent,
|
|
2026
|
-
primaryHover: 'var(--sv-primary-hover, #
|
|
2042
|
+
primaryHover: 'var(--sv-primary-hover, #0d5bcd)',
|
|
2027
2043
|
primaryLight: `color-mix(in srgb, ${accent} ${isDark ? '20%' : '9%'}, transparent)`,
|
|
2028
|
-
error: '#
|
|
2029
|
-
errorLight: isDark ? 'rgba(
|
|
2030
|
-
errorBorder: isDark ? 'rgba(
|
|
2044
|
+
error: isDark ? '#e6443d' : '#b02b27',
|
|
2045
|
+
errorLight: isDark ? 'rgba(230, 68, 61, 0.12)' : '#fee2e2',
|
|
2046
|
+
errorBorder: isDark ? 'rgba(230, 68, 61, 0.35)' : '#fecaca',
|
|
2047
|
+
// Filled danger buttons stay on the fixed danger tier (white label, AA in
|
|
2048
|
+
// both themes).
|
|
2049
|
+
danger: '#b02b27',
|
|
2050
|
+
dangerHover: '#9a221f',
|
|
2051
|
+
warningIcon: isDark ? '#e6ad00' : '#8a5600',
|
|
2031
2052
|
// Backgrounds
|
|
2032
|
-
bg:
|
|
2033
|
-
bgSubtle: isDark ? '
|
|
2034
|
-
bgHover: isDark ? '
|
|
2035
|
-
bgInput: isDark ? '
|
|
2053
|
+
bg: surface,
|
|
2054
|
+
bgSubtle: isDark ? 'rgba(255, 255, 255, 0.05)' : '#f8fafc',
|
|
2055
|
+
bgHover: isDark ? 'rgba(255, 255, 255, 0.08)' : '#f1f5f9',
|
|
2056
|
+
bgInput: isDark ? 'rgba(255, 255, 255, 0.04)' : '#ffffff',
|
|
2036
2057
|
// Borders
|
|
2037
|
-
border: isDark ? '
|
|
2038
|
-
borderHover: isDark ? '
|
|
2058
|
+
border: isDark ? 'rgba(255, 255, 255, 0.10)' : '#e2e8f0',
|
|
2059
|
+
borderHover: isDark ? 'rgba(255, 255, 255, 0.18)' : '#cbd5e1',
|
|
2039
2060
|
borderFocus: accent,
|
|
2061
|
+
chevron: isDark ? 'rgba(255, 255, 255, 0.35)' : '#cbd5e1',
|
|
2040
2062
|
// Text
|
|
2041
|
-
textPrimary: isDark ? '
|
|
2042
|
-
textSecondary: isDark ? '
|
|
2043
|
-
textMuted: isDark ? '
|
|
2044
|
-
textOnPrimary: '#
|
|
2045
|
-
//
|
|
2063
|
+
textPrimary: isDark ? 'rgba(255, 255, 255, 0.92)' : '#0f172a',
|
|
2064
|
+
textSecondary: isDark ? 'rgba(255, 255, 255, 0.62)' : '#475569',
|
|
2065
|
+
textMuted: isDark ? 'rgba(255, 255, 255, 0.45)' : '#64748b',
|
|
2066
|
+
textOnPrimary: '#ffffff',
|
|
2067
|
+
// Focus — two-tone ring: inner surface gap + accent-derived outer ring.
|
|
2068
|
+
focusRing: `0 0 0 2px ${surface}, 0 0 0 4px ${focusRingColor}`,
|
|
2069
|
+
// Shadows — DS-weight: lean on hairlines, keep elevation subtle.
|
|
2046
2070
|
shadowSm: isDark
|
|
2047
2071
|
? '0 1px 2px rgba(0, 0, 0, 0.4)'
|
|
2048
|
-
: '0 1px 2px rgba(0, 0, 0, 0.
|
|
2072
|
+
: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',
|
|
2049
2073
|
shadowLg: isDark
|
|
2050
|
-
? '0 8px 24px rgba(0, 0, 0, 0.
|
|
2051
|
-
: '0 8px 24px rgba(
|
|
2074
|
+
? '0 8px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.10)'
|
|
2075
|
+
: '0 8px 24px rgba(15, 23, 42, 0.12)',
|
|
2052
2076
|
};
|
|
2053
2077
|
return `
|
|
2054
2078
|
/* ========================================
|
|
2055
2079
|
MOTION SYSTEM — shared duration/easing tokens so every transition in
|
|
2056
|
-
the flow is consistent.
|
|
2057
|
-
|
|
2080
|
+
the flow is consistent. 120/180/280ms tiers; standard and decelerate
|
|
2081
|
+
curves only, never overshoot.
|
|
2058
2082
|
======================================== */
|
|
2059
2083
|
:root {
|
|
2060
|
-
--sv-dur-instant:
|
|
2061
|
-
--sv-dur-fast:
|
|
2062
|
-
--sv-dur-base:
|
|
2063
|
-
--sv-dur-slow:
|
|
2064
|
-
--sv-dur-slower:
|
|
2084
|
+
--sv-dur-instant: 120ms;
|
|
2085
|
+
--sv-dur-fast: 120ms;
|
|
2086
|
+
--sv-dur-base: 180ms;
|
|
2087
|
+
--sv-dur-slow: 280ms;
|
|
2088
|
+
--sv-dur-slower: 280ms;
|
|
2065
2089
|
--sv-ease-standard: cubic-bezier(0.2, 0, 0, 1);
|
|
2066
|
-
--sv-ease-out: cubic-bezier(0
|
|
2067
|
-
--sv-ease-accelerate: cubic-bezier(0.
|
|
2068
|
-
--sv-ease-spring: cubic-bezier(0.
|
|
2090
|
+
--sv-ease-out: cubic-bezier(0, 0, 0.2, 1);
|
|
2091
|
+
--sv-ease-accelerate: cubic-bezier(0.2, 0, 0, 1);
|
|
2092
|
+
--sv-ease-spring: cubic-bezier(0.2, 0, 0, 1);
|
|
2069
2093
|
}
|
|
2070
2094
|
|
|
2071
2095
|
/* Each mounted view enters with a calm fade + rise. Applied by the renderer
|
|
@@ -2090,7 +2114,7 @@ function getStyles(options) {
|
|
|
2090
2114
|
.sv-overlay {
|
|
2091
2115
|
position: fixed;
|
|
2092
2116
|
inset: 0;
|
|
2093
|
-
background: rgba(0, 0, 0,
|
|
2117
|
+
background: ${isDark ? 'rgba(0, 0, 0, 0.7)' : 'rgba(15, 23, 42, 0.6)'};
|
|
2094
2118
|
display: flex;
|
|
2095
2119
|
align-items: center;
|
|
2096
2120
|
justify-content: center;
|
|
@@ -2109,7 +2133,7 @@ function getStyles(options) {
|
|
|
2109
2133
|
|
|
2110
2134
|
.sv-modal {
|
|
2111
2135
|
background: ${tokens.bg};
|
|
2112
|
-
border-radius:
|
|
2136
|
+
border-radius: 12px;
|
|
2113
2137
|
box-shadow: ${tokens.shadowLg};
|
|
2114
2138
|
width: 100%;
|
|
2115
2139
|
max-width: 400px;
|
|
@@ -2130,7 +2154,7 @@ function getStyles(options) {
|
|
|
2130
2154
|
padding: 14px 20px;
|
|
2131
2155
|
border-bottom: 1px solid ${tokens.border};
|
|
2132
2156
|
background: ${tokens.bg};
|
|
2133
|
-
border-radius:
|
|
2157
|
+
border-radius: 12px 12px 0 0;
|
|
2134
2158
|
flex-shrink: 0;
|
|
2135
2159
|
}
|
|
2136
2160
|
|
|
@@ -2168,10 +2192,10 @@ function getStyles(options) {
|
|
|
2168
2192
|
justify-content: center;
|
|
2169
2193
|
background: ${tokens.bgSubtle};
|
|
2170
2194
|
border: none;
|
|
2171
|
-
border-radius:
|
|
2195
|
+
border-radius: 6px;
|
|
2172
2196
|
cursor: pointer;
|
|
2173
2197
|
color: ${tokens.textSecondary};
|
|
2174
|
-
transition: background
|
|
2198
|
+
transition: background var(--sv-dur-fast) var(--sv-ease-standard), color var(--sv-dur-fast) var(--sv-ease-standard);
|
|
2175
2199
|
}
|
|
2176
2200
|
|
|
2177
2201
|
.sv-close-btn:hover {
|
|
@@ -2180,12 +2204,8 @@ function getStyles(options) {
|
|
|
2180
2204
|
}
|
|
2181
2205
|
|
|
2182
2206
|
.sv-close-btn:focus-visible {
|
|
2183
|
-
outline:
|
|
2184
|
-
|
|
2185
|
-
}
|
|
2186
|
-
|
|
2187
|
-
.sv-close-btn:active {
|
|
2188
|
-
transform: scale(0.96);
|
|
2207
|
+
outline: none;
|
|
2208
|
+
box-shadow: ${tokens.focusRing};
|
|
2189
2209
|
}
|
|
2190
2210
|
|
|
2191
2211
|
/* ========================================
|
|
@@ -2205,10 +2225,10 @@ function getStyles(options) {
|
|
|
2205
2225
|
.sv-title {
|
|
2206
2226
|
font-size: 21px;
|
|
2207
2227
|
font-weight: 600;
|
|
2208
|
-
letter-spacing: -0.
|
|
2228
|
+
letter-spacing: -0.02em;
|
|
2209
2229
|
line-height: 1.22;
|
|
2210
2230
|
margin: 0 0 7px 0;
|
|
2211
|
-
text-align:
|
|
2231
|
+
text-align: left;
|
|
2212
2232
|
color: ${tokens.textPrimary};
|
|
2213
2233
|
}
|
|
2214
2234
|
|
|
@@ -2218,10 +2238,17 @@ function getStyles(options) {
|
|
|
2218
2238
|
line-height: 1.5;
|
|
2219
2239
|
color: ${tokens.textSecondary};
|
|
2220
2240
|
margin: 0 0 16px 0;
|
|
2221
|
-
text-align:
|
|
2241
|
+
text-align: left;
|
|
2222
2242
|
text-wrap: balance;
|
|
2223
2243
|
}
|
|
2224
2244
|
|
|
2245
|
+
/* Icon-led ceremony screens (passkey set-up / sign-in) are a fully
|
|
2246
|
+
centered composition: the headline and subtitle follow the glyph. */
|
|
2247
|
+
div:has(> .sv-passkey-icon) ~ .sv-title,
|
|
2248
|
+
div:has(> .sv-passkey-icon) ~ .sv-subtitle {
|
|
2249
|
+
text-align: center;
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2225
2252
|
.sv-subtitle strong {
|
|
2226
2253
|
color: ${tokens.textPrimary};
|
|
2227
2254
|
font-weight: 500;
|
|
@@ -2250,12 +2277,12 @@ function getStyles(options) {
|
|
|
2250
2277
|
font-size: 15px;
|
|
2251
2278
|
font-weight: 400;
|
|
2252
2279
|
line-height: 1.4;
|
|
2253
|
-
border: 1px solid ${tokens.
|
|
2254
|
-
border-radius:
|
|
2280
|
+
border: 1px solid ${tokens.border};
|
|
2281
|
+
border-radius: 8px;
|
|
2255
2282
|
background: ${tokens.bgInput};
|
|
2256
2283
|
color: ${tokens.textPrimary};
|
|
2257
2284
|
box-sizing: border-box;
|
|
2258
|
-
box-shadow:
|
|
2285
|
+
box-shadow: ${tokens.shadowSm};
|
|
2259
2286
|
transition: border-color var(--sv-dur-fast) var(--sv-ease-standard), box-shadow var(--sv-dur-fast) var(--sv-ease-standard);
|
|
2260
2287
|
}
|
|
2261
2288
|
|
|
@@ -2285,7 +2312,7 @@ function getStyles(options) {
|
|
|
2285
2312
|
|
|
2286
2313
|
.sv-input.sv-input-error:focus,
|
|
2287
2314
|
.sv-input.sv-email-input-error:focus {
|
|
2288
|
-
box-shadow: 0 0 0 3px
|
|
2315
|
+
box-shadow: 0 0 0 3px ${tokens.errorLight};
|
|
2289
2316
|
}
|
|
2290
2317
|
|
|
2291
2318
|
/* ========================================
|
|
@@ -2304,15 +2331,15 @@ function getStyles(options) {
|
|
|
2304
2331
|
letter-spacing: -0.006em;
|
|
2305
2332
|
line-height: 1.35;
|
|
2306
2333
|
border: none;
|
|
2307
|
-
border-radius:
|
|
2334
|
+
border-radius: 8px;
|
|
2308
2335
|
cursor: pointer;
|
|
2309
|
-
transition: background var(--sv-dur-fast) var(--sv-ease-standard),
|
|
2336
|
+
transition: background var(--sv-dur-fast) var(--sv-ease-standard), box-shadow var(--sv-dur-fast) var(--sv-ease-standard);
|
|
2310
2337
|
box-sizing: border-box;
|
|
2311
2338
|
}
|
|
2312
2339
|
|
|
2313
2340
|
.sv-btn:focus-visible {
|
|
2314
|
-
outline:
|
|
2315
|
-
|
|
2341
|
+
outline: none;
|
|
2342
|
+
box-shadow: ${tokens.focusRing};
|
|
2316
2343
|
}
|
|
2317
2344
|
|
|
2318
2345
|
.sv-btn:disabled {
|
|
@@ -2320,8 +2347,9 @@ function getStyles(options) {
|
|
|
2320
2347
|
cursor: not-allowed;
|
|
2321
2348
|
}
|
|
2322
2349
|
|
|
2350
|
+
/* Press = visual compression via an inset shadow, never scale. */
|
|
2323
2351
|
.sv-btn:active:not(:disabled) {
|
|
2324
|
-
|
|
2352
|
+
box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.2);
|
|
2325
2353
|
}
|
|
2326
2354
|
|
|
2327
2355
|
/* Primary Button */
|
|
@@ -2337,7 +2365,7 @@ function getStyles(options) {
|
|
|
2337
2365
|
background: ${tokens.primaryHover};
|
|
2338
2366
|
}
|
|
2339
2367
|
|
|
2340
|
-
/* Secondary Button */
|
|
2368
|
+
/* Secondary Button — quiet: subtle fill, hairline border */
|
|
2341
2369
|
.sv-btn-secondary {
|
|
2342
2370
|
background: ${tokens.bgSubtle};
|
|
2343
2371
|
color: ${tokens.textPrimary};
|
|
@@ -2349,25 +2377,26 @@ function getStyles(options) {
|
|
|
2349
2377
|
border-color: ${tokens.borderHover};
|
|
2350
2378
|
}
|
|
2351
2379
|
|
|
2352
|
-
/* Method Button — a full-width row
|
|
2353
|
-
|
|
2380
|
+
/* Method Button — a full-width row with a nudging chevron affordance
|
|
2381
|
+
(added via ::after so no DOM change is needed). The card itself stays
|
|
2382
|
+
planted: hover is a quiet fill + border shift, no translate. */
|
|
2354
2383
|
.sv-btn-method {
|
|
2355
2384
|
position: relative;
|
|
2356
2385
|
background: ${tokens.bg};
|
|
2357
|
-
border: 1px solid ${tokens.
|
|
2358
|
-
border-radius:
|
|
2386
|
+
border: 1px solid ${tokens.border};
|
|
2387
|
+
border-radius: 10px;
|
|
2359
2388
|
color: ${tokens.textPrimary};
|
|
2360
2389
|
text-align: left;
|
|
2361
2390
|
padding: 15px 40px 15px 14px;
|
|
2362
2391
|
margin-bottom: 9px;
|
|
2363
|
-
/* Inset 2px on either side so the focus
|
|
2392
|
+
/* Inset 2px on either side so the focus ring (drawn outside the
|
|
2364
2393
|
border-box) has room to render without clipping against the
|
|
2365
2394
|
dialog's container edges. width:auto pairs with this to prevent
|
|
2366
2395
|
the row from forcing horizontal overflow. */
|
|
2367
2396
|
margin-left: 2px;
|
|
2368
2397
|
margin-right: 2px;
|
|
2369
2398
|
width: calc(100% - 4px);
|
|
2370
|
-
transition:
|
|
2399
|
+
transition: background var(--sv-dur-fast) var(--sv-ease-standard), border-color var(--sv-dur-fast) var(--sv-ease-standard);
|
|
2371
2400
|
}
|
|
2372
2401
|
|
|
2373
2402
|
.sv-btn-method::after {
|
|
@@ -2377,29 +2406,25 @@ function getStyles(options) {
|
|
|
2377
2406
|
top: 50%;
|
|
2378
2407
|
width: 8px;
|
|
2379
2408
|
height: 8px;
|
|
2380
|
-
border-right: 1.6px solid ${tokens.
|
|
2381
|
-
border-top: 1.6px solid ${tokens.
|
|
2409
|
+
border-right: 1.6px solid ${tokens.chevron};
|
|
2410
|
+
border-top: 1.6px solid ${tokens.chevron};
|
|
2382
2411
|
transform: translateY(-50%) rotate(45deg);
|
|
2383
2412
|
transition: transform var(--sv-dur-base) var(--sv-ease-out), border-color var(--sv-dur-fast) var(--sv-ease-standard);
|
|
2384
2413
|
}
|
|
2385
2414
|
|
|
2386
2415
|
.sv-btn-method:hover:not(:disabled)::after {
|
|
2387
2416
|
transform: translateY(-50%) translateX(3px) rotate(45deg);
|
|
2388
|
-
border-color: ${tokens.
|
|
2417
|
+
border-color: ${tokens.primary};
|
|
2389
2418
|
}
|
|
2390
2419
|
|
|
2391
|
-
/* The shared .sv-btn focus rule sets outline-offset:2px which sits
|
|
2392
|
-
outside the row's edges and gets clipped by the parent. Method
|
|
2393
|
-
rows are full-width by design, so render the focus indicator
|
|
2394
|
-
flush against the border instead. */
|
|
2395
2420
|
.sv-btn-method:focus-visible {
|
|
2396
|
-
outline
|
|
2421
|
+
outline: none;
|
|
2422
|
+
box-shadow: ${tokens.focusRing};
|
|
2397
2423
|
}
|
|
2398
2424
|
|
|
2399
2425
|
.sv-btn-method:hover:not(:disabled) {
|
|
2400
2426
|
background: ${tokens.bgSubtle};
|
|
2401
|
-
border-color: ${tokens.
|
|
2402
|
-
transform: translateY(-2px);
|
|
2427
|
+
border-color: ${tokens.borderHover};
|
|
2403
2428
|
}
|
|
2404
2429
|
|
|
2405
2430
|
.sv-btn-method:last-child {
|
|
@@ -2408,13 +2433,13 @@ function getStyles(options) {
|
|
|
2408
2433
|
|
|
2409
2434
|
/* Error Buttons */
|
|
2410
2435
|
.sv-btn-error-primary {
|
|
2411
|
-
background: ${tokens.
|
|
2436
|
+
background: ${tokens.danger};
|
|
2412
2437
|
color: ${tokens.textOnPrimary};
|
|
2413
2438
|
box-shadow: ${tokens.shadowSm};
|
|
2414
2439
|
}
|
|
2415
2440
|
|
|
2416
2441
|
.sv-btn-error-primary:hover:not(:disabled) {
|
|
2417
|
-
background:
|
|
2442
|
+
background: ${tokens.dangerHover};
|
|
2418
2443
|
}
|
|
2419
2444
|
|
|
2420
2445
|
.sv-btn-error-secondary {
|
|
@@ -2439,26 +2464,26 @@ function getStyles(options) {
|
|
|
2439
2464
|
width: 100%;
|
|
2440
2465
|
}
|
|
2441
2466
|
|
|
2467
|
+
/* Bare glyph slot — no container chrome. Quiet slate stroke that takes
|
|
2468
|
+
the accent on row hover. */
|
|
2442
2469
|
.sv-method-icon {
|
|
2443
|
-
width:
|
|
2444
|
-
height:
|
|
2470
|
+
width: 20px;
|
|
2471
|
+
height: 20px;
|
|
2445
2472
|
flex-shrink: 0;
|
|
2446
2473
|
display: flex;
|
|
2447
2474
|
align-items: center;
|
|
2448
2475
|
justify-content: center;
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
color: ${tokens.textSecondary};
|
|
2452
|
-
transition: background var(--sv-dur-fast) var(--sv-ease-standard);
|
|
2476
|
+
color: ${tokens.textMuted};
|
|
2477
|
+
transition: color var(--sv-dur-fast) var(--sv-ease-standard);
|
|
2453
2478
|
}
|
|
2454
2479
|
|
|
2455
2480
|
.sv-btn-method:hover:not(:disabled) .sv-method-icon {
|
|
2456
|
-
|
|
2481
|
+
color: ${tokens.primary};
|
|
2457
2482
|
}
|
|
2458
2483
|
|
|
2459
2484
|
.sv-method-icon svg {
|
|
2460
|
-
width:
|
|
2461
|
-
height:
|
|
2485
|
+
width: 20px;
|
|
2486
|
+
height: 20px;
|
|
2462
2487
|
}
|
|
2463
2488
|
|
|
2464
2489
|
.sv-method-text {
|
|
@@ -2467,13 +2492,13 @@ function getStyles(options) {
|
|
|
2467
2492
|
}
|
|
2468
2493
|
|
|
2469
2494
|
.sv-method-name {
|
|
2470
|
-
font-weight:
|
|
2471
|
-
font-size:
|
|
2495
|
+
font-weight: 600;
|
|
2496
|
+
font-size: 15px;
|
|
2472
2497
|
color: ${tokens.textPrimary};
|
|
2473
2498
|
}
|
|
2474
2499
|
|
|
2475
2500
|
.sv-method-description {
|
|
2476
|
-
font-size:
|
|
2501
|
+
font-size: 13px;
|
|
2477
2502
|
color: ${tokens.textMuted};
|
|
2478
2503
|
margin-top: 1px;
|
|
2479
2504
|
}
|
|
@@ -2498,12 +2523,12 @@ function getStyles(options) {
|
|
|
2498
2523
|
letter-spacing: 0;
|
|
2499
2524
|
font-variant-numeric: tabular-nums;
|
|
2500
2525
|
caret-color: transparent;
|
|
2501
|
-
border: 1px solid ${tokens.
|
|
2502
|
-
border-radius:
|
|
2526
|
+
border: 1px solid ${tokens.border};
|
|
2527
|
+
border-radius: 8px;
|
|
2503
2528
|
background: ${tokens.bgInput};
|
|
2504
2529
|
color: ${tokens.textPrimary};
|
|
2505
2530
|
box-sizing: border-box;
|
|
2506
|
-
transition: border-color var(--sv-dur-fast) var(--sv-ease-standard), box-shadow var(--sv-dur-fast) var(--sv-ease-standard)
|
|
2531
|
+
transition: border-color var(--sv-dur-fast) var(--sv-ease-standard), box-shadow var(--sv-dur-fast) var(--sv-ease-standard);
|
|
2507
2532
|
}
|
|
2508
2533
|
|
|
2509
2534
|
.sv-otp-digit:hover:not(:focus):not(:disabled) {
|
|
@@ -2514,7 +2539,6 @@ function getStyles(options) {
|
|
|
2514
2539
|
outline: none;
|
|
2515
2540
|
border-color: ${tokens.borderFocus};
|
|
2516
2541
|
box-shadow: 0 0 0 3px ${tokens.primaryLight};
|
|
2517
|
-
transform: translateY(-2px);
|
|
2518
2542
|
}
|
|
2519
2543
|
|
|
2520
2544
|
.sv-otp-digit:disabled {
|
|
@@ -2539,7 +2563,7 @@ function getStyles(options) {
|
|
|
2539
2563
|
border: none;
|
|
2540
2564
|
padding: 0;
|
|
2541
2565
|
margin-bottom: 16px;
|
|
2542
|
-
transition: color
|
|
2566
|
+
transition: color var(--sv-dur-fast) var(--sv-ease-standard);
|
|
2543
2567
|
}
|
|
2544
2568
|
|
|
2545
2569
|
.sv-back-link:hover:not(:disabled) {
|
|
@@ -2567,7 +2591,7 @@ function getStyles(options) {
|
|
|
2567
2591
|
padding: 10px 12px;
|
|
2568
2592
|
border-radius: 8px;
|
|
2569
2593
|
font-size: 13px;
|
|
2570
|
-
font-weight:
|
|
2594
|
+
font-weight: 500;
|
|
2571
2595
|
margin-bottom: 16px;
|
|
2572
2596
|
}
|
|
2573
2597
|
|
|
@@ -2623,7 +2647,7 @@ function getStyles(options) {
|
|
|
2623
2647
|
color: ${tokens.textSecondary};
|
|
2624
2648
|
text-decoration: none;
|
|
2625
2649
|
font-weight: 500;
|
|
2626
|
-
transition: color
|
|
2650
|
+
transition: color var(--sv-dur-fast) var(--sv-ease-standard);
|
|
2627
2651
|
}
|
|
2628
2652
|
|
|
2629
2653
|
.sv-footer-link:hover {
|
|
@@ -2683,7 +2707,7 @@ function getStyles(options) {
|
|
|
2683
2707
|
background: ${tokens.bgInput};
|
|
2684
2708
|
color: ${tokens.textPrimary};
|
|
2685
2709
|
box-sizing: border-box;
|
|
2686
|
-
transition: border-color
|
|
2710
|
+
transition: border-color var(--sv-dur-fast) var(--sv-ease-standard), box-shadow var(--sv-dur-fast) var(--sv-ease-standard);
|
|
2687
2711
|
}
|
|
2688
2712
|
|
|
2689
2713
|
.sv-email-input:hover:not(:focus):not(:disabled) {
|
|
@@ -2705,7 +2729,7 @@ function getStyles(options) {
|
|
|
2705
2729
|
}
|
|
2706
2730
|
|
|
2707
2731
|
.sv-email-input-error:focus {
|
|
2708
|
-
box-shadow: 0 0 0 3px
|
|
2732
|
+
box-shadow: 0 0 0 3px ${tokens.errorLight};
|
|
2709
2733
|
}
|
|
2710
2734
|
|
|
2711
2735
|
/* ========================================
|
|
@@ -2760,14 +2784,14 @@ function getStyles(options) {
|
|
|
2760
2784
|
.sv-error-code-label {
|
|
2761
2785
|
font-size: 10px;
|
|
2762
2786
|
font-weight: 600;
|
|
2763
|
-
color: ${isDark ? '#
|
|
2787
|
+
color: ${isDark ? '#e6443d' : '#991b1b'};
|
|
2764
2788
|
text-transform: uppercase;
|
|
2765
2789
|
letter-spacing: 0.05em;
|
|
2766
2790
|
}
|
|
2767
2791
|
|
|
2768
2792
|
.sv-error-code-value {
|
|
2769
2793
|
font-size: 11px;
|
|
2770
|
-
font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, 'Cascadia Mono', monospace;
|
|
2794
|
+
font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, 'Cascadia Mono', monospace;
|
|
2771
2795
|
color: ${tokens.error};
|
|
2772
2796
|
font-weight: 500;
|
|
2773
2797
|
}
|
|
@@ -2864,10 +2888,10 @@ function getStyles(options) {
|
|
|
2864
2888
|
justify-content: center;
|
|
2865
2889
|
background: transparent;
|
|
2866
2890
|
border: none;
|
|
2867
|
-
border-radius:
|
|
2891
|
+
border-radius: 6px;
|
|
2868
2892
|
cursor: pointer;
|
|
2869
2893
|
color: ${tokens.textMuted};
|
|
2870
|
-
transition: background
|
|
2894
|
+
transition: background var(--sv-dur-fast) var(--sv-ease-standard), color var(--sv-dur-fast) var(--sv-ease-standard);
|
|
2871
2895
|
z-index: 1;
|
|
2872
2896
|
}
|
|
2873
2897
|
|
|
@@ -2877,12 +2901,8 @@ function getStyles(options) {
|
|
|
2877
2901
|
}
|
|
2878
2902
|
|
|
2879
2903
|
.sv-floating-close:focus-visible {
|
|
2880
|
-
outline:
|
|
2881
|
-
|
|
2882
|
-
}
|
|
2883
|
-
|
|
2884
|
-
.sv-floating-close:active {
|
|
2885
|
-
transform: scale(0.96);
|
|
2904
|
+
outline: none;
|
|
2905
|
+
box-shadow: ${tokens.focusRing};
|
|
2886
2906
|
}
|
|
2887
2907
|
|
|
2888
2908
|
/* ========================================
|
|
@@ -2942,7 +2962,7 @@ function getStyles(options) {
|
|
|
2942
2962
|
|
|
2943
2963
|
.sv-not-activated-title {
|
|
2944
2964
|
font-size: 22px;
|
|
2945
|
-
font-weight:
|
|
2965
|
+
font-weight: 600;
|
|
2946
2966
|
letter-spacing: -0.02em;
|
|
2947
2967
|
line-height: 1.2;
|
|
2948
2968
|
margin: 0 0 10px 0;
|
|
@@ -2964,7 +2984,7 @@ function getStyles(options) {
|
|
|
2964
2984
|
gap: 4px;
|
|
2965
2985
|
padding: 14px 16px;
|
|
2966
2986
|
border: 1px solid ${tokens.border};
|
|
2967
|
-
border-radius:
|
|
2987
|
+
border-radius: 10px;
|
|
2968
2988
|
background: ${tokens.bgSubtle};
|
|
2969
2989
|
text-align: left;
|
|
2970
2990
|
margin-bottom: 22px;
|
|
@@ -3012,7 +3032,7 @@ function getStyles(options) {
|
|
|
3012
3032
|
font-size: 13px;
|
|
3013
3033
|
font-weight: 500;
|
|
3014
3034
|
color: ${tokens.textMuted};
|
|
3015
|
-
transition: color
|
|
3035
|
+
transition: color var(--sv-dur-fast) var(--sv-ease-standard);
|
|
3016
3036
|
align-self: center;
|
|
3017
3037
|
}
|
|
3018
3038
|
|
|
@@ -3021,8 +3041,8 @@ function getStyles(options) {
|
|
|
3021
3041
|
}
|
|
3022
3042
|
|
|
3023
3043
|
.sv-not-activated-dismiss:focus-visible {
|
|
3024
|
-
outline:
|
|
3025
|
-
|
|
3044
|
+
outline: none;
|
|
3045
|
+
box-shadow: ${tokens.focusRing};
|
|
3026
3046
|
border-radius: 6px;
|
|
3027
3047
|
}
|
|
3028
3048
|
|
|
@@ -3067,7 +3087,7 @@ function getStyles(options) {
|
|
|
3067
3087
|
border: none;
|
|
3068
3088
|
padding: 12px 0 0 0;
|
|
3069
3089
|
margin-top: 8px;
|
|
3070
|
-
transition: color
|
|
3090
|
+
transition: color var(--sv-dur-fast) var(--sv-ease-standard);
|
|
3071
3091
|
}
|
|
3072
3092
|
|
|
3073
3093
|
.sv-fallback-link:hover {
|
|
@@ -3128,7 +3148,7 @@ function getStyles(options) {
|
|
|
3128
3148
|
background: none;
|
|
3129
3149
|
border: none;
|
|
3130
3150
|
padding: 12px 0 0 0;
|
|
3131
|
-
transition: color
|
|
3151
|
+
transition: color var(--sv-dur-fast) var(--sv-ease-standard);
|
|
3132
3152
|
}
|
|
3133
3153
|
|
|
3134
3154
|
.sv-skip-link:hover {
|
|
@@ -3146,14 +3166,11 @@ function getStyles(options) {
|
|
|
3146
3166
|
margin-bottom: 16px;
|
|
3147
3167
|
}
|
|
3148
3168
|
|
|
3169
|
+
/* Bare glyph — no tinted circle container. */
|
|
3149
3170
|
.sv-sparklink-icon {
|
|
3150
|
-
width:
|
|
3151
|
-
height:
|
|
3152
|
-
color: ${tokens.
|
|
3153
|
-
background: ${tokens.primaryLight};
|
|
3154
|
-
padding: 14px;
|
|
3155
|
-
border-radius: 50%;
|
|
3156
|
-
box-sizing: content-box;
|
|
3171
|
+
width: 48px;
|
|
3172
|
+
height: 48px;
|
|
3173
|
+
color: ${tokens.textSecondary};
|
|
3157
3174
|
}
|
|
3158
3175
|
|
|
3159
3176
|
.sv-sparklink-waiting {
|
|
@@ -3179,7 +3196,7 @@ function getStyles(options) {
|
|
|
3179
3196
|
|
|
3180
3197
|
.sv-sparklink-waiting-text {
|
|
3181
3198
|
font-size: 13px;
|
|
3182
|
-
font-weight:
|
|
3199
|
+
font-weight: 500;
|
|
3183
3200
|
color: ${tokens.textSecondary};
|
|
3184
3201
|
}
|
|
3185
3202
|
|
|
@@ -3194,9 +3211,10 @@ function getStyles(options) {
|
|
|
3194
3211
|
}
|
|
3195
3212
|
|
|
3196
3213
|
.sv-sparklink-countdown-time {
|
|
3197
|
-
font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, 'Cascadia Mono', monospace;
|
|
3214
|
+
font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, 'Cascadia Mono', monospace;
|
|
3198
3215
|
font-weight: 600;
|
|
3199
3216
|
font-size: 14px;
|
|
3217
|
+
font-variant-numeric: tabular-nums;
|
|
3200
3218
|
color: ${tokens.textPrimary};
|
|
3201
3219
|
min-width: 40px;
|
|
3202
3220
|
}
|
|
@@ -3391,7 +3409,7 @@ function getStyles(options) {
|
|
|
3391
3409
|
margin-bottom: 0;
|
|
3392
3410
|
border-width: 0;
|
|
3393
3411
|
overflow: hidden;
|
|
3394
|
-
transition: opacity
|
|
3412
|
+
transition: opacity var(--sv-dur-slow) var(--sv-ease-standard);
|
|
3395
3413
|
}
|
|
3396
3414
|
|
|
3397
3415
|
.sv-bridge-alert.sv-shown {
|
|
@@ -3408,7 +3426,7 @@ function getStyles(options) {
|
|
|
3408
3426
|
width: 17px;
|
|
3409
3427
|
height: 17px;
|
|
3410
3428
|
margin-top: 1px;
|
|
3411
|
-
color:
|
|
3429
|
+
color: ${tokens.warningIcon};
|
|
3412
3430
|
}
|
|
3413
3431
|
|
|
3414
3432
|
/* Text stacked over the action, so the message keeps the full width and
|
|
@@ -3439,7 +3457,7 @@ function getStyles(options) {
|
|
|
3439
3457
|
}
|
|
3440
3458
|
|
|
3441
3459
|
.sv-bridge-retry:hover { color: ${tokens.primaryHover}; }
|
|
3442
|
-
.sv-bridge-retry:focus-visible { outline:
|
|
3460
|
+
.sv-bridge-retry:focus-visible { outline: none; box-shadow: ${tokens.focusRing}; border-radius: 4px; }
|
|
3443
3461
|
|
|
3444
3462
|
@media (prefers-reduced-motion: reduce) {
|
|
3445
3463
|
.sv-bridge-dots span { animation: none; opacity: 0.5; }
|
|
@@ -3492,8 +3510,9 @@ function getStyles(options) {
|
|
|
3492
3510
|
/**
|
|
3493
3511
|
* SVG Icon Factory
|
|
3494
3512
|
*
|
|
3495
|
-
*
|
|
3496
|
-
*
|
|
3513
|
+
* Bare outline glyphs per the SparkVault design system: stroke `currentColor`
|
|
3514
|
+
* so the stylesheet drives color, no tinted container backgrounds, round
|
|
3515
|
+
* caps/joins. Uses proper DOM element creation for security.
|
|
3497
3516
|
*/
|
|
3498
3517
|
function createSvgElement(viewBox, width = 16, height = 16) {
|
|
3499
3518
|
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
@@ -3561,88 +3580,63 @@ function createCloseIcon() {
|
|
|
3561
3580
|
return svg;
|
|
3562
3581
|
}
|
|
3563
3582
|
/**
|
|
3564
|
-
* Passkey icon -
|
|
3583
|
+
* Passkey icon - bare outline key design
|
|
3565
3584
|
*/
|
|
3566
3585
|
function createPasskeyIcon() {
|
|
3567
3586
|
const svg = createSvgElement('0 0 56 56', 56, 56);
|
|
3568
3587
|
svg.classList.add('sv-passkey-icon');
|
|
3569
|
-
//
|
|
3570
|
-
svg.appendChild(createCircle(28, 28, 26, {
|
|
3571
|
-
fill: '#EEF2FF',
|
|
3572
|
-
stroke: '#E0E7FF',
|
|
3573
|
-
'stroke-width': '1',
|
|
3574
|
-
}));
|
|
3575
|
-
// Key icon - centered at 28,28
|
|
3588
|
+
// Key glyph optically centered in the 56px box (footprint unchanged)
|
|
3576
3589
|
const group = document.createElementNS('http://www.w3.org/2000/svg', 'g');
|
|
3577
|
-
group.setAttribute('transform', 'translate(
|
|
3590
|
+
group.setAttribute('transform', 'translate(29.5, 26.5)');
|
|
3578
3591
|
const strokeAttrs = {
|
|
3579
|
-
stroke: '
|
|
3580
|
-
'stroke-width': '
|
|
3592
|
+
stroke: 'currentColor',
|
|
3593
|
+
'stroke-width': '3',
|
|
3581
3594
|
'stroke-linecap': 'round',
|
|
3582
3595
|
'stroke-linejoin': 'round',
|
|
3583
3596
|
fill: 'none',
|
|
3584
3597
|
};
|
|
3585
3598
|
// Key head (circle)
|
|
3586
|
-
group.appendChild(createCircle(-
|
|
3599
|
+
group.appendChild(createCircle(-9.5, -9.5, 9.5, strokeAttrs));
|
|
3587
3600
|
// Key shaft
|
|
3588
|
-
group.appendChild(createPath('M-
|
|
3601
|
+
group.appendChild(createPath('M-2.8 -2.8L16 16', strokeAttrs));
|
|
3589
3602
|
// Key teeth
|
|
3590
|
-
group.appendChild(createPath('
|
|
3591
|
-
group.appendChild(createPath('
|
|
3603
|
+
group.appendChild(createPath('M9.5 9.5L9.5 15.5', strokeAttrs));
|
|
3604
|
+
group.appendChild(createPath('M16 16L16 22', strokeAttrs));
|
|
3592
3605
|
svg.appendChild(group);
|
|
3593
3606
|
return svg;
|
|
3594
3607
|
}
|
|
3595
3608
|
/**
|
|
3596
|
-
*
|
|
3609
|
+
* Bare outline alert triangle shared by the error and expired icons.
|
|
3610
|
+
* Color comes from `currentColor` via the class-specific stylesheet rules.
|
|
3597
3611
|
*/
|
|
3598
|
-
function
|
|
3612
|
+
function createAlertTriangleIcon(className) {
|
|
3599
3613
|
const svg = createSvgElement('0 0 48 48', 48, 48);
|
|
3600
|
-
svg.classList.add(
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
stroke: '#FECACA',
|
|
3605
|
-
'stroke-width': '1',
|
|
3606
|
-
}));
|
|
3607
|
-
// Alert triangle
|
|
3608
|
-
const group = document.createElementNS('http://www.w3.org/2000/svg', 'g');
|
|
3609
|
-
group.setAttribute('transform', 'translate(10, 12)');
|
|
3610
|
-
group.appendChild(createPath('M14 4L2 24h24L14 4z', { fill: '#DC2626' }));
|
|
3611
|
-
// Exclamation
|
|
3612
|
-
group.appendChild(createPath('M14 10v5', {
|
|
3613
|
-
stroke: '#FFFFFF',
|
|
3614
|
-
'stroke-width': '2',
|
|
3614
|
+
svg.classList.add(className);
|
|
3615
|
+
const strokeAttrs = {
|
|
3616
|
+
stroke: 'currentColor',
|
|
3617
|
+
'stroke-width': '2.5',
|
|
3615
3618
|
'stroke-linecap': 'round',
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
+
'stroke-linejoin': 'round',
|
|
3620
|
+
fill: 'none',
|
|
3621
|
+
};
|
|
3622
|
+
// Triangle outline
|
|
3623
|
+
svg.appendChild(createPath('M24 9L5.5 39h37L24 9z', strokeAttrs));
|
|
3624
|
+
// Exclamation
|
|
3625
|
+
svg.appendChild(createPath('M24 20v8', strokeAttrs));
|
|
3626
|
+
svg.appendChild(createCircle(24, 33.5, 1.5, { fill: 'currentColor' }));
|
|
3619
3627
|
return svg;
|
|
3620
3628
|
}
|
|
3621
3629
|
/**
|
|
3622
|
-
*
|
|
3630
|
+
* Error icon - alert triangle for error states
|
|
3631
|
+
*/
|
|
3632
|
+
function createErrorIcon() {
|
|
3633
|
+
return createAlertTriangleIcon('sv-error-icon');
|
|
3634
|
+
}
|
|
3635
|
+
/**
|
|
3636
|
+
* Expired icon - alert triangle for expired states
|
|
3623
3637
|
*/
|
|
3624
3638
|
function createExpiredIcon() {
|
|
3625
|
-
|
|
3626
|
-
svg.classList.add('sv-expired-icon');
|
|
3627
|
-
// Circle background - muted gray
|
|
3628
|
-
svg.appendChild(createCircle(24, 24, 22, {
|
|
3629
|
-
fill: '#F5F5F5',
|
|
3630
|
-
stroke: '#E5E5E5',
|
|
3631
|
-
'stroke-width': '1',
|
|
3632
|
-
}));
|
|
3633
|
-
// Alert triangle - gray
|
|
3634
|
-
const group = document.createElementNS('http://www.w3.org/2000/svg', 'g');
|
|
3635
|
-
group.setAttribute('transform', 'translate(10, 12)');
|
|
3636
|
-
group.appendChild(createPath('M14 4L2 24h24L14 4z', { fill: '#737373' }));
|
|
3637
|
-
// Exclamation
|
|
3638
|
-
group.appendChild(createPath('M14 10v5', {
|
|
3639
|
-
stroke: '#FFFFFF',
|
|
3640
|
-
'stroke-width': '2',
|
|
3641
|
-
'stroke-linecap': 'round',
|
|
3642
|
-
}));
|
|
3643
|
-
group.appendChild(createCircle(14, 19, 1, { fill: '#FFFFFF' }));
|
|
3644
|
-
svg.appendChild(group);
|
|
3645
|
-
return svg;
|
|
3639
|
+
return createAlertTriangleIcon('sv-expired-icon');
|
|
3646
3640
|
}
|
|
3647
3641
|
/**
|
|
3648
3642
|
* Method icons
|