@neko-os/ui 0.2.3 → 0.4.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 +9 -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/abstractions/TouchableOpacity.native.js +8 -2
- 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/LinkInput.js +1 -1
- 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 +3 -3
- 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,45 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/animations/AnimatedView.js";var _excluded = ["children"];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 { AbsAnimatedView } from "../../abstractions/AnimatedView";
|
|
4
|
+
import { useAnimatedEffects } from "../../modifiers/animations/animatedEffects";
|
|
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 { useOverflowModifier } from "../../modifiers/overflow";
|
|
12
|
+
import { usePaddingModifier } from "../../modifiers/padding";
|
|
13
|
+
import { usePositionModifier } from "../../modifiers/position";
|
|
14
|
+
import { useShadowModifier } from "../../modifiers/shadow";
|
|
15
|
+
import { useSizeModifier } from "../../modifiers/size";
|
|
16
|
+
import { useStateModifier } from "../../modifiers/state";
|
|
17
|
+
import { useThemeComponentModifier } from "../../modifiers/themeComponent";import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
+
|
|
19
|
+
export function AnimatedView(_ref) {var children = _ref.children,rootProps = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
+
var _pipe = pipe(
|
|
21
|
+
useAnimatedEffects,
|
|
22
|
+
useThemeComponentModifier('AnimatedView'),
|
|
23
|
+
useFlexWrapperModifier,
|
|
24
|
+
useDisplayModifier,
|
|
25
|
+
useStateModifier,
|
|
26
|
+
useSizeModifier,
|
|
27
|
+
usePositionModifier,
|
|
28
|
+
useOverflowModifier,
|
|
29
|
+
usePaddingModifier,
|
|
30
|
+
useMarginModifier,
|
|
31
|
+
useFlexModifier,
|
|
32
|
+
useBackgroundModifier,
|
|
33
|
+
useBorderModifier,
|
|
34
|
+
useShadowModifier
|
|
35
|
+
)([{}, rootProps]),_pipe2 = _slicedToArray(_pipe, 2),_pipe2$ = _pipe2[0],lazy = _pipe2$.lazy,render = _pipe2$.render,hasOpened = _pipe2$.hasOpened,props = _pipe2[1];
|
|
36
|
+
|
|
37
|
+
if (lazy && !hasOpened) return null;
|
|
38
|
+
if (!render) return null;
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
_jsx(AbsAnimatedView, Object.assign({ className: "neko-animated-view" }, props, { children:
|
|
42
|
+
children })
|
|
43
|
+
));
|
|
44
|
+
|
|
45
|
+
}
|
|
@@ -1 +1,42 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/animations/DraggableSlideView.js";var _excluded = ["children"];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 { AbsDraggableSlideView } from "../../abstractions/DraggableSlideView";
|
|
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 { useOverflowModifier } from "../../modifiers/overflow";
|
|
12
|
+
import { usePaddingModifier } from "../../modifiers/padding";
|
|
13
|
+
import { usePositionModifier } from "../../modifiers/position";
|
|
14
|
+
import { useShadowModifier } from "../../modifiers/shadow";
|
|
15
|
+
import { useSizeModifier } from "../../modifiers/size";
|
|
16
|
+
import { useStateModifier } from "../../modifiers/state";
|
|
17
|
+
import { useThemeComponentModifier } from "../../modifiers/themeComponent";import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
+
|
|
19
|
+
export function DraggableSlideView(_ref) {var children = _ref.children,rootProps = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
+
var _pipe = pipe(
|
|
21
|
+
useThemeComponentModifier('DraggableSlideView'),
|
|
22
|
+
useFlexWrapperModifier,
|
|
23
|
+
useDisplayModifier,
|
|
24
|
+
useAnimationModifier,
|
|
25
|
+
useStateModifier,
|
|
26
|
+
useSizeModifier,
|
|
27
|
+
usePositionModifier,
|
|
28
|
+
useOverflowModifier,
|
|
29
|
+
usePaddingModifier,
|
|
30
|
+
useMarginModifier,
|
|
31
|
+
useFlexModifier,
|
|
32
|
+
useBackgroundModifier,
|
|
33
|
+
useBorderModifier,
|
|
34
|
+
useShadowModifier
|
|
35
|
+
)([{}, rootProps]),_pipe2 = _slicedToArray(_pipe, 2),_ = _pipe2[0],props = _pipe2[1];
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
_jsx(AbsDraggableSlideView, Object.assign({ className: "neko-draggable-slide-view" }, props, { children:
|
|
39
|
+
children })
|
|
40
|
+
));
|
|
41
|
+
|
|
42
|
+
}
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/animations/ParallaxHeader.js";var _excluded = ["children", "height"];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 { AnimatedView } from "./AnimatedView";import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
export function ParallaxHeader(_ref) {var children = _ref.children,_ref$height = _ref.height,height = _ref$height === void 0 ? 200 : _ref$height,props = _objectWithoutProperties(_ref, _excluded);
|
|
4
|
+
return (
|
|
5
|
+
_jsx(AnimatedView, Object.assign({ height: height, fade: true }, props, { children:
|
|
6
|
+
children })
|
|
7
|
+
));
|
|
8
|
+
|
|
9
|
+
}
|
|
@@ -1 +1,32 @@
|
|
|
1
|
-
var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/animations/ParallaxHeader.native.js";import Animated,{useAnimatedStyle,interpolate,Extrapolation}from'react-native-reanimated';
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/animations/ParallaxHeader.native.js";import Animated, { useAnimatedStyle, interpolate, Extrapolation } from 'react-native-reanimated';
|
|
2
|
+
|
|
3
|
+
import { useReanimatedScroll } from "./ReanimatedScrollHandler";import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
var SCALE_FACTOR = 2;
|
|
6
|
+
|
|
7
|
+
export function ParallaxHeader(_ref) {var children = _ref.children,_ref$height = _ref.height,height = _ref$height === void 0 ? 200 : _ref$height,_ref$parallaxSpeed = _ref.parallaxSpeed,parallaxSpeed = _ref$parallaxSpeed === void 0 ? 0.5 : _ref$parallaxSpeed,disableResistence = _ref.disableResistence;
|
|
8
|
+
var _useReanimatedScroll = useReanimatedScroll(),scrollY = _useReanimatedScroll.scrollY;
|
|
9
|
+
|
|
10
|
+
var imageStyle = useAnimatedStyle(function () {
|
|
11
|
+
var scale = scrollY.value < 0 ? 1 + Math.abs(scrollY.value) / height * SCALE_FACTOR : 1;
|
|
12
|
+
var translateY =
|
|
13
|
+
scrollY.value < 0 ? 0 : interpolate(scrollY.value, [0, height], [0, height * parallaxSpeed], Extrapolation.CLAMP);
|
|
14
|
+
return { transform: [{ translateY: translateY }, { scale: scale }] };
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
var containerStyle = useAnimatedStyle(function () {
|
|
18
|
+
var calcHeight = height;
|
|
19
|
+
if (disableResistence) calcHeight = scrollY.value < 0 ? height + Math.abs(scrollY.value) : height;
|
|
20
|
+
return {
|
|
21
|
+
height: calcHeight,
|
|
22
|
+
overflow: scrollY.value < 0 ? 'visible' : 'hidden',
|
|
23
|
+
zIndex: -1
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
_jsx(Animated.View, { style: containerStyle, children:
|
|
29
|
+
_jsx(Animated.View, { style: imageStyle, children: children }) }
|
|
30
|
+
));
|
|
31
|
+
|
|
32
|
+
}
|
|
@@ -1 +1,32 @@
|
|
|
1
|
-
var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/animations/ParallaxHeader.web.js";import Animated,{useAnimatedStyle,interpolate,Extrapolation}from'react-native-reanimated';
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/animations/ParallaxHeader.web.js";import Animated, { useAnimatedStyle, interpolate, Extrapolation } from 'react-native-reanimated';
|
|
2
|
+
|
|
3
|
+
import { useReanimatedScroll } from "./ReanimatedScrollHandler";import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
var SCALE_FACTOR = 2;
|
|
6
|
+
|
|
7
|
+
export function ParallaxHeader(_ref) {var children = _ref.children,_ref$height = _ref.height,height = _ref$height === void 0 ? 200 : _ref$height,_ref$parallaxSpeed = _ref.parallaxSpeed,parallaxSpeed = _ref$parallaxSpeed === void 0 ? 0.5 : _ref$parallaxSpeed,disableResistence = _ref.disableResistence;
|
|
8
|
+
var _useReanimatedScroll = useReanimatedScroll(),scrollY = _useReanimatedScroll.scrollY;
|
|
9
|
+
|
|
10
|
+
var imageStyle = useAnimatedStyle(function () {
|
|
11
|
+
var scale = scrollY.value < 0 ? 1 + Math.abs(scrollY.value) / height * SCALE_FACTOR : 1;
|
|
12
|
+
var translateY =
|
|
13
|
+
scrollY.value < 0 ? 0 : interpolate(scrollY.value, [0, height], [0, height * parallaxSpeed], Extrapolation.CLAMP);
|
|
14
|
+
return { transform: [{ translateY: translateY }, { scale: scale }] };
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
var containerStyle = useAnimatedStyle(function () {
|
|
18
|
+
var calcHeight = height;
|
|
19
|
+
if (disableResistence) calcHeight = scrollY.value < 0 ? height + Math.abs(scrollY.value) : height;
|
|
20
|
+
return {
|
|
21
|
+
height: calcHeight,
|
|
22
|
+
overflow: scrollY.value < 0 ? 'visible' : 'hidden',
|
|
23
|
+
zIndex: -1
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
_jsx(Animated.View, { style: containerStyle, children:
|
|
29
|
+
_jsx(Animated.View, { style: imageStyle, children: children }) }
|
|
30
|
+
));
|
|
31
|
+
|
|
32
|
+
}
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
export function useReanimatedScroll()
|
|
1
|
+
export function useReanimatedScroll() {
|
|
2
|
+
if (!context) console.error('useReanimatedScroll its not supported for neko web');
|
|
3
|
+
return null;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export function ReanimatedScrollHandler(_ref) {var children = _ref.children;
|
|
7
|
+
return children;
|
|
8
|
+
}
|
|
@@ -1 +1,24 @@
|
|
|
1
|
-
var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/animations/ReanimatedScrollHandler.native.js";import{createContext,useContext,useMemo}
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/animations/ReanimatedScrollHandler.native.js";import { createContext, useContext, useMemo } from 'react';
|
|
2
|
+
import { useSharedValue, useAnimatedScrollHandler } from 'react-native-reanimated';import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
var ReanimatedScrollContext = createContext(null);
|
|
5
|
+
|
|
6
|
+
export function useReanimatedScroll() {
|
|
7
|
+
var context = useContext(ReanimatedScrollContext);
|
|
8
|
+
if (!context) throw new Error('useReanimatedScroll must be used within ReanimatedScrollHandler');
|
|
9
|
+
return context;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function ReanimatedScrollHandler(_ref) {var children = _ref.children;
|
|
13
|
+
var scrollY = useSharedValue(0);
|
|
14
|
+
|
|
15
|
+
var scrollHandler = useAnimatedScrollHandler({
|
|
16
|
+
onScroll: function onScroll(event) {
|
|
17
|
+
scrollY.value = event.contentOffset.y;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
var value = useMemo(function () {return { scrollY: scrollY, scrollHandler: scrollHandler };}, []);
|
|
22
|
+
|
|
23
|
+
return _jsx(ReanimatedScrollContext.Provider, { value: value, children: children });
|
|
24
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ReanimatedScrollHandler,useReanimatedScroll}from"./ReanimatedScrollHandler.native";
|
|
1
|
+
export { ReanimatedScrollHandler, useReanimatedScroll } from "./ReanimatedScrollHandler.native";
|
|
@@ -1 +1,40 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/animations/ReanimatedView.js";var _excluded = ["children"];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 { AbsAnimatedView } from "../../abstractions/AnimatedView";
|
|
4
|
+
import { useBackgroundModifier } from "../../modifiers/background";
|
|
5
|
+
import { useBorderModifier } from "../../modifiers/border";
|
|
6
|
+
import { useDisplayModifier } from "../../modifiers/display";
|
|
7
|
+
import { useFlexModifier } from "../../modifiers/flex";
|
|
8
|
+
import { useFlexWrapperModifier } from "../../modifiers/flexWrapper";
|
|
9
|
+
import { useMarginModifier } from "../../modifiers/margin";
|
|
10
|
+
import { useOverflowModifier } from "../../modifiers/overflow";
|
|
11
|
+
import { usePaddingModifier } from "../../modifiers/padding";
|
|
12
|
+
import { usePositionModifier } from "../../modifiers/position";
|
|
13
|
+
import { useShadowModifier } from "../../modifiers/shadow";
|
|
14
|
+
import { useSizeModifier } from "../../modifiers/size";
|
|
15
|
+
import { useStateModifier } from "../../modifiers/state";
|
|
16
|
+
import { useThemeComponentModifier } from "../../modifiers/themeComponent";import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
|
|
18
|
+
export function ReanimatedView(_ref) {var children = _ref.children,rootProps = _objectWithoutProperties(_ref, _excluded);
|
|
19
|
+
var _pipe = pipe(
|
|
20
|
+
useThemeComponentModifier('ReanimatedView'),
|
|
21
|
+
useFlexWrapperModifier,
|
|
22
|
+
useDisplayModifier,
|
|
23
|
+
useStateModifier,
|
|
24
|
+
useSizeModifier,
|
|
25
|
+
usePositionModifier,
|
|
26
|
+
useOverflowModifier,
|
|
27
|
+
usePaddingModifier,
|
|
28
|
+
useMarginModifier,
|
|
29
|
+
useFlexModifier,
|
|
30
|
+
useBackgroundModifier,
|
|
31
|
+
useBorderModifier,
|
|
32
|
+
useShadowModifier
|
|
33
|
+
)([{}, rootProps]),_pipe2 = _slicedToArray(_pipe, 2);_objectDestructuringEmpty(_pipe2[0]);var props = _pipe2[1];
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
_jsx(AbsAnimatedView, Object.assign({ className: "neko-reanimated-view" }, props, { children:
|
|
37
|
+
children })
|
|
38
|
+
));
|
|
39
|
+
|
|
40
|
+
}
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
export*from"./AnimatedView";
|
|
1
|
+
export * from "./AnimatedView";
|
|
2
|
+
export * from "./DraggableSlideView";
|
|
3
|
+
export * from "./ReanimatedScrollHandler";
|
|
4
|
+
export * from "./AnimatedTopBar";
|
|
5
|
+
export * from "./ParallaxHeader";
|
|
@@ -1 +1,67 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/calendar/CalendarNav.js";var _excluded = ["value", "onChange", "level"];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/Icon";
|
|
2
|
+
import { Link } from "../actions/Link";
|
|
3
|
+
import { Text } from "../text/Text";
|
|
4
|
+
import { View } from "../structure/View";import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
export function CalendarNav(_ref) {var value = _ref.value,onChange = _ref.onChange,level = _ref.level,props = _objectWithoutProperties(_ref, _excluded);
|
|
7
|
+
var prevMonth = function prevMonth() {return onChange(function (m) {return m.subtract(1, 'month');});};
|
|
8
|
+
var nextMonth = function nextMonth() {return onChange(function (m) {return m.add(1, 'month');});};
|
|
9
|
+
|
|
10
|
+
var prevYear = function prevYear() {return onChange(function (m) {return m.subtract(1, 'year');});};
|
|
11
|
+
var nextYear = function nextYear() {return onChange(function (m) {return m.add(1, 'year');});};
|
|
12
|
+
|
|
13
|
+
var prevDecade = function prevDecade() {return onChange(function (m) {return m.subtract(10, 'year');});};
|
|
14
|
+
var nextDecade = function nextDecade() {return onChange(function (m) {return m.add(10, 'year');});};
|
|
15
|
+
|
|
16
|
+
var showMonth = level !== 'year';
|
|
17
|
+
|
|
18
|
+
if (level === 'decade') {
|
|
19
|
+
var year = value.year();
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
_jsxs(View, Object.assign({ className: "neko-calendar-nav", row: true, centerV: true, gap: "xxs", height: 30 }, props, { children: [
|
|
23
|
+
_jsx(Link, { onPress: prevDecade, "aria-label": "Previous decade", padding: "xxs", paddingL: 0, children:
|
|
24
|
+
_jsx(Icon, { name: "arrow-left-double-line" }) }
|
|
25
|
+
),
|
|
26
|
+
|
|
27
|
+
_jsxs(Text, { center: true, flex: true, children: [
|
|
28
|
+
year, "-", year + 9] }
|
|
29
|
+
),
|
|
30
|
+
|
|
31
|
+
_jsx(Link, { onPress: nextDecade, "aria-label": "Next decade", padding: "xxs", paddingR: 0, children:
|
|
32
|
+
_jsx(Icon, { name: "arrow-right-double-line" }) }
|
|
33
|
+
)] })
|
|
34
|
+
));
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
_jsxs(View, Object.assign({ className: "neko-calendar-nav", row: true, centerV: true, gap: "xxs", height: 30 }, props, { children: [
|
|
40
|
+
_jsx(Link, { onPress: prevYear, "aria-label": "Previous year", padding: "xxs", paddingL: 0, children:
|
|
41
|
+
_jsx(Icon, { name: "arrow-left-double-line" }) }
|
|
42
|
+
),
|
|
43
|
+
|
|
44
|
+
showMonth &&
|
|
45
|
+
_jsx(Link, { onPress: prevMonth, "aria-label": "Previous month", padding: "xxs", children:
|
|
46
|
+
_jsx(Icon, { name: "arrow-left-s-line" }) }
|
|
47
|
+
),
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
_jsxs(View, { center: true, flex: true, gap: "xxs", row: true, children: [
|
|
51
|
+
showMonth && _jsx(Text, { center: true, children: value.format == null ? void 0 : value.format('MMM') }),
|
|
52
|
+
|
|
53
|
+
_jsx(Text, { center: true, children: value.format == null ? void 0 : value.format('YYYY') })] }
|
|
54
|
+
),
|
|
55
|
+
|
|
56
|
+
showMonth &&
|
|
57
|
+
_jsx(Link, { onPress: nextMonth, "aria-label": "Next month", padding: "xxs", children:
|
|
58
|
+
_jsx(Icon, { name: "arrow-right-s-line" }) }
|
|
59
|
+
),
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
_jsx(Link, { onPress: nextYear, "aria-label": "Next year", padding: "xxs", paddingR: 0, children:
|
|
63
|
+
_jsx(Icon, { name: "arrow-right-double-line" }) }
|
|
64
|
+
)] })
|
|
65
|
+
));
|
|
66
|
+
|
|
67
|
+
}
|
|
@@ -1 +1,18 @@
|
|
|
1
|
-
var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/calendar/WeekDaysBar.js";import{Text}from"../text/Text";
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/calendar/WeekDaysBar.js";import { Text } from "../text/Text";
|
|
2
|
+
import { View } from "../structure/View";import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
var weekdayLabels = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
5
|
+
|
|
6
|
+
export function WeekDaysBar() {var _this = this;
|
|
7
|
+
return (
|
|
8
|
+
_jsx(View, { className: "neko-week-days-bar", row: true, center: true, gap: "sm", children:
|
|
9
|
+
weekdayLabels.map(function (w) {return (
|
|
10
|
+
_jsx(View, { flex: true, height: 30, center: true, children:
|
|
11
|
+
_jsx(Text, { center: true, sm: true, text4: true, children:
|
|
12
|
+
w }
|
|
13
|
+
) }, w
|
|
14
|
+
));}
|
|
15
|
+
) }
|
|
16
|
+
));
|
|
17
|
+
|
|
18
|
+
}
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
import dayjs from
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
export function useCalendarDays(currentMonth) {
|
|
5
|
+
return React.useMemo(function () {var _currentMonth;
|
|
6
|
+
if (!((_currentMonth = currentMonth) != null && _currentMonth.isValid != null && _currentMonth.isValid())) currentMonth = dayjs();
|
|
7
|
+
var startWeekday = currentMonth.startOf('month').day();
|
|
8
|
+
var daysInMonth = currentMonth.daysInMonth();
|
|
9
|
+
|
|
10
|
+
var blanks = Array.from({ length: startWeekday }, function () {return null;});
|
|
11
|
+
var days = Array.from({ length: daysInMonth }, function (_, i) {return i + 1;});
|
|
12
|
+
var cells = [].concat(blanks, days);
|
|
13
|
+
|
|
14
|
+
return { cells: cells };
|
|
15
|
+
}, [currentMonth.month(), currentMonth.year()]);
|
|
16
|
+
}
|
|
@@ -1 +1,24 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { is } from 'ramda';
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
|
+
|
|
4
|
+
export function isDateDisabled(date) {var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},min = _ref.min,max = _ref.max,onCheckDisabled = _ref.onCheckDisabled;
|
|
5
|
+
var dateVal = !!date && dayjs(date);
|
|
6
|
+
if (!dateVal || !dateVal.isValid()) return true;
|
|
7
|
+
if (!!min && dateVal.isBefore(min)) return true;
|
|
8
|
+
if (!!max && dateVal.isAfter(max)) return true;
|
|
9
|
+
return (onCheckDisabled == null ? void 0 : onCheckDisabled(dateVal)) || false;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function isValidDate(v, format) {var validations = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
13
|
+
if (v === null || v === '') return true;
|
|
14
|
+
|
|
15
|
+
var dateVal = dayjs(v);
|
|
16
|
+
|
|
17
|
+
if (is(String, v)) {
|
|
18
|
+
if (v.length !== format.length) return false;
|
|
19
|
+
dateVal = dayjs(v, format, true);
|
|
20
|
+
if (!dateVal.isValid()) return false;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return !isDateDisabled(v, validations);
|
|
24
|
+
}
|
|
@@ -1 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/feedback/alerter.js";var _excluded = ["width", "closeLabel", "hideClose"];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 { is } from 'ramda';
|
|
2
|
+
|
|
3
|
+
import { Button } from "../actions";
|
|
4
|
+
import { Result } from "../presentation";
|
|
5
|
+
import { useModalOpener } from "../modals/modal";import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
export function useAlerter() {var _this = this;
|
|
8
|
+
var _useModalOpener = useModalOpener(),open = _useModalOpener.open;
|
|
9
|
+
|
|
10
|
+
var alert = function alert(data, type) {
|
|
11
|
+
if (is(String, data)) data = { title: data };
|
|
12
|
+
var _ref = data || {},width = _ref.width,closeLabel = _ref.closeLabel,hideClose = _ref.hideClose,resultProps = _objectWithoutProperties(_ref, _excluded);
|
|
13
|
+
|
|
14
|
+
open(function (_ref2) {var onClose = _ref2.onClose;return {
|
|
15
|
+
content: _jsx(Result, Object.assign({}, resultProps, { type: type, padding: 0, paddingT: "lg", paddingB: "sm" })),
|
|
16
|
+
footer: !hideClose &&
|
|
17
|
+
_jsx(Button, { sm: true, label: closeLabel || 'Close', outline: true, color: "text_op40", onPress: onClose, fullW: true }),
|
|
18
|
+
|
|
19
|
+
footerProps: { borderT: false, paddingV: 'md' },
|
|
20
|
+
width: width || 350
|
|
21
|
+
};});
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return {
|
|
25
|
+
alert: alert,
|
|
26
|
+
info: function info(data) {return alert(data, 'info');},
|
|
27
|
+
error: function error(data) {return alert(data, 'error');},
|
|
28
|
+
warning: function warning(data) {return alert(data, 'warning');},
|
|
29
|
+
success: function success(data) {return alert(data, 'success');}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -1 +1,70 @@
|
|
|
1
|
-
|
|
1
|
+
var _excluded = ["width", "cancelLabel", "confirmLabel", "onConfirm"];var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/feedback/confirmer.js";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 _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 { is } from 'ramda';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { Button } from "../actions";
|
|
5
|
+
import { RESULT_TYPES } from "../presentation/Result";
|
|
6
|
+
import { Result } from "../presentation";
|
|
7
|
+
import { View } from "../structure/View";
|
|
8
|
+
import { useModalOpener } from "../modals/modal";import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
|
|
10
|
+
function Footer(_ref) {var _RESULT_TYPES$type;var cancelLabel = _ref.cancelLabel,confirmLabel = _ref.confirmLabel,onConfirm = _ref.onConfirm,type = _ref.type,onClose = _ref.onClose;
|
|
11
|
+
var _React$useState = React.useState(false),_React$useState2 = _slicedToArray(_React$useState, 2),loading = _React$useState2[0],setLoading = _React$useState2[1];
|
|
12
|
+
var color = ((_RESULT_TYPES$type = RESULT_TYPES[type]) == null ? void 0 : _RESULT_TYPES$type.color) || 'primary';
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
_jsxs(View, { row: true, gap: "xs", centerV: true, children: [
|
|
16
|
+
_jsx(Button, { sm: true, label: cancelLabel || 'Cancel', outline: true, color: "text_op40", onPress: onClose, flex: true, disabled: loading }),
|
|
17
|
+
_jsx(Button, {
|
|
18
|
+
disabled: loading,
|
|
19
|
+
loading: loading,
|
|
20
|
+
sm: true,
|
|
21
|
+
label: confirmLabel || 'Confirm',
|
|
22
|
+
color: color,
|
|
23
|
+
onPress: function onPress() {
|
|
24
|
+
setLoading(true);
|
|
25
|
+
Promise.resolve(onConfirm == null ? void 0 : onConfirm()).
|
|
26
|
+
then(function (result) {
|
|
27
|
+
if (result !== false) {
|
|
28
|
+
onClose();
|
|
29
|
+
}
|
|
30
|
+
}).
|
|
31
|
+
finally(function () {
|
|
32
|
+
setLoading(false);
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
flex: true }
|
|
36
|
+
)] }
|
|
37
|
+
));
|
|
38
|
+
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function useConfirmer() {var _this = this;
|
|
42
|
+
var _useModalOpener = useModalOpener(),open = _useModalOpener.open;
|
|
43
|
+
|
|
44
|
+
var confirm = function confirm(data, type) {
|
|
45
|
+
var _ref2 = data || {},width = _ref2.width,cancelLabel = _ref2.cancelLabel,confirmLabel = _ref2.confirmLabel,onConfirm = _ref2.onConfirm,resultProps = _objectWithoutProperties(_ref2, _excluded);
|
|
46
|
+
|
|
47
|
+
open(function (_ref3) {var onClose = _ref3.onClose;return {
|
|
48
|
+
content: _jsx(Result, Object.assign({}, resultProps, { type: type, padding: 0, paddingT: "lg", paddingB: "sm" })),
|
|
49
|
+
footer:
|
|
50
|
+
_jsx(Footer, {
|
|
51
|
+
cancelLabel: cancelLabel,
|
|
52
|
+
confirmLabel: confirmLabel,
|
|
53
|
+
onConfirm: onConfirm,
|
|
54
|
+
type: type,
|
|
55
|
+
onClose: onClose }
|
|
56
|
+
),
|
|
57
|
+
|
|
58
|
+
footerProps: { borderT: false, paddingV: 'md' },
|
|
59
|
+
width: width || 350
|
|
60
|
+
};});
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return {
|
|
64
|
+
confirm: confirm,
|
|
65
|
+
info: function info(data) {return confirm(data, 'info');},
|
|
66
|
+
error: function error(data) {return confirm(data, 'error');},
|
|
67
|
+
warning: function warning(data) {return confirm(data, 'warning');},
|
|
68
|
+
success: function success(data) {return confirm(data, 'success');}
|
|
69
|
+
};
|
|
70
|
+
}
|