@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,190 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StayEasy Design System - Shadow/Elevation Tokens
|
|
3
|
+
*
|
|
4
|
+
* Philosophy: Subtle, realistic, minimal.
|
|
5
|
+
* Shadows should be felt more than seen.
|
|
6
|
+
*
|
|
7
|
+
* Platform handling:
|
|
8
|
+
* - iOS: shadowColor/shadowOpacity/shadowRadius/shadowOffset
|
|
9
|
+
* - Android: elevation
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* style={[styles.card, theme.elevation.md]}
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { Platform, ViewStyle } from 'react-native';
|
|
16
|
+
|
|
17
|
+
// =============================================================================
|
|
18
|
+
// SHADOW DEFINITIONS
|
|
19
|
+
// =============================================================================
|
|
20
|
+
|
|
21
|
+
type ShadowStyle = Pick<
|
|
22
|
+
ViewStyle,
|
|
23
|
+
'shadowColor' | 'shadowOffset' | 'shadowOpacity' | 'shadowRadius' | 'elevation'
|
|
24
|
+
>;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Creates a cross-platform shadow
|
|
28
|
+
*/
|
|
29
|
+
const createShadow = (
|
|
30
|
+
offsetY: number,
|
|
31
|
+
blur: number,
|
|
32
|
+
opacity: number,
|
|
33
|
+
elevation: number
|
|
34
|
+
): ShadowStyle => ({
|
|
35
|
+
shadowColor: '#000000',
|
|
36
|
+
shadowOffset: { width: 0, height: offsetY },
|
|
37
|
+
shadowOpacity: opacity,
|
|
38
|
+
shadowRadius: blur,
|
|
39
|
+
elevation: Platform.OS === 'android' ? elevation : 0,
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
// =============================================================================
|
|
43
|
+
// ELEVATION SCALE
|
|
44
|
+
// =============================================================================
|
|
45
|
+
|
|
46
|
+
export const elevation = {
|
|
47
|
+
/** No shadow */
|
|
48
|
+
none: createShadow(0, 0, 0, 0),
|
|
49
|
+
|
|
50
|
+
/** Subtle lift - buttons hover, cards at rest */
|
|
51
|
+
xs: createShadow(1, 2, 0.05, 1),
|
|
52
|
+
|
|
53
|
+
/** Light shadow - active cards, dropdowns */
|
|
54
|
+
sm: createShadow(2, 4, 0.08, 2),
|
|
55
|
+
|
|
56
|
+
/** Medium shadow - floating cards, popovers */
|
|
57
|
+
md: createShadow(4, 8, 0.1, 4),
|
|
58
|
+
|
|
59
|
+
/** Prominent shadow - modals, sheets */
|
|
60
|
+
lg: createShadow(8, 16, 0.12, 8),
|
|
61
|
+
|
|
62
|
+
/** Heavy shadow - toasts, FAB */
|
|
63
|
+
xl: createShadow(12, 24, 0.15, 12),
|
|
64
|
+
|
|
65
|
+
/** Maximum shadow - dragging elements */
|
|
66
|
+
'2xl': createShadow(20, 32, 0.18, 16),
|
|
67
|
+
} as const;
|
|
68
|
+
|
|
69
|
+
// =============================================================================
|
|
70
|
+
// SEMANTIC ELEVATION
|
|
71
|
+
// =============================================================================
|
|
72
|
+
|
|
73
|
+
export const semanticElevation = {
|
|
74
|
+
/** Cards at rest */
|
|
75
|
+
card: elevation.xs,
|
|
76
|
+
|
|
77
|
+
/** Card when pressed/hovered */
|
|
78
|
+
cardActive: elevation.sm,
|
|
79
|
+
|
|
80
|
+
/** Floating action button */
|
|
81
|
+
fab: elevation.lg,
|
|
82
|
+
|
|
83
|
+
/** Bottom navigation */
|
|
84
|
+
bottomNav: elevation.md,
|
|
85
|
+
|
|
86
|
+
/** Header/app bar */
|
|
87
|
+
header: elevation.sm,
|
|
88
|
+
|
|
89
|
+
/** Dropdown menus */
|
|
90
|
+
dropdown: elevation.md,
|
|
91
|
+
|
|
92
|
+
/** Modal dialogs */
|
|
93
|
+
modal: elevation.xl,
|
|
94
|
+
|
|
95
|
+
/** Bottom sheets */
|
|
96
|
+
sheet: elevation.xl,
|
|
97
|
+
|
|
98
|
+
/** Toast notifications */
|
|
99
|
+
toast: elevation.lg,
|
|
100
|
+
|
|
101
|
+
/** Sticky elements */
|
|
102
|
+
sticky: elevation.sm,
|
|
103
|
+
} as const;
|
|
104
|
+
|
|
105
|
+
// =============================================================================
|
|
106
|
+
// OPACITY SCALE
|
|
107
|
+
// =============================================================================
|
|
108
|
+
|
|
109
|
+
export const opacity = {
|
|
110
|
+
/** Invisible */
|
|
111
|
+
0: 0,
|
|
112
|
+
|
|
113
|
+
/** Barely visible */
|
|
114
|
+
5: 0.05,
|
|
115
|
+
|
|
116
|
+
/** Very subtle */
|
|
117
|
+
10: 0.1,
|
|
118
|
+
|
|
119
|
+
/** Subtle */
|
|
120
|
+
20: 0.2,
|
|
121
|
+
|
|
122
|
+
/** Light */
|
|
123
|
+
30: 0.3,
|
|
124
|
+
|
|
125
|
+
/** Medium-light */
|
|
126
|
+
40: 0.4,
|
|
127
|
+
|
|
128
|
+
/** Medium */
|
|
129
|
+
50: 0.5,
|
|
130
|
+
|
|
131
|
+
/** Medium-heavy */
|
|
132
|
+
60: 0.6,
|
|
133
|
+
|
|
134
|
+
/** Heavy */
|
|
135
|
+
70: 0.7,
|
|
136
|
+
|
|
137
|
+
/** Very heavy */
|
|
138
|
+
80: 0.8,
|
|
139
|
+
|
|
140
|
+
/** Almost opaque */
|
|
141
|
+
90: 0.9,
|
|
142
|
+
|
|
143
|
+
/** Fully opaque */
|
|
144
|
+
100: 1,
|
|
145
|
+
} as const;
|
|
146
|
+
|
|
147
|
+
// =============================================================================
|
|
148
|
+
// Z-INDEX SCALE
|
|
149
|
+
// =============================================================================
|
|
150
|
+
|
|
151
|
+
export const zIndex = {
|
|
152
|
+
/** Below everything */
|
|
153
|
+
behind: -1,
|
|
154
|
+
|
|
155
|
+
/** Default layer */
|
|
156
|
+
base: 0,
|
|
157
|
+
|
|
158
|
+
/** Slightly raised */
|
|
159
|
+
raised: 10,
|
|
160
|
+
|
|
161
|
+
/** Dropdown menus */
|
|
162
|
+
dropdown: 100,
|
|
163
|
+
|
|
164
|
+
/** Sticky headers */
|
|
165
|
+
sticky: 200,
|
|
166
|
+
|
|
167
|
+
/** Overlays and backdrops */
|
|
168
|
+
overlay: 300,
|
|
169
|
+
|
|
170
|
+
/** Modal dialogs */
|
|
171
|
+
modal: 400,
|
|
172
|
+
|
|
173
|
+
/** Popovers and tooltips */
|
|
174
|
+
popover: 500,
|
|
175
|
+
|
|
176
|
+
/** Toast notifications */
|
|
177
|
+
toast: 600,
|
|
178
|
+
|
|
179
|
+
/** Maximum (debug tools, etc.) */
|
|
180
|
+
max: 9999,
|
|
181
|
+
} as const;
|
|
182
|
+
|
|
183
|
+
// =============================================================================
|
|
184
|
+
// TYPE EXPORTS
|
|
185
|
+
// =============================================================================
|
|
186
|
+
|
|
187
|
+
export type Elevation = typeof elevation;
|
|
188
|
+
export type ElevationKey = keyof typeof elevation;
|
|
189
|
+
export type Opacity = typeof opacity;
|
|
190
|
+
export type ZIndex = typeof zIndex;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StayEasy Design System - Spacing Tokens
|
|
3
|
+
*
|
|
4
|
+
* Based on a 4pt grid system for consistent rhythm.
|
|
5
|
+
* All spacing values are multiples of 4.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* padding: theme.spacing.md // 16
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
// =============================================================================
|
|
12
|
+
// SPACING SCALE (4pt grid)
|
|
13
|
+
// =============================================================================
|
|
14
|
+
|
|
15
|
+
export const spacing = {
|
|
16
|
+
/** 0 - No spacing */
|
|
17
|
+
none: 0,
|
|
18
|
+
|
|
19
|
+
/** 2 - Minimal spacing (half unit) */
|
|
20
|
+
'2xs': 2,
|
|
21
|
+
|
|
22
|
+
/** 4 - Tight spacing */
|
|
23
|
+
xs: 4,
|
|
24
|
+
|
|
25
|
+
/** 8 - Compact spacing */
|
|
26
|
+
sm: 8,
|
|
27
|
+
|
|
28
|
+
/** 12 - Comfortable compact */
|
|
29
|
+
md: 12,
|
|
30
|
+
|
|
31
|
+
/** 16 - Standard spacing */
|
|
32
|
+
lg: 16,
|
|
33
|
+
|
|
34
|
+
/** 20 - Comfortable spacing */
|
|
35
|
+
xl: 20,
|
|
36
|
+
|
|
37
|
+
/** 24 - Generous spacing */
|
|
38
|
+
'2xl': 24,
|
|
39
|
+
|
|
40
|
+
/** 32 - Section spacing */
|
|
41
|
+
'3xl': 32,
|
|
42
|
+
|
|
43
|
+
/** 40 - Large section spacing */
|
|
44
|
+
'4xl': 40,
|
|
45
|
+
|
|
46
|
+
/** 48 - Extra large spacing */
|
|
47
|
+
'5xl': 48,
|
|
48
|
+
|
|
49
|
+
/** 64 - Huge spacing */
|
|
50
|
+
'6xl': 64,
|
|
51
|
+
|
|
52
|
+
/** 80 - Maximum spacing */
|
|
53
|
+
'7xl': 80,
|
|
54
|
+
|
|
55
|
+
/** 96 - Ultra spacing */
|
|
56
|
+
'8xl': 96,
|
|
57
|
+
} as const;
|
|
58
|
+
|
|
59
|
+
// =============================================================================
|
|
60
|
+
// SEMANTIC SPACING
|
|
61
|
+
// =============================================================================
|
|
62
|
+
|
|
63
|
+
export const semanticSpacing = {
|
|
64
|
+
// Screen padding (horizontal safe area)
|
|
65
|
+
screenHorizontal: spacing.lg, // 16
|
|
66
|
+
|
|
67
|
+
// Screen padding (vertical)
|
|
68
|
+
screenVertical: spacing['2xl'], // 24
|
|
69
|
+
|
|
70
|
+
// Component internal padding
|
|
71
|
+
component: {
|
|
72
|
+
xs: spacing.xs, // 4 - Chips, badges
|
|
73
|
+
sm: spacing.sm, // 8 - Small buttons
|
|
74
|
+
md: spacing.md, // 12 - Standard buttons
|
|
75
|
+
lg: spacing.lg, // 16 - Cards, inputs
|
|
76
|
+
xl: spacing.xl, // 20 - Large cards
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
// Stack spacing (between items in a list)
|
|
80
|
+
stack: {
|
|
81
|
+
xs: spacing.xs, // 4 - Tight list
|
|
82
|
+
sm: spacing.sm, // 8 - Compact list
|
|
83
|
+
md: spacing.md, // 12 - Standard list
|
|
84
|
+
lg: spacing.lg, // 16 - Comfortable list
|
|
85
|
+
xl: spacing['2xl'], // 24 - Spacious list
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
// Inline spacing (between horizontal items)
|
|
89
|
+
inline: {
|
|
90
|
+
xs: spacing.xs, // 4
|
|
91
|
+
sm: spacing.sm, // 8
|
|
92
|
+
md: spacing.md, // 12
|
|
93
|
+
lg: spacing.lg, // 16
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
// Section spacing
|
|
97
|
+
section: {
|
|
98
|
+
sm: spacing['2xl'], // 24
|
|
99
|
+
md: spacing['3xl'], // 32
|
|
100
|
+
lg: spacing['5xl'], // 48
|
|
101
|
+
},
|
|
102
|
+
} as const;
|
|
103
|
+
|
|
104
|
+
// =============================================================================
|
|
105
|
+
// TOUCH TARGETS
|
|
106
|
+
// =============================================================================
|
|
107
|
+
|
|
108
|
+
export const touchTarget = {
|
|
109
|
+
/** Minimum touch target (44x44 per Apple HIG) */
|
|
110
|
+
min: 44,
|
|
111
|
+
|
|
112
|
+
/** Standard button height */
|
|
113
|
+
standard: 48,
|
|
114
|
+
|
|
115
|
+
/** Large button height */
|
|
116
|
+
large: 56,
|
|
117
|
+
} as const;
|
|
118
|
+
|
|
119
|
+
// =============================================================================
|
|
120
|
+
// HIT SLOP (for smaller visual elements)
|
|
121
|
+
// =============================================================================
|
|
122
|
+
|
|
123
|
+
export const hitSlop = {
|
|
124
|
+
/** Minimal hit slop expansion */
|
|
125
|
+
sm: { top: 8, bottom: 8, left: 8, right: 8 },
|
|
126
|
+
|
|
127
|
+
/** Standard hit slop expansion */
|
|
128
|
+
md: { top: 12, bottom: 12, left: 12, right: 12 },
|
|
129
|
+
|
|
130
|
+
/** Large hit slop expansion */
|
|
131
|
+
lg: { top: 16, bottom: 16, left: 16, right: 16 },
|
|
132
|
+
} as const;
|
|
133
|
+
|
|
134
|
+
// =============================================================================
|
|
135
|
+
// TYPE EXPORTS
|
|
136
|
+
// =============================================================================
|
|
137
|
+
|
|
138
|
+
export type Spacing = typeof spacing;
|
|
139
|
+
export type SemanticSpacing = typeof semanticSpacing;
|
|
140
|
+
export type SpacingKey = keyof typeof spacing;
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://stayeasy.design/tokens.schema.json",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "StayEasy Design System Tokens",
|
|
5
|
+
|
|
6
|
+
"colors": {
|
|
7
|
+
"base": {
|
|
8
|
+
"transparent": "transparent",
|
|
9
|
+
"white": "#FFFFFF",
|
|
10
|
+
"black": "#000000",
|
|
11
|
+
"coral": {
|
|
12
|
+
"50": "#FFF5F5",
|
|
13
|
+
"100": "#FFE5E5",
|
|
14
|
+
"200": "#FFCCCC",
|
|
15
|
+
"300": "#FFADAD",
|
|
16
|
+
"400": "#FF8585",
|
|
17
|
+
"500": "#FF5A5F",
|
|
18
|
+
"600": "#E54B50",
|
|
19
|
+
"700": "#CC3D41",
|
|
20
|
+
"800": "#B22E32",
|
|
21
|
+
"900": "#991F23"
|
|
22
|
+
},
|
|
23
|
+
"teal": {
|
|
24
|
+
"50": "#F0FDFA",
|
|
25
|
+
"100": "#CCFBF1",
|
|
26
|
+
"200": "#99F6E4",
|
|
27
|
+
"300": "#5EEAD4",
|
|
28
|
+
"400": "#2DD4BF",
|
|
29
|
+
"500": "#14B8A6",
|
|
30
|
+
"600": "#0D9488",
|
|
31
|
+
"700": "#0F766E",
|
|
32
|
+
"800": "#115E59",
|
|
33
|
+
"900": "#134E4A"
|
|
34
|
+
},
|
|
35
|
+
"gray": {
|
|
36
|
+
"50": "#FAFAF9",
|
|
37
|
+
"100": "#F5F5F4",
|
|
38
|
+
"200": "#E7E5E4",
|
|
39
|
+
"300": "#D6D3D1",
|
|
40
|
+
"400": "#A8A29E",
|
|
41
|
+
"500": "#78716C",
|
|
42
|
+
"600": "#57534E",
|
|
43
|
+
"700": "#44403C",
|
|
44
|
+
"800": "#292524",
|
|
45
|
+
"900": "#1C1917"
|
|
46
|
+
},
|
|
47
|
+
"green": {
|
|
48
|
+
"50": "#F0FDF4",
|
|
49
|
+
"100": "#DCFCE7",
|
|
50
|
+
"200": "#BBF7D0",
|
|
51
|
+
"300": "#86EFAC",
|
|
52
|
+
"400": "#4ADE80",
|
|
53
|
+
"500": "#22C55E",
|
|
54
|
+
"600": "#16A34A",
|
|
55
|
+
"700": "#15803D",
|
|
56
|
+
"800": "#166534",
|
|
57
|
+
"900": "#14532D"
|
|
58
|
+
},
|
|
59
|
+
"amber": {
|
|
60
|
+
"50": "#FFFBEB",
|
|
61
|
+
"100": "#FEF3C7",
|
|
62
|
+
"200": "#FDE68A",
|
|
63
|
+
"300": "#FCD34D",
|
|
64
|
+
"400": "#FBBF24",
|
|
65
|
+
"500": "#F59E0B",
|
|
66
|
+
"600": "#D97706",
|
|
67
|
+
"700": "#B45309",
|
|
68
|
+
"800": "#92400E",
|
|
69
|
+
"900": "#78350F"
|
|
70
|
+
},
|
|
71
|
+
"red": {
|
|
72
|
+
"50": "#FEF2F2",
|
|
73
|
+
"100": "#FEE2E2",
|
|
74
|
+
"200": "#FECACA",
|
|
75
|
+
"300": "#FCA5A5",
|
|
76
|
+
"400": "#F87171",
|
|
77
|
+
"500": "#EF4444",
|
|
78
|
+
"600": "#DC2626",
|
|
79
|
+
"700": "#B91C1C",
|
|
80
|
+
"800": "#991B1B",
|
|
81
|
+
"900": "#7F1D1D"
|
|
82
|
+
},
|
|
83
|
+
"blue": {
|
|
84
|
+
"50": "#EFF6FF",
|
|
85
|
+
"100": "#DBEAFE",
|
|
86
|
+
"200": "#BFDBFE",
|
|
87
|
+
"300": "#93C5FD",
|
|
88
|
+
"400": "#60A5FA",
|
|
89
|
+
"500": "#3B82F6",
|
|
90
|
+
"600": "#2563EB",
|
|
91
|
+
"700": "#1D4ED8",
|
|
92
|
+
"800": "#1E40AF",
|
|
93
|
+
"900": "#1E3A8A"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
"typography": {
|
|
99
|
+
"fontFamily": {
|
|
100
|
+
"regular": "System",
|
|
101
|
+
"medium": "System",
|
|
102
|
+
"semibold": "System",
|
|
103
|
+
"bold": "System",
|
|
104
|
+
"mono": "monospace"
|
|
105
|
+
},
|
|
106
|
+
"fontWeight": {
|
|
107
|
+
"regular": "400",
|
|
108
|
+
"medium": "500",
|
|
109
|
+
"semibold": "600",
|
|
110
|
+
"bold": "700"
|
|
111
|
+
},
|
|
112
|
+
"fontSize": {
|
|
113
|
+
"xs": 11,
|
|
114
|
+
"sm": 13,
|
|
115
|
+
"md": 15,
|
|
116
|
+
"lg": 17,
|
|
117
|
+
"xl": 20,
|
|
118
|
+
"2xl": 24,
|
|
119
|
+
"3xl": 30,
|
|
120
|
+
"4xl": 36,
|
|
121
|
+
"5xl": 48
|
|
122
|
+
},
|
|
123
|
+
"lineHeight": {
|
|
124
|
+
"tight": 1.2,
|
|
125
|
+
"snug": 1.375,
|
|
126
|
+
"normal": 1.5,
|
|
127
|
+
"relaxed": 1.625,
|
|
128
|
+
"loose": 2
|
|
129
|
+
},
|
|
130
|
+
"letterSpacing": {
|
|
131
|
+
"tighter": -0.8,
|
|
132
|
+
"tight": -0.4,
|
|
133
|
+
"normal": 0,
|
|
134
|
+
"wide": 0.4,
|
|
135
|
+
"wider": 0.8,
|
|
136
|
+
"widest": 1.6
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
|
|
140
|
+
"spacing": {
|
|
141
|
+
"none": 0,
|
|
142
|
+
"2xs": 2,
|
|
143
|
+
"xs": 4,
|
|
144
|
+
"sm": 8,
|
|
145
|
+
"md": 12,
|
|
146
|
+
"lg": 16,
|
|
147
|
+
"xl": 20,
|
|
148
|
+
"2xl": 24,
|
|
149
|
+
"3xl": 32,
|
|
150
|
+
"4xl": 40,
|
|
151
|
+
"5xl": 48,
|
|
152
|
+
"6xl": 64,
|
|
153
|
+
"7xl": 80,
|
|
154
|
+
"8xl": 96
|
|
155
|
+
},
|
|
156
|
+
|
|
157
|
+
"radii": {
|
|
158
|
+
"none": 0,
|
|
159
|
+
"xs": 4,
|
|
160
|
+
"sm": 8,
|
|
161
|
+
"md": 12,
|
|
162
|
+
"lg": 16,
|
|
163
|
+
"xl": 20,
|
|
164
|
+
"2xl": 24,
|
|
165
|
+
"3xl": 32,
|
|
166
|
+
"full": 9999
|
|
167
|
+
},
|
|
168
|
+
|
|
169
|
+
"elevation": {
|
|
170
|
+
"none": { "offsetY": 0, "blur": 0, "opacity": 0, "android": 0 },
|
|
171
|
+
"xs": { "offsetY": 1, "blur": 2, "opacity": 0.05, "android": 1 },
|
|
172
|
+
"sm": { "offsetY": 2, "blur": 4, "opacity": 0.08, "android": 2 },
|
|
173
|
+
"md": { "offsetY": 4, "blur": 8, "opacity": 0.1, "android": 4 },
|
|
174
|
+
"lg": { "offsetY": 8, "blur": 16, "opacity": 0.12, "android": 8 },
|
|
175
|
+
"xl": { "offsetY": 12, "blur": 24, "opacity": 0.15, "android": 12 },
|
|
176
|
+
"2xl": { "offsetY": 20, "blur": 32, "opacity": 0.18, "android": 16 }
|
|
177
|
+
},
|
|
178
|
+
|
|
179
|
+
"motion": {
|
|
180
|
+
"duration": {
|
|
181
|
+
"instant": 0,
|
|
182
|
+
"fastest": 100,
|
|
183
|
+
"fast": 150,
|
|
184
|
+
"normal": 200,
|
|
185
|
+
"slow": 300,
|
|
186
|
+
"slower": 400,
|
|
187
|
+
"slowest": 500
|
|
188
|
+
},
|
|
189
|
+
"easing": {
|
|
190
|
+
"standard": [0.2, 0, 0, 1],
|
|
191
|
+
"entrance": [0.4, 0, 1, 1],
|
|
192
|
+
"exit": [0, 0, 0.2, 1],
|
|
193
|
+
"emphasized": [0.2, 0, 0, 1],
|
|
194
|
+
"linear": [0, 0, 1, 1],
|
|
195
|
+
"spring": [0.175, 0.885, 0.32, 1.275]
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
|
|
199
|
+
"iconSize": {
|
|
200
|
+
"xs": 16,
|
|
201
|
+
"sm": 20,
|
|
202
|
+
"md": 24,
|
|
203
|
+
"lg": 32,
|
|
204
|
+
"xl": 40,
|
|
205
|
+
"2xl": 48
|
|
206
|
+
}
|
|
207
|
+
}
|