@sekyro/react 0.1.0-rc.16 → 0.1.0-rc.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.
- package/CHANGELOG.md +38 -0
- package/dist/{chunk-IUQTOOBI.js → chunk-25KWDPLY.js} +1 -1
- package/dist/chunk-55NNQK5P.js +2 -0
- package/dist/chunk-6I7GU4FS.js +2 -0
- package/dist/chunk-A6UYUVEG.js +2 -0
- package/dist/chunk-DY5WQVPE.js +2 -0
- package/dist/chunk-GUTF3SPK.js +2 -0
- package/dist/chunk-JT7YHK7F.js +2 -0
- package/dist/chunk-LPGHMDD4.js +2 -0
- package/dist/chunk-NV7HZJM4.js +2 -0
- package/dist/chunk-T3PAN4NN.js +2 -0
- package/dist/chunk-XTQARDSJ.js +2 -0
- package/dist/chunk-YVNQ3UUH.js +2 -0
- package/dist/{chunk-IT66PZDO.js → chunk-Z7US4CLZ.js} +1 -1
- package/dist/document-capture-view-WDGHEAUI.js +2 -0
- package/dist/eid-view-HQLNWM6A.js +2 -0
- package/dist/email-otp-view-LCIDGNZT.js +2 -0
- package/dist/flow-views-K3HXMKPU.js +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/overlay-de-YQA44XTY.js +2 -0
- package/dist/overlay-es-6KRUPYG4.js +2 -0
- package/dist/overlay-pt-QEAE4TDI.js +2 -0
- package/dist/portrait-capture-view-I7I6FJQO.js +2 -0
- package/dist/portrait-review-view-A5HGZ7ZN.js +2 -0
- package/dist/verification/index.cjs +1 -1
- package/dist/verification/index.d.cts +66 -2
- package/dist/verification/index.d.ts +66 -2
- package/dist/verification/index.js +1 -1
- package/dist/verification.css +210 -70
- package/package.json +2 -2
- package/sbom.cdx.json +4 -4
- package/dist/chunk-5TOBG5R2.js +0 -2
- package/dist/chunk-EZ5TVL6P.js +0 -2
- package/dist/chunk-FNBG3472.js +0 -2
- package/dist/chunk-GGTRTUW3.js +0 -2
- package/dist/chunk-H2KIOYQU.js +0 -2
- package/dist/chunk-KHBM3P4C.js +0 -2
- package/dist/chunk-NXVTUTKS.js +0 -2
- package/dist/chunk-OUG465K6.js +0 -2
- package/dist/chunk-PYAJMHZH.js +0 -2
- package/dist/chunk-XDPCJAYO.js +0 -2
- package/dist/chunk-YY76AMUA.js +0 -2
- package/dist/document-capture-view-PUGWMQAP.js +0 -2
- package/dist/eid-view-IMKKBPQV.js +0 -2
- package/dist/email-otp-view-YLMRRLC3.js +0 -2
- package/dist/flow-views-HFQJ45NS.js +0 -2
- package/dist/overlay-de-ZICWH4MW.js +0 -2
- package/dist/overlay-es-2ETCIRV4.js +0 -2
- package/dist/overlay-pt-2DX57E2U.js +0 -2
- package/dist/portrait-capture-view-M5OLPMMO.js +0 -2
package/dist/verification.css
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* GENERATED by packages/sekyro-brand/scripts/build.mjs from tokens/tokens.json — do not edit.
|
|
2
|
-
The flow-* type roles of the verification flow (`font: var(--sekyro-type-flow-title) var(--sekyro-font)`)
|
|
3
|
-
colours of its camera stages. Prepended to dist/verification.css by tsup. */
|
|
2
|
+
The flow-* type roles of the verification flow (`font: var(--sekyro-type-flow-title) var(--sekyro-font)`), the
|
|
3
|
+
colours of its camera stages, its component sizes and its page transition. Prepended to dist/verification.css by tsup. */
|
|
4
4
|
:root {
|
|
5
|
-
--sekyro-type-flow-hero: 600 34px
|
|
5
|
+
--sekyro-type-flow-hero: 600 28px/34px;
|
|
6
6
|
--sekyro-tracking-flow-hero: -0.015em;
|
|
7
|
-
--sekyro-type-flow-title: 600
|
|
7
|
+
--sekyro-type-flow-title: 600 24px/30px;
|
|
8
8
|
--sekyro-tracking-flow-title: -0.01em;
|
|
9
9
|
--sekyro-type-flow-camera: 600 24px/30px;
|
|
10
10
|
--sekyro-tracking-flow-camera: -0.01em;
|
|
@@ -25,6 +25,26 @@
|
|
|
25
25
|
--sekyro-color-on-stage: #ffffff;
|
|
26
26
|
--sekyro-color-on-camera-success: #00c897;
|
|
27
27
|
--sekyro-color-stage-warning: #ffab00;
|
|
28
|
+
--sekyro-size-button-height: 52px;
|
|
29
|
+
--sekyro-size-control-radius: 10px;
|
|
30
|
+
--sekyro-size-card-radius: 16px;
|
|
31
|
+
--sekyro-size-field-radius: 10px;
|
|
32
|
+
--sekyro-size-icon-tile: 56px;
|
|
33
|
+
--sekyro-size-icon-tile-radius: 16px;
|
|
34
|
+
--sekyro-size-header-tile: 40px;
|
|
35
|
+
--sekyro-size-choice-tile: 40px;
|
|
36
|
+
--sekyro-size-tile-radius: 10px;
|
|
37
|
+
--sekyro-size-result-disc: 64px;
|
|
38
|
+
--sekyro-size-result-ring: 8px;
|
|
39
|
+
--sekyro-size-progress-height: 4px;
|
|
40
|
+
--sekyro-size-focus-ring: 2px;
|
|
41
|
+
--sekyro-size-focus-ring-offset: 2px;
|
|
42
|
+
--sekyro-size-otp-box: 60px;
|
|
43
|
+
--sekyro-size-choice-min-height: 76px;
|
|
44
|
+
--sekyro-size-step-gap: 32px;
|
|
45
|
+
--sekyro-size-heading-gap: 12px;
|
|
46
|
+
--sekyro-motion-page: 320ms;
|
|
47
|
+
--sekyro-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
|
|
28
48
|
}
|
|
29
49
|
/* packages/sekyro-react/src/verification.css — @sekyro/react/verification.
|
|
30
50
|
Logical properties only; every color through a --sekyro-* variable (check-css). The type scale (--sekyro-type-flow-*)
|
|
@@ -85,6 +105,13 @@
|
|
|
85
105
|
--sekyro-gutter: 1.5rem;
|
|
86
106
|
--sekyro-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
|
|
87
107
|
--sekyro-ease: cubic-bezier(0.22, 1, 0.36, 1);
|
|
108
|
+
/* UX refresh 2026-11-05 (prototype): cards keep the brand's 16 px whatever the partner's control radius (a "full"
|
|
109
|
+
partner radius makes pill buttons, never pill cards); the tiles and the page motion on the prototype's values. */
|
|
110
|
+
--sekyro-radius-card: var(--sekyro-size-card-radius);
|
|
111
|
+
--sekyro-radius-tile: var(--sekyro-size-icon-tile-radius);
|
|
112
|
+
--sekyro-focus: var(--sekyro-size-focus-ring) solid var(--sekyro-color-ring);
|
|
113
|
+
/* The soft status roles where the flow sets none (<SekyroVerification> sets them from generated/brand-flow.ts). */
|
|
114
|
+
--sekyro-color-info-soft-fallback: color-mix(in srgb, var(--sekyro-color-brand) 9%, var(--sekyro-color-surface));
|
|
88
115
|
}
|
|
89
116
|
/* The flow paints its own surface, so a dark scheme reads on any host page. */
|
|
90
117
|
.sekyro-verification {
|
|
@@ -113,30 +140,42 @@
|
|
|
113
140
|
.sekyro-root [tabindex="-1"]:focus { outline: none; }
|
|
114
141
|
|
|
115
142
|
/* ── Shell: the partner bar, the thin step progress, the footer ───────── */
|
|
116
|
-
|
|
143
|
+
/* The prototype's header: a 40 px tile (logo or initials on brand-soft), the name on title-sm, the caption under it,
|
|
144
|
+
a line-subtle hairline across the whole flow. */
|
|
145
|
+
.sekyro-org {
|
|
146
|
+
display: flex; align-items: center; gap: 0.75rem; padding-block: 0.75rem;
|
|
147
|
+
margin-inline: calc(-1 * var(--sekyro-gutter)); padding-inline: var(--sekyro-gutter);
|
|
148
|
+
border-block-end: 1px solid var(--sekyro-color-line-subtle);
|
|
149
|
+
}
|
|
117
150
|
.sekyro-org__tile {
|
|
118
151
|
display: inline-grid; place-items: center; flex-shrink: 0; overflow: hidden;
|
|
119
|
-
inline-size:
|
|
152
|
+
inline-size: var(--sekyro-size-header-tile); block-size: var(--sekyro-size-header-tile); border-radius: var(--sekyro-size-tile-radius);
|
|
120
153
|
background: var(--sekyro-color-brand-soft); color: var(--sekyro-color-brand);
|
|
121
|
-
font: var(--sekyro-type-flow-
|
|
154
|
+
font: var(--sekyro-type-flow-label) var(--sekyro-font); font-weight: 700;
|
|
122
155
|
}
|
|
123
156
|
.sekyro-org__logo { inline-size: 100%; block-size: 100%; padding: 4px; object-fit: contain; box-sizing: border-box; }
|
|
124
157
|
.sekyro-org__text { flex: 1; min-inline-size: 0; }
|
|
125
|
-
|
|
158
|
+
/* plaintext: a Latin org name on an Arabic page is cut at its own end, not its start. */
|
|
159
|
+
.sekyro-org__name { margin: 0; font: var(--sekyro-type-flow-action) var(--sekyro-font); color: var(--sekyro-color-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; unicode-bidi: plaintext; text-align: match-parent; }
|
|
126
160
|
/* The close: a 36 px sunken disc in a 44 px target, its disc on the gutter (mirrored in Arabic by the flex row). */
|
|
127
161
|
.sekyro-org__end { flex-shrink: 0; display: flex; align-items: center; }
|
|
128
162
|
.sekyro-org__close { flex-shrink: 0; margin-inline-end: -4px; }
|
|
129
|
-
|
|
163
|
+
/* The back disc before the tile; its chevron points to the start, so it turns round in Arabic. */
|
|
164
|
+
.sekyro-org__back { flex-shrink: 0; margin-inline-start: -4px; }
|
|
165
|
+
.sekyro-flow[dir="rtl"] .sekyro-org__back .sekyro-glyph { transform: scaleX(-1); }
|
|
166
|
+
/* A phone keeps room for the name: with a back disc the org tile steps aside (the name still says who asks). */
|
|
167
|
+
@media (max-width: 430px) { .sekyro-org__back + .sekyro-org__tile { display: none; } }
|
|
168
|
+
.sekyro-org__sub { margin: 0; font: var(--sekyro-type-flow-caption) var(--sekyro-font); color: var(--sekyro-color-fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
130
169
|
.sekyro-progress { margin: 0; }
|
|
131
170
|
.sekyro-progress__bars { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
|
|
132
|
-
.sekyro-progress__bar { position: relative; flex: 1; block-size:
|
|
171
|
+
.sekyro-progress__bar { position: relative; flex: 1; block-size: var(--sekyro-size-progress-height); overflow: hidden; border-radius: 9999px; background: var(--sekyro-color-line-subtle); }
|
|
133
172
|
.sekyro-progress__bar::before {
|
|
134
173
|
content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; inline-size: 0;
|
|
135
174
|
border-radius: inherit; background: var(--sekyro-color-brand); transition: inline-size 450ms var(--sekyro-ease);
|
|
136
175
|
}
|
|
137
176
|
.sekyro-progress__bar.is-done::before { inline-size: 100%; }
|
|
138
|
-
/* The current step is under way, not done:
|
|
139
|
-
.sekyro-progress__bar.is-current::before { inline-size:
|
|
177
|
+
/* The current step is under way, not done: the brand at 70 %. */
|
|
178
|
+
.sekyro-progress__bar.is-current::before { inline-size: 100%; background: color-mix(in srgb, var(--sekyro-color-brand) 70%, transparent); }
|
|
140
179
|
.sekyro-footer {
|
|
141
180
|
display: flex; align-items: center; justify-content: center; gap: 0.25rem; margin: 0; padding-block: 1rem 0.5rem;
|
|
142
181
|
font: var(--sekyro-type-flow-caption) var(--sekyro-font); color: var(--sekyro-color-fg-muted);
|
|
@@ -146,16 +185,16 @@
|
|
|
146
185
|
focus ring of every control. */
|
|
147
186
|
a.sekyro-footer { text-decoration: none; border-radius: 0.25rem; }
|
|
148
187
|
a.sekyro-footer:hover { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
149
|
-
a.sekyro-footer:focus-visible { outline:
|
|
188
|
+
a.sekyro-footer:focus-visible { outline: var(--sekyro-focus); outline-offset: 2px; }
|
|
150
189
|
.sekyro-glyph { inline-size: 1.25rem; block-size: 1.25rem; flex-shrink: 0; fill: none; }
|
|
151
190
|
|
|
152
191
|
/* ── Pages: one at a time, rising into place ───────────────────────────── */
|
|
153
192
|
.sekyro-page { display: flex; flex-direction: column; flex: 1; min-block-size: 0; transition: opacity 100ms ease-out; }
|
|
154
193
|
.sekyro-page.is-leaving { opacity: 0; pointer-events: none; }
|
|
155
|
-
.sekyro-page > * { animation: sekyro-rise
|
|
156
|
-
@keyframes sekyro-rise { from { opacity: 0; transform: translateY(
|
|
157
|
-
.sekyro-step { display: flex; flex-direction: column; flex: 1; gap:
|
|
158
|
-
.sekyro-heading { display: flex; flex-direction: column; gap:
|
|
194
|
+
.sekyro-page > * { animation: sekyro-rise var(--sekyro-motion-page) var(--sekyro-ease-out) 40ms both; }
|
|
195
|
+
@keyframes sekyro-rise { from { opacity: 0; transform: translateY(10px); } }
|
|
196
|
+
.sekyro-step { display: flex; flex-direction: column; flex: 1; gap: var(--sekyro-size-step-gap); padding-block-start: 1.5rem; }
|
|
197
|
+
.sekyro-heading { display: flex; flex-direction: column; gap: var(--sekyro-size-heading-gap); }
|
|
159
198
|
.sekyro-root .sekyro-heading > h2,
|
|
160
199
|
.sekyro-root .sekyro-heading > h1 {
|
|
161
200
|
margin: 0; font: var(--sekyro-type-flow-title) var(--sekyro-font-display); letter-spacing: var(--sekyro-tracking-flow-title);
|
|
@@ -168,54 +207,76 @@ a.sekyro-footer:focus-visible { outline: 3px solid var(--sekyro-color-ring); out
|
|
|
168
207
|
.sekyro-root :is(h1, h2).sekyro-text-body { font: var(--sekyro-type-flow-title) var(--sekyro-font-display); letter-spacing: var(--sekyro-tracking-flow-title); }
|
|
169
208
|
.sekyro-root [lang="ar"] :is(h1, h2).sekyro-text-body { font-family: var(--sekyro-font-arabic); line-height: 1.4; }
|
|
170
209
|
|
|
171
|
-
/* The page's actions, pinned in the thumb zone; the consent
|
|
210
|
+
/* The page's actions, pinned in the thumb zone; the consent line under them (decision 1). */
|
|
172
211
|
.sekyro-actions {
|
|
173
212
|
position: sticky; inset-block-end: 0; z-index: 1;
|
|
174
213
|
display: flex; flex-direction: column; gap: 0.75rem; margin-block-start: auto; padding-block: 0.75rem 0.25rem;
|
|
175
214
|
background: var(--sekyro-color-surface);
|
|
176
|
-
|
|
177
215
|
}
|
|
216
|
+
/* The consent line: a caption, centred under the actions (or after a page without any). */
|
|
217
|
+
.sekyro-consent { margin: 0; padding-block: 0.25rem; }
|
|
218
|
+
.sekyro-consent__line { margin: 0; text-align: center; font: var(--sekyro-type-flow-caption) var(--sekyro-font); color: var(--sekyro-color-fg-muted); text-wrap: balance; }
|
|
219
|
+
.sekyro-root .sekyro-link.sekyro-link--inline { align-self: auto; min-block-size: 0; padding-block: 0.375rem; font: inherit; color: var(--sekyro-color-brand); text-decoration: underline; text-underline-offset: 0.2em; }
|
|
178
220
|
.sekyro-actions:empty { display: none; }
|
|
179
221
|
.sekyro-actions__group { display: flex; flex-direction: column; gap: 0.75rem; }
|
|
180
222
|
.sekyro-actions__group > .sekyro-label { font: var(--sekyro-type-flow-label) var(--sekyro-font); color: var(--sekyro-color-fg-muted); margin: 0; }
|
|
181
223
|
|
|
182
|
-
/* Buttons:
|
|
224
|
+
/* Buttons (prototype): 52 px, the partner's control radius (10 px by default), the flow's action type. Primary is the
|
|
225
|
+
brand fill; secondary is outlined; ghost is a quiet brand text action; danger fills with the danger role. A disabled
|
|
226
|
+
primary is the brand at 40 %. */
|
|
183
227
|
.sekyro-root .sekyro-btn {
|
|
184
|
-
min-block-size:
|
|
228
|
+
min-block-size: var(--sekyro-size-button-height); gap: 0.5rem; padding-inline: 1.5rem; border-radius: var(--sekyro-radius);
|
|
185
229
|
font: var(--sekyro-type-flow-action) var(--sekyro-font); letter-spacing: var(--sekyro-tracking-flow-action);
|
|
186
|
-
transition: background-color 150ms, transform 250ms var(--sekyro-spring);
|
|
230
|
+
transition: background-color 150ms, border-color 150ms, transform 250ms var(--sekyro-spring);
|
|
187
231
|
}
|
|
232
|
+
.sekyro-root .sekyro-btn:focus-visible { outline: var(--sekyro-focus); outline-offset: 2px; }
|
|
188
233
|
.sekyro-root .sekyro-btn:active:not(:disabled):not([aria-disabled="true"]) { transform: scale(0.97); }
|
|
189
234
|
.sekyro-root .sekyro-btn--primary:disabled {
|
|
190
235
|
opacity: 1;
|
|
191
236
|
background: color-mix(in srgb, var(--sekyro-color-brand) 40%, var(--sekyro-color-surface));
|
|
192
237
|
color: var(--sekyro-color-brand-fg);
|
|
193
238
|
}
|
|
194
|
-
.sekyro-root .sekyro-btn--
|
|
195
|
-
.sekyro-root .sekyro-btn--
|
|
239
|
+
.sekyro-root .sekyro-btn--secondary { border-color: var(--sekyro-color-line); background: var(--sekyro-color-surface); color: var(--sekyro-color-fg); }
|
|
240
|
+
.sekyro-root .sekyro-btn--secondary:hover { background: var(--sekyro-color-sunken); }
|
|
241
|
+
.sekyro-root .sekyro-btn--secondary:disabled { opacity: 1; color: var(--sekyro-color-fg-subtle); }
|
|
242
|
+
.sekyro-root .sekyro-btn--ghost { border-color: transparent; background: transparent; color: var(--sekyro-color-brand); }
|
|
243
|
+
.sekyro-root .sekyro-btn--ghost:hover { background: var(--sekyro-color-brand-soft); }
|
|
196
244
|
.sekyro-root .sekyro-btn--ghost:disabled { opacity: 1; color: var(--sekyro-color-fg-subtle); }
|
|
245
|
+
.sekyro-root .sekyro-btn--danger { border-color: transparent; background: var(--sekyro-color-danger); color: var(--sekyro-color-on-danger, var(--sekyro-color-surface)); }
|
|
246
|
+
.sekyro-root .sekyro-btn--danger:hover { background: color-mix(in srgb, var(--sekyro-color-danger) 90%, var(--sekyro-color-fg)); }
|
|
197
247
|
.sekyro-root .sekyro-btn[aria-busy="true"]::after {
|
|
198
248
|
content: ""; inline-size: 1rem; block-size: 1rem; border-radius: 50%;
|
|
199
249
|
border: 2px solid currentColor; border-inline-end-color: transparent; animation: sekyro-turn 0.9s linear infinite;
|
|
200
250
|
}
|
|
201
251
|
@keyframes sekyro-turn { to { transform: rotate(360deg); } }
|
|
252
|
+
/* A quiet text action (resend, change number, change document): the brand on the label type, a 44 px target. */
|
|
202
253
|
.sekyro-link {
|
|
203
254
|
align-self: flex-start; min-block-size: 44px; padding: 0; border: 0; background: none; cursor: pointer;
|
|
204
255
|
font: var(--sekyro-type-flow-label) var(--sekyro-font); color: var(--sekyro-color-brand);
|
|
205
256
|
}
|
|
257
|
+
.sekyro-link:disabled { cursor: default; color: var(--sekyro-color-fg-muted); }
|
|
206
258
|
.sekyro-links { display: flex; flex-wrap: wrap; column-gap: 1.5rem; }
|
|
207
259
|
.sekyro-otp-expiry { margin-block-start: 4px; }
|
|
208
260
|
.sekyro-resend { align-self: center; padding-inline: 0.5rem; font: var(--sekyro-type-flow-label) var(--sekyro-font); }
|
|
209
261
|
.sekyro-resend:disabled { color: var(--sekyro-color-fg-muted); cursor: default; }
|
|
210
262
|
p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; margin: 0; color: var(--sekyro-color-fg-muted); font-variant-numeric: tabular-nums; }
|
|
211
263
|
.sekyro-resend-row { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 1.5rem; }
|
|
212
|
-
.sekyro-
|
|
264
|
+
.sekyro-resend-row > .sekyro-resend { align-self: center; }
|
|
265
|
+
.sekyro-link:focus-visible, .sekyro-card:focus-visible, .sekyro-row-btn:focus-visible, .sekyro-reference:focus-visible { outline: var(--sekyro-focus); outline-offset: 2px; }
|
|
213
266
|
|
|
214
|
-
/* Notices: soft
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
267
|
+
/* Notices (as on the native SDKs): a soft tint, the tone's -fg text, the tone's icon at the start; no border. On a
|
|
268
|
+
partner page the soft surfaces come from the chosen standard status set (set by the flow). */
|
|
269
|
+
.sekyro-root .sekyro-notice {
|
|
270
|
+
border-color: transparent; border-radius: var(--sekyro-radius-card); padding: 0.875rem 1rem;
|
|
271
|
+
font: var(--sekyro-type-flow-label) var(--sekyro-font);
|
|
272
|
+
}
|
|
273
|
+
.sekyro-root .sekyro-notice:has(> .sekyro-notice__icon) { flex-direction: row; align-items: flex-start; gap: 0.75rem; }
|
|
274
|
+
.sekyro-notice__icon { display: inline-grid; flex-shrink: 0; padding-block-start: 1px; }
|
|
275
|
+
.sekyro-notice__body { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; min-inline-size: 0; }
|
|
276
|
+
.sekyro-root .sekyro-notice--info { background: var(--sekyro-color-info-soft, var(--sekyro-color-info-soft-fallback)); color: var(--sekyro-color-info-fg, var(--sekyro-color-fg)); }
|
|
277
|
+
.sekyro-root .sekyro-notice--warning { background: var(--sekyro-color-warning-soft, color-mix(in srgb, var(--sekyro-color-warning) 10%, var(--sekyro-color-surface))); color: var(--sekyro-color-warning-fg, var(--sekyro-color-fg)); }
|
|
278
|
+
.sekyro-root .sekyro-notice--danger { background: var(--sekyro-color-danger-soft, color-mix(in srgb, var(--sekyro-color-danger) 8%, var(--sekyro-color-surface))); color: var(--sekyro-color-danger-fg, var(--sekyro-color-fg)); }
|
|
279
|
+
.sekyro-root .sekyro-notice .sekyro-btn { align-self: flex-start; min-block-size: 44px; }
|
|
219
280
|
|
|
220
281
|
/* ── Fields: white with a hairline; a 2px ring on focus (red with an error) ── */
|
|
221
282
|
.sekyro-root .sekyro-label { font: var(--sekyro-type-flow-label) var(--sekyro-font); color: var(--sekyro-color-fg-muted); }
|
|
@@ -224,7 +285,8 @@ p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; marg
|
|
|
224
285
|
.sekyro-root .sekyro-input {
|
|
225
286
|
min-block-size: 52px; padding-inline: 1rem;
|
|
226
287
|
border-color: var(--sekyro-color-line); border-radius: var(--sekyro-radius); background: var(--sekyro-color-surface);
|
|
227
|
-
|
|
288
|
+
/* The input role (17 px): iOS Safari zooms into any focused field under 16 px (the body role is 15 px). */
|
|
289
|
+
font: var(--sekyro-type-flow-input) var(--sekyro-font);
|
|
228
290
|
transition: border-color 150ms, box-shadow 150ms;
|
|
229
291
|
}
|
|
230
292
|
.sekyro-root .sekyro-input::placeholder, .sekyro-phone__input::placeholder { color: var(--sekyro-color-fg-subtle); }
|
|
@@ -249,7 +311,7 @@ p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; marg
|
|
|
249
311
|
.sekyro-phone__country {
|
|
250
312
|
position: absolute; inset: 0; z-index: 1; inline-size: 100%; block-size: 100%; margin: 0; padding: 0;
|
|
251
313
|
border: 0; opacity: 0; appearance: none; cursor: pointer;
|
|
252
|
-
font: var(--sekyro-type-flow-
|
|
314
|
+
font: var(--sekyro-type-flow-input) var(--sekyro-font);
|
|
253
315
|
}
|
|
254
316
|
/* The chevron is drawn here so the JS bundle carries no extra icon; the tighter segment keeps nine digits in view at 320 px. */
|
|
255
317
|
.sekyro-phone:has(.sekyro-phone__country) { padding-inline-end: 0.5rem; }
|
|
@@ -278,8 +340,9 @@ p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; marg
|
|
|
278
340
|
80% { transform: translateX(calc(-4px * var(--sekyro-inline-sign))); }
|
|
279
341
|
}
|
|
280
342
|
.sekyro-otp-box {
|
|
281
|
-
position: relative; display: grid; place-items: center; block-size:
|
|
282
|
-
|
|
343
|
+
position: relative; display: grid; place-items: center; block-size: var(--sekyro-size-otp-box);
|
|
344
|
+
/* The control radius, capped: a partner's pill radius would turn the boxes into circles. */
|
|
345
|
+
border: 1px solid var(--sekyro-color-line); border-radius: min(var(--sekyro-radius), var(--sekyro-size-card-radius)); background: var(--sekyro-color-surface);
|
|
283
346
|
font: var(--sekyro-type-flow-digit) var(--sekyro-font-display); font-variant-numeric: tabular-nums; color: var(--sekyro-color-fg);
|
|
284
347
|
transition: border-color 150ms, box-shadow 150ms;
|
|
285
348
|
}
|
|
@@ -302,26 +365,33 @@ p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; marg
|
|
|
302
365
|
|
|
303
366
|
/* ── Choices: quiet cards with a radio that fills once chosen; tap rows ── */
|
|
304
367
|
.sekyro-choices { display: flex; flex-direction: column; gap: 0.75rem; }
|
|
368
|
+
/* Choice cards (prototype): a 40 px icon tile (line-subtle, brand-soft once chosen), the label and caption, the radio;
|
|
369
|
+
the card radius is the brand's 16 px (never the partner's control radius); chosen = a brand border. */
|
|
305
370
|
.sekyro-card {
|
|
306
|
-
display: flex; align-items: center; gap:
|
|
307
|
-
border: 1px solid var(--sekyro-color-line); border-radius: var(--sekyro-radius); background: var(--sekyro-color-surface);
|
|
371
|
+
display: flex; align-items: center; gap: 0.875rem; inline-size: 100%; min-block-size: var(--sekyro-size-choice-min-height); padding-block: 0.75rem; padding-inline: 1rem;
|
|
372
|
+
border: 1px solid var(--sekyro-color-line); border-radius: var(--sekyro-radius-card); background: var(--sekyro-color-surface);
|
|
308
373
|
color: var(--sekyro-color-fg); font: inherit; text-align: start; cursor: pointer;
|
|
309
374
|
transition: border-color 150ms, background-color 150ms, box-shadow 150ms, transform 250ms var(--sekyro-spring);
|
|
310
375
|
}
|
|
311
376
|
.sekyro-card:active { transform: scale(0.98); }
|
|
312
377
|
.sekyro-card:disabled { cursor: default; }
|
|
313
|
-
.sekyro-
|
|
378
|
+
.sekyro-card__tile {
|
|
379
|
+
display: inline-grid; place-items: center; flex-shrink: 0; inline-size: var(--sekyro-size-choice-tile); block-size: var(--sekyro-size-choice-tile);
|
|
380
|
+
border-radius: var(--sekyro-size-tile-radius); background: var(--sekyro-color-line-subtle); color: var(--sekyro-color-fg-muted); transition: background-color 150ms, color 150ms;
|
|
381
|
+
}
|
|
382
|
+
.sekyro-card__tile > .sekyro-glyph { inline-size: 22px; block-size: 22px; }
|
|
383
|
+
.sekyro-card:hover:not(:disabled) { border-color: var(--sekyro-color-line-strong); }
|
|
314
384
|
.sekyro-card__body { display: flex; flex-direction: column; gap: 2px; flex: 1; }
|
|
315
385
|
.sekyro-card__title { font: var(--sekyro-type-flow-action) var(--sekyro-font); }
|
|
316
386
|
.sekyro-card__sub { font: var(--sekyro-type-flow-caption) var(--sekyro-font); color: var(--sekyro-color-fg-muted); }
|
|
317
387
|
.sekyro-radio { position: relative; flex-shrink: 0; inline-size: 22px; block-size: 22px; border-radius: 50%; border: 1.5px solid var(--sekyro-color-fg-subtle); box-sizing: border-box; }
|
|
318
388
|
.sekyro-radio::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--sekyro-color-brand); transform: scale(0.2); opacity: 0; transition: transform 300ms var(--sekyro-spring), opacity 150ms; }
|
|
319
|
-
.sekyro-card[aria-pressed="true"] { border-color: var(--sekyro-color-brand); box-shadow: inset 0 0 0
|
|
320
|
-
.sekyro-card[aria-pressed="true"]
|
|
389
|
+
.sekyro-card[aria-pressed="true"] { border-color: var(--sekyro-color-line-brand, var(--sekyro-color-brand)); box-shadow: inset 0 0 0 1px var(--sekyro-color-line-brand, var(--sekyro-color-brand)); }
|
|
390
|
+
.sekyro-card[aria-pressed="true"] .sekyro-card__tile { background: var(--sekyro-color-brand-soft); color: var(--sekyro-color-brand); }
|
|
321
391
|
.sekyro-card[aria-pressed="true"] .sekyro-radio { border-color: var(--sekyro-color-brand); }
|
|
322
392
|
.sekyro-card[aria-pressed="true"] .sekyro-radio::after { transform: scale(1); opacity: 1; }
|
|
323
393
|
@media (prefers-reduced-motion: reduce) { .sekyro-card, .sekyro-radio::after { transition: none; } }
|
|
324
|
-
.sekyro-rows { margin: 0; padding: 0; list-style: none; border: 1px solid var(--sekyro-color-line-subtle); border-radius: var(--sekyro-radius); overflow: hidden; }
|
|
394
|
+
.sekyro-rows { margin: 0; padding: 0; list-style: none; border: 1px solid var(--sekyro-color-line-subtle); border-radius: var(--sekyro-radius-card); overflow: hidden; }
|
|
325
395
|
.sekyro-rows > li + li { border-block-start: 1px solid var(--sekyro-color-line-subtle); }
|
|
326
396
|
.sekyro-row-btn {
|
|
327
397
|
display: flex; align-items: center; gap: 0.75rem; inline-size: 100%; min-block-size: 52px; padding-inline: 1rem;
|
|
@@ -368,28 +438,74 @@ p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; marg
|
|
|
368
438
|
.sekyro-mark__arc { stroke-dasharray: 0.22 0.78; animation: sekyro-arc 2.4s linear infinite; }
|
|
369
439
|
@keyframes sekyro-arc { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
|
|
370
440
|
|
|
371
|
-
/* ── The outcome:
|
|
441
|
+
/* ── The outcome (prototype): the approved disc in its ring, or a soft status tile; title-lg; the reference ── */
|
|
372
442
|
.sekyro-root .sekyro-result { display: flex; flex-direction: column; flex: 1; padding-block-start: 2rem; }
|
|
373
|
-
.sekyro-result__body { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.
|
|
374
|
-
.sekyro-root .sekyro-result .sekyro-heading
|
|
375
|
-
|
|
376
|
-
.sekyro-outcome { inline-size:
|
|
377
|
-
.sekyro-
|
|
378
|
-
.sekyro-
|
|
379
|
-
.sekyro-outcome--rejected { --sekyro-tone: var(--sekyro-color-danger); }
|
|
380
|
-
.sekyro-outcome__ring {
|
|
381
|
-
fill: none; stroke: color-mix(in srgb, var(--sekyro-tone) 50%, transparent); stroke-width: 2; stroke-linecap: round;
|
|
382
|
-
stroke-dasharray: 1; stroke-dashoffset: 1; transform: rotate(-90deg); transform-origin: center; transform-box: fill-box;
|
|
383
|
-
animation: sekyro-draw 450ms ease-out forwards;
|
|
384
|
-
}
|
|
385
|
-
.sekyro-outcome--approved .sekyro-outcome__ring { stroke: var(--sekyro-color-stage-accent); }
|
|
386
|
-
.sekyro-outcome__disc { fill: var(--sekyro-tone); transform-origin: center; transform-box: fill-box; animation: sekyro-fill 380ms var(--sekyro-spring) 380ms both; }
|
|
443
|
+
.sekyro-result__body { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem; flex: 1; padding-block-end: 2rem; text-align: center; }
|
|
444
|
+
.sekyro-root .sekyro-result .sekyro-heading { align-items: center; }
|
|
445
|
+
/* The approved disc (64 px) in its soft ring (8 px each side). */
|
|
446
|
+
.sekyro-outcome { inline-size: calc(var(--sekyro-size-result-disc) + 2 * var(--sekyro-size-result-ring)); block-size: calc(var(--sekyro-size-result-disc) + 2 * var(--sekyro-size-result-ring)); }
|
|
447
|
+
.sekyro-outcome__ring { fill: var(--sekyro-color-success-soft, color-mix(in srgb, var(--sekyro-color-success) 14%, var(--sekyro-color-surface))); transform-origin: center; transform-box: fill-box; animation: sekyro-fill 380ms var(--sekyro-spring) both; }
|
|
448
|
+
.sekyro-outcome__disc { fill: var(--sekyro-color-success); transform-origin: center; transform-box: fill-box; animation: sekyro-fill 380ms var(--sekyro-spring) 120ms both; }
|
|
387
449
|
@keyframes sekyro-fill { from { opacity: 0; transform: scale(0.86); } }
|
|
388
450
|
.sekyro-outcome__glyph {
|
|
389
|
-
fill: none; stroke: var(--sekyro-color-
|
|
390
|
-
stroke-dasharray: 1; stroke-dashoffset: 1; animation: sekyro-draw 320ms ease-out
|
|
451
|
+
fill: none; stroke: var(--sekyro-color-on-success, var(--sekyro-color-surface)); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
|
|
452
|
+
stroke-dasharray: 1; stroke-dashoffset: 1; animation: sekyro-draw 320ms ease-out 380ms forwards;
|
|
391
453
|
}
|
|
392
454
|
@keyframes sekyro-draw { to { stroke-dashoffset: 0; } }
|
|
455
|
+
.sekyro-outcome-tile { animation: sekyro-fill 380ms var(--sekyro-spring) both; }
|
|
456
|
+
|
|
457
|
+
/* ── The status block (prototype): a soft 56 px tile and its Solar icon, the title, the lines; centred ───── */
|
|
458
|
+
.sekyro-tile {
|
|
459
|
+
position: relative; display: inline-grid; place-items: center; flex-shrink: 0;
|
|
460
|
+
inline-size: var(--sekyro-size-icon-tile); block-size: var(--sekyro-size-icon-tile); border-radius: var(--sekyro-radius-tile);
|
|
461
|
+
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sekyro-color-fg) 5%, transparent);
|
|
462
|
+
}
|
|
463
|
+
.sekyro-tile > .sekyro-glyph { inline-size: 32px; block-size: 32px; }
|
|
464
|
+
.sekyro-tile--neutral { background: var(--sekyro-color-line-subtle); color: var(--sekyro-color-fg-muted); }
|
|
465
|
+
.sekyro-tile--brand { background: var(--sekyro-color-brand-soft); color: var(--sekyro-color-brand); }
|
|
466
|
+
.sekyro-tile--info { background: var(--sekyro-color-info-soft, var(--sekyro-color-info-soft-fallback)); color: var(--sekyro-color-info-fg, var(--sekyro-color-brand)); }
|
|
467
|
+
.sekyro-tile--warning { background: var(--sekyro-color-warning-soft, color-mix(in srgb, var(--sekyro-color-warning) 12%, var(--sekyro-color-surface))); color: var(--sekyro-color-warning-fg, var(--sekyro-color-warning)); }
|
|
468
|
+
.sekyro-tile--success { background: var(--sekyro-color-success-soft, color-mix(in srgb, var(--sekyro-color-success) 14%, var(--sekyro-color-surface))); color: var(--sekyro-color-success-fg, var(--sekyro-color-success)); }
|
|
469
|
+
/* Still working: the tile breathes (a soft halo of its own colour grows and fades). */
|
|
470
|
+
.sekyro-tile.is-busy { animation: sekyro-breathe 1.6s ease-in-out infinite; }
|
|
471
|
+
@keyframes sekyro-breathe {
|
|
472
|
+
0%, 100% { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sekyro-color-fg) 5%, transparent), 0 0 0 0 var(--sekyro-color-brand-soft); }
|
|
473
|
+
50% { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sekyro-color-fg) 5%, transparent), 0 0 0 10px var(--sekyro-color-brand-soft); }
|
|
474
|
+
}
|
|
475
|
+
.sekyro-status__body { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem; flex: 1; padding-block: 1rem 2rem; text-align: center; }
|
|
476
|
+
.sekyro-root .sekyro-status__text { align-items: center; max-inline-size: 26rem; }
|
|
477
|
+
.sekyro-status__text .sekyro-notice { text-align: start; align-self: stretch; }
|
|
478
|
+
|
|
479
|
+
/* The loading page: quiet bars where the page will be. */
|
|
480
|
+
.sekyro-skeleton { display: flex; flex-direction: column; gap: 1rem; padding-block: 1.5rem; }
|
|
481
|
+
.sekyro-skeleton__bar { display: block; block-size: 1.25rem; inline-size: 100%; border-radius: 9999px; background: var(--sekyro-color-sunken); animation: sekyro-pulse 1.4s ease-in-out infinite; }
|
|
482
|
+
.sekyro-skeleton__bar.is-title { block-size: 2rem; inline-size: 80%; }
|
|
483
|
+
.sekyro-skeleton__bar.is-short { inline-size: 60%; }
|
|
484
|
+
.sekyro-skeleton__bar.is-block { block-size: 10rem; margin-block-start: 1.5rem; border-radius: var(--sekyro-radius-card); }
|
|
485
|
+
@keyframes sekyro-pulse { 50% { opacity: 0.55; } }
|
|
486
|
+
|
|
487
|
+
/* ── The modal (terms, leave): a bottom sheet on a phone, centred from 40rem ── */
|
|
488
|
+
.sekyro-dialog {
|
|
489
|
+
box-sizing: border-box; inline-size: 100%; max-inline-size: 100%; max-block-size: 88dvh; margin: auto auto 0; padding: 0; border: 0;
|
|
490
|
+
border-start-start-radius: 20px; border-start-end-radius: 20px; background: var(--sekyro-color-surface); color: var(--sekyro-color-fg);
|
|
491
|
+
font: var(--sekyro-type-flow-body) var(--sekyro-font); overflow: hidden;
|
|
492
|
+
}
|
|
493
|
+
.sekyro-dialog[open] { display: flex; animation: sekyro-sheet var(--sekyro-motion-page) var(--sekyro-ease-out) both; }
|
|
494
|
+
.sekyro-dialog::backdrop { background: color-mix(in srgb, var(--sekyro-color-stage) 55%, transparent); }
|
|
495
|
+
@keyframes sekyro-sheet { from { transform: translateY(24px); opacity: 0; } }
|
|
496
|
+
@media (min-width: 40rem) {
|
|
497
|
+
.sekyro-dialog { max-inline-size: 30rem; margin: auto; border-radius: 20px; }
|
|
498
|
+
}
|
|
499
|
+
.sekyro-dialog__panel { display: flex; flex-direction: column; inline-size: 100%; max-block-size: 88dvh; padding-block-end: max(1rem, env(safe-area-inset-bottom)); }
|
|
500
|
+
.sekyro-dialog__head { display: flex; align-items: center; gap: 0.75rem; padding-block: 1rem 0.5rem; padding-inline: 1.5rem 1rem; }
|
|
501
|
+
.sekyro-dialog__title { flex: 1; margin: 0; font: var(--sekyro-type-flow-title) var(--sekyro-font-display); letter-spacing: var(--sekyro-tracking-flow-title); text-wrap: balance; }
|
|
502
|
+
.sekyro-root [lang="ar"] .sekyro-dialog__title { font-family: var(--sekyro-font-arabic); line-height: 1.4; }
|
|
503
|
+
.sekyro-dialog__close { flex-shrink: 0; }
|
|
504
|
+
.sekyro-dialog__body { overflow-y: auto; padding-block: 0.25rem 1rem; padding-inline: 1.5rem; color: var(--sekyro-color-fg-muted); }
|
|
505
|
+
.sekyro-dialog__body p { margin: 0; }
|
|
506
|
+
.sekyro-dialog__actions { display: flex; flex-direction: column; gap: 0.75rem; padding-block-start: 0.5rem; padding-inline: 1.5rem; }
|
|
507
|
+
.sekyro-dialog .sekyro-disc:focus-visible { outline: var(--sekyro-focus); outline-offset: 2px; }
|
|
508
|
+
|
|
393
509
|
.sekyro-reference {
|
|
394
510
|
display: inline-flex; align-items: center; gap: 0.5rem; min-block-size: 44px; padding-inline: 0.75rem; border: 0; border-radius: 9999px; background: none;
|
|
395
511
|
font: var(--sekyro-type-flow-caption) var(--sekyro-font); font-variant-numeric: tabular-nums; color: var(--sekyro-color-fg-muted); cursor: pointer;
|
|
@@ -509,6 +625,22 @@ p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; marg
|
|
|
509
625
|
background: color-mix(in srgb, var(--sekyro-color-stage) 88%, transparent); color: var(--sekyro-color-on-stage);
|
|
510
626
|
}
|
|
511
627
|
.sekyro-lm-error > p { margin: 0; }
|
|
628
|
+
/* Design 2026-11-04 §5: "Upload a photo instead" over the camera, under the tray (a glass pill). */
|
|
629
|
+
.sekyro-lm-upload {
|
|
630
|
+
align-self: center; min-block-size: 44px; padding-block: 0.5rem; padding-inline: 1.25rem; border: 0; border-radius: 999px; cursor: pointer;
|
|
631
|
+
font: var(--sekyro-type-flow-caption) var(--sekyro-font); color: var(--sekyro-color-on-stage);
|
|
632
|
+
background: color-mix(in srgb, var(--sekyro-color-on-stage) 18%, transparent);
|
|
633
|
+
}
|
|
634
|
+
.sekyro-lm-upload:focus-visible { outline: 3px solid var(--sekyro-color-ring); outline-offset: 2px; }
|
|
635
|
+
/* Design 2026-11-04 §6.4: the original and the adjusted portrait side by side (the order follows the writing direction). */
|
|
636
|
+
.sekyro-portrait-pair { display: flex; flex-direction: row; gap: 0.75rem; }
|
|
637
|
+
.sekyro-portrait-pair__item { flex: 1 1 0; min-inline-size: 0; margin: 0; display: flex; flex-direction: column; gap: 0.375rem; }
|
|
638
|
+
.sekyro-portrait-pair__item > img {
|
|
639
|
+
inline-size: 100%; aspect-ratio: 3 / 4; object-fit: contain; border-radius: var(--sekyro-radius);
|
|
640
|
+
border: 1px solid var(--sekyro-color-line); background: var(--sekyro-color-surface);
|
|
641
|
+
}
|
|
642
|
+
.sekyro-portrait-pair__item > figcaption { text-align: center; }
|
|
643
|
+
.sekyro-portrait-fixes { margin: 0; padding-inline-start: 1.25rem; }
|
|
512
644
|
|
|
513
645
|
/* ── The face camera (face-camera.tsx): the oval cut from the ink, its ring of ticks and the running light ── */
|
|
514
646
|
.sekyro-fc-video { transform: scaleX(-1); }
|
|
@@ -567,8 +699,9 @@ p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; marg
|
|
|
567
699
|
.sekyro-lm-read, .sekyro-lm-flip-card { animation: none; }
|
|
568
700
|
.sekyro-lm-flip-card { transform: rotateY(180deg); }
|
|
569
701
|
.sekyro-lm-read.is-repeating { transform: translateX(calc(var(--sekyro-guide-w) * 0.5 * var(--sekyro-inline-sign))); }
|
|
570
|
-
.sekyro-
|
|
571
|
-
.sekyro-outcome__disc { animation: none; }
|
|
702
|
+
.sekyro-outcome__glyph { animation: none; stroke-dashoffset: 0; }
|
|
703
|
+
.sekyro-outcome__ring, .sekyro-outcome__disc, .sekyro-outcome-tile, .sekyro-dialog[open], .sekyro-skeleton__bar, .sekyro-handoff__pulse { animation: none; }
|
|
704
|
+
.sekyro-tile.is-busy { animation: none; }
|
|
572
705
|
.sekyro-lm-brackets > path, .sekyro-progress__bar::before, .sekyro-root .sekyro-btn, .sekyro-card { transition: none; }
|
|
573
706
|
.sekyro-root .sekyro-btn:active, .sekyro-card:active { transform: none; }
|
|
574
707
|
.sekyro-lm-trace { animation: none; stroke-dashoffset: 0; }
|
|
@@ -583,17 +716,24 @@ p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; marg
|
|
|
583
716
|
.sekyro-lm-mrz.is-valid { border-color: var(--sekyro-color-success); animation: none; }
|
|
584
717
|
@keyframes sekyro-lm-mrz-pulse { 50% { opacity: 0.55; } }
|
|
585
718
|
@media (prefers-reduced-motion: reduce) { .sekyro-lm-mrz { animation: none; } }
|
|
586
|
-
/*
|
|
587
|
-
.sekyro-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
.sekyro-
|
|
594
|
-
.sekyro-
|
|
719
|
+
/* The choice screens on the step's rhythm (the 0.1 drop-in keeps its own). */
|
|
720
|
+
.sekyro-flow .sekyro-choice { flex: 1; gap: var(--sekyro-size-step-gap); padding-block-start: 1.5rem; }
|
|
721
|
+
/* Flow model 2026-10-23: the identity summary, the handoff QR. */
|
|
722
|
+
.sekyro-summary__source {
|
|
723
|
+
display: inline-flex; align-self: flex-start; margin: 0; padding-block: 0.25rem; padding-inline: 0.625rem; border-radius: 9999px;
|
|
724
|
+
background: var(--sekyro-color-sunken); font: var(--sekyro-type-flow-caption) var(--sekyro-font); color: var(--sekyro-color-fg-muted);
|
|
725
|
+
}
|
|
726
|
+
.sekyro-handoff__waiting { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin: 0; text-align: center; font: var(--sekyro-type-flow-label) var(--sekyro-font); color: var(--sekyro-color-fg-muted); }
|
|
727
|
+
.sekyro-handoff__pulse { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--sekyro-color-brand); animation: sekyro-pulse 1.4s ease-in-out infinite; }.sekyro-summary { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; padding: 1rem; border: 1px solid var(--sekyro-color-line-subtle); border-radius: var(--sekyro-radius-card); }
|
|
728
|
+
.sekyro-summary__portrait { inline-size: 5.5rem; block-size: 7rem; object-fit: cover; border-radius: 10px; }
|
|
729
|
+
.sekyro-summary__list { display: grid; gap: 0.75rem; margin: 0; flex: 1 1 12rem; }
|
|
595
730
|
.sekyro-summary__row { display: grid; gap: 0.125rem; }
|
|
596
|
-
.sekyro-summary__row
|
|
597
|
-
.sekyro-
|
|
731
|
+
.sekyro-summary__row dt { font: var(--sekyro-type-flow-caption) var(--sekyro-font); }
|
|
732
|
+
.sekyro-summary__row dd { margin: 0; color: var(--sekyro-color-fg); font: var(--sekyro-type-flow-action) var(--sekyro-font); font-variant-numeric: tabular-nums; }
|
|
733
|
+
.sekyro-qr { inline-size: 12rem; block-size: 12rem; align-self: center; padding: 0.75rem; border: 1px solid var(--sekyro-color-line-subtle); border-radius: var(--sekyro-radius-card); }
|
|
598
734
|
.sekyro-qr__bg { fill: var(--sekyro-color-surface); }
|
|
599
735
|
.sekyro-qr__fg { fill: var(--sekyro-color-fg); }
|
|
736
|
+
a.sekyro-btn { text-decoration: none; }
|
|
737
|
+
/* WhatsApp and SMS as equals: one row, two buttons of the same kind and width (Salem 2026-11-05). */
|
|
738
|
+
.sekyro-channel-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
|
|
739
|
+
.sekyro-channel-row > .sekyro-btn { padding-inline: 0.75rem; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sekyro/react",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.17",
|
|
4
4
|
"description": "Sekyro AI React SDK — the themeable, accessible <LivenessCapture /> component over @sekyro/web (ar/fr/en, RTL-safe, WCAG AAA defaults)",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"repository": {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"strings:steps": "node scripts/gen-step-strings.mjs"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"@sekyro/web": "^0.1.0-rc.
|
|
77
|
+
"@sekyro/web": "^0.1.0-rc.20 || ^0.2.0-rc.0",
|
|
78
78
|
"react": ">=18.2",
|
|
79
79
|
"react-dom": ">=18.2"
|
|
80
80
|
},
|
package/sbom.cdx.json
CHANGED
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
"type": "application",
|
|
98
98
|
"name": "react",
|
|
99
99
|
"group": "@sekyro",
|
|
100
|
-
"version": "0.1.0-rc.
|
|
101
|
-
"bom-ref": "@sekyro/react@0.1.0-rc.
|
|
100
|
+
"version": "0.1.0-rc.17",
|
|
101
|
+
"bom-ref": "@sekyro/react@0.1.0-rc.17",
|
|
102
102
|
"description": "Sekyro AI React SDK — the themeable, accessible <LivenessCapture /> component over @sekyro/web (ar/fr/en, RTL-safe, WCAG AAA defaults)",
|
|
103
103
|
"licenses": [
|
|
104
104
|
{
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
],
|
|
111
|
-
"purl": "pkg:npm/%40sekyro/react@0.1.0-rc.
|
|
111
|
+
"purl": "pkg:npm/%40sekyro/react@0.1.0-rc.17?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2FIBTIKAR-Technologies%2Fibtikar-identity.git%23packages%2Fsekyro-react",
|
|
112
112
|
"externalReferences": [
|
|
113
113
|
{
|
|
114
114
|
"url": "https://github.com/IBTIKAR-Technologies/ibtikar-identity/issues",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"components": [],
|
|
148
148
|
"dependencies": [
|
|
149
149
|
{
|
|
150
|
-
"ref": "@sekyro/react@0.1.0-rc.
|
|
150
|
+
"ref": "@sekyro/react@0.1.0-rc.17"
|
|
151
151
|
}
|
|
152
152
|
]
|
|
153
153
|
}
|
package/dist/chunk-5TOBG5R2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{b as an,c as Ze}from"./chunk-7MMT5M4E.js";import{a as sn,c as cn,d as ln}from"./chunk-KHBM3P4C.js";import{a as B,j as Wt,k as Qt,l as Jt,m as Xt,n as en,o as tn,p as nn,q as rn,r as on,s as O,t as $,u as We}from"./chunk-IUQTOOBI.js";import{a as n}from"./chunk-2KED7D2Q.js";import{useId as hr}from"react";import{Fragment as gr,jsx as L,jsxs as Q}from"react/jsx-runtime";function J({className:e,children:t}){return L("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:e??"sekyro-icon sekyro-icon--sm",children:t})}n(J,"Svg");var mt="M4 7.5h2.2l1.4-1.9h8.8l1.4 1.9H20a1.6 1.6 0 0 1 1.6 1.6v8.3A1.6 1.6 0 0 1 20 19H4a1.6 1.6 0 0 1-1.6-1.6V9.1A1.6 1.6 0 0 1 4 7.5Z";function un(e){return Q(J,{...e,children:[L("circle",{cx:"12",cy:"12",r:"4"}),L("path",{d:"M12 2.5v2M12 19.5v2M2.5 12h2M19.5 12h2M5.3 5.3l1.4 1.4M17.3 17.3l1.4 1.4M5.3 18.7l1.4-1.4M17.3 6.7l1.4-1.4"})]})}n(un,"SunIcon");function dn(e){return Q(J,{...e,children:[L("circle",{cx:"12",cy:"12",r:"9"}),L("path",{d:"M9 10h.01M15 10h.01M8.8 14.6a4.2 4.2 0 0 0 6.4 0"})]})}n(dn,"FaceUncoveredIcon");function pn(e){return Q(J,{...e,children:[L("rect",{x:"7",y:"2.5",width:"10",height:"19",rx:"2"}),L("path",{d:"M10.5 18.5h3M2.5 9.5h2.5M19 9.5h2.5"}),L("circle",{cx:"12",cy:"9.5",r:"1.6"})]})}n(pn,"PhoneEyeLevelIcon");function fn(e){return Q(J,{...e,children:[L("path",{d:"M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12Z"}),L("circle",{cx:"12",cy:"12",r:"2.8"})]})}n(fn,"LookStraightIcon");function mn(e){return Q(J,{...e,children:[L("path",{d:mt}),L("path",{d:"M9 13l2 2 4-4"})]})}n(mn,"CameraCheckIcon");function yn(e){return Q(J,{...e,children:[L("path",{d:mt}),L("path",{d:"M10.2 11.2a1.9 1.9 0 1 1 2.6 1.8c-.5.2-.8.6-.8 1.1v.3M12 16.4h.01"})]})}n(yn,"CameraAskIcon");function gn(e){return Q(J,{...e,children:[L("path",{d:mt}),L("path",{d:"M3 3l18 18"})]})}n(gn,"CameraBlockedIcon");function Ce({off:e,className:t}){return Q(J,{className:t,children:[L("path",{d:"M4.5 9.5v5H8l4 3.5v-12L8 9.5H4.5Z"}),e?L("path",{d:"M4 4l16 16"}):Q(gr,{children:[L("path",{d:"M15.5 9.7a3.6 3.6 0 0 1 0 4.6"}),L("path",{d:"M18 7.6a6.6 6.6 0 0 1 0 8.8"})]})]})}n(Ce,"SpeakerIcon");function hn(e){return L(J,{...e,children:L("path",{d:"M5 12.5l4.5 4.5L19 7.5"})})}n(hn,"CheckIcon");function vn(e){return Q(J,{className:e.className??"sekyro-spinner",children:[L("circle",{cx:"12",cy:"12",r:"9",opacity:"0.25"}),L("path",{d:"M21 12a9 9 0 0 0-9-9"})]})}n(vn,"SpinnerIcon");import{jsx as le,jsxs as kn}from"react/jsx-runtime";var Qe=["light","uncover","eyeLevel","straight"],vr={light:{key:"capture.tips.light",icon:n(()=>le(un,{}),"icon")},uncover:{key:"capture.tips.uncover",icon:n(()=>le(dn,{}),"icon")},eyeLevel:{key:"capture.tips.eyeLevel",icon:n(()=>le(pn,{}),"icon")},straight:{key:"capture.tips.straight",icon:n(()=>le(fn,{}),"icon")}};function Cn({tips:e}){let t=O(),s=hr();return e.length===0?null:kn("section",{className:"sekyro-tips","aria-labelledby":s,"data-testid":"sekyro-tips",children:[le("p",{className:"sekyro-tips__title",id:s,children:t("capture.tips.title")}),le("ul",{className:"sekyro-tips__list",children:e.map(r=>{let o=typeof r=="string"?vr[r]:void 0,c=typeof r=="string"?r:r.id,a=o!==void 0?o.icon():typeof r=="string"?void 0:r.icon,d=o!==void 0?t(o.key):typeof r=="string"?r:r.text;return kn("li",{className:"sekyro-tips__item",children:[a!=null?le("span",{className:"sekyro-tips__icon","aria-hidden":"true",children:a}):null,le("span",{children:d})]},c)})})]})}n(Cn,"TipList");import{useEffect as bn,useId as kr,useRef as Cr,useState as br}from"react";import{jsx as X,jsxs as Je}from"react/jsx-runtime";var Sr=220;function Sn({title:e,description:t,options:s,busy:r,error:o,focus:c,testId:a,look:d="cards",marked:C,onChoose:h}){let M=kr(),I=We(),[b,l]=br(null),g=Cr(null);bn(()=>{o!==null&&l(null)},[o]),bn(()=>()=>{g.current!==null&&clearTimeout(g.current)},[]);let v=n(u=>{r||b!==null||(l(u),g.current=setTimeout(()=>{g.current=null,l(null),h(u)},Sr))},"choose");return Je("section",{className:"sekyro-stack sekyro-stack--4 sekyro-choice","aria-labelledby":M,"data-testid":a,children:[Je("div",{className:"sekyro-stack sekyro-stack--1",children:[X("h2",{id:M,ref:c?I:void 0,tabIndex:-1,className:"sekyro-text-body",children:e}),t!==void 0&&t!==""?X("p",{className:"sekyro-text-muted",children:t}):null]}),o!==null?X($,{tone:"danger",children:X("span",{children:o})}):null,d==="buttons"?X("div",{className:"sekyro-stack sekyro-stack--3",children:s.map((u,w)=>X(B,{kind:w===0?"primary":"ghost",full:!0,disabled:r,"aria-busy":r||void 0,onClick:()=>h(u.id),children:u.label},u.id))}):X("div",{className:"sekyro-choices",children:s.map(u=>Je("button",{type:"button",className:"sekyro-card","aria-pressed":(b??C)===u.id,"aria-busy":r||void 0,disabled:r||b!==null&&b!==u.id,onClick:()=>v(u.id),children:[u.glyph,Je("span",{className:"sekyro-card__body",children:[X("span",{className:"sekyro-card__title",children:u.label}),u.sub!==void 0?X("span",{className:"sekyro-card__sub",children:u.sub}):null]}),X("span",{className:"sekyro-radio","aria-hidden":"true"})]},u.id))})]})}n(Sn,"ChoiceScreen");var Xe=["fcv3.no_face","fcv3.come_closer","fcv3.move_back","fcv3.center_face","fcv3.straighten","fcv3.more_light","fcv3.too_bright","fcv3.hold_still","fcv3.steady_camera","fcv3.hold_upright","capture.tips.summary"];function fe(e){return e!==null&&Xe.includes(e)}n(fe,"isVoiceKey");import{useCallback as te,useEffect as me,useLayoutEffect as Lr,useMemo as wr,useRef as Se,useState as Te}from"react";var Rr=n((e,t)=>Object.prototype.hasOwnProperty.call(e,t),"own");function be(e,t,s){let r;try{if(typeof e=="function")r=e(t,s);else{let o=e[s];r=o!=null&&Rr(o,t)?o[t]:null}}catch{return null}return typeof r=="string"&&r!==""?r:null}n(be,"resolveClip");var Vr="UklGRiQAAABXQVZFZm10IBAAAAABAAEAESsAACJWAAACABAAZGF0YQAAAAA=",Mn={ar:"ar-SA",fr:"fr-FR",en:"en-US",es:"es-ES",pt:"pt-BR",de:"de-DE"};function ee(){return typeof window<"u"&&"speechSynthesis"in window?window.speechSynthesis:null}n(ee,"synth");function Mr(){return ee()!==null&&typeof SpeechSynthesisUtterance=="function"}n(Mr,"speechAvailable");function Rn(e){return(e.split(/[-_]/)[0]??e).toLowerCase()}n(Rn,"baseLang");function Ln(e,t){let s=n(o=>o.replace(/_/g,"-").toLowerCase(),"norm"),r=Rn(t);return e.find(o=>s(o.lang)===s(t))??e.find(o=>Rn(o.lang)===r)}n(Ln,"pickVoice");function wn(e){if(!Mr())return!1;let t=[];try{t=ee()?.getVoices()??[]}catch{return!0}return t.length===0||Ln(t,e)!==void 0}n(wn,"speechUsable");function In(e){let t=ee();return t===null||typeof t.addEventListener!="function"?()=>{}:(t.addEventListener("voiceschanged",e),()=>t.removeEventListener?.("voiceschanged",e))}n(In,"subscribeVoices");function Ae(e){try{let t=typeof location<"u"?location.href:"http://localhost/",s=new URL(e,t);return`clip:${s.origin}${s.pathname}`}catch{return`clip:${e}`}}n(Ae,"clipIdentity");function Vn(e){e.pause(),e.removeAttribute("src"),e.load()}n(Vn,"release");function Nn(){let e=null,t=null,s=0,r=null,o=[],c=new Map,a=n(()=>{o=ee()?.getVoices()??[]},"loadVoices"),d=!1,C=n(()=>{let l=ee();d||l===null||(d=!0,a(),l.addEventListener?.("voiceschanged",a))},"bindVoices"),h=n(()=>(e??(e=new Audio),e),"element"),M=n((l,g,v)=>{let u=ee();if(u!==null&&l!==""&&typeof SpeechSynthesisUtterance=="function"){C();let w=Ln(o,g);if(o.length===0||w!==void 0){u.cancel();let y=new SpeechSynthesisUtterance(l);y.lang=g,w!==void 0&&(y.voice=w),y.rate=.95,v!==void 0&&(y.onend=y.onerror=v),u.speak(y);return}}v?.()},"speak"),I=n(()=>{s+=1,r=null,e!==null&&(e.pause(),e.currentTime=0),ee()?.cancel()},"stop"),b=n(l=>{for(let g of l){let v=Ae(g);if(c.has(v))continue;let u=new Audio;u.preload="auto",u.src=g,c.set(v,u)}},"warmClips");return{say(l){let g=l.url!==null?Ae(l.url):`tts:${l.lang}:${l.text}`;if(g===r)return;r=g,s+=1;let v=s,u=l.onEnd,w=u!==void 0?()=>{v===s&&u()}:void 0;if(ee()?.cancel(),l.url!==null){let y=h();y.pause(),y.muted=!1,y.src=l.url,y.currentTime=0,y.onended=w??null,y.play()?.catch(R=>{v===s&&R?.name!=="AbortError"&&(l.speech?M(l.text,l.lang,w):w?.())});return}l.speech?M(l.text,l.lang,w):w?.()},unlock({lang:l,speech:g,prefetch:v}){let u=h();if(t===null&&typeof Blob=="function"&&typeof URL.createObjectURL=="function"){let R=Uint8Array.from(atob(Vr),P=>P.charCodeAt(0));t=URL.createObjectURL(new Blob([R],{type:"audio/wav"}))}let w=u.paused===!1&&t!==null&&u.src!==t;t!==null&&!w&&(u.muted=!0,u.onended=null,u.src=t,u.play()?.catch(()=>{}));let y=ee();if(g&&y!==null&&typeof SpeechSynthesisUtterance=="function"){C();let R=new SpeechSynthesisUtterance(" ");R.volume=0,R.lang=l,y.speak(R)}b(v??[])},prefetch:b,stop:I,dispose(){I(),d&&ee()?.removeEventListener?.("voiceschanged",a),d=!1,t!==null&&URL.revokeObjectURL(t),t=null,e!==null&&Vn(e),e=null;for(let l of c.values())Vn(l);c.clear()}}}n(Nn,"createVoicePlayer");var _n="sekyro.voiceGuidance";function xn(e){try{if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t==="1"?!0:t==="0"?!1:null}catch{return null}}n(xn,"readVoicePreference");function En(e,t){try{if(typeof window>"u")return;window.localStorage.setItem(e,t?"1":"0")}catch{}}n(En,"writeVoicePreference");var Oe="capture.tips.summary",Ir=typeof window<"u"?Lr:me,Nr=Object.freeze({});function yt(e,t){let s=new Set,r=[];for(let o of Xe){let c=o===Oe?null:be(e,o,t);c===null||s.has(Ae(c))||(s.add(Ae(c)),r.push(c))}return r}n(yt,"resolvedClipUrls");function gt({locale:e,defaultClips:t,options:s}){let r=s===!1,o=r?{}:s??{},c=o.storageKey===void 0?_n:o.storageKey,[a,d]=Te(o.defaultEnabled??!0),C=Se(a),[h,M]=Te(!1),[I,b]=Te("none"),[l,g]=Te(!1),v=Se(!1),[u,w]=Te(0),y=Se(null),R=te(()=>(y.current??(y.current=Nn()),y.current),[]),P=Mn[e],K=o.speechFallback,f=K===void 0||K===!0?!0:K===!1?!1:K.includes(e),q=o.clips??t??Nr,F=Se(!1),j=Se(q);Ir(()=>{j.current=q,C.current=a}),me(()=>{if(r||c===null)return;let k=xn(c);k!==null&&(C.current=k,d(k))},[r,c]),me(()=>{if(!(r||!f))return In(()=>w(k=>k+1))},[r,f]);let i=o.clips;me(()=>{if(r)return;let k=f&&wn(P);M(yt(q,e).length>0||k),b(i!==void 0&&be(i,Oe,e)!==null?"partner":be(q,Oe,e)!==null||k?"default":"none")},[r,q,i,e,f,P,u]),me(()=>{if(r||!a||!F.current)return;let k=yt(q,e);k.length>0&&R().prefetch(k)},[r,a,q,e,R]),me(()=>()=>{y.current?.dispose(),y.current=null,F.current=!1},[]);let A=te(k=>{r||(F.current=!0,R().unlock({lang:P,speech:f,...k?{prefetch:yt(j.current,e)}:{}}))},[r,R,P,f,e]),N=te(()=>A(C.current),[A]),_=te(()=>{v.current=!1,g(!1)},[]),x=te(()=>{_(),y.current?.stop()},[_]),se=te(()=>{v.current&&x()},[x]),ue=te((k,Z)=>{if(r)return;if(v.current){x();return}let H=R();H.stop(),v.current=!0,g(!0);let ne=Z?.clip===!1?null:be(j.current,Oe,e);H.say({url:ne,text:k,lang:P,speech:f,onEnd:_})},[r,x,R,e,P,f,_]),T=te(k=>{r||(k?A(!0):x(),c!==null&&En(c,k),C.current=k,d(k))},[r,A,x,c]),E=te(()=>T(!C.current),[T]),de=te((k,Z)=>{if(r||!a)return;v.current&&_();let H=be(j.current,k,e);R().say({url:H,text:Z,lang:P,speech:f})},[r,a,e,R,P,f,_]);return wr(()=>({supported:!r&&h,enabled:!r&&a,setEnabled:T,toggle:E,unlock:N,speakKey:de,stop:x,summary:r?"none":I,summaryPlaying:l,toggleSummary:ue,stopSummary:se}),[r,h,a,T,E,N,de,x,I,l,ue,se])}n(gt,"useVoiceGuidance");function ht(e,t,s,r){let{speakKey:o,stop:c,enabled:a}=e,d=Se(!1);me(()=>{if(!r||!a){d.current&&c(),d.current=!1;return}d.current=!0,fe(t)&&t!==Oe&&s!==""&&o(t,s)},[r,a,t,s,o,c])}n(ht,"useSpeakGuidance");import{isValidElement as ao,useCallback as st,useContext as co,useEffect as oe,useMemo as we,useRef as ge,useState as sr}from"react";import{useEffect as _r,useRef as xr}from"react";import{jsx as Re,jsxs as vt}from"react/jsx-runtime";function Pn({showCoaching:e,attemptsText:t,showRetake:s,onRetake:r}){let o=O(),c=xr(null);return _r(()=>{s&&c.current?.focus()},[s]),!e&&!s?null:vt("div",{className:"sekyro-stack sekyro-stack--3","data-testid":"sekyro-captured-panel",children:[e?vt("div",{className:"sekyro-stack sekyro-stack--1",children:[Re("p",{className:"sekyro-text-body",children:o("capture.retryCoaching.title")}),vt("ul",{className:"sekyro-coaching",children:[Re("li",{children:o("capture.retryCoaching.light")}),Re("li",{children:o("capture.retryCoaching.eyeLevel")}),Re("li",{children:o("capture.retryCoaching.head")})]}),t!==null?Re("p",{className:"sekyro-text-muted","data-testid":"sekyro-attempts-remaining",children:t}):null]}):null,s?Re(B,{ref:c,className:"sekyro-btn--start",onClick:r,children:o("capture.recordAgain")}):null]})}n(Pn,"CapturedPanel");function et(){try{return process.env.NODE_ENV!=="production"}catch{return!1}}n(et,"isDevBuild");import{createContext as Er}from"react";var An=Er(null);import{useId as Pr,useState as Ar}from"react";import{jsx as Ve,jsxs as tt}from"react/jsx-runtime";var Tr=["self","assisted"];function Tn({onChoose:e}){let t=O(),s=Pr(),r=`${s}-help`,[o,c]=Ar("self");return tt("form",{className:"sekyro-stack sekyro-stack--3","data-testid":"sekyro-capture-mode",onSubmit:a=>{a.preventDefault(),e(o)},children:[tt("fieldset",{className:"sekyro-segmented","aria-describedby":r,children:[Ve("legend",{className:"sekyro-segmented__legend",children:t("capture.modePicker.legend")}),Ve("div",{className:"sekyro-segmented__options",children:Tr.map(a=>tt("label",{className:"sekyro-segmented__option",children:[Ve("input",{type:"radio",className:"sekyro-segmented__input",name:s,value:a,checked:o===a,onChange:()=>c(a)}),tt("span",{className:"sekyro-segmented__face",children:[Ve("span",{className:"sekyro-segmented__dot","aria-hidden":"true"}),t(`capture.modePicker.${a}`)]})]},a))})]}),Ve("p",{id:r,className:"sekyro-text-muted",children:t("capture.modePicker.help")}),Ve(B,{type:"submit",full:!0,children:t("capture.modePicker.continue")})]})}n(Tn,"CaptureModePicker");import{useCallback as Hn,useEffect as Un,useRef as Me}from"react";import{useId as Or}from"react";import{jsx as nt,jsxs as kt}from"react/jsx-runtime";var Kr=["user","environment"];function On({value:e,onChange:t}){let s=O(),r=Or();return kt("fieldset",{className:"sekyro-segmented","data-testid":"sekyro-facing",children:[nt("legend",{className:"sekyro-segmented__legend",children:s("capture.cameraLabel")}),nt("div",{className:"sekyro-segmented__options",children:Kr.map(o=>kt("label",{className:"sekyro-segmented__option",children:[nt("input",{type:"radio",className:"sekyro-segmented__input",name:r,value:o,checked:e===o,onChange:()=>t(o)}),kt("span",{className:"sekyro-segmented__face",children:[nt("span",{className:"sekyro-segmented__dot","aria-hidden":"true"}),s(`capture.facing.${o}`)]})]},o))})]})}n(On,"FacingPicker");import{useEffect as Fr,useState as Br}from"react";import{jsx as Ke,jsxs as Hr}from"react/jsx-runtime";function Kn({state:e}){let t=O(),[s,r]=Br(!1);Fr(()=>{e!=="unknown"&&r(!0)},[e]);let o=e==="granted"?Ke(mn,{}):e==="denied"?Ke(gn,{}):Ke(yn,{});return Hr("div",{role:s?"status":void 0,className:`sekyro-permission sekyro-permission--${e}`,"data-testid":"sekyro-permission","data-state":e,children:[Ke("span",{className:"sekyro-permission__icon","aria-hidden":"true",children:o}),Ke("span",{children:t(`capture.permission.${e}`)})]})}n(Kn,"PermissionRow");import{jsx as rt,jsxs as Fn}from"react/jsx-runtime";function Bn({voice:e}){let t=O();if(!e.supported)return null;let s=e.enabled;return Fn("button",{type:"button",role:"switch","aria-checked":s,className:"sekyro-switch","data-testid":"sekyro-voice-switch",onClick:()=>e.toggle(),children:[Fn("span",{className:"sekyro-switch__label",children:[rt(Ce,{off:!s}),t("capture.voiceGuidance")]}),rt("span",{className:"sekyro-switch__track","aria-hidden":"true",children:rt("span",{className:"sekyro-switch__thumb",children:s?rt(hn,{className:"sekyro-switch__check"}):null})})]})}n(Bn,"VoiceSwitch");import{Fragment as Gr,jsx as G,jsxs as Le}from"react/jsx-runtime";function Gn({assets:e,onRetryAssets:t,permission:s,captureMode:r="self",canChooseFacing:o,facing:c,onFacingChange:a,voice:d,tips:C,summary:h,startLabel:M,startDisabled:I,onStart:b}){let l=O(),g=Me(h?.stop);g.current=h?.stop,Un(()=>()=>g.current?.(),[]);let v=Me(null),u=Me(null),w=Me(null),y=Me(e),R=Me(!1);Un(()=>{let i=y.current;if(y.current=e,i===e)return;let A=R.current;e!=="loading"&&(R.current=!1),Ur(v.current)&&(e==="failed"?w.current?.focus():A&&u.current?.focus())},[e]);let P=Hn(()=>{R.current=!0,t()},[t]),K=e==="loading",f=K||I,q=Hn(()=>{f||(g.current?.(),b())},[f,b]),F;e==="failed"?F=Le($,{tone:"danger",testId:"sekyro-assets-error",children:[G("p",{className:"sekyro-text-body",children:l("fcv2.err.models")}),G(B,{kind:"ghost",ref:w,className:"sekyro-btn--start",onClick:P,"data-testid":"sekyro-assets-retry",children:l("common.retry")})]}):F=Le("div",{className:"sekyro-stack sekyro-stack--1",children:[G(B,{ref:u,full:!0,"data-testid":"sekyro-start","aria-disabled":f?"true":void 0,"aria-busy":K?"true":void 0,onClick:q,children:K?Le(Gr,{children:[G(vn,{}),l("capture.preparing.title")]}):M??l("capture.start")}),K?G("p",{className:"sekyro-text-muted",children:l("capture.preparing.hint")}):null]});let j=r==="assisted";return Le("div",{ref:v,className:"sekyro-stack sekyro-stack--4","data-testid":"sekyro-intro","data-assets":e,children:[j?Le("div",{className:"sekyro-stack sekyro-stack--1","data-testid":"sekyro-assisted-intro",children:[G("h2",{className:"sekyro-text-body",children:l("capture.assisted.title")}),G("p",{className:"sekyro-text-muted",children:l("capture.assisted.lead")})]}):null,C!==!1?G(Cn,{tips:C}):null,h!==void 0?Le(B,{kind:"ghost",className:"sekyro-btn--start",onClick:h.toggle,"data-testid":"sekyro-tips-listen",children:[G(Ce,{off:!1}),l(h.playing?"capture.tips.stop":"capture.tips.listen")]}):null,G(Kn,{state:s}),j&&o?G(On,{value:c,onChange:a}):null,G(Bn,{voice:d}),G("p",{className:"sekyro-text-muted",children:l("capture.securityNote")}),F,G("p",{role:"status",className:"sekyro-visually-hidden","data-testid":"sekyro-intro-status",children:e==="loading"?l("capture.preparing.title"):e==="ready"?l("capture.ready"):""})]})}n(Gn,"PreCaptureScreen");function Ur(e){if(typeof document>"u")return!1;let t=document.activeElement;return t===null||t===document.body||e!==null&&e.contains(t)}n(Ur,"focusIsOurs");import{useCallback as qr,useEffect as Ct,useState as bt}from"react";function qn(e){return jn(e,"mobileRequired")}n(qn,"useMobileRequired");function Dn(e){return jn(e,"returning").required}n(Dn,"useReturning");function jn(e,t){let[s,r]=bt({required:!1,settled:e===void 0});return Ct(()=>{let o=e?.[t];if(e===void 0||typeof o!="function"){r({required:!1,settled:!0});return}let c=!0;return r({required:!1,settled:!1}),Promise.resolve().then(()=>o.call(e)).then(a=>{c&&r({required:a===!0,settled:!0})},()=>{c&&r({required:!1,settled:!0})}),()=>{c=!1}},[e,t]),s}n(jn,"useFlag");function $n(e){let t=n(()=>e?.captureChoice??null,"initialChoice"),[s,r]=bt(()=>({session:"self",choice:t(),settled:e===void 0}));Ct(()=>{let a=e?.captureMode,d=e?.captureChoice??null;if(e===void 0||typeof a!="function"){r({session:"self",choice:d,settled:!0});return}let C=!0;return r({session:"self",choice:d,settled:!1}),Promise.resolve().then(()=>a.call(e)).then(h=>{let M=e.captureChoice??null;C&&r({session:M!==null&&h===M?"choice":h==="assisted"||h==="choice"?h:"self",choice:M,settled:!0})},()=>{C&&r({session:"self",choice:null,settled:!0})}),()=>{C=!1}},[e]);let o=qr(a=>{e?.chooseCaptureMode?.(a),r(d=>({...d,choice:a}))},[e]);return{mode:s.session==="choice"?s.choice??"self":s.session==="assisted"?"assisted":"self",session:s.session,choice:s.choice,settled:s.settled,choose:o}}n($n,"useCaptureMode");function zn(e){let[t,s]=bt(!1);return Ct(()=>{if(s(!1),e===void 0)return;let r=e.on("busy",()=>s(!0)),o=e.on("result",()=>s(!1));return()=>{r(),o()}},[e]),t}n(zn,"useBusy");import{getLivenessAssetsStatus as Dr,preloadLivenessAssets as jr,subscribeLivenessAssets as $r}from"@sekyro/web";import{useCallback as St,useEffect as Yn,useRef as Zn,useState as zr,useSyncExternalStore as Yr}from"react";var Zr=n(()=>"idle","serverSnapshot");function Wn(e){return jr(e!==void 0?{assetBaseUrl:e}:{})}n(Wn,"preload");function Qn(e,t=!0){let s=Yr(St(I=>$r(I,e),[e]),()=>Dr(e),Zr),[r,o]=zr(null),c=Zn(!1),a=St(()=>{Wn(e).then(I=>{c.current&&I==="idle"&&o({base:e})})},[e]);Yn(()=>(c.current=!0,a(),()=>{c.current=!1}),[a]);let d=Zn(null);Yn(()=>{if(s!=="idle"){d.current={base:e};return}!t||d.current===null||d.current.base!==e||(d.current=null,a())},[s,e,a,t]);let C=St(()=>{Wn(e)},[e]);return{gate:r!==null&&r.base===e&&s==="idle"||s==="ready"?"ready":s==="failed"?"failed":"loading",retry:C}}n(Qn,"useLivenessAssets");import{createLivenessCapture as Wr}from"@sekyro/web";import{useCallback as Rt,useEffect as Qr,useRef as ye,useState as z}from"react";var Jn={progress:0,hint:null,faceDetected:!1};function Xn(e){let{videoRef:t,assetBaseUrl:s}=e,o=ye(e.verification).current,c=ye(!1);e.verification!==o&&!c.current&&et()&&(c.current=!0,console.warn("[@sekyro/react] <LivenessCapture>: the `verification` prop changed identity after mount. The first instance stays bound (the camera is not rebuilt); create the verification once (useMemo / useState / outside render) instead of on every render."));let a=ye(null),[d,C]=z("idle"),[h,M]=z(Jn),[I,b]=z(!1),[l,g]=z(!1),[v,u]=z(null),[w,y]=z(!1),[R,P]=z(null),[K,f]=z(null),[q,F]=z(null),[j,i]=z(null),[A,N]=z(null),_=ye(null),x=ye("idle"),se=ye(-1),[ue,T]=z(0),E=ye(e);E.current=e,Qr(()=>{let H=t.current;if(H===null)return;let ne={video:H,...s!==void 0?{assetBaseUrl:s}:{}},S=o!==void 0?o.liveness(ne):Wr(ne);a.current=S;let Fe=n(()=>N(S.facingMode??null),"readFacing");Fe();let Ne=[S.on("state",p=>{p==="starting"?(x.current!=="starting"&&(se.current+=1,T(Math.max(0,se.current))),f(null),F(null),M(Jn),g(!1),b(!1),u(null),P(null),_.current=null):p==="gating"&&x.current==="recording"&&(g(!1),b(!1),u(null),_.current=null),x.current=p,Fe(),C(p),E.current.onStateChange?.(p)}),S.on("gate",p=>{let ie=_.current;_.current=p.progress,b(ie!==null&&p.progress<ie-.001&&p.progress>0&&p.progress<1),p.progress>=1&&g(!0),M(p)}),S.on("frozen",({previewDataUrl:p})=>u(p)),S.on("profile",({animations:p})=>y(p==="reduced")),S.on("ramp",({colour:p})=>P(p)),S.on("captured",p=>{f(p),i(null),E.current.onCaptured?.(p)}),S.on("error",p=>{F(p);let ie=o?.reportCaptureIssue;ie!==void 0&&Ze(Be=>ie.call(o,Be),an("liveness",p,Math.max(0,se.current))),E.current.onError?.(p)}),o?.on("result",p=>{i(p),E.current.onResult?.(p)})];return()=>{for(let p of Ne)p?.();a.current=null,S.destroy()}},[o,t,s]);let de=Rt(H=>{a.current?.start(H)},[]),k=Rt(()=>{a.current?.retry()},[]),Z=Rt(()=>{let H=a.current,ne=H?.switchCamera()===!0;return ne&&(N(H?.facingMode??null),g(!1),b(!1),u(null),_.current=null),ne},[]);return{state:d,gate:h,draining:I,gateLocked:l,frozenPreview:v,reduceMotion:w,rampColour:R,artifacts:K,error:q,result:j,facingMode:A,start:de,retry:k,switchCamera:Z,attempt:ue}}n(Xn,"useLivenessHandle");import{useCallback as Jr,useEffect as Xr,useState as ot}from"react";var eo=new Set(["national_number"]);function er(e){if(e==null||!e.available||e.selected!==null)return null;let t=e.options.filter(s=>eo.has(s));return t.length>0?{...e,options:t}:null}n(er,"pending");function tr(e){let[t,s]=ot(null),[r,o]=ot(e===void 0),[c,a]=ot(!1),[d,C]=ot(!1);Xr(()=>{if(s(null),e===void 0){o(!0);return}let b=!0,l=e.methodChoice;typeof l=="function"?(o(!1),Promise.resolve().then(()=>l.call(e)).then(v=>{b&&s(er(v))},()=>{}).finally(()=>{b&&o(!0)})):o(!0);let g=e.on("method",v=>s(er(v)));return()=>{b=!1,g()}},[e]);let h=Jr(async b=>{if(e===void 0)return!1;a(!0),C(!1);try{return await e.selectMethod(b),s(null),!0}catch{return C(!0),!1}finally{a(!1)}},[e]),M=t!==null&&t.options.length===1?t.options[0]:null;return{choice:t,auto:M==="national_number"&&!d?M:null,settled:r,busy:c,failed:d,select:h}}n(tr,"useMethodChoice");import{useEffect as to,useMemo as no,useState as ro}from"react";var oo=["ar","fr","en"];function so(e){if(typeof e!="string")return!1;try{let t=new URL(e);return t.protocol==="https:"||t.protocol==="http:"&&/^(localhost|127\.0\.0\.1)$/.test(t.hostname)}catch{return!1}}n(so,"isClipUrl");function io(e){let t=e.clips;if(typeof t!="object"||t===null)return null;let s={};for(let r of oo){let o=t[r];if(!(typeof o!="object"||o===null))for(let[c,a]of Object.entries(o))!fe(c)||!so(a)||((s[r]??(s[r]={}))[c]=a)}return Object.keys(s).length>0?s:null}n(io,"toVoiceClipMap");function nr(e){let[t,s]=ro(null);to(()=>{if(s(null),e===void 0)return;let o=!0,c=n(d=>{if(!o)return;let C=typeof d=="object"&&d!==null&&typeof d.setId=="string"?d:null;s(h=>h?.setId===C?.setId?h:C)},"take");try{typeof e.voiceClips=="function"&&Promise.resolve(e.voiceClips()).then(c,()=>c(null))}catch{c(null)}let a=e.on("view",d=>c(d.voice));return()=>{o=!1,a()}},[e]);let r=no(()=>t!==null?io(t):null,[t]);return e===void 0?null:r}n(nr,"useServerVoiceClips");import{jsx as rr}from"react/jsx-runtime";function or({voice:e}){let t=O();return rr(B,{kind:"chip","aria-pressed":e.enabled,"aria-label":t("capture.voiceGuidance"),"data-testid":"sekyro-voice-toggle",onClick:()=>e.toggle(),children:rr(Ce,{off:!e.enabled,className:"sekyro-icon"})})}n(or,"VoiceChip");import{Fragment as ir,jsx as V,jsxs as Ie}from"react/jsx-runtime";var lo=800;function uo(e){return e===void 0||e!==!1&&e.length===Qe.length&&Qe.every(t=>e.includes(t))}n(uo,"isDefaultTips");function po(e){if(e.type==="keydown"&&e.key==="Escape")return!1;let t=globalThis.navigator?.userActivation;return t===void 0?!(e.type==="pointerup"&&e.pointerType==="touch"):t.isActive}n(po,"carriesActivation");function fo(e){return typeof e=="object"&&e!==null&&!ao(e)&&"tone"in e&&"text"in e}n(fo,"isNoticeObject");var mo=new Set(["nni_unbound","id_number_unbound","method_required","mobile_required","portrait_required"]);function yo(e){return e==="starting"||e==="gating"||e==="recording"}n(yo,"isCapturing");function go(e){return e==="captured"||e==="uploading"||e==="checking"}n(go,"isPostCapture");function Ki({verification:e,locale:t,dir:s,strings:r,slots:o,autoStart:c=!1,notice:a,startDisabled:d=!1,startLabel:C,tips:h,tipsSummary:M,coach:I,voice:b,onGuidance:l,onCaptured:g,onResult:v,onError:u,onStateChange:w,assetBaseUrl:y,className:R}){let P=rn(t),K=we(()=>nn(t,r),[t,r,P]),f=we(()=>m=>K[m]??"",[K]),q=s??(t==="ar"?"rtl":"ltr"),F=ge(null),j=co(An),i=Xn({verification:e,videoRef:F,assetBaseUrl:y,onCaptured:g,onResult:v,onError:u,onStateChange:w}),A=Qn(y,i.state==="idle"&&i.error===null),N=tr(e),_=N.choice!==null,x=qn(e),se=Dn(e),ue=zn(e),T=cn(),E=$n(e),de=E.settled&&E.session==="choice"&&E.choice===null,k=E.mode==="assisted",Z=k&&T.canChooseFacing,H=b!==!1&&b?.clips===void 0,ne=nr(H?e:void 0),S=gt({locale:t,defaultClips:ne,options:b}),[Fe,Ne]=sr(null),p=k?Fe??(T.canChooseFacing?"environment":"user"):"user",ie=E.settled&&!de&&(!k||T.facingSettled),Be=ge(null),He=ge(!1),Vt=ge(S.unlock);Vt.current=S.unlock,oe(()=>{let m=Be.current;if(m===null)return;let W=["pointerup","touchend","click","keydown"],ce=n(()=>{for(let Pe of W)m.removeEventListener(Pe,ke,!0)},"disarm");function ke(Pe){if(He.current){ce();return}po(Pe)&&(He.current=!0,ce(),Vt.current())}n(ke,"onGesture");for(let Pe of W)m.addEventListener(Pe,ke,{capture:!0,passive:!0});return ce},[]);let Mt=st(()=>{He.current||(He.current=!0,S.unlock()),i.start({facing:p})},[S.unlock,i.start,p]),Lt=st(()=>i.start({facing:p}),[i.start,p]),Ue=ge(!1),he=i.state==="idle"&&i.error===null,wt=!_&&!x.required&&(c===!0||c==="when-permitted"&&T.permission==="granted"),It=wt&&N.settled&&x.settled&&ie,ar=c==="when-permitted"&&!T.permissionSettled&&!Ue.current,Nt=wt&&he&&!Ue.current,it=(ar||Nt||!ie)&&A.gate==="ready"?"loading":A.gate;oe(()=>{!It||!he||A.gate!=="ready"||Ue.current||(Ue.current=!0,Lt())},[It,he,A.gate,Lt]);let _t=de&&he&&!_&&!x.required,cr=!_t&&he&&!_&&!x.required&&!(Nt&&A.gate==="ready"),xt=st(()=>{i.switchCamera()&&Ne(p==="user"?"environment":"user")},[i.switchCamera,p]),Et=i.state!=="idle"&&i.facingMode!==null?i.facingMode:p;oe(()=>{let m=F.current?.style;Et==="user"?m?.removeProperty("transform"):m&&(m.transform="none")},[Et]);let Ge=we(()=>i.artifacts!==null&&typeof URL.createObjectURL=="function"?URL.createObjectURL(i.artifacts.keyframe):null,[i.artifacts]);oe(()=>{if(Ge!==null)return()=>URL.revokeObjectURL(Ge)},[Ge]);let Pt=i.frozenPreview??Ge,ve=e!==void 0,U=yo(i.state),ae=go(i.state),qe=U||ae,Y=i.result,At=i.state==="done"&&Y!==null,Tt=i.state==="recording"&&i.frozenPreview!==null,at=j!==null,_e=ae||Tt,Ot=ae?"checking":Tt?"frozen":i.state==="recording"?"recording":i.gateLocked||i.gate.progress>=1?"locked":i.gate.faceDetected?"aligning":"seeking",De=U?i.gate.hint:null,je=i.state==="starting"?"capture.preparing.title":De===null?null:De==="center"&&!i.gate.faceDetected?"fcv3.no_face":Wt(De),[lr,Kt]=sr(null);oe(()=>{if(je!=="fcv3.no_face"){Kt(je);return}if(!U)return;let m=setTimeout(()=>Kt(je),lo);return()=>clearTimeout(m)},[je,U]);let ct=U&&typeof I=="string"&&I!=="",Ft=k&&U?f("capture.assisted.stage"):null,pe=U&&!ct?lr:null,lt=ct?I:pe===null?"":f(pe);ht(S,pe,lt,U);let Bt=ge(l);Bt.current=l,oe(()=>{if(fe(pe))try{Bt.current?.(pe)}catch(m){console.error("[@sekyro/react] onGuidance threw:",m)}},[pe]);let xe=we(()=>({supported:S.supported,enabled:S.enabled,setEnabled:S.setEnabled,toggle:S.toggle}),[S.supported,S.enabled,S.setEnabled,S.toggle]),ut=o?.voicePrompt,Ht=ut!==void 0,Ut=b===void 0,Gt=ge(!1);oe(()=>{!Ht||!Ut||Gt.current||!et()||(Gt.current=!0,console.warn("[@sekyro/react] <LivenessCapture>: `slots.voicePrompt` is set and `voice` is undefined, so the component speaks the guidance itself. If your slot plays audio, pass voice={false} or the person hears every hint twice; pass voice={{}} to keep the built-in voice and silence this warning."))},[Ht,Ut]);let ur=ut!==void 0?(m,W,ce)=>ut(m,W,ce,xe):S.supported?()=>V(or,{voice:xe}):void 0,{summary:dt,summaryPlaying:qt,toggleSummary:Dt,stopSummary:jt}=S,$e=M!==void 0&&M!=="",$t=$e?M:f("capture.tips.summary"),zt=$e?dt!=="none":dt==="partner"||dt==="default"&&uo(h),dr=we(()=>zt?{playing:qt,toggle:n(()=>Dt($t,{clip:!$e}),"toggle"),stop:jt}:void 0,[zt,qt,Dt,$t,jt,$e]),pr=we(()=>({assets:it,retryAssets:A.retry,permission:T.permission,permissionSettled:T.permissionSettled,captureMode:E.mode,facing:p,setFacing:Ne,canChooseFacing:Z,voice:xe}),[it,A.retry,T.permission,T.permissionSettled,E.mode,Z,p,xe]),fr=fo(a)?V($,{tone:a.tone,testId:"sekyro-host-notice",children:V("span",{children:a.text})}):a??null,re=Y!==null&&Y.status==="retry"?Y:null,D=At&&Y.status==="unavailable"&&!_&&Y.reason!=="portrait_required"?Y:null,Ee=At&&(Y.status==="approved"||Y.status==="rejected"||Y.status==="review")?Y:null,ze=n((m,W)=>{if(m===void 0)return null;if(m==="device_cooldown"){let ke=en(t,W);if(ke!==null)return f(ke.key).replace("{time}",ke.time)}let ce=Xt(m);return ce===null?null:f(ce)},"reasonText"),pt=n(m=>{let W=m.retakeHint===void 0?null:Qt(m.retakeHint);return W===null?ze(m.reason):f(W)},"retryText"),mr=D!==null&&D.reason!==void 0&&D.reason!=="nni_unbound"&&D.reason!=="id_number_unbound"&&D.reason!=="method_required"&&D.reason!=="mobile_required"&&!(D.reason==="no_recorder"&&i.artifacts?.degraded==="NO_RECORDER"),Ye=D?.reason,Yt=i.attempt;oe(()=>{D===null||Ye===void 0||e?.reportCaptureIssue===void 0||mo.has(Ye)||Ze(m=>e.reportCaptureIssue?.(m),{check:"liveness",kind:"unavailable",phase:"upload",engineKind:Ye,attempt:Math.min(1e3,Yt)})},[D,Ye,Yt,e]);let Zt=We(),yr=_&&N.auto===null&&!U&&!ae&&i.error===null,ft=st(async m=>{await N.select(m)&&i.state==="done"&&i.retry()},[N.select,i.state,i.retry]);return oe(()=>{N.auto!==null&&!N.busy&&!U&&!ae&&ft(N.auto)},[N.auto,N.busy,U,ae,ft]),V(on,{value:f,children:Ie("div",{ref:Be,className:R===void 0?"sekyro-capture":`sekyro-capture ${R}`,dir:q,lang:t,"data-testid":"sekyro-liveness-capture","data-state":i.state,children:[o?.header,re!==null&&pt(re)!==null&&!(at&&qe)?V($,{tone:"warning",role:"status",testId:"sekyro-retry-notice",children:V("span",{children:pt(re)})}):null,ue&&ae&&!at?V($,{tone:"info",role:"status",testId:"sekyro-busy-notice",children:V("span",{children:f("capture.busy")})}):null,x.required&&he?V($,{tone:"info",role:"status",testId:"sekyro-mobile-required",children:V("span",{children:f("reasons.mobile_required")})}):null,i.error!==null?o?.errorPanel!==void 0?o.errorPanel(i.error,i.retry):Ie($,{tone:"danger",testId:"sekyro-error-notice",children:[V("span",{children:f(Jt(i.error.kind))}),i.error.retryable?V(B,{ref:Zt,kind:"ghost",className:"sekyro-btn--start",onClick:i.retry,children:f("common.retry")}):null]}):null,D!==null?Ie($,{tone:"danger",testId:"sekyro-unavailable-notice",children:[V("span",{children:ze(D.reason)??f(D.reason===void 0?"errors.session_expired":"errors.network_error")}),mr?V(B,{ref:Zt,kind:"ghost",className:"sekyro-btn--start",onClick:i.retry,children:f("capture.recordAgain")}):null]}):null,Ee!==null&&ze(Ee.reason)!==null?V($,{tone:Ee.status==="rejected"?"danger":"info",testId:"sekyro-result-notice",children:V("span",{children:ze(Ee.reason,Ee.retryAfter)})}):null,V("div",{className:qe?void 0:"sekyro-hidden","data-capture-live":qe?"":void 0,children:at?j({videoRef:F,guidance:_e&&ve?f("capture.checking"):lt,coached:ct&&!(_e&&ve),note:_e?ve?f(ue?"capture.busy":"capture.checkingHint"):null:re!==null?pt(re):Ft,settled:_e&&ve,progress:i.gate.progress,phase:Ot,still:_e?Pt:null,live:qe,switchCamera:U&&i.state!=="recording"&&Z&&xt,ramp:i.rampColour===null?null:{colour:i.rampColour}}):V(sn,{videoRef:F,guidanceText:lt,guidanceHint:De,guidanceKey:pe,progress:i.gate.progress,phase:Ot,draining:i.draining,stillUrl:Pt,showChecking:ve,onSwitchCamera:xt,canSwitchCamera:k&&U&&i.state!=="recording",operatorText:Ft,voicePrompt:ur,overlay:m=>Ie(ir,{children:[o?.stageOverlay?.(m),V(ln,{colour:i.rampColour})]}),reduceMotion:i.reduceMotion})}),yr&&N.choice!==null?V(Sn,{title:f("method.title"),description:f("method.description"),options:N.choice.options.map(m=>({id:m,label:f(`method.${m}`)})),busy:N.busy,error:N.failed?f("errors.network_error"):null,focus:i.state==="done",testId:"sekyro-method",look:"buttons",onChoose:m=>{ft(m)}}):null,_t?V(Tn,{onChoose:E.choose}):null,cr?Ie(ir,{children:[se&&o?.header===void 0?Ie("div",{className:"sekyro-stack sekyro-stack--1",children:[V("h2",{className:"sekyro-text-body",children:f("returning.title")}),V("p",{className:"sekyro-text-muted",children:f("returning.description")})]}):null,fr,o?.intro!==void 0?o.intro(Mt,pr):V(Gn,{assets:it,onRetryAssets:A.retry,permission:T.permission,captureMode:E.mode,canChooseFacing:Z,facing:p,onFacingChange:Ne,voice:xe,tips:h??Qe,summary:dr,startLabel:C,startDisabled:d,onStart:Mt})]}):null,V(Pn,{showCoaching:re!==null,attemptsText:re?.attemptsRemaining!==void 0?tn(K,t,re.attemptsRemaining):null,showRetake:re!==null&&!U&&!ae||!ve&&i.state==="captured",onRetake:i.retry}),o?.footer]})})}n(Ki,"LivenessCapture");export{et as a,An as b,Tn as c,On as d,Qe as e,Sn as f,$n as g,Xe as h,lo as i,Ki as j};
|