@foxford/ui 2.65.0 → 2.66.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.
Files changed (48) hide show
  1. package/components/DialogComponent/DialogComponent.js +1 -1
  2. package/components/DialogComponent/DialogComponent.js.map +1 -1
  3. package/components/DialogComponent/DialogComponent.mjs +1 -1
  4. package/components/DialogComponent/DialogComponent.mjs.map +1 -1
  5. package/components/DialogComponent/ProgressLineContainer.js +2 -0
  6. package/components/DialogComponent/ProgressLineContainer.js.map +1 -0
  7. package/components/DialogComponent/ProgressLineContainer.mjs +2 -0
  8. package/components/DialogComponent/ProgressLineContainer.mjs.map +1 -0
  9. package/components/DialogComponent/constants.js +1 -1
  10. package/components/DialogComponent/constants.js.map +1 -1
  11. package/components/DialogComponent/constants.mjs +1 -1
  12. package/components/DialogComponent/constants.mjs.map +1 -1
  13. package/components/DialogComponent/style.js +1 -1
  14. package/components/DialogComponent/style.js.map +1 -1
  15. package/components/DialogComponent/style.mjs +1 -1
  16. package/components/DialogComponent/style.mjs.map +1 -1
  17. package/components/Popover/Popover.js +1 -1
  18. package/components/Popover/Popover.js.map +1 -1
  19. package/components/Popover/Popover.mjs +1 -1
  20. package/components/Popover/Popover.mjs.map +1 -1
  21. package/components/PopoverComponent/PopoverComponent.js +1 -1
  22. package/components/PopoverComponent/PopoverComponent.js.map +1 -1
  23. package/components/PopoverComponent/PopoverComponent.mjs +1 -1
  24. package/components/PopoverComponent/PopoverComponent.mjs.map +1 -1
  25. package/components/PopoverComponent/constants.js +1 -1
  26. package/components/PopoverComponent/constants.js.map +1 -1
  27. package/components/PopoverComponent/constants.mjs +1 -1
  28. package/components/PopoverComponent/constants.mjs.map +1 -1
  29. package/components/PopoverComponent/style.js +1 -1
  30. package/components/PopoverComponent/style.js.map +1 -1
  31. package/components/PopoverComponent/style.mjs +1 -1
  32. package/components/PopoverComponent/style.mjs.map +1 -1
  33. package/components/Tooltip/Tooltip.js.map +1 -1
  34. package/components/Tooltip/Tooltip.mjs.map +1 -1
  35. package/components/TooltipComponent/TooltipComponent.js +1 -1
  36. package/components/TooltipComponent/TooltipComponent.js.map +1 -1
  37. package/components/TooltipComponent/TooltipComponent.mjs +1 -1
  38. package/components/TooltipComponent/TooltipComponent.mjs.map +1 -1
  39. package/components/TooltipComponent/constants.js +1 -1
  40. package/components/TooltipComponent/constants.js.map +1 -1
  41. package/components/TooltipComponent/constants.mjs +1 -1
  42. package/components/TooltipComponent/constants.mjs.map +1 -1
  43. package/components/TooltipComponent/style.js +1 -1
  44. package/components/TooltipComponent/style.js.map +1 -1
  45. package/components/TooltipComponent/style.mjs +1 -1
  46. package/components/TooltipComponent/style.mjs.map +1 -1
  47. package/dts/index.d.ts +592 -292
  48. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- 'use strict';var React=require('react');var ResizeObserver=require('resize-observer-polyfill');var withMergedProps=require('../../hocs/withMergedProps.js');var constants$1=require('../../shared/constants.js');var dom=require('../../shared/utils/dom.js');var DialogContainer=require('./DialogContainer.js');var dragging=require('./images/dragging.svg.js');var style=require('./style.js');var utils=require('./utils.js');var constants=require('./constants.js');var jsxRuntime=require('react/jsx-runtime');var Visibility=require('../Visibility/Visibility.js');var Spacer=require('../Spacer/Spacer.js');var Icon=require('../Icon/Icon.js');var Skeleton=require('../Skeleton/Skeleton.js');var Text=require('../Text/Text.js');var Button=require('../Button/Button.js');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var ResizeObserver__default=_interopDefault(ResizeObserver);const resizeHandlerSymbol=Symbol('resize-handler');const resizeObserver=new ResizeObserver__default.default((e=>{e.forEach((e=>{typeof e.target[resizeHandlerSymbol]=='function'&&e.target[resizeHandlerSymbol](e.target)}))}));const DialogComponent=withMergedProps.withMergedProps(React.forwardRef(((e,t)=>{const{size:s="s",iconButtonProps:i={},captionProps:n={},titleProps:r={},subtitleProps:o={},draggingIconProps:a={},imgSrc:l={},skeletonProps:c={},fancy:x,floats:d,children:u,caption:j,title:m,subtitle:R,controls:g,imgLandscapePositionRight:y,imgPortraitPositionBottom:p,className:S,backgroundClassName:h,scrollFadingDisabled:b,draggable:I,loading:z,sizeXXS:T,sizeXS:v,sizeS:k,sizeM:P,sizeL:B,sizeXL:f,onGrab:D,onNudge:w,...C}=e;const E={size:s,sizeXXS:T,sizeXS:v,sizeS:k,sizeM:P,sizeL:B,sizeXL:f};const _=utils.getCommonSizeProps(E);const M=x?S:dom.concatClassNames(S,h);const[L,V]=React.useState(null);const[q,A]=React.useState(null);const N=React.useRef(null);const Z=React.useCallback((e=>{e.scrollHeight===e.clientHeight?(V(null),A(null)):(V(e.scrollTop<=0),A(Math.abs(e.scrollHeight-e.clientHeight-e.scrollTop)<=1))}),[]);return React.useLayoutEffect((()=>{const e=N.current;return!b&&e&&(e[resizeHandlerSymbol]=Z,resizeObserver.observe(e)),()=>{e&&resizeObserver.unobserve(e)}}),[Z,b]),jsxRuntime.jsxs(style.Root,{...C,...E,className:M,fancy:x,ref:t,children:[d&&d(_),x&&jsxRuntime.jsx(style.FancyBackground,{className:h}),x&&i.onClick&&jsxRuntime.jsx(style.PositionedIconButton,{secondary:!0,size:"xxl",icon:"close",inset:{top:0,right:0},...i}),(I||l.portrait&&!p||x)&&jsxRuntime.jsxs(Visibility.Visibility,{...E,sizes:constants.VISIBILITY_PORTRAIT,children:[x&&jsxRuntime.jsx(Spacer.Spacer,{top:96}),I&&jsxRuntime.jsx(style.DraggingHandle,{onPointerDown:D,children:jsxRuntime.jsx(style.DraggingIconContainer,{tabIndex:0,onKeyDown:w,children:jsxRuntime.jsx(Icon.Icon,{icon:jsxRuntime.jsx(dragging.default,{}),size:34,color:"content-onmain-tertiary",...a})})}),l.portrait&&!p&&jsxRuntime.jsx(style.MediaPortraitContainer,{top:!x,children:jsxRuntime.jsxs(style.MediaPortrait,{children:[jsxRuntime.jsx(style.Placeholder,{orientation:"portrait",aspectRatio:"3:1"}),z?jsxRuntime.jsx(style.MediaSkeleton,{width:"100%",height:"100%",borderRadius:0,...c}):jsxRuntime.jsx(style.Media,{src:l.portrait})]})})]}),l.landscape&&!y&&jsxRuntime.jsx(Visibility.Visibility,{...E,sizes:constants.VISIBILITY_LANDSCAPE_MEDIA,children:jsxRuntime.jsxs(style.MediaLandscape,{children:[jsxRuntime.jsx(style.Placeholder,{orientation:"landscape",aspectRatio:"5:7"}),z?jsxRuntime.jsx(style.MediaSkeleton,{width:"100%",height:"100%",borderRadius:0,...c}):jsxRuntime.jsx(style.Media,{src:l.landscape})]})}),!x&&i.onClick&&jsxRuntime.jsx(style.PositionedIconButton,{size:"l",icon:"close",inset:{top:8,right:8},...i}),jsxRuntime.jsxs(DialogContainer.DialogContainer,{...E,fancy:x,children:[I&&jsxRuntime.jsx(Visibility.Visibility,{...E,sizes:constants.VISIBILITY_LANDSCAPE,children:jsxRuntime.jsx(style.DraggingHandle,{onPointerDown:D,children:jsxRuntime.jsx(style.DraggingIconContainer,{tabIndex:0,onKeyDown:w,children:jsxRuntime.jsx(Icon.Icon,{icon:jsxRuntime.jsx(dragging.default,{}),size:34,color:"content-onmain-tertiary",...a})})})}),!b&&jsxRuntime.jsx(style.Fading,{visible:L===!1}),jsxRuntime.jsx(style.ScrollableContent,{ref:N,tabIndex:0,onScroll:e=>{b||Z(e.currentTarget)},onKeyDown:e=>{constants$1.keyboardKeys.ArrowUp.validate(e.key)?(e.preventDefault(),e.currentTarget.scrollBy(0,-13)):constants$1.keyboardKeys.ArrowDown.validate(e.key)&&(e.preventDefault(),e.currentTarget.scrollBy(0,13))},children:jsxRuntime.jsxs(jsxRuntime.Fragment,z?{children:[jsxRuntime.jsx(Skeleton.Skeleton,{children:jsxRuntime.jsx(Text.Text,{appearance:"heading",marginBottom:"1.5em",sizes:constants.SIZES_TITLE,..._,...r})}),jsxRuntime.jsx(Skeleton.Skeleton,{width:"90%",children:jsxRuntime.jsx(Text.Text,{appearance:"body",marginBottom:"0.4em",sizes:constants.SIZES_SUBTITLE,..._,...o})}),jsxRuntime.jsx(Skeleton.Skeleton,{width:"70%",children:jsxRuntime.jsx(Text.Text,{appearance:"body",marginBottom:"0.4em",sizes:constants.SIZES_SUBTITLE,..._,...o})}),jsxRuntime.jsx(Skeleton.Skeleton,{width:"50%",children:jsxRuntime.jsx(Text.Text,{appearance:"body",marginBottom:"0.8em",sizes:constants.SIZES_SUBTITLE,..._,...o})})]}:{children:[j&&jsxRuntime.jsx(Text.Text,{appearance:"body",color:"content-onmain-tertiary",wordBreak:"break-word",marginBottom:"0.8em",sizes:constants.SIZES_CAPTION,..._,...n,children:j}),m&&jsxRuntime.jsx(Text.Text,{as:"h2",appearance:"heading",color:"content-onmain-primary",wordBreak:"break-word",marginBottom:"0.5em",sizes:constants.SIZES_TITLE,..._,...r,children:m}),R&&jsxRuntime.jsx(Text.Text,{as:"p",appearance:"body",color:"content-onmain-primary",wordBreak:"break-word",marginBottom:"0.8em",sizes:constants.SIZES_SUBTITLE,..._,...o,children:R}),typeof u=='function'?u(_):u]})}),!b&&jsxRuntime.jsx(style.Fading,{visible:q===!1,after:!0}),g&&jsxRuntime.jsx(style.Controls,{children:z?jsxRuntime.jsx(Skeleton.Skeleton,{borderRadius:48,...c,children:jsxRuntime.jsx(Button.Button,{preset:"brand",..._})}):g(_)})]}),l.landscape&&y&&jsxRuntime.jsx(Visibility.Visibility,{...E,sizes:constants.VISIBILITY_LANDSCAPE_MEDIA,children:jsxRuntime.jsxs(style.MediaLandscape,{right:!0,children:[jsxRuntime.jsx(style.Placeholder,{orientation:"landscape",aspectRatio:"5:7"}),z?jsxRuntime.jsx(style.MediaSkeleton,{width:"100%",height:"100%",borderRadius:0,...c}):jsxRuntime.jsx(style.Media,{src:l.landscape})]})}),l.portrait&&p&&jsxRuntime.jsx(Visibility.Visibility,{...E,sizes:constants.VISIBILITY_PORTRAIT,children:jsxRuntime.jsx(style.MediaPortraitContainer,{bottom:!0,children:jsxRuntime.jsxs(style.MediaPortrait,{children:[jsxRuntime.jsx(style.Placeholder,{orientation:"portrait",aspectRatio:"3:1"}),z?jsxRuntime.jsx(style.MediaSkeleton,{width:"100%",height:"100%",borderRadius:0,...c}):jsxRuntime.jsx(style.Media,{src:l.portrait})]})})})]})})),{sizes:e=>e.fancy?constants.SIZES_FANCY:constants.SIZES,displayName:'DialogComponent'});exports.SIZES=constants.SIZES,exports.SIZES_FANCY=constants.SIZES_FANCY,exports.DialogComponent=DialogComponent;
1
+ 'use strict';var React=require('react');var ResizeObserver=require('resize-observer-polyfill');var withMergedProps=require('../../hocs/withMergedProps.js');var constants$1=require('../../shared/constants.js');var dom=require('../../shared/utils/dom.js');var DialogContainer=require('./DialogContainer.js');var ProgressLineContainer=require('./ProgressLineContainer.js');var dragging=require('./images/dragging.svg.js');var style=require('./style.js');var utils=require('./utils.js');var constants=require('./constants.js');var jsxRuntime=require('react/jsx-runtime');var Visibility=require('../Visibility/Visibility.js');var Spacer=require('../Spacer/Spacer.js');var Icon=require('../Icon/Icon.js');var ProgressLine=require('../ProgressLine/ProgressLine.js');var Skeleton=require('../Skeleton/Skeleton.js');var Text=require('../Text/Text.js');var Button=require('../Button/Button.js');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var ResizeObserver__default=_interopDefault(ResizeObserver);const resizeHandlerSymbol=Symbol('resize-handler');const resizeObserver=new ResizeObserver__default.default((e=>{e.forEach((e=>{typeof e.target[resizeHandlerSymbol]=='function'&&e.target[resizeHandlerSymbol](e.target)}))}));const DialogComponent=withMergedProps.withMergedProps(React.forwardRef(((e,s)=>{const{size:t="s",iconButtonProps:i={},captionProps:n={},titleProps:r={},subtitleProps:o={},draggingIconProps:a={},imgSrc:l={},imgAspectRatio:c={},skeletonProps:x={},progressLineProps:d={},fancy:j,floats:u,children:m,caption:g,title:R,subtitle:p,controls:y,imgLandscapePositionRight:S,imgPortraitPositionBottom:h,className:I,backgroundClassName:b,scrollFadingDisabled:z,draggable:P,loading:T,progressLine:L,sizeXXS:v,sizeXS:f,sizeS:k,sizeM:C,sizeL:B,sizeXL:D,onGrab:w,onNudge:E,..._}=e;const M={size:t,sizeXXS:v,sizeXS:f,sizeS:k,sizeM:C,sizeL:B,sizeXL:D};const V=utils.getCommonSizeProps(M);const q=j?I:dom.concatClassNames(I,b);const[A,N]=React.useState(null);const[Z,O]=React.useState(null);const H=React.useRef(null);const Y=React.useCallback((e=>{e.scrollHeight===e.clientHeight?(N(null),O(null)):(N(e.scrollTop<=0),O(Math.abs(e.scrollHeight-e.clientHeight-e.scrollTop)<=1))}),[]);return React.useLayoutEffect((()=>{const e=H.current;return!z&&e&&(e[resizeHandlerSymbol]=Y,resizeObserver.observe(e)),()=>{e&&resizeObserver.unobserve(e)}}),[Y,z]),jsxRuntime.jsxs(style.Root,{..._,...M,className:q,fancy:j,ref:s,children:[u&&u(V),j&&jsxRuntime.jsx(style.FancyBackground,{className:b}),j&&i.onClick&&jsxRuntime.jsx(style.PositionedIconButton,{secondary:!0,size:"xxl",icon:"close",inset:{top:0,right:0},...i}),(P||l.portrait&&!h||j)&&jsxRuntime.jsxs(Visibility.Visibility,{...M,sizes:constants.VISIBILITY_PORTRAIT,children:[j&&jsxRuntime.jsx(Spacer.Spacer,{top:96}),P&&jsxRuntime.jsx(style.DraggingHandle,{onPointerDown:w,children:jsxRuntime.jsx(style.DraggingIconContainer,{tabIndex:0,onKeyDown:E,children:jsxRuntime.jsx(Icon.Icon,{icon:jsxRuntime.jsx(dragging.default,{}),size:34,color:"content-onmain-tertiary",...a})})}),l.portrait&&!h&&jsxRuntime.jsx(style.MediaPortraitContainer,{top:!j,children:jsxRuntime.jsxs(style.MediaPortrait,{children:[jsxRuntime.jsx(style.Placeholder,{orientation:"portrait",aspectRatio:c.portrait??'3:1'}),T?jsxRuntime.jsx(style.MediaSkeleton,{width:"100%",height:"100%",borderRadius:0,...x}):jsxRuntime.jsx(style.Media,{src:l.portrait})]})})]}),l.landscape&&!S&&jsxRuntime.jsx(Visibility.Visibility,{...M,sizes:constants.VISIBILITY_LANDSCAPE_MEDIA,children:jsxRuntime.jsxs(style.MediaLandscape,{children:[jsxRuntime.jsx(style.Placeholder,{orientation:"landscape",aspectRatio:c.landscape??'5:7'}),T?jsxRuntime.jsx(style.MediaSkeleton,{width:"100%",height:"100%",borderRadius:0,...x}):jsxRuntime.jsx(style.Media,{src:l.landscape})]})}),!j&&i.onClick&&jsxRuntime.jsx(style.PositionedIconButton,{size:"l",icon:"close",inset:{top:8,right:8},...i}),jsxRuntime.jsxs(DialogContainer.DialogContainer,{...M,fancy:j,children:[L&&!T&&jsxRuntime.jsx(Visibility.Visibility,{...M,sizes:constants.VISIBILITY_PORTRAIT,children:j||l.portrait&&!h?jsxRuntime.jsx(style.PositionedProgressLine,{size:"xs",...d,inset:{top:0,right:0,left:0}}):jsxRuntime.jsx(ProgressLineContainer.ProgressLineContainer,{...M,inset:{top:0,right:0,left:0},children:jsxRuntime.jsx(ProgressLine.ProgressLine,{size:"xs",...d})})}),(L&&!T||P)&&jsxRuntime.jsxs(Visibility.Visibility,{...M,sizes:constants.VISIBILITY_LANDSCAPE,children:[L&&!T&&jsxRuntime.jsx(ProgressLineContainer.ProgressLineContainer,{...M,inset:j?{right:0,bottom:0,left:0}:{top:0,right:0,left:0},children:jsxRuntime.jsx(ProgressLine.ProgressLine,{size:"xs",...d})}),P&&jsxRuntime.jsx(style.DraggingHandle,{onPointerDown:w,children:jsxRuntime.jsx(style.DraggingIconContainer,{tabIndex:0,onKeyDown:E,children:jsxRuntime.jsx(Icon.Icon,{icon:jsxRuntime.jsx(dragging.default,{}),size:34,color:"content-onmain-tertiary",...a})})})]}),!z&&jsxRuntime.jsx(style.Fading,{visible:A===!1}),jsxRuntime.jsx(style.ScrollableContent,{ref:H,tabIndex:0,onScroll:e=>{z||Y(e.currentTarget)},onKeyDown:e=>{constants$1.keyboardKeys.ArrowUp.validate(e.key)?(e.preventDefault(),e.currentTarget.scrollBy(0,-13)):constants$1.keyboardKeys.ArrowDown.validate(e.key)&&(e.preventDefault(),e.currentTarget.scrollBy(0,13))},children:jsxRuntime.jsxs(jsxRuntime.Fragment,T?{children:[jsxRuntime.jsx(Skeleton.Skeleton,{children:jsxRuntime.jsx(Text.Text,{appearance:"heading",marginBottom:"1.5em",sizes:constants.SIZES_TITLE,...V,...r})}),jsxRuntime.jsx(Skeleton.Skeleton,{width:"90%",children:jsxRuntime.jsx(Text.Text,{appearance:"body",marginBottom:"0.4em",sizes:constants.SIZES_SUBTITLE,...V,...o})}),jsxRuntime.jsx(Skeleton.Skeleton,{width:"70%",children:jsxRuntime.jsx(Text.Text,{appearance:"body",marginBottom:"0.4em",sizes:constants.SIZES_SUBTITLE,...V,...o})}),jsxRuntime.jsx(Skeleton.Skeleton,{width:"50%",children:jsxRuntime.jsx(Text.Text,{appearance:"body",marginBottom:"0.8em",sizes:constants.SIZES_SUBTITLE,...V,...o})})]}:{children:[g&&jsxRuntime.jsx(Text.Text,{appearance:"body",color:"content-onmain-tertiary",wordBreak:"break-word",marginBottom:"0.8em",sizes:constants.SIZES_CAPTION,...V,...n,children:g}),R&&jsxRuntime.jsx(Text.Text,{as:"h2",appearance:"heading",color:"content-onmain-primary",wordBreak:"break-word",marginBottom:"0.5em",sizes:constants.SIZES_TITLE,...V,...r,children:R}),p&&jsxRuntime.jsx(Text.Text,{as:"p",appearance:"body",color:"content-onmain-primary",wordBreak:"break-word",marginBottom:"0.8em",sizes:constants.SIZES_SUBTITLE,...V,...o,children:p}),typeof m=='function'?m(V):m]})}),!z&&jsxRuntime.jsx(style.Fading,{visible:Z===!1,after:!0}),y&&jsxRuntime.jsx(style.Controls,{children:T?jsxRuntime.jsx(Skeleton.Skeleton,{borderRadius:48,...x,children:jsxRuntime.jsx(Button.Button,{preset:"brand",...V})}):y(V)})]}),l.landscape&&S&&jsxRuntime.jsx(Visibility.Visibility,{...M,sizes:constants.VISIBILITY_LANDSCAPE_MEDIA,children:jsxRuntime.jsxs(style.MediaLandscape,{right:!0,children:[jsxRuntime.jsx(style.Placeholder,{orientation:"landscape",aspectRatio:c.landscape??'5:7'}),T?jsxRuntime.jsx(style.MediaSkeleton,{width:"100%",height:"100%",borderRadius:0,...x}):jsxRuntime.jsx(style.Media,{src:l.landscape})]})}),l.portrait&&h&&jsxRuntime.jsx(Visibility.Visibility,{...M,sizes:constants.VISIBILITY_PORTRAIT,children:jsxRuntime.jsx(style.MediaPortraitContainer,{bottom:!0,children:jsxRuntime.jsxs(style.MediaPortrait,{children:[jsxRuntime.jsx(style.Placeholder,{orientation:"portrait",aspectRatio:c.portrait??'3:1'}),T?jsxRuntime.jsx(style.MediaSkeleton,{width:"100%",height:"100%",borderRadius:0,...x}):jsxRuntime.jsx(style.Media,{src:l.portrait})]})})})]})})),{sizes:e=>e.fancy?constants.SIZES_FANCY:constants.SIZES,displayName:'DialogComponent'});exports.SIZES=constants.SIZES,exports.SIZES_FANCY=constants.SIZES_FANCY,exports.DialogComponent=DialogComponent;
2
2
  //# sourceMappingURL=DialogComponent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DialogComponent.js","sources":["../../../../src/components/DialogComponent/DialogComponent.tsx"],"sourcesContent":["import { forwardRef, useLayoutEffect, useRef, useState, useCallback } from 'react'\nimport ResizeObserver from 'resize-observer-polyfill'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { keyboardKeys } from 'shared/constants'\nimport { Text } from 'components/Text'\nimport { Icon } from 'components/Icon'\nimport { Visibility } from 'components/Visibility'\nimport { Skeleton } from 'components/Skeleton'\nimport { Button } from 'components/Button'\nimport { Spacer } from 'components/Spacer'\nimport { concatClassNames } from 'shared/utils/dom'\nimport type { Nullable } from 'shared/types'\nimport { DialogContainer } from './DialogContainer'\nimport Dragging from './images/dragging.svg?module'\nimport * as Styled from './style'\nimport { getCommonSizeProps } from './utils'\nimport {\n SIZES,\n SIZES_FANCY,\n SIZES_CAPTION,\n SIZES_TITLE,\n SIZES_SUBTITLE,\n VISIBILITY_PORTRAIT,\n VISIBILITY_LANDSCAPE,\n VISIBILITY_LANDSCAPE_MEDIA,\n} from './constants'\nimport type { DialogComponentProps } from './types'\n\nconst COMPONENT_NAME = 'DialogComponent'\n\nconst resizeHandlerSymbol = Symbol('resize-handler')\n\nconst resizeObserver = new ResizeObserver((entries) => {\n entries.forEach((entry) => {\n if (typeof entry.target[resizeHandlerSymbol] === 'function') {\n entry.target[resizeHandlerSymbol](entry.target)\n }\n })\n})\n\n/**\n *\n * Компонент поддерживает все атрибуты \\<div\\> элемента.\n *\n * Можно передать \"ref\", который будет ассоциирован с рутовым элементом.\n *\n * Поддерживаются пропсы определения размеров в зависимости от ширины вьюпорта.\n *\n * Полный интерфейс можно посмотреть [тут](https://github.com/foxford/ui/blob/master/src/components/DialogComponent/types.ts).\n */\nconst DialogComponent: React.ForwardRefExoticComponent<DialogComponentProps> = withMergedProps<\n DialogComponentProps,\n HTMLDivElement\n>(\n forwardRef((props, ref) => {\n const {\n size = 's',\n iconButtonProps = {},\n captionProps = {},\n titleProps = {},\n subtitleProps = {},\n draggingIconProps = {},\n imgSrc = {},\n skeletonProps = {},\n fancy,\n floats,\n children,\n caption,\n title,\n subtitle,\n controls,\n imgLandscapePositionRight,\n imgPortraitPositionBottom,\n className,\n backgroundClassName,\n scrollFadingDisabled,\n draggable,\n loading,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n onGrab,\n onNudge,\n ...restProps\n } = props\n\n const dialogSizeProps = {\n size,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n }\n\n const sizeProps = getCommonSizeProps(dialogSizeProps)\n\n const rootClassName = !fancy ? concatClassNames(className, backgroundClassName) : className\n\n const [scrollTop, setScrollTop] = useState<Nullable<boolean>>(null)\n const [scrollBottom, setScrollBottom] = useState<Nullable<boolean>>(null)\n\n const scrollable = useRef<HTMLDivElement | null>(null)\n\n const handleScrollThresholds = useCallback((e: HTMLDivElement) => {\n if (e.scrollHeight === e.clientHeight) {\n setScrollTop(null)\n setScrollBottom(null)\n } else {\n setScrollTop(e.scrollTop <= 0)\n setScrollBottom(Math.abs(e.scrollHeight - e.clientHeight - e.scrollTop) <= 1)\n }\n }, [])\n\n useLayoutEffect(() => {\n const observerTarget = scrollable.current\n\n if (!scrollFadingDisabled && observerTarget) {\n observerTarget[resizeHandlerSymbol] = handleScrollThresholds\n resizeObserver.observe(observerTarget)\n }\n\n return () => {\n if (observerTarget) {\n resizeObserver.unobserve(observerTarget)\n }\n }\n }, [handleScrollThresholds, scrollFadingDisabled])\n\n return (\n <Styled.Root {...restProps} {...dialogSizeProps} className={rootClassName} fancy={fancy} ref={ref}>\n {floats && floats(sizeProps)}\n {fancy && <Styled.FancyBackground className={backgroundClassName} />}\n {fancy && iconButtonProps.onClick && (\n <Styled.PositionedIconButton\n secondary\n size='xxl'\n icon='close'\n inset={{ top: 0, right: 0 }}\n {...iconButtonProps}\n />\n )}\n {(draggable || (imgSrc.portrait && !imgPortraitPositionBottom) || fancy) && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_PORTRAIT}>\n {fancy && <Spacer top={96} />}\n {draggable && (\n <Styled.DraggingHandle onPointerDown={onGrab}>\n <Styled.DraggingIconContainer tabIndex={0} onKeyDown={onNudge}>\n <Icon icon={<Dragging />} size={34} color='content-onmain-tertiary' {...draggingIconProps} />\n </Styled.DraggingIconContainer>\n </Styled.DraggingHandle>\n )}\n {imgSrc.portrait && !imgPortraitPositionBottom && (\n <Styled.MediaPortraitContainer top={!fancy}>\n <Styled.MediaPortrait>\n <Styled.Placeholder orientation='portrait' aspectRatio='3:1' />\n {loading ? (\n <Styled.MediaSkeleton width='100%' height='100%' borderRadius={0} {...skeletonProps} />\n ) : (\n <Styled.Media src={imgSrc.portrait} />\n )}\n </Styled.MediaPortrait>\n </Styled.MediaPortraitContainer>\n )}\n </Visibility>\n )}\n {imgSrc.landscape && !imgLandscapePositionRight && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_LANDSCAPE_MEDIA}>\n <Styled.MediaLandscape>\n <Styled.Placeholder orientation='landscape' aspectRatio='5:7' />\n {loading ? (\n <Styled.MediaSkeleton width='100%' height='100%' borderRadius={0} {...skeletonProps} />\n ) : (\n <Styled.Media src={imgSrc.landscape} />\n )}\n </Styled.MediaLandscape>\n </Visibility>\n )}\n {!fancy && iconButtonProps.onClick && (\n <Styled.PositionedIconButton size='l' icon='close' inset={{ top: 8, right: 8 }} {...iconButtonProps} />\n )}\n <DialogContainer {...dialogSizeProps} fancy={fancy}>\n {draggable && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_LANDSCAPE}>\n <Styled.DraggingHandle onPointerDown={onGrab}>\n <Styled.DraggingIconContainer tabIndex={0} onKeyDown={onNudge}>\n <Icon icon={<Dragging />} size={34} color='content-onmain-tertiary' {...draggingIconProps} />\n </Styled.DraggingIconContainer>\n </Styled.DraggingHandle>\n </Visibility>\n )}\n {!scrollFadingDisabled && <Styled.Fading visible={scrollTop === false} />}\n <Styled.ScrollableContent\n ref={scrollable}\n tabIndex={0}\n onScroll={(evt) => {\n if (!scrollFadingDisabled) {\n handleScrollThresholds(evt.currentTarget)\n }\n }}\n onKeyDown={(evt) => {\n if (keyboardKeys.ArrowUp.validate(evt.key)) {\n evt.preventDefault()\n evt.currentTarget.scrollBy(0, -13)\n } else if (keyboardKeys.ArrowDown.validate(evt.key)) {\n evt.preventDefault()\n evt.currentTarget.scrollBy(0, 13)\n }\n }}\n >\n {loading ? (\n <>\n <Skeleton>\n <Text appearance='heading' marginBottom='1.5em' sizes={SIZES_TITLE} {...sizeProps} {...titleProps} />\n </Skeleton>\n <Skeleton width='90%'>\n <Text\n appearance='body'\n marginBottom='0.4em'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...subtitleProps}\n />\n </Skeleton>\n <Skeleton width='70%'>\n <Text\n appearance='body'\n marginBottom='0.4em'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...subtitleProps}\n />\n </Skeleton>\n <Skeleton width='50%'>\n <Text\n appearance='body'\n marginBottom='0.8em'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...subtitleProps}\n />\n </Skeleton>\n </>\n ) : (\n <>\n {caption && (\n <Text\n appearance='body'\n color='content-onmain-tertiary'\n wordBreak='break-word'\n marginBottom='0.8em'\n sizes={SIZES_CAPTION}\n {...sizeProps}\n {...captionProps}\n >\n {caption}\n </Text>\n )}\n {title && (\n <Text\n as='h2'\n appearance='heading'\n color='content-onmain-primary'\n wordBreak='break-word'\n marginBottom='0.5em'\n sizes={SIZES_TITLE}\n {...sizeProps}\n {...titleProps}\n >\n {title}\n </Text>\n )}\n {subtitle && (\n <Text\n as='p'\n appearance='body'\n color='content-onmain-primary'\n wordBreak='break-word'\n marginBottom='0.8em'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...subtitleProps}\n >\n {subtitle}\n </Text>\n )}\n {typeof children === 'function' ? children(sizeProps) : children}\n </>\n )}\n </Styled.ScrollableContent>\n {!scrollFadingDisabled && <Styled.Fading visible={scrollBottom === false} after />}\n {controls && (\n <Styled.Controls>\n {loading ? (\n <Skeleton borderRadius={48} {...skeletonProps}>\n <Button preset='brand' {...sizeProps} />\n </Skeleton>\n ) : (\n controls(sizeProps)\n )}\n </Styled.Controls>\n )}\n </DialogContainer>\n {imgSrc.landscape && imgLandscapePositionRight && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_LANDSCAPE_MEDIA}>\n <Styled.MediaLandscape right>\n <Styled.Placeholder orientation='landscape' aspectRatio='5:7' />\n {loading ? (\n <Styled.MediaSkeleton width='100%' height='100%' borderRadius={0} {...skeletonProps} />\n ) : (\n <Styled.Media src={imgSrc.landscape} />\n )}\n </Styled.MediaLandscape>\n </Visibility>\n )}\n {imgSrc.portrait && imgPortraitPositionBottom && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_PORTRAIT}>\n <Styled.MediaPortraitContainer bottom>\n <Styled.MediaPortrait>\n <Styled.Placeholder orientation='portrait' aspectRatio='3:1' />\n {loading ? (\n <Styled.MediaSkeleton width='100%' height='100%' borderRadius={0} {...skeletonProps} />\n ) : (\n <Styled.Media src={imgSrc.portrait} />\n )}\n </Styled.MediaPortrait>\n </Styled.MediaPortraitContainer>\n </Visibility>\n )}\n </Styled.Root>\n )\n }),\n {\n sizes: (props) => (props.fancy ? SIZES_FANCY : SIZES),\n displayName: COMPONENT_NAME,\n }\n)\n\nexport { DialogComponent }\n\nexport { SIZES, SIZES_FANCY }\n"],"names":["resizeHandlerSymbol","Symbol","resizeObserver","ResizeObserver","default","entries","forEach","entry","target","DialogComponent","withMergedProps","forwardRef","props","ref","size","iconButtonProps","captionProps","titleProps","subtitleProps","draggingIconProps","imgSrc","skeletonProps","fancy","floats","children","caption","title","subtitle","controls","imgLandscapePositionRight","imgPortraitPositionBottom","className","backgroundClassName","scrollFadingDisabled","draggable","loading","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","onGrab","onNudge","restProps","dialogSizeProps","sizeProps","getCommonSizeProps","rootClassName","concatClassNames","scrollTop","setScrollTop","useState","scrollBottom","setScrollBottom","scrollable","useRef","handleScrollThresholds","useCallback","e","scrollHeight","clientHeight","Math","abs","useLayoutEffect","observerTarget","current","observe","unobserve","_jsxs","Styled","_jsx","jsx","onClick","secondary","icon","inset","top","right","portrait","jsxs","Visibility","sizes","VISIBILITY_PORTRAIT","Spacer","onPointerDown","tabIndex","onKeyDown","Icon","Dragging","color","orientation","aspectRatio","width","height","borderRadius","src","landscape","VISIBILITY_LANDSCAPE_MEDIA","DialogContainer","VISIBILITY_LANDSCAPE","visible","onScroll","evt","currentTarget","keyboardKeys","ArrowUp","validate","key","preventDefault","scrollBy","ArrowDown","_Fragment","Skeleton","Text","appearance","marginBottom","SIZES_TITLE","SIZES_SUBTITLE","wordBreak","SIZES_CAPTION","as","after","Button","preset","bottom","SIZES_FANCY","SIZES","displayName"],"mappings":"s3BA8BA,MAAMA,oBAAsBC,OAAO,kBAEnC,MAAMC,eAAiB,IAAIC,wBAAcC,SAAEC,IACzCA,EAAQC,SAASC,WACJA,EAAMC,OA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IAACyC,kBAAQ,CAAClB,aAAc,MAAQ1E,EAAaG,SAC3C+C,WAAAC,IAACmD,cAAM,CAACC,OAAO,WAAY9E,MAG7BlB,EAASkB,QAKhB1B,EAAO6E,WAAapE,GACnB0C,WAAAA,IAACU,WAAAA,WAAU,IAAKpC,EAAiBqC,MAAOgB,UAA2BA,2BAAA1E,SACjE6C,WAAAW,KAACV,qBAAqB,CAACQ,OAAK,EAAAtD,SAC1B+C,CAAAA,WAAAC,IAACF,kBAAkB,CAACqB,YAAY,YAAYC,YAAY,QACvDzD,EACCoC,WAAAC,IAACF,oBAAoB,CAACuB,MAAM,OAAOC,OAAO,OAAOC,aAAc,KAAO1E,IAEtEkD,WAAAC,IAACF,YAAY,CAAC0B,IAAK5E,EAAO6E,iBAKjC7E,EAAO2D,UAAYjD,GAClByC,WAAAA,IAACU,WAAAA,WAAU,IAAKpC,EAAiBqC,MAAOC,UAAoBA,oBAAA3D,SAC1D+C,WAAAC,IAACF,6BAA6B,CAACuD,QAAM,EAAArG,SACnC6C,WAAAW,KAACV,oBAAoB,CAAA9C,SACnB+C,CAAAA,WAAAC,IAACF,kBAAkB,CAACqB,YAAY,WAAWC,YAAY,QACtDzD,EACCoC,WAAAC,IAACF,oBAAoB,CAACuB,MAAM,OAAOC,OAAO,OAAOC,aAAc,KAAO1E,IAEtEkD,WAAAC,IAACF,YAAY,CAAC0B,IAAK5E,EAAO2D,oBAMxB,IAGlB,CACEG,MAAQtE,GAAWA,EAAMU,MAAQwG,UAAWA,YAAGC,UAAMA,MACrDC,YAtTmB"}
1
+ {"version":3,"file":"DialogComponent.js","sources":["../../../../src/components/DialogComponent/DialogComponent.tsx"],"sourcesContent":["import { forwardRef, useLayoutEffect, useRef, useState, useCallback } from 'react'\nimport ResizeObserver from 'resize-observer-polyfill'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { keyboardKeys } from 'shared/constants'\nimport { Text } from 'components/Text'\nimport { Icon } from 'components/Icon'\nimport { Visibility } from 'components/Visibility'\nimport { Skeleton } from 'components/Skeleton'\nimport { Button } from 'components/Button'\nimport { Spacer } from 'components/Spacer'\nimport { ProgressLine } from 'components/ProgressLine'\nimport { concatClassNames } from 'shared/utils/dom'\nimport type { Nullable } from 'shared/types'\nimport { DialogContainer } from './DialogContainer'\nimport { ProgressLineContainer } from './ProgressLineContainer'\nimport Dragging from './images/dragging.svg?module'\nimport * as Styled from './style'\nimport { getCommonSizeProps } from './utils'\nimport {\n SIZES,\n SIZES_FANCY,\n SIZES_CAPTION,\n SIZES_TITLE,\n SIZES_SUBTITLE,\n VISIBILITY_PORTRAIT,\n VISIBILITY_LANDSCAPE,\n VISIBILITY_LANDSCAPE_MEDIA,\n} from './constants'\nimport type { DialogComponentProps } from './types'\n\nconst COMPONENT_NAME = 'DialogComponent'\n\nconst resizeHandlerSymbol = Symbol('resize-handler')\n\nconst resizeObserver = new ResizeObserver((entries) => {\n entries.forEach((entry) => {\n if (typeof entry.target[resizeHandlerSymbol] === 'function') {\n entry.target[resizeHandlerSymbol](entry.target)\n }\n })\n})\n\n/**\n *\n * Компонент поддерживает все атрибуты \\<div\\> элемента.\n *\n * Можно передать \"ref\", который будет ассоциирован с рутовым элементом.\n *\n * Поддерживаются пропсы определения размеров в зависимости от ширины вьюпорта.\n *\n * Полный интерфейс можно посмотреть [тут](https://github.com/foxford/ui/blob/master/src/components/DialogComponent/types.ts).\n */\nconst DialogComponent: React.ForwardRefExoticComponent<DialogComponentProps> = withMergedProps<\n DialogComponentProps,\n HTMLDivElement\n>(\n forwardRef((props, ref) => {\n const {\n size = 's',\n iconButtonProps = {},\n captionProps = {},\n titleProps = {},\n subtitleProps = {},\n draggingIconProps = {},\n imgSrc = {},\n imgAspectRatio = {},\n skeletonProps = {},\n progressLineProps = {},\n fancy,\n floats,\n children,\n caption,\n title,\n subtitle,\n controls,\n imgLandscapePositionRight,\n imgPortraitPositionBottom,\n className,\n backgroundClassName,\n scrollFadingDisabled,\n draggable,\n loading,\n progressLine,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n onGrab,\n onNudge,\n ...restProps\n } = props\n\n const dialogSizeProps = {\n size,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n }\n\n const sizeProps = getCommonSizeProps(dialogSizeProps)\n\n const rootClassName = !fancy ? concatClassNames(className, backgroundClassName) : className\n\n const [scrollTop, setScrollTop] = useState<Nullable<boolean>>(null)\n const [scrollBottom, setScrollBottom] = useState<Nullable<boolean>>(null)\n\n const scrollable = useRef<HTMLDivElement | null>(null)\n\n const handleScrollThresholds = useCallback((e: HTMLDivElement) => {\n if (e.scrollHeight === e.clientHeight) {\n setScrollTop(null)\n setScrollBottom(null)\n } else {\n setScrollTop(e.scrollTop <= 0)\n setScrollBottom(Math.abs(e.scrollHeight - e.clientHeight - e.scrollTop) <= 1)\n }\n }, [])\n\n useLayoutEffect(() => {\n const observerTarget = scrollable.current\n\n if (!scrollFadingDisabled && observerTarget) {\n observerTarget[resizeHandlerSymbol] = handleScrollThresholds\n resizeObserver.observe(observerTarget)\n }\n\n return () => {\n if (observerTarget) {\n resizeObserver.unobserve(observerTarget)\n }\n }\n }, [handleScrollThresholds, scrollFadingDisabled])\n\n return (\n <Styled.Root {...restProps} {...dialogSizeProps} className={rootClassName} fancy={fancy} ref={ref}>\n {floats && floats(sizeProps)}\n {fancy && <Styled.FancyBackground className={backgroundClassName} />}\n {fancy && iconButtonProps.onClick && (\n <Styled.PositionedIconButton\n secondary\n size='xxl'\n icon='close'\n inset={{ top: 0, right: 0 }}\n {...iconButtonProps}\n />\n )}\n {(draggable || (imgSrc.portrait && !imgPortraitPositionBottom) || fancy) && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_PORTRAIT}>\n {fancy && <Spacer top={96} />}\n {draggable && (\n <Styled.DraggingHandle onPointerDown={onGrab}>\n <Styled.DraggingIconContainer tabIndex={0} onKeyDown={onNudge}>\n <Icon icon={<Dragging />} size={34} color='content-onmain-tertiary' {...draggingIconProps} />\n </Styled.DraggingIconContainer>\n </Styled.DraggingHandle>\n )}\n {imgSrc.portrait && !imgPortraitPositionBottom && (\n <Styled.MediaPortraitContainer top={!fancy}>\n <Styled.MediaPortrait>\n <Styled.Placeholder orientation='portrait' aspectRatio={imgAspectRatio.portrait ?? '3:1'} />\n {loading ? (\n <Styled.MediaSkeleton width='100%' height='100%' borderRadius={0} {...skeletonProps} />\n ) : (\n <Styled.Media src={imgSrc.portrait} />\n )}\n </Styled.MediaPortrait>\n </Styled.MediaPortraitContainer>\n )}\n </Visibility>\n )}\n {imgSrc.landscape && !imgLandscapePositionRight && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_LANDSCAPE_MEDIA}>\n <Styled.MediaLandscape>\n <Styled.Placeholder orientation='landscape' aspectRatio={imgAspectRatio.landscape ?? '5:7'} />\n {loading ? (\n <Styled.MediaSkeleton width='100%' height='100%' borderRadius={0} {...skeletonProps} />\n ) : (\n <Styled.Media src={imgSrc.landscape} />\n )}\n </Styled.MediaLandscape>\n </Visibility>\n )}\n {!fancy && iconButtonProps.onClick && (\n <Styled.PositionedIconButton size='l' icon='close' inset={{ top: 8, right: 8 }} {...iconButtonProps} />\n )}\n <DialogContainer {...dialogSizeProps} fancy={fancy}>\n {progressLine && !loading && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_PORTRAIT}>\n {fancy || (imgSrc.portrait && !imgPortraitPositionBottom) ? (\n <Styled.PositionedProgressLine size='xs' {...progressLineProps} inset={{ top: 0, right: 0, left: 0 }} />\n ) : (\n <ProgressLineContainer {...dialogSizeProps} inset={{ top: 0, right: 0, left: 0 }}>\n <ProgressLine size='xs' {...progressLineProps} />\n </ProgressLineContainer>\n )}\n </Visibility>\n )}\n {((progressLine && !loading) || draggable) && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_LANDSCAPE}>\n {progressLine && !loading && (\n <ProgressLineContainer\n {...dialogSizeProps}\n inset={fancy ? { right: 0, bottom: 0, left: 0 } : { top: 0, right: 0, left: 0 }}\n >\n <ProgressLine size='xs' {...progressLineProps} />\n </ProgressLineContainer>\n )}\n {draggable && (\n <Styled.DraggingHandle onPointerDown={onGrab}>\n <Styled.DraggingIconContainer tabIndex={0} onKeyDown={onNudge}>\n <Icon icon={<Dragging />} size={34} color='content-onmain-tertiary' {...draggingIconProps} />\n </Styled.DraggingIconContainer>\n </Styled.DraggingHandle>\n )}\n </Visibility>\n )}\n {!scrollFadingDisabled && <Styled.Fading visible={scrollTop === false} />}\n <Styled.ScrollableContent\n ref={scrollable}\n tabIndex={0}\n onScroll={(evt) => {\n if (!scrollFadingDisabled) {\n handleScrollThresholds(evt.currentTarget)\n }\n }}\n onKeyDown={(evt) => {\n if (keyboardKeys.ArrowUp.validate(evt.key)) {\n evt.preventDefault()\n evt.currentTarget.scrollBy(0, -13)\n } else if (keyboardKeys.ArrowDown.validate(evt.key)) {\n evt.preventDefault()\n evt.currentTarget.scrollBy(0, 13)\n }\n }}\n >\n {loading ? (\n <>\n <Skeleton>\n <Text appearance='heading' marginBottom='1.5em' sizes={SIZES_TITLE} {...sizeProps} {...titleProps} />\n </Skeleton>\n <Skeleton width='90%'>\n <Text\n appearance='body'\n marginBottom='0.4em'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...subtitleProps}\n />\n </Skeleton>\n <Skeleton width='70%'>\n <Text\n appearance='body'\n marginBottom='0.4em'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...subtitleProps}\n />\n </Skeleton>\n <Skeleton width='50%'>\n <Text\n appearance='body'\n marginBottom='0.8em'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...subtitleProps}\n />\n </Skeleton>\n </>\n ) : (\n <>\n {caption && (\n <Text\n appearance='body'\n color='content-onmain-tertiary'\n wordBreak='break-word'\n marginBottom='0.8em'\n sizes={SIZES_CAPTION}\n {...sizeProps}\n {...captionProps}\n >\n {caption}\n </Text>\n )}\n {title && (\n <Text\n as='h2'\n appearance='heading'\n color='content-onmain-primary'\n wordBreak='break-word'\n marginBottom='0.5em'\n sizes={SIZES_TITLE}\n {...sizeProps}\n {...titleProps}\n >\n {title}\n </Text>\n )}\n {subtitle && (\n <Text\n as='p'\n appearance='body'\n color='content-onmain-primary'\n wordBreak='break-word'\n marginBottom='0.8em'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...subtitleProps}\n >\n {subtitle}\n </Text>\n )}\n {typeof children === 'function' ? children(sizeProps) : children}\n </>\n )}\n </Styled.ScrollableContent>\n {!scrollFadingDisabled && <Styled.Fading visible={scrollBottom === false} after />}\n {controls && (\n <Styled.Controls>\n {loading ? (\n <Skeleton borderRadius={48} {...skeletonProps}>\n <Button preset='brand' {...sizeProps} />\n </Skeleton>\n ) : (\n controls(sizeProps)\n )}\n </Styled.Controls>\n )}\n </DialogContainer>\n {imgSrc.landscape && imgLandscapePositionRight && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_LANDSCAPE_MEDIA}>\n <Styled.MediaLandscape right>\n <Styled.Placeholder orientation='landscape' aspectRatio={imgAspectRatio.landscape ?? '5:7'} />\n {loading ? (\n <Styled.MediaSkeleton width='100%' height='100%' borderRadius={0} {...skeletonProps} />\n ) : (\n <Styled.Media src={imgSrc.landscape} />\n )}\n </Styled.MediaLandscape>\n </Visibility>\n )}\n {imgSrc.portrait && imgPortraitPositionBottom && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_PORTRAIT}>\n <Styled.MediaPortraitContainer bottom>\n <Styled.MediaPortrait>\n <Styled.Placeholder orientation='portrait' aspectRatio={imgAspectRatio.portrait ?? '3:1'} />\n {loading ? (\n <Styled.MediaSkeleton width='100%' height='100%' borderRadius={0} {...skeletonProps} />\n ) : (\n <Styled.Media src={imgSrc.portrait} />\n )}\n </Styled.MediaPortrait>\n </Styled.MediaPortraitContainer>\n </Visibility>\n )}\n </Styled.Root>\n )\n }),\n {\n sizes: (props) => (props.fancy ? SIZES_FANCY : SIZES),\n displayName: COMPONENT_NAME,\n }\n)\n\nexport { DialogComponent }\n\nexport { SIZES, SIZES_FANCY }\n"],"names":["resizeHandlerSymbol","Symbol","resizeObserver","ResizeObserver","default","entries","forEach","entry","target","DialogComponent","withMergedProps","forwardRef","props","ref","size","iconButtonProps","captionProps","titleProps","subtitleProps","draggingIconProps","imgSrc","imgAspectRatio","skeletonProps","progressLineProps","fancy","floats","children","caption","title","subtitle","controls","imgLandscapePositionRight","imgPortraitPositionBottom","className","backgroundClassName","scrollFadingDisabled","draggable","loading","progressLine","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","onGrab","onNudge","restProps","dialogSizeProps","sizeProps","getCommonSizeProps","rootClassName","concatClassNames","scrollTop","setScrollTop","useState","scrollBottom","setScrollBottom","scrollable","useRef","handleScrollThresholds","useCallback","e","scrollHeight","clientHeight","Math","abs","useLayoutEffect","observerTarget","current","observe","unobserve","_jsxs","Styled","_jsx","jsx","onClick","secondary","icon","inset","top","right","portrait","jsxs","Visibility","sizes","VISIBILITY_PORTRAIT","Spacer","onPointerDown","tabIndex","onKeyDown","Icon","Dragging","color","orientation","aspectRatio","width","height","borderRadius","src","landscape","VISIBILITY_LANDSCAPE_MEDIA","DialogContainer","left","ProgressLineContainer","ProgressLine","VISIBILITY_LANDSCAPE","bottom","visible","onScroll","evt","currentTarget","keyboardKeys","ArrowUp","validate","key","preventDefault","scrollBy","ArrowDown","_Fragment","Skeleton","Text","appearance","marginBottom","SIZES_TITLE","SIZES_SUBTITLE","wordBreak","SIZES_CAPTION","as","after","Button","preset","SIZES_FANCY","SIZES","displayName"],"mappings":"k/BAgCA,MAAMA,oBAAsBC,OAAO,kBAEnC,MAAMC,eAAiB,IAAIC,wBAAcC,SAAEC,IACzCA,EAAQC,SAASC,WACJA,EAAMC,OAAOR,sBAAyB,YAC/CO,EAAMC,OAAOR,qBAAqBO,EAAMC,OAC1C,GACA,IAaEC,MAAAA,gBAAyEC,gBAAAA,gBAI7EC,MAAAA,YAAW,CAACC,EAAOC,K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AAoBA,oBAAA5D,SAC1DgD,WAAAC,IAACF,6BAA6B,CAACkC,QAAM,EAAAjF,SACnC8C,WAAAW,KAACV,oBAAoB,CAAA/C,SACnBgD,CAAAA,WAAAC,IAACF,kBAAkB,CAACqB,YAAY,WAAWC,YAAa1E,EAAe6D,UAAY,QAClF7C,EACCqC,WAAAC,IAACF,oBAAoB,CAACuB,MAAM,OAAOC,OAAO,OAAOC,aAAc,KAAO5E,IAEtEoD,WAAAC,IAACF,YAAY,CAAC0B,IAAK/E,EAAO8D,oBAMxB,IAGlB,CACEG,MAAQzE,GAAWA,EAAMY,MAAQ4G,UAAWA,YAAGC,UAAMA,MACrDC,YA9UmB"}
@@ -1,2 +1,2 @@
1
- import{forwardRef,useState,useRef,useCallback,useLayoutEffect}from'react';import ResizeObserver from'resize-observer-polyfill';import{withMergedProps}from'../../hocs/withMergedProps.mjs';import{keyboardKeys}from'../../shared/constants.mjs';import{concatClassNames}from'../../shared/utils/dom.mjs';import{DialogContainer}from'./DialogContainer.mjs';import SvgDragging from'./images/dragging.svg.mjs';import{Root,FancyBackground,PositionedIconButton,DraggingHandle,DraggingIconContainer,MediaPortraitContainer,MediaPortrait,Placeholder,MediaSkeleton,Media,MediaLandscape,Fading,ScrollableContent,Controls}from'./style.mjs';import{getCommonSizeProps}from'./utils.mjs';import{SIZES_FANCY,SIZES,VISIBILITY_PORTRAIT,VISIBILITY_LANDSCAPE_MEDIA,VISIBILITY_LANDSCAPE,SIZES_TITLE,SIZES_SUBTITLE,SIZES_CAPTION}from'./constants.mjs';import{jsxs,jsx,Fragment}from'react/jsx-runtime';import{Visibility}from'../Visibility/Visibility.mjs';import{Spacer}from'../Spacer/Spacer.mjs';import{Icon}from'../Icon/Icon.mjs';import{Skeleton}from'../Skeleton/Skeleton.mjs';import{Text}from'../Text/Text.mjs';import{Button}from'../Button/Button.mjs';const resizeHandlerSymbol=Symbol('resize-handler');const resizeObserver=new ResizeObserver((e=>{e.forEach((e=>{typeof e.target[resizeHandlerSymbol]=='function'&&e.target[resizeHandlerSymbol](e.target)}))}));const DialogComponent=withMergedProps(forwardRef(((e,o)=>{const{size:i="s",iconButtonProps:r={},captionProps:t={},titleProps:s={},subtitleProps:n={},draggingIconProps:a={},imgSrc:l={},skeletonProps:c={},fancy:d,floats:m,children:g,caption:p,title:S,subtitle:I,controls:x,imgLandscapePositionRight:j,imgPortraitPositionBottom:h,className:b,backgroundClassName:y,scrollFadingDisabled:u,draggable:T,loading:z,sizeXXS:f,sizeXS:P,sizeS:B,sizeM:C,sizeL:E,sizeXL:k,onGrab:D,onNudge:L,...M}=e;const w={size:i,sizeXXS:f,sizeXS:P,sizeS:B,sizeM:C,sizeL:E,sizeXL:k};const R=getCommonSizeProps(w);const _=d?b:concatClassNames(b,y);const[A,v]=useState(null);const[N,V]=useState(null);const Z=useRef(null);const F=useCallback((e=>{e.scrollHeight===e.clientHeight?(v(null),V(null)):(v(e.scrollTop<=0),V(Math.abs(e.scrollHeight-e.clientHeight-e.scrollTop)<=1))}),[]);return useLayoutEffect((()=>{const e=Z.current;return!u&&e&&(e[resizeHandlerSymbol]=F,resizeObserver.observe(e)),()=>{e&&resizeObserver.unobserve(e)}}),[F,u]),jsxs(Root,{...M,...w,className:_,fancy:d,ref:o,children:[m&&m(R),d&&jsx(FancyBackground,{className:y}),d&&r.onClick&&jsx(PositionedIconButton,{secondary:!0,size:"xxl",icon:"close",inset:{top:0,right:0},...r}),(T||l.portrait&&!h||d)&&jsxs(Visibility,{...w,sizes:VISIBILITY_PORTRAIT,children:[d&&jsx(Spacer,{top:96}),T&&jsx(DraggingHandle,{onPointerDown:D,children:jsx(DraggingIconContainer,{tabIndex:0,onKeyDown:L,children:jsx(Icon,{icon:jsx(SvgDragging,{}),size:34,color:"content-onmain-tertiary",...a})})}),l.portrait&&!h&&jsx(MediaPortraitContainer,{top:!d,children:jsxs(MediaPortrait,{children:[jsx(Placeholder,{orientation:"portrait",aspectRatio:"3:1"}),z?jsx(MediaSkeleton,{width:"100%",height:"100%",borderRadius:0,...c}):jsx(Media,{src:l.portrait})]})})]}),l.landscape&&!j&&jsx(Visibility,{...w,sizes:VISIBILITY_LANDSCAPE_MEDIA,children:jsxs(MediaLandscape,{children:[jsx(Placeholder,{orientation:"landscape",aspectRatio:"5:7"}),z?jsx(MediaSkeleton,{width:"100%",height:"100%",borderRadius:0,...c}):jsx(Media,{src:l.landscape})]})}),!d&&r.onClick&&jsx(PositionedIconButton,{size:"l",icon:"close",inset:{top:8,right:8},...r}),jsxs(DialogContainer,{...w,fancy:d,children:[T&&jsx(Visibility,{...w,sizes:VISIBILITY_LANDSCAPE,children:jsx(DraggingHandle,{onPointerDown:D,children:jsx(DraggingIconContainer,{tabIndex:0,onKeyDown:L,children:jsx(Icon,{icon:jsx(SvgDragging,{}),size:34,color:"content-onmain-tertiary",...a})})})}),!u&&jsx(Fading,{visible:A===!1}),jsx(ScrollableContent,{ref:Z,tabIndex:0,onScroll:e=>{u||F(e.currentTarget)},onKeyDown:e=>{keyboardKeys.ArrowUp.validate(e.key)?(e.preventDefault(),e.currentTarget.scrollBy(0,-13)):keyboardKeys.ArrowDown.validate(e.key)&&(e.preventDefault(),e.currentTarget.scrollBy(0,13))},children:jsxs(Fragment,z?{children:[jsx(Skeleton,{children:jsx(Text,{appearance:"heading",marginBottom:"1.5em",sizes:SIZES_TITLE,...R,...s})}),jsx(Skeleton,{width:"90%",children:jsx(Text,{appearance:"body",marginBottom:"0.4em",sizes:SIZES_SUBTITLE,...R,...n})}),jsx(Skeleton,{width:"70%",children:jsx(Text,{appearance:"body",marginBottom:"0.4em",sizes:SIZES_SUBTITLE,...R,...n})}),jsx(Skeleton,{width:"50%",children:jsx(Text,{appearance:"body",marginBottom:"0.8em",sizes:SIZES_SUBTITLE,...R,...n})})]}:{children:[p&&jsx(Text,{appearance:"body",color:"content-onmain-tertiary",wordBreak:"break-word",marginBottom:"0.8em",sizes:SIZES_CAPTION,...R,...t,children:p}),S&&jsx(Text,{as:"h2",appearance:"heading",color:"content-onmain-primary",wordBreak:"break-word",marginBottom:"0.5em",sizes:SIZES_TITLE,...R,...s,children:S}),I&&jsx(Text,{as:"p",appearance:"body",color:"content-onmain-primary",wordBreak:"break-word",marginBottom:"0.8em",sizes:SIZES_SUBTITLE,...R,...n,children:I}),typeof g=='function'?g(R):g]})}),!u&&jsx(Fading,{visible:N===!1,after:!0}),x&&jsx(Controls,{children:z?jsx(Skeleton,{borderRadius:48,...c,children:jsx(Button,{preset:"brand",...R})}):x(R)})]}),l.landscape&&j&&jsx(Visibility,{...w,sizes:VISIBILITY_LANDSCAPE_MEDIA,children:jsxs(MediaLandscape,{right:!0,children:[jsx(Placeholder,{orientation:"landscape",aspectRatio:"5:7"}),z?jsx(MediaSkeleton,{width:"100%",height:"100%",borderRadius:0,...c}):jsx(Media,{src:l.landscape})]})}),l.portrait&&h&&jsx(Visibility,{...w,sizes:VISIBILITY_PORTRAIT,children:jsx(MediaPortraitContainer,{bottom:!0,children:jsxs(MediaPortrait,{children:[jsx(Placeholder,{orientation:"portrait",aspectRatio:"3:1"}),z?jsx(MediaSkeleton,{width:"100%",height:"100%",borderRadius:0,...c}):jsx(Media,{src:l.portrait})]})})})]})})),{sizes:e=>e.fancy?SIZES_FANCY:SIZES,displayName:'DialogComponent'});export{DialogComponent,SIZES,SIZES_FANCY};
1
+ import{forwardRef,useState,useRef,useCallback,useLayoutEffect}from'react';import ResizeObserver from'resize-observer-polyfill';import{withMergedProps}from'../../hocs/withMergedProps.mjs';import{keyboardKeys}from'../../shared/constants.mjs';import{concatClassNames}from'../../shared/utils/dom.mjs';import{DialogContainer}from'./DialogContainer.mjs';import{ProgressLineContainer}from'./ProgressLineContainer.mjs';import SvgDragging from'./images/dragging.svg.mjs';import{Root,FancyBackground,PositionedIconButton,DraggingHandle,DraggingIconContainer,MediaPortraitContainer,MediaPortrait,Placeholder,MediaSkeleton,Media,MediaLandscape,PositionedProgressLine,Fading,ScrollableContent,Controls}from'./style.mjs';import{getCommonSizeProps}from'./utils.mjs';import{SIZES_FANCY,SIZES,VISIBILITY_PORTRAIT,VISIBILITY_LANDSCAPE_MEDIA,VISIBILITY_LANDSCAPE,SIZES_TITLE,SIZES_SUBTITLE,SIZES_CAPTION}from'./constants.mjs';import{jsxs,jsx,Fragment}from'react/jsx-runtime';import{Visibility}from'../Visibility/Visibility.mjs';import{Spacer}from'../Spacer/Spacer.mjs';import{Icon}from'../Icon/Icon.mjs';import{ProgressLine}from'../ProgressLine/ProgressLine.mjs';import{Skeleton}from'../Skeleton/Skeleton.mjs';import{Text}from'../Text/Text.mjs';import{Button}from'../Button/Button.mjs';const resizeHandlerSymbol=Symbol('resize-handler');const resizeObserver=new ResizeObserver((e=>{e.forEach((e=>{typeof e.target[resizeHandlerSymbol]=='function'&&e.target[resizeHandlerSymbol](e.target)}))}));const DialogComponent=withMergedProps(forwardRef(((e,r)=>{const{size:i="s",iconButtonProps:o={},captionProps:s={},titleProps:t={},subtitleProps:n={},draggingIconProps:a={},imgSrc:l={},imgAspectRatio:c={},skeletonProps:d={},progressLineProps:m={},fancy:g,floats:p,children:S,caption:I,title:x,subtitle:j,controls:h,imgLandscapePositionRight:b,imgPortraitPositionBottom:P,className:y,backgroundClassName:T,scrollFadingDisabled:f,draggable:u,loading:z,progressLine:L,sizeXXS:C,sizeXS:B,sizeS:E,sizeM:k,sizeL:D,sizeXL:M,onGrab:w,onNudge:R,...A}=e;const _={size:i,sizeXXS:C,sizeXS:B,sizeS:E,sizeM:k,sizeL:D,sizeXL:M};const v=getCommonSizeProps(_);const N=g?y:concatClassNames(y,T);const[V,Z]=useState(null);const[Y,F]=useState(null);const H=useRef(null);const O=useCallback((e=>{e.scrollHeight===e.clientHeight?(Z(null),F(null)):(Z(e.scrollTop<=0),F(Math.abs(e.scrollHeight-e.clientHeight-e.scrollTop)<=1))}),[]);return useLayoutEffect((()=>{const e=H.current;return!f&&e&&(e[resizeHandlerSymbol]=O,resizeObserver.observe(e)),()=>{e&&resizeObserver.unobserve(e)}}),[O,f]),jsxs(Root,{...A,..._,className:N,fancy:g,ref:r,children:[p&&p(v),g&&jsx(FancyBackground,{className:T}),g&&o.onClick&&jsx(PositionedIconButton,{secondary:!0,size:"xxl",icon:"close",inset:{top:0,right:0},...o}),(u||l.portrait&&!P||g)&&jsxs(Visibility,{..._,sizes:VISIBILITY_PORTRAIT,children:[g&&jsx(Spacer,{top:96}),u&&jsx(DraggingHandle,{onPointerDown:w,children:jsx(DraggingIconContainer,{tabIndex:0,onKeyDown:R,children:jsx(Icon,{icon:jsx(SvgDragging,{}),size:34,color:"content-onmain-tertiary",...a})})}),l.portrait&&!P&&jsx(MediaPortraitContainer,{top:!g,children:jsxs(MediaPortrait,{children:[jsx(Placeholder,{orientation:"portrait",aspectRatio:c.portrait??'3:1'}),z?jsx(MediaSkeleton,{width:"100%",height:"100%",borderRadius:0,...d}):jsx(Media,{src:l.portrait})]})})]}),l.landscape&&!b&&jsx(Visibility,{..._,sizes:VISIBILITY_LANDSCAPE_MEDIA,children:jsxs(MediaLandscape,{children:[jsx(Placeholder,{orientation:"landscape",aspectRatio:c.landscape??'5:7'}),z?jsx(MediaSkeleton,{width:"100%",height:"100%",borderRadius:0,...d}):jsx(Media,{src:l.landscape})]})}),!g&&o.onClick&&jsx(PositionedIconButton,{size:"l",icon:"close",inset:{top:8,right:8},...o}),jsxs(DialogContainer,{..._,fancy:g,children:[L&&!z&&jsx(Visibility,{..._,sizes:VISIBILITY_PORTRAIT,children:g||l.portrait&&!P?jsx(PositionedProgressLine,{size:"xs",...m,inset:{top:0,right:0,left:0}}):jsx(ProgressLineContainer,{..._,inset:{top:0,right:0,left:0},children:jsx(ProgressLine,{size:"xs",...m})})}),(L&&!z||u)&&jsxs(Visibility,{..._,sizes:VISIBILITY_LANDSCAPE,children:[L&&!z&&jsx(ProgressLineContainer,{..._,inset:g?{right:0,bottom:0,left:0}:{top:0,right:0,left:0},children:jsx(ProgressLine,{size:"xs",...m})}),u&&jsx(DraggingHandle,{onPointerDown:w,children:jsx(DraggingIconContainer,{tabIndex:0,onKeyDown:R,children:jsx(Icon,{icon:jsx(SvgDragging,{}),size:34,color:"content-onmain-tertiary",...a})})})]}),!f&&jsx(Fading,{visible:V===!1}),jsx(ScrollableContent,{ref:H,tabIndex:0,onScroll:e=>{f||O(e.currentTarget)},onKeyDown:e=>{keyboardKeys.ArrowUp.validate(e.key)?(e.preventDefault(),e.currentTarget.scrollBy(0,-13)):keyboardKeys.ArrowDown.validate(e.key)&&(e.preventDefault(),e.currentTarget.scrollBy(0,13))},children:jsxs(Fragment,z?{children:[jsx(Skeleton,{children:jsx(Text,{appearance:"heading",marginBottom:"1.5em",sizes:SIZES_TITLE,...v,...t})}),jsx(Skeleton,{width:"90%",children:jsx(Text,{appearance:"body",marginBottom:"0.4em",sizes:SIZES_SUBTITLE,...v,...n})}),jsx(Skeleton,{width:"70%",children:jsx(Text,{appearance:"body",marginBottom:"0.4em",sizes:SIZES_SUBTITLE,...v,...n})}),jsx(Skeleton,{width:"50%",children:jsx(Text,{appearance:"body",marginBottom:"0.8em",sizes:SIZES_SUBTITLE,...v,...n})})]}:{children:[I&&jsx(Text,{appearance:"body",color:"content-onmain-tertiary",wordBreak:"break-word",marginBottom:"0.8em",sizes:SIZES_CAPTION,...v,...s,children:I}),x&&jsx(Text,{as:"h2",appearance:"heading",color:"content-onmain-primary",wordBreak:"break-word",marginBottom:"0.5em",sizes:SIZES_TITLE,...v,...t,children:x}),j&&jsx(Text,{as:"p",appearance:"body",color:"content-onmain-primary",wordBreak:"break-word",marginBottom:"0.8em",sizes:SIZES_SUBTITLE,...v,...n,children:j}),typeof S=='function'?S(v):S]})}),!f&&jsx(Fading,{visible:Y===!1,after:!0}),h&&jsx(Controls,{children:z?jsx(Skeleton,{borderRadius:48,...d,children:jsx(Button,{preset:"brand",...v})}):h(v)})]}),l.landscape&&b&&jsx(Visibility,{..._,sizes:VISIBILITY_LANDSCAPE_MEDIA,children:jsxs(MediaLandscape,{right:!0,children:[jsx(Placeholder,{orientation:"landscape",aspectRatio:c.landscape??'5:7'}),z?jsx(MediaSkeleton,{width:"100%",height:"100%",borderRadius:0,...d}):jsx(Media,{src:l.landscape})]})}),l.portrait&&P&&jsx(Visibility,{..._,sizes:VISIBILITY_PORTRAIT,children:jsx(MediaPortraitContainer,{bottom:!0,children:jsxs(MediaPortrait,{children:[jsx(Placeholder,{orientation:"portrait",aspectRatio:c.portrait??'3:1'}),z?jsx(MediaSkeleton,{width:"100%",height:"100%",borderRadius:0,...d}):jsx(Media,{src:l.portrait})]})})})]})})),{sizes:e=>e.fancy?SIZES_FANCY:SIZES,displayName:'DialogComponent'});export{DialogComponent,SIZES,SIZES_FANCY};
2
2
  //# sourceMappingURL=DialogComponent.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"DialogComponent.mjs","sources":["../../../../src/components/DialogComponent/DialogComponent.tsx"],"sourcesContent":["import { forwardRef, useLayoutEffect, useRef, useState, useCallback } from 'react'\nimport ResizeObserver from 'resize-observer-polyfill'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { keyboardKeys } from 'shared/constants'\nimport { Text } from 'components/Text'\nimport { Icon } from 'components/Icon'\nimport { Visibility } from 'components/Visibility'\nimport { Skeleton } from 'components/Skeleton'\nimport { Button } from 'components/Button'\nimport { Spacer } from 'components/Spacer'\nimport { concatClassNames } from 'shared/utils/dom'\nimport type { Nullable } from 'shared/types'\nimport { DialogContainer } from './DialogContainer'\nimport Dragging from './images/dragging.svg?module'\nimport * as Styled from './style'\nimport { getCommonSizeProps } from './utils'\nimport {\n SIZES,\n SIZES_FANCY,\n SIZES_CAPTION,\n SIZES_TITLE,\n SIZES_SUBTITLE,\n VISIBILITY_PORTRAIT,\n VISIBILITY_LANDSCAPE,\n VISIBILITY_LANDSCAPE_MEDIA,\n} from './constants'\nimport type { DialogComponentProps } from './types'\n\nconst COMPONENT_NAME = 'DialogComponent'\n\nconst resizeHandlerSymbol = Symbol('resize-handler')\n\nconst resizeObserver = new ResizeObserver((entries) => {\n entries.forEach((entry) => {\n if (typeof entry.target[resizeHandlerSymbol] === 'function') {\n entry.target[resizeHandlerSymbol](entry.target)\n }\n })\n})\n\n/**\n *\n * Компонент поддерживает все атрибуты \\<div\\> элемента.\n *\n * Можно передать \"ref\", который будет ассоциирован с рутовым элементом.\n *\n * Поддерживаются пропсы определения размеров в зависимости от ширины вьюпорта.\n *\n * Полный интерфейс можно посмотреть [тут](https://github.com/foxford/ui/blob/master/src/components/DialogComponent/types.ts).\n */\nconst DialogComponent: React.ForwardRefExoticComponent<DialogComponentProps> = withMergedProps<\n DialogComponentProps,\n HTMLDivElement\n>(\n forwardRef((props, ref) => {\n const {\n size = 's',\n iconButtonProps = {},\n captionProps = {},\n titleProps = {},\n subtitleProps = {},\n draggingIconProps = {},\n imgSrc = {},\n skeletonProps = {},\n fancy,\n floats,\n children,\n caption,\n title,\n subtitle,\n controls,\n imgLandscapePositionRight,\n imgPortraitPositionBottom,\n className,\n backgroundClassName,\n scrollFadingDisabled,\n draggable,\n loading,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n onGrab,\n onNudge,\n ...restProps\n } = props\n\n const dialogSizeProps = {\n size,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n }\n\n const sizeProps = getCommonSizeProps(dialogSizeProps)\n\n const rootClassName = !fancy ? concatClassNames(className, backgroundClassName) : className\n\n const [scrollTop, setScrollTop] = useState<Nullable<boolean>>(null)\n const [scrollBottom, setScrollBottom] = useState<Nullable<boolean>>(null)\n\n const scrollable = useRef<HTMLDivElement | null>(null)\n\n const handleScrollThresholds = useCallback((e: HTMLDivElement) => {\n if (e.scrollHeight === e.clientHeight) {\n setScrollTop(null)\n setScrollBottom(null)\n } else {\n setScrollTop(e.scrollTop <= 0)\n setScrollBottom(Math.abs(e.scrollHeight - e.clientHeight - e.scrollTop) <= 1)\n }\n }, [])\n\n useLayoutEffect(() => {\n const observerTarget = scrollable.current\n\n if (!scrollFadingDisabled && observerTarget) {\n observerTarget[resizeHandlerSymbol] = handleScrollThresholds\n resizeObserver.observe(observerTarget)\n }\n\n return () => {\n if (observerTarget) {\n resizeObserver.unobserve(observerTarget)\n }\n }\n }, [handleScrollThresholds, scrollFadingDisabled])\n\n return (\n <Styled.Root {...restProps} {...dialogSizeProps} className={rootClassName} fancy={fancy} ref={ref}>\n {floats && floats(sizeProps)}\n {fancy && <Styled.FancyBackground className={backgroundClassName} />}\n {fancy && iconButtonProps.onClick && (\n <Styled.PositionedIconButton\n secondary\n size='xxl'\n icon='close'\n inset={{ top: 0, right: 0 }}\n {...iconButtonProps}\n />\n )}\n {(draggable || (imgSrc.portrait && !imgPortraitPositionBottom) || fancy) && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_PORTRAIT}>\n {fancy && <Spacer top={96} />}\n {draggable && (\n <Styled.DraggingHandle onPointerDown={onGrab}>\n <Styled.DraggingIconContainer tabIndex={0} onKeyDown={onNudge}>\n <Icon icon={<Dragging />} size={34} color='content-onmain-tertiary' {...draggingIconProps} />\n </Styled.DraggingIconContainer>\n </Styled.DraggingHandle>\n )}\n {imgSrc.portrait && !imgPortraitPositionBottom && (\n <Styled.MediaPortraitContainer top={!fancy}>\n <Styled.MediaPortrait>\n <Styled.Placeholder orientation='portrait' aspectRatio='3:1' />\n {loading ? (\n <Styled.MediaSkeleton width='100%' height='100%' borderRadius={0} {...skeletonProps} />\n ) : (\n <Styled.Media src={imgSrc.portrait} />\n )}\n </Styled.MediaPortrait>\n </Styled.MediaPortraitContainer>\n )}\n </Visibility>\n )}\n {imgSrc.landscape && !imgLandscapePositionRight && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_LANDSCAPE_MEDIA}>\n <Styled.MediaLandscape>\n <Styled.Placeholder orientation='landscape' aspectRatio='5:7' />\n {loading ? (\n <Styled.MediaSkeleton width='100%' height='100%' borderRadius={0} {...skeletonProps} />\n ) : (\n <Styled.Media src={imgSrc.landscape} />\n )}\n </Styled.MediaLandscape>\n </Visibility>\n )}\n {!fancy && iconButtonProps.onClick && (\n <Styled.PositionedIconButton size='l' icon='close' inset={{ top: 8, right: 8 }} {...iconButtonProps} />\n )}\n <DialogContainer {...dialogSizeProps} fancy={fancy}>\n {draggable && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_LANDSCAPE}>\n <Styled.DraggingHandle onPointerDown={onGrab}>\n <Styled.DraggingIconContainer tabIndex={0} onKeyDown={onNudge}>\n <Icon icon={<Dragging />} size={34} color='content-onmain-tertiary' {...draggingIconProps} />\n </Styled.DraggingIconContainer>\n </Styled.DraggingHandle>\n </Visibility>\n )}\n {!scrollFadingDisabled && <Styled.Fading visible={scrollTop === false} />}\n <Styled.ScrollableContent\n ref={scrollable}\n tabIndex={0}\n onScroll={(evt) => {\n if (!scrollFadingDisabled) {\n handleScrollThresholds(evt.currentTarget)\n }\n }}\n onKeyDown={(evt) => {\n if (keyboardKeys.ArrowUp.validate(evt.key)) {\n evt.preventDefault()\n evt.currentTarget.scrollBy(0, -13)\n } else if (keyboardKeys.ArrowDown.validate(evt.key)) {\n evt.preventDefault()\n evt.currentTarget.scrollBy(0, 13)\n }\n }}\n >\n {loading ? (\n <>\n <Skeleton>\n <Text appearance='heading' marginBottom='1.5em' sizes={SIZES_TITLE} {...sizeProps} {...titleProps} />\n </Skeleton>\n <Skeleton width='90%'>\n <Text\n appearance='body'\n marginBottom='0.4em'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...subtitleProps}\n />\n </Skeleton>\n <Skeleton width='70%'>\n <Text\n appearance='body'\n marginBottom='0.4em'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...subtitleProps}\n />\n </Skeleton>\n <Skeleton width='50%'>\n <Text\n appearance='body'\n marginBottom='0.8em'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...subtitleProps}\n />\n </Skeleton>\n </>\n ) : (\n <>\n {caption && (\n <Text\n appearance='body'\n color='content-onmain-tertiary'\n wordBreak='break-word'\n marginBottom='0.8em'\n sizes={SIZES_CAPTION}\n {...sizeProps}\n {...captionProps}\n >\n {caption}\n </Text>\n )}\n {title && (\n <Text\n as='h2'\n appearance='heading'\n color='content-onmain-primary'\n wordBreak='break-word'\n marginBottom='0.5em'\n sizes={SIZES_TITLE}\n {...sizeProps}\n {...titleProps}\n >\n {title}\n </Text>\n )}\n {subtitle && (\n <Text\n as='p'\n appearance='body'\n color='content-onmain-primary'\n wordBreak='break-word'\n marginBottom='0.8em'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...subtitleProps}\n >\n {subtitle}\n </Text>\n )}\n {typeof children === 'function' ? children(sizeProps) : children}\n </>\n )}\n </Styled.ScrollableContent>\n {!scrollFadingDisabled && <Styled.Fading visible={scrollBottom === false} after />}\n {controls && (\n <Styled.Controls>\n {loading ? (\n <Skeleton borderRadius={48} {...skeletonProps}>\n <Button preset='brand' {...sizeProps} />\n </Skeleton>\n ) : (\n controls(sizeProps)\n )}\n </Styled.Controls>\n )}\n </DialogContainer>\n {imgSrc.landscape && imgLandscapePositionRight && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_LANDSCAPE_MEDIA}>\n <Styled.MediaLandscape right>\n <Styled.Placeholder orientation='landscape' aspectRatio='5:7' />\n {loading ? (\n <Styled.MediaSkeleton width='100%' height='100%' borderRadius={0} {...skeletonProps} />\n ) : (\n <Styled.Media src={imgSrc.landscape} />\n )}\n </Styled.MediaLandscape>\n </Visibility>\n )}\n {imgSrc.portrait && imgPortraitPositionBottom && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_PORTRAIT}>\n <Styled.MediaPortraitContainer bottom>\n <Styled.MediaPortrait>\n <Styled.Placeholder orientation='portrait' aspectRatio='3:1' />\n {loading ? (\n <Styled.MediaSkeleton width='100%' height='100%' borderRadius={0} {...skeletonProps} />\n ) : (\n <Styled.Media src={imgSrc.portrait} />\n )}\n </Styled.MediaPortrait>\n </Styled.MediaPortraitContainer>\n </Visibility>\n )}\n </Styled.Root>\n )\n }),\n {\n sizes: (props) => (props.fancy ? SIZES_FANCY : SIZES),\n displayName: COMPONENT_NAME,\n }\n)\n\nexport { DialogComponent }\n\nexport { SIZES, SIZES_FANCY }\n"],"names":["resizeHandlerSymbol","Symbol","resizeObserver","ResizeObserver","entries","forEach","entry","target","DialogComponent","withMergedProps","forwardRef","props","ref","size","iconButtonProps","captionProps","titleProps","subtitleProps","draggingIconProps","imgSrc","skeletonProps","fancy","floats","children","caption","title","subtitle","controls","imgLandscapePositionRight","imgPortraitPositionBottom","className","backgroundClassName","scrollFadingDisabled","draggable","loading","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","onGrab","onNudge","restProps","dialogSizeProps","sizeProps","getCommonSizeProps","rootClassName","concatClassNames","scrollTop","setScrollTop","useState","scrollBottom","setScrollBottom","scrollable","useRef","handleScrollThresholds","useCallback","e","scrollHeight","clientHeight","Math","abs","useLayoutEffect","observerTarget","current","observe","unobserve","_jsxs","Styled","_jsx","onClick","secondary","icon","inset","top","right","portrait","Visibility","sizes","VISIBILITY_PORTRAIT","Spacer","onPointerDown","tabIndex","onKeyDown","Icon","Dragging","color","orientation","aspectRatio","width","height","borderRadius","src","landscape","VISIBILITY_LANDSCAPE_MEDIA","DialogContainer","VISIBILITY_LANDSCAPE","visible","onScroll","evt","currentTarget","keyboardKeys","ArrowUp","validate","key","preventDefault","scrollBy","ArrowDown","_Fragment","Skeleton","Text","appearance","marginBottom","SIZES_TITLE","SIZES_SUBTITLE","wordBreak","SIZES_CAPTION","as","after","Button","preset","bottom","SIZES_FANCY","SIZES","displayName"],"mappings":"kmCA8BA,MAAMA,oBAAsBC,OAAO,kBAEnC,MAAMC,eAAiB,IAAIC,gBAAgBC,IACzCA,EAAQC,SAASC,WACJA,EAAMC,OAAOP,sBAAyB,YAC/CM,EAAMC,OAAOP,qBAAqBM,EAAMC,OAC1C,GACA,IAaEC,MAAAA,gBAAyEC,gBAI7EC,YAAW,CAACC,EAAOC,KACjB,MAAM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OAAOC,OAAO,OAAOC,aAAc,KAAOxE,IAEtEkD,IAACD,MAAY,CAACwB,IAAK1E,EAAO0D,oBAMxB,IAGlB,CACEE,MAAQpE,GAAWA,EAAMU,MAAQsG,YAAcC,MAC/CC,YAtTmB"}
1
+ {"version":3,"file":"DialogComponent.mjs","sources":["../../../../src/components/DialogComponent/DialogComponent.tsx"],"sourcesContent":["import { forwardRef, useLayoutEffect, useRef, useState, useCallback } from 'react'\nimport ResizeObserver from 'resize-observer-polyfill'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { keyboardKeys } from 'shared/constants'\nimport { Text } from 'components/Text'\nimport { Icon } from 'components/Icon'\nimport { Visibility } from 'components/Visibility'\nimport { Skeleton } from 'components/Skeleton'\nimport { Button } from 'components/Button'\nimport { Spacer } from 'components/Spacer'\nimport { ProgressLine } from 'components/ProgressLine'\nimport { concatClassNames } from 'shared/utils/dom'\nimport type { Nullable } from 'shared/types'\nimport { DialogContainer } from './DialogContainer'\nimport { ProgressLineContainer } from './ProgressLineContainer'\nimport Dragging from './images/dragging.svg?module'\nimport * as Styled from './style'\nimport { getCommonSizeProps } from './utils'\nimport {\n SIZES,\n SIZES_FANCY,\n SIZES_CAPTION,\n SIZES_TITLE,\n SIZES_SUBTITLE,\n VISIBILITY_PORTRAIT,\n VISIBILITY_LANDSCAPE,\n VISIBILITY_LANDSCAPE_MEDIA,\n} from './constants'\nimport type { DialogComponentProps } from './types'\n\nconst COMPONENT_NAME = 'DialogComponent'\n\nconst resizeHandlerSymbol = Symbol('resize-handler')\n\nconst resizeObserver = new ResizeObserver((entries) => {\n entries.forEach((entry) => {\n if (typeof entry.target[resizeHandlerSymbol] === 'function') {\n entry.target[resizeHandlerSymbol](entry.target)\n }\n })\n})\n\n/**\n *\n * Компонент поддерживает все атрибуты \\<div\\> элемента.\n *\n * Можно передать \"ref\", который будет ассоциирован с рутовым элементом.\n *\n * Поддерживаются пропсы определения размеров в зависимости от ширины вьюпорта.\n *\n * Полный интерфейс можно посмотреть [тут](https://github.com/foxford/ui/blob/master/src/components/DialogComponent/types.ts).\n */\nconst DialogComponent: React.ForwardRefExoticComponent<DialogComponentProps> = withMergedProps<\n DialogComponentProps,\n HTMLDivElement\n>(\n forwardRef((props, ref) => {\n const {\n size = 's',\n iconButtonProps = {},\n captionProps = {},\n titleProps = {},\n subtitleProps = {},\n draggingIconProps = {},\n imgSrc = {},\n imgAspectRatio = {},\n skeletonProps = {},\n progressLineProps = {},\n fancy,\n floats,\n children,\n caption,\n title,\n subtitle,\n controls,\n imgLandscapePositionRight,\n imgPortraitPositionBottom,\n className,\n backgroundClassName,\n scrollFadingDisabled,\n draggable,\n loading,\n progressLine,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n onGrab,\n onNudge,\n ...restProps\n } = props\n\n const dialogSizeProps = {\n size,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n }\n\n const sizeProps = getCommonSizeProps(dialogSizeProps)\n\n const rootClassName = !fancy ? concatClassNames(className, backgroundClassName) : className\n\n const [scrollTop, setScrollTop] = useState<Nullable<boolean>>(null)\n const [scrollBottom, setScrollBottom] = useState<Nullable<boolean>>(null)\n\n const scrollable = useRef<HTMLDivElement | null>(null)\n\n const handleScrollThresholds = useCallback((e: HTMLDivElement) => {\n if (e.scrollHeight === e.clientHeight) {\n setScrollTop(null)\n setScrollBottom(null)\n } else {\n setScrollTop(e.scrollTop <= 0)\n setScrollBottom(Math.abs(e.scrollHeight - e.clientHeight - e.scrollTop) <= 1)\n }\n }, [])\n\n useLayoutEffect(() => {\n const observerTarget = scrollable.current\n\n if (!scrollFadingDisabled && observerTarget) {\n observerTarget[resizeHandlerSymbol] = handleScrollThresholds\n resizeObserver.observe(observerTarget)\n }\n\n return () => {\n if (observerTarget) {\n resizeObserver.unobserve(observerTarget)\n }\n }\n }, [handleScrollThresholds, scrollFadingDisabled])\n\n return (\n <Styled.Root {...restProps} {...dialogSizeProps} className={rootClassName} fancy={fancy} ref={ref}>\n {floats && floats(sizeProps)}\n {fancy && <Styled.FancyBackground className={backgroundClassName} />}\n {fancy && iconButtonProps.onClick && (\n <Styled.PositionedIconButton\n secondary\n size='xxl'\n icon='close'\n inset={{ top: 0, right: 0 }}\n {...iconButtonProps}\n />\n )}\n {(draggable || (imgSrc.portrait && !imgPortraitPositionBottom) || fancy) && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_PORTRAIT}>\n {fancy && <Spacer top={96} />}\n {draggable && (\n <Styled.DraggingHandle onPointerDown={onGrab}>\n <Styled.DraggingIconContainer tabIndex={0} onKeyDown={onNudge}>\n <Icon icon={<Dragging />} size={34} color='content-onmain-tertiary' {...draggingIconProps} />\n </Styled.DraggingIconContainer>\n </Styled.DraggingHandle>\n )}\n {imgSrc.portrait && !imgPortraitPositionBottom && (\n <Styled.MediaPortraitContainer top={!fancy}>\n <Styled.MediaPortrait>\n <Styled.Placeholder orientation='portrait' aspectRatio={imgAspectRatio.portrait ?? '3:1'} />\n {loading ? (\n <Styled.MediaSkeleton width='100%' height='100%' borderRadius={0} {...skeletonProps} />\n ) : (\n <Styled.Media src={imgSrc.portrait} />\n )}\n </Styled.MediaPortrait>\n </Styled.MediaPortraitContainer>\n )}\n </Visibility>\n )}\n {imgSrc.landscape && !imgLandscapePositionRight && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_LANDSCAPE_MEDIA}>\n <Styled.MediaLandscape>\n <Styled.Placeholder orientation='landscape' aspectRatio={imgAspectRatio.landscape ?? '5:7'} />\n {loading ? (\n <Styled.MediaSkeleton width='100%' height='100%' borderRadius={0} {...skeletonProps} />\n ) : (\n <Styled.Media src={imgSrc.landscape} />\n )}\n </Styled.MediaLandscape>\n </Visibility>\n )}\n {!fancy && iconButtonProps.onClick && (\n <Styled.PositionedIconButton size='l' icon='close' inset={{ top: 8, right: 8 }} {...iconButtonProps} />\n )}\n <DialogContainer {...dialogSizeProps} fancy={fancy}>\n {progressLine && !loading && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_PORTRAIT}>\n {fancy || (imgSrc.portrait && !imgPortraitPositionBottom) ? (\n <Styled.PositionedProgressLine size='xs' {...progressLineProps} inset={{ top: 0, right: 0, left: 0 }} />\n ) : (\n <ProgressLineContainer {...dialogSizeProps} inset={{ top: 0, right: 0, left: 0 }}>\n <ProgressLine size='xs' {...progressLineProps} />\n </ProgressLineContainer>\n )}\n </Visibility>\n )}\n {((progressLine && !loading) || draggable) && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_LANDSCAPE}>\n {progressLine && !loading && (\n <ProgressLineContainer\n {...dialogSizeProps}\n inset={fancy ? { right: 0, bottom: 0, left: 0 } : { top: 0, right: 0, left: 0 }}\n >\n <ProgressLine size='xs' {...progressLineProps} />\n </ProgressLineContainer>\n )}\n {draggable && (\n <Styled.DraggingHandle onPointerDown={onGrab}>\n <Styled.DraggingIconContainer tabIndex={0} onKeyDown={onNudge}>\n <Icon icon={<Dragging />} size={34} color='content-onmain-tertiary' {...draggingIconProps} />\n </Styled.DraggingIconContainer>\n </Styled.DraggingHandle>\n )}\n </Visibility>\n )}\n {!scrollFadingDisabled && <Styled.Fading visible={scrollTop === false} />}\n <Styled.ScrollableContent\n ref={scrollable}\n tabIndex={0}\n onScroll={(evt) => {\n if (!scrollFadingDisabled) {\n handleScrollThresholds(evt.currentTarget)\n }\n }}\n onKeyDown={(evt) => {\n if (keyboardKeys.ArrowUp.validate(evt.key)) {\n evt.preventDefault()\n evt.currentTarget.scrollBy(0, -13)\n } else if (keyboardKeys.ArrowDown.validate(evt.key)) {\n evt.preventDefault()\n evt.currentTarget.scrollBy(0, 13)\n }\n }}\n >\n {loading ? (\n <>\n <Skeleton>\n <Text appearance='heading' marginBottom='1.5em' sizes={SIZES_TITLE} {...sizeProps} {...titleProps} />\n </Skeleton>\n <Skeleton width='90%'>\n <Text\n appearance='body'\n marginBottom='0.4em'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...subtitleProps}\n />\n </Skeleton>\n <Skeleton width='70%'>\n <Text\n appearance='body'\n marginBottom='0.4em'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...subtitleProps}\n />\n </Skeleton>\n <Skeleton width='50%'>\n <Text\n appearance='body'\n marginBottom='0.8em'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...subtitleProps}\n />\n </Skeleton>\n </>\n ) : (\n <>\n {caption && (\n <Text\n appearance='body'\n color='content-onmain-tertiary'\n wordBreak='break-word'\n marginBottom='0.8em'\n sizes={SIZES_CAPTION}\n {...sizeProps}\n {...captionProps}\n >\n {caption}\n </Text>\n )}\n {title && (\n <Text\n as='h2'\n appearance='heading'\n color='content-onmain-primary'\n wordBreak='break-word'\n marginBottom='0.5em'\n sizes={SIZES_TITLE}\n {...sizeProps}\n {...titleProps}\n >\n {title}\n </Text>\n )}\n {subtitle && (\n <Text\n as='p'\n appearance='body'\n color='content-onmain-primary'\n wordBreak='break-word'\n marginBottom='0.8em'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...subtitleProps}\n >\n {subtitle}\n </Text>\n )}\n {typeof children === 'function' ? children(sizeProps) : children}\n </>\n )}\n </Styled.ScrollableContent>\n {!scrollFadingDisabled && <Styled.Fading visible={scrollBottom === false} after />}\n {controls && (\n <Styled.Controls>\n {loading ? (\n <Skeleton borderRadius={48} {...skeletonProps}>\n <Button preset='brand' {...sizeProps} />\n </Skeleton>\n ) : (\n controls(sizeProps)\n )}\n </Styled.Controls>\n )}\n </DialogContainer>\n {imgSrc.landscape && imgLandscapePositionRight && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_LANDSCAPE_MEDIA}>\n <Styled.MediaLandscape right>\n <Styled.Placeholder orientation='landscape' aspectRatio={imgAspectRatio.landscape ?? '5:7'} />\n {loading ? (\n <Styled.MediaSkeleton width='100%' height='100%' borderRadius={0} {...skeletonProps} />\n ) : (\n <Styled.Media src={imgSrc.landscape} />\n )}\n </Styled.MediaLandscape>\n </Visibility>\n )}\n {imgSrc.portrait && imgPortraitPositionBottom && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_PORTRAIT}>\n <Styled.MediaPortraitContainer bottom>\n <Styled.MediaPortrait>\n <Styled.Placeholder orientation='portrait' aspectRatio={imgAspectRatio.portrait ?? '3:1'} />\n {loading ? (\n <Styled.MediaSkeleton width='100%' height='100%' borderRadius={0} {...skeletonProps} />\n ) : (\n <Styled.Media src={imgSrc.portrait} />\n )}\n </Styled.MediaPortrait>\n </Styled.MediaPortraitContainer>\n </Visibility>\n )}\n </Styled.Root>\n )\n }),\n {\n sizes: (props) => (props.fancy ? SIZES_FANCY : SIZES),\n displayName: COMPONENT_NAME,\n }\n)\n\nexport { DialogComponent }\n\nexport { SIZES, SIZES_FANCY }\n"],"names":["resizeHandlerSymbol","Symbol","resizeObserver","ResizeObserver","entries","forEach","entry","target","DialogComponent","withMergedProps","forwardRef","props","ref","size","iconButtonProps","captionProps","titleProps","subtitleProps","draggingIconProps","imgSrc","imgAspectRatio","skeletonProps","progressLineProps","fancy","floats","children","caption","title","subtitle","controls","imgLandscapePositionRight","imgPortraitPositionBottom","className","backgroundClassName","scrollFadingDisabled","draggable","loading","progressLine","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","onGrab","onNudge","restProps","dialogSizeProps","sizeProps","getCommonSizeProps","rootClassName","concatClassNames","scrollTop","setScrollTop","useState","scrollBottom","setScrollBottom","scrollable","useRef","handleScrollThresholds","useCallback","e","scrollHeight","clientHeight","Math","abs","useLayoutEffect","observerTarget","current","observe","unobserve","_jsxs","Styled","_jsx","onClick","secondary","icon","inset","top","right","portrait","Visibility","sizes","VISIBILITY_PORTRAIT","Spacer","onPointerDown","tabIndex","onKeyDown","Icon","Dragging","color","orientation","aspectRatio","width","height","borderRadius","src","landscape","VISIBILITY_LANDSCAPE_MEDIA","DialogContainer","left","ProgressLineContainer","ProgressLine","VISIBILITY_LANDSCAPE","bottom","visible","onScroll","evt","currentTarget","keyboardKeys","ArrowUp","validate","key","preventDefault","scrollBy","ArrowDown","_Fragment","Skeleton","Text","appearance","marginBottom","SIZES_TITLE","SIZES_SUBTITLE","wordBreak","SIZES_CAPTION","as","after","Button","preset","SIZES_FANCY","SIZES","displayName"],"mappings":"mvCAgCA,MAAMA,oBAAsBC,OAAO,kBAEnC,MAAMC,eAAiB,IAAIC,gBAAgBC,IACzCA,EAAQC,SAASC,WACJA,EAAMC,OAAOP,sBAAyB,YAC/CM,EAAMC,OAAOP,qBAAqBM,EAAMC,OAC1C,GACA,IAaEC,MAAAA,gBAAyEC,gBAI7EC,YAAW,CAACC,EAAOC,KACjB,MAAMC,KACJA,EAAO,IAAGC,gBACVA,EAAkB,CAAE,EAAAC,aACpBA,EAAe,CAAE,EAAAC,WACjBA,EAAa,CAAE,EAAAC,cACfA,EAAgB,CAAE,EAAAC,kBAClBA,EAAoB,CAAE,EAAAC,OACtBA,EAAS,CAAE,EAAAC,eACXA,EAAiB,CAAE,EAAAC,cACnBA,EAAgB,CAAE,EAAAC,kBAClBA,EAAoB,CAAE,EAAAC,MACtBA,EAAKC,OACLA,EAAMC,SACNA,EAAQC,QACRA,EAAOC,MACPA,EAAKC,SACLA,EAAQC,SACRA,EAAQC,0BACRA,EAAyBC,0BACzBA,EAAyBC,UACzBA,EAASC,oBACTA,EAAmBC,qBACnBA,EAAoBC,UACpBA,EAASC,QACTA,EAAOC,aACPA,EAAYC,QACZA,EAAOC,OACPA,EAAMC,MACNA,EAAKC,MACLA,EAAKC,MACLA,EAAKC,OACLA,EAAMC,OACNA,EAAMC,QACNA,KACGC,GACDnC,EAEJ,MAAMoC,EAAkB,CACtBlC,OACAyB,UACAC,SACAC,QACAC,QACAC,QACAC,UAGF,MAAMK,EAAYC,mBAAmBF,GAErC,MAAMG,EAAiB3B,EAA2DS,EAAnDmB,iBAAiBnB,EAAWC,GAE3D,MAAOmB,EAAWC,GAAgBC,SAA4B,MAC9D,MAAOC,EAAcC,GAAmBF,SAA4B,MAE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,IAAK7E,EAAO6D,oBAMxB,IAGlB,CACEE,MAAQvE,GAAWA,EAAMY,MAAQ0G,YAAcC,MAC/CC,YA9UmB"}
@@ -0,0 +1,2 @@
1
+ 'use strict';var withMergedProps=require('../../hocs/withMergedProps.js');var style=require('./style.js');var constants=require('./constants.js');var jsxRuntime=require('react/jsx-runtime');const ProgressLineContainer=withMergedProps.withMergedProps((({size:e="s",...s})=>jsxRuntime.jsx(style.ProgressLineContainer,{...s,size:e})),{sizes:constants.SIZES_PROGRESS_CONTAINER,displayName:'ProgressLineContainer'});exports.ProgressLineContainer=ProgressLineContainer;
2
+ //# sourceMappingURL=ProgressLineContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProgressLineContainer.js","sources":["../../../../src/components/DialogComponent/ProgressLineContainer.tsx"],"sourcesContent":["import { withMergedProps } from 'hocs/withMergedProps'\nimport * as Styled from './style'\nimport { SIZES_PROGRESS_CONTAINER } from './constants'\nimport type { ProgressLineContainerProps } from './types'\n\nconst COMPONENT_NAME = 'ProgressLineContainer'\n\nconst ProgressLineContainer: React.ForwardRefExoticComponent<ProgressLineContainerProps> =\n withMergedProps<ProgressLineContainerProps>(\n ({ size = 's', ...restProps }) => <Styled.ProgressLineContainer {...restProps} size={size} />,\n {\n sizes: SIZES_PROGRESS_CONTAINER,\n displayName: COMPONENT_NAME,\n }\n )\n\nexport { ProgressLineContainer }\n"],"names":["ProgressLineContainer","withMergedProps","size","restProps","_jsx","Styled","sizes","SIZES_PROGRESS_CONTAINER","displayName"],"mappings":"8LAOA,MAAMA,sBACJC,gBAAeA,iBACb,EAAGC,OAAO,OAAQC,KAAgBC,WAAAA,IAACC,MAAAA,sBAA4B,IAAKF,EAAWD,KAAMA,KACrF,CACEI,MAAOC,UAAwBA,yBAC/BC,YAPiB"}
@@ -0,0 +1,2 @@
1
+ import{withMergedProps}from'../../hocs/withMergedProps.mjs';import{ProgressLineContainer as ProgressLineContainer$1}from'./style.mjs';import{SIZES_PROGRESS_CONTAINER}from'./constants.mjs';import{jsx}from'react/jsx-runtime';const ProgressLineContainer=withMergedProps((({size:r="s",...s})=>jsx(ProgressLineContainer$1,{...s,size:r})),{sizes:SIZES_PROGRESS_CONTAINER,displayName:'ProgressLineContainer'});export{ProgressLineContainer};
2
+ //# sourceMappingURL=ProgressLineContainer.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProgressLineContainer.mjs","sources":["../../../../src/components/DialogComponent/ProgressLineContainer.tsx"],"sourcesContent":["import { withMergedProps } from 'hocs/withMergedProps'\nimport * as Styled from './style'\nimport { SIZES_PROGRESS_CONTAINER } from './constants'\nimport type { ProgressLineContainerProps } from './types'\n\nconst COMPONENT_NAME = 'ProgressLineContainer'\n\nconst ProgressLineContainer: React.ForwardRefExoticComponent<ProgressLineContainerProps> =\n withMergedProps<ProgressLineContainerProps>(\n ({ size = 's', ...restProps }) => <Styled.ProgressLineContainer {...restProps} size={size} />,\n {\n sizes: SIZES_PROGRESS_CONTAINER,\n displayName: COMPONENT_NAME,\n }\n )\n\nexport { ProgressLineContainer }\n"],"names":["ProgressLineContainer","withMergedProps","size","restProps","_jsx","Styled","sizes","SIZES_PROGRESS_CONTAINER","displayName"],"mappings":"+NAOA,MAAMA,sBACJC,iBACE,EAAGC,OAAO,OAAQC,KAAgBC,IAACC,wBAA4B,IAAKF,EAAWD,KAAMA,KACrF,CACEI,MAAOC,yBACPC,YAPiB"}
@@ -1,2 +1,2 @@
1
- 'use strict';var ramda=require('ramda');const SIZES={xxl:{maxWidth:1228,width:'100vw',minWidth:'min-content',fontSize:16,maxHeight:'85vh',flexDirection:'column',borderRadius:20},'xxl-landscape':{maxWidth:1228,width:'100vw',minWidth:'min-content',fontSize:16,height:'65vh',minHeight:288,maxHeight:600,flexDirection:'row',borderRadius:20},xl:{maxWidth:960,width:'100vw',minWidth:'min-content',fontSize:16,maxHeight:'85vh',flexDirection:'column',borderRadius:20},'xl-landscape':{maxWidth:960,width:'100vw',minWidth:'min-content',fontSize:16,height:'65vh',minHeight:288,maxHeight:456,flexDirection:'row',borderRadius:20},l:{maxWidth:780,width:'100vw',minWidth:'min-content',fontSize:16,maxHeight:'85vh',flexDirection:'column',borderRadius:20},'l-landscape':{maxWidth:780,width:'100vw',minWidth:'min-content',fontSize:16,height:'65vh',minHeight:288,maxHeight:392,flexDirection:'row',borderRadius:20},m:{maxWidth:560,width:'100vw',minWidth:'min-content',fontSize:16,maxHeight:'85vh',flexDirection:'column',borderRadius:20},s:{maxWidth:440,width:'100vw',minWidth:'min-content',fontSize:16,maxHeight:'85vh',flexDirection:'column',borderRadius:20},xs:{maxWidth:304,width:'100vw',minWidth:'min-content',fontSize:16,maxHeight:'85vh',flexDirection:'column',borderRadius:20}};const SIZES_FANCY={xxl:ramda.omit(['borderRadius'],SIZES.xxl),'xxl-landscape':ramda.omit(['borderRadius'],SIZES['xxl-landscape']),xl:ramda.omit(['borderRadius'],SIZES.xl),'xl-landscape':ramda.omit(['borderRadius'],SIZES['xl-landscape']),l:ramda.omit(['borderRadius'],SIZES.l),'l-landscape':ramda.omit(['borderRadius'],SIZES['l-landscape']),m:ramda.omit(['borderRadius'],SIZES.m),s:ramda.omit(['borderRadius'],SIZES.s),xs:ramda.omit(['borderRadius'],SIZES.xs)};const SIZES_CONTAINER={xxl:{padding:48},'xxl-landscape':{padding:48},xl:{padding:40},'xl-landscape':{padding:40},l:{padding:36},'l-landscape':{padding:36},m:{padding:32},s:{padding:32},xs:{padding:24}};const SIZES_CONTAINER_FANCY={xxl:SIZES_CONTAINER.xxl,'xxl-landscape':{...SIZES_CONTAINER['xxl-landscape'],paddingTop:96},xl:SIZES_CONTAINER.xl,'xl-landscape':{...SIZES_CONTAINER['xl-landscape'],paddingTop:96},l:SIZES_CONTAINER.l,'l-landscape':{...SIZES_CONTAINER['l-landscape'],paddingTop:96},m:SIZES_CONTAINER.m,s:SIZES_CONTAINER.s,xs:SIZES_CONTAINER.xs};exports.SIZES=SIZES,exports.SIZES_CAPTION={xxxl:{fontSize:20},xxl:{fontSize:20},xl:{fontSize:18},l:{fontSize:18},m:{fontSize:14},s:{fontSize:14},xs:{fontSize:14},xxs:{fontSize:14},xxxs:{fontSize:14}},exports.SIZES_CONTAINER=SIZES_CONTAINER,exports.SIZES_CONTAINER_FANCY=SIZES_CONTAINER_FANCY,exports.SIZES_FANCY=SIZES_FANCY,exports.SIZES_SUBTITLE={xxxl:{fontSize:24},xxl:{fontSize:24},xl:{fontSize:20},l:{fontSize:20},m:{fontSize:16},s:{fontSize:16},xs:{fontSize:14},xxs:{fontSize:14},xxxs:{fontSize:14}},exports.SIZES_TITLE={xxxl:{fontSize:32},xxl:{fontSize:32},xl:{fontSize:28},l:{fontSize:24},m:{fontSize:20},s:{fontSize:18},xs:{fontSize:16},xxs:{fontSize:16},xxxs:{fontSize:16}},exports.VISIBILITY_LANDSCAPE={xxl:{display:'none'},'xxl-landscape':{display:'block'},xl:{display:'none'},'xl-landscape':{display:'block'},l:{display:'none'},'l-landscape':{display:'block'},m:{display:'none'},s:{display:'none'},xs:{display:'none'}},exports.VISIBILITY_LANDSCAPE_MEDIA={xxl:{display:'none'},'xxl-landscape':{display:'block',height:'100%'},xl:{display:'none'},'xl-landscape':{display:'block',height:'100%'},l:{display:'none'},'l-landscape':{display:'block',height:'100%'},m:{display:'none'},s:{display:'none'},xs:{display:'none'}},exports.VISIBILITY_PORTRAIT={xxl:{display:'block'},'xxl-landscape':{display:'none'},xl:{display:'block'},'xl-landscape':{display:'none'},l:{display:'block'},'l-landscape':{display:'none'},m:{display:'block'},s:{display:'block'},xs:{display:'block'}};
1
+ 'use strict';var ramda=require('ramda');const SIZES={xxl:{maxWidth:1228,width:'100vw',minWidth:'min-content',fontSize:16,maxHeight:'85vh',flexDirection:'column',borderRadius:20},'xxl-landscape':{maxWidth:1228,width:'100vw',minWidth:'min-content',fontSize:16,height:'65vh',minHeight:288,maxHeight:600,flexDirection:'row',borderRadius:20},xl:{maxWidth:960,width:'100vw',minWidth:'min-content',fontSize:16,maxHeight:'85vh',flexDirection:'column',borderRadius:20},'xl-landscape':{maxWidth:960,width:'100vw',minWidth:'min-content',fontSize:16,height:'65vh',minHeight:288,maxHeight:456,flexDirection:'row',borderRadius:20},l:{maxWidth:780,width:'100vw',minWidth:'min-content',fontSize:16,maxHeight:'85vh',flexDirection:'column',borderRadius:20},'l-landscape':{maxWidth:780,width:'100vw',minWidth:'min-content',fontSize:16,height:'65vh',minHeight:288,maxHeight:392,flexDirection:'row',borderRadius:20},m:{maxWidth:560,width:'100vw',minWidth:'min-content',fontSize:16,maxHeight:'85vh',flexDirection:'column',borderRadius:20},s:{maxWidth:440,width:'100vw',minWidth:'min-content',fontSize:16,maxHeight:'85vh',flexDirection:'column',borderRadius:20},xs:{maxWidth:304,width:'100vw',minWidth:'min-content',fontSize:16,maxHeight:'85vh',flexDirection:'column',borderRadius:20}};const SIZES_FANCY={xxl:ramda.omit(['borderRadius'],SIZES.xxl),'xxl-landscape':ramda.omit(['borderRadius'],SIZES['xxl-landscape']),xl:ramda.omit(['borderRadius'],SIZES.xl),'xl-landscape':ramda.omit(['borderRadius'],SIZES['xl-landscape']),l:ramda.omit(['borderRadius'],SIZES.l),'l-landscape':ramda.omit(['borderRadius'],SIZES['l-landscape']),m:ramda.omit(['borderRadius'],SIZES.m),s:ramda.omit(['borderRadius'],SIZES.s),xs:ramda.omit(['borderRadius'],SIZES.xs)};const SIZES_CONTAINER={xxl:{padding:44},'xxl-landscape':{padding:44},xl:{padding:36},'xl-landscape':{padding:36},l:{padding:32},'l-landscape':{padding:32},m:{padding:28},s:{padding:28},xs:{padding:20}};const SIZES_CONTAINER_FANCY={xxl:SIZES_CONTAINER.xxl,'xxl-landscape':{...SIZES_CONTAINER['xxl-landscape'],paddingTop:96},xl:SIZES_CONTAINER.xl,'xl-landscape':{...SIZES_CONTAINER['xl-landscape'],paddingTop:96},l:SIZES_CONTAINER.l,'l-landscape':{...SIZES_CONTAINER['l-landscape'],paddingTop:96},m:SIZES_CONTAINER.m,s:SIZES_CONTAINER.s,xs:SIZES_CONTAINER.xs};exports.SIZES=SIZES,exports.SIZES_CAPTION={xxxl:{fontSize:20},xxl:{fontSize:20},xl:{fontSize:18},l:{fontSize:18},m:{fontSize:14},s:{fontSize:14},xs:{fontSize:14},xxs:{fontSize:14},xxxs:{fontSize:14}},exports.SIZES_CONTAINER=SIZES_CONTAINER,exports.SIZES_CONTAINER_FANCY=SIZES_CONTAINER_FANCY,exports.SIZES_FANCY=SIZES_FANCY,exports.SIZES_PROGRESS_CONTAINER={xxl:{paddingRight:48,paddingLeft:48},'xxl-landscape':{paddingRight:48,paddingLeft:48},xl:{paddingRight:40,paddingLeft:40},'xl-landscape':{paddingRight:40,paddingLeft:40},l:{paddingRight:36,paddingLeft:36},'l-landscape':{paddingRight:36,paddingLeft:36},m:{paddingRight:32,paddingLeft:32},s:{paddingRight:32,paddingLeft:32},xs:{paddingRight:24,paddingLeft:24}},exports.SIZES_SUBTITLE={xxxl:{fontSize:24},xxl:{fontSize:24},xl:{fontSize:20},l:{fontSize:20},m:{fontSize:16},s:{fontSize:16},xs:{fontSize:14},xxs:{fontSize:14},xxxs:{fontSize:14}},exports.SIZES_TITLE={xxxl:{fontSize:32},xxl:{fontSize:32},xl:{fontSize:28},l:{fontSize:24},m:{fontSize:20},s:{fontSize:18},xs:{fontSize:16},xxs:{fontSize:16},xxxs:{fontSize:16}},exports.VISIBILITY_LANDSCAPE={xxl:{display:'none'},'xxl-landscape':{display:'block'},xl:{display:'none'},'xl-landscape':{display:'block'},l:{display:'none'},'l-landscape':{display:'block'},m:{display:'none'},s:{display:'none'},xs:{display:'none'}},exports.VISIBILITY_LANDSCAPE_MEDIA={xxl:{display:'none'},'xxl-landscape':{display:'block',height:'100%'},xl:{display:'none'},'xl-landscape':{display:'block',height:'100%'},l:{display:'none'},'l-landscape':{display:'block',height:'100%'},m:{display:'none'},s:{display:'none'},xs:{display:'none'}},exports.VISIBILITY_PORTRAIT={xxl:{display:'block'},'xxl-landscape':{display:'none'},xl:{display:'block'},'xl-landscape':{display:'none'},l:{display:'block'},'l-landscape':{display:'none'},m:{display:'block'},s:{display:'block'},xs:{display:'block'}};
2
2
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../../src/components/DialogComponent/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport { omit } from 'ramda'\nimport type { Size } from 'shared/types'\nimport type { DialogComponentSize } from './types'\n\nexport const SIZES: Record<DialogComponentSize, CSSProperties> = {\n xxl: {\n maxWidth: 1228,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n maxHeight: '85vh',\n flexDirection: 'column',\n borderRadius: 20,\n },\n 'xxl-landscape': {\n maxWidth: 1228,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n height: '65vh',\n minHeight: 288,\n maxHeight: 600,\n flexDirection: 'row',\n borderRadius: 20,\n },\n xl: {\n maxWidth: 960,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n maxHeight: '85vh',\n flexDirection: 'column',\n borderRadius: 20,\n },\n 'xl-landscape': {\n maxWidth: 960,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n height: '65vh',\n minHeight: 288,\n maxHeight: 456,\n flexDirection: 'row',\n borderRadius: 20,\n },\n l: {\n maxWidth: 780,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n maxHeight: '85vh',\n flexDirection: 'column',\n borderRadius: 20,\n },\n 'l-landscape': {\n maxWidth: 780,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n height: '65vh',\n minHeight: 288,\n maxHeight: 392,\n flexDirection: 'row',\n borderRadius: 20,\n },\n m: {\n maxWidth: 560,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n maxHeight: '85vh',\n flexDirection: 'column',\n borderRadius: 20,\n },\n s: {\n maxWidth: 440,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n maxHeight: '85vh',\n flexDirection: 'column',\n borderRadius: 20,\n },\n xs: {\n maxWidth: 304,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n maxHeight: '85vh',\n flexDirection: 'column',\n borderRadius: 20,\n },\n}\n\nexport const SIZES_FANCY: Record<DialogComponentSize, CSSProperties> = {\n xxl: omit(['borderRadius'], SIZES.xxl),\n 'xxl-landscape': omit(['borderRadius'], SIZES['xxl-landscape']),\n xl: omit(['borderRadius'], SIZES.xl),\n 'xl-landscape': omit(['borderRadius'], SIZES['xl-landscape']),\n l: omit(['borderRadius'], SIZES.l),\n 'l-landscape': omit(['borderRadius'], SIZES['l-landscape']),\n m: omit(['borderRadius'], SIZES.m),\n s: omit(['borderRadius'], SIZES.s),\n xs: omit(['borderRadius'], SIZES.xs),\n}\n\nexport const SIZES_CONTAINER: Record<DialogComponentSize, CSSProperties> = {\n xxl: {\n padding: 48,\n },\n 'xxl-landscape': {\n padding: 48,\n },\n xl: {\n padding: 40,\n },\n 'xl-landscape': {\n padding: 40,\n },\n l: {\n padding: 36,\n },\n 'l-landscape': {\n padding: 36,\n },\n m: {\n padding: 32,\n },\n s: {\n padding: 32,\n },\n xs: {\n padding: 24,\n },\n}\n\nexport const SIZES_CONTAINER_FANCY: Record<DialogComponentSize, CSSProperties> = {\n xxl: SIZES_CONTAINER.xxl,\n 'xxl-landscape': {\n ...SIZES_CONTAINER['xxl-landscape'],\n paddingTop: 96,\n },\n xl: SIZES_CONTAINER.xl,\n 'xl-landscape': {\n ...SIZES_CONTAINER['xl-landscape'],\n paddingTop: 96,\n },\n l: SIZES_CONTAINER.l,\n 'l-landscape': {\n ...SIZES_CONTAINER['l-landscape'],\n paddingTop: 96,\n },\n m: SIZES_CONTAINER.m,\n s: SIZES_CONTAINER.s,\n xs: SIZES_CONTAINER.xs,\n}\n\nexport const SIZES_CAPTION: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 20,\n },\n xxl: {\n fontSize: 20,\n },\n xl: {\n fontSize: 18,\n },\n l: {\n fontSize: 18,\n },\n m: {\n fontSize: 14,\n },\n s: {\n fontSize: 14,\n },\n xs: {\n fontSize: 14,\n },\n xxs: {\n fontSize: 14,\n },\n xxxs: {\n fontSize: 14,\n },\n}\n\nexport const SIZES_TITLE: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 32,\n },\n xxl: {\n fontSize: 32,\n },\n xl: {\n fontSize: 28,\n },\n l: {\n fontSize: 24,\n },\n m: {\n fontSize: 20,\n },\n s: {\n fontSize: 18,\n },\n xs: {\n fontSize: 16,\n },\n xxs: {\n fontSize: 16,\n },\n xxxs: {\n fontSize: 16,\n },\n}\n\nexport const SIZES_SUBTITLE: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 24,\n },\n xxl: {\n fontSize: 24,\n },\n xl: {\n fontSize: 20,\n },\n l: {\n fontSize: 20,\n },\n m: {\n fontSize: 16,\n },\n s: {\n fontSize: 16,\n },\n xs: {\n fontSize: 14,\n },\n xxs: {\n fontSize: 14,\n },\n xxxs: {\n fontSize: 14,\n },\n}\n\nexport const VISIBILITY_PORTRAIT: Record<DialogComponentSize, CSSProperties> = {\n xxl: {\n display: 'block',\n },\n 'xxl-landscape': {\n display: 'none',\n },\n xl: {\n display: 'block',\n },\n 'xl-landscape': {\n display: 'none',\n },\n l: {\n display: 'block',\n },\n 'l-landscape': {\n display: 'none',\n },\n m: {\n display: 'block',\n },\n s: {\n display: 'block',\n },\n xs: {\n display: 'block',\n },\n}\n\nexport const VISIBILITY_LANDSCAPE: Record<DialogComponentSize, CSSProperties> = {\n xxl: {\n display: 'none',\n },\n 'xxl-landscape': {\n display: 'block',\n },\n xl: {\n display: 'none',\n },\n 'xl-landscape': {\n display: 'block',\n },\n l: {\n display: 'none',\n },\n 'l-landscape': {\n display: 'block',\n },\n m: {\n display: 'none',\n },\n s: {\n display: 'none',\n },\n xs: {\n display: 'none',\n },\n}\n\nexport const VISIBILITY_LANDSCAPE_MEDIA: Record<DialogComponentSize, CSSProperties> = {\n xxl: {\n display: 'none',\n },\n 'xxl-landscape': {\n display: 'block',\n height: '100%',\n },\n xl: {\n display: 'none',\n },\n 'xl-landscape': {\n display: 'block',\n height: '100%',\n },\n l: {\n display: 'none',\n },\n 'l-landscape': {\n display: 'block',\n height: '100%',\n },\n m: {\n display: 'none',\n },\n s: {\n display: 'none',\n },\n xs: {\n display: 'none',\n },\n}\n"],"names":["SIZES","xxl","maxWidth","width","minWidth","fontSize","maxHeight","flexDirection","borderRadius","height","minHeight","xl","l","m","s","xs","SIZES_FANCY","omit","SIZES_CONTAINER","padding","SIZES_CONTAINER_FANCY","paddingTop","xxxl","xxs","xxxs","display"],"mappings":"wCAKO,MAAMA,MAAoD,CAC/DC,IAAK,CACHC,SAAU,KACVC,MAAO,QACPC,SAAU,cACVC,SAAU,GACVC,UAAW,OACXC,cAAe,SACfC,aAAc,IAEhB,gBAAiB,CACfN,SAAU,KACVC,MAAO,QACPC,SAAU,cACVC,SAAU,GACVI,OAAQ,OACRC,UAAW,IACXJ,UAAW,IACXC,cAAe,MACfC,aAAc,IAEhBG,GAAI,CACFT,SAAU,IACVC,MAAO,QACPC,SAAU,cACVC,SAAU,GACVC,UAAW,OACXC,cAAe,SACfC,aAAc,IAEhB,eAAgB,CACdN,SAAU,IACVC,MAAO,QACPC,SAAU,cACVC,SAAU,GACVI,OAAQ,OACRC,UAAW,IACXJ,UAAW,IACXC,cAAe,MACfC,aAAc,IAEhBI,EAAG,CACDV,SAAU,IACVC,MAAO,QACPC,SAAU,cACVC,SAAU,GACVC,UAAW,OACXC,cAAe,SACfC,aAAc,IAEhB,cAAe,CACbN,SAAU,IACVC,MAAO,QACPC,SAAU,cACVC,SAAU,GACVI,OAAQ,OACRC,UAAW,IACXJ,UAAW,IACXC,cAAe,MACfC,aAAc,IAEhBK,EAAG,CACDX,SAAU,IACVC,MAAO,QACPC,SAAU,cACVC,SAAU,GACVC,UAAW,OACXC,cAAe,SACfC,aAAc,IAEhBM,EAAG,CACDZ,SAAU,IACVC,MAAO,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qCAzFkE,CAC7ExB,IAAK,CACHwB,QAAS,SAEX,gBAAiB,CACfA,QAAS,QAEXd,GAAI,CACFc,QAAS,SAEX,eAAgB,CACdA,QAAS,QAEXb,EAAG,CACDa,QAAS,SAEX,cAAe,CACbA,QAAS,QAEXZ,EAAG,CACDY,QAAS,SAEXX,EAAG,CACDW,QAAS,SAEXV,GAAI,CACFU,QAAS"}
1
+ {"version":3,"file":"constants.js","sources":["../../../../src/components/DialogComponent/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport { omit } from 'ramda'\nimport type { Size } from 'shared/types'\nimport type { DialogComponentSize } from './types'\n\nexport const SIZES: Record<DialogComponentSize, CSSProperties> = {\n xxl: {\n maxWidth: 1228,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n maxHeight: '85vh',\n flexDirection: 'column',\n borderRadius: 20,\n },\n 'xxl-landscape': {\n maxWidth: 1228,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n height: '65vh',\n minHeight: 288,\n maxHeight: 600,\n flexDirection: 'row',\n borderRadius: 20,\n },\n xl: {\n maxWidth: 960,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n maxHeight: '85vh',\n flexDirection: 'column',\n borderRadius: 20,\n },\n 'xl-landscape': {\n maxWidth: 960,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n height: '65vh',\n minHeight: 288,\n maxHeight: 456,\n flexDirection: 'row',\n borderRadius: 20,\n },\n l: {\n maxWidth: 780,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n maxHeight: '85vh',\n flexDirection: 'column',\n borderRadius: 20,\n },\n 'l-landscape': {\n maxWidth: 780,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n height: '65vh',\n minHeight: 288,\n maxHeight: 392,\n flexDirection: 'row',\n borderRadius: 20,\n },\n m: {\n maxWidth: 560,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n maxHeight: '85vh',\n flexDirection: 'column',\n borderRadius: 20,\n },\n s: {\n maxWidth: 440,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n maxHeight: '85vh',\n flexDirection: 'column',\n borderRadius: 20,\n },\n xs: {\n maxWidth: 304,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n maxHeight: '85vh',\n flexDirection: 'column',\n borderRadius: 20,\n },\n}\n\nexport const SIZES_FANCY: Record<DialogComponentSize, CSSProperties> = {\n xxl: omit(['borderRadius'], SIZES.xxl),\n 'xxl-landscape': omit(['borderRadius'], SIZES['xxl-landscape']),\n xl: omit(['borderRadius'], SIZES.xl),\n 'xl-landscape': omit(['borderRadius'], SIZES['xl-landscape']),\n l: omit(['borderRadius'], SIZES.l),\n 'l-landscape': omit(['borderRadius'], SIZES['l-landscape']),\n m: omit(['borderRadius'], SIZES.m),\n s: omit(['borderRadius'], SIZES.s),\n xs: omit(['borderRadius'], SIZES.xs),\n}\n\nexport const SIZES_CONTAINER: Record<DialogComponentSize, CSSProperties> = {\n xxl: {\n padding: 44,\n },\n 'xxl-landscape': {\n padding: 44,\n },\n xl: {\n padding: 36,\n },\n 'xl-landscape': {\n padding: 36,\n },\n l: {\n padding: 32,\n },\n 'l-landscape': {\n padding: 32,\n },\n m: {\n padding: 28,\n },\n s: {\n padding: 28,\n },\n xs: {\n padding: 20,\n },\n}\n\nexport const SIZES_CONTAINER_FANCY: Record<DialogComponentSize, CSSProperties> = {\n xxl: SIZES_CONTAINER.xxl,\n 'xxl-landscape': {\n ...SIZES_CONTAINER['xxl-landscape'],\n paddingTop: 96,\n },\n xl: SIZES_CONTAINER.xl,\n 'xl-landscape': {\n ...SIZES_CONTAINER['xl-landscape'],\n paddingTop: 96,\n },\n l: SIZES_CONTAINER.l,\n 'l-landscape': {\n ...SIZES_CONTAINER['l-landscape'],\n paddingTop: 96,\n },\n m: SIZES_CONTAINER.m,\n s: SIZES_CONTAINER.s,\n xs: SIZES_CONTAINER.xs,\n}\n\nexport const SIZES_PROGRESS_CONTAINER: Record<DialogComponentSize, CSSProperties> = {\n xxl: {\n paddingRight: 48,\n paddingLeft: 48,\n },\n 'xxl-landscape': {\n paddingRight: 48,\n paddingLeft: 48,\n },\n xl: {\n paddingRight: 40,\n paddingLeft: 40,\n },\n 'xl-landscape': {\n paddingRight: 40,\n paddingLeft: 40,\n },\n l: {\n paddingRight: 36,\n paddingLeft: 36,\n },\n 'l-landscape': {\n paddingRight: 36,\n paddingLeft: 36,\n },\n m: {\n paddingRight: 32,\n paddingLeft: 32,\n },\n s: {\n paddingRight: 32,\n paddingLeft: 32,\n },\n xs: {\n paddingRight: 24,\n paddingLeft: 24,\n },\n}\n\nexport const SIZES_CAPTION: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 20,\n },\n xxl: {\n fontSize: 20,\n },\n xl: {\n fontSize: 18,\n },\n l: {\n fontSize: 18,\n },\n m: {\n fontSize: 14,\n },\n s: {\n fontSize: 14,\n },\n xs: {\n fontSize: 14,\n },\n xxs: {\n fontSize: 14,\n },\n xxxs: {\n fontSize: 14,\n },\n}\n\nexport const SIZES_TITLE: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 32,\n },\n xxl: {\n fontSize: 32,\n },\n xl: {\n fontSize: 28,\n },\n l: {\n fontSize: 24,\n },\n m: {\n fontSize: 20,\n },\n s: {\n fontSize: 18,\n },\n xs: {\n fontSize: 16,\n },\n xxs: {\n fontSize: 16,\n },\n xxxs: {\n fontSize: 16,\n },\n}\n\nexport const SIZES_SUBTITLE: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 24,\n },\n xxl: {\n fontSize: 24,\n },\n xl: {\n fontSize: 20,\n },\n l: {\n fontSize: 20,\n },\n m: {\n fontSize: 16,\n },\n s: {\n fontSize: 16,\n },\n xs: {\n fontSize: 14,\n },\n xxs: {\n fontSize: 14,\n },\n xxxs: {\n fontSize: 14,\n },\n}\n\nexport const VISIBILITY_PORTRAIT: Record<DialogComponentSize, CSSProperties> = {\n xxl: {\n display: 'block',\n },\n 'xxl-landscape': {\n display: 'none',\n },\n xl: {\n display: 'block',\n },\n 'xl-landscape': {\n display: 'none',\n },\n l: {\n display: 'block',\n },\n 'l-landscape': {\n display: 'none',\n },\n m: {\n display: 'block',\n },\n s: {\n display: 'block',\n },\n xs: {\n display: 'block',\n },\n}\n\nexport const VISIBILITY_LANDSCAPE: Record<DialogComponentSize, CSSProperties> = {\n xxl: {\n display: 'none',\n },\n 'xxl-landscape': {\n display: 'block',\n },\n xl: {\n display: 'none',\n },\n 'xl-landscape': {\n display: 'block',\n },\n l: {\n display: 'none',\n },\n 'l-landscape': {\n display: 'block',\n },\n m: {\n display: 'none',\n },\n s: {\n display: 'none',\n },\n xs: {\n display: 'none',\n },\n}\n\nexport const VISIBILITY_LANDSCAPE_MEDIA: Record<DialogComponentSize, CSSProperties> = {\n xxl: {\n display: 'none',\n },\n 'xxl-landscape': {\n display: 'block',\n height: '100%',\n },\n xl: {\n display: 'none',\n },\n 'xl-landscape': {\n display: 'block',\n height: '100%',\n },\n l: {\n display: 'none',\n },\n 'l-landscape': {\n display: 'block',\n height: '100%',\n },\n m: {\n display: 'none',\n },\n s: {\n display: 'none',\n },\n xs: {\n display: 'none',\n },\n}\n"],"names":["SIZES","xxl","maxWidth","width","minWidth","fontSize","maxHeight","flexDirection","borderRadius","height","minHeight","xl","l","m","s","xs","SIZES_FANCY","omit","SIZES_CONTAINER","padding","SIZES_CONTAINER_FANCY","paddingTop","xxxl","xxs","xxxs","paddingRight","paddingLeft","display"],"mappings":"wCAKO,MAAMA,MAAoD,CAC/DC,IAAK,CACHC,SAAU,KACVC,MAAO,QACPC,SAAU,cACVC,SAAU,GACVC,UAAW,OACXC,cAAe,SACfC,aAAc,IAEhB,gBAAiB,CACfN,SAAU,KACVC,MAAO,QACPC,SAAU,cACVC,SAAU,GACVI,OAAQ,OACRC,UAAW,IACXJ,UAAW,IACXC,cAAe,MACfC,aAAc,IAEhBG,GAAI,CACFT,SAAU,IACVC,MAAO,QACP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:16,maxHeight:'85vh',flexDirection:'column',borderRadius:20},'xxl-landscape':{maxWidth:1228,width:'100vw',minWidth:'min-content',fontSize:16,height:'65vh',minHeight:288,maxHeight:600,flexDirection:'row',borderRadius:20},xl:{maxWidth:960,width:'100vw',minWidth:'min-content',fontSize:16,maxHeight:'85vh',flexDirection:'column',borderRadius:20},'xl-landscape':{maxWidth:960,width:'100vw',minWidth:'min-content',fontSize:16,height:'65vh',minHeight:288,maxHeight:456,flexDirection:'row',borderRadius:20},l:{maxWidth:780,width:'100vw',minWidth:'min-content',fontSize:16,maxHeight:'85vh',flexDirection:'column',borderRadius:20},'l-landscape':{maxWidth:780,width:'100vw',minWidth:'min-content',fontSize:16,height:'65vh',minHeight:288,maxHeight:392,flexDirection:'row',borderRadius:20},m:{maxWidth:560,width:'100vw',minWidth:'min-content',fontSize:16,maxHeight:'85vh',flexDirection:'column',borderRadius:20},s:{maxWidth:440,width:'100vw',minWidth:'min-content',fontSize:16,maxHeight:'85vh',flexDirection:'column',borderRadius:20},xs:{maxWidth:304,width:'100vw',minWidth:'min-content',fontSize:16,maxHeight:'85vh',flexDirection:'column',borderRadius:20}};const SIZES_FANCY={xxl:omit(['borderRadius'],SIZES.xxl),'xxl-landscape':omit(['borderRadius'],SIZES['xxl-landscape']),xl:omit(['borderRadius'],SIZES.xl),'xl-landscape':omit(['borderRadius'],SIZES['xl-landscape']),l:omit(['borderRadius'],SIZES.l),'l-landscape':omit(['borderRadius'],SIZES['l-landscape']),m:omit(['borderRadius'],SIZES.m),s:omit(['borderRadius'],SIZES.s),xs:omit(['borderRadius'],SIZES.xs)};const SIZES_CONTAINER={xxl:{padding:48},'xxl-landscape':{padding:48},xl:{padding:40},'xl-landscape':{padding:40},l:{padding:36},'l-landscape':{padding:36},m:{padding:32},s:{padding:32},xs:{padding:24}};const SIZES_CONTAINER_FANCY={xxl:SIZES_CONTAINER.xxl,'xxl-landscape':{...SIZES_CONTAINER['xxl-landscape'],paddingTop:96},xl:SIZES_CONTAINER.xl,'xl-landscape':{...SIZES_CONTAINER['xl-landscape'],paddingTop:96},l:SIZES_CONTAINER.l,'l-landscape':{...SIZES_CONTAINER['l-landscape'],paddingTop:96},m:SIZES_CONTAINER.m,s:SIZES_CONTAINER.s,xs:SIZES_CONTAINER.xs};const SIZES_CAPTION={xxxl:{fontSize:20},xxl:{fontSize:20},xl:{fontSize:18},l:{fontSize:18},m:{fontSize:14},s:{fontSize:14},xs:{fontSize:14},xxs:{fontSize:14},xxxs:{fontSize:14}};const SIZES_TITLE={xxxl:{fontSize:32},xxl:{fontSize:32},xl:{fontSize:28},l:{fontSize:24},m:{fontSize:20},s:{fontSize:18},xs:{fontSize:16},xxs:{fontSize:16},xxxs:{fontSize:16}};const SIZES_SUBTITLE={xxxl:{fontSize:24},xxl:{fontSize:24},xl:{fontSize:20},l:{fontSize:20},m:{fontSize:16},s:{fontSize:16},xs:{fontSize:14},xxs:{fontSize:14},xxxs:{fontSize:14}};const VISIBILITY_PORTRAIT={xxl:{display:'block'},'xxl-landscape':{display:'none'},xl:{display:'block'},'xl-landscape':{display:'none'},l:{display:'block'},'l-landscape':{display:'none'},m:{display:'block'},s:{display:'block'},xs:{display:'block'}};const VISIBILITY_LANDSCAPE={xxl:{display:'none'},'xxl-landscape':{display:'block'},xl:{display:'none'},'xl-landscape':{display:'block'},l:{display:'none'},'l-landscape':{display:'block'},m:{display:'none'},s:{display:'none'},xs:{display:'none'}};const VISIBILITY_LANDSCAPE_MEDIA={xxl:{display:'none'},'xxl-landscape':{display:'block',height:'100%'},xl:{display:'none'},'xl-landscape':{display:'block',height:'100%'},l:{display:'none'},'l-landscape':{display:'block',height:'100%'},m:{display:'none'},s:{display:'none'},xs:{display:'none'}};export{SIZES,SIZES_CAPTION,SIZES_CONTAINER,SIZES_CONTAINER_FANCY,SIZES_FANCY,SIZES_SUBTITLE,SIZES_TITLE,VISIBILITY_LANDSCAPE,VISIBILITY_LANDSCAPE_MEDIA,VISIBILITY_PORTRAIT};
1
+ import{omit}from'ramda';const SIZES={xxl:{maxWidth:1228,width:'100vw',minWidth:'min-content',fontSize:16,maxHeight:'85vh',flexDirection:'column',borderRadius:20},'xxl-landscape':{maxWidth:1228,width:'100vw',minWidth:'min-content',fontSize:16,height:'65vh',minHeight:288,maxHeight:600,flexDirection:'row',borderRadius:20},xl:{maxWidth:960,width:'100vw',minWidth:'min-content',fontSize:16,maxHeight:'85vh',flexDirection:'column',borderRadius:20},'xl-landscape':{maxWidth:960,width:'100vw',minWidth:'min-content',fontSize:16,height:'65vh',minHeight:288,maxHeight:456,flexDirection:'row',borderRadius:20},l:{maxWidth:780,width:'100vw',minWidth:'min-content',fontSize:16,maxHeight:'85vh',flexDirection:'column',borderRadius:20},'l-landscape':{maxWidth:780,width:'100vw',minWidth:'min-content',fontSize:16,height:'65vh',minHeight:288,maxHeight:392,flexDirection:'row',borderRadius:20},m:{maxWidth:560,width:'100vw',minWidth:'min-content',fontSize:16,maxHeight:'85vh',flexDirection:'column',borderRadius:20},s:{maxWidth:440,width:'100vw',minWidth:'min-content',fontSize:16,maxHeight:'85vh',flexDirection:'column',borderRadius:20},xs:{maxWidth:304,width:'100vw',minWidth:'min-content',fontSize:16,maxHeight:'85vh',flexDirection:'column',borderRadius:20}};const SIZES_FANCY={xxl:omit(['borderRadius'],SIZES.xxl),'xxl-landscape':omit(['borderRadius'],SIZES['xxl-landscape']),xl:omit(['borderRadius'],SIZES.xl),'xl-landscape':omit(['borderRadius'],SIZES['xl-landscape']),l:omit(['borderRadius'],SIZES.l),'l-landscape':omit(['borderRadius'],SIZES['l-landscape']),m:omit(['borderRadius'],SIZES.m),s:omit(['borderRadius'],SIZES.s),xs:omit(['borderRadius'],SIZES.xs)};const SIZES_CONTAINER={xxl:{padding:44},'xxl-landscape':{padding:44},xl:{padding:36},'xl-landscape':{padding:36},l:{padding:32},'l-landscape':{padding:32},m:{padding:28},s:{padding:28},xs:{padding:20}};const SIZES_CONTAINER_FANCY={xxl:SIZES_CONTAINER.xxl,'xxl-landscape':{...SIZES_CONTAINER['xxl-landscape'],paddingTop:96},xl:SIZES_CONTAINER.xl,'xl-landscape':{...SIZES_CONTAINER['xl-landscape'],paddingTop:96},l:SIZES_CONTAINER.l,'l-landscape':{...SIZES_CONTAINER['l-landscape'],paddingTop:96},m:SIZES_CONTAINER.m,s:SIZES_CONTAINER.s,xs:SIZES_CONTAINER.xs};const SIZES_PROGRESS_CONTAINER={xxl:{paddingRight:48,paddingLeft:48},'xxl-landscape':{paddingRight:48,paddingLeft:48},xl:{paddingRight:40,paddingLeft:40},'xl-landscape':{paddingRight:40,paddingLeft:40},l:{paddingRight:36,paddingLeft:36},'l-landscape':{paddingRight:36,paddingLeft:36},m:{paddingRight:32,paddingLeft:32},s:{paddingRight:32,paddingLeft:32},xs:{paddingRight:24,paddingLeft:24}};const SIZES_CAPTION={xxxl:{fontSize:20},xxl:{fontSize:20},xl:{fontSize:18},l:{fontSize:18},m:{fontSize:14},s:{fontSize:14},xs:{fontSize:14},xxs:{fontSize:14},xxxs:{fontSize:14}};const SIZES_TITLE={xxxl:{fontSize:32},xxl:{fontSize:32},xl:{fontSize:28},l:{fontSize:24},m:{fontSize:20},s:{fontSize:18},xs:{fontSize:16},xxs:{fontSize:16},xxxs:{fontSize:16}};const SIZES_SUBTITLE={xxxl:{fontSize:24},xxl:{fontSize:24},xl:{fontSize:20},l:{fontSize:20},m:{fontSize:16},s:{fontSize:16},xs:{fontSize:14},xxs:{fontSize:14},xxxs:{fontSize:14}};const VISIBILITY_PORTRAIT={xxl:{display:'block'},'xxl-landscape':{display:'none'},xl:{display:'block'},'xl-landscape':{display:'none'},l:{display:'block'},'l-landscape':{display:'none'},m:{display:'block'},s:{display:'block'},xs:{display:'block'}};const VISIBILITY_LANDSCAPE={xxl:{display:'none'},'xxl-landscape':{display:'block'},xl:{display:'none'},'xl-landscape':{display:'block'},l:{display:'none'},'l-landscape':{display:'block'},m:{display:'none'},s:{display:'none'},xs:{display:'none'}};const VISIBILITY_LANDSCAPE_MEDIA={xxl:{display:'none'},'xxl-landscape':{display:'block',height:'100%'},xl:{display:'none'},'xl-landscape':{display:'block',height:'100%'},l:{display:'none'},'l-landscape':{display:'block',height:'100%'},m:{display:'none'},s:{display:'none'},xs:{display:'none'}};export{SIZES,SIZES_CAPTION,SIZES_CONTAINER,SIZES_CONTAINER_FANCY,SIZES_FANCY,SIZES_PROGRESS_CONTAINER,SIZES_SUBTITLE,SIZES_TITLE,VISIBILITY_LANDSCAPE,VISIBILITY_LANDSCAPE_MEDIA,VISIBILITY_PORTRAIT};
2
2
  //# sourceMappingURL=constants.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.mjs","sources":["../../../../src/components/DialogComponent/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport { omit } from 'ramda'\nimport type { Size } from 'shared/types'\nimport type { DialogComponentSize } from './types'\n\nexport const SIZES: Record<DialogComponentSize, CSSProperties> = {\n xxl: {\n maxWidth: 1228,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n maxHeight: '85vh',\n flexDirection: 'column',\n borderRadius: 20,\n },\n 'xxl-landscape': {\n maxWidth: 1228,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n height: '65vh',\n minHeight: 288,\n maxHeight: 600,\n flexDirection: 'row',\n borderRadius: 20,\n },\n xl: {\n maxWidth: 960,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n maxHeight: '85vh',\n flexDirection: 'column',\n borderRadius: 20,\n },\n 'xl-landscape': {\n maxWidth: 960,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n height: '65vh',\n minHeight: 288,\n maxHeight: 456,\n flexDirection: 'row',\n borderRadius: 20,\n },\n l: {\n maxWidth: 780,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n maxHeight: '85vh',\n flexDirection: 'column',\n borderRadius: 20,\n },\n 'l-landscape': {\n maxWidth: 780,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n height: '65vh',\n minHeight: 288,\n maxHeight: 392,\n flexDirection: 'row',\n borderRadius: 20,\n },\n m: {\n maxWidth: 560,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n maxHeight: '85vh',\n flexDirection: 'column',\n borderRadius: 20,\n },\n s: {\n maxWidth: 440,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n maxHeight: '85vh',\n flexDirection: 'column',\n borderRadius: 20,\n },\n xs: {\n maxWidth: 304,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n maxHeight: '85vh',\n flexDirection: 'column',\n borderRadius: 20,\n },\n}\n\nexport const SIZES_FANCY: Record<DialogComponentSize, CSSProperties> = {\n xxl: omit(['borderRadius'], SIZES.xxl),\n 'xxl-landscape': omit(['borderRadius'], SIZES['xxl-landscape']),\n xl: omit(['borderRadius'], SIZES.xl),\n 'xl-landscape': omit(['borderRadius'], SIZES['xl-landscape']),\n l: omit(['borderRadius'], SIZES.l),\n 'l-landscape': omit(['borderRadius'], SIZES['l-landscape']),\n m: omit(['borderRadius'], SIZES.m),\n s: omit(['borderRadius'], SIZES.s),\n xs: omit(['borderRadius'], SIZES.xs),\n}\n\nexport const SIZES_CONTAINER: Record<DialogComponentSize, CSSProperties> = {\n xxl: {\n padding: 48,\n },\n 'xxl-landscape': {\n padding: 48,\n },\n xl: {\n padding: 40,\n },\n 'xl-landscape': {\n padding: 40,\n },\n l: {\n padding: 36,\n },\n 'l-landscape': {\n padding: 36,\n },\n m: {\n padding: 32,\n },\n s: {\n padding: 32,\n },\n xs: {\n padding: 24,\n },\n}\n\nexport const SIZES_CONTAINER_FANCY: Record<DialogComponentSize, CSSProperties> = {\n xxl: SIZES_CONTAINER.xxl,\n 'xxl-landscape': {\n ...SIZES_CONTAINER['xxl-landscape'],\n paddingTop: 96,\n },\n xl: SIZES_CONTAINER.xl,\n 'xl-landscape': {\n ...SIZES_CONTAINER['xl-landscape'],\n paddingTop: 96,\n },\n l: SIZES_CONTAINER.l,\n 'l-landscape': {\n ...SIZES_CONTAINER['l-landscape'],\n paddingTop: 96,\n },\n m: SIZES_CONTAINER.m,\n s: SIZES_CONTAINER.s,\n xs: SIZES_CONTAINER.xs,\n}\n\nexport const SIZES_CAPTION: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 20,\n },\n xxl: {\n fontSize: 20,\n },\n xl: {\n fontSize: 18,\n },\n l: {\n fontSize: 18,\n },\n m: {\n fontSize: 14,\n },\n s: {\n fontSize: 14,\n },\n xs: {\n fontSize: 14,\n },\n xxs: {\n fontSize: 14,\n },\n xxxs: {\n fontSize: 14,\n },\n}\n\nexport const SIZES_TITLE: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 32,\n },\n xxl: {\n fontSize: 32,\n },\n xl: {\n fontSize: 28,\n },\n l: {\n fontSize: 24,\n },\n m: {\n fontSize: 20,\n },\n s: {\n fontSize: 18,\n },\n xs: {\n fontSize: 16,\n },\n xxs: {\n fontSize: 16,\n },\n xxxs: {\n fontSize: 16,\n },\n}\n\nexport const SIZES_SUBTITLE: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 24,\n },\n xxl: {\n fontSize: 24,\n },\n xl: {\n fontSize: 20,\n },\n l: {\n fontSize: 20,\n },\n m: {\n fontSize: 16,\n },\n s: {\n fontSize: 16,\n },\n xs: {\n fontSize: 14,\n },\n xxs: {\n fontSize: 14,\n },\n xxxs: {\n fontSize: 14,\n },\n}\n\nexport const VISIBILITY_PORTRAIT: Record<DialogComponentSize, CSSProperties> = {\n xxl: {\n display: 'block',\n },\n 'xxl-landscape': {\n display: 'none',\n },\n xl: {\n display: 'block',\n },\n 'xl-landscape': {\n display: 'none',\n },\n l: {\n display: 'block',\n },\n 'l-landscape': {\n display: 'none',\n },\n m: {\n display: 'block',\n },\n s: {\n display: 'block',\n },\n xs: {\n display: 'block',\n },\n}\n\nexport const VISIBILITY_LANDSCAPE: Record<DialogComponentSize, CSSProperties> = {\n xxl: {\n display: 'none',\n },\n 'xxl-landscape': {\n display: 'block',\n },\n xl: {\n display: 'none',\n },\n 'xl-landscape': {\n display: 'block',\n },\n l: {\n display: 'none',\n },\n 'l-landscape': {\n display: 'block',\n },\n m: {\n display: 'none',\n },\n s: {\n display: 'none',\n },\n xs: {\n display: 'none',\n },\n}\n\nexport const VISIBILITY_LANDSCAPE_MEDIA: Record<DialogComponentSize, CSSProperties> = {\n xxl: {\n display: 'none',\n },\n 'xxl-landscape': {\n display: 'block',\n height: '100%',\n },\n xl: {\n display: 'none',\n },\n 'xl-landscape': {\n display: 'block',\n height: '100%',\n },\n l: {\n display: 'none',\n },\n 'l-landscape': {\n display: 'block',\n height: '100%',\n },\n m: {\n display: 'none',\n },\n s: {\n display: 'none',\n },\n xs: {\n display: 'none',\n },\n}\n"],"names":["SIZES","xxl","maxWidth","width","minWidth","fontSize","maxHeight","flexDirection","borderRadius","height","minHeight","xl","l","m","s","xs","SIZES_FANCY","omit","SIZES_CONTAINER","padding","SIZES_CONTAINER_FANCY","paddingTop","SIZES_CAPTION","xxxl","xxs","xxxs","SIZES_TITLE","SIZES_SUBTITLE","VISIBILITY_PORTRAIT","display","VISIBILITY_LANDSCAPE","VISIBILITY_LANDSCAPE_MEDIA"],"mappings":"wBAKO,MAAMA,MAAoD,CAC/DC,IAAK,CACHC,SAAU,KACVC,MAAO,QACPC,SAAU,cACVC,SAAU,GACVC,UAAW,OACXC,cAAe,SACfC,aAAc,IAEhB,gBAAiB,CACfN,SAAU,KACVC,MAAO,QACPC,SAAU,cACVC,SAAU,GACVI,OAAQ,OACRC,UAAW,IACXJ,UAAW,IACXC,cAAe,MACfC,aAAc,IAEhBG,GAAI,CACFT,SAAU,IACVC,MAAO,QACPC,SAAU,cACVC,SAAU,GACVC,UAAW,OACXC,cAAe,SACfC,aAAc,IAEhB,eAAgB,CACdN,SAAU,IACVC,MAAO,QACPC,SAAU,cACVC,SAAU,GACVI,OAAQ,OACRC,UAAW,IACXJ,UAAW,IACXC,cAAe,MACfC,aAAc,IAEhB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G,CACDgB,QAAS,SAEXf,EAAG,CACDe,QAAS,SAEXd,GAAI,CACFc,QAAS,UAIN,MAAMC,qBAAmE,CAC9E7B,IAAK,CACH4B,QAAS,QAEX,gBAAiB,CACfA,QAAS,SAEXlB,GAAI,CACFkB,QAAS,QAEX,eAAgB,CACdA,QAAS,SAEXjB,EAAG,CACDiB,QAAS,QAEX,cAAe,CACbA,QAAS,SAEXhB,EAAG,CACDgB,QAAS,QAEXf,EAAG,CACDe,QAAS,QAEXd,GAAI,CACFc,QAAS,SAIN,MAAME,2BAAyE,CACpF9B,IAAK,CACH4B,QAAS,QAEX,gBAAiB,CACfA,QAAS,QACTpB,OAAQ,QAEVE,GAAI,CACFkB,QAAS,QAEX,eAAgB,CACdA,QAAS,QACTpB,OAAQ,QAEVG,EAAG,CACDiB,QAAS,QAEX,cAAe,CACbA,QAAS,QACTpB,OAAQ,QAEVI,EAAG,CACDgB,QAAS,QAEXf,EAAG,CACDe,QAAS,QAEXd,GAAI,CACFc,QAAS"}
1
+ {"version":3,"file":"constants.mjs","sources":["../../../../src/components/DialogComponent/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport { omit } from 'ramda'\nimport type { Size } from 'shared/types'\nimport type { DialogComponentSize } from './types'\n\nexport const SIZES: Record<DialogComponentSize, CSSProperties> = {\n xxl: {\n maxWidth: 1228,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n maxHeight: '85vh',\n flexDirection: 'column',\n borderRadius: 20,\n },\n 'xxl-landscape': {\n maxWidth: 1228,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n height: '65vh',\n minHeight: 288,\n maxHeight: 600,\n flexDirection: 'row',\n borderRadius: 20,\n },\n xl: {\n maxWidth: 960,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n maxHeight: '85vh',\n flexDirection: 'column',\n borderRadius: 20,\n },\n 'xl-landscape': {\n maxWidth: 960,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n height: '65vh',\n minHeight: 288,\n maxHeight: 456,\n flexDirection: 'row',\n borderRadius: 20,\n },\n l: {\n maxWidth: 780,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n maxHeight: '85vh',\n flexDirection: 'column',\n borderRadius: 20,\n },\n 'l-landscape': {\n maxWidth: 780,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n height: '65vh',\n minHeight: 288,\n maxHeight: 392,\n flexDirection: 'row',\n borderRadius: 20,\n },\n m: {\n maxWidth: 560,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n maxHeight: '85vh',\n flexDirection: 'column',\n borderRadius: 20,\n },\n s: {\n maxWidth: 440,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n maxHeight: '85vh',\n flexDirection: 'column',\n borderRadius: 20,\n },\n xs: {\n maxWidth: 304,\n width: '100vw',\n minWidth: 'min-content',\n fontSize: 16,\n maxHeight: '85vh',\n flexDirection: 'column',\n borderRadius: 20,\n },\n}\n\nexport const SIZES_FANCY: Record<DialogComponentSize, CSSProperties> = {\n xxl: omit(['borderRadius'], SIZES.xxl),\n 'xxl-landscape': omit(['borderRadius'], SIZES['xxl-landscape']),\n xl: omit(['borderRadius'], SIZES.xl),\n 'xl-landscape': omit(['borderRadius'], SIZES['xl-landscape']),\n l: omit(['borderRadius'], SIZES.l),\n 'l-landscape': omit(['borderRadius'], SIZES['l-landscape']),\n m: omit(['borderRadius'], SIZES.m),\n s: omit(['borderRadius'], SIZES.s),\n xs: omit(['borderRadius'], SIZES.xs),\n}\n\nexport const SIZES_CONTAINER: Record<DialogComponentSize, CSSProperties> = {\n xxl: {\n padding: 44,\n },\n 'xxl-landscape': {\n padding: 44,\n },\n xl: {\n padding: 36,\n },\n 'xl-landscape': {\n padding: 36,\n },\n l: {\n padding: 32,\n },\n 'l-landscape': {\n padding: 32,\n },\n m: {\n padding: 28,\n },\n s: {\n padding: 28,\n },\n xs: {\n padding: 20,\n },\n}\n\nexport const SIZES_CONTAINER_FANCY: Record<DialogComponentSize, CSSProperties> = {\n xxl: SIZES_CONTAINER.xxl,\n 'xxl-landscape': {\n ...SIZES_CONTAINER['xxl-landscape'],\n paddingTop: 96,\n },\n xl: SIZES_CONTAINER.xl,\n 'xl-landscape': {\n ...SIZES_CONTAINER['xl-landscape'],\n paddingTop: 96,\n },\n l: SIZES_CONTAINER.l,\n 'l-landscape': {\n ...SIZES_CONTAINER['l-landscape'],\n paddingTop: 96,\n },\n m: SIZES_CONTAINER.m,\n s: SIZES_CONTAINER.s,\n xs: SIZES_CONTAINER.xs,\n}\n\nexport const SIZES_PROGRESS_CONTAINER: Record<DialogComponentSize, CSSProperties> = {\n xxl: {\n paddingRight: 48,\n paddingLeft: 48,\n },\n 'xxl-landscape': {\n paddingRight: 48,\n paddingLeft: 48,\n },\n xl: {\n paddingRight: 40,\n paddingLeft: 40,\n },\n 'xl-landscape': {\n paddingRight: 40,\n paddingLeft: 40,\n },\n l: {\n paddingRight: 36,\n paddingLeft: 36,\n },\n 'l-landscape': {\n paddingRight: 36,\n paddingLeft: 36,\n },\n m: {\n paddingRight: 32,\n paddingLeft: 32,\n },\n s: {\n paddingRight: 32,\n paddingLeft: 32,\n },\n xs: {\n paddingRight: 24,\n paddingLeft: 24,\n },\n}\n\nexport const SIZES_CAPTION: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 20,\n },\n xxl: {\n fontSize: 20,\n },\n xl: {\n fontSize: 18,\n },\n l: {\n fontSize: 18,\n },\n m: {\n fontSize: 14,\n },\n s: {\n fontSize: 14,\n },\n xs: {\n fontSize: 14,\n },\n xxs: {\n fontSize: 14,\n },\n xxxs: {\n fontSize: 14,\n },\n}\n\nexport const SIZES_TITLE: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 32,\n },\n xxl: {\n fontSize: 32,\n },\n xl: {\n fontSize: 28,\n },\n l: {\n fontSize: 24,\n },\n m: {\n fontSize: 20,\n },\n s: {\n fontSize: 18,\n },\n xs: {\n fontSize: 16,\n },\n xxs: {\n fontSize: 16,\n },\n xxxs: {\n fontSize: 16,\n },\n}\n\nexport const SIZES_SUBTITLE: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 24,\n },\n xxl: {\n fontSize: 24,\n },\n xl: {\n fontSize: 20,\n },\n l: {\n fontSize: 20,\n },\n m: {\n fontSize: 16,\n },\n s: {\n fontSize: 16,\n },\n xs: {\n fontSize: 14,\n },\n xxs: {\n fontSize: 14,\n },\n xxxs: {\n fontSize: 14,\n },\n}\n\nexport const VISIBILITY_PORTRAIT: Record<DialogComponentSize, CSSProperties> = {\n xxl: {\n display: 'block',\n },\n 'xxl-landscape': {\n display: 'none',\n },\n xl: {\n display: 'block',\n },\n 'xl-landscape': {\n display: 'none',\n },\n l: {\n display: 'block',\n },\n 'l-landscape': {\n display: 'none',\n },\n m: {\n display: 'block',\n },\n s: {\n display: 'block',\n },\n xs: {\n display: 'block',\n },\n}\n\nexport const VISIBILITY_LANDSCAPE: Record<DialogComponentSize, CSSProperties> = {\n xxl: {\n display: 'none',\n },\n 'xxl-landscape': {\n display: 'block',\n },\n xl: {\n display: 'none',\n },\n 'xl-landscape': {\n display: 'block',\n },\n l: {\n display: 'none',\n },\n 'l-landscape': {\n display: 'block',\n },\n m: {\n display: 'none',\n },\n s: {\n display: 'none',\n },\n xs: {\n display: 'none',\n },\n}\n\nexport const VISIBILITY_LANDSCAPE_MEDIA: Record<DialogComponentSize, CSSProperties> = {\n xxl: {\n display: 'none',\n },\n 'xxl-landscape': {\n display: 'block',\n height: '100%',\n },\n xl: {\n display: 'none',\n },\n 'xl-landscape': {\n display: 'block',\n height: '100%',\n },\n l: {\n display: 'none',\n },\n 'l-landscape': {\n display: 'block',\n height: '100%',\n },\n m: {\n display: 'none',\n },\n s: {\n display: 'none',\n },\n xs: {\n display: 'none',\n },\n}\n"],"names":["SIZES","xxl","maxWidth","width","minWidth","fontSize","maxHeight","flexDirection","borderRadius","height","minHeight","xl","l","m","s","xs","SIZES_FANCY","omit","SIZES_CONTAINER","padding","SIZES_CONTAINER_FANCY","paddingTop","SIZES_PROGRESS_CONTAINER","paddingRight","paddingLeft","SIZES_CAPTION","xxxl","xxs","xxxs","SIZES_TITLE","SIZES_SUBTITLE","VISIBILITY_PORTRAIT","display","VISIBILITY_LANDSCAPE","VISIBILITY_LANDSCAPE_MEDIA"],"mappings":"wBAKO,MAAMA,MAAoD,CAC/DC,IAAK,CACHC,SAAU,KACVC,MAAO,QACPC,SAAU,cACVC,SAAU,GACVC,UAAW,OACXC,cAAe,SACfC,aAAc,IAEhB,gBAAiB,CACfN,SAAU,KACVC,MAAO,QACPC,SAAU,cACVC,SAAU,GACVI,OAAQ,OACRC,UAAW,IACXJ,UAAW,IACXC,cAAe,MACfC,aAAc,IAEhBG,GAAI,CACFT,SAAU,IACVC,MAAO,QACPC,SAAU,cACVC,SAAU,GACVC,UAAW,OACXC,cAAe,SACfC,aAAc,IAEhB,eAAgB,CACdN,SAAU,IACVC,MAAO,QACPC,SAAU,cACVC,SAAU,GACVI,OAAQ,OACRC,UAAW,IACXJ,UAAW,IACXC,cAAe,MACfC,aAAc,IAEhBI,EAAG,CACDV,SAAU,IACVC,MAAO,QACPC,SAAU,cACVC,SAAU,GACVC,UAAW,OACXC,cAAe,SACfC,aAAc,IAEhB,cAAe,CACbN,SAAU,IACVC,MAAO,QACPC,SAAU,cACVC,SAAU,GACVI,OAAQ,OACRC,UAAW,IACXJ,UAAW,IACXC,cAAe,MACfC,aAAc,IAEhBK,EAAG,CACDX,SAAU,IACVC,MAAO,QACPC,SAAU,cACVC,SAAU,GACVC,UAAW,OACXC,cAAe,SACfC,aAAc,IAEhBM,EAAG,CACDZ,SAAU,IACVC,MAAO,QACPC,SAAU,cACVC,SAAU,GACVC,UAAW,OACXC,cAAe,SACfC,aAAc,IAEhBO,GAAI,CACFb,SAAU,IACVC,MAAO,QACPC,SAAU,cACVC,SAAU,GACVC,UAAW,OACXC,cAAe,SACfC,aAAc,KAIX,MAAMQ,Y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B,QAAS,QAEX,eAAgB,CACdA,QAAS,SAEXpB,EAAG,CACDoB,QAAS,QAEX,cAAe,CACbA,QAAS,SAEXnB,EAAG,CACDmB,QAAS,QAEXlB,EAAG,CACDkB,QAAS,QAEXjB,GAAI,CACFiB,QAAS,SAIN,MAAME,2BAAyE,CACpFjC,IAAK,CACH+B,QAAS,QAEX,gBAAiB,CACfA,QAAS,QACTvB,OAAQ,QAEVE,GAAI,CACFqB,QAAS,QAEX,eAAgB,CACdA,QAAS,QACTvB,OAAQ,QAEVG,EAAG,CACDoB,QAAS,QAEX,cAAe,CACbA,QAAS,QACTvB,OAAQ,QAEVI,EAAG,CACDmB,QAAS,QAEXlB,EAAG,CACDkB,QAAS,QAEXjB,GAAI,CACFiB,QAAS"}
@@ -1,2 +1,2 @@
1
- 'use strict';var styled=require('styled-components');var responsiveSize=require('../../mixins/responsive-size.js');var focus=require('../../mixins/focus.js');var style=require('../../shared/utils/style.js');var maskRectangle=require('./images/mask-rectangle.svg.js');var maskSlope=require('./images/mask-slope.svg.js');var IconButton=require('../IconButton/IconButton.js');var Skeleton=require('../Skeleton/Skeleton.js');function _interopDefault(o){return o&&o.__esModule?o:{default:o}}var styled__default=_interopDefault(styled);const shouldForwardDialogComponentProp=style.createShouldForwardProp((o=>!['dragging','fancy','zIndex'].includes(o)));const shouldForwardDialogContainerProp=style.createShouldForwardProp((o=>!['fancy'].includes(o)));const Fading=styled__default.default.div.withConfig({shouldForwardProp:o=>!['visible','after'].includes(o)}).withConfig({displayName:"DialogComponent__Fading",componentId:"ui__sc-1dlvioj-0"})(["box-sizing:border-box;position:relative;flex-shrink:0;width:100%;z-index:1;&::before,&::after{transition-property:opacity;transition-duration:150ms;transition-timing-function:ease-in;pointer-events:none;}",""],(o=>o.after?`\n &::after {\n content: '';\n display: block;\n position: absolute;\n height: 35px;\n width: 100%;\n bottom: 100%;\n left: 0;\n margin-bottom: -1px;\n background-image: linear-gradient(0deg, currentcolor, transparent);\n opacity: ${o.visible?1:0};\n }\n `:`\n &::before {\n content: '';\n display: block;\n position: absolute;\n height: 35px;\n width: 100%;\n top: 100%;\n left: 0;\n margin-top: -1px;\n background-image: linear-gradient(180deg, currentcolor, transparent);\n opacity: ${o.visible?1:0};\n }\n `));const FancyBackground=styled__default.default.div.withConfig({displayName:"DialogComponent__FancyBackground",componentId:"ui__sc-1dlvioj-1"})(["box-sizing:border-box;position:absolute;top:0;right:0;bottom:0;left:0;mask-image:url(","),url(",");mask-repeat:no-repeat,no-repeat;mask-size:100% 32px,cover;mask-position:0 56px,0 87px;border-radius:inherit;"],maskSlope.default,maskRectangle.default);const template_default=o=>`\n color: ${o.color};\n background-color: ${o.backgroundColor};\n box-shadow: 0 6px 20px 1px ${o.shadowColor};\n ${Fading} {\n color: ${o.backgroundColor};\n }\n `,template_fancy=o=>`\n color: ${o.color};\n ${FancyBackground} {\n background-color: ${o.backgroundColor};\n }\n ${Fading} {\n color: ${o.backgroundColor};\n }\n `;const Root=styled__default.default.div.withConfig({shouldForwardProp:shouldForwardDialogComponentProp}).withConfig({displayName:"DialogComponent__Root",componentId:"ui__sc-1dlvioj-2"})(["box-sizing:border-box;position:relative;display:flex;isolation:isolate;"," "," "," ",""],(o=>(o.fancy?template_fancy:template_default)({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['bg-onmain-primary'],shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette})),(o=>o.dragging&&`\n box-shadow: 0 0 0 2px ${o.theme.colors.white}, 0 0 0 4px ${o.theme.colors['border-focus']};\n `),(o=>typeof o.zIndex=='number'&&`z-index: ${o.zIndex};`),responsiveSize.responsiveSize);const Container=styled__default.default.div.withConfig({shouldForwardProp:shouldForwardDialogContainerProp}).withConfig({displayName:"DialogComponent__Container",componentId:"ui__sc-1dlvioj-3"})(["box-sizing:border-box;position:relative;display:flex;flex-direction:column;overflow:hidden;flex-grow:1;",""],responsiveSize.responsiveSize);const ScrollableContent=styled__default.default.div.withConfig({displayName:"DialogComponent__ScrollableContent",componentId:"ui__sc-1dlvioj-4"})(["box-sizing:border-box;position:relative;overflow:auto;overscroll-behavior:contain;padding-top:1px;padding-bottom:1px;min-height:85px;flex-grow:1;",""],focus.focus);const Controls=styled__default.default.div.withConfig({displayName:"DialogComponent__Controls",componentId:"ui__sc-1dlvioj-5"})(["box-sizing:border-box;position:relative;flex-shrink:0;padding-top:12px;"]);const DraggingHandle=styled__default.default.div.withConfig({displayName:"DialogComponent__DraggingHandle",componentId:"ui__sc-1dlvioj-6"})(["box-sizing:border-box;position:absolute;top:0;left:0;width:100%;display:flex;justify-content:center;padding-top:10px;padding-bottom:10px;cursor:grab;touch-action:none;z-index:2;"]);const DraggingIconContainer=styled__default.default.div.withConfig({displayName:"DialogComponent__DraggingIconContainer",componentId:"ui__sc-1dlvioj-7"})(["box-sizing:border-box;display:flex;padding:3px 12px;border-radius:12px;& > *{height:0.25em;}"," ",""],(o=>`\n background-color: ${o.theme.colors['bg-onmain-tertiary']};\n `),focus.focus);const PositionedIconButton=styled__default.default(IconButton.IconButton).withConfig({shouldForwardProp:o=>o!=='inset'}).withConfig({displayName:"DialogComponent__PositionedIconButton",componentId:"ui__sc-1dlvioj-8"})(["position:absolute;z-index:3;",""],(o=>o.inset));const Placeholder=styled__default.default.svg.withConfig({shouldForwardProp:o=>!['aspectRatio','orientation'].includes(o)}).attrs((o=>({xmlns:'http://www.w3.org/2000/svg',viewBox:o.aspectRatio==='3:1'?'0 0 3 1':'0 0 5 7',width:o.orientation==='portrait'?'100%':void 0,height:o.orientation==='landscape'?'100%':void 0}))).withConfig({displayName:"DialogComponent__Placeholder",componentId:"ui__sc-1dlvioj-9"})(["display:block;"]);const MediaPortrait=styled__default.default.div.withConfig({displayName:"DialogComponent__MediaPortrait",componentId:"ui__sc-1dlvioj-10"})(["box-sizing:border-box;position:relative;margin:-1px -1px 0;"]);const MediaLandscape=styled__default.default.div.withConfig({shouldForwardProp:o=>o!=='right'}).withConfig({displayName:"DialogComponent__MediaLandscape",componentId:"ui__sc-1dlvioj-11"})(["box-sizing:border-box;position:relative;height:100%;overflow:hidden;",""],(o=>o.right?"\n border-top-right-radius: inherit;\n border-bottom-right-radius: inherit;":"\n border-top-left-radius: inherit;\n border-bottom-left-radius: inherit;"));const MediaSkeleton=styled__default.default(Skeleton.Skeleton).withConfig({displayName:"DialogComponent__MediaSkeleton",componentId:"ui__sc-1dlvioj-12"})(["position:absolute;top:0;left:0;"]);const Media=styled__default.default.div.withConfig({shouldForwardProp:o=>o!=='src'}).withConfig({displayName:"DialogComponent__Media",componentId:"ui__sc-1dlvioj-13"})(["",""],(o=>`\n box-sizing: border-box;\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n background-image: url(${o.src});\n background-size: contain;\n background-repeat: no-repeat;\n background-position: 50%;\n `));const MediaPortraitContainer=styled__default.default.div.withConfig({shouldForwardProp:o=>!['top','bottom'].includes(o)}).withConfig({displayName:"DialogComponent__MediaPortraitContainer",componentId:"ui__sc-1dlvioj-14"})(["box-sizing:border-box;overflow:hidden;"," ",""],(o=>o.top&&"\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n "),(o=>o.bottom&&"\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n "));exports.Container=Container,exports.Controls=Controls,exports.DraggingHandle=DraggingHandle,exports.DraggingIconContainer=DraggingIconContainer,exports.Fading=Fading,exports.FancyBackground=FancyBackground,exports.Media=Media,exports.MediaLandscape=MediaLandscape,exports.MediaPortrait=MediaPortrait,exports.MediaPortraitContainer=MediaPortraitContainer,exports.MediaSkeleton=MediaSkeleton,exports.Placeholder=Placeholder,exports.PositionedIconButton=PositionedIconButton,exports.Root=Root,exports.ScrollableContent=ScrollableContent;
1
+ 'use strict';var styled=require('styled-components');var responsiveSize=require('../../mixins/responsive-size.js');var focus=require('../../mixins/focus.js');var style=require('../../shared/utils/style.js');var maskRectangle=require('./images/mask-rectangle.svg.js');var maskSlope=require('./images/mask-slope.svg.js');var IconButton=require('../IconButton/IconButton.js');var ProgressLine=require('../ProgressLine/ProgressLine.js');var Skeleton=require('../Skeleton/Skeleton.js');function _interopDefault(o){return o&&o.__esModule?o:{default:o}}var styled__default=_interopDefault(styled);const shouldForwardDialogComponentProp=style.createShouldForwardProp((o=>!['dragging','fancy','zIndex'].includes(o)));const shouldForwardDialogContainerProp=style.createShouldForwardProp((o=>!['fancy'].includes(o)));const shouldForwardProgressLineContainerProp=style.createShouldForwardProp((o=>!['inset'].includes(o)));const Fading=styled__default.default.div.withConfig({shouldForwardProp:o=>!['visible','after'].includes(o)}).withConfig({displayName:"DialogComponent__Fading",componentId:"ui__sc-1dlvioj-0"})(["box-sizing:border-box;position:relative;flex-shrink:0;width:100%;z-index:1;&::before,&::after{transition-property:opacity;transition-duration:150ms;transition-timing-function:ease-in;pointer-events:none;}",""],(o=>o.after?`\n &::after {\n content: '';\n display: block;\n position: absolute;\n height: 35px;\n width: 100%;\n bottom: 100%;\n left: 0;\n margin-bottom: -1px;\n background-image: linear-gradient(0deg, currentcolor, transparent);\n opacity: ${o.visible?1:0};\n }\n `:`\n &::before {\n content: '';\n display: block;\n position: absolute;\n height: 35px;\n width: 100%;\n top: 100%;\n left: 0;\n margin-top: -1px;\n background-image: linear-gradient(180deg, currentcolor, transparent);\n opacity: ${o.visible?1:0};\n }\n `));const FancyBackground=styled__default.default.div.withConfig({displayName:"DialogComponent__FancyBackground",componentId:"ui__sc-1dlvioj-1"})(["box-sizing:border-box;position:absolute;top:0;right:0;bottom:0;left:0;mask-image:url(","),url(",");mask-repeat:no-repeat,no-repeat;mask-size:100% 32px,cover;mask-position:0 56px,0 87px;border-radius:inherit;"],maskSlope.default,maskRectangle.default);const template_default=o=>`\n color: ${o.color};\n background-color: ${o.backgroundColor};\n box-shadow: 0 6px 20px 1px ${o.shadowColor};\n ${Fading} {\n color: ${o.backgroundColor};\n }\n `,template_fancy=o=>`\n color: ${o.color};\n ${FancyBackground} {\n background-color: ${o.backgroundColor};\n }\n ${Fading} {\n color: ${o.backgroundColor};\n }\n `;const Root=styled__default.default.div.withConfig({shouldForwardProp:shouldForwardDialogComponentProp}).withConfig({displayName:"DialogComponent__Root",componentId:"ui__sc-1dlvioj-2"})(["box-sizing:border-box;position:relative;display:flex;isolation:isolate;"," "," "," ",""],(o=>(o.fancy?template_fancy:template_default)({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['bg-onmain-primary'],shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette})),(o=>o.dragging&&`\n box-shadow: 0 0 0 2px ${o.theme.colors.white}, 0 0 0 4px ${o.theme.colors['border-focus']};\n `),(o=>typeof o.zIndex=='number'&&`z-index: ${o.zIndex};`),responsiveSize.responsiveSize);const Container=styled__default.default.div.withConfig({shouldForwardProp:shouldForwardDialogContainerProp}).withConfig({displayName:"DialogComponent__Container",componentId:"ui__sc-1dlvioj-3"})(["box-sizing:border-box;position:relative;display:flex;flex-direction:column;overflow:hidden;flex-grow:1;",""],responsiveSize.responsiveSize);const ScrollableContent=styled__default.default.div.withConfig({displayName:"DialogComponent__ScrollableContent",componentId:"ui__sc-1dlvioj-4"})(["box-sizing:border-box;position:relative;overflow:auto;overscroll-behavior:contain;padding:4px;min-height:85px;flex-grow:1;",""],focus.focus);const Controls=styled__default.default.div.withConfig({displayName:"DialogComponent__Controls",componentId:"ui__sc-1dlvioj-5"})(["box-sizing:border-box;position:relative;flex-shrink:0;padding:12px 4px 4px;"]);const DraggingHandle=styled__default.default.div.withConfig({displayName:"DialogComponent__DraggingHandle",componentId:"ui__sc-1dlvioj-6"})(["box-sizing:border-box;position:absolute;top:0;left:0;width:100%;display:flex;justify-content:center;padding-top:10px;padding-bottom:10px;cursor:grab;touch-action:none;z-index:2;"]);const DraggingIconContainer=styled__default.default.div.withConfig({displayName:"DialogComponent__DraggingIconContainer",componentId:"ui__sc-1dlvioj-7"})(["box-sizing:border-box;display:flex;padding:3px 12px;border-radius:12px;& > *{height:0.25em;}"," ",""],(o=>`\n background-color: ${o.theme.colors['bg-onmain-tertiary']};\n `),focus.focus);const PositionedIconButton=styled__default.default(IconButton.IconButton).withConfig({shouldForwardProp:o=>o!=='inset'}).withConfig({displayName:"DialogComponent__PositionedIconButton",componentId:"ui__sc-1dlvioj-8"})(["position:absolute;z-index:3;",""],(o=>o.inset));const PositionedProgressLine=styled__default.default(ProgressLine.ProgressLine).withConfig({shouldForwardProp:o=>o!=='inset'}).withConfig({displayName:"DialogComponent__PositionedProgressLine",componentId:"ui__sc-1dlvioj-9"})(["position:absolute;",""],(o=>o.inset));const ProgressLineContainer=styled__default.default.div.withConfig({shouldForwardProp:shouldForwardProgressLineContainerProp}).withConfig({displayName:"DialogComponent__ProgressLineContainer",componentId:"ui__sc-1dlvioj-10"})(["position:absolute;"," ",""],(o=>o.inset),responsiveSize.responsiveSize);const Placeholder=styled__default.default.svg.withConfig({shouldForwardProp:o=>!['aspectRatio','orientation'].includes(o)}).attrs((o=>({xmlns:'http://www.w3.org/2000/svg',viewBox:{'1:1':'0 0 1 1','3:1':'0 0 3 1','4:5':'0 0 4 5','5:2':'0 0 5 2','5:7':'0 0 5 7'}[o.aspectRatio],width:o.orientation==='portrait'?'100%':void 0,height:o.orientation==='landscape'?'100%':void 0}))).withConfig({displayName:"DialogComponent__Placeholder",componentId:"ui__sc-1dlvioj-11"})(["display:block;"]);const MediaPortrait=styled__default.default.div.withConfig({displayName:"DialogComponent__MediaPortrait",componentId:"ui__sc-1dlvioj-12"})(["box-sizing:border-box;position:relative;margin:-1px -1px 0;"]);const MediaLandscape=styled__default.default.div.withConfig({shouldForwardProp:o=>o!=='right'}).withConfig({displayName:"DialogComponent__MediaLandscape",componentId:"ui__sc-1dlvioj-13"})(["box-sizing:border-box;position:relative;height:100%;overflow:hidden;",""],(o=>o.right?"\n border-top-right-radius: inherit;\n border-bottom-right-radius: inherit;":"\n border-top-left-radius: inherit;\n border-bottom-left-radius: inherit;"));const MediaSkeleton=styled__default.default(Skeleton.Skeleton).withConfig({displayName:"DialogComponent__MediaSkeleton",componentId:"ui__sc-1dlvioj-14"})(["position:absolute;top:0;left:0;"]);const Media=styled__default.default.div.withConfig({shouldForwardProp:o=>o!=='src'}).withConfig({displayName:"DialogComponent__Media",componentId:"ui__sc-1dlvioj-15"})(["",""],(o=>`\n box-sizing: border-box;\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n background-image: url(${o.src});\n background-size: contain;\n background-repeat: no-repeat;\n background-position: 50%;\n `));const MediaPortraitContainer=styled__default.default.div.withConfig({shouldForwardProp:o=>!['top','bottom'].includes(o)}).withConfig({displayName:"DialogComponent__MediaPortraitContainer",componentId:"ui__sc-1dlvioj-16"})(["box-sizing:border-box;overflow:hidden;"," ",""],(o=>o.top&&"\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n "),(o=>o.bottom&&"\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n "));exports.Container=Container,exports.Controls=Controls,exports.DraggingHandle=DraggingHandle,exports.DraggingIconContainer=DraggingIconContainer,exports.Fading=Fading,exports.FancyBackground=FancyBackground,exports.Media=Media,exports.MediaLandscape=MediaLandscape,exports.MediaPortrait=MediaPortrait,exports.MediaPortraitContainer=MediaPortraitContainer,exports.MediaSkeleton=MediaSkeleton,exports.Placeholder=Placeholder,exports.PositionedIconButton=PositionedIconButton,exports.PositionedProgressLine=PositionedProgressLine,exports.ProgressLineContainer=ProgressLineContainer,exports.Root=Root,exports.ScrollableContent=ScrollableContent;
2
2
  //# sourceMappingURL=style.js.map