@sincpro/mobile-ui 0.7.2 → 1.1.0
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 +575 -230
- package/dist/Actions/Actions.Button.d.ts +98 -93
- package/dist/Actions/Actions.Button.js +58 -52
- package/dist/Actions/Actions.FAB.d.ts +3 -1
- package/dist/Actions/Actions.FAB.js +12 -8
- package/dist/Actions/Actions.FilterButton.d.ts +10 -2
- package/dist/Actions/Actions.FilterButton.js +23 -8
- package/dist/Actions/Actions.IconButton.d.ts +36 -33
- package/dist/Actions/Actions.IconButton.js +10 -6
- package/dist/Actions/index.d.ts +12 -12
- package/dist/Actions/index.js +6 -6
- 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.d.ts +2 -1
- package/dist/Dialog/Dialog.ActionSheet.js +19 -9
- package/dist/Dialog/Dialog.Confirmation.js +7 -7
- package/dist/Dialog/Dialog.EditValue.js +4 -4
- package/dist/Dialog/Dialog.NativeSheet.d.ts +10 -0
- package/dist/Dialog/Dialog.NativeSheet.js +21 -0
- package/dist/Dialog/Dialog.Sheet.d.ts +5 -1
- package/dist/Dialog/Dialog.Sheet.js +19 -11
- 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.d.ts +9 -2
- package/dist/Display/Display.CopyableText.js +76 -8
- 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 +2 -1
- package/dist/Display/Display.IconBadge.js +3 -3
- package/dist/Display/Display.Image.js +4 -4
- package/dist/Display/Display.KeyValue.d.ts +11 -4
- package/dist/Display/Display.KeyValue.js +8 -6
- package/dist/Display/Display.ListGroup.d.ts +23 -0
- package/dist/Display/Display.ListGroup.js +17 -0
- package/dist/Display/Display.ListItem.d.ts +16 -2
- package/dist/Display/Display.ListItem.js +29 -12
- 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.d.ts +11 -1
- package/dist/Display/Display.SectionHeader.js +14 -5
- 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.d.ts +3 -1
- package/dist/Display/Display.SwipeableRow.js +7 -7
- 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 +49 -45
- package/dist/Display/index.js +44 -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 +6 -6
- package/dist/Feedback/Feedback.DomainSplashScreen.js +5 -4
- package/dist/Feedback/Feedback.Empty.js +3 -3
- package/dist/Feedback/Feedback.EmptyState.d.ts +2 -1
- package/dist/Feedback/Feedback.EmptyState.js +7 -7
- package/dist/Feedback/Feedback.Error.d.ts +3 -1
- package/dist/Feedback/Feedback.Error.js +7 -6
- 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.d.ts +4 -1
- package/dist/Form/Form.Checkbox.js +5 -5
- 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.d.ts +2 -1
- package/dist/Form/Form.DatePicker.js +8 -7
- 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.d.ts +5 -3
- package/dist/Form/Form.Input.js +5 -5
- package/dist/Form/Form.InputField.d.ts +1 -1
- package/dist/Form/Form.InputField.js +3 -3
- package/dist/Form/Form.KeyboardForm.d.ts +11 -0
- package/dist/Form/Form.KeyboardForm.js +9 -0
- package/dist/Form/Form.KeyboardToolbar.d.ts +21 -0
- package/dist/Form/Form.KeyboardToolbar.js +70 -0
- 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.d.ts +3 -1
- package/dist/Form/Form.Select.js +27 -14
- 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 +33 -27
- package/dist/Form/index.js +29 -25
- package/dist/Navigation/Navigation.AppBar.d.ts +11 -6
- package/dist/Navigation/Navigation.AppBar.js +16 -16
- package/dist/Navigation/Navigation.BottomNav.d.ts +4 -2
- package/dist/Navigation/Navigation.BottomNav.js +34 -21
- 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 +2 -2
- package/dist/Navigation/Navigation.RowItem.js +4 -4
- package/dist/Navigation/Navigation.SearchBar.d.ts +6 -1
- package/dist/Navigation/Navigation.SearchBar.js +33 -12
- package/dist/Navigation/Navigation.SearchSuggestions.d.ts +14 -0
- package/dist/Navigation/Navigation.SearchSuggestions.js +7 -0
- package/dist/Navigation/Navigation.SegmentedControl.d.ts +3 -1
- package/dist/Navigation/Navigation.SegmentedControl.js +6 -5
- 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 +23 -19
- package/dist/Navigation/index.js +17 -15
- package/dist/Typography/Typography.Heading.d.ts +1 -1
- package/dist/Typography/Typography.Heading.js +2 -2
- package/dist/Typography/Typography.SelectableText.d.ts +10 -0
- package/dist/Typography/Typography.SelectableText.js +16 -0
- package/dist/Typography/Typography.Text.d.ts +2 -2
- package/dist/Typography/Typography.Text.js +5 -19
- package/dist/Typography/index.d.ts +5 -2
- package/dist/Typography/index.js +5 -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 +9 -3
- package/dist/layouts/AuthContainer.js +8 -8
- 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 +92 -87
- package/dist/primitives/BaseButton.js +52 -54
- 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 +19 -4
- package/dist/theme/typography.js +45 -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/utils/criteria.d.ts +56 -0
- package/dist/utils/criteria.js +99 -0
- package/dist/utils/reorder.d.ts +4 -0
- package/dist/utils/reorder.js +32 -0
- package/dist/views/AppSplashView.d.ts +2 -2
- package/dist/views/AppSplashView.js +3 -3
- package/dist/views/AuthFormView.d.ts +5 -2
- package/dist/views/AuthFormView.js +5 -5
- package/dist/views/FormViewV2.d.ts +9 -4
- package/dist/views/FormViewV2.js +44 -25
- package/dist/views/ListViewV2.d.ts +12 -9
- package/dist/views/ListViewV2.js +49 -36
- 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/CollectionOptions.d.ts +15 -0
- package/dist/widgets/CollectionOptions.js +127 -0
- package/dist/widgets/FilterBar.d.ts +21 -0
- package/dist/widgets/FilterBar.js +14 -0
- package/dist/widgets/FilterBuilder.d.ts +10 -0
- package/dist/widgets/FilterBuilder.js +115 -0
- 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/QueryChoice.d.ts +10 -0
- package/dist/widgets/QueryChoice.js +13 -0
- package/dist/widgets/QuickActions.js +3 -3
- package/dist/widgets/ReorderableList.d.ts +51 -0
- package/dist/widgets/ReorderableList.js +138 -0
- 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 +20 -16
- package/dist/widgets/index.js +13 -10
- package/package.json +70 -50
- package/tailwind.preset.js +19 -0
- package/dist/icons/icon_getters.d.ts +0 -6
- package/dist/icons/icon_getters.js +0 -23
package/dist/theme/default.js
CHANGED
|
@@ -1,64 +1,108 @@
|
|
|
1
|
+
import { containerPair } from "./color.js";
|
|
2
|
+
import { resolveOnColor } from "./contrast.js";
|
|
3
|
+
/** Web UI light palette. Gold is a fill, never a border or a label. */
|
|
4
|
+
const PRIMARY = "#2A4A85";
|
|
5
|
+
const SECONDARY = "#1C3765";
|
|
6
|
+
const ACCENT = "#C89B3C";
|
|
7
|
+
const SUCCESS = "#2F6B3C";
|
|
8
|
+
const WARNING = "#7E5E12";
|
|
9
|
+
const DANGER = "#9B3B30";
|
|
10
|
+
const INFO = "#0F5C6E";
|
|
11
|
+
const INK = "#1A1714";
|
|
12
|
+
const MUTED = "#6B6459";
|
|
13
|
+
const primaryC = containerPair(PRIMARY, "light");
|
|
14
|
+
const secondaryC = containerPair(SECONDARY, "light");
|
|
15
|
+
const accentC = containerPair(ACCENT, "light");
|
|
16
|
+
const successC = containerPair(SUCCESS, "light");
|
|
17
|
+
const warningC = containerPair(WARNING, "light");
|
|
18
|
+
const dangerC = containerPair(DANGER, "light");
|
|
19
|
+
const infoC = containerPair(INFO, "light");
|
|
20
|
+
/**
|
|
21
|
+
* Default light theme. Sample values — not the framework identity.
|
|
22
|
+
* Prefer `buildThemeFromBrand` or `extendTheme` at app boot.
|
|
23
|
+
*/
|
|
1
24
|
export const DEFAULT_THEME = {
|
|
2
|
-
name: "default",
|
|
3
|
-
primary:
|
|
4
|
-
secondary:
|
|
5
|
-
accent:
|
|
25
|
+
name: "default-light",
|
|
26
|
+
primary: PRIMARY,
|
|
27
|
+
secondary: SECONDARY,
|
|
28
|
+
accent: ACCENT,
|
|
6
29
|
bg: {
|
|
7
|
-
page: "#
|
|
30
|
+
page: "#FAF9F7",
|
|
8
31
|
card: "#FFFFFF",
|
|
9
32
|
popover: "#FFFFFF",
|
|
10
|
-
muted: "#
|
|
11
|
-
accent:
|
|
12
|
-
hover: "#
|
|
13
|
-
disabled: "#
|
|
14
|
-
inverse: "#
|
|
33
|
+
muted: "#F3F0EA",
|
|
34
|
+
accent: primaryC.container,
|
|
35
|
+
hover: "#EBE6DE",
|
|
36
|
+
disabled: "#E4DFD7",
|
|
37
|
+
inverse: "#181614",
|
|
38
|
+
containerLowest: "#FAF9F7",
|
|
39
|
+
container: "#F3F0EA",
|
|
40
|
+
containerHigh: "#E4DFD7",
|
|
15
41
|
},
|
|
16
42
|
text: {
|
|
17
|
-
primary:
|
|
18
|
-
secondary:
|
|
19
|
-
tertiary: "#
|
|
20
|
-
muted:
|
|
21
|
-
accent:
|
|
43
|
+
primary: INK,
|
|
44
|
+
secondary: MUTED,
|
|
45
|
+
tertiary: "#A39B90",
|
|
46
|
+
muted: MUTED,
|
|
47
|
+
accent: PRIMARY,
|
|
22
48
|
inverse: "#FFFFFF",
|
|
23
|
-
disabled: "#
|
|
49
|
+
disabled: "#A39B90",
|
|
24
50
|
onPrimary: "#FFFFFF",
|
|
25
51
|
onSecondary: "#FFFFFF",
|
|
26
|
-
onAccent: "#
|
|
27
|
-
onDanger:
|
|
28
|
-
onSuccess:
|
|
52
|
+
onAccent: "#1A1714",
|
|
53
|
+
onDanger: resolveOnColor(DANGER),
|
|
54
|
+
onSuccess: resolveOnColor(SUCCESS),
|
|
29
55
|
},
|
|
30
56
|
icon: {
|
|
31
|
-
primary:
|
|
32
|
-
secondary:
|
|
33
|
-
tertiary: "#
|
|
57
|
+
primary: INK,
|
|
58
|
+
secondary: MUTED,
|
|
59
|
+
tertiary: "#A39B90",
|
|
34
60
|
inverse: "#FFFFFF",
|
|
35
|
-
disabled: "#
|
|
61
|
+
disabled: "#A39B90",
|
|
36
62
|
},
|
|
37
63
|
border: {
|
|
38
|
-
default: "#
|
|
39
|
-
light: "#
|
|
40
|
-
strong: "#
|
|
41
|
-
focus:
|
|
64
|
+
default: "#E4DFD7",
|
|
65
|
+
light: "#F3F0EA",
|
|
66
|
+
strong: "#D5CEC2",
|
|
67
|
+
focus: PRIMARY,
|
|
42
68
|
},
|
|
43
|
-
success:
|
|
44
|
-
warning:
|
|
45
|
-
danger:
|
|
46
|
-
info:
|
|
47
|
-
successLight:
|
|
48
|
-
warningLight:
|
|
49
|
-
dangerLight:
|
|
50
|
-
infoLight:
|
|
51
|
-
|
|
52
|
-
|
|
69
|
+
success: SUCCESS,
|
|
70
|
+
warning: WARNING,
|
|
71
|
+
danger: DANGER,
|
|
72
|
+
info: INFO,
|
|
73
|
+
successLight: successC.container,
|
|
74
|
+
warningLight: warningC.container,
|
|
75
|
+
dangerLight: dangerC.container,
|
|
76
|
+
infoLight: infoC.container,
|
|
77
|
+
container: {
|
|
78
|
+
primary: primaryC.container,
|
|
79
|
+
onPrimary: primaryC.onContainer,
|
|
80
|
+
secondary: secondaryC.container,
|
|
81
|
+
onSecondary: secondaryC.onContainer,
|
|
82
|
+
accent: accentC.container,
|
|
83
|
+
onAccent: accentC.onContainer,
|
|
84
|
+
success: successC.container,
|
|
85
|
+
onSuccess: successC.onContainer,
|
|
86
|
+
warning: warningC.container,
|
|
87
|
+
onWarning: warningC.onContainer,
|
|
88
|
+
danger: dangerC.container,
|
|
89
|
+
onDanger: dangerC.onContainer,
|
|
90
|
+
info: infoC.container,
|
|
91
|
+
onInfo: infoC.onContainer,
|
|
92
|
+
},
|
|
93
|
+
state: { hover: 0.08, press: 0.12, focus: 0.12, drag: 0.16 },
|
|
94
|
+
material: { blur: 24, opacity: 0.78, borderOpacity: 0.18 },
|
|
95
|
+
ring: PRIMARY,
|
|
96
|
+
input: "#E4DFD7",
|
|
53
97
|
gradient: {
|
|
54
|
-
primary: [
|
|
55
|
-
accent: ["#
|
|
98
|
+
primary: [SECONDARY, PRIMARY],
|
|
99
|
+
accent: ["#B88A2E", ACCENT],
|
|
56
100
|
},
|
|
57
101
|
shadow: {
|
|
58
102
|
sm: {
|
|
59
103
|
shadowColor: "#000000",
|
|
60
104
|
shadowOffset: { width: 0, height: 1 },
|
|
61
|
-
shadowOpacity: 0.
|
|
105
|
+
shadowOpacity: 0.06,
|
|
62
106
|
shadowRadius: 2,
|
|
63
107
|
elevation: 1,
|
|
64
108
|
},
|
|
@@ -72,9 +116,13 @@ export const DEFAULT_THEME = {
|
|
|
72
116
|
lg: {
|
|
73
117
|
shadowColor: "#000000",
|
|
74
118
|
shadowOffset: { width: 0, height: 10 },
|
|
75
|
-
shadowOpacity: 0.
|
|
119
|
+
shadowOpacity: 0.14,
|
|
76
120
|
shadowRadius: 15,
|
|
77
121
|
elevation: 5,
|
|
78
122
|
},
|
|
79
123
|
},
|
|
124
|
+
pattern: {
|
|
125
|
+
mode: "light-pattern",
|
|
126
|
+
size: 56,
|
|
127
|
+
},
|
|
80
128
|
};
|
package/dist/theme/define.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import type { ThemeTokens } from "
|
|
1
|
+
import type { ThemeTokens } from "./types.js";
|
|
2
2
|
export type DeepPartial<T> = {
|
|
3
3
|
[K in keyof T]?: T[K] extends readonly unknown[] ? T[K] : T[K] extends object ? DeepPartial<T[K]> : T[K];
|
|
4
4
|
};
|
|
5
5
|
/**
|
|
6
6
|
* Defines a complete, typed theme (powerful API: the framework parametrizes
|
|
7
7
|
* every token explicitly).
|
|
8
|
+
*
|
|
9
|
+
* Tip for brand palettes: set on-colors with `resolveOnColor` from
|
|
10
|
+
* `@sincpro/mobile-ui/theme` so light and dark brand fills both stay WCAG AA.
|
|
8
11
|
*/
|
|
9
12
|
export declare function defineTheme(tokens: ThemeTokens): ThemeTokens;
|
|
10
13
|
/**
|
package/dist/theme/define.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_THEME } from "
|
|
1
|
+
import { DEFAULT_THEME } from "./default.js";
|
|
2
2
|
function isPlainObject(v) {
|
|
3
3
|
return typeof v === "object" && v !== null && !Array.isArray(v);
|
|
4
4
|
}
|
|
@@ -15,6 +15,9 @@ function deepMerge(base, override) {
|
|
|
15
15
|
/**
|
|
16
16
|
* Defines a complete, typed theme (powerful API: the framework parametrizes
|
|
17
17
|
* every token explicitly).
|
|
18
|
+
*
|
|
19
|
+
* Tip for brand palettes: set on-colors with `resolveOnColor` from
|
|
20
|
+
* `@sincpro/mobile-ui/theme` so light and dark brand fills both stay WCAG AA.
|
|
18
21
|
*/
|
|
19
22
|
export function defineTheme(tokens) {
|
|
20
23
|
return tokens;
|
package/dist/theme/globals.css
CHANGED
|
@@ -1,67 +1,82 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AUTO-GENERATED from apk/domains/index.ts
|
|
3
|
-
* Active Domain: distribution
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
1
|
@tailwind base;
|
|
7
2
|
@tailwind components;
|
|
8
3
|
@tailwind utilities;
|
|
9
4
|
|
|
10
5
|
:root {
|
|
11
|
-
/*
|
|
12
|
-
--primary:
|
|
13
|
-
--secondary:
|
|
14
|
-
--accent:
|
|
6
|
+
/* Fallback CSS vars — runtime source of truth is themeToVars(activeTheme). */
|
|
7
|
+
--primary: 42 74 133;
|
|
8
|
+
--secondary: 28 55 101;
|
|
9
|
+
--accent: 200 155 60;
|
|
15
10
|
|
|
16
|
-
|
|
17
|
-
--bg-page: 249 250 251;
|
|
11
|
+
--bg-page: 250 249 247;
|
|
18
12
|
--bg-card: 255 255 255;
|
|
19
13
|
--bg-popover: 255 255 255;
|
|
20
|
-
--bg-muted: 243
|
|
21
|
-
--bg-accent:
|
|
22
|
-
--bg-hover:
|
|
23
|
-
--bg-disabled:
|
|
14
|
+
--bg-muted: 243 240 234;
|
|
15
|
+
--bg-accent: 232 236 245;
|
|
16
|
+
--bg-hover: 235 230 222;
|
|
17
|
+
--bg-disabled: 228 223 215;
|
|
18
|
+
--bg-container-lowest: 250 249 247;
|
|
19
|
+
--bg-container: 243 240 234;
|
|
20
|
+
--bg-container-high: 228 223 215;
|
|
24
21
|
|
|
25
|
-
|
|
26
|
-
--text-
|
|
27
|
-
--text-
|
|
28
|
-
--text-
|
|
29
|
-
--text-
|
|
30
|
-
--text-accent: 30 64 175;
|
|
22
|
+
--text-primary: 26 23 20;
|
|
23
|
+
--text-secondary: 107 100 89;
|
|
24
|
+
--text-tertiary: 163 155 144;
|
|
25
|
+
--text-muted: 107 100 89;
|
|
26
|
+
--text-accent: 42 74 133;
|
|
31
27
|
--text-inverse: 255 255 255;
|
|
32
|
-
--text-disabled:
|
|
28
|
+
--text-disabled: 163 155 144;
|
|
33
29
|
--text-on-primary: 255 255 255;
|
|
34
30
|
--text-on-secondary: 255 255 255;
|
|
35
|
-
--text-on-accent:
|
|
31
|
+
--text-on-accent: 26 23 20;
|
|
36
32
|
--text-on-danger: 255 255 255;
|
|
37
33
|
--text-on-success: 255 255 255;
|
|
38
34
|
|
|
39
|
-
|
|
40
|
-
--icon-
|
|
41
|
-
--icon-
|
|
42
|
-
--icon-tertiary: 156 163 175;
|
|
35
|
+
--icon-primary: 26 23 20;
|
|
36
|
+
--icon-secondary: 107 100 89;
|
|
37
|
+
--icon-tertiary: 163 155 144;
|
|
43
38
|
--icon-inverse: 255 255 255;
|
|
44
|
-
--icon-disabled:
|
|
39
|
+
--icon-disabled: 163 155 144;
|
|
40
|
+
|
|
41
|
+
--border-default: 228 223 215;
|
|
42
|
+
--border-light: 243 240 234;
|
|
43
|
+
--border-strong: 213 206 194;
|
|
44
|
+
--border-focus: 42 74 133;
|
|
45
|
+
|
|
46
|
+
--ring: 42 74 133;
|
|
47
|
+
--input: 228 223 215;
|
|
48
|
+
|
|
49
|
+
--success: 47 107 60;
|
|
50
|
+
--warning: 126 94 18;
|
|
51
|
+
--danger: 155 59 48;
|
|
52
|
+
--info: 15 92 110;
|
|
45
53
|
|
|
46
|
-
|
|
47
|
-
--
|
|
48
|
-
--
|
|
49
|
-
--
|
|
50
|
-
--border-focus: 37 99 235;
|
|
54
|
+
--success-light: 232 240 234;
|
|
55
|
+
--warning-light: 245 236 214;
|
|
56
|
+
--danger-light: 246 232 229;
|
|
57
|
+
--info-light: 226 238 241;
|
|
51
58
|
|
|
52
|
-
|
|
53
|
-
--
|
|
54
|
-
--
|
|
59
|
+
--container-primary: 232 236 245;
|
|
60
|
+
--container-on-primary: 28 55 101;
|
|
61
|
+
--container-secondary: 226 232 242;
|
|
62
|
+
--container-on-secondary: 26 23 20;
|
|
63
|
+
--container-accent: 248 240 220;
|
|
64
|
+
--container-on-accent: 26 23 20;
|
|
65
|
+
--container-success: 232 240 234;
|
|
66
|
+
--container-on-success: 47 107 60;
|
|
67
|
+
--container-warning: 245 236 214;
|
|
68
|
+
--container-on-warning: 126 94 18;
|
|
69
|
+
--container-danger: 246 232 229;
|
|
70
|
+
--container-on-danger: 155 59 48;
|
|
71
|
+
--container-info: 226 238 241;
|
|
72
|
+
--container-on-info: 15 92 110;
|
|
55
73
|
|
|
56
|
-
|
|
57
|
-
--
|
|
58
|
-
--
|
|
59
|
-
--
|
|
60
|
-
--info: 37 99 235;
|
|
74
|
+
--state-hover: 0.08;
|
|
75
|
+
--state-press: 0.12;
|
|
76
|
+
--state-focus: 0.12;
|
|
77
|
+
--state-drag: 0.16;
|
|
61
78
|
|
|
62
|
-
|
|
63
|
-
--
|
|
64
|
-
--
|
|
65
|
-
--danger-light: 254 226 226;
|
|
66
|
-
--info-light: 219 234 254;
|
|
79
|
+
--material-blur: 24;
|
|
80
|
+
--material-opacity: 0.78;
|
|
81
|
+
--material-border-opacity: 0.18;
|
|
67
82
|
}
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
export { getActiveTheme, setActiveTheme, subscribeTheme, } from "
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
1
|
+
export { getActiveTheme, setActiveTheme, subscribeTheme, } from "./active.js";
|
|
2
|
+
export { type BrandThemeMode, buildThemeFromBrand, type BuildThemeFromBrandOptions, } from "./build.js";
|
|
3
|
+
export { containerPair, hexToHsl, hexToRgb, type Hsl, hslToHex, mixHex, rgbToHex, shiftLightness, } from "./color.js";
|
|
4
|
+
export { ThemedActivityIndicator } from "./components/index.js";
|
|
5
|
+
export { contrastRatio, relativeLuminance, resolveOnColor, type ResolveOnColorOptions, } from "./contrast.js";
|
|
6
|
+
export { themeToVars } from "./css-vars.js";
|
|
7
|
+
export { DEFAULT_DARK_THEME } from "./dark.js";
|
|
8
|
+
export { DEFAULT_THEME } from "./default.js";
|
|
9
|
+
export { type DeepPartial, defineTheme, extendTheme, mergeTheme, } from "./define.js";
|
|
10
|
+
export { theme } from "./theme.js";
|
|
11
|
+
export type { PatternMode, ShadowStyle, ThemeTokens } from "./types.js";
|
|
12
|
+
export { configureFonts, fontFamilies, type FontRole, resetFonts, useAppFonts, variantFontRole, } from "./typography.js";
|
|
13
|
+
export { useTheme } from "./useTheme.js";
|
|
14
|
+
export { validateTheme } from "./validate.js";
|
package/dist/theme/index.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
export { getActiveTheme, setActiveTheme, subscribeTheme, } from "
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
1
|
+
export { getActiveTheme, setActiveTheme, subscribeTheme, } from "./active.js";
|
|
2
|
+
export { buildThemeFromBrand, } from "./build.js";
|
|
3
|
+
export { containerPair, hexToHsl, hexToRgb, hslToHex, mixHex, rgbToHex, shiftLightness, } from "./color.js";
|
|
4
|
+
export { ThemedActivityIndicator } from "./components/index.js";
|
|
5
|
+
export { contrastRatio, relativeLuminance, resolveOnColor, } from "./contrast.js";
|
|
6
|
+
export { themeToVars } from "./css-vars.js";
|
|
7
|
+
export { DEFAULT_DARK_THEME } from "./dark.js";
|
|
8
|
+
export { DEFAULT_THEME } from "./default.js";
|
|
9
|
+
export { defineTheme, extendTheme, mergeTheme, } from "./define.js";
|
|
10
|
+
export { theme } from "./theme.js";
|
|
11
|
+
export { configureFonts, fontFamilies, resetFonts, useAppFonts, variantFontRole, } from "./typography.js";
|
|
12
|
+
export { useTheme } from "./useTheme.js";
|
|
13
|
+
export { validateTheme } from "./validate.js";
|
package/dist/theme/theme.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* SOLO usar cuando className no es suficiente (RefreshControl, placeholderColor, etc.)
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
|
-
* import { theme } from "
|
|
10
|
+
* import { theme } from "./index.js";
|
|
11
11
|
* const color = theme.primary;
|
|
12
12
|
*/
|
|
13
13
|
export declare const theme: import("./types").ThemeTokens;
|
package/dist/theme/theme.js
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* SOLO usar cuando className no es suficiente (RefreshControl, placeholderColor, etc.)
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
|
-
* import { theme } from "
|
|
10
|
+
* import { theme } from "./index.js";
|
|
11
11
|
* const color = theme.primary;
|
|
12
12
|
*/
|
|
13
|
-
import { getActiveTheme } from "
|
|
13
|
+
import { getActiveTheme } from "./active.js";
|
|
14
14
|
export const theme = getActiveTheme();
|
package/dist/theme/types.d.ts
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ============================================================================
|
|
3
|
-
* THEME SYSTEM
|
|
3
|
+
* THEME SYSTEM — semantic + container (M3-era) tokens
|
|
4
4
|
* ============================================================================
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* Layers (framework contract, mid-2026):
|
|
7
|
+
* 1. Semantic fills — `primary` / `accent` / `secondary` / state hues (chrome, CTAs).
|
|
8
|
+
* 2. Containers — soft tonal surfaces + `on*` ink (badges, chips, tonal buttons).
|
|
9
|
+
* 3. Surfaces — `bg.*` including tonal `containerLowest|container|containerHigh`.
|
|
10
|
+
* 4. State layers — opacity overlays for press/hover/focus (Material state layers).
|
|
11
|
+
* 5. Material — nav-chrome hints for Liquid Glass / blur peers (optional usage).
|
|
12
|
+
*
|
|
13
|
+
* Color roles:
|
|
14
|
+
* - Fills/borders/tracks → `primary` / `accent` (never body text).
|
|
15
|
+
* - Brand text/links → `text.accent` (AA on `bg.page` / `bg.card`).
|
|
16
|
+
* - Ink on filled brand → `text.onPrimary` via `resolveOnColor`.
|
|
17
|
+
* - Ink on soft containers → `container.onPrimary` / `container.onSuccess` / …
|
|
8
18
|
*/
|
|
19
|
+
import type { ImageSourcePropType } from "react-native";
|
|
9
20
|
export interface ShadowStyle {
|
|
10
21
|
shadowColor: string;
|
|
11
22
|
shadowOffset: {
|
|
@@ -17,15 +28,13 @@ export interface ShadowStyle {
|
|
|
17
28
|
elevation: number;
|
|
18
29
|
}
|
|
19
30
|
export interface ThemeTokens {
|
|
20
|
-
/** Theme name */
|
|
21
31
|
name: string;
|
|
22
|
-
/** Primary
|
|
32
|
+
/** Primary fill — CTA surfaces, active tracks, decorative borders. Not for body text. */
|
|
23
33
|
primary: string;
|
|
24
|
-
/** Secondary
|
|
34
|
+
/** Secondary fill — low-profile surfaces and secondary actions. */
|
|
25
35
|
secondary: string;
|
|
26
|
-
/** Accent
|
|
36
|
+
/** Accent fill — highlights, secondary CTAs, decorative chrome. Not for body text. */
|
|
27
37
|
accent: string;
|
|
28
|
-
/** Backgrounds */
|
|
29
38
|
bg: {
|
|
30
39
|
page: string;
|
|
31
40
|
card: string;
|
|
@@ -34,9 +43,16 @@ export interface ThemeTokens {
|
|
|
34
43
|
accent: string;
|
|
35
44
|
hover: string;
|
|
36
45
|
disabled: string;
|
|
46
|
+
/** Opposite / hero surface (AppBar tone="dark"). Light themes: dark; dark themes: light. */
|
|
37
47
|
inverse?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Tonal elevation ladder (M3 surfaceContainer*). Prefer these over stacking
|
|
50
|
+
* shadows for hierarchy on mobile.
|
|
51
|
+
*/
|
|
52
|
+
containerLowest: string;
|
|
53
|
+
container: string;
|
|
54
|
+
containerHigh: string;
|
|
38
55
|
};
|
|
39
|
-
/** Text */
|
|
40
56
|
text: {
|
|
41
57
|
primary: string;
|
|
42
58
|
secondary: string;
|
|
@@ -51,7 +67,6 @@ export interface ThemeTokens {
|
|
|
51
67
|
onDanger: string;
|
|
52
68
|
onSuccess: string;
|
|
53
69
|
};
|
|
54
|
-
/** Icons */
|
|
55
70
|
icon: {
|
|
56
71
|
primary: string;
|
|
57
72
|
secondary: string;
|
|
@@ -59,35 +74,81 @@ export interface ThemeTokens {
|
|
|
59
74
|
inverse: string;
|
|
60
75
|
disabled: string;
|
|
61
76
|
};
|
|
62
|
-
/** Borders */
|
|
63
77
|
border: {
|
|
64
78
|
default: string;
|
|
65
79
|
light: string;
|
|
66
80
|
strong: string;
|
|
67
81
|
focus: string;
|
|
68
82
|
};
|
|
69
|
-
/** Semantic states */
|
|
70
83
|
success: string;
|
|
71
84
|
warning: string;
|
|
72
85
|
danger: string;
|
|
73
86
|
info: string;
|
|
74
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* @deprecated Prefer `container.success`. Kept for NativeWind `bg-success-light`
|
|
89
|
+
* back-compat; defaults stay in sync with container fills.
|
|
90
|
+
*/
|
|
75
91
|
successLight: string;
|
|
92
|
+
/** @deprecated Prefer `container.warning`. */
|
|
76
93
|
warningLight: string;
|
|
94
|
+
/** @deprecated Prefer `container.danger`. */
|
|
77
95
|
dangerLight: string;
|
|
96
|
+
/** @deprecated Prefer `container.info`. */
|
|
78
97
|
infoLight: string;
|
|
79
|
-
/**
|
|
98
|
+
/**
|
|
99
|
+
* Soft tonal fills + on-colors — badges, chips, tonal CTAs, selected rows.
|
|
100
|
+
* Prefer these over saturated `success` + white for body-sized labels.
|
|
101
|
+
*/
|
|
102
|
+
container: {
|
|
103
|
+
primary: string;
|
|
104
|
+
onPrimary: string;
|
|
105
|
+
secondary: string;
|
|
106
|
+
onSecondary: string;
|
|
107
|
+
accent: string;
|
|
108
|
+
onAccent: string;
|
|
109
|
+
success: string;
|
|
110
|
+
onSuccess: string;
|
|
111
|
+
warning: string;
|
|
112
|
+
onWarning: string;
|
|
113
|
+
danger: string;
|
|
114
|
+
onDanger: string;
|
|
115
|
+
info: string;
|
|
116
|
+
onInfo: string;
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* State-layer opacities (Material 3). Overlay brand/on-surface at this alpha
|
|
120
|
+
* for press/hover/focus — do not invent per-component opacities.
|
|
121
|
+
*/
|
|
122
|
+
state: {
|
|
123
|
+
hover: number;
|
|
124
|
+
press: number;
|
|
125
|
+
focus: number;
|
|
126
|
+
drag: number;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Nav-chrome material hints (iOS Liquid Glass / frosted bars). Opt-in peers
|
|
130
|
+
* (`expo-glass-effect`) read these; content layers stay solid `bg.*`.
|
|
131
|
+
*/
|
|
132
|
+
material: {
|
|
133
|
+
blur: number;
|
|
134
|
+
opacity: number;
|
|
135
|
+
borderOpacity: number;
|
|
136
|
+
};
|
|
80
137
|
ring: string;
|
|
81
138
|
input: string;
|
|
82
|
-
/** Gradients (for LinearGradient) */
|
|
83
139
|
gradient: {
|
|
84
140
|
primary: readonly [string, string];
|
|
85
141
|
accent: readonly [string, string];
|
|
86
142
|
};
|
|
87
|
-
/** Shadows (React Native) */
|
|
88
143
|
shadow: {
|
|
89
144
|
sm: ShadowStyle;
|
|
90
145
|
md: ShadowStyle;
|
|
91
146
|
lg: ShadowStyle;
|
|
92
147
|
};
|
|
148
|
+
pattern?: {
|
|
149
|
+
mode: PatternMode;
|
|
150
|
+
size: number;
|
|
151
|
+
source?: ImageSourcePropType;
|
|
152
|
+
};
|
|
93
153
|
}
|
|
154
|
+
export type PatternMode = "light-pattern" | "dark-pattern" | "dark-full";
|
package/dist/theme/types.js
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ============================================================================
|
|
3
|
-
* THEME SYSTEM
|
|
3
|
+
* THEME SYSTEM — semantic + container (M3-era) tokens
|
|
4
4
|
* ============================================================================
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* Layers (framework contract, mid-2026):
|
|
7
|
+
* 1. Semantic fills — `primary` / `accent` / `secondary` / state hues (chrome, CTAs).
|
|
8
|
+
* 2. Containers — soft tonal surfaces + `on*` ink (badges, chips, tonal buttons).
|
|
9
|
+
* 3. Surfaces — `bg.*` including tonal `containerLowest|container|containerHigh`.
|
|
10
|
+
* 4. State layers — opacity overlays for press/hover/focus (Material state layers).
|
|
11
|
+
* 5. Material — nav-chrome hints for Liquid Glass / blur peers (optional usage).
|
|
12
|
+
*
|
|
13
|
+
* Color roles:
|
|
14
|
+
* - Fills/borders/tracks → `primary` / `accent` (never body text).
|
|
15
|
+
* - Brand text/links → `text.accent` (AA on `bg.page` / `bg.card`).
|
|
16
|
+
* - Ink on filled brand → `text.onPrimary` via `resolveOnColor`.
|
|
17
|
+
* - Ink on soft containers → `container.onPrimary` / `container.onSuccess` / …
|
|
8
18
|
*/
|
|
9
19
|
export {};
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { useFonts } from "@expo-google-fonts/
|
|
1
|
+
import { useFonts } from "@expo-google-fonts/ibm-plex-sans";
|
|
2
2
|
import type { TextStyle } from "react-native";
|
|
3
3
|
export type FontRole = "light" | "regular" | "medium" | "semiBold" | "extraBold" | "mono" | "monoMedium" | "titleRegular" | "titleMedium" | "title" | "titleBlack";
|
|
4
4
|
export declare const fontFamilies: Record<FontRole, string>;
|
|
5
5
|
/**
|
|
6
6
|
* Override DS font family names (role → already-loaded family name).
|
|
7
7
|
* Mutates the singleton in-place so components pick up the change at render time.
|
|
8
|
-
* Example: `configureFonts({ title: "
|
|
8
|
+
* Example: `configureFonts({ title: "YourBrandTitle-Bold", titleBlack: "YourBrandDisplay-Black" })`.
|
|
9
9
|
*/
|
|
10
10
|
export declare function configureFonts(overrides: Partial<Record<FontRole, string>>): void;
|
|
11
|
-
/** Reset all font roles to the defaults (
|
|
11
|
+
/** Reset all font roles to the defaults (IBM Plex Sans + IBM Plex Mono). Useful in tests and stories. */
|
|
12
12
|
export declare function resetFonts(): void;
|
|
13
|
+
export declare function resolveTextFontFamily(variant: keyof typeof typographyVariants, bold?: boolean, semibold?: boolean): string;
|
|
13
14
|
export declare const fontWeights: {
|
|
14
15
|
readonly light: "300";
|
|
15
16
|
readonly regular: "400";
|
|
@@ -103,6 +104,13 @@ export declare const typographyVariants: {
|
|
|
103
104
|
readonly lineHeight: number;
|
|
104
105
|
readonly letterSpacing: 0;
|
|
105
106
|
};
|
|
107
|
+
readonly bodyReadable: {
|
|
108
|
+
readonly fontSize: 17;
|
|
109
|
+
readonly fontFamily: string;
|
|
110
|
+
readonly fontWeight: "400";
|
|
111
|
+
readonly lineHeight: number;
|
|
112
|
+
readonly letterSpacing: 0;
|
|
113
|
+
};
|
|
106
114
|
readonly bodyLarge: {
|
|
107
115
|
readonly fontSize: 16;
|
|
108
116
|
readonly fontFamily: string;
|
|
@@ -314,6 +322,13 @@ export declare const Typography: {
|
|
|
314
322
|
readonly lineHeight: number;
|
|
315
323
|
readonly letterSpacing: 0;
|
|
316
324
|
};
|
|
325
|
+
readonly bodyReadable: {
|
|
326
|
+
readonly fontSize: 17;
|
|
327
|
+
readonly fontFamily: string;
|
|
328
|
+
readonly fontWeight: "400";
|
|
329
|
+
readonly lineHeight: number;
|
|
330
|
+
readonly letterSpacing: 0;
|
|
331
|
+
};
|
|
317
332
|
readonly bodyLarge: {
|
|
318
333
|
readonly fontSize: 16;
|
|
319
334
|
readonly fontFamily: string;
|
|
@@ -421,7 +436,7 @@ export declare const Typography: {
|
|
|
421
436
|
readonly letterSpacing: 0;
|
|
422
437
|
};
|
|
423
438
|
};
|
|
424
|
-
readonly variantFontRole: Record<"button" | "title" | "display" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "
|
|
439
|
+
readonly variantFontRole: Record<"label" | "button" | "title" | "display" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "bodyReadable" | "bodyLarge" | "body" | "bodySmall" | "labelSmall" | "data" | "dataLarge" | "overline" | "caption" | "captionSmall" | "buttonSmall" | "buttonLarge" | "subtitle", FontRole>;
|
|
425
440
|
readonly createTextStyle: (variant: keyof typeof typographyVariants, overrides?: Partial<TextStyle>) => TextStyle;
|
|
426
441
|
readonly createCustomTextStyle: (fontSize: keyof typeof fontSizes, fontFamily: keyof typeof fontFamilies, options?: {
|
|
427
442
|
lineHeight?: keyof typeof lineHeights;
|