Skip to content

Commit

Permalink
Merge branch 'main' into catch-video-error
Browse files Browse the repository at this point in the history
  • Loading branch information
ayinloya authored Dec 11, 2024
2 parents 76be274 + 4516edc commit 693af60
Show file tree
Hide file tree
Showing 6 changed files with 263 additions and 25 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,23 @@ class DocumentCaptureScreens extends HTMLElement {
this.innerHTML = `
${styles(this.themeColor)}
<div>
<document-capture-instructions theme-color='${this.themeColor}' id='document-capture-instructions-front' ${this.title} ${this.documentCaptureModes} ${this.showNavigation} ${this.hideInstructions ? 'hidden' : ''}></document-capture-instructions>
<document-capture-instructions theme-color='${this.themeColor}' id='document-capture-instructions-front' ${this.title}
${this.documentCaptureModes} ${this.showNavigation} ${this.hideInstructions ? 'hidden' : ''}
${this.hideAttribution}
></document-capture-instructions>
<document-capture id='document-capture-front' side-of-id='Front'
${this.title} ${this.showNavigation} ${this.hideInstructions ? '' : 'hidden'}
${this.title} ${this.showNavigation} ${this.hideInstructions ? '' : 'hidden'} ${this.hideAttribution}
${this.documentCaptureModes} ${this.documentType} theme-color='${this.themeColor}'
></document-capture>
<document-capture-instructions id='document-capture-instructions-back' side-of-id='Back' title='Submit Back of ID'
${this.documentCaptureModes} ${this.showNavigation} theme-color='${this.themeColor}' hidden
${this.documentCaptureModes} ${this.showNavigation} theme-color='${this.themeColor}' ${this.hideAttribution} hidden
></document-capture-instructions>
<document-capture id='document-capture-back' side-of-id='Back' ${this.title} ${this.showNavigation}
${this.documentCaptureModes} theme-color='${this.themeColor}'
${this.documentCaptureModes} theme-color='${this.themeColor}' ${this.hideAttribution}
hidden
></document-capture>
<document-capture-review id='front-of-document-capture-review' theme-color='${this.themeColor}' hidden></document-capture-review>
<document-capture-review id='back-of-document-capture-review' theme-color='${this.themeColor}' hidden></document-capture-review>
<document-capture-review id='front-of-document-capture-review' theme-color='${this.themeColor}' ${this.hideAttribution} hidden></document-capture-review>
<document-capture-review id='back-of-document-capture-review' theme-color='${this.themeColor}' ${this.hideAttribution} hidden></document-capture-review>
</div>
`;

Expand Down Expand Up @@ -294,6 +297,10 @@ class DocumentCaptureScreens extends HTMLElement {
: '';
}

get hideAttribution() {
return this.hasAttribute('hide-attribution') ? 'hide-attribution' : '';
}

get themeColor() {
return this.getAttribute('theme-color') || '#001096';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import './index';

const meta = {
args: {
'hide-attribution': false,
'theme-color': '#001096',
},
argTypes: {
'hide-attribution': { control: 'boolean' },
'theme-color': { control: 'color' },
},
component: 'document-capture-screens',
Expand All @@ -14,35 +16,35 @@ export default meta;

export const DocumentCapture = {
render: (args) => `
<document-capture-screens theme-color='${args['theme-color']}'>
<document-capture-screens theme-color='${args['theme-color']}' ${args['hide-attribution'] ? 'hide-attribution' : ''}>
</document-capture-screens>
`,
};

export const DocumentCaptureHiddenInstructions = {
render: (args) => `
<document-capture-screens hide-instructions theme-color='${args['theme-color']}'>
<document-capture-screens hide-instructions theme-color='${args['theme-color']}' ${args['hide-attribution'] ? 'hide-attribution' : ''}>
</document-capture-screens>
`,
};

export const DocumentCaptureHideBackOfId = {
render: (args) => `
<document-capture-screens hide-back-of-id theme-color='${args['theme-color']}'>
<document-capture-screens hide-back-of-id theme-color='${args['theme-color']}' ${args['hide-attribution'] ? 'hide-attribution' : ''}>
</document-capture-screens>
`,
};

export const DocumentCaptureAllowAttributes = {
render: (args) => `
<document-capture-screens document-capture-screens-modes='camera,upload' theme-color='${args['theme-color']}'>
<document-capture-screens document-capture-screens-modes='camera,upload' theme-color='${args['theme-color']}' ${args['hide-attribution'] ? 'hide-attribution' : ''}>
</document-capture-screens>
`,
};

export const DocumentCaptureHideInstructionNBackOfId = {
render: (args) => `
<document-capture-screens hide-back-of-id hide-instructions theme-color='${args['theme-color']}'>
<document-capture-screens hide-back-of-id hide-instructions theme-color='${args['theme-color']}' ${args['hide-attribution'] ? 'hide-attribution' : ''}>
</document-capture-screens>
`,
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import './SelfieCaptureScreens';

const meta = {
args: {
'hide-attribution': false,
'theme-color': '#001096',
},
argTypes: {
'hide-attribution': { control: 'boolean' },
'theme-color': { control: 'color' },
},
component: 'selfie-capture-screens',
Expand All @@ -10,21 +15,15 @@ const meta = {
export default meta;

export const SelfieCaptureFlow = {
args: {
'theme-color': '#001096',
},
render: (args) => `
<selfie-capture-screens theme-color='${args['theme-color']}'>
<selfie-capture-screens theme-color='${args['theme-color']}' ${args['hide-attribution'] ? 'hide-attribution' : ''}>
</selfie-capture-screens>
`,
};

export const SelfieCaptureFlowHiddenInstructions = {
args: {
'theme-color': '#001096',
},
render: (args) => `
<selfie-capture-screens hide-instructions theme-color='${args['theme-color']}'>
<selfie-capture-screens hide-instructions theme-color='${args['theme-color']}' ${args['hide-attribution'] ? 'hide-attribution' : ''}>
</selfie-capture-screens>
`,
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import './SmartCameraWeb';

const meta = {
args: {
'hide-attribution': false,
'theme-color': '#001096',
},
argTypes: {
'hide-attribution': { control: 'boolean' },
'theme-color': { control: 'color' },
},
component: 'smart-camera-web',
Expand All @@ -14,35 +16,35 @@ export default meta;

export const SmartCameraWeb = {
render: (args) => `
<smart-camera-web theme-color='${args['theme-color']}' capture-id show-navigation>
<smart-camera-web theme-color='${args['theme-color']}' capture-id show-navigation ${args['hide-attribution'] ? 'hide-attribution' : ''}>
</smart-camera-web>
`,
};

export const SmartCameraWebWithOutInstructions = {
render: (args) => `
<smart-camera-web theme-color='${args['theme-color']}' capture-id hide-instructions>
<smart-camera-web theme-color='${args['theme-color']}' capture-id hide-instructions ${args['hide-attribution'] ? 'hide-attribution' : ''}>
</smart-camera-web>
`,
};

export const SmartCameraWebWithOutNavigation = {
render: (args) => `
<smart-camera-web theme-color='${args['theme-color']}' capture-id>
<smart-camera-web theme-color='${args['theme-color']}' capture-id ${args['hide-attribution'] ? 'hide-attribution' : ''}>
</smart-camera-web>
`,
};

export const SmartCameraWebWithOutBackToHost = {
render: (args) => `
<smart-camera-web theme-color='${args['theme-color']}' capture-id show-navigation hide-back-to-host>
<smart-camera-web theme-color='${args['theme-color']}' capture-id show-navigation hide-back-to-host ${args['hide-attribution'] ? 'hide-attribution' : ''}>
</smart-camera-web>
`,
};

export const SmartCameraWebWithOutBackId = {
render: (args) => `
<smart-camera-web theme-color='${args['theme-color']}' capture-id show-navigation hide-back-of-id>
<smart-camera-web theme-color='${args['theme-color']}' capture-id show-navigation hide-back-of-id ${args['hide-attribution'] ? 'hide-attribution' : ''}>
</smart-camera-web>
`,
};
Expand Down
Loading

0 comments on commit 693af60

Please sign in to comment.