@neko-os/ui 0.2.2 → 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/README.md +0 -76
- 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 +17 -4
- package/src/components/actions/Button.js +5 -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 +14 -2
- 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/fullColor.js +2 -2
- 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
- package/src/theme/format/colorsVariations.js +1 -1
- package/src/theme/helpers/colorScale.js +2 -1
|
@@ -1 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/text/DateText.js";var _excluded = ["format", "fromNow", "withFromNow", "value", "children"];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
|
+
import dayjs from 'dayjs';
|
|
3
|
+
import relativeTime from 'dayjs/esm/plugin/relativeTime';
|
|
4
|
+
|
|
5
|
+
import { Text } from "../text";import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
dayjs.extend(relativeTime);
|
|
8
|
+
|
|
9
|
+
export function DateText(_ref) {var _ref$format = _ref.format,format = _ref$format === void 0 ? 'DD MMM YYYY' : _ref$format,fromNow = _ref.fromNow,withFromNow = _ref.withFromNow,value = _ref.value,children = _ref.children,props = _objectWithoutProperties(_ref, _excluded);
|
|
10
|
+
value = is(String, children) ? children : value;
|
|
11
|
+
if (!value) return false;
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
var date = dayjs(value);
|
|
15
|
+
var formattedValue = fromNow ? date.fromNow() : date.format(format);
|
|
16
|
+
var suffix = withFromNow ? ` (${date.fromNow()})` : '';
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
_jsxs(Text, Object.assign({}, props, { children: [
|
|
20
|
+
formattedValue,
|
|
21
|
+
suffix] })
|
|
22
|
+
));
|
|
23
|
+
|
|
24
|
+
}
|
|
@@ -1 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/text/Text.js";var _excluded = ["children", "label"];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 { AbsText } from "../../abstractions/Text";
|
|
4
|
+
import { useAnimationModifier } from "../../modifiers/animation";
|
|
5
|
+
import { useColorConverter } from "../../modifiers/colorConverter";
|
|
6
|
+
import { useDisplayModifier } from "../../modifiers/display";
|
|
7
|
+
import { useFlexModifier } from "../../modifiers/flex";
|
|
8
|
+
import { useMarginModifier } from "../../modifiers/margin";
|
|
9
|
+
import { usePaddingModifier } from "../../modifiers/padding";
|
|
10
|
+
import { useSizeModifier } from "../../modifiers/size";
|
|
11
|
+
import { useTextConverter } from "../../modifiers/textConverter";
|
|
12
|
+
import { useTextModifier } from "../../modifiers/text";
|
|
13
|
+
import { useThemeComponentModifier } from "../../modifiers/themeComponent";import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
|
|
15
|
+
export function Text(_ref) {var children = _ref.children,label = _ref.label,rootProps = _objectWithoutProperties(_ref, _excluded);
|
|
16
|
+
var _pipe = pipe(
|
|
17
|
+
useColorConverter('text'),
|
|
18
|
+
useTextConverter('p'),
|
|
19
|
+
useThemeComponentModifier('Text'),
|
|
20
|
+
useAnimationModifier,
|
|
21
|
+
useDisplayModifier,
|
|
22
|
+
useSizeModifier,
|
|
23
|
+
usePaddingModifier,
|
|
24
|
+
useMarginModifier,
|
|
25
|
+
useFlexModifier,
|
|
26
|
+
useTextModifier
|
|
27
|
+
)([{}, rootProps]),_pipe2 = _slicedToArray(_pipe, 2),_ = _pipe2[0],props = _pipe2[1];
|
|
28
|
+
|
|
29
|
+
return _jsx(AbsText, Object.assign({}, props, { children: children || label }));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export var Title = Text;
|
|
@@ -1 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/text/VerticalText.js";var _excluded = ["children", "label", "invert"],_excluded2 = ["style"];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 { AbsText } from "../../abstractions/Text";
|
|
4
|
+
import { VerticalView } from "../helpers/VerticalView";
|
|
5
|
+
import { useColorConverter } from "../../modifiers/colorConverter";
|
|
6
|
+
import { useTextConverter } from "../../modifiers/textConverter";
|
|
7
|
+
import { useTextModifier } from "../../modifiers/text";
|
|
8
|
+
import { useThemeComponentModifier } from "../../modifiers/themeComponent";import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
|
|
10
|
+
export function VerticalText(_ref) {var children = _ref.children,label = _ref.label,invert = _ref.invert,rootProps = _objectWithoutProperties(_ref, _excluded);
|
|
11
|
+
var _pipe = pipe(
|
|
12
|
+
useColorConverter('text'),
|
|
13
|
+
useTextConverter('p'),
|
|
14
|
+
useThemeComponentModifier('VerticalText'),
|
|
15
|
+
useTextModifier
|
|
16
|
+
)([{}, rootProps]),_pipe2 = _slicedToArray(_pipe, 2),_ = _pipe2[0],_pipe2$ = _pipe2[1],style = _pipe2$.style,props = _objectWithoutProperties(_pipe2$, _excluded2);
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
_jsx(VerticalView, Object.assign({ invert: invert }, props, { children:
|
|
20
|
+
_jsx(AbsText, {
|
|
21
|
+
style: Object.assign({},
|
|
22
|
+
style), children:
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
children || label }
|
|
26
|
+
) })
|
|
27
|
+
));
|
|
28
|
+
|
|
29
|
+
}
|
|
@@ -1 +1,48 @@
|
|
|
1
|
-
var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/theme/ThemePicker.js";import
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/theme/ThemePicker.js";import { mapObjIndexed, mergeDeepRight, values, pipe, filter } from 'ramda';
|
|
2
|
+
|
|
3
|
+
import { DEFAULT_THEMES, useThemeHandler } from "../../theme";
|
|
4
|
+
import { IconLabel } from "../presentation";
|
|
5
|
+
import { Link } from "../actions";
|
|
6
|
+
import { Picker } from "../inputs";
|
|
7
|
+
import { ThemeThumb } from "./ThemeThumb";import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
|
|
9
|
+
export function ThemePicker(_ref) {var _this = this;var _onChange = _ref.onChange,onlyKeys = _ref.onlyKeys,hideKeys = _ref.hideKeys;
|
|
10
|
+
var _useThemeHandler = useThemeHandler(),activeThemeKey = _useThemeHandler.activeThemeKey,themes = _useThemeHandler.themes,onChangeTheme = _useThemeHandler.onChangeTheme;
|
|
11
|
+
|
|
12
|
+
var options = pipe(
|
|
13
|
+
mergeDeepRight(DEFAULT_THEMES),
|
|
14
|
+
mapObjIndexed(function (obj, key) {return Object.assign({}, obj, { value: key, key: key });}),
|
|
15
|
+
values,
|
|
16
|
+
filter(function (item) {
|
|
17
|
+
if (item.value === '_all') return false;
|
|
18
|
+
if (onlyKeys && onlyKeys.includes(item.value)) return true;
|
|
19
|
+
if (hideKeys && hideKeys.includes(item.value)) return false;
|
|
20
|
+
return true;
|
|
21
|
+
})
|
|
22
|
+
)(themes);
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
_jsx(Picker, {
|
|
26
|
+
colSpan: 12,
|
|
27
|
+
gap: "lg",
|
|
28
|
+
value: activeThemeKey,
|
|
29
|
+
onChange: function onChange(key) {
|
|
30
|
+
onChangeTheme == null ? void 0 : onChangeTheme(key);
|
|
31
|
+
_onChange == null ? void 0 : _onChange(key);
|
|
32
|
+
},
|
|
33
|
+
options: options,
|
|
34
|
+
renderOption: function renderOption(_ref2) {var option = _ref2.option,selected = _ref2.selected,onChange = _ref2.onChange;return (
|
|
35
|
+
_jsxs(Link, { onPress: onChange, gap: "xs", children: [
|
|
36
|
+
_jsx(ThemeThumb, { value: option.value }),
|
|
37
|
+
_jsx(IconLabel, {
|
|
38
|
+
center: true,
|
|
39
|
+
label: option.label,
|
|
40
|
+
icon: selected && 'checkbox-circle-fill',
|
|
41
|
+
color: selected ? 'primary' : 'text3',
|
|
42
|
+
strong: true }
|
|
43
|
+
)] }
|
|
44
|
+
));} }
|
|
45
|
+
|
|
46
|
+
));
|
|
47
|
+
|
|
48
|
+
}
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/theme/ThemePickerDrawer.js";import{BottomDrawer,DrawerScrollView}from"../modals/bottomDrawer";
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/theme/ThemePickerDrawer.js";import { BottomDrawer, DrawerScrollView } from "../modals/bottomDrawer";
|
|
2
|
+
import { ThemePicker } from "./ThemePicker";import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
export function ThemePickerDrawer(_ref) {var open = _ref.open,onClose = _ref.onClose,onChange = _ref.onChange;
|
|
5
|
+
return (
|
|
6
|
+
_jsx(BottomDrawer, { open: open, onClose: onClose, maxWidth: 550, snapPoints: ['50%', '85%'], children:
|
|
7
|
+
_jsx(DrawerScrollView, { padding: "md", children:
|
|
8
|
+
_jsx(ThemePicker, { onChange: onChange }) }
|
|
9
|
+
) }
|
|
10
|
+
));
|
|
11
|
+
|
|
12
|
+
}
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/theme/ThemeStatusBar.native.js";import{StatusBar}from"react-native-web";
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/theme/ThemeStatusBar.native.js";import { StatusBar } from "react-native-web";
|
|
2
|
+
|
|
3
|
+
import { useTheme } from "../../theme";import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
export function ThemeStatusBar(props) {
|
|
6
|
+
var _useTheme = useTheme(),isDark = _useTheme.isDark;
|
|
7
|
+
|
|
8
|
+
return _jsx(StatusBar, Object.assign({}, props, { style: isDark ? 'dark' : 'light' }));
|
|
9
|
+
}
|
|
@@ -1 +1,98 @@
|
|
|
1
|
-
var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/theme/ThemeThumb.js";import
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/theme/ThemeThumb.js";import { View } from "../structure";
|
|
2
|
+
import { useFormattedTheme } from "../../theme/format/formatTheme";
|
|
3
|
+
import { useResponsiveValue } from "../../responsive";
|
|
4
|
+
import { useThemeHandler } from "../../theme";import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
export function ThemeThumb(_ref) {var value = _ref.value;
|
|
7
|
+
var _useThemeHandler = useThemeHandler(),themes = _useThemeHandler.themes;
|
|
8
|
+
var _useFormattedTheme = useFormattedTheme(themes, value),colors = _useFormattedTheme.colors,label = _useFormattedTheme.label;
|
|
9
|
+
var isMobile = useResponsiveValue({ smd: true, df: false });
|
|
10
|
+
|
|
11
|
+
if (isMobile) {
|
|
12
|
+
return (
|
|
13
|
+
_jsx(View, { centerH: true, children:
|
|
14
|
+
_jsxs(View, {
|
|
15
|
+
bg: colors.mainBG,
|
|
16
|
+
height: 175,
|
|
17
|
+
fullW: true,
|
|
18
|
+
br: "md",
|
|
19
|
+
hiddenOverflow: true,
|
|
20
|
+
border: 2,
|
|
21
|
+
brColor: colors.divider,
|
|
22
|
+
maxWidth: 100, children: [
|
|
23
|
+
|
|
24
|
+
_jsxs(View, { bg: colors.overlayBG, height: 25, padding: 8, row: true, borderB: true, brColor: colors.divider, children: [
|
|
25
|
+
_jsx(View, { width: 25, fullH: true, bg: colors.primary, br: "xxs" }),
|
|
26
|
+
_jsx(View, { flex: true }),
|
|
27
|
+
_jsx(View, { ratio: 1, fullH: true, bg: colors.divider, round: true })] }
|
|
28
|
+
),
|
|
29
|
+
|
|
30
|
+
_jsx(View, { flex: true, padding: 6, children:
|
|
31
|
+
_jsxs(View, { br: "md", bg: colors.overlayBG, flex: true, gap: 8, padding: 8, border: true, brColor: colors.divider, children: [
|
|
32
|
+
_jsx(View, { bg: colors.text2, height: 4, br: "xxs" }),
|
|
33
|
+
_jsx(View, { bg: colors.text4, height: 2, br: "xxs" }),
|
|
34
|
+
_jsx(View, { bg: colors.text4, height: 2, br: "xxs" }),
|
|
35
|
+
_jsx(View, { bg: colors.text4, height: 2, br: "xxs" }),
|
|
36
|
+
_jsx(View, { bg: colors.text4, height: 2, br: "xxs" }),
|
|
37
|
+
_jsx(View, { bg: colors.text4, height: 2, br: "xxs" }),
|
|
38
|
+
|
|
39
|
+
_jsx(View, { flex: true }),
|
|
40
|
+
|
|
41
|
+
_jsx(View, { height: 6, fullW: true, bg: colors.primary, br: "xxs" })] }
|
|
42
|
+
) }
|
|
43
|
+
),
|
|
44
|
+
|
|
45
|
+
_jsxs(View, {
|
|
46
|
+
bg: colors.overlayBG,
|
|
47
|
+
height: 25,
|
|
48
|
+
padding: 8,
|
|
49
|
+
row: true,
|
|
50
|
+
borderT: true,
|
|
51
|
+
brColor: colors.divider,
|
|
52
|
+
justify: "space-around",
|
|
53
|
+
centerV: true, children: [
|
|
54
|
+
|
|
55
|
+
_jsx(View, { ratio: 1, fullH: true, bg: colors.divider, round: true }),
|
|
56
|
+
_jsx(View, { ratio: 1, fullH: true, bg: colors.divider, round: true }),
|
|
57
|
+
_jsx(View, { ratio: 1, fullH: true, bg: colors.divider, round: true }),
|
|
58
|
+
_jsx(View, { ratio: 1, fullH: true, bg: colors.divider, round: true }),
|
|
59
|
+
_jsx(View, { ratio: 1, fullH: true, bg: colors.divider, round: true })] }
|
|
60
|
+
)] }
|
|
61
|
+
) }
|
|
62
|
+
));
|
|
63
|
+
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
_jsxs(View, { bg: colors.mainBG, height: 175, fullW: true, br: "md", hiddenOverflow: true, border: 2, brColor: colors.divider, children: [
|
|
68
|
+
_jsxs(View, { bg: colors.overlayBG, height: 25, paddingV: 8, paddingH: 12, row: true, borderB: true, brColor: colors.divider, children: [
|
|
69
|
+
_jsx(View, { width: 25, bg: colors.primary, br: "xxs" }),
|
|
70
|
+
_jsx(View, { flex: true }),
|
|
71
|
+
_jsx(View, { ratio: 1, fullH: true, bg: colors.text4, round: true })] }
|
|
72
|
+
),
|
|
73
|
+
|
|
74
|
+
_jsxs(View, { row: true, padding: 12, paddingT: 8, gap: 6, flex: true, children: [
|
|
75
|
+
_jsxs(View, { br: "xs", bg: colors.overlayBG, flex: true, gap: 6, padding: 7, border: true, brColor: colors.divider, children: [
|
|
76
|
+
_jsx(View, { bg: colors.text4, height: 2, br: "xxs" }),
|
|
77
|
+
_jsx(View, { bg: colors.text4, height: 2, br: "xxs" }),
|
|
78
|
+
_jsx(View, { bg: colors.text4, height: 2, br: "xxs" }),
|
|
79
|
+
_jsx(View, { bg: colors.text4, height: 2, br: "xxs" }),
|
|
80
|
+
_jsx(View, { bg: colors.text4, height: 2, br: "xxs" })] }
|
|
81
|
+
),
|
|
82
|
+
_jsxs(View, { br: "xs", bg: colors.overlayBG, flex: 4, gap: 8, padding: 7, border: true, brColor: colors.divider, children: [
|
|
83
|
+
_jsx(View, { bg: colors.text2, height: 4, br: "xxs", width: 30 }),
|
|
84
|
+
_jsx(View, { bg: colors.text4, height: 2, br: "xxs", width: '80%' }),
|
|
85
|
+
_jsx(View, { bg: colors.text4, height: 2, br: "xxs", width: '80%' }),
|
|
86
|
+
_jsx(View, { bg: colors.text4, height: 2, br: "xxs", width: '80%' }),
|
|
87
|
+
_jsx(View, { bg: colors.text4, height: 2, br: "xxs", width: '80%' }),
|
|
88
|
+
_jsx(View, { bg: colors.text4, height: 2, br: "xxs", width: '80%' }),
|
|
89
|
+
_jsx(View, { flex: true }),
|
|
90
|
+
_jsxs(View, { row: true, toRight: true, gap: 6, children: [
|
|
91
|
+
_jsx(View, { width: 25, height: 8, bg: colors.text4, br: "xxs" }),
|
|
92
|
+
_jsx(View, { width: 25, height: 8, bg: colors.primary, br: "xxs" })] }
|
|
93
|
+
)] }
|
|
94
|
+
)] }
|
|
95
|
+
)] }
|
|
96
|
+
));
|
|
97
|
+
|
|
98
|
+
}
|
package/dist/helpers/debounce.js
CHANGED
|
@@ -1 +1,9 @@
|
|
|
1
|
-
export function debounce(action){var _this=this;var time=arguments.length>1&&arguments[1]!==undefined?arguments[1]:550;
|
|
1
|
+
export function debounce(action) {var _this = this;var time = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 550;
|
|
2
|
+
var timer;
|
|
3
|
+
return function () {for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {params[_key] = arguments[_key];}
|
|
4
|
+
clearTimeout(timer);
|
|
5
|
+
timer = setTimeout(function () {
|
|
6
|
+
action.apply(_this, params);
|
|
7
|
+
}, time);
|
|
8
|
+
};
|
|
9
|
+
}
|
package/dist/helpers/index.js
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
|
-
export*from"./debounce";
|
|
1
|
+
export * from "./debounce";
|
|
2
|
+
export * from "./string";
|
|
3
|
+
export * from "./random";
|
|
4
|
+
export * from "./storage";
|
|
5
|
+
export * from "./../abstractions/helpers/useSafeAreaInsets";
|
package/dist/helpers/options.js
CHANGED
|
@@ -1 +1,65 @@
|
|
|
1
|
-
|
|
1
|
+
function _toConsumableArray(r) {return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();}function _nonIterableSpread() {throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArray(r) {if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);}function _arrayWithoutHoles(r) {if (Array.isArray(r)) return _arrayLikeToArray(r);}function _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, propEq } from 'ramda';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
function formatOptions(options) {
|
|
5
|
+
if (!(options != null && options.length)) return options;
|
|
6
|
+
return options.map(function (option) {
|
|
7
|
+
if (is(String, option) || is(Number, option)) {
|
|
8
|
+
return { label: option, value: option };
|
|
9
|
+
}
|
|
10
|
+
return option;
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function useOptions(optionsOrFetch) {var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},limit = _ref.limit;
|
|
15
|
+
var isLazy = !is(Array, optionsOrFetch);
|
|
16
|
+
var _React$useState = React.useState(isLazy),_React$useState2 = _slicedToArray(_React$useState, 2),loading = _React$useState2[0],setLoading = _React$useState2[1];
|
|
17
|
+
var _React$useState3 = React.useState([]),_React$useState4 = _slicedToArray(_React$useState3, 2),options = _React$useState4[0],setOptions = _React$useState4[1];
|
|
18
|
+
var _React$useState5 = React.useState(1),_React$useState6 = _slicedToArray(_React$useState5, 2),page = _React$useState6[0],setPage = _React$useState6[1];
|
|
19
|
+
var _React$useState7 = React.useState(!isLazy),_React$useState8 = _slicedToArray(_React$useState7, 2),done = _React$useState8[0],setDone = _React$useState8[1];
|
|
20
|
+
|
|
21
|
+
var isFirstLoad = page === 1 && !(options != null && options.length) && loading;
|
|
22
|
+
var isRefetching = page === 1 && !!options.length && loading;
|
|
23
|
+
var isFetchingMore = page > 1 && !!options.length && loading;
|
|
24
|
+
|
|
25
|
+
var handleGetOptions = function handleGetOptions() {var page = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
26
|
+
setDone(false);
|
|
27
|
+
setPage(page);
|
|
28
|
+
setLoading(true);
|
|
29
|
+
optionsOrFetch(optionsOrFetch, page).
|
|
30
|
+
then(function (result) {
|
|
31
|
+
if ((result == null ? void 0 : result.length) < limit) setDone(true);
|
|
32
|
+
var newOptions = [];
|
|
33
|
+
if (page > 1) newOptions = options;
|
|
34
|
+
setOptions([].concat(_toConsumableArray(newOptions), _toConsumableArray(result)));
|
|
35
|
+
}).
|
|
36
|
+
finally(function () {return setLoading(false);});
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
var fetchMore = function fetchMore() {
|
|
40
|
+
var newPage = (page || 1) + 1;
|
|
41
|
+
handleGetOptions(newPage);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
React.useEffect(function () {
|
|
45
|
+
if (isLazy) handleGetOptions();
|
|
46
|
+
}, [limit]);
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
options: formatOptions(isLazy ? options : optionsOrFetch),
|
|
50
|
+
handleGetOptions: handleGetOptions,
|
|
51
|
+
fetchMore: fetchMore,
|
|
52
|
+
done: done,
|
|
53
|
+
page: page,
|
|
54
|
+
done: done,
|
|
55
|
+
limit: limit,
|
|
56
|
+
loading: loading,
|
|
57
|
+
isFirstLoad: isFirstLoad,
|
|
58
|
+
isRefetching: isRefetching,
|
|
59
|
+
isFetchingMore: isFetchingMore
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function findOptionByValue(options, value) {
|
|
64
|
+
return options.find(propEq('value', value));
|
|
65
|
+
}
|
package/dist/helpers/random.js
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
|
-
export function genRandonId(){var length=arguments.length>0&&arguments[0]!==undefined?arguments[0]:30;
|
|
1
|
+
export function genRandonId() {var length = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 30;
|
|
2
|
+
return Math.random().
|
|
3
|
+
toString(36).
|
|
4
|
+
substring(2, 2 + length);
|
|
5
|
+
}
|
package/dist/helpers/storage.js
CHANGED
|
@@ -1 +1,76 @@
|
|
|
1
|
-
|
|
1
|
+
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 React from 'react';
|
|
2
|
+
|
|
3
|
+
import { AbsStorage } from "../abstractions/helpers/storage";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var listeners = {};
|
|
7
|
+
|
|
8
|
+
function notify(key, value) {
|
|
9
|
+
if (listeners[key]) {
|
|
10
|
+
listeners[key].forEach(function (cb) {return cb(value);});
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function subscribe(key, cb) {
|
|
15
|
+
if (!listeners[key]) listeners[key] = [];
|
|
16
|
+
listeners[key].push(cb);
|
|
17
|
+
return function () {
|
|
18
|
+
listeners[key] = listeners[key].filter(function (fn) {return fn !== cb;});
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function set(key, value) {
|
|
23
|
+
AbsStorage.set(key, JSON.stringify(value));
|
|
24
|
+
notify(key, value);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function setAsync(key, value) {
|
|
28
|
+
return AbsStorage.setAsync(key, JSON.stringify(value)).then(function () {
|
|
29
|
+
notify(key, value);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function get(key, defaultValue) {var _formatStoragedValue;
|
|
34
|
+
var value = AbsStorage.get(key);
|
|
35
|
+
return (_formatStoragedValue = formatStoragedValue(value)) != null ? _formatStoragedValue : defaultValue;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function getAsync(key, defaultValue) {
|
|
39
|
+
return AbsStorage.getAsync(key).then(function (value) {var _formatStoragedValue2;
|
|
40
|
+
return (_formatStoragedValue2 = formatStoragedValue(value)) != null ? _formatStoragedValue2 : defaultValue;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function formatStoragedValue(value) {
|
|
45
|
+
try {
|
|
46
|
+
if (!value) return value;
|
|
47
|
+
value = JSON.parse(value);
|
|
48
|
+
if (value === 'undefined') return undefined;
|
|
49
|
+
if (value === 'null') return undefined;
|
|
50
|
+
return value;
|
|
51
|
+
} catch (e) {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function useState(key, defaultValue) {
|
|
57
|
+
var _React$useState = React.useState(function () {var _get;return (_get = get(key)) != null ? _get : defaultValue;}),_React$useState2 = _slicedToArray(_React$useState, 2),value = _React$useState2[0],setValue = _React$useState2[1];
|
|
58
|
+
|
|
59
|
+
React.useEffect(function () {
|
|
60
|
+
return subscribe(key, setValue);
|
|
61
|
+
}, [key]);
|
|
62
|
+
|
|
63
|
+
var handleChange = function handleChange(newValue) {
|
|
64
|
+
set(key, newValue);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
return [value, handleChange];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export var Storage = Object.assign({},
|
|
71
|
+
AbsStorage, {
|
|
72
|
+
set: set,
|
|
73
|
+
setAsync: setAsync,
|
|
74
|
+
get: get,
|
|
75
|
+
getAsync: getAsync,
|
|
76
|
+
useState: useState });
|
package/dist/helpers/string.js
CHANGED
|
@@ -1 +1,74 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
adjust,
|
|
3
|
+
compose,
|
|
4
|
+
defaultTo,
|
|
5
|
+
head,
|
|
6
|
+
join,
|
|
7
|
+
juxt,
|
|
8
|
+
map,
|
|
9
|
+
pipe,
|
|
10
|
+
replace,
|
|
11
|
+
split,
|
|
12
|
+
tail,
|
|
13
|
+
toLower,
|
|
14
|
+
toUpper,
|
|
15
|
+
trim } from
|
|
16
|
+
'ramda';
|
|
17
|
+
|
|
18
|
+
export var removeSpecialChars = replace(/[^a-zA-Z ,0-9]/g, '');
|
|
19
|
+
|
|
20
|
+
export var capitalize = compose(join(''), juxt([compose(toUpper, head), tail]), toLower, defaultTo(''));
|
|
21
|
+
|
|
22
|
+
export var capitalizeFirstLetter = compose(join(''), juxt([compose(toUpper, head), tail]), defaultTo(''));
|
|
23
|
+
|
|
24
|
+
export var capitalizeSentence = compose(join(' '), map(capitalize), split('. '), defaultTo(''));
|
|
25
|
+
|
|
26
|
+
export var capitalizeAll = compose(join(' '), map(capitalize), split(' '), defaultTo(''));
|
|
27
|
+
|
|
28
|
+
export var isLower = function isLower(str) {return (str || '').toLowerCase() === str;};
|
|
29
|
+
|
|
30
|
+
export var capitalizeIfLower = function capitalizeIfLower(str) {return isLower(str) ? capitalize(str) : str;};
|
|
31
|
+
|
|
32
|
+
export var capitalizeAllIfLower = function capitalizeAllIfLower(str) {return isLower(str) ? capitalizeAll(str) : str;};
|
|
33
|
+
|
|
34
|
+
export var capitalizeSentenceIfLower = function capitalizeSentenceIfLower(str) {return isLower(str) ? capitalizeSentence(str) : str;};
|
|
35
|
+
|
|
36
|
+
export var getInitials = function getInitials(str) {
|
|
37
|
+
if (!str) return '--';
|
|
38
|
+
|
|
39
|
+
if (str.includes(' ')) {
|
|
40
|
+
str = str.split(' ').map(head).join('');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return str.substring(0, 2);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export var splitWords = split(new RegExp(/[/\-_ ]/gi));
|
|
47
|
+
|
|
48
|
+
export var toKebabCase = function toKebabCase(str) {
|
|
49
|
+
return str.
|
|
50
|
+
split('').
|
|
51
|
+
map(function (letter, index) {
|
|
52
|
+
if (letter === '_') return '-';
|
|
53
|
+
if ((letter == null ? void 0 : letter.toUpperCase()) === letter) return `${index !== 0 ? '-' : ''}${letter == null ? void 0 : letter.toLowerCase()}`;
|
|
54
|
+
return letter;
|
|
55
|
+
}).
|
|
56
|
+
join('');
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export var toSnakeCase = pipe(toKebabCase, replace(/-/g, '_'));
|
|
60
|
+
|
|
61
|
+
export var toCamelCase = pipe(splitWords, map(capitalize), adjust(0, toLower), join(''));
|
|
62
|
+
|
|
63
|
+
export var truncateString = function truncateString(str, size) {
|
|
64
|
+
if (!size) return str;
|
|
65
|
+
if (!!str && str.length > size) return str.substring(0, size) + '...';
|
|
66
|
+
return str;
|
|
67
|
+
};
|
|
68
|
+
export var truncate = truncateString;
|
|
69
|
+
|
|
70
|
+
export var slugify = function slugify(text) {
|
|
71
|
+
return toSnakeCase(text);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export var normalizeString = pipe(toLower, trim, function (str) {return str.normalize('NFD').replace(/[\u0300-\u036f]/g, '');});
|