@neko-os/ui 0.2.3 → 0.3.0
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/dist/DynamicStyleTag.js +18 -2
- package/dist/DynamicStyleTag.native.js +3 -1
- package/dist/NekoUI.js +39 -1
- package/dist/abstractions/ActivityIndicator.js +19 -1
- package/dist/abstractions/ActivityIndicator.native.js +43 -1
- package/dist/abstractions/ActivityIndicator.web.js +43 -1
- package/dist/abstractions/AnimatedView.js +3 -1
- package/dist/abstractions/AnimatedView.native.js +5 -1
- package/dist/abstractions/AnimatedView.web.js +3 -1
- package/dist/abstractions/BlurView.js +43 -1
- package/dist/abstractions/BlurView.native.js +39 -1
- package/dist/abstractions/BlurView.web.js +39 -1
- package/dist/abstractions/DraggableSlideView.js +3 -1
- package/dist/abstractions/DraggableSlideView.native.js +62 -1
- package/dist/abstractions/FlatList.js +3 -1
- package/dist/abstractions/FlatList.native.js +37 -1
- package/dist/abstractions/FlatList.web.js +3 -1
- package/dist/abstractions/GradientView.js +5 -1
- package/dist/abstractions/GradientView.native.js +32 -1
- package/dist/abstractions/HiddenInput.js +3 -1
- package/dist/abstractions/HiddenInput.native.js +3 -1
- package/dist/abstractions/Icon.js +10 -1
- package/dist/abstractions/Icon.native.js +13 -1
- package/dist/abstractions/Icon.web.js +11 -1
- package/dist/abstractions/Image.js +12 -1
- package/dist/abstractions/Image.native.js +7 -1
- package/dist/abstractions/Image.web.js +7 -1
- package/dist/abstractions/ImageBackground.js +17 -1
- package/dist/abstractions/ImageBackground.native.js +27 -1
- package/dist/abstractions/ImageBackground.web.js +7 -1
- package/dist/abstractions/KeyboardAvoidingView.js +3 -1
- package/dist/abstractions/KeyboardAvoidingView.native.js +3 -1
- package/dist/abstractions/Platform.js +1 -1
- package/dist/abstractions/Platform.native.js +3 -1
- package/dist/abstractions/Platform.web.js +3 -1
- package/dist/abstractions/Pressable.js +4 -1
- package/dist/abstractions/Pressable.native.js +3 -1
- package/dist/abstractions/Pressable.web.js +3 -1
- package/dist/abstractions/SafeAreaView.js +3 -1
- package/dist/abstractions/SafeAreaView.native.js +3 -1
- package/dist/abstractions/ScrollView.js +3 -1
- package/dist/abstractions/ScrollView.native.js +5 -1
- package/dist/abstractions/ScrollView.web.js +3 -1
- package/dist/abstractions/StaticList.js +51 -1
- package/dist/abstractions/Switch.js +97 -1
- package/dist/abstractions/Switch.native.js +12 -1
- package/dist/abstractions/Table.js +29 -1
- package/dist/abstractions/Table.native.js +19 -1
- package/dist/abstractions/Text.js +14 -1
- package/dist/abstractions/Text.native.js +3 -1
- package/dist/abstractions/Text.web.js +18 -1
- package/dist/abstractions/TextInput.js +12 -1
- package/dist/abstractions/TextInput.native.js +5 -1
- package/dist/abstractions/TextInput.web.js +5 -1
- package/dist/abstractions/TouchableOpacity.js +4 -1
- package/dist/abstractions/TouchableOpacity.native.js +3 -1
- package/dist/abstractions/View.js +3 -1
- package/dist/abstractions/View.native.js +3 -1
- package/dist/abstractions/View.web.js +3 -1
- package/dist/abstractions/helpers/componentSize.js +13 -1
- package/dist/abstractions/helpers/componentSize.native.js +12 -1
- package/dist/abstractions/helpers/storage.js +32 -1
- package/dist/abstractions/helpers/storage.native.js +34 -1
- package/dist/abstractions/helpers/transformStyle.js +8 -1
- package/dist/abstractions/helpers/transformStyle.native.js +3 -1
- package/dist/abstractions/helpers/useSafeAreaInsets.js +3 -1
- package/dist/abstractions/helpers/useSafeAreaInsets.native.js +3 -1
- package/dist/abstractions/helpers/windowWidth.js +13 -1
- package/dist/abstractions/helpers/windowWidth.native.js +6 -1
- package/dist/abstractions/helpers/windowWidth.web.js +6 -1
- package/dist/components/actions/ActionsDrawer.js +81 -1
- package/dist/components/actions/Breadcrumb.js +47 -1
- package/dist/components/actions/Button.js +82 -1
- package/dist/components/actions/Dropdown.js +91 -1
- package/dist/components/actions/FloatingButton.js +87 -1
- package/dist/components/actions/FloatingMenu.js +39 -1
- package/dist/components/actions/Link.js +66 -1
- package/dist/components/actions/Pressable.js +38 -1
- package/dist/components/actions/index.js +9 -1
- package/dist/components/actions/menu/HorizontalMenu.js +98 -1
- package/dist/components/actions/menu/Menu.js +7 -1
- package/dist/components/actions/menu/SubmenuWrapper.js +16 -1
- package/dist/components/actions/menu/VerticalMenu.js +133 -1
- package/dist/components/animations/AnimatedTopBar.js +10 -1
- package/dist/components/animations/AnimatedTopBar.native.js +34 -1
- package/dist/components/animations/AnimatedTopBar.web.js +1 -1
- package/dist/components/animations/AnimatedView.js +45 -1
- package/dist/components/animations/DraggableSlideView.js +42 -1
- package/dist/components/animations/ParallaxHeader.js +9 -1
- package/dist/components/animations/ParallaxHeader.native.js +32 -1
- package/dist/components/animations/ParallaxHeader.web.js +32 -1
- package/dist/components/animations/ReanimatedScrollHandler.js +8 -1
- package/dist/components/animations/ReanimatedScrollHandler.native.js +24 -1
- package/dist/components/animations/ReanimatedScrollHandler.web.js +1 -1
- package/dist/components/animations/ReanimatedView.js +40 -1
- package/dist/components/animations/index.js +5 -1
- package/dist/components/calendar/CalendarNav.js +67 -1
- package/dist/components/calendar/WeekDaysBar.js +18 -1
- package/dist/components/calendar/_helpers/calendarDays.js +16 -1
- package/dist/components/calendar/_helpers/dateDisabled.js +24 -1
- package/dist/components/feedback/alerter.js +31 -1
- package/dist/components/feedback/confirmer.js +70 -1
- package/dist/components/feedback/index.js +3 -1
- package/dist/components/feedback/notifications/Notification.js +37 -1
- package/dist/components/feedback/notifications/NotificationsHandler.js +65 -1
- package/dist/components/filter/DateFilter.js +72 -0
- package/dist/components/filter/FilterGroup.js +17 -0
- package/dist/components/filter/FilterHandler.js +54 -0
- package/dist/components/filter/FilterItem.js +30 -0
- package/dist/components/filter/PopoverFilterItem.js +84 -0
- package/dist/components/filter/SearchInput.js +49 -0
- package/dist/components/filter/index.js +6 -0
- package/dist/components/form/Form.js +31 -1
- package/dist/components/form/FormGroup.js +21 -1
- package/dist/components/form/FormItem.js +118 -1
- package/dist/components/form/FormList.js +143 -1
- package/dist/components/form/FormWrapperComponent.js +52 -1
- package/dist/components/form/FormWrapperComponent.native.js +5 -1
- package/dist/components/form/SubmitButton.js +22 -1
- package/dist/components/form/index.js +9 -1
- package/dist/components/form/useNewForm.js +211 -1
- package/dist/components/form/useWatch.js +70 -1
- package/dist/components/form/validation/defaultMessages.js +20 -1
- package/dist/components/form/validation/index.js +5 -1
- package/dist/components/form/validation/normalizeRules.js +22 -1
- package/dist/components/form/validation/shouldValidateOn.js +21 -1
- package/dist/components/form/validation/validateRules.js +83 -1
- package/dist/components/form/validation/validators.js +82 -1
- package/dist/components/helpers/ConditionalLazyRender.js +6 -1
- package/dist/components/helpers/LazyAction.js +22 -1
- package/dist/components/helpers/LazyRender.js +55 -1
- package/dist/components/helpers/LazyRender.native.js +58 -1
- package/dist/components/helpers/Portal.js +21 -1
- package/dist/components/helpers/PortalHandler.js +32 -1
- package/dist/components/helpers/Responsive.js +18 -1
- package/dist/components/helpers/Separator.js +49 -1
- package/dist/components/helpers/VerticalView.js +34 -1
- package/dist/components/helpers/index.js +8 -1
- package/dist/components/index.js +20 -1
- package/dist/components/inputs/BooleanSelect.js +14 -0
- package/dist/components/inputs/Checkbox.js +56 -1
- package/dist/components/inputs/DateInput.js +123 -1
- package/dist/components/inputs/DateRangeInput.js +41 -0
- package/dist/components/inputs/Editable.js +129 -0
- package/dist/components/inputs/EnabledSelect.js +14 -0
- package/dist/components/inputs/InputWrapper.js +93 -1
- package/dist/components/inputs/LinkInput.js +17 -1
- package/dist/components/inputs/MaskInput.js +67 -1
- package/dist/components/inputs/NumberInput.js +111 -1
- package/dist/components/inputs/NumberRangeInput.js +41 -0
- package/dist/components/inputs/PasswordInput.js +24 -0
- package/dist/components/inputs/Picker.js +169 -1
- package/dist/components/inputs/Radio.js +55 -1
- package/dist/components/inputs/RateInput.js +62 -1
- package/dist/components/inputs/SegmentedPicker.js +62 -1
- package/dist/components/inputs/Select.js +219 -1
- package/dist/components/inputs/Switch.js +60 -1
- package/dist/components/inputs/TextArea.js +5 -0
- package/dist/components/inputs/TextInput.js +32 -1
- package/dist/components/inputs/UploadInput.js +140 -0
- package/dist/components/inputs/_DateInput.native.js +89 -1
- package/dist/components/inputs/datePicker/DatePicker.js +24 -1
- package/dist/components/inputs/datePicker/DayPicker.js +64 -1
- package/dist/components/inputs/datePicker/MonthPicker.js +62 -1
- package/dist/components/inputs/datePicker/QuarterPicker.js +65 -1
- package/dist/components/inputs/datePicker/WeekPicker.js +74 -1
- package/dist/components/inputs/datePicker/YearPicker.js +70 -1
- package/dist/components/inputs/index.js +23 -1
- package/dist/components/inputs/upload/Upload.js +99 -0
- package/dist/components/inputs/upload/Upload.native.js +154 -0
- package/dist/components/inputs/upload/useUploadState.js +143 -0
- package/dist/components/layout/Layout.js +40 -1
- package/dist/components/layout/LayoutContent.js +42 -1
- package/dist/components/layout/LayoutHeader.js +70 -1
- package/dist/components/layout/LayoutSider.js +64 -1
- package/dist/components/layout/index.js +4 -1
- package/dist/components/list/FlatList.js +91 -1
- package/dist/components/list/ScrollView.js +58 -1
- package/dist/components/list/index.js +2 -1
- package/dist/components/modals/bottomDrawer/index.js +3 -1
- package/dist/components/modals/bottomDrawer/index.native.js +5 -1
- package/dist/components/modals/bottomDrawer/index.web.js +5 -1
- package/dist/components/modals/bottomDrawer/native/BottomDrawer.js +239 -1
- package/dist/components/modals/bottomDrawer/native/DrawerContext.js +17 -1
- package/dist/components/modals/bottomDrawer/native/DrawerHandle.js +12 -1
- package/dist/components/modals/bottomDrawer/native/DrawerScrollView.js +5 -1
- package/dist/components/modals/bottomDrawer/native/createDrawerScrollComponent.js +139 -1
- package/dist/components/modals/bottomDrawer/native/utils.js +65 -1
- package/dist/components/modals/bottomDrawer/web/BottomDrawer.js +5 -1
- package/dist/components/modals/drawer/Drawer.js +5 -1
- package/dist/components/modals/drawer/Drawer.native.js +3 -1
- package/dist/components/modals/drawer/Drawer.web.js +3 -1
- package/dist/components/modals/drawer/index.js +1 -1
- package/dist/components/modals/index.js +4 -1
- package/dist/components/modals/modal/Modal.js +84 -1
- package/dist/components/modals/modal/Modal.native.js +83 -1
- package/dist/components/modals/modal/ModalBackdrop.js +58 -1
- package/dist/components/modals/modal/ModalContent.js +28 -1
- package/dist/components/modals/modal/ModalFooter.js +31 -1
- package/dist/components/modals/modal/ModalHeader.js +50 -1
- package/dist/components/modals/modal/handler/ModalsHandler.js +61 -1
- package/dist/components/modals/modal/index.js +6 -1
- package/dist/components/modals/router/ModalRoute.js +15 -1
- package/dist/components/modals/router/ModalsRouter.js +120 -1
- package/dist/components/modals/router/ModalsRouterContext.js +16 -1
- package/dist/components/modals/router/index.js +6 -1
- package/dist/components/modals/router/useAllModalsParams.js +6 -1
- package/dist/components/modals/router/useModalParams.js +6 -1
- package/dist/components/modals/router/useModalsNavigation.js +6 -1
- package/dist/components/modals/router/useUpdateModalContainer.js +6 -1
- package/dist/components/presentation/Avatar.js +79 -1
- package/dist/components/presentation/AvatarLabel.js +60 -1
- package/dist/components/presentation/AvatarsGroup.js +30 -0
- package/dist/components/presentation/Badge.js +91 -1
- package/dist/components/presentation/ContentLabel.js +43 -1
- package/dist/components/presentation/Icon.js +20 -1
- package/dist/components/presentation/IconLabel.js +40 -1
- package/dist/components/presentation/Image.js +33 -1
- package/dist/components/presentation/ImageBackground.js +38 -1
- package/dist/components/presentation/LabelValue.js +51 -1
- package/dist/components/presentation/Progress.js +20 -0
- package/dist/components/presentation/Rate.js +58 -1
- package/dist/components/presentation/RateTag.js +35 -1
- package/dist/components/presentation/Result.js +60 -1
- package/dist/components/presentation/ResultBar.js +56 -1
- package/dist/components/presentation/Tag.js +69 -1
- package/dist/components/presentation/Tooltip.js +44 -1
- package/dist/components/presentation/index.js +16 -1
- package/dist/components/sections/Section.js +50 -1
- package/dist/components/sections/SectionItem.js +24 -1
- package/dist/components/sections/SectionItemDropdown.js +68 -1
- package/dist/components/sections/SectionItemLink.js +35 -1
- package/dist/components/sections/index.js +4 -1
- package/dist/components/state/Loading.js +20 -1
- package/dist/components/state/LoadingView.js +37 -1
- package/dist/components/state/StatePresenter.js +41 -1
- package/dist/components/state/index.js +3 -1
- package/dist/components/steps/ActiveStepContent.js +16 -0
- package/dist/components/steps/StepsHandler.js +53 -0
- package/dist/components/steps/StepsMenu.js +14 -0
- package/dist/components/steps/StepsNavigation.js +37 -0
- package/dist/components/steps/index.js +4 -0
- package/dist/components/structure/Accordion.js +69 -1
- package/dist/components/structure/AccordionGroup.js +35 -1
- package/dist/components/structure/Affix.js +34 -0
- package/dist/components/structure/Affix.native.js +3 -0
- package/dist/components/structure/BlurView.js +59 -1
- package/dist/components/structure/Card.js +46 -1
- package/dist/components/structure/Col.js +22 -1
- package/dist/components/structure/GradientView.js +42 -1
- package/dist/components/structure/KeyboardAvoidingView.js +52 -1
- package/dist/components/structure/Row.js +50 -1
- package/dist/components/structure/SafeAreaView.js +42 -1
- package/dist/components/structure/Segment.js +51 -1
- package/dist/components/structure/TopBar.js +57 -1
- package/dist/components/structure/View.js +44 -1
- package/dist/components/structure/index.js +14 -1
- package/dist/components/structure/overlay/OverlayHandler.js +83 -1
- package/dist/components/structure/overlay/OverlayHandler.native.js +6 -1
- package/dist/components/structure/overlay/OverlayWrapper.js +52 -1
- package/dist/components/structure/overlay/calculatePosition.js +29 -1
- package/dist/components/structure/overlay/smartPlacement.js +32 -1
- package/dist/components/structure/popover/Popover.js +135 -1
- package/dist/components/structure/popover/Popover.native.js +105 -1
- package/dist/components/structure/popover/PopoverContent.js +18 -1
- package/dist/components/structure/popover/Popover_BU.js +157 -1
- package/dist/components/table/DataTable.js +62 -1
- package/dist/components/table/Pagination.js +128 -1
- package/dist/components/table/Table.js +66 -1
- package/dist/components/table/TableCol.js +67 -1
- package/dist/components/table/TableHeader.js +69 -1
- package/dist/components/table/TableHeaderRow.js +31 -1
- package/dist/components/table/TableRow.js +30 -1
- package/dist/components/table/index.js +7 -1
- package/dist/components/tabs/ActiveTabContent.js +38 -1
- package/dist/components/tabs/TabsHandler.js +16 -1
- package/dist/components/tabs/TabsMenu.js +15 -1
- package/dist/components/tabs/index.js +3 -1
- package/dist/components/text/DateText.js +24 -1
- package/dist/components/text/Text.js +32 -1
- package/dist/components/text/VerticalText.js +29 -1
- package/dist/components/text/index.js +3 -1
- package/dist/components/theme/ThemePicker.js +48 -1
- package/dist/components/theme/ThemePickerDrawer.js +12 -1
- package/dist/components/theme/ThemeStatusBar.js +3 -1
- package/dist/components/theme/ThemeStatusBar.native.js +9 -1
- package/dist/components/theme/ThemeThumb.js +98 -1
- package/dist/components/theme/index.js +3 -1
- package/dist/helpers/debounce.js +9 -1
- package/dist/helpers/index.js +5 -1
- package/dist/helpers/options.js +65 -1
- package/dist/helpers/random.js +5 -1
- package/dist/helpers/storage.js +76 -1
- package/dist/helpers/string.js +74 -1
- package/dist/i18n/I18n.js +96 -1
- package/dist/i18n/I18nProvider.js +40 -1
- package/dist/i18n/index.js +2 -1
- package/dist/index.js +8 -1
- package/dist/modifiers/_helpers.js +6 -1
- package/dist/modifiers/alignConverter.js +11 -1
- package/dist/modifiers/animation.js +18 -1
- package/dist/modifiers/animations/animatedEffects.js +64 -1
- package/dist/modifiers/animations/animatedEffects.native.js +55 -1
- package/dist/modifiers/animations/animatedEffects.web.js +55 -1
- package/dist/modifiers/animations/fadeEffect.js +46 -1
- package/dist/modifiers/animations/fadeEffect.native.js +33 -1
- package/dist/modifiers/animations/fadeEffect.web.js +3 -1
- package/dist/modifiers/animations/scaleEffect.js +46 -1
- package/dist/modifiers/animations/scaleEffect.native.js +33 -1
- package/dist/modifiers/animations/scrollEffect.web.js +3 -1
- package/dist/modifiers/animations/slideEffect.js +64 -1
- package/dist/modifiers/animations/slideEffect.native.js +53 -1
- package/dist/modifiers/animations/slideEffect.web.js +3 -1
- package/dist/modifiers/applyStyles.js +7 -1
- package/dist/modifiers/background.js +34 -1
- package/dist/modifiers/border.js +86 -1
- package/dist/modifiers/colorConverter.js +13 -1
- package/dist/modifiers/cursor.js +21 -1
- package/dist/modifiers/default.js +9 -1
- package/dist/modifiers/display.js +22 -1
- package/dist/modifiers/flex.js +20 -1
- package/dist/modifiers/flexWrapper.js +87 -1
- package/dist/modifiers/fullColor.js +32 -1
- package/dist/modifiers/grid.js +27 -1
- package/dist/modifiers/hover.js +28 -1
- package/dist/modifiers/logger.js +6 -1
- package/dist/modifiers/margin.js +25 -1
- package/dist/modifiers/overflow.js +28 -1
- package/dist/modifiers/padding.js +25 -1
- package/dist/modifiers/position.js +57 -1
- package/dist/modifiers/responsiveConverter.js +19 -1
- package/dist/modifiers/shadow.js +35 -1
- package/dist/modifiers/size.js +59 -1
- package/dist/modifiers/sizeConverter.js +12 -1
- package/dist/modifiers/state.js +33 -1
- package/dist/modifiers/text.js +62 -1
- package/dist/modifiers/textConverter.js +12 -1
- package/dist/modifiers/themeComponent.js +11 -1
- package/dist/responsive/ResponsiveHandler.js +28 -1
- package/dist/responsive/index.js +2 -1
- package/dist/responsive/responsiveHooks.js +67 -1
- package/dist/theme/ThemeHandler.js +81 -1
- package/dist/theme/default/base.js +95 -1
- package/dist/theme/default/blackTheme.js +47 -1
- package/dist/theme/default/cyberpunkTheme.js +36 -1
- package/dist/theme/default/darkTheme.js +35 -1
- package/dist/theme/default/hackerTheme.js +55 -1
- package/dist/theme/default/lightTheme.js +35 -1
- package/dist/theme/default/paperTheme.js +36 -1
- package/dist/theme/default/themes.js +15 -1
- package/dist/theme/format/colorsVariations.js +31 -1
- package/dist/theme/format/formatTheme.js +28 -1
- package/dist/theme/helpers/colorScale.js +12 -1
- package/dist/theme/helpers/contrastColor.js +18 -1
- package/dist/theme/helpers/dynamicColor.js +32 -1
- package/dist/theme/helpers/mergePreset.js +7 -1
- package/dist/theme/helpers/relatedScales.js +34 -1
- package/dist/theme/helpers/sizeScale.js +20 -1
- package/dist/theme/helpers/textScale.js +15 -1
- package/dist/theme/index.js +2 -1
- package/package.json +1 -3
- package/src/abstractions/Icon.js +1 -1
- package/src/abstractions/TextInput.js +10 -1
- package/src/components/actions/ActionsDrawer.js +1 -1
- package/src/components/actions/Button.js +3 -1
- package/src/components/actions/FloatingMenu.js +1 -1
- package/src/components/actions/menu/HorizontalMenu.js +2 -1
- package/src/components/actions/menu/VerticalMenu.js +2 -1
- package/src/components/filter/DateFilter.js +72 -0
- package/src/components/filter/FilterGroup.js +17 -0
- package/src/components/filter/FilterHandler.js +54 -0
- package/src/components/filter/FilterItem.js +30 -0
- package/src/components/filter/PopoverFilterItem.js +84 -0
- package/src/components/filter/SearchInput.js +49 -0
- package/src/components/filter/index.js +6 -0
- package/src/components/form/Form.js +9 -3
- package/src/components/form/FormItem.js +26 -1
- package/src/components/form/FormWrapperComponent.js +12 -3
- package/src/components/form/useNewForm.js +55 -4
- package/src/components/helpers/Separator.js +15 -11
- package/src/components/helpers/index.js +1 -0
- package/src/components/index.js +2 -0
- package/src/components/inputs/BooleanSelect.js +14 -0
- package/src/components/inputs/DateInput.js +3 -1
- package/src/components/inputs/DateRangeInput.js +41 -0
- package/src/components/inputs/Editable.js +129 -0
- package/src/components/inputs/EnabledSelect.js +14 -0
- package/src/components/inputs/InputWrapper.js +7 -4
- package/src/components/inputs/NumberInput.js +10 -5
- package/src/components/inputs/NumberRangeInput.js +41 -0
- package/src/components/inputs/PasswordInput.js +24 -0
- package/src/components/inputs/Picker.js +2 -2
- package/src/components/inputs/Select.js +61 -47
- package/src/components/inputs/TextArea.js +5 -0
- package/src/components/inputs/TextInput.js +14 -4
- package/src/components/inputs/UploadInput.js +140 -0
- package/src/components/inputs/index.js +9 -0
- package/src/components/inputs/upload/Upload.js +99 -0
- package/src/components/inputs/upload/Upload.native.js +154 -0
- package/src/components/inputs/upload/useUploadState.js +143 -0
- package/src/components/layout/LayoutHeader.js +1 -0
- package/src/components/presentation/AvatarLabel.js +1 -1
- package/src/components/presentation/AvatarsGroup.js +30 -0
- package/src/components/presentation/Badge.js +3 -2
- package/src/components/presentation/ContentLabel.js +1 -1
- package/src/components/presentation/IconLabel.js +1 -0
- package/src/components/presentation/Progress.js +20 -0
- package/src/components/presentation/index.js +2 -0
- package/src/components/sections/Section.js +1 -1
- package/src/components/sections/SectionItemLink.js +4 -2
- package/src/components/steps/ActiveStepContent.js +16 -0
- package/src/components/steps/StepsHandler.js +53 -0
- package/src/components/steps/StepsMenu.js +14 -0
- package/src/components/steps/StepsNavigation.js +37 -0
- package/src/components/steps/index.js +4 -0
- package/src/components/structure/Affix.js +34 -0
- package/src/components/structure/Affix.native.js +3 -0
- package/src/components/structure/Card.js +1 -0
- package/src/components/structure/TopBar.js +13 -1
- package/src/components/structure/index.js +1 -0
- package/src/components/structure/overlay/OverlayHandler.js +9 -1
- package/src/components/structure/popover/Popover.js +22 -5
- package/src/components/table/DataTable.js +7 -2
- package/src/components/table/Table.js +2 -1
- package/src/components/tabs/ActiveTabContent.js +4 -1
- package/src/components/text/DateText.js +15 -2
- package/src/modifiers/border.js +15 -9
- package/src/modifiers/size.js +8 -5
- package/src/theme/default/base.js +2 -0
- package/src/theme/default/hackerTheme.js +1 -10
- package/src/theme/default/paperTheme.js +1 -14
|
@@ -1 +1,91 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/list/FlatList.js",_this2 = this;var _excluded = ["children"],_excluded2 = ["divider", "dividerColor", "dividerProps", "renderSeparator", "renderItem", "lazy", "onlyOnScreen", "itemMinHeight"];function _objectWithoutProperties(e, t) {if (null == e) return {};var o,r,i = _objectWithoutPropertiesLoose(e, t);if (Object.getOwnPropertySymbols) {var n = Object.getOwnPropertySymbols(e);for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);}return i;}function _objectWithoutPropertiesLoose(r, e) {if (null == r) return {};var t = {};for (var n in r) if ({}.hasOwnProperty.call(r, n)) {if (-1 !== e.indexOf(n)) continue;t[n] = r[n];}return t;}function _defineProperty(e, r, t) {return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == typeof i ? i : i + "";}function _toPrimitive(t, r) {if ("object" != typeof t || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != typeof i) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}function _slicedToArray(r, e) {return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r, a) {if (r) {if ("string" == typeof r) return _arrayLikeToArray(r, a);var t = {}.toString.call(r).slice(8, -1);return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;}}function _arrayLikeToArray(r, a) {(null == a || a > r.length) && (a = r.length);for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];return n;}function _iterableToArrayLimit(r, l) {var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];if (null != t) {var e,n,i,u,a = [],f = !0,o = !1;try {if (i = (t = t.call(r)).next, 0 === l) {if (Object(t) !== t) return;f = !1;} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);} catch (r) {o = !0, n = r;} finally {try {if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;} finally {if (o) throw n;}}return a;}}function _arrayWithHoles(r) {if (Array.isArray(r)) return r;}import { pipe } from 'ramda';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { AbsFlatList } from "../../abstractions/FlatList";
|
|
5
|
+
import { AbsStaticList } from "../../abstractions/StaticList";
|
|
6
|
+
import { ConditionalLazyRender, Divider } from "../helpers";
|
|
7
|
+
import { useAnimationModifier } from "../../modifiers/animation";
|
|
8
|
+
import { useBackgroundModifier } from "../../modifiers/background";
|
|
9
|
+
import { useBorderModifier } from "../../modifiers/border";
|
|
10
|
+
import { useDefaultModifier } from "../../modifiers/default";
|
|
11
|
+
import { useDisplayModifier } from "../../modifiers/display";
|
|
12
|
+
import { useFlexModifier } from "../../modifiers/flex";
|
|
13
|
+
import { useFlexWrapperModifier } from "../../modifiers/flexWrapper";
|
|
14
|
+
import { useMarginModifier } from "../../modifiers/margin";
|
|
15
|
+
import { useOverflowModifier } from "../../modifiers/overflow";
|
|
16
|
+
import { usePaddingModifier } from "../../modifiers/padding";
|
|
17
|
+
import { usePositionModifier } from "../../modifiers/position";
|
|
18
|
+
import { useResponsiveValue } from "../../responsive";
|
|
19
|
+
import { useShadowModifier } from "../../modifiers/shadow";
|
|
20
|
+
import { useSizeModifier } from "../../modifiers/size";
|
|
21
|
+
import { useStateModifier } from "../../modifiers/state";
|
|
22
|
+
import { useThemeComponentModifier } from "../../modifiers/themeComponent";import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
|
+
|
|
24
|
+
var DEFAULT_PROPS = function DEFAULT_PROPS(_ref) {var _ref2 = _slicedToArray(_ref, 2),_ = _ref2[0],horizontal = _ref2[1].horizontal;
|
|
25
|
+
var overflowKey = horizontal ? 'scrollX' : 'scrollY';
|
|
26
|
+
|
|
27
|
+
return _defineProperty(_defineProperty({},
|
|
28
|
+
overflowKey, true), "row",
|
|
29
|
+
!!horizontal);
|
|
30
|
+
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export function FlatList(_ref4) {var _this = this;var children = _ref4.children,rootProps = _objectWithoutProperties(_ref4, _excluded);
|
|
34
|
+
var _pipe = pipe(
|
|
35
|
+
useThemeComponentModifier('FlatList'),
|
|
36
|
+
useDefaultModifier(DEFAULT_PROPS),
|
|
37
|
+
useFlexWrapperModifier,
|
|
38
|
+
useDisplayModifier,
|
|
39
|
+
useAnimationModifier,
|
|
40
|
+
useStateModifier,
|
|
41
|
+
useSizeModifier,
|
|
42
|
+
usePositionModifier,
|
|
43
|
+
useOverflowModifier,
|
|
44
|
+
usePaddingModifier,
|
|
45
|
+
useMarginModifier,
|
|
46
|
+
useFlexModifier,
|
|
47
|
+
useBackgroundModifier,
|
|
48
|
+
useBorderModifier,
|
|
49
|
+
useShadowModifier
|
|
50
|
+
)([{}, rootProps]),_pipe2 = _slicedToArray(_pipe, 2),_ = _pipe2[0],formattedProps = _pipe2[1];
|
|
51
|
+
|
|
52
|
+
var
|
|
53
|
+
divider =
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
formattedProps.divider,dividerColor = formattedProps.dividerColor,dividerProps = formattedProps.dividerProps,renderSeparator = formattedProps.renderSeparator,renderItem = formattedProps.renderItem,lazy = formattedProps.lazy,onlyOnScreen = formattedProps.onlyOnScreen,itemMinHeight = formattedProps.itemMinHeight,props = _objectWithoutProperties(formattedProps, _excluded2);
|
|
63
|
+
var noScroll = useResponsiveValue(rootProps.noScroll);
|
|
64
|
+
var Wrapper = noScroll ? AbsStaticList : AbsFlatList;
|
|
65
|
+
|
|
66
|
+
var formattedRenderItem = React.useCallback(
|
|
67
|
+
function () {for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {params[_key] = arguments[_key];}return (
|
|
68
|
+
_jsx(ConditionalLazyRender, {
|
|
69
|
+
whenVisible: lazy || onlyOnScreen,
|
|
70
|
+
destroyOffScreen: onlyOnScreen,
|
|
71
|
+
minHeight: itemMinHeight, children:
|
|
72
|
+
|
|
73
|
+
renderItem == null ? void 0 : renderItem.apply(void 0, params) }
|
|
74
|
+
));},
|
|
75
|
+
|
|
76
|
+
[renderItem]
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
if (!renderSeparator && !!divider) {
|
|
80
|
+
if (divider === true) divider = 1;
|
|
81
|
+
renderSeparator = function renderSeparator() {return _jsx(Divider, Object.assign({ line: divider, height: divider, color: dividerColor }, dividerProps));};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
_jsx(Wrapper, Object.assign({ className: "neko-flat-list", renderSeparator: renderSeparator, renderItem: formattedRenderItem }, props, { children:
|
|
86
|
+
children })
|
|
87
|
+
));
|
|
88
|
+
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export var List = function List(props) {return _jsx(FlatList, Object.assign({ noScroll: true }, props));};
|
|
@@ -1 +1,58 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/list/ScrollView.js";var _excluded = ["children", "useNormalView"];function _objectWithoutProperties(e, t) {if (null == e) return {};var o,r,i = _objectWithoutPropertiesLoose(e, t);if (Object.getOwnPropertySymbols) {var n = Object.getOwnPropertySymbols(e);for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);}return i;}function _objectWithoutPropertiesLoose(r, e) {if (null == r) return {};var t = {};for (var n in r) if ({}.hasOwnProperty.call(r, n)) {if (-1 !== e.indexOf(n)) continue;t[n] = r[n];}return t;}function _defineProperty(e, r, t) {return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == typeof i ? i : i + "";}function _toPrimitive(t, r) {if ("object" != typeof t || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != typeof i) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}function _slicedToArray(r, e) {return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r, a) {if (r) {if ("string" == typeof r) return _arrayLikeToArray(r, a);var t = {}.toString.call(r).slice(8, -1);return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;}}function _arrayLikeToArray(r, a) {(null == a || a > r.length) && (a = r.length);for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];return n;}function _iterableToArrayLimit(r, l) {var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];if (null != t) {var e,n,i,u,a = [],f = !0,o = !1;try {if (i = (t = t.call(r)).next, 0 === l) {if (Object(t) !== t) return;f = !1;} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);} catch (r) {o = !0, n = r;} finally {try {if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;} finally {if (o) throw n;}}return a;}}function _arrayWithHoles(r) {if (Array.isArray(r)) return r;}import { pipe } from 'ramda';
|
|
2
|
+
|
|
3
|
+
import { AbsScrollView } from "../../abstractions/ScrollView";
|
|
4
|
+
import { View } from "../structure/View";
|
|
5
|
+
import { useAnimationModifier } from "../../modifiers/animation";
|
|
6
|
+
import { useBackgroundModifier } from "../../modifiers/background";
|
|
7
|
+
import { useBorderModifier } from "../../modifiers/border";
|
|
8
|
+
import { useDefaultModifier } from "../../modifiers/default";
|
|
9
|
+
import { useDisplayModifier } from "../../modifiers/display";
|
|
10
|
+
import { useFlexModifier } from "../../modifiers/flex";
|
|
11
|
+
import { useFlexWrapperModifier } from "../../modifiers/flexWrapper";
|
|
12
|
+
import { useMarginModifier } from "../../modifiers/margin";
|
|
13
|
+
import { useOverflowModifier } from "../../modifiers/overflow";
|
|
14
|
+
import { usePaddingModifier } from "../../modifiers/padding";
|
|
15
|
+
import { usePositionModifier } from "../../modifiers/position";
|
|
16
|
+
import { useResponsiveValue } from "../../responsive";
|
|
17
|
+
import { useShadowModifier } from "../../modifiers/shadow";
|
|
18
|
+
import { useSizeModifier } from "../../modifiers/size";
|
|
19
|
+
import { useStateModifier } from "../../modifiers/state";
|
|
20
|
+
import { useThemeComponentModifier } from "../../modifiers/themeComponent";import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
|
+
|
|
22
|
+
var DEFAULT_PROPS = function DEFAULT_PROPS(_ref) {var _ref2 = _slicedToArray(_ref, 2),_ = _ref2[0],horizontal = _ref2[1].horizontal;
|
|
23
|
+
var overflowKey = horizontal ? 'scrollX' : 'scrollY';
|
|
24
|
+
|
|
25
|
+
return _defineProperty(_defineProperty({},
|
|
26
|
+
overflowKey, true), "row",
|
|
27
|
+
!!horizontal);
|
|
28
|
+
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export function ScrollView(_ref4) {var children = _ref4.children,useNormalView = _ref4.useNormalView,rootProps = _objectWithoutProperties(_ref4, _excluded);
|
|
32
|
+
var _pipe = pipe(
|
|
33
|
+
useThemeComponentModifier('ScrollView'),
|
|
34
|
+
useDefaultModifier(DEFAULT_PROPS),
|
|
35
|
+
useFlexWrapperModifier,
|
|
36
|
+
useDisplayModifier,
|
|
37
|
+
useAnimationModifier,
|
|
38
|
+
useStateModifier,
|
|
39
|
+
useSizeModifier,
|
|
40
|
+
usePositionModifier,
|
|
41
|
+
useOverflowModifier,
|
|
42
|
+
usePaddingModifier,
|
|
43
|
+
useMarginModifier,
|
|
44
|
+
useFlexModifier,
|
|
45
|
+
useBackgroundModifier,
|
|
46
|
+
useBorderModifier,
|
|
47
|
+
useShadowModifier
|
|
48
|
+
)([{}, rootProps]),_pipe2 = _slicedToArray(_pipe, 2),_ = _pipe2[0],props = _pipe2[1];
|
|
49
|
+
useNormalView = useResponsiveValue(useNormalView);
|
|
50
|
+
|
|
51
|
+
if (useNormalView) return _jsx(View, Object.assign({}, rootProps, { children: children }));
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
_jsx(AbsScrollView, Object.assign({ className: "neko-scroll-view" }, props, { children:
|
|
55
|
+
children })
|
|
56
|
+
));
|
|
57
|
+
|
|
58
|
+
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export*from"./ScrollView";
|
|
1
|
+
export * from "./ScrollView";
|
|
2
|
+
export * from "./FlatList";
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
export{BottomDrawer}from"./web/BottomDrawer";
|
|
1
|
+
export { BottomDrawer } from "./web/BottomDrawer";
|
|
2
|
+
export { ScrollView as DrawerScrollView } from "../../list/ScrollView";
|
|
3
|
+
export { FlatList as DrawerFlatList } from "../../list/FlatList";
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
export{BottomDrawer}from"./native/BottomDrawer";
|
|
1
|
+
export { BottomDrawer } from "./native/BottomDrawer";
|
|
2
|
+
export { DrawerScrollView, DrawerFlatList } from "./native/DrawerScrollView";
|
|
3
|
+
export { createDrawerScrollComponent } from "./native/createDrawerScrollComponent";
|
|
4
|
+
export { DrawerHandle } from "./native/DrawerHandle";
|
|
5
|
+
export { DrawerProvider, useDrawerContext } from "./native/DrawerContext";
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
export{BottomDrawer}from"./native/BottomDrawer";
|
|
1
|
+
export { BottomDrawer } from "./native/BottomDrawer";
|
|
2
|
+
export { DrawerScrollView, DrawerFlatList } from "./native/DrawerScrollView";
|
|
3
|
+
export { createDrawerScrollComponent } from "./native/createDrawerScrollComponent";
|
|
4
|
+
export { DrawerHandle } from "./native/DrawerHandle";
|
|
5
|
+
export { DrawerProvider, useDrawerContext } from "./native/DrawerContext";
|
|
@@ -1 +1,239 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/modals/bottomDrawer/native/BottomDrawer.js";var _excluded = ["children", "render", "setRender", "open", "onClose", "snapPoints", "useSafeArea", "enableOverScroll", "enableHandlePanningGesture", "enableContentPanningGesture", "animationConfig", "hideHandle", "contentProps"],_excluded2 = ["open"];function _slicedToArray(r, e) {return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(r, l) {var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];if (null != t) {var e,n,i,u,a = [],f = !0,o = !1;try {if (i = (t = t.call(r)).next, 0 === l) {if (Object(t) !== t) return;f = !1;} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);} catch (r) {o = !0, n = r;} finally {try {if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;} finally {if (o) throw n;}}return a;}}function _arrayWithHoles(r) {if (Array.isArray(r)) return r;}function _toConsumableArray(r) {return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();}function _nonIterableSpread() {throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r, a) {if (r) {if ("string" == typeof r) return _arrayLikeToArray(r, a);var t = {}.toString.call(r).slice(8, -1);return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;}}function _iterableToArray(r) {if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);}function _arrayWithoutHoles(r) {if (Array.isArray(r)) return _arrayLikeToArray(r);}function _arrayLikeToArray(r, a) {(null == a || a > r.length) && (a = r.length);for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];return n;}function _objectWithoutProperties(e, t) {if (null == e) return {};var o,r,i = _objectWithoutPropertiesLoose(e, t);if (Object.getOwnPropertySymbols) {var n = Object.getOwnPropertySymbols(e);for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);}return i;}function _objectWithoutPropertiesLoose(r, e) {if (null == r) return {};var t = {};for (var n in r) if ({}.hasOwnProperty.call(r, n)) {if (-1 !== e.indexOf(n)) continue;t[n] = r[n];}return t;}import { GestureDetector, Gesture, GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
2
|
+
import { Modal, Dimensions, StyleSheet, BackHandler, Platform } from "react-native-web";
|
|
3
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
4
|
+
import Animated, {
|
|
5
|
+
useSharedValue,
|
|
6
|
+
useAnimatedStyle,
|
|
7
|
+
withSpring,
|
|
8
|
+
runOnJS } from
|
|
9
|
+
'react-native-reanimated';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
|
|
12
|
+
import { DrawerHandle } from "./DrawerHandle";
|
|
13
|
+
import { DrawerProvider } from "./DrawerContext";
|
|
14
|
+
import { Pressable } from "../../../actions/Pressable";
|
|
15
|
+
import { View } from "../../../structure/View";
|
|
16
|
+
import { normalizeSnapPoints, findClosestSnapPoint } from "./utils";
|
|
17
|
+
import { useColors } from "../../../../theme/ThemeHandler";import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
+
|
|
19
|
+
function InnerContent(_ref)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
{var children = _ref.children,render = _ref.render,setRender = _ref.setRender,open = _ref.open,onClose = _ref.onClose,_ref$snapPoints = _ref.snapPoints,snapPoints = _ref$snapPoints === void 0 ? ['50%'] : _ref$snapPoints,_ref$useSafeArea = _ref.useSafeArea,useSafeArea = _ref$useSafeArea === void 0 ? true : _ref$useSafeArea,_ref$enableOverScroll = _ref.enableOverScroll,enableOverScroll = _ref$enableOverScroll === void 0 ? true : _ref$enableOverScroll,_ref$enableHandlePann = _ref.enableHandlePanningGesture,enableHandlePanningGesture = _ref$enableHandlePann === void 0 ? true : _ref$enableHandlePann,_ref$enableContentPan = _ref.enableContentPanningGesture,enableContentPanningGesture = _ref$enableContentPan === void 0 ? true : _ref$enableContentPan,_ref$animationConfig = _ref.animationConfig,animationConfig = _ref$animationConfig === void 0 ? { damping: 50, stiffness: 500, mass: 0.3, overshootClamping: true, restDisplacementThreshold: 10, restSpeedThreshold: 10 } : _ref$animationConfig,hideHandle = _ref.hideHandle,contentProps = _ref.contentProps,props = _objectWithoutProperties(_ref, _excluded);
|
|
42
|
+
var _Dimensions$get = Dimensions.get('window'),SCREEN_HEIGHT = _Dimensions$get.height;
|
|
43
|
+
var insets = useSafeAreaInsets();
|
|
44
|
+
var bottomInset = useSafeArea ? insets.bottom : 0;
|
|
45
|
+
|
|
46
|
+
var colors = useColors();
|
|
47
|
+
|
|
48
|
+
var translateY = useSharedValue(SCREEN_HEIGHT);
|
|
49
|
+
var snapIndex = useSharedValue(0);
|
|
50
|
+
var velocityY = useSharedValue(0);
|
|
51
|
+
|
|
52
|
+
var normalizedSnapPoints = React.useMemo(
|
|
53
|
+
function () {return normalizeSnapPoints(snapPoints, SCREEN_HEIGHT, bottomInset);},
|
|
54
|
+
[snapPoints, useSafeArea]
|
|
55
|
+
);
|
|
56
|
+
var maxSnapPoint = React.useMemo(function () {return Math.max.apply(Math, _toConsumableArray(normalizedSnapPoints));}, [normalizedSnapPoints]);
|
|
57
|
+
var minSnapPoint = React.useMemo(function () {return Math.min.apply(Math, _toConsumableArray(normalizedSnapPoints));}, [normalizedSnapPoints]);
|
|
58
|
+
|
|
59
|
+
React.useEffect(function () {
|
|
60
|
+
if (open) {
|
|
61
|
+
var targetY = SCREEN_HEIGHT - normalizedSnapPoints[0];
|
|
62
|
+
translateY.value = withSpring(targetY, animationConfig);
|
|
63
|
+
snapIndex.value = 0;
|
|
64
|
+
} else {
|
|
65
|
+
translateY.value = withSpring(SCREEN_HEIGHT, animationConfig, function () {
|
|
66
|
+
runOnJS(setRender)(false);
|
|
67
|
+
});
|
|
68
|
+
snapIndex.value = -1;
|
|
69
|
+
}
|
|
70
|
+
}, [open]);
|
|
71
|
+
|
|
72
|
+
React.useEffect(function () {
|
|
73
|
+
if (!onClose || !open || Platform.OS !== 'android') return;
|
|
74
|
+
var backHandler = BackHandler.addEventListener('hardwareBackPress', function () {
|
|
75
|
+
onClose();
|
|
76
|
+
return true;
|
|
77
|
+
});
|
|
78
|
+
return function () {return backHandler.remove();};
|
|
79
|
+
}, [open, onClose]);
|
|
80
|
+
|
|
81
|
+
var handleClose = React.useCallback(function () {
|
|
82
|
+
onClose == null ? void 0 : onClose();
|
|
83
|
+
}, [onClose]);
|
|
84
|
+
if (!onClose) handleClose = false;
|
|
85
|
+
|
|
86
|
+
var snapTo = React.useCallback(
|
|
87
|
+
function (index) {
|
|
88
|
+
'worklet';
|
|
89
|
+
var snapPoint = normalizedSnapPoints[index];
|
|
90
|
+
if (snapPoint !== undefined) {
|
|
91
|
+
translateY.value = withSpring(SCREEN_HEIGHT - snapPoint, animationConfig);
|
|
92
|
+
snapIndex.value = index;
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
[normalizedSnapPoints]
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
var gestureStartTranslateY = useSharedValue(0);
|
|
100
|
+
var panRef = React.useRef();
|
|
101
|
+
|
|
102
|
+
var panGesture = React.useMemo(function () {
|
|
103
|
+
return Gesture.Pan().
|
|
104
|
+
withRef(panRef).
|
|
105
|
+
enabled(enableHandlePanningGesture || enableContentPanningGesture).
|
|
106
|
+
onStart(function () {
|
|
107
|
+
gestureStartTranslateY.value = translateY.value;
|
|
108
|
+
}).
|
|
109
|
+
onUpdate(function (event) {
|
|
110
|
+
var newTranslateY = gestureStartTranslateY.value + event.translationY;
|
|
111
|
+
var maxPosition = SCREEN_HEIGHT - maxSnapPoint;
|
|
112
|
+
|
|
113
|
+
if (enableOverScroll && newTranslateY >= maxPosition) {
|
|
114
|
+
translateY.value = newTranslateY;
|
|
115
|
+
} else {
|
|
116
|
+
translateY.value = Math.max(maxPosition, Math.min(SCREEN_HEIGHT, newTranslateY));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
velocityY.value = event.velocityY;
|
|
120
|
+
}).
|
|
121
|
+
onEnd(function () {
|
|
122
|
+
var currentPosition = SCREEN_HEIGHT - translateY.value;
|
|
123
|
+
var shouldClose =
|
|
124
|
+
!!handleClose && (
|
|
125
|
+
|
|
126
|
+
velocityY.value > 1500 ||
|
|
127
|
+
velocityY.value > 800 && currentPosition < minSnapPoint ||
|
|
128
|
+
currentPosition < minSnapPoint * 0.35);
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
if (shouldClose) {
|
|
132
|
+
runOnJS(handleClose)();
|
|
133
|
+
} else {
|
|
134
|
+
var closestSnapIndex = findClosestSnapPoint(currentPosition, normalizedSnapPoints, velocityY.value);
|
|
135
|
+
var targetSnapPoint = normalizedSnapPoints[closestSnapIndex];
|
|
136
|
+
translateY.value = withSpring(SCREEN_HEIGHT - targetSnapPoint, animationConfig);
|
|
137
|
+
snapIndex.value = closestSnapIndex;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}, [
|
|
141
|
+
enableHandlePanningGesture,
|
|
142
|
+
enableContentPanningGesture,
|
|
143
|
+
enableOverScroll,
|
|
144
|
+
maxSnapPoint,
|
|
145
|
+
minSnapPoint,
|
|
146
|
+
normalizedSnapPoints,
|
|
147
|
+
animationConfig,
|
|
148
|
+
handleClose]
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
var animatedSheetStyle = useAnimatedStyle(function () {
|
|
152
|
+
var currentHeight = SCREEN_HEIGHT - translateY.value;
|
|
153
|
+
return {
|
|
154
|
+
transform: [{ translateY: translateY.value }],
|
|
155
|
+
maxHeight: currentHeight
|
|
156
|
+
};
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
var contextValue = React.useMemo(
|
|
160
|
+
function () {return {
|
|
161
|
+
translateY: translateY,
|
|
162
|
+
snapIndex: snapIndex,
|
|
163
|
+
maxSnapPoint: maxSnapPoint,
|
|
164
|
+
snapTo: snapTo,
|
|
165
|
+
animationConfig: animationConfig,
|
|
166
|
+
panRef: panRef,
|
|
167
|
+
normalizedSnapPoints: normalizedSnapPoints,
|
|
168
|
+
SCREEN_HEIGHT: SCREEN_HEIGHT,
|
|
169
|
+
minSnapPoint: minSnapPoint,
|
|
170
|
+
handleClose: handleClose,
|
|
171
|
+
velocityY: velocityY
|
|
172
|
+
};},
|
|
173
|
+
[maxSnapPoint, normalizedSnapPoints, SCREEN_HEIGHT, minSnapPoint, handleClose]
|
|
174
|
+
);
|
|
175
|
+
|
|
176
|
+
return (
|
|
177
|
+
_jsxs(GestureHandlerRootView, { style: { flex: 1 }, children: [
|
|
178
|
+
_jsx(Pressable, {
|
|
179
|
+
absoluteFill: true,
|
|
180
|
+
bg: "backdrop_op70",
|
|
181
|
+
onPress: function onPress() {
|
|
182
|
+
if (!handleClose) return;
|
|
183
|
+
runOnJS(handleClose)();
|
|
184
|
+
} }
|
|
185
|
+
),
|
|
186
|
+
|
|
187
|
+
_jsx(DrawerProvider, { value: contextValue, children:
|
|
188
|
+
_jsx(GestureDetector, { gesture: panGesture, children:
|
|
189
|
+
_jsx(Animated.View, {
|
|
190
|
+
style: [styles.container, { height: SCREEN_HEIGHT }, animatedSheetStyle],
|
|
191
|
+
pointerEvents: "box-none", children:
|
|
192
|
+
|
|
193
|
+
_jsxs(View, Object.assign({
|
|
194
|
+
flex: true,
|
|
195
|
+
bg: "overlayBG",
|
|
196
|
+
shadow: true,
|
|
197
|
+
paddingB: useSafeArea && bottomInset,
|
|
198
|
+
borderRadiusT: "xxxl",
|
|
199
|
+
marginL: "auto",
|
|
200
|
+
marginR: "auto",
|
|
201
|
+
fullW: true },
|
|
202
|
+
props, { children: [
|
|
203
|
+
|
|
204
|
+
_jsx(DrawerHandle, { hide: hideHandle }),
|
|
205
|
+
_jsx(View, Object.assign({ flex: true }, contentProps, { children:
|
|
206
|
+
children })
|
|
207
|
+
)] })
|
|
208
|
+
) }
|
|
209
|
+
) }
|
|
210
|
+
) }
|
|
211
|
+
)] }
|
|
212
|
+
));
|
|
213
|
+
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
var styles = StyleSheet.create({
|
|
217
|
+
container: {
|
|
218
|
+
position: 'absolute',
|
|
219
|
+
left: 0,
|
|
220
|
+
right: 0,
|
|
221
|
+
top: 0
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
export function BottomDrawer(_ref2) {var open = _ref2.open,props = _objectWithoutProperties(_ref2, _excluded2);
|
|
226
|
+
var _React$useState = React.useState(open),_React$useState2 = _slicedToArray(_React$useState, 2),render = _React$useState2[0],setRender = _React$useState2[1];
|
|
227
|
+
|
|
228
|
+
React.useEffect(function () {
|
|
229
|
+
if (open) {
|
|
230
|
+
setRender(true);
|
|
231
|
+
}
|
|
232
|
+
}, [open]);
|
|
233
|
+
|
|
234
|
+
return (
|
|
235
|
+
_jsx(Modal, { visible: render, transparent: true, statusBarTranslucent: true, navigationBarTranslucent: true, animationType: "none", children:
|
|
236
|
+
_jsx(InnerContent, Object.assign({}, props, { open: open, render: render, setRender: setRender })) }
|
|
237
|
+
));
|
|
238
|
+
|
|
239
|
+
}
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/modals/bottomDrawer/native/DrawerContext.js";import React from'react';import{jsx as _jsx}from"react/jsx-runtime";
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/modals/bottomDrawer/native/DrawerContext.js";import React from 'react';import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
var DrawerContext = React.createContext(null);
|
|
4
|
+
|
|
5
|
+
export function DrawerProvider(_ref) {var children = _ref.children,value = _ref.value;
|
|
6
|
+
return _jsx(DrawerContext.Provider, { value: value, children: children });
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function useDrawerContext() {
|
|
10
|
+
var context = React.useContext(DrawerContext);
|
|
11
|
+
|
|
12
|
+
if (!context) {
|
|
13
|
+
return { outOfContext: true };
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return context;
|
|
17
|
+
}
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/modals/bottomDrawer/native/DrawerHandle.js";import{Divider}from"../../../helpers/Separator";
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/modals/bottomDrawer/native/DrawerHandle.js";import { Divider } from "../../../helpers/Separator";
|
|
2
|
+
import { View } from "../../../structure/View";import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
export function DrawerHandle(_ref) {var hide = _ref.hide;
|
|
5
|
+
if (!!hide) return false;
|
|
6
|
+
|
|
7
|
+
return (
|
|
8
|
+
_jsx(View, { center: true, padding: "sm", children:
|
|
9
|
+
_jsx(Divider, { maxWidth: 35, line: 4, color: "text4_op30", height: 4 }) }
|
|
10
|
+
));
|
|
11
|
+
|
|
12
|
+
}
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
import{FlatList,ScrollView}from"../../../list";
|
|
1
|
+
import { FlatList, ScrollView } from "../../../list";
|
|
2
|
+
import { createDrawerScrollComponent } from "./createDrawerScrollComponent";
|
|
3
|
+
|
|
4
|
+
export var DrawerScrollView = createDrawerScrollComponent(ScrollView);
|
|
5
|
+
export var DrawerFlatList = createDrawerScrollComponent(FlatList);
|