@praxiis/ui 0.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/dist/index.d.mts +52556 -0
- package/dist/index.d.ts +52556 -0
- package/dist/index.js +8753 -0
- package/dist/index.mjs +8777 -0
- package/package.json +70 -0
- package/src/__test-utils__/index.tsx +39 -0
- package/src/components/CalendarStrip/CalendarStrip.helpers.ts +106 -0
- package/src/components/CalendarStrip/CalendarStrip.tsx +83 -0
- package/src/components/CalendarStrip/CalendarStrip.types.ts +133 -0
- package/src/components/CalendarStrip/DayCard/DayCard.helpers.ts +44 -0
- package/src/components/CalendarStrip/DayCard/DayCard.tsx +71 -0
- package/src/components/CalendarStrip/DayCard/DayCard.types.ts +134 -0
- package/src/components/CalendarStrip/DayCard/index.ts +2 -0
- package/src/components/CalendarStrip/DayCard/useDayCardLogic.ts +45 -0
- package/src/components/CalendarStrip/index.ts +9 -0
- package/src/components/CalendarStrip/useCalendarStripLogic.ts +53 -0
- package/src/components/EmptyState/EmptyState.helpers.ts +104 -0
- package/src/components/EmptyState/EmptyState.tsx +205 -0
- package/src/components/EmptyState/EmptyState.types.ts +213 -0
- package/src/components/EmptyState/index.ts +44 -0
- package/src/components/EmptyState/useEmptyStateLogic.ts +131 -0
- package/src/components/Header/Header.helpers.ts +93 -0
- package/src/components/Header/Header.tsx +185 -0
- package/src/components/Header/Header.types.ts +153 -0
- package/src/components/Header/index.ts +44 -0
- package/src/components/Header/useHeaderLogic.ts +146 -0
- package/src/components/ScheduleItem/ScheduleItem/ScheduleItem.helpers.ts +50 -0
- package/src/components/ScheduleItem/ScheduleItem/ScheduleItem.tsx +78 -0
- package/src/components/ScheduleItem/ScheduleItem/ScheduleItem.types.ts +99 -0
- package/src/components/ScheduleItem/ScheduleItem/index.ts +16 -0
- package/src/components/ScheduleItem/ScheduleItem/useScheduleItemLogic.ts +31 -0
- package/src/components/ScheduleItem/index.ts +15 -0
- package/src/components/index.ts +40 -0
- package/src/core/index.ts +34 -0
- package/src/core/restyle/RestyleThemeProviderWrapper.tsx +31 -0
- package/src/core/restyle/index.ts +38 -0
- package/src/core/restyle/restylePresetRegistry.ts +195 -0
- package/src/core/restyle/restyleTheme.ts +1352 -0
- package/src/core/restyle/restyleTypes.ts +8 -0
- package/src/core/restyle/useRestyleTheme.ts +10 -0
- package/src/hooks/animations/index.ts +3 -0
- package/src/hooks/animations/useAnimatedValue.ts +10 -0
- package/src/hooks/animations/useEntranceAnimation.ts +106 -0
- package/src/hooks/animations/usePulseAnimation.ts +63 -0
- package/src/hooks/index.ts +30 -0
- package/src/hooks/useReducedMotion.ts +60 -0
- package/src/i18n/index.ts +2 -0
- package/src/i18n/labels/en.ts +120 -0
- package/src/i18n/labels/es.ts +120 -0
- package/src/i18n/labels/index.ts +6 -0
- package/src/i18n/labels/types.ts +165 -0
- package/src/index.tsx +215 -0
- package/src/primitives/actions/Button/Button.helpers.ts +243 -0
- package/src/primitives/actions/Button/Button.tsx +198 -0
- package/src/primitives/actions/Button/Button.types.ts +207 -0
- package/src/primitives/actions/Button/index.ts +41 -0
- package/src/primitives/actions/Button/useButtonLogic.ts +160 -0
- package/src/primitives/actions/IconButton/IconButton.helpers.ts +235 -0
- package/src/primitives/actions/IconButton/IconButton.tsx +177 -0
- package/src/primitives/actions/IconButton/IconButton.types.ts +273 -0
- package/src/primitives/actions/IconButton/index.ts +30 -0
- package/src/primitives/actions/IconButton/useIconButtonLogic.ts +172 -0
- package/src/primitives/actions/index.ts +20 -0
- package/src/primitives/content/Avatar/Avatar.helpers.ts +177 -0
- package/src/primitives/content/Avatar/Avatar.tsx +199 -0
- package/src/primitives/content/Avatar/Avatar.types.ts +222 -0
- package/src/primitives/content/Avatar/index.ts +46 -0
- package/src/primitives/content/Avatar/useAvatarLogic.ts +149 -0
- package/src/primitives/content/Badge/Badge.helpers.ts +175 -0
- package/src/primitives/content/Badge/Badge.tsx +174 -0
- package/src/primitives/content/Badge/Badge.types.ts +223 -0
- package/src/primitives/content/Badge/index.ts +40 -0
- package/src/primitives/content/Badge/useBadgeLogic.ts +128 -0
- package/src/primitives/content/Card/Card.helpers.ts +27 -0
- package/src/primitives/content/Card/Card.tsx +123 -0
- package/src/primitives/content/Card/Card.types.ts +95 -0
- package/src/primitives/content/Card/index.ts +20 -0
- package/src/primitives/content/Card/useCardLogic.ts +48 -0
- package/src/primitives/content/Chip/Chip.helpers.ts +304 -0
- package/src/primitives/content/Chip/Chip.tsx +205 -0
- package/src/primitives/content/Chip/Chip.types.ts +234 -0
- package/src/primitives/content/Chip/index.ts +47 -0
- package/src/primitives/content/Chip/useChipLogic.ts +167 -0
- package/src/primitives/content/Icon/Icon.helpers.ts +54 -0
- package/src/primitives/content/Icon/Icon.tsx +110 -0
- package/src/primitives/content/Icon/Icon.types.ts +95 -0
- package/src/primitives/content/Icon/index.ts +20 -0
- package/src/primitives/content/Icon/useIconLogic.ts +73 -0
- package/src/primitives/content/index.ts +45 -0
- package/src/primitives/feedback/ProgressBar/ProgressBar.helpers.ts +122 -0
- package/src/primitives/feedback/ProgressBar/ProgressBar.tsx +154 -0
- package/src/primitives/feedback/ProgressBar/ProgressBar.types.ts +178 -0
- package/src/primitives/feedback/ProgressBar/index.ts +17 -0
- package/src/primitives/feedback/ProgressBar/useProgressBarLogic.ts +120 -0
- package/src/primitives/feedback/Skeleton/Skeleton.helpers.ts +145 -0
- package/src/primitives/feedback/Skeleton/Skeleton.tsx +155 -0
- package/src/primitives/feedback/Skeleton/Skeleton.types.ts +223 -0
- package/src/primitives/feedback/Skeleton/index.ts +44 -0
- package/src/primitives/feedback/Skeleton/useSkeletonLogic.ts +125 -0
- package/src/primitives/feedback/Spinner/Spinner.helpers.ts +40 -0
- package/src/primitives/feedback/Spinner/Spinner.tsx +105 -0
- package/src/primitives/feedback/Spinner/Spinner.types.ts +114 -0
- package/src/primitives/feedback/Spinner/index.ts +18 -0
- package/src/primitives/feedback/Spinner/useSpinnerLogic.ts +84 -0
- package/src/primitives/feedback/Toast/Toast.helpers.ts +163 -0
- package/src/primitives/feedback/Toast/Toast.tsx +190 -0
- package/src/primitives/feedback/Toast/Toast.types.ts +270 -0
- package/src/primitives/feedback/Toast/ToastContext.tsx +96 -0
- package/src/primitives/feedback/Toast/ToastProvider.tsx +241 -0
- package/src/primitives/feedback/Toast/index.ts +59 -0
- package/src/primitives/feedback/Toast/useToastLogic.ts +112 -0
- package/src/primitives/feedback/index.ts +45 -0
- package/src/primitives/index.ts +158 -0
- package/src/primitives/inputs/Checkbox/Checkbox.helpers.ts +132 -0
- package/src/primitives/inputs/Checkbox/Checkbox.tsx +150 -0
- package/src/primitives/inputs/Checkbox/Checkbox.types.ts +106 -0
- package/src/primitives/inputs/Checkbox/index.ts +30 -0
- package/src/primitives/inputs/Checkbox/useCheckboxLogic.ts +121 -0
- package/src/primitives/inputs/RadioButton/RadioButton.helpers.ts +123 -0
- package/src/primitives/inputs/RadioButton/RadioButton.tsx +159 -0
- package/src/primitives/inputs/RadioButton/RadioButton.types.ts +106 -0
- package/src/primitives/inputs/RadioButton/index.ts +25 -0
- package/src/primitives/inputs/RadioButton/useRadioButtonLogic.ts +117 -0
- package/src/primitives/inputs/SegmentedControl/SegmentedControl.helpers.ts +174 -0
- package/src/primitives/inputs/SegmentedControl/SegmentedControl.tsx +224 -0
- package/src/primitives/inputs/SegmentedControl/SegmentedControl.types.ts +187 -0
- package/src/primitives/inputs/SegmentedControl/index.ts +39 -0
- package/src/primitives/inputs/SegmentedControl/useSegmentedControlLogic.ts +151 -0
- package/src/primitives/inputs/SelectSheet/SelectSheet.helpers.ts +147 -0
- package/src/primitives/inputs/SelectSheet/SelectSheet.tsx +247 -0
- package/src/primitives/inputs/SelectSheet/SelectSheet.types.ts +196 -0
- package/src/primitives/inputs/SelectSheet/SelectSheetOption.tsx +177 -0
- package/src/primitives/inputs/SelectSheet/index.ts +48 -0
- package/src/primitives/inputs/SelectSheet/useSelectSheetLogic.ts +309 -0
- package/src/primitives/inputs/Switch/Switch.helpers.ts +109 -0
- package/src/primitives/inputs/Switch/Switch.tsx +191 -0
- package/src/primitives/inputs/Switch/Switch.types.ts +154 -0
- package/src/primitives/inputs/Switch/index.ts +40 -0
- package/src/primitives/inputs/Switch/useSwitchLogic.ts +192 -0
- package/src/primitives/inputs/TextInput/TextInput.helpers.ts +206 -0
- package/src/primitives/inputs/TextInput/TextInput.tsx +392 -0
- package/src/primitives/inputs/TextInput/TextInput.types.ts +216 -0
- package/src/primitives/inputs/TextInput/index.ts +37 -0
- package/src/primitives/inputs/TextInput/useTextInputLogic.ts +195 -0
- package/src/primitives/inputs/index.ts +52 -0
- package/src/primitives/layout/AnimatedBox.tsx +44 -0
- package/src/primitives/layout/Box.tsx +71 -0
- package/src/primitives/layout/Divider/Divider.helpers.ts +115 -0
- package/src/primitives/layout/Divider/Divider.tsx +139 -0
- package/src/primitives/layout/Divider/Divider.types.ts +178 -0
- package/src/primitives/layout/Divider/index.ts +24 -0
- package/src/primitives/layout/Divider/useDividerLogic.ts +109 -0
- package/src/primitives/layout/FlatList.tsx +66 -0
- package/src/primitives/layout/Pressable.tsx +74 -0
- package/src/primitives/layout/ScrollView.tsx +63 -0
- package/src/primitives/layout/Stack.tsx +69 -0
- package/src/primitives/layout/index.ts +40 -0
- package/src/primitives/navigation/index.ts +6 -0
- package/src/primitives/overlays/Modal/Modal.helpers.ts +31 -0
- package/src/primitives/overlays/Modal/Modal.tsx +264 -0
- package/src/primitives/overlays/Modal/Modal.types.ts +193 -0
- package/src/primitives/overlays/Modal/index.ts +43 -0
- package/src/primitives/overlays/Modal/useModalLogic.ts +103 -0
- package/src/primitives/overlays/index.ts +12 -0
- package/src/primitives/typography/Text.tsx +51 -0
- package/src/primitives/typography/index.ts +1 -0
- package/src/provider/DesignSystemContext.ts +22 -0
- package/src/provider/DesignSystemProvider.tsx +121 -0
- package/src/provider/index.ts +7 -0
- package/src/providers/ThemeProvider/createTheme.ts +304 -0
- package/src/providers/ThemeProvider/defaultTheme.ts +70 -0
- package/src/providers/ThemeProvider/index.ts +34 -0
- package/src/providers/ThemeProvider/types.ts +249 -0
- package/src/providers/index.ts +29 -0
- package/src/tokens/colors.ts +371 -0
- package/src/tokens/index.ts +145 -0
- package/src/tokens/motion.ts +176 -0
- package/src/tokens/radii.ts +82 -0
- package/src/tokens/scales.ts +588 -0
- package/src/tokens/shadows.ts +190 -0
- package/src/tokens/spacing.ts +140 -0
- package/src/tokens/tokens.json +207 -0
- package/src/tokens/typography.ts +251 -0
- package/src/types.ts +50 -0
- package/src/utils/accessibility.ts +169 -0
- package/src/utils/index.ts +25 -0
- package/src/utils/platform.ts +72 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* El Sendero Design System - Default Theme
|
|
3
|
+
*
|
|
4
|
+
* The El Sendero brand theme with warm brown accents
|
|
5
|
+
* and a calming, comforting aesthetic for anxiety companion app.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
lightSemanticColors,
|
|
10
|
+
darkSemanticColors,
|
|
11
|
+
fontFamily,
|
|
12
|
+
typographyPresets,
|
|
13
|
+
spacing,
|
|
14
|
+
radii,
|
|
15
|
+
elevation,
|
|
16
|
+
duration,
|
|
17
|
+
easing,
|
|
18
|
+
iconSize,
|
|
19
|
+
} from '../../tokens';
|
|
20
|
+
import { Theme, ThemeColors } from './types';
|
|
21
|
+
|
|
22
|
+
// =============================================================================
|
|
23
|
+
// LIGHT THEME
|
|
24
|
+
// =============================================================================
|
|
25
|
+
|
|
26
|
+
export const lightTheme: Theme = {
|
|
27
|
+
name: 'El Sendero',
|
|
28
|
+
mode: 'light',
|
|
29
|
+
colors: lightSemanticColors as ThemeColors,
|
|
30
|
+
typography: {
|
|
31
|
+
fontFamily,
|
|
32
|
+
presets: typographyPresets,
|
|
33
|
+
},
|
|
34
|
+
spacing,
|
|
35
|
+
radii,
|
|
36
|
+
elevation,
|
|
37
|
+
motion: {
|
|
38
|
+
duration,
|
|
39
|
+
easing,
|
|
40
|
+
},
|
|
41
|
+
iconSize,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
// =============================================================================
|
|
45
|
+
// DARK THEME
|
|
46
|
+
// =============================================================================
|
|
47
|
+
|
|
48
|
+
export const darkTheme: Theme = {
|
|
49
|
+
name: 'El Sendero',
|
|
50
|
+
mode: 'dark',
|
|
51
|
+
colors: darkSemanticColors as ThemeColors,
|
|
52
|
+
typography: {
|
|
53
|
+
fontFamily,
|
|
54
|
+
presets: typographyPresets,
|
|
55
|
+
},
|
|
56
|
+
spacing,
|
|
57
|
+
radii,
|
|
58
|
+
elevation,
|
|
59
|
+
motion: {
|
|
60
|
+
duration,
|
|
61
|
+
easing,
|
|
62
|
+
},
|
|
63
|
+
iconSize,
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
// =============================================================================
|
|
67
|
+
// DEFAULT EXPORT
|
|
68
|
+
// =============================================================================
|
|
69
|
+
|
|
70
|
+
export const defaultTheme = lightTheme;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme Provider Module
|
|
3
|
+
*
|
|
4
|
+
* Theming system types and theme factories.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// Types
|
|
8
|
+
export type {
|
|
9
|
+
Theme,
|
|
10
|
+
ThemeMode,
|
|
11
|
+
ThemeColors,
|
|
12
|
+
ThemeTypography,
|
|
13
|
+
ThemeElevation,
|
|
14
|
+
ThemeMotion,
|
|
15
|
+
ThemeOverrides,
|
|
16
|
+
TypographyStyle,
|
|
17
|
+
ShadowStyle,
|
|
18
|
+
DeepPartial,
|
|
19
|
+
} from './types';
|
|
20
|
+
|
|
21
|
+
// Default themes
|
|
22
|
+
export { lightTheme, darkTheme, defaultTheme } from './defaultTheme';
|
|
23
|
+
|
|
24
|
+
// Theme factory
|
|
25
|
+
export {
|
|
26
|
+
createTheme,
|
|
27
|
+
createThemePair,
|
|
28
|
+
horizonTheme,
|
|
29
|
+
sageTheme,
|
|
30
|
+
sunsetTheme,
|
|
31
|
+
oceanTheme,
|
|
32
|
+
lavenderTheme,
|
|
33
|
+
roseTheme,
|
|
34
|
+
} from './createTheme';
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StayEasy Design System - Theme Types
|
|
3
|
+
*
|
|
4
|
+
* Complete type definitions for the theming system.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { TextStyle, ViewStyle } from 'react-native';
|
|
8
|
+
|
|
9
|
+
// =============================================================================
|
|
10
|
+
// THEME MODE
|
|
11
|
+
// =============================================================================
|
|
12
|
+
|
|
13
|
+
export type ThemeMode = 'light' | 'dark' | 'system';
|
|
14
|
+
|
|
15
|
+
// =============================================================================
|
|
16
|
+
// COLOR TYPES
|
|
17
|
+
// =============================================================================
|
|
18
|
+
|
|
19
|
+
export interface ThemeColors {
|
|
20
|
+
background: {
|
|
21
|
+
primary: string;
|
|
22
|
+
secondary: string;
|
|
23
|
+
tertiary: string;
|
|
24
|
+
inverse: string;
|
|
25
|
+
};
|
|
26
|
+
surface: {
|
|
27
|
+
primary: string;
|
|
28
|
+
secondary: string;
|
|
29
|
+
elevated: string;
|
|
30
|
+
overlay: string;
|
|
31
|
+
};
|
|
32
|
+
text: {
|
|
33
|
+
primary: string;
|
|
34
|
+
secondary: string;
|
|
35
|
+
tertiary: string;
|
|
36
|
+
disabled: string;
|
|
37
|
+
inverse: string;
|
|
38
|
+
link: string;
|
|
39
|
+
};
|
|
40
|
+
border: {
|
|
41
|
+
default: string;
|
|
42
|
+
subtle: string;
|
|
43
|
+
strong: string;
|
|
44
|
+
focus: string;
|
|
45
|
+
};
|
|
46
|
+
accent: {
|
|
47
|
+
primary: string;
|
|
48
|
+
primaryHover: string;
|
|
49
|
+
primaryPressed: string;
|
|
50
|
+
secondary: string;
|
|
51
|
+
secondaryHover: string;
|
|
52
|
+
secondaryPressed: string;
|
|
53
|
+
};
|
|
54
|
+
interactive: {
|
|
55
|
+
default: string;
|
|
56
|
+
hover: string;
|
|
57
|
+
pressed: string;
|
|
58
|
+
disabled: string;
|
|
59
|
+
};
|
|
60
|
+
feedback: {
|
|
61
|
+
success: string;
|
|
62
|
+
successLight: string;
|
|
63
|
+
successDark: string;
|
|
64
|
+
warning: string;
|
|
65
|
+
warningLight: string;
|
|
66
|
+
warningDark: string;
|
|
67
|
+
error: string;
|
|
68
|
+
errorLight: string;
|
|
69
|
+
errorDark: string;
|
|
70
|
+
info: string;
|
|
71
|
+
infoLight: string;
|
|
72
|
+
infoDark: string;
|
|
73
|
+
};
|
|
74
|
+
special: {
|
|
75
|
+
skeleton: string;
|
|
76
|
+
divider: string;
|
|
77
|
+
scrim: string;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// =============================================================================
|
|
82
|
+
// TYPOGRAPHY TYPES
|
|
83
|
+
// =============================================================================
|
|
84
|
+
|
|
85
|
+
export interface TypographyStyle {
|
|
86
|
+
fontSize: number;
|
|
87
|
+
lineHeight: number;
|
|
88
|
+
fontWeight: TextStyle['fontWeight'];
|
|
89
|
+
letterSpacing: number;
|
|
90
|
+
textTransform?: TextStyle['textTransform'];
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface ThemeTypography {
|
|
94
|
+
fontFamily: {
|
|
95
|
+
regular: string;
|
|
96
|
+
medium: string;
|
|
97
|
+
semibold: string;
|
|
98
|
+
bold: string;
|
|
99
|
+
mono: string;
|
|
100
|
+
};
|
|
101
|
+
presets: {
|
|
102
|
+
displayLarge: TypographyStyle;
|
|
103
|
+
displayMedium: TypographyStyle;
|
|
104
|
+
displaySmall: TypographyStyle;
|
|
105
|
+
headingLarge: TypographyStyle;
|
|
106
|
+
headingMedium: TypographyStyle;
|
|
107
|
+
headingSmall: TypographyStyle;
|
|
108
|
+
bodyLarge: TypographyStyle;
|
|
109
|
+
bodyMedium: TypographyStyle;
|
|
110
|
+
bodySmall: TypographyStyle;
|
|
111
|
+
labelLarge: TypographyStyle;
|
|
112
|
+
labelMedium: TypographyStyle;
|
|
113
|
+
labelSmall: TypographyStyle;
|
|
114
|
+
caption: TypographyStyle;
|
|
115
|
+
captionSmall: TypographyStyle;
|
|
116
|
+
overline: TypographyStyle;
|
|
117
|
+
code: TypographyStyle;
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// =============================================================================
|
|
122
|
+
// SHADOW TYPES
|
|
123
|
+
// =============================================================================
|
|
124
|
+
|
|
125
|
+
export type ShadowStyle = Pick<
|
|
126
|
+
ViewStyle,
|
|
127
|
+
'shadowColor' | 'shadowOffset' | 'shadowOpacity' | 'shadowRadius' | 'elevation'
|
|
128
|
+
>;
|
|
129
|
+
|
|
130
|
+
export interface ThemeElevation {
|
|
131
|
+
none: ShadowStyle;
|
|
132
|
+
xs: ShadowStyle;
|
|
133
|
+
sm: ShadowStyle;
|
|
134
|
+
md: ShadowStyle;
|
|
135
|
+
lg: ShadowStyle;
|
|
136
|
+
xl: ShadowStyle;
|
|
137
|
+
'2xl': ShadowStyle;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// =============================================================================
|
|
141
|
+
// MOTION TYPES
|
|
142
|
+
// =============================================================================
|
|
143
|
+
|
|
144
|
+
export interface ThemeMotion {
|
|
145
|
+
duration: {
|
|
146
|
+
instant: number;
|
|
147
|
+
fastest: number;
|
|
148
|
+
fast: number;
|
|
149
|
+
normal: number;
|
|
150
|
+
slow: number;
|
|
151
|
+
slower: number;
|
|
152
|
+
slowest: number;
|
|
153
|
+
};
|
|
154
|
+
easing: {
|
|
155
|
+
standard: readonly [number, number, number, number];
|
|
156
|
+
entrance: readonly [number, number, number, number];
|
|
157
|
+
exit: readonly [number, number, number, number];
|
|
158
|
+
emphasized: readonly [number, number, number, number];
|
|
159
|
+
linear: readonly [number, number, number, number];
|
|
160
|
+
spring: readonly [number, number, number, number];
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// =============================================================================
|
|
165
|
+
// COMPLETE THEME TYPE
|
|
166
|
+
// =============================================================================
|
|
167
|
+
|
|
168
|
+
export interface Theme {
|
|
169
|
+
/** Theme identifier */
|
|
170
|
+
name: string;
|
|
171
|
+
|
|
172
|
+
/** Current color mode */
|
|
173
|
+
mode: 'light' | 'dark';
|
|
174
|
+
|
|
175
|
+
/** Semantic colors */
|
|
176
|
+
colors: ThemeColors;
|
|
177
|
+
|
|
178
|
+
/** Typography system */
|
|
179
|
+
typography: ThemeTypography;
|
|
180
|
+
|
|
181
|
+
/** Spacing scale */
|
|
182
|
+
spacing: {
|
|
183
|
+
none: number;
|
|
184
|
+
'2xs': number;
|
|
185
|
+
xs: number;
|
|
186
|
+
sm: number;
|
|
187
|
+
md: number;
|
|
188
|
+
lg: number;
|
|
189
|
+
xl: number;
|
|
190
|
+
'2xl': number;
|
|
191
|
+
'3xl': number;
|
|
192
|
+
'4xl': number;
|
|
193
|
+
'5xl': number;
|
|
194
|
+
'6xl': number;
|
|
195
|
+
'7xl': number;
|
|
196
|
+
'8xl': number;
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
/** Border radii */
|
|
200
|
+
radii: {
|
|
201
|
+
none: number;
|
|
202
|
+
xs: number;
|
|
203
|
+
sm: number;
|
|
204
|
+
md: number;
|
|
205
|
+
lg: number;
|
|
206
|
+
xl: number;
|
|
207
|
+
'2xl': number;
|
|
208
|
+
'3xl': number;
|
|
209
|
+
full: number;
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
/** Elevation/shadows */
|
|
213
|
+
elevation: ThemeElevation;
|
|
214
|
+
|
|
215
|
+
/** Motion tokens */
|
|
216
|
+
motion: ThemeMotion;
|
|
217
|
+
|
|
218
|
+
/** Icon sizes */
|
|
219
|
+
iconSize: {
|
|
220
|
+
xs: number;
|
|
221
|
+
sm: number;
|
|
222
|
+
md: number;
|
|
223
|
+
lg: number;
|
|
224
|
+
xl: number;
|
|
225
|
+
'2xl': number;
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// =============================================================================
|
|
230
|
+
// THEME OVERRIDE TYPES
|
|
231
|
+
// =============================================================================
|
|
232
|
+
|
|
233
|
+
export type DeepPartial<T> = {
|
|
234
|
+
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
export type ThemeOverrides = DeepPartial<Theme>;
|
|
238
|
+
|
|
239
|
+
// =============================================================================
|
|
240
|
+
// THEME CONTEXT TYPES
|
|
241
|
+
// =============================================================================
|
|
242
|
+
|
|
243
|
+
export interface ThemeContextValue {
|
|
244
|
+
theme: Theme;
|
|
245
|
+
mode: ThemeMode;
|
|
246
|
+
setMode: (mode: ThemeMode) => void;
|
|
247
|
+
isDark: boolean;
|
|
248
|
+
toggleMode: () => void;
|
|
249
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Providers Module
|
|
3
|
+
*
|
|
4
|
+
* Theme types and factories for the design system.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
createTheme,
|
|
9
|
+
createThemePair,
|
|
10
|
+
horizonTheme,
|
|
11
|
+
sageTheme,
|
|
12
|
+
sunsetTheme,
|
|
13
|
+
oceanTheme,
|
|
14
|
+
lavenderTheme,
|
|
15
|
+
roseTheme,
|
|
16
|
+
lightTheme,
|
|
17
|
+
darkTheme,
|
|
18
|
+
defaultTheme,
|
|
19
|
+
type Theme,
|
|
20
|
+
type ThemeMode,
|
|
21
|
+
type ThemeColors,
|
|
22
|
+
type ThemeTypography,
|
|
23
|
+
type ThemeElevation,
|
|
24
|
+
type ThemeMotion,
|
|
25
|
+
type ThemeOverrides,
|
|
26
|
+
type TypographyStyle,
|
|
27
|
+
type ShadowStyle,
|
|
28
|
+
type DeepPartial,
|
|
29
|
+
} from './ThemeProvider';
|