@skbkontur/react-ui 4.3.0 → 4.3.1

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 (118) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/cjs/components/CurrencyInput/CurrencyInput.js +4 -0
  3. package/cjs/components/CurrencyInput/CurrencyInput.js.map +1 -1
  4. package/cjs/components/CurrencyInput/CurrencyInputKeyboardActions.d.ts +2 -0
  5. package/cjs/components/CurrencyInput/CurrencyInputKeyboardActions.js +14 -2
  6. package/cjs/components/CurrencyInput/CurrencyInputKeyboardActions.js.map +1 -1
  7. package/cjs/components/DateInput/DateFragmentsView.js +1 -1
  8. package/cjs/components/DateInput/DateFragmentsView.js.map +1 -1
  9. package/cjs/components/DatePicker/DatePicker.d.ts +1 -1
  10. package/cjs/components/FileUploader/FileUploader.md +8 -1
  11. package/cjs/components/Hint/Hint.d.ts +1 -1
  12. package/cjs/components/Hint/Hint.js.map +1 -1
  13. package/cjs/components/Hint/Hint.md +14 -0
  14. package/cjs/components/ScrollContainer/ScrollContainer.d.ts +1 -1
  15. package/cjs/components/ScrollContainer/ScrollContainer.helpers.js +4 -4
  16. package/cjs/components/ScrollContainer/ScrollContainer.helpers.js.map +1 -1
  17. package/cjs/components/ScrollContainer/ScrollContainer.js +1 -1
  18. package/cjs/components/ScrollContainer/ScrollContainer.js.map +1 -1
  19. package/cjs/components/Toast/Toast.js.map +1 -1
  20. package/cjs/components/Tooltip/Tooltip.d.ts +2 -2
  21. package/cjs/components/Tooltip/Tooltip.js +2 -2
  22. package/cjs/components/Tooltip/Tooltip.js.map +1 -1
  23. package/cjs/internal/CommonWrapper/CommonWrapper.d.ts +1 -1
  24. package/cjs/internal/CommonWrapper/CommonWrapper.js.map +1 -1
  25. package/cjs/internal/DropdownContainer/DropdownContainer.d.ts +1 -1
  26. package/cjs/internal/DropdownContainer/DropdownContainer.js.map +1 -1
  27. package/cjs/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.js +2 -1
  28. package/cjs/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.js.map +1 -1
  29. package/cjs/internal/InternalMenu/InternalMenu.js +20 -8
  30. package/cjs/internal/InternalMenu/InternalMenu.js.map +1 -1
  31. package/cjs/internal/MaskedInput/MaskedInput.d.ts +1 -0
  32. package/cjs/internal/MaskedInput/MaskedInput.js +10 -4
  33. package/cjs/internal/MaskedInput/MaskedInput.js.map +1 -1
  34. package/cjs/internal/Menu/Menu.js +7 -3
  35. package/cjs/internal/Menu/Menu.js.map +1 -1
  36. package/cjs/internal/Popup/Popup.d.ts +1 -1
  37. package/cjs/internal/Popup/Popup.js +20 -15
  38. package/cjs/internal/Popup/Popup.js.map +1 -1
  39. package/cjs/internal/Popup/PopupHelper.d.ts +1 -1
  40. package/cjs/internal/Popup/PopupHelper.js.map +1 -1
  41. package/cjs/internal/Popup/PopupPin.d.ts +1 -1
  42. package/cjs/internal/Popup/PopupPin.js.map +1 -1
  43. package/cjs/internal/RenderLayer/RenderLayer.d.ts +1 -1
  44. package/cjs/internal/RenderLayer/RenderLayer.js.map +1 -1
  45. package/cjs/internal/themes/DefaultTheme.js +1 -1
  46. package/cjs/internal/themes/DefaultTheme.js.map +1 -1
  47. package/cjs/lib/InstanceWithAnchorElement.d.ts +1 -1
  48. package/cjs/lib/InstanceWithAnchorElement.js.map +1 -1
  49. package/cjs/lib/SSRSafe.d.ts +2 -1
  50. package/cjs/lib/SSRSafe.js +9 -1
  51. package/cjs/lib/SSRSafe.js.map +1 -1
  52. package/cjs/lib/listenFocusOutside.d.ts +1 -1
  53. package/cjs/lib/listenFocusOutside.js.map +1 -1
  54. package/cjs/lib/rootNode/getRootNode.d.ts +3 -3
  55. package/cjs/lib/rootNode/getRootNode.js +7 -7
  56. package/cjs/lib/rootNode/getRootNode.js.map +1 -1
  57. package/cjs/lib/rootNode/rootNodeDecorator.d.ts +7 -7
  58. package/cjs/lib/rootNode/rootNodeDecorator.js.map +1 -1
  59. package/cjs/typings/event-types.d.ts +2 -2
  60. package/components/CurrencyInput/CurrencyInput/CurrencyInput.js +7 -0
  61. package/components/CurrencyInput/CurrencyInput/CurrencyInput.js.map +1 -1
  62. package/components/CurrencyInput/CurrencyInputKeyboardActions/CurrencyInputKeyboardActions.js +4 -2
  63. package/components/CurrencyInput/CurrencyInputKeyboardActions/CurrencyInputKeyboardActions.js.map +1 -1
  64. package/components/CurrencyInput/CurrencyInputKeyboardActions.d.ts +2 -0
  65. package/components/DateInput/DateFragmentsView/DateFragmentsView.js +1 -0
  66. package/components/DateInput/DateFragmentsView/DateFragmentsView.js.map +1 -1
  67. package/components/DatePicker/DatePicker.d.ts +1 -1
  68. package/components/FileUploader/FileUploader.md +8 -1
  69. package/components/Hint/Hint/Hint.js.map +1 -1
  70. package/components/Hint/Hint.d.ts +1 -1
  71. package/components/Hint/Hint.md +14 -0
  72. package/components/ScrollContainer/ScrollContainer/ScrollContainer.js +1 -1
  73. package/components/ScrollContainer/ScrollContainer/ScrollContainer.js.map +1 -1
  74. package/components/ScrollContainer/ScrollContainer.d.ts +1 -1
  75. package/components/ScrollContainer/ScrollContainer.helpers/ScrollContainer.helpers.js +4 -4
  76. package/components/ScrollContainer/ScrollContainer.helpers/ScrollContainer.helpers.js.map +1 -1
  77. package/components/Toast/Toast/Toast.js.map +1 -1
  78. package/components/Tooltip/Tooltip/Tooltip.js +2 -2
  79. package/components/Tooltip/Tooltip/Tooltip.js.map +1 -1
  80. package/components/Tooltip/Tooltip.d.ts +2 -2
  81. package/internal/CommonWrapper/CommonWrapper/CommonWrapper.js.map +1 -1
  82. package/internal/CommonWrapper/CommonWrapper.d.ts +1 -1
  83. package/internal/DropdownContainer/DropdownContainer/DropdownContainer.js.map +1 -1
  84. package/internal/DropdownContainer/DropdownContainer.d.ts +1 -1
  85. package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll/HideBodyVerticalScroll.js +2 -1
  86. package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll/HideBodyVerticalScroll.js.map +1 -1
  87. package/internal/InternalMenu/InternalMenu/InternalMenu.js +16 -6
  88. package/internal/InternalMenu/InternalMenu/InternalMenu.js.map +1 -1
  89. package/internal/MaskedInput/MaskedInput/MaskedInput.js +9 -5
  90. package/internal/MaskedInput/MaskedInput/MaskedInput.js.map +1 -1
  91. package/internal/MaskedInput/MaskedInput.d.ts +1 -0
  92. package/internal/Menu/Menu/Menu.js +6 -1
  93. package/internal/Menu/Menu/Menu.js.map +1 -1
  94. package/internal/Popup/Popup/Popup.js +20 -12
  95. package/internal/Popup/Popup/Popup.js.map +1 -1
  96. package/internal/Popup/Popup.d.ts +1 -1
  97. package/internal/Popup/PopupHelper/PopupHelper.js.map +1 -1
  98. package/internal/Popup/PopupHelper.d.ts +1 -1
  99. package/internal/Popup/PopupPin/PopupPin.js.map +1 -1
  100. package/internal/Popup/PopupPin.d.ts +1 -1
  101. package/internal/RenderLayer/RenderLayer/RenderLayer.js.map +1 -1
  102. package/internal/RenderLayer/RenderLayer.d.ts +1 -1
  103. package/internal/themes/DefaultTheme/DefaultTheme.js +6 -6
  104. package/internal/themes/DefaultTheme/DefaultTheme.js.map +1 -1
  105. package/lib/InstanceWithAnchorElement/InstanceWithAnchorElement.js.map +1 -1
  106. package/lib/InstanceWithAnchorElement.d.ts +1 -1
  107. package/lib/SSRSafe/SSRSafe.js +7 -0
  108. package/lib/SSRSafe/SSRSafe.js.map +1 -1
  109. package/lib/SSRSafe.d.ts +2 -1
  110. package/lib/listenFocusOutside/listenFocusOutside.js.map +1 -1
  111. package/lib/listenFocusOutside.d.ts +1 -1
  112. package/lib/rootNode/getRootNode/getRootNode.js +8 -8
  113. package/lib/rootNode/getRootNode/getRootNode.js.map +1 -1
  114. package/lib/rootNode/getRootNode.d.ts +3 -3
  115. package/lib/rootNode/rootNodeDecorator/rootNodeDecorator.js.map +1 -1
  116. package/lib/rootNode/rootNodeDecorator.d.ts +7 -7
  117. package/package.json +2 -2
  118. package/typings/event-types.d.ts +2 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["Popup.tsx"],"names":["POPUP_BORDER_DEFAULT_COLOR","TRANSITION_TIMEOUT","enter","exit","PopupPositions","DefaultPosition","DUMMY_LOCATION","position","coordinates","top","left","PopupDataTids","content","contentInner","popupPin","Popup","responsiveLayout","rootNode","getProps","defaultProps","state","location","props","opened","locationUpdateId","refForTransition","React","createRef","anchorElement","updateAnchorElement","instance","childDomNode","getAnchorElement","removeEventListeners","addEventListeners","handleMouseEnter","event","onMouseEnter","handleMouseLeave","onMouseLeave","handleClick","onClick","handleFocus","onFocus","handleBlur","onBlur","calculateWidth","width","includes","offsetWidth","parseFloat","children","backgroundColor","styles","theme","resetLocation","cancelDelayedUpdateLocation","setState","refPopupElement","element","lastPopupElement","handleLayoutEvent","updateLocation","popupElement","getLocation","locationEquals","componentDidMount","layoutEventsToken","LayoutEvents","addListener","getDerivedStateFromProps","componentDidUpdate","prevProps","prevState","hadNoLocation","hasLocation","wasClosed","isMobileLayout","onOpen","onClose","delayUpdateLocation","componentWillUnmount","remove","render","renderMain","renderMobile","renderChildren","mobileOnCloseRequest","useWrapper","anchor","isValidElement","anchorWithRef","cloneElement","ref","originalRef","canGetAnchorNode","withoutMobile","renderContent","addEventListener","removeEventListener","maxWidth","hasShadow","disableAnimations","ignoreHover","PopupHelper","getPositionObject","direction","rootStyle","shouldFallbackShadow","isIE11","isEdge","isSafari","Boolean","setRootNode","popup","shadow","shadowFallback","popupIgnoreHover","transitionEnter","transitionEnterActive","transitionExit","renderPin","positionName","isDefaultBorderColor","popupBorderColor","pinBorder","pinSize","borderColor","hasPin","parseInt","popupPinSize","getPinOffset","align","popupBackground","raf","cancel","x","y","Math","abs","positions","tryPreserveFirstRenderedPosition","anchorRect","getElementAbsoluteRect","popupRect","getCoordinates","isFullyVisible","canBecomeVisible","canBecomeFullyVisible","getPinnedPopupOffset","test","anchorSize","height","max","marginFromProps","margin","isNaN","popupMargin","popupOffset","getHorizontalPosition","getVerticalPosition","Error","pinOffset","popupPinOffset","popupPinOffsetY","popupPinOffsetX","Component","__KONTUR_REACT_UI__","propTypes","PropTypes","oneOfType","HTMLElement","node","isRequired","string","func","bool","number","array","isTestEnv","defaultRootNode"],"mappings":"8YAAA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uC;;AAEA,IAAMA,0BAA0B,GAAG,aAAnC;AACA,IAAMC,kBAAkB,GAAG,EAAEC,KAAK,EAAE,CAAT,EAAYC,IAAI,EAAE,GAAlB,EAA3B;;AAEO,IAAMC,cAAc,GAAG;AAC5B,UAD4B;AAE5B,YAF4B;AAG5B,WAH4B;AAI5B,WAJ4B;AAK5B,cAL4B;AAM5B,cAN4B;AAO5B,cAP4B;AAQ5B,eAR4B;AAS5B,aAT4B;AAU5B,aAV4B;AAW5B,aAX4B;AAY5B,UAZ4B,CAAvB,C;;AAcA,IAAMC,eAAe,GAAGD,cAAc,CAAC,CAAD,CAAtC,C;;;;AAIP,IAAME,cAA6B,GAAG;AACpCC,EAAAA,QAAQ,EAAEF,eAD0B;AAEpCG,EAAAA,WAAW,EAAE;AACXC,IAAAA,GAAG,EAAE,CAAC,IADK;AAEXC,IAAAA,IAAI,EAAE,CAAC,IAFI,EAFuB,EAAtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiEO,IAAMC,aAAa,GAAG;AAC3BC,EAAAA,OAAO,EAAE,cADkB;AAE3BC,EAAAA,YAAY,EAAE,mBAFa;AAG3BC,EAAAA,QAAQ,EAAE,gBAHiB,EAAtB,C;;;;;;;;;;;;AAeMC,K,OAFZC,2B,eACAC,kB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4ESC,IAAAA,Q,GAAW,0CAAkBH,KAAK,CAACI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AOzCxD,KAAK,EAAE,MAPkC,E,UAapBqI,e,GAAkB,I","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Transition } from 'react-transition-group';\nimport raf from 'raf';\nimport warning from 'warning';\n\nimport { Nullable } from '../../typings/utility-types';\nimport * as LayoutEvents from '../../lib/LayoutEvents';\nimport { ZIndex } from '../ZIndex';\nimport { RenderContainer } from '../RenderContainer';\nimport { FocusEventType, MouseEventType } from '../../typings/event-types';\nimport { isFunction, isNonNullable, isNullable, isRefableElement } from '../../lib/utils';\nimport { isIE11, isEdge, isSafari } from '../../lib/client';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { Theme } from '../../lib/theming/Theme';\nimport { isHTMLElement, safePropTypesInstanceOf } from '../../lib/SSRSafe';\nimport { isTestEnv } from '../../lib/currentEnvironment';\nimport { CommonProps, CommonWrapper } from '../CommonWrapper';\nimport { cx } from '../../lib/theming/Emotion';\nimport { responsiveLayout } from '../../components/ResponsiveLayout/decorator';\nimport { MobilePopup } from '../MobilePopup';\nimport { getRootNode, rootNode, TSetRootNode } from '../../lib/rootNode';\nimport { callChildRef } from '../../lib/callChildRef/callChildRef';\nimport { isInstanceWithAnchorElement } from '../../lib/InstanceWithAnchorElement';\nimport { createPropsGetter } from '../../lib/createPropsGetter';\n\nimport { PopupPin } from './PopupPin';\nimport { Offset, PopupHelper, PositionObject, Rect } from './PopupHelper';\nimport { styles } from './Popup.styles';\n\nconst POPUP_BORDER_DEFAULT_COLOR = 'transparent';\nconst TRANSITION_TIMEOUT = { enter: 0, exit: 200 };\n\nexport const PopupPositions = [\n 'top left',\n 'top center',\n 'top right',\n 'right top',\n 'right middle',\n 'right bottom',\n 'bottom right',\n 'bottom center',\n 'bottom left',\n 'left bottom',\n 'left middle',\n 'left top',\n] as const;\nexport const DefaultPosition = PopupPositions[0];\n\nexport type PopupPositionsType = typeof PopupPositions[number];\n\nconst DUMMY_LOCATION: PopupLocation = {\n position: DefaultPosition,\n coordinates: {\n top: -9999,\n left: -9999,\n },\n};\n\nexport interface PopupHandlerProps {\n onMouseEnter?: (event: MouseEventType) => void;\n onMouseLeave?: (event: MouseEventType) => void;\n onClick?: (event: MouseEventType) => void;\n onFocus?: (event: FocusEventType) => void;\n onBlur?: (event: FocusEventType) => void;\n onOpen?: () => void;\n onClose?: () => void;\n}\n\nexport interface PopupProps extends CommonProps, PopupHandlerProps {\n anchorElement: React.ReactNode | HTMLElement;\n backgroundColor?: React.CSSProperties['backgroundColor'];\n borderColor?: React.CSSProperties['borderColor'];\n children: React.ReactNode | (() => React.ReactNode);\n hasPin?: boolean;\n hasShadow?: boolean;\n disableAnimations?: boolean;\n margin?: number;\n maxWidth?: number | string;\n opened: boolean;\n pinOffset?: number;\n pinSize?: number;\n popupOffset?: number;\n positions: Readonly<PopupPositionsType[]>;\n /**\n * Явно указывает, что вложенные элементы должны быть обёрнуты в `<span/>`. <br/> Используется для корректного позиционирования тултипа при двух и более вложенных элементах.\n *\n * _Примечание_: при **двух и более** вложенных элементах обёртка будет добавлена автоматически.\n */\n useWrapper?: boolean;\n ignoreHover?: boolean;\n width?: React.CSSProperties['width'];\n /**\n * При очередном рендере пытаться сохранить первоначальную позицию попапа\n * (в числе числе, когда он выходит за пределы экрана, но может быть проскролен в него).\n *\n * Нужен только для Tooltip. В остальных случаях позиция перестраивается автоматически.\n * @see https://github.com/skbkontur/retail-ui/pull/1195\n */\n tryPreserveFirstRenderedPosition?: boolean;\n withoutMobile?: boolean;\n mobileOnCloseRequest?: () => void;\n}\n\ninterface PopupLocation {\n coordinates: {\n left: number;\n top: number;\n };\n position: PopupPositionsType;\n}\n\nexport interface PopupState {\n location: Nullable<PopupLocation>;\n}\n\nexport const PopupDataTids = {\n content: 'PopupContent',\n contentInner: 'PopupContentInner',\n popupPin: 'PopupPin__root',\n} as const;\n\ntype DefaultProps = Required<\n Pick<\n PopupProps,\n 'popupOffset' | 'hasPin' | 'hasShadow' | 'disableAnimations' | 'useWrapper' | 'ignoreHover' | 'width'\n >\n>;\n\n@responsiveLayout\n@rootNode\nexport class Popup extends React.Component<PopupProps, PopupState> {\n public static __KONTUR_REACT_UI__ = 'Popup';\n\n public static propTypes = {\n /**\n * Ссылка (ref) на элемент или React компонент, для которого рисуется попап\n */\n anchorElement: PropTypes.oneOfType([safePropTypesInstanceOf(() => HTMLElement), PropTypes.node]).isRequired,\n\n /**\n * Фон попапа и пина\n */\n backgroundColor: PropTypes.string,\n\n children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n\n /**\n * Показывать ли пин\n */\n hasPin: PropTypes.bool,\n\n /**\n * Применять ли box-shadow на попапе. При false отключает границу на пине\n */\n hasShadow: PropTypes.bool,\n\n /**\n * Отступ попапа от элемента\n */\n margin: PropTypes.number,\n\n /**\n * Показан или скрыт попап\n */\n opened: PropTypes.bool,\n\n /**\n * Смещение пина от края попапа. Край задаётся в пропе position вторым словом\n */\n pinOffset: PropTypes.number,\n\n /**\n * Сторона пина без учёта границы.\n * Пин представляет собой равносторонний треугольник, высота от попапа\n * до \"носика\" пина будет соответствовать формуле (size* √3)/2\n */\n pinSize: PropTypes.number,\n\n /**\n * смещение попапа относительно родительского элемента\n */\n popupOffset: PropTypes.number,\n\n /**\n * С какой стороны показывать попап и край попапа,\n * на котором будет отображаться пин\n */\n positions: PropTypes.array,\n\n /**\n * Игнорировать ли события hover/click\n */\n ignoreHover: PropTypes.bool,\n };\n\n public static defaultProps: DefaultProps = {\n popupOffset: 0,\n hasPin: false,\n hasShadow: false,\n disableAnimations: isTestEnv,\n useWrapper: false,\n ignoreHover: false,\n width: 'auto',\n };\n\n private getProps = createPropsGetter(Popup.defaultProps);\n\n // see #2873 and #2895\n public static readonly defaultRootNode = null;\n\n public state: PopupState = { location: this.props.opened ? DUMMY_LOCATION : null };\n private theme!: Theme;\n private layoutEventsToken: Nullable<ReturnType<typeof LayoutEvents.addListener>>;\n private locationUpdateId: Nullable<number> = null;\n private lastPopupElement: Nullable<HTMLElement>;\n private isMobileLayout!: boolean;\n private setRootNode!: TSetRootNode;\n private refForTransition = React.createRef<HTMLDivElement>();\n\n public anchorElement: Nullable<HTMLElement> = null;\n\n public componentDidMount() {\n this.updateLocation();\n this.layoutEventsToken = LayoutEvents.addListener(this.handleLayoutEvent);\n }\n\n public static getDerivedStateFromProps(props: Readonly<PopupProps>, state: PopupState) {\n /**\n * Delaying updateLocation to ensure it happens after props update\n */\n if (props.opened) {\n if (!state.location) {\n return { location: DUMMY_LOCATION };\n }\n } else if (state.location) {\n return { location: DUMMY_LOCATION };\n }\n return state;\n }\n\n public componentDidUpdate(prevProps: PopupProps, prevState: PopupState) {\n const hadNoLocation = prevState.location === DUMMY_LOCATION;\n const hasLocation = this.state.location !== DUMMY_LOCATION;\n const wasClosed = prevProps.opened && !this.props.opened;\n\n if (this.isMobileLayout && prevState.location === null && this.state.location === null) {\n this.setState({ location: DUMMY_LOCATION });\n }\n\n if (this.props.opened && hadNoLocation && hasLocation && this.props.onOpen) {\n this.props.onOpen();\n }\n if (wasClosed && !hasLocation && this.props.onClose) {\n this.props.onClose();\n }\n if (this.props.opened) {\n this.delayUpdateLocation();\n }\n }\n\n public componentWillUnmount() {\n this.cancelDelayedUpdateLocation();\n this.removeEventListeners(this.anchorElement);\n if (this.layoutEventsToken) {\n this.layoutEventsToken.remove();\n this.layoutEventsToken = null;\n }\n if (this.state.location && this.props.onClose) {\n this.props.onClose();\n }\n }\n\n public render() {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return this.renderMain();\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private renderMobile() {\n const { opened } = this.props;\n const children = this.renderChildren();\n\n return children ? (\n <MobilePopup opened={opened} withoutRenderContainer onCloseRequest={this.props.mobileOnCloseRequest}>\n {this.content(children)}\n </MobilePopup>\n ) : null;\n }\n\n private renderMain() {\n const { location } = this.state;\n const { anchorElement } = this.props;\n const useWrapper = this.getProps().useWrapper;\n\n let anchor: Nullable<React.ReactNode> = null;\n if (isHTMLElement(anchorElement)) {\n this.updateAnchorElement(anchorElement);\n } else if (React.isValidElement(anchorElement)) {\n anchor = useWrapper ? <span>{anchorElement}</span> : anchorElement;\n } else {\n anchor = <span>{anchorElement}</span>;\n }\n\n const anchorWithRef =\n anchor && React.isValidElement(anchor) && isRefableElement(anchor)\n ? React.cloneElement(anchor, {\n ref: (instance: Nullable<React.ReactInstance>) => {\n this.updateAnchorElement(instance);\n const originalRef = (anchor as React.RefAttributes<any>)?.ref;\n originalRef && callChildRef(originalRef, instance);\n },\n })\n : null;\n\n // we need to get anchor's DOM node\n // so we either set our own ref on it via cloning\n // or relay on findDOMNode (inside getRootNode)\n // which should be called within updateAnchorElement\n // in the case when the anchor is not refable\n\n const canGetAnchorNode = !!anchorWithRef || isHTMLElement(anchorElement);\n\n return (\n <RenderContainer anchor={anchorWithRef || anchor} ref={canGetAnchorNode ? null : this.updateAnchorElement}>\n {this.isMobileLayout && !this.props.withoutMobile\n ? this.renderMobile()\n : location && this.renderContent(location)}\n </RenderContainer>\n );\n }\n\n private updateAnchorElement = (instance: Nullable<React.ReactInstance>) => {\n const childDomNode = isInstanceWithAnchorElement(instance) ? instance.getAnchorElement() : getRootNode(instance);\n const anchorElement = this.anchorElement;\n\n if (childDomNode !== anchorElement) {\n this.removeEventListeners(anchorElement);\n this.anchorElement = childDomNode;\n this.addEventListeners(childDomNode);\n }\n };\n\n private addEventListeners(element: Nullable<HTMLElement>) {\n if (element && isHTMLElement(element)) {\n element.addEventListener('mouseenter', this.handleMouseEnter);\n element.addEventListener('mouseleave', this.handleMouseLeave);\n element.addEventListener('click', this.handleClick);\n element.addEventListener('focusin', this.handleFocus as EventListener);\n element.addEventListener('focusout', this.handleBlur as EventListener);\n }\n }\n\n private removeEventListeners(element: Nullable<HTMLElement>) {\n if (element && isHTMLElement(element)) {\n element.removeEventListener('mouseenter', this.handleMouseEnter);\n element.removeEventListener('mouseleave', this.handleMouseLeave);\n element.removeEventListener('click', this.handleClick);\n element.removeEventListener('focusin', this.handleFocus as EventListener);\n element.removeEventListener('focusout', this.handleBlur as EventListener);\n }\n }\n\n private handleMouseEnter = (event: MouseEventType) => {\n if (this.props.onMouseEnter) {\n this.props.onMouseEnter(event);\n }\n };\n\n private handleMouseLeave = (event: MouseEventType) => {\n if (this.props.onMouseLeave) {\n this.props.onMouseLeave(event);\n }\n };\n\n private handleClick = (event: MouseEventType) => {\n if (this.props.onClick) {\n this.props.onClick(event);\n }\n };\n\n private handleFocus = (event: FocusEventType) => {\n if (this.props.onFocus) {\n this.props.onFocus(event);\n }\n };\n\n private handleBlur = (event: FocusEventType) => {\n if (this.props.onBlur) {\n this.props.onBlur(event);\n }\n };\n\n private calculateWidth = (width: PopupProps['width']) => {\n if (typeof width === 'string' && width.includes('%')) {\n return this.anchorElement ? (this.anchorElement.offsetWidth * parseFloat(width)) / 100 : 0;\n }\n return width;\n };\n\n private content = (children: React.ReactNode) => {\n const { backgroundColor } = this.props;\n const width = this.getProps().width;\n\n return (\n <div className={styles.content(this.theme)} data-tid={PopupDataTids.content} ref={this.refForTransition}>\n <div\n className={styles.contentInner(this.theme)}\n style={{ backgroundColor, width: this.calculateWidth(width) }}\n data-tid={PopupDataTids.contentInner}\n >\n {children}\n </div>\n </div>\n );\n };\n\n private renderContent(location: PopupLocation) {\n const { maxWidth, opened } = this.props;\n const { hasShadow, disableAnimations, ignoreHover } = this.getProps();\n const children = this.renderChildren();\n\n const { direction } = PopupHelper.getPositionObject(location.position);\n const rootStyle: React.CSSProperties = { ...location.coordinates, maxWidth };\n\n const shouldFallbackShadow = isIE11 || isEdge || isSafari;\n\n return (\n <Transition\n timeout={TRANSITION_TIMEOUT}\n appear={!disableAnimations}\n in={Boolean(opened && children)}\n mountOnEnter\n unmountOnExit\n enter={!disableAnimations}\n exit={!disableAnimations}\n onExited={this.resetLocation}\n nodeRef={this.refForTransition}\n >\n {(state: string) => (\n <CommonWrapper {...this.props} rootNodeRef={this.setRootNode}>\n <ZIndex\n data-tid={'Popup__root'}\n wrapperRef={this.refPopupElement}\n priority={'Popup'}\n className={cx({\n [styles.popup(this.theme)]: true,\n [styles.shadow(this.theme)]: hasShadow && !shouldFallbackShadow,\n [styles.shadowFallback(this.theme)]: hasShadow && shouldFallbackShadow,\n [styles.popupIgnoreHover()]: ignoreHover,\n ...(disableAnimations\n ? {}\n : {\n [styles[`transition-enter-${direction}` as keyof typeof styles](this.theme)]: true,\n [styles.transitionEnter()]: state === 'entering',\n [styles.transitionEnterActive()]: state === 'entered',\n [styles.transitionExit()]: state === 'exiting',\n }),\n })}\n style={rootStyle}\n onMouseEnter={this.handleMouseEnter}\n onMouseLeave={this.handleMouseLeave}\n >\n {this.content(children)}\n {!this.isMobileLayout && this.renderPin(location.position)}\n </ZIndex>\n </CommonWrapper>\n )}\n </Transition>\n );\n }\n\n private resetLocation = () => {\n this.cancelDelayedUpdateLocation();\n this.state.location !== null && this.setState({ location: null });\n };\n\n private renderChildren() {\n return isFunction(this.props.children) ? this.props.children() : this.props.children;\n }\n\n private refPopupElement = (element: Nullable<HTMLElement>) => {\n this.lastPopupElement = element;\n };\n\n private renderPin(positionName: string): React.ReactNode {\n /**\n * Box-shadow does not appear under the pin. Borders are used instead.\n * In non-ie browsers drop-shadow filter is used. It is applying\n * shadow to the pin too.\n */\n const isDefaultBorderColor = this.theme.popupBorderColor === POPUP_BORDER_DEFAULT_COLOR;\n const pinBorder = isIE11 && isDefaultBorderColor ? 'rgba(0, 0, 0, 0.09)' : this.theme.popupBorderColor;\n\n const { pinSize, backgroundColor, borderColor } = this.props;\n const { hasShadow, hasPin } = this.getProps();\n const position = PopupHelper.getPositionObject(positionName);\n\n return (\n hasPin && (\n <PopupPin\n popupElement={this.lastPopupElement}\n popupPosition={positionName}\n size={pinSize || parseInt(this.theme.popupPinSize)}\n offset={this.getPinOffset(position.align)}\n borderWidth={hasShadow ? 1 : 0}\n backgroundColor={backgroundColor || this.theme.popupBackground}\n borderColor={borderColor || pinBorder}\n />\n )\n );\n }\n\n private handleLayoutEvent = () => {\n if (!this.state.location) {\n return;\n }\n this.updateLocation();\n };\n\n private delayUpdateLocation() {\n this.cancelDelayedUpdateLocation();\n this.locationUpdateId = raf(this.updateLocation);\n }\n\n private cancelDelayedUpdateLocation() {\n if (this.locationUpdateId) {\n raf.cancel(this.locationUpdateId);\n this.locationUpdateId = null;\n }\n }\n\n private updateLocation = () => {\n const popupElement = this.lastPopupElement;\n\n if (!popupElement) {\n return;\n }\n\n const location = this.getLocation(popupElement, this.state.location);\n if (!this.locationEquals(this.state.location, location)) {\n this.setState({ location });\n }\n };\n\n private locationEquals(x: Nullable<PopupLocation>, y: Nullable<PopupLocation>) {\n if (x === y) {\n return true;\n }\n\n if (isNullable(x) || isNullable(y)) {\n return false;\n }\n\n if (!isIE11 && !isEdge) {\n return (\n x.coordinates.left === y.coordinates.left &&\n x.coordinates.top === y.coordinates.top &&\n x.position === y.position\n );\n }\n\n // Для ie/edge обновляем позицию только при разнице минимум в 1. Иначе есть вероятность\n // уйти в бесконечный ререндер\n\n return (\n x.position === y.position &&\n Math.abs(x.coordinates.top - y.coordinates.top) <= 1 &&\n Math.abs(x.coordinates.left - y.coordinates.left) <= 1\n );\n }\n\n private getLocation(popupElement: HTMLElement, location?: Nullable<PopupLocation>) {\n const { positions, tryPreserveFirstRenderedPosition } = this.props;\n const anchorElement = this.anchorElement;\n\n warning(\n anchorElement && isHTMLElement(anchorElement),\n 'Anchor element is not defined or not instance of HTMLElement',\n );\n\n if (!(anchorElement && isHTMLElement(anchorElement))) {\n return location;\n }\n\n const anchorRect = PopupHelper.getElementAbsoluteRect(anchorElement);\n const popupRect = PopupHelper.getElementAbsoluteRect(popupElement);\n\n let position: PopupPositionsType;\n let coordinates: Offset;\n\n if (location && location !== DUMMY_LOCATION && location.position) {\n position = location.position;\n coordinates = this.getCoordinates(anchorRect, popupRect, position);\n\n const isFullyVisible = PopupHelper.isFullyVisible(coordinates, popupRect);\n const canBecomeVisible = !isFullyVisible && PopupHelper.canBecomeFullyVisible(position, coordinates);\n\n if (\n // если нужно сохранить первоначальную позицию и Попап целиком\n // находится в пределах вьюпорта (или может быть проскроллен в него)\n (tryPreserveFirstRenderedPosition && (isFullyVisible || canBecomeVisible)) ||\n // если Попап целиком во вьюпорте и в самой приоритетной позиции\n // (иначе нужно попытаться позицию сменить)\n (isFullyVisible && position === positions[0])\n ) {\n // сохраняем текущую позицию\n return { coordinates, position };\n }\n }\n\n for (position of positions) {\n coordinates = this.getCoordinates(anchorRect, popupRect, position);\n if (PopupHelper.isFullyVisible(coordinates, popupRect)) {\n return { coordinates, position };\n }\n }\n\n position = positions[0];\n coordinates = this.getCoordinates(anchorRect, popupRect, position);\n return { coordinates, position };\n }\n\n private getPinnedPopupOffset(anchorRect: Rect, position: PositionObject) {\n if (!this.getProps().hasPin || /center|middle/.test(position.align)) {\n return 0;\n }\n\n const anchorSize = /top|bottom/.test(position.direction) ? anchorRect.width : anchorRect.height;\n\n const { pinSize } = this.props;\n\n return Math.max(\n 0,\n this.getPinOffset(position.align) + (pinSize || parseInt(this.theme.popupPinSize)) - anchorSize / 2,\n );\n }\n\n private getCoordinates(anchorRect: Rect, popupRect: Rect, positionName: string) {\n const { margin: marginFromProps } = this.props;\n const margin =\n isNonNullable(marginFromProps) && !isNaN(marginFromProps)\n ? marginFromProps\n : parseInt(this.theme.popupMargin) || 0;\n const position = PopupHelper.getPositionObject(positionName);\n const popupOffset = this.getProps().popupOffset + this.getPinnedPopupOffset(anchorRect, position);\n\n switch (position.direction) {\n case 'top':\n return {\n top: anchorRect.top - popupRect.height - margin,\n left: this.getHorizontalPosition(anchorRect, popupRect, position.align, popupOffset),\n };\n case 'bottom':\n return {\n top: anchorRect.top + anchorRect.height + margin,\n left: this.getHorizontalPosition(anchorRect, popupRect, position.align, popupOffset),\n };\n case 'left':\n return {\n top: this.getVerticalPosition(anchorRect, popupRect, position.align, popupOffset),\n left: anchorRect.left - popupRect.width - margin,\n };\n case 'right':\n return {\n top: this.getVerticalPosition(anchorRect, popupRect, position.align, popupOffset),\n left: anchorRect.left + anchorRect.width + margin,\n };\n default:\n throw new Error(`Unexpected direction '${position.direction}'`);\n }\n }\n\n private getPinOffset(align: string) {\n const { pinOffset } = this.props;\n\n switch (align) {\n case 'top':\n case 'bottom':\n return pinOffset || parseInt(this.theme.popupPinOffset) || parseInt(this.theme.popupPinOffsetY);\n case 'left':\n case 'right':\n return pinOffset || parseInt(this.theme.popupPinOffset) || parseInt(this.theme.popupPinOffsetX);\n case 'center':\n case 'middle':\n return 0;\n default:\n throw new Error(`Unexpected align '${align}'`);\n }\n }\n\n private getHorizontalPosition(anchorRect: Rect, popupRect: Rect, align: string, popupOffset: number) {\n switch (align) {\n case 'left':\n return anchorRect.left - popupOffset;\n case 'center':\n return anchorRect.left - (popupRect.width - anchorRect.width) / 2;\n case 'right':\n return anchorRect.left - (popupRect.width - anchorRect.width) + popupOffset;\n default:\n throw new Error(`Unexpected align '${align}'`);\n }\n }\n\n private getVerticalPosition(anchorRect: Rect, popupRect: Rect, align: string, popupOffset: number) {\n switch (align) {\n case 'top':\n return anchorRect.top - popupOffset;\n case 'middle':\n return anchorRect.top - (popupRect.height - anchorRect.height) / 2;\n case 'bottom':\n return anchorRect.top - (popupRect.height - anchorRect.height) + popupOffset;\n default:\n throw new Error(`Unexpected align '${align}'`);\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["Popup.tsx"],"names":["POPUP_BORDER_DEFAULT_COLOR","TRANSITION_TIMEOUT","enter","exit","PopupPositions","DefaultPosition","DUMMY_LOCATION","position","coordinates","top","left","PopupDataTids","content","contentInner","popupPin","Popup","responsiveLayout","rootNode","getProps","defaultProps","state","location","props","opened","locationUpdateId","refForTransition","React","createRef","anchorElement","updateAnchorElement","instance","childDomNode","getAnchorElement","removeEventListeners","addEventListeners","handleMouseEnter","event","onMouseEnter","handleMouseLeave","onMouseLeave","handleClick","onClick","handleFocus","onFocus","handleBlur","onBlur","calculateWidth","width","includes","anchorWidth","Math","floor","parseFloat","children","backgroundColor","styles","theme","resetLocation","cancelDelayedUpdateLocation","setState","refPopupElement","element","lastPopupElement","handleLayoutEvent","updateLocation","popupElement","getLocation","locationEquals","componentDidMount","layoutEventsToken","LayoutEvents","addListener","getDerivedStateFromProps","componentDidUpdate","prevProps","prevState","hadNoLocation","hasLocation","wasClosed","isMobileLayout","onOpen","onClose","delayUpdateLocation","componentWillUnmount","remove","render","renderMain","renderMobile","renderChildren","mobileOnCloseRequest","useWrapper","anchor","isValidElement","anchorWithRef","cloneElement","ref","originalRef","canGetAnchorNode","withoutMobile","renderContent","addEventListener","removeEventListener","maxWidth","hasShadow","disableAnimations","ignoreHover","PopupHelper","getPositionObject","direction","rootStyle","shouldFallbackShadow","isIE11","isEdge","isSafari","Boolean","setRootNode","popup","shadow","shadowFallback","popupIgnoreHover","transitionEnter","transitionEnterActive","transitionExit","renderPin","positionName","isDefaultBorderColor","popupBorderColor","pinBorder","pinSize","borderColor","hasPin","parseInt","popupPinSize","getPinOffset","align","popupBackground","raf","cancel","x","y","abs","positions","tryPreserveFirstRenderedPosition","anchorRect","getElementAbsoluteRect","popupRect","getCoordinates","isFullyVisible","canBecomeVisible","canBecomeFullyVisible","getPinnedPopupOffset","test","anchorSize","height","max","marginFromProps","margin","isNaN","popupMargin","popupOffset","getHorizontalPosition","getVerticalPosition","Error","pinOffset","popupPinOffset","popupPinOffsetY","popupPinOffsetX","Component","__KONTUR_REACT_UI__","propTypes","PropTypes","oneOfType","HTMLElement","node","isRequired","string","func","bool","number","array","isTestEnv","defaultRootNode"],"mappings":"8YAAA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uC;;AAEA,IAAMA,0BAA0B,GAAG,aAAnC;AACA,IAAMC,kBAAkB,GAAG,EAAEC,KAAK,EAAE,CAAT,EAAYC,IAAI,EAAE,GAAlB,EAA3B;;AAEO,IAAMC,cAAc,GAAG;AA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AUC,SAAV,CAAoB,CAAC,sCAAwB,oBAAMC,WAAN,EAAxB,CAAD,EAA6CF,mBAAUG,IAAvD,CAApB,EAAkFC,UAJzE,EAMxB;AACJ;AACA,KACIxH,eAAe,EAAEoH,mBAAUK,MATH,EAWxB1H,QAAQ,EAAEqH,mBAAUC,SAAV,CAAoB,CAACD,mBAAUG,IAAX,EAAiBH,mBAAUM,IAA3B,CAApB,CAXc,EAaxB;AACJ;AACA,KACI9C,MAAM,EAAEwC,mBAAUO,IAhBM,EAkBxB;AACJ;AACA,KACI1E,SAAS,EAAEmE,mBAAUO,IArBG,EAuBxB;AACJ;AACA,KACIrB,MAAM,EAAEc,mBAAUQ,MA1BM,EA4BxB;AACJ;AACA,KACI3J,MAAM,EAAEmJ,mBAAUO,IA/BM,EAiCxB;AACJ;AACA,KACId,SAAS,EAAEO,mBAAUQ,MApCG,EAsCxB;AACJ;AACA;AACA;AACA,KACIlD,OAAO,EAAE0C,mBAAUQ,MA3CK,EA6CxB;AACJ;AACA,KACInB,WAAW,EAAEW,mBAAUQ,MAhDC,EAkDxB;AACJ;AACA;AACA,KACIrC,SAAS,EAAE6B,mBAAUS,KAtDG,EAwDxB;AACJ;AACA,KACI1E,WAAW,EAAEiE,mBAAUO,IA3DC,E,UA8DZ9J,Y,GAA6B,EACzC4I,WAAW,EAAE,CAD4B,EAEzC7B,MAAM,EAAE,KAFiC,EAGzC3B,SAAS,EAAE,KAH8B,EAIzCC,iBAAiB,EAAE4E,6BAJsB,EAKzC1F,UAAU,EAAE,KAL6B,EAMzCe,WAAW,EAAE,KAN4B,EAOzC1D,KAAK,EAAE,MAPkC,E,UAapBsI,e,GAAkB,I","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Transition } from 'react-transition-group';\nimport raf from 'raf';\nimport warning from 'warning';\n\nimport { getDOMRect } from '../../lib/dom/getDOMRect';\nimport { Nullable } from '../../typings/utility-types';\nimport * as LayoutEvents from '../../lib/LayoutEvents';\nimport { ZIndex } from '../ZIndex';\nimport { RenderContainer } from '../RenderContainer';\nimport { FocusEventType, MouseEventType } from '../../typings/event-types';\nimport { isFunction, isNonNullable, isNullable, isRefableElement } from '../../lib/utils';\nimport { isIE11, isEdge, isSafari } from '../../lib/client';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { Theme } from '../../lib/theming/Theme';\nimport { isElement, safePropTypesInstanceOf } from '../../lib/SSRSafe';\nimport { isTestEnv } from '../../lib/currentEnvironment';\nimport { CommonProps, CommonWrapper } from '../CommonWrapper';\nimport { cx } from '../../lib/theming/Emotion';\nimport { responsiveLayout } from '../../components/ResponsiveLayout/decorator';\nimport { MobilePopup } from '../MobilePopup';\nimport { getRootNode, rootNode, TSetRootNode } from '../../lib/rootNode';\nimport { callChildRef } from '../../lib/callChildRef/callChildRef';\nimport { isInstanceWithAnchorElement } from '../../lib/InstanceWithAnchorElement';\nimport { createPropsGetter } from '../../lib/createPropsGetter';\n\nimport { PopupPin } from './PopupPin';\nimport { Offset, PopupHelper, PositionObject, Rect } from './PopupHelper';\nimport { styles } from './Popup.styles';\n\nconst POPUP_BORDER_DEFAULT_COLOR = 'transparent';\nconst TRANSITION_TIMEOUT = { enter: 0, exit: 200 };\n\nexport const PopupPositions = [\n 'top left',\n 'top center',\n 'top right',\n 'right top',\n 'right middle',\n 'right bottom',\n 'bottom right',\n 'bottom center',\n 'bottom left',\n 'left bottom',\n 'left middle',\n 'left top',\n] as const;\nexport const DefaultPosition = PopupPositions[0];\n\nexport type PopupPositionsType = typeof PopupPositions[number];\n\nconst DUMMY_LOCATION: PopupLocation = {\n position: DefaultPosition,\n coordinates: {\n top: -9999,\n left: -9999,\n },\n};\n\nexport interface PopupHandlerProps {\n onMouseEnter?: (event: MouseEventType) => void;\n onMouseLeave?: (event: MouseEventType) => void;\n onClick?: (event: MouseEventType) => void;\n onFocus?: (event: FocusEventType) => void;\n onBlur?: (event: FocusEventType) => void;\n onOpen?: () => void;\n onClose?: () => void;\n}\n\nexport interface PopupProps extends CommonProps, PopupHandlerProps {\n anchorElement: React.ReactNode | HTMLElement;\n backgroundColor?: React.CSSProperties['backgroundColor'];\n borderColor?: React.CSSProperties['borderColor'];\n children: React.ReactNode | (() => React.ReactNode);\n hasPin?: boolean;\n hasShadow?: boolean;\n disableAnimations?: boolean;\n margin?: number;\n maxWidth?: number | string;\n opened: boolean;\n pinOffset?: number;\n pinSize?: number;\n popupOffset?: number;\n positions: Readonly<PopupPositionsType[]>;\n /**\n * Явно указывает, что вложенные элементы должны быть обёрнуты в `<span/>`. <br/> Используется для корректного позиционирования тултипа при двух и более вложенных элементах.\n *\n * _Примечание_: при **двух и более** вложенных элементах обёртка будет добавлена автоматически.\n */\n useWrapper?: boolean;\n ignoreHover?: boolean;\n width?: React.CSSProperties['width'];\n /**\n * При очередном рендере пытаться сохранить первоначальную позицию попапа\n * (в числе числе, когда он выходит за пределы экрана, но может быть проскролен в него).\n *\n * Нужен только для Tooltip. В остальных случаях позиция перестраивается автоматически.\n * @see https://github.com/skbkontur/retail-ui/pull/1195\n */\n tryPreserveFirstRenderedPosition?: boolean;\n withoutMobile?: boolean;\n mobileOnCloseRequest?: () => void;\n}\n\ninterface PopupLocation {\n coordinates: {\n left: number;\n top: number;\n };\n position: PopupPositionsType;\n}\n\nexport interface PopupState {\n location: Nullable<PopupLocation>;\n}\n\nexport const PopupDataTids = {\n content: 'PopupContent',\n contentInner: 'PopupContentInner',\n popupPin: 'PopupPin__root',\n} as const;\n\ntype DefaultProps = Required<\n Pick<\n PopupProps,\n 'popupOffset' | 'hasPin' | 'hasShadow' | 'disableAnimations' | 'useWrapper' | 'ignoreHover' | 'width'\n >\n>;\n\n@responsiveLayout\n@rootNode\nexport class Popup extends React.Component<PopupProps, PopupState> {\n public static __KONTUR_REACT_UI__ = 'Popup';\n\n public static propTypes = {\n /**\n * Ссылка (ref) на элемент или React компонент, для которого рисуется попап\n */\n anchorElement: PropTypes.oneOfType([safePropTypesInstanceOf(() => HTMLElement), PropTypes.node]).isRequired,\n\n /**\n * Фон попапа и пина\n */\n backgroundColor: PropTypes.string,\n\n children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n\n /**\n * Показывать ли пин\n */\n hasPin: PropTypes.bool,\n\n /**\n * Применять ли box-shadow на попапе. При false отключает границу на пине\n */\n hasShadow: PropTypes.bool,\n\n /**\n * Отступ попапа от элемента\n */\n margin: PropTypes.number,\n\n /**\n * Показан или скрыт попап\n */\n opened: PropTypes.bool,\n\n /**\n * Смещение пина от края попапа. Край задаётся в пропе position вторым словом\n */\n pinOffset: PropTypes.number,\n\n /**\n * Сторона пина без учёта границы.\n * Пин представляет собой равносторонний треугольник, высота от попапа\n * до \"носика\" пина будет соответствовать формуле (size* √3)/2\n */\n pinSize: PropTypes.number,\n\n /**\n * смещение попапа относительно родительского элемента\n */\n popupOffset: PropTypes.number,\n\n /**\n * С какой стороны показывать попап и край попапа,\n * на котором будет отображаться пин\n */\n positions: PropTypes.array,\n\n /**\n * Игнорировать ли события hover/click\n */\n ignoreHover: PropTypes.bool,\n };\n\n public static defaultProps: DefaultProps = {\n popupOffset: 0,\n hasPin: false,\n hasShadow: false,\n disableAnimations: isTestEnv,\n useWrapper: false,\n ignoreHover: false,\n width: 'auto',\n };\n\n private getProps = createPropsGetter(Popup.defaultProps);\n\n // see #2873 and #2895\n public static readonly defaultRootNode = null;\n\n public state: PopupState = { location: this.props.opened ? DUMMY_LOCATION : null };\n private theme!: Theme;\n private layoutEventsToken: Nullable<ReturnType<typeof LayoutEvents.addListener>>;\n private locationUpdateId: Nullable<number> = null;\n private lastPopupElement: Nullable<Element>;\n private isMobileLayout!: boolean;\n private setRootNode!: TSetRootNode;\n private refForTransition = React.createRef<HTMLDivElement>();\n\n public anchorElement: Nullable<Element> = null;\n\n public componentDidMount() {\n this.updateLocation();\n this.layoutEventsToken = LayoutEvents.addListener(this.handleLayoutEvent);\n }\n\n public static getDerivedStateFromProps(props: Readonly<PopupProps>, state: PopupState) {\n /**\n * Delaying updateLocation to ensure it happens after props update\n */\n if (props.opened) {\n if (!state.location) {\n return { location: DUMMY_LOCATION };\n }\n } else if (state.location) {\n return { location: DUMMY_LOCATION };\n }\n return state;\n }\n\n public componentDidUpdate(prevProps: PopupProps, prevState: PopupState) {\n const hadNoLocation = prevState.location === DUMMY_LOCATION;\n const hasLocation = this.state.location !== DUMMY_LOCATION;\n const wasClosed = prevProps.opened && !this.props.opened;\n\n if (this.isMobileLayout && prevState.location === null && this.state.location === null) {\n this.setState({ location: DUMMY_LOCATION });\n }\n\n if (this.props.opened && hadNoLocation && hasLocation && this.props.onOpen) {\n this.props.onOpen();\n }\n if (wasClosed && !hasLocation && this.props.onClose) {\n this.props.onClose();\n }\n if (this.props.opened) {\n this.delayUpdateLocation();\n }\n }\n\n public componentWillUnmount() {\n this.cancelDelayedUpdateLocation();\n this.removeEventListeners(this.anchorElement);\n if (this.layoutEventsToken) {\n this.layoutEventsToken.remove();\n this.layoutEventsToken = null;\n }\n if (this.state.location && this.props.onClose) {\n this.props.onClose();\n }\n }\n\n public render() {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return this.renderMain();\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private renderMobile() {\n const { opened } = this.props;\n const children = this.renderChildren();\n\n return children ? (\n <MobilePopup opened={opened} withoutRenderContainer onCloseRequest={this.props.mobileOnCloseRequest}>\n {this.content(children)}\n </MobilePopup>\n ) : null;\n }\n\n private renderMain() {\n const { location } = this.state;\n const { anchorElement } = this.props;\n const useWrapper = this.getProps().useWrapper;\n\n let anchor: Nullable<React.ReactNode> = null;\n if (isElement(anchorElement)) {\n this.updateAnchorElement(anchorElement);\n } else if (React.isValidElement(anchorElement)) {\n anchor = useWrapper ? <span>{anchorElement}</span> : anchorElement;\n } else {\n anchor = <span>{anchorElement}</span>;\n }\n\n const anchorWithRef =\n anchor && React.isValidElement(anchor) && isRefableElement(anchor)\n ? React.cloneElement(anchor, {\n ref: (instance: Nullable<React.ReactInstance>) => {\n this.updateAnchorElement(instance);\n const originalRef = (anchor as React.RefAttributes<any>)?.ref;\n originalRef && callChildRef(originalRef, instance);\n },\n })\n : null;\n\n // we need to get anchor's DOM node\n // so we either set our own ref on it via cloning\n // or relay on findDOMNode (inside getRootNode)\n // which should be called within updateAnchorElement\n // in the case when the anchor is not refable\n\n const canGetAnchorNode = !!anchorWithRef || isElement(anchorElement);\n\n return (\n <RenderContainer anchor={anchorWithRef || anchor} ref={canGetAnchorNode ? null : this.updateAnchorElement}>\n {this.isMobileLayout && !this.props.withoutMobile\n ? this.renderMobile()\n : location && this.renderContent(location)}\n </RenderContainer>\n );\n }\n\n private updateAnchorElement = (instance: Nullable<React.ReactInstance>) => {\n const childDomNode = isInstanceWithAnchorElement(instance) ? instance.getAnchorElement() : getRootNode(instance);\n const anchorElement = this.anchorElement;\n\n if (childDomNode !== anchorElement) {\n this.removeEventListeners(anchorElement);\n this.anchorElement = childDomNode;\n this.addEventListeners(childDomNode);\n }\n };\n\n private addEventListeners(element: Nullable<Element>) {\n if (element && isElement(element)) {\n // @ts-expect-error: Type ElementEventMap is missing events: https://github.com/skbkontur/retail-ui/pull/2946#discussion_r931072657\n element.addEventListener('mouseenter', this.handleMouseEnter);\n // @ts-expect-error: See the comment above\n element.addEventListener('mouseleave', this.handleMouseLeave);\n // @ts-expect-error: See the comment above\n element.addEventListener('click', this.handleClick);\n element.addEventListener('focusin', this.handleFocus as EventListener);\n element.addEventListener('focusout', this.handleBlur as EventListener);\n }\n }\n\n private removeEventListeners(element: Nullable<Element>) {\n if (element && isElement(element)) {\n // @ts-expect-error: Type ElementEventMap is missing events: https://github.com/skbkontur/retail-ui/pull/2946#discussion_r931072657\n element.removeEventListener('mouseenter', this.handleMouseEnter);\n // @ts-expect-error: See the comment above\n element.removeEventListener('mouseleave', this.handleMouseLeave);\n // @ts-expect-error: See the comment above\n element.removeEventListener('click', this.handleClick);\n element.removeEventListener('focusin', this.handleFocus as EventListener);\n element.removeEventListener('focusout', this.handleBlur as EventListener);\n }\n }\n\n private handleMouseEnter = (event: MouseEventType) => {\n if (this.props.onMouseEnter) {\n this.props.onMouseEnter(event);\n }\n };\n\n private handleMouseLeave = (event: MouseEventType) => {\n if (this.props.onMouseLeave) {\n this.props.onMouseLeave(event);\n }\n };\n\n private handleClick = (event: MouseEventType) => {\n if (this.props.onClick) {\n this.props.onClick(event);\n }\n };\n\n private handleFocus = (event: FocusEventType) => {\n if (this.props.onFocus) {\n this.props.onFocus(event);\n }\n };\n\n private handleBlur = (event: FocusEventType) => {\n if (this.props.onBlur) {\n this.props.onBlur(event);\n }\n };\n\n private calculateWidth = (width: PopupProps['width']) => {\n if (typeof width === 'string' && width.includes('%')) {\n const anchorWidth = Math.floor(getDOMRect(this.anchorElement).width);\n return this.anchorElement ? (anchorWidth * parseFloat(width)) / 100 : 0;\n }\n return width;\n };\n\n private content = (children: React.ReactNode) => {\n const { backgroundColor } = this.props;\n const width = this.getProps().width;\n\n return (\n <div className={styles.content(this.theme)} data-tid={PopupDataTids.content} ref={this.refForTransition}>\n <div\n className={styles.contentInner(this.theme)}\n style={{ backgroundColor, width: this.calculateWidth(width) }}\n data-tid={PopupDataTids.contentInner}\n >\n {children}\n </div>\n </div>\n );\n };\n\n private renderContent(location: PopupLocation) {\n const { maxWidth, opened } = this.props;\n const { hasShadow, disableAnimations, ignoreHover } = this.getProps();\n const children = this.renderChildren();\n\n const { direction } = PopupHelper.getPositionObject(location.position);\n const rootStyle: React.CSSProperties = { ...location.coordinates, maxWidth };\n\n const shouldFallbackShadow = isIE11 || isEdge || isSafari;\n\n return (\n <Transition\n timeout={TRANSITION_TIMEOUT}\n appear={!disableAnimations}\n in={Boolean(opened && children)}\n mountOnEnter\n unmountOnExit\n enter={!disableAnimations}\n exit={!disableAnimations}\n onExited={this.resetLocation}\n nodeRef={this.refForTransition}\n >\n {(state: string) => (\n <CommonWrapper {...this.props} rootNodeRef={this.setRootNode}>\n <ZIndex\n data-tid={'Popup__root'}\n wrapperRef={this.refPopupElement}\n priority={'Popup'}\n className={cx({\n [styles.popup(this.theme)]: true,\n [styles.shadow(this.theme)]: hasShadow && !shouldFallbackShadow,\n [styles.shadowFallback(this.theme)]: hasShadow && shouldFallbackShadow,\n [styles.popupIgnoreHover()]: ignoreHover,\n ...(disableAnimations\n ? {}\n : {\n [styles[`transition-enter-${direction}` as keyof typeof styles](this.theme)]: true,\n [styles.transitionEnter()]: state === 'entering',\n [styles.transitionEnterActive()]: state === 'entered',\n [styles.transitionExit()]: state === 'exiting',\n }),\n })}\n style={rootStyle}\n onMouseEnter={this.handleMouseEnter}\n onMouseLeave={this.handleMouseLeave}\n >\n {this.content(children)}\n {!this.isMobileLayout && this.renderPin(location.position)}\n </ZIndex>\n </CommonWrapper>\n )}\n </Transition>\n );\n }\n\n private resetLocation = () => {\n this.cancelDelayedUpdateLocation();\n this.state.location !== null && this.setState({ location: null });\n };\n\n private renderChildren() {\n return isFunction(this.props.children) ? this.props.children() : this.props.children;\n }\n\n private refPopupElement = (element: Nullable<Element>) => {\n this.lastPopupElement = element;\n };\n\n private renderPin(positionName: string): React.ReactNode {\n /**\n * Box-shadow does not appear under the pin. Borders are used instead.\n * In non-ie browsers drop-shadow filter is used. It is applying\n * shadow to the pin too.\n */\n const isDefaultBorderColor = this.theme.popupBorderColor === POPUP_BORDER_DEFAULT_COLOR;\n const pinBorder = isIE11 && isDefaultBorderColor ? 'rgba(0, 0, 0, 0.09)' : this.theme.popupBorderColor;\n\n const { pinSize, backgroundColor, borderColor } = this.props;\n const { hasShadow, hasPin } = this.getProps();\n const position = PopupHelper.getPositionObject(positionName);\n\n return (\n hasPin && (\n <PopupPin\n popupElement={this.lastPopupElement}\n popupPosition={positionName}\n size={pinSize || parseInt(this.theme.popupPinSize)}\n offset={this.getPinOffset(position.align)}\n borderWidth={hasShadow ? 1 : 0}\n backgroundColor={backgroundColor || this.theme.popupBackground}\n borderColor={borderColor || pinBorder}\n />\n )\n );\n }\n\n private handleLayoutEvent = () => {\n if (!this.state.location) {\n return;\n }\n this.updateLocation();\n };\n\n private delayUpdateLocation() {\n this.cancelDelayedUpdateLocation();\n this.locationUpdateId = raf(this.updateLocation);\n }\n\n private cancelDelayedUpdateLocation() {\n if (this.locationUpdateId) {\n raf.cancel(this.locationUpdateId);\n this.locationUpdateId = null;\n }\n }\n\n private updateLocation = () => {\n const popupElement = this.lastPopupElement;\n\n if (!popupElement) {\n return;\n }\n\n const location = this.getLocation(popupElement, this.state.location);\n if (!this.locationEquals(this.state.location, location)) {\n this.setState({ location });\n }\n };\n\n private locationEquals(x: Nullable<PopupLocation>, y: Nullable<PopupLocation>) {\n if (x === y) {\n return true;\n }\n\n if (isNullable(x) || isNullable(y)) {\n return false;\n }\n\n if (!isIE11 && !isEdge) {\n return (\n x.coordinates.left === y.coordinates.left &&\n x.coordinates.top === y.coordinates.top &&\n x.position === y.position\n );\n }\n\n // Для ie/edge обновляем позицию только при разнице минимум в 1. Иначе есть вероятность\n // уйти в бесконечный ререндер\n\n return (\n x.position === y.position &&\n Math.abs(x.coordinates.top - y.coordinates.top) <= 1 &&\n Math.abs(x.coordinates.left - y.coordinates.left) <= 1\n );\n }\n\n private getLocation(popupElement: Element, location?: Nullable<PopupLocation>) {\n const { positions, tryPreserveFirstRenderedPosition } = this.props;\n const anchorElement = this.anchorElement;\n\n warning(anchorElement && isElement(anchorElement), 'Anchor element is not defined or not instance of Element');\n\n if (!(anchorElement && isElement(anchorElement))) {\n return location;\n }\n\n const anchorRect = PopupHelper.getElementAbsoluteRect(anchorElement);\n const popupRect = PopupHelper.getElementAbsoluteRect(popupElement);\n\n let position: PopupPositionsType;\n let coordinates: Offset;\n\n if (location && location !== DUMMY_LOCATION && location.position) {\n position = location.position;\n coordinates = this.getCoordinates(anchorRect, popupRect, position);\n\n const isFullyVisible = PopupHelper.isFullyVisible(coordinates, popupRect);\n const canBecomeVisible = !isFullyVisible && PopupHelper.canBecomeFullyVisible(position, coordinates);\n\n if (\n // если нужно сохранить первоначальную позицию и Попап целиком\n // находится в пределах вьюпорта (или может быть проскроллен в него)\n (tryPreserveFirstRenderedPosition && (isFullyVisible || canBecomeVisible)) ||\n // если Попап целиком во вьюпорте и в самой приоритетной позиции\n // (иначе нужно попытаться позицию сменить)\n (isFullyVisible && position === positions[0])\n ) {\n // сохраняем текущую позицию\n return { coordinates, position };\n }\n }\n\n for (position of positions) {\n coordinates = this.getCoordinates(anchorRect, popupRect, position);\n if (PopupHelper.isFullyVisible(coordinates, popupRect)) {\n return { coordinates, position };\n }\n }\n\n position = positions[0];\n coordinates = this.getCoordinates(anchorRect, popupRect, position);\n return { coordinates, position };\n }\n\n private getPinnedPopupOffset(anchorRect: Rect, position: PositionObject) {\n if (!this.getProps().hasPin || /center|middle/.test(position.align)) {\n return 0;\n }\n\n const anchorSize = /top|bottom/.test(position.direction) ? anchorRect.width : anchorRect.height;\n\n const { pinSize } = this.props;\n\n return Math.max(\n 0,\n this.getPinOffset(position.align) + (pinSize || parseInt(this.theme.popupPinSize)) - anchorSize / 2,\n );\n }\n\n private getCoordinates(anchorRect: Rect, popupRect: Rect, positionName: string) {\n const { margin: marginFromProps } = this.props;\n const margin =\n isNonNullable(marginFromProps) && !isNaN(marginFromProps)\n ? marginFromProps\n : parseInt(this.theme.popupMargin) || 0;\n const position = PopupHelper.getPositionObject(positionName);\n const popupOffset = this.getProps().popupOffset + this.getPinnedPopupOffset(anchorRect, position);\n\n switch (position.direction) {\n case 'top':\n return {\n top: anchorRect.top - popupRect.height - margin,\n left: this.getHorizontalPosition(anchorRect, popupRect, position.align, popupOffset),\n };\n case 'bottom':\n return {\n top: anchorRect.top + anchorRect.height + margin,\n left: this.getHorizontalPosition(anchorRect, popupRect, position.align, popupOffset),\n };\n case 'left':\n return {\n top: this.getVerticalPosition(anchorRect, popupRect, position.align, popupOffset),\n left: anchorRect.left - popupRect.width - margin,\n };\n case 'right':\n return {\n top: this.getVerticalPosition(anchorRect, popupRect, position.align, popupOffset),\n left: anchorRect.left + anchorRect.width + margin,\n };\n default:\n throw new Error(`Unexpected direction '${position.direction}'`);\n }\n }\n\n private getPinOffset(align: string) {\n const { pinOffset } = this.props;\n\n switch (align) {\n case 'top':\n case 'bottom':\n return pinOffset || parseInt(this.theme.popupPinOffset) || parseInt(this.theme.popupPinOffsetY);\n case 'left':\n case 'right':\n return pinOffset || parseInt(this.theme.popupPinOffset) || parseInt(this.theme.popupPinOffsetX);\n case 'center':\n case 'middle':\n return 0;\n default:\n throw new Error(`Unexpected align '${align}'`);\n }\n }\n\n private getHorizontalPosition(anchorRect: Rect, popupRect: Rect, align: string, popupOffset: number) {\n switch (align) {\n case 'left':\n return anchorRect.left - popupOffset;\n case 'center':\n return anchorRect.left - (popupRect.width - anchorRect.width) / 2;\n case 'right':\n return anchorRect.left - (popupRect.width - anchorRect.width) + popupOffset;\n default:\n throw new Error(`Unexpected align '${align}'`);\n }\n }\n\n private getVerticalPosition(anchorRect: Rect, popupRect: Rect, align: string, popupOffset: number) {\n switch (align) {\n case 'top':\n return anchorRect.top - popupOffset;\n case 'middle':\n return anchorRect.top - (popupRect.height - anchorRect.height) / 2;\n case 'bottom':\n return anchorRect.top - (popupRect.height - anchorRect.height) + popupOffset;\n default:\n throw new Error(`Unexpected align '${align}'`);\n }\n }\n}\n"]}
@@ -14,7 +14,7 @@ export interface PositionObject {
14
14
  align: string;
15
15
  }
16
16
  declare function getPositionObject(position: string): PositionObject;
17
- declare function getElementAbsoluteRect(element: HTMLElement): Rect;
17
+ declare function getElementAbsoluteRect(element: Element): Rect;
18
18
  declare function isAbsoluteRectFullyVisible(coordinates: Offset, popupRect: Rect): boolean;
19
19
  declare function canBecomeFullyVisible(positionName: PopupPositionsType, coordinates: Offset): boolean;
20
20
  export declare const PopupHelper: {
@@ -1 +1 @@
1
- {"version":3,"sources":["PopupHelper.tsx"],"names":["getPositionObject","position","x","split","direction","align","getElementAbsoluteRect","element","rect","_getElementRelativeRect","convertRectToAbsolute","isAbsoluteRectFullyVisible","coordinates","popupRect","windowRelativeRect","_getWindowRelativeRect","windowAbsoluteRect","absoluteRect","top","left","height","width","_rectContainsRect","canBecomeFullyVisible","positionName","availableScrollDistances","right","bottom","_getViewProperty","clientWidth","window","innerWidth","clientHeight","innerHeight","offset","_getAbsoluteOffset","scrollTop","pageYOffset","scrollLeft","pageXOffset","clientTop","clientLeft","outerRect","innerRect","getProperty","views","document","documentElement","body","map","find","Boolean","PopupHelper","isFullyVisible"],"mappings":"oEAAA;;;;;;;;;;;;;;;;;;;;;AAqBA,SAASA,iBAAT,CAA2BC,QAA3B,EAA6D;AAC3D,MAAMC,CAAC,GAAGD,QAAQ,CAACE,KAAT,CAAe,GAAf,CAAV;;AAEA,SAAO;AACLC,IAAAA,SAAS,EAAEF,CAAC,CAAC,CAAD,CADP;AAELG,IAAAA,KAAK,EAAEH,CAAC,CAAC,CAAD,CAFH,EAAP;;AAID;;AAED,SAASI,sBAAT,CAAgCC,OAAhC,EAA4D;AAC1D,MAAMC,IAAI,GAAGC,uBAAuB,CAACF,OAAD,CAApC;AACA,SAAOG,qBAAqB,CAACF,IAAD,CAA5B;AACD;;AAED,SAASG,0BAAT,CAAoCC,WAApC,EAAyDC,SAAzD,EAAmF;AACjF,MAAMC,kBAAkB,GAAGC,sBAAsB,EAAjD;AACA,MAAMC,kBAAkB,GAAGN,qBAAqB,CAACI,kBAAD,CAAhD;AACA,MAAMG,YAAY,GAAG;AACnBC,IAAAA,GAAG,EAAEN,WAAW,CAACM,GADE;AAEnBC,IAAAA,IAAI,EAAEP,WAAW,CAACO,IAFC;AAGnBC,IAAAA,MAAM,EAAEP,SAAS,CAACO,MAHC;AAInBC,IAAAA,KAAK,EAAER,SAAS,CAACQ,KAJE,EAArB;;;AAOA,SAAOC,iBAAiB,CAACN,kBAAD,EAAqBC,YAArB,CAAxB;AACD;;AAED;AACA,SAASM,qBAAT,CAA+BC,YAA/B,EAAiEZ,WAAjE,EAAsF;AACpF,MAAMX,QAAQ,GAAGD,iBAAiB,CAACwB,YAAD,CAAlC;;AAEA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AAA,SAAS,CAACxB,IAAV,GAAiBwB,SAAS,CAACtB,KAA3B,GAAmCqB,SAAS,CAACvB,IAAV,GAAiBuB,SAAS,CAACrB,KAJhE;;AAMD;;AAED,SAASO,gBAAT,CAA0BgB,WAA1B,EAA2E;AACzE,MAAMC,KAAK,GAAG,CAACC,QAAQ,CAACC,eAAV,EAA2BD,QAAQ,CAACE,IAApC,CAAd;AACA,SAAOH,KAAK,CAACI,GAAN,CAAU,UAAC/C,CAAD,UAAOA,CAAC,IAAI0C,WAAW,CAAC1C,CAAD,CAAvB,EAAV,EAAsCgD,IAAtC,CAA2CC,OAA3C,KAAuD,CAA9D;AACD;;AAEM,IAAMC,WAAW,GAAG;AACzBpD,EAAAA,iBAAiB,EAAjBA,iBADyB;AAEzBM,EAAAA,sBAAsB,EAAtBA,sBAFyB;AAGzB+C,EAAAA,cAAc,EAAE1C,0BAHS;AAIzBY,EAAAA,qBAAqB,EAArBA,qBAJyB,EAApB,C","sourcesContent":["import { getDOMRect } from '../../lib/dom/getDOMRect';\n\nimport { PopupPositionsType } from './Popup';\n\nexport interface Rect {\n top: number;\n left: number;\n width: number;\n height: number;\n}\n\nexport interface Offset {\n top: number;\n left: number;\n}\n\nexport interface PositionObject {\n direction: string;\n align: string;\n}\n\nfunction getPositionObject(position: string): PositionObject {\n const x = position.split(' ');\n\n return {\n direction: x[0],\n align: x[1],\n };\n}\n\nfunction getElementAbsoluteRect(element: HTMLElement): Rect {\n const rect = _getElementRelativeRect(element);\n return convertRectToAbsolute(rect);\n}\n\nfunction isAbsoluteRectFullyVisible(coordinates: Offset, popupRect: Rect): boolean {\n const windowRelativeRect = _getWindowRelativeRect();\n const windowAbsoluteRect = convertRectToAbsolute(windowRelativeRect);\n const absoluteRect = {\n top: coordinates.top,\n left: coordinates.left,\n height: popupRect.height,\n width: popupRect.width,\n };\n\n return _rectContainsRect(windowAbsoluteRect, absoluteRect);\n}\n\n// Can become fully visible by scrolling into viewport\nfunction canBecomeFullyVisible(positionName: PopupPositionsType, coordinates: Offset) {\n const position = getPositionObject(positionName);\n\n if (position.direction === 'top') {\n const availableScrollDistances = convertRectToAbsolute(_getWindowRelativeRect());\n return coordinates.top + availableScrollDistances.top >= 0;\n }\n\n if (position.direction === 'left') {\n const availableScrollDistances = convertRectToAbsolute(_getWindowRelativeRect());\n return coordinates.left + availableScrollDistances.left >= 0;\n }\n\n // NOTE: for bottom/right cases browser will always expand document size\n return true;\n}\n\nfunction _getElementRelativeRect(element: HTMLElement) {\n const rect = getDOMRect(element);\n\n return {\n top: rect.top,\n left: rect.left,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top,\n };\n}\n\nfunction _getWindowRelativeRect(): Rect {\n return {\n top: 0,\n left: 0,\n width: _getViewProperty((x) => x.clientWidth) || window.innerWidth,\n height: _getViewProperty((x) => x.clientHeight) || window.innerHeight,\n };\n}\n\nfunction convertRectToAbsolute(rect: Rect): Rect {\n const offset = _getAbsoluteOffset();\n\n return {\n top: rect.top + offset.top,\n left: rect.left + offset.left,\n width: rect.width,\n height: rect.height,\n };\n}\n\nfunction _getAbsoluteOffset(): Offset {\n const scrollTop = window.pageYOffset || _getViewProperty((x) => x.scrollTop);\n const scrollLeft = window.pageXOffset || _getViewProperty((x) => x.scrollLeft);\n\n const clientTop = _getViewProperty((x) => x.clientTop);\n const clientLeft = _getViewProperty((x) => x.clientLeft);\n\n const top = scrollTop - clientTop;\n const left = scrollLeft - clientLeft;\n\n return {\n top,\n left,\n };\n}\n\nfunction _rectContainsRect(outerRect: Rect, innerRect: Rect): boolean {\n return (\n innerRect.top > outerRect.top &&\n innerRect.top + innerRect.height < outerRect.top + outerRect.height &&\n innerRect.left > outerRect.left &&\n innerRect.left + innerRect.width < outerRect.left + outerRect.width\n );\n}\n\nfunction _getViewProperty(getProperty: (e: HTMLElement) => number): number {\n const views = [document.documentElement, document.body];\n return views.map((x) => x && getProperty(x)).find(Boolean) || 0;\n}\n\nexport const PopupHelper = {\n getPositionObject,\n getElementAbsoluteRect,\n isFullyVisible: isAbsoluteRectFullyVisible,\n canBecomeFullyVisible,\n};\n"]}
1
+ {"version":3,"sources":["PopupHelper.tsx"],"names":["getPositionObject","position","x","split","direction","align","getElementAbsoluteRect","element","rect","_getElementRelativeRect","convertRectToAbsolute","isAbsoluteRectFullyVisible","coordinates","popupRect","windowRelativeRect","_getWindowRelativeRect","windowAbsoluteRect","absoluteRect","top","left","height","width","_rectContainsRect","canBecomeFullyVisible","positionName","availableScrollDistances","right","bottom","_getViewProperty","clientWidth","window","innerWidth","clientHeight","innerHeight","offset","_getAbsoluteOffset","scrollTop","pageYOffset","scrollLeft","pageXOffset","clientTop","clientLeft","outerRect","innerRect","getProperty","views","document","documentElement","body","map","find","Boolean","PopupHelper","isFullyVisible"],"mappings":"oEAAA;;;;;;;;;;;;;;;;;;;;;AAqBA,SAASA,iBAAT,CAA2BC,QAA3B,EAA6D;AAC3D,MAAMC,CAAC,GAAGD,QAAQ,CAACE,KAAT,CAAe,GAAf,CAAV;;AAEA,SAAO;AACLC,IAAAA,SAAS,EAAEF,CAAC,CAAC,CAAD,CADP;AAELG,IAAAA,KAAK,EAAEH,CAAC,CAAC,CAAD,CAFH,EAAP;;AAID;;AAED,SAASI,sBAAT,CAAgCC,OAAhC,EAAwD;AACtD,MAAMC,IAAI,GAAGC,uBAAuB,CAACF,OAAD,CAApC;AACA,SAAOG,qBAAqB,CAACF,IAAD,CAA5B;AACD;;AAED,SAASG,0BAAT,CAAoCC,WAApC,EAAyDC,SAAzD,EAAmF;AACjF,MAAMC,kBAAkB,GAAGC,sBAAsB,EAAjD;AACA,MAAMC,kBAAkB,GAAGN,qBAAqB,CAACI,kBAAD,CAAhD;AACA,MAAMG,YAAY,GAAG;AACnBC,IAAAA,GAAG,EAAEN,WAAW,CAACM,GADE;AAEnBC,IAAAA,IAAI,EAAEP,WAAW,CAACO,IAFC;AAGnBC,IAAAA,MAAM,EAAEP,SAAS,CAACO,MAHC;AAInBC,IAAAA,KAAK,EAAER,SAAS,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ACxB,GAA1B;AACAyB,IAAAA,SAAS,CAACzB,GAAV,GAAgByB,SAAS,CAACvB,MAA1B,GAAmCsB,SAAS,CAACxB,GAAV,GAAgBwB,SAAS,CAACtB,MAD7D;AAEAuB,IAAAA,SAAS,CAACxB,IAAV,GAAiBuB,SAAS,CAACvB,IAF3B;AAGAwB,IAAAA,SAAS,CAACxB,IAAV,GAAiBwB,SAAS,CAACtB,KAA3B,GAAmCqB,SAAS,CAACvB,IAAV,GAAiBuB,SAAS,CAACrB,KAJhE;;AAMD;;AAED,SAASO,gBAAT,CAA0BgB,WAA1B,EAAuE;AACrE,MAAMC,KAAK,GAAG,CAACC,QAAQ,CAACC,eAAV,EAA2BD,QAAQ,CAACE,IAApC,CAAd;AACA,SAAOH,KAAK,CAACI,GAAN,CAAU,UAAC/C,CAAD,UAAOA,CAAC,IAAI0C,WAAW,CAAC1C,CAAD,CAAvB,EAAV,EAAsCgD,IAAtC,CAA2CC,OAA3C,KAAuD,CAA9D;AACD;;AAEM,IAAMC,WAAW,GAAG;AACzBpD,EAAAA,iBAAiB,EAAjBA,iBADyB;AAEzBM,EAAAA,sBAAsB,EAAtBA,sBAFyB;AAGzB+C,EAAAA,cAAc,EAAE1C,0BAHS;AAIzBY,EAAAA,qBAAqB,EAArBA,qBAJyB,EAApB,C","sourcesContent":["import { getDOMRect } from '../../lib/dom/getDOMRect';\n\nimport { PopupPositionsType } from './Popup';\n\nexport interface Rect {\n top: number;\n left: number;\n width: number;\n height: number;\n}\n\nexport interface Offset {\n top: number;\n left: number;\n}\n\nexport interface PositionObject {\n direction: string;\n align: string;\n}\n\nfunction getPositionObject(position: string): PositionObject {\n const x = position.split(' ');\n\n return {\n direction: x[0],\n align: x[1],\n };\n}\n\nfunction getElementAbsoluteRect(element: Element): Rect {\n const rect = _getElementRelativeRect(element);\n return convertRectToAbsolute(rect);\n}\n\nfunction isAbsoluteRectFullyVisible(coordinates: Offset, popupRect: Rect): boolean {\n const windowRelativeRect = _getWindowRelativeRect();\n const windowAbsoluteRect = convertRectToAbsolute(windowRelativeRect);\n const absoluteRect = {\n top: coordinates.top,\n left: coordinates.left,\n height: popupRect.height,\n width: popupRect.width,\n };\n\n return _rectContainsRect(windowAbsoluteRect, absoluteRect);\n}\n\n// Can become fully visible by scrolling into viewport\nfunction canBecomeFullyVisible(positionName: PopupPositionsType, coordinates: Offset) {\n const position = getPositionObject(positionName);\n\n if (position.direction === 'top') {\n const availableScrollDistances = convertRectToAbsolute(_getWindowRelativeRect());\n return coordinates.top + availableScrollDistances.top >= 0;\n }\n\n if (position.direction === 'left') {\n const availableScrollDistances = convertRectToAbsolute(_getWindowRelativeRect());\n return coordinates.left + availableScrollDistances.left >= 0;\n }\n\n // NOTE: for bottom/right cases browser will always expand document size\n return true;\n}\n\nfunction _getElementRelativeRect(element: Element) {\n const rect = getDOMRect(element);\n\n return {\n top: rect.top,\n left: rect.left,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top,\n };\n}\n\nfunction _getWindowRelativeRect(): Rect {\n return {\n top: 0,\n left: 0,\n width: _getViewProperty((x) => x.clientWidth) || window.innerWidth,\n height: _getViewProperty((x) => x.clientHeight) || window.innerHeight,\n };\n}\n\nfunction convertRectToAbsolute(rect: Rect): Rect {\n const offset = _getAbsoluteOffset();\n\n return {\n top: rect.top + offset.top,\n left: rect.left + offset.left,\n width: rect.width,\n height: rect.height,\n };\n}\n\nfunction _getAbsoluteOffset(): Offset {\n const scrollTop = window.pageYOffset || _getViewProperty((x) => x.scrollTop);\n const scrollLeft = window.pageXOffset || _getViewProperty((x) => x.scrollLeft);\n\n const clientTop = _getViewProperty((x) => x.clientTop);\n const clientLeft = _getViewProperty((x) => x.clientLeft);\n\n const top = scrollTop - clientTop;\n const left = scrollLeft - clientLeft;\n\n return {\n top,\n left,\n };\n}\n\nfunction _rectContainsRect(outerRect: Rect, innerRect: Rect): boolean {\n return (\n innerRect.top > outerRect.top &&\n innerRect.top + innerRect.height < outerRect.top + outerRect.height &&\n innerRect.left > outerRect.left &&\n innerRect.left + innerRect.width < outerRect.left + outerRect.width\n );\n}\n\nfunction _getViewProperty(getProperty: (e: Element) => number): number {\n const views = [document.documentElement, document.body];\n return views.map((x) => x && getProperty(x)).find(Boolean) || 0;\n}\n\nexport const PopupHelper = {\n getPositionObject,\n getElementAbsoluteRect,\n isFullyVisible: isAbsoluteRectFullyVisible,\n canBecomeFullyVisible,\n};\n"]}
@@ -6,7 +6,7 @@ interface Props {
6
6
  borderColor: string;
7
7
  borderWidth: number;
8
8
  offset: number;
9
- popupElement: Nullable<HTMLElement>;
9
+ popupElement: Nullable<Element>;
10
10
  popupPosition: string;
11
11
  size: number;
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["PopupPin.tsx"],"names":["borderStyles","position","borderStyle","borderTopColor","borderBottomColor","borderLeftColor","borderRightColor","PopupPin","render","props","popupElement","options","getPinOptions","PopupHelper","getElementAbsoluteRect","getPositionObject","popupPosition","size","offset","borderWidth","styleOuter","getOuterStyle","activeBorder","outerSize","borderColor","styleInner","getInnerStyle","backgroundColor","styleWrapper","getWrapperStyle","outerLeft","outerTop","PopupDataTids","popupPin","styles","wrapper","getPopupOppositeDirection","popupDirection","direction","TypeError","left","top","width","height","borderWitdth","popupRect","pinSize","pinOffset","bordersDelta","getPinLeftCoordinate","align","innerTop","innerLeft","getPinTopCoordinate","Error","pinHeight","React","Component","__KONTUR_REACT_UI__","propTypes","PropTypes","string","number","any"],"mappings":"sUAAA;AACA;;;;AAIA;AACA;AACA;;AAEA,IAAMA,YAAY,GAAG;AACnBC,EAAAA,QAAQ,EAAE,UADS;AAEnBC,EAAAA,WAAW,EAAE,OAFM;AAGnBC,EAAAA,cAAc,EAAE,aAHG;AAInBC,EAAAA,iBAAiB,EAAE,aAJA;AAKnBC,EAAAA,eAAe,EAAE,aALE;AAMnBC,EAAAA,gBAAgB,EAAE,aANC,EAArB,C;;;;;;;;;;;;;AAmBaC,Q;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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OV,SAAS,CAACH,KAAV,GAAkBK,SAAlB,GAA8B,IAAIQ,SAAzC;AACF;AACE,cAAM,IAAID,KAAJ,wBAA+BJ,KAA/B,OAAN,CARJ;;AAUD,G,mBAtP2BM,eAAMC,S,8BAAvBlD,Q,CACGmD,mB,GAAsB,U,CADzBnD,Q,CAGGoD,S,GAAY,EACxB;AACJ;AACA,KACIhC,eAAe,EAAEiC,mBAAUC,MAJH,EAMxB;AACJ;AACA,KACIrC,WAAW,EAAEoC,mBAAUC,MATC,EAWxB;AACJ;AACA,KACI1C,WAAW,EAAEyC,mBAAUE,MAdC,EAgBxB;AACJ;AACA,KACI5C,MAAM,EAAE0C,mBAAUE,MAnBM,EAqBxB;AACJ;AACA,KACIpD,YAAY,EAAEkD,mBAAUG,GAxBA,EA0BxB;AACJ;AACA,KACI/C,aAAa,EAAE4C,mBAAUC,MA7BD,EA+BxB;AACJ;AACA;AACA;AACA,KACI5C,IAAI,EAAE2C,mBAAUE,MApCQ,E","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport { Nullable } from '../../typings/utility-types';\n\nimport { PopupHelper, PositionObject, Rect } from './PopupHelper';\nimport { styles } from './PopupPin.styles';\nimport { PopupDataTids } from './Popup';\n\nconst borderStyles = {\n position: 'absolute',\n borderStyle: 'solid',\n borderTopColor: 'transparent',\n borderBottomColor: 'transparent',\n borderLeftColor: 'transparent',\n borderRightColor: 'transparent',\n};\n\ninterface Props {\n backgroundColor: string;\n borderColor: string;\n borderWidth: number;\n offset: number;\n popupElement: Nullable<HTMLElement>;\n popupPosition: string;\n size: number;\n}\n\nexport class PopupPin extends React.Component<Props> {\n public static __KONTUR_REACT_UI__ = 'PopupPin';\n\n public static propTypes = {\n /**\n * Цвет фон пина\n */\n backgroundColor: PropTypes.string,\n\n /**\n * Цвет границы пина\n */\n borderColor: PropTypes.string,\n\n /**\n * Ширина границы пина\n */\n borderWidth: PropTypes.number,\n\n /**\n * Смещение пина от края попапа. Край задаётся в пропе position вторым словом\n */\n offset: PropTypes.number,\n\n /**\n * Ссылка на попап\n */\n popupElement: PropTypes.any,\n\n /**\n * Позиция поапа, по которой будет вычеслено положение пина\n */\n popupPosition: PropTypes.string,\n\n /**\n * Сторона пина без учёта границы.\n * Пин представляет собой равносторонний треугольник, высота от попапа\n * до \"носика\" пина будет соответствовать формуле (size* √3)/2\n */\n size: PropTypes.number,\n };\n\n public render() {\n if (!this.props.popupElement) {\n return null;\n }\n\n const options = this.getPinOptions(\n PopupHelper.getElementAbsoluteRect(this.props.popupElement),\n PopupHelper.getPositionObject(this.props.popupPosition),\n this.props.size,\n this.props.offset,\n this.props.borderWidth,\n );\n\n const styleOuter: React.CSSProperties = this.getOuterStyle(\n options.activeBorder,\n options.outerSize,\n this.props.borderColor,\n );\n\n const styleInner: React.CSSProperties = this.getInnerStyle(\n options.activeBorder,\n this.props.size,\n this.props.backgroundColor,\n );\n\n const styleWrapper = this.getWrapperStyle(options.outerLeft, options.outerTop, options.outerSize);\n\n return (\n <div data-tid={PopupDataTids.popupPin} className={styles.wrapper()} style={styleWrapper}>\n <div style={styleOuter}>\n <div style={styleInner} />\n </div>\n </div>\n );\n }\n\n private getPopupOppositeDirection(): 'bottom' | 'top' | 'left' | 'right' {\n const popupDirection = PopupHelper.getPositionObject(this.props.popupPosition).direction;\n switch (popupDirection) {\n case 'top':\n return 'bottom';\n case 'bottom':\n return 'top';\n case 'left':\n return 'right';\n case 'right':\n return 'left';\n default:\n throw new TypeError('Unknown direction ' + popupDirection);\n }\n }\n\n private getWrapperStyle(left: number, top: number, borderWidth: number) {\n const direction = this.getPopupOppositeDirection();\n switch (direction) {\n case 'top':\n case 'bottom':\n return {\n [direction]: -borderWidth + 'px',\n left: left + 'px',\n width: borderWidth * 2 + 'px',\n height: borderWidth + 'px',\n };\n case 'left':\n case 'right':\n return {\n [direction]: -borderWidth + 'px',\n top: top + 'px',\n height: borderWidth * 2 + 'px',\n width: borderWidth + 'px',\n };\n default:\n throw new TypeError('Unknown direction ' + direction);\n }\n }\n\n private getOuterStyle(activeBorder: string, borderWitdth: number, borderColor: string): React.CSSProperties {\n const direction = this.getPopupOppositeDirection();\n switch (direction) {\n case 'top':\n case 'bottom':\n return {\n ...borderStyles,\n [direction]: -borderWitdth + 'px',\n left: '0px',\n borderWidth: borderWitdth + 'px',\n ['border' + activeBorder + 'Color']: borderColor,\n } as React.CSSProperties;\n case 'left':\n case 'right':\n return {\n ...borderStyles,\n [direction]: -borderWitdth + 'px',\n top: '0px',\n borderWidth: borderWitdth + 'px',\n ['border' + activeBorder + 'Color']: borderColor,\n } as React.CSSProperties;\n default:\n throw new TypeError('Unknown direction ' + direction);\n }\n }\n\n private getInnerStyle(activeBorder: string, borderWitdth: number, borderColor: string): React.CSSProperties {\n const direction = this.getPopupOppositeDirection();\n switch (direction) {\n case 'top':\n case 'bottom':\n return {\n ...borderStyles,\n [direction]: -borderWitdth + 2 + 'px',\n left: -borderWitdth + 'px',\n borderWidth: borderWitdth + 'px',\n ['border' + activeBorder + 'Color']: borderColor,\n } as React.CSSProperties;\n case 'left':\n case 'right':\n return {\n ...borderStyles,\n [direction]: -borderWitdth + 2 + 'px',\n top: -borderWitdth + 'px',\n borderWidth: borderWitdth + 'px',\n ['border' + activeBorder + 'Color']: borderColor,\n } as React.CSSProperties;\n default:\n throw new TypeError('Unknown direction ' + direction);\n }\n }\n\n private getPinOptions(\n popupRect: Rect,\n popupPosition: PositionObject,\n pinSize: number,\n pinOffset: number,\n borderWidth: number,\n ) {\n const bordersDelta = 2 * borderWidth;\n const outerSize = pinSize + bordersDelta;\n\n switch (popupPosition.direction) {\n case 'top':\n return {\n outerTop: popupRect.height,\n outerLeft: this.getPinLeftCoordinate(popupRect, popupPosition.align, pinSize, pinOffset) - bordersDelta,\n innerTop: -outerSize,\n innerLeft: -outerSize + bordersDelta,\n activeBorder: 'Top',\n outerSize,\n };\n case 'bottom':\n return {\n outerTop: -2 * outerSize,\n outerLeft: this.getPinLeftCoordinate(popupRect, popupPosition.align, pinSize, pinOffset) - bordersDelta,\n innerTop: -outerSize + 2 * bordersDelta,\n innerLeft: -outerSize + bordersDelta,\n activeBorder: 'Bottom',\n outerSize,\n };\n case 'left':\n return {\n outerTop: this.getPinTopCoordinate(popupRect, popupPosition.align, pinSize, pinOffset) - bordersDelta,\n outerLeft: popupRect.width,\n innerTop: -outerSize + bordersDelta,\n innerLeft: -outerSize,\n activeBorder: 'Left',\n outerSize,\n };\n case 'right':\n return {\n outerTop: this.getPinTopCoordinate(popupRect, popupPosition.align, pinSize, pinOffset) - bordersDelta,\n outerLeft: -2 * outerSize,\n innerTop: -outerSize + bordersDelta,\n innerLeft: -outerSize + 2 * bordersDelta,\n activeBorder: 'Right',\n outerSize,\n };\n default:\n throw new Error('Direction must be one of top, right, bottom, left');\n }\n }\n\n private getPinTopCoordinate(popupRect: Rect, align: string, pinHeight: number, pinOffset: number) {\n switch (align) {\n case 'top':\n return pinOffset;\n case 'middle':\n return popupRect.height / 2 - pinHeight;\n case 'bottom':\n return popupRect.height - pinOffset - 2 * pinHeight;\n default:\n throw new Error(`Unexpected align '${align}'`);\n }\n }\n\n private getPinLeftCoordinate(popupRect: Rect, align: string, pinHeight: number, pinOffset: number) {\n switch (align) {\n case 'left':\n return pinOffset;\n case 'center':\n return popupRect.width / 2 - pinHeight;\n case 'right':\n return popupRect.width - pinOffset - 2 * pinHeight;\n default:\n throw new Error(`Unexpected align '${align}'`);\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["PopupPin.tsx"],"names":["borderStyles","position","borderStyle","borderTopColor","borderBottomColor","borderLeftColor","borderRightColor","PopupPin","render","props","popupElement","options","getPinOptions","PopupHelper","getElementAbsoluteRect","getPositionObject","popupPosition","size","offset","borderWidth","styleOuter","getOuterStyle","activeBorder","outerSize","borderColor","styleInner","getInnerStyle","backgroundColor","styleWrapper","getWrapperStyle","outerLeft","outerTop","PopupDataTids","popupPin","styles","wrapper","getPopupOppositeDirection","popupDirection","direction","TypeError","left","top","width","height","borderWitdth","popupRect","pinSize","pinOffset","bordersDelta","getPinLeftCoordinate","align","innerTop","innerLeft","getPinTopCoordinate","Error","pinHeight","React","Component","__KONTUR_REACT_UI__","propTypes","PropTypes","string","number","any"],"mappings":"sUAAA;AACA;;;;AAIA;AACA;AACA;;AAEA,IAAMA,YAAY,GAAG;AACnBC,EAAAA,QAAQ,EAAE,UADS;AAEnBC,EAAAA,WAAW,EAAE,OAFM;AAGnBC,EAAAA,cAAc,EAAE,aAHG;AAInBC,EAAAA,iBAAiB,EAAE,aAJA;AAKnBC,EAAAA,eAAe,EAAE,aALE;AAMnBC,EAAAA,gBAAgB,EAAE,aANC,EAArB,C;;;;;;;;;;;;;AAmBaC,Q;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CJC,EAAAA,M,GAAP,kBAAgB;AACd,QAAI,CAAC,KAAKC,KAAL,CAAWC,YAAhB,EAA8B;AAC5B,aAAO,IAAP;AACD;;AAED,QAAMC,OAAO,GAAG,KAAKC,aAAL;AACdC,6BAAYC,sBAAZ,CAAmC,KAAKL,KAAL,CAAWC,YAA9C,CADc;AAEdG,6BAAYE,iBAAZ,CAA8B,KAAKN,KAAL,CAAWO,aAAzC,CAFc;AAGd,SAAKP,KAAL,CAAWQ,IAHG;AAId,SAAKR,KAAL,CAAWS,MAJG;AAKd,SAAKT,KAAL,CAAWU,WALG,CAAhB;;;AAQA,QAAMC,UAA+B,GAAG,KAAKC,aAAL;AACtCV,IAAAA,OAAO,CAACW,YAD8B;AAEtCX,IAAAA,OAAO,CAACY,SAF8B;AAGtC,SAAKd,KAAL,CAAWe,WAH2B,CAAxC;;;AAMA,QAAMC,UAA+B,GAAG,KAAKC,aAAL;AACtCf,IAAAA,OAAO,CAACW,YAD8B;AAEtC,SAAKb,KAAL,CAAWQ,IAF2B;AAGtC,SAAKR,KAAL,CAAWkB,eAH2B,CAAxC;;;AAMA,QAAMC,YAAY,GAAG,KAAKC,eAAL,CAAqBlB,OAAO,CAACmB,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AL;AACE,eAAOF,SAAS,CAACF,MAAV,GAAmB,CAAnB,GAAuBY,SAA9B;AACF,WAAK,QAAL;AACE,eAAOV,SAAS,CAACF,MAAV,GAAmBI,SAAnB,GAA+B,IAAIQ,SAA1C;AACF;AACE,cAAM,IAAID,KAAJ,wBAA+BJ,KAA/B,OAAN,CARJ;;AAUD,G;;AAEOD,EAAAA,oB,GAAR,8BAA6BJ,SAA7B,EAA8CK,KAA9C,EAA6DK,SAA7D,EAAgFR,SAAhF,EAAmG;AACjG,YAAQG,KAAR;AACE,WAAK,MAAL;AACE,eAAOH,SAAP;AACF,WAAK,QAAL;AACE,eAAOF,SAAS,CAACH,KAAV,GAAkB,CAAlB,GAAsBa,SAA7B;AACF,WAAK,OAAL;AACE,eAAOV,SAAS,CAACH,KAAV,GAAkBK,SAAlB,GAA8B,IAAIQ,SAAzC;AACF;AACE,cAAM,IAAID,KAAJ,wBAA+BJ,KAA/B,OAAN,CARJ;;AAUD,G,mBAtP2BM,eAAMC,S,8BAAvBlD,Q,CACGmD,mB,GAAsB,U,CADzBnD,Q,CAGGoD,S,GAAY,EACxB;AACJ;AACA,KACIhC,eAAe,EAAEiC,mBAAUC,MAJH,EAMxB;AACJ;AACA,KACIrC,WAAW,EAAEoC,mBAAUC,MATC,EAWxB;AACJ;AACA,KACI1C,WAAW,EAAEyC,mBAAUE,MAdC,EAgBxB;AACJ;AACA,KACI5C,MAAM,EAAE0C,mBAAUE,MAnBM,EAqBxB;AACJ;AACA,KACIpD,YAAY,EAAEkD,mBAAUG,GAxBA,EA0BxB;AACJ;AACA,KACI/C,aAAa,EAAE4C,mBAAUC,MA7BD,EA+BxB;AACJ;AACA;AACA;AACA,KACI5C,IAAI,EAAE2C,mBAAUE,MApCQ,E","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport { Nullable } from '../../typings/utility-types';\n\nimport { PopupHelper, PositionObject, Rect } from './PopupHelper';\nimport { styles } from './PopupPin.styles';\nimport { PopupDataTids } from './Popup';\n\nconst borderStyles = {\n position: 'absolute',\n borderStyle: 'solid',\n borderTopColor: 'transparent',\n borderBottomColor: 'transparent',\n borderLeftColor: 'transparent',\n borderRightColor: 'transparent',\n};\n\ninterface Props {\n backgroundColor: string;\n borderColor: string;\n borderWidth: number;\n offset: number;\n popupElement: Nullable<Element>;\n popupPosition: string;\n size: number;\n}\n\nexport class PopupPin extends React.Component<Props> {\n public static __KONTUR_REACT_UI__ = 'PopupPin';\n\n public static propTypes = {\n /**\n * Цвет фон пина\n */\n backgroundColor: PropTypes.string,\n\n /**\n * Цвет границы пина\n */\n borderColor: PropTypes.string,\n\n /**\n * Ширина границы пина\n */\n borderWidth: PropTypes.number,\n\n /**\n * Смещение пина от края попапа. Край задаётся в пропе position вторым словом\n */\n offset: PropTypes.number,\n\n /**\n * Ссылка на попап\n */\n popupElement: PropTypes.any,\n\n /**\n * Позиция поапа, по которой будет вычеслено положение пина\n */\n popupPosition: PropTypes.string,\n\n /**\n * Сторона пина без учёта границы.\n * Пин представляет собой равносторонний треугольник, высота от попапа\n * до \"носика\" пина будет соответствовать формуле (size* √3)/2\n */\n size: PropTypes.number,\n };\n\n public render() {\n if (!this.props.popupElement) {\n return null;\n }\n\n const options = this.getPinOptions(\n PopupHelper.getElementAbsoluteRect(this.props.popupElement),\n PopupHelper.getPositionObject(this.props.popupPosition),\n this.props.size,\n this.props.offset,\n this.props.borderWidth,\n );\n\n const styleOuter: React.CSSProperties = this.getOuterStyle(\n options.activeBorder,\n options.outerSize,\n this.props.borderColor,\n );\n\n const styleInner: React.CSSProperties = this.getInnerStyle(\n options.activeBorder,\n this.props.size,\n this.props.backgroundColor,\n );\n\n const styleWrapper = this.getWrapperStyle(options.outerLeft, options.outerTop, options.outerSize);\n\n return (\n <div data-tid={PopupDataTids.popupPin} className={styles.wrapper()} style={styleWrapper}>\n <div style={styleOuter}>\n <div style={styleInner} />\n </div>\n </div>\n );\n }\n\n private getPopupOppositeDirection(): 'bottom' | 'top' | 'left' | 'right' {\n const popupDirection = PopupHelper.getPositionObject(this.props.popupPosition).direction;\n switch (popupDirection) {\n case 'top':\n return 'bottom';\n case 'bottom':\n return 'top';\n case 'left':\n return 'right';\n case 'right':\n return 'left';\n default:\n throw new TypeError('Unknown direction ' + popupDirection);\n }\n }\n\n private getWrapperStyle(left: number, top: number, borderWidth: number) {\n const direction = this.getPopupOppositeDirection();\n switch (direction) {\n case 'top':\n case 'bottom':\n return {\n [direction]: -borderWidth + 'px',\n left: left + 'px',\n width: borderWidth * 2 + 'px',\n height: borderWidth + 'px',\n };\n case 'left':\n case 'right':\n return {\n [direction]: -borderWidth + 'px',\n top: top + 'px',\n height: borderWidth * 2 + 'px',\n width: borderWidth + 'px',\n };\n default:\n throw new TypeError('Unknown direction ' + direction);\n }\n }\n\n private getOuterStyle(activeBorder: string, borderWitdth: number, borderColor: string): React.CSSProperties {\n const direction = this.getPopupOppositeDirection();\n switch (direction) {\n case 'top':\n case 'bottom':\n return {\n ...borderStyles,\n [direction]: -borderWitdth + 'px',\n left: '0px',\n borderWidth: borderWitdth + 'px',\n ['border' + activeBorder + 'Color']: borderColor,\n } as React.CSSProperties;\n case 'left':\n case 'right':\n return {\n ...borderStyles,\n [direction]: -borderWitdth + 'px',\n top: '0px',\n borderWidth: borderWitdth + 'px',\n ['border' + activeBorder + 'Color']: borderColor,\n } as React.CSSProperties;\n default:\n throw new TypeError('Unknown direction ' + direction);\n }\n }\n\n private getInnerStyle(activeBorder: string, borderWitdth: number, borderColor: string): React.CSSProperties {\n const direction = this.getPopupOppositeDirection();\n switch (direction) {\n case 'top':\n case 'bottom':\n return {\n ...borderStyles,\n [direction]: -borderWitdth + 2 + 'px',\n left: -borderWitdth + 'px',\n borderWidth: borderWitdth + 'px',\n ['border' + activeBorder + 'Color']: borderColor,\n } as React.CSSProperties;\n case 'left':\n case 'right':\n return {\n ...borderStyles,\n [direction]: -borderWitdth + 2 + 'px',\n top: -borderWitdth + 'px',\n borderWidth: borderWitdth + 'px',\n ['border' + activeBorder + 'Color']: borderColor,\n } as React.CSSProperties;\n default:\n throw new TypeError('Unknown direction ' + direction);\n }\n }\n\n private getPinOptions(\n popupRect: Rect,\n popupPosition: PositionObject,\n pinSize: number,\n pinOffset: number,\n borderWidth: number,\n ) {\n const bordersDelta = 2 * borderWidth;\n const outerSize = pinSize + bordersDelta;\n\n switch (popupPosition.direction) {\n case 'top':\n return {\n outerTop: popupRect.height,\n outerLeft: this.getPinLeftCoordinate(popupRect, popupPosition.align, pinSize, pinOffset) - bordersDelta,\n innerTop: -outerSize,\n innerLeft: -outerSize + bordersDelta,\n activeBorder: 'Top',\n outerSize,\n };\n case 'bottom':\n return {\n outerTop: -2 * outerSize,\n outerLeft: this.getPinLeftCoordinate(popupRect, popupPosition.align, pinSize, pinOffset) - bordersDelta,\n innerTop: -outerSize + 2 * bordersDelta,\n innerLeft: -outerSize + bordersDelta,\n activeBorder: 'Bottom',\n outerSize,\n };\n case 'left':\n return {\n outerTop: this.getPinTopCoordinate(popupRect, popupPosition.align, pinSize, pinOffset) - bordersDelta,\n outerLeft: popupRect.width,\n innerTop: -outerSize + bordersDelta,\n innerLeft: -outerSize,\n activeBorder: 'Left',\n outerSize,\n };\n case 'right':\n return {\n outerTop: this.getPinTopCoordinate(popupRect, popupPosition.align, pinSize, pinOffset) - bordersDelta,\n outerLeft: -2 * outerSize,\n innerTop: -outerSize + bordersDelta,\n innerLeft: -outerSize + 2 * bordersDelta,\n activeBorder: 'Right',\n outerSize,\n };\n default:\n throw new Error('Direction must be one of top, right, bottom, left');\n }\n }\n\n private getPinTopCoordinate(popupRect: Rect, align: string, pinHeight: number, pinOffset: number) {\n switch (align) {\n case 'top':\n return pinOffset;\n case 'middle':\n return popupRect.height / 2 - pinHeight;\n case 'bottom':\n return popupRect.height - pinOffset - 2 * pinHeight;\n default:\n throw new Error(`Unexpected align '${align}'`);\n }\n }\n\n private getPinLeftCoordinate(popupRect: Rect, align: string, pinHeight: number, pinOffset: number) {\n switch (align) {\n case 'left':\n return pinOffset;\n case 'center':\n return popupRect.width / 2 - pinHeight;\n case 'right':\n return popupRect.width - pinOffset - 2 * pinHeight;\n default:\n throw new Error(`Unexpected align '${align}'`);\n }\n }\n}\n"]}
@@ -6,7 +6,7 @@ export interface RenderLayerProps extends CommonProps {
6
6
  onClickOutside?: (e: Event) => void;
7
7
  onFocusOutside?: (e: Event) => void;
8
8
  active?: boolean;
9
- getAnchorElement?: () => Nullable<HTMLElement>;
9
+ getAnchorElement?: () => Nullable<Element>;
10
10
  }
11
11
  declare type DefaultProps = Required<Pick<RenderLayerProps, 'active'>>;
12
12
  export declare class RenderLayer extends React.Component<RenderLayerProps> {
@@ -1 +1 @@
1
- {"version":3,"sources":["RenderLayer.tsx"],"names":["RenderLayer","rootNode","getProps","defaultProps","focusOutsideListenerToken","handleFocusOutside","event","props","onFocusOutside","handleNativeDocClick","target","srcElement","node","getAnchorNode","Element","onClickOutside","componentDidMount","active","attachListeners","componentDidUpdate","prevProps","detachListeners","componentWillUnmount","render","setRootNode","React","Children","only","children","getAnchorElement","window","addEventListener","document","documentElement","remove","removeEventListener","Component","__KONTUR_REACT_UI__","propTypes","propName","componentName","Error"],"mappings":"yUAAA;;AAEA;AACA;AACA;;AAEA,gE;;;;;;;;;;;;;AAaaA,W,OADZC,kB;;;;;;;;;;;;;;;;;;AAmBSC,IAAAA,Q,GAAW,0CAAkBF,WAAW,CAACG,YAA9B,C;;AAEXC,IAAAA,yB;;AAEG,Q;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiEHC,IAAAA,kB,GAAqB,UAACC,KAAD,EAAkB;AAC7C,UAAI,MAAKC,KAAL,CAAWC,cAAf,EAA+B;AAC7B,cAAKD,KAAL,CAAWC,cAAX,CAA0BF,KAA1B;AACD;AACF,K;;AAEOG,IAAAA,oB,GAAuB,UAACH,KAAD,EAAkB;AAC/C,UAAMI,MAAM,GAAGJ,KAAK,CAACI,MAAN,IA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AW,CACT,OACD,CAED,KAAKR,yBAAL,GAAiC,gCAAmB,oBAAM,CAACQ,IAAD,CAAN,EAAnB,EAAiC,KAAKP,kBAAtC,CAAjC,CACAyB,MAAM,CAACC,gBAAP,CAAwB,MAAxB,EAAgC,KAAK1B,kBAArC,EACA2B,QAAQ,CAACD,gBAAT,CACE,kBAAkBC,QAAQ,CAACC,eAA3B,GAA6C,YAA7C,GAA4D,WAD9D,EAEE,KAAKxB,oBAFP,EAID,C,QAEOY,e,GAAR,2BAA0B,CACxB,IAAI,KAAKjB,yBAAT,EAAoC,CAClC,KAAKA,yBAAL,CAA+B8B,MAA/B,GACA,KAAK9B,yBAAL,GAAiC,IAAjC,CACD,CAED0B,MAAM,CAACK,mBAAP,CAA2B,MAA3B,EAAmC,KAAK9B,kBAAxC,EACA2B,QAAQ,CAACG,mBAAT,CACE,kBAAkBH,QAAQ,CAACC,eAA3B,GAA6C,YAA7C,GAA4D,WAD9D,EAEE,KAAKxB,oBAFP,EAID,C,sBArF8BgB,eAAMW,S,WACvBC,mB,GAAsB,a,UAEtBC,S,GAAY,EACxBrB,MADwB,kBACjBV,KADiB,EACQgC,QADR,EAC0CC,aAD1C,EACiE,CACvF,IAAQvB,MAAR,GAAmDV,KAAnD,CAAQU,MAAR,CAAgBF,cAAhB,GAAmDR,KAAnD,CAAgBQ,cAAhB,CAAgCP,cAAhC,GAAmDD,KAAnD,CAAgCC,cAAhC,CACA,IAAIS,MAAM,IAAI,EAAEF,cAAc,IAAIP,cAApB,CAAd,EAAmD,CACjD,OAAO,IAAIiC,KAAJ,OACDD,aADC,uGAAP,CAGD,CACF,CARuB,E,UAWZrC,Y,GAA6B,EACzCc,MAAM,EAAE,IADiC,E","sourcesContent":["import React from 'react';\n\nimport { listen as listenFocusOutside, containsTargetOrRenderContainer } from '../../lib/listenFocusOutside';\nimport { CommonProps, CommonWrapper } from '../CommonWrapper';\nimport { getRootNode, rootNode, TSetRootNode } from '../../lib/rootNode';\nimport { Nullable } from '../../typings/utility-types';\nimport { createPropsGetter } from '../../lib/createPropsGetter';\n\nexport interface RenderLayerProps extends CommonProps {\n children: JSX.Element;\n onClickOutside?: (e: Event) => void;\n onFocusOutside?: (e: Event) => void;\n active?: boolean;\n getAnchorElement?: () => Nullable<HTMLElement>;\n}\n\ntype DefaultProps = Required<Pick<RenderLayerProps, 'active'>>;\n\n@rootNode\nexport class RenderLayer extends React.Component<RenderLayerProps> {\n public static __KONTUR_REACT_UI__ = 'RenderLayer';\n\n public static propTypes = {\n active(props: RenderLayerProps, propName: keyof RenderLayerProps, componentName: string) {\n const { active, onClickOutside, onFocusOutside } = props;\n if (active && !(onClickOutside || onFocusOutside)) {\n return new Error(\n `[${componentName}]: using the component without either 'onClickOutside' or 'onFocusOutside' callback is pointless.`,\n );\n }\n },\n };\n\n public static defaultProps: DefaultProps = {\n active: true,\n };\n\n private getProps = createPropsGetter(RenderLayer.defaultProps);\n\n private focusOutsideListenerToken: {\n remove: () => void;\n } | null = null;\n private setRootNode!: TSetRootNode;\n\n public componentDidMount() {\n if (this.getProps().active) {\n this.attachListeners();\n }\n }\n\n public componentDidUpdate(prevProps: RenderLayerProps) {\n const active = this.getProps().active;\n if (!prevProps.active && active) {\n this.attachListeners();\n }\n if (prevProps.active && !active) {\n this.detachListeners();\n }\n }\n\n public componentWillUnmount() {\n if (this.getProps().active) {\n this.detachListeners();\n }\n }\n\n public render() {\n return (\n <CommonWrapper rootNodeRef={this.setRootNode} {...this.props}>\n {React.Children.only(this.props.children)}\n </CommonWrapper>\n );\n }\n\n private getAnchorNode(): Nullable<HTMLElement> {\n const { getAnchorElement } = this.props;\n return getAnchorElement ? getAnchorElement() : getRootNode(this);\n }\n\n private attachListeners() {\n const node = this.getAnchorNode();\n if (!node) {\n return;\n }\n\n this.focusOutsideListenerToken = listenFocusOutside(() => [node], this.handleFocusOutside);\n window.addEventListener('blur', this.handleFocusOutside);\n document.addEventListener(\n 'ontouchstart' in document.documentElement ? 'touchstart' : 'mousedown',\n this.handleNativeDocClick,\n );\n }\n\n private detachListeners() {\n if (this.focusOutsideListenerToken) {\n this.focusOutsideListenerToken.remove();\n this.focusOutsideListenerToken = null;\n }\n\n window.removeEventListener('blur', this.handleFocusOutside);\n document.removeEventListener(\n 'ontouchstart' in document.documentElement ? 'touchstart' : 'mousedown',\n this.handleNativeDocClick,\n );\n }\n\n private handleFocusOutside = (event: Event) => {\n if (this.props.onFocusOutside) {\n this.props.onFocusOutside(event);\n }\n };\n\n private handleNativeDocClick = (event: Event) => {\n const target = event.target || event.srcElement;\n const node = this.getAnchorNode();\n\n if (!node || (target instanceof Element && containsTargetOrRenderContainer(target)(node))) {\n return;\n }\n\n if (this.props.onClickOutside) {\n this.props.onClickOutside(event);\n }\n };\n}\n"]}
1
+ {"version":3,"sources":["RenderLayer.tsx"],"names":["RenderLayer","rootNode","getProps","defaultProps","focusOutsideListenerToken","handleFocusOutside","event","props","onFocusOutside","handleNativeDocClick","target","srcElement","node","getAnchorNode","Element","onClickOutside","componentDidMount","active","attachListeners","componentDidUpdate","prevProps","detachListeners","componentWillUnmount","render","setRootNode","React","Children","only","children","getAnchorElement","window","addEventListener","document","documentElement","remove","removeEventListener","Component","__KONTUR_REACT_UI__","propTypes","propName","componentName","Error"],"mappings":"yUAAA;;AAEA;AACA;AACA;;AAEA,gE;;;;;;;;;;;;;AAaaA,W,OADZC,kB;;;;;;;;;;;;;;;;;;AAmBSC,IAAAA,Q,GAAW,0CAAkBF,WAAW,CAACG,YAA9B,C;;AAEXC,IAAAA,yB;;AAEG,Q;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiEHC,IAAAA,kB,GAAqB,UAACC,KAAD,EAAkB;AAC7C,UAAI,MAAKC,KAAL,CAAWC,cAAf,EAA+B;AAC7B,cAAKD,KAAL,CAAWC,cAAX,CAA0BF,KAA1B;AACD;AACF,K;;AAEOG,IAAAA,oB,GAAuB,UAACH,KAAD,EAAkB;AAC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KAAKC,aAAL,EAAb,CACA,IAAI,CAACD,IAAL,EAAW,CACT,OACD,CAED,KAAKR,yBAAL,GAAiC,gCAAmB,oBAAM,CAACQ,IAAD,CAAN,EAAnB,EAAiC,KAAKP,kBAAtC,CAAjC,CACAyB,MAAM,CAACC,gBAAP,CAAwB,MAAxB,EAAgC,KAAK1B,kBAArC,EACA2B,QAAQ,CAACD,gBAAT,CACE,kBAAkBC,QAAQ,CAACC,eAA3B,GAA6C,YAA7C,GAA4D,WAD9D,EAEE,KAAKxB,oBAFP,EAID,C,QAEOY,e,GAAR,2BAA0B,CACxB,IAAI,KAAKjB,yBAAT,EAAoC,CAClC,KAAKA,yBAAL,CAA+B8B,MAA/B,GACA,KAAK9B,yBAAL,GAAiC,IAAjC,CACD,CAED0B,MAAM,CAACK,mBAAP,CAA2B,MAA3B,EAAmC,KAAK9B,kBAAxC,EACA2B,QAAQ,CAACG,mBAAT,CACE,kBAAkBH,QAAQ,CAACC,eAA3B,GAA6C,YAA7C,GAA4D,WAD9D,EAEE,KAAKxB,oBAFP,EAID,C,sBArF8BgB,eAAMW,S,WACvBC,mB,GAAsB,a,UAEtBC,S,GAAY,EACxBrB,MADwB,kBACjBV,KADiB,EACQgC,QADR,EAC0CC,aAD1C,EACiE,CACvF,IAAQvB,MAAR,GAAmDV,KAAnD,CAAQU,MAAR,CAAgBF,cAAhB,GAAmDR,KAAnD,CAAgBQ,cAAhB,CAAgCP,cAAhC,GAAmDD,KAAnD,CAAgCC,cAAhC,CACA,IAAIS,MAAM,IAAI,EAAEF,cAAc,IAAIP,cAApB,CAAd,EAAmD,CACjD,OAAO,IAAIiC,KAAJ,OACDD,aADC,uGAAP,CAGD,CACF,CARuB,E,UAWZrC,Y,GAA6B,EACzCc,MAAM,EAAE,IADiC,E","sourcesContent":["import React from 'react';\n\nimport { listen as listenFocusOutside, containsTargetOrRenderContainer } from '../../lib/listenFocusOutside';\nimport { CommonProps, CommonWrapper } from '../CommonWrapper';\nimport { getRootNode, rootNode, TSetRootNode } from '../../lib/rootNode';\nimport { Nullable } from '../../typings/utility-types';\nimport { createPropsGetter } from '../../lib/createPropsGetter';\n\nexport interface RenderLayerProps extends CommonProps {\n children: JSX.Element;\n onClickOutside?: (e: Event) => void;\n onFocusOutside?: (e: Event) => void;\n active?: boolean;\n getAnchorElement?: () => Nullable<Element>;\n}\n\ntype DefaultProps = Required<Pick<RenderLayerProps, 'active'>>;\n\n@rootNode\nexport class RenderLayer extends React.Component<RenderLayerProps> {\n public static __KONTUR_REACT_UI__ = 'RenderLayer';\n\n public static propTypes = {\n active(props: RenderLayerProps, propName: keyof RenderLayerProps, componentName: string) {\n const { active, onClickOutside, onFocusOutside } = props;\n if (active && !(onClickOutside || onFocusOutside)) {\n return new Error(\n `[${componentName}]: using the component without either 'onClickOutside' or 'onFocusOutside' callback is pointless.`,\n );\n }\n },\n };\n\n public static defaultProps: DefaultProps = {\n active: true,\n };\n\n private getProps = createPropsGetter(RenderLayer.defaultProps);\n\n private focusOutsideListenerToken: {\n remove: () => void;\n } | null = null;\n private setRootNode!: TSetRootNode;\n\n public componentDidMount() {\n if (this.getProps().active) {\n this.attachListeners();\n }\n }\n\n public componentDidUpdate(prevProps: RenderLayerProps) {\n const active = this.getProps().active;\n if (!prevProps.active && active) {\n this.attachListeners();\n }\n if (prevProps.active && !active) {\n this.detachListeners();\n }\n }\n\n public componentWillUnmount() {\n if (this.getProps().active) {\n this.detachListeners();\n }\n }\n\n public render() {\n return (\n <CommonWrapper rootNodeRef={this.setRootNode} {...this.props}>\n {React.Children.only(this.props.children)}\n </CommonWrapper>\n );\n }\n\n private getAnchorNode(): Nullable<Element> {\n const { getAnchorElement } = this.props;\n return getAnchorElement ? getAnchorElement() : getRootNode(this);\n }\n\n private attachListeners() {\n const node = this.getAnchorNode();\n if (!node) {\n return;\n }\n\n this.focusOutsideListenerToken = listenFocusOutside(() => [node], this.handleFocusOutside);\n window.addEventListener('blur', this.handleFocusOutside);\n document.addEventListener(\n 'ontouchstart' in document.documentElement ? 'touchstart' : 'mousedown',\n this.handleNativeDocClick,\n );\n }\n\n private detachListeners() {\n if (this.focusOutsideListenerToken) {\n this.focusOutsideListenerToken.remove();\n this.focusOutsideListenerToken = null;\n }\n\n window.removeEventListener('blur', this.handleFocusOutside);\n document.removeEventListener(\n 'ontouchstart' in document.documentElement ? 'touchstart' : 'mousedown',\n this.handleNativeDocClick,\n );\n }\n\n private handleFocusOutside = (event: Event) => {\n if (this.props.onFocusOutside) {\n this.props.onFocusOutside(event);\n }\n };\n\n private handleNativeDocClick = (event: Event) => {\n const target = event.target || event.srcElement;\n const node = this.getAnchorNode();\n\n if (!node || (target instanceof Element && containsTargetOrRenderContainer(target)(node))) {\n return;\n }\n\n if (this.props.onClickOutside) {\n this.props.onClickOutside(event);\n }\n };\n}\n"]}
@@ -1692,6 +1692,6 @@ DefaultTheme = /*#__PURE__*/function () {function DefaultTheme() {}(0, _createCl
1692
1692
  }
1693
1693
 
1694
1694
  //#endregion
1695
- }]);return DefaultTheme;}();exports.DefaultTheme = DefaultTheme;DefaultTheme.fontFamilyCompensationBaseline = '0';DefaultTheme.labGrotesqueBaselineCompensation = '1';DefaultTheme.brandXLight = '#cae5f5';DefaultTheme.brandLight = '#3094d0';DefaultTheme.brand = '#2291ff';DefaultTheme.brandDark = '#1363a0';DefaultTheme.brandXDark = '#084f85';DefaultTheme.white = '#fff';DefaultTheme.grayXxLight = '#f2f2f2';DefaultTheme.grayXLight = '#ebebeb';DefaultTheme.grayLight = '#a0a0a0';DefaultTheme.gray = '#858585';DefaultTheme.grayDark = '#333';DefaultTheme.black = '#000';DefaultTheme.blueXxLight = '#cdedff';DefaultTheme.blueLight = '#1f87ef';DefaultTheme.blue = '#1874cf';DefaultTheme.blueDark = '#1874cf';DefaultTheme.blueXDark = '#044785';DefaultTheme.greenXxLight = '#d7f8ae';DefaultTheme.green = '#538a1b';DefaultTheme.greenDark = '#477916';DefaultTheme.redXxLight = '#ffddd6';DefaultTheme.red = '#dd473b';DefaultTheme.redDark = '#cb3d35';DefaultTheme.yellowXxLight = '#ffeec2';DefaultTheme.yellow = '#fcb73e';DefaultTheme.yellowDark = '#ef8b17';DefaultTheme.bgDefault = '#fff';DefaultTheme.bgDisabled = '#f6f6f6';DefaultTheme.errorMain = '#dd473b';DefaultTheme.errorSecondary = '#ffd6d6';DefaultTheme.errorText = '#cb3d35';DefaultTheme.warningMain = '#fcb73e';DefaultTheme.warningSecondary = '#fff0bc';DefaultTheme.warningText = '#d97e00';DefaultTheme.borderColorFocusLight = '#cdedff';DefaultTheme.borderColorGrayDark = 'rgba(0, 0, 0, 0.28)';DefaultTheme.borderColorGrayLight = 'rgba(0, 0, 0, 0.16)';DefaultTheme.placeholderColor = '#adadad';DefaultTheme.outlineColorFocus = '#fff';DefaultTheme.placeholderColorLight = '#cdcdcd';DefaultTheme.blinkColor = 'rgba(0, 136, 255, 0.2)';DefaultTheme.controlBorderWidth = '1px';DefaultTheme.controlOutlineWidth = '2px';DefaultTheme.controlLineHeightSmall = '20px';DefaultTheme.controlLineHeightMedium = '22px';DefaultTheme.controlLineHeightLarge = '24px';DefaultTheme.controlPaddingYSmall = '5px';DefaultTheme.controlPaddingYMedium = '8px';DefaultTheme.controlPaddingYLarge = '11px';DefaultTheme.textColorDefault = '#222222';DefaultTheme.textColorInvert = '#fff';DefaultTheme.textColorDisabled = '#adadad';DefaultTheme.textColorDisabledContrast = '#858585';DefaultTheme.fontSizeSmall = '14px';DefaultTheme.fontSizeMedium = '16px';DefaultTheme.fontSizeLarge = '18px';DefaultTheme.fontSizeMobile = '18px';DefaultTheme.lineHeightMobile = '24px';DefaultTheme.specificityLevel = '0';DefaultTheme.fixedPanelShadow = '0 0 16px 1px rgba(0, 0, 0, 0.3)';DefaultTheme.controlHeightSmall = '32px';DefaultTheme.controlHeightMedium = '40px';DefaultTheme.controlHeightLarge = '48px';DefaultTheme.mobileMediaQuery = '(max-width: 576px) and (hover: none) and (pointer: coarse)';DefaultTheme.linkColor = '#1874cf';DefaultTheme.linkActiveColor = '#1260ae';DefaultTheme.linkHoverTextDecoration = 'underline';DefaultTheme.linkSuccessColor = '#477916';DefaultTheme.linkSuccessHoverColor = '#477916';DefaultTheme.linkSuccessActiveColor = '#325a0c';DefaultTheme.linkDangerColor = '#cb3d35';DefaultTheme.linkDangerHoverColor = '#cb3d35';DefaultTheme.linkDangerActiveColor = '#a92a27';DefaultTheme.linkIconMarginRight = '4px';DefaultTheme.linkButtonLineHeight = '34px';DefaultTheme.linkButtonPaddingX = '10px';DefaultTheme.tokenDisabledBg = 'rgba(0, 0, 0, 0.05)';DefaultTheme.tokenMarginY = '2px';DefaultTheme.tokenMarginX = '4px';DefaultTheme.tokenPaddingY = '1px';DefaultTheme.tokenPaddingX = '3px';DefaultTheme.tokenMarginBeforeIcon = '4px';DefaultTheme.tokenRemoveIconSize = '8px';DefaultTheme.tokenRemoveIconPaddingY = '4px';DefaultTheme.tokenRemoveIconPaddingX = '4px';DefaultTheme.tokenRemoveIconGap = '4px';DefaultTheme.tokenRemoveIconBoxSizing = 'content-box';DefaultTheme.tokenBorderRadius = '1px';DefaultTheme.tokenBorderWidth = '1px';DefaultTheme.tokenBorderColorDisabled = 'rgba(0, 0, 0, 0.15)';DefaultTheme.tokenOutlineWidth = '2px';DefaultTheme.tokenLegacyTextShift = '0px';DefaultTheme.tokenInputBorderRadius = '0px';DefaultTheme.tokenInputPaddingY = '2px';DefaultTheme.tokenInputPaddingX = '4px';DefaultTheme.tokenInputLineHeight = '22px';DefaultTheme.tokenInputInputPaddingLeft = '5px';DefaultTheme.loaderBg = 'rgba(255, 255, 255, 0.8)';DefaultTheme.loaderOpacity = '0.8';DefaultTheme.btnBackgroundClip = 'padding-box';DefaultTheme.btnArrowBgImageActive = 'none';DefaultTheme.btnArrowBgImageChecked = 'none';DefaultTheme.btnLinkBorderRadius = '2px';DefaultTheme.btnFocusShadowWidth = '2px';DefaultTheme.btnDisabledBorderColor = 'rgba(0, 0, 0, 0.05)';DefaultTheme.btnCheckedBg = '#7e7e7e';DefaultTheme.btnCheckedDisabledBg = '#a0a0a0';DefaultTheme.btnCheckedDisabledColor = 'rgba(255, 255, 255, 0.7)';DefaultTheme.btnCheckedTextColor = '#fff';DefaultTheme.btnCheckedShadow = 'none';DefaultTheme.btnCheckedDisabledShadow = 'none';DefaultTheme.btnBorderRadiusSmall = '1px';DefaultTheme.btnBorderRadiusMedium = '1px';DefaultTheme.btnBorderRadiusLarge = '1px';DefaultTheme.btnInsetWidth = '1px';DefaultTheme.btnPaddingXSmall = '15px';DefaultTheme.btnPaddingXMedium = '15px';DefaultTheme.btnPaddingXLarge = '19px';DefaultTheme.btnIconGapSmall = '4px';DefaultTheme.btnIconGapMedium = '4px';DefaultTheme.btnIconGapLarge = '4px';DefaultTheme.btnIconSizeSmall = '16px';DefaultTheme.btnIconSizeMedium = '18px';DefaultTheme.btnIconSizeLarge = '20px';DefaultTheme.btnDefaultBg = '#fff';DefaultTheme.btnDefaultBgStart = 'none';DefaultTheme.btnDefaultBgEnd = 'none';DefaultTheme.btnDefaultHoverBg = '#f2f2f2';DefaultTheme.btnDefaultHoverBgStart = 'none';DefaultTheme.btnDefaultHoverBgEnd = 'none';DefaultTheme.btnDefaultActiveBg = '#ebebeb';DefaultTheme.btnDefaultHoverBorderColor = 'rgba(0, 0, 0, 0.16)';DefaultTheme.btnDefaultHoverBorderBottomColor = '';DefaultTheme.btnDefaultActiveBorderColor = 'rgba(0, 0, 0, 0.16)';DefaultTheme.btnDefaultActiveBorderTopColor = '';DefaultTheme.btnDefaultBorderColor = 'rgba(0, 0, 0, 0.16)';DefaultTheme.btnDefaultBorderBottomColor = '';DefaultTheme.btnDefaultActiveShadow = 'none';DefaultTheme.btnSuccessBg = '#538a1b';DefaultTheme.btnSuccessHoverBg = '#477916';DefaultTheme.btnSuccessHoverBorderColor = '#477916';DefaultTheme.btnSuccessHoverBorderBottomColor = '';DefaultTheme.btnSuccessBorderColor = '#538a1b';DefaultTheme.btnSuccessBorderBottomColor = '';DefaultTheme.btnSuccessBgStart = 'none';DefaultTheme.btnSuccessBgEnd = 'none';DefaultTheme.btnSuccessTextColor = '#fff';DefaultTheme.btnSuccessHoverBgStart = 'none';DefaultTheme.btnSuccessHoverBgEnd = 'none';DefaultTheme.btnSuccessActiveBg = '#3a6710';DefaultTheme.btnSuccessActiveBorderColor = '#3a6710';DefaultTheme.btnSuccessActiveBorderTopColor = '';DefaultTheme.btnSuccessActiveShadow = 'none';DefaultTheme.btnPrimaryBg = '#1c7edf';DefaultTheme.btnPrimaryHoverBg = '#1874cf';DefaultTheme.btnPrimaryHoverBorderColor = '#1874cf';DefaultTheme.btnPrimaryHoverBorderBottomColor = '';DefaultTheme.btnPrimaryBorderColor = '#1c7edf';DefaultTheme.btnPrimaryBorderBottomColor = '';DefaultTheme.btnPrimaryBgStart = 'none';DefaultTheme.btnPrimaryBgEnd = 'none';DefaultTheme.btnPrimaryTextColor = '#fff';DefaultTheme.btnPrimaryHoverBgStart = 'none';DefaultTheme.btnPrimaryHoverBgEnd = 'none';DefaultTheme.btnPrimaryActiveBg = '#156abe';DefaultTheme.btnPrimaryActiveBorderColor = '#156abe';DefaultTheme.btnPrimaryActiveBorderTopColor = '';DefaultTheme.btnPrimaryActiveShadow = 'none';DefaultTheme.btnDangerBg = '#dd473b';DefaultTheme.btnDangerHoverBg = '#cb3d35';DefaultTheme.btnDangerHoverBorderColor = '#cb3d35';DefaultTheme.btnDangerHoverBorderBottomColor = '';DefaultTheme.btnDangerBorderColor = '#dd473b';DefaultTheme.btnDangerBorderBottomColor = '';DefaultTheme.btnDangerBgStart = 'none';DefaultTheme.btnDangerBgEnd = 'none';DefaultTheme.btnDangerTextColor = '#fff';DefaultTheme.btnDangerHoverBgStart = 'none';DefaultTheme.btnDangerHoverBgEnd = 'none';DefaultTheme.btnDangerActiveBg = '#ba342e';DefaultTheme.btnDangerActiveBorderColor = '#ba342e';DefaultTheme.btnDangerActiveBorderTopColor = '';DefaultTheme.btnDangerActiveShadow = 'none';DefaultTheme.btnPayBg = '#fcb73e';DefaultTheme.btnPayHoverBg = '#fda70c';DefaultTheme.btnPayHoverBorderColor = '#fda70c';DefaultTheme.btnPayHoverBorderBottomColor = '';DefaultTheme.btnPayBorderColor = '#fcb73e';DefaultTheme.btnPayBorderBottomColor = '';DefaultTheme.btnPayBgStart = 'none';DefaultTheme.btnPayBgEnd = 'none';DefaultTheme.btnPayHoverBgStart = 'none';DefaultTheme.btnPayHoverBgEnd = 'none';DefaultTheme.btnPayActiveBg = '#f69912';DefaultTheme.btnPayActiveBorderColor = '#f69912';DefaultTheme.btnPayActiveBorderTopColor = '';DefaultTheme.btnPayActiveShadow = 'none';DefaultTheme.btnMenuArrowColor = '#a6a6a6';DefaultTheme.btnInsetColor = '#fff';DefaultTheme.selectPlaceholderColor = '#adadad';DefaultTheme.selectPaddingXSmall = '7px';DefaultTheme.selectIconGapSmall = '4px';DefaultTheme.selectPaddingXMedium = '11px';DefaultTheme.selectIconGapMedium = '8px';DefaultTheme.selectPaddingXLarge = '15px';DefaultTheme.selectIconGapLarge = '12px';DefaultTheme.selectRootWidthMobile = 'auto';DefaultTheme.tooltipPaddingY = '16px';DefaultTheme.tooltipPaddingX = '16px';DefaultTheme.tooltipCloseBtnPadding = '8px';DefaultTheme.tooltipCloseBtnColor = 'rgba(0, 0, 0, 0.32)';DefaultTheme.tooltipCloseBtnHoverColor = 'rgba(0, 0, 0, 0.5)';DefaultTheme.tooltipPinOffset = '0px';DefaultTheme.tooltipPinOffsetX = '16px';DefaultTheme.tooltipPinOffsetY = '18px';DefaultTheme.tooltipMargin = '10px';DefaultTheme.kebabMargin = '4px';DefaultTheme.kebabBackground = 'transparent';DefaultTheme.kebabBackgroundHover = 'rgba(0, 0, 0, 0.09)';DefaultTheme.kebabBorderRadius = '50%';DefaultTheme.kebabBorder = '2px solid transparent';DefaultTheme.modalBackBg = '#222';DefaultTheme.modalBackOpacity = '0.6';DefaultTheme.modalCloseButtonColor = 'rgba(0, 0, 0, 0.32)';DefaultTheme.modalCloseButtonDisabledColor = '#8b8b8b';DefaultTheme.modalCloseButtonHoverColor = 'rgba(0, 0, 0, 0.865)';DefaultTheme.modalCloseButtonPadding = '36px';DefaultTheme.modalCloseButtonLegacyShift = '0px';DefaultTheme.modalCloseButtonBottomPadding = '20px';DefaultTheme.modalCloseButtonClickArea = '10px';DefaultTheme.modalCloseIconSize = '12px';DefaultTheme.modalCloseLegacyGap = '0px';DefaultTheme.modalCloseWrapperLegacyGap = '0px';DefaultTheme.modalBorderRadius = '0px';DefaultTheme.modalFixedHeaderBorder = 'none';DefaultTheme.modalFixedFooterBorder = 'none';DefaultTheme.modalFixedPanelShadow = 'none';DefaultTheme.modalFooterBg = '#ebebeb';DefaultTheme.modalAdaptiveThreshold = '425px';DefaultTheme.modalPaddingTop = '24px';DefaultTheme.modalPaddingLeft = '32px';DefaultTheme.modalPaddingRight = '36px';DefaultTheme.modalHeaderFontSize = '24px';DefaultTheme.modalHeaderLineHeight = '32px';DefaultTheme.modalHeaderPaddingBottom = '16px';DefaultTheme.modalHeaderPaddingTop = '24px';DefaultTheme.modalBodyTextColor = 'inherit';DefaultTheme.modalFooterTextColor = 'inherit';DefaultTheme.modalBodyPaddingBottom = '24px';DefaultTheme.modalFooterPaddingTop = '0px';DefaultTheme.modalFooterPaddingBottom = '32px';DefaultTheme.modalPaddingBottom = '40px';DefaultTheme.modalFooterPanelPaddingTop = '20px';DefaultTheme.modalFooterPanelPaddingBottom = '20px';DefaultTheme.mobileModalCloseButtonRightPadding = '16px';DefaultTheme.mobileModalCloseButtonTopPadding = '12px';DefaultTheme.mobileModalCloseButtonClickArea = '16px';DefaultTheme.mobileModalCloseIconSize = '12px';DefaultTheme.mobileModalHeaderFontSize = '24px';DefaultTheme.mobileModalHeaderLineHeight = '32px';DefaultTheme.mobileModalHeaderPadding = '16px';DefaultTheme.mobileModalBodyPadding = '16px';DefaultTheme.mobileModalBodyFontSize = '16px';DefaultTheme.mobileModalFooterPadding = '16px';DefaultTheme.mobileModalPaddingBottom = '16px';DefaultTheme.sidePageFooterPanelBg = '#ebebeb';DefaultTheme.sidePageBackingBg = '#222';DefaultTheme.sidePageBackingBgOpacity = '0.6';DefaultTheme.sidePageCloseButtonColor = 'rgba(0, 0, 0, 0.374)';DefaultTheme.sidePageCloseButtonHoverColor = 'rgba(0, 0, 0, 0.5)';DefaultTheme.sidePageContainerShadow = '0 5px 10px rgba(0, 0, 0, 0.2)';DefaultTheme.mobileSidePagePaddingLeft = '16px';DefaultTheme.mobileSidePagePaddingRight = '16px';DefaultTheme.mobileSidePagePaddingTop = '16px';DefaultTheme.mobileSidePagePaddingBottom = '16px';DefaultTheme.mobileSidePageFooterPadding = '16px';DefaultTheme.sidePagePaddingLeft = '32px';DefaultTheme.sidePagePaddingRight = '36px';DefaultTheme.sidePagePaddingTop = '24px';DefaultTheme.sidePagePaddingBottom = '40px';DefaultTheme.sidePageFooterPaddingTop = '24px';DefaultTheme.sidePageFooterPaddingBottom = '32px';DefaultTheme.sidePageBodyTextColor = 'inherit';DefaultTheme.sidePageFooterTextColor = 'inherit';DefaultTheme.sidePageHeaderFontSize = '24px';DefaultTheme.sidePageHeaderLineHeight = '32px';DefaultTheme.sidePageHeaderPaddingBottom = '16px';DefaultTheme.sidePageHeaderPaddingTop = '24px';DefaultTheme.sidePageHeaderFixedFontSize = '18px';DefaultTheme.sidePageHeaderFixedLineHeight = '28px';DefaultTheme.sidePageHeaderFixedPaddingY = '10px';DefaultTheme.sidePageHeaderStickyOffset = '5px';DefaultTheme.sidePageCloseButtonPadding = '36px';DefaultTheme.mobileSidePageCloseButtonPadding = '16px';DefaultTheme.sidePageCloseButtonLegacyPaddingLeft = '36px';DefaultTheme.sidePageFooterPanelPaddingTop = '20px';DefaultTheme.sidePageFooterPanelPaddingBottom = '20px';DefaultTheme.sidePageCloseIconSize = '12px';DefaultTheme.sidePageCloseButtonClickArea = '10px';DefaultTheme.mobileSidePageCloseButtonClickArea = '16px';DefaultTheme.sidePageFixedPanelShadow = 'none';DefaultTheme.mobileSidePageHeaderFontSize = '24px';DefaultTheme.mobileSidePageHeaderLineHeight = '32px';DefaultTheme.mobileSidePageHeaderPaddingBottom = '16px';DefaultTheme.mobileSidePageHeaderPaddingTop = '16px';DefaultTheme.dateInputMaskColor = '#b8b8b8';DefaultTheme.dateInputComponentSelectedBgColor = '#cdedff';DefaultTheme.calendarCellHoverColor = 'white';DefaultTheme.calendarCellActiveHoverColor = 'white';DefaultTheme.calendarCellWeekendColor = '#cb3d35';DefaultTheme.calendarCellTodayBorder = '1px solid rgba(0, 0, 0, 0.32)';DefaultTheme.calendarCellSelectedBgColor = '#ebebeb';DefaultTheme.calendarCellSelectedFontColor = 'inherit';DefaultTheme.calendarCellSize = '32px';DefaultTheme.calendarMonthTitleBorderBottomColor = '#dfdede';DefaultTheme.calendarPaddingX = '18px';DefaultTheme.calendarMonthTitleLineHeight = '20px';DefaultTheme.calendarMonthTitlePaddingTop = '12px';DefaultTheme.calendarMonthTitlePaddingBottom = '8px';DefaultTheme.calendarMonthTitleMarginX = '6px';DefaultTheme.calendarMonthTitleMarginBottom = '6px';DefaultTheme.calendarWrapperHeight = ' 330px';DefaultTheme.calendarMonthMarginBottom = '6px';DefaultTheme.calendarMaxMonthsToAppendOnScroll = '5';DefaultTheme.dateSelectLineHeight = '20px';DefaultTheme.dateSelectFontSize = '14px';DefaultTheme.dateSelectFontWeight = 'bold';DefaultTheme.dateSelectMenuItemBgSelected = '#ececec';DefaultTheme.pickerShadow = '0 4px 12px 0 rgba(0, 0, 0, 0.16)';DefaultTheme.pickerTodayWrapperBorderTop = '1px solid #dfdede';DefaultTheme.pickerTodayWrapperHoverBgColor = '#f5f5f5';DefaultTheme.pickerTodayWrapperFontSize = '14px';DefaultTheme.pickerTodayWrapperLineHeight = '20px';DefaultTheme.pickerTodayWrapperPaddingTop = '6px';DefaultTheme.pickerTodayWrapperPaddingBottom = '6px';DefaultTheme.pagingForwardIconMarginTop = '1px';DefaultTheme.pagingPageLinkPaddingX = '0.625em';DefaultTheme.pagingPageLinkPaddingY = '0.3125em';DefaultTheme.pagingPageLinkLegacyPaddingY = '0';DefaultTheme.pagingPageLinkMinWidth = '0.75em';DefaultTheme.pagingPageForwardLinkMarginTop = '0.35em';DefaultTheme.pagingPageForwardLinkMarginLeft = '10px';DefaultTheme.pagingPageForwardLinkPaddingRight = '1.375em';DefaultTheme.pagingLineHeight = '1.375em';DefaultTheme.pagingDotsColor = 'gray';DefaultTheme.pagingDotsPadding = '0.375em 0.625em 0';DefaultTheme.pagingPageLinkActiveBg = 'rgba(0, 0, 0, 0.09)';DefaultTheme.pagingPageLinkHoverBg = 'rgba(0, 0, 0, 0.05)';DefaultTheme.pagingPageLinkBorderRadius = '9999px';DefaultTheme.pagingPageLinkHintFontSize = '12px';DefaultTheme.pagingPageLinkHintLineHeight = '16px';DefaultTheme.pagingPageLinkMargin = '0px 1px';DefaultTheme.hintMaxWidth = '200px';DefaultTheme.hintPaddingY = '6px';DefaultTheme.hintPaddingX = '8px';DefaultTheme.hintTextAlign = 'center';DefaultTheme.hintBgColor = 'rgba(51, 51, 51, 0.8)';DefaultTheme.hintBorder = 'none';DefaultTheme.hintBorderRadius = '2px';DefaultTheme.hintPinOffset = '8px';DefaultTheme.hintMargin = '8px';DefaultTheme.toastPaddingY = '10px';DefaultTheme.toastPaddingX = '16px';DefaultTheme.toastBorderRadius = '2px';DefaultTheme.toastBorder = 'none';DefaultTheme.toastTop = '24px';DefaultTheme.toastBg = 'rgba(51, 51, 51, 0.8)';DefaultTheme.toastColor = 'white';DefaultTheme.toastLinkColor = '#8fcdff';DefaultTheme.toastClosePadding = '16px';DefaultTheme.toastCloseColor = 'rgba(255, 255, 255, 0.6)';DefaultTheme.toastCloseHoverColor = 'white';DefaultTheme.toastCloseSize = '8px';DefaultTheme.dropdownMenuSelectedBg = '#f1f1f1';DefaultTheme.menuBorder = 'none';DefaultTheme.menuShadow = '0 4px 12px rgba(0, 0, 0, 0.16)';DefaultTheme.menuPaddingY = '4px';DefaultTheme.menuPaddingX = '0';DefaultTheme.menuItemIconWidth = '16px';DefaultTheme.menuItemIconGap = '4px';DefaultTheme.menuItemIconLegacyMargin = '0px';DefaultTheme.menuItemIconLegacyShift = '0px';DefaultTheme.menuItemPaddingX = '8px';DefaultTheme.menuItemPaddingY = '6px';DefaultTheme.menuItemBorderRadius = '0px';DefaultTheme.menuItemLegacyPaddingX = '0px';DefaultTheme.menuItemLegacyPaddingY = '0px';DefaultTheme.menuItemCommentColor = '#adadad';DefaultTheme.menuItemCommentColorHover = '#fff';DefaultTheme.menuItemPaddingMobile = '12px 16px';DefaultTheme.menuHeaderLineHeight = '16px';DefaultTheme.menuHeaderFontSize = '12px';DefaultTheme.menuHeaderPaddingX = '8px';DefaultTheme.menuHeaderPaddingTop = '12px';DefaultTheme.menuHeaderPaddingBottom = '4px';DefaultTheme.menuHeaderLegacyPaddingRight = '0px';DefaultTheme.menuSeparatorBorderColor = '#ebebeb';DefaultTheme.menuSeparatorMarginY = '2px';DefaultTheme.menuSeparatorBorderWidth = '1px';DefaultTheme.toggleHandleActiveWidthIncrement = '4px';DefaultTheme.toggleHeight = '20px';DefaultTheme.toggleWidth = '32px';DefaultTheme.toggleBg = '#fff';DefaultTheme.toggleCheckedBg = '#fff';DefaultTheme.toggleDisabledHandleBg = '#fff';DefaultTheme.toggleBaseBg = '#fff';DefaultTheme.toggleBgDisabledChecked = '#dadada';DefaultTheme.toggleBgHover = '#f3f3f2';DefaultTheme.toggleCheckedBgHover = '#f3f3f2';DefaultTheme.toggleBgChecked = '#1874cf';DefaultTheme.toggleBorderColor = 'rgba(0, 0, 0, 0.16)';DefaultTheme.toggleBgFocus = 'linear-gradient(-180deg, #f1f1f1, #dedede)';DefaultTheme.toggleBgActive = '#e5e5e5';DefaultTheme.toggleCaptionGap = '10px';DefaultTheme.toggleButtonOffsetY = '0px';DefaultTheme.popupBorder = 'none';DefaultTheme.popupBorderRadius = '2px';DefaultTheme.popupBorderColor = 'transparent';DefaultTheme.popupDropShadow = 'drop-shadow(0 4px 12px rgba(0, 0, 0, 0.16))';DefaultTheme.popupBoxShadow = '0 4px 12px 0 rgba(0, 0, 0, 0.16)';DefaultTheme.popupPinOffset = '0';DefaultTheme.popupPinOffsetX = '16px';DefaultTheme.popupPinOffsetY = '16px';DefaultTheme.popupMargin = '10px';DefaultTheme.popupPinSize = '8px';DefaultTheme.inputShadow = 'none';DefaultTheme.inputBg = 'white';DefaultTheme.inputIconColor = '#a9a9a9';DefaultTheme.inputColor = 'inherit';DefaultTheme.inputWidth = '200px';DefaultTheme.inputPaddingXSmall = '7px';DefaultTheme.inputPaddingXMedium = '11px';DefaultTheme.inputPaddingXLarge = '15px';DefaultTheme.inputIconGapSmall = '4px';DefaultTheme.inputIconGapMedium = '8px';DefaultTheme.inputIconGapLarge = '12px';DefaultTheme.inputIconSizeSmall = '16px';DefaultTheme.inputIconSizeMedium = '18px';DefaultTheme.inputIconSizeLarge = '20px';DefaultTheme.inputBorderRadiusSmall = '0px';DefaultTheme.inputBorderRadiusMedium = '0px';DefaultTheme.inputBorderRadiusLarge = '0px';DefaultTheme.inputBorderTopColor = 'rgba(0, 0, 0, 0.15)';DefaultTheme.checkboxBoxSize = '16px';DefaultTheme.checkboxCaptionGap = '8px';DefaultTheme.checkboxBoxOffsetY = '1px';DefaultTheme.checkboxBgStart = '#fdfdfd';DefaultTheme.checkboxBgEnd = '#ededed';DefaultTheme.checkboxBorder = 'none';DefaultTheme.checkboxCheckedColor = '#fff';DefaultTheme.checkboxBorderRadius = '1px';DefaultTheme.checkboxBg = '#fff';DefaultTheme.textareaBg = '#fff';DefaultTheme.textareaShadow = 'none';DefaultTheme.textareaBorderRadius = '0px';DefaultTheme.textareaWidth = '250px';DefaultTheme.textareaPaddingX = '7px';DefaultTheme.textareaBorderTopColor = 'rgba(0, 0, 0, 0.16)';DefaultTheme.textareaDisabledBg = 'rgba(0, 0, 0, 0.05)';DefaultTheme.textareaDisabledBorderColor = 'transparent';DefaultTheme.radioBulletSize = '8px';DefaultTheme.radioSize = '16px';DefaultTheme.radioCaptionGap = '8px';DefaultTheme.radioVerticalAlign = 'top';DefaultTheme.radioBgImage = 'none';DefaultTheme.radioBgColor = '#fff';DefaultTheme.radioBoxShadow = 'none';DefaultTheme.radioHoverShadow = 'none';DefaultTheme.radioActiveShadow = 'none';DefaultTheme.radioCheckedBorderColor = 'transparent';DefaultTheme.radioCheckedBulletColor = '#fff';DefaultTheme.radioCaptionDisplay = 'inline-table';DefaultTheme.radioBorderWidthCompensation = '0px';DefaultTheme.radioCircleOffsetY = '1px';DefaultTheme.radioGroupLegacyItemGap = '0px';DefaultTheme.tabPaddingX = '12px';DefaultTheme.tabBorderWidth = '2px';DefaultTheme.spinnerCaptionGapSmall = '6px';DefaultTheme.spinnerCaptionGapMedium = '-4px';DefaultTheme.spinnerCaptionGapLarge = '-3px';DefaultTheme.switcherBorderRadius = '2px';DefaultTheme.switcherButtonPaddingXSmall = '7px';DefaultTheme.switcherButtonPaddingXMedium = '11px';DefaultTheme.switcherButtonPaddingXLarge = '15px';DefaultTheme.mobilePopupTopPadding = '20px';DefaultTheme.mobilePopupHeaderPadding = '0 16px';DefaultTheme.mobilePopupHeaderBorderRadius = '8px 8px 0px 0px';DefaultTheme.mobilePopupHeaderShadow = '0px 0px 16px 1px rgba(0, 0, 0, 0.1)';DefaultTheme.mobilePopupHeaderFontWeight = '500';DefaultTheme.mobilePopupHeaderChildPadding = '12px';DefaultTheme.scrollContainerScrollBarSize = '4px';DefaultTheme.scrollContainerScrollBarHoverSize = '10px';DefaultTheme.scrollContainerScrollBarColor = 'rgba(183, 183, 183, 0.7)';DefaultTheme.scrollContainerScrollBarInvertColor = 'rgba(255, 255, 255, 0.5)';DefaultTheme.passwordInputVisibilityIconColor = '#000';DefaultTheme.passwordInputVisibilityIconOpacity = '0.6';DefaultTheme.passwordInputVisibilityIconHoverColor = '#000';DefaultTheme.passwordInputVisibilityIconHoverOpacity = '1';DefaultTheme.globalLoaderHeight = '4px';DefaultTheme.globalLoaderWidth = '100%';DefaultTheme.globalLoaderPosition = 'fixed';DefaultTheme.globalLoaderTop = '0';DefaultTheme.globalLoaderLeft = '0';DefaultTheme.globalLoaderBottom = 'auto';DefaultTheme.globalLoaderRight = 'auto';DefaultTheme.globalLoaderBackgroundColor = 'transparent';DefaultTheme.globalLoaderTransitionToSpinnerDuration = '500';DefaultTheme.globalLoaderSpinnerAnimationDuration = '2000';DefaultTheme.globalLoaderSlowAnimationDuration = '20000';DefaultTheme.globalLoaderTransitionFromSpinnerDuration = '200';DefaultTheme.fileUploaderWidth = '362px';DefaultTheme.fileUploaderBg = '#fff';DefaultTheme.fileUploaderPaddingX = '7px';DefaultTheme.fileUploaderBorderRadius = '2px';DefaultTheme.fileUploaderBorderColor = 'rgba(0, 0, 0, 0.37)';DefaultTheme.fileUploaderBorderStyle = 'dashed';DefaultTheme.fileUploaderIconSize = '14px';DefaultTheme.fileUploaderIconColor = '#808080';DefaultTheme.fileUploaderIconHoverColor = '#333';DefaultTheme.fileUploaderDisabledBg = '#f2f2f2';DefaultTheme.fileUploaderDisabledBorderColor = '#f2f2f2';DefaultTheme.fileUploaderDisabledTextColor = '#808080';DefaultTheme.fileUploaderDisabledLinkColor = '#808080';DefaultTheme.fileUploaderDisabledIconColor = '#A0A0A0';DefaultTheme.fileUploaderHoveredBg = 'none';
1695
+ }]);return DefaultTheme;}();exports.DefaultTheme = DefaultTheme;DefaultTheme.fontFamilyCompensationBaseline = '0px';DefaultTheme.labGrotesqueBaselineCompensation = '1';DefaultTheme.brandXLight = '#cae5f5';DefaultTheme.brandLight = '#3094d0';DefaultTheme.brand = '#2291ff';DefaultTheme.brandDark = '#1363a0';DefaultTheme.brandXDark = '#084f85';DefaultTheme.white = '#fff';DefaultTheme.grayXxLight = '#f2f2f2';DefaultTheme.grayXLight = '#ebebeb';DefaultTheme.grayLight = '#a0a0a0';DefaultTheme.gray = '#858585';DefaultTheme.grayDark = '#333';DefaultTheme.black = '#000';DefaultTheme.blueXxLight = '#cdedff';DefaultTheme.blueLight = '#1f87ef';DefaultTheme.blue = '#1874cf';DefaultTheme.blueDark = '#1874cf';DefaultTheme.blueXDark = '#044785';DefaultTheme.greenXxLight = '#d7f8ae';DefaultTheme.green = '#538a1b';DefaultTheme.greenDark = '#477916';DefaultTheme.redXxLight = '#ffddd6';DefaultTheme.red = '#dd473b';DefaultTheme.redDark = '#cb3d35';DefaultTheme.yellowXxLight = '#ffeec2';DefaultTheme.yellow = '#fcb73e';DefaultTheme.yellowDark = '#ef8b17';DefaultTheme.bgDefault = '#fff';DefaultTheme.bgDisabled = '#f6f6f6';DefaultTheme.errorMain = '#dd473b';DefaultTheme.errorSecondary = '#ffd6d6';DefaultTheme.errorText = '#cb3d35';DefaultTheme.warningMain = '#fcb73e';DefaultTheme.warningSecondary = '#fff0bc';DefaultTheme.warningText = '#d97e00';DefaultTheme.borderColorFocusLight = '#cdedff';DefaultTheme.borderColorGrayDark = 'rgba(0, 0, 0, 0.28)';DefaultTheme.borderColorGrayLight = 'rgba(0, 0, 0, 0.16)';DefaultTheme.placeholderColor = '#adadad';DefaultTheme.outlineColorFocus = '#fff';DefaultTheme.placeholderColorLight = '#cdcdcd';DefaultTheme.blinkColor = 'rgba(0, 136, 255, 0.2)';DefaultTheme.controlBorderWidth = '1px';DefaultTheme.controlOutlineWidth = '2px';DefaultTheme.controlLineHeightSmall = '20px';DefaultTheme.controlLineHeightMedium = '22px';DefaultTheme.controlLineHeightLarge = '24px';DefaultTheme.controlPaddingYSmall = '5px';DefaultTheme.controlPaddingYMedium = '8px';DefaultTheme.controlPaddingYLarge = '11px';DefaultTheme.textColorDefault = '#222222';DefaultTheme.textColorInvert = '#fff';DefaultTheme.textColorDisabled = '#adadad';DefaultTheme.textColorDisabledContrast = '#858585';DefaultTheme.fontSizeSmall = '14px';DefaultTheme.fontSizeMedium = '16px';DefaultTheme.fontSizeLarge = '18px';DefaultTheme.fontSizeMobile = '18px';DefaultTheme.lineHeightMobile = '24px';DefaultTheme.specificityLevel = '0';DefaultTheme.fixedPanelShadow = '0 0 16px 1px rgba(0, 0, 0, 0.3)';DefaultTheme.controlHeightSmall = '32px';DefaultTheme.controlHeightMedium = '40px';DefaultTheme.controlHeightLarge = '48px';DefaultTheme.mobileMediaQuery = '(max-width: 576px) and (hover: none) and (pointer: coarse)';DefaultTheme.linkColor = '#1874cf';DefaultTheme.linkActiveColor = '#1260ae';DefaultTheme.linkHoverTextDecoration = 'underline';DefaultTheme.linkSuccessColor = '#477916';DefaultTheme.linkSuccessHoverColor = '#477916';DefaultTheme.linkSuccessActiveColor = '#325a0c';DefaultTheme.linkDangerColor = '#cb3d35';DefaultTheme.linkDangerHoverColor = '#cb3d35';DefaultTheme.linkDangerActiveColor = '#a92a27';DefaultTheme.linkIconMarginRight = '4px';DefaultTheme.linkButtonLineHeight = '34px';DefaultTheme.linkButtonPaddingX = '10px';DefaultTheme.tokenDisabledBg = 'rgba(0, 0, 0, 0.05)';DefaultTheme.tokenMarginY = '2px';DefaultTheme.tokenMarginX = '4px';DefaultTheme.tokenPaddingY = '1px';DefaultTheme.tokenPaddingX = '3px';DefaultTheme.tokenMarginBeforeIcon = '4px';DefaultTheme.tokenRemoveIconSize = '8px';DefaultTheme.tokenRemoveIconPaddingY = '4px';DefaultTheme.tokenRemoveIconPaddingX = '4px';DefaultTheme.tokenRemoveIconGap = '4px';DefaultTheme.tokenRemoveIconBoxSizing = 'content-box';DefaultTheme.tokenBorderRadius = '1px';DefaultTheme.tokenBorderWidth = '1px';DefaultTheme.tokenBorderColorDisabled = 'rgba(0, 0, 0, 0.15)';DefaultTheme.tokenOutlineWidth = '2px';DefaultTheme.tokenLegacyTextShift = '0px';DefaultTheme.tokenInputBorderRadius = '0px';DefaultTheme.tokenInputPaddingY = '2px';DefaultTheme.tokenInputPaddingX = '4px';DefaultTheme.tokenInputLineHeight = '22px';DefaultTheme.tokenInputInputPaddingLeft = '5px';DefaultTheme.loaderBg = 'rgba(255, 255, 255, 0.8)';DefaultTheme.loaderOpacity = '0.8';DefaultTheme.btnBackgroundClip = 'padding-box';DefaultTheme.btnArrowBgImageActive = 'none';DefaultTheme.btnArrowBgImageChecked = 'none';DefaultTheme.btnLinkBorderRadius = '2px';DefaultTheme.btnFocusShadowWidth = '2px';DefaultTheme.btnDisabledBorderColor = 'rgba(0, 0, 0, 0.05)';DefaultTheme.btnCheckedBg = '#7e7e7e';DefaultTheme.btnCheckedDisabledBg = '#a0a0a0';DefaultTheme.btnCheckedDisabledColor = 'rgba(255, 255, 255, 0.7)';DefaultTheme.btnCheckedTextColor = '#fff';DefaultTheme.btnCheckedShadow = 'none';DefaultTheme.btnCheckedDisabledShadow = 'none';DefaultTheme.btnBorderRadiusSmall = '1px';DefaultTheme.btnBorderRadiusMedium = '1px';DefaultTheme.btnBorderRadiusLarge = '1px';DefaultTheme.btnInsetWidth = '1px';DefaultTheme.btnPaddingXSmall = '15px';DefaultTheme.btnPaddingXMedium = '15px';DefaultTheme.btnPaddingXLarge = '19px';DefaultTheme.btnIconGapSmall = '4px';DefaultTheme.btnIconGapMedium = '4px';DefaultTheme.btnIconGapLarge = '4px';DefaultTheme.btnIconSizeSmall = '16px';DefaultTheme.btnIconSizeMedium = '18px';DefaultTheme.btnIconSizeLarge = '20px';DefaultTheme.btnDefaultBg = '#fff';DefaultTheme.btnDefaultBgStart = 'none';DefaultTheme.btnDefaultBgEnd = 'none';DefaultTheme.btnDefaultHoverBg = '#f2f2f2';DefaultTheme.btnDefaultHoverBgStart = 'none';DefaultTheme.btnDefaultHoverBgEnd = 'none';DefaultTheme.btnDefaultActiveBg = '#ebebeb';DefaultTheme.btnDefaultHoverBorderColor = 'rgba(0, 0, 0, 0.16)';DefaultTheme.btnDefaultHoverBorderBottomColor = '';DefaultTheme.btnDefaultActiveBorderColor = 'rgba(0, 0, 0, 0.16)';DefaultTheme.btnDefaultActiveBorderTopColor = '';DefaultTheme.btnDefaultBorderColor = 'rgba(0, 0, 0, 0.16)';DefaultTheme.btnDefaultBorderBottomColor = '';DefaultTheme.btnDefaultActiveShadow = 'none';DefaultTheme.btnSuccessBg = '#538a1b';DefaultTheme.btnSuccessHoverBg = '#477916';DefaultTheme.btnSuccessHoverBorderColor = '#477916';DefaultTheme.btnSuccessHoverBorderBottomColor = '';DefaultTheme.btnSuccessBorderColor = '#538a1b';DefaultTheme.btnSuccessBorderBottomColor = '';DefaultTheme.btnSuccessBgStart = 'none';DefaultTheme.btnSuccessBgEnd = 'none';DefaultTheme.btnSuccessTextColor = '#fff';DefaultTheme.btnSuccessHoverBgStart = 'none';DefaultTheme.btnSuccessHoverBgEnd = 'none';DefaultTheme.btnSuccessActiveBg = '#3a6710';DefaultTheme.btnSuccessActiveBorderColor = '#3a6710';DefaultTheme.btnSuccessActiveBorderTopColor = '';DefaultTheme.btnSuccessActiveShadow = 'none';DefaultTheme.btnPrimaryBg = '#1c7edf';DefaultTheme.btnPrimaryHoverBg = '#1874cf';DefaultTheme.btnPrimaryHoverBorderColor = '#1874cf';DefaultTheme.btnPrimaryHoverBorderBottomColor = '';DefaultTheme.btnPrimaryBorderColor = '#1c7edf';DefaultTheme.btnPrimaryBorderBottomColor = '';DefaultTheme.btnPrimaryBgStart = 'none';DefaultTheme.btnPrimaryBgEnd = 'none';DefaultTheme.btnPrimaryTextColor = '#fff';DefaultTheme.btnPrimaryHoverBgStart = 'none';DefaultTheme.btnPrimaryHoverBgEnd = 'none';DefaultTheme.btnPrimaryActiveBg = '#156abe';DefaultTheme.btnPrimaryActiveBorderColor = '#156abe';DefaultTheme.btnPrimaryActiveBorderTopColor = '';DefaultTheme.btnPrimaryActiveShadow = 'none';DefaultTheme.btnDangerBg = '#dd473b';DefaultTheme.btnDangerHoverBg = '#cb3d35';DefaultTheme.btnDangerHoverBorderColor = '#cb3d35';DefaultTheme.btnDangerHoverBorderBottomColor = '';DefaultTheme.btnDangerBorderColor = '#dd473b';DefaultTheme.btnDangerBorderBottomColor = '';DefaultTheme.btnDangerBgStart = 'none';DefaultTheme.btnDangerBgEnd = 'none';DefaultTheme.btnDangerTextColor = '#fff';DefaultTheme.btnDangerHoverBgStart = 'none';DefaultTheme.btnDangerHoverBgEnd = 'none';DefaultTheme.btnDangerActiveBg = '#ba342e';DefaultTheme.btnDangerActiveBorderColor = '#ba342e';DefaultTheme.btnDangerActiveBorderTopColor = '';DefaultTheme.btnDangerActiveShadow = 'none';DefaultTheme.btnPayBg = '#fcb73e';DefaultTheme.btnPayHoverBg = '#fda70c';DefaultTheme.btnPayHoverBorderColor = '#fda70c';DefaultTheme.btnPayHoverBorderBottomColor = '';DefaultTheme.btnPayBorderColor = '#fcb73e';DefaultTheme.btnPayBorderBottomColor = '';DefaultTheme.btnPayBgStart = 'none';DefaultTheme.btnPayBgEnd = 'none';DefaultTheme.btnPayHoverBgStart = 'none';DefaultTheme.btnPayHoverBgEnd = 'none';DefaultTheme.btnPayActiveBg = '#f69912';DefaultTheme.btnPayActiveBorderColor = '#f69912';DefaultTheme.btnPayActiveBorderTopColor = '';DefaultTheme.btnPayActiveShadow = 'none';DefaultTheme.btnMenuArrowColor = '#a6a6a6';DefaultTheme.btnInsetColor = '#fff';DefaultTheme.selectPlaceholderColor = '#adadad';DefaultTheme.selectPaddingXSmall = '7px';DefaultTheme.selectIconGapSmall = '4px';DefaultTheme.selectPaddingXMedium = '11px';DefaultTheme.selectIconGapMedium = '8px';DefaultTheme.selectPaddingXLarge = '15px';DefaultTheme.selectIconGapLarge = '12px';DefaultTheme.selectRootWidthMobile = 'auto';DefaultTheme.tooltipPaddingY = '16px';DefaultTheme.tooltipPaddingX = '16px';DefaultTheme.tooltipCloseBtnPadding = '8px';DefaultTheme.tooltipCloseBtnColor = 'rgba(0, 0, 0, 0.32)';DefaultTheme.tooltipCloseBtnHoverColor = 'rgba(0, 0, 0, 0.5)';DefaultTheme.tooltipPinOffset = '0px';DefaultTheme.tooltipPinOffsetX = '16px';DefaultTheme.tooltipPinOffsetY = '18px';DefaultTheme.tooltipMargin = '10px';DefaultTheme.kebabMargin = '4px';DefaultTheme.kebabBackground = 'transparent';DefaultTheme.kebabBackgroundHover = 'rgba(0, 0, 0, 0.09)';DefaultTheme.kebabBorderRadius = '50%';DefaultTheme.kebabBorder = '2px solid transparent';DefaultTheme.modalBackBg = '#222';DefaultTheme.modalBackOpacity = '0.6';DefaultTheme.modalCloseButtonColor = 'rgba(0, 0, 0, 0.32)';DefaultTheme.modalCloseButtonDisabledColor = '#8b8b8b';DefaultTheme.modalCloseButtonHoverColor = 'rgba(0, 0, 0, 0.865)';DefaultTheme.modalCloseButtonPadding = '36px';DefaultTheme.modalCloseButtonLegacyShift = '0px';DefaultTheme.modalCloseButtonBottomPadding = '20px';DefaultTheme.modalCloseButtonClickArea = '10px';DefaultTheme.modalCloseIconSize = '12px';DefaultTheme.modalCloseLegacyGap = '0px';DefaultTheme.modalCloseWrapperLegacyGap = '0px';DefaultTheme.modalBorderRadius = '0px';DefaultTheme.modalFixedHeaderBorder = 'none';DefaultTheme.modalFixedFooterBorder = 'none';DefaultTheme.modalFixedPanelShadow = 'none';DefaultTheme.modalFooterBg = '#ebebeb';DefaultTheme.modalAdaptiveThreshold = '425px';DefaultTheme.modalPaddingTop = '24px';DefaultTheme.modalPaddingLeft = '32px';DefaultTheme.modalPaddingRight = '36px';DefaultTheme.modalHeaderFontSize = '24px';DefaultTheme.modalHeaderLineHeight = '32px';DefaultTheme.modalHeaderPaddingBottom = '16px';DefaultTheme.modalHeaderPaddingTop = '24px';DefaultTheme.modalBodyTextColor = 'inherit';DefaultTheme.modalFooterTextColor = 'inherit';DefaultTheme.modalBodyPaddingBottom = '24px';DefaultTheme.modalFooterPaddingTop = '0px';DefaultTheme.modalFooterPaddingBottom = '32px';DefaultTheme.modalPaddingBottom = '40px';DefaultTheme.modalFooterPanelPaddingTop = '20px';DefaultTheme.modalFooterPanelPaddingBottom = '20px';DefaultTheme.mobileModalCloseButtonRightPadding = '16px';DefaultTheme.mobileModalCloseButtonTopPadding = '12px';DefaultTheme.mobileModalCloseButtonClickArea = '16px';DefaultTheme.mobileModalCloseIconSize = '12px';DefaultTheme.mobileModalHeaderFontSize = '24px';DefaultTheme.mobileModalHeaderLineHeight = '32px';DefaultTheme.mobileModalHeaderPadding = '16px';DefaultTheme.mobileModalBodyPadding = '16px';DefaultTheme.mobileModalBodyFontSize = '16px';DefaultTheme.mobileModalFooterPadding = '16px';DefaultTheme.mobileModalPaddingBottom = '16px';DefaultTheme.sidePageFooterPanelBg = '#ebebeb';DefaultTheme.sidePageBackingBg = '#222';DefaultTheme.sidePageBackingBgOpacity = '0.6';DefaultTheme.sidePageCloseButtonColor = 'rgba(0, 0, 0, 0.374)';DefaultTheme.sidePageCloseButtonHoverColor = 'rgba(0, 0, 0, 0.5)';DefaultTheme.sidePageContainerShadow = '0 5px 10px rgba(0, 0, 0, 0.2)';DefaultTheme.mobileSidePagePaddingLeft = '16px';DefaultTheme.mobileSidePagePaddingRight = '16px';DefaultTheme.mobileSidePagePaddingTop = '16px';DefaultTheme.mobileSidePagePaddingBottom = '16px';DefaultTheme.mobileSidePageFooterPadding = '16px';DefaultTheme.sidePagePaddingLeft = '32px';DefaultTheme.sidePagePaddingRight = '36px';DefaultTheme.sidePagePaddingTop = '24px';DefaultTheme.sidePagePaddingBottom = '40px';DefaultTheme.sidePageFooterPaddingTop = '24px';DefaultTheme.sidePageFooterPaddingBottom = '32px';DefaultTheme.sidePageBodyTextColor = 'inherit';DefaultTheme.sidePageFooterTextColor = 'inherit';DefaultTheme.sidePageHeaderFontSize = '24px';DefaultTheme.sidePageHeaderLineHeight = '32px';DefaultTheme.sidePageHeaderPaddingBottom = '16px';DefaultTheme.sidePageHeaderPaddingTop = '24px';DefaultTheme.sidePageHeaderFixedFontSize = '18px';DefaultTheme.sidePageHeaderFixedLineHeight = '28px';DefaultTheme.sidePageHeaderFixedPaddingY = '10px';DefaultTheme.sidePageHeaderStickyOffset = '5px';DefaultTheme.sidePageCloseButtonPadding = '36px';DefaultTheme.mobileSidePageCloseButtonPadding = '16px';DefaultTheme.sidePageCloseButtonLegacyPaddingLeft = '36px';DefaultTheme.sidePageFooterPanelPaddingTop = '20px';DefaultTheme.sidePageFooterPanelPaddingBottom = '20px';DefaultTheme.sidePageCloseIconSize = '12px';DefaultTheme.sidePageCloseButtonClickArea = '10px';DefaultTheme.mobileSidePageCloseButtonClickArea = '16px';DefaultTheme.sidePageFixedPanelShadow = 'none';DefaultTheme.mobileSidePageHeaderFontSize = '24px';DefaultTheme.mobileSidePageHeaderLineHeight = '32px';DefaultTheme.mobileSidePageHeaderPaddingBottom = '16px';DefaultTheme.mobileSidePageHeaderPaddingTop = '16px';DefaultTheme.dateInputMaskColor = '#b8b8b8';DefaultTheme.dateInputComponentSelectedBgColor = '#cdedff';DefaultTheme.calendarCellHoverColor = 'white';DefaultTheme.calendarCellActiveHoverColor = 'white';DefaultTheme.calendarCellWeekendColor = '#cb3d35';DefaultTheme.calendarCellTodayBorder = '1px solid rgba(0, 0, 0, 0.32)';DefaultTheme.calendarCellSelectedBgColor = '#ebebeb';DefaultTheme.calendarCellSelectedFontColor = 'inherit';DefaultTheme.calendarCellSize = '32px';DefaultTheme.calendarMonthTitleBorderBottomColor = '#dfdede';DefaultTheme.calendarPaddingX = '18px';DefaultTheme.calendarMonthTitleLineHeight = '20px';DefaultTheme.calendarMonthTitlePaddingTop = '12px';DefaultTheme.calendarMonthTitlePaddingBottom = '8px';DefaultTheme.calendarMonthTitleMarginX = '6px';DefaultTheme.calendarMonthTitleMarginBottom = '6px';DefaultTheme.calendarWrapperHeight = ' 330px';DefaultTheme.calendarMonthMarginBottom = '6px';DefaultTheme.calendarMaxMonthsToAppendOnScroll = '5';DefaultTheme.dateSelectLineHeight = '20px';DefaultTheme.dateSelectFontSize = '14px';DefaultTheme.dateSelectFontWeight = 'bold';DefaultTheme.dateSelectMenuItemBgSelected = '#ececec';DefaultTheme.pickerShadow = '0 4px 12px 0 rgba(0, 0, 0, 0.16)';DefaultTheme.pickerTodayWrapperBorderTop = '1px solid #dfdede';DefaultTheme.pickerTodayWrapperHoverBgColor = '#f5f5f5';DefaultTheme.pickerTodayWrapperFontSize = '14px';DefaultTheme.pickerTodayWrapperLineHeight = '20px';DefaultTheme.pickerTodayWrapperPaddingTop = '6px';DefaultTheme.pickerTodayWrapperPaddingBottom = '6px';DefaultTheme.pagingForwardIconMarginTop = '1px';DefaultTheme.pagingPageLinkPaddingX = '0.625em';DefaultTheme.pagingPageLinkPaddingY = '0.3125em';DefaultTheme.pagingPageLinkLegacyPaddingY = '0px';DefaultTheme.pagingPageLinkMinWidth = '0.75em';DefaultTheme.pagingPageForwardLinkMarginTop = '0.35em';DefaultTheme.pagingPageForwardLinkMarginLeft = '10px';DefaultTheme.pagingPageForwardLinkPaddingRight = '1.375em';DefaultTheme.pagingLineHeight = '1.375em';DefaultTheme.pagingDotsColor = 'gray';DefaultTheme.pagingDotsPadding = '0.375em 0.625em 0';DefaultTheme.pagingPageLinkActiveBg = 'rgba(0, 0, 0, 0.09)';DefaultTheme.pagingPageLinkHoverBg = 'rgba(0, 0, 0, 0.05)';DefaultTheme.pagingPageLinkBorderRadius = '9999px';DefaultTheme.pagingPageLinkHintFontSize = '12px';DefaultTheme.pagingPageLinkHintLineHeight = '16px';DefaultTheme.pagingPageLinkMargin = '0px 1px';DefaultTheme.hintMaxWidth = '200px';DefaultTheme.hintPaddingY = '6px';DefaultTheme.hintPaddingX = '8px';DefaultTheme.hintTextAlign = 'center';DefaultTheme.hintBgColor = 'rgba(51, 51, 51, 0.8)';DefaultTheme.hintBorder = 'none';DefaultTheme.hintBorderRadius = '2px';DefaultTheme.hintPinOffset = '8px';DefaultTheme.hintMargin = '8px';DefaultTheme.toastPaddingY = '10px';DefaultTheme.toastPaddingX = '16px';DefaultTheme.toastBorderRadius = '2px';DefaultTheme.toastBorder = 'none';DefaultTheme.toastTop = '24px';DefaultTheme.toastBg = 'rgba(51, 51, 51, 0.8)';DefaultTheme.toastColor = 'white';DefaultTheme.toastLinkColor = '#8fcdff';DefaultTheme.toastClosePadding = '16px';DefaultTheme.toastCloseColor = 'rgba(255, 255, 255, 0.6)';DefaultTheme.toastCloseHoverColor = 'white';DefaultTheme.toastCloseSize = '8px';DefaultTheme.dropdownMenuSelectedBg = '#f1f1f1';DefaultTheme.menuBorder = 'none';DefaultTheme.menuShadow = '0 4px 12px rgba(0, 0, 0, 0.16)';DefaultTheme.menuPaddingY = '4px';DefaultTheme.menuPaddingX = '0px';DefaultTheme.menuItemIconWidth = '16px';DefaultTheme.menuItemIconGap = '4px';DefaultTheme.menuItemIconLegacyMargin = '0px';DefaultTheme.menuItemIconLegacyShift = '0px';DefaultTheme.menuItemPaddingX = '8px';DefaultTheme.menuItemPaddingY = '6px';DefaultTheme.menuItemBorderRadius = '0px';DefaultTheme.menuItemLegacyPaddingX = '0px';DefaultTheme.menuItemLegacyPaddingY = '0px';DefaultTheme.menuItemCommentColor = '#adadad';DefaultTheme.menuItemCommentColorHover = '#fff';DefaultTheme.menuItemPaddingMobile = '12px 16px';DefaultTheme.menuHeaderLineHeight = '16px';DefaultTheme.menuHeaderFontSize = '12px';DefaultTheme.menuHeaderPaddingX = '8px';DefaultTheme.menuHeaderPaddingTop = '12px';DefaultTheme.menuHeaderPaddingBottom = '4px';DefaultTheme.menuHeaderLegacyPaddingRight = '0px';DefaultTheme.menuSeparatorBorderColor = '#ebebeb';DefaultTheme.menuSeparatorMarginY = '2px';DefaultTheme.menuSeparatorBorderWidth = '1px';DefaultTheme.toggleHandleActiveWidthIncrement = '4px';DefaultTheme.toggleHeight = '20px';DefaultTheme.toggleWidth = '32px';DefaultTheme.toggleBg = '#fff';DefaultTheme.toggleCheckedBg = '#fff';DefaultTheme.toggleDisabledHandleBg = '#fff';DefaultTheme.toggleBaseBg = '#fff';DefaultTheme.toggleBgDisabledChecked = '#dadada';DefaultTheme.toggleBgHover = '#f3f3f2';DefaultTheme.toggleCheckedBgHover = '#f3f3f2';DefaultTheme.toggleBgChecked = '#1874cf';DefaultTheme.toggleBorderColor = 'rgba(0, 0, 0, 0.16)';DefaultTheme.toggleBgFocus = 'linear-gradient(-180deg, #f1f1f1, #dedede)';DefaultTheme.toggleBgActive = '#e5e5e5';DefaultTheme.toggleCaptionGap = '10px';DefaultTheme.toggleButtonOffsetY = '0px';DefaultTheme.popupBorder = 'none';DefaultTheme.popupBorderRadius = '2px';DefaultTheme.popupBorderColor = 'transparent';DefaultTheme.popupDropShadow = 'drop-shadow(0 4px 12px rgba(0, 0, 0, 0.16))';DefaultTheme.popupBoxShadow = '0 4px 12px 0 rgba(0, 0, 0, 0.16)';DefaultTheme.popupPinOffset = '0px';DefaultTheme.popupPinOffsetX = '16px';DefaultTheme.popupPinOffsetY = '16px';DefaultTheme.popupMargin = '10px';DefaultTheme.popupPinSize = '8px';DefaultTheme.inputShadow = 'none';DefaultTheme.inputBg = 'white';DefaultTheme.inputIconColor = '#a9a9a9';DefaultTheme.inputColor = 'inherit';DefaultTheme.inputWidth = '200px';DefaultTheme.inputPaddingXSmall = '7px';DefaultTheme.inputPaddingXMedium = '11px';DefaultTheme.inputPaddingXLarge = '15px';DefaultTheme.inputIconGapSmall = '4px';DefaultTheme.inputIconGapMedium = '8px';DefaultTheme.inputIconGapLarge = '12px';DefaultTheme.inputIconSizeSmall = '16px';DefaultTheme.inputIconSizeMedium = '18px';DefaultTheme.inputIconSizeLarge = '20px';DefaultTheme.inputBorderRadiusSmall = '0px';DefaultTheme.inputBorderRadiusMedium = '0px';DefaultTheme.inputBorderRadiusLarge = '0px';DefaultTheme.inputBorderTopColor = 'rgba(0, 0, 0, 0.15)';DefaultTheme.checkboxBoxSize = '16px';DefaultTheme.checkboxCaptionGap = '8px';DefaultTheme.checkboxBoxOffsetY = '1px';DefaultTheme.checkboxBgStart = '#fdfdfd';DefaultTheme.checkboxBgEnd = '#ededed';DefaultTheme.checkboxBorder = 'none';DefaultTheme.checkboxCheckedColor = '#fff';DefaultTheme.checkboxBorderRadius = '1px';DefaultTheme.checkboxBg = '#fff';DefaultTheme.textareaBg = '#fff';DefaultTheme.textareaShadow = 'none';DefaultTheme.textareaBorderRadius = '0px';DefaultTheme.textareaWidth = '250px';DefaultTheme.textareaPaddingX = '7px';DefaultTheme.textareaBorderTopColor = 'rgba(0, 0, 0, 0.16)';DefaultTheme.textareaDisabledBg = 'rgba(0, 0, 0, 0.05)';DefaultTheme.textareaDisabledBorderColor = 'transparent';DefaultTheme.radioBulletSize = '8px';DefaultTheme.radioSize = '16px';DefaultTheme.radioCaptionGap = '8px';DefaultTheme.radioVerticalAlign = 'top';DefaultTheme.radioBgImage = 'none';DefaultTheme.radioBgColor = '#fff';DefaultTheme.radioBoxShadow = 'none';DefaultTheme.radioHoverShadow = 'none';DefaultTheme.radioActiveShadow = 'none';DefaultTheme.radioCheckedBorderColor = 'transparent';DefaultTheme.radioCheckedBulletColor = '#fff';DefaultTheme.radioCaptionDisplay = 'inline-table';DefaultTheme.radioBorderWidthCompensation = '0px';DefaultTheme.radioCircleOffsetY = '1px';DefaultTheme.radioGroupLegacyItemGap = '0px';DefaultTheme.tabPaddingX = '12px';DefaultTheme.tabBorderWidth = '2px';DefaultTheme.spinnerCaptionGapSmall = '6px';DefaultTheme.spinnerCaptionGapMedium = '-4px';DefaultTheme.spinnerCaptionGapLarge = '-3px';DefaultTheme.switcherBorderRadius = '2px';DefaultTheme.switcherButtonPaddingXSmall = '7px';DefaultTheme.switcherButtonPaddingXMedium = '11px';DefaultTheme.switcherButtonPaddingXLarge = '15px';DefaultTheme.mobilePopupTopPadding = '20px';DefaultTheme.mobilePopupHeaderPadding = '0 16px';DefaultTheme.mobilePopupHeaderBorderRadius = '8px 8px 0px 0px';DefaultTheme.mobilePopupHeaderShadow = '0px 0px 16px 1px rgba(0, 0, 0, 0.1)';DefaultTheme.mobilePopupHeaderFontWeight = '500';DefaultTheme.mobilePopupHeaderChildPadding = '12px';DefaultTheme.scrollContainerScrollBarSize = '4px';DefaultTheme.scrollContainerScrollBarHoverSize = '10px';DefaultTheme.scrollContainerScrollBarColor = 'rgba(183, 183, 183, 0.7)';DefaultTheme.scrollContainerScrollBarInvertColor = 'rgba(255, 255, 255, 0.5)';DefaultTheme.passwordInputVisibilityIconColor = '#000';DefaultTheme.passwordInputVisibilityIconOpacity = '0.6';DefaultTheme.passwordInputVisibilityIconHoverColor = '#000';DefaultTheme.passwordInputVisibilityIconHoverOpacity = '1';DefaultTheme.globalLoaderHeight = '4px';DefaultTheme.globalLoaderWidth = '100%';DefaultTheme.globalLoaderPosition = 'fixed';DefaultTheme.globalLoaderTop = '0px';DefaultTheme.globalLoaderLeft = '0px';DefaultTheme.globalLoaderBottom = 'auto';DefaultTheme.globalLoaderRight = 'auto';DefaultTheme.globalLoaderBackgroundColor = 'transparent';DefaultTheme.globalLoaderTransitionToSpinnerDuration = '500';DefaultTheme.globalLoaderSpinnerAnimationDuration = '2000';DefaultTheme.globalLoaderSlowAnimationDuration = '20000';DefaultTheme.globalLoaderTransitionFromSpinnerDuration = '200';DefaultTheme.fileUploaderWidth = '362px';DefaultTheme.fileUploaderBg = '#fff';DefaultTheme.fileUploaderPaddingX = '7px';DefaultTheme.fileUploaderBorderRadius = '2px';DefaultTheme.fileUploaderBorderColor = 'rgba(0, 0, 0, 0.37)';DefaultTheme.fileUploaderBorderStyle = 'dashed';DefaultTheme.fileUploaderIconSize = '14px';DefaultTheme.fileUploaderIconColor = '#808080';DefaultTheme.fileUploaderIconHoverColor = '#333';DefaultTheme.fileUploaderDisabledBg = '#f2f2f2';DefaultTheme.fileUploaderDisabledBorderColor = '#f2f2f2';DefaultTheme.fileUploaderDisabledTextColor = '#808080';DefaultTheme.fileUploaderDisabledLinkColor = '#808080';DefaultTheme.fileUploaderDisabledIconColor = '#A0A0A0';DefaultTheme.fileUploaderHoveredBg = 'none';
1696
1696
 
1697
1697
  var DefaultThemeInternal = (0, _ThemeHelpers.exposeGetters)(DefaultTheme);exports.DefaultThemeInternal = DefaultThemeInternal;