@vkontakte/vkui 4.30.0 → 4.31.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 (200) hide show
  1. package/.cache/.eslintcache +1 -1
  2. package/.cache/.stylelintcache +1 -1
  3. package/.cache/.tsbuildinfo +38 -27
  4. package/.cache/ts/src/components/Calendar/Calendar.d.ts +1 -1
  5. package/.cache/ts/src/components/CalendarHeader/CalendarHeader.d.ts +2 -0
  6. package/.cache/ts/src/components/CalendarRange/CalendarRange.d.ts +1 -1
  7. package/.cache/ts/src/components/DateInput/DateInput.d.ts +1 -1
  8. package/.cache/ts/src/components/DateRangeInput/DateRangeInput.d.ts +1 -1
  9. package/.cache/ts/src/hooks/useAdaptivity.d.ts +1 -0
  10. package/.cache/ts/src/index.d.ts +1 -0
  11. package/dist/cjs/components/ActionSheet/ActionSheet.js +2 -9
  12. package/dist/cjs/components/ActionSheet/ActionSheet.js.map +1 -1
  13. package/dist/cjs/components/Calendar/Calendar.d.ts +1 -1
  14. package/dist/cjs/components/Calendar/Calendar.js +6 -2
  15. package/dist/cjs/components/Calendar/Calendar.js.map +1 -1
  16. package/dist/cjs/components/CalendarHeader/CalendarHeader.d.ts +2 -0
  17. package/dist/cjs/components/CalendarHeader/CalendarHeader.js +15 -9
  18. package/dist/cjs/components/CalendarHeader/CalendarHeader.js.map +1 -1
  19. package/dist/cjs/components/CalendarRange/CalendarRange.d.ts +1 -1
  20. package/dist/cjs/components/CalendarRange/CalendarRange.js +7 -3
  21. package/dist/cjs/components/CalendarRange/CalendarRange.js.map +1 -1
  22. package/dist/cjs/components/DateInput/DateInput.d.ts +1 -1
  23. package/dist/cjs/components/DateInput/DateInput.js +7 -3
  24. package/dist/cjs/components/DateInput/DateInput.js.map +1 -1
  25. package/dist/cjs/components/DateRangeInput/DateRangeInput.d.ts +1 -1
  26. package/dist/cjs/components/DateRangeInput/DateRangeInput.js +6 -2
  27. package/dist/cjs/components/DateRangeInput/DateRangeInput.js.map +1 -1
  28. package/dist/cjs/components/ModalCard/ModalCard.js +3 -1
  29. package/dist/cjs/components/ModalCard/ModalCard.js.map +1 -1
  30. package/dist/cjs/components/ModalCardBase/ModalCardBase.js +4 -2
  31. package/dist/cjs/components/ModalCardBase/ModalCardBase.js.map +1 -1
  32. package/dist/cjs/components/ModalPage/ModalPage.js +6 -2
  33. package/dist/cjs/components/ModalPage/ModalPage.js.map +1 -1
  34. package/dist/cjs/components/ModalPageHeader/ModalPageHeader.js +2 -10
  35. package/dist/cjs/components/ModalPageHeader/ModalPageHeader.js.map +1 -1
  36. package/dist/cjs/components/ModalRoot/ModalRootAdaptive.js +3 -4
  37. package/dist/cjs/components/ModalRoot/ModalRootAdaptive.js.map +1 -1
  38. package/dist/cjs/components/PanelHeader/PanelHeader.js +8 -6
  39. package/dist/cjs/components/PanelHeader/PanelHeader.js.map +1 -1
  40. package/dist/cjs/components/PopoutRoot/PopoutRoot.js +3 -1
  41. package/dist/cjs/components/PopoutRoot/PopoutRoot.js.map +1 -1
  42. package/dist/cjs/hooks/useAdaptivity.d.ts +1 -0
  43. package/dist/cjs/hooks/useAdaptivity.js +18 -1
  44. package/dist/cjs/hooks/useAdaptivity.js.map +1 -1
  45. package/dist/cjs/index.d.ts +1 -0
  46. package/dist/cjs/index.js +8 -0
  47. package/dist/cjs/index.js.map +1 -1
  48. package/dist/components/ActionSheet/ActionSheet.js +2 -8
  49. package/dist/components/ActionSheet/ActionSheet.js.map +1 -1
  50. package/dist/components/Calendar/Calendar.d.ts +1 -1
  51. package/dist/components/Calendar/Calendar.js +6 -2
  52. package/dist/components/Calendar/Calendar.js.map +1 -1
  53. package/dist/components/CalendarHeader/CalendarHeader.d.ts +2 -0
  54. package/dist/components/CalendarHeader/CalendarHeader.js +15 -9
  55. package/dist/components/CalendarHeader/CalendarHeader.js.map +1 -1
  56. package/dist/components/CalendarRange/CalendarRange.d.ts +1 -1
  57. package/dist/components/CalendarRange/CalendarRange.js +7 -3
  58. package/dist/components/CalendarRange/CalendarRange.js.map +1 -1
  59. package/dist/components/DateInput/DateInput.d.ts +1 -1
  60. package/dist/components/DateInput/DateInput.js +7 -3
  61. package/dist/components/DateInput/DateInput.js.map +1 -1
  62. package/dist/components/DateRangeInput/DateRangeInput.d.ts +1 -1
  63. package/dist/components/DateRangeInput/DateRangeInput.js +6 -2
  64. package/dist/components/DateRangeInput/DateRangeInput.js.map +1 -1
  65. package/dist/components/ModalCard/ModalCard.js +3 -2
  66. package/dist/components/ModalCard/ModalCard.js.map +1 -1
  67. package/dist/components/ModalCardBase/ModalCardBase.js +5 -4
  68. package/dist/components/ModalCardBase/ModalCardBase.js.map +1 -1
  69. package/dist/components/ModalPage/ModalPage.js +5 -3
  70. package/dist/components/ModalPage/ModalPage.js.map +1 -1
  71. package/dist/components/ModalPageHeader/ModalPageHeader.js +2 -9
  72. package/dist/components/ModalPageHeader/ModalPageHeader.js.map +1 -1
  73. package/dist/components/ModalRoot/ModalRootAdaptive.js +3 -5
  74. package/dist/components/ModalRoot/ModalRootAdaptive.js.map +1 -1
  75. package/dist/components/PanelHeader/PanelHeader.js +8 -6
  76. package/dist/components/PanelHeader/PanelHeader.js.map +1 -1
  77. package/dist/components/PopoutRoot/PopoutRoot.js +3 -2
  78. package/dist/components/PopoutRoot/PopoutRoot.js.map +1 -1
  79. package/dist/components.css +18 -18
  80. package/dist/components.css.map +1 -1
  81. package/dist/cssm/components/ActionSheet/ActionSheet.js +2 -8
  82. package/dist/cssm/components/ActionSheet/ActionSheet.js.map +1 -1
  83. package/dist/cssm/components/Button/Button.css +9 -9
  84. package/dist/cssm/components/ButtonGroup/ButtonGroup.css +1 -1
  85. package/dist/cssm/components/Calendar/Calendar.css +1 -1
  86. package/dist/cssm/components/Calendar/Calendar.d.ts +1 -1
  87. package/dist/cssm/components/Calendar/Calendar.js +6 -2
  88. package/dist/cssm/components/Calendar/Calendar.js.map +1 -1
  89. package/dist/cssm/components/CalendarDay/CalendarDay.css +1 -1
  90. package/dist/cssm/components/CalendarDays/CalendarDays.css +1 -1
  91. package/dist/cssm/components/CalendarHeader/CalendarHeader.css +1 -1
  92. package/dist/cssm/components/CalendarHeader/CalendarHeader.d.ts +2 -0
  93. package/dist/cssm/components/CalendarHeader/CalendarHeader.js +15 -9
  94. package/dist/cssm/components/CalendarHeader/CalendarHeader.js.map +1 -1
  95. package/dist/cssm/components/CalendarRange/CalendarRange.css +1 -1
  96. package/dist/cssm/components/CalendarRange/CalendarRange.d.ts +1 -1
  97. package/dist/cssm/components/CalendarRange/CalendarRange.js +7 -3
  98. package/dist/cssm/components/CalendarRange/CalendarRange.js.map +1 -1
  99. package/dist/cssm/components/CalendarTime/CalendarTime.css +1 -1
  100. package/dist/cssm/components/Card/Card.css +2 -2
  101. package/dist/cssm/components/CardScroll/CardScroll.css +1 -1
  102. package/dist/cssm/components/Cell/Cell.css +1 -1
  103. package/dist/cssm/components/CellButton/CellButton.css +1 -1
  104. package/dist/cssm/components/Checkbox/Checkbox.css +1 -1
  105. package/dist/cssm/components/ChipsInput/ChipsInput.css +1 -1
  106. package/dist/cssm/components/CustomSelectDropdown/CustomSelectDropdown.css +1 -1
  107. package/dist/cssm/components/CustomSelectOption/CustomSelectOption.css +1 -1
  108. package/dist/cssm/components/DateInput/DateInput.d.ts +1 -1
  109. package/dist/cssm/components/DateInput/DateInput.js +7 -3
  110. package/dist/cssm/components/DateInput/DateInput.js.map +1 -1
  111. package/dist/cssm/components/DateRangeInput/DateRangeInput.d.ts +1 -1
  112. package/dist/cssm/components/DateRangeInput/DateRangeInput.js +6 -2
  113. package/dist/cssm/components/DateRangeInput/DateRangeInput.js.map +1 -1
  114. package/dist/cssm/components/FixedLayout/FixedLayout.css +1 -1
  115. package/dist/cssm/components/FormField/FormField.css +2 -2
  116. package/dist/cssm/components/FormLayoutGroup/FormLayoutGroup.css +1 -1
  117. package/dist/cssm/components/HorizontalScroll/HorizontalScrollArrow.css +1 -1
  118. package/dist/cssm/components/Input/Input.css +1 -1
  119. package/dist/cssm/components/InputLike/InputLike.css +1 -1
  120. package/dist/cssm/components/InputLike/InputLikeDivider.css +1 -1
  121. package/dist/cssm/components/ModalCard/ModalCard.js +3 -2
  122. package/dist/cssm/components/ModalCard/ModalCard.js.map +1 -1
  123. package/dist/cssm/components/ModalCardBase/ModalCardBase.js +5 -4
  124. package/dist/cssm/components/ModalCardBase/ModalCardBase.js.map +1 -1
  125. package/dist/cssm/components/ModalPage/ModalPage.js +5 -3
  126. package/dist/cssm/components/ModalPage/ModalPage.js.map +1 -1
  127. package/dist/cssm/components/ModalPageHeader/ModalPageHeader.js +2 -9
  128. package/dist/cssm/components/ModalPageHeader/ModalPageHeader.js.map +1 -1
  129. package/dist/cssm/components/ModalRoot/ModalRootAdaptive.js +3 -5
  130. package/dist/cssm/components/ModalRoot/ModalRootAdaptive.js.map +1 -1
  131. package/dist/cssm/components/Pagination/Pagination.css +1 -1
  132. package/dist/cssm/components/PanelHeader/PanelHeader.js +8 -6
  133. package/dist/cssm/components/PanelHeader/PanelHeader.js.map +1 -1
  134. package/dist/cssm/components/PopoutRoot/PopoutRoot.js +3 -2
  135. package/dist/cssm/components/PopoutRoot/PopoutRoot.js.map +1 -1
  136. package/dist/cssm/components/Popper/Popper.css +1 -1
  137. package/dist/cssm/components/Radio/Radio.css +1 -1
  138. package/dist/cssm/components/RadioGroup/RadioGroup.css +1 -1
  139. package/dist/cssm/components/Removable/Removable.css +1 -1
  140. package/dist/cssm/components/RichCell/RichCell.css +1 -1
  141. package/dist/cssm/components/SegmentedControl/SegmentedControl.css +1 -1
  142. package/dist/cssm/components/SegmentedControl/SegmentedControlOption/SegmentedControlOption.css +1 -1
  143. package/dist/cssm/components/SimpleCell/SimpleCell.css +1 -1
  144. package/dist/cssm/components/Typography/Caption/Caption.css +1 -1
  145. package/dist/cssm/components/Typography/Paragraph/Paragraph.css +1 -1
  146. package/dist/cssm/components/Typography/Subhead/Subhead.css +1 -1
  147. package/dist/cssm/components/Typography/Title/Title.css +1 -1
  148. package/dist/cssm/hooks/useAdaptivity.d.ts +1 -0
  149. package/dist/cssm/hooks/useAdaptivity.js +13 -1
  150. package/dist/cssm/hooks/useAdaptivity.js.map +1 -1
  151. package/dist/cssm/index.d.ts +1 -0
  152. package/dist/cssm/index.js +1 -0
  153. package/dist/cssm/index.js.map +1 -1
  154. package/dist/cssm/styles/components.css +18 -18
  155. package/dist/cssm/styles/themes.css +1 -1
  156. package/dist/hooks/useAdaptivity.d.ts +1 -0
  157. package/dist/hooks/useAdaptivity.js +13 -1
  158. package/dist/hooks/useAdaptivity.js.map +1 -1
  159. package/dist/index.d.ts +1 -0
  160. package/dist/index.js +1 -0
  161. package/dist/index.js.map +1 -1
  162. package/dist/vkui.css +19 -19
  163. package/dist/vkui.css.map +1 -1
  164. package/jest.unit.config.js +1 -0
  165. package/package.json +4 -2
  166. package/postcss-custom-properties-fallback/__tests__/custom_properties.css +5 -0
  167. package/postcss-custom-properties-fallback/index.js +83 -0
  168. package/src/components/ActionSheet/ActionSheet.tsx +2 -6
  169. package/src/components/Calendar/Calendar.tsx +6 -0
  170. package/src/components/CalendarHeader/CalendarHeader.css +3 -0
  171. package/src/components/CalendarHeader/CalendarHeader.tsx +18 -2
  172. package/src/components/CalendarRange/CalendarRange.tsx +6 -0
  173. package/src/components/Cell/Cell.css +1 -1
  174. package/src/components/CellButton/CellButton.css +1 -1
  175. package/src/components/Checkbox/Checkbox.css +1 -1
  176. package/src/components/DateInput/DateInput.tsx +7 -1
  177. package/src/components/DateRangeInput/DateRangeInput.tsx +6 -0
  178. package/src/components/FixedLayout/FixedLayout.css +10 -2
  179. package/src/components/FormItem/FormItem.css +1 -0
  180. package/src/components/FormLayoutGroup/FormLayoutGroup.css +2 -1
  181. package/src/components/ModalCard/ModalCard.tsx +3 -8
  182. package/src/components/ModalCardBase/ModalCardBase.tsx +6 -10
  183. package/src/components/ModalPage/ModalPage.tsx +6 -9
  184. package/src/components/ModalPageHeader/ModalPageHeader.tsx +2 -6
  185. package/src/components/ModalRoot/ModalRootAdaptive.tsx +3 -9
  186. package/src/components/ModalRoot/Readme.md +1 -1
  187. package/src/components/PanelHeader/PanelHeader.tsx +19 -18
  188. package/src/components/PanelHeader/Readme.md +2 -2
  189. package/src/components/PopoutRoot/PopoutRoot.tsx +3 -8
  190. package/src/components/Popper/Popper.css +14 -2
  191. package/src/components/Radio/Radio.css +1 -1
  192. package/src/components/RadioGroup/RadioGroup.css +1 -1
  193. package/src/components/Removable/Removable.css +2 -2
  194. package/src/components/RichCell/RichCell.css +1 -1
  195. package/src/components/SimpleCell/SimpleCell.css +1 -1
  196. package/src/components/Tooltip/Readme.md +35 -47
  197. package/src/hooks/useAdaptivity.ts +15 -0
  198. package/src/index.ts +1 -0
  199. package/src/styles/constants.css +1 -0
  200. package/tsconfig.json +1 -0
@@ -8,12 +8,14 @@ import { classNames } from "../../lib/classNames";
8
8
  import { ModalRootContext, useModalRegistry } from "../ModalRoot/ModalRootContext";
9
9
  import { usePlatform } from "../../hooks/usePlatform";
10
10
  import { useOrientationChange } from "../../hooks/useOrientationChange";
11
- import { withAdaptivity, ViewHeight, ViewWidth } from "../../hoc/withAdaptivity";
11
+ import { withAdaptivity, ViewWidth } from "../../hoc/withAdaptivity";
12
12
  import ModalDismissButton from "../ModalDismissButton/ModalDismissButton";
13
13
  import { multiRef } from "../../lib/utils";
14
14
  import { ModalType } from "../ModalRoot/types";
15
15
  import { getNavId } from "../../lib/getNavId";
16
16
  import { warnOnce } from "../../lib/warnOnce";
17
+ import { Platform } from "../../lib/platform";
18
+ import { useAdaptivityIsDesktop } from "../../hooks/useAdaptivity";
17
19
  import "./ModalPage.css";
18
20
  var warn = warnOnce("ModalPage");
19
21
 
@@ -40,8 +42,8 @@ var ModalPage = function ModalPage(props) {
40
42
  var platform = usePlatform();
41
43
  var orientation = useOrientationChange();
42
44
  React.useEffect(updateModalHeight, [children, orientation, updateModalHeight]);
43
- var isDesktop = viewWidth >= ViewWidth.SMALL_TABLET && (hasMouse || viewHeight >= ViewHeight.MEDIUM);
44
- var canShowCloseBtn = viewWidth >= ViewWidth.SMALL_TABLET;
45
+ var isDesktop = useAdaptivityIsDesktop();
46
+ var canShowCloseBtn = viewWidth >= ViewWidth.SMALL_TABLET || platform === Platform.VKCOM;
45
47
  var modalContext = React.useContext(ModalRootContext);
46
48
 
47
49
  var _useModalRegistry = useModalRegistry(getNavId(props, warn), ModalType.PAGE),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/ModalPage/ModalPage.tsx"],"names":["React","getClassName","classNames","ModalRootContext","useModalRegistry","usePlatform","useOrientationChange","withAdaptivity","ViewHeight","ViewWidth","ModalDismissButton","multiRef","ModalType","getNavId","warnOnce","warn","ModalPage","props","useContext","updateModalHeight","children","header","viewWidth","viewHeight","sizeX","hasMouse","onOpen","onOpened","onClose","onClosed","settlingHeight","dynamicContentHeight","getModalContentRef","nav","restProps","platform","orientation","useEffect","isDesktop","SMALL_TABLET","MEDIUM","canShowCloseBtn","modalContext","PAGE","refs","innerElement","headerElement","contentElement","defaultProps"],"mappings":";;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,YAAT;AACA,SAASC,UAAT;AACA,SACEC,gBADF,EAEEC,gBAFF;AAIA,SAASC,WAAT;AACA,SAASC,oBAAT;AACA,SACEC,cADF,EAEEC,UAFF,EAGEC,SAHF;AASA,OAAOC,kBAAP;AACA,SAASC,QAAT;AACA,SAASC,SAAT;AACA,SAASC,QAAT;AACA,SAASC,QAAT;AACA;AAqCA,IAAMC,IAAI,GAAGD,QAAQ,CAAC,WAAD,CAArB;;AACA,IAAME,SAAgE,GAAG,SAAnEA,SAAmE,CACvEC,KADuE,EAEpE;AACH,0BAA8BjB,KAAK,CAACkB,UAAN,CAAiBf,gBAAjB,CAA9B;AAAA,MAAQgB,iBAAR,qBAAQA,iBAAR;;AAEA,MACEC,QADF,GAgBIH,KAhBJ,CACEG,QADF;AAAA,MAEEC,MAFF,GAgBIJ,KAhBJ,CA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;AAEA,SACE,wCACMV,SADN;AAEE;AACA,IAAA,SAAS,EAAEhC,UAAU,CACnBD,YAAY,CAAC,WAAD,EAAckC,QAAd,CADO,6BAECX,KAFD,GAGnB;AACE,4BAAsBc;AADxB,KAHmB;AAHvB,MAWE;AAAK,IAAA,SAAS,EAAC,oBAAf;AAAoC,IAAA,GAAG,EAAEM,IAAI,CAACC;AAA9C,KACE;AAAK,IAAA,SAAS,EAAC;AAAf,KACE;AAAK,IAAA,SAAS,EAAC,mBAAf;AAAmC,IAAA,GAAG,EAAED,IAAI,CAACE;AAA7C,KACGzB,MADH,CADF,EAKE;AAAK,IAAA,SAAS,EAAC;AAAf,KACE;AACE,IAAA,SAAS,EAAC,oBADZ;AAEE,IAAA,GAAG,EAAEV,QAAQ,CACXiC,IAAI,CAACG,cADM,EAEXf,kBAFW;AAFf,KAOE;AAAK,IAAA,SAAS,EAAC;AAAf,KAAwCZ,QAAxC,CAPF,CADF,CALF,EAgBGqB,eAAe,IACd,oBAAC,kBAAD;AAAoB,IAAA,OAAO,EAAEb,OAAO,IAAIc,YAAY,CAACd;AAArD,IAjBJ,CADF,CAXF,CADF;AAoCD,CA5ED;;AA8EAZ,SAAS,CAACgC,YAAV,GAAyB;AACvBlB,EAAAA,cAAc,EAAE;AADO,CAAzB,C,CAIA;;AACA,eAAevB,cAAc,CAACS,SAAD,EAAY;AACvCM,EAAAA,SAAS,EAAE,IAD4B;AAEvCC,EAAAA,UAAU,EAAE,IAF2B;AAGvCC,EAAAA,KAAK,EAAE,IAHgC;AAIvCC,EAAAA,QAAQ,EAAE;AAJ6B,CAAZ,CAA7B","sourcesContent":["import * as React from \"react\";\nimport { getClassName } from \"../../helpers/getClassName\";\nimport { classNames } from \"../../lib/classNames\";\nimport {\n ModalRootContext,\n useModalRegistry,\n} from \"../ModalRoot/ModalRootContext\";\nimport { usePlatform } from \"../../hooks/usePlatform\";\nimport { useOrientationChange } from \"../../hooks/useOrientationChange\";\nimport {\n withAdaptivity,\n ViewHeight,\n ViewWidth,\n} from \"../../hoc/withAdaptivity\";\nimport {\n AdaptivityContextInterface,\n AdaptivityProps,\n} from \"../AdaptivityProvider/AdaptivityContext\";\nimport ModalDismissButton from \"../ModalDismissButton/ModalDismissButton\";\nimport { multiRef } from \"../../lib/utils\";\nimport { ModalType } from \"../ModalRoot/types\";\nimport { getNavId, NavIdProps } from \"../../lib/getNavId\";\nimport { warnOnce } from \"../../lib/warnOnce\";\nimport \"./ModalPage.css\";\n\nexport interface ModalPageProps\n extends React.HTMLAttributes<HTMLDivElement>,\n AdaptivityProps,\n NavIdProps {\n /**\n * Шапка модальной страницы, `<ModalPageHeader />`\n */\n header?: React.ReactNode;\n /**\n * Будет вызвано при начале открытия модалки.\n */\n onOpen?: VoidFunction;\n /**\n * Будет вызвано при окончательном открытии модалки.\n */\n onOpened?: VoidFunction;\n /**\n * Будет вызвано при начале закрытия модалки.\n */\n onClose?: VoidFunction;\n /**\n * Будет вызвано при окончательном закрытии модалки.\n */\n onClosed?: VoidFunction;\n /**\n * Процент, на который изначально будет открыта модальная страница. При `settlingHeight={100}` модальная страница раскрывается на всю высоту.\n */\n settlingHeight?: number;\n /**\n * Если высота контента в модальной странице может поменяться, нужно установить это свойство\n */\n dynamicContentHeight?: boolean;\n getModalContentRef?: React.Ref<HTMLDivElement>;\n}\n\nconst warn = warnOnce(\"ModalPage\");\nconst ModalPage: React.FC<ModalPageProps & AdaptivityContextInterface> = (\n props\n) => {\n const { updateModalHeight } = React.useContext(ModalRootContext);\n\n const {\n children,\n header,\n viewWidth,\n viewHeight,\n sizeX,\n hasMouse,\n onOpen,\n onOpened,\n onClose,\n onClosed,\n settlingHeight,\n dynamicContentHeight,\n getModalContentRef,\n nav,\n ...restProps\n } = props;\n\n const platform = usePlatform();\n const orientation = useOrientationChange();\n\n React.useEffect(updateModalHeight, [\n children,\n orientation,\n updateModalHeight,\n ]);\n\n const isDesktop =\n viewWidth >= ViewWidth.SMALL_TABLET &&\n (hasMouse || viewHeight >= ViewHeight.MEDIUM);\n const canShowCloseBtn = viewWidth >= ViewWidth.SMALL_TABLET;\n\n const modalContext = React.useContext(ModalRootContext);\n const { refs } = useModalRegistry(getNavId(props, warn), ModalType.PAGE);\n\n return (\n <div\n {...restProps}\n // eslint-disable-next-line vkui/no-object-expression-in-arguments\n vkuiClass={classNames(\n getClassName(\"ModalPage\", platform),\n `ModalPage--sizeX-${sizeX}`,\n {\n \"ModalPage--desktop\": isDesktop,\n }\n )}\n >\n <div vkuiClass=\"ModalPage__in-wrap\" ref={refs.innerElement}>\n <div vkuiClass=\"ModalPage__in\">\n <div vkuiClass=\"ModalPage__header\" ref={refs.headerElement}>\n {header}\n </div>\n\n <div vkuiClass=\"ModalPage__content-wrap\">\n <div\n vkuiClass=\"ModalPage__content\"\n ref={multiRef<HTMLDivElement>(\n refs.contentElement,\n getModalContentRef\n )}\n >\n <div vkuiClass=\"ModalPage__content-in\">{children}</div>\n </div>\n </div>\n {canShowCloseBtn && (\n <ModalDismissButton onClick={onClose || modalContext.onClose} />\n )}\n </div>\n </div>\n </div>\n );\n};\n\nModalPage.defaultProps = {\n settlingHeight: 75,\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default withAdaptivity(ModalPage, {\n viewWidth: true,\n viewHeight: true,\n sizeX: true,\n hasMouse: true,\n});\n"],"file":"ModalPage.js"}
1
+ {"version":3,"sources":["../../../../src/components/ModalPage/ModalPage.tsx"],"names":["React","getClassName","classNames","ModalRootContext","useModalRegistry","usePlatform","useOrientationChange","withAdaptivity","ViewWidth","ModalDismissButton","multiRef","ModalType","getNavId","warnOnce","Platform","useAdaptivityIsDesktop","warn","ModalPage","props","useContext","updateModalHeight","children","header","viewWidth","viewHeight","sizeX","hasMouse","onOpen","onOpened","onClose","onClosed","settlingHeight","dynamicContentHeight","getModalContentRef","nav","restProps","platform","orientation","useEffect","isDesktop","canShowCloseBtn","SMALL_TABLET","VKCOM","modalContext","PAGE","refs","innerElement","headerElement","contentElement","defaultProps"],"mappings":";;;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O,IAAIc,YAAY,CAACd;AAArD,IAjBJ,CADF,CAXF,CADF;AAoCD,CA3ED;;AA6EAZ,SAAS,CAACgC,YAAV,GAAyB;AACvBlB,EAAAA,cAAc,EAAE;AADO,CAAzB,C,CAIA;;AACA,eAAexB,cAAc,CAACU,SAAD,EAAY;AACvCM,EAAAA,SAAS,EAAE,IAD4B;AAEvCC,EAAAA,UAAU,EAAE,IAF2B;AAGvCC,EAAAA,KAAK,EAAE,IAHgC;AAIvCC,EAAAA,QAAQ,EAAE;AAJ6B,CAAZ,CAA7B","sourcesContent":["import * as React from \"react\";\nimport { getClassName } from \"../../helpers/getClassName\";\nimport { classNames } from \"../../lib/classNames\";\nimport {\n ModalRootContext,\n useModalRegistry,\n} from \"../ModalRoot/ModalRootContext\";\nimport { usePlatform } from \"../../hooks/usePlatform\";\nimport { useOrientationChange } from \"../../hooks/useOrientationChange\";\nimport { withAdaptivity, ViewWidth } from \"../../hoc/withAdaptivity\";\nimport {\n AdaptivityContextInterface,\n AdaptivityProps,\n} from \"../AdaptivityProvider/AdaptivityContext\";\nimport ModalDismissButton from \"../ModalDismissButton/ModalDismissButton\";\nimport { multiRef } from \"../../lib/utils\";\nimport { ModalType } from \"../ModalRoot/types\";\nimport { getNavId, NavIdProps } from \"../../lib/getNavId\";\nimport { warnOnce } from \"../../lib/warnOnce\";\nimport { Platform } from \"../../lib/platform\";\nimport { useAdaptivityIsDesktop } from \"../../hooks/useAdaptivity\";\nimport \"./ModalPage.css\";\n\nexport interface ModalPageProps\n extends React.HTMLAttributes<HTMLDivElement>,\n AdaptivityProps,\n NavIdProps {\n /**\n * Шапка модальной страницы, `<ModalPageHeader />`\n */\n header?: React.ReactNode;\n /**\n * Будет вызвано при начале открытия модалки.\n */\n onOpen?: VoidFunction;\n /**\n * Будет вызвано при окончательном открытии модалки.\n */\n onOpened?: VoidFunction;\n /**\n * Будет вызвано при начале закрытия модалки.\n */\n onClose?: VoidFunction;\n /**\n * Будет вызвано при окончательном закрытии модалки.\n */\n onClosed?: VoidFunction;\n /**\n * Процент, на который изначально будет открыта модальная страница. При `settlingHeight={100}` модальная страница раскрывается на всю высоту.\n */\n settlingHeight?: number;\n /**\n * Если высота контента в модальной странице может поменяться, нужно установить это свойство\n */\n dynamicContentHeight?: boolean;\n getModalContentRef?: React.Ref<HTMLDivElement>;\n}\n\nconst warn = warnOnce(\"ModalPage\");\nconst ModalPage: React.FC<ModalPageProps & AdaptivityContextInterface> = (\n props\n) => {\n const { updateModalHeight } = React.useContext(ModalRootContext);\n\n const {\n children,\n header,\n viewWidth,\n viewHeight,\n sizeX,\n hasMouse,\n onOpen,\n onOpened,\n onClose,\n onClosed,\n settlingHeight,\n dynamicContentHeight,\n getModalContentRef,\n nav,\n ...restProps\n } = props;\n\n const platform = usePlatform();\n const orientation = useOrientationChange();\n\n React.useEffect(updateModalHeight, [\n children,\n orientation,\n updateModalHeight,\n ]);\n\n const isDesktop = useAdaptivityIsDesktop();\n const canShowCloseBtn =\n viewWidth >= ViewWidth.SMALL_TABLET || platform === Platform.VKCOM;\n\n const modalContext = React.useContext(ModalRootContext);\n const { refs } = useModalRegistry(getNavId(props, warn), ModalType.PAGE);\n\n return (\n <div\n {...restProps}\n // eslint-disable-next-line vkui/no-object-expression-in-arguments\n vkuiClass={classNames(\n getClassName(\"ModalPage\", platform),\n `ModalPage--sizeX-${sizeX}`,\n {\n \"ModalPage--desktop\": isDesktop,\n }\n )}\n >\n <div vkuiClass=\"ModalPage__in-wrap\" ref={refs.innerElement}>\n <div vkuiClass=\"ModalPage__in\">\n <div vkuiClass=\"ModalPage__header\" ref={refs.headerElement}>\n {header}\n </div>\n\n <div vkuiClass=\"ModalPage__content-wrap\">\n <div\n vkuiClass=\"ModalPage__content\"\n ref={multiRef<HTMLDivElement>(\n refs.contentElement,\n getModalContentRef\n )}\n >\n <div vkuiClass=\"ModalPage__content-in\">{children}</div>\n </div>\n </div>\n {canShowCloseBtn && (\n <ModalDismissButton onClick={onClose || modalContext.onClose} />\n )}\n </div>\n </div>\n </div>\n );\n};\n\nModalPage.defaultProps = {\n settlingHeight: 75,\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default withAdaptivity(ModalPage, {\n viewWidth: true,\n viewHeight: true,\n sizeX: true,\n hasMouse: true,\n});\n"],"file":"ModalPage.js"}
@@ -6,10 +6,9 @@ import { usePlatform } from "../../hooks/usePlatform";
6
6
  import { VKCOM } from "../../lib/platform";
7
7
  import PanelHeader from "../PanelHeader/PanelHeader";
8
8
  import Separator from "../Separator/Separator";
9
- import { useAdaptivity } from "../../hooks/useAdaptivity";
9
+ import { useAdaptivityIsDesktop } from "../../hooks/useAdaptivity";
10
10
  import { classNames } from "../../lib/classNames";
11
11
  import { getClassName } from "../../helpers/getClassName";
12
- import { ViewHeight, ViewWidth } from "../AdaptivityProvider/AdaptivityContext";
13
12
  import "./ModalPageHeader.css";
14
13
 
15
14
  var ModalPageHeader = function ModalPageHeader(_ref) {
@@ -19,14 +18,8 @@ var ModalPageHeader = function ModalPageHeader(_ref) {
19
18
  restProps = _objectWithoutProperties(_ref, _excluded);
20
19
 
21
20
  var platform = usePlatform();
22
-
23
- var _useAdaptivity = useAdaptivity(),
24
- viewWidth = _useAdaptivity.viewWidth,
25
- viewHeight = _useAdaptivity.viewHeight,
26
- hasMouse = _useAdaptivity.hasMouse;
27
-
28
21
  var hasSeparator = separator && platform === VKCOM;
29
- var isDesktop = viewWidth >= ViewWidth.SMALL_TABLET && (hasMouse || viewHeight >= ViewHeight.MEDIUM);
22
+ var isDesktop = useAdaptivityIsDesktop();
30
23
  return createScopedElement("div", {
31
24
  // eslint-disable-next-line vkui/no-object-expression-in-arguments
32
25
  vkuiClass: classNames(getClassName("ModalPageHeader", platform), {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/ModalPageHeader/ModalPageHeader.tsx"],"names":["usePlatform","VKCOM","PanelHeader","Separator","useAdaptivity","classNames","getClassName","ViewHeight","ViewWidth","ModalPageHeader","children","separator","getRef","restProps","platform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;AAC7BX,EAAAA,SAAS,EAAE;AADkB,CAA/B,C,CAIA;;AACA,eAAeF,eAAf","sourcesContent":["import * as React from \"react\";\nimport { usePlatform } from \"../../hooks/usePlatform\";\nimport { HasRef } from \"../../types\";\nimport { VKCOM } from \"../../lib/platform\";\nimport PanelHeader, { PanelHeaderProps } from \"../PanelHeader/PanelHeader\";\nimport Separator from \"../Separator/Separator\";\nimport { useAdaptivity } from \"../../hooks/useAdaptivity\";\nimport { classNames } from \"../../lib/classNames\";\nimport { getClassName } from \"../../helpers/getClassName\";\nimport { ViewHeight, ViewWidth } from \"../AdaptivityProvider/AdaptivityContext\";\nimport \"./ModalPageHeader.css\";\n\nexport interface ModalPageHeaderProps\n extends React.HTMLAttributes<HTMLDivElement>,\n Omit<PanelHeaderProps, \"fixed\" | \"shadow\">,\n HasRef<HTMLDivElement> {}\n\nconst ModalPageHeader: React.FunctionComponent<ModalPageHeaderProps> = ({\n children,\n separator,\n getRef,\n ...restProps\n}: ModalPageHeaderProps) => {\n const platform = usePlatform();\n const { viewWidth, viewHeight, hasMouse } = useAdaptivity();\n const hasSeparator = separator && platform === VKCOM;\n const isDesktop =\n viewWidth >= ViewWidth.SMALL_TABLET &&\n (hasMouse || viewHeight >= ViewHeight.MEDIUM);\n\n return (\n <div\n // eslint-disable-next-line vkui/no-object-expression-in-arguments\n vkuiClass={classNames(getClassName(\"ModalPageHeader\", platform), {\n \"ModalPageHeader--desktop\": isDesktop,\n })}\n ref={getRef}\n >\n <PanelHeader\n vkuiClass=\"ModalPageHeader__in\"\n {...restProps}\n fixed={false}\n separator={false}\n transparent\n >\n {children}\n </PanelHeader>\n {hasSeparator && <Separator wide />}\n </div>\n );\n};\n\nModalPageHeader.defaultProps = {\n separator: true,\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default ModalPageHeader;\n"],"file":"ModalPageHeader.js"}
1
+ {"version":3,"sources":["../../../../src/components/ModalPageHeader/ModalPageHeader.tsx"],"names":["usePlatform","VKCOM","PanelHeader","Separator","useAdaptivityIsDesktop","classNames","getClassName","ModalPageHeader","children","separator","getRef","restProps","platform","hasSeparator","isDesktop","defaultProps"],"mappings":";;;;AACA,SAASA,WAAT;AAEA,SAASC,KAAT;AACA,OAAOC,WAAP;AACA,OAAOC,SAAP;AACA,SAASC,sBAAT;AACA,SAASC,UAAT;AACA,SAASC,YAAT;AACA;;AAOA,IAAMC,eAA8D,GAAG,SAAjEA,eAAiE,OAK3C;AAAA,MAJ1BC,QAI0B,QAJ1BA,QAI0B;AAAA,MAH1BC,SAG0B,QAH1BA,SAG0B;AAAA,MAF1BC,MAE0B,QAF1BA,MAE0B;AAAA,MADvBC,SACuB;;AAC1B,MAAMC,QAAQ,GAAGZ,WAAW,EAA5B;AACA,MAAMa,YAAY,GAAGJ,SAAS,IAAIG,QAAQ,KAAKX,KAA/C;AACA,MAAMa,SAAS,GAAGV,sBAAsB,EAAxC;AAEA,SACE;AACE;AACA,IAAA,SAAS,EAAEC,UAAU,CAACC,YAAY,CAAC,iBAAD,EAAoBM,QAApB,CAAb,EAA4C;AAC/D,kCAA4BE;AADmC,KAA5C,CAFvB;AAKE,IAAA,GAAG,EAAEJ;AALP,KAOE,oBAAC,WAAD;AACE,IAAA,SAAS,EAAC;AADZ,KAEMC,SAFN;AAGE,IAAA,KAAK,EAAE,KAHT;AAIE,IAAA,SAAS,EAAE,KAJb;AAKE,IAAA,WAAW;AALb,MAOGH,QAPH,CAPF,EAgBGK,YAAY,IAAI,oBAAC,SAAD;AAAW,IAAA,IAAI;AAAf,IAhBnB,CADF;AAoBD,CA9BD;;AAgCAN,eAAe,CAACQ,YAAhB,GAA+B;AAC7BN,EAAAA,SAAS,EAAE;AADkB,CAA/B,C,CAIA;;AACA,eAAeF,eAAf","sourcesContent":["import * as React from \"react\";\nimport { usePlatform } from \"../../hooks/usePlatform\";\nimport { HasRef } from \"../../types\";\nimport { VKCOM } from \"../../lib/platform\";\nimport PanelHeader, { PanelHeaderProps } from \"../PanelHeader/PanelHeader\";\nimport Separator from \"../Separator/Separator\";\nimport { useAdaptivityIsDesktop } from \"../../hooks/useAdaptivity\";\nimport { classNames } from \"../../lib/classNames\";\nimport { getClassName } from \"../../helpers/getClassName\";\nimport \"./ModalPageHeader.css\";\n\nexport interface ModalPageHeaderProps\n extends React.HTMLAttributes<HTMLDivElement>,\n Omit<PanelHeaderProps, \"fixed\" | \"shadow\">,\n HasRef<HTMLDivElement> {}\n\nconst ModalPageHeader: React.FunctionComponent<ModalPageHeaderProps> = ({\n children,\n separator,\n getRef,\n ...restProps\n}: ModalPageHeaderProps) => {\n const platform = usePlatform();\n const hasSeparator = separator && platform === VKCOM;\n const isDesktop = useAdaptivityIsDesktop();\n\n return (\n <div\n // eslint-disable-next-line vkui/no-object-expression-in-arguments\n vkuiClass={classNames(getClassName(\"ModalPageHeader\", platform), {\n \"ModalPageHeader--desktop\": isDesktop,\n })}\n ref={getRef}\n >\n <PanelHeader\n vkuiClass=\"ModalPageHeader__in\"\n {...restProps}\n fixed={false}\n separator={false}\n transparent\n >\n {children}\n </PanelHeader>\n {hasSeparator && <Separator wide />}\n </div>\n );\n};\n\nModalPageHeader.defaultProps = {\n separator: true,\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default ModalPageHeader;\n"],"file":"ModalPageHeader.js"}
@@ -1,14 +1,12 @@
1
1
  import { createScopedElement } from "../../lib/jsxRuntime";
2
- import { withAdaptivity, ViewHeight, ViewWidth } from "../../hoc/withAdaptivity";
2
+ import { withAdaptivity } from "../../hoc/withAdaptivity";
3
3
  import { ModalRootTouch } from "./ModalRoot";
4
4
  import { ModalRootDesktop } from "./ModalRootDesktop";
5
5
  import { useScrollLock } from "../AppRoot/ScrollContext";
6
+ import { useAdaptivityIsDesktop } from "../../hooks/useAdaptivity";
6
7
 
7
8
  var ModalRootComponent = function ModalRootComponent(props) {
8
- var viewWidth = props.viewWidth,
9
- viewHeight = props.viewHeight,
10
- hasMouse = props.hasMouse;
11
- var isDesktop = viewWidth >= ViewWidth.SMALL_TABLET && (hasMouse || viewHeight >= ViewHeight.MEDIUM);
9
+ var isDesktop = useAdaptivityIsDesktop();
12
10
  useScrollLock(!!props.activeModal);
13
11
  var RootComponent = isDesktop ? ModalRootDesktop : ModalRootTouch;
14
12
  return createScopedElement(RootComponent, props);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/ModalRoot/ModalRootAdaptive.tsx"],"names":["withAdaptivity","ViewHeight","ViewWidth","ModalRootTouch","ModalRootDesktop","useScrollLock","ModalRootComponent","props","viewWidth","viewHeight","hasMouse","isDesktop","SMALL_TABLET","MEDIUM","activeModal","RootComponent","displayName","ModalRoot"],"mappings":";AACA,SACEA,cADF,EAEEC,UAFF,EAGEC,SAHF;AAKA,SAASC,cAAT;AACA,SAASC,gBAAT;AAKA,SAASC,aAAT;;AA0BA,IAAMC,kBAEL,GAAG,SAFEA,kBAEF,CAACC,KAAD,EAAW;AACb,MAAQC,SAAR,GAA4CD,KAA5C,CAAQC,SAAR;AAAA,MAAmBC,UAAnB,GAA4CF,KAA5C,CAAmBE,UAAnB;AAAA,MAA+BC,QAA/B,GAA4CH,KAA5C,CAA+BG,QAA/B;AACA,MAAMC,SAAS,GACbH,SAAS,IAAIN,SAAS,CAACU,YAAvB,KACCF,QAAQ,IAAID,UAAU,IAAIR,UAAU,CAACY,MADtC,CADF;AAIAR,EAAAA,aAAa,CAAC,CAAC,CAACE,KAAK,CAACO,WAAT,CAAb;AAEA,MAAMC,aAAa,GAAGJ,SAAS,GAAGP,gBAAH,GAAsBD,cAArD;AAEA,SAAO,oBAAC,aAAD,EAAmBI,KAAnB,CAAP;AACD,CAbD;;AAeAD,kBAAkB,CAACU,WAAnB,GAAiC,WAAjC;AAEA,OAAO,IAAMC,SAAS,GAAGjB,cAAc,CAACM,kBAAD,EAAqB;AAC1DE,EAAAA,SAAS,EAAE,IAD+C;AAE1DC,EAAAA,UAAU,EAAE,IAF8C;AAG1DC,EAAAA,QAAQ,EAAE;AAHgD,CAArB,CAAhC","sourcesContent":["import * as React from \"react\";\nimport {\n withAdaptivity,\n ViewHeight,\n ViewWidth,\n} from \"../../hoc/withAdaptivity\";\nimport { ModalRootTouch } from \"./ModalRoot\";\nimport { ModalRootDesktop } from \"./ModalRootDesktop\";\nimport {\n AdaptivityContextInterface,\n AdaptivityProps,\n} from \"../AdaptivityProvider/AdaptivityContext\";\nimport { useScrollLock } from \"../AppRoot/ScrollContext\";\n\nexport interface ModalRootProps extends AdaptivityProps {\n activeModal?: string | null;\n\n /**\n * Будет вызвано при начале открытия активной модалки с её id\n */\n onOpen?(modalId: string): void;\n\n /**\n * Будет вызвано при окончательном открытии активной модалки с её id\n */\n onOpened?(modalId: string): void;\n\n /**\n * Будет вызвано при начале закрытия активной модалки с её id\n */\n onClose?(modalId: string): void;\n\n /**\n * Будет вызвано при окончательном закрытии активной модалки с её id\n */\n onClosed?(modalId: string): void;\n}\n\nconst ModalRootComponent: React.FC<\n ModalRootProps & AdaptivityContextInterface\n> = (props) => {\n const { viewWidth, viewHeight, hasMouse } = props;\n const isDesktop =\n viewWidth >= ViewWidth.SMALL_TABLET &&\n (hasMouse || viewHeight >= ViewHeight.MEDIUM);\n\n useScrollLock(!!props.activeModal);\n\n const RootComponent = isDesktop ? ModalRootDesktop : ModalRootTouch;\n\n return <RootComponent {...props} />;\n};\n\nModalRootComponent.displayName = \"ModalRoot\";\n\nexport const ModalRoot = withAdaptivity(ModalRootComponent, {\n viewWidth: true,\n viewHeight: true,\n hasMouse: true,\n});\n"],"file":"ModalRootAdaptive.js"}
1
+ {"version":3,"sources":["../../../../src/components/ModalRoot/ModalRootAdaptive.tsx"],"names":["withAdaptivity","ModalRootTouch","ModalRootDesktop","useScrollLock","useAdaptivityIsDesktop","ModalRootComponent","props","isDesktop","activeModal","RootComponent","displayName","ModalRoot","viewWidth","viewHeight","hasMouse"],"mappings":";AACA,SAASA,cAAT;AACA,SAASC,cAAT;AACA,SAASC,gBAAT;AAKA,SAASC,aAAT;AACA,SAASC,sBAAT;;AA0BA,IAAMC,kBAEL,GAAG,SAFEA,kBAEF,CAACC,KAAD,EAAW;AACb,MAAMC,SAAS,GAAGH,sBAAsB,EAAxC;AAEAD,EAAAA,aAAa,CAAC,CAAC,CAACG,KAAK,CAACE,WAAT,CAAb;AAEA,MAAMC,aAAa,GAAGF,SAAS,GAAGL,gBAAH,GAAsBD,cAArD;AAEA,SAAO,oBAAC,aAAD,EAAmBK,KAAnB,CAAP;AACD,CAVD;;AAYAD,kBAAkB,CAACK,WAAnB,GAAiC,WAAjC;AAEA,OAAO,IAAMC,SAAS,GAAGX,cAAc,CAACK,kBAAD,EAAqB;AAC1DO,EAAAA,SAAS,EAAE,IAD+C;AAE1DC,EAAAA,UAAU,EAAE,IAF8C;AAG1DC,EAAAA,QAAQ,EAAE;AAHgD,CAArB,CAAhC","sourcesContent":["import * as React from \"react\";\nimport { withAdaptivity } from \"../../hoc/withAdaptivity\";\nimport { ModalRootTouch } from \"./ModalRoot\";\nimport { ModalRootDesktop } from \"./ModalRootDesktop\";\nimport {\n AdaptivityContextInterface,\n AdaptivityProps,\n} from \"../AdaptivityProvider/AdaptivityContext\";\nimport { useScrollLock } from \"../AppRoot/ScrollContext\";\nimport { useAdaptivityIsDesktop } from \"../../hooks/useAdaptivity\";\n\nexport interface ModalRootProps extends AdaptivityProps {\n activeModal?: string | null;\n\n /**\n * Будет вызвано при начале открытия активной модалки с её id\n */\n onOpen?(modalId: string): void;\n\n /**\n * Будет вызвано при окончательном открытии активной модалки с её id\n */\n onOpened?(modalId: string): void;\n\n /**\n * Будет вызвано при начале закрытия активной модалки с её id\n */\n onClose?(modalId: string): void;\n\n /**\n * Будет вызвано при окончательном закрытии активной модалки с её id\n */\n onClosed?(modalId: string): void;\n}\n\nconst ModalRootComponent: React.FC<\n ModalRootProps & AdaptivityContextInterface\n> = (props) => {\n const isDesktop = useAdaptivityIsDesktop();\n\n useScrollLock(!!props.activeModal);\n\n const RootComponent = isDesktop ? ModalRootDesktop : ModalRootTouch;\n\n return <RootComponent {...props} />;\n};\n\nModalRootComponent.displayName = \"ModalRoot\";\n\nexport const ModalRoot = withAdaptivity(ModalRootComponent, {\n viewWidth: true,\n viewHeight: true,\n hasMouse: true,\n});\n"],"file":"ModalRootAdaptive.js"}
@@ -1 +1 @@
1
- .vkuiPagination__list{display:flex;margin:0;padding:0;list-style-type:none}.vkuiPagination__prevButtonContainer{margin-right:8px}.vkuiPagination__nextButtonContainer{margin-left:8px}.vkuiPagination__page{box-sizing:border-box;padding-right:8px;padding-left:8px;width:100%;min-width:40px;border-radius:8px;border-radius:var(--vkui--size_border_radius--regular);text-align:center;color:#818c99;color:var(--vkui--color_text_secondary);-webkit-user-select:none;user-select:none}.vkuiPagination__page--state-hover{background-color:rgba(0,16,61,.04);background-color:var(--vkui--color_transparent--hover)}.vkuiPagination__page--state-active,.vkuiPagination__page--current{color:#000;color:var(--vkui--color_text_primary);background-color:rgba(0,16,61,.08);background-color:var(--vkui--color_transparent--active)}.vkuiPagination__page--disabled{opacity:.4;opacity:var(--vkui--opacity_disable)}.vkuiPagination__page--sizeY-compact{font-size:15px;font-size:var(--vkui--font_text--font_size--compact);line-height:36px;line-height:var(--vkui--size_button_large_height--compact);height:36px;height:var(--vkui--size_button_large_height--compact);letter-spacing:var(--vk-sans-ls-17)}.vkuiPagination__page--sizeY-regular{font-size:16px;font-size:var(--vkui--font_text--font_size--regular);line-height:44px;line-height:var(--vkui--size_button_large_height--regular);height:44px;height:var(--vkui--size_button_large_height--regular);letter-spacing:var(--vk-sans-ls-2)}.vkuiPagination__page--type-ellipsis{min-width:16px;padding-right:0;padding-left:0}
1
+ .vkuiPagination__list{display:flex;margin:0;padding:0;list-style-type:none}.vkuiPagination__prevButtonContainer{margin-right:8px}.vkuiPagination__nextButtonContainer{margin-left:8px}.vkuiPagination__page{box-sizing:border-box;padding-right:8px;padding-left:8px;width:100%;min-width:40px;border-radius:8px;border-radius:var(--vkui--size_border_radius--regular,8px);text-align:center;color:#818c99;color:var(--vkui--color_text_secondary,#818C99);-webkit-user-select:none;user-select:none}.vkuiPagination__page--state-hover{background-color:rgba(0,16,61,.04);background-color:var(--vkui--color_transparent--hover,rgba(0, 16, 61, 0.04))}.vkuiPagination__page--state-active,.vkuiPagination__page--current{color:#000;color:var(--vkui--color_text_primary,#000000);background-color:rgba(0,16,61,.08);background-color:var(--vkui--color_transparent--active,rgba(0, 16, 61, 0.08))}.vkuiPagination__page--disabled{opacity:.4;opacity:var(--vkui--opacity_disable,0.4)}.vkuiPagination__page--sizeY-compact{font-size:15px;font-size:var(--vkui--font_text--font_size--compact,15px);line-height:36px;line-height:var(--vkui--size_button_large_height--compact,36px);height:36px;height:var(--vkui--size_button_large_height--compact,36px);letter-spacing:var(--vk-sans-ls-17)}.vkuiPagination__page--sizeY-regular{font-size:16px;font-size:var(--vkui--font_text--font_size--regular,16px);line-height:44px;line-height:var(--vkui--size_button_large_height--regular,44px);height:44px;height:var(--vkui--size_button_large_height--regular,44px);letter-spacing:var(--vk-sans-ls-2)}.vkuiPagination__page--type-ellipsis{min-width:16px;padding-right:0;padding-left:0}
@@ -19,7 +19,8 @@ import "./PanelHeader.css";
19
19
  var PanelHeaderIn = function PanelHeaderIn(_ref) {
20
20
  var children = _ref.children,
21
21
  left = _ref.left,
22
- right = _ref.right;
22
+ right = _ref.right,
23
+ separator = _ref.separator;
23
24
 
24
25
  var _React$useContext = React.useContext(ConfigProviderContext),
25
26
  webviewType = _React$useContext.webviewType;
@@ -28,7 +29,7 @@ var PanelHeaderIn = function PanelHeaderIn(_ref) {
28
29
  isInsideModal = _React$useContext2.isInsideModal;
29
30
 
30
31
  var platform = usePlatform();
31
- return createScopedElement(TooltipContainer, {
32
+ return createScopedElement(React.Fragment, null, createScopedElement(TooltipContainer, {
32
33
  fixed: true,
33
34
  vkuiClass: "PanelHeader__in"
34
35
  }, createScopedElement("div", {
@@ -41,7 +42,9 @@ var PanelHeaderIn = function PanelHeaderIn(_ref) {
41
42
  vkuiClass: "PanelHeader__content-in"
42
43
  }, children)), createScopedElement("div", {
43
44
  vkuiClass: "PanelHeader__right"
44
- }, (webviewType === WebviewType.INTERNAL || isInsideModal) && right));
45
+ }, (webviewType === WebviewType.INTERNAL || isInsideModal) && right)), separator && platform === VKCOM && createScopedElement(Separator, {
46
+ wide: true
47
+ }));
45
48
  };
46
49
 
47
50
  var PanelHeader = function PanelHeader(props) {
@@ -86,9 +89,8 @@ var PanelHeader = function PanelHeader(props) {
86
89
  vkuiClass: "PanelHeader__fixed",
87
90
  vertical: "top",
88
91
  getRootRef: getRef
89
- }, createScopedElement(PanelHeaderIn, props)) : createScopedElement(PanelHeaderIn, props), separator && visor && createScopedElement(Separator, {
90
- expanded: sizeX === SizeType.REGULAR && platform !== VKCOM,
91
- wide: platform === VKCOM
92
+ }, createScopedElement(PanelHeaderIn, props)) : createScopedElement(PanelHeaderIn, props), separator && visor && platform !== VKCOM && createScopedElement(Separator, {
93
+ expanded: sizeX === SizeType.REGULAR
92
94
  }));
93
95
  };
94
96
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/PanelHeader/PanelHeader.tsx"],"names":["React","usePlatform","getClassName","classNames","FixedLayout","Separator","Platform","VKCOM","ConfigProviderContext","WebviewType","SizeType","withAdaptivity","Text","TooltipContainer","ModalRootContext","PanelHeaderIn","children","left","right","useContext","webviewType","isInsideModal","platform","INTERNAL","PanelHeader","props","separator","visor","transparent","shadow","getRef","getRootRef","sizeX","sizeY","fixed","restProps","needShadow","REGULAR","isFixed","undefined","VKAPPS","defaultProps"],"mappings":";;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,WAAT;AACA,SAASC,YAAT;AACA,SAASC,UAAT;AACA,OAAOC,WAAP;AACA,OAAOC,SAAP;AACA,SAASC,QAAT,EAAmBC,KAAnB;AAEA,SACEC,qBADF,EAEEC,WAFF;AAIA,SAEEC,QAFF,EAGEC,cAHF;AAKA,OAAOC,IAAP;AACA,SAASC,gBAAT;AACA,OAAOC,gB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;AAGE,IAAA,UAAU,EAAER;AAHd,KAKE,oBAAC,aAAD,EAAmBL,KAAnB,CALF,CADM,GASN,oBAAC,aAAD,EAAmBA,KAAnB,CA7BJ,EA+BGC,SAAS,IAAIC,KAAb,IACC,oBAAC,SAAD;AACE,IAAA,QAAQ,EAAEK,KAAK,KAAKtB,QAAQ,CAAC2B,OAAnB,IAA8Bf,QAAQ,KAAKf,KADvD;AAEE,IAAA,IAAI,EAAEe,QAAQ,KAAKf;AAFrB,IAhCJ,CADF;AAwCD,CA9DD;;AAgEAiB,WAAW,CAACiB,YAAZ,GAA2B;AACzBf,EAAAA,SAAS,EAAE,IADc;AAEzBE,EAAAA,WAAW,EAAE,KAFY;AAGzBD,EAAAA,KAAK,EAAE;AAHkB,CAA3B,C,CAMA;;AACA,eAAehB,cAAc,CAACa,WAAD,EAAc;AACzCQ,EAAAA,KAAK,EAAE,IADkC;AAEzCC,EAAAA,KAAK,EAAE;AAFkC,CAAd,CAA7B","sourcesContent":["import * as React from \"react\";\nimport { usePlatform } from \"../../hooks/usePlatform\";\nimport { getClassName } from \"../../helpers/getClassName\";\nimport { classNames } from \"../../lib/classNames\";\nimport FixedLayout from \"../FixedLayout/FixedLayout\";\nimport Separator from \"../Separator/Separator\";\nimport { Platform, VKCOM } from \"../../lib/platform\";\nimport { HasRef, HasRootRef } from \"../../types\";\nimport {\n ConfigProviderContext,\n WebviewType,\n} from \"../ConfigProvider/ConfigProviderContext\";\nimport {\n AdaptivityProps,\n SizeType,\n withAdaptivity,\n} from \"../../hoc/withAdaptivity\";\nimport Text from \"../Typography/Text/Text\";\nimport { TooltipContainer } from \"../Tooltip/TooltipContainer\";\nimport ModalRootContext from \"../ModalRoot/ModalRootContext\";\nimport \"./PanelHeader.css\";\n\nexport interface PanelHeaderProps\n extends React.HTMLAttributes<HTMLDivElement>,\n HasRef<HTMLDivElement>,\n HasRootRef<HTMLDivElement>,\n AdaptivityProps {\n left?: React.ReactNode;\n right?: React.ReactNode;\n separator?: boolean;\n transparent?: boolean;\n shadow?: boolean;\n /**\n * Если `false`, то шапка будет нулевой высоты и контент панели \"залезет\" под неё\n */\n visor?: boolean;\n /**\n * Если `false`, то шапка будет в потоке. По умолчанию `true`, но если платформа vkcom, то по умолчанию `false`.\n */\n fixed?: boolean;\n}\n\nconst PanelHeaderIn: React.FC<PanelHeaderProps> = ({\n children,\n left,\n right,\n}) => {\n const { webviewType } = React.useContext(ConfigProviderContext);\n const { isInsideModal } = React.useContext(ModalRootContext);\n const platform = usePlatform();\n\n return (\n <TooltipContainer fixed vkuiClass=\"PanelHeader__in\">\n <div vkuiClass=\"PanelHeader__left\">{left}</div>\n <div vkuiClass=\"PanelHeader__content\">\n {platform === VKCOM ? (\n <Text weight=\"medium\">{children}</Text>\n ) : (\n <span vkuiClass=\"PanelHeader__content-in\">{children}</span>\n )}\n </div>\n <div vkuiClass=\"PanelHeader__right\">\n {(webviewType === WebviewType.INTERNAL || isInsideModal) && right}\n </div>\n </TooltipContainer>\n );\n};\n\nconst PanelHeader: React.FC<PanelHeaderProps> = (props: PanelHeaderProps) => {\n const {\n left,\n children,\n right,\n separator,\n visor,\n transparent,\n shadow,\n getRef,\n getRootRef,\n sizeX,\n sizeY,\n fixed,\n ...restProps\n } = props;\n const platform = usePlatform();\n const { webviewType } = React.useContext(ConfigProviderContext);\n const { isInsideModal } = React.useContext(ModalRootContext);\n const needShadow = shadow && sizeX === SizeType.REGULAR;\n let isFixed = fixed !== undefined ? fixed : platform !== Platform.VKCOM;\n\n return (\n <div\n {...restProps}\n // eslint-disable-next-line vkui/no-object-expression-in-arguments\n vkuiClass={classNames(\n getClassName(\"PanelHeader\", platform),\n {\n \"PanelHeader--trnsp\": transparent,\n \"PanelHeader--shadow\": needShadow,\n \"PanelHeader--vis\": visor,\n \"PanelHeader--sep\": separator && visor,\n \"PanelHeader--vkapps\":\n webviewType === WebviewType.VKAPPS && !isInsideModal,\n \"PanelHeader--no-left\": !left,\n \"PanelHeader--no-right\": !right,\n \"PanelHeader--fixed\": isFixed,\n },\n `PanelHeader--sizeX-${sizeX}`\n )}\n ref={isFixed ? getRootRef : getRef}\n >\n {isFixed ? (\n <FixedLayout\n vkuiClass=\"PanelHeader__fixed\"\n vertical=\"top\"\n getRootRef={getRef}\n >\n <PanelHeaderIn {...props} />\n </FixedLayout>\n ) : (\n <PanelHeaderIn {...props} />\n )}\n {separator && visor && (\n <Separator\n expanded={sizeX === SizeType.REGULAR && platform !== VKCOM}\n wide={platform === VKCOM}\n />\n )}\n </div>\n );\n};\n\nPanelHeader.defaultProps = {\n separator: true,\n transparent: false,\n visor: true,\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default withAdaptivity(PanelHeader, {\n sizeX: true,\n sizeY: true,\n});\n"],"file":"PanelHeader.js"}
1
+ {"version":3,"sources":["../../../../src/components/PanelHeader/PanelHeader.tsx"],"names":["React","usePlatform","getClassName","classNames","FixedLayout","Separator","Platform","VKCOM","ConfigProviderContext","WebviewType","SizeType","withAdaptivity","Text","TooltipContainer","ModalRootContext","PanelHeaderIn","children","left","right","separator","useContext","webviewType","isInsideModal","platform","INTERNAL","PanelHeader","props","visor","transparent","shadow","getRef","getRootRef","sizeX","sizeY","fixed","restProps","needShadow","REGULAR","isFixed","undefined","VKAPPS","defaultProps"],"mappings":";;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,WAAT;AACA,SAASC,YAAT;AACA,SAASC,UAAT;AACA,OAAOC,WAAP;AACA,OAAOC,SAAP;AACA,SAASC,QAAT,EAAmBC,KAAnB;AAEA,SACEC,qBADF,EAEEC,WAFF;AAIA,SAEEC,QAFF,EAGEC,cAHF;AAKA,OAAOC,IAAP;AACA,SAASC,gBAAT;AACA,OAAOC,gBAAP;AACA;;AAsBA,IAAMC,aAAyC,GAAG,SAA5CA,aAA4C,OAK5C;AAAA,MAJJC,QAII,QAJJA,QAII;AAAA,MAHJC,IAGI,QAHJA,IAGI;AAAA,MAFJC,KAEI,QAFJA,KAEI;A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,EAAC,KAFX;AAGE,IAAA,UAAU,EAAER;AAHd,KAKE,oBAAC,aAAD,EAAmBJ,KAAnB,CALF,CADM,GASN,oBAAC,aAAD,EAAmBA,KAAnB,CA7BJ,EA+BGP,SAAS,IAAIQ,KAAb,IAAsBJ,QAAQ,KAAKhB,KAAnC,IACC,oBAAC,SAAD;AAAW,IAAA,QAAQ,EAAEyB,KAAK,KAAKtB,QAAQ,CAAC2B;AAAxC,IAhCJ,CADF;AAqCD,CA3DD;;AA6DAZ,WAAW,CAACgB,YAAZ,GAA2B;AACzBtB,EAAAA,SAAS,EAAE,IADc;AAEzBS,EAAAA,WAAW,EAAE,KAFY;AAGzBD,EAAAA,KAAK,EAAE;AAHkB,CAA3B,C,CAMA;;AACA,eAAehB,cAAc,CAACc,WAAD,EAAc;AACzCO,EAAAA,KAAK,EAAE,IADkC;AAEzCC,EAAAA,KAAK,EAAE;AAFkC,CAAd,CAA7B","sourcesContent":["import * as React from \"react\";\nimport { usePlatform } from \"../../hooks/usePlatform\";\nimport { getClassName } from \"../../helpers/getClassName\";\nimport { classNames } from \"../../lib/classNames\";\nimport FixedLayout from \"../FixedLayout/FixedLayout\";\nimport Separator from \"../Separator/Separator\";\nimport { Platform, VKCOM } from \"../../lib/platform\";\nimport { HasRef, HasRootRef } from \"../../types\";\nimport {\n ConfigProviderContext,\n WebviewType,\n} from \"../ConfigProvider/ConfigProviderContext\";\nimport {\n AdaptivityProps,\n SizeType,\n withAdaptivity,\n} from \"../../hoc/withAdaptivity\";\nimport Text from \"../Typography/Text/Text\";\nimport { TooltipContainer } from \"../Tooltip/TooltipContainer\";\nimport ModalRootContext from \"../ModalRoot/ModalRootContext\";\nimport \"./PanelHeader.css\";\n\nexport interface PanelHeaderProps\n extends React.HTMLAttributes<HTMLDivElement>,\n HasRef<HTMLDivElement>,\n HasRootRef<HTMLDivElement>,\n AdaptivityProps {\n left?: React.ReactNode;\n right?: React.ReactNode;\n separator?: boolean;\n transparent?: boolean;\n shadow?: boolean;\n /**\n * Если `false`, то шапка будет нулевой высоты и контент панели \"залезет\" под неё\n */\n visor?: boolean;\n /**\n * Если `false`, то шапка будет в потоке. По умолчанию `true`, но если платформа vkcom, то по умолчанию `false`.\n */\n fixed?: boolean;\n}\n\nconst PanelHeaderIn: React.FC<PanelHeaderProps> = ({\n children,\n left,\n right,\n separator,\n}) => {\n const { webviewType } = React.useContext(ConfigProviderContext);\n const { isInsideModal } = React.useContext(ModalRootContext);\n const platform = usePlatform();\n\n return (\n <React.Fragment>\n <TooltipContainer fixed vkuiClass=\"PanelHeader__in\">\n <div vkuiClass=\"PanelHeader__left\">{left}</div>\n <div vkuiClass=\"PanelHeader__content\">\n {platform === VKCOM ? (\n <Text weight=\"medium\">{children}</Text>\n ) : (\n <span vkuiClass=\"PanelHeader__content-in\">{children}</span>\n )}\n </div>\n <div vkuiClass=\"PanelHeader__right\">\n {(webviewType === WebviewType.INTERNAL || isInsideModal) && right}\n </div>\n </TooltipContainer>\n {separator && platform === VKCOM && <Separator wide />}\n </React.Fragment>\n );\n};\n\nconst PanelHeader: React.FC<PanelHeaderProps> = (props: PanelHeaderProps) => {\n const {\n left,\n children,\n right,\n separator,\n visor,\n transparent,\n shadow,\n getRef,\n getRootRef,\n sizeX,\n sizeY,\n fixed,\n ...restProps\n } = props;\n const platform = usePlatform();\n const { webviewType } = React.useContext(ConfigProviderContext);\n const { isInsideModal } = React.useContext(ModalRootContext);\n const needShadow = shadow && sizeX === SizeType.REGULAR;\n let isFixed = fixed !== undefined ? fixed : platform !== Platform.VKCOM;\n\n return (\n <div\n {...restProps}\n // eslint-disable-next-line vkui/no-object-expression-in-arguments\n vkuiClass={classNames(\n getClassName(\"PanelHeader\", platform),\n {\n \"PanelHeader--trnsp\": transparent,\n \"PanelHeader--shadow\": needShadow,\n \"PanelHeader--vis\": visor,\n \"PanelHeader--sep\": separator && visor,\n \"PanelHeader--vkapps\":\n webviewType === WebviewType.VKAPPS && !isInsideModal,\n \"PanelHeader--no-left\": !left,\n \"PanelHeader--no-right\": !right,\n \"PanelHeader--fixed\": isFixed,\n },\n `PanelHeader--sizeX-${sizeX}`\n )}\n ref={isFixed ? getRootRef : getRef}\n >\n {isFixed ? (\n <FixedLayout\n vkuiClass=\"PanelHeader__fixed\"\n vertical=\"top\"\n getRootRef={getRef}\n >\n <PanelHeaderIn {...props} />\n </FixedLayout>\n ) : (\n <PanelHeaderIn {...props} />\n )}\n {separator && visor && platform !== VKCOM && (\n <Separator expanded={sizeX === SizeType.REGULAR} />\n )}\n </div>\n );\n};\n\nPanelHeader.defaultProps = {\n separator: true,\n transparent: false,\n visor: true,\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default withAdaptivity(PanelHeader, {\n sizeX: true,\n sizeY: true,\n});\n"],"file":"PanelHeader.js"}
@@ -3,9 +3,10 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
3
3
  var _excluded = ["popout", "modal", "viewWidth", "viewHeight", "hasMouse", "children", "getRootRef"];
4
4
  import { createScopedElement } from "../../lib/jsxRuntime";
5
5
  import * as React from "react";
6
- import { withAdaptivity, ViewWidth, ViewHeight } from "../../hoc/withAdaptivity";
6
+ import { withAdaptivity } from "../../hoc/withAdaptivity";
7
7
  import { AppRootPortal } from "../AppRoot/AppRootPortal";
8
8
  import { blurActiveElement, useDOM } from "../../lib/dom";
9
+ import { useAdaptivityIsDesktop } from "../../hooks/useAdaptivity";
9
10
  import "./PopoutRoot.css";
10
11
  export var PopoutRootComponent = function PopoutRootComponent(props) {
11
12
  var popout = props.popout,
@@ -20,7 +21,7 @@ export var PopoutRootComponent = function PopoutRootComponent(props) {
20
21
  var _useDOM = useDOM(),
21
22
  document = _useDOM.document;
22
23
 
23
- var isDesktop = viewWidth >= ViewWidth.SMALL_TABLET && (hasMouse || viewHeight >= ViewHeight.MEDIUM);
24
+ var isDesktop = useAdaptivityIsDesktop();
24
25
  React.useEffect(function () {
25
26
  popout && blurActiveElement(document);
26
27
  }, [document, popout]);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/PopoutRoot/PopoutRoot.tsx"],"names":["React","withAdaptivity","ViewWidth","ViewHeight","AppRootPortal","blurActiveElement","useDOM","PopoutRootComponent","props","popout","modal","viewWidth","viewHeight","hasMouse","children","getRootRef","restProps","document","isDesktop","SMALL_TABLET","MEDIUM","useEffect","displayName","PopoutRoot"],"mappings":";;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAEA,SACEC,cADF,EAEEC,SAFF,EAGEC,UAHF;AAKA,SAASC,aAAT;AACA,SAASC,iBAAT,EAA4BC,MAA5B;AAKA;AAUA,OAAO,IAAMC,mBAEZ,GAAG,SAFSA,mBAET,CAACC,KAAD,EAAW;AACb,MACEC,MADF,GASID,KATJ,CACEC,MADF;AAAA,MAEEC,KAFF,GASIF,KATJ,CAEEE,KAFF;AAAA,MAGEC,SAHF,GASIH,KATJ,CAGEG,SAHF;AAAA,MAIEC,UAJF,GASIJ,KATJ,CAIEI,UAJF;AAAA,MAKEC,QALF,GASIL,KATJ,CAKEK,QALF;AAAA,MAMEC,QANF,GASIN,KATJ,CAMEM,QANF;AAAA,MAOEC,UAPF,GASIP,KATJ,CAOEO,UAPF;AAAA,MAQKC,SARL,4BASIR,KATJ;;AAUA,gBAAqBF,MAAM,EAA3B;AAAA,MAAQW,QAAR,WAAQA,QAAR;;AAEA,MAAMC,SAAS,GACbP,SAAS,IAAIT,SAAS,CAACiB,YAAvB,KACCN,QAAQ,IAAID,UAAU,IAAIT,UAAU,CAACiB,MADtC,CADF;AAIApB,EAAAA,KAAK,CAACqB,SAAN,CAAgB,YAAM;AACpBZ,IAAAA,MAAM,IAAIJ,iBAAiB,CAACY,QAAD,CAA3B;AACD,GAFD,EAEG,CAACA,QAAD,EAAWR,MAAX,CAFH;AAIA,SACE,wCAASO,SAAT;AAAoB,IAAA,SAAS,EAAC,YAA9B;AAA2C,IAAA,GAAG,EAAED;AAAhD,MACGD,QADH,EAEE,oBAAC,aAAD,QACG,CAAC,CAACL,MAAF,IACC;AACE,IAAA,SAAS,EACPS,SAAS,GAAG,sBAAH,GAA4B;AAFzC,KAKGT,MALH,CAFJ,EAUG,CAAC,CAACC,KAAF,IAAW;AAAK,IAAA,SAAS,EAAC;AAAf,KAAoCA,KAApC,CAVd,CAFF,CADF;AAiBD,CAxCM;AA0CPH,mBAAmB,CAACe,WAApB,GAAkC,YAAlC;AAEA,OAAO,IAAMC,UAAU,GAAGtB,cAAc,CAACM,mBAAD,EAAsB;AAC5DI,EAAAA,SAAS,EAAE,IADiD;AAE5DC,EAAAA,UAAU,EAAE,IAFgD;AAG5DC,EAAAA,QAAQ,EAAE;AAHkD,CAAtB,CAAjC","sourcesContent":["import * as React from \"react\";\nimport { HasRootRef } from \"../../types\";\nimport {\n withAdaptivity,\n ViewWidth,\n ViewHeight,\n} from \"../../hoc/withAdaptivity\";\nimport { AppRootPortal } from \"../AppRoot/AppRootPortal\";\nimport { blurActiveElement, useDOM } from \"../../lib/dom\";\nimport {\n AdaptivityContextInterface,\n AdaptivityProps,\n} from \"../AdaptivityProvider/AdaptivityContext\";\nimport \"./PopoutRoot.css\";\n\nexport interface PopoutRootProps\n extends React.HTMLAttributes<HTMLDivElement>,\n AdaptivityProps,\n HasRootRef<HTMLDivElement> {\n popout?: React.ReactNode;\n modal?: React.ReactNode;\n}\n\nexport const PopoutRootComponent: React.FC<\n PopoutRootProps & AdaptivityContextInterface\n> = (props) => {\n const {\n popout,\n modal,\n viewWidth,\n viewHeight,\n hasMouse,\n children,\n getRootRef,\n ...restProps\n } = props;\n const { document } = useDOM();\n\n const isDesktop =\n viewWidth >= ViewWidth.SMALL_TABLET &&\n (hasMouse || viewHeight >= ViewHeight.MEDIUM);\n\n React.useEffect(() => {\n popout && blurActiveElement(document);\n }, [document, popout]);\n\n return (\n <div {...restProps} vkuiClass=\"PopoutRoot\" ref={getRootRef}>\n {children}\n <AppRootPortal>\n {!!popout && (\n <div\n vkuiClass={\n isDesktop ? \"PopoutRoot--absolute\" : \"PopoutRoot__popout\"\n }\n >\n {popout}\n </div>\n )}\n {!!modal && <div vkuiClass=\"PopoutRoot__modal\">{modal}</div>}\n </AppRootPortal>\n </div>\n );\n};\n\nPopoutRootComponent.displayName = \"PopoutRoot\";\n\nexport const PopoutRoot = withAdaptivity(PopoutRootComponent, {\n viewWidth: true,\n viewHeight: true,\n hasMouse: true,\n});\n"],"file":"PopoutRoot.js"}
1
+ {"version":3,"sources":["../../../../src/components/PopoutRoot/PopoutRoot.tsx"],"names":["React","withAdaptivity","AppRootPortal","blurActiveElement","useDOM","useAdaptivityIsDesktop","PopoutRootComponent","props","popout","modal","viewWidth","viewHeight","hasMouse","children","getRootRef","restProps","document","isDesktop","useEffect","displayName","PopoutRoot"],"mappings":";;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAEA,SAASC,cAAT;AACA,SAASC,aAAT;AACA,SAASC,iBAAT,EAA4BC,MAA5B;AAKA,SAASC,sBAAT;AACA;AAUA,OAAO,IAAMC,mBAEZ,GAAG,SAFSA,mBAET,CAACC,KAAD,EAAW;AACb,MACEC,MADF,GASID,KATJ,CACEC,MADF;AAAA,MAEEC,KAFF,GASIF,KATJ,CAEEE,KAFF;AAAA,MAGEC,SAHF,GASIH,KATJ,CAGEG,SAHF;AAAA,MAIEC,UAJF,GASIJ,KATJ,CAIEI,UAJF;AAAA,MAKEC,QALF,GASIL,KATJ,CAKEK,QALF;AAAA,MAMEC,QANF,GASIN,KATJ,CAMEM,QANF;AAAA,MAOEC,UAPF,GASIP,KATJ,CAOEO,UAPF;AAAA,MAQKC,SARL,4BASIR,KATJ;;AAUA,gBAAqBH,MAAM,EAA3B;AAAA,MAAQY,QAAR,WAAQA,QAAR;;AAEA,MAAMC,SAAS,GAAGZ,sBAAsB,EAAxC;AAEAL,EAAAA,KAAK,CAACkB,SAAN,CAAgB,YAAM;AACpBV,IAAAA,MAAM,IAAIL,iBAAiB,CAACa,QAAD,CAA3B;AACD,GAFD,EAEG,CAACA,QAAD,EAAWR,MAAX,CAFH;AAIA,SACE,wCAASO,SAAT;AAAoB,IAAA,SAAS,EAAC,YAA9B;AAA2C,IAAA,GAAG,EAAED;AAAhD,MACGD,QADH,EAEE,oBAAC,aAAD,QACG,CAAC,CAACL,MAAF,IACC;AACE,IAAA,SAAS,EACPS,SAAS,GAAG,sBAAH,GAA4B;AAFzC,KAKGT,MALH,CAFJ,EAUG,CAAC,CAACC,KAAF,IAAW;AAAK,IAAA,SAAS,EAAC;AAAf,KAAoCA,KAApC,CAVd,CAFF,CADF;AAiBD,CAtCM;AAwCPH,mBAAmB,CAACa,WAApB,GAAkC,YAAlC;AAEA,OAAO,IAAMC,UAAU,GAAGnB,cAAc,CAACK,mBAAD,EAAsB;AAC5DI,EAAAA,SAAS,EAAE,IADiD;AAE5DC,EAAAA,UAAU,EAAE,IAFgD;AAG5DC,EAAAA,QAAQ,EAAE;AAHkD,CAAtB,CAAjC","sourcesContent":["import * as React from \"react\";\nimport { HasRootRef } from \"../../types\";\nimport { withAdaptivity } from \"../../hoc/withAdaptivity\";\nimport { AppRootPortal } from \"../AppRoot/AppRootPortal\";\nimport { blurActiveElement, useDOM } from \"../../lib/dom\";\nimport {\n AdaptivityContextInterface,\n AdaptivityProps,\n} from \"../AdaptivityProvider/AdaptivityContext\";\nimport { useAdaptivityIsDesktop } from \"../../hooks/useAdaptivity\";\nimport \"./PopoutRoot.css\";\n\nexport interface PopoutRootProps\n extends React.HTMLAttributes<HTMLDivElement>,\n AdaptivityProps,\n HasRootRef<HTMLDivElement> {\n popout?: React.ReactNode;\n modal?: React.ReactNode;\n}\n\nexport const PopoutRootComponent: React.FC<\n PopoutRootProps & AdaptivityContextInterface\n> = (props) => {\n const {\n popout,\n modal,\n viewWidth,\n viewHeight,\n hasMouse,\n children,\n getRootRef,\n ...restProps\n } = props;\n const { document } = useDOM();\n\n const isDesktop = useAdaptivityIsDesktop();\n\n React.useEffect(() => {\n popout && blurActiveElement(document);\n }, [document, popout]);\n\n return (\n <div {...restProps} vkuiClass=\"PopoutRoot\" ref={getRootRef}>\n {children}\n <AppRootPortal>\n {!!popout && (\n <div\n vkuiClass={\n isDesktop ? \"PopoutRoot--absolute\" : \"PopoutRoot__popout\"\n }\n >\n {popout}\n </div>\n )}\n {!!modal && <div vkuiClass=\"PopoutRoot__modal\">{modal}</div>}\n </AppRootPortal>\n </div>\n );\n};\n\nPopoutRootComponent.displayName = \"PopoutRoot\";\n\nexport const PopoutRoot = withAdaptivity(PopoutRootComponent, {\n viewWidth: true,\n viewHeight: true,\n hasMouse: true,\n});\n"],"file":"PopoutRoot.js"}
@@ -1 +1 @@
1
- .vkuiPopperPortal{position:relative;z-index:100}.vkuiPopper__arrow-in{content:"";display:block;width:20px;height:8px}[data-popper-placement^=bottom] .vkuiPopper__arrow{bottom:100%}[data-popper-placement^=top] .vkuiPopper__arrow{top:100%}[data-popper-placement^=top] .vkuiPopper__arrow-in{-webkit-transform:rotate(180deg);transform:rotate(180deg)}[data-popper-placement^=left] .vkuiPopper__arrow{left:calc(100% - 6px)}[data-popper-placement^=left] .vkuiPopper__arrow-in{-webkit-transform:rotate(90deg);transform:rotate(90deg)}[data-popper-placement^=right] .vkuiPopper__arrow{right:calc(100% - 6px)}[data-popper-placement^=right] .vkuiPopper__arrow-in{-webkit-transform:rotate(270deg);transform:rotate(270deg)}
1
+ .vkuiPopper{z-index:100}.vkuiPopper__arrow-in{content:"";display:block;width:20px;height:8px}[data-popper-placement^=bottom] .vkuiPopper__arrow{bottom:100%}[data-popper-placement^=top] .vkuiPopper__arrow{top:100%}[data-popper-placement^=top] .vkuiPopper__arrow-in{-webkit-transform:rotate(180deg);transform:rotate(180deg)}[data-popper-placement^=left] .vkuiPopper__arrow{left:calc(100% - 6px)}[data-popper-placement^=left] .vkuiPopper__arrow-in{-webkit-transform:rotate(90deg);transform:rotate(90deg)}[data-popper-placement^=right] .vkuiPopper__arrow{right:calc(100% - 6px)}[data-popper-placement^=right] .vkuiPopper__arrow-in{-webkit-transform:rotate(270deg);transform:rotate(270deg)}
@@ -1 +1 @@
1
- .vkuiRadio{display:block}.vkuiFormItem .vkuiRadio{width:100%;box-sizing:content-box;margin:0 calc(-1*16px);margin:0 calc(-1*var(--formitem_padding))}.vkuiRadio__input{display:none}.vkuiRadio__container{display:flex;align-items:center;justify-content:flex-start}.vkuiRadio__input:disabled~.vkuiRadio__container{opacity:.6}.vkuiRadio__icon{display:block;flex-shrink:0;box-sizing:border-box;border-radius:50%;position:relative;width:22px;height:22px;border:2px solid #b8c1cc;border:2px solid var(--icon_tertiary);margin-right:14px;transition:border-color .15s cubic-bezier(.36,.66,.04,1);transition:border-color .15s var(--ios-easing)}.vkuiRadio__input:checked~.vkuiRadio__container .vkuiRadio__icon{border-color:#2688eb;border-color:var(--accent)}.vkuiRadio__icon::after{position:absolute;content:"";display:block;border-radius:50%;box-sizing:border-box;width:14px;height:14px;left:2px;top:2px;-webkit-transform:scale(.3);transform:scale(.3);transition:-webkit-transform .15s cubic-bezier(.36,.66,.04,1);transition:transform .15s cubic-bezier(.36,.66,.04,1);transition:transform .15s cubic-bezier(.36,.66,.04,1),-webkit-transform .15s cubic-bezier(.36,.66,.04,1);transition:-webkit-transform .15s var(--ios-easing);transition:transform .15s var(--ios-easing);transition:transform .15s var(--ios-easing),-webkit-transform .15s var(--ios-easing)}.vkuiRadio__input:checked~.vkuiRadio__container .vkuiRadio__icon::after{background-color:#2688eb;background-color:var(--accent);-webkit-transform:scale(1);transform:scale(1)}.vkuiRadio__content{display:block;flex-grow:1;max-width:100%;color:#000;color:var(--text_primary)}.vkuiRadio__description{display:block;color:#818c99;color:var(--text_secondary);margin-bottom:12px;margin-top:2px}.vkuiRadio__children{margin-top:12px}.vkuiRadio__children:last-child{margin-bottom:12px}.vkuiRadio--ios{padding:0 12px}.vkuiRadio--android{padding:0 16px}.vkuiRadio--sizeY-compact .vkuiRadio__children{margin-top:8px}.vkuiRadio--sizeY-compact .vkuiRadio__children:last-child{margin-bottom:8px}.vkuiRadio--sizeY-compact .vkuiRadio__description{margin-bottom:7px}.vkuiRadio--sizeY-compact .vkuiRadio__icon{width:18px;height:18px}.vkuiRadio--sizeY-compact .vkuiRadio__icon::after{top:1px;left:1px;width:12px;height:12px}.vkuiRadio--vkcom{padding:0 16px}.vkuiRadio--vkcom .vkuiRadio__icon{width:16px;height:16px;margin:2px 14px 2px 2px;border:1px solid #99a2ad;border:1px solid var(--icon_secondary);border-radius:50%;transition:border-color .5s cubic-bezier(.36,.66,.04,1);transition:border-color .5s var(--ios-easing)}.vkuiRadio--vkcom .vkuiRadio__icon::after{width:8px;height:8px;left:3px;top:3px;-webkit-transform:scale(.3);transform:scale(.3);transition:-webkit-transform .5s cubic-bezier(.36,.66,.04,1);transition:transform .5s cubic-bezier(.36,.66,.04,1);transition:transform .5s cubic-bezier(.36,.66,.04,1),-webkit-transform .5s cubic-bezier(.36,.66,.04,1);transition:-webkit-transform .5s var(--ios-easing);transition:transform .5s var(--ios-easing);transition:transform .5s var(--ios-easing),-webkit-transform .5s var(--ios-easing)}.vkuiRadio--vkcom .vkuiRadio__input:disabled~.vkuiRadio__container{opacity:.4}.vkuiRadio--vkcom .vkuiRadio__input:checked~.vkuiRadio__container .vkuiRadio__icon{border-color:#2688eb;border-color:var(--accent)}.vkuiRadio--vkcom .vkuiRadio__input:checked~.vkuiRadio__container .vkuiRadio__icon::after{background-color:#2688eb;background-color:var(--accent);-webkit-transform:scale(1);transform:scale(1)}.vkuiRadio--vkcom .vkuiRadio__children{margin-top:8px}.vkuiRadio--vkcom .vkuiRadio__children:last-child{margin-bottom:8px}.vkuiRadio--vkcom .vkuiRadio__description{margin-top:1px;margin-bottom:8px}.vkuiRadioGroup .vkuiRadio{flex:1;margin:0;box-sizing:border-box}
1
+ .vkuiRadio{display:block}.vkuiFormItem .vkuiRadio{width:100%;box-sizing:content-box;margin:0 calc(-1*16px);margin:0 calc(-1*var(--vkui--size_base_padding_horizontal--regular,16px))}.vkuiRadio__input{display:none}.vkuiRadio__container{display:flex;align-items:center;justify-content:flex-start}.vkuiRadio__input:disabled~.vkuiRadio__container{opacity:.6}.vkuiRadio__icon{display:block;flex-shrink:0;box-sizing:border-box;border-radius:50%;position:relative;width:22px;height:22px;border:2px solid #b8c1cc;border:2px solid var(--icon_tertiary);margin-right:14px;transition:border-color .15s cubic-bezier(.36,.66,.04,1);transition:border-color .15s var(--ios-easing)}.vkuiRadio__input:checked~.vkuiRadio__container .vkuiRadio__icon{border-color:#2688eb;border-color:var(--accent)}.vkuiRadio__icon::after{position:absolute;content:"";display:block;border-radius:50%;box-sizing:border-box;width:14px;height:14px;left:2px;top:2px;-webkit-transform:scale(.3);transform:scale(.3);transition:-webkit-transform .15s cubic-bezier(.36,.66,.04,1);transition:transform .15s cubic-bezier(.36,.66,.04,1);transition:transform .15s cubic-bezier(.36,.66,.04,1),-webkit-transform .15s cubic-bezier(.36,.66,.04,1);transition:-webkit-transform .15s var(--ios-easing);transition:transform .15s var(--ios-easing);transition:transform .15s var(--ios-easing),-webkit-transform .15s var(--ios-easing)}.vkuiRadio__input:checked~.vkuiRadio__container .vkuiRadio__icon::after{background-color:#2688eb;background-color:var(--accent);-webkit-transform:scale(1);transform:scale(1)}.vkuiRadio__content{display:block;flex-grow:1;max-width:100%;color:#000;color:var(--text_primary)}.vkuiRadio__description{display:block;color:#818c99;color:var(--text_secondary);margin-bottom:12px;margin-top:2px}.vkuiRadio__children{margin-top:12px}.vkuiRadio__children:last-child{margin-bottom:12px}.vkuiRadio--ios{padding:0 12px}.vkuiRadio--android{padding:0 16px}.vkuiRadio--sizeY-compact .vkuiRadio__children{margin-top:8px}.vkuiRadio--sizeY-compact .vkuiRadio__children:last-child{margin-bottom:8px}.vkuiRadio--sizeY-compact .vkuiRadio__description{margin-bottom:7px}.vkuiRadio--sizeY-compact .vkuiRadio__icon{width:18px;height:18px}.vkuiRadio--sizeY-compact .vkuiRadio__icon::after{top:1px;left:1px;width:12px;height:12px}.vkuiRadio--vkcom{padding:0 16px}.vkuiRadio--vkcom .vkuiRadio__icon{width:16px;height:16px;margin:2px 14px 2px 2px;border:1px solid #99a2ad;border:1px solid var(--icon_secondary);border-radius:50%;transition:border-color .5s cubic-bezier(.36,.66,.04,1);transition:border-color .5s var(--ios-easing)}.vkuiRadio--vkcom .vkuiRadio__icon::after{width:8px;height:8px;left:3px;top:3px;-webkit-transform:scale(.3);transform:scale(.3);transition:-webkit-transform .5s cubic-bezier(.36,.66,.04,1);transition:transform .5s cubic-bezier(.36,.66,.04,1);transition:transform .5s cubic-bezier(.36,.66,.04,1),-webkit-transform .5s cubic-bezier(.36,.66,.04,1);transition:-webkit-transform .5s var(--ios-easing);transition:transform .5s var(--ios-easing);transition:transform .5s var(--ios-easing),-webkit-transform .5s var(--ios-easing)}.vkuiRadio--vkcom .vkuiRadio__input:disabled~.vkuiRadio__container{opacity:.4}.vkuiRadio--vkcom .vkuiRadio__input:checked~.vkuiRadio__container .vkuiRadio__icon{border-color:#2688eb;border-color:var(--accent)}.vkuiRadio--vkcom .vkuiRadio__input:checked~.vkuiRadio__container .vkuiRadio__icon::after{background-color:#2688eb;background-color:var(--accent);-webkit-transform:scale(1);transform:scale(1)}.vkuiRadio--vkcom .vkuiRadio__children{margin-top:8px}.vkuiRadio--vkcom .vkuiRadio__children:last-child{margin-bottom:8px}.vkuiRadio--vkcom .vkuiRadio__description{margin-top:1px;margin-bottom:8px}.vkuiRadioGroup .vkuiRadio{flex:1;margin:0;box-sizing:border-box}
@@ -1 +1 @@
1
- .vkuiRadioGroup--horizontal{display:flex}.vkuiFormItem .vkuiRadioGroup{margin:0 calc(-1*16px);margin:0 calc(-1*var(--formitem_padding));box-sizing:content-box}
1
+ .vkuiRadioGroup--horizontal{display:flex}.vkuiFormItem .vkuiRadioGroup{margin:0 calc(-1*16px);margin:0 calc(-1*var(--vkui--size_base_padding_horizontal--regular,16px));box-sizing:content-box}
@@ -1 +1 @@
1
- .vkuiRemovable__content{position:relative;display:flex;align-items:center;padding-left:16px;padding-left:var(--formitem_padding)}.vkuiRemovable__action{position:relative;flex-grow:0;flex-shrink:0;border:0}.vkuiRemovable--start .vkuiRemovable__action{align-self:flex-start}.vkuiFormItem--removable.vkuiFormItem--withTop .vkuiRemovable__action,.vkuiFormLayoutGroup--removable .vkuiFormItem--withTop~.vkuiRemovable__action{top:28px}.vkuiFormItem--sizeY-compact.vkuiFormItem--removable.vkuiFormItem--withTop .vkuiRemovable__action,.vkuiFormLayoutGroup--sizeY-compact.vkuiFormLayoutGroup--removable .vkuiFormItem--withTop~.vkuiRemovable__action{top:26px}.vkuiRemovable--ios{overflow:hidden}.vkuiRemovable__remove{position:absolute;left:100%;top:0;height:100%;padding:0 10px;font-size:15px;line-height:45px;color:#fff;color:var(--white);background-color:#e64646;background-color:var(--destructive);border:0;border-radius:0;letter-spacing:var(--vk-sans-ls-17)}.vkuiRemovable__remove-in{display:flex;align-items:center;justify-content:center;width:100%;height:100%}@media (prefers-reduced-motion:no-preference){.vkuiRemovable--ios .vkuiRemovable__content{transition:-webkit-transform .6s cubic-bezier(.36,.66,.04,1);transition:transform .6s cubic-bezier(.36,.66,.04,1);transition:transform .6s cubic-bezier(.36,.66,.04,1),-webkit-transform .6s cubic-bezier(.36,.66,.04,1);transition:-webkit-transform .6s var(--ios-easing);transition:transform .6s var(--ios-easing);transition:transform .6s var(--ios-easing),-webkit-transform .6s var(--ios-easing)}}.vkuiRemovable__toggle{display:block;width:44px;height:44px;margin:0 2px;background:0 0}.vkuiRemovable__toggle-in{position:relative;display:flex;align-items:center;align-content:center;justify-content:center;width:100%;height:100%;border:0}.vkuiRemovable__toggle-in::after{content:"";width:22px;height:22px;background-color:#e64646;background-color:var(--destructive);border-radius:50%}.vkuiRemovable__toggle-in::before{content:"";position:absolute;display:block;width:12px;height:2px;background-color:#fff;background-color:var(--white)}.vkuiRemovable--ios .vkuiRemovable__content{padding-left:0;padding-right:16px;padding-right:var(--formitem_padding)}.vkuiFormLayoutGroup--removable .vkuiRemovable__content{flex-wrap:wrap}.vkuiFormLayoutGroup--removable .vkuiFormItem--ios.vkuiFormItem--withTop~.vkuiRemovable__offset{order:-1;display:block;width:100%;height:28px}.vkuiFormLayoutGroup--removable.vkuiFormLayoutGroup--sizeY-compact .vkuiFormItem--ios.vkuiFormItem--withTop~.vkuiRemovable__offset{height:26px}
1
+ .vkuiRemovable__content{position:relative;display:flex;align-items:center;padding-left:16px;padding-left:var(--vkui--size_base_padding_horizontal--regular,16px)}.vkuiRemovable__action{position:relative;flex-grow:0;flex-shrink:0;border:0}.vkuiRemovable--start .vkuiRemovable__action{align-self:flex-start}.vkuiFormItem--removable.vkuiFormItem--withTop .vkuiRemovable__action,.vkuiFormLayoutGroup--removable .vkuiFormItem--withTop~.vkuiRemovable__action{top:28px}.vkuiFormItem--sizeY-compact.vkuiFormItem--removable.vkuiFormItem--withTop .vkuiRemovable__action,.vkuiFormLayoutGroup--sizeY-compact.vkuiFormLayoutGroup--removable .vkuiFormItem--withTop~.vkuiRemovable__action{top:26px}.vkuiRemovable--ios{overflow:hidden}.vkuiRemovable__remove{position:absolute;left:100%;top:0;height:100%;padding:0 10px;font-size:15px;line-height:45px;color:#fff;color:var(--white);background-color:#e64646;background-color:var(--destructive);border:0;border-radius:0;letter-spacing:var(--vk-sans-ls-17)}.vkuiRemovable__remove-in{display:flex;align-items:center;justify-content:center;width:100%;height:100%}@media (prefers-reduced-motion:no-preference){.vkuiRemovable--ios .vkuiRemovable__content{transition:-webkit-transform .6s cubic-bezier(.36,.66,.04,1);transition:transform .6s cubic-bezier(.36,.66,.04,1);transition:transform .6s cubic-bezier(.36,.66,.04,1),-webkit-transform .6s cubic-bezier(.36,.66,.04,1);transition:-webkit-transform .6s var(--ios-easing);transition:transform .6s var(--ios-easing);transition:transform .6s var(--ios-easing),-webkit-transform .6s var(--ios-easing)}}.vkuiRemovable__toggle{display:block;width:44px;height:44px;margin:0 2px;background:0 0}.vkuiRemovable__toggle-in{position:relative;display:flex;align-items:center;align-content:center;justify-content:center;width:100%;height:100%;border:0}.vkuiRemovable__toggle-in::after{content:"";width:22px;height:22px;background-color:#e64646;background-color:var(--destructive);border-radius:50%}.vkuiRemovable__toggle-in::before{content:"";position:absolute;display:block;width:12px;height:2px;background-color:#fff;background-color:var(--white)}.vkuiRemovable--ios .vkuiRemovable__content{padding-left:0;padding-right:16px;padding-right:var(--vkui--size_base_padding_horizontal--regular,16px)}.vkuiFormLayoutGroup--removable .vkuiRemovable__content{flex-wrap:wrap}.vkuiFormLayoutGroup--removable .vkuiFormItem--ios.vkuiFormItem--withTop~.vkuiRemovable__offset{order:-1;display:block;width:100%;height:28px}.vkuiFormLayoutGroup--removable.vkuiFormLayoutGroup--sizeY-compact .vkuiFormItem--ios.vkuiFormItem--withTop~.vkuiRemovable__offset{height:26px}
@@ -1 +1 @@
1
- .vkuiRichCell{display:flex;min-height:64px;padding-right:16px;padding-left:16px;box-sizing:border-box;white-space:nowrap;text-decoration:none;color:#000;color:var(--text_primary)}.vkuiFormItem .vkuiRichCell{width:100%;box-sizing:content-box;margin:0 calc(-1*16px);margin:0 calc(-1*var(--formitem_padding))}.vkuiRichCell--mult{white-space:normal}.vkuiRichCell__in{flex-grow:1;max-width:100%;min-width:0;overflow:hidden;display:flex;flex-direction:column;justify-content:center;position:relative;padding-top:8px;padding-bottom:8px;font-size:0;line-height:0}.vkuiRichCell__in>:first-child:not(.vkuiRichCell__content){display:none;pointer-events:none}.vkuiRichCell__in>.vkuiIcon--28:first-child~*{margin-right:32px}.vkuiRichCell__content{display:flex}.vkuiRichCell__after{flex-shrink:0;padding-left:4px;white-space:nowrap}.vkuiRichCell__after .vkuiIcon--28{position:absolute;right:0;color:#2688eb;color:var(--accent)}.vkuiRichCell>.vkuiAvatar--sz-72+.vkuiRichCell__in .vkuiRichCell__after .vkuiIcon--28{top:22px}.vkuiRichCell>.vkuiAvatar--sz-48+.vkuiRichCell__in .vkuiRichCell__after .vkuiIcon--28{top:10px}.vkuiRichCell__children{flex-grow:1;max-width:100%;min-width:0}.vkuiRichCell__caption{display:block;margin-top:1px;color:#818c99;color:var(--text_secondary)}.vkuiRichCell__children,.vkuiRichCell__text,.vkuiRichCell__caption{overflow:hidden;text-overflow:ellipsis}.vkuiRichCell__actions{display:flex;margin-top:8px}.vkuiRichCell--ios{padding-right:12px;padding-left:12px}.vkuiRichCell--sizeY-compact{min-height:60px}.vkuiRichCell--sizeY-compact .vkuiRichCell__actions{margin-top:11px}.vkuiRichCell--sizeY-compact .vkuiUsersStack+.vkuiRichCell__actions{margin-top:12px}
1
+ .vkuiRichCell{display:flex;min-height:64px;padding-right:16px;padding-left:16px;box-sizing:border-box;white-space:nowrap;text-decoration:none;color:#000;color:var(--text_primary)}.vkuiFormItem .vkuiRichCell{width:100%;box-sizing:content-box;margin:0 calc(-1*16px);margin:0 calc(-1*var(--vkui--size_base_padding_horizontal--regular,16px))}.vkuiRichCell--mult{white-space:normal}.vkuiRichCell__in{flex-grow:1;max-width:100%;min-width:0;overflow:hidden;display:flex;flex-direction:column;justify-content:center;position:relative;padding-top:8px;padding-bottom:8px;font-size:0;line-height:0}.vkuiRichCell__in>:first-child:not(.vkuiRichCell__content){display:none;pointer-events:none}.vkuiRichCell__in>.vkuiIcon--28:first-child~*{margin-right:32px}.vkuiRichCell__content{display:flex}.vkuiRichCell__after{flex-shrink:0;padding-left:4px;white-space:nowrap}.vkuiRichCell__after .vkuiIcon--28{position:absolute;right:0;color:#2688eb;color:var(--accent)}.vkuiRichCell>.vkuiAvatar--sz-72+.vkuiRichCell__in .vkuiRichCell__after .vkuiIcon--28{top:22px}.vkuiRichCell>.vkuiAvatar--sz-48+.vkuiRichCell__in .vkuiRichCell__after .vkuiIcon--28{top:10px}.vkuiRichCell__children{flex-grow:1;max-width:100%;min-width:0}.vkuiRichCell__caption{display:block;margin-top:1px;color:#818c99;color:var(--text_secondary)}.vkuiRichCell__children,.vkuiRichCell__text,.vkuiRichCell__caption{overflow:hidden;text-overflow:ellipsis}.vkuiRichCell__actions{display:flex;margin-top:8px}.vkuiRichCell--ios{padding-right:12px;padding-left:12px}.vkuiRichCell--sizeY-compact{min-height:60px}.vkuiRichCell--sizeY-compact .vkuiRichCell__actions{margin-top:11px}.vkuiRichCell--sizeY-compact .vkuiUsersStack+.vkuiRichCell__actions{margin-top:12px}
@@ -1 +1 @@
1
- .vkuiSegmentedControl{height:36px;padding:2px;border-radius:8px;border-radius:var(--vkui--size_border_radius--regular);background-color:#f5f5f5;background-color:var(--vkui--color_background_secondary);box-sizing:border-box}.vkuiSegmentedControl--l{height:44px}.vkuiSegmentedControl__in{position:relative;display:flex;height:100%;width:100%;transition:all 100ms ease-out;border-radius:inherit}.vkuiSegmentedControl__slider{position:absolute;top:0;left:0;bottom:0;background-color:#fff;background-color:var(--vkui--color_background_modal);transition:-webkit-transform 150ms;transition:transform 150ms;transition:transform 150ms,-webkit-transform 150ms;-webkit-transform-origin:0 0;transform-origin:0 0;border-radius:inherit;box-shadow:inset 0 0 0 .5px rgba(0,0,0,.08),0 3px 8px rgba(0,0,0,.12),0 3px 1px rgba(0,0,0,.04);box-shadow:inset 0 0 0 .5px var(--vkui--color_image_border_alpha),0 3px 8px rgba(0,0,0,.12),0 3px 1px rgba(0,0,0,.04)}.vkuiSegmentedControl__option{position:relative;flex:1;display:block;margin:0;padding:0;z-index:1}
1
+ .vkuiSegmentedControl{height:36px;padding:2px;border-radius:8px;border-radius:var(--vkui--size_border_radius--regular,8px);background-color:#f5f5f5;background-color:var(--vkui--color_background_secondary,#F5F5F5);box-sizing:border-box}.vkuiSegmentedControl--l{height:44px}.vkuiSegmentedControl__in{position:relative;display:flex;height:100%;width:100%;transition:all 100ms ease-out;border-radius:inherit}.vkuiSegmentedControl__slider{position:absolute;top:0;left:0;bottom:0;background-color:#fff;background-color:var(--vkui--color_background_modal,#FFFFFF);transition:-webkit-transform 150ms;transition:transform 150ms;transition:transform 150ms,-webkit-transform 150ms;-webkit-transform-origin:0 0;transform-origin:0 0;border-radius:inherit;box-shadow:inset 0 0 0 .5px rgba(0,0,0,.08),0 3px 8px rgba(0,0,0,.12),0 3px 1px rgba(0,0,0,.04);box-shadow:inset 0 0 0 .5px var(--vkui--color_image_border_alpha,rgba(0, 0, 0, 0.08)),0 3px 8px rgba(0,0,0,.12),0 3px 1px rgba(0,0,0,.04)}.vkuiSegmentedControl__option{position:relative;flex:1;display:block;margin:0;padding:0;z-index:1}
@@ -1 +1 @@
1
- .vkuiSegmentedControlOption{height:100%;border:0;border-radius:inherit;background:0 0;color:#000;color:var(--vkui--color_text_primary);transition:color 100ms ease-out;-webkit-user-select:none;user-select:none;box-sizing:border-box;cursor:pointer;-webkit-appearance:none;appearance:none}.vkuiSegmentedControlOption .vkuiIcon{color:#99a2ad;color:var(--vkui--color_icon_secondary)}.vkuiSegmentedControlOption:not(.vkuiSegmentedControlOption--checked):hover{opacity:.5}.vkuiSegmentedControlOption__content{display:flex;align-content:center;align-items:center;justify-content:center;height:100%;width:100%;border-radius:inherit}
1
+ .vkuiSegmentedControlOption{height:100%;border:0;border-radius:inherit;background:0 0;color:#000;color:var(--vkui--color_text_primary,#000000);transition:color 100ms ease-out;-webkit-user-select:none;user-select:none;box-sizing:border-box;cursor:pointer;-webkit-appearance:none;appearance:none}.vkuiSegmentedControlOption .vkuiIcon{color:#99a2ad;color:var(--vkui--color_icon_secondary,#99A2AD)}.vkuiSegmentedControlOption:not(.vkuiSegmentedControlOption--checked):hover{opacity:.5}.vkuiSegmentedControlOption__content{display:flex;align-content:center;align-items:center;justify-content:center;height:100%;width:100%;border-radius:inherit}
@@ -1 +1 @@
1
- .vkuiSimpleCell{display:flex;align-items:center;min-height:48px;white-space:nowrap;text-decoration:none;color:#000;color:var(--text_primary);padding-left:16px;padding-right:16px}.vkuiSimpleCell--mult{white-space:normal}.vkuiSimpleCell--mult .vkuiSimpleCell__description,.vkuiSimpleCell--mult .vkuiSimpleCell__children{text-overflow:initial}.vkuiSimpleCell__main{max-width:100%;flex-grow:1;min-width:0;overflow:hidden}.vkuiSimpleCell>.vkuiIcon{padding-top:10px;padding-bottom:10px;padding-right:12px;flex-shrink:0;color:#2688eb;color:var(--accent)}.vkuiSimpleCell>.vkuiIcon--28{padding-right:16px}.vkuiSimpleCell__description{color:#818c99;color:var(--text_secondary);text-overflow:ellipsis;overflow:hidden;margin-top:3px;display:block}.vkuiSimpleCell>.vkuiAvatar--sz-32~.vkuiSimpleCell__main .vkuiSimpleCell__description,.vkuiSimpleCell>.vkuiAvatar--sz-28~.vkuiSimpleCell__main .vkuiSimpleCell__description{margin-top:2px}.vkuiSimpleCell:not(.vkuiSimpleCell--mult) .vkuiSimpleCell__content{display:flex;align-content:flex-start;align-items:center;justify-content:flex-start;max-width:100%}.vkuiSimpleCell__children{color:inherit;text-overflow:ellipsis;overflow:hidden;display:block}.vkuiSimpleCell__badge{display:inline-block;flex-grow:0;flex-shrink:0;margin-left:4px;color:#5c9ce6;color:var(--blue_200)}.vkuiSimpleCell__badge .vkuiBadge{margin-top:2px;margin-left:3px}.vkuiSimpleCell--mult .vkuiSimpleCell__badge{vertical-align:top}.vkuiSimpleCell--mult .vkuiSimpleCell__badge .vkuiIcon{-webkit-transform:translateY(2px);transform:translateY(2px)}.vkuiSimpleCell--mult .vkuiSimpleCell__badge .vkuiBadge{margin-top:8px}.vkuiSimpleCell__indicator{color:#818c99;color:var(--text_secondary);min-width:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;padding-left:4px}.vkuiSimpleCell__after{flex-shrink:0;display:flex;align-items:center;color:#2688eb;color:var(--accent)}.vkuiSimpleCell__after>.vkuiIcon{padding-left:8px}.vkuiSimpleCell__after>.vkuiIcon:last-child{padding-right:2px}.vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--28,.vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--28~*{margin-right:-8px}.vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--24,.vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--24~*{margin-right:-10px}.vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--16,.vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--16~*{margin-right:-14px}.vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--w-8,.vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--w-8~*{margin-right:-12px}.vkuiSimpleCell--ios{padding-left:12px;padding-right:12px}.vkuiSimpleCell--ios .vkuiSimpleCell__main,.vkuiSimpleCell--ios .vkuiSimpleCell__indicator{padding-top:9px;padding-bottom:11px}.vkuiSimpleCell--ios>.vkuiIcon--28{padding-left:4px}.vkuiSimpleCell--ios .vkuiSimpleCell__after .vkuiIcon--chevron_24{color:#b8c1cc;color:var(--icon_tertiary);padding-right:4px;padding-left:12px}.vkuiSimpleCell--ios .vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--16,.vkuiSimpleCell--ios .vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--16~*{margin-right:-12px}.vkuiSimpleCell--ios.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--16,.vkuiSimpleCell--ios.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--16~*{margin-right:-14px}.vkuiSimpleCell--ios.vkuiSimpleCell--sizeY-regular>.vkuiAvatar:not(.vkuiAvatar--sz-32)~.vkuiSimpleCell__main .vkuiSimpleCell__children,.vkuiSimpleCell--ios.vkuiSimpleCell--sizeY-regular>.vkuiAvatar:not(.vkuiAvatar--sz-32)~.vkuiSimpleCell__indicator{font-size:16px;line-height:20px;letter-spacing:var(--vk-sans-ls-2)}.vkuiSimpleCell--android .vkuiSimpleCell__main,.vkuiSimpleCell--android .vkuiSimpleCell__indicator,.vkuiSimpleCell--vkcom .vkuiSimpleCell__main,.vkuiSimpleCell--vkcom .vkuiSimpleCell__indicator{padding-top:11px;padding-bottom:10px}.vkuiSimpleCell--sizeY-compact{min-height:44px}.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__main,.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__indicator{padding-top:10px;padding-bottom:10px}.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__description,.vkuiSimpleCell--sizeY-compact>.vkuiAvatar--sz-32~.vkuiSimpleCell__main .vkuiSimpleCell__description,.vkuiSimpleCell--sizeY-compact>.vkuiAvatar--sz-28~.vkuiSimpleCell__main .vkuiSimpleCell__description{margin-top:1px}.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--28,.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--28~*{margin-right:-6px}.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--24,.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--24~*{margin-right:-8px}.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--16,.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--16~*{margin-right:-12px}.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--w-8,.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--w-8~*{margin-right:-10px}.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__badge .vkuiBadge{-webkit-transform:translateY(.5px);transform:translateY(.5px)}.vkuiFormItem>.vkuiSimpleCell{margin:0 calc(-1*16px);margin:0 calc(-1*var(--formitem_padding))}
1
+ .vkuiSimpleCell{display:flex;align-items:center;min-height:48px;white-space:nowrap;text-decoration:none;color:#000;color:var(--text_primary);padding-left:16px;padding-right:16px}.vkuiSimpleCell--mult{white-space:normal}.vkuiSimpleCell--mult .vkuiSimpleCell__description,.vkuiSimpleCell--mult .vkuiSimpleCell__children{text-overflow:initial}.vkuiSimpleCell__main{max-width:100%;flex-grow:1;min-width:0;overflow:hidden}.vkuiSimpleCell>.vkuiIcon{padding-top:10px;padding-bottom:10px;padding-right:12px;flex-shrink:0;color:#2688eb;color:var(--accent)}.vkuiSimpleCell>.vkuiIcon--28{padding-right:16px}.vkuiSimpleCell__description{color:#818c99;color:var(--text_secondary);text-overflow:ellipsis;overflow:hidden;margin-top:3px;display:block}.vkuiSimpleCell>.vkuiAvatar--sz-32~.vkuiSimpleCell__main .vkuiSimpleCell__description,.vkuiSimpleCell>.vkuiAvatar--sz-28~.vkuiSimpleCell__main .vkuiSimpleCell__description{margin-top:2px}.vkuiSimpleCell:not(.vkuiSimpleCell--mult) .vkuiSimpleCell__content{display:flex;align-content:flex-start;align-items:center;justify-content:flex-start;max-width:100%}.vkuiSimpleCell__children{color:inherit;text-overflow:ellipsis;overflow:hidden;display:block}.vkuiSimpleCell__badge{display:inline-block;flex-grow:0;flex-shrink:0;margin-left:4px;color:#5c9ce6;color:var(--blue_200)}.vkuiSimpleCell__badge .vkuiBadge{margin-top:2px;margin-left:3px}.vkuiSimpleCell--mult .vkuiSimpleCell__badge{vertical-align:top}.vkuiSimpleCell--mult .vkuiSimpleCell__badge .vkuiIcon{-webkit-transform:translateY(2px);transform:translateY(2px)}.vkuiSimpleCell--mult .vkuiSimpleCell__badge .vkuiBadge{margin-top:8px}.vkuiSimpleCell__indicator{color:#818c99;color:var(--text_secondary);min-width:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;padding-left:4px}.vkuiSimpleCell__after{flex-shrink:0;display:flex;align-items:center;color:#2688eb;color:var(--accent)}.vkuiSimpleCell__after>.vkuiIcon{padding-left:8px}.vkuiSimpleCell__after>.vkuiIcon:last-child{padding-right:2px}.vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--28,.vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--28~*{margin-right:-8px}.vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--24,.vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--24~*{margin-right:-10px}.vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--16,.vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--16~*{margin-right:-14px}.vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--w-8,.vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--w-8~*{margin-right:-12px}.vkuiSimpleCell--ios{padding-left:12px;padding-right:12px}.vkuiSimpleCell--ios .vkuiSimpleCell__main,.vkuiSimpleCell--ios .vkuiSimpleCell__indicator{padding-top:9px;padding-bottom:11px}.vkuiSimpleCell--ios>.vkuiIcon--28{padding-left:4px}.vkuiSimpleCell--ios .vkuiSimpleCell__after .vkuiIcon--chevron_24{color:#b8c1cc;color:var(--icon_tertiary);padding-right:4px;padding-left:12px}.vkuiSimpleCell--ios .vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--16,.vkuiSimpleCell--ios .vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--16~*{margin-right:-12px}.vkuiSimpleCell--ios.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--16,.vkuiSimpleCell--ios.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--16~*{margin-right:-14px}.vkuiSimpleCell--ios.vkuiSimpleCell--sizeY-regular>.vkuiAvatar:not(.vkuiAvatar--sz-32)~.vkuiSimpleCell__main .vkuiSimpleCell__children,.vkuiSimpleCell--ios.vkuiSimpleCell--sizeY-regular>.vkuiAvatar:not(.vkuiAvatar--sz-32)~.vkuiSimpleCell__indicator{font-size:16px;line-height:20px;letter-spacing:var(--vk-sans-ls-2)}.vkuiSimpleCell--android .vkuiSimpleCell__main,.vkuiSimpleCell--android .vkuiSimpleCell__indicator,.vkuiSimpleCell--vkcom .vkuiSimpleCell__main,.vkuiSimpleCell--vkcom .vkuiSimpleCell__indicator{padding-top:11px;padding-bottom:10px}.vkuiSimpleCell--sizeY-compact{min-height:44px}.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__main,.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__indicator{padding-top:10px;padding-bottom:10px}.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__description,.vkuiSimpleCell--sizeY-compact>.vkuiAvatar--sz-32~.vkuiSimpleCell__main .vkuiSimpleCell__description,.vkuiSimpleCell--sizeY-compact>.vkuiAvatar--sz-28~.vkuiSimpleCell__main .vkuiSimpleCell__description{margin-top:1px}.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--28,.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--28~*{margin-right:-6px}.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--24,.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--24~*{margin-right:-8px}.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--16,.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--16~*{margin-right:-12px}.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--w-8,.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__after .vkuiIconButton .vkuiIcon--w-8~*{margin-right:-10px}.vkuiSimpleCell--sizeY-compact .vkuiSimpleCell__badge .vkuiBadge{-webkit-transform:translateY(.5px);transform:translateY(.5px)}.vkuiFormItem>.vkuiSimpleCell{margin:0 calc(-1*16px);margin:0 calc(-1*var(--vkui--size_base_padding_horizontal--regular,16px))}
@@ -1 +1 @@
1
- .vkuiCaption{display:block;margin:0}.vkuiCaption--caps{text-transform:uppercase}.vkuiCaption--l-1{font-size:13px;font-size:var(--vkui--font_footnote--font_size--regular);line-height:16px;line-height:var(--vkui--font_footnote--line_height--regular);font-weight:400;font-weight:var(--vkui--font_footnote--font_weight--regular)}.vkuiCaption--l-1.vkuiCaption--caps{font-size:13px;font-size:var(--vkui--font_footnote_caps--font_size--regular);line-height:16px;line-height:var(--vkui--font_footnote_caps--line_height--regular);font-weight:400;font-weight:var(--vkui--font_footnote_caps--font_weight--regular)}.vkuiCaption--l-2{font-size:12px;font-size:var(--vkui--font_caption1--font_size--regular);line-height:14px;line-height:var(--vkui--font_caption1--line_height--regular);font-weight:400;font-weight:var(--vkui--font_caption1--font_weight--regular)}.vkuiCaption--l-2.vkuiCaption--caps{font-size:12px;font-size:var(--vkui--font_caption1_caps--font_size--regular);line-height:14px;line-height:var(--vkui--font_caption1_caps--line_height--regular);font-weight:600;font-weight:var(--vkui--font_caption1_caps--font_weight--regular)}.vkuiCaption--l-3{font-size:11px;font-size:var(--vkui--font_caption2--font_size--regular);line-height:14px;line-height:var(--vkui--font_caption2--line_height--regular);font-weight:400;font-weight:var(--vkui--font_caption2--font_weight--regular);letter-spacing:var(--vk-sans-ls07)}.vkuiCaption--l-3.vkuiCaption--caps{font-size:11px;font-size:var(--vkui--font_caption2_caps--font_size--regular);line-height:14px;line-height:var(--vkui--font_caption2_caps--line_height--regular);font-weight:600;font-weight:var(--vkui--font_caption2_caps--font_weight--regular);letter-spacing:var(--vk-sans-ls07)}.vkuiCaption--l-4{font-size:9px;font-size:var(--vkui--font_caption3--font_size--regular);line-height:12px;line-height:var(--vkui--font_caption3--line_height--regular);font-weight:400;font-weight:var(--vkui--font_caption3--font_weight--regular);letter-spacing:var(--vk-sans-ls2)}.vkuiCaption--l-4.vkuiCaption--caps{font-size:9px;font-size:var(--vkui--font_caption3_caps--font_size--regular);line-height:12px;line-height:var(--vkui--font_caption3_caps--line_height--regular);font-weight:600;font-weight:var(--vkui--font_caption3_caps--font_weight--regular);letter-spacing:var(--vk-sans-ls2)}.vkuiCaption.vkuiCaption--w-1{font-weight:600;font-weight:var(--vkui--font_weight_accent1)}.vkuiCaption.vkuiCaption--w-2{font-weight:500;font-weight:var(--vkui--font_weight_accent2)}.vkuiCaption.vkuiCaption--w-3{font-weight:400;font-weight:var(--vkui--font_weight_accent3)}.vkuiCaption--w-regular{font-weight:400}.vkuiCaption--w-medium{font-weight:500}.vkuiCaption--w-semibold{font-weight:600}.vkuiCaption--w-bold{font-weight:700}
1
+ .vkuiCaption{display:block;margin:0}.vkuiCaption--caps{text-transform:uppercase}.vkuiCaption--l-1{font-size:13px;font-size:var(--vkui--font_footnote--font_size--regular,13px);line-height:16px;line-height:var(--vkui--font_footnote--line_height--regular,16px);font-weight:400;font-weight:var(--vkui--font_footnote--font_weight--regular,400)}.vkuiCaption--l-1.vkuiCaption--caps{font-size:13px;font-size:var(--vkui--font_footnote_caps--font_size--regular,13px);line-height:16px;line-height:var(--vkui--font_footnote_caps--line_height--regular,16px);font-weight:400;font-weight:var(--vkui--font_footnote_caps--font_weight--regular,400)}.vkuiCaption--l-2{font-size:12px;font-size:var(--vkui--font_caption1--font_size--regular,12px);line-height:14px;line-height:var(--vkui--font_caption1--line_height--regular,14px);font-weight:400;font-weight:var(--vkui--font_caption1--font_weight--regular,400)}.vkuiCaption--l-2.vkuiCaption--caps{font-size:12px;font-size:var(--vkui--font_caption1_caps--font_size--regular,12px);line-height:14px;line-height:var(--vkui--font_caption1_caps--line_height--regular,14px);font-weight:600;font-weight:var(--vkui--font_caption1_caps--font_weight--regular,600)}.vkuiCaption--l-3{font-size:11px;font-size:var(--vkui--font_caption2--font_size--regular,11px);line-height:14px;line-height:var(--vkui--font_caption2--line_height--regular,14px);font-weight:400;font-weight:var(--vkui--font_caption2--font_weight--regular,400);letter-spacing:var(--vk-sans-ls07)}.vkuiCaption--l-3.vkuiCaption--caps{font-size:11px;font-size:var(--vkui--font_caption2_caps--font_size--regular,11px);line-height:14px;line-height:var(--vkui--font_caption2_caps--line_height--regular,14px);font-weight:600;font-weight:var(--vkui--font_caption2_caps--font_weight--regular,600);letter-spacing:var(--vk-sans-ls07)}.vkuiCaption--l-4{font-size:9px;font-size:var(--vkui--font_caption3--font_size--regular,9px);line-height:12px;line-height:var(--vkui--font_caption3--line_height--regular,12px);font-weight:400;font-weight:var(--vkui--font_caption3--font_weight--regular,400);letter-spacing:var(--vk-sans-ls2)}.vkuiCaption--l-4.vkuiCaption--caps{font-size:9px;font-size:var(--vkui--font_caption3_caps--font_size--regular,9px);line-height:12px;line-height:var(--vkui--font_caption3_caps--line_height--regular,12px);font-weight:600;font-weight:var(--vkui--font_caption3_caps--font_weight--regular,600);letter-spacing:var(--vk-sans-ls2)}.vkuiCaption.vkuiCaption--w-1{font-weight:600;font-weight:var(--vkui--font_weight_accent1,600)}.vkuiCaption.vkuiCaption--w-2{font-weight:500;font-weight:var(--vkui--font_weight_accent2,500)}.vkuiCaption.vkuiCaption--w-3{font-weight:400;font-weight:var(--vkui--font_weight_accent3,400)}.vkuiCaption--w-regular{font-weight:400}.vkuiCaption--w-medium{font-weight:500}.vkuiCaption--w-semibold{font-weight:600}.vkuiCaption--w-bold{font-weight:700}
@@ -1 +1 @@
1
- .vkuiParagraph{font-size:15px;font-size:var(--vkui--font_paragraph--font_size--regular);line-height:20px;line-height:var(--vkui--font_paragraph--line_height--regular);font-weight:400;font-weight:var(--vkui--font_paragraph--font_weight--regular);letter-spacing:var(--vk-sans-ls-17)}.vkuiParagraph--w-1{font-weight:600;font-weight:var(--vkui--font_weight_accent1)}.vkuiParagraph--w-2{font-weight:500;font-weight:var(--vkui--font_weight_accent2)}.vkuiParagraph--w-3{font-weight:400;font-weight:var(--vkui--font_weight_accent3)}
1
+ .vkuiParagraph{font-size:15px;font-size:var(--vkui--font_paragraph--font_size--regular,15px);line-height:20px;line-height:var(--vkui--font_paragraph--line_height--regular,20px);font-weight:400;font-weight:var(--vkui--font_paragraph--font_weight--regular,400);letter-spacing:var(--vk-sans-ls-17)}.vkuiParagraph--w-1{font-weight:600;font-weight:var(--vkui--font_weight_accent1,600)}.vkuiParagraph--w-2{font-weight:500;font-weight:var(--vkui--font_weight_accent2,500)}.vkuiParagraph--w-3{font-weight:400;font-weight:var(--vkui--font_weight_accent3,400)}
@@ -1 +1 @@
1
- .vkuiSubhead{margin:0;font-size:14px;font-size:var(--vkui--font_subhead--font_size--regular);line-height:18px;line-height:var(--vkui--font_subhead--line_height--regular);font-weight:400;font-weight:var(--vkui--font_subhead--font_weight--regular);letter-spacing:var(--vk-sans-ls-1)}.vkuiSubhead--sizeY-compact{font-size:13px;font-size:var(--vkui--font_subhead--font_size--compact);line-height:16px;line-height:var(--vkui--font_subhead--line_height--compact)}.vkuiSubhead--w-regular{font-weight:400}.vkuiSubhead--w-medium{font-weight:500}.vkuiSubhead--w-semibold{font-weight:600}.vkuiSubhead--w-bold{font-weight:700}.vkuiSubhead--w-1{font-weight:600;font-weight:var(--vkui--font_weight_accent1)}.vkuiSubhead--w-2{font-weight:500;font-weight:var(--vkui--font_weight_accent2)}.vkuiSubhead--w-3{font-weight:400;font-weight:var(--vkui--font_weight_accent3)}
1
+ .vkuiSubhead{margin:0;font-size:14px;font-size:var(--vkui--font_subhead--font_size--regular,14px);line-height:18px;line-height:var(--vkui--font_subhead--line_height--regular,18px);font-weight:400;font-weight:var(--vkui--font_subhead--font_weight--regular,400);letter-spacing:var(--vk-sans-ls-1)}.vkuiSubhead--sizeY-compact{font-size:13px;font-size:var(--vkui--font_subhead--font_size--compact,13px);line-height:16px;line-height:var(--vkui--font_subhead--line_height--compact,16px)}.vkuiSubhead--w-regular{font-weight:400}.vkuiSubhead--w-medium{font-weight:500}.vkuiSubhead--w-semibold{font-weight:600}.vkuiSubhead--w-bold{font-weight:700}.vkuiSubhead--w-1{font-weight:600;font-weight:var(--vkui--font_weight_accent1,600)}.vkuiSubhead--w-2{font-weight:500;font-weight:var(--vkui--font_weight_accent2,500)}.vkuiSubhead--w-3{font-weight:400;font-weight:var(--vkui--font_weight_accent3,400)}
@@ -1 +1 @@
1
- .vkuiTitle{display:block;margin:0}.vkuiTitle--l-1{font-size:24px;font-size:var(--vkui--font_title1--font_size--regular);line-height:28px;line-height:var(--vkui--font_title1--line_height--regular);font-weight:600;font-weight:var(--vkui--font_title1--font_weight--regular);letter-spacing:var(--vk-sans-ls-25)}.vkuiTitle--l-2{font-size:20px;font-size:var(--vkui--font_title2--font_size--regular);line-height:24px;line-height:var(--vkui--font_title2--line_height--regular);font-weight:600;font-weight:var(--vkui--font_title2--font_weight--regular);letter-spacing:var(--vk-sans-ls-35)}.vkuiTitle--l-3{font-size:17px;font-size:var(--vkui--font_title3--font_size--regular);line-height:22px;line-height:var(--vkui--font_title3--line_height--regular);font-weight:600;font-weight:var(--vkui--font_title3--font_weight--regular);letter-spacing:var(--vk-sans-ls-25)}.vkuiTitle--w-regular{font-weight:400}.vkuiTitle--w-medium{font-weight:500}.vkuiTitle--w-semibold{font-weight:600}.vkuiTitle--w-bold{font-weight:700}.vkuiTitle--w-heavy{font-weight:800}.vkuiTitle--w-1{font-weight:600;font-weight:var(--vkui--font_weight_accent1)}.vkuiTitle--w-2{font-weight:500;font-weight:var(--vkui--font_weight_accent2)}.vkuiTitle--w-3{font-weight:400;font-weight:var(--vkui--font_weight_accent3)}
1
+ .vkuiTitle{display:block;margin:0}.vkuiTitle--l-1{font-size:24px;font-size:var(--vkui--font_title1--font_size--regular,24px);line-height:28px;line-height:var(--vkui--font_title1--line_height--regular,28px);font-weight:600;font-weight:var(--vkui--font_title1--font_weight--regular,600);letter-spacing:var(--vk-sans-ls-25)}.vkuiTitle--l-2{font-size:20px;font-size:var(--vkui--font_title2--font_size--regular,20px);line-height:24px;line-height:var(--vkui--font_title2--line_height--regular,24px);font-weight:600;font-weight:var(--vkui--font_title2--font_weight--regular,600);letter-spacing:var(--vk-sans-ls-35)}.vkuiTitle--l-3{font-size:17px;font-size:var(--vkui--font_title3--font_size--regular,17px);line-height:22px;line-height:var(--vkui--font_title3--line_height--regular,22px);font-weight:600;font-weight:var(--vkui--font_title3--font_weight--regular,600);letter-spacing:var(--vk-sans-ls-25)}.vkuiTitle--w-regular{font-weight:400}.vkuiTitle--w-medium{font-weight:500}.vkuiTitle--w-semibold{font-weight:600}.vkuiTitle--w-bold{font-weight:700}.vkuiTitle--w-heavy{font-weight:800}.vkuiTitle--w-1{font-weight:600;font-weight:var(--vkui--font_weight_accent1,600)}.vkuiTitle--w-2{font-weight:500;font-weight:var(--vkui--font_weight_accent2,500)}.vkuiTitle--w-3{font-weight:400;font-weight:var(--vkui--font_weight_accent3,400)}
@@ -1,3 +1,4 @@
1
1
  import { AdaptivityProps, AdaptivityContextInterface } from "../components/AdaptivityProvider/AdaptivityContext";
2
2
  export type { AdaptivityProps };
3
3
  export declare const useAdaptivity: () => AdaptivityContextInterface;
4
+ export declare const useAdaptivityIsDesktop: () => boolean;
@@ -1,6 +1,18 @@
1
1
  import * as React from "react";
2
- import { AdaptivityContext } from "../components/AdaptivityProvider/AdaptivityContext";
2
+ import { AdaptivityContext, ViewWidth, ViewHeight } from "../components/AdaptivityProvider/AdaptivityContext";
3
+ import { usePlatform } from "./usePlatform";
4
+ import { VKCOM } from "../lib/platform";
3
5
  export var useAdaptivity = function useAdaptivity() {
4
6
  return React.useContext(AdaptivityContext);
5
7
  };
8
+ export var useAdaptivityIsDesktop = function useAdaptivityIsDesktop() {
9
+ var platform = usePlatform();
10
+
11
+ var _useAdaptivity = useAdaptivity(),
12
+ viewWidth = _useAdaptivity.viewWidth,
13
+ viewHeight = _useAdaptivity.viewHeight,
14
+ hasMouse = _useAdaptivity.hasMouse;
15
+
16
+ return viewWidth >= ViewWidth.SMALL_TABLET && (hasMouse || viewHeight >= ViewHeight.MEDIUM) || platform === VKCOM;
17
+ };
6
18
  //# sourceMappingURL=useAdaptivity.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/hooks/useAdaptivity.ts"],"names":["React","AdaptivityContext","useAdaptivity","useContext"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,iBADF;AAQA,OAAO,IAAMC,aAAa,GAAG,SAAhBA,aAAgB,GAAkC;AAC7D,SAAOF,KAAK,CAACG,UAAN,CAAiBF,iBAAjB,CAAP;AACD,CAFM","sourcesContent":["import * as React from \"react\";\nimport {\n AdaptivityContext,\n AdaptivityProps,\n AdaptivityContextInterface,\n} from \"../components/AdaptivityProvider/AdaptivityContext\";\n\nexport type { AdaptivityProps };\n\nexport const useAdaptivity = (): AdaptivityContextInterface => {\n return React.useContext(AdaptivityContext);\n};\n"],"file":"useAdaptivity.js"}
1
+ {"version":3,"sources":["../../../src/hooks/useAdaptivity.ts"],"names":["React","AdaptivityContext","ViewWidth","ViewHeight","usePlatform","VKCOM","useAdaptivity","useContext","useAdaptivityIsDesktop","platform","viewWidth","viewHeight","hasMouse","SMALL_TABLET","MEDIUM"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,iBADF,EAIEC,SAJF,EAKEC,UALF;AAOA,SAASC,WAAT;AACA,SAASC,KAAT;AAIA,OAAO,IAAMC,aAAa,GAAG,SAAhBA,aAAgB,GAAkC;AAC7D,SAAON,KAAK,CAACO,UAAN,CAAiBN,iBAAjB,CAAP;AACD,CAFM;AAIP,OAAO,IAAMO,sBAAsB,GAAG,SAAzBA,sBAAyB,GAAe;AACnD,MAAMC,QAAQ,GAAGL,WAAW,EAA5B;;AACA,uBAA4CE,aAAa,EAAzD;AAAA,MAAQI,SAAR,kBAAQA,SAAR;AAAA,MAAmBC,UAAnB,kBAAmBA,UAAnB;AAAA,MAA+BC,QAA/B,kBAA+BA,QAA/B;;AAEA,SACGF,SAAS,IAAIR,SAAS,CAACW,YAAvB,KACED,QAAQ,IAAID,UAAU,IAAIR,UAAU,CAACW,MADvC,CAAD,IAEAL,QAAQ,KAAKJ,KAHf;AAKD,CATM","sourcesContent":["import * as React from \"react\";\nimport {\n AdaptivityContext,\n AdaptivityProps,\n AdaptivityContextInterface,\n ViewWidth,\n ViewHeight,\n} from \"../components/AdaptivityProvider/AdaptivityContext\";\nimport { usePlatform } from \"./usePlatform\";\nimport { VKCOM } from \"../lib/platform\";\n\nexport type { AdaptivityProps };\n\nexport const useAdaptivity = (): AdaptivityContextInterface => {\n return React.useContext(AdaptivityContext);\n};\n\nexport const useAdaptivityIsDesktop = (): boolean => {\n const platform = usePlatform();\n const { viewWidth, viewHeight, hasMouse } = useAdaptivity();\n\n return (\n (viewWidth >= ViewWidth.SMALL_TABLET &&\n (hasMouse || viewHeight >= ViewHeight.MEDIUM)) ||\n platform === VKCOM\n );\n};\n"],"file":"useAdaptivity.js"}
@@ -277,6 +277,7 @@ export { usePlatform } from "./hooks/usePlatform";
277
277
  export { useAdaptivity } from "./hooks/useAdaptivity";
278
278
  export { useAppearance } from "./hooks/useAppearance";
279
279
  export { usePagination } from "./hooks/usePagination";
280
+ export { useScrollLock } from "./components/AppRoot/ScrollContext";
280
281
  /**
281
282
  * Utils
282
283
  */
@@ -176,6 +176,7 @@ export { usePlatform } from "./hooks/usePlatform";
176
176
  export { useAdaptivity } from "./hooks/useAdaptivity";
177
177
  export { useAppearance } from "./hooks/useAppearance";
178
178
  export { usePagination } from "./hooks/usePagination";
179
+ export { useScrollLock } from "./components/AppRoot/ScrollContext";
179
180
  /**
180
181
  * Utils
181
182
  */