@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,371 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MiTiendita Design System - Color Tokens
|
|
3
|
+
*
|
|
4
|
+
* Color philosophy:
|
|
5
|
+
* - Vibrant blue as primary for trust and action
|
|
6
|
+
* - Pink/red accent for energy and highlights
|
|
7
|
+
* - Clean neutral grays for professional feel
|
|
8
|
+
* - Designed for modern e-commerce/retail app
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* // Use semantic tokens, not base colors
|
|
12
|
+
* backgroundColor: theme.colors.surface.primary
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
// =============================================================================
|
|
16
|
+
// BASE COLORS (Primitives)
|
|
17
|
+
// These are implementation details. Prefer semantic tokens in components.
|
|
18
|
+
// =============================================================================
|
|
19
|
+
|
|
20
|
+
export const baseColors = {
|
|
21
|
+
// Transparent
|
|
22
|
+
transparent: 'transparent',
|
|
23
|
+
|
|
24
|
+
// Pure white/black
|
|
25
|
+
white: '#FFFFFF',
|
|
26
|
+
black: '#000000',
|
|
27
|
+
|
|
28
|
+
// Blue (Primary) - Trust, action, tech-forward
|
|
29
|
+
blue: {
|
|
30
|
+
50: '#E6F0FE',
|
|
31
|
+
100: '#CCE1FD',
|
|
32
|
+
200: '#99C3FB',
|
|
33
|
+
300: '#66A5F9',
|
|
34
|
+
400: '#348AF9',
|
|
35
|
+
500: '#016DF7', // Primary blue
|
|
36
|
+
600: '#0158C6',
|
|
37
|
+
700: '#014294',
|
|
38
|
+
800: '#002C63',
|
|
39
|
+
900: '#001631',
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
// Pink/Red (Accent) - Energy, highlights, CTAs
|
|
43
|
+
pink: {
|
|
44
|
+
50: '#FFE8EC',
|
|
45
|
+
100: '#FFD1D9',
|
|
46
|
+
200: '#FFA3B3',
|
|
47
|
+
300: '#FF758E',
|
|
48
|
+
400: '#FF4768',
|
|
49
|
+
500: '#FF375F', // Primary pink/red
|
|
50
|
+
600: '#CC2C4C',
|
|
51
|
+
700: '#992139',
|
|
52
|
+
800: '#661626',
|
|
53
|
+
900: '#330B13',
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
// Yellow (Warning/Accent) - Attention, highlights
|
|
57
|
+
yellow: {
|
|
58
|
+
50: '#FFF8E6',
|
|
59
|
+
100: '#FEF1CC',
|
|
60
|
+
200: '#FDE399',
|
|
61
|
+
300: '#FCD566',
|
|
62
|
+
400: '#FBC733',
|
|
63
|
+
500: '#FBBC04', // Primary yellow
|
|
64
|
+
600: '#C99603',
|
|
65
|
+
700: '#977102',
|
|
66
|
+
800: '#644B01',
|
|
67
|
+
900: '#322601',
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
// Green (Success) - Positive, confirmation
|
|
71
|
+
green: {
|
|
72
|
+
50: '#E7F9EC',
|
|
73
|
+
100: '#CFF3D9',
|
|
74
|
+
200: '#9FE7B3',
|
|
75
|
+
300: '#6FDB8D',
|
|
76
|
+
400: '#3FCF67',
|
|
77
|
+
500: '#35C759', // Primary green
|
|
78
|
+
600: '#2A9F47',
|
|
79
|
+
700: '#207735',
|
|
80
|
+
800: '#155024',
|
|
81
|
+
900: '#0B2812',
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
// Orange (Secondary accent) - Warmth, energy
|
|
85
|
+
orange: {
|
|
86
|
+
50: '#FFF0E9',
|
|
87
|
+
100: '#FFE1D3',
|
|
88
|
+
200: '#FFC3A7',
|
|
89
|
+
300: '#FFA57B',
|
|
90
|
+
400: '#FF874F',
|
|
91
|
+
500: '#FF6838', // Primary orange
|
|
92
|
+
600: '#CC532D',
|
|
93
|
+
700: '#993E22',
|
|
94
|
+
800: '#662A16',
|
|
95
|
+
900: '#33150B',
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
// Amber (Alternative warning)
|
|
99
|
+
amber: {
|
|
100
|
+
50: '#FEF5E6',
|
|
101
|
+
100: '#FDEBCC',
|
|
102
|
+
200: '#FBD799',
|
|
103
|
+
300: '#F9C366',
|
|
104
|
+
400: '#F7AF33',
|
|
105
|
+
500: '#F29423', // Primary amber
|
|
106
|
+
600: '#C2771C',
|
|
107
|
+
700: '#915915',
|
|
108
|
+
800: '#613C0E',
|
|
109
|
+
900: '#301E07',
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
// Red (Error) - Alerts, errors
|
|
113
|
+
red: {
|
|
114
|
+
50: '#FEE9EA',
|
|
115
|
+
100: '#FDD3D5',
|
|
116
|
+
200: '#FBA7AB',
|
|
117
|
+
300: '#F97B81',
|
|
118
|
+
400: '#F74F57',
|
|
119
|
+
500: '#F94545', // Primary red
|
|
120
|
+
600: '#C73737',
|
|
121
|
+
700: '#952929',
|
|
122
|
+
800: '#641C1C',
|
|
123
|
+
900: '#320E0E',
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
// Purple (Decorative) - Premium, special
|
|
127
|
+
purple: {
|
|
128
|
+
50: '#F0E7FB',
|
|
129
|
+
100: '#E1CFF7',
|
|
130
|
+
200: '#C39FEF',
|
|
131
|
+
300: '#A56FE7',
|
|
132
|
+
400: '#873FDF',
|
|
133
|
+
500: '#6218D1', // Primary purple
|
|
134
|
+
600: '#4E13A7',
|
|
135
|
+
700: '#3B0E7D',
|
|
136
|
+
800: '#270954',
|
|
137
|
+
900: '#14052A',
|
|
138
|
+
},
|
|
139
|
+
|
|
140
|
+
// Cyan (Info/Accent) - Fresh, informative
|
|
141
|
+
cyan: {
|
|
142
|
+
50: '#E6F9FF',
|
|
143
|
+
100: '#CCF3FF',
|
|
144
|
+
200: '#99E7FF',
|
|
145
|
+
300: '#66DBFF',
|
|
146
|
+
400: '#33CFFF',
|
|
147
|
+
500: '#06C1FF', // Primary cyan
|
|
148
|
+
600: '#059ACC',
|
|
149
|
+
700: '#047499',
|
|
150
|
+
800: '#024D66',
|
|
151
|
+
900: '#012733',
|
|
152
|
+
},
|
|
153
|
+
|
|
154
|
+
// Deep Purple (Special) - Premium dark accent
|
|
155
|
+
deepPurple: {
|
|
156
|
+
50: '#EBEAF0',
|
|
157
|
+
100: '#D7D5E1',
|
|
158
|
+
200: '#AFABC3',
|
|
159
|
+
300: '#8781A5',
|
|
160
|
+
400: '#5F5787',
|
|
161
|
+
500: '#332C68', // Primary deep purple
|
|
162
|
+
600: '#292353',
|
|
163
|
+
700: '#1F1A3E',
|
|
164
|
+
800: '#14112A',
|
|
165
|
+
900: '#0A0915',
|
|
166
|
+
},
|
|
167
|
+
|
|
168
|
+
// Neutral Grays - Clean, professional
|
|
169
|
+
gray: {
|
|
170
|
+
50: '#F5F5F5',
|
|
171
|
+
100: '#E6E6E6',
|
|
172
|
+
200: '#CCCCCC',
|
|
173
|
+
300: '#B3B3B3',
|
|
174
|
+
400: '#909090',
|
|
175
|
+
500: '#6B6B6B',
|
|
176
|
+
600: '#555555',
|
|
177
|
+
700: '#333333',
|
|
178
|
+
800: '#292929',
|
|
179
|
+
900: '#202020',
|
|
180
|
+
},
|
|
181
|
+
} as const;
|
|
182
|
+
|
|
183
|
+
// =============================================================================
|
|
184
|
+
// SEMANTIC COLORS - LIGHT THEME
|
|
185
|
+
// Clean, modern palette for e-commerce app
|
|
186
|
+
// =============================================================================
|
|
187
|
+
|
|
188
|
+
export const lightSemanticColors = {
|
|
189
|
+
// Backgrounds - Clean white/light gray
|
|
190
|
+
background: {
|
|
191
|
+
primary: baseColors.white,
|
|
192
|
+
secondary: baseColors.gray[50],
|
|
193
|
+
tertiary: baseColors.gray[100],
|
|
194
|
+
inverse: baseColors.gray[900],
|
|
195
|
+
},
|
|
196
|
+
|
|
197
|
+
// Surfaces (cards, modals, sheets)
|
|
198
|
+
surface: {
|
|
199
|
+
primary: baseColors.white,
|
|
200
|
+
secondary: baseColors.gray[50],
|
|
201
|
+
elevated: baseColors.white,
|
|
202
|
+
overlay: 'rgba(32, 32, 32, 0.5)',
|
|
203
|
+
},
|
|
204
|
+
|
|
205
|
+
// Text
|
|
206
|
+
text: {
|
|
207
|
+
primary: baseColors.gray[900],
|
|
208
|
+
secondary: baseColors.gray[600],
|
|
209
|
+
tertiary: baseColors.gray[500],
|
|
210
|
+
disabled: baseColors.gray[400],
|
|
211
|
+
inverse: baseColors.white,
|
|
212
|
+
link: baseColors.blue[500],
|
|
213
|
+
},
|
|
214
|
+
|
|
215
|
+
// Borders
|
|
216
|
+
border: {
|
|
217
|
+
default: baseColors.gray[200],
|
|
218
|
+
subtle: baseColors.gray[100],
|
|
219
|
+
strong: baseColors.gray[300],
|
|
220
|
+
focus: baseColors.blue[500],
|
|
221
|
+
},
|
|
222
|
+
|
|
223
|
+
// Accent (interactive elements)
|
|
224
|
+
accent: {
|
|
225
|
+
primary: baseColors.blue[500],
|
|
226
|
+
primaryHover: baseColors.blue[600],
|
|
227
|
+
primaryPressed: baseColors.blue[700],
|
|
228
|
+
secondary: baseColors.pink[500],
|
|
229
|
+
secondaryHover: baseColors.pink[600],
|
|
230
|
+
secondaryPressed: baseColors.pink[700],
|
|
231
|
+
},
|
|
232
|
+
|
|
233
|
+
// Interactive states
|
|
234
|
+
interactive: {
|
|
235
|
+
default: baseColors.gray[100],
|
|
236
|
+
hover: baseColors.gray[200],
|
|
237
|
+
pressed: baseColors.gray[300],
|
|
238
|
+
disabled: baseColors.gray[200],
|
|
239
|
+
},
|
|
240
|
+
|
|
241
|
+
// Feedback colors
|
|
242
|
+
feedback: {
|
|
243
|
+
success: baseColors.green[500],
|
|
244
|
+
successLight: baseColors.green[50],
|
|
245
|
+
successDark: baseColors.green[700],
|
|
246
|
+
warning: baseColors.yellow[500],
|
|
247
|
+
warningLight: baseColors.yellow[50],
|
|
248
|
+
warningDark: baseColors.yellow[700],
|
|
249
|
+
error: baseColors.red[500],
|
|
250
|
+
errorLight: baseColors.red[50],
|
|
251
|
+
errorDark: baseColors.red[700],
|
|
252
|
+
info: baseColors.cyan[500],
|
|
253
|
+
infoLight: baseColors.cyan[50],
|
|
254
|
+
infoDark: baseColors.cyan[700],
|
|
255
|
+
},
|
|
256
|
+
|
|
257
|
+
// Special
|
|
258
|
+
special: {
|
|
259
|
+
skeleton: baseColors.gray[200],
|
|
260
|
+
divider: baseColors.gray[200],
|
|
261
|
+
scrim: 'rgba(32, 32, 32, 0.4)',
|
|
262
|
+
},
|
|
263
|
+
|
|
264
|
+
// Emotion colors (for mood tracking / product categories)
|
|
265
|
+
emotion: {
|
|
266
|
+
happy: baseColors.yellow[400],
|
|
267
|
+
calm: baseColors.cyan[300],
|
|
268
|
+
neutral: baseColors.gray[400],
|
|
269
|
+
sad: baseColors.blue[300],
|
|
270
|
+
anxious: baseColors.orange[400],
|
|
271
|
+
angry: baseColors.red[500],
|
|
272
|
+
overwhelmed: baseColors.purple[400],
|
|
273
|
+
},
|
|
274
|
+
} as const;
|
|
275
|
+
|
|
276
|
+
// =============================================================================
|
|
277
|
+
// SEMANTIC COLORS - DARK THEME
|
|
278
|
+
// Professional deep-gray/charcoal backgrounds with vibrant accents
|
|
279
|
+
// =============================================================================
|
|
280
|
+
|
|
281
|
+
export const darkSemanticColors = {
|
|
282
|
+
// Backgrounds - Deep charcoal grays
|
|
283
|
+
background: {
|
|
284
|
+
primary: baseColors.gray[900], // #202020
|
|
285
|
+
secondary: baseColors.gray[800], // #292929
|
|
286
|
+
tertiary: baseColors.gray[700], // #333333
|
|
287
|
+
inverse: baseColors.white,
|
|
288
|
+
},
|
|
289
|
+
|
|
290
|
+
// Surfaces
|
|
291
|
+
surface: {
|
|
292
|
+
primary: baseColors.gray[800],
|
|
293
|
+
secondary: baseColors.gray[700],
|
|
294
|
+
elevated: baseColors.gray[700],
|
|
295
|
+
overlay: 'rgba(0, 0, 0, 0.7)',
|
|
296
|
+
},
|
|
297
|
+
|
|
298
|
+
// Text
|
|
299
|
+
text: {
|
|
300
|
+
primary: baseColors.white,
|
|
301
|
+
secondary: baseColors.gray[300],
|
|
302
|
+
tertiary: baseColors.gray[400],
|
|
303
|
+
disabled: baseColors.gray[500],
|
|
304
|
+
inverse: baseColors.gray[900],
|
|
305
|
+
link: baseColors.blue[400],
|
|
306
|
+
},
|
|
307
|
+
|
|
308
|
+
// Borders
|
|
309
|
+
border: {
|
|
310
|
+
default: baseColors.gray[700],
|
|
311
|
+
subtle: baseColors.gray[800],
|
|
312
|
+
strong: baseColors.gray[600],
|
|
313
|
+
focus: baseColors.blue[400],
|
|
314
|
+
},
|
|
315
|
+
|
|
316
|
+
// Accent - Brand colors for dark mode
|
|
317
|
+
accent: {
|
|
318
|
+
primary: baseColors.blue[400],
|
|
319
|
+
primaryHover: baseColors.blue[300],
|
|
320
|
+
primaryPressed: baseColors.blue[500],
|
|
321
|
+
secondary: baseColors.pink[400],
|
|
322
|
+
secondaryHover: baseColors.pink[300],
|
|
323
|
+
secondaryPressed: baseColors.pink[500],
|
|
324
|
+
},
|
|
325
|
+
|
|
326
|
+
// Interactive states
|
|
327
|
+
interactive: {
|
|
328
|
+
default: baseColors.gray[700],
|
|
329
|
+
hover: baseColors.gray[600],
|
|
330
|
+
pressed: baseColors.gray[500],
|
|
331
|
+
disabled: baseColors.gray[700],
|
|
332
|
+
},
|
|
333
|
+
|
|
334
|
+
// Feedback colors
|
|
335
|
+
feedback: {
|
|
336
|
+
success: baseColors.green[400],
|
|
337
|
+
successLight: 'rgba(53, 199, 89, 0.15)',
|
|
338
|
+
successDark: baseColors.green[300],
|
|
339
|
+
warning: baseColors.yellow[400],
|
|
340
|
+
warningLight: 'rgba(251, 188, 4, 0.15)',
|
|
341
|
+
warningDark: baseColors.yellow[300],
|
|
342
|
+
error: baseColors.red[400],
|
|
343
|
+
errorLight: 'rgba(249, 69, 69, 0.15)',
|
|
344
|
+
errorDark: baseColors.red[300],
|
|
345
|
+
info: baseColors.cyan[400],
|
|
346
|
+
infoLight: 'rgba(6, 193, 255, 0.15)',
|
|
347
|
+
infoDark: baseColors.cyan[300],
|
|
348
|
+
},
|
|
349
|
+
|
|
350
|
+
// Special
|
|
351
|
+
special: {
|
|
352
|
+
skeleton: baseColors.gray[600],
|
|
353
|
+
divider: baseColors.gray[700],
|
|
354
|
+
scrim: 'rgba(0, 0, 0, 0.6)',
|
|
355
|
+
},
|
|
356
|
+
|
|
357
|
+
// Emotion colors (for mood tracking / product categories)
|
|
358
|
+
emotion: {
|
|
359
|
+
happy: baseColors.yellow[400],
|
|
360
|
+
calm: baseColors.cyan[400],
|
|
361
|
+
neutral: baseColors.gray[500],
|
|
362
|
+
sad: baseColors.blue[400],
|
|
363
|
+
anxious: baseColors.orange[400],
|
|
364
|
+
angry: baseColors.red[400],
|
|
365
|
+
overwhelmed: baseColors.purple[400],
|
|
366
|
+
},
|
|
367
|
+
} as const;
|
|
368
|
+
|
|
369
|
+
// Type exports
|
|
370
|
+
export type BaseColors = typeof baseColors;
|
|
371
|
+
export type SemanticColors = typeof lightSemanticColors;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StayEasy Design System - Token Exports
|
|
3
|
+
*
|
|
4
|
+
* This barrel file exports all design tokens for easy importing.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* import { baseColors, spacing, radii } from '@/design-system/tokens';
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
// Colors
|
|
11
|
+
export {
|
|
12
|
+
baseColors,
|
|
13
|
+
lightSemanticColors,
|
|
14
|
+
darkSemanticColors,
|
|
15
|
+
type BaseColors,
|
|
16
|
+
type SemanticColors,
|
|
17
|
+
} from './colors';
|
|
18
|
+
|
|
19
|
+
// Typography
|
|
20
|
+
export {
|
|
21
|
+
fontFamily,
|
|
22
|
+
fontWeight,
|
|
23
|
+
fontSize,
|
|
24
|
+
lineHeight,
|
|
25
|
+
lineHeightValues,
|
|
26
|
+
letterSpacing,
|
|
27
|
+
typographyPresets,
|
|
28
|
+
type FontFamily,
|
|
29
|
+
type FontWeight,
|
|
30
|
+
type FontSize,
|
|
31
|
+
type TypographyPresets,
|
|
32
|
+
type TypographyVariant,
|
|
33
|
+
} from './typography';
|
|
34
|
+
|
|
35
|
+
// Spacing
|
|
36
|
+
export {
|
|
37
|
+
spacing,
|
|
38
|
+
semanticSpacing,
|
|
39
|
+
touchTarget,
|
|
40
|
+
hitSlop,
|
|
41
|
+
type Spacing,
|
|
42
|
+
type SemanticSpacing,
|
|
43
|
+
type SpacingKey,
|
|
44
|
+
} from './spacing';
|
|
45
|
+
|
|
46
|
+
// Radii
|
|
47
|
+
export {
|
|
48
|
+
radii,
|
|
49
|
+
semanticRadii,
|
|
50
|
+
type Radii,
|
|
51
|
+
type RadiiKey,
|
|
52
|
+
} from './radii';
|
|
53
|
+
|
|
54
|
+
// Shadows & Elevation
|
|
55
|
+
export {
|
|
56
|
+
elevation,
|
|
57
|
+
semanticElevation,
|
|
58
|
+
opacity,
|
|
59
|
+
zIndex,
|
|
60
|
+
type Elevation,
|
|
61
|
+
type ElevationKey,
|
|
62
|
+
type Opacity,
|
|
63
|
+
type ZIndex,
|
|
64
|
+
} from './shadows';
|
|
65
|
+
|
|
66
|
+
// Motion
|
|
67
|
+
export {
|
|
68
|
+
duration,
|
|
69
|
+
easing,
|
|
70
|
+
semanticMotion,
|
|
71
|
+
springConfig,
|
|
72
|
+
type Duration,
|
|
73
|
+
type DurationKey,
|
|
74
|
+
type Easing,
|
|
75
|
+
type EasingKey,
|
|
76
|
+
type SpringConfig,
|
|
77
|
+
} from './motion';
|
|
78
|
+
|
|
79
|
+
// Scales (mathematical relationships)
|
|
80
|
+
export {
|
|
81
|
+
// Ratio constants
|
|
82
|
+
ICON_RATIOS,
|
|
83
|
+
// Container sizes
|
|
84
|
+
CONTAINER_SIZES,
|
|
85
|
+
BUTTON_HEIGHTS,
|
|
86
|
+
TOGGLE_CONTAINER_SIZES,
|
|
87
|
+
ICON_PIXEL_SIZES,
|
|
88
|
+
// Icon size mappings
|
|
89
|
+
ICON_BUTTON_ICON_SIZE,
|
|
90
|
+
CHECKBOX_ICON_SIZE,
|
|
91
|
+
BUTTON_ICON_SIZE,
|
|
92
|
+
TEXT_INPUT_ICON_SIZE,
|
|
93
|
+
// Switch scales
|
|
94
|
+
SWITCH_THUMB_INSET,
|
|
95
|
+
SWITCH_DIMENSIONS,
|
|
96
|
+
calculateSwitchThumbSize,
|
|
97
|
+
// Touch target utilities
|
|
98
|
+
MIN_TOUCH_TARGET,
|
|
99
|
+
calculateHitSlop,
|
|
100
|
+
ICON_BUTTON_HIT_SLOP,
|
|
101
|
+
CHECKBOX_HIT_SLOP,
|
|
102
|
+
SWITCH_HIT_SLOP,
|
|
103
|
+
GHOST_ICON_BUTTON_HIT_SLOP,
|
|
104
|
+
// Spinner and text mappings
|
|
105
|
+
SPINNER_SIZE,
|
|
106
|
+
BUTTON_TEXT_VARIANT,
|
|
107
|
+
// Types
|
|
108
|
+
type ComponentSizeType,
|
|
109
|
+
type IconSizeType,
|
|
110
|
+
} from './scales';
|
|
111
|
+
|
|
112
|
+
// =============================================================================
|
|
113
|
+
// ICON SIZES
|
|
114
|
+
// =============================================================================
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Consistent icon sizing scale
|
|
118
|
+
* Scale: 12 → 16 → 20 → 24 (+4px) → 32 → 40 → 48 (+8px)
|
|
119
|
+
* Smaller icons need finer control; larger icons can have bigger jumps
|
|
120
|
+
*/
|
|
121
|
+
export const iconSize = {
|
|
122
|
+
/** 12 - Badges, inline text indicators, status dots */
|
|
123
|
+
xs: 12,
|
|
124
|
+
|
|
125
|
+
/** 16 - Compact buttons, dense lists, checkbox icons (sm) */
|
|
126
|
+
sm: 16,
|
|
127
|
+
|
|
128
|
+
/** 20 - Phone default, standard buttons, checkbox icons (md) */
|
|
129
|
+
md: 20,
|
|
130
|
+
|
|
131
|
+
/** 24 - Primary actions, phone headers, checkbox icons (lg) */
|
|
132
|
+
lg: 24,
|
|
133
|
+
|
|
134
|
+
/** 32 - Tablet headers, emphasized actions */
|
|
135
|
+
xl: 32,
|
|
136
|
+
|
|
137
|
+
/** 40 - Empty states, onboarding illustrations */
|
|
138
|
+
'2xl': 40,
|
|
139
|
+
|
|
140
|
+
/** 48 - Hero sections, large feature illustrations */
|
|
141
|
+
'3xl': 48,
|
|
142
|
+
} as const;
|
|
143
|
+
|
|
144
|
+
export type IconSize = typeof iconSize;
|
|
145
|
+
export type IconSizeKey = keyof typeof iconSize;
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StayEasy Design System - Motion Tokens
|
|
3
|
+
*
|
|
4
|
+
* Philosophy: Motion should be subtle and purposeful.
|
|
5
|
+
* Animations guide attention, not distract.
|
|
6
|
+
*
|
|
7
|
+
* Always respect reduced motion preferences.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* Animated.timing(value, {
|
|
11
|
+
* duration: theme.motion.duration.normal,
|
|
12
|
+
* easing: Easing.bezier(...theme.motion.easing.standard),
|
|
13
|
+
* })
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
// =============================================================================
|
|
17
|
+
// DURATION SCALE (in milliseconds)
|
|
18
|
+
// =============================================================================
|
|
19
|
+
|
|
20
|
+
export const duration = {
|
|
21
|
+
/** 0 - Instant (for reduced motion) */
|
|
22
|
+
instant: 0,
|
|
23
|
+
|
|
24
|
+
/** 100ms - Very fast micro-interactions */
|
|
25
|
+
fastest: 100,
|
|
26
|
+
|
|
27
|
+
/** 150ms - Fast transitions (hover, press) */
|
|
28
|
+
fast: 150,
|
|
29
|
+
|
|
30
|
+
/** 200ms - Normal transitions (most common) */
|
|
31
|
+
normal: 200,
|
|
32
|
+
|
|
33
|
+
/** 300ms - Slow transitions (page transitions) */
|
|
34
|
+
slow: 300,
|
|
35
|
+
|
|
36
|
+
/** 400ms - Very slow (complex animations) */
|
|
37
|
+
slower: 400,
|
|
38
|
+
|
|
39
|
+
/** 500ms - Slowest standard animation */
|
|
40
|
+
slowest: 500,
|
|
41
|
+
} as const;
|
|
42
|
+
|
|
43
|
+
// =============================================================================
|
|
44
|
+
// EASING CURVES (Bezier control points)
|
|
45
|
+
// =============================================================================
|
|
46
|
+
|
|
47
|
+
export const easing = {
|
|
48
|
+
/**
|
|
49
|
+
* Standard easing - for most transitions
|
|
50
|
+
* Starts fast, ends slow (ease-out)
|
|
51
|
+
*/
|
|
52
|
+
standard: [0.2, 0, 0, 1] as const,
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Entrance easing - elements entering the screen
|
|
56
|
+
* Starts slow, speeds up (ease-in)
|
|
57
|
+
*/
|
|
58
|
+
entrance: [0.4, 0, 1, 1] as const,
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Exit easing - elements leaving the screen
|
|
62
|
+
* Starts fast, slows down dramatically
|
|
63
|
+
*/
|
|
64
|
+
exit: [0, 0, 0.2, 1] as const,
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Emphasized easing - for important transitions
|
|
68
|
+
* More dramatic curve
|
|
69
|
+
*/
|
|
70
|
+
emphasized: [0.2, 0, 0, 1] as const,
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Linear - constant speed (use sparingly)
|
|
74
|
+
*/
|
|
75
|
+
linear: [0, 0, 1, 1] as const,
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Spring-like - bouncy feel (use for playful interactions)
|
|
79
|
+
* Note: For true spring physics, use Animated.spring()
|
|
80
|
+
*/
|
|
81
|
+
spring: [0.175, 0.885, 0.32, 1.275] as const,
|
|
82
|
+
} as const;
|
|
83
|
+
|
|
84
|
+
// =============================================================================
|
|
85
|
+
// SEMANTIC MOTION
|
|
86
|
+
// =============================================================================
|
|
87
|
+
|
|
88
|
+
export const semanticMotion = {
|
|
89
|
+
/** Button press feedback */
|
|
90
|
+
press: {
|
|
91
|
+
duration: duration.fast,
|
|
92
|
+
easing: easing.standard,
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
/** Micro-interactions (toggles, checkboxes) */
|
|
96
|
+
micro: {
|
|
97
|
+
duration: duration.fastest,
|
|
98
|
+
easing: easing.standard,
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
/** Standard transitions (modals, sheets) */
|
|
102
|
+
transition: {
|
|
103
|
+
duration: duration.normal,
|
|
104
|
+
easing: easing.standard,
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
/** Page/screen transitions */
|
|
108
|
+
page: {
|
|
109
|
+
duration: duration.slow,
|
|
110
|
+
easing: easing.emphasized,
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
/** Elements entering view */
|
|
114
|
+
enter: {
|
|
115
|
+
duration: duration.normal,
|
|
116
|
+
easing: easing.entrance,
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
/** Elements leaving view */
|
|
120
|
+
leave: {
|
|
121
|
+
duration: duration.fast,
|
|
122
|
+
easing: easing.exit,
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
/** Skeleton shimmer effect */
|
|
126
|
+
skeleton: {
|
|
127
|
+
duration: 1500,
|
|
128
|
+
easing: easing.linear,
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
/** Spinner rotation */
|
|
132
|
+
spinner: {
|
|
133
|
+
duration: 1000,
|
|
134
|
+
easing: easing.linear,
|
|
135
|
+
},
|
|
136
|
+
} as const;
|
|
137
|
+
|
|
138
|
+
// =============================================================================
|
|
139
|
+
// SPRING CONFIGURATIONS (for Animated.spring)
|
|
140
|
+
// =============================================================================
|
|
141
|
+
|
|
142
|
+
export const springConfig = {
|
|
143
|
+
/** Gentle spring - subtle, natural feel */
|
|
144
|
+
gentle: {
|
|
145
|
+
tension: 100,
|
|
146
|
+
friction: 10,
|
|
147
|
+
},
|
|
148
|
+
|
|
149
|
+
/** Responsive spring - quick and snappy */
|
|
150
|
+
responsive: {
|
|
151
|
+
tension: 200,
|
|
152
|
+
friction: 15,
|
|
153
|
+
},
|
|
154
|
+
|
|
155
|
+
/** Bouncy spring - playful, attention-grabbing */
|
|
156
|
+
bouncy: {
|
|
157
|
+
tension: 300,
|
|
158
|
+
friction: 8,
|
|
159
|
+
},
|
|
160
|
+
|
|
161
|
+
/** Stiff spring - minimal overshoot */
|
|
162
|
+
stiff: {
|
|
163
|
+
tension: 400,
|
|
164
|
+
friction: 30,
|
|
165
|
+
},
|
|
166
|
+
} as const;
|
|
167
|
+
|
|
168
|
+
// =============================================================================
|
|
169
|
+
// TYPE EXPORTS
|
|
170
|
+
// =============================================================================
|
|
171
|
+
|
|
172
|
+
export type Duration = typeof duration;
|
|
173
|
+
export type DurationKey = keyof typeof duration;
|
|
174
|
+
export type Easing = typeof easing;
|
|
175
|
+
export type EasingKey = keyof typeof easing;
|
|
176
|
+
export type SpringConfig = typeof springConfig;
|