@frosted-ui/react-native 0.0.1-canary.91 → 0.0.1-canary.93
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 +59 -14
- package/dist/components/accordion.js +2 -2
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/alert-dialog.js +2 -2
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/avatar.d.ts.map +1 -1
- package/dist/components/avatar.js +4 -20
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/badge.d.ts +2 -4
- package/dist/components/badge.d.ts.map +1 -1
- package/dist/components/badge.js +6 -22
- package/dist/components/badge.js.map +1 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +13 -17
- package/dist/components/button.js.map +1 -1
- package/dist/components/callout.d.ts +2 -4
- package/dist/components/callout.d.ts.map +1 -1
- package/dist/components/callout.js +6 -24
- package/dist/components/callout.js.map +1 -1
- package/dist/components/card.d.ts +1 -2
- package/dist/components/card.d.ts.map +1 -1
- package/dist/components/card.js +2 -3
- package/dist/components/card.js.map +1 -1
- package/dist/components/checkbox.d.ts +1 -2
- package/dist/components/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox.js +5 -21
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/code.d.ts +6 -8
- package/dist/components/code.d.ts.map +1 -1
- package/dist/components/code.js +7 -7
- package/dist/components/code.js.map +1 -1
- package/dist/components/context-menu.js +9 -9
- package/dist/components/context-menu.js.map +1 -1
- package/dist/components/dialog.js +2 -2
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/dropdown-menu.js +9 -9
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/heading.d.ts +4 -4
- package/dist/components/heading.d.ts.map +1 -1
- package/dist/components/heading.js +2 -2
- package/dist/components/heading.js.map +1 -1
- package/dist/components/hover-card.js +2 -2
- package/dist/components/hover-card.js.map +1 -1
- package/dist/components/icon-button.d.ts +2 -2
- package/dist/components/icon-button.d.ts.map +1 -1
- package/dist/components/icon-button.js +13 -17
- package/dist/components/icon-button.js.map +1 -1
- package/dist/components/icon.d.ts +6 -7
- package/dist/components/icon.d.ts.map +1 -1
- package/dist/components/icon.js +9 -24
- package/dist/components/icon.js.map +1 -1
- package/dist/components/label.js +2 -2
- package/dist/components/label.js.map +1 -1
- package/dist/components/native-only-animated-view.d.ts +0 -4
- package/dist/components/native-only-animated-view.d.ts.map +1 -1
- package/dist/components/popover.js +2 -2
- package/dist/components/popover.js.map +1 -1
- package/dist/components/progress.d.ts +1 -2
- package/dist/components/progress.d.ts.map +1 -1
- package/dist/components/progress.js +5 -21
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-group.d.ts +1 -2
- package/dist/components/radio-group.d.ts.map +1 -1
- package/dist/components/radio-group.js +7 -23
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/segmented-control.js +3 -3
- package/dist/components/segmented-control.js.map +1 -1
- package/dist/components/select.d.ts.map +1 -1
- package/dist/components/select.js +10 -12
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.d.ts +1 -1
- package/dist/components/separator.d.ts.map +1 -1
- package/dist/components/separator.js +4 -20
- package/dist/components/separator.js.map +1 -1
- package/dist/components/skeleton.d.ts.map +1 -1
- package/dist/components/skeleton.js +10 -26
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/spinner.js +2 -2
- package/dist/components/spinner.js.map +1 -1
- package/dist/components/switch.d.ts +1 -2
- package/dist/components/switch.d.ts.map +1 -1
- package/dist/components/switch.js +5 -21
- package/dist/components/switch.js.map +1 -1
- package/dist/components/tabs.d.ts +4 -3
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/tabs.js +10 -9
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/text-area.d.ts.map +1 -1
- package/dist/components/text-area.js +13 -9
- package/dist/components/text-area.js.map +1 -1
- package/dist/components/text-field.d.ts.map +1 -1
- package/dist/components/text-field.js +22 -16
- package/dist/components/text-field.js.map +1 -1
- package/dist/components/text.d.ts +4 -4
- package/dist/components/text.d.ts.map +1 -1
- package/dist/components/text.js +12 -10
- package/dist/components/text.js.map +1 -1
- package/dist/components/tooltip.js +2 -2
- package/dist/components/tooltip.js.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/button-styles.d.ts +6 -6
- package/dist/lib/button-styles.d.ts.map +1 -1
- package/dist/lib/button-styles.js +1 -17
- package/dist/lib/button-styles.js.map +1 -1
- package/dist/lib/color-utils.d.ts +19 -14
- package/dist/lib/color-utils.d.ts.map +1 -1
- package/dist/lib/color-utils.js +37 -73
- package/dist/lib/color-utils.js.map +1 -1
- package/dist/lib/full-window-overlay.d.ts +11 -0
- package/dist/lib/full-window-overlay.d.ts.map +1 -0
- package/dist/lib/full-window-overlay.js +16 -0
- package/dist/lib/full-window-overlay.js.map +1 -0
- package/dist/lib/text-input-styles.d.ts +9 -8
- package/dist/lib/text-input-styles.d.ts.map +1 -1
- package/dist/lib/text-input-styles.js +4 -23
- package/dist/lib/text-input-styles.js.map +1 -1
- package/dist/lib/theme-context.d.ts +80 -0
- package/dist/lib/theme-context.d.ts.map +1 -0
- package/dist/lib/theme-context.js +97 -0
- package/dist/lib/theme-context.js.map +1 -0
- package/dist/lib/{theme-vars.d.ts → theme-tokens.d.ts} +2 -2
- package/dist/lib/theme-tokens.d.ts.map +1 -0
- package/dist/lib/{theme-vars.js → theme-tokens.js} +4 -19
- package/dist/lib/theme-tokens.js.map +1 -0
- package/dist/lib/theme.d.ts +14 -54
- package/dist/lib/theme.d.ts.map +1 -1
- package/dist/lib/theme.js +98 -66
- package/dist/lib/theme.js.map +1 -1
- package/dist/lib/types.d.ts +6 -2
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/lib/use-theme-tokens.d.ts +593 -0
- package/dist/lib/use-theme-tokens.d.ts.map +1 -0
- package/dist/lib/use-theme-tokens.js +44 -0
- package/dist/lib/use-theme-tokens.js.map +1 -0
- package/package.json +10 -23
- package/dist/lib/native-colors.d.ts +0 -8
- package/dist/lib/native-colors.d.ts.map +0 -1
- package/dist/lib/native-colors.js +0 -67
- package/dist/lib/native-colors.js.map +0 -1
- package/dist/lib/theme-vars.d.ts.map +0 -1
- package/dist/lib/theme-vars.js.map +0 -1
- package/dist/lib/use-theme-vars.d.ts +0 -325
- package/dist/lib/use-theme-vars.d.ts.map +0 -1
- package/dist/lib/use-theme-vars.js +0 -17
- package/dist/lib/use-theme-vars.js.map +0 -1
- package/dist/lib/utils.d.ts +0 -3
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js +0 -17
- package/dist/lib/utils.js.map +0 -1
- package/global.css +0 -1813
- package/tailwind-preset.js +0 -310
package/dist/lib/color-utils.js
CHANGED
|
@@ -1,84 +1,48 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { defaultSemanticColors, useSemanticColors, } from './theme-context';
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
4
|
+
* Resolves a Color (which can be an AccentColor or SemanticColor) to an AccentColor.
|
|
5
|
+
* Semantic colors are resolved using the provided semantic color configuration.
|
|
6
|
+
*
|
|
7
|
+
* @param color - The color to resolve (can be 'danger', 'warning', 'success', 'info', or any AccentColor)
|
|
8
|
+
* @param semanticColors - The semantic color configuration from ThemeProvider (optional, uses defaults if not provided)
|
|
9
|
+
* @param defaultColor - The default color to return if no color is provided (defaults to 'blue')
|
|
10
|
+
* @returns The resolved AccentColor
|
|
5
11
|
*/
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
'
|
|
11
|
-
|
|
12
|
-
'
|
|
13
|
-
|
|
14
|
-
'
|
|
15
|
-
|
|
16
|
-
'
|
|
17
|
-
|
|
18
|
-
'
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
'--accent-a3': `var(--${colorName}-a3)`,
|
|
24
|
-
'--accent-a4': `var(--${colorName}-a4)`,
|
|
25
|
-
'--accent-a5': `var(--${colorName}-a5)`,
|
|
26
|
-
'--accent-a6': `var(--${colorName}-a6)`,
|
|
27
|
-
'--accent-a7': `var(--${colorName}-a7)`,
|
|
28
|
-
'--accent-a8': `var(--${colorName}-a8)`,
|
|
29
|
-
'--accent-a9': `var(--${colorName}-a9)`,
|
|
30
|
-
'--accent-a10': `var(--${colorName}-a10)`,
|
|
31
|
-
'--accent-a11': `var(--${colorName}-a11)`,
|
|
32
|
-
'--accent-a12': `var(--${colorName}-a12)`,
|
|
33
|
-
});
|
|
12
|
+
export function resolveAccentFromColor(color, semanticColors = defaultSemanticColors, defaultColor = 'blue') {
|
|
13
|
+
if (!color)
|
|
14
|
+
return defaultColor;
|
|
15
|
+
switch (color) {
|
|
16
|
+
case 'accent':
|
|
17
|
+
return semanticColors.accentColor;
|
|
18
|
+
case 'danger':
|
|
19
|
+
return semanticColors.dangerColor;
|
|
20
|
+
case 'warning':
|
|
21
|
+
return semanticColors.warningColor;
|
|
22
|
+
case 'success':
|
|
23
|
+
return semanticColors.successColor;
|
|
24
|
+
case 'info':
|
|
25
|
+
return semanticColors.infoColor;
|
|
26
|
+
default:
|
|
27
|
+
return color;
|
|
28
|
+
}
|
|
34
29
|
}
|
|
35
30
|
/**
|
|
36
|
-
*
|
|
37
|
-
* Similar to the theme pattern, but for color variants.
|
|
38
|
-
* This allows components to use text-accent-11, bg-accent-9, etc.
|
|
39
|
-
* and have them automatically map to the specified color.
|
|
31
|
+
* Checks if a color is a semantic color.
|
|
40
32
|
*/
|
|
41
|
-
export
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
ruby: createColorTheme('ruby'),
|
|
45
|
-
crimson: createColorTheme('crimson'),
|
|
46
|
-
pink: createColorTheme('pink'),
|
|
47
|
-
plum: createColorTheme('plum'),
|
|
48
|
-
purple: createColorTheme('purple'),
|
|
49
|
-
violet: createColorTheme('violet'),
|
|
50
|
-
iris: createColorTheme('iris'),
|
|
51
|
-
cyan: createColorTheme('cyan'),
|
|
52
|
-
teal: createColorTheme('teal'),
|
|
53
|
-
jade: createColorTheme('jade'),
|
|
54
|
-
green: createColorTheme('green'),
|
|
55
|
-
grass: createColorTheme('grass'),
|
|
56
|
-
brown: createColorTheme('brown'),
|
|
57
|
-
sky: createColorTheme('sky'),
|
|
58
|
-
mint: createColorTheme('mint'),
|
|
59
|
-
yellow: createColorTheme('yellow'),
|
|
60
|
-
amber: createColorTheme('amber'),
|
|
61
|
-
gold: createColorTheme('gold'),
|
|
62
|
-
bronze: createColorTheme('bronze'),
|
|
63
|
-
gray: createColorTheme('gray'),
|
|
64
|
-
blue: createColorTheme('blue'),
|
|
65
|
-
orange: createColorTheme('orange'),
|
|
66
|
-
indigo: createColorTheme('indigo'),
|
|
67
|
-
magenta: createColorTheme('magenta'),
|
|
68
|
-
lemon: createColorTheme('lemon'),
|
|
69
|
-
lime: createColorTheme('lime'),
|
|
70
|
-
};
|
|
33
|
+
export function isSemanticColor(color) {
|
|
34
|
+
return color === 'danger' || color === 'warning' || color === 'success' || color === 'info';
|
|
35
|
+
}
|
|
71
36
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
37
|
+
* Hook that returns a function to resolve colors using the current theme's semantic color configuration.
|
|
38
|
+
* Use this in components to properly respect ThemeProvider's color settings.
|
|
74
39
|
*
|
|
75
40
|
* @example
|
|
76
|
-
* const
|
|
77
|
-
*
|
|
78
|
-
* <Text className="text-accent-11">This will be yellow-11</Text>
|
|
79
|
-
* </View>
|
|
41
|
+
* const resolveColor = useResolveColor();
|
|
42
|
+
* const accentColor = resolveColor(props.color); // Respects ThemeProvider config
|
|
80
43
|
*/
|
|
81
|
-
export function
|
|
82
|
-
|
|
44
|
+
export function useResolveColor() {
|
|
45
|
+
const semanticColors = useSemanticColors();
|
|
46
|
+
return useMemo(() => (color, defaultColor = 'blue') => resolveAccentFromColor(color, semanticColors, defaultColor), [semanticColors]);
|
|
83
47
|
}
|
|
84
48
|
//# sourceMappingURL=color-utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-utils.js","sourceRoot":"","sources":["../../src/lib/color-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"color-utils.js","sourceRoot":"","sources":["../../src/lib/color-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EACL,qBAAqB,EACrB,iBAAiB,GAElB,MAAM,iBAAiB,CAAC;AAGzB;;;;;;;;GAQG;AACH,MAAM,UAAU,sBAAsB,CACpC,KAAwB,EACxB,iBAAsC,qBAAqB,EAC3D,eAA4B,MAAM;IAElC,IAAI,CAAC,KAAK;QAAE,OAAO,YAAY,CAAC;IAEhC,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,QAAQ;YACX,OAAO,cAAc,CAAC,WAAW,CAAC;QACpC,KAAK,QAAQ;YACX,OAAO,cAAc,CAAC,WAAW,CAAC;QACpC,KAAK,SAAS;YACZ,OAAO,cAAc,CAAC,YAAY,CAAC;QACrC,KAAK,SAAS;YACZ,OAAO,cAAc,CAAC,YAAY,CAAC;QACrC,KAAK,MAAM;YACT,OAAO,cAAc,CAAC,SAAS,CAAC;QAClC;YACE,OAAO,KAAoB,CAAC;IAChC,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAAY;IAC1C,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,MAAM,CAAC;AAC9F,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe;IAC7B,MAAM,cAAc,GAAG,iBAAiB,EAAE,CAAC;IAE3C,OAAO,OAAO,CACZ,GAAG,EAAE,CACH,CAAC,KAAwB,EAAE,eAA4B,MAAM,EAAe,EAAE,CAC5E,sBAAsB,CAAC,KAAK,EAAE,cAAc,EAAE,YAAY,CAAC,EAC/D,CAAC,cAAc,CAAC,CACjB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A wrapper that uses FullWindowOverlay on iOS and a Fragment on other platforms.
|
|
4
|
+
* This is implemented as a component rather than a top-level constant to avoid
|
|
5
|
+
* accessing Platform.OS at module load time, which can cause issues in monorepos
|
|
6
|
+
* where modules are loaded before React Native is fully initialized.
|
|
7
|
+
*/
|
|
8
|
+
export declare function FullWindowOverlay({ children }: {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}): React.JSX.Element;
|
|
11
|
+
//# sourceMappingURL=full-window-overlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"full-window-overlay.d.ts","sourceRoot":"","sources":["../../src/lib/full-window-overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,qBAK5E"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Platform } from 'react-native';
|
|
3
|
+
import { FullWindowOverlay as RNFullWindowOverlay } from 'react-native-screens';
|
|
4
|
+
/**
|
|
5
|
+
* A wrapper that uses FullWindowOverlay on iOS and a Fragment on other platforms.
|
|
6
|
+
* This is implemented as a component rather than a top-level constant to avoid
|
|
7
|
+
* accessing Platform.OS at module load time, which can cause issues in monorepos
|
|
8
|
+
* where modules are loaded before React Native is fully initialized.
|
|
9
|
+
*/
|
|
10
|
+
export function FullWindowOverlay({ children }) {
|
|
11
|
+
if (Platform.OS === 'ios') {
|
|
12
|
+
return <RNFullWindowOverlay>{children}</RNFullWindowOverlay>;
|
|
13
|
+
}
|
|
14
|
+
return <>{children}</>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=full-window-overlay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"full-window-overlay.js","sourceRoot":"","sources":["../../src/lib/full-window-overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,iBAAiB,IAAI,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhF;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAAE,QAAQ,EAAiC;IAC3E,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE,CAAC;QAC1B,OAAO,CAAC,mBAAmB,CAAC,CAAC,QAAQ,CAAC,EAAE,mBAAmB,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC;AACzB,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
1
|
+
import type { Color } from '../lib/types';
|
|
2
|
+
import { useThemeTokens } from '../lib/use-theme-tokens';
|
|
3
3
|
import { type ViewStyle } from 'react-native';
|
|
4
4
|
export type TextInputSize = '1' | '2' | '3' | '4';
|
|
5
5
|
export type TextInputVariant = 'surface' | 'soft';
|
|
6
|
-
|
|
6
|
+
type PaletteKey = Color | 'accent' | 'gray';
|
|
7
7
|
/**
|
|
8
8
|
* Convert hex color to rgba with specified opacity
|
|
9
9
|
*/
|
|
@@ -11,15 +11,15 @@ export declare function hexToRgba(hex: string, opacity: number): string;
|
|
|
11
11
|
/**
|
|
12
12
|
* Get background and border styles for surface variant
|
|
13
13
|
*/
|
|
14
|
-
export declare function getSurfaceVariantStyle(colors: ReturnType<typeof
|
|
14
|
+
export declare function getSurfaceVariantStyle(colors: ReturnType<typeof useThemeTokens>['colors']): ViewStyle;
|
|
15
15
|
/**
|
|
16
16
|
* Get background style for soft variant
|
|
17
17
|
*/
|
|
18
|
-
export declare function getSoftVariantStyle(colors: ReturnType<typeof
|
|
18
|
+
export declare function getSoftVariantStyle(colors: ReturnType<typeof useThemeTokens>['colors'], paletteKey: PaletteKey): ViewStyle;
|
|
19
19
|
/**
|
|
20
20
|
* Get text and placeholder colors based on variant
|
|
21
21
|
*/
|
|
22
|
-
export declare function getTextInputColors(variant: TextInputVariant, colors: ReturnType<typeof
|
|
22
|
+
export declare function getTextInputColors(variant: TextInputVariant, colors: ReturnType<typeof useThemeTokens>['colors'], paletteKey: PaletteKey, disabled?: boolean): {
|
|
23
23
|
textColor: string;
|
|
24
24
|
placeholderColor: string;
|
|
25
25
|
};
|
|
@@ -27,9 +27,10 @@ export declare function getTextInputColors(variant: TextInputVariant, colors: Re
|
|
|
27
27
|
* Get disabled background style for surface variant
|
|
28
28
|
* Uses gray-a3 overlay (simulated with opacity/background)
|
|
29
29
|
*/
|
|
30
|
-
export declare function getDisabledSurfaceStyle(colors: ReturnType<typeof
|
|
30
|
+
export declare function getDisabledSurfaceStyle(colors: ReturnType<typeof useThemeTokens>['colors']): ViewStyle;
|
|
31
31
|
/**
|
|
32
32
|
* Get disabled background style for soft variant
|
|
33
33
|
*/
|
|
34
|
-
export declare function getDisabledSoftStyle(colors: ReturnType<typeof
|
|
34
|
+
export declare function getDisabledSoftStyle(colors: ReturnType<typeof useThemeTokens>['colors']): ViewStyle;
|
|
35
|
+
export {};
|
|
35
36
|
//# sourceMappingURL=text-input-styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input-styles.d.ts","sourceRoot":"","sources":["../../src/lib/text-input-styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"text-input-styles.d.ts","sourceRoot":"","sources":["../../src/lib/text-input-styles.ts"],"names":[],"mappings":"AAAA,OA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1,23 +1,4 @@
|
|
|
1
1
|
import { Platform } from 'react-native';
|
|
2
|
-
// ============================================================================
|
|
3
|
-
// Helpers
|
|
4
|
-
// ============================================================================
|
|
5
|
-
export function resolveAccentFromColor(color) {
|
|
6
|
-
if (!color)
|
|
7
|
-
return 'gray';
|
|
8
|
-
switch (color) {
|
|
9
|
-
case 'danger':
|
|
10
|
-
return 'red';
|
|
11
|
-
case 'warning':
|
|
12
|
-
return 'amber';
|
|
13
|
-
case 'success':
|
|
14
|
-
return 'green';
|
|
15
|
-
case 'info':
|
|
16
|
-
return 'blue';
|
|
17
|
-
default:
|
|
18
|
-
return color;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
2
|
/**
|
|
22
3
|
* Convert hex color to rgba with specified opacity
|
|
23
4
|
*/
|
|
@@ -56,17 +37,17 @@ export function getSurfaceVariantStyle(colors) {
|
|
|
56
37
|
/**
|
|
57
38
|
* Get background style for soft variant
|
|
58
39
|
*/
|
|
59
|
-
export function getSoftVariantStyle(colors,
|
|
40
|
+
export function getSoftVariantStyle(colors, paletteKey) {
|
|
60
41
|
return {
|
|
61
|
-
backgroundColor: colors.palettes[
|
|
42
|
+
backgroundColor: colors.palettes[paletteKey].a3,
|
|
62
43
|
};
|
|
63
44
|
}
|
|
64
45
|
/**
|
|
65
46
|
* Get text and placeholder colors based on variant
|
|
66
47
|
*/
|
|
67
|
-
export function getTextInputColors(variant, colors,
|
|
48
|
+
export function getTextInputColors(variant, colors, paletteKey, disabled) {
|
|
68
49
|
const grayPalette = colors.palettes.gray;
|
|
69
|
-
const palette = colors.palettes[
|
|
50
|
+
const palette = colors.palettes[paletteKey];
|
|
70
51
|
// Disabled state: always use gray-a11 for text
|
|
71
52
|
// Placeholder uses gray-a5 (lighter alpha shade approximating gray-a11 at 0.5 opacity)
|
|
72
53
|
if (disabled) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input-styles.js","sourceRoot":"","sources":["../../src/lib/text-input-styles.ts"],"names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AQ,CAAC,IAAI,CAAC,EAAE;KACzC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { AccentColor } from './types';
|
|
3
|
+
type ColorScheme = 'light' | 'dark';
|
|
4
|
+
type DangerColor = 'tomato' | 'red' | 'ruby';
|
|
5
|
+
type WarningColor = 'yellow' | 'amber';
|
|
6
|
+
type SuccessColor = 'teal' | 'jade' | 'green' | 'grass';
|
|
7
|
+
type InfoColor = 'blue' | 'sky';
|
|
8
|
+
type SemanticColorConfig = {
|
|
9
|
+
accentColor: AccentColor;
|
|
10
|
+
dangerColor: DangerColor;
|
|
11
|
+
warningColor: WarningColor;
|
|
12
|
+
successColor: SuccessColor;
|
|
13
|
+
infoColor: InfoColor;
|
|
14
|
+
};
|
|
15
|
+
declare const defaultSemanticColors: SemanticColorConfig;
|
|
16
|
+
type ThemeContextValue = {
|
|
17
|
+
colorScheme: ColorScheme;
|
|
18
|
+
setColorScheme: (scheme: ColorScheme) => void;
|
|
19
|
+
toggleColorScheme: () => void;
|
|
20
|
+
} & SemanticColorConfig;
|
|
21
|
+
declare const ThemeContext: React.Context<ThemeContextValue | undefined>;
|
|
22
|
+
type ThemeProviderProps = {
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
/** Initial color scheme. Defaults to system preference. */
|
|
25
|
+
defaultColorScheme?: ColorScheme;
|
|
26
|
+
/** Accent color for primary actions and highlights. Defaults to 'blue'. */
|
|
27
|
+
accentColor?: AccentColor;
|
|
28
|
+
/** Color for danger/error states. Defaults to 'red'. */
|
|
29
|
+
dangerColor?: DangerColor;
|
|
30
|
+
/** Color for warning states. Defaults to 'amber'. */
|
|
31
|
+
warningColor?: WarningColor;
|
|
32
|
+
/** Color for success states. Defaults to 'green'. */
|
|
33
|
+
successColor?: SuccessColor;
|
|
34
|
+
/** Color for informational states. Defaults to 'sky'. */
|
|
35
|
+
infoColor?: InfoColor;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Provider for theme context that allows programmatic color scheme control
|
|
39
|
+
* and semantic color customization.
|
|
40
|
+
*
|
|
41
|
+
* Wrap your app with this provider to enable theme toggling and custom colors.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* function App() {
|
|
45
|
+
* return (
|
|
46
|
+
* <ThemeProvider
|
|
47
|
+
* accentColor="purple"
|
|
48
|
+
* dangerColor="tomato"
|
|
49
|
+
* warningColor="yellow"
|
|
50
|
+
* successColor="teal"
|
|
51
|
+
* infoColor="blue"
|
|
52
|
+
* >
|
|
53
|
+
* <YourApp />
|
|
54
|
+
* </ThemeProvider>
|
|
55
|
+
* );
|
|
56
|
+
* }
|
|
57
|
+
*/
|
|
58
|
+
declare function ThemeProvider({ children, defaultColorScheme, accentColor, dangerColor, warningColor, successColor, infoColor, }: ThemeProviderProps): React.JSX.Element;
|
|
59
|
+
/**
|
|
60
|
+
* Hook to access and control the current color scheme.
|
|
61
|
+
* Must be used within a ThemeProvider.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* const { colorScheme, toggleColorScheme, accentColor } = useTheme();
|
|
65
|
+
*/
|
|
66
|
+
declare function useTheme(): ThemeContextValue;
|
|
67
|
+
/**
|
|
68
|
+
* Internal hook to get the current color scheme.
|
|
69
|
+
* Checks ThemeContext first, falls back to system preference.
|
|
70
|
+
* Used by useThemeTokens.
|
|
71
|
+
*/
|
|
72
|
+
declare function useColorScheme(): ColorScheme;
|
|
73
|
+
/**
|
|
74
|
+
* Internal hook to get the semantic color configuration.
|
|
75
|
+
* Returns defaults if not within a ThemeProvider.
|
|
76
|
+
*/
|
|
77
|
+
declare function useSemanticColors(): SemanticColorConfig;
|
|
78
|
+
export { defaultSemanticColors, ThemeContext, ThemeProvider, useColorScheme, useSemanticColors, useTheme, };
|
|
79
|
+
export type { ColorScheme, DangerColor, InfoColor, SemanticColorConfig, SuccessColor, ThemeContextValue, ThemeProviderProps, WarningColor, };
|
|
80
|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D,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,qDAAqD;IACrD,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,yDAAyD;IACzD,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,iBAAS,aAAa,CAAC,EACrB,QAAQ,EACR,kBAAkB,EAClB,WAA+C,EAC/C,WAA+C,EAC/C,YAAiD,EACjD,YAAiD,EACjD,SAA2C,GAC5C,EAAE,kBAAkB,qBAiCpB;AAED;;;;;;GAMG;AACH,iBAAS,QAAQ,IAAI,iBAAiB,CAMrC;AAED;;;;GAIG;AACH,iBAAS,cAAc,IAAI,WAAW,CAWrC;AAED;;;GAGG;AACH,iBAAS,iBAAiB,IAAI,mBAAmB,CAGhD;AAED,OAAO,EACL,qBAAqB,EACrB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,QAAQ,GACT,CAAC;AACF,YAAY,EACV,WAAW,EACX,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,GACb,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useColorScheme as useSystemColorScheme } from 'react-native';
|
|
3
|
+
// Default semantic colors (matching web defaults)
|
|
4
|
+
const defaultSemanticColors = {
|
|
5
|
+
accentColor: 'blue',
|
|
6
|
+
dangerColor: 'red',
|
|
7
|
+
warningColor: 'amber',
|
|
8
|
+
successColor: 'green',
|
|
9
|
+
infoColor: 'sky',
|
|
10
|
+
};
|
|
11
|
+
const ThemeContext = React.createContext(undefined);
|
|
12
|
+
/**
|
|
13
|
+
* Provider for theme context that allows programmatic color scheme control
|
|
14
|
+
* and semantic color customization.
|
|
15
|
+
*
|
|
16
|
+
* Wrap your app with this provider to enable theme toggling and custom colors.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* function App() {
|
|
20
|
+
* return (
|
|
21
|
+
* <ThemeProvider
|
|
22
|
+
* accentColor="purple"
|
|
23
|
+
* dangerColor="tomato"
|
|
24
|
+
* warningColor="yellow"
|
|
25
|
+
* successColor="teal"
|
|
26
|
+
* infoColor="blue"
|
|
27
|
+
* >
|
|
28
|
+
* <YourApp />
|
|
29
|
+
* </ThemeProvider>
|
|
30
|
+
* );
|
|
31
|
+
* }
|
|
32
|
+
*/
|
|
33
|
+
function ThemeProvider({ children, defaultColorScheme, accentColor = defaultSemanticColors.accentColor, dangerColor = defaultSemanticColors.dangerColor, warningColor = defaultSemanticColors.warningColor, successColor = defaultSemanticColors.successColor, infoColor = defaultSemanticColors.infoColor, }) {
|
|
34
|
+
const systemColorScheme = useSystemColorScheme();
|
|
35
|
+
const [colorScheme, setColorScheme] = React.useState(defaultColorScheme ?? (systemColorScheme === 'dark' ? 'dark' : 'light'));
|
|
36
|
+
const toggleColorScheme = React.useCallback(() => {
|
|
37
|
+
setColorScheme((prev) => (prev === 'dark' ? 'light' : 'dark'));
|
|
38
|
+
}, []);
|
|
39
|
+
const value = React.useMemo(() => ({
|
|
40
|
+
colorScheme,
|
|
41
|
+
setColorScheme,
|
|
42
|
+
toggleColorScheme,
|
|
43
|
+
accentColor,
|
|
44
|
+
dangerColor,
|
|
45
|
+
warningColor,
|
|
46
|
+
successColor,
|
|
47
|
+
infoColor,
|
|
48
|
+
}), [
|
|
49
|
+
colorScheme,
|
|
50
|
+
toggleColorScheme,
|
|
51
|
+
accentColor,
|
|
52
|
+
dangerColor,
|
|
53
|
+
warningColor,
|
|
54
|
+
successColor,
|
|
55
|
+
infoColor,
|
|
56
|
+
]);
|
|
57
|
+
return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Hook to access and control the current color scheme.
|
|
61
|
+
* Must be used within a ThemeProvider.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* const { colorScheme, toggleColorScheme, accentColor } = useTheme();
|
|
65
|
+
*/
|
|
66
|
+
function useTheme() {
|
|
67
|
+
const context = React.useContext(ThemeContext);
|
|
68
|
+
if (!context) {
|
|
69
|
+
throw new Error('useTheme must be used within a ThemeProvider');
|
|
70
|
+
}
|
|
71
|
+
return context;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Internal hook to get the current color scheme.
|
|
75
|
+
* Checks ThemeContext first, falls back to system preference.
|
|
76
|
+
* Used by useThemeTokens.
|
|
77
|
+
*/
|
|
78
|
+
function useColorScheme() {
|
|
79
|
+
const context = React.useContext(ThemeContext);
|
|
80
|
+
const systemColorScheme = useSystemColorScheme();
|
|
81
|
+
// If ThemeProvider is used, respect the programmatic value
|
|
82
|
+
if (context) {
|
|
83
|
+
return context.colorScheme;
|
|
84
|
+
}
|
|
85
|
+
// Otherwise fall back to system preference
|
|
86
|
+
return systemColorScheme === 'dark' ? 'dark' : 'light';
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Internal hook to get the semantic color configuration.
|
|
90
|
+
* Returns defaults if not within a ThemeProvider.
|
|
91
|
+
*/
|
|
92
|
+
function useSemanticColors() {
|
|
93
|
+
const context = React.useContext(ThemeContext);
|
|
94
|
+
return context ?? defaultSemanticColors;
|
|
95
|
+
}
|
|
96
|
+
export { defaultSemanticColors, ThemeContext, ThemeProvider, useColorScheme, useSemanticColors, useTheme, };
|
|
97
|
+
//# sourceMappingURL=theme-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-context.js","sourceRoot":"","sources":["../../src/lib/theme-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAoBtE,kDAAkD;AAClD,MAAM,qBAAqB,GAAwB;IACjD,WAAW,EAAE,MAAM;IACnB,WAAW,EAAE,KAAK;IAClB,YAAY,E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KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;AACjF,CAAC;AAED;;;;;;GAMG;AACH,SAAS,QAAQ;IACf,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IAC/C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;GAIG;AACH,SAAS,cAAc;IACrB,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IAC/C,MAAM,iBAAiB,GAAG,oBAAoB,EAAE,CAAC;IAEjD,2DAA2D;IAC3D,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,OAAO,CAAC,WAAW,CAAC;IAC7B,CAAC;IAED,2CAA2C;IAC3C,OAAO,iBAAiB,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;AACzD,CAAC;AAED;;;GAGG;AACH,SAAS,iBAAiB;IACxB,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IAC/C,OAAO,OAAO,IAAI,qBAAqB,CAAC;AAC1C,CAAC;AAED,OAAO,EACL,qBAAqB,EACrB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,QAAQ,GACT,CAAC"}
|
|
@@ -75,7 +75,7 @@ export declare function blackAndWhitePalettes(): {
|
|
|
75
75
|
black: AlphaOnlyShades;
|
|
76
76
|
white: AlphaOnlyShades;
|
|
77
77
|
};
|
|
78
|
-
export declare const
|
|
78
|
+
export declare const themeTokens: {
|
|
79
79
|
typography: {
|
|
80
80
|
readonly '0': {
|
|
81
81
|
readonly fontSize: 10;
|
|
@@ -219,4 +219,4 @@ export declare const themeVars: {
|
|
|
219
219
|
};
|
|
220
220
|
};
|
|
221
221
|
export type { ColorShades, FontWeightKey, TypographyStepKey };
|
|
222
|
-
//# sourceMappingURL=theme-
|
|
222
|
+
//# sourceMappingURL=theme-tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-tokens.d.ts","sourceRoot":"","sources":["../../src/lib/theme-tokens.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWN,CAAC;AAEX,KAAK,iBAAiB,GAAG,MAAM,OAAO,UAAU,CAAC;AAEjD,QAAA,MAAM,WAAW;;;;;;CAMP,CAAC;AAEX,KAAK,aAAa,GAAG,MAAM,OAAO,WAAW,CAAC;AAK9C,KAAK,QAAQ,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEzF,KAAK,aAAa,GACd,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,KAAK,GACL,KAAK,CAAC;AAEV,KAAK,WAAW,GAAG;KAChB,CAAC,IAAI,QAAQ,GAAG,MAAM;CACxB,GAAG;IACF,YAAY,EAAE,MAAM,CAAC;CACtB,GAAG;KACD,CAAC,IAAI,aAAa,GAAG,MAAM;CAC7B,CAAC;AAqHF,KAAK,eAAe,GAAG;KAAG,CAAC,IAAI,aAAa,GAAG,MAAM;CAAE,CAAC;AAqBxD,wBAAgB,qBAAqB;;;EAKpC;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuBvB,CAAC;AAEF,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
-
// Typography steps (0-9) based on
|
|
2
|
+
// Typography steps (0-9) based on Frosted UI design system tokens.
|
|
3
3
|
// Values are in px; React Native treats them as logical pixels.
|
|
4
4
|
const typography = {
|
|
5
5
|
'0': { fontSize: 10, lineHeight: 12, letterSpacing: 0.01 },
|
|
@@ -108,22 +108,7 @@ const darkPalettes = accentColors.reduce((acc, color) => {
|
|
|
108
108
|
acc[color] = buildPalette(color, 'dark');
|
|
109
109
|
return acc;
|
|
110
110
|
}, {});
|
|
111
|
-
// Semantic surface tokens
|
|
112
|
-
// Light mode:
|
|
113
|
-
// --color-background: white;
|
|
114
|
-
// --color-overlay: var(--black-a6);
|
|
115
|
-
// --color-panel-solid: white;
|
|
116
|
-
// --color-panel-translucent: rgba(255, 255, 255, 0.85);
|
|
117
|
-
// --color-surface: rgba(255, 255, 255, 0.9);
|
|
118
|
-
// --color-stroke: var(--gray-a5);
|
|
119
|
-
//
|
|
120
|
-
// Dark mode:
|
|
121
|
-
// --color-background: var(--gray-1);
|
|
122
|
-
// --color-overlay: var(--black-a8);
|
|
123
|
-
// --color-panel-solid: var(--gray-2);
|
|
124
|
-
// --color-panel-translucent: var(--gray-2-translucent);
|
|
125
|
-
// --color-surface: rgba(0, 0, 0, 0.25);
|
|
126
|
-
// --color-stroke: var(--gray-a4);
|
|
111
|
+
// Semantic surface tokens for light/dark modes
|
|
127
112
|
// Resolve overlay / stroke from raw color palettes so native can use real values
|
|
128
113
|
const blackA = frostedColors.blackA;
|
|
129
114
|
const whiteA = frostedColors.whiteA;
|
|
@@ -146,7 +131,7 @@ export function blackAndWhitePalettes() {
|
|
|
146
131
|
white: whiteAlpha,
|
|
147
132
|
};
|
|
148
133
|
}
|
|
149
|
-
export const
|
|
134
|
+
export const themeTokens = {
|
|
150
135
|
typography,
|
|
151
136
|
fontWeights,
|
|
152
137
|
colors: {
|
|
@@ -170,4 +155,4 @@ export const themeVars = {
|
|
|
170
155
|
},
|
|
171
156
|
},
|
|
172
157
|
};
|
|
173
|
-
//# sourceMappingURL=theme-
|
|
158
|
+
//# sourceMappingURL=theme-tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-tokens.js","sourceRoot":"","sources":["../../src/lib/theme-tokens.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAIvD,mEAAmE;AACnE,gEAAgE;AAChE,MAAM,UAAU,GAAG;IACjB,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE;IAC1D,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE;IAC1D,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE;IAC1D,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE;IAC1D,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE;IAC1D,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE;IAC1D,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE;IAC1D,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE;IAC3D,GAAG,EAAE,E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AAY,CAAC,IAAI,CAAC,EAAE;SAC7B;KACF;CACF,CAAC"}
|
package/dist/lib/theme.d.ts
CHANGED
|
@@ -1,57 +1,17 @@
|
|
|
1
1
|
import { type Theme } from '@react-navigation/native';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
accent: string;
|
|
17
|
-
accentForeground: string;
|
|
18
|
-
destructive: string;
|
|
19
|
-
border: string;
|
|
20
|
-
input: string;
|
|
21
|
-
ring: string;
|
|
22
|
-
radius: string;
|
|
23
|
-
chart1: string;
|
|
24
|
-
chart2: string;
|
|
25
|
-
chart3: string;
|
|
26
|
-
chart4: string;
|
|
27
|
-
chart5: string;
|
|
28
|
-
};
|
|
29
|
-
dark: {
|
|
30
|
-
background: string;
|
|
31
|
-
foreground: string;
|
|
32
|
-
card: string;
|
|
33
|
-
cardForeground: string;
|
|
34
|
-
popover: string;
|
|
35
|
-
popoverForeground: string;
|
|
36
|
-
primary: string;
|
|
37
|
-
primaryForeground: string;
|
|
38
|
-
secondary: string;
|
|
39
|
-
secondaryForeground: string;
|
|
40
|
-
muted: string;
|
|
41
|
-
mutedForeground: string;
|
|
42
|
-
accent: string;
|
|
43
|
-
accentForeground: string;
|
|
44
|
-
destructive: string;
|
|
45
|
-
border: string;
|
|
46
|
-
input: string;
|
|
47
|
-
ring: string;
|
|
48
|
-
radius: string;
|
|
49
|
-
chart1: string;
|
|
50
|
-
chart2: string;
|
|
51
|
-
chart3: string;
|
|
52
|
-
chart4: string;
|
|
53
|
-
chart5: string;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
2
|
+
/**
|
|
3
|
+
* Hook to get navigation theme using Frosted UI design system colors.
|
|
4
|
+
* Reacts to the accent color from ThemeProvider.
|
|
5
|
+
*
|
|
6
|
+
* React Navigation uses these colors to style the navigation UI elements
|
|
7
|
+
* (headers, tab bars, drawers, etc.) throughout your app.
|
|
8
|
+
*
|
|
9
|
+
* @see https://reactnavigation.org/docs/themes
|
|
10
|
+
*/
|
|
11
|
+
export declare function useNavTheme(): Record<'light' | 'dark', Theme>;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Use useNavTheme() hook instead for dynamic accent color support.
|
|
14
|
+
* Static navigation theme with hardcoded blue accent.
|
|
15
|
+
*/
|
|
56
16
|
export declare const NAV_THEME: Record<'light' | 'dark', Theme>;
|
|
57
17
|
//# sourceMappingURL=theme.d.ts.map
|
package/dist/lib/theme.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/lib/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,KAAK,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/lib/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAQ/E;;;;;;;;GAQG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAAC,OAAO,GAAG,MAAM,EAAE,KAAK,CAAC,CA+E7D;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,OAAO,GAAG,MAAM,EAAE,KAAK,CAuBrD,CAAC"}
|