@vkontakte/vkui 4.15.0 → 4.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cache/.eslintcache +1 -1
- package/.cache/.stylelintcache +1 -1
- package/.cache/.tsbuildinfo +391 -282
- package/.cache/ts/src/components/AppRoot/AppRoot.d.ts +1 -0
- package/.cache/ts/src/components/ChipsSelect/ChipsSelect.d.ts +1 -1
- package/.cache/ts/src/components/CustomSelect/CustomSelect.d.ts +2 -2
- package/.cache/ts/src/components/FixedLayout/FixedLayout.d.ts +4 -9
- package/.cache/ts/src/components/ModalPage/ModalPage.d.ts +1 -2
- package/.cache/ts/src/components/Root/Root.d.ts +5 -27
- package/.cache/ts/src/components/SimpleCheckbox/SimpleCheckbox.d.ts +9 -0
- package/.cache/ts/src/components/Tappable/Tappable.d.ts +12 -9
- package/.cache/ts/src/components/Touch/Touch.d.ts +1 -2
- package/.cache/ts/src/components/UsersStack/masks.d.ts +1 -1
- package/.cache/ts/src/hooks/useEventListener.d.ts +2 -2
- package/.cache/ts/src/hooks/useKeyboard.d.ts +11 -0
- package/.cache/ts/src/index.d.ts +1 -1
- package/.cache/ts/src/lib/select.d.ts +7 -0
- package/.cache/ts/src/lib/touch.d.ts +1 -1
- package/.cache/ts/src/lib/utils.d.ts +2 -3
- package/.cache/ts/src/types.d.ts +2 -6
- package/.cache/ts/src/unstable/index.d.ts +2 -0
- package/babel.cjs.config.js +7 -1
- package/babel.config.js +7 -1
- package/dist/cjs/components/AppRoot/AppRoot.d.ts +1 -0
- package/dist/cjs/components/AppRoot/AppRoot.js +29 -1
- package/dist/cjs/components/AppRoot/AppRoot.js.map +1 -1
- package/dist/cjs/components/Banner/Banner.js +1 -1
- package/dist/cjs/components/Banner/Banner.js.map +1 -1
- package/dist/cjs/components/Cell/Cell.js +3 -3
- package/dist/cjs/components/Cell/Cell.js.map +1 -1
- package/dist/cjs/components/ChipsSelect/ChipsSelect.d.ts +1 -1
- package/dist/cjs/components/ChipsSelect/ChipsSelect.js +5 -6
- package/dist/cjs/components/ChipsSelect/ChipsSelect.js.map +1 -1
- package/dist/cjs/components/ChipsSelect/useChipsSelect.js +2 -2
- package/dist/cjs/components/ChipsSelect/useChipsSelect.js.map +1 -1
- package/dist/cjs/components/CustomSelect/CustomSelect.d.ts +2 -2
- package/dist/cjs/components/CustomSelect/CustomSelect.js +3 -3
- package/dist/cjs/components/CustomSelect/CustomSelect.js.map +1 -1
- package/dist/cjs/components/FixedLayout/FixedLayout.d.ts +4 -9
- package/dist/cjs/components/FixedLayout/FixedLayout.js +91 -179
- package/dist/cjs/components/FixedLayout/FixedLayout.js.map +1 -1
- package/dist/cjs/components/Gallery/Gallery.js +2 -2
- package/dist/cjs/components/Gallery/Gallery.js.map +1 -1
- package/dist/cjs/components/Header/Header.js +1 -1
- package/dist/cjs/components/Header/Header.js.map +1 -1
- package/dist/cjs/components/ModalCardBase/ModalCardBase.js +6 -1
- package/dist/cjs/components/ModalCardBase/ModalCardBase.js.map +1 -1
- package/dist/cjs/components/ModalPage/ModalPage.d.ts +1 -2
- package/dist/cjs/components/ModalPage/ModalPage.js.map +1 -1
- package/dist/cjs/components/ModalRoot/ModalRoot.js +2 -2
- package/dist/cjs/components/ModalRoot/ModalRoot.js.map +1 -1
- package/dist/cjs/components/Panel/Panel.js +2 -2
- package/dist/cjs/components/Panel/Panel.js.map +1 -1
- package/dist/cjs/components/PanelHeaderContent/PanelHeaderContent.js +0 -1
- package/dist/cjs/components/PanelHeaderContent/PanelHeaderContent.js.map +1 -1
- package/dist/cjs/components/PullToRefresh/PullToRefresh.js +2 -2
- package/dist/cjs/components/PullToRefresh/PullToRefresh.js.map +1 -1
- package/dist/cjs/components/RangeSlider/UniversalSlider.js +2 -2
- package/dist/cjs/components/RangeSlider/UniversalSlider.js.map +1 -1
- package/dist/cjs/components/Root/Root.d.ts +5 -27
- package/dist/cjs/components/Root/Root.js +158 -214
- package/dist/cjs/components/Root/Root.js.map +1 -1
- package/dist/cjs/components/Search/Search.js +3 -3
- package/dist/cjs/components/Search/Search.js.map +1 -1
- package/dist/cjs/components/SimpleCell/SimpleCell.js.map +1 -1
- package/dist/cjs/components/SimpleCheckbox/SimpleCheckbox.d.ts +9 -0
- package/dist/cjs/components/SimpleCheckbox/SimpleCheckbox.js +126 -0
- package/dist/cjs/components/SimpleCheckbox/SimpleCheckbox.js.map +1 -0
- package/dist/cjs/components/Snackbar/Snackbar.js +2 -2
- package/dist/cjs/components/Snackbar/Snackbar.js.map +1 -1
- package/dist/cjs/components/Tappable/Tappable.d.ts +12 -9
- package/dist/cjs/components/Tappable/Tappable.js +47 -36
- package/dist/cjs/components/Tappable/Tappable.js.map +1 -1
- package/dist/cjs/components/Touch/Touch.d.ts +1 -2
- package/dist/cjs/components/Touch/Touch.js +172 -283
- package/dist/cjs/components/Touch/Touch.js.map +1 -1
- package/dist/cjs/components/UsersStack/UsersStack.js +9 -18
- package/dist/cjs/components/UsersStack/UsersStack.js.map +1 -1
- package/dist/cjs/components/UsersStack/masks.d.ts +1 -1
- package/dist/cjs/components/UsersStack/masks.js +5 -8
- package/dist/cjs/components/UsersStack/masks.js.map +1 -1
- package/dist/cjs/components/View/View.js +2 -2
- package/dist/cjs/components/View/View.js.map +1 -1
- package/dist/cjs/components/View/ViewInfinite.js +2 -2
- package/dist/cjs/components/View/ViewInfinite.js.map +1 -1
- package/dist/cjs/hooks/useEventListener.d.ts +2 -2
- package/dist/cjs/hooks/useEventListener.js +9 -4
- package/dist/cjs/hooks/useEventListener.js.map +1 -1
- package/dist/cjs/hooks/useGlobalEventListener.js +2 -4
- package/dist/cjs/hooks/useGlobalEventListener.js.map +1 -1
- package/dist/cjs/hooks/useInsets.js +3 -10
- package/dist/cjs/hooks/useInsets.js.map +1 -1
- package/dist/cjs/hooks/useKeyboard.d.ts +11 -0
- package/dist/cjs/hooks/useKeyboard.js +78 -0
- package/dist/cjs/hooks/useKeyboard.js.map +1 -0
- package/dist/cjs/hooks/useKeyboardInputTracker.js +4 -2
- package/dist/cjs/hooks/useKeyboardInputTracker.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/select.d.ts +7 -0
- package/dist/cjs/lib/select.js +73 -0
- package/dist/cjs/lib/select.js.map +1 -0
- package/dist/cjs/lib/touch.d.ts +1 -1
- package/dist/cjs/lib/touch.js +6 -2
- package/dist/cjs/lib/touch.js.map +1 -1
- package/dist/cjs/lib/utils.d.ts +2 -3
- package/dist/cjs/lib/utils.js.map +1 -1
- package/dist/cjs/types.d.ts +2 -6
- package/dist/cjs/unstable/index.d.ts +2 -0
- package/dist/cjs/unstable/index.js +8 -0
- package/dist/cjs/unstable/index.js.map +1 -1
- package/dist/components/AppRoot/AppRoot.d.ts +1 -0
- package/dist/components/AppRoot/AppRoot.js +29 -5
- package/dist/components/AppRoot/AppRoot.js.map +1 -1
- package/dist/components/Banner/Banner.js +1 -1
- package/dist/components/Banner/Banner.js.map +1 -1
- package/dist/components/Cell/Cell.js +1 -1
- package/dist/components/Cell/Cell.js.map +1 -1
- package/dist/components/ChipsSelect/ChipsSelect.d.ts +1 -1
- package/dist/components/ChipsSelect/ChipsSelect.js +4 -6
- package/dist/components/ChipsSelect/ChipsSelect.js.map +1 -1
- package/dist/components/ChipsSelect/useChipsSelect.js +2 -2
- package/dist/components/ChipsSelect/useChipsSelect.js.map +1 -1
- package/dist/components/CustomSelect/CustomSelect.d.ts +2 -2
- package/dist/components/CustomSelect/CustomSelect.js +2 -3
- package/dist/components/CustomSelect/CustomSelect.js.map +1 -1
- package/dist/components/FixedLayout/FixedLayout.d.ts +4 -9
- package/dist/components/FixedLayout/FixedLayout.js +84 -175
- package/dist/components/FixedLayout/FixedLayout.js.map +1 -1
- package/dist/components/Gallery/Gallery.js +1 -1
- package/dist/components/Gallery/Gallery.js.map +1 -1
- package/dist/components/Header/Header.js +1 -1
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/ModalCardBase/ModalCardBase.js +5 -1
- package/dist/components/ModalCardBase/ModalCardBase.js.map +1 -1
- package/dist/components/ModalPage/ModalPage.d.ts +1 -2
- package/dist/components/ModalPage/ModalPage.js.map +1 -1
- package/dist/components/ModalRoot/ModalRoot.js +1 -1
- package/dist/components/ModalRoot/ModalRoot.js.map +1 -1
- package/dist/components/Panel/Panel.js +1 -1
- package/dist/components/Panel/Panel.js.map +1 -1
- package/dist/components/PanelHeaderContent/PanelHeaderContent.js +0 -1
- package/dist/components/PanelHeaderContent/PanelHeaderContent.js.map +1 -1
- package/dist/components/PullToRefresh/PullToRefresh.js +1 -1
- package/dist/components/PullToRefresh/PullToRefresh.js.map +1 -1
- package/dist/components/RangeSlider/UniversalSlider.js +1 -1
- package/dist/components/RangeSlider/UniversalSlider.js.map +1 -1
- package/dist/components/Root/Root.d.ts +5 -27
- package/dist/components/Root/Root.js +152 -207
- package/dist/components/Root/Root.js.map +1 -1
- package/dist/components/Search/Search.js +1 -1
- package/dist/components/Search/Search.js.map +1 -1
- package/dist/components/SimpleCell/SimpleCell.js.map +1 -1
- package/dist/components/SimpleCheckbox/SimpleCheckbox.d.ts +9 -0
- package/dist/components/SimpleCheckbox/SimpleCheckbox.js +97 -0
- package/dist/components/SimpleCheckbox/SimpleCheckbox.js.map +1 -0
- package/dist/components/Snackbar/Snackbar.js +1 -1
- package/dist/components/Snackbar/Snackbar.js.map +1 -1
- package/dist/components/Tappable/Tappable.d.ts +12 -9
- package/dist/components/Tappable/Tappable.js +45 -37
- package/dist/components/Tappable/Tappable.js.map +1 -1
- package/dist/components/Touch/Touch.d.ts +1 -2
- package/dist/components/Touch/Touch.js +163 -286
- package/dist/components/Touch/Touch.js.map +1 -1
- package/dist/components/UsersStack/UsersStack.js +7 -16
- package/dist/components/UsersStack/UsersStack.js.map +1 -1
- package/dist/components/UsersStack/masks.d.ts +1 -1
- package/dist/components/UsersStack/masks.js +6 -9
- package/dist/components/UsersStack/masks.js.map +1 -1
- package/dist/components/View/View.js +1 -1
- package/dist/components/View/View.js.map +1 -1
- package/dist/components/View/ViewInfinite.js +1 -1
- package/dist/components/View/ViewInfinite.js.map +1 -1
- package/dist/components.css +1 -1
- package/dist/components.css.map +1 -1
- package/dist/cssm/components/ActionSheetItem/ActionSheetItem.css +1 -1
- package/dist/cssm/components/AppRoot/AppRoot.css +1 -0
- package/dist/cssm/components/AppRoot/AppRoot.js +30 -2
- package/dist/cssm/components/AppRoot/AppRoot.js.map +1 -1
- package/dist/cssm/components/Banner/Banner.css +1 -1
- package/dist/cssm/components/Banner/Banner.js +1 -1
- package/dist/cssm/components/Banner/Banner.js.map +1 -1
- package/dist/cssm/components/Cell/Cell.js +1 -1
- package/dist/cssm/components/Cell/Cell.js.map +1 -1
- package/dist/cssm/components/ChipsSelect/ChipsSelect.js +4 -6
- package/dist/cssm/components/ChipsSelect/ChipsSelect.js.map +1 -1
- package/dist/cssm/components/ChipsSelect/useChipsSelect.js +2 -2
- package/dist/cssm/components/ChipsSelect/useChipsSelect.js.map +1 -1
- package/dist/cssm/components/CustomSelect/CustomSelect.js +2 -3
- package/dist/cssm/components/CustomSelect/CustomSelect.js.map +1 -1
- package/dist/cssm/components/FixedLayout/FixedLayout.js +84 -175
- package/dist/cssm/components/FixedLayout/FixedLayout.js.map +1 -1
- package/dist/cssm/components/Gallery/Gallery.js +1 -1
- package/dist/cssm/components/Gallery/Gallery.js.map +1 -1
- package/dist/cssm/components/Header/Header.js +1 -1
- package/dist/cssm/components/Header/Header.js.map +1 -1
- package/dist/cssm/components/ModalCardBase/ModalCardBase.css +1 -1
- package/dist/cssm/components/ModalCardBase/ModalCardBase.js +5 -1
- package/dist/cssm/components/ModalCardBase/ModalCardBase.js.map +1 -1
- package/dist/cssm/components/ModalPage/ModalPage.js.map +1 -1
- package/dist/cssm/components/ModalRoot/ModalRoot.css +1 -1
- package/dist/cssm/components/ModalRoot/ModalRoot.js +1 -1
- package/dist/cssm/components/ModalRoot/ModalRoot.js.map +1 -1
- package/dist/cssm/components/Panel/Panel.js +1 -1
- package/dist/cssm/components/Panel/Panel.js.map +1 -1
- package/dist/cssm/components/PanelHeaderContent/PanelHeaderContent.css +1 -1
- package/dist/cssm/components/PanelHeaderContent/PanelHeaderContent.js +0 -1
- package/dist/cssm/components/PanelHeaderContent/PanelHeaderContent.js.map +1 -1
- package/dist/cssm/components/PullToRefresh/PullToRefresh.js +1 -1
- package/dist/cssm/components/PullToRefresh/PullToRefresh.js.map +1 -1
- package/dist/cssm/components/RangeSlider/UniversalSlider.js +1 -1
- package/dist/cssm/components/RangeSlider/UniversalSlider.js.map +1 -1
- package/dist/cssm/components/Root/Root.js +152 -207
- package/dist/cssm/components/Root/Root.js.map +1 -1
- package/dist/cssm/components/Search/Search.js +1 -1
- package/dist/cssm/components/Search/Search.js.map +1 -1
- package/dist/cssm/components/SimpleCell/SimpleCell.js.map +1 -1
- package/dist/cssm/components/SimpleCheckbox/SimpleCheckbox.css +1 -0
- package/dist/cssm/components/SimpleCheckbox/SimpleCheckbox.js +98 -0
- package/dist/cssm/components/SimpleCheckbox/SimpleCheckbox.js.map +1 -0
- package/dist/cssm/components/Snackbar/Snackbar.js +1 -1
- package/dist/cssm/components/Snackbar/Snackbar.js.map +1 -1
- package/dist/cssm/components/Tappable/Tappable.js +45 -37
- package/dist/cssm/components/Tappable/Tappable.js.map +1 -1
- package/dist/cssm/components/Touch/Touch.js +163 -286
- package/dist/cssm/components/Touch/Touch.js.map +1 -1
- package/dist/cssm/components/UsersStack/UsersStack.css +1 -1
- package/dist/cssm/components/UsersStack/UsersStack.js +7 -16
- package/dist/cssm/components/UsersStack/UsersStack.js.map +1 -1
- package/dist/cssm/components/UsersStack/masks.js +6 -9
- package/dist/cssm/components/UsersStack/masks.js.map +1 -1
- package/dist/cssm/components/View/View.js +1 -1
- package/dist/cssm/components/View/View.js.map +1 -1
- package/dist/cssm/components/View/ViewInfinite.js +1 -1
- package/dist/cssm/components/View/ViewInfinite.js.map +1 -1
- package/dist/cssm/hooks/useEventListener.js +8 -4
- package/dist/cssm/hooks/useEventListener.js.map +1 -1
- package/dist/cssm/hooks/useGlobalEventListener.js +2 -2
- package/dist/cssm/hooks/useGlobalEventListener.js.map +1 -1
- package/dist/cssm/hooks/useInsets.js +2 -10
- package/dist/cssm/hooks/useInsets.js.map +1 -1
- package/dist/cssm/hooks/useKeyboard.js +62 -0
- package/dist/cssm/hooks/useKeyboard.js.map +1 -0
- package/dist/cssm/hooks/useKeyboardInputTracker.js +4 -2
- package/dist/cssm/hooks/useKeyboardInputTracker.js.map +1 -1
- package/dist/cssm/index.js +1 -1
- package/dist/cssm/index.js.map +1 -1
- package/dist/cssm/lib/select.js +62 -0
- package/dist/cssm/lib/select.js.map +1 -0
- package/dist/cssm/lib/touch.js +5 -2
- package/dist/cssm/lib/touch.js.map +1 -1
- package/dist/cssm/lib/utils.js.map +1 -1
- package/dist/cssm/styles/animations.css +1 -1
- package/dist/cssm/styles/common.css +1 -1
- package/dist/cssm/styles/components.css +1 -1
- package/dist/cssm/styles/constants.css +1 -1
- package/dist/cssm/styles/unstable.css +1 -1
- package/dist/cssm/unstable/index.js +1 -0
- package/dist/cssm/unstable/index.js.map +1 -1
- package/dist/hooks/useEventListener.d.ts +2 -2
- package/dist/hooks/useEventListener.js +8 -4
- package/dist/hooks/useEventListener.js.map +1 -1
- package/dist/hooks/useGlobalEventListener.js +2 -2
- package/dist/hooks/useGlobalEventListener.js.map +1 -1
- package/dist/hooks/useInsets.js +2 -10
- package/dist/hooks/useInsets.js.map +1 -1
- package/dist/hooks/useKeyboard.d.ts +11 -0
- package/dist/hooks/useKeyboard.js +62 -0
- package/dist/hooks/useKeyboard.js.map +1 -0
- package/dist/hooks/useKeyboardInputTracker.js +4 -2
- package/dist/hooks/useKeyboardInputTracker.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/select.d.ts +7 -0
- package/dist/lib/select.js +62 -0
- package/dist/lib/select.js.map +1 -0
- package/dist/lib/touch.d.ts +1 -1
- package/dist/lib/touch.js +5 -2
- package/dist/lib/touch.js.map +1 -1
- package/dist/lib/utils.d.ts +2 -3
- package/dist/lib/utils.js.map +1 -1
- package/dist/types.d.ts +2 -6
- package/dist/unstable/index.d.ts +2 -0
- package/dist/unstable/index.js +1 -0
- package/dist/unstable/index.js.map +1 -1
- package/dist/unstable.css +1 -1
- package/dist/unstable.css.map +1 -1
- package/dist/vkui.css +1 -1
- package/dist/vkui.css.map +1 -1
- package/package.json +4 -2
- package/postcss.config.js +1 -1
- package/src/components/ActionSheetItem/ActionSheetItem.css +4 -8
- package/src/components/AppRoot/AppRoot.css +20 -0
- package/src/components/AppRoot/AppRoot.tsx +30 -0
- package/src/components/Banner/Banner.css +4 -0
- package/src/components/Banner/Banner.tsx +1 -1
- package/src/components/Cell/Cell.tsx +1 -1
- package/src/components/ChipsSelect/ChipsSelect.tsx +4 -7
- package/src/components/ChipsSelect/Readme.md +0 -2
- package/src/components/ChipsSelect/useChipsSelect.ts +1 -1
- package/src/components/CustomSelect/CustomSelect.tsx +3 -2
- package/src/components/FixedLayout/FixedLayout.tsx +61 -147
- package/src/components/Gallery/Gallery.tsx +1 -1
- package/src/components/Header/Header.tsx +1 -1
- package/src/components/ModalCardBase/ModalCardBase.css +4 -0
- package/src/components/ModalCardBase/ModalCardBase.tsx +5 -1
- package/src/components/ModalPage/ModalPage.tsx +1 -2
- package/src/components/ModalRoot/ModalRoot.css +10 -0
- package/src/components/ModalRoot/ModalRoot.tsx +1 -1
- package/src/components/Panel/Panel.tsx +1 -1
- package/src/components/PanelHeaderContent/PanelHeaderContent.css +2 -1
- package/src/components/PanelHeaderContent/PanelHeaderContent.tsx +2 -2
- package/src/components/PullToRefresh/PullToRefresh.tsx +1 -1
- package/src/components/RangeSlider/UniversalSlider.tsx +1 -1
- package/src/components/Root/Readme.md +27 -37
- package/src/components/Root/Root.tsx +112 -191
- package/src/components/Search/Search.tsx +1 -1
- package/src/components/Separator/Readme.md +3 -1
- package/src/components/SimpleCell/SimpleCell.tsx +1 -1
- package/src/components/SimpleCheckbox/Readme.md +17 -0
- package/src/components/SimpleCheckbox/SimpleCheckbox.css +115 -0
- package/src/components/SimpleCheckbox/SimpleCheckbox.tsx +105 -0
- package/src/components/Snackbar/Snackbar.tsx +1 -1
- package/src/components/Tappable/Tappable.tsx +28 -37
- package/src/components/Touch/Touch.tsx +100 -238
- package/src/components/UsersStack/UsersStack.css +5 -9
- package/src/components/UsersStack/UsersStack.tsx +4 -11
- package/src/components/UsersStack/masks.tsx +6 -9
- package/src/components/View/Readme.md +34 -42
- package/src/components/View/View.tsx +1 -1
- package/src/components/View/ViewInfinite.tsx +1 -1
- package/src/hooks/useEventListener.ts +11 -8
- package/src/hooks/useGlobalEventListener.ts +2 -2
- package/src/hooks/useInsets.ts +2 -8
- package/src/hooks/useKeyboard.ts +67 -0
- package/src/hooks/useKeyboardInputTracker.ts +4 -2
- package/src/index.ts +1 -1
- package/src/lib/select.ts +53 -0
- package/src/lib/touch.ts +2 -2
- package/src/lib/utils.ts +3 -4
- package/src/styles/animations.css +0 -14
- package/src/styles/common.css +0 -21
- package/src/styles/components.css +2 -0
- package/src/styles/constants.css +3 -0
- package/src/styles/unstable.css +1 -0
- package/src/types.ts +2 -8
- package/src/unstable/index.ts +3 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
.vkui__root, .vkui__portal-root{--font-common: -apple-system, system-ui, Helvetica Neue, Roboto, sans-serif;--font-tt: "TT Commons", -apple-system, system-ui, Helvetica Neue, Roboto, sans-serif;--ios-easing: cubic-bezier(.36, .66, .04, 1);--android-easing: cubic-bezier(.4, 0, .2, 1);--tabbar_height: 48px;--panelheader_height_ios: 52px;--panelheader_height_android: 56px;--panelheader_height_vkcom: 48px;--modalheader_height_ios: 52px;--modalheader_height_android: 56px;--search_default_height: 36px;--thin-border: 1px;--formitem_padding: 16px;--white: #fff;--blue_200: #5c9ce6;--safe-area-inset-top: 20px;--safe-area-inset-right: 0px;--safe-area-inset-bottom: 0px;--safe-area-inset-left: 0px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:2dppx){.vkui__root, .vkui__portal-root{--thin-border: .5px}}@media (-webkit-min-device-pixel-ratio:3),(min-resolution:3dppx){.vkui__root, .vkui__portal-root{--thin-border: .33px}}@supports (padding-top:constant(safe-area-inset-top)){.vkui__root, .vkui__portal-root{--safe-area-inset-top: constant(safe-area-inset-top);--safe-area-inset-right: constant(safe-area-inset-right);--safe-area-inset-bottom: constant(safe-area-inset-bottom);--safe-area-inset-left: constant(safe-area-inset-left)}}@supports (padding-top:env(safe-area-inset-top)){.vkui__root, .vkui__portal-root{--safe-area-inset-top: env(safe-area-inset-top);--safe-area-inset-right: env(safe-area-inset-right);--safe-area-inset-bottom: env(safe-area-inset-bottom);--safe-area-inset-left: env(safe-area-inset-left)}}
|
|
1
|
+
.vkui__root, .vkui__portal-root{--font-common: -apple-system, system-ui, Helvetica Neue, Roboto, sans-serif;--font-tt: "TT Commons", -apple-system, system-ui, Helvetica Neue, Roboto, sans-serif;--ios-easing: cubic-bezier(.36, .66, .04, 1);--android-easing: cubic-bezier(.4, 0, .2, 1);--tabbar_height: 48px;--panelheader_height_ios: 52px;--panelheader_height_android: 56px;--panelheader_height_vkcom: 48px;--modalheader_height_ios: 52px;--modalheader_height_android: 56px;--search_default_height: 36px;--thin-border: 1px;--formitem_padding: 16px;--white: #fff;--blue_200: #5c9ce6;--safe-area-inset-top: 20px;--safe-area-inset-right: 0px;--safe-area-inset-bottom: 0px;--safe-area-inset-left: 0px;--duration: .7s}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:2dppx){.vkui__root, .vkui__portal-root{--thin-border: .5px}}@media (-webkit-min-device-pixel-ratio:3),(min-resolution:3dppx){.vkui__root, .vkui__portal-root{--thin-border: .33px}}@supports (padding-top:constant(safe-area-inset-top)){.vkui__root, .vkui__portal-root{--safe-area-inset-top: constant(safe-area-inset-top);--safe-area-inset-right: constant(safe-area-inset-right);--safe-area-inset-bottom: constant(safe-area-inset-bottom);--safe-area-inset-left: constant(safe-area-inset-left)}}@supports (padding-top:env(safe-area-inset-top)){.vkui__root, .vkui__portal-root{--safe-area-inset-top: env(safe-area-inset-top);--safe-area-inset-right: env(safe-area-inset-right);--safe-area-inset-bottom: env(safe-area-inset-bottom);--safe-area-inset-left: env(safe-area-inset-left)}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.vkuiChipsSelect{position:relative}.vkuiChipsSelect__fetching,.vkuiChipsSelect__empty{padding:12px 0}.vkuiChipsSelect__empty{text-align:center;color:#818c99;color:var(--text_secondary)}.vkuiChipsSelect__options{position:absolute;width:100%;max-height:160px;background-color:#fff;background-color:var(--modal_card_background);box-shadow:0 2px 2px rgba(0,0,0,.06),0 0 2px rgba(0,0,0,.03);border:solid 1px rgba(0,0,0,.12);border:solid 1px var(--field_border);border-top:0;border-radius:0 0 8px 8px;box-sizing:border-box;overflow:hidden;z-index:4}.vkuiChipsSelect__options .vkuiCustomScrollView__box{max-height:160px}.vkuiChipsSelect__options--popupDirectionTop{bottom:100%;border-radius:8px 8px 0 0;border-top:unset;border-bottom:0;box-shadow:0 -2px 2px rgba(0,0,0,.06),0 0 2px rgba(0,0,0,.03)}.vkuiChipsSelect__open:not(.vkuiChipsSelect__open--popupDirectionTop) .vkuiFormField__border{border-bottom-left-radius:0;border-bottom-right-radius:0}.vkuiChipsSelect__open.vkuiChipsSelect__open--popupDirectionTop .vkuiFormField__border{border-top-left-radius:0;border-top-right-radius:0}
|
|
1
|
+
.vkuiChipsSelect{position:relative}.vkuiChipsSelect__fetching,.vkuiChipsSelect__empty{padding:12px 0}.vkuiChipsSelect__empty{text-align:center;color:#818c99;color:var(--text_secondary)}.vkuiChipsSelect__options{position:absolute;width:100%;max-height:160px;background-color:#fff;background-color:var(--modal_card_background);box-shadow:0 2px 2px rgba(0,0,0,.06),0 0 2px rgba(0,0,0,.03);border:solid 1px rgba(0,0,0,.12);border:solid 1px var(--field_border);border-top:0;border-radius:0 0 8px 8px;box-sizing:border-box;overflow:hidden;z-index:4}.vkuiChipsSelect__options .vkuiCustomScrollView__box{max-height:160px}.vkuiChipsSelect__options--popupDirectionTop{bottom:100%;border-radius:8px 8px 0 0;border-top:unset;border-bottom:0;box-shadow:0 -2px 2px rgba(0,0,0,.06),0 0 2px rgba(0,0,0,.03)}.vkuiChipsSelect__open:not(.vkuiChipsSelect__open--popupDirectionTop) .vkuiFormField__border{border-bottom-left-radius:0;border-bottom-right-radius:0}.vkuiChipsSelect__open.vkuiChipsSelect__open--popupDirectionTop .vkuiFormField__border{border-top-left-radius:0;border-top-right-radius:0}.vkuiSimpleCheckbox{display:block;margin:-10px;padding:10px;width:24px;height:24px;border-radius:50%}.vkuiSimpleCheckbox__input{position:absolute;-webkit-appearance:none;appearance:none}.vkuiSimpleCheckbox__container{display:flex;align-items:flex-start;justify-content:flex-start}.vkuiSimpleCheckbox__icon{flex-shrink:0;margin:0;box-sizing:border-box;border-radius:4px;display:flex}.vkuiSimpleCheckbox__icon--on{color:#3f8ae0;color:var(--accent);display:none}.vkuiSimpleCheckbox__icon--indeterminate{color:#3f8ae0;color:var(--accent);display:none}.vkuiSimpleCheckbox__icon--off{color:#b8c1cc;color:var(--icon_tertiary)}.vkuiSimpleCheckbox__input:checked~.vkuiSimpleCheckbox__container .vkuiSimpleCheckbox__icon--on{display:flex}.vkuiSimpleCheckbox__input:indeterminate~.vkuiSimpleCheckbox__container .vkuiSimpleCheckbox__icon--indeterminate,.vkuiSimpleCheckbox__input:checked~.vkuiSimpleCheckbox__container .vkuiSimpleCheckbox__icon--off{display:none}.vkuiSimpleCheckbox__input:indeterminate~.vkuiSimpleCheckbox__container .vkuiSimpleCheckbox__icon--indeterminate{display:flex}.vkuiSimpleCheckbox__input:indeterminate~.vkuiSimpleCheckbox__container .vkuiSimpleCheckbox__icon--on,.vkuiSimpleCheckbox__input:indeterminate~.vkuiSimpleCheckbox__container .vkuiSimpleCheckbox__icon--off{display:none}.vkuiSimpleCheckbox__input[disabled]~.vkuiSimpleCheckbox__container{opacity:.6}.vkuiSimpleCheckbox--ios.vkuiSimpleCheckbox--sizeY-compact,.vkuiSimpleCheckbox--android.vkuiSimpleCheckbox--sizeY-compact{margin:-8px;padding:8px;width:20px;height:20px}.vkuiSimpleCheckbox--vkcom{margin:0;padding:0;width:22px;height:22px;border-radius:4px}.vkuiSimpleCheckbox--vkcom .vkuiSimpleCheckbox__activeShadow,.vkuiSimpleCheckbox--vkcom .vkuiSimpleCheckbox__hoverShadow{margin:3px;width:16px;height:16px;position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;overflow:hidden;border-radius:inherit;transition:inherit}.vkuiSimpleCheckbox--vkcom.vkuiSimpleCheckbox--active .vkuiSimpleCheckbox__activeShadow{background-color:rgba(0,0,0,.08);background-color:var(--background_highlighted)}.vkuiSimpleCheckbox--vkcom.vkuiSimpleCheckbox--hover .vkuiSimpleCheckbox__hoverShadow{background-color:rgba(0,0,0,.04);background-color:var(--background_hover)}.vkuiSimpleCheckbox--vkcom .vkuiSimpleCheckbox__icon{border-radius:3px;padding:1px;border-width:1px}.vkuiSimpleCheckbox--vkcom .vkuiSimpleCheckbox__input[disabled]~.vkuiSimpleCheckbox__container{opacity:.4}
|
|
@@ -3,4 +3,5 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export { default as ChipsSelect } from "./../components/ChipsSelect/ChipsSelect";
|
|
5
5
|
export { default as ViewInfinite } from "./../components/View/ViewInfinite";
|
|
6
|
+
export { default as SimpleCheckbox } from "./../components/SimpleCheckbox/SimpleCheckbox";
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/unstable/index.ts"],"names":["default","ChipsSelect","ViewInfinite"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,IAAIC,WAApB;AAGA,SAASD,OAAO,IAAIE,YAApB","sourcesContent":["/**\n * Forms\n */\nexport { default as ChipsSelect } from './../components/ChipsSelect/ChipsSelect';\nexport type { ChipsSelectProps } from './../components/ChipsSelect/ChipsSelect';\n\nexport { default as ViewInfinite } from './../components/View/ViewInfinite';\nexport type { ViewInfiniteProps } from './../components/View/ViewInfinite';\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/unstable/index.ts"],"names":["default","ChipsSelect","ViewInfinite","SimpleCheckbox"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,IAAIC,WAApB;AAGA,SAASD,OAAO,IAAIE,YAApB;AAGA,SAASF,OAAO,IAAIG,cAApB","sourcesContent":["/**\n * Forms\n */\nexport { default as ChipsSelect } from './../components/ChipsSelect/ChipsSelect';\nexport type { ChipsSelectProps } from './../components/ChipsSelect/ChipsSelect';\n\nexport { default as ViewInfinite } from './../components/View/ViewInfinite';\nexport type { ViewInfiniteProps } from './../components/View/ViewInfinite';\n\nexport { default as SimpleCheckbox } from './../components/SimpleCheckbox/SimpleCheckbox';\nexport type { SimpleCheckboxProps } from './../components/SimpleCheckbox/SimpleCheckbox';\n"],"file":"index.js"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
interface EventListenerHandle {
|
|
2
|
-
add(el: HTMLElement | Document)
|
|
3
|
-
remove()
|
|
2
|
+
add: (el: HTMLElement | Document) => void;
|
|
3
|
+
remove: () => void;
|
|
4
4
|
}
|
|
5
5
|
export declare function useEventListener<K extends keyof GlobalEventHandlersEventMap>(event: K, _cb: (ev: GlobalEventHandlersEventMap[K]) => any, _options?: AddEventListenerOptions): EventListenerHandle;
|
|
6
6
|
export declare function useEventListener(event: string, _cb: (ev: Event) => any, _options?: AddEventListenerOptions): EventListenerHandle;
|
|
@@ -9,11 +9,12 @@ export function useEventListener(event, _cb, _options) {
|
|
|
9
9
|
cbRef.current = _cb;
|
|
10
10
|
}, [_cb]);
|
|
11
11
|
var cb = React.useCallback(function (e) {
|
|
12
|
-
return cbRef.current(e);
|
|
12
|
+
return cbRef.current && cbRef.current(e);
|
|
13
13
|
}, []);
|
|
14
14
|
var detach = React.useRef(noop);
|
|
15
15
|
var remove = React.useCallback(function () {
|
|
16
|
-
|
|
16
|
+
detach.current();
|
|
17
|
+
detach.current = noop;
|
|
17
18
|
}, []);
|
|
18
19
|
var add = React.useCallback(function (el) {
|
|
19
20
|
if (!canUseDOM) {
|
|
@@ -22,13 +23,16 @@ export function useEventListener(event, _cb, _options) {
|
|
|
22
23
|
|
|
23
24
|
remove();
|
|
24
25
|
|
|
26
|
+
if (!el) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
|
|
25
30
|
var options = _objectSpread({}, _options);
|
|
26
31
|
|
|
27
32
|
el.addEventListener(event, cb, options);
|
|
28
33
|
|
|
29
34
|
detach.current = function () {
|
|
30
|
-
el.removeEventListener(event, cb, options);
|
|
31
|
-
detach.current = noop;
|
|
35
|
+
return el.removeEventListener(event, cb, options);
|
|
32
36
|
};
|
|
33
37
|
}, []);
|
|
34
38
|
React.useEffect(function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useEventListener.ts"],"names":["React","noop","canUseDOM","useIsomorphicLayoutEffect","useEventListener","event","_cb","_options","cbRef","useRef","current","cb","useCallback","e","detach","remove","add","el","options","addEventListener","removeEventListener","useEffect"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT;AACA,SAASC,SAAT;AACA,SAASC,yBAAT;AAaA,OAAO,SAASC,gBAAT,CAA0BC,KAA1B,EAAyCC,GAAzC,EAAkEC,QAAlE,EAAsG;AAC3G,MAAMC,KAAK,GAAGR,KAAK,CAACS,MAAN,CAAaH,GAAb,CAAd;AACAH,EAAAA,yBAAyB,CAAC,YAAM;AAC9BK,IAAAA,KAAK,CAACE,OAAN,GAAgBJ,GAAhB;AACD,GAFwB,EAEtB,CAACA,GAAD,CAFsB,CAAzB;AAGA,MAAMK,EAAE,GAAGX,KAAK,CAACY,WAAN,CAA8B,UAACC,CAAD;AAAA,WAAOL,KAAK,CAACE,OAAN,CAAcG,CAAd,
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/useEventListener.ts"],"names":["React","noop","canUseDOM","useIsomorphicLayoutEffect","useEventListener","event","_cb","_options","cbRef","useRef","current","cb","useCallback","e","detach","remove","add","el","options","addEventListener","removeEventListener","useEffect"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT;AACA,SAASC,SAAT;AACA,SAASC,yBAAT;AAaA,OAAO,SAASC,gBAAT,CAA0BC,KAA1B,EAAyCC,GAAzC,EAAkEC,QAAlE,EAAsG;AAC3G,MAAMC,KAAK,GAAGR,KAAK,CAACS,MAAN,CAAaH,GAAb,CAAd;AACAH,EAAAA,yBAAyB,CAAC,YAAM;AAC9BK,IAAAA,KAAK,CAACE,OAAN,GAAgBJ,GAAhB;AACD,GAFwB,EAEtB,CAACA,GAAD,CAFsB,CAAzB;AAGA,MAAMK,EAAE,GAAGX,KAAK,CAACY,WAAN,CAA8B,UAACC,CAAD;AAAA,WAAOL,KAAK,CAACE,OAAN,IAAiBF,KAAK,CAACE,OAAN,CAAcG,CAAd,CAAxB;AAAA,GAA9B,EAAwE,EAAxE,CAAX;AAEA,MAAMC,MAAM,GAAGd,KAAK,CAACS,MAAN,CAAaR,IAAb,CAAf;AACA,MAAMc,MAAM,GAAGf,KAAK,CAACY,WAAN,CAAkB,YAAM;AACrCE,IAAAA,MAAM,CAACJ,OAAP;AACAI,IAAAA,MAAM,CAACJ,OAAP,GAAiBT,IAAjB;AACD,GAHc,EAGZ,EAHY,CAAf;AAIA,MAAMe,GAAG,GAAGhB,KAAK,CAACY,WAAN,CAAkB,UAACK,EAAD,EAAgC;AAC5D,QAAI,CAACf,SAAL,EAAgB;AACd;AACD;;AACDa,IAAAA,MAAM;;AACN,QAAI,CAACE,EAAL,EAAS;AACP;AACD;;AACD,QAAMC,OAAO,qBAAQX,QAAR,CAAb;;AACAU,IAAAA,EAAE,CAACE,gBAAH,CAAoBd,KAApB,EAA2BM,EAA3B,EAA+BO,OAA/B;;AACAJ,IAAAA,MAAM,CAACJ,OAAP,GAAiB;AAAA,aAAMO,EAAE,CAACG,mBAAH,CAAuBf,KAAvB,EAA8BM,EAA9B,EAAkCO,OAAlC,CAAN;AAAA,KAAjB;AACD,GAXW,EAWT,EAXS,CAAZ;AAYAlB,EAAAA,KAAK,CAACqB,SAAN,CAAgB;AAAA,WAAMN,MAAN;AAAA,GAAhB,EAA8B,EAA9B;AAEA,SAAO;AAAEC,IAAAA,GAAG,EAAHA,GAAF;AAAOD,IAAAA,MAAM,EAANA;AAAP,GAAP;AACD","sourcesContent":["import * as React from 'react';\nimport { noop } from '../lib/utils';\nimport { canUseDOM } from '../lib/dom';\nimport { useIsomorphicLayoutEffect } from '../lib/useIsomorphicLayoutEffect';\n\ninterface EventListenerHandle {\n add: (el: HTMLElement | Document) => void;\n remove: () => void;\n}\n\nexport function useEventListener<K extends keyof GlobalEventHandlersEventMap>(\n event: K,\n _cb: (ev: GlobalEventHandlersEventMap[K]) => any,\n _options?: AddEventListenerOptions,\n): EventListenerHandle;\nexport function useEventListener(event: string, _cb: (ev: Event) => any, _options?: AddEventListenerOptions): EventListenerHandle;\nexport function useEventListener(event: string, _cb: (ev: Event) => any, _options?: AddEventListenerOptions) {\n const cbRef = React.useRef(_cb);\n useIsomorphicLayoutEffect(() => {\n cbRef.current = _cb;\n }, [_cb]);\n const cb = React.useCallback<typeof _cb>((e) => cbRef.current && cbRef.current(e), []);\n\n const detach = React.useRef(noop);\n const remove = React.useCallback(() => {\n detach.current();\n detach.current = noop;\n }, []);\n const add = React.useCallback((el: HTMLElement | Document) => {\n if (!canUseDOM) {\n return;\n }\n remove();\n if (!el) {\n return;\n }\n const options = { ..._options };\n el.addEventListener(event, cb, options);\n detach.current = () => el.removeEventListener(event, cb, options);\n }, []);\n React.useEffect(() => remove, []);\n\n return { add, remove };\n}\n"],"file":"useEventListener.js"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useIsomorphicLayoutEffect } from "../lib/useIsomorphicLayoutEffect";
|
|
2
2
|
import { useEventListener } from "./useEventListener";
|
|
3
3
|
export function useGlobalEventListener(element, event, cb, options) {
|
|
4
4
|
var listener = useEventListener(event, cb, options);
|
|
5
|
-
|
|
5
|
+
useIsomorphicLayoutEffect(function () {
|
|
6
6
|
return cb ? listener.add(element) : listener.remove();
|
|
7
7
|
}, [Boolean(cb)]);
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useGlobalEventListener.ts"],"names":["
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/useGlobalEventListener.ts"],"names":["useIsomorphicLayoutEffect","useEventListener","useGlobalEventListener","element","event","cb","options","listener","add","remove","Boolean"],"mappings":"AAAA,SAASA,yBAAT;AACA,SAASC,gBAAT;AAcA,OAAO,SAASC,sBAAT,CAAgCC,OAAhC,EAA8CC,KAA9C,EAA6DC,EAA7D,EAAqFC,OAArF,EAAwH;AAC7H,MAAMC,QAAQ,GAAGN,gBAAgB,CAACG,KAAD,EAAQC,EAAR,EAAYC,OAAZ,CAAjC;AACAN,EAAAA,yBAAyB,CAAC;AAAA,WAAMK,EAAE,GAAGE,QAAQ,CAACC,GAAT,CAAaL,OAAb,CAAH,GAA2BI,QAAQ,CAACE,MAAT,EAAnC;AAAA,GAAD,EAAuD,CAACC,OAAO,CAACL,EAAD,CAAR,CAAvD,CAAzB;AACD","sourcesContent":["import { useIsomorphicLayoutEffect } from '../lib/useIsomorphicLayoutEffect';\nimport { useEventListener } from './useEventListener';\n\nexport function useGlobalEventListener<K extends keyof GlobalEventHandlersEventMap>(\n element: HTMLElement | HTMLDocument | Window,\n event: K,\n cb: false | null | ((ev: GlobalEventHandlersEventMap[K]) => any),\n options?: AddEventListenerOptions,\n): void;\nexport function useGlobalEventListener(\n element: HTMLElement | HTMLDocument | Window,\n event: string,\n cb: false | null | ((ev: Event) => any),\n options?: AddEventListenerOptions,\n): void;\nexport function useGlobalEventListener(element: any, event: string, cb: (ev: Event) => any, options?: AddEventListenerOptions) {\n const listener = useEventListener(event, cb, options);\n useIsomorphicLayoutEffect(() => cb ? listener.add(element) : listener.remove(), [Boolean(cb)]);\n}\n"],"file":"useGlobalEventListener.js"}
|
package/dist/hooks/useInsets.js
CHANGED
|
@@ -2,6 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
2
2
|
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import vkBridge from '@vkontakte/vk-bridge';
|
|
5
|
+
import { useIsomorphicLayoutEffect } from "../lib/useIsomorphicLayoutEffect";
|
|
5
6
|
var initialState = {
|
|
6
7
|
bottom: null,
|
|
7
8
|
top: null,
|
|
@@ -36,15 +37,6 @@ vkBridge.subscribe(function (e) {
|
|
|
36
37
|
var insets = resolveInsets(e);
|
|
37
38
|
|
|
38
39
|
if (insets) {
|
|
39
|
-
// eslint-disable-next-line no-restricted-globals
|
|
40
|
-
var htmlElement = document.documentElement;
|
|
41
|
-
|
|
42
|
-
for (var key in insets) {
|
|
43
|
-
if (insets.hasOwnProperty(key) && (insets[key] > 0 || key === 'bottom')) {
|
|
44
|
-
htmlElement.style.setProperty("--safe-area-inset-".concat(key), "".concat(insets[key], "px"));
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
40
|
initialState = insets;
|
|
49
41
|
}
|
|
50
42
|
});
|
|
@@ -54,7 +46,7 @@ export function useInsets() {
|
|
|
54
46
|
insets = _React$useState2[0],
|
|
55
47
|
setInsets = _React$useState2[1];
|
|
56
48
|
|
|
57
|
-
|
|
49
|
+
useIsomorphicLayoutEffect(function () {
|
|
58
50
|
function connectListener(e) {
|
|
59
51
|
var insets = resolveInsets(e);
|
|
60
52
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useInsets.ts"],"names":["React","vkBridge","initialState","bottom","top","left","right","resolveInsets","e","detail","type","data","insets","subscribe","
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/useInsets.ts"],"names":["React","vkBridge","useIsomorphicLayoutEffect","initialState","bottom","top","left","right","resolveInsets","e","detail","type","data","insets","subscribe","useInsets","useState","setInsets","connectListener","unsubscribe"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,QAAP,MAAiC,sBAAjC;AACA,SAASC,yBAAT;AAEA,IAAIC,YAAoB,GAAG;AACzBC,EAAAA,MAAM,EAAE,IADiB;AAEzBC,EAAAA,GAAG,EAAE,IAFoB;AAGzBC,EAAAA,IAAI,EAAE,IAHmB;AAIzBC,EAAAA,KAAK,EAAE;AAJkB,CAA3B;;AAgBA,SAASC,aAAT,CAAuBC,CAAvB,EAAsD;AACpD,kBAAuBA,CAAC,CAACC,MAAzB;AAAA,MAAQC,IAAR,aAAQA,IAAR;AAAA,MAAcC,IAAd,aAAcA,IAAd;;AACA,UAAQD,IAAR;AACE,SAAK,sBAAL;AACA,SAAK,sBAAL;AAA6B;AAC3B,UAAQE,MAAR,GAAmBD,IAAnB,CAAQC,MAAR;;AACA,UAAIA,MAAJ,EAAY;AACV,+CACKA,MADL;AAEET,UAAAA,MAAM,EAAES,MAAM,CAACT,MAAP,GAAgB,GAAhB,GAAsB,CAAtB,GAA0BS,MAAM,CAACT,MAF3C,CAEmD;;AAFnD;AAID;;AATL;;AAWA,SAAO,IAAP;AACD;;AAEDH,QAAQ,CAACa,SAAT,CAAmB,UAACL,CAAD,EAAoB;AACrC,MAAMI,MAAM,GAAGL,aAAa,CAACC,CAAD,CAA5B;;AACA,MAAII,MAAJ,EAAY;AACVV,IAAAA,YAAY,GAAGU,MAAf;AACD;AACF,CALD;AAOA,OAAO,SAASE,SAAT,GAA6B;AAClC,wBAA4Bf,KAAK,CAACgB,QAAN,CAAuBb,YAAvB,CAA5B;AAAA;AAAA,MAAOU,MAAP;AAAA,MAAeI,SAAf;;AAEAf,EAAAA,yBAAyB,CAAC,YAAM;AAC9B,aAASgB,eAAT,CAAyBT,CAAzB,EAAyC;AACvC,UAAMI,MAAM,GAAGL,aAAa,CAACC,CAAD,CAA5B;;AACA,UAAII,MAAJ,EAAY;AACVI,QAAAA,SAAS,CAACJ,MAAD,CAAT;AACD;AACF;;AAEDZ,IAAAA,QAAQ,CAACa,SAAT,CAAmBI,eAAnB;AACA,WAAO,YAAM;AACXjB,MAAAA,QAAQ,CAACkB,WAAT,CAAqBD,eAArB;AACD,KAFD;AAGD,GAZwB,EAYtB,EAZsB,CAAzB;AAcA,SAAOL,MAAP;AACD","sourcesContent":["import * as React from 'react';\nimport vkBridge, { Insets } from '@vkontakte/vk-bridge';\nimport { useIsomorphicLayoutEffect } from '../lib/useIsomorphicLayoutEffect';\n\nlet initialState: Insets = {\n bottom: null,\n top: null,\n left: null,\n right: null,\n};\n\ninterface BridgeEvent {\n detail: {\n type: string;\n data: {\n [index: string]: any;\n };\n };\n}\n\nfunction resolveInsets(e: BridgeEvent): Insets | null {\n const { type, data } = e.detail;\n switch (type) {\n case 'VKWebAppUpdateConfig':\n case 'VKWebAppUpdateInsets': // Устаревшее событие vk-bridge\n const { insets } = data;\n if (insets) {\n return {\n ...insets,\n bottom: insets.bottom > 150 ? 0 : insets.bottom, // если больше 150 – значит открылась клава и она сама работает как инсет, то есть наш нужно занулить\n };\n }\n }\n return null;\n}\n\nvkBridge.subscribe((e: BridgeEvent) => {\n const insets = resolveInsets(e);\n if (insets) {\n initialState = insets;\n }\n});\n\nexport function useInsets(): Insets {\n const [insets, setInsets] = React.useState<Insets>(initialState);\n\n useIsomorphicLayoutEffect(() => {\n function connectListener(e: BridgeEvent) {\n const insets = resolveInsets(e);\n if (insets) {\n setInsets(insets);\n }\n }\n\n vkBridge.subscribe(connectListener);\n return () => {\n vkBridge.unsubscribe(connectListener);\n };\n }, []);\n\n return insets;\n}\n"],"file":"useInsets.js"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface SoftwareKeyboardState {
|
|
2
|
+
isOpened: boolean;
|
|
3
|
+
isPrecise: boolean;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
Проверяет, закрыла ли клавиатура часть экрана, 24% подошло к большиству устройств
|
|
7
|
+
Работает на iOS и Android, где софт-клавиатура ресайзит viewport в браузерах
|
|
8
|
+
*/
|
|
9
|
+
export declare function getPreciseKeyboardState(window: any): boolean;
|
|
10
|
+
export declare function useKeyboard(): SoftwareKeyboardState;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useDOM } from "../lib/dom";
|
|
4
|
+
import { useGlobalEventListener } from "./useGlobalEventListener";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
Проверяет, закрыла ли клавиатура часть экрана, 24% подошло к большиству устройств
|
|
8
|
+
Работает на iOS и Android, где софт-клавиатура ресайзит viewport в браузерах
|
|
9
|
+
*/
|
|
10
|
+
export function getPreciseKeyboardState(window) {
|
|
11
|
+
var availHeight = window.screen.availHeight;
|
|
12
|
+
var innerHeight = window.innerHeight;
|
|
13
|
+
var coveredViewportPercentage = Math.round((1 - innerHeight / availHeight) * 100);
|
|
14
|
+
return coveredViewportPercentage > 24;
|
|
15
|
+
}
|
|
16
|
+
export function useKeyboard() {
|
|
17
|
+
var _useDOM = useDOM(),
|
|
18
|
+
window = _useDOM.window,
|
|
19
|
+
document = _useDOM.document;
|
|
20
|
+
|
|
21
|
+
var _React$useState = React.useState({
|
|
22
|
+
isOpened: false,
|
|
23
|
+
isPrecise: false
|
|
24
|
+
}),
|
|
25
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
26
|
+
keyboardState = _React$useState2[0],
|
|
27
|
+
setKeyboardState = _React$useState2[1];
|
|
28
|
+
|
|
29
|
+
var transitionalTimeout = React.useRef(null);
|
|
30
|
+
var eventOptions = {
|
|
31
|
+
passive: true,
|
|
32
|
+
capture: false
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
У полей с autoFocus не отлавливаются события focus, для этого вызываем вручную,
|
|
36
|
+
чтобы иметь хоть какое-то понимание происходящего.
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
React.useEffect(function () {
|
|
40
|
+
onFocus(true);
|
|
41
|
+
}, [onFocus]);
|
|
42
|
+
|
|
43
|
+
function onFocus(event) {
|
|
44
|
+
var _document$activeEleme, _document$activeEleme2;
|
|
45
|
+
|
|
46
|
+
clearTimeout(transitionalTimeout.current);
|
|
47
|
+
var returnObject = {
|
|
48
|
+
isOpened: (event === true || event.type === 'focusin') && (((_document$activeEleme = document.activeElement) === null || _document$activeEleme === void 0 ? void 0 : _document$activeEleme.tagName) === 'INPUT' || ((_document$activeEleme2 = document.activeElement) === null || _document$activeEleme2 === void 0 ? void 0 : _document$activeEleme2.tagName) === 'TEXTAREA'),
|
|
49
|
+
isPrecise: false
|
|
50
|
+
}; // Ожидаем прохождение анимации раскрытия клавиатуры
|
|
51
|
+
|
|
52
|
+
transitionalTimeout.current = setTimeout(function () {
|
|
53
|
+
returnObject.isPrecise = getPreciseKeyboardState(window);
|
|
54
|
+
setKeyboardState(returnObject);
|
|
55
|
+
}, 300);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
useGlobalEventListener(document, 'focusout', onFocus, eventOptions);
|
|
59
|
+
useGlobalEventListener(document, 'focusin', onFocus, eventOptions);
|
|
60
|
+
return keyboardState;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=useKeyboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/useKeyboard.ts"],"names":["React","useDOM","useGlobalEventListener","getPreciseKeyboardState","window","availHeight","screen","innerHeight","coveredViewportPercentage","Math","round","useKeyboard","document","useState","isOpened","isPrecise","keyboardState","setKeyboardState","transitionalTimeout","useRef","eventOptions","passive","capture","useEffect","onFocus","event","clearTimeout","current","returnObject","type","activeElement","tagName","setTimeout"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,MAAT;AACA,SAASC,sBAAT;;AAOA;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAT,CAAiCC,MAAjC,EAAuD;AAC5D,MAAQC,WAAR,GAAwBD,MAAM,CAACE,MAA/B,CAAQD,WAAR;AACA,MAAQE,WAAR,GAAwBH,MAAxB,CAAQG,WAAR;AAEA,MAAMC,yBAAyB,GAAGC,IAAI,CAACC,KAAL,CAAW,CAAC,IAAIH,WAAW,GAAGF,WAAnB,IAAkC,GAA7C,CAAlC;AACA,SAAOG,yBAAyB,GAAG,EAAnC;AACD;AAED,OAAO,SAASG,WAAT,GAA8C;AACnD,gBAA6BV,MAAM,EAAnC;AAAA,MAAQG,MAAR,WAAQA,MAAR;AAAA,MAAgBQ,QAAhB,WAAgBA,QAAhB;;AAEA,wBAA0CZ,KAAK,CAACa,QAAN,CAAsC;AAC9EC,IAAAA,QAAQ,EAAE,KADoE;AAE9EC,IAAAA,SAAS,EAAE;AAFmE,GAAtC,CAA1C;AAAA;AAAA,MAAOC,aAAP;AAAA,MAAsBC,gBAAtB;;AAKA,MAAMC,mBAAmB,GAAGlB,KAAK,CAACmB,MAAN,CAAmD,IAAnD,CAA5B;AAEA,MAAMC,YAAY,GAAG;AACnBC,IAAAA,OAAO,EAAE,IADU;AAEnBC,IAAAA,OAAO,EAAE;AAFU,GAArB;AAKA;AACF;AACA;AACA;;AACEtB,EAAAA,KAAK,CAACuB,SAAN,CAAgB,YAAM;AACpBC,IAAAA,OAAO,CAAC,IAAD,CAAP;AACD,GAFD,EAEG,CAACA,OAAD,CAFH;;AAIA,WAASA,OAAT,CAAiBC,KAAjB,EAA2C;AAAA;;AACzCC,IAAAA,YAAY,CAACR,mBAAmB,CAACS,OAArB,CAAZ;AAEA,QAAIC,YAAY,GAAG;AACjBd,MAAAA,QAAQ,EAAE,CAACW,KAAK,KAAK,IAAV,IAAkBA,KAAK,CAACI,IAAN,KAAe,SAAlC,MACR,0BAAAjB,QAAQ,CAACkB,aAAT,gFAAwBC,OAAxB,MAAoC,OAApC,IACA,2BAAAnB,QAAQ,CAACkB,aAAT,kFAAwBC,OAAxB,MAAoC,UAF5B,CADO;AAKjBhB,MAAAA,SAAS,EAAE;AALM,KAAnB,CAHyC,CAWzC;;AACAG,IAAAA,mBAAmB,CAACS,OAApB,GAA8BK,UAAU,CAAC,YAAM;AAC7CJ,MAAAA,YAAY,CAACb,SAAb,GAAyBZ,uBAAuB,CAACC,MAAD,CAAhD;AACAa,MAAAA,gBAAgB,CAACW,YAAD,CAAhB;AACD,KAHuC,EAGrC,GAHqC,CAAxC;AAID;;AAED1B,EAAAA,sBAAsB,CAACU,QAAD,EAAW,UAAX,EAAuBY,OAAvB,EAAgCJ,YAAhC,CAAtB;AACAlB,EAAAA,sBAAsB,CAACU,QAAD,EAAW,SAAX,EAAsBY,OAAtB,EAA+BJ,YAA/B,CAAtB;AAEA,SAAOJ,aAAP;AACD","sourcesContent":["import * as React from 'react';\nimport { useDOM } from '../lib/dom';\nimport { useGlobalEventListener } from './useGlobalEventListener';\n\ninterface SoftwareKeyboardState {\n isOpened: boolean;\n isPrecise: boolean;\n}\n\n/**\n Проверяет, закрыла ли клавиатура часть экрана, 24% подошло к большиству устройств\n Работает на iOS и Android, где софт-клавиатура ресайзит viewport в браузерах\n */\nexport function getPreciseKeyboardState(window: any): boolean {\n const { availHeight } = window.screen;\n const { innerHeight } = window;\n\n const coveredViewportPercentage = Math.round((1 - innerHeight / availHeight) * 100);\n return coveredViewportPercentage > 24;\n}\n\nexport function useKeyboard(): SoftwareKeyboardState {\n const { window, document } = useDOM();\n\n const [keyboardState, setKeyboardState] = React.useState<SoftwareKeyboardState>({\n isOpened: false,\n isPrecise: false,\n });\n\n const transitionalTimeout = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const eventOptions = {\n passive: true,\n capture: false,\n };\n\n /**\n У полей с autoFocus не отлавливаются события focus, для этого вызываем вручную,\n чтобы иметь хоть какое-то понимание происходящего.\n */\n React.useEffect(() => {\n onFocus(true);\n }, [onFocus]);\n\n function onFocus(event: FocusEvent | true) {\n clearTimeout(transitionalTimeout.current);\n\n let returnObject = {\n isOpened: (event === true || event.type === 'focusin') && (\n document.activeElement?.tagName === 'INPUT' ||\n document.activeElement?.tagName === 'TEXTAREA'\n ),\n isPrecise: false,\n };\n\n // Ожидаем прохождение анимации раскрытия клавиатуры\n transitionalTimeout.current = setTimeout(() => {\n returnObject.isPrecise = getPreciseKeyboardState(window);\n setKeyboardState(returnObject);\n }, 300);\n }\n\n useGlobalEventListener(document, 'focusout', onFocus, eventOptions);\n useGlobalEventListener(document, 'focusin', onFocus, eventOptions);\n\n return keyboardState;\n}\n"],"file":"useKeyboard.js"}
|
|
@@ -7,13 +7,15 @@ export function useKeyboardInputTracker() {
|
|
|
7
7
|
var _useDOM = useDOM(),
|
|
8
8
|
document = _useDOM.document;
|
|
9
9
|
|
|
10
|
-
var _React$useState = React.useState(
|
|
10
|
+
var _React$useState = React.useState(false),
|
|
11
11
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
12
12
|
isKeyboardInputActive = _React$useState2[0],
|
|
13
13
|
toggleKeyboardInput = _React$useState2[1];
|
|
14
14
|
|
|
15
15
|
var enableKeyboardInput = React.useCallback(function (e) {
|
|
16
|
-
|
|
16
|
+
if (pressedKey(e) === Keys.TAB) {
|
|
17
|
+
toggleKeyboardInput(true);
|
|
18
|
+
}
|
|
17
19
|
}, []);
|
|
18
20
|
var disableKeyboardInput = React.useCallback(function () {
|
|
19
21
|
toggleKeyboardInput(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useKeyboardInputTracker.ts"],"names":["React","Keys","pressedKey","useDOM","useGlobalEventListener","useKeyboardInputTracker","document","useState","isKeyboardInputActive","toggleKeyboardInput","enableKeyboardInput","useCallback","e","TAB","disableKeyboardInput","eventOptions","passive","capture"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,EAAeC,UAAf;AACA,SAASC,MAAT;AACA,SAASC,sBAAT;AAEA,OAAO,SAASC,uBAAT,GAA4C;AACjD,gBAAqBF,MAAM,EAA3B;AAAA,MAAQG,QAAR,WAAQA,QAAR;;AAEA,wBAAqDN,KAAK,CAACO,QAAN,CAAwB,
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/useKeyboardInputTracker.ts"],"names":["React","Keys","pressedKey","useDOM","useGlobalEventListener","useKeyboardInputTracker","document","useState","isKeyboardInputActive","toggleKeyboardInput","enableKeyboardInput","useCallback","e","TAB","disableKeyboardInput","eventOptions","passive","capture"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,EAAeC,UAAf;AACA,SAASC,MAAT;AACA,SAASC,sBAAT;AAEA,OAAO,SAASC,uBAAT,GAA4C;AACjD,gBAAqBF,MAAM,EAA3B;AAAA,MAAQG,QAAR,WAAQA,QAAR;;AAEA,wBAAqDN,KAAK,CAACO,QAAN,CAAwB,KAAxB,CAArD;AAAA;AAAA,MAAOC,qBAAP;AAAA,MAA8BC,mBAA9B;;AAEA,MAAMC,mBAAmB,GAAGV,KAAK,CAACW,WAAN,CAAkB,UAACC,CAAD,EAAsB;AAClE,QAAIV,UAAU,CAACU,CAAD,CAAV,KAAkBX,IAAI,CAACY,GAA3B,EAAgC;AAC9BJ,MAAAA,mBAAmB,CAAC,IAAD,CAAnB;AACD;AACF,GAJ2B,EAIzB,EAJyB,CAA5B;AAMA,MAAMK,oBAAoB,GAAGd,KAAK,CAACW,WAAN,CAAkB,YAAM;AACnDF,IAAAA,mBAAmB,CAAC,KAAD,CAAnB;AACD,GAF4B,EAE1B,EAF0B,CAA7B;AAIA,MAAMM,YAAY,GAAG;AACnBC,IAAAA,OAAO,EAAE,IADU;AAEnBC,IAAAA,OAAO,EAAE;AAFU,GAArB;AAKAb,EAAAA,sBAAsB,CAACE,QAAD,EAAW,SAAX,EAAsBI,mBAAtB,EAA2CK,YAA3C,CAAtB;AACAX,EAAAA,sBAAsB,CAACE,QAAD,EAAW,WAAX,EAAwBQ,oBAAxB,EAA8CC,YAA9C,CAAtB;AACAX,EAAAA,sBAAsB,CAACE,QAAD,EAAW,YAAX,EAAyBQ,oBAAzB,EAA+CC,YAA/C,CAAtB;AAEA,SAAOP,qBAAP;AACD","sourcesContent":["import * as React from 'react';\nimport { Keys, pressedKey } from '../lib/accessibility';\nimport { useDOM } from '../lib/dom';\nimport { useGlobalEventListener } from './useGlobalEventListener';\n\nexport function useKeyboardInputTracker(): boolean {\n const { document } = useDOM();\n\n const [isKeyboardInputActive, toggleKeyboardInput] = React.useState<boolean>(false);\n\n const enableKeyboardInput = React.useCallback((e: KeyboardEvent) => {\n if (pressedKey(e) === Keys.TAB) {\n toggleKeyboardInput(true);\n }\n }, []);\n\n const disableKeyboardInput = React.useCallback(() => {\n toggleKeyboardInput(false);\n }, []);\n\n const eventOptions = {\n passive: true,\n capture: true,\n };\n\n useGlobalEventListener(document, 'keydown', enableKeyboardInput, eventOptions);\n useGlobalEventListener(document, 'mousedown', disableKeyboardInput, eventOptions);\n useGlobalEventListener(document, 'touchstart', disableKeyboardInput, eventOptions);\n\n return isKeyboardInputActive;\n}\n"],"file":"useKeyboardInputTracker.js"}
|
package/dist/index.d.ts
CHANGED
|
@@ -197,7 +197,7 @@ export { default as Div } from './components/Div/Div';
|
|
|
197
197
|
export type { DivProps } from './components/Div/Div';
|
|
198
198
|
export { default as Tappable } from './components/Tappable/Tappable';
|
|
199
199
|
export type { TappableProps } from './components/Tappable/Tappable';
|
|
200
|
-
export {
|
|
200
|
+
export { Touch } from './components/Touch/Touch';
|
|
201
201
|
export type { TouchProps } from './components/Touch/Touch';
|
|
202
202
|
export { default as PanelSpinner } from './components/PanelSpinner/PanelSpinner';
|
|
203
203
|
export type { PanelSpinnerProps } from './components/PanelSpinner/PanelSpinner';
|
package/dist/index.js
CHANGED
|
@@ -114,7 +114,7 @@ export { default as SliderSwitch } from "./components/SliderSwitch/SliderSwitch"
|
|
|
114
114
|
*/
|
|
115
115
|
export { default as Div } from "./components/Div/Div";
|
|
116
116
|
export { default as Tappable } from "./components/Tappable/Tappable";
|
|
117
|
-
export {
|
|
117
|
+
export { Touch } from "./components/Touch/Touch";
|
|
118
118
|
export { default as PanelSpinner } from "./components/PanelSpinner/PanelSpinner";
|
|
119
119
|
export { default as PanelHeaderClose } from "./components/PanelHeaderClose/PanelHeaderClose";
|
|
120
120
|
export { default as PanelHeaderBack } from "./components/PanelHeaderBack/PanelHeaderBack";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":["default","Root","View","Panel","PanelHeaderButton","PanelHeader","PanelHeaderContent","PanelHeaderContext","SplitLayout","SplitCol","Epic","Tabbar","TabbarItem","HorizontalScroll","FixedLayout","PopoutWrapper","Alert","ActionSheet","ActionSheetItem","ScreenSpinner","Snackbar","ModalRoot","withModalRootContext","ModalRootContext","ModalPage","ModalPageHeader","ModalCard","ModalDismissButton","Badge","Button","IconButton","Card","CardGrid","CardScroll","ContentCard","CellButton","Header","Group","Gradient","List","Cell","RichCell","SimpleCell","HorizontalCell","Footer","InfoRow","Gallery","Avatar","Progress","Search","Tabs","TabsItem","Spinner","PullToRefresh","Link","Tooltip","TooltipContainer","Counter","UsersStack","Separator","Spacing","Placeholder","Banner","MiniInfoCell","WriteBar","WriteBarIcon","SubnavigationBar","SubnavigationButton","FormLayout","FormItem","FormField","FormLayoutGroup","FormStatus","Switch","File","Input","Chip","ChipsInput","Slider","RangeSlider","Textarea","Radio","Checkbox","Select","SelectMimicry","NativeSelect","CustomSelect","CustomSelectOption","DatePicker","SliderSwitch","Div","Tappable","Touch","PanelSpinner","PanelHeaderClose","PanelHeaderBack","PanelHeaderSubmit","PanelHeaderEdit","ModalCardBase","AppRoot","AdaptivityProvider","ConfigProvider","ConfigProviderContext","Appearance","Scheme","WebviewType","PromoBanner","Title","Headline","Text","Caption","Subhead","withInsets","withPlatform","withAdaptivity","useInsets","usePlatform","useAdaptivity","useAppearance","classNamesString","classNames","animate","removeObjectKeys","SSRWrapper","platform","ANDROID","IOS","VKCOM","Platform","IS_PLATFORM_ANDROID","IS_PLATFORM_IOS","getClassName","ViewWidth","ViewHeight","SizeType"],"mappings":"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","sourcesContent":["import './lib/polyfills';\n\nimport './styles/constants.css';\nimport './styles/animations.css';\nimport './styles/common.css';\n\n/**\n * Layout\n */\nexport { default as Root } from './components/Root/Root';\nexport type { RootProps } from './components/Root/Root';\nexport { default as View } from './components/View/View';\nexport type { ViewProps } from './components/View/View';\nexport { Panel } from './components/Panel/Panel';\nexport type { PanelProps } from './components/Panel/Panel';\nexport { PanelHeaderButton } from './components/PanelHeaderButton/PanelHeaderButton';\nexport type { PanelHeaderButtonProps } from './components/PanelHeaderButton/PanelHeaderButton';\nexport { default as PanelHeader } from './components/PanelHeader/PanelHeader';\nexport type { PanelHeaderProps } from './components/PanelHeader/PanelHeader';\nexport { default as PanelHeaderContent } from './components/PanelHeaderContent/PanelHeaderContent';\nexport type { PanelHeaderContentProps } from './components/PanelHeaderContent/PanelHeaderContent';\nexport { PanelHeaderContext } from './components/PanelHeaderContext/PanelHeaderContext';\nexport type { PanelHeaderContextProps } from './components/PanelHeaderContext/PanelHeaderContext';\nexport { SplitLayout } from './components/SplitLayout/SplitLayout';\nexport type { SplitLayoutProps } from './components/SplitLayout/SplitLayout';\nexport { SplitCol } from './components/SplitCol/SplitCol';\nexport type { SplitColProps } from './components/SplitCol/SplitCol';\nexport { default as Epic } from './components/Epic/Epic';\nexport type { EpicProps } from './components/Epic/Epic';\nexport { default as Tabbar } from './components/Tabbar/Tabbar';\nexport type { TabbarProps } from './components/Tabbar/Tabbar';\nexport { default as TabbarItem } from './components/TabbarItem/TabbarItem';\nexport type { TabbarItemProps } from './components/TabbarItem/TabbarItem';\nexport { default as HorizontalScroll } from './components/HorizontalScroll/HorizontalScroll';\nexport type { HorizontalScrollProps } from './components/HorizontalScroll/HorizontalScroll';\nexport { default as FixedLayout } from './components/FixedLayout/FixedLayout';\nexport type { FixedLayoutProps } from './components/FixedLayout/FixedLayout';\n\n/**\n * Popouts\n */\nexport { PopoutWrapper } from './components/PopoutWrapper/PopoutWrapper';\nexport type { PopoutWrapperProps } from './components/PopoutWrapper/PopoutWrapper';\nexport { default as Alert } from './components/Alert/Alert';\nexport type { AlertProps, AlertActionInterface } from './components/Alert/Alert';\nexport { ActionSheet } from './components/ActionSheet/ActionSheet';\nexport type { ActionSheetProps } from './components/ActionSheet/ActionSheet';\nexport { default as ActionSheetItem } from './components/ActionSheetItem/ActionSheetItem';\nexport type { ActionSheetItemProps } from './components/ActionSheetItem/ActionSheetItem';\nexport { default as ScreenSpinner } from './components/ScreenSpinner/ScreenSpinner';\nexport type { ScreenSpinnerProps } from './components/ScreenSpinner/ScreenSpinner';\nexport { Snackbar } from './components/Snackbar/Snackbar';\nexport type { SnackbarProps } from './components/Snackbar/Snackbar';\n\n/**\n * Modals\n */\nexport { ModalRoot } from './components/ModalRoot/ModalRootAdaptive';\nexport type { ModalRootProps } from './components/ModalRoot/ModalRootAdaptive';\nexport { withModalRootContext } from './components/ModalRoot/withModalRootContext';\nexport { default as ModalRootContext } from './components/ModalRoot/ModalRootContext';\nexport { default as ModalPage } from './components/ModalPage/ModalPage';\nexport type { ModalPageProps } from './components/ModalPage/ModalPage';\nexport { default as ModalPageHeader } from './components/ModalPageHeader/ModalPageHeader';\nexport type { ModalPageHeaderProps } from './components/ModalPageHeader/ModalPageHeader';\nexport { default as ModalCard } from './components/ModalCard/ModalCard';\nexport type { ModalCardProps } from './components/ModalCard/ModalCard';\nexport { default as ModalDismissButton } from './components/ModalDismissButton/ModalDismissButton';\nexport type { ModalDismissButtonProps } from './components/ModalDismissButton/ModalDismissButton';\n\n/**\n * Blocks\n */\nexport { Badge } from './components/Badge/Badge';\nexport type { BadgeProps } from './components/Badge/Badge';\nexport { default as Button } from './components/Button/Button';\nexport type { ButtonProps } from './components/Button/Button';\nexport { default as IconButton } from './components/IconButton/IconButton';\nexport type { IconButtonProps } from './components/IconButton/IconButton';\nexport { default as Card } from './components/Card/Card';\nexport type { CardProps } from './components/Card/Card';\nexport { default as CardGrid } from './components/CardGrid/CardGrid';\nexport type { CardGridProps } from './components/CardGrid/CardGrid';\nexport { default as CardScroll } from './components/CardScroll/CardScroll';\nexport type { CardScrollProps } from './components/CardScroll/CardScroll';\nexport { default as ContentCard } from './components/ContentCard/ContentCard';\nexport type { ContentCardProps } from './components/ContentCard/ContentCard';\nexport { CellButton } from './components/CellButton/CellButton';\nexport type { CellButtonProps } from './components/CellButton/CellButton';\nexport { default as Header } from './components/Header/Header';\nexport type { HeaderProps } from './components/Header/Header';\nexport { default as Group } from './components/Group/Group';\nexport type { GroupProps } from './components/Group/Group';\nexport { default as Gradient } from './components/Gradient/Gradient';\nexport type { GradientProps } from './components/Gradient/Gradient';\nexport { default as List } from './components/List/List';\nexport { Cell } from './components/Cell/Cell';\nexport type { CellProps } from './components/Cell/Cell';\nexport { default as RichCell } from './components/RichCell/RichCell';\nexport type { RichCellProps } from './components/RichCell/RichCell';\nexport { default as SimpleCell } from './components/SimpleCell/SimpleCell';\nexport type { SimpleCellProps } from './components/SimpleCell/SimpleCell';\nexport { HorizontalCell } from './components/HorizontalCell/HorizontalCell';\nexport type { HorizontalCellProps } from './components/HorizontalCell/HorizontalCell';\nexport { default as Footer } from './components/Footer/Footer';\nexport { default as InfoRow } from './components/InfoRow/InfoRow';\nexport type { InfoRowProps } from './components/InfoRow/InfoRow';\nexport { default as Gallery } from './components/Gallery/Gallery';\nexport type { GalleryProps } from './components/Gallery/Gallery';\nexport { default as Avatar } from './components/Avatar/Avatar';\nexport type { AvatarProps } from './components/Avatar/Avatar';\nexport { default as Progress } from './components/Progress/Progress';\nexport type { ProgressProps } from './components/Progress/Progress';\nexport { default as Search } from './components/Search/Search';\nexport type { SearchProps } from './components/Search/Search';\nexport { default as Tabs } from './components/Tabs/Tabs';\nexport type { TabsProps } from './components/Tabs/Tabs';\nexport { default as TabsItem } from './components/TabsItem/TabsItem';\nexport type { TabsItemProps } from './components/TabsItem/TabsItem';\nexport { default as Spinner } from './components/Spinner/Spinner';\nexport type { SpinnerProps } from './components/Spinner/Spinner';\nexport { default as PullToRefresh } from './components/PullToRefresh/PullToRefresh';\nexport type { PullToRefreshProps } from './components/PullToRefresh/PullToRefresh';\nexport { default as Link } from './components/Link/Link';\nexport type { LinkProps } from './components/Link/Link';\nexport { default as Tooltip } from './components/Tooltip/Tooltip';\nexport type { TooltipProps } from './components/Tooltip/Tooltip';\nexport { TooltipContainer } from './components/Tooltip/TooltipContainer';\nexport { default as Counter } from './components/Counter/Counter';\nexport type { CounterProps } from './components/Counter/Counter';\nexport { default as UsersStack } from './components/UsersStack/UsersStack';\nexport type { UsersStackProps } from './components/UsersStack/UsersStack';\nexport { default as Separator } from './components/Separator/Separator';\nexport type { SeparatorProps } from './components/Separator/Separator';\nexport { Spacing } from './components/Spacing/Spacing';\nexport type { SpacingProps } from './components/Spacing/Spacing';\nexport { default as Placeholder } from './components/Placeholder/Placeholder';\nexport type { PlaceholderProps } from './components/Placeholder/Placeholder';\nexport { default as Banner } from './components/Banner/Banner';\nexport type { BannerProps } from './components/Banner/Banner';\nexport { MiniInfoCell } from './components/MiniInfoCell/MiniInfoCell';\nexport type { MiniInfoCellProps } from './components/MiniInfoCell/MiniInfoCell';\nexport { WriteBar } from './components/WriteBar/WriteBar';\nexport type { WriteBarProps } from './components/WriteBar/WriteBar';\nexport { WriteBarIcon } from './components/WriteBarIcon/WriteBarIcon';\nexport type { WriteBarIconProps } from './components/WriteBarIcon/WriteBarIcon';\nexport { SubnavigationBar } from './components/SubnavigationBar/SubnavigationBar';\nexport type { SubnavigationBarProps } from './components/SubnavigationBar/SubnavigationBar';\nexport { SubnavigationButton } from './components/SubnavigationButton/SubnavigationButton';\nexport type { SubnavigationButtonProps } from './components/SubnavigationButton/SubnavigationButton';\n\n/**\n * Forms\n */\nexport { default as FormLayout } from './components/FormLayout/FormLayout';\nexport type { FormLayoutProps } from './components/FormLayout/FormLayout';\nexport { FormItem } from './components/FormItem/FormItem';\nexport type { FormItemProps } from './components/FormItem/FormItem';\nexport { FormField } from './components/FormField/FormField';\nexport type { FormFieldProps } from './components/FormField/FormField';\nexport { default as FormLayoutGroup } from './components/FormLayoutGroup/FormLayoutGroup';\nexport type { FormLayoutGroupProps } from './components/FormLayoutGroup/FormLayoutGroup';\nexport { FormStatus } from './components/FormStatus/FormStatus';\nexport type { FormStatusProps } from './components/FormStatus/FormStatus';\nexport { Switch } from './components/Switch/Switch';\nexport type { SwitchProps } from './components/Switch/Switch';\nexport { default as File } from './components/File/File';\nexport type { FileProps } from './components/File/File';\nexport { default as Input } from './components/Input/Input';\nexport type { InputProps } from './components/Input/Input';\nexport { default as Chip } from './components/Chip/Chip';\nexport type { ChipProps } from './components/Chip/Chip';\nexport { default as ChipsInput } from './components/ChipsInput/ChipsInput';\nexport type { ChipsInputProps } from './components/ChipsInput/ChipsInput';\nexport { default as Slider } from './components/Slider/Slider';\nexport type { SliderProps } from './components/Slider/Slider';\nexport { default as RangeSlider } from './components/RangeSlider/RangeSlider';\nexport type { RangeSliderProps } from './components/RangeSlider/RangeSlider';\nexport { default as Textarea } from './components/Textarea/Textarea';\nexport type { TextareaProps } from './components/Textarea/Textarea';\nexport { default as Radio } from './components/Radio/Radio';\nexport type { RadioProps } from './components/Radio/Radio';\nexport { default as Checkbox } from './components/Checkbox/Checkbox';\nexport type { CheckboxProps } from './components/Checkbox/Checkbox';\nexport { default as Select } from './components/Select/Select';\nexport type { SelectProps } from './components/Select/Select';\nexport { default as SelectMimicry } from './components/SelectMimicry/SelectMimicry';\nexport type { SelectMimicryProps } from './components/SelectMimicry/SelectMimicry';\nexport { default as NativeSelect } from './components/NativeSelect/NativeSelect';\nexport type { NativeSelectProps } from './components/NativeSelect/NativeSelect';\nexport { default as CustomSelect } from './components/CustomSelect/CustomSelect';\nexport type { CustomSelectProps, CustomSelectOptionInterface } from './components/CustomSelect/CustomSelect';\nexport { default as CustomSelectOption } from './components/CustomSelectOption/CustomSelectOption';\nexport type { CustomSelectOptionProps } from './components/CustomSelectOption/CustomSelectOption';\nexport { default as DatePicker } from './components/DatePicker/DatePicker';\nexport type { DatePickerProps, DatePickerDateFormat } from './components/DatePicker/DatePicker';\nexport { default as SliderSwitch } from './components/SliderSwitch/SliderSwitch';\nexport type { SliderSwitchProps, SliderSwitchOptionInterface } from './components/SliderSwitch/SliderSwitch';\n\n/**\n * Helpers\n */\nexport { default as Div } from './components/Div/Div';\nexport type { DivProps } from './components/Div/Div';\nexport { default as Tappable } from './components/Tappable/Tappable';\nexport type { TappableProps } from './components/Tappable/Tappable';\nexport { default as Touch } from './components/Touch/Touch';\nexport type { TouchProps } from './components/Touch/Touch';\nexport { default as PanelSpinner } from './components/PanelSpinner/PanelSpinner';\nexport type { PanelSpinnerProps } from './components/PanelSpinner/PanelSpinner';\nexport { default as PanelHeaderClose } from './components/PanelHeaderClose/PanelHeaderClose';\nexport { default as PanelHeaderBack } from './components/PanelHeaderBack/PanelHeaderBack';\nexport { default as PanelHeaderSubmit } from './components/PanelHeaderSubmit/PanelHeaderSubmit';\nexport { default as PanelHeaderEdit } from './components/PanelHeaderEdit/PanelHeaderEdit';\nexport type { PanelHeaderEditProps } from './components/PanelHeaderEdit/PanelHeaderEdit';\nexport { ModalCardBase } from './components/ModalCardBase/ModalCardBase';\nexport type { ModalCardBaseProps } from './components/ModalCardBase/ModalCardBase';\n\n/**\n * Wrappers\n */\nexport { AppRoot } from './components/AppRoot/AppRoot';\nexport { default as AdaptivityProvider } from './components/AdaptivityProvider/AdaptivityProvider';\nexport { default as ConfigProvider } from './components/ConfigProvider/ConfigProvider';\nexport type { ConfigProviderProps } from './components/ConfigProvider/ConfigProvider';\nexport {\n ConfigProviderContext,\n Appearance,\n Scheme,\n WebviewType,\n} from './components/ConfigProvider/ConfigProviderContext';\n\n/**\n * Advertisement\n */\nexport { default as PromoBanner } from './components/PromoBanner/PromoBanner';\nexport type { PromoBannerProps } from './components/PromoBanner/PromoBanner';\n\n/**\n * Typography\n */\nexport { default as Title } from './components/Typography/Title/Title';\nexport type { TitleProps } from './components/Typography/Title/Title';\nexport { default as Headline } from './components/Typography/Headline/Headline';\nexport type { HeadlineProps } from './components/Typography/Headline/Headline';\nexport { default as Text } from './components/Typography/Text/Text';\nexport type { TextProps } from './components/Typography/Text/Text';\nexport { default as Caption } from './components/Typography/Caption/Caption';\nexport type { CaptionProps } from './components/Typography/Caption/Caption';\nexport { default as Subhead } from './components/Typography/Subhead/Subhead';\nexport type { SubheadProps } from './components/Typography/Subhead/Subhead';\n\n/**\n * HOCs\n */\nexport { withInsets } from './hoc/withInsets';\nexport { withPlatform } from './hoc/withPlatform';\nexport { withAdaptivity } from './hoc/withAdaptivity';\n\n/**\n * Hooks\n */\nexport { useInsets } from './hooks/useInsets';\nexport { usePlatform } from './hooks/usePlatform';\nexport { useAdaptivity } from './hooks/useAdaptivity';\nexport { useAppearance } from './hooks/useAppearance';\n\n/**\n * Utils\n */\nexport { classNamesString as classNames } from './lib/classNames';\nexport { default as animate } from './lib/animate';\nexport { removeObjectKeys } from './lib/removeObjectKeys';\nexport { SSRWrapper } from './lib/SSR';\nexport { platform, ANDROID, IOS, VKCOM, Platform, IS_PLATFORM_ANDROID, IS_PLATFORM_IOS } from './lib/platform';\nexport { getClassName } from './helpers/getClassName';\nexport { ViewWidth, ViewHeight, SizeType } from './components/AdaptivityProvider/AdaptivityContext';\n\n/**\n * Types\n */\nexport type { AlignType, HasPlatform, HasInsets } from './types';\nexport type { NavIdProps } from './lib/getNavId';\nexport type { PlatformType } from './lib/platform';\nexport type { AdaptivityProps } from './hoc/withAdaptivity';\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":["default","Root","View","Panel","PanelHeaderButton","PanelHeader","PanelHeaderContent","PanelHeaderContext","SplitLayout","SplitCol","Epic","Tabbar","TabbarItem","HorizontalScroll","FixedLayout","PopoutWrapper","Alert","ActionSheet","ActionSheetItem","ScreenSpinner","Snackbar","ModalRoot","withModalRootContext","ModalRootContext","ModalPage","ModalPageHeader","ModalCard","ModalDismissButton","Badge","Button","IconButton","Card","CardGrid","CardScroll","ContentCard","CellButton","Header","Group","Gradient","List","Cell","RichCell","SimpleCell","HorizontalCell","Footer","InfoRow","Gallery","Avatar","Progress","Search","Tabs","TabsItem","Spinner","PullToRefresh","Link","Tooltip","TooltipContainer","Counter","UsersStack","Separator","Spacing","Placeholder","Banner","MiniInfoCell","WriteBar","WriteBarIcon","SubnavigationBar","SubnavigationButton","FormLayout","FormItem","FormField","FormLayoutGroup","FormStatus","Switch","File","Input","Chip","ChipsInput","Slider","RangeSlider","Textarea","Radio","Checkbox","Select","SelectMimicry","NativeSelect","CustomSelect","CustomSelectOption","DatePicker","SliderSwitch","Div","Tappable","Touch","PanelSpinner","PanelHeaderClose","PanelHeaderBack","PanelHeaderSubmit","PanelHeaderEdit","ModalCardBase","AppRoot","AdaptivityProvider","ConfigProvider","ConfigProviderContext","Appearance","Scheme","WebviewType","PromoBanner","Title","Headline","Text","Caption","Subhead","withInsets","withPlatform","withAdaptivity","useInsets","usePlatform","useAdaptivity","useAppearance","classNamesString","classNames","animate","removeObjectKeys","SSRWrapper","platform","ANDROID","IOS","VKCOM","Platform","IS_PLATFORM_ANDROID","IS_PLATFORM_IOS","getClassName","ViewWidth","ViewHeight","SizeType"],"mappings":"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","sourcesContent":["import './lib/polyfills';\n\nimport './styles/constants.css';\nimport './styles/animations.css';\nimport './styles/common.css';\n\n/**\n * Layout\n */\nexport { default as Root } from './components/Root/Root';\nexport type { RootProps } from './components/Root/Root';\nexport { default as View } from './components/View/View';\nexport type { ViewProps } from './components/View/View';\nexport { Panel } from './components/Panel/Panel';\nexport type { PanelProps } from './components/Panel/Panel';\nexport { PanelHeaderButton } from './components/PanelHeaderButton/PanelHeaderButton';\nexport type { PanelHeaderButtonProps } from './components/PanelHeaderButton/PanelHeaderButton';\nexport { default as PanelHeader } from './components/PanelHeader/PanelHeader';\nexport type { PanelHeaderProps } from './components/PanelHeader/PanelHeader';\nexport { default as PanelHeaderContent } from './components/PanelHeaderContent/PanelHeaderContent';\nexport type { PanelHeaderContentProps } from './components/PanelHeaderContent/PanelHeaderContent';\nexport { PanelHeaderContext } from './components/PanelHeaderContext/PanelHeaderContext';\nexport type { PanelHeaderContextProps } from './components/PanelHeaderContext/PanelHeaderContext';\nexport { SplitLayout } from './components/SplitLayout/SplitLayout';\nexport type { SplitLayoutProps } from './components/SplitLayout/SplitLayout';\nexport { SplitCol } from './components/SplitCol/SplitCol';\nexport type { SplitColProps } from './components/SplitCol/SplitCol';\nexport { default as Epic } from './components/Epic/Epic';\nexport type { EpicProps } from './components/Epic/Epic';\nexport { default as Tabbar } from './components/Tabbar/Tabbar';\nexport type { TabbarProps } from './components/Tabbar/Tabbar';\nexport { default as TabbarItem } from './components/TabbarItem/TabbarItem';\nexport type { TabbarItemProps } from './components/TabbarItem/TabbarItem';\nexport { default as HorizontalScroll } from './components/HorizontalScroll/HorizontalScroll';\nexport type { HorizontalScrollProps } from './components/HorizontalScroll/HorizontalScroll';\nexport { default as FixedLayout } from './components/FixedLayout/FixedLayout';\nexport type { FixedLayoutProps } from './components/FixedLayout/FixedLayout';\n\n/**\n * Popouts\n */\nexport { PopoutWrapper } from './components/PopoutWrapper/PopoutWrapper';\nexport type { PopoutWrapperProps } from './components/PopoutWrapper/PopoutWrapper';\nexport { default as Alert } from './components/Alert/Alert';\nexport type { AlertProps, AlertActionInterface } from './components/Alert/Alert';\nexport { ActionSheet } from './components/ActionSheet/ActionSheet';\nexport type { ActionSheetProps } from './components/ActionSheet/ActionSheet';\nexport { default as ActionSheetItem } from './components/ActionSheetItem/ActionSheetItem';\nexport type { ActionSheetItemProps } from './components/ActionSheetItem/ActionSheetItem';\nexport { default as ScreenSpinner } from './components/ScreenSpinner/ScreenSpinner';\nexport type { ScreenSpinnerProps } from './components/ScreenSpinner/ScreenSpinner';\nexport { Snackbar } from './components/Snackbar/Snackbar';\nexport type { SnackbarProps } from './components/Snackbar/Snackbar';\n\n/**\n * Modals\n */\nexport { ModalRoot } from './components/ModalRoot/ModalRootAdaptive';\nexport type { ModalRootProps } from './components/ModalRoot/ModalRootAdaptive';\nexport { withModalRootContext } from './components/ModalRoot/withModalRootContext';\nexport { default as ModalRootContext } from './components/ModalRoot/ModalRootContext';\nexport { default as ModalPage } from './components/ModalPage/ModalPage';\nexport type { ModalPageProps } from './components/ModalPage/ModalPage';\nexport { default as ModalPageHeader } from './components/ModalPageHeader/ModalPageHeader';\nexport type { ModalPageHeaderProps } from './components/ModalPageHeader/ModalPageHeader';\nexport { default as ModalCard } from './components/ModalCard/ModalCard';\nexport type { ModalCardProps } from './components/ModalCard/ModalCard';\nexport { default as ModalDismissButton } from './components/ModalDismissButton/ModalDismissButton';\nexport type { ModalDismissButtonProps } from './components/ModalDismissButton/ModalDismissButton';\n\n/**\n * Blocks\n */\nexport { Badge } from './components/Badge/Badge';\nexport type { BadgeProps } from './components/Badge/Badge';\nexport { default as Button } from './components/Button/Button';\nexport type { ButtonProps } from './components/Button/Button';\nexport { default as IconButton } from './components/IconButton/IconButton';\nexport type { IconButtonProps } from './components/IconButton/IconButton';\nexport { default as Card } from './components/Card/Card';\nexport type { CardProps } from './components/Card/Card';\nexport { default as CardGrid } from './components/CardGrid/CardGrid';\nexport type { CardGridProps } from './components/CardGrid/CardGrid';\nexport { default as CardScroll } from './components/CardScroll/CardScroll';\nexport type { CardScrollProps } from './components/CardScroll/CardScroll';\nexport { default as ContentCard } from './components/ContentCard/ContentCard';\nexport type { ContentCardProps } from './components/ContentCard/ContentCard';\nexport { CellButton } from './components/CellButton/CellButton';\nexport type { CellButtonProps } from './components/CellButton/CellButton';\nexport { default as Header } from './components/Header/Header';\nexport type { HeaderProps } from './components/Header/Header';\nexport { default as Group } from './components/Group/Group';\nexport type { GroupProps } from './components/Group/Group';\nexport { default as Gradient } from './components/Gradient/Gradient';\nexport type { GradientProps } from './components/Gradient/Gradient';\nexport { default as List } from './components/List/List';\nexport { Cell } from './components/Cell/Cell';\nexport type { CellProps } from './components/Cell/Cell';\nexport { default as RichCell } from './components/RichCell/RichCell';\nexport type { RichCellProps } from './components/RichCell/RichCell';\nexport { default as SimpleCell } from './components/SimpleCell/SimpleCell';\nexport type { SimpleCellProps } from './components/SimpleCell/SimpleCell';\nexport { HorizontalCell } from './components/HorizontalCell/HorizontalCell';\nexport type { HorizontalCellProps } from './components/HorizontalCell/HorizontalCell';\nexport { default as Footer } from './components/Footer/Footer';\nexport { default as InfoRow } from './components/InfoRow/InfoRow';\nexport type { InfoRowProps } from './components/InfoRow/InfoRow';\nexport { default as Gallery } from './components/Gallery/Gallery';\nexport type { GalleryProps } from './components/Gallery/Gallery';\nexport { default as Avatar } from './components/Avatar/Avatar';\nexport type { AvatarProps } from './components/Avatar/Avatar';\nexport { default as Progress } from './components/Progress/Progress';\nexport type { ProgressProps } from './components/Progress/Progress';\nexport { default as Search } from './components/Search/Search';\nexport type { SearchProps } from './components/Search/Search';\nexport { default as Tabs } from './components/Tabs/Tabs';\nexport type { TabsProps } from './components/Tabs/Tabs';\nexport { default as TabsItem } from './components/TabsItem/TabsItem';\nexport type { TabsItemProps } from './components/TabsItem/TabsItem';\nexport { default as Spinner } from './components/Spinner/Spinner';\nexport type { SpinnerProps } from './components/Spinner/Spinner';\nexport { default as PullToRefresh } from './components/PullToRefresh/PullToRefresh';\nexport type { PullToRefreshProps } from './components/PullToRefresh/PullToRefresh';\nexport { default as Link } from './components/Link/Link';\nexport type { LinkProps } from './components/Link/Link';\nexport { default as Tooltip } from './components/Tooltip/Tooltip';\nexport type { TooltipProps } from './components/Tooltip/Tooltip';\nexport { TooltipContainer } from './components/Tooltip/TooltipContainer';\nexport { default as Counter } from './components/Counter/Counter';\nexport type { CounterProps } from './components/Counter/Counter';\nexport { default as UsersStack } from './components/UsersStack/UsersStack';\nexport type { UsersStackProps } from './components/UsersStack/UsersStack';\nexport { default as Separator } from './components/Separator/Separator';\nexport type { SeparatorProps } from './components/Separator/Separator';\nexport { Spacing } from './components/Spacing/Spacing';\nexport type { SpacingProps } from './components/Spacing/Spacing';\nexport { default as Placeholder } from './components/Placeholder/Placeholder';\nexport type { PlaceholderProps } from './components/Placeholder/Placeholder';\nexport { default as Banner } from './components/Banner/Banner';\nexport type { BannerProps } from './components/Banner/Banner';\nexport { MiniInfoCell } from './components/MiniInfoCell/MiniInfoCell';\nexport type { MiniInfoCellProps } from './components/MiniInfoCell/MiniInfoCell';\nexport { WriteBar } from './components/WriteBar/WriteBar';\nexport type { WriteBarProps } from './components/WriteBar/WriteBar';\nexport { WriteBarIcon } from './components/WriteBarIcon/WriteBarIcon';\nexport type { WriteBarIconProps } from './components/WriteBarIcon/WriteBarIcon';\nexport { SubnavigationBar } from './components/SubnavigationBar/SubnavigationBar';\nexport type { SubnavigationBarProps } from './components/SubnavigationBar/SubnavigationBar';\nexport { SubnavigationButton } from './components/SubnavigationButton/SubnavigationButton';\nexport type { SubnavigationButtonProps } from './components/SubnavigationButton/SubnavigationButton';\n\n/**\n * Forms\n */\nexport { default as FormLayout } from './components/FormLayout/FormLayout';\nexport type { FormLayoutProps } from './components/FormLayout/FormLayout';\nexport { FormItem } from './components/FormItem/FormItem';\nexport type { FormItemProps } from './components/FormItem/FormItem';\nexport { FormField } from './components/FormField/FormField';\nexport type { FormFieldProps } from './components/FormField/FormField';\nexport { default as FormLayoutGroup } from './components/FormLayoutGroup/FormLayoutGroup';\nexport type { FormLayoutGroupProps } from './components/FormLayoutGroup/FormLayoutGroup';\nexport { FormStatus } from './components/FormStatus/FormStatus';\nexport type { FormStatusProps } from './components/FormStatus/FormStatus';\nexport { Switch } from './components/Switch/Switch';\nexport type { SwitchProps } from './components/Switch/Switch';\nexport { default as File } from './components/File/File';\nexport type { FileProps } from './components/File/File';\nexport { default as Input } from './components/Input/Input';\nexport type { InputProps } from './components/Input/Input';\nexport { default as Chip } from './components/Chip/Chip';\nexport type { ChipProps } from './components/Chip/Chip';\nexport { default as ChipsInput } from './components/ChipsInput/ChipsInput';\nexport type { ChipsInputProps } from './components/ChipsInput/ChipsInput';\nexport { default as Slider } from './components/Slider/Slider';\nexport type { SliderProps } from './components/Slider/Slider';\nexport { default as RangeSlider } from './components/RangeSlider/RangeSlider';\nexport type { RangeSliderProps } from './components/RangeSlider/RangeSlider';\nexport { default as Textarea } from './components/Textarea/Textarea';\nexport type { TextareaProps } from './components/Textarea/Textarea';\nexport { default as Radio } from './components/Radio/Radio';\nexport type { RadioProps } from './components/Radio/Radio';\nexport { default as Checkbox } from './components/Checkbox/Checkbox';\nexport type { CheckboxProps } from './components/Checkbox/Checkbox';\nexport { default as Select } from './components/Select/Select';\nexport type { SelectProps } from './components/Select/Select';\nexport { default as SelectMimicry } from './components/SelectMimicry/SelectMimicry';\nexport type { SelectMimicryProps } from './components/SelectMimicry/SelectMimicry';\nexport { default as NativeSelect } from './components/NativeSelect/NativeSelect';\nexport type { NativeSelectProps } from './components/NativeSelect/NativeSelect';\nexport { default as CustomSelect } from './components/CustomSelect/CustomSelect';\nexport type { CustomSelectProps, CustomSelectOptionInterface } from './components/CustomSelect/CustomSelect';\nexport { default as CustomSelectOption } from './components/CustomSelectOption/CustomSelectOption';\nexport type { CustomSelectOptionProps } from './components/CustomSelectOption/CustomSelectOption';\nexport { default as DatePicker } from './components/DatePicker/DatePicker';\nexport type { DatePickerProps, DatePickerDateFormat } from './components/DatePicker/DatePicker';\nexport { default as SliderSwitch } from './components/SliderSwitch/SliderSwitch';\nexport type { SliderSwitchProps, SliderSwitchOptionInterface } from './components/SliderSwitch/SliderSwitch';\n\n/**\n * Helpers\n */\nexport { default as Div } from './components/Div/Div';\nexport type { DivProps } from './components/Div/Div';\nexport { default as Tappable } from './components/Tappable/Tappable';\nexport type { TappableProps } from './components/Tappable/Tappable';\nexport { Touch } from './components/Touch/Touch';\nexport type { TouchProps } from './components/Touch/Touch';\nexport { default as PanelSpinner } from './components/PanelSpinner/PanelSpinner';\nexport type { PanelSpinnerProps } from './components/PanelSpinner/PanelSpinner';\nexport { default as PanelHeaderClose } from './components/PanelHeaderClose/PanelHeaderClose';\nexport { default as PanelHeaderBack } from './components/PanelHeaderBack/PanelHeaderBack';\nexport { default as PanelHeaderSubmit } from './components/PanelHeaderSubmit/PanelHeaderSubmit';\nexport { default as PanelHeaderEdit } from './components/PanelHeaderEdit/PanelHeaderEdit';\nexport type { PanelHeaderEditProps } from './components/PanelHeaderEdit/PanelHeaderEdit';\nexport { ModalCardBase } from './components/ModalCardBase/ModalCardBase';\nexport type { ModalCardBaseProps } from './components/ModalCardBase/ModalCardBase';\n\n/**\n * Wrappers\n */\nexport { AppRoot } from './components/AppRoot/AppRoot';\nexport { default as AdaptivityProvider } from './components/AdaptivityProvider/AdaptivityProvider';\nexport { default as ConfigProvider } from './components/ConfigProvider/ConfigProvider';\nexport type { ConfigProviderProps } from './components/ConfigProvider/ConfigProvider';\nexport {\n ConfigProviderContext,\n Appearance,\n Scheme,\n WebviewType,\n} from './components/ConfigProvider/ConfigProviderContext';\n\n/**\n * Advertisement\n */\nexport { default as PromoBanner } from './components/PromoBanner/PromoBanner';\nexport type { PromoBannerProps } from './components/PromoBanner/PromoBanner';\n\n/**\n * Typography\n */\nexport { default as Title } from './components/Typography/Title/Title';\nexport type { TitleProps } from './components/Typography/Title/Title';\nexport { default as Headline } from './components/Typography/Headline/Headline';\nexport type { HeadlineProps } from './components/Typography/Headline/Headline';\nexport { default as Text } from './components/Typography/Text/Text';\nexport type { TextProps } from './components/Typography/Text/Text';\nexport { default as Caption } from './components/Typography/Caption/Caption';\nexport type { CaptionProps } from './components/Typography/Caption/Caption';\nexport { default as Subhead } from './components/Typography/Subhead/Subhead';\nexport type { SubheadProps } from './components/Typography/Subhead/Subhead';\n\n/**\n * HOCs\n */\nexport { withInsets } from './hoc/withInsets';\nexport { withPlatform } from './hoc/withPlatform';\nexport { withAdaptivity } from './hoc/withAdaptivity';\n\n/**\n * Hooks\n */\nexport { useInsets } from './hooks/useInsets';\nexport { usePlatform } from './hooks/usePlatform';\nexport { useAdaptivity } from './hooks/useAdaptivity';\nexport { useAppearance } from './hooks/useAppearance';\n\n/**\n * Utils\n */\nexport { classNamesString as classNames } from './lib/classNames';\nexport { default as animate } from './lib/animate';\nexport { removeObjectKeys } from './lib/removeObjectKeys';\nexport { SSRWrapper } from './lib/SSR';\nexport { platform, ANDROID, IOS, VKCOM, Platform, IS_PLATFORM_ANDROID, IS_PLATFORM_IOS } from './lib/platform';\nexport { getClassName } from './helpers/getClassName';\nexport { ViewWidth, ViewHeight, SizeType } from './components/AdaptivityProvider/AdaptivityContext';\n\n/**\n * Types\n */\nexport type { AlignType, HasPlatform, HasInsets } from './types';\nexport type { NavIdProps } from './lib/getNavId';\nexport type { PlatformType } from './lib/platform';\nexport type { AdaptivityProps } from './hoc/withAdaptivity';\n"],"file":"index.js"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import _createForOfIteratorHelper from "@babel/runtime/helpers/createForOfIteratorHelper";
|
|
2
|
+
|
|
3
|
+
var findAllIncludes = function findAllIncludes() {
|
|
4
|
+
var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
5
|
+
var search = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
6
|
+
var includes = [];
|
|
7
|
+
var i = target.indexOf(search);
|
|
8
|
+
|
|
9
|
+
while (i !== -1) {
|
|
10
|
+
includes.push(i);
|
|
11
|
+
i = target.indexOf(search, i + 1);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return includes;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var letterRegexp; // На момент написания флаг u не поддерживался рядом браузеров, поэтому добавили фоллбэк.
|
|
18
|
+
|
|
19
|
+
try {
|
|
20
|
+
letterRegexp = new RegExp('\\p{L}', 'u');
|
|
21
|
+
} catch (e) {}
|
|
22
|
+
|
|
23
|
+
export var defaultFilterFn = function defaultFilterFn() {
|
|
24
|
+
var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
25
|
+
var option = arguments.length > 1 ? arguments[1] : undefined;
|
|
26
|
+
var getOptionLabel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (option) {
|
|
27
|
+
return option.label;
|
|
28
|
+
};
|
|
29
|
+
query = query.toLocaleLowerCase();
|
|
30
|
+
var label = getOptionLabel(option).toLocaleLowerCase();
|
|
31
|
+
|
|
32
|
+
if (label.startsWith(query)) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var includes = findAllIncludes(label, query); // Ищем вхождение перед началом которого не буква
|
|
37
|
+
|
|
38
|
+
if (letterRegexp) {
|
|
39
|
+
var _iterator = _createForOfIteratorHelper(includes),
|
|
40
|
+
_step;
|
|
41
|
+
|
|
42
|
+
try {
|
|
43
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
44
|
+
var _index = _step.value;
|
|
45
|
+
|
|
46
|
+
if (!letterRegexp.test(label[_index - 1])) {
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
} catch (err) {
|
|
51
|
+
_iterator.e(err);
|
|
52
|
+
} finally {
|
|
53
|
+
_iterator.f();
|
|
54
|
+
}
|
|
55
|
+
} else {
|
|
56
|
+
// если regexp не поддерживается, то ищем любое вхождение
|
|
57
|
+
return includes.length > 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return false;
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/select.ts"],"names":["findAllIncludes","target","search","includes","i","indexOf","push","letterRegexp","RegExp","e","defaultFilterFn","query","option","getOptionLabel","label","toLocaleLowerCase","startsWith","index","test","length"],"mappings":";;AAOA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,GAA8B;AAAA,MAA7BC,MAA6B,uEAApB,EAAoB;AAAA,MAAhBC,MAAgB,uEAAP,EAAO;AACpD,MAAMC,QAAQ,GAAG,EAAjB;AAEA,MAAIC,CAAC,GAAGH,MAAM,CAACI,OAAP,CAAeH,MAAf,CAAR;;AACA,SAAOE,CAAC,KAAK,CAAC,CAAd,EAAiB;AACfD,IAAAA,QAAQ,CAACG,IAAT,CAAcF,CAAd;AACAA,IAAAA,CAAC,GAAGH,MAAM,CAACI,OAAP,CAAeH,MAAf,EAAuBE,CAAC,GAAG,CAA3B,CAAJ;AACD;;AAED,SAAOD,QAAP;AACD,CAVD;;AAYA,IAAII,YAAJ,C,CAEA;;AACA,IAAI;AACFA,EAAAA,YAAY,GAAG,IAAIC,MAAJ,CAAW,QAAX,EAAqB,GAArB,CAAf;AACD,CAFD,CAEE,OAAOC,CAAP,EAAU,CAAE;;AAEd,OAAO,IAAMC,eAAe,GAAG,SAAlBA,eAAkB,GAI1B;AAAA,MAHHC,KAGG,uEAHK,EAGL;AAAA,MAFHC,MAEG;AAAA,MADHC,cACG,uEAD8B,UAACD,MAAD;AAAA,WAAYA,MAAM,CAACE,KAAnB;AAAA,GAC9B;AACHH,EAAAA,KAAK,GAAGA,KAAK,CAACI,iBAAN,EAAR;AACA,MAAID,KAAK,GAAGD,cAAc,CAACD,MAAD,CAAd,CAAuBG,iBAAvB,EAAZ;;AAEA,MAAID,KAAK,CAACE,UAAN,CAAiBL,KAAjB,CAAJ,EAA6B;AAC3B,WAAO,IAAP;AACD;;AAED,MAAMR,QAAQ,GAAGH,eAAe,CAACc,KAAD,EAAQH,KAAR,CAAhC,CARG,CAUH;;AACA,MAAIJ,YAAJ,EAAkB;AAAA,+CACIJ,QADJ;AAAA;;AAAA;AAChB,0DAA8B;AAAA,YAAnBc,MAAmB;;AAC5B,YAAI,CAACV,YAAY,CAACW,IAAb,CAAkBJ,KAAK,CAACG,MAAK,GAAG,CAAT,CAAvB,CAAL,EAA0C;AACxC,iBAAO,IAAP;AACD;AACF;AALe;AAAA;AAAA;AAAA;AAAA;AAMjB,GAND,MAMO;AAAE;AACP,WAAOd,QAAQ,CAACgB,MAAT,GAAkB,CAAzB;AACD;;AAED,SAAO,KAAP;AACD,CA1BM","sourcesContent":["type Option = {\n label?: string;\n [index: string]: any;\n};\n\ntype GetOptionLabel = (option: Option) => string;\n\nconst findAllIncludes = (target = '', search = '') => {\n const includes = [];\n\n let i = target.indexOf(search);\n while (i !== -1) {\n includes.push(i);\n i = target.indexOf(search, i + 1);\n }\n\n return includes;\n};\n\nlet letterRegexp: RegExp;\n\n// На момент написания флаг u не поддерживался рядом браузеров, поэтому добавили фоллбэк.\ntry {\n letterRegexp = new RegExp('\\\\p{L}', 'u');\n} catch (e) {}\n\nexport const defaultFilterFn = (\n query = '',\n option: Option,\n getOptionLabel: GetOptionLabel = (option) => option.label,\n) => {\n query = query.toLocaleLowerCase();\n let label = getOptionLabel(option).toLocaleLowerCase();\n\n if (label.startsWith(query)) {\n return true;\n }\n\n const includes = findAllIncludes(label, query);\n\n // Ищем вхождение перед началом которого не буква\n if (letterRegexp) {\n for (const index of includes) {\n if (!letterRegexp.test(label[index - 1])) {\n return true;\n }\n }\n } else { // если regexp не поддерживается, то ищем любое вхождение\n return includes.length > 0;\n }\n\n return false;\n};\n"],"file":"select.js"}
|
package/dist/lib/touch.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export interface VKUITouchEvent extends MouseEvent, TouchEvent {
|
|
|
3
3
|
export declare type VKUITouchEventHander = (e: VKUITouchEvent) => void;
|
|
4
4
|
declare const coordX: (e: VKUITouchEvent) => number;
|
|
5
5
|
declare const coordY: (e: VKUITouchEvent) => number;
|
|
6
|
-
declare const touchEnabled: boolean;
|
|
6
|
+
declare const touchEnabled: () => boolean;
|
|
7
7
|
declare function getSupportedEvents(): string[];
|
|
8
8
|
declare function rubber(offset: number, dimension: number, resistanceRate: number, isAndroid: boolean): number;
|
|
9
9
|
export { getSupportedEvents, coordX, coordY, touchEnabled, rubber };
|
package/dist/lib/touch.js
CHANGED
|
@@ -24,15 +24,18 @@ var coordY = function coordY(e) {
|
|
|
24
24
|
}; // eslint-disable-next-line no-restricted-globals
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var touchEnabled =
|
|
27
|
+
var touchEnabled = function touchEnabled() {
|
|
28
|
+
return canUseDOM && 'ontouchstart' in window;
|
|
29
|
+
};
|
|
28
30
|
/*
|
|
29
31
|
* Возвращает массив поддерживаемых событий
|
|
30
32
|
* Если браузер поддерживает pointer events или подключена handjs, вернет события указателя.
|
|
31
33
|
* Если нет, используем события мыши
|
|
32
34
|
*/
|
|
33
35
|
|
|
36
|
+
|
|
34
37
|
function getSupportedEvents() {
|
|
35
|
-
if (touchEnabled) {
|
|
38
|
+
if (touchEnabled()) {
|
|
36
39
|
return ['touchstart', 'touchmove', 'touchend', 'touchcancel'];
|
|
37
40
|
}
|
|
38
41
|
|
package/dist/lib/touch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/touch.ts"],"names":["canUseDOM","coordX","e","clientX","changedTouches","coordY","clientY","touchEnabled","window","getSupportedEvents","rubber","offset","dimension","resistanceRate","isAndroid","offsettedResistance"],"mappings":"AAAA,SAASA,SAAT,QAA0B,iBAA1B;;AAKA;AACA;AACA;AACA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAACC,CAAD,EAA+B;AAC5C,MAAIA,CAAC,CAACC,OAAF,IAAa,IAAjB,EAAuB;AACrB,WAAOD,CAAC,CAACC,OAAT;AACD;;AACD,SAAOD,CAAC,CAACE,cAAF,IAAoBF,CAAC,CAACE,cAAF,CAAiB,CAAjB,EAAoBD,OAA/C;AACD,CALD;AAOA;AACA;AACA;;;AACA,IAAME,MAAM,GAAG,SAATA,MAAS,CAACH,CAAD,EAA+B;AAC5C,MAAIA,CAAC,CAACI,OAAF,IAAa,IAAjB,EAAuB;AACrB,WAAOJ,CAAC,CAACI,OAAT;AACD;;AACD,SAAOJ,CAAC,CAACE,cAAF,IAAoBF,CAAC,CAACE,cAAF,CAAiB,CAAjB,EAAoBE,OAA/C;AACD,CALD,C,CAOA;;;AACA,IAAMC,
|
|
1
|
+
{"version":3,"sources":["../../src/lib/touch.ts"],"names":["canUseDOM","coordX","e","clientX","changedTouches","coordY","clientY","touchEnabled","window","getSupportedEvents","rubber","offset","dimension","resistanceRate","isAndroid","offsettedResistance"],"mappings":"AAAA,SAASA,SAAT,QAA0B,iBAA1B;;AAKA;AACA;AACA;AACA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAACC,CAAD,EAA+B;AAC5C,MAAIA,CAAC,CAACC,OAAF,IAAa,IAAjB,EAAuB;AACrB,WAAOD,CAAC,CAACC,OAAT;AACD;;AACD,SAAOD,CAAC,CAACE,cAAF,IAAoBF,CAAC,CAACE,cAAF,CAAiB,CAAjB,EAAoBD,OAA/C;AACD,CALD;AAOA;AACA;AACA;;;AACA,IAAME,MAAM,GAAG,SAATA,MAAS,CAACH,CAAD,EAA+B;AAC5C,MAAIA,CAAC,CAACI,OAAF,IAAa,IAAjB,EAAuB;AACrB,WAAOJ,CAAC,CAACI,OAAT;AACD;;AACD,SAAOJ,CAAC,CAACE,cAAF,IAAoBF,CAAC,CAACE,cAAF,CAAiB,CAAjB,EAAoBE,OAA/C;AACD,CALD,C,CAOA;;;AACA,IAAMC,YAAY,GAAG,SAAfA,YAAe;AAAA,SAAMP,SAAS,IAAI,kBAAkBQ,MAArC;AAAA,CAArB;AAEA;AACA;AACA;AACA;AACA;;;AACA,SAASC,kBAAT,GAAwC;AACtC,MAAIF,YAAY,EAAhB,EAAoB;AAClB,WAAO,CAAC,YAAD,EAAe,WAAf,EAA4B,UAA5B,EAAwC,aAAxC,CAAP;AACD;;AAED,SAAO,CAAC,WAAD,EAAc,WAAd,EAA2B,SAA3B,EAAsC,YAAtC,CAAP;AACD;AAED;AACA;AACA;;;AACA,SAASG,MAAT,CAAgBC,MAAhB,EAAgCC,SAAhC,EAAmDC,cAAnD,EAA2EC,SAA3E,EAAuG;AACrG,MAAIA,SAAS,IAAIH,MAAM,GAAG,CAA1B,EAA6B;AAC3B,WAAOA,MAAP;AACD;;AAED,MAAMI,mBAAmB,GAAGJ,MAAM,GAAGE,cAArC;AACA,SAAOE,mBAAmB,GAAGH,SAAtB,IAAmCG,mBAAmB,GAAGH,SAAzD,CAAP;AACD;;AAED,SAASH,kBAAT,EAA6BR,MAA7B,EAAqCI,MAArC,EAA6CE,YAA7C,EAA2DG,MAA3D","sourcesContent":["import { canUseDOM } from '@vkontakte/vkjs';\n\nexport interface VKUITouchEvent extends MouseEvent, TouchEvent {}\nexport type VKUITouchEventHander = (e: VKUITouchEvent) => void;\n\n/*\n * Получает координату по оси абсцисс из touch- или mouse-события\n */\nconst coordX = (e: VKUITouchEvent): number => {\n if (e.clientX != null) {\n return e.clientX;\n }\n return e.changedTouches && e.changedTouches[0].clientX;\n};\n\n/*\n * Получает координату по оси ординат из touch- или mouse-события\n */\nconst coordY = (e: VKUITouchEvent): number => {\n if (e.clientY != null) {\n return e.clientY;\n }\n return e.changedTouches && e.changedTouches[0].clientY;\n};\n\n// eslint-disable-next-line no-restricted-globals\nconst touchEnabled = () => canUseDOM && 'ontouchstart' in window;\n\n/*\n * Возвращает массив поддерживаемых событий\n * Если браузер поддерживает pointer events или подключена handjs, вернет события указателя.\n * Если нет, используем события мыши\n */\nfunction getSupportedEvents(): string[] {\n if (touchEnabled()) {\n return ['touchstart', 'touchmove', 'touchend', 'touchcancel'];\n }\n\n return ['mousedown', 'mousemove', 'mouseup', 'mouseleave'];\n}\n\n/*\n * Рассчитывает \"сопротивление\" для iOS тач-событий\n */\nfunction rubber(offset: number, dimension: number, resistanceRate: number, isAndroid: boolean): number {\n if (isAndroid || offset < 0) {\n return offset;\n }\n\n const offsettedResistance = offset * resistanceRate;\n return offsettedResistance * dimension / (offsettedResistance + dimension);\n}\n\nexport { getSupportedEvents, coordX, coordY, touchEnabled, rubber };\n"],"file":"touch.js"}
|