@campxdev/react-native-blueprint 0.1.3 → 0.1.4
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 +98 -69
- package/lib/module/app/_layout.js +7 -1
- package/lib/module/app/_layout.js.map +1 -1
- package/package.json +10 -6
- package/src/app/_layout.tsx +7 -1
- package/lib/typescript/src/app/_layout.d.ts +0 -8
- package/lib/typescript/src/app/_layout.d.ts.map +0 -1
- package/lib/typescript/src/components/theme-config.d.ts +0 -174
- package/lib/typescript/src/components/theme-config.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Accordion.d.ts +0 -103
- package/lib/typescript/src/components/ui/Accordion.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Alert-Dialog.d.ts +0 -168
- package/lib/typescript/src/components/ui/Alert-Dialog.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Alert.d.ts +0 -60
- package/lib/typescript/src/components/ui/Alert.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/AppBar.d.ts +0 -227
- package/lib/typescript/src/components/ui/AppBar.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Aspect-Ratio.d.ts +0 -30
- package/lib/typescript/src/components/ui/Aspect-Ratio.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Avatar.d.ts +0 -1351
- package/lib/typescript/src/components/ui/Avatar.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Badge.d.ts +0 -204
- package/lib/typescript/src/components/ui/Badge.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Bottom-Sheet.d.ts +0 -43
- package/lib/typescript/src/components/ui/Bottom-Sheet.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Button.d.ts +0 -176
- package/lib/typescript/src/components/ui/Button.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Card.d.ts +0 -854
- package/lib/typescript/src/components/ui/Card.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Checkbox.d.ts +0 -36
- package/lib/typescript/src/components/ui/Checkbox.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Collapsible.d.ts +0 -66
- package/lib/typescript/src/components/ui/Collapsible.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Context-Menu.d.ts +0 -150
- package/lib/typescript/src/components/ui/Context-Menu.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Custom-Card.d.ts +0 -864
- package/lib/typescript/src/components/ui/Custom-Card.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Dialog.d.ts +0 -126
- package/lib/typescript/src/components/ui/Dialog.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Dropdown-Menu.d.ts +0 -284
- package/lib/typescript/src/components/ui/Dropdown-Menu.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Floating-Action.d.ts +0 -44
- package/lib/typescript/src/components/ui/Floating-Action.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Greeting-Card.d.ts +0 -153
- package/lib/typescript/src/components/ui/Greeting-Card.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Hover-Card.d.ts +0 -68
- package/lib/typescript/src/components/ui/Hover-Card.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Icon.d.ts +0 -43
- package/lib/typescript/src/components/ui/Icon.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Input.d.ts +0 -52
- package/lib/typescript/src/components/ui/Input.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Label.d.ts +0 -105
- package/lib/typescript/src/components/ui/Label.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Menubar.d.ts +0 -175
- package/lib/typescript/src/components/ui/Menubar.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Native-Only-Animated-View.d.ts +0 -26
- package/lib/typescript/src/components/ui/Native-Only-Animated-View.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/NavBar.d.ts +0 -273
- package/lib/typescript/src/components/ui/NavBar.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Popover.d.ts +0 -71
- package/lib/typescript/src/components/ui/Popover.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Progress.d.ts +0 -27
- package/lib/typescript/src/components/ui/Progress.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Radio-Group.d.ts +0 -47
- package/lib/typescript/src/components/ui/Radio-Group.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Select.d.ts +0 -107
- package/lib/typescript/src/components/ui/Select.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Separator.d.ts +0 -166
- package/lib/typescript/src/components/ui/Separator.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/SizedBox.d.ts +0 -79
- package/lib/typescript/src/components/ui/SizedBox.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Skeleton.d.ts +0 -40
- package/lib/typescript/src/components/ui/Skeleton.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Slider.d.ts +0 -55
- package/lib/typescript/src/components/ui/Slider.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Switch.d.ts +0 -34
- package/lib/typescript/src/components/ui/Switch.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Table.d.ts +0 -70
- package/lib/typescript/src/components/ui/Table.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Tabs.d.ts +0 -51
- package/lib/typescript/src/components/ui/Tabs.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Text.d.ts +0 -116
- package/lib/typescript/src/components/ui/Text.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Textarea.d.ts +0 -61
- package/lib/typescript/src/components/ui/Textarea.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Theme-Toggle.d.ts +0 -194
- package/lib/typescript/src/components/ui/Theme-Toggle.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Toast.d.ts +0 -55
- package/lib/typescript/src/components/ui/Toast.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Toggle-Group.d.ts +0 -49
- package/lib/typescript/src/components/ui/Toggle-Group.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Toggle.d.ts +0 -53
- package/lib/typescript/src/components/ui/Toggle.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Tooltip.d.ts +0 -71
- package/lib/typescript/src/components/ui/Tooltip.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/index.d.ts +0 -44
- package/lib/typescript/src/components/ui/index.d.ts.map +0 -1
- package/lib/typescript/src/index.d.ts +0 -9
- package/lib/typescript/src/index.d.ts.map +0 -1
- package/lib/typescript/src/lib/ThemeProvider.d.ts +0 -137
- package/lib/typescript/src/lib/ThemeProvider.d.ts.map +0 -1
- package/lib/typescript/src/lib/cornerRadius.d.ts +0 -112
- package/lib/typescript/src/lib/cornerRadius.d.ts.map +0 -1
- package/lib/typescript/src/lib/fonts.d.ts +0 -21
- package/lib/typescript/src/lib/fonts.d.ts.map +0 -1
- package/lib/typescript/src/lib/theme.d.ts +0 -87
- package/lib/typescript/src/lib/theme.d.ts.map +0 -1
- package/lib/typescript/src/lib/utils.d.ts +0 -111
- package/lib/typescript/src/lib/utils.d.ts.map +0 -1
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import * as TooltipPrimitive from '@rn-primitives/tooltip';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
/**
|
|
4
|
-
* Root tooltip component - provides context for trigger and content
|
|
5
|
-
*
|
|
6
|
-
* @component
|
|
7
|
-
* @example
|
|
8
|
-
* ```tsx
|
|
9
|
-
* <Tooltip>
|
|
10
|
-
* <TooltipTrigger>
|
|
11
|
-
* <Button variant="outline">
|
|
12
|
-
* <Text>Hover me</Text>
|
|
13
|
-
* </Button>
|
|
14
|
-
* </TooltipTrigger>
|
|
15
|
-
* <TooltipContent>
|
|
16
|
-
* <Text>Helpful tooltip text</Text>
|
|
17
|
-
* </TooltipContent>
|
|
18
|
-
* </Tooltip>
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
declare const Tooltip: React.ForwardRefExoticComponent<import("react-native").ViewProps & {
|
|
22
|
-
asChild?: boolean;
|
|
23
|
-
} & {
|
|
24
|
-
onOpenChange?: (open: boolean) => void;
|
|
25
|
-
delayDuration?: number;
|
|
26
|
-
skipDelayDuration?: number;
|
|
27
|
-
disableHoverableContent?: boolean;
|
|
28
|
-
} & React.RefAttributes<(props: Omit<import("react-native/types_generated/Libraries/Components/View/ViewPropTypes").ViewProps, keyof {
|
|
29
|
-
ref?: React.Ref<React.ComponentRef<typeof import("react-native/types_generated/Libraries/Components/View/ViewNativeComponent").default>>;
|
|
30
|
-
}> & {
|
|
31
|
-
ref?: React.Ref<React.ComponentRef<typeof import("react-native/types_generated/Libraries/Components/View/ViewNativeComponent").default>>;
|
|
32
|
-
}) => React.ReactNode>>;
|
|
33
|
-
/**
|
|
34
|
-
* Trigger component that shows tooltip on hover/press
|
|
35
|
-
*
|
|
36
|
-
* @component
|
|
37
|
-
*/
|
|
38
|
-
declare const TooltipTrigger: React.ForwardRefExoticComponent<Omit<import("react-native").PressableProps & React.RefAttributes<(props: Omit<import("react-native/types_generated/Libraries/Components/View/ViewPropTypes").ViewProps, keyof {
|
|
39
|
-
ref?: React.Ref<React.ComponentRef<typeof import("react-native/types_generated/Libraries/Components/View/ViewNativeComponent").default>>;
|
|
40
|
-
}> & {
|
|
41
|
-
ref?: React.Ref<React.ComponentRef<typeof import("react-native/types_generated/Libraries/Components/View/ViewNativeComponent").default>>;
|
|
42
|
-
}) => React.ReactNode>, "ref"> & {
|
|
43
|
-
asChild?: boolean;
|
|
44
|
-
} & {
|
|
45
|
-
onKeyDown?: (ev: React.KeyboardEvent) => void;
|
|
46
|
-
onKeyUp?: (ev: React.KeyboardEvent) => void;
|
|
47
|
-
} & React.RefAttributes<import("@rn-primitives/tooltip").TriggerRef>>;
|
|
48
|
-
/**
|
|
49
|
-
* Tooltip content component
|
|
50
|
-
*
|
|
51
|
-
* Displays helpful text in a small popup when hovering or pressing the trigger.
|
|
52
|
-
* Includes directional animations based on positioning.
|
|
53
|
-
*
|
|
54
|
-
* @component
|
|
55
|
-
* @example
|
|
56
|
-
* ```tsx
|
|
57
|
-
* <TooltipContent side="top" sideOffset={8}>
|
|
58
|
-
* <Text>Add to favorites</Text>
|
|
59
|
-
* </TooltipContent>
|
|
60
|
-
* ```
|
|
61
|
-
*
|
|
62
|
-
* @accessibility
|
|
63
|
-
* - Content is announced by screen readers
|
|
64
|
-
* - Proper ARIA attributes for tooltips
|
|
65
|
-
* - Dismissible on escape key (web)
|
|
66
|
-
*/
|
|
67
|
-
declare function TooltipContent({ className, sideOffset, portalHost, side, ...props }: TooltipPrimitive.ContentProps & React.RefAttributes<TooltipPrimitive.ContentRef> & {
|
|
68
|
-
portalHost?: string;
|
|
69
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
70
|
-
export { Tooltip, TooltipContent, TooltipTrigger };
|
|
71
|
-
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/Tooltip.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,gBAAgB,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;;;;;;;;;;;;;;GAiBG;AACH,QAAA,MAAM,OAAO;;;;;;;;OAAD,CAAC;;OAG8B,CAAA;uBAHN,CAAC;AAEtC;;;;GAIG;AACH,QAAA,MAAM,cAAc;OAPR,CAAC;;OAG8B,CAAA;;;;;;qEAII,CAAC;AAQhD;;;;;;;;;;;;;;;;;;GAkBG;AACH,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,UAAc,EACd,UAAU,EACV,IAAY,EACZ,GAAG,KAAK,EACT,EAAE,gBAAgB,CAAC,YAAY,GAC9B,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,UAAU,CAAC,GAAG;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,2CA4CF;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
export * from './Accordion';
|
|
2
|
-
export * from './Alert';
|
|
3
|
-
export * from './Alert-Dialog';
|
|
4
|
-
export * from './AppBar';
|
|
5
|
-
export * from './Aspect-Ratio';
|
|
6
|
-
export * from './Avatar';
|
|
7
|
-
export * from './Badge';
|
|
8
|
-
export * from './Bottom-Sheet';
|
|
9
|
-
export * from './Button';
|
|
10
|
-
export * from './Card';
|
|
11
|
-
export * from './Checkbox';
|
|
12
|
-
export * from './Collapsible';
|
|
13
|
-
export * from './Context-Menu';
|
|
14
|
-
export * from './Custom-Card';
|
|
15
|
-
export * from './Dialog';
|
|
16
|
-
export * from './Dropdown-Menu';
|
|
17
|
-
export * from './Floating-Action';
|
|
18
|
-
export * from './Greeting-Card';
|
|
19
|
-
export * from './Hover-Card';
|
|
20
|
-
export * from './Icon';
|
|
21
|
-
export * from './Input';
|
|
22
|
-
export * from './Label';
|
|
23
|
-
export * from './Menubar';
|
|
24
|
-
export * from './Native-Only-Animated-View';
|
|
25
|
-
export * from './NavBar';
|
|
26
|
-
export * from './Popover';
|
|
27
|
-
export * from './Progress';
|
|
28
|
-
export * from './Radio-Group';
|
|
29
|
-
export * from './Select';
|
|
30
|
-
export * from './Separator';
|
|
31
|
-
export * from './SizedBox';
|
|
32
|
-
export * from './Skeleton';
|
|
33
|
-
export * from './Slider';
|
|
34
|
-
export * from './Switch';
|
|
35
|
-
export * from './Table';
|
|
36
|
-
export * from './Tabs';
|
|
37
|
-
export * from './Text';
|
|
38
|
-
export * from './Textarea';
|
|
39
|
-
export * from './Theme-Toggle';
|
|
40
|
-
export * from './Toast';
|
|
41
|
-
export * from './Toggle';
|
|
42
|
-
export * from './Toggle-Group';
|
|
43
|
-
export * from './Tooltip';
|
|
44
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './components/ui';
|
|
2
|
-
export { default as RootLayout } from './app/_layout';
|
|
3
|
-
export { cn } from './lib/utils';
|
|
4
|
-
export { THEME, NAV_THEME } from './lib/theme';
|
|
5
|
-
export { ThemeProvider, useTheme } from './lib/ThemeProvider';
|
|
6
|
-
export { getRadiusForHeight, getRadiusForDimensions, getCustomRadius, RADIUS, RADIUS_PRESET, CORNER_SMOOTHING, } from './lib/cornerRadius';
|
|
7
|
-
export { fonts } from './lib/fonts';
|
|
8
|
-
export type { FontName } from './lib/fonts';
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAC;AAGhC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,eAAe,CAAC;AAGtD,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG9D,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,MAAM,EACN,aAAa,EACb,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Available theme modes for the application
|
|
4
|
-
* @typedef {'light' | 'dark' | 'system'} ThemeMode
|
|
5
|
-
* - `light`: Force light theme regardless of system preference
|
|
6
|
-
* - `dark`: Force dark theme regardless of system preference
|
|
7
|
-
* - `system`: Automatically follow device system theme preference (default)
|
|
8
|
-
*/
|
|
9
|
-
export type ThemeMode = 'light' | 'dark' | 'system';
|
|
10
|
-
/**
|
|
11
|
-
* Context type for theme management
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
14
|
-
type ThemeContextType = {
|
|
15
|
-
/** Current theme mode setting */
|
|
16
|
-
mode: ThemeMode;
|
|
17
|
-
/** Whether dark mode is currently active (computed from mode and system preference) */
|
|
18
|
-
isDark: boolean;
|
|
19
|
-
/** Function to change the theme mode */
|
|
20
|
-
setMode: (mode: ThemeMode) => void;
|
|
21
|
-
/** Theme color tokens for the current mode */
|
|
22
|
-
colors: typeof import('./theme').THEME.light;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Props for ThemeProvider component
|
|
26
|
-
*/
|
|
27
|
-
type ThemeProviderProps = {
|
|
28
|
-
/** Application content to provide theme context to */
|
|
29
|
-
children: React.ReactNode;
|
|
30
|
-
/**
|
|
31
|
-
* Initial theme mode
|
|
32
|
-
* @default 'system'
|
|
33
|
-
*/
|
|
34
|
-
defaultMode?: ThemeMode;
|
|
35
|
-
/**
|
|
36
|
-
* Storage key for persisting theme preference (not yet implemented)
|
|
37
|
-
* @deprecated Currently not used - will be implemented in future version
|
|
38
|
-
*/
|
|
39
|
-
storageKey?: string;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* Theme Provider component that manages application theme state
|
|
43
|
-
*
|
|
44
|
-
* Provides theme context to all child components, enabling dark mode support
|
|
45
|
-
* throughout the application. Automatically responds to system theme changes
|
|
46
|
-
* when mode is set to 'system'.
|
|
47
|
-
*
|
|
48
|
-
* @component
|
|
49
|
-
* @example
|
|
50
|
-
* ```tsx
|
|
51
|
-
* // Basic usage with system theme
|
|
52
|
-
* function App() {
|
|
53
|
-
* return (
|
|
54
|
-
* <ThemeProvider>
|
|
55
|
-
* <YourApp />
|
|
56
|
-
* </ThemeProvider>
|
|
57
|
-
* );
|
|
58
|
-
* }
|
|
59
|
-
*
|
|
60
|
-
* // Start with dark mode
|
|
61
|
-
* function App() {
|
|
62
|
-
* return (
|
|
63
|
-
* <ThemeProvider defaultMode="dark">
|
|
64
|
-
* <YourApp />
|
|
65
|
-
* </ThemeProvider>
|
|
66
|
-
* );
|
|
67
|
-
* }
|
|
68
|
-
* ```
|
|
69
|
-
*
|
|
70
|
-
* @param {ThemeProviderProps} props - Component props
|
|
71
|
-
* @returns {JSX.Element} Provider component wrapping children with theme context
|
|
72
|
-
*
|
|
73
|
-
* @see {@link useTheme} for accessing theme in child components
|
|
74
|
-
* @see {@link useThemeMode} for optional theme access without error
|
|
75
|
-
*/
|
|
76
|
-
export declare function ThemeProvider({ children, defaultMode, }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
77
|
-
/**
|
|
78
|
-
* Hook to access theme context and controls
|
|
79
|
-
*
|
|
80
|
-
* Provides access to the current theme state and methods to change the theme.
|
|
81
|
-
* Must be used within a ThemeProvider component tree.
|
|
82
|
-
*
|
|
83
|
-
* @returns {ThemeContextType} Theme context object
|
|
84
|
-
* @throws {Error} If used outside of ThemeProvider
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
87
|
-
* ```tsx
|
|
88
|
-
* function MyComponent() {
|
|
89
|
-
* const { mode, isDark, setMode, colors } = useTheme();
|
|
90
|
-
*
|
|
91
|
-
* return (
|
|
92
|
-
* <View style={{ backgroundColor: colors.background }}>
|
|
93
|
-
* <Text style={{ color: colors.foreground }}>
|
|
94
|
-
* Current mode: {mode} (Dark: {isDark ? 'Yes' : 'No'})
|
|
95
|
-
* </Text>
|
|
96
|
-
* <Button onPress={() => setMode(isDark ? 'light' : 'dark')}>
|
|
97
|
-
* <Text>Toggle Theme</Text>
|
|
98
|
-
* </Button>
|
|
99
|
-
* </View>
|
|
100
|
-
* );
|
|
101
|
-
* }
|
|
102
|
-
* ```
|
|
103
|
-
*
|
|
104
|
-
* @see {@link ThemeProvider} for setup
|
|
105
|
-
* @see {@link useThemeMode} for optional access without error throwing
|
|
106
|
-
*/
|
|
107
|
-
export declare function useTheme(): ThemeContextType;
|
|
108
|
-
/**
|
|
109
|
-
* Optional hook to get current dark mode state
|
|
110
|
-
*
|
|
111
|
-
* Similar to useTheme but only returns the isDark boolean and doesn't throw
|
|
112
|
-
* an error if used outside ThemeProvider. Useful for components that want
|
|
113
|
-
* to adapt to theme but don't require it.
|
|
114
|
-
*
|
|
115
|
-
* @returns {boolean | undefined} Whether dark mode is active, or undefined if no provider
|
|
116
|
-
*
|
|
117
|
-
* @example
|
|
118
|
-
* ```tsx
|
|
119
|
-
* function OptionalThemedComponent() {
|
|
120
|
-
* const isDark = useThemeMode();
|
|
121
|
-
*
|
|
122
|
-
* // Component works with or without ThemeProvider
|
|
123
|
-
* const backgroundColor = isDark ? '#000' : '#fff';
|
|
124
|
-
*
|
|
125
|
-
* return (
|
|
126
|
-
* <View style={{ backgroundColor }}>
|
|
127
|
-
* <Text>This component adapts if theme is available</Text>
|
|
128
|
-
* </View>
|
|
129
|
-
* );
|
|
130
|
-
* }
|
|
131
|
-
* ```
|
|
132
|
-
*
|
|
133
|
-
* @see {@link useTheme} for full theme access (requires provider)
|
|
134
|
-
*/
|
|
135
|
-
export declare function useThemeMode(): boolean | undefined;
|
|
136
|
-
export {};
|
|
137
|
-
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/lib/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEpD;;;GAGG;AACH,KAAK,gBAAgB,GAAG;IACtB,iCAAiC;IACjC,IAAI,EAAE,SAAS,CAAC;IAChB,uFAAuF;IACvF,MAAM,EAAE,OAAO,CAAC;IAChB,wCAAwC;IACxC,OAAO,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACnC,8CAA8C;IAC9C,MAAM,EAAE,cAAc,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC;CAC9C,CAAC;AAMF;;GAEG;AACH,KAAK,kBAAkB,GAAG;IACxB,sDAAsD;IACtD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,WAAsB,GACvB,EAAE,kBAAkB,2CA6CpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,QAAQ,qBAMvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,YAAY,IAAI,OAAO,GAAG,SAAS,CAGlD"}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Corner Radius System
|
|
3
|
-
*
|
|
4
|
-
* Automatically calculates the appropriate corner radius based on element dimensions.
|
|
5
|
-
*
|
|
6
|
-
* Design Rule:
|
|
7
|
-
* - Elements < 80px height → 12px radius
|
|
8
|
-
* - Elements ≥ 80px height → 20px radius
|
|
9
|
-
* - All corners use 100% smoothing (Apple-style squircles)
|
|
10
|
-
*
|
|
11
|
-
* Examples:
|
|
12
|
-
* - Button (50px height) → 12px
|
|
13
|
-
* - Chip (24px height) → 12px
|
|
14
|
-
* - Checkbox (16px height) → 4px (special case for very small)
|
|
15
|
-
* - Small card (60px height) → 12px
|
|
16
|
-
* - Large card (200px height) → 20px
|
|
17
|
-
* - Dialog (400px height) → 20px
|
|
18
|
-
*/
|
|
19
|
-
/**
|
|
20
|
-
* Primitive radius values from your design system
|
|
21
|
-
* Your exact values: 0, 2, 4, 8, 12, 20, 24, 32, 48
|
|
22
|
-
*/
|
|
23
|
-
export declare const RADIUS: {
|
|
24
|
-
readonly R0: 0;
|
|
25
|
-
readonly R1: 2;
|
|
26
|
-
readonly R2: 4;
|
|
27
|
-
readonly R3: 8;
|
|
28
|
-
readonly R4: 12;
|
|
29
|
-
readonly R5: 20;
|
|
30
|
-
readonly R6: 24;
|
|
31
|
-
readonly R7: 32;
|
|
32
|
-
readonly R8: 48;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Calculate corner radius based on element height
|
|
36
|
-
*
|
|
37
|
-
* @param height - Element height in pixels
|
|
38
|
-
* @returns Corner radius in pixels
|
|
39
|
-
*
|
|
40
|
-
* @example
|
|
41
|
-
* ```tsx
|
|
42
|
-
* // Button (50px height)
|
|
43
|
-
* const radius = getRadiusForHeight(50); // Returns 12
|
|
44
|
-
*
|
|
45
|
-
* // Checkbox (16px height)
|
|
46
|
-
* const radius = getRadiusForHeight(16); // Returns 4
|
|
47
|
-
*
|
|
48
|
-
* // Card (160px height)
|
|
49
|
-
* const radius = getRadiusForHeight(160); // Returns 20
|
|
50
|
-
* ```
|
|
51
|
-
*/
|
|
52
|
-
export declare function getRadiusForHeight(height: number): number;
|
|
53
|
-
/**
|
|
54
|
-
* Calculate corner radius based on smallest dimension (width or height)
|
|
55
|
-
* Useful for square or nearly-square elements
|
|
56
|
-
*
|
|
57
|
-
* @param width - Element width in pixels
|
|
58
|
-
* @param height - Element height in pixels
|
|
59
|
-
* @returns Corner radius in pixels
|
|
60
|
-
*
|
|
61
|
-
* @example
|
|
62
|
-
* ```tsx
|
|
63
|
-
* // Square checkbox (16×16)
|
|
64
|
-
* const radius = getRadiusForDimensions(16, 16); // Returns 4
|
|
65
|
-
*
|
|
66
|
-
* // Wide button (200×50)
|
|
67
|
-
* const radius = getRadiusForDimensions(200, 50); // Returns 12 (based on height)
|
|
68
|
-
*
|
|
69
|
-
* // Tall card (300×200)
|
|
70
|
-
* const radius = getRadiusForDimensions(300, 200); // Returns 20 (based on width)
|
|
71
|
-
* ```
|
|
72
|
-
*/
|
|
73
|
-
export declare function getRadiusForDimensions(width: number, height: number): number;
|
|
74
|
-
/**
|
|
75
|
-
* Get corner radius with custom thresholds
|
|
76
|
-
* Advanced usage when you need different breakpoints
|
|
77
|
-
*
|
|
78
|
-
* @param height - Element height in pixels
|
|
79
|
-
* @param options - Custom threshold options
|
|
80
|
-
* @returns Corner radius in pixels
|
|
81
|
-
*
|
|
82
|
-
* @example
|
|
83
|
-
* ```tsx
|
|
84
|
-
* // Use 20px radius for elements ≥ 100px instead of 80px
|
|
85
|
-
* const radius = getCustomRadius(90, { largeThreshold: 100 });
|
|
86
|
-
* ```
|
|
87
|
-
*/
|
|
88
|
-
export declare function getCustomRadius(height: number, options?: {
|
|
89
|
-
tinyThreshold?: number;
|
|
90
|
-
smallThreshold?: number;
|
|
91
|
-
tinyRadius?: number;
|
|
92
|
-
smallRadius?: number;
|
|
93
|
-
largeRadius?: number;
|
|
94
|
-
}): number;
|
|
95
|
-
/**
|
|
96
|
-
* Corner smoothing value (0-1)
|
|
97
|
-
* 1.0 = 100% smoothing (Apple-style squircles)
|
|
98
|
-
*/
|
|
99
|
-
export declare const CORNER_SMOOTHING = 1;
|
|
100
|
-
/**
|
|
101
|
-
* Preset radius values for common use cases
|
|
102
|
-
* Use these when you know the exact size you want
|
|
103
|
-
*/
|
|
104
|
-
export declare const RADIUS_PRESET: {
|
|
105
|
-
readonly none: 0;
|
|
106
|
-
readonly tiny: 4;
|
|
107
|
-
readonly small: 12;
|
|
108
|
-
readonly large: 20;
|
|
109
|
-
readonly pill: 24;
|
|
110
|
-
readonly circle: 9999;
|
|
111
|
-
};
|
|
112
|
-
//# sourceMappingURL=cornerRadius.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cornerRadius.d.ts","sourceRoot":"","sources":["../../../../src/lib/cornerRadius.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;GAGG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;CAUT,CAAC;AAWX;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAUzD;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAG5E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE;IACR,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GACA,MAAM,CAkBR;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,IAAM,CAAC;AAEpC;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;;;CAOhB,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Font configuration for CampX Design System
|
|
3
|
-
*
|
|
4
|
-
* Fonts:
|
|
5
|
-
* - Poppins: Used for headings, buttons, labels, subtitles
|
|
6
|
-
* - Heebo: Used for body text, inputs, captions
|
|
7
|
-
*
|
|
8
|
-
* Weights:
|
|
9
|
-
* - 400 (Regular): Body text, labels, captions
|
|
10
|
-
* - 600 (Semi Bold): Subtitles, buttons, emphasized body
|
|
11
|
-
* - 800 (Extra Bold): Headings
|
|
12
|
-
*/
|
|
13
|
-
export declare const fonts: {
|
|
14
|
-
Poppins_400Regular: number;
|
|
15
|
-
Poppins_600SemiBold: number;
|
|
16
|
-
Poppins_800ExtraBold: number;
|
|
17
|
-
Heebo_400Regular: number;
|
|
18
|
-
Heebo_600SemiBold: number;
|
|
19
|
-
};
|
|
20
|
-
export type FontName = keyof typeof fonts;
|
|
21
|
-
//# sourceMappingURL=fonts.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../../../src/lib/fonts.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,KAAK;;;;;;CAMjB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,KAAK,CAAC"}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { type Theme } from '@react-navigation/native';
|
|
2
|
-
/**
|
|
3
|
-
* Custom theme colors based on your Figma design tokens
|
|
4
|
-
* Using your categorized color system:
|
|
5
|
-
* 1. Surfaces - Page and card backgrounds
|
|
6
|
-
* 2. Text - All text colors with opacity variants
|
|
7
|
-
* 3. Primary - Main buttons and CTAs
|
|
8
|
-
* 4. Secondary - Secondary buttons
|
|
9
|
-
* 5. Tertiary/Accent - Highlights and selections
|
|
10
|
-
* 6. Borders - All borders and dividers
|
|
11
|
-
* 7. Highlights - Status/semantic colors
|
|
12
|
-
* 8. Brand - Brand accent colors (use sparingly)
|
|
13
|
-
*/
|
|
14
|
-
export declare const THEME: {
|
|
15
|
-
light: {
|
|
16
|
-
background: string;
|
|
17
|
-
card: string;
|
|
18
|
-
popover: string;
|
|
19
|
-
muted: string;
|
|
20
|
-
foreground: string;
|
|
21
|
-
cardForeground: string;
|
|
22
|
-
popoverForeground: string;
|
|
23
|
-
mutedForeground: string;
|
|
24
|
-
primary: string;
|
|
25
|
-
primaryForeground: string;
|
|
26
|
-
secondary: string;
|
|
27
|
-
secondaryForeground: string;
|
|
28
|
-
accent: string;
|
|
29
|
-
accentForeground: string;
|
|
30
|
-
border: string;
|
|
31
|
-
input: string;
|
|
32
|
-
ring: string;
|
|
33
|
-
destructive: string;
|
|
34
|
-
destructiveForeground: string;
|
|
35
|
-
success: string;
|
|
36
|
-
info: string;
|
|
37
|
-
warning: string;
|
|
38
|
-
brand1: string;
|
|
39
|
-
brand2: string;
|
|
40
|
-
brand3: string;
|
|
41
|
-
chart1: string;
|
|
42
|
-
chart2: string;
|
|
43
|
-
chart3: string;
|
|
44
|
-
chart4: string;
|
|
45
|
-
chart5: string;
|
|
46
|
-
radius: string;
|
|
47
|
-
};
|
|
48
|
-
dark: {
|
|
49
|
-
background: string;
|
|
50
|
-
card: string;
|
|
51
|
-
popover: string;
|
|
52
|
-
muted: string;
|
|
53
|
-
foreground: string;
|
|
54
|
-
cardForeground: string;
|
|
55
|
-
popoverForeground: string;
|
|
56
|
-
mutedForeground: string;
|
|
57
|
-
primary: string;
|
|
58
|
-
primaryForeground: string;
|
|
59
|
-
secondary: string;
|
|
60
|
-
secondaryForeground: string;
|
|
61
|
-
accent: string;
|
|
62
|
-
accentForeground: string;
|
|
63
|
-
border: string;
|
|
64
|
-
input: string;
|
|
65
|
-
ring: string;
|
|
66
|
-
destructive: string;
|
|
67
|
-
destructiveForeground: string;
|
|
68
|
-
success: string;
|
|
69
|
-
info: string;
|
|
70
|
-
warning: string;
|
|
71
|
-
brand1: string;
|
|
72
|
-
brand2: string;
|
|
73
|
-
brand3: string;
|
|
74
|
-
chart1: string;
|
|
75
|
-
chart2: string;
|
|
76
|
-
chart3: string;
|
|
77
|
-
chart4: string;
|
|
78
|
-
chart5: string;
|
|
79
|
-
radius: string;
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
/**
|
|
83
|
-
* React Navigation theme configuration
|
|
84
|
-
* Maps our custom theme to React Navigation's theme structure
|
|
85
|
-
*/
|
|
86
|
-
export declare const NAV_THEME: Record<'light' | 'dark', Theme>;
|
|
87
|
-
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/lib/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAE/E;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyGjB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,OAAO,GAAG,MAAM,EAAE,KAAK,CAyBrD,CAAC"}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { type ClassValue } from 'clsx';
|
|
2
|
-
/**
|
|
3
|
-
* Utility function to merge Tailwind CSS classes with proper precedence
|
|
4
|
-
*
|
|
5
|
-
* Combines clsx (for conditional classes) and tailwind-merge (for deduplication)
|
|
6
|
-
* to create a single, optimized class string. Later classes override earlier ones.
|
|
7
|
-
*
|
|
8
|
-
* @param {...ClassValue[]} inputs - Class values to merge (strings, objects, arrays)
|
|
9
|
-
* @returns {string} Merged and deduplicated class string
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```tsx
|
|
13
|
-
* // Basic usage
|
|
14
|
-
* cn('px-2 py-1', 'px-4') // => 'py-1 px-4'
|
|
15
|
-
*
|
|
16
|
-
* // With conditionals
|
|
17
|
-
* cn('text-base', isDark && 'text-white', 'font-bold')
|
|
18
|
-
* // => 'text-base text-white font-bold' (if isDark is true)
|
|
19
|
-
*
|
|
20
|
-
* // With objects
|
|
21
|
-
* cn({
|
|
22
|
-
* 'bg-primary': isPrimary,
|
|
23
|
-
* 'bg-secondary': !isPrimary
|
|
24
|
-
* })
|
|
25
|
-
*
|
|
26
|
-
* // Common component pattern
|
|
27
|
-
* cn('base-classes', variant === 'large' && 'large-classes', className)
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
export declare function cn(...inputs: ClassValue[]): string;
|
|
31
|
-
/**
|
|
32
|
-
* Applies dark mode classes with optional runtime control
|
|
33
|
-
*
|
|
34
|
-
* Provides three modes of operation:
|
|
35
|
-
* 1. Static mode (darkMode undefined): Returns classes with `dark:` prefix for automatic switching
|
|
36
|
-
* 2. Dark mode (darkMode true): Strips `dark:` prefix and returns only dark classes
|
|
37
|
-
* 3. Light mode (darkMode false): Returns only base classes
|
|
38
|
-
*
|
|
39
|
-
* This function is useful when you need to programmatically control dark mode
|
|
40
|
-
* instead of relying on Tailwind's automatic dark mode detection.
|
|
41
|
-
*
|
|
42
|
-
* @param {string} baseClasses - Classes to apply in light mode
|
|
43
|
-
* @param {string} darkClasses - Classes to apply in dark mode (with or without `dark:` prefix)
|
|
44
|
-
* @param {boolean} [darkMode] - Optional dark mode override (true/false/undefined)
|
|
45
|
-
* @returns {string} Merged class string based on mode
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* ```tsx
|
|
49
|
-
* // Static mode - use Tailwind's automatic detection
|
|
50
|
-
* cnWithDark('bg-white', 'dark:bg-black')
|
|
51
|
-
* // => 'bg-white dark:bg-black'
|
|
52
|
-
*
|
|
53
|
-
* // Programmatic dark mode
|
|
54
|
-
* const { isDark } = useTheme();
|
|
55
|
-
* cnWithDark('bg-white', 'dark:bg-black', isDark)
|
|
56
|
-
* // => 'bg-black' (if isDark is true)
|
|
57
|
-
* // => 'bg-white' (if isDark is false)
|
|
58
|
-
*
|
|
59
|
-
* // With multiple classes
|
|
60
|
-
* cnWithDark(
|
|
61
|
-
* 'bg-white text-black border-gray-200',
|
|
62
|
-
* 'dark:bg-black dark:text-white dark:border-gray-800',
|
|
63
|
-
* isDark
|
|
64
|
-
* )
|
|
65
|
-
* ```
|
|
66
|
-
*
|
|
67
|
-
* @see {@link cn} for basic class merging
|
|
68
|
-
* @see {@link useTheme} for accessing theme state
|
|
69
|
-
*/
|
|
70
|
-
export declare function cnWithDark(baseClasses: string, darkClasses: string, darkMode?: boolean): string;
|
|
71
|
-
/**
|
|
72
|
-
* Get color value based on theme mode
|
|
73
|
-
*
|
|
74
|
-
* Simple utility to select between light and dark color values based on the
|
|
75
|
-
* current theme. Primarily used for native platforms where Tailwind CSS
|
|
76
|
-
* classes don't work with inline styles.
|
|
77
|
-
*
|
|
78
|
-
* @param {string} lightColor - Color value for light mode (CSS color, HSL, RGB, hex)
|
|
79
|
-
* @param {string} darkColor - Color value for dark mode (CSS color, HSL, RGB, hex)
|
|
80
|
-
* @param {boolean} [darkMode] - Whether dark mode is active (defaults to light if undefined)
|
|
81
|
-
* @returns {string} The appropriate color value for the current mode
|
|
82
|
-
*
|
|
83
|
-
* @example
|
|
84
|
-
* ```tsx
|
|
85
|
-
* import { useTheme } from './ThemeProvider';
|
|
86
|
-
*
|
|
87
|
-
* function MyComponent() {
|
|
88
|
-
* const { isDark } = useTheme();
|
|
89
|
-
*
|
|
90
|
-
* // Get color for inline styles
|
|
91
|
-
* const textColor = getThemeColor('#000000', '#ffffff', isDark);
|
|
92
|
-
* const bgColor = getThemeColor('hsl(0, 0%, 100%)', 'hsl(0, 0%, 10%)', isDark);
|
|
93
|
-
*
|
|
94
|
-
* return (
|
|
95
|
-
* <View style={{ backgroundColor: bgColor }}>
|
|
96
|
-
* <NativeText style={{ color: textColor }}>
|
|
97
|
-
* Theme-aware text
|
|
98
|
-
* </NativeText>
|
|
99
|
-
* </View>
|
|
100
|
-
* );
|
|
101
|
-
* }
|
|
102
|
-
*
|
|
103
|
-
* // Without theme context (defaults to light)
|
|
104
|
-
* const color = getThemeColor('#000', '#fff'); // => '#000'
|
|
105
|
-
* ```
|
|
106
|
-
*
|
|
107
|
-
* @see {@link useTheme} for accessing theme state
|
|
108
|
-
* @see {@link getThemeColorValue} from theme-config for more advanced usage
|
|
109
|
-
*/
|
|
110
|
-
export declare function getThemeColor(lightColor: string, darkColor: string, darkMode?: boolean): string;
|
|
111
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAG7C;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,UAAU,CACxB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE,OAAO,GACjB,MAAM,CAiBR;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,aAAa,CAC3B,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,OAAO,GACjB,MAAM,CAKR"}
|