@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.
- package/README.md +385 -0
- package/dist/cjs/document-detector_19.cjs.entry.js +8540 -0
- package/dist/cjs/index-5e4e5e7d.js +1685 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +22 -0
- package/dist/cjs/mb-tooltip.cjs.entry.js +26 -0
- package/dist/cjs/stamps.cjs.js +23 -0
- package/dist/collection/collection-manifest.json +31 -0
- package/dist/collection/components/document-detector/document-detector.css +154 -0
- package/dist/collection/components/document-detector/document-detector.js +416 -0
- package/dist/collection/components/shared/mb-api-process-status/mb-api-process-status.css +360 -0
- package/dist/collection/components/shared/mb-api-process-status/mb-api-process-status.js +124 -0
- package/dist/collection/components/shared/mb-button/mb-button.css +95 -0
- package/dist/collection/components/shared/mb-button/mb-button.js +201 -0
- package/dist/collection/components/shared/mb-button-classic/mb-button-classic.css +100 -0
- package/dist/collection/components/shared/mb-button-classic/mb-button-classic.js +130 -0
- package/dist/collection/components/shared/mb-camera-experience/mb-camera-experience.css +740 -0
- package/dist/collection/components/shared/mb-camera-experience/mb-camera-experience.js +827 -0
- package/dist/collection/components/shared/mb-camera-experience/mb-camera-experience.utils.js +55 -0
- package/dist/collection/components/shared/mb-camera-selection/mb-camera-selection.css +124 -0
- package/dist/collection/components/shared/mb-camera-selection/mb-camera-selection.js +194 -0
- package/dist/collection/components/shared/mb-camera-toolbar/mb-camera-toolbar.css +80 -0
- package/dist/collection/components/shared/mb-camera-toolbar/mb-camera-toolbar.js +275 -0
- package/dist/collection/components/shared/mb-completed/mb-completed.css +17 -0
- package/dist/collection/components/shared/mb-completed/mb-completed.js +48 -0
- package/dist/collection/components/shared/mb-component/mb-component.css +321 -0
- package/dist/collection/components/shared/mb-component/mb-component.js +2269 -0
- package/dist/collection/components/shared/mb-component/mb-component.utils.js +14 -0
- package/dist/collection/components/shared/mb-container/mb-container.css +7 -0
- package/dist/collection/components/shared/mb-container/mb-container.js +23 -0
- package/dist/collection/components/shared/mb-feedback/mb-feedback.css +36 -0
- package/dist/collection/components/shared/mb-feedback/mb-feedback.js +91 -0
- package/dist/collection/components/shared/mb-feedback/mb-feedback.utils.js +11 -0
- package/dist/collection/components/shared/mb-help/mb-help.css +191 -0
- package/dist/collection/components/shared/mb-help/mb-help.js +409 -0
- package/dist/collection/components/shared/mb-help/mb-help.model.js +5 -0
- package/dist/collection/components/shared/mb-image-box/mb-image-box.css +78 -0
- package/dist/collection/components/shared/mb-image-box/mb-image-box.js +150 -0
- package/dist/collection/components/shared/mb-modal/mb-modal.css +106 -0
- package/dist/collection/components/shared/mb-modal/mb-modal.js +239 -0
- package/dist/collection/components/shared/mb-overlay/mb-overlay.css +46 -0
- package/dist/collection/components/shared/mb-overlay/mb-overlay.js +76 -0
- package/dist/collection/components/shared/mb-progress-tracker/mb-progress-tracker.css +24 -0
- package/dist/collection/components/shared/mb-progress-tracker/mb-progress-tracker.js +80 -0
- package/dist/collection/components/shared/mb-screen/mb-screen.css +19 -0
- package/dist/collection/components/shared/mb-screen/mb-screen.js +48 -0
- package/dist/collection/components/shared/mb-spinner/mb-spinner.css +30 -0
- package/dist/collection/components/shared/mb-spinner/mb-spinner.js +67 -0
- package/dist/collection/components/shared/mb-tooltip/mb-tooltip.css +62 -0
- package/dist/collection/components/shared/mb-tooltip/mb-tooltip.js +150 -0
- package/dist/collection/components/shared/mb-tooltip-advanced/mb-tooltip-advanced.css +91 -0
- package/dist/collection/components/shared/mb-tooltip-advanced/mb-tooltip-advanced.js +96 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/data-structures.js +189 -0
- package/dist/collection/utils/device.helpers.js +37 -0
- package/dist/collection/utils/error-structures.js +47 -0
- package/dist/collection/utils/generic.helpers.js +82 -0
- package/dist/collection/utils/sdk.service.js +943 -0
- package/dist/collection/utils/state-lifter.js +3 -0
- package/dist/collection/utils/status.document-detector.js +15 -0
- package/dist/collection/utils/translation.service.js +97 -0
- package/dist/esm/document-detector_19.entry.js +8518 -0
- package/dist/esm/index-dc740acb.js +1656 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +18 -0
- package/dist/esm/mb-tooltip.entry.js +22 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/stamps.js +18 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/stamps/index.esm.js +0 -0
- package/dist/stamps/p-66d9fb33.entry.js +9 -0
- package/dist/stamps/p-7f07a434.js +2 -0
- package/dist/stamps/p-ec3f5972.entry.js +1 -0
- package/dist/stamps/stamps.esm.js +1 -0
- package/dist/types/components/document-detector/document-detector.d.ts +86 -0
- package/dist/types/components/shared/mb-api-process-status/mb-api-process-status.d.ts +30 -0
- package/dist/types/components/shared/mb-button/mb-button.d.ts +41 -0
- package/dist/types/components/shared/mb-button-classic/mb-button-classic.d.ts +27 -0
- package/dist/types/components/shared/mb-camera-experience/mb-camera-experience.d.ts +141 -0
- package/dist/types/components/shared/mb-camera-experience/mb-camera-experience.utils.d.ts +3 -0
- package/dist/types/components/shared/mb-camera-selection/mb-camera-selection.d.ts +33 -0
- package/dist/types/components/shared/mb-camera-toolbar/mb-camera-toolbar.d.ts +54 -0
- package/dist/types/components/shared/mb-completed/mb-completed.d.ts +12 -0
- package/dist/types/components/shared/mb-component/mb-component.d.ts +308 -0
- package/dist/types/components/shared/mb-component/mb-component.utils.d.ts +3 -0
- package/dist/types/components/shared/mb-container/mb-container.d.ts +8 -0
- package/dist/types/components/shared/mb-feedback/mb-feedback.d.ts +19 -0
- package/dist/types/components/shared/mb-feedback/mb-feedback.utils.d.ts +2 -0
- package/dist/types/components/shared/mb-help/mb-help.d.ts +66 -0
- package/dist/types/components/shared/mb-help/mb-help.model.d.ts +9 -0
- package/dist/types/components/shared/mb-image-box/mb-image-box.d.ts +35 -0
- package/dist/types/components/shared/mb-modal/mb-modal.d.ts +53 -0
- package/dist/types/components/shared/mb-overlay/mb-overlay.d.ts +17 -0
- package/dist/types/components/shared/mb-progress-tracker/mb-progress-tracker.d.ts +19 -0
- package/dist/types/components/shared/mb-screen/mb-screen.d.ts +12 -0
- package/dist/types/components/shared/mb-spinner/mb-spinner.d.ts +16 -0
- package/dist/types/components/shared/mb-tooltip/mb-tooltip.d.ts +10 -0
- package/dist/types/components/shared/mb-tooltip-advanced/mb-tooltip-advanced.d.ts +7 -0
- package/dist/types/components.d.ts +1382 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1637 -0
- package/dist/types/utils/data-structures.d.ts +264 -0
- package/dist/types/utils/device.helpers.d.ts +7 -0
- package/dist/types/utils/error-structures.d.ts +44 -0
- package/dist/types/utils/generic.helpers.d.ts +21 -0
- package/dist/types/utils/sdk.service.d.ts +52 -0
- package/dist/types/utils/state-lifter.d.ts +3 -0
- package/dist/types/utils/status.document-detector.d.ts +14 -0
- package/dist/types/utils/translation.service.d.ts +77 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +21 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +11 -0
- package/package.json +63 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { setWebComponentParts, classNames, } from "../../../utils/generic.helpers";
|
|
3
|
+
export class MbOverlay {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.fullscreen = true;
|
|
6
|
+
this.visible = false;
|
|
7
|
+
}
|
|
8
|
+
componentDidLoad() {
|
|
9
|
+
setWebComponentParts(this.hostEl);
|
|
10
|
+
}
|
|
11
|
+
getHostClassNames() {
|
|
12
|
+
const classNames = [];
|
|
13
|
+
this.hostEl.classList.forEach((value) => {
|
|
14
|
+
if (value !== "visible" && value !== "non-fullscreen") {
|
|
15
|
+
classNames.push(value);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
return classNames.join(" ");
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return (h(Host, { class: `${classNames({ visible: this.visible, "non-fullscreen": !this.fullscreen })} ${this.getHostClassNames()}` }, h("slot", null)));
|
|
22
|
+
}
|
|
23
|
+
static get is() { return "mb-overlay"; }
|
|
24
|
+
static get encapsulation() { return "shadow"; }
|
|
25
|
+
static get originalStyleUrls() {
|
|
26
|
+
return {
|
|
27
|
+
"$": ["mb-overlay.scss"]
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
static get styleUrls() {
|
|
31
|
+
return {
|
|
32
|
+
"$": ["mb-overlay.css"]
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
static get properties() {
|
|
36
|
+
return {
|
|
37
|
+
"fullscreen": {
|
|
38
|
+
"type": "boolean",
|
|
39
|
+
"mutable": false,
|
|
40
|
+
"complexType": {
|
|
41
|
+
"original": "boolean",
|
|
42
|
+
"resolved": "boolean",
|
|
43
|
+
"references": {}
|
|
44
|
+
},
|
|
45
|
+
"required": false,
|
|
46
|
+
"optional": false,
|
|
47
|
+
"docs": {
|
|
48
|
+
"tags": [],
|
|
49
|
+
"text": "Set to 'false' if overlay should not cover whole screen."
|
|
50
|
+
},
|
|
51
|
+
"attribute": "fullscreen",
|
|
52
|
+
"reflect": false,
|
|
53
|
+
"defaultValue": "true"
|
|
54
|
+
},
|
|
55
|
+
"visible": {
|
|
56
|
+
"type": "boolean",
|
|
57
|
+
"mutable": false,
|
|
58
|
+
"complexType": {
|
|
59
|
+
"original": "boolean",
|
|
60
|
+
"resolved": "boolean",
|
|
61
|
+
"references": {}
|
|
62
|
+
},
|
|
63
|
+
"required": false,
|
|
64
|
+
"optional": false,
|
|
65
|
+
"docs": {
|
|
66
|
+
"tags": [],
|
|
67
|
+
"text": "Set to 'true' if overlay should be visible."
|
|
68
|
+
},
|
|
69
|
+
"attribute": "visible",
|
|
70
|
+
"reflect": false,
|
|
71
|
+
"defaultValue": "false"
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
static get elementRef() { return "hostEl"; }
|
|
76
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
--mb-progress-tracker-dot-active-color: #0062f2;
|
|
3
|
+
--mb-progress-tracker-dot-inactive-color: #c6c6c8;
|
|
4
|
+
display: block;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.mb-progress-tracker {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: row;
|
|
10
|
+
align-items: space-between;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.mb-progress-tracker .dot {
|
|
14
|
+
width: 9px;
|
|
15
|
+
height: 9px;
|
|
16
|
+
border-radius: 50%;
|
|
17
|
+
margin: 0px 6px;
|
|
18
|
+
}
|
|
19
|
+
.mb-progress-tracker .dot.active {
|
|
20
|
+
background-color: var(--mb-progress-tracker-dot-active-color);
|
|
21
|
+
}
|
|
22
|
+
.mb-progress-tracker .dot.inactive {
|
|
23
|
+
background-color: var(--mb-progress-tracker-dot-inactive-color);
|
|
24
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
export class MbProgressTracker {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.getCurrentCorrected = () => {
|
|
5
|
+
if (this.current < 1) {
|
|
6
|
+
return 1;
|
|
7
|
+
}
|
|
8
|
+
if (this.current > this.size) {
|
|
9
|
+
return this.size;
|
|
10
|
+
}
|
|
11
|
+
return this.current;
|
|
12
|
+
};
|
|
13
|
+
this.getSteps = () => {
|
|
14
|
+
const array = [];
|
|
15
|
+
for (let counter = 1; counter <= this.size; counter++) {
|
|
16
|
+
array.push(counter);
|
|
17
|
+
}
|
|
18
|
+
return array;
|
|
19
|
+
};
|
|
20
|
+
this.size = 3;
|
|
21
|
+
this.current = 1;
|
|
22
|
+
}
|
|
23
|
+
render() {
|
|
24
|
+
const currentCorrected = this.getCurrentCorrected();
|
|
25
|
+
const steps = this.getSteps();
|
|
26
|
+
return (h(Host, null, h("div", { class: "mb-progress-tracker" }, steps.map((step) => (h("div", { class: `dot ${currentCorrected === step ? "active" : "inactive"}` }))))));
|
|
27
|
+
}
|
|
28
|
+
static get is() { return "mb-progress-tracker"; }
|
|
29
|
+
static get encapsulation() { return "shadow"; }
|
|
30
|
+
static get originalStyleUrls() {
|
|
31
|
+
return {
|
|
32
|
+
"$": ["mb-progress-tracker.scss"]
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
static get styleUrls() {
|
|
36
|
+
return {
|
|
37
|
+
"$": ["mb-progress-tracker.css"]
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
static get properties() {
|
|
41
|
+
return {
|
|
42
|
+
"size": {
|
|
43
|
+
"type": "number",
|
|
44
|
+
"mutable": false,
|
|
45
|
+
"complexType": {
|
|
46
|
+
"original": "number",
|
|
47
|
+
"resolved": "number",
|
|
48
|
+
"references": {}
|
|
49
|
+
},
|
|
50
|
+
"required": false,
|
|
51
|
+
"optional": false,
|
|
52
|
+
"docs": {
|
|
53
|
+
"tags": [],
|
|
54
|
+
"text": "Steps count.\n\nDefault is 3."
|
|
55
|
+
},
|
|
56
|
+
"attribute": "size",
|
|
57
|
+
"reflect": false,
|
|
58
|
+
"defaultValue": "3"
|
|
59
|
+
},
|
|
60
|
+
"current": {
|
|
61
|
+
"type": "number",
|
|
62
|
+
"mutable": false,
|
|
63
|
+
"complexType": {
|
|
64
|
+
"original": "number",
|
|
65
|
+
"resolved": "number",
|
|
66
|
+
"references": {}
|
|
67
|
+
},
|
|
68
|
+
"required": false,
|
|
69
|
+
"optional": false,
|
|
70
|
+
"docs": {
|
|
71
|
+
"tags": [],
|
|
72
|
+
"text": "Current step.\n\nSteps start from 1 up to the size number.\n\nDefault is 1."
|
|
73
|
+
},
|
|
74
|
+
"attribute": "current",
|
|
75
|
+
"reflect": false,
|
|
76
|
+
"defaultValue": "1"
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
width: 100%;
|
|
12
|
+
height: 100%;
|
|
13
|
+
padding: 8px 16px;
|
|
14
|
+
display: grid;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:host(:not(.visible)) {
|
|
18
|
+
display: none !important;
|
|
19
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { setWebComponentParts, classNames, } from "../../../utils/generic.helpers";
|
|
3
|
+
export class MbScreen {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.visible = false;
|
|
6
|
+
}
|
|
7
|
+
componentDidLoad() {
|
|
8
|
+
setWebComponentParts(this.hostEl);
|
|
9
|
+
}
|
|
10
|
+
render() {
|
|
11
|
+
return (h(Host, { class: classNames({ visible: this.visible }) }, h("slot", null)));
|
|
12
|
+
}
|
|
13
|
+
static get is() { return "mb-screen"; }
|
|
14
|
+
static get encapsulation() { return "shadow"; }
|
|
15
|
+
static get originalStyleUrls() {
|
|
16
|
+
return {
|
|
17
|
+
"$": ["mb-screen.scss"]
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
static get styleUrls() {
|
|
21
|
+
return {
|
|
22
|
+
"$": ["mb-screen.css"]
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
static get properties() {
|
|
26
|
+
return {
|
|
27
|
+
"visible": {
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"mutable": false,
|
|
30
|
+
"complexType": {
|
|
31
|
+
"original": "boolean",
|
|
32
|
+
"resolved": "boolean",
|
|
33
|
+
"references": {}
|
|
34
|
+
},
|
|
35
|
+
"required": false,
|
|
36
|
+
"optional": false,
|
|
37
|
+
"docs": {
|
|
38
|
+
"tags": [],
|
|
39
|
+
"text": "Set to 'true' if screen should be visible."
|
|
40
|
+
},
|
|
41
|
+
"attribute": "visible",
|
|
42
|
+
"reflect": false,
|
|
43
|
+
"defaultValue": "false"
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
static get elementRef() { return "hostEl"; }
|
|
48
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
animation: rotation 700ms linear infinite;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:host(.large) img {
|
|
21
|
+
width: 100px;
|
|
22
|
+
height: 100px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@keyframes rotation {
|
|
26
|
+
100% {
|
|
27
|
+
transform-origin: center;
|
|
28
|
+
transform: rotate(360deg);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { setWebComponentParts } from "../../../utils/generic.helpers";
|
|
3
|
+
export class MbSpinner {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.icon = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTA2IiBoZWlnaHQ9IjEwNiIgdmlld0JveD0iMCAwIDEwNiAxMDYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxjaXJjbGUgY3g9IjUzIiBjeT0iNTMiIHI9IjUwIiBzdHJva2U9IiNEQ0VBRkYiIHN0cm9rZS13aWR0aD0iNiIvPgo8cGF0aCBkPSJNMyA1M0MzIDI1LjM4NTggMjUuMzg1OCAzIDUzIDMiIHN0cm9rZT0iIzAwNjJGMiIgc3Ryb2tlLXdpZHRoPSI2IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==";
|
|
6
|
+
this.size = "default";
|
|
7
|
+
}
|
|
8
|
+
componentDidLoad() {
|
|
9
|
+
setWebComponentParts(this.hostEl);
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return (h(Host, { class: this.size }, h("img", { src: this.icon })));
|
|
13
|
+
}
|
|
14
|
+
static get is() { return "mb-spinner"; }
|
|
15
|
+
static get encapsulation() { return "shadow"; }
|
|
16
|
+
static get originalStyleUrls() {
|
|
17
|
+
return {
|
|
18
|
+
"$": ["mb-spinner.scss"]
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
static get styleUrls() {
|
|
22
|
+
return {
|
|
23
|
+
"$": ["mb-spinner.css"]
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
static get properties() {
|
|
27
|
+
return {
|
|
28
|
+
"icon": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"mutable": false,
|
|
31
|
+
"complexType": {
|
|
32
|
+
"original": "string",
|
|
33
|
+
"resolved": "string",
|
|
34
|
+
"references": {}
|
|
35
|
+
},
|
|
36
|
+
"required": false,
|
|
37
|
+
"optional": false,
|
|
38
|
+
"docs": {
|
|
39
|
+
"tags": [],
|
|
40
|
+
"text": "Value of `src` attribute for <img> element."
|
|
41
|
+
},
|
|
42
|
+
"attribute": "icon",
|
|
43
|
+
"reflect": false,
|
|
44
|
+
"defaultValue": "\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTA2IiBoZWlnaHQ9IjEwNiIgdmlld0JveD0iMCAwIDEwNiAxMDYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxjaXJjbGUgY3g9IjUzIiBjeT0iNTMiIHI9IjUwIiBzdHJva2U9IiNEQ0VBRkYiIHN0cm9rZS13aWR0aD0iNiIvPgo8cGF0aCBkPSJNMyA1M0MzIDI1LjM4NTggMjUuMzg1OCAzIDUzIDMiIHN0cm9rZT0iIzAwNjJGMiIgc3Ryb2tlLXdpZHRoPSI2IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==\""
|
|
45
|
+
},
|
|
46
|
+
"size": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"mutable": false,
|
|
49
|
+
"complexType": {
|
|
50
|
+
"original": "string",
|
|
51
|
+
"resolved": "string",
|
|
52
|
+
"references": {}
|
|
53
|
+
},
|
|
54
|
+
"required": false,
|
|
55
|
+
"optional": false,
|
|
56
|
+
"docs": {
|
|
57
|
+
"tags": [],
|
|
58
|
+
"text": "Spinner size, can be 'default' or 'large'."
|
|
59
|
+
},
|
|
60
|
+
"attribute": "size",
|
|
61
|
+
"reflect": false,
|
|
62
|
+
"defaultValue": "\"default\""
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
static get elementRef() { return "hostEl"; }
|
|
67
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.mb-tooltip {
|
|
6
|
+
display: none;
|
|
7
|
+
position: absolute;
|
|
8
|
+
margin: 2px 40px 2px 32px;
|
|
9
|
+
padding: 8px;
|
|
10
|
+
font-size: 12px;
|
|
11
|
+
line-height: 16px;
|
|
12
|
+
color: #374151;
|
|
13
|
+
background-color: #fff;
|
|
14
|
+
border: 1px solid rgba(120, 120, 128, 0.2);
|
|
15
|
+
filter: drop-shadow(0px 2px 4px rgba(31, 41, 55, 0.06)) drop-shadow(0px 4px 6px rgba(31, 41, 55, 0.1));
|
|
16
|
+
border-radius: 4px;
|
|
17
|
+
}
|
|
18
|
+
.mb-tooltip.text-center {
|
|
19
|
+
text-align: center;
|
|
20
|
+
}
|
|
21
|
+
.mb-tooltip.text-left {
|
|
22
|
+
text-align: left;
|
|
23
|
+
}
|
|
24
|
+
.mb-tooltip.text-right {
|
|
25
|
+
text-align: right;
|
|
26
|
+
}
|
|
27
|
+
.mb-tooltip svg {
|
|
28
|
+
display: block;
|
|
29
|
+
float: left;
|
|
30
|
+
margin: 6px 14px 6px 6px;
|
|
31
|
+
}
|
|
32
|
+
.mb-tooltip::after {
|
|
33
|
+
position: absolute;
|
|
34
|
+
display: block;
|
|
35
|
+
content: " ";
|
|
36
|
+
background-color: #fff;
|
|
37
|
+
width: 10px;
|
|
38
|
+
height: 10px;
|
|
39
|
+
transform: rotate(-45deg);
|
|
40
|
+
}
|
|
41
|
+
.mb-tooltip.arrow-none::after {
|
|
42
|
+
display: none;
|
|
43
|
+
}
|
|
44
|
+
.mb-tooltip.arrow-left::after {
|
|
45
|
+
left: -3px;
|
|
46
|
+
top: calc(50% - 5px);
|
|
47
|
+
}
|
|
48
|
+
.mb-tooltip.arrow-right::after {
|
|
49
|
+
right: -3px;
|
|
50
|
+
top: calc(50% - 5px);
|
|
51
|
+
}
|
|
52
|
+
.mb-tooltip.arrow-up::after {
|
|
53
|
+
top: -3px;
|
|
54
|
+
left: calc(50% - 5px);
|
|
55
|
+
}
|
|
56
|
+
.mb-tooltip.arrow-down::after {
|
|
57
|
+
bottom: -3px;
|
|
58
|
+
left: calc(50% - 5px);
|
|
59
|
+
}
|
|
60
|
+
.mb-tooltip.visible {
|
|
61
|
+
display: block;
|
|
62
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
export class MbTooltip {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.show = undefined;
|
|
5
|
+
this.message = undefined;
|
|
6
|
+
this.arrowPosition = undefined;
|
|
7
|
+
this.showWarningIcon = undefined;
|
|
8
|
+
this.showInfoIcon = undefined;
|
|
9
|
+
this.textAlign = undefined;
|
|
10
|
+
this.containerWidth = undefined;
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return (h(Host, null, h("p", { part: "tooltip", class: `mb-tooltip ${this.show ? "visible" : ""} ${this.arrowPosition ? this.arrowPosition : "arrow-none"} ${this.textAlign ? this.textAlign : "text-center"} ` }, this.message)));
|
|
14
|
+
}
|
|
15
|
+
static get is() { return "mb-tooltip"; }
|
|
16
|
+
static get encapsulation() { return "shadow"; }
|
|
17
|
+
static get originalStyleUrls() {
|
|
18
|
+
return {
|
|
19
|
+
"$": ["mb-tooltip.scss"]
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
static get styleUrls() {
|
|
23
|
+
return {
|
|
24
|
+
"$": ["mb-tooltip.css"]
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
static get properties() {
|
|
28
|
+
return {
|
|
29
|
+
"show": {
|
|
30
|
+
"type": "boolean",
|
|
31
|
+
"mutable": false,
|
|
32
|
+
"complexType": {
|
|
33
|
+
"original": "boolean",
|
|
34
|
+
"resolved": "boolean",
|
|
35
|
+
"references": {}
|
|
36
|
+
},
|
|
37
|
+
"required": false,
|
|
38
|
+
"optional": false,
|
|
39
|
+
"docs": {
|
|
40
|
+
"tags": [],
|
|
41
|
+
"text": ""
|
|
42
|
+
},
|
|
43
|
+
"attribute": "show",
|
|
44
|
+
"reflect": false
|
|
45
|
+
},
|
|
46
|
+
"message": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"mutable": false,
|
|
49
|
+
"complexType": {
|
|
50
|
+
"original": "string",
|
|
51
|
+
"resolved": "string",
|
|
52
|
+
"references": {}
|
|
53
|
+
},
|
|
54
|
+
"required": false,
|
|
55
|
+
"optional": false,
|
|
56
|
+
"docs": {
|
|
57
|
+
"tags": [],
|
|
58
|
+
"text": ""
|
|
59
|
+
},
|
|
60
|
+
"attribute": "message",
|
|
61
|
+
"reflect": false
|
|
62
|
+
},
|
|
63
|
+
"arrowPosition": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"mutable": false,
|
|
66
|
+
"complexType": {
|
|
67
|
+
"original": "| \"arrow-left\"\n | \"arrow-right\"\n | \"arrow-up\"\n | \"arrow-down\"\n | \"arrow-none\"",
|
|
68
|
+
"resolved": "\"arrow-down\" | \"arrow-left\" | \"arrow-none\" | \"arrow-right\" | \"arrow-up\"",
|
|
69
|
+
"references": {}
|
|
70
|
+
},
|
|
71
|
+
"required": false,
|
|
72
|
+
"optional": true,
|
|
73
|
+
"docs": {
|
|
74
|
+
"tags": [],
|
|
75
|
+
"text": ""
|
|
76
|
+
},
|
|
77
|
+
"attribute": "arrow-position",
|
|
78
|
+
"reflect": false
|
|
79
|
+
},
|
|
80
|
+
"showWarningIcon": {
|
|
81
|
+
"type": "boolean",
|
|
82
|
+
"mutable": false,
|
|
83
|
+
"complexType": {
|
|
84
|
+
"original": "boolean",
|
|
85
|
+
"resolved": "boolean",
|
|
86
|
+
"references": {}
|
|
87
|
+
},
|
|
88
|
+
"required": false,
|
|
89
|
+
"optional": true,
|
|
90
|
+
"docs": {
|
|
91
|
+
"tags": [],
|
|
92
|
+
"text": ""
|
|
93
|
+
},
|
|
94
|
+
"attribute": "show-warning-icon",
|
|
95
|
+
"reflect": false
|
|
96
|
+
},
|
|
97
|
+
"showInfoIcon": {
|
|
98
|
+
"type": "boolean",
|
|
99
|
+
"mutable": false,
|
|
100
|
+
"complexType": {
|
|
101
|
+
"original": "boolean",
|
|
102
|
+
"resolved": "boolean",
|
|
103
|
+
"references": {}
|
|
104
|
+
},
|
|
105
|
+
"required": false,
|
|
106
|
+
"optional": true,
|
|
107
|
+
"docs": {
|
|
108
|
+
"tags": [],
|
|
109
|
+
"text": ""
|
|
110
|
+
},
|
|
111
|
+
"attribute": "show-info-icon",
|
|
112
|
+
"reflect": false
|
|
113
|
+
},
|
|
114
|
+
"textAlign": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"mutable": false,
|
|
117
|
+
"complexType": {
|
|
118
|
+
"original": "\"text-center\" | \"text-left\" | \"text-right\"",
|
|
119
|
+
"resolved": "\"text-center\" | \"text-left\" | \"text-right\"",
|
|
120
|
+
"references": {}
|
|
121
|
+
},
|
|
122
|
+
"required": false,
|
|
123
|
+
"optional": true,
|
|
124
|
+
"docs": {
|
|
125
|
+
"tags": [],
|
|
126
|
+
"text": ""
|
|
127
|
+
},
|
|
128
|
+
"attribute": "text-align",
|
|
129
|
+
"reflect": false
|
|
130
|
+
},
|
|
131
|
+
"containerWidth": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"mutable": false,
|
|
134
|
+
"complexType": {
|
|
135
|
+
"original": "string",
|
|
136
|
+
"resolved": "string",
|
|
137
|
+
"references": {}
|
|
138
|
+
},
|
|
139
|
+
"required": false,
|
|
140
|
+
"optional": true,
|
|
141
|
+
"docs": {
|
|
142
|
+
"tags": [],
|
|
143
|
+
"text": ""
|
|
144
|
+
},
|
|
145
|
+
"attribute": "container-width",
|
|
146
|
+
"reflect": false
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
--background-color: #0062f2;
|
|
3
|
+
--font-color: white;
|
|
4
|
+
display: block;
|
|
5
|
+
font-family: inherit;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.mb-tooltip {
|
|
9
|
+
display: none;
|
|
10
|
+
position: absolute;
|
|
11
|
+
margin: 0px;
|
|
12
|
+
margin-bottom: 5px;
|
|
13
|
+
padding: 2px 4px 4px 4px;
|
|
14
|
+
font-family: inherit;
|
|
15
|
+
font-style: normal;
|
|
16
|
+
font-weight: 500;
|
|
17
|
+
font-size: 13px;
|
|
18
|
+
line-height: 16px;
|
|
19
|
+
color: var(--font-color);
|
|
20
|
+
background-color: var(--background-color);
|
|
21
|
+
border: 1px solid rgba(120, 120, 128, 0.2);
|
|
22
|
+
filter: drop-shadow(0px 2px 4px rgba(31, 41, 55, 0.06)) drop-shadow(0px 4px 6px rgba(31, 41, 55, 0.1));
|
|
23
|
+
border-radius: 4px;
|
|
24
|
+
}
|
|
25
|
+
.mb-tooltip.text-center {
|
|
26
|
+
text-align: center;
|
|
27
|
+
}
|
|
28
|
+
.mb-tooltip.text-left {
|
|
29
|
+
text-align: left;
|
|
30
|
+
}
|
|
31
|
+
.mb-tooltip.text-right {
|
|
32
|
+
text-align: right;
|
|
33
|
+
}
|
|
34
|
+
.mb-tooltip svg {
|
|
35
|
+
display: block;
|
|
36
|
+
float: left;
|
|
37
|
+
margin: 6px 14px 6px 6px;
|
|
38
|
+
}
|
|
39
|
+
.mb-tooltip::after {
|
|
40
|
+
position: absolute;
|
|
41
|
+
z-index: -1;
|
|
42
|
+
display: block;
|
|
43
|
+
content: " ";
|
|
44
|
+
background-color: var(--background-color);
|
|
45
|
+
width: 10px;
|
|
46
|
+
height: 10px;
|
|
47
|
+
}
|
|
48
|
+
.mb-tooltip.arrow-none::after {
|
|
49
|
+
display: none;
|
|
50
|
+
}
|
|
51
|
+
.mb-tooltip.arrow-left::after {
|
|
52
|
+
left: -3px;
|
|
53
|
+
top: calc(50% - 5px);
|
|
54
|
+
}
|
|
55
|
+
.mb-tooltip.arrow-right::after {
|
|
56
|
+
right: -3px;
|
|
57
|
+
top: calc(50% - 5px);
|
|
58
|
+
}
|
|
59
|
+
.mb-tooltip.arrow-up::after {
|
|
60
|
+
top: -3px;
|
|
61
|
+
left: calc(50% - 5px);
|
|
62
|
+
transform: rotate(-45deg) translateY(-3px);
|
|
63
|
+
}
|
|
64
|
+
.mb-tooltip.arrow-up-left::after {
|
|
65
|
+
top: -3px;
|
|
66
|
+
left: 15px;
|
|
67
|
+
transform: rotate(-45deg) translateY(-3px);
|
|
68
|
+
}
|
|
69
|
+
.mb-tooltip.arrow-up-right::after {
|
|
70
|
+
top: -3px;
|
|
71
|
+
right: 15px;
|
|
72
|
+
transform: rotate(-45deg) translateY(-3px);
|
|
73
|
+
}
|
|
74
|
+
.mb-tooltip.arrow-down::after {
|
|
75
|
+
bottom: -3px;
|
|
76
|
+
left: calc(50% - 5px);
|
|
77
|
+
transform: rotate(-45deg) translateY(3px);
|
|
78
|
+
}
|
|
79
|
+
.mb-tooltip.arrow-down-left::after {
|
|
80
|
+
bottom: -3px;
|
|
81
|
+
left: 15px;
|
|
82
|
+
transform: rotate(-45deg) translateY(3px);
|
|
83
|
+
}
|
|
84
|
+
.mb-tooltip.arrow-down-right::after {
|
|
85
|
+
bottom: -3px;
|
|
86
|
+
right: 15px;
|
|
87
|
+
transform: rotate(-45deg) translateY(3px);
|
|
88
|
+
}
|
|
89
|
+
.mb-tooltip.visible {
|
|
90
|
+
display: block;
|
|
91
|
+
}
|