@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,39 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/actions/FloatingMenu.js";var _excluded = ["fixed", "onChange", "items", "activeIndex", "size", "WrapperView"];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 { Icon } from "../presentation";
|
|
2
|
+
import { Link } from "./Link";
|
|
3
|
+
import { Text } from "../text";
|
|
4
|
+
import { View } from "../structure";
|
|
5
|
+
import { moveScale } from "../../theme/helpers/sizeScale";
|
|
6
|
+
import { useSafeAreaInsets } from "../../abstractions/helpers/useSafeAreaInsets";import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
export function FloatingMenu(_ref) {var _this = this;var fixed = _ref.fixed,onChange = _ref.onChange,items = _ref.items,activeIndex = _ref.activeIndex,_ref$size = _ref.size,size = _ref$size === void 0 ? 'md' : _ref$size,WrapperView = _ref.WrapperView,props = _objectWithoutProperties(_ref, _excluded);
|
|
9
|
+
var insets = useSafeAreaInsets();
|
|
10
|
+
var height = moveScale(size, 2);
|
|
11
|
+
|
|
12
|
+
var bg = !WrapperView ? 'overlayBG' : null;
|
|
13
|
+
WrapperView = WrapperView || View;
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
_jsx(View, { absolute: !fixed, fixed: fixed, left: "md", right: "md", centerH: true, bottom: Math.max(insets.bottom / 2, 16), children:
|
|
17
|
+
_jsx(WrapperView, Object.assign({ height: height, shadow: true, round: true, row: true, paddingH: "sm", bg: bg }, props, { children:
|
|
18
|
+
items.map(function (item, index) {var _item$icon;
|
|
19
|
+
var isActive = index === activeIndex;
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
_jsxs(Link, { onPress: function onPress() {return onChange(item, index);}, center: true, padding: "xs", gap: 3, width: height, round: true, children: [
|
|
23
|
+
_jsx(Icon, {
|
|
24
|
+
name: isActive ? (_item$icon = item.icon) == null ? void 0 : _item$icon.replace(/line(?=[^line]*$)/, 'fill') : item.icon,
|
|
25
|
+
size: height,
|
|
26
|
+
color: isActive ? 'primary' : 'text3' }
|
|
27
|
+
),
|
|
28
|
+
!!item.label &&
|
|
29
|
+
_jsx(Text, { size: "xxs", center: true, color: isActive ? 'primary' : 'text3', strong: true, numberOfLines: 1, children:
|
|
30
|
+
item.label }
|
|
31
|
+
)] }, index
|
|
32
|
+
|
|
33
|
+
));
|
|
34
|
+
|
|
35
|
+
}) })
|
|
36
|
+
) }
|
|
37
|
+
));
|
|
38
|
+
|
|
39
|
+
}
|
|
@@ -1 +1,66 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/actions/Link.js";var _excluded = ["label", "children", "href", "target"];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;}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 { pipe, is } from 'ramda';
|
|
2
|
+
|
|
3
|
+
import { AbsTouchableOpacity } from "../../abstractions/TouchableOpacity";
|
|
4
|
+
import { LoadingView } from "../state/LoadingView";
|
|
5
|
+
import { Text } from "../text/Text";
|
|
6
|
+
import { useAnimationModifier } from "../../modifiers/animation";
|
|
7
|
+
import { useBackgroundModifier } from "../../modifiers/background";
|
|
8
|
+
import { useBorderModifier } from "../../modifiers/border";
|
|
9
|
+
import { useColorConverter } from "../../modifiers/colorConverter";
|
|
10
|
+
import { useCursorModifier } from "../../modifiers/cursor";
|
|
11
|
+
import { useDefaultModifier } from "../../modifiers/default";
|
|
12
|
+
import { useDisplayModifier } from "../../modifiers/display";
|
|
13
|
+
import { useFlexModifier } from "../../modifiers/flex";
|
|
14
|
+
import { useFlexWrapperModifier } from "../../modifiers/flexWrapper";
|
|
15
|
+
import { useHoverConverter } from "../../modifiers/hover";
|
|
16
|
+
import { useMarginModifier } from "../../modifiers/margin";
|
|
17
|
+
import { usePaddingModifier } from "../../modifiers/padding";
|
|
18
|
+
import { usePositionModifier } from "../../modifiers/position";
|
|
19
|
+
import { useSizeModifier } from "../../modifiers/size";
|
|
20
|
+
import { useStateModifier } from "../../modifiers/state";
|
|
21
|
+
import { useThemeComponentModifier } from "../../modifiers/themeComponent";import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
+
|
|
23
|
+
var DEFAULT_PROPS = {
|
|
24
|
+
pointer: true,
|
|
25
|
+
hover: {
|
|
26
|
+
br: 'md',
|
|
27
|
+
bg: 'text4_op10'
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export function Link(_ref) {var label = _ref.label,children = _ref.children,href = _ref.href,target = _ref.target,rootProps = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
+
var _pipe = pipe(
|
|
33
|
+
useDefaultModifier(DEFAULT_PROPS),
|
|
34
|
+
useHoverConverter,
|
|
35
|
+
useBackgroundModifier,
|
|
36
|
+
useColorConverter('primary'),
|
|
37
|
+
useThemeComponentModifier('Link'),
|
|
38
|
+
useCursorModifier,
|
|
39
|
+
useAnimationModifier,
|
|
40
|
+
useSizeModifier,
|
|
41
|
+
useFlexWrapperModifier,
|
|
42
|
+
useDisplayModifier,
|
|
43
|
+
useStateModifier,
|
|
44
|
+
useBorderModifier,
|
|
45
|
+
usePositionModifier,
|
|
46
|
+
usePaddingModifier,
|
|
47
|
+
useMarginModifier,
|
|
48
|
+
useFlexModifier
|
|
49
|
+
)([{}, rootProps]),_pipe2 = _slicedToArray(_pipe, 2),_pipe2$ = _pipe2[0],isHover = _pipe2$.isHover,loading = _pipe2$.loading,color = _pipe2$.color,props = _pipe2[1];
|
|
50
|
+
|
|
51
|
+
if (!!label || is(String, children)) {
|
|
52
|
+
children =
|
|
53
|
+
_jsx(Text, Object.assign({ color: color }, props, { children:
|
|
54
|
+
label || children })
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
_jsx(LoadingView, { active: loading, noWrapper: true, replaceChildren: true, children:
|
|
61
|
+
_jsx(AbsTouchableOpacity, Object.assign({ className: "neko-link", link: true, target: target, href: !props.disabled && href }, props, { children:
|
|
62
|
+
children })
|
|
63
|
+
) }
|
|
64
|
+
));
|
|
65
|
+
|
|
66
|
+
}
|
|
@@ -1 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/actions/Pressable.js";var _excluded = ["children", "href", "target"];function _objectDestructuringEmpty(t) {if (null == t) throw new TypeError("Cannot destructure " + 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;}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 { pipe } from 'ramda';
|
|
2
|
+
|
|
3
|
+
import { AbsPressable } from "../../abstractions/Pressable";
|
|
4
|
+
import { useAnimationModifier } from "../../modifiers/animation";
|
|
5
|
+
import { useBackgroundModifier } from "../../modifiers/background";
|
|
6
|
+
import { useBorderModifier } from "../../modifiers/border";
|
|
7
|
+
import { useDisplayModifier } from "../../modifiers/display";
|
|
8
|
+
import { useFlexModifier } from "../../modifiers/flex";
|
|
9
|
+
import { useFlexWrapperModifier } from "../../modifiers/flexWrapper";
|
|
10
|
+
import { useMarginModifier } from "../../modifiers/margin";
|
|
11
|
+
import { usePaddingModifier } from "../../modifiers/padding";
|
|
12
|
+
import { usePositionModifier } from "../../modifiers/position";
|
|
13
|
+
import { useSizeModifier } from "../../modifiers/size";
|
|
14
|
+
import { useStateModifier } from "../../modifiers/state";
|
|
15
|
+
import { useThemeComponentModifier } from "../../modifiers/themeComponent";import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
+
|
|
17
|
+
export function Pressable(_ref) {var children = _ref.children,href = _ref.href,target = _ref.target,rootProps = _objectWithoutProperties(_ref, _excluded);
|
|
18
|
+
var _pipe = pipe(
|
|
19
|
+
useThemeComponentModifier('Pressable'),
|
|
20
|
+
useBackgroundModifier,
|
|
21
|
+
useAnimationModifier,
|
|
22
|
+
useSizeModifier,
|
|
23
|
+
useFlexWrapperModifier,
|
|
24
|
+
useDisplayModifier,
|
|
25
|
+
useStateModifier,
|
|
26
|
+
useBorderModifier,
|
|
27
|
+
usePositionModifier,
|
|
28
|
+
usePaddingModifier,
|
|
29
|
+
useMarginModifier,
|
|
30
|
+
useFlexModifier
|
|
31
|
+
)([{}, rootProps]),_pipe2 = _slicedToArray(_pipe, 2);_objectDestructuringEmpty(_pipe2[0]);var props = _pipe2[1];
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
_jsx(AbsPressable, Object.assign({ className: "neko-pressable", link: true, target: target, href: !props.disabled && href }, props, { children:
|
|
35
|
+
children })
|
|
36
|
+
));
|
|
37
|
+
|
|
38
|
+
}
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
export*from"./Button";
|
|
1
|
+
export * from "./Button";
|
|
2
|
+
export * from "./FloatingButton";
|
|
3
|
+
export * from "./Link";
|
|
4
|
+
export * from "./Pressable";
|
|
5
|
+
export * from "./Dropdown";
|
|
6
|
+
export * from "./Breadcrumb";
|
|
7
|
+
export * from "./menu/Menu";
|
|
8
|
+
export * from "./FloatingMenu";
|
|
9
|
+
export * from "./ActionsDrawer";
|
|
@@ -1 +1,98 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/actions/menu/HorizontalMenu.js";var _excluded = ["item", "linkPaddingH", "handlePress", "linkProps", "activeIndex", "activeKey", "activeColor", "color", "sizeCode", "index"],_excluded2 = ["active", "key", "disabled"],_excluded3 = ["gap", "height", "items", "onChange", "onChangeIndex", "activeIndex"];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;}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 { omit, pipe } from 'ramda';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { IconText } from "../../presentation/IconLabel";
|
|
5
|
+
import { Link } from "../Link";
|
|
6
|
+
import { SubmenuWrapper } from "./SubmenuWrapper";
|
|
7
|
+
import { View } from "../../structure/View";
|
|
8
|
+
import { useColorConverter } from "../../../modifiers/colorConverter";
|
|
9
|
+
import { useSizeConverter } from "../../../modifiers/sizeConverter";
|
|
10
|
+
import { useThemeComponentModifier } from "../../../modifiers/themeComponent";import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
|
|
12
|
+
function Item(_ref)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
{var item = _ref.item,_ref$linkPaddingH = _ref.linkPaddingH,linkPaddingH = _ref$linkPaddingH === void 0 ? 'md' : _ref$linkPaddingH,handlePress = _ref.handlePress,linkProps = _ref.linkProps,activeIndex = _ref.activeIndex,activeKey = _ref.activeKey,_ref$activeColor = _ref.activeColor,activeColor = _ref$activeColor === void 0 ? 'primary' : _ref$activeColor,color = _ref.color,sizeCode = _ref.sizeCode,index = _ref.index,props = _objectWithoutProperties(_ref, _excluded);
|
|
25
|
+
activeColor = activeColor || 'primary';
|
|
26
|
+
var _omit = omit(['onClick', 'onPress'], item),active = _omit.active,key = _omit.key,disabled = _omit.disabled,childProps = _objectWithoutProperties(_omit, _excluded2);
|
|
27
|
+
if (!active && activeIndex >= 0) active = activeIndex === index;
|
|
28
|
+
if (!active && activeKey !== undefined) active = activeKey === item.key;
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
_jsx(SubmenuWrapper, {
|
|
32
|
+
item: item,
|
|
33
|
+
onChange: handlePress,
|
|
34
|
+
activeKey: activeKey,
|
|
35
|
+
color: color,
|
|
36
|
+
placement: "bottomRight",
|
|
37
|
+
hideIcon: true, children:
|
|
38
|
+
|
|
39
|
+
_jsx(Link, Object.assign({
|
|
40
|
+
|
|
41
|
+
fullH: true,
|
|
42
|
+
center: true,
|
|
43
|
+
paddingH: linkPaddingH,
|
|
44
|
+
disabled: disabled },
|
|
45
|
+
linkProps, {
|
|
46
|
+
onPress: function onPress() {return handlePress(item, index);}, children:
|
|
47
|
+
|
|
48
|
+
_jsx(IconText, Object.assign({
|
|
49
|
+
color: active ? activeColor : color,
|
|
50
|
+
fullH: true,
|
|
51
|
+
marginT: 3,
|
|
52
|
+
borderB: 3,
|
|
53
|
+
borderColor: active ? activeColor : 'transparent',
|
|
54
|
+
transition: "border-color 0.6s ease",
|
|
55
|
+
size: sizeCode },
|
|
56
|
+
childProps)
|
|
57
|
+
) }), key || index
|
|
58
|
+
) }
|
|
59
|
+
));
|
|
60
|
+
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function HorizontalMenu(rootProps) {var _this = this;
|
|
64
|
+
var _pipe = pipe(
|
|
65
|
+
useColorConverter(),
|
|
66
|
+
useSizeConverter('icons', 'md'),
|
|
67
|
+
useThemeComponentModifier('HorizontalMenu')
|
|
68
|
+
)([{}, rootProps]),_pipe2 = _slicedToArray(_pipe, 2),_pipe2$ = _pipe2[0],sizeCode = _pipe2$.sizeCode,color = _pipe2$.color,formattedProps = _pipe2[1];
|
|
69
|
+
|
|
70
|
+
var _formattedProps$gap = formattedProps.gap,gap = _formattedProps$gap === void 0 ? 'sm' : _formattedProps$gap,_formattedProps$heigh = formattedProps.height,height = _formattedProps$heigh === void 0 ? 50 : _formattedProps$heigh,items = formattedProps.items,onChange = formattedProps.onChange,onChangeIndex = formattedProps.onChangeIndex,activeIndex = formattedProps.activeIndex,props = _objectWithoutProperties(formattedProps, _excluded3);
|
|
71
|
+
|
|
72
|
+
var handlePress = React.useCallback(
|
|
73
|
+
function (item, index) {
|
|
74
|
+
if (!!onChange) onChange(item, index);
|
|
75
|
+
if (!!onChangeIndex) onChangeIndex(index);
|
|
76
|
+
if (!!item.onPress) item.onPress();
|
|
77
|
+
if (!!item.onClick) item.onClick();
|
|
78
|
+
},
|
|
79
|
+
[onChange, onChangeIndex]
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
return (
|
|
83
|
+
_jsx(View, Object.assign({ className: "neko-horizontal-menu", row: true, gap: gap, height: height, centerV: true }, props, { children:
|
|
84
|
+
items.map(function (item, index) {return (
|
|
85
|
+
_jsx(Item, Object.assign({
|
|
86
|
+
|
|
87
|
+
item: item,
|
|
88
|
+
handlePress: handlePress,
|
|
89
|
+
color: color,
|
|
90
|
+
sizeCode: sizeCode,
|
|
91
|
+
index: index,
|
|
92
|
+
activeIndex: activeIndex },
|
|
93
|
+
props), item.key || index
|
|
94
|
+
));}
|
|
95
|
+
) })
|
|
96
|
+
));
|
|
97
|
+
|
|
98
|
+
}
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/actions/menu/Menu.js";var _excluded = ["vertical"];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 { HorizontalMenu } from "./HorizontalMenu";
|
|
2
|
+
import { VerticalMenu } from "./VerticalMenu";import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
export function Menu(_ref) {var vertical = _ref.vertical,props = _objectWithoutProperties(_ref, _excluded);
|
|
5
|
+
if (!!vertical) return _jsx(VerticalMenu, Object.assign({}, props));
|
|
6
|
+
return _jsx(HorizontalMenu, Object.assign({}, props));
|
|
7
|
+
}
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/actions/menu/SubmenuWrapper.js";var _excluded = ["item", "children", "placement", "hideIcon"];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 { Dropdown } from "../Dropdown";
|
|
2
|
+
import { Icon } from "../../presentation/Icon";
|
|
3
|
+
import { View } from "../../structure/View";import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
export function SubmenuWrapper(_ref) {var _item$subItems;var item = _ref.item,children = _ref.children,placement = _ref.placement,hideIcon = _ref.hideIcon,props = _objectWithoutProperties(_ref, _excluded);
|
|
6
|
+
if (!((_item$subItems = item.subItems) != null && _item$subItems.length)) return children;
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
_jsx(Dropdown, Object.assign({ popoverProps: { placement: placement || 'rightTop' }, items: item.subItems, trigger: "hover" }, props, { children:
|
|
10
|
+
_jsxs(View, { flex: true, row: true, gap: "xxs", center: true, fullH: true, children: [
|
|
11
|
+
children,
|
|
12
|
+
!hideIcon && _jsx(Icon, { name: "arrow-right-s-line" })] }
|
|
13
|
+
) })
|
|
14
|
+
));
|
|
15
|
+
|
|
16
|
+
}
|
|
@@ -1 +1,133 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/actions/menu/VerticalMenu.js";var _excluded = ["item", "linkPaddingH", "linkPaddingV", "linkMinHeight", "handlePress", "linkProps", "activeIndex", "activeKey", "activeColor", "color", "sizeCode", "index"],_excluded2 = ["active", "key", "disabled"],_excluded3 = ["item"],_excluded4 = ["gap", "items", "onChange", "onChangeIndex", "withDivider"];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;}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 { omit, pipe } from 'ramda';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import tinycolor from 'tinycolor2';
|
|
4
|
+
|
|
5
|
+
import { Divider } from "../../helpers/Separator";
|
|
6
|
+
import { IconText } from "../../presentation/IconLabel";
|
|
7
|
+
import { Link } from "../Link";
|
|
8
|
+
import { List } from "../../list/FlatList";
|
|
9
|
+
import { SubmenuWrapper } from "./SubmenuWrapper";
|
|
10
|
+
import { Text } from "../../text/Text";
|
|
11
|
+
import { View } from "../../structure/View";
|
|
12
|
+
import { moveScale } from "../../../theme/helpers/sizeScale";
|
|
13
|
+
import { useColorConverter } from "../../../modifiers/colorConverter";
|
|
14
|
+
import { useSizeConverter } from "../../../modifiers/sizeConverter";
|
|
15
|
+
import { useThemeComponentModifier } from "../../../modifiers/themeComponent";import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
|
|
17
|
+
function LinkItem(_ref)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
{var item = _ref.item,_ref$linkPaddingH = _ref.linkPaddingH,linkPaddingH = _ref$linkPaddingH === void 0 ? 'md' : _ref$linkPaddingH,_ref$linkPaddingV = _ref.linkPaddingV,linkPaddingV = _ref$linkPaddingV === void 0 ? 'xs' : _ref$linkPaddingV,linkMinHeight = _ref.linkMinHeight,handlePress = _ref.handlePress,linkProps = _ref.linkProps,activeIndex = _ref.activeIndex,activeKey = _ref.activeKey,_ref$activeColor = _ref.activeColor,activeColor = _ref$activeColor === void 0 ? 'primary' : _ref$activeColor,color = _ref.color,sizeCode = _ref.sizeCode,index = _ref.index,props = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
+
activeColor = activeColor || 'primary';
|
|
33
|
+
var _omit = omit(['onClick', 'onPress'], item),active = _omit.active,key = _omit.key,disabled = _omit.disabled,childProps = _objectWithoutProperties(_omit, _excluded2);
|
|
34
|
+
if (!active && activeIndex >= 0) active = activeIndex === index;
|
|
35
|
+
if (!active && activeKey !== undefined) active = activeKey === item.key;
|
|
36
|
+
var bg = active && tinycolor(color).setAlpha(0.03).toString();
|
|
37
|
+
linkMinHeight = linkMinHeight || moveScale(sizeCode, 1);
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
_jsx(SubmenuWrapper, { item: item, onChange: handlePress, activeKey: activeKey, color: color, children:
|
|
41
|
+
_jsx(Link, Object.assign({
|
|
42
|
+
flex: true,
|
|
43
|
+
center: true,
|
|
44
|
+
paddingH: linkPaddingH,
|
|
45
|
+
paddingV: linkPaddingV,
|
|
46
|
+
minHeight: linkMinHeight,
|
|
47
|
+
borderL: 3,
|
|
48
|
+
brColor: active ? activeColor : 'transparent',
|
|
49
|
+
bg: bg,
|
|
50
|
+
transition: "border-color 0.5s ease, background 0.3s ease",
|
|
51
|
+
hover: { br: 0 },
|
|
52
|
+
disabled: disabled },
|
|
53
|
+
linkProps, {
|
|
54
|
+
onPress: function onPress() {return handlePress(item, index);}, children:
|
|
55
|
+
|
|
56
|
+
_jsx(IconText, Object.assign({ addingV: active && 4, color: active ? activeColor : color, fullW: true, size: sizeCode }, childProps)) })
|
|
57
|
+
) }
|
|
58
|
+
));
|
|
59
|
+
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function DividerItem(_ref2) {var _ref2$linkPaddingH = _ref2.linkPaddingH,linkPaddingH = _ref2$linkPaddingH === void 0 ? 'md' : _ref2$linkPaddingH,item = _ref2.item;
|
|
63
|
+
var content = _jsx(Divider, Object.assign({ height: "xxs", line: true }, item));
|
|
64
|
+
if (!item.label) return content;
|
|
65
|
+
return (
|
|
66
|
+
_jsxs(_Fragment, { children: [
|
|
67
|
+
content,
|
|
68
|
+
_jsx(Text, Object.assign({ size: "xs", color: "text4", paddingV: "xs", paddingH: linkPaddingH || 'md', strong: true }, item))] }
|
|
69
|
+
));
|
|
70
|
+
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function Item(_ref3) {var item = _ref3.item,props = _objectWithoutProperties(_ref3, _excluded3);
|
|
74
|
+
if (item.type === 'divider') return _jsx(DividerItem, Object.assign({ item: item }, props));
|
|
75
|
+
return _jsx(LinkItem, Object.assign({ item: item }, props));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function VerticalMenu(rootProps) {var _this = this;
|
|
79
|
+
var _pipe = pipe(
|
|
80
|
+
useColorConverter('text'),
|
|
81
|
+
useSizeConverter('icons', 'md'),
|
|
82
|
+
useThemeComponentModifier('VerticalMenu')
|
|
83
|
+
)([{}, rootProps]),_pipe2 = _slicedToArray(_pipe, 2),_pipe2$ = _pipe2[0],sizeCode = _pipe2$.sizeCode,color = _pipe2$.color,formattedProps = _pipe2[1];
|
|
84
|
+
|
|
85
|
+
var _formattedProps$gap = formattedProps.gap,gap = _formattedProps$gap === void 0 ? 'sm' : _formattedProps$gap,items = formattedProps.items,onChange = formattedProps.onChange,onChangeIndex = formattedProps.onChangeIndex,withDivider = formattedProps.withDivider,props = _objectWithoutProperties(formattedProps, _excluded4);
|
|
86
|
+
|
|
87
|
+
var handlePress = React.useCallback(
|
|
88
|
+
function (item, index) {
|
|
89
|
+
if (!!onChange) onChange(item, index);
|
|
90
|
+
if (!!onChangeIndex) onChangeIndex(index);
|
|
91
|
+
if (!!item.onPress) item.onPress();
|
|
92
|
+
if (!!item.onClick) item.onClick();
|
|
93
|
+
},
|
|
94
|
+
[onChange, onChangeIndex]
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
return (
|
|
98
|
+
_jsx(View, Object.assign({ className: "neko-vertical-menu", gap: gap, width: "100%" }, props, { children:
|
|
99
|
+
_jsx(List, {
|
|
100
|
+
data: items,
|
|
101
|
+
keyExtractor: function keyExtractor(item, index) {return item.key || index;},
|
|
102
|
+
divider: withDivider,
|
|
103
|
+
renderItem: function renderItem(_ref4) {var item = _ref4.item,index = _ref4.index;return (
|
|
104
|
+
_jsx(Item, Object.assign({
|
|
105
|
+
|
|
106
|
+
item: item,
|
|
107
|
+
handlePress: handlePress,
|
|
108
|
+
color: color,
|
|
109
|
+
sizeCode: sizeCode,
|
|
110
|
+
index: index },
|
|
111
|
+
props), item.key || index
|
|
112
|
+
));} }
|
|
113
|
+
|
|
114
|
+
) })
|
|
115
|
+
));
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
return (
|
|
119
|
+
_jsx(View, Object.assign({ className: "neko-vertical-menu", gap: gap, width: "100%" }, props, { children:
|
|
120
|
+
items.map(function (item, index) {return (
|
|
121
|
+
_jsx(Item, Object.assign({
|
|
122
|
+
|
|
123
|
+
item: item,
|
|
124
|
+
handlePress: handlePress,
|
|
125
|
+
color: color,
|
|
126
|
+
sizeCode: sizeCode,
|
|
127
|
+
index: index },
|
|
128
|
+
props), item.key || index
|
|
129
|
+
));}
|
|
130
|
+
) })
|
|
131
|
+
));
|
|
132
|
+
|
|
133
|
+
}
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/animations/AnimatedTopBar.js";import{AnimatedView}from"./AnimatedView";
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/animations/AnimatedTopBar.js";import { AnimatedView } from "./AnimatedView";
|
|
2
|
+
import { TopBar } from "../structure";import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
export function AnimatedTopBar(props) {
|
|
5
|
+
return (
|
|
6
|
+
_jsx(AnimatedView, { style: { position: 'absolute', top: 0, left: 0, right: 0, zIndex: 90 }, fade: true, children:
|
|
7
|
+
_jsx(TopBar, Object.assign({}, props)) }
|
|
8
|
+
));
|
|
9
|
+
|
|
10
|
+
}
|
|
@@ -1 +1,34 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/animations/AnimatedTopBar.native.js";var _excluded = ["showAfter", "duration", "fade", "slide"];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 Animated, { useAnimatedStyle, useSharedValue, useAnimatedReaction, withTiming } from 'react-native-reanimated';
|
|
2
|
+
|
|
3
|
+
import { TopBar } from "../structure";
|
|
4
|
+
import { useReanimatedScroll } from "./ReanimatedScrollHandler";
|
|
5
|
+
import { useSafeAreaInsets } from "../../abstractions/helpers/useSafeAreaInsets";import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
export function AnimatedTopBar(_ref) {var _ref$showAfter = _ref.showAfter,showAfter = _ref$showAfter === void 0 ? 90 : _ref$showAfter,_ref$duration = _ref.duration,duration = _ref$duration === void 0 ? 300 : _ref$duration,_ref$fade = _ref.fade,fade = _ref$fade === void 0 ? true : _ref$fade,slide = _ref.slide,props = _objectWithoutProperties(_ref, _excluded);
|
|
8
|
+
var _useReanimatedScroll = useReanimatedScroll(),scrollY = _useReanimatedScroll.scrollY;
|
|
9
|
+
var _useSafeAreaInsets = useSafeAreaInsets(),safeTop = _useSafeAreaInsets.top;
|
|
10
|
+
|
|
11
|
+
var visibility = useSharedValue(0);
|
|
12
|
+
|
|
13
|
+
useAnimatedReaction(
|
|
14
|
+
function () {return scrollY.value >= showAfter - safeTop;},
|
|
15
|
+
function (shouldShow, prev) {
|
|
16
|
+
if (shouldShow !== prev) {
|
|
17
|
+
visibility.value = withTiming(shouldShow ? 1 : 0, { duration: duration });
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
var animatedStyle = useAnimatedStyle(function () {
|
|
23
|
+
var style = {};
|
|
24
|
+
if (fade) style.opacity = visibility.value;
|
|
25
|
+
if (slide) style.transform = [{ translateY: (1 - visibility.value) * (-50 - safeTop) }];
|
|
26
|
+
return style;
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
_jsx(Animated.View, { style: [{ position: 'absolute', top: 0, left: 0, right: 0, zIndex: 90 }, animatedStyle], children:
|
|
31
|
+
_jsx(TopBar, Object.assign({}, props)) }
|
|
32
|
+
));
|
|
33
|
+
|
|
34
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{AnimatedTopBar}from"./AnimatedTopBar.native";
|
|
1
|
+
export { AnimatedTopBar } from "./AnimatedTopBar.native";
|