@incodetech/web 2.0.0-alpha.1 → 2.0.0-alpha.3

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.
Files changed (212) hide show
  1. package/dist/asset-manifest.json +18 -0
  2. package/dist/browser-ponyfill-B6W6hHVY.js +344 -0
  3. package/dist/button-DeMZ_34N.js +266 -0
  4. package/dist/button.css +335 -0
  5. package/dist/email/email.es.js +145 -0
  6. package/dist/email/styles.css +123 -0
  7. package/dist/flow/flow.es.js +9 -0
  8. package/dist/flow/styles.css +204 -0
  9. package/dist/flow-ZK6OBsa3.js +568 -0
  10. package/dist/incodeModule-BF5MX9GT.js +243 -0
  11. package/dist/incodeModule.css +119 -0
  12. package/dist/index.es.js +101 -0
  13. package/dist/otpInput-BUrV4IAF.js +151 -0
  14. package/dist/otpInput.css +167 -0
  15. package/dist/phone/phone.es.js +3442 -0
  16. package/dist/phone/styles.css +305 -0
  17. package/dist/selfie/selfie.es.js +893 -0
  18. package/dist/selfie/styles.css +1163 -0
  19. package/dist/selfieTutorial-C-u5GufD.js +29 -0
  20. package/dist/styles/core.css +1013 -0
  21. package/dist/styles/tokens.css +543 -0
  22. package/dist/successIcon.css +4 -0
  23. package/dist/title-ng7q7YDh.js +2161 -0
  24. package/dist/title.css +38 -0
  25. package/dist/types/core.d.ts +1 -0
  26. package/dist/types/email/email.d.ts +2 -0
  27. package/dist/types/email.d.ts +50 -0
  28. package/dist/types/flow/flow.d.ts +2 -0
  29. package/dist/types/flow.d.ts +46 -0
  30. package/dist/types/index.d.ts +223 -0
  31. package/dist/types/phone/phone.d.ts +2 -0
  32. package/dist/types/phone.d.ts +51 -0
  33. package/dist/types/selfie/selfie.d.ts +2 -0
  34. package/dist/types/selfie.d.ts +24 -0
  35. package/dist/types/styles/core.d.ts +1 -0
  36. package/dist/vendor-preact-CK0WeTOR.js +584 -0
  37. package/package.json +20 -17
  38. package/dev/README.md +0 -163
  39. package/dev/getToken.ts +0 -36
  40. package/dev/headless.html +0 -875
  41. package/dev/index.html +0 -366
  42. package/dev/main-headless.tsx +0 -1332
  43. package/dev/main-orchestrated-flow.tsx +0 -1158
  44. package/dev/main-preact.tsx +0 -323
  45. package/dev/main-simplified.tsx +0 -123
  46. package/dev/main-web-component.tsx +0 -256
  47. package/dev/main.tsx +0 -332
  48. package/dev/manual.html +0 -27
  49. package/dev/orchestrated-flow.html +0 -64
  50. package/dev/simplified.html +0 -64
  51. package/dev/tiktok-logo.svg +0 -7
  52. package/src/defineCustomElement.tsx +0 -30
  53. package/src/email/email.test.tsx +0 -368
  54. package/src/email/email.tsx +0 -255
  55. package/src/email/emailInput.test.tsx +0 -264
  56. package/src/email/emailInput.tsx +0 -85
  57. package/src/email/styles.css +0 -59
  58. package/src/flow/flow.test.tsx +0 -796
  59. package/src/flow/flow.tsx +0 -292
  60. package/src/flow/flowCompleted.css +0 -30
  61. package/src/flow/flowCompleted.test.tsx +0 -331
  62. package/src/flow/flowCompleted.tsx +0 -121
  63. package/src/flow/flowInit.test.ts +0 -264
  64. package/src/flow/flowInit.ts +0 -94
  65. package/src/flow/flowStart.css +0 -58
  66. package/src/flow/flowStart.test.tsx +0 -49
  67. package/src/flow/flowStart.tsx +0 -41
  68. package/src/flow/incode-logo.svg +0 -8
  69. package/src/flow/index.ts +0 -7
  70. package/src/flow/preloadFlow.test.ts +0 -421
  71. package/src/flow/preloadFlow.ts +0 -171
  72. package/src/flow/styles.css +0 -9
  73. package/src/flow/unsupportedModule.css +0 -21
  74. package/src/flow/unsupportedModule.tsx +0 -39
  75. package/src/flow/useFlowInitialization.test.tsx +0 -292
  76. package/src/flow/useFlowInitialization.ts +0 -128
  77. package/src/flow/useModuleLoader.test.tsx +0 -212
  78. package/src/flow/useModuleLoader.ts +0 -92
  79. package/src/hooks/index.ts +0 -1
  80. package/src/hooks/useManager.test.ts +0 -91
  81. package/src/hooks/useManager.ts +0 -40
  82. package/src/i18n/index.ts +0 -3
  83. package/src/i18n/instance.ts +0 -16
  84. package/src/i18n/setup.ts +0 -184
  85. package/src/i18n/useTranslation.ts +0 -42
  86. package/src/index.ts +0 -27
  87. package/src/permissions/assets/android-dots-icon.svg +0 -7
  88. package/src/permissions/assets/android-settings-icon.svg +0 -16
  89. package/src/permissions/assets/android-toggle-icon.svg +0 -20
  90. package/src/permissions/assets/bank-card-icon.svg +0 -14
  91. package/src/permissions/assets/camera-icon.svg +0 -12
  92. package/src/permissions/assets/camera-ios.svg +0 -53
  93. package/src/permissions/assets/check-icon.svg +0 -8
  94. package/src/permissions/assets/chrome-icon.svg +0 -43
  95. package/src/permissions/assets/password-icon.svg +0 -11
  96. package/src/permissions/assets/permissions-img.svg +0 -51
  97. package/src/permissions/assets/safari-icon.svg +0 -37
  98. package/src/permissions/assets/settings-icon.svg +0 -33
  99. package/src/permissions/assets/toggle-icon.svg +0 -19
  100. package/src/permissions/assets/warning-icon.svg +0 -6
  101. package/src/permissions/boldWithArrow.css +0 -9
  102. package/src/permissions/boldWithArrow.tsx +0 -41
  103. package/src/permissions/denied.css +0 -37
  104. package/src/permissions/denied.tsx +0 -29
  105. package/src/permissions/deniedAndroid.tsx +0 -56
  106. package/src/permissions/deniedDesktop.css +0 -9
  107. package/src/permissions/deniedDesktop.tsx +0 -64
  108. package/src/permissions/deniedIOS.tsx +0 -73
  109. package/src/permissions/deniedInstructions.tsx +0 -19
  110. package/src/permissions/iconWrapper.css +0 -9
  111. package/src/permissions/iconWrapper.tsx +0 -15
  112. package/src/permissions/learnMore.css +0 -37
  113. package/src/permissions/learnMore.tsx +0 -85
  114. package/src/permissions/numberedStep.css +0 -13
  115. package/src/permissions/numberedStep.tsx +0 -14
  116. package/src/permissions/permissions.css +0 -13
  117. package/src/permissions/permissions.tsx +0 -68
  118. package/src/phone/phone.tsx +0 -246
  119. package/src/phone/phoneInput.test.tsx +0 -275
  120. package/src/phone/phoneInput.tsx +0 -249
  121. package/src/phone/styles.css +0 -158
  122. package/src/selfie/cameraButton.css +0 -13
  123. package/src/selfie/cameraButton.tsx +0 -35
  124. package/src/selfie/capture.css +0 -57
  125. package/src/selfie/capture.tsx +0 -232
  126. package/src/selfie/errorModal.tsx +0 -218
  127. package/src/selfie/errorModalContent.css +0 -33
  128. package/src/selfie/errorModalContent.tsx +0 -44
  129. package/src/selfie/faceOutline.css +0 -5
  130. package/src/selfie/faceOutline.tsx +0 -22
  131. package/src/selfie/loadingBorder.css +0 -12
  132. package/src/selfie/loadingBorder.tsx +0 -77
  133. package/src/selfie/manualCaptureButton.css +0 -13
  134. package/src/selfie/manualCaptureButton.tsx +0 -35
  135. package/src/selfie/noMoreAttemptsModal.tsx +0 -44
  136. package/src/selfie/notification.css +0 -9
  137. package/src/selfie/notification.tsx +0 -36
  138. package/src/selfie/retryErrorModal.tsx +0 -56
  139. package/src/selfie/selfie.test.tsx +0 -458
  140. package/src/selfie/selfie.tsx +0 -83
  141. package/src/selfie/selfieTutorial.json +0 -2626
  142. package/src/selfie/styles.css +0 -1
  143. package/src/selfie/tutorial.test.tsx +0 -200
  144. package/src/selfie/tutorial.tsx +0 -43
  145. package/src/setup.ts +0 -33
  146. package/src/shared/baseTutorial/baseTutorial.css +0 -21
  147. package/src/shared/baseTutorial/baseTutorial.test.tsx +0 -184
  148. package/src/shared/baseTutorial/baseTutorial.tsx +0 -55
  149. package/src/shared/baseTutorial/replaceBaseTutorial.test.ts +0 -267
  150. package/src/shared/baseTutorial/replaceBaseTutorial.ts +0 -68
  151. package/src/shared/button/button.css +0 -55
  152. package/src/shared/button/button.test.tsx +0 -101
  153. package/src/shared/button/button.tsx +0 -47
  154. package/src/shared/componentRoot/incodeComponent.tsx +0 -12
  155. package/src/shared/countries/countries.test.ts +0 -75
  156. package/src/shared/countries/countries.ts +0 -139
  157. package/src/shared/countries/index.ts +0 -6
  158. package/src/shared/icons/chevronDown.tsx +0 -22
  159. package/src/shared/icons/index.ts +0 -2
  160. package/src/shared/icons/successIcon.css +0 -5
  161. package/src/shared/icons/successIcon.test.tsx +0 -40
  162. package/src/shared/icons/successIcon.tsx +0 -26
  163. package/src/shared/loader/loadingIcon.css +0 -28
  164. package/src/shared/loader/loadingIcon.tsx +0 -67
  165. package/src/shared/lottie/lottie.tsx +0 -108
  166. package/src/shared/otpInput/otpInput.css +0 -85
  167. package/src/shared/otpInput/otpInput.test.tsx +0 -356
  168. package/src/shared/otpInput/otpInput.tsx +0 -241
  169. package/src/shared/page/incode-logo.svg +0 -3
  170. package/src/shared/page/page.css +0 -47
  171. package/src/shared/page/page.test.tsx +0 -97
  172. package/src/shared/page/page.tsx +0 -91
  173. package/src/shared/page/pageUiConfig.test.ts +0 -112
  174. package/src/shared/page/pageUiConfig.ts +0 -64
  175. package/src/shared/page/verifiedByIncode.css +0 -5
  176. package/src/shared/page/verifiedByIncode.tsx +0 -75
  177. package/src/shared/spacer/spacer.css +0 -149
  178. package/src/shared/spacer/spacer.test.tsx +0 -143
  179. package/src/shared/spacer/spacer.tsx +0 -88
  180. package/src/shared/spinner/index.ts +0 -2
  181. package/src/shared/spinner/spinner.css +0 -28
  182. package/src/shared/spinner/spinner.test.tsx +0 -82
  183. package/src/shared/spinner/spinner.tsx +0 -65
  184. package/src/shared/title/title.css +0 -7
  185. package/src/shared/title/title.tsx +0 -12
  186. package/src/shared/uiConfig/uiConfig.ts +0 -36
  187. package/src/shared/webComponent/incodeModule.ts +0 -29
  188. package/src/shared/webComponent/registerIncodeElement.ts +0 -15
  189. package/src/styles/__mocks__/fetchTheme.ts +0 -19
  190. package/src/styles/applyTheme.ts +0 -37
  191. package/src/styles/cn.test.tsx +0 -57
  192. package/src/styles/cn.tsx +0 -21
  193. package/src/styles/core.css +0 -12
  194. package/src/styles/fetchTheme.test.ts +0 -390
  195. package/src/styles/fetchTheme.ts +0 -88
  196. package/src/styles/generatePalette.ts +0 -111
  197. package/src/styles/reset.css +0 -65
  198. package/src/styles/resolveCssVariableToHex.ts +0 -28
  199. package/src/styles/tailwind.css +0 -291
  200. package/src/styles/themeTypes.ts +0 -18
  201. package/src/styles/tokens/colors.css +0 -190
  202. package/src/styles/tokens/components.css +0 -174
  203. package/src/styles/tokens/index.css +0 -4
  204. package/src/styles/tokens/primitives.css +0 -129
  205. package/src/styles/tokens/semantic.css +0 -51
  206. package/src/svg.d.ts +0 -4
  207. package/src/types/assets.d.ts +0 -1
  208. package/src/types/custom-elements.d.ts +0 -104
  209. package/tsconfig.json +0 -22
  210. package/vite.config.ts +0 -260
  211. package/vitest.config.ts +0 -40
  212. package/vitest.setup.ts +0 -16
@@ -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
+ }
@@ -0,0 +1,9 @@
1
+ import "../button-DeMZ_34N.js";
2
+ import "@incodetech/core/flow";
3
+ import "../vendor-preact-CK0WeTOR.js";
4
+ import "../title-ng7q7YDh.js";
5
+ import { I as i, p as a } from "../flow-ZK6OBsa3.js";
6
+ export {
7
+ i as IncodeFlow,
8
+ a as preloadIncodeFlow
9
+ };