@skbkontur/react-ui 1.6.9 → 1.6.11
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/README.md +135 -135
- package/components/Autocomplete/Autocomplete.adapter.js.flow +4 -4
- package/components/Autocomplete/Autocomplete.js.flow +37 -37
- package/components/Autocomplete/README.md +7 -7
- package/components/Autocomplete/index.js.flow +2 -2
- package/components/Button/Button.adapter.js.flow +4 -4
- package/components/Button/Button.js.flow +58 -58
- package/components/Button/Corners.js.flow +12 -12
- package/components/Button/README.md +85 -85
- package/components/Button/index.js.flow +2 -2
- package/components/Calendar/Animation.js.flow +7 -7
- package/components/Calendar/Calendar.js.flow +33 -33
- package/components/Calendar/CalendarDateShape.js.flow +26 -26
- package/components/Calendar/CalendarScrollEvents.js.flow +15 -15
- package/components/Calendar/CalendarUtils.js.flow +35 -35
- package/components/Calendar/DayCellView.js.flow +16 -16
- package/components/Calendar/DayCellViewModel.js.flow +9 -9
- package/components/Calendar/Month.js.flow +23 -23
- package/components/Calendar/MonthView.js.flow +24 -24
- package/components/Calendar/MonthViewModel.js.flow +16 -16
- package/components/Calendar/config.js.flow +11 -11
- package/components/Calendar/index.js.flow +2 -2
- package/components/Calendar/presets.js.flow +21 -21
- package/components/Calendar/stepper.js.flow +2 -2
- package/components/Calendar/utils.js.flow +2 -2
- package/components/Center/Center.js.flow +15 -15
- package/components/Center/README.md +5 -5
- package/components/Center/index.js.flow +2 -2
- package/components/Checkbox/Checkbox.adapter.js.flow +4 -4
- package/components/Checkbox/Checkbox.js.flow +27 -27
- package/components/Checkbox/README.md +61 -61
- package/components/Checkbox/index.js.flow +2 -2
- package/components/ComboBox/ComboBox.js.flow +58 -58
- package/components/ComboBox/README.md +423 -423
- package/components/ComboBox/__mocks__/getCities.js.map +1 -1
- package/components/ComboBox/__mocks__/kladr.json +20002 -20002
- package/components/ComboBox/index.js.flow +2 -2
- package/components/ComboBoxOld/ComboBoxOld.adapter.js.map +1 -1
- package/components/ComboBoxOld/ComboBoxOld.d.ts +120 -120
- package/components/ComboBoxOld/ComboBoxOld.js +45 -45
- package/components/ComboBoxOld/ComboBoxOld.js.map +1 -1
- package/components/ComboBoxOld/ComboBoxRenderer.js.map +1 -1
- package/components/ComboBoxOld/README.md +83 -83
- package/components/ComboBoxOld/index.d.ts +1 -1
- package/components/ComboBoxOld/index.js.map +1 -1
- package/components/CurrencyInput/CurrencyHelper.js.flow +44 -44
- package/components/CurrencyInput/CurrencyInput.js.flow +30 -30
- package/components/CurrencyInput/CurrencyInputHelper.js.flow +38 -38
- package/components/CurrencyInput/CurrencyInputKeyboardActions.js.flow +19 -19
- package/components/CurrencyInput/CursorHelper.js.flow +15 -15
- package/components/CurrencyInput/README.md +19 -19
- package/components/CurrencyInput/SelectionHelper.js.flow +16 -16
- package/components/CurrencyInput/index.js.flow +2 -2
- package/components/CurrencyLabel/CurrencyLabel.js.flow +10 -10
- package/components/CurrencyLabel/README.md +23 -23
- package/components/CurrencyLabel/index.js.flow +2 -2
- package/components/CustomComboBox/ComboBoxMenu.js.flow +22 -22
- package/components/CustomComboBox/ComboBoxView.js.flow +52 -52
- package/components/CustomComboBox/CustomComboBox.js.flow +130 -130
- package/components/CustomComboBox/index.js.flow +2 -2
- package/components/DateInput/DateInput.js.flow +60 -60
- package/components/DateInput/README.md +104 -104
- package/components/DateInput/helpers/DateInputKeyboardActions.js.flow +17 -17
- package/components/DateInput/helpers/SelectionHelpers.js.flow +3 -3
- package/components/DateInput/helpers/inputNumber.js.flow +4 -4
- package/components/DateInput/index.js.flow +2 -2
- package/components/DatePicker/DatePicker.js.flow +45 -45
- package/components/DatePicker/DatePickerHelpers.js.flow +7 -7
- package/components/DatePicker/DateShape.js.flow +11 -11
- package/components/DatePicker/Picker.js.flow +23 -23
- package/components/DatePicker/README.md +307 -307
- package/components/DatePicker/index.js.flow +2 -2
- package/components/DatePickerOld/Calendar.js.map +1 -1
- package/components/DatePickerOld/CalendarCell.js.map +1 -1
- package/components/DatePickerOld/DateInput.js +2 -2
- package/components/DatePickerOld/DateInput.js.map +1 -1
- package/components/DatePickerOld/DatePicker.adapter.js.map +1 -1
- package/components/DatePickerOld/DatePickerOld.d.ts +35 -35
- package/components/DatePickerOld/DatePickerOld.js +16 -16
- package/components/DatePickerOld/DatePickerOld.js.map +1 -1
- package/components/DatePickerOld/Picker.js.map +1 -1
- package/components/DatePickerOld/README.md +7 -7
- package/components/DatePickerOld/dateParser.js.map +1 -1
- package/components/DatePickerOld/index.d.ts +1 -1
- package/components/DatePickerOld/index.js.map +1 -1
- package/components/DateSelect/DateSelect.js.flow +30 -30
- package/components/DateSelect/index.js.flow +2 -2
- package/components/Dropdown/Dropdown.js.flow +41 -41
- package/components/Dropdown/README.md +14 -14
- package/components/Dropdown/index.js.flow +2 -2
- package/components/DropdownContainer/DropdownContainer.js.flow +29 -29
- package/components/DropdownMenu/DropdownMenu.js.flow +20 -20
- package/components/DropdownMenu/README.md +66 -66
- package/components/DropdownMenu/index.js.flow +2 -2
- package/components/Fias/Fias.js.flow +37 -37
- package/components/Fias/FiasModal.js.flow +12 -12
- package/components/Fias/FiasSearch/FiasSearch.js.flow +32 -32
- package/components/Fias/FiasSearch/README.md +78 -78
- package/components/Fias/Form/FiasComboBox.js.flow +25 -25
- package/components/Fias/Form/FiasForm.js.flow +21 -21
- package/components/Fias/README.md +436 -436
- package/components/Fias/api/APIResultFactory.js.flow +7 -7
- package/components/Fias/api/FiasAPI.js.flow +13 -13
- package/components/Fias/api/MockAPI.js.flow +13 -13
- package/components/Fias/api/data.json +285 -285
- package/components/Fias/constants/abbreviations.js.flow +7 -7
- package/components/Fias/index.js.flow +5 -5
- package/components/Fias/locale/types.js.flow +71 -71
- package/components/Fias/logger/Logger.js.flow +13 -13
- package/components/Fias/models/Address.js.flow +57 -57
- package/components/Fias/models/AddressElement.js.flow +15 -15
- package/components/Fias/models/FiasData.js.flow +10 -10
- package/components/Fias/types.js.flow +133 -133
- package/components/FxInput/FxInput.adapter.js.flow +4 -4
- package/components/FxInput/FxInput.js.flow +24 -24
- package/components/FxInput/README.md +13 -13
- package/components/FxInput/index.js.flow +2 -2
- package/components/Gapped/Gapped.js.flow +13 -13
- package/components/Gapped/README.md +6 -6
- package/components/Gapped/index.js.flow +2 -2
- package/components/Group/Group.js.flow +14 -14
- package/components/Group/README.md +27 -27
- package/components/Group/index.js.flow +2 -2
- package/components/HideBodyVerticalScroll/HideBodyVerticalScroll.js.flow +7 -7
- package/components/HideBodyVerticalScroll/index.js.flow +2 -2
- package/components/Hint/Hint.js.flow +37 -37
- package/components/Hint/README.md +3 -3
- package/components/Hint/index.js.flow +2 -2
- package/components/Icon/20px/Icon.js.flow +27 -27
- package/components/Icon/20px/index.js.flow +2 -2
- package/components/Icon/README.md +64 -64
- package/components/IgnoreLayerClick/IgnoreLayerClick.js.flow +12 -12
- package/components/IgnoreLayerClick/index.js.flow +2 -2
- package/components/Input/Input.adapter.js.flow +9 -9
- package/components/Input/Input.js.flow +55 -55
- package/components/Input/README.md +13 -13
- package/components/Input/index.js.flow +2 -2
- package/components/Kebab/Kebab.js.flow +23 -23
- package/components/Kebab/README.md +44 -44
- package/components/Kebab/index.js.flow +2 -2
- package/components/Kladr/AddressModal.d.ts +39 -39
- package/components/Kladr/AddressModal.js.flow +20 -20
- package/components/Kladr/AddressModal.js.map +1 -1
- package/components/Kladr/Kladr.d.ts +39 -39
- package/components/Kladr/Kladr.js +2 -2
- package/components/Kladr/Kladr.js.flow +27 -27
- package/components/Kladr/Kladr.js.map +1 -1
- package/components/Kladr/KladrAPI.d.ts +8 -8
- package/components/Kladr/KladrAPI.js +7 -2
- package/components/Kladr/KladrAPI.js.flow +8 -8
- package/components/Kladr/KladrAPI.js.map +1 -1
- package/components/Kladr/README.md +3 -3
- package/components/Kladr/Types.d.ts +40 -40
- package/components/Kladr/Types.js.flow +39 -39
- package/components/Kladr/index.d.ts +1 -1
- package/components/Kladr/index.js.flow +2 -2
- package/components/Kladr/index.js.map +1 -1
- package/components/Kladr/util.js.map +1 -1
- package/components/Kladr/utils.d.ts +4 -4
- package/components/Kladr/utils.js.flow +4 -4
- package/components/Link/Link.adapter.js.flow +4 -4
- package/components/Link/Link.js.flow +25 -25
- package/components/Link/README.md +11 -11
- package/components/Link/index.js.flow +2 -2
- package/components/Loader/Loader.js.flow +20 -20
- package/components/Loader/README.md +25 -25
- package/components/Loader/index.js.flow +2 -2
- package/components/Logotype/Logotype.js.flow +21 -21
- package/components/Logotype/ProductWidget.js.flow +7 -7
- package/components/Logotype/README.md +32 -32
- package/components/Logotype/index.js.flow +2 -2
- package/components/Menu/Menu.js.flow +24 -24
- package/components/Menu/isActiveElement.js.flow +7 -7
- package/components/MenuHeader/MenuHeader.js.flow +11 -11
- package/components/MenuHeader/index.js.flow +2 -2
- package/components/MenuItem/MenuItem.js.flow +33 -33
- package/components/MenuItem/README.md +5 -5
- package/components/MenuItem/index.js.flow +2 -2
- package/components/MenuSeparator/MenuSeparator.js.flow +7 -7
- package/components/MenuSeparator/index.js.flow +2 -2
- package/components/Modal/Modal.adapter.js.flow +4 -4
- package/components/Modal/Modal.js.flow +30 -30
- package/components/Modal/Modal.js.map +1 -1
- package/components/Modal/ModalBody.js.flow +7 -7
- package/components/Modal/ModalClose.js.flow +6 -6
- package/components/Modal/ModalContext.js.flow +15 -15
- package/components/Modal/ModalFooter.js.flow +11 -11
- package/components/Modal/ModalHeader.js.flow +11 -11
- package/components/Modal/README.md +38 -38
- package/components/Modal/index.js.flow +2 -2
- package/components/ModalStack/ModalStack.d.ts +4 -2
- package/components/ModalStack/ModalStack.js +13 -2
- package/components/ModalStack/ModalStack.js.flow +10 -10
- package/components/ModalStack/ModalStack.js.map +1 -1
- package/components/ModalStack/index.js.flow +2 -2
- package/components/Paging/NavigationHelper.js.flow +13 -13
- package/components/Paging/Paging.js.flow +38 -38
- package/components/Paging/PagingHelper.js.flow +10 -10
- package/components/Paging/README.md +43 -43
- package/components/Paging/index.js.flow +2 -2
- package/components/PasswordInput/PasswordInput.js.flow +26 -26
- package/components/PasswordInput/PasswordInputFallback.js.flow +13 -13
- package/components/PasswordInput/getCharHelper.js.flow +4 -4
- package/components/PasswordInput/index.js.flow +2 -2
- package/components/PhoneInput/PhoneInput.js +2 -2
- package/components/PhoneInput/PhoneInput.js.map +1 -1
- package/components/PhoneInput/index.js.map +1 -1
- package/components/Popup/Popup.js.flow +60 -60
- package/components/Popup/PopupHelper.js.flow +29 -29
- package/components/Popup/PopupPin.js.flow +15 -15
- package/components/Popup/index.js.flow +2 -2
- package/components/Radio/README.md +14 -14
- package/components/Radio/Radio.js.flow +33 -33
- package/components/Radio/index.js.flow +2 -2
- package/components/RadioGroup/Prevent.js.flow +9 -9
- package/components/RadioGroup/README.md +44 -44
- package/components/RadioGroup/RadioGroup.adapter.js.flow +4 -4
- package/components/RadioGroup/RadioGroup.js +1 -1
- package/components/RadioGroup/RadioGroup.js.flow +42 -42
- package/components/RadioGroup/RadioGroup.js.map +1 -1
- package/components/RadioGroup/index.js.flow +2 -2
- package/components/RenderContainer/RenderContainer.js.flow +11 -11
- package/components/RenderContainer/index.js.flow +2 -2
- package/components/RenderLayer/RenderLayer.js.flow +12 -12
- package/components/RenderLayer/index.js.flow +2 -2
- package/components/ScrollContainer/README.md +60 -60
- package/components/ScrollContainer/ScrollContainer.js.flow +24 -24
- package/components/ScrollContainer/index.js.flow +2 -2
- package/components/Select/Item.js.flow +7 -7
- package/components/Select/README.md +23 -23
- package/components/Select/Select.adapter.js.flow +4 -4
- package/components/Select/Select.js.flow +81 -81
- package/components/Select/index.js.flow +2 -2
- package/components/SidePage/README.md +46 -46
- package/components/SidePage/SidePage.js.flow +34 -34
- package/components/SidePage/SidePage.js.map +1 -1
- package/components/SidePage/SidePageBody.js.flow +13 -13
- package/components/SidePage/SidePageContainer.js.flow +9 -9
- package/components/SidePage/SidePageContext.js.flow +15 -15
- package/components/SidePage/SidePageFooter.js.flow +16 -16
- package/components/SidePage/SidePageHeader.js.flow +11 -11
- package/components/SidePage/index.js.flow +2 -2
- package/components/Spinner/README.md +33 -33
- package/components/Spinner/Spinner.js.flow +20 -20
- package/components/Spinner/SpinnerFallback.js.flow +15 -15
- package/components/Spinner/index.js.flow +2 -2
- package/components/Spinner/settings.js.flow +48 -48
- package/components/Sticky/README.md +27 -27
- package/components/Sticky/Sticky.js.flow +22 -22
- package/components/Sticky/index.js.flow +2 -2
- package/components/Switcher/README.md +10 -10
- package/components/Switcher/Switcher.js.flow +26 -26
- package/components/Switcher/index.js.flow +2 -2
- package/components/Tabs/Indicator.js.flow +21 -21
- package/components/Tabs/README.md +28 -28
- package/components/Tabs/Tab.js.flow +48 -48
- package/components/Tabs/Tabs.js.flow +28 -28
- package/components/Tabs/index.js.flow +2 -2
- package/components/Textarea/README.md +9 -9
- package/components/Textarea/Textarea.adapter.js.flow +11 -11
- package/components/Textarea/Textarea.js.flow +33 -33
- package/components/Textarea/TextareaHelpers.js.flow +6 -6
- package/components/Textarea/index.js.flow +2 -2
- package/components/ThemeProvider/Playground/README.md +7 -7
- package/components/ThemeProvider/README.md +172 -172
- package/components/ThemeShowcase/README.md +13 -13
- package/components/Toast/README.md +39 -39
- package/components/Toast/Toast.js.flow +29 -29
- package/components/Toast/ToastStatic.js.flow +10 -10
- package/components/Toast/ToastView.js.flow +16 -16
- package/components/Toast/index.js.flow +2 -2
- package/components/Toggle/README.md +9 -9
- package/components/Toggle/Toggle.js.flow +28 -28
- package/components/Toggle/index.js.flow +2 -2
- package/components/Token/README.md +109 -109
- package/components/Token/Token.js.flow +25 -25
- package/components/Token/TokenRemoveIcon.js.flow +11 -11
- package/components/Token/index.js.flow +2 -2
- package/components/TokenInput/README.md +82 -82
- package/components/TokenInput/TextWidthHelper.js.flow +10 -10
- package/components/TokenInput/TokenInput.js.flow +39 -39
- package/components/TokenInput/TokenInputMenu.js.flow +17 -17
- package/components/TokenInput/TokenInputReducer.js.flow +63 -63
- package/components/TokenInput/index.js.flow +2 -2
- package/components/Tooltip/README.md +207 -207
- package/components/Tooltip/Tooltip.js.flow +33 -33
- package/components/Tooltip/index.js.flow +2 -2
- package/components/TooltipMenu/README.md +106 -106
- package/components/TooltipMenu/TooltipMenu.js.flow +19 -19
- package/components/TooltipMenu/index.js.flow +2 -2
- package/components/TopBar/ButtonItem.js.flow +22 -22
- package/components/TopBar/Divider.js.flow +5 -5
- package/components/TopBar/Item.js.flow +19 -19
- package/components/TopBar/Organizations.js.flow +16 -16
- package/components/TopBar/README.md +112 -112
- package/components/TopBar/TopBar.js.flow +53 -53
- package/components/TopBar/TopBarDropdown.js.flow +23 -23
- package/components/TopBar/TopBarEnd.js.flow +4 -4
- package/components/TopBar/TopBarLogout.js.flow +6 -6
- package/components/TopBar/TopBarStart.js.flow +4 -4
- package/components/TopBar/User.js.flow +9 -9
- package/components/TopBar/index.js.flow +2 -2
- package/components/ZIndex/ZIndex.js.flow +11 -11
- package/components/ZIndex/index.js.flow +2 -2
- package/components/__mocks__/react-addons-css-transition-group.js.map +1 -1
- package/components/all.js.flow +36 -36
- package/components/ensureOldIEClassName.js.flow +6 -6
- package/components/eventHandlers.js.flow +9 -9
- package/components/index.js.flow +2 -2
- package/components/internal/InputLikeText/InputLikeText.js.flow +24 -24
- package/components/internal/InputLikeText/index.js.flow +2 -2
- package/components/internal/InternalMenu/InternalMenu.js.flow +23 -23
- package/components/internal/InternalMenu/isActiveElement.js.flow +7 -7
- package/components/internal/MaskedInput/MaskedInput.js.flow +24 -24
- package/components/internal/MaskedInput/index.js.flow +2 -2
- package/components/internal/MockDate.js.flow +9 -9
- package/components/internal/PopupMenu/PopupMenu.js.flow +40 -40
- package/components/internal/PopupMenu/PopupMenuPositions.js.flow +4 -4
- package/components/internal/PopupMenu/index.js.flow +2 -2
- package/components/internal/PopupMenu/validatePositions.js.flow +4 -4
- package/components/internal/ResizeDetector/ResizeDetector.js.flow +8 -8
- package/components/internal/ResizeDetector/index.js.flow +2 -2
- package/components/internal/createPropsGetter.js.flow +8 -8
- package/components/internal/cross.js.flow +4 -4
- package/components/internal/currentEnvironment.js.flow +4 -4
- package/components/internal/extractKeyboardAction.js.flow +12 -12
- package/components/polyfillPlaceholder.js.flow +4 -4
- package/package.json +1 -4
- package/typings/console.d.ts +3 -3
- package/typings/event-types.d.ts +4 -4
- package/typings/fbjs.d.ts +4 -4
- package/typings/global.d.ts +6 -6
- package/typings/images.d.ts +1 -1
- package/typings/less.d.ts +4 -4
- package/typings/mocha/index.d.ts +2 -2
- package/typings/mockdate.d.ts +1 -1
- package/typings/normalize-wheel.d.ts +1 -1
- package/typings/raf.d.ts +1 -1
- package/typings/react-addons-css-transition-group.d.ts +1 -1
- package/typings/react-testing/index.d.ts +4 -4
- package/typings/react-testing/window.d.ts +5 -5
- package/typings/react.d.ts +8 -8
- package/typings/utility-types.d.ts +17 -17
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
export type MenuHeaderProps = {|
|
|
3
|
-
children: React$Node,
|
|
4
|
-
_enableIconPadding?: ?boolean,
|
|
5
|
-
|};
|
|
6
|
-
|
|
7
|
-
declare class MenuHeader extends React$Component<MenuHeaderProps> {
|
|
8
|
-
static __MENU_HEADER__: boolean;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export default MenuHeader;
|
|
1
|
+
/* @flow */
|
|
2
|
+
export type MenuHeaderProps = {|
|
|
3
|
+
children: React$Node,
|
|
4
|
+
_enableIconPadding?: ?boolean,
|
|
5
|
+
|};
|
|
6
|
+
|
|
7
|
+
declare class MenuHeader extends React$Component<MenuHeaderProps> {
|
|
8
|
+
static __MENU_HEADER__: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default MenuHeader;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
export { default, MenuHeaderProps } from './MenuHeader';
|
|
1
|
+
/* @flow */
|
|
2
|
+
export { default, MenuHeaderProps } from './MenuHeader';
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
import type { MouseEventHandler } from '../eventHandlers';
|
|
3
|
-
|
|
4
|
-
export type MenuItemState = null | 'hover' | 'selected' | void;
|
|
5
|
-
|
|
6
|
-
export type MenuItemElement = HTMLAnchorElement | HTMLSpanElement;
|
|
7
|
-
|
|
8
|
-
export type MenuItemProps = {|
|
|
9
|
-
_enableIconPadding?: boolean,
|
|
10
|
-
alkoLink?: boolean,
|
|
11
|
-
comment?: React$Node,
|
|
12
|
-
disabled?: boolean,
|
|
13
|
-
// eslint-disable-next-line flowtype/no-weak-types
|
|
14
|
-
icon?: React$Element<any>,
|
|
15
|
-
loose?: boolean,
|
|
16
|
-
state?: MenuItemState,
|
|
17
|
-
onClick?: MouseEventHandler<HTMLElement>,
|
|
18
|
-
children?: React$Node | ((state: MenuItemState) => React$Node),
|
|
19
|
-
target?: string,
|
|
20
|
-
title?: string,
|
|
21
|
-
href?: string,
|
|
22
|
-
onMouseEnter?: MouseEventHandler<HTMLElement>,
|
|
23
|
-
onMouseLeave?: MouseEventHandler<HTMLElement>,
|
|
24
|
-
// eslint-disable-next-line flowtype/no-weak-types
|
|
25
|
-
component?: React$ComponentType<any>,
|
|
26
|
-
|};
|
|
27
|
-
|
|
28
|
-
declare class MenuItem extends React$Component<MenuItemProps> {
|
|
29
|
-
static __MENU_ITEM__: boolean;
|
|
30
|
-
static __MENU_HEADER__: boolean;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export default MenuItem;
|
|
1
|
+
/* @flow */
|
|
2
|
+
import type { MouseEventHandler } from '../eventHandlers';
|
|
3
|
+
|
|
4
|
+
export type MenuItemState = null | 'hover' | 'selected' | void;
|
|
5
|
+
|
|
6
|
+
export type MenuItemElement = HTMLAnchorElement | HTMLSpanElement;
|
|
7
|
+
|
|
8
|
+
export type MenuItemProps = {|
|
|
9
|
+
_enableIconPadding?: boolean,
|
|
10
|
+
alkoLink?: boolean,
|
|
11
|
+
comment?: React$Node,
|
|
12
|
+
disabled?: boolean,
|
|
13
|
+
// eslint-disable-next-line flowtype/no-weak-types
|
|
14
|
+
icon?: React$Element<any>,
|
|
15
|
+
loose?: boolean,
|
|
16
|
+
state?: MenuItemState,
|
|
17
|
+
onClick?: MouseEventHandler<HTMLElement>,
|
|
18
|
+
children?: React$Node | ((state: MenuItemState) => React$Node),
|
|
19
|
+
target?: string,
|
|
20
|
+
title?: string,
|
|
21
|
+
href?: string,
|
|
22
|
+
onMouseEnter?: MouseEventHandler<HTMLElement>,
|
|
23
|
+
onMouseLeave?: MouseEventHandler<HTMLElement>,
|
|
24
|
+
// eslint-disable-next-line flowtype/no-weak-types
|
|
25
|
+
component?: React$ComponentType<any>,
|
|
26
|
+
|};
|
|
27
|
+
|
|
28
|
+
declare class MenuItem extends React$Component<MenuItemProps> {
|
|
29
|
+
static __MENU_ITEM__: boolean;
|
|
30
|
+
static __MENU_HEADER__: boolean;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default MenuItem;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
```js
|
|
2
|
-
<MenuItem href="http://tech.skbkontur.ru/react-ui/" component={({ href, ...rest }) => <Link to={href} {...rest} />}>
|
|
3
|
-
Awesome link
|
|
4
|
-
</MenuItem>
|
|
5
|
-
```
|
|
1
|
+
```js
|
|
2
|
+
<MenuItem href="http://tech.skbkontur.ru/react-ui/" component={({ href, ...rest }) => <Link to={href} {...rest} />}>
|
|
3
|
+
Awesome link
|
|
4
|
+
</MenuItem>
|
|
5
|
+
```
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
export { default, MenuItemProps, MenuItemState, MenuItemElement } from './MenuItem';
|
|
1
|
+
/* @flow */
|
|
2
|
+
export { default, MenuItemProps, MenuItemState, MenuItemElement } from './MenuItem';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
|
|
3
|
-
type Props = {||};
|
|
4
|
-
|
|
5
|
-
declare class MenuSeparator extends React$Component<Props> {}
|
|
6
|
-
|
|
7
|
-
export default MenuSeparator;
|
|
1
|
+
/* @flow */
|
|
2
|
+
|
|
3
|
+
type Props = {||};
|
|
4
|
+
|
|
5
|
+
declare class MenuSeparator extends React$Component<Props> {}
|
|
6
|
+
|
|
7
|
+
export default MenuSeparator;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
export { default } from './MenuSeparator';
|
|
1
|
+
/* @flow */
|
|
2
|
+
export { default } from './MenuSeparator';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
import Modal from './Modal.js';
|
|
3
|
-
|
|
4
|
-
export default Modal;
|
|
1
|
+
/* @flow */
|
|
2
|
+
import Modal from './Modal.js';
|
|
3
|
+
|
|
4
|
+
export default Modal;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
import * as CSS from 'csstype';
|
|
3
|
-
|
|
4
|
-
import { Header } from './ModalHeader';
|
|
5
|
-
import { Body } from './ModalBody';
|
|
6
|
-
import { Footer } from './ModalFooter';
|
|
7
|
-
|
|
8
|
-
export type ModalProps = {|
|
|
9
|
-
children?: React$Node,
|
|
10
|
-
disableClose?: boolean,
|
|
11
|
-
alignTop?: boolean,
|
|
12
|
-
ignoreBackgroundClick?: boolean,
|
|
13
|
-
noClose?: boolean,
|
|
14
|
-
width?: number | string,
|
|
15
|
-
onClose?: () => void,
|
|
16
|
-
|};
|
|
17
|
-
|
|
18
|
-
export type ModalState = {|
|
|
19
|
-
stackPosition: number,
|
|
20
|
-
horizontalScroll: boolean,
|
|
21
|
-
clickTrapHeight?: CSS.HeightProperty<string | number>,
|
|
22
|
-
|};
|
|
23
|
-
|
|
24
|
-
declare class Modal extends React$Component<ModalProps, ModalState> {
|
|
25
|
-
static Header: typeof Header,
|
|
26
|
-
static Body: typeof Body,
|
|
27
|
-
static Footer: typeof Footer,
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export default Modal;
|
|
1
|
+
/* @flow */
|
|
2
|
+
import * as CSS from 'csstype';
|
|
3
|
+
|
|
4
|
+
import { Header } from './ModalHeader';
|
|
5
|
+
import { Body } from './ModalBody';
|
|
6
|
+
import { Footer } from './ModalFooter';
|
|
7
|
+
|
|
8
|
+
export type ModalProps = {|
|
|
9
|
+
children?: React$Node,
|
|
10
|
+
disableClose?: boolean,
|
|
11
|
+
alignTop?: boolean,
|
|
12
|
+
ignoreBackgroundClick?: boolean,
|
|
13
|
+
noClose?: boolean,
|
|
14
|
+
width?: number | string,
|
|
15
|
+
onClose?: () => void,
|
|
16
|
+
|};
|
|
17
|
+
|
|
18
|
+
export type ModalState = {|
|
|
19
|
+
stackPosition: number,
|
|
20
|
+
horizontalScroll: boolean,
|
|
21
|
+
clickTrapHeight?: CSS.HeightProperty<string | number>,
|
|
22
|
+
|};
|
|
23
|
+
|
|
24
|
+
declare class Modal extends React$Component<ModalProps, ModalState> {
|
|
25
|
+
static Header: typeof Header,
|
|
26
|
+
static Body: typeof Body,
|
|
27
|
+
static Footer: typeof Footer,
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export default Modal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["Modal.tsx"],"names":[],"mappings":";;;AAAA,mDAA+B;AAC/B,0DAAsC;AACtC,8EAAyC;
|
|
1
|
+
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["Modal.tsx"],"names":[],"mappings":";;;AAAA,mDAA+B;AAC/B,0DAAsC;AACtC,8EAAyC;AACzC,qEAAoE;AACpE,gFAAkD;AAElD,+FAAiE;AACjE,oEAAsC;AACtC,6FAA+D;AAC/D,oHAAsF;AACtF,qEAAuC;AACvC,+CAAiE;AACjE,6CAAiD;AACjD,6CAAiD;AACjD,yCAAmC;AACnC,oEAAiC;AACjC,sFAAwD;AACxD,gEAA+C;AAC/C,kFAAyC;AACzC,qDAA+C;AAC/C,wEAAsC;AACtC,kDAAiD;A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BAAC,oBAAK,IAAC,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,GAAI,CAC1E,CACV,CAAC,CAAC,CAAC,IAAI;oCACR,oBAAC,2BAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,iBAAiB;wCAC7C,iCAEG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CACgB,CACd,CACG,CACb,CACF,CACF,CACC,CACO,CACnB,CAAC;IACJ,CAAC;IA3Ja,YAAM,GAAG,oBAAM,CAAC;IAChB,UAAI,GAAG,gBAAI,CAAC;IACZ,YAAM,GAAG,oBAAM,CAAC;IAEhB,eAAS,GAAG;QACxB,QAAQ,YAAC,KAAiB,EAAE,QAA0B,EAAE,aAAqB;YAC3E,IACE,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,UAAA,KAAK,IAAI,OAAA,CAAC,sBAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAM,CAAC,KAAK,CAAC,IAAI,CAAC,sBAAQ,CAAC,KAAK,CAAC,EAAtD,CAAsD,CAAC,EAC7G;gBACA,OAAO,IAAI,KAAK,CACd,2DAAyD,QAAQ,mBAAc,aAAa,gBAAa,CAC1G,CAAC;aACH;QACH,CAAC;KACF,CAAC;IAmNJ,YAAC;CAAA,AAlOD,CAAmC,KAAK,CAAC,SAAS,GAkOjD;kBAlOoB,KAAK"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
|
|
3
|
-
type Props = {|
|
|
4
|
-
children?: React$Node,
|
|
5
|
-
|};
|
|
6
|
-
|
|
7
|
-
declare export class Body extends React$Component<Props> {}
|
|
1
|
+
/* @flow */
|
|
2
|
+
|
|
3
|
+
type Props = {|
|
|
4
|
+
children?: React$Node,
|
|
5
|
+
|};
|
|
6
|
+
|
|
7
|
+
declare export class Body extends React$Component<Props> {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
import type { CloseProps } from './ModalContext';
|
|
3
|
-
|
|
4
|
-
declare var Close: (props: CloseProps) => React$Node;
|
|
5
|
-
|
|
6
|
-
export default Close;
|
|
1
|
+
/* @flow */
|
|
2
|
+
import type { CloseProps } from './ModalContext';
|
|
3
|
+
|
|
4
|
+
declare var Close: (props: CloseProps) => React$Node;
|
|
5
|
+
|
|
6
|
+
export default Close;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
|
|
3
|
-
export type CloseProps = {|
|
|
4
|
-
disableClose?: boolean,
|
|
5
|
-
requestClose: () => void,
|
|
6
|
-
|};
|
|
7
|
-
|
|
8
|
-
export type ModalContextProps = {|
|
|
9
|
-
additionalPadding?: boolean,
|
|
10
|
-
hasHeader?: boolean,
|
|
11
|
-
close?: CloseProps,
|
|
12
|
-
horizontalScroll?: boolean,
|
|
13
|
-
|};
|
|
14
|
-
|
|
15
|
-
declare export var ModalContext: React$Context<ModalContextProps>;
|
|
1
|
+
/* @flow */
|
|
2
|
+
|
|
3
|
+
export type CloseProps = {|
|
|
4
|
+
disableClose?: boolean,
|
|
5
|
+
requestClose: () => void,
|
|
6
|
+
|};
|
|
7
|
+
|
|
8
|
+
export type ModalContextProps = {|
|
|
9
|
+
additionalPadding?: boolean,
|
|
10
|
+
hasHeader?: boolean,
|
|
11
|
+
close?: CloseProps,
|
|
12
|
+
horizontalScroll?: boolean,
|
|
13
|
+
|};
|
|
14
|
+
|
|
15
|
+
declare export var ModalContext: React$Context<ModalContextProps>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
|
|
3
|
-
export type FooterProps = {|
|
|
4
|
-
panel?: boolean,
|
|
5
|
-
sticky?: boolean,
|
|
6
|
-
children?: React$Node,
|
|
7
|
-
|};
|
|
8
|
-
|
|
9
|
-
declare export function isFooter(child: React$Node): boolean;
|
|
10
|
-
|
|
11
|
-
declare export class Footer extends React$Component<FooterProps> {}
|
|
1
|
+
/* @flow */
|
|
2
|
+
|
|
3
|
+
export type FooterProps = {|
|
|
4
|
+
panel?: boolean,
|
|
5
|
+
sticky?: boolean,
|
|
6
|
+
children?: React$Node,
|
|
7
|
+
|};
|
|
8
|
+
|
|
9
|
+
declare export function isFooter(child: React$Node): boolean;
|
|
10
|
+
|
|
11
|
+
declare export class Footer extends React$Component<FooterProps> {}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
|
|
3
|
-
export type HeaderProps = {|
|
|
4
|
-
close?: boolean,
|
|
5
|
-
sticky?: boolean,
|
|
6
|
-
children?: React$Node,
|
|
7
|
-
|};
|
|
8
|
-
|
|
9
|
-
declare export function isHeader(child: React$Node): boolean;
|
|
10
|
-
|
|
11
|
-
declare export class Header extends React$Component<HeaderProps> {}
|
|
1
|
+
/* @flow */
|
|
2
|
+
|
|
3
|
+
export type HeaderProps = {|
|
|
4
|
+
close?: boolean,
|
|
5
|
+
sticky?: boolean,
|
|
6
|
+
children?: React$Node,
|
|
7
|
+
|};
|
|
8
|
+
|
|
9
|
+
declare export function isHeader(child: React$Node): boolean;
|
|
10
|
+
|
|
11
|
+
declare export class Header extends React$Component<HeaderProps> {}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
```js
|
|
2
|
-
const { default: Toggle } = require('../Toggle');
|
|
3
|
-
const { default: Button } = require('../Button');
|
|
4
|
-
|
|
5
|
-
let initialState = { opened: false };
|
|
6
|
-
|
|
7
|
-
function renderModal() {
|
|
8
|
-
return (
|
|
9
|
-
<Modal onClose={close}>
|
|
10
|
-
<Modal.Header>Title</Modal.Header>
|
|
11
|
-
<Modal.Body>
|
|
12
|
-
<p>Use rxjs operators with react hooks</p>
|
|
13
|
-
|
|
14
|
-
<div>
|
|
15
|
-
<Toggle checked={state.panel} onChange={() => setState(({ panel }) => ({ panel: !panel }))} /> Panel{' '}
|
|
16
|
-
{state.panel ? 'enabled' : 'disabled'}
|
|
17
|
-
</div>
|
|
18
|
-
</Modal.Body>
|
|
19
|
-
<Modal.Footer panel={state.panel}>
|
|
20
|
-
<Button onClick={close}>Close</Button>
|
|
21
|
-
</Modal.Footer>
|
|
22
|
-
</Modal>
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function open() {
|
|
27
|
-
setState({ opened: true });
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function close() {
|
|
31
|
-
setState({ opened: false });
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
<div>
|
|
35
|
-
{state.opened && renderModal()}
|
|
36
|
-
<Button onClick={open}>Open</Button>
|
|
37
|
-
</div>;
|
|
38
|
-
```
|
|
1
|
+
```js
|
|
2
|
+
const { default: Toggle } = require('../Toggle');
|
|
3
|
+
const { default: Button } = require('../Button');
|
|
4
|
+
|
|
5
|
+
let initialState = { opened: false };
|
|
6
|
+
|
|
7
|
+
function renderModal() {
|
|
8
|
+
return (
|
|
9
|
+
<Modal onClose={close}>
|
|
10
|
+
<Modal.Header>Title</Modal.Header>
|
|
11
|
+
<Modal.Body>
|
|
12
|
+
<p>Use rxjs operators with react hooks</p>
|
|
13
|
+
|
|
14
|
+
<div>
|
|
15
|
+
<Toggle checked={state.panel} onChange={() => setState(({ panel }) => ({ panel: !panel }))} /> Panel{' '}
|
|
16
|
+
{state.panel ? 'enabled' : 'disabled'}
|
|
17
|
+
</div>
|
|
18
|
+
</Modal.Body>
|
|
19
|
+
<Modal.Footer panel={state.panel}>
|
|
20
|
+
<Button onClick={close}>Close</Button>
|
|
21
|
+
</Modal.Footer>
|
|
22
|
+
</Modal>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function open() {
|
|
27
|
+
setState({ opened: true });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function close() {
|
|
31
|
+
setState({ opened: false });
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
<div>
|
|
35
|
+
{state.opened && renderModal()}
|
|
36
|
+
<Button onClick={open}>Open</Button>
|
|
37
|
+
</div>;
|
|
38
|
+
```
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
export { default, ModalProps, ModalState } from './Modal';
|
|
1
|
+
/* @flow */
|
|
2
|
+
export { default, ModalProps, ModalState } from './Modal';
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
export interface ModalStackSubscription {
|
|
3
|
+
remove: () => void;
|
|
4
|
+
}
|
|
3
5
|
export default class ModalStack {
|
|
4
|
-
static add(component: React.Component, onChange: (stack: ReadonlyArray<React.Component>) => void):
|
|
6
|
+
static add(component: React.Component, onChange: (stack: ReadonlyArray<React.Component>) => void): ModalStackSubscription;
|
|
5
7
|
static remove(component: React.Component): void;
|
|
6
8
|
private static getStackInfo;
|
|
7
9
|
}
|
|
@@ -7,9 +7,20 @@ var ModalStack = /** @class */function () {
|
|
|
7
7
|
ModalStack.add = function (component, onChange) {
|
|
8
8
|
var _a = ModalStack.getStackInfo(),emitter = _a.emitter,mounted = _a.mounted;
|
|
9
9
|
mounted.unshift(component);
|
|
10
|
-
var
|
|
10
|
+
var changeHandler = function changeHandler() {return onChange(mounted.slice());};
|
|
11
|
+
var subscription = emitter.addListener('change', changeHandler);
|
|
11
12
|
emitter.emit('change');
|
|
12
|
-
return
|
|
13
|
+
return {
|
|
14
|
+
remove: function remove() {
|
|
15
|
+
// Forwards compatible with versions 2.x which using the eventemitter3 package
|
|
16
|
+
if ('removeListener' in subscription) {
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
emitter.removeListener('change', changeHandler);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
subscription.remove();
|
|
22
|
+
} };
|
|
23
|
+
|
|
13
24
|
};
|
|
14
25
|
ModalStack.remove = function (component) {
|
|
15
26
|
var _a = ModalStack.getStackInfo(),emitter = _a.emitter,mounted = _a.mounted;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
|
|
3
|
-
declare class ModalStack {
|
|
4
|
-
// eslint-disable-next-line flowtype/no-weak-types
|
|
5
|
-
static add(component: React$Component<any>, onChange: (stack: $ReadOnlyArray<React$Component<any>>) => void): any,
|
|
6
|
-
// eslint-disable-next-line flowtype/no-weak-types
|
|
7
|
-
static remove(component: React$Component<any>): void,
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export default ModalStack;
|
|
1
|
+
/* @flow */
|
|
2
|
+
|
|
3
|
+
declare class ModalStack {
|
|
4
|
+
// eslint-disable-next-line flowtype/no-weak-types
|
|
5
|
+
static add(component: React$Component<any>, onChange: (stack: $ReadOnlyArray<React$Component<any>>) => void): any,
|
|
6
|
+
// eslint-disable-next-line flowtype/no-weak-types
|
|
7
|
+
static remove(component: React$Component<any>): void,
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default ModalStack;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalStack.js","sourceRoot":"","sources":["ModalStack.ts"],"names":[],"mappings":";;AACA,
|
|
1
|
+
{"version":3,"file":"ModalStack.js","sourceRoot":"","sources":["ModalStack.ts"],"names":[],"mappings":";;AACA,uCAAyC;AAezC;IAAA;IA2CA,CAAC;IA1Ce,cAAG,GAAjB,UACE,SAA0B,EAC1B,QAAyD;QAEnD,IAAA,8BAAgD,EAA9C,oBAAO,EAAE,oBAAqC,CAAC;QACvD,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAC3B,IAAM,aAAa,GAAG,cAAM,OAAA,QAAQ,CAAK,OAAO,SAAE,EAAtB,CAAsB,CAAC;QACnD,IAAM,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;QAClE,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACvB,OAAO;YACL,MAAM,EAAN;gBACE,8EAA8E;gBAC9E,IAAI,gBAAgB,IAAI,YAAY,EAAE;oBACpC,aAAa;oBACb,OAAO,CAAC,cAAc,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;oBAChD,OAAO;iBACR;gBAED,YAAY,CAAC,MAAM,EAAE,CAAC;YACxB,CAAC;SACF,CAAC;IACJ,CAAC;IAEa,iBAAM,GAApB,UAAqB,SAA0B;QACvC,IAAA,8BAAgD,EAA9C,oBAAO,EAAE,oBAAqC,CAAC;QACvD,IAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QACzC,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;YAChB,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;SAC1B;QACD,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC;IAEc,uBAAY,GAA3B;QACE,IAAM,eAAe,GAAG,MAA6B,CAAC;QACtD,OAAO,CACL,eAAe,CAAC,kBAAkB;YAClC,CAAC,eAAe,CAAC,kBAAkB,GAAG;gBACpC,OAAO,EAAE,IAAI,wBAAY,EAAE;gBAC3B,OAAO,EAAE,EAAE;aACZ,CAAC,CACH,CAAC;IACJ,CAAC;IACH,iBAAC;AAAD,CAAC,AA3CD,IA2CC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
export { default } from './ModalStack';
|
|
1
|
+
/* @flow */
|
|
2
|
+
export { default } from './ModalStack';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
|
|
3
|
-
export type KeyDescriptionType = {|
|
|
4
|
-
name: string,
|
|
5
|
-
checkPressed: (event: SyntheticKeyboardEvent<HTMLElement> | KeyboardEvent) => boolean,
|
|
6
|
-
|};
|
|
7
|
-
|
|
8
|
-
declare var _default: {|
|
|
9
|
-
getKeyName(): string,
|
|
10
|
-
checkKeyPressed(event: SyntheticKeyboardEvent<HTMLElement> | KeyboardEvent): boolean,
|
|
11
|
-
|};
|
|
12
|
-
|
|
13
|
-
export default _default;
|
|
1
|
+
/* @flow */
|
|
2
|
+
|
|
3
|
+
export type KeyDescriptionType = {|
|
|
4
|
+
name: string,
|
|
5
|
+
checkPressed: (event: SyntheticKeyboardEvent<HTMLElement> | KeyboardEvent) => boolean,
|
|
6
|
+
|};
|
|
7
|
+
|
|
8
|
+
declare var _default: {|
|
|
9
|
+
getKeyName(): string,
|
|
10
|
+
checkKeyPressed(event: SyntheticKeyboardEvent<HTMLElement> | KeyboardEvent): boolean,
|
|
11
|
+
|};
|
|
12
|
+
|
|
13
|
+
export default _default;
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
|
|
3
|
-
type ItemComponentProps = {|
|
|
4
|
-
active: boolean,
|
|
5
|
-
children?: React$Node,
|
|
6
|
-
className: string,
|
|
7
|
-
onClick: () => void,
|
|
8
|
-
pageNumber: number | 'forward',
|
|
9
|
-
tabIndex: number,
|
|
10
|
-
|};
|
|
11
|
-
|
|
12
|
-
export type PagingProps = {|
|
|
13
|
-
activePage: number,
|
|
14
|
-
component?: React$ComponentType<ItemComponentProps>,
|
|
15
|
-
onPageChange: (pageNumber: number) => void,
|
|
16
|
-
pagesCount: number,
|
|
17
|
-
disabled?: boolean,
|
|
18
|
-
strings?: {|
|
|
19
|
-
forward: string,
|
|
20
|
-
|},
|
|
21
|
-
withoutNavigationHint?: boolean,
|
|
22
|
-
caption?: string,
|
|
23
|
-
useGlobalListener?: boolean,
|
|
24
|
-
|};
|
|
25
|
-
|
|
26
|
-
export type PagingState = {|
|
|
27
|
-
focusedByTab: boolean,
|
|
28
|
-
focusedItem: ?ItemType,
|
|
29
|
-
keyboardControl: boolean,
|
|
30
|
-
|};
|
|
31
|
-
|
|
32
|
-
export type ItemType = number | '.' | 'forward';
|
|
33
|
-
|
|
34
|
-
declare class Paging extends React$Component<PagingProps, PagingState> {
|
|
35
|
-
static isForward(pageNumber: number | 'forward'): boolean,
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export default Paging;
|
|
1
|
+
/* @flow */
|
|
2
|
+
|
|
3
|
+
type ItemComponentProps = {|
|
|
4
|
+
active: boolean,
|
|
5
|
+
children?: React$Node,
|
|
6
|
+
className: string,
|
|
7
|
+
onClick: () => void,
|
|
8
|
+
pageNumber: number | 'forward',
|
|
9
|
+
tabIndex: number,
|
|
10
|
+
|};
|
|
11
|
+
|
|
12
|
+
export type PagingProps = {|
|
|
13
|
+
activePage: number,
|
|
14
|
+
component?: React$ComponentType<ItemComponentProps>,
|
|
15
|
+
onPageChange: (pageNumber: number) => void,
|
|
16
|
+
pagesCount: number,
|
|
17
|
+
disabled?: boolean,
|
|
18
|
+
strings?: {|
|
|
19
|
+
forward: string,
|
|
20
|
+
|},
|
|
21
|
+
withoutNavigationHint?: boolean,
|
|
22
|
+
caption?: string,
|
|
23
|
+
useGlobalListener?: boolean,
|
|
24
|
+
|};
|
|
25
|
+
|
|
26
|
+
export type PagingState = {|
|
|
27
|
+
focusedByTab: boolean,
|
|
28
|
+
focusedItem: ?ItemType,
|
|
29
|
+
keyboardControl: boolean,
|
|
30
|
+
|};
|
|
31
|
+
|
|
32
|
+
export type ItemType = number | '.' | 'forward';
|
|
33
|
+
|
|
34
|
+
declare class Paging extends React$Component<PagingProps, PagingState> {
|
|
35
|
+
static isForward(pageNumber: number | 'forward'): boolean,
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export default Paging;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
import type { ItemType } from './Paging';
|
|
3
|
-
|
|
4
|
-
declare function getItems(active: number, total: number): ItemType[];
|
|
5
|
-
|
|
6
|
-
declare var _default: {|
|
|
7
|
-
getItems: typeof getItems,
|
|
8
|
-
|};
|
|
9
|
-
|
|
10
|
-
export default _default;
|
|
1
|
+
/* @flow */
|
|
2
|
+
import type { ItemType } from './Paging';
|
|
3
|
+
|
|
4
|
+
declare function getItems(active: number, total: number): ItemType[];
|
|
5
|
+
|
|
6
|
+
declare var _default: {|
|
|
7
|
+
getItems: typeof getItems,
|
|
8
|
+
|};
|
|
9
|
+
|
|
10
|
+
export default _default;
|