@sparkvault/sdk-js 8.6.1 → 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/styles.d.ts +5 -5
- package/dist/products/identity/views/icons.d.ts +7 -6
- package/dist/sparkvault.cjs.js +171 -188
- package/dist/sparkvault.cjs.js.map +1 -1
- package/dist/sparkvault.esm.js +171 -188
- 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
|
@@ -1959,12 +1959,12 @@ class SparkLinkHandler {
|
|
|
1959
1959
|
/**
|
|
1960
1960
|
* Identity Modal Styles
|
|
1961
1961
|
*
|
|
1962
|
-
*
|
|
1963
|
-
* -
|
|
1962
|
+
* SparkVault design system, product register:
|
|
1963
|
+
* - Quiet slate neutrals; Action Blue carries all interactivity
|
|
1964
1964
|
* - 4px base spacing unit for consistency
|
|
1965
|
-
* -
|
|
1966
|
-
* -
|
|
1967
|
-
* -
|
|
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
|
|
1968
1968
|
*/
|
|
1969
1969
|
const STYLE_ID$1 = 'sparkvault-identity-styles';
|
|
1970
1970
|
/**
|
|
@@ -2027,56 +2027,69 @@ function getStyles(options) {
|
|
|
2027
2027
|
// The brand accent is driven by the `--sv-primary` / `--sv-primary-hover`
|
|
2028
2028
|
// CSS custom properties so a host page (e.g. the SparkVault sign-in page) can
|
|
2029
2029
|
// tint the whole flow to the tenant's brand color by setting them on `:root`.
|
|
2030
|
-
// The literals are the fallback - when no host sets the variables the
|
|
2031
|
-
//
|
|
2032
|
-
// via color-mix so
|
|
2033
|
-
|
|
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)`;
|
|
2034
2039
|
const tokens = {
|
|
2035
2040
|
// Colors
|
|
2036
2041
|
primary: accent,
|
|
2037
|
-
primaryHover: 'var(--sv-primary-hover, #
|
|
2042
|
+
primaryHover: 'var(--sv-primary-hover, #0d5bcd)',
|
|
2038
2043
|
primaryLight: `color-mix(in srgb, ${accent} ${isDark ? '20%' : '9%'}, transparent)`,
|
|
2039
|
-
error: '#
|
|
2040
|
-
errorLight: isDark ? 'rgba(
|
|
2041
|
-
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',
|
|
2042
2052
|
// Backgrounds
|
|
2043
|
-
bg:
|
|
2044
|
-
bgSubtle: isDark ? '
|
|
2045
|
-
bgHover: isDark ? '
|
|
2046
|
-
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',
|
|
2047
2057
|
// Borders
|
|
2048
|
-
border: isDark ? '
|
|
2049
|
-
borderHover: isDark ? '
|
|
2058
|
+
border: isDark ? 'rgba(255, 255, 255, 0.10)' : '#e2e8f0',
|
|
2059
|
+
borderHover: isDark ? 'rgba(255, 255, 255, 0.18)' : '#cbd5e1',
|
|
2050
2060
|
borderFocus: accent,
|
|
2061
|
+
chevron: isDark ? 'rgba(255, 255, 255, 0.35)' : '#cbd5e1',
|
|
2051
2062
|
// Text
|
|
2052
|
-
textPrimary: isDark ? '
|
|
2053
|
-
textSecondary: isDark ? '
|
|
2054
|
-
textMuted: isDark ? '
|
|
2055
|
-
textOnPrimary: '#
|
|
2056
|
-
//
|
|
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.
|
|
2057
2070
|
shadowSm: isDark
|
|
2058
2071
|
? '0 1px 2px rgba(0, 0, 0, 0.4)'
|
|
2059
|
-
: '0 1px 2px rgba(0, 0, 0, 0.
|
|
2072
|
+
: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',
|
|
2060
2073
|
shadowLg: isDark
|
|
2061
|
-
? '0 8px 24px rgba(0, 0, 0, 0.
|
|
2062
|
-
: '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)',
|
|
2063
2076
|
};
|
|
2064
2077
|
return `
|
|
2065
2078
|
/* ========================================
|
|
2066
2079
|
MOTION SYSTEM — shared duration/easing tokens so every transition in
|
|
2067
|
-
the flow is consistent.
|
|
2068
|
-
|
|
2080
|
+
the flow is consistent. 120/180/280ms tiers; standard and decelerate
|
|
2081
|
+
curves only, never overshoot.
|
|
2069
2082
|
======================================== */
|
|
2070
2083
|
:root {
|
|
2071
|
-
--sv-dur-instant:
|
|
2072
|
-
--sv-dur-fast:
|
|
2073
|
-
--sv-dur-base:
|
|
2074
|
-
--sv-dur-slow:
|
|
2075
|
-
--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;
|
|
2076
2089
|
--sv-ease-standard: cubic-bezier(0.2, 0, 0, 1);
|
|
2077
|
-
--sv-ease-out: cubic-bezier(0
|
|
2078
|
-
--sv-ease-accelerate: cubic-bezier(0.
|
|
2079
|
-
--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);
|
|
2080
2093
|
}
|
|
2081
2094
|
|
|
2082
2095
|
/* Each mounted view enters with a calm fade + rise. Applied by the renderer
|
|
@@ -2101,7 +2114,7 @@ function getStyles(options) {
|
|
|
2101
2114
|
.sv-overlay {
|
|
2102
2115
|
position: fixed;
|
|
2103
2116
|
inset: 0;
|
|
2104
|
-
background: rgba(0, 0, 0,
|
|
2117
|
+
background: ${isDark ? 'rgba(0, 0, 0, 0.7)' : 'rgba(15, 23, 42, 0.6)'};
|
|
2105
2118
|
display: flex;
|
|
2106
2119
|
align-items: center;
|
|
2107
2120
|
justify-content: center;
|
|
@@ -2120,7 +2133,7 @@ function getStyles(options) {
|
|
|
2120
2133
|
|
|
2121
2134
|
.sv-modal {
|
|
2122
2135
|
background: ${tokens.bg};
|
|
2123
|
-
border-radius:
|
|
2136
|
+
border-radius: 12px;
|
|
2124
2137
|
box-shadow: ${tokens.shadowLg};
|
|
2125
2138
|
width: 100%;
|
|
2126
2139
|
max-width: 400px;
|
|
@@ -2141,7 +2154,7 @@ function getStyles(options) {
|
|
|
2141
2154
|
padding: 14px 20px;
|
|
2142
2155
|
border-bottom: 1px solid ${tokens.border};
|
|
2143
2156
|
background: ${tokens.bg};
|
|
2144
|
-
border-radius:
|
|
2157
|
+
border-radius: 12px 12px 0 0;
|
|
2145
2158
|
flex-shrink: 0;
|
|
2146
2159
|
}
|
|
2147
2160
|
|
|
@@ -2179,10 +2192,10 @@ function getStyles(options) {
|
|
|
2179
2192
|
justify-content: center;
|
|
2180
2193
|
background: ${tokens.bgSubtle};
|
|
2181
2194
|
border: none;
|
|
2182
|
-
border-radius:
|
|
2195
|
+
border-radius: 6px;
|
|
2183
2196
|
cursor: pointer;
|
|
2184
2197
|
color: ${tokens.textSecondary};
|
|
2185
|
-
transition: background
|
|
2198
|
+
transition: background var(--sv-dur-fast) var(--sv-ease-standard), color var(--sv-dur-fast) var(--sv-ease-standard);
|
|
2186
2199
|
}
|
|
2187
2200
|
|
|
2188
2201
|
.sv-close-btn:hover {
|
|
@@ -2191,12 +2204,8 @@ function getStyles(options) {
|
|
|
2191
2204
|
}
|
|
2192
2205
|
|
|
2193
2206
|
.sv-close-btn:focus-visible {
|
|
2194
|
-
outline:
|
|
2195
|
-
|
|
2196
|
-
}
|
|
2197
|
-
|
|
2198
|
-
.sv-close-btn:active {
|
|
2199
|
-
transform: scale(0.96);
|
|
2207
|
+
outline: none;
|
|
2208
|
+
box-shadow: ${tokens.focusRing};
|
|
2200
2209
|
}
|
|
2201
2210
|
|
|
2202
2211
|
/* ========================================
|
|
@@ -2216,10 +2225,10 @@ function getStyles(options) {
|
|
|
2216
2225
|
.sv-title {
|
|
2217
2226
|
font-size: 21px;
|
|
2218
2227
|
font-weight: 600;
|
|
2219
|
-
letter-spacing: -0.
|
|
2228
|
+
letter-spacing: -0.02em;
|
|
2220
2229
|
line-height: 1.22;
|
|
2221
2230
|
margin: 0 0 7px 0;
|
|
2222
|
-
text-align:
|
|
2231
|
+
text-align: left;
|
|
2223
2232
|
color: ${tokens.textPrimary};
|
|
2224
2233
|
}
|
|
2225
2234
|
|
|
@@ -2229,10 +2238,17 @@ function getStyles(options) {
|
|
|
2229
2238
|
line-height: 1.5;
|
|
2230
2239
|
color: ${tokens.textSecondary};
|
|
2231
2240
|
margin: 0 0 16px 0;
|
|
2232
|
-
text-align:
|
|
2241
|
+
text-align: left;
|
|
2233
2242
|
text-wrap: balance;
|
|
2234
2243
|
}
|
|
2235
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
|
+
|
|
2236
2252
|
.sv-subtitle strong {
|
|
2237
2253
|
color: ${tokens.textPrimary};
|
|
2238
2254
|
font-weight: 500;
|
|
@@ -2261,12 +2277,12 @@ function getStyles(options) {
|
|
|
2261
2277
|
font-size: 15px;
|
|
2262
2278
|
font-weight: 400;
|
|
2263
2279
|
line-height: 1.4;
|
|
2264
|
-
border: 1px solid ${tokens.
|
|
2265
|
-
border-radius:
|
|
2280
|
+
border: 1px solid ${tokens.border};
|
|
2281
|
+
border-radius: 8px;
|
|
2266
2282
|
background: ${tokens.bgInput};
|
|
2267
2283
|
color: ${tokens.textPrimary};
|
|
2268
2284
|
box-sizing: border-box;
|
|
2269
|
-
box-shadow:
|
|
2285
|
+
box-shadow: ${tokens.shadowSm};
|
|
2270
2286
|
transition: border-color var(--sv-dur-fast) var(--sv-ease-standard), box-shadow var(--sv-dur-fast) var(--sv-ease-standard);
|
|
2271
2287
|
}
|
|
2272
2288
|
|
|
@@ -2296,7 +2312,7 @@ function getStyles(options) {
|
|
|
2296
2312
|
|
|
2297
2313
|
.sv-input.sv-input-error:focus,
|
|
2298
2314
|
.sv-input.sv-email-input-error:focus {
|
|
2299
|
-
box-shadow: 0 0 0 3px
|
|
2315
|
+
box-shadow: 0 0 0 3px ${tokens.errorLight};
|
|
2300
2316
|
}
|
|
2301
2317
|
|
|
2302
2318
|
/* ========================================
|
|
@@ -2315,15 +2331,15 @@ function getStyles(options) {
|
|
|
2315
2331
|
letter-spacing: -0.006em;
|
|
2316
2332
|
line-height: 1.35;
|
|
2317
2333
|
border: none;
|
|
2318
|
-
border-radius:
|
|
2334
|
+
border-radius: 8px;
|
|
2319
2335
|
cursor: pointer;
|
|
2320
|
-
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);
|
|
2321
2337
|
box-sizing: border-box;
|
|
2322
2338
|
}
|
|
2323
2339
|
|
|
2324
2340
|
.sv-btn:focus-visible {
|
|
2325
|
-
outline:
|
|
2326
|
-
|
|
2341
|
+
outline: none;
|
|
2342
|
+
box-shadow: ${tokens.focusRing};
|
|
2327
2343
|
}
|
|
2328
2344
|
|
|
2329
2345
|
.sv-btn:disabled {
|
|
@@ -2331,8 +2347,9 @@ function getStyles(options) {
|
|
|
2331
2347
|
cursor: not-allowed;
|
|
2332
2348
|
}
|
|
2333
2349
|
|
|
2350
|
+
/* Press = visual compression via an inset shadow, never scale. */
|
|
2334
2351
|
.sv-btn:active:not(:disabled) {
|
|
2335
|
-
|
|
2352
|
+
box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.2);
|
|
2336
2353
|
}
|
|
2337
2354
|
|
|
2338
2355
|
/* Primary Button */
|
|
@@ -2348,7 +2365,7 @@ function getStyles(options) {
|
|
|
2348
2365
|
background: ${tokens.primaryHover};
|
|
2349
2366
|
}
|
|
2350
2367
|
|
|
2351
|
-
/* Secondary Button */
|
|
2368
|
+
/* Secondary Button — quiet: subtle fill, hairline border */
|
|
2352
2369
|
.sv-btn-secondary {
|
|
2353
2370
|
background: ${tokens.bgSubtle};
|
|
2354
2371
|
color: ${tokens.textPrimary};
|
|
@@ -2360,25 +2377,26 @@ function getStyles(options) {
|
|
|
2360
2377
|
border-color: ${tokens.borderHover};
|
|
2361
2378
|
}
|
|
2362
2379
|
|
|
2363
|
-
/* Method Button — a full-width row
|
|
2364
|
-
|
|
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. */
|
|
2365
2383
|
.sv-btn-method {
|
|
2366
2384
|
position: relative;
|
|
2367
2385
|
background: ${tokens.bg};
|
|
2368
|
-
border: 1px solid ${tokens.
|
|
2369
|
-
border-radius:
|
|
2386
|
+
border: 1px solid ${tokens.border};
|
|
2387
|
+
border-radius: 10px;
|
|
2370
2388
|
color: ${tokens.textPrimary};
|
|
2371
2389
|
text-align: left;
|
|
2372
2390
|
padding: 15px 40px 15px 14px;
|
|
2373
2391
|
margin-bottom: 9px;
|
|
2374
|
-
/* Inset 2px on either side so the focus
|
|
2392
|
+
/* Inset 2px on either side so the focus ring (drawn outside the
|
|
2375
2393
|
border-box) has room to render without clipping against the
|
|
2376
2394
|
dialog's container edges. width:auto pairs with this to prevent
|
|
2377
2395
|
the row from forcing horizontal overflow. */
|
|
2378
2396
|
margin-left: 2px;
|
|
2379
2397
|
margin-right: 2px;
|
|
2380
2398
|
width: calc(100% - 4px);
|
|
2381
|
-
transition:
|
|
2399
|
+
transition: background var(--sv-dur-fast) var(--sv-ease-standard), border-color var(--sv-dur-fast) var(--sv-ease-standard);
|
|
2382
2400
|
}
|
|
2383
2401
|
|
|
2384
2402
|
.sv-btn-method::after {
|
|
@@ -2388,29 +2406,25 @@ function getStyles(options) {
|
|
|
2388
2406
|
top: 50%;
|
|
2389
2407
|
width: 8px;
|
|
2390
2408
|
height: 8px;
|
|
2391
|
-
border-right: 1.6px solid ${tokens.
|
|
2392
|
-
border-top: 1.6px solid ${tokens.
|
|
2409
|
+
border-right: 1.6px solid ${tokens.chevron};
|
|
2410
|
+
border-top: 1.6px solid ${tokens.chevron};
|
|
2393
2411
|
transform: translateY(-50%) rotate(45deg);
|
|
2394
2412
|
transition: transform var(--sv-dur-base) var(--sv-ease-out), border-color var(--sv-dur-fast) var(--sv-ease-standard);
|
|
2395
2413
|
}
|
|
2396
2414
|
|
|
2397
2415
|
.sv-btn-method:hover:not(:disabled)::after {
|
|
2398
2416
|
transform: translateY(-50%) translateX(3px) rotate(45deg);
|
|
2399
|
-
border-color: ${tokens.
|
|
2417
|
+
border-color: ${tokens.primary};
|
|
2400
2418
|
}
|
|
2401
2419
|
|
|
2402
|
-
/* The shared .sv-btn focus rule sets outline-offset:2px which sits
|
|
2403
|
-
outside the row's edges and gets clipped by the parent. Method
|
|
2404
|
-
rows are full-width by design, so render the focus indicator
|
|
2405
|
-
flush against the border instead. */
|
|
2406
2420
|
.sv-btn-method:focus-visible {
|
|
2407
|
-
outline
|
|
2421
|
+
outline: none;
|
|
2422
|
+
box-shadow: ${tokens.focusRing};
|
|
2408
2423
|
}
|
|
2409
2424
|
|
|
2410
2425
|
.sv-btn-method:hover:not(:disabled) {
|
|
2411
2426
|
background: ${tokens.bgSubtle};
|
|
2412
|
-
border-color: ${tokens.
|
|
2413
|
-
transform: translateY(-2px);
|
|
2427
|
+
border-color: ${tokens.borderHover};
|
|
2414
2428
|
}
|
|
2415
2429
|
|
|
2416
2430
|
.sv-btn-method:last-child {
|
|
@@ -2419,13 +2433,13 @@ function getStyles(options) {
|
|
|
2419
2433
|
|
|
2420
2434
|
/* Error Buttons */
|
|
2421
2435
|
.sv-btn-error-primary {
|
|
2422
|
-
background: ${tokens.
|
|
2436
|
+
background: ${tokens.danger};
|
|
2423
2437
|
color: ${tokens.textOnPrimary};
|
|
2424
2438
|
box-shadow: ${tokens.shadowSm};
|
|
2425
2439
|
}
|
|
2426
2440
|
|
|
2427
2441
|
.sv-btn-error-primary:hover:not(:disabled) {
|
|
2428
|
-
background:
|
|
2442
|
+
background: ${tokens.dangerHover};
|
|
2429
2443
|
}
|
|
2430
2444
|
|
|
2431
2445
|
.sv-btn-error-secondary {
|
|
@@ -2450,26 +2464,26 @@ function getStyles(options) {
|
|
|
2450
2464
|
width: 100%;
|
|
2451
2465
|
}
|
|
2452
2466
|
|
|
2467
|
+
/* Bare glyph slot — no container chrome. Quiet slate stroke that takes
|
|
2468
|
+
the accent on row hover. */
|
|
2453
2469
|
.sv-method-icon {
|
|
2454
|
-
width:
|
|
2455
|
-
height:
|
|
2470
|
+
width: 20px;
|
|
2471
|
+
height: 20px;
|
|
2456
2472
|
flex-shrink: 0;
|
|
2457
2473
|
display: flex;
|
|
2458
2474
|
align-items: center;
|
|
2459
2475
|
justify-content: center;
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
color: ${tokens.textSecondary};
|
|
2463
|
-
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);
|
|
2464
2478
|
}
|
|
2465
2479
|
|
|
2466
2480
|
.sv-btn-method:hover:not(:disabled) .sv-method-icon {
|
|
2467
|
-
|
|
2481
|
+
color: ${tokens.primary};
|
|
2468
2482
|
}
|
|
2469
2483
|
|
|
2470
2484
|
.sv-method-icon svg {
|
|
2471
|
-
width:
|
|
2472
|
-
height:
|
|
2485
|
+
width: 20px;
|
|
2486
|
+
height: 20px;
|
|
2473
2487
|
}
|
|
2474
2488
|
|
|
2475
2489
|
.sv-method-text {
|
|
@@ -2478,13 +2492,13 @@ function getStyles(options) {
|
|
|
2478
2492
|
}
|
|
2479
2493
|
|
|
2480
2494
|
.sv-method-name {
|
|
2481
|
-
font-weight:
|
|
2482
|
-
font-size:
|
|
2495
|
+
font-weight: 600;
|
|
2496
|
+
font-size: 15px;
|
|
2483
2497
|
color: ${tokens.textPrimary};
|
|
2484
2498
|
}
|
|
2485
2499
|
|
|
2486
2500
|
.sv-method-description {
|
|
2487
|
-
font-size:
|
|
2501
|
+
font-size: 13px;
|
|
2488
2502
|
color: ${tokens.textMuted};
|
|
2489
2503
|
margin-top: 1px;
|
|
2490
2504
|
}
|
|
@@ -2509,12 +2523,12 @@ function getStyles(options) {
|
|
|
2509
2523
|
letter-spacing: 0;
|
|
2510
2524
|
font-variant-numeric: tabular-nums;
|
|
2511
2525
|
caret-color: transparent;
|
|
2512
|
-
border: 1px solid ${tokens.
|
|
2513
|
-
border-radius:
|
|
2526
|
+
border: 1px solid ${tokens.border};
|
|
2527
|
+
border-radius: 8px;
|
|
2514
2528
|
background: ${tokens.bgInput};
|
|
2515
2529
|
color: ${tokens.textPrimary};
|
|
2516
2530
|
box-sizing: border-box;
|
|
2517
|
-
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);
|
|
2518
2532
|
}
|
|
2519
2533
|
|
|
2520
2534
|
.sv-otp-digit:hover:not(:focus):not(:disabled) {
|
|
@@ -2525,7 +2539,6 @@ function getStyles(options) {
|
|
|
2525
2539
|
outline: none;
|
|
2526
2540
|
border-color: ${tokens.borderFocus};
|
|
2527
2541
|
box-shadow: 0 0 0 3px ${tokens.primaryLight};
|
|
2528
|
-
transform: translateY(-2px);
|
|
2529
2542
|
}
|
|
2530
2543
|
|
|
2531
2544
|
.sv-otp-digit:disabled {
|
|
@@ -2550,7 +2563,7 @@ function getStyles(options) {
|
|
|
2550
2563
|
border: none;
|
|
2551
2564
|
padding: 0;
|
|
2552
2565
|
margin-bottom: 16px;
|
|
2553
|
-
transition: color
|
|
2566
|
+
transition: color var(--sv-dur-fast) var(--sv-ease-standard);
|
|
2554
2567
|
}
|
|
2555
2568
|
|
|
2556
2569
|
.sv-back-link:hover:not(:disabled) {
|
|
@@ -2578,7 +2591,7 @@ function getStyles(options) {
|
|
|
2578
2591
|
padding: 10px 12px;
|
|
2579
2592
|
border-radius: 8px;
|
|
2580
2593
|
font-size: 13px;
|
|
2581
|
-
font-weight:
|
|
2594
|
+
font-weight: 500;
|
|
2582
2595
|
margin-bottom: 16px;
|
|
2583
2596
|
}
|
|
2584
2597
|
|
|
@@ -2634,7 +2647,7 @@ function getStyles(options) {
|
|
|
2634
2647
|
color: ${tokens.textSecondary};
|
|
2635
2648
|
text-decoration: none;
|
|
2636
2649
|
font-weight: 500;
|
|
2637
|
-
transition: color
|
|
2650
|
+
transition: color var(--sv-dur-fast) var(--sv-ease-standard);
|
|
2638
2651
|
}
|
|
2639
2652
|
|
|
2640
2653
|
.sv-footer-link:hover {
|
|
@@ -2694,7 +2707,7 @@ function getStyles(options) {
|
|
|
2694
2707
|
background: ${tokens.bgInput};
|
|
2695
2708
|
color: ${tokens.textPrimary};
|
|
2696
2709
|
box-sizing: border-box;
|
|
2697
|
-
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);
|
|
2698
2711
|
}
|
|
2699
2712
|
|
|
2700
2713
|
.sv-email-input:hover:not(:focus):not(:disabled) {
|
|
@@ -2716,7 +2729,7 @@ function getStyles(options) {
|
|
|
2716
2729
|
}
|
|
2717
2730
|
|
|
2718
2731
|
.sv-email-input-error:focus {
|
|
2719
|
-
box-shadow: 0 0 0 3px
|
|
2732
|
+
box-shadow: 0 0 0 3px ${tokens.errorLight};
|
|
2720
2733
|
}
|
|
2721
2734
|
|
|
2722
2735
|
/* ========================================
|
|
@@ -2771,14 +2784,14 @@ function getStyles(options) {
|
|
|
2771
2784
|
.sv-error-code-label {
|
|
2772
2785
|
font-size: 10px;
|
|
2773
2786
|
font-weight: 600;
|
|
2774
|
-
color: ${isDark ? '#
|
|
2787
|
+
color: ${isDark ? '#e6443d' : '#991b1b'};
|
|
2775
2788
|
text-transform: uppercase;
|
|
2776
2789
|
letter-spacing: 0.05em;
|
|
2777
2790
|
}
|
|
2778
2791
|
|
|
2779
2792
|
.sv-error-code-value {
|
|
2780
2793
|
font-size: 11px;
|
|
2781
|
-
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;
|
|
2782
2795
|
color: ${tokens.error};
|
|
2783
2796
|
font-weight: 500;
|
|
2784
2797
|
}
|
|
@@ -2875,10 +2888,10 @@ function getStyles(options) {
|
|
|
2875
2888
|
justify-content: center;
|
|
2876
2889
|
background: transparent;
|
|
2877
2890
|
border: none;
|
|
2878
|
-
border-radius:
|
|
2891
|
+
border-radius: 6px;
|
|
2879
2892
|
cursor: pointer;
|
|
2880
2893
|
color: ${tokens.textMuted};
|
|
2881
|
-
transition: background
|
|
2894
|
+
transition: background var(--sv-dur-fast) var(--sv-ease-standard), color var(--sv-dur-fast) var(--sv-ease-standard);
|
|
2882
2895
|
z-index: 1;
|
|
2883
2896
|
}
|
|
2884
2897
|
|
|
@@ -2888,12 +2901,8 @@ function getStyles(options) {
|
|
|
2888
2901
|
}
|
|
2889
2902
|
|
|
2890
2903
|
.sv-floating-close:focus-visible {
|
|
2891
|
-
outline:
|
|
2892
|
-
|
|
2893
|
-
}
|
|
2894
|
-
|
|
2895
|
-
.sv-floating-close:active {
|
|
2896
|
-
transform: scale(0.96);
|
|
2904
|
+
outline: none;
|
|
2905
|
+
box-shadow: ${tokens.focusRing};
|
|
2897
2906
|
}
|
|
2898
2907
|
|
|
2899
2908
|
/* ========================================
|
|
@@ -2953,7 +2962,7 @@ function getStyles(options) {
|
|
|
2953
2962
|
|
|
2954
2963
|
.sv-not-activated-title {
|
|
2955
2964
|
font-size: 22px;
|
|
2956
|
-
font-weight:
|
|
2965
|
+
font-weight: 600;
|
|
2957
2966
|
letter-spacing: -0.02em;
|
|
2958
2967
|
line-height: 1.2;
|
|
2959
2968
|
margin: 0 0 10px 0;
|
|
@@ -2975,7 +2984,7 @@ function getStyles(options) {
|
|
|
2975
2984
|
gap: 4px;
|
|
2976
2985
|
padding: 14px 16px;
|
|
2977
2986
|
border: 1px solid ${tokens.border};
|
|
2978
|
-
border-radius:
|
|
2987
|
+
border-radius: 10px;
|
|
2979
2988
|
background: ${tokens.bgSubtle};
|
|
2980
2989
|
text-align: left;
|
|
2981
2990
|
margin-bottom: 22px;
|
|
@@ -3023,7 +3032,7 @@ function getStyles(options) {
|
|
|
3023
3032
|
font-size: 13px;
|
|
3024
3033
|
font-weight: 500;
|
|
3025
3034
|
color: ${tokens.textMuted};
|
|
3026
|
-
transition: color
|
|
3035
|
+
transition: color var(--sv-dur-fast) var(--sv-ease-standard);
|
|
3027
3036
|
align-self: center;
|
|
3028
3037
|
}
|
|
3029
3038
|
|
|
@@ -3032,8 +3041,8 @@ function getStyles(options) {
|
|
|
3032
3041
|
}
|
|
3033
3042
|
|
|
3034
3043
|
.sv-not-activated-dismiss:focus-visible {
|
|
3035
|
-
outline:
|
|
3036
|
-
|
|
3044
|
+
outline: none;
|
|
3045
|
+
box-shadow: ${tokens.focusRing};
|
|
3037
3046
|
border-radius: 6px;
|
|
3038
3047
|
}
|
|
3039
3048
|
|
|
@@ -3078,7 +3087,7 @@ function getStyles(options) {
|
|
|
3078
3087
|
border: none;
|
|
3079
3088
|
padding: 12px 0 0 0;
|
|
3080
3089
|
margin-top: 8px;
|
|
3081
|
-
transition: color
|
|
3090
|
+
transition: color var(--sv-dur-fast) var(--sv-ease-standard);
|
|
3082
3091
|
}
|
|
3083
3092
|
|
|
3084
3093
|
.sv-fallback-link:hover {
|
|
@@ -3139,7 +3148,7 @@ function getStyles(options) {
|
|
|
3139
3148
|
background: none;
|
|
3140
3149
|
border: none;
|
|
3141
3150
|
padding: 12px 0 0 0;
|
|
3142
|
-
transition: color
|
|
3151
|
+
transition: color var(--sv-dur-fast) var(--sv-ease-standard);
|
|
3143
3152
|
}
|
|
3144
3153
|
|
|
3145
3154
|
.sv-skip-link:hover {
|
|
@@ -3157,14 +3166,11 @@ function getStyles(options) {
|
|
|
3157
3166
|
margin-bottom: 16px;
|
|
3158
3167
|
}
|
|
3159
3168
|
|
|
3169
|
+
/* Bare glyph — no tinted circle container. */
|
|
3160
3170
|
.sv-sparklink-icon {
|
|
3161
|
-
width:
|
|
3162
|
-
height:
|
|
3163
|
-
color: ${tokens.
|
|
3164
|
-
background: ${tokens.primaryLight};
|
|
3165
|
-
padding: 14px;
|
|
3166
|
-
border-radius: 50%;
|
|
3167
|
-
box-sizing: content-box;
|
|
3171
|
+
width: 48px;
|
|
3172
|
+
height: 48px;
|
|
3173
|
+
color: ${tokens.textSecondary};
|
|
3168
3174
|
}
|
|
3169
3175
|
|
|
3170
3176
|
.sv-sparklink-waiting {
|
|
@@ -3190,7 +3196,7 @@ function getStyles(options) {
|
|
|
3190
3196
|
|
|
3191
3197
|
.sv-sparklink-waiting-text {
|
|
3192
3198
|
font-size: 13px;
|
|
3193
|
-
font-weight:
|
|
3199
|
+
font-weight: 500;
|
|
3194
3200
|
color: ${tokens.textSecondary};
|
|
3195
3201
|
}
|
|
3196
3202
|
|
|
@@ -3205,9 +3211,10 @@ function getStyles(options) {
|
|
|
3205
3211
|
}
|
|
3206
3212
|
|
|
3207
3213
|
.sv-sparklink-countdown-time {
|
|
3208
|
-
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;
|
|
3209
3215
|
font-weight: 600;
|
|
3210
3216
|
font-size: 14px;
|
|
3217
|
+
font-variant-numeric: tabular-nums;
|
|
3211
3218
|
color: ${tokens.textPrimary};
|
|
3212
3219
|
min-width: 40px;
|
|
3213
3220
|
}
|
|
@@ -3402,7 +3409,7 @@ function getStyles(options) {
|
|
|
3402
3409
|
margin-bottom: 0;
|
|
3403
3410
|
border-width: 0;
|
|
3404
3411
|
overflow: hidden;
|
|
3405
|
-
transition: opacity
|
|
3412
|
+
transition: opacity var(--sv-dur-slow) var(--sv-ease-standard);
|
|
3406
3413
|
}
|
|
3407
3414
|
|
|
3408
3415
|
.sv-bridge-alert.sv-shown {
|
|
@@ -3419,7 +3426,7 @@ function getStyles(options) {
|
|
|
3419
3426
|
width: 17px;
|
|
3420
3427
|
height: 17px;
|
|
3421
3428
|
margin-top: 1px;
|
|
3422
|
-
color:
|
|
3429
|
+
color: ${tokens.warningIcon};
|
|
3423
3430
|
}
|
|
3424
3431
|
|
|
3425
3432
|
/* Text stacked over the action, so the message keeps the full width and
|
|
@@ -3450,7 +3457,7 @@ function getStyles(options) {
|
|
|
3450
3457
|
}
|
|
3451
3458
|
|
|
3452
3459
|
.sv-bridge-retry:hover { color: ${tokens.primaryHover}; }
|
|
3453
|
-
.sv-bridge-retry:focus-visible { outline:
|
|
3460
|
+
.sv-bridge-retry:focus-visible { outline: none; box-shadow: ${tokens.focusRing}; border-radius: 4px; }
|
|
3454
3461
|
|
|
3455
3462
|
@media (prefers-reduced-motion: reduce) {
|
|
3456
3463
|
.sv-bridge-dots span { animation: none; opacity: 0.5; }
|
|
@@ -3503,8 +3510,9 @@ function getStyles(options) {
|
|
|
3503
3510
|
/**
|
|
3504
3511
|
* SVG Icon Factory
|
|
3505
3512
|
*
|
|
3506
|
-
*
|
|
3507
|
-
*
|
|
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.
|
|
3508
3516
|
*/
|
|
3509
3517
|
function createSvgElement(viewBox, width = 16, height = 16) {
|
|
3510
3518
|
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
@@ -3572,88 +3580,63 @@ function createCloseIcon() {
|
|
|
3572
3580
|
return svg;
|
|
3573
3581
|
}
|
|
3574
3582
|
/**
|
|
3575
|
-
* Passkey icon -
|
|
3583
|
+
* Passkey icon - bare outline key design
|
|
3576
3584
|
*/
|
|
3577
3585
|
function createPasskeyIcon() {
|
|
3578
3586
|
const svg = createSvgElement('0 0 56 56', 56, 56);
|
|
3579
3587
|
svg.classList.add('sv-passkey-icon');
|
|
3580
|
-
//
|
|
3581
|
-
svg.appendChild(createCircle(28, 28, 26, {
|
|
3582
|
-
fill: '#EEF2FF',
|
|
3583
|
-
stroke: '#E0E7FF',
|
|
3584
|
-
'stroke-width': '1',
|
|
3585
|
-
}));
|
|
3586
|
-
// Key icon - centered at 28,28
|
|
3588
|
+
// Key glyph optically centered in the 56px box (footprint unchanged)
|
|
3587
3589
|
const group = document.createElementNS('http://www.w3.org/2000/svg', 'g');
|
|
3588
|
-
group.setAttribute('transform', 'translate(
|
|
3590
|
+
group.setAttribute('transform', 'translate(29.5, 26.5)');
|
|
3589
3591
|
const strokeAttrs = {
|
|
3590
|
-
stroke: '
|
|
3591
|
-
'stroke-width': '
|
|
3592
|
+
stroke: 'currentColor',
|
|
3593
|
+
'stroke-width': '3',
|
|
3592
3594
|
'stroke-linecap': 'round',
|
|
3593
3595
|
'stroke-linejoin': 'round',
|
|
3594
3596
|
fill: 'none',
|
|
3595
3597
|
};
|
|
3596
3598
|
// Key head (circle)
|
|
3597
|
-
group.appendChild(createCircle(-
|
|
3599
|
+
group.appendChild(createCircle(-9.5, -9.5, 9.5, strokeAttrs));
|
|
3598
3600
|
// Key shaft
|
|
3599
|
-
group.appendChild(createPath('M-
|
|
3601
|
+
group.appendChild(createPath('M-2.8 -2.8L16 16', strokeAttrs));
|
|
3600
3602
|
// Key teeth
|
|
3601
|
-
group.appendChild(createPath('
|
|
3602
|
-
group.appendChild(createPath('
|
|
3603
|
+
group.appendChild(createPath('M9.5 9.5L9.5 15.5', strokeAttrs));
|
|
3604
|
+
group.appendChild(createPath('M16 16L16 22', strokeAttrs));
|
|
3603
3605
|
svg.appendChild(group);
|
|
3604
3606
|
return svg;
|
|
3605
3607
|
}
|
|
3606
3608
|
/**
|
|
3607
|
-
*
|
|
3609
|
+
* Bare outline alert triangle shared by the error and expired icons.
|
|
3610
|
+
* Color comes from `currentColor` via the class-specific stylesheet rules.
|
|
3608
3611
|
*/
|
|
3609
|
-
function
|
|
3612
|
+
function createAlertTriangleIcon(className) {
|
|
3610
3613
|
const svg = createSvgElement('0 0 48 48', 48, 48);
|
|
3611
|
-
svg.classList.add(
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
stroke: '#FECACA',
|
|
3616
|
-
'stroke-width': '1',
|
|
3617
|
-
}));
|
|
3618
|
-
// Alert triangle
|
|
3619
|
-
const group = document.createElementNS('http://www.w3.org/2000/svg', 'g');
|
|
3620
|
-
group.setAttribute('transform', 'translate(10, 12)');
|
|
3621
|
-
group.appendChild(createPath('M14 4L2 24h24L14 4z', { fill: '#DC2626' }));
|
|
3622
|
-
// Exclamation
|
|
3623
|
-
group.appendChild(createPath('M14 10v5', {
|
|
3624
|
-
stroke: '#FFFFFF',
|
|
3625
|
-
'stroke-width': '2',
|
|
3614
|
+
svg.classList.add(className);
|
|
3615
|
+
const strokeAttrs = {
|
|
3616
|
+
stroke: 'currentColor',
|
|
3617
|
+
'stroke-width': '2.5',
|
|
3626
3618
|
'stroke-linecap': 'round',
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
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' }));
|
|
3630
3627
|
return svg;
|
|
3631
3628
|
}
|
|
3632
3629
|
/**
|
|
3633
|
-
*
|
|
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
|
|
3634
3637
|
*/
|
|
3635
3638
|
function createExpiredIcon() {
|
|
3636
|
-
|
|
3637
|
-
svg.classList.add('sv-expired-icon');
|
|
3638
|
-
// Circle background - muted gray
|
|
3639
|
-
svg.appendChild(createCircle(24, 24, 22, {
|
|
3640
|
-
fill: '#F5F5F5',
|
|
3641
|
-
stroke: '#E5E5E5',
|
|
3642
|
-
'stroke-width': '1',
|
|
3643
|
-
}));
|
|
3644
|
-
// Alert triangle - gray
|
|
3645
|
-
const group = document.createElementNS('http://www.w3.org/2000/svg', 'g');
|
|
3646
|
-
group.setAttribute('transform', 'translate(10, 12)');
|
|
3647
|
-
group.appendChild(createPath('M14 4L2 24h24L14 4z', { fill: '#737373' }));
|
|
3648
|
-
// Exclamation
|
|
3649
|
-
group.appendChild(createPath('M14 10v5', {
|
|
3650
|
-
stroke: '#FFFFFF',
|
|
3651
|
-
'stroke-width': '2',
|
|
3652
|
-
'stroke-linecap': 'round',
|
|
3653
|
-
}));
|
|
3654
|
-
group.appendChild(createCircle(14, 19, 1, { fill: '#FFFFFF' }));
|
|
3655
|
-
svg.appendChild(group);
|
|
3656
|
-
return svg;
|
|
3639
|
+
return createAlertTriangleIcon('sv-expired-icon');
|
|
3657
3640
|
}
|
|
3658
3641
|
/**
|
|
3659
3642
|
* Method icons
|