infinity-forge 4.3.7 → 4.3.9
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/dist/ui/components/index.d.ts +1 -1
- package/dist/ui/components/modal/component.d.ts +3 -0
- package/dist/ui/components/modal/component.js +76 -0
- package/dist/ui/components/modal/component.js.map +1 -0
- package/dist/ui/components/modal/index.d.ts +2 -3
- package/dist/ui/components/modal/index.js +4 -61
- package/dist/ui/components/modal/index.js.map +1 -1
- package/dist/ui/components/video/component.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.Modal = void 0;
|
|
41
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
42
|
+
var react_1 = require("react");
|
|
43
|
+
var react_dom_1 = __importDefault(require("react-dom"));
|
|
44
|
+
var ui_1 = require("../../../ui/index.js");
|
|
45
|
+
var S = __importStar(require("./styles.js"));
|
|
46
|
+
exports.Modal = (0, react_1.forwardRef)(function (_a, _) {
|
|
47
|
+
var open = _a.open, styles = _a.styles, stylesContent = _a.stylesContent, onClose = _a.onClose, actions = _a.actions, children = _a.children, hideCloseButton = _a.hideCloseButton, _b = _a.closePortalOnCloseModal, closePortalOnCloseModal = _b === void 0 ? true : _b;
|
|
48
|
+
var _c = (0, react_1.useState)(false), showPortal = _c[0], setShowPortal = _c[1];
|
|
49
|
+
var refContainer = (0, react_1.useRef)(null);
|
|
50
|
+
(0, ui_1.disableScroll)(open);
|
|
51
|
+
(0, react_1.useEffect)(function () {
|
|
52
|
+
if (open && !showPortal) {
|
|
53
|
+
setShowPortal(true);
|
|
54
|
+
if (refContainer.current && !document.body.contains(refContainer.current)) {
|
|
55
|
+
document.body.appendChild(refContainer.current);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (!open && showPortal) {
|
|
59
|
+
setShowPortal(false);
|
|
60
|
+
if (refContainer.current && document.body.contains(refContainer.current)) {
|
|
61
|
+
document.body.removeChild(refContainer.current);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}, [open]);
|
|
65
|
+
function closeModal() {
|
|
66
|
+
closePortalOnCloseModal && setShowPortal(false);
|
|
67
|
+
onClose(setShowPortal);
|
|
68
|
+
}
|
|
69
|
+
if (refContainer.current === null && process.browser) {
|
|
70
|
+
refContainer.current = document.createElement('div');
|
|
71
|
+
refContainer.current.classList.add('infinity_forge_modal');
|
|
72
|
+
refContainer.current.style.zIndex = String(ui_1.zIndexInfinityForge.modal);
|
|
73
|
+
}
|
|
74
|
+
return showPortal && refContainer.current ? (react_dom_1.default.createPortal((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'Modal', children: (0, jsx_runtime_1.jsxs)(S.Modal, { children: [(0, jsx_runtime_1.jsx)("div", { className: 'overlay', onClick: closeModal, style: { zIndex: ui_1.zIndexInfinityForge.modal } }), (0, jsx_runtime_1.jsxs)("div", { className: 'modal_content', style: __assign(__assign({}, styles), { zIndex: ui_1.zIndexInfinityForge.modal }), children: [!hideCloseButton && ((0, jsx_runtime_1.jsx)("button", { type: 'button', onClick: closeModal, className: 'close_modal_infinity_forge', children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: 'IconClose', color: '#000' }) })), (0, jsx_runtime_1.jsxs)("div", { className: 'content_modal_infinity_forge', style: stylesContent, children: [children, actions && (0, jsx_runtime_1.jsx)("div", { className: 'actions_modal_infinity_forge', children: actions })] })] })] }) }), refContainer.current)) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}));
|
|
75
|
+
});
|
|
76
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/ui/components/modal/component.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA6E;AAE7E,wDAAgC;AAEhC,2BAAsE;AAItE,0C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declare const Modal: import("react").ForwardRefExoticComponent<ModalProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
1
|
+
export * from './component.js';
|
|
2
|
+
export * from './interfaces.js';
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
3
|
if (k2 === undefined) k2 = k;
|
|
15
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -21,56 +10,10 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
21
10
|
if (k2 === undefined) k2 = k;
|
|
22
11
|
o[k2] = m[k];
|
|
23
12
|
}));
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
38
15
|
};
|
|
39
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
var react_1 = require("react");
|
|
43
|
-
var react_dom_1 = __importDefault(require("react-dom"));
|
|
44
|
-
var ui_1 = require("../../../ui/index.js");
|
|
45
|
-
var S = __importStar(require("./styles.js"));
|
|
46
|
-
exports.Modal = (0, react_1.forwardRef)(function (_a, _) {
|
|
47
|
-
var open = _a.open, styles = _a.styles, stylesContent = _a.stylesContent, onClose = _a.onClose, actions = _a.actions, children = _a.children, hideCloseButton = _a.hideCloseButton, _b = _a.closePortalOnCloseModal, closePortalOnCloseModal = _b === void 0 ? true : _b;
|
|
48
|
-
var _c = (0, react_1.useState)(false), showPortal = _c[0], setShowPortal = _c[1];
|
|
49
|
-
var refContainer = (0, react_1.useRef)(null);
|
|
50
|
-
(0, ui_1.disableScroll)(open);
|
|
51
|
-
(0, react_1.useEffect)(function () {
|
|
52
|
-
if (open && !showPortal) {
|
|
53
|
-
setShowPortal(true);
|
|
54
|
-
if (refContainer.current && !document.body.contains(refContainer.current)) {
|
|
55
|
-
document.body.appendChild(refContainer.current);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
if (!open && showPortal) {
|
|
59
|
-
setShowPortal(false);
|
|
60
|
-
if (refContainer.current && document.body.contains(refContainer.current)) {
|
|
61
|
-
document.body.removeChild(refContainer.current);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}, [open]);
|
|
65
|
-
function closeModal() {
|
|
66
|
-
closePortalOnCloseModal && setShowPortal(false);
|
|
67
|
-
onClose(setShowPortal);
|
|
68
|
-
}
|
|
69
|
-
if (refContainer.current === null && process.browser) {
|
|
70
|
-
refContainer.current = document.createElement('div');
|
|
71
|
-
refContainer.current.classList.add('infinity_forge_modal');
|
|
72
|
-
refContainer.current.style.zIndex = String(ui_1.zIndexInfinityForge.modal);
|
|
73
|
-
}
|
|
74
|
-
return showPortal && refContainer.current ? (react_dom_1.default.createPortal((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'Modal', children: (0, jsx_runtime_1.jsxs)(S.Modal, { children: [(0, jsx_runtime_1.jsx)("div", { className: 'overlay', onClick: closeModal, style: { zIndex: ui_1.zIndexInfinityForge.modal } }), (0, jsx_runtime_1.jsxs)("div", { className: 'modal_content', style: __assign(__assign({}, styles), { zIndex: ui_1.zIndexInfinityForge.modal }), children: [!hideCloseButton && ((0, jsx_runtime_1.jsx)("button", { type: 'button', onClick: closeModal, className: 'close_modal_infinity_forge', children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: 'IconClose', color: '#000' }) })), (0, jsx_runtime_1.jsxs)("div", { className: 'content_modal_infinity_forge', style: stylesContent, children: [children, actions && (0, jsx_runtime_1.jsx)("div", { className: 'actions_modal_infinity_forge', children: actions })] })] })] }) }), refContainer.current)) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}));
|
|
75
|
-
});
|
|
17
|
+
__exportStar(require("./component.js"), exports);
|
|
18
|
+
__exportStar(require("./interfaces.js"), exports);
|
|
76
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/components/modal/index.
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/components/modal/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,+CAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/ui/components/video/component.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/ui/components/video/component.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAA0C;AAG1C,SAAgB,WAAW,CAAC,EAA0C;QAAxC,IAAI,UAAA,EAAE,cAAc,oBAAA;IAChD,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,aAAa;YAChB,OAAO,uBAAC,wBAAU,eAAK,cAAc,EAAI,CAAA;QAE3C,OAAO,CAAC,CAAC,OAAO,0FAA0C,CAAA;IAC5D,CAAC;AACH,CAAC;AAPD,kCAOC"}
|