profinansy-ui-lib 3.3.64 → 3.3.66
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.
|
@@ -9,6 +9,7 @@ export declare const Content: import("styled-components").StyledComponent<"div",
|
|
|
9
9
|
open: boolean;
|
|
10
10
|
showCloseButton: boolean;
|
|
11
11
|
isOverflowAuto: boolean;
|
|
12
|
+
maxWidth: string;
|
|
12
13
|
}, never>;
|
|
13
14
|
export declare const ContentInside: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
14
15
|
isOverflowAuto: boolean;
|
|
@@ -41,4 +41,6 @@ export interface IModal {
|
|
|
41
41
|
/** Можете использовать это свойство, если нужна модалка, которая не ограничивает контент внутри. Нужно, если, например, у вас используются различные
|
|
42
42
|
* выпадашки внутри */
|
|
43
43
|
isOverflowAuto?: boolean;
|
|
44
|
+
/** Максимальная ширина модалки на десктопе */
|
|
45
|
+
maxWidth?: string;
|
|
44
46
|
}
|
package/dist/index.js
CHANGED
|
@@ -6616,7 +6616,8 @@
|
|
|
6616
6616
|
margin: 20px ${e=>e.showCloseButton?"50px":"24px"};
|
|
6617
6617
|
max-height: ${e=>e.isOverflowAuto?"auto":"calc(100dvh - 30px)"};
|
|
6618
6618
|
min-width: 300px;
|
|
6619
|
-
max-width: 100vw;
|
|
6619
|
+
max-width: ${e=>e.maxWidth||"100vw"};
|
|
6620
|
+
width: ${e=>e.maxWidth?"100%":"auto"};
|
|
6620
6621
|
animation: ${e=>{return o.css`
|
|
6621
6622
|
${t=e.open,o.keyframes`
|
|
6622
6623
|
from {
|
|
@@ -6721,7 +6722,7 @@
|
|
|
6721
6722
|
right: 0;
|
|
6722
6723
|
top: -48px;
|
|
6723
6724
|
}
|
|
6724
|
-
`},1673:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Modal=void 0;const l=i(n(8156)),u=i(n(8105)),s=n(7033),c=n(3848),d=o(n(4230)),f=o(n(4184)),m=n(1608),h=n(1197),p=n(1899);t.Modal=e=>{const{animation:t,showModal:n,content:r,handleClose:a}=(0,s.useTransitionModal)({isOpen:e.open,children:e.children,onClose:e.onClose});return n?l.default.createElement(g,Object.assign({},e,{onClose:a,animation:t}),r):null};const g=({onClose:e,children:t,title:n,subtitle:r,showCloseButton:a=!0,styleContent:i,styleContentInside:o,classNameWrapper:g,styleBackground:v,styleWrapper:b,classNameBackground:y,classNameContent:w,classNameHeader:x,animation:M,disableClosing:k=!1,titlePosition:_="left",isOverflowAuto:P=!1,rightContent:O,bottomContent:E,adaptiveRightContent:j,containerId:
|
|
6725
|
+
`},1673:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Modal=void 0;const l=i(n(8156)),u=i(n(8105)),s=n(7033),c=n(3848),d=o(n(4230)),f=o(n(4184)),m=n(1608),h=n(1197),p=n(1899);t.Modal=e=>{const{animation:t,showModal:n,content:r,handleClose:a}=(0,s.useTransitionModal)({isOpen:e.open,children:e.children,onClose:e.onClose});return n?l.default.createElement(g,Object.assign({},e,{onClose:a,animation:t}),r):null};const g=({onClose:e,children:t,title:n,subtitle:r,showCloseButton:a=!0,styleContent:i,styleContentInside:o,classNameWrapper:g,styleBackground:v,styleWrapper:b,classNameBackground:y,classNameContent:w,classNameHeader:x,animation:M,disableClosing:k=!1,titlePosition:_="left",isOverflowAuto:P=!1,rightContent:O,bottomContent:E,adaptiveRightContent:j,maxWidth:S,containerId:C="react-modals"})=>{const[T,D]=(0,l.useState)(0),Z=(0,l.useRef)(null),W=()=>{k||I()};(0,l.useEffect)((()=>{if(Z.current){const{height:e}=Z.current.getBoundingClientRect();D(e)}else D(0)}),[null==Z?void 0:Z.current]);const I=()=>{e&&e()};(0,s.useControlsForModal)(W);const{mode:B}=(0,h.useMode)();return l.default.createElement(c.Portal,{id:C},l.default.createElement(m.ThemeProvider,{theme:p.palette[B]},l.default.createElement(u.Wrapper,{className:(0,f.default)(g,"modal-wrapper"),open:M,style:b,isOverflowAuto:P},l.default.createElement(u.Layout,{className:y,onClick:W,style:v}),l.default.createElement(u.ContentWrapper,null,l.default.createElement(u.Content,{isOverflowAuto:P,maxWidth:S,open:M,showCloseButton:a,className:(0,f.default)(w,"modal-content"),style:i},a&&l.default.createElement(u.CloseButton,{onClick:e},l.default.createElement(d.default,{className:"modal-closeBtn"})),l.default.createElement(u.ContentInside,{bottomHeight:T,isOverflowAuto:P,style:o,className:"modal-contentInside"},!!n&&l.default.createElement(u.Header,{className:(0,f.default)(x,"modal-header")},l.default.createElement(u.FirstLineHeader,{adaptiveRightContent:j},l.default.createElement(u.Title,{titlePosition:_,tag:"h5",variant:"header5-Bold"},n),O||null),!!r&&l.default.createElement(u.Subtitle,{tag:"span",variant:"text-Regular"},r)),t),E&&l.default.createElement(u.BottomContent,{ref:Z},E))))))}},6298:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Modal=void 0;var r=n(1673);Object.defineProperty(t,"Modal",{enumerable:!0,get:function(){return r.Modal}})},1417:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CloseButton=t.Title=t.Header=t.Content=t.Layout=t.Wrapper=void 0;const a=r(n(1608)),i=n(6401),o=a.default.div`
|
|
6725
6726
|
position: fixed;
|
|
6726
6727
|
top: 0;
|
|
6727
6728
|
bottom: 0;
|