@sincpro/mobile-ui 0.2.1 → 0.3.1
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 +75 -20
- package/dist/Dialog/BottomSheet/BottomSheet.Root.d.ts +13 -9
- package/dist/Dialog/BottomSheet/BottomSheet.Root.js +6 -2
- package/dist/Dialog/Confirmation.context.d.ts +1 -1
- package/dist/Dialog/Dialog.ActionSheet.d.ts +17 -0
- package/dist/Dialog/Dialog.ActionSheet.js +16 -0
- package/dist/Dialog/Dialog.Confirmation.js +5 -1
- package/dist/Dialog/Dialog.EditValue.d.ts +1 -1
- package/dist/Dialog/Dialog.EditValue.js +1 -1
- package/dist/Dialog/Dialog.Sheet.d.ts +26 -0
- package/dist/Dialog/Dialog.Sheet.js +55 -0
- package/dist/Dialog/index.d.ts +9 -7
- package/dist/Dialog/index.js +2 -0
- package/dist/Display/Display.Accordion.d.ts +18 -0
- package/dist/Display/Display.Accordion.js +22 -0
- package/dist/Display/Display.AvatarGroup.d.ts +12 -0
- package/dist/Display/Display.AvatarGroup.js +23 -0
- package/dist/Display/Display.Badge.d.ts +1 -1
- package/dist/Display/Display.Card.d.ts +46 -0
- package/dist/Display/Display.Card.js +36 -0
- package/dist/Display/Display.Carousel.d.ts +13 -0
- package/dist/Display/Display.Carousel.js +19 -0
- package/dist/Display/Display.Chip.d.ts +105 -0
- package/dist/Display/Display.Chip.js +45 -0
- package/dist/Display/Display.CopyableText.d.ts +1 -1
- package/dist/Display/Display.CountRecords.d.ts +1 -1
- package/dist/Display/Display.DataTable.d.ts +19 -0
- package/dist/Display/Display.DataTable.js +22 -0
- package/dist/Display/Display.Date.d.ts +15 -2
- package/dist/Display/Display.Date.js +34 -4
- package/dist/Display/Display.Divider.d.ts +1 -1
- package/dist/Display/Display.GradientSurface.d.ts +116 -0
- package/dist/Display/Display.GradientSurface.js +62 -0
- package/dist/Display/Display.IconBadge.d.ts +13 -0
- package/dist/Display/Display.IconBadge.js +30 -0
- package/dist/Display/Display.Image.d.ts +15 -0
- package/dist/Display/Display.Image.js +17 -0
- package/dist/Display/Display.KeyValue.d.ts +10 -0
- package/dist/Display/Display.KeyValue.js +9 -0
- package/dist/Display/Display.ListItem.d.ts +17 -0
- package/dist/Display/Display.ListItem.js +18 -0
- package/dist/Display/Display.Logo.js +3 -1
- package/dist/Display/Display.MediaCard.d.ts +17 -0
- package/dist/Display/Display.MediaCard.js +12 -0
- package/dist/Display/Display.MediaEmbed.d.ts +19 -0
- package/dist/Display/Display.MediaEmbed.js +39 -0
- package/dist/Display/Display.MenuButton.d.ts +1 -1
- package/dist/Display/Display.Monetary.d.ts +1 -1
- package/dist/Display/Display.Monetary.js +1 -1
- package/dist/Display/Display.Pattern.d.ts +26 -0
- package/dist/Display/Display.Pattern.js +27 -0
- package/dist/Display/Display.PriceTag.d.ts +10 -0
- package/dist/Display/Display.PriceTag.js +23 -0
- package/dist/Display/Display.ProductCard.d.ts +17 -0
- package/dist/Display/Display.ProductCard.js +13 -0
- package/dist/Display/Display.Rating.d.ts +11 -0
- package/dist/Display/Display.Rating.js +16 -0
- package/dist/Display/Display.SearchHistory.d.ts +12 -0
- package/dist/Display/Display.SearchHistory.js +13 -0
- package/dist/Display/Display.SectionHeader.d.ts +13 -0
- package/dist/Display/Display.SectionHeader.js +9 -0
- package/dist/Display/Display.Stat.d.ts +10 -0
- package/dist/Display/Display.Stat.js +9 -0
- package/dist/Display/Display.StatCard.d.ts +14 -0
- package/dist/Display/Display.StatCard.js +13 -0
- package/dist/Display/Display.StatusDot.d.ts +11 -0
- package/dist/Display/Display.StatusDot.js +28 -0
- package/dist/Display/Display.Story.d.ts +15 -0
- package/dist/Display/Display.Story.js +43 -0
- package/dist/Display/Display.StoryTray.d.ts +26 -0
- package/dist/Display/Display.StoryTray.js +43 -0
- package/dist/Display/Display.StoryViewer.d.ts +26 -0
- package/dist/Display/Display.StoryViewer.js +79 -0
- package/dist/Display/Display.SwipeableRow.d.ts +15 -0
- package/dist/Display/Display.SwipeableRow.js +28 -0
- package/dist/Display/Display.Tag.d.ts +11 -0
- package/dist/Display/Display.Tag.js +9 -0
- package/dist/Display/Display.Timeline.d.ts +13 -0
- package/dist/Display/Display.Timeline.js +19 -0
- package/dist/Display/Display.Tooltip.d.ts +10 -0
- package/dist/Display/Display.Tooltip.js +24 -0
- package/dist/Display/index.d.ts +70 -0
- package/dist/Display/index.js +58 -0
- package/dist/Feedback/ErrorBoundary.d.ts +1 -1
- package/dist/Feedback/Feedback.Banner.d.ts +82 -0
- package/dist/Feedback/Feedback.Banner.js +35 -0
- package/dist/Feedback/Feedback.DomainSplashScreen.d.ts +2 -1
- package/dist/Feedback/Feedback.DomainSplashScreen.js +3 -2
- package/dist/Feedback/Feedback.Empty.d.ts +1 -1
- package/dist/Feedback/Feedback.EmptyState.d.ts +15 -0
- package/dist/Feedback/Feedback.EmptyState.js +11 -0
- package/dist/Feedback/Feedback.Error.d.ts +1 -1
- package/dist/Feedback/Feedback.Loading.d.ts +8 -1
- package/dist/Feedback/Feedback.Loading.js +7 -1
- package/dist/Feedback/Feedback.PermissionCard.d.ts +15 -0
- package/dist/Feedback/Feedback.PermissionCard.js +11 -0
- package/dist/Feedback/Feedback.Progress.d.ts +9 -0
- package/dist/Feedback/Feedback.Progress.js +35 -0
- package/dist/Feedback/Feedback.ProgressCircle.d.ts +12 -0
- package/dist/Feedback/Feedback.ProgressCircle.js +15 -0
- package/dist/Feedback/Feedback.Skeleton.d.ts +11 -0
- package/dist/Feedback/Feedback.Skeleton.js +29 -0
- package/dist/Feedback/Feedback.Spinner.js +2 -1
- package/dist/Feedback/Feedback.Splash.d.ts +7 -1
- package/dist/Feedback/Feedback.Splash.js +11 -2
- package/dist/Feedback/Toast.context.d.ts +42 -0
- package/dist/Feedback/Toast.context.js +121 -0
- package/dist/Feedback/index.d.ts +15 -0
- package/dist/Feedback/index.js +15 -0
- package/dist/Form/Form.Button.d.ts +10 -4
- package/dist/Form/Form.Button.js +27 -16
- package/dist/Form/Form.Checkbox.d.ts +1 -1
- package/dist/Form/Form.Checkbox.js +1 -1
- package/dist/Form/Form.ControlledCheckbox.d.ts +1 -1
- package/dist/Form/Form.ControlledInput.d.ts +1 -1
- package/dist/Form/Form.ControlledMonetaryInput.d.ts +1 -1
- package/dist/Form/Form.ControlledRadioButton.d.ts +1 -1
- package/dist/Form/Form.DatePicker.d.ts +20 -0
- package/dist/Form/Form.DatePicker.js +38 -0
- package/dist/Form/Form.Dropdown.d.ts +1 -1
- package/dist/Form/Form.FAB.d.ts +10 -0
- package/dist/Form/Form.FAB.js +17 -0
- package/dist/Form/Form.FilterButton.d.ts +1 -1
- package/dist/Form/Form.FractionalQuantityInput.d.ts +1 -1
- package/dist/Form/Form.IconButton.d.ts +1 -1
- package/dist/Form/Form.Input.d.ts +2 -1
- package/dist/Form/Form.Input.js +1 -1
- package/dist/Form/Form.InputField.js +1 -1
- package/dist/Form/Form.MonetaryInput.d.ts +1 -1
- package/dist/Form/Form.PinInput.d.ts +12 -0
- package/dist/Form/Form.PinInput.js +23 -0
- package/dist/Form/Form.QuantitySelector.d.ts +2 -1
- package/dist/Form/Form.QuantitySelector.js +1 -1
- package/dist/Form/Form.RadioButton.d.ts +1 -1
- package/dist/Form/Form.SearchBar.d.ts +6 -1
- package/dist/Form/Form.SearchBar.js +4 -0
- package/dist/Form/Form.Select.d.ts +17 -0
- package/dist/Form/Form.Select.js +26 -0
- package/dist/Form/Form.Slider.d.ts +20 -0
- package/dist/Form/Form.Slider.js +16 -0
- package/dist/Form/Form.Switch.d.ts +10 -0
- package/dist/Form/Form.Switch.js +9 -0
- package/dist/Form/index.d.ts +12 -0
- package/dist/Form/index.js +12 -0
- package/dist/Navigation/Navigation.AppBar.d.ts +57 -0
- package/dist/Navigation/Navigation.AppBar.js +72 -0
- package/dist/Navigation/Navigation.BottomNav.d.ts +57 -0
- package/dist/Navigation/Navigation.BottomNav.js +108 -0
- package/dist/Navigation/Navigation.CollapsingHeader.d.ts +34 -0
- package/dist/Navigation/Navigation.CollapsingHeader.js +47 -0
- package/dist/Navigation/Navigation.FloatingBar.d.ts +15 -0
- package/dist/Navigation/Navigation.FloatingBar.js +21 -0
- package/dist/Navigation/Navigation.Header.d.ts +6 -2
- package/dist/Navigation/Navigation.Header.js +4 -0
- package/dist/Navigation/Navigation.HeaderToolbar.d.ts +1 -1
- package/dist/Navigation/Navigation.Menu.d.ts +21 -0
- package/dist/Navigation/Navigation.Menu.js +42 -0
- package/dist/Navigation/Navigation.RowItem.d.ts +1 -1
- package/dist/Navigation/Navigation.SearchBar.d.ts +18 -0
- package/dist/Navigation/Navigation.SearchBar.js +28 -0
- package/dist/Navigation/Navigation.SegmentedControl.d.ts +14 -0
- package/dist/Navigation/Navigation.SegmentedControl.js +13 -0
- package/dist/Navigation/Navigation.Steps.d.ts +8 -0
- package/dist/Navigation/Navigation.Steps.js +17 -0
- package/dist/Navigation/Navigation.TabIcon.d.ts +5 -1
- package/dist/Navigation/Navigation.TabIcon.js +4 -0
- package/dist/Navigation/Navigation.TabItem.d.ts +5 -0
- package/dist/Navigation/Navigation.TabItem.js +5 -0
- package/dist/Navigation/Navigation.Tabs.d.ts +28 -0
- package/dist/Navigation/Navigation.Tabs.js +45 -0
- package/dist/Navigation/index.d.ts +32 -1
- package/dist/Navigation/index.js +18 -0
- package/dist/Typography/Typography.Text.d.ts +3 -2
- package/dist/Typography/Typography.Text.js +16 -6
- package/dist/branding.d.ts +6 -0
- package/dist/branding.js +7 -0
- package/dist/icons/ArrowDownIcon.d.ts +2 -1
- package/dist/icons/ArrowUpIcon.d.ts +2 -1
- package/dist/icons/CreditIcon.d.ts +1 -1
- package/dist/icons/OdooIcon.d.ts +6 -1
- package/dist/icons/OdooIcon.js +5 -0
- package/dist/icons/PrinterIcon.d.ts +5 -0
- package/dist/icons/PrinterIcon.js +5 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/layouts/AuthContainer.d.ts +1 -1
- package/dist/layouts/AuthContainer.js +2 -2
- package/dist/layouts/Container.d.ts +1 -0
- package/dist/layouts/Container.js +2 -3
- package/dist/layouts/GradientContainer.d.ts +1 -1
- package/dist/layouts/PlainLayout.d.ts +1 -1
- package/dist/layouts/ScrollContainer.d.ts +2 -2
- package/dist/layouts/ScrollContainer.js +1 -1
- package/dist/layouts/TabNavigatorLayout.d.ts +2 -2
- package/dist/layouts/TabNavigatorLayout.js +4 -0
- package/dist/primitives/AspectRatio.d.ts +10 -0
- package/dist/primitives/AspectRatio.js +8 -0
- package/dist/primitives/Box.d.ts +1 -1
- package/dist/primitives/Pressable.d.ts +10 -0
- package/dist/primitives/Pressable.js +9 -0
- package/dist/primitives/Row.d.ts +1 -1
- package/dist/primitives/Spacer.d.ts +8 -0
- package/dist/primitives/Spacer.js +9 -0
- package/dist/primitives/Stack.d.ts +1 -1
- package/dist/primitives/index.d.ts +3 -0
- package/dist/primitives/index.js +3 -0
- package/dist/theme/active.d.ts +2 -0
- package/dist/theme/active.js +13 -0
- package/dist/theme/components/ThemedActivityIndicator.d.ts +1 -1
- package/dist/theme/components/index.d.ts +1 -1
- package/dist/theme/components/index.js +1 -1
- package/dist/theme/dark.d.ts +7 -0
- package/dist/theme/dark.js +85 -0
- package/dist/theme/default.js +1 -0
- package/dist/theme/define.d.ts +5 -5
- package/dist/theme/define.js +5 -5
- package/dist/theme/index.d.ts +4 -1
- package/dist/theme/index.js +4 -1
- package/dist/theme/theme.d.ts +1 -1
- package/dist/theme/theme.js +1 -1
- package/dist/theme/types.d.ts +15 -14
- package/dist/theme/types.js +2 -2
- package/dist/theme/typography.d.ts +117 -60
- package/dist/theme/typography.js +115 -29
- package/dist/theme/useTheme.d.ts +3 -1
- package/dist/theme/useTheme.js +6 -1
- package/dist/tokens/index.d.ts +2 -0
- package/dist/tokens/index.js +2 -0
- package/dist/tokens/motion.d.ts +71 -0
- package/dist/tokens/motion.js +25 -0
- package/dist/utils/date.d.ts +33 -33
- package/dist/utils/date.js +39 -39
- package/dist/utils/timezone.d.ts +5 -0
- package/dist/views/AuthFormView.d.ts +1 -1
- package/dist/views/FormViewV2.context.d.ts +1 -1
- package/dist/views/FormViewV2.d.ts +12 -11
- package/dist/views/FormViewV2.js +8 -4
- package/dist/views/ListViewV2.context.d.ts +6 -2
- package/dist/views/ListViewV2.context.js +3 -1
- package/dist/views/ListViewV2.d.ts +26 -21
- package/dist/views/ListViewV2.js +18 -20
- package/dist/views/Wizard/Wizard.context.d.ts +1 -1
- package/dist/widgets/CircleButton.d.ts +6 -2
- package/dist/widgets/CircleButton.js +4 -0
- package/dist/widgets/GeoPermissionCard.d.ts +6 -1
- package/dist/widgets/GeoPermissionCard.js +8 -3
- package/dist/widgets/HomeHeader.d.ts +4 -0
- package/dist/widgets/HomeHeader.js +4 -0
- package/dist/widgets/JSONViewer.d.ts +2 -1
- package/dist/widgets/JSONViewer.js +9 -12
- package/dist/widgets/MenuCard.d.ts +1 -1
- package/dist/widgets/ScreenHeader.d.ts +5 -1
- package/dist/widgets/ScreenHeader.js +4 -0
- package/dist/widgets/TimeZoneSelector.d.ts +6 -1
- package/dist/widgets/TimeZoneSelector.js +6 -1
- package/dist/widgets/TimeZoneSelectorModal.d.ts +6 -1
- package/dist/widgets/TimeZoneSelectorModal.js +8 -3
- package/package.json +41 -23
- package/tailwind.preset.js +14 -0
- package/dist/notifications/index.d.ts +0 -1
- package/dist/notifications/index.js +0 -1
- package/dist/providers/index.d.ts +0 -1
- package/dist/providers/index.js +0 -2
|
@@ -1,11 +1,42 @@
|
|
|
1
|
+
import BottomNav from "../Navigation/Navigation.BottomNav";
|
|
2
|
+
import CollapsingHeader from "../Navigation/Navigation.CollapsingHeader";
|
|
3
|
+
import FloatingBar from "../Navigation/Navigation.FloatingBar";
|
|
1
4
|
import HeaderToolbar from "../Navigation/Navigation.HeaderToolbar";
|
|
5
|
+
import Menu from "../Navigation/Navigation.Menu";
|
|
2
6
|
import RowItem from "../Navigation/Navigation.RowItem";
|
|
7
|
+
import SearchBar from "../Navigation/Navigation.SearchBar";
|
|
8
|
+
import SegmentedControl from "../Navigation/Navigation.SegmentedControl";
|
|
9
|
+
import Steps from "../Navigation/Navigation.Steps";
|
|
3
10
|
import TabIcon from "../Navigation/Navigation.TabIcon";
|
|
4
11
|
export declare const Navigation: {
|
|
5
|
-
|
|
12
|
+
AppBar: (({ title, subtitle, onBack, leading, actions, subheader, variant, tone, accentBar, backVariant, border, safeArea, className, testID, }: import("../Navigation/Navigation.AppBar").AppBarProps) => import("react").JSX.Element) & {
|
|
13
|
+
Action: ({ icon, onPress, badge, accessibilityLabel, tone, onDark, bare, testID, }: import("../Navigation/Navigation.AppBar").AppBarActionProps) => import("react").JSX.Element;
|
|
14
|
+
};
|
|
15
|
+
BottomNav: typeof BottomNav;
|
|
16
|
+
CollapsingHeader: typeof CollapsingHeader;
|
|
17
|
+
FloatingBar: typeof FloatingBar;
|
|
18
|
+
SearchBar: typeof SearchBar;
|
|
19
|
+
Header: ({ title, logo, logoSource, backButton, handleBackButton, className, }: import("../Navigation/Navigation.Header").HeaderProps) => import("react").JSX.Element;
|
|
6
20
|
HeaderToolbar: typeof HeaderToolbar;
|
|
7
21
|
TabItem: import("react").FC<import("../Navigation/Navigation.TabItem").TabIconProps>;
|
|
8
22
|
TabIcon: typeof TabIcon;
|
|
9
23
|
RowItem: typeof RowItem;
|
|
24
|
+
SegmentedControl: typeof SegmentedControl;
|
|
25
|
+
Tabs: (({ value, defaultValue, onValueChange, className, children }: import("../Navigation/Navigation.Tabs").TabsProps) => import("react").JSX.Element) & {
|
|
26
|
+
List: ({ children, className }: {
|
|
27
|
+
children: import("react").ReactNode;
|
|
28
|
+
className?: string;
|
|
29
|
+
}) => import("react").JSX.Element;
|
|
30
|
+
Trigger: ({ value, children }: {
|
|
31
|
+
value: string;
|
|
32
|
+
children: import("react").ReactNode;
|
|
33
|
+
}) => import("react").JSX.Element;
|
|
34
|
+
Content: ({ value, children }: {
|
|
35
|
+
value: string;
|
|
36
|
+
children: import("react").ReactNode;
|
|
37
|
+
}) => import("react").JSX.Element | null;
|
|
38
|
+
};
|
|
39
|
+
Menu: typeof Menu;
|
|
40
|
+
Steps: typeof Steps;
|
|
10
41
|
};
|
|
11
42
|
export default Navigation;
|
package/dist/Navigation/index.js
CHANGED
|
@@ -1,13 +1,31 @@
|
|
|
1
|
+
import AppBar from "../Navigation/Navigation.AppBar";
|
|
2
|
+
import BottomNav from "../Navigation/Navigation.BottomNav";
|
|
3
|
+
import CollapsingHeader from "../Navigation/Navigation.CollapsingHeader";
|
|
4
|
+
import FloatingBar from "../Navigation/Navigation.FloatingBar";
|
|
1
5
|
import Header from "../Navigation/Navigation.Header";
|
|
2
6
|
import HeaderToolbar from "../Navigation/Navigation.HeaderToolbar";
|
|
7
|
+
import Menu from "../Navigation/Navigation.Menu";
|
|
3
8
|
import RowItem from "../Navigation/Navigation.RowItem";
|
|
9
|
+
import SearchBar from "../Navigation/Navigation.SearchBar";
|
|
10
|
+
import SegmentedControl from "../Navigation/Navigation.SegmentedControl";
|
|
11
|
+
import Steps from "../Navigation/Navigation.Steps";
|
|
4
12
|
import TabIcon from "../Navigation/Navigation.TabIcon";
|
|
5
13
|
import TabItem from "../Navigation/Navigation.TabItem";
|
|
14
|
+
import Tabs from "../Navigation/Navigation.Tabs";
|
|
6
15
|
export const Navigation = {
|
|
16
|
+
AppBar,
|
|
17
|
+
BottomNav,
|
|
18
|
+
CollapsingHeader,
|
|
19
|
+
FloatingBar,
|
|
20
|
+
SearchBar,
|
|
7
21
|
Header,
|
|
8
22
|
HeaderToolbar,
|
|
9
23
|
TabItem,
|
|
10
24
|
TabIcon,
|
|
11
25
|
RowItem,
|
|
26
|
+
SegmentedControl,
|
|
27
|
+
Tabs,
|
|
28
|
+
Menu,
|
|
29
|
+
Steps,
|
|
12
30
|
};
|
|
13
31
|
export default Navigation;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { typographyVariants } from "../theme/typography";
|
|
2
|
+
import type React from "react";
|
|
2
3
|
import { type TextProps } from "react-native";
|
|
3
4
|
/**
|
|
4
5
|
* Typography.Text - Hybrid component (NativeWind + Style)
|
|
@@ -8,7 +9,7 @@ import { type TextProps } from "react-native";
|
|
|
8
9
|
*
|
|
9
10
|
* Reason: Custom fonts (Montserrat) not in Tailwind, complex typography system
|
|
10
11
|
*
|
|
11
|
-
* @deprecated color prop - Use className instead: className="text-primary" or className="text-
|
|
12
|
+
* @deprecated color prop - Use className instead: className="text-primary" or className="text-text-secondary"
|
|
12
13
|
*/
|
|
13
14
|
interface AppTextProps extends TextProps {
|
|
14
15
|
variant?: keyof typeof typographyVariants;
|
|
@@ -22,6 +23,6 @@ interface AppTextProps extends TextProps {
|
|
|
22
23
|
transform?: "none" | "uppercase" | "lowercase" | "capitalize";
|
|
23
24
|
className?: string;
|
|
24
25
|
}
|
|
25
|
-
declare function AppText({ variant, color, bold, italic, underline, align, transform, semibold, style, className, children, ...props }: AppTextProps):
|
|
26
|
+
declare function AppText({ variant, color, bold, italic, underline, align, transform, semibold, style, className, children, ...props }: AppTextProps): React.JSX.Element;
|
|
26
27
|
export default AppText;
|
|
27
28
|
export { AppText };
|
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
2
|
import { cn } from "../theme/tw";
|
|
3
|
-
import { fontFamilies, Typography, } from "../theme/typography";
|
|
3
|
+
import { fontFamilies, Typography, variantFontRole, } from "../theme/typography";
|
|
4
4
|
import { Text } from "react-native";
|
|
5
5
|
function AppText({ variant = "body", color, bold = false, italic = false, underline = false, align = "left", transform = "none", semibold = false, style, className, children, ...props }) {
|
|
6
6
|
const baseStyle = Typography.variants[variant];
|
|
7
7
|
const textClassName = cn("text-text-primary", align === "center" && "text-center", align === "right" && "text-right", align === "justify" && "text-justify", transform === "uppercase" && "uppercase", transform === "lowercase" && "lowercase", transform === "capitalize" && "capitalize", underline && "underline", italic && "italic", className);
|
|
8
|
+
// Resolve the family LIVE from the configurable registry by the variant's role, so
|
|
9
|
+
// `configureFonts(...)` (app/Storybook) takes effect. Falls back to the variant's baked
|
|
10
|
+
// family if a role is somehow missing.
|
|
11
|
+
const variantFamily = fontFamilies[variantFontRole[variant]] ?? baseStyle.fontFamily;
|
|
12
|
+
// `bold`/`semibold` map to the Inter weights — but NOT when the active family is a branded
|
|
13
|
+
// face (a configured title face, or Fira Code mono): those carry their own weight, so
|
|
14
|
+
// forcing Inter would erase the typeface. Keep the variant's family for those.
|
|
15
|
+
const isBrandedFace = typeof variantFamily === "string" && !variantFamily.startsWith("Inter_");
|
|
8
16
|
const textStyle = {
|
|
9
17
|
...baseStyle,
|
|
10
18
|
...(color ? { color } : {}),
|
|
11
|
-
fontFamily:
|
|
12
|
-
?
|
|
13
|
-
:
|
|
14
|
-
? fontFamilies.
|
|
15
|
-
:
|
|
19
|
+
fontFamily: isBrandedFace
|
|
20
|
+
? variantFamily
|
|
21
|
+
: bold
|
|
22
|
+
? fontFamilies.extraBold
|
|
23
|
+
: semibold
|
|
24
|
+
? fontFamilies.semiBold
|
|
25
|
+
: variantFamily,
|
|
16
26
|
...(Array.isArray(style) ? Object.assign({}, ...style) : style),
|
|
17
27
|
};
|
|
18
28
|
return (_jsx(Text, { className: textClassName, style: textStyle, ...props, children: children }));
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ImageSourcePropType } from "react-native";
|
|
2
|
+
export interface BrandingConfig {
|
|
3
|
+
logo?: ImageSourcePropType;
|
|
4
|
+
}
|
|
5
|
+
export declare function setBranding(config: BrandingConfig): void;
|
|
6
|
+
export declare function getBrandingLogo(): ImageSourcePropType | undefined;
|
package/dist/branding.js
ADDED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { CustomIconProps } from "../icons/props";
|
|
2
|
-
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare function ArrowDownIcon({ size, color }: CustomIconProps): React.JSX.Element;
|
|
3
4
|
export default ArrowDownIcon;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { CustomIconProps } from "../icons/props";
|
|
2
|
-
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare function ArrowUpIcon({ size, color }: CustomIconProps): React.JSX.Element;
|
|
3
4
|
export default ArrowUpIcon;
|
|
@@ -3,5 +3,5 @@ interface CreditIconProps {
|
|
|
3
3
|
height?: number;
|
|
4
4
|
color?: string;
|
|
5
5
|
}
|
|
6
|
-
declare function CreditIcon({ width, height, color }: CreditIconProps): import("react
|
|
6
|
+
declare function CreditIcon({ width, height, color }: CreditIconProps): import("react").JSX.Element;
|
|
7
7
|
export default CreditIcon;
|
package/dist/icons/OdooIcon.d.ts
CHANGED
|
@@ -2,5 +2,10 @@ interface OdooIconProps {
|
|
|
2
2
|
size?: number;
|
|
3
3
|
color?: string;
|
|
4
4
|
}
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Brand-coupled (Odoo logo); relocated to the Odoo integration package. Import
|
|
7
|
+
* from `@sincpro/mobile-odoo/ui/components/atoms` instead. Kept here for backwards
|
|
8
|
+
* compatibility and removed in the next major.
|
|
9
|
+
*/
|
|
10
|
+
declare function OdooIcon({ size, color }: OdooIconProps): import("react").JSX.Element;
|
|
6
11
|
export default OdooIcon;
|
package/dist/icons/OdooIcon.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
2
|
import Svg, { Path } from "react-native-svg";
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Brand-coupled (Odoo logo); relocated to the Odoo integration package. Import
|
|
5
|
+
* from `@sincpro/mobile-odoo/ui/components/atoms` instead. Kept here for backwards
|
|
6
|
+
* compatibility and removed in the next major.
|
|
7
|
+
*/
|
|
3
8
|
function OdooIcon({ size = 100, color = "#ffffff" }) {
|
|
4
9
|
return (_jsxs(Svg, { fill: "none", height: size, viewBox: "0 0 919 495", width: size, children: [_jsx(Path, { d: "M695,346a75,75,0,1,1,75-75A75,75,0,0,1,695,346Zm0-31a44,44,0,1,0-44-44A44,44,0,0,0,695,315ZM538,346a75,75,0,1,1,75-75A75,75,0,0,1,538,346Zm0-31a44,44,0,1,0-44-44A44,44,0,0,0,538,315Zm-82-45c0,41.9-33.6,76-75,76s-75-34-75-75.9S336.5,196,381,196c16.4,0,31.6,3.5,44,12.6V165.1c0-8.3,7.3-15.1,15.5-15.1s15.5,6.8,15.5,15.1Zm-75,45a44,44,0,1,0-44-44A44,44,0,0,0,381,315Z", fill: color }), _jsx(Path, { d: "M224,346a75,75,0,1,1,75-75A75,75,0,0,1,224,346Zm0-31a44,44,0,1,0-44-44A44,44,0,0,0,224,315Z", fill: color })] }));
|
|
5
10
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { CustomIconProps } from "../icons/props";
|
|
2
2
|
import React from "react";
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Device-coupled (printer hardware); relocated to the core. Import from
|
|
5
|
+
* `@sincpro/mobile/ui/components/atoms` instead. Kept here for backwards compatibility
|
|
6
|
+
* and removed in the next major.
|
|
7
|
+
*/
|
|
3
8
|
declare const PrinterIcon: React.FC<CustomIconProps>;
|
|
4
9
|
export default PrinterIcon;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
2
|
import Svg, { Path, Rect } from "react-native-svg";
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Device-coupled (printer hardware); relocated to the core. Import from
|
|
5
|
+
* `@sincpro/mobile/ui/components/atoms` instead. Kept here for backwards compatibility
|
|
6
|
+
* and removed in the next major.
|
|
7
|
+
*/
|
|
3
8
|
const PrinterIcon = ({ size = 24, color = "#000000" }) => (_jsxs(Svg, { fill: "none", height: size, viewBox: "0 0 24 24", width: size, children: [_jsx(Path, { d: "M6 9V2H18V9", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2" }), _jsx(Rect, { height: "8", rx: "1", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", width: "16", x: "4", y: "9" }), _jsx(Path, { d: "M6 18H4C3.44772 18 3 17.5523 3 17V10C3 9.44772 3.44772 9 4 9H20C20.5523 9 21 9.44772 21 10V17C21 17.5523 20.5523 18 20 18H18", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2" }), _jsx(Rect, { height: "6", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", width: "12", x: "6", y: "14" })] }));
|
|
4
9
|
export default PrinterIcon;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { Form } from "./Form";
|
|
|
5
5
|
export { Navigation } from "./Navigation";
|
|
6
6
|
export { Typography } from "./Typography";
|
|
7
7
|
export { Box, Row, Stack } from "./primitives";
|
|
8
|
+
export { type BrandingConfig, getBrandingLogo, setBranding, } from "./branding";
|
|
8
9
|
export { cn, tv, type VariantProps } from "./theme/tw";
|
|
9
10
|
export { fontFamilies, fontSizes, fontWeights, letterSpacing, lineHeights, typographyVariants, } from "./theme/typography";
|
|
10
11
|
export { default as Container } from "./layouts/Container";
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,8 @@ export { Navigation } from "./Navigation";
|
|
|
7
7
|
export { Typography } from "./Typography";
|
|
8
8
|
// Primitives (NativeWind-based - Layout utilities)
|
|
9
9
|
export { Box, Row, Stack } from "./primitives";
|
|
10
|
+
// Branding (logo del app, configurado una vez; Display.Logo lo usa como fallback)
|
|
11
|
+
export { getBrandingLogo, setBranding, } from "./branding";
|
|
10
12
|
// Theme
|
|
11
13
|
export { cn, tv } from "./theme/tw";
|
|
12
14
|
export { fontFamilies, fontSizes, fontWeights, letterSpacing, lineHeights, typographyVariants, } from "./theme/typography";
|
|
@@ -5,5 +5,5 @@ interface AuthContainerProps {
|
|
|
5
5
|
onBackPress?: () => void;
|
|
6
6
|
className?: string;
|
|
7
7
|
}
|
|
8
|
-
declare function AuthContainer({ header, children, onBackPress, className }: AuthContainerProps): import("react
|
|
8
|
+
declare function AuthContainer({ header, children, onBackPress, className }: AuthContainerProps): import("react").JSX.Element;
|
|
9
9
|
export default AuthContainer;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
2
|
import { Display } from "../Display";
|
|
3
|
-
import
|
|
3
|
+
import GradientSurface from "../Display/Display.GradientSurface";
|
|
4
4
|
import { theme } from "../theme";
|
|
5
5
|
import { cn } from "../theme/tw";
|
|
6
6
|
import { Dimensions, Keyboard, TouchableOpacity, TouchableWithoutFeedback, View, } from "react-native";
|
|
@@ -8,6 +8,6 @@ import { KeyboardAwareScrollView } from "react-native-keyboard-controller";
|
|
|
8
8
|
import { SafeAreaView } from "react-native-safe-area-context";
|
|
9
9
|
function AuthContainer({ header, children, onBackPress, className }) {
|
|
10
10
|
const screenHeight = Dimensions.get("window").height;
|
|
11
|
-
return (_jsx(
|
|
11
|
+
return (_jsx(GradientSurface, { className: cn("flex-1", className), preset: "night-green", radius: "none", style: { flex: 1 }, children: _jsx(SafeAreaView, { className: "flex-1", edges: ["top"], children: _jsxs(View, { className: "flex-1", children: [_jsx(TouchableWithoutFeedback, { onPress: Keyboard.dismiss, children: _jsxs(View, { className: "justify-center items-center relative", style: { height: screenHeight * 0.3 }, children: [onBackPress && (_jsx(TouchableOpacity, { className: "absolute top-4 left-4 p-2 z-[1]", onPress: onBackPress, children: _jsx(Display.Icon, { color: theme.text.inverse, name: "arrow-back", size: 24, type: "ionicons" }) })), header] }) }), _jsx(View, { className: "flex-1 bg-bg-card rounded-t-3xl shadow-lg", style: { minHeight: screenHeight * 0.7 }, children: _jsx(KeyboardAwareScrollView, { bottomOffset: 50, bounces: false, className: "flex-1", contentContainerClassName: "flex-grow pb-10", keyboardShouldPersistTaps: "handled", showsVerticalScrollIndicator: false, children: _jsx(View, { className: "p-4", children: children }) }) })] }) }) }));
|
|
12
12
|
}
|
|
13
13
|
export default AuthContainer;
|
|
@@ -4,6 +4,7 @@ import { Edge } from "react-native-safe-area-context";
|
|
|
4
4
|
type ContainerProps = {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
style?: ViewStyle;
|
|
7
|
+
/** @deprecated Ignored under edge-to-edge (SDK 54+): the status bar is always translucent. */
|
|
7
8
|
statusBarColor?: string;
|
|
8
9
|
barStyle?: "light-content" | "dark-content";
|
|
9
10
|
statusBarHidden?: boolean;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import { theme } from "../theme";
|
|
3
2
|
import { cn } from "../theme/tw";
|
|
4
3
|
import { StatusBar } from "react-native";
|
|
5
4
|
import { SafeAreaView } from "react-native-safe-area-context";
|
|
6
|
-
const Container = ({ children, style,
|
|
7
|
-
return (_jsxs(SafeAreaView, { className: cn("flex-1 bg-bg-page", className), edges: edges, style: style, children: [_jsx(StatusBar, {
|
|
5
|
+
const Container = ({ children, style, barStyle = "light-content", statusBarHidden = false, edges = ["top", "bottom", "left", "right"], className, }) => {
|
|
6
|
+
return (_jsxs(SafeAreaView, { className: cn("flex-1 bg-bg-page", className), edges: edges, style: style, children: [_jsx(StatusBar, { barStyle: barStyle, hidden: statusBarHidden }), children] }));
|
|
8
7
|
};
|
|
9
8
|
export default Container;
|
|
@@ -4,5 +4,5 @@ interface GradientContainerProps {
|
|
|
4
4
|
style?: object;
|
|
5
5
|
className?: string;
|
|
6
6
|
}
|
|
7
|
-
declare const GradientContainer: ({ children, style, className }: GradientContainerProps) => import("react
|
|
7
|
+
declare const GradientContainer: ({ children, style, className }: GradientContainerProps) => import("react").JSX.Element;
|
|
8
8
|
export default GradientContainer;
|
|
@@ -2,5 +2,5 @@ import { ReactNode } from "react";
|
|
|
2
2
|
interface PlainLayoutProps {
|
|
3
3
|
children?: ReactNode;
|
|
4
4
|
}
|
|
5
|
-
declare const PlainLayout: import("react").MemoExoticComponent<({ children }: PlainLayoutProps) => import("react
|
|
5
|
+
declare const PlainLayout: import("react").MemoExoticComponent<({ children }: PlainLayoutProps) => import("react").JSX.Element>;
|
|
6
6
|
export default PlainLayout;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
type ScrollContainerProps = {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
contentContainerStyle?: object;
|
|
5
5
|
className?: string;
|
|
6
6
|
};
|
|
7
|
-
declare function ScrollContainer({ children, contentContainerStyle, className, }: ScrollContainerProps):
|
|
7
|
+
declare function ScrollContainer({ children, contentContainerStyle, className, }: ScrollContainerProps): React.JSX.Element;
|
|
8
8
|
export default ScrollContainer;
|
|
@@ -3,6 +3,6 @@ import { cn } from "../theme/tw";
|
|
|
3
3
|
import { KeyboardAvoidingView, Platform, ScrollView, StatusBar, View } from "react-native";
|
|
4
4
|
import { SafeAreaView } from "react-native-safe-area-context";
|
|
5
5
|
function ScrollContainer({ children, contentContainerStyle = {}, className, }) {
|
|
6
|
-
return (_jsxs(SafeAreaView, { className: cn("flex-1 bg-bg-card", className), children: [_jsx(StatusBar, { barStyle: "dark-content"
|
|
6
|
+
return (_jsxs(SafeAreaView, { className: cn("flex-1 bg-bg-card", className), children: [_jsx(StatusBar, { barStyle: "dark-content" }), _jsx(KeyboardAvoidingView, { behavior: Platform.OS === "ios" ? "padding" : undefined, className: "flex-1", children: _jsx(ScrollView, { contentContainerStyle: [{ flexGrow: 1, padding: 16 }, contentContainerStyle], keyboardShouldPersistTaps: "handled", showsVerticalScrollIndicator: false, children: _jsx(View, { className: "flex-1", children: children }) }) })] }));
|
|
7
7
|
}
|
|
8
8
|
export default ScrollContainer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactElement, ReactNode } from "react";
|
|
1
|
+
import React, { ReactElement, ReactNode } from "react";
|
|
2
2
|
interface TabNavigatorLayoutProps {
|
|
3
3
|
className?: string;
|
|
4
4
|
children?: ReactNode;
|
|
@@ -16,7 +16,7 @@ export interface TabProps {
|
|
|
16
16
|
}
|
|
17
17
|
declare function Tabs({ children: tabsChildren }: {
|
|
18
18
|
children?: ReactNode;
|
|
19
|
-
}):
|
|
19
|
+
}): React.JSX.Element;
|
|
20
20
|
declare function Tab(_props: TabProps): null;
|
|
21
21
|
type TabLayoutComponent = ((props: TabNavigatorLayoutProps) => ReactElement) & {
|
|
22
22
|
Tabs: typeof Tabs;
|
|
@@ -30,6 +30,10 @@ function Tabs({ children: tabsChildren }) {
|
|
|
30
30
|
function Tab(_props) {
|
|
31
31
|
return null;
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated Use `Navigation.BottomNav` (flat, modern) for the bar, and the core's
|
|
35
|
+
* router-aware layouts. Kept for backwards compatibility.
|
|
36
|
+
*/
|
|
33
37
|
function TabNavigatorLayoutComponent({ className, children, content, currentPath, onTabPress, persistentComponent, persistentRoutePath, }) {
|
|
34
38
|
const tabs = [];
|
|
35
39
|
Children.forEach(children, (child) => {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type ViewProps } from "react-native";
|
|
3
|
+
export interface AspectRatioProps extends ViewProps {
|
|
4
|
+
ratio?: number;
|
|
5
|
+
className?: string;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare function AspectRatio({ ratio, className, style, children, ...rest }: AspectRatioProps): import("react").JSX.Element;
|
|
9
|
+
export default AspectRatio;
|
|
10
|
+
export { AspectRatio };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
+
import { cn } from "../theme/tw";
|
|
3
|
+
import { View } from "react-native";
|
|
4
|
+
function AspectRatio({ ratio = 1, className, style, children, ...rest }) {
|
|
5
|
+
return (_jsx(View, { className: cn(className), style: [{ aspectRatio: ratio }, style], ...rest, children: children }));
|
|
6
|
+
}
|
|
7
|
+
export default AspectRatio;
|
|
8
|
+
export { AspectRatio };
|
package/dist/primitives/Box.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ import { ViewProps } from "react-native";
|
|
|
2
2
|
interface BoxProps extends ViewProps {
|
|
3
3
|
className?: string;
|
|
4
4
|
}
|
|
5
|
-
declare function Box({ className, style, ...props }: BoxProps): import("react
|
|
5
|
+
declare function Box({ className, style, ...props }: BoxProps): import("react").JSX.Element;
|
|
6
6
|
export default Box;
|
|
7
7
|
export { Box };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type StyleProp, type TouchableOpacityProps, type ViewStyle } from "react-native";
|
|
3
|
+
export interface PressableProps extends Omit<TouchableOpacityProps, "style" | "children"> {
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: StyleProp<ViewStyle>;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare function Pressable({ className, disabled, hitSlop, activeOpacity, accessibilityRole, style, children, ...rest }: PressableProps): import("react").JSX.Element;
|
|
9
|
+
export default Pressable;
|
|
10
|
+
export { Pressable };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
+
import { cn } from "../theme/tw";
|
|
3
|
+
import { TouchableOpacity, } from "react-native";
|
|
4
|
+
function Pressable({ className, disabled = false, hitSlop = 8, activeOpacity = 0.7, accessibilityRole = "button", style, children, ...rest }) {
|
|
5
|
+
const isDisabled = !!disabled;
|
|
6
|
+
return (_jsx(TouchableOpacity, { accessibilityRole: accessibilityRole, accessibilityState: { disabled: isDisabled }, activeOpacity: activeOpacity, className: cn(isDisabled && "opacity-50", className), disabled: isDisabled, hitSlop: hitSlop, style: style, ...rest, children: children }));
|
|
7
|
+
}
|
|
8
|
+
export default Pressable;
|
|
9
|
+
export { Pressable };
|
package/dist/primitives/Row.d.ts
CHANGED
|
@@ -6,6 +6,6 @@ interface RowProps extends ViewProps {
|
|
|
6
6
|
wrap?: boolean;
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
|
-
declare function Row({ spacing, align, justify, wrap, className, style, ...props }: RowProps): import("react
|
|
9
|
+
declare function Row({ spacing, align, justify, wrap, className, style, ...props }: RowProps): import("react").JSX.Element;
|
|
10
10
|
export default Row;
|
|
11
11
|
export { Row };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
function Spacer({ size = 8, horizontal = false, flex = false }) {
|
|
4
|
+
if (flex)
|
|
5
|
+
return _jsx(View, { style: { flex: 1 } });
|
|
6
|
+
return _jsx(View, { style: horizontal ? { width: size } : { height: size } });
|
|
7
|
+
}
|
|
8
|
+
export default Spacer;
|
|
9
|
+
export { Spacer };
|
|
@@ -4,6 +4,6 @@ interface StackProps extends ViewProps {
|
|
|
4
4
|
align?: "start" | "center" | "end" | "stretch";
|
|
5
5
|
className?: string;
|
|
6
6
|
}
|
|
7
|
-
declare function Stack({ spacing, align, className, style, ...props }: StackProps): import("react
|
|
7
|
+
declare function Stack({ spacing, align, className, style, ...props }: StackProps): import("react").JSX.Element;
|
|
8
8
|
export default Stack;
|
|
9
9
|
export { Stack };
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export { AspectRatio, type AspectRatioProps, } from "../primitives/AspectRatio";
|
|
1
2
|
export { Box } from "../primitives/Box";
|
|
3
|
+
export { Pressable, type PressableProps } from "../primitives/Pressable";
|
|
2
4
|
export { Row } from "../primitives/Row";
|
|
5
|
+
export { Spacer, type SpacerProps } from "../primitives/Spacer";
|
|
3
6
|
export { Stack } from "../primitives/Stack";
|
package/dist/primitives/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export { AspectRatio, } from "../primitives/AspectRatio";
|
|
1
2
|
export { Box } from "../primitives/Box";
|
|
3
|
+
export { Pressable } from "../primitives/Pressable";
|
|
2
4
|
export { Row } from "../primitives/Row";
|
|
5
|
+
export { Spacer } from "../primitives/Spacer";
|
|
3
6
|
export { Stack } from "../primitives/Stack";
|
package/dist/theme/active.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import type { ThemeTokens } from "../theme/types";
|
|
2
2
|
export declare function setActiveTheme(tokens: ThemeTokens): void;
|
|
3
3
|
export declare function getActiveTheme(): ThemeTokens;
|
|
4
|
+
export declare function subscribeTheme(listener: () => void): () => void;
|
|
5
|
+
export declare function getThemeVersion(): number;
|
package/dist/theme/active.js
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
import { DEFAULT_THEME } from "../theme/default";
|
|
2
2
|
const activeTheme = { ...DEFAULT_THEME };
|
|
3
|
+
const listeners = new Set();
|
|
4
|
+
let version = 0;
|
|
3
5
|
export function setActiveTheme(tokens) {
|
|
4
6
|
Object.assign(activeTheme, tokens);
|
|
7
|
+
version += 1;
|
|
8
|
+
listeners.forEach((listener) => listener());
|
|
5
9
|
}
|
|
6
10
|
export function getActiveTheme() {
|
|
7
11
|
return activeTheme;
|
|
8
12
|
}
|
|
13
|
+
export function subscribeTheme(listener) {
|
|
14
|
+
listeners.add(listener);
|
|
15
|
+
return () => {
|
|
16
|
+
listeners.delete(listener);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export function getThemeVersion() {
|
|
20
|
+
return version;
|
|
21
|
+
}
|
|
@@ -17,5 +17,5 @@ import type { ActivityIndicatorProps } from "react-native";
|
|
|
17
17
|
interface ThemedActivityIndicatorProps extends Omit<ActivityIndicatorProps, "color"> {
|
|
18
18
|
color?: string;
|
|
19
19
|
}
|
|
20
|
-
export declare function ThemedActivityIndicator({ color, ...props }: ThemedActivityIndicatorProps): import("react
|
|
20
|
+
export declare function ThemedActivityIndicator({ color, ...props }: ThemedActivityIndicatorProps): import("react").JSX.Element;
|
|
21
21
|
export {};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* THEMED COMPONENTS - Barrel Export
|
|
4
4
|
* ============================================================================
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* Components that need access to theme tokens via hook.
|
|
7
7
|
* Estos son el 1% de casos donde className no es suficiente.
|
|
8
8
|
*/
|
|
9
9
|
export { ThemedActivityIndicator } from "../../theme/components/ThemedActivityIndicator";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* THEMED COMPONENTS - Barrel Export
|
|
4
4
|
* ============================================================================
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* Components that need access to theme tokens via hook.
|
|
7
7
|
* Estos son el 1% de casos donde className no es suficiente.
|
|
8
8
|
*/
|
|
9
9
|
export { ThemedActivityIndicator } from "../../theme/components/ThemedActivityIndicator";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ThemeTokens } from "../theme/types";
|
|
2
|
+
/**
|
|
3
|
+
* SINCPRO brand-dark theme.
|
|
4
|
+
* Identity: black (#0B0B0B) surfaces + neon-green (#00F58C) as primary CTA / accent.
|
|
5
|
+
* Border/text tones shift to near-black warm neutrals (not blue-slate).
|
|
6
|
+
*/
|
|
7
|
+
export declare const DEFAULT_DARK_THEME: ThemeTokens;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SINCPRO brand-dark theme.
|
|
3
|
+
* Identity: black (#0B0B0B) surfaces + neon-green (#00F58C) as primary CTA / accent.
|
|
4
|
+
* Border/text tones shift to near-black warm neutrals (not blue-slate).
|
|
5
|
+
*/
|
|
6
|
+
export const DEFAULT_DARK_THEME = {
|
|
7
|
+
name: "dark",
|
|
8
|
+
primary: "#00F58C", // verde neón → primary action in dark (border, link, focus indicator)
|
|
9
|
+
secondary: "#6B6963",
|
|
10
|
+
accent: "#00F58C",
|
|
11
|
+
bg: {
|
|
12
|
+
page: "#0B0B0B",
|
|
13
|
+
card: "#161616",
|
|
14
|
+
popover: "#161616",
|
|
15
|
+
muted: "#1E1E1E",
|
|
16
|
+
accent: "#0D2B1F", // dark-green tint for selected/active rows
|
|
17
|
+
hover: "#262626",
|
|
18
|
+
disabled: "#161616",
|
|
19
|
+
inverse: "#0B0B0B",
|
|
20
|
+
},
|
|
21
|
+
text: {
|
|
22
|
+
primary: "#FFFFFF",
|
|
23
|
+
secondary: "#B0B0B0",
|
|
24
|
+
tertiary: "#7D7D7D",
|
|
25
|
+
muted: "#9D9D9D",
|
|
26
|
+
accent: "#00F58C",
|
|
27
|
+
inverse: "#0B0B0B",
|
|
28
|
+
disabled: "#4A4A4A",
|
|
29
|
+
onPrimary: "#06170E", // texto sobre verde neón: oscuro para contraste
|
|
30
|
+
onSecondary: "#0B0B0B",
|
|
31
|
+
onAccent: "#06170E",
|
|
32
|
+
onDanger: "#FFFFFF",
|
|
33
|
+
onSuccess: "#FFFFFF",
|
|
34
|
+
},
|
|
35
|
+
icon: {
|
|
36
|
+
primary: "#FFFFFF",
|
|
37
|
+
secondary: "#9A9A9A",
|
|
38
|
+
tertiary: "#7D7D7D",
|
|
39
|
+
inverse: "#0B0B0B",
|
|
40
|
+
disabled: "#4A4A4A",
|
|
41
|
+
},
|
|
42
|
+
border: {
|
|
43
|
+
default: "#262626",
|
|
44
|
+
light: "#1E1E1E",
|
|
45
|
+
strong: "#3A3A3A",
|
|
46
|
+
focus: "#00F58C",
|
|
47
|
+
},
|
|
48
|
+
success: "#00C357",
|
|
49
|
+
warning: "#FFB020",
|
|
50
|
+
danger: "#FF4D1F",
|
|
51
|
+
info: "#5B8DEF",
|
|
52
|
+
successLight: "#0D2B1A",
|
|
53
|
+
warningLight: "#2B1E04",
|
|
54
|
+
dangerLight: "#2B0A04",
|
|
55
|
+
infoLight: "#0A143B",
|
|
56
|
+
ring: "#00F58C",
|
|
57
|
+
input: "#262626",
|
|
58
|
+
gradient: {
|
|
59
|
+
primary: ["#22E584", "#00F58C"], // verde gradient → primary btn en dark = CTA verde
|
|
60
|
+
accent: ["#22E584", "#00F58C"],
|
|
61
|
+
},
|
|
62
|
+
shadow: {
|
|
63
|
+
sm: {
|
|
64
|
+
shadowColor: "#000000",
|
|
65
|
+
shadowOffset: { width: 0, height: 1 },
|
|
66
|
+
shadowOpacity: 0.4,
|
|
67
|
+
shadowRadius: 3,
|
|
68
|
+
elevation: 2,
|
|
69
|
+
},
|
|
70
|
+
md: {
|
|
71
|
+
shadowColor: "#000000",
|
|
72
|
+
shadowOffset: { width: 0, height: 4 },
|
|
73
|
+
shadowOpacity: 0.55,
|
|
74
|
+
shadowRadius: 8,
|
|
75
|
+
elevation: 4,
|
|
76
|
+
},
|
|
77
|
+
lg: {
|
|
78
|
+
shadowColor: "#000000",
|
|
79
|
+
shadowOffset: { width: 0, height: 10 },
|
|
80
|
+
shadowOpacity: 0.65,
|
|
81
|
+
shadowRadius: 18,
|
|
82
|
+
elevation: 7,
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
};
|