kiva-protocol-ui-kit 1.0.4 → 1.0.5

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/build/index.d.ts CHANGED
@@ -1,6 +1,10 @@
1
- export { ActionCard } from "./action-card/ActionCard";
2
- export { Button } from "./button/Button";
3
- export { Alert } from "./alert/Alert";
4
- export { FormInput } from "./form-input/FormInput";
5
- export { QrCode } from "./qr-code/QrCode";
6
- export { ConsentCard } from "./consent-card/ConsentCard";
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,3 +1,25 @@
1
+ button {
2
+ height: 50px;
3
+ border-radius: 16px !important;
4
+ font-family: 'Roboto Mono', monospace;
5
+ padding: 16px 30px !important;
6
+ line-height: 18.46px !important; }
7
+ button.btn-primary {
8
+ background-color: #004FD4 !important; }
9
+ button.btn-secondary {
10
+ background-color: #FFF !important;
11
+ color: #000 !important; }
12
+
13
+ .action-card {
14
+ font-family: inherit;
15
+ width: 300px;
16
+ height: 300px; }
17
+
18
+ .alert {
19
+ padding: 23.5px 50px;
20
+ box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.08);
21
+ border-radius: 20px; }
22
+
1
23
  .form-input {
2
24
  padding: 12px 12px;
3
25
  border: 0.5px solid #D4D4D4;
@@ -19,27 +41,17 @@
19
41
  font-size: 13px;
20
42
  padding: none !important; }
21
43
 
22
- .action-card {
44
+ .consent-card {
23
45
  font-family: inherit;
24
- width: 300px;
25
- height: 300px; }
46
+ width: 400px;
47
+ height: 482px; }
26
48
 
27
- button {
28
- height: 50px;
29
- border-radius: 16px !important;
30
- font-family: 'Roboto Mono', monospace;
31
- padding: 16px 30px !important;
32
- line-height: 18.46px !important; }
33
- button.btn-primary {
34
- background-color: #004FD4 !important; }
35
- button.btn-secondary {
36
- background-color: #FFF !important;
37
- color: #000 !important; }
49
+ .consent-title {
50
+ font-size: 18px;
51
+ font-weight: bold; }
38
52
 
39
- .alert {
40
- padding: 23.5px 50px;
41
- box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.08);
42
- border-radius: 20px; }
53
+ .consent-body {
54
+ font-size: 16px; }
43
55
 
44
56
  .qr-loading-title {
45
57
  color: #e7e7e7;
@@ -75,15 +87,3 @@ button {
75
87
  fill: #27c9ce; }
76
88
  .qr-icon.verifying {
77
89
  color: #24778b; }
78
-
79
- .consent-card {
80
- font-family: inherit;
81
- width: 400px;
82
- height: 482px; }
83
-
84
- .consent-title {
85
- font-size: 18px;
86
- font-weight: bold; }
87
-
88
- .consent-body {
89
- font-size: 16px; }
@@ -138,5 +138,14 @@ var ConsentCard = function (prop) {
138
138
  React.createElement(Button, { title: prop.accept, style: "primary" })))));
139
139
  };
140
140
 
141
- export { ActionCard, Alert, Button, ConsentCard, FormInput, QrCode };
141
+ var index = {
142
+ ActionCard: ActionCard,
143
+ Button: Button,
144
+ Alert: Alert,
145
+ FormInput: FormInput,
146
+ QrCode: QrCode,
147
+ ConsentCard: ConsentCard
148
+ };
149
+
150
+ export { index as default };
142
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"],"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","/*!\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"],"names":["classNames"],"mappings":";;;;;IASa,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;;;;;;;;;;;;;;ACdA;A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BAAK,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;;;;"}
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\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;AACvB,EAAE,IAAI,OAAO,GAAG,EAAE,CAAC;AACnB;AACA,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC7C,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAC1B,GAAG,IAAI,CAAC,GAAG,EAAE,SAAS;AACtB;AACA,GAAG,IAAI,OAAO,GAAG,OAAO,GAAG,CAAC;AAC5B;AACA,GAAG,IAAI,OAAO,KAAK,QAAQ,IAAI,O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@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var React = require('react');
6
4
  var reactBootstrap = require('react-bootstrap');
7
5
  var QRCode = require('qrcode');
@@ -147,10 +145,14 @@ var ConsentCard = function (prop) {
147
145
  React__default['default'].createElement(Button, { title: prop.accept, style: "primary" })))));
148
146
  };
149
147
 
150
- exports.ActionCard = ActionCard;
151
- exports.Alert = Alert;
152
- exports.Button = Button;
153
- exports.ConsentCard = ConsentCard;
154
- exports.FormInput = FormInput;
155
- exports.QrCode = QrCode;
148
+ var index = {
149
+ ActionCard: ActionCard,
150
+ Button: Button,
151
+ Alert: Alert,
152
+ FormInput: FormInput,
153
+ QrCode: QrCode,
154
+ ConsentCard: ConsentCard
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"],"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","/*!\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"],"names":["React","classNames","Form","QRCode","useEffect","ExclamationCircle","XCircle","CheckCircle"],"mappings":";;;;;;;;;;;;;;IASa,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;;;;;;;;;;;;;;ACdA;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,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC7C,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAC1B,GAAG,IAAI,CAAC,GAAG,EAAE,SAAS;AACtB;AACA,GAAG,IAA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B,QAAO,IAAI,CAAC,KAAK;YACf,KAAK,SAAS;gBACZ,OAAOJ,wCAACK,qCAAiB,IAAC,SAAS,EAAE,yBAAuB,IAAI,CAAC,KAAO,GAAG,CAAC;YAC9E,KAAK,OAAO;gBACV,OAAOL,wCAACM,2BAAO,IAAC,SAAS,EAAE,yBAAuB,IAAI,CAAC,KAAO,GAAG,CAAC;YACpE;gBACE,OAAON,wCAACO,+BAAW,IAAC,SAAS,EAAE,yBAAuB,IAAI,CAAC,KAAO,GAAG,CAAC;SACzE;KACF,CAAA;IAED,QACEP,iDAAK,EAAE,EAAC,QAAQ;QACdA,oDAAQ,EAAE,EAAC,SAAS,GAAU;QAC7B,YAAY,EAAE,CACX,EACN;AACJ;;IClCa,WAAW,GAAwC,UAAC,IAAI;IACnE,QACEA,iDAAK,SAAS,EAAC,oEAAoE;QACjFA,iDAAK,SAAS,EAAC,4CAA4C;YACzDA,kDAAM,SAAS,EAAC,4BAA4B,IAAE,IAAI,CAAC,KAAK,CAAQ;YAChEA,kDAAM,SAAS,EAAC,2BAA2B,IAAE,IAAI,CAAC,SAAS,CAAQ;YACnEA,oDACG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,UAAA,IAAI,IAAI,OAAAA,gDAAI,SAAS,EAAC,eAAe,IAAE,IAAI,CAAM,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;;;;;;;;;"}
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\nexport default {\n ActionCard,\n Button,\n Alert,\n FormInput,\n QrCode,\n ConsentCard\n}"],"names":["React","classNames","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CAAA;IAED,QACEP,iDAAK,EAAE,EAAC,QAAQ;QACdA,oDAAQ,EAAE,EAAC,SAAS,GAAU;QAC7B,YAAY,EAAE,CACX,EACN;AACJ,CAAC;;AClCM,IAAM,WAAW,GAAwC,UAAC,IAAI;IACnE,QACEA,iDAAK,SAAS,EAAC,oEAAoE;QACjFA,iDAAK,SAAS,EAAC,4CAA4C;YACzDA,kDAAM,SAAS,EAAC,4BAA4B,IAAE,IAAI,CAAC,KAAK,CAAQ;YAChEA,kDAAM,SAAS,EAAC,2BAA2B,IAAE,IAAI,CAAC,SAAS,CAAQ;YACnEA,oDACG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,UAAA,IAAI,IAAI,OAAAA,gDAAI,SAAS,EAAC,eAAe,IAAE,IAAI,CAAM,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,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.4",
3
+ "version": "1.0.5",
4
4
  "description": "Protocol Web UI",
5
5
  "main": "build/index.js",
6
6
  "module": "build/index.esm.js",