kiva-protocol-ui-kit 1.0.8 → 1.0.12

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.
@@ -3,4 +3,5 @@ import "./Alert.scss";
3
3
  export interface AlertProps {
4
4
  title: string;
5
5
  }
6
- export declare const Alert: FunctionComponent<AlertProps>;
6
+ declare const Alert: FunctionComponent<AlertProps>;
7
+ export default Alert;
@@ -0,0 +1,2 @@
1
+ export interface Alert {
2
+ }
package/build/index.d.ts CHANGED
@@ -1 +1,10 @@
1
- export {};
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ ActionCard: import("react").FunctionComponent<import("./action-card/ActionCard").ActionCardProps>;
4
+ Button: import("react").FunctionComponent<import("./button/Button").ButtonProps>;
5
+ Alert: import("react").FunctionComponent<import("./alert/Alert").AlertProps>;
6
+ FormInput: import("react").FunctionComponent<import("./form-input/FormInput").FormInputProps>;
7
+ QrCode: import("react").FunctionComponent<import("./qr-code/QrCode").QrCodeProps>;
8
+ ConsentCard: import("react").FunctionComponent<import("./consent-card/ConsentCard").ConsentCardProps>;
9
+ };
10
+ export default _default;
@@ -1,8 +1,3 @@
1
- .action-card {
2
- font-family: inherit;
3
- width: 300px;
4
- height: 300px; }
5
-
6
1
  .consent-card {
7
2
  font-family: inherit;
8
3
  width: 400px;
@@ -20,6 +15,27 @@
20
15
  box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.08);
21
16
  border-radius: 20px; }
22
17
 
18
+ .form-input {
19
+ padding: 12px 12px;
20
+ border: 0.5px solid #D4D4D4;
21
+ border-radius: 12px;
22
+ background-color: #FFF;
23
+ outline: none;
24
+ height: 68px;
25
+ font-size: 13px; }
26
+ .form-input *:focus {
27
+ box-shadow: none !important; }
28
+
29
+ .form-label {
30
+ font-weight: 500;
31
+ margin-left: 10px;
32
+ margin-bottom: 0px; }
33
+
34
+ .text-input-field {
35
+ border: none;
36
+ font-size: 13px;
37
+ padding: none !important; }
38
+
23
39
  .qr-loading-title {
24
40
  color: #e7e7e7;
25
41
  padding-top: 15px; }
@@ -55,27 +71,6 @@
55
71
  .qr-icon.verifying {
56
72
  color: #24778b; }
57
73
 
58
- .form-input {
59
- padding: 12px 12px;
60
- border: 0.5px solid #D4D4D4;
61
- border-radius: 12px;
62
- background-color: #FFF;
63
- outline: none;
64
- height: 68px;
65
- font-size: 13px; }
66
- .form-input *:focus {
67
- box-shadow: none !important; }
68
-
69
- .form-label {
70
- font-weight: 500;
71
- margin-left: 10px;
72
- margin-bottom: 0px; }
73
-
74
- .text-input-field {
75
- border: none;
76
- font-size: 13px;
77
- padding: none !important; }
78
-
79
74
  button {
80
75
  height: 50px;
81
76
  border-radius: 16px !important;
@@ -87,3 +82,8 @@ button {
87
82
  button.btn-secondary {
88
83
  background-color: #FFF !important;
89
84
  color: #000 !important; }
85
+
86
+ .action-card {
87
+ font-family: inherit;
88
+ width: 300px;
89
+ height: 300px; }
@@ -138,7 +138,7 @@ var ConsentCard = function (prop) {
138
138
  React.createElement(Button, { title: prop.accept, style: "primary" })))));
139
139
  };
140
140
 
141
- exports.Components = {
141
+ var index = {
142
142
  ActionCard: ActionCard,
143
143
  Button: Button,
144
144
  Alert: Alert,
@@ -146,4 +146,6 @@ exports.Components = {
146
146
  QrCode: QrCode,
147
147
  ConsentCard: ConsentCard
148
148
  };
149
+
150
+ export { index as default };
149
151
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../src/action-card/ActionCard.tsx","../node_modules/classnames/index.js","../src/button/Button.tsx","../src/alert/Alert.tsx","../src/form-input/FormInput.tsx","../src/qr-code/QrCode.tsx","../src/consent-card/ConsentCard.tsx","../src/index.ts"],"sourcesContent":["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};","/*!\n Copyright (c) 2018 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString === Object.prototype.toString) {\n\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import React, { FunctionComponent } from \"react\";\nimport classNames from \"classnames\";\nimport \"./Button.scss\";\n\nexport interface ButtonProps {\n title: string;\n style: string;\n}\n\nexport const Button: FunctionComponent<ButtonProps> = (prop) => {\n let styleClass = `btn-${prop.style}`;\n let buttonClasses = {\n \"btn\": true,\n \"mb-6\": true\n };\n buttonClasses[styleClass] = true;\n return (\n <button type=\"button\" className={classNames(buttonClasses)}>\n {prop.title}\n </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 A simple light alert—check it out!\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, XCircle } 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 const renderQrIcon = () => {\n switch(prop.state) {\n case \"warning\":\n return <ExclamationCircle className={`qr-icon dialog-icon ${prop.state}`}/>;\n case \"error\":\n return <XCircle className={`qr-icon dialog-icon ${prop.state}`}/>;\n default:\n return <CheckCircle className={`qr-icon dialog-icon ${prop.state}`}/>;\n }\n }\n\n return (\n <div id=\"qr-box\">\n <canvas id=\"qr-code\"></canvas>\n {renderQrIcon()}\n </div>\n );\n};\n","import React, { FunctionComponent } from \"react\";\nimport { Button } from \"../button/Button\";\nimport _ from \"lodash\";\nimport \"./ConsentCard.scss\";\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","import { ActionCard } from \"./action-card/ActionCard\";\nimport { Button } from \"./button/Button\";\nimport { Alert } from \"./alert/Alert\";\nimport { FormInput } from \"./form-input/FormInput\";\nimport { QrCode } from \"./qr-code/QrCode\";\nimport { ConsentCard } from \"./consent-card/ConsentCard\";\n\nexports.Components = {\n ActionCard,\n Button,\n Alert,\n FormInput,\n QrCode,\n ConsentCard\n}"],"names":["classNames"],"mappings":";;;;;AASO,IAAM,UAAU,GAAuC,UAAC,IAAI;IACjE,QACE,6BAAK,SAAS,EAAC,oEAAoE;QACjF,6BAAK,SAAS,EAAC,yDAAyD;YACtE,6BAAK,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,OAAO,GAAI;YACpD,4BAAI,SAAS,EAAC,iCAAi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,IAAI,CAAC,SAAS,CAAQ;YACnE,gCACG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,UAAA,IAAI,IAAI,OAAA,4BAAI,SAAS,EAAC,eAAe,IAAE,IAAI,CAAM,GAAA,CAAC,CAC7D,CACD;QACN,6BAAK,SAAS,EAAC,cAAc;YAC3B,6BAAK,SAAS,EAAC,oBAAoB;gBACjC,oBAAC,MAAM,IAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAC,WAAW,GAAU,CAC/C;YACN,6BAAK,SAAS,EAAC,oBAAoB;gBACnC,oBAAC,MAAM,IAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAC,SAAS,GAAU,CACjD,CACF,CACF,EACN;AACJ,CAAC;;AC1BD,OAAO,CAAC,UAAU,GAAG;IACnB,UAAU,YAAA;IACV,MAAM,QAAA;IACN,KAAK,OAAA;IACL,SAAS,WAAA;IACT,MAAM,QAAA;IACN,WAAW,aAAA;CACZ"}
1
+ {"version":3,"file":"index.esm.js","sources":["../src/action-card/ActionCard.tsx","../node_modules/classnames/index.js","../src/button/Button.tsx","../src/alert/Alert.tsx","../src/form-input/FormInput.tsx","../src/qr-code/QrCode.tsx","../src/consent-card/ConsentCard.tsx","../src/index.ts"],"sourcesContent":["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};","/*!\n Copyright (c) 2018 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString === Object.prototype.toString) {\n\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import React, { FunctionComponent } from \"react\";\nimport classNames from \"classnames\";\nimport \"./Button.scss\";\n\nexport interface ButtonProps {\n title: string;\n style: string;\n}\n\nexport const Button: FunctionComponent<ButtonProps> = (prop) => {\n let styleClass = `btn-${prop.style}`;\n let buttonClasses = {\n \"btn\": true,\n \"mb-6\": true\n };\n buttonClasses[styleClass] = true;\n return (\n <button type=\"button\" className={classNames(buttonClasses)}>\n {prop.title}\n </button>\n );\n};\n","import React, { FunctionComponent } from \"react\";\nimport \"./Alert.scss\";\n\nexport interface AlertProps {\n title: string;\n}\n\nconst Alert: FunctionComponent<AlertProps> = (prop) => {\n return (\n <div className=\"alert alert-light\" role=\"alert\">\n A simple light alert—check it out!\n </div>\n );\n};\n\nexport default Alert;","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, XCircle } 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 const renderQrIcon = () => {\n switch(prop.state) {\n case \"warning\":\n return <ExclamationCircle className={`qr-icon dialog-icon ${prop.state}`}/>;\n case \"error\":\n return <XCircle className={`qr-icon dialog-icon ${prop.state}`}/>;\n default:\n return <CheckCircle className={`qr-icon dialog-icon ${prop.state}`}/>;\n }\n }\n\n return (\n <div id=\"qr-box\">\n <canvas id=\"qr-code\"></canvas>\n {renderQrIcon()}\n </div>\n );\n};\n","import React, { FunctionComponent } from \"react\";\nimport { Button } from \"../button/Button\";\nimport _ from \"lodash\";\nimport \"./ConsentCard.scss\";\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","import { ActionCard } from \"./action-card/ActionCard\";\nimport { Button } from \"./button/Button\";\nimport Alert from \"./alert/Alert\";\nimport { FormInput } from \"./form-input/FormInput\";\nimport { QrCode } from \"./qr-code/QrCode\";\nimport { ConsentCard } from \"./consent-card/ConsentCard\";\n\nexport default {\n ActionCard,\n Button,\n Alert,\n FormInput,\n QrCode,\n ConsentCard\n}"],"names":["classNames"],"mappings":";;;;;AASO,IAAM,UAAU,GAAuC,UAAC,IAAI;IACjE,QACE,6BAAK,SAAS,EAAC,oEAAoE;QACjF,6BAAK,SAAS,EAAC,yDAAyD;YACtE,6BAAK,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,OAAO,GAAI;YACpD,4BAAI,SAAS,EAAC,iCAAiC,IAAE,IAAI,CAAC,KAAK,CAAM;YACjE,8BAAM,SAAS,EAAC,2BAA2B,IAAE,IAAI,CAAC,OAAO,CAAQ,CAC7D,CACF,EACN;AACJ,CAAC;;;;;;;;;;;;;;ACdD;AACA;AACA,CAAC,YAAY;AAEb;AACA,CAAC,IAAI,MAAM,GAAG,EAAE,CAAC,cAAc,CAAC;AAChC;AACA,CAAC,SAAS,UAAU,GAAG;AACv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E,IAAI,CAAC,IAAI,EAAE,KAAK,EAAC,WAAW,GAAU,CAC/C;YACN,6BAAK,SAAS,EAAC,oBAAoB;gBACnC,oBAAC,MAAM,IAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAC,SAAS,GAAU,CACjD,CACF,CACF,EACN;AACJ,CAAC;;AC1BD,YAAe;IACb,UAAU,YAAA;IACV,MAAM,QAAA;IACN,KAAK,OAAA;IACL,SAAS,WAAA;IACT,MAAM,QAAA;IACN,WAAW,aAAA;CACZ;;;;"}
package/build/index.js CHANGED
@@ -145,7 +145,7 @@ var ConsentCard = function (prop) {
145
145
  React__default['default'].createElement(Button, { title: prop.accept, style: "primary" })))));
146
146
  };
147
147
 
148
- exports.Components = {
148
+ var index = {
149
149
  ActionCard: ActionCard,
150
150
  Button: Button,
151
151
  Alert: Alert,
@@ -153,4 +153,6 @@ exports.Components = {
153
153
  QrCode: QrCode,
154
154
  ConsentCard: ConsentCard
155
155
  };
156
+
157
+ module.exports = index;
156
158
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/action-card/ActionCard.tsx","../node_modules/classnames/index.js","../src/button/Button.tsx","../src/alert/Alert.tsx","../src/form-input/FormInput.tsx","../src/qr-code/QrCode.tsx","../src/consent-card/ConsentCard.tsx","../src/index.ts"],"sourcesContent":["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};","/*!\n Copyright (c) 2018 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString === Object.prototype.toString) {\n\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import React, { FunctionComponent } from \"react\";\nimport classNames from \"classnames\";\nimport \"./Button.scss\";\n\nexport interface ButtonProps {\n title: string;\n style: string;\n}\n\nexport const Button: FunctionComponent<ButtonProps> = (prop) => {\n let styleClass = `btn-${prop.style}`;\n let buttonClasses = {\n \"btn\": true,\n \"mb-6\": true\n };\n buttonClasses[styleClass] = true;\n return (\n <button type=\"button\" className={classNames(buttonClasses)}>\n {prop.title}\n </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 A simple light alert—check it out!\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, XCircle } 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 const renderQrIcon = () => {\n switch(prop.state) {\n case \"warning\":\n return <ExclamationCircle className={`qr-icon dialog-icon ${prop.state}`}/>;\n case \"error\":\n return <XCircle className={`qr-icon dialog-icon ${prop.state}`}/>;\n default:\n return <CheckCircle className={`qr-icon dialog-icon ${prop.state}`}/>;\n }\n }\n\n return (\n <div id=\"qr-box\">\n <canvas id=\"qr-code\"></canvas>\n {renderQrIcon()}\n </div>\n );\n};\n","import React, { FunctionComponent } from \"react\";\nimport { Button } from \"../button/Button\";\nimport _ from \"lodash\";\nimport \"./ConsentCard.scss\";\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","import { ActionCard } from \"./action-card/ActionCard\";\nimport { Button } from \"./button/Button\";\nimport { Alert } from \"./alert/Alert\";\nimport { FormInput } from \"./form-input/FormInput\";\nimport { QrCode } from \"./qr-code/QrCode\";\nimport { ConsentCard } from \"./consent-card/ConsentCard\";\n\nexports.Components = {\n ActionCard,\n Button,\n Alert,\n FormInput,\n QrCode,\n ConsentCard\n}"],"names":["React","classNames","Form","QRCode","useEffect","ExclamationCircle","XCircle","CheckCircle"],"mappings":";;;;;;;;;;;;AASO,IAAM,UAAU,GAAuC,UAAC,IAAI;IACjE,QACEA,iDAAK,SAAS,EAAC,oEAAoE;QACjFA,iDAAK,SAAS,EAAC,yDAAyD;YACtEA,iDAAK,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,OAAO,GAAI;YACpDA,gDAAI,SAAS,EAAC,iCAAiC,IAAE,IAAI,CAAC,KAAK,CAAM;YACjEA,kDAAM,SAAS,EAAC,2BAA2B,IAAE,IAAI,CAAC,OAAO,CAAQ,CAC7D,CACF,EACN;AACJ,CAAC;;;;;;;;;;;;;;ACdD;AACA;AACA,CAAC,YAAY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,GAAA,CAAC,CAC7D,CACD;QACNA,iDAAK,SAAS,EAAC,cAAc;YAC3BA,iDAAK,SAAS,EAAC,oBAAoB;gBACjCA,wCAAC,MAAM,IAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAC,WAAW,GAAU,CAC/C;YACNA,iDAAK,SAAS,EAAC,oBAAoB;gBACnCA,wCAAC,MAAM,IAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAC,SAAS,GAAU,CACjD,CACF,CACF,EACN;AACJ,CAAC;;AC1BD,OAAO,CAAC,UAAU,GAAG;IACnB,UAAU,YAAA;IACV,MAAM,QAAA;IACN,KAAK,OAAA;IACL,SAAS,WAAA;IACT,MAAM,QAAA;IACN,WAAW,aAAA;CACZ;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/action-card/ActionCard.tsx","../node_modules/classnames/index.js","../src/button/Button.tsx","../src/alert/Alert.tsx","../src/form-input/FormInput.tsx","../src/qr-code/QrCode.tsx","../src/consent-card/ConsentCard.tsx","../src/index.ts"],"sourcesContent":["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};","/*!\n Copyright (c) 2018 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString === Object.prototype.toString) {\n\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import React, { FunctionComponent } from \"react\";\nimport classNames from \"classnames\";\nimport \"./Button.scss\";\n\nexport interface ButtonProps {\n title: string;\n style: string;\n}\n\nexport const Button: FunctionComponent<ButtonProps> = (prop) => {\n let styleClass = `btn-${prop.style}`;\n let buttonClasses = {\n \"btn\": true,\n \"mb-6\": true\n };\n buttonClasses[styleClass] = true;\n return (\n <button type=\"button\" className={classNames(buttonClasses)}>\n {prop.title}\n </button>\n );\n};\n","import React, { FunctionComponent } from \"react\";\nimport \"./Alert.scss\";\n\nexport interface AlertProps {\n title: string;\n}\n\nconst Alert: FunctionComponent<AlertProps> = (prop) => {\n return (\n <div className=\"alert alert-light\" role=\"alert\">\n A simple light alert—check it out!\n </div>\n );\n};\n\nexport default Alert;","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, XCircle } 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 const renderQrIcon = () => {\n switch(prop.state) {\n case \"warning\":\n return <ExclamationCircle className={`qr-icon dialog-icon ${prop.state}`}/>;\n case \"error\":\n return <XCircle className={`qr-icon dialog-icon ${prop.state}`}/>;\n default:\n return <CheckCircle className={`qr-icon dialog-icon ${prop.state}`}/>;\n }\n }\n\n return (\n <div id=\"qr-box\">\n <canvas id=\"qr-code\"></canvas>\n {renderQrIcon()}\n </div>\n );\n};\n","import React, { FunctionComponent } from \"react\";\nimport { Button } from \"../button/Button\";\nimport _ from \"lodash\";\nimport \"./ConsentCard.scss\";\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","import { ActionCard } from \"./action-card/ActionCard\";\nimport { Button } from \"./button/Button\";\nimport Alert from \"./alert/Alert\";\nimport { FormInput } from \"./form-input/FormInput\";\nimport { QrCode } from \"./qr-code/QrCode\";\nimport { ConsentCard } from \"./consent-card/ConsentCard\";\n\nexport default {\n ActionCard,\n Button,\n Alert,\n FormInput,\n QrCode,\n ConsentCard\n}"],"names":["React","classNames","Form","QRCode","useEffect","ExclamationCircle","XCircle","CheckCircle"],"mappings":";;;;;;;;;;;;AASO,IAAM,UAAU,GAAuC,UAAC,IAAI;IACjE,QACEA,iDAAK,SAAS,EAAC,oEAAoE;QACjFA,iDAAK,SAAS,EAAC,yDAAyD;YACtEA,iDAAK,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,OAAO,GAAI;YACpDA,gDAAI,SAAS,EAAC,iCAAiC,IAAE,IAAI,CAAC,KAAK,CAAM;YACjEA,kDAAM,SAAS,EAAC,2BAA2B,IAAE,IAAI,CAAC,OAAO,CAAQ,CAC7D,CACF,EACN;AACJ,CAAC;;;;;;;;;;;;;;ACdD;AACA;AACA,CAAC,YAAY;AAEb;AACA,CAAC,IAAI,MAAM,GAAG,EAAE,CAAC,cAAc,CAAC;AAChC;AACA,CAAC,SAAS,UAAU,GAAG;AACvB,EAAE,IAAI,OAAO,GAAG,EAAE,CAAC;AACnB;AACA,EAAE,KAAK,IAAI,CAAC,GAAG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AU,CAC/C;YACNA,iDAAK,SAAS,EAAC,oBAAoB;gBACnCA,wCAAC,MAAM,IAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAC,SAAS,GAAU,CACjD,CACF,CACF,EACN;AACJ,CAAC;;AC1BD,YAAe;IACb,UAAU,YAAA;IACV,MAAM,QAAA;IACN,KAAK,OAAA;IACL,SAAS,WAAA;IACT,MAAM,QAAA;IACN,WAAW,aAAA;CACZ;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kiva-protocol-ui-kit",
3
- "version": "1.0.8",
3
+ "version": "1.0.12",
4
4
  "description": "Protocol Web UI",
5
5
  "main": "build/index.js",
6
6
  "module": "build/index.esm.js",