@sincpro/mobile-ui 0.7.1 → 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 +26 -10
- package/dist/Dialog/Dialog.Confirmation.js +5 -5
- package/dist/Dialog/Dialog.EditValue.js +4 -4
- package/dist/Dialog/Dialog.Sheet.js +19 -8
- 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 +6 -4
- package/dist/Feedback/Feedback.ProgressCircle.js +1 -1
- package/dist/Feedback/Feedback.Skeleton.js +5 -4
- 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 +8 -8
- 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 +33 -18
- 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 +7 -7
- 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 +4 -4
- 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,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import { cn } from "../theme/tw";
|
|
2
|
+
import { cn } from "../theme/tw.js";
|
|
3
3
|
import { StatusBar } from "react-native";
|
|
4
4
|
import { SafeAreaView } from "react-native-safe-area-context";
|
|
5
5
|
const Container = ({ children, style, barStyle = "light-content", statusBarHidden = false, edges = ["top", "bottom", "left", "right"], className, }) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import { theme } from "../theme";
|
|
2
|
+
import { theme } from "../theme/index.js";
|
|
3
3
|
import { LinearGradient } from "expo-linear-gradient";
|
|
4
4
|
const GradientContainer = ({ children, style, className }) => {
|
|
5
5
|
const gradientColors = theme.gradient.primary;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import { cn } from "../theme/tw";
|
|
2
|
+
import { cn } from "../theme/tw.js";
|
|
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, }) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "nativewind/jsx-runtime";
|
|
2
|
-
import DisplayIcon from "../Display/Display.Icon";
|
|
3
|
-
import Container from "
|
|
4
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import DisplayIcon from "../Display/Display.Icon.js";
|
|
3
|
+
import Container from "./Container.js";
|
|
4
|
+
import { Typography } from "../Typography/index.js";
|
|
5
5
|
import { Children, isValidElement } from "react";
|
|
6
6
|
import { TouchableOpacity, View } from "react-native";
|
|
7
7
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
@@ -21,7 +21,7 @@ function TabNavigator({ items, currentPath, onTabPress, }) {
|
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
23
|
onTabPress?.(path);
|
|
24
|
-
}, children: [_jsx(TabIcon, { focused: focused, Icon: Icon }), _jsx(Text, { className: `text-xs mt-1.5 font-medium ${focused ? "text-
|
|
24
|
+
}, children: [_jsx(TabIcon, { focused: focused, Icon: Icon }), _jsx(Text, { className: `text-xs mt-1.5 font-medium ${focused ? "text-text-accent" : "text-text-secondary"}`, children: label })] }, path));
|
|
25
25
|
}) }) }));
|
|
26
26
|
}
|
|
27
27
|
function Tabs({ children: tabsChildren }) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import { cn } from "../theme/tw";
|
|
2
|
+
import { cn } from "../theme/tw.js";
|
|
3
3
|
import { View } from "react-native";
|
|
4
4
|
function AspectRatio({ ratio = 1, className, style, children, ...rest }) {
|
|
5
5
|
return (_jsx(View, { className: cn(className), style: [{ aspectRatio: ratio }, style], ...rest, children: children }));
|
|
@@ -1,128 +1,128 @@
|
|
|
1
|
-
import { type VariantProps } from "../theme/tw";
|
|
1
|
+
import { type VariantProps } from "../theme/tw.js";
|
|
2
2
|
import type React from "react";
|
|
3
3
|
import { FC } from "react";
|
|
4
4
|
declare const button: import("tailwind-variants").TVReturnType<{
|
|
5
5
|
variant: {
|
|
6
|
-
primary:
|
|
7
|
-
accent:
|
|
8
|
-
secondary:
|
|
9
|
-
outline:
|
|
10
|
-
outlineDanger:
|
|
11
|
-
outlineBlack:
|
|
12
|
-
flat:
|
|
13
|
-
link:
|
|
14
|
-
transparent:
|
|
6
|
+
primary: "bg-accent";
|
|
7
|
+
accent: "bg-transparent";
|
|
8
|
+
secondary: "bg-bg-muted border border-border-strong";
|
|
9
|
+
outline: "bg-transparent border border-primary";
|
|
10
|
+
outlineDanger: "bg-transparent border border-danger";
|
|
11
|
+
outlineBlack: "bg-transparent border border-border-strong";
|
|
12
|
+
flat: "bg-text-primary/10";
|
|
13
|
+
link: "bg-transparent min-h-0";
|
|
14
|
+
transparent: "bg-transparent border border-border-light";
|
|
15
15
|
};
|
|
16
16
|
size: {
|
|
17
|
-
small:
|
|
18
|
-
medium:
|
|
19
|
-
large:
|
|
17
|
+
small: "py-1.5 px-3 min-h-[36px]";
|
|
18
|
+
medium: "py-2.5 px-4 min-h-[44px]";
|
|
19
|
+
large: "py-3 px-5 min-h-[48px]";
|
|
20
20
|
};
|
|
21
21
|
disabled: {
|
|
22
|
-
true:
|
|
22
|
+
true: "opacity-70";
|
|
23
23
|
};
|
|
24
|
-
}, undefined, "rounded-
|
|
24
|
+
}, undefined, "rounded-md items-center justify-center flex-row min-h-[44px]", {
|
|
25
25
|
variant: {
|
|
26
|
-
primary:
|
|
27
|
-
accent:
|
|
28
|
-
secondary:
|
|
29
|
-
outline:
|
|
30
|
-
outlineDanger:
|
|
31
|
-
outlineBlack:
|
|
32
|
-
flat:
|
|
33
|
-
link:
|
|
34
|
-
transparent:
|
|
26
|
+
primary: "bg-accent";
|
|
27
|
+
accent: "bg-transparent";
|
|
28
|
+
secondary: "bg-bg-muted border border-border-strong";
|
|
29
|
+
outline: "bg-transparent border border-primary";
|
|
30
|
+
outlineDanger: "bg-transparent border border-danger";
|
|
31
|
+
outlineBlack: "bg-transparent border border-border-strong";
|
|
32
|
+
flat: "bg-text-primary/10";
|
|
33
|
+
link: "bg-transparent min-h-0";
|
|
34
|
+
transparent: "bg-transparent border border-border-light";
|
|
35
35
|
};
|
|
36
36
|
size: {
|
|
37
|
-
small:
|
|
38
|
-
medium:
|
|
39
|
-
large:
|
|
37
|
+
small: "py-1.5 px-3 min-h-[36px]";
|
|
38
|
+
medium: "py-2.5 px-4 min-h-[44px]";
|
|
39
|
+
large: "py-3 px-5 min-h-[48px]";
|
|
40
40
|
};
|
|
41
41
|
disabled: {
|
|
42
|
-
true:
|
|
42
|
+
true: "opacity-70";
|
|
43
43
|
};
|
|
44
|
-
}, undefined, import("tailwind-variants").
|
|
44
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
45
45
|
variant: {
|
|
46
|
-
primary:
|
|
47
|
-
accent:
|
|
48
|
-
secondary:
|
|
49
|
-
outline:
|
|
50
|
-
outlineDanger:
|
|
51
|
-
outlineBlack:
|
|
52
|
-
flat:
|
|
53
|
-
link:
|
|
54
|
-
transparent:
|
|
46
|
+
primary: "bg-accent";
|
|
47
|
+
accent: "bg-transparent";
|
|
48
|
+
secondary: "bg-bg-muted border border-border-strong";
|
|
49
|
+
outline: "bg-transparent border border-primary";
|
|
50
|
+
outlineDanger: "bg-transparent border border-danger";
|
|
51
|
+
outlineBlack: "bg-transparent border border-border-strong";
|
|
52
|
+
flat: "bg-text-primary/10";
|
|
53
|
+
link: "bg-transparent min-h-0";
|
|
54
|
+
transparent: "bg-transparent border border-border-light";
|
|
55
55
|
};
|
|
56
56
|
size: {
|
|
57
|
-
small:
|
|
58
|
-
medium:
|
|
59
|
-
large:
|
|
57
|
+
small: "py-1.5 px-3 min-h-[36px]";
|
|
58
|
+
medium: "py-2.5 px-4 min-h-[44px]";
|
|
59
|
+
large: "py-3 px-5 min-h-[48px]";
|
|
60
60
|
};
|
|
61
61
|
disabled: {
|
|
62
|
-
true:
|
|
62
|
+
true: "opacity-70";
|
|
63
63
|
};
|
|
64
|
-
}, undefined
|
|
64
|
+
}, undefined>>;
|
|
65
65
|
declare const buttonIcon: import("tailwind-variants").TVReturnType<{
|
|
66
66
|
variant: {
|
|
67
|
-
primary:
|
|
68
|
-
accent:
|
|
69
|
-
secondary:
|
|
70
|
-
outline:
|
|
71
|
-
outlineDanger:
|
|
72
|
-
outlineBlack:
|
|
73
|
-
flat:
|
|
74
|
-
link:
|
|
75
|
-
transparent:
|
|
67
|
+
primary: "bg-accent";
|
|
68
|
+
accent: "bg-transparent";
|
|
69
|
+
secondary: "bg-bg-muted border border-border-strong";
|
|
70
|
+
outline: "bg-transparent border border-primary";
|
|
71
|
+
outlineDanger: "bg-transparent border border-danger";
|
|
72
|
+
outlineBlack: "bg-transparent border border-border-strong";
|
|
73
|
+
flat: "bg-text-primary/10";
|
|
74
|
+
link: "bg-transparent";
|
|
75
|
+
transparent: "bg-transparent border border-border-light";
|
|
76
76
|
};
|
|
77
77
|
size: {
|
|
78
|
-
small:
|
|
79
|
-
medium:
|
|
80
|
-
large:
|
|
78
|
+
small: "w-9 h-9";
|
|
79
|
+
medium: "w-11 h-11";
|
|
80
|
+
large: "w-[52px] h-[52px]";
|
|
81
81
|
};
|
|
82
82
|
disabled: {
|
|
83
|
-
true:
|
|
83
|
+
true: "opacity-70";
|
|
84
84
|
};
|
|
85
|
-
}, undefined, "rounded-
|
|
85
|
+
}, undefined, "rounded-md items-center justify-center aspect-square", {
|
|
86
86
|
variant: {
|
|
87
|
-
primary:
|
|
88
|
-
accent:
|
|
89
|
-
secondary:
|
|
90
|
-
outline:
|
|
91
|
-
outlineDanger:
|
|
92
|
-
outlineBlack:
|
|
93
|
-
flat:
|
|
94
|
-
link:
|
|
95
|
-
transparent:
|
|
87
|
+
primary: "bg-accent";
|
|
88
|
+
accent: "bg-transparent";
|
|
89
|
+
secondary: "bg-bg-muted border border-border-strong";
|
|
90
|
+
outline: "bg-transparent border border-primary";
|
|
91
|
+
outlineDanger: "bg-transparent border border-danger";
|
|
92
|
+
outlineBlack: "bg-transparent border border-border-strong";
|
|
93
|
+
flat: "bg-text-primary/10";
|
|
94
|
+
link: "bg-transparent";
|
|
95
|
+
transparent: "bg-transparent border border-border-light";
|
|
96
96
|
};
|
|
97
97
|
size: {
|
|
98
|
-
small:
|
|
99
|
-
medium:
|
|
100
|
-
large:
|
|
98
|
+
small: "w-9 h-9";
|
|
99
|
+
medium: "w-11 h-11";
|
|
100
|
+
large: "w-[52px] h-[52px]";
|
|
101
101
|
};
|
|
102
102
|
disabled: {
|
|
103
|
-
true:
|
|
103
|
+
true: "opacity-70";
|
|
104
104
|
};
|
|
105
|
-
}, undefined, import("tailwind-variants").
|
|
105
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
106
106
|
variant: {
|
|
107
|
-
primary:
|
|
108
|
-
accent:
|
|
109
|
-
secondary:
|
|
110
|
-
outline:
|
|
111
|
-
outlineDanger:
|
|
112
|
-
outlineBlack:
|
|
113
|
-
flat:
|
|
114
|
-
link:
|
|
115
|
-
transparent:
|
|
107
|
+
primary: "bg-accent";
|
|
108
|
+
accent: "bg-transparent";
|
|
109
|
+
secondary: "bg-bg-muted border border-border-strong";
|
|
110
|
+
outline: "bg-transparent border border-primary";
|
|
111
|
+
outlineDanger: "bg-transparent border border-danger";
|
|
112
|
+
outlineBlack: "bg-transparent border border-border-strong";
|
|
113
|
+
flat: "bg-text-primary/10";
|
|
114
|
+
link: "bg-transparent";
|
|
115
|
+
transparent: "bg-transparent border border-border-light";
|
|
116
116
|
};
|
|
117
117
|
size: {
|
|
118
|
-
small:
|
|
119
|
-
medium:
|
|
120
|
-
large:
|
|
118
|
+
small: "w-9 h-9";
|
|
119
|
+
medium: "w-11 h-11";
|
|
120
|
+
large: "w-[52px] h-[52px]";
|
|
121
121
|
};
|
|
122
122
|
disabled: {
|
|
123
|
-
true:
|
|
123
|
+
true: "opacity-70";
|
|
124
124
|
};
|
|
125
|
-
}, undefined
|
|
125
|
+
}, undefined>>;
|
|
126
126
|
export interface BaseButtonProps extends VariantProps<typeof button> {
|
|
127
127
|
title: string;
|
|
128
128
|
onPress?: () => void;
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import Icon from "../Display/Display.Icon";
|
|
3
|
-
import { theme } from "../theme";
|
|
4
|
-
import { tv } from "../theme/tw";
|
|
5
|
-
import { Typography } from "../Typography";
|
|
6
|
-
import { LinearGradient } from "expo-linear-gradient";
|
|
2
|
+
import Icon from "../Display/Display.Icon.js";
|
|
3
|
+
import { theme } from "../theme/index.js";
|
|
4
|
+
import { tv } from "../theme/tw.js";
|
|
5
|
+
import { Typography } from "../Typography/index.js";
|
|
7
6
|
import { ActivityIndicator, TouchableOpacity, View } from "react-native";
|
|
8
7
|
// ============================================================================
|
|
9
8
|
// STYLE VARIANTS
|
|
10
9
|
// ============================================================================
|
|
11
10
|
const button = tv({
|
|
12
|
-
base: "rounded-
|
|
11
|
+
base: "rounded-md items-center justify-center flex-row min-h-[44px]",
|
|
13
12
|
variants: {
|
|
14
13
|
variant: {
|
|
15
|
-
primary: "
|
|
16
|
-
accent: "
|
|
17
|
-
secondary: "bg-bg-
|
|
14
|
+
primary: "bg-accent",
|
|
15
|
+
accent: "bg-transparent",
|
|
16
|
+
secondary: "bg-bg-muted border border-border-strong",
|
|
18
17
|
outline: "bg-transparent border border-primary",
|
|
19
18
|
outlineDanger: "bg-transparent border border-danger",
|
|
20
19
|
outlineBlack: "bg-transparent border border-border-strong",
|
|
@@ -37,12 +36,12 @@ const button = tv({
|
|
|
37
36
|
},
|
|
38
37
|
});
|
|
39
38
|
const buttonIcon = tv({
|
|
40
|
-
base: "rounded-
|
|
39
|
+
base: "rounded-md items-center justify-center aspect-square",
|
|
41
40
|
variants: {
|
|
42
41
|
variant: {
|
|
43
|
-
primary: "
|
|
44
|
-
accent: "
|
|
45
|
-
secondary: "bg-bg-
|
|
42
|
+
primary: "bg-accent",
|
|
43
|
+
accent: "bg-transparent",
|
|
44
|
+
secondary: "bg-bg-muted border border-border-strong",
|
|
46
45
|
outline: "bg-transparent border border-primary",
|
|
47
46
|
outlineDanger: "bg-transparent border border-danger",
|
|
48
47
|
outlineBlack: "bg-transparent border border-border-strong",
|
|
@@ -67,15 +66,15 @@ const buttonIcon = tv({
|
|
|
67
66
|
const textColor = tv({
|
|
68
67
|
variants: {
|
|
69
68
|
variant: {
|
|
70
|
-
primary: "text-
|
|
71
|
-
accent: "text-
|
|
72
|
-
secondary: "text-primary",
|
|
73
|
-
outline: "text-
|
|
69
|
+
primary: "text-text-on-accent",
|
|
70
|
+
accent: "text-text-accent",
|
|
71
|
+
secondary: "text-text-primary",
|
|
72
|
+
outline: "text-text-accent",
|
|
74
73
|
outlineDanger: "text-danger",
|
|
75
74
|
outlineBlack: "text-text-primary",
|
|
76
75
|
flat: "text-text-primary",
|
|
77
|
-
link: "text-
|
|
78
|
-
transparent: "text-
|
|
76
|
+
link: "text-text-accent",
|
|
77
|
+
transparent: "text-text-inverse",
|
|
79
78
|
},
|
|
80
79
|
disabled: {
|
|
81
80
|
true: "opacity-50",
|
|
@@ -85,17 +84,17 @@ const textColor = tv({
|
|
|
85
84
|
{
|
|
86
85
|
variant: "primary",
|
|
87
86
|
disabled: true,
|
|
88
|
-
className: "text-
|
|
87
|
+
className: "text-text-on-accent",
|
|
89
88
|
},
|
|
90
89
|
{
|
|
91
90
|
variant: "accent",
|
|
92
91
|
disabled: true,
|
|
93
|
-
className: "text-
|
|
92
|
+
className: "text-text-accent",
|
|
94
93
|
},
|
|
95
94
|
{
|
|
96
95
|
variant: "transparent",
|
|
97
96
|
disabled: true,
|
|
98
|
-
className: "text-
|
|
97
|
+
className: "text-text-inverse/70",
|
|
99
98
|
},
|
|
100
99
|
{
|
|
101
100
|
variant: ["secondary", "outline", "link"],
|
|
@@ -128,14 +127,14 @@ const textColor = tv({
|
|
|
128
127
|
// ============================================================================
|
|
129
128
|
function getLoadingColorDynamic(variant) {
|
|
130
129
|
const map = {
|
|
131
|
-
primary: theme.text.
|
|
132
|
-
accent: theme.text.
|
|
133
|
-
secondary: theme.primary,
|
|
134
|
-
outline: theme.
|
|
130
|
+
primary: theme.text.onAccent,
|
|
131
|
+
accent: theme.text.accent,
|
|
132
|
+
secondary: theme.text.primary,
|
|
133
|
+
outline: theme.text.accent,
|
|
135
134
|
outlineDanger: theme.danger,
|
|
136
135
|
outlineBlack: theme.text.primary,
|
|
137
136
|
flat: theme.text.primary,
|
|
138
|
-
link: theme.
|
|
137
|
+
link: theme.text.accent,
|
|
139
138
|
transparent: theme.text.inverse,
|
|
140
139
|
};
|
|
141
140
|
return map[variant] ?? theme.text.inverse;
|
|
@@ -143,8 +142,8 @@ function getLoadingColorDynamic(variant) {
|
|
|
143
142
|
function getIconColorDynamic(variant, disabled) {
|
|
144
143
|
if (disabled) {
|
|
145
144
|
const disabledMap = {
|
|
146
|
-
primary: theme.
|
|
147
|
-
accent: theme.
|
|
145
|
+
primary: theme.text.onAccent + "70",
|
|
146
|
+
accent: theme.text.accent + "70",
|
|
148
147
|
secondary: theme.icon.disabled,
|
|
149
148
|
outline: theme.icon.disabled,
|
|
150
149
|
outlineDanger: theme.danger + "7f",
|
|
@@ -156,14 +155,14 @@ function getIconColorDynamic(variant, disabled) {
|
|
|
156
155
|
return disabledMap[variant] ?? theme.icon.disabled;
|
|
157
156
|
}
|
|
158
157
|
const enabledMap = {
|
|
159
|
-
primary: theme.
|
|
160
|
-
accent: theme.
|
|
161
|
-
secondary: theme.primary,
|
|
162
|
-
outline: theme.
|
|
158
|
+
primary: theme.text.onAccent,
|
|
159
|
+
accent: theme.text.accent,
|
|
160
|
+
secondary: theme.text.primary,
|
|
161
|
+
outline: theme.text.accent,
|
|
163
162
|
outlineDanger: theme.danger,
|
|
164
163
|
outlineBlack: theme.text.primary,
|
|
165
164
|
flat: theme.text.primary,
|
|
166
|
-
link: theme.
|
|
165
|
+
link: theme.text.accent,
|
|
167
166
|
transparent: theme.icon.inverse,
|
|
168
167
|
};
|
|
169
168
|
return enabledMap[variant] ?? theme.icon.inverse;
|
|
@@ -203,27 +202,12 @@ export const BaseButton = ({ title, onPress, variant = "primary", size = "medium
|
|
|
203
202
|
if (variant === "link") {
|
|
204
203
|
return (_jsx(TouchableOpacity, { activeOpacity: 0.7, className: className, disabled: disabled || loading, onPress: onPress, children: loading ? (_jsx(ActivityIndicator, { color: loadingColorValue, size: "small" })) : (_jsx(Typography.Text, { className: textColorClass, variant: textVariantValue, children: title })) }));
|
|
205
204
|
}
|
|
206
|
-
|
|
207
|
-
const gradientColors = variant === "primary" ? theme.gradient.primary : theme.gradient.accent;
|
|
208
|
-
const hasFlex = className?.includes("flex-1");
|
|
209
|
-
return (_jsx(View, { className: className, style: hasFlex ? { flex: 1 } : undefined, children: _jsx(LinearGradient, { colors: gradientColors, end: { x: 1, y: 1 }, start: { x: 0, y: 0 }, style: {
|
|
210
|
-
borderRadius: 8,
|
|
211
|
-
opacity: disabled ? 0.7 : 1,
|
|
212
|
-
}, children: _jsx(TouchableOpacity, { activeOpacity: 0.8, disabled: disabled || loading, onPress: onPress, children: _jsxs(View, { className: button({ size, disabled }), style: { backgroundColor: "transparent" }, children: [icon && !loading && _jsx(View, { className: "mr-2", children: icon }), loading ? (_jsx(ActivityIndicator, { color: loadingColorValue, size: "small" })) : (_jsx(Typography.Text, { className: textColorClass, variant: textVariantValue, children: title }))] }) }) }) }));
|
|
213
|
-
}
|
|
214
|
-
return (_jsxs(TouchableOpacity, { activeOpacity: 0.8, className: button({ variant, size, disabled, className }), disabled: disabled || loading, onPress: onPress, children: [icon && !loading && _jsx(View, { className: "mr-2", children: icon }), loading ? (_jsx(ActivityIndicator, { color: loadingColorValue, size: "small" })) : (_jsx(Typography.Text, { className: textColorClass, variant: textVariantValue, children: title }))] }));
|
|
205
|
+
return (_jsxs(TouchableOpacity, { activeOpacity: 0.8, className: button({ variant, size, disabled, className }), disabled: disabled || loading, onPress: onPress, children: [icon && !loading && _jsx(View, { className: "mr-2", children: icon }), loading ? (_jsx(ActivityIndicator, { color: loadingColorValue, size: "small" })) : (_jsx(Typography.Text, { className: textColorClass, semibold: variant === "primary", variant: textVariantValue, children: title }))] }));
|
|
215
206
|
};
|
|
216
207
|
export const BaseButtonIcon = ({ icon, onPress, variant = "primary", size = "medium", loading = false, disabled = false, className, }) => {
|
|
217
208
|
const iconColorValue = getIconColor(variant ?? "primary", disabled);
|
|
218
209
|
const loadingColorValue = getLoadingColor(variant ?? "primary");
|
|
219
210
|
const iconSizeValue = getIconSize(size ?? "medium");
|
|
220
|
-
if (variant === "primary" || variant === "accent") {
|
|
221
|
-
const gradientColors = variant === "primary" ? theme.gradient.primary : theme.gradient.accent;
|
|
222
|
-
return (_jsx(LinearGradient, { colors: gradientColors, end: { x: 1, y: 1 }, start: { x: 0, y: 0 }, style: {
|
|
223
|
-
borderRadius: 8,
|
|
224
|
-
opacity: disabled ? 0.7 : 1,
|
|
225
|
-
}, children: _jsx(TouchableOpacity, { activeOpacity: 0.8, disabled: disabled || loading, onPress: onPress, children: _jsx(View, { className: buttonIcon({ size, disabled }), style: { backgroundColor: "transparent" }, children: loading ? (_jsx(ActivityIndicator, { color: loadingColorValue, size: "small" })) : (_jsx(Icon, { color: iconColorValue, name: icon, size: iconSizeValue })) }) }) }));
|
|
226
|
-
}
|
|
227
211
|
return (_jsx(TouchableOpacity, { activeOpacity: 0.8, className: buttonIcon({ variant, size, disabled, className }), disabled: disabled || loading, onPress: onPress, children: loading ? (_jsx(ActivityIndicator, { color: loadingColorValue, size: "small" })) : (_jsx(Icon, { color: iconColorValue, name: icon, size: iconSizeValue })) }));
|
|
228
212
|
};
|
|
229
213
|
// ============================================================================
|
package/dist/primitives/Box.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import { cn } from "../theme/tw";
|
|
2
|
+
import { cn } from "../theme/tw.js";
|
|
3
3
|
import { View } from "react-native";
|
|
4
4
|
function Box({ className, style, ...props }) {
|
|
5
5
|
return _jsx(View, { className: cn(className), style: style, ...props });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import { cn } from "../theme/tw";
|
|
2
|
+
import { cn } from "../theme/tw.js";
|
|
3
3
|
import { TouchableOpacity, } from "react-native";
|
|
4
4
|
function Pressable({ className, disabled = false, hitSlop = 8, activeOpacity = 0.7, accessibilityRole = "button", style, children, ...rest }) {
|
|
5
5
|
const isDisabled = !!disabled;
|
package/dist/primitives/Row.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import { cn } from "../theme/tw";
|
|
2
|
+
import { cn } from "../theme/tw.js";
|
|
3
3
|
import { View } from "react-native";
|
|
4
4
|
function Row({ spacing = 2, align = "center", justify = "start", wrap = false, className, style, ...props }) {
|
|
5
5
|
const alignMap = {
|
package/dist/primitives/Stack.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import { cn } from "../theme/tw";
|
|
2
|
+
import { cn } from "../theme/tw.js";
|
|
3
3
|
import { View } from "react-native";
|
|
4
4
|
function Stack({ spacing = 4, align = "stretch", className, style, ...props }) {
|
|
5
5
|
const alignMap = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { AspectRatio, type AspectRatioProps, } from "
|
|
2
|
-
export { Box } from "
|
|
3
|
-
export { Pressable, type PressableProps } from "
|
|
4
|
-
export { Row } from "
|
|
5
|
-
export { Spacer, type SpacerProps } from "
|
|
6
|
-
export { Stack } from "
|
|
1
|
+
export { AspectRatio, type AspectRatioProps, } from "./AspectRatio.js";
|
|
2
|
+
export { Box } from "./Box.js";
|
|
3
|
+
export { Pressable, type PressableProps } from "./Pressable.js";
|
|
4
|
+
export { Row } from "./Row.js";
|
|
5
|
+
export { Spacer, type SpacerProps } from "./Spacer.js";
|
|
6
|
+
export { Stack } from "./Stack.js";
|
package/dist/primitives/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { AspectRatio, } from "
|
|
2
|
-
export { Box } from "
|
|
3
|
-
export { Pressable } from "
|
|
4
|
-
export { Row } from "
|
|
5
|
-
export { Spacer } from "
|
|
6
|
-
export { Stack } from "
|
|
1
|
+
export { AspectRatio, } from "./AspectRatio.js";
|
|
2
|
+
export { Box } from "./Box.js";
|
|
3
|
+
export { Pressable } from "./Pressable.js";
|
|
4
|
+
export { Row } from "./Row.js";
|
|
5
|
+
export { Spacer } from "./Spacer.js";
|
|
6
|
+
export { Stack } from "./Stack.js";
|
package/dist/theme/active.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ThemeTokens } from "
|
|
1
|
+
import type { ThemeTokens } from "./types.js";
|
|
2
2
|
export declare function setActiveTheme(tokens: ThemeTokens): void;
|
|
3
3
|
export declare function getActiveTheme(): ThemeTokens;
|
|
4
4
|
export declare function subscribeTheme(listener: () => void): () => void;
|
package/dist/theme/active.js
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
|
-
import { DEFAULT_THEME } from "
|
|
1
|
+
import { DEFAULT_THEME } from "./default.js";
|
|
2
|
+
import { validateTheme } from "./validate.js";
|
|
2
3
|
const activeTheme = { ...DEFAULT_THEME };
|
|
3
4
|
const listeners = new Set();
|
|
4
5
|
let version = 0;
|
|
6
|
+
// Detection helper: we don't want validation warnings to spam the console while running
|
|
7
|
+
// runtime tests under Node (they intentionally pass partial themes). The check is cheap
|
|
8
|
+
// and runs once at module load.
|
|
9
|
+
const isReactNative = typeof navigator !== "undefined" &&
|
|
10
|
+
navigator.product === "ReactNative";
|
|
5
11
|
export function setActiveTheme(tokens) {
|
|
12
|
+
if (__DEV__ && isReactNative) {
|
|
13
|
+
const issues = validateTheme(tokens);
|
|
14
|
+
if (issues.length > 0) {
|
|
15
|
+
const fmt = issues.map((i) => ` · ${i.path}: ${i.message}`).join("\n");
|
|
16
|
+
console.warn(`[@sincpro/mobile-ui] setActiveTheme received a theme with issues:\n${fmt}\nRendering will fall back to default styles for missing keys.`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
6
19
|
Object.assign(activeTheme, tokens);
|
|
7
20
|
version += 1;
|
|
8
21
|
listeners.forEach((listener) => listener());
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ThemeTokens } from "./types.js";
|
|
2
|
+
export type BrandThemeMode = "light" | "dark";
|
|
3
|
+
export type BuildThemeFromBrandOptions = {
|
|
4
|
+
/** Theme name (e.g. `acme-light`). */
|
|
5
|
+
name: string;
|
|
6
|
+
/** Brand seed fill (CTA / primary). */
|
|
7
|
+
brand: string;
|
|
8
|
+
mode: BrandThemeMode;
|
|
9
|
+
/**
|
|
10
|
+
* Brand-colored text on page/card. If omitted, derived by darkening (light)
|
|
11
|
+
* or lightening (dark) the seed until it is usable as text.
|
|
12
|
+
*/
|
|
13
|
+
brandText?: string;
|
|
14
|
+
/** Optional secondary seed; defaults to a shifted brand hue. */
|
|
15
|
+
secondary?: string;
|
|
16
|
+
/** Optional accent seed; defaults to brand. */
|
|
17
|
+
accent?: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Builds a complete `ThemeTokens` from a brand seed — Material-style derivation
|
|
21
|
+
* for mobile apps that rebrand without hand-authoring every token.
|
|
22
|
+
*
|
|
23
|
+
* Starts from `DEFAULT_THEME` / `DEFAULT_DARK_THEME` and overlays derived roles
|
|
24
|
+
* so consumers always get containers, state layers, and material chrome.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* setActiveTheme(buildThemeFromBrand({
|
|
28
|
+
* name: "acme-light",
|
|
29
|
+
* brand: "#0066FF",
|
|
30
|
+
* mode: "light",
|
|
31
|
+
* }));
|
|
32
|
+
*/
|
|
33
|
+
export declare function buildThemeFromBrand(opts: BuildThemeFromBrandOptions): ThemeTokens;
|