@jaak.ai/stamps 1.0.0-beta.1

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 (122) hide show
  1. package/README.md +385 -0
  2. package/dist/cjs/document-detector_19.cjs.entry.js +8540 -0
  3. package/dist/cjs/index-5e4e5e7d.js +1685 -0
  4. package/dist/cjs/index.cjs.js +2 -0
  5. package/dist/cjs/loader.cjs.js +22 -0
  6. package/dist/cjs/mb-tooltip.cjs.entry.js +26 -0
  7. package/dist/cjs/stamps.cjs.js +23 -0
  8. package/dist/collection/collection-manifest.json +31 -0
  9. package/dist/collection/components/document-detector/document-detector.css +154 -0
  10. package/dist/collection/components/document-detector/document-detector.js +416 -0
  11. package/dist/collection/components/shared/mb-api-process-status/mb-api-process-status.css +360 -0
  12. package/dist/collection/components/shared/mb-api-process-status/mb-api-process-status.js +124 -0
  13. package/dist/collection/components/shared/mb-button/mb-button.css +95 -0
  14. package/dist/collection/components/shared/mb-button/mb-button.js +201 -0
  15. package/dist/collection/components/shared/mb-button-classic/mb-button-classic.css +100 -0
  16. package/dist/collection/components/shared/mb-button-classic/mb-button-classic.js +130 -0
  17. package/dist/collection/components/shared/mb-camera-experience/mb-camera-experience.css +740 -0
  18. package/dist/collection/components/shared/mb-camera-experience/mb-camera-experience.js +827 -0
  19. package/dist/collection/components/shared/mb-camera-experience/mb-camera-experience.utils.js +55 -0
  20. package/dist/collection/components/shared/mb-camera-selection/mb-camera-selection.css +124 -0
  21. package/dist/collection/components/shared/mb-camera-selection/mb-camera-selection.js +194 -0
  22. package/dist/collection/components/shared/mb-camera-toolbar/mb-camera-toolbar.css +80 -0
  23. package/dist/collection/components/shared/mb-camera-toolbar/mb-camera-toolbar.js +275 -0
  24. package/dist/collection/components/shared/mb-completed/mb-completed.css +17 -0
  25. package/dist/collection/components/shared/mb-completed/mb-completed.js +48 -0
  26. package/dist/collection/components/shared/mb-component/mb-component.css +321 -0
  27. package/dist/collection/components/shared/mb-component/mb-component.js +2269 -0
  28. package/dist/collection/components/shared/mb-component/mb-component.utils.js +14 -0
  29. package/dist/collection/components/shared/mb-container/mb-container.css +7 -0
  30. package/dist/collection/components/shared/mb-container/mb-container.js +23 -0
  31. package/dist/collection/components/shared/mb-feedback/mb-feedback.css +36 -0
  32. package/dist/collection/components/shared/mb-feedback/mb-feedback.js +91 -0
  33. package/dist/collection/components/shared/mb-feedback/mb-feedback.utils.js +11 -0
  34. package/dist/collection/components/shared/mb-help/mb-help.css +191 -0
  35. package/dist/collection/components/shared/mb-help/mb-help.js +409 -0
  36. package/dist/collection/components/shared/mb-help/mb-help.model.js +5 -0
  37. package/dist/collection/components/shared/mb-image-box/mb-image-box.css +78 -0
  38. package/dist/collection/components/shared/mb-image-box/mb-image-box.js +150 -0
  39. package/dist/collection/components/shared/mb-modal/mb-modal.css +106 -0
  40. package/dist/collection/components/shared/mb-modal/mb-modal.js +239 -0
  41. package/dist/collection/components/shared/mb-overlay/mb-overlay.css +46 -0
  42. package/dist/collection/components/shared/mb-overlay/mb-overlay.js +76 -0
  43. package/dist/collection/components/shared/mb-progress-tracker/mb-progress-tracker.css +24 -0
  44. package/dist/collection/components/shared/mb-progress-tracker/mb-progress-tracker.js +80 -0
  45. package/dist/collection/components/shared/mb-screen/mb-screen.css +19 -0
  46. package/dist/collection/components/shared/mb-screen/mb-screen.js +48 -0
  47. package/dist/collection/components/shared/mb-spinner/mb-spinner.css +30 -0
  48. package/dist/collection/components/shared/mb-spinner/mb-spinner.js +67 -0
  49. package/dist/collection/components/shared/mb-tooltip/mb-tooltip.css +62 -0
  50. package/dist/collection/components/shared/mb-tooltip/mb-tooltip.js +150 -0
  51. package/dist/collection/components/shared/mb-tooltip-advanced/mb-tooltip-advanced.css +91 -0
  52. package/dist/collection/components/shared/mb-tooltip-advanced/mb-tooltip-advanced.js +96 -0
  53. package/dist/collection/index.js +1 -0
  54. package/dist/collection/utils/data-structures.js +189 -0
  55. package/dist/collection/utils/device.helpers.js +37 -0
  56. package/dist/collection/utils/error-structures.js +47 -0
  57. package/dist/collection/utils/generic.helpers.js +82 -0
  58. package/dist/collection/utils/sdk.service.js +943 -0
  59. package/dist/collection/utils/state-lifter.js +3 -0
  60. package/dist/collection/utils/status.document-detector.js +15 -0
  61. package/dist/collection/utils/translation.service.js +97 -0
  62. package/dist/esm/document-detector_19.entry.js +8518 -0
  63. package/dist/esm/index-dc740acb.js +1656 -0
  64. package/dist/esm/index.js +1 -0
  65. package/dist/esm/loader.js +18 -0
  66. package/dist/esm/mb-tooltip.entry.js +22 -0
  67. package/dist/esm/polyfills/core-js.js +11 -0
  68. package/dist/esm/polyfills/css-shim.js +1 -0
  69. package/dist/esm/polyfills/dom.js +79 -0
  70. package/dist/esm/polyfills/es5-html-element.js +1 -0
  71. package/dist/esm/polyfills/index.js +34 -0
  72. package/dist/esm/polyfills/system.js +6 -0
  73. package/dist/esm/stamps.js +18 -0
  74. package/dist/index.cjs.js +1 -0
  75. package/dist/index.js +1 -0
  76. package/dist/stamps/index.esm.js +0 -0
  77. package/dist/stamps/p-66d9fb33.entry.js +9 -0
  78. package/dist/stamps/p-7f07a434.js +2 -0
  79. package/dist/stamps/p-ec3f5972.entry.js +1 -0
  80. package/dist/stamps/stamps.esm.js +1 -0
  81. package/dist/types/components/document-detector/document-detector.d.ts +86 -0
  82. package/dist/types/components/shared/mb-api-process-status/mb-api-process-status.d.ts +30 -0
  83. package/dist/types/components/shared/mb-button/mb-button.d.ts +41 -0
  84. package/dist/types/components/shared/mb-button-classic/mb-button-classic.d.ts +27 -0
  85. package/dist/types/components/shared/mb-camera-experience/mb-camera-experience.d.ts +141 -0
  86. package/dist/types/components/shared/mb-camera-experience/mb-camera-experience.utils.d.ts +3 -0
  87. package/dist/types/components/shared/mb-camera-selection/mb-camera-selection.d.ts +33 -0
  88. package/dist/types/components/shared/mb-camera-toolbar/mb-camera-toolbar.d.ts +54 -0
  89. package/dist/types/components/shared/mb-completed/mb-completed.d.ts +12 -0
  90. package/dist/types/components/shared/mb-component/mb-component.d.ts +308 -0
  91. package/dist/types/components/shared/mb-component/mb-component.utils.d.ts +3 -0
  92. package/dist/types/components/shared/mb-container/mb-container.d.ts +8 -0
  93. package/dist/types/components/shared/mb-feedback/mb-feedback.d.ts +19 -0
  94. package/dist/types/components/shared/mb-feedback/mb-feedback.utils.d.ts +2 -0
  95. package/dist/types/components/shared/mb-help/mb-help.d.ts +66 -0
  96. package/dist/types/components/shared/mb-help/mb-help.model.d.ts +9 -0
  97. package/dist/types/components/shared/mb-image-box/mb-image-box.d.ts +35 -0
  98. package/dist/types/components/shared/mb-modal/mb-modal.d.ts +53 -0
  99. package/dist/types/components/shared/mb-overlay/mb-overlay.d.ts +17 -0
  100. package/dist/types/components/shared/mb-progress-tracker/mb-progress-tracker.d.ts +19 -0
  101. package/dist/types/components/shared/mb-screen/mb-screen.d.ts +12 -0
  102. package/dist/types/components/shared/mb-spinner/mb-spinner.d.ts +16 -0
  103. package/dist/types/components/shared/mb-tooltip/mb-tooltip.d.ts +10 -0
  104. package/dist/types/components/shared/mb-tooltip-advanced/mb-tooltip-advanced.d.ts +7 -0
  105. package/dist/types/components.d.ts +1382 -0
  106. package/dist/types/index.d.ts +1 -0
  107. package/dist/types/stencil-public-runtime.d.ts +1637 -0
  108. package/dist/types/utils/data-structures.d.ts +264 -0
  109. package/dist/types/utils/device.helpers.d.ts +7 -0
  110. package/dist/types/utils/error-structures.d.ts +44 -0
  111. package/dist/types/utils/generic.helpers.d.ts +21 -0
  112. package/dist/types/utils/sdk.service.d.ts +52 -0
  113. package/dist/types/utils/state-lifter.d.ts +3 -0
  114. package/dist/types/utils/status.document-detector.d.ts +14 -0
  115. package/dist/types/utils/translation.service.d.ts +77 -0
  116. package/loader/cdn.js +3 -0
  117. package/loader/index.cjs.js +3 -0
  118. package/loader/index.d.ts +21 -0
  119. package/loader/index.es2017.js +3 -0
  120. package/loader/index.js +4 -0
  121. package/loader/package.json +11 -0
  122. package/package.json +63 -0
@@ -0,0 +1,275 @@
1
+ import { Host, h, } from "@stencil/core";
2
+ import * as DeviceHelpers from "../../../utils/device.helpers";
3
+ import { setWebComponentParts } from "../../../utils/generic.helpers";
4
+ export class MbCameraToolbar {
5
+ constructor() {
6
+ this.showCloseButton = false;
7
+ this.isDesktop = DeviceHelpers.isDesktop();
8
+ this.showClose = false;
9
+ this.clearIsCameraActive = false;
10
+ this.enableCameraFlip = true;
11
+ this.cameraFlipped = false;
12
+ }
13
+ componentDidLoad() {
14
+ setWebComponentParts(this.hostEl);
15
+ }
16
+ /**
17
+ * Change active camera.
18
+ */
19
+ async setActiveCamera(cameraId) {
20
+ this.cameraSelection.setActiveCamera(cameraId);
21
+ this.showCloseButton = this.showClose;
22
+ }
23
+ /**
24
+ * Populate list of camera devices.
25
+ */
26
+ async populateCameraDevices() {
27
+ await this.cameraSelection.populateCameraDevices();
28
+ }
29
+ handleClose(ev) {
30
+ ev.preventDefault();
31
+ ev.stopPropagation();
32
+ this.closeEvent.emit();
33
+ this.showCloseButton = false;
34
+ }
35
+ handleFlip(ev) {
36
+ ev.preventDefault();
37
+ ev.stopPropagation();
38
+ this.flipEvent.emit();
39
+ }
40
+ handleChangeCameraDevice(camera) {
41
+ this.changeCameraDevice.emit(camera);
42
+ }
43
+ handleSetIsCameraActive(ev) {
44
+ if (ev.detail) {
45
+ this.showCloseButton = this.showClose;
46
+ }
47
+ else {
48
+ this.showCloseButton = ev.detail;
49
+ }
50
+ }
51
+ render() {
52
+ let flipButton = "";
53
+ if (this.enableCameraFlip) {
54
+ flipButton = (h("button", { class: this.cameraFlipped
55
+ ? "toolbar-button flip-button flipped"
56
+ : "toolbar-button flip-button", onClick: (ev) => this.handleFlip(ev) }, h("svg", { width: "28", height: "28", viewBox: "0 0 28 28", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M16 5C16.5523 5 17 5.44772 17 6V24C17 24.5523 16.5523 25 16 25C15.4477 25 15 24.5523 15 24V6C15 5.44772 15.4477 5 16 5Z", fill: "white" }), h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M19.7702 9.02676C20.2216 8.9202 20.687 9.13798 20.8944 9.55279L25.8944 19.5528C26.0494 19.8628 26.0329 20.2309 25.8507 20.5257C25.6684 20.8206 25.3466 21 25 21H20C19.4477 21 19 20.5523 19 20V10C19 9.53623 19.3189 9.13331 19.7702 9.02676ZM21 14.2361V19H23.382L21 14.2361Z", fill: "white" }), h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M12.2298 9.02676C12.6811 9.13331 13 9.53623 13 10V20C13 20.5523 12.5523 21 12 21H7C6.65342 21 6.33156 20.8206 6.14935 20.5257C5.96714 20.2309 5.95058 19.8628 6.10557 19.5528L11.1056 9.55279C11.313 9.13798 11.7784 8.9202 12.2298 9.02676ZM8.61803 19H11V14.2361L8.61803 19Z", fill: "white" }), h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M19.7702 9.02676C20.2216 8.9202 20.687 9.13798 20.8944 9.55279L25.8944 19.5528C26.0494 19.8628 26.0329 20.2309 25.8507 20.5257C25.6684 20.8206 25.3466 21 25 21H20C19.4477 21 19 20.5523 19 20V10C19 9.53623 19.3189 9.13331 19.7702 9.02676Z", fill: "white" }))));
57
+ }
58
+ let closeButton = "";
59
+ if (this.showCloseButton) {
60
+ closeButton = (h("button", { class: "toolbar-button close-button", onClick: (ev) => this.handleClose(ev) }, h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M18.7071 5.29289C19.0976 5.68342 19.0976 6.31658 18.7071 6.70711L6.70711 18.7071C6.31658 19.0976 5.68342 19.0976 5.29289 18.7071C4.90237 18.3166 4.90237 17.6834 5.29289 17.2929L17.2929 5.29289C17.6834 4.90237 18.3166 4.90237 18.7071 5.29289Z", fill: "white" }), h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M5.29289 5.29289C5.68342 4.90237 6.31658 4.90237 6.70711 5.29289L18.7071 17.2929C19.0976 17.6834 19.0976 18.3166 18.7071 18.7071C18.3166 19.0976 17.6834 19.0976 17.2929 18.7071L5.29289 6.70711C4.90237 6.31658 4.90237 5.68342 5.29289 5.29289Z", fill: "white" }))));
61
+ }
62
+ return (h(Host, null, h("header", null, flipButton, h("div", { class: "camera-selection-wrapper" }, h("mb-camera-selection", { "clear-is-camera-active": !this.showCloseButton || this.clearIsCameraActive, onChangeCameraDevice: (ev) => this.handleChangeCameraDevice(ev.detail), ref: (el) => (this.cameraSelection = el) })), closeButton)));
63
+ }
64
+ static get is() { return "mb-camera-toolbar"; }
65
+ static get encapsulation() { return "shadow"; }
66
+ static get originalStyleUrls() {
67
+ return {
68
+ "$": ["mb-camera-toolbar.scss"]
69
+ };
70
+ }
71
+ static get styleUrls() {
72
+ return {
73
+ "$": ["mb-camera-toolbar.css"]
74
+ };
75
+ }
76
+ static get properties() {
77
+ return {
78
+ "showClose": {
79
+ "type": "boolean",
80
+ "mutable": false,
81
+ "complexType": {
82
+ "original": "boolean",
83
+ "resolved": "boolean",
84
+ "references": {}
85
+ },
86
+ "required": false,
87
+ "optional": false,
88
+ "docs": {
89
+ "tags": [],
90
+ "text": "Set to `true` if close button should be displayed."
91
+ },
92
+ "attribute": "show-close",
93
+ "reflect": false,
94
+ "defaultValue": "false"
95
+ },
96
+ "clearIsCameraActive": {
97
+ "type": "boolean",
98
+ "mutable": false,
99
+ "complexType": {
100
+ "original": "boolean",
101
+ "resolved": "boolean",
102
+ "references": {}
103
+ },
104
+ "required": false,
105
+ "optional": false,
106
+ "docs": {
107
+ "tags": [],
108
+ "text": ""
109
+ },
110
+ "attribute": "clear-is-camera-active",
111
+ "reflect": false,
112
+ "defaultValue": "false"
113
+ },
114
+ "enableCameraFlip": {
115
+ "type": "boolean",
116
+ "mutable": false,
117
+ "complexType": {
118
+ "original": "boolean",
119
+ "resolved": "boolean",
120
+ "references": {}
121
+ },
122
+ "required": false,
123
+ "optional": false,
124
+ "docs": {
125
+ "tags": [],
126
+ "text": "Whether to show 'Camera flip' button."
127
+ },
128
+ "attribute": "enable-camera-flip",
129
+ "reflect": false,
130
+ "defaultValue": "true"
131
+ },
132
+ "cameraFlipped": {
133
+ "type": "boolean",
134
+ "mutable": false,
135
+ "complexType": {
136
+ "original": "boolean",
137
+ "resolved": "boolean",
138
+ "references": {}
139
+ },
140
+ "required": false,
141
+ "optional": false,
142
+ "docs": {
143
+ "tags": [],
144
+ "text": "Whether the camera is flipped, this property will be flip the relevant icon."
145
+ },
146
+ "attribute": "camera-flipped",
147
+ "reflect": false,
148
+ "defaultValue": "false"
149
+ }
150
+ };
151
+ }
152
+ static get states() {
153
+ return {
154
+ "showCloseButton": {},
155
+ "isDesktop": {}
156
+ };
157
+ }
158
+ static get events() {
159
+ return [{
160
+ "method": "setIsCameraActive",
161
+ "name": "setIsCameraActive",
162
+ "bubbles": true,
163
+ "cancelable": true,
164
+ "composed": true,
165
+ "docs": {
166
+ "tags": [],
167
+ "text": "Emitted when camera stream becomes active."
168
+ },
169
+ "complexType": {
170
+ "original": "boolean",
171
+ "resolved": "boolean",
172
+ "references": {}
173
+ }
174
+ }, {
175
+ "method": "closeEvent",
176
+ "name": "closeEvent",
177
+ "bubbles": true,
178
+ "cancelable": true,
179
+ "composed": true,
180
+ "docs": {
181
+ "tags": [],
182
+ "text": "Event which is triggered when close button is clicked."
183
+ },
184
+ "complexType": {
185
+ "original": "void",
186
+ "resolved": "void",
187
+ "references": {}
188
+ }
189
+ }, {
190
+ "method": "flipEvent",
191
+ "name": "flipEvent",
192
+ "bubbles": true,
193
+ "cancelable": true,
194
+ "composed": true,
195
+ "docs": {
196
+ "tags": [],
197
+ "text": "Event which is triggered when flip camera button is clicked."
198
+ },
199
+ "complexType": {
200
+ "original": "void",
201
+ "resolved": "void",
202
+ "references": {}
203
+ }
204
+ }, {
205
+ "method": "changeCameraDevice",
206
+ "name": "changeCameraDevice",
207
+ "bubbles": true,
208
+ "cancelable": true,
209
+ "composed": true,
210
+ "docs": {
211
+ "tags": [],
212
+ "text": "Emitted when user selects a different camera device."
213
+ },
214
+ "complexType": {
215
+ "original": "CameraEntry",
216
+ "resolved": "CameraEntry",
217
+ "references": {
218
+ "CameraEntry": {
219
+ "location": "import",
220
+ "path": "../../../utils/data-structures"
221
+ }
222
+ }
223
+ }
224
+ }];
225
+ }
226
+ static get methods() {
227
+ return {
228
+ "setActiveCamera": {
229
+ "complexType": {
230
+ "signature": "(cameraId: string) => Promise<void>",
231
+ "parameters": [{
232
+ "tags": [],
233
+ "text": ""
234
+ }],
235
+ "references": {
236
+ "Promise": {
237
+ "location": "global"
238
+ }
239
+ },
240
+ "return": "Promise<void>"
241
+ },
242
+ "docs": {
243
+ "text": "Change active camera.",
244
+ "tags": []
245
+ }
246
+ },
247
+ "populateCameraDevices": {
248
+ "complexType": {
249
+ "signature": "() => Promise<void>",
250
+ "parameters": [],
251
+ "references": {
252
+ "Promise": {
253
+ "location": "global"
254
+ }
255
+ },
256
+ "return": "Promise<void>"
257
+ },
258
+ "docs": {
259
+ "text": "Populate list of camera devices.",
260
+ "tags": []
261
+ }
262
+ }
263
+ };
264
+ }
265
+ static get elementRef() { return "hostEl"; }
266
+ static get listeners() {
267
+ return [{
268
+ "name": "setIsCameraActive",
269
+ "method": "handleSetIsCameraActive",
270
+ "target": undefined,
271
+ "capture": true,
272
+ "passive": false
273
+ }];
274
+ }
275
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright (c) Microblink Ltd. All rights reserved.
3
+ *
4
+ * SASS variables, not customizable via CSS variables
5
+ */
6
+ /**
7
+ * Camera experiences
8
+ */
9
+ :host {
10
+ display: block;
11
+ padding: 0;
12
+ }
13
+ :host img {
14
+ display: block;
15
+ width: 24px;
16
+ height: 24px;
17
+ }
@@ -0,0 +1,48 @@
1
+ import { Host, h } from "@stencil/core";
2
+ import { setWebComponentParts } from "../../../utils/generic.helpers";
3
+ export class MbCompleted {
4
+ constructor() {
5
+ this.icon = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yMS4yMDcxIDYuMjkyODlDMjEuNTk3NiA2LjY4MzQyIDIxLjU5NzYgNy4zMTY1OCAyMS4yMDcxIDcuNzA3MTFMMTEuMjA3MSAxNy43MDcxQzEwLjgxNjYgMTguMDk3NiAxMC4xODM0IDE4LjA5NzYgOS43OTI4OSAxNy43MDcxTDQuNzkyODkgMTIuNzA3MUM0LjQwMjM3IDEyLjMxNjYgNC40MDIzNyAxMS42ODM0IDQuNzkyODkgMTEuMjkyOUM1LjE4MzQyIDEwLjkwMjQgNS44MTY1OCAxMC45MDI0IDYuMjA3MTEgMTEuMjkyOUwxMC41IDE1LjU4NThMMTkuNzkyOSA2LjI5Mjg5QzIwLjE4MzQgNS45MDIzNyAyMC44MTY2IDUuOTAyMzcgMjEuMjA3MSA2LjI5Mjg5WiIgZmlsbD0iIzAwNjJGMiIvPgo8L3N2Zz4K";
6
+ }
7
+ componentDidLoad() {
8
+ setWebComponentParts(this.hostEl);
9
+ }
10
+ render() {
11
+ return (h(Host, null, h("img", { src: this.icon })));
12
+ }
13
+ static get is() { return "mb-completed"; }
14
+ static get encapsulation() { return "shadow"; }
15
+ static get originalStyleUrls() {
16
+ return {
17
+ "$": ["mb-completed.scss"]
18
+ };
19
+ }
20
+ static get styleUrls() {
21
+ return {
22
+ "$": ["mb-completed.css"]
23
+ };
24
+ }
25
+ static get properties() {
26
+ return {
27
+ "icon": {
28
+ "type": "string",
29
+ "mutable": false,
30
+ "complexType": {
31
+ "original": "string",
32
+ "resolved": "string",
33
+ "references": {}
34
+ },
35
+ "required": false,
36
+ "optional": false,
37
+ "docs": {
38
+ "tags": [],
39
+ "text": "Value of `src` attribute for <img> element."
40
+ },
41
+ "attribute": "icon",
42
+ "reflect": false,
43
+ "defaultValue": "\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yMS4yMDcxIDYuMjkyODlDMjEuNTk3NiA2LjY4MzQyIDIxLjU5NzYgNy4zMTY1OCAyMS4yMDcxIDcuNzA3MTFMMTEuMjA3MSAxNy43MDcxQzEwLjgxNjYgMTguMDk3NiAxMC4xODM0IDE4LjA5NzYgOS43OTI4OSAxNy43MDcxTDQuNzkyODkgMTIuNzA3MUM0LjQwMjM3IDEyLjMxNjYgNC40MDIzNyAxMS42ODM0IDQuNzkyODkgMTEuMjkyOUM1LjE4MzQyIDEwLjkwMjQgNS44MTY1OCAxMC45MDI0IDYuMjA3MTEgMTEuMjkyOUwxMC41IDE1LjU4NThMMTkuNzkyOSA2LjI5Mjg5QzIwLjE4MzQgNS45MDIzNyAyMC44MTY2IDUuOTAyMzcgMjEuMjA3MSA2LjI5Mjg5WiIgZmlsbD0iIzAwNjJGMiIvPgo8L3N2Zz4K\""
44
+ }
45
+ };
46
+ }
47
+ static get elementRef() { return "hostEl"; }
48
+ }
@@ -0,0 +1,321 @@
1
+ /**
2
+ * Copyright (c) Microblink Ltd. All rights reserved.
3
+ *
4
+ * SASS variables, not customizable via CSS variables
5
+ */
6
+ /**
7
+ * Camera experiences
8
+ */
9
+ :host {
10
+ box-sizing: border-box;
11
+ position: relative;
12
+ height: 100%;
13
+ display: block;
14
+ width: var(--mb-component-width);
15
+ background: var(--mb-component-background);
16
+ color: var(--mb-component-font-color);
17
+ font-size: var(--mb-font-size);
18
+ font-style: var(--mb-font-style);
19
+ font-weight: var(--mb-font-weight);
20
+ letter-spacing: var(--mb-letter-spacing);
21
+ line-height: var(--mb-line-height);
22
+ text-transform: var(--mb-component-text-transform);
23
+ /* border-color: var(--mb-component-border-color);
24
+ border-radius: var(--mb-component-border-radius);
25
+ border-style: var(--mb-component-border-style);
26
+ border-width: var(--mb-component-border-width);*/
27
+ box-shadow: var(--mb-component-box-shadow);
28
+ -webkit-font-smoothing: antialiased;
29
+ -moz-osx-font-smoothing: grayscale;
30
+ }
31
+ :host > *:not(#mb-overlay-camera-experience) {
32
+ display: none !important;
33
+ }
34
+
35
+ @media only screen and (min-width: 1440px) {
36
+ :host {
37
+ font-size: var(--mb-font-size-desktop);
38
+ }
39
+ }
40
+ /**
41
+ * Screens
42
+ */
43
+ :host #mb-screen-loading {
44
+ display: flex;
45
+ align-items: center;
46
+ justify-content: center;
47
+ padding: 16px;
48
+ }
49
+ :host #mb-screen-loading:not(.visible) img {
50
+ animation-play-state: paused;
51
+ }
52
+
53
+ :host #mb-screen-error {
54
+ display: flex;
55
+ flex-direction: row;
56
+ align-items: center;
57
+ justify-content: center;
58
+ }
59
+ :host #mb-screen-error .icon-alert {
60
+ display: flex;
61
+ margin-right: 10px;
62
+ }
63
+
64
+ :host :host #mb-screen-error:not(.visible),
65
+ :host :host #mb-screen-action:not(.visible),
66
+ :host :host #mb-screen-loading:not(.visible),
67
+ :host :host #mb-screen-processing:not(.visible) {
68
+ border: none;
69
+ }
70
+
71
+ /**
72
+ * Action screen
73
+ */
74
+ :host #mb-screen-action .actions {
75
+ display: flex;
76
+ justify-content: space-between;
77
+ align-items: center;
78
+ }
79
+ :host #mb-screen-action .action-label {
80
+ display: var(--mb-component-action-label);
81
+ margin: 0 16px 0 0;
82
+ cursor: default;
83
+ font-size: var(--mb-component-action-label-font-size);
84
+ }
85
+ :host #mb-screen-action .action-buttons {
86
+ display: flex;
87
+ gap: var(--mb-component-action-buttons-gap);
88
+ justify-content: var(--mb-component-action-buttons-justify-content);
89
+ flex: 1;
90
+ }
91
+ :host #mb-screen-action .image-upload-row {
92
+ display: flex;
93
+ gap: 4px;
94
+ }
95
+ :host #mb-screen-action .multi-side-image-upload {
96
+ width: 100%;
97
+ padding: 8px 0;
98
+ overflow: hidden;
99
+ }
100
+ :host #mb-screen-action .multi-side-image-upload:not(.visible) {
101
+ display: none;
102
+ }
103
+ :host #mb-screen-action .multi-side-image-upload mb-image-box,
104
+ :host #mb-screen-action .multi-side-image-upload mb-button-classic {
105
+ display: block;
106
+ box-sizing: border-box;
107
+ }
108
+ :host #mb-screen-action .multi-side-image-upload mb-image-box {
109
+ flex: 1;
110
+ /* Grays/Black & White/White */
111
+ background: #ffffff;
112
+ /* Grays/Brand/300 */
113
+ border: 1px solid #d1d5db;
114
+ /* Shadows/base */
115
+ box-shadow: 0px 1px 2px rgba(31, 41, 55, 0.08);
116
+ border-radius: 4px;
117
+ min-width: 0;
118
+ }
119
+ :host #mb-screen-action .multi-side-image-upload mb-button-classic {
120
+ width: 100%;
121
+ margin-top: 8px;
122
+ }
123
+
124
+ :host([dir=rtl]) #mb-screen-action .action-label {
125
+ margin: 0 0 0 16px;
126
+ }
127
+
128
+ /**
129
+ * Processing screen
130
+ */
131
+ :host #mb-screen-processing p {
132
+ display: none;
133
+ margin: 8px 0;
134
+ }
135
+
136
+ :host #mb-screen-processing p.visible {
137
+ display: flex;
138
+ flex-direction: row;
139
+ align-items: center;
140
+ justify-content: center;
141
+ font-size: var(--mb-component-font-size);
142
+ }
143
+
144
+ :host #mb-screen-processing p.in-progress {
145
+ color: var(--mb-component-font-color-secondary);
146
+ }
147
+
148
+ :host #mb-screen-processing p.done {
149
+ color: var(--mb-component-font-color);
150
+ }
151
+
152
+ :host #mb-screen-processing[data-type=single-side] p span {
153
+ margin-left: 8px;
154
+ }
155
+
156
+ :host #mb-screen-processing[data-type=multi-side] p span {
157
+ margin-left: 8px;
158
+ }
159
+
160
+ /**
161
+ * Overlays
162
+ */
163
+ :host #mb-overlay-device-selection {
164
+ display: flex;
165
+ align-items: center;
166
+ justify-content: center;
167
+ background-color: var(--mb-overlay-deviceselection-background);
168
+ }
169
+
170
+ :host #mb-overlay-device-selection-mobile {
171
+ display: flex;
172
+ align-items: center;
173
+ justify-content: center;
174
+ background-color: var(--mb-overlay-deviceselection-background);
175
+ }
176
+
177
+ :host #mb-overlay-drag-and-drop {
178
+ display: flex;
179
+ align-items: center;
180
+ justify-content: center;
181
+ flex-direction: column;
182
+ }
183
+ :host #mb-overlay-drag-and-drop .drag-and-drop-icon {
184
+ display: block;
185
+ width: 24px;
186
+ height: 24px;
187
+ }
188
+ :host #mb-overlay-drag-and-drop .drag-and-drop-message {
189
+ max-width: 360px;
190
+ margin: 12px 0 0 0;
191
+ text-align: center;
192
+ color: var(--mb-component-font-color);
193
+ font-size: var(--mb-font-size);
194
+ font-style: var(--mb-font-style);
195
+ font-weight: var(--mb-font-weight);
196
+ letter-spacing: var(--mb-letter-spacing);
197
+ line-height: var(--mb-line-height);
198
+ text-transform: var(--mb-component-text-transform);
199
+ }
200
+ :host #mb-overlay-drag-and-drop.visible {
201
+ background-color: var(--mb-overlay-draganddrop-background);
202
+ }
203
+ :host #mb-overlay-drag-and-drop.visible.error {
204
+ background-color: var(--mb-overlay-draganddrop-background-error);
205
+ }
206
+ :host #mb-overlay-drag-and-drop.visible.error .drag-and-drop-message {
207
+ color: var(--mb-overlay-draganddrop-text-error-color);
208
+ }
209
+ :host #mb-overlay-drag-and-drop.hidden {
210
+ display: none;
211
+ }
212
+ :host #mb-overlay-drag-and-drop.inline {
213
+ position: absolute;
214
+ flex-direction: row;
215
+ border-style: var(--mb-overlay-draganddrop-border-style);
216
+ border-radius: var(--mb-component-border-radius);
217
+ border-width: var(--mb-component-border-width);
218
+ }
219
+ :host #mb-overlay-drag-and-drop.inline .drag-and-drop-message {
220
+ margin: 0 0 0 8px;
221
+ color: var(--mb-overlay-draganddrop-text-color);
222
+ font-size: var(--mb-component-font-size);
223
+ }
224
+ :host #mb-overlay-drag-and-drop.inline.visible {
225
+ border-color: var(--mb-overlay-draganddrop-border-color);
226
+ }
227
+ :host #mb-overlay-drag-and-drop.inline.visible.error {
228
+ border-color: var(--mb-overlay-draganddrop-border-color-error);
229
+ }
230
+ :host #mb-overlay-drag-and-drop.inline.visible.error .drag-and-drop-icon {
231
+ margin-left: 16px;
232
+ }
233
+ :host #mb-overlay-drag-and-drop.inline.visible.error .drag-and-drop-message {
234
+ text-align: left;
235
+ }
236
+
237
+ :host #drag-and-drop-zone {
238
+ position: absolute;
239
+ top: 0;
240
+ bottom: 0;
241
+ left: 0;
242
+ right: 0;
243
+ background-color: transparent;
244
+ }
245
+
246
+ :host #mb-overlay-gallery-experience.visible {
247
+ display: flex;
248
+ align-items: center;
249
+ justify-content: center;
250
+ flex-direction: column;
251
+ background-color: var(--mb-overlay-gallery-experience-background);
252
+ color: var(--mb-overlay-gallery-experience-font-color);
253
+ }
254
+
255
+ :host #mb-overlay-gallery-experience.visible p {
256
+ margin: 8px 0 0 0;
257
+ font-size: var(--mb-overlay-gallery-experience-font-size);
258
+ font-weight: var(--mb-overlay-gallery-experience-font-weight);
259
+ line-height: var(--mb-overlay-gallery-experience-line-height);
260
+ }
261
+
262
+ :host #mb-overlay-camera-experience {
263
+ width: 100%;
264
+ height: 100%;
265
+ min-height: 100%;
266
+ min-height: -webkit-fill-available;
267
+ overflow: hidden;
268
+ justify-content: center;
269
+ align-items: center;
270
+ background-color: #000;
271
+ overflow-y: hidden;
272
+ }
273
+ :host #mb-overlay-camera-experience .holder {
274
+ position: relative;
275
+ width: 100%;
276
+ height: 100%;
277
+ display: flex;
278
+ align-items: center;
279
+ justify-content: center;
280
+ }
281
+ :host #mb-overlay-camera-experience video {
282
+ display: block;
283
+ width: 100%;
284
+ height: auto;
285
+ }
286
+ :host #mb-overlay-camera-experience mb-camera-experience {
287
+ position: absolute;
288
+ top: 0;
289
+ bottom: 0;
290
+ left: 0;
291
+ right: 0;
292
+ }
293
+ :host #mb-overlay-camera-experience mb-camera-experience.is-muted {
294
+ background-color: rgba(0, 0, 0, 0.6);
295
+ }
296
+ :host #mb-overlay-camera-experience mb-camera-experience.is-error {
297
+ background-color: black;
298
+ }
299
+
300
+ :host #mb-overlay-camera-experience.visible {
301
+ display: flex;
302
+ z-index: 1000;
303
+ }
304
+
305
+ :host input[type=file] {
306
+ width: 0;
307
+ height: 0;
308
+ opacity: 0;
309
+ clip: rect(1px, 1px, 1px, 1px);
310
+ position: absolute;
311
+ }
312
+
313
+ :host button.modal-action-button {
314
+ width: 126px;
315
+ height: 32px;
316
+ border-radius: 0;
317
+ border: 0;
318
+ background: #48b2e8;
319
+ color: #ffffff;
320
+ cursor: pointer;
321
+ }