1
|
-
{"version":3,"file":"index.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../src/action-card/ActionCard.tsx","../src/button/Button.tsx","../src/alert/Alert.tsx","../src/form-input/FormInput.tsx","../src/qr-code/QrCode.tsx","../src/consent-card/ConsentCard.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import React, { FunctionComponent } from \"react\";\nimport \"./ActionCard.scss\";\n\nexport interface ActionCardProps {\n title: string;\n caption: string;\n src: string;\n}\n\nexport const ActionCard: FunctionComponent<ActionCardProps> = (prop) => {\n return (\n <div className=\"flex flex-col justify-center rounded-3xl jurne-card bg-white p-1.5\">\n <div className=\"flex flex-col max-w-md px-8 py-6 space-y-5 items-center\">\n <img src={prop.src} width={36} alt={prop.caption} />\n <h3 className=\"font-bold text-gray-900 text-xl\">{prop.title}</h3>\n <span className=\"text-center text-gray-600\">{prop.caption}</span>\n </div>\n </div>\n );\n};","import React, { FunctionComponent } from \"react\";\nimport \"./Button.scss\";\n\nexport interface ButtonProps {\n title: string;\n style: string\n}\n\nexport const Button: FunctionComponent<ButtonProps> = (prop) => {\n return (\n <button type=\"button\" className=\"btn btn-primary\">{prop.title}</button>\n );\n};\n","import React, { FunctionComponent } from \"react\";\nimport \"./Alert.scss\";\n\nexport interface AlertProps {\n title: string;\n}\n\nexport const Alert: FunctionComponent<AlertProps> = (prop) => {\n return (\n <div className=\"alert alert-light\" role=\"alert\">\n {prop.title}\n </div>\n );\n};\n","import React, { FunctionComponent } from \"react\";\nimport \"./FormInput.scss\";\nimport { Form } from 'react-bootstrap';\n\nexport interface FormInputProps {\n title: string;\n}\n\nexport const FormInput: FunctionComponent<FormInputProps> = (prop) => {\n return (\n <div className=\"form-input\">\n <Form.Label>Username</Form.Label>\n <Form.Control className=\"text-input-field\" type=\"email\" placeholder=\"Enter email\" />\n </div>\n );\n};\n","import React, { FunctionComponent } from \"react\";\nimport QRCode from 'qrcode';\nimport { CheckCircle, ExclamationCircle } from 'react-bootstrap-icons';\nimport \"./QrCode.scss\";\nimport { useEffect } from 'react';\n\nexport interface QrCodeProps {\n url: string;\n state: string;\n}\n\nexport const QrCode: FunctionComponent<QrCodeProps> = (prop) => {\n let qrRendered = false;\n \n const writeQRtoCanvas = () => {\n try {\n QRCode.toCanvas(document.getElementById('qr-code'), prop.url || \"\", {\n width: 400\n });\n } catch {\n console.error('The QR code failed to write to the canvas');\n }\n }\n \n useEffect(() => {\n if(!qrRendered) {\n writeQRtoCanvas();\n qrRendered = true;\n }\n }, [writeQRtoCanvas]);\n\n return (\n <div id=\"qr-box\">\n <canvas id=\"qr-code\"></canvas>\n {prop.state === 'warning' ?\n <ExclamationCircle className={`qr-icon dialog-icon ${prop.state}`}/> :\n <CheckCircle className={`qr-icon dialog-icon ${prop.state}`}/> \n }\n </div>\n );\n};\n","import React, { FunctionComponent } from \"react\";\nimport { Button } from \"../button/Button\";\nimport _ from \"lodash\";\nimport \"./ConsentCard.scss\";\nimport \"../typography.scss\";\nimport \"../variables.scss\";\nimport 'bootstrap/dist/css/bootstrap.min.css';\n\nexport interface ConsentCardProps {\n title: string;\n agreement: string;\n pii: Array<string>;\n back: string;\n accept: string;\n}\n\nexport const ConsentCard: FunctionComponent<ConsentCardProps> = (prop) => {\n return (\n <div className=\"flex flex-col justify-center rounded-3xl jurne-card bg-white p-1.5\">\n <div className=\"flex flex-col max-w-md px-8 py-6 space-y-5\">\n <span className=\"consent-title items-center\">{prop.title}</span>\n <span className=\"consent-body items-center\">{prop.agreement}</span>\n <ul>\n {prop.pii.map(item => <li className=\"pii-list-item\">{item}</li>)}\n </ul>\n </div>\n <div className=\"row col-flex\">\n <div className=\"col-sm text-center\">\n <Button title={prop.back} style=\"secondary\"></Button>\n </div>\n <div className=\"col-sm text-center\">\n <Button title={prop.accept} style=\"primary\"></Button>\n </div>\n </div>\n </div>\n );\n};\n"],"names":["React","Form","QRCode","useEffect","ExclamationCircle","CheckCircle"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AAC1B;AACA,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,GAAG;AACH;AACA,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO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