@sincpro/mobile-ui 0.1.2
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 +32 -0
- package/lib/module/Dialog/BottomSheet/BottomSheet.Root.js +481 -0
- package/lib/module/Dialog/BottomSheet/BottomSheet.Root.js.map +1 -0
- package/lib/module/Dialog/BottomSheet/index.js +4 -0
- package/lib/module/Dialog/BottomSheet/index.js.map +1 -0
- package/lib/module/Dialog/Confirmation.context.js +108 -0
- package/lib/module/Dialog/Confirmation.context.js.map +1 -0
- package/lib/module/Dialog/Dialog.Confirmation.js +69 -0
- package/lib/module/Dialog/Dialog.Confirmation.js.map +1 -0
- package/lib/module/Dialog/Dialog.EditValue.js +115 -0
- package/lib/module/Dialog/Dialog.EditValue.js.map +1 -0
- package/lib/module/Dialog/index.js +14 -0
- package/lib/module/Dialog/index.js.map +1 -0
- package/lib/module/Display/Display.Avatar.js +58 -0
- package/lib/module/Display/Display.Avatar.js.map +1 -0
- package/lib/module/Display/Display.Badge.js +72 -0
- package/lib/module/Display/Display.Badge.js.map +1 -0
- package/lib/module/Display/Display.CopyableText.js +30 -0
- package/lib/module/Display/Display.CopyableText.js.map +1 -0
- package/lib/module/Display/Display.CountRecords.js +27 -0
- package/lib/module/Display/Display.CountRecords.js.map +1 -0
- package/lib/module/Display/Display.Date.js +35 -0
- package/lib/module/Display/Display.Date.js.map +1 -0
- package/lib/module/Display/Display.Divider.js +43 -0
- package/lib/module/Display/Display.Divider.js.map +1 -0
- package/lib/module/Display/Display.Icon.js +83 -0
- package/lib/module/Display/Display.Icon.js.map +1 -0
- package/lib/module/Display/Display.Logo.js +54 -0
- package/lib/module/Display/Display.Logo.js.map +1 -0
- package/lib/module/Display/Display.MenuButton.js +101 -0
- package/lib/module/Display/Display.MenuButton.js.map +1 -0
- package/lib/module/Display/Display.Monetary.js +36 -0
- package/lib/module/Display/Display.Monetary.js.map +1 -0
- package/lib/module/Display/index.js +28 -0
- package/lib/module/Display/index.js.map +1 -0
- package/lib/module/Feedback/ErrorBoundary.js +43 -0
- package/lib/module/Feedback/ErrorBoundary.js.map +1 -0
- package/lib/module/Feedback/Feedback.DomainSplashScreen.js +101 -0
- package/lib/module/Feedback/Feedback.DomainSplashScreen.js.map +1 -0
- package/lib/module/Feedback/Feedback.Empty.js +31 -0
- package/lib/module/Feedback/Feedback.Empty.js.map +1 -0
- package/lib/module/Feedback/Feedback.Error.js +53 -0
- package/lib/module/Feedback/Feedback.Error.js.map +1 -0
- package/lib/module/Feedback/Feedback.Loading.js +24 -0
- package/lib/module/Feedback/Feedback.Loading.js.map +1 -0
- package/lib/module/Feedback/Feedback.Spinner.js +28 -0
- package/lib/module/Feedback/Feedback.Spinner.js.map +1 -0
- package/lib/module/Feedback/Feedback.Splash.js +59 -0
- package/lib/module/Feedback/Feedback.Splash.js.map +1 -0
- package/lib/module/Feedback/index.js +17 -0
- package/lib/module/Feedback/index.js.map +1 -0
- package/lib/module/Form/Form.Button.js +442 -0
- package/lib/module/Form/Form.Button.js.map +1 -0
- package/lib/module/Form/Form.Checkbox.js +71 -0
- package/lib/module/Form/Form.Checkbox.js.map +1 -0
- package/lib/module/Form/Form.ControlledCheckbox.js +29 -0
- package/lib/module/Form/Form.ControlledCheckbox.js.map +1 -0
- package/lib/module/Form/Form.ControlledDropdown.js +7 -0
- package/lib/module/Form/Form.ControlledDropdown.js.map +1 -0
- package/lib/module/Form/Form.ControlledInput.js +43 -0
- package/lib/module/Form/Form.ControlledInput.js.map +1 -0
- package/lib/module/Form/Form.ControlledMonetaryInput.js +34 -0
- package/lib/module/Form/Form.ControlledMonetaryInput.js.map +1 -0
- package/lib/module/Form/Form.ControlledRadioButton.js +28 -0
- package/lib/module/Form/Form.ControlledRadioButton.js.map +1 -0
- package/lib/module/Form/Form.Dropdown.js +163 -0
- package/lib/module/Form/Form.Dropdown.js.map +1 -0
- package/lib/module/Form/Form.FilterButton.js +59 -0
- package/lib/module/Form/Form.FilterButton.js.map +1 -0
- package/lib/module/Form/Form.FractionalQuantityInput.js +166 -0
- package/lib/module/Form/Form.FractionalQuantityInput.js.map +1 -0
- package/lib/module/Form/Form.IconButton.js +97 -0
- package/lib/module/Form/Form.IconButton.js.map +1 -0
- package/lib/module/Form/Form.Input.js +77 -0
- package/lib/module/Form/Form.Input.js.map +1 -0
- package/lib/module/Form/Form.InputField.js +63 -0
- package/lib/module/Form/Form.InputField.js.map +1 -0
- package/lib/module/Form/Form.MonetaryInput.js +65 -0
- package/lib/module/Form/Form.MonetaryInput.js.map +1 -0
- package/lib/module/Form/Form.PasswordInput.js +37 -0
- package/lib/module/Form/Form.PasswordInput.js.map +1 -0
- package/lib/module/Form/Form.QuantitySelector.js +78 -0
- package/lib/module/Form/Form.QuantitySelector.js.map +1 -0
- package/lib/module/Form/Form.RadioButton.js +56 -0
- package/lib/module/Form/Form.RadioButton.js.map +1 -0
- package/lib/module/Form/Form.SearchBar.js +63 -0
- package/lib/module/Form/Form.SearchBar.js.map +1 -0
- package/lib/module/Form/Form.TextInput.js +19 -0
- package/lib/module/Form/Form.TextInput.js.map +1 -0
- package/lib/module/Form/index.js +45 -0
- package/lib/module/Form/index.js.map +1 -0
- package/lib/module/Navigation/Navigation.Header.js +46 -0
- package/lib/module/Navigation/Navigation.Header.js.map +1 -0
- package/lib/module/Navigation/Navigation.HeaderToolbar.js +79 -0
- package/lib/module/Navigation/Navigation.HeaderToolbar.js.map +1 -0
- package/lib/module/Navigation/Navigation.RowItem.js +35 -0
- package/lib/module/Navigation/Navigation.RowItem.js.map +1 -0
- package/lib/module/Navigation/Navigation.TabIcon.js +28 -0
- package/lib/module/Navigation/Navigation.TabIcon.js.map +1 -0
- package/lib/module/Navigation/Navigation.TabItem.js +27 -0
- package/lib/module/Navigation/Navigation.TabItem.js.map +1 -0
- package/lib/module/Navigation/index.js +16 -0
- package/lib/module/Navigation/index.js.map +1 -0
- package/lib/module/Typography/Typography.Heading.js +15 -0
- package/lib/module/Typography/Typography.Heading.js.map +1 -0
- package/lib/module/Typography/Typography.Text.js +51 -0
- package/lib/module/Typography/Typography.Text.js.map +1 -0
- package/lib/module/Typography/index.js +11 -0
- package/lib/module/Typography/index.js.map +1 -0
- package/lib/module/icons/AddItemIcon.js +53 -0
- package/lib/module/icons/AddItemIcon.js.map +1 -0
- package/lib/module/icons/ArrangeCircle.js +50 -0
- package/lib/module/icons/ArrangeCircle.js.map +1 -0
- package/lib/module/icons/ArrowDownIcon.js +37 -0
- package/lib/module/icons/ArrowDownIcon.js.map +1 -0
- package/lib/module/icons/ArrowUpIcon.js +37 -0
- package/lib/module/icons/ArrowUpIcon.js.map +1 -0
- package/lib/module/icons/BoxIcon.js +35 -0
- package/lib/module/icons/BoxIcon.js.map +1 -0
- package/lib/module/icons/BoxTimeIcon.js +29 -0
- package/lib/module/icons/BoxTimeIcon.js.map +1 -0
- package/lib/module/icons/CalendarIcon.js +81 -0
- package/lib/module/icons/CalendarIcon.js.map +1 -0
- package/lib/module/icons/CardIcon.js +46 -0
- package/lib/module/icons/CardIcon.js.map +1 -0
- package/lib/module/icons/CashierIcon.js +20 -0
- package/lib/module/icons/CashierIcon.js.map +1 -0
- package/lib/module/icons/CreditIcon.js +43 -0
- package/lib/module/icons/CreditIcon.js.map +1 -0
- package/lib/module/icons/DuoIcon.js +41 -0
- package/lib/module/icons/DuoIcon.js.map +1 -0
- package/lib/module/icons/HomeIcon.js +20 -0
- package/lib/module/icons/HomeIcon.js.map +1 -0
- package/lib/module/icons/HomeIconOutlined.js +29 -0
- package/lib/module/icons/HomeIconOutlined.js.map +1 -0
- package/lib/module/icons/LogoIcon.js +38 -0
- package/lib/module/icons/LogoIcon.js.map +1 -0
- package/lib/module/icons/MoneyReceiveIcon.js +47 -0
- package/lib/module/icons/MoneyReceiveIcon.js.map +1 -0
- package/lib/module/icons/OdooIcon.js +24 -0
- package/lib/module/icons/OdooIcon.js.map +1 -0
- package/lib/module/icons/PinIcon.js +20 -0
- package/lib/module/icons/PinIcon.js.map +1 -0
- package/lib/module/icons/PrinterIcon.js +48 -0
- package/lib/module/icons/PrinterIcon.js.map +1 -0
- package/lib/module/icons/ProfileIcon.js +23 -0
- package/lib/module/icons/ProfileIcon.js.map +1 -0
- package/lib/module/icons/SettingsIcon.js +65 -0
- package/lib/module/icons/SettingsIcon.js.map +1 -0
- package/lib/module/icons/SinpeIcon.js +37 -0
- package/lib/module/icons/SinpeIcon.js.map +1 -0
- package/lib/module/icons/ToggleOffIcon.js +29 -0
- package/lib/module/icons/ToggleOffIcon.js.map +1 -0
- package/lib/module/icons/WalletMoneyIcon.js +42 -0
- package/lib/module/icons/WalletMoneyIcon.js.map +1 -0
- package/lib/module/icons/icon_getters.js +53 -0
- package/lib/module/icons/icon_getters.js.map +1 -0
- package/lib/module/icons/props.js +2 -0
- package/lib/module/icons/props.js.map +1 -0
- package/lib/module/index.js +34 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/layouts/AuthContainer.js +66 -0
- package/lib/module/layouts/AuthContainer.js.map +1 -0
- package/lib/module/layouts/Container.js +31 -0
- package/lib/module/layouts/Container.js.map +1 -0
- package/lib/module/layouts/GradientContainer.js +20 -0
- package/lib/module/layouts/GradientContainer.js.map +1 -0
- package/lib/module/layouts/PlainLayout.js +16 -0
- package/lib/module/layouts/PlainLayout.js.map +1 -0
- package/lib/module/layouts/ScrollContainer.js +37 -0
- package/lib/module/layouts/ScrollContainer.js.map +1 -0
- package/lib/module/layouts/TabNavigatorLayout.js +132 -0
- package/lib/module/layouts/TabNavigatorLayout.js.map +1 -0
- package/lib/module/lib/date.js +127 -0
- package/lib/module/lib/date.js.map +1 -0
- package/lib/module/lib/icon.js +2 -0
- package/lib/module/lib/icon.js.map +1 -0
- package/lib/module/lib/monetary.js +31 -0
- package/lib/module/lib/monetary.js.map +1 -0
- package/lib/module/lib/quantity.js +46 -0
- package/lib/module/lib/quantity.js.map +1 -0
- package/lib/module/lib/serializer.js +47 -0
- package/lib/module/lib/serializer.js.map +1 -0
- package/lib/module/lib/timezone.js +2 -0
- package/lib/module/lib/timezone.js.map +1 -0
- package/lib/module/nativewind-env.d.js +3 -0
- package/lib/module/nativewind-env.d.js.map +1 -0
- package/lib/module/notifications/index.js +5 -0
- package/lib/module/notifications/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/primitives/BaseButton.js +391 -0
- package/lib/module/primitives/BaseButton.js.map +1 -0
- package/lib/module/primitives/Box.js +19 -0
- package/lib/module/primitives/Box.js.map +1 -0
- package/lib/module/primitives/Row.js +37 -0
- package/lib/module/primitives/Row.js.map +1 -0
- package/lib/module/primitives/Stack.js +27 -0
- package/lib/module/primitives/Stack.js.map +1 -0
- package/lib/module/primitives/index.js +6 -0
- package/lib/module/primitives/index.js.map +1 -0
- package/lib/module/providers/index.js +3 -0
- package/lib/module/providers/index.js.map +1 -0
- package/lib/module/theme/active.js +13 -0
- package/lib/module/theme/active.js.map +1 -0
- package/lib/module/theme/components/ThemedActivityIndicator.js +30 -0
- package/lib/module/theme/components/ThemedActivityIndicator.js.map +1 -0
- package/lib/module/theme/components/index.js +13 -0
- package/lib/module/theme/components/index.js.map +1 -0
- package/lib/module/theme/default.js +91 -0
- package/lib/module/theme/default.js.map +1 -0
- package/lib/module/theme/globals.css +67 -0
- package/lib/module/theme/index.js +6 -0
- package/lib/module/theme/index.js.map +1 -0
- package/lib/module/theme/theme.js +18 -0
- package/lib/module/theme/theme.js.map +1 -0
- package/lib/module/theme/tw.js +19 -0
- package/lib/module/theme/tw.js.map +1 -0
- package/lib/module/theme/types.js +2 -0
- package/lib/module/theme/types.js.map +1 -0
- package/lib/module/theme/typography.js +246 -0
- package/lib/module/theme/typography.js.map +1 -0
- package/lib/module/theme/useTheme.js +5 -0
- package/lib/module/theme/useTheme.js.map +1 -0
- package/lib/module/views/AuthFormView.js +46 -0
- package/lib/module/views/AuthFormView.js.map +1 -0
- package/lib/module/views/FormViewV2.context.js +47 -0
- package/lib/module/views/FormViewV2.context.js.map +1 -0
- package/lib/module/views/FormViewV2.js +220 -0
- package/lib/module/views/FormViewV2.js.map +1 -0
- package/lib/module/views/ListViewV2.context.js +51 -0
- package/lib/module/views/ListViewV2.context.js.map +1 -0
- package/lib/module/views/ListViewV2.js +503 -0
- package/lib/module/views/ListViewV2.js.map +1 -0
- package/lib/module/views/Wizard/Wizard.context.js +111 -0
- package/lib/module/views/Wizard/Wizard.context.js.map +1 -0
- package/lib/module/views/Wizard/Wizard.js +125 -0
- package/lib/module/views/Wizard/Wizard.js.map +1 -0
- package/lib/module/views/Wizard/index.js +5 -0
- package/lib/module/views/Wizard/index.js.map +1 -0
- package/lib/module/views/types/IFormView.js +4 -0
- package/lib/module/views/types/IFormView.js.map +1 -0
- package/lib/module/views/types/IListView.js +40 -0
- package/lib/module/views/types/IListView.js.map +1 -0
- package/lib/module/views/types/UIItem.js +2 -0
- package/lib/module/views/types/UIItem.js.map +1 -0
- package/lib/module/widgets/CircleButton.js +70 -0
- package/lib/module/widgets/CircleButton.js.map +1 -0
- package/lib/module/widgets/GeoPermissionCard.js +55 -0
- package/lib/module/widgets/GeoPermissionCard.js.map +1 -0
- package/lib/module/widgets/HomeHeader.js +42 -0
- package/lib/module/widgets/HomeHeader.js.map +1 -0
- package/lib/module/widgets/JSONViewer.js +196 -0
- package/lib/module/widgets/JSONViewer.js.map +1 -0
- package/lib/module/widgets/MenuCard.js +32 -0
- package/lib/module/widgets/MenuCard.js.map +1 -0
- package/lib/module/widgets/MenuGrid.js +20 -0
- package/lib/module/widgets/MenuGrid.js.map +1 -0
- package/lib/module/widgets/ScreenHeader.js +63 -0
- package/lib/module/widgets/ScreenHeader.js.map +1 -0
- package/lib/module/widgets/TimeZoneSelector.js +73 -0
- package/lib/module/widgets/TimeZoneSelector.js.map +1 -0
- package/lib/module/widgets/TimeZoneSelectorModal.js +187 -0
- package/lib/module/widgets/TimeZoneSelectorModal.js.map +1 -0
- package/lib/module/widgets/index.js +9 -0
- package/lib/module/widgets/index.js.map +1 -0
- package/lib/typescript/Dialog/BottomSheet/BottomSheet.Root.d.ts +321 -0
- package/lib/typescript/Dialog/BottomSheet/BottomSheet.Root.d.ts.map +1 -0
- package/lib/typescript/Dialog/BottomSheet/index.d.ts +2 -0
- package/lib/typescript/Dialog/BottomSheet/index.d.ts.map +1 -0
- package/lib/typescript/Dialog/Confirmation.context.d.ts +22 -0
- package/lib/typescript/Dialog/Confirmation.context.d.ts.map +1 -0
- package/lib/typescript/Dialog/Dialog.Confirmation.d.ts +13 -0
- package/lib/typescript/Dialog/Dialog.Confirmation.d.ts.map +1 -0
- package/lib/typescript/Dialog/Dialog.EditValue.d.ts +26 -0
- package/lib/typescript/Dialog/Dialog.EditValue.d.ts.map +1 -0
- package/lib/typescript/Dialog/index.d.ts +20 -0
- package/lib/typescript/Dialog/index.d.ts.map +1 -0
- package/lib/typescript/Display/Display.Avatar.d.ts +53 -0
- package/lib/typescript/Display/Display.Avatar.d.ts.map +1 -0
- package/lib/typescript/Display/Display.Badge.d.ts +109 -0
- package/lib/typescript/Display/Display.Badge.d.ts.map +1 -0
- package/lib/typescript/Display/Display.CopyableText.d.ts +14 -0
- package/lib/typescript/Display/Display.CopyableText.d.ts.map +1 -0
- package/lib/typescript/Display/Display.CountRecords.d.ts +9 -0
- package/lib/typescript/Display/Display.CountRecords.d.ts.map +1 -0
- package/lib/typescript/Display/Display.Date.d.ts +19 -0
- package/lib/typescript/Display/Display.Date.d.ts.map +1 -0
- package/lib/typescript/Display/Display.Divider.d.ts +45 -0
- package/lib/typescript/Display/Display.Divider.d.ts.map +1 -0
- package/lib/typescript/Display/Display.Icon.d.ts +16 -0
- package/lib/typescript/Display/Display.Icon.d.ts.map +1 -0
- package/lib/typescript/Display/Display.Logo.d.ts +56 -0
- package/lib/typescript/Display/Display.Logo.d.ts.map +1 -0
- package/lib/typescript/Display/Display.MenuButton.d.ts +104 -0
- package/lib/typescript/Display/Display.MenuButton.d.ts.map +1 -0
- package/lib/typescript/Display/Display.Monetary.d.ts +20 -0
- package/lib/typescript/Display/Display.Monetary.d.ts.map +1 -0
- package/lib/typescript/Display/index.d.ts +23 -0
- package/lib/typescript/Display/index.d.ts.map +1 -0
- package/lib/typescript/Feedback/ErrorBoundary.d.ts +19 -0
- package/lib/typescript/Feedback/ErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/Feedback/Feedback.DomainSplashScreen.d.ts +12 -0
- package/lib/typescript/Feedback/Feedback.DomainSplashScreen.d.ts.map +1 -0
- package/lib/typescript/Feedback/Feedback.Empty.d.ts +7 -0
- package/lib/typescript/Feedback/Feedback.Empty.d.ts.map +1 -0
- package/lib/typescript/Feedback/Feedback.Error.d.ts +10 -0
- package/lib/typescript/Feedback/Feedback.Error.d.ts.map +1 -0
- package/lib/typescript/Feedback/Feedback.Loading.d.ts +10 -0
- package/lib/typescript/Feedback/Feedback.Loading.d.ts.map +1 -0
- package/lib/typescript/Feedback/Feedback.Spinner.d.ts +12 -0
- package/lib/typescript/Feedback/Feedback.Spinner.d.ts.map +1 -0
- package/lib/typescript/Feedback/Feedback.Splash.d.ts +12 -0
- package/lib/typescript/Feedback/Feedback.Splash.d.ts.map +1 -0
- package/lib/typescript/Feedback/index.d.ts +14 -0
- package/lib/typescript/Feedback/index.d.ts.map +1 -0
- package/lib/typescript/Form/Form.Button.d.ts +146 -0
- package/lib/typescript/Form/Form.Button.d.ts.map +1 -0
- package/lib/typescript/Form/Form.Checkbox.d.ts +14 -0
- package/lib/typescript/Form/Form.Checkbox.d.ts.map +1 -0
- package/lib/typescript/Form/Form.ControlledCheckbox.d.ts +10 -0
- package/lib/typescript/Form/Form.ControlledCheckbox.d.ts.map +1 -0
- package/lib/typescript/Form/Form.ControlledDropdown.d.ts +15 -0
- package/lib/typescript/Form/Form.ControlledDropdown.d.ts.map +1 -0
- package/lib/typescript/Form/Form.ControlledInput.d.ts +16 -0
- package/lib/typescript/Form/Form.ControlledInput.d.ts.map +1 -0
- package/lib/typescript/Form/Form.ControlledMonetaryInput.d.ts +13 -0
- package/lib/typescript/Form/Form.ControlledMonetaryInput.d.ts.map +1 -0
- package/lib/typescript/Form/Form.ControlledRadioButton.d.ts +10 -0
- package/lib/typescript/Form/Form.ControlledRadioButton.d.ts.map +1 -0
- package/lib/typescript/Form/Form.Dropdown.d.ts +15 -0
- package/lib/typescript/Form/Form.Dropdown.d.ts.map +1 -0
- package/lib/typescript/Form/Form.FilterButton.d.ts +13 -0
- package/lib/typescript/Form/Form.FilterButton.d.ts.map +1 -0
- package/lib/typescript/Form/Form.FractionalQuantityInput.d.ts +14 -0
- package/lib/typescript/Form/Form.FractionalQuantityInput.d.ts.map +1 -0
- package/lib/typescript/Form/Form.IconButton.d.ts +68 -0
- package/lib/typescript/Form/Form.IconButton.d.ts.map +1 -0
- package/lib/typescript/Form/Form.Input.d.ts +11 -0
- package/lib/typescript/Form/Form.Input.d.ts.map +1 -0
- package/lib/typescript/Form/Form.InputField.d.ts +11 -0
- package/lib/typescript/Form/Form.InputField.d.ts.map +1 -0
- package/lib/typescript/Form/Form.MonetaryInput.d.ts +9 -0
- package/lib/typescript/Form/Form.MonetaryInput.d.ts.map +1 -0
- package/lib/typescript/Form/Form.PasswordInput.d.ts +10 -0
- package/lib/typescript/Form/Form.PasswordInput.d.ts.map +1 -0
- package/lib/typescript/Form/Form.QuantitySelector.d.ts +12 -0
- package/lib/typescript/Form/Form.QuantitySelector.d.ts.map +1 -0
- package/lib/typescript/Form/Form.RadioButton.d.ts +8 -0
- package/lib/typescript/Form/Form.RadioButton.d.ts.map +1 -0
- package/lib/typescript/Form/Form.SearchBar.d.ts +10 -0
- package/lib/typescript/Form/Form.SearchBar.d.ts.map +1 -0
- package/lib/typescript/Form/Form.TextInput.d.ts +9 -0
- package/lib/typescript/Form/Form.TextInput.d.ts.map +1 -0
- package/lib/typescript/Form/index.d.ts +42 -0
- package/lib/typescript/Form/index.d.ts.map +1 -0
- package/lib/typescript/Navigation/Navigation.Header.d.ts +11 -0
- package/lib/typescript/Navigation/Navigation.Header.d.ts.map +1 -0
- package/lib/typescript/Navigation/Navigation.HeaderToolbar.d.ts +16 -0
- package/lib/typescript/Navigation/Navigation.HeaderToolbar.d.ts.map +1 -0
- package/lib/typescript/Navigation/Navigation.RowItem.d.ts +6 -0
- package/lib/typescript/Navigation/Navigation.RowItem.d.ts.map +1 -0
- package/lib/typescript/Navigation/Navigation.TabIcon.d.ts +15 -0
- package/lib/typescript/Navigation/Navigation.TabIcon.d.ts.map +1 -0
- package/lib/typescript/Navigation/Navigation.TabItem.d.ts +15 -0
- package/lib/typescript/Navigation/Navigation.TabItem.d.ts.map +1 -0
- package/lib/typescript/Navigation/index.d.ts +12 -0
- package/lib/typescript/Navigation/index.d.ts.map +1 -0
- package/lib/typescript/Typography/Typography.Heading.d.ts +13 -0
- package/lib/typescript/Typography/Typography.Heading.d.ts.map +1 -0
- package/lib/typescript/Typography/Typography.Text.d.ts +29 -0
- package/lib/typescript/Typography/Typography.Text.d.ts.map +1 -0
- package/lib/typescript/Typography/index.d.ts +8 -0
- package/lib/typescript/Typography/index.d.ts.map +1 -0
- package/lib/typescript/icons/AddItemIcon.d.ts +5 -0
- package/lib/typescript/icons/AddItemIcon.d.ts.map +1 -0
- package/lib/typescript/icons/ArrangeCircle.d.ts +5 -0
- package/lib/typescript/icons/ArrangeCircle.d.ts.map +1 -0
- package/lib/typescript/icons/ArrowDownIcon.d.ts +5 -0
- package/lib/typescript/icons/ArrowDownIcon.d.ts.map +1 -0
- package/lib/typescript/icons/ArrowUpIcon.d.ts +5 -0
- package/lib/typescript/icons/ArrowUpIcon.d.ts.map +1 -0
- package/lib/typescript/icons/BoxIcon.d.ts +5 -0
- package/lib/typescript/icons/BoxIcon.d.ts.map +1 -0
- package/lib/typescript/icons/BoxTimeIcon.d.ts +5 -0
- package/lib/typescript/icons/BoxTimeIcon.d.ts.map +1 -0
- package/lib/typescript/icons/CalendarIcon.d.ts +5 -0
- package/lib/typescript/icons/CalendarIcon.d.ts.map +1 -0
- package/lib/typescript/icons/CardIcon.d.ts +5 -0
- package/lib/typescript/icons/CardIcon.d.ts.map +1 -0
- package/lib/typescript/icons/CashierIcon.d.ts +5 -0
- package/lib/typescript/icons/CashierIcon.d.ts.map +1 -0
- package/lib/typescript/icons/CreditIcon.d.ts +8 -0
- package/lib/typescript/icons/CreditIcon.d.ts.map +1 -0
- package/lib/typescript/icons/DuoIcon.d.ts +5 -0
- package/lib/typescript/icons/DuoIcon.d.ts.map +1 -0
- package/lib/typescript/icons/HomeIcon.d.ts +5 -0
- package/lib/typescript/icons/HomeIcon.d.ts.map +1 -0
- package/lib/typescript/icons/HomeIconOutlined.d.ts +5 -0
- package/lib/typescript/icons/HomeIconOutlined.d.ts.map +1 -0
- package/lib/typescript/icons/LogoIcon.d.ts +5 -0
- package/lib/typescript/icons/LogoIcon.d.ts.map +1 -0
- package/lib/typescript/icons/MoneyReceiveIcon.d.ts +5 -0
- package/lib/typescript/icons/MoneyReceiveIcon.d.ts.map +1 -0
- package/lib/typescript/icons/OdooIcon.d.ts +7 -0
- package/lib/typescript/icons/OdooIcon.d.ts.map +1 -0
- package/lib/typescript/icons/PinIcon.d.ts +5 -0
- package/lib/typescript/icons/PinIcon.d.ts.map +1 -0
- package/lib/typescript/icons/PrinterIcon.d.ts +5 -0
- package/lib/typescript/icons/PrinterIcon.d.ts.map +1 -0
- package/lib/typescript/icons/ProfileIcon.d.ts +5 -0
- package/lib/typescript/icons/ProfileIcon.d.ts.map +1 -0
- package/lib/typescript/icons/SettingsIcon.d.ts +5 -0
- package/lib/typescript/icons/SettingsIcon.d.ts.map +1 -0
- package/lib/typescript/icons/SinpeIcon.d.ts +5 -0
- package/lib/typescript/icons/SinpeIcon.d.ts.map +1 -0
- package/lib/typescript/icons/ToggleOffIcon.d.ts +5 -0
- package/lib/typescript/icons/ToggleOffIcon.d.ts.map +1 -0
- package/lib/typescript/icons/WalletMoneyIcon.d.ts +5 -0
- package/lib/typescript/icons/WalletMoneyIcon.d.ts.map +1 -0
- package/lib/typescript/icons/icon_getters.d.ts +7 -0
- package/lib/typescript/icons/icon_getters.d.ts.map +1 -0
- package/lib/typescript/icons/props.d.ts +5 -0
- package/lib/typescript/icons/props.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +21 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/layouts/AuthContainer.d.ts +10 -0
- package/lib/typescript/layouts/AuthContainer.d.ts.map +1 -0
- package/lib/typescript/layouts/Container.d.ts +15 -0
- package/lib/typescript/layouts/Container.d.ts.map +1 -0
- package/lib/typescript/layouts/GradientContainer.d.ts +9 -0
- package/lib/typescript/layouts/GradientContainer.d.ts.map +1 -0
- package/lib/typescript/layouts/PlainLayout.d.ts +7 -0
- package/lib/typescript/layouts/PlainLayout.d.ts.map +1 -0
- package/lib/typescript/layouts/ScrollContainer.d.ts +9 -0
- package/lib/typescript/layouts/ScrollContainer.d.ts.map +1 -0
- package/lib/typescript/layouts/TabNavigatorLayout.d.ts +27 -0
- package/lib/typescript/layouts/TabNavigatorLayout.d.ts.map +1 -0
- package/lib/typescript/lib/date.d.ts +71 -0
- package/lib/typescript/lib/date.d.ts.map +1 -0
- package/lib/typescript/lib/icon.d.ts +2 -0
- package/lib/typescript/lib/icon.d.ts.map +1 -0
- package/lib/typescript/lib/monetary.d.ts +4 -0
- package/lib/typescript/lib/monetary.d.ts.map +1 -0
- package/lib/typescript/lib/quantity.d.ts +12 -0
- package/lib/typescript/lib/quantity.d.ts.map +1 -0
- package/lib/typescript/lib/serializer.d.ts +3 -0
- package/lib/typescript/lib/serializer.d.ts.map +1 -0
- package/lib/typescript/lib/timezone.d.ts +5 -0
- package/lib/typescript/lib/timezone.d.ts.map +1 -0
- package/lib/typescript/notifications/index.d.ts +2 -0
- package/lib/typescript/notifications/index.d.ts.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/primitives/BaseButton.d.ts +147 -0
- package/lib/typescript/primitives/BaseButton.d.ts.map +1 -0
- package/lib/typescript/primitives/Box.d.ts +8 -0
- package/lib/typescript/primitives/Box.d.ts.map +1 -0
- package/lib/typescript/primitives/Row.d.ts +12 -0
- package/lib/typescript/primitives/Row.d.ts.map +1 -0
- package/lib/typescript/primitives/Stack.d.ts +10 -0
- package/lib/typescript/primitives/Stack.d.ts.map +1 -0
- package/lib/typescript/primitives/index.d.ts +4 -0
- package/lib/typescript/primitives/index.d.ts.map +1 -0
- package/lib/typescript/providers/index.d.ts +1 -0
- package/lib/typescript/providers/index.d.ts.map +1 -0
- package/lib/typescript/theme/active.d.ts +4 -0
- package/lib/typescript/theme/active.d.ts.map +1 -0
- package/lib/typescript/theme/components/ThemedActivityIndicator.d.ts +22 -0
- package/lib/typescript/theme/components/ThemedActivityIndicator.d.ts.map +1 -0
- package/lib/typescript/theme/components/index.d.ts +10 -0
- package/lib/typescript/theme/components/index.d.ts.map +1 -0
- package/lib/typescript/theme/default.d.ts +3 -0
- package/lib/typescript/theme/default.d.ts.map +1 -0
- package/lib/typescript/theme/index.d.ts +5 -0
- package/lib/typescript/theme/index.d.ts.map +1 -0
- package/lib/typescript/theme/theme.d.ts +14 -0
- package/lib/typescript/theme/theme.d.ts.map +1 -0
- package/lib/typescript/theme/tw.d.ts +11 -0
- package/lib/typescript/theme/tw.d.ts.map +1 -0
- package/lib/typescript/theme/types.d.ts +93 -0
- package/lib/typescript/theme/types.d.ts.map +1 -0
- package/lib/typescript/theme/typography.d.ts +377 -0
- package/lib/typescript/theme/typography.d.ts.map +1 -0
- package/lib/typescript/theme/useTheme.d.ts +2 -0
- package/lib/typescript/theme/useTheme.d.ts.map +1 -0
- package/lib/typescript/views/AuthFormView.d.ts +10 -0
- package/lib/typescript/views/AuthFormView.d.ts.map +1 -0
- package/lib/typescript/views/FormViewV2.context.d.ts +33 -0
- package/lib/typescript/views/FormViewV2.context.d.ts.map +1 -0
- package/lib/typescript/views/FormViewV2.d.ts +61 -0
- package/lib/typescript/views/FormViewV2.d.ts.map +1 -0
- package/lib/typescript/views/ListViewV2.context.d.ts +37 -0
- package/lib/typescript/views/ListViewV2.context.d.ts.map +1 -0
- package/lib/typescript/views/ListViewV2.d.ts +132 -0
- package/lib/typescript/views/ListViewV2.d.ts.map +1 -0
- package/lib/typescript/views/Wizard/Wizard.context.d.ts +27 -0
- package/lib/typescript/views/Wizard/Wizard.context.d.ts.map +1 -0
- package/lib/typescript/views/Wizard/Wizard.d.ts +34 -0
- package/lib/typescript/views/Wizard/Wizard.d.ts.map +1 -0
- package/lib/typescript/views/Wizard/index.d.ts +5 -0
- package/lib/typescript/views/Wizard/index.d.ts.map +1 -0
- package/lib/typescript/views/types/IFormView.d.ts +23 -0
- package/lib/typescript/views/types/IFormView.d.ts.map +1 -0
- package/lib/typescript/views/types/IListView.d.ts +35 -0
- package/lib/typescript/views/types/IListView.d.ts.map +1 -0
- package/lib/typescript/views/types/UIItem.d.ts +22 -0
- package/lib/typescript/views/types/UIItem.d.ts.map +1 -0
- package/lib/typescript/widgets/CircleButton.d.ts +16 -0
- package/lib/typescript/widgets/CircleButton.d.ts.map +1 -0
- package/lib/typescript/widgets/GeoPermissionCard.d.ts +9 -0
- package/lib/typescript/widgets/GeoPermissionCard.d.ts.map +1 -0
- package/lib/typescript/widgets/HomeHeader.d.ts +10 -0
- package/lib/typescript/widgets/HomeHeader.d.ts.map +1 -0
- package/lib/typescript/widgets/JSONViewer.d.ts +6 -0
- package/lib/typescript/widgets/JSONViewer.d.ts.map +1 -0
- package/lib/typescript/widgets/MenuCard.d.ts +14 -0
- package/lib/typescript/widgets/MenuCard.d.ts.map +1 -0
- package/lib/typescript/widgets/MenuGrid.d.ts +18 -0
- package/lib/typescript/widgets/MenuGrid.d.ts.map +1 -0
- package/lib/typescript/widgets/ScreenHeader.d.ts +20 -0
- package/lib/typescript/widgets/ScreenHeader.d.ts.map +1 -0
- package/lib/typescript/widgets/TimeZoneSelector.d.ts +8 -0
- package/lib/typescript/widgets/TimeZoneSelector.d.ts.map +1 -0
- package/lib/typescript/widgets/TimeZoneSelectorModal.d.ts +10 -0
- package/lib/typescript/widgets/TimeZoneSelectorModal.d.ts.map +1 -0
- package/lib/typescript/widgets/index.d.ts +8 -0
- package/lib/typescript/widgets/index.d.ts.map +1 -0
- package/package.json +273 -0
- package/sincpro_mobile_ui/Dialog/BottomSheet/BottomSheet.Root.tsx +509 -0
- package/sincpro_mobile_ui/Dialog/BottomSheet/index.ts +1 -0
- package/sincpro_mobile_ui/Dialog/Confirmation.context.tsx +148 -0
- package/sincpro_mobile_ui/Dialog/Dialog.Confirmation.tsx +68 -0
- package/sincpro_mobile_ui/Dialog/Dialog.EditValue.tsx +134 -0
- package/sincpro_mobile_ui/Dialog/index.ts +23 -0
- package/sincpro_mobile_ui/Display/Display.Avatar.tsx +60 -0
- package/sincpro_mobile_ui/Display/Display.Badge.tsx +72 -0
- package/sincpro_mobile_ui/Display/Display.CopyableText.tsx +38 -0
- package/sincpro_mobile_ui/Display/Display.CountRecords.tsx +26 -0
- package/sincpro_mobile_ui/Display/Display.Date.tsx +59 -0
- package/sincpro_mobile_ui/Display/Display.Divider.tsx +40 -0
- package/sincpro_mobile_ui/Display/Display.Icon.tsx +69 -0
- package/sincpro_mobile_ui/Display/Display.Logo.tsx +51 -0
- package/sincpro_mobile_ui/Display/Display.MenuButton.tsx +103 -0
- package/sincpro_mobile_ui/Display/Display.Monetary.tsx +60 -0
- package/sincpro_mobile_ui/Display/index.ts +28 -0
- package/sincpro_mobile_ui/Feedback/ErrorBoundary.tsx +51 -0
- package/sincpro_mobile_ui/Feedback/Feedback.DomainSplashScreen.tsx +135 -0
- package/sincpro_mobile_ui/Feedback/Feedback.Empty.tsx +29 -0
- package/sincpro_mobile_ui/Feedback/Feedback.Error.tsx +47 -0
- package/sincpro_mobile_ui/Feedback/Feedback.Loading.tsx +27 -0
- package/sincpro_mobile_ui/Feedback/Feedback.Spinner.tsx +34 -0
- package/sincpro_mobile_ui/Feedback/Feedback.Splash.tsx +68 -0
- package/sincpro_mobile_ui/Feedback/index.ts +17 -0
- package/sincpro_mobile_ui/Form/Form.Button.tsx +461 -0
- package/sincpro_mobile_ui/Form/Form.Checkbox.tsx +89 -0
- package/sincpro_mobile_ui/Form/Form.ControlledCheckbox.tsx +34 -0
- package/sincpro_mobile_ui/Form/Form.ControlledDropdown.tsx +22 -0
- package/sincpro_mobile_ui/Form/Form.ControlledInput.tsx +53 -0
- package/sincpro_mobile_ui/Form/Form.ControlledMonetaryInput.tsx +41 -0
- package/sincpro_mobile_ui/Form/Form.ControlledRadioButton.tsx +33 -0
- package/sincpro_mobile_ui/Form/Form.Dropdown.tsx +171 -0
- package/sincpro_mobile_ui/Form/Form.FilterButton.tsx +59 -0
- package/sincpro_mobile_ui/Form/Form.FractionalQuantityInput.tsx +190 -0
- package/sincpro_mobile_ui/Form/Form.IconButton.tsx +102 -0
- package/sincpro_mobile_ui/Form/Form.Input.tsx +88 -0
- package/sincpro_mobile_ui/Form/Form.InputField.tsx +66 -0
- package/sincpro_mobile_ui/Form/Form.MonetaryInput.tsx +66 -0
- package/sincpro_mobile_ui/Form/Form.PasswordInput.tsx +42 -0
- package/sincpro_mobile_ui/Form/Form.QuantitySelector.tsx +81 -0
- package/sincpro_mobile_ui/Form/Form.RadioButton.tsx +52 -0
- package/sincpro_mobile_ui/Form/Form.SearchBar.tsx +64 -0
- package/sincpro_mobile_ui/Form/Form.TextInput.tsx +26 -0
- package/sincpro_mobile_ui/Form/index.ts +46 -0
- package/sincpro_mobile_ui/Navigation/Navigation.Header.tsx +50 -0
- package/sincpro_mobile_ui/Navigation/Navigation.HeaderToolbar.tsx +111 -0
- package/sincpro_mobile_ui/Navigation/Navigation.RowItem.tsx +33 -0
- package/sincpro_mobile_ui/Navigation/Navigation.TabIcon.tsx +45 -0
- package/sincpro_mobile_ui/Navigation/Navigation.TabItem.tsx +43 -0
- package/sincpro_mobile_ui/Navigation/index.ts +15 -0
- package/sincpro_mobile_ui/Typography/Typography.Heading.tsx +20 -0
- package/sincpro_mobile_ui/Typography/Typography.Text.tsx +78 -0
- package/sincpro_mobile_ui/Typography/index.ts +11 -0
- package/sincpro_mobile_ui/icons/AddItemIcon.tsx +46 -0
- package/sincpro_mobile_ui/icons/ArrangeCircle.tsx +50 -0
- package/sincpro_mobile_ui/icons/ArrowDownIcon.tsx +33 -0
- package/sincpro_mobile_ui/icons/ArrowUpIcon.tsx +33 -0
- package/sincpro_mobile_ui/icons/BoxIcon.tsx +32 -0
- package/sincpro_mobile_ui/icons/BoxTimeIcon.tsx +27 -0
- package/sincpro_mobile_ui/icons/CalendarIcon.tsx +85 -0
- package/sincpro_mobile_ui/icons/CardIcon.tsx +44 -0
- package/sincpro_mobile_ui/icons/CashierIcon.tsx +15 -0
- package/sincpro_mobile_ui/icons/CreditIcon.tsx +44 -0
- package/sincpro_mobile_ui/icons/DuoIcon.tsx +39 -0
- package/sincpro_mobile_ui/icons/HomeIcon.tsx +15 -0
- package/sincpro_mobile_ui/icons/HomeIconOutlined.tsx +24 -0
- package/sincpro_mobile_ui/icons/LogoIcon.tsx +39 -0
- package/sincpro_mobile_ui/icons/MoneyReceiveIcon.tsx +46 -0
- package/sincpro_mobile_ui/icons/OdooIcon.tsx +23 -0
- package/sincpro_mobile_ui/icons/PinIcon.tsx +15 -0
- package/sincpro_mobile_ui/icons/PrinterIcon.tsx +46 -0
- package/sincpro_mobile_ui/icons/ProfileIcon.tsx +19 -0
- package/sincpro_mobile_ui/icons/SettingsIcon.tsx +66 -0
- package/sincpro_mobile_ui/icons/SinpeIcon.tsx +29 -0
- package/sincpro_mobile_ui/icons/ToggleOffIcon.tsx +25 -0
- package/sincpro_mobile_ui/icons/WalletMoneyIcon.tsx +41 -0
- package/sincpro_mobile_ui/icons/icon_getters.tsx +27 -0
- package/sincpro_mobile_ui/icons/props.ts +4 -0
- package/sincpro_mobile_ui/index.ts +38 -0
- package/sincpro_mobile_ui/layouts/AuthContainer.tsx +73 -0
- package/sincpro_mobile_ui/layouts/Container.tsx +40 -0
- package/sincpro_mobile_ui/layouts/GradientContainer.tsx +22 -0
- package/sincpro_mobile_ui/layouts/PlainLayout.tsx +14 -0
- package/sincpro_mobile_ui/layouts/ScrollContainer.tsx +37 -0
- package/sincpro_mobile_ui/layouts/TabNavigatorLayout.tsx +154 -0
- package/sincpro_mobile_ui/lib/date.ts +149 -0
- package/sincpro_mobile_ui/lib/icon.ts +10 -0
- package/sincpro_mobile_ui/lib/monetary.ts +33 -0
- package/sincpro_mobile_ui/lib/quantity.ts +52 -0
- package/sincpro_mobile_ui/lib/serializer.ts +59 -0
- package/sincpro_mobile_ui/lib/timezone.ts +4 -0
- package/sincpro_mobile_ui/nativewind-env.d.ts +1 -0
- package/sincpro_mobile_ui/notifications/index.ts +2 -0
- package/sincpro_mobile_ui/primitives/BaseButton.tsx +404 -0
- package/sincpro_mobile_ui/primitives/Box.tsx +14 -0
- package/sincpro_mobile_ui/primitives/Row.tsx +55 -0
- package/sincpro_mobile_ui/primitives/Stack.tsx +29 -0
- package/sincpro_mobile_ui/primitives/index.ts +3 -0
- package/sincpro_mobile_ui/providers/index.ts +1 -0
- package/sincpro_mobile_ui/theme/active.ts +12 -0
- package/sincpro_mobile_ui/theme/components/ThemedActivityIndicator.tsx +29 -0
- package/sincpro_mobile_ui/theme/components/index.ts +10 -0
- package/sincpro_mobile_ui/theme/default.ts +81 -0
- package/sincpro_mobile_ui/theme/globals.css +67 -0
- package/sincpro_mobile_ui/theme/index.ts +4 -0
- package/sincpro_mobile_ui/theme/theme.ts +16 -0
- package/sincpro_mobile_ui/theme/tw.ts +16 -0
- package/sincpro_mobile_ui/theme/types.ts +109 -0
- package/sincpro_mobile_ui/theme/typography.ts +271 -0
- package/sincpro_mobile_ui/theme/useTheme.ts +3 -0
- package/sincpro_mobile_ui/views/AuthFormView.tsx +46 -0
- package/sincpro_mobile_ui/views/FormViewV2.context.tsx +79 -0
- package/sincpro_mobile_ui/views/FormViewV2.tsx +248 -0
- package/sincpro_mobile_ui/views/ListViewV2.context.tsx +87 -0
- package/sincpro_mobile_ui/views/ListViewV2.tsx +575 -0
- package/sincpro_mobile_ui/views/Wizard/Wizard.context.tsx +164 -0
- package/sincpro_mobile_ui/views/Wizard/Wizard.tsx +147 -0
- package/sincpro_mobile_ui/views/Wizard/index.ts +11 -0
- package/sincpro_mobile_ui/views/types/IFormView.ts +24 -0
- package/sincpro_mobile_ui/views/types/IListView.ts +78 -0
- package/sincpro_mobile_ui/views/types/UIItem.ts +23 -0
- package/sincpro_mobile_ui/widgets/CircleButton.tsx +63 -0
- package/sincpro_mobile_ui/widgets/GeoPermissionCard.tsx +62 -0
- package/sincpro_mobile_ui/widgets/HomeHeader.tsx +50 -0
- package/sincpro_mobile_ui/widgets/JSONViewer.tsx +192 -0
- package/sincpro_mobile_ui/widgets/MenuCard.tsx +37 -0
- package/sincpro_mobile_ui/widgets/MenuGrid.tsx +33 -0
- package/sincpro_mobile_ui/widgets/ScreenHeader.tsx +72 -0
- package/sincpro_mobile_ui/widgets/TimeZoneSelector.tsx +83 -0
- package/sincpro_mobile_ui/widgets/TimeZoneSelectorModal.tsx +179 -0
- package/sincpro_mobile_ui/widgets/index.ts +7 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
import CurrencyInput from "react-native-currency-input";
|
|
4
|
+
|
|
5
|
+
import { parseToMonetaryNumber } from "../lib/monetary";
|
|
6
|
+
import { tv } from "../theme/tw";
|
|
7
|
+
import { Typography } from "../Typography";
|
|
8
|
+
|
|
9
|
+
const monetaryBox = tv({
|
|
10
|
+
base: "justify-center items-center bg-bg-card rounded-lg",
|
|
11
|
+
variants: {
|
|
12
|
+
focused: {
|
|
13
|
+
true: "border-2 border-border-focus",
|
|
14
|
+
false: "border border-border-default",
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: { focused: false },
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
interface MonetaryInputProps {
|
|
21
|
+
amount?: number;
|
|
22
|
+
onChange?: (value: number) => void;
|
|
23
|
+
currencySymbol?: string;
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function MonetaryInput({
|
|
28
|
+
amount,
|
|
29
|
+
onChange,
|
|
30
|
+
currencySymbol = "₡",
|
|
31
|
+
placeholder = "Escriba el monto",
|
|
32
|
+
}: MonetaryInputProps) {
|
|
33
|
+
const [raw, setRaw] = useState<number>(parseToMonetaryNumber(amount));
|
|
34
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
35
|
+
|
|
36
|
+
const handleChange = (amount: number) => {
|
|
37
|
+
setRaw(amount);
|
|
38
|
+
onChange?.(parseToMonetaryNumber(amount));
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<View className="flex-row">
|
|
43
|
+
<View className={monetaryBox({ focused: isFocused, className: "w-10 h-10" })}>
|
|
44
|
+
<Typography.Text className="text-xl" variant="body">
|
|
45
|
+
{currencySymbol}
|
|
46
|
+
</Typography.Text>
|
|
47
|
+
</View>
|
|
48
|
+
<View
|
|
49
|
+
className={monetaryBox({ focused: isFocused, className: "flex-1 h-10 ml-2 px-4" })}
|
|
50
|
+
>
|
|
51
|
+
<CurrencyInput
|
|
52
|
+
delimiter="."
|
|
53
|
+
keyboardType="numeric"
|
|
54
|
+
onBlur={() => setIsFocused(false)}
|
|
55
|
+
onChangeValue={handleChange}
|
|
56
|
+
onFocus={() => setIsFocused(true)}
|
|
57
|
+
placeholder={placeholder}
|
|
58
|
+
separator=","
|
|
59
|
+
value={raw}
|
|
60
|
+
/>
|
|
61
|
+
</View>
|
|
62
|
+
</View>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export default MonetaryInput;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Ionicons } from "@expo/vector-icons";
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
import { TouchableOpacity, View } from "react-native";
|
|
4
|
+
|
|
5
|
+
import InputField from "./Form.InputField";
|
|
6
|
+
|
|
7
|
+
export interface PasswordFieldProps {
|
|
8
|
+
label: string;
|
|
9
|
+
error?: string;
|
|
10
|
+
inputProps: React.ComponentProps<typeof InputField>["inputProps"];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const PasswordField: React.FC<PasswordFieldProps> = ({ label, error, inputProps }) => {
|
|
14
|
+
const [showPassword, setShowPassword] = useState(false);
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<View className="mb-4 relative">
|
|
18
|
+
<InputField
|
|
19
|
+
error={error}
|
|
20
|
+
inputProps={{
|
|
21
|
+
...inputProps,
|
|
22
|
+
secureTextEntry: !showPassword,
|
|
23
|
+
autoComplete: "off",
|
|
24
|
+
importantForAutofill: "no",
|
|
25
|
+
}}
|
|
26
|
+
label={label}
|
|
27
|
+
/>
|
|
28
|
+
<TouchableOpacity
|
|
29
|
+
className="absolute right-3 bottom-[25px]"
|
|
30
|
+
onPress={() => setShowPassword(!showPassword)}
|
|
31
|
+
>
|
|
32
|
+
<Ionicons
|
|
33
|
+
className="text-text-primary"
|
|
34
|
+
name={showPassword ? "eye-off-outline" : "eye-outline"}
|
|
35
|
+
size={24}
|
|
36
|
+
/>
|
|
37
|
+
</TouchableOpacity>
|
|
38
|
+
</View>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default PasswordField;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import { StyleProp, TouchableOpacity, View, ViewStyle } from "react-native";
|
|
3
|
+
import { tv } from "tailwind-variants";
|
|
4
|
+
|
|
5
|
+
import { Display } from "../Display";
|
|
6
|
+
import { Typography } from "../Typography";
|
|
7
|
+
|
|
8
|
+
const quantitySelector = tv({
|
|
9
|
+
slots: {
|
|
10
|
+
container: "flex-row items-center border border-brand-accent rounded-full px-1",
|
|
11
|
+
button: "w-9 h-9 rounded-full justify-center items-center",
|
|
12
|
+
valueContainer: "min-w-[40px] items-center px-3",
|
|
13
|
+
},
|
|
14
|
+
variants: {
|
|
15
|
+
disabled: {
|
|
16
|
+
true: {
|
|
17
|
+
button: "opacity-50",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
interface QuantitySelectorProps {
|
|
24
|
+
value: number;
|
|
25
|
+
onChange: (value: number) => void;
|
|
26
|
+
min?: number;
|
|
27
|
+
max?: number;
|
|
28
|
+
style?: StyleProp<ViewStyle>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function QuantitySelector({
|
|
32
|
+
value,
|
|
33
|
+
onChange,
|
|
34
|
+
min = 1,
|
|
35
|
+
max = 999,
|
|
36
|
+
style,
|
|
37
|
+
}: QuantitySelectorProps) {
|
|
38
|
+
const handleDecrement = () => {
|
|
39
|
+
if (value > min) {
|
|
40
|
+
onChange(value - 1);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const handleIncrement = () => {
|
|
45
|
+
if (value < max) {
|
|
46
|
+
onChange(value + 1);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const decrementStyles = quantitySelector({ disabled: value <= min });
|
|
51
|
+
const incrementStyles = quantitySelector({ disabled: value >= max });
|
|
52
|
+
const containerStyles = quantitySelector();
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<View className={containerStyles.container()} style={style}>
|
|
56
|
+
<TouchableOpacity
|
|
57
|
+
className={decrementStyles.button()}
|
|
58
|
+
disabled={value <= min}
|
|
59
|
+
onPress={handleDecrement}
|
|
60
|
+
>
|
|
61
|
+
<Display.Icon name="minus" size={16} type="feather" />
|
|
62
|
+
</TouchableOpacity>
|
|
63
|
+
|
|
64
|
+
<View className={containerStyles.valueContainer()}>
|
|
65
|
+
<Typography.Text semibold variant="body">
|
|
66
|
+
{value}
|
|
67
|
+
</Typography.Text>
|
|
68
|
+
</View>
|
|
69
|
+
|
|
70
|
+
<TouchableOpacity
|
|
71
|
+
className={incrementStyles.button()}
|
|
72
|
+
disabled={value >= max}
|
|
73
|
+
onPress={handleIncrement}
|
|
74
|
+
>
|
|
75
|
+
<Display.Icon name="plus" size={16} type="feather" />
|
|
76
|
+
</TouchableOpacity>
|
|
77
|
+
</View>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export default QuantitySelector;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { TouchableOpacity, View } from "react-native";
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
|
|
4
|
+
import { Typography } from "../Typography";
|
|
5
|
+
|
|
6
|
+
const radioButton = tv({
|
|
7
|
+
slots: {
|
|
8
|
+
container:
|
|
9
|
+
"flex-row items-center py-2.5 px-3 rounded-lg border-[1.5px] border-border-default bg-bg-card",
|
|
10
|
+
radioCircle:
|
|
11
|
+
"w-[18px] h-[18px] rounded-full border-2 border-border-default mr-2 justify-center items-center",
|
|
12
|
+
radioInner: "w-[9px] h-[9px] rounded-full",
|
|
13
|
+
label: "flex-1",
|
|
14
|
+
},
|
|
15
|
+
variants: {
|
|
16
|
+
selected: {
|
|
17
|
+
true: {
|
|
18
|
+
container: "border-accent bg-accent/10",
|
|
19
|
+
radioCircle: "border-accent",
|
|
20
|
+
radioInner: "bg-accent",
|
|
21
|
+
label: "text-text-primary font-semibold",
|
|
22
|
+
},
|
|
23
|
+
false: {
|
|
24
|
+
label: "text-text-secondary",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
defaultVariants: { selected: false },
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
interface RadioButtonProps {
|
|
32
|
+
label: string;
|
|
33
|
+
selected: boolean;
|
|
34
|
+
onPress: () => void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function RadioButton({ label, selected, onPress }: RadioButtonProps) {
|
|
38
|
+
const styles = radioButton({ selected });
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<TouchableOpacity activeOpacity={0.7} className={styles.container()} onPress={onPress}>
|
|
42
|
+
<View className={styles.radioCircle()}>
|
|
43
|
+
{selected && <View className={styles.radioInner()} />}
|
|
44
|
+
</View>
|
|
45
|
+
<Typography.Text className={styles.label()} variant="bodySmall">
|
|
46
|
+
{label}
|
|
47
|
+
</Typography.Text>
|
|
48
|
+
</TouchableOpacity>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export default RadioButton;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { TextInput, TouchableOpacity, View } from "react-native";
|
|
4
|
+
|
|
5
|
+
import { Display } from "../Display";
|
|
6
|
+
import { theme } from "../theme";
|
|
7
|
+
import { cn, tv } from "../theme/tw";
|
|
8
|
+
|
|
9
|
+
const Icon = Display.Icon;
|
|
10
|
+
|
|
11
|
+
const searchBarContainer = tv({
|
|
12
|
+
base: "flex-row items-center bg-bg-card rounded-lg px-2 h-10 shadow-sm",
|
|
13
|
+
variants: {
|
|
14
|
+
focused: {
|
|
15
|
+
true: "border-2 border-border-focus",
|
|
16
|
+
false: "border border-border-default",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: { focused: false },
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
interface SearchBarProps {
|
|
23
|
+
value: string;
|
|
24
|
+
onChangeText: (text: string) => void;
|
|
25
|
+
placeholder?: string;
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function SearchBar({
|
|
30
|
+
value,
|
|
31
|
+
onChangeText,
|
|
32
|
+
placeholder = "Search",
|
|
33
|
+
className,
|
|
34
|
+
}: SearchBarProps) {
|
|
35
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<View className={cn(searchBarContainer({ focused: isFocused }), className)}>
|
|
39
|
+
<View className="mr-1 ml-0.5 items-center justify-center h-full">
|
|
40
|
+
<Icon className="text-text-tertiary" name="search" size={18} type="ionicons" />
|
|
41
|
+
</View>
|
|
42
|
+
<TextInput
|
|
43
|
+
className="flex-1 h-full text-sm py-0 px-1.5 text-text-primary"
|
|
44
|
+
onBlur={() => setIsFocused(false)}
|
|
45
|
+
onChangeText={onChangeText}
|
|
46
|
+
onFocus={() => setIsFocused(true)}
|
|
47
|
+
placeholder={placeholder}
|
|
48
|
+
placeholderTextColor={theme.text.tertiary}
|
|
49
|
+
value={value}
|
|
50
|
+
/>
|
|
51
|
+
{value.length > 0 && (
|
|
52
|
+
<TouchableOpacity
|
|
53
|
+
activeOpacity={0.7}
|
|
54
|
+
className="mr-0.5 ml-1 items-center justify-center h-full px-1"
|
|
55
|
+
onPress={() => onChangeText("")}
|
|
56
|
+
>
|
|
57
|
+
<Icon className="text-text-tertiary" name="x" size={18} type="feather" />
|
|
58
|
+
</TouchableOpacity>
|
|
59
|
+
)}
|
|
60
|
+
</View>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export default SearchBar;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { TextInput, TextInputProps } from "react-native";
|
|
3
|
+
|
|
4
|
+
import { theme } from "../theme";
|
|
5
|
+
import { cn } from "../theme/tw";
|
|
6
|
+
|
|
7
|
+
export interface TextInputFProps extends TextInputProps {
|
|
8
|
+
error?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const TextInputF: FC<TextInputFProps> = ({ className, ...props }) => {
|
|
13
|
+
return (
|
|
14
|
+
<TextInput
|
|
15
|
+
{...props}
|
|
16
|
+
className={cn(
|
|
17
|
+
"border border-input rounded-md h-11 px-3 py-2 text-text-primary",
|
|
18
|
+
className,
|
|
19
|
+
)}
|
|
20
|
+
placeholderTextColor={theme.text.tertiary}
|
|
21
|
+
style={props.style}
|
|
22
|
+
/>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default TextInputF;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import ButtonWithIcon from "./Form.Button";
|
|
2
|
+
import Checkbox from "./Form.Checkbox";
|
|
3
|
+
import ControlledCheckbox from "./Form.ControlledCheckbox";
|
|
4
|
+
import ControlledDropdown, { type DropdownOption } from "./Form.ControlledDropdown";
|
|
5
|
+
import ControlledInput from "./Form.ControlledInput";
|
|
6
|
+
import ControlledMonetaryInput from "./Form.ControlledMonetaryInput";
|
|
7
|
+
import ControlledRadioButton from "./Form.ControlledRadioButton";
|
|
8
|
+
import Dropdown from "./Form.Dropdown";
|
|
9
|
+
import { FilterButton, FilterButtonGroup } from "./Form.FilterButton";
|
|
10
|
+
import FractionalQuantityInput from "./Form.FractionalQuantityInput";
|
|
11
|
+
import IconButton from "./Form.IconButton";
|
|
12
|
+
import Input from "./Form.Input";
|
|
13
|
+
import InputField from "./Form.InputField";
|
|
14
|
+
import MonetaryInput from "./Form.MonetaryInput";
|
|
15
|
+
import PasswordInput from "./Form.PasswordInput";
|
|
16
|
+
import QuantitySelector from "./Form.QuantitySelector";
|
|
17
|
+
import RadioButton from "./Form.RadioButton";
|
|
18
|
+
import SearchBar from "./Form.SearchBar";
|
|
19
|
+
import TextInput from "./Form.TextInput";
|
|
20
|
+
|
|
21
|
+
export const Form = {
|
|
22
|
+
TextInput,
|
|
23
|
+
Input,
|
|
24
|
+
InputField,
|
|
25
|
+
Button: ButtonWithIcon,
|
|
26
|
+
IconButton,
|
|
27
|
+
PasswordInput,
|
|
28
|
+
QuantitySelector,
|
|
29
|
+
FractionalQuantityInput,
|
|
30
|
+
RadioButton,
|
|
31
|
+
Checkbox,
|
|
32
|
+
SearchBar,
|
|
33
|
+
Dropdown,
|
|
34
|
+
MonetaryInput,
|
|
35
|
+
ControlledInput,
|
|
36
|
+
ControlledRadioButton,
|
|
37
|
+
ControlledCheckbox,
|
|
38
|
+
ControlledDropdown,
|
|
39
|
+
ControlledMonetaryInput,
|
|
40
|
+
FilterButton,
|
|
41
|
+
FilterButtonGroup,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export { type DropdownOption };
|
|
45
|
+
|
|
46
|
+
export default Form;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import { TouchableOpacity, View } from "react-native";
|
|
3
|
+
|
|
4
|
+
import { Display } from "../Display";
|
|
5
|
+
import GradientContainer from "../layouts/GradientContainer";
|
|
6
|
+
import { theme } from "../theme";
|
|
7
|
+
import { cn } from "../theme/tw";
|
|
8
|
+
import { Typography } from "../Typography";
|
|
9
|
+
|
|
10
|
+
export interface HeaderProps {
|
|
11
|
+
title?: string;
|
|
12
|
+
logo?: ReactNode;
|
|
13
|
+
backButton?: boolean;
|
|
14
|
+
handleBackButton?: () => void;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const Header = ({ title, logo, backButton, handleBackButton, className }: HeaderProps) => {
|
|
19
|
+
const onBackPress = handleBackButton ?? (() => {});
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<GradientContainer className={cn("pt-10 pb-3.5 px-4", className)}>
|
|
23
|
+
<View className="relative items-center justify-center">
|
|
24
|
+
{backButton && (
|
|
25
|
+
<TouchableOpacity
|
|
26
|
+
className="absolute top-0 left-0 z-10 border border-white p-1.5 rounded"
|
|
27
|
+
onPress={onBackPress}
|
|
28
|
+
>
|
|
29
|
+
<Display.Icon
|
|
30
|
+
color={theme.text.inverse}
|
|
31
|
+
name="chevron-back"
|
|
32
|
+
size={25}
|
|
33
|
+
type="ionicons"
|
|
34
|
+
/>
|
|
35
|
+
</TouchableOpacity>
|
|
36
|
+
)}
|
|
37
|
+
<View className="items-center justify-center">
|
|
38
|
+
{logo || <Display.Logo size="medium" />}
|
|
39
|
+
{title && (
|
|
40
|
+
<Typography.Text className="text-white" variant="h4">
|
|
41
|
+
{title}
|
|
42
|
+
</Typography.Text>
|
|
43
|
+
)}
|
|
44
|
+
</View>
|
|
45
|
+
</View>
|
|
46
|
+
</GradientContainer>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export default Header;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import { TouchableOpacity, View } from "react-native";
|
|
3
|
+
|
|
4
|
+
import { Display } from "../Display";
|
|
5
|
+
import GradientContainer from "../layouts/GradientContainer";
|
|
6
|
+
import { theme } from "../theme";
|
|
7
|
+
import { cn } from "../theme/tw";
|
|
8
|
+
import { Typography } from "../Typography";
|
|
9
|
+
|
|
10
|
+
const Icon = Display.Icon;
|
|
11
|
+
const Text = Typography.Text;
|
|
12
|
+
|
|
13
|
+
interface HeaderToolbarProps {
|
|
14
|
+
title?: string;
|
|
15
|
+
logo?: boolean;
|
|
16
|
+
centerTitle?: boolean;
|
|
17
|
+
subtitle?: string;
|
|
18
|
+
onBack?: () => void;
|
|
19
|
+
rightComponent?: React.ReactNode;
|
|
20
|
+
flat?: boolean;
|
|
21
|
+
children?: React.ReactNode;
|
|
22
|
+
withBackground?: boolean;
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function HeaderToolbar({
|
|
27
|
+
title = "",
|
|
28
|
+
subtitle,
|
|
29
|
+
onBack,
|
|
30
|
+
rightComponent,
|
|
31
|
+
centerTitle = false,
|
|
32
|
+
flat = false,
|
|
33
|
+
children,
|
|
34
|
+
logo = false,
|
|
35
|
+
withBackground = true,
|
|
36
|
+
className,
|
|
37
|
+
}: HeaderToolbarProps) {
|
|
38
|
+
const borderRadius = flat ? "rounded-none" : "rounded-b-[20px]";
|
|
39
|
+
const paddingBottom = flat ? "pb-0" : "pb-4";
|
|
40
|
+
|
|
41
|
+
function renderToolbar() {
|
|
42
|
+
return (
|
|
43
|
+
<>
|
|
44
|
+
<View className="flex-row items-center justify-between px-3.5 pt-2.5 h-16 relative">
|
|
45
|
+
{onBack && (
|
|
46
|
+
<TouchableOpacity
|
|
47
|
+
className="mr-3.5 border border-white rounded-lg items-center justify-center mb-3.5 p-1.5 z-[1]"
|
|
48
|
+
onPress={onBack}
|
|
49
|
+
>
|
|
50
|
+
<Icon
|
|
51
|
+
color={theme.text.inverse}
|
|
52
|
+
name="chevron-back"
|
|
53
|
+
size={25}
|
|
54
|
+
type="ionicons"
|
|
55
|
+
/>
|
|
56
|
+
</TouchableOpacity>
|
|
57
|
+
)}
|
|
58
|
+
|
|
59
|
+
{logo && (
|
|
60
|
+
<View className="absolute left-0 right-0 items-center justify-center z-0">
|
|
61
|
+
<Display.Logo size="medium" />
|
|
62
|
+
</View>
|
|
63
|
+
)}
|
|
64
|
+
|
|
65
|
+
{!logo && (
|
|
66
|
+
<View
|
|
67
|
+
className={cn(
|
|
68
|
+
"flex-1",
|
|
69
|
+
centerTitle && "absolute left-0 right-0 items-center justify-center z-[1]",
|
|
70
|
+
)}
|
|
71
|
+
>
|
|
72
|
+
<Text
|
|
73
|
+
className="text-white"
|
|
74
|
+
numberOfLines={1}
|
|
75
|
+
style={{ top: centerTitle ? 0 : -4 }}
|
|
76
|
+
variant={centerTitle ? "h4" : "h6"}
|
|
77
|
+
>
|
|
78
|
+
{title}
|
|
79
|
+
</Text>
|
|
80
|
+
{subtitle && (
|
|
81
|
+
<Text
|
|
82
|
+
className="text-white"
|
|
83
|
+
style={{ top: centerTitle ? 0 : -4 }}
|
|
84
|
+
variant="bodySmall"
|
|
85
|
+
>
|
|
86
|
+
{subtitle}
|
|
87
|
+
</Text>
|
|
88
|
+
)}
|
|
89
|
+
</View>
|
|
90
|
+
)}
|
|
91
|
+
|
|
92
|
+
{rightComponent && <View className="ml-auto">{rightComponent}</View>}
|
|
93
|
+
</View>
|
|
94
|
+
|
|
95
|
+
<View>{children}</View>
|
|
96
|
+
</>
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return withBackground ? (
|
|
101
|
+
<GradientContainer
|
|
102
|
+
className={cn("shadow-lg shadow-black/70", borderRadius, paddingBottom, className)}
|
|
103
|
+
>
|
|
104
|
+
{renderToolbar()}
|
|
105
|
+
</GradientContainer>
|
|
106
|
+
) : (
|
|
107
|
+
<>{renderToolbar()}</>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export default HeaderToolbar;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { TouchableOpacity, View } from "react-native";
|
|
2
|
+
|
|
3
|
+
import { cn } from "../theme/tw";
|
|
4
|
+
import { Typography } from "../Typography";
|
|
5
|
+
import { IRowItemProps } from "../views/types/IListView";
|
|
6
|
+
|
|
7
|
+
function RowItem({ item, className }: IRowItemProps<any> & { className?: string }) {
|
|
8
|
+
function rowContent() {
|
|
9
|
+
return (
|
|
10
|
+
<View className="flex-1">
|
|
11
|
+
<Typography.Text className="flex-1" variant="title">
|
|
12
|
+
{item.rowTitle}
|
|
13
|
+
</Typography.Text>
|
|
14
|
+
<Typography.Text className="mt-0.5 text-text-secondary" variant="bodySmall">
|
|
15
|
+
{item.rowSubtitle}
|
|
16
|
+
</Typography.Text>
|
|
17
|
+
</View>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return item.readonly ? (
|
|
22
|
+
<View className={cn("flex-row items-center py-2.5", className)}>{rowContent()}</View>
|
|
23
|
+
) : (
|
|
24
|
+
<TouchableOpacity
|
|
25
|
+
className={cn("flex-row items-center py-2.5", className)}
|
|
26
|
+
onPress={item.onPress}
|
|
27
|
+
>
|
|
28
|
+
{rowContent()}
|
|
29
|
+
</TouchableOpacity>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default RowItem;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ComponentType } from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
|
|
4
|
+
import { Display } from "../Display";
|
|
5
|
+
import { cn } from "../theme/tw";
|
|
6
|
+
|
|
7
|
+
const Icon = Display.Icon;
|
|
8
|
+
|
|
9
|
+
interface TabIconProps {
|
|
10
|
+
focused: boolean;
|
|
11
|
+
size?: number;
|
|
12
|
+
customIcon?: ComponentType<{ size?: number; color?: string }>;
|
|
13
|
+
type?: "custom" | "ionicons" | "fontawesome" | "material" | "fontawesome5";
|
|
14
|
+
name?: any;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function TabIcon({
|
|
19
|
+
focused,
|
|
20
|
+
size = 24,
|
|
21
|
+
customIcon,
|
|
22
|
+
type = "custom",
|
|
23
|
+
name,
|
|
24
|
+
className,
|
|
25
|
+
}: TabIconProps) {
|
|
26
|
+
return (
|
|
27
|
+
<View
|
|
28
|
+
className={cn(
|
|
29
|
+
"justify-center items-center h-9 w-14 rounded-2xl",
|
|
30
|
+
focused && "bg-primary shadow-sm",
|
|
31
|
+
className,
|
|
32
|
+
)}
|
|
33
|
+
>
|
|
34
|
+
<Icon
|
|
35
|
+
className={focused ? "text-white" : "text-text-secondary"}
|
|
36
|
+
customIcon={customIcon}
|
|
37
|
+
name={name}
|
|
38
|
+
size={size}
|
|
39
|
+
type={type}
|
|
40
|
+
/>
|
|
41
|
+
</View>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export default TabIcon;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ComponentType, FC } from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
|
|
4
|
+
import { Display } from "../Display";
|
|
5
|
+
import { cn } from "../theme/tw";
|
|
6
|
+
|
|
7
|
+
export interface TabIconProps {
|
|
8
|
+
focused: boolean;
|
|
9
|
+
size?: number;
|
|
10
|
+
customIcon?: ComponentType<{ size?: number; color?: string }>;
|
|
11
|
+
type?: "custom" | "ionicons" | "fontawesome" | "material" | "fontawesome5";
|
|
12
|
+
name?: any;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const TabIcon: FC<TabIconProps> = ({
|
|
17
|
+
focused,
|
|
18
|
+
size = 24,
|
|
19
|
+
customIcon,
|
|
20
|
+
type = "custom",
|
|
21
|
+
name,
|
|
22
|
+
className,
|
|
23
|
+
}) => {
|
|
24
|
+
return (
|
|
25
|
+
<View
|
|
26
|
+
className={cn(
|
|
27
|
+
"justify-center items-center w-12 h-12 rounded-full",
|
|
28
|
+
focused ? "bg-primary shadow-md" : "bg-transparent",
|
|
29
|
+
className,
|
|
30
|
+
)}
|
|
31
|
+
>
|
|
32
|
+
<Display.Icon
|
|
33
|
+
color={focused ? "#FFFFFF" : "#6B7280"}
|
|
34
|
+
customIcon={customIcon}
|
|
35
|
+
name={name}
|
|
36
|
+
size={size}
|
|
37
|
+
type={type as any}
|
|
38
|
+
/>
|
|
39
|
+
</View>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export default TabIcon;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Header from "./Navigation.Header";
|
|
2
|
+
import HeaderToolbar from "./Navigation.HeaderToolbar";
|
|
3
|
+
import RowItem from "./Navigation.RowItem";
|
|
4
|
+
import TabIcon from "./Navigation.TabIcon";
|
|
5
|
+
import TabItem from "./Navigation.TabItem";
|
|
6
|
+
|
|
7
|
+
export const Navigation = {
|
|
8
|
+
Header,
|
|
9
|
+
HeaderToolbar,
|
|
10
|
+
TabItem,
|
|
11
|
+
TabIcon,
|
|
12
|
+
RowItem,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default Navigation;
|