@sincpro/mobile-ui 0.7.2 → 1.0.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 +7 -5
- package/dist/Actions/Actions.Button.d.ts +91 -91
- package/dist/Actions/Actions.Button.js +36 -43
- package/dist/Actions/Actions.FAB.js +5 -5
- package/dist/Actions/Actions.FilterButton.js +3 -3
- package/dist/Actions/Actions.IconButton.d.ts +31 -31
- package/dist/Actions/Actions.IconButton.js +4 -4
- package/dist/Actions/index.d.ts +11 -11
- package/dist/Actions/index.js +5 -5
- package/dist/Dialog/BottomSheet/BottomSheet.Root.js +1 -1
- package/dist/Dialog/BottomSheet/index.d.ts +1 -1
- package/dist/Dialog/BottomSheet/index.js +1 -1
- package/dist/Dialog/Confirmation.context.js +3 -3
- package/dist/Dialog/Dialog.ActionSheet.js +6 -6
- package/dist/Dialog/Dialog.Confirmation.js +4 -4
- package/dist/Dialog/Dialog.EditValue.js +4 -4
- package/dist/Dialog/Dialog.Sheet.js +6 -4
- package/dist/Dialog/index.d.ts +5 -5
- package/dist/Dialog/index.js +5 -5
- package/dist/Display/Display.Accordion.js +5 -5
- package/dist/Display/Display.Avatar.d.ts +30 -30
- package/dist/Display/Display.Avatar.js +2 -2
- package/dist/Display/Display.AvatarGroup.js +3 -3
- package/dist/Display/Display.Badge.d.ts +3 -3
- package/dist/Display/Display.Badge.js +1 -1
- package/dist/Display/Display.Card.d.ts +15 -15
- package/dist/Display/Display.Card.js +4 -4
- package/dist/Display/Display.Carousel.js +2 -2
- package/dist/Display/Display.Chip.d.ts +3 -3
- package/dist/Display/Display.Chip.js +12 -12
- package/dist/Display/Display.CircleButton.d.ts +1 -1
- package/dist/Display/Display.CircleButton.js +3 -3
- package/dist/Display/Display.CopyableText.js +2 -2
- package/dist/Display/Display.CountRecords.js +2 -2
- package/dist/Display/Display.DataTable.js +2 -2
- package/dist/Display/Display.Date.d.ts +1 -1
- package/dist/Display/Display.Date.js +5 -5
- package/dist/Display/Display.Divider.d.ts +24 -24
- package/dist/Display/Display.Divider.js +1 -1
- package/dist/Display/Display.GradientSurface.d.ts +58 -39
- package/dist/Display/Display.GradientSurface.js +31 -15
- package/dist/Display/Display.Icon.d.ts +1 -1
- package/dist/Display/Display.Icon.js +1 -1
- package/dist/Display/Display.IconBadge.js +3 -3
- package/dist/Display/Display.Image.js +4 -4
- package/dist/Display/Display.KeyValue.js +2 -2
- package/dist/Display/Display.ListItem.js +5 -5
- package/dist/Display/Display.Logo.d.ts +3 -3
- package/dist/Display/Display.Logo.js +2 -2
- package/dist/Display/Display.MediaCard.js +4 -4
- package/dist/Display/Display.MediaEmbed.js +7 -7
- package/dist/Display/Display.MenuButton.d.ts +4 -4
- package/dist/Display/Display.MenuButton.js +6 -6
- package/dist/Display/Display.MenuCard.d.ts +1 -1
- package/dist/Display/Display.MenuCard.js +3 -3
- package/dist/Display/Display.MenuGrid.d.ts +1 -1
- package/dist/Display/Display.MenuGrid.js +1 -1
- package/dist/Display/Display.Monetary.d.ts +1 -1
- package/dist/Display/Display.Monetary.js +2 -2
- package/dist/Display/Display.Pattern.d.ts +33 -12
- package/dist/Display/Display.Pattern.js +60 -14
- package/dist/Display/Display.PriceTag.js +2 -2
- package/dist/Display/Display.ProductCard.js +7 -7
- package/dist/Display/Display.Rating.js +3 -3
- package/dist/Display/Display.SearchHistory.js +6 -6
- package/dist/Display/Display.SectionHeader.js +4 -4
- package/dist/Display/Display.Stat.js +2 -2
- package/dist/Display/Display.StatCard.js +4 -4
- package/dist/Display/Display.StatusDot.js +3 -3
- package/dist/Display/Display.Story.js +3 -3
- package/dist/Display/Display.StoryTray.js +5 -5
- package/dist/Display/Display.StoryViewer.js +4 -4
- package/dist/Display/Display.SwipeableRow.js +4 -4
- package/dist/Display/Display.Tag.js +2 -2
- package/dist/Display/Display.Timeline.js +4 -4
- package/dist/Display/Display.Tooltip.js +3 -3
- package/dist/Display/index.d.ts +45 -45
- package/dist/Display/index.js +42 -42
- package/dist/Feedback/ErrorBoundary.d.ts +1 -1
- package/dist/Feedback/ErrorBoundary.js +1 -1
- package/dist/Feedback/Feedback.Banner.d.ts +3 -3
- package/dist/Feedback/Feedback.Banner.js +5 -5
- package/dist/Feedback/Feedback.DomainSplashScreen.js +5 -4
- package/dist/Feedback/Feedback.Empty.js +3 -3
- package/dist/Feedback/Feedback.EmptyState.js +5 -5
- package/dist/Feedback/Feedback.Error.js +4 -4
- package/dist/Feedback/Feedback.Loading.d.ts +1 -1
- package/dist/Feedback/Feedback.Loading.js +2 -2
- package/dist/Feedback/Feedback.PermissionCard.js +5 -5
- package/dist/Feedback/Feedback.Progress.js +2 -2
- package/dist/Feedback/Feedback.ProgressCircle.js +1 -1
- package/dist/Feedback/Feedback.Skeleton.js +2 -2
- package/dist/Feedback/Feedback.Spinner.js +3 -3
- package/dist/Feedback/Feedback.Splash.d.ts +1 -1
- package/dist/Feedback/Feedback.Splash.js +7 -6
- package/dist/Feedback/Toast.context.js +7 -7
- package/dist/Feedback/index.d.ts +13 -13
- package/dist/Feedback/index.js +13 -13
- package/dist/Form/Form.Button.d.ts +2 -2
- package/dist/Form/Form.Button.js +1 -1
- package/dist/Form/Form.Checkbox.js +4 -4
- package/dist/Form/Form.ControlledCheckbox.js +1 -1
- package/dist/Form/Form.ControlledInput.js +1 -1
- package/dist/Form/Form.ControlledMonetaryInput.js +1 -1
- package/dist/Form/Form.ControlledRadioButton.js +1 -1
- package/dist/Form/Form.DatePicker.js +5 -5
- package/dist/Form/Form.Dropdown.js +7 -7
- package/dist/Form/Form.FAB.d.ts +2 -2
- package/dist/Form/Form.FAB.js +1 -1
- package/dist/Form/Form.FilterButton.d.ts +2 -2
- package/dist/Form/Form.FilterButton.js +1 -1
- package/dist/Form/Form.FractionalQuantityInput.js +4 -4
- package/dist/Form/Form.IconButton.d.ts +2 -2
- package/dist/Form/Form.IconButton.js +1 -1
- package/dist/Form/Form.Input.js +4 -4
- package/dist/Form/Form.InputField.d.ts +1 -1
- package/dist/Form/Form.InputField.js +3 -3
- package/dist/Form/Form.MonetaryInput.js +5 -4
- package/dist/Form/Form.PasswordInput.d.ts +1 -1
- package/dist/Form/Form.PasswordInput.js +3 -3
- package/dist/Form/Form.PinInput.js +5 -5
- package/dist/Form/Form.QuantitySelector.js +3 -3
- package/dist/Form/Form.RadioButton.js +4 -4
- package/dist/Form/Form.SearchBar.js +4 -4
- package/dist/Form/Form.Select.js +6 -6
- package/dist/Form/Form.Slider.js +3 -3
- package/dist/Form/Form.Switch.js +4 -4
- package/dist/Form/Form.TextInput.js +3 -3
- package/dist/Form/index.d.ts +27 -27
- package/dist/Form/index.js +25 -25
- package/dist/Navigation/Navigation.AppBar.d.ts +5 -4
- package/dist/Navigation/Navigation.AppBar.js +10 -10
- package/dist/Navigation/Navigation.BottomNav.d.ts +1 -1
- package/dist/Navigation/Navigation.BottomNav.js +25 -16
- package/dist/Navigation/Navigation.CollapsingHeader.d.ts +1 -1
- package/dist/Navigation/Navigation.CollapsingHeader.js +3 -3
- package/dist/Navigation/Navigation.FloatingBar.js +2 -2
- package/dist/Navigation/Navigation.Header.js +6 -6
- package/dist/Navigation/Navigation.HeaderToolbar.js +5 -5
- package/dist/Navigation/Navigation.Menu.js +6 -6
- package/dist/Navigation/Navigation.MenuSection.js +2 -2
- package/dist/Navigation/Navigation.RowItem.d.ts +1 -1
- package/dist/Navigation/Navigation.RowItem.js +2 -2
- package/dist/Navigation/Navigation.SearchBar.js +6 -6
- package/dist/Navigation/Navigation.SegmentedControl.js +4 -4
- package/dist/Navigation/Navigation.Steps.js +5 -5
- package/dist/Navigation/Navigation.TabIcon.js +2 -2
- package/dist/Navigation/Navigation.TabItem.js +2 -2
- package/dist/Navigation/Navigation.Tabs.js +5 -5
- package/dist/Navigation/index.d.ts +19 -19
- package/dist/Navigation/index.js +15 -15
- package/dist/Typography/Typography.Heading.d.ts +1 -1
- package/dist/Typography/Typography.Heading.js +1 -1
- package/dist/Typography/Typography.Text.d.ts +2 -2
- package/dist/Typography/Typography.Text.js +8 -6
- package/dist/Typography/index.d.ts +2 -2
- package/dist/Typography/index.js +2 -2
- package/dist/branding.d.ts +22 -0
- package/dist/branding.js +20 -3
- package/dist/icons/AddItemIcon.d.ts +1 -1
- package/dist/icons/ArrangeCircle.d.ts +1 -1
- package/dist/icons/ArrowDownIcon.d.ts +1 -1
- package/dist/icons/ArrowUpIcon.d.ts +1 -1
- package/dist/icons/BoxIcon.d.ts +1 -1
- package/dist/icons/BoxTimeIcon.d.ts +1 -1
- package/dist/icons/CalendarIcon.d.ts +1 -1
- package/dist/icons/CardIcon.d.ts +1 -1
- package/dist/icons/CashierIcon.d.ts +1 -1
- package/dist/icons/DuoIcon.d.ts +1 -1
- package/dist/icons/HomeIcon.d.ts +1 -1
- package/dist/icons/HomeIconOutlined.d.ts +1 -1
- package/dist/icons/LogoIcon.d.ts +1 -1
- package/dist/icons/MoneyReceiveIcon.d.ts +1 -1
- package/dist/icons/PinIcon.d.ts +1 -1
- package/dist/icons/PrinterIcon.d.ts +1 -1
- package/dist/icons/ProfileIcon.d.ts +1 -1
- package/dist/icons/SettingsIcon.d.ts +1 -1
- package/dist/icons/SinpeIcon.d.ts +1 -1
- package/dist/icons/ToggleOffIcon.d.ts +1 -1
- package/dist/icons/WalletMoneyIcon.d.ts +1 -1
- package/dist/index.d.ts +24 -23
- package/dist/index.js +26 -24
- package/dist/layouts/AuthContainer.d.ts +5 -2
- package/dist/layouts/AuthContainer.js +6 -6
- package/dist/layouts/Container.js +1 -1
- package/dist/layouts/GradientContainer.js +1 -1
- package/dist/layouts/ScrollContainer.js +1 -1
- package/dist/layouts/TabNavigatorLayout.js +4 -4
- package/dist/primitives/AspectRatio.js +1 -1
- package/dist/primitives/BaseButton.d.ts +85 -85
- package/dist/primitives/BaseButton.js +34 -50
- package/dist/primitives/Box.js +1 -1
- package/dist/primitives/Pressable.js +1 -1
- package/dist/primitives/Row.js +1 -1
- package/dist/primitives/Stack.js +1 -1
- package/dist/primitives/index.d.ts +6 -6
- package/dist/primitives/index.js +6 -6
- package/dist/theme/active.d.ts +1 -1
- package/dist/theme/active.js +14 -1
- package/dist/theme/build.d.ts +33 -0
- package/dist/theme/build.js +118 -0
- package/dist/theme/color.d.ts +26 -0
- package/dist/theme/color.js +109 -0
- package/dist/theme/components/index.d.ts +1 -1
- package/dist/theme/components/index.js +1 -1
- package/dist/theme/contrast.d.ts +29 -0
- package/dist/theme/contrast.js +57 -0
- package/dist/theme/css-vars.d.ts +3 -1
- package/dist/theme/css-vars.js +29 -3
- package/dist/theme/dark.d.ts +3 -4
- package/dist/theme/dark.js +91 -48
- package/dist/theme/default.d.ts +5 -1
- package/dist/theme/default.js +89 -41
- package/dist/theme/define.d.ts +4 -1
- package/dist/theme/define.js +4 -1
- package/dist/theme/globals.css +61 -46
- package/dist/theme/index.d.ts +14 -10
- package/dist/theme/index.js +13 -9
- package/dist/theme/theme.d.ts +1 -1
- package/dist/theme/theme.js +2 -2
- package/dist/theme/types.d.ts +77 -16
- package/dist/theme/types.js +13 -3
- package/dist/theme/typography.d.ts +4 -4
- package/dist/theme/typography.js +26 -28
- package/dist/theme/useTheme.d.ts +1 -1
- package/dist/theme/useTheme.js +1 -1
- package/dist/theme/validate.d.ts +16 -0
- package/dist/theme/validate.js +200 -0
- package/dist/tokens/index.d.ts +2 -2
- package/dist/tokens/index.js +2 -2
- package/dist/views/AppSplashView.d.ts +2 -2
- package/dist/views/AppSplashView.js +3 -3
- package/dist/views/AuthFormView.d.ts +1 -1
- package/dist/views/AuthFormView.js +3 -3
- package/dist/views/FormViewV2.d.ts +2 -2
- package/dist/views/FormViewV2.js +9 -9
- package/dist/views/ListViewV2.d.ts +3 -3
- package/dist/views/ListViewV2.js +16 -16
- package/dist/views/Wizard/Wizard.context.js +1 -1
- package/dist/views/Wizard/Wizard.d.ts +1 -1
- package/dist/views/Wizard/Wizard.js +1 -1
- package/dist/views/Wizard/index.d.ts +4 -4
- package/dist/views/Wizard/index.js +2 -2
- package/dist/views/types/IFormView.d.ts +1 -1
- package/dist/views/types/IListView.d.ts +1 -1
- package/dist/widgets/CircleButton.d.ts +2 -2
- package/dist/widgets/CircleButton.js +1 -1
- package/dist/widgets/GeoPermissionCard.js +3 -3
- package/dist/widgets/HomeHeader.js +3 -3
- package/dist/widgets/JSONViewer.js +2 -2
- package/dist/widgets/MenuCard.d.ts +2 -2
- package/dist/widgets/MenuCard.js +1 -1
- package/dist/widgets/MenuGrid.d.ts +3 -3
- package/dist/widgets/MenuGrid.js +1 -1
- package/dist/widgets/MenuSection.d.ts +2 -2
- package/dist/widgets/MenuSection.js +1 -1
- package/dist/widgets/PromoBanner.js +3 -3
- package/dist/widgets/PromoModal.js +3 -3
- package/dist/widgets/QuickActions.js +3 -3
- package/dist/widgets/ScreenHeader.js +2 -2
- package/dist/widgets/TimeZoneSelector.d.ts +1 -1
- package/dist/widgets/TimeZoneSelector.js +4 -4
- package/dist/widgets/TimeZoneSelectorModal.d.ts +1 -1
- package/dist/widgets/TimeZoneSelectorModal.js +5 -5
- package/dist/widgets/index.d.ts +16 -16
- package/dist/widgets/index.js +10 -10
- package/package.json +56 -50
- package/tailwind.preset.js +19 -0
- package/dist/icons/icon_getters.d.ts +0 -6
- package/dist/icons/icon_getters.js +0 -23
|
@@ -1,15 +1,26 @@
|
|
|
1
|
-
import { type VariantProps } from "../theme/tw";
|
|
1
|
+
import { type VariantProps } from "../theme/tw.js";
|
|
2
2
|
import { type LinearGradientPoint } from "expo-linear-gradient";
|
|
3
3
|
import type { ReactNode } from "react";
|
|
4
4
|
import { type ViewStyle } from "react-native";
|
|
5
5
|
/**
|
|
6
|
-
* Decorative gradient presets
|
|
7
|
-
*
|
|
8
|
-
* Each is [from, …, to].
|
|
6
|
+
* Decorative gradient presets. `brand` is themeable (reads `theme.gradient.primary`) —
|
|
7
|
+
* use it when you want the surface to follow whatever the app's active theme defines.
|
|
8
|
+
* Other presets are static constants for one-off uses. Each is [from, …, to].
|
|
9
9
|
*/
|
|
10
10
|
declare const GRADIENT_PRESETS: {
|
|
11
|
+
readonly warm: {
|
|
12
|
+
readonly colors: readonly ["#1A1714", "#C89B3C", "#B88A2E"];
|
|
13
|
+
readonly start: {
|
|
14
|
+
readonly x: 0;
|
|
15
|
+
readonly y: 0;
|
|
16
|
+
};
|
|
17
|
+
readonly end: {
|
|
18
|
+
readonly x: 1;
|
|
19
|
+
readonly y: 1;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
11
22
|
readonly "neon-teal": {
|
|
12
|
-
readonly colors: readonly ["#
|
|
23
|
+
readonly colors: readonly ["#0F5C6E", "#5CC4D8"];
|
|
13
24
|
readonly start: {
|
|
14
25
|
readonly x: 0;
|
|
15
26
|
readonly y: 0;
|
|
@@ -20,7 +31,7 @@ declare const GRADIENT_PRESETS: {
|
|
|
20
31
|
};
|
|
21
32
|
};
|
|
22
33
|
readonly "night-green": {
|
|
23
|
-
readonly colors: readonly ["#
|
|
34
|
+
readonly colors: readonly ["#0B101E", "#18223A"];
|
|
24
35
|
readonly start: {
|
|
25
36
|
readonly x: 0;
|
|
26
37
|
readonly y: 0;
|
|
@@ -31,7 +42,7 @@ declare const GRADIENT_PRESETS: {
|
|
|
31
42
|
};
|
|
32
43
|
};
|
|
33
44
|
readonly mesh: {
|
|
34
|
-
readonly colors: readonly ["#
|
|
45
|
+
readonly colors: readonly ["#1C3765", "#2A4A85", "#8FA9E8"];
|
|
35
46
|
readonly start: {
|
|
36
47
|
readonly x: 0;
|
|
37
48
|
readonly y: 0;
|
|
@@ -42,7 +53,7 @@ declare const GRADIENT_PRESETS: {
|
|
|
42
53
|
};
|
|
43
54
|
};
|
|
44
55
|
readonly emerald: {
|
|
45
|
-
readonly colors: readonly ["#
|
|
56
|
+
readonly colors: readonly ["#2F6B3C", "#6FCF8B"];
|
|
46
57
|
readonly start: {
|
|
47
58
|
readonly x: 0;
|
|
48
59
|
readonly y: 0;
|
|
@@ -53,49 +64,57 @@ declare const GRADIENT_PRESETS: {
|
|
|
53
64
|
};
|
|
54
65
|
};
|
|
55
66
|
};
|
|
56
|
-
|
|
67
|
+
/**
|
|
68
|
+
* Aliases kept for backwards compatibility. These were the original names; the
|
|
69
|
+
* canonical ones are above. Use the canonical names in new code.
|
|
70
|
+
* @deprecated use `warm` instead of `gold-mesh`.
|
|
71
|
+
*/
|
|
72
|
+
declare const DEPRECATED_PRESETS: {
|
|
73
|
+
readonly "gold-mesh": "warm";
|
|
74
|
+
};
|
|
75
|
+
export type GradientPreset = keyof typeof GRADIENT_PRESETS | keyof typeof DEPRECATED_PRESETS | "brand";
|
|
57
76
|
declare const surface: import("tailwind-variants").TVReturnType<{
|
|
58
77
|
radius: {
|
|
59
|
-
none:
|
|
60
|
-
md:
|
|
61
|
-
lg:
|
|
62
|
-
full:
|
|
78
|
+
none: "rounded-none";
|
|
79
|
+
md: "rounded-xl";
|
|
80
|
+
lg: "rounded-2xl";
|
|
81
|
+
full: "rounded-full";
|
|
63
82
|
};
|
|
64
83
|
padding: {
|
|
65
|
-
none:
|
|
66
|
-
sm:
|
|
67
|
-
md:
|
|
68
|
-
lg:
|
|
84
|
+
none: "p-0";
|
|
85
|
+
sm: "p-3";
|
|
86
|
+
md: "p-4";
|
|
87
|
+
lg: "p-6";
|
|
69
88
|
};
|
|
70
89
|
}, undefined, undefined, {
|
|
71
90
|
radius: {
|
|
72
|
-
none:
|
|
73
|
-
md:
|
|
74
|
-
lg:
|
|
75
|
-
full:
|
|
91
|
+
none: "rounded-none";
|
|
92
|
+
md: "rounded-xl";
|
|
93
|
+
lg: "rounded-2xl";
|
|
94
|
+
full: "rounded-full";
|
|
76
95
|
};
|
|
77
96
|
padding: {
|
|
78
|
-
none:
|
|
79
|
-
sm:
|
|
80
|
-
md:
|
|
81
|
-
lg:
|
|
97
|
+
none: "p-0";
|
|
98
|
+
sm: "p-3";
|
|
99
|
+
md: "p-4";
|
|
100
|
+
lg: "p-6";
|
|
82
101
|
};
|
|
83
|
-
}, undefined, import("tailwind-variants").
|
|
102
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
84
103
|
radius: {
|
|
85
|
-
none:
|
|
86
|
-
md:
|
|
87
|
-
lg:
|
|
88
|
-
full:
|
|
104
|
+
none: "rounded-none";
|
|
105
|
+
md: "rounded-xl";
|
|
106
|
+
lg: "rounded-2xl";
|
|
107
|
+
full: "rounded-full";
|
|
89
108
|
};
|
|
90
109
|
padding: {
|
|
91
|
-
none:
|
|
92
|
-
sm:
|
|
93
|
-
md:
|
|
94
|
-
lg:
|
|
110
|
+
none: "p-0";
|
|
111
|
+
sm: "p-3";
|
|
112
|
+
md: "p-4";
|
|
113
|
+
lg: "p-6";
|
|
95
114
|
};
|
|
96
|
-
}, undefined
|
|
115
|
+
}, undefined>>;
|
|
97
116
|
export interface GradientSurfaceProps extends VariantProps<typeof surface> {
|
|
98
|
-
/** Named
|
|
117
|
+
/** Named gradient preset. Ignored if `colors` is provided. */
|
|
99
118
|
preset?: GradientPreset;
|
|
100
119
|
/** Custom gradient stops (overrides `preset`). */
|
|
101
120
|
colors?: readonly [string, string, ...string[]];
|
|
@@ -107,9 +126,9 @@ export interface GradientSurfaceProps extends VariantProps<typeof surface> {
|
|
|
107
126
|
testID?: string;
|
|
108
127
|
}
|
|
109
128
|
/**
|
|
110
|
-
* Modern gradient surface
|
|
111
|
-
*
|
|
112
|
-
*
|
|
129
|
+
* Modern gradient surface. Wraps `expo-linear-gradient` with named presets +
|
|
130
|
+
* tokenized radius/padding. iOS + Android (no native dep beyond the already-peer
|
|
131
|
+
* `expo-linear-gradient`). Replaces the legacy `GradientContainer`.
|
|
113
132
|
*/
|
|
114
133
|
declare function GradientSurface({ preset, colors, start, end, radius, padding, children, className, style, testID, }: GradientSurfaceProps): import("react").JSX.Element;
|
|
115
134
|
export default GradientSurface;
|
|
@@ -1,35 +1,48 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import { theme } from "../theme";
|
|
3
|
-
import { cn, tv } from "../theme/tw";
|
|
2
|
+
import { theme } from "../theme/index.js";
|
|
3
|
+
import { cn, tv } from "../theme/tw.js";
|
|
4
4
|
import { LinearGradient } from "expo-linear-gradient";
|
|
5
5
|
import { View } from "react-native";
|
|
6
6
|
/**
|
|
7
|
-
* Decorative gradient presets
|
|
8
|
-
*
|
|
9
|
-
* Each is [from, …, to].
|
|
7
|
+
* Decorative gradient presets. `brand` is themeable (reads `theme.gradient.primary`) —
|
|
8
|
+
* use it when you want the surface to follow whatever the app's active theme defines.
|
|
9
|
+
* Other presets are static constants for one-off uses. Each is [from, …, to].
|
|
10
10
|
*/
|
|
11
11
|
const GRADIENT_PRESETS = {
|
|
12
|
+
warm: {
|
|
13
|
+
colors: ["#1A1714", "#C89B3C", "#B88A2E"],
|
|
14
|
+
start: { x: 0, y: 0 },
|
|
15
|
+
end: { x: 1, y: 1 },
|
|
16
|
+
},
|
|
12
17
|
"neon-teal": {
|
|
13
|
-
colors: ["#
|
|
18
|
+
colors: ["#0F5C6E", "#5CC4D8"],
|
|
14
19
|
start: { x: 0, y: 0 },
|
|
15
20
|
end: { x: 1, y: 1 },
|
|
16
21
|
},
|
|
17
22
|
"night-green": {
|
|
18
|
-
colors: ["#
|
|
23
|
+
colors: ["#0B101E", "#18223A"],
|
|
19
24
|
start: { x: 0, y: 0 },
|
|
20
25
|
end: { x: 1, y: 1 },
|
|
21
26
|
},
|
|
22
27
|
mesh: {
|
|
23
|
-
colors: ["#
|
|
28
|
+
colors: ["#1C3765", "#2A4A85", "#8FA9E8"],
|
|
24
29
|
start: { x: 0, y: 0 },
|
|
25
30
|
end: { x: 1, y: 1 },
|
|
26
31
|
},
|
|
27
32
|
emerald: {
|
|
28
|
-
colors: ["#
|
|
33
|
+
colors: ["#2F6B3C", "#6FCF8B"],
|
|
29
34
|
start: { x: 0, y: 0 },
|
|
30
35
|
end: { x: 1, y: 1 },
|
|
31
36
|
},
|
|
32
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* Aliases kept for backwards compatibility. These were the original names; the
|
|
40
|
+
* canonical ones are above. Use the canonical names in new code.
|
|
41
|
+
* @deprecated use `warm` instead of `gold-mesh`.
|
|
42
|
+
*/
|
|
43
|
+
const DEPRECATED_PRESETS = {
|
|
44
|
+
"gold-mesh": "warm",
|
|
45
|
+
};
|
|
33
46
|
const surface = tv({
|
|
34
47
|
variants: {
|
|
35
48
|
radius: {
|
|
@@ -48,13 +61,16 @@ const surface = tv({
|
|
|
48
61
|
defaultVariants: { radius: "lg", padding: "none" },
|
|
49
62
|
});
|
|
50
63
|
/**
|
|
51
|
-
* Modern gradient surface
|
|
52
|
-
*
|
|
53
|
-
*
|
|
64
|
+
* Modern gradient surface. Wraps `expo-linear-gradient` with named presets +
|
|
65
|
+
* tokenized radius/padding. iOS + Android (no native dep beyond the already-peer
|
|
66
|
+
* `expo-linear-gradient`). Replaces the legacy `GradientContainer`.
|
|
54
67
|
*/
|
|
55
|
-
function GradientSurface({ preset = "
|
|
56
|
-
const
|
|
57
|
-
|
|
68
|
+
function GradientSurface({ preset = "warm", colors, start, end, radius, padding, children, className, style, testID, }) {
|
|
69
|
+
const resolvedPreset = (preset in DEPRECATED_PRESETS
|
|
70
|
+
? DEPRECATED_PRESETS[preset]
|
|
71
|
+
: preset);
|
|
72
|
+
const p = resolvedPreset === "brand" ? GRADIENT_PRESETS.warm : GRADIENT_PRESETS[resolvedPreset];
|
|
73
|
+
const presetColors = resolvedPreset === "brand" ? theme.gradient.primary : p.colors;
|
|
58
74
|
const resolvedColors = (colors ?? presetColors);
|
|
59
75
|
return (_jsxs(View, { className: cn("overflow-hidden", surface({ radius })), style: style, testID: testID, children: [_jsx(LinearGradient, { colors: [...resolvedColors], end: end ?? p.end, start: start ?? p.start, style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0 } }), _jsx(View, { className: cn(surface({ padding }), className), children: children })] }));
|
|
60
76
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
2
|
import { AntDesign, Feather, FontAwesome, FontAwesome5, Ionicons, MaterialCommunityIcons, MaterialIcons, SimpleLineIcons, } from "@expo/vector-icons";
|
|
3
|
-
import { theme } from "../theme";
|
|
3
|
+
import { theme } from "../theme/index.js";
|
|
4
4
|
import { View } from "react-native";
|
|
5
5
|
const Icon = ({ name, size = 24, color, type = "ionicons", customIcon, className, }) => {
|
|
6
6
|
const iconColor = color || theme.text.primary;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import Pressable from "../primitives/Pressable";
|
|
3
|
-
import { theme } from "../theme";
|
|
4
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import Pressable from "../primitives/Pressable.js";
|
|
3
|
+
import { theme } from "../theme/index.js";
|
|
4
|
+
import { Typography } from "../Typography/index.js";
|
|
5
5
|
import { View } from "react-native";
|
|
6
6
|
function IconBadge({ children, count, max = 99, dot = false, color, onPress, accessibilityLabel, testID, }) {
|
|
7
7
|
const showCount = typeof count === "number" && count > 0;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import Icon from "
|
|
3
|
-
import Skeleton from "../Feedback/Feedback.Skeleton";
|
|
4
|
-
import { theme } from "../theme";
|
|
5
|
-
import { cn } from "../theme/tw";
|
|
2
|
+
import Icon from "./Display.Icon.js";
|
|
3
|
+
import Skeleton from "../Feedback/Feedback.Skeleton.js";
|
|
4
|
+
import { theme } from "../theme/index.js";
|
|
5
|
+
import { cn } from "../theme/tw.js";
|
|
6
6
|
import { useState } from "react";
|
|
7
7
|
import { Image, View, } from "react-native";
|
|
8
8
|
function DisplayImage({ source, width = "100%", height, aspectRatio, radius = 12, resizeMode = "cover", fallbackIcon = "image-outline", className, style, testID, }) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import { cn } from "../theme/tw";
|
|
3
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import { cn } from "../theme/tw.js";
|
|
3
|
+
import { Typography } from "../Typography/index.js";
|
|
4
4
|
import { View } from "react-native";
|
|
5
5
|
function KeyValue({ label, value, align = "row", className, testID }) {
|
|
6
6
|
const isRow = align === "row";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "nativewind/jsx-runtime";
|
|
2
|
-
import Icon from "
|
|
3
|
-
import Pressable from "../primitives/Pressable";
|
|
4
|
-
import { theme } from "../theme";
|
|
5
|
-
import { cn } from "../theme/tw";
|
|
6
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import Icon from "./Display.Icon.js";
|
|
3
|
+
import Pressable from "../primitives/Pressable.js";
|
|
4
|
+
import { theme } from "../theme/index.js";
|
|
5
|
+
import { cn } from "../theme/tw.js";
|
|
6
|
+
import { Typography } from "../Typography/index.js";
|
|
7
7
|
import { View } from "react-native";
|
|
8
8
|
function ListItem({ title, subtitle, leading, trailing, chevron = false, onPress, showDivider = true, className, testID, }) {
|
|
9
9
|
const right = trailing ??
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type VariantProps } from "../theme/tw";
|
|
1
|
+
import { type VariantProps } from "../theme/tw.js";
|
|
2
2
|
import { FC } from "react";
|
|
3
3
|
import { type ImageSourcePropType } from "react-native";
|
|
4
4
|
declare const logo: import("tailwind-variants").TVReturnType<{
|
|
@@ -31,7 +31,7 @@ declare const logo: import("tailwind-variants").TVReturnType<{
|
|
|
31
31
|
}, {
|
|
32
32
|
container: string;
|
|
33
33
|
image: string;
|
|
34
|
-
}, import("tailwind-variants").
|
|
34
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
35
35
|
size: {
|
|
36
36
|
small: {
|
|
37
37
|
image: string;
|
|
@@ -46,7 +46,7 @@ declare const logo: import("tailwind-variants").TVReturnType<{
|
|
|
46
46
|
}, {
|
|
47
47
|
container: string;
|
|
48
48
|
image: string;
|
|
49
|
-
}
|
|
49
|
+
}>>;
|
|
50
50
|
export interface LogoProps extends VariantProps<typeof logo> {
|
|
51
51
|
source?: ImageSourcePropType;
|
|
52
52
|
className?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import { getBrandingLogo } from "../branding";
|
|
3
|
-
import { tv } from "../theme/tw";
|
|
2
|
+
import { getBrandingLogo } from "../branding.js";
|
|
3
|
+
import { tv } from "../theme/tw.js";
|
|
4
4
|
import { Image, View } from "react-native";
|
|
5
5
|
const logo = tv({
|
|
6
6
|
slots: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import DisplayImage from "
|
|
3
|
-
import Pressable from "../primitives/Pressable";
|
|
4
|
-
import { cn } from "../theme/tw";
|
|
5
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import DisplayImage from "./Display.Image.js";
|
|
3
|
+
import Pressable from "../primitives/Pressable.js";
|
|
4
|
+
import { cn } from "../theme/tw.js";
|
|
5
|
+
import { Typography } from "../Typography/index.js";
|
|
6
6
|
import { LinearGradient } from "expo-linear-gradient";
|
|
7
7
|
import { View } from "react-native";
|
|
8
8
|
function MediaCard({ image, title, subtitle, badge, overlay, aspectRatio = 16 / 9, height, radius = 16, onPress, className, testID, }) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import Icon from "
|
|
3
|
-
import DisplayImage from "
|
|
4
|
-
import Pressable from "../primitives/Pressable";
|
|
5
|
-
import { theme } from "../theme";
|
|
6
|
-
import { cn } from "../theme/tw";
|
|
7
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import Icon from "./Display.Icon.js";
|
|
3
|
+
import DisplayImage from "./Display.Image.js";
|
|
4
|
+
import Pressable from "../primitives/Pressable.js";
|
|
5
|
+
import { theme } from "../theme/index.js";
|
|
6
|
+
import { cn } from "../theme/tw.js";
|
|
7
|
+
import { Typography } from "../Typography/index.js";
|
|
8
8
|
import { View } from "react-native";
|
|
9
9
|
/**
|
|
10
10
|
* Linkable short-video card (Short/TikTok/Reel): thumbnail + play + duration.
|
|
@@ -23,7 +23,7 @@ function MediaEmbed({ thumbnail, onPress, duration, title, source, aspectRatio =
|
|
|
23
23
|
}, children: _jsx(View, { style: {
|
|
24
24
|
width: 44,
|
|
25
25
|
height: 44,
|
|
26
|
-
borderRadius:
|
|
26
|
+
borderRadius: 16,
|
|
27
27
|
backgroundColor: "rgba(0,0,0,0.55)",
|
|
28
28
|
alignItems: "center",
|
|
29
29
|
justifyContent: "center",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type SwipeRowAction } from "
|
|
2
|
-
import { type VariantProps } from "../theme/tw";
|
|
1
|
+
import { type SwipeRowAction } from "./Display.SwipeableRow.js";
|
|
2
|
+
import { type VariantProps } from "../theme/tw.js";
|
|
3
3
|
import { ComponentType, ReactNode } from "react";
|
|
4
4
|
export type MenuButtonSwipeAction = SwipeRowAction;
|
|
5
5
|
/**
|
|
@@ -70,7 +70,7 @@ declare const menuButton: import("tailwind-variants").TVReturnType<{
|
|
|
70
70
|
content: string;
|
|
71
71
|
label: string;
|
|
72
72
|
rightContainer: string;
|
|
73
|
-
}, import("tailwind-variants").
|
|
73
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
74
74
|
variant: {
|
|
75
75
|
default: {
|
|
76
76
|
iconContainer: string;
|
|
@@ -101,7 +101,7 @@ declare const menuButton: import("tailwind-variants").TVReturnType<{
|
|
|
101
101
|
content: string;
|
|
102
102
|
label: string;
|
|
103
103
|
rightContainer: string;
|
|
104
|
-
}
|
|
104
|
+
}>>;
|
|
105
105
|
export interface MenuButtonProps extends VariantProps<typeof menuButton> {
|
|
106
106
|
icon?: ComponentType<{
|
|
107
107
|
size?: number;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import SwipeableRow from "
|
|
3
|
-
import Spinner from "../Feedback/Feedback.Spinner";
|
|
4
|
-
import { useTheme } from "../theme";
|
|
5
|
-
import { tv } from "../theme/tw";
|
|
6
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import SwipeableRow from "./Display.SwipeableRow.js";
|
|
3
|
+
import Spinner from "../Feedback/Feedback.Spinner.js";
|
|
4
|
+
import { useTheme } from "../theme/index.js";
|
|
5
|
+
import { tv } from "../theme/tw.js";
|
|
6
|
+
import { Typography } from "../Typography/index.js";
|
|
7
7
|
import { Switch, TouchableOpacity, View } from "react-native";
|
|
8
8
|
function BadgeChip({ badge }) {
|
|
9
9
|
const theme = useTheme();
|
|
@@ -98,7 +98,7 @@ function MenuButton({ icon: IconComp, label, description, onPress, rightComponen
|
|
|
98
98
|
if (rightComponent)
|
|
99
99
|
return rightComponent;
|
|
100
100
|
if (toggle) {
|
|
101
|
-
return (_jsx(Switch, { onValueChange: toggle.onToggle, thumbColor: theme.bg.card, trackColor: { false: theme.border.strong, true: theme.
|
|
101
|
+
return (_jsx(Switch, { onValueChange: toggle.onToggle, thumbColor: theme.bg.card, trackColor: { false: theme.border.strong, true: theme.primary }, value: toggle.value }));
|
|
102
102
|
}
|
|
103
103
|
const hasBadge = badge != null;
|
|
104
104
|
const hasValue = !!value;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import CircleButton from "
|
|
3
|
-
import { useTheme } from "../theme";
|
|
4
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import CircleButton from "./Display.CircleButton.js";
|
|
3
|
+
import { useTheme } from "../theme/index.js";
|
|
4
|
+
import { Typography } from "../Typography/index.js";
|
|
5
5
|
import { TouchableOpacity, View } from "react-native";
|
|
6
6
|
export function MenuCard({ title, iconType = "ionicons", onPress, customIcon, size = "md", }) {
|
|
7
7
|
const theme = useTheme();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import MenuCard from "
|
|
2
|
+
import MenuCard from "./Display.MenuCard.js";
|
|
3
3
|
import { View } from "react-native";
|
|
4
4
|
export function MenuGrid({ items, size = "md" }) {
|
|
5
5
|
return (_jsx(View, { className: "flex-row flex-wrap justify-start p-2 bg-bg-page", children: items.map((item) => (_jsx(MenuCard, { customIcon: item.customIcon, iconType: item.iconType, onPress: item.onPress, size: size, title: item.title }, item.id))) }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import { Typography } from "../Typography";
|
|
3
|
-
import { formatTwoDecimals } from "../utils/monetary";
|
|
2
|
+
import { Typography } from "../Typography/index.js";
|
|
3
|
+
import { formatTwoDecimals } from "../utils/monetary.js";
|
|
4
4
|
function MonetaryField({ value, currencySymbol = "₡", prefix = "", color, textVariant = "data", style = {}, symbolColor, semibold = true, bold = false, className, }) {
|
|
5
5
|
const isEmptyValue = value === null || value === undefined || value === "";
|
|
6
6
|
const formatted = isEmptyValue ? "0.00" : formatTwoDecimals(value);
|
|
@@ -1,14 +1,33 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
1
|
+
import { type PatternMode } from "../theme/index.js";
|
|
2
|
+
import { type ImageSourcePropType, type ViewStyle } from "react-native";
|
|
3
|
+
export type PatternKind = "dots" | "grid" | "diagonals" | "mesh";
|
|
4
|
+
/**
|
|
5
|
+
* Resolved mesh params per mode. The bundled asset (`assets/brand-mesh.png`) is a
|
|
6
|
+
* black symbol on transparent bg, so the two dark modes flip it via SVG ColorMatrix
|
|
7
|
+
* to produce a light symbol on the dark surface. To swap the asset, pass `meshSrc` on
|
|
8
|
+
* the `<Display.Pattern />` consumer or override `theme.pattern.source`.
|
|
9
|
+
*/
|
|
10
|
+
declare const MESH_PRESETS: Record<PatternMode, {
|
|
11
|
+
opacity: number;
|
|
12
|
+
invert: boolean;
|
|
13
|
+
size: number;
|
|
14
|
+
}>;
|
|
3
15
|
export interface PatternProps {
|
|
4
|
-
/** Texture kind (
|
|
16
|
+
/** Texture kind (dots / grid / diagonals / mesh). mesh = symbol asset tiled via SVG <Image>. */
|
|
5
17
|
kind?: PatternKind;
|
|
6
|
-
/** Line/dot color (any color string; use a token value for theming). */
|
|
18
|
+
/** Line/dot color (any color string; use a token value for theming). Ignored for `mesh`. */
|
|
7
19
|
color?: string;
|
|
8
|
-
/**
|
|
20
|
+
/** Override the `mode` for `mesh`. Defaults to `theme.pattern.mode`. */
|
|
21
|
+
mode?: PatternMode;
|
|
22
|
+
/** Override tile opacity 0–1. Defaults per `mode`. */
|
|
9
23
|
opacity?: number;
|
|
10
|
-
/**
|
|
24
|
+
/** Override tile size in px. Defaults per `mode`. */
|
|
11
25
|
size?: number;
|
|
26
|
+
/** Override invert (mesh only). Defaults per `mode`. */
|
|
27
|
+
invert?: boolean;
|
|
28
|
+
/** Override the mesh asset. Resolution order: this prop → `theme.pattern.source` →
|
|
29
|
+
* `setBranding({ mesh })` → bundled default `assets/brand-mesh.png`. */
|
|
30
|
+
meshSrc?: ImageSourcePropType;
|
|
12
31
|
/** Absolute-fill the parent as a background layer. Default true. */
|
|
13
32
|
absoluteFill?: boolean;
|
|
14
33
|
className?: string;
|
|
@@ -16,11 +35,13 @@ export interface PatternProps {
|
|
|
16
35
|
testID?: string;
|
|
17
36
|
}
|
|
18
37
|
/**
|
|
19
|
-
* Decorative SVG texture
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
38
|
+
* Decorative SVG texture used as a background layer. Geometric kinds (dots / grid /
|
|
39
|
+
* diagonals) render inline SVG primitives; `mesh` tiles the symbol asset via
|
|
40
|
+
* `<Pattern>` + `<Image>`, flipping it via SVG `<feColorMatrix>` on dark variants. The
|
|
41
|
+
* three modes — `light-pattern` / `dark-pattern` / `dark-full` — are picked per screen
|
|
42
|
+
* (or via `theme.pattern.mode`); see `MESH_PRESETS` for the resolved opacity/invert.
|
|
43
|
+
* Pure SVG — iOS + Android, no native dep beyond `react-native-svg`.
|
|
23
44
|
*/
|
|
24
|
-
declare function Pattern({ kind, color, opacity, size, absoluteFill, className, style, testID, }: PatternProps): import("react").JSX.Element;
|
|
45
|
+
declare function Pattern({ kind, color, mode, opacity, size, invert, meshSrc, absoluteFill, className, style, testID, }: PatternProps): import("react").JSX.Element;
|
|
25
46
|
export default Pattern;
|
|
26
|
-
export { Pattern };
|
|
47
|
+
export { MESH_PRESETS, Pattern };
|