@onepercentio/one-ui 0.3.0 → 0.4.0
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/cypress/support/commands.ts +37 -0
- package/cypress/support/component-index.html +12 -0
- package/cypress/support/component.ts +39 -0
- package/cypress/support/{index.js → e2e.js} +0 -0
- package/dist/components/InstantCounter/InstantCounter.js +3 -3
- package/dist/components/InstantCounter/InstantCounter.js.map +1 -1
- package/dist/components/Portal/Portal.d.ts +11 -0
- package/dist/components/Portal/Portal.js +27 -0
- package/dist/components/Portal/Portal.js.map +1 -0
- package/dist/components/Portal/Portal.module.scss +3 -0
- package/dist/components/Portal/index.d.ts +1 -0
- package/dist/components/Portal/index.js +9 -0
- package/dist/components/Portal/index.js.map +1 -0
- package/dist/hooks/useAsyncControl.js +2 -2
- package/dist/hooks/useAsyncControl.js.map +1 -1
- package/dist/hooks/useObserve.d.ts +1 -1
- package/dist/hooks/useObserve.js +8 -6
- package/dist/hooks/useObserve.js.map +1 -1
- package/package.json +18 -4
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/// <reference types="cypress" />
|
|
2
|
+
// ***********************************************
|
|
3
|
+
// This example commands.ts shows you how to
|
|
4
|
+
// create various custom commands and overwrite
|
|
5
|
+
// existing commands.
|
|
6
|
+
//
|
|
7
|
+
// For more comprehensive examples of custom
|
|
8
|
+
// commands please read more here:
|
|
9
|
+
// https://on.cypress.io/custom-commands
|
|
10
|
+
// ***********************************************
|
|
11
|
+
//
|
|
12
|
+
//
|
|
13
|
+
// -- This is a parent command --
|
|
14
|
+
// Cypress.Commands.add('login', (email, password) => { ... })
|
|
15
|
+
//
|
|
16
|
+
//
|
|
17
|
+
// -- This is a child command --
|
|
18
|
+
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
|
|
19
|
+
//
|
|
20
|
+
//
|
|
21
|
+
// -- This is a dual command --
|
|
22
|
+
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
|
|
23
|
+
//
|
|
24
|
+
//
|
|
25
|
+
// -- This will overwrite an existing command --
|
|
26
|
+
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
|
27
|
+
//
|
|
28
|
+
// declare global {
|
|
29
|
+
// namespace Cypress {
|
|
30
|
+
// interface Chainable {
|
|
31
|
+
// login(email: string, password: string): Chainable<void>
|
|
32
|
+
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
|
33
|
+
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
|
34
|
+
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
|
|
35
|
+
// }
|
|
36
|
+
// }
|
|
37
|
+
// }
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
7
|
+
<title>Components App</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div data-cy-root></div>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// ***********************************************************
|
|
2
|
+
// This example support/component.ts is processed and
|
|
3
|
+
// loaded automatically before your test files.
|
|
4
|
+
//
|
|
5
|
+
// This is a great place to put global configuration and
|
|
6
|
+
// behavior that modifies Cypress.
|
|
7
|
+
//
|
|
8
|
+
// You can change the location of this file or turn off
|
|
9
|
+
// automatically serving support files with the
|
|
10
|
+
// 'supportFile' configuration option.
|
|
11
|
+
//
|
|
12
|
+
// You can read more here:
|
|
13
|
+
// https://on.cypress.io/configuration
|
|
14
|
+
// ***********************************************************
|
|
15
|
+
|
|
16
|
+
// Import commands.js using ES2015 syntax:
|
|
17
|
+
import './commands'
|
|
18
|
+
|
|
19
|
+
// Alternatively you can use CommonJS syntax:
|
|
20
|
+
// require('./commands')
|
|
21
|
+
|
|
22
|
+
import { mount } from 'cypress/react'
|
|
23
|
+
|
|
24
|
+
// Augment the Cypress namespace to include type definitions for
|
|
25
|
+
// your custom command.
|
|
26
|
+
// Alternatively, can be defined in cypress/support/component.d.ts
|
|
27
|
+
// with a <reference path="./component" /> at the top of your spec.
|
|
28
|
+
declare global {
|
|
29
|
+
namespace Cypress {
|
|
30
|
+
interface Chainable {
|
|
31
|
+
mount: typeof mount
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
Cypress.Commands.add('mount', mount)
|
|
37
|
+
|
|
38
|
+
// Example use:
|
|
39
|
+
// cy.mount(<MyComponent />)
|
|
File without changes
|
|
@@ -42,8 +42,8 @@ function InstantCounter({ from = 0, to, framesPerSecond = 30, durationInSeconds,
|
|
|
42
42
|
spanRef.current.innerHTML = formatNumber(initialValue.current, formatOptions);
|
|
43
43
|
const intervalId = setInterval(() => {
|
|
44
44
|
initialValue.current += incrementBy;
|
|
45
|
-
spanRef.current.innerHTML = formatNumber(
|
|
46
|
-
if (Math.round(initialValue.current) === to) {
|
|
45
|
+
spanRef.current.innerHTML = formatNumber(initialValue.current, formatOptions);
|
|
46
|
+
if (Math.round(initialValue.current) === Math.round(to)) {
|
|
47
47
|
clearInterval(intervalId);
|
|
48
48
|
}
|
|
49
49
|
}, 1000 / framesPerSecond);
|
|
@@ -51,7 +51,7 @@ function InstantCounter({ from = 0, to, framesPerSecond = 30, durationInSeconds,
|
|
|
51
51
|
clearInterval(intervalId);
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
}, [started]);
|
|
54
|
+
}, [started, to]);
|
|
55
55
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
56
56
|
react_1.default.createElement("span", { ref: spanRef })));
|
|
57
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InstantCounter.js","sourceRoot":"","sources":["../../../src/components/InstantCounter/InstantCounter.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAOe;AACf,2CAA0D;AAE1D;;IAEI;AACJ,SAAS,cAAc,CACrB,EACE,IAAI,GAAG,CAAC,EACR,EAAE,EACF,eAAe,GAAG,EAAE,EACpB,iBAAiB,EACjB,aAAa,GAAG,EAAE,EAClB,SAAS,GAAG,IAAI,GAQjB,EACD,GAAwC;IAExC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,SAAS,CAAC,CAAC;IAClD,MAAM,YAAY,GAAG,IAAA,cAAM,EAAS,IAAI,CAAC,CAAC;IAC1C,MAAM,OAAO,GAAG,IAAA,cAAM,EAAkB,IAAI,CAAC,CAAC;IAC9C,MAAM,EAAE,YAAY,EAAE,GAAG,IAAA,oBAAO,GAAE,CAAC;IAEnC,IAAA,2BAAmB,EACjB,GAAG,EACH,GAAG,EAAE,CAAC,CAAC;QACL,KAAK,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;KAC9B,CAAC,EACF,EAAE,CACH,CAAC;IAEF,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,OAAO,EAAE;YACX,MAAM,WAAW,GACf,CAAC,EAAE,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,GAAG,iBAAiB,CAAC,CAAC;YACtE,OAAO,CAAC,OAAQ,CAAC,SAAS,GAAG,YAAY,CACvC,YAAY,CAAC,OAAQ,EACrB,aAAa,CACd,CAAC;YAEF,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE;gBAClC,YAAY,CAAC,OAAQ,IAAI,WAAW,CAAC;gBACrC,OAAO,CAAC,OAAQ,CAAC,SAAS,GAAG,YAAY,CACvC,
|
|
1
|
+
{"version":3,"file":"InstantCounter.js","sourceRoot":"","sources":["../../../src/components/InstantCounter/InstantCounter.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAOe;AACf,2CAA0D;AAE1D;;IAEI;AACJ,SAAS,cAAc,CACrB,EACE,IAAI,GAAG,CAAC,EACR,EAAE,EACF,eAAe,GAAG,EAAE,EACpB,iBAAiB,EACjB,aAAa,GAAG,EAAE,EAClB,SAAS,GAAG,IAAI,GAQjB,EACD,GAAwC;IAExC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,SAAS,CAAC,CAAC;IAClD,MAAM,YAAY,GAAG,IAAA,cAAM,EAAS,IAAI,CAAC,CAAC;IAC1C,MAAM,OAAO,GAAG,IAAA,cAAM,EAAkB,IAAI,CAAC,CAAC;IAC9C,MAAM,EAAE,YAAY,EAAE,GAAG,IAAA,oBAAO,GAAE,CAAC;IAEnC,IAAA,2BAAmB,EACjB,GAAG,EACH,GAAG,EAAE,CAAC,CAAC;QACL,KAAK,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;KAC9B,CAAC,EACF,EAAE,CACH,CAAC;IAEF,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,OAAO,EAAE;YACX,MAAM,WAAW,GACf,CAAC,EAAE,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,GAAG,iBAAiB,CAAC,CAAC;YACtE,OAAO,CAAC,OAAQ,CAAC,SAAS,GAAG,YAAY,CACvC,YAAY,CAAC,OAAQ,EACrB,aAAa,CACd,CAAC;YAEF,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE;gBAClC,YAAY,CAAC,OAAQ,IAAI,WAAW,CAAC;gBACrC,OAAO,CAAC,OAAQ,CAAC,SAAS,GAAG,YAAY,CACvC,YAAY,CAAC,OAAQ,EACrB,aAAa,CACd,CAAC;gBACF,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE;oBACvD,aAAa,CAAC,UAAU,CAAC,CAAC;iBAC3B;YACH,CAAC,EAAE,IAAI,GAAG,eAAe,CAAC,CAAC;YAC3B,OAAO,GAAG,EAAE;gBACV,aAAa,CAAC,UAAU,CAAC,CAAC;YAC5B,CAAC,CAAC;SACH;IACH,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;IAClB,OAAO,CACL;QACE,wCAAM,GAAG,EAAE,OAAO,GAAI,CACrB,CACJ,CAAC;AACJ,CAAC;AAED,kBAAe,IAAA,kBAAU,EAAC,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* A react portal implementation with current page fallback
|
|
4
|
+
**/
|
|
5
|
+
export default function Portal({ to, children, }: PropsWithChildren<{
|
|
6
|
+
to: string;
|
|
7
|
+
}>): JSX.Element | null;
|
|
8
|
+
export declare function PortalReceiver({ name, className, }: {
|
|
9
|
+
name: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PortalReceiver = void 0;
|
|
7
|
+
const react_dom_1 = __importDefault(require("react-dom"));
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const react_2 = require("react");
|
|
10
|
+
const react_3 = require("react");
|
|
11
|
+
const Portal_module_scss_1 = __importDefault(require("./Portal.module.scss"));
|
|
12
|
+
/**
|
|
13
|
+
* A react portal implementation with current page fallback
|
|
14
|
+
**/
|
|
15
|
+
function Portal({ to, children, }) {
|
|
16
|
+
const [target, setTarget] = (0, react_3.useState)();
|
|
17
|
+
(0, react_2.useEffect)(() => {
|
|
18
|
+
setTarget(document.querySelector(`[data-one-portal="${to}"]`) || null);
|
|
19
|
+
}, []);
|
|
20
|
+
return target === undefined ? null : (react_1.default.createElement(react_1.default.Fragment, null, target === null ? children : react_dom_1.default.createPortal(children, target)));
|
|
21
|
+
}
|
|
22
|
+
exports.default = Portal;
|
|
23
|
+
function PortalReceiver({ name, className = "", }) {
|
|
24
|
+
return (react_1.default.createElement("div", { className: `${Portal_module_scss_1.default.portal} ${className}`, "data-one-portal": name }));
|
|
25
|
+
}
|
|
26
|
+
exports.PortalReceiver = PortalReceiver;
|
|
27
|
+
//# sourceMappingURL=Portal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Portal.js","sourceRoot":"","sources":["../../../src/components/Portal/Portal.tsx"],"names":[],"mappings":";;;;;;AAAA,0DAAiC;AACjC,kDAA0D;AAE1D,iCAAkC;AAClC,iCAAiC;AACjC,8EAA0C;AAE1C;;IAEI;AACJ,SAAwB,MAAM,CAAC,EAC7B,EAAE,EACF,QAAQ,GAC0B;IAClC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,GAAkB,CAAC;IAEvD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC,qBAAqB,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC;IACzE,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACnC,8DAAG,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,mBAAQ,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAI,CAC5E,CAAC;AACJ,CAAC;AAbD,yBAaC;AAED,SAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,SAAS,GAAG,EAAE,GAIf;IACC,OAAO,CACL,uCAAK,SAAS,EAAE,GAAG,4BAAM,CAAC,MAAM,IAAI,SAAS,EAAE,qBAAmB,IAAI,GAAI,CAC3E,CAAC;AACJ,CAAC;AAVD,wCAUC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Portal';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var Portal_1 = require("./Portal");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Portal_1).default; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Portal/index.tsx"],"names":[],"mappings":";;;;;;AAAA,mCAAmC;AAA1B,kHAAA,OAAO,OAAA"}
|
|
@@ -13,7 +13,7 @@ const react_1 = require("react");
|
|
|
13
13
|
function useAsyncControl() {
|
|
14
14
|
const [error, setError] = (0, react_1.useState)();
|
|
15
15
|
const [loading, setLoading] = (0, react_1.useState)(false);
|
|
16
|
-
const _process = (asyncFn) => __awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
const _process = (0, react_1.useCallback)((asyncFn) => __awaiter(this, void 0, void 0, function* () {
|
|
17
17
|
try {
|
|
18
18
|
setLoading(true);
|
|
19
19
|
setError(undefined);
|
|
@@ -27,7 +27,7 @@ function useAsyncControl() {
|
|
|
27
27
|
finally {
|
|
28
28
|
setLoading(false);
|
|
29
29
|
}
|
|
30
|
-
});
|
|
30
|
+
}), []);
|
|
31
31
|
return {
|
|
32
32
|
process: _process,
|
|
33
33
|
loading,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAsyncControl.js","sourceRoot":"","sources":["../../src/hooks/useAsyncControl.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"useAsyncControl.js","sourceRoot":"","sources":["../../src/hooks/useAsyncControl.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,iCAA8C;AAG9C,SAAwB,eAAe;IACrC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,GAAK,CAAC;IACxC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAU,KAAK,CAAC,CAAC;IAEvD,MAAM,QAAQ,GAAG,IAAA,mBAAW,EAAC,CAAO,OAA2B,EAAE,EAAE;QACjE,IAAI;YACF,UAAU,CAAC,IAAI,CAAC,CAAC;YACjB,QAAQ,CAAC,SAAS,CAAC,CAAC;YACpB,MAAM,OAAO,EAAE,CAAC;SACjB;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa;gBAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAC7D,QAAQ,CAAC,kBAAuB,CAAC,CAAC;SACnC;gBAAS;YACR,UAAU,CAAC,KAAK,CAAC,CAAC;SACnB;IACH,CAAC,CAAA,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,OAAO,EAAE,QAAQ;QACjB,OAAO;QACP,KAAK;QACL,QAAQ;QACR,UAAU;KACX,CAAC;AACJ,CAAC;AAxBD,kCAwBC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import "./shims/ObjectWatchShim.js";
|
|
2
|
-
export default function useObserve<T extends any>(
|
|
2
|
+
export default function useObserve<T extends any>(toObserve: T | T[], keysToObserve: (keyof T)[]): void;
|
package/dist/hooks/useObserve.js
CHANGED
|
@@ -2,15 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const react_1 = require("react");
|
|
4
4
|
require("./shims/ObjectWatchShim.js");
|
|
5
|
-
function useObserve(
|
|
5
|
+
function useObserve(toObserve, keysToObserve) {
|
|
6
6
|
const [_, ss] = (0, react_1.useState)(0);
|
|
7
7
|
(0, react_1.useLayoutEffect)(() => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
const arr = Array.isArray(toObserve) ? toObserve : [toObserve];
|
|
9
|
+
for (let object of arr)
|
|
10
|
+
return object.watch(keysToObserve, () => {
|
|
11
|
+
ss((p) => {
|
|
12
|
+
return p + 1;
|
|
13
|
+
});
|
|
11
14
|
});
|
|
12
|
-
|
|
13
|
-
}, [object]);
|
|
15
|
+
}, [toObserve]);
|
|
14
16
|
}
|
|
15
17
|
exports.default = useObserve;
|
|
16
18
|
//# sourceMappingURL=useObserve.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useObserve.js","sourceRoot":"","sources":["../../src/hooks/useObserve.ts"],"names":[],"mappings":";;AAAA,iCAA6D;AAC7D,sCAAoC;AAOpC,SAAwB,UAAU,CAChC,
|
|
1
|
+
{"version":3,"file":"useObserve.js","sourceRoot":"","sources":["../../src/hooks/useObserve.ts"],"names":[],"mappings":";;AAAA,iCAA6D;AAC7D,sCAAoC;AAOpC,SAAwB,UAAU,CAChC,SAAkB,EAClB,aAA0B;IAE1B,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,IAAA,gBAAQ,EAAC,CAAC,CAAC,CAAC;IAC5B,IAAA,uBAAe,EAAC,GAAG,EAAE;QACnB,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;QAC9D,KAAK,IAAI,MAAM,IAAI,GAAG;YACpB,OAAQ,MAAiB,CAAC,KAAK,CAAC,aAAoB,EAAE,GAAG,EAAE;gBACzD,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE;oBACP,OAAO,CAAC,GAAG,CAAC,CAAA;gBACd,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;IACP,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;AAClB,CAAC;AAdD,6BAcC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onepercentio/one-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "A set of reusable components created through the development of Onepercent projects",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"@babel/core": "^7.16.0",
|
|
19
19
|
"@cypress/react": "^5.12.5",
|
|
20
20
|
"@firebase/rules-unit-testing": "^2.0.2",
|
|
21
|
+
"@muritavo/cypress-toolkit": "^0.0.3",
|
|
21
22
|
"@muritavo/webpack-microfrontend-scripts": "^0.0.16",
|
|
22
23
|
"@storybook/addon-actions": "^6.4.18",
|
|
23
24
|
"@storybook/addon-essentials": "^6.4.18",
|
|
@@ -39,7 +40,7 @@
|
|
|
39
40
|
"cpy-cli": "^3.1.1",
|
|
40
41
|
"crypto-browserify": "^3.12.0",
|
|
41
42
|
"css-loader": "^5",
|
|
42
|
-
"cypress": "^
|
|
43
|
+
"cypress": "^10.2.0",
|
|
43
44
|
"firebase": "^9.8.1",
|
|
44
45
|
"firebase-admin": "^10.2.0",
|
|
45
46
|
"https-browserify": "^1.0.0",
|
|
@@ -88,11 +89,24 @@
|
|
|
88
89
|
"postbuild": "cd ..",
|
|
89
90
|
"dev": "tsc --watch",
|
|
90
91
|
"test:watch": "jest --watchAll --coverage",
|
|
91
|
-
"deploy:storybook": "yarn build-storybook
|
|
92
|
+
"deploy:storybook": "yarn build-storybook && firebase deploy --only hosting",
|
|
93
|
+
"test:e2e:watch": "cypress open --component",
|
|
92
94
|
"prepublish": "yarn build"
|
|
93
95
|
},
|
|
96
|
+
"browserslist": {
|
|
97
|
+
"production": [
|
|
98
|
+
">0.2%",
|
|
99
|
+
"not dead",
|
|
100
|
+
"not op_mini all"
|
|
101
|
+
],
|
|
102
|
+
"development": [
|
|
103
|
+
"last 1 chrome version",
|
|
104
|
+
"last 1 firefox version",
|
|
105
|
+
"last 1 safari version"
|
|
106
|
+
]
|
|
107
|
+
},
|
|
94
108
|
"peerDependencies": {
|
|
95
109
|
"chroma-js": "^2.4.2",
|
|
96
110
|
"use-wallet": "0.13.5"
|
|
97
111
|
}
|
|
98
|
-
}
|
|
112
|
+
}
|