@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
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,14 +1,14 @@
|
|
|
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
13
|
export declare const fontWeights: {
|
|
14
14
|
readonly light: "300";
|
|
@@ -421,7 +421,7 @@ export declare const Typography: {
|
|
|
421
421
|
readonly letterSpacing: 0;
|
|
422
422
|
};
|
|
423
423
|
};
|
|
424
|
-
readonly variantFontRole: Record<"button" | "title" | "display" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "bodyLarge" | "body" | "bodySmall" | "
|
|
424
|
+
readonly variantFontRole: Record<"label" | "button" | "title" | "display" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "bodyLarge" | "body" | "bodySmall" | "labelSmall" | "data" | "dataLarge" | "overline" | "caption" | "captionSmall" | "buttonSmall" | "buttonLarge" | "subtitle", FontRole>;
|
|
425
425
|
readonly createTextStyle: (variant: keyof typeof typographyVariants, overrides?: Partial<TextStyle>) => TextStyle;
|
|
426
426
|
readonly createCustomTextStyle: (fontSize: keyof typeof fontSizes, fontFamily: keyof typeof fontFamilies, options?: {
|
|
427
427
|
lineHeight?: keyof typeof lineHeights;
|
package/dist/theme/typography.js
CHANGED
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { IBMPlexMono_400Regular, IBMPlexMono_500Medium, } from "@expo-google-fonts/ibm-plex-mono";
|
|
2
|
+
import { IBMPlexSans_300Light, IBMPlexSans_400Regular, IBMPlexSans_500Medium, IBMPlexSans_600SemiBold, IBMPlexSans_700Bold, useFonts, } from "@expo-google-fonts/ibm-plex-sans";
|
|
3
3
|
const DEFAULT_FONT_FAMILIES = {
|
|
4
|
-
light: "
|
|
5
|
-
regular: "
|
|
6
|
-
medium: "
|
|
7
|
-
semiBold: "
|
|
8
|
-
extraBold: "
|
|
9
|
-
mono: "
|
|
10
|
-
monoMedium: "
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
titleBlack: "Inter_800ExtraBold",
|
|
4
|
+
light: "IBMPlexSans_300Light",
|
|
5
|
+
regular: "IBMPlexSans_400Regular",
|
|
6
|
+
medium: "IBMPlexSans_500Medium",
|
|
7
|
+
semiBold: "IBMPlexSans_600SemiBold",
|
|
8
|
+
extraBold: "IBMPlexSans_700Bold",
|
|
9
|
+
mono: "IBMPlexMono_400Regular",
|
|
10
|
+
monoMedium: "IBMPlexMono_500Medium",
|
|
11
|
+
titleRegular: "IBMPlexSans_400Regular",
|
|
12
|
+
titleMedium: "IBMPlexSans_500Medium",
|
|
13
|
+
title: "IBMPlexSans_600SemiBold",
|
|
14
|
+
titleBlack: "IBMPlexSans_700Bold",
|
|
16
15
|
};
|
|
17
16
|
export const fontFamilies = { ...DEFAULT_FONT_FAMILIES };
|
|
18
17
|
/**
|
|
19
18
|
* Override DS font family names (role → already-loaded family name).
|
|
20
19
|
* Mutates the singleton in-place so components pick up the change at render time.
|
|
21
|
-
* Example: `configureFonts({ title: "
|
|
20
|
+
* Example: `configureFonts({ title: "YourBrandTitle-Bold", titleBlack: "YourBrandDisplay-Black" })`.
|
|
22
21
|
*/
|
|
23
22
|
export function configureFonts(overrides) {
|
|
24
23
|
Object.assign(fontFamilies, overrides);
|
|
25
24
|
}
|
|
26
|
-
/** Reset all font roles to the defaults (
|
|
25
|
+
/** Reset all font roles to the defaults (IBM Plex Sans + IBM Plex Mono). Useful in tests and stories. */
|
|
27
26
|
export function resetFonts() {
|
|
28
27
|
Object.assign(fontFamilies, DEFAULT_FONT_FAMILIES);
|
|
29
28
|
}
|
|
@@ -75,7 +74,7 @@ export const letterSpacing = {
|
|
|
75
74
|
};
|
|
76
75
|
/* -------------------- Typography Variants -------------------- */
|
|
77
76
|
export const typographyVariants = {
|
|
78
|
-
// Display (
|
|
77
|
+
// Display (titleBlack role — typically the brand display typeface)
|
|
79
78
|
display: {
|
|
80
79
|
fontSize: fontSizes["7xl"],
|
|
81
80
|
fontFamily: fontFamilies.titleBlack,
|
|
@@ -83,7 +82,7 @@ export const typographyVariants = {
|
|
|
83
82
|
lineHeight: fontSizes["7xl"] * lineHeights.tight,
|
|
84
83
|
letterSpacing: letterSpacing.tight,
|
|
85
84
|
},
|
|
86
|
-
// Headings (
|
|
85
|
+
// Headings (title role)
|
|
87
86
|
h1: {
|
|
88
87
|
fontSize: fontSizes["5xl"],
|
|
89
88
|
fontFamily: fontFamilies.title,
|
|
@@ -290,18 +289,17 @@ export const createCustomTextStyle = (fontSize, fontFamily, options) => {
|
|
|
290
289
|
* depending directly on expo-font — it's already a transitive dep via this package. */
|
|
291
290
|
export { useFonts };
|
|
292
291
|
/* -------------------- Font Loader (optional, convenience) ------------------
|
|
293
|
-
* Loads
|
|
294
|
-
*
|
|
295
|
-
* via `configureFonts` — the DS never bundles font files. */
|
|
292
|
+
* Loads IBM Plex Sans and IBM Plex Mono, the same faces web UI uses.
|
|
293
|
+
* An app can still point a role at another loaded family with `configureFonts`. */
|
|
296
294
|
export const useAppFonts = () => {
|
|
297
295
|
const [loaded] = useFonts({
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
296
|
+
IBMPlexMono_400Regular,
|
|
297
|
+
IBMPlexMono_500Medium,
|
|
298
|
+
IBMPlexSans_300Light,
|
|
299
|
+
IBMPlexSans_400Regular,
|
|
300
|
+
IBMPlexSans_500Medium,
|
|
301
|
+
IBMPlexSans_600SemiBold,
|
|
302
|
+
IBMPlexSans_700Bold,
|
|
305
303
|
});
|
|
306
304
|
return loaded;
|
|
307
305
|
};
|
package/dist/theme/useTheme.d.ts
CHANGED
package/dist/theme/useTheme.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getActiveTheme, getThemeVersion, subscribeTheme, } from "
|
|
1
|
+
import { getActiveTheme, getThemeVersion, subscribeTheme, } from "./active.js";
|
|
2
2
|
import { useSyncExternalStore } from "react";
|
|
3
3
|
export function useTheme() {
|
|
4
4
|
useSyncExternalStore(subscribeTheme, getThemeVersion, getThemeVersion);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ThemeTokens } from "./types.js";
|
|
2
|
+
type Issue = {
|
|
3
|
+
path: string;
|
|
4
|
+
message: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Lightweight sanity checks on a theme. Returns a list of issues; empty array means OK.
|
|
8
|
+
* Not a hard validator — we don't want to over-constrain creative themes — just guards
|
|
9
|
+
* against the common silent failures (typos in hex, negative sizes, missing primary,
|
|
10
|
+
* WCAG P0 contrast violations on the key on-color pairs, semantic token collisions).
|
|
11
|
+
*
|
|
12
|
+
* Triggered automatically by `setActiveTheme` in dev mode (skipped under Node, since
|
|
13
|
+
* tests intentionally pass partial themes). Can also be called directly.
|
|
14
|
+
*/
|
|
15
|
+
export declare function validateTheme(theme: Partial<ThemeTokens>): Issue[];
|
|
16
|
+
export {};
|