@skbkontur/react-ui 6.0.7 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/components/Autocomplete/Autocomplete.js +15 -4
  3. package/components/Autocomplete/Autocomplete.js.map +1 -1
  4. package/components/Button/Button.d.ts +1 -1
  5. package/components/Button/Button.js +5 -4
  6. package/components/Button/Button.js.map +1 -1
  7. package/components/Calendar/CalendarDay.js +3 -0
  8. package/components/Calendar/CalendarDay.js.map +1 -1
  9. package/components/Calendar/DayCellView.styles.d.ts +1 -0
  10. package/components/Calendar/DayCellView.styles.js +6 -3
  11. package/components/Calendar/DayCellView.styles.js.map +1 -1
  12. package/components/DatePicker/MobilePicker.js +1 -1
  13. package/components/DatePicker/MobilePicker.js.map +1 -1
  14. package/components/DateRangePicker/DateRangePicker.js +1 -1
  15. package/components/DateRangePicker/DateRangePicker.js.map +1 -1
  16. package/components/FxInput/FxInputRestoreBtn.js +1 -1
  17. package/components/FxInput/FxInputRestoreBtn.js.map +1 -1
  18. package/components/Hint/Hint.js +10 -3
  19. package/components/Hint/Hint.js.map +1 -1
  20. package/components/Input/Input.d.ts +19 -1
  21. package/components/Input/Input.js +10 -3
  22. package/components/Input/Input.js.map +1 -1
  23. package/components/Input/InputLayout/InputLayout.d.ts +3 -1
  24. package/components/Input/InputLayout/InputLayout.js +5 -2
  25. package/components/Input/InputLayout/InputLayout.js.map +1 -1
  26. package/components/Input/InputLayout/InputLayout.styles.d.ts +6 -0
  27. package/components/Input/InputLayout/InputLayout.styles.js +19 -1
  28. package/components/Input/InputLayout/InputLayout.styles.js.map +1 -1
  29. package/components/Input/InputLayout/InputLayoutAside.d.ts +2 -0
  30. package/components/Input/InputLayout/InputLayoutAside.js +2 -2
  31. package/components/Input/InputLayout/InputLayoutAside.js.map +1 -1
  32. package/components/Input/InputLayout/InputLayoutAsideCounter.d.ts +11 -0
  33. package/components/Input/InputLayout/InputLayoutAsideCounter.js +74 -0
  34. package/components/Input/InputLayout/InputLayoutAsideCounter.js.map +1 -0
  35. package/components/Loader/Loader.d.ts +12 -4
  36. package/components/Loader/Loader.js +18 -7
  37. package/components/Loader/Loader.js.map +1 -1
  38. package/components/MenuItem/MenuItem.d.ts +2 -0
  39. package/components/MenuItem/MenuItem.js +32 -8
  40. package/components/MenuItem/MenuItem.js.map +1 -1
  41. package/components/MenuItem/MenuItem.styles.d.ts +3 -0
  42. package/components/MenuItem/MenuItem.styles.js +25 -16
  43. package/components/MenuItem/MenuItem.styles.js.map +1 -1
  44. package/components/Select/Select.js +11 -1
  45. package/components/Select/Select.js.map +1 -1
  46. package/components/SingleToast/SingleToast.d.ts +9 -6
  47. package/components/SingleToast/SingleToast.js +9 -6
  48. package/components/SingleToast/SingleToast.js.map +1 -1
  49. package/components/Spinner/Spinner.d.ts +23 -33
  50. package/components/Spinner/Spinner.js +23 -19
  51. package/components/Spinner/Spinner.js.map +1 -1
  52. package/components/Spinner/Spinner.styles.d.ts +0 -3
  53. package/components/Spinner/Spinner.styles.js +6 -15
  54. package/components/Spinner/Spinner.styles.js.map +1 -1
  55. package/components/Switcher/Switcher.js +1 -0
  56. package/components/Switcher/Switcher.js.map +1 -1
  57. package/components/Textarea/Textarea.js +1 -1
  58. package/components/Textarea/Textarea.js.map +1 -1
  59. package/components/Textarea/Textarea.styles.d.ts +1 -0
  60. package/components/Textarea/Textarea.styles.js +7 -4
  61. package/components/Textarea/Textarea.styles.js.map +1 -1
  62. package/components/Textarea/TextareaCounter.d.ts +2 -0
  63. package/components/Textarea/TextareaCounter.js +22 -4
  64. package/components/Textarea/TextareaCounter.js.map +1 -1
  65. package/components/Toast/Toast.d.ts +13 -14
  66. package/components/Toast/Toast.js +3 -3
  67. package/components/Toast/Toast.js.map +1 -1
  68. package/components/Toast/ToastView.d.ts +8 -5
  69. package/components/Toast/ToastView.js +28 -8
  70. package/components/Toast/ToastView.js.map +1 -1
  71. package/components/Toast/ToastView.styles.d.ts +7 -0
  72. package/components/Toast/ToastView.styles.js +30 -8
  73. package/components/Toast/ToastView.styles.js.map +1 -1
  74. package/components/TokenInput/TokenInput.d.ts +18 -2
  75. package/components/TokenInput/TokenInput.js +236 -79
  76. package/components/TokenInput/TokenInput.js.map +1 -1
  77. package/components/TokenInput/TokenInput.styles.d.ts +1 -0
  78. package/components/TokenInput/TokenInput.styles.js +12 -9
  79. package/components/TokenInput/TokenInput.styles.js.map +1 -1
  80. package/components/TokenInput/TokenInputMenu.d.ts +2 -1
  81. package/components/TokenInput/TokenInputMenu.js +1 -1
  82. package/components/TokenInput/TokenInputMenu.js.map +1 -1
  83. package/components/TokenInput/TokenInputMobileMenu.d.ts +25 -0
  84. package/components/TokenInput/TokenInputMobileMenu.js +40 -0
  85. package/components/TokenInput/TokenInputMobileMenu.js.map +1 -0
  86. package/components/TokenInput/TokenInputReducer.d.ts +2 -0
  87. package/components/TokenInput/TokenInputReducer.js +14 -0
  88. package/components/TokenInput/TokenInputReducer.js.map +1 -1
  89. package/components/Tooltip/Tooltip.d.ts +4 -0
  90. package/components/Tooltip/Tooltip.js +50 -11
  91. package/components/Tooltip/Tooltip.js.map +1 -1
  92. package/internal/CloseButtonIcon/CloseButtonIcon.js +1 -1
  93. package/internal/CloseButtonIcon/CloseButtonIcon.js.map +1 -1
  94. package/internal/CommonWrapper/CommonWrapper.js +5 -0
  95. package/internal/CommonWrapper/CommonWrapper.js.map +1 -1
  96. package/internal/CustomComboBox/ComboBoxMenu.js +1 -1
  97. package/internal/CustomComboBox/ComboBoxMenu.js.map +1 -1
  98. package/internal/CustomComboBox/ComboBoxView.js +13 -2
  99. package/internal/CustomComboBox/ComboBoxView.js.map +1 -1
  100. package/internal/InputLikeText/InputLikeText.d.ts +1 -1
  101. package/internal/InputLikeText/InputLikeText.js.map +1 -1
  102. package/internal/Menu/Menu.js +3 -0
  103. package/internal/Menu/Menu.js.map +1 -1
  104. package/internal/Menu/Menu.styles.d.ts +1 -0
  105. package/internal/Menu/Menu.styles.js +13 -10
  106. package/internal/Menu/Menu.styles.js.map +1 -1
  107. package/internal/MenuMessage/MenuMessage.js +17 -1
  108. package/internal/MenuMessage/MenuMessage.js.map +1 -1
  109. package/internal/MenuMessage/MenuMessage.styles.d.ts +3 -0
  110. package/internal/MenuMessage/MenuMessage.styles.js +13 -4
  111. package/internal/MenuMessage/MenuMessage.styles.js.map +1 -1
  112. package/internal/MobilePopup/MobilePopup.d.ts +8 -0
  113. package/internal/MobilePopup/MobilePopup.js +34 -11
  114. package/internal/MobilePopup/MobilePopup.js.map +1 -1
  115. package/internal/MobilePopup/MobilePopup.styles.d.ts +7 -0
  116. package/internal/MobilePopup/MobilePopup.styles.js +34 -10
  117. package/internal/MobilePopup/MobilePopup.styles.js.map +1 -1
  118. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.d.ts +8 -1
  119. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.js +18 -1
  120. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.js.map +1 -1
  121. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.d.ts +3 -0
  122. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.js +14 -4
  123. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.js.map +1 -1
  124. package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.d.ts +4 -0
  125. package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.js +48 -11
  126. package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.js.map +1 -1
  127. package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.styles.d.ts +6 -0
  128. package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.styles.js +28 -8
  129. package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.styles.js.map +1 -1
  130. package/internal/Popup/Popup.d.ts +13 -9
  131. package/internal/Popup/Popup.js +130 -53
  132. package/internal/Popup/Popup.js.map +1 -1
  133. package/internal/Popup/Popup.styles.js +1 -1
  134. package/internal/Popup/Popup.styles.js.map +1 -1
  135. package/internal/Popup/PopupHelper.d.ts +8 -0
  136. package/internal/Popup/PopupHelper.js +39 -0
  137. package/internal/Popup/PopupHelper.js.map +1 -1
  138. package/internal/Popup/PopupPin.d.ts +19 -4
  139. package/internal/Popup/PopupPin.js +109 -8
  140. package/internal/Popup/PopupPin.js.map +1 -1
  141. package/internal/Popup/PopupPin.styles.d.ts +2 -0
  142. package/internal/Popup/PopupPin.styles.js +11 -5
  143. package/internal/Popup/PopupPin.styles.js.map +1 -1
  144. package/internal/PopupMenu/PopupMenu.d.ts +2 -1
  145. package/internal/PopupMenu/PopupMenu.js +21 -18
  146. package/internal/PopupMenu/PopupMenu.js.map +1 -1
  147. package/internal/SpinnerIcon/SpinnerIcon.d.ts +3 -3
  148. package/internal/SpinnerIcon/SpinnerIcon.js +4 -4
  149. package/internal/SpinnerIcon/SpinnerIcon.js.map +1 -1
  150. package/internal/icons2022/LoadingIcon.js +1 -1
  151. package/internal/icons2022/LoadingIcon.js.map +1 -1
  152. package/internal/icons2022/QuestionCircleIcon/QuestionCircleIcon16Light.d.ts +2 -0
  153. package/internal/icons2022/QuestionCircleIcon/QuestionCircleIcon16Light.js +21 -0
  154. package/internal/icons2022/QuestionCircleIcon/QuestionCircleIcon16Light.js.map +1 -0
  155. package/internal/icons2022/QuestionCircleIcon/QuestionCircleIcon20Regular.d.ts +2 -0
  156. package/internal/icons2022/QuestionCircleIcon/QuestionCircleIcon20Regular.js +21 -0
  157. package/internal/icons2022/QuestionCircleIcon/QuestionCircleIcon20Regular.js.map +1 -0
  158. package/internal/icons2022/QuestionCircleIcon/QuestionCircleIcon24Regular.d.ts +2 -0
  159. package/internal/icons2022/QuestionCircleIcon/QuestionCircleIcon24Regular.js +21 -0
  160. package/internal/icons2022/QuestionCircleIcon/QuestionCircleIcon24Regular.js.map +1 -0
  161. package/internal/themes/BasicTheme.d.ts +83 -4
  162. package/internal/themes/BasicTheme.js +187 -6
  163. package/internal/themes/BasicTheme.js.map +1 -1
  164. package/internal/themes/DarkTheme6_1.d.ts +1 -0
  165. package/internal/themes/DarkTheme6_1.js +41 -0
  166. package/internal/themes/DarkTheme6_1.js.map +1 -0
  167. package/internal/themes/LightTheme6_1.d.ts +1 -0
  168. package/internal/themes/LightTheme6_1.js +39 -0
  169. package/internal/themes/LightTheme6_1.js.map +1 -0
  170. package/lib/getMenuPositions.js +11 -11
  171. package/lib/getMenuPositions.js.map +1 -1
  172. package/lib/theming/themes/DarkTheme.d.ts +1 -0
  173. package/lib/theming/themes/DarkTheme.js +3 -1
  174. package/lib/theming/themes/DarkTheme.js.map +1 -1
  175. package/lib/theming/themes/LightTheme.d.ts +1 -0
  176. package/lib/theming/themes/LightTheme.js +3 -1
  177. package/lib/theming/themes/LightTheme.js.map +1 -1
  178. package/package.json +1 -1
@@ -5,11 +5,21 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
5
5
  import { memoizeGetStyles } from '../../../lib/theming/Emotion.js';
6
6
  export var getJsStyles = memoizeGetStyles(function (_a) {
7
7
  var css = _a.css;
8
- return ({
8
+ var rootBase6_1 = function (t) { return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n display: flex;\n flex-direction: column;\n background: ", ";\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n "], ["\n position: relative;\n display: flex;\n flex-direction: column;\n background: ", ";\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n "])), t.menuBgDefault, t.mobilePopupContainerBorderRadius, t.mobilePopupContainerBorderRadius); };
9
+ return {
9
10
  root: function (t) {
10
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n display: flex;\n flex-direction: column;\n padding: ", ";\n "], ["\n position: relative;\n display: flex;\n flex-direction: column;\n padding: ", ";\n "])), t.mobilePopupHeaderPadding);
11
+ return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n display: flex;\n flex-direction: column;\n background: ", ";\n padding: ", ";\n "], ["\n position: relative;\n display: flex;\n flex-direction: column;\n background: ", ";\n padding: ", ";\n "])), t.menuBgDefault, t.mobilePopupFooterPadding);
11
12
  },
12
- });
13
+ rootSmall6_1: function (t) {
14
+ return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", ";\n padding: ", ";\n "], ["\n ", ";\n padding: ", ";\n "])), rootBase6_1(t), t.mobilePopupFooterPaddingSmall);
15
+ },
16
+ rootMedium6_1: function (t) {
17
+ return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", ";\n padding: ", ";\n "], ["\n ", ";\n padding: ", ";\n "])), rootBase6_1(t), t.mobilePopupFooterPaddingMedium);
18
+ },
19
+ rootLarge6_1: function (t) {
20
+ return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", ";\n padding: ", ";\n "], ["\n ", ";\n padding: ", ";\n "])), rootBase6_1(t), t.mobilePopupFooterPaddingLarge);
21
+ },
22
+ };
13
23
  });
14
- var templateObject_1;
24
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
15
25
  //# sourceMappingURL=MobilePopupFooter.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MobilePopupFooter.styles.js","sourceRoot":"","sources":["../../../../internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.ts"],"names":[],"mappings":";;;;AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGnE,MAAM,CAAC,IAAM,WAAW,GAAG,gBAAgB,CAAC,UAAC,EAAgB;QAAd,GAAG,SAAA;IAAgB,OAAA,CAAC;QACjE,IAAI,YAAC,CAAQ;YACX,OAAO,GAAG,iLAAA,mGAIG,EAA0B,SACtC,KADY,CAAC,CAAC,wBAAwB,EACrC;QACJ,CAAC;KACF,CAAC;AATgE,CAShE,CAAC,CAAC","sourcesContent":["import type { Emotion } from '@emotion/css/create-instance';\n\nimport { memoizeGetStyles } from '../../../lib/theming/Emotion.js';\nimport type { Theme } from '../../../lib/theming/Theme.js';\n\nexport const getJsStyles = memoizeGetStyles(({ css }: Emotion) => ({\n root(t: Theme) {\n return css`\n position: relative;\n display: flex;\n flex-direction: column;\n padding: ${t.mobilePopupHeaderPadding};\n `;\n },\n}));\n"]}
1
+ {"version":3,"file":"MobilePopupFooter.styles.js","sourceRoot":"","sources":["../../../../internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.ts"],"names":[],"mappings":";;;;AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGnE,MAAM,CAAC,IAAM,WAAW,GAAG,gBAAgB,CAAC,UAAC,EAAgB;QAAd,GAAG,SAAA;IAChD,IAAM,WAAW,GAAG,UAAC,CAAQ,IAAK,OAAA,GAAG,uPAAA,8FAIrB,EAAe,oCACA,EAAkC,qCACjC,EAAkC,OACjE,KAHe,CAAC,CAAC,aAAa,EACA,CAAC,CAAC,gCAAgC,EACjC,CAAC,CAAC,gCAAgC,GANhC,CAOjC,CAAC;IAEF,OAAO;QACL,IAAI,YAAC,CAAQ;YACX,OAAO,GAAG,sNAAA,8GAIM,EAAe,sBAClB,EAA0B,WACtC,KAFe,CAAC,CAAC,aAAa,EAClB,CAAC,CAAC,wBAAwB,EACrC;QACJ,CAAC;QAED,YAAY,YAAC,CAAQ;YACnB,OAAO,GAAG,oHAAA,YACN,EAAc,sBACL,EAA+B,WAC3C,KAFG,WAAW,CAAC,CAAC,CAAC,EACL,CAAC,CAAC,6BAA6B,EAC1C;QACJ,CAAC;QACD,aAAa,YAAC,CAAQ;YACpB,OAAO,GAAG,oHAAA,YACN,EAAc,sBACL,EAAgC,WAC5C,KAFG,WAAW,CAAC,CAAC,CAAC,EACL,CAAC,CAAC,8BAA8B,EAC3C;QACJ,CAAC;QACD,YAAY,YAAC,CAAQ;YACnB,OAAO,GAAG,oHAAA,YACN,EAAc,sBACL,EAA+B,WAC3C,KAFG,WAAW,CAAC,CAAC,CAAC,EACL,CAAC,CAAC,6BAA6B,EAC1C;QACJ,CAAC;KACF,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import type { Emotion } from '@emotion/css/create-instance';\n\nimport { memoizeGetStyles } from '../../../lib/theming/Emotion.js';\nimport type { Theme } from '../../../lib/theming/Theme.js';\n\nexport const getJsStyles = memoizeGetStyles(({ css }: Emotion) => {\n const rootBase6_1 = (t: Theme) => css`\n position: relative;\n display: flex;\n flex-direction: column;\n background: ${t.menuBgDefault};\n border-bottom-left-radius: ${t.mobilePopupContainerBorderRadius};\n border-bottom-right-radius: ${t.mobilePopupContainerBorderRadius};\n `;\n\n return {\n root(t: Theme) {\n return css`\n position: relative;\n display: flex;\n flex-direction: column;\n background: ${t.menuBgDefault};\n padding: ${t.mobilePopupFooterPadding};\n `;\n },\n\n rootSmall6_1(t: Theme) {\n return css`\n ${rootBase6_1(t)};\n padding: ${t.mobilePopupFooterPaddingSmall};\n `;\n },\n rootMedium6_1(t: Theme) {\n return css`\n ${rootBase6_1(t)};\n padding: ${t.mobilePopupFooterPaddingMedium};\n `;\n },\n rootLarge6_1(t: Theme) {\n return css`\n ${rootBase6_1(t)};\n padding: ${t.mobilePopupFooterPaddingLarge};\n `;\n },\n };\n});\n"]}
@@ -1,9 +1,11 @@
1
1
  import React from 'react';
2
+ import type { SizeProp } from '../../../lib/types/props.js';
2
3
  interface MobilePopupHeaderProps {
3
4
  /**
4
5
  * Заголовок шапки
5
6
  */
6
7
  caption?: string;
8
+ size?: SizeProp;
7
9
  }
8
10
  export declare class MobilePopupHeader extends React.Component<React.PropsWithChildren<MobilePopupHeaderProps>> {
9
11
  static __KONTUR_REACT_UI__: string;
@@ -14,5 +16,7 @@ export declare class MobilePopupHeader extends React.Component<React.PropsWithCh
14
16
  private theme;
15
17
  render(): React.JSX.Element;
16
18
  private renderMain;
19
+ private getContainerClassName6_1;
20
+ private getRootSizeClassName6_1;
17
21
  }
18
22
  export {};
@@ -22,12 +22,36 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
22
22
  import React from 'react';
23
23
  import { withRenderEnvironment } from '../../../lib/renderEnvironment/index.js';
24
24
  import { ThemeContext } from '../../../lib/theming/ThemeContext.js';
25
+ import { isThemeGTE } from '../../../lib/theming/ThemeHelpers.js';
25
26
  import { isNonNullable } from '../../../lib/utils.js';
26
27
  import { getJsStyles } from './MobilePopupHeader.styles.js';
27
28
  var MobilePopupHeader = /** @class */ (function (_super) {
28
29
  __extends(MobilePopupHeader, _super);
29
30
  function MobilePopupHeader() {
30
- return _super !== null && _super.apply(this, arguments) || this;
31
+ var _this = _super !== null && _super.apply(this, arguments) || this;
32
+ _this.getContainerClassName6_1 = function () {
33
+ switch (_this.props.size) {
34
+ case 'large':
35
+ return _this.jsStyles.containerLarge6_1(_this.theme);
36
+ case 'medium':
37
+ return _this.jsStyles.containerMedium6_1(_this.theme);
38
+ case 'small':
39
+ default:
40
+ return _this.jsStyles.containerSmall6_1(_this.theme);
41
+ }
42
+ };
43
+ _this.getRootSizeClassName6_1 = function () {
44
+ switch (_this.props.size) {
45
+ case 'large':
46
+ return _this.jsStyles.rootLarge6_1(_this.theme);
47
+ case 'medium':
48
+ return _this.jsStyles.rootMedium6_1(_this.theme);
49
+ case 'small':
50
+ default:
51
+ return _this.jsStyles.rootSmall6_1(_this.theme);
52
+ }
53
+ };
54
+ return _this;
31
55
  }
32
56
  MobilePopupHeader.prototype.render = function () {
33
57
  var _this = this;
@@ -38,17 +62,30 @@ var MobilePopupHeader = /** @class */ (function (_super) {
38
62
  }));
39
63
  };
40
64
  MobilePopupHeader.prototype.renderMain = function () {
41
- var _a, _b;
42
- var _c = this.props, caption = _c.caption, children = _c.children;
43
- return (React.createElement("div", { className: this.cx((_a = {},
44
- _a[this.jsStyles.root(this.theme)] = true,
45
- _a[this.jsStyles.rootWithoutContent()] = !caption && !children,
46
- _a)) },
65
+ var _a, _b, _c;
66
+ var themeGTE6_1 = isThemeGTE(this.theme, '6.1');
67
+ var _d = this.props, caption = _d.caption, children = _d.children;
68
+ if (themeGTE6_1) {
69
+ if (!caption && (!children || !React.isValidElement(children))) {
70
+ return null;
71
+ }
72
+ return (React.createElement("div", { className: this.getRootSizeClassName6_1() },
73
+ React.createElement("div", { className: this.getContainerClassName6_1() },
74
+ caption && (React.createElement("div", { className: this.cx((_a = {},
75
+ _a[this.jsStyles.caption(this.theme)] = true,
76
+ _a[this.jsStyles.captionWithChildren()] = isNonNullable(children),
77
+ _a)) }, caption)),
78
+ React.isValidElement(children) && React.createElement("div", null, children))));
79
+ }
80
+ return (React.createElement("div", { className: this.cx((_b = {},
81
+ _b[this.jsStyles.root(this.theme)] = true,
82
+ _b[this.jsStyles.rootWithoutContent()] = !caption && !children,
83
+ _b)) },
47
84
  React.createElement("div", { className: this.jsStyles.container() },
48
- caption && (React.createElement("div", { className: this.cx((_b = {},
49
- _b[this.jsStyles.caption(this.theme)] = true,
50
- _b[this.jsStyles.captionWithChildren()] = isNonNullable(children),
51
- _b)) }, caption)),
85
+ caption && (React.createElement("div", { className: this.cx((_c = {},
86
+ _c[this.jsStyles.caption(this.theme)] = true,
87
+ _c[this.jsStyles.captionWithChildren()] = isNonNullable(children),
88
+ _c)) }, caption)),
52
89
  React.isValidElement(children) && React.createElement("div", null, children))));
53
90
  };
54
91
  MobilePopupHeader.__KONTUR_REACT_UI__ = 'MobileMenuHeader';
@@ -1 +1 @@
1
- {"version":3,"file":"MobilePopupHeader.js","sourceRoot":"","sources":["../../../../internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAEhF,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAA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ACT,iBAAiB,CAgD7B;IAAD,wBAAC;CAAA,AAhDD,CAAuC,KAAK,CAAC,SAAS,GAgDrD;SAhDY,iBAAiB","sourcesContent":["import type { Emotion } from '@emotion/css/create-instance';\nimport React from 'react';\n\nimport { withRenderEnvironment } from '../../../lib/renderEnvironment/index.js';\nimport type { Theme } from '../../../lib/theming/Theme.js';\nimport { ThemeContext } from '../../../lib/theming/ThemeContext.js';\nimport { isNonNullable } from '../../../lib/utils.js';\nimport { getJsStyles } from './MobilePopupHeader.styles.js';\n\ninterface MobilePopupHeaderProps {\n /**\n * Заголовок шапки\n */\n caption?: string;\n}\n\n@withRenderEnvironment\nexport class MobilePopupHeader extends React.Component<React.PropsWithChildren<MobilePopupHeaderProps>> {\n public static __KONTUR_REACT_UI__ = 'MobileMenuHeader';\n public static displayName = 'MobileMenuHeader';\n\n private emotion!: Emotion;\n private cx!: Emotion['cx'];\n private jsStyles!: ReturnType<typeof getJsStyles>;\n private theme!: Theme;\n\n public render() {\n this.jsStyles = getJsStyles(this.emotion);\n\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return this.renderMain();\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private renderMain() {\n const { caption, children } = this.props;\n\n return (\n <div\n className={this.cx({\n [this.jsStyles.root(this.theme)]: true,\n [this.jsStyles.rootWithoutContent()]: !caption && !children,\n })}\n >\n <div className={this.jsStyles.container()}>\n {caption && (\n <div\n className={this.cx({\n [this.jsStyles.caption(this.theme)]: true,\n [this.jsStyles.captionWithChildren()]: isNonNullable(children),\n })}\n >\n {caption}\n </div>\n )}\n {React.isValidElement(children) && <div>{children}</div>}\n </div>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"MobilePopupHeader.js","sourceRoot":"","sources":["../../../../internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE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AAC,OAAO,IAAI,CAAC,QAAQ;oBAC3D;YAEF,6BAAK,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE;gBACtC,OAAO,IAAI,CACV,6BACE,SAAS,EAAE,IAAI,CAAC,EAAE;wBAChB,GAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAG,IAAI;wBACzC,GAAC,IAAI,CAAC,QAAQ,CAAC,mBAAmB,EAAE,IAAG,aAAa,CAAC,QAAQ,CAAC;4BAC9D,IAED,OAAO,CACJ,CACP;gBACA,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,iCAAM,QAAQ,CAAO,CACpD,CACF,CACP,CAAC;IACJ,CAAC;IAvEa,qCAAmB,GAAG,kBAAkB,AAArB,CAAsB;IACzC,6BAAW,GAAG,kBAAkB,AAArB,CAAsB;IAFpC,iBAAiB;QAD7B,qBAAqB;OACT,iBAAiB,CAiG7B;IAAD,wBAAC;CAAA,AAjGD,CAAuC,KAAK,CAAC,SAAS,GAiGrD;SAjGY,iBAAiB","sourcesContent":["import type { Emotion } from '@emotion/css/create-instance';\nimport React from 'react';\nimport type { ReactElement } from 'react';\n\nimport { withRenderEnvironment } from '../../../lib/renderEnvironment/index.js';\nimport type { Theme } from '../../../lib/theming/Theme.js';\nimport { ThemeContext } from '../../../lib/theming/ThemeContext.js';\nimport { isThemeGTE } from '../../../lib/theming/ThemeHelpers.js';\nimport type { SizeProp } from '../../../lib/types/props.js';\nimport { isNonNullable } from '../../../lib/utils.js';\nimport { getJsStyles } from './MobilePopupHeader.styles.js';\n\ninterface MobilePopupHeaderProps {\n /**\n * Заголовок шапки\n */\n caption?: string;\n size?: SizeProp;\n}\n\n@withRenderEnvironment\nexport class MobilePopupHeader extends React.Component<React.PropsWithChildren<MobilePopupHeaderProps>> {\n public static __KONTUR_REACT_UI__ = 'MobileMenuHeader';\n public static displayName = 'MobileMenuHeader';\n\n private emotion!: Emotion;\n private cx!: Emotion['cx'];\n private jsStyles!: ReturnType<typeof getJsStyles>;\n private theme!: Theme;\n\n public render() {\n this.jsStyles = getJsStyles(this.emotion);\n\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return this.renderMain();\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private renderMain(): ReactElement | null {\n const themeGTE6_1 = isThemeGTE(this.theme, '6.1');\n const { caption, children } = this.props;\n\n if (themeGTE6_1) {\n if (!caption && (!children || !React.isValidElement(children))) {\n return null;\n }\n\n return (\n <div className={this.getRootSizeClassName6_1()}>\n <div className={this.getContainerClassName6_1()}>\n {caption && (\n <div\n className={this.cx({\n [this.jsStyles.caption(this.theme)]: true,\n [this.jsStyles.captionWithChildren()]: isNonNullable(children),\n })}\n >\n {caption}\n </div>\n )}\n {React.isValidElement(children) && <div>{children}</div>}\n </div>\n </div>\n );\n }\n\n return (\n <div\n className={this.cx({\n [this.jsStyles.root(this.theme)]: true,\n [this.jsStyles.rootWithoutContent()]: !caption && !children,\n })}\n >\n <div className={this.jsStyles.container()}>\n {caption && (\n <div\n className={this.cx({\n [this.jsStyles.caption(this.theme)]: true,\n [this.jsStyles.captionWithChildren()]: isNonNullable(children),\n })}\n >\n {caption}\n </div>\n )}\n {React.isValidElement(children) && <div>{children}</div>}\n </div>\n </div>\n );\n }\n\n private getContainerClassName6_1 = (): string => {\n switch (this.props.size) {\n case 'large':\n return this.jsStyles.containerLarge6_1(this.theme);\n case 'medium':\n return this.jsStyles.containerMedium6_1(this.theme);\n case 'small':\n default:\n return this.jsStyles.containerSmall6_1(this.theme);\n }\n };\n\n private getRootSizeClassName6_1 = (): string => {\n switch (this.props.size) {\n case 'large':\n return this.jsStyles.rootLarge6_1(this.theme);\n case 'medium':\n return this.jsStyles.rootMedium6_1(this.theme);\n case 'small':\n default:\n return this.jsStyles.rootSmall6_1(this.theme);\n }\n };\n}\n"]}
@@ -3,6 +3,12 @@ export declare const getJsStyles: import("../../../lib/theming/Emotion.js").Styl
3
3
  root(t: Theme): string;
4
4
  rootWithoutContent(): string;
5
5
  container(): string;
6
+ rootSmall6_1(t: Theme): string;
7
+ rootMedium6_1(t: Theme): string;
8
+ rootLarge6_1(t: Theme): string;
9
+ containerSmall6_1(t: Theme): string;
10
+ containerMedium6_1(t: Theme): string;
11
+ containerLarge6_1(t: Theme): string;
6
12
  caption(t: Theme): string;
7
13
  captionWithChildren(): string;
8
14
  }>;
@@ -5,23 +5,43 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
5
5
  import { memoizeGetStyles } from '../../../lib/theming/Emotion.js';
6
6
  export var getJsStyles = memoizeGetStyles(function (_a) {
7
7
  var css = _a.css;
8
- return ({
8
+ var rootBase6_1 = function (t) { return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n background: ", ";\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n "], ["\n position: relative;\n background: ", ";\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n "])), t.menuBgDefault, t.mobilePopupContainerBorderRadius, t.mobilePopupContainerBorderRadius); };
9
+ var containerBase6_1 = function () { return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n "], ["\n display: flex;\n flex-direction: column;\n "]))); };
10
+ return {
9
11
  root: function (t) {
10
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n padding: ", ";\n "], ["\n position: relative;\n padding: ", ";\n "])), t.mobilePopupHeaderPadding);
12
+ return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: relative;\n padding: ", ";\n "], ["\n position: relative;\n padding: ", ";\n "])), t.mobilePopupHeaderPadding);
11
13
  },
12
14
  rootWithoutContent: function () {
13
- return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: 8px 0 0 0;\n "], ["\n padding: 8px 0 0 0;\n "])));
15
+ return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n padding: 8px 0 0 0;\n "], ["\n padding: 8px 0 0 0;\n "])));
14
16
  },
15
17
  container: function () {
16
- return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n "], ["\n display: flex;\n flex-direction: column;\n "])));
18
+ return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n "], ["\n display: flex;\n flex-direction: column;\n "])));
19
+ },
20
+ rootSmall6_1: function (t) {
21
+ return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n ", ";\n padding-top: ", ";\n "], ["\n ", ";\n padding-top: ", ";\n "])), rootBase6_1(t), t.mobilePopupPaddingSmall);
22
+ },
23
+ rootMedium6_1: function (t) {
24
+ return css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n ", ";\n padding-top: ", ";\n "], ["\n ", ";\n padding-top: ", ";\n "])), rootBase6_1(t), t.mobilePopupPaddingMedium);
25
+ },
26
+ rootLarge6_1: function (t) {
27
+ return css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n ", ";\n padding-top: ", ";\n "], ["\n ", ";\n padding-top: ", ";\n "])), rootBase6_1(t), t.mobilePopupPaddingLarge);
28
+ },
29
+ containerSmall6_1: function (t) {
30
+ return css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n ", ";\n padding: ", ";\n "], ["\n ", ";\n padding: ", ";\n "])), containerBase6_1(), t.mobilePopupHeaderPaddingSmall);
31
+ },
32
+ containerMedium6_1: function (t) {
33
+ return css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n ", ";\n padding: ", ";\n "], ["\n ", ";\n padding: ", ";\n "])), containerBase6_1(), t.mobilePopupHeaderPaddingMedium);
34
+ },
35
+ containerLarge6_1: function (t) {
36
+ return css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n ", ";\n padding: ", ";\n "], ["\n ", ";\n padding: ", ";\n "])), containerBase6_1(), t.mobilePopupHeaderPaddingLarge);
17
37
  },
18
38
  caption: function (t) {
19
- return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n color: ", ";\n "], ["\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n color: ", ";\n "])), t.mobilePopupHeaderFontSize, t.mobilePopupHeaderLineHeight, t.mobilePopupHeaderFontWeight, t.textColorDefault);
39
+ return css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n color: ", ";\n "], ["\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n color: ", ";\n "])), t.mobilePopupHeaderFontSize, t.mobilePopupHeaderLineHeight, t.mobilePopupHeaderFontWeight, t.textColorDefault);
20
40
  },
21
41
  captionWithChildren: function () {
22
- return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n padding-bottom: 8px;\n "], ["\n padding-bottom: 8px;\n "])));
42
+ return css(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n padding-bottom: 8px;\n "], ["\n padding-bottom: 8px;\n "])));
23
43
  },
24
- });
44
+ };
25
45
  });
26
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
46
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13;
27
47
  //# sourceMappingURL=MobilePopupHeader.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MobilePopupHeader.styles.js","sourceRoot":"","sources":["../../../../internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.styles.ts"],"names":[],"mappings":";;;;AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGnE,MAAM,CAAC,IAAM,WAAW,GAAG,gBAAgB,CAAC,UAAC,EAAgB;QAAd,GAAG,SAAA;IAAgB,OAAA,CAAC;QACjE,IAAI,YAAC,CAAQ;YACX,OAAO,GAAG,4HAAA,8CAEG,EAA0B,SACtC,KADY,CAAC,CAAC,wBAAwB,EACrC;QACJ,CAAC;QAED,kBAAkB;YAChB,OAAO,GAAG,sGAAA,mCAET,KAAC;QACJ,CAAC;QAED,SAAS;YACP,OAAO,GAAG,gIAAA,6DAGT,KAAC;QACJ,CAAC;QAED,OAAO,YAAC,CAAQ;YACd,OAAO,GAAG,2KAAA,qBACK,EAA2B,wBACzB,EAA6B,wBAC7B,EAA6B,kBACnC,EAAkB,SAC5B,KAJc,CAAC,CAAC,yBAAyB,EACzB,CAAC,CAAC,2BAA2B,EAC7B,CAAC,CAAC,2BAA2B,EACnC,CAAC,CAAC,gBAAgB,EAC3B;QACJ,CAAC;QAED,mBAAmB;YACjB,OAAO,GAAG,uGAAA,oCAET,KAAC;QACJ,CAAC;KACF,CAAC;AAnCgE,CAmChE,CAAC,CAAC","sourcesContent":["import type { Emotion } from '@emotion/css/create-instance';\n\nimport { memoizeGetStyles } from '../../../lib/theming/Emotion.js';\nimport type { Theme } from '../../../lib/theming/Theme.js';\n\nexport const getJsStyles = memoizeGetStyles(({ css }: Emotion) => ({\n root(t: Theme) {\n return css`\n position: relative;\n padding: ${t.mobilePopupHeaderPadding};\n `;\n },\n\n rootWithoutContent() {\n return css`\n padding: 8px 0 0 0;\n `;\n },\n\n container() {\n return css`\n display: flex;\n flex-direction: column;\n `;\n },\n\n caption(t: Theme) {\n return css`\n font-size: ${t.mobilePopupHeaderFontSize};\n line-height: ${t.mobilePopupHeaderLineHeight};\n font-weight: ${t.mobilePopupHeaderFontWeight};\n color: ${t.textColorDefault};\n `;\n },\n\n captionWithChildren() {\n return css`\n padding-bottom: 8px;\n `;\n },\n}));\n"]}
1
+ {"version":3,"file":"MobilePopupHeader.styles.js","sourceRoot":"","sources":["../../../../internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.styles.ts"],"names":[],"mappings":";;;;AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGnE,MAAM,CAAC,IAAM,WAAW,GAAG,gBAAgB,CAAC,UAAC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B,sBACT,EAAgC,WAC5C,KAFG,gBAAgB,EAAE,EACT,CAAC,CAAC,8BAA8B,EAC3C;QACJ,CAAC;QAED,iBAAiB,YAAC,CAAQ;YACxB,OAAO,GAAG,sHAAA,YACN,EAAkB,sBACT,EAA+B,WAC3C,KAFG,gBAAgB,EAAE,EACT,CAAC,CAAC,6BAA6B,EAC1C;QACJ,CAAC;QAED,OAAO,YAAC,CAAQ;YACd,OAAO,GAAG,uLAAA,uBACK,EAA2B,0BACzB,EAA6B,0BAC7B,EAA6B,oBACnC,EAAkB,WAC5B,KAJc,CAAC,CAAC,yBAAyB,EACzB,CAAC,CAAC,2BAA2B,EAC7B,CAAC,CAAC,2BAA2B,EACnC,CAAC,CAAC,gBAAgB,EAC3B;QACJ,CAAC;QAED,mBAAmB;YACjB,OAAO,GAAG,6GAAA,wCAET,KAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import type { Emotion } from '@emotion/css/create-instance';\n\nimport { memoizeGetStyles } from '../../../lib/theming/Emotion.js';\nimport type { Theme } from '../../../lib/theming/Theme.js';\n\nexport const getJsStyles = memoizeGetStyles(({ css }: Emotion) => {\n const rootBase6_1 = (t: Theme) => css`\n position: relative;\n background: ${t.menuBgDefault};\n border-top-left-radius: ${t.mobilePopupContainerBorderRadius};\n border-top-right-radius: ${t.mobilePopupContainerBorderRadius};\n `;\n\n const containerBase6_1 = () => css`\n display: flex;\n flex-direction: column;\n `;\n\n return {\n root(t: Theme) {\n return css`\n position: relative;\n padding: ${t.mobilePopupHeaderPadding};\n `;\n },\n\n rootWithoutContent() {\n return css`\n padding: 8px 0 0 0;\n `;\n },\n\n container() {\n return css`\n display: flex;\n flex-direction: column;\n `;\n },\n\n rootSmall6_1(t: Theme) {\n return css`\n ${rootBase6_1(t)};\n padding-top: ${t.mobilePopupPaddingSmall};\n `;\n },\n\n rootMedium6_1(t: Theme) {\n return css`\n ${rootBase6_1(t)};\n padding-top: ${t.mobilePopupPaddingMedium};\n `;\n },\n\n rootLarge6_1(t: Theme) {\n return css`\n ${rootBase6_1(t)};\n padding-top: ${t.mobilePopupPaddingLarge};\n `;\n },\n\n containerSmall6_1(t: Theme) {\n return css`\n ${containerBase6_1()};\n padding: ${t.mobilePopupHeaderPaddingSmall};\n `;\n },\n\n containerMedium6_1(t: Theme) {\n return css`\n ${containerBase6_1()};\n padding: ${t.mobilePopupHeaderPaddingMedium};\n `;\n },\n\n containerLarge6_1(t: Theme) {\n return css`\n ${containerBase6_1()};\n padding: ${t.mobilePopupHeaderPaddingLarge};\n `;\n },\n\n caption(t: Theme) {\n return css`\n font-size: ${t.mobilePopupHeaderFontSize};\n line-height: ${t.mobilePopupHeaderLineHeight};\n font-weight: ${t.mobilePopupHeaderFontWeight};\n color: ${t.textColorDefault};\n `;\n },\n\n captionWithChildren() {\n return css`\n padding-bottom: 8px;\n `;\n },\n };\n});\n"]}
@@ -5,10 +5,10 @@ import type { FocusEventType, MouseEventType } from '../../typings/event-types.j
5
5
  import type { Nullable } from '../../typings/utility-types.js';
6
6
  import type { CommonProps } from '../CommonWrapper/index.js';
7
7
  import type { Priority } from '../ZIndex/index.js';
8
- export declare const PopupNonPinnablePositions: string[];
9
- export declare const PopupPinnablePositions: string[];
10
- export declare const PopupPositions: readonly string[];
11
- export declare const DefaultPosition: string;
8
+ export declare const PopupNonPinnablePositions: readonly ["middle center", "middle left", "middle right"];
9
+ export declare const PopupPinnablePositions: readonly ["top center", "top left", "top right", "bottom center", "bottom left", "bottom right", "left middle", "left top", "left bottom", "right middle", "right top", "right bottom"];
10
+ export declare const PopupPositions: readonly ["top center", "top left", "top right", "bottom center", "bottom left", "bottom right", "left middle", "left top", "left bottom", "right middle", "right top", "right bottom", "middle center", "middle left", "middle right"];
11
+ export declare const DefaultPosition: "top center";
12
12
  export type PopupPositionsType = (typeof PopupPositions)[number];
13
13
  export type PopupPinnablePositionsType = (typeof PopupPinnablePositions)[number];
14
14
  export type ShortPopupPositionsType = 'top' | 'bottom' | 'left' | 'right';
@@ -56,9 +56,8 @@ export interface PopupProps extends Omit<CommonProps, 'children'>, PopupHandlerP
56
56
  */
57
57
  pinOffset?: number;
58
58
  /**
59
- * Сторона пина без учёта границы.
60
- * Пин представляет собой равносторонний треугольник, высота от попапа
61
- * до "носика" пина будет соответствовать формуле (size* √3)/2
59
+ * Высота пина в px. Ширина основания = 2 × size (для top/bottom).
60
+ * Значения по размерам: small 8, medium 10, large 12.
62
61
  */
63
62
  pinSize?: number;
64
63
  /**
@@ -116,6 +115,7 @@ interface PopupLocation {
116
115
  };
117
116
  position: PopupPositionsType;
118
117
  isFullyVisible: boolean;
118
+ pinOffset: number;
119
119
  }
120
120
  export interface PopupState {
121
121
  location: Nullable<PopupLocation>;
@@ -189,6 +189,12 @@ export declare class Popup extends React.Component<PopupProps, PopupState> {
189
189
  private tryReuseCurrentLocation;
190
190
  private tryGetFirstFullyVisibleLocation;
191
191
  private getFallbackLocation;
192
+ private getMobileVerticalFallbackLocation;
193
+ private buildLocationForPosition;
194
+ private getViewportSidePadding;
195
+ private getMobileMaxWidth;
196
+ private applyMobileViewportPadding;
197
+ private normalizeCoordinates;
192
198
  private pickBestFallbackPosition;
193
199
  private evaluateFallbackCandidate;
194
200
  private pickBestAreaCandidate;
@@ -197,7 +203,5 @@ export declare class Popup extends React.Component<PopupProps, PopupState> {
197
203
  private getRelativeShift;
198
204
  private getCoordinates;
199
205
  private getPinOffset;
200
- private getHorizontalPosition;
201
- private getVerticalPosition;
202
206
  }
203
207
  export {};