@forge/react 10.1.1-next.1 → 10.1.1

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.
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=index.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/__test__/index.test.tsx"],"names":[],"mappings":""}
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const index_1 = require("../index");
6
- const index_2 = require("../../index");
7
- const reconcilerTestRenderer_1 = tslib_1.__importDefault(require("../../../__test__/reconcilerTestRenderer"));
8
- const testUtils_1 = require("../../../__test__/testUtils");
9
- describe('UI Kit Modal fix', () => {
10
- let bridgeCalls = [];
11
- beforeAll(async () => {
12
- bridgeCalls = (0, testUtils_1.setupBridge)();
13
- });
14
- it("Modal renders itself first before rendering it's children", async () => {
15
- const Test = () => {
16
- return ((0, jsx_runtime_1.jsx)(index_1.Modal, { children: (0, jsx_runtime_1.jsx)(index_2.Text, { children: "hello world" }) }));
17
- };
18
- await reconcilerTestRenderer_1.default.create((0, jsx_runtime_1.jsx)(Test, {}));
19
- const forgeDoc = (0, testUtils_1.getLastBridgeCallForgeDoc)(bridgeCalls);
20
- expect(forgeDoc).not.toHaveProperty('children[0].children[0].type', 'Text');
21
- await new Promise((r) => setTimeout(r));
22
- expect(forgeDoc).toHaveProperty('children[0].children[0].type', 'Text');
23
- });
24
- });
@@ -1,4 +0,0 @@
1
- import { FC } from 'react';
2
- import { ModalProps } from '@atlaskit/forge-react-types';
3
- export declare const Modal: FC<ModalProps>;
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/modal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,EAAE,EAAa,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAqBzD,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAUhC,CAAC"}
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Modal = void 0;
4
- const tslib_1 = require("tslib");
5
- const jsx_runtime_1 = require("react/jsx-runtime");
6
- const react_1 = require("react");
7
- const ModalInner = 'Modal';
8
- const Modal = (_a) => {
9
- var { children } = _a, rest = tslib_1.__rest(_a, ["children"]);
10
- const [modalChildren, setModalChildren] = (0, react_1.useState)(null);
11
- (0, react_1.useEffect)(() => {
12
- setTimeout(() => {
13
- setModalChildren(children);
14
- });
15
- }, []);
16
- return (0, jsx_runtime_1.jsx)(ModalInner, Object.assign({}, rest, { children: modalChildren }));
17
- };
18
- exports.Modal = Modal;