@incodetech/web 2.0.0-alpha.1 → 2.0.0-alpha.2
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/.turbo/turbo-build.log +58 -0
- package/.turbo/turbo-coverage.log +23 -0
- package/.turbo/turbo-format.log +6 -0
- package/.turbo/turbo-lint$colon$fix.log +6 -0
- package/.turbo/turbo-lint.log +6 -0
- package/.turbo/turbo-test.log +1033 -0
- package/.turbo/turbo-typecheck.log +5 -0
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/email/email.tsx.html +850 -0
- package/coverage/email/emailInput.tsx.html +340 -0
- package/coverage/email/index.html +131 -0
- package/coverage/favicon.png +0 -0
- package/coverage/flow/flow.tsx.html +961 -0
- package/coverage/flow/flowCompleted.tsx.html +448 -0
- package/coverage/flow/flowInit.ts.html +367 -0
- package/coverage/flow/flowStart.tsx.html +208 -0
- package/coverage/flow/index.html +221 -0
- package/coverage/flow/preloadFlow.ts.html +598 -0
- package/coverage/flow/unsupportedModule.tsx.html +202 -0
- package/coverage/flow/useFlowInitialization.ts.html +469 -0
- package/coverage/flow/useModuleLoader.ts.html +361 -0
- package/coverage/hooks/index.html +116 -0
- package/coverage/hooks/useManager.ts.html +205 -0
- package/coverage/index.html +401 -0
- package/coverage/permissions/boldWithArrow.tsx.html +208 -0
- package/coverage/permissions/denied.tsx.html +172 -0
- package/coverage/permissions/deniedAndroid.tsx.html +253 -0
- package/coverage/permissions/deniedDesktop.tsx.html +277 -0
- package/coverage/permissions/deniedIOS.tsx.html +304 -0
- package/coverage/permissions/deniedInstructions.tsx.html +142 -0
- package/coverage/permissions/iconWrapper.tsx.html +130 -0
- package/coverage/permissions/index.html +251 -0
- package/coverage/permissions/learnMore.tsx.html +340 -0
- package/coverage/permissions/numberedStep.tsx.html +127 -0
- package/coverage/permissions/permissions.tsx.html +289 -0
- package/coverage/phone/index.html +116 -0
- package/coverage/phone/phoneInput.tsx.html +832 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/selfie/index.html +131 -0
- package/coverage/selfie/selfie.tsx.html +334 -0
- package/coverage/selfie/tutorial.tsx.html +214 -0
- package/coverage/shared/baseTutorial/baseTutorial.tsx.html +250 -0
- package/coverage/shared/baseTutorial/index.html +131 -0
- package/coverage/shared/baseTutorial/replaceBaseTutorial.ts.html +289 -0
- package/coverage/shared/button/button.tsx.html +226 -0
- package/coverage/shared/button/index.html +116 -0
- package/coverage/shared/componentRoot/incodeComponent.tsx.html +121 -0
- package/coverage/shared/componentRoot/index.html +116 -0
- package/coverage/shared/countries/countries.ts.html +502 -0
- package/coverage/shared/countries/index.html +116 -0
- package/coverage/shared/icons/chevronDown.tsx.html +151 -0
- package/coverage/shared/icons/index.html +131 -0
- package/coverage/shared/icons/successIcon.tsx.html +163 -0
- package/coverage/shared/loader/index.html +116 -0
- package/coverage/shared/loader/loadingIcon.tsx.html +286 -0
- package/coverage/shared/otpInput/index.html +116 -0
- package/coverage/shared/otpInput/otpInput.tsx.html +808 -0
- package/coverage/shared/page/index.html +146 -0
- package/coverage/shared/page/page.tsx.html +358 -0
- package/coverage/shared/page/pageUiConfig.ts.html +277 -0
- package/coverage/shared/page/verifiedByIncode.tsx.html +310 -0
- package/coverage/shared/spacer/index.html +116 -0
- package/coverage/shared/spacer/spacer.tsx.html +349 -0
- package/coverage/shared/spinner/index.html +116 -0
- package/coverage/shared/spinner/spinner.tsx.html +280 -0
- package/coverage/shared/title/index.html +116 -0
- package/coverage/shared/title/title.tsx.html +121 -0
- package/coverage/shared/uiConfig/index.html +116 -0
- package/coverage/shared/uiConfig/uiConfig.ts.html +193 -0
- package/coverage/shared/webComponent/incodeModule.ts.html +172 -0
- package/coverage/shared/webComponent/index.html +131 -0
- package/coverage/shared/webComponent/registerIncodeElement.ts.html +130 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +210 -0
- package/coverage/styles/cn.tsx.html +148 -0
- package/coverage/styles/fetchTheme.ts.html +349 -0
- package/coverage/styles/index.html +131 -0
- package/dist/asset-manifest.json +18 -0
- package/dist/browser-ponyfill-B6W6hHVY.js +344 -0
- package/dist/button-DeMZ_34N.js +266 -0
- package/dist/button.css +335 -0
- package/dist/email/email.es.js +145 -0
- package/dist/email/styles.css +123 -0
- package/dist/flow/flow.es.js +9 -0
- package/dist/flow/styles.css +204 -0
- package/dist/flow-ZK6OBsa3.js +568 -0
- package/dist/incodeModule-BF5MX9GT.js +243 -0
- package/dist/incodeModule.css +119 -0
- package/dist/index.es.js +101 -0
- package/dist/otpInput-BUrV4IAF.js +151 -0
- package/dist/otpInput.css +167 -0
- package/dist/phone/phone.es.js +3442 -0
- package/dist/phone/styles.css +305 -0
- package/dist/selfie/selfie.es.js +893 -0
- package/dist/selfie/styles.css +1163 -0
- package/dist/selfieTutorial-C-u5GufD.js +29 -0
- package/dist/styles/core.css +1013 -0
- package/dist/styles/tokens.css +543 -0
- package/dist/successIcon.css +4 -0
- package/dist/title-ng7q7YDh.js +2161 -0
- package/dist/title.css +38 -0
- package/dist/types/core.d.ts +1 -0
- package/dist/types/email/email.d.ts +2 -0
- package/dist/types/email.d.ts +50 -0
- package/dist/types/flow/flow.d.ts +2 -0
- package/dist/types/flow.d.ts +46 -0
- package/dist/types/index.d.ts +223 -0
- package/dist/types/phone/phone.d.ts +2 -0
- package/dist/types/phone.d.ts +51 -0
- package/dist/types/selfie/selfie.d.ts +2 -0
- package/dist/types/selfie.d.ts +24 -0
- package/dist/types/styles/core.d.ts +1 -0
- package/dist/vendor-preact-CK0WeTOR.js +584 -0
- package/package.json +17 -17
package/dist/button.css
ADDED
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
|
|
2
|
+
.IncodeLoadingIcon {
|
|
3
|
+
animation: var(--animate-spin, spin 1s linear infinite);
|
|
4
|
+
display: inline-block;
|
|
5
|
+
position: relative;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.IncodeLoadingIconPrimary, .IncodeLoadingIconSecondary {
|
|
9
|
+
inset: var(--spacing-0, var(--spacing-none, 0px));
|
|
10
|
+
justify-content: center;
|
|
11
|
+
align-items: center;
|
|
12
|
+
display: flex;
|
|
13
|
+
position: absolute;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.IncodeLoadingIconPrimaryIcon {
|
|
17
|
+
fill: var(--color-spinner-surface-primary, var(--spinner-surface-primary));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.IncodeLoadingIconSecondaryIcon {
|
|
21
|
+
fill: var(--color-spinner-surface-secondary, var(--spinner-surface-secondary));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.IncodeCaptureUploadingIconContainer {
|
|
25
|
+
justify-content: center;
|
|
26
|
+
align-items: center;
|
|
27
|
+
display: flex;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@keyframes spin {
|
|
31
|
+
to {
|
|
32
|
+
transform: rotate(360deg);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
|
|
36
|
+
.IncodeSpacerFlex {
|
|
37
|
+
flex: 1;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.IncodeSpacerVertical0 {
|
|
41
|
+
height: var(--spacing-0, var(--spacing-none, 0px));
|
|
42
|
+
width: 100%;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.IncodeSpacerVertical2 {
|
|
46
|
+
height: var(--spacing-2, var(--spacing-2, 2px));
|
|
47
|
+
width: 100%;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.IncodeSpacerVertical4 {
|
|
51
|
+
height: var(--spacing-4, var(--spacing-4, 4px));
|
|
52
|
+
width: 100%;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.IncodeSpacerVertical8 {
|
|
56
|
+
height: var(--spacing-8, var(--spacing-8, 8px));
|
|
57
|
+
width: 100%;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.IncodeSpacerVertical12 {
|
|
61
|
+
height: var(--spacing-12, var(--spacing-12, 12px));
|
|
62
|
+
width: 100%;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.IncodeSpacerVertical16 {
|
|
66
|
+
height: var(--spacing-16, var(--spacing-16, 16px));
|
|
67
|
+
width: 100%;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.IncodeSpacerVertical20 {
|
|
71
|
+
height: var(--spacing-20, var(--spacing-20, 20px));
|
|
72
|
+
width: 100%;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.IncodeSpacerVertical24 {
|
|
76
|
+
height: var(--spacing-24, var(--spacing-24, 24px));
|
|
77
|
+
width: 100%;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.IncodeSpacerVertical32 {
|
|
81
|
+
height: var(--spacing-32, var(--spacing-32, 32px));
|
|
82
|
+
width: 100%;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.IncodeSpacerVertical40 {
|
|
86
|
+
height: var(--spacing-40, var(--spacing-40, 40px));
|
|
87
|
+
width: 100%;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.IncodeSpacerVertical48 {
|
|
91
|
+
height: var(--spacing-48, var(--spacing-48, 48px));
|
|
92
|
+
width: 100%;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.IncodeSpacerVertical64 {
|
|
96
|
+
height: var(--spacing-64, var(--spacing-64, 64px));
|
|
97
|
+
width: 100%;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.IncodeSpacerVertical80 {
|
|
101
|
+
height: var(--spacing-80, var(--spacing-80, 80px));
|
|
102
|
+
width: 100%;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.IncodeSpacerVertical96 {
|
|
106
|
+
height: var(--spacing-96, var(--spacing-96, 96px));
|
|
107
|
+
width: 100%;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.IncodeSpacerVertical104 {
|
|
111
|
+
height: var(--spacing-104, var(--spacing-104, 104px));
|
|
112
|
+
width: 100%;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.IncodeSpacerVertical120 {
|
|
116
|
+
height: var(--spacing-120, var(--spacing-120, 120px));
|
|
117
|
+
width: 100%;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.IncodeSpacerVertical160 {
|
|
121
|
+
height: var(--spacing-160, var(--spacing-160, 160px));
|
|
122
|
+
width: 100%;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.IncodeSpacerVertical200 {
|
|
126
|
+
height: var(--spacing-200, var(--spacing-200, 200px));
|
|
127
|
+
width: 100%;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.IncodeSpacerHorizontal0 {
|
|
131
|
+
height: 100%;
|
|
132
|
+
width: var(--spacing-0, var(--spacing-none, 0px));
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.IncodeSpacerHorizontal2 {
|
|
136
|
+
height: 100%;
|
|
137
|
+
width: var(--spacing-2, var(--spacing-2, 2px));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.IncodeSpacerHorizontal4 {
|
|
141
|
+
height: 100%;
|
|
142
|
+
width: var(--spacing-4, var(--spacing-4, 4px));
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.IncodeSpacerHorizontal8 {
|
|
146
|
+
height: 100%;
|
|
147
|
+
width: var(--spacing-8, var(--spacing-8, 8px));
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.IncodeSpacerHorizontal12 {
|
|
151
|
+
height: 100%;
|
|
152
|
+
width: var(--spacing-12, var(--spacing-12, 12px));
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.IncodeSpacerHorizontal16 {
|
|
156
|
+
height: 100%;
|
|
157
|
+
width: var(--spacing-16, var(--spacing-16, 16px));
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.IncodeSpacerHorizontal20 {
|
|
161
|
+
height: 100%;
|
|
162
|
+
width: var(--spacing-20, var(--spacing-20, 20px));
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.IncodeSpacerHorizontal24 {
|
|
166
|
+
height: 100%;
|
|
167
|
+
width: var(--spacing-24, var(--spacing-24, 24px));
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.IncodeSpacerHorizontal32 {
|
|
171
|
+
height: 100%;
|
|
172
|
+
width: var(--spacing-32, var(--spacing-32, 32px));
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.IncodeSpacerHorizontal40 {
|
|
176
|
+
height: 100%;
|
|
177
|
+
width: var(--spacing-40, var(--spacing-40, 40px));
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.IncodeSpacerHorizontal48 {
|
|
181
|
+
height: 100%;
|
|
182
|
+
width: var(--spacing-48, var(--spacing-48, 48px));
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.IncodeSpacerHorizontal64 {
|
|
186
|
+
height: 100%;
|
|
187
|
+
width: var(--spacing-64, var(--spacing-64, 64px));
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.IncodeSpacerHorizontal80 {
|
|
191
|
+
height: 100%;
|
|
192
|
+
width: var(--spacing-80, var(--spacing-80, 80px));
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.IncodeSpacerHorizontal96 {
|
|
196
|
+
height: 100%;
|
|
197
|
+
width: var(--spacing-96, var(--spacing-96, 96px));
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.IncodeSpacerHorizontal104 {
|
|
201
|
+
height: 100%;
|
|
202
|
+
width: var(--spacing-104, var(--spacing-104, 104px));
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.IncodeSpacerHorizontal120 {
|
|
206
|
+
height: 100%;
|
|
207
|
+
width: var(--spacing-120, var(--spacing-120, 120px));
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.IncodeSpacerHorizontal160 {
|
|
211
|
+
height: 100%;
|
|
212
|
+
width: var(--spacing-160, var(--spacing-160, 160px));
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.IncodeSpacerHorizontal200 {
|
|
216
|
+
height: 100%;
|
|
217
|
+
width: var(--spacing-200, var(--spacing-200, 200px));
|
|
218
|
+
}
|
|
219
|
+
/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
|
|
220
|
+
@layer properties {
|
|
221
|
+
@supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
|
|
222
|
+
*, :before, :after, ::backdrop {
|
|
223
|
+
--tw-duration: initial;
|
|
224
|
+
--tw-font-weight: initial;
|
|
225
|
+
--tw-border-style: solid;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.IncodeButton {
|
|
231
|
+
border-radius: var(--radius-button-primary, var(--button-primary-border-radius));
|
|
232
|
+
text-align: center;
|
|
233
|
+
width: 100%;
|
|
234
|
+
max-width: 420px;
|
|
235
|
+
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
|
|
236
|
+
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));
|
|
237
|
+
transition-duration: var(--tw-duration, var(--default-transition-duration, .15s));
|
|
238
|
+
--tw-duration: .2s;
|
|
239
|
+
margin-inline: auto;
|
|
240
|
+
transition-duration: .2s;
|
|
241
|
+
display: block;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.IncodeButton.IncodeButtonPrimary {
|
|
245
|
+
background-color: var(--color-button-primary-surface-default, var(--button-primary-surface-default));
|
|
246
|
+
color: var(--color-button-primary-text-default, var(--button-primary-text-default));
|
|
247
|
+
padding-inline: var(--spacing-32, var(--spacing-32, 32px));
|
|
248
|
+
font-size: var(--text-18, var(--primitive-typography-size-18));
|
|
249
|
+
--tw-font-weight: var(--font-weight-medium, var(--primitive-typography-weight-medium));
|
|
250
|
+
font-weight: var(--font-weight-medium, var(--primitive-typography-weight-medium));
|
|
251
|
+
border-style: var(--tw-border-style);
|
|
252
|
+
border-width: 1.5px;
|
|
253
|
+
border-color: var(--color-button-primary-border-default, var(--button-primary-border-default));
|
|
254
|
+
padding-block: 18px;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.IncodeButton.IncodeButtonPrimary:active {
|
|
258
|
+
background-color: var(--color-button-primary-surface-pressed, var(--button-primary-surface-pressed));
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.IncodeButton.IncodeButtonPrimary:not(.IncodeButtonLoading):disabled {
|
|
262
|
+
background-color: var(--color-button-primary-surface-disabled, var(--button-primary-surface-disabled));
|
|
263
|
+
color: var(--color-button-primary-text-disabled, var(--button-primary-text-disabled));
|
|
264
|
+
cursor: not-allowed;
|
|
265
|
+
border-style: var(--tw-border-style);
|
|
266
|
+
border-width: 1px;
|
|
267
|
+
border-color: var(--color-button-primary-border-disabled, var(--button-primary-border-disabled));
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.IncodeButton.IncodeButtonPrimary.IncodeButtonLoading {
|
|
271
|
+
min-height: 56px;
|
|
272
|
+
padding: var(--spacing-0, var(--spacing-none, 0px));
|
|
273
|
+
pointer-events: none;
|
|
274
|
+
cursor: not-allowed;
|
|
275
|
+
justify-content: center;
|
|
276
|
+
align-items: center;
|
|
277
|
+
display: flex;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.IncodeButton.IncodeButtonPrimary.IncodeButtonLoading .IncodeLoadingIconPrimaryIcon {
|
|
281
|
+
fill: var(--button-primary-text-default);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.IncodeButton.IncodeButtonPrimary.IncodeButtonLoading .IncodeLoadingIconSecondaryIcon {
|
|
285
|
+
fill: var(--surface-brand-400-static);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.IncodeButton.IncodeButtonLink {
|
|
289
|
+
color: var(--color-button-primary-surface-default, var(--button-primary-surface-default));
|
|
290
|
+
border-style: var(--tw-border-style);
|
|
291
|
+
border-width: var(--border-width-none, var(--border-none));
|
|
292
|
+
--tw-border-style: none;
|
|
293
|
+
font-size: var(--text-16, var(--primitive-typography-size-16));
|
|
294
|
+
--tw-font-weight: var(--font-weight-normal, 400);
|
|
295
|
+
font-weight: var(--font-weight-normal, 400);
|
|
296
|
+
background-color: #0000;
|
|
297
|
+
border-style: none;
|
|
298
|
+
width: 100%;
|
|
299
|
+
height: 56px;
|
|
300
|
+
text-decoration-line: underline;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.IncodeButton.IncodeButtonLink:disabled {
|
|
304
|
+
cursor: not-allowed;
|
|
305
|
+
opacity: .5;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.IncodeButton.IncodeButtonLink.IncodeButtonLoading {
|
|
309
|
+
pointer-events: none;
|
|
310
|
+
cursor: not-allowed;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.IncodeButton.IncodeButtonLink.IncodeButtonLoading .IncodeLoadingIconPrimaryIcon {
|
|
314
|
+
fill: var(--button-primary-surface-default);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.IncodeButton.IncodeButtonLink.IncodeButtonLoading .IncodeLoadingIconSecondaryIcon {
|
|
318
|
+
fill: var(--surface-brand-400-static);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
@property --tw-duration {
|
|
322
|
+
syntax: "*";
|
|
323
|
+
inherits: false
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
@property --tw-font-weight {
|
|
327
|
+
syntax: "*";
|
|
328
|
+
inherits: false
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
@property --tw-border-style {
|
|
332
|
+
syntax: "*";
|
|
333
|
+
inherits: false;
|
|
334
|
+
initial-value: solid;
|
|
335
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { u as e, S as g, a as h, B as v } from "../button-DeMZ_34N.js";
|
|
2
|
+
import { createEmailManager as O } from "@incodetech/core/email";
|
|
3
|
+
import { d as f, y as b, k as y } from "../vendor-preact-CK0WeTOR.js";
|
|
4
|
+
import { a as V, I as P, P as E } from "../incodeModule-BF5MX9GT.js";
|
|
5
|
+
import { O as k } from "../otpInput-BUrV4IAF.js";
|
|
6
|
+
const I = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, w = ({
|
|
7
|
+
prefilledEmail: i,
|
|
8
|
+
emailError: s,
|
|
9
|
+
disabled: r = !1,
|
|
10
|
+
onEmailChange: t
|
|
11
|
+
}) => {
|
|
12
|
+
const [n, o] = f("");
|
|
13
|
+
b(() => {
|
|
14
|
+
if (i) {
|
|
15
|
+
o(i);
|
|
16
|
+
const a = I.test(i.trim());
|
|
17
|
+
t(i.trim(), a);
|
|
18
|
+
}
|
|
19
|
+
}, [i, t]);
|
|
20
|
+
const m = (a) => {
|
|
21
|
+
const u = a.target.value;
|
|
22
|
+
o(u);
|
|
23
|
+
const l = u.trim(), c = l.length > 0 && I.test(l);
|
|
24
|
+
t(l, c);
|
|
25
|
+
}, p = s ? "email-error" : void 0;
|
|
26
|
+
return /* @__PURE__ */ e("div", { class: "IncodeEmailInput", children: /* @__PURE__ */ e("div", { class: "IncodeEmailInputContainer", children: [
|
|
27
|
+
/* @__PURE__ */ e(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
class: `IncodeEmailInputWrapper ${s ? "IncodeEmailInputWrapperError" : ""} ${r ? "IncodeEmailInputWrapperDisabled" : ""}`,
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ e("label", { for: "email-input", class: "IncodeEmailInputLabel", children: "Email" }),
|
|
33
|
+
/* @__PURE__ */ e(
|
|
34
|
+
"input",
|
|
35
|
+
{
|
|
36
|
+
id: "email-input",
|
|
37
|
+
type: "email",
|
|
38
|
+
value: n,
|
|
39
|
+
onInput: m,
|
|
40
|
+
placeholder: "Email",
|
|
41
|
+
disabled: r,
|
|
42
|
+
class: "IncodeEmailInputField",
|
|
43
|
+
"data-testid": "email-input",
|
|
44
|
+
"aria-label": "Email address",
|
|
45
|
+
"aria-invalid": s ? "true" : "false",
|
|
46
|
+
"aria-describedby": p,
|
|
47
|
+
autocomplete: "email"
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
s && /* @__PURE__ */ e(y, { children: [
|
|
54
|
+
/* @__PURE__ */ e(g, { size: 8 }),
|
|
55
|
+
/* @__PURE__ */ e(
|
|
56
|
+
"p",
|
|
57
|
+
{
|
|
58
|
+
id: p,
|
|
59
|
+
class: "IncodeEmailInputError",
|
|
60
|
+
"data-testid": "email-error",
|
|
61
|
+
role: "alert",
|
|
62
|
+
children: s
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
] })
|
|
66
|
+
] }) });
|
|
67
|
+
}, C = ({ config: i, onFinish: s, onError: r }) => {
|
|
68
|
+
const [t, n] = h(() => {
|
|
69
|
+
if (!i)
|
|
70
|
+
throw new Error("Email config is required");
|
|
71
|
+
return O({ config: i });
|
|
72
|
+
}), [o, m] = f(!1);
|
|
73
|
+
if (b(() => {
|
|
74
|
+
if (t.status === "idle" && n.load)
|
|
75
|
+
try {
|
|
76
|
+
n.load();
|
|
77
|
+
} catch (a) {
|
|
78
|
+
r?.(
|
|
79
|
+
a instanceof Error ? a.message : "Failed to initialize email verification"
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
}, []), t.status === "idle" || t.status === "loadingPrefill" || t.status === "inputting" || t.status === "submitting" || t.status === "sendingOtp") {
|
|
83
|
+
const a = t.status === "idle" || t.status === "loadingPrefill" || t.status === "submitting" || t.status === "sendingOtp", d = t.status === "inputting" ? t.prefilledEmail : void 0, u = t.status === "inputting" ? t.emailError : void 0;
|
|
84
|
+
return /* @__PURE__ */ e(
|
|
85
|
+
E,
|
|
86
|
+
{
|
|
87
|
+
className: "IncodeEmailPage",
|
|
88
|
+
title: "Verify Email",
|
|
89
|
+
subtitle: i.otpVerification ? "We will send you a verification code" : void 0,
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ e(
|
|
92
|
+
w,
|
|
93
|
+
{
|
|
94
|
+
prefilledEmail: d,
|
|
95
|
+
emailError: u,
|
|
96
|
+
disabled: a,
|
|
97
|
+
onEmailChange: (l, c) => {
|
|
98
|
+
n.setEmail(l, c), m(c);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
),
|
|
102
|
+
/* @__PURE__ */ e(g, {}),
|
|
103
|
+
/* @__PURE__ */ e(
|
|
104
|
+
v,
|
|
105
|
+
{
|
|
106
|
+
onClick: () => n.submit(),
|
|
107
|
+
disabled: !o,
|
|
108
|
+
isLoading: a,
|
|
109
|
+
"data-testid": "email-submit",
|
|
110
|
+
children: "Continue"
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
if (t.status === "awaitingOtp" || t.status === "verifyingOtp" || t.status === "otpError") {
|
|
118
|
+
const a = t.status === "verifyingOtp";
|
|
119
|
+
return /* @__PURE__ */ e(
|
|
120
|
+
E,
|
|
121
|
+
{
|
|
122
|
+
className: "IncodeEmailPage IncodeEmailOtpPage",
|
|
123
|
+
title: "Enter Verification Code",
|
|
124
|
+
children: /* @__PURE__ */ e(
|
|
125
|
+
k,
|
|
126
|
+
{
|
|
127
|
+
resendTimer: t.status === "awaitingOtp" ? t.resendTimer : 0,
|
|
128
|
+
canResend: t.status === "awaitingOtp" ? t.canResend : !1,
|
|
129
|
+
error: t.status === "otpError" ? t.error : void 0,
|
|
130
|
+
onSubmit: (d) => n.submitOtp(d),
|
|
131
|
+
onResend: () => n.resendOtp(),
|
|
132
|
+
onBack: () => n.back(),
|
|
133
|
+
backLinkText: "change email address",
|
|
134
|
+
isLoading: a
|
|
135
|
+
}
|
|
136
|
+
)
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
return t.status === "success" ? (s?.(), null) : (t.status === "error" && r?.(t.error), null);
|
|
141
|
+
}, L = ({ config: i, onFinish: s, onError: r }) => /* @__PURE__ */ e(P, { children: i ? /* @__PURE__ */ e(C, { config: i, onFinish: s, onError: r }) : null });
|
|
142
|
+
V(L, "incode-email");
|
|
143
|
+
export {
|
|
144
|
+
L as Email
|
|
145
|
+
};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties {
|
|
3
|
+
@supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
|
|
4
|
+
*, :before, :after, ::backdrop {
|
|
5
|
+
--tw-border-style: solid;
|
|
6
|
+
--tw-duration: initial;
|
|
7
|
+
--tw-font-weight: initial;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.IncodeEmailPage .IncodePageContent {
|
|
13
|
+
padding-top: var(--spacing-32, var(--spacing-32, 32px));
|
|
14
|
+
padding-bottom: var(--spacing-16, var(--spacing-16, 16px));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.IncodeEmailInput, .IncodeEmailInputContainer {
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
align-items: center;
|
|
20
|
+
width: 100%;
|
|
21
|
+
display: flex;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.IncodeEmailInputWrapper {
|
|
25
|
+
border-radius: var(--radius-small, var(--border-radius-small));
|
|
26
|
+
border-style: var(--tw-border-style);
|
|
27
|
+
border-width: 1px;
|
|
28
|
+
border-color: var(--color-input-border-default, var(--input-border-default));
|
|
29
|
+
background-color: var(--color-input-surface-default, var(--input-surface-default));
|
|
30
|
+
width: 100%;
|
|
31
|
+
max-width: 340px;
|
|
32
|
+
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
|
|
33
|
+
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));
|
|
34
|
+
transition-duration: var(--tw-duration, var(--default-transition-duration, .15s));
|
|
35
|
+
--tw-duration: .2s;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
transition-duration: .2s;
|
|
38
|
+
display: flex;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.IncodeEmailInputWrapper:focus-within {
|
|
42
|
+
border-color: var(--color-input-border-active, var(--input-border-active));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.IncodeEmailInputWrapper.IncodeEmailInputWrapperError {
|
|
46
|
+
border-color: var(--color-input-border-negative, var(--input-border-negative));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.IncodeEmailInputWrapper.IncodeEmailInputWrapperDisabled {
|
|
50
|
+
border-color: var(--color-input-border-disabled, var(--input-border-disabled));
|
|
51
|
+
background-color: var(--color-input-surface-disabled, var(--input-surface-disabled));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.IncodeEmailInputLabel {
|
|
55
|
+
clip-path: inset(50%);
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
border-width: 0;
|
|
58
|
+
width: 1px;
|
|
59
|
+
height: 1px;
|
|
60
|
+
margin: -1px;
|
|
61
|
+
padding: 0;
|
|
62
|
+
position: absolute;
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.IncodeEmailInputField {
|
|
67
|
+
border-style: var(--tw-border-style);
|
|
68
|
+
border-width: var(--border-width-none, var(--border-none));
|
|
69
|
+
--tw-border-style: none;
|
|
70
|
+
width: 100%;
|
|
71
|
+
padding-inline: var(--spacing-16, var(--spacing-16, 16px));
|
|
72
|
+
padding-block: var(--spacing-16, var(--spacing-16, 16px));
|
|
73
|
+
font-size: var(--text-18, var(--primitive-typography-size-18));
|
|
74
|
+
--tw-font-weight: var(--font-weight-medium, var(--primitive-typography-weight-medium));
|
|
75
|
+
font-weight: var(--font-weight-medium, var(--primitive-typography-weight-medium));
|
|
76
|
+
color: var(--color-input-text-field-default, var(--input-text-field-default));
|
|
77
|
+
--tw-outline-style: none;
|
|
78
|
+
border-radius: var(--radius-small, var(--border-radius-small));
|
|
79
|
+
background-color: #0000;
|
|
80
|
+
border-style: none;
|
|
81
|
+
outline-style: none;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.IncodeEmailInputField::placeholder {
|
|
85
|
+
--tw-font-weight: var(--font-weight-medium, var(--primitive-typography-weight-medium));
|
|
86
|
+
font-weight: var(--font-weight-medium, var(--primitive-typography-weight-medium));
|
|
87
|
+
color: var(--color-input-text-field-placeholder, var(--input-text-field-placeholder));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.IncodeEmailInputField:disabled {
|
|
91
|
+
cursor: not-allowed;
|
|
92
|
+
color: var(--color-input-text-field-disabled, var(--input-text-field-disabled));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.IncodeEmailInputField:focus {
|
|
96
|
+
--tw-outline-style: none;
|
|
97
|
+
outline-style: none;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.IncodeEmailInputError {
|
|
101
|
+
margin: var(--spacing-0, var(--spacing-none, 0px));
|
|
102
|
+
text-align: center;
|
|
103
|
+
font-size: var(--text-14, var(--primitive-typography-size-14));
|
|
104
|
+
--tw-font-weight: var(--font-weight-medium, var(--primitive-typography-weight-medium));
|
|
105
|
+
font-weight: var(--font-weight-medium, var(--primitive-typography-weight-medium));
|
|
106
|
+
color: var(--color-input-text-helper-negative, var(--input-text-helper-negative));
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@property --tw-border-style {
|
|
110
|
+
syntax: "*";
|
|
111
|
+
inherits: false;
|
|
112
|
+
initial-value: solid;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@property --tw-duration {
|
|
116
|
+
syntax: "*";
|
|
117
|
+
inherits: false
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@property --tw-font-weight {
|
|
121
|
+
syntax: "*";
|
|
122
|
+
inherits: false
|
|
123
|
+
}
|