@vkontakte/vkui 4.20.0 → 4.22.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 +414 -116
- package/.cache/ts/src/components/Avatar/Avatar.d.ts +2 -0
- package/.cache/ts/src/components/Cell/Cell.d.ts +11 -0
- package/.cache/ts/src/components/Cell/CellCheckbox/CellCheckbox.d.ts +5 -0
- package/.cache/ts/src/components/Cell/CellDragger/CellDragger.d.ts +6 -0
- package/.cache/ts/src/components/Cell/useDraggable.d.ts +13 -0
- package/.cache/ts/src/components/CustomSelect/CustomSelect.d.ts +0 -1
- package/.cache/ts/src/components/DropdownIcon/DropdownIcon.d.ts +3 -0
- package/.cache/ts/src/components/FocusTrap/FocusTrap.d.ts +2 -3
- package/.cache/ts/src/components/FormField/FormField.d.ts +2 -3
- package/.cache/ts/src/components/FormItem/FormItem.d.ts +2 -3
- package/.cache/ts/src/components/FormLayout/FormLayout.d.ts +2 -4
- package/.cache/ts/src/components/GridAvatar/GridAvatar.d.ts +9 -0
- package/.cache/ts/src/components/HorizontalCell/HorizontalCell.d.ts +2 -3
- package/.cache/ts/src/components/HorizontalScroll/HorizontalScroll.d.ts +3 -2
- package/.cache/ts/src/components/InitialsAvatar/InitialsAvatar.d.ts +33 -0
- package/.cache/ts/src/components/Link/Link.d.ts +1 -2
- package/.cache/ts/src/components/ModalRoot/types.d.ts +0 -1
- package/.cache/ts/src/components/ModalRoot/useModalManager.d.ts +37 -0
- package/.cache/ts/src/components/Removable/Removable.d.ts +2 -1
- package/.cache/ts/src/components/SimpleCell/SimpleCell.d.ts +2 -2
- package/.cache/ts/src/components/SplitCol/SplitCol.d.ts +3 -3
- package/.cache/ts/src/components/SubnavigationBar/SubnavigationBar.d.ts +2 -1
- package/.cache/ts/src/components/Switch/Switch.d.ts +2 -3
- package/.cache/ts/src/components/TabbarItem/TabbarItem.d.ts +3 -1
- package/.cache/ts/src/components/Tappable/Tappable.d.ts +2 -3
- package/.cache/ts/src/components/Touch/Touch.d.ts +16 -17
- package/.cache/ts/src/components/Typography/Caption/Caption.d.ts +2 -2
- package/.cache/ts/src/components/Typography/Headline/Headline.d.ts +2 -2
- package/.cache/ts/src/components/Typography/Subhead/Subhead.d.ts +2 -2
- package/.cache/ts/src/components/Typography/Text/Text.d.ts +2 -3
- package/.cache/ts/src/components/Typography/Title/Title.d.ts +2 -2
- package/.cache/ts/src/components/View/utils.d.ts +2 -0
- package/.cache/ts/src/index.d.ts +4 -0
- package/.cache/ts/src/lib/accessibility.d.ts +1 -1
- package/.cache/ts/src/lib/supportEvents.d.ts +3 -1
- package/.cache/ts/src/types.d.ts +3 -0
- package/dist/cjs/components/ActionSheet/ActionSheet.js +7 -9
- package/dist/cjs/components/ActionSheet/ActionSheet.js.map +1 -1
- package/dist/cjs/components/Avatar/Avatar.d.ts +2 -0
- package/dist/cjs/components/Avatar/Avatar.js +7 -3
- package/dist/cjs/components/Avatar/Avatar.js.map +1 -1
- package/dist/cjs/components/Banner/Banner.js.map +1 -1
- package/dist/cjs/components/Button/Button.js.map +1 -1
- package/dist/cjs/components/CardScroll/CardScroll.js +1 -1
- package/dist/cjs/components/CardScroll/CardScroll.js.map +1 -1
- package/dist/cjs/components/Cell/Cell.d.ts +11 -0
- package/dist/cjs/components/Cell/Cell.js +109 -182
- package/dist/cjs/components/Cell/Cell.js.map +1 -1
- package/dist/cjs/components/Cell/CellCheckbox/CellCheckbox.d.ts +5 -0
- package/dist/cjs/components/Cell/CellCheckbox/CellCheckbox.js +50 -0
- package/dist/cjs/components/Cell/CellCheckbox/CellCheckbox.js.map +1 -0
- package/dist/cjs/components/Cell/CellDragger/CellDragger.d.ts +6 -0
- package/dist/cjs/components/Cell/CellDragger/CellDragger.js +53 -0
- package/dist/cjs/components/Cell/CellDragger/CellDragger.js.map +1 -0
- package/dist/cjs/components/Cell/useDraggable.d.ts +13 -0
- package/dist/cjs/components/Cell/useDraggable.js +142 -0
- package/dist/cjs/components/Cell/useDraggable.js.map +1 -0
- package/dist/cjs/components/ChipsSelect/ChipsSelect.js +2 -2
- package/dist/cjs/components/ChipsSelect/ChipsSelect.js.map +1 -1
- package/dist/cjs/components/Counter/Counter.js.map +1 -1
- package/dist/cjs/components/CustomSelect/CustomSelect.d.ts +0 -1
- package/dist/cjs/components/CustomSelect/CustomSelect.js +2 -3
- package/dist/cjs/components/CustomSelect/CustomSelect.js.map +1 -1
- package/dist/cjs/components/DropdownIcon/DropdownIcon.d.ts +3 -0
- package/dist/cjs/components/DropdownIcon/DropdownIcon.js +37 -0
- package/dist/cjs/components/DropdownIcon/DropdownIcon.js.map +1 -0
- package/dist/cjs/components/FocusTrap/FocusTrap.d.ts +2 -3
- package/dist/cjs/components/FocusTrap/FocusTrap.js +3 -5
- package/dist/cjs/components/FocusTrap/FocusTrap.js.map +1 -1
- package/dist/cjs/components/FormField/FormField.d.ts +2 -3
- package/dist/cjs/components/FormField/FormField.js.map +1 -1
- package/dist/cjs/components/FormItem/FormItem.d.ts +2 -3
- package/dist/cjs/components/FormItem/FormItem.js.map +1 -1
- package/dist/cjs/components/FormLayout/FormLayout.d.ts +2 -4
- package/dist/cjs/components/FormLayout/FormLayout.js.map +1 -1
- package/dist/cjs/components/FormLayoutGroup/FormLayoutGroup.js +1 -0
- package/dist/cjs/components/FormLayoutGroup/FormLayoutGroup.js.map +1 -1
- package/dist/cjs/components/GridAvatar/GridAvatar.d.ts +9 -0
- package/dist/cjs/components/GridAvatar/GridAvatar.js +61 -0
- package/dist/cjs/components/GridAvatar/GridAvatar.js.map +1 -0
- package/dist/cjs/components/Header/Header.js.map +1 -1
- package/dist/cjs/components/HorizontalCell/HorizontalCell.d.ts +2 -3
- package/dist/cjs/components/HorizontalCell/HorizontalCell.js.map +1 -1
- package/dist/cjs/components/HorizontalScroll/HorizontalScroll.d.ts +3 -2
- package/dist/cjs/components/HorizontalScroll/HorizontalScroll.js +10 -13
- package/dist/cjs/components/HorizontalScroll/HorizontalScroll.js.map +1 -1
- package/dist/cjs/components/InitialsAvatar/InitialsAvatar.d.ts +33 -0
- package/dist/cjs/components/InitialsAvatar/InitialsAvatar.js +64 -0
- package/dist/cjs/components/InitialsAvatar/InitialsAvatar.js.map +1 -0
- package/dist/cjs/components/Link/Link.d.ts +1 -2
- package/dist/cjs/components/Link/Link.js.map +1 -1
- package/dist/cjs/components/ModalRoot/ModalRoot.js +170 -373
- package/dist/cjs/components/ModalRoot/ModalRoot.js.map +1 -1
- package/dist/cjs/components/ModalRoot/ModalRootContext.js +0 -3
- package/dist/cjs/components/ModalRoot/ModalRootContext.js.map +1 -1
- package/dist/cjs/components/ModalRoot/ModalRootDesktop.js +59 -241
- package/dist/cjs/components/ModalRoot/ModalRootDesktop.js.map +1 -1
- package/dist/cjs/components/ModalRoot/types.d.ts +0 -1
- package/dist/cjs/components/ModalRoot/types.js.map +1 -1
- package/dist/cjs/components/ModalRoot/useModalManager.d.ts +37 -0
- package/dist/cjs/components/ModalRoot/useModalManager.js +213 -0
- package/dist/cjs/components/ModalRoot/useModalManager.js.map +1 -0
- package/dist/cjs/components/NativeSelect/NativeSelect.js +2 -2
- package/dist/cjs/components/NativeSelect/NativeSelect.js.map +1 -1
- package/dist/cjs/components/Removable/Removable.d.ts +2 -1
- package/dist/cjs/components/Removable/Removable.js +75 -66
- package/dist/cjs/components/Removable/Removable.js.map +1 -1
- package/dist/cjs/components/SelectMimicry/SelectMimicry.js +2 -2
- package/dist/cjs/components/SelectMimicry/SelectMimicry.js.map +1 -1
- package/dist/cjs/components/SimpleCell/SimpleCell.d.ts +2 -2
- package/dist/cjs/components/SimpleCell/SimpleCell.js.map +1 -1
- package/dist/cjs/components/SplitCol/SplitCol.d.ts +3 -3
- package/dist/cjs/components/SplitCol/SplitCol.js +2 -4
- package/dist/cjs/components/SplitCol/SplitCol.js.map +1 -1
- package/dist/cjs/components/SubnavigationBar/SubnavigationBar.d.ts +2 -1
- package/dist/cjs/components/SubnavigationBar/SubnavigationBar.js +38 -11
- package/dist/cjs/components/SubnavigationBar/SubnavigationBar.js.map +1 -1
- package/dist/cjs/components/SubnavigationButton/SubnavigationButton.js.map +1 -1
- package/dist/cjs/components/Switch/Switch.d.ts +2 -3
- package/dist/cjs/components/Switch/Switch.js +18 -8
- package/dist/cjs/components/Switch/Switch.js.map +1 -1
- package/dist/cjs/components/Tabbar/Tabbar.js +3 -1
- package/dist/cjs/components/Tabbar/Tabbar.js.map +1 -1
- package/dist/cjs/components/TabbarItem/TabbarItem.d.ts +3 -1
- package/dist/cjs/components/TabbarItem/TabbarItem.js +29 -11
- package/dist/cjs/components/TabbarItem/TabbarItem.js.map +1 -1
- package/dist/cjs/components/Tappable/Tappable.d.ts +2 -3
- package/dist/cjs/components/Tappable/Tappable.js.map +1 -1
- package/dist/cjs/components/Textarea/Textarea.js +9 -7
- package/dist/cjs/components/Textarea/Textarea.js.map +1 -1
- package/dist/cjs/components/Touch/Touch.d.ts +16 -17
- package/dist/cjs/components/Touch/Touch.js +21 -7
- package/dist/cjs/components/Touch/Touch.js.map +1 -1
- package/dist/cjs/components/Typography/Caption/Caption.d.ts +2 -2
- package/dist/cjs/components/Typography/Caption/Caption.js +4 -2
- package/dist/cjs/components/Typography/Caption/Caption.js.map +1 -1
- package/dist/cjs/components/Typography/Headline/Headline.d.ts +2 -2
- package/dist/cjs/components/Typography/Headline/Headline.js +2 -1
- package/dist/cjs/components/Typography/Headline/Headline.js.map +1 -1
- package/dist/cjs/components/Typography/Subhead/Subhead.d.ts +2 -2
- package/dist/cjs/components/Typography/Subhead/Subhead.js +2 -1
- package/dist/cjs/components/Typography/Subhead/Subhead.js.map +1 -1
- package/dist/cjs/components/Typography/Text/Text.d.ts +2 -3
- package/dist/cjs/components/Typography/Text/Text.js +2 -1
- package/dist/cjs/components/Typography/Text/Text.js.map +1 -1
- package/dist/cjs/components/Typography/Title/Title.d.ts +2 -2
- package/dist/cjs/components/Typography/Title/Title.js +9 -4
- package/dist/cjs/components/Typography/Title/Title.js.map +1 -1
- package/dist/cjs/components/View/View.js +68 -75
- package/dist/cjs/components/View/View.js.map +1 -1
- package/dist/cjs/components/View/ViewInfinite.js +78 -85
- package/dist/cjs/components/View/ViewInfinite.js.map +1 -1
- package/dist/cjs/components/View/utils.d.ts +2 -0
- package/dist/cjs/components/View/utils.js +13 -0
- package/dist/cjs/components/View/utils.js.map +1 -0
- package/dist/cjs/index.d.ts +4 -0
- package/dist/cjs/index.js +16 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/accessibility.d.ts +1 -1
- package/dist/cjs/lib/accessibility.js.map +1 -1
- package/dist/cjs/lib/prefixClass.js +7 -6
- package/dist/cjs/lib/prefixClass.js.map +1 -1
- package/dist/cjs/lib/supportEvents.d.ts +3 -1
- package/dist/cjs/lib/supportEvents.js +1 -4
- package/dist/cjs/lib/supportEvents.js.map +1 -1
- package/dist/cjs/types.d.ts +3 -0
- package/dist/components/ActionSheet/ActionSheet.js +6 -9
- package/dist/components/ActionSheet/ActionSheet.js.map +1 -1
- package/dist/components/Avatar/Avatar.d.ts +2 -0
- package/dist/components/Avatar/Avatar.js +4 -2
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Banner/Banner.js.map +1 -1
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/CardScroll/CardScroll.js +1 -1
- package/dist/components/CardScroll/CardScroll.js.map +1 -1
- package/dist/components/Cell/Cell.d.ts +11 -0
- package/dist/components/Cell/Cell.js +103 -177
- package/dist/components/Cell/Cell.js.map +1 -1
- package/dist/components/Cell/CellCheckbox/CellCheckbox.d.ts +5 -0
- package/dist/components/Cell/CellCheckbox/CellCheckbox.js +31 -0
- package/dist/components/Cell/CellCheckbox/CellCheckbox.js.map +1 -0
- package/dist/components/Cell/CellDragger/CellDragger.d.ts +6 -0
- package/dist/components/Cell/CellDragger/CellDragger.js +30 -0
- package/dist/components/Cell/CellDragger/CellDragger.js.map +1 -0
- package/dist/components/Cell/useDraggable.d.ts +13 -0
- package/dist/components/Cell/useDraggable.js +126 -0
- package/dist/components/Cell/useDraggable.js.map +1 -0
- package/dist/components/ChipsSelect/ChipsSelect.js +2 -2
- package/dist/components/ChipsSelect/ChipsSelect.js.map +1 -1
- package/dist/components/Counter/Counter.js.map +1 -1
- package/dist/components/CustomSelect/CustomSelect.d.ts +0 -1
- package/dist/components/CustomSelect/CustomSelect.js +3 -5
- package/dist/components/CustomSelect/CustomSelect.js.map +1 -1
- package/dist/components/DropdownIcon/DropdownIcon.d.ts +3 -0
- package/dist/components/DropdownIcon/DropdownIcon.js +19 -0
- package/dist/components/DropdownIcon/DropdownIcon.js.map +1 -0
- package/dist/components/FocusTrap/FocusTrap.d.ts +2 -3
- package/dist/components/FocusTrap/FocusTrap.js +3 -5
- package/dist/components/FocusTrap/FocusTrap.js.map +1 -1
- package/dist/components/FormField/FormField.d.ts +2 -3
- package/dist/components/FormField/FormField.js.map +1 -1
- package/dist/components/FormItem/FormItem.d.ts +2 -3
- package/dist/components/FormItem/FormItem.js.map +1 -1
- package/dist/components/FormLayout/FormLayout.d.ts +2 -4
- package/dist/components/FormLayout/FormLayout.js.map +1 -1
- package/dist/components/FormLayoutGroup/FormLayoutGroup.js +1 -0
- package/dist/components/FormLayoutGroup/FormLayoutGroup.js.map +1 -1
- package/dist/components/GridAvatar/GridAvatar.d.ts +9 -0
- package/dist/components/GridAvatar/GridAvatar.js +41 -0
- package/dist/components/GridAvatar/GridAvatar.js.map +1 -0
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/HorizontalCell/HorizontalCell.d.ts +2 -3
- package/dist/components/HorizontalCell/HorizontalCell.js.map +1 -1
- package/dist/components/HorizontalScroll/HorizontalScroll.d.ts +3 -2
- package/dist/components/HorizontalScroll/HorizontalScroll.js +10 -12
- package/dist/components/HorizontalScroll/HorizontalScroll.js.map +1 -1
- package/dist/components/InitialsAvatar/InitialsAvatar.d.ts +33 -0
- package/dist/components/InitialsAvatar/InitialsAvatar.js +46 -0
- package/dist/components/InitialsAvatar/InitialsAvatar.js.map +1 -0
- package/dist/components/Link/Link.d.ts +1 -2
- package/dist/components/Link/Link.js.map +1 -1
- package/dist/components/ModalRoot/ModalRoot.js +167 -376
- package/dist/components/ModalRoot/ModalRoot.js.map +1 -1
- package/dist/components/ModalRoot/ModalRootContext.js +0 -3
- package/dist/components/ModalRoot/ModalRootContext.js.map +1 -1
- package/dist/components/ModalRoot/ModalRootDesktop.js +58 -244
- package/dist/components/ModalRoot/ModalRootDesktop.js.map +1 -1
- package/dist/components/ModalRoot/types.d.ts +0 -1
- package/dist/components/ModalRoot/types.js.map +1 -1
- package/dist/components/ModalRoot/useModalManager.d.ts +37 -0
- package/dist/components/ModalRoot/useModalManager.js +189 -0
- package/dist/components/ModalRoot/useModalManager.js.map +1 -0
- package/dist/components/NativeSelect/NativeSelect.js +2 -2
- package/dist/components/NativeSelect/NativeSelect.js.map +1 -1
- package/dist/components/Removable/Removable.d.ts +2 -1
- package/dist/components/Removable/Removable.js +73 -64
- package/dist/components/Removable/Removable.js.map +1 -1
- package/dist/components/SelectMimicry/SelectMimicry.js +2 -2
- package/dist/components/SelectMimicry/SelectMimicry.js.map +1 -1
- package/dist/components/SimpleCell/SimpleCell.d.ts +2 -2
- package/dist/components/SimpleCell/SimpleCell.js.map +1 -1
- package/dist/components/SplitCol/SplitCol.d.ts +3 -3
- package/dist/components/SplitCol/SplitCol.js +2 -4
- package/dist/components/SplitCol/SplitCol.js.map +1 -1
- package/dist/components/SubnavigationBar/SubnavigationBar.d.ts +2 -1
- package/dist/components/SubnavigationBar/SubnavigationBar.js +38 -11
- package/dist/components/SubnavigationBar/SubnavigationBar.js.map +1 -1
- package/dist/components/SubnavigationButton/SubnavigationButton.js.map +1 -1
- package/dist/components/Switch/Switch.d.ts +2 -3
- package/dist/components/Switch/Switch.js +15 -8
- package/dist/components/Switch/Switch.js.map +1 -1
- package/dist/components/Tabbar/Tabbar.js +3 -1
- package/dist/components/Tabbar/Tabbar.js.map +1 -1
- package/dist/components/TabbarItem/TabbarItem.d.ts +3 -1
- package/dist/components/TabbarItem/TabbarItem.js +26 -10
- package/dist/components/TabbarItem/TabbarItem.js.map +1 -1
- package/dist/components/Tappable/Tappable.d.ts +2 -3
- package/dist/components/Tappable/Tappable.js.map +1 -1
- package/dist/components/Textarea/Textarea.js +9 -6
- package/dist/components/Textarea/Textarea.js.map +1 -1
- package/dist/components/Touch/Touch.d.ts +16 -17
- package/dist/components/Touch/Touch.js +21 -7
- package/dist/components/Touch/Touch.js.map +1 -1
- package/dist/components/Typography/Caption/Caption.d.ts +2 -2
- package/dist/components/Typography/Caption/Caption.js +4 -2
- package/dist/components/Typography/Caption/Caption.js.map +1 -1
- package/dist/components/Typography/Headline/Headline.d.ts +2 -2
- package/dist/components/Typography/Headline/Headline.js +2 -1
- package/dist/components/Typography/Headline/Headline.js.map +1 -1
- package/dist/components/Typography/Subhead/Subhead.d.ts +2 -2
- package/dist/components/Typography/Subhead/Subhead.js +2 -1
- package/dist/components/Typography/Subhead/Subhead.js.map +1 -1
- package/dist/components/Typography/Text/Text.d.ts +2 -3
- package/dist/components/Typography/Text/Text.js +2 -1
- package/dist/components/Typography/Text/Text.js.map +1 -1
- package/dist/components/Typography/Title/Title.d.ts +2 -2
- package/dist/components/Typography/Title/Title.js +9 -4
- package/dist/components/Typography/Title/Title.js.map +1 -1
- package/dist/components/View/View.js +67 -75
- package/dist/components/View/View.js.map +1 -1
- package/dist/components/View/ViewInfinite.js +79 -87
- package/dist/components/View/ViewInfinite.js.map +1 -1
- package/dist/components/View/utils.d.ts +2 -0
- package/dist/components/View/utils.js +6 -0
- package/dist/components/View/utils.js.map +1 -0
- package/dist/components.css +1 -1
- package/dist/components.css.map +1 -1
- package/dist/cssm/components/ActionSheet/ActionSheet.js +6 -9
- package/dist/cssm/components/ActionSheet/ActionSheet.js.map +1 -1
- package/dist/cssm/components/Avatar/Avatar.js +4 -2
- package/dist/cssm/components/Avatar/Avatar.js.map +1 -1
- package/dist/cssm/components/Banner/Banner.js.map +1 -1
- package/dist/cssm/components/Button/Button.css +1 -1
- package/dist/cssm/components/Button/Button.js.map +1 -1
- package/dist/cssm/components/CardScroll/CardScroll.js +1 -1
- package/dist/cssm/components/CardScroll/CardScroll.js.map +1 -1
- package/dist/cssm/components/Cell/Cell.css +1 -1
- package/dist/cssm/components/Cell/Cell.js +103 -177
- package/dist/cssm/components/Cell/Cell.js.map +1 -1
- package/dist/cssm/components/Cell/CellCheckbox/CellCheckbox.css +1 -0
- package/dist/cssm/components/Cell/CellCheckbox/CellCheckbox.js +32 -0
- package/dist/cssm/components/Cell/CellCheckbox/CellCheckbox.js.map +1 -0
- package/dist/cssm/components/Cell/CellDragger/CellDragger.css +1 -0
- package/dist/cssm/components/Cell/CellDragger/CellDragger.js +31 -0
- package/dist/cssm/components/Cell/CellDragger/CellDragger.js.map +1 -0
- package/dist/cssm/components/Cell/useDraggable.js +126 -0
- package/dist/cssm/components/Cell/useDraggable.js.map +1 -0
- package/dist/cssm/components/ChipsSelect/ChipsSelect.js +2 -2
- package/dist/cssm/components/ChipsSelect/ChipsSelect.js.map +1 -1
- package/dist/cssm/components/Counter/Counter.js.map +1 -1
- package/dist/cssm/components/CustomSelect/CustomSelect.js +3 -5
- package/dist/cssm/components/CustomSelect/CustomSelect.js.map +1 -1
- package/dist/cssm/components/DropdownIcon/DropdownIcon.css +1 -0
- package/dist/cssm/components/DropdownIcon/DropdownIcon.js +20 -0
- package/dist/cssm/components/DropdownIcon/DropdownIcon.js.map +1 -0
- package/dist/cssm/components/FocusTrap/FocusTrap.js +3 -5
- package/dist/cssm/components/FocusTrap/FocusTrap.js.map +1 -1
- package/dist/cssm/components/FocusVisible/FocusVisible.css +1 -1
- package/dist/cssm/components/FormField/FormField.css +1 -1
- package/dist/cssm/components/FormField/FormField.js.map +1 -1
- package/dist/cssm/components/FormItem/FormItem.css +1 -1
- package/dist/cssm/components/FormItem/FormItem.js.map +1 -1
- package/dist/cssm/components/FormLayout/FormLayout.js.map +1 -1
- package/dist/cssm/components/FormLayoutGroup/FormLayoutGroup.css +1 -1
- package/dist/cssm/components/FormLayoutGroup/FormLayoutGroup.js +1 -0
- package/dist/cssm/components/FormLayoutGroup/FormLayoutGroup.js.map +1 -1
- package/dist/cssm/components/Gallery/Gallery.css +1 -1
- package/dist/cssm/components/GridAvatar/GridAvatar.css +1 -0
- package/dist/cssm/components/GridAvatar/GridAvatar.js +42 -0
- package/dist/cssm/components/GridAvatar/GridAvatar.js.map +1 -0
- package/dist/cssm/components/Header/Header.js.map +1 -1
- package/dist/cssm/components/HorizontalCell/HorizontalCell.js.map +1 -1
- package/dist/cssm/components/HorizontalScroll/HorizontalScroll.js +10 -12
- package/dist/cssm/components/HorizontalScroll/HorizontalScroll.js.map +1 -1
- package/dist/cssm/components/HorizontalScroll/HorizontalScrollArrow.css +1 -1
- package/dist/cssm/components/IconButton/IconButton.css +1 -1
- package/dist/cssm/components/InitialsAvatar/InitialsAvatar.css +1 -0
- package/dist/cssm/components/InitialsAvatar/InitialsAvatar.js +52 -0
- package/dist/cssm/components/InitialsAvatar/InitialsAvatar.js.map +1 -0
- package/dist/cssm/components/Link/Link.js.map +1 -1
- package/dist/cssm/components/ModalRoot/ModalRoot.js +167 -376
- package/dist/cssm/components/ModalRoot/ModalRoot.js.map +1 -1
- package/dist/cssm/components/ModalRoot/ModalRootContext.js +0 -3
- package/dist/cssm/components/ModalRoot/ModalRootContext.js.map +1 -1
- package/dist/cssm/components/ModalRoot/ModalRootDesktop.js +58 -244
- package/dist/cssm/components/ModalRoot/ModalRootDesktop.js.map +1 -1
- package/dist/cssm/components/ModalRoot/types.js.map +1 -1
- package/dist/cssm/components/ModalRoot/useModalManager.js +189 -0
- package/dist/cssm/components/ModalRoot/useModalManager.js.map +1 -0
- package/dist/cssm/components/NativeSelect/NativeSelect.js +2 -2
- package/dist/cssm/components/NativeSelect/NativeSelect.js.map +1 -1
- package/dist/cssm/components/Removable/Removable.css +1 -1
- package/dist/cssm/components/Removable/Removable.js +73 -64
- package/dist/cssm/components/Removable/Removable.js.map +1 -1
- package/dist/cssm/components/Search/Search.css +1 -1
- package/dist/cssm/components/Select/Select.css +1 -1
- package/dist/cssm/components/SelectMimicry/SelectMimicry.js +2 -2
- package/dist/cssm/components/SelectMimicry/SelectMimicry.js.map +1 -1
- package/dist/cssm/components/SimpleCell/SimpleCell.css +1 -1
- package/dist/cssm/components/SimpleCell/SimpleCell.js.map +1 -1
- package/dist/cssm/components/SplitCol/SplitCol.js +2 -4
- package/dist/cssm/components/SplitCol/SplitCol.js.map +1 -1
- package/dist/cssm/components/SubnavigationBar/SubnavigationBar.js +38 -11
- package/dist/cssm/components/SubnavigationBar/SubnavigationBar.js.map +1 -1
- package/dist/cssm/components/SubnavigationButton/SubnavigationButton.js.map +1 -1
- package/dist/cssm/components/Switch/Switch.css +1 -1
- package/dist/cssm/components/Switch/Switch.js +15 -8
- package/dist/cssm/components/Switch/Switch.js.map +1 -1
- package/dist/cssm/components/Tabbar/Tabbar.css +1 -1
- package/dist/cssm/components/Tabbar/Tabbar.js +3 -1
- package/dist/cssm/components/Tabbar/Tabbar.js.map +1 -1
- package/dist/cssm/components/TabbarItem/TabbarItem.css +1 -1
- package/dist/cssm/components/TabbarItem/TabbarItem.js +26 -10
- package/dist/cssm/components/TabbarItem/TabbarItem.js.map +1 -1
- package/dist/cssm/components/Tappable/Tappable.js.map +1 -1
- package/dist/cssm/components/Textarea/Textarea.js +9 -6
- package/dist/cssm/components/Textarea/Textarea.js.map +1 -1
- package/dist/cssm/components/Touch/Touch.js +21 -7
- package/dist/cssm/components/Touch/Touch.js.map +1 -1
- package/dist/cssm/components/Typography/Caption/Caption.js +4 -2
- package/dist/cssm/components/Typography/Caption/Caption.js.map +1 -1
- package/dist/cssm/components/Typography/Headline/Headline.js +2 -1
- package/dist/cssm/components/Typography/Headline/Headline.js.map +1 -1
- package/dist/cssm/components/Typography/Subhead/Subhead.js +2 -1
- package/dist/cssm/components/Typography/Subhead/Subhead.js.map +1 -1
- package/dist/cssm/components/Typography/Text/Text.js +2 -1
- package/dist/cssm/components/Typography/Text/Text.js.map +1 -1
- package/dist/cssm/components/Typography/Title/Title.js +9 -4
- package/dist/cssm/components/Typography/Title/Title.js.map +1 -1
- package/dist/cssm/components/View/View.js +67 -75
- package/dist/cssm/components/View/View.js.map +1 -1
- package/dist/cssm/components/View/ViewInfinite.js +79 -87
- package/dist/cssm/components/View/ViewInfinite.js.map +1 -1
- package/dist/cssm/components/View/utils.js +6 -0
- package/dist/cssm/components/View/utils.js.map +1 -0
- package/dist/cssm/index.js +2 -0
- package/dist/cssm/index.js.map +1 -1
- package/dist/cssm/lib/accessibility.js.map +1 -1
- package/dist/cssm/lib/prefixClass.js +7 -6
- package/dist/cssm/lib/prefixClass.js.map +1 -1
- package/dist/cssm/lib/supportEvents.js +1 -4
- package/dist/cssm/lib/supportEvents.js.map +1 -1
- package/dist/cssm/styles/components.css +1 -1
- package/dist/cssm/styles/themes.css +1 -1
- package/dist/cssm/styles/vkcom_light.css +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/accessibility.d.ts +1 -1
- package/dist/lib/accessibility.js.map +1 -1
- package/dist/lib/prefixClass.js +7 -6
- package/dist/lib/prefixClass.js.map +1 -1
- package/dist/lib/supportEvents.d.ts +3 -1
- package/dist/lib/supportEvents.js +1 -4
- package/dist/lib/supportEvents.js.map +1 -1
- package/dist/types.d.ts +3 -0
- package/dist/vkui.css +2 -2
- package/dist/vkui.css.map +1 -1
- package/package.json +8 -4
- package/src/components/ActionSheet/ActionSheet.tsx +4 -5
- package/src/components/ActionSheet/Readme.md +18 -14
- package/src/components/Alert/Readme.md +15 -11
- package/src/components/Avatar/Avatar.tsx +5 -2
- package/src/components/Banner/Banner.tsx +4 -5
- package/src/components/Button/Button.css +26 -53
- package/src/components/Button/Button.tsx +2 -3
- package/src/components/Card/Readme.md +6 -6
- package/src/components/CardScroll/CardScroll.tsx +4 -1
- package/src/components/Cell/Cell.css +21 -58
- package/src/components/Cell/Cell.tsx +101 -162
- package/src/components/Cell/CellCheckbox/CellCheckbox.css +17 -0
- package/src/components/Cell/CellCheckbox/CellCheckbox.tsx +42 -0
- package/src/components/Cell/CellDragger/CellDragger.css +4 -0
- package/src/components/Cell/CellDragger/CellDragger.tsx +40 -0
- package/src/components/Cell/Readme.md +89 -51
- package/src/components/Cell/useDraggable.tsx +112 -0
- package/src/components/ChipsSelect/ChipsSelect.tsx +2 -2
- package/src/components/Counter/Counter.tsx +2 -2
- package/src/components/CustomSelect/CustomSelect.tsx +3 -4
- package/src/components/DropdownIcon/DropdownIcon.css +3 -0
- package/src/components/DropdownIcon/DropdownIcon.tsx +20 -0
- package/src/components/Epic/Readme.md +2 -1
- package/src/components/FocusTrap/FocusTrap.tsx +13 -11
- package/src/components/FocusVisible/FocusVisible.css +12 -4
- package/src/components/FormField/FormField.css +0 -1
- package/src/components/FormField/FormField.tsx +2 -2
- package/src/components/FormItem/FormItem.css +13 -14
- package/src/components/FormItem/FormItem.tsx +2 -3
- package/src/components/FormLayout/FormLayout.tsx +2 -4
- package/src/components/FormLayoutGroup/FormLayoutGroup.css +11 -7
- package/src/components/FormLayoutGroup/FormLayoutGroup.tsx +10 -1
- package/src/components/Gallery/Gallery.css +2 -3
- package/src/components/Gallery/Readme.md +89 -109
- package/src/components/GridAvatar/GridAvatar.css +37 -0
- package/src/components/GridAvatar/GridAvatar.tsx +55 -0
- package/src/components/GridAvatar/Readme.md +12 -0
- package/src/components/Group/Readme.md +18 -14
- package/src/components/Header/Header.tsx +4 -4
- package/src/components/HorizontalCell/HorizontalCell.tsx +3 -3
- package/src/components/HorizontalScroll/HorizontalScroll.tsx +14 -18
- package/src/components/HorizontalScroll/HorizontalScrollArrow.css +2 -2
- package/src/components/IconButton/IconButton.css +7 -0
- package/src/components/InitialsAvatar/InitialsAvatar.css +53 -0
- package/src/components/InitialsAvatar/InitialsAvatar.tsx +90 -0
- package/src/components/InitialsAvatar/Readme.md +14 -0
- package/src/components/Link/Link.tsx +1 -1
- package/src/components/MiniInfoCell/Readme.md +66 -62
- package/src/components/ModalDismissButton/Readme.md +13 -10
- package/src/components/ModalRoot/ModalRoot.tsx +159 -349
- package/src/components/ModalRoot/ModalRootContext.tsx +0 -1
- package/src/components/ModalRoot/ModalRootDesktop.tsx +54 -240
- package/src/components/ModalRoot/Readme.md +35 -27
- package/src/components/ModalRoot/types.ts +0 -1
- package/src/components/ModalRoot/useModalManager.tsx +174 -0
- package/src/components/NativeSelect/NativeSelect.tsx +2 -2
- package/src/components/Removable/Removable.css +16 -63
- package/src/components/Removable/Removable.tsx +84 -64
- package/src/components/ScreenSpinner/Readme.md +13 -9
- package/src/components/Search/Search.css +1 -1
- package/src/components/Select/Select.css +1 -1
- package/src/components/SelectMimicry/SelectMimicry.tsx +2 -2
- package/src/components/SimpleCell/SimpleCell.css +10 -18
- package/src/components/SimpleCell/SimpleCell.tsx +3 -5
- package/src/components/SplitCol/SplitCol.tsx +4 -8
- package/src/components/SplitLayout/Readme.md +2 -2
- package/src/components/SubnavigationBar/Readme.md +90 -86
- package/src/components/SubnavigationBar/SubnavigationBar.tsx +32 -14
- package/src/components/SubnavigationButton/SubnavigationButton.tsx +2 -3
- package/src/components/Switch/Readme.md +6 -6
- package/src/components/Switch/Switch.css +46 -15
- package/src/components/Switch/Switch.tsx +16 -8
- package/src/components/Tabbar/Tabbar.css +15 -4
- package/src/components/Tabbar/Tabbar.tsx +3 -1
- package/src/components/TabbarItem/Readme.md +72 -0
- package/src/components/TabbarItem/TabbarItem.css +65 -14
- package/src/components/TabbarItem/TabbarItem.tsx +46 -22
- package/src/components/Tappable/Tappable.tsx +2 -3
- package/src/components/Textarea/Readme.md +3 -0
- package/src/components/Textarea/Textarea.tsx +10 -6
- package/src/components/Touch/Touch.tsx +38 -25
- package/src/components/Typography/Caption/Caption.tsx +4 -4
- package/src/components/Typography/Headline/Headline.tsx +3 -3
- package/src/components/Typography/Subhead/Subhead.tsx +3 -3
- package/src/components/Typography/Text/Text.tsx +3 -4
- package/src/components/Typography/Title/Title.tsx +9 -5
- package/src/components/View/Readme.md +42 -56
- package/src/components/View/View.tsx +46 -61
- package/src/components/View/ViewInfinite.tsx +52 -67
- package/src/components/View/utils.ts +8 -0
- package/src/index.ts +4 -0
- package/src/lib/accessibility.ts +2 -2
- package/src/lib/prefixClass.ts +9 -6
- package/src/lib/supportEvents.ts +1 -4
- package/src/styles/components.css +4 -0
- package/src/styles/vkcom_light.css +3 -3
- package/src/testing/utils.tsx +34 -1
- package/src/types.ts +4 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TouchEvent } from '../Touch/Touch';
|
|
3
|
+
import { CellProps } from './Cell';
|
|
4
|
+
|
|
5
|
+
export interface DraggableProps {
|
|
6
|
+
onDragStart: () => void;
|
|
7
|
+
onDragEnd: () => void;
|
|
8
|
+
onDragMove: (e: TouchEvent) => void;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface UseDraggableProps extends DraggableProps {
|
|
12
|
+
dragging: boolean;
|
|
13
|
+
rootElRef: any;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const useDraggable = ({ onDragFinish }: Pick<CellProps, 'onDragFinish'>) => {
|
|
17
|
+
const [dragging, setDragging] = React.useState<boolean>(false);
|
|
18
|
+
const rootElRef = React.useRef(null);
|
|
19
|
+
|
|
20
|
+
const [siblings, setSiblings] = React.useState<HTMLElement[]>(undefined);
|
|
21
|
+
const [dragStartIndex, setDragStartIndex] = React.useState<number>(undefined);
|
|
22
|
+
const [dragEndIndex, setDragEndIndex] = React.useState<number>(undefined);
|
|
23
|
+
const [dragShift, setDragShift] = React.useState<number>(0);
|
|
24
|
+
const [dragDirection, setDragDirection] = React.useState<'down' | 'up'>(undefined);
|
|
25
|
+
|
|
26
|
+
const onDragStart = () => {
|
|
27
|
+
const rootEl = rootElRef.current;
|
|
28
|
+
|
|
29
|
+
setDragging(true);
|
|
30
|
+
|
|
31
|
+
const _siblings: HTMLElement[] = [...rootEl.parentElement.childNodes];
|
|
32
|
+
const idx = _siblings.indexOf(rootEl);
|
|
33
|
+
|
|
34
|
+
setDragStartIndex(idx);
|
|
35
|
+
setDragEndIndex(idx);
|
|
36
|
+
setSiblings(_siblings);
|
|
37
|
+
setDragShift(0);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const onDragMove = (e: TouchEvent) => {
|
|
41
|
+
e.originalEvent.preventDefault();
|
|
42
|
+
|
|
43
|
+
const rootEl = rootElRef.current;
|
|
44
|
+
|
|
45
|
+
rootEl.style.transform = `translateY(${e.shiftY}px)`;
|
|
46
|
+
const rootGesture = rootEl.getBoundingClientRect();
|
|
47
|
+
|
|
48
|
+
setDragDirection(dragShift - e.shiftY < 0 ? 'down' : 'up');
|
|
49
|
+
setDragShift(e.shiftY);
|
|
50
|
+
setDragEndIndex(dragStartIndex);
|
|
51
|
+
|
|
52
|
+
siblings.forEach((sibling: HTMLElement, siblingIndex: number) => {
|
|
53
|
+
const siblingGesture = sibling.getBoundingClientRect();
|
|
54
|
+
const siblingHalfHeight = siblingGesture.height / 2;
|
|
55
|
+
|
|
56
|
+
const rootOverSibling = rootGesture.bottom > siblingGesture.top + siblingHalfHeight;
|
|
57
|
+
const rootUnderSibling = rootGesture.top < siblingGesture.bottom - siblingHalfHeight;
|
|
58
|
+
|
|
59
|
+
if (dragStartIndex < siblingIndex) {
|
|
60
|
+
if (rootOverSibling) {
|
|
61
|
+
if (dragDirection === 'down') {
|
|
62
|
+
sibling.style.transform = 'translateY(-100%)';
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
setDragEndIndex((dragEndIndex) => dragEndIndex + 1);
|
|
66
|
+
}
|
|
67
|
+
if (rootUnderSibling && dragDirection === 'up') {
|
|
68
|
+
sibling.style.transform = 'translateY(0)';
|
|
69
|
+
}
|
|
70
|
+
} else if (dragStartIndex > siblingIndex) {
|
|
71
|
+
if (rootUnderSibling) {
|
|
72
|
+
if (dragDirection === 'up') {
|
|
73
|
+
sibling.style.transform = 'translateY(100%)';
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
setDragEndIndex((dragEndIndex) => dragEndIndex - 1);
|
|
77
|
+
}
|
|
78
|
+
if (rootOverSibling && dragDirection === 'down') {
|
|
79
|
+
sibling.style.transform = 'translateY(0)';
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const onDragEnd = () => {
|
|
86
|
+
const [from, to] = [dragStartIndex, dragEndIndex];
|
|
87
|
+
|
|
88
|
+
siblings.forEach((sibling: HTMLElement) => {
|
|
89
|
+
sibling.style.transform = null;
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
setSiblings(undefined);
|
|
93
|
+
setDragEndIndex(undefined);
|
|
94
|
+
setDragStartIndex(undefined);
|
|
95
|
+
setDragDirection(undefined);
|
|
96
|
+
setDragShift(undefined);
|
|
97
|
+
|
|
98
|
+
setDragging(false);
|
|
99
|
+
|
|
100
|
+
onDragFinish && onDragFinish({ from, to });
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const useDraggableProps: UseDraggableProps = {
|
|
104
|
+
onDragStart,
|
|
105
|
+
onDragMove,
|
|
106
|
+
onDragEnd,
|
|
107
|
+
dragging,
|
|
108
|
+
rootElRef,
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
return useDraggableProps;
|
|
112
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { DropdownIcon } from '../DropdownIcon/DropdownIcon';
|
|
3
3
|
import { classNames } from '../../lib/classNames';
|
|
4
4
|
import Spinner from '../Spinner/Spinner';
|
|
5
5
|
import CustomScrollView from '../CustomScrollView/CustomScrollView';
|
|
@@ -247,7 +247,7 @@ const ChipsSelect = <Option extends ChipsInputOption>(props: ChipsSelectProps<Op
|
|
|
247
247
|
getRef={getRef}
|
|
248
248
|
disabled={disabled}
|
|
249
249
|
onInputChange={handleInputChange}
|
|
250
|
-
after={<
|
|
250
|
+
after={<DropdownIcon />}
|
|
251
251
|
/>
|
|
252
252
|
{opened &&
|
|
253
253
|
<div
|
|
@@ -6,7 +6,7 @@ import Caption from '../Typography/Caption/Caption';
|
|
|
6
6
|
import Text from '../Typography/Text/Text';
|
|
7
7
|
import { VKCOM } from '../../lib/platform';
|
|
8
8
|
import { hasReactNode } from '../../lib/utils';
|
|
9
|
-
import { HasPlatform } from '../../types';
|
|
9
|
+
import { HasComponent, HasPlatform } from '../../types';
|
|
10
10
|
import './Counter.css';
|
|
11
11
|
|
|
12
12
|
export interface CounterProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
@@ -17,7 +17,7 @@ export interface CounterProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
17
17
|
size?: 's' | 'm';
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
type CounterTypographyProps = Pick<CounterProps, 'size'> & HasPlatform &
|
|
20
|
+
type CounterTypographyProps = Pick<CounterProps, 'size'> & HasPlatform & HasComponent;
|
|
21
21
|
|
|
22
22
|
const CounterTypography: React.FC<CounterTypographyProps> = ({ size, platform, ...restProps }) => {
|
|
23
23
|
return size === 's'
|
|
@@ -4,14 +4,14 @@ import { debounce, setRef } from '../../lib/utils';
|
|
|
4
4
|
import { classNames } from '../../lib/classNames';
|
|
5
5
|
import { NativeSelectProps } from '../NativeSelect/NativeSelect';
|
|
6
6
|
import CustomScrollView from '../CustomScrollView/CustomScrollView';
|
|
7
|
-
import {
|
|
7
|
+
import { withAdaptivity } from '../../hoc/withAdaptivity';
|
|
8
8
|
import { withPlatform } from '../../hoc/withPlatform';
|
|
9
9
|
import CustomSelectOption, { CustomSelectOptionProps } from '../CustomSelectOption/CustomSelectOption';
|
|
10
10
|
import { getClassName } from '../../helpers/getClassName';
|
|
11
11
|
import { FormFieldProps } from '../FormField/FormField';
|
|
12
12
|
import { HasPlatform } from '../../types';
|
|
13
13
|
import Input from '../Input/Input';
|
|
14
|
-
import {
|
|
14
|
+
import { DropdownIcon } from '../DropdownIcon/DropdownIcon';
|
|
15
15
|
import Caption from '../Typography/Caption/Caption';
|
|
16
16
|
import { warnOnce } from '../../lib/warnOnce';
|
|
17
17
|
import Spinner from '../Spinner/Spinner';
|
|
@@ -150,7 +150,6 @@ class CustomSelect extends React.Component<CustomSelectProps, CustomSelectState>
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
public state: CustomSelectState;
|
|
154
153
|
private keyboardInput: string;
|
|
155
154
|
private isControlledOutside: boolean;
|
|
156
155
|
private selectEl: HTMLSelectElement;
|
|
@@ -576,7 +575,7 @@ class CustomSelect extends React.Component<CustomSelectProps, CustomSelectState>
|
|
|
576
575
|
// TODO Нужно перестать пытаться превратить CustomSelect в select. Тогда эта проблема уйдёт.
|
|
577
576
|
// @ts-ignore
|
|
578
577
|
onClick={onClick}
|
|
579
|
-
after={
|
|
578
|
+
after={<DropdownIcon />}
|
|
580
579
|
placeholder={restProps.placeholder}
|
|
581
580
|
/> :
|
|
582
581
|
<SelectMimicry
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Icon20Dropdown, Icon24ChevronDown } from '@vkontakte/icons';
|
|
3
|
+
import { SizeType } from '../AdaptivityProvider/AdaptivityContext';
|
|
4
|
+
import { getClassName } from '../../helpers/getClassName';
|
|
5
|
+
import { useAdaptivity } from '../../hooks/useAdaptivity';
|
|
6
|
+
import { usePlatform } from '../../hooks/usePlatform';
|
|
7
|
+
import './DropdownIcon.css';
|
|
8
|
+
|
|
9
|
+
export const DropdownIcon: React.FC<React.HTMLAttributes<HTMLElement>> = (props) => {
|
|
10
|
+
const platform = usePlatform();
|
|
11
|
+
const { sizeY } = useAdaptivity();
|
|
12
|
+
|
|
13
|
+
const Icon = sizeY === SizeType.COMPACT
|
|
14
|
+
? Icon20Dropdown
|
|
15
|
+
: Icon24ChevronDown;
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<Icon vkuiClass={getClassName('DropdownIcon', platform)} {...props} />
|
|
19
|
+
);
|
|
20
|
+
};
|
|
@@ -29,7 +29,7 @@ const Example = withAdaptivity(({ viewWidth }) => {
|
|
|
29
29
|
style={{ justifyContent: "center" }}
|
|
30
30
|
>
|
|
31
31
|
{isDesktop && (
|
|
32
|
-
<SplitCol fixed width=
|
|
32
|
+
<SplitCol fixed width={280} maxWidth={280}>
|
|
33
33
|
<Panel>
|
|
34
34
|
{hasHeader && <PanelHeader />}
|
|
35
35
|
<Group>
|
|
@@ -135,6 +135,7 @@ const Example = withAdaptivity(({ viewWidth }) => {
|
|
|
135
135
|
onClick={onStoryChange}
|
|
136
136
|
selected={activeStory === 'profile'}
|
|
137
137
|
data-story="profile"
|
|
138
|
+
indicator={<Badge mode="prominent" />}
|
|
138
139
|
text="Профиль"
|
|
139
140
|
><Icon28UserCircleOutline /></TabbarItem>
|
|
140
141
|
</Tabbar>
|
|
@@ -6,13 +6,12 @@ import { FOCUSABLE_ELEMENTS_LIST, Keys, pressedKey } from '../../lib/accessibili
|
|
|
6
6
|
import { useDOM } from '../../lib/dom';
|
|
7
7
|
import { useIsomorphicLayoutEffect } from '../../lib/useIsomorphicLayoutEffect';
|
|
8
8
|
import { noop } from '../../lib/utils';
|
|
9
|
-
import { HasRootRef } from '../../types';
|
|
9
|
+
import { HasComponent, HasRootRef } from '../../types';
|
|
10
10
|
import { AppRootContext } from '../AppRoot/AppRootContext';
|
|
11
11
|
|
|
12
12
|
const FOCUSABLE_ELEMENTS: string = FOCUSABLE_ELEMENTS_LIST.join();
|
|
13
13
|
|
|
14
|
-
export interface FocusTrapProps extends React.AllHTMLAttributes<HTMLElement>, HasRootRef<HTMLElement
|
|
15
|
-
Component?: React.ElementType;
|
|
14
|
+
export interface FocusTrapProps extends React.AllHTMLAttributes<HTMLElement>, HasRootRef<HTMLElement>, HasComponent {
|
|
16
15
|
onClose?: (props?: any) => void;
|
|
17
16
|
restoreFocus?: boolean;
|
|
18
17
|
timeout?: number;
|
|
@@ -55,14 +54,17 @@ export const FocusTrap: React.FC<FocusTrapProps> = ({
|
|
|
55
54
|
}
|
|
56
55
|
|
|
57
56
|
const nodes: HTMLElement[] = [];
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
57
|
+
Array.prototype.forEach.call(
|
|
58
|
+
// eslint-disable-next-line no-restricted-properties
|
|
59
|
+
ref.current.querySelectorAll(FOCUSABLE_ELEMENTS),
|
|
60
|
+
(focusableEl: Element) => {
|
|
61
|
+
const { display, visibility } = window.getComputedStyle(focusableEl);
|
|
62
|
+
|
|
63
|
+
if (display !== 'none' && visibility !== 'hidden') {
|
|
64
|
+
nodes.push(focusableEl as HTMLElement);
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
);
|
|
66
68
|
|
|
67
69
|
if (nodes?.length) {
|
|
68
70
|
setFocusableNodes(nodes);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
.AppRoot--keyboard-input .Tappable:focus > .FocusVisible,
|
|
2
|
-
.Tappable:focus-visible > .FocusVisible
|
|
2
|
+
.Tappable:focus-visible > .FocusVisible,
|
|
3
|
+
.AppRoot--keyboard-input input:focus ~ .FocusVisible,
|
|
4
|
+
input:focus-visible ~ .FocusVisible {
|
|
3
5
|
position: absolute;
|
|
4
6
|
top: 2px;
|
|
5
7
|
left: 2px;
|
|
@@ -14,7 +16,9 @@
|
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
.AppRoot--keyboard-input .Tappable:focus > .FocusVisible--outside,
|
|
17
|
-
.Tappable:focus-visible > .FocusVisible--outside
|
|
19
|
+
.Tappable:focus-visible > .FocusVisible--outside,
|
|
20
|
+
.AppRoot--keyboard-input input:focus ~ .FocusVisible--outside,
|
|
21
|
+
input:focus-visible ~ .FocusVisible--outside {
|
|
18
22
|
top: -2px;
|
|
19
23
|
left: -2px;
|
|
20
24
|
right: -2px;
|
|
@@ -29,7 +33,9 @@
|
|
|
29
33
|
*/
|
|
30
34
|
@media (prefers-reduced-motion: no-preference) {
|
|
31
35
|
.AppRoot--keyboard-input .Tappable:focus > .FocusVisible,
|
|
32
|
-
.Tappable:focus-visible > .FocusVisible
|
|
36
|
+
.Tappable:focus-visible > .FocusVisible,
|
|
37
|
+
.AppRoot--keyboard-input input:focus ~ .FocusVisible,
|
|
38
|
+
input:focus-visible ~ .FocusVisible {
|
|
33
39
|
top: 4px;
|
|
34
40
|
left: 4px;
|
|
35
41
|
right: 4px;
|
|
@@ -40,7 +46,9 @@
|
|
|
40
46
|
}
|
|
41
47
|
|
|
42
48
|
.AppRoot--keyboard-input .Tappable:focus > .FocusVisible--outside,
|
|
43
|
-
.Tappable:focus-visible > .FocusVisible--outside
|
|
49
|
+
.Tappable:focus-visible > .FocusVisible--outside,
|
|
50
|
+
.AppRoot--keyboard-input input:focus ~ .FocusVisible--outside,
|
|
51
|
+
input:focus-visible ~ .FocusVisible--outside {
|
|
44
52
|
top: 0;
|
|
45
53
|
left: 0;
|
|
46
54
|
bottom: 0;
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { getClassName } from '../../helpers/getClassName';
|
|
3
3
|
import { classNames } from '../../lib/classNames';
|
|
4
4
|
import { usePlatform } from '../../hooks/usePlatform';
|
|
5
|
-
import { HasRootRef } from '../../types';
|
|
5
|
+
import { HasComponent, HasRootRef } from '../../types';
|
|
6
6
|
import { hasReactNode } from '../../lib/utils';
|
|
7
7
|
import { useAdaptivity } from '../../hooks/useAdaptivity';
|
|
8
8
|
import './FormField.css';
|
|
@@ -17,8 +17,8 @@ export interface FormFieldProps {
|
|
|
17
17
|
interface FormFieldOwnProps extends
|
|
18
18
|
React.AllHTMLAttributes<HTMLElement>,
|
|
19
19
|
HasRootRef<HTMLElement>,
|
|
20
|
+
HasComponent,
|
|
20
21
|
FormFieldProps {
|
|
21
|
-
Component?: React.ElementType;
|
|
22
22
|
disabled?: boolean;
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -3,9 +3,13 @@
|
|
|
3
3
|
padding: 12px var(--formitem_padding);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
.FormItem--removable {
|
|
7
|
+
padding-left: 0;
|
|
8
|
+
padding-right: 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
6
11
|
.FormItem__removable {
|
|
7
12
|
flex-grow: 1;
|
|
8
|
-
flex-shrink: initial;
|
|
9
13
|
min-width: 0;
|
|
10
14
|
max-width: 100%;
|
|
11
15
|
overflow: hidden;
|
|
@@ -52,19 +56,6 @@
|
|
|
52
56
|
--formitem_padding: 12px;
|
|
53
57
|
}
|
|
54
58
|
|
|
55
|
-
.FormItem--ios.FormItem--removable {
|
|
56
|
-
padding-left: 0;
|
|
57
|
-
margin-left: 0;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.FormLayoutGroup .Removable .FormItem--ios.FormItem--withTop {
|
|
61
|
-
margin-top: -28px;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.FormLayoutGroup .Removable .FormItem--ios.FormItem--sizeY-compact.FormItem--withTop {
|
|
65
|
-
margin-top: -26px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
59
|
/**
|
|
69
60
|
* CMP:
|
|
70
61
|
* FormLayoutGroup
|
|
@@ -81,3 +72,11 @@
|
|
|
81
72
|
.FormLayoutGroup--horizontal .FormItem + .FormItem {
|
|
82
73
|
margin-left: 24px;
|
|
83
74
|
}
|
|
75
|
+
|
|
76
|
+
.FormLayoutGroup--removable .FormItem--ios.FormItem--withTop {
|
|
77
|
+
margin-top: -28px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.FormLayoutGroup--removable .FormItem--ios.FormItem--withTop.FormItem--sizeY-compact {
|
|
81
|
+
margin-top: -26px;
|
|
82
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { HasRootRef } from '../../types';
|
|
2
|
+
import { HasComponent, HasRootRef } from '../../types';
|
|
3
3
|
import { classNames } from '../../lib/classNames';
|
|
4
4
|
import { useExternRef } from '../../hooks/useExternRef';
|
|
5
5
|
import { usePlatform } from '../../hooks/usePlatform';
|
|
@@ -11,11 +11,10 @@ import { useAdaptivity } from '../../hooks/useAdaptivity';
|
|
|
11
11
|
import { Removable, RemovableProps } from '../Removable/Removable';
|
|
12
12
|
import './FormItem.css';
|
|
13
13
|
|
|
14
|
-
export interface FormItemProps extends React.AllHTMLAttributes<HTMLElement>,
|
|
14
|
+
export interface FormItemProps extends React.AllHTMLAttributes<HTMLElement>, HasRootRef<HTMLElement>, HasComponent, RemovableProps {
|
|
15
15
|
top?: React.ReactNode;
|
|
16
16
|
bottom?: React.ReactNode;
|
|
17
17
|
status?: 'default' | 'error' | 'valid';
|
|
18
|
-
Component?: React.ElementType;
|
|
19
18
|
/**
|
|
20
19
|
* Дает возможность удалить `FormItem`. Рекомендуется использовать только для `Input` или `Select`.
|
|
21
20
|
*/
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { getClassName } from '../../helpers/getClassName';
|
|
3
3
|
import { usePlatform } from '../../hooks/usePlatform';
|
|
4
|
-
import { HasRef } from '../../types';
|
|
4
|
+
import { HasComponent, HasRef } from '../../types';
|
|
5
5
|
import './FormLayout.css';
|
|
6
6
|
|
|
7
7
|
const preventDefault = (e: React.FormEvent) => e.preventDefault();
|
|
8
8
|
|
|
9
|
-
export
|
|
10
|
-
Component?: React.ElementType;
|
|
11
|
-
}
|
|
9
|
+
export type FormLayoutProps = React.AllHTMLAttributes<HTMLElement> & HasRef<HTMLElement> & HasComponent;
|
|
12
10
|
|
|
13
11
|
const FormLayout: React.FunctionComponent<FormLayoutProps> = (props: FormLayoutProps) => {
|
|
14
12
|
const {
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
.FormLayoutGroup--horizontal {
|
|
2
|
-
padding: 12px 16px;
|
|
3
2
|
display: flex;
|
|
4
|
-
|
|
3
|
+
padding: 12px var(--formitem_padding);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.FormLayoutGroup__removable {
|
|
7
|
+
flex-grow: 1;
|
|
8
|
+
min-width: 0;
|
|
9
|
+
max-width: 100%;
|
|
5
10
|
}
|
|
6
11
|
|
|
7
12
|
/**
|
|
8
13
|
* iOS
|
|
9
14
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
padding-left: 12px;
|
|
13
|
-
padding-right: 12px;
|
|
15
|
+
.FormLayoutGroup--ios {
|
|
16
|
+
--formitem_padding: 12px;
|
|
14
17
|
}
|
|
15
18
|
|
|
16
|
-
.FormLayoutGroup--
|
|
19
|
+
.FormLayoutGroup--removable {
|
|
17
20
|
padding-left: 0;
|
|
21
|
+
padding-right: 0;
|
|
18
22
|
}
|
|
@@ -42,7 +42,16 @@ const FormLayoutGroup: React.FC<FormLayoutGroupProps> = ({
|
|
|
42
42
|
)}
|
|
43
43
|
{...restProps}>
|
|
44
44
|
{isRemovable
|
|
45
|
-
?
|
|
45
|
+
? (
|
|
46
|
+
<Removable
|
|
47
|
+
vkuiClass="FormLayoutGroup__removable"
|
|
48
|
+
align="start"
|
|
49
|
+
removePlaceholder={removePlaceholder}
|
|
50
|
+
onRemove={(e) => onRemove(e, rootEl?.current)}
|
|
51
|
+
>
|
|
52
|
+
{children}
|
|
53
|
+
</Removable>
|
|
54
|
+
)
|
|
46
55
|
: children
|
|
47
56
|
}
|
|
48
57
|
</div>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
.Gallery {
|
|
2
2
|
position: relative;
|
|
3
3
|
overflow: hidden;
|
|
4
|
-
height: 100px;
|
|
5
4
|
}
|
|
6
5
|
|
|
7
6
|
.Gallery__viewport {
|
|
@@ -18,13 +17,13 @@
|
|
|
18
17
|
display: flex;
|
|
19
18
|
width: 100%;
|
|
20
19
|
height: 100%;
|
|
20
|
+
min-height: 100px;
|
|
21
21
|
cursor: grab;
|
|
22
22
|
align-items: stretch;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.Gallery__slide {
|
|
26
26
|
width: 100%;
|
|
27
|
-
height: 100%;
|
|
28
27
|
flex: 0 0 auto;
|
|
29
28
|
max-width: 100%;
|
|
30
29
|
overflow: hidden;
|
|
@@ -36,7 +35,7 @@
|
|
|
36
35
|
|
|
37
36
|
.Gallery__slide > * {
|
|
38
37
|
width: 100%;
|
|
39
|
-
height: 100%;
|
|
38
|
+
min-height: 100%;
|
|
40
39
|
}
|
|
41
40
|
|
|
42
41
|
.Gallery__bullets {
|