@skbkontur/react-ui 1.6.7 → 1.6.10-radio-group-controlled
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 +17 -11
- package/components/Checkbox/Checkbox.js.flow +27 -27
- package/components/Checkbox/Checkbox.js.map +1 -1
- package/components/Checkbox/Checkbox.styles.d.ts +5 -3
- package/components/Checkbox/Checkbox.styles.js +20 -14
- package/components/Checkbox/Checkbox.styles.js.map +1 -1
- 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 +2 -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.d.ts +14 -6
- package/components/Gapped/Gapped.js +22 -28
- package/components/Gapped/Gapped.js.flow +13 -13
- package/components/Gapped/Gapped.js.map +1 -1
- 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.d.ts +3 -0
- package/components/Modal/Modal.js +10 -1
- package/components/Modal/Modal.js.flow +30 -30
- package/components/Modal/Modal.js.map +1 -1
- package/components/Modal/Modal.styles.d.ts +1 -0
- package/components/Modal/Modal.styles.js +7 -4
- package/components/Modal/Modal.styles.js.map +1 -1
- package/components/Modal/ModalBody.d.ts +1 -0
- package/components/Modal/ModalBody.js +1 -0
- package/components/Modal/ModalBody.js.flow +7 -7
- package/components/Modal/ModalBody.js.map +1 -1
- 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/helpers.d.ts +2 -0
- package/components/Modal/helpers.js +8 -0
- package/components/Modal/helpers.js.map +1 -0
- package/components/Modal/index.js.flow +2 -2
- package/components/ModalStack/ModalStack.js.flow +10 -10
- 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/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.d.ts +1 -0
- package/components/SidePage/SidePageHeader.js +10 -9
- package/components/SidePage/SidePageHeader.js.flow +11 -11
- package/components/SidePage/SidePageHeader.js.map +1 -1
- 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/Playground/ThemeEditor.js +1 -1
- package/components/ThemeProvider/Playground/ThemeEditor.js.map +1 -1
- package/components/ThemeProvider/Playground/VariableValue.js +1 -1
- package/components/ThemeProvider/Playground/VariableValue.js.map +1 -1
- 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/ZIndexStorage.d.ts +1 -0
- package/components/ZIndex/ZIndexStorage.js +1 -0
- package/components/ZIndex/ZIndexStorage.js.map +1 -1
- 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/lib/theming/Emotion.js +16 -3
- package/lib/theming/Emotion.js.map +1 -1
- package/package.json +2 -6
- 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 -0
- 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
- package/typings/stylis-plugin-extra-scope.d.ts +0 -3
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
import * as CSS from 'csstype';
|
|
3
|
-
|
|
4
|
-
export type ScrollContainerProps = {|
|
|
5
|
-
invert?: boolean,
|
|
6
|
-
maxHeight?: CSS.MaxHeightProperty<string | number>,
|
|
7
|
-
preventWindowScroll?: boolean,
|
|
8
|
-
|};
|
|
9
|
-
|
|
10
|
-
export type ScrollContainerState = {|
|
|
11
|
-
scrollActive: boolean,
|
|
12
|
-
hover: boolean,
|
|
13
|
-
scrolling: boolean,
|
|
14
|
-
scrollSize: number,
|
|
15
|
-
scrollPos: number,
|
|
16
|
-
|};
|
|
17
|
-
|
|
18
|
-
declare class ScrollContainer extends React$Component<ScrollContainerProps, ScrollContainerState> {
|
|
19
|
-
scrollTo(element: HTMLElement): void,
|
|
20
|
-
scrollToTop(): void,
|
|
21
|
-
scrollToBottom(): void,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default ScrollContainer;
|
|
1
|
+
/* @flow */
|
|
2
|
+
import * as CSS from 'csstype';
|
|
3
|
+
|
|
4
|
+
export type ScrollContainerProps = {|
|
|
5
|
+
invert?: boolean,
|
|
6
|
+
maxHeight?: CSS.MaxHeightProperty<string | number>,
|
|
7
|
+
preventWindowScroll?: boolean,
|
|
8
|
+
|};
|
|
9
|
+
|
|
10
|
+
export type ScrollContainerState = {|
|
|
11
|
+
scrollActive: boolean,
|
|
12
|
+
hover: boolean,
|
|
13
|
+
scrolling: boolean,
|
|
14
|
+
scrollSize: number,
|
|
15
|
+
scrollPos: number,
|
|
16
|
+
|};
|
|
17
|
+
|
|
18
|
+
declare class ScrollContainer extends React$Component<ScrollContainerProps, ScrollContainerState> {
|
|
19
|
+
scrollTo(element: HTMLElement): void,
|
|
20
|
+
scrollToTop(): void,
|
|
21
|
+
scrollToBottom(): void,
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default ScrollContainer;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
export { default, ScrollContainerProps, ScrollContainerState } from './ScrollContainer';
|
|
1
|
+
/* @flow */
|
|
2
|
+
export { default, ScrollContainerProps, ScrollContainerState } from './ScrollContainer';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
|
|
3
|
-
declare class Item extends React$Component<{|
|
|
4
|
-
children?: React$Node,
|
|
5
|
-
|}> {}
|
|
6
|
-
|
|
7
|
-
export default Item;
|
|
1
|
+
/* @flow */
|
|
2
|
+
|
|
3
|
+
declare class Item extends React$Component<{|
|
|
4
|
+
children?: React$Node,
|
|
5
|
+
|}> {}
|
|
6
|
+
|
|
7
|
+
export default Item;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
```jsx
|
|
2
|
-
let items = [Select.static(() => <Select.Item>Not selectable</Select.Item>), 'One', 'Two', 'Three', Select.SEP, 'Four'];
|
|
3
|
-
|
|
4
|
-
let initialState = {};
|
|
5
|
-
|
|
6
|
-
<Select items={items} value={state.value} onChange={(_, value) => setState({ value })} />;
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
#### Локали по умолчанию (см. `LocaleProvider`)
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
interface SelectLocale {
|
|
13
|
-
placeholder?: React.ReactNode;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const ru_RU = {
|
|
17
|
-
placeholder: 'ничего не выбрано',
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const en_GB = {
|
|
21
|
-
placeholder: 'nothing selected',
|
|
22
|
-
};
|
|
23
|
-
```
|
|
1
|
+
```jsx
|
|
2
|
+
let items = [Select.static(() => <Select.Item>Not selectable</Select.Item>), 'One', 'Two', 'Three', Select.SEP, 'Four'];
|
|
3
|
+
|
|
4
|
+
let initialState = {};
|
|
5
|
+
|
|
6
|
+
<Select items={items} value={state.value} onChange={(_, value) => setState({ value })} />;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
#### Локали по умолчанию (см. `LocaleProvider`)
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
interface SelectLocale {
|
|
13
|
+
placeholder?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const ru_RU = {
|
|
17
|
+
placeholder: 'ничего не выбрано',
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const en_GB = {
|
|
21
|
+
placeholder: 'nothing selected',
|
|
22
|
+
};
|
|
23
|
+
```
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
import Select from './Select.js';
|
|
3
|
-
|
|
4
|
-
export default Select;
|
|
1
|
+
/* @flow */
|
|
2
|
+
import Select from './Select.js';
|
|
3
|
+
|
|
4
|
+
export default Select;
|
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
import * as CSS from 'csstype';
|
|
3
|
-
|
|
4
|
-
import Item from './Item';
|
|
5
|
-
import type { FocusEventHandler } from '../eventHandlers';
|
|
6
|
-
import type { ButtonUse, ButtonSize } from '../Button/Button';
|
|
7
|
-
|
|
8
|
-
export type ButtonParams = {|
|
|
9
|
-
disabled?: boolean,
|
|
10
|
-
label: React$Node,
|
|
11
|
-
onClick: () => void,
|
|
12
|
-
onKeyDown: (event: SyntheticKeyboardEvent<HTMLElement>) => void,
|
|
13
|
-
opened: boolean,
|
|
14
|
-
isPlaceholder: boolean,
|
|
15
|
-
|};
|
|
16
|
-
|
|
17
|
-
export type SelectProps<TValue, TItem> = {|
|
|
18
|
-
// eslint-disable-next-line flowtype/no-weak-types
|
|
19
|
-
_icon?: React$Element<any>,
|
|
20
|
-
_renderButton?: (params: ButtonParams) => React$Node,
|
|
21
|
-
defaultValue?: TValue,
|
|
22
|
-
// eslint-disable-next-line flowtype/no-weak-types
|
|
23
|
-
diadocLinkIcon?: React$Element<any>,
|
|
24
|
-
disablePortal?: boolean,
|
|
25
|
-
disabled?: boolean,
|
|
26
|
-
error?: boolean,
|
|
27
|
-
filterItem?: (value: TValue, item: TItem, pattern: string) => boolean,
|
|
28
|
-
// eslint-disable-next-line flowtype/no-weak-types
|
|
29
|
-
items?: Array<[TValue, TItem] | TItem | React$Element<any> | (() => React$Element<any>)>,
|
|
30
|
-
maxMenuHeight?: number,
|
|
31
|
-
maxWidth?: CSS.MaxWidthProperty<string | number>,
|
|
32
|
-
menuAlign?: 'left' | 'right',
|
|
33
|
-
menuWidth?: CSS.WidthProperty<string | number>,
|
|
34
|
-
onChange?: (e: {|
|
|
35
|
-
target: {|
|
|
36
|
-
value: TValue,
|
|
37
|
-
|},
|
|
38
|
-
|}, value: TValue) => void,
|
|
39
|
-
onClose?: () => void,
|
|
40
|
-
onMouseEnter?: (e: SyntheticMouseEvent<HTMLElement>) => void,
|
|
41
|
-
onMouseLeave?: (e: SyntheticMouseEvent<HTMLElement>) => void,
|
|
42
|
-
onMouseOver?: (e: SyntheticMouseEvent<HTMLElement>) => void,
|
|
43
|
-
onOpen?: () => void,
|
|
44
|
-
placeholder?: React$Node,
|
|
45
|
-
renderItem?: (value: TValue, item?: TItem) => React$Node,
|
|
46
|
-
renderValue?: (value: TValue, item?: TItem) => React$Node,
|
|
47
|
-
areValuesEqual?: (value1: TValue, value2: TValue) => boolean,
|
|
48
|
-
search?: boolean,
|
|
49
|
-
value?: TValue,
|
|
50
|
-
width?: number | string,
|
|
51
|
-
warning?: boolean,
|
|
52
|
-
use?: ButtonUse,
|
|
53
|
-
size?: ButtonSize,
|
|
54
|
-
onFocus?: FocusEventHandler<HTMLElement>,
|
|
55
|
-
onBlur?: FocusEventHandler<HTMLElement>,
|
|
56
|
-
|};
|
|
57
|
-
|
|
58
|
-
export type SelectState<TValue> = {|
|
|
59
|
-
opened: boolean,
|
|
60
|
-
searchPattern?: string,
|
|
61
|
-
value: ?TValue,
|
|
62
|
-
|};
|
|
63
|
-
|
|
64
|
-
declare class Select<TValue = {}, TItem = {}> extends React$Component<SelectProps<TValue, TItem>, SelectState<TValue>> {
|
|
65
|
-
static Item: typeof Item,
|
|
66
|
-
static SEP: () => React$Node,
|
|
67
|
-
// eslint-disable-next-line flowtype/no-weak-types
|
|
68
|
-
static static: (element: string | number | boolean | {} | React$Element<any> | React$Node | React$Portal | (() => React$Node) | null | void) => {} | null | void,
|
|
69
|
-
open: () => void,
|
|
70
|
-
close: () => void,
|
|
71
|
-
focus(): void,
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/* eslint-disable flowtype/no-weak-types */
|
|
75
|
-
declare function renderValue(value: any, item: any): any;
|
|
76
|
-
declare function renderItem(value: any, item: any): any;
|
|
77
|
-
declare function areValuesEqual(value1: any, value2: any): boolean;
|
|
78
|
-
declare function filterItem(value: any, item: any, pattern: string): boolean;
|
|
79
|
-
/* eslint-enable flowtype/no-weak-types */
|
|
80
|
-
|
|
81
|
-
export default Select;
|
|
1
|
+
/* @flow */
|
|
2
|
+
import * as CSS from 'csstype';
|
|
3
|
+
|
|
4
|
+
import Item from './Item';
|
|
5
|
+
import type { FocusEventHandler } from '../eventHandlers';
|
|
6
|
+
import type { ButtonUse, ButtonSize } from '../Button/Button';
|
|
7
|
+
|
|
8
|
+
export type ButtonParams = {|
|
|
9
|
+
disabled?: boolean,
|
|
10
|
+
label: React$Node,
|
|
11
|
+
onClick: () => void,
|
|
12
|
+
onKeyDown: (event: SyntheticKeyboardEvent<HTMLElement>) => void,
|
|
13
|
+
opened: boolean,
|
|
14
|
+
isPlaceholder: boolean,
|
|
15
|
+
|};
|
|
16
|
+
|
|
17
|
+
export type SelectProps<TValue, TItem> = {|
|
|
18
|
+
// eslint-disable-next-line flowtype/no-weak-types
|
|
19
|
+
_icon?: React$Element<any>,
|
|
20
|
+
_renderButton?: (params: ButtonParams) => React$Node,
|
|
21
|
+
defaultValue?: TValue,
|
|
22
|
+
// eslint-disable-next-line flowtype/no-weak-types
|
|
23
|
+
diadocLinkIcon?: React$Element<any>,
|
|
24
|
+
disablePortal?: boolean,
|
|
25
|
+
disabled?: boolean,
|
|
26
|
+
error?: boolean,
|
|
27
|
+
filterItem?: (value: TValue, item: TItem, pattern: string) => boolean,
|
|
28
|
+
// eslint-disable-next-line flowtype/no-weak-types
|
|
29
|
+
items?: Array<[TValue, TItem] | TItem | React$Element<any> | (() => React$Element<any>)>,
|
|
30
|
+
maxMenuHeight?: number,
|
|
31
|
+
maxWidth?: CSS.MaxWidthProperty<string | number>,
|
|
32
|
+
menuAlign?: 'left' | 'right',
|
|
33
|
+
menuWidth?: CSS.WidthProperty<string | number>,
|
|
34
|
+
onChange?: (e: {|
|
|
35
|
+
target: {|
|
|
36
|
+
value: TValue,
|
|
37
|
+
|},
|
|
38
|
+
|}, value: TValue) => void,
|
|
39
|
+
onClose?: () => void,
|
|
40
|
+
onMouseEnter?: (e: SyntheticMouseEvent<HTMLElement>) => void,
|
|
41
|
+
onMouseLeave?: (e: SyntheticMouseEvent<HTMLElement>) => void,
|
|
42
|
+
onMouseOver?: (e: SyntheticMouseEvent<HTMLElement>) => void,
|
|
43
|
+
onOpen?: () => void,
|
|
44
|
+
placeholder?: React$Node,
|
|
45
|
+
renderItem?: (value: TValue, item?: TItem) => React$Node,
|
|
46
|
+
renderValue?: (value: TValue, item?: TItem) => React$Node,
|
|
47
|
+
areValuesEqual?: (value1: TValue, value2: TValue) => boolean,
|
|
48
|
+
search?: boolean,
|
|
49
|
+
value?: TValue,
|
|
50
|
+
width?: number | string,
|
|
51
|
+
warning?: boolean,
|
|
52
|
+
use?: ButtonUse,
|
|
53
|
+
size?: ButtonSize,
|
|
54
|
+
onFocus?: FocusEventHandler<HTMLElement>,
|
|
55
|
+
onBlur?: FocusEventHandler<HTMLElement>,
|
|
56
|
+
|};
|
|
57
|
+
|
|
58
|
+
export type SelectState<TValue> = {|
|
|
59
|
+
opened: boolean,
|
|
60
|
+
searchPattern?: string,
|
|
61
|
+
value: ?TValue,
|
|
62
|
+
|};
|
|
63
|
+
|
|
64
|
+
declare class Select<TValue = {}, TItem = {}> extends React$Component<SelectProps<TValue, TItem>, SelectState<TValue>> {
|
|
65
|
+
static Item: typeof Item,
|
|
66
|
+
static SEP: () => React$Node,
|
|
67
|
+
// eslint-disable-next-line flowtype/no-weak-types
|
|
68
|
+
static static: (element: string | number | boolean | {} | React$Element<any> | React$Node | React$Portal | (() => React$Node) | null | void) => {} | null | void,
|
|
69
|
+
open: () => void,
|
|
70
|
+
close: () => void,
|
|
71
|
+
focus(): void,
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* eslint-disable flowtype/no-weak-types */
|
|
75
|
+
declare function renderValue(value: any, item: any): any;
|
|
76
|
+
declare function renderItem(value: any, item: any): any;
|
|
77
|
+
declare function areValuesEqual(value1: any, value2: any): boolean;
|
|
78
|
+
declare function filterItem(value: any, item: any, pattern: string): boolean;
|
|
79
|
+
/* eslint-enable flowtype/no-weak-types */
|
|
80
|
+
|
|
81
|
+
export default Select;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
export { default, SelectProps, SelectState } from './Select';
|
|
1
|
+
/* @flow */
|
|
2
|
+
export { default, SelectProps, SelectState } from './Select';
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
```jsx
|
|
2
|
-
let initialState = { opened: false };
|
|
3
|
-
|
|
4
|
-
function renderSidePage() {
|
|
5
|
-
return (
|
|
6
|
-
<SidePage onClose={close} blockBackground>
|
|
7
|
-
<SidePage.Header>Title</SidePage.Header>
|
|
8
|
-
<SidePage.Body>
|
|
9
|
-
<div
|
|
10
|
-
style={{
|
|
11
|
-
background: `repeating-linear-gradient(
|
|
12
|
-
60deg,
|
|
13
|
-
#fafafa,
|
|
14
|
-
#fafafa 20px,
|
|
15
|
-
#dfdede 20px,
|
|
16
|
-
#dfdede 40px
|
|
17
|
-
)`,
|
|
18
|
-
height: 600,
|
|
19
|
-
padding: '20px 0',
|
|
20
|
-
}}
|
|
21
|
-
>
|
|
22
|
-
<SidePage.Container>
|
|
23
|
-
<p>Use rxjs operators with react hooks</p>
|
|
24
|
-
</SidePage.Container>
|
|
25
|
-
</div>
|
|
26
|
-
</SidePage.Body>
|
|
27
|
-
<SidePage.Footer panel>
|
|
28
|
-
<Button onClick={close}>Close</Button>
|
|
29
|
-
</SidePage.Footer>
|
|
30
|
-
</SidePage>
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function open() {
|
|
35
|
-
setState({ opened: true });
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function close() {
|
|
39
|
-
setState({ opened: false });
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
<div>
|
|
43
|
-
{state.opened && renderSidePage()}
|
|
44
|
-
<Button onClick={open}>Open</Button>
|
|
45
|
-
</div>;
|
|
46
|
-
```
|
|
1
|
+
```jsx
|
|
2
|
+
let initialState = { opened: false };
|
|
3
|
+
|
|
4
|
+
function renderSidePage() {
|
|
5
|
+
return (
|
|
6
|
+
<SidePage onClose={close} blockBackground>
|
|
7
|
+
<SidePage.Header>Title</SidePage.Header>
|
|
8
|
+
<SidePage.Body>
|
|
9
|
+
<div
|
|
10
|
+
style={{
|
|
11
|
+
background: `repeating-linear-gradient(
|
|
12
|
+
60deg,
|
|
13
|
+
#fafafa,
|
|
14
|
+
#fafafa 20px,
|
|
15
|
+
#dfdede 20px,
|
|
16
|
+
#dfdede 40px
|
|
17
|
+
)`,
|
|
18
|
+
height: 600,
|
|
19
|
+
padding: '20px 0',
|
|
20
|
+
}}
|
|
21
|
+
>
|
|
22
|
+
<SidePage.Container>
|
|
23
|
+
<p>Use rxjs operators with react hooks</p>
|
|
24
|
+
</SidePage.Container>
|
|
25
|
+
</div>
|
|
26
|
+
</SidePage.Body>
|
|
27
|
+
<SidePage.Footer panel>
|
|
28
|
+
<Button onClick={close}>Close</Button>
|
|
29
|
+
</SidePage.Footer>
|
|
30
|
+
</SidePage>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function open() {
|
|
35
|
+
setState({ opened: true });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function close() {
|
|
39
|
+
setState({ opened: false });
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
<div>
|
|
43
|
+
{state.opened && renderSidePage()}
|
|
44
|
+
<Button onClick={open}>Open</Button>
|
|
45
|
+
</div>;
|
|
46
|
+
```
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
import SidePageContainer from './SidePageContainer';
|
|
3
|
-
import SidePageHeader from './SidePageHeader';
|
|
4
|
-
import SidePageBody from './SidePageBody';
|
|
5
|
-
import SidePageFooter from './SidePageFooter';
|
|
6
|
-
|
|
7
|
-
export type SidePageProps = {|
|
|
8
|
-
blockBackground?: boolean,
|
|
9
|
-
disableClose?: boolean,
|
|
10
|
-
ignoreBackgroundClick?: boolean,
|
|
11
|
-
width?: number,
|
|
12
|
-
onClose?: () => void,
|
|
13
|
-
fromLeft?: boolean,
|
|
14
|
-
disableAnimations?: boolean,
|
|
15
|
-
children?: React$Node,
|
|
16
|
-
|};
|
|
17
|
-
|
|
18
|
-
export type SidePageState = {|
|
|
19
|
-
stackPosition?: number,
|
|
20
|
-
hasMargin?: boolean,
|
|
21
|
-
hasShadow?: boolean,
|
|
22
|
-
hasBackground?: boolean,
|
|
23
|
-
|};
|
|
24
|
-
|
|
25
|
-
declare class SidePage extends React$Component<SidePageProps, SidePageState> {
|
|
26
|
-
static Header: typeof SidePageHeader,
|
|
27
|
-
static Body: typeof SidePageBody,
|
|
28
|
-
static Footer: typeof SidePageFooter,
|
|
29
|
-
static Container: typeof SidePageContainer,
|
|
30
|
-
|
|
31
|
-
updateLayout: () => void,
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export default SidePage;
|
|
1
|
+
/* @flow */
|
|
2
|
+
import SidePageContainer from './SidePageContainer';
|
|
3
|
+
import SidePageHeader from './SidePageHeader';
|
|
4
|
+
import SidePageBody from './SidePageBody';
|
|
5
|
+
import SidePageFooter from './SidePageFooter';
|
|
6
|
+
|
|
7
|
+
export type SidePageProps = {|
|
|
8
|
+
blockBackground?: boolean,
|
|
9
|
+
disableClose?: boolean,
|
|
10
|
+
ignoreBackgroundClick?: boolean,
|
|
11
|
+
width?: number,
|
|
12
|
+
onClose?: () => void,
|
|
13
|
+
fromLeft?: boolean,
|
|
14
|
+
disableAnimations?: boolean,
|
|
15
|
+
children?: React$Node,
|
|
16
|
+
|};
|
|
17
|
+
|
|
18
|
+
export type SidePageState = {|
|
|
19
|
+
stackPosition?: number,
|
|
20
|
+
hasMargin?: boolean,
|
|
21
|
+
hasShadow?: boolean,
|
|
22
|
+
hasBackground?: boolean,
|
|
23
|
+
|};
|
|
24
|
+
|
|
25
|
+
declare class SidePage extends React$Component<SidePageProps, SidePageState> {
|
|
26
|
+
static Header: typeof SidePageHeader,
|
|
27
|
+
static Body: typeof SidePageBody,
|
|
28
|
+
static Footer: typeof SidePageFooter,
|
|
29
|
+
static Container: typeof SidePageContainer,
|
|
30
|
+
|
|
31
|
+
updateLayout: () => void,
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default SidePage;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
import type { SidePageContextType } from './SidePageContext';
|
|
3
|
-
|
|
4
|
-
export type SidePageBodyProps = {|
|
|
5
|
-
children?: React$Node,
|
|
6
|
-
context?: SidePageContextType,
|
|
7
|
-
|};
|
|
8
|
-
|
|
9
|
-
declare export class SidePageBody extends React$Component<SidePageBodyProps> {}
|
|
10
|
-
|
|
11
|
-
declare export var SidePageBodyWithContext: (props: SidePageBodyProps) => React$Node;
|
|
12
|
-
|
|
13
|
-
export default SidePageBodyWithContext;
|
|
1
|
+
/* @flow */
|
|
2
|
+
import type { SidePageContextType } from './SidePageContext';
|
|
3
|
+
|
|
4
|
+
export type SidePageBodyProps = {|
|
|
5
|
+
children?: React$Node,
|
|
6
|
+
context?: SidePageContextType,
|
|
7
|
+
|};
|
|
8
|
+
|
|
9
|
+
declare export class SidePageBody extends React$Component<SidePageBodyProps> {}
|
|
10
|
+
|
|
11
|
+
declare export var SidePageBodyWithContext: (props: SidePageBodyProps) => React$Node;
|
|
12
|
+
|
|
13
|
+
export default SidePageBodyWithContext;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
|
|
3
|
-
type Props = {|
|
|
4
|
-
children?: React$Node,
|
|
5
|
-
|};
|
|
6
|
-
|
|
7
|
-
declare class SidePageContainer extends React$Component<Props> {}
|
|
8
|
-
|
|
9
|
-
export default SidePageContainer;
|
|
1
|
+
/* @flow */
|
|
2
|
+
|
|
3
|
+
type Props = {|
|
|
4
|
+
children?: React$Node,
|
|
5
|
+
|};
|
|
6
|
+
|
|
7
|
+
declare class SidePageContainer extends React$Component<Props> {}
|
|
8
|
+
|
|
9
|
+
export default SidePageContainer;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
import { SidePageFooter } from './SidePageFooter';
|
|
3
|
-
|
|
4
|
-
export type SidePageContextType = {|
|
|
5
|
-
requestClose: () => void,
|
|
6
|
-
width: number | string,
|
|
7
|
-
updateLayout: () => void,
|
|
8
|
-
footerRef: (ref: SidePageFooter | null) => void,
|
|
9
|
-
|};
|
|
10
|
-
|
|
11
|
-
declare export var SidePageContext: React$Context<SidePageContextType>;
|
|
12
|
-
|
|
13
|
-
declare export var withContext: <P: {}>(BaseComponent: React$ComponentType<P & {|
|
|
14
|
-
context?: SidePageContextType | void,
|
|
15
|
-
|}>) => (props: P) => React$Node;
|
|
1
|
+
/* @flow */
|
|
2
|
+
import { SidePageFooter } from './SidePageFooter';
|
|
3
|
+
|
|
4
|
+
export type SidePageContextType = {|
|
|
5
|
+
requestClose: () => void,
|
|
6
|
+
width: number | string,
|
|
7
|
+
updateLayout: () => void,
|
|
8
|
+
footerRef: (ref: SidePageFooter | null) => void,
|
|
9
|
+
|};
|
|
10
|
+
|
|
11
|
+
declare export var SidePageContext: React$Context<SidePageContextType>;
|
|
12
|
+
|
|
13
|
+
declare export var withContext: <P: {}>(BaseComponent: React$ComponentType<P & {|
|
|
14
|
+
context?: SidePageContextType | void,
|
|
15
|
+
|}>) => (props: P) => React$Node;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
import type { SidePageContextType } from './SidePageContext';
|
|
3
|
-
|
|
4
|
-
export type SidePageFooterProps = {|
|
|
5
|
-
children?: React$Node | ((fixed: boolean) => React$Node),
|
|
6
|
-
context?: SidePageContextType,
|
|
7
|
-
panel?: boolean,
|
|
8
|
-
|};
|
|
9
|
-
|
|
10
|
-
declare export class SidePageFooter extends React$Component<SidePageFooterProps> {
|
|
11
|
-
update: () => void,
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
declare export var SidePageFooterWithContext: (props: SidePageFooterProps) => React$Node;
|
|
15
|
-
|
|
16
|
-
export default SidePageFooterWithContext;
|
|
1
|
+
/* @flow */
|
|
2
|
+
import type { SidePageContextType } from './SidePageContext';
|
|
3
|
+
|
|
4
|
+
export type SidePageFooterProps = {|
|
|
5
|
+
children?: React$Node | ((fixed: boolean) => React$Node),
|
|
6
|
+
context?: SidePageContextType,
|
|
7
|
+
panel?: boolean,
|
|
8
|
+
|};
|
|
9
|
+
|
|
10
|
+
declare export class SidePageFooter extends React$Component<SidePageFooterProps> {
|
|
11
|
+
update: () => void,
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare export var SidePageFooterWithContext: (props: SidePageFooterProps) => React$Node;
|
|
15
|
+
|
|
16
|
+
export default SidePageFooterWithContext;
|
|
@@ -40,16 +40,17 @@ var SidePageHeader = /** @class */function (_super) {
|
|
|
40
40
|
_this.renderClose(),
|
|
41
41
|
React.createElement("div", { className: Emotion_1.cx(SidePage_module_less_1["default"].title, (_b = {}, _b[SidePage_module_less_1["default"].fixed] = fixed, _b[SidePage_styles_1["default"].fixed(_this.theme)] = fixed, _b)) }, utils_1.isFunction(_this.props.children) ? _this.props.children(fixed) : _this.props.children));
|
|
42
42
|
};
|
|
43
|
+
_this.renderCloseContent = function (fixed) {return React.createElement(SidePageContext_1.SidePageContext.Consumer, null, function (_a) {
|
|
44
|
+
var requestClose = _a.requestClose;
|
|
45
|
+
var _b;
|
|
46
|
+
return React.createElement("a", { href: "javascript:", className: Emotion_1.cx(SidePage_module_less_1["default"].close, SidePage_styles_1["default"].close(_this.theme), (_b = {},
|
|
47
|
+
_b[SidePage_module_less_1["default"].fixed] = fixed,
|
|
48
|
+
_b[SidePage_styles_1["default"].fixed(_this.theme)] = fixed,
|
|
49
|
+
_b)), onClick: requestClose, "data-tid": "SidePage-Close" },
|
|
50
|
+
React.createElement(cross_1.SVGCross, { className: SidePage_module_less_1["default"].closeIcon }));
|
|
51
|
+
});};
|
|
43
52
|
_this.renderClose = function () {
|
|
44
|
-
return React.createElement(Sticky_1["default"], { side: "top", offset: CLOSE_ELEMENT_OFFSET },
|
|
45
|
-
var requestClose = _a.requestClose;
|
|
46
|
-
var _b;
|
|
47
|
-
return React.createElement("a", { href: "javascript:", className: Emotion_1.cx(SidePage_module_less_1["default"].close, SidePage_styles_1["default"].close(_this.theme), (_b = {},
|
|
48
|
-
_b[SidePage_module_less_1["default"].fixed] = fixed,
|
|
49
|
-
_b[SidePage_styles_1["default"].fixed(_this.theme)] = fixed,
|
|
50
|
-
_b)), onClick: requestClose, "data-tid": "SidePage-Close" },
|
|
51
|
-
React.createElement(cross_1.SVGCross, { className: SidePage_module_less_1["default"].closeIcon }));
|
|
52
|
-
});});
|
|
53
|
+
return React.createElement(Sticky_1["default"], { side: "top", offset: CLOSE_ELEMENT_OFFSET }, _this.renderCloseContent);
|
|
53
54
|
};
|
|
54
55
|
_this.updateReadyToFix = function () {
|
|
55
56
|
if (_this.wrapper) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/* @flow */
|
|
2
|
-
|
|
3
|
-
export type SidePageHeaderProps = {|
|
|
4
|
-
children?: React$Node | ((fixed: boolean) => React$Node),
|
|
5
|
-
|};
|
|
6
|
-
|
|
7
|
-
declare class SidePageHeader extends React$Component<SidePageHeaderProps> {
|
|
8
|
-
renderClose(): React$Node,
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export default SidePageHeader;
|
|
1
|
+
/* @flow */
|
|
2
|
+
|
|
3
|
+
export type SidePageHeaderProps = {|
|
|
4
|
+
children?: React$Node | ((fixed: boolean) => React$Node),
|
|
5
|
+
|};
|
|
6
|
+
|
|
7
|
+
declare class SidePageHeader extends React$Component<SidePageHeaderProps> {
|
|
8
|
+
renderClose(): React$Node,
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default SidePageHeader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidePageHeader.js","sourceRoot":"","sources":["SidePageHeader.tsx"],"names":[],"mappings":";;;AAAA,mDAA+B;AAC/B,6DAA+B;AAC/B,2CAA6C;AAC7C,qDAAoD;AACpD,wFAA4C;AAC5C,yCAA6C;AAC7C,qDAA+C;AAC/C,8EAAyC;AACzC,kDAAiD;
|
|
1
|
+
{"version":3,"file":"SidePageHeader.js","sourceRoot":"","sources":["SidePageHeader.tsx"],"names":[],"mappings":";;;AAAA,mDAA+B;AAC/B,6DAA+B;AAC/B,2CAA6C;AAC7C,qDAAoD;AACpD,wFAA4C;AAC5C,yCAA6C;AAC7C,qDAA+C;AAC/C,8EAAyC;AACzC,kDAAiD;AAGjD,IAAM,0BAA0B,GAAG,EAAE,CAAC;AACtC,IAAM,wBAAwB,GAAG,EAAE,CAAC;AACpC,IAAM,sBAAsB,GAAG,CAAC,CAAC;AACjC,IAAM,oBAAoB,GAAG,0BAA0B,GAA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