@smileid/web-components 2.0.1 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DocumentCaptureScreens-Dwl7UqVH.js +1534 -0
- package/dist/DocumentCaptureScreens-Dwl7UqVH.js.map +1 -0
- package/dist/EndUserConsent-C5hZdJzH.js +715 -0
- package/dist/EndUserConsent-C5hZdJzH.js.map +1 -0
- package/dist/Navigation-juBE4qOw.js +136 -0
- package/dist/Navigation-juBE4qOw.js.map +1 -0
- package/dist/PoweredBySmileId-CxbaihMu.js +33 -0
- package/dist/PoweredBySmileId-CxbaihMu.js.map +1 -0
- package/dist/SelfieCaptureScreens-CQc251hz.js +7618 -0
- package/dist/SelfieCaptureScreens-CQc251hz.js.map +1 -0
- package/dist/SignaturePad-C7MtmT8m.js +324 -0
- package/dist/SignaturePad-C7MtmT8m.js.map +1 -0
- package/dist/TotpConsent-CQU5jQi4.js +730 -0
- package/dist/TotpConsent-CQU5jQi4.js.map +1 -0
- package/dist/combobox.js +300 -0
- package/dist/combobox.js.map +1 -0
- package/dist/document.js +5 -0
- package/dist/document.js.map +1 -0
- package/dist/end-user-consent.js +5 -0
- package/dist/end-user-consent.js.map +1 -0
- package/dist/main.js +22 -0
- package/dist/main.js.map +1 -0
- package/dist/navigation.js +5 -0
- package/dist/navigation.js.map +1 -0
- package/dist/package-Oi2Yil3b.js +105 -0
- package/dist/package-Oi2Yil3b.js.map +1 -0
- package/dist/selfie.js +5 -0
- package/dist/selfie.js.map +1 -0
- package/dist/signature-pad.js +5 -0
- package/dist/signature-pad.js.map +1 -0
- package/dist/smart-camera-web.js +303 -0
- package/dist/smart-camera-web.js.map +1 -0
- package/dist/styles-BUWNxWeQ.js +406 -0
- package/dist/styles-BUWNxWeQ.js.map +1 -0
- package/dist/totp-consent.js +5 -0
- package/dist/totp-consent.js.map +1 -0
- package/dist/types/combobox.d.ts +21 -0
- package/dist/types/document.d.ts +21 -0
- package/dist/types/end-user-consent.d.ts +21 -0
- package/dist/types/main.d.ts +331 -0
- package/dist/types/navigation.d.ts +21 -0
- package/dist/types/selfie.d.ts +21 -0
- package/dist/types/signature-pad.d.ts +21 -0
- package/dist/types/smart-camera-web.d.ts +21 -0
- package/dist/types/totp-consent.d.ts +21 -0
- package/{src → lib}/components/README.md +14 -14
- package/{src → lib}/components/attribution/PoweredBySmileId.js +42 -42
- package/{src → lib}/components/camera-permission/CameraPermission.js +140 -140
- package/{src → lib}/components/camera-permission/CameraPermission.stories.js +27 -27
- package/{src → lib}/components/combobox/src/Combobox.js +589 -589
- package/{src → lib}/components/combobox/src/index.js +1 -1
- package/{src → lib}/components/document/src/DocumentCaptureScreens.js +409 -409
- package/{src → lib}/components/document/src/DocumentCaptureScreens.stories.js +57 -57
- package/{src → lib}/components/document/src/README.md +111 -111
- package/{src → lib}/components/document/src/document-capture/DocumentCapture.js +760 -760
- package/{src → lib}/components/document/src/document-capture/DocumentCapture.stories.js +78 -78
- package/{src → lib}/components/document/src/document-capture/README.md +90 -90
- package/{src → lib}/components/document/src/document-capture/index.js +3 -3
- package/{src → lib}/components/document/src/document-capture-instructions/DocumentCaptureInstructions.js +499 -499
- package/{src → lib}/components/document/src/document-capture-instructions/DocumentCaptureInstructions.stories.js +24 -24
- package/{src → lib}/components/document/src/document-capture-instructions/README.md +56 -56
- package/{src → lib}/components/document/src/document-capture-instructions/index.js +3 -3
- package/{src → lib}/components/document/src/document-capture-review/DocumentCaptureReview.js +362 -362
- package/{src → lib}/components/document/src/document-capture-review/DocumentCaptureReview.stories.js +24 -24
- package/{src → lib}/components/document/src/document-capture-review/README.md +79 -79
- package/{src → lib}/components/document/src/document-capture-review/index.js +3 -3
- package/{src → lib}/components/document/src/index.js +3 -3
- package/{src → lib}/components/end-user-consent/src/EndUserConsent.js +795 -795
- package/{src → lib}/components/end-user-consent/src/EndUserConsent.stories.js +29 -29
- package/{src → lib}/components/end-user-consent/src/index.js +4 -4
- package/{src → lib}/components/navigation/src/Navigation.js +171 -171
- package/{src → lib}/components/navigation/src/Navigation.stories.js +24 -24
- package/{src → lib}/components/navigation/src/index.js +3 -3
- package/{src → lib}/components/selfie/README.md +225 -225
- package/{src → lib}/components/selfie/src/SelfieCaptureScreens.js +433 -282
- package/{src → lib}/components/selfie/src/SelfieCaptureScreens.stories.js +29 -29
- package/{src → lib}/components/selfie/src/index.js +3 -5
- package/{src → lib}/components/selfie/src/selfie-capture/SelfieCapture.js +1041 -1010
- package/{src → lib}/components/selfie/src/selfie-capture/SelfieCapture.stories.js +36 -36
- package/{src → lib}/components/selfie/src/selfie-capture/index.js +3 -3
- package/{src → lib}/components/selfie/src/selfie-capture-instructions/SelfieCaptureInstructions.js +657 -648
- package/{src → lib}/components/selfie/src/selfie-capture-instructions/SelfieCaptureInstructions.stories.js +23 -23
- package/{src → lib}/components/selfie/src/selfie-capture-instructions/index.js +3 -3
- package/{src → lib}/components/selfie/src/selfie-capture-review/SelfieCaptureReview.js +340 -347
- package/{src → lib}/components/selfie/src/selfie-capture-review/SelfieCaptureReview.stories.js +24 -24
- package/{src → lib}/components/selfie/src/selfie-capture-review/index.js +3 -3
- package/lib/components/selfie/src/selfie-capture-wrapper/SelfieCaptureWrapper.tsx +227 -0
- package/lib/components/selfie/src/selfie-capture-wrapper/index.ts +1 -0
- package/lib/components/selfie/src/smartselfie-capture/OvalProgress.tsx +81 -0
- package/lib/components/selfie/src/smartselfie-capture/SmartSelfieCapture.tsx +224 -0
- package/lib/components/selfie/src/smartselfie-capture/components/AlertDisplay.tsx +34 -0
- package/lib/components/selfie/src/smartselfie-capture/components/CameraPreview.tsx +97 -0
- package/lib/components/selfie/src/smartselfie-capture/components/CaptureControls.tsx +74 -0
- package/lib/components/selfie/src/smartselfie-capture/components/index.ts +3 -0
- package/lib/components/selfie/src/smartselfie-capture/constants.ts +23 -0
- package/lib/components/selfie/src/smartselfie-capture/hooks/index.ts +2 -0
- package/lib/components/selfie/src/smartselfie-capture/hooks/useCamera.ts +94 -0
- package/lib/components/selfie/src/smartselfie-capture/hooks/useFaceCapture.ts +558 -0
- package/lib/components/selfie/src/smartselfie-capture/index.ts +1 -0
- package/lib/components/selfie/src/smartselfie-capture/utils/alertMessages.ts +12 -0
- package/lib/components/selfie/src/smartselfie-capture/utils/canvas.ts +105 -0
- package/lib/components/selfie/src/smartselfie-capture/utils/faceDetection.ts +129 -0
- package/lib/components/selfie/src/smartselfie-capture/utils/imageCapture.ts +64 -0
- package/lib/components/selfie/src/smartselfie-capture/utils/index.ts +4 -0
- package/lib/components/selfie/src/smartselfie-capture/utils/mediapipeManager.ts +60 -0
- package/{src → lib}/components/signature-pad/package-lock.json +3009 -3009
- package/{src → lib}/components/signature-pad/package.json +30 -30
- package/{src → lib}/components/signature-pad/src/SignaturePad.js +484 -484
- package/{src → lib}/components/signature-pad/src/SignaturePad.stories.js +32 -32
- package/{src → lib}/components/signature-pad/src/index.js +3 -3
- package/{src → lib}/components/smart-camera-web/src/README.md +206 -207
- package/{src → lib}/components/smart-camera-web/src/SmartCameraWeb.js +299 -299
- package/{src → lib}/components/smart-camera-web/src/SmartCameraWeb.stories.js +57 -57
- package/{src → lib}/components/totp-consent/src/TotpConsent.js +949 -949
- package/{src → lib}/components/totp-consent/src/index.js +4 -4
- package/{src → lib}/domain/camera/src/README.md +38 -38
- package/{src → lib}/domain/camera/src/SmartCamera.js +109 -109
- package/{src → lib}/domain/constants/src/Constants.js +27 -27
- package/{src → lib}/domain/file-upload/README.md +35 -35
- package/{src → lib}/domain/file-upload/src/SmartFileUpload.js +65 -65
- package/{src → lib}/styles/README.md +3 -3
- package/{src → lib}/styles/src/styles.js +359 -359
- package/{src → lib}/styles/src/typography.js +52 -52
- package/package.json +109 -58
- package/src/index.js +0 -5
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
const typography = `
|
|
2
|
-
.text-xs {
|
|
3
|
-
font-size: 0.75rem;
|
|
4
|
-
line-height: 1rem;
|
|
5
|
-
}
|
|
6
|
-
.text-sm {
|
|
7
|
-
font-size: 0.875rem;
|
|
8
|
-
line-height: 1.125rem;
|
|
9
|
-
}
|
|
10
|
-
.text-base {
|
|
11
|
-
font-size: 1rem;
|
|
12
|
-
line-height: 1rem;
|
|
13
|
-
}
|
|
14
|
-
.text-lg {
|
|
15
|
-
font-size: 1.125rem;
|
|
16
|
-
line-height: 1.75rem;
|
|
17
|
-
}
|
|
18
|
-
.text-xl {
|
|
19
|
-
font-size: 1.25rem;
|
|
20
|
-
line-height: 1.75rem;
|
|
21
|
-
}
|
|
22
|
-
.text-2xl {
|
|
23
|
-
font-size: 1.5rem;
|
|
24
|
-
line-height: 2rem;
|
|
25
|
-
}
|
|
26
|
-
.text-3xl {
|
|
27
|
-
font-size: 1.875rem;
|
|
28
|
-
line-height: 2.25rem;
|
|
29
|
-
}
|
|
30
|
-
.text-4xl {
|
|
31
|
-
font-size: 2rem;
|
|
32
|
-
line-height: 2.5rem;
|
|
33
|
-
}
|
|
34
|
-
.text-5xl {
|
|
35
|
-
font-size: 2.25rem;
|
|
36
|
-
line-height: 2.5rem;
|
|
37
|
-
}
|
|
38
|
-
.font-bold {
|
|
39
|
-
font-weight: 700;
|
|
40
|
-
}
|
|
41
|
-
.font-semibold {
|
|
42
|
-
font-weight: 600;
|
|
43
|
-
}
|
|
44
|
-
.font-medium {
|
|
45
|
-
font-weight: 500;
|
|
46
|
-
}
|
|
47
|
-
.font-normal {
|
|
48
|
-
font-weight: 400;
|
|
49
|
-
}
|
|
50
|
-
`;
|
|
51
|
-
|
|
52
|
-
export default typography;
|
|
1
|
+
const typography = `
|
|
2
|
+
.text-xs {
|
|
3
|
+
font-size: 0.75rem;
|
|
4
|
+
line-height: 1rem;
|
|
5
|
+
}
|
|
6
|
+
.text-sm {
|
|
7
|
+
font-size: 0.875rem;
|
|
8
|
+
line-height: 1.125rem;
|
|
9
|
+
}
|
|
10
|
+
.text-base {
|
|
11
|
+
font-size: 1rem;
|
|
12
|
+
line-height: 1rem;
|
|
13
|
+
}
|
|
14
|
+
.text-lg {
|
|
15
|
+
font-size: 1.125rem;
|
|
16
|
+
line-height: 1.75rem;
|
|
17
|
+
}
|
|
18
|
+
.text-xl {
|
|
19
|
+
font-size: 1.25rem;
|
|
20
|
+
line-height: 1.75rem;
|
|
21
|
+
}
|
|
22
|
+
.text-2xl {
|
|
23
|
+
font-size: 1.5rem;
|
|
24
|
+
line-height: 2rem;
|
|
25
|
+
}
|
|
26
|
+
.text-3xl {
|
|
27
|
+
font-size: 1.875rem;
|
|
28
|
+
line-height: 2.25rem;
|
|
29
|
+
}
|
|
30
|
+
.text-4xl {
|
|
31
|
+
font-size: 2rem;
|
|
32
|
+
line-height: 2.5rem;
|
|
33
|
+
}
|
|
34
|
+
.text-5xl {
|
|
35
|
+
font-size: 2.25rem;
|
|
36
|
+
line-height: 2.5rem;
|
|
37
|
+
}
|
|
38
|
+
.font-bold {
|
|
39
|
+
font-weight: 700;
|
|
40
|
+
}
|
|
41
|
+
.font-semibold {
|
|
42
|
+
font-weight: 600;
|
|
43
|
+
}
|
|
44
|
+
.font-medium {
|
|
45
|
+
font-weight: 500;
|
|
46
|
+
}
|
|
47
|
+
.font-normal {
|
|
48
|
+
font-weight: 400;
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
|
|
52
|
+
export default typography;
|
package/package.json
CHANGED
|
@@ -1,58 +1,109 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@smileid/web-components",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"./
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"./
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@smileid/web-components",
|
|
3
|
+
"version": "10.0.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"main": "dist/main.js",
|
|
6
|
+
"module": "dist/main.js",
|
|
7
|
+
"types": "dist/types/main.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/types/main.d.ts",
|
|
11
|
+
"import": "./dist/main.js",
|
|
12
|
+
"require": "./dist/main.js"
|
|
13
|
+
},
|
|
14
|
+
"./combobox": {
|
|
15
|
+
"types": "./dist/types/combobox.d.ts",
|
|
16
|
+
"import": "./dist/combobox.js"
|
|
17
|
+
},
|
|
18
|
+
"./document-capture": {
|
|
19
|
+
"types": "./dist/types/document.d.ts",
|
|
20
|
+
"import": "./dist/document.js"
|
|
21
|
+
},
|
|
22
|
+
"./end-user-consent": {
|
|
23
|
+
"types": "./dist/types/end-user-consent.d.ts",
|
|
24
|
+
"import": "./dist/end-user-consent.js"
|
|
25
|
+
},
|
|
26
|
+
"./navigation": {
|
|
27
|
+
"types": "./dist/types/navigation.d.ts",
|
|
28
|
+
"import": "./dist/navigation.js"
|
|
29
|
+
},
|
|
30
|
+
"./selfie-capture": {
|
|
31
|
+
"types": "./dist/types/selfie.d.ts",
|
|
32
|
+
"import": "./dist/selfie.js"
|
|
33
|
+
},
|
|
34
|
+
"./signature-pad": {
|
|
35
|
+
"types": "./dist/types/signature-pad.d.ts",
|
|
36
|
+
"import": "./dist/signature-pad.js"
|
|
37
|
+
},
|
|
38
|
+
"./totp-consent": {
|
|
39
|
+
"types": "./dist/types/totp-consent.d.ts",
|
|
40
|
+
"import": "./dist/totp-consent.js"
|
|
41
|
+
},
|
|
42
|
+
"./smart-camera-web": {
|
|
43
|
+
"types": "./dist/types/smart-camera-web.d.ts",
|
|
44
|
+
"import": "./dist/smart-camera-web.js"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"files": [
|
|
48
|
+
"./lib/components/",
|
|
49
|
+
"./lib/domain/",
|
|
50
|
+
"./lib/styles/",
|
|
51
|
+
"./dist/",
|
|
52
|
+
"./README.md",
|
|
53
|
+
"package.json"
|
|
54
|
+
],
|
|
55
|
+
"scripts": {
|
|
56
|
+
"build": "vite build",
|
|
57
|
+
"build:stats": "cross-env GENERATE_STATS=true vite build --mode=production && echo Bundle analysis generated at dist/bundle-analysis.html",
|
|
58
|
+
"dev": "vite",
|
|
59
|
+
"preview": "vite preview",
|
|
60
|
+
"prepublishOnly": "npm run build",
|
|
61
|
+
"lint:fix": "eslint . --ext .js,.ts,.tsx --fix",
|
|
62
|
+
"lint:html": "npx prettier --write $(git ls-files '*.html')",
|
|
63
|
+
"lint": "eslint . --ext .js,.ts,.tsx",
|
|
64
|
+
"start": "vite build --watch",
|
|
65
|
+
"test": "npx cypress run",
|
|
66
|
+
"type-check": "tsc --noEmit"
|
|
67
|
+
},
|
|
68
|
+
"description": "A collection of Web Components used by SmileID",
|
|
69
|
+
"keywords": [
|
|
70
|
+
"Web Components"
|
|
71
|
+
],
|
|
72
|
+
"type": "module",
|
|
73
|
+
"author": "SmileID <support@usesmileid.com> (https://usesmileid.com)",
|
|
74
|
+
"dependencies": {
|
|
75
|
+
"@mediapipe/tasks-vision": "^0.10.22-rc.20250304",
|
|
76
|
+
"@preact/signals": "^2.1.1",
|
|
77
|
+
"@tabler/icons-preact": "^3.34.0",
|
|
78
|
+
"preact": "^10.26.9",
|
|
79
|
+
"preact-custom-element": "^4.3.0",
|
|
80
|
+
"preact-router": "^4.1.2",
|
|
81
|
+
"signature_pad": "^5.0.2",
|
|
82
|
+
"validate.js": "^0.13.1"
|
|
83
|
+
},
|
|
84
|
+
"devDependencies": {
|
|
85
|
+
"@preact/preset-vite": "^2.10.2",
|
|
86
|
+
"@types/node": "^20.11.24",
|
|
87
|
+
"@types/preact-custom-element": "^4.0.4",
|
|
88
|
+
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
89
|
+
"@typescript-eslint/parser": "^7.18.0",
|
|
90
|
+
"cross-env": "^7.0.3",
|
|
91
|
+
"cypress": "^13.15.0",
|
|
92
|
+
"eslint": "^8.57.0",
|
|
93
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
94
|
+
"eslint-config-airbnb-typescript": "^18.0.0",
|
|
95
|
+
"eslint-config-prettier": "^9.1.0",
|
|
96
|
+
"eslint-import-resolver-typescript": "^3.6.1",
|
|
97
|
+
"eslint-plugin-cypress": "^3.3.0",
|
|
98
|
+
"eslint-plugin-import": "^2.29.1",
|
|
99
|
+
"eslint-plugin-jest": "^28.8.3",
|
|
100
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
101
|
+
"glob": "^10.3.10",
|
|
102
|
+
"prettier": "^3.6.2",
|
|
103
|
+
"rollup-plugin-visualizer": "^6.0.3",
|
|
104
|
+
"typescript": "^5.8.3",
|
|
105
|
+
"vite": "^7.0.1",
|
|
106
|
+
"vite-plugin-dts": "^4.5.4",
|
|
107
|
+
"vite-plugin-tsconfig-paths": "^1.4.1"
|
|
108
|
+
}
|
|
109
|
+
}
|
package/src/index.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import DocumentCaptureScreens from './components/document/src';
|
|
2
|
-
import SelfieCaptureScreens from './components/selfie/src';
|
|
3
|
-
import SmartCameraWeb from './components/smart-camera-web/src/SmartCameraWeb';
|
|
4
|
-
|
|
5
|
-
export { DocumentCaptureScreens, SelfieCaptureScreens, SmartCameraWeb };
|