@vkontakte/vkui 4.37.0 → 4.37.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cache/.eslintcache +1 -1
- package/.cache/.stylelintcache +1 -1
- package/.cache/.tsbuildinfo +5 -5
- package/dist/cjs/appearance/constants.d.ts +1 -0
- package/dist/cjs/components/ActionSheet/ActionSheet.d.ts +29 -0
- package/dist/cjs/components/ActionSheet/ActionSheetContext.d.ts +8 -0
- package/dist/cjs/components/ActionSheet/ActionSheetDefaultIosCloseItem.d.ts +3 -0
- package/dist/cjs/components/ActionSheet/ActionSheetDropdown.d.ts +4 -0
- package/dist/cjs/components/ActionSheet/ActionSheetDropdownDesktop.d.ts +4 -0
- package/dist/cjs/components/ActionSheet/types.d.ts +9 -0
- package/dist/cjs/components/ActionSheetItem/ActionSheetItem.d.ts +27 -0
- package/dist/cjs/components/AdaptivityProvider/AdaptivityContext.d.ts +46 -0
- package/dist/cjs/components/AdaptivityProvider/AdaptivityProvider.d.ts +15 -0
- package/dist/cjs/components/Alert/Alert.d.ts +25 -0
- package/dist/cjs/components/AppRoot/AppRoot.d.ts +23 -0
- package/dist/cjs/components/AppRoot/AppRootContext.d.ts +10 -0
- package/dist/cjs/components/AppRoot/AppRootPortal.d.ts +7 -0
- package/dist/cjs/components/AppRoot/ScrollContext.d.ts +27 -0
- package/dist/cjs/components/AppRoot/ScrollContext.js +9 -1
- package/dist/cjs/components/AppRoot/ScrollContext.js.map +1 -1
- package/dist/cjs/components/AppearanceProvider/AppearanceProvider.d.ts +11 -0
- package/dist/cjs/components/AppearanceProvider/AppearanceProviderContext.d.ts +3 -0
- package/dist/cjs/components/Avatar/Avatar.d.ts +24 -0
- package/dist/cjs/components/Badge/Badge.d.ts +9 -0
- package/dist/cjs/components/Banner/Banner.d.ts +67 -0
- package/dist/cjs/components/BaseGallery/BaseGallery.d.ts +4 -0
- package/dist/cjs/components/BaseGallery/helpers.d.ts +12 -0
- package/dist/cjs/components/BaseGallery/types.d.ts +43 -0
- package/dist/cjs/components/Button/Button.d.ts +22 -0
- package/dist/cjs/components/ButtonGroup/ButtonGroup.d.ts +27 -0
- package/dist/cjs/components/Calendar/Calendar.d.ts +34 -0
- package/dist/cjs/components/CalendarDay/CalendarDay.d.ts +24 -0
- package/dist/cjs/components/CalendarDays/CalendarDays.d.ts +24 -0
- package/dist/cjs/components/CalendarHeader/CalendarHeader.d.ts +29 -0
- package/dist/cjs/components/CalendarRange/CalendarRange.d.ts +19 -0
- package/dist/cjs/components/CalendarTime/CalendarTime.d.ts +11 -0
- package/dist/cjs/components/Card/Card.d.ts +10 -0
- package/dist/cjs/components/CardGrid/CardGrid.d.ts +14 -0
- package/dist/cjs/components/CardScroll/CardScroll.d.ts +15 -0
- package/dist/cjs/components/Cell/Cell.d.ts +50 -0
- package/dist/cjs/components/Cell/CellCheckbox/CellCheckbox.d.ts +5 -0
- package/dist/cjs/components/Cell/CellDragger/CellDragger.d.ts +6 -0
- package/dist/cjs/components/Cell/useDraggable.d.ts +15 -0
- package/dist/cjs/components/CellButton/CellButton.d.ts +11 -0
- package/dist/cjs/components/Checkbox/Checkbox.d.ts +15 -0
- package/dist/cjs/components/Chip/Chip.d.ts +26 -0
- package/dist/cjs/components/ChipsInput/ChipsInput.d.ts +11 -0
- package/dist/cjs/components/ChipsInputBase/ChipsInputBase.d.ts +17 -0
- package/dist/cjs/components/ChipsSelect/ChipsSelect.d.ts +45 -0
- package/dist/cjs/components/ConfigProvider/ConfigProvider.d.ts +19 -0
- package/dist/cjs/components/ConfigProvider/ConfigProviderContext.d.ts +37 -0
- package/dist/cjs/components/ContentCard/ContentCard.d.ts +36 -0
- package/dist/cjs/components/Counter/Counter.d.ts +13 -0
- package/dist/cjs/components/CustomScrollView/CustomScrollView.d.ts +11 -0
- package/dist/cjs/components/CustomScrollView/useTrackerVisibility.d.ts +43 -0
- package/dist/cjs/components/CustomSelect/CustomSelect.d.ts +62 -0
- package/dist/cjs/components/CustomSelectDropdown/CustomSelectDropdown.d.ts +17 -0
- package/dist/cjs/components/CustomSelectOption/CustomSelectOption.d.ts +47 -0
- package/dist/cjs/components/DateInput/DateInput.d.ts +17 -0
- package/dist/cjs/components/DatePicker/DatePicker.d.ts +23 -0
- package/dist/cjs/components/DateRangeInput/DateRangeInput.d.ts +23 -0
- package/dist/cjs/components/Div/Div.d.ts +9 -0
- package/dist/cjs/components/Dropdown/Dropdown.d.ts +52 -0
- package/dist/cjs/components/DropdownIcon/DropdownIcon.d.ts +5 -0
- package/dist/cjs/components/Epic/Epic.d.ts +11 -0
- package/dist/cjs/components/Epic/ScrollSaver.d.ts +10 -0
- package/dist/cjs/components/File/File.d.ts +13 -0
- package/dist/cjs/components/FixedLayout/FixedLayout.d.ts +21 -0
- package/dist/cjs/components/FixedLayout/FixedLayout.js +1 -1
- package/dist/cjs/components/FixedLayout/FixedLayout.js.map +1 -1
- package/dist/cjs/components/FocusTrap/FocusTrap.d.ts +11 -0
- package/dist/cjs/components/FocusVisible/FocusVisible.d.ts +10 -0
- package/dist/cjs/components/Footer/Footer.d.ts +8 -0
- package/dist/cjs/components/FormField/FormField.d.ts +37 -0
- package/dist/cjs/components/FormItem/FormItem.d.ts +17 -0
- package/dist/cjs/components/FormLayout/FormLayout.d.ts +8 -0
- package/dist/cjs/components/FormLayoutGroup/FormLayoutGroup.d.ts +19 -0
- package/dist/cjs/components/FormStatus/FormStatus.d.ts +11 -0
- package/dist/cjs/components/Gallery/Gallery.d.ts +10 -0
- package/dist/cjs/components/Gradient/Gradient.d.ts +16 -0
- package/dist/cjs/components/GridAvatar/GridAvatar.d.ts +15 -0
- package/dist/cjs/components/Group/Group.d.ts +30 -0
- package/dist/cjs/components/Header/Header.d.ts +20 -0
- package/dist/cjs/components/HorizontalCell/HorizontalCell.d.ts +13 -0
- package/dist/cjs/components/HorizontalScroll/HorizontalScroll.d.ts +22 -0
- package/dist/cjs/components/HorizontalScroll/HorizontalScrollArrow.d.ts +8 -0
- package/dist/cjs/components/HoverPopper/HoverPopper.d.ts +29 -0
- package/dist/cjs/components/IconButton/IconButton.d.ts +14 -0
- package/dist/cjs/components/InfoRow/InfoRow.d.ts +9 -0
- package/dist/cjs/components/InitialsAvatar/InitialsAvatar.d.ts +35 -0
- package/dist/cjs/components/Input/Input.d.ts +11 -0
- package/dist/cjs/components/InputLike/InputLike.d.ts +13 -0
- package/dist/cjs/components/InputLike/InputLikeDivider.d.ts +3 -0
- package/dist/cjs/components/Link/Link.d.ts +13 -0
- package/dist/cjs/components/List/List.d.ts +7 -0
- package/dist/cjs/components/List/ListContext.d.ts +4 -0
- package/dist/cjs/components/LocaleProviderContext/LocaleProviderContext.d.ts +2 -0
- package/dist/cjs/components/MiniInfoCell/MiniInfoCell.d.ts +42 -0
- package/dist/cjs/components/ModalCard/ModalCard.d.ts +12 -0
- package/dist/cjs/components/ModalCardBase/ModalCardBase.d.ts +39 -0
- package/dist/cjs/components/ModalDismissButton/ModalDismissButton.d.ts +7 -0
- package/dist/cjs/components/ModalPage/ModalPage.d.ts +51 -0
- package/dist/cjs/components/ModalPageHeader/ModalPageHeader.d.ts +10 -0
- package/dist/cjs/components/ModalRoot/ModalRoot.d.ts +29 -0
- package/dist/cjs/components/ModalRoot/ModalRootAdaptive.d.ts +26 -0
- package/dist/cjs/components/ModalRoot/ModalRootContext.d.ts +20 -0
- package/dist/cjs/components/ModalRoot/ModalRootDesktop.d.ts +29 -0
- package/dist/cjs/components/ModalRoot/constants.d.ts +3 -0
- package/dist/cjs/components/ModalRoot/types.d.ts +60 -0
- package/dist/cjs/components/ModalRoot/useModalManager.d.ts +39 -0
- package/dist/cjs/components/ModalRoot/withModalRootContext.d.ts +5 -0
- package/dist/cjs/components/NativeSelect/NativeSelect.d.ts +20 -0
- package/dist/cjs/components/NavTransitionContext/NavTransitionContext.d.ts +6 -0
- package/dist/cjs/components/Pagination/Pagination.d.ts +45 -0
- package/dist/cjs/components/Panel/Panel.d.ts +12 -0
- package/dist/cjs/components/PanelHeader/PanelHeader.d.ts +31 -0
- package/dist/cjs/components/PanelHeaderBack/PanelHeaderBack.d.ts +12 -0
- package/dist/cjs/components/PanelHeaderButton/PanelHeaderButton.d.ts +11 -0
- package/dist/cjs/components/PanelHeaderClose/PanelHeaderClose.d.ts +6 -0
- package/dist/cjs/components/PanelHeaderContent/PanelHeaderContent.d.ts +11 -0
- package/dist/cjs/components/PanelHeaderContext/PanelHeaderContext.d.ts +10 -0
- package/dist/cjs/components/PanelHeaderEdit/PanelHeaderEdit.d.ts +20 -0
- package/dist/cjs/components/PanelHeaderSubmit/PanelHeaderSubmit.d.ts +6 -0
- package/dist/cjs/components/PanelSpinner/PanelSpinner.d.ts +9 -0
- package/dist/cjs/components/Placeholder/Placeholder.d.ts +25 -0
- package/dist/cjs/components/PopoutRoot/PopoutRoot.d.ts +13 -0
- package/dist/cjs/components/PopoutWrapper/PopoutWrapper.d.ts +13 -0
- package/dist/cjs/components/Popper/Popper.d.ts +57 -0
- package/dist/cjs/components/PopperArrow/PopperArrow.d.ts +8 -0
- package/dist/cjs/components/Progress/Progress.d.ts +10 -0
- package/dist/cjs/components/PromoBanner/PromoBanner.d.ts +43 -0
- package/dist/cjs/components/PullToRefresh/PullToRefresh.d.ts +22 -0
- package/dist/cjs/components/PullToRefresh/PullToRefreshSpinner.d.ts +10 -0
- package/dist/cjs/components/Radio/Radio.d.ts +11 -0
- package/dist/cjs/components/RadioGroup/RadioGroup.d.ts +9 -0
- package/dist/cjs/components/RangeSlider/RangeSlider.d.ts +8 -0
- package/dist/cjs/components/RangeSlider/UniversalSlider.d.ts +16 -0
- package/dist/cjs/components/Removable/Removable.d.ts +24 -0
- package/dist/cjs/components/RichCell/RichCell.d.ts +56 -0
- package/dist/cjs/components/RichTooltip/RichTooltip.d.ts +13 -0
- package/dist/cjs/components/Root/Root.d.ts +33 -0
- package/dist/cjs/components/ScreenSpinner/Icon48CancelCircle.d.ts +3 -0
- package/dist/cjs/components/ScreenSpinner/Icon48DoneOutline.d.ts +3 -0
- package/dist/cjs/components/ScreenSpinner/ScreenSpinner.d.ts +10 -0
- package/dist/cjs/components/Search/Search.d.ts +16 -0
- package/dist/cjs/components/SegmentedControl/SegmentedControl.d.ts +20 -0
- package/dist/cjs/components/SegmentedControl/SegmentedControlOption/SegmentedControlOption.d.ts +7 -0
- package/dist/cjs/components/Select/Select.d.ts +18 -0
- package/dist/cjs/components/SelectMimicry/SelectMimicry.d.ts +15 -0
- package/dist/cjs/components/Separator/Separator.d.ts +16 -0
- package/dist/cjs/components/SimpleCell/SimpleCell.d.ts +74 -0
- package/dist/cjs/components/SimpleCheckbox/SimpleCheckbox.d.ts +12 -0
- package/dist/cjs/components/Slider/Slider.d.ts +7 -0
- package/dist/cjs/components/SliderSwitch/SliderSwitch.d.ts +48 -0
- package/dist/cjs/components/SliderSwitch/SliderSwitchButton.d.ts +11 -0
- package/dist/cjs/components/Snackbar/Snackbar.d.ts +42 -0
- package/dist/cjs/components/Spacing/Spacing.d.ts +23 -0
- package/dist/cjs/components/Spinner/Spinner.d.ts +9 -0
- package/dist/cjs/components/SplitCol/SplitCol.d.ts +26 -0
- package/dist/cjs/components/SplitLayout/SplitLayout.d.ts +18 -0
- package/dist/cjs/components/SubnavigationBar/SubnavigationBar.d.ts +10 -0
- package/dist/cjs/components/SubnavigationButton/SubnavigationButton.d.ts +25 -0
- package/dist/cjs/components/Switch/Switch.d.ts +10 -0
- package/dist/cjs/components/Tabbar/Tabbar.d.ts +20 -0
- package/dist/cjs/components/TabbarItem/TabbarItem.d.ts +23 -0
- package/dist/cjs/components/Tabs/Tabs.d.ts +23 -0
- package/dist/cjs/components/TabsItem/TabsItem.d.ts +31 -0
- package/dist/cjs/components/Tappable/Tappable.d.ts +46 -0
- package/dist/cjs/components/TextTooltip/TextTooltip.d.ts +21 -0
- package/dist/cjs/components/Textarea/Textarea.d.ts +14 -0
- package/dist/cjs/components/Tooltip/Tooltip.d.ts +75 -0
- package/dist/cjs/components/Tooltip/TooltipContainer.d.ts +5 -0
- package/dist/cjs/components/Touch/Touch.d.ts +52 -0
- package/dist/cjs/components/Touch/TouchContext.d.ts +7 -0
- package/dist/cjs/components/Typography/Caption/Caption.d.ts +17 -0
- package/dist/cjs/components/Typography/Footnote/Footnote.d.ts +14 -0
- package/dist/cjs/components/Typography/Headline/Headline.d.ts +16 -0
- package/dist/cjs/components/Typography/Paragraph/Paragraph.d.ts +13 -0
- package/dist/cjs/components/Typography/Subhead/Subhead.d.ts +15 -0
- package/dist/cjs/components/Typography/Text/Text.d.ts +15 -0
- package/dist/cjs/components/Typography/Title/Title.d.ts +16 -0
- package/dist/cjs/components/UsersStack/UsersStack.d.ts +31 -0
- package/dist/cjs/components/View/View.d.ts +67 -0
- package/dist/cjs/components/View/View.js +2 -0
- package/dist/cjs/components/View/View.js.map +1 -1
- package/dist/cjs/components/View/ViewInfinite.d.ts +66 -0
- package/dist/cjs/components/View/utils.d.ts +2 -0
- package/dist/cjs/components/VisuallyHiddenInput/VisuallyHiddenInput.d.ts +12 -0
- package/dist/cjs/components/WriteBar/WriteBar.d.ts +30 -0
- package/dist/cjs/components/WriteBar/WriteBar.js +2 -5
- package/dist/cjs/components/WriteBar/WriteBar.js.map +1 -1
- package/dist/cjs/components/WriteBarIcon/WriteBarIcon.d.ts +21 -0
- package/dist/cjs/components/WriteBarIcon/WriteBarIcon.js +15 -3
- package/dist/cjs/components/WriteBarIcon/WriteBarIcon.js.map +1 -1
- package/dist/cjs/helpers/avatar.d.ts +5 -0
- package/dist/cjs/helpers/getClassName.d.ts +2 -0
- package/dist/cjs/helpers/getScheme.d.ts +8 -0
- package/dist/cjs/helpers/math.d.ts +5 -0
- package/dist/cjs/helpers/scheme.d.ts +34 -0
- package/dist/cjs/hoc/withAdaptivity.d.ts +13 -0
- package/dist/cjs/hoc/withContext.d.ts +2 -0
- package/dist/cjs/hoc/withInsets.d.ts +3 -0
- package/dist/cjs/hoc/withPlatform.d.ts +3 -0
- package/dist/cjs/hooks/useAdaptivity.d.ts +4 -0
- package/dist/cjs/hooks/useAppearance.d.ts +1 -0
- package/dist/cjs/hooks/useBooleanState.d.ts +6 -0
- package/dist/cjs/hooks/useBridgeAdaptivity.d.ts +6 -0
- package/dist/cjs/hooks/useBrowserInfo.d.ts +2 -0
- package/dist/cjs/hooks/useCalendar.d.ts +19 -0
- package/dist/cjs/hooks/useChipsInput.d.ts +15 -0
- package/dist/cjs/hooks/useChipsSelect.d.ts +22 -0
- package/dist/cjs/hooks/useDateInput.d.ts +30 -0
- package/dist/cjs/hooks/useEffectDev.d.ts +2 -0
- package/dist/cjs/hooks/useEnsuredControl.d.ts +7 -0
- package/dist/cjs/hooks/useEventListener.d.ts +7 -0
- package/dist/cjs/hooks/useExternRef.d.ts +2 -0
- package/dist/cjs/hooks/useFocusVisible.d.ts +6 -0
- package/dist/cjs/hooks/useGlobalEventListener.d.ts +2 -0
- package/dist/cjs/hooks/useInsets.d.ts +8 -0
- package/dist/cjs/hooks/useKeyboard.d.ts +10 -0
- package/dist/cjs/hooks/useKeyboardInputTracker.d.ts +3 -0
- package/dist/cjs/hooks/useObjectMemo.d.ts +2 -0
- package/dist/cjs/hooks/useOrientationChange.d.ts +7 -0
- package/dist/cjs/hooks/usePagination.d.ts +34 -0
- package/dist/cjs/hooks/usePatchChildrenRef.d.ts +6 -0
- package/dist/cjs/hooks/usePlatform.d.ts +2 -0
- package/dist/cjs/hooks/usePrevious.d.ts +1 -0
- package/dist/cjs/hooks/useTimeout.d.ts +4 -0
- package/dist/cjs/hooks/useWaitTransitionFinish.d.ts +3 -0
- package/dist/cjs/index.d.ts +310 -0
- package/dist/cjs/lib/SSR.d.ts +18 -0
- package/dist/cjs/lib/accessibility.d.ts +10 -0
- package/dist/cjs/lib/animate.d.ts +15 -0
- package/dist/cjs/lib/browser.d.ts +11 -0
- package/dist/cjs/lib/calendar.d.ts +14 -0
- package/dist/cjs/lib/callMultiple.d.ts +1 -0
- package/dist/cjs/lib/classNames.d.ts +6 -0
- package/dist/cjs/lib/classScopingMode.d.ts +8 -0
- package/dist/cjs/lib/date.d.ts +29 -0
- package/dist/cjs/lib/dom.d.ts +21 -0
- package/dist/cjs/lib/fx.d.ts +5 -0
- package/dist/cjs/lib/getNavId.d.ts +7 -0
- package/dist/cjs/lib/is.d.ts +1 -0
- package/dist/cjs/lib/isRefObject.d.ts +2 -0
- package/dist/cjs/lib/jsxRuntime.d.ts +8 -0
- package/dist/cjs/lib/offset.d.ts +7 -0
- package/dist/cjs/lib/platform.d.ts +19 -0
- package/dist/cjs/lib/polyfills.d.ts +6 -0
- package/dist/cjs/lib/prefixClass.d.ts +1 -0
- package/dist/cjs/lib/removeObjectKeys.d.ts +1 -0
- package/dist/cjs/lib/select.d.ts +9 -0
- package/dist/cjs/lib/styles.d.ts +1 -0
- package/dist/cjs/lib/supportEvents.d.ts +9 -0
- package/dist/cjs/lib/taptic.d.ts +2 -0
- package/dist/cjs/lib/testing.d.ts +1 -0
- package/dist/cjs/lib/touch.d.ts +9 -0
- package/dist/cjs/lib/useIsomorphicLayoutEffect.d.ts +2 -0
- package/dist/cjs/lib/utils.d.ts +16 -0
- package/dist/cjs/lib/warnOnce.d.ts +2 -0
- package/dist/cjs/tokenized/index.d.ts +238 -0
- package/dist/cjs/types.d.ts +37 -0
- package/dist/cjs/unstable/index.d.ts +17 -0
- package/dist/components/AppRoot/ScrollContext.js +9 -1
- package/dist/components/AppRoot/ScrollContext.js.map +1 -1
- package/dist/components/FixedLayout/FixedLayout.js +1 -1
- package/dist/components/FixedLayout/FixedLayout.js.map +1 -1
- package/dist/components/View/View.js +2 -0
- package/dist/components/View/View.js.map +1 -1
- package/dist/components/WriteBar/WriteBar.js +2 -5
- package/dist/components/WriteBar/WriteBar.js.map +1 -1
- package/dist/components/WriteBarIcon/WriteBarIcon.js +15 -3
- package/dist/components/WriteBarIcon/WriteBarIcon.js.map +1 -1
- package/dist/cssm/components/AppRoot/ScrollContext.js +9 -1
- package/dist/cssm/components/AppRoot/ScrollContext.js.map +1 -1
- package/dist/cssm/components/FixedLayout/FixedLayout.js +1 -1
- package/dist/cssm/components/FixedLayout/FixedLayout.js.map +1 -1
- package/dist/cssm/components/View/View.js +2 -0
- package/dist/cssm/components/View/View.js.map +1 -1
- package/dist/cssm/components/WriteBar/WriteBar.js +2 -5
- package/dist/cssm/components/WriteBar/WriteBar.js.map +1 -1
- package/dist/cssm/components/WriteBarIcon/WriteBarIcon.js +15 -3
- package/dist/cssm/components/WriteBarIcon/WriteBarIcon.js.map +1 -1
- package/package.json +2 -2
- package/src/components/AppRoot/ScrollContext.tsx +13 -1
- package/src/components/FixedLayout/FixedLayout.tsx +1 -1
- package/src/components/View/View.tsx +2 -0
- package/src/components/WriteBar/Readme.md +14 -14
- package/src/components/WriteBar/WriteBar.tsx +2 -2
- package/src/components/WriteBarIcon/WriteBarIcon.tsx +13 -4
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ChipsSelectProps } from "../components/ChipsSelect/ChipsSelect";
|
|
3
|
+
import { ChipOption } from "../components/Chip/Chip";
|
|
4
|
+
export declare const useChipsSelect: <Option extends ChipOption>(props: Partial<ChipsSelectProps<Option>>) => {
|
|
5
|
+
fieldValue: string | undefined;
|
|
6
|
+
handleInputChange: (e: React.ChangeEvent<HTMLInputElement> | undefined) => void;
|
|
7
|
+
opened: boolean;
|
|
8
|
+
setOpened: React.Dispatch<React.SetStateAction<boolean>>;
|
|
9
|
+
filteredOptions: Option[];
|
|
10
|
+
focusedOptionIndex: number | null;
|
|
11
|
+
setFocusedOptionIndex: React.Dispatch<React.SetStateAction<number | null>>;
|
|
12
|
+
focusedOption: Option | null;
|
|
13
|
+
setFocusedOption: React.Dispatch<React.SetStateAction<Option | null>>;
|
|
14
|
+
selectedOptions: Option[];
|
|
15
|
+
setFieldValue: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
16
|
+
setSelectedOptions: React.Dispatch<React.SetStateAction<Option[]>>;
|
|
17
|
+
clearInput: () => void;
|
|
18
|
+
toggleOption: (newOption: Option, value?: boolean | undefined) => void;
|
|
19
|
+
addOption: (newOption: Option) => void;
|
|
20
|
+
addOptionFromInput: () => void;
|
|
21
|
+
removeOption: (value: any) => void;
|
|
22
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface UseDateInputDependencies<T, D> {
|
|
3
|
+
maxElement: number;
|
|
4
|
+
refs: Array<React.RefObject<T>>;
|
|
5
|
+
autoFocus?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
value?: D;
|
|
8
|
+
elementsConfig(index: number): {
|
|
9
|
+
length: number;
|
|
10
|
+
min: number;
|
|
11
|
+
max: number;
|
|
12
|
+
};
|
|
13
|
+
onInternalValueChange(value: string[]): void;
|
|
14
|
+
getInternalValue(value?: D | undefined): string[];
|
|
15
|
+
onChange?(value?: D | undefined): void;
|
|
16
|
+
}
|
|
17
|
+
export declare function useDateInput<T extends HTMLElement, D>({ maxElement, refs, autoFocus, disabled, elementsConfig, onChange, onInternalValueChange, getInternalValue, value, }: UseDateInputDependencies<T, D>): {
|
|
18
|
+
rootRef: React.RefObject<HTMLDivElement>;
|
|
19
|
+
calendarRef: React.RefObject<HTMLDivElement>;
|
|
20
|
+
open: boolean;
|
|
21
|
+
openCalendar: () => void;
|
|
22
|
+
closeCalendar: () => void;
|
|
23
|
+
internalValue: string[];
|
|
24
|
+
focusedElement: number | null;
|
|
25
|
+
setFocusedElement: React.Dispatch<React.SetStateAction<number | null>>;
|
|
26
|
+
handleKeyDown: (e: React.KeyboardEvent<HTMLSpanElement>) => void;
|
|
27
|
+
clear: () => void;
|
|
28
|
+
handleFieldEnter: () => void;
|
|
29
|
+
removeFocusFromField: () => void;
|
|
30
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface EventListenerHandle {
|
|
2
|
+
add: (el: HTMLElement | Document | Window) => void;
|
|
3
|
+
remove: () => void;
|
|
4
|
+
}
|
|
5
|
+
export declare function useEventListener<K extends keyof GlobalEventHandlersEventMap>(event: K, _cb: false | null | undefined | ((ev: GlobalEventHandlersEventMap[K]) => void), _options?: AddEventListenerOptions): EventListenerHandle;
|
|
6
|
+
export declare function useEventListener<E extends Event>(event: string, _cb: false | null | undefined | ((ev: E) => void), _options?: AddEventListenerOptions): EventListenerHandle;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare function useGlobalEventListener<K extends keyof GlobalEventHandlersEventMap>(element: Document | HTMLElement | Window | null | undefined, event: K, cb: ((ev: GlobalEventHandlersEventMap[K]) => void) | null | false | undefined, options?: AddEventListenerOptions): void;
|
|
2
|
+
export declare function useGlobalEventListener<E extends Event>(element: Document | HTMLElement | Window | null | undefined, event: string, cb: ((ev: E) => void) | null | false | undefined, options?: AddEventListenerOptions): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Insets as BridgeInsets } from "@vkontakte/vk-bridge";
|
|
2
|
+
export interface Insets {
|
|
3
|
+
bottom: BridgeInsets["bottom"] | null;
|
|
4
|
+
top: BridgeInsets["top"] | null;
|
|
5
|
+
left: BridgeInsets["left"] | null;
|
|
6
|
+
right: BridgeInsets["right"] | null;
|
|
7
|
+
}
|
|
8
|
+
export declare function useInsets(): Insets;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface SoftwareKeyboardState {
|
|
2
|
+
isOpened: boolean;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
Проверяет, закрыла ли клавиатура часть экрана, 24% подошло к большинству устройств
|
|
6
|
+
Работает на iOS и Android, где софт-клавиатура ресайзит viewport в браузерах
|
|
7
|
+
*/
|
|
8
|
+
export declare function getPreciseKeyboardState(window: any): boolean;
|
|
9
|
+
export declare function useKeyboard(): SoftwareKeyboardState;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
interface UsePaginationProps {
|
|
2
|
+
/**
|
|
3
|
+
* Текущая страница.
|
|
4
|
+
*/
|
|
5
|
+
currentPage?: number;
|
|
6
|
+
/**
|
|
7
|
+
* Кол-во всегда видимых страниц по краям текущей страницы.
|
|
8
|
+
*/
|
|
9
|
+
siblingCount?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Кол-во всегда видимых страниц в начале и в конце.
|
|
12
|
+
*/
|
|
13
|
+
boundaryCount?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Общее кол-во страниц.
|
|
16
|
+
*/
|
|
17
|
+
totalPages?: number;
|
|
18
|
+
}
|
|
19
|
+
export declare type PaginationPageType = "start-ellipsis" | "end-ellipsis" | number;
|
|
20
|
+
export declare type UsePaginationResult = PaginationPageType[];
|
|
21
|
+
/**
|
|
22
|
+
* Хук позаимствован у @mui с некоторыми изменениями.
|
|
23
|
+
* [usePagination.js](https://github.com/mui/material-ui/blob/master/packages/mui-material/src/usePagination/usePagination.js).
|
|
24
|
+
*
|
|
25
|
+
* Примеры вывода:
|
|
26
|
+
* v
|
|
27
|
+
* [1, 2, 3, 4, 5, 'end-ellipsis', 10]
|
|
28
|
+
* v
|
|
29
|
+
* [1, 'start-ellipsis', 4, 5, 6, 'end-ellipsis', 10]
|
|
30
|
+
* v
|
|
31
|
+
* [1, 'start-ellipsis', 6, 7, 8, 9, 10]
|
|
32
|
+
*/
|
|
33
|
+
export declare const usePagination: ({ currentPage, siblingCount, boundaryCount, totalPages: endPage, }?: UsePaginationProps) => UsePaginationResult;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare type ChildrenElement<T> = React.ReactElement<{
|
|
3
|
+
getRootRef?: React.Ref<T>;
|
|
4
|
+
}>;
|
|
5
|
+
export declare const usePatchChildrenRef: <T = HTMLElement>(children?: ChildrenElement<T> | undefined) => [React.MutableRefObject<T | null>, ChildrenElement<T> | undefined];
|
|
6
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function usePrevious<T>(value: T): T | undefined;
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
import "./lib/polyfills";
|
|
2
|
+
import "./styles/constants.css";
|
|
3
|
+
import "./styles/animations.css";
|
|
4
|
+
import "./styles/common.css";
|
|
5
|
+
/**
|
|
6
|
+
* Layout
|
|
7
|
+
*/
|
|
8
|
+
export { Root } from "./components/Root/Root";
|
|
9
|
+
export type { RootProps } from "./components/Root/Root";
|
|
10
|
+
export { View } from "./components/View/View";
|
|
11
|
+
export type { ViewProps } from "./components/View/View";
|
|
12
|
+
export { Panel } from "./components/Panel/Panel";
|
|
13
|
+
export type { PanelProps } from "./components/Panel/Panel";
|
|
14
|
+
export { PanelHeaderButton } from "./components/PanelHeaderButton/PanelHeaderButton";
|
|
15
|
+
export type { PanelHeaderButtonProps } from "./components/PanelHeaderButton/PanelHeaderButton";
|
|
16
|
+
export { PanelHeader } from "./components/PanelHeader/PanelHeader";
|
|
17
|
+
export type { PanelHeaderProps } from "./components/PanelHeader/PanelHeader";
|
|
18
|
+
export { PanelHeaderContent } from "./components/PanelHeaderContent/PanelHeaderContent";
|
|
19
|
+
export type { PanelHeaderContentProps } from "./components/PanelHeaderContent/PanelHeaderContent";
|
|
20
|
+
export { PanelHeaderContext } from "./components/PanelHeaderContext/PanelHeaderContext";
|
|
21
|
+
export type { PanelHeaderContextProps } from "./components/PanelHeaderContext/PanelHeaderContext";
|
|
22
|
+
export { SplitLayout } from "./components/SplitLayout/SplitLayout";
|
|
23
|
+
export type { SplitLayoutProps } from "./components/SplitLayout/SplitLayout";
|
|
24
|
+
export { SplitCol } from "./components/SplitCol/SplitCol";
|
|
25
|
+
export type { SplitColProps } from "./components/SplitCol/SplitCol";
|
|
26
|
+
export { Epic } from "./components/Epic/Epic";
|
|
27
|
+
export type { EpicProps } from "./components/Epic/Epic";
|
|
28
|
+
export { Tabbar } from "./components/Tabbar/Tabbar";
|
|
29
|
+
export type { TabbarProps } from "./components/Tabbar/Tabbar";
|
|
30
|
+
export { TabbarItem } from "./components/TabbarItem/TabbarItem";
|
|
31
|
+
export type { TabbarItemProps } from "./components/TabbarItem/TabbarItem";
|
|
32
|
+
export { HorizontalScroll } from "./components/HorizontalScroll/HorizontalScroll";
|
|
33
|
+
export type { HorizontalScrollProps } from "./components/HorizontalScroll/HorizontalScroll";
|
|
34
|
+
export { FixedLayout } from "./components/FixedLayout/FixedLayout";
|
|
35
|
+
export type { FixedLayoutProps } from "./components/FixedLayout/FixedLayout";
|
|
36
|
+
/**
|
|
37
|
+
* Popouts
|
|
38
|
+
*/
|
|
39
|
+
export { PopoutWrapper } from "./components/PopoutWrapper/PopoutWrapper";
|
|
40
|
+
export type { PopoutWrapperProps } from "./components/PopoutWrapper/PopoutWrapper";
|
|
41
|
+
export { Alert } from "./components/Alert/Alert";
|
|
42
|
+
export type { AlertProps, AlertActionInterface, } from "./components/Alert/Alert";
|
|
43
|
+
export { ActionSheet } from "./components/ActionSheet/ActionSheet";
|
|
44
|
+
export type { ActionSheetProps } from "./components/ActionSheet/ActionSheet";
|
|
45
|
+
export { ActionSheetItem } from "./components/ActionSheetItem/ActionSheetItem";
|
|
46
|
+
export type { ActionSheetItemProps } from "./components/ActionSheetItem/ActionSheetItem";
|
|
47
|
+
export { ActionSheetDefaultIosCloseItem } from "./components/ActionSheet/ActionSheetDefaultIosCloseItem";
|
|
48
|
+
export { ScreenSpinner } from "./components/ScreenSpinner/ScreenSpinner";
|
|
49
|
+
export type { ScreenSpinnerProps } from "./components/ScreenSpinner/ScreenSpinner";
|
|
50
|
+
export { Snackbar } from "./components/Snackbar/Snackbar";
|
|
51
|
+
export type { SnackbarProps } from "./components/Snackbar/Snackbar";
|
|
52
|
+
/**
|
|
53
|
+
* Modals
|
|
54
|
+
*/
|
|
55
|
+
export { ModalRoot } from "./components/ModalRoot/ModalRootAdaptive";
|
|
56
|
+
export type { ModalRootProps } from "./components/ModalRoot/ModalRootAdaptive";
|
|
57
|
+
export { withModalRootContext } from "./components/ModalRoot/withModalRootContext";
|
|
58
|
+
export { ModalRootContext } from "./components/ModalRoot/ModalRootContext";
|
|
59
|
+
export { ModalPage } from "./components/ModalPage/ModalPage";
|
|
60
|
+
export type { ModalPageProps } from "./components/ModalPage/ModalPage";
|
|
61
|
+
export { ModalPageHeader } from "./components/ModalPageHeader/ModalPageHeader";
|
|
62
|
+
export type { ModalPageHeaderProps } from "./components/ModalPageHeader/ModalPageHeader";
|
|
63
|
+
export { ModalCard } from "./components/ModalCard/ModalCard";
|
|
64
|
+
export type { ModalCardProps } from "./components/ModalCard/ModalCard";
|
|
65
|
+
export { ModalDismissButton } from "./components/ModalDismissButton/ModalDismissButton";
|
|
66
|
+
export type { ModalDismissButtonProps } from "./components/ModalDismissButton/ModalDismissButton";
|
|
67
|
+
/**
|
|
68
|
+
* Blocks
|
|
69
|
+
*/
|
|
70
|
+
export { Badge } from "./components/Badge/Badge";
|
|
71
|
+
export type { BadgeProps } from "./components/Badge/Badge";
|
|
72
|
+
export { ButtonGroup } from "./components/ButtonGroup/ButtonGroup";
|
|
73
|
+
export type { ButtonGroupProps } from "./components/ButtonGroup/ButtonGroup";
|
|
74
|
+
export { Button } from "./components/Button/Button";
|
|
75
|
+
export type { ButtonProps } from "./components/Button/Button";
|
|
76
|
+
export { IconButton } from "./components/IconButton/IconButton";
|
|
77
|
+
export type { IconButtonProps } from "./components/IconButton/IconButton";
|
|
78
|
+
export { Card } from "./components/Card/Card";
|
|
79
|
+
export type { CardProps } from "./components/Card/Card";
|
|
80
|
+
export { CardGrid } from "./components/CardGrid/CardGrid";
|
|
81
|
+
export type { CardGridProps } from "./components/CardGrid/CardGrid";
|
|
82
|
+
export { CardScroll } from "./components/CardScroll/CardScroll";
|
|
83
|
+
export type { CardScrollProps } from "./components/CardScroll/CardScroll";
|
|
84
|
+
export { ContentCard } from "./components/ContentCard/ContentCard";
|
|
85
|
+
export type { ContentCardProps } from "./components/ContentCard/ContentCard";
|
|
86
|
+
export { CellButton } from "./components/CellButton/CellButton";
|
|
87
|
+
export type { CellButtonProps } from "./components/CellButton/CellButton";
|
|
88
|
+
export { Header } from "./components/Header/Header";
|
|
89
|
+
export type { HeaderProps } from "./components/Header/Header";
|
|
90
|
+
export { Group } from "./components/Group/Group";
|
|
91
|
+
export type { GroupProps } from "./components/Group/Group";
|
|
92
|
+
export { Gradient } from "./components/Gradient/Gradient";
|
|
93
|
+
export type { GradientProps } from "./components/Gradient/Gradient";
|
|
94
|
+
export { List } from "./components/List/List";
|
|
95
|
+
export type { ListProps } from "./components/List/List";
|
|
96
|
+
export { Cell } from "./components/Cell/Cell";
|
|
97
|
+
export type { CellProps } from "./components/Cell/Cell";
|
|
98
|
+
export { RichCell } from "./components/RichCell/RichCell";
|
|
99
|
+
export type { RichCellProps } from "./components/RichCell/RichCell";
|
|
100
|
+
export { SimpleCell } from "./components/SimpleCell/SimpleCell";
|
|
101
|
+
export type { SimpleCellProps } from "./components/SimpleCell/SimpleCell";
|
|
102
|
+
export { HorizontalCell } from "./components/HorizontalCell/HorizontalCell";
|
|
103
|
+
export type { HorizontalCellProps } from "./components/HorizontalCell/HorizontalCell";
|
|
104
|
+
export { Footer } from "./components/Footer/Footer";
|
|
105
|
+
export type { FooterProps } from "./components/Footer/Footer";
|
|
106
|
+
export { InfoRow } from "./components/InfoRow/InfoRow";
|
|
107
|
+
export type { InfoRowProps } from "./components/InfoRow/InfoRow";
|
|
108
|
+
export { Gallery } from "./components/Gallery/Gallery";
|
|
109
|
+
export type { GalleryProps } from "./components/Gallery/Gallery";
|
|
110
|
+
export { Avatar } from "./components/Avatar/Avatar";
|
|
111
|
+
export type { AvatarProps } from "./components/Avatar/Avatar";
|
|
112
|
+
export { GridAvatar } from "./components/GridAvatar/GridAvatar";
|
|
113
|
+
export type { GridAvatarProps } from "./components/GridAvatar/GridAvatar";
|
|
114
|
+
export { InitialsAvatar } from "./components/InitialsAvatar/InitialsAvatar";
|
|
115
|
+
export type { InitialsAvatarProps } from "./components/InitialsAvatar/InitialsAvatar";
|
|
116
|
+
export { Progress } from "./components/Progress/Progress";
|
|
117
|
+
export type { ProgressProps } from "./components/Progress/Progress";
|
|
118
|
+
export { Search } from "./components/Search/Search";
|
|
119
|
+
export type { SearchProps } from "./components/Search/Search";
|
|
120
|
+
export { Tabs } from "./components/Tabs/Tabs";
|
|
121
|
+
export type { TabsProps } from "./components/Tabs/Tabs";
|
|
122
|
+
export { TabsItem } from "./components/TabsItem/TabsItem";
|
|
123
|
+
export type { TabsItemProps } from "./components/TabsItem/TabsItem";
|
|
124
|
+
export { Spinner } from "./components/Spinner/Spinner";
|
|
125
|
+
export type { SpinnerProps } from "./components/Spinner/Spinner";
|
|
126
|
+
export { PullToRefresh } from "./components/PullToRefresh/PullToRefresh";
|
|
127
|
+
export type { PullToRefreshProps } from "./components/PullToRefresh/PullToRefresh";
|
|
128
|
+
export { Link } from "./components/Link/Link";
|
|
129
|
+
export type { LinkProps } from "./components/Link/Link";
|
|
130
|
+
export { Tooltip } from "./components/Tooltip/Tooltip";
|
|
131
|
+
export type { TooltipProps } from "./components/Tooltip/Tooltip";
|
|
132
|
+
export { TooltipContainer } from "./components/Tooltip/TooltipContainer";
|
|
133
|
+
export { Counter } from "./components/Counter/Counter";
|
|
134
|
+
export type { CounterProps } from "./components/Counter/Counter";
|
|
135
|
+
export { UsersStack } from "./components/UsersStack/UsersStack";
|
|
136
|
+
export type { UsersStackProps } from "./components/UsersStack/UsersStack";
|
|
137
|
+
export { Separator } from "./components/Separator/Separator";
|
|
138
|
+
export type { SeparatorProps } from "./components/Separator/Separator";
|
|
139
|
+
export { Spacing } from "./components/Spacing/Spacing";
|
|
140
|
+
export type { SpacingProps } from "./components/Spacing/Spacing";
|
|
141
|
+
export { Placeholder } from "./components/Placeholder/Placeholder";
|
|
142
|
+
export type { PlaceholderProps } from "./components/Placeholder/Placeholder";
|
|
143
|
+
export { Banner } from "./components/Banner/Banner";
|
|
144
|
+
export type { BannerProps } from "./components/Banner/Banner";
|
|
145
|
+
export { MiniInfoCell } from "./components/MiniInfoCell/MiniInfoCell";
|
|
146
|
+
export type { MiniInfoCellProps } from "./components/MiniInfoCell/MiniInfoCell";
|
|
147
|
+
export { WriteBar } from "./components/WriteBar/WriteBar";
|
|
148
|
+
export type { WriteBarProps } from "./components/WriteBar/WriteBar";
|
|
149
|
+
export { WriteBarIcon } from "./components/WriteBarIcon/WriteBarIcon";
|
|
150
|
+
export type { WriteBarIconProps } from "./components/WriteBarIcon/WriteBarIcon";
|
|
151
|
+
export { SubnavigationBar } from "./components/SubnavigationBar/SubnavigationBar";
|
|
152
|
+
export type { SubnavigationBarProps } from "./components/SubnavigationBar/SubnavigationBar";
|
|
153
|
+
export { SubnavigationButton } from "./components/SubnavigationButton/SubnavigationButton";
|
|
154
|
+
export type { SubnavigationButtonProps } from "./components/SubnavigationButton/SubnavigationButton";
|
|
155
|
+
export { Pagination } from "./components/Pagination/Pagination";
|
|
156
|
+
export type { PaginationProps } from "./components/Pagination/Pagination";
|
|
157
|
+
/**
|
|
158
|
+
* Forms
|
|
159
|
+
*/
|
|
160
|
+
export { FormLayout } from "./components/FormLayout/FormLayout";
|
|
161
|
+
export type { FormLayoutProps } from "./components/FormLayout/FormLayout";
|
|
162
|
+
export { FormItem } from "./components/FormItem/FormItem";
|
|
163
|
+
export type { FormItemProps } from "./components/FormItem/FormItem";
|
|
164
|
+
export { FormField } from "./components/FormField/FormField";
|
|
165
|
+
export type { FormFieldProps } from "./components/FormField/FormField";
|
|
166
|
+
export { FormLayoutGroup } from "./components/FormLayoutGroup/FormLayoutGroup";
|
|
167
|
+
export type { FormLayoutGroupProps } from "./components/FormLayoutGroup/FormLayoutGroup";
|
|
168
|
+
export { FormStatus } from "./components/FormStatus/FormStatus";
|
|
169
|
+
export type { FormStatusProps } from "./components/FormStatus/FormStatus";
|
|
170
|
+
export { Switch } from "./components/Switch/Switch";
|
|
171
|
+
export type { SwitchProps } from "./components/Switch/Switch";
|
|
172
|
+
export { File } from "./components/File/File";
|
|
173
|
+
export type { FileProps } from "./components/File/File";
|
|
174
|
+
export { Input } from "./components/Input/Input";
|
|
175
|
+
export type { InputProps } from "./components/Input/Input";
|
|
176
|
+
export { Chip } from "./components/Chip/Chip";
|
|
177
|
+
export type { ChipProps } from "./components/Chip/Chip";
|
|
178
|
+
export { ChipsInput } from "./components/ChipsInput/ChipsInput";
|
|
179
|
+
export type { ChipsInputProps } from "./components/ChipsInput/ChipsInput";
|
|
180
|
+
export { Slider } from "./components/Slider/Slider";
|
|
181
|
+
export type { SliderProps } from "./components/Slider/Slider";
|
|
182
|
+
export { RangeSlider } from "./components/RangeSlider/RangeSlider";
|
|
183
|
+
export type { RangeSliderProps } from "./components/RangeSlider/RangeSlider";
|
|
184
|
+
export { Textarea } from "./components/Textarea/Textarea";
|
|
185
|
+
export type { TextareaProps } from "./components/Textarea/Textarea";
|
|
186
|
+
export { Radio } from "./components/Radio/Radio";
|
|
187
|
+
export type { RadioProps } from "./components/Radio/Radio";
|
|
188
|
+
export { RadioGroup } from "./components/RadioGroup/RadioGroup";
|
|
189
|
+
export type { RadioGroupProps } from "./components/RadioGroup/RadioGroup";
|
|
190
|
+
export { Checkbox } from "./components/Checkbox/Checkbox";
|
|
191
|
+
export type { CheckboxProps } from "./components/Checkbox/Checkbox";
|
|
192
|
+
export { Select } from "./components/Select/Select";
|
|
193
|
+
export type { SelectProps } from "./components/Select/Select";
|
|
194
|
+
export { SelectMimicry } from "./components/SelectMimicry/SelectMimicry";
|
|
195
|
+
export type { SelectMimicryProps } from "./components/SelectMimicry/SelectMimicry";
|
|
196
|
+
export { NativeSelect } from "./components/NativeSelect/NativeSelect";
|
|
197
|
+
export type { NativeSelectProps } from "./components/NativeSelect/NativeSelect";
|
|
198
|
+
export { CustomSelect } from "./components/CustomSelect/CustomSelect";
|
|
199
|
+
export type { CustomSelectProps, CustomSelectOptionInterface, } from "./components/CustomSelect/CustomSelect";
|
|
200
|
+
export { CustomSelectOption } from "./components/CustomSelectOption/CustomSelectOption";
|
|
201
|
+
export type { CustomSelectOptionProps } from "./components/CustomSelectOption/CustomSelectOption";
|
|
202
|
+
export { DatePicker } from "./components/DatePicker/DatePicker";
|
|
203
|
+
export type { DatePickerProps, DatePickerDateFormat, } from "./components/DatePicker/DatePicker";
|
|
204
|
+
export { SliderSwitch } from "./components/SliderSwitch/SliderSwitch";
|
|
205
|
+
export type { SliderSwitchProps, SliderSwitchOptionInterface, } from "./components/SliderSwitch/SliderSwitch";
|
|
206
|
+
export { SegmentedControl } from "./components/SegmentedControl/SegmentedControl";
|
|
207
|
+
export type { SegmentedControlProps, SegmentedControlOptionInterface, SegmentedControlValue, } from "./components/SegmentedControl/SegmentedControl";
|
|
208
|
+
export { Calendar } from "./components/Calendar/Calendar";
|
|
209
|
+
export type { CalendarProps } from "./components/Calendar/Calendar";
|
|
210
|
+
export { CalendarRange } from "./components/CalendarRange/CalendarRange";
|
|
211
|
+
export type { CalendarRangeProps } from "./components/CalendarRange/CalendarRange";
|
|
212
|
+
export { DateInput } from "./components/DateInput/DateInput";
|
|
213
|
+
export type { DateInputProps } from "./components/DateInput/DateInput";
|
|
214
|
+
export { DateRangeInput } from "./components/DateRangeInput/DateRangeInput";
|
|
215
|
+
export type { DateRangeInputProps } from "./components/DateRangeInput/DateRangeInput";
|
|
216
|
+
/**
|
|
217
|
+
* Helpers
|
|
218
|
+
*/
|
|
219
|
+
export { Div } from "./components/Div/Div";
|
|
220
|
+
export type { DivProps } from "./components/Div/Div";
|
|
221
|
+
export { Tappable } from "./components/Tappable/Tappable";
|
|
222
|
+
export type { TappableProps } from "./components/Tappable/Tappable";
|
|
223
|
+
export { Touch } from "./components/Touch/Touch";
|
|
224
|
+
export type { TouchProps } from "./components/Touch/Touch";
|
|
225
|
+
export { PanelSpinner } from "./components/PanelSpinner/PanelSpinner";
|
|
226
|
+
export type { PanelSpinnerProps } from "./components/PanelSpinner/PanelSpinner";
|
|
227
|
+
export { PanelHeaderClose } from "./components/PanelHeaderClose/PanelHeaderClose";
|
|
228
|
+
export { PanelHeaderBack } from "./components/PanelHeaderBack/PanelHeaderBack";
|
|
229
|
+
export type { PanelHeaderBackProps } from "./components/PanelHeaderBack/PanelHeaderBack";
|
|
230
|
+
export { PanelHeaderSubmit } from "./components/PanelHeaderSubmit/PanelHeaderSubmit";
|
|
231
|
+
export { PanelHeaderEdit } from "./components/PanelHeaderEdit/PanelHeaderEdit";
|
|
232
|
+
export type { PanelHeaderEditProps } from "./components/PanelHeaderEdit/PanelHeaderEdit";
|
|
233
|
+
export { ModalCardBase } from "./components/ModalCardBase/ModalCardBase";
|
|
234
|
+
export type { ModalCardBaseProps } from "./components/ModalCardBase/ModalCardBase";
|
|
235
|
+
export { VisuallyHiddenInput } from "./components/VisuallyHiddenInput/VisuallyHiddenInput";
|
|
236
|
+
export type { VisuallyHiddenInputProps } from "./components/VisuallyHiddenInput/VisuallyHiddenInput";
|
|
237
|
+
/**
|
|
238
|
+
* Wrappers
|
|
239
|
+
*/
|
|
240
|
+
export { AppRoot } from "./components/AppRoot/AppRoot";
|
|
241
|
+
export type { AppRootProps } from "./components/AppRoot/AppRoot";
|
|
242
|
+
export { AdaptivityProvider } from "./components/AdaptivityProvider/AdaptivityProvider";
|
|
243
|
+
export type { AdaptivityProviderProps } from "./components/AdaptivityProvider/AdaptivityProvider";
|
|
244
|
+
export { ConfigProvider } from "./components/ConfigProvider/ConfigProvider";
|
|
245
|
+
export type { ConfigProviderProps } from "./components/ConfigProvider/ConfigProvider";
|
|
246
|
+
export { ConfigProviderContext, WebviewType, } from "./components/ConfigProvider/ConfigProviderContext";
|
|
247
|
+
export { AppearanceProvider } from "./components/AppearanceProvider/AppearanceProvider";
|
|
248
|
+
export type { AppearanceProviderProps } from "./components/AppearanceProvider/AppearanceProvider";
|
|
249
|
+
export { Scheme, Appearance } from "./helpers/scheme";
|
|
250
|
+
export { LocaleProviderContext } from "./components/LocaleProviderContext/LocaleProviderContext";
|
|
251
|
+
/**
|
|
252
|
+
* Advertisement
|
|
253
|
+
*/
|
|
254
|
+
export { PromoBanner } from "./components/PromoBanner/PromoBanner";
|
|
255
|
+
export type { PromoBannerProps } from "./components/PromoBanner/PromoBanner";
|
|
256
|
+
/**
|
|
257
|
+
* Typography
|
|
258
|
+
*/
|
|
259
|
+
export { Title } from "./components/Typography/Title/Title";
|
|
260
|
+
export type { TitleProps } from "./components/Typography/Title/Title";
|
|
261
|
+
export { Headline } from "./components/Typography/Headline/Headline";
|
|
262
|
+
export type { HeadlineProps } from "./components/Typography/Headline/Headline";
|
|
263
|
+
export { Text } from "./components/Typography/Text/Text";
|
|
264
|
+
export type { TextProps } from "./components/Typography/Text/Text";
|
|
265
|
+
export { Paragraph } from "./components/Typography/Paragraph/Paragraph";
|
|
266
|
+
export type { ParagraphProps } from "./components/Typography/Paragraph/Paragraph";
|
|
267
|
+
export { Subhead } from "./components/Typography/Subhead/Subhead";
|
|
268
|
+
export type { SubheadProps } from "./components/Typography/Subhead/Subhead";
|
|
269
|
+
export { Footnote } from "./components/Typography/Footnote/Footnote";
|
|
270
|
+
export type { FootnoteProps } from "./components/Typography/Footnote/Footnote";
|
|
271
|
+
export { Caption } from "./components/Typography/Caption/Caption";
|
|
272
|
+
export type { CaptionProps } from "./components/Typography/Caption/Caption";
|
|
273
|
+
/**
|
|
274
|
+
* HOCs
|
|
275
|
+
*/
|
|
276
|
+
export { withInsets } from "./hoc/withInsets";
|
|
277
|
+
export { withPlatform } from "./hoc/withPlatform";
|
|
278
|
+
export { withAdaptivity } from "./hoc/withAdaptivity";
|
|
279
|
+
/**
|
|
280
|
+
* Hooks
|
|
281
|
+
*/
|
|
282
|
+
export { useInsets } from "./hooks/useInsets";
|
|
283
|
+
export { usePlatform } from "./hooks/usePlatform";
|
|
284
|
+
export { useAdaptivity } from "./hooks/useAdaptivity";
|
|
285
|
+
export { useAppearance } from "./hooks/useAppearance";
|
|
286
|
+
export { usePagination } from "./hooks/usePagination";
|
|
287
|
+
export { useScrollLock } from "./components/AppRoot/ScrollContext";
|
|
288
|
+
export { useNavTransition } from "./components/NavTransitionContext/NavTransitionContext";
|
|
289
|
+
/**
|
|
290
|
+
* Utils
|
|
291
|
+
*/
|
|
292
|
+
export { classNamesString as classNames } from "./lib/classNames";
|
|
293
|
+
export { animate } from "./lib/animate";
|
|
294
|
+
export { removeObjectKeys } from "./lib/removeObjectKeys";
|
|
295
|
+
export { SSRWrapper } from "./lib/SSR";
|
|
296
|
+
export type { SSRWrapperProps } from "./lib/SSR";
|
|
297
|
+
export { platform, ANDROID, IOS, VKCOM, Platform, IS_PLATFORM_ANDROID, IS_PLATFORM_IOS, } from "./lib/platform";
|
|
298
|
+
export { getClassName } from "./helpers/getClassName";
|
|
299
|
+
export { ViewWidth, ViewHeight, SizeType, } from "./components/AdaptivityProvider/AdaptivityContext";
|
|
300
|
+
export { calcInitialsAvatarColor } from "./helpers/avatar";
|
|
301
|
+
export { Popper } from "./components/Popper/Popper";
|
|
302
|
+
export type { PopperProps } from "./components/Popper/Popper";
|
|
303
|
+
/**
|
|
304
|
+
* Types
|
|
305
|
+
*/
|
|
306
|
+
export type { AlignType, HasPlatform, HasInsets } from "./types";
|
|
307
|
+
export type { NavIdProps } from "./lib/getNavId";
|
|
308
|
+
export type { PlatformType } from "./lib/platform";
|
|
309
|
+
export type { AdaptivityProps } from "./hoc/withAdaptivity";
|
|
310
|
+
export type { TransitionContextProps } from "./components/NavTransitionContext/NavTransitionContext";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { PlatformType } from "./platform";
|
|
3
|
+
import { BrowserInfo } from "./browser";
|
|
4
|
+
export interface SSRContextInterface {
|
|
5
|
+
platform: PlatformType | null;
|
|
6
|
+
userAgent?: string;
|
|
7
|
+
browserInfo?: BrowserInfo;
|
|
8
|
+
}
|
|
9
|
+
export declare const SSRContext: React.Context<SSRContextInterface>;
|
|
10
|
+
export interface SSRWrapperProps {
|
|
11
|
+
userAgent?: string;
|
|
12
|
+
browserInfo?: BrowserInfo;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @see https://vkcom.github.io/VKUI/#/SSR
|
|
17
|
+
*/
|
|
18
|
+
export declare const SSRWrapper: ({ userAgent, browserInfo, children, }: SSRWrapperProps) => JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export declare const FOCUSABLE_ELEMENTS_LIST: string[];
|
|
3
|
+
export declare enum Keys {
|
|
4
|
+
ENTER = "Enter",
|
|
5
|
+
SPACE = "Space",
|
|
6
|
+
TAB = "Tab",
|
|
7
|
+
ESCAPE = "Escape"
|
|
8
|
+
}
|
|
9
|
+
export declare function pressedKey(e: KeyboardEvent | React.KeyboardEvent<HTMLElement>): Keys | null;
|
|
10
|
+
export declare function shouldTriggerClickOnEnterOrSpace(e: KeyboardEvent | React.KeyboardEvent<HTMLElement>): boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Функция для js анимации
|
|
3
|
+
* @param {number} duration
|
|
4
|
+
* @param {function} timing тайминг функция анимации
|
|
5
|
+
* @param {function} draw коллбэк, в который прокидывается прогресс [0, 1]
|
|
6
|
+
* @returns {void}
|
|
7
|
+
*/
|
|
8
|
+
export declare type TimingInterface = (timeFraction: number) => number;
|
|
9
|
+
export declare type DrawInterface = (progress: number) => void;
|
|
10
|
+
export interface AnimateArgumentsInterface {
|
|
11
|
+
duration: number;
|
|
12
|
+
timing: TimingInterface;
|
|
13
|
+
draw: DrawInterface;
|
|
14
|
+
}
|
|
15
|
+
export declare function animate({ duration, timing, draw, }: AnimateArgumentsInterface): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Version } from "../types";
|
|
2
|
+
export declare enum System {
|
|
3
|
+
IOS = "ios",
|
|
4
|
+
UNKNOWN = ""
|
|
5
|
+
}
|
|
6
|
+
export interface BrowserInfo {
|
|
7
|
+
userAgent: string;
|
|
8
|
+
system: System;
|
|
9
|
+
systemVersion: Version | null;
|
|
10
|
+
}
|
|
11
|
+
export declare function computeBrowserInfo(userAgent?: string): BrowserInfo;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const getYears: (currentYear: number, range: number) => {
|
|
2
|
+
value: number;
|
|
3
|
+
label: string;
|
|
4
|
+
}[];
|
|
5
|
+
export declare const getMonths: (locale?: string | undefined) => {
|
|
6
|
+
value: number;
|
|
7
|
+
label: string;
|
|
8
|
+
}[];
|
|
9
|
+
export declare const getDaysNames: (now: Date, weekStartsOn: 0 | 2 | 1 | 6 | 5 | 4 | 3, locale?: string | undefined) => string[];
|
|
10
|
+
export declare const navigateDate: (date?: Date | null | undefined, key?: string | undefined) => Date;
|
|
11
|
+
export declare const getWeeks: (viewDate: Date, weekStartsOn: 0 | 2 | 1 | 6 | 5 | 4 | 3) => Date[][];
|
|
12
|
+
export declare const setTimeEqual: (to: Date, from?: Date | null | undefined) => Date;
|
|
13
|
+
export declare const isFirstDay: (day: Date, dayOfWeek: number) => boolean;
|
|
14
|
+
export declare const isLastDay: (day: Date, dayOfWeek: number) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const callMultiple: (...fns: any[]) => (...args: any[]) => void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface ObjectClassNames {
|
|
2
|
+
[index: string]: boolean | undefined | null;
|
|
3
|
+
}
|
|
4
|
+
export declare type ClassName = number | string | ObjectClassNames | false | null | undefined;
|
|
5
|
+
export declare function classNames(...classnames: ClassName[]): string | string[];
|
|
6
|
+
export declare function classNamesString(...args: ClassName[]): string;
|