@alfalab/core-components-backdrop
Advanced tools
Comparing version 3.2.0 to 3.3.0
@@ -10,2 +10,4 @@ /// <reference types="react-transition-group" /> | ||
* Прозрачный бэкдроп | ||
* @deprecated данное свойство больше не используется, временно оставлено для обратной совместимости | ||
* Используйте свойство transparent | ||
*/ | ||
@@ -39,4 +41,9 @@ invisible?: boolean; | ||
children?: ReactNode; | ||
/** | ||
* Управляет прозрачностью бэкдроп | ||
* @default false | ||
*/ | ||
transparent?: boolean; | ||
}; | ||
declare const Backdrop: React.FC<BackdropProps>; | ||
export { BackdropProps, Backdrop }; |
@@ -15,12 +15,15 @@ 'use strict'; | ||
var styles = {"backdrop":"backdrop__backdrop_1g1qr","appear":"backdrop__appear_1g1qr","enter":"backdrop__enter_1g1qr","appearActive":"backdrop__appearActive_1g1qr","enterActive":"backdrop__enterActive_1g1qr","appearDone":"backdrop__appearDone_1g1qr","enterDone":"backdrop__enterDone_1g1qr","exit":"backdrop__exit_1g1qr","exitActive":"backdrop__exitActive_1g1qr","exitDone":"backdrop__exitDone_1g1qr"}; | ||
var styles = {"backdrop":"backdrop__backdrop_17s4d","appear":"backdrop__appear_17s4d","enter":"backdrop__enter_17s4d","appearActive":"backdrop__appearActive_17s4d","enterActive":"backdrop__enterActive_17s4d","appearDone":"backdrop__appearDone_17s4d","enterDone":"backdrop__enterDone_17s4d","exit":"backdrop__exit_17s4d","exitActive":"backdrop__exitActive_17s4d","exitDone":"backdrop__exitDone_17s4d","transparent":"backdrop__transparent_17s4d"}; | ||
require('./index.css') | ||
var Backdrop = function (_a) { | ||
var className = _a.className, _b = _a.open, open = _b === void 0 ? false : _b, _c = _a.invisible, invisible = _c === void 0 ? false : _c, _d = _a.timeout, timeout = _d === void 0 ? 200 : _d, children = _a.children, onClose = _a.onClose, dataTestId = _a.dataTestId, _e = _a.transitionClassNames, transitionClassNames = _e === void 0 ? styles : _e, restProps = tslib.__rest(_a, ["className", "open", "invisible", "timeout", "children", "onClose", "dataTestId", "transitionClassNames"]); | ||
var _b; | ||
var className = _a.className, _c = _a.open, open = _c === void 0 ? false : _c, _d = _a.invisible, invisible = _d === void 0 ? false : _d, _e = _a.timeout, timeout = _e === void 0 ? 200 : _e, children = _a.children, onClose = _a.onClose, dataTestId = _a.dataTestId, _f = _a.transitionClassNames, transitionClassNames = _f === void 0 ? styles : _f, _g = _a.transparent, transparent = _g === void 0 ? false : _g, restProps = tslib.__rest(_a, ["className", "open", "invisible", "timeout", "children", "onClose", "dataTestId", "transitionClassNames", "transparent"]); | ||
var nodeRef = React.useRef(null); | ||
return (React__default.default.createElement(reactTransitionGroup.CSSTransition, tslib.__assign({ timeout: timeout, unmountOnExit: true, classNames: transitionClassNames, in: !invisible && open, appear: true }, restProps, { nodeRef: nodeRef }), | ||
React__default.default.createElement("div", { ref: nodeRef, "aria-hidden": true, onClick: onClose, "data-test-id": dataTestId, className: cn__default.default(styles.backdrop, className) }, children))); | ||
React__default.default.createElement("div", { ref: nodeRef, "aria-hidden": true, onClick: onClose, "data-test-id": dataTestId, className: cn__default.default(styles.backdrop, className, (_b = {}, | ||
_b[styles.transparent] = transparent, | ||
_b)) }, children))); | ||
}; | ||
exports.Backdrop = Backdrop; |
@@ -10,2 +10,4 @@ /// <reference types="react-transition-group" /> | ||
* Прозрачный бэкдроп | ||
* @deprecated данное свойство больше не используется, временно оставлено для обратной совместимости | ||
* Используйте свойство transparent | ||
*/ | ||
@@ -39,4 +41,9 @@ invisible?: boolean; | ||
children?: ReactNode; | ||
/** | ||
* Управляет прозрачностью бэкдроп | ||
* @default false | ||
*/ | ||
transparent?: boolean; | ||
}; | ||
declare const Backdrop: React.FC<BackdropProps>; | ||
export { BackdropProps, Backdrop }; |
@@ -18,8 +18,11 @@ 'use strict'; | ||
var Backdrop = function (_a) { | ||
var className = _a.className, _b = _a.open, open = _b === void 0 ? false : _b, _c = _a.invisible, invisible = _c === void 0 ? false : _c, _d = _a.timeout, timeout = _d === void 0 ? 200 : _d, children = _a.children, onClose = _a.onClose, dataTestId = _a.dataTestId, _e = _a.transitionClassNames, transitionClassNames = _e === void 0 ? styles__default.default : _e, restProps = tslib.__rest(_a, ["className", "open", "invisible", "timeout", "children", "onClose", "dataTestId", "transitionClassNames"]); | ||
var _b; | ||
var className = _a.className, _c = _a.open, open = _c === void 0 ? false : _c, _d = _a.invisible, invisible = _d === void 0 ? false : _d, _e = _a.timeout, timeout = _e === void 0 ? 200 : _e, children = _a.children, onClose = _a.onClose, dataTestId = _a.dataTestId, _f = _a.transitionClassNames, transitionClassNames = _f === void 0 ? styles__default.default : _f, _g = _a.transparent, transparent = _g === void 0 ? false : _g, restProps = tslib.__rest(_a, ["className", "open", "invisible", "timeout", "children", "onClose", "dataTestId", "transitionClassNames", "transparent"]); | ||
var nodeRef = React.useRef(null); | ||
return (React__default.default.createElement(reactTransitionGroup.CSSTransition, tslib.__assign({ timeout: timeout, unmountOnExit: true, classNames: transitionClassNames, in: !invisible && open, appear: true }, restProps, { nodeRef: nodeRef }), | ||
React__default.default.createElement("div", { ref: nodeRef, "aria-hidden": true, onClick: onClose, "data-test-id": dataTestId, className: cn__default.default(styles__default.default.backdrop, className) }, children))); | ||
React__default.default.createElement("div", { ref: nodeRef, "aria-hidden": true, onClick: onClose, "data-test-id": dataTestId, className: cn__default.default(styles__default.default.backdrop, className, (_b = {}, | ||
_b[styles__default.default.transparent] = transparent, | ||
_b)) }, children))); | ||
}; | ||
exports.Backdrop = Backdrop; |
@@ -6,7 +6,2 @@ 'use strict'; | ||
var Component = require('./Component.js'); | ||
require('tslib'); | ||
require('react'); | ||
require('react-transition-group'); | ||
require('classnames'); | ||
require('./index.module.css'); | ||
@@ -13,0 +8,0 @@ |
@@ -10,2 +10,4 @@ /// <reference types="react-transition-group" /> | ||
* Прозрачный бэкдроп | ||
* @deprecated данное свойство больше не используется, временно оставлено для обратной совместимости | ||
* Используйте свойство transparent | ||
*/ | ||
@@ -39,4 +41,9 @@ invisible?: boolean; | ||
children?: ReactNode; | ||
/** | ||
* Управляет прозрачностью бэкдроп | ||
* @default false | ||
*/ | ||
transparent?: boolean; | ||
}; | ||
declare const Backdrop: React.FC<BackdropProps>; | ||
export { BackdropProps, Backdrop }; |
@@ -6,12 +6,15 @@ import { __rest, __assign } from 'tslib'; | ||
var styles = {"backdrop":"backdrop__backdrop_1g1qr","appear":"backdrop__appear_1g1qr","enter":"backdrop__enter_1g1qr","appearActive":"backdrop__appearActive_1g1qr","enterActive":"backdrop__enterActive_1g1qr","appearDone":"backdrop__appearDone_1g1qr","enterDone":"backdrop__enterDone_1g1qr","exit":"backdrop__exit_1g1qr","exitActive":"backdrop__exitActive_1g1qr","exitDone":"backdrop__exitDone_1g1qr"}; | ||
var styles = {"backdrop":"backdrop__backdrop_17s4d","appear":"backdrop__appear_17s4d","enter":"backdrop__enter_17s4d","appearActive":"backdrop__appearActive_17s4d","enterActive":"backdrop__enterActive_17s4d","appearDone":"backdrop__appearDone_17s4d","enterDone":"backdrop__enterDone_17s4d","exit":"backdrop__exit_17s4d","exitActive":"backdrop__exitActive_17s4d","exitDone":"backdrop__exitDone_17s4d","transparent":"backdrop__transparent_17s4d"}; | ||
require('./index.css') | ||
var Backdrop = function (_a) { | ||
var className = _a.className, _b = _a.open, open = _b === void 0 ? false : _b, _c = _a.invisible, invisible = _c === void 0 ? false : _c, _d = _a.timeout, timeout = _d === void 0 ? 200 : _d, children = _a.children, onClose = _a.onClose, dataTestId = _a.dataTestId, _e = _a.transitionClassNames, transitionClassNames = _e === void 0 ? styles : _e, restProps = __rest(_a, ["className", "open", "invisible", "timeout", "children", "onClose", "dataTestId", "transitionClassNames"]); | ||
var _b; | ||
var className = _a.className, _c = _a.open, open = _c === void 0 ? false : _c, _d = _a.invisible, invisible = _d === void 0 ? false : _d, _e = _a.timeout, timeout = _e === void 0 ? 200 : _e, children = _a.children, onClose = _a.onClose, dataTestId = _a.dataTestId, _f = _a.transitionClassNames, transitionClassNames = _f === void 0 ? styles : _f, _g = _a.transparent, transparent = _g === void 0 ? false : _g, restProps = __rest(_a, ["className", "open", "invisible", "timeout", "children", "onClose", "dataTestId", "transitionClassNames", "transparent"]); | ||
var nodeRef = useRef(null); | ||
return (React.createElement(CSSTransition, __assign({ timeout: timeout, unmountOnExit: true, classNames: transitionClassNames, in: !invisible && open, appear: true }, restProps, { nodeRef: nodeRef }), | ||
React.createElement("div", { ref: nodeRef, "aria-hidden": true, onClick: onClose, "data-test-id": dataTestId, className: cn(styles.backdrop, className) }, children))); | ||
React.createElement("div", { ref: nodeRef, "aria-hidden": true, onClick: onClose, "data-test-id": dataTestId, className: cn(styles.backdrop, className, (_b = {}, | ||
_b[styles.transparent] = transparent, | ||
_b)) }, children))); | ||
}; | ||
export { Backdrop }; |
export { Backdrop } from './Component.js'; | ||
import 'tslib'; | ||
import 'react'; | ||
import 'react-transition-group'; | ||
import 'classnames'; |
@@ -6,6 +6,2 @@ 'use strict'; | ||
var Component = require('./Component.js'); | ||
require('tslib'); | ||
require('react'); | ||
require('react-transition-group'); | ||
require('classnames'); | ||
@@ -12,0 +8,0 @@ |
@@ -10,2 +10,4 @@ /// <reference types="react-transition-group" /> | ||
* Прозрачный бэкдроп | ||
* @deprecated данное свойство больше не используется, временно оставлено для обратной совместимости | ||
* Используйте свойство transparent | ||
*/ | ||
@@ -39,4 +41,9 @@ invisible?: boolean; | ||
children?: ReactNode; | ||
/** | ||
* Управляет прозрачностью бэкдроп | ||
* @default false | ||
*/ | ||
transparent?: boolean; | ||
}; | ||
declare const Backdrop: React.FC<BackdropProps>; | ||
export { BackdropProps, Backdrop }; |
@@ -5,11 +5,13 @@ import React, { useRef } from 'react'; | ||
const styles = {"backdrop":"backdrop__backdrop_1g1qr","appear":"backdrop__appear_1g1qr","enter":"backdrop__enter_1g1qr","appearActive":"backdrop__appearActive_1g1qr","enterActive":"backdrop__enterActive_1g1qr","appearDone":"backdrop__appearDone_1g1qr","enterDone":"backdrop__enterDone_1g1qr","exit":"backdrop__exit_1g1qr","exitActive":"backdrop__exitActive_1g1qr","exitDone":"backdrop__exitDone_1g1qr"}; | ||
const styles = {"backdrop":"backdrop__backdrop_17s4d","appear":"backdrop__appear_17s4d","enter":"backdrop__enter_17s4d","appearActive":"backdrop__appearActive_17s4d","enterActive":"backdrop__enterActive_17s4d","appearDone":"backdrop__appearDone_17s4d","enterDone":"backdrop__enterDone_17s4d","exit":"backdrop__exit_17s4d","exitActive":"backdrop__exitActive_17s4d","exitDone":"backdrop__exitDone_17s4d","transparent":"backdrop__transparent_17s4d"}; | ||
require('./index.css') | ||
const Backdrop = ({ className, open = false, invisible = false, timeout = 200, children, onClose, dataTestId, transitionClassNames = styles, ...restProps }) => { | ||
const Backdrop = ({ className, open = false, invisible = false, timeout = 200, children, onClose, dataTestId, transitionClassNames = styles, transparent = false, ...restProps }) => { | ||
const nodeRef = useRef(null); | ||
return (React.createElement(CSSTransition, { timeout: timeout, unmountOnExit: true, classNames: transitionClassNames, in: !invisible && open, appear: true, ...restProps, nodeRef: nodeRef }, | ||
React.createElement("div", { ref: nodeRef, "aria-hidden": true, onClick: onClose, "data-test-id": dataTestId, className: cn(styles.backdrop, className) }, children))); | ||
React.createElement("div", { ref: nodeRef, "aria-hidden": true, onClick: onClose, "data-test-id": dataTestId, className: cn(styles.backdrop, className, { | ||
[styles.transparent]: transparent, | ||
}) }, children))); | ||
}; | ||
export { Backdrop }; |
export { Backdrop } from './Component.js'; | ||
import 'react'; | ||
import 'react-transition-group'; | ||
import 'classnames'; |
{ | ||
"name": "@alfalab/core-components-backdrop", | ||
"version": "3.2.0", | ||
"version": "3.3.0", | ||
"description": "Backdrop component", | ||
@@ -23,3 +23,5 @@ "keywords": [], | ||
"react": "^16.9.0 || ^17.0.1 || ^18.0.0" | ||
} | ||
}, | ||
"themesVersion": "13.0.2", | ||
"varsVersion": "9.11.1" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
87950
785