UNPKG

@microblink/blinkid-in-browser-sdk

Version:

A simple ID scanning library for WebAssembly-enabled browsers.

320 lines (299 loc) 7.92 kB
/** * Copyright (c) Microblink Ltd. All rights reserved. */ /** * Copyright (c) Microblink Ltd. All rights reserved. * * SASS variables, not customizable via CSS variables */ /** * Camera experiences */ :host { box-sizing: border-box; position: relative; display: block; width: var(--mb-component-width); background: var(--mb-component-background); color: var(--mb-component-font-color); font-size: var(--mb-font-size); font-style: var(--mb-font-style); font-weight: var(--mb-font-weight); letter-spacing: var(--mb-letter-spacing); line-height: var(--mb-line-height); text-transform: var(--mb-component-text-transform); border-color: var(--mb-component-border-color); border-radius: var(--mb-component-border-radius); border-style: var(--mb-component-border-style); border-width: var(--mb-component-border-width); box-shadow: var(--mb-component-box-shadow); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } @media only screen and (min-width: 1440px) { :host { font-size: var(--mb-font-size-desktop); } } /** * Screens */ :host #mb-screen-loading { display: flex; align-items: center; justify-content: center; padding: 16px; } :host #mb-screen-loading:not(.visible) img { animation-play-state: paused; } :host #mb-screen-error { display: flex; flex-direction: row; align-items: center; justify-content: center; } :host #mb-screen-error .icon-alert { display: flex; margin-right: 10px; } :host :host #mb-screen-error:not(.visible), :host :host #mb-screen-action:not(.visible), :host :host #mb-screen-loading:not(.visible), :host :host #mb-screen-processing:not(.visible) { border: none; } /** * Action screen */ :host #mb-screen-action .actions { display: flex; justify-content: space-between; align-items: center; } :host #mb-screen-action .action-label { display: var(--mb-component-action-label); margin: 0 16px 0 0; cursor: default; font-size: var(--mb-component-action-label-font-size); } :host #mb-screen-action .action-buttons { display: flex; gap: var(--mb-component-action-buttons-gap); justify-content: var(--mb-component-action-buttons-justify-content); flex: 1; } :host #mb-screen-action .image-upload-row { display: flex; gap: 4px; } :host #mb-screen-action .multi-side-image-upload { width: 100%; padding: 8px 0; overflow: hidden; } :host #mb-screen-action .multi-side-image-upload:not(.visible) { display: none; } :host #mb-screen-action .multi-side-image-upload mb-image-box, :host #mb-screen-action .multi-side-image-upload mb-button-classic { display: block; box-sizing: border-box; } :host #mb-screen-action .multi-side-image-upload mb-image-box { flex: 1; /* Grays/Black & White/White */ background: #ffffff; /* Grays/Brand/300 */ border: 1px solid #d1d5db; /* Shadows/base */ box-shadow: 0px 1px 2px rgba(31, 41, 55, 0.08); border-radius: 4px; min-width: 0; } :host #mb-screen-action .multi-side-image-upload mb-button-classic { width: 100%; margin-top: 8px; } :host([dir=rtl]) #mb-screen-action .action-label { margin: 0 0 0 16px; } /** * Processing screen */ :host #mb-screen-processing p { display: none; margin: 8px 0; } :host #mb-screen-processing p.visible { display: flex; flex-direction: row; align-items: center; justify-content: center; font-size: var(--mb-component-font-size); } :host #mb-screen-processing p.in-progress { color: var(--mb-component-font-color-secondary); } :host #mb-screen-processing p.done { color: var(--mb-component-font-color); } :host #mb-screen-processing[data-type=single-side] p span { margin-left: 8px; } :host #mb-screen-processing[data-type=multi-side] p span { margin-left: 8px; } /** * Overlays */ :host #mb-overlay-device-selection { display: flex; align-items: center; justify-content: center; background-color: var(--mb-overlay-deviceselection-background); } :host #mb-overlay-device-selection-mobile { display: flex; align-items: center; justify-content: center; background-color: var(--mb-overlay-deviceselection-background); } :host #mb-overlay-drag-and-drop { display: flex; align-items: center; justify-content: center; flex-direction: column; } :host #mb-overlay-drag-and-drop .drag-and-drop-icon { display: block; width: 24px; height: 24px; } :host #mb-overlay-drag-and-drop .drag-and-drop-message { max-width: 360px; margin: 12px 0 0 0; text-align: center; color: var(--mb-component-font-color); font-size: var(--mb-font-size); font-style: var(--mb-font-style); font-weight: var(--mb-font-weight); letter-spacing: var(--mb-letter-spacing); line-height: var(--mb-line-height); text-transform: var(--mb-component-text-transform); } :host #mb-overlay-drag-and-drop.visible { background-color: var(--mb-overlay-draganddrop-background); } :host #mb-overlay-drag-and-drop.visible.error { background-color: var(--mb-overlay-draganddrop-background-error); } :host #mb-overlay-drag-and-drop.visible.error .drag-and-drop-message { color: var(--mb-overlay-draganddrop-text-error-color); } :host #mb-overlay-drag-and-drop.hidden { display: none; } :host #mb-overlay-drag-and-drop.inline { position: absolute; flex-direction: row; border-style: var(--mb-overlay-draganddrop-border-style); border-radius: var(--mb-component-border-radius); border-width: var(--mb-component-border-width); } :host #mb-overlay-drag-and-drop.inline .drag-and-drop-message { margin: 0 0 0 8px; color: var(--mb-overlay-draganddrop-text-color); font-size: var(--mb-component-font-size); } :host #mb-overlay-drag-and-drop.inline.visible { border-color: var(--mb-overlay-draganddrop-border-color); } :host #mb-overlay-drag-and-drop.inline.visible.error { border-color: var(--mb-overlay-draganddrop-border-color-error); } :host #mb-overlay-drag-and-drop.inline.visible.error .drag-and-drop-icon { margin-left: 16px; } :host #mb-overlay-drag-and-drop.inline.visible.error .drag-and-drop-message { text-align: left; } :host #drag-and-drop-zone { position: absolute; top: 0; bottom: 0; left: 0; right: 0; background-color: transparent; } :host #mb-overlay-gallery-experience.visible { display: flex; align-items: center; justify-content: center; flex-direction: column; background-color: var(--mb-overlay-gallery-experience-background); color: var(--mb-overlay-gallery-experience-font-color); } :host #mb-overlay-gallery-experience.visible p { margin: 8px 0 0 0; font-size: var(--mb-overlay-gallery-experience-font-size); font-weight: var(--mb-overlay-gallery-experience-font-weight); line-height: var(--mb-overlay-gallery-experience-line-height); } :host #mb-overlay-camera-experience { width: 100%; height: 100%; min-height: 100%; min-height: -webkit-fill-available; overflow: hidden; justify-content: center; align-items: center; background-color: #000; overflow-y: hidden; } :host #mb-overlay-camera-experience .holder { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; } :host #mb-overlay-camera-experience video { display: block; width: 100%; height: auto; } :host #mb-overlay-camera-experience mb-camera-experience { position: absolute; top: 0; bottom: 0; left: 0; right: 0; } :host #mb-overlay-camera-experience mb-camera-experience.is-muted { background-color: rgba(0, 0, 0, 0.6); } :host #mb-overlay-camera-experience mb-camera-experience.is-error { background-color: black; } :host #mb-overlay-camera-experience.visible { display: flex; z-index: 1000; } :host input[type=file] { width: 0; height: 0; opacity: 0; clip: rect(1px, 1px, 1px, 1px); position: absolute; } :host button.modal-action-button { width: 126px; height: 32px; border-radius: 0; border: 0; background: #48b2e8; color: #ffffff; cursor: pointer; }