@prom-ui/core 1.3.1 → 1.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/Avatar/cjs/index.development.js +99 -67
- package/Avatar/cjs/index.development.v2.js +99 -67
- package/Avatar/cjs/index.production.js +1 -1
- package/Avatar/cjs/index.production.v2.js +1 -1
- package/Avatar/index.d.ts +14 -14
- package/Avatar/package.json +1 -1
- package/Avatar/utils.d.ts +2 -2
- package/Backdrop/cjs/index.development.js +131 -77
- package/Backdrop/cjs/index.development.v2.js +131 -77
- package/Backdrop/cjs/index.production.js +1 -1
- package/Backdrop/cjs/index.production.v2.js +1 -1
- package/Backdrop/index.d.ts +25 -25
- package/Backdrop/package.json +1 -1
- package/Body/cjs/index.development.js +2 -0
- package/Body/cjs/index.development.v2.js +2 -0
- package/Body/index.d.ts +36 -36
- package/Body/package.json +1 -1
- package/BodyContext/cjs/index.development.js +6 -7
- package/BodyContext/cjs/index.development.v2.js +6 -7
- package/BodyContext/cjs/index.production.js +1 -1
- package/BodyContext/cjs/index.production.v2.js +1 -1
- package/BodyContext/index.d.ts +12 -12
- package/BodyContext/package.json +1 -1
- package/BodyProvider/cjs/index.development.js +7 -6
- package/BodyProvider/cjs/index.development.v2.js +7 -6
- package/BodyProvider/index.d.ts +10 -10
- package/BodyProvider/package.json +1 -1
- package/Box/cjs/index.development.js +4 -4
- package/Box/cjs/index.development.v2.js +4 -4
- package/Box/index.d.ts +106 -106
- package/Box/package.json +1 -1
- package/Button/cjs/index.development.js +67 -62
- package/Button/cjs/index.development.v2.js +67 -62
- package/Button/cjs/index.production.js +1 -1
- package/Button/cjs/index.production.v2.js +1 -1
- package/Button/index.d.ts +45 -45
- package/Button/package.json +1 -1
- package/ButtonPageUp/cjs/index.development.js +195 -85
- package/ButtonPageUp/cjs/index.development.v2.js +195 -85
- package/ButtonPageUp/cjs/index.production.js +1 -1
- package/ButtonPageUp/cjs/index.production.v2.js +1 -1
- package/ButtonPageUp/index.d.ts +18 -18
- package/ButtonPageUp/package.json +1 -1
- package/Checkbox/cjs/index.development.js +99 -67
- package/Checkbox/cjs/index.development.v2.js +99 -67
- package/Checkbox/cjs/index.production.js +1 -1
- package/Checkbox/cjs/index.production.v2.js +1 -1
- package/Checkbox/index.d.ts +8 -8
- package/Checkbox/package.json +1 -1
- package/Flex/index.d.ts +34 -34
- package/Flex/package.json +1 -1
- package/Grid/index.d.ts +46 -46
- package/Grid/package.json +1 -1
- package/Icon/index.d.ts +9 -9
- package/Icon/package.json +1 -1
- package/Image/index.d.ts +42 -42
- package/Image/package.json +1 -1
- package/ImageEmoji/cjs/index.development.js +70 -63
- package/ImageEmoji/cjs/index.development.v2.js +70 -63
- package/ImageEmoji/cjs/index.production.js +1 -1
- package/ImageEmoji/cjs/index.production.v2.js +1 -1
- package/ImageEmoji/index.d.ts +9 -9
- package/ImageEmoji/package.json +1 -1
- package/Input/index.d.ts +18 -18
- package/Input/package.json +1 -1
- package/InputField/addons/AfterClearValue.d.ts +3 -3
- package/InputField/addons/AfterCorrectValue.d.ts +2 -2
- package/InputField/addons/AfterLoading.d.ts +2 -2
- package/InputField/addons/AfterTogglePassword.d.ts +6 -6
- package/InputField/addons/ErrorText.d.ts +6 -6
- package/InputField/cjs/index.development.js +237 -173
- package/InputField/cjs/index.development.v2.js +237 -173
- package/InputField/cjs/index.production.js +1 -1
- package/InputField/cjs/index.production.v2.js +1 -1
- package/InputField/index.d.ts +18 -18
- package/InputField/package.json +1 -1
- package/InputField/utils.d.ts +10 -10
- package/KeyPress/cjs/index.development.js +13 -13
- package/KeyPress/cjs/index.development.v2.js +13 -13
- package/KeyPress/index.d.ts +14 -14
- package/KeyPress/package.json +1 -1
- package/Line/index.d.ts +13 -13
- package/Line/package.json +1 -1
- package/Link/cjs/index.development.js +5 -5
- package/Link/cjs/index.development.v2.js +5 -5
- package/Link/index.d.ts +28 -28
- package/Link/package.json +1 -1
- package/List/index.d.ts +23 -23
- package/List/package.json +1 -1
- package/Media/MediaProvider.d.ts +8 -8
- package/Media/cjs/index.development.js +70 -19
- package/Media/cjs/index.development.v2.js +70 -19
- package/Media/cjs/index.production.js +1 -1
- package/Media/cjs/index.production.v2.js +1 -1
- package/Media/index.d.ts +20 -20
- package/Media/package.json +1 -1
- package/OutsideClick/cjs/index.development.js +117 -61
- package/OutsideClick/cjs/index.development.v2.js +117 -61
- package/OutsideClick/cjs/index.production.js +1 -1
- package/OutsideClick/cjs/index.production.v2.js +1 -1
- package/OutsideClick/index.d.ts +12 -12
- package/OutsideClick/package.json +1 -1
- package/Overlay/cjs/index.development.js +197 -183
- package/Overlay/cjs/index.development.v2.js +197 -183
- package/Overlay/cjs/index.production.js +1 -1
- package/Overlay/cjs/index.production.v2.js +1 -1
- package/Overlay/components/OverlayHeader.d.ts +11 -11
- package/Overlay/components/SwipeClose.d.ts +11 -11
- package/Overlay/components/TouchScrollable.d.ts +8 -8
- package/Overlay/index.d.ts +76 -76
- package/Overlay/package.json +1 -1
- package/Overlay/utils.d.ts +10 -10
- package/Picture/index.d.ts +70 -70
- package/Picture/package.json +1 -1
- package/Portal/cjs/index.development.js +11 -11
- package/Portal/cjs/index.development.v2.js +11 -11
- package/Portal/index.d.ts +10 -10
- package/Portal/package.json +1 -1
- package/QRCode/cjs/index.development.js +11 -11
- package/QRCode/cjs/index.development.v2.js +11 -11
- package/QRCode/index.d.ts +17 -17
- package/QRCode/package.json +1 -1
- package/Rating/cjs/index.development.js +75 -69
- package/Rating/cjs/index.development.v2.js +75 -69
- package/Rating/cjs/index.production.js +1 -1
- package/Rating/cjs/index.production.v2.js +1 -1
- package/Rating/index.d.ts +17 -17
- package/Rating/package.json +1 -1
- package/RatingSelect/cjs/index.development.js +148 -68
- package/RatingSelect/cjs/index.development.v2.js +148 -68
- package/RatingSelect/cjs/index.production.js +1 -1
- package/RatingSelect/cjs/index.production.v2.js +1 -1
- package/RatingSelect/index.d.ts +22 -18
- package/RatingSelect/package.json +1 -1
- package/SafeQuery/cjs/index.development.js +158 -110
- package/SafeQuery/cjs/index.development.v2.js +158 -110
- package/SafeQuery/cjs/index.production.js +1 -1
- package/SafeQuery/cjs/index.production.v2.js +1 -1
- package/SafeQuery/components/Error.d.ts +7 -7
- package/SafeQuery/index.d.ts +10 -10
- package/SafeQuery/package.json +1 -1
- package/Scroll/index.d.ts +25 -25
- package/Scroll/package.json +1 -1
- package/ScrollControls/ScrollControlsButton.d.ts +11 -11
- package/ScrollControls/cjs/index.development.js +201 -113
- package/ScrollControls/cjs/index.development.v2.js +201 -113
- package/ScrollControls/cjs/index.production.js +1 -1
- package/ScrollControls/cjs/index.production.v2.js +1 -1
- package/ScrollControls/index.d.ts +16 -16
- package/ScrollControls/package.json +1 -1
- package/SimpleSlider/cjs/index.development.js +270 -158
- package/SimpleSlider/cjs/index.development.v2.js +270 -158
- package/SimpleSlider/cjs/index.production.js +1 -1
- package/SimpleSlider/cjs/index.production.v2.js +1 -1
- package/SimpleSlider/index.d.ts +41 -41
- package/SimpleSlider/package.json +1 -1
- package/SimpleSlider/useAutoPlay.d.ts +3 -3
- package/SimpleSlider/utils.d.ts +19 -19
- package/Skeleton/cjs/index.development.js +118 -64
- package/Skeleton/cjs/index.development.v2.js +118 -64
- package/Skeleton/cjs/index.production.js +1 -1
- package/Skeleton/cjs/index.production.v2.js +1 -1
- package/Skeleton/index.d.ts +37 -37
- package/Skeleton/package.json +1 -1
- package/Spinner/cjs/index.development.js +66 -61
- package/Spinner/cjs/index.development.v2.js +66 -61
- package/Spinner/cjs/index.production.js +1 -1
- package/Spinner/cjs/index.production.v2.js +1 -1
- package/Spinner/index.d.ts +29 -29
- package/Spinner/package.json +1 -1
- package/Text/index.d.ts +25 -25
- package/Text/package.json +1 -1
- package/TextEmoji/cjs/index.development.js +65 -60
- package/TextEmoji/cjs/index.development.v2.js +65 -60
- package/TextEmoji/cjs/index.production.js +1 -1
- package/TextEmoji/cjs/index.production.v2.js +1 -1
- package/TextEmoji/index.d.ts +9 -9
- package/TextEmoji/package.json +1 -1
- package/Tooltip/cjs/index.development.js +80 -91
- package/Tooltip/cjs/index.development.v2.js +80 -91
- package/Tooltip/cjs/index.production.js +1 -1
- package/Tooltip/cjs/index.production.v2.js +1 -1
- package/Tooltip/index.d.ts +87 -87
- package/Tooltip/package.json +1 -1
- package/Tumbler/cjs/index.development.js +98 -66
- package/Tumbler/cjs/index.development.v2.js +98 -66
- package/Tumbler/cjs/index.production.js +1 -1
- package/Tumbler/cjs/index.production.v2.js +1 -1
- package/Tumbler/index.d.ts +8 -8
- package/Tumbler/package.json +1 -1
- package/package.json +7 -5
- package/useBodyTTag/cjs/index.development.js +1 -1
- package/useBodyTTag/cjs/index.development.v2.js +1 -1
- package/useBodyTTag/index.d.ts +2 -2
- package/useBodyTTag/package.json +1 -1
- package/useDebounce/cjs/index.development.js +58 -6
- package/useDebounce/cjs/index.development.v2.js +58 -6
- package/useDebounce/cjs/index.production.js +1 -1
- package/useDebounce/cjs/index.production.v2.js +1 -1
- package/useDebounce/index.d.ts +4 -4
- package/useDebounce/package.json +1 -1
- package/useId/cjs/index.development.js +6 -7
- package/useId/cjs/index.development.v2.js +6 -7
- package/useId/cjs/index.production.js +1 -1
- package/useId/cjs/index.production.v2.js +1 -1
- package/useId/index.d.ts +4 -4
- package/useId/package.json +1 -1
- package/useIsMounted/cjs/index.development.js +3 -3
- package/useIsMounted/cjs/index.development.v2.js +3 -3
- package/useIsMounted/index.d.ts +4 -4
- package/useIsMounted/package.json +1 -1
- package/useKeyPress/cjs/index.development.js +76 -22
- package/useKeyPress/cjs/index.development.v2.js +76 -22
- package/useKeyPress/cjs/index.production.js +1 -1
- package/useKeyPress/cjs/index.production.v2.js +1 -1
- package/useKeyPress/index.d.ts +6 -6
- package/useKeyPress/package.json +1 -1
- package/useMedia/cjs/index.development.js +5 -5
- package/useMedia/cjs/index.development.v2.js +5 -5
- package/useMedia/index.d.ts +21 -21
- package/useMedia/package.json +1 -1
- package/useOutsideClick/cjs/index.development.js +2 -2
- package/useOutsideClick/cjs/index.development.v2.js +2 -2
- package/useOutsideClick/index.d.ts +5 -5
- package/useOutsideClick/package.json +1 -1
- package/usePortal/cjs/index.development.js +32 -27
- package/usePortal/cjs/index.development.v2.js +32 -27
- package/usePortal/index.d.ts +12 -12
- package/usePortal/package.json +1 -1
- package/useScrollPosition/cjs/index.development.js +2 -2
- package/useScrollPosition/cjs/index.development.v2.js +2 -2
- package/useScrollPosition/index.d.ts +5 -5
- package/useScrollPosition/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("react-scrolllock"),r=require("react-transition-group"),n=require("classnames"),o=require("@prom-ui/core/Backdrop"),i=require("@prom-ui/core/KeyPress"),a=require("@prom-ui/core/Portal"),c=require("@prom-ui/core/Media"),l=require("@prom-ui/core/Button"),s=require("@prom-ui/core/Icon"),u=require("@prom-ui/core/Text"),d=require("@prom-ui/core/useBodyTTag"),p=require("@prom-ui/icons/Close"),m=require("@prom-ui/icons/ArrowBack"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("react-scrolllock"),r=require("react-transition-group"),n=require("classnames"),o=require("@prom-ui/core/Backdrop"),i=require("@prom-ui/core/KeyPress"),a=require("@prom-ui/core/Portal"),c=require("@prom-ui/core/Media"),l=require("@prom-ui/core/Button"),s=require("@prom-ui/core/Icon"),u=require("@prom-ui/core/Text"),d=require("@prom-ui/core/useBodyTTag"),p=require("@prom-ui/icons/Close"),m=require("@prom-ui/icons/ArrowBack"),f=require("react-scrolllock/dist/utils"),v=require("react-easy-swipe");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function E(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var O=E(e),b=h(t),y=h(n),w=h(v);function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},g.apply(this,arguments)}function _(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function x(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var C,P,S={root:"-yvLz",backdrop:"MKZgL",popup:"RJENA",popup_placement_top:"ERdxO",popup_placement_bottom:"MJb6v",popup_placement_right:"nL79b",popup_placement_left:"p-p5e",content:"uHLyZ",header:"ntf6X",header__grid:"-OCio",header__item:"gjOzy",header__title:"-s4aZ gjOzy",header__action:"fzZrE gjOzy",header__actionButton:"CC-hv",header__actionIcon:"LoRyP",footer:"nE-cV",enter:"v7DoD",exit:"E0PkA",enterActive:"RFXzo",exitActive:"a2xd2"},k=function(e){var t=e.isShowPrevButton,r=e.isShowCloseButton,n=e.children,o=e.title,i=e.onClose,a=e.onPrev,c=d.useBodyTTag().t;return O.default.createElement("header",{className:S.header},void 0!==n?n:O.default.createElement("div",{className:S.header__grid},O.default.createElement("div",{className:S.header__action},t&&O.default.createElement(l.Button,{className:S.header__actionButton,"button-theme":"black-inherit",type:"button",onClick:a,"aria-label":c(C||(C=x(["Назад"]))),"data-qaid":"prev"},O.default.createElement(s.Icon,{"icon-as":m.ArrowBack,className:S.header__actionIcon}))),O.default.createElement("div",{className:S.header__title},"string"==typeof o?O.default.createElement(u.Text,{"text-align":"center","text-size":"h4","text-wrap":"ellipsis","text-weight":"bold","data-qaid":"title"},o):o),O.default.createElement("div",{className:S.header__action},r&&i&&O.default.createElement(l.Button,{className:S.header__actionButton,"button-theme":"black-inherit",type:"button",onClick:i,"aria-label":c(P||(P=x(["Закрыть"]))),"data-qaid":"close"},O.default.createElement(s.Icon,{"icon-as":p.Close,className:S.header__actionIcon})))))},j=!("undefined"==typeof window||!window.document||!window.document.createElement)&&!(!window.addEventListener&&!window.attachEvent),q=function(e){var t=e.isActive,r=void 0!==t&&t,n=e.scrollRef,o=e.children;return O.useEffect((function(){if(r&&j&&null!=n&&n.current)return n.current.addEventListener("touchstart",f.preventInertiaScroll,f.listenerOptions),n.current.addEventListener("touchmove",f.allowTouchMove,f.listenerOptions),function(){r&&j&&null!=n&&n.current&&(n.current.removeEventListener("touchstart",f.preventInertiaScroll,f.listenerOptions),n.current.removeEventListener("touchmove",f.allowTouchMove,f.listenerOptions))}})),O.createElement(O.Fragment,null,o)},z=["-webkit","-moz","-ms","-o"],B=["transform","transition"],R=function(e,t){if(e)for(var r in t){var n=-1!==B.indexOf(r);if(t[r]){if(e.style.setProperty(r,t[r]),n)for(var o=0,i=z;o<i.length;o++){var a=i[o];e.style.setProperty("".concat(a,"-").concat(r),t[r])}}else if(e.style.removeProperty(r),n)for(var c=0,l=z;c<l.length;c++){var s=l[c];e.style.removeProperty("".concat(s,"-").concat(r))}}},A=function(e){var t=e.isActive,r=void 0===t||t,n=e.children,o=e.onClose,i=e.placement,a=e.rootRef,c=e.contentRef,l=O.useRef(null),s=O.useRef(!1),u=O.useRef(0);if(!r)return O.createElement(O.Fragment,null,n);return O.createElement(w.default,{onSwipeMove:function(e){var t,r,n,o=e.x,d=e.y,p=(null===(t=c.current)||void 0===t?void 0:t.scrollHeight)||0,m=(null===(r=c.current)||void 0===r?void 0:r.offsetHeight)||0,f=(null===(n=c.current)||void 0===n?void 0:n.scrollTop)||0,v=p-(f+m),h=null,E=!1,O=!1,b=Math.abs(o),y=Math.abs(d);"top"===i?(h="translateY(".concat(d>=0?0:d,"px)"),E=v<=1&&d<=0&&y>b,O=y>70):"bottom"===i?(h="translateY(".concat(d<=0?0:d,"px)"),E=f<=1&&d>=0&&y>b,O=y>70):"left"===i?(h="translateX(".concat(o>=0?0:o,"px)"),E=o<=0&&b>y,O=b>70):"right"===i&&(h="translateX(".concat(o<=0?0:o,"px)"),E=o>=0&&b>y,O=b>70),null===l.current&&(l.current=!!E),l.current&&(u.current||(u.current=(new Date).getTime()),!s.current&&O&&(s.current=!0),R(a.current,{transform:h}),R(c.current,{"pointer-events":"none",overflow:"hidden"}))},onSwipeEnd:function(){if(l.current){R(a.current,{transition:"transform ".concat(225,"ms cubic-bezier(0, 0, 0.2, 1) 0ms"),transform:null}),R(c.current,{"pointer-events":null,overflow:null}),setTimeout((function(){R(a.current,{transition:null})}),225);var e=(new Date).getTime()-u.current;s.current&&e<250&&o&&o({})}u.current=0,l.current=null,s.current=!1}},n)},N=function(e,t,r){return["top","bottom"].includes(e)?{height:t,maxHeight:r}:{width:t,maxWidth:r}},I=["children","onClose","onOpen","onPrev","onOpened","onClosed","isOpen","isShowCloseButton","isShowPrevButton","isCloseOnEscape","isCloseOnSwipe","isCloseOutsideClick","isAnimated","isRenderPortal","isScrollLock","isScrollLockTouch","header","footer","padding","title","placement","size","maxSize","zIndex","contentRef","dataQaId"];exports.Overlay=function(e){var t=e.children,n=e.onClose,l=e.onOpen,s=e.onPrev,u=e.onOpened,d=e.onClosed,p=e.isOpen,m=e.isShowCloseButton,f=void 0===m||m,v=e.isShowPrevButton,h=void 0!==v&&v,E=e.isCloseOnEscape,w=void 0===E||E,x=e.isCloseOnSwipe,C=void 0===x||x,P=e.isCloseOutsideClick,j=void 0===P||P,z=e.isAnimated,B=void 0===z||z,R=e.isRenderPortal,T=void 0===R||R,L=e.isScrollLock,M=void 0===L||L,D=e.isScrollLockTouch,F=void 0===D||D,H=e.header,K=e.footer,X=e.padding,Z=void 0===X?"20px 20px 20px 20px":X,J=e.title,Q=e.placement,W=void 0===Q?"adaptive":Q,Y=e.size,V=void 0===Y?"adaptive":Y,G=e.maxSize,U=void 0===G?"90%":G,$=e.zIndex,ee=void 0===$?5e3:$,te=e.contentRef,re=e.dataQaId,ne=_(e,I),oe=O.useRef(null),ie=te||O.useRef(null),ae=c.useMedia({minWidth:"medium"}),ce=W,le=V;return"adaptive"===V&&(le="top"===W||"bottom"===W?"auto":"adaptive"===W?ae?400:"auto":400),"adaptive"===W&&(ce=ae?"right":"bottom"),O.createElement(O.Fragment,null,O.createElement(o.Backdrop,{isOpen:p,isAnimated:B,zIndex:ee,isRenderPortal:T}),O.createElement(r.CSSTransition,{in:p,timeout:B?225:0,classNames:S,unmountOnExit:!0,onEnter:l,onEntered:u,onExited:d},O.createElement(a.Portal,{isActive:T},O.createElement(A,{isActive:M&&C,rootRef:oe,contentRef:ie,placement:ce,onClose:n},O.createElement("div",g({className:S.root,role:"presentation",style:{zIndex:ee}},ne),O.createElement(b.default,{isActive:M}),O.createElement(i.KeyPress,{isActive:w,code:"Escape",onKeyDown:n}),O.createElement("div",{className:S.backdrop,"aria-hidden":!0,onClick:function(e){j&&n&&n(e)}}),O.createElement("div",{ref:oe,className:y.default(S.popup,S["popup_placement_".concat(ce)]),"aria-modal":!0,role:"dialog",style:N(ce,le,U),"data-qaid":re},O.createElement(k,{isShowCloseButton:f,isShowPrevButton:h,onClose:n,onPrev:s,title:J},H),O.createElement("footer",{className:S.footer},K),O.createElement(q,{isActive:F,scrollRef:ie},O.createElement("div",{className:S.content,ref:ie,style:{padding:Z}},t))))))))},require("./style.production.v2.css");
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
type OverlayHeaderProps = {
|
|
3
|
-
isShowPrevButton?: boolean;
|
|
4
|
-
isShowCloseButton?: boolean;
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
title?: React.ReactNode;
|
|
7
|
-
onClose?: (e: any) => void;
|
|
8
|
-
onPrev?: (e: any) => void;
|
|
9
|
-
};
|
|
10
|
-
export declare const OverlayHeader: React.FC<OverlayHeaderProps>;
|
|
11
|
-
export {};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type OverlayHeaderProps = {
|
|
3
|
+
isShowPrevButton?: boolean;
|
|
4
|
+
isShowCloseButton?: boolean;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
title?: React.ReactNode;
|
|
7
|
+
onClose?: (e: any) => void;
|
|
8
|
+
onPrev?: (e: any) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare const OverlayHeader: React.FC<OverlayHeaderProps>;
|
|
11
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
type SwipeCloseProps = {
|
|
3
|
-
isActive?: boolean;
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
rootRef: React.RefObject<HTMLDivElement>;
|
|
6
|
-
contentRef: React.RefObject<HTMLDivElement>;
|
|
7
|
-
onClose: (e: any) => void;
|
|
8
|
-
placement: 'adaptive' | 'top' | 'right' | 'bottom' | 'left';
|
|
9
|
-
};
|
|
10
|
-
export declare const SwipeClose: React.FC<SwipeCloseProps>;
|
|
11
|
-
export {};
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type SwipeCloseProps = {
|
|
3
|
+
isActive?: boolean;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
rootRef: React.RefObject<HTMLDivElement>;
|
|
6
|
+
contentRef: React.RefObject<HTMLDivElement>;
|
|
7
|
+
onClose: (e: any) => void;
|
|
8
|
+
placement: 'adaptive' | 'top' | 'right' | 'bottom' | 'left';
|
|
9
|
+
};
|
|
10
|
+
export declare const SwipeClose: React.FC<SwipeCloseProps>;
|
|
11
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
type TouchScrollableProps = {
|
|
3
|
-
isActive?: boolean;
|
|
4
|
-
scrollRef: React.RefObject<HTMLDivElement>;
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
};
|
|
7
|
-
export declare const TouchScrollable: React.FC<TouchScrollableProps>;
|
|
8
|
-
export {};
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type TouchScrollableProps = {
|
|
3
|
+
isActive?: boolean;
|
|
4
|
+
scrollRef: React.RefObject<HTMLDivElement>;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export declare const TouchScrollable: React.FC<TouchScrollableProps>;
|
|
8
|
+
export {};
|
package/Overlay/index.d.ts
CHANGED
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export type OverlayProps = React.ComponentProps<'div'> & {
|
|
3
|
-
/**
|
|
4
|
-
* Расположение
|
|
5
|
-
* <br>
|
|
6
|
-
* - `adaptive` = `isMinWidthMedium ? 'right' : 'bottom'`
|
|
7
|
-
* */
|
|
8
|
-
placement?: 'adaptive' | 'top' | 'right' | 'bottom' | 'left';
|
|
9
|
-
/**
|
|
10
|
-
* Ширина или высота взависимости от **placement**
|
|
11
|
-
* <br>
|
|
12
|
-
* - `auto` размер по контенту
|
|
13
|
-
* <br>
|
|
14
|
-
* - `adaptive` размер относительно свойства **placement**:
|
|
15
|
-
* <br>
|
|
16
|
-
* **top | bottom** = `auto`
|
|
17
|
-
* <br>
|
|
18
|
-
* **left | right** = `400`
|
|
19
|
-
* <br>
|
|
20
|
-
* **adaptive** = `isMinWidthMedium ? 400 : 'auto'`
|
|
21
|
-
* */
|
|
22
|
-
size?: string | number;
|
|
23
|
-
/** Максимальная ширина или высота взависимости от **placement** */
|
|
24
|
-
maxSize?: string | number;
|
|
25
|
-
/** Состояние, открыто или нет */
|
|
26
|
-
isOpen: boolean;
|
|
27
|
-
/** Заголовок */
|
|
28
|
-
title?: React.ReactNode;
|
|
29
|
-
/** Отображение кнопки закрытия (крестик) */
|
|
30
|
-
isShowCloseButton?: boolean;
|
|
31
|
-
/** Отображение кнопки назад (стрелка) */
|
|
32
|
-
isShowPrevButton?: boolean;
|
|
33
|
-
/** Разрешает закрыть попап по клавише `Escape` */
|
|
34
|
-
isCloseOnEscape?: boolean;
|
|
35
|
-
/** Разрешает закрыть попап по свайпу, работает если `isScrollLock={true}` */
|
|
36
|
-
isCloseOnSwipe?: boolean;
|
|
37
|
-
/** Разрешает закрытие при клике на свободное пространство (затемнение документа) */
|
|
38
|
-
isCloseOutsideClick?: boolean;
|
|
39
|
-
/** Рендер в конец `<body>` */
|
|
40
|
-
isRenderPortal?: boolean;
|
|
41
|
-
/** Включает/отключает анимацию открытия/скрытия шторки */
|
|
42
|
-
isAnimated?: boolean;
|
|
43
|
-
/** Запрещает прокрутку `<body>` */
|
|
44
|
-
isScrollLock?: boolean;
|
|
45
|
-
/** Запрещает прокрутку `<body>` для iOS */
|
|
46
|
-
isScrollLockTouch?: boolean;
|
|
47
|
-
/** React children */
|
|
48
|
-
children: React.ReactNode;
|
|
49
|
-
/** React children header block */
|
|
50
|
-
header?: React.ReactNode;
|
|
51
|
-
/** React children footer block */
|
|
52
|
-
footer?: React.ReactNode;
|
|
53
|
-
/** Срабатывает когда попап открыт */
|
|
54
|
-
onOpen?: () => void;
|
|
55
|
-
/** Handle для закрытия попапа */
|
|
56
|
-
onClose: (e: any) => void;
|
|
57
|
-
/** Срабатывает когда попап открыт и закончилась анимация */
|
|
58
|
-
onOpened?: () => void;
|
|
59
|
-
/** Срабатывает когда попап закрыт и закончилась анимация */
|
|
60
|
-
onClosed?: () => void;
|
|
61
|
-
/** Событие при нажатии кнопки назад */
|
|
62
|
-
onPrev?: (e: any) => void;
|
|
63
|
-
/** Внутренние отступы */
|
|
64
|
-
padding?: string | number;
|
|
65
|
-
/** Размещением по z-оси */
|
|
66
|
-
zIndex?: number;
|
|
67
|
-
/** HTML Атрибут `data-qaid` для автотестов */
|
|
68
|
-
/** `ref` для блока с контентом */
|
|
69
|
-
contentRef?: React.RefObject<HTMLDivElement>;
|
|
70
|
-
dataQaId?: string;
|
|
71
|
-
};
|
|
72
|
-
/**
|
|
73
|
-
* Компонент используется для создания оверлея (накладывающегося слоя) на верху содержимого.
|
|
74
|
-
* Он может использоваться, например, для создания модальных окон, выпадающих списков и других элементов интерфейса.
|
|
75
|
-
*/
|
|
76
|
-
export declare const Overlay: React.FC<OverlayProps>;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type OverlayProps = React.ComponentProps<'div'> & {
|
|
3
|
+
/**
|
|
4
|
+
* Расположение
|
|
5
|
+
* <br>
|
|
6
|
+
* - `adaptive` = `isMinWidthMedium ? 'right' : 'bottom'`
|
|
7
|
+
* */
|
|
8
|
+
placement?: 'adaptive' | 'top' | 'right' | 'bottom' | 'left';
|
|
9
|
+
/**
|
|
10
|
+
* Ширина или высота взависимости от **placement**
|
|
11
|
+
* <br>
|
|
12
|
+
* - `auto` размер по контенту
|
|
13
|
+
* <br>
|
|
14
|
+
* - `adaptive` размер относительно свойства **placement**:
|
|
15
|
+
* <br>
|
|
16
|
+
* **top | bottom** = `auto`
|
|
17
|
+
* <br>
|
|
18
|
+
* **left | right** = `400`
|
|
19
|
+
* <br>
|
|
20
|
+
* **adaptive** = `isMinWidthMedium ? 400 : 'auto'`
|
|
21
|
+
* */
|
|
22
|
+
size?: string | number;
|
|
23
|
+
/** Максимальная ширина или высота взависимости от **placement** */
|
|
24
|
+
maxSize?: string | number;
|
|
25
|
+
/** Состояние, открыто или нет */
|
|
26
|
+
isOpen: boolean;
|
|
27
|
+
/** Заголовок */
|
|
28
|
+
title?: React.ReactNode;
|
|
29
|
+
/** Отображение кнопки закрытия (крестик) */
|
|
30
|
+
isShowCloseButton?: boolean;
|
|
31
|
+
/** Отображение кнопки назад (стрелка) */
|
|
32
|
+
isShowPrevButton?: boolean;
|
|
33
|
+
/** Разрешает закрыть попап по клавише `Escape` */
|
|
34
|
+
isCloseOnEscape?: boolean;
|
|
35
|
+
/** Разрешает закрыть попап по свайпу, работает если `isScrollLock={true}` */
|
|
36
|
+
isCloseOnSwipe?: boolean;
|
|
37
|
+
/** Разрешает закрытие при клике на свободное пространство (затемнение документа) */
|
|
38
|
+
isCloseOutsideClick?: boolean;
|
|
39
|
+
/** Рендер в конец `<body>` */
|
|
40
|
+
isRenderPortal?: boolean;
|
|
41
|
+
/** Включает/отключает анимацию открытия/скрытия шторки */
|
|
42
|
+
isAnimated?: boolean;
|
|
43
|
+
/** Запрещает прокрутку `<body>` */
|
|
44
|
+
isScrollLock?: boolean;
|
|
45
|
+
/** Запрещает прокрутку `<body>` для iOS */
|
|
46
|
+
isScrollLockTouch?: boolean;
|
|
47
|
+
/** React children */
|
|
48
|
+
children: React.ReactNode;
|
|
49
|
+
/** React children header block */
|
|
50
|
+
header?: React.ReactNode;
|
|
51
|
+
/** React children footer block */
|
|
52
|
+
footer?: React.ReactNode;
|
|
53
|
+
/** Срабатывает когда попап открыт */
|
|
54
|
+
onOpen?: () => void;
|
|
55
|
+
/** Handle для закрытия попапа */
|
|
56
|
+
onClose: (e: any) => void;
|
|
57
|
+
/** Срабатывает когда попап открыт и закончилась анимация */
|
|
58
|
+
onOpened?: () => void;
|
|
59
|
+
/** Срабатывает когда попап закрыт и закончилась анимация */
|
|
60
|
+
onClosed?: () => void;
|
|
61
|
+
/** Событие при нажатии кнопки назад */
|
|
62
|
+
onPrev?: (e: any) => void;
|
|
63
|
+
/** Внутренние отступы */
|
|
64
|
+
padding?: string | number;
|
|
65
|
+
/** Размещением по z-оси */
|
|
66
|
+
zIndex?: number;
|
|
67
|
+
/** HTML Атрибут `data-qaid` для автотестов */
|
|
68
|
+
/** `ref` для блока с контентом */
|
|
69
|
+
contentRef?: React.RefObject<HTMLDivElement>;
|
|
70
|
+
dataQaId?: string;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Компонент используется для создания оверлея (накладывающегося слоя) на верху содержимого.
|
|
74
|
+
* Он может использоваться, например, для создания модальных окон, выпадающих списков и других элементов интерфейса.
|
|
75
|
+
*/
|
|
76
|
+
export declare const Overlay: React.FC<OverlayProps>;
|
package/Overlay/package.json
CHANGED
package/Overlay/utils.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
type TypePlacement = 'adaptive' | 'top' | 'right' | 'bottom' | 'left';
|
|
2
|
-
type TypeSize = string | number;
|
|
3
|
-
type TypeGetPopupStyle = {
|
|
4
|
-
height?: TypeSize;
|
|
5
|
-
width?: TypeSize;
|
|
6
|
-
maxHeight?: TypeSize;
|
|
7
|
-
maxWidth?: TypeSize;
|
|
8
|
-
};
|
|
9
|
-
export declare const getPopupStyle: (placement: TypePlacement, size: TypeSize, maxSize: TypeSize) => TypeGetPopupStyle;
|
|
10
|
-
export {};
|
|
1
|
+
type TypePlacement = 'adaptive' | 'top' | 'right' | 'bottom' | 'left';
|
|
2
|
+
type TypeSize = string | number;
|
|
3
|
+
type TypeGetPopupStyle = {
|
|
4
|
+
height?: TypeSize;
|
|
5
|
+
width?: TypeSize;
|
|
6
|
+
maxHeight?: TypeSize;
|
|
7
|
+
maxWidth?: TypeSize;
|
|
8
|
+
};
|
|
9
|
+
export declare const getPopupStyle: (placement: TypePlacement, size: TypeSize, maxSize: TypeSize) => TypeGetPopupStyle;
|
|
10
|
+
export {};
|
package/Picture/index.d.ts
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import type { CreateBlock, EvokitProp, EvokitMediaSufix } from '@prom-ui/core/base/types';
|
|
2
|
-
type PictureItemDisplay = EvokitMediaSufix<'block' | 'none'>;
|
|
3
|
-
type PictureThemes = EvokitMediaSufix<'black-400' | 'white' | 'yellow-500'>;
|
|
4
|
-
type PictureDisplay = EvokitMediaSufix<'block' | 'none'>;
|
|
5
|
-
type PictureFit = EvokitMediaSufix<'none' | 'fill' | 'contain' | 'cover' | 'scale-down'>;
|
|
6
|
-
type PictureRound = EvokitMediaSufix<'none' | 'full' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | '3xl' | '4xl' | '5xl'>;
|
|
7
|
-
type PictureBorderWidth = EvokitMediaSufix<'none' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | '3xl' | '4xl' | '5xl'>;
|
|
8
|
-
type PictureBorderStyle = EvokitMediaSufix<'solid' | 'dotted' | 'dashed'>;
|
|
9
|
-
export type PictureItemProps = {
|
|
10
|
-
'picture-item'?: EvokitProp<PictureItemDisplay>;
|
|
11
|
-
};
|
|
12
|
-
export type PictureProps = {
|
|
13
|
-
'picture-background'?: EvokitProp<PictureThemes>;
|
|
14
|
-
'picture-display'?: EvokitProp<PictureDisplay>;
|
|
15
|
-
'picture-fit'?: EvokitProp<PictureFit>;
|
|
16
|
-
'picture-blackhole'?: EvokitProp<'alt-hidden'>;
|
|
17
|
-
'picture-border'?: EvokitProp<PictureThemes | `${PictureThemes} ${string}`>;
|
|
18
|
-
/** @ignore */
|
|
19
|
-
'picture-border-top'?: EvokitProp<PictureThemes | `${PictureThemes} ${string}`>;
|
|
20
|
-
/** @ignore */
|
|
21
|
-
'picture-border-right'?: EvokitProp<PictureThemes | `${PictureThemes} ${string}`>;
|
|
22
|
-
/** @ignore */
|
|
23
|
-
'picture-border-bottom'?: EvokitProp<PictureThemes | `${PictureThemes} ${string}`>;
|
|
24
|
-
/** @ignore */
|
|
25
|
-
'picture-border-left'?: EvokitProp<PictureThemes | `${PictureThemes} ${string}`>;
|
|
26
|
-
/** @ignore */
|
|
27
|
-
'picture-border-color'?: EvokitProp<PictureThemes | `${PictureThemes} ${string}`>;
|
|
28
|
-
/** @ignore */
|
|
29
|
-
'picture-border-color-top'?: EvokitProp<PictureThemes>;
|
|
30
|
-
/** @ignore */
|
|
31
|
-
'picture-border-color-right'?: EvokitProp<PictureThemes>;
|
|
32
|
-
/** @ignore */
|
|
33
|
-
'picture-border-color-bottom'?: EvokitProp<PictureThemes>;
|
|
34
|
-
/** @ignore */
|
|
35
|
-
'picture-border-color-left'?: EvokitProp<PictureThemes>;
|
|
36
|
-
/** @ignore */
|
|
37
|
-
'picture-border-width'?: EvokitProp<PictureBorderWidth | `${PictureBorderWidth} ${string}`>;
|
|
38
|
-
/** @ignore */
|
|
39
|
-
'picture-border-width-top'?: EvokitProp<PictureBorderWidth>;
|
|
40
|
-
/** @ignore */
|
|
41
|
-
'picture-border-width-right'?: EvokitProp<PictureBorderWidth>;
|
|
42
|
-
/** @ignore */
|
|
43
|
-
'picture-border-width-bottom'?: EvokitProp<PictureBorderWidth>;
|
|
44
|
-
/** @ignore */
|
|
45
|
-
'picture-border-width-left'?: EvokitProp<PictureBorderWidth>;
|
|
46
|
-
/** @ignore */
|
|
47
|
-
'picture-border-style'?: EvokitProp<PictureBorderStyle | `${PictureBorderStyle} ${string}`>;
|
|
48
|
-
/** @ignore */
|
|
49
|
-
'picture-border-style-top'?: EvokitProp<PictureBorderStyle>;
|
|
50
|
-
/** @ignore */
|
|
51
|
-
'picture-border-style-right'?: EvokitProp<PictureBorderStyle>;
|
|
52
|
-
/** @ignore */
|
|
53
|
-
'picture-border-style-bottom'?: EvokitProp<PictureBorderStyle>;
|
|
54
|
-
/** @ignore */
|
|
55
|
-
'picture-border-style-left'?: EvokitProp<PictureBorderStyle>;
|
|
56
|
-
'picture-round'?: EvokitProp<PictureRound | `${PictureRound} ${string}`>;
|
|
57
|
-
/** @ignore */
|
|
58
|
-
'picture-round-top-left'?: EvokitProp<PictureRound>;
|
|
59
|
-
/** @ignore */
|
|
60
|
-
'picture-round-top-right'?: EvokitProp<PictureRound>;
|
|
61
|
-
/** @ignore */
|
|
62
|
-
'picture-round-bottom-left'?: EvokitProp<PictureRound>;
|
|
63
|
-
/** @ignore */
|
|
64
|
-
'picture-round-bottom-right'?: EvokitProp<PictureRound>;
|
|
65
|
-
};
|
|
66
|
-
declare const PictureItem: CreateBlock<'img', 'picture-item', PictureItemProps>;
|
|
67
|
-
export declare const Picture: CreateBlock<'picture', 'picture', PictureProps> & {
|
|
68
|
-
Item: typeof PictureItem;
|
|
69
|
-
};
|
|
70
|
-
export {};
|
|
1
|
+
import type { CreateBlock, EvokitProp, EvokitMediaSufix } from '@prom-ui/core/base/types';
|
|
2
|
+
type PictureItemDisplay = EvokitMediaSufix<'block' | 'none'>;
|
|
3
|
+
type PictureThemes = EvokitMediaSufix<'black-400' | 'white' | 'yellow-500'>;
|
|
4
|
+
type PictureDisplay = EvokitMediaSufix<'block' | 'none'>;
|
|
5
|
+
type PictureFit = EvokitMediaSufix<'none' | 'fill' | 'contain' | 'cover' | 'scale-down'>;
|
|
6
|
+
type PictureRound = EvokitMediaSufix<'none' | 'full' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | '3xl' | '4xl' | '5xl'>;
|
|
7
|
+
type PictureBorderWidth = EvokitMediaSufix<'none' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | '3xl' | '4xl' | '5xl'>;
|
|
8
|
+
type PictureBorderStyle = EvokitMediaSufix<'solid' | 'dotted' | 'dashed'>;
|
|
9
|
+
export type PictureItemProps = {
|
|
10
|
+
'picture-item'?: EvokitProp<PictureItemDisplay>;
|
|
11
|
+
};
|
|
12
|
+
export type PictureProps = {
|
|
13
|
+
'picture-background'?: EvokitProp<PictureThemes>;
|
|
14
|
+
'picture-display'?: EvokitProp<PictureDisplay>;
|
|
15
|
+
'picture-fit'?: EvokitProp<PictureFit>;
|
|
16
|
+
'picture-blackhole'?: EvokitProp<'alt-hidden'>;
|
|
17
|
+
'picture-border'?: EvokitProp<PictureThemes | `${PictureThemes} ${string}`>;
|
|
18
|
+
/** @ignore */
|
|
19
|
+
'picture-border-top'?: EvokitProp<PictureThemes | `${PictureThemes} ${string}`>;
|
|
20
|
+
/** @ignore */
|
|
21
|
+
'picture-border-right'?: EvokitProp<PictureThemes | `${PictureThemes} ${string}`>;
|
|
22
|
+
/** @ignore */
|
|
23
|
+
'picture-border-bottom'?: EvokitProp<PictureThemes | `${PictureThemes} ${string}`>;
|
|
24
|
+
/** @ignore */
|
|
25
|
+
'picture-border-left'?: EvokitProp<PictureThemes | `${PictureThemes} ${string}`>;
|
|
26
|
+
/** @ignore */
|
|
27
|
+
'picture-border-color'?: EvokitProp<PictureThemes | `${PictureThemes} ${string}`>;
|
|
28
|
+
/** @ignore */
|
|
29
|
+
'picture-border-color-top'?: EvokitProp<PictureThemes>;
|
|
30
|
+
/** @ignore */
|
|
31
|
+
'picture-border-color-right'?: EvokitProp<PictureThemes>;
|
|
32
|
+
/** @ignore */
|
|
33
|
+
'picture-border-color-bottom'?: EvokitProp<PictureThemes>;
|
|
34
|
+
/** @ignore */
|
|
35
|
+
'picture-border-color-left'?: EvokitProp<PictureThemes>;
|
|
36
|
+
/** @ignore */
|
|
37
|
+
'picture-border-width'?: EvokitProp<PictureBorderWidth | `${PictureBorderWidth} ${string}`>;
|
|
38
|
+
/** @ignore */
|
|
39
|
+
'picture-border-width-top'?: EvokitProp<PictureBorderWidth>;
|
|
40
|
+
/** @ignore */
|
|
41
|
+
'picture-border-width-right'?: EvokitProp<PictureBorderWidth>;
|
|
42
|
+
/** @ignore */
|
|
43
|
+
'picture-border-width-bottom'?: EvokitProp<PictureBorderWidth>;
|
|
44
|
+
/** @ignore */
|
|
45
|
+
'picture-border-width-left'?: EvokitProp<PictureBorderWidth>;
|
|
46
|
+
/** @ignore */
|
|
47
|
+
'picture-border-style'?: EvokitProp<PictureBorderStyle | `${PictureBorderStyle} ${string}`>;
|
|
48
|
+
/** @ignore */
|
|
49
|
+
'picture-border-style-top'?: EvokitProp<PictureBorderStyle>;
|
|
50
|
+
/** @ignore */
|
|
51
|
+
'picture-border-style-right'?: EvokitProp<PictureBorderStyle>;
|
|
52
|
+
/** @ignore */
|
|
53
|
+
'picture-border-style-bottom'?: EvokitProp<PictureBorderStyle>;
|
|
54
|
+
/** @ignore */
|
|
55
|
+
'picture-border-style-left'?: EvokitProp<PictureBorderStyle>;
|
|
56
|
+
'picture-round'?: EvokitProp<PictureRound | `${PictureRound} ${string}`>;
|
|
57
|
+
/** @ignore */
|
|
58
|
+
'picture-round-top-left'?: EvokitProp<PictureRound>;
|
|
59
|
+
/** @ignore */
|
|
60
|
+
'picture-round-top-right'?: EvokitProp<PictureRound>;
|
|
61
|
+
/** @ignore */
|
|
62
|
+
'picture-round-bottom-left'?: EvokitProp<PictureRound>;
|
|
63
|
+
/** @ignore */
|
|
64
|
+
'picture-round-bottom-right'?: EvokitProp<PictureRound>;
|
|
65
|
+
};
|
|
66
|
+
declare const PictureItem: CreateBlock<'img', 'picture-item', PictureItemProps>;
|
|
67
|
+
export declare const Picture: CreateBlock<'picture', 'picture', PictureProps> & {
|
|
68
|
+
Item: typeof PictureItem;
|
|
69
|
+
};
|
|
70
|
+
export {};
|
package/Picture/package.json
CHANGED
|
@@ -26,25 +26,25 @@ function _interopNamespaceCompat(e) {
|
|
|
26
26
|
|
|
27
27
|
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
28
28
|
|
|
29
|
-
var PortalApp = function (
|
|
30
|
-
var id =
|
|
31
|
-
children =
|
|
29
|
+
var PortalApp = function PortalApp(_ref) {
|
|
30
|
+
var id = _ref.id,
|
|
31
|
+
children = _ref.children;
|
|
32
32
|
var target = usePortal.usePortal(id);
|
|
33
33
|
if (target) {
|
|
34
|
-
return reactDom.createPortal(children, target);
|
|
34
|
+
return /*#__PURE__*/reactDom.createPortal(children, target);
|
|
35
35
|
}
|
|
36
36
|
return children;
|
|
37
37
|
};
|
|
38
|
-
var Portal = function (
|
|
39
|
-
var
|
|
40
|
-
id =
|
|
41
|
-
|
|
42
|
-
isActive =
|
|
43
|
-
children =
|
|
38
|
+
var Portal = function Portal(_ref2) {
|
|
39
|
+
var _ref2$id = _ref2.id,
|
|
40
|
+
id = _ref2$id === void 0 ? 'react-portal' : _ref2$id,
|
|
41
|
+
_ref2$isActive = _ref2.isActive,
|
|
42
|
+
isActive = _ref2$isActive === void 0 ? true : _ref2$isActive,
|
|
43
|
+
children = _ref2.children;
|
|
44
44
|
if (!isActive) {
|
|
45
45
|
return children;
|
|
46
46
|
}
|
|
47
|
-
return React__namespace.createElement(PortalApp, {
|
|
47
|
+
return /*#__PURE__*/React__namespace.createElement(PortalApp, {
|
|
48
48
|
id: id
|
|
49
49
|
}, children);
|
|
50
50
|
};
|
|
@@ -26,25 +26,25 @@ function _interopNamespaceCompat(e) {
|
|
|
26
26
|
|
|
27
27
|
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
28
28
|
|
|
29
|
-
var PortalApp = function (
|
|
30
|
-
var id =
|
|
31
|
-
children =
|
|
29
|
+
var PortalApp = function PortalApp(_ref) {
|
|
30
|
+
var id = _ref.id,
|
|
31
|
+
children = _ref.children;
|
|
32
32
|
var target = usePortal.usePortal(id);
|
|
33
33
|
if (target) {
|
|
34
|
-
return reactDom.createPortal(children, target);
|
|
34
|
+
return /*#__PURE__*/reactDom.createPortal(children, target);
|
|
35
35
|
}
|
|
36
36
|
return children;
|
|
37
37
|
};
|
|
38
|
-
var Portal = function (
|
|
39
|
-
var
|
|
40
|
-
id =
|
|
41
|
-
|
|
42
|
-
isActive =
|
|
43
|
-
children =
|
|
38
|
+
var Portal = function Portal(_ref2) {
|
|
39
|
+
var _ref2$id = _ref2.id,
|
|
40
|
+
id = _ref2$id === void 0 ? 'react-portal' : _ref2$id,
|
|
41
|
+
_ref2$isActive = _ref2.isActive,
|
|
42
|
+
isActive = _ref2$isActive === void 0 ? true : _ref2$isActive,
|
|
43
|
+
children = _ref2.children;
|
|
44
44
|
if (!isActive) {
|
|
45
45
|
return children;
|
|
46
46
|
}
|
|
47
|
-
return React__namespace.createElement(PortalApp, {
|
|
47
|
+
return /*#__PURE__*/React__namespace.createElement(PortalApp, {
|
|
48
48
|
id: id
|
|
49
49
|
}, children);
|
|
50
50
|
};
|
package/Portal/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export type PortalProps = {
|
|
3
|
-
/** ID html ноды, Если такая нода отсутствует на странице, будет создан новый `<div>` в конце `<body>` */
|
|
4
|
-
id?: string;
|
|
5
|
-
/** Если передать `false` компонент перестанет работать */
|
|
6
|
-
isActive?: boolean;
|
|
7
|
-
/** React children */
|
|
8
|
-
children?: any;
|
|
9
|
-
};
|
|
10
|
-
export declare const Portal: React.FC<PortalProps>;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type PortalProps = {
|
|
3
|
+
/** ID html ноды, Если такая нода отсутствует на странице, будет создан новый `<div>` в конце `<body>` */
|
|
4
|
+
id?: string;
|
|
5
|
+
/** Если передать `false` компонент перестанет работать */
|
|
6
|
+
isActive?: boolean;
|
|
7
|
+
/** React children */
|
|
8
|
+
children?: any;
|
|
9
|
+
};
|
|
10
|
+
export declare const Portal: React.FC<PortalProps>;
|
package/Portal/package.json
CHANGED
|
@@ -27,17 +27,17 @@ var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
|
27
27
|
|
|
28
28
|
var css = {"root":"QRCode__root___ZFxvt"};
|
|
29
29
|
|
|
30
|
-
var QRCode = function (
|
|
31
|
-
var value =
|
|
32
|
-
|
|
33
|
-
size =
|
|
34
|
-
|
|
35
|
-
bgColor =
|
|
36
|
-
|
|
37
|
-
fgColor =
|
|
38
|
-
|
|
39
|
-
level =
|
|
40
|
-
return React__namespace.createElement(qrcode_react.QRCodeSVG, {
|
|
30
|
+
var QRCode = function QRCode(_ref) {
|
|
31
|
+
var value = _ref.value,
|
|
32
|
+
_ref$size = _ref.size,
|
|
33
|
+
size = _ref$size === void 0 ? 100 : _ref$size,
|
|
34
|
+
_ref$bgColor = _ref.bgColor,
|
|
35
|
+
bgColor = _ref$bgColor === void 0 ? 'var(--white)' : _ref$bgColor,
|
|
36
|
+
_ref$fgColor = _ref.fgColor,
|
|
37
|
+
fgColor = _ref$fgColor === void 0 ? 'var(--black-900)' : _ref$fgColor,
|
|
38
|
+
_ref$level = _ref.level,
|
|
39
|
+
level = _ref$level === void 0 ? 'L' : _ref$level;
|
|
40
|
+
return /*#__PURE__*/React__namespace.createElement(qrcode_react.QRCodeSVG, {
|
|
41
41
|
value: value,
|
|
42
42
|
size: size,
|
|
43
43
|
bgColor: bgColor,
|
|
@@ -27,17 +27,17 @@ var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
|
27
27
|
|
|
28
28
|
var css = {"root":"QRCode__root___8QnCu"};
|
|
29
29
|
|
|
30
|
-
var QRCode = function (
|
|
31
|
-
var value =
|
|
32
|
-
|
|
33
|
-
size =
|
|
34
|
-
|
|
35
|
-
bgColor =
|
|
36
|
-
|
|
37
|
-
fgColor =
|
|
38
|
-
|
|
39
|
-
level =
|
|
40
|
-
return React__namespace.createElement(qrcode_react.QRCodeSVG, {
|
|
30
|
+
var QRCode = function QRCode(_ref) {
|
|
31
|
+
var value = _ref.value,
|
|
32
|
+
_ref$size = _ref.size,
|
|
33
|
+
size = _ref$size === void 0 ? 100 : _ref$size,
|
|
34
|
+
_ref$bgColor = _ref.bgColor,
|
|
35
|
+
bgColor = _ref$bgColor === void 0 ? 'var(--white)' : _ref$bgColor,
|
|
36
|
+
_ref$fgColor = _ref.fgColor,
|
|
37
|
+
fgColor = _ref$fgColor === void 0 ? 'var(--black-900)' : _ref$fgColor,
|
|
38
|
+
_ref$level = _ref.level,
|
|
39
|
+
level = _ref$level === void 0 ? 'L' : _ref$level;
|
|
40
|
+
return /*#__PURE__*/React__namespace.createElement(qrcode_react.QRCodeSVG, {
|
|
41
41
|
value: value,
|
|
42
42
|
size: size,
|
|
43
43
|
bgColor: bgColor,
|