@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,41 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/state/StatePresenter.js";var _excluded = ["loading", "error", "empty", "errorTitle", "errorDescription", "emptyTitle", "emptyDescription", "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 { Loading } from "./Loading";
|
|
2
|
+
import { Result } from "../presentation";
|
|
3
|
+
import { View } from "../structure";import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
export function StatePresenter(_ref)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
{var loading = _ref.loading,error = _ref.error,empty = _ref.empty,_ref$errorTitle = _ref.errorTitle,errorTitle = _ref$errorTitle === void 0 ? 'Something went wrong' : _ref$errorTitle,errorDescription = _ref.errorDescription,_ref$emptyTitle = _ref.emptyTitle,emptyTitle = _ref$emptyTitle === void 0 ? 'No results' : _ref$emptyTitle,emptyDescription = _ref.emptyDescription,children = _ref.children,props = _objectWithoutProperties(_ref, _excluded);
|
|
16
|
+
if (loading) {
|
|
17
|
+
return (
|
|
18
|
+
_jsx(View, Object.assign({ flex: true, center: true }, props, { children:
|
|
19
|
+
_jsx(Loading, {}) })
|
|
20
|
+
));
|
|
21
|
+
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (error) {
|
|
25
|
+
return (
|
|
26
|
+
_jsx(View, Object.assign({ flex: true, center: true }, props, { children:
|
|
27
|
+
_jsx(Result, { type: "error", title: errorTitle, description: errorDescription || error.message }) })
|
|
28
|
+
));
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (empty) {
|
|
33
|
+
return (
|
|
34
|
+
_jsx(View, Object.assign({ flex: true, center: true }, props, { children:
|
|
35
|
+
_jsx(Result, { type: "empty", title: emptyTitle, description: emptyDescription }) })
|
|
36
|
+
));
|
|
37
|
+
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return children;
|
|
41
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/steps/ActiveStepContent.js";import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { useSteps } from "./StepsHandler";import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
export function ActiveStepContent() {
|
|
6
|
+
var _useSteps = useSteps(),activeStep = _useSteps.activeStep;
|
|
7
|
+
|
|
8
|
+
var Content = React.useMemo(
|
|
9
|
+
function () {return activeStep.render || activeStep.renderContent || activeStep.Content;},
|
|
10
|
+
[activeStep.renderContent, activeStep.Content]
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
if (!Content) return false;
|
|
14
|
+
|
|
15
|
+
return _jsx(Content, {});
|
|
16
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/steps/StepsHandler.js";function asyncGeneratorStep(n, t, e, r, o, a, c) {try {var i = n[a](c),u = i.value;} catch (n) {return void e(n);}i.done ? t(u) : Promise.resolve(u).then(r, o);}function _asyncToGenerator(n) {return function () {var t = this,e = arguments;return new Promise(function (r, o) {var a = n.apply(t, e);function _next(n) {asyncGeneratorStep(a, r, o, _next, _throw, "next", n);}function _throw(n) {asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);}_next(void 0);});};}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';import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
var StepsContext = React.createContext(null);
|
|
4
|
+
export var useSteps = function useSteps() {return React.useContext(StepsContext) || {};};
|
|
5
|
+
|
|
6
|
+
export function StepsHandler(_ref) {var children = _ref.children,items = _ref.items,onSubmit = _ref.onSubmit,onValidateStep = _ref.onValidateStep,onStepChange = _ref.onStepChange,resetMaxIndexOnNavigate = _ref.resetMaxIndexOnNavigate;
|
|
7
|
+
var _React$useState = React.useState(0),_React$useState2 = _slicedToArray(_React$useState, 2),activeIndex = _React$useState2[0],setActiveIndex = _React$useState2[1];
|
|
8
|
+
var _React$useState3 = React.useState(0),_React$useState4 = _slicedToArray(_React$useState3, 2),maxIndexReleased = _React$useState4[0],setMaxIndexReleased = _React$useState4[1];
|
|
9
|
+
var _React$useState5 = React.useState(false),_React$useState6 = _slicedToArray(_React$useState5, 2),loading = _React$useState6[0],setLoading = _React$useState6[1];
|
|
10
|
+
var activeStep = items[activeIndex];
|
|
11
|
+
var isLastStep = activeIndex === items.length - 1;
|
|
12
|
+
|
|
13
|
+
var moveToIndex = function () {var _ref2 = _asyncToGenerator(function* (index) {
|
|
14
|
+
var shouldValidate = index > activeIndex;
|
|
15
|
+
if (shouldValidate) {
|
|
16
|
+
setLoading(true);
|
|
17
|
+
try {
|
|
18
|
+
var result = yield Promise.resolve(onValidateStep == null ? void 0 : onValidateStep());
|
|
19
|
+
if (result === false) return;
|
|
20
|
+
result = yield Promise.resolve(activeStep == null ? void 0 : activeStep.onValidate == null ? void 0 : activeStep.onValidate());
|
|
21
|
+
if (result === false) return;
|
|
22
|
+
} catch (_unused) {
|
|
23
|
+
return;
|
|
24
|
+
} finally {
|
|
25
|
+
setLoading(false);
|
|
26
|
+
}
|
|
27
|
+
yield Promise.resolve(onStepChange == null ? void 0 : onStepChange());
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (index === items.length) onSubmit == null ? void 0 : onSubmit();
|
|
31
|
+
var nextStep = items[index];
|
|
32
|
+
if (!nextStep) return;
|
|
33
|
+
setActiveIndex(index);
|
|
34
|
+
if (index > maxIndexReleased || !!resetMaxIndexOnNavigate) setMaxIndexReleased(index);
|
|
35
|
+
});return function moveToIndex(_x) {return _ref2.apply(this, arguments);};}();
|
|
36
|
+
|
|
37
|
+
var moveToNextStep = function moveToNextStep() {return moveToIndex(activeIndex + 1);};
|
|
38
|
+
var moveToPrevStep = function moveToPrevStep() {return moveToIndex(activeIndex - 1);};
|
|
39
|
+
|
|
40
|
+
var value = {
|
|
41
|
+
items: items,
|
|
42
|
+
moveToIndex: moveToIndex,
|
|
43
|
+
activeIndex: activeIndex,
|
|
44
|
+
activeStep: activeStep,
|
|
45
|
+
maxIndexReleased: maxIndexReleased,
|
|
46
|
+
loading: loading,
|
|
47
|
+
isLastStep: isLastStep,
|
|
48
|
+
moveToNextStep: moveToNextStep,
|
|
49
|
+
moveToPrevStep: moveToPrevStep
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
return _jsx(StepsContext.Provider, { value: value, children: children });
|
|
53
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/steps/StepsMenu.js";import { Menu } from "../actions";
|
|
2
|
+
import { useSteps } from "./StepsHandler";import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
export function StepsMenu(props) {
|
|
5
|
+
var _useSteps = useSteps(),activeIndex = _useSteps.activeIndex,items = _useSteps.items,moveToIndex = _useSteps.moveToIndex,maxIndexReleased = _useSteps.maxIndexReleased;
|
|
6
|
+
var formattedItems = items.map(function (item, index) {return Object.assign({},
|
|
7
|
+
item, {
|
|
8
|
+
disabled: maxIndexReleased < index });}
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
_jsx(Menu, Object.assign({ items: formattedItems, activeIndex: activeIndex, onChangeIndex: function onChangeIndex(index) {return moveToIndex(index);} }, props)));
|
|
13
|
+
|
|
14
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var _excluded = ["loading"],_excluded2 = ["submitProps", "returnProps"];var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/steps/StepsNavigation.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;}import { Button } from "../actions";
|
|
2
|
+
import { View } from "../structure";
|
|
3
|
+
import { useSteps } from "./StepsHandler";import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
export function StepsReturnButton(props) {
|
|
6
|
+
var _useSteps = useSteps(),activeIndex = _useSteps.activeIndex,moveToPrevStep = _useSteps.moveToPrevStep;
|
|
7
|
+
if (activeIndex === 0) return null;
|
|
8
|
+
|
|
9
|
+
return _jsx(Button, Object.assign({ label: "Back", outline: true, icon: "arrow-left-line", onPress: moveToPrevStep, text4: true }, props));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function StepsSubmitButton(_ref) {var propLoading = _ref.loading,props = _objectWithoutProperties(_ref, _excluded);
|
|
13
|
+
var _useSteps2 = useSteps(),isLastStep = _useSteps2.isLastStep,moveToNextStep = _useSteps2.moveToNextStep,loading = _useSteps2.loading;
|
|
14
|
+
var label = isLastStep ? 'Submit' : 'Next';
|
|
15
|
+
var icon = isLastStep ? 'checkbox-circle-line' : 'arrow-right-line';
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
_jsx(Button, Object.assign({
|
|
19
|
+
label: label,
|
|
20
|
+
outline: !isLastStep,
|
|
21
|
+
icon: icon,
|
|
22
|
+
onPress: moveToNextStep,
|
|
23
|
+
loading: propLoading || loading,
|
|
24
|
+
invert: true },
|
|
25
|
+
props)
|
|
26
|
+
));
|
|
27
|
+
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function StepsNavigation(_ref2) {var submitProps = _ref2.submitProps,returnProps = _ref2.returnProps,props = _objectWithoutProperties(_ref2, _excluded2);
|
|
31
|
+
return (
|
|
32
|
+
_jsxs(View, Object.assign({ row: true, centerV: true, toRight: true }, props, { gap: "sm", children: [
|
|
33
|
+
_jsx(StepsReturnButton, Object.assign({}, props, returnProps)),
|
|
34
|
+
_jsx(StepsSubmitButton, Object.assign({}, props, submitProps))] })
|
|
35
|
+
));
|
|
36
|
+
|
|
37
|
+
}
|
|
@@ -1 +1,69 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/structure/Accordion.js";var _excluded = ["children", "title", "open", "onChange"],_excluded2 = ["contentProps", "titleProps", "headerProps", "initOpen"];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
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { AbsView } from "../../abstractions/View";
|
|
5
|
+
import { Card } from "./Card";
|
|
6
|
+
import { Icon } from "../presentation/Icon";
|
|
7
|
+
import { Link } from "../actions/Link";
|
|
8
|
+
import { Text } from "../text/Text";
|
|
9
|
+
import { View } from "./View";
|
|
10
|
+
import { moveScale } from "../../theme/helpers/sizeScale";
|
|
11
|
+
import { useDefaultModifier } from "../../modifiers/default";
|
|
12
|
+
import { useSizeConverter } from "../../modifiers/sizeConverter";
|
|
13
|
+
import { useThemeComponentModifier } from "../../modifiers/themeComponent";import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
|
|
15
|
+
var DEFAULT_PROPS = {
|
|
16
|
+
padding: 0,
|
|
17
|
+
br: 'xl',
|
|
18
|
+
bg: 'overlayBG',
|
|
19
|
+
hiddenOverflow: true
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export function Accordion(_ref) {var children = _ref.children,title = _ref.title,open = _ref.open,onChange = _ref.onChange,rootProps = _objectWithoutProperties(_ref, _excluded);
|
|
23
|
+
var _pipe = pipe(
|
|
24
|
+
useSizeConverter('elementHeights', 'md'),
|
|
25
|
+
useThemeComponentModifier('Accordion'),
|
|
26
|
+
useDefaultModifier(DEFAULT_PROPS)
|
|
27
|
+
)([{}, rootProps]),_pipe2 = _slicedToArray(_pipe, 2),sizeCode = _pipe2[0].sizeCode,formattedProps = _pipe2[1];
|
|
28
|
+
|
|
29
|
+
var contentProps = formattedProps.contentProps,titleProps = formattedProps.titleProps,headerProps = formattedProps.headerProps,initOpen = formattedProps.initOpen,props = _objectWithoutProperties(formattedProps, _excluded2);
|
|
30
|
+
|
|
31
|
+
var _React$useState = React.useState(initOpen),_React$useState2 = _slicedToArray(_React$useState, 2),localOpen = _React$useState2[0],setLocalOpen = _React$useState2[1];
|
|
32
|
+
open = open === undefined ? localOpen : open;
|
|
33
|
+
|
|
34
|
+
var toggle = function toggle() {
|
|
35
|
+
setLocalOpen(!open);
|
|
36
|
+
onChange == null ? void 0 : onChange(!open);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
_jsxs(Card, Object.assign({}, props, { children: [
|
|
41
|
+
_jsxs(Link, Object.assign({
|
|
42
|
+
padding: sizeCode,
|
|
43
|
+
row: true,
|
|
44
|
+
gap: moveScale(sizeCode, -2),
|
|
45
|
+
borderB: open ? props.border || true : open,
|
|
46
|
+
borderColor: props.borderColor || 'divider_op40',
|
|
47
|
+
centerV: true },
|
|
48
|
+
headerProps, {
|
|
49
|
+
onPress: toggle, children: [
|
|
50
|
+
|
|
51
|
+
_jsx(Icon, { name: !!open ? 'arrow-down-s-line' : 'arrow-right-s-line' }),
|
|
52
|
+
_jsx(Text, Object.assign({ flex: true }, titleProps, { children:
|
|
53
|
+
title })
|
|
54
|
+
)] })
|
|
55
|
+
),
|
|
56
|
+
!!open &&
|
|
57
|
+
_jsx(View, Object.assign({ padding: sizeCode }, contentProps, { children:
|
|
58
|
+
children })
|
|
59
|
+
)] })
|
|
60
|
+
|
|
61
|
+
));
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
_jsx(AbsView, Object.assign({ className: "neko-accordion" }, props, { children:
|
|
66
|
+
children })
|
|
67
|
+
));
|
|
68
|
+
|
|
69
|
+
}
|
|
@@ -1 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/structure/AccordionGroup.js";var _excluded = ["items", "contentProps", "titleProps", "headerProps", "initOpen", "open", "onChange"],_excluded2 = ["key"];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 React from 'react';
|
|
2
|
+
|
|
3
|
+
import { Accordion } from "./Accordion";
|
|
4
|
+
import { Card } from "./Card";import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
export function AccordionsGroup(_ref) {var _this = this;var items = _ref.items,contentProps = _ref.contentProps,titleProps = _ref.titleProps,headerProps = _ref.headerProps,initOpen = _ref.initOpen,open = _ref.open,onChange = _ref.onChange,props = _objectWithoutProperties(_ref, _excluded);
|
|
7
|
+
var _React$useState = React.useState(initOpen),_React$useState2 = _slicedToArray(_React$useState, 2),localOpen = _React$useState2[0],setLocalOpen = _React$useState2[1];
|
|
8
|
+
open = open === undefined ? localOpen : open;
|
|
9
|
+
|
|
10
|
+
var handleChange = function handleChange(key) {
|
|
11
|
+
var v = open === key ? null : key;
|
|
12
|
+
setLocalOpen(v);
|
|
13
|
+
onChange == null ? void 0 : onChange(v);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
if (!(items != null && items.length)) return false;
|
|
17
|
+
|
|
18
|
+
var sharedProps = { contentProps: contentProps, titleProps: titleProps, headerProps: headerProps };
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
_jsx(Card, Object.assign({ padding: 0 }, props, { children:
|
|
22
|
+
items.map(function (_ref2, index) {var key = _ref2.key,item = _objectWithoutProperties(_ref2, _excluded2);return (
|
|
23
|
+
_jsx(Accordion, Object.assign({},
|
|
24
|
+
|
|
25
|
+
sharedProps,
|
|
26
|
+
item, {
|
|
27
|
+
br: 0,
|
|
28
|
+
borderB: index < items.length - 1,
|
|
29
|
+
open: !!open && open === key,
|
|
30
|
+
onChange: function onChange() {return handleChange(key);} }), key || index
|
|
31
|
+
));}
|
|
32
|
+
) })
|
|
33
|
+
));
|
|
34
|
+
|
|
35
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/structure/Affix.js";var _excluded = ["children", "shadow", "offsetTop", "offsetBottom"];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 React from 'react';
|
|
2
|
+
import { View } from "./View";import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
export function Affix(_ref) {var children = _ref.children,shadow = _ref.shadow,offsetTop = _ref.offsetTop,offsetBottom = _ref.offsetBottom,props = _objectWithoutProperties(_ref, _excluded);
|
|
5
|
+
var _React$useState = React.useState(false),_React$useState2 = _slicedToArray(_React$useState, 2),isFloating = _React$useState2[0],setIsFloating = _React$useState2[1];
|
|
6
|
+
var sentinelRef = React.useRef();
|
|
7
|
+
|
|
8
|
+
React.useEffect(function () {
|
|
9
|
+
var sentinel = sentinelRef.current;
|
|
10
|
+
if (!sentinel) return;
|
|
11
|
+
|
|
12
|
+
var observer = new IntersectionObserver(
|
|
13
|
+
function (_ref2) {var _ref3 = _slicedToArray(_ref2, 1),entry = _ref3[0];return setIsFloating(!entry.isIntersecting);},
|
|
14
|
+
{ threshold: [1] }
|
|
15
|
+
);
|
|
16
|
+
observer.observe(sentinel);
|
|
17
|
+
return function () {return observer.disconnect();};
|
|
18
|
+
}, []);
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
_jsxs(_Fragment, { children: [
|
|
22
|
+
_jsx("div", { ref: sentinelRef, style: { height: 0 } }),
|
|
23
|
+
_jsx(View, Object.assign({
|
|
24
|
+
sticky: true,
|
|
25
|
+
top: offsetBottom === undefined ? offsetTop || 0 : undefined,
|
|
26
|
+
bottom: offsetBottom,
|
|
27
|
+
shadow: shadow && isFloating },
|
|
28
|
+
props, { children:
|
|
29
|
+
|
|
30
|
+
children })
|
|
31
|
+
)] }
|
|
32
|
+
));
|
|
33
|
+
|
|
34
|
+
}
|
|
@@ -1 +1,59 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/structure/BlurView.js";var _excluded = ["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;}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;}import tinycolor from 'tinycolor2';
|
|
2
|
+
import { pipe } from 'ramda';
|
|
3
|
+
|
|
4
|
+
import { AbsBlurView } from "../../abstractions/BlurView";
|
|
5
|
+
import { useAnimationModifier } from "../../modifiers/animation";
|
|
6
|
+
import { useBackgroundModifier } from "../../modifiers/background";
|
|
7
|
+
import { useBorderModifier } from "../../modifiers/border";
|
|
8
|
+
import { useColors } from "../../theme";
|
|
9
|
+
import { useDefaultModifier } from "../../modifiers/default";
|
|
10
|
+
import { useDisplayModifier } from "../../modifiers/display";
|
|
11
|
+
import { useFlexModifier } from "../../modifiers/flex";
|
|
12
|
+
import { useFlexWrapperModifier } from "../../modifiers/flexWrapper";
|
|
13
|
+
import { useMarginModifier } from "../../modifiers/margin";
|
|
14
|
+
import { useOverflowModifier } from "../../modifiers/overflow";
|
|
15
|
+
import { usePaddingModifier } from "../../modifiers/padding";
|
|
16
|
+
import { usePositionModifier } from "../../modifiers/position";
|
|
17
|
+
import { useShadowModifier } from "../../modifiers/shadow";
|
|
18
|
+
import { useSizeModifier } from "../../modifiers/size";
|
|
19
|
+
import { useStateModifier } from "../../modifiers/state";
|
|
20
|
+
import { useThemeComponentModifier } from "../../modifiers/themeComponent";import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
|
+
|
|
22
|
+
var DEFAULT_PROPS =
|
|
23
|
+
function DEFAULT_PROPS(colors) {return (
|
|
24
|
+
function (_ref) {var _ref2 = _slicedToArray(_ref, 2);_objectDestructuringEmpty(_ref2[0]);_objectDestructuringEmpty(_ref2[1]);
|
|
25
|
+
var isDark = tinycolor((colors == null ? void 0 : colors.overlayBG) || (colors == null ? void 0 : colors.bg)).isDark();
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
width: 'auto',
|
|
29
|
+
tint: isDark ? 'dark' : 'light'
|
|
30
|
+
};
|
|
31
|
+
});};
|
|
32
|
+
|
|
33
|
+
export function BlurView(_ref3) {var children = _ref3.children,rootProps = _objectWithoutProperties(_ref3, _excluded);
|
|
34
|
+
var colors = useColors();
|
|
35
|
+
|
|
36
|
+
var _pipe = pipe(
|
|
37
|
+
useThemeComponentModifier('BlurView'),
|
|
38
|
+
useDefaultModifier(DEFAULT_PROPS(colors)),
|
|
39
|
+
useFlexWrapperModifier,
|
|
40
|
+
useDisplayModifier,
|
|
41
|
+
useAnimationModifier,
|
|
42
|
+
useStateModifier,
|
|
43
|
+
useSizeModifier,
|
|
44
|
+
usePositionModifier,
|
|
45
|
+
useOverflowModifier,
|
|
46
|
+
usePaddingModifier,
|
|
47
|
+
useMarginModifier,
|
|
48
|
+
useFlexModifier,
|
|
49
|
+
useBackgroundModifier,
|
|
50
|
+
useBorderModifier,
|
|
51
|
+
useShadowModifier
|
|
52
|
+
)([{}, rootProps]),_pipe2 = _slicedToArray(_pipe, 2);_objectDestructuringEmpty(_pipe2[0]);var props = _pipe2[1];
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
_jsx(AbsBlurView, Object.assign({ className: "neko-blur-view" }, props, { children:
|
|
56
|
+
children })
|
|
57
|
+
));
|
|
58
|
+
|
|
59
|
+
}
|
|
@@ -1 +1,46 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/structure/Card.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 { AbsView } from "../../abstractions/View";
|
|
4
|
+
import { useBackgroundModifier } from "../../modifiers/background";
|
|
5
|
+
import { useBorderModifier } from "../../modifiers/border";
|
|
6
|
+
import { useDefaultModifier } from "../../modifiers/default";
|
|
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 { useThemeComponentModifier } from "../../modifiers/themeComponent";import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
+
|
|
17
|
+
var DEFAULT_PROPS = {
|
|
18
|
+
padding: 'md',
|
|
19
|
+
br: 'xl',
|
|
20
|
+
bg: 'overlayBG',
|
|
21
|
+
hiddenOverflow: true,
|
|
22
|
+
border: 'overlayDivider'
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export function Card(_ref) {var children = _ref.children,rootProps = _objectWithoutProperties(_ref, _excluded);
|
|
26
|
+
var _pipe = pipe(
|
|
27
|
+
useThemeComponentModifier('Card'),
|
|
28
|
+
useDefaultModifier(DEFAULT_PROPS),
|
|
29
|
+
useSizeModifier,
|
|
30
|
+
usePositionModifier,
|
|
31
|
+
useOverflowModifier,
|
|
32
|
+
usePaddingModifier,
|
|
33
|
+
useMarginModifier,
|
|
34
|
+
useFlexWrapperModifier,
|
|
35
|
+
useFlexModifier,
|
|
36
|
+
useBackgroundModifier,
|
|
37
|
+
useBorderModifier,
|
|
38
|
+
useShadowModifier
|
|
39
|
+
)([{}, rootProps]),_pipe2 = _slicedToArray(_pipe, 2),_ = _pipe2[0],props = _pipe2[1];
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
_jsx(AbsView, Object.assign({ className: "neko-card" }, props, { children:
|
|
43
|
+
children })
|
|
44
|
+
));
|
|
45
|
+
|
|
46
|
+
}
|
|
@@ -1 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/structure/Col.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 { View } from "./View";
|
|
4
|
+
import { useDefaultModifier } from "../../modifiers/default";
|
|
5
|
+
import { useResponsiveConverter } from "../../modifiers/responsiveConverter";
|
|
6
|
+
import { useThemeComponentModifier } from "../../modifiers/themeComponent";import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
var DEFAULT_PROPS = {};
|
|
9
|
+
|
|
10
|
+
export function Col(_ref) {var children = _ref.children,rootProps = _objectWithoutProperties(_ref, _excluded);
|
|
11
|
+
var _pipe = pipe(
|
|
12
|
+
useThemeComponentModifier('Col'),
|
|
13
|
+
useResponsiveConverter([]),
|
|
14
|
+
useDefaultModifier(DEFAULT_PROPS)
|
|
15
|
+
)([{}, rootProps]),_pipe2 = _slicedToArray(_pipe, 2),_ = _pipe2[0],props = _pipe2[1];
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
_jsx(View, Object.assign({ className: "neko-col" }, props, { children:
|
|
19
|
+
children })
|
|
20
|
+
));
|
|
21
|
+
|
|
22
|
+
}
|
|
@@ -1 +1,42 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/structure/GradientView.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 { AbsGradientView } from "../../abstractions/GradientView";
|
|
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 GradientView(_ref) {var children = _ref.children,rootProps = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
+
var _pipe = pipe(
|
|
21
|
+
useThemeComponentModifier('GradientView'),
|
|
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),gradientColors = _pipe2[0].gradientColors,props = _pipe2[1];
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
_jsx(AbsGradientView, Object.assign({ className: "neko-gradient-view", colors: gradientColors }, props, { children:
|
|
39
|
+
children })
|
|
40
|
+
));
|
|
41
|
+
|
|
42
|
+
}
|