@sincpro/mobile-ui 0.1.3 → 0.1.4
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/lib/Dialog/BottomSheet/BottomSheet.Root.js +1 -1
- package/lib/Dialog/Confirmation.context.js +1 -1
- package/lib/Dialog/Dialog.Confirmation.js +1 -1
- package/lib/Dialog/Dialog.EditValue.js +1 -1
- package/lib/Display/Display.Avatar.js +1 -1
- package/lib/Display/Display.Badge.js +1 -1
- package/lib/Display/Display.CopyableText.js +1 -1
- package/lib/Display/Display.CountRecords.js +1 -1
- package/lib/Display/Display.Date.js +7 -8
- package/lib/Display/Display.Divider.js +1 -1
- package/lib/Display/Display.Icon.js +1 -1
- package/lib/Display/Display.Logo.js +1 -1
- package/lib/Display/Display.MenuButton.js +1 -1
- package/lib/Display/Display.Monetary.js +1 -1
- package/lib/Feedback/ErrorBoundary.js +1 -1
- package/lib/Feedback/Feedback.DomainSplashScreen.js +1 -1
- package/lib/Feedback/Feedback.Empty.js +1 -1
- package/lib/Feedback/Feedback.Error.js +1 -1
- package/lib/Feedback/Feedback.Loading.js +1 -1
- package/lib/Feedback/Feedback.Spinner.js +1 -1
- package/lib/Feedback/Feedback.Splash.js +1 -1
- package/lib/Form/Form.Button.js +1 -1
- package/lib/Form/Form.Checkbox.js +1 -1
- package/lib/Form/Form.ControlledCheckbox.js +1 -1
- package/lib/Form/Form.ControlledInput.js +1 -1
- package/lib/Form/Form.ControlledMonetaryInput.js +1 -1
- package/lib/Form/Form.ControlledRadioButton.js +1 -1
- package/lib/Form/Form.Dropdown.js +1 -1
- package/lib/Form/Form.FilterButton.js +1 -1
- package/lib/Form/Form.FractionalQuantityInput.js +1 -1
- package/lib/Form/Form.IconButton.js +1 -1
- package/lib/Form/Form.Input.js +1 -1
- package/lib/Form/Form.InputField.js +1 -1
- package/lib/Form/Form.MonetaryInput.js +1 -1
- package/lib/Form/Form.PasswordInput.js +1 -1
- package/lib/Form/Form.QuantitySelector.js +1 -1
- package/lib/Form/Form.RadioButton.js +1 -1
- package/lib/Form/Form.SearchBar.js +1 -1
- package/lib/Form/Form.TextInput.js +1 -1
- package/lib/Navigation/Navigation.Header.d.ts +3 -1
- package/lib/Navigation/Navigation.Header.js +3 -3
- package/lib/Navigation/Navigation.HeaderToolbar.js +1 -1
- package/lib/Navigation/Navigation.RowItem.js +1 -1
- package/lib/Navigation/Navigation.TabIcon.js +1 -1
- package/lib/Navigation/Navigation.TabItem.js +1 -1
- package/lib/Navigation/index.d.ts +1 -1
- package/lib/Typography/Typography.Heading.js +1 -1
- package/lib/Typography/Typography.Text.js +1 -1
- package/lib/icons/AddItemIcon.js +1 -1
- package/lib/icons/ArrangeCircle.js +1 -1
- package/lib/icons/ArrowDownIcon.js +1 -1
- package/lib/icons/ArrowUpIcon.js +1 -1
- package/lib/icons/BoxIcon.js +1 -1
- package/lib/icons/BoxTimeIcon.js +1 -1
- package/lib/icons/CalendarIcon.js +1 -1
- package/lib/icons/CardIcon.js +1 -1
- package/lib/icons/CashierIcon.js +1 -1
- package/lib/icons/CreditIcon.js +1 -1
- package/lib/icons/DuoIcon.js +1 -1
- package/lib/icons/HomeIcon.js +1 -1
- package/lib/icons/HomeIconOutlined.js +1 -1
- package/lib/icons/LogoIcon.js +1 -1
- package/lib/icons/MoneyReceiveIcon.js +1 -1
- package/lib/icons/OdooIcon.js +1 -1
- package/lib/icons/PinIcon.js +1 -1
- package/lib/icons/PrinterIcon.js +1 -1
- package/lib/icons/ProfileIcon.js +1 -1
- package/lib/icons/SettingsIcon.js +1 -1
- package/lib/icons/SinpeIcon.js +1 -1
- package/lib/icons/ToggleOffIcon.js +1 -1
- package/lib/icons/WalletMoneyIcon.js +1 -1
- package/lib/layouts/AuthContainer.js +1 -1
- package/lib/layouts/Container.js +1 -1
- package/lib/layouts/GradientContainer.js +1 -1
- package/lib/layouts/PlainLayout.js +1 -1
- package/lib/layouts/ScrollContainer.js +1 -1
- package/lib/layouts/TabNavigatorLayout.d.ts +1 -1
- package/lib/layouts/TabNavigatorLayout.js +1 -1
- package/lib/primitives/BaseButton.js +1 -1
- package/lib/primitives/Box.js +1 -1
- package/lib/primitives/Row.js +1 -1
- package/lib/primitives/Stack.js +1 -1
- package/lib/tailwind.preset.js +146 -0
- package/lib/theme/components/ThemedActivityIndicator.js +1 -1
- package/lib/theme/css-vars.d.ts +7 -0
- package/lib/theme/css-vars.js +64 -0
- package/lib/theme/define.d.ts +18 -0
- package/lib/theme/define.js +34 -0
- package/lib/theme/globals.css +67 -0
- package/lib/theme/index.d.ts +4 -1
- package/lib/theme/index.js +3 -0
- package/lib/views/AuthFormView.d.ts +3 -1
- package/lib/views/AuthFormView.js +3 -3
- package/lib/views/FormViewV2.context.js +1 -1
- package/lib/views/FormViewV2.d.ts +3 -1
- package/lib/views/FormViewV2.js +3 -3
- package/lib/views/ListViewV2.context.js +1 -1
- package/lib/views/ListViewV2.js +1 -1
- package/lib/views/Wizard/Wizard.context.js +1 -1
- package/lib/views/Wizard/Wizard.js +1 -1
- package/lib/widgets/CircleButton.js +1 -1
- package/lib/widgets/GeoPermissionCard.js +1 -1
- package/lib/widgets/HomeHeader.d.ts +2 -0
- package/lib/widgets/HomeHeader.js +3 -3
- package/lib/widgets/JSONViewer.js +1 -1
- package/lib/widgets/MenuCard.js +1 -1
- package/lib/widgets/MenuGrid.js +1 -1
- package/lib/widgets/ScreenHeader.d.ts +3 -1
- package/lib/widgets/ScreenHeader.js +4 -4
- package/lib/widgets/TimeZoneSelector.js +1 -1
- package/lib/widgets/TimeZoneSelectorModal.js +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AUTO-GENERATED from apk/domains/index.ts
|
|
3
|
+
* Active Domain: distribution
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@tailwind base;
|
|
7
|
+
@tailwind components;
|
|
8
|
+
@tailwind utilities;
|
|
9
|
+
|
|
10
|
+
:root {
|
|
11
|
+
/* Primary Colors */
|
|
12
|
+
--primary: 37 99 235;
|
|
13
|
+
--secondary: 107 114 128;
|
|
14
|
+
--accent: 249 115 22;
|
|
15
|
+
|
|
16
|
+
/* Backgrounds */
|
|
17
|
+
--bg-page: 249 250 251;
|
|
18
|
+
--bg-card: 255 255 255;
|
|
19
|
+
--bg-popover: 255 255 255;
|
|
20
|
+
--bg-muted: 243 244 246;
|
|
21
|
+
--bg-accent: 219 234 254;
|
|
22
|
+
--bg-hover: 243 244 246;
|
|
23
|
+
--bg-disabled: 249 250 251;
|
|
24
|
+
|
|
25
|
+
/* Text */
|
|
26
|
+
--text-primary: 17 24 39;
|
|
27
|
+
--text-secondary: 107 114 128;
|
|
28
|
+
--text-tertiary: 156 163 175;
|
|
29
|
+
--text-muted: 107 114 128;
|
|
30
|
+
--text-accent: 30 64 175;
|
|
31
|
+
--text-inverse: 255 255 255;
|
|
32
|
+
--text-disabled: 209 213 219;
|
|
33
|
+
--text-on-primary: 255 255 255;
|
|
34
|
+
--text-on-secondary: 255 255 255;
|
|
35
|
+
--text-on-accent: 255 255 255;
|
|
36
|
+
--text-on-danger: 255 255 255;
|
|
37
|
+
--text-on-success: 255 255 255;
|
|
38
|
+
|
|
39
|
+
/* Icons */
|
|
40
|
+
--icon-primary: 17 24 39;
|
|
41
|
+
--icon-secondary: 107 114 128;
|
|
42
|
+
--icon-tertiary: 156 163 175;
|
|
43
|
+
--icon-inverse: 255 255 255;
|
|
44
|
+
--icon-disabled: 209 213 219;
|
|
45
|
+
|
|
46
|
+
/* Borders */
|
|
47
|
+
--border-default: 229 231 235;
|
|
48
|
+
--border-light: 243 244 246;
|
|
49
|
+
--border-strong: 209 213 219;
|
|
50
|
+
--border-focus: 37 99 235;
|
|
51
|
+
|
|
52
|
+
/* Focus & Input */
|
|
53
|
+
--ring: 37 99 235;
|
|
54
|
+
--input: 229 231 235;
|
|
55
|
+
|
|
56
|
+
/* Semantic */
|
|
57
|
+
--success: 16 185 129;
|
|
58
|
+
--warning: 249 115 22;
|
|
59
|
+
--danger: 239 68 68;
|
|
60
|
+
--info: 37 99 235;
|
|
61
|
+
|
|
62
|
+
/* Semantic Light */
|
|
63
|
+
--success-light: 209 250 229;
|
|
64
|
+
--warning-light: 255 237 213;
|
|
65
|
+
--danger-light: 254 226 226;
|
|
66
|
+
--info-light: 219 234 254;
|
|
67
|
+
}
|
package/lib/theme/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export { getActiveTheme, setActiveTheme } from "../theme/active";
|
|
2
2
|
export { ThemedActivityIndicator } from "../theme/components";
|
|
3
|
+
export { themeToVars } from "../theme/css-vars";
|
|
4
|
+
export { DEFAULT_THEME } from "../theme/default";
|
|
5
|
+
export { type DeepPartial, defineTheme, extendTheme, mergeTheme, } from "../theme/define";
|
|
3
6
|
export { theme } from "../theme/theme";
|
|
4
|
-
export type { ThemeTokens } from "../theme/types";
|
|
7
|
+
export type { ShadowStyle, ThemeTokens } from "../theme/types";
|
package/lib/theme/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export { getActiveTheme, setActiveTheme } from "../theme/active";
|
|
2
2
|
export { ThemedActivityIndicator } from "../theme/components";
|
|
3
|
+
export { themeToVars } from "../theme/css-vars";
|
|
4
|
+
export { DEFAULT_THEME } from "../theme/default";
|
|
5
|
+
export { defineTheme, extendTheme, mergeTheme, } from "../theme/define";
|
|
3
6
|
export { theme } from "../theme/theme";
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
+
import { type ImageSourcePropType } from "react-native";
|
|
2
3
|
interface AuthFormProps {
|
|
3
4
|
title?: string;
|
|
4
5
|
description?: string;
|
|
6
|
+
logoSource?: ImageSourcePropType;
|
|
5
7
|
onBack?: () => void;
|
|
6
8
|
FormNode: ReactNode;
|
|
7
9
|
}
|
|
8
|
-
declare function AuthFormView({ title, description, onBack, FormNode }: AuthFormProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function AuthFormView({ title, description, logoSource, onBack, FormNode }: AuthFormProps): import("react/jsx-runtime").JSX.Element;
|
|
9
11
|
export default AuthFormView;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
2
|
import { Display } from "../Display";
|
|
3
3
|
import AuthContainer from "../layouts/AuthContainer";
|
|
4
4
|
import { Typography } from "../Typography";
|
|
5
5
|
import { View } from "react-native";
|
|
6
6
|
const Logo = Display.Logo;
|
|
7
7
|
const Text = Typography.Text;
|
|
8
|
-
function AuthFormView({ title, description, onBack, FormNode }) {
|
|
8
|
+
function AuthFormView({ title, description, logoSource, onBack, FormNode }) {
|
|
9
9
|
const renderTitle = () => {
|
|
10
10
|
if (!title)
|
|
11
11
|
return null;
|
|
@@ -16,6 +16,6 @@ function AuthFormView({ title, description, onBack, FormNode }) {
|
|
|
16
16
|
return null;
|
|
17
17
|
return _jsx(Text, { variant: "body", children: description });
|
|
18
18
|
};
|
|
19
|
-
return (_jsx(AuthContainer, { header: _jsx(Logo, { size: "large" }), onBackPress: onBack, children: _jsxs(View, { className: "m-4", children: [_jsxs(View, { className: "mb-5", children: [renderTitle(), renderDescription()] }), FormNode] }) }));
|
|
19
|
+
return (_jsx(AuthContainer, { header: _jsx(Logo, { size: "large", source: logoSource }), onBackPress: onBack, children: _jsxs(View, { className: "m-4", children: [_jsxs(View, { className: "mb-5", children: [renderTitle(), renderDescription()] }), FormNode] }) }));
|
|
20
20
|
}
|
|
21
21
|
export default AuthFormView;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx } from "
|
|
1
|
+
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
2
|
import { createContext, useContext, useState } from "react";
|
|
3
3
|
const Context = createContext(null);
|
|
4
4
|
export function FormViewProvider({ name, description, item, isLoading = false, isEmpty = false, hasError = false, errorMessage, readonly = false, onRefresh, onRetry, onBack, children, }) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EVariantScreenHeader } from "../widgets/ScreenHeader";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
|
+
import { type ImageSourcePropType } from "react-native";
|
|
3
4
|
interface FormViewProps<T> {
|
|
4
5
|
name: string;
|
|
5
6
|
description?: string;
|
|
@@ -16,8 +17,9 @@ interface FormViewProps<T> {
|
|
|
16
17
|
children: ReactNode;
|
|
17
18
|
}
|
|
18
19
|
declare function FormViewRoot<T>({ name, description, item, isLoading, isEmpty, hasError, errorMessage, readonly, onRefresh, onRetry, onBack, withContainer, children, }: FormViewProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
declare function Header({ variant, children, }: {
|
|
20
|
+
declare function Header({ variant, logoSource, children, }: {
|
|
20
21
|
variant?: EVariantScreenHeader;
|
|
22
|
+
logoSource?: ImageSourcePropType;
|
|
21
23
|
children?: ReactNode;
|
|
22
24
|
}): import("react/jsx-runtime").JSX.Element;
|
|
23
25
|
declare function HeaderActions({ children }: {
|
package/lib/views/FormViewV2.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment } from "
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "nativewind/jsx-runtime";
|
|
2
2
|
import { ErrorBoundary, Feedback } from "../Feedback";
|
|
3
3
|
import Container from "../layouts/Container";
|
|
4
4
|
import { theme } from "../theme";
|
|
@@ -12,9 +12,9 @@ function FormViewRoot({ name, description, item, isLoading = false, isEmpty = fa
|
|
|
12
12
|
const wrapperProps = withContainer ? {} : { style: { flex: 1 } };
|
|
13
13
|
return (_jsx(FormViewProvider, { description: description, errorMessage: errorMessage, hasError: hasError, isEmpty: isEmpty, isLoading: isLoading, item: item, name: name, onBack: onBack, onRefresh: onRefresh, onRetry: onRetry, readonly: readonly, children: _jsx(ErrorBoundary, { children: _jsx(Wrapper, { ...wrapperProps, children: children }) }) }));
|
|
14
14
|
}
|
|
15
|
-
function Header({ variant = "FLAT_HEADER" /* EVariantScreenHeader.FLAT_HEADER */, children, }) {
|
|
15
|
+
function Header({ variant = "FLAT_HEADER" /* EVariantScreenHeader.FLAT_HEADER */, logoSource, children, }) {
|
|
16
16
|
const { name, description, onBack } = useFormView();
|
|
17
|
-
return (_jsx(_Fragment, { children: _jsx(ScreenHeader, { onBack: onBack, subtitle: description ? description : `Seleccionar ${name}`, title: name, variant: variant, children: children }) }));
|
|
17
|
+
return (_jsx(_Fragment, { children: _jsx(ScreenHeader, { logoSource: logoSource, onBack: onBack, subtitle: description ? description : `Seleccionar ${name}`, title: name, variant: variant, children: children }) }));
|
|
18
18
|
}
|
|
19
19
|
function HeaderActions({ children }) {
|
|
20
20
|
return (_jsx(View, { className: "flex-row px-4 my-4 items-center justify-between flex-1 gap-2", children: children }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx } from "
|
|
1
|
+
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
2
|
import { createContext, useContext, useState } from "react";
|
|
3
3
|
const Context = createContext(null);
|
|
4
4
|
export function ListViewProvider({ name, description, items, isLoading = false, hasError = false, errorMessage, readonly = false, onRefresh, onRetry, onPressItem, onDeleteItem, onSearch, onBack, children, }) {
|
package/lib/views/ListViewV2.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "nativewind/jsx-runtime";
|
|
2
2
|
import { Display } from "../Display";
|
|
3
3
|
import { ErrorBoundary, Feedback } from "../Feedback";
|
|
4
4
|
import { Form } from "../Form";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
2
|
import { ErrorBoundary } from "../../Feedback";
|
|
3
3
|
import { createContext, useCallback, useContext, useMemo, useState } from "react";
|
|
4
4
|
import { ActivityIndicator, Text, View } from "react-native";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment } from "
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "nativewind/jsx-runtime";
|
|
2
2
|
import { useWizard, WizardProvider } from "../../views/Wizard/Wizard.context";
|
|
3
3
|
import { useEffect } from "react";
|
|
4
4
|
import { TouchableOpacity } from "react-native";
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
|
+
import { type ImageSourcePropType } from "react-native";
|
|
2
3
|
interface HomeHeaderProps {
|
|
3
4
|
readonly title?: string;
|
|
4
5
|
readonly logo?: ReactNode;
|
|
6
|
+
readonly logoSource?: ImageSourcePropType;
|
|
5
7
|
readonly backButton?: boolean;
|
|
6
8
|
readonly onBack?: () => void;
|
|
7
9
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
2
|
import { Display, Typography } from "../index";
|
|
3
3
|
import GradientContainer from "../layouts/GradientContainer";
|
|
4
4
|
import { theme } from "../theme";
|
|
5
5
|
import { TouchableOpacity, View } from "react-native";
|
|
6
|
-
export const HomeHeader = ({ title = "Distribución", logo, backButton = false, onBack, }) => {
|
|
6
|
+
export const HomeHeader = ({ title = "Distribución", logo, logoSource, backButton = false, onBack, }) => {
|
|
7
7
|
const handleBackPress = onBack ?? (() => { });
|
|
8
|
-
return (_jsx(GradientContainer, { className: "pt-10 pb-4 px-4", children: _jsxs(View, { className: "relative items-center justify-center", children: [backButton && (_jsx(TouchableOpacity, { className: "absolute top-0 left-0 z-10 border border-text-inverse p-1.5 rounded", onPress: handleBackPress, children: _jsx(Display.Icon, { color: theme.text.inverse, name: "chevron-back", size: 25, type: "ionicons" }) })), _jsxs(View, { className: "items-center justify-center", children: [logo || _jsx(Display.Logo, { size: "medium" }), !!title && (_jsx(Typography.Text, { className: "text-text-inverse", variant: "h4", children: title }))] })] }) }));
|
|
8
|
+
return (_jsx(GradientContainer, { className: "pt-10 pb-4 px-4", children: _jsxs(View, { className: "relative items-center justify-center", children: [backButton && (_jsx(TouchableOpacity, { className: "absolute top-0 left-0 z-10 border border-text-inverse p-1.5 rounded", onPress: handleBackPress, children: _jsx(Display.Icon, { color: theme.text.inverse, name: "chevron-back", size: 25, type: "ionicons" }) })), _jsxs(View, { className: "items-center justify-center", children: [logo || _jsx(Display.Logo, { size: "medium", source: logoSource }), !!title && (_jsx(Typography.Text, { className: "text-text-inverse", variant: "h4", children: title }))] })] }) }));
|
|
9
9
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
2
|
import { ThemedActivityIndicator } from "../theme";
|
|
3
3
|
import { useMemo, useState } from "react";
|
|
4
4
|
import { Platform, Text, View } from "react-native";
|
package/lib/widgets/MenuCard.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
2
|
import { theme } from "../theme/useTheme";
|
|
3
3
|
import { Typography } from "../Typography";
|
|
4
4
|
import { CircleButton } from "../widgets/CircleButton";
|
package/lib/widgets/MenuGrid.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ImageSourcePropType } from "react-native";
|
|
1
2
|
export declare const enum EVariantScreenHeader {
|
|
2
3
|
FLAT_HEADER = "FLAT_HEADER",
|
|
3
4
|
ROUNDED_HEADER = "ROUNDED_HEADER",
|
|
@@ -10,10 +11,11 @@ interface ScreenHeaderProps {
|
|
|
10
11
|
centerTitle?: boolean;
|
|
11
12
|
subtitle?: string;
|
|
12
13
|
logo?: boolean;
|
|
14
|
+
logoSource?: ImageSourcePropType;
|
|
13
15
|
rightComponent?: React.ReactNode;
|
|
14
16
|
children?: React.ReactNode;
|
|
15
17
|
withGradientContainer?: boolean;
|
|
16
18
|
onBack?: () => void;
|
|
17
19
|
}
|
|
18
|
-
declare function ScreenHeader({ variant, title, subtitle, onBack, children, }: ScreenHeaderProps): import("react/jsx-runtime").JSX.Element | null;
|
|
20
|
+
declare function ScreenHeader({ variant, title, subtitle, logoSource, onBack, children, }: ScreenHeaderProps): import("react/jsx-runtime").JSX.Element | null;
|
|
19
21
|
export default ScreenHeader;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
2
|
import GradientContainer from "../layouts/GradientContainer";
|
|
3
3
|
import { Navigation } from "../Navigation";
|
|
4
4
|
import { View } from "react-native";
|
|
5
5
|
const Header = Navigation.Header;
|
|
6
6
|
const HeaderToolbar = Navigation.HeaderToolbar;
|
|
7
|
-
function ScreenHeader({ variant, title = "Distribución", subtitle, onBack, children, }) {
|
|
7
|
+
function ScreenHeader({ variant, title = "Distribución", subtitle, logoSource, onBack, children, }) {
|
|
8
8
|
switch (variant) {
|
|
9
9
|
case "FLAT_HEADER" /* EVariantScreenHeader.FLAT_HEADER */:
|
|
10
10
|
return (_jsxs(_Fragment, { children: [_jsx(HeaderToolbar, { flat: true, onBack: onBack, subtitle: subtitle, title: title, withBackground: true }), _jsx(View, { children: children })] }));
|
|
11
11
|
case "ROUNDED_HEADER" /* EVariantScreenHeader.ROUNDED_HEADER */:
|
|
12
12
|
return (_jsx(GradientContainer, { className: "pt-0.5 shadow-lg shadow-black/70 rounded-b-[18px] pb-6", children: _jsx(HeaderToolbar, { flat: true, onBack: onBack, subtitle: subtitle, title: title, withBackground: false, children: children }) }));
|
|
13
13
|
case "LOGO_WITH_BACK_BUTTON" /* EVariantScreenHeader.LOGO_WITH_BACK_BUTTON */:
|
|
14
|
-
return _jsx(Header, { backButton: true, handleBackButton: onBack, title: "
|
|
14
|
+
return (_jsx(Header, { backButton: true, handleBackButton: onBack, logoSource: logoSource, title: "" }));
|
|
15
15
|
case "ONLY_LOGO" /* EVariantScreenHeader.ONLY_LOGO */:
|
|
16
|
-
return _jsx(Header, { title: title });
|
|
16
|
+
return _jsx(Header, { logoSource: logoSource, title: title });
|
|
17
17
|
default:
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "nativewind/jsx-runtime";
|
|
2
2
|
import { Display, Form } from "../index";
|
|
3
3
|
import { theme } from "../theme/useTheme";
|
|
4
4
|
import { Typography } from "../Typography";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sincpro/mobile-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Sincpro Mobile design system: generic, presentational React Native components (no domain logic)",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib/index.js",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"expo-clipboard": "*",
|
|
36
36
|
"expo-linear-gradient": "*",
|
|
37
37
|
"expo-localization": "*",
|
|
38
|
+
"nativewind": ">=4",
|
|
38
39
|
"react": "*",
|
|
39
40
|
"react-hook-form": ">=7",
|
|
40
41
|
"react-native": "*",
|